@wavemaker-ai/angular-codegen 1.0.0-rc.647469

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.
Files changed (177) hide show
  1. package/.npmrc +1 -0
  2. package/angular-app/.npmrc +1 -0
  3. package/angular-app/angular.json +274 -0
  4. package/angular-app/build-scripts/build.js +36 -0
  5. package/angular-app/build-scripts/index-html-transform-ng-serve.ts +20 -0
  6. package/angular-app/build-scripts/index-html-transform.js +28 -0
  7. package/angular-app/build-scripts/optimize-css.gulpfile.js +101 -0
  8. package/angular-app/build-scripts/post-build.js +217 -0
  9. package/angular-app/build-scripts/update-version.js +25 -0
  10. package/angular-app/dependency-report.html +124 -0
  11. package/angular-app/generate-dependency-report.js +240 -0
  12. package/angular-app/npm-shrinkwrap.json +24224 -0
  13. package/angular-app/package-lock.json +24224 -0
  14. package/angular-app/package.json +129 -0
  15. package/angular-app/proxy.conf.js +14 -0
  16. package/angular-app/src/.browserslistrc +12 -0
  17. package/angular-app/src/app/app.component.css +0 -0
  18. package/angular-app/src/app/app.component.script.js +3 -0
  19. package/angular-app/src/app/app.component.variables.ts +3 -0
  20. package/angular-app/src/app/app.routes.ts +5 -0
  21. package/angular-app/src/app/lazy-load-scripts.resolve.ts +13 -0
  22. package/angular-app/src/app/prefabs/prefab-config.js +2 -0
  23. package/angular-app/src/app/wm-project-properties.ts +3 -0
  24. package/angular-app/src/assets/.gitkeep +0 -0
  25. package/angular-app/src/assets/print.css +32 -0
  26. package/angular-app/src/assets/styles/css/bootstrap.css.map +1 -0
  27. package/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
  28. package/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
  29. package/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
  30. package/angular-app/src/assets/styles/css/font/summernote.woff2 +0 -0
  31. package/angular-app/src/assets/styles/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  32. package/angular-app/src/assets/styles/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  33. package/angular-app/src/assets/styles/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  34. package/angular-app/src/assets/styles/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  35. package/angular-app/src/assets/styles/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  36. package/angular-app/src/assets/styles/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  37. package/angular-app/src/assets/styles/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  38. package/angular-app/src/assets/styles/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  39. package/angular-app/src/assets/styles/css/images/ui-icons_222222_256x240.png +0 -0
  40. package/angular-app/src/assets/styles/css/images/ui-icons_2e83ff_256x240.png +0 -0
  41. package/angular-app/src/assets/styles/css/images/ui-icons_444444_256x240.png +0 -0
  42. package/angular-app/src/assets/styles/css/images/ui-icons_454545_256x240.png +0 -0
  43. package/angular-app/src/assets/styles/css/images/ui-icons_555555_256x240.png +0 -0
  44. package/angular-app/src/assets/styles/css/images/ui-icons_777620_256x240.png +0 -0
  45. package/angular-app/src/assets/styles/css/images/ui-icons_777777_256x240.png +0 -0
  46. package/angular-app/src/assets/styles/css/images/ui-icons_888888_256x240.png +0 -0
  47. package/angular-app/src/assets/styles/css/images/ui-icons_cc0000_256x240.png +0 -0
  48. package/angular-app/src/assets/styles/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  49. package/angular-app/src/assets/styles/css/images/ui-icons_ffffff_256x240.png +0 -0
  50. package/angular-app/src/assets/styles/css/wm-responsive.css +1 -0
  51. package/angular-app/src/assets/styles/css/wm-style.css +1 -0
  52. package/angular-app/src/assets/styles/fonts/FontAwesome.otf +0 -0
  53. package/angular-app/src/assets/styles/fonts/fontawesome-webfont.eot +0 -0
  54. package/angular-app/src/assets/styles/fonts/fontawesome-webfont.svg +2671 -0
  55. package/angular-app/src/assets/styles/fonts/fontawesome-webfont.ttf +0 -0
  56. package/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff +0 -0
  57. package/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff2 +0 -0
  58. package/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.eot +0 -0
  59. package/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.svg +288 -0
  60. package/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
  61. package/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff +0 -0
  62. package/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
  63. package/angular-app/src/assets/styles/fonts/wavicon.eot +0 -0
  64. package/angular-app/src/assets/styles/fonts/wavicon.ttf +0 -0
  65. package/angular-app/src/assets/styles/fonts/wavicon.woff +0 -0
  66. package/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.eot +0 -0
  67. package/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.ttf +0 -0
  68. package/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.woff +0 -0
  69. package/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.eot +0 -0
  70. package/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
  71. package/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.woff +0 -0
  72. package/angular-app/src/assets/styles/images/live-sync-icon.png +0 -0
  73. package/angular-app/src/assets/styles/images/live-sync-touch-icon.png +0 -0
  74. package/angular-app/src/assets/styles/images/loader.gif +0 -0
  75. package/angular-app/src/assets/styles/images/spinner-small.gif +0 -0
  76. package/angular-app/src/assets/styles/images/ui-icons.png +0 -0
  77. package/angular-app/src/environments/environment.dev.ts +3 -0
  78. package/angular-app/src/environments/environment.prod.ts +3 -0
  79. package/angular-app/src/environments/environment.ts +16 -0
  80. package/angular-app/src/framework/services/app-extension.service.ts +20 -0
  81. package/angular-app/src/framework/services/app-js-provider.service.ts +15 -0
  82. package/angular-app/src/framework/services/app-variables-provider.service.ts +15 -0
  83. package/angular-app/src/framework/services/component-ref-provider.service.ts +44 -0
  84. package/angular-app/src/framework/services/customwidget-config-provider.service.ts +13 -0
  85. package/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +56 -0
  86. package/angular-app/src/framework/services/prefab-config-provider.service.ts +13 -0
  87. package/angular-app/src/framework/util/lazy-module-routes.ts +4 -0
  88. package/angular-app/src/framework/util/page-util.ts +7 -0
  89. package/angular-app/src/index.html +17 -0
  90. package/angular-app/src/main.ts +70 -0
  91. package/angular-app/src/polyfills.ts +53 -0
  92. package/angular-app/src/setup-jest.js +121 -0
  93. package/angular-app/src/styles.css +1 -0
  94. package/angular-app/src/tsconfig.app.json +17 -0
  95. package/angular-app/src/tslint.json +17 -0
  96. package/angular-app/src/wm-namespace.js +13 -0
  97. package/angular-app/tsconfig.json +94 -0
  98. package/angular-app/tsconfig.web-app.json +81 -0
  99. package/angular-app/wm-custom-webpack.config.js +51 -0
  100. package/build-angular-app.js +522 -0
  101. package/build-util.js +89 -0
  102. package/dependencies/app.component.html +40 -0
  103. package/dependencies/custom-widgets-bundle.cjs.js +421 -0
  104. package/dependencies/expression-parser.cjs.js +30154 -0
  105. package/dependencies/pipe-provider.cjs.js +208853 -0
  106. package/dependencies/transpilation-web.cjs.js +106547 -0
  107. package/download-packages.js +197 -0
  108. package/generate-angular-app.js +41 -0
  109. package/npm-shrinkwrap.json +8093 -0
  110. package/package-lock.json +8093 -0
  111. package/package.json +44 -0
  112. package/pwa-assets/icons/icon-128x128.png +0 -0
  113. package/pwa-assets/icons/icon-144x144.png +0 -0
  114. package/pwa-assets/icons/icon-152x152.png +0 -0
  115. package/pwa-assets/icons/icon-192x192.png +0 -0
  116. package/pwa-assets/icons/icon-384x384.png +0 -0
  117. package/pwa-assets/icons/icon-512x512.png +0 -0
  118. package/pwa-assets/icons/icon-72x72.png +0 -0
  119. package/pwa-assets/icons/icon-96x96.png +0 -0
  120. package/pwa-assets/manifest.json +59 -0
  121. package/pwa-assets/ngsw-config.json +30 -0
  122. package/pwa-assets/wmsw-worker.js +24 -0
  123. package/src/codegen-args-cli.js +1 -0
  124. package/src/codegen-cli.js +1 -0
  125. package/src/codegen.js +1 -0
  126. package/src/copy-utils.js +1 -0
  127. package/src/eslintrc_config.js +1 -0
  128. package/src/expr-parser-utils.js +1 -0
  129. package/src/gen-app-codegen-module.js +1 -0
  130. package/src/gen-app-js.js +1 -0
  131. package/src/gen-app-override-css.js +1 -0
  132. package/src/gen-app-prefabs-module.js +1 -0
  133. package/src/gen-app-routes.js +1 -0
  134. package/src/gen-app-skeleton.js +1 -0
  135. package/src/gen-app-variables.js +1 -0
  136. package/src/gen-components.js +1 -0
  137. package/src/gen-customwidget-config.js +1 -0
  138. package/src/gen-index-html.js +1 -0
  139. package/src/gen-layouts.js +1 -0
  140. package/src/gen-lazy-module-routes.js +1 -0
  141. package/src/gen-prefabs.js +1 -0
  142. package/src/gen-pwa-files.js +1 -0
  143. package/src/gen-tsconfig.js +1 -0
  144. package/src/gen-wm-project-properties.js +1 -0
  145. package/src/handlebar-helpers.js +1 -0
  146. package/src/pages-util.js +1 -0
  147. package/src/project-meta.js +1 -0
  148. package/src/update-angular-json.js +1 -0
  149. package/src/wm-namespace.js +1 -0
  150. package/src/wm-utils.js +1 -0
  151. package/templates/app-codegen.module.ts.hbs +21 -0
  152. package/templates/app-prefabs.module.ts.hbs +31 -0
  153. package/templates/app-routes.ts.hbs +14 -0
  154. package/templates/app.component.script.js.hbs +8 -0
  155. package/templates/app.config.ts.hbs +211 -0
  156. package/templates/app.module.ts.hbs +294 -0
  157. package/templates/component.config.ts.hbs +1 -0
  158. package/templates/component.expressions.ts.hbs +3 -0
  159. package/templates/component.variables.ts.hbs +3 -0
  160. package/templates/customwidget/customwidget-config.ts.hbs +6 -0
  161. package/templates/customwidget/customwidget.component.script.js.hbs +3 -0
  162. package/templates/customwidget/customwidget.component.ts.hbs +42 -0
  163. package/templates/expr-vs-fn.hbs +3 -0
  164. package/templates/layout/layout.component.ts.hbs +55 -0
  165. package/templates/layout/layout.module.ts.hbs +42 -0
  166. package/templates/lazy-module-routes.ts.hbs +3 -0
  167. package/templates/page/page.component.script.js.hbs +3 -0
  168. package/templates/page/page.component.ts.hbs +74 -0
  169. package/templates/page/page.module.ts.hbs +61 -0
  170. package/templates/partial/partial.component.script.js.hbs +3 -0
  171. package/templates/partial/partial.component.ts.hbs +61 -0
  172. package/templates/partial/partial.module.ts.hbs +43 -0
  173. package/templates/prefab/prefab-config.ts.hbs +6 -0
  174. package/templates/prefab/prefab.component.script.js.hbs +3 -0
  175. package/templates/prefab/prefab.component.ts.hbs +63 -0
  176. package/templates/prefab/prefab.module.ts.hbs +38 -0
  177. package/templates/wm-project-properties.ts.hbs +7 -0
