@db-ux/wc-core-components 4.0.4 → 4.2.0

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 (139) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/db-checkbox.cjs.entry.js +30 -4
  3. package/dist/cjs/db-checkbox.entry.cjs.js.map +1 -1
  4. package/dist/cjs/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.cjs.js.map +1 -1
  5. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +32 -5
  6. package/dist/cjs/db-custom-select.cjs.entry.js +76 -47
  7. package/dist/cjs/db-custom-select.entry.cjs.js.map +1 -1
  8. package/dist/cjs/db-header.cjs.entry.js +2 -2
  9. package/dist/cjs/db-header.entry.cjs.js.map +1 -1
  10. package/dist/cjs/db-notification.cjs.entry.js +2 -2
  11. package/dist/cjs/db-notification.entry.cjs.js.map +1 -1
  12. package/dist/cjs/db-radio.cjs.entry.js +39 -4
  13. package/dist/cjs/db-radio.entry.cjs.js.map +1 -1
  14. package/dist/cjs/db-select.cjs.entry.js +32 -5
  15. package/dist/cjs/db-select.entry.cjs.js.map +1 -1
  16. package/dist/cjs/db-switch.cjs.entry.js +31 -4
  17. package/dist/cjs/db-switch.entry.cjs.js.map +1 -1
  18. package/dist/cjs/db-textarea.cjs.entry.js +32 -5
  19. package/dist/cjs/db-textarea.entry.cjs.js.map +1 -1
  20. package/dist/cjs/db-ux.cjs.js +1 -1
  21. package/dist/cjs/form-components-CPqbzZwG.js +41 -0
  22. package/dist/cjs/form-components-CPqbzZwG.js.map +1 -0
  23. package/dist/cjs/index.cjs.js.map +1 -1
  24. package/dist/cjs/loader.cjs.js +1 -1
  25. package/dist/collection/components/checkbox/checkbox.js +34 -4
  26. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  27. package/dist/collection/components/custom-select/custom-select.js +108 -50
  28. package/dist/collection/components/custom-select/custom-select.js.map +1 -1
  29. package/dist/collection/components/custom-select/model.js.map +1 -1
  30. package/dist/collection/components/header/header.js +52 -2
  31. package/dist/collection/components/header/header.js.map +1 -1
  32. package/dist/collection/components/header/model.js.map +1 -1
  33. package/dist/collection/components/input/input.js +36 -5
  34. package/dist/collection/components/input/input.js.map +1 -1
  35. package/dist/collection/components/notification/notification.js +12 -12
  36. package/dist/collection/components/notification/notification.js.map +1 -1
  37. package/dist/collection/components/radio/model.js.map +1 -1
  38. package/dist/collection/components/radio/radio.js +61 -5
  39. package/dist/collection/components/radio/radio.js.map +1 -1
  40. package/dist/collection/components/select/select.js +36 -5
  41. package/dist/collection/components/select/select.js.map +1 -1
  42. package/dist/collection/components/switch/switch.js +34 -4
  43. package/dist/collection/components/switch/switch.js.map +1 -1
  44. package/dist/collection/components/textarea/textarea.js +36 -5
  45. package/dist/collection/components/textarea/textarea.js.map +1 -1
  46. package/dist/collection/shared/model.js.map +1 -1
  47. package/dist/collection/utils/form-components.js +31 -0
  48. package/dist/collection/utils/form-components.js.map +1 -1
  49. package/dist/custom-elements.json +291 -28
  50. package/dist/db-ux/db-checkbox.entry.esm.js.map +1 -1
  51. package/dist/db-ux/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.esm.js.map +1 -1
  52. package/dist/db-ux/db-custom-select.entry.esm.js.map +1 -1
  53. package/dist/db-ux/db-header.entry.esm.js.map +1 -1
  54. package/dist/db-ux/db-notification.entry.esm.js.map +1 -1
  55. package/dist/db-ux/db-radio.entry.esm.js.map +1 -1
  56. package/dist/db-ux/db-select.entry.esm.js.map +1 -1
  57. package/dist/db-ux/db-switch.entry.esm.js.map +1 -1
  58. package/dist/db-ux/db-textarea.entry.esm.js.map +1 -1
  59. package/dist/db-ux/db-ux.esm.js +1 -1
  60. package/dist/db-ux/index.esm.js.map +1 -1
  61. package/dist/db-ux/p-59f30e71.entry.js +2 -0
  62. package/dist/db-ux/p-59f30e71.entry.js.map +1 -0
  63. package/dist/db-ux/p-5cbbd49b.entry.js +2 -0
  64. package/dist/db-ux/p-5cbbd49b.entry.js.map +1 -0
  65. package/dist/db-ux/p-68b70ec5.entry.js +2 -0
  66. package/dist/db-ux/p-68b70ec5.entry.js.map +1 -0
  67. package/dist/db-ux/p-693724ef.entry.js +2 -0
  68. package/dist/db-ux/p-693724ef.entry.js.map +1 -0
  69. package/dist/db-ux/p-751434fa.entry.js +2 -0
  70. package/dist/db-ux/p-751434fa.entry.js.map +1 -0
  71. package/dist/db-ux/p-7f3a0030.entry.js +2 -0
  72. package/dist/db-ux/p-7f3a0030.entry.js.map +1 -0
  73. package/dist/db-ux/p-8f698fc9.entry.js +2 -0
  74. package/dist/db-ux/p-8f698fc9.entry.js.map +1 -0
  75. package/dist/db-ux/p-952cd568.entry.js +2 -0
  76. package/dist/db-ux/p-952cd568.entry.js.map +1 -0
  77. package/dist/db-ux/p-CdVqfu2Z.js +2 -0
  78. package/dist/db-ux/p-CdVqfu2Z.js.map +1 -0
  79. package/dist/db-ux/p-bc2e8a30.entry.js +2 -0
  80. package/dist/db-ux/p-bc2e8a30.entry.js.map +1 -0
  81. package/dist/esm/db-checkbox.entry.js +30 -4
  82. package/dist/esm/db-checkbox.entry.js.map +1 -1
  83. package/dist/esm/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.js.map +1 -1
  84. package/dist/esm/db-custom-select-dropdown_5.entry.js +32 -5
  85. package/dist/esm/db-custom-select.entry.js +76 -47
  86. package/dist/esm/db-custom-select.entry.js.map +1 -1
  87. package/dist/esm/db-header.entry.js +2 -2
  88. package/dist/esm/db-header.entry.js.map +1 -1
  89. package/dist/esm/db-notification.entry.js +2 -2
  90. package/dist/esm/db-notification.entry.js.map +1 -1
  91. package/dist/esm/db-radio.entry.js +40 -5
  92. package/dist/esm/db-radio.entry.js.map +1 -1
  93. package/dist/esm/db-select.entry.js +32 -5
  94. package/dist/esm/db-select.entry.js.map +1 -1
  95. package/dist/esm/db-switch.entry.js +31 -4
  96. package/dist/esm/db-switch.entry.js.map +1 -1
  97. package/dist/esm/db-textarea.entry.js +32 -5
  98. package/dist/esm/db-textarea.entry.js.map +1 -1
  99. package/dist/esm/db-ux.js +1 -1
  100. package/dist/esm/form-components-DmI6JmyJ.js +37 -0
  101. package/dist/esm/form-components-DmI6JmyJ.js.map +1 -0
  102. package/dist/esm/index.js.map +1 -1
  103. package/dist/esm/loader.js +1 -1
  104. package/dist/types/components/checkbox/checkbox.d.ts +5 -1
  105. package/dist/types/components/custom-select/custom-select.d.ts +5 -0
  106. package/dist/types/components/custom-select/model.d.ts +5 -0
  107. package/dist/types/components/header/header.d.ts +2 -0
  108. package/dist/types/components/header/model.d.ts +2 -2
  109. package/dist/types/components/input/input.d.ts +6 -2
  110. package/dist/types/components/notification/notification.d.ts +1 -1
  111. package/dist/types/components/radio/model.d.ts +3 -3
  112. package/dist/types/components/radio/radio.d.ts +7 -1
  113. package/dist/types/components/select/select.d.ts +6 -2
  114. package/dist/types/components/switch/switch.d.ts +5 -1
  115. package/dist/types/components/textarea/textarea.d.ts +6 -2
  116. package/dist/types/components.d.ts +8 -0
  117. package/dist/types/shared/model.d.ts +6 -2
  118. package/dist/types/utils/form-components.d.ts +9 -0
  119. package/dist/vscode.html-custom-data.json +21 -6
  120. package/dist/web-types.json +63 -18
  121. package/package.json +3 -3
  122. package/dist/db-ux/p-1761357c.entry.js +0 -2
  123. package/dist/db-ux/p-1761357c.entry.js.map +0 -1
  124. package/dist/db-ux/p-233758c5.entry.js +0 -2
  125. package/dist/db-ux/p-233758c5.entry.js.map +0 -1
  126. package/dist/db-ux/p-60f913fa.entry.js +0 -2
  127. package/dist/db-ux/p-60f913fa.entry.js.map +0 -1
  128. package/dist/db-ux/p-76dd2831.entry.js +0 -2
  129. package/dist/db-ux/p-76dd2831.entry.js.map +0 -1
  130. package/dist/db-ux/p-93620721.entry.js +0 -2
  131. package/dist/db-ux/p-93620721.entry.js.map +0 -1
  132. package/dist/db-ux/p-c423e7ba.entry.js +0 -2
  133. package/dist/db-ux/p-c423e7ba.entry.js.map +0 -1
  134. package/dist/db-ux/p-c7815d81.entry.js +0 -2
  135. package/dist/db-ux/p-c7815d81.entry.js.map +0 -1
  136. package/dist/db-ux/p-decb47b4.entry.js +0 -2
  137. package/dist/db-ux/p-decb47b4.entry.js.map +0 -1
  138. package/dist/db-ux/p-ecab99ff.entry.js +0 -2
  139. package/dist/db-ux/p-ecab99ff.entry.js.map +0 -1
