@eui/tools 6.5.6 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc.json +19 -0
- package/.version.properties +1 -1
- package/CHANGELOG.md +9 -0
- package/bin/eui-scripts.js +2 -0
- package/bin/scripts/csdr-app-package-init.js +16 -0
- package/bin/scripts/csdr-cli.js +1 -1
- package/package.json +1 -1
- package/scripts/app/public/index.html +22 -170
- package/scripts/app/public/index.js +95 -0
- package/scripts/app/public/package-init.html +254 -0
- package/scripts/app/public/package-init.js +138 -0
- package/scripts/app/public/stats.html +60 -125
- package/scripts/app/public/stats.js +68 -0
- package/scripts/app/routes/index.js +28 -9
- package/scripts/app/server.js +2 -0
- package/scripts/csdr/cli/cli-utils.js +2 -30
- package/scripts/csdr/cli/constants.js +1 -12
- package/scripts/csdr/cli/package-build-backend.js +18 -0
- package/scripts/csdr/cli/package-build-frontend.js +47 -164
- package/scripts/csdr/cli/package-prompt.js +0 -84
- package/scripts/csdr/cli/package.js +65 -14
- package/scripts/csdr/config/register.js +71 -158
- package/scripts/index.js +0 -1
- package/scripts/csdr/cli/app.js +0 -204
- package/scripts/csdr/cli/skeletons/app/angular-config.json +0 -31
- package/scripts/csdr/cli/skeletons/app/dependencies-base.json +0 -2
- package/scripts/csdr/cli/skeletons/app/dependencies-composite.json +0 -6
- package/scripts/csdr/cli/skeletons/app/gitignore_TO_REPLACE +0 -63
- package/scripts/csdr/cli/skeletons/app/mock/json/core/user.js +0 -31
- package/scripts/csdr/cli/skeletons/app/mock/json/lowdb.js +0 -25
- package/scripts/csdr/cli/skeletons/app/mock/json/middlewares/delay.js +0 -10
- package/scripts/csdr/cli/skeletons/app/mock/json/middlewares/errors.js +0 -73
- package/scripts/csdr/cli/skeletons/app/mock/json/middlewares/sse.js +0 -28
- package/scripts/csdr/cli/skeletons/app/mock/json/routes.json +0 -3
- package/scripts/csdr/cli/skeletons/app/mock/json/server.js +0 -38
- package/scripts/csdr/cli/skeletons/app/package.json +0 -6
- package/scripts/csdr/cli/skeletons/app/scripts.json +0 -7
- package/scripts/csdr/cli/skeletons/app/src/app/app-routing.module.ts +0 -32
- package/scripts/csdr/cli/skeletons/app/src/app/app.component.html +0 -1
- package/scripts/csdr/cli/skeletons/app/src/app/app.component.ts +0 -9
- package/scripts/csdr/cli/skeletons/app/src/app/app.module.ts +0 -68
- package/scripts/csdr/cli/skeletons/app/src/app/core/app-shell/app-shell.component.html +0 -27
- package/scripts/csdr/cli/skeletons/app/src/app/core/app-shell/app-shell.component.ts +0 -188
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/about/about.component.html +0 -30
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/about/about.component.ts +0 -71
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/error-pages/page-404/page-404.component.ts +0 -19
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/error-pages/page-500/page-500.component.ts +0 -18
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile/profile.component.html +0 -104
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile/profile.component.scss +0 -44
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile/profile.component.ts +0 -39
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile-menu/profile-menu.component.html +0 -26
- package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile-menu/profile-menu.component.ts +0 -104
- package/scripts/csdr/cli/skeletons/app/src/app/core/core.module.ts +0 -46
- package/scripts/csdr/cli/skeletons/app/src/app/core/services/core.service.ts +0 -124
- package/scripts/csdr/cli/skeletons/app/src/app/features/home/home-routing.module.ts +0 -15
- package/scripts/csdr/cli/skeletons/app/src/app/features/home/home.component.html +0 -6
- package/scripts/csdr/cli/skeletons/app/src/app/features/home/home.component.ts +0 -8
- package/scripts/csdr/cli/skeletons/app/src/app/features/home/home.module.ts +0 -18
- package/scripts/csdr/cli/skeletons/app/src/app/features/sample-lib.module.ts +0 -9
- package/scripts/csdr/cli/skeletons/app/src/app/shared/components/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/app/src/app/shared/shared.module.ts +0 -20
- package/scripts/csdr/cli/skeletons/app/src/assets/i18n/en.json +0 -3
- package/scripts/csdr/cli/skeletons/app/src/assets/i18n/fr.json +0 -3
- package/scripts/csdr/cli/skeletons/app/src/assets/openid-login-config.local-mwp-dev.json +0 -144
- package/scripts/csdr/cli/skeletons/app/src/assets/openid-login-config.local.json +0 -36
- package/scripts/csdr/cli/skeletons/app/src/config/global.ts +0 -9
- package/scripts/csdr/cli/skeletons/app/src/config/index.ts +0 -8
- package/scripts/csdr/cli/skeletons/app/src/config/modules.ts +0 -13
- package/scripts/csdr/cli/skeletons/app/src/environments/environment.dev.ts +0 -4
- package/scripts/csdr/cli/skeletons/app/src/environments/environment.local-mwp-dev-openid.ts +0 -6
- package/scripts/csdr/cli/skeletons/app/src/environments/environment.local-openid.ts +0 -5
- package/scripts/csdr/cli/skeletons/app/src/environments/environment.prod.ts +0 -12
- package/scripts/csdr/cli/skeletons/app/src/environments/environment.ts +0 -5
- package/scripts/csdr/cli/skeletons/app/src/index.html +0 -24
- package/scripts/csdr/cli/skeletons/app/src/styles.scss +0 -1
- package/scripts/csdr/cli/skeletons/app/tslint.json +0 -17
- package/scripts/csdr/cli/skeletons/app-eui10/angular-config.json +0 -20
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-composite.json +0 -5
- package/scripts/csdr/cli/skeletons/app-eui10/gitignore_TO_REPLACE +0 -63
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/models/user.js +0 -8
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/index.js +0 -5
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/user_routes.js +0 -24
- package/scripts/csdr/cli/skeletons/app-eui10/mock/db/db.json +0 -12
- package/scripts/csdr/cli/skeletons/app-eui10/mock/server.js +0 -16
- package/scripts/csdr/cli/skeletons/app-eui10/package.json +0 -6
- package/scripts/csdr/cli/skeletons/app-eui10/scripts.json +0 -5
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-routing.module.ts +0 -18
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-starter.service.ts +0 -68
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.html +0 -29
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.ts +0 -55
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.module.ts +0 -27
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/components/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/core.module.ts +0 -84
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/reducers/index.ts +0 -33
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home-routing.module.ts +0 -15
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.html +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.ts +0 -19
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.module.ts +0 -18
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.html +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.ts +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.html +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.ts +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1-routing.module.ts +0 -18
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.html +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.ts +0 -8
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.module.ts +0 -21
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2-routing.module.ts +0 -16
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.html +0 -8
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.ts +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.module.ts +0 -17
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/shared.module.ts +0 -21
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/testing/router.mock.ts +0 -18
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/config/env-json-config.json +0 -8
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/en.json +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/fr.json +0 -7
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/global.ts +0 -26
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/index.ts +0 -8
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/modules.ts +0 -4
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.prod.ts +0 -9
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.ts +0 -9
- package/scripts/csdr/cli/skeletons/app-eui10/src/index.html +0 -21
- package/scripts/csdr/cli/skeletons/app-eui10/src/styles.scss +0 -1
- package/scripts/csdr/cli/skeletons/app-eui10/tslint.json +0 -17
- package/scripts/csdr/cli/skeletons/app-showcase/angular-config.json +0 -103
- package/scripts/csdr/cli/skeletons/app-showcase/dependencies-composite.json +0 -5
- package/scripts/csdr/cli/skeletons/app-showcase/gitignore_TO_REPLACE +0 -50
- package/scripts/csdr/cli/skeletons/app-showcase/package.json +0 -6
- package/scripts/csdr/cli/skeletons/app-showcase/scripts.json +0 -3
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app-routing.module.ts +0 -21
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.component.html +0 -24
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.component.ts +0 -19
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.routes.ts +0 -7
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home-routing.module.ts +0 -15
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home.component.html +0 -7
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home.component.ts +0 -8
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home.module.ts +0 -17
- package/scripts/csdr/cli/skeletons/app-showcase/src/assets/app-metadata.json +0 -8
- package/scripts/csdr/cli/skeletons/app-showcase/src/assets/config/env-json-config.json +0 -41
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +0 -33
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +0 -5
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +0 -50
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +0 -6
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +0 -3
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +0 -21
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +0 -26
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +0 -19
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +0 -7
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +0 -15
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +0 -7
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +0 -8
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +0 -17
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/shared/shared.module.ts +0 -15
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +0 -8
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +0 -41
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/index.html +0 -22
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/remote-sources/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/dependencies-base.json +0 -2
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/dependencies-composite.json +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/dummy.spec.ts.TO_REPLACE +0 -5
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.lib.json +0 -32
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tslint.json +0 -17
- package/scripts/csdr/cli/skeletons/package/frontend-eui13/dependencies-composite.json +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/index.ts +0 -2
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.html +0 -1
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.spec.ts.TO_REPLACE +0 -25
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.ts +0 -14
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/module.ts +0 -17
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/routing.module.ts +0 -14
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/angular.json +0 -90
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/browserslist +0 -6
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-base.json +0 -2
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite-ACC.json +0 -4
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite-DLT.json +0 -4
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite-INT.json +0 -4
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite-PROD.json +0 -4
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite-TRN.json +0 -4
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite.json +0 -8
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/gitignore_TO_REPLACE +0 -65
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/karma.conf.js +0 -7
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +0 -8
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.scss +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.spec.ts +0 -6
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/eui-components.ts +0 -11
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/fallback.component.ts +0 -11
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +0 -91
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +0 -87
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/custom-route-serializer.ts +0 -28
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/index.ts +0 -43
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +0 -33
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/assets/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +0 -42
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/index.ts +0 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/modules.ts +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.prod.ts +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/favicon.ico +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/index.html +0 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/main.ts +0 -12
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/polyfills.ts +0 -87
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.app.json +0 -20
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.spec.json +0 -18
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint-remote.json +0 -7
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint.json +0 -17
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/webpack.extra.js +0 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/dummy.scss +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/dummy.spec.ts +0 -6
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/eui-components.ts +0 -9
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/fallback.component.ts +0 -11
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/module.component.ts +0 -91
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/module.ts +0 -87
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/reducers/custom-route-serializer.ts +0 -28
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/reducers/index.ts +0 -43
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/routing.module.ts +0 -33
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/assets/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/config/global.ts +0 -55
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/config/index.ts +0 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/config/modules.ts +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/environments/environment.prod.ts +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/environments/environment.ts +0 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/favicon.ico +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/index.html +0 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/main.ts +0 -12
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/polyfills.ts +0 -87
- package/scripts/csdr/cli/skeletons/virtual-remote/10.x/angular-config.json +0 -9
- package/scripts/csdr/cli/skeletons/virtual-remote/10.x/dependencies.json +0 -20
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/assets/i18n/en.json +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/assets/i18n/fr.json +0 -0
- /package/scripts/csdr/cli/skeletons/{app-eui10 → package/frontend-eui15}/dependencies-base.json +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/gitignore_TO_REPLACE +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/karma.conf.js +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/ng-package.json +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/package.json +0 -0
- /package/scripts/csdr/cli/skeletons/{app/src/app/core → package/frontend-eui15/src}/dummy.spec.ts.TO_REPLACE +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/src/index.ts +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/src/lib/module.ts +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/src/test.ts.TO_REPLACE +0 -0
- /package/scripts/csdr/cli/skeletons/package/{frontend-eui10 → frontend-eui15}/tsconfig.spec.json +0 -0
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<ux-app-shell [sidebarLinks]="sidebarLinks"
|
|
2
|
-
themeClass="ux-t-shell-extended"
|
|
3
|
-
homeUrlLabel="/App"
|
|
4
|
-
appName="App"
|
|
5
|
-
appNameSmall="APP"
|
|
6
|
-
appVersion="{{appVersion}}"
|
|
7
|
-
appReleaseDate="{{appReleaseDate}}"
|
|
8
|
-
[isConnected]="appConnection | async"
|
|
9
|
-
[userFirstName]="(userState | async)?.firstName"
|
|
10
|
-
[userLastName]="(userState | async)?.lastName"
|
|
11
|
-
(languageChanged)="onLanguageChanged($event)">
|
|
12
|
-
|
|
13
|
-
<ux-app-shell-header-profile-menu>
|
|
14
|
-
<@app.scope@-core-profile-menu [isConnected]="appConnection | async"></@app.scope@-core-profile-menu>
|
|
15
|
-
</ux-app-shell-header-profile-menu>
|
|
16
|
-
|
|
17
|
-
<ux-app-shell-top-message *ngIf="isIE11">
|
|
18
|
-
<p class="mt-0">
|
|
19
|
-
<strong>WARNING</strong> - You're using an obsolete browser, to benefit of better performances / additional features of MyWorkplace, it is recommended to use a more recent browser version, or an alternative browser (Firefox or Chrome)
|
|
20
|
-
</p>
|
|
21
|
-
</ux-app-shell-top-message>
|
|
22
|
-
</ux-app-shell>
|
|
23
|
-
|
|
24
|
-
<@app.scope@-core-user-profile *ngIf="(coreService.state$ | async).isUserProfileOpen" [isOnline]="true" [isConnected]="appConnection | async"></@app.scope@-core-user-profile>
|
|
25
|
-
|
|
26
|
-
<@app.scope@-core-about *ngIf="(coreService.state$ | async).isAboutOpen"></@app.scope@-core-about>
|
|
27
|
-
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { ActivatedRoute, Event, NavigationEnd, Router } from '@angular/router';
|
|
2
|
-
import { Component, Inject, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
import { Observable, Subscription } from 'rxjs';
|
|
5
|
-
import { take } from 'rxjs/operators';
|
|
6
|
-
import { Store } from '@ngrx/store';
|
|
7
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
8
|
-
|
|
9
|
-
/* eUI IMPORTS */
|
|
10
|
-
import {
|
|
11
|
-
UxLink,
|
|
12
|
-
UxLanguage,
|
|
13
|
-
AppState,
|
|
14
|
-
CONFIG_TOKEN,
|
|
15
|
-
getAppState,
|
|
16
|
-
StorageService,
|
|
17
|
-
StoreService,
|
|
18
|
-
UserService,
|
|
19
|
-
getAppConnection,
|
|
20
|
-
getAppStatus,
|
|
21
|
-
UxAppShellService,
|
|
22
|
-
HttpService,
|
|
23
|
-
UpdateUserDetailsAction,
|
|
24
|
-
UpdateUserPreferencesAction,
|
|
25
|
-
UxPermissionService,
|
|
26
|
-
UxDynamicMenuService,
|
|
27
|
-
UserState,
|
|
28
|
-
getUserState,
|
|
29
|
-
getUserPreferences,
|
|
30
|
-
} from '@eui/core';
|
|
31
|
-
|
|
32
|
-
import { CoreService } from '../services/core.service';
|
|
33
|
-
|
|
34
|
-
@Component({
|
|
35
|
-
selector: '@app.scope@-app-shell',
|
|
36
|
-
templateUrl: './app-shell.component.html',
|
|
37
|
-
})
|
|
38
|
-
export class AppShellComponent implements OnInit, OnDestroy {
|
|
39
|
-
appState: Observable<AppState>;
|
|
40
|
-
appConnection: Observable<boolean>;
|
|
41
|
-
appStatus: Observable<string>;
|
|
42
|
-
appVersion: string;
|
|
43
|
-
appReleaseDate: string;
|
|
44
|
-
isLoading = false;
|
|
45
|
-
|
|
46
|
-
public userState: Observable<UserState>;
|
|
47
|
-
public sidebarLinks: UxLink[] = [];
|
|
48
|
-
public isIE11 = false;
|
|
49
|
-
|
|
50
|
-
private sidebarLinksDefault: UxLink[] = [
|
|
51
|
-
new UxLink({
|
|
52
|
-
label: 'Home',
|
|
53
|
-
iconClass: 'ux-icon ux-icon-home', url: '/home',
|
|
54
|
-
}),
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
private apiConfig = this.config.modules.core.api;
|
|
58
|
-
|
|
59
|
-
private userStateSubscription: Subscription;
|
|
60
|
-
private asSubscription: Subscription;
|
|
61
|
-
|
|
62
|
-
constructor(
|
|
63
|
-
private router: Router,
|
|
64
|
-
private store: Store<any>,
|
|
65
|
-
private storeService: StoreService,
|
|
66
|
-
private userService: UserService,
|
|
67
|
-
private activatedRoute: ActivatedRoute,
|
|
68
|
-
public translate: TranslateService,
|
|
69
|
-
private uxAppShellService: UxAppShellService,
|
|
70
|
-
protected storageService: StorageService,
|
|
71
|
-
@Inject(CONFIG_TOKEN) private config,
|
|
72
|
-
private http: HttpService,
|
|
73
|
-
private uxPermissionService: UxPermissionService,
|
|
74
|
-
private uxDynamicMenuService: UxDynamicMenuService,
|
|
75
|
-
public coreService: CoreService,
|
|
76
|
-
) {
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
ngOnInit() {
|
|
80
|
-
console.log('CORE : Init');
|
|
81
|
-
|
|
82
|
-
this.userState = this.store.select(getUserState);
|
|
83
|
-
// this.userStateSubscription = this.userState.subscribe((userState: any) => {
|
|
84
|
-
// if (userState && userState.impersonatingUser) {
|
|
85
|
-
// this.coreService.impersonatingUser = userState.impersonatingUser;
|
|
86
|
-
// }
|
|
87
|
-
// });
|
|
88
|
-
|
|
89
|
-
this.asSubscription = this.uxAppShellService.state$.subscribe((state: any) => {
|
|
90
|
-
if (state.deviceInfo && state.deviceInfo.isIE11) {
|
|
91
|
-
this.isIE11 = true;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
this.appState = this.store.select(getAppState);
|
|
96
|
-
|
|
97
|
-
this.calculateLinks();
|
|
98
|
-
this.retrieveUserProfile();
|
|
99
|
-
|
|
100
|
-
this.appConnection = this.store.select(getAppConnection);
|
|
101
|
-
this.appStatus = this.store.select(getAppStatus);
|
|
102
|
-
|
|
103
|
-
this.appVersion = this.config.appVersion;
|
|
104
|
-
this.appReleaseDate = this.config.appReleaseDate;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
ngOnDestroy() {
|
|
108
|
-
if (this.userStateSubscription) {
|
|
109
|
-
this.userStateSubscription.unsubscribe();
|
|
110
|
-
}
|
|
111
|
-
if (this.asSubscription) {
|
|
112
|
-
this.asSubscription.unsubscribe();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
public onNavBarSearchItemClick(event: any) {
|
|
117
|
-
this.router.navigate(['/search']);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
onLanguageChanged(uxLanguage: UxLanguage) {
|
|
121
|
-
this.uxAppShellService.isBlockDocumentActive = true;
|
|
122
|
-
this.store.select(getUserPreferences)
|
|
123
|
-
.pipe(
|
|
124
|
-
take(1),
|
|
125
|
-
)
|
|
126
|
-
.subscribe(prefs => {
|
|
127
|
-
const prefsWithLang = { ...prefs, lang: uxLanguage.code };
|
|
128
|
-
// manually save the user preferences to the server
|
|
129
|
-
// necessary because store.dispatch does NOT guarantee the save on the server before page reload
|
|
130
|
-
// also, store.dispatch is not providing a callback/hook/Observable/Promise either
|
|
131
|
-
// this code rely on the 'contract' that the server preferences are preferred to the local ones
|
|
132
|
-
this.userService.saveUserPreferences(prefsWithLang)
|
|
133
|
-
// if ok, reload the page
|
|
134
|
-
.subscribe(() => window.location.reload(), () => {
|
|
135
|
-
// in case of exception, try to store the preferences locally
|
|
136
|
-
// this method may NOT be executed properly
|
|
137
|
-
// because of the way in which the store is saving the state in the local storage
|
|
138
|
-
this.store.dispatch(new UpdateUserPreferencesAction(prefsWithLang));
|
|
139
|
-
// set the refresh timeout to 2 seconds, to allow the store to save the preferences first
|
|
140
|
-
setTimeout(() => window.location.reload(), 2000);
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
private retrieveUserProfile() {
|
|
146
|
-
this.onPageLoadingStart();
|
|
147
|
-
|
|
148
|
-
try {
|
|
149
|
-
const uri = `${this.apiConfig.base}${this.apiConfig.user.profile}`;
|
|
150
|
-
return this.http.get(uri).subscribe(this.onProfileFetchSuccess.bind(this), this.onProfileFetchError.bind(this));
|
|
151
|
-
} catch (e) {
|
|
152
|
-
this.onProfileFetchError.call(this);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// -----
|
|
157
|
-
// privileges data are not filled up anymore from the user-profile
|
|
158
|
-
// TODO check if it's a new default / regression from the service
|
|
159
|
-
private onProfileFetchSuccess(data) {
|
|
160
|
-
const rights = [...data.roles, ...data.privileges];
|
|
161
|
-
data.rights = rights.map((roleId) => {
|
|
162
|
-
return { id: roleId, permissions: [] };
|
|
163
|
-
});
|
|
164
|
-
this.store.dispatch(new UpdateUserDetailsAction(data));
|
|
165
|
-
this.calculateLinks();
|
|
166
|
-
this.onPageLoadingEnd();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
private onProfileFetchError() {
|
|
170
|
-
this.onPageLoadingEnd();
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
private calculateLinks() {
|
|
174
|
-
this.sidebarLinks = this.uxDynamicMenuService.filterUxLinksWithRights(this.sidebarLinksDefault);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private onPageLoadingStart() {
|
|
178
|
-
this.isLoading = true;
|
|
179
|
-
const body = document.querySelector('body');
|
|
180
|
-
body.style.overflowY = 'hidden';
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
private onPageLoadingEnd() {
|
|
184
|
-
this.isLoading = false;
|
|
185
|
-
const body = document.querySelector('body');
|
|
186
|
-
body.style.overflowY = 'scroll';
|
|
187
|
-
}
|
|
188
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<ux-modal id="about-modal"
|
|
2
|
-
titleLabel="About"
|
|
3
|
-
[isFooterCustomAlignment]="true" [isVisible]="true">
|
|
4
|
-
|
|
5
|
-
<uxModalBody>
|
|
6
|
-
<div class="row ml-1 mb-3">
|
|
7
|
-
<p>
|
|
8
|
-
About text
|
|
9
|
-
</p>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<ux-panels>
|
|
13
|
-
<ux-panel label="Versions and dependencies" iconClass="fa fa-cubes" iconTypeClass="primary" tagLabel="Application version" tagCount="{{appInfos}}" tagTypeClass="success" [isExpandable]="true">
|
|
14
|
-
<p style="white-space: pre-line;">
|
|
15
|
-
<strong>Dependencies</strong><br>
|
|
16
|
-
{{modulesVersions}}
|
|
17
|
-
</p>
|
|
18
|
-
</ux-panel>
|
|
19
|
-
</ux-panels>
|
|
20
|
-
</uxModalBody>
|
|
21
|
-
|
|
22
|
-
<uxModalFooter>
|
|
23
|
-
<ux-layout-horizontal>
|
|
24
|
-
<uxLayoutHorizontalRight>
|
|
25
|
-
<ux-button isOutline=true (click)="onClose($event)">Close</ux-button>
|
|
26
|
-
</uxLayoutHorizontalRight>
|
|
27
|
-
</ux-layout-horizontal>
|
|
28
|
-
</uxModalFooter>
|
|
29
|
-
|
|
30
|
-
</ux-modal>
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, Inject, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { CONFIG_TOKEN } from '@eui/core';
|
|
4
|
-
import { HttpClient } from '@angular/common/http';
|
|
5
|
-
|
|
6
|
-
import { CoreService } from '../../services/core.service';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: '@app.scope@-core-about',
|
|
10
|
-
templateUrl: './about.component.html',
|
|
11
|
-
})
|
|
12
|
-
export class AboutComponent implements OnInit {
|
|
13
|
-
modulesVersions: string;
|
|
14
|
-
appInfos: string;
|
|
15
|
-
|
|
16
|
-
@Output() modalClosed: EventEmitter<any> = new EventEmitter<any>();
|
|
17
|
-
|
|
18
|
-
constructor(
|
|
19
|
-
public translate: TranslateService,
|
|
20
|
-
public coreService: CoreService,
|
|
21
|
-
private http: HttpClient,
|
|
22
|
-
@Inject(CONFIG_TOKEN) private config,
|
|
23
|
-
) {}
|
|
24
|
-
|
|
25
|
-
ngOnInit() {
|
|
26
|
-
|
|
27
|
-
this.getMedataJson(`assets/app-metadata.json`)
|
|
28
|
-
.then((result) => {
|
|
29
|
-
if (result.appInfos) {
|
|
30
|
-
this.appInfos = result.appInfos;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (result.metadata) {
|
|
34
|
-
this.modulesVersions = Object.keys(result.metadata)
|
|
35
|
-
.filter((v) => {
|
|
36
|
-
return v.indexOf('@eui') === 0 ||
|
|
37
|
-
v.indexOf('@@app.scope@') === 0;
|
|
38
|
-
})
|
|
39
|
-
.sort()
|
|
40
|
-
.reduce((acc, _module) => {
|
|
41
|
-
acc = acc === '' ? `${_module}: ${result.metadata[_module]}` :
|
|
42
|
-
`${acc}\n${_module}: ${result.metadata[_module]}`;
|
|
43
|
-
return acc;
|
|
44
|
-
}, '');
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
.catch(error => console.log(error));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onClose(event: any) {
|
|
51
|
-
this.coreService.isAboutOpen = false;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
private getMedataJson(url: string): Promise<any> {
|
|
55
|
-
return this.http
|
|
56
|
-
.get(url)
|
|
57
|
-
.toPromise()
|
|
58
|
-
.then(this.extractData)
|
|
59
|
-
.catch(this.handleError);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
private extractData(res: Response) {
|
|
63
|
-
const body = res;
|
|
64
|
-
return body || {};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
private handleError(error: any): Promise<any> {
|
|
68
|
-
console.error('An error occurred', error);
|
|
69
|
-
return Promise.reject(error.message || error);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
template: `
|
|
5
|
-
<ux-layout-app-shell headerAppFullName="App">
|
|
6
|
-
<uxAppShellMainContent>
|
|
7
|
-
<h1>Page not found!</h1>
|
|
8
|
-
<p>We are sorry the page you tried to access does not exist.</p>
|
|
9
|
-
<button>Go Home</button>
|
|
10
|
-
</uxAppShellMainContent>
|
|
11
|
-
</ux-layout-app-shell>
|
|
12
|
-
`,
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
export class Page404Component implements OnInit {
|
|
16
|
-
constructor() { }
|
|
17
|
-
|
|
18
|
-
ngOnInit() { }
|
|
19
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
template: `
|
|
5
|
-
<ux-layout-app-shell headerAppFullName="App">
|
|
6
|
-
<uxAppShellMainContent>
|
|
7
|
-
<h1>Server error</h1>
|
|
8
|
-
<p>We are sorry but an error on the server occured. Please try again in a few minutes</p>
|
|
9
|
-
</uxAppShellMainContent>
|
|
10
|
-
</ux-layout-app-shell>
|
|
11
|
-
`,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export class Page500Component implements OnInit {
|
|
15
|
-
constructor() { }
|
|
16
|
-
|
|
17
|
-
ngOnInit() { }
|
|
18
|
-
}
|
package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile/profile.component.html
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<ux-modal id="my-profile-modal"
|
|
2
|
-
titleLabel="My profile information"
|
|
3
|
-
[isHandleCloseOnClose]="false"
|
|
4
|
-
[isVisible]="true"
|
|
5
|
-
[isFooterCustomAlignment]="true"
|
|
6
|
-
(onClose)="onClose($event)">
|
|
7
|
-
|
|
8
|
-
<uxModalBody>
|
|
9
|
-
|
|
10
|
-
<div class="row">
|
|
11
|
-
|
|
12
|
-
<!-- AVATAR -->
|
|
13
|
-
<div class="col-xl-3 mb-2">
|
|
14
|
-
<div class="profile-wrapper profile-wrapper--big">
|
|
15
|
-
<div class="profile-avatar profile-avatar--big ux-u-svg ux-u-svg--default-avatar">
|
|
16
|
-
<div class="connected-state">
|
|
17
|
-
<span class="pulse-ring connect red"></span>
|
|
18
|
-
<span *ngIf="isConnected" class="icon ion ion-social-rss ux-u-color-success" title="Sucessfully connected to remote Opsys Server">
|
|
19
|
-
</span>
|
|
20
|
-
<span *ngIf="!isConnected" class="icon ion ion-social-rss ux-u-color-danger" title="Connection to remote Opsys Server failed!">
|
|
21
|
-
</span>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="available-state">
|
|
24
|
-
<span *ngIf="isOnline" class="icon ux-icon ux-icon-circle ux-u-color-success-light" title="Online - Available for chat discussion">
|
|
25
|
-
</span>
|
|
26
|
-
<span *ngIf="!isOnline" class="icon ux-icon ux-icon-circle ux-u-color-danger-light" title="Offline - Unavailable for chat discussion">
|
|
27
|
-
</span>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div class="col-xl-9">
|
|
34
|
-
<h4>{{ (userState | async)?.firstName }} {{ (userState | async)?.lastName }}</h4>
|
|
35
|
-
|
|
36
|
-
<!-- <div class="row mb-2">
|
|
37
|
-
<div class="col-md-4">
|
|
38
|
-
<strong>{{ 'user-profile.ROLE' | translate }}</strong>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="col-md-8">
|
|
41
|
-
N/C
|
|
42
|
-
</div>
|
|
43
|
-
</div> -->
|
|
44
|
-
<div class="row mb-2">
|
|
45
|
-
<div class="col-md-4">
|
|
46
|
-
<strong>{{ 'user-profile.PHONE' | translate }}</strong>
|
|
47
|
-
</div>
|
|
48
|
-
<div class="col-md-8">
|
|
49
|
-
N/C
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="row mb-2">
|
|
53
|
-
<div class="col-md-4">
|
|
54
|
-
<strong>{{ 'user-profile.EMAIL' | translate }}</strong>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="col-md-8">
|
|
57
|
-
{{ (userState | async)?.email }}
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
<div class="row mb-2">
|
|
61
|
-
<div class="col-md-4">
|
|
62
|
-
<strong>{{ 'user-profile.ORGANIZATION' | translate }}</strong>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="col-md-8">
|
|
65
|
-
{{ (userState | async)?.organisation?.description }}
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="row mb-2">
|
|
69
|
-
<div class="col-md-4">
|
|
70
|
-
<strong>{{ 'user-profile.UNIT' | translate }}</strong>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="col-md-8">
|
|
73
|
-
{{ (userState | async)?.organisation?.code }}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
<div class="row mb-2">
|
|
77
|
-
<div class="col-md-4">
|
|
78
|
-
<strong>{{ 'user-profile.OFFICE' | translate }}</strong>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="col-md-8">
|
|
81
|
-
N/C
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div class="row">
|
|
86
|
-
<div class="col-12">
|
|
87
|
-
<strong>{{ 'user-profile.PERMISSIONS' | translate }}</strong>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="col-12 ux-u-font-size-h7">
|
|
90
|
-
{{ (userState | async)?.privileges?.join(', ') }}
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</uxModalBody>
|
|
96
|
-
|
|
97
|
-
<uxModalFooter>
|
|
98
|
-
<ux-layout-horizontal>
|
|
99
|
-
<uxLayoutHorizontalRight>
|
|
100
|
-
<ux-button typeClass="primary" (click)="onClose($event)">Close</ux-button>
|
|
101
|
-
</uxLayoutHorizontalRight>
|
|
102
|
-
</ux-layout-horizontal>
|
|
103
|
-
</uxModalFooter>
|
|
104
|
-
</ux-modal>
|
package/scripts/csdr/cli/skeletons/app/src/app/core/components/profile/profile.component.scss
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.profile-wrapper {
|
|
3
|
-
justify-content: center;
|
|
4
|
-
|
|
5
|
-
&.profile-wrapper--big {
|
|
6
|
-
margin-right: 0;
|
|
7
|
-
|
|
8
|
-
.profile-avatar {
|
|
9
|
-
background-size: 100px 100px;
|
|
10
|
-
height: 100px;
|
|
11
|
-
width: 100px;
|
|
12
|
-
|
|
13
|
-
.connected-state {
|
|
14
|
-
background: white;
|
|
15
|
-
border: 2px solid white;
|
|
16
|
-
border-radius: 100%;
|
|
17
|
-
position: absolute;
|
|
18
|
-
right: 10px;
|
|
19
|
-
top: -6px;
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
background: #fff;
|
|
23
|
-
border-radius: 100%;
|
|
24
|
-
font-size: 1.25rem;
|
|
25
|
-
transform: translate(2px, 2px);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.available-state {
|
|
30
|
-
background: white;
|
|
31
|
-
border-radius: 100%;
|
|
32
|
-
bottom: 0;
|
|
33
|
-
position: absolute;
|
|
34
|
-
right: 8px;
|
|
35
|
-
|
|
36
|
-
.icon {
|
|
37
|
-
border: 2px solid white;
|
|
38
|
-
border-radius: 100%;
|
|
39
|
-
font-size: 1rem;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { Store } from '@ngrx/store';
|
|
4
|
-
|
|
5
|
-
import { getUserState } from '@eui/core';
|
|
6
|
-
import { UxService } from '@eui/core';
|
|
7
|
-
|
|
8
|
-
import { CoreService } from '../../services/core.service';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: '@app.scope@-core-user-profile',
|
|
12
|
-
templateUrl: './profile.component.html',
|
|
13
|
-
styleUrls: ['./profile.component.scss'],
|
|
14
|
-
encapsulation: ViewEncapsulation.None,
|
|
15
|
-
})
|
|
16
|
-
export class ProfileComponent implements OnInit, OnDestroy {
|
|
17
|
-
@Input() isOnline: boolean;
|
|
18
|
-
@Input() isConnected: boolean;
|
|
19
|
-
|
|
20
|
-
userState: any;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
public translate: TranslateService,
|
|
24
|
-
private uxService: UxService,
|
|
25
|
-
private coreService: CoreService,
|
|
26
|
-
private store: Store<any>) {
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
ngOnInit() {
|
|
30
|
-
this.userState = this.store.select(getUserState);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ngOnDestroy() {
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
onClose(event: any) {
|
|
37
|
-
this.coreService.isUserProfileOpen = false;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<ul>
|
|
2
|
-
<li (click)="coreService.userProfileToggle()">
|
|
3
|
-
<i class="icon ux-icon-fw ux-icon ux-icon-user"></i>
|
|
4
|
-
My profile information
|
|
5
|
-
</li>
|
|
6
|
-
<li>
|
|
7
|
-
<i class="icon ux-icon-fw ux-icon ux-icon-rss"></i>
|
|
8
|
-
{{ 'user-profile.CONNECTION-STATUS' | translate }}
|
|
9
|
-
<div class="ml-auto">
|
|
10
|
-
<ux-badge *ngIf="isConnected" [isSmall]="true" [isPill]="true" typeClass="success">
|
|
11
|
-
{{ 'user-profile.CONNECTED' | translate }}
|
|
12
|
-
</ux-badge>
|
|
13
|
-
<ux-badge *ngIf="!(isConnected)" [isSmall]="true" [isPill]="true" typeClass="danger">
|
|
14
|
-
{{ 'user-profile.NOT-CONNECTED' | translate }}
|
|
15
|
-
</ux-badge>
|
|
16
|
-
</div>
|
|
17
|
-
</li>
|
|
18
|
-
<li (click)="coreService.aboutToggle()">
|
|
19
|
-
<i class="icon ux-icon-fw ux-icon ux-icon-help"></i>
|
|
20
|
-
About
|
|
21
|
-
</li>
|
|
22
|
-
<li (click)="onSignOutClick($event)">
|
|
23
|
-
<i class="icon ux-icon-fw ux-icon ux-icon-sign-out"></i>
|
|
24
|
-
{{ 'user-profile.SIGN-OUT' | translate }}
|
|
25
|
-
</li>
|
|
26
|
-
</ul>
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy, Inject, Input } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { Store } from '@ngrx/store';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { take } from 'rxjs/operators';
|
|
6
|
-
|
|
7
|
-
import { CONFIG_TOKEN, UxService, UserState, getUserState, UxAppShellService } from '@eui/core';
|
|
8
|
-
|
|
9
|
-
import { CoreService } from '../../services/core.service';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: '@app.scope@-core-profile-menu',
|
|
13
|
-
templateUrl: './profile-menu.component.html',
|
|
14
|
-
})
|
|
15
|
-
export class ProfileMenuComponent implements OnInit, OnDestroy {
|
|
16
|
-
|
|
17
|
-
@Input() isConnected: boolean;
|
|
18
|
-
|
|
19
|
-
userState: Observable<UserState>;
|
|
20
|
-
// impersonatedUserId: string;
|
|
21
|
-
// lastImpersonatedUserId: string;
|
|
22
|
-
// impersonationAllowed = false;
|
|
23
|
-
|
|
24
|
-
constructor(
|
|
25
|
-
@Inject(CONFIG_TOKEN) private config,
|
|
26
|
-
private store: Store<any>,
|
|
27
|
-
public translate: TranslateService,
|
|
28
|
-
private uxService: UxService,
|
|
29
|
-
public coreService: CoreService,
|
|
30
|
-
private uxAppShellService: UxAppShellService,
|
|
31
|
-
) {}
|
|
32
|
-
|
|
33
|
-
ngOnInit() {
|
|
34
|
-
this.userState = this.store.select(getUserState);
|
|
35
|
-
// this.checkImpersonationRights();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
ngOnDestroy() {
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// checkImpersonationRights() {
|
|
42
|
-
// this.userOrgService.getProfileForApplication('API_GATEWAY').subscribe({
|
|
43
|
-
// next: (apiGatewayProfile) => {
|
|
44
|
-
// if (apiGatewayProfile && apiGatewayProfile.privileges) {
|
|
45
|
-
// for (let i = 0; i < apiGatewayProfile.privileges.length; i++) {
|
|
46
|
-
// if (apiGatewayProfile.privileges [i] === 'CC_IMPERSONATE') {
|
|
47
|
-
// this.impersonationAllowed = true;
|
|
48
|
-
// }
|
|
49
|
-
// }
|
|
50
|
-
// }
|
|
51
|
-
// },
|
|
52
|
-
// });
|
|
53
|
-
// }
|
|
54
|
-
|
|
55
|
-
onSignOutClick(event: any) {
|
|
56
|
-
let logoutUrl = 'https://ecasa.cc.cec.eu.int:7002/cas/logout';
|
|
57
|
-
if (this.config && this.config.openIdConnect && this.config.openIdConnect.logoutUrl) {
|
|
58
|
-
logoutUrl = this.config.openIdConnect.logoutUrl;
|
|
59
|
-
}
|
|
60
|
-
window.location.href = logoutUrl;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
onHandleInputClick(event: Event) {
|
|
64
|
-
this.uxService.consumeEvent(event);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// onImpersonate(event?: Event) {
|
|
68
|
-
// setTimeout(() => {
|
|
69
|
-
// if (this.impersonatedUserId) {
|
|
70
|
-
// this.uxAppShellService.isBlockDocumentActive = true;
|
|
71
|
-
// this.lastImpersonatedUserId = this.impersonatedUserId;
|
|
72
|
-
// this.coreService.impersonate(this.impersonatedUserId).pipe(take(1)).subscribe(() => {
|
|
73
|
-
// this.uxAppShellService.isBlockDocumentActive = false;
|
|
74
|
-
// });
|
|
75
|
-
// }
|
|
76
|
-
// }, 0);
|
|
77
|
-
|
|
78
|
-
// this.uxService.consumeEvent(event);
|
|
79
|
-
// }
|
|
80
|
-
|
|
81
|
-
// onEndImpersonation() {
|
|
82
|
-
// this.uxAppShellService.isBlockDocumentActive = true;
|
|
83
|
-
// this.coreService.unimpersonate((success) => {
|
|
84
|
-
// this.uxAppShellService.isBlockDocumentActive = false;
|
|
85
|
-
// if (success) {
|
|
86
|
-
// window.top.location.reload(true);
|
|
87
|
-
// }
|
|
88
|
-
// });
|
|
89
|
-
// }
|
|
90
|
-
|
|
91
|
-
// onUserSelected(event: any) {
|
|
92
|
-
// if (typeof event === 'object') {
|
|
93
|
-
// this.impersonatedUserId = event.userId;
|
|
94
|
-
// } else if (typeof event === 'string') {
|
|
95
|
-
// this.impersonatedUserId = event;
|
|
96
|
-
// } else {
|
|
97
|
-
// this.impersonatedUserId = null;
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
100
|
-
|
|
101
|
-
// onUserPickerEnter() {
|
|
102
|
-
// this.onImpersonate();
|
|
103
|
-
// }
|
|
104
|
-
}
|