@eui/tools 5.0.0-rc.9 → 5.1.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/.version.properties +1 -1
- package/CHANGELOG.md +829 -21
- package/bin/eui-scripts.js +6 -6
- package/bin/scripts/build-package-sub.js +20 -0
- package/bin/scripts/version.js +12 -0
- package/global.test.js +61 -45
- package/package.json +14 -13
- package/sandbox.js +229 -6
- package/scripts/csdr/audit/audit-utils.js +2 -2
- package/scripts/csdr/cli/app.js +43 -5
- package/scripts/csdr/cli/package.js +93 -9
- package/scripts/csdr/cli/skeletons/app-eui10/angular-config.json +20 -0
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/gitignore_TO_REPLACE +63 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/models/user.js +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/index.js +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/user_routes.js +24 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/db/db.json +12 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/server.js +16 -0
- package/scripts/csdr/cli/skeletons/app-eui10/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-eui10/scripts.json +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-routing.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-starter.service.ts +68 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.html +29 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.ts +55 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.module.ts +27 -0
- package/scripts/{utils/pre-build/translations/common.js → 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 +84 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/reducers/index.ts +33 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1-routing.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2-routing.module.ts +16 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.html +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/shared.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/testing/router.mock.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/config/env-json-config.json +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/en.json +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/fr.json +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/global.ts +20 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/index.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/modules.ts +4 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.prod.ts +9 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.ts +9 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/index.html +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/styles.scss +1 -0
- package/scripts/csdr/cli/skeletons/app-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/app-showcase/angular-config.json +98 -28
- package/scripts/csdr/cli/skeletons/app-showcase/dependencies-composite.json +1 -1
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.component.html +16 -18
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.routes.ts +1 -1
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home.module.ts +2 -2
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/{app-showcase → app-showcase-eui13}/src/app/features/shared/shared.module.ts +0 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
- package/scripts/csdr/cli/skeletons/{app-showcase → app-showcase-eui13}/src/index.html +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/en.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/fr.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/index.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/lib/module.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.lib.json +32 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.spec.ts.TO_REPLACE +25 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.ts +14 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/angular.json +3 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-composite.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.spec.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.component.ts +62 -28
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +44 -39
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +23 -9
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/en.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/fr.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +6 -5
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/index.html +1 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.app.json +3 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/angular.json +90 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/browserslist +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/gitignore_TO_REPLACE +64 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +8 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/{frontend-remote/src/app/dummy.spec.ts.TO_REPLACE → frontend-remote-eui10/src/app/dummy.spec.ts} +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/fallback.component.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +90 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +219 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/custom-route-serializer.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/index.ts +42 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +55 -0
- 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 +31 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/index.ts +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/modules.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.prod.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts +15 -0
- 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 +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/main.ts +12 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/polyfills.ts +86 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/test.ts.TO_REPLACE +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.app.json +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.spec.json +18 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint-remote.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/{frontend-remote → frontend-remote-eui10}/webpack.extra.js +0 -0
- package/scripts/csdr/config/angular.js +724 -83
- package/scripts/csdr/config/global.js +43 -6
- package/scripts/csdr/config/packages.js +64 -1
- package/scripts/csdr/config/projects.js +24 -6
- package/scripts/csdr/config/projects.test.js +11 -9
- package/scripts/csdr/config/sync.js +6 -3
- package/scripts/csdr/init/init-utils.js +108 -0
- package/scripts/csdr/init/init.js +11 -0
- package/scripts/csdr/init/prompt.js +3 -1
- package/scripts/csdr/init/resources/10.x/yarn.lock +16428 -0
- package/scripts/csdr/init/resources/13.x/browserslistrc +6 -0
- package/scripts/csdr/init/resources/13.x/resolutions.json +6 -0
- package/scripts/csdr/init/resources/14.x/browserslistrc +6 -0
- package/scripts/csdr/init/resources/14.x/resolutions.json +5 -0
- package/scripts/csdr/init/resources/nodejs-10.x/resolutions.json +8 -0
- package/scripts/csdr/install/build-app.js +6 -38
- package/scripts/csdr/install/build-package.js +16 -157
- package/scripts/csdr/install/common.js +19 -10
- package/scripts/csdr/install/composite-core.js +256 -0
- package/scripts/csdr/install/install-utils.js +8 -4
- package/scripts/csdr/install/local-dev.js +6 -4
- package/scripts/csdr/install/packages.js +90 -0
- package/scripts/csdr/install/projects.js +76 -0
- package/scripts/csdr/install/{remote.js → remotes.js} +46 -51
- package/scripts/csdr/metadata/app-envs.js +0 -39
- package/scripts/csdr/metadata/app-history.js +0 -66
- package/scripts/csdr/metadata/app-versions.js +2 -12
- package/scripts/csdr/metadata/app.js +49 -9
- package/scripts/csdr/metadata/common.js +23 -47
- package/scripts/csdr/metadata/metadata-utils.js +2 -0
- package/scripts/csdr/metadata/package-envs.js +71 -0
- package/scripts/csdr/metadata/package-history.js +5 -0
- package/scripts/csdr/metadata/package-versions.js +79 -0
- package/scripts/csdr/metadata/package.js +95 -105
- package/scripts/csdr/metadata/stats.js +9 -5
- package/scripts/csdr/metadata/v2/app/_app.js +21 -0
- package/scripts/csdr/metadata/v2/app/app.js +25 -0
- package/scripts/csdr/metadata/v2/app/index.js +3 -0
- package/scripts/csdr/metadata/v2/global/_global.js +21 -0
- package/scripts/csdr/metadata/v2/global/global.js +25 -0
- package/scripts/csdr/metadata/v2/global/index.js +3 -0
- package/scripts/csdr/metadata/v2/index.js +5 -0
- package/scripts/csdr/metadata/v2/migrate-devops-metadata.js +207 -0
- package/scripts/csdr/metadata/v2/package/_package.js +21 -0
- package/scripts/csdr/metadata/v2/package/index.js +3 -0
- package/scripts/csdr/metadata/v2/package/package.js +25 -0
- package/scripts/csdr/release/app/release-app.js +16 -21
- package/scripts/csdr/release/package/backend.js +26 -0
- package/scripts/csdr/release/package/common.js +220 -18
- package/scripts/csdr/release/package/release-package.js +28 -10
- package/scripts/csdr/release/package/remote.js +2 -17
- package/scripts/csdr/release/package/ui.js +86 -3
- package/scripts/csdr/sync/sync-utils.js +6 -0
- package/scripts/csdr/templates/maven-settings.template +13 -0
- package/scripts/csdr/version/app-common.js +32 -0
- package/scripts/csdr/version/app-env-target.js +5 -295
- package/scripts/csdr/version/app.js +5 -3
- package/scripts/csdr/version/common.js +282 -0
- package/scripts/csdr/version/{app-env-target.test.js → common.test.js} +48 -36
- package/scripts/csdr/version/package-common.js +158 -0
- package/scripts/csdr/version/package-default.js +144 -0
- package/scripts/csdr/version/package-remote.js +51 -0
- package/scripts/csdr/version/package.js +16 -270
- package/scripts/csdr/version/version-utils.js +12 -7
- package/scripts/utils/api-utils.js +126 -0
- package/scripts/utils/build/app/build-app-utils.js +11 -9
- package/scripts/utils/build/package/angular.js +4 -30
- package/scripts/utils/build/package/build-package-utils.js +50 -1
- package/scripts/utils/build/package/element.js +17 -18
- package/scripts/utils/build/package/nodeJs.js +2 -1
- package/scripts/utils/build/package/skeletons/elements/index.html +9 -0
- package/scripts/utils/build/package/styles.js +92 -92
- package/scripts/utils/git-utils.js +76 -6
- package/scripts/utils/index.js +3 -4
- package/scripts/utils/notification/common.js +5 -0
- package/scripts/utils/notification/mail-utils.js +3 -0
- package/scripts/utils/notification/mailstack.js +3 -5
- package/scripts/utils/notification/package.js +0 -2
- package/scripts/utils/notification/slack-utils.js +6 -7
- package/scripts/utils/pre-build/elements.js +8 -4
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/app/app.module.ts +1 -1
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton/tsconfig.app.json +1 -2
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/app.module.ts +52 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/core/reducers/index.ts +40 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/global.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/index.ts +8 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/modules.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.dev.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.prod.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/karma.conf.js +7 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/main.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/polyfills.ts +86 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/tst.ts +33 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.app.json +19 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.spec.json +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tslint.json +17 -0
- package/scripts/utils/pre-build/injection/config.js +30 -31
- package/scripts/utils/pre-build/injection/externals.js +70 -72
- package/scripts/utils/pre-build/injection/injection-utils.js +2 -0
- package/scripts/utils/pre-build/injection/routes-replacement.js +322 -0
- package/scripts/utils/pre-build/injection/skeletons.js +9 -3
- package/scripts/utils/pre-build/projects.js +20 -15
- package/scripts/utils/pre-build/translations/elements.js +21 -11
- package/scripts/utils/serve/app.js +7 -4
- package/scripts/utils/test/test-utils.js +39 -1
- package/scripts/utils/tools.js +402 -290
- package/bin/scripts/csdr-jira-update.js +0 -12
- package/bin/scripts/csdr-migrate-package.js +0 -17
- package/bin/scripts/e2e-app.js +0 -62
- package/scripts/csdr/install/composite-utils.js +0 -292
- package/scripts/csdr/jira/jira-utils.js +0 -169
- package/scripts/csdr/jira/update.js +0 -153
- package/scripts/migration/eui8-migration.js +0 -94
- package/scripts/migration/migrate-utils.js +0 -191
- package/scripts/utils/confluence-utils.js +0 -126
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Component, OnInit, Inject } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import { take } from 'rxjs/operators';
|
|
5
|
+
|
|
6
|
+
import { CONFIG_TOKEN, I18nService, UserService } from '@eui/core';
|
|
7
|
+
import { ELEMENT_ROUTER_TOKEN, IRouterService, initialization } from '@csdr/integration';
|
|
8
|
+
|
|
9
|
+
import { appConfig } from '../config/index';
|
|
10
|
+
|
|
11
|
+
enum ElementStatus {
|
|
12
|
+
Loading = 'loading',
|
|
13
|
+
Loaded = 'loaded',
|
|
14
|
+
Error = 'error',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
template: `
|
|
19
|
+
<eui-block-content *ngIf="moduleStatus === ElementStatus.Loading" [isBlocked]="true">
|
|
20
|
+
<div style="height: 100%"></div>
|
|
21
|
+
</eui-block-content>
|
|
22
|
+
<ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
|
|
23
|
+
<router-outlet></router-outlet>
|
|
24
|
+
</ng-container>
|
|
25
|
+
<ng-container *ngIf="moduleStatus === ElementStatus.Error">
|
|
26
|
+
<div class="error-container">
|
|
27
|
+
<div>
|
|
28
|
+
<h1>Translations or user data for this module failed to load.</h1>
|
|
29
|
+
<p>Do you want to try again?</p>
|
|
30
|
+
<button euiButton euiPrimary (click)="loadData()">
|
|
31
|
+
<span euiLabel>{{ 'global.RELOAD' | translate }}</span>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</ng-container>
|
|
36
|
+
`,
|
|
37
|
+
styles: [`
|
|
38
|
+
.error-container {
|
|
39
|
+
width: 50vw;
|
|
40
|
+
height: 50vh;
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 50%;
|
|
43
|
+
left: 50%;
|
|
44
|
+
transform: translate(-50%, -50%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.error-container div {
|
|
48
|
+
text-align: center
|
|
49
|
+
}
|
|
50
|
+
`],
|
|
51
|
+
})
|
|
52
|
+
export class ModuleComponent implements OnInit {
|
|
53
|
+
ElementStatus = ElementStatus;
|
|
54
|
+
moduleStatus: ElementStatus;
|
|
55
|
+
|
|
56
|
+
constructor(private router: Router,
|
|
57
|
+
@Inject(ELEMENT_ROUTER_TOKEN) private routerService: IRouterService,
|
|
58
|
+
@Inject(CONFIG_TOKEN) public config: any,
|
|
59
|
+
private i18nService: I18nService,
|
|
60
|
+
private userService: UserService) {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public ngOnInit() {
|
|
64
|
+
this.router.navigateByUrl(this.routerService.getUrl(), { replaceUrl: true });
|
|
65
|
+
this.loadData();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private loadData() {
|
|
69
|
+
this.setStatus(ElementStatus.Loading);
|
|
70
|
+
try {
|
|
71
|
+
initialization(this.i18nService, this.userService)
|
|
72
|
+
.pipe(take(1))
|
|
73
|
+
.subscribe((loadStatus: { success: boolean, error?: string }) => {
|
|
74
|
+
if (!loadStatus.success) {
|
|
75
|
+
this.setStatus(ElementStatus.Error);
|
|
76
|
+
console.error(`[ELEMENT: ${appConfig.global.elementName}] `, loadStatus.error);
|
|
77
|
+
} else {
|
|
78
|
+
this.setStatus(ElementStatus.Loaded);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.log(e);
|
|
83
|
+
this.setStatus(ElementStatus.Error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
private setStatus(status: ElementStatus) {
|
|
88
|
+
this.moduleStatus = status;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { NgModule, Injector, NgZone, PLATFORM_ID } from '@angular/core';
|
|
3
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
4
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
6
|
+
import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
7
|
+
import { createCustomElement } from '@angular/elements';
|
|
8
|
+
|
|
9
|
+
import { StoreModule } from '@ngrx/store';
|
|
10
|
+
import { EffectsModule } from '@ngrx/effects';
|
|
11
|
+
import { StoreRouterConnectingModule } from '@ngrx/router-store';
|
|
12
|
+
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
13
|
+
|
|
14
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
CachePreventionInterceptor,
|
|
18
|
+
CONFIG_TOKEN,
|
|
19
|
+
CoreModule,
|
|
20
|
+
CorsSecurityInterceptor,
|
|
21
|
+
CsrfPreventionInterceptor,
|
|
22
|
+
EUI_CONFIG_TOKEN,
|
|
23
|
+
EuLoginSessionTimeoutHandlingInterceptor,
|
|
24
|
+
GLOBAL_CONFIG_TOKEN,
|
|
25
|
+
I18nService,
|
|
26
|
+
LogService,
|
|
27
|
+
OpenIdConnectInterceptor,
|
|
28
|
+
StorageService,
|
|
29
|
+
StoreService,
|
|
30
|
+
translateConfig,
|
|
31
|
+
UserService,
|
|
32
|
+
UxAppShellService,
|
|
33
|
+
} from '@eui/core';
|
|
34
|
+
import {
|
|
35
|
+
EuiBlockContentComponentModule,
|
|
36
|
+
EuiButtonModule,
|
|
37
|
+
EuiLabelModule,
|
|
38
|
+
} from '@eui/components-next';
|
|
39
|
+
import { LanguageInterceptor, PushNotificationsService, BreadcrumbsService } from '@csdr/core';
|
|
40
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
41
|
+
// import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
|
|
42
|
+
|
|
43
|
+
import { TOKEN, reducerProvider, metaReducers } from './reducers/index';
|
|
44
|
+
import { CustomSerializer } from './reducers/custom-route-serializer';
|
|
45
|
+
|
|
46
|
+
import { environment } from '../environments/environment';
|
|
47
|
+
import { appConfig } from '../config';
|
|
48
|
+
|
|
49
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
50
|
+
// import { TaskMgrCommonModule } from '@cc/task-manager';
|
|
51
|
+
import {
|
|
52
|
+
ELEMENT_ROUTER_TOKEN,
|
|
53
|
+
I18N_SERVICE_HOST_TOKEN,
|
|
54
|
+
I18nServiceMapping,
|
|
55
|
+
NG_ZONE_HOST_TOKEN,
|
|
56
|
+
PUSH_NOTIFICATION_SERVICE_HOST_TOKEN,
|
|
57
|
+
PushNotificationServiceMapping,
|
|
58
|
+
USER_SERVICE_HOST_TOKEN,
|
|
59
|
+
UserServiceMapping,
|
|
60
|
+
UX_APP_SHELL_SERVICE_HOST_TOKEN,
|
|
61
|
+
UX_SERVICE_HOST_TOKEN,
|
|
62
|
+
UxAppShellServiceMapping,
|
|
63
|
+
} from '@csdr/integration';
|
|
64
|
+
import { RoutingModule } from './routing.module';
|
|
65
|
+
|
|
66
|
+
import { FallbackComponent } from './fallback.component';
|
|
67
|
+
import { ModuleComponent } from './module.component';
|
|
68
|
+
|
|
69
|
+
export function openidConnectInterceptorFactory(config) {
|
|
70
|
+
return new OpenIdConnectInterceptor();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@NgModule({
|
|
74
|
+
imports: [
|
|
75
|
+
BrowserModule,
|
|
76
|
+
BrowserAnimationsModule,
|
|
77
|
+
HttpClientModule,
|
|
78
|
+
StoreRouterConnectingModule.forRoot({ stateKey: 'router', serializer: CustomSerializer }),
|
|
79
|
+
StoreModule.forRoot(TOKEN, { metaReducers }),
|
|
80
|
+
EffectsModule.forRoot([]),
|
|
81
|
+
StoreDevtoolsModule.instrument({ name: appConfig.global.storeName, maxAge: 150, logOnly: environment.production }),
|
|
82
|
+
TranslateModule.forRoot(translateConfig),
|
|
83
|
+
|
|
84
|
+
CoreModule.forRoot(),
|
|
85
|
+
|
|
86
|
+
EuiBlockContentComponentModule,
|
|
87
|
+
EuiButtonModule,
|
|
88
|
+
EuiLabelModule,
|
|
89
|
+
|
|
90
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
91
|
+
// TaskMgrCommonModule,
|
|
92
|
+
RoutingModule,
|
|
93
|
+
],
|
|
94
|
+
declarations: [
|
|
95
|
+
FallbackComponent,
|
|
96
|
+
ModuleComponent,
|
|
97
|
+
],
|
|
98
|
+
entryComponents: [
|
|
99
|
+
FallbackComponent,
|
|
100
|
+
ModuleComponent,
|
|
101
|
+
],
|
|
102
|
+
providers: [
|
|
103
|
+
reducerProvider,
|
|
104
|
+
{
|
|
105
|
+
provide: EUI_CONFIG_TOKEN,
|
|
106
|
+
useValue: { appConfig: { ...appConfig, ...environment }, environment },
|
|
107
|
+
},
|
|
108
|
+
// TODO[REMOTE-SETUP] uncomment if LanguageInterceptor is used
|
|
109
|
+
// {
|
|
110
|
+
// provide: HTTP_INTERCEPTORS,
|
|
111
|
+
// useClass: LanguageInterceptor,
|
|
112
|
+
// deps: [CONFIG_TOKEN, StorageService],
|
|
113
|
+
// multi: true,
|
|
114
|
+
// },
|
|
115
|
+
{
|
|
116
|
+
provide: HTTP_INTERCEPTORS,
|
|
117
|
+
useClass: CorsSecurityInterceptor,
|
|
118
|
+
multi: true,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
provide: HTTP_INTERCEPTORS,
|
|
122
|
+
useClass: EuLoginSessionTimeoutHandlingInterceptor,
|
|
123
|
+
multi: true,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
provide: HTTP_INTERCEPTORS,
|
|
127
|
+
useClass: CsrfPreventionInterceptor,
|
|
128
|
+
multi: true,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
provide: HTTP_INTERCEPTORS,
|
|
132
|
+
useClass: CachePreventionInterceptor,
|
|
133
|
+
multi: true,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
provide: HTTP_INTERCEPTORS,
|
|
137
|
+
useFactory: openidConnectInterceptorFactory,
|
|
138
|
+
deps: [CONFIG_TOKEN],
|
|
139
|
+
multi: true,
|
|
140
|
+
},
|
|
141
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
142
|
+
// {
|
|
143
|
+
// provide: HTTP_INTERCEPTORS,
|
|
144
|
+
// useClass: ZipkinHttpInterceptor,
|
|
145
|
+
// deps: [TRACE_LOCAL_SERVICE_NAME, ZipkinTraceManager],
|
|
146
|
+
// multi: true,
|
|
147
|
+
// },
|
|
148
|
+
|
|
149
|
+
// used in the el-mappers
|
|
150
|
+
{ provide: I18N_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['I18nService'] },
|
|
151
|
+
{ provide: PUSH_NOTIFICATION_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['PushNotificationsService'] },
|
|
152
|
+
{ provide: USER_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UserService'] },
|
|
153
|
+
{ provide: UX_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UxService'] },
|
|
154
|
+
{ provide: UX_APP_SHELL_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UxAppShellService'] },
|
|
155
|
+
{ provide: NG_ZONE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['ngZone'] },
|
|
156
|
+
// TODO[REMOTE-SETUP] uncomment if LanguageInterceptor or StorageService is used
|
|
157
|
+
// { provide: StorageService, useFactory: () => window['PROVIDERS']['StorageService'] },
|
|
158
|
+
|
|
159
|
+
{
|
|
160
|
+
provide: I18nService,
|
|
161
|
+
useFactory: (
|
|
162
|
+
config: any,
|
|
163
|
+
translateService: TranslateService,
|
|
164
|
+
logService: LogService,
|
|
165
|
+
store: StoreService,
|
|
166
|
+
document: Document,
|
|
167
|
+
hostI18nService: any) => new I18nServiceMapping(
|
|
168
|
+
config, translateService, logService, store, document, hostI18nService),
|
|
169
|
+
deps: [GLOBAL_CONFIG_TOKEN, TranslateService, LogService, StoreService, DOCUMENT, I18N_SERVICE_HOST_TOKEN],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
provide: PushNotificationsService,
|
|
173
|
+
useFactory: (
|
|
174
|
+
zone: NgZone,
|
|
175
|
+
hostPushNotificationService: any) => new PushNotificationServiceMapping(zone, hostPushNotificationService),
|
|
176
|
+
deps: [NgZone, PUSH_NOTIFICATION_SERVICE_HOST_TOKEN],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
provide: UserService,
|
|
180
|
+
useFactory: (storeService: StoreService, hostUserService: any) => new UserServiceMapping(storeService, hostUserService),
|
|
181
|
+
deps: [StoreService, USER_SERVICE_HOST_TOKEN],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
provide: UxAppShellService,
|
|
185
|
+
useFactory: (
|
|
186
|
+
config: any,
|
|
187
|
+
http: HttpClient,
|
|
188
|
+
platformId: any,
|
|
189
|
+
router: Router,
|
|
190
|
+
storeService: StoreService,
|
|
191
|
+
iI18nService: I18nService,
|
|
192
|
+
hostUxService: any,
|
|
193
|
+
hostUxAppShellService: any,
|
|
194
|
+
hostNgZone) => new UxAppShellServiceMapping(
|
|
195
|
+
config, http, platformId, router, storeService, iI18nService, hostUxService, hostUxAppShellService, hostNgZone),
|
|
196
|
+
deps: [CONFIG_TOKEN, HttpClient, PLATFORM_ID, Router, StoreService, I18nService,
|
|
197
|
+
UX_SERVICE_HOST_TOKEN, UX_APP_SHELL_SERVICE_HOST_TOKEN, NG_ZONE_HOST_TOKEN],
|
|
198
|
+
},
|
|
199
|
+
{ provide: BreadcrumbsService, useFactory: () => window['PROVIDERS']['BreadcrumbsService'], deps: [] },
|
|
200
|
+
{ provide: ELEMENT_ROUTER_TOKEN, useFactory: () => window['PROVIDERS']['ELEMENT_ROUTER_TOKEN'], deps: [] },
|
|
201
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
202
|
+
// { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
|
|
203
|
+
// { provide: ZipkinTraceManager, useFactory: () => window['PROVIDERS']['ZipkinTraceManager'], deps: [] },
|
|
204
|
+
],
|
|
205
|
+
})
|
|
206
|
+
export class AppModule {
|
|
207
|
+
|
|
208
|
+
constructor(private injector: Injector) {
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
ngDoBootstrap() {
|
|
212
|
+
const elementSampleEui = createCustomElement(ModuleComponent, { injector: this.injector });
|
|
213
|
+
try {
|
|
214
|
+
customElements.define(appConfig.global.elementName, elementSampleEui);
|
|
215
|
+
} catch (e) {
|
|
216
|
+
console.log(e);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Params, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { RouterStateSerializer } from '@ngrx/router-store';
|
|
3
|
+
|
|
4
|
+
export interface RouterStateUrl {
|
|
5
|
+
url: string;
|
|
6
|
+
params: Params;
|
|
7
|
+
queryParams: Params;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class CustomSerializer implements RouterStateSerializer<RouterStateUrl> {
|
|
11
|
+
serialize(routerState: RouterStateSnapshot): RouterStateUrl {
|
|
12
|
+
let route = routerState.root;
|
|
13
|
+
|
|
14
|
+
while (route.firstChild) {
|
|
15
|
+
route = route.firstChild;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
url,
|
|
20
|
+
root: { queryParams },
|
|
21
|
+
} = routerState;
|
|
22
|
+
const { params } = route;
|
|
23
|
+
|
|
24
|
+
// Only return an object including the URL, params and query params
|
|
25
|
+
// instead of the entire snapshot
|
|
26
|
+
return { url, params, queryParams };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ActionReducer, ActionReducerMap, MetaReducer } from '@ngrx/store';
|
|
3
|
+
import * as fromRouter from '@ngrx/router-store';
|
|
4
|
+
import { storeFreeze } from 'ngrx-store-freeze';
|
|
5
|
+
import { reducers as coreReducers, CoreState, localStorageSync } from '@eui/core';
|
|
6
|
+
|
|
7
|
+
import { environment } from '../../environments/environment';
|
|
8
|
+
|
|
9
|
+
export interface AppState extends CoreState {
|
|
10
|
+
router: fromRouter.RouterReducerState<any>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// -----------------
|
|
14
|
+
// ------------ AOT
|
|
15
|
+
export const TOKEN = new InjectionToken<any>('AppReducers');
|
|
16
|
+
|
|
17
|
+
export function getReducers(): ActionReducerMap<AppState, any> {
|
|
18
|
+
return {
|
|
19
|
+
router: fromRouter.routerReducer,
|
|
20
|
+
...coreReducers,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const reducerProvider = [
|
|
25
|
+
{ provide: TOKEN, useFactory: getReducers },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
// console.log all actions
|
|
29
|
+
export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
|
|
30
|
+
return (state, action) => {
|
|
31
|
+
const result = reducer(state, action);
|
|
32
|
+
console.groupCollapsed(action.type);
|
|
33
|
+
console.log('prev state', state);
|
|
34
|
+
console.log('action', action);
|
|
35
|
+
console.log('next state', result);
|
|
36
|
+
console.groupEnd();
|
|
37
|
+
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const metaReducers: MetaReducer<AppState>[] = !environment.production ? [logger, localStorageSync, storeFreeze] : [localStorageSync];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NgModule, NgZone, Inject } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes, Router, NavigationStart } from '@angular/router';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { filter, distinctUntilChanged } from 'rxjs/operators';
|
|
5
|
+
|
|
6
|
+
import { CCRoute, ELEMENT_ROUTER_TOKEN, IRouterService } from '@csdr/integration';
|
|
7
|
+
|
|
8
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
9
|
+
// import { routes } from '@cc/task-manager';
|
|
10
|
+
import { appConfig } from '../config/index';
|
|
11
|
+
import { FallbackComponent } from './fallback.component';
|
|
12
|
+
import { ModuleComponent } from './module.component';
|
|
13
|
+
|
|
14
|
+
const prefixedRoutes: Routes = [
|
|
15
|
+
{ path: '', component: ModuleComponent },
|
|
16
|
+
{
|
|
17
|
+
path: appConfig.global.baseUrl,
|
|
18
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
19
|
+
// children: routes,
|
|
20
|
+
},
|
|
21
|
+
{ path: '**', component: FallbackComponent },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
// @dynamic
|
|
25
|
+
@NgModule({
|
|
26
|
+
imports: [
|
|
27
|
+
RouterModule.forRoot(prefixedRoutes),
|
|
28
|
+
],
|
|
29
|
+
exports: [
|
|
30
|
+
RouterModule,
|
|
31
|
+
],
|
|
32
|
+
})
|
|
33
|
+
export class RoutingModule {
|
|
34
|
+
private routes: CCRoute[] = prefixedRoutes.map(route => route as CCRoute);
|
|
35
|
+
|
|
36
|
+
private navigationStartSubscription: Subscription;
|
|
37
|
+
|
|
38
|
+
constructor(private router: Router,
|
|
39
|
+
private ngZone: NgZone,
|
|
40
|
+
@Inject(ELEMENT_ROUTER_TOKEN) private routerService: IRouterService) {
|
|
41
|
+
|
|
42
|
+
this.routerService.registerSubRouter(appConfig.global.baseUrl, (url: string) => {
|
|
43
|
+
this.ngZone.run(() => router.navigateByUrl(url));
|
|
44
|
+
}, this.routes);
|
|
45
|
+
|
|
46
|
+
this.navigationStartSubscription = this.router.events
|
|
47
|
+
.pipe(
|
|
48
|
+
filter(event => event instanceof NavigationStart),
|
|
49
|
+
distinctUntilChanged((prev, curr) => prev['url'] === curr['url']),
|
|
50
|
+
)
|
|
51
|
+
.subscribe((data: NavigationStart) => {
|
|
52
|
+
this.routerService.subrouterEvent(appConfig.global.baseUrl, data);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GlobalConfig, I18nConfig } from '@eui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Internationalization Configuration
|
|
5
|
+
*/
|
|
6
|
+
const i18nConfig: I18nConfig = {
|
|
7
|
+
i18nLoader: {
|
|
8
|
+
i18nFolders: ['elements/@module.full.name@/bundles/assets/i18n-compiled'],
|
|
9
|
+
i18nResources: [{
|
|
10
|
+
prefix: 'assets/i18n-eui/',
|
|
11
|
+
suffix: '.json',
|
|
12
|
+
}],
|
|
13
|
+
},
|
|
14
|
+
i18nService: {
|
|
15
|
+
languages: ['en', 'fr'],
|
|
16
|
+
defaultLanguage: 'en',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Global Configuration
|
|
22
|
+
*/
|
|
23
|
+
export const GLOBAL: GlobalConfig = {
|
|
24
|
+
/* URL that needs to be used in the appRouting of the MWP */
|
|
25
|
+
baseUrl: '@module.name@-v10',
|
|
26
|
+
/* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
|
|
27
|
+
elementName: '@module.scope-name@-v10',
|
|
28
|
+
/* in case you are using NgRx give it a unique name (mostly for debugging) */
|
|
29
|
+
storeName: '@module.scope-name@',
|
|
30
|
+
i18n: i18nConfig,
|
|
31
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GLOBAL } from './global';
|
|
2
|
+
import { MODULES } from './modules';
|
|
3
|
+
import { EuiAppConfig, LogLevel, ConsoleAppender, LogConfig } from '@eui/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Log Configuration
|
|
7
|
+
*/
|
|
8
|
+
const logConfig: LogConfig = {
|
|
9
|
+
logLevel: LogLevel.ALL,
|
|
10
|
+
logAppenders: [{
|
|
11
|
+
type: ConsoleAppender,
|
|
12
|
+
prefixFormat: '[{level}]',
|
|
13
|
+
}],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const appConfig: EuiAppConfig = {
|
|
17
|
+
global: GLOBAL,
|
|
18
|
+
modules: MODULES,
|
|
19
|
+
log: logConfig,
|
|
20
|
+
};
|
package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file can be replaced during build by using the `fileReplacements` array.
|
|
2
|
+
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
3
|
+
// The list of file replacements can be found in `angular.json`.
|
|
4
|
+
|
|
5
|
+
export const environment = {
|
|
6
|
+
production: false,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* In development mode, to ignore zone related error stack frames such as
|
|
11
|
+
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
|
|
12
|
+
* import the following file, but please comment it out in production mode
|
|
13
|
+
* because it will have performance impact when throw error
|
|
14
|
+
*/
|
|
15
|
+
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { enableProdMode } from '@angular/core';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3
|
+
|
|
4
|
+
import { AppModule } from './app/module';
|
|
5
|
+
import { environment } from './environments/environment';
|
|
6
|
+
|
|
7
|
+
if (environment.production) {
|
|
8
|
+
enableProdMode();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
12
|
+
.catch(err => console.log(err));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
22
|
+
// import 'core-js/es6/symbol';
|
|
23
|
+
// import 'core-js/es6/object';
|
|
24
|
+
// import 'core-js/es6/function';
|
|
25
|
+
// import 'core-js/es6/parse-int';
|
|
26
|
+
// import 'core-js/es6/parse-float';
|
|
27
|
+
// import 'core-js/es6/number';
|
|
28
|
+
// import 'core-js/es6/math';
|
|
29
|
+
// import 'core-js/es6/string';
|
|
30
|
+
// import 'core-js/es6/date';
|
|
31
|
+
// import 'core-js/es6/array';
|
|
32
|
+
// import 'core-js/es6/regexp';
|
|
33
|
+
// import 'core-js/es6/map';
|
|
34
|
+
// import 'core-js/es6/weak-map';
|
|
35
|
+
// import 'core-js/es6/set';
|
|
36
|
+
|
|
37
|
+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
38
|
+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
39
|
+
|
|
40
|
+
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
41
|
+
// import 'core-js/es6/reflect';
|
|
42
|
+
|
|
43
|
+
/** Evergreen browsers require these. **/
|
|
44
|
+
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
|
45
|
+
// import 'core-js/es7/reflect';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Web Animations `@angular/platform-browser/animations`
|
|
49
|
+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
50
|
+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
51
|
+
**/
|
|
52
|
+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
56
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
60
|
+
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
61
|
+
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
65
|
+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
66
|
+
*/
|
|
67
|
+
// (window as any).__Zone_enable_cross_context_check = true;
|
|
68
|
+
|
|
69
|
+
/***************************************************************************************************
|
|
70
|
+
* Zone JS is required by default for Angular itself.
|
|
71
|
+
*/
|
|
72
|
+
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
73
|
+
|
|
74
|
+
/***************************************************************************************************
|
|
75
|
+
* APPLICATION IMPORTS
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Date, currency, decimal and percent pipes.
|
|
80
|
+
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
|
|
81
|
+
*/
|
|
82
|
+
// import 'intl'; // Run `npm install --save intl`.
|
|
83
|
+
/**
|
|
84
|
+
* Need to import at least one locale-data with intl.
|
|
85
|
+
*/
|
|
86
|
+
// import 'intl/locale-data/jsonp/en';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/zone-testing';
|
|
4
|
+
import { getTestBed } from '@angular/core/testing';
|
|
5
|
+
import {
|
|
6
|
+
BrowserDynamicTestingModule,
|
|
7
|
+
platformBrowserDynamicTesting
|
|
8
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
9
|
+
|
|
10
|
+
declare const require: any;
|
|
11
|
+
|
|
12
|
+
// First, initialize the Angular testing environment.
|
|
13
|
+
getTestBed().initTestEnvironment(
|
|
14
|
+
BrowserDynamicTestingModule,
|
|
15
|
+
platformBrowserDynamicTesting()
|
|
16
|
+
);
|
|
17
|
+
// Then we find all the tests.
|
|
18
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
19
|
+
// And load the modules.
|
|
20
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/app",
|
|
5
|
+
"module": "es2015",
|
|
6
|
+
"target": "es2015",
|
|
7
|
+
"types": [
|
|
8
|
+
"node"
|
|
9
|
+
],
|
|
10
|
+
"paths": {
|
|
11
|
+
"os": ["./node_modules/empty-module/index.js"],
|
|
12
|
+
"node-fetch": ["./node_modules/empty-module/index.js"],
|
|
13
|
+
"zipkin": ["./node_modules/zipkin/dist/zipkin.js"]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"exclude": [
|
|
17
|
+
"src/test.ts",
|
|
18
|
+
"**/*.spec.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|