@infineon/infineon-design-system-stencil 41.10.0 → 41.11.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/dist/cem.json +78 -0
- package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-search.cjs.entry.js +2 -2
- package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
- package/dist/cjs/ifx-multiselect-group.cjs.entry.js +42 -0
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +110 -57
- package/dist/cjs/ifx-select-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-select_2.cjs.entry.js +2 -2
- package/dist/cjs/ifx-slider.cjs.entry.js +1 -1
- package/dist/cjs/ifx-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js +8 -8
- package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
- package/dist/cjs/ifx-table.cjs.entry.js +8 -8
- package/dist/cjs/ifx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
- package/dist/cjs/ifx-text-field.cjs.entry.js +2 -2
- package/dist/cjs/ifx-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/index-TZ-HynXP.js +4 -0
- package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/select/multi-select/multiselect-group.css +18 -0
- package/dist/collection/components/select/multi-select/multiselect-group.js +92 -0
- package/dist/collection/components/select/multi-select/multiselect-option.js +25 -11
- package/dist/collection/components/select/multi-select/multiselect.js +87 -47
- package/dist/collection/components/select/single-select/select-group.js +1 -1
- package/dist/collection/components/select/single-select/select-option.js +2 -2
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/status/status.js +1 -1
- package/dist/collection/components/stepper/step/step.js +8 -8
- package/dist/collection/components/stepper/stepper.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +2 -2
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
- package/dist/collection/components/table-advanced-version/table.js +8 -8
- package/dist/collection/components/table-basic-version/table.js +1 -1
- package/dist/collection/components/tabs/tab.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/templates/template/template.js +1 -1
- package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
- package/dist/collection/components/text-field/text-field.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/components/ifx-basic-table.js +1 -1
- package/dist/components/ifx-filter-accordion.js +1 -1
- package/dist/components/ifx-filter-bar.js +1 -1
- package/dist/components/ifx-filter-search.js +1 -1
- package/dist/components/ifx-filter-type-group.js +1 -1
- package/dist/components/ifx-list-entry.js +1 -1
- package/dist/components/ifx-multiselect-group.d.ts +11 -0
- package/dist/components/ifx-multiselect-group.js +1 -0
- package/dist/components/ifx-multiselect-option.js +1 -1
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-select-group.js +1 -1
- package/dist/components/ifx-select-option.js +1 -1
- package/dist/components/ifx-set-filter.js +1 -1
- package/dist/components/ifx-slider.js +1 -1
- package/dist/components/ifx-spinner.js +1 -1
- package/dist/components/ifx-status.js +1 -1
- package/dist/components/ifx-step.js +1 -1
- package/dist/components/ifx-stepper.js +1 -1
- package/dist/components/ifx-switch.js +1 -1
- package/dist/components/ifx-tab.js +1 -1
- package/dist/components/ifx-table.js +1 -1
- package/dist/components/ifx-tabs.js +1 -1
- package/dist/components/ifx-template.js +1 -1
- package/dist/components/ifx-templates-ui.js +1 -1
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/ifx-textarea.js +1 -1
- package/dist/components/ifx-toast-container.js +1 -1
- package/dist/components/ifx-toast.js +1 -1
- package/dist/components/ifx-tooltip.js +1 -1
- package/dist/components/ifx-tree-view.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-oMgDQmDS.js → p-01Fq83Ay.js} +1 -1
- package/dist/components/{p-BIoJfrzw.js → p-B-65ikv0.js} +1 -1
- package/dist/components/p-BQivYiUt.js +1 -0
- package/dist/components/p-BR-byAER.js +1 -0
- package/dist/components/{p-G6EFuX5D.js → p-DQ_m0TTx.js} +1 -1
- package/dist/components/{p-D5AljCFf.js → p-Db3L7LHV.js} +1 -1
- package/dist/components/{p-CzJ-Xu4x.js → p-HGc0j1iA.js} +1 -1
- package/dist/components/{p-BbJR9AGQ.js → p-LW34vQor.js} +1 -1
- package/dist/docs.json +81 -3
- package/dist/esm/ifx-alert_2.entry.js +1 -1
- package/dist/esm/ifx-basic-table.entry.js +1 -1
- package/dist/esm/ifx-filter-accordion.entry.js +1 -1
- package/dist/esm/ifx-filter-bar.entry.js +1 -1
- package/dist/esm/ifx-filter-search.entry.js +2 -2
- package/dist/esm/ifx-filter-type-group.entry.js +1 -1
- package/dist/esm/ifx-list-entry.entry.js +1 -1
- package/dist/esm/ifx-multiselect-group.entry.js +40 -0
- package/dist/esm/ifx-multiselect_2.entry.js +110 -57
- package/dist/esm/ifx-select-group.entry.js +1 -1
- package/dist/esm/ifx-select_2.entry.js +2 -2
- package/dist/esm/ifx-slider.entry.js +1 -1
- package/dist/esm/ifx-spinner.entry.js +1 -1
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-step.entry.js +8 -8
- package/dist/esm/ifx-stepper.entry.js +2 -2
- package/dist/esm/ifx-switch.entry.js +1 -1
- package/dist/esm/ifx-tab.entry.js +1 -1
- package/dist/esm/ifx-table.entry.js +8 -8
- package/dist/esm/ifx-tabs.entry.js +1 -1
- package/dist/esm/ifx-templates-ui.entry.js +1 -1
- package/dist/esm/ifx-text-field.entry.js +2 -2
- package/dist/esm/ifx-textarea.entry.js +2 -2
- package/dist/esm/ifx-tooltip.entry.js +1 -1
- package/dist/esm/ifx-tree-view.entry.js +1 -1
- package/dist/esm/index-gQ6ZdKHB.js +4 -0
- package/dist/esm/infineon-design-system-stencil.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +207 -100
- package/dist/hydrate/index.mjs +207 -100
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/{p-4bf7de8f.entry.js → p-0ba8caf4.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-389282f4.entry.js → p-0e115f65.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-bfe0d4ee.entry.js → p-107b7442.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-da13fbd0.entry.js → p-14b87170.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-32fa5819.entry.js → p-266a86e2.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-9a13d74b.entry.js → p-269c3e24.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-eeec1be3.entry.js → p-3bdce823.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-de240f63.entry.js → p-4eb270d6.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-2b1456d8.entry.js → p-52383039.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-2ea051f3.entry.js → p-59ade359.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-a8dd2666.entry.js → p-71e50e52.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-159a2627.entry.js → p-7734a50b.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-cfc8e22d.entry.js → p-8109db9a.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-6b663d73.entry.js → p-8d6e30c6.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-99abe4db.entry.js → p-9a73c1ed.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/p-a8d747e4.entry.js +1 -0
- package/dist/infineon-design-system-stencil/{p-10fe21b4.entry.js → p-b7c05d4b.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-75ee212c.entry.js → p-c8c7529b.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/p-ca6a4969.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-cb2318dc.entry.js +1 -0
- package/dist/infineon-design-system-stencil/{p-e52de15b.entry.js → p-cf6707d0.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/{p-a734c110.entry.js → p-d2b29176.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/p-e14fdb7e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/{p-00437bbf.entry.js → p-f144197f.entry.js} +1 -1
- package/dist/infineon-design-system-stencil/p-faedab1e.entry.js +1 -0
- package/dist/types/components/select/multi-select/multiselect-group.d.ts +15 -0
- package/dist/types/components/select/multi-select/multiselect-option.d.ts +3 -0
- package/dist/types/components/select/multi-select/multiselect.d.ts +8 -0
- package/dist/types/components.d.ts +51 -0
- package/package.json +2 -2
- package/dist/components/p-BoQjq5-h.js +0 -1
- package/dist/components/p-eVYf8MRd.js +0 -1
- package/dist/infineon-design-system-stencil/p-badb9b54.entry.js +0 -1
- package/dist/infineon-design-system-stencil/p-e1207fd4.entry.js +0 -1
- package/dist/infineon-design-system-stencil/p-e28822a4.entry.js +0 -1
- package/dist/infineon-design-system-stencil/p-fbce99f1.entry.js +0 -1
package/dist/cem.json
CHANGED
|
@@ -7057,6 +7057,84 @@
|
|
|
7057
7057
|
}
|
|
7058
7058
|
]
|
|
7059
7059
|
},
|
|
7060
|
+
{
|
|
7061
|
+
"kind": "javascript-module",
|
|
7062
|
+
"path": "src/components/select/multi-select/multiselect-group.tsx",
|
|
7063
|
+
"declarations": [
|
|
7064
|
+
{
|
|
7065
|
+
"kind": "class",
|
|
7066
|
+
"customElement": true,
|
|
7067
|
+
"tagName": "ifx-multiselect-group",
|
|
7068
|
+
"name": "IfxMultiselectGroup",
|
|
7069
|
+
"description": "Visually and semantically groups multiselect options under a heading.\nUnlike a multiselect option with children, a group is not selectable or expandable.",
|
|
7070
|
+
"attributes": [
|
|
7071
|
+
{
|
|
7072
|
+
"name": "disabled",
|
|
7073
|
+
"description": "Whether the group is disabled.",
|
|
7074
|
+
"type": {
|
|
7075
|
+
"text": "boolean"
|
|
7076
|
+
},
|
|
7077
|
+
"default": "false",
|
|
7078
|
+
"fieldName": "disabled"
|
|
7079
|
+
},
|
|
7080
|
+
{
|
|
7081
|
+
"name": "label",
|
|
7082
|
+
"description": "Label displayed above the group's options.",
|
|
7083
|
+
"type": {
|
|
7084
|
+
"text": "string"
|
|
7085
|
+
},
|
|
7086
|
+
"fieldName": "label"
|
|
7087
|
+
}
|
|
7088
|
+
],
|
|
7089
|
+
"members": [
|
|
7090
|
+
{
|
|
7091
|
+
"kind": "field",
|
|
7092
|
+
"name": "disabled",
|
|
7093
|
+
"description": "Whether the group is disabled.",
|
|
7094
|
+
"type": {
|
|
7095
|
+
"text": "boolean"
|
|
7096
|
+
},
|
|
7097
|
+
"default": "false",
|
|
7098
|
+
"readonly": true,
|
|
7099
|
+
"attribute": "disabled",
|
|
7100
|
+
"reflects": true
|
|
7101
|
+
},
|
|
7102
|
+
{
|
|
7103
|
+
"kind": "field",
|
|
7104
|
+
"name": "label",
|
|
7105
|
+
"description": "Label displayed above the group's options.",
|
|
7106
|
+
"type": {
|
|
7107
|
+
"text": "string"
|
|
7108
|
+
},
|
|
7109
|
+
"readonly": true,
|
|
7110
|
+
"attribute": "label"
|
|
7111
|
+
}
|
|
7112
|
+
],
|
|
7113
|
+
"slots": [
|
|
7114
|
+
{
|
|
7115
|
+
"name": "",
|
|
7116
|
+
"description": "The default slot"
|
|
7117
|
+
}
|
|
7118
|
+
]
|
|
7119
|
+
}
|
|
7120
|
+
],
|
|
7121
|
+
"exports": [
|
|
7122
|
+
{
|
|
7123
|
+
"kind": "js",
|
|
7124
|
+
"name": "IfxMultiselectGroup",
|
|
7125
|
+
"declaration": {
|
|
7126
|
+
"name": "IfxMultiselectGroup"
|
|
7127
|
+
}
|
|
7128
|
+
},
|
|
7129
|
+
{
|
|
7130
|
+
"kind": "custom-element-definition",
|
|
7131
|
+
"name": "ifx-multiselect-group",
|
|
7132
|
+
"declaration": {
|
|
7133
|
+
"name": "IfxMultiselectGroup"
|
|
7134
|
+
}
|
|
7135
|
+
}
|
|
7136
|
+
]
|
|
7137
|
+
},
|
|
7060
7138
|
{
|
|
7061
7139
|
"kind": "javascript-module",
|
|
7062
7140
|
"path": "src/components/select/multi-select/multiselect-option.tsx",
|
|
@@ -208,7 +208,7 @@ const Template = class {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
render() {
|
|
211
|
-
return (index.h("div", { key: '
|
|
211
|
+
return (index.h("div", { key: 'bbdf6c77f4d9f26651eb3016337f761ef85362fb' }, this.isTemplatePage ? (index.h("div", { class: "template__page-wrapper" }, !this.repoUrl && !this.repoError && (index.h("div", null, index.h("h3", null, "Your repository is getting ready.."), index.h("p", null, "This will only take a minute."))), this.isLoading && !this.repoError && (index.h("div", null, index.h("ifx-spinner", { variant: "default", size: "s" }))), this.repoUrl && (index.h("ifx-link", { href: this.repoUrl, target: "_parent", size: "m", variant: "underlined" }, "Your repository")), this.repoError && index.h("div", null, this.repoError))) : (index.h("div", { class: "react__template-container" }, index.h("div", { class: "react__template-wrapper", onClick: (e) => this.handleCurrentTemplate(e) }, index.h("div", { class: "image__wrapper" }, index.h("img", { src: this.thumbnail }))), this.showDetails && (index.h("div", { class: "details__wrapper" }, index.h("div", { class: "selection__buttons-wrapper" }, index.h("div", { class: "selection__input" }, index.h("input", { type: "radio", id: "react", name: "chosen_framework", value: "react", onInput: (e) => this.handleUserInput(e, "framework") }), index.h("label", { htmlFor: "react" }, "React")), index.h("div", { class: "selection__input vue" }, index.h("input", { class: "vue__input", disabled: true, type: "radio", id: "vue", name: "chosen_framework", value: "vue", onInput: (e) => this.handleUserInput(e, "framework") }), index.h("label", { class: "vue__label", htmlFor: "vue" }, "Vue"), " ", "(Soon)")), index.h("div", { class: "input__fields-wrapper" }, index.h("ifx-text-field", { required: true, onInput: (e) => this.handleUserInput(e, "name"), size: "m", icon: "c-info-16", placeholder: "Your repository name" }, "Repository Name"), index.h("ifx-text-field", { required: true, size: "m", icon: "c-info-16", onInput: (e) => this.handleUserInput(e, "desc"), placeholder: "Your repository description" }, "Repository Description"), index.h("ifx-button", { fullWidth: true, onClick: () => this.submitUserData(), variant: "primary" }, "Generate template"))))))));
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
Template.style = templateCss();
|
|
@@ -210,7 +210,7 @@ const Table = class {
|
|
|
210
210
|
return {};
|
|
211
211
|
}
|
|
212
212
|
render() {
|
|
213
|
-
return (index.h(index.Host, { key: '
|
|
213
|
+
return (index.h(index.Host, { key: 'f82dea92690d177da055ddcb41691d6f0e7441a0' }, index.h("div", { key: '01533aeeeca57df57193b522ed34efe3c3c9f70c', id: "table-wrapper", class: this.getClassNames() }, index.h("div", { key: '2dd588dd5b95fecee990c5c88b4c793dc32d258a', id: `ifxTable-${this.uniqueKey}`, class: `ifx-ag-grid ${this.variant === "zebra" ? "zebra" : ""} ${this.columnValuePosition === "center" ? "center" : "left"}`, style: this.getTableStyle(), ref: (el) => (this.container = el) }))));
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
Table.style = tableCss();
|
|
@@ -59,7 +59,7 @@ const FilterAccordion = class {
|
|
|
59
59
|
this.expanded = !this.expanded;
|
|
60
60
|
};
|
|
61
61
|
render() {
|
|
62
|
-
return (index.h("div", { key: '
|
|
62
|
+
return (index.h("div", { key: '16c2b36c5afcae7576d83e37d1ae89b54dd08558', class: `accordion ${this.expanded ? "expanded" : ""}` }, index.h("div", { key: 'f1ffd403cdc35c563a4b2c8c6419ed4c3d206dae', class: `header ${this.expanded ? "expanded" : ""}`, onClick: this.toggleAccordion }, index.h("div", { key: '762557b757d22758790db924715d880631009915', class: `text-and-icon ${this.expanded ? "expanded" : ""}` }, index.h("div", { key: '4156441a8e1de2041b1e53f5b75b31d2f4026b26', class: "text" }, index.h("span", { key: '59f19fac72ccfa6506b9308386e12a5789d2a8e9' }, this.filterGroupName), index.h("ifx-indicator", { key: 'd4a2e2fa72f4f9b03f091eca1831681b8c2d0056', variant: "number", number: this.count })), index.h("ifx-icon", { key: '1e130e0f5e10df759e3203bc6b52a80407b8ea41', class: this.expanded ? "" : "hidden", icon: "minus-16", onClick: this.toggleAccordion }), index.h("ifx-icon", { key: '548beeb37a1ff352c417311a9f0ebda0500adcd2', class: this.expanded ? "hidden" : "", icon: "plus-16", onClick: this.toggleAccordion }))), this.expanded && (index.h("div", { key: 'dc187cb6f90f862345de8d7fc9977ca3b63d4e68', class: "filter-accordion-container" }, index.h("slot", { key: '47088c1788c976524fd7b0d5f0ae1c059b799861', name: "list" })))));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
FilterAccordion.style = filterAccordionCss();
|
|
@@ -111,7 +111,7 @@ const FilterBar = class {
|
|
|
111
111
|
// Calculate slotsToShow safely
|
|
112
112
|
const slotsToShow = Math.min(safeVisibleSlots, actualNumberOfComponents, Number.MAX_SAFE_INTEGER);
|
|
113
113
|
const slots = Array.from({ length: slotsToShow }, (_, i) => (index.h("div", { class: "filter-slot-wrapper" }, index.h("slot", { name: `filter-component-${i + 1}` }))));
|
|
114
|
-
return (index.h(index.Host, { key: '
|
|
114
|
+
return (index.h(index.Host, { key: 'fbdda1a578fe87df4c80b44fd07b62a20da83387' }, index.h("div", { key: '9d489cd102877435c2d03f88204543de53d784dc', class: "search-container" }, index.h("slot", { key: '72473788101d4215c21538783e33e4277b3cd8e9', name: "filter-search" }), " "), index.h("div", { key: '7246f13e02dbc31a62a918693c5d4892fd6e0995', class: "components-container" }, slots.length > 0 ? slots : index.h("slot", { name: "filter-component" }), this.showMoreFilters && (index.h("div", { key: '4195082e13de758ac97a0dae5d296d7c204b0a3c', class: "filter-buttons-wrapper", onClick: () => this.handleFilterButtonsClick(!this.showAllFilters) }, index.h("ifx-button", { key: '93ee70d28b44e37679be84b433dfa0ba77bb845e', type: "button", disabled: false, variant: "tertiary", size: "m", target: "_blank", theme: "default", "full-width": "false" }, index.h("ifx-icon", { key: 'af709bfcda7e80e65d6fe57082a2187276d1e10c', icon: "filter-16" }), this.showAllFilters ? "Less filters" : "More filters"))))));
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
FilterBar.style = filterBarCss();
|
|
@@ -47,9 +47,9 @@ const FilterSearch = class {
|
|
|
47
47
|
}); // Emitting filterKey along with other properties
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (index.h("div", { key: '
|
|
50
|
+
return (index.h("div", { key: '1721c6c72eb1a2afb0cd081f7bbf5a840b04c422', class: `${this.filterOrientation === "sidebar"
|
|
51
51
|
? "sidebar-filter-search-wrapper"
|
|
52
|
-
: "topbar-filter-search-wrapper"}` }, index.h("div", { key: '
|
|
52
|
+
: "topbar-filter-search-wrapper"}` }, index.h("div", { key: '2aead7b1c5726ced761bf0e50fcf4ef7f2a3594b', class: "filter-name" }, this.filterName), index.h("ifx-search-field", { key: '4cdc4f07da9c650c70af36ab877a98213376c685', placeholder: this.placeholder, "show-delete-icon": this.showDeleteIcon, disabled: this.disabled, value: this.filterValue })));
|
|
53
53
|
}
|
|
54
54
|
static get watchers() { return {
|
|
55
55
|
"value": [{
|
|
@@ -155,7 +155,7 @@ const IfxFilterTypeGroup = class {
|
|
|
155
155
|
this.ifxSidebarFilterChange.emit(this.selectedOptions);
|
|
156
156
|
};
|
|
157
157
|
render() {
|
|
158
|
-
return (index.h(index.Host, { key: '
|
|
158
|
+
return (index.h(index.Host, { key: '0230e86f6892cb8d4632401d1060984731a0c001' }, index.h("div", { key: 'e7f3e67996cb6921932a20e3f798c33f586b78e5', class: "filter-type-group" }, index.h("slot", { key: 'c607c9eb7783e79c834fb7a8ee9ea7b9afea5821', name: "filter-search" }), index.h("slot", { key: '899d03aa346ddece0fdb33b5c1ca5663807c1a37', name: "filter-accordion" }))));
|
|
159
159
|
}
|
|
160
160
|
static get watchers() { return {
|
|
161
161
|
"showSidebarFiltersButton": [{
|
|
@@ -31,7 +31,7 @@ const ListEntry = class {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (index.h("div", { key: '
|
|
34
|
+
return (index.h("div", { key: 'ce0db5a0d6c4c961d855981097b6bc75241e43b4', class: "wrapper" }, this.type === "checkbox" ? (index.h("div", { class: "list-entry" }, index.h("ifx-checkbox", { size: "s", checked: this.value }, this.label))) : (index.h("div", { class: "list-entry" }, index.h("ifx-radio-button", { size: "s", checked: this.value }, this.label)))));
|
|
35
35
|
}
|
|
36
36
|
static get watchers() { return {
|
|
37
37
|
"value": [{
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-TZ-HynXP.js');
|
|
4
|
+
|
|
5
|
+
const multiselectGroupCss = () => `:host{display:block;cursor:default}:host(.empty-group){display:none}.group-heading{box-sizing:border-box;padding:8px 16px;font-family:var(--ifx-font-family);font-size:0.875rem;line-height:1.25rem;font-weight:600;color:#3c3a39}`;
|
|
6
|
+
|
|
7
|
+
const MultiselectGroup = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
get el() { return index.getElement(this); }
|
|
12
|
+
/** Label displayed above the group's options. */
|
|
13
|
+
label;
|
|
14
|
+
/** Whether the group is disabled. */
|
|
15
|
+
disabled = false;
|
|
16
|
+
componentWillLoad() {
|
|
17
|
+
if (this.el.parentElement?.tagName !== "IFX-MULTISELECT") {
|
|
18
|
+
console.warn("ifx-multiselect-group must be a direct child of ifx-multiselect.");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.updateDescendantDisabledState();
|
|
23
|
+
}
|
|
24
|
+
updateDescendantDisabledState() {
|
|
25
|
+
this.el.querySelectorAll("ifx-multiselect-option").forEach((option) => {
|
|
26
|
+
option.dispatchEvent(new CustomEvent("ifx-group-disabled-change", {
|
|
27
|
+
detail: { disabled: this.disabled },
|
|
28
|
+
}));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return (index.h(index.Host, { key: 'fe783b1d455d41c822a8da7e1bb4ec3f8ebd64b4', role: "group", "aria-label": this.label, "aria-disabled": this.disabled ? "true" : undefined }, index.h("div", { key: '0107530a33fad004816253338a61d986ae0775e5', class: "group-heading", "aria-hidden": "true" }, this.label), index.h("slot", { key: '1d4ad306b1f9bbfaad4767f740a96349d5afde1b' })));
|
|
33
|
+
}
|
|
34
|
+
static get watchers() { return {
|
|
35
|
+
"disabled": [{
|
|
36
|
+
"updateDescendantDisabledState": 0
|
|
37
|
+
}]
|
|
38
|
+
}; }
|
|
39
|
+
};
|
|
40
|
+
MultiselectGroup.style = multiselectGroupCss();
|
|
41
|
+
|
|
42
|
+
exports.ifx_multiselect_group = MultiselectGroup;
|
|
@@ -105,15 +105,50 @@ const Multiselect = class {
|
|
|
105
105
|
resizeObserver;
|
|
106
106
|
measurementScheduled = false;
|
|
107
107
|
internals;
|
|
108
|
+
getAllOptionElements() {
|
|
109
|
+
return Array.from(this.el.querySelectorAll("ifx-multiselect-option"));
|
|
110
|
+
}
|
|
111
|
+
getGroupElements() {
|
|
112
|
+
return Array.from(this.el.querySelectorAll("ifx-multiselect-group"));
|
|
113
|
+
}
|
|
114
|
+
isOptionVisible(option) {
|
|
115
|
+
return !option.shadowRoot?.querySelector(".option")?.classList.contains("search-hidden");
|
|
116
|
+
}
|
|
117
|
+
updateGroupVisibility(searchActive) {
|
|
118
|
+
this.getGroupElements().forEach((group) => {
|
|
119
|
+
const hasVisibleOption = Array.from(group.querySelectorAll("ifx-multiselect-option")).some((option) => this.isOptionVisible(option));
|
|
120
|
+
if (searchActive && !hasVisibleOption) {
|
|
121
|
+
group.classList.add("empty-group");
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
group.classList.remove("empty-group");
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
getRootOptionElements() {
|
|
129
|
+
return Array.from(this.el.children).flatMap((child) => {
|
|
130
|
+
if (child.tagName === "IFX-MULTISELECT-OPTION") {
|
|
131
|
+
return [child];
|
|
132
|
+
}
|
|
133
|
+
if (child.tagName === "IFX-MULTISELECT-GROUP") {
|
|
134
|
+
return Array.from(child.children).filter((groupChild) => groupChild.tagName === "IFX-MULTISELECT-OPTION");
|
|
135
|
+
}
|
|
136
|
+
return [];
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
getLeafOptionElements() {
|
|
140
|
+
return this.getAllOptionElements().filter((option) => option.children.length === 0);
|
|
141
|
+
}
|
|
142
|
+
getEnabledLeafOptionElements() {
|
|
143
|
+
return this.getLeafOptionElements().filter((option) => !option.disabled && !option.closest("ifx-multiselect-group")?.disabled);
|
|
144
|
+
}
|
|
108
145
|
parseChildOptions() {
|
|
109
146
|
const options = [];
|
|
110
|
-
const childElements =
|
|
147
|
+
const childElements = this.getRootOptionElements();
|
|
111
148
|
childElements.forEach((child, index) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
options.push(option);
|
|
116
|
-
}
|
|
149
|
+
const option = this.parseOptionElement(child, index);
|
|
150
|
+
if (option) {
|
|
151
|
+
options.push(option);
|
|
117
152
|
}
|
|
118
153
|
});
|
|
119
154
|
return options;
|
|
@@ -208,7 +243,7 @@ const Multiselect = class {
|
|
|
208
243
|
}
|
|
209
244
|
}
|
|
210
245
|
requestAnimationFrame(() => {
|
|
211
|
-
const allOptions = this.
|
|
246
|
+
const allOptions = this.getAllOptionElements();
|
|
212
247
|
allOptions.forEach((option) => {
|
|
213
248
|
const searchEvent = new CustomEvent("ifx-search-filter", {
|
|
214
249
|
detail: { searchTerm, isActive: isSearchActive },
|
|
@@ -217,8 +252,9 @@ const Multiselect = class {
|
|
|
217
252
|
});
|
|
218
253
|
if (isSearchActive) {
|
|
219
254
|
setTimeout(() => {
|
|
220
|
-
const allOptions = this.
|
|
255
|
+
const allOptions = this.getAllOptionElements();
|
|
221
256
|
let visibleCount = 0;
|
|
257
|
+
this.updateGroupVisibility(true);
|
|
222
258
|
allOptions.forEach((option) => {
|
|
223
259
|
const style = window.getComputedStyle(option);
|
|
224
260
|
const rect = option.getBoundingClientRect();
|
|
@@ -241,6 +277,7 @@ const Multiselect = class {
|
|
|
241
277
|
}, 200);
|
|
242
278
|
}
|
|
243
279
|
else {
|
|
280
|
+
this.updateGroupVisibility(false);
|
|
244
281
|
const optionsContainer = this.el.shadowRoot.querySelector(".ifx-multiselect-options");
|
|
245
282
|
if (optionsContainer) {
|
|
246
283
|
optionsContainer.classList.remove("show-no-results");
|
|
@@ -275,11 +312,10 @@ const Multiselect = class {
|
|
|
275
312
|
}
|
|
276
313
|
//private pendingSelectionUpdate = false;
|
|
277
314
|
updateSlotBasedSelections(emitEvent = false) {
|
|
278
|
-
const allOptionElements = this.el.querySelectorAll("ifx-multiselect-option");
|
|
279
315
|
const selectedLeafOptions = [];
|
|
280
|
-
|
|
316
|
+
this.getLeafOptionElements().forEach((optionEl) => {
|
|
281
317
|
const instance = optionEl["__stencil_instance"];
|
|
282
|
-
if (instance
|
|
318
|
+
if (instance?.selected) {
|
|
283
319
|
selectedLeafOptions.push({
|
|
284
320
|
value: instance.value,
|
|
285
321
|
selected: true,
|
|
@@ -294,8 +330,7 @@ const Multiselect = class {
|
|
|
294
330
|
}
|
|
295
331
|
}
|
|
296
332
|
updateInitialParentStates() {
|
|
297
|
-
const
|
|
298
|
-
const optionsByDepth = Array.from(allOptionElements)
|
|
333
|
+
const optionsByDepth = this.getAllOptionElements()
|
|
299
334
|
.map((el) => ({
|
|
300
335
|
element: el,
|
|
301
336
|
instance: el["__stencil_instance"],
|
|
@@ -374,8 +409,7 @@ const Multiselect = class {
|
|
|
374
409
|
//this.internals.setFormValue(formData);
|
|
375
410
|
}
|
|
376
411
|
collapseAll() {
|
|
377
|
-
|
|
378
|
-
allOptionElements.forEach((optionEl) => {
|
|
412
|
+
this.getAllOptionElements().forEach((optionEl) => {
|
|
379
413
|
const instance = optionEl["__stencil_instance"];
|
|
380
414
|
if (instance && instance.hasChildren) {
|
|
381
415
|
instance.isExpanded = false;
|
|
@@ -383,8 +417,7 @@ const Multiselect = class {
|
|
|
383
417
|
});
|
|
384
418
|
}
|
|
385
419
|
expandAll() {
|
|
386
|
-
|
|
387
|
-
allOptionElements.forEach((optionEl) => {
|
|
420
|
+
this.getAllOptionElements().forEach((optionEl) => {
|
|
388
421
|
const instance = optionEl["__stencil_instance"];
|
|
389
422
|
if (instance && instance.hasChildren) {
|
|
390
423
|
instance.isExpanded = true;
|
|
@@ -393,16 +426,11 @@ const Multiselect = class {
|
|
|
393
426
|
}
|
|
394
427
|
selectAll() {
|
|
395
428
|
this.resetSearch();
|
|
396
|
-
|
|
397
|
-
|
|
429
|
+
this.expandAll();
|
|
430
|
+
this.getEnabledLeafOptionElements().forEach((optionEl) => {
|
|
398
431
|
const instance = optionEl["__stencil_instance"];
|
|
399
432
|
if (instance) {
|
|
400
|
-
|
|
401
|
-
instance.isExpanded = true;
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
instance.selected = true;
|
|
405
|
-
}
|
|
433
|
+
instance.selected = true;
|
|
406
434
|
}
|
|
407
435
|
});
|
|
408
436
|
setTimeout(() => {
|
|
@@ -413,8 +441,7 @@ const Multiselect = class {
|
|
|
413
441
|
}
|
|
414
442
|
/** Clears all selected options in the multi-select and resets their state. */
|
|
415
443
|
async clearSelection() {
|
|
416
|
-
|
|
417
|
-
allOptionElements.forEach((optionEl) => {
|
|
444
|
+
this.getAllOptionElements().forEach((optionEl) => {
|
|
418
445
|
const instance = optionEl["__stencil_instance"];
|
|
419
446
|
if (instance) {
|
|
420
447
|
instance.selected = false;
|
|
@@ -461,13 +488,28 @@ const Multiselect = class {
|
|
|
461
488
|
if (optionsContainer) {
|
|
462
489
|
optionsContainer.classList.remove("has-search-filter");
|
|
463
490
|
}
|
|
464
|
-
const allOptions = this.
|
|
491
|
+
const allOptions = this.getAllOptionElements();
|
|
465
492
|
allOptions.forEach((option) => {
|
|
466
493
|
const searchEvent = new CustomEvent("ifx-search-filter", {
|
|
467
494
|
detail: { searchTerm: "", isActive: false },
|
|
468
495
|
});
|
|
469
496
|
option.dispatchEvent(searchEvent);
|
|
470
497
|
});
|
|
498
|
+
this.updateGroupVisibility(false);
|
|
499
|
+
}
|
|
500
|
+
clearEnabledSelection() {
|
|
501
|
+
this.getEnabledLeafOptionElements().forEach((optionEl) => {
|
|
502
|
+
const instance = optionEl["__stencil_instance"];
|
|
503
|
+
if (instance) {
|
|
504
|
+
instance.selected = false;
|
|
505
|
+
instance.indeterminate = false;
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
setTimeout(() => {
|
|
509
|
+
this.updateInitialParentStates();
|
|
510
|
+
this.updateSlotBasedSelections(false);
|
|
511
|
+
this.ifxSelect.emit(this.persistentSelectedOptions);
|
|
512
|
+
}, 0);
|
|
471
513
|
}
|
|
472
514
|
handleWrapperClick(event) {
|
|
473
515
|
this.positionDropdown();
|
|
@@ -529,18 +571,16 @@ const Multiselect = class {
|
|
|
529
571
|
}
|
|
530
572
|
}
|
|
531
573
|
renderSelectAll() {
|
|
532
|
-
const
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
const allSelected = leafOptions.length > 0 &&
|
|
536
|
-
selectedLeafOptions.length === leafOptions.length;
|
|
574
|
+
const enabledLeafOptions = this.getEnabledLeafOptionElements();
|
|
575
|
+
const allSelected = enabledLeafOptions.length > 0 &&
|
|
576
|
+
enabledLeafOptions.every((option) => option.selected);
|
|
537
577
|
const toggleSelectAll = (event) => {
|
|
538
578
|
if (event) {
|
|
539
579
|
event.preventDefault();
|
|
540
580
|
event.stopPropagation();
|
|
541
581
|
}
|
|
542
582
|
if (allSelected) {
|
|
543
|
-
this.
|
|
583
|
+
this.clearEnabledSelection();
|
|
544
584
|
}
|
|
545
585
|
else {
|
|
546
586
|
this.selectAll();
|
|
@@ -634,27 +674,27 @@ const Multiselect = class {
|
|
|
634
674
|
render() {
|
|
635
675
|
const hasSelections = this.persistentSelectedOptions.length > 0;
|
|
636
676
|
let isFlatMultiselect = false;
|
|
637
|
-
const allOptionElements = this.
|
|
677
|
+
const allOptionElements = this.getAllOptionElements();
|
|
638
678
|
if (allOptionElements.length > 0) {
|
|
639
|
-
isFlatMultiselect =
|
|
679
|
+
isFlatMultiselect = allOptionElements.every((option) => option.children.length === 0);
|
|
640
680
|
}
|
|
641
|
-
return (index.h("div", { key: '
|
|
681
|
+
return (index.h("div", { key: 'f00d2b7e9ecd303b8157454814a4955e0c1b8804', class: `ifx-multiselect-container ${this.readOnly ? 'readOnly' : this.internalError ? '' : this.disabled ? 'disabled' : ''}`, ref: (el) => (this.dropdownElement = el) }, index.h("div", { key: '68fb0fff7b906e3a14e4fef4def1f0aab8f3f26c', class: "ifx-label-wrapper" }, this.label && (index.h("span", { key: '1c3308f3259da195e08d7cea3728779fdcf72b5b', class: "wrapper-label" }, index.h("span", { key: 'faec02d87d7ea4e9c6c8d00c9a76897b897ff943' }, this.label), this.required && (index.h("span", { key: 'c7c0e4d7a90caf2dbf0594867798fc418ffa10be', class: `required ${!this.readOnly && this.internalError ? "error" : ""}` }, "*"))))), index.h("div", { key: '5e2c61ef32fb0be706c34f6103f0a939924e0582', class: `ifx-multiselect-wrapper
|
|
642
682
|
${this.dropdownOpen ? "active" : ""}
|
|
643
683
|
${this.dropdownFlipped ? "is-flipped" : ""}
|
|
644
684
|
${this.readOnly ? "" : this.internalError ? "error" : this.disabled ? "disabled" : ""}`, role: "combobox", "aria-label": this.ariaMultiSelectLabel, "aria-labelledby": this.ariaMultiSelectLabelledBy || undefined, "aria-describedby": this.ariaMultiSelectDescribedBy || undefined, "aria-expanded": this.dropdownOpen, "aria-haspopup": "listbox", "aria-disabled": !this.readOnly && !this.internalError && this.disabled, tabindex: "0", onClick: (this.disabled && !this.internalError) || this.readOnly
|
|
645
685
|
? undefined
|
|
646
686
|
: (event) => this.handleWrapperClick(event), onKeyDown: (this.disabled && !this.internalError) || this.readOnly
|
|
647
687
|
? undefined
|
|
648
|
-
: (event) => this.handleKeyDown(event) }, index.h("div", { key: '
|
|
688
|
+
: (event) => this.handleKeyDown(event) }, index.h("div", { key: 'f3ab373237d09c9ba8ba91c03aeee930241520e4', class: `ifx-multiselect-input
|
|
649
689
|
chips
|
|
650
690
|
${hasSelections ? "" : "placeholder"}
|
|
651
691
|
`, onClick: (this.disabled && !this.internalError) || this.readOnly
|
|
652
692
|
? undefined
|
|
653
|
-
: () => this.toggleDropdown() }, hasSelections ? this.renderSelectedOptions() : this.placeholder, hasSelections && this.renderSelectedOptionsMeasurement()), this.dropdownOpen && (index.h("div", { key: '
|
|
693
|
+
: () => this.toggleDropdown() }, hasSelections ? this.renderSelectedOptions() : this.placeholder, hasSelections && this.renderSelectedOptionsMeasurement()), this.dropdownOpen && (index.h("div", { key: '3e064ef34d322d364c1e031460f8fa8425bc9f2c', class: "ifx-multiselect-dropdown-menu" }, (this.showSearch ||
|
|
654
694
|
this.showSelectAll ||
|
|
655
|
-
(this.showExpandCollapse && !isFlatMultiselect)) && (index.h("div", { key: '
|
|
695
|
+
(this.showExpandCollapse && !isFlatMultiselect)) && (index.h("div", { key: '84b394b195e48cc39590fdb52b3b50c0b1cec8c7', class: "ifx-multiselect-dropdown-functions", onClick: (e) => e.stopPropagation() }, this.showSearch && (index.h("div", { key: '5ecdcb7dc23620caf47f50b2828775db6935c3d7', class: "ifx-multiselect-dropdown-search" }, index.h("ifx-search-field", { key: 'dc332a3f15602212f5efc500f0ae076b0cf0c166', class: "search-input", placeholder: this.searchPlaceholder, size: "s", "show-delete-icon": "true", "aria-label": this.ariaSearchLabel, onKeyDown: (e) => {
|
|
656
696
|
e.stopPropagation();
|
|
657
|
-
}, onIfxInput: (event) => this.handleSearch(event.target), onFocus: () => this.handleSearchFocus(true), onBlur: () => this.handleSearchFocus(false) }))), index.h("div", { key: '
|
|
697
|
+
}, onIfxInput: (event) => this.handleSearch(event.target), onFocus: () => this.handleSearchFocus(true), onBlur: () => this.handleSearchFocus(false) }))), index.h("div", { key: 'd5dccbcfbe1be89373d2c7839573d905103c6d88', class: "ifx-multiselect-dropdown-controls" }, this.showSelectAll && this.renderSelectAll(), this.showExpandCollapse && !isFlatMultiselect && (index.h("div", { key: 'b89d3f9a8a089e58d15b8149cbf9e8640e6307f8', class: "expand-collapse-controls" }, index.h("span", { key: '5d918ce00151723c3d7cc45250205f621f596be0', class: "control-item", role: "button", tabIndex: 0, "aria-label": this.ariaExpandAllLabel, onClick: (e) => {
|
|
658
698
|
e.stopPropagation();
|
|
659
699
|
this.expandAll();
|
|
660
700
|
}, onKeyDown: (e) => {
|
|
@@ -663,7 +703,7 @@ const Multiselect = class {
|
|
|
663
703
|
e.stopPropagation();
|
|
664
704
|
this.expandAll();
|
|
665
705
|
}
|
|
666
|
-
} }, this.expandLabel), index.h("span", { key: '
|
|
706
|
+
} }, this.expandLabel), index.h("span", { key: 'a0c9a7b8bf4dabf29a79b3c3d3ba653861bb06d0', class: "control-item", role: "button", tabIndex: 0, "aria-label": this.ariaCollapseAllLabel, onClick: (e) => {
|
|
667
707
|
e.stopPropagation();
|
|
668
708
|
this.collapseAll();
|
|
669
709
|
}, onKeyDown: (e) => {
|
|
@@ -672,15 +712,15 @@ const Multiselect = class {
|
|
|
672
712
|
e.stopPropagation();
|
|
673
713
|
this.collapseAll();
|
|
674
714
|
}
|
|
675
|
-
} }, this.collapseLabel)))))), index.h("div", { key: '
|
|
715
|
+
} }, this.collapseLabel)))))), index.h("div", { key: 'b9e28964bbee62c48a38dbfc9c72ecf879f9863f', class: "ifx-multiselect-options", role: "listbox", "aria-multiselectable": "true" }, index.h("slot", { key: 'e347376045f5800c04073db370a2575b50807e12' }), this.searchTerm &&
|
|
676
716
|
this.showNoResultsMessage &&
|
|
677
|
-
this.renderNoResultsMessage()))), index.h("div", { key: '
|
|
717
|
+
this.renderNoResultsMessage()))), index.h("div", { key: '6e2412a22366f4739c1d39693ca6492b5992a8bd', class: "ifx-multiselect-icon-container" }, this.persistentSelectedOptions.length > 0 && (index.h("div", { key: '26a3cef975753ceeb09b5a4abf1479e71c21a776', class: `ifx-clear-button ${!this.showClearButton ? "hide" : ""}`, onClick: this.disabled && !this.error
|
|
678
718
|
? undefined
|
|
679
|
-
: this.handleClearButtonClick }, index.h("ifx-icon", { key: '
|
|
719
|
+
: this.handleClearButtonClick }, index.h("ifx-icon", { key: 'b50d22e9a70915140ac1321202ce284c80ffd909', icon: "cRemove16" }))), index.h("div", { key: '251c57c1daa52ef57570232f35de5a2e70feaa42', class: "icon-wrapper-up", onClick: this.disabled && !this.error
|
|
680
720
|
? undefined
|
|
681
|
-
: () => this.toggleDropdown() }, index.h("ifx-icon", { key: "icon-up", icon: "chevron-up-16" })), index.h("div", { key: '
|
|
721
|
+
: () => this.toggleDropdown() }, index.h("ifx-icon", { key: "icon-up", icon: "chevron-up-16" })), index.h("div", { key: '21523ec6ccc4cc84e6d9b15881f8e7dbf45df1ea', class: "icon-wrapper-down", onClick: this.disabled && !this.error
|
|
682
722
|
? undefined
|
|
683
|
-
: () => this.toggleDropdown() }, index.h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.caption && (index.h("div", { key: '
|
|
723
|
+
: () => this.toggleDropdown() }, index.h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.caption && (index.h("div", { key: '067c7c9fab1188e7475caf946f9030f977862f35', class: `multi__select-caption ${this.readOnly ? "" : this.internalError ? "error" : this.disabled ? "disabled" : ""}` }, this.caption))));
|
|
684
724
|
}
|
|
685
725
|
static get watchers() { return {
|
|
686
726
|
"error": [{
|
|
@@ -714,9 +754,11 @@ const MultiselectOption = class {
|
|
|
714
754
|
searchTerm = "";
|
|
715
755
|
isSearchActive = false;
|
|
716
756
|
isSearchDisabled = false;
|
|
757
|
+
disabledByGroup = false;
|
|
717
758
|
componentWillLoad() {
|
|
718
759
|
this.hasChildren = this.el.children.length > 0;
|
|
719
760
|
this.depth = this.calculateDepth();
|
|
761
|
+
this.disabledByGroup = this.el.closest("ifx-multiselect-group")?.disabled ?? false;
|
|
720
762
|
this.el.setAttribute("data-level", this.depth.toString());
|
|
721
763
|
if (this.hasChildren) {
|
|
722
764
|
const hasSelectedChildren = this.hasAnySelectedChildren();
|
|
@@ -729,9 +771,17 @@ const MultiselectOption = class {
|
|
|
729
771
|
this.el['__stencil_instance'] = this;
|
|
730
772
|
this.notifyMultiselect();
|
|
731
773
|
this.el.addEventListener('ifx-search-filter', this.handleSearchFilter);
|
|
774
|
+
this.el.addEventListener('ifx-group-disabled-change', this.handleGroupDisabledChange);
|
|
732
775
|
}
|
|
733
776
|
disconnectedCallback() {
|
|
734
777
|
this.el.removeEventListener("ifx-search-filter", this.handleSearchFilter);
|
|
778
|
+
this.el.removeEventListener("ifx-group-disabled-change", this.handleGroupDisabledChange);
|
|
779
|
+
}
|
|
780
|
+
handleGroupDisabledChange = (event) => {
|
|
781
|
+
this.disabledByGroup = event.detail.disabled;
|
|
782
|
+
};
|
|
783
|
+
isEffectivelyDisabled() {
|
|
784
|
+
return this.disabled || this.disabledByGroup;
|
|
735
785
|
}
|
|
736
786
|
handleSearchFilter = (event) => {
|
|
737
787
|
const { searchTerm, isActive } = event.detail;
|
|
@@ -883,7 +933,7 @@ const MultiselectOption = class {
|
|
|
883
933
|
return depth;
|
|
884
934
|
}
|
|
885
935
|
handleClick(event) {
|
|
886
|
-
if (this.
|
|
936
|
+
if (this.isEffectivelyDisabled() || (this.isSearchActive && this.isSearchDisabled))
|
|
887
937
|
return;
|
|
888
938
|
event.stopPropagation();
|
|
889
939
|
if (event.type === "click" &&
|
|
@@ -911,7 +961,7 @@ const MultiselectOption = class {
|
|
|
911
961
|
this.notifyMultiselect();
|
|
912
962
|
}
|
|
913
963
|
handleKeyDown(event) {
|
|
914
|
-
if (this.
|
|
964
|
+
if (this.isEffectivelyDisabled() || (this.isSearchActive && this.isSearchDisabled))
|
|
915
965
|
return;
|
|
916
966
|
const target = event.target;
|
|
917
967
|
if (target.closest(".chevron-wrapper") ||
|
|
@@ -996,10 +1046,12 @@ const MultiselectOption = class {
|
|
|
996
1046
|
}
|
|
997
1047
|
}
|
|
998
1048
|
toggleExpansion() {
|
|
1049
|
+
if (this.isEffectivelyDisabled())
|
|
1050
|
+
return;
|
|
999
1051
|
this.isExpanded = !this.isExpanded;
|
|
1000
1052
|
}
|
|
1001
1053
|
handleCheckboxClick = (event) => {
|
|
1002
|
-
if (this.
|
|
1054
|
+
if (this.isEffectivelyDisabled() || (this.isSearchActive && this.isSearchDisabled))
|
|
1003
1055
|
return;
|
|
1004
1056
|
event.preventDefault();
|
|
1005
1057
|
event.stopPropagation();
|
|
@@ -1024,7 +1076,7 @@ const MultiselectOption = class {
|
|
|
1024
1076
|
};
|
|
1025
1077
|
handleHeaderClick = (event) => {
|
|
1026
1078
|
event.stopPropagation();
|
|
1027
|
-
if (!this.
|
|
1079
|
+
if (!this.isEffectivelyDisabled() && !(this.isSearchActive && this.isSearchDisabled)) {
|
|
1028
1080
|
this.handleClick(event);
|
|
1029
1081
|
}
|
|
1030
1082
|
};
|
|
@@ -1045,6 +1097,7 @@ const MultiselectOption = class {
|
|
|
1045
1097
|
});
|
|
1046
1098
|
}
|
|
1047
1099
|
render() {
|
|
1100
|
+
const effectivelyDisabled = this.isEffectivelyDisabled();
|
|
1048
1101
|
let isFlatMultiselect = false;
|
|
1049
1102
|
const parentMultiselect = this.el.closest("ifx-multiselect");
|
|
1050
1103
|
if (parentMultiselect) {
|
|
@@ -1057,13 +1110,13 @@ const MultiselectOption = class {
|
|
|
1057
1110
|
const optionItemStyle = isFlatMultiselect
|
|
1058
1111
|
? undefined
|
|
1059
1112
|
: { paddingLeft: `${totalPadding}px` };
|
|
1060
|
-
return (index.h(index.Host, { key: '
|
|
1113
|
+
return (index.h(index.Host, { key: 'd97998a025be93ca514e4c01ad94e8ec33b9e6cf' }, index.h("div", { key: '83841ccf6375f1475f4d8f298a4e3736eeadb01a', class: {
|
|
1061
1114
|
option: true,
|
|
1062
1115
|
"option--has-children": this.hasChildren,
|
|
1063
1116
|
"option--expanded": this.isExpanded,
|
|
1064
|
-
"option--disabled":
|
|
1117
|
+
"option--disabled": effectivelyDisabled,
|
|
1065
1118
|
"option--selected": this.selected,
|
|
1066
|
-
}, role: "option", "aria-expanded": this.hasChildren ? (this.isExpanded ? "true" : "false") : undefined, "aria-selected": this.selected ? "true" : "false", "aria-disabled":
|
|
1119
|
+
}, role: "option", "aria-expanded": this.hasChildren ? (this.isExpanded ? "true" : "false") : undefined, "aria-selected": this.selected ? "true" : "false", "aria-disabled": effectivelyDisabled ? "true" : "false", "data-level": this.depth, "data-value": this.value }, index.h("div", { key: 'c3e446129deb0410a7eb24b8098e72378dfcb171', class: "option-item", style: optionItemStyle }, index.h("div", { key: 'ff701e6e5443217ce118a2b744a8ef3e9f02e1d4', class: "chevron-wrapper", tabIndex: this.hasChildren ? 0 : -1, role: this.hasChildren ? "button" : undefined, "aria-label": this.hasChildren
|
|
1067
1120
|
? this.isExpanded
|
|
1068
1121
|
? "Collapse"
|
|
1069
1122
|
: "Expand"
|
|
@@ -1076,20 +1129,20 @@ const MultiselectOption = class {
|
|
|
1076
1129
|
e.stopPropagation();
|
|
1077
1130
|
this.toggleExpansion();
|
|
1078
1131
|
}
|
|
1079
|
-
} }, this.hasChildren && (index.h("ifx-icon", { key: '
|
|
1132
|
+
} }, this.hasChildren && (index.h("ifx-icon", { key: '847f43c183b216a5cce7657db1b73d643702f416', class: `chevron ${this.isExpanded ? "chevron--expanded" : "chevron--collapsed"}`, icon: "chevron-right-16" }))), index.h("div", { key: '29f009853223a01858c89af8dde1aa995eb0bd1e', class: "checkbox-wrapper", onClick: (e) => e.stopPropagation() }, index.h("ifx-checkbox", { key: 'e9bf9743d8ea7d0e7be879ab9697a5243d1afd8c', size: "s", checked: this.isSearchActive && this.isSearchDisabled
|
|
1080
1133
|
? false
|
|
1081
1134
|
: this.indeterminate
|
|
1082
1135
|
? false
|
|
1083
1136
|
: this.selected, indeterminate: this.isSearchActive && this.isSearchDisabled
|
|
1084
1137
|
? false
|
|
1085
|
-
: this.indeterminate, onClick: this.handleCheckboxClick, disabled:
|
|
1138
|
+
: this.indeterminate, onClick: this.handleCheckboxClick, disabled: effectivelyDisabled ||
|
|
1086
1139
|
(this.isSearchActive && this.isSearchDisabled), onKeyDown: (e) => {
|
|
1087
1140
|
if (e.key === "Enter" || e.key === " ") {
|
|
1088
1141
|
e.preventDefault();
|
|
1089
1142
|
e.stopPropagation();
|
|
1090
1143
|
this.handleCheckboxClick(e);
|
|
1091
1144
|
}
|
|
1092
|
-
} })), index.h("div", { key: '
|
|
1145
|
+
} })), index.h("div", { key: '387bd2749a759b549fe6ad7b2e88787b3d0ab3f6', class: "option-label", onClick: this.handleHeaderClick, tabIndex: -1 }, index.h("slot", { key: 'ca673834ac84bd0d360a5743fe6278dbb4a00190' }))), this.isExpanded && (index.h("div", { key: '0c9a5e688a83b0f0b2fac2621ec154729c9e74de', class: "option-children" }, index.h("slot", { key: '4bfc5e2b25d1ef7ad27d8462c5aea0380d138396', name: "children" }))))));
|
|
1093
1146
|
}
|
|
1094
1147
|
};
|
|
1095
1148
|
MultiselectOption.style = multiselectOptionCss();
|