@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.
- package/CHANGELOG.md +26 -0
- package/dist/cjs/db-checkbox.cjs.entry.js +30 -4
- package/dist/cjs/db-checkbox.entry.cjs.js.map +1 -1
- 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
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +32 -5
- package/dist/cjs/db-custom-select.cjs.entry.js +76 -47
- package/dist/cjs/db-custom-select.entry.cjs.js.map +1 -1
- package/dist/cjs/db-header.cjs.entry.js +2 -2
- package/dist/cjs/db-header.entry.cjs.js.map +1 -1
- package/dist/cjs/db-notification.cjs.entry.js +2 -2
- package/dist/cjs/db-notification.entry.cjs.js.map +1 -1
- package/dist/cjs/db-radio.cjs.entry.js +39 -4
- package/dist/cjs/db-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/db-select.cjs.entry.js +32 -5
- package/dist/cjs/db-select.entry.cjs.js.map +1 -1
- package/dist/cjs/db-switch.cjs.entry.js +31 -4
- package/dist/cjs/db-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/db-textarea.cjs.entry.js +32 -5
- package/dist/cjs/db-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/db-ux.cjs.js +1 -1
- package/dist/cjs/form-components-CPqbzZwG.js +41 -0
- package/dist/cjs/form-components-CPqbzZwG.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +34 -4
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/custom-select/custom-select.js +108 -50
- package/dist/collection/components/custom-select/custom-select.js.map +1 -1
- package/dist/collection/components/custom-select/model.js.map +1 -1
- package/dist/collection/components/header/header.js +52 -2
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/header/model.js.map +1 -1
- package/dist/collection/components/input/input.js +36 -5
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/notification/notification.js +12 -12
- package/dist/collection/components/notification/notification.js.map +1 -1
- package/dist/collection/components/radio/model.js.map +1 -1
- package/dist/collection/components/radio/radio.js +61 -5
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/select/select.js +36 -5
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/switch/switch.js +34 -4
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/textarea/textarea.js +36 -5
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/shared/model.js.map +1 -1
- package/dist/collection/utils/form-components.js +31 -0
- package/dist/collection/utils/form-components.js.map +1 -1
- package/dist/custom-elements.json +291 -28
- package/dist/db-ux/db-checkbox.entry.esm.js.map +1 -1
- 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
- package/dist/db-ux/db-custom-select.entry.esm.js.map +1 -1
- package/dist/db-ux/db-header.entry.esm.js.map +1 -1
- package/dist/db-ux/db-notification.entry.esm.js.map +1 -1
- package/dist/db-ux/db-radio.entry.esm.js.map +1 -1
- package/dist/db-ux/db-select.entry.esm.js.map +1 -1
- package/dist/db-ux/db-switch.entry.esm.js.map +1 -1
- package/dist/db-ux/db-textarea.entry.esm.js.map +1 -1
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/index.esm.js.map +1 -1
- package/dist/db-ux/p-59f30e71.entry.js +2 -0
- package/dist/db-ux/p-59f30e71.entry.js.map +1 -0
- package/dist/db-ux/p-5cbbd49b.entry.js +2 -0
- package/dist/db-ux/p-5cbbd49b.entry.js.map +1 -0
- package/dist/db-ux/p-68b70ec5.entry.js +2 -0
- package/dist/db-ux/p-68b70ec5.entry.js.map +1 -0
- package/dist/db-ux/p-693724ef.entry.js +2 -0
- package/dist/db-ux/p-693724ef.entry.js.map +1 -0
- package/dist/db-ux/p-751434fa.entry.js +2 -0
- package/dist/db-ux/p-751434fa.entry.js.map +1 -0
- package/dist/db-ux/p-7f3a0030.entry.js +2 -0
- package/dist/db-ux/p-7f3a0030.entry.js.map +1 -0
- package/dist/db-ux/p-8f698fc9.entry.js +2 -0
- package/dist/db-ux/p-8f698fc9.entry.js.map +1 -0
- package/dist/db-ux/p-952cd568.entry.js +2 -0
- package/dist/db-ux/p-952cd568.entry.js.map +1 -0
- package/dist/db-ux/p-CdVqfu2Z.js +2 -0
- package/dist/db-ux/p-CdVqfu2Z.js.map +1 -0
- package/dist/db-ux/p-bc2e8a30.entry.js +2 -0
- package/dist/db-ux/p-bc2e8a30.entry.js.map +1 -0
- package/dist/esm/db-checkbox.entry.js +30 -4
- package/dist/esm/db-checkbox.entry.js.map +1 -1
- 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
- package/dist/esm/db-custom-select-dropdown_5.entry.js +32 -5
- package/dist/esm/db-custom-select.entry.js +76 -47
- package/dist/esm/db-custom-select.entry.js.map +1 -1
- package/dist/esm/db-header.entry.js +2 -2
- package/dist/esm/db-header.entry.js.map +1 -1
- package/dist/esm/db-notification.entry.js +2 -2
- package/dist/esm/db-notification.entry.js.map +1 -1
- package/dist/esm/db-radio.entry.js +40 -5
- package/dist/esm/db-radio.entry.js.map +1 -1
- package/dist/esm/db-select.entry.js +32 -5
- package/dist/esm/db-select.entry.js.map +1 -1
- package/dist/esm/db-switch.entry.js +31 -4
- package/dist/esm/db-switch.entry.js.map +1 -1
- package/dist/esm/db-textarea.entry.js +32 -5
- package/dist/esm/db-textarea.entry.js.map +1 -1
- package/dist/esm/db-ux.js +1 -1
- package/dist/esm/form-components-DmI6JmyJ.js +37 -0
- package/dist/esm/form-components-DmI6JmyJ.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +5 -1
- package/dist/types/components/custom-select/custom-select.d.ts +5 -0
- package/dist/types/components/custom-select/model.d.ts +5 -0
- package/dist/types/components/header/header.d.ts +2 -0
- package/dist/types/components/header/model.d.ts +2 -2
- package/dist/types/components/input/input.d.ts +6 -2
- package/dist/types/components/notification/notification.d.ts +1 -1
- package/dist/types/components/radio/model.d.ts +3 -3
- package/dist/types/components/radio/radio.d.ts +7 -1
- package/dist/types/components/select/select.d.ts +6 -2
- package/dist/types/components/switch/switch.d.ts +5 -1
- package/dist/types/components/textarea/textarea.d.ts +6 -2
- package/dist/types/components.d.ts +8 -0
- package/dist/types/shared/model.d.ts +6 -2
- package/dist/types/utils/form-components.d.ts +9 -0
- package/dist/vscode.html-custom-data.json +21 -6
- package/dist/web-types.json +63 -18
- package/package.json +3 -3
- package/dist/db-ux/p-1761357c.entry.js +0 -2
- package/dist/db-ux/p-1761357c.entry.js.map +0 -1
- package/dist/db-ux/p-233758c5.entry.js +0 -2
- package/dist/db-ux/p-233758c5.entry.js.map +0 -1
- package/dist/db-ux/p-60f913fa.entry.js +0 -2
- package/dist/db-ux/p-60f913fa.entry.js.map +0 -1
- package/dist/db-ux/p-76dd2831.entry.js +0 -2
- package/dist/db-ux/p-76dd2831.entry.js.map +0 -1
- package/dist/db-ux/p-93620721.entry.js +0 -2
- package/dist/db-ux/p-93620721.entry.js.map +0 -1
- package/dist/db-ux/p-c423e7ba.entry.js +0 -2
- package/dist/db-ux/p-c423e7ba.entry.js.map +0 -1
- package/dist/db-ux/p-c7815d81.entry.js +0 -2
- package/dist/db-ux/p-c7815d81.entry.js.map +0 -1
- package/dist/db-ux/p-decb47b4.entry.js +0 -2
- package/dist/db-ux/p-decb47b4.entry.js.map +0 -1
- package/dist/db-ux/p-ecab99ff.entry.js +0 -2
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
597
|
-
this.
|
|
620
|
+
watch10() {
|
|
621
|
+
this.watch10Fn();
|
|
598
622
|
}
|
|
599
|
-
|
|
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
|
-
|
|
606
|
-
this.
|
|
629
|
+
watch11() {
|
|
630
|
+
this.watch11Fn();
|
|
607
631
|
}
|
|
608
|
-
|
|
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
|
-
|
|
616
|
-
this.
|
|
639
|
+
watch12() {
|
|
640
|
+
this.watch12Fn();
|
|
617
641
|
}
|
|
618
|
-
|
|
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
|
-
|
|
631
|
-
this.
|
|
654
|
+
watch13() {
|
|
655
|
+
this.watch13Fn();
|
|
632
656
|
}
|
|
633
|
-
|
|
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
|
-
|
|
661
|
-
this.
|
|
684
|
+
watch14() {
|
|
685
|
+
this.watch14Fn();
|
|
662
686
|
}
|
|
663
|
-
|
|
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
|
-
|
|
670
|
-
this.
|
|
693
|
+
watch15() {
|
|
694
|
+
this.watch15Fn();
|
|
671
695
|
}
|
|
672
|
-
|
|
696
|
+
watch16Fn() {
|
|
673
697
|
if (this.selectAllRef) {
|
|
674
698
|
this.selectAllRef.indeterminate = Boolean(this.selectAllIndeterminate);
|
|
675
699
|
}
|
|
676
700
|
}
|
|
677
|
-
|
|
678
|
-
this.
|
|
701
|
+
watch16() {
|
|
702
|
+
this.watch16Fn();
|
|
679
703
|
}
|
|
680
|
-
|
|
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
|
-
|
|
688
|
-
this.
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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": "
|
|
2130
|
+
"propName": "selectRef",
|
|
2076
2131
|
"methodName": "watch8"
|
|
2077
2132
|
}, {
|
|
2078
|
-
"propName": "
|
|
2133
|
+
"propName": "validation",
|
|
2079
2134
|
"methodName": "watch9"
|
|
2135
|
+
}, {
|
|
2136
|
+
"propName": "_values",
|
|
2137
|
+
"methodName": "watch10"
|
|
2080
2138
|
}, {
|
|
2081
2139
|
"propName": "amountOptions",
|
|
2082
|
-
"methodName": "
|
|
2140
|
+
"methodName": "watch10"
|
|
2083
2141
|
}, {
|
|
2084
2142
|
"propName": "options",
|
|
2085
|
-
"methodName": "
|
|
2143
|
+
"methodName": "watch11"
|
|
2086
2144
|
}, {
|
|
2087
2145
|
"propName": "searchValue",
|
|
2088
|
-
"methodName": "
|
|
2146
|
+
"methodName": "watch12"
|
|
2089
2147
|
}, {
|
|
2090
2148
|
"propName": "options",
|
|
2091
|
-
"methodName": "
|
|
2149
|
+
"methodName": "watch13"
|
|
2092
2150
|
}, {
|
|
2093
2151
|
"propName": "_values",
|
|
2094
|
-
"methodName": "
|
|
2152
|
+
"methodName": "watch13"
|
|
2095
2153
|
}, {
|
|
2096
2154
|
"propName": "_selectedOptions",
|
|
2097
|
-
"methodName": "
|
|
2155
|
+
"methodName": "watch14"
|
|
2098
2156
|
}, {
|
|
2099
2157
|
"propName": "selectedType",
|
|
2100
|
-
"methodName": "
|
|
2158
|
+
"methodName": "watch14"
|
|
2101
2159
|
}, {
|
|
2102
2160
|
"propName": "amountText",
|
|
2103
|
-
"methodName": "
|
|
2161
|
+
"methodName": "watch14"
|
|
2104
2162
|
}, {
|
|
2105
2163
|
"propName": "selectedLabels",
|
|
2106
|
-
"methodName": "
|
|
2164
|
+
"methodName": "watch14"
|
|
2107
2165
|
}, {
|
|
2108
2166
|
"propName": "transformSelectedLabels",
|
|
2109
|
-
"methodName": "
|
|
2167
|
+
"methodName": "watch14"
|
|
2110
2168
|
}, {
|
|
2111
2169
|
"propName": "_selectedOptions",
|
|
2112
|
-
"methodName": "
|
|
2170
|
+
"methodName": "watch15"
|
|
2113
2171
|
}, {
|
|
2114
2172
|
"propName": "selectAllIndeterminate",
|
|
2115
|
-
"methodName": "
|
|
2173
|
+
"methodName": "watch16"
|
|
2116
2174
|
}, {
|
|
2117
2175
|
"propName": "selectAllRef",
|
|
2118
|
-
"methodName": "
|
|
2176
|
+
"methodName": "watch16"
|
|
2119
2177
|
}, {
|
|
2120
2178
|
"propName": "selectRef",
|
|
2121
|
-
"methodName": "
|
|
2179
|
+
"methodName": "watch17"
|
|
2122
2180
|
}, {
|
|
2123
2181
|
"propName": "invalidMessage",
|
|
2124
|
-
"methodName": "
|
|
2182
|
+
"methodName": "watch17"
|
|
2125
2183
|
}];
|
|
2126
2184
|
}
|
|
2127
2185
|
}
|