@wavemaker/app-ng-runtime 11.14.1-3.6306 → 11.14.1-30.647738
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.
- package/components/base/bundles/index.umd.js +17 -87
- package/components/base/esm2022/pipes/custom-pipes.mjs +10 -10
- package/components/base/esm2022/utils/widget-utils.mjs +3 -3
- package/components/base/esm2022/widgets/common/base/base.component.mjs +7 -68
- package/components/base/esm2022/widgets/common/lazy-load/lazy-load.directive.mjs +3 -7
- package/components/base/esm2022/widgets/framework/property-change-handler.mjs +2 -7
- package/components/base/fesm2022/index.mjs +18 -88
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/pipes/custom-pipes.d.ts +5 -5
- package/components/basic/label/bundles/index.umd.js +1 -9
- package/components/basic/label/esm2022/label.directive.mjs +2 -10
- package/components/basic/label/fesm2022/index.mjs +1 -9
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/data/table/bundles/index.umd.js +11 -218
- package/components/data/table/esm2022/table.component.mjs +12 -219
- package/components/data/table/fesm2022/index.mjs +11 -218
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/table.component.d.ts +2 -6
- package/components/navigation/menu/bundles/index.umd.js +0 -5
- package/components/navigation/menu/esm2022/menu.component.mjs +1 -6
- package/components/navigation/menu/fesm2022/index.mjs +0 -5
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/bundles/index.umd.js +6 -6
- package/components/navigation/popover/esm2022/popover.component.mjs +4 -4
- package/components/navigation/popover/fesm2022/index.mjs +3 -3
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/popover.component.d.ts +0 -6
- package/core/bundles/index.umd.js +82 -332
- package/core/esm2022/public_api.mjs +3 -3
- package/core/esm2022/utils/utils.mjs +2 -6
- package/core/esm2022/utils/watcher.mjs +81 -323
- package/core/fesm2022/index.mjs +84 -331
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/public_api.d.ts +2 -2
- package/core/utils/utils.d.ts +0 -1
- package/core/utils/watcher.d.ts +5 -26
- package/locales/moment-timezone/moment-timezone-with-data.js +10 -10
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +2 -37
- package/runtime/base/esm2022/components/app-component/app.component.mjs +2 -7
- package/runtime/base/esm2022/components/base-page.component.mjs +2 -9
- package/runtime/base/esm2022/components/base-partial.component.mjs +2 -10
- package/runtime/base/esm2022/components/base-prefab.component.mjs +2 -10
- package/runtime/base/esm2022/components/base-spa-page.component.mjs +2 -9
- package/runtime/base/esm2022/services/pipe-provider.service.mjs +4 -4
- package/runtime/base/fesm2022/index.mjs +3 -38
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/scripts/datatable/datatable.js +2 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { DatePipe, DecimalPipe } from '@angular/common';
|
|
3
|
-
import { AbstractI18nService,
|
|
3
|
+
import { AbstractI18nService, CustomPipeManager } from '@wm/core';
|
|
4
4
|
import { WmPipe } from "./wm-pipe";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TrailingZeroDecimalPipe implements PipeTransform {
|
|
@@ -13,11 +13,11 @@ export declare class TrailingZeroDecimalPipe implements PipeTransform {
|
|
|
13
13
|
export declare class ToDatePipe extends WmPipe implements PipeTransform {
|
|
14
14
|
private datePipe;
|
|
15
15
|
private i18nService;
|
|
16
|
-
private app;
|
|
17
16
|
protected customPipeManager: CustomPipeManager;
|
|
17
|
+
private app;
|
|
18
18
|
returnFn(data: any, args: any, variables: any): any;
|
|
19
19
|
transform(data: any, format: any, timezone?: any, compInstance?: any): any;
|
|
20
|
-
constructor(datePipe: DatePipe, i18nService: AbstractI18nService,
|
|
20
|
+
constructor(datePipe: DatePipe, i18nService: AbstractI18nService, customPipeManager: CustomPipeManager);
|
|
21
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToDatePipe, never>;
|
|
22
22
|
static ɵpipe: i0.ɵɵPipeDeclaration<ToDatePipe, "toDate", true>;
|
|
23
23
|
}
|
|
@@ -51,9 +51,9 @@ export declare class SuffixPipe implements PipeTransform {
|
|
|
51
51
|
* Custom pipe: It is work as interceptor between the user custom pipe function and angular pipe
|
|
52
52
|
*/
|
|
53
53
|
export declare class CustomPipe implements PipeTransform {
|
|
54
|
-
private app;
|
|
55
54
|
private custmeUserPipe;
|
|
56
|
-
|
|
55
|
+
private app;
|
|
56
|
+
constructor(custmeUserPipe: CustomPipeManager);
|
|
57
57
|
transform(data: any, pipename: any): any;
|
|
58
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomPipe, never>;
|
|
59
59
|
static ɵpipe: i0.ɵɵPipeDeclaration<CustomPipe, "custom", true>;
|
|
@@ -54,9 +54,6 @@
|
|
|
54
54
|
i1.styler(this.nativeElement, this);
|
|
55
55
|
}
|
|
56
56
|
onPropertyChange(key, nv, ov) {
|
|
57
|
-
if (this.isDestroyed) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
57
|
if (key === 'caption') {
|
|
61
58
|
// Check for trustPipe safe values
|
|
62
59
|
let bindContent = this.nativeElement.getAttribute('caption.bind');
|
|
@@ -75,12 +72,7 @@
|
|
|
75
72
|
core.setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
76
73
|
}
|
|
77
74
|
else {
|
|
78
|
-
|
|
79
|
-
core.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), i0.SecurityContext.HTML));
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
core.setProperty(this.nativeElement, 'textContent', insertZWSP(nv));
|
|
83
|
-
}
|
|
75
|
+
core.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), i0.SecurityContext.HTML));
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
78
|
else if (key === 'required') {
|
|
@@ -19,9 +19,6 @@ export class LabelDirective extends StylableComponent {
|
|
|
19
19
|
styler(this.nativeElement, this);
|
|
20
20
|
}
|
|
21
21
|
onPropertyChange(key, nv, ov) {
|
|
22
|
-
if (this.isDestroyed) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
22
|
if (key === 'caption') {
|
|
26
23
|
// Check for trustPipe safe values
|
|
27
24
|
let bindContent = this.nativeElement.getAttribute('caption.bind');
|
|
@@ -40,12 +37,7 @@ export class LabelDirective extends StylableComponent {
|
|
|
40
37
|
setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
41
38
|
}
|
|
42
39
|
else {
|
|
43
|
-
|
|
44
|
-
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
setProperty(this.nativeElement, 'textContent', insertZWSP(nv));
|
|
48
|
-
}
|
|
40
|
+
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));
|
|
49
41
|
}
|
|
50
42
|
}
|
|
51
43
|
else if (key === 'required') {
|
|
@@ -76,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
76
68
|
}, {
|
|
77
69
|
type: Optional
|
|
78
70
|
}] }] });
|
|
79
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFiZWwuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy93aWRnZXRzL2Jhc2ljL2xhYmVsL3NyYy9sYWJlbC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5nc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GluaiwgV0lER0VUX0NPTkZJRywgZXhwbGljaXRDb250ZXh0KTtcblxuICAgICAgICBzdHlsZXIodGhpcy5uYXRpdmVFbGVtZW50LCB0aGlzKTtcbiAgICB9XG5cbiAgICBvblByb3BlcnR5Q2hhbmdlKGtleSwgbnYsIG92Pykge1xuXG4gICAgICAgIGlmIChrZXkgPT09ICdjYXB0aW9uJykge1xuICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIHRydXN0UGlwZSBzYWZlIHZhbHVlc1xuICAgICAgICAgICAgbGV0IGJpbmRDb250ZW50ID0gdGhpcy5uYXRpdmVFbGVtZW50LmdldEF0dHJpYnV0ZSgnY2FwdGlvbi5iaW5kJyk7XG4gICAgICAgICAgICBsZXQgc2FmZVZhbHVlID0gYmluZENvbnRlbnQgPyBudiAmJiBiaW5kQ29udGVudC5pbmNsdWRlcygndHJ1c3RBczonKSA6IGZhbHNlO1xuICAgICAgICAgICAgY29uc3QgaW5zZXJ0WldTUCA9ICh2YWx1ZTogYW55KTogc3RyaW5nID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlICE9PSAnc3RyaW5nJykgcmV0dXJuIHZhbHVlO1xuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZS5yZXBsYWNlKC9cXGR7NSx9L2csIChtYXRjaCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2gucmVwbGFjZSgvKC57OX0pKD89LikvZywgJyQxXFx1MjAwQicpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChpc09iamVjdChudikgJiYgIXNhZmVWYWx1ZSkge1xuICAgICAgICAgICAgICAgIHNldFByb3BlcnR5KHRoaXMubmF0aXZlRWxlbWVudCwgJ3RleHRDb250ZW50JywgSlNPTi5zdHJpbmdpZnkobnYpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNPYmplY3QobnYpICYmIHNhZmVWYWx1ZSkge1xuICAgICAgICAgICAgICAgIHNldFByb3BlcnR5KHRoaXMubmF0aXZlRWxlbWVudCwgJ2lubmVySFRNTCcsIG52W09iamVjdC5rZXlzKG52KVswXV0pO1xuICAgICAgICAgICAgfSAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2V0UHJvcGVydHkodGhpcy5uYXRpdmVFbGVtZW50LCAnaW5uZXJIVE1MJywgdGhpcy5zYW5pdGl6ZVBpcGUudHJhbnNmb3JtKGluc2VydFpXU1AobnYpLCBTZWN1cml0eUNvbnRleHQuSFRNTCkpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAncmVxdWlyZWQnKSB7XG4gICAgICAgICAgICB0b2dnbGVDbGFzcyh0aGlzLm5hdGl2ZUVsZW1lbnQsICdyZXF1aXJlZCcsIG52KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHN1cGVyLm9uUHJvcGVydHlDaGFuZ2Uoa2V5LCBudiwgb3YpO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -35,9 +35,6 @@ class LabelDirective extends StylableComponent {
|
|
|
35
35
|
styler(this.nativeElement, this);
|
|
36
36
|
}
|
|
37
37
|
onPropertyChange(key, nv, ov) {
|
|
38
|
-
if (this.isDestroyed) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
38
|
if (key === 'caption') {
|
|
42
39
|
// Check for trustPipe safe values
|
|
43
40
|
let bindContent = this.nativeElement.getAttribute('caption.bind');
|
|
@@ -56,12 +53,7 @@ class LabelDirective extends StylableComponent {
|
|
|
56
53
|
setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
|
|
57
54
|
}
|
|
58
55
|
else {
|
|
59
|
-
|
|
60
|
-
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
setProperty(this.nativeElement, 'textContent', insertZWSP(nv));
|
|
64
|
-
}
|
|
56
|
+
setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));
|
|
65
57
|
}
|
|
66
58
|
}
|
|
67
59
|
else if (key === 'required') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/label/src/label.props.ts","../../../../../projects/components/widgets/basic/label/src/label.directive.ts","../../../../../projects/components/widgets/basic/label/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-label',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', {value: 'Label', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['type', PROP_STRING],\n ['notag', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['required', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, Optional, SecurityContext} from '@angular/core';\n\nimport {setProperty, toggleClass} from '@wm/core';\nimport {\n DISPLAY_TYPE,\n IWidgetConfig,\n provideAsWidgetRef,\n SanitizePipe,\n StylableComponent,\n styler\n} from '@wm/components/base';\n\nimport {registerProps} from './label.props';\nimport {isObject} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-label';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-label',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Directive({\n standalone: true,\n selector: '[wmLabel]',\n providers: [\n provideAsWidgetRef(LabelDirective)\n ],\n exportAs: 'wmLabel'\n})\nexport class LabelDirective extends StylableComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private sanitizePipe:SanitizePipe, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov?) {\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/basic/label/src/label.props.ts","../../../../../projects/components/widgets/basic/label/src/label.directive.ts","../../../../../projects/components/widgets/basic/label/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-label',\n new Map(\n [\n ['animation', PROP_STRING],\n ['caption', {value: 'Label', ...PROP_STRING}],\n ['class', PROP_STRING],\n ['conditionalclass', PROP_ANY],\n ['conditionalstyle', PROP_ANY],\n ['type', PROP_STRING],\n ['notag', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['required', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ]\n )\n );\n};\n","import {Directive, Inject, Injector, Optional, SecurityContext} from '@angular/core';\n\nimport {setProperty, toggleClass} from '@wm/core';\nimport {\n DISPLAY_TYPE,\n IWidgetConfig,\n provideAsWidgetRef,\n SanitizePipe,\n StylableComponent,\n styler\n} from '@wm/components/base';\n\nimport {registerProps} from './label.props';\nimport {isObject} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-label';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-label',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Directive({\n standalone: true,\n selector: '[wmLabel]',\n providers: [\n provideAsWidgetRef(LabelDirective)\n ],\n exportAs: 'wmLabel'\n})\nexport class LabelDirective extends StylableComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private sanitizePipe:SanitizePipe, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov?) {\n\n if (key === 'caption') {\n // Check for trustPipe safe values\n let bindContent = this.nativeElement.getAttribute('caption.bind');\n let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;\n const insertZWSP = (value: any): string => {\n if (typeof value !== 'string') return value;\n return value.replace(/\\d{5,}/g, (match) => {\n return match.replace(/(.{9})(?=.)/g, '$1\\u200B');\n });\n };\n if (isObject(nv) && !safeValue) {\n setProperty(this.nativeElement, 'textContent', JSON.stringify(nv));\n } else if (isObject(nv) && safeValue) {\n setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);\n } else {\n setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(insertZWSP(nv), SecurityContext.HTML));\n }\n\n } else if (key === 'required') {\n toggleClass(this.nativeElement, 'required', nv);\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,UAAU,EACV,IAAI,GAAG,CACH;QACI,CAAC,WAAW,EAAE,WAAW,CAAC;QAC1B,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,GAAG,WAAW,EAAC,CAAC;QAC7C,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,kBAAkB,EAAE,QAAQ,CAAC;QAC9B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,OAAO,EAAE,YAAY,CAAC;QACvB,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC;AAC1C,KAAA,CACJ,CACJ;AACL,CAAC;;ACND,MAAM,WA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B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACd,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE;AACP,wBAAA,kBAAkB,CAAA,cAAA;AACrB,qBAAA;AACD,oBAAA,QAAQ,EAAE;AACb,iBAAA;;0BAIkE,MAAM;2BAAC,kBAAkB;;0BAAG;;;ACjC/F;;AAEG;;;;"}
|
|
@@ -186,15 +186,8 @@
|
|
|
186
186
|
this.setDataGridOption('colDefs', i2.getClonedObject(this.fieldDefs));
|
|
187
187
|
}
|
|
188
188
|
// If data and colDefs are present, call on before data render event
|
|
189
|
-
// Note: Errors in beforedatarender should not prevent table rendering
|
|
190
189
|
if (!this.isdynamictable && !lodashEs.isEmpty(newValue) && gridOptions.colDefs.length) {
|
|
191
|
-
|
|
192
|
-
this.invokeEventCallback('beforedatarender', { $data: this._gridData, $columns: this.columns, data: this._gridData, columns: this.columns });
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
// Log error but continue with rendering - beforedatarender errors should not block table rendering
|
|
196
|
-
console.warn('Error in beforedatarender event callback, continuing with table rendering:', error);
|
|
197
|
-
}
|
|
190
|
+
this.invokeEventCallback('beforedatarender', { $data: this._gridData, $columns: this.columns, data: this._gridData, columns: this.columns });
|
|
198
191
|
}
|
|
199
192
|
this.setDataGridOption('data', i2.getClonedObject(this._gridData));
|
|
200
193
|
}
|
|
@@ -587,7 +580,7 @@
|
|
|
587
580
|
this.prevData = i2.getClonedObject(row);
|
|
588
581
|
},
|
|
589
582
|
afterRowUpdate: (row, e, callBack, options) => {
|
|
590
|
-
this.updateRecord(lodashEs.extend({}, options, { row, 'prevData':
|
|
583
|
+
this.updateRecord(lodashEs.extend({}, options, { row, 'prevData': this.prevData, 'event': e, 'callBack': callBack }));
|
|
591
584
|
},
|
|
592
585
|
onBeforeRowUpdate: (row, e, options) => {
|
|
593
586
|
return this.invokeEventCallback('beforerowupdate', { $event: e, $data: row, row, options: options });
|
|
@@ -1241,10 +1234,6 @@
|
|
|
1241
1234
|
return this.actualPageSize || 5;
|
|
1242
1235
|
}
|
|
1243
1236
|
watchVariableDataSet(newVal) {
|
|
1244
|
-
// Guard against component destruction
|
|
1245
|
-
if (this.isDestroyed) {
|
|
1246
|
-
return;
|
|
1247
|
-
}
|
|
1248
1237
|
let result;
|
|
1249
1238
|
// Check for Variable filters if applied
|
|
1250
1239
|
if (this.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
@@ -1302,12 +1291,6 @@
|
|
|
1302
1291
|
}
|
|
1303
1292
|
/*Return if data is invalid.*/
|
|
1304
1293
|
if (!this.isDataValid()) {
|
|
1305
|
-
// If data is invalid and variableInflight is still true, clear loading state
|
|
1306
|
-
// This prevents tables from getting stuck in loading when data is invalid
|
|
1307
|
-
if (this.variableInflight) {
|
|
1308
|
-
this.variableInflight = false;
|
|
1309
|
-
this.setGridData([]);
|
|
1310
|
-
}
|
|
1311
1294
|
return;
|
|
1312
1295
|
}
|
|
1313
1296
|
// If value is empty or in studio mode, dont enable the navigation
|
|
@@ -1335,13 +1318,7 @@
|
|
|
1335
1318
|
// @ts-ignore
|
|
1336
1319
|
if (!lodashEs.isObject(newVal) || newVal === '' || (newVal && newVal.dataValue === '')) {
|
|
1337
1320
|
if (!this.variableInflight) {
|
|
1338
|
-
// If variable has finished loading and resultSet is empty,
|
|
1339
|
-
this.setGridData([]);
|
|
1340
|
-
}
|
|
1341
|
-
else {
|
|
1342
|
-
// If variableInflight is still true but we have invalid/empty data, clear loading state
|
|
1343
|
-
// This handles cases where data never arrives or is invalid
|
|
1344
|
-
this.variableInflight = false;
|
|
1321
|
+
// If variable has finished loading and resultSet is empty, ender empty data
|
|
1345
1322
|
this.setGridData([]);
|
|
1346
1323
|
}
|
|
1347
1324
|
return;
|
|
@@ -1351,143 +1328,13 @@
|
|
|
1351
1328
|
}
|
|
1352
1329
|
}
|
|
1353
1330
|
ngOnDestroy() {
|
|
1354
|
-
// MEMORY LEAK FIX: Remove document click listener
|
|
1355
1331
|
document.removeEventListener('click', this.documentClickBind);
|
|
1356
|
-
// MEMORY LEAK FIX: Unsubscribe from navigator watches
|
|
1357
1332
|
if (this.navigatorResultWatch) {
|
|
1358
1333
|
this.navigatorResultWatch.unsubscribe();
|
|
1359
|
-
this.navigatorResultWatch = null;
|
|
1360
1334
|
}
|
|
1361
1335
|
if (this.navigatorMaxResultWatch) {
|
|
1362
1336
|
this.navigatorMaxResultWatch.unsubscribe();
|
|
1363
|
-
this.navigatorMaxResultWatch = null;
|
|
1364
|
-
}
|
|
1365
|
-
// MEMORY LEAK FIX: Clear all ViewContainerRef embedded views
|
|
1366
|
-
// These hold references to row data, custom expressions, and inline widgets
|
|
1367
|
-
if (this.customExprViewRef) {
|
|
1368
|
-
this.customExprViewRef.clear();
|
|
1369
|
-
}
|
|
1370
|
-
if (this.rowActionsViewRef) {
|
|
1371
|
-
this.rowActionsViewRef.clear();
|
|
1372
|
-
}
|
|
1373
|
-
if (this.filterViewRef) {
|
|
1374
|
-
this.filterViewRef.clear();
|
|
1375
|
-
}
|
|
1376
|
-
if (this.inlineEditViewRef) {
|
|
1377
|
-
this.inlineEditViewRef.clear();
|
|
1378
|
-
}
|
|
1379
|
-
if (this.inlineEditNewViewRef) {
|
|
1380
|
-
this.inlineEditNewViewRef.clear();
|
|
1381
1337
|
}
|
|
1382
|
-
if (this.rowDetailViewRef) {
|
|
1383
|
-
this.rowDetailViewRef.clear();
|
|
1384
|
-
}
|
|
1385
|
-
if (this.rowExpansionActionViewRef) {
|
|
1386
|
-
this.rowExpansionActionViewRef.clear();
|
|
1387
|
-
}
|
|
1388
|
-
if (this.dynamicTableRef) {
|
|
1389
|
-
this.dynamicTableRef.clear();
|
|
1390
|
-
}
|
|
1391
|
-
// MEMORY LEAK FIX: Clear compiled template caches
|
|
1392
|
-
this.rowActionsCompiledTl = {};
|
|
1393
|
-
this.rowFilterCompliedTl = {};
|
|
1394
|
-
this.inlineCompliedTl = {};
|
|
1395
|
-
this.inlineNewCompliedTl = {};
|
|
1396
|
-
this.customExprCompiledTl = {};
|
|
1397
|
-
this.customExprCompiledSummaryTl = {};
|
|
1398
|
-
this.rowDefInstances = {};
|
|
1399
|
-
this.rowDefMap = {};
|
|
1400
|
-
this.rowExpansionActionTl = {};
|
|
1401
|
-
// MEMORY LEAK FIX: Clear dynamic context
|
|
1402
|
-
if (this._dynamicContext) {
|
|
1403
|
-
Object.keys(this._dynamicContext).forEach(key => {
|
|
1404
|
-
delete this._dynamicContext[key];
|
|
1405
|
-
});
|
|
1406
|
-
this._dynamicContext = null;
|
|
1407
|
-
}
|
|
1408
|
-
// MEMORY LEAK FIX: Clear data arrays
|
|
1409
|
-
this._gridData = [];
|
|
1410
|
-
this.items = [];
|
|
1411
|
-
this.selectedItems = [];
|
|
1412
|
-
this.fieldDefs = [];
|
|
1413
|
-
this.fullFieldDefs = [];
|
|
1414
|
-
this.gridData = [];
|
|
1415
|
-
this.__fullData = null;
|
|
1416
|
-
// MEMORY LEAK FIX: Destroy jQuery datatable widget before clearing gridOptions
|
|
1417
|
-
if (this.datagridElement && this.datagridElement.datatable) {
|
|
1418
|
-
try {
|
|
1419
|
-
this.datagridElement.datatable('destroy');
|
|
1420
|
-
}
|
|
1421
|
-
catch (e) {
|
|
1422
|
-
// Ignore errors during destroy
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
// MEMORY LEAK FIX: Clear gridOptions to release all function closures and data
|
|
1426
|
-
// gridOptions holds many closures that capture 'this' and prevent GC
|
|
1427
|
-
if (this.gridOptions) {
|
|
1428
|
-
// Clear data array
|
|
1429
|
-
if (this.gridOptions.data) {
|
|
1430
|
-
this.gridOptions.data = [];
|
|
1431
|
-
}
|
|
1432
|
-
// Clear column definitions
|
|
1433
|
-
if (this.gridOptions.colDefs) {
|
|
1434
|
-
this.gridOptions.colDefs = [];
|
|
1435
|
-
}
|
|
1436
|
-
// Clear row actions
|
|
1437
|
-
if (this.gridOptions.rowActions) {
|
|
1438
|
-
this.gridOptions.rowActions = [];
|
|
1439
|
-
}
|
|
1440
|
-
// Clear header config
|
|
1441
|
-
if (this.gridOptions.headerConfig) {
|
|
1442
|
-
this.gridOptions.headerConfig = [];
|
|
1443
|
-
}
|
|
1444
|
-
// Nullify all function references to break closures
|
|
1445
|
-
Object.keys(this.gridOptions).forEach(key => {
|
|
1446
|
-
if (typeof this.gridOptions[key] === 'function') {
|
|
1447
|
-
this.gridOptions[key] = null;
|
|
1448
|
-
}
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
// MEMORY LEAK FIX: Clear other data structures
|
|
1452
|
-
this.columns = {};
|
|
1453
|
-
this.formfields = {};
|
|
1454
|
-
this.rowFilter = {};
|
|
1455
|
-
this.actions = [];
|
|
1456
|
-
this._actions = { header: [], footer: [] };
|
|
1457
|
-
this.exportOptions = [];
|
|
1458
|
-
this.headerConfig = [];
|
|
1459
|
-
this.rowActions = [];
|
|
1460
|
-
// MEMORY LEAK FIX: Clear all @ContentChildren QueryLists holding template references
|
|
1461
|
-
// These QueryLists hold TemplateRef instances that create circular references to the parent LView
|
|
1462
|
-
if (this.rowActionTmpl) {
|
|
1463
|
-
this.rowActionTmpl.reset([]);
|
|
1464
|
-
}
|
|
1465
|
-
if (this.filterTmpl) {
|
|
1466
|
-
this.filterTmpl.reset([]);
|
|
1467
|
-
}
|
|
1468
|
-
if (this.inlineWidgetTmpl) {
|
|
1469
|
-
this.inlineWidgetTmpl.reset([]);
|
|
1470
|
-
}
|
|
1471
|
-
if (this.inlineWidgetNewTmpl) {
|
|
1472
|
-
this.inlineWidgetNewTmpl.reset([]);
|
|
1473
|
-
}
|
|
1474
|
-
if (this.customExprTmpl) {
|
|
1475
|
-
this.customExprTmpl.reset([]);
|
|
1476
|
-
}
|
|
1477
|
-
if (this.rowExpansionActionTmpl) {
|
|
1478
|
-
this.rowExpansionActionTmpl.reset([]);
|
|
1479
|
-
}
|
|
1480
|
-
// MEMORY LEAK FIX: Clear @ContentChild template reference
|
|
1481
|
-
this.rowExpansionTmpl = null;
|
|
1482
|
-
// MEMORY LEAK FIX: Complete and clear subjects
|
|
1483
|
-
if (this.selectedItemChange) {
|
|
1484
|
-
this.selectedItemChange.complete();
|
|
1485
|
-
this.selectedItemChange = null;
|
|
1486
|
-
}
|
|
1487
|
-
// MEMORY LEAK FIX: Clear ViewChild references
|
|
1488
|
-
this.dataNavigator = null;
|
|
1489
|
-
this._tableElement = null;
|
|
1490
|
-
// console.log("table component destroyed");
|
|
1491
1338
|
super.ngOnDestroy();
|
|
1492
1339
|
}
|
|
1493
1340
|
addRowIndex(row) {
|
|
@@ -1558,9 +1405,6 @@
|
|
|
1558
1405
|
if (!key.endsWith('_filter') && ((key.endsWith('_new') && newRow) || (!key.endsWith('_new') && !newRow))) {
|
|
1559
1406
|
ctrls[key].setValue('');
|
|
1560
1407
|
this.resetFormControl(ctrls[key]);
|
|
1561
|
-
// MEMORY LEAK FIX: Clear validators to release references
|
|
1562
|
-
ctrls[key].clearValidators();
|
|
1563
|
-
ctrls[key].clearAsyncValidators();
|
|
1564
1408
|
}
|
|
1565
1409
|
});
|
|
1566
1410
|
}
|
|
@@ -1880,14 +1724,7 @@
|
|
|
1880
1724
|
defaultFieldDefs.forEach(col => {
|
|
1881
1725
|
this.columns[col.field] = col;
|
|
1882
1726
|
});
|
|
1883
|
-
|
|
1884
|
-
try {
|
|
1885
|
-
this.invokeEventCallback('beforedatarender', { $data: data, $columns: this.columns, data: data, columns: this.columns });
|
|
1886
|
-
}
|
|
1887
|
-
catch (error) {
|
|
1888
|
-
// Log error but continue with rendering - beforedatarender errors should not block table rendering
|
|
1889
|
-
console.warn('Error in beforedatarender event callback, continuing with table rendering:', error);
|
|
1890
|
-
}
|
|
1727
|
+
this.invokeEventCallback('beforedatarender', { $data: data, $columns: this.columns, data: data, columns: this.columns });
|
|
1891
1728
|
defaultFieldDefs = [];
|
|
1892
1729
|
// Apply the changes made by the user
|
|
1893
1730
|
lodashEs.forEach(this.columns, val => {
|
|
@@ -1926,30 +1763,23 @@
|
|
|
1926
1763
|
return sortExp || '';
|
|
1927
1764
|
}
|
|
1928
1765
|
onPropertyChange(key, nv, ov) {
|
|
1929
|
-
// Guard against property changes after component destruction
|
|
1930
|
-
if (this.isDestroyed) {
|
|
1931
|
-
return;
|
|
1932
|
-
}
|
|
1933
1766
|
let enableNewRow;
|
|
1934
1767
|
switch (key) {
|
|
1935
1768
|
case 'datasource':
|
|
1936
1769
|
// Fix for [WMS-23653] when startUpdate is false (request on page load property is unchecked),
|
|
1937
1770
|
// then set status msg as "No data found"
|
|
1938
|
-
if (this.allowpagesizechange
|
|
1771
|
+
if (this.allowpagesizechange) {
|
|
1939
1772
|
this.datasource.maxResults = this.pagesize || this.datasource.maxResults;
|
|
1940
1773
|
}
|
|
1941
|
-
if (nv
|
|
1774
|
+
if (nv.startUpdate === false) {
|
|
1942
1775
|
this.variableInflight = false;
|
|
1943
1776
|
this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
|
|
1944
1777
|
}
|
|
1945
|
-
if (
|
|
1778
|
+
if (lodashEs.get(this.datasource, 'category') !== 'wm.Variable') {
|
|
1946
1779
|
this.headerselectall = false;
|
|
1947
1780
|
this.setDataGridOption("headerselectall", false);
|
|
1948
1781
|
}
|
|
1949
|
-
|
|
1950
|
-
if (this.datasource && this.dataset !== undefined) {
|
|
1951
|
-
this.watchVariableDataSet(this.dataset);
|
|
1952
|
-
}
|
|
1782
|
+
this.watchVariableDataSet(this.dataset);
|
|
1953
1783
|
this.onDataSourceChange();
|
|
1954
1784
|
break;
|
|
1955
1785
|
case 'dataset':
|
|
@@ -1957,12 +1787,6 @@
|
|
|
1957
1787
|
this.gridOptions.setIsNextPageData(false);
|
|
1958
1788
|
}
|
|
1959
1789
|
if (this.binddatasource && !this.datasource) {
|
|
1960
|
-
// If datasource is not set yet, clear loading state and show no data
|
|
1961
|
-
// This prevents tables from being stuck in loading state
|
|
1962
|
-
if (this.variableInflight) {
|
|
1963
|
-
this.variableInflight = false;
|
|
1964
|
-
this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
|
|
1965
|
-
}
|
|
1966
1790
|
return;
|
|
1967
1791
|
}
|
|
1968
1792
|
// if table is inside list then table dataset will be set as "item.XXX" and there is no datasource.
|
|
@@ -2066,11 +1890,9 @@
|
|
|
2066
1890
|
this.allowpagesizechange = nv;
|
|
2067
1891
|
break;
|
|
2068
1892
|
case 'pagesizeoptions':
|
|
2069
|
-
this.
|
|
2070
|
-
this.
|
|
2071
|
-
this.
|
|
2072
|
-
if (this.allowpagesizechange)
|
|
2073
|
-
this.setDefaultPageSize(nv);
|
|
1893
|
+
this.gridOptions.pagesizeoptions = nv;
|
|
1894
|
+
this.pagesizeoptions = nv;
|
|
1895
|
+
this.setDefaultPageSize(nv);
|
|
2074
1896
|
break;
|
|
2075
1897
|
case 'multiselecttitle':
|
|
2076
1898
|
this.setDataGridOption('multiselecttitle', nv);
|
|
@@ -2114,41 +1936,12 @@
|
|
|
2114
1936
|
this.pagesize = nv;
|
|
2115
1937
|
}
|
|
2116
1938
|
this.updatedPageSize = nv;
|
|
2117
|
-
if (this.isPageSizeOptionsChanged()) {
|
|
2118
|
-
this.dataNavigator.defaultPageSizeOptions = this.pagesizeoptions?.split(',').map(Number).sort((a, b) => a - b) || [];
|
|
2119
|
-
this.dataNavigator.pageSizeOptions = [...this.dataNavigator.defaultPageSizeOptions];
|
|
2120
|
-
}
|
|
2121
1939
|
}
|
|
2122
1940
|
this.dataNavigator.options = {
|
|
2123
1941
|
maxResults: nv
|
|
2124
1942
|
};
|
|
2125
1943
|
this.dataNavigator.widget.maxResults = nv;
|
|
2126
1944
|
this.dataNavigator.maxResults = nv;
|
|
2127
|
-
if (this.datasource) {
|
|
2128
|
-
this.datasource.maxResults = this.pagesize || this.datasource.maxResults;
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
isPageSizeOptionsChanged() {
|
|
2132
|
-
return !lodashEs.isEqual(this.prevPagesizeoptions, this.pagesizeoptions);
|
|
2133
|
-
}
|
|
2134
|
-
selectPageSize(pagesize) {
|
|
2135
|
-
if (!this.allowpagesizechange && !pagesize)
|
|
2136
|
-
return;
|
|
2137
|
-
if (pagesize < this.dataNavigator.pageSizeOptions[0] || pagesize > this.dataNavigator.pageSizeOptions[this.dataNavigator.pageSizeOptions.length - 1]
|
|
2138
|
-
|| !this.dataNavigator.pageSizeOptions.includes(Number(pagesize))) {
|
|
2139
|
-
pagesize = this.dataNavigator.pageSizeOptions[0];
|
|
2140
|
-
}
|
|
2141
|
-
this.dataNavigator.onPageSizeChange(undefined, pagesize);
|
|
2142
|
-
}
|
|
2143
|
-
sanitizeCommaSeparatedIntegers(input) {
|
|
2144
|
-
if (!input)
|
|
2145
|
-
return "";
|
|
2146
|
-
const uniqueNumbers = Array.from(new Set(input
|
|
2147
|
-
.split(",")
|
|
2148
|
-
.map(v => v.trim())
|
|
2149
|
-
.filter(v => /^-?\d+$/.test(v))
|
|
2150
|
-
.map(v => Math.abs(parseInt(v, 10)))));
|
|
2151
|
-
return uniqueNumbers.join(",");
|
|
2152
1945
|
}
|
|
2153
1946
|
onDataSourceChange() {
|
|
2154
1947
|
this.fieldDefs.forEach(col => {
|