@@ -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
+ }
@@ -0,0 +1,61 @@
1
+ import { inject, NgModule } from '@angular/core';
2
+ import { CommonModule as NgCommonModule, APP_BASE_HREF } from '@angular/common';
3
+ import { Routes, RouterModule } from '@angular/router';
4
+
5
+ import { RuntimeBaseModule, CanDeactivateNgPageGuard } from '@wm/runtime/base';
6
+ {{WMComponentsImportStmts requiredWMComponents}}
7
+ {{WMCustomComponentsImportStmts requireCustomComponents}}
8
+ {{#if
9
+ requireCustomComponents}}
10
+ import { initCustomWidgetConfig } from '../../customwidgets/customwidget-config';
11
+ initCustomWidgetConfig();
12
+ {{/if}}
13
+
14
+ import { AppCodeGenModule } from '../../app-codegen.module';
15
+
16
+ {{PartialModuleImportStmts requiredPartials}}
17
+
18
+ import { {{componentName}} } from './{{name}}.component';
19
+
20
+ const components = [{{componentName}}];
21
+
22
+ const routes: Routes = [
23
+ {
24
+ path: '',
25
+ component: {{componentName}},
26
+ canDeactivate: [(component, currentRoute, currentState, nextState) => inject(CanDeactivateNgPageGuard).canDeactivate(component, currentRoute, currentState, nextState)]
27
+ }
28
+ ];
29
+
30
+ const requiredComponentModules = [
31
+ {{WMComponentModuleStmts requiredWMComponents}}
32
+ ];
33
+
34
+ const requiredCustomWidgetComponents= [
35
+ {{WMCustomComponentStmts requireCustomComponents}}
36
+ ]
37
+
38
+ const requiredPartialModules: any[] = [
39
+ {{PartialModuleStmts requiredPartials}}
40
+ ];
41
+
42
+ @NgModule({
43
+ declarations: components,
44
+ imports: [
45
+ ...requiredComponentModules,
46
+ ...requiredPartialModules,
47
+ ...requiredCustomWidgetComponents,
48
+ RouterModule.forChild(routes),
49
+ NgCommonModule,
50
+ AppCodeGenModule,
51
+ RuntimeBaseModule
52
+ ],
53
+ {{#if hasCustomElement}}
54
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
55
+ {{/if}}
56
+ exports: components
57
+ })
58
+ export class {{moduleName}} {
59
+
60
+ }
61
+
@@ -0,0 +1,3 @@
1
+ export const initScript = (Partial, App, Utils) => {
2
+ {{ jsContent }}
3
+ }
@@ -0,0 +1,61 @@
1
+ import { Component, Injector, Optional, ViewEncapsulation } 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 { 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
+
19
+
20
+ @Component({
21
+ selector: 'app-partial-{{name}}',
22
+ templateUrl: './{{name}}.component.html',
23
+ styleUrls: ['./{{name}}.component.css'],
24
+ encapsulation: ViewEncapsulation.None,
25
+ providers: [
26
+ {
27
+ provide: UserDefinedExecutionContext,
28
+ useExisting: {{componentName}}
29
+ }
30
+ ],
31
+ standalone: true,
32
+ imports: [
33
+ ...requiredComponentModules,
34
+ ...requiredPartialModules,
35
+ CommonModule
36
+ ],
37
+ })
38
+ export class {{componentName}} extends BasePartialComponent {
39
+
40
+ override partialName = '{{name}}';
41
+ [key: string]: any;
42
+ {{#if enableSpa}}spa = true;{{/if}}
43
+
44
+ constructor() {
45
+ super();
46
+ super.init();
47
+ }
48
+
49
+ getVariables() {
50
+ return getVariables();
51
+ }
52
+
53
+ evalUserScript(Partial: BasePartialComponent, App: AppRef, Utils: any) {
54
+ initScript(Partial, App, Utils);
55
+ }
56
+
57
+ getExpressions() {
58
+ return expressionData;
59
+ }
60
+
61
+ }
@@ -0,0 +1,43 @@
1
+ import { ComponentFactoryResolver, NgModule } from '@angular/core';
2
+ import { CommonModule as NGCommonModule, APP_BASE_HREF } from '@angular/common';
3
+
4
+ {{WMComponentsImportStmts requiredWMComponents}}
5
+ import { ComponentType, RuntimeBaseModule } from '@wm/runtime/base';
6
+
7
+ {{#if insidePrefab}}
8
+ import { ComponentRefProviderService } from '../../../../../framework/services/component-ref-provider.service';
9
+ {{else}}
10
+ import { ComponentRefProviderService } from '../../../framework/services/component-ref-provider.service';
11
+ {{/if}}
12
+
13
+ {{PartialModuleImportStmts requiredPartials}}
14
+
15
+ import { {{componentName}} } from './{{name}}.component';
16
+
17
+ const components = [{{componentName}}];
18
+
19
+ const requiredComponentModules = [
20
+ {{WMComponentModuleStmts requiredWMComponents}}
21
+ ];
22
+
23
+ const requiredPartialModules: any[] = [
24
+ {{PartialModuleStmts requiredPartials}}
25
+ ];
26
+
27
+ @NgModule({
28
+ declarations: components,
29
+ imports: [
30
+ ...requiredComponentModules,
31
+ ...requiredPartialModules,
32
+ NGCommonModule,
33
+ RuntimeBaseModule
34
+ ],
35
+ exports: components,
36
+ })
37
+ export class {{moduleName}} {
38
+ static rootComponent = {{componentName}};
39
+ constructor(componentFactoryResolver: ComponentFactoryResolver) {
40
+ const cf = componentFactoryResolver.resolveComponentFactory({{componentName}});
41
+ ComponentRefProviderService.registerComponentRef('{{name}}', ComponentType.PARTIAL, {{componentName}}, cf);
42
+ }
43
+ }
@@ -0,0 +1,6 @@
1
+ import { registerPrefabConfig } from '../../framework/util/page-util';
2
+
3
+ export const initPrefabConfig = () => {
4
+ {{RegisterPrefabConfig prefabConfigMap}}
5
+ return true;
6
+ };
@@ -0,0 +1,3 @@
1
+ export const initScript = (Prefab, App, Utils) => {
2
+ {{ jsContent }}
3
+ }
@@ -0,0 +1,63 @@
1
+ import { Component, Injector, ViewEncapsulation, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { CommonModule as NgCommonModule } from '@angular/common';
3
+ import { UserDefinedExecutionContext } from '@wm/core';
4
+ import { initScript } from './{{name}}.component.script';
5
+ import { getVariables } from './{{name}}.component.variables';
6
+ import { expressionData } from './{{name}}.component.expressions';
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
+ ];
18
+
19
+ @Component({
20
+ selector: 'app-prefab-{{prefabName}}',
21
+ templateUrl: './{{name}}.component.html',
22
+ styleUrls: ['./{{name}}.component.css'],
23
+ encapsulation: ViewEncapsulation.None,
24
+ providers: [
25
+ {
26
+ provide: UserDefinedExecutionContext,
27
+ useExisting: {{componentName}}
28
+ }
29
+ ],
30
+ standalone: true,
31
+ imports: [
32
+ ...requiredComponentModules,
33
+ ...requiredPartialModules,
34
+ NgCommonModule
35
+ ],
36
+ {{#if hasCustomElement}}
37
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
38
+ {{/if}}
39
+ })
40
+ export class {{componentName}} extends BasePrefabComponent {
41
+
42
+ prefabName = '{{prefabName}}';
43
+ [key: string]: any;
44
+ {{#if enableSpa}}spa = true;{{/if}}
45
+
46
+ constructor(public injector: Injector) {
47
+ super();
48
+ super.init();
49
+ }
50
+
51
+ getVariables() {
52
+ return getVariables();
53
+ }
54
+
55
+ evalUserScript(Prefab, App, Utils) {
56
+ initScript(Prefab, App, Utils);
57
+ }
58
+
59
+ getExpressions() {
60
+ return expressionData;
61
+ }
62
+
63
+ }
@@ -0,0 +1,38 @@
1
+ import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { CommonModule as NgCommonModule, APP_BASE_HREF } from '@angular/common';
3
+ import { Routes, RouterModule } from '@angular/router';
4
+
5
+ import { RuntimeBaseModule } from '@wm/runtime/base';
6
+ {{WMComponentsImportStmts requiredWMComponents}}
7
+
8
+ import { {{componentName}} } from './{{name}}.component';
9
+ import { AppCodeGenModule } from '../../app-codegen.module';
10
+
11
+ {{PrefabPartialModuleImportStmts requiredPartials}}
12
+
13
+ const requiredComponentModules = [
14
+ {{WMComponentModuleStmts requiredWMComponents}}
15
+ ];
16
+
17
+ const requiredPartialModules = [
18
+ {{PartialModuleStmts requiredPartials}}
19
+ ];
20
+
21
+ @NgModule({
22
+ declarations: [{{componentName}}],
23
+ imports: [
24
+ ...requiredComponentModules,
25
+ ...requiredPartialModules,
26
+ NgCommonModule,
27
+ AppCodeGenModule,
28
+ RuntimeBaseModule
29
+ ],
30
+ exports: [{{componentName}}],
31
+ {{#if hasCustomElement}}
32
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
33
+ {{/if}}
34
+ })
35
+ export class {{moduleName}} {
36
+ static rootComponent = {{componentName}};
37
+ }
38
+
@@ -0,0 +1,7 @@
1
+ import { setWmProjectProperties } from '@wm/core';
2
+
3
+ const properties = {{properties}}
4
+
5
+ setWmProjectProperties(properties);
6
+
7
+ export default () => {};