@worktile/planet 12.1.1 → 12.1.2
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/application/planet-application-loader.d.ts +70 -0
- package/application/planet-application-loader.d.ts.map +1 -0
- package/application/planet-application-loader.ngfactory.d.ts.map +1 -0
- package/application/planet-application-ref.d.ts +36 -0
- package/application/planet-application-ref.d.ts.map +1 -0
- package/application/planet-application.service.d.ts +19 -0
- package/application/planet-application.service.d.ts.map +1 -0
- package/application/planet-application.service.ngfactory.d.ts.map +1 -0
- package/{packages/planet/src/application/portal-application.ts → application/portal-application.d.ts} +5 -18
- package/application/portal-application.d.ts.map +1 -0
- package/assets-loader.d.ts +33 -0
- package/assets-loader.d.ts.map +1 -0
- package/assets-loader.ngfactory.d.ts.map +1 -0
- package/bundles/worktile-planet.umd.js +2564 -0
- package/bundles/worktile-planet.umd.js.map +1 -0
- package/component/planet-component-loader.d.ts +28 -0
- package/component/planet-component-loader.d.ts.map +1 -0
- package/component/planet-component-loader.ngfactory.d.ts.map +1 -0
- package/component/planet-component-ref.d.ts +8 -0
- package/component/planet-component-ref.d.ts.map +1 -0
- package/{packages/planet/src/component/plant-component.config.ts → component/plant-component.config.d.ts} +4 -4
- package/component/plant-component.config.d.ts.map +1 -0
- package/debug.d.ts +22 -0
- package/debug.d.ts.map +1 -0
- package/empty/empty.component.d.ts +3 -0
- package/empty/empty.component.d.ts.map +1 -0
- package/empty/empty.component.ngfactory.d.ts.map +1 -0
- package/esm2015/application/planet-application-loader.js +457 -0
- package/esm2015/application/planet-application-ref.js +97 -0
- package/esm2015/application/planet-application.service.js +87 -0
- package/esm2015/application/portal-application.js +16 -0
- package/esm2015/assets-loader.js +217 -0
- package/esm2015/component/planet-component-loader.js +155 -0
- package/esm2015/component/planet-component-ref.js +3 -0
- package/esm2015/component/plant-component.config.js +7 -0
- package/esm2015/debug.js +33 -0
- package/esm2015/empty/empty.component.js +10 -0
- package/esm2015/global-event-dispatcher.js +71 -0
- package/esm2015/global-planet.js +54 -0
- package/esm2015/helpers.js +119 -0
- package/esm2015/module.js +27 -0
- package/esm2015/planet.class.js +9 -0
- package/esm2015/planet.js +91 -0
- package/esm2015/public-api.js +18 -0
- package/esm2015/sandbox/constants.js +7 -0
- package/esm2015/sandbox/exec.js +15 -0
- package/esm2015/sandbox/index.js +20 -0
- package/esm2015/sandbox/proxy/patches/document.js +12 -0
- package/esm2015/sandbox/proxy/patches/eventListener.js +41 -0
- package/esm2015/sandbox/proxy/patches/index.js +11 -0
- package/esm2015/sandbox/proxy/patches/storage.js +40 -0
- package/esm2015/sandbox/proxy/patches/timer.js +43 -0
- package/esm2015/sandbox/proxy/proxies/common.js +132 -0
- package/esm2015/sandbox/proxy/proxies/document.js +126 -0
- package/esm2015/sandbox/proxy/proxies/window.js +155 -0
- package/esm2015/sandbox/proxy/proxy-sandbox.js +49 -0
- package/esm2015/sandbox/proxy/types.js +2 -0
- package/esm2015/sandbox/sandbox.js +7 -0
- package/esm2015/sandbox/snapshot/snapshot-sandbox.js +12 -0
- package/esm2015/sandbox/types.js +2 -0
- package/esm2015/worktile-planet.js +6 -0
- package/fesm2015/worktile-planet.js +2048 -0
- package/fesm2015/worktile-planet.js.map +1 -0
- package/global-event-dispatcher.d.ts +20 -0
- package/global-event-dispatcher.d.ts.map +1 -0
- package/global-event-dispatcher.ngfactory.d.ts.map +1 -0
- package/global-planet.d.ts +23 -0
- package/global-planet.d.ts.map +1 -0
- package/helpers.d.ts +39 -0
- package/helpers.d.ts.map +1 -0
- package/module.d.ts +6 -0
- package/module.d.ts.map +1 -0
- package/module.ngfactory.d.ts.map +1 -0
- package/package.json +16 -121
- package/{packages/planet/src/planet.class.ts → planet.class.d.ts} +5 -26
- package/planet.class.d.ts.map +1 -0
- package/planet.d.ts +25 -0
- package/planet.d.ts.map +1 -0
- package/planet.ngfactory.d.ts.map +1 -0
- package/{packages/planet/src/public-api.ts → public-api.d.ts} +1 -4
- package/public-api.d.ts.map +1 -0
- package/sandbox/constants.d.ts +7 -0
- package/sandbox/constants.d.ts.map +1 -0
- package/sandbox/exec.d.ts +3 -0
- package/sandbox/exec.d.ts.map +1 -0
- package/sandbox/index.d.ts +7 -0
- package/sandbox/index.d.ts.map +1 -0
- package/sandbox/proxy/patches/document.d.ts +3 -0
- package/sandbox/proxy/patches/document.d.ts.map +1 -0
- package/sandbox/proxy/patches/eventListener.d.ts +3 -0
- package/sandbox/proxy/patches/eventListener.d.ts.map +1 -0
- package/sandbox/proxy/patches/index.d.ts +3 -0
- package/sandbox/proxy/patches/index.d.ts.map +1 -0
- package/sandbox/proxy/patches/storage.d.ts +15 -0
- package/sandbox/proxy/patches/storage.d.ts.map +1 -0
- package/sandbox/proxy/patches/timer.d.ts +3 -0
- package/sandbox/proxy/patches/timer.d.ts.map +1 -0
- package/sandbox/proxy/proxies/common.d.ts +13 -0
- package/sandbox/proxy/proxies/common.d.ts.map +1 -0
- package/sandbox/proxy/proxies/document.d.ts +14 -0
- package/sandbox/proxy/proxies/document.d.ts.map +1 -0
- package/sandbox/proxy/proxies/window.d.ts +13 -0
- package/sandbox/proxy/proxies/window.d.ts.map +1 -0
- package/sandbox/proxy/proxy-sandbox.d.ts +16 -0
- package/sandbox/proxy/proxy-sandbox.d.ts.map +1 -0
- package/{packages/planet/src/sandbox/proxy/types.ts → sandbox/proxy/types.d.ts} +2 -8
- package/sandbox/proxy/types.d.ts.map +1 -0
- package/sandbox/sandbox.d.ts +12 -0
- package/sandbox/sandbox.d.ts.map +1 -0
- package/sandbox/snapshot/snapshot-sandbox.d.ts +9 -0
- package/sandbox/snapshot/snapshot-sandbox.d.ts.map +1 -0
- package/sandbox/types.d.ts +2 -0
- package/sandbox/types.d.ts.map +1 -0
- package/worktile-planet.d.ts +6 -0
- package/worktile-planet.d.ts.map +1 -0
- package/worktile-planet.metadata.json +1 -0
- package/.all-contributorsrc +0 -84
- package/.circleci/config.yml +0 -17
- package/.coveralls.yml +0 -1
- package/.docgeni/public/assets/favicon.ico +0 -0
- package/.docgeni/public/index.html +0 -13
- package/.docgenirc.js +0 -35
- package/.dockerignore +0 -1
- package/.editorconfig +0 -22
- package/.github/FUNDING.yml +0 -12
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.prettierignore +0 -7
- package/.prettierrc +0 -28
- package/.travis.yml +0 -26
- package/.wpmrc.js +0 -11
- package/CHANGELOG.md +0 -391
- package/CODE_OF_CONDUCT.md +0 -76
- package/Dockerfile +0 -11
- package/LICENSE +0 -21
- package/README.md +0 -348
- package/README.zh-CN.md +0 -307
- package/SECURITY.md +0 -21
- package/angular.json +0 -373
- package/commitlint.config.js +0 -6
- package/docs/api/defineApplication.md +0 -46
- package/docs/api/globalEventDispatcher.md +0 -51
- package/docs/api/index.md +0 -5
- package/docs/api/planet.md +0 -117
- package/docs/guides/getting-started.md +0 -174
- package/docs/guides/index.md +0 -5
- package/docs/guides/intro.md +0 -216
- package/examples/app1/browserslist +0 -11
- package/examples/app1/extra-webpack.config.js +0 -33
- package/examples/app1/karma.conf.js +0 -31
- package/examples/app1/postcss.config.js +0 -1
- package/examples/app1/src/app/app.module.ts +0 -44
- package/examples/app1/src/app/app.routing.ts +0 -49
- package/examples/app1/src/app/counter.service.ts +0 -16
- package/examples/app1/src/app/dashboard/dashboard.component.html +0 -51
- package/examples/app1/src/app/dashboard/dashboard.component.ts +0 -70
- package/examples/app1/src/app/detail/detail.component.html +0 -8
- package/examples/app1/src/app/detail/detail.component.ts +0 -18
- package/examples/app1/src/app/overlay.ts +0 -26
- package/examples/app1/src/app/projects/dialog/projects-dialog.component.html +0 -10
- package/examples/app1/src/app/projects/dialog/projects-dialog.component.ts +0 -41
- package/examples/app1/src/app/projects/projects.component.ts +0 -33
- package/examples/app1/src/app/root/root.component.css +0 -3
- package/examples/app1/src/app/root/root.component.html +0 -16
- package/examples/app1/src/app/root/root.component.ts +0 -35
- package/examples/app1/src/app/services/initialized-data.resolver.ts +0 -15
- package/examples/app1/src/app/shared.module.ts +0 -57
- package/examples/app1/src/app/user/detail/user-detail.component.html +0 -5
- package/examples/app1/src/app/user/detail/user-detail.component.ts +0 -20
- package/examples/app1/src/app/user/user-list.component.html +0 -7
- package/examples/app1/src/app/user/user-list.component.ts +0 -20
- package/examples/app1/src/app/user/user.module.ts +0 -31
- package/examples/app1/src/assets/.gitkeep +0 -0
- package/examples/app1/src/assets/github.png +0 -0
- package/examples/app1/src/assets/main.css +0 -3
- package/examples/app1/src/environments/environment.prod.ts +0 -3
- package/examples/app1/src/environments/environment.ts +0 -16
- package/examples/app1/src/favicon.ico +0 -0
- package/examples/app1/src/index.html +0 -14
- package/examples/app1/src/main.ts +0 -35
- package/examples/app1/src/polyfills.ts +0 -84
- package/examples/app1/src/styles.scss +0 -35
- package/examples/app1/src/test.ts +0 -14
- package/examples/app1/temp.js +0 -221
- package/examples/app1/tsconfig.app.json +0 -10
- package/examples/app1/tsconfig.spec.json +0 -18
- package/examples/app1/tslint.json +0 -17
- package/examples/app1/webpack.config.js +0 -127
- package/examples/app2/browserslist +0 -11
- package/examples/app2/extra-webpack.config.js +0 -32
- package/examples/app2/karma.conf.js +0 -31
- package/examples/app2/src/app/app.module.ts +0 -90
- package/examples/app2/src/app/dashboard/dashboard.component.html +0 -21
- package/examples/app2/src/app/dashboard/dashboard.component.ts +0 -27
- package/examples/app2/src/app/overlay.ts +0 -26
- package/examples/app2/src/app/projects/detail/detail.component.html +0 -16
- package/examples/app2/src/app/projects/detail/detail.component.ts +0 -21
- package/examples/app2/src/app/projects/project-list.component.html +0 -29
- package/examples/app2/src/app/projects/project-list.component.ts +0 -58
- package/examples/app2/src/app/projects/project.resolver.ts +0 -15
- package/examples/app2/src/app/projects/projects.service.ts +0 -28
- package/examples/app2/src/app/projects/tasks/tasks.component.html +0 -10
- package/examples/app2/src/app/projects/tasks/tasks.component.ts +0 -16
- package/examples/app2/src/app/projects/view/view.component.html +0 -1
- package/examples/app2/src/app/projects/view/view.component.ts +0 -20
- package/examples/app2/src/app/root/root.component.html +0 -14
- package/examples/app2/src/app/root/root.component.scss +0 -12
- package/examples/app2/src/app/root/root.component.ts +0 -28
- package/examples/app2/src/app/shared.module.ts +0 -59
- package/examples/app2/src/assets/.gitkeep +0 -0
- package/examples/app2/src/environments/environment.prod.ts +0 -3
- package/examples/app2/src/environments/environment.ts +0 -16
- package/examples/app2/src/favicon.ico +0 -0
- package/examples/app2/src/index.html +0 -14
- package/examples/app2/src/main.ts +0 -36
- package/examples/app2/src/polyfills.ts +0 -84
- package/examples/app2/src/styles.scss +0 -28
- package/examples/app2/src/test.ts +0 -14
- package/examples/app2/tsconfig.app.json +0 -10
- package/examples/app2/tsconfig.spec.json +0 -18
- package/examples/app2/tslint.json +0 -7
- package/examples/app2/webpack.config.js +0 -92
- package/examples/common/app-root-context.ts +0 -10
- package/examples/common/cache.ts +0 -82
- package/examples/common/index.ts +0 -13
- package/examples/common/module.ts +0 -10
- package/examples/common/overlay-container.service.ts +0 -28
- package/examples/common/section-card/section-card.component.html +0 -5
- package/examples/common/section-card/section-card.component.scss +0 -15
- package/examples/common/section-card/section-card.component.ts +0 -11
- package/examples/common/utils.ts +0 -0
- package/examples/portal/src/app/a-detail/a-detail.component.html +0 -8
- package/examples/portal/src/app/a-detail/a-detail.component.ts +0 -18
- package/examples/portal/src/app/about/about.component.html +0 -27
- package/examples/portal/src/app/about/about.component.scss +0 -0
- package/examples/portal/src/app/about/about.component.spec.ts +0 -26
- package/examples/portal/src/app/about/about.component.ts +0 -26
- package/examples/portal/src/app/app-routing.module.ts +0 -57
- package/examples/portal/src/app/app.component.html +0 -73
- package/examples/portal/src/app/app.component.scss +0 -58
- package/examples/portal/src/app/app.component.spec.ts +0 -33
- package/examples/portal/src/app/app.component.ts +0 -111
- package/examples/portal/src/app/app.module.ts +0 -64
- package/examples/portal/src/app/custom-settings.service.ts +0 -44
- package/examples/portal/src/app/overlay.ts +0 -26
- package/examples/portal/src/app/settings/settings.component.html +0 -31
- package/examples/portal/src/app/settings/settings.component.scss +0 -3
- package/examples/portal/src/app/settings/settings.component.ts +0 -43
- package/examples/portal/src/assets/.gitkeep +0 -0
- package/examples/portal/src/assets/apps.json +0 -29
- package/examples/portal/src/assets/icons/sprite.defs.svg +0 -1
- package/examples/portal/src/assets/images/logo.svg +0 -16
- package/examples/portal/src/assets/ngx-planet-micro-front-end.gif +0 -0
- package/examples/portal/src/browserslist +0 -11
- package/examples/portal/src/environments/environment.prod.ts +0 -3
- package/examples/portal/src/environments/environment.ts +0 -16
- package/examples/portal/src/extra-webpack.config.js +0 -32
- package/examples/portal/src/favicon.ico +0 -0
- package/examples/portal/src/index.html +0 -14
- package/examples/portal/src/karma.conf.js +0 -31
- package/examples/portal/src/main.ts +0 -18
- package/examples/portal/src/polyfills.ts +0 -84
- package/examples/portal/src/reboot.scss +0 -14
- package/examples/portal/src/styles.scss +0 -14
- package/examples/portal/src/test.ts +0 -14
- package/examples/portal/src/tsconfig.app.json +0 -10
- package/examples/portal/src/tsconfig.spec.json +0 -9
- package/examples/portal/src/tslint.json +0 -7
- package/extra-webpack.config.js +0 -5
- package/nginx.conf +0 -17
- package/packages/planet/karma.conf.js +0 -37
- package/packages/planet/ng-package.json +0 -7
- package/packages/planet/package.json +0 -10
- package/packages/planet/src/application/planet-application-loader.spec.ts +0 -1102
- package/packages/planet/src/application/planet-application-loader.ts +0 -549
- package/packages/planet/src/application/planet-application-ref.spec.ts +0 -233
- package/packages/planet/src/application/planet-application-ref.ts +0 -131
- package/packages/planet/src/application/planet-application.service.spec.ts +0 -145
- package/packages/planet/src/application/planet-application.service.ts +0 -88
- package/packages/planet/src/application/portal-application.spec.ts +0 -53
- package/packages/planet/src/assets-loader.spec.ts +0 -689
- package/packages/planet/src/assets-loader.ts +0 -247
- package/packages/planet/src/component/planet-component-loader.spec.ts +0 -187
- package/packages/planet/src/component/planet-component-loader.ts +0 -173
- package/packages/planet/src/component/planet-component-ref.ts +0 -8
- package/packages/planet/src/debug.spec.ts +0 -58
- package/packages/planet/src/debug.ts +0 -66
- package/packages/planet/src/empty/empty.component.spec.ts +0 -34
- package/packages/planet/src/empty/empty.component.ts +0 -7
- package/packages/planet/src/global-event-dispatcher.spec.ts +0 -81
- package/packages/planet/src/global-event-dispatcher.ts +0 -82
- package/packages/planet/src/global-planet.spec.ts +0 -39
- package/packages/planet/src/global-planet.ts +0 -73
- package/packages/planet/src/helpers.spec.ts +0 -242
- package/packages/planet/src/helpers.ts +0 -125
- package/packages/planet/src/module.spec.ts +0 -79
- package/packages/planet/src/module.ts +0 -25
- package/packages/planet/src/planet.spec.ts +0 -226
- package/packages/planet/src/planet.ts +0 -113
- package/packages/planet/src/sandbox/constants.ts +0 -6
- package/packages/planet/src/sandbox/exec.ts +0 -22
- package/packages/planet/src/sandbox/index.ts +0 -24
- package/packages/planet/src/sandbox/proxy/patches/document.ts +0 -13
- package/packages/planet/src/sandbox/proxy/patches/eventListener.ts +0 -49
- package/packages/planet/src/sandbox/proxy/patches/index.ts +0 -13
- package/packages/planet/src/sandbox/proxy/patches/storage.ts +0 -53
- package/packages/planet/src/sandbox/proxy/patches/timer.ts +0 -50
- package/packages/planet/src/sandbox/proxy/proxies/common.ts +0 -137
- package/packages/planet/src/sandbox/proxy/proxies/document.ts +0 -140
- package/packages/planet/src/sandbox/proxy/proxies/window.ts +0 -176
- package/packages/planet/src/sandbox/proxy/proxy-sandbox.ts +0 -59
- package/packages/planet/src/sandbox/sandbox.ts +0 -20
- package/packages/planet/src/sandbox/snapshot/snapshot-sandbox.ts +0 -12
- package/packages/planet/src/sandbox/types.ts +0 -1
- package/packages/planet/src/test.ts +0 -16
- package/packages/planet/src/testing/app1.module.ts +0 -34
- package/packages/planet/src/testing/app2.module.ts +0 -24
- package/packages/planet/src/testing/applications.ts +0 -58
- package/packages/planet/src/testing/index.ts +0 -2
- package/packages/planet/src/testing/utils.ts +0 -31
- package/packages/planet/tsconfig.lib.json +0 -27
- package/packages/planet/tsconfig.lib.prod.json +0 -9
- package/packages/planet/tsconfig.spec.json +0 -17
- package/packages/planet/tslint.json +0 -7
- package/postcss.config.js +0 -3
- package/proxy.conf.js +0 -15
- package/tsconfig.json +0 -23
- package/tslint.json +0 -80
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// const ngToolsWebpack = require('@ngtools/webpack');
|
|
2
|
-
// const path = require('path');
|
|
3
|
-
// const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
4
|
-
// const ProgressPlugin = require('webpack/lib/ProgressPlugin');
|
|
5
|
-
// const workspaceRoot = path.resolve(__dirname, './');
|
|
6
|
-
// const projectRoot = path.resolve(__dirname, './');
|
|
7
|
-
// const {
|
|
8
|
-
// IndexHtmlWebpackPlugin
|
|
9
|
-
// } = require('@angular-devkit/build-angular/src/angular-cli-files/plugins/index-html-webpack-plugin');
|
|
10
|
-
// const WebpackAssetsManifest = require('webpack-assets-manifest');
|
|
11
|
-
|
|
12
|
-
// const config = {
|
|
13
|
-
// mode: 'development',
|
|
14
|
-
// resolve: {
|
|
15
|
-
// extensions: ['.ts', '.js']
|
|
16
|
-
// },
|
|
17
|
-
// context: projectRoot,
|
|
18
|
-
// entry: {
|
|
19
|
-
// main: path.resolve(projectRoot, './src/main.ts'),
|
|
20
|
-
// polyfills: path.resolve(projectRoot, './src/polyfills.ts')
|
|
21
|
-
// },
|
|
22
|
-
// output: {
|
|
23
|
-
// path: path.resolve(workspaceRoot, './dist'),
|
|
24
|
-
// filename: `[name].js`,
|
|
25
|
-
// libraryTarget: 'umd',
|
|
26
|
-
// library: 'app2'
|
|
27
|
-
// },
|
|
28
|
-
// plugins: [
|
|
29
|
-
// new WebpackAssetsManifest(),
|
|
30
|
-
// new ngToolsWebpack.AngularCompilerPlugin({
|
|
31
|
-
// tsConfigPath: path.resolve(projectRoot, './src/tsconfig.app.json'),
|
|
32
|
-
// mainPath: path.resolve(projectRoot, './src/main.ts'),
|
|
33
|
-
// hostReplacementPaths: {
|
|
34
|
-
// './src/environments/environment.ts': './src/environments/environment.prod.ts'
|
|
35
|
-
// },
|
|
36
|
-
// sourceMap: true,
|
|
37
|
-
// compilerOptions: {}
|
|
38
|
-
// }),
|
|
39
|
-
// new IndexHtmlWebpackPlugin({
|
|
40
|
-
// input: path.resolve(__dirname, './src/index.html'),
|
|
41
|
-
// output: path.basename('./src/index.html')
|
|
42
|
-
// // baseHref: buildOptions.baseHref,
|
|
43
|
-
// // entrypoints: generateEntryPoints(buildOptions),
|
|
44
|
-
// // deployUrl: buildOptions.deployUrl,
|
|
45
|
-
// // sri: buildOptions.subresourceIntegrity
|
|
46
|
-
// }),
|
|
47
|
-
// // new HtmlWebpackPlugin({
|
|
48
|
-
// // filename: 'src/index.html'
|
|
49
|
-
// // })
|
|
50
|
-
// new ProgressPlugin()
|
|
51
|
-
// ],
|
|
52
|
-
// module: {
|
|
53
|
-
// rules: [
|
|
54
|
-
// { test: /\.scss$/, loaders: ['raw-loader', 'sass-loader'] },
|
|
55
|
-
// { test: /\.css$/, loader: 'raw-loader' },
|
|
56
|
-
// { test: /\.html$/, loader: 'raw-loader' },
|
|
57
|
-
// {
|
|
58
|
-
// // Mark files inside `@angular/core` as using SystemJS style dynamic imports.
|
|
59
|
-
// // Removing this will cause deprecation warnings to appear.
|
|
60
|
-
// test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/,
|
|
61
|
-
// parser: { system: true }
|
|
62
|
-
// },
|
|
63
|
-
// // require.resolve is required only because of the monorepo structure here.
|
|
64
|
-
// {
|
|
65
|
-
// test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
|
|
66
|
-
// // test: /\.ts$/,
|
|
67
|
-
// loader: require.resolve('@ngtools/webpack')
|
|
68
|
-
// }
|
|
69
|
-
// ]
|
|
70
|
-
// },
|
|
71
|
-
// devServer: {
|
|
72
|
-
// historyApiFallback: true,
|
|
73
|
-
// port: 3002
|
|
74
|
-
// },
|
|
75
|
-
// watch: true
|
|
76
|
-
// };
|
|
77
|
-
|
|
78
|
-
// const assets = ['favicon.ico', 'assets/'];
|
|
79
|
-
// const copyWebpackPluginPatterns = assets.map(asset => {
|
|
80
|
-
// return {
|
|
81
|
-
// from: `src/${asset}`,
|
|
82
|
-
// to: asset.includes('.') ? '' : asset
|
|
83
|
-
// };
|
|
84
|
-
// });
|
|
85
|
-
// const copyWebpackPluginOptions = {
|
|
86
|
-
// ignore: ['.gitkeep', '**/.DS_Store', '**/Thumbs.db']
|
|
87
|
-
// };
|
|
88
|
-
|
|
89
|
-
// const copyWebpackPluginInstance = new CopyWebpackPlugin(copyWebpackPluginPatterns, copyWebpackPluginOptions);
|
|
90
|
-
// config.plugins.push(copyWebpackPluginInstance);
|
|
91
|
-
|
|
92
|
-
// module.exports = config;
|
package/examples/common/cache.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { helpers } from 'ngx-tethys/util';
|
|
2
|
-
const { isString, isNumber } = helpers;
|
|
3
|
-
const NUMBER_PREFIX = `____n____`;
|
|
4
|
-
|
|
5
|
-
const supportedStorage = window && window.localStorage;
|
|
6
|
-
const storageSource = window.localStorage || window.sessionStorage;
|
|
7
|
-
|
|
8
|
-
const cache = {
|
|
9
|
-
/**
|
|
10
|
-
* set item to local storage
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* cache.set('key1', 'key1-value');
|
|
14
|
-
* cache.set('key1', 10);
|
|
15
|
-
* cache.set('key1', { id: 1, name: 'name 1'});
|
|
16
|
-
* cache.set('key1', 'key1-value', false);
|
|
17
|
-
* @param key string
|
|
18
|
-
* @param value string | number | object
|
|
19
|
-
*/
|
|
20
|
-
set<TValue = string>(key: string, value: TValue) {
|
|
21
|
-
const itemValue = isString(value)
|
|
22
|
-
? value
|
|
23
|
-
: isNumber(value)
|
|
24
|
-
? `${NUMBER_PREFIX}${value}`
|
|
25
|
-
: JSON.stringify(value);
|
|
26
|
-
if (supportedStorage) {
|
|
27
|
-
storageSource.setItem(key, itemValue as string);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* get item from local storage
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* cache.get('key1');
|
|
35
|
-
* cache.get<number>('key1');
|
|
36
|
-
* cache.get<User>('key1');
|
|
37
|
-
* cache.get<User[]>('key1');
|
|
38
|
-
* cache.get('key1', false);
|
|
39
|
-
*
|
|
40
|
-
* @param key string
|
|
41
|
-
*/
|
|
42
|
-
get<TValue = string>(key: string): TValue {
|
|
43
|
-
if (supportedStorage) {
|
|
44
|
-
const value = storageSource.getItem(key);
|
|
45
|
-
if (value) {
|
|
46
|
-
try {
|
|
47
|
-
const result = JSON.parse(value);
|
|
48
|
-
return result;
|
|
49
|
-
} catch (error) {
|
|
50
|
-
if (isString(value) && value.includes(NUMBER_PREFIX)) {
|
|
51
|
-
return parseInt(value.replace(NUMBER_PREFIX, ''), 10) as any;
|
|
52
|
-
} else {
|
|
53
|
-
return value as any;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
return undefined;
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
/**
|
|
64
|
-
* remove key from storage
|
|
65
|
-
* @param key cache key
|
|
66
|
-
*/
|
|
67
|
-
remove(key: string) {
|
|
68
|
-
if (supportedStorage) {
|
|
69
|
-
storageSource.removeItem(key);
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
/**
|
|
73
|
-
* clear all storage
|
|
74
|
-
*/
|
|
75
|
-
clear() {
|
|
76
|
-
if (supportedStorage) {
|
|
77
|
-
storageSource.clear();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export { cache };
|
package/examples/common/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Overlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
2
|
-
import { Provider } from '@angular/core';
|
|
3
|
-
import { PlanetOverlayContainer } from './overlay-container.service';
|
|
4
|
-
|
|
5
|
-
export * from './app-root-context';
|
|
6
|
-
export * from './module';
|
|
7
|
-
export * from './cache';
|
|
8
|
-
export * from './overlay-container.service';
|
|
9
|
-
|
|
10
|
-
export const OVERLAY_PROVIDER: Provider = {
|
|
11
|
-
provide: OverlayContainer,
|
|
12
|
-
useClass: PlanetOverlayContainer
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { SectionCardComponent } from './section-card/section-card.component';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
|
|
5
|
-
@NgModule({
|
|
6
|
-
declarations: [SectionCardComponent],
|
|
7
|
-
imports: [CommonModule],
|
|
8
|
-
exports: [SectionCardComponent]
|
|
9
|
-
})
|
|
10
|
-
export class DemoCommonModule {}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
2
|
-
import { Platform } from '@angular/cdk/platform';
|
|
3
|
-
import { DOCUMENT } from '@angular/common';
|
|
4
|
-
import { Inject, Injectable } from '@angular/core';
|
|
5
|
-
|
|
6
|
-
@Injectable({ providedIn: 'root' })
|
|
7
|
-
export class PlanetOverlayContainer extends OverlayContainer {
|
|
8
|
-
constructor(@Inject(DOCUMENT) document: any, protected _platform: Platform) {
|
|
9
|
-
super(document, _platform);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
private _getContainerElement(): HTMLElement {
|
|
13
|
-
if (!this._containerElement) {
|
|
14
|
-
this._containerElement = this._document.querySelector('.cdk-overlay-container');
|
|
15
|
-
return this._containerElement;
|
|
16
|
-
} else {
|
|
17
|
-
return this._containerElement;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getContainerElement(): HTMLElement {
|
|
22
|
-
if (!this._getContainerElement()) {
|
|
23
|
-
this._createContainer();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return this._containerElement;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.section-card {
|
|
2
|
-
display: block;
|
|
3
|
-
position: relative;
|
|
4
|
-
padding: 15px;
|
|
5
|
-
border: 2px $gray-300 dashed;
|
|
6
|
-
|
|
7
|
-
.section-card-header {
|
|
8
|
-
position: absolute;
|
|
9
|
-
padding: 0 10px;
|
|
10
|
-
background: $white;
|
|
11
|
-
top: -10px;
|
|
12
|
-
left: 5px;
|
|
13
|
-
color: $gray-600; // $gray-500;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'section-card',
|
|
5
|
-
templateUrl: './section-card.component.html'
|
|
6
|
-
})
|
|
7
|
-
export class SectionCardComponent {
|
|
8
|
-
@HostBinding('class.section-card') addSectionCard = true;
|
|
9
|
-
|
|
10
|
-
@Input() title: string;
|
|
11
|
-
}
|
package/examples/common/utils.ts
DELETED
|
File without changes
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<thy-dialog-header thyTitle="a Detail from Portal"> </thy-dialog-header>
|
|
2
|
-
<thy-dialog-body>
|
|
3
|
-
<span class="resame-name">This is Micro Front-end application example.</span>
|
|
4
|
-
<div class="btn-pair mt-2">
|
|
5
|
-
<button thyButton="primary-square" (click)="ok()">Ok</button>
|
|
6
|
-
<button thyButton="link-secondary" (click)="close()">Cancel</button>
|
|
7
|
-
</div>
|
|
8
|
-
</thy-dialog-body>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ThyDialogRef } from 'ngx-tethys/dialog';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-a-detail',
|
|
6
|
-
templateUrl: './a-detail.component.html'
|
|
7
|
-
})
|
|
8
|
-
export class ADetailComponent {
|
|
9
|
-
constructor(private dialogRef: ThyDialogRef<ADetailComponent>) {}
|
|
10
|
-
|
|
11
|
-
ok() {
|
|
12
|
-
this.dialogRef.close();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
close() {
|
|
16
|
-
this.dialogRef.close();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<section-card title="Planet">
|
|
2
|
-
<code>ngx-planet</code> is a powerful and easy micro front-end library only for angular.<br />
|
|
3
|
-
This is live demo for planet which contains portal, app1, app2.<br /><br />
|
|
4
|
-
<span class="text-danger">Github Repository </span>
|
|
5
|
-
<a target="_blank" href="https://github.com/worktile/ngx-planet">https://github.com/worktile/ngx-planet</a>
|
|
6
|
-
</section-card>
|
|
7
|
-
|
|
8
|
-
<section-card class="mt-5" title="AppRootContext data, it can be change in app1">
|
|
9
|
-
<span class="text-desc">appRootContext.name: </span> <span class="text-danger">{{ appRootContext.name }}</span>
|
|
10
|
-
</section-card>
|
|
11
|
-
|
|
12
|
-
<section-card class="mt-5" title="Links to app1 and app2 from portal">
|
|
13
|
-
<a [routerLink]="['/app1/dashboard']" routerLinkActive="active">To App1's Dashboard</a> <br />
|
|
14
|
-
<a href="javascript:;" (click)="toApp2Dashboard()">To App2's Dashboard</a>
|
|
15
|
-
</section-card>
|
|
16
|
-
|
|
17
|
-
<section-card class="mt-5" title="Open detail by dialog, it can be opened in app1">
|
|
18
|
-
<button thyButton="primary-square" (click)="openADetail()">Open A Detail</button>
|
|
19
|
-
</section-card>
|
|
20
|
-
|
|
21
|
-
<section-card class="mt-5 portal-special" title="Portal 特有的样式">
|
|
22
|
-
<span class="text-desc">portal 特有样式: </span> <span class="text-danger">font-size: 20px</span>
|
|
23
|
-
</section-card>
|
|
24
|
-
|
|
25
|
-
<section-card class="mt-5 same-name" title="同名样式">
|
|
26
|
-
<span class="text-desc">同名样式: </span> <span class="text-danger">color: blue, font-size:12px</span>
|
|
27
|
-
</section-card>
|
|
File without changes
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AboutComponent } from './about.component';
|
|
4
|
-
|
|
5
|
-
describe('AboutComponent', () => {
|
|
6
|
-
let component: AboutComponent;
|
|
7
|
-
let fixture: ComponentFixture<AboutComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(
|
|
10
|
-
waitForAsync(() => {
|
|
11
|
-
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [AboutComponent]
|
|
13
|
-
}).compileComponents();
|
|
14
|
-
})
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
fixture = TestBed.createComponent(AboutComponent);
|
|
19
|
-
component = fixture.componentInstance;
|
|
20
|
-
fixture.detectChanges();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('should create', () => {
|
|
24
|
-
expect(component).toBeTruthy();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, HostBinding } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { ThyDialog } from 'ngx-tethys/dialog';
|
|
4
|
-
import { ADetailComponent } from '../a-detail/a-detail.component';
|
|
5
|
-
import { AppRootContext } from '@demo/common';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'app-about',
|
|
9
|
-
templateUrl: './about.component.html',
|
|
10
|
-
styleUrls: ['./about.component.scss']
|
|
11
|
-
})
|
|
12
|
-
export class AboutComponent implements OnInit {
|
|
13
|
-
@HostBinding(`class.thy-layout-content`) isThyLayoutContent = true;
|
|
14
|
-
|
|
15
|
-
constructor(private router: Router, private thyDialog: ThyDialog, public appRootContext: AppRootContext) {}
|
|
16
|
-
|
|
17
|
-
ngOnInit() {}
|
|
18
|
-
|
|
19
|
-
toApp2Dashboard() {
|
|
20
|
-
this.router.navigateByUrl(`/app2/dashboard`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
openADetail() {
|
|
24
|
-
this.thyDialog.open(ADetailComponent);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { Routes, RouterModule } from '@angular/router';
|
|
3
|
-
import { AboutComponent } from './about/about.component';
|
|
4
|
-
import { SettingsComponent } from './settings/settings.component';
|
|
5
|
-
import { EmptyComponent } from 'ngx-planet';
|
|
6
|
-
|
|
7
|
-
const routes: Routes = [
|
|
8
|
-
{
|
|
9
|
-
path: '',
|
|
10
|
-
redirectTo: 'about',
|
|
11
|
-
pathMatch: 'full'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
path: 'about',
|
|
15
|
-
component: AboutComponent
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
path: 'settings',
|
|
19
|
-
component: SettingsComponent
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
path: 'app1',
|
|
23
|
-
component: EmptyComponent,
|
|
24
|
-
children: [
|
|
25
|
-
{
|
|
26
|
-
path: '**',
|
|
27
|
-
component: EmptyComponent
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
path: 'app2',
|
|
33
|
-
component: EmptyComponent,
|
|
34
|
-
children: [
|
|
35
|
-
{
|
|
36
|
-
path: '**',
|
|
37
|
-
component: EmptyComponent
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
path: 'app4',
|
|
43
|
-
component: EmptyComponent,
|
|
44
|
-
children: [
|
|
45
|
-
{
|
|
46
|
-
path: '**',
|
|
47
|
-
component: EmptyComponent
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
@NgModule({
|
|
54
|
-
imports: [RouterModule.forRoot(routes, { paramsInheritanceStrategy: 'always', relativeLinkResolution: 'legacy' })],
|
|
55
|
-
exports: [RouterModule]
|
|
56
|
-
})
|
|
57
|
-
export class AppRoutingModule {}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<thy-layout>
|
|
2
|
-
<div class="portal">
|
|
3
|
-
<thy-sidebar class="app-nav">
|
|
4
|
-
<img class="logo" src="/assets/images/logo.svg" />
|
|
5
|
-
<thy-nav [thyVertical]="'true'" class="mt-2" [thyType]="'primary'">
|
|
6
|
-
<a
|
|
7
|
-
thyNavLink
|
|
8
|
-
thyTooltip="App1"
|
|
9
|
-
[routerLink]="['/app1']"
|
|
10
|
-
routerLinkActive="active"
|
|
11
|
-
thyTooltip="App1"
|
|
12
|
-
thyTooltipPlacement="right"
|
|
13
|
-
>
|
|
14
|
-
<thy-icon thyIconName="application"></thy-icon>
|
|
15
|
-
</a>
|
|
16
|
-
<a thyNavLink [routerLink]="['/app2']" routerLinkActive="active" thyTooltip="App2" thyTooltipPlacement="right">
|
|
17
|
-
<thy-icon thyIconName="app-agile"></thy-icon>
|
|
18
|
-
</a>
|
|
19
|
-
<a
|
|
20
|
-
thyNavLink
|
|
21
|
-
[routerLink]="['/about']"
|
|
22
|
-
routerLinkActive="active"
|
|
23
|
-
thyTooltip="About"
|
|
24
|
-
thyTooltipPlacement="right"
|
|
25
|
-
>
|
|
26
|
-
<thy-icon thyIconName="smile"></thy-icon>
|
|
27
|
-
</a>
|
|
28
|
-
<a
|
|
29
|
-
thyNavLink
|
|
30
|
-
[routerLink]="['/settings']"
|
|
31
|
-
routerLinkActive="active"
|
|
32
|
-
thyTooltip="Settings"
|
|
33
|
-
thyTooltipPlacement="right"
|
|
34
|
-
><thy-icon thyIconName="settings"></thy-icon
|
|
35
|
-
></a>
|
|
36
|
-
<a
|
|
37
|
-
thyNavLink
|
|
38
|
-
href="javascript:;"
|
|
39
|
-
[thyPopover]="more"
|
|
40
|
-
thyPlacement="right"
|
|
41
|
-
thyTooltip="More"
|
|
42
|
-
thyTooltipPlacement="right"
|
|
43
|
-
>
|
|
44
|
-
<thy-icon thyIconName="more"></thy-icon>
|
|
45
|
-
</a>
|
|
46
|
-
|
|
47
|
-
<ng-template #more>
|
|
48
|
-
<thy-action-menu>
|
|
49
|
-
<a thyActionMenuItem routerLinkActive="active" [routerLink]="['/app1/dashboard']">
|
|
50
|
-
<span thyActionMenuItemIcon>
|
|
51
|
-
<thy-icon thyIconName="house"></thy-icon>
|
|
52
|
-
</span>
|
|
53
|
-
<span thyActionMenuItemName>To App1's dashboard</span>
|
|
54
|
-
</a>
|
|
55
|
-
<a thyActionMenuItem routerLinkActive="active" [routerLink]="['/app1/users']">
|
|
56
|
-
<span thyActionMenuItemIcon>
|
|
57
|
-
<thy-icon thyIconName="user-group"></thy-icon>
|
|
58
|
-
</span>
|
|
59
|
-
<span thyActionMenuItemName>To App1's users</span>
|
|
60
|
-
</a>
|
|
61
|
-
</thy-action-menu>
|
|
62
|
-
</ng-template>
|
|
63
|
-
</thy-nav>
|
|
64
|
-
</thy-sidebar>
|
|
65
|
-
</div>
|
|
66
|
-
<div id="app-host-container" class="thy-layout" [ngClass]="{ hide: !loadingDone }">
|
|
67
|
-
<div class="portal portal-container">
|
|
68
|
-
<router-outlet></router-outlet>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<thy-loading class="portal" *ngIf="!loadingDone" [thyDone]="loadingDone"></thy-loading>
|
|
73
|
-
</thy-layout>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
$app-nav-width: 70px;
|
|
2
|
-
$app-nav-bg-color: #48525c;
|
|
3
|
-
|
|
4
|
-
.portal-container {
|
|
5
|
-
display: contents;
|
|
6
|
-
height: 100%ß;
|
|
7
|
-
}
|
|
8
|
-
.app-nav {
|
|
9
|
-
width: $app-nav-width;
|
|
10
|
-
background: $app-nav-bg-color;
|
|
11
|
-
height: 100%;
|
|
12
|
-
|
|
13
|
-
.logo {
|
|
14
|
-
height: 50px;
|
|
15
|
-
margin-top: 15px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.thy-layout-sidebar {
|
|
19
|
-
border-right: none;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.nav-link {
|
|
23
|
-
opacity: 0.8;
|
|
24
|
-
min-width: $app-nav-width;
|
|
25
|
-
color: $white;
|
|
26
|
-
height: $app-nav-width;
|
|
27
|
-
text-align: center;
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
.thy-icon {
|
|
31
|
-
color: $white;
|
|
32
|
-
font-size: $font-size-xlg;
|
|
33
|
-
}
|
|
34
|
-
&.active,
|
|
35
|
-
&:hover {
|
|
36
|
-
background: rgb(57, 65, 76);
|
|
37
|
-
color: $white;
|
|
38
|
-
.thy-icon {
|
|
39
|
-
color: $white;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// .thy-nav--vertical {
|
|
45
|
-
// .nav-link {
|
|
46
|
-
// border-left-width: 0px;
|
|
47
|
-
// }
|
|
48
|
-
// }
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.same-name {
|
|
52
|
-
color: blue;
|
|
53
|
-
font-size: 12px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.portal-special {
|
|
57
|
-
font-size: 20px;
|
|
58
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
import { RouterTestingModule } from '@angular/router/testing';
|
|
3
|
-
import { AppComponent } from './app.component';
|
|
4
|
-
|
|
5
|
-
describe('AppComponent', () => {
|
|
6
|
-
beforeEach(
|
|
7
|
-
waitForAsync(() => {
|
|
8
|
-
TestBed.configureTestingModule({
|
|
9
|
-
imports: [RouterTestingModule],
|
|
10
|
-
declarations: [AppComponent]
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
})
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
it('should create the app', () => {
|
|
16
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
17
|
-
const app = fixture.debugElement.componentInstance;
|
|
18
|
-
expect(app).toBeTruthy();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it(`should have as title 'ngx-micro-frontend'`, () => {
|
|
22
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
23
|
-
const app = fixture.debugElement.componentInstance;
|
|
24
|
-
expect(app.title).toEqual('ngx-micro-frontend');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('should render title in a h1 tag', () => {
|
|
28
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
29
|
-
fixture.detectChanges();
|
|
30
|
-
const compiled = fixture.debugElement.nativeElement;
|
|
31
|
-
expect(compiled.querySelector('h1').textContent).toContain('Welcome to ngx-micro-frontend!');
|
|
32
|
-
});
|
|
33
|
-
});
|