@wavemaker/app-ng-runtime 11.5.0-next.141090 → 11.5.0-next.141091

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 (48) hide show
  1. app-ng-runtime/components/base/bundles/index.umd.js +3 -51
  2. app-ng-runtime/components/base/esm2020/widgets/common/base/base.component.mjs +3 -27
  3. app-ng-runtime/components/base/esm2020/widgets/common/lazy-load/lazy-load.directive.mjs +3 -16
  4. app-ng-runtime/components/base/esm2020/widgets/common/partial-param/partial-param.directive.mjs +2 -13
  5. app-ng-runtime/components/base/fesm2015/index.mjs +4 -52
  6. app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
  7. app-ng-runtime/components/base/fesm2020/index.mjs +4 -52
  8. app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
  9. app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +0 -1
  10. app-ng-runtime/components/base/widgets/common/partial-param/partial-param.directive.d.ts +0 -1
  11. app-ng-runtime/components/data/list/bundles/index.umd.js +6 -8
  12. app-ng-runtime/components/data/list/esm2020/list-item.directive.mjs +9 -11
  13. app-ng-runtime/components/data/list/fesm2015/index.mjs +8 -10
  14. app-ng-runtime/components/data/list/fesm2015/index.mjs.map +1 -1
  15. app-ng-runtime/components/data/list/fesm2020/index.mjs +8 -8
  16. app-ng-runtime/components/data/list/fesm2020/index.mjs.map +1 -1
  17. app-ng-runtime/components/data/list/list-item.directive.d.ts +2 -3
  18. app-ng-runtime/components/dialogs/design-dialog/bundles/index.umd.js +1 -0
  19. app-ng-runtime/components/dialogs/design-dialog/dialog.component.d.ts +1 -0
  20. app-ng-runtime/components/dialogs/design-dialog/esm2020/dialog.component.mjs +2 -1
  21. app-ng-runtime/components/dialogs/design-dialog/fesm2015/index.mjs +1 -0
  22. app-ng-runtime/components/dialogs/design-dialog/fesm2015/index.mjs.map +1 -1
  23. app-ng-runtime/components/dialogs/design-dialog/fesm2020/index.mjs +1 -0
  24. app-ng-runtime/components/dialogs/design-dialog/fesm2020/index.mjs.map +1 -1
  25. app-ng-runtime/core/bundles/index.umd.js +58 -0
  26. app-ng-runtime/core/esm2020/public_api.mjs +2 -2
  27. app-ng-runtime/core/esm2020/utils/utils.mjs +56 -1
  28. app-ng-runtime/core/fesm2015/index.mjs +58 -1
  29. app-ng-runtime/core/fesm2015/index.mjs.map +1 -1
  30. app-ng-runtime/core/fesm2020/index.mjs +58 -1
  31. app-ng-runtime/core/fesm2020/index.mjs.map +1 -1
  32. app-ng-runtime/core/public_api.d.ts +1 -1
  33. app-ng-runtime/core/utils/utils.d.ts +2 -0
  34. app-ng-runtime/package.json +1 -1
  35. app-ng-runtime/runtime/base/bundles/index.umd.js +4 -0
  36. app-ng-runtime/runtime/base/esm2020/services/dynamic-component-ref-provider.service.mjs +4 -1
  37. app-ng-runtime/runtime/base/esm2020/util/fragment-monitor.mjs +2 -1
  38. app-ng-runtime/runtime/base/fesm2015/index.mjs +4 -0
  39. app-ng-runtime/runtime/base/fesm2015/index.mjs.map +1 -1
  40. app-ng-runtime/runtime/base/fesm2020/index.mjs +4 -0
  41. app-ng-runtime/runtime/base/fesm2020/index.mjs.map +1 -1
  42. app-ng-runtime/runtime/base/util/fragment-monitor.d.ts +1 -0
  43. app-ng-runtime/runtime/dynamic/bundles/index.umd.js +1 -0
  44. app-ng-runtime/runtime/dynamic/esm2020/app/services/component-ref-provider.service.mjs +2 -1
  45. app-ng-runtime/runtime/dynamic/fesm2015/index.mjs +1 -0
  46. app-ng-runtime/runtime/dynamic/fesm2015/index.mjs.map +1 -1
  47. app-ng-runtime/runtime/dynamic/fesm2020/index.mjs +1 -0
  48. app-ng-runtime/runtime/dynamic/fesm2020/index.mjs.map +1 -1
