@wavemaker/app-ng-runtime 11.9.0-next.24953 → 11.9.0-next.24958

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 (98) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +3 -3
  2. app-ng-runtime/build-task/esm2022/basic/default/anchor/anchor.build.mjs +2 -2
  3. app-ng-runtime/build-task/esm2022/basic/default/html/html.build.mjs +2 -2
  4. app-ng-runtime/build-task/esm2022/input/default/switch/switch.build.mjs +2 -2
  5. app-ng-runtime/build-task/fesm2022/index.mjs +3 -3
  6. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  7. app-ng-runtime/components/base/bundles/index.umd.js +1 -1
  8. app-ng-runtime/components/base/esm2022/pipes/custom-pipes.mjs +3 -3
  9. app-ng-runtime/components/base/fesm2022/index.mjs +1 -1
  10. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  11. app-ng-runtime/components/base/pipes/custom-pipes.d.ts +1 -1
  12. app-ng-runtime/components/basic/default/anchor/anchor.component.d.ts +1 -0
  13. app-ng-runtime/components/basic/default/bundles/index.umd.js +10 -8
  14. app-ng-runtime/components/basic/default/esm2022/anchor/anchor.component.mjs +4 -4
  15. app-ng-runtime/components/basic/default/esm2022/audio/audio.component.mjs +5 -5
  16. app-ng-runtime/components/basic/default/esm2022/video/video.component.mjs +5 -4
  17. app-ng-runtime/components/basic/default/esm2022/video/video.props.mjs +2 -1
  18. app-ng-runtime/components/basic/default/fesm2022/index.mjs +10 -8
  19. app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
  20. app-ng-runtime/components/basic/default/video/video.component.d.ts +1 -0
  21. app-ng-runtime/components/basic/progress/bundles/index.umd.js +4 -4
  22. app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +3 -3
  23. app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +3 -3
  24. app-ng-runtime/components/basic/progress/fesm2022/index.mjs +4 -4
  25. app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
  26. app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +1 -0
  27. app-ng-runtime/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +2 -1
  28. app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs +1 -0
  29. app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
  30. app-ng-runtime/components/basic/search/bundles/index.umd.js +7 -7
  31. app-ng-runtime/components/basic/search/esm2022/search.component.mjs +8 -8
  32. app-ng-runtime/components/basic/search/fesm2022/index.mjs +7 -7
  33. app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
  34. app-ng-runtime/components/data/pagination/bundles/index.umd.js +2 -0
  35. app-ng-runtime/components/data/pagination/esm2022/pagination.component.mjs +3 -1
  36. app-ng-runtime/components/data/pagination/fesm2022/index.mjs +2 -0
  37. app-ng-runtime/components/data/pagination/fesm2022/index.mjs.map +1 -1
  38. app-ng-runtime/components/data/table/bundles/index.umd.js +24 -3
  39. app-ng-runtime/components/data/table/esm2022/table.component.mjs +24 -4
  40. app-ng-runtime/components/data/table/esm2022/table.props.mjs +2 -1
  41. app-ng-runtime/components/data/table/fesm2022/index.mjs +25 -4
  42. app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
  43. app-ng-runtime/components/data/table/table.component.d.ts +5 -0
  44. app-ng-runtime/components/dialogs/alert-dialog/bundles/index.umd.js +6 -4
  45. app-ng-runtime/components/dialogs/alert-dialog/esm2022/alert-dialog.component.mjs +7 -5
  46. app-ng-runtime/components/dialogs/alert-dialog/fesm2022/index.mjs +6 -4
  47. app-ng-runtime/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
  48. app-ng-runtime/components/dialogs/confirm-dialog/bundles/index.umd.js +8 -4
  49. app-ng-runtime/components/dialogs/confirm-dialog/esm2022/confirm-dialog.component.mjs +9 -5
  50. app-ng-runtime/components/dialogs/confirm-dialog/fesm2022/index.mjs +8 -4
  51. app-ng-runtime/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
  52. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +8 -3
  53. app-ng-runtime/components/dialogs/default/dialog-header/dialog-header.component.d.ts +2 -1
  54. app-ng-runtime/components/dialogs/default/esm2022/dialog-header/dialog-header.component.mjs +9 -4
  55. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +8 -3
  56. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  57. app-ng-runtime/components/dialogs/design-dialog/bundles/index.umd.js +4 -4
  58. app-ng-runtime/components/dialogs/design-dialog/esm2022/dialog.component.mjs +5 -5
  59. app-ng-runtime/components/dialogs/design-dialog/fesm2022/index.mjs +4 -4
  60. app-ng-runtime/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
  61. app-ng-runtime/components/dialogs/iframe-dialog/bundles/index.umd.js +9 -5
  62. app-ng-runtime/components/dialogs/iframe-dialog/esm2022/iframe-dialog.component.mjs +10 -6
  63. app-ng-runtime/components/dialogs/iframe-dialog/fesm2022/index.mjs +9 -5
  64. app-ng-runtime/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
  65. app-ng-runtime/components/dialogs/partial-dialog/bundles/index.umd.js +9 -5
  66. app-ng-runtime/components/dialogs/partial-dialog/esm2022/partial-dialog.component.mjs +10 -6
  67. app-ng-runtime/components/dialogs/partial-dialog/fesm2022/index.mjs +9 -5
  68. app-ng-runtime/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
  69. app-ng-runtime/components/input/chips/bundles/index.umd.js +2 -2
  70. app-ng-runtime/components/input/chips/esm2022/chips.component.mjs +3 -3
  71. app-ng-runtime/components/input/chips/fesm2022/index.mjs +2 -2
  72. app-ng-runtime/components/input/chips/fesm2022/index.mjs.map +1 -1
  73. app-ng-runtime/components/input/color-picker/bundles/index.umd.js +1 -0
  74. app-ng-runtime/components/input/color-picker/esm2022/color-picker.component.mjs +2 -1
  75. app-ng-runtime/components/input/color-picker/fesm2022/index.mjs +1 -0
  76. app-ng-runtime/components/input/color-picker/fesm2022/index.mjs.map +1 -1
  77. app-ng-runtime/components/input/default/bundles/index.umd.js +68 -28
  78. app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +8 -7
  79. app-ng-runtime/components/input/default/esm2022/number/number.props.mjs +2 -1
  80. app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +6 -6
  81. app-ng-runtime/components/input/default/esm2022/switch/switch.component.mjs +6 -5
  82. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +50 -13
  83. app-ng-runtime/components/input/default/fesm2022/index.mjs +67 -27
  84. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  85. app-ng-runtime/components/input/default/select/select.component.d.ts +1 -0
  86. app-ng-runtime/components/input/default/text/locale/number-locale.d.ts +1 -0
  87. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +127 -95
  88. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +125 -96
  89. app-ng-runtime/components/input/file-upload/esm2022/file-upload.props.mjs +4 -1
  90. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +127 -95
  91. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  92. app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +3 -7
  93. app-ng-runtime/core/bundles/index.umd.js +5 -5
  94. app-ng-runtime/core/esm2022/utils/utils.mjs +2 -3
  95. app-ng-runtime/core/fesm2022/index.mjs +1 -2
  96. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  97. app-ng-runtime/core/utils/utils.d.ts +0 -1
  98. app-ng-runtime/package.json +1 -1
