@wavemaker/app-ng-runtime 11.14.1-1.6289 → 11.14.1-3.6306

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.
Files changed (49) hide show
  1. package/components/base/bundles/index.umd.js +87 -17
  2. package/components/base/esm2022/pipes/custom-pipes.mjs +10 -10
  3. package/components/base/esm2022/utils/widget-utils.mjs +3 -3
  4. package/components/base/esm2022/widgets/common/base/base.component.mjs +68 -7
  5. package/components/base/esm2022/widgets/common/lazy-load/lazy-load.directive.mjs +7 -3
  6. package/components/base/esm2022/widgets/framework/property-change-handler.mjs +7 -2
  7. package/components/base/fesm2022/index.mjs +88 -18
  8. package/components/base/fesm2022/index.mjs.map +1 -1
  9. package/components/base/pipes/custom-pipes.d.ts +5 -5
  10. package/components/basic/label/bundles/index.umd.js +9 -1
  11. package/components/basic/label/esm2022/label.directive.mjs +10 -2
  12. package/components/basic/label/fesm2022/index.mjs +9 -1
  13. package/components/basic/label/fesm2022/index.mjs.map +1 -1
  14. package/components/data/table/bundles/index.umd.js +218 -11
  15. package/components/data/table/esm2022/table.component.mjs +219 -12
  16. package/components/data/table/fesm2022/index.mjs +218 -11
  17. package/components/data/table/fesm2022/index.mjs.map +1 -1
  18. package/components/data/table/table.component.d.ts +6 -2
  19. package/components/navigation/menu/bundles/index.umd.js +5 -0
  20. package/components/navigation/menu/esm2022/menu.component.mjs +6 -1
  21. package/components/navigation/menu/fesm2022/index.mjs +5 -0
  22. package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  23. package/components/navigation/popover/bundles/index.umd.js +6 -6
  24. package/components/navigation/popover/esm2022/popover.component.mjs +4 -4
  25. package/components/navigation/popover/fesm2022/index.mjs +3 -3
  26. package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  27. package/components/navigation/popover/popover.component.d.ts +6 -0
  28. package/core/bundles/index.umd.js +332 -82
  29. package/core/esm2022/public_api.mjs +3 -3
  30. package/core/esm2022/utils/utils.mjs +6 -2
  31. package/core/esm2022/utils/watcher.mjs +323 -81
  32. package/core/fesm2022/index.mjs +331 -84
  33. package/core/fesm2022/index.mjs.map +1 -1
  34. package/core/public_api.d.ts +2 -2
  35. package/core/utils/utils.d.ts +1 -0
  36. package/core/utils/watcher.d.ts +26 -5
  37. package/npm-shrinkwrap.json +2 -2
  38. package/package-lock.json +2 -2
  39. package/package.json +1 -1
  40. package/runtime/base/bundles/index.umd.js +37 -2
  41. package/runtime/base/esm2022/components/app-component/app.component.mjs +7 -2
  42. package/runtime/base/esm2022/components/base-page.component.mjs +9 -2
  43. package/runtime/base/esm2022/components/base-partial.component.mjs +10 -2
  44. package/runtime/base/esm2022/components/base-prefab.component.mjs +10 -2
  45. package/runtime/base/esm2022/components/base-spa-page.component.mjs +9 -2
  46. package/runtime/base/esm2022/services/pipe-provider.service.mjs +4 -4
  47. package/runtime/base/fesm2022/index.mjs +38 -3
  48. package/runtime/base/fesm2022/index.mjs.map +1 -1
  49. package/scripts/datatable/datatable.js +19 -2
