@wavemaker/app-ng-runtime 11.5.2-rc.5436 → 11.5.3-next.141099
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/build-task/bundles/index.umd.js +1 -8
- app-ng-runtime/build-task/esm2020/data/form/form.build.mjs +2 -9
- app-ng-runtime/build-task/fesm2015/index.mjs +1 -8
- app-ng-runtime/build-task/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/build-task/fesm2020/index.mjs +1 -8
- app-ng-runtime/build-task/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +58 -23
- app-ng-runtime/components/base/esm2020/widgets/common/base/base-field-validations.mjs +9 -12
- app-ng-runtime/components/base/esm2020/widgets/common/base/base.component.mjs +39 -13
- app-ng-runtime/components/base/esm2020/widgets/common/lazy-load/lazy-load.directive.mjs +16 -3
- app-ng-runtime/components/base/fesm2015/index.mjs +60 -24
- app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/base/fesm2020/index.mjs +60 -24
- app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/base/widgets/common/base/base-field-validations.d.ts +0 -1
- app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +1 -0
- app-ng-runtime/components/data/form/bundles/index.umd.js +1 -1
- app-ng-runtime/components/data/form/esm2020/form.component.mjs +2 -2
- app-ng-runtime/components/data/form/fesm2015/index.mjs +1 -1
- app-ng-runtime/components/data/form/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/fesm2020/index.mjs +1 -1
- app-ng-runtime/components/data/form/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/design-dialog/bundles/index.umd.js +0 -1
- app-ng-runtime/components/dialogs/design-dialog/dialog.component.d.ts +0 -1
- app-ng-runtime/components/dialogs/design-dialog/esm2020/dialog.component.mjs +1 -2
- app-ng-runtime/components/dialogs/design-dialog/fesm2015/index.mjs +0 -1
- app-ng-runtime/components/dialogs/design-dialog/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/dialogs/design-dialog/fesm2020/index.mjs +0 -1
- app-ng-runtime/components/dialogs/design-dialog/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +10 -18
- app-ng-runtime/components/input/default/esm2020/base-form-custom.component.mjs +2 -6
- app-ng-runtime/components/input/default/esm2020/select/select.component.mjs +1 -12
- app-ng-runtime/components/input/default/esm2020/text/locale/number-locale.mjs +10 -3
- app-ng-runtime/components/input/default/fesm2015/index.mjs +10 -18
- app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/fesm2020/index.mjs +10 -18
- app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +11 -8
- app-ng-runtime/components/input/epoch/esm2020/base-date-time.component.mjs +5 -8
- app-ng-runtime/components/input/epoch/esm2020/date/date.component.mjs +8 -2
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs +11 -8
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs +11 -8
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +9 -12
- app-ng-runtime/components/navigation/menu/esm2020/menu-dropdown-item/menu-dropdown-item.component.mjs +5 -6
- app-ng-runtime/components/navigation/menu/esm2020/menu.component.mjs +5 -6
- app-ng-runtime/components/navigation/menu/esm2020/nav/nav.component.mjs +5 -6
- app-ng-runtime/components/navigation/menu/fesm2015/index.mjs +9 -12
- app-ng-runtime/components/navigation/menu/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/fesm2020/index.mjs +9 -12
- app-ng-runtime/components/navigation/menu/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +3 -4
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -4
- app-ng-runtime/components/navigation/menu/nav/nav.component.d.ts +3 -4
- app-ng-runtime/core/bundles/index.umd.js +1 -43
- app-ng-runtime/core/esm2020/public_api.mjs +2 -2
- app-ng-runtime/core/esm2020/utils/dom.mjs +1 -6
- app-ng-runtime/core/esm2020/utils/utils.mjs +1 -35
- app-ng-runtime/core/esm2020/utils/watcher.mjs +2 -2
- app-ng-runtime/core/fesm2015/index.mjs +2 -43
- app-ng-runtime/core/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/core/fesm2020/index.mjs +2 -43
- app-ng-runtime/core/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/core/public_api.d.ts +1 -1
- app-ng-runtime/core/utils/utils.d.ts +0 -2
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +0 -4
- app-ng-runtime/runtime/base/esm2020/services/dynamic-component-ref-provider.service.mjs +1 -4
- app-ng-runtime/runtime/base/esm2020/util/fragment-monitor.mjs +1 -2
- app-ng-runtime/runtime/base/fesm2015/index.mjs +0 -4
- app-ng-runtime/runtime/base/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/runtime/base/fesm2020/index.mjs +0 -4
- app-ng-runtime/runtime/base/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/runtime/base/util/fragment-monitor.d.ts +0 -1
- app-ng-runtime/runtime/dynamic/bundles/index.umd.js +0 -1
- app-ng-runtime/runtime/dynamic/esm2020/app/services/component-ref-provider.service.mjs +1 -2
- app-ng-runtime/runtime/dynamic/fesm2015/index.mjs +0 -1
- app-ng-runtime/runtime/dynamic/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/runtime/dynamic/fesm2020/index.mjs +0 -1
- app-ng-runtime/runtime/dynamic/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/variables/bundles/index.umd.js +1 -2
- app-ng-runtime/variables/esm2020/service/variables.service.mjs +2 -3
- app-ng-runtime/variables/fesm2015/index.mjs +1 -2
- app-ng-runtime/variables/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/variables/fesm2020/index.mjs +1 -2
- app-ng-runtime/variables/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,
|
|
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';
|
|
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,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,7 +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
|
-
this.viewParent =
|
|
996
|
+
this.viewParent = lView[8] === null ? this.viewParentApp : this.findParentlView(lView);
|
|
966
997
|
//console.log("---*************--context--*************---", lView[8]);
|
|
967
998
|
this.context = this.inj._lView[8];
|
|
968
999
|
this.displayType = config.displayType || DISPLAY_TYPE.BLOCK;
|
|
@@ -1328,7 +1359,7 @@ class BaseComponent {
|
|
|
1328
1359
|
getAttributes() {
|
|
1329
1360
|
let _tNodeAttrs = this.inj._tNode.attrs, actualAttrs = Array.from(this.nativeElement.attributes).map(attr => attr.name);
|
|
1330
1361
|
if (_tNodeAttrs === null) {
|
|
1331
|
-
return actualAttrs
|
|
1362
|
+
return actualAttrs;
|
|
1332
1363
|
}
|
|
1333
1364
|
_.forEach(_tNodeAttrs, (attr, i) => {
|
|
1334
1365
|
if (typeof attr === 'number') {
|
|
@@ -1342,20 +1373,15 @@ class BaseComponent {
|
|
|
1342
1373
|
}
|
|
1343
1374
|
}
|
|
1344
1375
|
});
|
|
1345
|
-
|
|
1346
|
-
Sorting attributes as properties like placeholder is not working when it is bound.
|
|
1347
|
-
placeholder and placeholder.bind two properties are coming in Array.
|
|
1348
|
-
When array is not sorted, initially placeholder.bind value is set then placeholder default value is updated.
|
|
1349
|
-
If array is sorted, placeholder.bind value will be set finally.
|
|
1350
|
-
This is caused because of the way we are storing attribute names in watcher registry map
|
|
1351
|
-
*/
|
|
1352
|
-
return actualAttrs.sort();
|
|
1376
|
+
return actualAttrs;
|
|
1353
1377
|
}
|
|
1354
1378
|
/**
|
|
1355
1379
|
* Process the attributes
|
|
1356
1380
|
*/
|
|
1357
1381
|
processAttrs() {
|
|
1358
|
-
|
|
1382
|
+
const attrs = this.getAttributes();
|
|
1383
|
+
let i = 0;
|
|
1384
|
+
_.map(attrs, (attrName) => {
|
|
1359
1385
|
let attrValue = this.nativeElement.attributes[attrName].value;
|
|
1360
1386
|
this.$attrs.set(attrName, attrValue);
|
|
1361
1387
|
this.processAttr(attrName, attrValue);
|
|
@@ -1698,7 +1724,20 @@ class LazyLoadDirective {
|
|
|
1698
1724
|
this.viewContainer = viewContainer;
|
|
1699
1725
|
let viewParentApp = inj ? inj.get(App) : inject(App);
|
|
1700
1726
|
let lView = inj._lView;
|
|
1701
|
-
|
|
1727
|
+
const getParentlView = (lView) => {
|
|
1728
|
+
let parentlView = lView[3];
|
|
1729
|
+
if (typeof lView[1] === "boolean") { // this is lContainer, not lView if this is boolean
|
|
1730
|
+
return getParentlView(parentlView);
|
|
1731
|
+
}
|
|
1732
|
+
let componentType = lView[1]["type"];
|
|
1733
|
+
if (componentType === 0 || componentType === 1) {
|
|
1734
|
+
return lView[8];
|
|
1735
|
+
}
|
|
1736
|
+
else { // when componentType == 2, then fetch parent again
|
|
1737
|
+
return getParentlView(parentlView);
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
this.viewParent = getParentlView(lView) || viewParentApp;
|
|
1702
1741
|
//this.context = (inj as any).view.context;
|
|
1703
1742
|
this.context = inj._lView[8];
|
|
1704
1743
|
}
|
|
@@ -4550,9 +4589,9 @@ class BaseFieldValidations {
|
|
|
4550
4589
|
if (this.widgetContext.ngform) {
|
|
4551
4590
|
this.widgetControl.setValidators(this.instance._validators);
|
|
4552
4591
|
const opt = {};
|
|
4553
|
-
// updating the value only when prevData is not equal to current value.
|
|
4592
|
+
// updating the value only when prevData is not equal to current value.
|
|
4554
4593
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4555
|
-
if (this.formwidget &&
|
|
4594
|
+
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4556
4595
|
opt['emitEvent'] = false;
|
|
4557
4596
|
}
|
|
4558
4597
|
this.widgetControl.updateValueAndValidity(opt);
|
|
@@ -4609,9 +4648,9 @@ class BaseFieldValidations {
|
|
|
4609
4648
|
this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);
|
|
4610
4649
|
if (this.widgetContext.ngform.touched) {
|
|
4611
4650
|
const opt = {};
|
|
4612
|
-
// updating the value only when prevData is not equal to current value.
|
|
4651
|
+
// updating the value only when prevData is not equal to current value.
|
|
4613
4652
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4614
|
-
if (this.formwidget &&
|
|
4653
|
+
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4615
4654
|
opt['emitEvent'] = false;
|
|
4616
4655
|
}
|
|
4617
4656
|
this.widgetControl.updateValueAndValidity(opt);
|
|
@@ -4678,9 +4717,9 @@ class BaseFieldValidations {
|
|
|
4678
4717
|
this.applyDefaultValidators();
|
|
4679
4718
|
if (this._asyncValidatorFn) {
|
|
4680
4719
|
const opt = {};
|
|
4681
|
-
// updating the value only when prevData is not equal to current value.
|
|
4720
|
+
// updating the value only when prevData is not equal to current value.
|
|
4682
4721
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4683
|
-
if (this.formwidget &&
|
|
4722
|
+
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4684
4723
|
opt['emitEvent'] = false;
|
|
4685
4724
|
}
|
|
4686
4725
|
this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);
|
|
@@ -4701,16 +4740,13 @@ class BaseFieldValidations {
|
|
|
4701
4740
|
this.applyDefaultValidators();
|
|
4702
4741
|
}, watchName));
|
|
4703
4742
|
}
|
|
4704
|
-
isNullOrEmptyOrFalsy(value) {
|
|
4705
|
-
return _.isEmpty(value);
|
|
4706
|
-
}
|
|
4707
4743
|
// invokes both custom sync validations and default validations.
|
|
4708
4744
|
applyDefaultValidators() {
|
|
4709
4745
|
const validators = this.getDefaultValidators();
|
|
4710
4746
|
const opt = {};
|
|
4711
|
-
// updating the value only when prevData is not equal to current value.
|
|
4747
|
+
// updating the value only when prevData is not equal to current value.
|
|
4712
4748
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4713
|
-
if (this.formwidget &&
|
|
4749
|
+
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4714
4750
|
opt['emitEvent'] = false;
|
|
4715
4751
|
}
|
|
4716
4752
|
this.widgetControl.setValidators(_.concat(this._syncValidators || [], validators));
|