@@ -1241,6 +1241,7 @@ const numberProps = new Map([
1241
1241
  ['trailingzero', { value: false, ...PROP_BOOLEAN }],
1242
1242
  ['updateon', PROP_STRING],
1243
1243
  ['inputmode', { value: 'natural', ...PROP_STRING }],
1244
+ ['decimalplaces', PROP_NUMBER],
1244
1245
  ['conditionalclass', PROP_ANY],
1245
1246
  ['conditionalstyle', PROP_ANY]
1246
1247
  ]);
@@ -1367,8 +1368,27 @@ let NumberLocale = class NumberLocale extends BaseInput {
1367
1368
  if (this.isDefaultQuery) {
1368
1369
  const isLocalizedNumber = isString(value) && includes(value, this.DECIMAL);
1369
1370
  const parts = isLocalizedNumber ? value.split(this.DECIMAL) : isString(value) && value.split('.');
1370
- this.decimalValue = parts[1] || '';
1371
- value = isLocalizedNumber ? value : this.transformNumber(value);
1371
+ let decimalPlacesAttrVal = this.getAttr('decimalplaces');
1372
+ const decimalplaces = decimalPlacesAttrVal !== '' && decimalPlacesAttrVal !== undefined ? Number(decimalPlacesAttrVal) : NaN;
1373
+ if (this.inputmode === INPUTMODE.NATURAL && !isNaN(decimalplaces)) {
1374
+ if (decimalplaces === 0) {
1375
+ this.decimalValue = '';
1376
+ value = isLocalizedNumber ? parts[0] : this.transformNumber(parts[0]);
1377
+ }
1378
+ if (decimalplaces > 0) {
1379
+ this.decimalValue = parts[1] && parts[1].substring(0, decimalplaces) || '';
1380
+ if (isLocalizedNumber) {
1381
+ value = this.decimalValue.length ? `${parts[0]}${this.DECIMAL}${this.decimalValue}` : parts[0];
1382
+ }
1383
+ else {
1384
+ value = Number.parseFloat(String(value)).toFixed(decimalplaces);
1385
+ }
1386
+ }
1387
+ }
1388
+ else {
1389
+ this.decimalValue = parts[1] || '';
1390
+ value = isLocalizedNumber ? value : this.transformNumber(value);
1391
+ }
1372
1392
  }
1373
1393
  const numberReg = /\d/;
1374
1394
  const strVal = value.toString();
@@ -1417,8 +1437,14 @@ let NumberLocale = class NumberLocale extends BaseInput {
1417
1437
  */
1418
1438
  isValid(val) {
1419
1439
  // id number is infinite then consider it as invalid value
1420
- if (isNaN(val) || !isFinite(val) || (!Number.isInteger(this.step) &&
1421
- this.countDecimals(val) > this.countDecimals(this.step))) {
1440
+ let invalidDecimalPlaces = false;
1441
+ if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) {
1442
+ invalidDecimalPlaces = this.countDecimals(val) > this.decimalplaces;
1443
+ }
1444
+ else if (!Number.isInteger(this.step) && this.countDecimals(val) > this.countDecimals(this.step)) {
1445
+ invalidDecimalPlaces = true;
1446
+ }
1447
+ if (isNaN(val) || !isFinite(val) || invalidDecimalPlaces) {
1422
1448
  this.isInvalidNumber = true;
1423
1449
  return false;
1424
1450
  }
@@ -1527,6 +1553,9 @@ let NumberLocale = class NumberLocale extends BaseInput {
1527
1553
  }
1528
1554
  // This function returns the step length set in the studio
1529
1555
  stepLength() {
1556
+ if (this.inputmode === 'INPUTMODE.NATURAL' && !isNaN(this.decimalplaces) && this.decimalplaces >= 0) {
1557
+ return this.decimalplaces;
1558
+ }
1530
1559
  const stepLen = this.step.toString().split('.');
1531
1560
  if (stepLen.length === 1) {
1532
1561
  return;
@@ -1609,11 +1638,10 @@ let NumberLocale = class NumberLocale extends BaseInput {
1609
1638
  * @returns {number}
1610
1639
  */
1611
1640
  countDecimals(value) {
1612
- if ((value % 1) !== 0) {
1613
- const decimalValue = value.toString().split('.')[1];
1614
- return decimalValue && decimalValue.length;
1615
- }
1616
- return 0;
1641
+ const valueStr = value.toString();
1642
+ const isLocalizedNumber = includes(valueStr, this.DECIMAL);
1643
+ const parts = isLocalizedNumber ? valueStr.split(this.DECIMAL) : valueStr.split('.');
1644
+ return parts[1] ? parts[1].length : 0;
1617
1645
  }
1618
1646
  /**
1619
1647
  * handles the arrow press event. Increases or decreases the number. triggered fom the template
@@ -1715,13 +1743,23 @@ let NumberLocale = class NumberLocale extends BaseInput {
1715
1743
  }
1716
1744
  // validates entering of decimal values only when user provides decimal limit(i.e step contains decimal values).
1717
1745
  // Restrict user from entering only if the decimal limit is reached and the new digit is entered in decimal place
1718
- if (!skipStepValidation && inputValue && this.countDecimals(this.step) && (this.countDecimals(inputValue) >= this.countDecimals(this.step)) && $event.target.selectionStart >= inputValue.length - 1) {
1719
- return false;
1720
- }
1746
+ // if (!skipStepValidation && inputValue && this.countDecimals(this.step) && (this.countDecimals(inputValue) >= this.countDecimals(this.step)) && $event.target.selectionStart >= inputValue.length - 1) {
1747
+ // return false;
1748
+ // }
1721
1749
  // validates if user entered an invalid character.
1722
1750
  if (!validity.test($event.key)) {
1723
1751
  return false;
1724
1752
  }
1753
+ if (this.inputmode === INPUTMODE.NATURAL && !isNaN(this.decimalplaces)) {
1754
+ if (this.decimalplaces === 0 && this.DECIMAL === $event.key) {
1755
+ return false;
1756
+ }
1757
+ const parts = includes(inputValue, this.DECIMAL) ? inputValue.split(this.DECIMAL) : inputValue.split('.');
1758
+ const isCursorPositionAtDecimalPlace = $event.target.selectionStart > parts[0].length;
1759
+ if (this.decimalplaces > 0 && this.countDecimals(inputValue) >= this.decimalplaces && isCursorPositionAtDecimalPlace) {
1760
+ return false;
1761
+ }
1762
+ }
1725
1763
  // comma cannot be entered consecutively
1726
1764
  if (includes(inputValue, ',') && inputValue[inputValue.length - 1] === ',' && $event.key === ',') {
1727
1765
  return false;
@@ -2312,7 +2350,7 @@ class SelectComponent extends DatasetAwareFormComponent {
2312
2350
  provideAs(SelectComponent, NG_VALUE_ACCESSOR, true),
2313
2351
  provideAs(SelectComponent, NG_VALIDATORS, true),
2314
2352
  provideAsWidgetRef(SelectComponent)
2315
- ]), i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 17, consts: [["select", ""], ["focus-target", "", 3, "ngModelChange", "change", "mousedown", "blur", "ngClass", "disabled", "required", "tabindex", "ngModel", "ngModelOptions", "multiple", "autofocus"], ["selected", "", "value", "undefined", "id", "placeholderOption", 3, "textContent", "hidden"], [4, "ngIf"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label"], [3, "value", "selected", "textContent", 4, "ngFor", "ngForOf"], [3, "value", "selected", "textContent"]], template: function SelectComponent_Template(rf, ctx) { if (rf & 1) {
2353
+ ]), i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 18, consts: [["select", ""], ["focus-target", "", 3, "ngModelChange", "change", "mousedown", "blur", "ngClass", "disabled", "required", "tabindex", "ngModel", "ngModelOptions", "multiple", "autofocus"], ["selected", "", "value", "undefined", "id", "placeholderOption", 3, "textContent", "hidden"], [4, "ngIf"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label"], [3, "value", "selected", "textContent", 4, "ngFor", "ngForOf"], [3, "value", "selected", "textContent"]], template: function SelectComponent_Template(rf, ctx) { if (rf & 1) {
2316
2354
  const _r1 = i0.ɵɵgetCurrentView();
2317
2355
  i0.ɵɵelementStart(0, "select", 1, 0);
2318
2356
  i0.ɵɵtwoWayListener("ngModelChange", function SelectComponent_Template_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.modelByKey, $event) || (ctx.modelByKey = $event); return i0.ɵɵresetView($event); });
@@ -2321,10 +2359,10 @@ class SelectComponent extends DatasetAwareFormComponent {
2321
2359
  i0.ɵɵtemplate(3, SelectComponent_ng_container_3_Template, 2, 1, "ng-container", 3)(4, SelectComponent_ng_container_4_Template, 2, 1, "ng-container", 3);
2322
2360
  i0.ɵɵelementEnd();
2323
2361
  } if (rf & 2) {
2324
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c1$6, ctx.class))("disabled", ctx.disabled)("required", ctx.required)("tabindex", ctx.tabindex);
2362
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c1$6, ctx.class))("disabled", ctx.disabled)("required", ctx.required)("tabindex", ctx.tabindex);
2325
2363
  i0.ɵɵtwoWayProperty("ngModel", ctx.modelByKey);
2326
- i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(16, _c2$4))("multiple", ctx.multiple)("autofocus", ctx.autofocus);
2327
- i0.ɵɵattribute("name", ctx.name)("aria-label", ctx.arialabel);
2364
+ i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(17, _c2$4))("multiple", ctx.multiple)("autofocus", ctx.autofocus);
2365
+ i0.ɵɵattribute("accesskey", ctx.shortcutkey)("name", ctx.name)("aria-label", ctx.arialabel);
2328
2366
  i0.ɵɵadvance(2);
2329
2367
  i0.ɵɵproperty("textContent", ctx.placeholder)("hidden", !ctx.placeholder);
2330
2368
  i0.ɵɵadvance();
@@ -2339,7 +2377,7 @@ class SelectComponent extends DatasetAwareFormComponent {
2339
2377
  provideAs(SelectComponent, NG_VALUE_ACCESSOR, true),
2340
2378
  provideAs(SelectComponent, NG_VALIDATORS, true),
2341
2379
  provideAsWidgetRef(SelectComponent)
2342
- ], template: "<!--Updated focus with mousedown event. IOS devices not allow update of option value after opening dropdown-->\n<select #select\n focus-target\n [ngClass]=\"['app-select form-control', class]\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"modelByKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [multiple]=\"multiple\"\n (change)=\"onSelectValueChange($event)\"\n (mousedown)=\"checkForFloatingLabel($event)\"\n (blur)=\"invokeOnTouched($event); checkForFloatingLabel($event)\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\">\n\n <option selected\n value=\"undefined\"\n [textContent]=\"placeholder\"\n id=\"placeholderOption\"\n [hidden]=\"!placeholder\"></option>\n\n <ng-container *ngIf=\"groupby\">\n <optgroup *ngFor=\"let groupObj of groupedData\"\n [label]=\"groupObj.key\">\n <option *ngFor=\"let item of groupObj.data;\"\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n ></option>\n </optgroup>\n </ng-container>\n\n <ng-container *ngIf=\"!groupby\">\n <option *ngFor=\"let item of datasetItems\"\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n ></option>\n </ng-container>\n</select>\n" }]
2380
+ ], template: "<!--Updated focus with mousedown event. IOS devices not allow update of option value after opening dropdown-->\n<select #select\n focus-target\n [ngClass]=\"['app-select form-control', class]\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [attr.accesskey]=\"shortcutkey\"\n [(ngModel)]=\"modelByKey\"\n [ngModelOptions]=\"{standalone: true}\"\n [multiple]=\"multiple\"\n (change)=\"onSelectValueChange($event)\"\n (mousedown)=\"checkForFloatingLabel($event)\"\n (blur)=\"invokeOnTouched($event); checkForFloatingLabel($event)\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"arialabel\"\n [autofocus]=\"autofocus\">\n\n <option selected\n value=\"undefined\"\n [textContent]=\"placeholder\"\n id=\"placeholderOption\"\n [hidden]=\"!placeholder\"></option>\n\n <ng-container *ngIf=\"groupby\">\n <optgroup *ngFor=\"let groupObj of groupedData\"\n [label]=\"groupObj.key\">\n <option *ngFor=\"let item of groupObj.data;\"\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n ></option>\n </optgroup>\n </ng-container>\n\n <ng-container *ngIf=\"!groupby\">\n <option *ngFor=\"let item of datasetItems\"\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n ></option>\n </ng-container>\n</select>\n" }]
2343
2381
  }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2344
2382
  type: Inject,
2345
2383
  args: ['EXPLICIT_CONTEXT']
@@ -2396,7 +2434,8 @@ function SwitchComponent_a_1_Template(rf, ctx) { if (rf & 1) {
2396
2434
  } if (rf & 2) {
2397
2435
  const opt_r3 = ctx.$implicit;
2398
2436
  const ctx_r4 = i0.ɵɵnextContext();
2399
- i0.ɵɵproperty("name", "wm-switch-" + opt_r3.key)("ngClass", i0.ɵɵpureFunction2(4, _c1$5, opt_r3.selected, ctx_r4.disabled));
2437
+ i0.ɵɵproperty("name", "wm-switch-" + opt_r3.key)("ngClass", i0.ɵɵpureFunction2(5, _c1$5, opt_r3.selected, ctx_r4.disabled));
2438
+ i0.ɵɵattribute("aria-pressed", opt_r3.selected ? true : false);
2400
2439
  i0.ɵɵadvance();
2401
2440
  i0.ɵɵproperty("ngIf", opt_r3.dataObject && opt_r3.dataObject[ctx_r4.iconclass]);
2402
2441
  i0.ɵɵadvance();
@@ -2520,9 +2559,9 @@ class SwitchComponent extends DatasetAwareFormComponent {
2520
2559
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SwitchComponent, selectors: [["", "wmSwitch", ""]], exportAs: ["wmSwitch"], features: [i0.ɵɵProvidersFeature([
2521
2560
  provideAs(SwitchComponent, NG_VALUE_ACCESSOR, true),
2522
2561
  provideAsWidgetRef(SwitchComponent)
2523
- ]), i0.ɵɵInheritDefinitionFeature], attrs: _c0$6, decls: 6, vars: 8, consts: [["role", "group", 1, "btn-group", "btn-group-justified"], ["focus-target", "", "href", "javascript:void(0);", "class", "btn btn-default", 3, "name", "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "btn", "btn-primary", "app-switch-overlay", "switch-handle", 3, "title"], [3, "class", 4, "ngIf"], ["aria-hidden", "true", 1, "model-holder", "ng-hide", 3, "name", "disabled", "value", "required"], ["focus-target", "", "href", "javascript:void(0);", 1, "btn", "btn-default", 3, "click", "name", "ngClass"], ["aria-hidden", "true", 3, "ngClass", 4, "ngIf"], [1, "caption", 3, "textContent"], ["aria-hidden", "true", 3, "ngClass"]], template: function SwitchComponent_Template(rf, ctx) { if (rf & 1) {
2562
+ ]), i0.ɵɵInheritDefinitionFeature], attrs: _c0$6, decls: 6, vars: 8, consts: [[1, "btn-group", "btn-group-justified"], ["focus-target", "", "href", "javascript:void(0);", "class", "btn btn-default", "role", "button", 3, "name", "ngClass", "click", 4, "ngFor", "ngForOf"], ["aria-hidden", "true", 1, "btn", "btn-primary", "app-switch-overlay", "switch-handle", 3, "title"], [3, "class", 4, "ngIf"], ["aria-hidden", "true", 1, "model-holder", "ng-hide", 3, "name", "disabled", "value", "required"], ["focus-target", "", "href", "javascript:void(0);", "role", "button", 1, "btn", "btn-default", 3, "click", "name", "ngClass"], ["aria-hidden", "true", 3, "ngClass", 4, "ngIf"], [1, "caption", 3, "textContent"], ["aria-hidden", "true", 3, "ngClass"]], template: function SwitchComponent_Template(rf, ctx) { if (rf & 1) {
2524
2563
  i0.ɵɵelementStart(0, "div", 0);
2525
- i0.ɵɵtemplate(1, SwitchComponent_a_1_Template, 3, 7, "a", 1);
2564
+ i0.ɵɵtemplate(1, SwitchComponent_a_1_Template, 3, 8, "a", 1);
2526
2565
  i0.ɵɵelementEnd();
2527
2566
  i0.ɵɵelementStart(2, "span", 2);
2528
2567
  i0.ɵɵtemplate(3, SwitchComponent_i_3_Template, 1, 3, "i", 3);
@@ -2547,7 +2586,7 @@ class SwitchComponent extends DatasetAwareFormComponent {
2547
2586
  args: [{ selector: '[wmSwitch]', providers: [
2548
2587
  provideAs(SwitchComponent, NG_VALUE_ACCESSOR, true),
2549
2588
  provideAsWidgetRef(SwitchComponent)
2550
- ], exportAs: 'wmSwitch', template: "<div role=\"group\" class=\"btn-group btn-group-justified\">\n <a *ngFor=\"let opt of datasetItems; let $index = index;\"\n focus-target\n href=\"javascript:void(0);\"\n class=\"btn btn-default\"\n [name]=\"'wm-switch-' + opt.key\"\n [ngClass]=\"{'selected': opt.selected, 'disabled': disabled}\"\n (click)=\"selectOpt($event, $index, opt)\"\n >\n <i *ngIf=\"opt.dataObject && opt.dataObject[iconclass]\" aria-hidden=\"true\" [ngClass]=\"['app-icon', opt.dataObject[iconclass] || opt['icon']]\"></i>\n <span class=\"caption\" [textContent]=\"opt[displayfield] || opt.label\"></span>\n </a>\n</div>\n<span [title]=\"selectedItem ? selectedItem.label : modelByKey\"\n class=\"btn btn-primary app-switch-overlay switch-handle\">\n <i *ngIf=\"iconclass\"\n class=\"app-icon {{(selectedItem && selectedItem.dataObject) && selectedItem.dataObject[iconclass]}}\"></i>\n {{selectedItem ? selectedItem.label : modelByKey}}\n</span>\n<input [name]=\"name\" class=\"model-holder ng-hide\" [disabled]=\"disabled\" [value]=\"modelByKey\" [required]=\"required\" aria-hidden=\"true\">\n" }]
2589
+ ], exportAs: 'wmSwitch', template: "<div class=\"btn-group btn-group-justified\">\n <a *ngFor=\"let opt of datasetItems; let $index = index;\"\n focus-target\n href=\"javascript:void(0);\"\n class=\"btn btn-default\"\n [name]=\"'wm-switch-' + opt.key\"\n role=\"button\"\n [ngClass]=\"{'selected': opt.selected, 'disabled': disabled}\"\n [attr.aria-pressed]=\"opt.selected ? true : false\"\n (click)=\"selectOpt($event, $index, opt)\"\n >\n <i *ngIf=\"opt.dataObject && opt.dataObject[iconclass]\" aria-hidden=\"true\" [ngClass]=\"['app-icon', opt.dataObject[iconclass] || opt['icon']]\"></i>\n <span class=\"caption\" [textContent]=\"opt[displayfield] || opt.label\"></span>\n </a>\n</div>\n<span aria-hidden=\"true\" [title]=\"selectedItem ? selectedItem.label : modelByKey\"\n class=\"btn btn-primary app-switch-overlay switch-handle\">\n <i *ngIf=\"iconclass\"\n class=\"app-icon {{(selectedItem && selectedItem.dataObject) && selectedItem.dataObject[iconclass]}}\"></i>\n {{selectedItem ? selectedItem.label : modelByKey}}\n</span>\n<input [name]=\"name\" class=\"model-holder ng-hide\" [disabled]=\"disabled\" [value]=\"modelByKey\" [required]=\"required\" aria-hidden=\"true\">\n" }]
2551
2590
  }], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
2552
2591
  type: Inject,
2553
2592
  args: ['EXPLICIT_CONTEXT']
@@ -3213,9 +3252,10 @@ class CaptionPositionDirective {
3213
3252
  }
3214
3253
  // For select widget, display placeholder only on focus else remove the text of the option selected.
3215
3254
  checkForSelectPlaceholder() {
3216
- if ($(this.nativeEl).find('select option:selected').text() && !$(this.nativeEl).find('select').is(':focus') &&
3255
+ const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');
3256
+ if (selectElPlaceholderOption && selectElPlaceholderOption.textContent && !$(this.nativeEl).find('select').is(':focus') &&
3217
3257
  !$(this.inputEl.closest('[widget-id]')).attr('datavalue')) {
3218
- $(this.nativeEl).find('select option:selected').text('');
3258
+ selectElPlaceholderOption.textContent = '';
3219
3259
  }
3220
3260
  }
3221
3261
  setDefaultValueAnimation() {
@@ -3317,10 +3357,10 @@ class CaptionPositionDirective {
3317
3357
  // before placeholder is removed assign it to the placeholder variable
3318
3358
  // check for placeholder in inputel and selectel
3319
3359
  if (this.inputEl) {
3320
- const selectEl = this.inputEl.find('option:first');
3321
- if (this.inputEl.attr('placeholder') || selectEl.text()) {
3322
- if (selectEl.length) {
3323
- selectEl.text('');
3360
+ const selectElPlaceholderOption = this.nativeEl.querySelector('#placeholderOption');
3361
+ if (this.inputEl.attr('placeholder') || selectElPlaceholderOption) {
3362
+ if (selectElPlaceholderOption) {
3363
+ selectElPlaceholderOption.textContent = '';
3324
3364
  }
3325
3365
  else {
3326
3366
  this.placeholder = this.inputEl.attr('placeholder');