@wavemaker/app-ng-runtime 11.5.0-next.141087 → 11.5.0-next.141089
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.
- app-ng-runtime/components/base/bundles/index.umd.js +36 -17
- app-ng-runtime/components/base/esm2020/widgets/common/base/base.component.mjs +34 -16
- app-ng-runtime/components/base/esm2020/widgets/common/base/partial-container.directive.mjs +4 -3
- app-ng-runtime/components/base/fesm2015/index.mjs +36 -17
- app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/base/fesm2020/index.mjs +36 -17
- app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +1 -0
- app-ng-runtime/components/input/default/bundles/index.umd.js +11 -0
- app-ng-runtime/components/input/default/esm2020/select/select.component.mjs +12 -1
- app-ng-runtime/components/input/default/fesm2015/index.mjs +11 -0
- app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/fesm2020/index.mjs +11 -0
- app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +9 -3
- app-ng-runtime/core/esm2020/utils/dom.mjs +6 -1
- app-ng-runtime/core/esm2020/utils/expression-parser.mjs +2 -3
- app-ng-runtime/core/esm2020/utils/utils.mjs +3 -2
- app-ng-runtime/core/fesm2015/index.mjs +10 -4
- app-ng-runtime/core/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/core/fesm2020/index.mjs +9 -4
- app-ng-runtime/core/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
|
@@ -950,6 +950,37 @@ 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
|
+
let parentlView = lView[3];
|
|
956
|
+
if (typeof lView[1] === "boolean") { // this is lContainer, not lView if this is boolean
|
|
957
|
+
return this.findParentlView(parentlView);
|
|
958
|
+
}
|
|
959
|
+
let componentType = lView[1]["type"];
|
|
960
|
+
if (this.widgetType === "wm-button") {
|
|
961
|
+
if (componentType === 0 || componentType === 1) {
|
|
962
|
+
let p = lView[8];
|
|
963
|
+
// ts-ignore
|
|
964
|
+
if (p.constructor.name === 'DialogComponent') {
|
|
965
|
+
return this.findParentlView(parentlView);
|
|
966
|
+
}
|
|
967
|
+
else {
|
|
968
|
+
return p;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
else { // when componentType == 2, then fetch parent again
|
|
972
|
+
return this.findParentlView(parentlView);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
else {
|
|
976
|
+
if (componentType === 0 || componentType === 1) {
|
|
977
|
+
return lView[8];
|
|
978
|
+
}
|
|
979
|
+
else { // when componentType == 2, then fetch parent again
|
|
980
|
+
return this.findParentlView(parentlView);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
};
|
|
953
984
|
const elementRef = inj.get(ElementRef);
|
|
954
985
|
this.nativeElement = elementRef.nativeElement;
|
|
955
986
|
//making the code compatible in both the JIT and AOT modes
|
|
@@ -962,21 +993,7 @@ class BaseComponent {
|
|
|
962
993
|
// this.viewParent = _viewParent || (this.viewContainerRef as any).parentInjector._lView[8];
|
|
963
994
|
// https://github.com/angular/angular/blob/main/packages/core/src/render3/interfaces/view.ts
|
|
964
995
|
let lView = this.inj._lView;
|
|
965
|
-
|
|
966
|
-
//console.log("---*************--widgetType--*************---", this.widgetType);
|
|
967
|
-
let parentlView = lView[3];
|
|
968
|
-
if (typeof lView[1] === "boolean") { // this is lContainer, not lView if this is boolean
|
|
969
|
-
return getParentlView(parentlView);
|
|
970
|
-
}
|
|
971
|
-
let componentType = lView[1]["type"];
|
|
972
|
-
if (componentType === 0 || componentType === 1) {
|
|
973
|
-
return lView[8];
|
|
974
|
-
}
|
|
975
|
-
else { // when componentType == 2, then fetch parent again
|
|
976
|
-
return getParentlView(parentlView);
|
|
977
|
-
}
|
|
978
|
-
};
|
|
979
|
-
this.viewParent = getParentlView(lView) || this.viewParentApp;
|
|
996
|
+
this.viewParent = lView[8] === null ? this.viewParentApp : this.findParentlView(lView);
|
|
980
997
|
//console.log("---*************--context--*************---", lView[8]);
|
|
981
998
|
this.context = this.inj._lView[8];
|
|
982
999
|
this.displayType = config.displayType || DISPLAY_TYPE.BLOCK;
|
|
@@ -1306,6 +1323,7 @@ class BaseComponent {
|
|
|
1306
1323
|
* If the attribute is a bound expression, register a watch on the expression
|
|
1307
1324
|
*/
|
|
1308
1325
|
processAttr(attrName, attrValue) {
|
|
1326
|
+
// console.log("====attrName=====", attrName, "=====typeof attrname=====", typeof attrName, "-----attrValue----", attrValue);
|
|
1309
1327
|
const { 0: propName, 1: type, 2: meta, length } = attrName.split('.');
|
|
1310
1328
|
if (type === 'bind') {
|
|
1311
1329
|
// if the show property is bound, set the initial value to false
|
|
@@ -1979,8 +1997,9 @@ class PartialContainerDirective {
|
|
|
1979
1997
|
const componentFactory = await this.partialRefProvider.getComponentFactoryRef(nv, ComponentType.PARTIAL, { prefab: prefabName });
|
|
1980
1998
|
if (componentFactory) {
|
|
1981
1999
|
const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);
|
|
1982
|
-
if (instanceRef && instanceRef['
|
|
1983
|
-
|
|
2000
|
+
if (instanceRef && instanceRef['instance'] && prefabName) {
|
|
2001
|
+
// @ts-ignore
|
|
2002
|
+
instanceRef['instance'].prefabName = prefabName;
|
|
1984
2003
|
}
|
|
1985
2004
|
if (!this.$target) {
|
|
1986
2005
|
this.$target = this.elRef.nativeElement.querySelector('[partial-container-target]') || this.elRef.nativeElement;
|