@wavemaker/app-ng-runtime 11.6.0-next.NULL → 11.6.0-rc.157
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 -1
- app-ng-runtime/build-task/esm2020/data/form/form-field/form-field.build.mjs +2 -2
- app-ng-runtime/build-task/fesm2015/index.mjs +1 -1
- app-ng-runtime/build-task/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/build-task/fesm2020/index.mjs +1 -1
- app-ng-runtime/build-task/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +1 -0
- app-ng-runtime/components/base/esm2020/widgets/common/partial/partial.directive.mjs +2 -1
- app-ng-runtime/components/base/fesm2015/index.mjs +1 -0
- app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/base/fesm2020/index.mjs +1 -0
- app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/chart/bundles/index.umd.js +4 -2
- app-ng-runtime/components/chart/esm2020/chart.component.mjs +4 -2
- app-ng-runtime/components/chart/esm2020/chart.utils.mjs +2 -2
- app-ng-runtime/components/chart/fesm2015/index.mjs +4 -2
- app-ng-runtime/components/chart/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/chart/fesm2020/index.mjs +4 -2
- app-ng-runtime/components/chart/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/bundles/index.umd.js +41 -27
- app-ng-runtime/components/data/form/esm2020/form-field/form-field.directive.mjs +28 -19
- app-ng-runtime/components/data/form/esm2020/form.component.mjs +19 -7
- app-ng-runtime/components/data/form/fesm2015/index.mjs +45 -27
- app-ng-runtime/components/data/form/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/fesm2020/index.mjs +45 -24
- app-ng-runtime/components/data/form/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/form-field/form-field.directive.d.ts +2 -0
- app-ng-runtime/components/data/table/bundles/index.umd.js +7 -2
- app-ng-runtime/components/data/table/esm2020/table.component.mjs +8 -3
- app-ng-runtime/components/data/table/fesm2015/index.mjs +7 -2
- app-ng-runtime/components/data/table/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/fesm2020/index.mjs +7 -2
- app-ng-runtime/components/data/table/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +2 -1
- app-ng-runtime/components/input/calendar/bundles/index.umd.js +6 -0
- app-ng-runtime/components/input/calendar/esm2020/calendar.component.mjs +7 -1
- app-ng-runtime/components/input/calendar/fesm2015/index.mjs +6 -0
- app-ng-runtime/components/input/calendar/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/calendar/fesm2020/index.mjs +6 -0
- app-ng-runtime/components/input/calendar/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +55 -30
- app-ng-runtime/components/input/default/esm2020/caption-position.directive.mjs +2 -2
- app-ng-runtime/components/input/default/esm2020/select/select.component.mjs +58 -35
- app-ng-runtime/components/input/default/fesm2015/index.mjs +56 -31
- app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/fesm2020/index.mjs +53 -31
- app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/select/select.component.d.ts +4 -1
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +2 -2
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +50 -25
- app-ng-runtime/components/input/epoch/esm2020/base-date-time.component.mjs +36 -14
- app-ng-runtime/components/input/epoch/esm2020/date/date.component.mjs +5 -5
- app-ng-runtime/components/input/epoch/esm2020/date-time/date-time.component.mjs +6 -5
- app-ng-runtime/components/input/epoch/esm2020/time/time.component.mjs +7 -5
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs +50 -25
- app-ng-runtime/components/input/epoch/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs +50 -25
- app-ng-runtime/components/input/epoch/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +15 -5
- app-ng-runtime/components/navigation/menu/esm2020/menu.component.mjs +12 -4
- app-ng-runtime/components/navigation/menu/esm2020/menu.props.mjs +2 -1
- app-ng-runtime/components/navigation/menu/esm2020/nav/nav.component.mjs +3 -3
- app-ng-runtime/components/navigation/menu/esm2020/nav/nav.props.mjs +2 -1
- app-ng-runtime/components/navigation/menu/fesm2015/index.mjs +15 -5
- app-ng-runtime/components/navigation/menu/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/fesm2020/index.mjs +15 -5
- app-ng-runtime/components/navigation/menu/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -0
- app-ng-runtime/components/navigation/menu/nav/nav.component.d.ts +1 -0
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js +10 -9
- app-ng-runtime/components/navigation/popover/esm2020/popover.component.mjs +11 -10
- app-ng-runtime/components/navigation/popover/fesm2015/index.mjs +10 -9
- app-ng-runtime/components/navigation/popover/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/popover/fesm2020/index.mjs +10 -9
- app-ng-runtime/components/navigation/popover/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/prefab/bundles/index.umd.js +1 -0
- app-ng-runtime/components/prefab/esm2020/prefab-container/prefab-container.directive.mjs +2 -1
- app-ng-runtime/components/prefab/fesm2015/index.mjs +1 -0
- app-ng-runtime/components/prefab/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/prefab/fesm2020/index.mjs +1 -0
- app-ng-runtime/components/prefab/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +2 -1
- app-ng-runtime/core/esm2020/utils/utils.mjs +3 -2
- app-ng-runtime/core/fesm2015/index.mjs +2 -1
- app-ng-runtime/core/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/core/fesm2020/index.mjs +2 -1
- app-ng-runtime/core/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +5 -0
- app-ng-runtime/runtime/base/esm2020/components/base-page.component.mjs +6 -2
- app-ng-runtime/runtime/base/fesm2015/index.mjs +6 -1
- app-ng-runtime/runtime/base/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/runtime/base/fesm2020/index.mjs +5 -1
- app-ng-runtime/runtime/base/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +3 -3
- app-ng-runtime/variables/bundles/index.umd.js +13 -7
- app-ng-runtime/variables/esm2020/util/variable/variables.utils.mjs +14 -8
- app-ng-runtime/variables/fesm2015/index.mjs +13 -7
- app-ng-runtime/variables/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/variables/fesm2020/index.mjs +13 -7
- app-ng-runtime/variables/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/variables/util/variable/variables.utils.d.ts +1 -1
|
@@ -315,8 +315,21 @@ const findInvalidElement = ($formEle, ngForm) => {
|
|
|
315
315
|
$ele: $ele
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
+
// Function to get the active element markup based on widget type
|
|
319
|
+
const getActiveElement = (element) => {
|
|
320
|
+
const widgetType = element.getAttribute('widgettype');
|
|
321
|
+
switch (widgetType) {
|
|
322
|
+
case 'select':
|
|
323
|
+
return element.querySelector('select');
|
|
324
|
+
break;
|
|
325
|
+
case 'textarea':
|
|
326
|
+
return element.querySelector('textarea');
|
|
327
|
+
break;
|
|
328
|
+
default:
|
|
329
|
+
return element.querySelector('input');
|
|
330
|
+
}
|
|
331
|
+
};
|
|
318
332
|
const setTouchedState = (self, ngForm, fieldName) => {
|
|
319
|
-
var _a, _b;
|
|
320
333
|
if (ngForm.valid) {
|
|
321
334
|
return;
|
|
322
335
|
}
|
|
@@ -327,15 +340,13 @@ const setTouchedState = (self, ngForm, fieldName) => {
|
|
|
327
340
|
}
|
|
328
341
|
else {
|
|
329
342
|
let element = self.$element.find(`[wmformfield][key="${fieldName}"]`);
|
|
330
|
-
// checking for name attribute if the key attribute is not present on formfield
|
|
331
343
|
if (!element.length) {
|
|
332
344
|
element = self.$element.find(`[wmformfield][name="${fieldName}"]`);
|
|
333
345
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
346
|
+
element[0].setAttribute('__errormsg', element[0].getAttribute('__validationId'));
|
|
347
|
+
let activeElement = getActiveElement(element[0]);
|
|
348
|
+
activeElement === null || activeElement === void 0 ? void 0 : activeElement.setAttribute('aria-invalid', ngForm.invalid);
|
|
349
|
+
activeElement === null || activeElement === void 0 ? void 0 : activeElement.setAttribute('aria-describedby', element[0].getAttribute('__validationId'));
|
|
339
350
|
ngForm.markAsTouched();
|
|
340
351
|
}
|
|
341
352
|
};
|
|
@@ -1742,21 +1753,38 @@ class FormFieldDirective extends StylableComponent {
|
|
|
1742
1753
|
this._activeField = true;
|
|
1743
1754
|
$($evt.target).closest('.live-field').addClass('active');
|
|
1744
1755
|
}
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1756
|
+
// Function to get the active element markup based on widget type
|
|
1757
|
+
getActiveElement() {
|
|
1758
|
+
const widgetType = this.nativeElement.getAttribute('widgettype');
|
|
1759
|
+
switch (widgetType) {
|
|
1760
|
+
case 'select':
|
|
1761
|
+
return this.nativeElement.querySelector('select');
|
|
1762
|
+
break;
|
|
1763
|
+
case 'textarea':
|
|
1764
|
+
return this.nativeElement.querySelector('textarea');
|
|
1765
|
+
break;
|
|
1766
|
+
default:
|
|
1767
|
+
return this.nativeElement.querySelector('input');
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
setAriaAttributes() {
|
|
1771
|
+
const element = this.getActiveElement();
|
|
1750
1772
|
if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
|
|
1751
1773
|
this.nativeElement.setAttribute('__errormsg', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1752
|
-
|
|
1753
|
-
|
|
1774
|
+
element === null || element === void 0 ? void 0 : element.setAttribute('aria-invalid', `${this.ngform.controls[this._fieldName].invalid}`);
|
|
1775
|
+
element === null || element === void 0 ? void 0 : element.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1754
1776
|
}
|
|
1755
1777
|
else {
|
|
1756
1778
|
this.nativeElement.removeAttribute('__errormsg');
|
|
1757
|
-
|
|
1758
|
-
|
|
1779
|
+
element === null || element === void 0 ? void 0 : element.removeAttribute('aria-invalid');
|
|
1780
|
+
element === null || element === void 0 ? void 0 : element.removeAttribute('aria-describedby');
|
|
1759
1781
|
}
|
|
1782
|
+
}
|
|
1783
|
+
_onBlurField($evt) {
|
|
1784
|
+
$($evt.target).closest('.live-field').removeClass('active');
|
|
1785
|
+
const ele = this.nativeElement.querySelector('p.text-danger');
|
|
1786
|
+
// Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
|
|
1787
|
+
this.setAriaAttributes();
|
|
1760
1788
|
this._activeField = false;
|
|
1761
1789
|
this._triggeredByUser = false;
|
|
1762
1790
|
this._clicktriggeredByUser = false;
|
|
@@ -1955,7 +1983,6 @@ class FormFieldDirective extends StylableComponent {
|
|
|
1955
1983
|
}
|
|
1956
1984
|
// On field value change, propagate event to parent form
|
|
1957
1985
|
onValueChange(val) {
|
|
1958
|
-
var _a, _b, _c, _d;
|
|
1959
1986
|
if (!this.isDestroyed) {
|
|
1960
1987
|
const captionEl = $(this.nativeElement).find('.caption-floating');
|
|
1961
1988
|
if (captionEl.length > 0) {
|
|
@@ -1966,16 +1993,7 @@ class FormFieldDirective extends StylableComponent {
|
|
|
1966
1993
|
this.app.notify('captionPositionAnimate', { displayVal: hasValue, nativeEl: captionEl, isSelectMultiple: this.formWidget && this.formWidget.multiple, isFocused: this._activeField });
|
|
1967
1994
|
}
|
|
1968
1995
|
// Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
|
|
1969
|
-
|
|
1970
|
-
this.nativeElement.setAttribute('__errormsg', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1971
|
-
(_a = this.nativeElement.querySelector('input')) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-invalid', this._triggeredByUser && this.ngform.controls[this._fieldName].invalid ? 'true' : 'false');
|
|
1972
|
-
(_b = this.nativeElement.querySelector('input')) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1973
|
-
}
|
|
1974
|
-
else {
|
|
1975
|
-
this.nativeElement.removeAttribute('__errormsg');
|
|
1976
|
-
(_c = this.nativeElement.querySelector('input')) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-invalid');
|
|
1977
|
-
(_d = this.nativeElement.querySelector('input')) === null || _d === void 0 ? void 0 : _d.removeAttribute('aria-describedby');
|
|
1978
|
-
}
|
|
1996
|
+
this.setAriaAttributes();
|
|
1979
1997
|
this.form.onFieldValueChange(this, val);
|
|
1980
1998
|
this.notifyChanges();
|
|
1981
1999
|
// Do mark as touched, only incase when user has entered an input but not through the script. Hence added mousedown event check
|