@@ -5,7 +5,7 @@ import { ActivatedRoute, Router, RouterOutlet, NavigationStart, NavigationEnd, N
5
5
  import * as i5 from '@angular/common';
6
6
  import { DOCUMENT, ɵgetDOM as _getDOM, CommonModule, AsyncPipe, SlicePipe, PercentPipe, I18nPluralPipe, NgLocalization, I18nSelectPipe, KeyValuePipe, UpperCasePipe, LowerCasePipe, JsonPipe, DecimalPipe, TitleCasePipe, CurrencyPipe, DatePipe } from '@angular/common';
7
7
  import * as i1 from '@wm/core';
8
- import { $appDigest, isDefined, getWmProjectProperties, triggerFn, fetchContent, _WM_APP_PROJECT, stringStartsWith, loadStyleSheets, loadScripts, noop as noop$1, App, AbstractI18nService, ScriptLoaderService, Viewport, UtilsService, $invokeWatchers, registerFnByExpr, LRUCache, muteWatchers, AbstractNavigationService, isIos, isAndroid, unMuteWatchers, $watch, isIE, CustomPipeManager, getSessionStorageItem, setPipeProvider, DynamicComponentRefProvider, FieldWidgetService, FieldTypeService, ConstantService, AbstractToasterService, StatePersistence, AbstractSpinnerService, AbstractDialogService, EventNotifier, setCSS, setSessionStorageItem, replace, setNgZone, setAppRef, addClass, removeClass, extendProto, $parseExpr, AppDefaults, isObject as isObject$1, isIphone, isIpod, isIpad } from '@wm/core';
8
+ import { $appDigest, isDefined, getWmProjectProperties, triggerFn, fetchContent, _WM_APP_PROJECT, stringStartsWith, loadStyleSheets, loadScripts, noop as noop$1, App, AbstractI18nService, ScriptLoaderService, Viewport, UtilsService, $invokeWatchers, registerFnByExpr, $unwatchAllByScope, LRUCache, muteWatchers, AbstractNavigationService, isIos, isAndroid, unMuteWatchers, $watch, isIE, CustomPipeManager, getSessionStorageItem, setPipeProvider, DynamicComponentRefProvider, FieldWidgetService, FieldTypeService, ConstantService, AbstractToasterService, StatePersistence, AbstractSpinnerService, AbstractDialogService, EventNotifier, setCSS, setSessionStorageItem, replace, setNgZone, setAppRef, addClass, removeClass, extendProto, $parseExpr, AppDefaults, isObject as isObject$1, isIphone, isIpod, isIpad } from '@wm/core';
9
9
  import * as i2 from '@wm/security';
10
10
  import { SecurityService } from '@wm/security';
11
11
  import * as i4 from '@wm/variables';
@@ -923,6 +923,14 @@ class BasePartialComponent extends FragmentMonitor {
923
923
  });
924
924
  }
925
925
  ngOnDestroy() {
926
+ // MEMORY LEAK FIX: Unwatch all Partial-scoped watchers for THIS specific partial when partial is destroyed
927
+ // Only unwatch watchers for this partial, not all partials (other partials may still be on the page)
928
+ if (this.partialName) {
929
+ const removedCount = $unwatchAllByScope('Partial', this.partialName);
930
+ if (removedCount > 0) {
931
+ console.log(`🧹 Cleaned up ${removedCount} Partial-scoped watcher(s) for partial ${this.partialName}`);
932
+ }
933
+ }
926
934
  this.destroy$.complete();
927
935
  }
928
936
  ngOnAttach(refreshData) {
@@ -1368,6 +1376,13 @@ class BasePageComponent extends FragmentMonitor {
1368
1376
  });
1369
1377
  }
1370
1378
  ngOnDestroy() {
1379
+ // MEMORY LEAK FIX: Unwatch all Page-scoped watchers for THIS specific page when page is destroyed
1380
+ if (this.pageName) {
1381
+ const removedCount = $unwatchAllByScope('Page', this.pageName);
1382
+ if (removedCount > 0) {
1383
+ console.log(`🧹 Cleaned up ${removedCount} Page-scoped watcher(s) for page ${this.pageName}`);
1384
+ }
1385
+ }
1371
1386
  //this.captureApplicationThumbnail();
1372
1387
  this.savePageSnapShot();
1373
1388
  this.destroy$.complete();
@@ -1962,6 +1977,14 @@ class BasePrefabComponent extends FragmentMonitor {
1962
1977
  });
