@wavemaker/app-ng-runtime 11.6.0-next.40753 → 11.6.0-next.41002

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 (97) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +1 -1
  2. app-ng-runtime/build-task/esm2020/data/form/form-field/form-field.build.mjs +2 -2
  3. app-ng-runtime/build-task/fesm2015/index.mjs +1 -1
  4. app-ng-runtime/build-task/fesm2015/index.mjs.map +1 -1
  5. app-ng-runtime/build-task/fesm2020/index.mjs +1 -1
  6. app-ng-runtime/build-task/fesm2020/index.mjs.map +1 -1
  7. app-ng-runtime/components/base/bundles/index.umd.js +1 -0
  8. app-ng-runtime/components/base/esm2020/widgets/common/partial/partial.directive.mjs +2 -1
  9. app-ng-runtime/components/base/fesm2015/index.mjs +1 -0
  10. app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
  11. app-ng-runtime/components/base/fesm2020/index.mjs +1 -0
  12. app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
  13. app-ng-runtime/components/chart/bundles/index.umd.js +4 -2
  14. app-ng-runtime/components/chart/esm2020/chart.component.mjs +4 -2
  15. app-ng-runtime/components/chart/esm2020/chart.utils.mjs +2 -2
  16. app-ng-runtime/components/chart/fesm2015/index.mjs +4 -2
  17. app-ng-runtime/components/chart/fesm2015/index.mjs.map +1 -1
  18. app-ng-runtime/components/chart/fesm2020/index.mjs +4 -2
  19. app-ng-runtime/components/chart/fesm2020/index.mjs.map +1 -1
  20. app-ng-runtime/components/data/form/bundles/index.umd.js +41 -27
  21. app-ng-runtime/components/data/form/esm2020/form-field/form-field.directive.mjs +28 -19
  22. app-ng-runtime/components/data/form/esm2020/form.component.mjs +19 -7
  23. app-ng-runtime/components/data/form/fesm2015/index.mjs +45 -27
  24. app-ng-runtime/components/data/form/fesm2015/index.mjs.map +1 -1
  25. app-ng-runtime/components/data/form/fesm2020/index.mjs +45 -24
  26. app-ng-runtime/components/data/form/fesm2020/index.mjs.map +1 -1
  27. app-ng-runtime/components/data/form/form-field/form-field.directive.d.ts +2 -0
  28. app-ng-runtime/components/data/table/bundles/index.umd.js +3 -2
  29. app-ng-runtime/components/data/table/esm2020/table.component.mjs +4 -3
  30. app-ng-runtime/components/data/table/fesm2015/index.mjs +3 -2
  31. app-ng-runtime/components/data/table/fesm2015/index.mjs.map +1 -1
  32. app-ng-runtime/components/data/table/fesm2020/index.mjs +3 -2
  33. app-ng-runtime/components/data/table/fesm2020/index.mjs.map +1 -1
  34. app-ng-runtime/components/data/table/table.component.d.ts +1 -1
  35. app-ng-runtime/components/input/default/bundles/index.umd.js +55 -30
  36. app-ng-runtime/components/input/default/esm2020/caption-position.directive.mjs +2 -2
  37. app-ng-runtime/components/input/default/esm2020/select/select.component.mjs +58 -35
  38. app-ng-runtime/components/input/default/fesm2015/index.mjs +56 -31
  39. app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
  40. app-ng-runtime/components/input/default/fesm2020/index.mjs +53 -31
  41. app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
  42. app-ng-runtime/components/input/default/select/select.component.d.ts +4 -1
  43. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +2 -2
  44. app-ng-runtime/components/input/epoch/bundles/index.umd.js +50 -25
  45. app-ng-runtime/components/input/epoch/esm2020/base-date-time.component.mjs +36 -14
  46. app-ng-runtime/components/input/epoch/esm2020/date/date.component.mjs +5 -5
  47. app-ng-runtime/components/input/epoch/esm2020/date-time/date-time.component.mjs +6 -5
  48. app-ng-runtime/components/input/epoch/esm2020/time/time.component.mjs +7 -5
  49. app-ng-runtime/components/input/epoch/fesm2015/index.mjs +50 -25
  50. app-ng-runtime/components/input/epoch/fesm2015/index.mjs.map +1 -1
  51. app-ng-runtime/components/input/epoch/fesm2020/index.mjs +50 -25
  52. app-ng-runtime/components/input/epoch/fesm2020/index.mjs.map +1 -1
  53. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +15 -5
  54. app-ng-runtime/components/navigation/menu/esm2020/menu.component.mjs +12 -4
  55. app-ng-runtime/components/navigation/menu/esm2020/menu.props.mjs +2 -1
  56. app-ng-runtime/components/navigation/menu/esm2020/nav/nav.component.mjs +3 -3
  57. app-ng-runtime/components/navigation/menu/esm2020/nav/nav.props.mjs +2 -1
  58. app-ng-runtime/components/navigation/menu/fesm2015/index.mjs +15 -5
  59. app-ng-runtime/components/navigation/menu/fesm2015/index.mjs.map +1 -1
  60. app-ng-runtime/components/navigation/menu/fesm2020/index.mjs +15 -5
  61. app-ng-runtime/components/navigation/menu/fesm2020/index.mjs.map +1 -1
  62. app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -0
  63. app-ng-runtime/components/navigation/menu/nav/nav.component.d.ts +1 -0
  64. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +10 -9
  65. app-ng-runtime/components/navigation/popover/esm2020/popover.component.mjs +11 -10
  66. app-ng-runtime/components/navigation/popover/fesm2015/index.mjs +10 -9
  67. app-ng-runtime/components/navigation/popover/fesm2015/index.mjs.map +1 -1
  68. app-ng-runtime/components/navigation/popover/fesm2020/index.mjs +10 -9
  69. app-ng-runtime/components/navigation/popover/fesm2020/index.mjs.map +1 -1
  70. app-ng-runtime/components/prefab/bundles/index.umd.js +1 -0
  71. app-ng-runtime/components/prefab/esm2020/prefab-container/prefab-container.directive.mjs +2 -1
  72. app-ng-runtime/components/prefab/fesm2015/index.mjs +1 -0
  73. app-ng-runtime/components/prefab/fesm2015/index.mjs.map +1 -1
  74. app-ng-runtime/components/prefab/fesm2020/index.mjs +1 -0
  75. app-ng-runtime/components/prefab/fesm2020/index.mjs.map +1 -1
  76. app-ng-runtime/core/bundles/index.umd.js +2 -1
  77. app-ng-runtime/core/esm2020/utils/utils.mjs +3 -2
  78. app-ng-runtime/core/fesm2015/index.mjs +2 -1
  79. app-ng-runtime/core/fesm2015/index.mjs.map +1 -1
  80. app-ng-runtime/core/fesm2020/index.mjs +2 -1
  81. app-ng-runtime/core/fesm2020/index.mjs.map +1 -1
  82. app-ng-runtime/package.json +1 -1
  83. app-ng-runtime/runtime/base/bundles/index.umd.js +2 -0
  84. app-ng-runtime/runtime/base/esm2020/components/base-page.component.mjs +3 -1
  85. app-ng-runtime/runtime/base/fesm2015/index.mjs +2 -0
  86. app-ng-runtime/runtime/base/fesm2015/index.mjs.map +1 -1
  87. app-ng-runtime/runtime/base/fesm2020/index.mjs +2 -0
  88. app-ng-runtime/runtime/base/fesm2020/index.mjs.map +1 -1
  89. app-ng-runtime/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -1
  90. app-ng-runtime/scripts/datatable/datatable.js +3 -3
  91. app-ng-runtime/variables/bundles/index.umd.js +13 -7
  92. app-ng-runtime/variables/esm2020/util/variable/variables.utils.mjs +14 -8
  93. app-ng-runtime/variables/fesm2015/index.mjs +13 -7
  94. app-ng-runtime/variables/fesm2015/index.mjs.map +1 -1
  95. app-ng-runtime/variables/fesm2020/index.mjs +13 -7
  96. app-ng-runtime/variables/fesm2020/index.mjs.map +1 -1
  97. 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