@@ -3,6 +3,7 @@ import { cls, delay, getBoolean, getBooleanAsString, getHideProp, getSearchInput
3
3
  import { DocumentClickListener } from "../../utils/document-click-listener";
4
4
  import { DocumentScrollListener } from "../../utils/document-scroll-listener";
5
5
  import { handleFixedDropdown } from "../../utils/floating-components";
6
+ import { addResetEventListener, } from "../../utils/form-components";
6
7
  import { h, Fragment, } from "@stencil/core";
7
8
  /**
8
9
  * @slot children - This is a default/unnamed slot
@@ -24,6 +25,7 @@ export class DBCustomSelect {
24
25
  this._infoTextId = undefined;
25
26
  this._validity = "no-validation";
26
27
  this._userInteraction = false;
28
+ this.abortController = undefined;
27
29
  this._descByIds = undefined;
28
30
  this._selectedLabels = "";
29
31
  this._selectedLabelsId = undefined;
@@ -64,7 +66,7 @@ export class DBCustomSelect {
64
66
  }
65
67
  /* For a11y reasons we need to map the correct message with the select */
66
68
  if (!((_a = this.selectRef) === null || _a === void 0 ? void 0 : _a.validity.valid) || this.validation === "invalid") {
67
- this._descByIds = this._invalidMessageId;
69
+ this.setDescById(this._invalidMessageId);
68
70
  this._invalidMessage =
69
71
  this.invalidMessage ||
70
72
  ((_b = this.selectRef) === null || _b === void 0 ? void 0 : _b.validationMessage) ||
@@ -80,7 +82,7 @@ export class DBCustomSelect {
80
82
  else if (this.hasValidState() &&
81
83
  ((_d = this.selectRef) === null || _d === void 0 ? void 0 : _d.validity.valid) &&
82
84
  this.required) {
83
- this._descByIds = this._validMessageId;
85
+ this.setDescById(this._validMessageId);
84
86
  if (hasVoiceOver()) {
85
87
  this._voiceOverFallback = (_e = this.validMessage) !== null && _e !== void 0 ? _e : DEFAULT_VALID_MESSAGE;
86
88
  delay(() => (this._voiceOverFallback = ""), 1000);
@@ -88,11 +90,11 @@ export class DBCustomSelect {
88
90
  this._validity = (_f = this.validation) !== null && _f !== void 0 ? _f : "valid";
89
91
  }
90
92
  else if (stringPropVisible(this.message, this.showMessage)) {
91
- this._descByIds = this._messageId;
93
+ this.setDescById(this._messageId);
92
94
  this._validity = (_g = this.validation) !== null && _g !== void 0 ? _g : "no-validation";
93
95
  }
94
96
  else {
95
- this._descByIds = this._placeholderId;
97
+ this.setDescById(this._placeholderId);
96
98
  this._validity = (_h = this.validation) !== null && _h !== void 0 ? _h : "no-validation";
97
99
  }
98
100
  }
@@ -574,12 +576,34 @@ export class DBCustomSelect {
574
576
  this.watch7Fn();
575
577
  }
576
578
  watch8Fn() {
577
- this._validity = this.validation;
579
+ if (this.selectRef) {
580
+ let controller = this.abortController;
581
+ if (!controller) {
582
+ controller = new AbortController();
583
+ this.abortController = controller;
584
+ }
585
+ const initialValues = this.values;
586
+ addResetEventListener(this.selectRef, () => {
587
+ const resetValue = initialValues
588
+ ? initialValues
589
+ : this.selectRef.value
590
+ ? [this.selectRef.value]
591
+ : [];
592
+ this.handleOptionSelected(resetValue);
593
+ this.handleValidation();
594
+ }, controller.signal);
595
+ }
578
596
  }
579
597
  watch8() {
580
598
  this.watch8Fn();
581
599
  }
582
600
  watch9Fn() {
601
+ this._validity = this.validation;
602
+ }
603
+ watch9() {
604
+ this.watch9Fn();
605
+ }
606
+ watch10Fn() {
583
607
  var _a, _b;
584
608
  if (((_a = this._values) === null || _a === void 0 ? void 0 : _a.length) === 0) {
585
609
  this.selectAllChecked = false;
@@ -593,29 +617,29 @@ export class DBCustomSelect {
593
617
  this.selectAllIndeterminate = true;
594
618
  }
595
619
  }
596
- watch9() {
597
- this.watch9Fn();
620
+ watch10() {
621
+ this.watch10Fn();
598
622
  }
599
- watch10Fn() {
623
+ watch11Fn() {
600
624
  var _a, _b;
601
625
  this._options = this.options;
602
626
  this.amountOptions =
603
627
  (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.filter((option) => !option.isGroupTitle).length) !== null && _b !== void 0 ? _b : 0;
604
628
  }
605
- watch10() {
606
- this.watch10Fn();
629
+ watch11() {
630
+ this.watch11Fn();
607
631
  }
608
- watch11Fn() {
632
+ watch12Fn() {
609
633
  this._searchValue = this.searchValue;
610
634
  if (this.searchValue) {
611
635
  const sValue = this.searchValue; // <- workaround for Angular
612
636
  this.handleSearch(sValue);
613
637
  }
614
638
  }
615
- watch11() {
616
- this.watch11Fn();
639
+ watch12() {
640
+ this.watch12Fn();
617
641
  }
618
- watch12Fn() {
642
+ watch13Fn() {
619
643
  var _a, _b;
620
644
  if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) {
621
645
  this._selectedOptions = (_b = this.options) === null || _b === void 0 ? void 0 : _b.filter((option) => {
@@ -627,10 +651,10 @@ export class DBCustomSelect {
627
651
  });
628
652
  }
629
653
  }
630
- watch12() {
631
- this.watch12Fn();
654
+ watch13() {
655
+ this.watch13Fn();
632
656
  }
633
- watch13Fn() {
657
+ watch14Fn() {
634
658
  var _a, _b, _c;
635
659
  if (this.selectedLabels) {
636
660
  this._selectedLabels = this.selectedLabels;
@@ -657,35 +681,35 @@ export class DBCustomSelect {
657
681
  this._selectedLabels = "";
658
682
  }
659
683
  }
660
- watch13() {
661
- this.watch13Fn();
684
+ watch14() {
685
+ this.watch14Fn();
662
686
  }
663
- watch14Fn() {
687
+ watch15Fn() {
664
688
  var _a, _b;
665
689
  if (this.amountChange) {
666
690
  this.amountChange.emit((_b = (_a = this._selectedOptions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
667
691
  }
668
692
  }
669
- watch14() {
670
- this.watch14Fn();
693
+ watch15() {
694
+ this.watch15Fn();
671
695
  }
672
- watch15Fn() {
696
+ watch16Fn() {
673
697
  if (this.selectAllRef) {
674
698
  this.selectAllRef.indeterminate = Boolean(this.selectAllIndeterminate);
675
699
  }
676
700
  }
677
- watch15() {
678
- this.watch15Fn();
701
+ watch16() {
702
+ this.watch16Fn();
679
703
  }
680
- watch16Fn() {
704
+ watch17Fn() {
681
705
  var _a;
682
706
  this._invalidMessage =
683
707
  this.invalidMessage ||
684
708
  ((_a = this.selectRef) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
685
709
  DEFAULT_INVALID_MESSAGE;
686
710
  }
687
- watch16() {
688
- this.watch16Fn();
711
+ watch17() {
712
+ this.watch17Fn();
689
713
  }
690
714
  componentDidLoad() {
691
715
  var _a;
@@ -729,22 +753,27 @@ export class DBCustomSelect {
729
753
  this.watch14Fn();
730
754
  this.watch15Fn();
731
755
  this.watch16Fn();
756
+ this.watch17Fn();
757
+ }
758
+ disconnectedCallback() {
759
+ var _a;
760
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
732
761
  }
733
762
  render() {
734
763
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
735
- return (h("div", { key: '11b17fa4f655a38ae5c5612053ed44d533bf730e', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
764
+ return (h("div", { key: '18f3a8ad101671d2aba404bd45c80b928bb5e8f4', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
736
765
  this._ref = el;
737
766
  }, "aria-invalid": this._validity === "invalid", "data-custom-validity": this._validity, "data-width": this.formFieldWidth, "data-variant": this.variant === "floating" &&
738
767
  this.selectedType === "tag" &&
739
768
  this.multiple
740
769
  ? "above"
741
- : this.variant, "data-required": getBooleanAsString(this.required), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '7d7ba83bded2a0f96c20e464a2ffb9702c7aade7', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: '2b7c5ccf1e2033613069958a9de22c4d03d5a2c6', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
770
+ : this.variant, "data-required": getBooleanAsString(this.required), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '8799fa0a17b43d88b24ecee1b1061274524d84f1', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: 'f3f4af4a27d30308028524213d0ab8a5a40a8d3a', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
742
771
  this.selectRef = el;
743
772
  }, form: this.form, name: this.name, multiple: getBoolean(this.multiple, "multiple"), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), onChange: (event) => this.satisfyReact(event) }, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length)
744
773
  ? (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => (h("option", { disabled: option.disabled, value: option.value, key: undefined }, this.getOptionLabel(option))))
745
- : null)), h("details", { key: 'e72a8ffae9e67b8ffa4a864fc67777863ab4ae2f', ref: (el) => {
774
+ : null)), h("details", { key: '413be6e72060b2395772985bc287bd67bc1ad268', ref: (el) => {
746
775
  this.detailsRef = el;
747
- }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '8a8cdada441011327ceada802a840222e1fee64a' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
776
+ }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: 'f157d0435eab97c98c97d31447e32a9e9cd97d98' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
748
777
  this.searchInputRef = el;
749
778
  }, name: this._id, form: this._id, showLabel: false, value: this._searchValue, label: (_f = this.searchLabel) !== null && _f !== void 0 ? _f : DEFAULT_LABEL, placeholder: (_g = this.searchPlaceholder) !== null && _g !== void 0 ? _g : this.searchLabel, ariaDescribedBy: this._hasNoOptions || this.showLoading
750
779
  ? this._infoTextId
@@ -754,7 +783,7 @@ export class DBCustomSelect {
754
783
  this.selectAllRef = el;
755
784
  }, form: this._id, checked: this.selectAllChecked, onChange: (event) => this.handleSelectAll(event) }), this.getSelectAllLabel())))) : null, h("db-custom-select-list", { multiple: getBoolean(this.multiple, "multiple"), label: (_k = (_j = this.listLabel) !== null && _j !== void 0 ? _j : this.label) !== null && _k !== void 0 ? _k : DEFAULT_LABEL }, (_l = this._options) === null || _l === void 0 ? void 0 : _l.map((option) => (h("db-custom-select-list-item", { type: this.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: this.getOptionLabel(option), name: this._id, checked: this.getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: () => this.handleSelect(option.value), key: undefined }, !option.isGroupTitle
756
785
  ? this.getOptionLabel(option)
757
- : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '7bd868a984b59aac7554ce7a414fbc5dcf6f9852', class: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '600afcfae8dd16acad934de05031077efb821e88', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '296afa4aaa8ea8bd7aeabcf43e50a8068540c6c4', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
786
+ : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '0f9dc87d3b0289a335acf336964fc78d22a5798a', class: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '6a32b77468c503d5ee57c509aa2ec7ff5b4c1f21', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: 'b67bda119e8c547d7975632376ea72c81625a471', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
758
787
  }
759
788
  static get is() { return "db-custom-select"; }
760
789
  static get properties() {
@@ -1649,6 +1678,31 @@ export class DBCustomSelect {
1649
1678
  "reflect": false,
1650
1679
  "attribute": "open"
1651
1680
  },
1681
+ "selectedPrefix": {
1682
+ "type": "string",
1683
+ "mutable": false,
1684
+ "complexType": {
1685
+ "original": "DBCustomSelectProps[\"selectedPrefix\"]",
1686
+ "resolved": "string",
1687
+ "references": {
1688
+ "DBCustomSelectProps": {
1689
+ "location": "import",
1690
+ "path": "./model",
1691
+ "id": "src/components/custom-select/model.ts::DBCustomSelectProps"
1692
+ }
1693
+ }
1694
+ },
1695
+ "required": false,
1696
+ "optional": false,
1697
+ "docs": {
1698
+ "tags": [],
1699
+ "text": ""
1700
+ },
1701
+ "getter": false,
1702
+ "setter": false,
1703
+ "reflect": false,
1704
+ "attribute": "selected-prefix"
1705
+ },
1652
1706
  "dropdownWidth": {
1653
1707
  "type": "string",
1654
1708
  "mutable": false,
@@ -1942,6 +1996,7 @@ export class DBCustomSelect {
1942
1996
  "_infoTextId": {},
1943
1997
  "_validity": {},
1944
1998
  "_userInteraction": {},
1999
+ "abortController": {},
1945
2000
  "_descByIds": {},
1946
2001
  "_selectedLabels": {},
1947
2002
  "_selectedLabelsId": {},
@@ -2072,56 +2127,59 @@ export class DBCustomSelect {
2072
2127
  "propName": "selectRef",
2073
2128
  "methodName": "watch7"
2074
2129
  }, {
2075
- "propName": "validation",
2130
+ "propName": "selectRef",
2076
2131
  "methodName": "watch8"
2077
2132
  }, {
2078
- "propName": "_values",
2133
+ "propName": "validation",
2079
2134
  "methodName": "watch9"
2135
+ }, {
2136
+ "propName": "_values",
2137
+ "methodName": "watch10"
2080
2138
  }, {
2081
2139
  "propName": "amountOptions",
2082
- "methodName": "watch9"
2140
+ "methodName": "watch10"
2083
2141
  }, {
2084
2142
  "propName": "options",
2085
- "methodName": "watch10"
2143
+ "methodName": "watch11"
2086
2144
  }, {
2087
2145
  "propName": "searchValue",
2088
- "methodName": "watch11"
2146
+ "methodName": "watch12"
2089
2147
  }, {
2090
2148
  "propName": "options",
2091
- "methodName": "watch12"
2149
+ "methodName": "watch13"
2092
2150
  }, {
2093
2151
  "propName": "_values",
2094
- "methodName": "watch12"
2152
+ "methodName": "watch13"
2095
2153
  }, {
2096
2154
  "propName": "_selectedOptions",
2097
- "methodName": "watch13"
2155
+ "methodName": "watch14"
2098
2156
  }, {
2099
2157
  "propName": "selectedType",
2100
- "methodName": "watch13"
2158
+ "methodName": "watch14"
2101
2159
  }, {
2102
2160
  "propName": "amountText",
2103
- "methodName": "watch13"
2161
+ "methodName": "watch14"
2104
2162
  }, {
2105
2163
  "propName": "selectedLabels",
2106
- "methodName": "watch13"
2164
+ "methodName": "watch14"
2107
2165
  }, {
2108
2166
  "propName": "transformSelectedLabels",
2109
- "methodName": "watch13"
2167
+ "methodName": "watch14"
2110
2168
  }, {
2111
2169
  "propName": "_selectedOptions",
2112
- "methodName": "watch14"
2170
+ "methodName": "watch15"
2113
2171
  }, {
2114
2172
  "propName": "selectAllIndeterminate",
2115
- "methodName": "watch15"
2173
+ "methodName": "watch16"
2116
2174
  }, {
2117
2175
  "propName": "selectAllRef",
2118
- "methodName": "watch15"
2176
+ "methodName": "watch16"
2119
2177
  }, {
2120
2178
  "propName": "selectRef",
2121
- "methodName": "watch16"
2179
+ "methodName": "watch17"
2122
2180
  }, {
2123
2181
  "propName": "invalidMessage",
2124
- "methodName": "watch16"
2182
+ "methodName": "watch17"
2125
2183
  }];
2126
2184
  }
2127
2185
  }