@wavemaker/angular-codegen 12.0.0-next.141134 → 12.0.0-next.141138

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.
@@ -1 +0,0 @@
1
- const{createDir:createDir,writeFile:writeFile}=require("./wm-utils"),{getHandlebarTemplate:getHandlebarTemplate}=require("./handlebar-helpers"),generateCustomWidgetConfigFile=async(e={},t)=>{await createDir(`${t}/src/app/customwidgets`,{recursive:!0});const i=getHandlebarTemplate("customwidget-config")({customWidgetConfigMap:e});await writeFile(`${t}/src/app/customwidgets/customwidget-config.ts`,i)};module.exports={generateCustomWidgetConfigFile:generateCustomWidgetConfigFile};
@@ -1 +0,0 @@
1
- export const config = {{config}};
@@ -1,6 +0,0 @@
1
- import { registerCustomWidgetConfig } from '../../framework/util/page-util';
2
-
3
- export const initCustomWidgetConfig = () => {
4
- {{registerCustomWidgetConfig customWidgetConfigMap}}
5
- return true;
6
- };
@@ -1,3 +0,0 @@
1
- export const initScript = (Widget, App, Utils) => {
2
- {{ jsContent }}
3
- }
@@ -1,43 +0,0 @@
1
- import { Component, Injector, Optional, ViewEncapsulation } from '@angular/core';
2
-
3
- import { UserDefinedExecutionContext } from '@wm/core';
4
-
5
- import { initScript } from './{{name}}.component.script';
6
- import { getVariables } from './{{name}}.component.variables';
7
- import { AppRef, BaseCustomWidgetComponent } from '@wm/runtime/base';
8
- import { RuntimeBaseModule } from '@wm/runtime/base';
9
- {{WMComponentsImportStmts requiredWMComponents}}
10
-
11
- @Component({
12
- standalone: true,
13
- selector: 'app-custom-{{name}}',
14
- templateUrl: './{{name}}.component.html',
15
- styleUrls: ['./{{name}}.component.css'],
16
- encapsulation: ViewEncapsulation.None,
17
- imports: [ RuntimeBaseModule, {{WMComponentModuleStmts requiredWMComponents}}],
18
- providers: [
19
- {
20
- provide: UserDefinedExecutionContext,
21
- useExisting: {{componentName}}
22
- }
23
- ]
24
- })
25
- export class {{componentName}} extends BaseCustomWidgetComponent {
26
-
27
- override customWidgetName = '{{name}}';
28
- [key: string]: any;
29
- {{#if enableSpa}}spa = true;{{/if}}
30
-
31
- constructor() {
32
- super();
33
- super.init();
34
- }
35
-
36
- getVariables() {
37
- return getVariables();
38
- }
39
-
40
- evalUserScript(Widget, App, Utils) {
41
- initScript(Widget, App, Utils);
42
- }
43
- }