@wavemaker/app-ng-runtime 12.0.0-next.45099 → 12.0.0-next.45102
Sign up to get free protection for your applications and to get access to all the features.
- app-ng-runtime/components/advanced/custom/bundles/index.umd.js +3 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +5 -2
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +4 -1
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
@@ -86,6 +86,9 @@
|
|
86
86
|
setProps(config, resolveFn) {
|
87
87
|
this.config = config;
|
88
88
|
this.configSubject.next();
|
89
|
+
if (config.customClasses) {
|
90
|
+
i1.addClass(this.nativeElement, config.customClasses);
|
91
|
+
}
|
89
92
|
this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');
|
90
93
|
if (this.asAttr)
|
91
94
|
this.setBaseWidgetName(config.widgetType);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Attribute, Directive, ElementRef, Inject, Injector, Optional } from '@angular/core';
|
2
|
-
import { noop } from '@wm/core';
|
2
|
+
import { addClass, noop } from '@wm/core';
|
3
3
|
import { PROP_TYPE, provideAs, provideAsWidgetRef, register, styler } from '@wm/components/base';
|
4
4
|
import { customWidgetProps } from './custom-widget.props';
|
5
5
|
import { registerProps } from "../custom-widget-container/custom-widget.props";
|
@@ -59,6 +59,9 @@ export class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
|
|
59
59
|
setProps(config, resolveFn) {
|
60
60
|
this.config = config;
|
61
61
|
this.configSubject.next();
|
62
|
+
if (config.customClasses) {
|
63
|
+
addClass(this.nativeElement, config.customClasses);
|
64
|
+
}
|
62
65
|
this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');
|
63
66
|
if (this.asAttr)
|
64
67
|
this.setBaseWidgetName(config.widgetType);
|
@@ -139,4 +142,4 @@ export class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
|
|
139
142
|
}, {
|
140
143
|
type: Optional
|
141
144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dGl2ZUVsZW1lbnQuY2hpbGRyZW5bMF0uY2hpbGRyZW5bMF0uaGFzQXR0cmlidXRlKCdhcycpO1xuICAgICAgICBpZih0aGlzLmFzQXR0cilcbiAgICAgICAgICAgIHRoaXMuc2V0QmFzZVdpZGdldE5hbWUoY29uZmlnLndpZGdldFR5cGUpO1xuICAgICAgICBpZiAoIWNvbmZpZyB8fCAhY29uZmlnLnByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIXJlZ2lzdGVyZWRQcm9wc1NldC5oYXModGhpcy53aWRnZXRUeXBlKSkge1xuICAgICAgICAgICAgcmVnaXN0ZXIodGhpcy53aWRnZXRUeXBlLCB0aGlzLnByZXBhcmVQcm9wcyhjb25maWcucHJvcGVydGllcykpO1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHRoaXMucHJvcHMgPSBPYmplY3QuYXNzaWduKHRoaXMucHJvcHMsIGNsb25lRGVlcChjdXN0b21XaWRnZXRQcm9wc01hcFt0aGlzLndpZGdldFR5cGVdKSlcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucHJvcHNSZWFkeShyZXNvbHZlRm4pO1xuICAgIH1cblxuICAgIHByaXZhdGUgcHJlcGFyZVByb3BzKHByb3BzID0ge30pIHtcbiAgICAgICAgY29uc3QgcHJvcHNNYXAgPSBuZXcgTWFwKGN1c3RvbVdpZGdldFByb3BzKTtcbiAgICAgICAgT2JqZWN0LmVudHJpZXMocHJvcHMpLmZvckVhY2goKFtrLCB2XTogW3N0cmluZywgYW55XSkgPT4ge1xuICAgICAgICAgICAgbGV0IHR5cGUgPSBQUk9QX1RZUEUuU1RSSU5HO1xuXG4gICAgICAgICAgICBpZiAodi50eXBlID09PSAnYm9vbGVhbicpIHtcbiAgICAgICAgICAgICAgICB0eXBlID0gUFJPUF9UWVBFLkJPT0xFQU47XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudHlwZSA9PT0gJ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gICAgdGhpc1t0aGlzLmJhc2VXaWRnZXROYW1lXVttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXS5jaGlsZHJlblswXVsnd2lkZ2V0J10udmlld1BhcmVudFt0aGlzLmJhc2VXaWRnZXROYW1lXVttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXNbdGhpcy5iYXNlV2lkZ2V0TmFtZV0uaW5pdERhdGFzZXRJdGVtcygpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpc1ttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXS5jaGlsZHJlblswXVsnd2lkZ2V0J10udmlld1BhcmVudFttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBpZih0aGlzLmZvcm1Db250cm9sICYmIG1vZGlmaWVkS2V5ID09PSAnZGF0YXZhbHVlJylcbiAgICAgICAgICAgIHRoaXMudXBkYXRlRGF0YVZhbHVlKHZhbHVlKTtcbiAgICB9XG59XG4iXX0=
|
145
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy93aWRnZXRzL2FkdmFuY2VkL2N1c3RvbS9zcmMvY3VzdG9tLXdpZGdldC1jb250YWluZXIvY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVB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ldID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLm5hdGl2ZUVsZW1lbnQuY2hpbGRyZW5bMF0uY2hpbGRyZW5bMF1bJ3dpZGdldCddLnZpZXdQYXJlbnRbdGhpcy5iYXNlV2lkZ2V0TmFtZV1bbW9kaWZpZWRLZXldID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzW3RoaXMuYmFzZVdpZGdldE5hbWVdLmluaXREYXRhc2V0SXRlbXMoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXNbbW9kaWZpZWRLZXldID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLm5hdGl2ZUVsZW1lbnQuY2hpbGRyZW5bMF0uY2hpbGRyZW5bMF1bJ3dpZGdldCddLnZpZXdQYXJlbnRbbW9kaWZpZWRLZXldID0gdmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYodGhpcy5mb3JtQ29udHJvbCAmJiBtb2RpZmllZEtleSA9PT0gJ2RhdGF2YWx1ZScpXG4gICAgICAgICAgICB0aGlzLnVwZGF0ZURhdGFWYWx1ZSh2YWx1ZSk7XG4gICAgfVxufVxuIl19
|
@@ -3,7 +3,7 @@ import { Directive, Attribute, Inject, Optional, NgModule } from '@angular/core'
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
4
4
|
import { PROP_STRING, PROP_BOOLEAN, register, styler, PROP_TYPE, provideAs, provideAsWidgetRef, StylableComponent, getWidgetPropsByType, WmComponentsModule } from '@wm/components/base';
|
5
5
|
import * as i1 from '@wm/core';
|
6
|
-
import { noop } from '@wm/core';
|
6
|
+
import { noop, addClass } from '@wm/core';
|
7
7
|
import { capitalize, cloneDeep } from 'lodash-es';
|
8
8
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
9
9
|
import { DatasetAwareFormComponent } from '@wm/components/input';
|
@@ -71,6 +71,9 @@ class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
|
|
71
71
|
setProps(config, resolveFn) {
|
72
72
|
this.config = config;
|
73
73
|
this.configSubject.next();
|
74
|
+
if (config.customClasses) {
|
75
|
+
addClass(this.nativeElement, config.customClasses);
|
76
|
+
}
|
74
77
|
this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');
|
75
78
|
if (this.asAttr)
|
76
79
|
this.setBaseWidgetName(config.widgetType);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget.props.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget-container.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-prop.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.module.ts","../../../../../projects/components/widgets/advanced/custom/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const customWidgetProps =\n new Map(\n [\n ['class', PROP_STRING],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['widgetname', PROP_STRING],\n ['show', { value: true, ...PROP_BOOLEAN }]\n ]\n )\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget',\n customWidgetProps\n );\n};\n","import {Attribute, Directive, ElementRef, Inject, Injector, OnInit, Optional} from '@angular/core';\n\nimport { noop } from '@wm/core';\nimport {PROP_TYPE, provideAs, provideAsWidgetRef, register, StylableComponent, styler} from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\nimport { registerProps } from \"../custom-widget-container/custom-widget.props\";\nimport {capitalize, cloneDeep} from 'lodash-es';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR} from \"@angular/forms\";\nimport {DatasetAwareFormComponent} from \"@wm/components/input\";\nimport {Subject} from \"rxjs\";\n\nconst registeredPropsSet = new Set<string>();\n\nlet customWidgetPropsMap: { [key: string]: any } = {};\n\nconst DEFAULT_CLS = 'app-html-container';\n\ndeclare const _;\n\n@Directive({\n selector: '[wmWidgetContainer]',\n providers: [\n provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),\n provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends DatasetAwareFormComponent implements OnInit {\n static initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n config: any;\n private props: any = {};\n private baseWidgetName: string;\n asAttr: boolean;\n configSubject: Subject<any>;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n const widgetType = `wm-custom-${widgetname}`;\n const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };\n let resolveFn: Function = noop;\n\n super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.configSubject = new Subject();\n this.widgetType = widgetType;\n this.name = elRef.nativeElement.getAttribute('name');\n\n styler(this.nativeElement, this);\n\n // Call on property change on name to set name attribute on element.\n this.registerReadyStateListener(() => {\n super.onPropertyChange('name', this.name);\n });\n\n this.registerPropertyChangeListener(((key: string, nv: any, ov?: any) => {\n if (!key.startsWith('prop-')) return;\n const propName = key.slice(5)\n if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {\n this.props[propName] = nv;\n }\n }))\n }\n\n get datavalue() {\n if(this.nativeElement.children.length) {\n let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;\n this.updateDataValue(value);\n return value;\n }\n }\n\n set datavalue(value) {\n if(this.nativeElement.children.length)\n this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;\n }\n\n setBaseWidgetName(baseWidgetType: string) {\n let splitArr = baseWidgetType.split('-'), modifiedArr = [];\n modifiedArr = splitArr.map((item: any) => {\n item = item !== 'wm' ? capitalize(item) : item;\n return item;\n });\n this.baseWidgetName = modifiedArr.join('');\n }\n\n public setProps(config, resolveFn: Function) {\n this.config = config;\n this.configSubject.next();\n this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');\n if(this.asAttr)\n this.setBaseWidgetName(config.widgetType);\n if (!config || !config.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }else{\n this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]))\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props = {}) {\n const propsMap = new Map(customWidgetProps);\n Object.entries(props).forEach(([k, v]: [string, any]) => {\n let type = PROP_TYPE.STRING;\n\n if (v.type === 'boolean') {\n type = PROP_TYPE.BOOLEAN;\n } else if (v.type === 'number') {\n type = PROP_TYPE.NUMBER;\n } else if (v.type !== 'string') {\n type = v.type;\n }\n\n // Do not set the 'bind:*' values\n propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n this.props[k] = v.value;\n });\n\n registeredPropsSet.add(this.widgetType);\n customWidgetPropsMap[this.widgetType] = this.props\n\n return propsMap;\n }\n\n updateDataValue(value) {\n if(this.formControl && this.formControl.control && value !== this.formControl.control.value)\n this.formControl.control.setValue(value);\n }\n\n updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n if(this.asAttr) {\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\n } else {\n this[modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;\n }\n if(this.formControl && modifiedKey === 'datavalue')\n this.updateDataValue(value);\n }\n}\n","import {PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget-container',\n new Map(\n [\n ['name', PROP_STRING],\n ['class', PROP_STRING]\n ]\n )\n );\n};\n","import { AfterContentInit, Directive, ElementRef, Injector, OnDestroy, Optional } from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { registerProps } from './custom-widget-prop';\nimport { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';\n\nconst DEFAULT_CLS = 'app-custom-widget-container clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS};\ndeclare const _;\n\n@Directive({\n selector: '[wmCustomWidget]',\n providers: [\n provideAsWidgetRef(CustomWidgetDirective)\n ]\n})\nexport class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private viewport: Viewport) {\n super(inj, WIDGET_CONFIG);\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n ngAfterContentInit() {\n let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'),\n inheritedProps = {},\n customWidgetProps = Array.from(getWidgetPropsByType(\"wm-custom-widget-container\").keys());\n for(let i = 0; i < customWidget.attributes.length; i++) {\n let attr = customWidget.attributes.item(i);\n if(attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))\n inheritedProps[attr.name] = attr.value;\n }\n this.processChildren(this.nativeElement.children, inheritedProps);\n }\n\n processChildren(children: any, inheritedProps: { [key: string]: string }) {\n Array.from(children).forEach((child: any) => {\n if(!child.hasAttribute('base-widget'))\n this.processChildren(child.children, inheritedProps);\n else {\n for (const [key, value] of Object.entries(inheritedProps)) {\n if(key.includes(\".event\") || key.includes('.bind'))\n this.processAttr(key, value, {widget: child.widget, nativeElement: child});\n else\n child.widget[key] = value;\n }\n }\n });\n }\n\n private callback(eventName, locals?: object) {\n locals = _.assign({ widget: this }, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { CustomWidgetContainerDirective } from './custom-widget-container/custom-widget-container.directive';\nimport { CustomWidgetDirective } from './custom-widget.directive'\nconst components = [\n CustomWidgetContainerDirective,\n CustomWidgetDirective\n];\n\n@NgModule({\n imports: [\n CommonModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class CustomModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["registerProps","DEFAULT_CLS"],"mappings":";;;;;;;;;;;AAEO,MAAM,iBAAiB,GAC1B,IAAI,GAAG,CACH;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC;AAC7C,CAAA,CACJ,CAAA;AAEE,MAAMA,eAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,kBAAkB,EAClB,iBAAiB,CACpB,CAAC;AACN,CAAC;;ACND,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAE7C,IAAI,oBAAoB,GAA2B,EAAE,CAAC;AAEtD,MAAMC,aAAW,GAAG,oBAAoB,CAAC;AAanC,MAAO,8BAA+B,SAAQ,yBAAyB,CAAA;AAClE,IAAA,SAAA,IAAA,CAAA,eAAe,GAAGD,eAAa,EAAhB,CAAmB,EAAA;AAYzC,IAAA,WAAA,CACI,GAAa,EAAE,KAAiB,EACP,UAAkB,EACH,e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,EAAA,CAAA,EAAA,CAAA,kBAAA,CAAA;gBACP,kBAAkB,CAAC,qBAAqB,CAAC;AAC5C,aAAA,CAAA,EAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;iFAEQ,qBAAqB,EAAA,CAAA;cANjC,SAAS;AAAC,QAAA,IAAA,EAAA,CAAA;AACP,gBAAA,QAAQ,EAAE,kBAAkB;AAC5B,gBAAA,SAAS,EAAE;AACP,oBAAA,kBAAkB,CAAuB,qBAAA,CAAA;AAC5C,iBAAA;AACJ,aAAA,CAAA;;;ACRD,MAAM,UAAU,GAAG;IACf,8BAA8B;IAC9B,qBAAqB;CACxB,CAAC;MAUW,YAAY,CAAA;6EAAZ,YAAY,GAAA,CAAA,EAAA,CAAA,EAAA;mEAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;uEANjB,YAAY;YACZ,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;;iFAKb,YAAY,EAAA,CAAA;cARxB,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE;oBACL,YAAY;oBACZ,kBAAkB;AACrB,iBAAA;AACD,gBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,gBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAC3B,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,YAAY,mBAZrB,8BAA8B;AAC9B,QAAA,qBAAqB,aAKjB,YAAY;AACZ,QAAA,kBAAkB,aAPtB,8BAA8B;QAC9B,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTzB;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget.props.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget-container.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-prop.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.module.ts","../../../../../projects/components/widgets/advanced/custom/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const customWidgetProps =\n new Map(\n [\n ['class', PROP_STRING],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['widgetname', PROP_STRING],\n ['show', { value: true, ...PROP_BOOLEAN }]\n ]\n )\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget',\n customWidgetProps\n );\n};\n","import {Attribute, Directive, ElementRef, Inject, Injector, OnInit, Optional} from '@angular/core';\n\nimport { addClass, noop } from '@wm/core';\nimport {PROP_TYPE, provideAs, provideAsWidgetRef, register, StylableComponent, styler} from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\nimport { registerProps } from \"../custom-widget-container/custom-widget.props\";\nimport {capitalize, cloneDeep} from 'lodash-es';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR} from \"@angular/forms\";\nimport {DatasetAwareFormComponent} from \"@wm/components/input\";\nimport {Subject} from \"rxjs\";\n\nconst registeredPropsSet = new Set<string>();\n\nlet customWidgetPropsMap: { [key: string]: any } = {};\n\nconst DEFAULT_CLS = 'app-html-container';\n\ndeclare const _;\n\n@Directive({\n selector: '[wmWidgetContainer]',\n providers: [\n provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),\n provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends DatasetAwareFormComponent implements OnInit {\n static initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n config: any;\n private props: any = {};\n private baseWidgetName: string;\n asAttr: boolean;\n configSubject: Subject<any>;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n const widgetType = `wm-custom-${widgetname}`;\n const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };\n let resolveFn: Function = noop;\n\n super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.configSubject = new Subject();\n this.widgetType = widgetType;\n this.name = elRef.nativeElement.getAttribute('name');\n\n styler(this.nativeElement, this);\n\n // Call on property change on name to set name attribute on element.\n this.registerReadyStateListener(() => {\n super.onPropertyChange('name', this.name);\n });\n\n this.registerPropertyChangeListener(((key: string, nv: any, ov?: any) => {\n if (!key.startsWith('prop-')) return;\n const propName = key.slice(5)\n if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {\n this.props[propName] = nv;\n }\n }))\n }\n\n get datavalue() {\n if(this.nativeElement.children.length) {\n let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;\n this.updateDataValue(value);\n return value;\n }\n }\n\n set datavalue(value) {\n if(this.nativeElement.children.length)\n this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;\n }\n\n setBaseWidgetName(baseWidgetType: string) {\n let splitArr = baseWidgetType.split('-'), modifiedArr = [];\n modifiedArr = splitArr.map((item: any) => {\n item = item !== 'wm' ? capitalize(item) : item;\n return item;\n });\n this.baseWidgetName = modifiedArr.join('');\n }\n\n public setProps(config, resolveFn: Function) {\n this.config = config;\n this.configSubject.next();\n if(config.customClasses){\n addClass(this.nativeElement, config.customClasses);\n }\n this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');\n if(this.asAttr)\n this.setBaseWidgetName(config.widgetType);\n if (!config || !config.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }else{\n this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]))\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props = {}) {\n const propsMap = new Map(customWidgetProps);\n Object.entries(props).forEach(([k, v]: [string, any]) => {\n let type = PROP_TYPE.STRING;\n\n if (v.type === 'boolean') {\n type = PROP_TYPE.BOOLEAN;\n } else if (v.type === 'number') {\n type = PROP_TYPE.NUMBER;\n } else if (v.type !== 'string') {\n type = v.type;\n }\n\n // Do not set the 'bind:*' values\n propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n this.props[k] = v.value;\n });\n\n registeredPropsSet.add(this.widgetType);\n customWidgetPropsMap[this.widgetType] = this.props\n\n return propsMap;\n }\n\n updateDataValue(value) {\n if(this.formControl && this.formControl.control && value !== this.formControl.control.value)\n this.formControl.control.setValue(value);\n }\n\n updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n if(this.asAttr) {\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\n } else {\n this[modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;\n }\n if(this.formControl && modifiedKey === 'datavalue')\n this.updateDataValue(value);\n }\n}\n","import {PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget-container',\n new Map(\n [\n ['name', PROP_STRING],\n ['class', PROP_STRING]\n ]\n )\n );\n};\n","import { AfterContentInit, Directive, ElementRef, Injector, OnDestroy, Optional } from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { registerProps } from './custom-widget-prop';\nimport { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';\n\nconst DEFAULT_CLS = 'app-custom-widget-container clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS};\ndeclare const _;\n\n@Directive({\n selector: '[wmCustomWidget]',\n providers: [\n provideAsWidgetRef(CustomWidgetDirective)\n ]\n})\nexport class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private viewport: Viewport) {\n super(inj, WIDGET_CONFIG);\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n ngAfterContentInit() {\n let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'),\n inheritedProps = {},\n customWidgetProps = Array.from(getWidgetPropsByType(\"wm-custom-widget-container\").keys());\n for(let i = 0; i < customWidget.attributes.length; i++) {\n let attr = customWidget.attributes.item(i);\n if(attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))\n inheritedProps[attr.name] = attr.value;\n }\n this.processChildren(this.nativeElement.children, inheritedProps);\n }\n\n processChildren(children: any, inheritedProps: { [key: string]: string }) {\n Array.from(children).forEach((child: any) => {\n if(!child.hasAttribute('base-widget'))\n this.processChildren(child.children, inheritedProps);\n else {\n for (const [key, value] of Object.entries(inheritedProps)) {\n if(key.includes(\".event\") || key.includes('.bind'))\n this.processAttr(key, value, {widget: child.widget, nativeElement: child});\n else\n child.widget[key] = value;\n }\n }\n });\n }\n\n private callback(eventName, locals?: object) {\n locals = _.assign({ widget: this }, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { CustomWidgetContainerDirective } from './custom-widget-container/custom-widget-container.directive';\nimport { CustomWidgetDirective } from './custom-widget.directive'\nconst components = [\n CustomWidgetContainerDirective,\n CustomWidgetDirective\n];\n\n@NgModule({\n imports: [\n CommonModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class CustomModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["registerProps","DEFAULT_CLS"],"mappings":";;;;;;;;;;;AAEO,MAAM,iBAAiB,GAC1B,IAAI,GAAG,CACH;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC;AAC7C,CAAA,CACJ,CAAA;AAEE,MAAMA,eAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,kBAAkB,EAClB,iBAAiB,CACpB,CAAC;AACN,CAAC;;ACND,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAE7C,IAAI,oBAAoB,GAA2B,EAAE,CAAC;AAEtD,MAAMC,aAAW,GAAG,oBAAoB,CAAC;AAanC,MAAO,8BAA+B,SAAQ,yBAAyB,CAAA;AAClE,IAAA,SAAA,IAAA,CAAA,eAAe,GAAGD,eAAa,EAAhB,CAAmB,EAAA;AAYzC,IAAA,WAAA,CACI,GAAa,EAAE,KAAiB,EACP,UAAkB,EACH,eAAoB,EAAA;AAE5D,QAAA,MAAM,UAAU,GAAG,CAAa,UAAA,EAAA,UAAU,EAAE,CAAC;QAC7C,MAAM,aAAa,GAAG,EAAE,UAAU,EAAE,SAAS,EAAEC,aAAW,EAAE,CAAC;QAC7D,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,OAAO,CAAC,GAAG,IAAI,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC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