@@ -3,7 +3,7 @@ import { InjectionToken, forwardRef, ElementRef, inject, ViewContainerRef, Injec
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { Location, CommonModule } from '@angular/common';
5
5
  import * as i1 from '@wm/core';
6
- import { FormWidgetType, checkIsCustomPipeExpression, $parseExpr, isValidWebURL, encodeUrl, stringStartsWith, prettifyLabel, deHyphenate, initCaps, getClonedObject, setCSS, isDefined, IDGenerator, toBoolean, isChangeFromWatch, $unwatch, resetChangeFromWatch, isObject, toDimension, $appDigest, removeClass, addClass, setCSSFromObj, App, setAttr, isMobileApp, switchClass, removeAttr, $parseEvent, $invokeWatchers, $watch, transformFileURI, ComponentType, noop as noop$1, isLargeTabletLandscape, isLargeTabletPortrait, isKitkatDevice, debounce, hasOffsetStr, AbstractI18nService, CURRENCY_INFO, isMobile, AbstractDialogService, DataSource, processFilterExpBindNode, MatchMode, isEqualWithFields, getFormattedDate, isAndroid, isNumberType, DataType, findValueOf, validateAccessRoles, VALIDATOR, isIos } from '@wm/core';
6
+ import { FormWidgetType, checkIsCustomPipeExpression, $parseExpr, isValidWebURL, encodeUrl, stringStartsWith, prettifyLabel, deHyphenate, initCaps, getClonedObject, setCSS, isDefined, IDGenerator, toBoolean, isChangeFromWatch, $unwatch, resetChangeFromWatch, isObject, toDimension, $appDigest, removeClass, addClass, setCSSFromObj, App, findParent, setAttr, isMobileApp, switchClass, removeAttr, $parseEvent, $invokeWatchers, $watch, transformFileURI, ComponentType, noop as noop$1, isLargeTabletLandscape, isLargeTabletPortrait, isKitkatDevice, debounce, hasOffsetStr, AbstractI18nService, CURRENCY_INFO, isMobile, AbstractDialogService, DataSource, processFilterExpBindNode, MatchMode, isEqualWithFields, getFormattedDate, isAndroid, isNumberType, DataType, findValueOf, validateAccessRoles, VALIDATOR, isIos } from '@wm/core';
7
7
  import { SecurityModule, SecurityService } from '@wm/security';
8
8
  import { createFocusTrap } from '@wavemaker/focus-trap/dist/focus-trap';
9
9
  import * as i1$2 from '@angular/platform-browser';
@@ -950,30 +950,6 @@ class BaseComponent {
950
950
  this.__cloneable__ = false;
951
951
  this.$attrs = new Map();
952
952
  this.isMuted = false;
953
- this.findParentlView = (lView) => {
954
- //console.log("---*************--widgetType--*************---", this.widgetType);
955
- if (lView[3] === null) {
956
- return lView[8] ? lView[8] : this.viewParentApp;
957
- }
958
- let parentlView = lView[3];
959
- if (typeof lView[1] === "boolean") { // this is lContainer, not lView if this is boolean
960
- return this.findParentlView(parentlView);
961
- }
962
- let componentType = lView[1]["type"];
963
- if (componentType === 0 || componentType === 1) {
964
- let p = lView[8];
965
- // ts-ignore
966
- if (p.constructor.name === 'DialogComponent') {
967
- return this.findParentlView(parentlView);
968
- }
969
- else {
970
- return p;
971
- }
972
- }
973
- else { // when componentType == 2, then fetch parent again
974
- return this.findParentlView(parentlView);
975
- }
976
- };
977
953
  const elementRef = inj.get(ElementRef);
978
954
  this.nativeElement = elementRef.nativeElement;
979
955
  //making the code compatible in both the JIT and AOT modes
@@ -986,7 +962,7 @@ class BaseComponent {
986
962
  // this.viewParent = _viewParent || (this.viewContainerRef as any).parentInjector._lView[8];
987
963
  // https://github.com/angular/angular/blob/main/packages/core/src/render3/interfaces/view.ts
988
964
  let lView = this.inj._lView;
989
- this.viewParent = lView[8] === null ? this.viewParentApp : this.findParentlView(lView);
965
+ this.viewParent = findParent(lView, this.viewParentApp);
990
966
  //console.log("---*************--context--*************---", lView[8]);
991
967
  this.context = this.inj._lView[8];
992
968
  this.displayType = config.displayType || DISPLAY_TYPE.BLOCK;
@@ -1717,20 +1693,7 @@ class LazyLoadDirective {
1717
1693
  this.viewContainer = viewContainer;
1718
1694
  let viewParentApp = inj ? inj.get(App) : inject(App);
1719
1695
  let lView = inj._lView;
1720
- const getParentlView = (lView) => {
1721
- let parentlView = lView[3];
1722
- if (typeof lView[1] === "boolean") { // this is lContainer, not lView if this is boolean
1723
- return getParentlView(parentlView);
1724
- }
1725
- let componentType = lView[1]["type"];
1726
- if (componentType === 0 || componentType === 1) {
1727
- return lView[8];
1728
- }
1729
- else { // when componentType == 2, then fetch parent again
1730
- return getParentlView(parentlView);
1731
- }
1732
- };
1733
- this.viewParent = getParentlView(lView) || viewParentApp;
1696
+ this.viewParent = findParent(lView, viewParentApp);
1734
1697
  //this.context = (inj as any).view.context;
1735
1698
  this.context = inj._lView[8];
1736
1699
  }
@@ -1913,14 +1876,10 @@ class PartialParamHandlerDirective {
1913
1876
  }
1914
1877
  registerParams(name, value, bindExpr, type) {
1915
1878
  this.widgetRef.partialParams[name] = value;
1916
- let viewParent = this.widgetRef.getViewParent();
1917
- if (this.widgetRef.inj._tNode.parent === null) {
1918
- viewParent = this.getViewParent(viewParent);
1919
- }
1920
1879
  if (!value && bindExpr) {
1921
1880
  this.widgetRef.registerDestroyListener(
1922
1881
  //[Todo-CSP]: expr fn should be generated be default
1923
- $watch(bindExpr, viewParent, _.get(this.widgetRef, 'context'), nv => {
1882
+ $watch(bindExpr, this.widgetRef.getViewParent(), _.get(this.widgetRef, 'context'), nv => {
1924
1883
  this.widgetRef.partialParams[name] = nv;
1925
1884
  // notify the partial container of the param changes
1926
1885
  this.widgetRef.params$.next();
@@ -1930,13 +1889,6 @@ class PartialParamHandlerDirective {
1930
1889
  this.widgetRef.params$.next();
1931
1890
  }
1932
1891
  }
1933
- getViewParent(viewParent) {
1934
- let parent = viewParent.viewParent;
1935
- if (parent.constructor.name === "DynamicComponent") {
1936
- return parent;
1937
- }
1938
- return this.getViewParent(parent);
1939
- }
1940
1892
  }
1941
1893
  PartialParamHandlerDirective.ɵfac = function PartialParamHandlerDirective_Factory(t) { return new (t || PartialParamHandlerDirective)(i0.ɵɵdirectiveInject(WidgetRef, 2)); };
1942
1894
  PartialParamHandlerDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PartialParamHandlerDirective, selectors: [["", "partialContainer", ""]] });