1963
1978
  }
1964
1979
  ngOnDestroy() {
1980
+ // MEMORY LEAK FIX: Unwatch all Prefab-scoped watchers for THIS specific prefab when prefab is destroyed
1981
+ // Only unwatch watchers for this prefab, not all prefabs (other prefabs may still be on the page)
1982
+ if (this.prefabName) {
1983
+ const removedCount = $unwatchAllByScope('Prefab', this.prefabName);
1984
+ if (removedCount > 0) {
1985
+ console.log(`🧹 Cleaned up ${removedCount} Prefab-scoped watcher(s) for prefab ${this.prefabName}`);
1986
+ }
1987
+ }
1965
1988
  this.destroy$.complete();
1966
1989
  }
1967
1990
  // user overrides this
@@ -2718,6 +2741,13 @@ class BaseSpaPageComponent extends FragmentMonitor {
2718
2741
  });
2719
2742
  }
2720
2743
  ngOnDestroy() {
2744
+ // MEMORY LEAK FIX: Unwatch all Page-scoped watchers for THIS specific page when page is destroyed
2745
+ if (this.pageName) {
2746
+ const removedCount = $unwatchAllByScope('Page', this.pageName);
2747
+ if (removedCount > 0) {
2748
+ console.log(`🧹 Cleaned up ${removedCount} Page-scoped watcher(s) for page ${this.pageName}`);
2749
+ }
2750
+ }
2721
2751
  this.savePageSnapShot();
2722
2752
  this.destroy$.complete();
2723
2753
  }
@@ -3107,7 +3137,7 @@ class PipeProvider {
3107
3137
  this.preparePipeMeta(CurrencyPipe, 'currency', true, [this._locale]),
3108
3138
  this.preparePipeMeta(DatePipe, 'date', true, [this._locale]),
3109
3139
  this.preparePipeMeta(ToDatePipe, 'toDate', true, [
3110
- new DatePipe(this._locale), undefined, this.injector.get(CustomPipeManager)
3140
+ new DatePipe(this._locale), undefined, this.injector.get(App), this.injector.get(CustomPipeManager)
3111
3141
  ]),
3112
3142
  this.preparePipeMeta(ToNumberPipe, 'toNumber', true, [
3113
3143
  new DecimalPipe(this._locale),
@@ -3124,7 +3154,7 @@ class PipeProvider {
3124
3154
  new DecimalPipe(this._locale)
3125
3155
  ]),
3126
3156
  this.preparePipeMeta(StringToNumberPipe, 'stringToNumber', true),
3127
- this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(CustomPipeManager)]),
3157
+ this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(App), this.injector.get(CustomPipeManager)]),
3128
3158
  this.preparePipeMeta(TrustAsPipe, 'trustAs', true, [this.domSanitizer]),
3129
3159
  this.preparePipeMeta(SanitizePipe, 'sanitize', true, [this.domSanitizer]),
3130
3160
  this.preparePipeMeta(TemplateReplacePipe, 'templateReplace', true),
@@ -4568,6 +4598,11 @@ class AppComponent {
4568
4598
  $invokeWatchers();
4569
4599
  }
4570
4600
  ngOnDestroy() {
4601
+ // MEMORY LEAK FIX: Unwatch all App-scoped watchers when app is destroyed
4602
+ const removedCount = $unwatchAllByScope('App');
4603
+ if (removedCount > 0) {
4604
+ console.log(`🧹 Cleaned up ${removedCount} App-scoped watcher(s) on app destroy`);
4605
+ }
4571
4606
  if (this.navigationEndSubscription) {
4572
4607
  this.navigationEndSubscription.unsubscribe();
4573
4608
  }