@wavemaker/app-ng-runtime 12.0.0-next.44004 → 12.0.0-next.45001
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.
- app-ng-runtime/build-task/advanced/custom-widget-container/custom-widget-container.build.d.ts +2 -0
- app-ng-runtime/build-task/advanced/custom-widget-prop/custom-widget-prop.build.d.ts +2 -0
- app-ng-runtime/build-task/advanced/custom-widget-wrapper/custom-widget-wrapper.build.d.ts +2 -0
- app-ng-runtime/build-task/bundles/index.umd.js +477 -404
- app-ng-runtime/build-task/esm2022/advanced/custom-widget-container/custom-widget-container.build.mjs +15 -0
- app-ng-runtime/build-task/esm2022/advanced/custom-widget-prop/custom-widget-prop.build.mjs +10 -0
- app-ng-runtime/build-task/esm2022/advanced/custom-widget-wrapper/custom-widget-wrapper.build.mjs +26 -0
- app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +3 -2
- app-ng-runtime/build-task/esm2022/navigation/menu/menu.build.mjs +14 -2
- app-ng-runtime/build-task/esm2022/public_api.mjs +4 -1
- app-ng-runtime/build-task/fesm2022/index.mjs +479 -405
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/build-task/public_api.d.ts +3 -0
- app-ng-runtime/components/advanced/custom/bundles/index.umd.js +275 -0
- app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +14 -0
- app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget.props.d.ts +1 -0
- app-ng-runtime/components/advanced/custom/custom-widget-container-prop/custom-widget-container-prop.directive.d.ts +20 -0
- app-ng-runtime/components/advanced/custom/custom-widget-prop.d.ts +1 -0
- app-ng-runtime/components/advanced/custom/custom-widget.directive.d.ts +19 -0
- app-ng-runtime/components/advanced/custom/custom-widget.module.d.ts +11 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +73 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget.props.mjs +9 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container-prop/custom-widget-container-prop.directive.mjs +70 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget-prop.mjs +8 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget.directive.mjs +68 -0
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget.module.mjs +39 -0
- app-ng-runtime/components/advanced/custom/esm2022/index.mjs +5 -0
- app-ng-runtime/components/advanced/custom/esm2022/public_api.mjs +5 -0
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +256 -0
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +1 -0
- app-ng-runtime/components/advanced/custom/index.d.ts +5 -0
- app-ng-runtime/components/advanced/custom/package.json +23 -0
- app-ng-runtime/components/advanced/custom/public_api.d.ts +4 -0
- app-ng-runtime/components/base/bundles/index.umd.js +65 -9
- app-ng-runtime/components/base/components.module.d.ts +12 -11
- app-ng-runtime/components/base/esm2022/components.module.mjs +5 -1
- app-ng-runtime/components/base/esm2022/public_api.mjs +2 -1
- app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +28 -10
- app-ng-runtime/components/base/esm2022/widgets/common/base/custom-widget-container.directive.mjs +39 -0
- app-ng-runtime/components/base/fesm2022/index.mjs +65 -10
- app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/public_api.d.ts +1 -0
- app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +9 -3
- app-ng-runtime/components/base/widgets/common/base/custom-widget-container.directive.d.ts +14 -0
- app-ng-runtime/components/basic/default/audio/audio.component.d.ts +1 -0
- app-ng-runtime/components/basic/default/bundles/index.umd.js +5 -4
- app-ng-runtime/components/basic/default/esm2022/audio/audio.component.mjs +6 -5
- app-ng-runtime/components/basic/default/fesm2022/index.mjs +5 -4
- app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/bundles/index.umd.js +3 -2
- app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +4 -3
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs +3 -2
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/progress-circle/progress-circle.component.d.ts +1 -0
- app-ng-runtime/components/data/form/bundles/index.umd.js +4 -3
- app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +1 -2
- app-ng-runtime/components/data/form/esm2022/live-form/live-form.directive.mjs +5 -3
- app-ng-runtime/components/data/form/fesm2022/index.mjs +4 -3
- app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +46 -53
- app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +2 -3
- app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +44 -53
- app-ng-runtime/components/input/default/esm2022/text/base/base-input.mjs +4 -1
- app-ng-runtime/components/input/default/fesm2022/index.mjs +47 -54
- app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/select/select.component.d.ts +1 -2
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +19 -7
- app-ng-runtime/components/input/epoch/date/date.component.d.ts +1 -0
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +9 -3
- app-ng-runtime/components/input/epoch/esm2022/date/imaskUtil.mjs +8 -2
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +3 -3
- app-ng-runtime/components/input/epoch/esm2022/time/time.component.mjs +3 -3
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +19 -7
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +10 -0
- app-ng-runtime/core/enums/enums.d.ts +2 -1
- app-ng-runtime/core/esm2022/enums/enums.mjs +2 -1
- app-ng-runtime/core/esm2022/types/types.mjs +4 -1
- app-ng-runtime/core/esm2022/utils/build-utils.mjs +6 -1
- app-ng-runtime/core/fesm2022/index.mjs +10 -1
- app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/types/types.d.ts +5 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +254 -4
- app-ng-runtime/runtime/base/components/base-custom-widget.component.d.ts +71 -0
- app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +253 -0
- app-ng-runtime/runtime/base/esm2022/public_api.mjs +2 -1
- app-ng-runtime/runtime/base/esm2022/runtime-base.module.mjs +6 -1
- app-ng-runtime/runtime/base/esm2022/types/types.mjs +2 -1
- app-ng-runtime/runtime/base/fesm2022/index.mjs +251 -1
- app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/runtime/base/public_api.d.ts +1 -0
- app-ng-runtime/runtime/base/runtime-base.module.d.ts +9 -8
- app-ng-runtime/runtime/base/types/types.d.ts +2 -1
- app-ng-runtime/runtime/dynamic/bundles/index.umd.js +26 -9
- app-ng-runtime/runtime/dynamic/esm2022/app/app.module.mjs +5 -2
- app-ng-runtime/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +22 -7
- app-ng-runtime/runtime/dynamic/fesm2022/index.mjs +25 -7
- app-ng-runtime/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +1 -0
- app-ng-runtime/transpiler/bundles/index.umd.js +5 -0
- app-ng-runtime/transpiler/esm2022/build.mjs +4 -1
- app-ng-runtime/transpiler/esm2022/imports.mjs +3 -1
- app-ng-runtime/transpiler/fesm2022/index.mjs +5 -0
- app-ng-runtime/transpiler/fesm2022/index.mjs.map +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { WmComponentsModule } from '@wm/components/base';
|
|
4
|
+
import { CustomWidgetContainerDirective } from './custom-widget-container/custom-widget-container.directive';
|
|
5
|
+
import { CustomWidgetPropDirective, CustomWidgetPropHandlerDirective } from './custom-widget-container-prop/custom-widget-container-prop.directive';
|
|
6
|
+
import { CustomWidgetDirective } from './custom-widget.directive';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
const components = [
|
|
9
|
+
CustomWidgetContainerDirective,
|
|
10
|
+
CustomWidgetPropDirective,
|
|
11
|
+
CustomWidgetPropHandlerDirective,
|
|
12
|
+
CustomWidgetDirective
|
|
13
|
+
];
|
|
14
|
+
export class CustomModule {
|
|
15
|
+
static { this.ɵfac = function CustomModule_Factory(t) { return new (t || CustomModule)(); }; }
|
|
16
|
+
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CustomModule }); }
|
|
17
|
+
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
18
|
+
WmComponentsModule] }); }
|
|
19
|
+
}
|
|
20
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomModule, [{
|
|
21
|
+
type: NgModule,
|
|
22
|
+
args: [{
|
|
23
|
+
imports: [
|
|
24
|
+
CommonModule,
|
|
25
|
+
WmComponentsModule
|
|
26
|
+
],
|
|
27
|
+
declarations: [...components],
|
|
28
|
+
exports: [...components]
|
|
29
|
+
}]
|
|
30
|
+
}], null, null); })();
|
|
31
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CustomModule, { declarations: [CustomWidgetContainerDirective,
|
|
32
|
+
CustomWidgetPropDirective,
|
|
33
|
+
CustomWidgetPropHandlerDirective,
|
|
34
|
+
CustomWidgetDirective], imports: [CommonModule,
|
|
35
|
+
WmComponentsModule], exports: [CustomWidgetContainerDirective,
|
|
36
|
+
CustomWidgetPropDirective,
|
|
37
|
+
CustomWidgetPropHandlerDirective,
|
|
38
|
+
CustomWidgetDirective] }); })();
|
|
39
|
+
//# source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QE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbXG4gICAgICAgIENvbW1vbk1vZHVsZSxcbiAgICAgICAgV21Db21wb25lbnRzTW9kdWxlXG4gICAgXSxcbiAgICBkZWNsYXJhdGlvbnM6IFsuLi5jb21wb25lbnRzXSxcbiAgICBleHBvcnRzOiBbLi4uY29tcG9uZW50c11cbn0pXG5leHBvcnQgY2xhc3MgQ3VzdG9tTW9kdWxlIHtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL3dpZGdldHMvYWR2YW5jZWQvY3VzdG9tL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './custom-widget.module';
|
|
2
|
+
export * from './custom-widget-container/custom-widget-container.directive';
|
|
3
|
+
export * from './custom-widget-container-prop/custom-widget-container-prop.directive';
|
|
4
|
+
export * from './custom-widget.directive';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvd2lkZ2V0cy9hZHZhbmNlZC9jdXN0b20vc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLDZEQUE2RCxDQUFDO0FBQzVFLGNBQWMsdUVBQXVFLENBQUE7QUFDckYsY0FBYywyQkFBMkIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY3VzdG9tLXdpZGdldC5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9jdXN0b20td2lkZ2V0LWNvbnRhaW5lci9jdXN0b20td2lkZ2V0LWNvbnRhaW5lci5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9jdXN0b20td2lkZ2V0LWNvbnRhaW5lci1wcm9wL2N1c3RvbS13aWRnZXQtY29udGFpbmVyLXByb3AuZGlyZWN0aXZlJ1xuZXhwb3J0ICogZnJvbSAnLi9jdXN0b20td2lkZ2V0LmRpcmVjdGl2ZSdcbiJdfQ==
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, Attribute, Self, Inject, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { PROP_STRING, PROP_BOOLEAN, StylableComponent, styler, register, PROP_TYPE, provideAsWidgetRef, WidgetRef, getWidgetPropsByType, WmComponentsModule } from '@wm/components/base';
|
|
5
|
+
import * as i1 from '@wm/core';
|
|
6
|
+
import { noop, $watch } from '@wm/core';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
|
|
9
|
+
const customWidgetProps = new Map([
|
|
10
|
+
['class', PROP_STRING],
|
|
11
|
+
['hint', PROP_STRING],
|
|
12
|
+
['name', PROP_STRING],
|
|
13
|
+
['widgetname', PROP_STRING],
|
|
14
|
+
['show', { value: true, ...PROP_BOOLEAN }]
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
const registeredPropsSet = new Set();
|
|
18
|
+
const DEFAULT_CLS$1 = 'app-html-container';
|
|
19
|
+
const WIDGET_CONFIG$1 = {
|
|
20
|
+
widgetType: 'wm-custom-widget',
|
|
21
|
+
hostClass: DEFAULT_CLS$1
|
|
22
|
+
};
|
|
23
|
+
class CustomWidgetContainerDirective extends StylableComponent {
|
|
24
|
+
constructor(inj, elRef, widgetname) {
|
|
25
|
+
let resolveFn = noop;
|
|
26
|
+
super(inj, WIDGET_CONFIG$1, new Promise(res => resolveFn = res));
|
|
27
|
+
this.propsReady = resolveFn;
|
|
28
|
+
this.widgetType = WIDGET_CONFIG$1.widgetType;
|
|
29
|
+
this.widgetName = widgetname;
|
|
30
|
+
this.name = elRef.nativeElement.getAttribute('name');
|
|
31
|
+
styler(this.nativeElement, this);
|
|
32
|
+
// Call on property change on name to set name attribute on element.
|
|
33
|
+
this.registerReadyStateListener(() => {
|
|
34
|
+
super.onPropertyChange('name', this.name);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
setProps(config, resolveFn) {
|
|
38
|
+
if (!config || !config.properties) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (!registeredPropsSet.has(this.widgetType)) {
|
|
42
|
+
register(this.widgetType, this.prepareProps(config.properties));
|
|
43
|
+
}
|
|
44
|
+
this.propsReady(resolveFn);
|
|
45
|
+
}
|
|
46
|
+
prepareProps(props = {}) {
|
|
47
|
+
const propsMap = new Map(customWidgetProps);
|
|
48
|
+
// propsMap.set('widgetname', this.widgetName);
|
|
49
|
+
Object.entries(props).forEach(([k, v]) => {
|
|
50
|
+
let type = PROP_TYPE.STRING;
|
|
51
|
+
if (v.type === 'boolean') {
|
|
52
|
+
type = PROP_TYPE.BOOLEAN;
|
|
53
|
+
}
|
|
54
|
+
else if (v.type === 'number') {
|
|
55
|
+
type = PROP_TYPE.NUMBER;
|
|
56
|
+
}
|
|
57
|
+
else if (v.type !== 'string') {
|
|
58
|
+
type = v.type;
|
|
59
|
+
}
|
|
60
|
+
// Do not set the 'bind:*' values
|
|
61
|
+
propsMap.set(k, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });
|
|
62
|
+
});
|
|
63
|
+
registeredPropsSet.add(this.widgetType);
|
|
64
|
+
return propsMap;
|
|
65
|
+
}
|
|
66
|
+
static { this.ɵfac = function CustomWidgetContainerDirective_Factory(t) { return new (t || CustomWidgetContainerDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵinjectAttribute('widgetname')); }; }
|
|
67
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetContainerDirective, selectors: [["", "wmWidgetContainer", ""]], exportAs: ["wmWidgetContainer"], features: [i0.ɵɵProvidersFeature([
|
|
68
|
+
provideAsWidgetRef(CustomWidgetContainerDirective)
|
|
69
|
+
]), i0.ɵɵInheritDefinitionFeature] }); }
|
|
70
|
+
}
|
|
71
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetContainerDirective, [{
|
|
72
|
+
type: Directive,
|
|
73
|
+
args: [{
|
|
74
|
+
selector: '[wmWidgetContainer]',
|
|
75
|
+
providers: [
|
|
76
|
+
provideAsWidgetRef(CustomWidgetContainerDirective)
|
|
77
|
+
],
|
|
78
|
+
exportAs: 'wmWidgetContainer'
|
|
79
|
+
}]
|
|
80
|
+
}], function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
81
|
+
type: Attribute,
|
|
82
|
+
args: ['widgetname']
|
|
83
|
+
}] }]; }, null); })();
|
|
84
|
+
|
|
85
|
+
class CustomWidgetPropHandlerDirective {
|
|
86
|
+
constructor(widgetRef) {
|
|
87
|
+
this.widgetRef = widgetRef;
|
|
88
|
+
this.widgetRef.props = {};
|
|
89
|
+
this.widgetRef.pageParams = this.widgetRef.props;
|
|
90
|
+
this.widgetRef.params$ = new Subject();
|
|
91
|
+
}
|
|
92
|
+
registerParams(name, value, bindExpr, type) {
|
|
93
|
+
this.widgetRef.props[name] = value;
|
|
94
|
+
if (!value && bindExpr) {
|
|
95
|
+
this.widgetRef.registerDestroyListener(
|
|
96
|
+
//[Todo-CSP]: expr fn should be generated be default
|
|
97
|
+
$watch(bindExpr, this.widgetRef.getViewParent(), _.get(this.widgetRef, 'context'), nv => {
|
|
98
|
+
this.widgetRef.props[name] = nv;
|
|
99
|
+
// notify the partial container of the param changes
|
|
100
|
+
this.widgetRef.params$.next();
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
this.widgetRef.params$.next();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
static { this.ɵfac = function CustomWidgetPropHandlerDirective_Factory(t) { return new (t || CustomWidgetPropHandlerDirective)(i0.ɵɵdirectiveInject(WidgetRef, 2)); }; }
|
|
108
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetPropHandlerDirective, selectors: [["", "customWidgetContainer", ""]] }); }
|
|
109
|
+
}
|
|
110
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetPropHandlerDirective, [{
|
|
111
|
+
type: Directive,
|
|
112
|
+
args: [{
|
|
113
|
+
selector: '[customWidgetContainer]',
|
|
114
|
+
}]
|
|
115
|
+
}], function () { return [{ type: undefined, decorators: [{
|
|
116
|
+
type: Self
|
|
117
|
+
}, {
|
|
118
|
+
type: Inject,
|
|
119
|
+
args: [WidgetRef]
|
|
120
|
+
}] }]; }, null); })();
|
|
121
|
+
class CustomWidgetPropDirective {
|
|
122
|
+
constructor(bindValue, type, customWidgetPropsProvider) {
|
|
123
|
+
this.bindValue = bindValue;
|
|
124
|
+
this.type = type;
|
|
125
|
+
this.customWidgetPropsProvider = customWidgetPropsProvider;
|
|
126
|
+
}
|
|
127
|
+
ngOnInit() {
|
|
128
|
+
this.customWidgetPropsProvider.registerParams(this.name, this.value, this.bindValue, this.type);
|
|
129
|
+
}
|
|
130
|
+
static { this.ɵfac = function CustomWidgetPropDirective_Factory(t) { return new (t || CustomWidgetPropDirective)(i0.ɵɵinjectAttribute('value.bind'), i0.ɵɵinjectAttribute('type'), i0.ɵɵdirectiveInject(CustomWidgetPropHandlerDirective)); }; }
|
|
131
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetPropDirective, selectors: [["", "wmProp", ""]], inputs: { name: "name", value: "value" } }); }
|
|
132
|
+
}
|
|
133
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetPropDirective, [{
|
|
134
|
+
type: Directive,
|
|
135
|
+
args: [{
|
|
136
|
+
selector: '[wmProp]',
|
|
137
|
+
}]
|
|
138
|
+
}], function () { return [{ type: undefined, decorators: [{
|
|
139
|
+
type: Attribute,
|
|
140
|
+
args: ['value.bind']
|
|
141
|
+
}] }, { type: undefined, decorators: [{
|
|
142
|
+
type: Attribute,
|
|
143
|
+
args: ['type']
|
|
144
|
+
}] }, { type: CustomWidgetPropHandlerDirective }]; }, { name: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], value: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}] }); })();
|
|
149
|
+
|
|
150
|
+
const registerProps = () => {
|
|
151
|
+
register('wm-custom-widget-container', new Map([
|
|
152
|
+
['name', PROP_STRING],
|
|
153
|
+
['class', PROP_STRING]
|
|
154
|
+
]));
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const DEFAULT_CLS = 'app-custom-widget-container clearfix';
|
|
158
|
+
const WIDGET_CONFIG = { widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS };
|
|
159
|
+
class CustomWidgetDirective extends StylableComponent {
|
|
160
|
+
static { this.initializeProps = registerProps(); }
|
|
161
|
+
constructor(inj, viewport) {
|
|
162
|
+
super(inj, WIDGET_CONFIG);
|
|
163
|
+
this.viewport = viewport;
|
|
164
|
+
this.registerDestroyListener(this.viewport.subscribe("resize" /* ViewportEvent.RESIZE */, data => this.callback('resize', data)));
|
|
165
|
+
this.registerDestroyListener(this.viewport.subscribe("orientationchange" /* ViewportEvent.ORIENTATION_CHANGE */, data => this.callback('orientationchange', data)));
|
|
166
|
+
}
|
|
167
|
+
ngAfterContentInit() {
|
|
168
|
+
let customWidget = this.nativeElement.closest('[customwidgetcontainer]'), inheritedProps = {}, customWidgetProps = Array.from(getWidgetPropsByType("wm-custom-widget-container").keys());
|
|
169
|
+
for (let i = 0; i < customWidget.attributes.length; i++) {
|
|
170
|
+
let attr = customWidget.attributes.item(i);
|
|
171
|
+
if (attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))
|
|
172
|
+
inheritedProps[attr.name] = attr.value;
|
|
173
|
+
}
|
|
174
|
+
this.processChildren(this.nativeElement.children, inheritedProps);
|
|
175
|
+
}
|
|
176
|
+
processChildren(children, inheritedProps) {
|
|
177
|
+
Array.from(children).forEach((child) => {
|
|
178
|
+
if (!child.hasAttribute('base-widget'))
|
|
179
|
+
this.processChildren(child.children, inheritedProps);
|
|
180
|
+
else {
|
|
181
|
+
for (const [key, value] of Object.entries(inheritedProps)) {
|
|
182
|
+
if (key.includes(".event"))
|
|
183
|
+
this.processChildAttr(key, value, { widget: child.widget, nativeElement: child });
|
|
184
|
+
else
|
|
185
|
+
child.widget[key] = value;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
callback(eventName, locals) {
|
|
191
|
+
locals = _.assign({ widget: this }, locals);
|
|
192
|
+
this.invokeEventCallback(eventName, locals);
|
|
193
|
+
}
|
|
194
|
+
ngOnAttach() {
|
|
195
|
+
this.callback('attach');
|
|
196
|
+
}
|
|
197
|
+
ngOnDetach() {
|
|
198
|
+
this.callback('detach');
|
|
199
|
+
}
|
|
200
|
+
ngOnDestroy() {
|
|
201
|
+
this.callback('destroy');
|
|
202
|
+
super.ngOnDestroy();
|
|
203
|
+
}
|
|
204
|
+
static { this.ɵfac = function CustomWidgetDirective_Factory(t) { return new (t || CustomWidgetDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.Viewport)); }; }
|
|
205
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetDirective, selectors: [["", "wmCustomWidget", ""]], features: [i0.ɵɵProvidersFeature([
|
|
206
|
+
provideAsWidgetRef(CustomWidgetDirective)
|
|
207
|
+
]), i0.ɵɵInheritDefinitionFeature] }); }
|
|
208
|
+
}
|
|
209
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetDirective, [{
|
|
210
|
+
type: Directive,
|
|
211
|
+
args: [{
|
|
212
|
+
selector: '[wmCustomWidget]',
|
|
213
|
+
providers: [
|
|
214
|
+
provideAsWidgetRef(CustomWidgetDirective)
|
|
215
|
+
]
|
|
216
|
+
}]
|
|
217
|
+
}], function () { return [{ type: i0.Injector }, { type: i1.Viewport }]; }, null); })();
|
|
218
|
+
|
|
219
|
+
const components = [
|
|
220
|
+
CustomWidgetContainerDirective,
|
|
221
|
+
CustomWidgetPropDirective,
|
|
222
|
+
CustomWidgetPropHandlerDirective,
|
|
223
|
+
CustomWidgetDirective
|
|
224
|
+
];
|
|
225
|
+
class CustomModule {
|
|
226
|
+
static { this.ɵfac = function CustomModule_Factory(t) { return new (t || CustomModule)(); }; }
|
|
227
|
+
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CustomModule }); }
|
|
228
|
+
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
229
|
+
WmComponentsModule] }); }
|
|
230
|
+
}
|
|
231
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomModule, [{
|
|
232
|
+
type: NgModule,
|
|
233
|
+
args: [{
|
|
234
|
+
imports: [
|
|
235
|
+
CommonModule,
|
|
236
|
+
WmComponentsModule
|
|
237
|
+
],
|
|
238
|
+
declarations: [...components],
|
|
239
|
+
exports: [...components]
|
|
240
|
+
}]
|
|
241
|
+
}], null, null); })();
|
|
242
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CustomModule, { declarations: [CustomWidgetContainerDirective,
|
|
243
|
+
CustomWidgetPropDirective,
|
|
244
|
+
CustomWidgetPropHandlerDirective,
|
|
245
|
+
CustomWidgetDirective], imports: [CommonModule,
|
|
246
|
+
WmComponentsModule], exports: [CustomWidgetContainerDirective,
|
|
247
|
+
CustomWidgetPropDirective,
|
|
248
|
+
CustomWidgetPropHandlerDirective,
|
|
249
|
+
CustomWidgetDirective] }); })();
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Generated bundle index. Do not edit.
|
|
253
|
+
*/
|
|
254
|
+
|
|
255
|
+
export { CustomModule, CustomWidgetContainerDirective, CustomWidgetDirective, CustomWidgetPropDirective, CustomWidgetPropHandlerDirective };
|
|
256
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +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-container-prop/custom-widget-container-prop.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 } 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","import { Attribute, Directive, ElementRef, Injector, OnInit, Optional, SecurityContext } from '@angular/core';\n\nimport { noop } from '@wm/core';\nimport { IWidgetConfig, PROP_TYPE, provideAsWidgetRef, register, SanitizePipe, StylableComponent, styler } from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\n\nconst registeredPropsSet = new Set<string>();\n\nconst DEFAULT_CLS = 'app-html-container';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-custom-widget',\n hostClass: DEFAULT_CLS\n};\n\ndeclare const _;\n\n@Directive({\n selector: '[wmWidgetContainer]',\n providers: [\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends StylableComponent implements OnInit {\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n ) {\n let resolveFn: Function = noop;\n super(inj, WIDGET_CONFIG, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.widgetType = WIDGET_CONFIG.widgetType;\n this.widgetName = widgetname;\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\n public setProps(config, resolveFn: Function) {\n if (!config || !config.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props = {}) {\n const propsMap = new Map(customWidgetProps);\n // propsMap.set('widgetname', this.widgetName);\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(k, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n });\n\n registeredPropsSet.add(this.widgetType);\n\n return propsMap;\n }\n}\n","import { Attribute, Directive, Inject, Self, Input, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\nimport { $watch } from '@wm/core';\nimport { WidgetRef } from '@wm/components/base';\n\n\ndeclare const _;\n\n@Directive({\n selector: '[customWidgetContainer]',\n})\nexport class CustomWidgetPropHandlerDirective {\n constructor (@Self() @Inject(WidgetRef) private widgetRef) {\n this.widgetRef.props = {};\n this.widgetRef.pageParams = this.widgetRef.props;\n this.widgetRef.params$ = new Subject();\n }\n\n registerParams(name: string, value: string, bindExpr: string, type: string) {\n this.widgetRef.props[name] = value;\n if (!value && bindExpr) {\n this.widgetRef.registerDestroyListener(\n //[Todo-CSP]: expr fn should be generated be default\n $watch(bindExpr, this.widgetRef.getViewParent(), _.get(this.widgetRef, 'context'), nv => {\n this.widgetRef.props[name] = nv;\n\n // notify the partial container of the param changes\n this.widgetRef.params$.next();\n })\n );\n } else {\n this.widgetRef.params$.next();\n }\n\n }\n}\n\n@Directive({\n selector: '[wmProp]',\n})\nexport class CustomWidgetPropDirective implements OnInit {\n\n @Input() name: string;\n @Input() value: any;\n\n constructor(\n @Attribute('value.bind') public bindValue,\n @Attribute('type') public type,\n private customWidgetPropsProvider: CustomWidgetPropHandlerDirective\n ) {\n }\n\n ngOnInit() {\n this.customWidgetPropsProvider.registerParams(this.name, this.value, this.bindValue, this.type);\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]'),\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\"))\n this.processChildAttr(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 { CustomWidgetPropDirective, CustomWidgetPropHandlerDirective} from './custom-widget-container-prop/custom-widget-container-prop.directive'\nimport { CustomWidgetDirective } from './custom-widget.directive'\nconst components = [\n CustomWidgetContainerDirective,\n CustomWidgetPropDirective,\n CustomWidgetPropHandlerDirective,\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":["DEFAULT_CLS","WIDGET_CONFIG"],"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;;ACJL,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAE7C,MAAMA,aAAW,GAAG,oBAAoB,CAAC;AACzC,MAAMC,eAAa,GAAkB;AACjC,IAAA,UAAU,EAAE,kBAAkB;AAC9B,IAAA,SAAS,EAAED,aAAW;CACzB,CAAC;AAWI,MAAO,8BAA+B,SAAQ,iBAAiB,CAAA;AAMjE,IAAA,WAAA,CACI,GAAa,EAAE,KAAiB,EACP,UAAkB,EAAA;QAE3C,IAAI,SAAS,GAAa,IAAI,CAAC;AAC/B,QAAA,KAAK,CAAC,GAAG,EAAEC,eAAa,EAAE,IAAI,OAAO,CAAC,GAAG,IAAI,SAAS,GAAG,GAAG,CA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,aAAA,CAAA;;;ACPD,MAAM,UAAU,GAAG;IACf,8BAA8B;IAC9B,yBAAyB;IACzB,gCAAgC;IAChC,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;;uFAKb,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,mBAdrB,8BAA8B;QAC9B,yBAAyB;QACzB,gCAAgC;AAChC,QAAA,qBAAqB,aAKjB,YAAY;AACZ,QAAA,kBAAkB,aATtB,8BAA8B;QAC9B,yBAAyB;QACzB,gCAAgC;QAChC,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACZzB;;AAEG;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wm/components/advanced/custom",
|
|
3
|
+
"sideEffects": false,
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"tslib": "^2.0.0"
|
|
6
|
+
},
|
|
7
|
+
"module": "fesm2022/index.mjs",
|
|
8
|
+
"typings": "index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./package.json": {
|
|
11
|
+
"default": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"esm2022": "./esm2022/index.mjs",
|
|
16
|
+
"esm": "./esm2022/index.mjs",
|
|
17
|
+
"default": "./fesm2022/index.mjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.\\nPlease delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.\\n')\" && exit 1"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1021,9 +1021,10 @@
|
|
|
1021
1021
|
}
|
|
1022
1022
|
else {
|
|
1023
1023
|
this.delayedInit = true;
|
|
1024
|
-
initPromise.then(() => {
|
|
1024
|
+
initPromise.then((resolveFn) => {
|
|
1025
1025
|
this.initWidget();
|
|
1026
1026
|
this.setInitProps();
|
|
1027
|
+
resolveFn && resolveFn();
|
|
1027
1028
|
});
|
|
1028
1029
|
}
|
|
1029
1030
|
}
|
|
@@ -1230,11 +1231,11 @@
|
|
|
1230
1231
|
* @param {string} eventName
|
|
1231
1232
|
* @param {string} expr
|
|
1232
1233
|
*/
|
|
1233
|
-
processEventAttr(eventName, expr, meta) {
|
|
1234
|
+
processEventAttr(eventName, expr, meta, child) {
|
|
1234
1235
|
const fn = i1.$parseEvent(expr);
|
|
1235
1236
|
const locals = this.context;
|
|
1236
|
-
locals.widget = this.widget;
|
|
1237
|
-
const boundFn = fn.bind(undefined, this.viewParent, locals);
|
|
1237
|
+
locals.widget = child ? child.widget : this.widget;
|
|
1238
|
+
const boundFn = fn.bind(undefined, child ? this.viewParent.viewParent : this.viewParent, locals);
|
|
1238
1239
|
const eventCallback = () => {
|
|
1239
1240
|
let boundFnVal;
|
|
1240
1241
|
i1.$invokeWatchers(true);
|
|
@@ -1254,15 +1255,29 @@
|
|
|
1254
1255
|
console.error(e);
|
|
1255
1256
|
}
|
|
1256
1257
|
};
|
|
1257
|
-
|
|
1258
|
+
if (child) {
|
|
1259
|
+
if (!child.widget.eventHandlers)
|
|
1260
|
+
child.widget.eventHandlers = new Map();
|
|
1261
|
+
child.widget.eventHandlers.set(this.getMappedEventName(eventName), { callback: eventCallback, locals });
|
|
1262
|
+
}
|
|
1263
|
+
else
|
|
1264
|
+
this.eventHandlers.set(this.getMappedEventName(eventName), { callback: eventCallback, locals });
|
|
1258
1265
|
// prepend eventName with on and convert it to camelcase.
|
|
1259
1266
|
// eg, "click" ---> onClick
|
|
1260
1267
|
const onEventName = _.camelCase(`on-${eventName}`);
|
|
1261
1268
|
// save the eventCallback in widgetScope.
|
|
1262
|
-
|
|
1269
|
+
if (child) {
|
|
1270
|
+
child.widget[onEventName] = eventCallback;
|
|
1271
|
+
}
|
|
1272
|
+
else
|
|
1273
|
+
this[onEventName] = eventCallback;
|
|
1263
1274
|
// events needs to be setup after viewInit
|
|
1264
1275
|
this.toBeSetupEventsQueue.push(() => {
|
|
1265
|
-
|
|
1276
|
+
if (child) {
|
|
1277
|
+
this.handleEvent(child.nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);
|
|
1278
|
+
}
|
|
1279
|
+
else
|
|
1280
|
+
this.handleEvent(this.nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);
|
|
1266
1281
|
});
|
|
1267
1282
|
}
|
|
1268
1283
|
/**
|
|
@@ -1294,13 +1309,16 @@
|
|
|
1294
1309
|
}
|
|
1295
1310
|
}
|
|
1296
1311
|
}
|
|
1312
|
+
processChildAttr(attrName, attrValue, child) {
|
|
1313
|
+
this.processAttr(attrName, attrValue, child);
|
|
1314
|
+
}
|
|
1297
1315
|
/**
|
|
1298
1316
|
* Process the attribute
|
|
1299
1317
|
* If the attribute is an event expression, generate a functional representation of the expression
|
|
1300
1318
|
* and keep in eventHandlers
|
|
1301
1319
|
* If the attribute is a bound expression, register a watch on the expression
|
|
1302
1320
|
*/
|
|
1303
|
-
processAttr(attrName, attrValue) {
|
|
1321
|
+
processAttr(attrName, attrValue, child) {
|
|
1304
1322
|
// console.log("====attrName=====", attrName, "=====typeof attrname=====", typeof attrName, "-----attrValue----", attrValue);
|
|
1305
1323
|
const { 0: propName, 1: type, 2: meta, length } = attrName.split('.');
|
|
1306
1324
|
if (type === 'bind') {
|
|
@@ -1311,7 +1329,7 @@
|
|
|
1311
1329
|
this.processBindAttr(propName, attrValue);
|
|
1312
1330
|
}
|
|
1313
1331
|
else if (type === 'event') {
|
|
1314
|
-
this.processEventAttr(propName, attrValue, meta);
|
|
1332
|
+
this.processEventAttr(propName, attrValue, meta, child);
|
|
1315
1333
|
}
|
|
1316
1334
|
else if (length === 1) {
|
|
1317
1335
|
// remove class and name attributes. Component will set them on the proper node
|
|
@@ -2030,6 +2048,40 @@
|
|
|
2030
2048
|
args: ['content']
|
|
2031
2049
|
}] }, { type: i0__namespace.ComponentFactoryResolver }, { type: i1__namespace.PartialRefProvider }]; }, null); })();
|
|
2032
2050
|
|
|
2051
|
+
class CustomWidgetContainerDirective {
|
|
2052
|
+
constructor(componentInstance, vcRef, elRef, inj, app, widgetname, customWidgetRefProvider) {
|
|
2053
|
+
this.componentInstance = componentInstance;
|
|
2054
|
+
this.vcRef = vcRef;
|
|
2055
|
+
this.elRef = elRef;
|
|
2056
|
+
this.inj = inj;
|
|
2057
|
+
this.app = app;
|
|
2058
|
+
this.customWidgetRefProvider = customWidgetRefProvider;
|
|
2059
|
+
this.componentInstance.widgetname;
|
|
2060
|
+
this.customWidgetRefProvider.getComponentFactoryRef(widgetname, i1.ComponentType.WIDGET).then((componentFactory) => {
|
|
2061
|
+
if (componentFactory) {
|
|
2062
|
+
const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);
|
|
2063
|
+
this.elRef.nativeElement.appendChild(instanceRef.location.nativeElement);
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
static { this.ɵfac = function CustomWidgetContainerDirective_Factory(t) { return new (t || CustomWidgetContainerDirective)(i0__namespace.ɵɵdirectiveInject(WidgetRef, 2), i0__namespace.ɵɵdirectiveInject(i0__namespace.ViewContainerRef), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.App), i0__namespace.ɵɵinjectAttribute('widgetname'), i0__namespace.ɵɵdirectiveInject(i1__namespace.CustomWidgetRefProvider)); }; }
|
|
2068
|
+
static { this.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: CustomWidgetContainerDirective, selectors: [["", "customWidgetContainer", "", "widgetname", ""]] }); }
|
|
2069
|
+
}
|
|
2070
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CustomWidgetContainerDirective, [{
|
|
2071
|
+
type: i0.Directive,
|
|
2072
|
+
args: [{
|
|
2073
|
+
selector: '[customWidgetContainer][widgetname]'
|
|
2074
|
+
}]
|
|
2075
|
+
}], function () { return [{ type: undefined, decorators: [{
|
|
2076
|
+
type: i0.Self
|
|
2077
|
+
}, {
|
|
2078
|
+
type: i0.Inject,
|
|
2079
|
+
args: [WidgetRef]
|
|
2080
|
+
}] }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.Injector }, { type: i1__namespace.App }, { type: undefined, decorators: [{
|
|
2081
|
+
type: i0.Attribute,
|
|
2082
|
+
args: ['widgetname']
|
|
2083
|
+
}] }, { type: i1__namespace.CustomWidgetRefProvider }]; }, null); })();
|
|
2084
|
+
|
|
2033
2085
|
class ShowInDeviceDirective {
|
|
2034
2086
|
constructor(elRef, widget, viewContainerRef, inj, templateRef) {
|
|
2035
2087
|
this.elRef = elRef;
|
|
@@ -3036,6 +3088,7 @@
|
|
|
3036
3088
|
PartialParamHandlerDirective,
|
|
3037
3089
|
PartialParamDirective,
|
|
3038
3090
|
PartialContainerDirective,
|
|
3091
|
+
CustomWidgetContainerDirective,
|
|
3039
3092
|
RedrawableDirective,
|
|
3040
3093
|
ShowInDeviceDirective,
|
|
3041
3094
|
SmoothScrollDirective,
|
|
@@ -3103,6 +3156,7 @@
|
|
|
3103
3156
|
PartialParamHandlerDirective,
|
|
3104
3157
|
PartialParamDirective,
|
|
3105
3158
|
PartialContainerDirective,
|
|
3159
|
+
CustomWidgetContainerDirective,
|
|
3106
3160
|
RedrawableDirective,
|
|
3107
3161
|
ShowInDeviceDirective,
|
|
3108
3162
|
SmoothScrollDirective,
|
|
@@ -3133,6 +3187,7 @@
|
|
|
3133
3187
|
PartialParamHandlerDirective,
|
|
3134
3188
|
PartialParamDirective,
|
|
3135
3189
|
PartialContainerDirective,
|
|
3190
|
+
CustomWidgetContainerDirective,
|
|
3136
3191
|
RedrawableDirective,
|
|
3137
3192
|
ShowInDeviceDirective,
|
|
3138
3193
|
SmoothScrollDirective,
|
|
@@ -5153,6 +5208,7 @@
|
|
|
5153
5208
|
exports.ContainerDirective = ContainerDirective;
|
|
5154
5209
|
exports.Context = Context;
|
|
5155
5210
|
exports.CustomPipe = CustomPipe;
|
|
5211
|
+
exports.CustomWidgetContainerDirective = CustomWidgetContainerDirective;
|
|
5156
5212
|
exports.DEBOUNCE_TIMES = DEBOUNCE_TIMES;
|
|
5157
5213
|
exports.DISPLAY_TYPE = DISPLAY_TYPE;
|
|
5158
5214
|
exports.DataSetItem = DataSetItem;
|
|
@@ -8,19 +8,20 @@ import * as i5 from "./widgets/common/message/message.component";
|
|
|
8
8
|
import * as i6 from "./widgets/common/partial/partial.directive";
|
|
9
9
|
import * as i7 from "./widgets/common/partial-param/partial-param.directive";
|
|
10
10
|
import * as i8 from "./widgets/common/base/partial-container.directive";
|
|
11
|
-
import * as i9 from "./widgets/common/
|
|
12
|
-
import * as i10 from "./
|
|
13
|
-
import * as i11 from "./
|
|
14
|
-
import * as i12 from "./widgets/common/
|
|
15
|
-
import * as i13 from "./
|
|
16
|
-
import * as i14 from "./pipes/
|
|
17
|
-
import * as i15 from "./pipes/
|
|
18
|
-
import * as i16 from "./pipes/
|
|
19
|
-
import * as i17 from "
|
|
20
|
-
import * as i18 from "@
|
|
11
|
+
import * as i9 from "./widgets/common/base/custom-widget-container.directive";
|
|
12
|
+
import * as i10 from "./widgets/common/redraw/redrawable.directive";
|
|
13
|
+
import * as i11 from "./directives/show-in-device.directive";
|
|
14
|
+
import * as i12 from "./widgets/common/smooth-scroll/smooth-scroll.directive";
|
|
15
|
+
import * as i13 from "./widgets/common/base/text-content.directive";
|
|
16
|
+
import * as i14 from "./pipes/custom-pipes";
|
|
17
|
+
import * as i15 from "./pipes/trust-as.pipe";
|
|
18
|
+
import * as i16 from "./pipes/image.pipe";
|
|
19
|
+
import * as i17 from "./pipes/sanitize.pipe";
|
|
20
|
+
import * as i18 from "@angular/common";
|
|
21
|
+
import * as i19 from "@wm/security";
|
|
21
22
|
export declare class WmComponentsModule {
|
|
22
23
|
static forRoot(): ModuleWithProviders<WmComponentsModule>;
|
|
23
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<WmComponentsModule, never>;
|
|
24
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<WmComponentsModule, [typeof i1.ContainerDirective, typeof i2.ItemTemplateDirective, typeof i3.RepeatTemplateDirective, typeof i4.LazyLoadDirective, typeof i5.MessageComponent, typeof i6.PartialDirective, typeof i7.PartialParamHandlerDirective, typeof i7.PartialParamDirective, typeof i8.PartialContainerDirective, typeof i9.
|
|
25
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WmComponentsModule, [typeof i1.ContainerDirective, typeof i2.ItemTemplateDirective, typeof i3.RepeatTemplateDirective, typeof i4.LazyLoadDirective, typeof i5.MessageComponent, typeof i6.PartialDirective, typeof i7.PartialParamHandlerDirective, typeof i7.PartialParamDirective, typeof i8.PartialContainerDirective, typeof i9.CustomWidgetContainerDirective, typeof i10.RedrawableDirective, typeof i11.ShowInDeviceDirective, typeof i12.SmoothScrollDirective, typeof i13.TextContentDirective, typeof i14.ToDatePipe, typeof i14.FileIconClassPipe, typeof i14.FileExtensionFromMimePipe, typeof i14.FilterPipe, typeof i14.FileSizePipe, typeof i14.ToNumberPipe, typeof i14.ToCurrencyPipe, typeof i14.PrefixPipe, typeof i14.SuffixPipe, typeof i14.TimeFromNowPipe, typeof i14.NumberToStringPipe, typeof i14.StateClassPipe, typeof i14.StringToNumberPipe, typeof i14.TrailingZeroDecimalPipe, typeof i15.TrustAsPipe, typeof i16.ImagePipe, typeof i14.CustomPipe, typeof i17.SanitizePipe], [typeof i18.CommonModule, typeof i19.SecurityModule], [typeof i1.ContainerDirective, typeof i2.ItemTemplateDirective, typeof i3.RepeatTemplateDirective, typeof i4.LazyLoadDirective, typeof i5.MessageComponent, typeof i6.PartialDirective, typeof i7.PartialParamHandlerDirective, typeof i7.PartialParamDirective, typeof i8.PartialContainerDirective, typeof i9.CustomWidgetContainerDirective, typeof i10.RedrawableDirective, typeof i11.ShowInDeviceDirective, typeof i12.SmoothScrollDirective, typeof i13.TextContentDirective, typeof i14.ToDatePipe, typeof i14.FileIconClassPipe, typeof i14.FileExtensionFromMimePipe, typeof i14.FilterPipe, typeof i14.FileSizePipe, typeof i14.ToNumberPipe, typeof i14.ToCurrencyPipe, typeof i14.PrefixPipe, typeof i14.SuffixPipe, typeof i14.TimeFromNowPipe, typeof i14.NumberToStringPipe, typeof i14.StateClassPipe, typeof i14.StringToNumberPipe, typeof i14.TrailingZeroDecimalPipe, typeof i15.TrustAsPipe, typeof i16.ImagePipe, typeof i14.CustomPipe, typeof i17.SanitizePipe]>;
|
|
25
26
|
static ɵinj: i0.ɵɵInjectorDeclaration<WmComponentsModule>;
|
|
26
27
|
}
|