@wavemaker/angular-codegen 12.0.0-next.142016 → 12.0.0-next.28533
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.
- {angular-codegen → package}/angular-app/angular.json +92 -99
- {angular-codegen → package}/angular-app/build-scripts/build.js +1 -0
- package/angular-app/build-scripts/index-html-transform-ng-serve.ts +20 -0
- {angular-codegen → package}/angular-app/build-scripts/post-build.js +17 -111
- package/angular-app/dependency-report.html +124 -0
- package/angular-app/generate-dependency-report.js +240 -0
- package/angular-app/npm-shrinkwrap.json +24046 -0
- {angular-codegen → package}/angular-app/package-lock.json +14731 -14457
- package/angular-app/package.json +129 -0
- package/angular-app/proxy.conf.js +14 -0
- package/angular-app/src/app/lazy-load-scripts.resolve.ts +13 -0
- package/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
- package/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
- package/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
- package/angular-app/src/assets/styles/css/font/summernote.woff2 +0 -0
- package/angular-app/src/assets/styles/css/wm-style.css +1 -0
- {angular-codegen → package}/angular-app/src/framework/services/component-ref-provider.service.ts +4 -0
- package/angular-app/src/framework/services/customwidget-config-provider.service.ts +13 -0
- package/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +56 -0
- package/angular-app/src/framework/util/page-util.ts +7 -0
- {angular-codegen → package}/angular-app/src/index.html +1 -1
- package/angular-app/src/main.ts +70 -0
- {angular-codegen → package}/angular-app/src/setup-jest.js +10 -10
- {angular-codegen → package}/angular-app/src/tsconfig.app.json +5 -2
- {angular-codegen → package}/angular-app/tsconfig.json +9 -36
- {angular-codegen → package}/angular-app/tsconfig.web-app.json +2 -23
- package/angular-app/wm-custom-webpack.config.js +51 -0
- package/build-angular-app.js +522 -0
- package/dependencies/app.component.html +40 -0
- package/dependencies/custom-widgets-bundle.cjs.js +421 -0
- {angular-codegen → package}/dependencies/expression-parser.cjs.js +20415 -40794
- {angular-codegen → package}/dependencies/pipe-provider.cjs.js +98263 -96194
- {angular-codegen → package}/dependencies/transpilation-web.cjs.js +47606 -45796
- package/download-packages.js +197 -0
- {angular-codegen → package}/generate-angular-app.js +3 -1
- package/npm-shrinkwrap.json +7959 -0
- package/package-lock.json +7959 -0
- {angular-codegen → package}/package.json +9 -3
- package/src/codegen-args-cli.js +1 -0
- package/src/codegen-cli.js +1 -0
- package/src/codegen.js +1 -0
- package/src/copy-utils.js +1 -0
- package/src/eslintrc_config.js +1 -0
- package/src/gen-app-codegen-module.js +1 -0
- package/src/gen-app-override-css.js +1 -0
- package/src/gen-app-routes.js +1 -0
- package/src/gen-app-skeleton.js +1 -0
- package/src/gen-components.js +1 -0
- package/src/gen-customwidget-config.js +1 -0
- package/src/gen-index-html.js +1 -0
- package/src/gen-layouts.js +1 -0
- package/src/gen-lazy-module-routes.js +1 -0
- package/src/handlebar-helpers.js +1 -0
- package/src/pages-util.js +1 -0
- package/src/project-meta.js +1 -0
- package/src/update-angular-json.js +1 -0
- package/src/wm-utils.js +1 -0
- package/templates/app-routes.ts.hbs +14 -0
- package/templates/app.config.ts.hbs +211 -0
- {angular-codegen → package}/templates/app.module.ts.hbs +5 -3
- package/templates/component.config.ts.hbs +1 -0
- package/templates/customwidget/customwidget-config.ts.hbs +6 -0
- package/templates/customwidget/customwidget.component.script.js.hbs +3 -0
- angular-codegen/templates/page/page.component.ts.hbs → package/templates/customwidget/customwidget.component.ts.hbs +11 -14
- {angular-codegen → package}/templates/layout/layout.component.ts.hbs +27 -4
- package/templates/page/page.component.ts.hbs +74 -0
- {angular-codegen → package}/templates/page/page.module.ts.hbs +12 -1
- {angular-codegen → package}/templates/partial/partial.component.ts.hbs +19 -4
- {angular-codegen → package}/templates/prefab/prefab.component.ts.hbs +22 -5
- angular-codegen/angular-app/package.json +0 -136
- angular-codegen/angular-app/src/app/app-codegen.module.ts +0 -11
- angular-codegen/angular-app/src/app/lazy-load-scripts.resolve.ts +0 -20
- angular-codegen/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
- angular-codegen/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
- angular-codegen/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
- angular-codegen/angular-app/src/assets/styles/css/wm-style.css +0 -1
- angular-codegen/angular-app/src/framework/angular1.polyfills.ts +0 -36
- angular-codegen/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +0 -64
- angular-codegen/angular-app/src/framework/util/page-util.ts +0 -5
- angular-codegen/angular-app/src/main.ts +0 -30
- angular-codegen/angular-app/wm-custom-webpack.config.js +0 -94
- angular-codegen/build-angular-app.js +0 -79
- angular-codegen/dependencies/app.component.html +0 -28
- angular-codegen/dependencies/transpilation-mobile.cjs.js +0 -93296
- angular-codegen/download-packages.js +0 -69
- angular-codegen/package-lock.json +0 -6059
- angular-codegen/src/codegen-args-cli.js +0 -1
- angular-codegen/src/codegen-cli.js +0 -1
- angular-codegen/src/codegen.js +0 -1
- angular-codegen/src/gen-app-codegen-module.js +0 -1
- angular-codegen/src/gen-app-routes.js +0 -1
- angular-codegen/src/gen-app-skeleton.js +0 -1
- angular-codegen/src/gen-components.js +0 -1
- angular-codegen/src/gen-index-html.js +0 -1
- angular-codegen/src/gen-layouts.js +0 -1
- angular-codegen/src/gen-lazy-module-routes.js +0 -1
- angular-codegen/src/handlebar-helpers.js +0 -1
- angular-codegen/src/pages-util.js +0 -1
- angular-codegen/src/project-meta.js +0 -1
- angular-codegen/src/update-angular-json.js +0 -1
- angular-codegen/src/wm-utils.js +0 -1
- angular-codegen/templates/app-routes.ts.hbs +0 -17
- {angular-codegen → package}/.npmrc +0 -0
- {angular-codegen → package}/angular-app/.npmrc +0 -0
- {angular-codegen → package}/angular-app/build-scripts/index-html-transform.js +0 -0
- {angular-codegen → package}/angular-app/build-scripts/optimize-css.gulpfile.js +0 -0
- {angular-codegen → package}/angular-app/build-scripts/update-version.js +0 -0
- {angular-codegen → package}/angular-app/src/.browserslistrc +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.css +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.script.js +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.variables.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/app.routes.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/prefabs/prefab-config.js +0 -0
- {angular-codegen → package}/angular-app/src/app/wm-project-properties.ts +0 -0
- {angular-codegen → package}/angular-app/src/assets/.gitkeep +0 -0
- {angular-codegen → package}/angular-app/src/assets/print.css +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/bootstrap.css.map +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_222222_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_2e83ff_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_444444_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_454545_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_555555_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777620_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777777_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_888888_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cc0000_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_ffffff_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/wm-responsive.css +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/FontAwesome.otf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.svg +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff2 +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.svg +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-icon.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-touch-icon.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/loader.gif +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/spinner-small.gif +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/ui-icons.png +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.dev.ts +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.prod.ts +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-extension.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-js-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-variables-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/prefab-config-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/util/lazy-module-routes.ts +0 -0
- {angular-codegen → package}/angular-app/src/polyfills.ts +0 -0
- {angular-codegen → package}/angular-app/src/styles.css +0 -0
- {angular-codegen → package}/angular-app/src/tslint.json +0 -0
- {angular-codegen → package}/build-util.js +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-128x128.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-144x144.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-152x152.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-192x192.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-384x384.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-512x512.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-72x72.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-96x96.png +0 -0
- {angular-codegen → package}/pwa-assets/manifest.json +0 -0
- {angular-codegen → package}/pwa-assets/ngsw-config.json +0 -0
- {angular-codegen → package}/pwa-assets/wmsw-worker.js +0 -0
- {angular-codegen → package}/src/expr-parser-utils.js +0 -0
- {angular-codegen → package}/src/gen-app-js.js +0 -0
- {angular-codegen → package}/src/gen-app-prefabs-module.js +0 -0
- {angular-codegen → package}/src/gen-app-variables.js +0 -0
- {angular-codegen → package}/src/gen-prefabs.js +0 -0
- {angular-codegen → package}/src/gen-pwa-files.js +0 -0
- {angular-codegen → package}/src/gen-tsconfig.js +0 -0
- {angular-codegen → package}/src/gen-wm-project-properties.js +0 -0
- {angular-codegen → package}/templates/app-codegen.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/app-prefabs.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/app.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/component.expressions.ts.hbs +0 -0
- {angular-codegen → package}/templates/component.variables.ts.hbs +0 -0
- {angular-codegen → package}/templates/expr-vs-fn.hbs +0 -0
- {angular-codegen → package}/templates/layout/layout.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/lazy-module-routes.ts.hbs +0 -0
- {angular-codegen → package}/templates/page/page.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab-config.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/wm-project-properties.ts.hbs +0 -0
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { Component, Injector, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
|
|
3
2
|
import { UserDefinedExecutionContext } from '@wm/core';
|
|
4
|
-
import { SpaPageDirective } from "@wm/components/page";
|
|
5
3
|
import { BaseLayoutComponent } from '@wm/runtime/base';
|
|
6
|
-
|
|
7
4
|
import { expressionData } from './{{name}}.component.expressions';
|
|
5
|
+
import { CommonModule as NgCommonModule } from '@angular/common';
|
|
6
|
+
import { RouterOutletDirective } from '@wm/components/page';
|
|
7
|
+
import { RouterModule } from '@angular/router';
|
|
8
|
+
{{WMComponentsImportStmts requiredWMComponents}}
|
|
9
|
+
|
|
10
|
+
{{PartialModuleImportStmts requiredPartials}}
|
|
11
|
+
|
|
12
|
+
const requiredComponentModules = [
|
|
13
|
+
{{WMComponentModuleStmts requiredWMComponents}},
|
|
14
|
+
RouterOutletDirective
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
const requiredPartialModules = [
|
|
18
|
+
{{PartialModuleStmts requiredPartials}}
|
|
19
|
+
];
|
|
20
|
+
|
|
8
21
|
|
|
9
22
|
@Component({
|
|
10
23
|
selector: 'app-page-{{name}}',
|
|
@@ -15,7 +28,17 @@ import { expressionData } from './{{name}}.component.expressions';
|
|
|
15
28
|
provide: UserDefinedExecutionContext,
|
|
16
29
|
useExisting: {{componentName}}
|
|
17
30
|
}
|
|
18
|
-
]
|
|
31
|
+
],
|
|
32
|
+
standalone: true,
|
|
33
|
+
imports: [
|
|
34
|
+
...requiredComponentModules,
|
|
35
|
+
...requiredPartialModules,
|
|
36
|
+
NgCommonModule,
|
|
37
|
+
RouterModule
|
|
38
|
+
],
|
|
39
|
+
{{#if hasCustomElement}}
|
|
40
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
41
|
+
{{/if}}
|
|
19
42
|
})
|
|
20
43
|
export class {{componentName}} extends BaseLayoutComponent {
|
|
21
44
|
layoutName = '{{name}}';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Component, ViewEncapsulation, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { UserDefinedExecutionContext } from '@wm/core';
|
|
3
|
+
import { initScript } from './{{name}}.component.script';
|
|
4
|
+
import { getVariables } from './{{name}}.component.variables';
|
|
5
|
+
import { expressionData } from './{{name}}.component.expressions';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { {{#if enableSpa}}BaseSpaPageComponent{{else}}BasePageComponent{{/if}} } from '@wm/runtime/base';
|
|
8
|
+
|
|
9
|
+
{{WMComponentsImportStmts requiredWMComponents}}
|
|
10
|
+
{{WMCustomComponentsImportStmts requireCustomComponents}}
|
|
11
|
+
{{PartialModuleImportStmts requiredPartials}}
|
|
12
|
+
|
|
13
|
+
{{#if requireCustomComponents}}
|
|
14
|
+
import { initCustomWidgetConfig } from '../../customwidgets/customwidget-config';
|
|
15
|
+
initCustomWidgetConfig();
|
|
16
|
+
{{/if}}
|
|
17
|
+
|
|
18
|
+
const requiredComponentModules = [
|
|
19
|
+
{{WMComponentModuleStmts requiredWMComponents}}
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const requiredCustomWidgetComponents= [
|
|
23
|
+
{{WMCustomComponentStmts requireCustomComponents}}
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
const requiredPartialModules: any[] = [
|
|
27
|
+
{{PartialModuleStmts requiredPartials}}
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
@Component({
|
|
31
|
+
selector: 'app-page-{{name}}',
|
|
32
|
+
templateUrl: './{{name}}.component.html',
|
|
33
|
+
styleUrls: ['./{{name}}.component.css'],
|
|
34
|
+
encapsulation: ViewEncapsulation.None,
|
|
35
|
+
providers: [
|
|
36
|
+
{
|
|
37
|
+
provide: UserDefinedExecutionContext,
|
|
38
|
+
useExisting: {{componentName}}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
standalone: true,
|
|
42
|
+
imports: [
|
|
43
|
+
...requiredComponentModules,
|
|
44
|
+
...requiredPartialModules,
|
|
45
|
+
...requiredCustomWidgetComponents,
|
|
46
|
+
CommonModule,
|
|
47
|
+
],
|
|
48
|
+
{{#if hasCustomElement}}
|
|
49
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
|
|
50
|
+
{{/if}}
|
|
51
|
+
})
|
|
52
|
+
export class {{componentName}} extends {{#if enableSpa}}BaseSpaPageComponent{{else}}BasePageComponent{{/if}} {
|
|
53
|
+
|
|
54
|
+
override pageName = '{{name}}';
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
super.init();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
getVariables() {
|
|
63
|
+
return getVariables();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
evalUserScript(Page, App, Utils) {
|
|
67
|
+
initScript(Page, App, Utils);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
getExpressions() {
|
|
71
|
+
return expressionData;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
@@ -4,6 +4,12 @@ import { Routes, RouterModule } from '@angular/router';
|
|
|
4
4
|
|
|
5
5
|
import { RuntimeBaseModule, CanDeactivateNgPageGuard } from '@wm/runtime/base';
|
|
6
6
|
{{WMComponentsImportStmts requiredWMComponents}}
|
|
7
|
+
{{WMCustomComponentsImportStmts requireCustomComponents}}
|
|
8
|
+
{{#if
|
|
9
|
+
requireCustomComponents}}
|
|
10
|
+
import { initCustomWidgetConfig } from '../../customwidgets/customwidget-config';
|
|
11
|
+
initCustomWidgetConfig();
|
|
12
|
+
{{/if}}
|
|
7
13
|
|
|
8
14
|
import { AppCodeGenModule } from '../../app-codegen.module';
|
|
9
15
|
|
|
@@ -17,7 +23,7 @@ const routes: Routes = [
|
|
|
17
23
|
{
|
|
18
24
|
path: '',
|
|
19
25
|
component: {{componentName}},
|
|
20
|
-
canDeactivate: [(component) => inject(CanDeactivateNgPageGuard).canDeactivate(component)]
|
|
26
|
+
canDeactivate: [(component, currentRoute, currentState, nextState) => inject(CanDeactivateNgPageGuard).canDeactivate(component, currentRoute, currentState, nextState)]
|
|
21
27
|
}
|
|
22
28
|
];
|
|
23
29
|
|
|
@@ -25,6 +31,10 @@ const requiredComponentModules = [
|
|
|
25
31
|
{{WMComponentModuleStmts requiredWMComponents}}
|
|
26
32
|
];
|
|
27
33
|
|
|
34
|
+
const requiredCustomWidgetComponents= [
|
|
35
|
+
{{WMCustomComponentStmts requireCustomComponents}}
|
|
36
|
+
]
|
|
37
|
+
|
|
28
38
|
const requiredPartialModules: any[] = [
|
|
29
39
|
{{PartialModuleStmts requiredPartials}}
|
|
30
40
|
];
|
|
@@ -34,6 +44,7 @@ const requiredPartialModules: any[] = [
|
|
|
34
44
|
imports: [
|
|
35
45
|
...requiredComponentModules,
|
|
36
46
|
...requiredPartialModules,
|
|
47
|
+
...requiredCustomWidgetComponents,
|
|
37
48
|
RouterModule.forChild(routes),
|
|
38
49
|
NgCommonModule,
|
|
39
50
|
AppCodeGenModule,
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { Component, Injector, Optional, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
|
|
3
2
|
import { UserDefinedExecutionContext } from '@wm/core';
|
|
4
|
-
|
|
5
3
|
import { initScript } from './{{name}}.component.script';
|
|
6
4
|
import { getVariables } from './{{name}}.component.variables';
|
|
7
5
|
import { expressionData } from './{{name}}.component.expressions';
|
|
8
|
-
|
|
9
6
|
import { AppRef, BasePartialComponent } from '@wm/runtime/base';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
{{WMComponentsImportStmts requiredWMComponents}}
|
|
9
|
+
{{PartialModuleImportStmts requiredPartials}}
|
|
10
|
+
|
|
11
|
+
const requiredComponentModules = [
|
|
12
|
+
{{WMComponentModuleStmts requiredWMComponents}}
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const requiredPartialModules: any[] = [
|
|
16
|
+
{{PartialModuleStmts requiredPartials}}
|
|
17
|
+
];
|
|
18
|
+
|
|
10
19
|
|
|
11
20
|
@Component({
|
|
12
21
|
selector: 'app-partial-{{name}}',
|
|
@@ -18,7 +27,13 @@ import { AppRef, BasePartialComponent } from '@wm/runtime/base';
|
|
|
18
27
|
provide: UserDefinedExecutionContext,
|
|
19
28
|
useExisting: {{componentName}}
|
|
20
29
|
}
|
|
21
|
-
]
|
|
30
|
+
],
|
|
31
|
+
standalone: true,
|
|
32
|
+
imports: [
|
|
33
|
+
...requiredComponentModules,
|
|
34
|
+
...requiredPartialModules,
|
|
35
|
+
CommonModule
|
|
36
|
+
],
|
|
22
37
|
})
|
|
23
38
|
export class {{componentName}} extends BasePartialComponent {
|
|
24
39
|
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { Component, Injector, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
|
|
1
|
+
import { Component, Injector, ViewEncapsulation, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { CommonModule as NgCommonModule } from '@angular/common';
|
|
3
3
|
import { UserDefinedExecutionContext } from '@wm/core';
|
|
4
|
-
|
|
5
4
|
import { initScript } from './{{name}}.component.script';
|
|
6
5
|
import { getVariables } from './{{name}}.component.variables';
|
|
7
6
|
import { expressionData } from './{{name}}.component.expressions';
|
|
8
|
-
|
|
9
7
|
import { BasePrefabComponent } from '@wm/runtime/base';
|
|
8
|
+
{{WMComponentsImportStmts requiredWMComponents}}
|
|
9
|
+
{{PrefabPartialModuleImportStmts requiredPartials}}
|
|
10
|
+
|
|
11
|
+
const requiredComponentModules = [
|
|
12
|
+
{{WMComponentModuleStmts requiredWMComponents}}
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const requiredPartialModules = [
|
|
16
|
+
{{PartialModuleStmts requiredPartials}}
|
|
17
|
+
];
|
|
10
18
|
|
|
11
19
|
@Component({
|
|
12
20
|
selector: 'app-prefab-{{prefabName}}',
|
|
@@ -18,7 +26,16 @@ import { BasePrefabComponent } from '@wm/runtime/base';
|
|
|
18
26
|
provide: UserDefinedExecutionContext,
|
|
19
27
|
useExisting: {{componentName}}
|
|
20
28
|
}
|
|
21
|
-
]
|
|
29
|
+
],
|
|
30
|
+
standalone: true,
|
|
31
|
+
imports: [
|
|
32
|
+
...requiredComponentModules,
|
|
33
|
+
...requiredPartialModules,
|
|
34
|
+
NgCommonModule
|
|
35
|
+
],
|
|
36
|
+
{{#if hasCustomElement}}
|
|
37
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
38
|
+
{{/if}}
|
|
22
39
|
})
|
|
23
40
|
export class {{componentName}} extends BasePrefabComponent {
|
|
24
41
|
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wavemaker-ng-runtime-new",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"ng": "ng",
|
|
6
|
-
"start": "./node_modules/.bin/ng serve",
|
|
7
|
-
"build": "node build-scripts/build.js",
|
|
8
|
-
"post-build": "node build-scripts/post-build.js",
|
|
9
|
-
"test": "jest --no-cache",
|
|
10
|
-
"test:watch": "jest --watch",
|
|
11
|
-
"test:coverage": "jest --coverage && node jest-code-coverage-report.js",
|
|
12
|
-
"test-prod": "jest --no-cache --no-color --ci --silent 2>&1 | sed 's/\\x1b\\[[0-9;]*m//g' > karma-test-report.txt",
|
|
13
|
-
"lint": "eslint src/",
|
|
14
|
-
"e2e": "./node_modules/.bin/ng e2e",
|
|
15
|
-
"optimizecss": "gulp --gulpfile build-scripts/optimize-css.gulpfile.js",
|
|
16
|
-
"owasp": "owasp-dependency-check --project \"wavemaker-ng-runtime\" -f \"ALL\""
|
|
17
|
-
},
|
|
18
|
-
"private": true,
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@angular/animations": "17.3.11",
|
|
21
|
-
"@angular/common": "17.3.11",
|
|
22
|
-
"@angular/compiler": "17.3.11",
|
|
23
|
-
"@angular/core": "17.3.11",
|
|
24
|
-
"@angular/forms": "17.3.11",
|
|
25
|
-
"@angular/platform-browser": "17.3.11",
|
|
26
|
-
"@angular/platform-browser-dynamic": "17.3.11",
|
|
27
|
-
"@angular/router": "17.3.11",
|
|
28
|
-
"@angular/service-worker": "17.3.11",
|
|
29
|
-
"@awesome-cordova-plugins/app-version": "5.39.1",
|
|
30
|
-
"@awesome-cordova-plugins/barcode-scanner": "5.39.1",
|
|
31
|
-
"@awesome-cordova-plugins/calendar": "5.39.1",
|
|
32
|
-
"@awesome-cordova-plugins/camera": "5.39.1",
|
|
33
|
-
"@awesome-cordova-plugins/core": "5.39.1",
|
|
34
|
-
"@awesome-cordova-plugins/device": "5.39.1",
|
|
35
|
-
"@awesome-cordova-plugins/diagnostic": "5.39.1",
|
|
36
|
-
"@awesome-cordova-plugins/file": "5.39.1",
|
|
37
|
-
"@awesome-cordova-plugins/file-opener": "5.39.1",
|
|
38
|
-
"@awesome-cordova-plugins/geolocation": "5.39.1",
|
|
39
|
-
"@awesome-cordova-plugins/location-accuracy": "5.39.1",
|
|
40
|
-
"@awesome-cordova-plugins/media-capture": "5.39.1",
|
|
41
|
-
"@awesome-cordova-plugins/network": "5.39.1",
|
|
42
|
-
"@awesome-cordova-plugins/sqlite": "5.39.1",
|
|
43
|
-
"@awesome-cordova-plugins/vibration": "5.39.1",
|
|
44
|
-
"@babel/runtime": "7.14.8",
|
|
45
|
-
"@metrichor/jmespath": "0.3.1",
|
|
46
|
-
"@wavemaker/focus-trap": "1.0.1",
|
|
47
|
-
"@wavemaker/nvd3": "1.8.12",
|
|
48
|
-
"@wavemaker/variables": "12.0.0-next.142016",
|
|
49
|
-
"@ztree/ztree_v3": "3.5.48",
|
|
50
|
-
"angular-imask": "^7.6.1",
|
|
51
|
-
"angular2-websocket": "0.9.7",
|
|
52
|
-
"core-js": "3.35.1",
|
|
53
|
-
"d3": "7.8.5",
|
|
54
|
-
"fullcalendar": "5.3.1",
|
|
55
|
-
"hammerjs": "2.0.8",
|
|
56
|
-
"iscroll": "5.2.0",
|
|
57
|
-
"jquery": "3.7.1",
|
|
58
|
-
"jquery-ui": "1.13.3",
|
|
59
|
-
"js-cookie": "2.2.0",
|
|
60
|
-
"jssha": "3.1.2",
|
|
61
|
-
"lodash-es": "4.17.21",
|
|
62
|
-
"ng-circle-progress": "1.7.1",
|
|
63
|
-
"ngx-bootstrap": "9.0.0",
|
|
64
|
-
"ngx-color-picker": "16.0.0",
|
|
65
|
-
"ngx-toastr": "17.0.2",
|
|
66
|
-
"rxjs": "6.6.0",
|
|
67
|
-
"rxjs-compat": "6.4.0",
|
|
68
|
-
"summernote": "0.8.20",
|
|
69
|
-
"ts-jest": "29.1.1",
|
|
70
|
-
"tslib": "2.4.1",
|
|
71
|
-
"x2js": "3.4.4",
|
|
72
|
-
"zone.js": "0.14.7",
|
|
73
|
-
"@wavemaker/app-ng-runtime": "12.0.0-next.142016"
|
|
74
|
-
},
|
|
75
|
-
"devDependencies": {
|
|
76
|
-
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
|
77
|
-
"@angular-builders/custom-webpack": "17.0.2",
|
|
78
|
-
"@angular-devkit/build-angular": "17.3.8",
|
|
79
|
-
"@angular-eslint/builder": "16.2.0",
|
|
80
|
-
"@angular-eslint/eslint-plugin": "16.2.0",
|
|
81
|
-
"@angular-eslint/eslint-plugin-template": "16.2.0",
|
|
82
|
-
"@angular-eslint/schematics": "16.2.0",
|
|
83
|
-
"@angular-eslint/template-parser": "16.2.0",
|
|
84
|
-
"@angular/cli": "17.3.8",
|
|
85
|
-
"@angular/compiler-cli": "17.3.11",
|
|
86
|
-
"@angular/language-service": "17.3.11",
|
|
87
|
-
"@babel/plugin-transform-runtime": "^7.14.5",
|
|
88
|
-
"@compodoc/compodoc": "^1.1.25",
|
|
89
|
-
"@rollup/plugin-alias": "4.0.2",
|
|
90
|
-
"@rollup/plugin-commonjs": "24.0.0",
|
|
91
|
-
"@rollup/plugin-multi-entry": "6.0.0",
|
|
92
|
-
"@rollup/plugin-node-resolve": "15.0.1",
|
|
93
|
-
"@types/jest": "^29.5.12",
|
|
94
|
-
"@types/jquery": "3.3.22",
|
|
95
|
-
"@types/lodash-es": "4.17.12",
|
|
96
|
-
"@types/node": "12.11.1",
|
|
97
|
-
"@types/sizzle": "^2.3.3",
|
|
98
|
-
"@typescript-eslint/eslint-plugin": "6.15.0",
|
|
99
|
-
"@typescript-eslint/parser": "6.15.0",
|
|
100
|
-
"babel-loader": "^9.1.2",
|
|
101
|
-
"cheerio": "1.0.0-rc.12",
|
|
102
|
-
"codelyzer": "5.1.2",
|
|
103
|
-
"compression-webpack-plugin": "10.0.0",
|
|
104
|
-
"eslint": "^8.45.0",
|
|
105
|
-
"fs": "0.0.1-security",
|
|
106
|
-
"fs-extra": "7.0.1",
|
|
107
|
-
"jest": "^29.7.0",
|
|
108
|
-
"jest-canvas-mock": "^2.5.2",
|
|
109
|
-
"jest-preset-angular": "^14.1.0",
|
|
110
|
-
"moment": "2.29.4",
|
|
111
|
-
"moment-timezone": "^0.5.34",
|
|
112
|
-
"ng-packagr": "17.3.0",
|
|
113
|
-
"npm-run-all": "4.1.5",
|
|
114
|
-
"owasp-dependency-check": "0.0.23",
|
|
115
|
-
"rimraf": "2.6.3",
|
|
116
|
-
"rollup": "4.9.5",
|
|
117
|
-
"rollup-plugin-includepaths": "0.2.3",
|
|
118
|
-
"sonarqube-scanner": "4.0.1",
|
|
119
|
-
"terser": "^5.15.1",
|
|
120
|
-
"ts-node": "7.0.1",
|
|
121
|
-
"tslint": "~6.1.0",
|
|
122
|
-
"typescript": "5.4.5",
|
|
123
|
-
"util": "0.11.1",
|
|
124
|
-
"yargs": "^17.3.1"
|
|
125
|
-
},
|
|
126
|
-
"optionalDependencies": {
|
|
127
|
-
"@rollup/rollup-darwin-arm64": "4.9.5",
|
|
128
|
-
"@rollup/rollup-linux-x64-gnu": "4.9.5",
|
|
129
|
-
"@rollup/rollup-win32-x64": "4.9.5"
|
|
130
|
-
},
|
|
131
|
-
"engines": {
|
|
132
|
-
"node": ">=18.16.1",
|
|
133
|
-
"npm": ">=9.5.1"
|
|
134
|
-
},
|
|
135
|
-
"engineStrict": true
|
|
136
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { isMobileApp, ScriptLoaderService } from '@wm/core';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@Injectable()
|
|
6
|
-
export class LazyLoadScriptsResolve {
|
|
7
|
-
|
|
8
|
-
constructor(private scriptLoaderService: ScriptLoaderService) {}
|
|
9
|
-
|
|
10
|
-
async resolve() {
|
|
11
|
-
const scriptsToLoad = [];
|
|
12
|
-
if(isMobileApp()) {
|
|
13
|
-
scriptsToLoad.push('node_modules-hammerjs-hammer.min.js');
|
|
14
|
-
scriptsToLoad.push('node_modules-iscroll-build-iscroll.js');
|
|
15
|
-
}
|
|
16
|
-
if (scriptsToLoad.length > 0) {
|
|
17
|
-
await this.scriptLoaderService.load(...scriptsToLoad);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|