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

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 (67) hide show
  1. package/components/base/bundles/index.umd.js +86 -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 +67 -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 +87 -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/pagination/bundles/index.umd.js +4 -0
  15. package/components/data/pagination/esm2022/pagination.component.mjs +5 -1
  16. package/components/data/pagination/fesm2022/index.mjs +4 -0
  17. package/components/data/pagination/fesm2022/index.mjs.map +1 -1
  18. package/components/data/table/bundles/index.umd.js +371 -15
  19. package/components/data/table/esm2022/table-action/table-action.directive.mjs +8 -1
  20. package/components/data/table/esm2022/table-column/table-column.directive.mjs +107 -3
  21. package/components/data/table/esm2022/table-column-group/table-column-group.directive.mjs +9 -1
  22. package/components/data/table/esm2022/table-cud.directive.mjs +8 -2
  23. package/components/data/table/esm2022/table-filter.directive.mjs +12 -2
  24. package/components/data/table/esm2022/table-row/table-row.directive.mjs +8 -1
  25. package/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +8 -1
  26. package/components/data/table/esm2022/table.component.mjs +219 -12
  27. package/components/data/table/fesm2022/index.mjs +371 -15
  28. package/components/data/table/fesm2022/index.mjs.map +1 -1
  29. package/components/data/table/table-action/table-action.directive.d.ts +3 -2
  30. package/components/data/table/table-column/table-column.directive.d.ts +3 -2
  31. package/components/data/table/table-column-group/table-column-group.directive.d.ts +3 -2
  32. package/components/data/table/table-cud.directive.d.ts +3 -1
  33. package/components/data/table/table-filter.directive.d.ts +3 -1
  34. package/components/data/table/table-row/table-row.directive.d.ts +3 -2
  35. package/components/data/table/table-row-action/table-row-action.directive.d.ts +3 -2
  36. package/components/data/table/table.component.d.ts +6 -2
  37. package/components/navigation/menu/bundles/index.umd.js +5 -0
  38. package/components/navigation/menu/esm2022/menu.component.mjs +6 -1
  39. package/components/navigation/menu/fesm2022/index.mjs +5 -0
  40. package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  41. package/components/navigation/popover/bundles/index.umd.js +6 -6
  42. package/components/navigation/popover/esm2022/popover.component.mjs +4 -4
  43. package/components/navigation/popover/fesm2022/index.mjs +3 -3
  44. package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
  45. package/components/navigation/popover/popover.component.d.ts +6 -0
  46. package/core/bundles/index.umd.js +411 -82
  47. package/core/esm2022/public_api.mjs +3 -3
  48. package/core/esm2022/utils/utils.mjs +6 -2
  49. package/core/esm2022/utils/watcher.mjs +402 -81
  50. package/core/fesm2022/index.mjs +410 -84
  51. package/core/fesm2022/index.mjs.map +1 -1
  52. package/core/public_api.d.ts +2 -2
  53. package/core/utils/utils.d.ts +1 -0
  54. package/core/utils/watcher.d.ts +28 -5
  55. package/npm-shrinkwrap.json +2 -2
  56. package/package-lock.json +2 -2
  57. package/package.json +1 -1
  58. package/runtime/base/bundles/index.umd.js +22 -2
  59. package/runtime/base/esm2022/components/app-component/app.component.mjs +4 -2
  60. package/runtime/base/esm2022/components/base-page.component.mjs +6 -2
  61. package/runtime/base/esm2022/components/base-partial.component.mjs +7 -2
  62. package/runtime/base/esm2022/components/base-prefab.component.mjs +7 -2
  63. package/runtime/base/esm2022/components/base-spa-page.component.mjs +6 -2
  64. package/runtime/base/esm2022/services/pipe-provider.service.mjs +4 -4
  65. package/runtime/base/fesm2022/index.mjs +23 -3
  66. package/runtime/base/fesm2022/index.mjs.map +1 -1
  67. package/scripts/datatable/datatable.js +101 -15