- if (element.length) {
295
- element[0].setAttribute('__errormsg', element[0].getAttribute('__validationId'));
296
- element[0].querySelector('input')?.setAttribute('aria-invalid', ngForm.invalid);
297
- element[0].querySelector('input')?.setAttribute('aria-describedby', element[0].getAttribute('__validationId'));
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
  };
@@ -1674,20 +1686,38 @@ class FormFieldDirective extends StylableComponent {
1674
1686
  this._activeField = true;
1675
1687
  $($evt.target).closest('.live-field').addClass('active');
1676
1688
  }
1677
- _onBlurField($evt) {
1678
- $($evt.target).closest('.live-field').removeClass('active');
1679
- const ele = this.nativeElement.querySelector('p.text-danger');
1680
- // Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
1689
+ // Function to get the active element markup based on widget type
1690
+ getActiveElement() {
1691
+ const widgetType = this.nativeElement.getAttribute('widgettype');
1692
+ switch (widgetType) {
1693
+ case 'select':
1694
+ return this.nativeElement.querySelector('select');
1695
+ break;
1696
+ case 'textarea':
1697
+ return this.nativeElement.querySelector('textarea');
1698
+ break;
1699
+ default:
1700
+ return this.nativeElement.querySelector('input');
1701
+ }
1702
+ }
1703
+ setAriaAttributes() {
1704
+ const element = this.getActiveElement();
1681
1705
  if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
1682
1706
  this.nativeElement.setAttribute('__errormsg', `${this.nativeElement.getAttribute('__validationId')}`);
1683
- this.nativeElement.querySelector('input')?.setAttribute('aria-invalid', `${this.ngform.controls[this._fieldName].invalid}`);
1684
- this.nativeElement.querySelector('input')?.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
1707
+ element?.setAttribute('aria-invalid', `${this.ngform.controls[this._fieldName].invalid}`);
1708
+ element?.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
1685
1709
  }
1686
1710
  else {
1687
1711
  this.nativeElement.removeAttribute('__errormsg');
1688
- this.nativeElement.querySelector('input')?.removeAttribute('aria-invalid');
1689
- this.nativeElement.querySelector('input')?.removeAttribute('aria-describedby');
1712
+ element?.removeAttribute('aria-invalid');
1713
+ element?.removeAttribute('aria-describedby');
1690
1714
  }
1715
+ }
1716
+ _onBlurField($evt) {
1717
+ $($evt.target).closest('.live-field').removeClass('active');
1718
+ const ele = this.nativeElement.querySelector('p.text-danger');
1719
+ // Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
1720
+ this.setAriaAttributes();
1691
1721
  this._activeField = false;
1692
1722
  this._triggeredByUser = false;
1693
1723
  this._clicktriggeredByUser = false;
@@ -1896,16 +1926,7 @@ class FormFieldDirective extends StylableComponent {
1896
1926
  this.app.notify('captionPositionAnimate', { displayVal: hasValue, nativeEl: captionEl, isSelectMultiple: this.formWidget && this.formWidget.multiple, isFocused: this._activeField });
1897
1927
  }
1898
1928
  // Fix for [WMS-23959]: ADA issue - adding aria-describedby, aria-invalid, __errormsg attributes only when the form field is invalid , else removing the attributes
1899
- if (this.ngform.controls[this._fieldName].invalid && this.ngform.controls[this._fieldName].touched && this.form.isUpdateMode) {
1900
- this.nativeElement.setAttribute('__errormsg', `${this.nativeElement.getAttribute('__validationId')}`);
1901
- this.nativeElement.querySelector('input')?.setAttribute('aria-invalid', this._triggeredByUser && this.ngform.controls[this._fieldName].invalid ? 'true' : 'false');
1902
- this.nativeElement.querySelector('input')?.setAttribute('aria-describedby', `${this.nativeElement.getAttribute('__validationId')}`);
1903
- }
1904
- else {
1905
- this.nativeElement.removeAttribute('__errormsg');
1906
- this.nativeElement.querySelector('input')?.removeAttribute('aria-invalid');
1907
- this.nativeElement.querySelector('input')?.removeAttribute('aria-describedby');
1908
- }
1929
+ this.setAriaAttributes();
1909
1930
  this.form.onFieldValueChange(this, val);
1910
1931
  this.notifyChanges();
1911
1932
  // Do mark as touched, only incase when user has entered an input but not through the script. Hence added mousedown event check