xv-webcomponents 1.5.7-qa.0 → 1.5.8-qa.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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xv-accordion-v2_45.cjs.entry.js +3 -3
- package/dist/cjs/xv-accordion-v2_45.cjs.entry.js.map +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +13 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +21 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xv-accordion-v2_45.entry.js +3 -3
- package/dist/esm/xv-accordion-v2_45.entry.js.map +1 -1
- package/dist/esm/xv-webcomponents.js +1 -1
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/xv-webcomponents/{p-b23752e3.entry.js → p-23c7e4d7.entry.js} +2 -2
- package/dist/xv-webcomponents/{p-b23752e3.entry.js.map → p-23c7e4d7.entry.js.map} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["xv-accordion-v2_45.cjs",[[256,"xv-header",{"metaNav":[32],"orgUnit":[32],"baseUrl":[32],"mobMenuOpen":[32],"suggestions":[32],"suggestionsLoading":[32],"notifications":[32],"showLoginModal":[32]},[[8,"xv:orgUnitChange","handleOrgUnitChange"],[8,"xv:metaNav-update","metaNavUpdate"]]],[257,"xv-dropdown-v2",{"search":[516],"disabled":[516],"multiple":[516],"required":[516],"loading":[516],"open":[1540],"error":[520],"label":[513],"helper":[513],"warning":[513],"placeholder":[513],"info":[1],"searchPlaceholder":[1,"search-placeholder"],"size":[1],"defaultValue":[8,"default-value"],"variant":[1],"selected":[32],"selectedMap":[32],"searchQuery":[32]},[[0,"itemSelected","handleItemSelected"]],{"open":["openChangeHandle"],"multiple":["multipleChangeHandle"]}],[257,"xv-data-table-row",{"variant":[1],"name":[1025],"collapse":[1],"collapsable":[516],"checked":[1028],"partial":[1028],"hover":[1028],"group":[4],"header":[4],"footer":[4],"disabled":[4],"readonly":[4],"required":[4],"value":[8],"collapsed":[32]}],[321,"xv-datepicker",{"value":[1040],"variant":[1],"label":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513],"min":[1],"max":[1],"month":[32],"days":[32],"open":[32],"localError":[32]},[[4,"click","handleClickOutside"]],{"open":["openChange"],"month":["getCalendarGrid"],"value":["handleValueChange"]}],[257,"xv-file-uploader",{"label":[1],"description":[1],"addText":[1,"add-text"],"variant":[1],"size":[1],"accept":[16],"buttonVariant":[1,"button-variant"],"maxFileSizeMB":[2,"max-file-size-mb"],"maxFiles":[2,"max-files"],"multiple":[4],"disabled":[516],"files":[1040],"loadingStates":[1040,"loading-states"],"error":[1537],"errors":[1040],"dragActive":[32],"errorMessages":[32],"clearFiles":[64]}],[321,"xv-number-input-v2",{"label":[1],"placeholder":[513],"name":[513],"value":[1538],"helper":[1],"error":[8],"warning":[8],"step":[2],"max":[2],"min":[2],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513]}],[257,"xv-pagination",{"total":[2],"page":[1026],"size":[1],"block":[4],"variant":[1],"responsiveVariant":[16,"responsive-variant"],"totalItems":[2,"total-items"],"itemsPerPage":[32],"currentVariant":[32]}],[257,"xv-table-v2-row",{"checked":[1540],"partial":[1540],"name":[1537],"value":[520],"hover":[1540],"readonly":[516],"required":[516],"disabled":[516],"header":[516],"variant":[1537]},null,{"checked":["checkedChangeHandle"]}],[321,"xv-textarea",{"value":[1025],"name":[1],"label":[1],"placeholder":[1],"helper":[1],"info":[1],"error":[8],"warning":[8],"disabled":[4],"readonly":[4],"block":[4],"counterHide":[4,"counter-hide"],"noResize":[4,"no-resize"],"loading":[4],"max":[2],"rows":[2],"size":[513]}],[257,"xv-data-table",{"size":[1],"block":[4],"loading":[4],"columnWidths":[16,"column-widths"],"hover":[4]}],[257,"xv-dropdown-v2-item",{"disabled":[4],"value":[1544],"selected":[1540],"multiple":[516],"size":[513]},[[0,"click","handleClick"]]],[257,"xv-image-viewer",{"src":[1],"fullscreenSrc":[1,"fullscreen-src"],"alt":[1],"placeholder":[1],"lazy":[4],"isFullscreen":[32],"loaded":[32],"fullscreenLoaded":[32]}],[257,"xv-tab-v2",{"label":[513],"disabled":[516],"loading":[516],"name":[8]}],[257,"xv-table-v2",{"size":[513],"hover":[516],"loading":[516],"colsSize":[16,"colssize"],"selected":[32],"selectedCount":[32]},[[0,"checkedChange","handleCheckedChange"]],{"colsSize":["setColsSizeTemplate"]}],[257,"xv-tabs-v2",{"active":[1544],"loading":[516],"variant":[1],"emptyMessage":[1,"empty-message"],"hideSingleTab":[4,"hide-single-tab"],"tabElements":[32],"showArrows":[32]},[[9,"resize","updateArrowVisibility"]]],[257,"xv-tag-combobox",{"options":[16],"label":[1],"size":[1],"placeholder":[1],"allowCreate":[4,"allow-create"],"maxSuggestions":[2,"max-suggestions"],"disabled":[4],"readonly":[4],"error":[8],"warning":[8],"value":[16],"normalizedOptions":[32],"selected":[32],"inputValue":[32],"open":[32],"filtered":[32],"highlighted":[32],"focusInput":[64],"clear":[64]},null,{"options":["watchOptions"],"value":["watchValue"]}],[257,"xv-accordion-v2",{"multiple":[4],"xvId":[1,"xv-id"],"value":[1025],"opened":[32],"toggleItem":[64]}],[257,"xv-accordion-v2-item",{"disabled":[4],"label":[1],"value":[1],"isOpen":[32]},[[16,"accordionChange","handleAccordionChange"]]],[260,"xv-breadcrumbs-v2"],[257,"xv-data-table-collapse",{"collapsed":[1540],"setCollapsed":[64]}],[256,"xv-footer",{"data":[32]},[[8,"xv:metaNav-update","handleLoadData"]]],[257,"xv-progress-indicator-v2",{"progress":[514],"variant":[1],"size":[1]},null,{"progress":["updateChildItems"]}],[257,"xv-progress-indicator-v2-item",{"status":[1]}],[324,"xv-radio-v2",{"name":[1],"value":[1],"label":[1],"checked":[1028],"indeterminate":[4],"block":[4],"disabled":[4],"required":[4],"reverse":[4],"readonly":[4],"error":[8],"warning":[520],"size":[1]},null,{"checked":["onCheckedChange"]}],[321,"xv-slider-v2",{"label":[1],"name":[1],"min":[2],"max":[2],"value":[1026],"step":[2],"disabled":[4],"readonly":[4],"notEditable":[4,"not-editable"]}],[257,"xv-table-v2-expand",{"open":[1540],"disabled":[516]}],[260,"xv-tile",{"variant":[513],"label":[1],"error":[4],"multiple":[4],"disabled":[4],"block":[4],"name":[1],"value":[1025],"checked":[1028]},[[4,"tileChange","tileChangeHandle"],[0,"click","handleClick"]]],[321,"xv-toggle",{"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"readonly":[4],"size":[513],"block":[4]}],[257,"xv-login-modal",{"visible":[4],"urls":[32],"loading":[32],"errorMessage":[32]}],[257,"xv-mega-menu",{"open":[1540],"loading":[32],"activeItem":[32],"activeGroup":[32],"menuItems":[32]},[[4,"click","handleClickOutside"]]],[257,"xv-data-table-cell",{"name":[1025],"sort":[1537],"multiline":[2],"width":[1],"align":[1],"tooltip":[1]},[[0,"click","handleSort"]]],[257,"xv-overflow-menu-v2",{"open":[1540],"disabled":[516],"position":[1],"size":[1],"tooltip":[1]},[[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-overflow-menu-v2-item",{"disabled":[516],"value":[520],"variant":[513],"clickable":[4]},[[0,"click","handleClick"]]],[257,"xv-table-v2-cell",{"multiline":[516],"name":[1537],"align":[513],"sort":[1537]},[[0,"click","handleSort"]]],[257,"xv-toggle-tip",{"open":[1540],"autoSize":[516,"auto-size"],"block":[4],"position":[1],"setPopover":[64]},[[4,"click","handleClickOutside"],[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-modal-v2",{"open":[1540],"permanent":[516],"size":[513],"overflow":[516],"loading":[4],"openModal":[64],"closeModal":[64]}],[257,"xv-card-v2",{"variant":[1],"media":[1],"header":[1],"body":[1],"footer":[1]}],[257,"xv-notification-v2",{"variant":[513],"dismissible":[516]}],[321,"xv-text-input-v2",{"type":[1],"label":[1],"placeholder":[513],"name":[513],"value":[1025],"autocomplete":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[516],"size":[513],"isPasswordVisible":[32]}],[257,"xv-link-v2",{"href":[1],"target":[1],"disabled":[4],"size":[1],"variant":[1]}],[257,"xv-tag-v2",{"size":[1],"color":[1],"bg":[1],"disabled":[4],"closeable":[4]}],[321,"xv-checkbox-v2",{"checked":[1540],"indeterminate":[516],"disabled":[516],"name":[513],"value":[513],"readonly":[516],"required":[516],"partial":[516],"label":[1],"size":[513],"error":[520],"hasFocus":[32]},null,{"checked":["onCheckedChange"]}],[260,"xv-tooltip-v2",{"message":[1],"position":[1],"block":[4],"dashed":[4]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]],[321,"xv-button-v2",{"value":[1],"name":[1],"label":[513],"variant":[513],"size":[513],"disabled":[516],"loading":[516],"block":[516],"type":[513],"hasLeftIcon":[32],"hasRightIcon":[32],"hasContent":[32]}],[257,"xv-loader-v2",{"show":[4],"variant":[1],"size":[1]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["xv-accordion-v2_45.cjs",[[256,"xv-header",{"metaNav":[32],"orgUnit":[32],"baseUrl":[32],"mobMenuOpen":[32],"suggestions":[32],"suggestionsLoading":[32],"notifications":[32],"showLoginModal":[32]},[[8,"xv:orgUnitChange","handleOrgUnitChange"],[8,"xv:metaNav-update","metaNavUpdate"]]],[257,"xv-dropdown-v2",{"search":[516],"disabled":[516],"multiple":[516],"required":[516],"loading":[516],"readonly":[516],"open":[1540],"error":[520],"label":[513],"helper":[513],"warning":[513],"placeholder":[513],"info":[1],"searchPlaceholder":[1,"search-placeholder"],"size":[1],"defaultValue":[8,"default-value"],"variant":[1],"selected":[32],"selectedMap":[32],"searchQuery":[32]},[[0,"itemSelected","handleItemSelected"]],{"open":["openChangeHandle"],"multiple":["multipleChangeHandle"]}],[257,"xv-data-table-row",{"variant":[1],"name":[1025],"collapse":[1],"collapsable":[516],"checked":[1028],"partial":[1028],"hover":[1028],"group":[4],"header":[4],"footer":[4],"disabled":[4],"readonly":[4],"required":[4],"value":[8],"collapsed":[32]}],[321,"xv-datepicker",{"value":[1040],"variant":[1],"label":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513],"min":[1],"max":[1],"month":[32],"days":[32],"open":[32],"localError":[32]},[[4,"click","handleClickOutside"]],{"open":["openChange"],"month":["getCalendarGrid"],"value":["handleValueChange"]}],[257,"xv-file-uploader",{"label":[1],"description":[1],"addText":[1,"add-text"],"variant":[1],"size":[1],"accept":[16],"buttonVariant":[1,"button-variant"],"maxFileSizeMB":[2,"max-file-size-mb"],"maxFiles":[2,"max-files"],"multiple":[4],"disabled":[516],"files":[1040],"loadingStates":[1040,"loading-states"],"error":[1537],"errors":[1040],"dragActive":[32],"errorMessages":[32],"clearFiles":[64]}],[321,"xv-number-input-v2",{"label":[1],"placeholder":[513],"name":[513],"value":[1538],"helper":[1],"error":[8],"warning":[8],"step":[2],"max":[2],"min":[2],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513]}],[257,"xv-pagination",{"total":[2],"page":[1026],"size":[1],"block":[4],"variant":[1],"responsiveVariant":[16,"responsive-variant"],"totalItems":[2,"total-items"],"itemsPerPage":[32],"currentVariant":[32]}],[257,"xv-table-v2-row",{"checked":[1540],"partial":[1540],"name":[1537],"value":[520],"hover":[1540],"readonly":[516],"required":[516],"disabled":[516],"header":[516],"variant":[1537]},null,{"checked":["checkedChangeHandle"]}],[321,"xv-textarea",{"value":[1025],"name":[1],"label":[1],"placeholder":[1],"helper":[1],"info":[1],"error":[8],"warning":[8],"disabled":[4],"readonly":[4],"block":[4],"counterHide":[4,"counter-hide"],"noResize":[4,"no-resize"],"loading":[4],"max":[2],"rows":[2],"size":[513]}],[257,"xv-data-table",{"size":[1],"block":[4],"loading":[4],"columnWidths":[16,"column-widths"],"hover":[4]}],[257,"xv-dropdown-v2-item",{"disabled":[4],"value":[1544],"selected":[1540],"multiple":[516],"size":[513]},[[0,"click","handleClick"]]],[257,"xv-image-viewer",{"src":[1],"fullscreenSrc":[1,"fullscreen-src"],"alt":[1],"placeholder":[1],"lazy":[4],"isFullscreen":[32],"loaded":[32],"fullscreenLoaded":[32]}],[257,"xv-tab-v2",{"label":[513],"disabled":[516],"loading":[516],"name":[8]}],[257,"xv-table-v2",{"size":[513],"hover":[516],"loading":[516],"colsSize":[16,"colssize"],"selected":[32],"selectedCount":[32]},[[0,"checkedChange","handleCheckedChange"]],{"colsSize":["setColsSizeTemplate"]}],[257,"xv-tabs-v2",{"active":[1544],"loading":[516],"variant":[1],"emptyMessage":[1,"empty-message"],"hideSingleTab":[4,"hide-single-tab"],"tabElements":[32],"showArrows":[32]},[[9,"resize","updateArrowVisibility"]]],[257,"xv-tag-combobox",{"options":[16],"label":[1],"size":[1],"placeholder":[1],"allowCreate":[4,"allow-create"],"maxSuggestions":[2,"max-suggestions"],"disabled":[4],"readonly":[4],"error":[8],"warning":[8],"value":[16],"normalizedOptions":[32],"selected":[32],"inputValue":[32],"open":[32],"filtered":[32],"highlighted":[32],"focusInput":[64],"clear":[64]},null,{"options":["watchOptions"],"value":["watchValue"]}],[257,"xv-accordion-v2",{"multiple":[4],"xvId":[1,"xv-id"],"value":[1025],"opened":[32],"toggleItem":[64]}],[257,"xv-accordion-v2-item",{"disabled":[4],"label":[1],"value":[1],"isOpen":[32]},[[16,"accordionChange","handleAccordionChange"]]],[260,"xv-breadcrumbs-v2"],[257,"xv-data-table-collapse",{"collapsed":[1540],"setCollapsed":[64]}],[256,"xv-footer",{"data":[32]},[[8,"xv:metaNav-update","handleLoadData"]]],[257,"xv-progress-indicator-v2",{"progress":[514],"variant":[1],"size":[1]},null,{"progress":["updateChildItems"]}],[257,"xv-progress-indicator-v2-item",{"status":[1]}],[324,"xv-radio-v2",{"name":[1],"value":[1],"label":[1],"checked":[1028],"indeterminate":[4],"block":[4],"disabled":[4],"required":[4],"reverse":[4],"readonly":[4],"error":[8],"warning":[520],"size":[1]},null,{"checked":["onCheckedChange"]}],[321,"xv-slider-v2",{"label":[1],"name":[1],"min":[2],"max":[2],"value":[1026],"step":[2],"disabled":[4],"readonly":[4],"notEditable":[4,"not-editable"]}],[257,"xv-table-v2-expand",{"open":[1540],"disabled":[516]}],[260,"xv-tile",{"variant":[513],"label":[1],"error":[4],"multiple":[4],"disabled":[4],"block":[4],"name":[1],"value":[1025],"checked":[1028]},[[4,"tileChange","tileChangeHandle"],[0,"click","handleClick"]]],[321,"xv-toggle",{"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"readonly":[4],"size":[513],"block":[4]}],[257,"xv-login-modal",{"visible":[4],"urls":[32],"loading":[32],"errorMessage":[32]}],[257,"xv-mega-menu",{"open":[1540],"loading":[32],"activeItem":[32],"activeGroup":[32],"menuItems":[32]},[[4,"click","handleClickOutside"]]],[257,"xv-data-table-cell",{"name":[1025],"sort":[1537],"multiline":[2],"width":[1],"align":[1],"tooltip":[1]},[[0,"click","handleSort"]]],[257,"xv-overflow-menu-v2",{"open":[1540],"disabled":[516],"position":[1],"size":[1],"tooltip":[1]},[[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-overflow-menu-v2-item",{"disabled":[516],"value":[520],"variant":[513],"clickable":[4]},[[0,"click","handleClick"]]],[257,"xv-table-v2-cell",{"multiline":[516],"name":[1537],"align":[513],"sort":[1537]},[[0,"click","handleSort"]]],[257,"xv-toggle-tip",{"open":[1540],"autoSize":[516,"auto-size"],"block":[4],"position":[1],"setPopover":[64]},[[4,"click","handleClickOutside"],[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-modal-v2",{"open":[1540],"permanent":[516],"size":[513],"overflow":[516],"loading":[4],"openModal":[64],"closeModal":[64]}],[257,"xv-card-v2",{"variant":[1],"media":[1],"header":[1],"body":[1],"footer":[1]}],[257,"xv-notification-v2",{"variant":[513],"dismissible":[516]}],[321,"xv-text-input-v2",{"type":[1],"label":[1],"placeholder":[513],"name":[513],"value":[1025],"autocomplete":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[516],"size":[513],"isPasswordVisible":[32]}],[257,"xv-link-v2",{"href":[1],"target":[1],"disabled":[4],"size":[1],"variant":[1]}],[257,"xv-tag-v2",{"size":[1],"color":[1],"bg":[1],"disabled":[4],"closeable":[4]}],[321,"xv-checkbox-v2",{"checked":[1540],"indeterminate":[516],"disabled":[516],"name":[513],"value":[513],"readonly":[516],"required":[516],"partial":[516],"label":[1],"size":[513],"error":[520],"hasFocus":[32]},null,{"checked":["onCheckedChange"]}],[260,"xv-tooltip-v2",{"message":[1],"position":[1],"block":[4],"dashed":[4]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]],[321,"xv-button-v2",{"value":[1],"name":[1],"label":[513],"variant":[513],"size":[513],"disabled":[516],"loading":[516],"block":[516],"type":[513],"hasLeftIcon":[32],"hasRightIcon":[32],"hasContent":[32]}],[257,"xv-loader-v2",{"show":[4],"variant":[1],"size":[1]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
:host .control {
|
|
130
130
|
background-blend-mode: multiply;
|
|
131
131
|
border-radius: 3px;
|
|
132
|
-
|
|
132
|
+
border: 1px solid var(--border-subtle-01);
|
|
133
133
|
transition: 0.2s ease-in-out background-color;
|
|
134
134
|
cursor: pointer;
|
|
135
135
|
margin: 0;
|
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
font-family: inherit;
|
|
138
138
|
font-size: 100%;
|
|
139
139
|
padding: 0;
|
|
140
|
-
border: 0;
|
|
141
140
|
appearance: none;
|
|
142
141
|
background-color: var(--field-02, #FFF);
|
|
143
142
|
text-align: start;
|
|
@@ -211,6 +210,18 @@
|
|
|
211
210
|
:host .control:active {
|
|
212
211
|
background-color: var(--layer-selected-02, #E3E3E3);
|
|
213
212
|
}
|
|
213
|
+
:host .control.readonly {
|
|
214
|
+
outline-color: transparent;
|
|
215
|
+
background: var(--field-01, #F7F7F7);
|
|
216
|
+
background-blend-mode: multiply;
|
|
217
|
+
cursor: default;
|
|
218
|
+
}
|
|
219
|
+
:host .control.readonly .control_value {
|
|
220
|
+
color: var(--text-secondary);
|
|
221
|
+
}
|
|
222
|
+
:host .control.readonly .control_arrow {
|
|
223
|
+
display: none;
|
|
224
|
+
}
|
|
214
225
|
:host .options {
|
|
215
226
|
inset-block-start: 100%;
|
|
216
227
|
margin-block-start: 1px;
|
|
@@ -21,7 +21,7 @@ export class XvDropdown {
|
|
|
21
21
|
return values;
|
|
22
22
|
};
|
|
23
23
|
this.handleOpen = () => {
|
|
24
|
-
if (this.disabled || this.open || this.loading)
|
|
24
|
+
if (this.disabled || this.open || this.loading || this.readonly)
|
|
25
25
|
return;
|
|
26
26
|
this.open = true;
|
|
27
27
|
};
|
|
@@ -151,7 +151,7 @@ export class XvDropdown {
|
|
|
151
151
|
}
|
|
152
152
|
/* endregion Search methods */
|
|
153
153
|
render() {
|
|
154
|
-
return (h(Host, { key: '
|
|
154
|
+
return (h(Host, { key: 'e52569170b115a05bdc19c13f13bf22edf7cb9e8', class: { 'xv-dropdown': true, [this.variant]: !!this.variant }, role: "combobox", size: this.size, open: this.open, error: !!this.error, disabled: this.disabled, tabindex: (this.disabled || this.readonly) ? -1 : false }, (this.label || this.info) && (h("label", { key: '0e2aff1d574f3071ea712eee16fde541e01b6c31', class: "label" }, h("slot", { key: 'b805b8ce80bf4e45acc5f4bce1640bb12db18f27', name: "label" }, this.label), this.info && h("xv-tooltip-v2", { key: 'bcb39fbdbbdf3819da40a831411574ddb9169df5', class: "label_info", message: this.info }))), h("div", { key: '0b66a0eaea86c833a67bc0fc456130e74bbbf14a', class: { "xv-dropdown-control control": true, readonly: !!this.readonly }, onClick: this.handleOpen }, (this.multiple && this.selectedMap.size > 0) && (h("xv-tag-v2", { key: 'fa183f13ffee6b3bfaf545bce148575a76586353', class: "control_count", onCloseClick: this.clearHandle, closeable: !this.required, bg: "var(--background-inverse)", color: "var(--icon-inverse)" }, this.selectedMap.size)), this.selected.length ? (h("p", { class: "control_value" }, this.selected.join(', '))) : (h("p", { class: "control_placeholder" }, this.placeholder || '')), this.renderIcon(), h("svg", { key: '45c7c82bf151392c55510cb1e810f37cdf02d8ec', class: "control_arrow", focusable: "false", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", "aria-hidden": "true", width: "16", height: "16", viewBox: "0 0 16 16" }, h("path", { key: '3c86217a575f96406a2549fce08f55d392534d9f', d: "M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z" }))), this.open && h("div", { key: '07214613777e158526cab29eb63b6285107fa5f3', class: "options" }, this.search && (h("div", { key: '49bda0417d33f776fcc54ebe7cc290ff45a3ec36', class: "options_search" }, h("xv-text-input-v2", { key: 'f35e87223e35720fd65ade6bf4b1895d01fa731f', type: "search", block: true, autocomplete: "off", size: this.size, value: this.searchQuery, placeholder: this.searchPlaceholder, onValueChange: this.handleSearchInput }))), h("slot", { key: "xv-dropdown-options" })), (this.helper || typeof this.error === 'string' || this.warning) && (h("p", { key: '47a40c5445b179ba69f502b8dd40a1e1bf8d5424', class: "helper" }, this.error || this.warning || this.helper))));
|
|
155
155
|
}
|
|
156
156
|
componentWillLoad() {
|
|
157
157
|
this.setDefaultValues();
|
|
@@ -284,6 +284,25 @@ export class XvDropdown {
|
|
|
284
284
|
"setter": false,
|
|
285
285
|
"reflect": true
|
|
286
286
|
},
|
|
287
|
+
"readonly": {
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"attribute": "readonly",
|
|
290
|
+
"mutable": false,
|
|
291
|
+
"complexType": {
|
|
292
|
+
"original": "boolean",
|
|
293
|
+
"resolved": "boolean",
|
|
294
|
+
"references": {}
|
|
295
|
+
},
|
|
296
|
+
"required": false,
|
|
297
|
+
"optional": true,
|
|
298
|
+
"docs": {
|
|
299
|
+
"tags": [],
|
|
300
|
+
"text": ""
|
|
301
|
+
},
|
|
302
|
+
"getter": false,
|
|
303
|
+
"setter": false,
|
|
304
|
+
"reflect": true
|
|
305
|
+
},
|
|
287
306
|
"open": {
|
|
288
307
|
"type": "boolean",
|
|
289
308
|
"attribute": "open",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xv-dropdown.js","sourceRoot":"","sources":["../../../src/components/xv-dropdown/xv-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAoB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAOrD,MAAM,OAAO,UAAU;IALvB;QAmBU,sBAAiB,GAAW,QAAQ,CAAC;QACrC,SAAI,GAAa,QAAQ,CAAC,EAAE,CAAC;QAE7B,YAAO,GAAyB,SAAS,CAAC;QAEzC,aAAQ,GAA+B,EAAE,CAAC;QAC1C,gBAAW,GAAqD,IAAI,GAAG,EAAE,CAAC;QACnF,8BAA8B;QACrB,gBAAW,GAAW,EAAE,CAAC;QAE1B,kBAAa,GAAwC,EAAE,CAAC;QA4DxD,gBAAW,GAAG,CAAC,WAAoC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Element, Watch, Listen, Event, EventEmitter } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\nimport { DropdownItemData, DropdownItemSelector } from './_vars';\nimport { forEach, setAttr } from '../../utils/utils';\n\n@Component({\n tag: 'xv-dropdown-v2',\n styleUrl: 'xv-dropdown.scss',\n shadow: true,\n})\nexport class XvDropdown {\n @Element() el: HTMLElement;\n @Prop({ reflect: true }) search?: boolean;\n @Prop({ reflect: true }) disabled?: boolean;\n @Prop({ reflect: true }) multiple?: boolean;\n @Prop({ reflect: true }) required?: boolean;\n @Prop({ reflect: true }) loading?: boolean;\n @Prop({ reflect: true, mutable: true }) open?: boolean;\n @Prop({ reflect: true }) error?: string | boolean;\n @Prop({ reflect: true }) label?: string;\n @Prop({ reflect: true }) helper?: string;\n @Prop({ reflect: true }) warning?: string;\n @Prop({ reflect: true }) placeholder?: string;\n @Prop({ reflect: false }) info?: string;\n @Prop() searchPlaceholder: string = 'Suchen';\n @Prop() size: SIZE_VAR = SIZE_VAR.MD;\n @Prop({ attribute: 'default-value'}) defaultValue?: DropdownItemData['value'] | DropdownItemData['value'][];\n @Prop() variant?: 'ghost' | 'default' = 'default';\n\n @State() selected: DropdownItemData['text'][] = [];\n @State() selectedMap: Map<DropdownItemData['value'], DropdownItemData> = new Map();\n /* region Search variables */\n @State() searchQuery: string = '';\n private searchTimeout: any;\n private dropdownItems: { el: HTMLElement; text: string }[] = [];\n /* endregion Search variables */\n\n @Event() changeSelection: EventEmitter<DropdownItemData[]>;\n\n @Watch('open')\n openChangeHandle() {\n if (this.disabled) return;\n\n if (this.open) {\n this.cacheItems(); // get items on open\n this.addListeners();\n } else {\n this.removeListeners();\n }\n }\n\n @Watch('multiple')\n multipleChangeHandle() {\n forEach(\n this.el.querySelectorAll(DropdownItemSelector),\n (option) => {\n setAttr(option, 'size', this.size);\n if (this.multiple) setAttr(option, 'multiple', this.multiple);\n })\n }\n\n @Listen('itemSelected')\n handleItemSelected({ detail }: CustomEvent<DropdownItemData>) {\n const hasItem = this.selectedMap.has(detail.value);\n\n if (this.multiple) {\n if (detail.selected) {\n if (!hasItem) this.selectedMap.set(detail.value, detail);\n } else {\n if (hasItem) {\n if (this.required && this.selectedMap.size === 1) return;\n this.selectedMap.delete(detail.value);\n }\n }\n } else {\n if (detail.selected) {\n this.selectedMap.clear();\n this.selectedMap.set(detail.value, detail);\n } else {\n if (!this.required) this.selectedMap.clear();\n }\n this.open = false;\n }\n\n const optionElements = this.el.querySelectorAll(DropdownItemSelector);\n\n forEach(\n optionElements,\n (option) => setAttr(option, 'selected', this.selectedMap.has(option.getAttribute('value')))\n );\n\n this.changeSelection.emit(this.setSelected(this.selectedMap, optionElements));\n }\n\n private setSelected = (selectedMap: typeof this.selectedMap, optionNodes?: NodeListOf<Element>): DropdownItemData[] => {\n const values = Array.from(selectedMap.values());\n const options = optionNodes || this.el.querySelectorAll(DropdownItemSelector);\n\n this.selected = this.multiple && values.length === options.length ?\n ['Alle ausgewählt'] : values.length > 1 ?\n ['ausgewählt'] : values.map((v) => v.text);\n\n return values;\n };\n\n private handleOpen = () => {\n if (this.disabled || this.open || this.loading) return;\n this.open = true;\n };\n\n private handleClickOutside = (ev: MouseEvent) => {\n if (!this.open || this.el.contains(ev.target as Node)) return;\n\n if (this.open) this.open = false;\n }\n\n private addListeners = () => {\n document.addEventListener('click', this.handleClickOutside, { capture: true });\n }\n\n private removeListeners = () => {\n document.removeEventListener('click', this.handleClickOutside, { capture: true });\n }\n\n private setDefaultValues = () => {\n if (!this.defaultValue) return;\n\n // Needs to wait next Javascript tik\n setTimeout(() => {\n const options = this.el.querySelectorAll(DropdownItemSelector);\n\n let selectedValues: (string | number)[];\n if (this.multiple) {\n selectedValues = Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue];\n } else {\n if (Array.isArray(this.defaultValue)) {\n console.warn('xv-dropdown-v2: defaultValue should be a single value when \"multiple\" is false.');\n }\n selectedValues = [(Array.isArray(this.defaultValue) ? this.defaultValue[0] : this.defaultValue)?.toString()];\n }\n const selectedSet = new Set(selectedValues);\n\n forEach(\n options,\n (option) => {\n const value = option.getAttribute('value');\n if (!value) return; // skip options without value\n const dropdownItemData: DropdownItemData = {\n value,\n text: (option as any).innerText || '',\n selected: selectedSet.has(value),\n };\n\n if (dropdownItemData.selected) {\n setAttr(option, 'selected', dropdownItemData.selected);\n this.selectedMap.set(dropdownItemData.value, dropdownItemData);\n }\n }\n );\n\n this.setSelected(this.selectedMap, options);\n });\n };\n\n private clearHandle = () => {\n const options = this.el.querySelectorAll(DropdownItemSelector);\n forEach(options, (option) => setAttr(option, 'selected', false));\n this.selectedMap.clear();\n this.changeSelection.emit(this.setSelected(this.selectedMap, options));\n };\n\n /* region Search methods */\n private cacheItems = () => {\n if (!this.search) return;\n const items = this.el.querySelectorAll(DropdownItemSelector);\n this.dropdownItems = Array.from(items).map((el) => ({\n el: el as HTMLElement,\n text: el.textContent?.toLowerCase() || '',\n }));\n };\n\n private handleSearchInput = (ev: Event) => {\n this.searchQuery = (ev.target as HTMLInputElement).value.toLowerCase();\n clearTimeout(this.searchTimeout);\n this.searchTimeout = setTimeout(() => {\n for (let { el, text } of this.dropdownItems) {\n el.toggleAttribute('hidden', !text.includes(this.searchQuery));\n }\n }, 200);\n };\n /* endregion Search methods */\n\n render() {\n return (\n <Host\n class={{ 'xv-dropdown': true, [this.variant]: !!this.variant }}\n role=\"combobox\"\n size={this.size}\n open={this.open}\n error={!!this.error}\n disabled={this.disabled}\n tabindex={this.disabled ? -1 : false}>\n {(this.label || this.info) && (\n <label class=\"label\">\n <slot name=\"label\">{this.label}</slot>\n {this.info && <xv-tooltip-v2 class=\"label_info\" message={this.info}></xv-tooltip-v2>}\n </label>\n )}\n\n <div class=\"xv-dropdown-control control\" onClick={this.handleOpen}>\n {(this.multiple && this.selectedMap.size > 0) && (<xv-tag-v2 class=\"control_count\"\n onCloseClick={this.clearHandle}\n closeable={!this.required}\n bg=\"var(--background-inverse)\"\n color=\"var(--icon-inverse)\">{this.selectedMap.size}</xv-tag-v2>)}\n {this.selected.length ? (\n <p class=\"control_value\">{this.selected.join(', ')}</p>\n ) : (\n <p class=\"control_placeholder\">{this.placeholder || ''}</p>\n )}\n\n {this.renderIcon()}\n\n <svg class=\"control_arrow\" focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n <path d=\"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z\"></path>\n </svg>\n </div>\n\n {this.open && <div class=\"options\">\n {this.search && (\n <div class=\"options_search\">\n <xv-text-input-v2 type=\"search\"\n block={true}\n autocomplete=\"off\"\n size={this.size}\n value={this.searchQuery}\n placeholder={this.searchPlaceholder}\n onValueChange={this.handleSearchInput}></xv-text-input-v2>\n </div>\n )}\n <slot key=\"xv-dropdown-options\" />\n </div>}\n\n {(this.helper || typeof this.error === 'string' || this.warning) && (\n <p class=\"helper\">{this.error || this.warning || this.helper}</p>\n )}\n </Host>\n );\n }\n\n componentWillLoad() {\n this.setDefaultValues();\n }\n\n componentDidLoad() {\n this.openChangeHandle();\n this.multiple && this.multipleChangeHandle();\n }\n\n disconnectedCallback() {\n this.removeListeners();\n }\n\n private renderIcon(): undefined | HTMLElement {\n if (this.loading) {\n return <xv-loader-v2 class=\"control_icon error\" size={SIZE_VAR.XS} />\n }\n\n if (!!this.error) {\n return (\n <svg class=\"control_icon error\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path fill=\"currentColor\"\n d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\" />\n </svg>\n )\n }\n\n if (!this.error && !!this.warning) {\n return (\n <svg class=\"control_icon warning\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path fill=\"currentColor\" d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\" />\n </svg>\n );\n }\n\n return undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"xv-dropdown.js","sourceRoot":"","sources":["../../../src/components/xv-dropdown/xv-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAoB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAOrD,MAAM,OAAO,UAAU;IALvB;QAoBU,sBAAiB,GAAW,QAAQ,CAAC;QACrC,SAAI,GAAa,QAAQ,CAAC,EAAE,CAAC;QAE7B,YAAO,GAAyB,SAAS,CAAC;QAEzC,aAAQ,GAA+B,EAAE,CAAC;QAC1C,gBAAW,GAAqD,IAAI,GAAG,EAAE,CAAC;QACnF,8BAA8B;QACrB,gBAAW,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Element, Watch, Listen, Event, EventEmitter } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\nimport { DropdownItemData, DropdownItemSelector } from './_vars';\nimport { forEach, setAttr } from '../../utils/utils';\n\n@Component({\n tag: 'xv-dropdown-v2',\n styleUrl: 'xv-dropdown.scss',\n shadow: true,\n})\nexport class XvDropdown {\n @Element() el: HTMLElement;\n @Prop({ reflect: true }) search?: boolean;\n @Prop({ reflect: true }) disabled?: boolean;\n @Prop({ reflect: true }) multiple?: boolean;\n @Prop({ reflect: true }) required?: boolean;\n @Prop({ reflect: true }) loading?: boolean;\n @Prop({ reflect: true }) readonly?: boolean;\n @Prop({ reflect: true, mutable: true }) open?: boolean;\n @Prop({ reflect: true }) error?: string | boolean;\n @Prop({ reflect: true }) label?: string;\n @Prop({ reflect: true }) helper?: string;\n @Prop({ reflect: true }) warning?: string;\n @Prop({ reflect: true }) placeholder?: string;\n @Prop({ reflect: false }) info?: string;\n @Prop() searchPlaceholder: string = 'Suchen';\n @Prop() size: SIZE_VAR = SIZE_VAR.MD;\n @Prop({ attribute: 'default-value'}) defaultValue?: DropdownItemData['value'] | DropdownItemData['value'][];\n @Prop() variant?: 'ghost' | 'default' = 'default';\n\n @State() selected: DropdownItemData['text'][] = [];\n @State() selectedMap: Map<DropdownItemData['value'], DropdownItemData> = new Map();\n /* region Search variables */\n @State() searchQuery: string = '';\n private searchTimeout: any;\n private dropdownItems: { el: HTMLElement; text: string }[] = [];\n /* endregion Search variables */\n\n @Event() changeSelection: EventEmitter<DropdownItemData[]>;\n\n @Watch('open')\n openChangeHandle() {\n if (this.disabled) return;\n\n if (this.open) {\n this.cacheItems(); // get items on open\n this.addListeners();\n } else {\n this.removeListeners();\n }\n }\n\n @Watch('multiple')\n multipleChangeHandle() {\n forEach(\n this.el.querySelectorAll(DropdownItemSelector),\n (option) => {\n setAttr(option, 'size', this.size);\n if (this.multiple) setAttr(option, 'multiple', this.multiple);\n })\n }\n\n @Listen('itemSelected')\n handleItemSelected({ detail }: CustomEvent<DropdownItemData>) {\n const hasItem = this.selectedMap.has(detail.value);\n\n if (this.multiple) {\n if (detail.selected) {\n if (!hasItem) this.selectedMap.set(detail.value, detail);\n } else {\n if (hasItem) {\n if (this.required && this.selectedMap.size === 1) return;\n this.selectedMap.delete(detail.value);\n }\n }\n } else {\n if (detail.selected) {\n this.selectedMap.clear();\n this.selectedMap.set(detail.value, detail);\n } else {\n if (!this.required) this.selectedMap.clear();\n }\n this.open = false;\n }\n\n const optionElements = this.el.querySelectorAll(DropdownItemSelector);\n\n forEach(\n optionElements,\n (option) => setAttr(option, 'selected', this.selectedMap.has(option.getAttribute('value')))\n );\n\n this.changeSelection.emit(this.setSelected(this.selectedMap, optionElements));\n }\n\n private setSelected = (selectedMap: typeof this.selectedMap, optionNodes?: NodeListOf<Element>): DropdownItemData[] => {\n const values = Array.from(selectedMap.values());\n const options = optionNodes || this.el.querySelectorAll(DropdownItemSelector);\n\n this.selected = this.multiple && values.length === options.length ?\n ['Alle ausgewählt'] : values.length > 1 ?\n ['ausgewählt'] : values.map((v) => v.text);\n\n return values;\n };\n\n private handleOpen = () => {\n if (this.disabled || this.open || this.loading || this.readonly) return;\n this.open = true;\n };\n\n private handleClickOutside = (ev: MouseEvent) => {\n if (!this.open || this.el.contains(ev.target as Node)) return;\n\n if (this.open) this.open = false;\n }\n\n private addListeners = () => {\n document.addEventListener('click', this.handleClickOutside, { capture: true });\n }\n\n private removeListeners = () => {\n document.removeEventListener('click', this.handleClickOutside, { capture: true });\n }\n\n private setDefaultValues = () => {\n if (!this.defaultValue) return;\n\n // Needs to wait next Javascript tik\n setTimeout(() => {\n const options = this.el.querySelectorAll(DropdownItemSelector);\n\n let selectedValues: (string | number)[];\n if (this.multiple) {\n selectedValues = Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue];\n } else {\n if (Array.isArray(this.defaultValue)) {\n console.warn('xv-dropdown-v2: defaultValue should be a single value when \"multiple\" is false.');\n }\n selectedValues = [(Array.isArray(this.defaultValue) ? this.defaultValue[0] : this.defaultValue)?.toString()];\n }\n const selectedSet = new Set(selectedValues);\n\n forEach(\n options,\n (option) => {\n const value = option.getAttribute('value');\n if (!value) return; // skip options without value\n const dropdownItemData: DropdownItemData = {\n value,\n text: (option as any).innerText || '',\n selected: selectedSet.has(value),\n };\n\n if (dropdownItemData.selected) {\n setAttr(option, 'selected', dropdownItemData.selected);\n this.selectedMap.set(dropdownItemData.value, dropdownItemData);\n }\n }\n );\n\n this.setSelected(this.selectedMap, options);\n });\n };\n\n private clearHandle = () => {\n const options = this.el.querySelectorAll(DropdownItemSelector);\n forEach(options, (option) => setAttr(option, 'selected', false));\n this.selectedMap.clear();\n this.changeSelection.emit(this.setSelected(this.selectedMap, options));\n };\n\n /* region Search methods */\n private cacheItems = () => {\n if (!this.search) return;\n const items = this.el.querySelectorAll(DropdownItemSelector);\n this.dropdownItems = Array.from(items).map((el) => ({\n el: el as HTMLElement,\n text: el.textContent?.toLowerCase() || '',\n }));\n };\n\n private handleSearchInput = (ev: Event) => {\n this.searchQuery = (ev.target as HTMLInputElement).value.toLowerCase();\n clearTimeout(this.searchTimeout);\n this.searchTimeout = setTimeout(() => {\n for (let { el, text } of this.dropdownItems) {\n el.toggleAttribute('hidden', !text.includes(this.searchQuery));\n }\n }, 200);\n };\n /* endregion Search methods */\n\n render() {\n return (\n <Host\n class={{ 'xv-dropdown': true, [this.variant]: !!this.variant }}\n role=\"combobox\"\n size={this.size}\n open={this.open}\n error={!!this.error}\n disabled={this.disabled}\n tabindex={(this.disabled || this.readonly) ? -1 : false}>\n {(this.label || this.info) && (\n <label class=\"label\">\n <slot name=\"label\">{this.label}</slot>\n {this.info && <xv-tooltip-v2 class=\"label_info\" message={this.info}></xv-tooltip-v2>}\n </label>\n )}\n\n <div\n class={{ \"xv-dropdown-control control\": true, readonly: !!this.readonly }}\n onClick={this.handleOpen}\n >\n {(this.multiple && this.selectedMap.size > 0) && (<xv-tag-v2 class=\"control_count\"\n onCloseClick={this.clearHandle}\n closeable={!this.required}\n bg=\"var(--background-inverse)\"\n color=\"var(--icon-inverse)\">{this.selectedMap.size}</xv-tag-v2>)}\n {this.selected.length ? (\n <p class=\"control_value\">{this.selected.join(', ')}</p>\n ) : (\n <p class=\"control_placeholder\">{this.placeholder || ''}</p>\n )}\n\n {this.renderIcon()}\n\n <svg class=\"control_arrow\" focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n <path d=\"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z\"></path>\n </svg>\n </div>\n\n {this.open && <div class=\"options\">\n {this.search && (\n <div class=\"options_search\">\n <xv-text-input-v2 type=\"search\"\n block={true}\n autocomplete=\"off\"\n size={this.size}\n value={this.searchQuery}\n placeholder={this.searchPlaceholder}\n onValueChange={this.handleSearchInput}></xv-text-input-v2>\n </div>\n )}\n <slot key=\"xv-dropdown-options\" />\n </div>}\n\n {(this.helper || typeof this.error === 'string' || this.warning) && (\n <p class=\"helper\">{this.error || this.warning || this.helper}</p>\n )}\n </Host>\n );\n }\n\n componentWillLoad() {\n this.setDefaultValues();\n }\n\n componentDidLoad() {\n this.openChangeHandle();\n this.multiple && this.multipleChangeHandle();\n }\n\n disconnectedCallback() {\n this.removeListeners();\n }\n\n private renderIcon(): undefined | HTMLElement {\n if (this.loading) {\n return <xv-loader-v2 class=\"control_icon error\" size={SIZE_VAR.XS} />\n }\n\n if (!!this.error) {\n return (\n <svg class=\"control_icon error\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path fill=\"currentColor\"\n d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\" />\n </svg>\n )\n }\n\n if (!this.error && !!this.warning) {\n return (\n <svg class=\"control_icon warning\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path fill=\"currentColor\" d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\" />\n </svg>\n );\n }\n\n return undefined;\n }\n}\n"]}
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["xv-accordion-v2_45",[[256,"xv-header",{"metaNav":[32],"orgUnit":[32],"baseUrl":[32],"mobMenuOpen":[32],"suggestions":[32],"suggestionsLoading":[32],"notifications":[32],"showLoginModal":[32]},[[8,"xv:orgUnitChange","handleOrgUnitChange"],[8,"xv:metaNav-update","metaNavUpdate"]]],[257,"xv-dropdown-v2",{"search":[516],"disabled":[516],"multiple":[516],"required":[516],"loading":[516],"open":[1540],"error":[520],"label":[513],"helper":[513],"warning":[513],"placeholder":[513],"info":[1],"searchPlaceholder":[1,"search-placeholder"],"size":[1],"defaultValue":[8,"default-value"],"variant":[1],"selected":[32],"selectedMap":[32],"searchQuery":[32]},[[0,"itemSelected","handleItemSelected"]],{"open":["openChangeHandle"],"multiple":["multipleChangeHandle"]}],[257,"xv-data-table-row",{"variant":[1],"name":[1025],"collapse":[1],"collapsable":[516],"checked":[1028],"partial":[1028],"hover":[1028],"group":[4],"header":[4],"footer":[4],"disabled":[4],"readonly":[4],"required":[4],"value":[8],"collapsed":[32]}],[321,"xv-datepicker",{"value":[1040],"variant":[1],"label":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513],"min":[1],"max":[1],"month":[32],"days":[32],"open":[32],"localError":[32]},[[4,"click","handleClickOutside"]],{"open":["openChange"],"month":["getCalendarGrid"],"value":["handleValueChange"]}],[257,"xv-file-uploader",{"label":[1],"description":[1],"addText":[1,"add-text"],"variant":[1],"size":[1],"accept":[16],"buttonVariant":[1,"button-variant"],"maxFileSizeMB":[2,"max-file-size-mb"],"maxFiles":[2,"max-files"],"multiple":[4],"disabled":[516],"files":[1040],"loadingStates":[1040,"loading-states"],"error":[1537],"errors":[1040],"dragActive":[32],"errorMessages":[32],"clearFiles":[64]}],[321,"xv-number-input-v2",{"label":[1],"placeholder":[513],"name":[513],"value":[1538],"helper":[1],"error":[8],"warning":[8],"step":[2],"max":[2],"min":[2],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513]}],[257,"xv-pagination",{"total":[2],"page":[1026],"size":[1],"block":[4],"variant":[1],"responsiveVariant":[16,"responsive-variant"],"totalItems":[2,"total-items"],"itemsPerPage":[32],"currentVariant":[32]}],[257,"xv-table-v2-row",{"checked":[1540],"partial":[1540],"name":[1537],"value":[520],"hover":[1540],"readonly":[516],"required":[516],"disabled":[516],"header":[516],"variant":[1537]},null,{"checked":["checkedChangeHandle"]}],[321,"xv-textarea",{"value":[1025],"name":[1],"label":[1],"placeholder":[1],"helper":[1],"info":[1],"error":[8],"warning":[8],"disabled":[4],"readonly":[4],"block":[4],"counterHide":[4,"counter-hide"],"noResize":[4,"no-resize"],"loading":[4],"max":[2],"rows":[2],"size":[513]}],[257,"xv-data-table",{"size":[1],"block":[4],"loading":[4],"columnWidths":[16,"column-widths"],"hover":[4]}],[257,"xv-dropdown-v2-item",{"disabled":[4],"value":[1544],"selected":[1540],"multiple":[516],"size":[513]},[[0,"click","handleClick"]]],[257,"xv-image-viewer",{"src":[1],"fullscreenSrc":[1,"fullscreen-src"],"alt":[1],"placeholder":[1],"lazy":[4],"isFullscreen":[32],"loaded":[32],"fullscreenLoaded":[32]}],[257,"xv-tab-v2",{"label":[513],"disabled":[516],"loading":[516],"name":[8]}],[257,"xv-table-v2",{"size":[513],"hover":[516],"loading":[516],"colsSize":[16,"colssize"],"selected":[32],"selectedCount":[32]},[[0,"checkedChange","handleCheckedChange"]],{"colsSize":["setColsSizeTemplate"]}],[257,"xv-tabs-v2",{"active":[1544],"loading":[516],"variant":[1],"emptyMessage":[1,"empty-message"],"hideSingleTab":[4,"hide-single-tab"],"tabElements":[32],"showArrows":[32]},[[9,"resize","updateArrowVisibility"]]],[257,"xv-tag-combobox",{"options":[16],"label":[1],"size":[1],"placeholder":[1],"allowCreate":[4,"allow-create"],"maxSuggestions":[2,"max-suggestions"],"disabled":[4],"readonly":[4],"error":[8],"warning":[8],"value":[16],"normalizedOptions":[32],"selected":[32],"inputValue":[32],"open":[32],"filtered":[32],"highlighted":[32],"focusInput":[64],"clear":[64]},null,{"options":["watchOptions"],"value":["watchValue"]}],[257,"xv-accordion-v2",{"multiple":[4],"xvId":[1,"xv-id"],"value":[1025],"opened":[32],"toggleItem":[64]}],[257,"xv-accordion-v2-item",{"disabled":[4],"label":[1],"value":[1],"isOpen":[32]},[[16,"accordionChange","handleAccordionChange"]]],[260,"xv-breadcrumbs-v2"],[257,"xv-data-table-collapse",{"collapsed":[1540],"setCollapsed":[64]}],[256,"xv-footer",{"data":[32]},[[8,"xv:metaNav-update","handleLoadData"]]],[257,"xv-progress-indicator-v2",{"progress":[514],"variant":[1],"size":[1]},null,{"progress":["updateChildItems"]}],[257,"xv-progress-indicator-v2-item",{"status":[1]}],[324,"xv-radio-v2",{"name":[1],"value":[1],"label":[1],"checked":[1028],"indeterminate":[4],"block":[4],"disabled":[4],"required":[4],"reverse":[4],"readonly":[4],"error":[8],"warning":[520],"size":[1]},null,{"checked":["onCheckedChange"]}],[321,"xv-slider-v2",{"label":[1],"name":[1],"min":[2],"max":[2],"value":[1026],"step":[2],"disabled":[4],"readonly":[4],"notEditable":[4,"not-editable"]}],[257,"xv-table-v2-expand",{"open":[1540],"disabled":[516]}],[260,"xv-tile",{"variant":[513],"label":[1],"error":[4],"multiple":[4],"disabled":[4],"block":[4],"name":[1],"value":[1025],"checked":[1028]},[[4,"tileChange","tileChangeHandle"],[0,"click","handleClick"]]],[321,"xv-toggle",{"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"readonly":[4],"size":[513],"block":[4]}],[257,"xv-login-modal",{"visible":[4],"urls":[32],"loading":[32],"errorMessage":[32]}],[257,"xv-mega-menu",{"open":[1540],"loading":[32],"activeItem":[32],"activeGroup":[32],"menuItems":[32]},[[4,"click","handleClickOutside"]]],[257,"xv-data-table-cell",{"name":[1025],"sort":[1537],"multiline":[2],"width":[1],"align":[1],"tooltip":[1]},[[0,"click","handleSort"]]],[257,"xv-overflow-menu-v2",{"open":[1540],"disabled":[516],"position":[1],"size":[1],"tooltip":[1]},[[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-overflow-menu-v2-item",{"disabled":[516],"value":[520],"variant":[513],"clickable":[4]},[[0,"click","handleClick"]]],[257,"xv-table-v2-cell",{"multiline":[516],"name":[1537],"align":[513],"sort":[1537]},[[0,"click","handleSort"]]],[257,"xv-toggle-tip",{"open":[1540],"autoSize":[516,"auto-size"],"block":[4],"position":[1],"setPopover":[64]},[[4,"click","handleClickOutside"],[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-modal-v2",{"open":[1540],"permanent":[516],"size":[513],"overflow":[516],"loading":[4],"openModal":[64],"closeModal":[64]}],[257,"xv-card-v2",{"variant":[1],"media":[1],"header":[1],"body":[1],"footer":[1]}],[257,"xv-notification-v2",{"variant":[513],"dismissible":[516]}],[321,"xv-text-input-v2",{"type":[1],"label":[1],"placeholder":[513],"name":[513],"value":[1025],"autocomplete":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[516],"size":[513],"isPasswordVisible":[32]}],[257,"xv-link-v2",{"href":[1],"target":[1],"disabled":[4],"size":[1],"variant":[1]}],[257,"xv-tag-v2",{"size":[1],"color":[1],"bg":[1],"disabled":[4],"closeable":[4]}],[321,"xv-checkbox-v2",{"checked":[1540],"indeterminate":[516],"disabled":[516],"name":[513],"value":[513],"readonly":[516],"required":[516],"partial":[516],"label":[1],"size":[513],"error":[520],"hasFocus":[32]},null,{"checked":["onCheckedChange"]}],[260,"xv-tooltip-v2",{"message":[1],"position":[1],"block":[4],"dashed":[4]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]],[321,"xv-button-v2",{"value":[1],"name":[1],"label":[513],"variant":[513],"size":[513],"disabled":[516],"loading":[516],"block":[516],"type":[513],"hasLeftIcon":[32],"hasRightIcon":[32],"hasContent":[32]}],[257,"xv-loader-v2",{"show":[4],"variant":[1],"size":[1]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["xv-accordion-v2_45",[[256,"xv-header",{"metaNav":[32],"orgUnit":[32],"baseUrl":[32],"mobMenuOpen":[32],"suggestions":[32],"suggestionsLoading":[32],"notifications":[32],"showLoginModal":[32]},[[8,"xv:orgUnitChange","handleOrgUnitChange"],[8,"xv:metaNav-update","metaNavUpdate"]]],[257,"xv-dropdown-v2",{"search":[516],"disabled":[516],"multiple":[516],"required":[516],"loading":[516],"readonly":[516],"open":[1540],"error":[520],"label":[513],"helper":[513],"warning":[513],"placeholder":[513],"info":[1],"searchPlaceholder":[1,"search-placeholder"],"size":[1],"defaultValue":[8,"default-value"],"variant":[1],"selected":[32],"selectedMap":[32],"searchQuery":[32]},[[0,"itemSelected","handleItemSelected"]],{"open":["openChangeHandle"],"multiple":["multipleChangeHandle"]}],[257,"xv-data-table-row",{"variant":[1],"name":[1025],"collapse":[1],"collapsable":[516],"checked":[1028],"partial":[1028],"hover":[1028],"group":[4],"header":[4],"footer":[4],"disabled":[4],"readonly":[4],"required":[4],"value":[8],"collapsed":[32]}],[321,"xv-datepicker",{"value":[1040],"variant":[1],"label":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513],"min":[1],"max":[1],"month":[32],"days":[32],"open":[32],"localError":[32]},[[4,"click","handleClickOutside"]],{"open":["openChange"],"month":["getCalendarGrid"],"value":["handleValueChange"]}],[257,"xv-file-uploader",{"label":[1],"description":[1],"addText":[1,"add-text"],"variant":[1],"size":[1],"accept":[16],"buttonVariant":[1,"button-variant"],"maxFileSizeMB":[2,"max-file-size-mb"],"maxFiles":[2,"max-files"],"multiple":[4],"disabled":[516],"files":[1040],"loadingStates":[1040,"loading-states"],"error":[1537],"errors":[1040],"dragActive":[32],"errorMessages":[32],"clearFiles":[64]}],[321,"xv-number-input-v2",{"label":[1],"placeholder":[513],"name":[513],"value":[1538],"helper":[1],"error":[8],"warning":[8],"step":[2],"max":[2],"min":[2],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513]}],[257,"xv-pagination",{"total":[2],"page":[1026],"size":[1],"block":[4],"variant":[1],"responsiveVariant":[16,"responsive-variant"],"totalItems":[2,"total-items"],"itemsPerPage":[32],"currentVariant":[32]}],[257,"xv-table-v2-row",{"checked":[1540],"partial":[1540],"name":[1537],"value":[520],"hover":[1540],"readonly":[516],"required":[516],"disabled":[516],"header":[516],"variant":[1537]},null,{"checked":["checkedChangeHandle"]}],[321,"xv-textarea",{"value":[1025],"name":[1],"label":[1],"placeholder":[1],"helper":[1],"info":[1],"error":[8],"warning":[8],"disabled":[4],"readonly":[4],"block":[4],"counterHide":[4,"counter-hide"],"noResize":[4,"no-resize"],"loading":[4],"max":[2],"rows":[2],"size":[513]}],[257,"xv-data-table",{"size":[1],"block":[4],"loading":[4],"columnWidths":[16,"column-widths"],"hover":[4]}],[257,"xv-dropdown-v2-item",{"disabled":[4],"value":[1544],"selected":[1540],"multiple":[516],"size":[513]},[[0,"click","handleClick"]]],[257,"xv-image-viewer",{"src":[1],"fullscreenSrc":[1,"fullscreen-src"],"alt":[1],"placeholder":[1],"lazy":[4],"isFullscreen":[32],"loaded":[32],"fullscreenLoaded":[32]}],[257,"xv-tab-v2",{"label":[513],"disabled":[516],"loading":[516],"name":[8]}],[257,"xv-table-v2",{"size":[513],"hover":[516],"loading":[516],"colsSize":[16,"colssize"],"selected":[32],"selectedCount":[32]},[[0,"checkedChange","handleCheckedChange"]],{"colsSize":["setColsSizeTemplate"]}],[257,"xv-tabs-v2",{"active":[1544],"loading":[516],"variant":[1],"emptyMessage":[1,"empty-message"],"hideSingleTab":[4,"hide-single-tab"],"tabElements":[32],"showArrows":[32]},[[9,"resize","updateArrowVisibility"]]],[257,"xv-tag-combobox",{"options":[16],"label":[1],"size":[1],"placeholder":[1],"allowCreate":[4,"allow-create"],"maxSuggestions":[2,"max-suggestions"],"disabled":[4],"readonly":[4],"error":[8],"warning":[8],"value":[16],"normalizedOptions":[32],"selected":[32],"inputValue":[32],"open":[32],"filtered":[32],"highlighted":[32],"focusInput":[64],"clear":[64]},null,{"options":["watchOptions"],"value":["watchValue"]}],[257,"xv-accordion-v2",{"multiple":[4],"xvId":[1,"xv-id"],"value":[1025],"opened":[32],"toggleItem":[64]}],[257,"xv-accordion-v2-item",{"disabled":[4],"label":[1],"value":[1],"isOpen":[32]},[[16,"accordionChange","handleAccordionChange"]]],[260,"xv-breadcrumbs-v2"],[257,"xv-data-table-collapse",{"collapsed":[1540],"setCollapsed":[64]}],[256,"xv-footer",{"data":[32]},[[8,"xv:metaNav-update","handleLoadData"]]],[257,"xv-progress-indicator-v2",{"progress":[514],"variant":[1],"size":[1]},null,{"progress":["updateChildItems"]}],[257,"xv-progress-indicator-v2-item",{"status":[1]}],[324,"xv-radio-v2",{"name":[1],"value":[1],"label":[1],"checked":[1028],"indeterminate":[4],"block":[4],"disabled":[4],"required":[4],"reverse":[4],"readonly":[4],"error":[8],"warning":[520],"size":[1]},null,{"checked":["onCheckedChange"]}],[321,"xv-slider-v2",{"label":[1],"name":[1],"min":[2],"max":[2],"value":[1026],"step":[2],"disabled":[4],"readonly":[4],"notEditable":[4,"not-editable"]}],[257,"xv-table-v2-expand",{"open":[1540],"disabled":[516]}],[260,"xv-tile",{"variant":[513],"label":[1],"error":[4],"multiple":[4],"disabled":[4],"block":[4],"name":[1],"value":[1025],"checked":[1028]},[[4,"tileChange","tileChangeHandle"],[0,"click","handleClick"]]],[321,"xv-toggle",{"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"readonly":[4],"size":[513],"block":[4]}],[257,"xv-login-modal",{"visible":[4],"urls":[32],"loading":[32],"errorMessage":[32]}],[257,"xv-mega-menu",{"open":[1540],"loading":[32],"activeItem":[32],"activeGroup":[32],"menuItems":[32]},[[4,"click","handleClickOutside"]]],[257,"xv-data-table-cell",{"name":[1025],"sort":[1537],"multiline":[2],"width":[1],"align":[1],"tooltip":[1]},[[0,"click","handleSort"]]],[257,"xv-overflow-menu-v2",{"open":[1540],"disabled":[516],"position":[1],"size":[1],"tooltip":[1]},[[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-overflow-menu-v2-item",{"disabled":[516],"value":[520],"variant":[513],"clickable":[4]},[[0,"click","handleClick"]]],[257,"xv-table-v2-cell",{"multiline":[516],"name":[1537],"align":[513],"sort":[1537]},[[0,"click","handleSort"]]],[257,"xv-toggle-tip",{"open":[1540],"autoSize":[516,"auto-size"],"block":[4],"position":[1],"setPopover":[64]},[[4,"click","handleClickOutside"],[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[257,"xv-modal-v2",{"open":[1540],"permanent":[516],"size":[513],"overflow":[516],"loading":[4],"openModal":[64],"closeModal":[64]}],[257,"xv-card-v2",{"variant":[1],"media":[1],"header":[1],"body":[1],"footer":[1]}],[257,"xv-notification-v2",{"variant":[513],"dismissible":[516]}],[321,"xv-text-input-v2",{"type":[1],"label":[1],"placeholder":[513],"name":[513],"value":[1025],"autocomplete":[1],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[516],"size":[513],"isPasswordVisible":[32]}],[257,"xv-link-v2",{"href":[1],"target":[1],"disabled":[4],"size":[1],"variant":[1]}],[257,"xv-tag-v2",{"size":[1],"color":[1],"bg":[1],"disabled":[4],"closeable":[4]}],[321,"xv-checkbox-v2",{"checked":[1540],"indeterminate":[516],"disabled":[516],"name":[513],"value":[513],"readonly":[516],"required":[516],"partial":[516],"label":[1],"size":[513],"error":[520],"hasFocus":[32]},null,{"checked":["onCheckedChange"]}],[260,"xv-tooltip-v2",{"message":[1],"position":[1],"block":[4],"dashed":[4]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]],[321,"xv-button-v2",{"value":[1],"name":[1],"label":[513],"variant":[513],"size":[513],"disabled":[516],"loading":[516],"block":[516],"type":[513],"hasLeftIcon":[32],"hasRightIcon":[32],"hasContent":[32]}],[257,"xv-loader-v2",{"show":[4],"variant":[1],"size":[1]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -77586,7 +77586,7 @@ XvDatepicker.style = xvDatepickerCss;
|
|
|
77586
77586
|
|
|
77587
77587
|
const DropdownItemSelector = '.xv-dropdown-item';
|
|
77588
77588
|
|
|
77589
|
-
const xvDropdownCss = ".xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse, #333333);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-sm);z-index:999;min-width:min(150px, 90vw);max-width:min(400px, 90vw)}.xv-tooltip[role=tooltip]::after{content:\"\";position:absolute;width:0;height:0;border-style:solid}.xv-tooltip[role=tooltip][data-popper-placement=top]::after{bottom:-5px;left:50%;transform:translateX(-50%);border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after{bottom:-5px;left:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after{bottom:-5px;right:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after{top:-5px;left:50%;transform:translateX(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after{top:-5px;left:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after{top:-5px;right:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=left]::after{top:50%;right:-5px;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after{top:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after{bottom:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=right]::after{top:50%;left:-5px;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after{top:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after{bottom:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}:host{--dropdown-padding-x:16px;--dropdown-padding-y:11px;--dropdown-max-width:300px;--dropdown-visible-items:6;display:block;position:relative;text-align:left;max-width:min(var(--dropdown-max-width), 100%)}:host .label{display:block;color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px;margin-bottom:8px}:host .label ::slotted([slot=label]){color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px}:host .label_info{margin-left:var(--spacing-02)}:host .control{background-blend-mode:multiply;border-radius:3px;
|
|
77589
|
+
const xvDropdownCss = ".xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse, #333333);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-sm);z-index:999;min-width:min(150px, 90vw);max-width:min(400px, 90vw)}.xv-tooltip[role=tooltip]::after{content:\"\";position:absolute;width:0;height:0;border-style:solid}.xv-tooltip[role=tooltip][data-popper-placement=top]::after{bottom:-5px;left:50%;transform:translateX(-50%);border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after{bottom:-5px;left:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after{bottom:-5px;right:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after{top:-5px;left:50%;transform:translateX(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after{top:-5px;left:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after{top:-5px;right:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=left]::after{top:50%;right:-5px;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after{top:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after{bottom:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=right]::after{top:50%;left:-5px;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after{top:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after{bottom:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}:host{--dropdown-padding-x:16px;--dropdown-padding-y:11px;--dropdown-max-width:300px;--dropdown-visible-items:6;display:block;position:relative;text-align:left;max-width:min(var(--dropdown-max-width), 100%)}:host .label{display:block;color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px;margin-bottom:8px}:host .label ::slotted([slot=label]){color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px}:host .label_info{margin-left:var(--spacing-02)}:host .control{background-blend-mode:multiply;border-radius:3px;border:1px solid var(--border-subtle-01);transition:0.2s ease-in-out background-color;cursor:pointer;margin:0;box-sizing:border-box;font-family:inherit;font-size:100%;padding:0;appearance:none;background-color:var(--field-02, #FFF);text-align:start;inline-size:100%;position:relative;display:inline-flex;overflow:hidden;align-items:center;block-size:calc(100% + 1px);outline:none;padding-block:var(--dropdown-padding-y);padding-inline:var(--dropdown-padding-x);text-overflow:ellipsis;vertical-align:top;white-space:nowrap}:host .control_value,:host .control_placeholder{flex:1;margin:0;overflow:hidden;color:var(--text-primary, #333);user-select:none;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fz-body, Tahoma);font-size:14px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:0.16px;padding-inline:0 1rem}:host .control_count{margin-right:var(--spacing--03, 8px)}:host .control_placeholder{color:var(--text-primary, #333)}:host .control_icon{width:18px;height:18px}:host .control_icon.error{color:var(--support-error, #F1290E)}:host .control_icon.warning{color:var(--support-warning, #FF7F04)}:host .control_arrow{box-sizing:border-box;margin:0;font-size:100%;vertical-align:baseline;padding:0;border:0;appearance:none;background:none;text-align:start;display:flex;align-items:center;justify-content:center;block-size:1.5rem;inline-size:1.5rem;inset-inline-end:0.75rem;outline:none;transition:transform 70ms cubic-bezier(0.2, 0, 0.38, 0.9)}:host .control:hover{background-color:var(--field-hover-02, #E9E9E9)}:host .control:active{background-color:var(--layer-selected-02, #E3E3E3)}:host .control.readonly{outline-color:transparent;background:var(--field-01, #F7F7F7);background-blend-mode:multiply;cursor:default}:host .control.readonly .control_value{color:var(--text-secondary)}:host .control.readonly .control_arrow{display:none}:host .options{inset-block-start:100%;margin-block-start:1px;display:block;line-height:18px;max-block-size:calc(1lh * var(--dropdown-visible-items) + var(--dropdown-padding-y) * 12);box-shadow:0 2px 6px rgba(0, 0, 0, 0.3);position:absolute;z-index:10;inline-size:100%;inset-inline:0;overflow-y:auto;transition:max-height 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);border-radius:3px;background-color:var(--field-02, #FFF);scrollbar-width:thin;scrollbar-color:var(--layer-accent-03) transparent}:host .options_search{position:sticky;top:0;z-index:2;background:linear-gradient(to bottom, var(--field-02, #FFF) 0%, var(--field-02, #FFF) 85%, transparent 100%);padding:var(--dropdown-padding-y) var(--dropdown-padding-x)}:host .options ::slotted(.xv-dropdown-item){display:block;max-block-size:13.75rem;inset-inline:0;box-sizing:border-box;padding:var(--dropdown-padding-y) calc(var(--dropdown-padding-x) + 16px) var(--dropdown-padding-y) var(--dropdown-padding-x);position:relative;cursor:pointer;overflow:hidden;color:var(--text-secondary, #515151);text-overflow:ellipsis;white-space:nowrap;font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);font-style:normal;font-weight:400;line-height:1lh;letter-spacing:0.16px;transition:0.2s ease-in-out background-color;user-select:none}:host .options ::slotted(.xv-dropdown-item):after{content:\"\";position:absolute;bottom:0;height:1px;left:10px;width:calc(100% - 20px);background-color:var(--border-subtle-01)}:host .options ::slotted(.xv-dropdown-item:hover){background-color:var(--layer-hover-02, #F7F7F7)}:host .options ::slotted(.xv-dropdown-item:active){background-color:var(--layer-selected-hover-02, #DADADA)}:host .options ::slotted(.xv-dropdown-item[hidden]){display:none}:host .options ::slotted(.xv-dropdown-item[selected]){background-color:var(--layer-selected-02, #E3E3E3)}:host .options ::slotted(.xv-dropdown-item[selected]:hover){background-color:var(--layer-selected-hover-02, #DADADA)}:host .options ::slotted(.xv-dropdown-item[disabled]){background-color:transparent;opacity:0.4;cursor:not-allowed}:host .helper{color:var(--text-helper, #646464);font-family:var(--ff-heading, \"IBM Plex Sans\");font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:0.32px;margin:4px 0 0;padding:0}:host(.ghost) .control{background-color:transparent;box-shadow:none;border:none;padding:0}:host(.ghost) .control_value{padding-inline-end:5px}:host(.ghost) .options{width:min-content}:host([open]) .control_arrow{transform:rotate(180deg)}:host([disabled]){opacity:0.4;cursor:not-allowed}:host([disabled]) .control{cursor:inherit}:host([disabled]) .control:hover,:host([disabled]) .control:active,:host([disabled]) .control:focus-within{background-color:transparent}:host([error]) .control{box-shadow:none;outline:2px solid var(--support-support-error, #F1290E)}:host([error]) .helper{color:var(--text-error, #D62512)}:host([size=xs]){--dropdown-padding-y:4px}:host([size=sm]){--dropdown-padding-y:7px}:host([size=md]){--dropdown-padding-y:11px}:host([size=lg]){--dropdown-padding-y:15px}:host([size=xl]){--dropdown-padding-y:16px}";
|
|
77590
77590
|
|
|
77591
77591
|
const XvDropdown = class {
|
|
77592
77592
|
constructor(hostRef) {
|
|
@@ -77609,7 +77609,7 @@ const XvDropdown = class {
|
|
|
77609
77609
|
return values;
|
|
77610
77610
|
};
|
|
77611
77611
|
this.handleOpen = () => {
|
|
77612
|
-
if (this.disabled || this.open || this.loading)
|
|
77612
|
+
if (this.disabled || this.open || this.loading || this.readonly)
|
|
77613
77613
|
return;
|
|
77614
77614
|
this.open = true;
|
|
77615
77615
|
};
|
|
@@ -77739,7 +77739,7 @@ const XvDropdown = class {
|
|
|
77739
77739
|
}
|
|
77740
77740
|
/* endregion Search methods */
|
|
77741
77741
|
render() {
|
|
77742
|
-
return (h(Host, { key: '
|
|
77742
|
+
return (h(Host, { key: 'e52569170b115a05bdc19c13f13bf22edf7cb9e8', class: { 'xv-dropdown': true, [this.variant]: !!this.variant }, role: "combobox", size: this.size, open: this.open, error: !!this.error, disabled: this.disabled, tabindex: (this.disabled || this.readonly) ? -1 : false }, (this.label || this.info) && (h("label", { key: '0e2aff1d574f3071ea712eee16fde541e01b6c31', class: "label" }, h("slot", { key: 'b805b8ce80bf4e45acc5f4bce1640bb12db18f27', name: "label" }, this.label), this.info && h("xv-tooltip-v2", { key: 'bcb39fbdbbdf3819da40a831411574ddb9169df5', class: "label_info", message: this.info }))), h("div", { key: '0b66a0eaea86c833a67bc0fc456130e74bbbf14a', class: { "xv-dropdown-control control": true, readonly: !!this.readonly }, onClick: this.handleOpen }, (this.multiple && this.selectedMap.size > 0) && (h("xv-tag-v2", { key: 'fa183f13ffee6b3bfaf545bce148575a76586353', class: "control_count", onCloseClick: this.clearHandle, closeable: !this.required, bg: "var(--background-inverse)", color: "var(--icon-inverse)" }, this.selectedMap.size)), this.selected.length ? (h("p", { class: "control_value" }, this.selected.join(', '))) : (h("p", { class: "control_placeholder" }, this.placeholder || '')), this.renderIcon(), h("svg", { key: '45c7c82bf151392c55510cb1e810f37cdf02d8ec', class: "control_arrow", focusable: "false", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", "aria-hidden": "true", width: "16", height: "16", viewBox: "0 0 16 16" }, h("path", { key: '3c86217a575f96406a2549fce08f55d392534d9f', d: "M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z" }))), this.open && h("div", { key: '07214613777e158526cab29eb63b6285107fa5f3', class: "options" }, this.search && (h("div", { key: '49bda0417d33f776fcc54ebe7cc290ff45a3ec36', class: "options_search" }, h("xv-text-input-v2", { key: 'f35e87223e35720fd65ade6bf4b1895d01fa731f', type: "search", block: true, autocomplete: "off", size: this.size, value: this.searchQuery, placeholder: this.searchPlaceholder, onValueChange: this.handleSearchInput }))), h("slot", { key: "xv-dropdown-options" })), (this.helper || typeof this.error === 'string' || this.warning) && (h("p", { key: '47a40c5445b179ba69f502b8dd40a1e1bf8d5424', class: "helper" }, this.error || this.warning || this.helper))));
|
|
77743
77743
|
}
|
|
77744
77744
|
componentWillLoad() {
|
|
77745
77745
|
this.setDefaultValues();
|