@@ -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,11 @@ 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
+ $unwatchAllByScope('Partial', this.partialName);
930
+ }
926
931
  this.destroy$.complete();
927
932
  }
928
933
  ngOnAttach(refreshData) {
@@ -1368,6 +1373,10 @@ class BasePageComponent extends FragmentMonitor {
1368
1373
  });
1369
1374
  }
1370
1375
  ngOnDestroy() {
1376
+ // MEMORY LEAK FIX: Unwatch all Page-scoped watchers for THIS specific page when page is destroyed
1377
+ if (this.pageName) {
1378
+ $unwatchAllByScope('Page', this.pageName);
1379
+ }
1371
1380
  //this.captureApplicationThumbnail();
1372
1381
  this.savePageSnapShot();
1373
1382
  this.destroy$.complete();
@@ -1962,6 +1971,11 @@ class BasePrefabComponent extends FragmentMonitor {
1962
1971
  });
1963
1972
  }
1964
1973
  ngOnDestroy() {
1974
+ // MEMORY LEAK FIX: Unwatch all Prefab-scoped watchers for THIS specific prefab when prefab is destroyed
1975
+ // Only unwatch watchers for this prefab, not all prefabs (other prefabs may still be on the page)
1976
+ if (this.prefabName) {
1977
+ $unwatchAllByScope('Prefab', this.prefabName);
1978
+ }
1965
1979
  this.destroy$.complete();
1966
1980
  }
1967
1981
  // user overrides this
@@ -2718,6 +2732,10 @@ class BaseSpaPageComponent extends FragmentMonitor {
2718
2732
  });
2719
2733
  }
2720
2734
  ngOnDestroy() {
2735
+ // MEMORY LEAK FIX: Unwatch all Page-scoped watchers for THIS specific page when page is destroyed
2736
+ if (this.pageName) {
2737
+ $unwatchAllByScope('Page', this.pageName);
2738
+ }
2721
2739
  this.savePageSnapShot();
2722
2740
  this.destroy$.complete();
2723
2741
  }
@@ -3107,7 +3125,7 @@ class PipeProvider {
3107
3125
  this.preparePipeMeta(CurrencyPipe, 'currency', true, [this._locale]),
3108
3126
  this.preparePipeMeta(DatePipe, 'date', true, [this._locale]),
3109
3127
  this.preparePipeMeta(ToDatePipe, 'toDate', true, [
3110
- new DatePipe(this._locale), undefined, this.injector.get(CustomPipeManager)
3128
+ new DatePipe(this._locale), undefined, this.injector.get(App), this.injector.get(CustomPipeManager)
3111
3129
  ]),
3112
3130
  this.preparePipeMeta(ToNumberPipe, 'toNumber', true, [
3113
3131
  new DecimalPipe(this._locale),
@@ -3124,7 +3142,7 @@ class PipeProvider {
3124
3142
  new DecimalPipe(this._locale)
3125
3143
  ]),
3126
3144
  this.preparePipeMeta(StringToNumberPipe, 'stringToNumber', true),
3127
- this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(CustomPipeManager)]),
3145
+ this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(App), this.injector.get(CustomPipeManager)]),
3128
3146
  this.preparePipeMeta(TrustAsPipe, 'trustAs', true, [this.domSanitizer]),
3129
3147
  this.preparePipeMeta(SanitizePipe, 'sanitize', true, [this.domSanitizer]),
3130
3148
  this.preparePipeMeta(TemplateReplacePipe, 'templateReplace', true),
@@ -4568,6 +4586,8 @@ class AppComponent {
4568
4586
  $invokeWatchers();
4569
4587
  }
4570
4588
  ngOnDestroy() {
4589
+ // MEMORY LEAK FIX: Unwatch all App-scoped watchers when app is destroyed
4590
+ $unwatchAllByScope('App');
4571
4591
  if (this.navigationEndSubscription) {
4572
4592
  this.navigationEndSubscription.unsubscribe();
4573
4593
  }