@wavemaker/app-ng-runtime 11.6.0-next.140456 → 11.6.0-next.140458
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/esm2022/data/form/form-field/form-field.build.mjs +3 -3
- app-ng-runtime/build-task/fesm2022/index.mjs +1 -1
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/chart/bundles/index.umd.js +1 -1
- app-ng-runtime/components/chart/esm2022/chart.utils.mjs +2 -2
- app-ng-runtime/components/chart/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/chart/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/bundles/index.umd.js +41 -24
- app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +31 -22
- app-ng-runtime/components/data/form/esm2022/form.component.mjs +22 -10
- app-ng-runtime/components/data/form/fesm2022/index.mjs +45 -24
- app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/form-field/form-field.directive.d.ts +3 -1
- app-ng-runtime/components/data/form/form.component.d.ts +2 -2
- app-ng-runtime/components/data/table/bundles/index.umd.js +6 -2
- app-ng-runtime/components/data/table/esm2022/table.component.mjs +10 -7
- app-ng-runtime/components/data/table/fesm2022/index.mjs +6 -2
- app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +4 -4
- app-ng-runtime/components/input/calendar/bundles/index.umd.js +6 -0
- app-ng-runtime/components/input/calendar/calendar.component.d.ts +1 -1
- app-ng-runtime/components/input/calendar/esm2022/calendar.component.mjs +8 -2
- app-ng-runtime/components/input/calendar/fesm2022/index.mjs +6 -0
- app-ng-runtime/components/input/calendar/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +52 -30
- app-ng-runtime/components/input/default/caption-position.directive.d.ts +1 -1
- app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +2 -2
- app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +60 -37
- app-ng-runtime/components/input/default/fesm2022/index.mjs +53 -31
- app-ng-runtime/components/input/default/fesm2022/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 +11 -11
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +112 -87
- app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +100 -78
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +5 -5
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +6 -5
- app-ng-runtime/components/input/epoch/esm2022/time/time.component.mjs +7 -5
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +112 -87
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +15 -5
- app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +14 -6
- app-ng-runtime/components/navigation/menu/esm2022/menu.props.mjs +2 -1
- app-ng-runtime/components/navigation/menu/esm2022/nav/nav.component.mjs +3 -3
- app-ng-runtime/components/navigation/menu/esm2022/nav/nav.props.mjs +2 -1
- app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +15 -5
- app-ng-runtime/components/navigation/menu/fesm2022/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 +8 -8
- app-ng-runtime/components/navigation/popover/esm2022/popover.component.mjs +11 -11
- app-ng-runtime/components/navigation/popover/fesm2022/index.mjs +8 -8
- app-ng-runtime/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +13 -1
- app-ng-runtime/core/esm2022/utils/expression-parser.mjs +13 -2
- app-ng-runtime/core/esm2022/utils/utils.mjs +4 -3
- app-ng-runtime/core/fesm2022/index.mjs +14 -2
- app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +4 -0
- app-ng-runtime/runtime/base/components/base-page.component.d.ts +2 -3
- app-ng-runtime/runtime/base/esm2022/components/base-page.component.mjs +7 -4
- app-ng-runtime/runtime/base/fesm2022/index.mjs +5 -1
- app-ng-runtime/runtime/base/fesm2022/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 +5 -2
- app-ng-runtime/variables/bundles/index.umd.js +13 -7
- app-ng-runtime/variables/esm2022/util/variable/variables.utils.mjs +15 -9
- app-ng-runtime/variables/fesm2022/index.mjs +13 -7
- app-ng-runtime/variables/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/variables/util/variable/variables.utils.d.ts +1 -1
|
@@ -276,6 +276,20 @@ const findInvalidElement = ($formEle, ngForm) => {
|
|
|
276
276
|
$ele: $ele
|
|
277
277
|
};
|
|
278
278
|
};
|
|
279
|
+
// Function to get the active element markup based on widget type
|
|
280
|
+
const getActiveElement = (element) => {
|
|
281
|
+
const widgetType = element.getAttribute('widgettype');
|
|
282
|
+
switch (widgetType) {
|
|
283
|
+
case 'select':
|
|
284
|
+
return element.querySelector('select');
|
|
285
|
+
break;
|
|
286
|
+
case 'textarea':
|
|
287
|
+
return element.querySelector('textarea');
|
|
288
|
+
break;
|
|
289
|
+
default:
|
|
290
|
+
return element.querySelector('input');
|
|
291
|
+
}
|
|
292
|
+
};
|
|
279
293
|
const setTouchedState = (self, ngForm, fieldName) => {
|
|
280
294
|
if (ngForm.valid) {
|
|
281
295
|
return;
|
|
@@ -287,15 +301,13 @@ const setTouchedState = (self, ngForm, fieldName) => {
|
|
|
287
301
|
}
|
|
288
302
|
else {
|
|
289
303
|
let element = self.$element.find(`[wmformfield][key="${fieldName}"]`);
|
|
290
|
-
// checking for name attribute if the key attribute is not present on formfield
|
|
291
304
|
if (!element.length) {
|
|
292
305
|
element = self.$element.find(`[wmformfield][name="${fieldName}"]`);
|
|
293
306
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
307
|
+
element[0].setAttribute('__errormsg', element[0].getAttribute('__validationId'));
|
|
308
|
+
let activeElement = getActiveElement(element[0]);
|
|
309
|
+
activeElement?.setAttribute('aria-invalid', ngForm.invalid);
|
|
310
|
+
activeElement?.setAttribute('aria-describedby', element[0].getAttribute('__validationId'));
|
|
299
311
|
ngForm.markAsTouched();
|
|
300
312
|
}
|
|
301
313
|
};
|
|
@@ -1675,20 +1687,38 @@ class FormFieldDirective extends StylableComponent {
|
|
|
1675
1687
|
this._activeField = true;
|
|
1676
1688
|
$($evt.target).closest('.live-field').addClass('active');
|
|
1677
1689
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1690
|
+
// Function to get the active element markup based on widget type
|
|
1691
|
+
getActiveElement() {
|
|
1692
|
+
const widgetType = this.nativeElement.getAttribute('widgettype');
|
|
1693
|
+
switch (widgetType) {
|
|
1694
|
+
case 'select':
|
|
1695
|
+
return this.nativeElement.querySelector('select');
|
|
1696
|
+
break;
|
|
1697
|
+
case 'textarea':
|
|
1698
|
+
return this.nativeElement.querySelector('textarea');
|
|
1699
|
+
break;
|
|
1700
|
+
default:
|
|
1701
|
+
return this.nativeElement.querySelector('input');
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
setAriaAttributes() {
|
|
1705
|
+
const element = this.getActiveElement();
|
|
1682
1706
|
if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
|
|
1683
1707
|
this.nativeElement.setAttribute('__errormsg', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1684
|
-
|
|
1685
|
-
|
|
1708
|
+
element?.setAttribute('aria-invalid', `${this.ngform.controls[this._fieldName].invalid}`);
|
|
1709
|
+
element?.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1686
1710
|
}
|
|
1687
1711
|
else {
|
|
1688
1712
|
this.nativeElement.removeAttribute('__errormsg');
|
|
1689
|
-
|
|
1690
|
-
|
|
1713
|
+
element?.removeAttribute('aria-invalid');
|
|
1714
|
+
element?.removeAttribute('aria-describedby');
|
|
1691
1715
|
}
|
|
1716
|
+
}
|
|
1717
|
+
_onBlurField($evt) {
|
|
1718
|
+
$($evt.target).closest('.live-field').removeClass('active');
|
|
1719
|
+
const ele = this.nativeElement.querySelector('p.text-danger');
|
|
1720
|
+
// Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
|
|
1721
|
+
this.setAriaAttributes();
|
|
1692
1722
|
this._activeField = false;
|
|
1693
1723
|
this._triggeredByUser = false;
|
|
1694
1724
|
this._clicktriggeredByUser = false;
|
|
@@ -1897,16 +1927,7 @@ class FormFieldDirective extends StylableComponent {
|
|
|
1897
1927
|
this.app.notify('captionPositionAnimate', { displayVal: hasValue, nativeEl: captionEl, isSelectMultiple: this.formWidget && this.formWidget.multiple, isFocused: this._activeField });
|
|
1898
1928
|
}
|
|
1899
1929
|
// Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
|
|
1900
|
-
|
|
1901
|
-
this.nativeElement.setAttribute('__errormsg', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1902
|
-
this.nativeElement.querySelector('input')?.setAttribute('aria-invalid', this._triggeredByUser && this.ngform.controls[this._fieldName].invalid ? 'true' : 'false');
|
|
1903
|
-
this.nativeElement.querySelector('input')?.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
|
|
1904
|
-
}
|
|
1905
|
-
else {
|
|
1906
|
-
this.nativeElement.removeAttribute('__errormsg');
|
|
1907
|
-
this.nativeElement.querySelector('input')?.removeAttribute('aria-invalid');
|
|
1908
|
-
this.nativeElement.querySelector('input')?.removeAttribute('aria-describedby');
|
|
1909
|
-
}
|
|
1930
|
+
this.setAriaAttributes();
|
|
1910
1931
|
this.form.onFieldValueChange(this, val);
|
|
1911
1932
|
this.notifyChanges();
|
|
1912
1933
|
// Do mark as touched, only incase when user has entered an input but not through the script. Hence added mousedown event check
|