@wavemaker/app-ng-runtime 12.0.0-next.45032 → 12.0.0-next.45501

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +405 -451
  2. app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +2 -3
  3. app-ng-runtime/build-task/esm2022/public_api.mjs +1 -3
  4. app-ng-runtime/build-task/fesm2022/index.mjs +406 -454
  5. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  6. app-ng-runtime/build-task/public_api.d.ts +0 -2
  7. app-ng-runtime/components/base/bundles/index.umd.js +14 -62
  8. app-ng-runtime/components/base/components.module.d.ts +11 -12
  9. app-ng-runtime/components/base/esm2022/components.module.mjs +1 -5
  10. app-ng-runtime/components/base/esm2022/public_api.mjs +1 -2
  11. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +15 -25
  12. app-ng-runtime/components/base/fesm2022/index.mjs +15 -62
  13. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  14. app-ng-runtime/components/base/public_api.d.ts +0 -1
  15. app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +5 -10
  16. app-ng-runtime/components/containers/wizard/bundles/index.umd.js +17 -0
  17. app-ng-runtime/components/containers/wizard/esm2022/wizard.component.mjs +18 -1
  18. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs +17 -0
  19. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  20. app-ng-runtime/components/containers/wizard/wizard.component.d.ts +1 -0
  21. app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +1 -3
  22. app-ng-runtime/components/data/form/fesm2022/index.mjs +0 -2
  23. app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
  24. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +11 -0
  25. app-ng-runtime/components/dialogs/default/esm2022/base-dialog.mjs +12 -1
  26. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +11 -0
  27. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  28. app-ng-runtime/components/input/default/bundles/index.umd.js +63 -39
  29. app-ng-runtime/components/input/default/checkboxset/checkboxset.component.d.ts +0 -1
  30. app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +5 -8
  31. app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +5 -8
  32. app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +57 -29
  33. app-ng-runtime/components/input/default/esm2022/text/base/base-input.mjs +1 -4
  34. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +2 -2
  35. app-ng-runtime/components/input/default/esm2022/textarea/textarea.component.mjs +4 -1
  36. app-ng-runtime/components/input/default/fesm2022/index.mjs +63 -39
  37. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  38. app-ng-runtime/components/input/default/radioset/radioset.component.d.ts +0 -1
  39. app-ng-runtime/components/input/default/select/select.component.d.ts +2 -4
  40. app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +3 -2
  41. app-ng-runtime/components/input/epoch/bundles/index.umd.js +3 -0
  42. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +4 -1
  43. app-ng-runtime/components/input/epoch/fesm2022/index.mjs +3 -0
  44. app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
  45. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +31 -5
  46. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +34 -8
  47. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +32 -6
  48. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  49. app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +6 -2
  50. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +2 -2
  51. app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +2 -2
  52. app-ng-runtime/components/navigation/menu/esm2022/nav/nav.component.mjs +2 -2
  53. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +2 -2
  54. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  55. app-ng-runtime/core/bundles/index.umd.js +6 -16
  56. app-ng-runtime/core/enums/enums.d.ts +1 -2
  57. app-ng-runtime/core/esm2022/enums/enums.mjs +1 -2
  58. app-ng-runtime/core/esm2022/types/types.mjs +1 -4
  59. app-ng-runtime/core/esm2022/utils/build-utils.mjs +1 -6
  60. app-ng-runtime/core/esm2022/utils/utils.mjs +4 -3
  61. app-ng-runtime/core/fesm2022/index.mjs +4 -12
  62. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  63. app-ng-runtime/core/types/types.d.ts +1 -5
  64. app-ng-runtime/core/utils/utils.d.ts +1 -0
  65. app-ng-runtime/mobile/core/bundles/index.umd.js +18 -2
  66. app-ng-runtime/mobile/core/esm2022/native.xhr.mjs +19 -3
  67. app-ng-runtime/mobile/core/fesm2022/index.mjs +18 -2
  68. app-ng-runtime/mobile/core/fesm2022/index.mjs.map +1 -1
  69. app-ng-runtime/package.json +1 -1
  70. app-ng-runtime/runtime/base/bundles/index.umd.js +5 -288
  71. app-ng-runtime/runtime/base/esm2022/public_api.mjs +1 -2
  72. app-ng-runtime/runtime/base/esm2022/runtime-base.module.mjs +1 -6
  73. app-ng-runtime/runtime/base/esm2022/services/i18n.service.mjs +2 -2
  74. app-ng-runtime/runtime/base/esm2022/types/types.mjs +1 -2
  75. app-ng-runtime/runtime/base/fesm2022/index.mjs +4 -287
  76. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
  77. app-ng-runtime/runtime/base/public_api.d.ts +0 -1
  78. app-ng-runtime/runtime/base/runtime-base.module.d.ts +8 -9
  79. app-ng-runtime/runtime/base/types/types.d.ts +1 -2
  80. app-ng-runtime/runtime/dynamic/bundles/index.umd.js +9 -27
  81. app-ng-runtime/runtime/dynamic/esm2022/app/app.module.mjs +2 -5
  82. app-ng-runtime/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +7 -23
  83. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs +7 -26
  84. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  85. app-ng-runtime/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -1
  86. app-ng-runtime/scripts/datatable/datatable.js +6 -3
  87. app-ng-runtime/scripts/summernote/dist/summernote-lite.min.js +2 -3
  88. app-ng-runtime/transpiler/bundles/index.umd.js +0 -5
  89. app-ng-runtime/transpiler/esm2022/build.mjs +1 -4
  90. app-ng-runtime/transpiler/esm2022/imports.mjs +1 -3
  91. app-ng-runtime/transpiler/fesm2022/index.mjs +0 -5
  92. app-ng-runtime/transpiler/fesm2022/index.mjs.map +1 -1
  93. app-ng-runtime/build-task/advanced/custom-widget-container/custom-widget-container.build.d.ts +0 -2
  94. app-ng-runtime/build-task/advanced/custom-widget-wrapper/custom-widget-wrapper.build.d.ts +0 -2
  95. app-ng-runtime/build-task/esm2022/advanced/custom-widget-container/custom-widget-container.build.mjs +0 -15
  96. app-ng-runtime/build-task/esm2022/advanced/custom-widget-wrapper/custom-widget-wrapper.build.mjs +0 -26
  97. app-ng-runtime/components/advanced/custom/.npmignore +0 -2
  98. app-ng-runtime/components/advanced/custom/bundles/index.umd.js +0 -232
  99. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +0 -19
  100. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget.props.d.ts +0 -2
  101. app-ng-runtime/components/advanced/custom/custom-widget-prop.d.ts +0 -1
  102. app-ng-runtime/components/advanced/custom/custom-widget.directive.d.ts +0 -19
  103. app-ng-runtime/components/advanced/custom/custom-widget.module.d.ts +0 -10
  104. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +0 -102
  105. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget.props.mjs +0 -12
  106. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-prop.mjs +0 -8
  107. app-ng-runtime/components/advanced/custom/esm2022/custom-widget.directive.mjs +0 -68
  108. app-ng-runtime/components/advanced/custom/esm2022/custom-widget.module.mjs +0 -32
  109. app-ng-runtime/components/advanced/custom/esm2022/index.mjs +0 -5
  110. app-ng-runtime/components/advanced/custom/esm2022/public_api.mjs +0 -4
  111. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +0 -215
  112. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +0 -1
  113. app-ng-runtime/components/advanced/custom/index.d.ts +0 -5
  114. app-ng-runtime/components/advanced/custom/package.json +0 -23
  115. app-ng-runtime/components/advanced/custom/public_api.d.ts +0 -3
  116. app-ng-runtime/components/base/esm2022/widgets/common/base/custom-widget-container.directive.mjs +0 -39
  117. app-ng-runtime/components/base/widgets/common/base/custom-widget-container.directive.d.ts +0 -14
  118. app-ng-runtime/runtime/base/components/base-custom-widget.component.d.ts +0 -72
  119. app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +0 -288
