diff --git a/console/package-lock.json b/console/package-lock.json index ffd9009397..cf6b856321 100644 --- a/console/package-lock.json +++ b/console/package-lock.json @@ -8,13 +8,13 @@ "version": "0.0.0", "dependencies": { "@angular/animations": "~12.0.3", - "@angular/cdk": "~12.0.0", + "@angular/cdk": "~12.1.1", "@angular/common": "~12.0.5", "@angular/compiler": "~12.0.0", "@angular/core": "~12.0.0", "@angular/forms": "~12.0.5", - "@angular/material": "^12.0.3", - "@angular/material-moment-adapter": "^12.0.3", + "@angular/material": "^12.1.1", + "@angular/material-moment-adapter": "^12.1.1", "@angular/platform-browser": "~12.0.0", "@angular/platform-browser-dynamic": "~12.0.5", "@angular/router": "~12.0.5", @@ -35,7 +35,6 @@ "libphonenumber-js": "^1.9.16", "moment": "^2.29.1", "ngx-color": "^7.2.0", - "ngx-image-cropper": "^3.3.5", "ngx-quicklink": "^0.2.6", "rxjs": "~6.6.7", "ts-protoc-gen": "^0.14.0", @@ -44,8 +43,8 @@ "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~12.1.0", - "@angular/cli": "~12.1.0", + "@angular-devkit/build-angular": "~12.1.1", + "@angular/cli": "~12.1.1", "@angular/compiler-cli": "~12.0.5", "@angular/language-service": "~12.1.0", "@types/jasmine": "~3.7.7", @@ -70,12 +69,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1201.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1201.0.tgz", - "integrity": "sha512-tqIhGccWjI32xmLs0UIr2umET18Le+r5PxCf30ueOE5pv1q7XKD06EzGx9J05B1aUgDFb3LP/ArlKel5JnD+3g==", + "version": "0.1201.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1201.1.tgz", + "integrity": "sha512-n7ycxrIPbtnV7q8PH5Uvs8Jd++u6hWUiB+8EUxznSfdHGA+fE7TTnJTkc27LoMlYZAImc/Axp/uyYZ6Awt72ZQ==", "dev": true, "dependencies": { - "@angular-devkit/core": "12.1.0", + "@angular-devkit/core": "12.1.1", "rxjs": "6.6.7" }, "engines": { @@ -85,18 +84,19 @@ } }, "node_modules/@angular-devkit/build-angular": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-12.1.0.tgz", - "integrity": "sha512-zgZJLp9qwxJ9w31NHLIVg2kJZAZw4I/tuafP3CDpsLasFCepDG9+oDNEMeOoixnvUqyQE3KhAqxBkHZhcDXnFA==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-12.1.1.tgz", + "integrity": "sha512-mJjpPuJlS55gwi/W2g8CIMjPVtUjKCKJdjn34eeYk1Kgw9JYRIsiEivx1hcGyLmiSTF8gRGvW1TEyO+k55/QqA==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1201.0", - "@angular-devkit/build-optimizer": "0.1201.0", - "@angular-devkit/build-webpack": "0.1201.0", - "@angular-devkit/core": "12.1.0", + "@angular-devkit/architect": "0.1201.1", + "@angular-devkit/build-optimizer": "0.1201.1", + "@angular-devkit/build-webpack": "0.1201.1", + "@angular-devkit/core": "12.1.1", "@babel/core": "7.14.6", "@babel/generator": "7.14.5", "@babel/helper-annotate-as-pure": "7.14.5", + "@babel/plugin-proposal-async-generator-functions": "7.14.7", "@babel/plugin-transform-async-to-generator": "7.14.5", "@babel/plugin-transform-runtime": "7.14.5", "@babel/preset-env": "7.14.7", @@ -104,7 +104,7 @@ "@babel/template": "7.14.5", "@discoveryjs/json-ext": "0.5.3", "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@ngtools/webpack": "12.1.0", + "@ngtools/webpack": "12.1.1", "ansi-colors": "4.1.1", "babel-loader": "8.2.2", "browserslist": "^4.9.1", @@ -126,7 +126,7 @@ "less-loader": "10.0.0", "license-webpack-plugin": "2.3.19", "loader-utils": "2.0.0", - "mini-css-extract-plugin": "1.6.0", + "mini-css-extract-plugin": "1.6.2", "minimatch": "3.0.4", "open": "8.2.1", "ora": "5.4.1", @@ -153,7 +153,7 @@ "text-table": "0.2.0", "tree-kill": "1.2.2", "tslib": "2.3.0", - "webpack": "5.40.0", + "webpack": "5.41.1", "webpack-dev-middleware": "5.0.0", "webpack-dev-server": "3.11.2", "webpack-merge": "5.8.0", @@ -199,16 +199,10 @@ } } }, - "node_modules/@angular-devkit/build-angular/node_modules/tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true - }, "node_modules/@angular-devkit/build-optimizer": { - "version": "0.1201.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1201.0.tgz", - "integrity": "sha512-FbvJfvT2fM1MNCqImfXtBjeIv6l5tDCBrXsSydyIG+2Fdp6NGlZQdMWYjfc0wGUDdCv1YjIGOL2BQ5hx6Q5HRA==", + "version": "0.1201.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1201.1.tgz", + "integrity": "sha512-SdAffCpjRNFKwnEq8xdPdCWPgdrfY8rlmTZXGY7e1whR4vnyZi+afk1BAsmbNyWlHYVv0Zcnh+Q1VH3OBDLwhw==", "dev": true, "dependencies": { "source-map": "0.7.3", @@ -232,12 +226,6 @@ } } }, - "node_modules/@angular-devkit/build-optimizer/node_modules/tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true - }, "node_modules/@angular-devkit/build-optimizer/node_modules/typescript": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz", @@ -252,12 +240,12 @@ } }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1201.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1201.0.tgz", - "integrity": "sha512-l733LS0kV2AZwzYRGH6c93sjVfGz3Jw4g448c7qdXIMf1pSYuba8D2hsj6VqNcOZkXmZwtEB1soeahwwPjWRag==", + "version": "0.1201.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1201.1.tgz", + "integrity": "sha512-isgj6bSFr16tuXEoX0VypvsQmg3uDOdvYDQZvkwzUrIyvQo5TeoOy/MLgrb9v+tXjEA7oZrzuigE4Hjzn466bQ==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1201.0", + "@angular-devkit/architect": "0.1201.1", "rxjs": "6.6.7" }, "engines": { @@ -271,9 +259,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-12.1.0.tgz", - "integrity": "sha512-y6q/hn9/j6LwNgDzTBXe5pTXouU7nuc3KZFq3JwfTdo4yTIxN1Rdv9+zfzDkzEcYtyFoqLqqskQFme/DqdbEZw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-12.1.1.tgz", + "integrity": "sha512-z5+O3ugXbo8djKPjUtf/UfnYCmco2K1LVhQ6cWLhKi3NKRBiHeNmZh5nAycqFD8/Q+oI/+Ao40MkmkK1Tq0jsw==", "dev": true, "dependencies": { "ajv": "8.6.0", @@ -290,12 +278,12 @@ } }, "node_modules/@angular-devkit/schematics": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-12.1.0.tgz", - "integrity": "sha512-KlE1fnvqWItt9dYCaQ89b9WoqFvOK64kemCLGGx49CllQ3con1lwXW2iauzT/29UoK1rSzvTVMvTJcDQOJ7isQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-12.1.1.tgz", + "integrity": "sha512-oRsvlhJQLXkGWdJvArOby+G4j8UX2uCHwrN4EC1hXUKs84UsD+UATYOAh4h2auy+I+sdrmELUaHwdI4wdKpqnw==", "dev": true, "dependencies": { - "@angular-devkit/core": "12.1.0", + "@angular-devkit/core": "12.1.1", "ora": "5.4.1", "rxjs": "6.6.7" }, @@ -320,11 +308,11 @@ } }, "node_modules/@angular/cdk": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.0.4.tgz", - "integrity": "sha512-NX/1kEc6ndyEHjGcMtMJYEjwmoURuwRSqKJLbGcHTUwXuuR+hfDP/vU1XDOeXNC80SV+0B4BpJnREkINILfYKw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.1.1.tgz", + "integrity": "sha512-MJENa8qmfLAr6t59u1+mEC2YPbCn4n3vsY6k8fKyf+ILXwwGHWNZlYblaRMBjrF/crSx1Kd5vb30RCqIcNTGsA==", "dependencies": { - "tslib": "^2.1.0" + "tslib": "^2.2.0" }, "optionalDependencies": { "parse5": "^5.0.0" @@ -336,16 +324,16 @@ } }, "node_modules/@angular/cli": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-12.1.0.tgz", - "integrity": "sha512-3xvweF9oiR1X9KlXIFPGQtylctqPi9t7SjI/8M2z/qRP4GkMu2CiScNysWFMdJsNsrRvLGQdtAbJFBWfW1vmkA==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-12.1.1.tgz", + "integrity": "sha512-rQZItn3kpYEX6tH7wquAEhJuxVpW6sYKO2tSi8Suxrm+iz1RPRnfhSwS1WIEumnwpFRtH/8P+lOrScax1ldYkg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@angular-devkit/architect": "0.1201.0", - "@angular-devkit/core": "12.1.0", - "@angular-devkit/schematics": "12.1.0", - "@schematics/angular": "12.1.0", + "@angular-devkit/architect": "0.1201.1", + "@angular-devkit/core": "12.1.1", + "@angular-devkit/schematics": "12.1.1", + "@schematics/angular": "12.1.1", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.1", "debug": "4.3.1", @@ -483,15 +471,15 @@ } }, "node_modules/@angular/material": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-12.0.4.tgz", - "integrity": "sha512-pvfYEeUCLR7EmA6R/kkXz5jfl+RHwh3AS9X9kWARWIOzA7p0hG9ApoFT5KCofTBNp0nukau1QoGR4WGla6wWvQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-12.1.1.tgz", + "integrity": "sha512-q2vhbVQfjr+88beqCotCVlaPRyy9y2O2asiR3+0BU9OJ1DjTo1QpBmMpck5InP7Es49t9RTk9RzzC0t18p45yA==", "dependencies": { - "tslib": "^2.1.0" + "tslib": "^2.2.0" }, "peerDependencies": { "@angular/animations": "^12.0.0 || ^13.0.0-0", - "@angular/cdk": "12.0.4", + "@angular/cdk": "12.1.1", "@angular/common": "^12.0.0 || ^13.0.0-0", "@angular/core": "^12.0.0 || ^13.0.0-0", "@angular/forms": "^12.0.0 || ^13.0.0-0", @@ -499,15 +487,15 @@ } }, "node_modules/@angular/material-moment-adapter": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-12.0.4.tgz", - "integrity": "sha512-gouOXKHxI8HQTKKxAgB9MVQMeHQWFReULFvY83C3aRJhoeiI8bDiWw0eQZP0WpHCBvAx/DlCBHBQYf+I5Q3z0w==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-12.1.1.tgz", + "integrity": "sha512-YQs4BFiQ0rCYhWzcPJ6IS6zJRM+iKAjAEo/Z89G4tR1vekA4Fl95PBs9DVoCLS2uptOPL99tnUMqeNtFjUM6wQ==", "dependencies": { - "tslib": "^2.1.0" + "tslib": "^2.2.0" }, "peerDependencies": { "@angular/core": "^12.0.0 || ^13.0.0-0", - "@angular/material": "12.0.4", + "@angular/material": "12.1.1", "moment": "^2.18.1" } }, @@ -2250,9 +2238,9 @@ } }, "node_modules/@ngtools/webpack": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-12.1.0.tgz", - "integrity": "sha512-b35mXdPYVuLwHNZ4r29Zt/SIOI9eFc8GbF1MzirdzM2X4k/wWD1kFIAVseDeA12jb04Jj7UnU6eZo0dDe24WFw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-12.1.1.tgz", + "integrity": "sha512-NOHTBEjUkawQSU6sHA7EJSi5Ixw+oVmlYi17HXAhGRY1czasLQMiKQPnigbSgMLBR9Jhez7TttqAUtx6Pey2FQ==", "dev": true, "dependencies": { "enhanced-resolve": "5.8.2" @@ -2471,13 +2459,13 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "node_modules/@schematics/angular": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-12.1.0.tgz", - "integrity": "sha512-BUCBiW+DQsOofSs4TE26M2OhlS0g9Mdyd0xWF4FD2Ab3xwQgkV1gogZgCl9dZtNfiimYebdM9LOeHqYWmvqCdw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-12.1.1.tgz", + "integrity": "sha512-ukSKoAWfXt28TiHlRrEzKFW63V3jroRF3xnBKtsaL3AZ4MVJiHzOWXkzDAZBaEOLUH/l6Xhm64NMgOqMEAg1rQ==", "dev": true, "dependencies": { - "@angular-devkit/core": "12.1.0", - "@angular-devkit/schematics": "12.1.0", + "@angular-devkit/core": "12.1.1", + "@angular-devkit/schematics": "12.1.1", "jsonc-parser": "3.0.0" }, "engines": { @@ -2570,9 +2558,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.47", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", - "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==", + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", + "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", "dev": true }, "node_modules/@types/file-saver": { @@ -3370,9 +3358,9 @@ } }, "node_modules/autoprefixer/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -4936,9 +4924,9 @@ } }, "node_modules/css-blank-pseudo/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -5027,9 +5015,9 @@ } }, "node_modules/css-has-pseudo/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -5306,9 +5294,9 @@ } }, "node_modules/css-prefers-color-scheme/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -10010,9 +9998,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.0.tgz", - "integrity": "sha512-nPFKI7NSy6uONUo9yn2hIfb9vyYvkFu95qki0e21DQ9uaqNKDP15DGpK0KnV6wDroWxPHtExrdEwx/yDQ8nVRw==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz", + "integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==", "dev": true, "dependencies": { "loader-utils": "^2.0.0", @@ -10062,12 +10050,12 @@ "dev": true }, "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz", + "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.6", + "@types/json-schema": "^7.0.7", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" }, @@ -10379,24 +10367,6 @@ "@angular/core": ">=12.0.0-0" } }, - "node_modules/ngx-image-cropper": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/ngx-image-cropper/-/ngx-image-cropper-3.3.5.tgz", - "integrity": "sha512-0yRVKG5XAbVo3rOaj/iFDlekGsxEqXKU9iXFbjyvHvRT2DFs+AjwtyvINsHCWw+4ed9yA4Y+wLIUNqzA0bfxLw==", - "dependencies": { - "tslib": "^1.9.0" - }, - "peerDependencies": { - "@angular/common": ">=8.0.0", - "@angular/core": ">=8.0.0", - "@angular/platform-browser": ">=8.0.0" - } - }, - "node_modules/ngx-image-cropper/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/ngx-quicklink": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/ngx-quicklink/-/ngx-quicklink-0.2.7.tgz", @@ -11511,9 +11481,9 @@ } }, "node_modules/postcss-attribute-case-insensitive/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11576,9 +11546,9 @@ } }, "node_modules/postcss-color-functional-notation/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11629,9 +11599,9 @@ } }, "node_modules/postcss-color-gray/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11681,9 +11651,9 @@ } }, "node_modules/postcss-color-hex-alpha/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11734,9 +11704,9 @@ } }, "node_modules/postcss-color-mod-function/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11786,9 +11756,9 @@ } }, "node_modules/postcss-color-rebeccapurple/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11870,9 +11840,9 @@ } }, "node_modules/postcss-custom-media/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11922,9 +11892,9 @@ } }, "node_modules/postcss-custom-properties/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -11986,9 +11956,9 @@ } }, "node_modules/postcss-custom-selectors/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12064,9 +12034,9 @@ } }, "node_modules/postcss-dir-pseudo-class/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12178,9 +12148,9 @@ } }, "node_modules/postcss-double-position-gradients/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12230,9 +12200,9 @@ } }, "node_modules/postcss-env-function/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12281,9 +12251,9 @@ } }, "node_modules/postcss-focus-visible/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12332,9 +12302,9 @@ } }, "node_modules/postcss-focus-within/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12380,9 +12350,9 @@ } }, "node_modules/postcss-font-variant/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12431,9 +12401,9 @@ } }, "node_modules/postcss-gap-properties/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12496,9 +12466,9 @@ } }, "node_modules/postcss-image-set-function/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12561,9 +12531,9 @@ } }, "node_modules/postcss-initial/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12614,9 +12584,9 @@ } }, "node_modules/postcss-lab-function/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12665,9 +12635,9 @@ } }, "node_modules/postcss-less/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12738,9 +12708,9 @@ } }, "node_modules/postcss-logical/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -12789,9 +12759,9 @@ } }, "node_modules/postcss-media-minmax/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13008,9 +12978,9 @@ } }, "node_modules/postcss-nesting/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13213,9 +13183,9 @@ } }, "node_modules/postcss-overflow-shorthand/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13261,9 +13231,9 @@ } }, "node_modules/postcss-page-break/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13313,9 +13283,9 @@ } }, "node_modules/postcss-place/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13400,9 +13370,9 @@ } }, "node_modules/postcss-preset-env/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13464,9 +13434,9 @@ } }, "node_modules/postcss-pseudo-class-any-link/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13558,9 +13528,9 @@ } }, "node_modules/postcss-replace-overflow-wrap/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13615,9 +13585,9 @@ } }, "node_modules/postcss-safe-parser/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13664,9 +13634,9 @@ } }, "node_modules/postcss-sass/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13715,9 +13685,9 @@ } }, "node_modules/postcss-scss/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13764,9 +13734,9 @@ } }, "node_modules/postcss-selector-matches/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -13813,9 +13783,9 @@ } }, "node_modules/postcss-selector-not/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -14492,6 +14462,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "deprecated": "The", "dev": true, "engines": { "node": ">=0.4.x" @@ -15113,9 +15084,9 @@ } }, "node_modules/resolve-url-loader/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -16858,9 +16829,9 @@ "dev": true }, "node_modules/stylelint/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -17057,9 +17028,9 @@ } }, "node_modules/sugarss/node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -17554,9 +17525,9 @@ } }, "node_modules/tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" }, "node_modules/tslint": { "version": "6.1.3", @@ -18287,13 +18258,13 @@ } }, "node_modules/webpack": { - "version": "5.40.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.40.0.tgz", - "integrity": "sha512-c7f5e/WWrxXWUzQqTBg54vBs5RgcAgpvKE4F4VegVgfo4x660ZxYUF2/hpMkZUnLjgytVTitjeXaN4IPlXCGIw==", + "version": "5.41.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.41.1.tgz", + "integrity": "sha512-AJZIIsqJ/MVTmegEq9Tlw5mk5EHdGiJbDdz9qP15vmUH+oxI1FdWcL0E9EO8K/zKaRPWqEs7G/OPxq1P61u5Ug==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.47", + "@types/estree": "^0.0.48", "@webassemblyjs/ast": "1.11.0", "@webassemblyjs/wasm-edit": "1.11.0", "@webassemblyjs/wasm-parser": "1.11.0", @@ -19653,28 +19624,29 @@ }, "dependencies": { "@angular-devkit/architect": { - "version": "0.1201.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1201.0.tgz", - "integrity": "sha512-tqIhGccWjI32xmLs0UIr2umET18Le+r5PxCf30ueOE5pv1q7XKD06EzGx9J05B1aUgDFb3LP/ArlKel5JnD+3g==", + "version": "0.1201.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1201.1.tgz", + "integrity": "sha512-n7ycxrIPbtnV7q8PH5Uvs8Jd++u6hWUiB+8EUxznSfdHGA+fE7TTnJTkc27LoMlYZAImc/Axp/uyYZ6Awt72ZQ==", "dev": true, "requires": { - "@angular-devkit/core": "12.1.0", + "@angular-devkit/core": "12.1.1", "rxjs": "6.6.7" } }, "@angular-devkit/build-angular": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-12.1.0.tgz", - "integrity": "sha512-zgZJLp9qwxJ9w31NHLIVg2kJZAZw4I/tuafP3CDpsLasFCepDG9+oDNEMeOoixnvUqyQE3KhAqxBkHZhcDXnFA==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-12.1.1.tgz", + "integrity": "sha512-mJjpPuJlS55gwi/W2g8CIMjPVtUjKCKJdjn34eeYk1Kgw9JYRIsiEivx1hcGyLmiSTF8gRGvW1TEyO+k55/QqA==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1201.0", - "@angular-devkit/build-optimizer": "0.1201.0", - "@angular-devkit/build-webpack": "0.1201.0", - "@angular-devkit/core": "12.1.0", + "@angular-devkit/architect": "0.1201.1", + "@angular-devkit/build-optimizer": "0.1201.1", + "@angular-devkit/build-webpack": "0.1201.1", + "@angular-devkit/core": "12.1.1", "@babel/core": "7.14.6", "@babel/generator": "7.14.5", "@babel/helper-annotate-as-pure": "7.14.5", + "@babel/plugin-proposal-async-generator-functions": "7.14.7", "@babel/plugin-transform-async-to-generator": "7.14.5", "@babel/plugin-transform-runtime": "7.14.5", "@babel/preset-env": "7.14.7", @@ -19682,7 +19654,7 @@ "@babel/template": "7.14.5", "@discoveryjs/json-ext": "0.5.3", "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@ngtools/webpack": "12.1.0", + "@ngtools/webpack": "12.1.1", "ansi-colors": "4.1.1", "babel-loader": "8.2.2", "browserslist": "^4.9.1", @@ -19704,7 +19676,7 @@ "less-loader": "10.0.0", "license-webpack-plugin": "2.3.19", "loader-utils": "2.0.0", - "mini-css-extract-plugin": "1.6.0", + "mini-css-extract-plugin": "1.6.2", "minimatch": "3.0.4", "open": "8.2.1", "ora": "5.4.1", @@ -19731,25 +19703,17 @@ "text-table": "0.2.0", "tree-kill": "1.2.2", "tslib": "2.3.0", - "webpack": "5.40.0", + "webpack": "5.41.1", "webpack-dev-middleware": "5.0.0", "webpack-dev-server": "3.11.2", "webpack-merge": "5.8.0", "webpack-subresource-integrity": "1.5.2" - }, - "dependencies": { - "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true - } } }, "@angular-devkit/build-optimizer": { - "version": "0.1201.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1201.0.tgz", - "integrity": "sha512-FbvJfvT2fM1MNCqImfXtBjeIv6l5tDCBrXsSydyIG+2Fdp6NGlZQdMWYjfc0wGUDdCv1YjIGOL2BQ5hx6Q5HRA==", + "version": "0.1201.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1201.1.tgz", + "integrity": "sha512-SdAffCpjRNFKwnEq8xdPdCWPgdrfY8rlmTZXGY7e1whR4vnyZi+afk1BAsmbNyWlHYVv0Zcnh+Q1VH3OBDLwhw==", "dev": true, "requires": { "source-map": "0.7.3", @@ -19757,12 +19721,6 @@ "typescript": "4.3.4" }, "dependencies": { - "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true - }, "typescript": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz", @@ -19772,19 +19730,19 @@ } }, "@angular-devkit/build-webpack": { - "version": "0.1201.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1201.0.tgz", - "integrity": "sha512-l733LS0kV2AZwzYRGH6c93sjVfGz3Jw4g448c7qdXIMf1pSYuba8D2hsj6VqNcOZkXmZwtEB1soeahwwPjWRag==", + "version": "0.1201.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1201.1.tgz", + "integrity": "sha512-isgj6bSFr16tuXEoX0VypvsQmg3uDOdvYDQZvkwzUrIyvQo5TeoOy/MLgrb9v+tXjEA7oZrzuigE4Hjzn466bQ==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1201.0", + "@angular-devkit/architect": "0.1201.1", "rxjs": "6.6.7" } }, "@angular-devkit/core": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-12.1.0.tgz", - "integrity": "sha512-y6q/hn9/j6LwNgDzTBXe5pTXouU7nuc3KZFq3JwfTdo4yTIxN1Rdv9+zfzDkzEcYtyFoqLqqskQFme/DqdbEZw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-12.1.1.tgz", + "integrity": "sha512-z5+O3ugXbo8djKPjUtf/UfnYCmco2K1LVhQ6cWLhKi3NKRBiHeNmZh5nAycqFD8/Q+oI/+Ao40MkmkK1Tq0jsw==", "dev": true, "requires": { "ajv": "8.6.0", @@ -19796,12 +19754,12 @@ } }, "@angular-devkit/schematics": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-12.1.0.tgz", - "integrity": "sha512-KlE1fnvqWItt9dYCaQ89b9WoqFvOK64kemCLGGx49CllQ3con1lwXW2iauzT/29UoK1rSzvTVMvTJcDQOJ7isQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-12.1.1.tgz", + "integrity": "sha512-oRsvlhJQLXkGWdJvArOby+G4j8UX2uCHwrN4EC1hXUKs84UsD+UATYOAh4h2auy+I+sdrmELUaHwdI4wdKpqnw==", "dev": true, "requires": { - "@angular-devkit/core": "12.1.0", + "@angular-devkit/core": "12.1.1", "ora": "5.4.1", "rxjs": "6.6.7" } @@ -19815,24 +19773,24 @@ } }, "@angular/cdk": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.0.4.tgz", - "integrity": "sha512-NX/1kEc6ndyEHjGcMtMJYEjwmoURuwRSqKJLbGcHTUwXuuR+hfDP/vU1XDOeXNC80SV+0B4BpJnREkINILfYKw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-12.1.1.tgz", + "integrity": "sha512-MJENa8qmfLAr6t59u1+mEC2YPbCn4n3vsY6k8fKyf+ILXwwGHWNZlYblaRMBjrF/crSx1Kd5vb30RCqIcNTGsA==", "requires": { "parse5": "^5.0.0", - "tslib": "^2.1.0" + "tslib": "^2.2.0" } }, "@angular/cli": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-12.1.0.tgz", - "integrity": "sha512-3xvweF9oiR1X9KlXIFPGQtylctqPi9t7SjI/8M2z/qRP4GkMu2CiScNysWFMdJsNsrRvLGQdtAbJFBWfW1vmkA==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-12.1.1.tgz", + "integrity": "sha512-rQZItn3kpYEX6tH7wquAEhJuxVpW6sYKO2tSi8Suxrm+iz1RPRnfhSwS1WIEumnwpFRtH/8P+lOrScax1ldYkg==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1201.0", - "@angular-devkit/core": "12.1.0", - "@angular-devkit/schematics": "12.1.0", - "@schematics/angular": "12.1.0", + "@angular-devkit/architect": "0.1201.1", + "@angular-devkit/core": "12.1.1", + "@angular-devkit/schematics": "12.1.1", + "@schematics/angular": "12.1.1", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.1", "debug": "4.3.1", @@ -19919,19 +19877,19 @@ "dev": true }, "@angular/material": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-12.0.4.tgz", - "integrity": "sha512-pvfYEeUCLR7EmA6R/kkXz5jfl+RHwh3AS9X9kWARWIOzA7p0hG9ApoFT5KCofTBNp0nukau1QoGR4WGla6wWvQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-12.1.1.tgz", + "integrity": "sha512-q2vhbVQfjr+88beqCotCVlaPRyy9y2O2asiR3+0BU9OJ1DjTo1QpBmMpck5InP7Es49t9RTk9RzzC0t18p45yA==", "requires": { - "tslib": "^2.1.0" + "tslib": "^2.2.0" } }, "@angular/material-moment-adapter": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-12.0.4.tgz", - "integrity": "sha512-gouOXKHxI8HQTKKxAgB9MVQMeHQWFReULFvY83C3aRJhoeiI8bDiWw0eQZP0WpHCBvAx/DlCBHBQYf+I5Q3z0w==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-12.1.1.tgz", + "integrity": "sha512-YQs4BFiQ0rCYhWzcPJ6IS6zJRM+iKAjAEo/Z89G4tR1vekA4Fl95PBs9DVoCLS2uptOPL99tnUMqeNtFjUM6wQ==", "requires": { - "tslib": "^2.1.0" + "tslib": "^2.2.0" } }, "@angular/platform-browser": { @@ -21136,9 +21094,9 @@ } }, "@ngtools/webpack": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-12.1.0.tgz", - "integrity": "sha512-b35mXdPYVuLwHNZ4r29Zt/SIOI9eFc8GbF1MzirdzM2X4k/wWD1kFIAVseDeA12jb04Jj7UnU6eZo0dDe24WFw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-12.1.1.tgz", + "integrity": "sha512-NOHTBEjUkawQSU6sHA7EJSi5Ixw+oVmlYi17HXAhGRY1czasLQMiKQPnigbSgMLBR9Jhez7TttqAUtx6Pey2FQ==", "dev": true, "requires": { "enhanced-resolve": "5.8.2" @@ -21316,13 +21274,13 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@schematics/angular": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-12.1.0.tgz", - "integrity": "sha512-BUCBiW+DQsOofSs4TE26M2OhlS0g9Mdyd0xWF4FD2Ab3xwQgkV1gogZgCl9dZtNfiimYebdM9LOeHqYWmvqCdw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-12.1.1.tgz", + "integrity": "sha512-ukSKoAWfXt28TiHlRrEzKFW63V3jroRF3xnBKtsaL3AZ4MVJiHzOWXkzDAZBaEOLUH/l6Xhm64NMgOqMEAg1rQ==", "dev": true, "requires": { - "@angular-devkit/core": "12.1.0", - "@angular-devkit/schematics": "12.1.0", + "@angular-devkit/core": "12.1.1", + "@angular-devkit/schematics": "12.1.1", "jsonc-parser": "3.0.0" } }, @@ -21396,9 +21354,9 @@ } }, "@types/estree": { - "version": "0.0.47", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", - "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==", + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", + "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", "dev": true }, "@types/file-saver": { @@ -22084,9 +22042,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -23331,9 +23289,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -23390,9 +23348,9 @@ "dev": true }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -23595,9 +23553,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -27285,9 +27243,9 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.0.tgz", - "integrity": "sha512-nPFKI7NSy6uONUo9yn2hIfb9vyYvkFu95qki0e21DQ9uaqNKDP15DGpK0KnV6wDroWxPHtExrdEwx/yDQ8nVRw==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz", + "integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==", "dev": true, "requires": { "loader-utils": "^2.0.0", @@ -27321,12 +27279,12 @@ "dev": true }, "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz", + "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==", "dev": true, "requires": { - "@types/json-schema": "^7.0.6", + "@types/json-schema": "^7.0.7", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } @@ -27569,21 +27527,6 @@ "tslib": "^2.1.0" } }, - "ngx-image-cropper": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/ngx-image-cropper/-/ngx-image-cropper-3.3.5.tgz", - "integrity": "sha512-0yRVKG5XAbVo3rOaj/iFDlekGsxEqXKU9iXFbjyvHvRT2DFs+AjwtyvINsHCWw+4ed9yA4Y+wLIUNqzA0bfxLw==", - "requires": { - "tslib": "^1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - }, "ngx-quicklink": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/ngx-quicklink/-/ngx-quicklink-0.2.7.tgz", @@ -28442,9 +28385,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28490,9 +28433,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28529,9 +28472,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28567,9 +28510,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28606,9 +28549,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28644,9 +28587,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28702,9 +28645,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28740,9 +28683,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28784,9 +28727,9 @@ "dev": true }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28839,9 +28782,9 @@ "dev": true }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28916,9 +28859,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28954,9 +28897,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -28991,9 +28934,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29028,9 +28971,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29065,9 +29008,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29102,9 +29045,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29149,9 +29092,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29197,9 +29140,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29236,9 +29179,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29273,9 +29216,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29321,9 +29264,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29358,9 +29301,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29504,9 +29447,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29636,9 +29579,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29673,9 +29616,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29711,9 +29654,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29784,9 +29727,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29828,9 +29771,9 @@ "dev": true }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29896,9 +29839,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29939,9 +29882,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -29977,9 +29920,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -30014,9 +29957,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -30052,9 +29995,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -30090,9 +30033,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -31086,9 +31029,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -32448,9 +32391,9 @@ "dev": true }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -32635,9 +32578,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -33001,9 +32944,9 @@ } }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" }, "tslint": { "version": "6.1.3", @@ -33573,13 +33516,13 @@ } }, "webpack": { - "version": "5.40.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.40.0.tgz", - "integrity": "sha512-c7f5e/WWrxXWUzQqTBg54vBs5RgcAgpvKE4F4VegVgfo4x660ZxYUF2/hpMkZUnLjgytVTitjeXaN4IPlXCGIw==", + "version": "5.41.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.41.1.tgz", + "integrity": "sha512-AJZIIsqJ/MVTmegEq9Tlw5mk5EHdGiJbDdz9qP15vmUH+oxI1FdWcL0E9EO8K/zKaRPWqEs7G/OPxq1P61u5Ug==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.47", + "@types/estree": "^0.0.48", "@webassemblyjs/ast": "1.11.0", "@webassemblyjs/wasm-edit": "1.11.0", "@webassemblyjs/wasm-parser": "1.11.0", diff --git a/console/package.json b/console/package.json index 1707f0056e..cbca0835c3 100644 --- a/console/package.json +++ b/console/package.json @@ -11,16 +11,16 @@ "private": true, "dependencies": { "@angular/animations": "~12.0.3", - "@angular/cdk": "~12.0.0", + "@angular/cdk": "~12.1.1", "@angular/common": "~12.0.5", "@angular/compiler": "~12.0.0", "@angular/core": "~12.0.0", "@angular/forms": "~12.0.5", - "@angular/material": "^12.0.3", - "@angular/material-moment-adapter": "^12.0.3", + "@angular/material": "^12.1.1", + "@angular/material-moment-adapter": "^12.1.1", "@angular/platform-browser": "~12.0.0", - "@angular/router": "~12.0.5", "@angular/platform-browser-dynamic": "~12.0.5", + "@angular/router": "~12.0.5", "@angular/service-worker": "~12.0.5", "@grpc/grpc-js": "^1.3.2", "@ngx-translate/core": "^13.0.0", @@ -37,7 +37,6 @@ "grpc-web": "^1.2.1", "libphonenumber-js": "^1.9.16", "moment": "^2.29.1", - "ngx-image-cropper": "^3.3.5", "ngx-color": "^7.2.0", "ngx-quicklink": "^0.2.6", "rxjs": "~6.6.7", @@ -47,8 +46,8 @@ "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~12.1.0", - "@angular/cli": "~12.1.0", + "@angular-devkit/build-angular": "~12.1.1", + "@angular/cli": "~12.1.1", "@angular/compiler-cli": "~12.0.5", "@angular/language-service": "~12.1.0", "@types/jasmine": "~3.7.7", @@ -71,4 +70,4 @@ "tslint": "~6.1.3", "typescript": "^4.2.4" } -} +} \ No newline at end of file diff --git a/console/src/app/animations.ts b/console/src/app/animations.ts index dc9fcfcf12..993db9591a 100644 --- a/console/src/app/animations.ts +++ b/console/src/app/animations.ts @@ -1,204 +1,205 @@ import { - animate, - animateChild, - AnimationTriggerMetadata, - group, - query, - stagger, - style, - transition, - trigger, + animate, + animateChild, + AnimationTriggerMetadata, + group, + query, + stagger, + style, + transition, + trigger, } from '@angular/animations'; + export const toolbarAnimation: AnimationTriggerMetadata = - trigger('toolbar', [ - transition(':enter', [ - style({ - transform: 'translateY(-100%)', - opacity: 0, - }), - animate( - '.2s ease-out', - style({ - transform: 'translateY(0%)', - opacity: 1, - }), - ), - ]), - ]); + trigger('toolbar', [ + transition(':enter', [ + style({ + transform: 'translateY(-100%)', + opacity: 0, + }), + animate( + '.2s ease-out', + style({ + transform: 'translateY(0%)', + opacity: 1, + }), + ), + ]), + ]); export const adminLineAnimation: AnimationTriggerMetadata = - trigger('adminline', [ - transition(':enter', [ - style({ - transform: 'translateY(100%)', - opacity: 0.5, - }), - animate( - '.2s ease-out', - style({ - transform: 'translateY(0%)', - opacity: 1, - }), - ), - ]), - ]); + trigger('adminline', [ + transition(':enter', [ + style({ + transform: 'translateY(100%)', + opacity: 0.5, + }), + animate( + '.2s ease-out', + style({ + transform: 'translateY(0%)', + opacity: 1, + }), + ), + ]), + ]); export const accountCard: AnimationTriggerMetadata = trigger('accounts', [ - transition(':enter', [ - style({ - transform: 'scale(.9) translateY(-10%)', - height: '200px', - opacity: 0, - }), - animate( - '.1s ease-out', - style({ - transform: 'scale(1) translateY(0%)', - height: '*', - opacity: 1, - }), - ), - ]), + transition(':enter', [ + style({ + transform: 'scale(.9) translateY(-10%)', + height: '200px', + opacity: 0, + }), + animate( + '.1s ease-out', + style({ + transform: 'scale(1) translateY(0%)', + height: '*', + opacity: 1, + }), + ), + ]), ]); export const navAnimations: Array = [ - trigger('navAnimation', [ - transition('* => *', [ - query('@navitem', stagger('50ms', animateChild()), { optional: true }), - ]), + trigger('navAnimation', [ + transition('* => *', [ + query('@navitem', stagger('50ms', animateChild()), { optional: true }), ]), - trigger('navitem', [ - transition(':enter', [ - style({ - opacity: 0, - }), - animate( - '.0s', - style({ - opacity: 1, - }), - ), - ]), - transition(':leave', [ - style({ - opacity: 1, - }), - animate( - '.0s', - style({ - opacity: 0, - }), - ), - ]), + ]), + trigger('navitem', [ + transition(':enter', [ + style({ + opacity: 0, + }), + animate( + '.0s', + style({ + opacity: 1, + }), + ), ]), + transition(':leave', [ + style({ + opacity: 1, + }), + animate( + '.0s', + style({ + opacity: 0, + }), + ), + ]), + ]), ]; export const enterAnimations: Array = [ - trigger('appearfade', [ - transition(':enter', [ - style({ - transform: 'scale(.9) translateY(-10%)', - opacity: 0, - }), - animate( - '100ms ease-in-out', - style({ - transform: 'scale(1) translateY(0%)', - opacity: 1, - }), - ), - ]), - transition(':leave', [ - style({ - transform: 'scale(1) translateY(0%)', - opacity: 1, - }), - animate( - '100ms ease-in-out', - style({ - transform: 'scale(.9) translateY(-10%)', - opacity: 0, - }), - ), - ]), + trigger('appearfade', [ + transition(':enter', [ + style({ + transform: 'scale(.9) translateY(-10%)', + opacity: 0, + }), + animate( + '100ms ease-in-out', + style({ + transform: 'scale(1) translateY(0%)', + opacity: 1, + }), + ), ]), + transition(':leave', [ + style({ + transform: 'scale(1) translateY(0%)', + opacity: 1, + }), + animate( + '100ms ease-in-out', + style({ + transform: 'scale(.9) translateY(-10%)', + opacity: 0, + }), + ), + ]), + ]), ]; export const routeAnimations: AnimationTriggerMetadata = trigger('routeAnimations', [ - transition('HomePage => AddPage', [ - style({ transform: 'translateX(100%)', opacity: 0.5 }), - animate('250ms ease-out', style({ transform: 'translateX(0%)', opacity: 1 })), + transition('HomePage => AddPage', [ + style({ transform: 'translateX(100%)', opacity: 0.5 }), + animate('250ms ease-out', style({ transform: 'translateX(0%)', opacity: 1 })), + ]), + transition('AddPage => HomePage', + [animate('250ms', style({ transform: 'translateX(100%)', opacity: 0.5 }))], + ), + transition('HomePage => DetailPage', [ + query(':enter, :leave', style({ position: 'absolute', left: 0, right: 0 }), { + optional: true, + }), + group([ + query( + ':enter', + [ + style({ + transform: 'translateX(20%)', + opacity: 0.5, + }), + animate( + '.35s ease-in', + style({ + transform: 'translateX(0%)', + opacity: 1, + }), + ), + ], + { + optional: true, + }, + ), + query( + ':leave', + [style({ opacity: 1, width: '100%' }), animate('.35s ease-out', style({ opacity: 0 }))], + { + optional: true, + }, + ), ]), - transition('AddPage => HomePage', - [animate('250ms', style({ transform: 'translateX(100%)', opacity: 0.5 }))], - ), - transition('HomePage => DetailPage', [ - query(':enter, :leave', style({ position: 'absolute', left: 0, right: 0 }), { - optional: true, - }), - group([ - query( - ':enter', - [ - style({ - transform: 'translateX(20%)', - opacity: 0.5, - }), - animate( - '.35s ease-in', - style({ - transform: 'translateX(0%)', - opacity: 1, - }), - ), - ], - { - optional: true, - }, - ), - query( - ':leave', - [style({ opacity: 1, width: '100%' }), animate('.35s ease-out', style({ opacity: 0 }))], - { - optional: true, - }, - ), - ]), - ]), - transition('DetailPage => HomePage', [ - query(':enter, :leave', style({ position: 'absolute', left: 0, right: 0 }), { - optional: true, - }), - group([ - query( - ':enter', - [ - style({ - opacity: 0, - }), - animate( - '.35s ease-out', - style({ - opacity: 1, - }), - ), - ], - { - optional: true, - }, - ), - query( - ':leave', - [ - style({ width: '100%', transform: 'translateX(0%)' }), - animate('.35s ease-in', style({ transform: 'translateX(30%)', opacity: 0 })), - ], - { - optional: true, - }, - ), - ]), + ]), + transition('DetailPage => HomePage', [ + query(':enter, :leave', style({ position: 'absolute', left: 0, right: 0 }), { + optional: true, + }), + group([ + query( + ':enter', + [ + style({ + opacity: 0, + }), + animate( + '.35s ease-out', + style({ + opacity: 1, + }), + ), + ], + { + optional: true, + }, + ), + query( + ':leave', + [ + style({ width: '100%', transform: 'translateX(0%)' }), + animate('.35s ease-in', style({ transform: 'translateX(30%)', opacity: 0 })), + ], + { + optional: true, + }, + ), ]), + ]), ]); diff --git a/console/src/app/modules/edit-text/edit-text.component.html b/console/src/app/modules/edit-text/edit-text.component.html new file mode 100644 index 0000000000..c468ee9137 --- /dev/null +++ b/console/src/app/modules/edit-text/edit-text.component.html @@ -0,0 +1,31 @@ +
+ + +
+ +
+
+ + {{key.key}} + +
+ +
+ {{chip.key | translate}} + {{chip.value}} + + +
+
+
+
+
+ + +
+
+
+ {{'ACTIONS.RESETTO'| translate }} '{{warnText[key.key]}}' +
+
+
diff --git a/console/src/app/modules/edit-text/edit-text.component.scss b/console/src/app/modules/edit-text/edit-text.component.scss new file mode 100644 index 0000000000..09f5f5cb0d --- /dev/null +++ b/console/src/app/modules/edit-text/edit-text.component.scss @@ -0,0 +1,96 @@ +.block { + display: block; + + .flex { + display: flex; + + .formfield { + flex: 1; + + .text { + min-height: 80px; + } + + &.hovering { + background-color: red; + } + + .chips { + display: flex; + flex-wrap: wrap; + opacity: 0; + margin: 0 -.25rem; + transition: all .2s ease; + + .chip { + border-radius: 50vw; + padding: 4px .5rem; + font-size: 12px; + background: #5282c1; + color: white; + margin: .25rem; + display: flex; + align-items: center; + justify-content: center; + z-index: 10; + + * { + transition: all .2s ease; + } + + i { + opacity: .5; + font-size: 1.1rem; + margin-left: .5rem; + } + + .key { + display: inline-block; + } + + .value { + display: none; + } + + &:hover { + i { + opacity: 1; + } + + .key { + display: none; + } + + .value { + display: inline-block; + } + } + } + } + + &.cnsl-focused { + .chips { + opacity: 1; + cursor: copy; + } + } + + .chips:hover { + visibility: visible; + } + } + + .actions { + display: flex; + flex-direction: column; + align-self: flex-start; + margin-top: 30px; + } + } +} + +.info { + display: block; + margin-right: 40px; + margin-bottom: 1.5rem; +} diff --git a/console/src/app/modules/edit-text/edit-text.component.spec.ts b/console/src/app/modules/edit-text/edit-text.component.spec.ts new file mode 100644 index 0000000000..0f02df53fc --- /dev/null +++ b/console/src/app/modules/edit-text/edit-text.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditTextComponent } from './edit-text.component'; + +describe('EditTextComponent', () => { + let component: EditTextComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [EditTextComponent], + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(EditTextComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/modules/edit-text/edit-text.component.ts b/console/src/app/modules/edit-text/edit-text.component.ts new file mode 100644 index 0000000000..32f76d307b --- /dev/null +++ b/console/src/app/modules/edit-text/edit-text.component.ts @@ -0,0 +1,54 @@ +import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; +import { FormControl, FormGroup } from '@angular/forms'; +import { Observable, Subject } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; + +@Component({ + selector: 'cnsl-edit-text', + templateUrl: './edit-text.component.html', + styleUrls: ['./edit-text.component.scss'], +}) +export class EditTextComponent implements OnInit, OnDestroy { + @Input() label: string = ''; + @Input() current$!: Observable<{ [key: string]: any | string; }>; + @Input() default$!: Observable<{ [key: string]: any | string; }>; + @Input() currentlyDragged: string = ''; + @Output() changedValues: EventEmitter<{ [key: string]: string; }> = new EventEmitter(); + public currentMap: { [key: string]: string; } = {}; + private destroy$: Subject = new Subject(); + public form!: FormGroup; + public warnText: { [key: string]: string | undefined; } = {}; + + @Input() public chips: any[] = []; + @Input() public disabled: boolean = true; + + public copied: string = ''; + + public ngOnInit(): void { + this.current$.pipe(takeUntil(this.destroy$)).subscribe(value => { + this.currentMap = value; + this.form = new FormGroup({}); + Object.keys(value).map(key => { + const control = new FormControl({ value: value[key], disabled: this.disabled }); + this.form.addControl(key, control); + }); + + this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(values => this.changedValues.emit(values)); + }); + + } + + public ngOnDestroy(): void { + this.destroy$.next(); + this.destroy$.complete(); + } + + public setWarnText(key: string, text: string | undefined): void { + this.warnText[key] = text; + } + + public addChip(key: string, value: string): void { + const c = this.form.get(key)?.value; + this.form.get(key)?.setValue(`${c} ${value}`); + } +} diff --git a/console/src/app/modules/edit-text/edit-text.module.ts b/console/src/app/modules/edit-text/edit-text.module.ts new file mode 100644 index 0000000000..1e71703e91 --- /dev/null +++ b/console/src/app/modules/edit-text/edit-text.module.ts @@ -0,0 +1,39 @@ +import { TextFieldModule } from '@angular/cdk/text-field'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TranslateModule } from '@ngx-translate/core'; +import { CopyToClipboardModule } from 'src/app/directives/copy-to-clipboard/copy-to-clipboard.module'; +import { InputModule } from 'src/app/modules/input/input.module'; + +import { FormFieldModule } from '../form-field/form-field.module'; +import { InfoSectionModule } from '../info-section/info-section.module'; +import { EditTextComponent } from './edit-text.component'; + +@NgModule({ + declarations: [ + EditTextComponent, + ], + imports: [ + CommonModule, + InfoSectionModule, + ReactiveFormsModule, + FormsModule, + InputModule, + FormFieldModule, + MatButtonModule, + MatIconModule, + MatTooltipModule, + TranslateModule, + MatTooltipModule, + TextFieldModule, + CopyToClipboardModule, + ], + exports: [ + EditTextComponent, + ], +}) +export class EditTextModule { } diff --git a/console/src/app/modules/features/features.component.html b/console/src/app/modules/features/features.component.html index 2c938e25eb..3e51846d22 100644 --- a/console/src/app/modules/features/features.component.html +++ b/console/src/app/modules/features/features.component.html @@ -52,21 +52,26 @@

{{'POLICY.DEFAULTLABEL' | translate}}

- {{'FEATURES.DATA.AUDITLOGRETENTION' | translate}} - - {{features.auditLogRetention | timestampToRetention }} {{'FEATURES.RETENTIONDAYS' | - translate}} + {{'FEATURES.DATA.AUDITLOGRETENTION' | translate}} + + {{features.auditLogRetention | timestampToRetention }} {{'FEATURES.RETENTIONDAYS' | + translate}}
+ +
+
- {{'FEATURES.DATA.LOGINPOLICYUSERNAMELOGIN' | translate}} - - - + + {{'FEATURES.DATA.LOGINPOLICYUSERNAMELOGIN' | translate}} + + +
+ {{'FEATURES.DATA.LOGINPOLICYPASSWORDRESET' | translate}}
- {{'FEATURES.DATA.LOGINPOLICYREGISTRATION' | translate}} - - - + + {{'FEATURES.DATA.LOGINPOLICYREGISTRATION' | translate}} + + +
- {{'FEATURES.DATA.LOGINPOLICYIDP' | translate}} - - - + + {{'FEATURES.DATA.LOGINPOLICYIDP' | translate}} + + +
- {{'FEATURES.DATA.LOGINPOLICYFACTORS' | translate}} - - - + + {{'FEATURES.DATA.LOGINPOLICYFACTORS' | translate}} + + +
- {{'FEATURES.DATA.LOGINPOLICYPASSWORDLESS' | translate}} - - - + + {{'FEATURES.DATA.LOGINPOLICYPASSWORDLESS' | translate}} + + + +
+ +
+ +
+ + + {{'FEATURES.DATA.LOGINPOLICYCOMPLEXITYPOLICY' | translate}} + + + +
+ +
+ +
+ + {{'FEATURES.DATA.LABELPOLICYPRIVATELABEL' | translate}} + + +
- {{'FEATURES.DATA.LOGINPOLICYCOMPLEXITYPOLICY' | translate}} - - - + + {{'FEATURES.DATA.LABELPOLICYWATERMARK' | translate}} + + +
-
- {{'FEATURES.DATA.LABELPOLICYPRIVATELABEL' | translate}} - - - -
- -
- {{'FEATURES.DATA.LABELPOLICYWATERMARK' | translate}} - - - -
+
+ {{'FEATURES.DATA.CUSTOMDOMAIN' | translate}}
+ + {{'FEATURES.DATA.PRIVACYPOLICY' | translate}} + + + +
+ +
+ {{'FEATURES.DATA.CUSTOMTEXT' | translate}} { this.toast.showInfo('POLICY.TOAST.SET', true); diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.html b/console/src/app/modules/policies/login-policy/login-policy.component.html index 8a1528ca2d..4dbba13ade 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.html +++ b/console/src/app/modules/policies/login-policy/login-policy.component.html @@ -219,6 +219,5 @@ - - + diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.scss b/console/src/app/modules/policies/login-policy/login-policy.component.scss index 0f545a8b8f..258f4ccb09 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.scss +++ b/console/src/app/modules/policies/login-policy/login-policy.component.scss @@ -137,3 +137,8 @@ background-color: rgba(var(--grey), .5); margin: 1rem 0; } + +.grid { + display: block; + margin-top: 100px; +} diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.ts b/console/src/app/modules/policies/login-policy/login-policy.component.ts index b34ddfcb0b..b054af484c 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.ts +++ b/console/src/app/modules/policies/login-policy/login-policy.component.ts @@ -19,15 +19,7 @@ import { AdminService } from 'src/app/services/admin.service'; import { ManagementService } from 'src/app/services/mgmt.service'; import { ToastService } from 'src/app/services/toast.service'; -import { CnslLinks } from '../../links/links.component'; -import { - IAM_COMPLEXITY_LINK, - IAM_POLICY_LINK, - IAM_PRIVATELABEL_LINK, - ORG_COMPLEXITY_LINK, - ORG_IAM_POLICY_LINK, - ORG_PRIVATELABEL_LINK, -} from '../../policy-grid/policy-links'; +import { GridPolicy, LOGIN_POLICY } from '../../policy-grid/policies'; import { PolicyComponentServiceType } from '../policy-component-types.enum'; import { AddIdpDialogComponent } from './add-idp-dialog/add-idp-dialog.component'; @@ -51,7 +43,7 @@ export class LoginPolicyComponent implements OnDestroy { public disabled: boolean = true; public IDPStylingType: any = IDPStylingType; - public nextLinks: CnslLinks[] = []; + public currentPolicy: GridPolicy = LOGIN_POLICY; constructor( private route: ActivatedRoute, private toast: ToastService, @@ -67,11 +59,6 @@ export class LoginPolicyComponent implements OnDestroy { PasswordlessType.PASSWORDLESS_TYPE_ALLOWED, PasswordlessType.PASSWORDLESS_TYPE_NOT_ALLOWED, ]; - this.nextLinks = [ - ORG_COMPLEXITY_LINK, - ORG_IAM_POLICY_LINK, - ORG_PRIVATELABEL_LINK, - ]; break; case PolicyComponentServiceType.ADMIN: this.service = this.injector.get(AdminService as Type); @@ -79,11 +66,6 @@ export class LoginPolicyComponent implements OnDestroy { PasswordlessType.PASSWORDLESS_TYPE_ALLOWED, PasswordlessType.PASSWORDLESS_TYPE_NOT_ALLOWED, ]; - this.nextLinks = [ - IAM_COMPLEXITY_LINK, - IAM_POLICY_LINK, - IAM_PRIVATELABEL_LINK, - ]; break; } diff --git a/console/src/app/modules/policies/login-policy/login-policy.module.ts b/console/src/app/modules/policies/login-policy/login-policy.module.ts index 1630ba7acc..206820d454 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.module.ts +++ b/console/src/app/modules/policies/login-policy/login-policy.module.ts @@ -19,36 +19,36 @@ import { HasFeaturePipeModule } from 'src/app/pipes/has-feature-pipe/has-feature import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module'; import { InfoSectionModule } from '../../info-section/info-section.module'; -import { LinksModule } from '../../links/links.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; import { AddIdpDialogModule } from './add-idp-dialog/add-idp-dialog.module'; import { LoginPolicyRoutingModule } from './login-policy-routing.module'; import { LoginPolicyComponent } from './login-policy.component'; @NgModule({ - declarations: [LoginPolicyComponent], - imports: [ - LoginPolicyRoutingModule, - CommonModule, - InfoSectionModule, - FormsModule, - CardModule, - InputModule, - MatButtonModule, - HasFeaturePipeModule, - MatSlideToggleModule, - MatIconModule, - HasRoleModule, - HasRolePipeModule, - MatTooltipModule, - TranslateModule, - DetailLayoutModule, - AddIdpDialogModule, - IdpTableModule, - MfaTableModule, - MatProgressSpinnerModule, - MatSelectModule, - MatRippleModule, - LinksModule, - ], + declarations: [LoginPolicyComponent], + imports: [ + LoginPolicyRoutingModule, + CommonModule, + InfoSectionModule, + FormsModule, + CardModule, + InputModule, + MatButtonModule, + HasFeaturePipeModule, + MatSlideToggleModule, + MatIconModule, + HasRoleModule, + HasRolePipeModule, + MatTooltipModule, + TranslateModule, + DetailLayoutModule, + AddIdpDialogModule, + IdpTableModule, + MfaTableModule, + MatProgressSpinnerModule, + MatSelectModule, + MatRippleModule, + PolicyGridModule, + ], }) export class LoginPolicyModule { } diff --git a/console/src/app/modules/policies/login-texts/helper.ts b/console/src/app/modules/policies/login-texts/helper.ts new file mode 100644 index 0000000000..06f6fa7359 --- /dev/null +++ b/console/src/app/modules/policies/login-texts/helper.ts @@ -0,0 +1,317 @@ +import { SetCustomLoginTextsRequest as AdminSetCustomLoginTextsRequest } from 'src/app/proto/generated/zitadel/admin_pb'; +import { SetCustomLoginTextsRequest } from 'src/app/proto/generated/zitadel/management_pb'; +import { + EmailVerificationDoneScreenText, + EmailVerificationScreenText, + ExternalUserNotFoundScreenText, + FooterText, + InitializeUserDoneScreenText, + InitializeUserScreenText, + InitMFADoneScreenText, + InitMFAOTPScreenText, + InitMFAPromptScreenText, + InitMFAU2FScreenText, + InitPasswordDoneScreenText, + InitPasswordScreenText, + LinkingUserDoneScreenText, + LoginScreenText, + LogoutDoneScreenText, + MFAProvidersText, + PasswordChangeDoneScreenText, + PasswordChangeScreenText, + PasswordlessScreenText, + PasswordResetDoneScreenText, + PasswordScreenText, + RegistrationOptionScreenText, + RegistrationOrgScreenText, + RegistrationUserScreenText, + SelectAccountScreenText, + SuccessLoginScreenText, + UsernameChangeDoneScreenText, + UsernameChangeScreenText, + VerifyMFAOTPScreenText, + VerifyMFAU2FScreenText, +} from 'src/app/proto/generated/zitadel/text_pb'; + +type Req = AdminSetCustomLoginTextsRequest | SetCustomLoginTextsRequest; +type Map = AdminSetCustomLoginTextsRequest.AsObject | SetCustomLoginTextsRequest.AsObject; + +export function mapRequestValues(map: Partial, req: Req): Req { + const r0 = new EmailVerificationDoneScreenText(); + r0.setCancelButtonText(map.emailVerificationDoneText?.cancelButtonText ?? ''); + r0.setDescription(map.emailVerificationDoneText?.description ?? ''); + r0.setLoginButtonText(map.emailVerificationDoneText?.loginButtonText ?? ''); + r0.setNextButtonText(map.emailVerificationDoneText?.nextButtonText ?? ''); + r0.setTitle(map.emailVerificationDoneText?.title ?? ''); + req.setEmailVerificationDoneText(r0); + + const r1 = new EmailVerificationScreenText(); + r1.setCodeLabel(map.emailVerificationText?.codeLabel ?? ''); + r1.setDescription(map.emailVerificationText?.description ?? ''); + r1.setNextButtonText(map.emailVerificationText?.nextButtonText ?? ''); + r1.setResendButtonText(map.emailVerificationText?.resendButtonText ?? ''); + r1.setTitle(map.emailVerificationText?.title ?? ''); + req.setEmailVerificationText(r1); + + const r2 = new ExternalUserNotFoundScreenText(); + r2.setAutoRegisterButtonText(map.externalUserNotFoundText?.autoRegisterButtonText ?? ''); + r2.setDescription(map.externalUserNotFoundText?.description ?? ''); + r2.setLinkButtonText(map.externalUserNotFoundText?.linkButtonText ?? ''); + r2.setTitle(map.externalUserNotFoundText?.title ?? ''); + req.setExternalUserNotFoundText(r2); + + const r3 = new FooterText(); + r3.setHelp(map.footerText?.help ?? ''); + r3.setHelpLink(map.footerText?.helpLink ?? ''); + r3.setPrivacyPolicy(map.footerText?.privacyPolicy ?? ''); + r3.setTos(map.footerText?.tos ?? ''); + req.setFooterText(r3); + + const r4 = new InitMFADoneScreenText(); + r4.setCancelButtonText(map.initMfaDoneText?.cancelButtonText ?? ''); + r4.setDescription(map.initMfaDoneText?.description ?? ''); + r4.setNextButtonText(map.initMfaDoneText?.nextButtonText ?? ''); + r4.setTitle(map.initMfaDoneText?.title ?? ''); + req.setInitMfaDoneText(r4); + + const r5 = new InitMFAOTPScreenText(); + r5.setCancelButtonText(map.initMfaOtpText?.cancelButtonText ?? ''); + r5.setCodeLabel(map.initMfaOtpText?.codeLabel ?? ''); + r5.setDescription(map.initMfaOtpText?.description ?? ''); + r5.setDescriptionOtp(map.initMfaOtpText?.descriptionOtp ?? ''); + r5.setNextButtonText(map.initMfaOtpText?.nextButtonText ?? ''); + r5.setSecretLabel(map.initMfaOtpText?.secretLabel ?? ''); + r5.setTitle(map.initMfaOtpText?.title ?? ''); + req.setInitMfaOtpText(r5); + + const r6 = new InitMFAPromptScreenText(); + r6.setDescription(map.initMfaPromptText?.description ?? ''); + r6.setNextButtonText(map.initMfaPromptText?.nextButtonText ?? ''); + r6.setOtpOption(map.initMfaPromptText?.otpOption ?? ''); + r6.setSkipButtonText(map.initMfaPromptText?.skipButtonText ?? ''); + r6.setTitle(map.initMfaPromptText?.title ?? ''); + r6.setU2fOption(map.initMfaPromptText?.otpOption ?? ''); + req.setInitMfaPromptText(r6); + + + const r7 = new InitMFAU2FScreenText(); + r7.setDescription(map.initMfaU2fText?.description ?? ''); + r7.setErrorRetry(map.initMfaU2fText?.errorRetry ?? ''); + r7.setNotSupported(map.initMfaU2fText?.notSupported ?? ''); + r7.setRegisterTokenButtonText(map.initMfaU2fText?.registerTokenButtonText ?? ''); + r7.setTitle(map.initMfaU2fText?.title ?? ''); + r7.setTokenNameLabel(map.initMfaU2fText?.tokenNameLabel ?? ''); + req.setInitMfaU2fText(r7); + + + const r8 = new InitPasswordDoneScreenText(); + r8.setCancelButtonText(map.initPasswordDoneText?.cancelButtonText ?? ''); + r8.setDescription(map.initPasswordDoneText?.description ?? ''); + r8.setNextButtonText(map.initPasswordDoneText?.nextButtonText ?? ''); + r8.setTitle(map.initPasswordDoneText?.title ?? ''); + req.setInitPasswordDoneText(r8); + + const r9 = new InitPasswordScreenText(); + r9.setCodeLabel(map.initPasswordText?.description ?? ''); + r9.setDescription(map.initPasswordText?.description ?? ''); + r9.setNewPasswordConfirmLabel(map.initPasswordText?.newPasswordConfirmLabel ?? ''); + r9.setNewPasswordLabel(map.initPasswordText?.newPasswordLabel ?? ''); + r9.setNextButtonText(map.initPasswordText?.nextButtonText ?? ''); + r9.setResendButtonText(map.initPasswordText?.resendButtonText ?? ''); + r9.setTitle(map.initPasswordText?.title ?? ''); + req.setInitPasswordText(r9); + + const r10 = new InitializeUserDoneScreenText(); + r10.setCancelButtonText(map.initializeDoneText?.cancelButtonText ?? ''); + r10.setDescription(map.initializeDoneText?.description ?? ''); + r10.setNextButtonText(map.initializeDoneText?.nextButtonText ?? ''); + r10.setTitle(map.initializeDoneText?.title ?? ''); + req.setInitializeDoneText(r10); + + const r11 = new InitializeUserScreenText(); + r11.setCodeLabel(map.initializeUserText?.codeLabel ?? ''); + r11.setDescription(map.initializeUserText?.description ?? ''); + r11.setNewPasswordConfirmLabel(map.initializeUserText?.newPasswordConfirmLabel ?? ''); + r11.setNewPasswordLabel(map.initializeUserText?.newPasswordLabel ?? ''); + r11.setNextButtonText(map.initializeUserText?.nextButtonText ?? ''); + r11.setResendButtonText(map.initializeUserText?.resendButtonText ?? ''); + r11.setTitle(map.initializeUserText?.title ?? ''); + + req.setInitializeUserText(r11); + + const r12 = new LinkingUserDoneScreenText(); + r12.setCancelButtonText(map.linkingUserDoneText?.cancelButtonText ?? ''); + r12.setDescription(map.linkingUserDoneText?.description ?? ''); + r12.setNextButtonText(map.linkingUserDoneText?.nextButtonText ?? ''); + r12.setTitle(map.linkingUserDoneText?.title ?? ''); + req.setLinkingUserDoneText(r12); + + const r13 = new LoginScreenText(); + r13.setDescription(map.loginText?.description ?? ''); + r13.setDescriptionLinkingProcess(map.loginText?.descriptionLinkingProcess ?? ''); + r13.setExternalUserDescription(map.loginText?.externalUserDescription ?? ''); + r13.setLoginNameLabel(map.loginText?.loginNameLabel ?? ''); + r13.setLoginNamePlaceholder(map.loginText?.loginNamePlaceholder ?? ''); + r13.setNextButtonText(map.loginText?.nextButtonText ?? ''); + r13.setRegisterButtonText(map.loginText?.registerButtonText ?? ''); + r13.setTitle(map.loginText?.title ?? ''); + r13.setTitleLinkingProcess(map.loginText?.titleLinkingProcess ?? ''); + r13.setUserMustBeMemberOfOrg(map.loginText?.userMustBeMemberOfOrg ?? ''); + r13.setUserNamePlaceholder(map.loginText?.userNamePlaceholder ?? ''); + req.setLoginText(r13); + + const r14 = new LogoutDoneScreenText(); + r14.setDescription(map.logoutText?.description ?? ''); + r14.setLoginButtonText(map.logoutText?.loginButtonText ?? ''); + r14.setTitle(map.logoutText?.title ?? ''); + req.setLogoutText(r14); + + const r15 = new MFAProvidersText(); + r15.setChooseOther(map.mfaProvidersText?.chooseOther ?? ''); + r15.setOtp(map.mfaProvidersText?.otp ?? ''); + r15.setU2f(map.mfaProvidersText?.u2f ?? ''); + req.setMfaProvidersText(r15); + + const r16 = new PasswordChangeDoneScreenText(); + r16.setDescription(map.passwordChangeDoneText?.description ?? ''); + r16.setNextButtonText(map.passwordChangeDoneText?.nextButtonText ?? ''); + r16.setTitle(map.passwordChangeDoneText?.title ?? ''); + req.setPasswordChangeDoneText(r16); + + const r17 = new PasswordChangeScreenText(); + r17.setDescription(map.passwordChangeText?.description ?? ''); + r17.setNextButtonText(map.passwordChangeText?.nextButtonText ?? ''); + r17.setTitle(map.passwordChangeText?.title ?? ''); + r17.setNewPasswordLabel(map.passwordChangeText?.newPasswordLabel ?? ''); + r17.setNewPasswordConfirmLabel(map.passwordChangeText?.newPasswordConfirmLabel ?? ''); + r17.setCancelButtonText(map.passwordChangeText?.cancelButtonText ?? ''); + r17.setOldPasswordLabel(map.passwordChangeText?.oldPasswordLabel ?? ''); + req.setPasswordChangeText(r17); + + const r18 = new PasswordResetDoneScreenText(); + r18.setDescription(map.passwordResetDoneText?.description ?? ''); + r18.setNextButtonText(map.passwordResetDoneText?.nextButtonText ?? ''); + r18.setTitle(map.passwordResetDoneText?.title ?? ''); + req.setPasswordResetDoneText(r18); + + const r19 = new PasswordScreenText(); + r19.setBackButtonText(map.passwordText?.backButtonText ?? ''); + r19.setConfirmation(map.passwordText?.confirmation ?? ''); + r19.setDescription(map.passwordText?.description ?? ''); + r19.setHasLowercase(map.passwordText?.hasLowercase ?? ''); + r19.setHasNumber(map.passwordText?.hasNumber ?? ''); + r19.setHasSymbol(map.passwordText?.hasSymbol ?? ''); + r19.setHasUppercase(map.passwordText?.hasUppercase ?? ''); + r19.setMinLength(map.passwordText?.minLength ?? ''); + r19.setNextButtonText(map.passwordText?.nextButtonText ?? ''); + r19.setPasswordLabel(map.passwordText?.passwordLabel ?? ''); + r19.setResetLinkText(map.passwordText?.resetLinkText ?? ''); + r19.setTitle(map.passwordText?.title ?? ''); + req.setPasswordText(r19); + + const r20 = new PasswordlessScreenText(); + r20.setDescription(map.passwordlessText?.description ?? ''); + r20.setErrorRetry(map.passwordlessText?.errorRetry ?? ''); + r20.setLoginWithPwButtonText(map.passwordlessText?.loginWithPwButtonText ?? ''); + r20.setNotSupported(map.passwordlessText?.notSupported ?? ''); + r20.setTitle(map.passwordlessText?.title ?? ''); + r20.setValidateTokenButtonText(map.passwordlessText?.validateTokenButtonText ?? ''); + req.setPasswordlessText(r20); + + const r21 = new RegistrationOptionScreenText(); + r21.setDescription(map.registrationOptionText?.description ?? ''); + r21.setExternalLoginDescription(map.registrationOptionText?.externalLoginDescription ?? ''); + r21.setTitle(map.registrationOptionText?.title ?? ''); + r21.setUserNameButtonText(map.registrationOptionText?.userNameButtonText ?? ''); + req.setRegistrationOptionText(r21); + + const r22 = new RegistrationOrgScreenText(); + r22.setDescription(map.registrationOrgText?.description ?? ''); + r22.setEmailLabel(map.registrationOrgText?.emailLabel ?? ''); + r22.setFirstnameLabel(map.registrationOrgText?.firstnameLabel ?? ''); + r22.setLastnameLabel(map.registrationOrgText?.lastnameLabel ?? ''); + r22.setOrgnameLabel(map.registrationOrgText?.orgnameLabel ?? ''); + r22.setPasswordConfirmLabel(map.registrationOrgText?.passwordConfirmLabel ?? ''); + r22.setPasswordLabel(map.registrationOrgText?.passwordLabel ?? ''); + r22.setTosConfirmAnd(map.registrationOrgText?.tosConfirm ?? ''); + r22.setPrivacyLinkText(map.registrationOrgText?.privacyLinkText ?? ''); + r22.setSaveButtonText(map.registrationOrgText?.saveButtonText ?? ''); + r22.setTitle(map.registrationOrgText?.title ?? ''); + r22.setTosAndPrivacyLabel(map.registrationOrgText?.tosAndPrivacyLabel ?? ''); + r22.setTosConfirm(map.registrationOrgText?.tosConfirm ?? ''); + r22.setTosConfirmAnd(map.registrationOrgText?.tosConfirmAnd ?? ''); + r22.setTosLinkText(map.registrationOrgText?.tosLinkText ?? ''); + r22.setUsernameLabel(map.registrationOrgText?.usernameLabel ?? ''); + req.setRegistrationOrgText(r22); + + const r23 = new RegistrationUserScreenText(); + r23.setBackButtonText(map.registrationUserText?.backButtonText ?? ''); + r23.setDescription(map.registrationUserText?.description ?? ''); + r23.setDescriptionOrgRegister(map.registrationUserText?.descriptionOrgRegister ?? ''); + r23.setEmailLabel(map.registrationUserText?.emailLabel ?? ''); + r23.setFirstnameLabel(map.registrationUserText?.firstnameLabel ?? ''); + r23.setGenderLabel(map.registrationUserText?.genderLabel ?? ''); + r23.setLanguageLabel(map.registrationUserText?.languageLabel ?? ''); + r23.setLastnameLabel(map.registrationUserText?.lastnameLabel ?? ''); + r23.setNextButtonText(map.registrationUserText?.nextButtonText ?? ''); + r23.setPasswordConfirmLabel(map.registrationUserText?.passwordConfirmLabel ?? ''); + r23.setPasswordLabel(map.registrationUserText?.passwordLabel ?? ''); + r23.setTosConfirm(map.registrationUserText?.tosConfirm ?? ''); + r23.setTosConfirmAnd(map.registrationUserText?.tosConfirmAnd ?? ''); + r23.setTosLinkText(map.registrationUserText?.tosLinkText ?? ''); + r23.setPrivacyLinkText(map.registrationUserText?.privacyLinkText ?? ''); + r23.setTitle(map.registrationUserText?.title ?? ''); + r23.setTosAndPrivacyLabel(map.registrationUserText?.tosAndPrivacyLabel ?? ''); + r23.setTosConfirm(map.registrationUserText?.tosConfirm ?? ''); + r23.setUsernameLabel(map.registrationUserText?.usernameLabel ?? ''); + req.setRegistrationUserText(r23); + + const r24 = new SelectAccountScreenText(); + r24.setDescription(map.selectAccountText?.description ?? ''); + r24.setDescriptionLinkingProcess(map.selectAccountText?.descriptionLinkingProcess ?? ''); + r24.setOtherUser(map.selectAccountText?.otherUser ?? ''); + r24.setSessionStateActive(map.selectAccountText?.sessionStateActive ?? ''); + r24.setSessionStateInactive(map.selectAccountText?.sessionStateInactive ?? ''); + r24.setTitle(map.selectAccountText?.title ?? ''); + r24.setTitleLinkingProcess(map.selectAccountText?.titleLinkingProcess ?? ''); + r24.setUserMustBeMemberOfOrg(map.selectAccountText?.userMustBeMemberOfOrg ?? ''); + req.setSelectAccountText(r24); + + const r25 = new SuccessLoginScreenText(); + r25.setAutoRedirectDescription(map.successLoginText?.autoRedirectDescription ?? ''); + r25.setNextButtonText(map.successLoginText?.nextButtonText ?? ''); + r25.setRedirectedDescription(map.successLoginText?.redirectedDescription ?? ''); + r25.setTitle(map.successLoginText?.title ?? ''); + req.setSuccessLoginText(r25); + + const r26 = new UsernameChangeDoneScreenText(); + r26.setDescription(map.usernameChangeDoneText?.description ?? ''); + r26.setNextButtonText(map.usernameChangeDoneText?.nextButtonText ?? ''); + r26.setTitle(map.usernameChangeDoneText?.title ?? ''); + req.setUsernameChangeDoneText(r26); + + const r27 = new UsernameChangeScreenText(); + r27.setCancelButtonText(map.usernameChangeText?.cancelButtonText ?? ''); + r27.setDescription(map.usernameChangeText?.description ?? ''); + r27.setNextButtonText(map.usernameChangeText?.nextButtonText ?? ''); + r27.setTitle(map.usernameChangeText?.title ?? ''); + r27.setUsernameLabel(map.usernameChangeText?.usernameLabel ?? ''); + req.setUsernameChangeText(r27); + + const r28 = new VerifyMFAOTPScreenText(); + r28.setCodeLabel(map.verifyMfaOtpText?.codeLabel ?? ''); + r28.setDescription(map.verifyMfaOtpText?.description ?? ''); + r28.setNextButtonText(map.verifyMfaOtpText?.nextButtonText ?? ''); + r28.setTitle(map.verifyMfaOtpText?.title ?? ''); + req.setVerifyMfaOtpText(r28); + + const r29 = new VerifyMFAU2FScreenText(); + r29.setDescription(map.verifyMfaU2fText?.description ?? ''); + r29.setErrorRetry(map.verifyMfaU2fText?.errorRetry ?? ''); + r29.setNotSupported(map.verifyMfaU2fText?.notSupported ?? ''); + r29.setTitle(map.verifyMfaU2fText?.title ?? ''); + r29.setValidateTokenText(map.verifyMfaU2fText?.validateTokenText ?? ''); + req.setVerifyMfaU2fText(r29); + + return req; +} diff --git a/console/src/app/modules/policies/login-texts/login-texts-routing.module.ts b/console/src/app/modules/policies/login-texts/login-texts-routing.module.ts new file mode 100644 index 0000000000..2acefb3f37 --- /dev/null +++ b/console/src/app/modules/policies/login-texts/login-texts-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { LoginTextsComponent } from './login-texts.component'; + +const routes: Routes = [ + { + path: '', + component: LoginTextsComponent, + data: { + animation: 'DetailPage', + }, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class LoginTextsRoutingModule { } diff --git a/console/src/app/modules/policies/login-texts/login-texts.component.html b/console/src/app/modules/policies/login-texts/login-texts.component.html new file mode 100644 index 0000000000..042335c508 --- /dev/null +++ b/console/src/app/modules/policies/login-texts/login-texts.component.html @@ -0,0 +1,60 @@ + + + +
+
+

{{'POLICY.LOGIN_TEXTS.NEWERVERSIONEXISTS' | translate}}

+

{{'POLICY.LOGIN_TEXTS.CHANGEDATE' | translate}}: {{newerPolicyChangeDate | timestampToDate | localizedDate: 'dd. MMMM YYYY, HH:mm:ss'}}

+

{{'POLICY.LOGIN_TEXTS.CURRENTDATE' | translate}}: {{currentPolicyChangeDate | timestampToDate | localizedDate: 'dd. MMMM YYYY, HH:mm:ss'}}

+
+ +
+
+ + {{ 'POLICY.LOGIN_TEXTS.KEYNAME' | translate }} + + + {{'POLICY.LOGIN_TEXTS.KEYS.'+key | translate }} + + + + + + {{ 'POLICY.LOGIN_TEXTS.LOCALE' | translate }} + + +
+ {{loc}} | {{'POLICY.LOGIN_TEXTS.LOCALES.'+loc | translate }} +
+
+
+
+
+ + + {{'FEATURES.NOTAVAILABLE' | translate: ({value: + 'custom_text'})}} + + +
+ +
+ +
+ +
+ + +
+ + +
diff --git a/console/src/app/modules/policies/login-texts/login-texts.component.scss b/console/src/app/modules/policies/login-texts/login-texts.component.scss new file mode 100644 index 0000000000..4cc7985ee2 --- /dev/null +++ b/console/src/app/modules/policies/login-texts/login-texts.component.scss @@ -0,0 +1,108 @@ +.spinner-wr { + margin: .5rem 0; +} + +.date { + display: flex; + justify-content: space-between; + + p { + margin: .4rem 0; + font-size: 14px; + + &.gray { + color: var(--grey); + } + } + + .newer-title { + font-size: 1rem; + margin-bottom: 1rem; + } + + button { + align-self: center; + + i { + margin-bottom: 3px; + margin-right: .5rem; + } + } +} + +.top-actions { + display: flex; + margin: 0 -.5rem; + flex-wrap: wrap; + + .keys { + flex: 1; + margin: 0 .5rem; + min-width: 150px; + } + + .language { + margin: 0 .5rem; + min-width: 150px; + + .lighter { + font-size: 12px; + color: var(--grey); + padding: 0 .5rem; + } + } +} + +.centerline { + display: flex; + align-items: center; +} + +.content { + padding-top: 1rem; +} + +.chips { + display: flex; + margin: 0 -.25rem; + + .chip { + border-radius: 50vw; + padding: 2px .5rem; + font-size: 12px; + background: #cbf4c9; + color: #0e6245; + margin: .25rem; + display: flex; + align-items: center; + justify-content: center; + z-index: 10; + } +} + +.divider { + width: 100%; + height: 1px; + background-color: rgba(#81868a, .5); + margin: 1.5rem 0 0 0; +} + +.actions { + display: flex; + justify-content: flex-end; + + .save-button, + .reset-button { + display: block; + margin: 0 .25rem 3rem .25rem; + } + + .reset-button { + display: flex; + align-items: center; + + i { + margin-bottom: 3px; + } + } +} diff --git a/console/src/app/modules/policies/login-texts/login-texts.component.spec.ts b/console/src/app/modules/policies/login-texts/login-texts.component.spec.ts new file mode 100644 index 0000000000..6b6a2aadd8 --- /dev/null +++ b/console/src/app/modules/policies/login-texts/login-texts.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { LoginPolicyComponent } from './login-policy.component'; + +describe('LoginPolicyComponent', () => { + let component: LoginPolicyComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LoginPolicyComponent], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginPolicyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/modules/policies/login-texts/login-texts.component.ts b/console/src/app/modules/policies/login-texts/login-texts.component.ts new file mode 100644 index 0000000000..c3376278df --- /dev/null +++ b/console/src/app/modules/policies/login-texts/login-texts.component.ts @@ -0,0 +1,346 @@ +import { Component, Injector, OnDestroy, Type } from '@angular/core'; +import { FormControl, FormGroup } from '@angular/forms'; +import { MatDialog } from '@angular/material/dialog'; +import { ActivatedRoute } from '@angular/router'; +import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; +import { BehaviorSubject, from, interval, Observable, of, Subject, Subscription } from 'rxjs'; +import { map, pairwise, startWith, switchMap, takeUntil } from 'rxjs/operators'; +import { + GetCustomLoginTextsRequest as AdminGetCustomLoginTextsRequest, + GetDefaultLoginTextsRequest as AdminGetDefaultLoginTextsRequest, + SetCustomLoginTextsRequest as AdminSetCustomLoginTextsRequest, +} from 'src/app/proto/generated/zitadel/admin_pb'; +import { + GetCustomLoginTextsRequest, + GetDefaultLoginTextsRequest, + SetCustomLoginTextsRequest, +} from 'src/app/proto/generated/zitadel/management_pb'; +import { AdminService } from 'src/app/services/admin.service'; +import { ManagementService } from 'src/app/services/mgmt.service'; +import { ToastService } from 'src/app/services/toast.service'; + +import { GridPolicy, LOGIN_TEXTS_POLICY } from '../../policy-grid/policies'; +import { WarnDialogComponent } from '../../warn-dialog/warn-dialog.component'; +import { PolicyComponentServiceType } from '../policy-component-types.enum'; +import { mapRequestValues } from './helper'; + +// tslint:disable +const KeyNamesArray = [ + 'emailVerificationDoneText', + 'emailVerificationText', + 'externalUserNotFoundText', + 'footerText', + 'initMfaDoneText', + 'initMfaOtpText', + 'initMfaPromptText', + 'initMfaU2fText', + 'initPasswordDoneText', + 'initPasswordText', + 'initializeDoneText', + 'initializeUserText', + 'linkingUserDoneText', + 'loginText', + 'logoutText', + 'mfaProvidersText', + 'passwordChangeDoneText', + 'passwordChangeText', + 'passwordResetDoneText', + 'passwordText', + 'passwordlessText', + 'registrationOptionText', + 'registrationOrgText', + 'registrationUserText', + 'selectAccountText', + 'successLoginText', + 'usernameChangeDoneText', + 'usernameChangeText', + 'verifyMfaOtpText', + 'verifyMfaU2fText', +]; +// tslint:enable + +const REQUESTMAP = { + [PolicyComponentServiceType.MGMT]: { + get: new GetCustomLoginTextsRequest(), + set: new SetCustomLoginTextsRequest(), + getDefault: new GetDefaultLoginTextsRequest(), + setFcn: (mgmtmap: Partial): SetCustomLoginTextsRequest => { + let req = new SetCustomLoginTextsRequest(); + req.setLanguage(mgmtmap.language ?? ''); + req = mapRequestValues(mgmtmap, req); + return req; + }, + }, + [PolicyComponentServiceType.ADMIN]: { + get: new AdminGetCustomLoginTextsRequest(), + set: new AdminSetCustomLoginTextsRequest(), + getDefault: new AdminGetDefaultLoginTextsRequest(), + setFcn: (adminmap: Partial): AdminSetCustomLoginTextsRequest => { + let req = new AdminSetCustomLoginTextsRequest(); + req.setLanguage(adminmap.language ?? ''); + req = mapRequestValues(adminmap, req); + return req; + }, + }, +}; +@Component({ + selector: 'app-login-texts', + templateUrl: './login-texts.component.html', + styleUrls: ['./login-texts.component.scss'], +}) +export class LoginTextsComponent implements OnDestroy { + public currentPolicyChangeDate!: Timestamp.AsObject | undefined; + public newerPolicyChangeDate!: Timestamp.AsObject | undefined; + + public totalCustomPolicy: { [key: string]: { [key: string]: string; }; } = {}; + + public getDefaultInitMessageTextMap$: Observable<{ [key: string]: string; }> = of({}); + public getCustomInitMessageTextMap$: BehaviorSubject<{ [key: string]: string; }> = new BehaviorSubject({}); + + public service!: ManagementService | AdminService; + public PolicyComponentServiceType: any = PolicyComponentServiceType; + public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; + + public KeyNamesArray: string[] = KeyNamesArray; + public LOCALES: string[] = ['en']; + + private sub: Subscription = new Subscription(); + + public updateRequest!: SetCustomLoginTextsRequest; + public currentPolicy: GridPolicy = LOGIN_TEXTS_POLICY; + + public destroy$: Subject = new Subject(); + + public form: FormGroup = new FormGroup({ + currentSubMap: new FormControl('emailVerificationDoneText'), + locale: new FormControl('en'), + }); + constructor( + private route: ActivatedRoute, + private injector: Injector, + private dialog: MatDialog, + private toast: ToastService, + ) { + this.sub = this.route.data.pipe(switchMap(data => { + this.serviceType = data.serviceType; + switch (this.serviceType) { + case PolicyComponentServiceType.MGMT: + this.service = this.injector.get(ManagementService as Type); + + this.service.getSupportedLanguages().then(lang => { + this.LOCALES = lang.languagesList; + }); + + this.loadData(); + break; + case PolicyComponentServiceType.ADMIN: + this.service = this.injector.get(AdminService as Type); + + this.service.getSupportedLanguages().then(lang => { + this.LOCALES = lang.languagesList; + }); + + this.loadData(); + break; + } + + return this.route.params; + })).subscribe(() => { + interval(10000).pipe( + // debounceTime(5000), + takeUntil(this.destroy$), + ).subscribe(x => { + this.checkForChanges(); + }); + }); + + this.form.valueChanges.pipe( + startWith({ currentSubMap: 'emailVerificationDoneText', locale: 'en' }), + pairwise(), + takeUntil(this.destroy$), + ).subscribe(pair => { + this.checkForUnsaved(pair[0].currentSubMap).then((wantsToSave) => { + if (wantsToSave) { + this.saveCurrentMessage().then(() => { + this.loadData(); + }).catch(() => { + // load even if save failed + this.loadData(); + }); + } else { + this.loadData(); + } + }); + }); + } + + public getDefaultValues(req: any): Promise { + return this.service.getDefaultLoginTexts(req).then((res) => { + if (res.customText) { + // delete res.customText.details; + return Object.assign({}, res.customText); + } else { + return {}; + } + }); + } + + public getCurrentValues(req: any): Promise { + return (this.service as ManagementService).getCustomLoginTexts(req).then((res) => { + if (res.customText) { + this.currentPolicyChangeDate = res.customText.details?.changeDate; + // delete res.customText.details; + return Object.assign({}, res.customText); + } else { + return {}; + } + }); + } + + public async loadData(): Promise { + const reqDefaultInit = REQUESTMAP[this.serviceType].getDefault; + reqDefaultInit.setLanguage(this.locale); + this.getDefaultInitMessageTextMap$ = from( + this.getDefaultValues(reqDefaultInit), + ).pipe(map(m => m[this.currentSubMap])); + + const reqCustomInit = REQUESTMAP[this.serviceType].get.setLanguage(this.locale); + this.totalCustomPolicy = (await this.getCurrentValues(reqCustomInit)); + this.getCustomInitMessageTextMap$.next( + this.totalCustomPolicy[this.currentSubMap], + ); + } + + private async patchSingleCurrentMap(): Promise { + const reqCustomInit = REQUESTMAP[this.serviceType].get.setLanguage(this.locale); + const pol = (await this.getCurrentValues(reqCustomInit)); + this.getCustomInitMessageTextMap$.next( + pol[this.currentSubMap], + ); + } + + public checkForChanges(): void { + const reqCustomInit = REQUESTMAP[this.serviceType].get.setLanguage(this.locale); + + (this.service as ManagementService).getCustomLoginTexts(reqCustomInit).then(policy => { + this.newerPolicyChangeDate = policy.customText?.details?.changeDate; + }); + } + + /** + * + * @param oldkey which was potentially unsaved + * @returns a boolean if saving is desired + */ + public checkForUnsaved(oldkey: string): Promise { + const old = this.getCustomInitMessageTextMap$.getValue(); + const unsaved = this.totalCustomPolicy[oldkey]; + + if (old && unsaved && JSON.stringify(old) !== JSON.stringify(unsaved)) { + const dialogRef = this.dialog.open(WarnDialogComponent, { + data: { + confirmKey: 'ACTIONS.SAVE', + cancelKey: 'ACTIONS.CONTINUEWITHOUTSAVE', + titleKey: 'POLICY.LOGIN_TEXTS.UNSAVED_TITLE', + descriptionKey: 'POLICY.LOGIN_TEXTS.UNSAVED_DESCRIPTION', + }, + width: '400px', + }); + + return dialogRef.afterClosed().toPromise(); + } else { + return Promise.resolve(false); + } + } + + public updateCurrentValues(values: { [key: string]: string; }): void { + const setFcn = REQUESTMAP[this.serviceType].setFcn; + this.totalCustomPolicy[this.currentSubMap] = values; + + this.updateRequest = setFcn(this.totalCustomPolicy); + this.updateRequest.setLanguage(this.locale); + } + + public saveCurrentMessage(): Promise { + const entirePayload = this.updateRequest.toObject(); + this.getCustomInitMessageTextMap$.next( + (entirePayload as any)[this.currentSubMap], + ); + + switch (this.serviceType) { + case PolicyComponentServiceType.MGMT: + return (this.service as ManagementService).setCustomLoginText(this.updateRequest).then(() => { + this.toast.showInfo('POLICY.MESSAGE_TEXTS.TOAST.UPDATED', true); + setTimeout(() => { + this.patchSingleCurrentMap(); + }, 1000); + }).catch(error => this.toast.showError(error)); + case PolicyComponentServiceType.ADMIN: + return (this.service as AdminService).setCustomLoginText(this.updateRequest).then(() => { + this.toast.showInfo('POLICY.MESSAGE_TEXTS.TOAST.UPDATED', true); + }).catch(error => this.toast.showError(error)); + } + } + + public resetDefault(): void { + const dialogRef = this.dialog.open(WarnDialogComponent, { + data: { + icon: 'las la-history', + confirmKey: 'ACTIONS.RESTORE', + cancelKey: 'ACTIONS.CANCEL', + titleKey: 'POLICY.LOGIN_TEXTS.RESET_TITLE', + descriptionKey: 'POLICY.LOGIN_TEXTS.RESET_DESCRIPTION', + }, + width: '400px', + }); + + dialogRef.afterClosed().subscribe(resp => { + if (resp) { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + (this.service as ManagementService).resetCustomLoginTextToDefault(this.locale).then(() => { + setTimeout(() => { + this.loadData(); + }, 1000); + }).catch(error => { + this.toast.showError(error); + }); + } else if (this.serviceType === PolicyComponentServiceType.ADMIN) { + (this.service as AdminService).resetCustomLoginTextToDefault(this.locale).then(() => { + setTimeout(() => { + this.loadData(); + }, 1000); + }).catch(error => { + this.toast.showError(error); + }); + } + } + }); + } + + public ngOnDestroy(): void { + this.sub.unsubscribe(); + this.destroy$.next(); + this.destroy$.complete(); + } + + public get newerVersionExists(): boolean { + const toDate = (ts: Timestamp.AsObject) => { + return new Date(ts.seconds * 1000 + ts.nanos / 1000 / 1000); + }; + if (this.newerPolicyChangeDate && this.currentPolicyChangeDate) { + const ms = toDate(this.newerPolicyChangeDate).getTime() - toDate(this.currentPolicyChangeDate).getTime(); + // show button if changes are newer than 10s + return ms / 1000 > 10; + } else { + return false; + } + } + + public get locale(): string { + return this.form.get('locale')?.value; + } + + public get currentSubMap(): string { + return this.form.get('currentSubMap')?.value; + } +} diff --git a/console/src/app/modules/policies/login-texts/login-texts.module.ts b/console/src/app/modules/policies/login-texts/login-texts.module.ts new file mode 100644 index 0000000000..e10cb094c7 --- /dev/null +++ b/console/src/app/modules/policies/login-texts/login-texts.module.ts @@ -0,0 +1,58 @@ +import { TextFieldModule } from '@angular/cdk/text-field'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatIconModule } from '@angular/material/icon'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TranslateModule } from '@ngx-translate/core'; +import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/localized-date-pipe.module'; +import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module'; + +import { HasRoleModule } from '../../../directives/has-role/has-role.module'; +import { DetailLayoutModule } from '../../../modules/detail-layout/detail-layout.module'; +import { InputModule } from '../../../modules/input/input.module'; +import { HasFeaturePipeModule } from '../../../pipes/has-feature-pipe/has-feature-pipe.module'; +import { HasRolePipeModule } from '../../../pipes/has-role-pipe/has-role-pipe.module'; +import { EditTextModule } from '../../edit-text/edit-text.module'; +import { FormFieldModule } from '../../form-field/form-field.module'; +import { InfoSectionModule } from '../../info-section/info-section.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; +import { WarnDialogModule } from '../../warn-dialog/warn-dialog.module'; +import { LoginTextsRoutingModule } from './login-texts-routing.module'; +import { LoginTextsComponent } from './login-texts.component'; + +@NgModule({ + declarations: [LoginTextsComponent], + imports: [ + LoginTextsRoutingModule, + MatSelectModule, + CommonModule, + InfoSectionModule, + ReactiveFormsModule, + FormsModule, + InputModule, + FormFieldModule, + EditTextModule, + MatButtonModule, + HasFeaturePipeModule, + MatIconModule, + HasRoleModule, + HasRolePipeModule, + MatTooltipModule, + TranslateModule, + MatTooltipModule, + DetailLayoutModule, + MatProgressSpinnerModule, + TextFieldModule, + MatDialogModule, + WarnDialogModule, + PolicyGridModule, + TimestampToDatePipeModule, + LocalizedDatePipeModule, + ], +}) +export class LoginTextsPolicyModule { } diff --git a/console/src/app/modules/policies/message-texts/message-texts-routing.module.ts b/console/src/app/modules/policies/message-texts/message-texts-routing.module.ts new file mode 100644 index 0000000000..bfe529d291 --- /dev/null +++ b/console/src/app/modules/policies/message-texts/message-texts-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { MessageTextsComponent } from './message-texts.component'; + +const routes: Routes = [ + { + path: '', + component: MessageTextsComponent, + data: { + animation: 'DetailPage', + }, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class MessageTextsRoutingModule { } diff --git a/console/src/app/modules/policies/message-texts/message-texts.component.html b/console/src/app/modules/policies/message-texts/message-texts.component.html new file mode 100644 index 0000000000..c28a713b1c --- /dev/null +++ b/console/src/app/modules/policies/message-texts/message-texts.component.html @@ -0,0 +1,51 @@ + + +
+
+ +
+ + + {{ 'POLICY.LOGIN_TEXTS.LOCALE' | translate }} + + +
+ {{loc}} | {{'POLICY.LOGIN_TEXTS.LOCALES.'+loc | translate }} +
+
+
+
+
+ + + {{'FEATURES.NOTAVAILABLE' | translate: ({value: + 'custom_text'})}} + + +
+ +
+ +
+ + +
+ +
+ + + {{'FEATURES.NOTAVAILABLE' | translate: ({value: + 'login_policy.idp'})}} + + + + +
diff --git a/console/src/app/modules/policies/message-texts/message-texts.component.scss b/console/src/app/modules/policies/message-texts/message-texts.component.scss new file mode 100644 index 0000000000..156b085b5a --- /dev/null +++ b/console/src/app/modules/policies/message-texts/message-texts.component.scss @@ -0,0 +1,69 @@ +.spinner-wr { + margin: .5rem 0; +} + +.top-actions { + display: flex; + margin: 0 -.5rem; + justify-content: space-between; + align-items: flex-end; + + .message-type { + display: flex; + flex-wrap: wrap; + margin-bottom: 11px; + + .active { + background: #cbf4c9; + color: #0e6245; + } + } + + .language { + display: block; + margin: 0 .5rem; + min-width: 150px; + + .lighter { + font-size: 12px; + color: var(--grey); + padding: 0 .5rem; + } + } +} + +.warn { + margin-top: 1rem; + display: block; +} + +.content { + padding-top: 1rem; +} + +.divider { + width: 100%; + height: 1px; + background-color: rgba(var(--grey), .5); + margin: 1rem 0; +} + +.actions { + display: flex; + justify-content: flex-end; + + .save-button, + .reset-button { + display: block; + margin: 0 .25rem 3rem .25rem; + } + + .reset-button { + display: flex; + align-items: center; + + i { + margin-bottom: 3px; + } + } +} diff --git a/console/src/app/modules/policies/message-texts/message-texts.component.spec.ts b/console/src/app/modules/policies/message-texts/message-texts.component.spec.ts new file mode 100644 index 0000000000..6b6a2aadd8 --- /dev/null +++ b/console/src/app/modules/policies/message-texts/message-texts.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { LoginPolicyComponent } from './login-policy.component'; + +describe('LoginPolicyComponent', () => { + let component: LoginPolicyComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LoginPolicyComponent], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginPolicyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/modules/policies/message-texts/message-texts.component.ts b/console/src/app/modules/policies/message-texts/message-texts.component.ts new file mode 100644 index 0000000000..e16e0ca9fd --- /dev/null +++ b/console/src/app/modules/policies/message-texts/message-texts.component.ts @@ -0,0 +1,461 @@ +import { Component, Injector, OnDestroy, Type } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { MatSelectChange } from '@angular/material/select'; +import { ActivatedRoute } from '@angular/router'; +import { BehaviorSubject, from, Observable, of, Subscription } from 'rxjs'; +import { switchMap } from 'rxjs/operators'; +import { + GetCustomPasswordResetMessageTextRequest as AdminGetCustomPasswordResetMessageTextRequest, + GetDefaultInitMessageTextRequest as AdminGetDefaultInitMessageTextRequest, + GetDefaultVerifyEmailMessageTextRequest as AdminGetDefaultVerifyEmailMessageTextRequest, + GetDefaultVerifyPhoneMessageTextRequest as AdminGetDefaultVerifyPhoneMessageTextRequest, + SetDefaultDomainClaimedMessageTextRequest, + SetDefaultInitMessageTextRequest, + SetDefaultPasswordResetMessageTextRequest, + SetDefaultVerifyEmailMessageTextRequest, + SetDefaultVerifyPhoneMessageTextRequest, +} from 'src/app/proto/generated/zitadel/admin_pb'; +import { + GetCustomDomainClaimedMessageTextRequest, + GetCustomPasswordResetMessageTextRequest, + GetCustomVerifyEmailMessageTextRequest, + GetCustomVerifyPhoneMessageTextRequest, + GetDefaultDomainClaimedMessageTextRequest, + GetDefaultInitMessageTextRequest, + GetDefaultPasswordResetMessageTextRequest, + GetDefaultVerifyEmailMessageTextRequest, + GetDefaultVerifyPhoneMessageTextRequest, + SetCustomDomainClaimedMessageTextRequest, + SetCustomInitMessageTextRequest, + SetCustomPasswordResetMessageTextRequest, + SetCustomVerifyEmailMessageTextRequest, + SetCustomVerifyPhoneMessageTextRequest, +} from 'src/app/proto/generated/zitadel/management_pb'; +import { MessageCustomText } from 'src/app/proto/generated/zitadel/text_pb'; +import { AdminService } from 'src/app/services/admin.service'; +import { ManagementService } from 'src/app/services/mgmt.service'; +import { ToastService } from 'src/app/services/toast.service'; + +import { GridPolicy, MESSAGE_TEXTS_POLICY } from '../../policy-grid/policies'; +import { WarnDialogComponent } from '../../warn-dialog/warn-dialog.component'; +import { PolicyComponentServiceType } from '../policy-component-types.enum'; + +enum MESSAGETYPES { + INIT = 'INIT', + VERIFYPHONE = 'VP', + VERIFYEMAIL = 'VE', + PASSWORDRESET = 'PR', + DOMAINCLAIMED = 'DC', +} + +const REQUESTMAP = { + [PolicyComponentServiceType.MGMT]: { + [MESSAGETYPES.INIT]: { + get: new GetDefaultInitMessageTextRequest(), + set: new SetCustomInitMessageTextRequest(), + getDefault: new GetDefaultInitMessageTextRequest(), + setFcn: (map: Partial): SetCustomInitMessageTextRequest => { + const req = new SetCustomInitMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.VERIFYEMAIL]: { + get: new GetCustomVerifyEmailMessageTextRequest(), + set: new SetCustomVerifyEmailMessageTextRequest(), + getDefault: new GetDefaultVerifyEmailMessageTextRequest(), + setFcn: (map: Partial): SetCustomVerifyEmailMessageTextRequest => { + const req = new SetCustomVerifyEmailMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.VERIFYPHONE]: { + get: new GetCustomVerifyPhoneMessageTextRequest(), + set: new SetCustomVerifyPhoneMessageTextRequest(), + getDefault: new GetDefaultVerifyPhoneMessageTextRequest(), + setFcn: (map: Partial): SetCustomVerifyPhoneMessageTextRequest => { + const req = new SetCustomVerifyPhoneMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.PASSWORDRESET]: { + get: new GetCustomPasswordResetMessageTextRequest(), + set: new SetCustomPasswordResetMessageTextRequest(), + getDefault: new GetDefaultPasswordResetMessageTextRequest(), + setFcn: (map: Partial): + SetCustomPasswordResetMessageTextRequest => { + const req = new SetCustomPasswordResetMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.DOMAINCLAIMED]: { + get: new GetCustomDomainClaimedMessageTextRequest(), + set: new SetCustomDomainClaimedMessageTextRequest(), + getDefault: new GetDefaultDomainClaimedMessageTextRequest(), + setFcn: (map: Partial): + SetCustomDomainClaimedMessageTextRequest => { + const req = new SetCustomDomainClaimedMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + }, + [PolicyComponentServiceType.ADMIN]: { + [MESSAGETYPES.INIT]: { + get: new AdminGetDefaultInitMessageTextRequest(), + set: new SetDefaultInitMessageTextRequest(), + setFcn: (map: Partial): + SetDefaultInitMessageTextRequest => { + const req = new SetDefaultInitMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.VERIFYEMAIL]: { + get: new AdminGetDefaultVerifyEmailMessageTextRequest(), + set: new SetDefaultVerifyEmailMessageTextRequest(), + setFcn: (map: Partial): + SetDefaultVerifyEmailMessageTextRequest => { + const req = new SetDefaultVerifyEmailMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.VERIFYPHONE]: { + get: new AdminGetDefaultVerifyPhoneMessageTextRequest(), + set: new SetDefaultVerifyPhoneMessageTextRequest(), + setFcn: (map: Partial): + SetDefaultVerifyPhoneMessageTextRequest => { + const req = new SetDefaultVerifyPhoneMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.PASSWORDRESET]: { + get: new AdminGetCustomPasswordResetMessageTextRequest(), + set: new SetDefaultPasswordResetMessageTextRequest(), + setFcn: (map: Partial): + SetDefaultPasswordResetMessageTextRequest => { + const req = new SetDefaultPasswordResetMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + [MESSAGETYPES.DOMAINCLAIMED]: { + get: new GetDefaultDomainClaimedMessageTextRequest(), + set: new SetDefaultDomainClaimedMessageTextRequest(), + setFcn: (map: Partial): + SetDefaultDomainClaimedMessageTextRequest => { + const req = new SetDefaultDomainClaimedMessageTextRequest(); + req.setButtonText(map.buttonText ?? ''); + req.setFooterText(map.footerText ?? ''); + req.setGreeting(map.greeting ?? ''); + req.setPreHeader(map.preHeader ?? ''); + req.setSubject(map.subject ?? ''); + req.setText(map.text ?? ''); + req.setTitle(map.title ?? ''); + + return req; + }, + }, + }, +}; +@Component({ + selector: 'app-message-texts', + templateUrl: './message-texts.component.html', + styleUrls: ['./message-texts.component.scss'], +}) +export class MessageTextsComponent implements OnDestroy { + public getDefaultInitMessageTextMap$: Observable<{ [key: string]: string; }> = of({}); + public getCustomInitMessageTextMap$: BehaviorSubject<{ [key: string]: string; }> = new BehaviorSubject({}); + + public currentType: MESSAGETYPES = MESSAGETYPES.INIT; + + public service!: ManagementService | AdminService; + public PolicyComponentServiceType: any = PolicyComponentServiceType; + public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; + + public MESSAGETYPES: any = MESSAGETYPES; + + public updateRequest!: SetCustomInitMessageTextRequest | SetDefaultInitMessageTextRequest; + + public chips: any[] = [ + { key: 'POLICY.MESSAGE_TEXTS.CHIPS.firstname', value: '{{.FirstName}}' }, + { key: 'POLICY.MESSAGE_TEXTS.CHIPS.lastname', value: '{{.Lastname}}' }, + { key: 'POLICY.MESSAGE_TEXTS.CHIPS.code', value: '{{.Code}}' }, + { key: 'POLICY.MESSAGE_TEXTS.CHIPS.preferredLoginName', value: '{{.PreferredLoginName}}' }, + ]; + + public locale: string = 'en'; + public LOCALES: string[] = ['en']; + private sub: Subscription = new Subscription(); + public currentPolicy: GridPolicy = MESSAGE_TEXTS_POLICY; + + constructor( + private route: ActivatedRoute, + private toast: ToastService, + private injector: Injector, + private dialog: MatDialog, + ) { + this.sub = this.route.data.pipe(switchMap(data => { + this.serviceType = data.serviceType; + switch (this.serviceType) { + case PolicyComponentServiceType.MGMT: + this.service = this.injector.get(ManagementService as Type); + this.service.getSupportedLanguages().then(lang => { + this.LOCALES = lang.languagesList; + }); + this.loadData(this.currentType); + break; + case PolicyComponentServiceType.ADMIN: + this.service = this.injector.get(AdminService as Type); + this.service.getSupportedLanguages().then(lang => { + this.LOCALES = lang.languagesList; + }); + this.loadData(this.currentType); + break; + } + + return this.route.params; + })).subscribe(() => { + + }); + } + + public getDefaultValues(type: MESSAGETYPES, req: any): Promise { + switch (type) { + case MESSAGETYPES.INIT: + return this.stripDetails((this.service).getDefaultInitMessageText(req)); + case MESSAGETYPES.VERIFYPHONE: + return this.stripDetails((this.service).getDefaultVerifyPhoneMessageText(req)); + case MESSAGETYPES.VERIFYEMAIL: + return this.stripDetails((this.service).getDefaultVerifyEmailMessageText(req)); + case MESSAGETYPES.PASSWORDRESET: + return this.stripDetails((this.service).getDefaultPasswordResetMessageText(req)); + case MESSAGETYPES.DOMAINCLAIMED: + return this.stripDetails((this.service).getDefaultDomainClaimedMessageText(req)); + } + } + + public getCurrentValues(type: MESSAGETYPES, req: any): Promise | undefined { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + switch (type) { + case MESSAGETYPES.INIT: + return this.stripDetails((this.service as ManagementService).getCustomInitMessageText(req)); + case MESSAGETYPES.VERIFYPHONE: + return this.stripDetails((this.service as ManagementService).getCustomVerifyPhoneMessageText(req)); + case MESSAGETYPES.VERIFYEMAIL: + return this.stripDetails((this.service as ManagementService).getCustomVerifyEmailMessageText(req)); + case MESSAGETYPES.PASSWORDRESET: + return this.stripDetails((this.service as ManagementService).getCustomPasswordResetMessageText(req)); + case MESSAGETYPES.DOMAINCLAIMED: + return this.stripDetails((this.service as ManagementService).getCustomDomainClaimedMessageText(req)); + } + } else if (this.serviceType === PolicyComponentServiceType.ADMIN) { + switch (type) { + case MESSAGETYPES.INIT: + return this.stripDetails((this.service as AdminService).getCustomInitMessageText(req)); + case MESSAGETYPES.VERIFYPHONE: + return this.stripDetails((this.service as AdminService).getCustomVerifyPhoneMessageText(req)); + case MESSAGETYPES.VERIFYEMAIL: + return this.stripDetails((this.service as AdminService).getCustomVerifyEmailMessageText(req)); + case MESSAGETYPES.PASSWORDRESET: + return this.stripDetails((this.service as AdminService).getCustomPasswordResetMessageText(req)); + case MESSAGETYPES.DOMAINCLAIMED: + return this.stripDetails((this.service as AdminService).getCustomDomainClaimedMessageText(req)); + } + } + } + + public changeLocale(selection: MatSelectChange): void { + this.locale = selection.value; + this.loadData(this.currentType); + } + + public async loadData(type: MESSAGETYPES): Promise { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + const reqDefaultInit = REQUESTMAP[this.serviceType][type].getDefault; + + reqDefaultInit.setLanguage(this.locale); + console.log(this.locale); + this.getDefaultInitMessageTextMap$ = from( + this.getDefaultValues(type, reqDefaultInit), + ); + } + + const reqCustomInit = REQUESTMAP[this.serviceType][type].get.setLanguage(this.locale); + this.getCustomInitMessageTextMap$.next( + await this.getCurrentValues(type, reqCustomInit), + ); + } + + public updateCurrentValues(values: { [key: string]: string; }): void { + const req = REQUESTMAP[this.serviceType][this.currentType].setFcn; + const mappedValues = req(values); + this.updateRequest = mappedValues; + this.updateRequest.setLanguage(this.locale); + } + + public saveCurrentMessage(): any { + const handler = (prom: Promise): Promise => { + return prom.then(() => { + this.toast.showInfo('POLICY.MESSAGE_TEXTS.TOAST.UPDATED', true); + }).catch(error => this.toast.showError(error)); + }; + if (this.serviceType === PolicyComponentServiceType.MGMT) { + switch (this.currentType) { + case MESSAGETYPES.INIT: + return handler((this.service as ManagementService).setCustomInitMessageText(this.updateRequest)); + case MESSAGETYPES.VERIFYPHONE: + return handler((this.service as ManagementService).setCustomVerifyPhoneMessageText(this.updateRequest)); + case MESSAGETYPES.VERIFYEMAIL: + return handler((this.service as ManagementService).setCustomVerifyEmailMessageText(this.updateRequest)); + case MESSAGETYPES.PASSWORDRESET: + return handler((this.service as ManagementService).setCustomPasswordResetMessageText(this.updateRequest)); + case MESSAGETYPES.DOMAINCLAIMED: + return handler((this.service as ManagementService).setCustomDomainClaimedMessageCustomText(this.updateRequest)); + } + } else if (this.serviceType === PolicyComponentServiceType.ADMIN) { + switch (this.currentType) { + case MESSAGETYPES.INIT: + return handler((this.service as AdminService).setDefaultInitMessageText(this.updateRequest)); + case MESSAGETYPES.VERIFYPHONE: + return handler((this.service as AdminService).setDefaultVerifyPhoneMessageText(this.updateRequest)); + case MESSAGETYPES.VERIFYEMAIL: + return handler((this.service as AdminService).setDefaultVerifyEmailMessageText(this.updateRequest)); + case MESSAGETYPES.PASSWORDRESET: + return handler((this.service as AdminService).setDefaultPasswordResetMessageText(this.updateRequest)); + case MESSAGETYPES.DOMAINCLAIMED: + return handler((this.service as AdminService).setDefaultDomainClaimedMessageText(this.updateRequest)); + } + } + } + + public resetDefault(): void { + const dialogRef = this.dialog.open(WarnDialogComponent, { + data: { + icon: 'las la-history', + confirmKey: 'ACTIONS.RESTORE', + cancelKey: 'ACTIONS.CANCEL', + titleKey: 'POLICY.LOGIN_TEXTS.RESET_TITLE', + descriptionKey: 'POLICY.LOGIN_TEXTS.RESET_DESCRIPTION', + }, + width: '400px', + }); + + dialogRef.afterClosed().subscribe(resp => { + if (resp) { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + const handler = (prom: Promise): Promise => { + return prom.then(() => { + setTimeout(() => { + this.loadData(this.currentType); + }, 1000); + }).catch(error => { + this.toast.showError(error); + }); + }; + + switch (this.currentType) { + case MESSAGETYPES.INIT: + return handler((this.service as ManagementService).resetCustomInitMessageTextToDefault(this.locale)); + case MESSAGETYPES.VERIFYPHONE: + return handler((this.service as ManagementService).resetCustomVerifyPhoneMessageTextToDefault(this.locale)); + case MESSAGETYPES.VERIFYEMAIL: + return handler((this.service as ManagementService).resetCustomVerifyEmailMessageTextToDefault(this.locale)); + case MESSAGETYPES.PASSWORDRESET: + return handler((this.service as ManagementService).resetCustomPasswordResetMessageTextToDefault(this.locale)); + case MESSAGETYPES.DOMAINCLAIMED: + return handler((this.service as ManagementService).resetCustomDomainClaimedMessageTextToDefault(this.locale)); + } + + } + } + }); + } + + private stripDetails(prom: Promise): Promise { + return prom.then(res => { + if (res.customText) { + delete res.customText.details; + return Object.assign({}, res.customText as unknown as { [key: string]: string; }); + } else { + return {}; + } + }); + } + public ngOnDestroy(): void { + this.sub.unsubscribe(); + } + + public setCurrentType(key: MESSAGETYPES): void { + this.currentType = key; + this.loadData(this.currentType); + } +} diff --git a/console/src/app/modules/policies/message-texts/message-texts.module.ts b/console/src/app/modules/policies/message-texts/message-texts.module.ts new file mode 100644 index 0000000000..92d1b2f94f --- /dev/null +++ b/console/src/app/modules/policies/message-texts/message-texts.module.ts @@ -0,0 +1,50 @@ +import { TextFieldModule } from '@angular/cdk/text-field'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TranslateModule } from '@ngx-translate/core'; +import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; +import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; +import { InputModule } from 'src/app/modules/input/input.module'; +import { HasFeaturePipeModule } from 'src/app/pipes/has-feature-pipe/has-feature-pipe.module'; +import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module'; + +import { EditTextModule } from '../../edit-text/edit-text.module'; +import { FormFieldModule } from '../../form-field/form-field.module'; +import { InfoSectionModule } from '../../info-section/info-section.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; +import { MessageTextsRoutingModule } from './message-texts-routing.module'; +import { MessageTextsComponent } from './message-texts.component'; + +@NgModule({ + declarations: [MessageTextsComponent], + imports: [ + MessageTextsRoutingModule, + CommonModule, + InfoSectionModule, + ReactiveFormsModule, + FormsModule, + InputModule, + FormFieldModule, + EditTextModule, + MatButtonModule, + HasFeaturePipeModule, + MatIconModule, + HasRoleModule, + HasRolePipeModule, + MatTooltipModule, + TranslateModule, + MatTooltipModule, + MatSelectModule, + DetailLayoutModule, + MatProgressSpinnerModule, + PolicyGridModule, + TextFieldModule, + ], +}) +export class MessageTextsPolicyModule { } diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html index 92968ac91e..d41fd53669 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html +++ b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html @@ -24,5 +24,5 @@ }}
- + \ No newline at end of file diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.scss b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.scss index c90c5d0d07..1e7ae8249a 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.scss +++ b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.scss @@ -33,6 +33,7 @@ display: flex; justify-content: flex-end; width: 100%; + margin-bottom: 50px; button { margin-top: 3rem; diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts index 3bfe6565d0..b82f58218d 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts +++ b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts @@ -11,15 +11,7 @@ import { ManagementService } from 'src/app/services/mgmt.service'; import { StorageService } from 'src/app/services/storage.service'; import { ToastService } from 'src/app/services/toast.service'; -import { CnslLinks } from '../../links/links.component'; -import { - IAM_COMPLEXITY_LINK, - IAM_LOGIN_POLICY_LINK, - IAM_PRIVATELABEL_LINK, - ORG_COMPLEXITY_LINK, - ORG_LOGIN_POLICY_LINK, - ORG_PRIVATELABEL_LINK, -} from '../../policy-grid/policy-links'; +import { GridPolicy, IAM_POLICY } from '../../policy-grid/policies'; import { PolicyComponentServiceType } from '../policy-component-types.enum'; @Component({ @@ -37,7 +29,8 @@ export class OrgIamPolicyComponent implements OnDestroy { private org!: Org.AsObject; public PolicyComponentServiceType: any = PolicyComponentServiceType; - public nextLinks: Array = []; + public currentPolicy: GridPolicy = IAM_POLICY; + constructor( private route: ActivatedRoute, private toast: ToastService, @@ -53,17 +46,6 @@ export class OrgIamPolicyComponent implements OnDestroy { this.serviceType = data.serviceType; if (this.serviceType === PolicyComponentServiceType.MGMT) { this.managementService = this.injector.get(ManagementService as Type); - this.nextLinks = [ - ORG_COMPLEXITY_LINK, - ORG_LOGIN_POLICY_LINK, - ORG_PRIVATELABEL_LINK, - ]; - } else { - this.nextLinks = [ - IAM_COMPLEXITY_LINK, - IAM_LOGIN_POLICY_LINK, - IAM_PRIVATELABEL_LINK, - ]; } return this.route.params; })).subscribe(_ => { diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts index 4fdfc19db1..a67af618ef 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts +++ b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.module.ts @@ -9,28 +9,28 @@ import { TranslateModule } from '@ngx-translate/core'; import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; import { InputModule } from 'src/app/modules/input/input.module'; -import { InfoSectionModule } from '../../info-section/info-section.module'; -import { LinksModule } from '../../links/links.module'; +import { InfoSectionModule } from '../../info-section/info-section.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; import { OrgIamPolicyRoutingModule } from './org-iam-policy-routing.module'; import { OrgIamPolicyComponent } from './org-iam-policy.component'; @NgModule({ - declarations: [OrgIamPolicyComponent], - imports: [ - OrgIamPolicyRoutingModule, - CommonModule, - FormsModule, - InputModule, - MatButtonModule, - MatSlideToggleModule, - MatIconModule, - HasRoleModule, - MatTooltipModule, - InfoSectionModule, - TranslateModule, - DetailLayoutModule, - LinksModule, - ], + declarations: [OrgIamPolicyComponent], + imports: [ + OrgIamPolicyRoutingModule, + CommonModule, + FormsModule, + InputModule, + MatButtonModule, + MatSlideToggleModule, + MatIconModule, + HasRoleModule, + MatTooltipModule, + InfoSectionModule, + TranslateModule, + DetailLayoutModule, + PolicyGridModule, + ], }) export class OrgIamPolicyModule { } diff --git a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.html b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.html index 9b093a419b..2366282ceb 100644 --- a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.html +++ b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.html @@ -66,5 +66,5 @@ }}
- + \ No newline at end of file diff --git a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.scss b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.scss index e0c121fb57..e2d8fe7de2 100644 --- a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.scss +++ b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.scss @@ -42,6 +42,7 @@ display: flex; justify-content: flex-end; width: 100%; + margin-bottom: 50px; button { margin-top: 3rem; diff --git a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts index b33c32c2b5..e87b8343ab 100644 --- a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts +++ b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts @@ -13,15 +13,7 @@ import { AdminService } from 'src/app/services/admin.service'; import { ManagementService } from 'src/app/services/mgmt.service'; import { ToastService } from 'src/app/services/toast.service'; -import { CnslLinks } from '../../links/links.component'; -import { - IAM_LOGIN_POLICY_LINK, - IAM_POLICY_LINK, - IAM_PRIVATELABEL_LINK, - ORG_IAM_POLICY_LINK, - ORG_LOGIN_POLICY_LINK, - ORG_PRIVATELABEL_LINK, -} from '../../policy-grid/policy-links'; +import { COMPLEXITY_POLICY, GridPolicy } from '../../policy-grid/policies'; import { PolicyComponentServiceType } from '../policy-component-types.enum'; @Component({ @@ -39,7 +31,8 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { public PolicyComponentServiceType: any = PolicyComponentServiceType; public loading: boolean = false; - public nextLinks: CnslLinks[] = []; + public currentPolicy: GridPolicy = COMPLEXITY_POLICY; + constructor( private route: ActivatedRoute, private toast: ToastService, @@ -51,19 +44,9 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { switch (this.serviceType) { case PolicyComponentServiceType.MGMT: this.service = this.injector.get(ManagementService as Type); - this.nextLinks = [ - ORG_IAM_POLICY_LINK, - ORG_LOGIN_POLICY_LINK, - ORG_PRIVATELABEL_LINK, - ]; break; case PolicyComponentServiceType.ADMIN: this.service = this.injector.get(AdminService as Type); - this.nextLinks = [ - IAM_POLICY_LINK, - IAM_LOGIN_POLICY_LINK, - IAM_PRIVATELABEL_LINK, - ]; break; } diff --git a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.module.ts b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.module.ts index 28c141df27..48f96d4e25 100644 --- a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.module.ts +++ b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.module.ts @@ -10,27 +10,27 @@ import { TranslateModule } from '@ngx-translate/core'; import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; import { InputModule } from 'src/app/modules/input/input.module'; -import { LinksModule } from '../../links/links.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; import { PasswordComplexityPolicyRoutingModule } from './password-complexity-policy-routing.module'; import { PasswordComplexityPolicyComponent } from './password-complexity-policy.component'; @NgModule({ - declarations: [PasswordComplexityPolicyComponent], - imports: [ - PasswordComplexityPolicyRoutingModule, - CommonModule, - FormsModule, - InputModule, - MatButtonModule, - MatSlideToggleModule, - MatIconModule, - HasRoleModule, - MatTooltipModule, - TranslateModule, - DetailLayoutModule, - MatProgressSpinnerModule, - LinksModule, - ], + declarations: [PasswordComplexityPolicyComponent], + imports: [ + PasswordComplexityPolicyRoutingModule, + CommonModule, + FormsModule, + InputModule, + MatButtonModule, + MatSlideToggleModule, + MatIconModule, + HasRoleModule, + MatTooltipModule, + TranslateModule, + DetailLayoutModule, + MatProgressSpinnerModule, + PolicyGridModule, + ], }) export class PasswordComplexityPolicyModule { } diff --git a/console/src/app/modules/policies/policy-component-types.enum.ts b/console/src/app/modules/policies/policy-component-types.enum.ts index 95e3359043..6d673bf830 100644 --- a/console/src/app/modules/policies/policy-component-types.enum.ts +++ b/console/src/app/modules/policies/policy-component-types.enum.ts @@ -5,7 +5,11 @@ export enum PolicyComponentType { IAM = 'iam', LOGIN = 'login', PRIVATELABEL = 'privatelabel', + MESSAGETEXTS = 'messagetexts', + LOGINTEXTS = 'logintexts', + PRIVACYPOLICY = 'privacypolicy', } + export enum PolicyComponentServiceType { MGMT = 'mgmt', ADMIN = 'admin', diff --git a/console/src/app/modules/policies/privacy-policy/privacy-policy-routing.module.ts b/console/src/app/modules/policies/privacy-policy/privacy-policy-routing.module.ts new file mode 100644 index 0000000000..dc9a51f762 --- /dev/null +++ b/console/src/app/modules/policies/privacy-policy/privacy-policy-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { PrivacyPolicyComponent } from './privacy-policy.component'; + +const routes: Routes = [ + { + path: '', + component: PrivacyPolicyComponent, + data: { + animation: 'DetailPage', + }, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class PrivacyPolicyRoutingModule { } diff --git a/console/src/app/modules/policies/privacy-policy/privacy-policy.component.html b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.html new file mode 100644 index 0000000000..908fe260a9 --- /dev/null +++ b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.html @@ -0,0 +1,37 @@ + + + + {{'FEATURES.NOTAVAILABLE' | translate: ({value: + 'privacy_policy'})}} + + +
+ +
+
+ + {{ 'POLICY.PRIVACY_POLICY.TOSLINK' | translate }} + + + + + {{ 'POLICY.PRIVACY_POLICY.POLICYLINK' | translate }} + + +
+
+ +
+ + +
+ + + +
diff --git a/console/src/app/modules/policies/privacy-policy/privacy-policy.component.scss b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.scss new file mode 100644 index 0000000000..8a18e531cf --- /dev/null +++ b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.scss @@ -0,0 +1,81 @@ +.spinner-wr { + margin: .5rem 0; +} + +.top-actions { + display: flex; + margin: 0 -.5rem; + flex-wrap: wrap; + + .keys { + flex: 1; + margin: 0 .5rem; + min-width: 150px; + } + + .language { + margin: 0 .5rem; + min-width: 150px; + + .lighter { + font-size: 12px; + color: var(--grey); + padding: 0 .5rem; + } + } +} + +.centerline { + display: flex; + align-items: center; +} + +.content { + padding-top: 1rem; +} + +.chips { + display: flex; + margin: 0 -.25rem; + + .chip { + border-radius: 50vw; + padding: 2px .5rem; + font-size: 12px; + background: #cbf4c9; + color: #0e6245; + margin: .25rem; + display: flex; + align-items: center; + justify-content: center; + z-index: 10; + } +} + +.divider { + width: 100%; + height: 1px; + background-color: rgba(#81868a, .5); + margin: 1.5rem 0 0 0; +} + +.actions { + display: flex; + justify-content: flex-end; + margin: 0 -.25rem; + + .save-button, + .reset-button { + display: block; + margin: 0 .25rem 3rem .25rem; + } + + .reset-button { + display: flex; + align-items: center; + + i { + margin-bottom: 3px; + } + } +} diff --git a/console/src/app/modules/policies/privacy-policy/privacy-policy.component.spec.ts b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.spec.ts new file mode 100644 index 0000000000..6b6a2aadd8 --- /dev/null +++ b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { LoginPolicyComponent } from './login-policy.component'; + +describe('LoginPolicyComponent', () => { + let component: LoginPolicyComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LoginPolicyComponent], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginPolicyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/modules/policies/privacy-policy/privacy-policy.component.ts b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.ts new file mode 100644 index 0000000000..12a0398ec2 --- /dev/null +++ b/console/src/app/modules/policies/privacy-policy/privacy-policy.component.ts @@ -0,0 +1,147 @@ +import { Component, Injector, OnDestroy, Type } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { MatDialog } from '@angular/material/dialog'; +import { ActivatedRoute } from '@angular/router'; +import { Subscription } from 'rxjs'; +import { switchMap } from 'rxjs/operators'; +import { + GetPrivacyPolicyResponse as AdminGetPrivacyPolicyResponse, + UpdatePrivacyPolicyRequest, +} from 'src/app/proto/generated/zitadel/admin_pb'; +import { + AddCustomPrivacyPolicyRequest, + GetPrivacyPolicyResponse, + UpdateCustomPrivacyPolicyRequest, +} from 'src/app/proto/generated/zitadel/management_pb'; +import { PrivacyPolicy } from 'src/app/proto/generated/zitadel/policy_pb'; +import { AdminService } from 'src/app/services/admin.service'; +import { ManagementService } from 'src/app/services/mgmt.service'; +import { ToastService } from 'src/app/services/toast.service'; + +import { CnslLinks } from '../../links/links.component'; +import { GridPolicy, PRIVACY_POLICY } from '../../policy-grid/policies'; +import { WarnDialogComponent } from '../../warn-dialog/warn-dialog.component'; +import { PolicyComponentServiceType } from '../policy-component-types.enum'; + +@Component({ + selector: 'app-privacy-policy', + templateUrl: './privacy-policy.component.html', + styleUrls: ['./privacy-policy.component.scss'], +}) +export class PrivacyPolicyComponent implements OnDestroy { + public service!: ManagementService | AdminService; + public PolicyComponentServiceType: any = PolicyComponentServiceType; + public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; + + public nextLinks: CnslLinks[] = []; + private sub: Subscription = new Subscription(); + + public privacyPolicy!: PrivacyPolicy.AsObject; + public form!: FormGroup; + public currentPolicy: GridPolicy = PRIVACY_POLICY; + + constructor( + private route: ActivatedRoute, + private injector: Injector, + private dialog: MatDialog, + private toast: ToastService, + private fb: FormBuilder, + ) { + + this.form = this.fb.group({ + tosLink: ['', []], + privacyLink: ['', []], + }); + + this.route.data.pipe(switchMap(data => { + this.serviceType = data.serviceType; + switch (this.serviceType) { + case PolicyComponentServiceType.MGMT: + this.service = this.injector.get(ManagementService as Type); + this.loadData(); + break; + case PolicyComponentServiceType.ADMIN: + this.service = this.injector.get(AdminService as Type); + this.loadData(); + break; + } + + return this.route.params; + })).subscribe(); + } + + public async loadData(): Promise { + const getData = (): + Promise => { + return (this.service as AdminService).getPrivacyPolicy(); + }; + + getData().then(resp => { + if (resp.policy) { + this.privacyPolicy = resp.policy; + this.form.patchValue(this.privacyPolicy); + } + }); + } + + public saveCurrentMessage(): void { + console.log(this.form.get('privacyLink')?.value, this.form.get('tosLink')?.value); + if (this.serviceType === PolicyComponentServiceType.MGMT) { + if ((this.privacyPolicy as PrivacyPolicy.AsObject).isDefault) { + const req = new AddCustomPrivacyPolicyRequest(); + req.setPrivacyLink(this.form.get('privacyLink')?.value); + req.setTosLink(this.form.get('tosLink')?.value); + (this.service as ManagementService).addCustomPrivacyPolicy(req).then(() => { + this.toast.showInfo('POLICY.PRIVACY_POLICY.SAVED', true); + }).catch(error => this.toast.showError(error)); + } else { + const req = new UpdateCustomPrivacyPolicyRequest(); + req.setPrivacyLink(this.form.get('privacyLink')?.value); + req.setTosLink(this.form.get('tosLink')?.value); + (this.service as ManagementService).updateCustomPrivacyPolicy(req).then(() => { + this.toast.showInfo('POLICY.PRIVACY_POLICY.SAVED', true); + }).catch(error => this.toast.showError(error)); + } + + } else if (this.serviceType === PolicyComponentServiceType.ADMIN) { + const req = new UpdatePrivacyPolicyRequest(); + req.setPrivacyLink(this.form.get('privacyLink')?.value); + req.setTosLink(this.form.get('tosLink')?.value); + + (this.service as AdminService).updatePrivacyPolicy(req).then(() => { + this.toast.showInfo('POLICY.PRIVACY_POLICY.SAVED', true); + }).catch(error => this.toast.showError(error)); + } + } + + public resetDefault(): void { + const dialogRef = this.dialog.open(WarnDialogComponent, { + data: { + icon: 'las la-history', + confirmKey: 'ACTIONS.RESTORE', + cancelKey: 'ACTIONS.CANCEL', + titleKey: 'POLICY.PRIVACY_POLICY.RESET_TITLE', + descriptionKey: 'POLICY.PRIVACY_POLICY.RESET_DESCRIPTION', + }, + width: '400px', + }); + + dialogRef.afterClosed().subscribe(resp => { + if (resp) { + if (this.serviceType === PolicyComponentServiceType.MGMT) { + (this.service as ManagementService).resetPrivacyPolicyToDefault().then(() => { + setTimeout(() => { + this.loadData(); + }, 1000); + }).catch(error => { + this.toast.showError(error); + }); + } + } + }); + } + + public ngOnDestroy(): void { + this.sub.unsubscribe(); + } +} diff --git a/console/src/app/modules/policies/privacy-policy/privacy-policy.module.ts b/console/src/app/modules/policies/privacy-policy/privacy-policy.module.ts new file mode 100644 index 0000000000..38851ac6e0 --- /dev/null +++ b/console/src/app/modules/policies/privacy-policy/privacy-policy.module.ts @@ -0,0 +1,52 @@ +import { TextFieldModule } from '@angular/cdk/text-field'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatIconModule } from '@angular/material/icon'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TranslateModule } from '@ngx-translate/core'; + +import { HasRoleModule } from '../../../directives/has-role/has-role.module'; +import { DetailLayoutModule } from '../../../modules/detail-layout/detail-layout.module'; +import { InputModule } from '../../../modules/input/input.module'; +import { HasFeaturePipeModule } from '../../../pipes/has-feature-pipe/has-feature-pipe.module'; +import { HasRolePipeModule } from '../../../pipes/has-role-pipe/has-role-pipe.module'; +import { FormFieldModule } from '../../form-field/form-field.module'; +import { InfoSectionModule } from '../../info-section/info-section.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; +import { WarnDialogModule } from '../../warn-dialog/warn-dialog.module'; +import { PrivacyPolicyRoutingModule } from './privacy-policy-routing.module'; +import { PrivacyPolicyComponent } from './privacy-policy.component'; + +@NgModule({ + declarations: [PrivacyPolicyComponent], + imports: [ + PrivacyPolicyRoutingModule, + MatSelectModule, + CommonModule, + InfoSectionModule, + ReactiveFormsModule, + FormsModule, + InputModule, + FormFieldModule, + MatButtonModule, + HasFeaturePipeModule, + MatIconModule, + HasRoleModule, + HasRolePipeModule, + MatTooltipModule, + TranslateModule, + MatTooltipModule, + DetailLayoutModule, + MatProgressSpinnerModule, + TextFieldModule, + MatDialogModule, + WarnDialogModule, + PolicyGridModule, + ], +}) +export class PrivacyPolicyModule { } diff --git a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.html b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.html index df1c094e36..84e5fa2c75 100644 --- a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.html +++ b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.html @@ -279,5 +279,5 @@
- + \ No newline at end of file diff --git a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.scss b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.scss index 8bf769b415..3432162a8a 100644 --- a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.scss +++ b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.scss @@ -453,3 +453,8 @@ } } } + +.grid { + display: block; + margin: 50px 0; +} diff --git a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts index f1134e0fc4..5cf035c0ee 100644 --- a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts +++ b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts @@ -24,15 +24,7 @@ import { ManagementService } from 'src/app/services/mgmt.service'; import { StorageService } from 'src/app/services/storage.service'; import { ToastService } from 'src/app/services/toast.service'; -import { CnslLinks } from '../../links/links.component'; -import { - IAM_COMPLEXITY_LINK, - IAM_LOGIN_POLICY_LINK, - IAM_POLICY_LINK, - ORG_COMPLEXITY_LINK, - ORG_IAM_POLICY_LINK, - ORG_LOGIN_POLICY_LINK, -} from '../../policy-grid/policy-links'; +import { GridPolicy, PRIVATELABEL_POLICY } from '../../policy-grid/policies'; import { PolicyComponentServiceType } from '../policy-component-types.enum'; export enum Theme { @@ -85,11 +77,6 @@ export class PrivateLabelingPolicyComponent implements OnDestroy { public PolicyComponentServiceType: any = PolicyComponentServiceType; public loading: boolean = false; - public nextLinks: CnslLinks[] = [ - IAM_COMPLEXITY_LINK, - IAM_POLICY_LINK, - IAM_LOGIN_POLICY_LINK, - ]; public Theme: any = Theme; public Preview: any = Preview; @@ -99,7 +86,7 @@ export class PrivateLabelingPolicyComponent implements OnDestroy { public refreshPreview: EventEmitter = new EventEmitter(); public loadingImages: boolean = false; private org!: Org.AsObject; - + public currentPolicy: GridPolicy = PRIVATELABEL_POLICY; constructor( private authService: GrpcAuthService, private route: ActivatedRoute, @@ -121,19 +108,9 @@ export class PrivateLabelingPolicyComponent implements OnDestroy { switch (this.serviceType) { case PolicyComponentServiceType.MGMT: this.service = this.injector.get(ManagementService as Type); - this.nextLinks = [ - ORG_IAM_POLICY_LINK, - ORG_LOGIN_POLICY_LINK, - ORG_COMPLEXITY_LINK, - ]; break; case PolicyComponentServiceType.ADMIN: this.service = this.injector.get(AdminService as Type); - this.nextLinks = [ - IAM_POLICY_LINK, - IAM_LOGIN_POLICY_LINK, - IAM_COMPLEXITY_LINK, - ]; break; } diff --git a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.module.ts b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.module.ts index 467140e631..e1714a1da2 100644 --- a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.module.ts +++ b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.module.ts @@ -17,7 +17,7 @@ import { DropzoneModule } from '../../../directives/dropzone/dropzone.module'; import { DetailLayoutModule } from '../../detail-layout/detail-layout.module'; import { InfoSectionModule } from '../../info-section/info-section.module'; import { InputModule } from '../../input/input.module'; -import { LinksModule } from '../../links/links.module'; +import { PolicyGridModule } from '../../policy-grid/policy-grid.module'; import { ColorComponent } from './color/color.component'; import { PreviewComponent } from './preview/preview.component'; import { PrivateLabelingPolicyRoutingModule } from './private-labeling-policy-routing.module'; @@ -45,7 +45,7 @@ import { PrivateLabelingPolicyComponent } from './private-labeling-policy.compon DetailLayoutModule, DropzoneModule, MatProgressSpinnerModule, - LinksModule, + PolicyGridModule, MatExpansionModule, InfoSectionModule, HasFeaturePipeModule, diff --git a/console/src/app/modules/policy-grid/policies.ts b/console/src/app/modules/policy-grid/policies.ts new file mode 100644 index 0000000000..8363a58d8e --- /dev/null +++ b/console/src/app/modules/policy-grid/policies.ts @@ -0,0 +1,108 @@ +import { PolicyComponentType } from '../policies/policy-component-types.enum'; + +export interface GridPolicy { + i18nTitle: string; + i18nDesc: string; + iamRouterLink: any; + orgRouterLink: any; + iamWithRole: string[]; + orgWithRole: string[]; + tags: string[]; + icon?: string; + svgIcon?: string; + color: string; +} + +export const COMPLEXITY_POLICY: GridPolicy = { + i18nTitle: 'POLICY.PWD_COMPLEXITY.TITLE', + i18nDesc: 'POLICY.PWD_COMPLEXITY.DESCRIPTION', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.COMPLEXITY], + orgRouterLink: ['/org', 'policy', PolicyComponentType.COMPLEXITY], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['policy.read'], + tags: ['login', 'security'], + svgIcon: 'mdi_textbox_password', + color: 'yellow', +}; + +export const IAM_POLICY = { + i18nTitle: 'POLICY.IAM_POLICY.TITLE', + i18nDesc: 'POLICY.IAM_POLICY.DESCRIPTION', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.IAM], + orgRouterLink: ['/org', 'policy', PolicyComponentType.IAM], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['iam.policy.read'], + tags: ['login'], + icon: 'las la-gem', + color: 'purple', +}; + +export const LOGIN_POLICY = { + i18nTitle: 'POLICY.LOGIN_POLICY.TITLE', + i18nDesc: 'POLICY.LOGIN_POLICY.DESCRIPTION', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.LOGIN], + orgRouterLink: ['/org', 'policy', PolicyComponentType.LOGIN], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['policy.read'], + tags: ['login', 'security'], + icon: 'las la-sign-in-alt', + color: 'green', +}; + +export const PRIVATELABEL_POLICY = { + i18nTitle: 'POLICY.PRIVATELABELING.TITLE', + i18nDesc: 'POLICY.PRIVATELABELING.DESCRIPTION', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.PRIVATELABEL], + orgRouterLink: ['/org', 'policy', PolicyComponentType.PRIVATELABEL], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['policy.read'], + tags: ['login', 'appearance'], + icon: 'las la-sign-in-alt', + color: 'blue', +}; + +export const PRIVACY_POLICY = { + i18nTitle: 'POLICY.PRIVACY_POLICY.TITLE', + i18nDesc: 'POLICY.PRIVACY_POLICY.DESCRIPTION', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.PRIVACYPOLICY], + orgRouterLink: ['/org', 'policy', PolicyComponentType.PRIVACYPOLICY], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['policy.read'], + tags: ['documents', 'text'], + icon: 'las la-file-contract', + color: 'black', +}; + +export const MESSAGE_TEXTS_POLICY = { + i18nTitle: 'POLICY.MESSAGE_TEXTS.TITLE', + i18nDesc: 'POLICY.MESSAGE_TEXTS.DESCRIPTION', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.MESSAGETEXTS], + orgRouterLink: ['/org', 'policy', PolicyComponentType.MESSAGETEXTS], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['policy.read'], + tags: ['appearance', 'text'], + icon: 'las la-paragraph', + color: 'red', +}; + +export const LOGIN_TEXTS_POLICY = { + i18nTitle: 'POLICY.LOGIN_TEXTS.TITLE', + i18nDesc: 'POLICY.LOGIN_TEXTS.DESCRIPTION_SHORT', + iamRouterLink: ['/iam', 'policy', PolicyComponentType.LOGINTEXTS], + orgRouterLink: ['/org', 'policy', PolicyComponentType.LOGINTEXTS], + iamWithRole: ['iam.policy.read'], + orgWithRole: ['policy.read'], + tags: ['appearance', 'text'], + icon: 'las la-paragraph', + color: 'red', +}; + +export const POLICIES: GridPolicy[] = [ + COMPLEXITY_POLICY, + IAM_POLICY, + LOGIN_POLICY, + PRIVATELABEL_POLICY, + PRIVACY_POLICY, + MESSAGE_TEXTS_POLICY, + LOGIN_TEXTS_POLICY, +]; diff --git a/console/src/app/modules/policy-grid/policy-grid.component.html b/console/src/app/modules/policy-grid/policy-grid.component.html index 93b7554c36..673408b75a 100644 --- a/console/src/app/modules/policy-grid/policy-grid.component.html +++ b/console/src/app/modules/policy-grid/policy-grid.component.html @@ -2,128 +2,36 @@

{{'POLICY.DESCRIPTION' | translate}}

+
+ {{tag}} +
+
+ + [appHasRole]="type == PolicyComponentServiceType.ADMIN ? policy.iamWithRole : type == PolicyComponentServiceType.MGMT ? policy.orgWithRole : []">
-
- +
+ +
- {{'POLICY.PWD_COMPLEXITY.TITLE' | translate}} - + {{policy.i18nTitle | translate}}

- {{'POLICY.PWD_COMPLEXITY.DESCRIPTION' | translate}}

- -
- - - - - - - -
+ {{policy.i18nDesc | translate}}

+
+ {{tag}} +
- - -
-
- -
-
- {{'POLICY.IAM_POLICY.TITLE' | translate}} - -
- -

- {{'POLICY.IAM_POLICY.DESCRIPTION' | translate}}

- - -
- - - -
-
-
- - -
-
- -
-
- {{'POLICY.PRIVATELABELING_POLICY.TITLE' | translate}} - -
- -

- {{'POLICY.PRIVATELABELING_POLICY.DESCRIPTION' | translate}}

- - - -
- - - -
-
-
- - -
-
- -
-
- {{'POLICY.LOGIN_POLICY.TITLE' | translate}} - -
- -

- {{'POLICY.LOGIN_POLICY.DESCRIPTION' | translate}}

- - -
- - - -
-
-
+
diff --git a/console/src/app/modules/policy-grid/policy-grid.component.scss b/console/src/app/modules/policy-grid/policy-grid.component.scss index 08b5a8150a..2856f8ecdc 100644 --- a/console/src/app/modules/policy-grid/policy-grid.component.scss +++ b/console/src/app/modules/policy-grid/policy-grid.component.scss @@ -10,14 +10,41 @@ h2 { font-size: 14px; } -.row-lyt { +.tags { display: flex; flex-wrap: wrap; - margin: 0 -.5rem; + align-items: center; + margin: 0 -.5rem 1rem -.5rem; + + .tag { + display: flex; + align-items: center; + margin: 0 .5rem; + cursor: pointer; + + &:hover, + &.active { + color: var(--color-main); + } + } +} + +.row-lyt { + margin: 0; + display: grid; + row-gap: 1rem; + column-gap: 1rem; + grid-template-columns: 1fr 1fr 1fr; + + @media only screen and (max-width: 1300px) { + grid-template-columns: 1fr 1fr; + } + + @media only screen and (max-width: 450px) { + grid-template-columns: 1fr; + } .p-item { - flex-basis: 290px; - margin: .5rem; display: flex; flex-direction: column; min-height: 250px; @@ -33,11 +60,35 @@ h2 { height: 60px; width: 60px; border-radius: 50%; - background: linear-gradient(40deg, rgb(129, 85, 185) 30%, #7b8ada); display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; + background: linear-gradient(40deg, rgb(129, 85, 185) 30%, #7b8ada); + + &.purple { + background: linear-gradient(40deg, #7c3aed 30%, #6d28d9); + } + + &.red { + background: linear-gradient(40deg, #dc2626 30%, #db2777); + } + + &.green { + background: linear-gradient(40deg, #059669 30%, #047857); + } + + &.blue { + background: linear-gradient(40deg, #3b82f6 30%, #4f46e5); + } + + &.yellow { + background: linear-gradient(40deg, #f59e0b 30%, #b45309); + } + + &.black { + background: linear-gradient(40deg, #1f2937, #111827); + } .icon, i { @@ -83,6 +134,17 @@ h2 { flex: 1; } + .tags { + .tag { + color: var(--grey); + font-size: 12px; + + i { + font-size: 18px; + } + } + } + .btn-wrapper { display: flex; } diff --git a/console/src/app/modules/policy-grid/policy-grid.component.ts b/console/src/app/modules/policy-grid/policy-grid.component.ts index 729e089cb6..a55c397a1b 100644 --- a/console/src/app/modules/policy-grid/policy-grid.component.ts +++ b/console/src/app/modules/policy-grid/policy-grid.component.ts @@ -1,41 +1,29 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { PolicyComponentType } from 'src/app/modules/policies/policy-component-types.enum'; -import { PasswordComplexityPolicy } from 'src/app/proto/generated/zitadel/policy_pb'; -import { AdminService } from 'src/app/services/admin.service'; -import { ManagementService } from 'src/app/services/mgmt.service'; +import { Component, Input } from '@angular/core'; +import { PolicyComponentServiceType, PolicyComponentType } from 'src/app/modules/policies/policy-component-types.enum'; -export enum PolicyGridType { - ORG, - IAM, -} +import { GridPolicy, POLICIES } from './policies'; @Component({ - selector: 'app-policy-grid', - templateUrl: './policy-grid.component.html', - styleUrls: ['./policy-grid.component.scss'], + selector: 'app-policy-grid', + templateUrl: './policy-grid.component.html', + styleUrls: ['./policy-grid.component.scss'], }) -export class PolicyGridComponent implements OnInit { - @Input() public type!: PolicyGridType; - public PolicyComponentType: any = PolicyComponentType; - public PolicyGridType: any = PolicyGridType; +export class PolicyGridComponent { + @Input() public type!: PolicyComponentServiceType; + @Input() public tag: string = ''; + public PolicyComponentType: any = PolicyComponentType; + public PolicyComponentServiceType: any = PolicyComponentServiceType; + public POLICIES: GridPolicy[] = POLICIES; + public tags: Set = new Set(POLICIES.map(p => p.tags).flat()); - public complexityPolicy!: PasswordComplexityPolicy.AsObject; + @Input() public tagForFilter: string = ''; + @Input() public currentPolicy!: GridPolicy; - constructor(private mgmtService: ManagementService, private adminService: AdminService) { } - - public ngOnInit(): void { - if (this.type === PolicyGridType.ORG) { - this.mgmtService.getPasswordComplexityPolicy().then((resp) => { - if (resp.policy) { - this.complexityPolicy = resp.policy; - } - }); - } else if (this.type === PolicyGridType.IAM) { - this.adminService.getPasswordComplexityPolicy().then((resp) => { - if (resp.policy) { - this.complexityPolicy = resp.policy; - } - }); - } + public get filteredPolicies(): GridPolicy[] { + if (this.tagForFilter) { + return POLICIES.filter(p => p !== this.currentPolicy && p.tags.includes(this.tagForFilter)); + } else { + return POLICIES.filter(p => p !== this.currentPolicy); } + } } diff --git a/console/src/app/modules/policy-grid/policy-links.ts b/console/src/app/modules/policy-grid/policy-links.ts deleted file mode 100644 index ada0a621f4..0000000000 --- a/console/src/app/modules/policy-grid/policy-links.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { PolicyComponentType } from '../policies/policy-component-types.enum'; - -export const IAM_COMPLEXITY_LINK = { - i18nTitle: 'POLICY.PWD_COMPLEXITY.TITLE', - i18nDesc: 'POLICY.PWD_COMPLEXITY.DESCRIPTION', - routerLink: ['/iam', 'policy', PolicyComponentType.COMPLEXITY], - withRole: ['iam.policy.read'], -}; - -export const IAM_POLICY_LINK = { - i18nTitle: 'POLICY.IAM_POLICY.TITLE', - i18nDesc: 'POLICY.IAM_POLICY.DESCRIPTION', - routerLink: ['/iam', 'policy', PolicyComponentType.IAM], - withRole: ['iam.policy.read'], -}; - -export const IAM_LOGIN_POLICY_LINK = { - i18nTitle: 'POLICY.LOGIN_POLICY.TITLE', - i18nDesc: 'POLICY.LOGIN_POLICY.DESCRIPTION', - routerLink: ['/iam', 'policy', PolicyComponentType.LOGIN], - withRole: ['iam.policy.read'], -}; - -export const IAM_PRIVATELABEL_LINK = { - i18nTitle: 'POLICY.PRIVATELABELING.TITLE', - i18nDesc: 'POLICY.PRIVATELABELING.DESCRIPTION', - routerLink: ['/iam', 'policy', PolicyComponentType.PRIVATELABEL], - withRole: ['iam.policy.read'], -}; - -export const ORG_COMPLEXITY_LINK = { - i18nTitle: 'POLICY.PWD_COMPLEXITY.TITLE', - i18nDesc: 'POLICY.PWD_COMPLEXITY.DESCRIPTION', - routerLink: ['/org', 'policy', PolicyComponentType.COMPLEXITY], - withRole: ['policy.read'], -}; - -export const ORG_IAM_POLICY_LINK = { - i18nTitle: 'POLICY.IAM_POLICY.TITLE', - i18nDesc: 'POLICY.IAM_POLICY.DESCRIPTION', - routerLink: ['/org', 'policy', PolicyComponentType.IAM], - withRole: ['iam.policy.read'], -}; - -export const ORG_LOGIN_POLICY_LINK = { - i18nTitle: 'POLICY.LOGIN_POLICY.TITLE', - i18nDesc: 'POLICY.LOGIN_POLICY.DESCRIPTION', - routerLink: ['/org', 'policy', PolicyComponentType.LOGIN], - withRole: ['policy.read'], -}; - - -export const ORG_PRIVATELABEL_LINK = { - i18nTitle: 'POLICY.PRIVATELABELING.TITLE', - i18nDesc: 'POLICY.PRIVATELABELING.DESCRIPTION', - routerLink: ['/org', 'policy', PolicyComponentType.PRIVATELABEL], - withRole: ['policy.read'], -}; diff --git a/console/src/app/modules/warn-dialog/warn-dialog.component.html b/console/src/app/modules/warn-dialog/warn-dialog.component.html index 5674b88c9b..97d0f484e7 100644 --- a/console/src/app/modules/warn-dialog/warn-dialog.component.html +++ b/console/src/app/modules/warn-dialog/warn-dialog.component.html @@ -1,13 +1,16 @@ {{data.titleKey | translate: data.titleParam}}
-

{{data.descriptionKey | translate: data.descriptionParam}}

+
+ +
+

{{data.descriptionKey | translate: data.descriptionParam}}

- - - + + +
\ No newline at end of file diff --git a/console/src/app/modules/warn-dialog/warn-dialog.component.scss b/console/src/app/modules/warn-dialog/warn-dialog.component.scss index b12329dcd5..8655513096 100644 --- a/console/src/app/modules/warn-dialog/warn-dialog.component.scss +++ b/console/src/app/modules/warn-dialog/warn-dialog.component.scss @@ -3,6 +3,18 @@ margin-top: 0; } +.icon-wrapper { + display: flex; + justify-content: center; + padding: 1rem; + margin: 1rem; + align-items: center; + + .icon { + font-size: 3rem; + } +} + .desc { color: var(--grey); font-size: .9rem; diff --git a/console/src/app/pages/home/home.component.html b/console/src/app/pages/home/home.component.html index 25e02fbb22..57be09be80 100644 --- a/console/src/app/pages/home/home.component.html +++ b/console/src/app/pages/home/home.component.html @@ -1,24 +1,7 @@
-
- - -

- {{'HOME.WELCOME' | translate}}, - {{user?.human?.profile?.displayName ? user.human?.profile?.displayName : (user.human?.profile?.firstName + ' - '+ user.human?.profile?.lastName)}}

-

{{user?.human?.profile?.userName}}

- +
+

{{'HOME.WELCOME' | translate}}

{{'HOME.WELCOMESENTENCE' | translate}}

- - -
diff --git a/console/src/app/pages/home/home.component.scss b/console/src/app/pages/home/home.component.scss index 0260583329..f9e33b72a3 100644 --- a/console/src/app/pages/home/home.component.scss +++ b/console/src/app/pages/home/home.component.scss @@ -1,4 +1,3 @@ - .wrapper { padding-bottom: 100px; position: relative; @@ -6,24 +5,17 @@ .header { display: flex; flex-direction: column; - margin-bottom: 4rem; - align-items: center; + margin-bottom: 2rem; - h3 { + .title { font-size: 24px; margin-bottom: 1rem; - text-align: center; } .wlc_stnce { color: var(--grey); font-size: 16px; } - - .avatar { - outline: none; - cursor: pointer; - } } .container { @@ -74,7 +66,7 @@ } .onboard { - background: linear-gradient(40deg, rgb(80, 66, 121), rgb(177, 59, 122), rgb(225, 53, 81), rgb(230, 107, 86)); + background: linear-gradient(40deg, rgb(177, 59, 122), rgb(225, 53, 81), rgb(230, 107, 86)); p { color: #fad6e3; @@ -82,7 +74,7 @@ } .quickstart { - background: linear-gradient(30deg, #2283a6, #6c8f59); + background: linear-gradient(40deg, #047857, #059669); p { color: #d6f3fa; diff --git a/console/src/app/pages/iam/iam-routing.module.ts b/console/src/app/pages/iam/iam-routing.module.ts index 6a067367d9..2f1514cba9 100644 --- a/console/src/app/pages/iam/iam-routing.module.ts +++ b/console/src/app/pages/iam/iam-routing.module.ts @@ -116,6 +116,30 @@ const routes: Routes = [ loadChildren: () => import('src/app/modules/policies/login-policy/login-policy.module') .then(m => m.LoginPolicyModule), }, + { + path: PolicyComponentType.MESSAGETEXTS, + data: { + serviceType: PolicyComponentServiceType.ADMIN, + }, + loadChildren: () => import('src/app/modules/policies/message-texts/message-texts.module') + .then(m => m.MessageTextsPolicyModule), + }, + { + path: PolicyComponentType.LOGINTEXTS, + data: { + serviceType: PolicyComponentServiceType.ADMIN, + }, + loadChildren: () => import('src/app/modules/policies/login-texts/login-texts.module') + .then(m => m.LoginTextsPolicyModule), + }, + { + path: PolicyComponentType.PRIVACYPOLICY, + data: { + serviceType: PolicyComponentServiceType.ADMIN, + }, + loadChildren: () => import('src/app/modules/policies/privacy-policy/privacy-policy.module') + .then(m => m.PrivacyPolicyModule), + }, ], }, ]; diff --git a/console/src/app/pages/iam/iam.component.html b/console/src/app/pages/iam/iam.component.html index c9f2b67428..150a740375 100644 --- a/console/src/app/pages/iam/iam.component.html +++ b/console/src/app/pages/iam/iam.component.html @@ -7,7 +7,7 @@

{{'FEATURES.DESCRIPTION' | translate}}

- +
diff --git a/console/src/app/pages/iam/iam.component.ts b/console/src/app/pages/iam/iam.component.ts index 852dcb033a..d011fe1a0a 100644 --- a/console/src/app/pages/iam/iam.component.ts +++ b/console/src/app/pages/iam/iam.component.ts @@ -5,7 +5,6 @@ import { BehaviorSubject, from, Observable, of } from 'rxjs'; import { catchError, finalize, map } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum'; -import { PolicyGridType } from 'src/app/modules/policy-grid/policy-grid.component'; import { Features } from 'src/app/proto/generated/zitadel/features_pb'; import { Member } from 'src/app/proto/generated/zitadel/member_pb'; import { User } from 'src/app/proto/generated/zitadel/user_pb'; @@ -25,7 +24,6 @@ export class IamComponent { public membersSubject: BehaviorSubject = new BehaviorSubject([]); - public PolicyGridType: any = PolicyGridType; public features!: Features.AsObject; constructor(public adminService: AdminService, private dialog: MatDialog, private toast: ToastService, diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.html b/console/src/app/pages/orgs/org-detail/org-detail.component.html index 8885019bc1..1c5f0f85a5 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.html +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.html @@ -48,7 +48,7 @@ - +
diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.ts b/console/src/app/pages/orgs/org-detail/org-detail.component.ts index 7c728f5705..45f1eda49b 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.ts +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.ts @@ -8,7 +8,6 @@ import { catchError, finalize, map } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { ChangeType } from 'src/app/modules/changes/changes.component'; import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum'; -import { PolicyGridType } from 'src/app/modules/policy-grid/policy-grid.component'; import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component'; import { Features } from 'src/app/proto/generated/zitadel/features_pb'; import { Member } from 'src/app/proto/generated/zitadel/member_pb'; @@ -42,8 +41,6 @@ export class OrgDetailComponent implements OnInit { public totalMemberResult: number = 0; public membersSubject: BehaviorSubject = new BehaviorSubject([]); - public PolicyGridType: any = PolicyGridType; - public features!: Features.AsObject; constructor( diff --git a/console/src/app/pages/orgs/orgs-routing.module.ts b/console/src/app/pages/orgs/orgs-routing.module.ts index 8a25d68b6e..2fb50b5829 100644 --- a/console/src/app/pages/orgs/orgs-routing.module.ts +++ b/console/src/app/pages/orgs/orgs-routing.module.ts @@ -100,6 +100,30 @@ const routes: Routes = [ loadChildren: () => import('src/app/modules/policies/login-policy/login-policy.module') .then(m => m.LoginPolicyModule), }, + { + path: PolicyComponentType.MESSAGETEXTS, + data: { + serviceType: PolicyComponentServiceType.MGMT, + }, + loadChildren: () => import('src/app/modules/policies/message-texts/message-texts.module') + .then(m => m.MessageTextsPolicyModule), + }, + { + path: PolicyComponentType.LOGINTEXTS, + data: { + serviceType: PolicyComponentServiceType.MGMT, + }, + loadChildren: () => import('src/app/modules/policies/login-texts/login-texts.module') + .then(m => m.LoginTextsPolicyModule), + }, + { + path: PolicyComponentType.PRIVACYPOLICY, + data: { + serviceType: PolicyComponentServiceType.MGMT, + }, + loadChildren: () => import('src/app/modules/policies/privacy-policy/privacy-policy.module') + .then(m => m.PrivacyPolicyModule), + }, ], }, { diff --git a/console/src/app/pages/users/user-detail/detail-form/detail-form.module.ts b/console/src/app/pages/users/user-detail/detail-form/detail-form.module.ts index 2e168910d1..790aae7cdd 100644 --- a/console/src/app/pages/users/user-detail/detail-form/detail-form.module.ts +++ b/console/src/app/pages/users/user-detail/detail-form/detail-form.module.ts @@ -6,7 +6,6 @@ import { MatIconModule } from '@angular/material/icon'; import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; import { TranslateModule } from '@ngx-translate/core'; -import { ImageCropperModule } from 'ngx-image-cropper'; import { DropzoneModule } from 'src/app/directives/dropzone/dropzone.module'; import { AvatarModule } from 'src/app/modules/avatar/avatar.module'; import { InputModule } from 'src/app/modules/input/input.module'; @@ -25,7 +24,6 @@ import { ProfilePictureComponent } from './profile-picture/profile-picture.compo CommonModule, FormsModule, ReactiveFormsModule, - ImageCropperModule, TranslateModule, MatSelectModule, MatButtonModule, diff --git a/console/src/app/services/admin.service.ts b/console/src/app/services/admin.service.ts index 61155a54b1..0158a521a1 100644 --- a/console/src/app/services/admin.service.ts +++ b/console/src/app/services/admin.service.ts @@ -19,10 +19,34 @@ import { ClearViewResponse, DeactivateIDPRequest, DeactivateIDPResponse, + GetCustomDomainClaimedMessageTextRequest, + GetCustomDomainClaimedMessageTextResponse, + GetCustomInitMessageTextRequest, + GetCustomInitMessageTextResponse, + GetCustomLoginTextsRequest, + GetCustomLoginTextsResponse, GetCustomOrgIAMPolicyRequest, GetCustomOrgIAMPolicyResponse, + GetCustomPasswordResetMessageTextRequest, + GetCustomPasswordResetMessageTextResponse, + GetCustomVerifyEmailMessageTextRequest, + GetCustomVerifyEmailMessageTextResponse, + GetCustomVerifyPhoneMessageTextRequest, + GetCustomVerifyPhoneMessageTextResponse, + GetDefaultDomainClaimedMessageTextRequest, + GetDefaultDomainClaimedMessageTextResponse, GetDefaultFeaturesRequest, GetDefaultFeaturesResponse, + GetDefaultInitMessageTextRequest, + GetDefaultInitMessageTextResponse, + GetDefaultLoginTextsRequest, + GetDefaultLoginTextsResponse, + GetDefaultPasswordResetMessageTextRequest, + GetDefaultPasswordResetMessageTextResponse, + GetDefaultVerifyEmailMessageTextRequest, + GetDefaultVerifyEmailMessageTextResponse, + GetDefaultVerifyPhoneMessageTextRequest, + GetDefaultVerifyPhoneMessageTextResponse, GetIDPByIDRequest, GetIDPByIDResponse, GetLabelPolicyRequest, @@ -41,6 +65,10 @@ import { GetPasswordLockoutPolicyResponse, GetPreviewLabelPolicyRequest, GetPreviewLabelPolicyResponse, + GetPrivacyPolicyRequest, + GetPrivacyPolicyResponse, + GetSupportedLanguagesRequest, + GetSupportedLanguagesResponse, IDPQuery, ListFailedEventsRequest, ListFailedEventsResponse, @@ -82,12 +110,26 @@ import { RemoveMultiFactorFromLoginPolicyResponse, RemoveSecondFactorFromLoginPolicyRequest, RemoveSecondFactorFromLoginPolicyResponse, + ResetCustomLoginTextsToDefaultRequest, + ResetCustomLoginTextsToDefaultResponse, ResetCustomOrgIAMPolicyToDefaultRequest, ResetCustomOrgIAMPolicyToDefaultResponse, ResetOrgFeaturesRequest, ResetOrgFeaturesResponse, + SetCustomLoginTextsRequest, + SetCustomLoginTextsResponse, + SetDefaultDomainClaimedMessageTextRequest, + SetDefaultDomainClaimedMessageTextResponse, SetDefaultFeaturesRequest, SetDefaultFeaturesResponse, + SetDefaultInitMessageTextRequest, + SetDefaultInitMessageTextResponse, + SetDefaultPasswordResetMessageTextRequest, + SetDefaultPasswordResetMessageTextResponse, + SetDefaultVerifyEmailMessageTextRequest, + SetDefaultVerifyEmailMessageTextResponse, + SetDefaultVerifyPhoneMessageTextRequest, + SetDefaultVerifyPhoneMessageTextResponse, SetOrgFeaturesRequest, SetOrgFeaturesResponse, SetUpOrgRequest, @@ -112,6 +154,8 @@ import { UpdatePasswordComplexityPolicyResponse, UpdatePasswordLockoutPolicyRequest, UpdatePasswordLockoutPolicyResponse, + UpdatePrivacyPolicyRequest, + UpdatePrivacyPolicyResponse, } from '../proto/generated/zitadel/admin_pb'; import { SearchQuery } from '../proto/generated/zitadel/member_pb'; import { ListQuery } from '../proto/generated/zitadel/object_pb'; @@ -123,6 +167,114 @@ import { GrpcService } from './grpc.service'; export class AdminService { constructor(private readonly grpcService: GrpcService) { } + + public getSupportedLanguages(): Promise { + const req = new GetSupportedLanguagesRequest(); + return this.grpcService.admin.getSupportedLanguages(req, null).then(resp => resp.toObject()); + } + + public getDefaultLoginTexts(req: GetDefaultLoginTextsRequest): + Promise { + return this.grpcService.admin.getDefaultLoginTexts(req, null).then(resp => resp.toObject()); + } + + public getCustomLoginTexts(req: GetCustomLoginTextsRequest): + Promise { + return this.grpcService.admin.getCustomLoginTexts(req, null).then(resp => resp.toObject()); + } + + public setCustomLoginText(req: SetCustomLoginTextsRequest): + Promise { + return this.grpcService.admin.setCustomLoginText(req, null).then(resp => resp.toObject()); + } + + public resetCustomLoginTextToDefault(lang: string): Promise { + const req = new ResetCustomLoginTextsToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.admin.resetCustomLoginTextToDefault(req, null).then(resp => resp.toObject()); + } + + // message texts + + public getDefaultInitMessageText(req: GetDefaultInitMessageTextRequest): + Promise { + return this.grpcService.admin.getDefaultInitMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomInitMessageText(req: GetCustomInitMessageTextRequest): + Promise { + return this.grpcService.admin.getCustomInitMessageText(req, null).then(resp => resp.toObject()); + } + + public setDefaultInitMessageText(req: SetDefaultInitMessageTextRequest): + Promise { + return this.grpcService.admin.setDefaultInitMessageText(req, null).then(resp => resp.toObject()); + } + + + public getDefaultVerifyEmailMessageText(req: GetDefaultVerifyEmailMessageTextRequest): + Promise { + return this.grpcService.admin.getDefaultVerifyEmailMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomVerifyEmailMessageText(req: GetCustomVerifyEmailMessageTextRequest): + Promise { + return this.grpcService.admin.getCustomVerifyEmailMessageText(req, null).then(resp => resp.toObject()); + } + + public setDefaultVerifyEmailMessageText(req: SetDefaultVerifyEmailMessageTextRequest): + Promise { + return this.grpcService.admin.setDefaultVerifyEmailMessageText(req, null).then(resp => resp.toObject()); + } + + + public getDefaultVerifyPhoneMessageText(req: GetDefaultVerifyPhoneMessageTextRequest): + Promise { + return this.grpcService.admin.getDefaultVerifyPhoneMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomVerifyPhoneMessageText(req: GetCustomVerifyPhoneMessageTextRequest): + Promise { + return this.grpcService.admin.getCustomVerifyPhoneMessageText(req, null).then(resp => resp.toObject()); + } + + public setDefaultVerifyPhoneMessageText(req: SetDefaultVerifyPhoneMessageTextRequest): + Promise { + return this.grpcService.admin.setDefaultVerifyPhoneMessageText(req, null).then(resp => resp.toObject()); + } + + + public getDefaultPasswordResetMessageText(req: GetDefaultPasswordResetMessageTextRequest): + Promise { + return this.grpcService.admin.getDefaultPasswordResetMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomPasswordResetMessageText(req: GetCustomPasswordResetMessageTextRequest): + Promise { + return this.grpcService.admin.getCustomPasswordResetMessageText(req, null).then(resp => resp.toObject()); + } + + public setDefaultPasswordResetMessageText(req: SetDefaultPasswordResetMessageTextRequest): + Promise { + return this.grpcService.admin.setDefaultPasswordResetMessageText(req, null).then(resp => resp.toObject()); + } + + + public getDefaultDomainClaimedMessageText(req: GetDefaultDomainClaimedMessageTextRequest): + Promise { + return this.grpcService.admin.getDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomDomainClaimedMessageText(req: GetCustomDomainClaimedMessageTextRequest): + Promise { + return this.grpcService.admin.getCustomDomainClaimedMessageText(req, null).then(resp => resp.toObject()); + } + + public setDefaultDomainClaimedMessageText(req: SetDefaultDomainClaimedMessageTextRequest): + Promise { + return this.grpcService.admin.setDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject()); + } + public SetUpOrg( org: SetUpOrgRequest.Org, human: SetUpOrgRequest.Human, @@ -195,6 +347,17 @@ export class AdminService { return this.grpcService.admin.removeFailedEvent(req, null).then(resp => resp.toObject()); } + public getPrivacyPolicy(): + Promise { + const req = new GetPrivacyPolicyRequest(); + return this.grpcService.admin.getPrivacyPolicy(req, null).then(resp => resp.toObject()); + } + + public updatePrivacyPolicy(req: UpdatePrivacyPolicyRequest): + Promise { + return this.grpcService.admin.updatePrivacyPolicy(req, null).then(resp => resp.toObject()); + } + // Features public getOrgFeatures(orgId: string): Promise { diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index df6522e74b..703323b724 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -3,18 +3,7 @@ import { Empty } from 'google-protobuf/google/protobuf/empty_pb'; import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { BehaviorSubject } from 'rxjs'; -import { - RemoveLabelPolicyFontRequest, - RemoveLabelPolicyFontResponse, - RemoveLabelPolicyIconDarkRequest, - RemoveLabelPolicyIconDarkResponse, - RemoveLabelPolicyIconRequest, - RemoveLabelPolicyIconResponse, - RemoveLabelPolicyLogoDarkRequest, - RemoveLabelPolicyLogoDarkResponse, - RemoveLabelPolicyLogoRequest, - RemoveLabelPolicyLogoResponse, -} from '../proto/generated/zitadel/admin_pb'; +import { GetDefaultDomainClaimedMessageTextRequest } from '../proto/generated/zitadel/admin_pb'; import { AppQuery } from '../proto/generated/zitadel/app_pb'; import { KeyType } from '../proto/generated/zitadel/auth_n_key_pb'; import { ChangeQuery } from '../proto/generated/zitadel/change_pb'; @@ -36,6 +25,8 @@ import { AddCustomPasswordComplexityPolicyResponse, AddCustomPasswordLockoutPolicyRequest, AddCustomPasswordLockoutPolicyResponse, + AddCustomPrivacyPolicyRequest, + AddCustomPrivacyPolicyResponse, AddHumanUserRequest, AddHumanUserResponse, AddIDPToLoginPolicyRequest, @@ -90,10 +81,33 @@ import { GenerateOrgDomainValidationResponse, GetAppByIDRequest, GetAppByIDResponse, + GetCustomDomainClaimedMessageTextRequest, + GetCustomDomainClaimedMessageTextResponse, + GetCustomInitMessageTextRequest, + GetCustomInitMessageTextResponse, + GetCustomLoginTextsRequest, + GetCustomLoginTextsResponse, + GetCustomPasswordResetMessageTextRequest, + GetCustomPasswordResetMessageTextResponse, + GetCustomVerifyEmailMessageTextRequest, + GetCustomVerifyEmailMessageTextResponse, + GetCustomVerifyPhoneMessageTextRequest, + GetCustomVerifyPhoneMessageTextResponse, + GetDefaultDomainClaimedMessageTextResponse, + GetDefaultInitMessageTextRequest, + GetDefaultInitMessageTextResponse, GetDefaultLabelPolicyRequest, GetDefaultLabelPolicyResponse, + GetDefaultLoginTextsRequest, + GetDefaultLoginTextsResponse, GetDefaultPasswordComplexityPolicyRequest, GetDefaultPasswordComplexityPolicyResponse, + GetDefaultPasswordResetMessageTextRequest, + GetDefaultPasswordResetMessageTextResponse, + GetDefaultVerifyEmailMessageTextRequest, + GetDefaultVerifyEmailMessageTextResponse, + GetDefaultVerifyPhoneMessageTextRequest, + GetDefaultVerifyPhoneMessageTextResponse, GetFeaturesRequest, GetFeaturesResponse, GetGrantedProjectByIDRequest, @@ -128,10 +142,14 @@ import { GetPasswordLockoutPolicyResponse, GetPreviewLabelPolicyRequest, GetPreviewLabelPolicyResponse, + GetPrivacyPolicyRequest, + GetPrivacyPolicyResponse, GetProjectByIDRequest, GetProjectByIDResponse, GetProjectGrantByIDRequest, GetProjectGrantByIDResponse, + GetSupportedLanguagesRequest, + GetSupportedLanguagesResponse, GetUserByIDRequest, GetUserByIDResponse, GetUserByLoginNameGlobalRequest, @@ -214,6 +232,16 @@ import { RemoveAppKeyResponse, RemoveAppRequest, RemoveAppResponse, + RemoveCustomLabelPolicyFontRequest, + RemoveCustomLabelPolicyFontResponse, + RemoveCustomLabelPolicyIconDarkRequest, + RemoveCustomLabelPolicyIconDarkResponse, + RemoveCustomLabelPolicyIconRequest, + RemoveCustomLabelPolicyIconResponse, + RemoveCustomLabelPolicyLogoDarkRequest, + RemoveCustomLabelPolicyLogoDarkResponse, + RemoveCustomLabelPolicyLogoRequest, + RemoveCustomLabelPolicyLogoResponse, RemoveHumanAuthFactorOTPRequest, RemoveHumanAuthFactorOTPResponse, RemoveHumanAuthFactorU2FRequest, @@ -256,6 +284,18 @@ import { ResendHumanInitializationRequest, ResendHumanInitializationResponse, ResendHumanPhoneVerificationRequest, + ResetCustomDomainClaimedMessageTextToDefaultRequest, + ResetCustomDomainClaimedMessageTextToDefaultResponse, + ResetCustomInitMessageTextToDefaultRequest, + ResetCustomInitMessageTextToDefaultResponse, + ResetCustomLoginTextsToDefaultRequest, + ResetCustomLoginTextsToDefaultResponse, + ResetCustomPasswordResetMessageTextToDefaultRequest, + ResetCustomPasswordResetMessageTextToDefaultResponse, + ResetCustomVerifyEmailMessageTextToDefaultRequest, + ResetCustomVerifyEmailMessageTextToDefaultResponse, + ResetCustomVerifyPhoneMessageTextToDefaultRequest, + ResetCustomVerifyPhoneMessageTextToDefaultResponse, ResetLabelPolicyToDefaultRequest, ResetLabelPolicyToDefaultResponse, ResetLoginPolicyToDefaultRequest, @@ -266,7 +306,21 @@ import { ResetPasswordComplexityPolicyToDefaultResponse, ResetPasswordLockoutPolicyToDefaultRequest, ResetPasswordLockoutPolicyToDefaultResponse, + ResetPrivacyPolicyToDefaultRequest, + ResetPrivacyPolicyToDefaultResponse, SendHumanResetPasswordNotificationRequest, + SetCustomDomainClaimedMessageTextRequest, + SetCustomDomainClaimedMessageTextResponse, + SetCustomInitMessageTextRequest, + SetCustomInitMessageTextResponse, + SetCustomLoginTextsRequest, + SetCustomLoginTextsResponse, + SetCustomPasswordResetMessageTextRequest, + SetCustomPasswordResetMessageTextResponse, + SetCustomVerifyEmailMessageTextRequest, + SetCustomVerifyEmailMessageTextResponse, + SetCustomVerifyPhoneMessageTextRequest, + SetCustomVerifyPhoneMessageTextResponse, SetHumanInitialPasswordRequest, SetPrimaryOrgDomainRequest, SetPrimaryOrgDomainResponse, @@ -284,6 +338,8 @@ import { UpdateCustomPasswordComplexityPolicyResponse, UpdateCustomPasswordLockoutPolicyRequest, UpdateCustomPasswordLockoutPolicyResponse, + UpdateCustomPrivacyPolicyRequest, + UpdateCustomPrivacyPolicyResponse, UpdateHumanEmailRequest, UpdateHumanEmailResponse, UpdateHumanPhoneRequest, @@ -340,6 +396,146 @@ export class ManagementService { constructor(private readonly grpcService: GrpcService) { } + public getSupportedLanguages(): Promise { + const req = new GetSupportedLanguagesRequest(); + return this.grpcService.mgmt.getSupportedLanguages(req, null).then(resp => resp.toObject()); + } + + public getDefaultLoginTexts(req: GetDefaultLoginTextsRequest): Promise { + return this.grpcService.mgmt.getDefaultLoginTexts(req, null).then(resp => resp.toObject()); + } + + public getCustomLoginTexts(req: GetCustomLoginTextsRequest): Promise { + return this.grpcService.mgmt.getCustomLoginTexts(req, null).then(resp => resp.toObject()); + } + + public setCustomLoginText(req: SetCustomLoginTextsRequest): Promise { + return this.grpcService.mgmt.setCustomLoginText(req, null).then(resp => resp.toObject()); + } + + public resetCustomLoginTextToDefault(lang: string): Promise { + const req = new ResetCustomLoginTextsToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.mgmt.resetCustomLoginTextToDefault(req, null).then(resp => resp.toObject()); + } + + // message texts + + public getDefaultInitMessageText(req: GetDefaultInitMessageTextRequest): + Promise { + return this.grpcService.mgmt.getDefaultInitMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomInitMessageText(req: GetCustomInitMessageTextRequest): + Promise { + return this.grpcService.mgmt.getCustomInitMessageText(req, null).then(resp => resp.toObject()); + } + + public setCustomInitMessageText(req: SetCustomInitMessageTextRequest): + Promise { + return this.grpcService.mgmt.setCustomInitMessageText(req, null).then(resp => resp.toObject()); + } + + public resetCustomInitMessageTextToDefault(lang: string): + Promise { + const req = new ResetCustomInitMessageTextToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.mgmt.resetCustomInitMessageTextToDefault(req, null).then(resp => resp.toObject()); + } + + + + public getDefaultVerifyEmailMessageText(req: GetDefaultVerifyEmailMessageTextRequest): + Promise { + return this.grpcService.mgmt.getDefaultVerifyEmailMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomVerifyEmailMessageText(req: GetCustomVerifyEmailMessageTextRequest): + Promise { + return this.grpcService.mgmt.getCustomVerifyEmailMessageText(req, null).then(resp => resp.toObject()); + } + + public setCustomVerifyEmailMessageText(req: SetCustomVerifyEmailMessageTextRequest): + Promise { + return this.grpcService.mgmt.setCustomVerifyEmailMessageText(req, null).then(resp => resp.toObject()); + } + + public resetCustomVerifyEmailMessageTextToDefault(lang: string): + Promise { + const req = new ResetCustomVerifyEmailMessageTextToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.mgmt.resetCustomVerifyEmailMessageTextToDefault(req, null).then(resp => resp.toObject()); + } + + + public getDefaultVerifyPhoneMessageText(req: GetDefaultVerifyPhoneMessageTextRequest): + Promise { + return this.grpcService.mgmt.getDefaultVerifyPhoneMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomVerifyPhoneMessageText(req: GetCustomVerifyPhoneMessageTextRequest): + Promise { + return this.grpcService.mgmt.getCustomVerifyPhoneMessageText(req, null).then(resp => resp.toObject()); + } + + public setCustomVerifyPhoneMessageText(req: SetCustomVerifyPhoneMessageTextRequest): + Promise { + return this.grpcService.mgmt.setCustomVerifyPhoneMessageText(req, null).then(resp => resp.toObject()); + } + + public resetCustomVerifyPhoneMessageTextToDefault(lang: string): + Promise { + const req = new ResetCustomVerifyPhoneMessageTextToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.mgmt.resetCustomVerifyPhoneMessageTextToDefault(req, null).then(resp => resp.toObject()); + } + + + public getDefaultPasswordResetMessageText(req: GetDefaultPasswordResetMessageTextRequest): + Promise { + return this.grpcService.mgmt.getDefaultPasswordResetMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomPasswordResetMessageText(req: GetCustomPasswordResetMessageTextRequest): + Promise { + return this.grpcService.mgmt.getCustomPasswordResetMessageText(req, null).then(resp => resp.toObject()); + } + + public setCustomPasswordResetMessageText(req: SetCustomPasswordResetMessageTextRequest): + Promise { + return this.grpcService.mgmt.setCustomPasswordResetMessageText(req, null).then(resp => resp.toObject()); + } + + public resetCustomPasswordResetMessageTextToDefault(lang: string): + Promise { + const req = new ResetCustomPasswordResetMessageTextToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.mgmt.resetCustomPasswordResetMessageTextToDefault(req, null).then(resp => resp.toObject()); + } + + + public getDefaultDomainClaimedMessageText(req: GetDefaultDomainClaimedMessageTextRequest): + Promise { + return this.grpcService.mgmt.getDefaultDomainClaimedMessageText(req, null).then(resp => resp.toObject()); + } + + public getCustomDomainClaimedMessageText(req: GetCustomDomainClaimedMessageTextRequest): + Promise { + return this.grpcService.mgmt.getCustomDomainClaimedMessageText(req, null).then(resp => resp.toObject()); + } + + public setCustomDomainClaimedMessageCustomText(req: SetCustomDomainClaimedMessageTextRequest): + Promise { + return this.grpcService.mgmt.setCustomDomainClaimedMessageCustomText(req, null).then(resp => resp.toObject()); + } + + public resetCustomDomainClaimedMessageTextToDefault(lang: string): + Promise { + const req = new ResetCustomDomainClaimedMessageTextToDefaultRequest(); + req.setLanguage(lang); + return this.grpcService.mgmt.resetCustomDomainClaimedMessageTextToDefault(req, null).then(resp => resp.toObject()); + } + public listOrgIDPs( limit?: number, offset?: number, @@ -360,6 +556,28 @@ export class ManagementService { return this.grpcService.mgmt.listOrgIDPs(req, null).then(resp => resp.toObject()); } + public getPrivacyPolicy(): + Promise { + const req = new GetPrivacyPolicyRequest(); + return this.grpcService.mgmt.getPrivacyPolicy(req, null).then(resp => resp.toObject()); + } + + public addCustomPrivacyPolicy(req: AddCustomPrivacyPolicyRequest): + Promise { + return this.grpcService.mgmt.addCustomPrivacyPolicy(req, null).then(resp => resp.toObject()); + } + + public updateCustomPrivacyPolicy(req: UpdateCustomPrivacyPolicyRequest): + Promise { + return this.grpcService.mgmt.updateCustomPrivacyPolicy(req, null).then(resp => resp.toObject()); + } + + public resetPrivacyPolicyToDefault(): + Promise { + const req = new ResetPrivacyPolicyToDefaultRequest(); + return this.grpcService.mgmt.resetPrivacyPolicyToDefault(req, null).then(resp => resp.toObject()); + } + public listHumanPasswordless(userId: string): Promise { const req = new ListHumanPasswordlessRequest(); req.setUserId(userId); @@ -781,35 +999,34 @@ export class ManagementService { } public removeLabelPolicyFont(): - Promise { - const req = new RemoveLabelPolicyFontRequest(); + Promise { + const req = new RemoveCustomLabelPolicyFontRequest(); return this.grpcService.mgmt.removeCustomLabelPolicyFont(req, null).then(resp => resp.toObject()); } public removeLabelPolicyIcon(): - Promise { - const req = new RemoveLabelPolicyIconRequest(); + Promise { + const req = new RemoveCustomLabelPolicyIconRequest(); return this.grpcService.mgmt.removeCustomLabelPolicyIcon(req, null).then(resp => resp.toObject()); } public removeLabelPolicyIconDark(): - Promise { - const req = new RemoveLabelPolicyIconDarkRequest(); + Promise { + const req = new RemoveCustomLabelPolicyIconDarkRequest(); return this.grpcService.mgmt.removeCustomLabelPolicyIconDark(req, null).then(resp => resp.toObject()); } public removeLabelPolicyLogo(): - Promise { - const req = new RemoveLabelPolicyLogoRequest(); + Promise { + const req = new RemoveCustomLabelPolicyLogoRequest(); return this.grpcService.mgmt.removeCustomLabelPolicyLogo(req, null).then(resp => resp.toObject()); } public removeLabelPolicyLogoDark(): - Promise { - const req = new RemoveLabelPolicyLogoDarkRequest(); + Promise { + const req = new RemoveCustomLabelPolicyLogoDarkRequest(); return this.grpcService.mgmt.removeCustomLabelPolicyLogoDark(req, null).then(resp => resp.toObject()); } - public getOrgIAMPolicy(): Promise { const req = new GetOrgIAMPolicyRequest(); return this.grpcService.mgmt.getOrgIAMPolicy(req, null).then(resp => resp.toObject()); diff --git a/console/src/assets/flags/en.png b/console/src/assets/flags/en.png new file mode 100644 index 0000000000..b534e62892 Binary files /dev/null and b/console/src/assets/flags/en.png differ diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index f98d38804d..2f13d9668b 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -60,7 +60,7 @@ "IAM": "Identity- und Access-Management", "IAM_DESC": "Verwalte Deine Organisationen und Administratoren.", "IAM_BUTTON": "ZITADEL verwalten", - "WELCOME": "Willkommen", + "WELCOME": "Loslegen mit ZITADEL", "WELCOMESENTENCE": "Hier findest Du die empfohlenen Aktionen basierend auf Deinen zuletzt erworbenen Berechtigungen. Beachte bitte, dass Du möglicherweise Deine Organisation in der Kopfzeile wechseln musst.", "DISCLAIMER": "Du kannst nur die Einstellungen Deiner aktuellen Organisation, die in der Kopfzeile angegeben ist, sehen. ZITADEL behandelt Deine Daten vertraulich und sicher.", "DISCLAIMERLINK": "Mehr Informationen zur Sicherheit", @@ -107,6 +107,9 @@ }, "ACTIONS": { "SET":"Übernehmen", + "RESETDEFAULT":"Auf Standard zurücksetzen", + "RESETTO":"Zurücksetzen auf: ", + "RESETCURRENT":"Auf aktuellen Wert zurücksetzen", "SHOW":"Aufklappen", "HIDE":"Zuklappen", "SAVE": "Speichern", @@ -136,7 +139,9 @@ "PIN": "Anpinnen", "CONFIGURE": "Konfigurieren", "SEND": "Senden", - "NEWVALUE": "Neuer Wert" + "NEWVALUE": "Neuer Wert", + "RESTORE":"Wiederherstellen", + "CONTINUEWITHOUTSAVE":"Ohne speichern fortfahren" }, "RESOURCEID": "Ressourcen-ID", "TABLE": { @@ -628,7 +633,8 @@ "LABELPOLICYPRIVATELABEL": "Label Richtlinie - benutzerdefiniert", "LABELPOLICYWATERMARK": "Label Richtlinie - Wasserzeichen", "CUSTOMDOMAIN": "Domänen Verifikation - verfügbar", - "CUSTOMTEXT": "Benutzerdefinierte Texte" + "CUSTOMTEXT": "Benutzerdefinierte Texte", + "PRIVACYPOLICY":"Datenschutzrichtlinie und AGB - benutzerdefiniert" }, "TIERSTATES": { "0": "Aktiv", @@ -699,6 +705,87 @@ "DESCRIPTIONCREATEMGMT": "Nutzer können sich mit den verfügbaren Idps authentifizieren. Achtung: Es kann zwischen System- und organisationsspezifischen Providern gewählt werden.", "SAVED": "Erfolgreich gespeichert." }, + "PRIVACY_POLICY": { + "TITLE": "Datenschutzbestimmungen und AGB", + "DESCRIPTION": "Legen Sie Ihre Datenschutzrichtlinien und Nutzungsbedingungen fest", + "TOSLINK":"Link zu den Allgemeinen Geschäftsbedingungen", + "POLICYLINK":"Link zur den Datenschutzrichtlinien", + "SAVED": "Saved successfully!", + "RESET_TITLE":"Standardwerte wiederherstellen", + "RESET_DESCRIPTION":"Sie sind im Begriff die Standardlinks für die AGBs und Datenschutzrichtlinie wiederherzustellen. Wollen Sie fortfahren?" + }, + "LOGIN_TEXTS": { + "TITLE":"Login Interface Texte", + "DESCRIPTION": "Definiere die Texte für das Logininterface. Wenn Texte leer sind, wird der als Platzhalter angezeigte Standardwert verwendet.", + "DESCRIPTION_SHORT":"Definiere die Texte für das Logininterface.", + "NEWERVERSIONEXISTS":"Neuere Version verfügbar", + "CURRENTDATE":"Momentaner Stand", + "CHANGEDATE":"Neuer Stand vom", + "KEYNAME":"Login Screen / Interface", + "RESET_TITLE":"Standardwerte wiederherstellen", + "RESET_DESCRIPTION":"Sie sind im Begriff alle Standardwerte wiederherzustellen. Alle von Ihnen gesetzen Änderungen werden unwiederruflich gelöscht. Wollen Sie fortfahren?", + "UNSAVED_TITLE":"Ohne speichern fortfahren?", + "UNSAVED_DESCRIPTION":"Sie haben Änderungen vorgenommen ohne zu speichern. Möchten Sie jetzt speichern?", + "LOCALE":"Sprachcode", + "LOCALES": { + "de":"German", + "en":"English", + "it":"Italian", + "fr":"French" + }, + "KEYS": { + "emailVerificationDoneText":"Email Verification erfolgreich", + "emailVerificationText":"Email Verification", + "externalUserNotFoundText":"Externer Benutzer nicht gefunden", + "footerText":"Fusszeile", + "initMfaDoneText":"MFA Initialisierung erfolgreich", + "initMfaOtpText":"MFA Initialisierung", + "initMfaPromptText":"MFA Einrichtungsaufforderung", + "initMfaU2fText":"Universeller Zweitfaktor Initialisierung", + "initPasswordDoneText":"Passwort Initialisierung erfolgreich", + "initPasswordText":"Password Initialisierung", + "initializeDoneText":"Benutzereinrichtung erfolgreich", + "initializeUserText":"Benutzereinrichtung", + "linkingUserDoneText":"Benutzerverlinkung erfolgreich", + "loginText":"Anmelden", + "logoutText":"Abmelden", + "mfaProvidersText":"MFA Provider", + "passwordChangeDoneText":"Passwortwechsel erfolgreich", + "passwordChangeText":"Passwortwechsel", + "passwordResetDoneText":"Passwort zurücksetzen erfolgreich", + "passwordText":"Passwort", + "passwordlessText":"Passwortlose Authentifizierung", + "registrationOptionText":"Registrierungsoptionen", + "registrationOrgText":"Organisation registrieren", + "registrationUserText":"Benutzer registrieren", + "selectAccountText":"Account wählen", + "successLoginText":"Erfolgreiche Anmeldung", + "usernameChangeDoneText":"Benutzernamenwechsel erfolgreich", + "usernameChangeText":"Benutzernamenwechsel", + "verifyMfaOtpText":"OTP Verifikation", + "verifyMfaU2fText":"Universeller Zweitfaktor Verifikation" + } + }, + "MESSAGE_TEXTS": { + "TITLE":"Email Texte", + "DESCRIPTION": "Definiere die Texte für deine Benachrichtigungsmails", + "TYPES": { + "INIT":"Initialisierung", + "VE":"Emailverifikation", + "VP":"Telefonnummerverifikation", + "PR":"Password Wiederherstellung", + "DC":"Domainbeanspruchung" + }, + "CHIPS": { + "firstname":"Vorname", + "lastname":"Nachname", + "code":"Code", + "preferredLoginName":"Bevorzugter Anmeldename" + }, + "TOAST": { + "UPDATED":"Benutzerdefinierte Texte gespeichert." + } + }, "DEFAULTLABEL": "Die aktuelle Richtlinie entspricht der IAM-Standard Einstellung.", "BTN_INSTALL": "Installieren", "BTN_EDIT": "Modifizieren", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index d3f3be4e7d..289212d3eb 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -60,7 +60,7 @@ "IAM": "Identity and Access Management", "IAM_DESC": "Manage your organisations and administrators.", "IAM_BUTTON": "Manage ZITADEL", - "WELCOME": "Welcome", + "WELCOME": "Get started with ZITADEL", "WELCOMESENTENCE": "Here you can find recommended actions based on your last acquired permissions. Note that you may have to select your organisation in the header above.", "DISCLAIMER": "You can only see settings of your current organisation specified in the header. ZITADEL treats your data confidentially and securely.", "DISCLAIMERLINK": "Further information", @@ -107,6 +107,9 @@ }, "ACTIONS": { "SET":"Set", + "RESETDEFAULT":"Reset to Default", + "RESETTO":"Reset to: ", + "RESETCURRENT":"Reset to current", "SHOW":"Show", "HIDE":"Hide", "SAVE": "Save", @@ -136,7 +139,9 @@ "PIN": "Pin / Unpin", "CONFIGURE": "Configure", "SEND": "Send", - "NEWVALUE": "New Value" + "NEWVALUE": "New Value", + "RESTORE":"Restore", + "CONTINUEWITHOUTSAVE":"Continue without saving" }, "RESOURCEID": "Resource Id", "TABLE": { @@ -628,7 +633,8 @@ "LABELPOLICYPRIVATELABEL": "Label Policy - custom", "LABELPOLICYWATERMARK": "Label Policy - watermark", "CUSTOMDOMAIN": "Domain Verification - available", - "CUSTOMTEXT": "Custom texts" + "CUSTOMTEXT": "Custom texts", + "PRIVACYPOLICY":"Privacy Policy and TOS - custom" }, "TIERSTATES": { "0": "Active", @@ -701,6 +707,87 @@ "DESCRIPTIONCREATEMGMT": "Users can choose from the available identity providers below. Note: You can use System-set providers as well as providers set for your organisation only.", "SAVED": "Saved successfully!" }, + "PRIVACY_POLICY": { + "TITLE": "Privacy Policy and TOS", + "DESCRIPTION": "Set your Privacy Policy and Terms of Service Links", + "TOSLINK":"Link to Terms of Service", + "POLICYLINK":"Link to Privacy Policy", + "SAVED": "Saved successfully!", + "RESET_TITLE":"Restore Default Values", + "RESET_DESCRIPTION":"You are about to restore the default Links for TOS and Privacy Policy. Do you really want to continue?" + }, + "LOGIN_TEXTS": { + "TITLE":"Login Interface Texts", + "DESCRIPTION": "Define your texts for the login interfaces. If texts are empty, the default Value shown as the placeholder will be used.", + "DESCRIPTION_SHORT":"Define your texts for the login interfaces.", + "NEWERVERSIONEXISTS":"Newer Version exists", + "CURRENTDATE":"Current configuration", + "CHANGEDATE":"Newer Version from", + "KEYNAME":"Login Screen / Interface", + "RESET_TITLE":"Restore Default Values", + "RESET_DESCRIPTION":"You are about to restore all default values. All changes you have made will be permanently deleted. Do you really want to continue?", + "UNSAVED_TITLE":"Continue without saving?", + "UNSAVED_DESCRIPTION":"Your have made changes without saving. Do you want to save now?", + "LOCALE":"Locale Code", + "LOCALES": { + "de":"German", + "en":"English", + "it":"Italian", + "fr":"French" + }, + "KEYS": { + "emailVerificationDoneText":"Email verification done", + "emailVerificationText":"Email verification", + "externalUserNotFoundText":"External user not found", + "footerText":"Footer", + "initMfaDoneText":"Initialize MFA done", + "initMfaOtpText":"Initialize MFA", + "initMfaPromptText":"Initialize MFA Prompt", + "initMfaU2fText":"Initialize Universal Second Factor", + "initPasswordDoneText":"Initialize password done", + "initPasswordText":"Initialize password", + "initializeDoneText":"Initialize user done", + "initializeUserText":"Initialize user", + "linkingUserDoneText":"Linking user done", + "loginText":"Login", + "logoutText":"Logout", + "mfaProvidersText":"MFA Providers", + "passwordChangeDoneText":"Password change done", + "passwordChangeText":"Password change", + "passwordResetDoneText":"Password reset done", + "passwordText":"Password", + "passwordlessText":"Passwordless", + "registrationOptionText":"Registration Options", + "registrationOrgText":"Register Org", + "registrationUserText":"Register User", + "selectAccountText":"Select Account", + "successLoginText":"Login with success", + "usernameChangeDoneText":"Username change done", + "usernameChangeText":"Username change", + "verifyMfaOtpText":"Verify OTP", + "verifyMfaU2fText":"Verify Universal Second Factor" + } + }, + "MESSAGE_TEXTS": { + "TITLE":"Message Texts", + "DESCRIPTION": "Define your texts for your notication mails.", + "TYPES": { + "INIT":"Initialization", + "VE":"Verify Email", + "VP":"Verify Phone", + "PR":"Password Reset", + "DC":"Domain Claim" + }, + "CHIPS": { + "firstname":"Firstname", + "lastname":"Lastname", + "code":"Code", + "preferredLoginName":"Preferred Login Name" + }, + "TOAST": { + "UPDATED":"Custom Texts saved." + } + }, "DEFAULTLABEL": "The currently set guideline corresponds to the standard setting set by the IAM Administrator.", "BTN_INSTALL": "Setup", "BTN_EDIT": "Modify", diff --git a/console/src/styles.scss b/console/src/styles.scss index fd50d8fd8d..3fe5f0a8dc 100644 --- a/console/src/styles.scss +++ b/console/src/styles.scss @@ -152,6 +152,10 @@ $custom-typography: mat.define-typography-config($font-family: 'Lato'); @include mat.core($custom-typography); +// textarea { +// font-family: 'Lato'; +// } + // default theme @include component-themes($dark-theme); @include mat.all-component-themes($dark-theme); diff --git a/console/tsconfig.base.json b/console/tsconfig.base.json index 3003d55455..c870f8ab1c 100644 --- a/console/tsconfig.base.json +++ b/console/tsconfig.base.json @@ -12,7 +12,7 @@ "importHelpers": true, "target": "es2015", "typeRoots": ["node_modules/@types"], - "lib": ["es2018", "dom"], + "lib": ["es2019", "dom"], "strict": true }, "angularCompilerOptions": { diff --git a/docs/docs/apis/proto/admin.md b/docs/docs/apis/proto/admin.md index d365002573..9a2fa386f9 100644 --- a/docs/docs/apis/proto/admin.md +++ b/docs/docs/apis/proto/admin.md @@ -897,6 +897,20 @@ it impacts all organisations without customized login ui texts PUT: /text/login/{language} +### ResetCustomLoginTextToDefault + +> **rpc** ResetCustomLoginTextToDefault([ResetCustomLoginTextsToDefaultRequest](#resetcustomlogintextstodefaultrequest)) +[ResetCustomLoginTextsToDefaultResponse](#resetcustomlogintextstodefaultresponse) + +Removes the custom texts for login ui +it impacts all organisations without customized login ui texts +The default text form translation file will trigger after + + + + DELETE: /text/login/{language} + + ### ListIAMMemberRoles > **rpc** ListIAMMemberRoles([ListIAMMemberRolesRequest](#listiammemberrolesrequest)) @@ -2234,6 +2248,28 @@ This is an empty request +### ResetCustomLoginTextsToDefaultRequest + + + +| Field | Type | Description | Validation | +| ----- | ---- | ----------- | ----------- | +| language | string | - | string.min_len: 1
string.max_len: 200
| + + + + +### ResetCustomLoginTextsToDefaultResponse + + + +| Field | Type | Description | Validation | +| ----- | ---- | ----------- | ----------- | +| details | zitadel.v1.ObjectDetails | - | | + + + + ### ResetCustomOrgIAMPolicyToDefaultRequest diff --git a/docs/docs/apis/proto/management.md b/docs/docs/apis/proto/management.md index 5ab662c423..03dd21d279 100644 --- a/docs/docs/apis/proto/management.md +++ b/docs/docs/apis/proto/management.md @@ -359,9 +359,9 @@ An sms will be sent to the given phone number to finish the phone verification p POST: /users/{user_id}/phone/_resend_verification -### RemoveMyAvatar +### RemoveHumanAvatar -> **rpc** RemoveMyAvatar([RemoveHumanAvatarRequest](#removehumanavatarrequest)) +> **rpc** RemoveHumanAvatar([RemoveHumanAvatarRequest](#removehumanavatarrequest)) [RemoveHumanAvatarResponse](#removehumanavatarresponse) Removes the avatar number of the human diff --git a/internal/admin/repository/eventsourcing/handler/custom_text.go b/internal/admin/repository/eventsourcing/handler/custom_text.go index 58ac7e7b95..8e544b9944 100644 --- a/internal/admin/repository/eventsourcing/handler/custom_text.go +++ b/internal/admin/repository/eventsourcing/handler/custom_text.go @@ -107,6 +107,13 @@ func (m *CustomText) processCustomText(event *es_models.Event) (err error) { return err } return m.view.DeleteCustomText(event.AggregateID, text.Template, text.Language, text.Key, event) + case iam_es_model.CustomTextMessageRemoved, model.CustomTextMessageRemoved: + text := new(iam_model.CustomTextView) + err = text.SetData(event) + if err != nil { + return err + } + return m.view.DeleteCustomTextTemplate(event.AggregateID, text.Template, text.Language, event) default: return m.view.ProcessedCustomTextSequence(event) } diff --git a/internal/admin/repository/eventsourcing/view/custom_texts.go b/internal/admin/repository/eventsourcing/view/custom_texts.go index 5b17551732..d9cbc0b564 100644 --- a/internal/admin/repository/eventsourcing/view/custom_texts.go +++ b/internal/admin/repository/eventsourcing/view/custom_texts.go @@ -36,6 +36,14 @@ func (v *View) DeleteCustomText(aggregateID, textType, lang, key string, event * return v.ProcessedCustomTextSequence(event) } +func (v *View) DeleteCustomTextTemplate(aggregateID, textType, lang string, event *models.Event) error { + err := view.DeleteCustomTextTemplate(v.Db, customTextTable, aggregateID, textType, lang) + if err != nil && !errors.IsNotFound(err) { + return err + } + return v.ProcessedCustomTextSequence(event) +} + func (v *View) GetLatestCustomTextSequence() (*global_view.CurrentSequence, error) { return v.latestSequence(customTextTable) } diff --git a/internal/api/grpc/admin/custom_text.go b/internal/api/grpc/admin/custom_text.go index b4de99fbda..b7cc01b8c5 100644 --- a/internal/api/grpc/admin/custom_text.go +++ b/internal/api/grpc/admin/custom_text.go @@ -3,6 +3,8 @@ package admin import ( "context" + "golang.org/x/text/language" + "github.com/caos/zitadel/internal/api/grpc/object" text_grpc "github.com/caos/zitadel/internal/api/grpc/text" "github.com/caos/zitadel/internal/domain" @@ -211,3 +213,17 @@ func (s *Server) SetCustomLoginText(ctx context.Context, req *admin_pb.SetCustom ), }, nil } + +func (s *Server) ResetCustomLoginTextToDefault(ctx context.Context, req *admin_pb.ResetCustomLoginTextsToDefaultRequest) (*admin_pb.ResetCustomLoginTextsToDefaultResponse, error) { + result, err := s.command.RemoveCustomIAMLoginTexts(ctx, language.Make(req.Language)) + if err != nil { + return nil, err + } + return &admin_pb.ResetCustomLoginTextsToDefaultResponse{ + Details: object.ChangeToDetailsPb( + result.Sequence, + result.EventDate, + result.ResourceOwner, + ), + }, nil +} diff --git a/internal/api/grpc/text/custom_text.go b/internal/api/grpc/text/custom_text.go index 3e25c98ac1..fb1db7370a 100644 --- a/internal/api/grpc/text/custom_text.go +++ b/internal/api/grpc/text/custom_text.go @@ -311,50 +311,44 @@ func RegistrationOptionScreenTextToPb(text domain.RegistrationOptionScreenText) func RegistrationUserScreenTextToPb(text domain.RegistrationUserScreenText) *text_pb.RegistrationUserScreenText { return &text_pb.RegistrationUserScreenText{ - Title: text.Title, - Description: text.Description, - DescriptionOrgRegister: text.DescriptionOrgRegister, - FirstnameLabel: text.FirstnameLabel, - LastnameLabel: text.LastnameLabel, - EmailLabel: text.EmailLabel, - UsernameLabel: text.UsernameLabel, - LanguageLabel: text.LanguageLabel, - GenderLabel: text.GenderLabel, - PasswordLabel: text.PasswordLabel, - PasswordConfirmLabel: text.PasswordConfirmLabel, - TosAndPrivacyLabel: text.TOSAndPrivacyLabel, - TosConfirm: text.TOSConfirm, - TosLink: text.TOSLink, - TosLinkText: text.TOSLinkText, - PrivacyConfirm: text.PrivacyConfirm, - PrivacyLink: text.PrivacyLink, - PrivacyLinkText: text.PrivacyLinkText, - ExternalLoginDescription: text.ExternalLoginDescription, - NextButtonText: text.NextButtonText, - BackButtonText: text.BackButtonText, + Title: text.Title, + Description: text.Description, + DescriptionOrgRegister: text.DescriptionOrgRegister, + FirstnameLabel: text.FirstnameLabel, + LastnameLabel: text.LastnameLabel, + EmailLabel: text.EmailLabel, + UsernameLabel: text.UsernameLabel, + LanguageLabel: text.LanguageLabel, + GenderLabel: text.GenderLabel, + PasswordLabel: text.PasswordLabel, + PasswordConfirmLabel: text.PasswordConfirmLabel, + TosAndPrivacyLabel: text.TOSAndPrivacyLabel, + TosConfirm: text.TOSConfirm, + TosLinkText: text.TOSLinkText, + TosConfirmAnd: text.TOSConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, + NextButtonText: text.NextButtonText, + BackButtonText: text.BackButtonText, } } func RegistrationOrgScreenTextToPb(text domain.RegistrationOrgScreenText) *text_pb.RegistrationOrgScreenText { return &text_pb.RegistrationOrgScreenText{ - Title: text.Title, - Description: text.Description, - OrgnameLabel: text.OrgNameLabel, - FirstnameLabel: text.FirstnameLabel, - LastnameLabel: text.LastnameLabel, - EmailLabel: text.EmailLabel, - UsernameLabel: text.UsernameLabel, - PasswordLabel: text.PasswordLabel, - PasswordConfirmLabel: text.PasswordConfirmLabel, - TosAndPrivacyLabel: text.TOSAndPrivacyLabel, - TosConfirm: text.TOSConfirm, - TosLink: text.TOSLink, - TosLinkText: text.TOSLinkText, - PrivacyConfirm: text.PrivacyConfirm, - PrivacyLink: text.PrivacyLink, - PrivacyLinkText: text.PrivacyLinkText, - ExternalLoginDescription: text.ExternalLoginDescription, - SaveButtonText: text.SaveButtonText, + Title: text.Title, + Description: text.Description, + OrgnameLabel: text.OrgNameLabel, + FirstnameLabel: text.FirstnameLabel, + LastnameLabel: text.LastnameLabel, + EmailLabel: text.EmailLabel, + UsernameLabel: text.UsernameLabel, + PasswordLabel: text.PasswordLabel, + PasswordConfirmLabel: text.PasswordConfirmLabel, + TosAndPrivacyLabel: text.TOSAndPrivacyLabel, + TosConfirm: text.TOSConfirm, + TosLinkText: text.TOSLinkText, + TosConfirmAnd: text.TOSConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, + SaveButtonText: text.SaveButtonText, } } @@ -395,12 +389,10 @@ func LogoutDoneScreenTextToPb(text domain.LogoutDoneScreenText) *text_pb.LogoutD func FooterTextToPb(text domain.FooterText) *text_pb.FooterText { return &text_pb.FooterText{ - Tos: text.TOS, - TosLink: text.TOSLink, - PrivacyPolicy: text.PrivacyPolicy, - PrivacyPolicyLink: text.PrivacyPolicyLink, - Help: text.Help, - HelpLink: text.HelpLink, + Tos: text.TOS, + PrivacyPolicy: text.PrivacyPolicy, + Help: text.Help, + HelpLink: text.HelpLink, } } @@ -722,27 +714,24 @@ func RegistrationUserScreenTextPbToDomain(text *text_pb.RegistrationUserScreenTe return domain.RegistrationUserScreenText{} } return domain.RegistrationUserScreenText{ - Title: text.Title, - Description: text.Description, - DescriptionOrgRegister: text.DescriptionOrgRegister, - FirstnameLabel: text.FirstnameLabel, - LastnameLabel: text.LastnameLabel, - EmailLabel: text.EmailLabel, - UsernameLabel: text.UsernameLabel, - LanguageLabel: text.LanguageLabel, - GenderLabel: text.GenderLabel, - PasswordLabel: text.PasswordLabel, - PasswordConfirmLabel: text.PasswordConfirmLabel, - TOSAndPrivacyLabel: text.TosAndPrivacyLabel, - TOSConfirm: text.TosConfirm, - TOSLink: text.TosLink, - TOSLinkText: text.TosLinkText, - PrivacyConfirm: text.PrivacyConfirm, - PrivacyLink: text.PrivacyLink, - PrivacyLinkText: text.PrivacyLinkText, - ExternalLoginDescription: text.ExternalLoginDescription, - NextButtonText: text.NextButtonText, - BackButtonText: text.BackButtonText, + Title: text.Title, + Description: text.Description, + DescriptionOrgRegister: text.DescriptionOrgRegister, + FirstnameLabel: text.FirstnameLabel, + LastnameLabel: text.LastnameLabel, + EmailLabel: text.EmailLabel, + UsernameLabel: text.UsernameLabel, + LanguageLabel: text.LanguageLabel, + GenderLabel: text.GenderLabel, + PasswordLabel: text.PasswordLabel, + PasswordConfirmLabel: text.PasswordConfirmLabel, + TOSAndPrivacyLabel: text.TosAndPrivacyLabel, + TOSConfirm: text.TosConfirm, + TOSLinkText: text.TosLinkText, + TOSConfirmAnd: text.TosConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, + NextButtonText: text.NextButtonText, + BackButtonText: text.BackButtonText, } } @@ -751,24 +740,21 @@ func RegistrationOrgScreenTextPbToDomain(text *text_pb.RegistrationOrgScreenText return domain.RegistrationOrgScreenText{} } return domain.RegistrationOrgScreenText{ - Title: text.Title, - Description: text.Description, - OrgNameLabel: text.OrgnameLabel, - FirstnameLabel: text.FirstnameLabel, - LastnameLabel: text.LastnameLabel, - EmailLabel: text.EmailLabel, - UsernameLabel: text.UsernameLabel, - PasswordLabel: text.PasswordLabel, - PasswordConfirmLabel: text.PasswordConfirmLabel, - TOSAndPrivacyLabel: text.TosAndPrivacyLabel, - TOSConfirm: text.TosConfirm, - TOSLink: text.TosLink, - TOSLinkText: text.TosLinkText, - PrivacyConfirm: text.PrivacyConfirm, - PrivacyLink: text.PrivacyLink, - PrivacyLinkText: text.PrivacyLinkText, - ExternalLoginDescription: text.ExternalLoginDescription, - SaveButtonText: text.SaveButtonText, + Title: text.Title, + Description: text.Description, + OrgNameLabel: text.OrgnameLabel, + FirstnameLabel: text.FirstnameLabel, + LastnameLabel: text.LastnameLabel, + EmailLabel: text.EmailLabel, + UsernameLabel: text.UsernameLabel, + PasswordLabel: text.PasswordLabel, + PasswordConfirmLabel: text.PasswordConfirmLabel, + TOSAndPrivacyLabel: text.TosAndPrivacyLabel, + TOSConfirm: text.TosConfirm, + TOSLinkText: text.TosLinkText, + TOSConfirmAnd: text.TosConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, + SaveButtonText: text.SaveButtonText, } } @@ -824,11 +810,9 @@ func FooterTextPbToDomain(text *text_pb.FooterText) domain.FooterText { return domain.FooterText{} } return domain.FooterText{ - TOS: text.Tos, - TOSLink: text.TosLink, - PrivacyPolicy: text.PrivacyPolicy, - PrivacyPolicyLink: text.PrivacyPolicyLink, - Help: text.Help, - HelpLink: text.HelpLink, + TOS: text.Tos, + PrivacyPolicy: text.PrivacyPolicy, + Help: text.Help, + HelpLink: text.HelpLink, } } diff --git a/internal/auth/repository/eventsourcing/handler/custom_text.go b/internal/auth/repository/eventsourcing/handler/custom_text.go index ae2f5ec6bb..93081ccd69 100644 --- a/internal/auth/repository/eventsourcing/handler/custom_text.go +++ b/internal/auth/repository/eventsourcing/handler/custom_text.go @@ -106,6 +106,13 @@ func (m *CustomText) processCustomText(event *es_models.Event) (err error) { return err } return m.view.DeleteCustomText(event.AggregateID, text.Template, text.Language, text.Key, event) + case iam_es_model.CustomTextMessageRemoved, model.CustomTextMessageRemoved: + text := new(iam_model.CustomTextView) + err = text.SetData(event) + if err != nil { + return err + } + return m.view.DeleteCustomTextTemplate(event.AggregateID, text.Template, text.Language, event) default: return m.view.ProcessedCustomTextSequence(event) } diff --git a/internal/auth/repository/eventsourcing/view/custom_texts.go b/internal/auth/repository/eventsourcing/view/custom_texts.go index 0e73943586..8d3acf6c19 100644 --- a/internal/auth/repository/eventsourcing/view/custom_texts.go +++ b/internal/auth/repository/eventsourcing/view/custom_texts.go @@ -40,6 +40,14 @@ func (v *View) DeleteCustomText(aggregateID, textType, lang, key string, event * return v.ProcessedCustomTextSequence(event) } +func (v *View) DeleteCustomTextTemplate(aggregateID, textType, lang string, event *models.Event) error { + err := view.DeleteCustomTextTemplate(v.Db, customTextTable, aggregateID, textType, lang) + if err != nil && !errors.IsNotFound(err) { + return err + } + return v.ProcessedCustomTextSequence(event) +} + func (v *View) GetLatestCustomTextSequence() (*global_view.CurrentSequence, error) { return v.latestSequence(customTextTable) } diff --git a/internal/command/custom_login_text.go b/internal/command/custom_login_text.go index 62efcd5014..1fe435f176 100644 --- a/internal/command/custom_login_text.go +++ b/internal/command/custom_login_text.go @@ -731,19 +731,11 @@ func (c *Commands) createRegistrationUserEvents(ctx context.Context, agg *events if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserTOSLink, existingText.RegistrationUserTOSLink, text.RegistrationUser.TOSLink, text.Language, defaultText) - if event != nil { - events = append(events, event) - } event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserTOSLinkText, existingText.RegistrationUserTOSLinkText, text.RegistrationUser.TOSLinkText, text.Language, defaultText) if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserPrivacyConfirm, existingText.RegistrationUserPrivacyConfirm, text.RegistrationUser.PrivacyConfirm, text.Language, defaultText) - if event != nil { - events = append(events, event) - } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserPrivacyLink, existingText.RegistrationUserPrivacyLink, text.RegistrationUser.PrivacyLink, text.Language, defaultText) + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserTOSConfirmAnd, existingText.RegistrationUserTOSConfirmAnd, text.RegistrationUser.TOSConfirmAnd, text.Language, defaultText) if event != nil { events = append(events, event) } @@ -751,10 +743,6 @@ func (c *Commands) createRegistrationUserEvents(ctx context.Context, agg *events if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserExternalLoginDescription, existingText.RegistrationUserExternalLoginDescription, text.RegistrationUser.ExternalLoginDescription, text.Language, defaultText) - if event != nil { - events = append(events, event) - } event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegistrationUserNextButtonText, existingText.RegistrationUserNextButtonText, text.RegistrationUser.NextButtonText, text.Language, defaultText) if event != nil { events = append(events, event) @@ -812,19 +800,11 @@ func (c *Commands) createRegistrationOrgEvents(ctx context.Context, agg *eventst if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgTOSLink, existingText.RegisterOrgTOSLink, text.RegistrationOrg.TOSLink, text.Language, defaultText) - if event != nil { - events = append(events, event) - } event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgTOSLinkText, existingText.RegisterOrgTOSLinkText, text.RegistrationOrg.TOSLinkText, text.Language, defaultText) if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgPrivacyConfirm, existingText.RegisterOrgPrivacyConfirm, text.RegistrationOrg.PrivacyConfirm, text.Language, defaultText) - if event != nil { - events = append(events, event) - } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgPrivacyLink, existingText.RegisterOrgPrivacyLink, text.RegistrationOrg.PrivacyLink, text.Language, defaultText) + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgTosConfirmAnd, existingText.RegisterOrgTOSConfirmAnd, text.RegistrationOrg.TOSConfirmAnd, text.Language, defaultText) if event != nil { events = append(events, event) } @@ -832,10 +812,6 @@ func (c *Commands) createRegistrationOrgEvents(ctx context.Context, agg *eventst if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgExternalLoginDescription, existingText.RegisterOrgExternalLoginDescription, text.RegistrationOrg.ExternalLoginDescription, text.Language, defaultText) - if event != nil { - events = append(events, event) - } event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgSaveButtonText, existingText.RegisterOrgSaveButtonText, text.RegistrationOrg.SaveButtonText, text.Language, defaultText) if event != nil { events = append(events, event) @@ -929,15 +905,7 @@ func (c *Commands) createFooterTextEvents(ctx context.Context, agg *eventstore.A if event != nil { events = append(events, event) } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyFooterTOSLink, existingText.FooterTOSLink, text.Footer.TOSLink, text.Language, defaultText) - if event != nil { - events = append(events, event) - } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyFooterPrivacy, existingText.FooterPrivacyPolicy, text.Footer.PrivacyPolicy, text.Language, defaultText) - if event != nil { - events = append(events, event) - } - event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyFooterPrivacyLink, existingText.FooterPrivacyPolicyLink, text.Footer.PrivacyPolicyLink, text.Language, defaultText) + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyFooterPrivacyPolicy, existingText.FooterPrivacyPolicy, text.Footer.PrivacyPolicy, text.Language, defaultText) if event != nil { events = append(events, event) } diff --git a/internal/command/custom_login_text_model.go b/internal/command/custom_login_text_model.go index 50eae3563a..87fe9fd292 100644 --- a/internal/command/custom_login_text_model.go +++ b/internal/command/custom_login_text_model.go @@ -168,46 +168,42 @@ type CustomLoginTextReadModel struct { RegistrationOptionUserNameButtonText string RegistrationOptionExternalLoginDescription string - RegistrationUserTitle string - RegistrationUserDescription string - RegistrationUserDescriptionOrgRegister string - RegistrationUserFirstnameLabel string - RegistrationUserLastnameLabel string - RegistrationUserEmailLabel string - RegistrationUserUsernameLabel string - RegistrationUserLanguageLabel string - RegistrationUserGenderLabel string - RegistrationUserPasswordLabel string - RegistrationUserPasswordConfirmLabel string - RegistrationUserTOSAndPrivacyLabel string - RegistrationUserTOSConfirm string - RegistrationUserTOSLink string - RegistrationUserTOSLinkText string - RegistrationUserPrivacyConfirm string - RegistrationUserPrivacyLink string - RegistrationUserPrivacyLinkText string - RegistrationUserExternalLoginDescription string - RegistrationUserNextButtonText string - RegistrationUserBackButtonText string + RegistrationUserTitle string + RegistrationUserDescription string + RegistrationUserDescriptionOrgRegister string + RegistrationUserFirstnameLabel string + RegistrationUserLastnameLabel string + RegistrationUserEmailLabel string + RegistrationUserUsernameLabel string + RegistrationUserLanguageLabel string + RegistrationUserGenderLabel string + RegistrationUserPasswordLabel string + RegistrationUserPasswordConfirmLabel string + RegistrationUserTOSAndPrivacyLabel string + RegistrationUserTOSConfirm string + RegistrationUserTOSLink string + RegistrationUserTOSLinkText string + RegistrationUserTOSConfirmAnd string + RegistrationUserPrivacyLink string + RegistrationUserPrivacyLinkText string + RegistrationUserNextButtonText string + RegistrationUserBackButtonText string - RegisterOrgTitle string - RegisterOrgDescription string - RegisterOrgOrgNameLabel string - RegisterOrgFirstnameLabel string - RegisterOrgLastnameLabel string - RegisterOrgUsernameLabel string - RegisterOrgEmailLabel string - RegisterOrgPasswordLabel string - RegisterOrgPasswordConfirmLabel string - RegisterOrgTOSAndPrivacyLabel string - RegisterOrgTOSConfirm string - RegisterOrgTOSLink string - RegisterOrgTOSLinkText string - RegisterOrgPrivacyConfirm string - RegisterOrgPrivacyLink string - RegisterOrgPrivacyLinkText string - RegisterOrgExternalLoginDescription string - RegisterOrgSaveButtonText string + RegisterOrgTitle string + RegisterOrgDescription string + RegisterOrgOrgNameLabel string + RegisterOrgFirstnameLabel string + RegisterOrgLastnameLabel string + RegisterOrgUsernameLabel string + RegisterOrgEmailLabel string + RegisterOrgPasswordLabel string + RegisterOrgPasswordConfirmLabel string + RegisterOrgTOSAndPrivacyLabel string + RegisterOrgTOSConfirm string + RegisterOrgTOSLinkText string + RegisterOrgTOSConfirmAnd string + RegisterOrgPrivacyLinkText string + RegisterOrgSaveButtonText string LinkingUserDoneTitle string LinkingUserDoneDescription string @@ -228,12 +224,10 @@ type CustomLoginTextReadModel struct { LogoutDoneDescription string LogoutDoneLoginButtonText string - FooterTOS string - FooterTOSLink string - FooterPrivacyPolicy string - FooterPrivacyPolicyLink string - FooterHelp string - FooterHelpLink string + FooterTOS string + FooterPrivacyPolicy string + FooterHelp string + FooterHelpLink string } func (wm *CustomLoginTextReadModel) Reduce() error { @@ -1708,30 +1702,18 @@ func (wm *CustomLoginTextReadModel) handleRegistrationUserScreenSetEvent(e *poli wm.RegistrationUserTOSConfirm = e.Text return } - if e.Key == domain.LoginKeyRegistrationUserTOSLink { - wm.RegistrationUserTOSLink = e.Text - return - } if e.Key == domain.LoginKeyRegistrationUserTOSLinkText { wm.RegistrationUserTOSLinkText = e.Text return } - if e.Key == domain.LoginKeyRegistrationUserPrivacyConfirm { - wm.RegistrationUserPrivacyConfirm = e.Text - return - } - if e.Key == domain.LoginKeyRegistrationUserPrivacyLink { - wm.RegistrationUserPrivacyLink = e.Text + if e.Key == domain.LoginKeyRegistrationUserTOSConfirmAnd { + wm.RegistrationUserTOSConfirmAnd = e.Text return } if e.Key == domain.LoginKeyRegistrationUserPrivacyLinkText { wm.RegistrationUserPrivacyLinkText = e.Text return } - if e.Key == domain.LoginKeyRegistrationUserExternalLoginDescription { - wm.RegistrationUserExternalLoginDescription = e.Text - return - } if e.Key == domain.LoginKeyRegistrationUserNextButtonText { wm.RegistrationUserNextButtonText = e.Text return @@ -1795,30 +1777,18 @@ func (wm *CustomLoginTextReadModel) handleRegistrationUserScreenRemoveEvent(e *p wm.RegistrationUserTOSConfirm = "" return } - if e.Key == domain.LoginKeyRegistrationUserTOSLink { - wm.RegistrationUserTOSLink = "" - return - } if e.Key == domain.LoginKeyRegistrationUserTOSLinkText { wm.RegistrationUserTOSLinkText = "" return } - if e.Key == domain.LoginKeyRegistrationUserPrivacyConfirm { - wm.RegistrationUserPrivacyConfirm = "" - return - } - if e.Key == domain.LoginKeyRegistrationUserPrivacyLink { - wm.RegistrationUserPrivacyLink = "" + if e.Key == domain.LoginKeyRegistrationUserTOSConfirmAnd { + wm.RegistrationUserTOSConfirmAnd = "" return } if e.Key == domain.LoginKeyRegistrationUserPrivacyLinkText { wm.RegistrationUserPrivacyLinkText = "" return } - if e.Key == domain.LoginKeyRegistrationUserExternalLoginDescription { - wm.RegistrationUserExternalLoginDescription = "" - return - } if e.Key == domain.LoginKeyRegistrationUserNextButtonText { wm.RegistrationUserNextButtonText = "" return @@ -1874,30 +1844,18 @@ func (wm *CustomLoginTextReadModel) handleRegistrationOrgScreenSetEvent(e *polic wm.RegisterOrgTOSConfirm = e.Text return } - if e.Key == domain.LoginKeyRegisterOrgTOSLink { - wm.RegisterOrgTOSLink = e.Text - return - } if e.Key == domain.LoginKeyRegisterOrgTOSLinkText { wm.RegisterOrgTOSLinkText = e.Text return } - if e.Key == domain.LoginKeyRegisterOrgPrivacyConfirm { - wm.RegisterOrgPrivacyConfirm = e.Text - return - } - if e.Key == domain.LoginKeyRegisterOrgPrivacyLink { - wm.RegisterOrgPrivacyLink = e.Text + if e.Key == domain.LoginKeyRegisterOrgTosConfirmAnd { + wm.RegisterOrgTOSConfirmAnd = e.Text return } if e.Key == domain.LoginKeyRegisterOrgPrivacyLinkText { wm.RegisterOrgPrivacyLinkText = e.Text return } - if e.Key == domain.LoginKeyRegisterOrgExternalLoginDescription { - wm.RegisterOrgExternalLoginDescription = e.Text - return - } if e.Key == domain.LoginKeyRegisterOrgSaveButtonText { wm.RegisterOrgSaveButtonText = e.Text return @@ -1949,30 +1907,18 @@ func (wm *CustomLoginTextReadModel) handleRegistrationOrgScreenRemoveEvent(e *po wm.RegisterOrgTOSConfirm = "" return } - if e.Key == domain.LoginKeyRegisterOrgTOSLink { - wm.RegisterOrgTOSLink = "" - return - } if e.Key == domain.LoginKeyRegisterOrgTOSLinkText { wm.RegisterOrgTOSLinkText = "" return } - if e.Key == domain.LoginKeyRegisterOrgPrivacyConfirm { - wm.RegisterOrgPrivacyConfirm = "" - return - } - if e.Key == domain.LoginKeyRegisterOrgPrivacyLink { - wm.RegisterOrgPrivacyLink = "" + if e.Key == domain.LoginKeyRegisterOrgTosConfirmAnd { + wm.RegisterOrgTOSConfirmAnd = "" return } if e.Key == domain.LoginKeyRegisterOrgPrivacyLinkText { wm.RegisterOrgPrivacyLinkText = "" return } - if e.Key == domain.LoginKeyRegisterOrgExternalLoginDescription { - wm.RegisterOrgExternalLoginDescription = "" - return - } if e.Key == domain.LoginKeyRegisterOrgSaveButtonText { wm.RegisterOrgSaveButtonText = "" return @@ -2128,18 +2074,10 @@ func (wm *CustomLoginTextReadModel) handleFooterTextSetEvent(e *policy.CustomTex wm.FooterTOS = e.Text return } - if e.Key == domain.LoginKeyFooterTOSLink { - wm.FooterTOSLink = e.Text - return - } - if e.Key == domain.LoginKeyFooterPrivacy { + if e.Key == domain.LoginKeyFooterPrivacyPolicy { wm.FooterPrivacyPolicy = e.Text return } - if e.Key == domain.LoginKeyFooterPrivacyLink { - wm.FooterPrivacyPolicyLink = e.Text - return - } if e.Key == domain.LoginKeyFooterHelp { wm.FooterHelp = e.Text return @@ -2155,18 +2093,10 @@ func (wm *CustomLoginTextReadModel) handleFooterTextRemoveEvent(e *policy.Custom wm.FooterTOS = "" return } - if e.Key == domain.LoginKeyFooterTOSLink { - wm.FooterTOSLink = "" - return - } - if e.Key == domain.LoginKeyFooterPrivacy { + if e.Key == domain.LoginKeyFooterPrivacyPolicy { wm.FooterPrivacyPolicy = "" return } - if e.Key == domain.LoginKeyFooterPrivacyLink { - wm.FooterPrivacyPolicyLink = "" - return - } if e.Key == domain.LoginKeyFooterHelp { wm.FooterHelp = "" return diff --git a/internal/command/iam_custom_login_text.go b/internal/command/iam_custom_login_text.go index 0f3a347b77..13292f3043 100644 --- a/internal/command/iam_custom_login_text.go +++ b/internal/command/iam_custom_login_text.go @@ -28,6 +28,26 @@ func (c *Commands) SetCustomIAMLoginText(ctx context.Context, loginText *domain. return writeModelToObjectDetails(&existingMailText.WriteModel), nil } +func (c *Commands) RemoveCustomIAMLoginTexts(ctx context.Context, lang language.Tag) (*domain.ObjectDetails, error) { + if lang == language.Und { + return nil, caos_errs.ThrowInvalidArgument(nil, "IAM-Gfbg3", "Errors.CustomText.Invalid") + } + customText, err := c.defaultLoginTextWriteModelByID(ctx, lang) + if err != nil { + return nil, err + } + if customText.State == domain.PolicyStateUnspecified || customText.State == domain.PolicyStateRemoved { + return nil, caos_errs.ThrowNotFound(nil, "IAM-fru44", "Errors.CustomText.NotFound") + } + iamAgg := IAMAggregateFromWriteModel(&customText.WriteModel) + pushedEvents, err := c.eventstore.PushEvents(ctx, iam.NewCustomTextTemplateRemovedEvent(ctx, iamAgg, domain.LoginCustomText, lang)) + err = AppendAndReduce(customText, pushedEvents...) + if err != nil { + return nil, err + } + return writeModelToObjectDetails(&customText.WriteModel), nil +} + func (c *Commands) setCustomIAMLoginText(ctx context.Context, iamAgg *eventstore.Aggregate, text *domain.CustomLoginText) ([]eventstore.EventPusher, *IAMCustomLoginTextReadModel, error) { if !text.IsValid() { return nil, nil, caos_errs.ThrowInvalidArgument(nil, "IAM-kd9fs", "Errors.CustomText.Invalid") diff --git a/internal/command/iam_custom_login_text_model.go b/internal/command/iam_custom_login_text_model.go index 7e31c7d71c..7d7edee64e 100644 --- a/internal/command/iam_custom_login_text_model.go +++ b/internal/command/iam_custom_login_text_model.go @@ -31,6 +31,8 @@ func (wm *IAMCustomLoginTextReadModel) AppendEvents(events ...eventstore.EventRe wm.CustomLoginTextReadModel.AppendEvents(&e.CustomTextSetEvent) case *iam.CustomTextRemovedEvent: wm.CustomLoginTextReadModel.AppendEvents(&e.CustomTextRemovedEvent) + case *iam.CustomTextTemplateRemovedEvent: + wm.CustomLoginTextReadModel.AppendEvents(&e.CustomTextTemplateRemovedEvent) } } } @@ -47,6 +49,7 @@ func (wm *IAMCustomLoginTextReadModel) Query() *eventstore.SearchQueryBuilder { AggregateTypes(iam.AggregateType). EventTypes( iam.CustomTextSetEventType, - iam.CustomTextRemovedEventType). + iam.CustomTextRemovedEventType, + iam.CustomTextTemplateRemovedEventType). Builder() } diff --git a/internal/command/iam_custom_login_text_test.go b/internal/command/iam_custom_login_text_test.go index 2338939694..7db23e71cf 100644 --- a/internal/command/iam_custom_login_text_test.go +++ b/internal/command/iam_custom_login_text_test.go @@ -764,11 +764,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -776,12 +771,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -789,11 +779,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -859,11 +844,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -871,12 +851,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -884,11 +859,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -976,17 +946,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -1183,47 +1143,41 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ExternalLoginDescription: "ExternalLoginDescription", }, RegistrationUser: domain.RegistrationUserScreenText{ - Title: "Title", - Description: "Description", - DescriptionOrgRegister: "DescriptionOrgRegister", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - EmailLabel: "EmailLabel", - UsernameLabel: "UsernameLabel", - LanguageLabel: "LanguageLabel", - GenderLabel: "GenderLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - NextButtonText: "NextButtonText", - BackButtonText: "BackButtonText", + Title: "Title", + Description: "Description", + DescriptionOrgRegister: "DescriptionOrgRegister", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + LanguageLabel: "LanguageLabel", + GenderLabel: "GenderLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + NextButtonText: "NextButtonText", + BackButtonText: "BackButtonText", }, RegistrationOrg: domain.RegistrationOrgScreenText{ - Title: "Title", - Description: "Description", - OrgNameLabel: "OrgNameLabel", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - UsernameLabel: "UsernameLabel", - EmailLabel: "EmailLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - SaveButtonText: "SaveButtonText", + Title: "Title", + Description: "Description", + OrgNameLabel: "OrgNameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + UsernameLabel: "UsernameLabel", + EmailLabel: "EmailLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + SaveButtonText: "SaveButtonText", }, LinkingUsersDone: domain.LinkingUserDoneScreenText{ Title: "Title", @@ -1249,12 +1203,10 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { LoginButtonText: "LoginButtonText", }, Footer: domain.FooterText{ - TOS: "TOS", - TOSLink: "TOSLink", - PrivacyPolicy: "PrivacyPolicy", - PrivacyPolicyLink: "PrivacyPolicyLink", - Help: "Help", - HelpLink: "HelpLink", + TOS: "TOS", + PrivacyPolicy: "PrivacyPolicy", + Help: "Help", + HelpLink: "HelpLink", }, }, }, @@ -1980,11 +1932,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -1992,12 +1939,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -2005,11 +1947,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -2075,11 +2012,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -2087,12 +2019,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -2100,11 +2027,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -2192,17 +2114,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -2928,11 +2840,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, language.English, @@ -2940,12 +2847,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -2953,11 +2855,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, language.English, @@ -3023,11 +2920,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, language.English, @@ -3035,12 +2927,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -3048,11 +2935,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English, @@ -3140,17 +3022,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, language.English, ), ), eventFromEventPusher( @@ -3925,11 +3797,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -3937,12 +3804,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -3950,11 +3812,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -4020,11 +3877,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -4032,12 +3884,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -4045,11 +3892,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -4137,17 +3979,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -4870,11 +4702,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, language.English, @@ -4882,12 +4709,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -4895,11 +4717,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, language.English, @@ -4965,11 +4782,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, language.English, @@ -4977,12 +4789,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -4990,11 +4797,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English, @@ -5082,17 +4884,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextRemovedEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, language.English, ), ), eventFromEventPusher( @@ -5818,11 +5610,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -5830,12 +5617,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -5843,11 +5625,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -5913,11 +5690,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -5925,12 +5697,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -5938,11 +5705,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -6030,17 +5792,7 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - iam.NewCustomTextSetEvent(context.Background(), - &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -6237,47 +5989,41 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { ExternalLoginDescription: "ExternalLoginDescription", }, RegistrationUser: domain.RegistrationUserScreenText{ - Title: "Title", - Description: "Description", - DescriptionOrgRegister: "DescriptionOrgRegister", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - EmailLabel: "EmailLabel", - UsernameLabel: "UsernameLabel", - LanguageLabel: "LanguageLabel", - GenderLabel: "GenderLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - NextButtonText: "NextButtonText", - BackButtonText: "BackButtonText", + Title: "Title", + Description: "Description", + DescriptionOrgRegister: "DescriptionOrgRegister", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + LanguageLabel: "LanguageLabel", + GenderLabel: "GenderLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + NextButtonText: "NextButtonText", + BackButtonText: "BackButtonText", }, RegistrationOrg: domain.RegistrationOrgScreenText{ - Title: "Title", - Description: "Description", - OrgNameLabel: "OrgNameLabel", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - UsernameLabel: "UsernameLabel", - EmailLabel: "EmailLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - SaveButtonText: "SaveButtonText", + Title: "Title", + Description: "Description", + OrgNameLabel: "OrgNameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + UsernameLabel: "UsernameLabel", + EmailLabel: "EmailLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + SaveButtonText: "SaveButtonText", }, LinkingUsersDone: domain.LinkingUserDoneScreenText{ Title: "Title", @@ -6303,12 +6049,10 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { LoginButtonText: "LoginButtonText", }, Footer: domain.FooterText{ - TOS: "TOS", - TOSLink: "TOSLink", - PrivacyPolicy: "PrivacyPolicy", - PrivacyPolicyLink: "PrivacyPolicyLink", - Help: "Help", - HelpLink: "HelpLink", + TOS: "TOS", + PrivacyPolicy: "PrivacyPolicy", + Help: "Help", + HelpLink: "HelpLink", }, }, }, diff --git a/internal/command/org_custom_login_text_test.go b/internal/command/org_custom_login_text_test.go index 68101589ac..b9f8d8688a 100644 --- a/internal/command/org_custom_login_text_test.go +++ b/internal/command/org_custom_login_text_test.go @@ -781,11 +781,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -793,12 +788,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -806,11 +796,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -876,11 +861,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -888,12 +868,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -901,11 +876,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -993,17 +963,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -1201,47 +1161,41 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ExternalLoginDescription: "ExternalLoginDescription", }, RegistrationUser: domain.RegistrationUserScreenText{ - Title: "Title", - Description: "Description", - DescriptionOrgRegister: "DescriptionOrgRegister", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - EmailLabel: "EmailLabel", - UsernameLabel: "UsernameLabel", - LanguageLabel: "LanguageLabel", - GenderLabel: "GenderLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - NextButtonText: "NextButtonText", - BackButtonText: "BackButtonText", + Title: "Title", + Description: "Description", + DescriptionOrgRegister: "DescriptionOrgRegister", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + LanguageLabel: "LanguageLabel", + GenderLabel: "GenderLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + NextButtonText: "NextButtonText", + BackButtonText: "BackButtonText", }, RegistrationOrg: domain.RegistrationOrgScreenText{ - Title: "Title", - Description: "Description", - OrgNameLabel: "OrgNameLabel", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - UsernameLabel: "UsernameLabel", - EmailLabel: "EmailLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - SaveButtonText: "SaveButtonText", + Title: "Title", + Description: "Description", + OrgNameLabel: "OrgNameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + UsernameLabel: "UsernameLabel", + EmailLabel: "EmailLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + SaveButtonText: "SaveButtonText", }, LinkingUsersDone: domain.LinkingUserDoneScreenText{ Title: "Title", @@ -1267,12 +1221,10 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { LoginButtonText: "LoginButtonText", }, Footer: domain.FooterText{ - TOS: "TOS", - TOSLink: "TOSLink", - PrivacyPolicy: "PrivacyPolicy", - PrivacyPolicyLink: "PrivacyPolicyLink", - Help: "Help", - HelpLink: "HelpLink", + TOS: "TOS", + PrivacyPolicy: "PrivacyPolicy", + Help: "Help", + HelpLink: "HelpLink", }, }, }, @@ -1998,11 +1950,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -2010,12 +1957,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -2023,11 +1965,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -2093,11 +2030,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -2105,12 +2037,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -2118,11 +2045,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -2210,17 +2132,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -2946,11 +2858,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, language.English, @@ -2958,12 +2865,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -2971,11 +2873,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, language.English, @@ -3041,11 +2938,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, language.English, @@ -3053,12 +2945,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -3066,11 +2953,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English, @@ -3158,17 +3040,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, language.English, ), ), eventFromEventPusher( @@ -3944,11 +3816,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -3956,12 +3823,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -3969,11 +3831,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -4039,11 +3896,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -4051,12 +3903,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -4064,11 +3911,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -4156,17 +3998,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -4889,11 +4721,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, language.English, @@ -4901,12 +4728,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -4914,11 +4736,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, language.English, @@ -4984,11 +4801,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, language.English, @@ -4996,12 +4808,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, language.English, ), ), eventFromEventPusher( @@ -5009,11 +4816,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, language.English, ), ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, language.English, - ), - ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English, @@ -5101,17 +4903,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextRemovedEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, language.English, ), ), eventFromEventPusher( @@ -5837,11 +5629,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSLinkText, "TOSLinkText", language.English, @@ -5849,12 +5636,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserTOSConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -5862,11 +5644,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserNextButtonText, "NextButtonText", language.English, @@ -5932,11 +5709,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSConfirm, "TOSConfirm", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLink, "TOSLink", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTOSLinkText, "TOSLinkText", language.English, @@ -5944,12 +5716,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyConfirm, "PrivacyConfirm", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLink, "PrivacyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTosConfirmAnd, "TOSConfirmAnd", language.English, ), ), eventFromEventPusher( @@ -5957,11 +5724,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgPrivacyLinkText, "PrivacyLinkText", language.English, ), ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgExternalLoginDescription, "ExternalLoginDescription", language.English, - ), - ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English, @@ -6049,17 +5811,7 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterTOSLink, "TOSLink", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacy, "PrivacyPolicy", language.English, - ), - ), - eventFromEventPusher( - org.NewCustomTextSetEvent(context.Background(), - &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyLink, "PrivacyPolicyLink", language.English, + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyFooterPrivacyPolicy, "PrivacyPolicy", language.English, ), ), eventFromEventPusher( @@ -6257,47 +6009,41 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ExternalLoginDescription: "ExternalLoginDescription", }, RegistrationUser: domain.RegistrationUserScreenText{ - Title: "Title", - Description: "Description", - DescriptionOrgRegister: "DescriptionOrgRegister", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - EmailLabel: "EmailLabel", - UsernameLabel: "UsernameLabel", - LanguageLabel: "LanguageLabel", - GenderLabel: "GenderLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - NextButtonText: "NextButtonText", - BackButtonText: "BackButtonText", + Title: "Title", + Description: "Description", + DescriptionOrgRegister: "DescriptionOrgRegister", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + LanguageLabel: "LanguageLabel", + GenderLabel: "GenderLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + NextButtonText: "NextButtonText", + BackButtonText: "BackButtonText", }, RegistrationOrg: domain.RegistrationOrgScreenText{ - Title: "Title", - Description: "Description", - OrgNameLabel: "OrgNameLabel", - FirstnameLabel: "FirstnameLabel", - LastnameLabel: "LastnameLabel", - UsernameLabel: "UsernameLabel", - EmailLabel: "EmailLabel", - PasswordLabel: "PasswordLabel", - PasswordConfirmLabel: "PasswordConfirmLabel", - TOSAndPrivacyLabel: "TOSAndPrivacyLabel", - TOSConfirm: "TOSConfirm", - TOSLink: "TOSLink", - TOSLinkText: "TOSLinkText", - PrivacyConfirm: "PrivacyConfirm", - PrivacyLink: "PrivacyLink", - PrivacyLinkText: "PrivacyLinkText", - ExternalLoginDescription: "ExternalLoginDescription", - SaveButtonText: "SaveButtonText", + Title: "Title", + Description: "Description", + OrgNameLabel: "OrgNameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + UsernameLabel: "UsernameLabel", + EmailLabel: "EmailLabel", + PasswordLabel: "PasswordLabel", + PasswordConfirmLabel: "PasswordConfirmLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + SaveButtonText: "SaveButtonText", }, LinkingUsersDone: domain.LinkingUserDoneScreenText{ Title: "Title", @@ -6323,12 +6069,10 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { LoginButtonText: "LoginButtonText", }, Footer: domain.FooterText{ - TOS: "TOS", - TOSLink: "TOSLink", - PrivacyPolicy: "PrivacyPolicy", - PrivacyPolicyLink: "PrivacyPolicyLink", - Help: "Help", - HelpLink: "HelpLink", + TOS: "TOS", + PrivacyPolicy: "PrivacyPolicy", + Help: "Help", + HelpLink: "HelpLink", }, }, }, diff --git a/internal/domain/custom_login_text.go b/internal/domain/custom_login_text.go index ad6aaeaf84..c15fc5dd45 100644 --- a/internal/domain/custom_login_text.go +++ b/internal/domain/custom_login_text.go @@ -149,7 +149,7 @@ const ( LoginKeyVerifyMFAU2FDescription = LoginKeyVerifyMFAU2F + "Description" LoginKeyVerifyMFAU2FNotSupported = LoginKeyVerifyMFAU2F + "NotSupported" LoginKeyVerifyMFAU2FValidateTokenText = LoginKeyVerifyMFAU2F + "ValidateTokenButtonText" - LoginKeyVerifyMFAU2FErrorRetry = LoginKeyVerifyMFAU2F + "Error.Retry" + LoginKeyVerifyMFAU2FErrorRetry = LoginKeyVerifyMFAU2F + "ErrorRetry" LoginKeyPasswordless = "Passwordless." LoginKeyPasswordlessTitle = LoginKeyPasswordless + "Title" @@ -164,7 +164,7 @@ const ( LoginKeyPasswordChangeDescription = LoginKeyPasswordChange + "Description" LoginKeyPasswordChangeOldPasswordLabel = LoginKeyPasswordChange + "OldPasswordLabel" LoginKeyPasswordChangeNewPasswordLabel = LoginKeyPasswordChange + "NewPasswordLabel" - LoginKeyPasswordChangeNewPasswordConfirmLabel = LoginKeyPasswordChange + "NewPasswordConfirmationLabel" + LoginKeyPasswordChangeNewPasswordConfirmLabel = LoginKeyPasswordChange + "NewPasswordConfirmLabel" LoginKeyPasswordChangeCancelButtonText = LoginKeyPasswordChange + "CancelButtonText" LoginKeyPasswordChangeNextButtonText = LoginKeyPasswordChange + "NextButtonText" @@ -184,48 +184,42 @@ const ( LoginKeyRegistrationOptionUserNameButtonText = LoginKeyRegistrationOption + "RegisterUsernamePasswordButtonText" LoginKeyRegistrationOptionExternalLoginDescription = LoginKeyRegistrationOption + "ExternalLoginDescription" - LoginKeyRegistrationUser = "RegistrationUser." - LoginKeyRegistrationUserTitle = LoginKeyRegistrationUser + "Title" - LoginKeyRegistrationUserDescription = LoginKeyRegistrationUser + "Description" - LoginKeyRegistrationUserDescriptionOrgRegister = LoginKeyRegistrationUser + "DescriptionOrgRegister" - LoginKeyRegistrationUserFirstnameLabel = LoginKeyRegistrationUser + "FirstnameLabel" - LoginKeyRegistrationUserLastnameLabel = LoginKeyRegistrationUser + "LastnameLabel" - LoginKeyRegistrationUserEmailLabel = LoginKeyRegistrationUser + "EmailLabel" - LoginKeyRegistrationUserUsernameLabel = LoginKeyRegistrationUser + "UsernameLabel" - LoginKeyRegistrationUserLanguageLabel = LoginKeyRegistrationUser + "LanguageLabel" - LoginKeyRegistrationUserGenderLabel = LoginKeyRegistrationUser + "GenderLabel" - LoginKeyRegistrationUserPasswordLabel = LoginKeyRegistrationUser + "PasswordLabel" - LoginKeyRegistrationUserPasswordConfirmLabel = LoginKeyRegistrationUser + "PasswordConfirmLabel" - LoginKeyRegistrationUserTOSAndPrivacyLabel = LoginKeyRegistrationUser + "TosAndPrivacyLabel" - LoginKeyRegistrationUserTOSConfirm = LoginKeyRegistrationUser + "TosConfirm" - LoginKeyRegistrationUserTOSLink = LoginKeyRegistrationUser + "TosLink" - LoginKeyRegistrationUserTOSLinkText = LoginKeyRegistrationUser + "TosLinkText" - LoginKeyRegistrationUserPrivacyConfirm = LoginKeyRegistrationUser + "TosConfirmAnd" - LoginKeyRegistrationUserPrivacyLink = LoginKeyRegistrationUser + "PrivacyLink" - LoginKeyRegistrationUserPrivacyLinkText = LoginKeyRegistrationUser + "PrivacyLinkText" - LoginKeyRegistrationUserExternalLoginDescription = LoginKeyRegistrationUser + "ExternalUserDescription" - LoginKeyRegistrationUserNextButtonText = LoginKeyRegistrationUser + "NextButtonText" - LoginKeyRegistrationUserBackButtonText = LoginKeyRegistrationUser + "BackButtonText" + LoginKeyRegistrationUser = "RegistrationUser." + LoginKeyRegistrationUserTitle = LoginKeyRegistrationUser + "Title" + LoginKeyRegistrationUserDescription = LoginKeyRegistrationUser + "Description" + LoginKeyRegistrationUserDescriptionOrgRegister = LoginKeyRegistrationUser + "DescriptionOrgRegister" + LoginKeyRegistrationUserFirstnameLabel = LoginKeyRegistrationUser + "FirstnameLabel" + LoginKeyRegistrationUserLastnameLabel = LoginKeyRegistrationUser + "LastnameLabel" + LoginKeyRegistrationUserEmailLabel = LoginKeyRegistrationUser + "EmailLabel" + LoginKeyRegistrationUserUsernameLabel = LoginKeyRegistrationUser + "UsernameLabel" + LoginKeyRegistrationUserLanguageLabel = LoginKeyRegistrationUser + "LanguageLabel" + LoginKeyRegistrationUserGenderLabel = LoginKeyRegistrationUser + "GenderLabel" + LoginKeyRegistrationUserPasswordLabel = LoginKeyRegistrationUser + "PasswordLabel" + LoginKeyRegistrationUserPasswordConfirmLabel = LoginKeyRegistrationUser + "PasswordConfirmLabel" + LoginKeyRegistrationUserTOSAndPrivacyLabel = LoginKeyRegistrationUser + "TosAndPrivacyLabel" + LoginKeyRegistrationUserTOSConfirm = LoginKeyRegistrationUser + "TosConfirm" + LoginKeyRegistrationUserTOSLinkText = LoginKeyRegistrationUser + "TosLinkText" + LoginKeyRegistrationUserTOSConfirmAnd = LoginKeyRegistrationUser + "TosConfirmAnd" + LoginKeyRegistrationUserPrivacyLinkText = LoginKeyRegistrationUser + "PrivacyLinkText" + LoginKeyRegistrationUserNextButtonText = LoginKeyRegistrationUser + "NextButtonText" + LoginKeyRegistrationUserBackButtonText = LoginKeyRegistrationUser + "BackButtonText" - LoginKeyRegistrationOrg = "RegistrationOrg." - LoginKeyRegisterOrgTitle = LoginKeyRegistrationOrg + "Title" - LoginKeyRegisterOrgDescription = LoginKeyRegistrationOrg + "Description" - LoginKeyRegisterOrgOrgNameLabel = LoginKeyRegistrationOrg + "OrgNameLabel" - LoginKeyRegisterOrgFirstnameLabel = LoginKeyRegistrationOrg + "FirstnameLabel" - LoginKeyRegisterOrgLastnameLabel = LoginKeyRegistrationOrg + "LastnameLabel" - LoginKeyRegisterOrgUsernameLabel = LoginKeyRegistrationOrg + "UsernameLabel" - LoginKeyRegisterOrgEmailLabel = LoginKeyRegistrationOrg + "EmailLabel" - LoginKeyRegisterOrgPasswordLabel = LoginKeyRegistrationOrg + "PasswordLabel" - LoginKeyRegisterOrgPasswordConfirmLabel = LoginKeyRegistrationOrg + "PasswordConfirmLabel" - LoginKeyRegisterOrgTOSAndPrivacyLabel = LoginKeyRegistrationOrg + "TosAndPrivacyLabel" - LoginKeyRegisterOrgTOSConfirm = LoginKeyRegistrationOrg + "TosConfirm" - LoginKeyRegisterOrgTOSLink = LoginKeyRegistrationOrg + "TosLink" - LoginKeyRegisterOrgTOSLinkText = LoginKeyRegistrationOrg + "TosLinkText" - LoginKeyRegisterOrgPrivacyConfirm = LoginKeyRegistrationOrg + "TosConfirmAnd" - LoginKeyRegisterOrgPrivacyLink = LoginKeyRegistrationOrg + "PrivacyLink" - LoginKeyRegisterOrgPrivacyLinkText = LoginKeyRegistrationOrg + "PrivacyLinkText" - LoginKeyRegisterOrgExternalLoginDescription = LoginKeyRegistrationOrg + "ExternalUserDescription" - LoginKeyRegisterOrgSaveButtonText = LoginKeyRegistrationOrg + "SaveButtonText" + LoginKeyRegistrationOrg = "RegistrationOrg." + LoginKeyRegisterOrgTitle = LoginKeyRegistrationOrg + "Title" + LoginKeyRegisterOrgDescription = LoginKeyRegistrationOrg + "Description" + LoginKeyRegisterOrgOrgNameLabel = LoginKeyRegistrationOrg + "OrgNameLabel" + LoginKeyRegisterOrgFirstnameLabel = LoginKeyRegistrationOrg + "FirstnameLabel" + LoginKeyRegisterOrgLastnameLabel = LoginKeyRegistrationOrg + "LastnameLabel" + LoginKeyRegisterOrgUsernameLabel = LoginKeyRegistrationOrg + "UsernameLabel" + LoginKeyRegisterOrgEmailLabel = LoginKeyRegistrationOrg + "EmailLabel" + LoginKeyRegisterOrgPasswordLabel = LoginKeyRegistrationOrg + "PasswordLabel" + LoginKeyRegisterOrgPasswordConfirmLabel = LoginKeyRegistrationOrg + "PasswordConfirmLabel" + LoginKeyRegisterOrgTOSAndPrivacyLabel = LoginKeyRegistrationOrg + "TosAndPrivacyLabel" + LoginKeyRegisterOrgTOSConfirm = LoginKeyRegistrationOrg + "TosConfirm" + LoginKeyRegisterOrgTOSLinkText = LoginKeyRegistrationOrg + "TosLinkText" + LoginKeyRegisterOrgTosConfirmAnd = LoginKeyRegistrationOrg + "TosConfirmAnd" + LoginKeyRegisterOrgPrivacyLinkText = LoginKeyRegistrationOrg + "PrivacyLinkText" + LoginKeyRegisterOrgSaveButtonText = LoginKeyRegistrationOrg + "SaveButtonText" LoginKeyLinkingUserDone = "LinkingUsersDone." LoginKeyLinkingUserDoneTitle = LoginKeyLinkingUserDone + "Title" @@ -250,13 +244,11 @@ const ( LoginKeyLogoutDoneDescription = LoginKeyLogoutDone + "Description" LoginKeyLogoutDoneLoginButtonText = LoginKeyLogoutDone + "LoginButtonText" - LoginKeyFooter = "Footer." - LoginKeyFooterTOS = LoginKeyFooter + "Tos" - LoginKeyFooterTOSLink = LoginKeyFooter + "TosLink" - LoginKeyFooterPrivacy = LoginKeyFooter + "Privacy" - LoginKeyFooterPrivacyLink = LoginKeyFooter + "PrivacyLink" - LoginKeyFooterHelp = LoginKeyFooter + "Help" - LoginKeyFooterHelpLink = LoginKeyFooter + "HelpLink" + LoginKeyFooter = "Footer." + LoginKeyFooterTOS = LoginKeyFooter + "Tos" + LoginKeyFooterPrivacyPolicy = LoginKeyFooter + "PrivacyPolicy" + LoginKeyFooterHelp = LoginKeyFooter + "Help" + LoginKeyFooterHelpLink = LoginKeyFooter + "HelpLink" ) type CustomLoginText struct { @@ -501,48 +493,42 @@ type RegistrationOptionScreenText struct { } type RegistrationUserScreenText struct { - Title string - Description string - DescriptionOrgRegister string - FirstnameLabel string - LastnameLabel string - EmailLabel string - UsernameLabel string - LanguageLabel string - GenderLabel string - PasswordLabel string - PasswordConfirmLabel string - TOSAndPrivacyLabel string - TOSConfirm string - TOSLink string - TOSLinkText string - PrivacyConfirm string - PrivacyLink string - PrivacyLinkText string - ExternalLoginDescription string - NextButtonText string - BackButtonText string + Title string + Description string + DescriptionOrgRegister string + FirstnameLabel string + LastnameLabel string + EmailLabel string + UsernameLabel string + LanguageLabel string + GenderLabel string + PasswordLabel string + PasswordConfirmLabel string + TOSAndPrivacyLabel string + TOSConfirm string + TOSLinkText string + TOSConfirmAnd string + PrivacyLinkText string + NextButtonText string + BackButtonText string } type RegistrationOrgScreenText struct { - Title string - Description string - OrgNameLabel string - FirstnameLabel string - LastnameLabel string - UsernameLabel string - EmailLabel string - PasswordLabel string - PasswordConfirmLabel string - TOSAndPrivacyLabel string - TOSConfirm string - TOSLink string - TOSLinkText string - PrivacyConfirm string - PrivacyLink string - PrivacyLinkText string - ExternalLoginDescription string - SaveButtonText string + Title string + Description string + OrgNameLabel string + FirstnameLabel string + LastnameLabel string + UsernameLabel string + EmailLabel string + PasswordLabel string + PasswordConfirmLabel string + TOSAndPrivacyLabel string + TOSConfirm string + TOSLinkText string + TOSConfirmAnd string + PrivacyLinkText string + SaveButtonText string } type LinkingUserDoneScreenText struct { @@ -573,10 +559,8 @@ type LogoutDoneScreenText struct { } type FooterText struct { - TOS string - TOSLink string - PrivacyPolicy string - PrivacyPolicyLink string - Help string - HelpLink string + TOS string + PrivacyPolicy string + Help string + HelpLink string } diff --git a/internal/iam/repository/eventsourcing/model/types.go b/internal/iam/repository/eventsourcing/model/types.go index 2f7d431cb7..eea13aeefe 100644 --- a/internal/iam/repository/eventsourcing/model/types.go +++ b/internal/iam/repository/eventsourcing/model/types.go @@ -55,8 +55,9 @@ const ( MailTemplateAdded models.EventType = "iam.mail.template.added" MailTemplateChanged models.EventType = "iam.mail.template.changed" - CustomTextSet models.EventType = "iam.customtext.set" - CustomTextRemoved models.EventType = "iam.customtext.removed" + CustomTextSet models.EventType = "iam.customtext.set" + CustomTextRemoved models.EventType = "iam.customtext.removed" + CustomTextMessageRemoved models.EventType = "iam.customtext.template.removed" PasswordComplexityPolicyAdded models.EventType = "iam.policy.password.complexity.added" PasswordComplexityPolicyChanged models.EventType = "iam.policy.password.complexity.changed" diff --git a/internal/iam/repository/view/custom_text_view.go b/internal/iam/repository/view/custom_text_view.go index cdd76f6583..dddcdfdd76 100644 --- a/internal/iam/repository/view/custom_text_view.go +++ b/internal/iam/repository/view/custom_text_view.go @@ -86,3 +86,11 @@ func DeleteCustomText(db *gorm.DB, table, aggregateID, template, lang, key strin delete := repository.PrepareDeleteByKeys(table, aggregateIDSearch, templateSearch, keySearch, languageSearch) return delete(db) } + +func DeleteCustomTextTemplate(db *gorm.DB, table, aggregateID, template, lang string) error { + aggregateIDSearch := repository.Key{Key: model.CustomTextSearchKey(iam_model.CustomTextSearchKeyAggregateID), Value: aggregateID} + templateSearch := repository.Key{Key: model.CustomTextSearchKey(iam_model.CustomTextSearchKeyTemplate), Value: template} + languageSearch := repository.Key{Key: model.CustomTextSearchKey(iam_model.CustomTextSearchKeyLanguage), Value: lang} + delete := repository.PrepareDeleteByKeys(table, aggregateIDSearch, templateSearch, languageSearch) + return delete(db) +} diff --git a/internal/iam/repository/view/model/custom_text.go b/internal/iam/repository/view/model/custom_text.go index 5c5f72b6fe..272ea49c4c 100644 --- a/internal/iam/repository/view/model/custom_text.go +++ b/internal/iam/repository/view/model/custom_text.go @@ -16,7 +16,6 @@ import ( caos_errs "github.com/caos/zitadel/internal/errors" "github.com/caos/zitadel/internal/eventstore/v1/models" - "github.com/caos/zitadel/internal/iam/model" ) const ( @@ -39,19 +38,6 @@ type CustomTextView struct { Sequence uint64 `json:"-" gorm:"column:sequence"` } -func CustomTextViewFromModel(template *model.CustomTextView) *CustomTextView { - return &CustomTextView{ - AggregateID: template.AggregateID, - Sequence: template.Sequence, - CreationDate: template.CreationDate, - ChangeDate: template.ChangeDate, - Language: template.Language.String(), - Template: template.Template, - Key: template.Key, - Text: template.Text, - } -} - func CustomTextViewsToDomain(texts []*CustomTextView) []*domain.CustomText { result := make([]*domain.CustomText, len(texts)) for i, text := range texts { @@ -323,7 +309,7 @@ func loginKeyToDomain(text *CustomTextView, result *domain.CustomLoginText) { } func passwordKeyToDomain(text *CustomTextView, result *domain.CustomLoginText) { - if text.Key == domain.LoginKeyPasswordlessValidateTokenButtonText { + if text.Key == domain.LoginKeyPasswordTitle { result.Password.Title = text.Text } if text.Key == domain.LoginKeyPasswordDescription { @@ -491,7 +477,7 @@ func initializeUserKeyToDomain(text *CustomTextView, result *domain.CustomLoginT } func initializeUserDoneKeyToDomain(text *CustomTextView, result *domain.CustomLoginText) { - if text.Key == domain.LoginKeyInitUserDone { + if text.Key == domain.LoginKeyInitUserDoneTitle { result.InitUserDone.Title = text.Text } if text.Key == domain.LoginKeyInitUserDoneDescription { @@ -755,24 +741,15 @@ func registrationUserKeyToDomain(text *CustomTextView, result *domain.CustomLogi if text.Key == domain.LoginKeyRegistrationUserTOSConfirm { result.RegistrationUser.TOSConfirm = text.Text } - if text.Key == domain.LoginKeyRegistrationUserTOSLink { - result.RegistrationUser.TOSLink = text.Text - } if text.Key == domain.LoginKeyRegistrationUserTOSLinkText { result.RegistrationUser.TOSLinkText = text.Text } - if text.Key == domain.LoginKeyRegistrationUserPrivacyConfirm { - result.RegistrationUser.PrivacyConfirm = text.Text - } - if text.Key == domain.LoginKeyRegistrationUserPrivacyLink { - result.RegistrationUser.PrivacyLink = text.Text + if text.Key == domain.LoginKeyRegistrationUserTOSConfirmAnd { + result.RegistrationUser.TOSConfirmAnd = text.Text } if text.Key == domain.LoginKeyRegistrationUserPrivacyLinkText { result.RegistrationUser.PrivacyLinkText = text.Text } - if text.Key == domain.LoginKeyRegistrationUserExternalLoginDescription { - result.RegistrationUser.ExternalLoginDescription = text.Text - } if text.Key == domain.LoginKeyRegistrationUserNextButtonText { result.RegistrationUser.NextButtonText = text.Text } @@ -815,24 +792,15 @@ func registrationOrgKeyToDomain(text *CustomTextView, result *domain.CustomLogin if text.Key == domain.LoginKeyRegisterOrgTOSConfirm { result.RegistrationOrg.TOSConfirm = text.Text } - if text.Key == domain.LoginKeyRegisterOrgTOSLink { - result.RegistrationOrg.TOSLink = text.Text - } if text.Key == domain.LoginKeyRegisterOrgTOSLinkText { result.RegistrationOrg.TOSLinkText = text.Text } - if text.Key == domain.LoginKeyRegisterOrgPrivacyConfirm { - result.RegistrationOrg.PrivacyConfirm = text.Text - } - if text.Key == domain.LoginKeyRegisterOrgPrivacyLink { - result.RegistrationOrg.PrivacyLink = text.Text + if text.Key == domain.LoginKeyRegisterOrgTosConfirmAnd { + result.RegistrationOrg.TOSConfirmAnd = text.Text } if text.Key == domain.LoginKeyRegisterOrgPrivacyLinkText { result.RegistrationOrg.PrivacyLinkText = text.Text } - if text.Key == domain.LoginKeyRegisterOrgExternalLoginDescription { - result.RegistrationOrg.ExternalLoginDescription = text.Text - } if text.Key == domain.LoginKeyRegisterOrgSaveButtonText { result.RegistrationOrg.SaveButtonText = text.Text } @@ -899,15 +867,9 @@ func footerKeyToDomain(text *CustomTextView, result *domain.CustomLoginText) { if text.Key == domain.LoginKeyFooterTOS { result.Footer.TOS = text.Text } - if text.Key == domain.LoginKeyFooterTOSLink { - result.Footer.TOSLink = text.Text - } - if text.Key == domain.LoginKeyFooterPrivacy { + if text.Key == domain.LoginKeyFooterPrivacyPolicy { result.Footer.PrivacyPolicy = text.Text } - if text.Key == domain.LoginKeyFooterPrivacyLink { - result.Footer.PrivacyPolicyLink = text.Text - } if text.Key == domain.LoginKeyFooterHelp { result.Footer.Help = text.Text } diff --git a/internal/management/repository/eventsourcing/handler/custom_text.go b/internal/management/repository/eventsourcing/handler/custom_text.go index 68ff18f165..4d9bc7ec00 100644 --- a/internal/management/repository/eventsourcing/handler/custom_text.go +++ b/internal/management/repository/eventsourcing/handler/custom_text.go @@ -106,6 +106,13 @@ func (m *CustomText) processCustomText(event *es_models.Event) (err error) { return err } return m.view.DeleteCustomText(event.AggregateID, text.Template, text.Language, text.Key, event) + case iam_es_model.CustomTextMessageRemoved, model.CustomTextMessageRemoved: + text := new(iam_model.CustomTextView) + err = text.SetData(event) + if err != nil { + return err + } + return m.view.DeleteCustomTextTemplate(event.AggregateID, text.Template, text.Language, event) default: return m.view.ProcessedCustomTextSequence(event) } diff --git a/internal/management/repository/eventsourcing/view/custom_texts.go b/internal/management/repository/eventsourcing/view/custom_texts.go index 40ac572b94..c8e1bb5aad 100644 --- a/internal/management/repository/eventsourcing/view/custom_texts.go +++ b/internal/management/repository/eventsourcing/view/custom_texts.go @@ -36,6 +36,14 @@ func (v *View) DeleteCustomText(aggregateID, textType, lang, key string, event * return v.ProcessedCustomTextSequence(event) } +func (v *View) DeleteCustomTextTemplate(aggregateID, textType, lang string, event *models.Event) error { + err := view.DeleteCustomTextTemplate(v.Db, customTextTable, aggregateID, textType, lang) + if err != nil && !errors.IsNotFound(err) { + return err + } + return v.ProcessedCustomTextSequence(event) +} + func (v *View) GetLatestCustomTextSequence() (*global_view.CurrentSequence, error) { return v.latestSequence(customTextTable) } diff --git a/internal/notification/repository/eventsourcing/handler/custom_text.go b/internal/notification/repository/eventsourcing/handler/custom_text.go index 2a3bc667db..9250857f46 100644 --- a/internal/notification/repository/eventsourcing/handler/custom_text.go +++ b/internal/notification/repository/eventsourcing/handler/custom_text.go @@ -107,6 +107,13 @@ func (m *CustomText) processCustomText(event *es_models.Event) (err error) { return err } return m.view.DeleteCustomText(event.AggregateID, text.Template, text.Language, text.Key, event) + case iam_es_model.CustomTextMessageRemoved, model.CustomTextMessageRemoved: + text := new(iam_model.CustomTextView) + err = text.SetData(event) + if err != nil { + return err + } + return m.view.DeleteCustomTextTemplate(event.AggregateID, text.Template, text.Language, event) default: return m.view.ProcessedCustomTextSequence(event) } diff --git a/internal/notification/repository/eventsourcing/view/custom_texts.go b/internal/notification/repository/eventsourcing/view/custom_texts.go index b65fb5ded2..02313b216c 100644 --- a/internal/notification/repository/eventsourcing/view/custom_texts.go +++ b/internal/notification/repository/eventsourcing/view/custom_texts.go @@ -40,6 +40,14 @@ func (v *View) DeleteCustomText(aggregateID, textType, lang, key string, event * return v.ProcessedCustomTextSequence(event) } +func (v *View) DeleteCustomTextTemplate(aggregateID, textType, lang string, event *models.Event) error { + err := view.DeleteCustomTextTemplate(v.Db, customTextTable, aggregateID, textType, lang) + if err != nil && !errors.IsNotFound(err) { + return err + } + return v.ProcessedCustomTextSequence(event) +} + func (v *View) GetLatestCustomTextSequence() (*global_view.CurrentSequence, error) { return v.latestSequence(customTextTable) } diff --git a/internal/repository/iam/custom_text.go b/internal/repository/iam/custom_text.go index de24a7e9b4..924073f4ab 100644 --- a/internal/repository/iam/custom_text.go +++ b/internal/repository/iam/custom_text.go @@ -11,8 +11,9 @@ import ( ) var ( - CustomTextSetEventType = iamEventTypePrefix + policy.CustomTextSetEventType - CustomTextRemovedEventType = iamEventTypePrefix + policy.CustomTextRemovedEventType + CustomTextSetEventType = iamEventTypePrefix + policy.CustomTextSetEventType + CustomTextRemovedEventType = iamEventTypePrefix + policy.CustomTextRemovedEventType + CustomTextTemplateRemovedEventType = iamEventTypePrefix + policy.CustomTextTemplateRemovedEventType ) type CustomTextSetEvent struct { @@ -74,3 +75,31 @@ func CustomTextRemovedEventMapper(event *repository.Event) (eventstore.EventRead return &CustomTextRemovedEvent{CustomTextRemovedEvent: *e.(*policy.CustomTextRemovedEvent)}, nil } + +type CustomTextTemplateRemovedEvent struct { + policy.CustomTextTemplateRemovedEvent +} + +func NewCustomTextTemplateRemovedEvent( + ctx context.Context, + aggregate *eventstore.Aggregate, + template string, + language language.Tag, +) *CustomTextTemplateRemovedEvent { + return &CustomTextTemplateRemovedEvent{ + CustomTextTemplateRemovedEvent: *policy.NewCustomTextTemplateRemovedEvent( + eventstore.NewBaseEventForPush(ctx, aggregate, CustomTextTemplateRemovedEventType), + template, + language, + ), + } +} + +func CustomTextTemplateRemovedEventMapper(event *repository.Event) (eventstore.EventReader, error) { + e, err := policy.CustomTextTemplateRemovedEventMapper(event) + if err != nil { + return nil, err + } + + return &CustomTextTemplateRemovedEvent{CustomTextTemplateRemovedEvent: *e.(*policy.CustomTextTemplateRemovedEvent)}, nil +} diff --git a/internal/repository/iam/eventstore.go b/internal/repository/iam/eventstore.go index fe89141f02..afd63c03ad 100644 --- a/internal/repository/iam/eventstore.go +++ b/internal/repository/iam/eventstore.go @@ -60,5 +60,6 @@ func RegisterEventMappers(es *eventstore.Eventstore) { RegisterFilterEventMapper(MailTextChangedEventType, MailTextChangedEventMapper). RegisterFilterEventMapper(CustomTextSetEventType, CustomTextSetEventMapper). RegisterFilterEventMapper(CustomTextRemovedEventType, CustomTextRemovedEventMapper). + RegisterFilterEventMapper(CustomTextTemplateRemovedEventType, CustomTextTemplateRemovedEventMapper). RegisterFilterEventMapper(FeaturesSetEventType, FeaturesSetEventMapper) } diff --git a/internal/ui/login/static/i18n/de.yaml b/internal/ui/login/static/i18n/de.yaml index a8eb109319..285808051e 100644 --- a/internal/ui/login/static/i18n/de.yaml +++ b/internal/ui/login/static/i18n/de.yaml @@ -47,7 +47,6 @@ UsernameChangeDone: Description: Der Username wurde erfolgreich geändert. NextButtonText: next - InitPassword: Title: Passwort setzen Description: Du hast einen Code erhalten, welcher im untenstehenden Formular eingegeben werden muss um ein neues Passwort zu setzen. @@ -140,7 +139,7 @@ PasswordChange: Description: Ändere dein Password in dem du dein altes und dann dein neuen Passwort eingibst. OldPasswordLabel: Altes Passwort NewPasswordLabel: Neues Passwort - NewPasswordConfirmationLabel: Passwort Bestätigung + NewPasswordConfirmLabel: Passwort Bestätigung CancelButtonText: abbrechen NextButtonText: weiter @@ -159,7 +158,7 @@ EmailVerification: Description: Du hast ein E-Mail zur Verifizierung deiner E-Mail Adresse bekommen. Gib den Code im untenstehenden Formular ein. Mit erneut versenden, wird dir ein neues E-Mail zugestellt. CodeLabel: Code NextButtonText: weiter - ResendButtonText: erneut sende + ResendButtonText: erneut senden EmailVerificationDone: Title: E-Mail Verifizierung @@ -217,6 +216,17 @@ RegistrationOrg: PrivacyLinkText: Datenschutzerklärung SaveButtonText: speichern +LoginSuccess: + Title: Erfolgreich eingeloggt + AutoRedirectDescription: Du wirst automatisch zurück in die Applikation geleitet. Danach kannst du diese Fenster schliessen. + RedirectedDescription: Du kannst diese Fenster nun schliessen. + NextButtonText: weiter + +LogoutDone: + Title: Ausgeloggt + Description: Du wurdest erfolgreich ausgeloggt. + LoginButtonText: anmelden + LinkingUsersDone: Title: Benutzerlinking Description: Benuzterlinking erledigt. @@ -229,21 +239,10 @@ ExternalNotFoundOption: LinkButtonText: Verlinken AutoRegisterButtonText: Automatisches registrieren -LoginSuccess: - Title: Erfolgreich eingeloggt - AutoRedirectDescription: Du wirst automatisch zurück in die Applikation geleitet. Danach kannst du diese Fenster schliessen. - RedirectedDescription: Du kannst diese Fenster nun schliessen. - NextButtonText: weiter - -LogoutDone: - Title: Ausgeloggt - Description: Du wurdest erfolgreich ausgeloggt. - LoginButtonText: anmelden - Footer: PoweredBy: Powered By Tos: AGB - Privacy: Datenschutzerklärung + PrivacyPolicy: Datenschutzerklärung Help: Hilfe HelpLink: https://docs.zitadel.ch/docs/manuals/user-login diff --git a/internal/ui/login/static/i18n/en.yaml b/internal/ui/login/static/i18n/en.yaml index 9bd0fbcfd7..a3921a8e99 100644 --- a/internal/ui/login/static/i18n/en.yaml +++ b/internal/ui/login/static/i18n/en.yaml @@ -1,7 +1,7 @@ Login: Title: Welcome back! - Description: Enter your logindata. - TitleLinking: Login for userlinking + Description: Enter your login data. + TitleLinking: Login for user linking DescriptionLinking: Enter your login data to link your external user with a ZITADEL user. LoginNameLabel: Loginname UsernamePlaceHolder: username @@ -14,7 +14,7 @@ Login: SelectAccount: Title: Select account Description: Use your ZITADEL-Account - TitleLinking: Select account for userlinking + TitleLinking: Select account for user linking DescriptionLinking: Select your account to link with your external user. OtherUser: Other User SessionState0: active @@ -23,9 +23,9 @@ SelectAccount: Password: Title: Password - Description: Enter your logindata. + Description: Enter your login data. PasswordLabel: Password - MinLength: Minimumlength + MinLength: Minimum length HasUppercase: Uppercase letter HasLowercase: Lowercase letter HasNumber: Number @@ -82,8 +82,8 @@ InitMFAPrompt: Description: Would you like to setup multifactor authentication? Provider0: OTP (One Time Password) Provider1: U2F (Universal 2nd Factor) - NextButtonText: weiter - SkipButtonText: überspringen + NextButtonText: next + SkipButtonText: skip InitMFAOTP: Title: Multifactor Verification @@ -132,14 +132,14 @@ Passwordless: NotSupported: WebAuthN is not supported by your browser. Please ensure it is up to date or use a different one (e.g. Chrome, Safari, Firefox) ErrorRetry: Retry, create a new challenge or choose a different method. LoginWithPwButtonText: Login with password - ValidateTokenButtonText: Token validieren + ValidateTokenButtonText: Validate Token PasswordChange: Title: Change Password Description: Change your password. Enter your old and new password. OldPasswordLabel: Old Password NewPasswordLabel: New Password - NewPasswordConfirmationLabel: Password confirmation + NewPasswordConfirmLabel: Password confirmation CancelButtonText: cancel NextButtonText: next @@ -242,7 +242,7 @@ ExternalNotFoundOption: Footer: PoweredBy: Powered By Tos: TOS - Privacy: Privacy policy + PrivacyPolicy: Privacy policy Help: Help HelpLink: https://docs.zitadel.ch/docs/manuals/user-login diff --git a/internal/ui/login/static/templates/mfa_init_u2f.html b/internal/ui/login/static/templates/mfa_init_u2f.html index 5be18b549b..5e47d8f2ba 100644 --- a/internal/ui/login/static/templates/mfa_init_u2f.html +++ b/internal/ui/login/static/templates/mfa_init_u2f.html @@ -19,7 +19,7 @@
- +