@wavemaker/app-ng-runtime 11.14.1-3.6306 → 11.14.1-31.647762
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 +179 -27
- 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,5 +1,5 @@
|
|
|
1
1
|
import * as i1 from '@wm/core';
|
|
2
|
-
import { FormWidgetType, checkIsCustomPipeExpression, $parseExpr, isValidWebURL, _WM_APP_PROJECT,
|
|
2
|
+
import { FormWidgetType, checkIsCustomPipeExpression, $parseExpr, isValidWebURL, _WM_APP_PROJECT, encodeUrl, stringStartsWith, prettifyLabel, deHyphenate, initCaps, getClonedObject, DataSource, debounce, processFilterExpBindNode, isDefined, MatchMode, $parseEvent, isEqualWithFields, getFormattedDate, isAndroid, isNumberType, DataType, setCSS, IDGenerator, toBoolean, isChangeFromWatch, $unwatch, resetChangeFromWatch, isObject as isObject$1, toDimension, $appDigest, removeClass, addClass, setCSSFromObj, App, findParent, setAttr, switchClass, removeAttr, $invokeWatchers, $watch, findValueOf, validateAccessRoles, ComponentType, noop as noop$1, VALIDATOR, isIos, isMobile, hasOffsetStr, AbstractI18nService, CURRENCY_INFO, replace as replace$1, transformFileURI, isLargeTabletLandscape, isLargeTabletPortrait } from '@wm/core';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, forwardRef, ElementRef, inject, ViewContainerRef, Injector, Injectable, Inject, Optional, Directive, Self, ContentChildren, Attribute, Input, Component, Pipe, SecurityContext } from '@angular/core';
|
|
5
5
|
import { createFocusTrap } from '@wavemaker/focus-trap';
|
|
@@ -190,7 +190,7 @@ const getImageUrl = (urlString, shouldEncode, defaultUrl) => {
|
|
|
190
190
|
urlString = (defaultUrl || 'resources/images/imagelists/default-image.png');
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
if (urlString && !_WM_APP_PROJECT.isPreview && !
|
|
193
|
+
if (urlString && !_WM_APP_PROJECT.isPreview && !isValidWebURL(urlString) && !urlString.startsWith(_WM_APP_PROJECT.cdnUrl)) {
|
|
194
194
|
urlString = (_WM_APP_PROJECT.cdnUrl || '') + urlString;
|
|
195
195
|
}
|
|
196
196
|
urlString = shouldEncode ? encodeUrl(urlString) : urlString;
|
|
@@ -1994,12 +1994,7 @@ const parseValue = (key, value, type) => {
|
|
|
1994
1994
|
return toBoolean(value, isBooleanAttr(key) && key);
|
|
1995
1995
|
}
|
|
1996
1996
|
if (type === PROP_TYPE.NUMBER) {
|
|
1997
|
-
|
|
1998
|
-
// Fix NaN for tabindex - default to 0 if value is invalid
|
|
1999
|
-
if (key === 'tabindex' && isNaN(numValue)) {
|
|
2000
|
-
return value === null || value === undefined || value === '' ? 0 : numValue;
|
|
2001
|
-
}
|
|
2002
|
-
return numValue;
|
|
1997
|
+
return +value;
|
|
2003
1998
|
}
|
|
2004
1999
|
return value;
|
|
2005
2000
|
};
|
|
@@ -2323,26 +2318,10 @@ class BaseComponent {
|
|
|
2323
2318
|
this.propertyChange.subscribe(({ key, nv, ov }) => fn(key, nv, ov));
|
|
2324
2319
|
}
|
|
2325
2320
|
registerDestroyListener(fn, ctx) {
|
|
2326
|
-
if (!fn) {
|
|
2327
|
-
return;
|
|
2328
|
-
}
|
|
2329
2321
|
if (ctx) {
|
|
2330
2322
|
fn = fn.bind(ctx);
|
|
2331
2323
|
}
|
|
2332
|
-
this.destroy.subscribe(() => { }, () => { }, () =>
|
|
2333
|
-
try {
|
|
2334
|
-
if (fn && typeof fn === 'function') {
|
|
2335
|
-
fn();
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
catch (e) {
|
|
2339
|
-
// Silently handle cleanup errors to prevent test failures
|
|
2340
|
-
// These are typically non-critical cleanup issues like:
|
|
2341
|
-
// - Subscriptions already unsubscribed
|
|
2342
|
-
// - Null references during cleanup
|
|
2343
|
-
// - Components already destroyed
|
|
2344
|
-
}
|
|
2345
|
-
});
|
|
2324
|
+
this.destroy.subscribe(() => { }, () => { }, () => fn());
|
|
2346
2325
|
}
|
|
2347
2326
|
getDisplayType() {
|
|
2348
2327
|
return this.displayType;
|
|
@@ -2508,24 +2487,14 @@ class BaseComponent {
|
|
|
2508
2487
|
// the promise returned by the variable call.
|
|
2509
2488
|
boundFnVal = boundFn();
|
|
2510
2489
|
if (boundFnVal instanceof Promise) {
|
|
2511
|
-
return boundFnVal.then(response => response, err =>
|
|
2512
|
-
const widgetName = widget.name || widget.widgetId || 'unknown';
|
|
2513
|
-
console.error(`Error in promise returned by event callback "${eventName}" on widget "${widgetName}":`, err);
|
|
2514
|
-
return err;
|
|
2515
|
-
});
|
|
2490
|
+
return boundFnVal.then(response => response, err => err);
|
|
2516
2491
|
}
|
|
2517
2492
|
else {
|
|
2518
2493
|
return boundFnVal;
|
|
2519
2494
|
}
|
|
2520
2495
|
}
|
|
2521
2496
|
catch (e) {
|
|
2522
|
-
|
|
2523
|
-
const widgetName = widget.name || widget.widgetId || 'unknown';
|
|
2524
|
-
const errorMessage = e.message || String(e);
|
|
2525
|
-
console.error(`Error executing event callback "${eventName}" on widget "${widgetName}":`, errorMessage);
|
|
2526
|
-
console.error('Event expression context:', { eventName, widgetName, locals });
|
|
2527
|
-
// Re-throw to maintain original behavior but with better context
|
|
2528
|
-
throw e;
|
|
2497
|
+
console.error(e);
|
|
2529
2498
|
}
|
|
2530
2499
|
};
|
|
2531
2500
|
if (child && !child.widget.eventHandlers)
|
|
@@ -2549,17 +2518,11 @@ class BaseComponent {
|
|
|
2549
2518
|
if (!child)
|
|
2550
2519
|
this.initState.delete(propName);
|
|
2551
2520
|
let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent, context = child ? child.widget.context : this.context, widget = child ? child.widget : this.widget, isMuted = child ? child.widget.isMuted : this.isMuted, widgetProps = child ? child.widget.widgetProps : this.widgetProps, widgetId = child ? child.widget.widgetId : this.widgetId;
|
|
2552
|
-
// OPTIMIZATION: Apply throttling for non-critical properties
|
|
2553
|
-
const watchConfig = widgetProps.get(propName) || {};
|
|
2554
|
-
const throttledProps = ['class', 'style', 'ngclass', 'ngstyle'];
|
|
2555
|
-
if (throttledProps.includes(propName.toLowerCase())) {
|
|
2556
|
-
watchConfig.throttle = 100; // Throttle to 100ms for style/class properties
|
|
2557
|
-
}
|
|
2558
2521
|
this.registerDestroyListener($watch(expr, viewParent, context, nv => {
|
|
2559
2522
|
if (propName.startsWith('base-') && widget.updateData)
|
|
2560
2523
|
widget.updateData(propName, nv);
|
|
2561
2524
|
widget[propName] = nv;
|
|
2562
|
-
}, getWatchIdentifier(widgetId, propName), propName === 'datasource',
|
|
2525
|
+
}, getWatchIdentifier(widgetId, propName), propName === 'datasource', widgetProps.get(propName), () => isMuted));
|
|
2563
2526
|
}
|
|
2564
2527
|
/**
|
|
2565
2528
|
* Remove watch on the bound property
|
|
@@ -2578,18 +2541,7 @@ class BaseComponent {
|
|
|
2578
2541
|
const fn = callbackInfo.callback;
|
|
2579
2542
|
const locals = callbackInfo.locals || {};
|
|
2580
2543
|
if (fn) {
|
|
2581
|
-
|
|
2582
|
-
return fn(Object.assign(locals, extraLocals));
|
|
2583
|
-
}
|
|
2584
|
-
catch (error) {
|
|
2585
|
-
// Log error with context information for debugging
|
|
2586
|
-
const widgetName = this.name || this.widgetId || 'unknown';
|
|
2587
|
-
const errorMessage = error?.message || String(error);
|
|
2588
|
-
console.error(`Error executing event callback "${eventName}" on widget "${widgetName}":`, errorMessage);
|
|
2589
|
-
console.error('Full error:', error);
|
|
2590
|
-
// Re-throw to maintain original behavior but with better error context
|
|
2591
|
-
throw error;
|
|
2592
|
-
}
|
|
2544
|
+
return fn(Object.assign(locals, extraLocals));
|
|
2593
2545
|
}
|
|
2594
2546
|
}
|
|
2595
2547
|
}
|
|
@@ -2809,24 +2761,6 @@ class BaseComponent {
|
|
|
2809
2761
|
this.propertyChange.complete();
|
|
2810
2762
|
this.destroy.complete();
|
|
2811
2763
|
this.isAttached = false;
|
|
2812
|
-
// MEMORY LEAK FIX: Unwatch all watchers for this widget
|
|
2813
|
-
// This ensures all watchers registered for this component are cleaned up
|
|
2814
|
-
if (this.widgetId) {
|
|
2815
|
-
const removedCount = $unwatchAll(this.widgetId);
|
|
2816
|
-
if (removedCount > 0) {
|
|
2817
|
-
console.log(`🧹 Cleaned up ${removedCount} watcher(s) for widget ${this.widgetId}`);
|
|
2818
|
-
}
|
|
2819
|
-
}
|
|
2820
|
-
// MEMORY LEAK FIX: Clear context to release references to parent scope data
|
|
2821
|
-
// The context object holds references to repeater items, wizard steps, etc.
|
|
2822
|
-
// which can retain large amounts of data even after component destruction
|
|
2823
|
-
if (this.context) {
|
|
2824
|
-
// Clear all properties from context
|
|
2825
|
-
Object.keys(this.context).forEach(key => {
|
|
2826
|
-
delete this.context[key];
|
|
2827
|
-
});
|
|
2828
|
-
this.context = null;
|
|
2829
|
-
}
|
|
2830
2764
|
}
|
|
2831
2765
|
static { this.ɵfac = function BaseComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseComponent)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(WidgetConfig), i0.ɵɵinject('EXPLICIT_CONTEXT', 8), i0.ɵɵinject(Promise)); }; }
|
|
2832
2766
|
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseComponent, factory: BaseComponent.ɵfac }); }
|
|
@@ -4381,14 +4315,14 @@ class ToDatePipe extends WmPipe {
|
|
|
4381
4315
|
}
|
|
4382
4316
|
return this.returnFn('', arguments, this.app.Variables);
|
|
4383
4317
|
}
|
|
4384
|
-
constructor(datePipe, i18nService,
|
|
4318
|
+
constructor(datePipe, i18nService, customPipeManager) {
|
|
4385
4319
|
super('toDate', customPipeManager);
|
|
4386
4320
|
this.datePipe = datePipe;
|
|
4387
4321
|
this.i18nService = i18nService;
|
|
4388
|
-
this.app = app;
|
|
4389
4322
|
this.customPipeManager = customPipeManager;
|
|
4323
|
+
this.app = inject(App);
|
|
4390
4324
|
}
|
|
4391
|
-
static { this.ɵfac = function ToDatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ToDatePipe)(i0.ɵɵdirectiveInject(i1$1.DatePipe, 16), i0.ɵɵdirectiveInject(i1.AbstractI18nService, 16), i0.ɵɵdirectiveInject(i1.
|
|
4325
|
+
static { this.ɵfac = function ToDatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ToDatePipe)(i0.ɵɵdirectiveInject(i1$1.DatePipe, 16), i0.ɵɵdirectiveInject(i1.AbstractI18nService, 16), i0.ɵɵdirectiveInject(i1.CustomPipeManager, 16)); }; }
|
|
4392
4326
|
static { this.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "toDate", type: ToDatePipe, pure: true, standalone: true }); }
|
|
4393
4327
|
}
|
|
4394
4328
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ToDatePipe, [{
|
|
@@ -4397,7 +4331,7 @@ class ToDatePipe extends WmPipe {
|
|
|
4397
4331
|
standalone: true,
|
|
4398
4332
|
name: 'toDate'
|
|
4399
4333
|
}]
|
|
4400
|
-
}], () => [{ type: i1$1.DatePipe }, { type: i1.AbstractI18nService }, { type: i1.
|
|
4334
|
+
}], () => [{ type: i1$1.DatePipe }, { type: i1.AbstractI18nService }, { type: i1.CustomPipeManager }], null); })();
|
|
4401
4335
|
class ToNumberPipe {
|
|
4402
4336
|
transform(data, fracSize) {
|
|
4403
4337
|
if (fracSize && !String(fracSize).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)) {
|
|
@@ -4485,9 +4419,9 @@ class SuffixPipe {
|
|
|
4485
4419
|
* Custom pipe: It is work as interceptor between the user custom pipe function and angular pipe
|
|
4486
4420
|
*/
|
|
4487
4421
|
class CustomPipe {
|
|
4488
|
-
constructor(
|
|
4489
|
-
this.app = app;
|
|
4422
|
+
constructor(custmeUserPipe) {
|
|
4490
4423
|
this.custmeUserPipe = custmeUserPipe;
|
|
4424
|
+
this.app = inject(App);
|
|
4491
4425
|
}
|
|
4492
4426
|
transform(data, pipename) {
|
|
4493
4427
|
let argumentArr = [];
|
|
@@ -4507,7 +4441,7 @@ class CustomPipe {
|
|
|
4507
4441
|
return data;
|
|
4508
4442
|
}
|
|
4509
4443
|
}
|
|
4510
|
-
static { this.ɵfac = function CustomPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomPipe)(i0.ɵɵdirectiveInject(i1.
|
|
4444
|
+
static { this.ɵfac = function CustomPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomPipe)(i0.ɵɵdirectiveInject(i1.CustomPipeManager, 16)); }; }
|
|
4511
4445
|
static { this.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "custom", type: CustomPipe, pure: true, standalone: true }); }
|
|
4512
4446
|
}
|
|
4513
4447
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomPipe, [{
|
|
@@ -4516,7 +4450,7 @@ class CustomPipe {
|
|
|
4516
4450
|
standalone: true,
|
|
4517
4451
|
name: 'custom'
|
|
4518
4452
|
}]
|
|
4519
|
-
}], () => [{ type: i1.
|
|
4453
|
+
}], () => [{ type: i1.CustomPipeManager }], null); })();
|
|
4520
4454
|
class TimeFromNowPipe {
|
|
4521
4455
|
transform(data) {
|
|
4522
4456
|
let timestamp;
|
|
@@ -5085,16 +5019,12 @@ class LazyLoadDirective {
|
|
|
5085
5019
|
this.unSubscribeFn = $watch(expr, this.viewParent, this.context, (val) => {
|
|
5086
5020
|
if (!this.embeddedView && val) {
|
|
5087
5021
|
this.embeddedView = this.viewContainer.createEmbeddedView(this.templateRef, this.context);
|
|
5088
|
-
|
|
5089
|
-
this.unSubscribeFn();
|
|
5090
|
-
}
|
|
5022
|
+
this.unSubscribeFn();
|
|
5091
5023
|
}
|
|
5092
5024
|
});
|
|
5093
5025
|
}
|
|
5094
5026
|
ngOnDestroy() {
|
|
5095
|
-
|
|
5096
|
-
this.unSubscribeFn();
|
|
5097
|
-
}
|
|
5027
|
+
this.unSubscribeFn();
|
|
5098
5028
|
}
|
|
5099
5029
|
static { this.ɵfac = function LazyLoadDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LazyLoadDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
|
|
5100
5030
|
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: LazyLoadDirective, selectors: [["", "lazyLoad", ""]], inputs: { lazyLoad: "lazyLoad" }, standalone: true }); }
|