@@ -1,19 +0,0 @@
1
- import { ElementRef, Injector, OnInit } from '@angular/core';
2
- import { StylableComponent } from '@wm/components/base';
3
- import * as i0 from "@angular/core";
4
- export declare class CustomWidgetContainerDirective extends StylableComponent implements OnInit {
5
- static initializeProps: void;
6
- widgetType: string;
7
- name: string;
8
- propsReady: Function;
9
- widgetName: string;
10
- private props;
11
- private baseWidgetName;
12
- constructor(inj: Injector, elRef: ElementRef, widgetname: string);
13
- setBaseWidgetName(baseWidgetType: string): void;
14
- setProps(config: any, resolveFn: Function): void;
15
- private prepareProps;
16
- updateData(key: string, value: any): void;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomWidgetContainerDirective, [null, null, { attribute: "widgetname"; }]>;
18
- static ɵdir: i0.ɵɵDirectiveDeclaration<CustomWidgetContainerDirective, "[wmWidgetContainer]", ["wmWidgetContainer"], {}, {}, never, never, false, never>;
19
- }
@@ -1,2 +0,0 @@
1
- export declare const customWidgetProps: Map<string, any>;
2
- export declare const registerProps: () => void;
@@ -1 +0,0 @@
1
- export declare const registerProps: () => void;
@@ -1,19 +0,0 @@
1
- import { AfterContentInit, Injector, OnDestroy } from '@angular/core';
2
- import { Viewport } from '@wm/core';
3
- import { StylableComponent } from '@wm/components/base';
4
- import * as i0 from "@angular/core";
5
- export declare class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {
6
- private viewport;
7
- static initializeProps: void;
8
- constructor(inj: Injector, viewport: Viewport);
9
- ngAfterContentInit(): void;
10
- processChildren(children: any, inheritedProps: {
11
- [key: string]: string;
12
- }): void;
13
- private callback;
14
- ngOnAttach(): void;
15
- ngOnDetach(): void;
16
- ngOnDestroy(): void;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomWidgetDirective, never>;
18
- static ɵdir: i0.ɵɵDirectiveDeclaration<CustomWidgetDirective, "[wmCustomWidget]", never, {}, {}, never, never, false, never>;
19
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./custom-widget-container/custom-widget-container.directive";
3
- import * as i2 from "./custom-widget.directive";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@wm/components/base";
6
- export declare class CustomModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<CustomModule, [typeof i1.CustomWidgetContainerDirective, typeof i2.CustomWidgetDirective], [typeof i3.CommonModule, typeof i4.WmComponentsModule], [typeof i1.CustomWidgetContainerDirective, typeof i2.CustomWidgetDirective]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<CustomModule>;
10
- }
@@ -1,102 +0,0 @@
1
- import { Attribute, Directive, ElementRef, Injector } from '@angular/core';
2
- import { noop } from '@wm/core';
3
- import { PROP_TYPE, provideAsWidgetRef, register, StylableComponent, styler } from '@wm/components/base';
4
- import { customWidgetProps } from './custom-widget.props';
5
- import { registerProps } from "../custom-widget-container/custom-widget.props";
6
- import { capitalize, cloneDeep } from 'lodash-es';
7
- import * as i0 from "@angular/core";
8
- const registeredPropsSet = new Set();
9
- let customWidgetPropsMap = {};
10
- const DEFAULT_CLS = 'app-html-container';
11
- export class CustomWidgetContainerDirective extends StylableComponent {
12
- static { this.initializeProps = registerProps(); }
13
- constructor(inj, elRef, widgetname) {
14
- const widgetType = `wm-custom-${widgetname}`;
15
- const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };
16
- let resolveFn = noop;
17
- super(inj, WIDGET_CONFIG, undefined, new Promise(res => resolveFn = res));
18
- this.props = {};
19
- this.propsReady = resolveFn;
20
- this.widgetType = widgetType;
21
- this.name = elRef.nativeElement.getAttribute('name');
22
- styler(this.nativeElement, this);
23
- // Call on property change on name to set name attribute on element.
24
- this.registerReadyStateListener(() => {
25
- super.onPropertyChange('name', this.name);
26
- });
27
- this.registerPropertyChangeListener(((key, nv, ov) => {
28
- if (!key.startsWith('prop-'))
29
- return;
30
- const propName = key.slice(5);
31
- if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {
32
- this.props[propName] = nv;
33
- }
34
- }));
35
- }
36
- setBaseWidgetName(baseWidgetType) {
37
- let splitArr = baseWidgetType.split('-'), modifiedArr = [];
38
- modifiedArr = splitArr.map((item) => {
39
- item = item !== 'wm' ? capitalize(item) : item;
40
- return item;
41
- });
42
- this.baseWidgetName = modifiedArr.join('');
43
- }
44
- setProps(config, resolveFn) {
45
- this.setBaseWidgetName(config.widgetType);
46
- if (!config || !config.properties) {
47
- return;
48
- }
49
- if (!registeredPropsSet.has(this.widgetType)) {
50
- register(this.widgetType, this.prepareProps(config.properties));
51
- }
52
- else {
53
- this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]));
54
- }
55
- this.propsReady(resolveFn);
56
- }
57
- prepareProps(props = {}) {
58
- const propsMap = new Map(customWidgetProps);
59
- Object.entries(props).forEach(([k, v]) => {
60
- let type = PROP_TYPE.STRING;
61
- if (v.type === 'boolean') {
62
- type = PROP_TYPE.BOOLEAN;
63
- }
64
- else if (v.type === 'number') {
65
- type = PROP_TYPE.NUMBER;
66
- }
67
- else if (v.type !== 'string') {
68
- type = v.type;
69
- }
70
- // Do not set the 'bind:*' values
71
- propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });
72
- this.props[k] = v.value;
73
- });
74
- registeredPropsSet.add(this.widgetType);
75
- customWidgetPropsMap[this.widgetType] = this.props;
76
- return propsMap;
77
- }
78
- updateData(key, value) {
79
- let modifiedKey = key.replace('base-', '');
80
- this[this.baseWidgetName][modifiedKey] = value;
81
- this.nativeElement.childNodes[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;
82
- this[this.baseWidgetName].initDatasetItems();
83
- }
84
- static { this.ɵfac = function CustomWidgetContainerDirective_Factory(t) { return new (t || CustomWidgetContainerDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵinjectAttribute('widgetname')); }; }
85
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetContainerDirective, selectors: [["", "wmWidgetContainer", ""]], exportAs: ["wmWidgetContainer"], features: [i0.ɵɵProvidersFeature([
86
- provideAsWidgetRef(CustomWidgetContainerDirective)
87
- ]), i0.ɵɵInheritDefinitionFeature] }); }
88
- }
89
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetContainerDirective, [{
90
- type: Directive,
91
- args: [{
92
- selector: '[wmWidgetContainer]',
93
- providers: [
94
- provideAsWidgetRef(CustomWidgetContainerDirective)
95
- ],
96
- exportAs: 'wmWidgetContainer'
97
- }]
98
- }], () => [{ type: i0.Injector }, { type: i0.ElementRef }, { type: undefined, decorators: [{
99
- type: Attribute,
100
- args: ['widgetname']
101
- }] }], null); })();
102
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLmpzI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WFwID0gbmV3IE1hcChjdXN0b21XaWRnZXRQcm9wcyk7XG4gICAgICAgIE9iamVjdC5lbnRyaWVzKHByb3BzKS5mb3JFYWNoKChbaywgdl06IFtzdHJpbmcsIGFueV0pID0+IHtcbiAgICAgICAgICAgIGxldCB0eXBlID0gUFJPUF9UWVBFLlNUUklORztcblxuICAgICAgICAgICAgaWYgKHYudHlwZSA9PT0gJ2Jvb2xlYW4nKSB7XG4gICAgICAgICAgICAgICAgdHlwZSA9IFBST1BfVFlQRS5CT09MRUFOO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnR5cGUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgdHlwZSA9IFBST1BfVFlQRS5OVU1CRVI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudHlwZSAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICB0eXBlID0gdi50eXBlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBEbyBub3Qgc2V0IHRoZSAnYmluZDoqJyB2YWx1ZXNcbiAgICAgICAgICAgIHByb3BzTWFwLnNldChgcHJvcC0ke2t9YCwgeyB0eXBlLCB2YWx1ZTogXy5zdGFydHNXaXRoKHYudmFsdWUsICdiaW5kOicpID8gdW5kZWZpbmVkIDogdi52YWx1ZSB9KTtcbiAgICAgICAgICAgIHRoaXMucHJvcHNba10gPSB2LnZhbHVlO1xuICAgICAgICB9KTtcblxuICAgICAgICByZWdpc3RlcmVkUHJvcHNTZXQuYWRkKHRoaXMud2lkZ2V0VHlwZSk7XG4gICAgICAgIGN1c3RvbVdpZGdldFByb3BzTWFwW3RoaXMud2lkZ2V0VHlwZV0gPSB0aGlzLnByb3BzXG5cbiAgICAgICAgcmV0dXJuIHByb3BzTWFwO1xuICAgIH1cblxuICAgIHVwZGF0ZURhdGEoa2V5OiBzdHJpbmcsIHZhbHVlOiBhbnkpIHtcbiAgICAgICAgbGV0IG1vZGlmaWVkS2V5ID0ga2V5LnJlcGxhY2UoJ2Jhc2UtJywgJycpO1xuICAgICAgICB0aGlzW3RoaXMuYmFzZVdpZGdldE5hbWVdW21vZGlmaWVkS2V5XSA9IHZhbHVlO1xuICAgICAgICB0aGlzLm5hdGl2ZUVsZW1lbnQuY2hpbGROb2Rlc1swXVsnd2lkZ2V0J10udmlld1BhcmVudFt0aGlzLmJhc2VXaWRnZXROYW1lXVttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgdGhpc1t0aGlzLmJhc2VXaWRnZXROYW1lXS5pbml0RGF0YXNldEl0ZW1zKCk7XG4gICAgfVxufVxuIl19
@@ -1,12 +0,0 @@
1
- import { PROP_BOOLEAN, PROP_STRING, register } from '@wm/components/base';
2
- export const customWidgetProps = new Map([
3
- ['class', PROP_STRING],
4
- ['hint', PROP_STRING],
5
- ['name', PROP_STRING],
6
- ['widgetname', PROP_STRING],
7
- ['show', { value: true, ...PROP_BOOLEAN }]
8
- ]);
9
- export const registerProps = () => {
10
- register('wm-custom-widget', customWidgetProps);
11
- };
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC5wcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvd2lkZ2V0cy9hZHZhbmNlZC9jdXN0b20vc3JjL2N1c3RvbS13aWRnZXQtY29udGFpbmVyL2N1c3RvbS13aWRnZXQucHJvcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFlBQVksRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFDLE1BQU0scUJBQXFCLENBQUM7QUFFeEUsTUFBTSxDQUFDLE1BQU0saUJBQWlCLEdBQzFCLElBQUksR0FBRyxDQUNIO0lBQ0ksQ0FBQyxPQUFPLEVBQUUsV0FBVyxDQUFDO0lBQ3RCLENBQ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
- export const registerProps = () => {
3
- register('wm-custom-widget-container', new Map([
4
- ['name', PROP_STRING],
5
- ['class', PROP_STRING]
6
- ]));
7
- };
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC1wcm9wLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy93aWRnZXRzL2FkdmFuY2VkL2N1c3RvbS9zcmMvY3VzdG9tLXdpZGdldC1wcm9wLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxXQUFXLEVBQUUsUUFBUSxFQUFDLE1BQU0scUJBQXFCLENBQUM7QUFFMUQsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHLEdBQUcsRUFBRTtJQUM5QixRQUFRLENBQ0osNEJBQTRCLEVBQzVCLElBQUksR0FBRyxDQUNIO1FBQ0ksQ0FBQyxNQUFNLEVBQUUsV0FBVyxDQUFDO1FBQ3JCLENBQUMsT0FBTyxFQUFFLFdBQVcsQ0FBQztLQUN6QixDQUNKLENBQ0osQ0FBQztBQUNOLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7UFJPUF9TVFJJTkcsIHJlZ2lzdGVyfSBmcm9tICdAd20vY29tcG9uZW50cy9iYXNlJztcblxuZXhwb3J0IGNvbnN0IHJlZ2lzdGVyUHJvcHMgPSAoKSA9PiB7XG4gICAgcmVnaXN0ZXIoXG4gICAgICAgICd3bS1jdXN0b20td2lkZ2V0LWNvbnRhaW5lcicsXG4gICAgICAgIG5ldyBNYXAoXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgWyduYW1lJywgUFJPUF9TVFJJTkddLFxuICAgICAgICAgICAgICAgIFsnY2xhc3MnLCBQUk9QX1NUUklOR11cbiAgICAgICAgICAgIF1cbiAgICAgICAgKVxuICAgICk7XG59O1xuIl19
@@ -1,68 +0,0 @@
1
- import { Directive, Injector } from '@angular/core';
2
- import { Viewport } from '@wm/core';
3
- import { registerProps } from './custom-widget-prop';
4
- import { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@wm/core";
7
- const DEFAULT_CLS = 'app-custom-widget-container clearfix';
8
- const WIDGET_CONFIG = { widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS };
9
- export class CustomWidgetDirective extends StylableComponent {
10
- static { this.initializeProps = registerProps(); }
11
- constructor(inj, viewport) {
12
- super(inj, WIDGET_CONFIG);
13
- this.viewport = viewport;
14
- this.registerDestroyListener(this.viewport.subscribe("resize" /* ViewportEvent.RESIZE */, data => this.callback('resize', data)));
15
- this.registerDestroyListener(this.viewport.subscribe("orientationchange" /* ViewportEvent.ORIENTATION_CHANGE */, data => this.callback('orientationchange', data)));
16
- }
17
- ngAfterContentInit() {
18
- let customWidget = this.nativeElement.closest('[customwidgetcontainer]'), inheritedProps = {}, customWidgetProps = Array.from(getWidgetPropsByType("wm-custom-widget-container").keys());
19
- for (let i = 0; i < customWidget.attributes.length; i++) {
20
- let attr = customWidget.attributes.item(i);
21
- if (attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))
22
- inheritedProps[attr.name] = attr.value;
23
- }
24
- this.processChildren(this.nativeElement.children, inheritedProps);
25
- }
26
- processChildren(children, inheritedProps) {
27
- Array.from(children).forEach((child) => {
28
- if (!child.hasAttribute('base-widget'))
29
- this.processChildren(child.children, inheritedProps);
30
- else {
31
- for (const [key, value] of Object.entries(inheritedProps)) {
32
- if (key.includes(".event") || key.includes('.bind'))
33
- this.processAttr(key, value, { widget: child.widget, nativeElement: child });
34
- else
35
- child.widget[key] = value;
36
- }
37
- }
38
- });
39
- }
40
- callback(eventName, locals) {
41
- locals = _.assign({ widget: this }, locals);
42
- this.invokeEventCallback(eventName, locals);
43
- }
44
- ngOnAttach() {
45
- this.callback('attach');
46
- }
47
- ngOnDetach() {
48
- this.callback('detach');
49
- }
50
- ngOnDestroy() {
51
- this.callback('destroy');
52
- super.ngOnDestroy();
53
- }
54
- static { this.ɵfac = function CustomWidgetDirective_Factory(t) { return new (t || CustomWidgetDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.Viewport)); }; }
55
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetDirective, selectors: [["", "wmCustomWidget", ""]], features: [i0.ɵɵProvidersFeature([
56
- provideAsWidgetRef(CustomWidgetDirective)
57
- ]), i0.ɵɵInheritDefinitionFeature] }); }
58
- }
59
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetDirective, [{
60
- type: Directive,
61
- args: [{
62
- selector: '[wmCustomWidget]',
63
- providers: [
64
- provideAsWidgetRef(CustomWidgetDirective)
65
- ]
66
- }]
67
- }], () => [{ type: i0.Injector }, { type: i1.Viewport }], null); })();
68
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL3dpZGdldHMvYWR2YW5jZWQvY3VzdG9tL3NyYy9jdXN0b20td2lkZ2V0LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQW9CLFNBQVMsRUFBYyxRQUFRLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBRXZHLE9BQU8sRUFBQyxRQUFRLEVBQWdCLE1BQU0sVUFBVSxDQUFDO0FBQ2pELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsa0JBQWtC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AgIH1cblxuICAgIHByaXZhdGUgY2FsbGJhY2soZXZlbnROYW1lLCBsb2NhbHM/OiBvYmplY3QpIHtcbiAgICAgICAgbG9jYWxzID0gXy5hc3NpZ24oeyB3aWRnZXQ6IHRoaXMgfSwgbG9jYWxzKTtcbiAgICAgICAgdGhpcy5pbnZva2VFdmVudENhbGxiYWNrKGV2ZW50TmFtZSwgbG9jYWxzKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgbmdPbkF0dGFjaCgpIHtcbiAgICAgICAgdGhpcy5jYWxsYmFjaygnYXR0YWNoJyk7XG4gICAgfVxuXG4gICAgcHVibGljIG5nT25EZXRhY2goKSB7XG4gICAgICAgIHRoaXMuY2FsbGJhY2soJ2RldGFjaCcpO1xuICAgIH1cblxuICAgIHB1YmxpYyBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy5jYWxsYmFjaygnZGVzdHJveScpO1xuICAgICAgICBzdXBlci5uZ09uRGVzdHJveSgpO1xuICAgIH1cblxufVxuIl19
@@ -1,32 +0,0 @@
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 { CustomWidgetDirective } from './custom-widget.directive';
6
- import * as i0 from "@angular/core";
7
- const components = [
8
- CustomWidgetContainerDirective,
9
- CustomWidgetDirective
10
- ];
11
- export class CustomModule {
12
- static { this.ɵfac = function CustomModule_Factory(t) { return new (t || CustomModule)(); }; }
13
- static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CustomModule }); }
14
- static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
15
- WmComponentsModule] }); }
16
- }
17
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomModule, [{
18
- type: NgModule,
19
- args: [{
20
- imports: [
21
- CommonModule,
22
- WmComponentsModule
23
- ],
24
- declarations: [...components],
25
- exports: [...components]
26
- }]
27
- }], null, null); })();
28
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CustomModule, { declarations: [CustomWidgetContainerDirective,
29
- CustomWidgetDirective], imports: [CommonModule,
30
- WmComponentsModule], exports: [CustomWidgetContainerDirective,
31
- CustomWidgetDirective] }); })();
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL3dpZGdldHMvYWR2YW5jZWQvY3VzdG9tL3NyYy9jdXN0b20td2lkZ2V0Lm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUUvQyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUV6RCxPQUFPLEVBQUUsOEJBQThCLEVBQUUsTUFBTSw2REFBNkQsQ0FBQztBQUM3RyxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTs7QUFDakUsTUFBTSxVQUFVLEdBQUc7SUFDZiw4QkFBOEI7SUFDOUIscUJBQXFCO0NBQ3hCLENBQUM7QUFVRixNQUFNLE9BQU8sWUFBWTs2RUFBWixZQUFZO21FQUFaLFlBQVk7dUVBTmpCLFlBQVk7WUFDWixrQkFBa0I7O2lGQUtiLFlBQVk7Y0FSeEIsUUFBUTtlQUFDO2dCQUNOLE9BQU8sRUFBRTtvQkFDTCxZQUFZO29CQUNaLGtCQUFrQjtpQkFDckI7Z0JBQ0QsWUFBWSxFQUF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,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public_api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL3dpZGdldHMvYWR2YW5jZWQvY3VzdG9tL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19
@@ -1,4 +0,0 @@
1
- export * from './custom-widget.module';
2
- export * from './custom-widget-container/custom-widget-container.directive';
3
- export * from './custom-widget.directive';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvd2lkZ2V0cy9hZHZhbmNlZC9jdXN0b20vc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLDZEQUE2RCxDQUFDO0FBQzVFLGNBQWMsMkJBQTJCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2N1c3RvbS13aWRnZXQubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vY3VzdG9tLXdpZGdldC1jb250YWluZXIvY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vY3VzdG9tLXdpZGdldC5kaXJlY3RpdmUnXG4iXX0=
@@ -1,215 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive, Attribute, NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { PROP_STRING, PROP_BOOLEAN, register, StylableComponent, styler, PROP_TYPE, provideAsWidgetRef, getWidgetPropsByType, WmComponentsModule } from '@wm/components/base';
5
- import * as i1 from '@wm/core';
6
- import { noop } from '@wm/core';
7
- import { capitalize, cloneDeep } from 'lodash-es';
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
- const registerProps$1 = () => {
17
- register('wm-custom-widget', customWidgetProps);
18
- };
19
-
20
- const registeredPropsSet = new Set();
21
- let customWidgetPropsMap = {};
22
- const DEFAULT_CLS$1 = 'app-html-container';
23
- class CustomWidgetContainerDirective extends StylableComponent {
24
- static { this.initializeProps = registerProps$1(); }
25
- constructor(inj, elRef, widgetname) {
26
- const widgetType = `wm-custom-${widgetname}`;
27
- const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS$1 };
28
- let resolveFn = noop;
29
- super(inj, WIDGET_CONFIG, undefined, new Promise(res => resolveFn = res));
30
- this.props = {};
31
- this.propsReady = resolveFn;
32
- this.widgetType = widgetType;
33
- this.name = elRef.nativeElement.getAttribute('name');
34
- styler(this.nativeElement, this);
35
- // Call on property change on name to set name attribute on element.
36
- this.registerReadyStateListener(() => {
37
- super.onPropertyChange('name', this.name);
38
- });
39
- this.registerPropertyChangeListener(((key, nv, ov) => {
40
- if (!key.startsWith('prop-'))
41
- return;
42
- const propName = key.slice(5);
43
- if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {
44
- this.props[propName] = nv;
45
- }
46
- }));
47
- }
48
- setBaseWidgetName(baseWidgetType) {
49
- let splitArr = baseWidgetType.split('-'), modifiedArr = [];
50
- modifiedArr = splitArr.map((item) => {
51
- item = item !== 'wm' ? capitalize(item) : item;
52
- return item;
53
- });
54
- this.baseWidgetName = modifiedArr.join('');
55
- }
56
- setProps(config, resolveFn) {
57
- this.setBaseWidgetName(config.widgetType);
58
- if (!config || !config.properties) {
59
- return;
60
- }
61
- if (!registeredPropsSet.has(this.widgetType)) {
62
- register(this.widgetType, this.prepareProps(config.properties));
63
- }
64
- else {
65
- this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]));
66
- }
67
- this.propsReady(resolveFn);
68
- }
69
- prepareProps(props = {}) {
70
- const propsMap = new Map(customWidgetProps);
71
- Object.entries(props).forEach(([k, v]) => {
72
- let type = PROP_TYPE.STRING;
73
- if (v.type === 'boolean') {
74
- type = PROP_TYPE.BOOLEAN;
75
- }
76
- else if (v.type === 'number') {
77
- type = PROP_TYPE.NUMBER;
78
- }
79
- else if (v.type !== 'string') {
80
- type = v.type;
81
- }
82
- // Do not set the 'bind:*' values
83
- propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });
84
- this.props[k] = v.value;
85
- });
86
- registeredPropsSet.add(this.widgetType);
87
- customWidgetPropsMap[this.widgetType] = this.props;
88
- return propsMap;
89
- }
90
- updateData(key, value) {
91
- let modifiedKey = key.replace('base-', '');
92
- this[this.baseWidgetName][modifiedKey] = value;
93
- this.nativeElement.childNodes[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;
94
- this[this.baseWidgetName].initDatasetItems();
95
- }
96
- static { this.ɵfac = function CustomWidgetContainerDirective_Factory(t) { return new (t || CustomWidgetContainerDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵinjectAttribute('widgetname')); }; }
97
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetContainerDirective, selectors: [["", "wmWidgetContainer", ""]], exportAs: ["wmWidgetContainer"], features: [i0.ɵɵProvidersFeature([
98
- provideAsWidgetRef(CustomWidgetContainerDirective)
99
- ]), i0.ɵɵInheritDefinitionFeature] }); }
100
- }
101
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetContainerDirective, [{
102
- type: Directive,
103
- args: [{
104
- selector: '[wmWidgetContainer]',
105
- providers: [
106
- provideAsWidgetRef(CustomWidgetContainerDirective)
107
- ],
108
- exportAs: 'wmWidgetContainer'
109
- }]
110
- }], () => [{ type: i0.Injector }, { type: i0.ElementRef }, { type: undefined, decorators: [{
111
- type: Attribute,
112
- args: ['widgetname']
113
- }] }], null); })();
114
-
115
- const registerProps = () => {
116
- register('wm-custom-widget-container', new Map([
117
- ['name', PROP_STRING],
118
- ['class', PROP_STRING]
119
- ]));
120
- };
121
-
122
- const DEFAULT_CLS = 'app-custom-widget-container clearfix';
123
- const WIDGET_CONFIG = { widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS };
124
- class CustomWidgetDirective extends StylableComponent {
125
- static { this.initializeProps = registerProps(); }
126
- constructor(inj, viewport) {
127
- super(inj, WIDGET_CONFIG);
128
- this.viewport = viewport;
129
- this.registerDestroyListener(this.viewport.subscribe("resize" /* ViewportEvent.RESIZE */, data => this.callback('resize', data)));
130
- this.registerDestroyListener(this.viewport.subscribe("orientationchange" /* ViewportEvent.ORIENTATION_CHANGE */, data => this.callback('orientationchange', data)));
131
- }
132
- ngAfterContentInit() {
133
- let customWidget = this.nativeElement.closest('[customwidgetcontainer]'), inheritedProps = {}, customWidgetProps = Array.from(getWidgetPropsByType("wm-custom-widget-container").keys());
134
- for (let i = 0; i < customWidget.attributes.length; i++) {
135
- let attr = customWidget.attributes.item(i);
136
- if (attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))
137
- inheritedProps[attr.name] = attr.value;
138
- }
139
- this.processChildren(this.nativeElement.children, inheritedProps);
140
- }
141
- processChildren(children, inheritedProps) {
142
- Array.from(children).forEach((child) => {
143
- if (!child.hasAttribute('base-widget'))
144
- this.processChildren(child.children, inheritedProps);
145
- else {
146
- for (const [key, value] of Object.entries(inheritedProps)) {
147
- if (key.includes(".event") || key.includes('.bind'))
148
- this.processAttr(key, value, { widget: child.widget, nativeElement: child });
149
- else
150
- child.widget[key] = value;
151
- }
152
- }
153
- });
154
- }
155
- callback(eventName, locals) {
156
- locals = _.assign({ widget: this }, locals);
157
- this.invokeEventCallback(eventName, locals);
158
- }
159
- ngOnAttach() {
160
- this.callback('attach');
161
- }
162
- ngOnDetach() {
163
- this.callback('detach');
164
- }
165
- ngOnDestroy() {
166
- this.callback('destroy');
167
- super.ngOnDestroy();
168
- }
169
- static { this.ɵfac = function CustomWidgetDirective_Factory(t) { return new (t || CustomWidgetDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.Viewport)); }; }
170
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetDirective, selectors: [["", "wmCustomWidget", ""]], features: [i0.ɵɵProvidersFeature([
171
- provideAsWidgetRef(CustomWidgetDirective)
172
- ]), i0.ɵɵInheritDefinitionFeature] }); }
173
- }
174
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetDirective, [{
175
- type: Directive,
176
- args: [{
177
- selector: '[wmCustomWidget]',
178
- providers: [
179
- provideAsWidgetRef(CustomWidgetDirective)
180
- ]
181
- }]
182
- }], () => [{ type: i0.Injector }, { type: i1.Viewport }], null); })();
183
-
184
- const components = [
185
- CustomWidgetContainerDirective,
186
- CustomWidgetDirective
187
- ];
188
- class CustomModule {
189
- static { this.ɵfac = function CustomModule_Factory(t) { return new (t || CustomModule)(); }; }
190
- static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CustomModule }); }
191
- static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
192
- WmComponentsModule] }); }
193
- }
194
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomModule, [{
195
- type: NgModule,
196
- args: [{
197
- imports: [
198
- CommonModule,
199
- WmComponentsModule
200
- ],
201
- declarations: [...components],
202
- exports: [...components]
203
- }]
204
- }], null, null); })();
205
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CustomModule, { declarations: [CustomWidgetContainerDirective,
206
- CustomWidgetDirective], imports: [CommonModule,
207
- WmComponentsModule], exports: [CustomWidgetContainerDirective,
208
- CustomWidgetDirective] }); })();
209
-
210
- /**
211
- * Generated bundle index. Do not edit.
212
- */
213
-
214
- export { CustomModule, CustomWidgetContainerDirective, CustomWidgetDirective };
215
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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, Injector, OnInit } from '@angular/core';\n\nimport { noop } from '@wm/core';\nimport { PROP_TYPE, 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';\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 provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends StylableComponent implements OnInit {\n static initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n private props: any = {};\n private baseWidgetName: string;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\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, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\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 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.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 updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.childNodes[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\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\") || 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;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AAS;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,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@wm/components/advanced/custom" />
5
- export * from './public_api';
@@ -1,23 +0,0 @@
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
- }