@jumpgroup/jump-design-system 0.3.67 → 0.3.69
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/jump-design-system.cjs.js +1 -1
- package/dist/cjs/jump-filter-select.cjs.entry.js +69 -7
- package/dist/cjs/jump-filter-select.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-filter-switch.cjs.entry.js +105 -5
- package/dist/cjs/jump-filter-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/jump-filter-select/jump-filter-select.js +143 -8
- package/dist/collection/components/jump-filter-select/jump-filter-select.js.map +1 -1
- package/dist/collection/components/jump-filter-switch/jump-filter-switch.js +220 -6
- package/dist/collection/components/jump-filter-switch/jump-filter-switch.js.map +1 -1
- package/dist/components/jump-filter-select.js +73 -7
- package/dist/components/jump-filter-select.js.map +1 -1
- package/dist/components/jump-filter-switch.js +114 -7
- package/dist/components/jump-filter-switch.js.map +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/jump-filter-select.entry.js +69 -7
- package/dist/esm/jump-filter-select.entry.js.map +1 -1
- package/dist/esm/jump-filter-switch.entry.js +105 -5
- package/dist/esm/jump-filter-switch.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/{p-469ccf77.entry.js → p-6148a37d.entry.js} +4 -4
- package/dist/jump-design-system/p-6148a37d.entry.js.map +1 -0
- package/dist/jump-design-system/{p-7c06855a.entry.js → p-79c78037.entry.js} +4 -4
- package/dist/jump-design-system/p-79c78037.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +8 -0
- package/dist/types/components/jump-filter-select/jump-filter-select.d.ts +22 -0
- package/dist/types/components/jump-filter-switch/jump-filter-switch.d.ts +33 -0
- package/dist/types/components.d.ts +53 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-469ccf77.entry.js.map +0 -1
- package/dist/jump-design-system/p-7c06855a.entry.js.map +0 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["jump-button_2.cjs",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce.cjs",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter.cjs",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar.cjs",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar.cjs",[[1,"jump-search-bar",{"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"searchValue":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile.cjs",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-select.cjs",[[1,"jump-filter-select",{"value":[1537],"placeholder":[1],"label":[1],"options":[1],"disabled":[516],"multiple":[4],"required":[4],"loading":[4],"open":[32],"hasSlottedOptions":[32],"getSelectedValue":[64],"getSelectedOption":[64],"setValue":[64]}]]],["jump-filter-switch.cjs",[[1,"jump-filter-switch",{"value":[1],"label":[1],"checked":[
|
|
22
|
+
return index.bootstrapLazy([["jump-button_2.cjs",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce.cjs",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter.cjs",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar.cjs",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar.cjs",[[1,"jump-search-bar",{"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"searchValue":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile.cjs",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-select.cjs",[[1,"jump-filter-select",{"value":[1537],"placeholder":[1],"label":[1],"name":[1],"options":[1],"disabled":[516],"multiple":[4],"required":[4],"loading":[4],"open":[32],"hasSlottedOptions":[32],"values":[32],"getSelectedValue":[64],"getSelectedOption":[64],"getValues":[64],"getName":[64],"setValue":[64]}]]],["jump-filter-switch.cjs",[[1,"jump-filter-switch",{"value":[1],"label":[1],"name":[1],"checked":[1540],"disabled":[516],"values":[32],"setValue":[64],"isChecked":[64],"getValues":[64],"getName":[64]},null,{"checked":["checkedChanged"]}]]],["jump-search-bar-dropdown-item.cjs",[[1,"jump-search-bar-dropdown-item",{"value":[1],"img":[1],"href":[1],"details":[32]}]]],["jump-tab.cjs",[[1,"jump-tab",{"disabled":[4],"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -4120,9 +4120,11 @@ const JumpFilterSelect = class {
|
|
|
4120
4120
|
index.registerInstance(this, hostRef);
|
|
4121
4121
|
this.selectionChange = index.createEvent(this, "jump-select-change", 7);
|
|
4122
4122
|
this.selectionFilterChange = index.createEvent(this, "jump-filterchange", 7);
|
|
4123
|
+
this.valueChange = index.createEvent(this, "jump-select-value-change", 7);
|
|
4123
4124
|
this.value = undefined;
|
|
4124
4125
|
this.placeholder = 'Seleziona un\'opzione';
|
|
4125
4126
|
this.label = undefined;
|
|
4127
|
+
this.name = 'select-filter';
|
|
4126
4128
|
this.options = [];
|
|
4127
4129
|
this.disabled = false;
|
|
4128
4130
|
this.multiple = false;
|
|
@@ -4130,6 +4132,7 @@ const JumpFilterSelect = class {
|
|
|
4130
4132
|
this.loading = false;
|
|
4131
4133
|
this.open = false;
|
|
4132
4134
|
this.hasSlottedOptions = false;
|
|
4135
|
+
this.values = [];
|
|
4133
4136
|
}
|
|
4134
4137
|
/**
|
|
4135
4138
|
* Controlla se ci sono opzioni definite come slot
|
|
@@ -4154,8 +4157,16 @@ const JumpFilterSelect = class {
|
|
|
4154
4157
|
}
|
|
4155
4158
|
return this.options;
|
|
4156
4159
|
}
|
|
4160
|
+
/**
|
|
4161
|
+
* Aggiorna l'array dei valori in base al valore selezionato
|
|
4162
|
+
*/
|
|
4163
|
+
updateValues() {
|
|
4164
|
+
this.values = this.value ? [this.value] : [];
|
|
4165
|
+
}
|
|
4157
4166
|
componentDidLoad() {
|
|
4158
4167
|
this.listenSLChange();
|
|
4168
|
+
// Inizializza l'array dei valori
|
|
4169
|
+
this.updateValues();
|
|
4159
4170
|
}
|
|
4160
4171
|
/**
|
|
4161
4172
|
* Ascolta gli eventi di cambio selezione dal select Shoelace
|
|
@@ -4167,14 +4178,23 @@ const JumpFilterSelect = class {
|
|
|
4167
4178
|
return;
|
|
4168
4179
|
}
|
|
4169
4180
|
this.value = event.target.value;
|
|
4181
|
+
this.updateValues();
|
|
4170
4182
|
const optionsArray = this.getOptionsArray();
|
|
4171
4183
|
const selectedOption = optionsArray.find(option => option.value === this.value);
|
|
4172
|
-
|
|
4184
|
+
// Evento specifico per il componente select
|
|
4185
|
+
const selectEventData = {
|
|
4186
|
+
value: this.value,
|
|
4187
|
+
selectedOption
|
|
4188
|
+
};
|
|
4189
|
+
this.selectionChange.emit(selectEventData);
|
|
4190
|
+
// Evento standard per il sistema di filtri
|
|
4191
|
+
const filterEventData = {
|
|
4192
|
+
name: this.name,
|
|
4193
|
+
values: this.values,
|
|
4173
4194
|
value: this.value,
|
|
4174
4195
|
selectedOption
|
|
4175
4196
|
};
|
|
4176
|
-
this.
|
|
4177
|
-
this.selectionFilterChange.emit(eventData);
|
|
4197
|
+
this.selectionFilterChange.emit(filterEventData);
|
|
4178
4198
|
});
|
|
4179
4199
|
}
|
|
4180
4200
|
}
|
|
@@ -4193,6 +4213,20 @@ const JumpFilterSelect = class {
|
|
|
4193
4213
|
const optionsArray = this.getOptionsArray();
|
|
4194
4214
|
return optionsArray.find(option => option.value === this.value);
|
|
4195
4215
|
}
|
|
4216
|
+
/**
|
|
4217
|
+
* Metodo pubblico per ottenere i valori selezionati come array
|
|
4218
|
+
* @returns Array contenente il valore selezionato o un array vuoto
|
|
4219
|
+
*/
|
|
4220
|
+
async getValues() {
|
|
4221
|
+
return this.values;
|
|
4222
|
+
}
|
|
4223
|
+
/**
|
|
4224
|
+
* Metodo pubblico per ottenere il nome del filtro
|
|
4225
|
+
* @returns Il nome del filtro
|
|
4226
|
+
*/
|
|
4227
|
+
async getName() {
|
|
4228
|
+
return this.name;
|
|
4229
|
+
}
|
|
4196
4230
|
/**
|
|
4197
4231
|
* Metodo pubblico per impostare programmaticamente il valore selezionato
|
|
4198
4232
|
* @param newValue - Il nuovo valore da selezionare
|
|
@@ -4200,7 +4234,18 @@ const JumpFilterSelect = class {
|
|
|
4200
4234
|
* @returns Il nuovo valore impostato
|
|
4201
4235
|
*/
|
|
4202
4236
|
async setValue(newValue, emitEvent = true) {
|
|
4237
|
+
// Se il componente è disabilitato, non fare nulla
|
|
4238
|
+
if (this.disabled) {
|
|
4239
|
+
return this.value;
|
|
4240
|
+
}
|
|
4241
|
+
// Salva il valore precedente per l'evento
|
|
4242
|
+
const oldValue = this.value;
|
|
4243
|
+
// Non fare nulla se il valore non è cambiato
|
|
4244
|
+
if (oldValue === newValue) {
|
|
4245
|
+
return this.value;
|
|
4246
|
+
}
|
|
4203
4247
|
this.value = newValue;
|
|
4248
|
+
this.updateValues();
|
|
4204
4249
|
// Aggiorna anche il valore dell'elemento sl-select interno
|
|
4205
4250
|
if (this.el) {
|
|
4206
4251
|
this.el.value = newValue;
|
|
@@ -4209,19 +4254,36 @@ const JumpFilterSelect = class {
|
|
|
4209
4254
|
if (emitEvent) {
|
|
4210
4255
|
const optionsArray = this.getOptionsArray();
|
|
4211
4256
|
const selectedOption = optionsArray.find(option => option.value === this.value);
|
|
4212
|
-
|
|
4257
|
+
// Evento specifico per il componente select
|
|
4258
|
+
const selectEventData = {
|
|
4213
4259
|
value: this.value,
|
|
4260
|
+
oldValue: oldValue,
|
|
4214
4261
|
selectedOption,
|
|
4215
4262
|
programmatic: true // Flag per indicare che il cambio è avvenuto programmaticamente
|
|
4216
4263
|
};
|
|
4217
|
-
this.selectionChange.emit(
|
|
4218
|
-
|
|
4264
|
+
this.selectionChange.emit(selectEventData);
|
|
4265
|
+
// Evento standard per il sistema di filtri
|
|
4266
|
+
const filterEventData = {
|
|
4267
|
+
name: this.name,
|
|
4268
|
+
values: this.values,
|
|
4269
|
+
value: this.value,
|
|
4270
|
+
oldValue: oldValue,
|
|
4271
|
+
selectedOption,
|
|
4272
|
+
programmatic: true
|
|
4273
|
+
};
|
|
4274
|
+
this.selectionFilterChange.emit(filterEventData);
|
|
4275
|
+
// Evento specifico per cambio programmato
|
|
4276
|
+
this.valueChange.emit({
|
|
4277
|
+
value: this.value,
|
|
4278
|
+
oldValue: oldValue,
|
|
4279
|
+
selectedOption
|
|
4280
|
+
});
|
|
4219
4281
|
}
|
|
4220
4282
|
return this.value;
|
|
4221
4283
|
}
|
|
4222
4284
|
render() {
|
|
4223
4285
|
const optionsArray = this.getOptionsArray();
|
|
4224
|
-
return (index.h(index.Host, { key: '
|
|
4286
|
+
return (index.h(index.Host, { key: '26ecef5862a3d5ef1d903ac9dad378027841d78c', ref: (host) => (this.host = host) }, this.label && (index.h("div", { key: '24bc20afb81ebe4b760889b3be866cc4c94b43f4', class: "select-label" }, this.label)), index.h("sl-select", { key: '7b578cf8ab02dd40df93848af918c51f7061bbbe', value: this.value, placeholder: this.placeholder, disabled: this.disabled, multiple: this.multiple, required: this.required, loading: this.loading, ref: (el) => (this.el = el) }, !this.hasSlottedOptions && optionsArray.map(option => (index.h("sl-option", { value: option.value }, option.label))), index.h("slot", { key: 'dc85029632cf9c9f6b00b72c4f9a83a8281e25dc' }))));
|
|
4225
4287
|
}
|
|
4226
4288
|
get hostElement() { return index.getElement(this); }
|
|
4227
4289
|
};
|