@jumpgroup/jump-design-system 0.3.78 → 0.3.80
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/{index-230bcbae.js → index-e9479989.js} +5 -5
- package/dist/cjs/index-e9479989.js.map +1 -0
- package/dist/cjs/jump-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/jump-accordion.cjs.entry.js +1 -1
- package/dist/cjs/jump-badge.cjs.entry.js +1 -1
- package/dist/cjs/jump-button_2.cjs.entry.js +1 -1
- package/dist/cjs/jump-card-ecommerce-option.cjs.entry.js +1 -1
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +1 -1
- package/dist/cjs/jump-design-system.cjs.js +2 -2
- package/dist/cjs/jump-filter-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/jump-filter-range.cjs.entry.js +45 -75
- package/dist/cjs/jump-filter-range.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-filter-select.cjs.entry.js +61 -21
- package/dist/cjs/jump-filter-select.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-filter-switch.cjs.entry.js +2 -2
- package/dist/cjs/jump-filter.cjs.entry.js +1 -1
- package/dist/cjs/jump-filtergroup.cjs.entry.js +4 -4
- package/dist/cjs/jump-navbar.cjs.entry.js +6 -6
- package/dist/cjs/jump-pagination-table.cjs.entry.js +4 -4
- package/dist/cjs/jump-pagination.cjs.entry.js +4 -4
- package/dist/cjs/jump-quantity.cjs.entry.js +4 -4
- package/dist/cjs/jump-search-bar-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/jump-search-bar-mobile.cjs.entry.js +5 -5
- package/dist/cjs/jump-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/jump-side-cart-example.cjs.entry.js +2 -2
- package/dist/cjs/jump-side-cart.cjs.entry.js +1 -1
- package/dist/cjs/jump-tab-item.cjs.entry.js +3 -3
- package/dist/cjs/jump-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/jump-tab.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/jump-filter-range/jump-filter-range.js +76 -128
- package/dist/collection/components/jump-filter-range/jump-filter-range.js.map +1 -1
- package/dist/collection/components/jump-filter-range/jump-filter-range.stories.js +13 -4
- package/dist/collection/components/jump-filter-range/jump-filter-range.stories.js.map +1 -1
- package/dist/collection/components/jump-filter-select/jump-filter-select.js +60 -21
- package/dist/collection/components/jump-filter-select/jump-filter-select.js.map +1 -1
- package/dist/collection/components/jump-filter-select/jump-filter-select.stories.js +28 -10
- package/dist/collection/components/jump-filter-switch/jump-filter-switch.js +1 -1
- package/dist/collection/components/jump-filtergroup/jump-filtergroup.js +3 -3
- package/dist/collection/components/jump-navbar/jump-navbar.js +5 -5
- package/dist/collection/components/jump-pagination/jump-pagination.js +3 -3
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +3 -3
- package/dist/collection/components/jump-quantity/jump-quantity.js +3 -3
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.js +1 -1
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.js +4 -4
- package/dist/collection/components/jump-side-cart/jump-side-cart.example.js +1 -1
- package/dist/collection/components/jump-tab/jump-tab.js +1 -1
- package/dist/collection/components/jump-tab-item/jump-tab-item.js +2 -2
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/jump-filter-range.js +51 -81
- package/dist/components/jump-filter-range.js.map +1 -1
- package/dist/components/jump-filter-select.js +60 -21
- package/dist/components/jump-filter-select.js.map +1 -1
- package/dist/components/jump-filter-switch.js +1 -1
- package/dist/components/jump-filtergroup.js +3 -3
- package/dist/components/jump-navbar.js +5 -5
- package/dist/components/jump-pagination-table.js +3 -3
- package/dist/components/jump-pagination.js +3 -3
- package/dist/components/jump-quantity.js +3 -3
- package/dist/components/jump-search-bar-dropdown-item.js +1 -1
- package/dist/components/jump-search-bar-mobile.js +4 -4
- package/dist/components/jump-side-cart-example.js +1 -1
- package/dist/components/jump-tab-item.js +2 -2
- package/dist/components/jump-tab-panel.js +1 -1
- package/dist/components/jump-tab.js +1 -1
- package/dist/esm/{index-4363ffe4.js → index-a94b3471.js} +5 -5
- package/dist/esm/index-a94b3471.js.map +1 -0
- package/dist/esm/jump-accordion-group.entry.js +1 -1
- package/dist/esm/jump-accordion.entry.js +1 -1
- package/dist/esm/jump-badge.entry.js +1 -1
- package/dist/esm/jump-button_2.entry.js +1 -1
- package/dist/esm/jump-card-ecommerce-option.entry.js +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +1 -1
- package/dist/esm/jump-card.entry.js +1 -1
- package/dist/esm/jump-design-system.js +3 -3
- package/dist/esm/jump-filter-checkbox.entry.js +1 -1
- package/dist/esm/jump-filter-range.entry.js +45 -75
- package/dist/esm/jump-filter-range.entry.js.map +1 -1
- package/dist/esm/jump-filter-select.entry.js +61 -21
- package/dist/esm/jump-filter-select.entry.js.map +1 -1
- package/dist/esm/jump-filter-switch.entry.js +2 -2
- package/dist/esm/jump-filter.entry.js +1 -1
- package/dist/esm/jump-filtergroup.entry.js +4 -4
- package/dist/esm/jump-navbar.entry.js +6 -6
- package/dist/esm/jump-pagination-table.entry.js +4 -4
- package/dist/esm/jump-pagination.entry.js +4 -4
- package/dist/esm/jump-quantity.entry.js +4 -4
- package/dist/esm/jump-search-bar-dropdown-item.entry.js +2 -2
- package/dist/esm/jump-search-bar-mobile.entry.js +5 -5
- package/dist/esm/jump-search-bar.entry.js +1 -1
- package/dist/esm/jump-side-cart-example.entry.js +2 -2
- package/dist/esm/jump-side-cart.entry.js +1 -1
- package/dist/esm/jump-tab-item.entry.js +3 -3
- package/dist/esm/jump-tab-panel.entry.js +2 -2
- package/dist/esm/jump-tab.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- 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-048d87ee.entry.js → p-0140b32c.entry.js} +2 -2
- package/dist/jump-design-system/{p-d40c487f.entry.js → p-02ab8fb7.entry.js} +2 -2
- package/dist/jump-design-system/{p-985e8ea6.entry.js → p-038a2a14.entry.js} +2 -2
- package/dist/jump-design-system/{p-e7b3ebb1.entry.js → p-0d86819c.entry.js} +2 -2
- package/dist/jump-design-system/{p-79e5dac6.entry.js → p-18c359e3.entry.js} +2 -2
- package/dist/jump-design-system/{p-ae1435a6.entry.js → p-1ef1fc5c.entry.js} +2 -2
- package/dist/jump-design-system/{p-1f824808.entry.js → p-264fa972.entry.js} +2 -2
- package/dist/jump-design-system/{p-e7d1e3d8.entry.js → p-421ebb5a.entry.js} +2 -2
- package/dist/jump-design-system/{p-5092836a.entry.js → p-55fcebb1.entry.js} +5 -5
- package/dist/jump-design-system/p-55fcebb1.entry.js.map +1 -0
- package/dist/jump-design-system/{p-5fb2a919.entry.js → p-629835ac.entry.js} +2 -2
- package/dist/jump-design-system/{p-a7d5e687.entry.js → p-6905cee4.entry.js} +2 -2
- package/dist/jump-design-system/{p-6e497dd6.entry.js → p-6b8fccdb.entry.js} +2 -2
- package/dist/jump-design-system/{p-9035201c.entry.js → p-6d82feb3.entry.js} +2 -2
- package/dist/jump-design-system/{p-8f02eb5e.entry.js → p-7ac9382b.entry.js} +2 -2
- package/dist/jump-design-system/{p-48bb1cbf.entry.js → p-7e35d9f1.entry.js} +3 -3
- package/dist/jump-design-system/{p-a0237406.entry.js → p-87903fff.entry.js} +2 -2
- package/dist/jump-design-system/{p-40ca24a6.js → p-98d5dd1f.js} +3 -3
- package/dist/jump-design-system/{p-40ca24a6.js.map → p-98d5dd1f.js.map} +1 -1
- package/dist/jump-design-system/{p-66c79fb9.entry.js → p-b3765945.entry.js} +4 -4
- package/dist/jump-design-system/{p-b03b8328.entry.js → p-bb18f919.entry.js} +2 -2
- package/dist/jump-design-system/{p-0cc799f3.entry.js → p-bd692b1f.entry.js} +2 -2
- package/dist/jump-design-system/{p-83b3a560.entry.js → p-cdc5daf7.entry.js} +2 -2
- package/dist/jump-design-system/p-d0ea0f54.entry.js +2 -0
- package/dist/jump-design-system/p-d1fc1ddf.entry.js +2 -0
- package/dist/jump-design-system/p-e30da431.entry.js +2 -0
- package/dist/jump-design-system/p-e30da431.entry.js.map +1 -0
- package/dist/jump-design-system/{p-916742f5.entry.js → p-f36de1a8.entry.js} +2 -2
- package/dist/jump-design-system/{p-cdc53aae.entry.js → p-ff62e250.entry.js} +2 -2
- package/dist/jump-design-system-elements.json +8 -0
- package/dist/types/components/jump-filter-range/jump-filter-range.d.ts +10 -36
- package/dist/types/components/jump-filter-range/jump-filter-range.stories.d.ts +1 -0
- package/dist/types/components/jump-filter-select/jump-filter-select.d.ts +1 -6
- package/dist/types/components.d.ts +17 -20
- package/package.json +1 -1
- package/dist/cjs/index-230bcbae.js.map +0 -1
- package/dist/esm/index-4363ffe4.js.map +0 -1
- package/dist/jump-design-system/p-37b7b679.entry.js +0 -2
- package/dist/jump-design-system/p-37b7b679.entry.js.map +0 -1
- package/dist/jump-design-system/p-5092836a.entry.js.map +0 -1
- package/dist/jump-design-system/p-6134b84b.entry.js +0 -2
- package/dist/jump-design-system/p-64024e67.entry.js +0 -2
- /package/dist/jump-design-system/{p-048d87ee.entry.js.map → p-0140b32c.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-d40c487f.entry.js.map → p-02ab8fb7.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-985e8ea6.entry.js.map → p-038a2a14.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-e7b3ebb1.entry.js.map → p-0d86819c.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-79e5dac6.entry.js.map → p-18c359e3.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-ae1435a6.entry.js.map → p-1ef1fc5c.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-1f824808.entry.js.map → p-264fa972.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-e7d1e3d8.entry.js.map → p-421ebb5a.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-5fb2a919.entry.js.map → p-629835ac.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-a7d5e687.entry.js.map → p-6905cee4.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-6e497dd6.entry.js.map → p-6b8fccdb.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-9035201c.entry.js.map → p-6d82feb3.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-8f02eb5e.entry.js.map → p-7ac9382b.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-48bb1cbf.entry.js.map → p-7e35d9f1.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-a0237406.entry.js.map → p-87903fff.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-66c79fb9.entry.js.map → p-b3765945.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-b03b8328.entry.js.map → p-bb18f919.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-0cc799f3.entry.js.map → p-bd692b1f.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-83b3a560.entry.js.map → p-cdc5daf7.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-64024e67.entry.js.map → p-d0ea0f54.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-6134b84b.entry.js.map → p-d1fc1ddf.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-916742f5.entry.js.map → p-f36de1a8.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-cdc53aae.entry.js.map → p-ff62e250.entry.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e9479989.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["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",{"searchValue":[1025,"search-value"],"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],"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-side-cart-example.cjs",[[1,"jump-side-cart-example",{"isCartOpen":[32],"position":[32],"cartItems":[32]}]]],["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-range.cjs",[[1,"jump-filter-range",{"name":[1],"labelMinBefore":[1,"label-min-before"],"labelMinAfter":[1,"label-min-after"],"labelMaxBefore":[1,"label-max-before"],"labelMaxAfter":[1,"label-max-after"],"min":[2],"max":[2],"step":[2],"
|
|
22
|
+
return index.bootstrapLazy([["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",{"searchValue":[1025,"search-value"],"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],"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-side-cart-example.cjs",[[1,"jump-side-cart-example",{"isCartOpen":[32],"position":[32],"cartItems":[32]}]]],["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-range.cjs",[[1,"jump-filter-range",{"name":[1],"labelMinBefore":[1,"label-min-before"],"labelMinAfter":[1,"label-min-after"],"labelMaxBefore":[1,"label-max-before"],"labelMaxAfter":[1,"label-max-after"],"min":[2],"max":[2],"step":[2],"minVal":[2,"min-val"],"maxVal":[2,"max-val"],"disabled":[516],"internalMinVal":[32],"internalMaxVal":[32],"getValues":[64]},null,{"minVal":["watchMinVal"],"maxVal":["watchMaxVal"]}]]],["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],"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-side-cart.cjs",[[1,"jump-side-cart",{"isOpen":[4,"is-open"],"position":[1],"items":[16],"discountThreshold":[16],"freeShippingThreshold":[2,"free-shipping-threshold"],"progressPercentage":[2,"progress-percentage"],"checkoutLabel":[1,"checkout-label"],"viewCartLabel":[1,"view-cart-label"],"shippingInfo":[1,"shipping-info"],"cartItems":[32]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]],["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]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e9479989.js');
|
|
6
6
|
const directiveHelpers = require('./directive-helpers-b6926fa1.js');
|
|
7
7
|
const ifDefined = require('./if-defined-da1385f1.js');
|
|
8
8
|
const chunk_H33C3MRM = require('./chunk.H33C3MRM-31110702.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e9479989.js');
|
|
6
6
|
|
|
7
7
|
const jumpFilterRangeCss = ":host{--jump-range-track-height:4px;--jump-range-thumb-color:var(--neutral-white, #ffffff);--jump-range-thumb-size:18px;--jump-range-fill-color:var(--secondary-standard, #5e79ba);--jump-range-track-color:var(--gray-ultralight, #f8f8f8);display:block;width:100%}:host(.is-disabled){opacity:0.5;cursor:not-allowed;--jump-range-fill-color:var(--gray-light, #e0e0e0)}.label-container{display:flex;justify-content:space-between;margin-bottom:0.75rem;font-size:0.9em;color:#333}.slider-container{position:relative;height:var(--jump-range-thumb-size);display:flex;align-items:center}.slider-track,.slider-fill{position:absolute;left:0;height:var(--jump-range-track-height);border-radius:var(--jump-range-track-height);width:100%}.slider-track{background-color:var(--jump-range-track-color);z-index:1}.slider-fill{background-color:var(--jump-range-fill-color);z-index:2}.range-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;width:100%;height:var(--jump-range-thumb-size);background:transparent;pointer-events:none;margin:0;z-index:3}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:var(--jump-range-thumb-size);width:var(--jump-range-thumb-size);border-radius:50%;background:var(--jump-range-thumb-color);border:1px solid #ccc;cursor:pointer;pointer-events:auto;margin-top:calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2)}input[type=range]::-moz-range-thumb{-moz-appearance:none;height:var(--jump-range-thumb-size);width:var(--jump-range-thumb-size);border-radius:50%;background:var(--jump-range-thumb-color);border:1px solid #ccc;cursor:pointer;pointer-events:auto}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:var(--jump-range-track-height);background:transparent;border:none}input[type=range]::-moz-range-track{-moz-appearance:none;height:var(--jump-range-track-height);background:transparent;border:none}";
|
|
8
8
|
const JumpFilterRangeStyle0 = jumpFilterRangeCss;
|
|
@@ -13,43 +13,31 @@ const JumpFilterRange = class {
|
|
|
13
13
|
constructor(hostRef) {
|
|
14
14
|
index.registerInstance(this, hostRef);
|
|
15
15
|
this.filterChange = index.createEvent(this, "jump-filterchange", 7);
|
|
16
|
-
/**
|
|
17
|
-
* Gestisce l'aggiornamento in tempo reale dello slider MINIMO.
|
|
18
|
-
* Aggiorna solo lo stato interno per un feedback visivo immediato.
|
|
19
|
-
*/
|
|
20
16
|
this.handleMinInput = (event) => {
|
|
21
17
|
const input = event.target;
|
|
22
18
|
let newMinVal = parseInt(input.value, 10);
|
|
23
|
-
if (newMinVal > this.
|
|
24
|
-
newMinVal = this.
|
|
19
|
+
if (newMinVal > this.internalMaxVal - MIN_GAP) {
|
|
20
|
+
newMinVal = this.internalMaxVal - MIN_GAP;
|
|
25
21
|
input.value = newMinVal.toString();
|
|
26
22
|
}
|
|
27
|
-
this.
|
|
23
|
+
this.internalMinVal = newMinVal;
|
|
28
24
|
};
|
|
29
|
-
/**
|
|
30
|
-
* Gestisce l'aggiornamento in tempo reale dello slider MASSIMO.
|
|
31
|
-
* Aggiorna solo lo stato interno per un feedback visivo immediato.
|
|
32
|
-
*/
|
|
33
25
|
this.handleMaxInput = (event) => {
|
|
34
26
|
const input = event.target;
|
|
35
27
|
let newMaxVal = parseInt(input.value, 10);
|
|
36
|
-
if (newMaxVal < this.
|
|
37
|
-
newMaxVal = this.
|
|
28
|
+
if (newMaxVal < this.internalMinVal + MIN_GAP) {
|
|
29
|
+
newMaxVal = this.internalMinVal + MIN_GAP;
|
|
38
30
|
input.value = newMaxVal.toString();
|
|
39
31
|
}
|
|
40
|
-
this.
|
|
32
|
+
this.internalMaxVal = newMaxVal;
|
|
41
33
|
};
|
|
42
|
-
/**
|
|
43
|
-
* Eseguito quando l'utente rilascia lo slider (evento onChange).
|
|
44
|
-
* Consolida il valore e emette l'evento finale.
|
|
45
|
-
*/
|
|
46
34
|
this.handleCommit = () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
35
|
+
// Sincronizza le prop con lo stato interno prima di emettere l'evento
|
|
36
|
+
this.minVal = this.internalMinVal;
|
|
37
|
+
this.maxVal = this.internalMaxVal;
|
|
50
38
|
this.filterChange.emit({
|
|
51
39
|
name: this.name,
|
|
52
|
-
values:
|
|
40
|
+
values: [this.minVal, this.maxVal],
|
|
53
41
|
});
|
|
54
42
|
};
|
|
55
43
|
this.name = 'range-filter';
|
|
@@ -60,78 +48,60 @@ const JumpFilterRange = class {
|
|
|
60
48
|
this.min = 0;
|
|
61
49
|
this.max = 100;
|
|
62
50
|
this.step = 1;
|
|
63
|
-
this.value = [];
|
|
64
|
-
this.disabled = false;
|
|
65
51
|
this.minVal = undefined;
|
|
66
52
|
this.maxVal = undefined;
|
|
53
|
+
this.disabled = false;
|
|
54
|
+
this.internalMinVal = undefined;
|
|
55
|
+
this.internalMaxVal = undefined;
|
|
67
56
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.
|
|
57
|
+
watchMinVal(newValue) {
|
|
58
|
+
this.internalMinVal = this.validateValue(newValue, 'min');
|
|
59
|
+
}
|
|
60
|
+
watchMaxVal(newValue) {
|
|
61
|
+
this.internalMaxVal = this.validateValue(newValue, 'max');
|
|
73
62
|
}
|
|
74
63
|
componentWillLoad() {
|
|
75
|
-
this.
|
|
64
|
+
this.initializeValues();
|
|
76
65
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (
|
|
82
|
-
this.
|
|
83
|
-
this.maxVal = values[1];
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
// Fallback ai valori di default se l'input non è valido
|
|
87
|
-
this.minVal = this.min;
|
|
88
|
-
this.maxVal = this.max;
|
|
66
|
+
initializeValues() {
|
|
67
|
+
this.internalMinVal = this.validateValue(this.minVal, 'min');
|
|
68
|
+
this.internalMaxVal = this.validateValue(this.maxVal, 'max');
|
|
69
|
+
// Assicura che il valore minimo non superi il massimo
|
|
70
|
+
if (this.internalMinVal > this.internalMaxVal) {
|
|
71
|
+
this.internalMinVal = this.internalMaxVal;
|
|
89
72
|
}
|
|
90
|
-
// Sincronizza
|
|
91
|
-
this.
|
|
73
|
+
// Sincronizza le prop se erano indefinite
|
|
74
|
+
this.minVal = this.internalMinVal;
|
|
75
|
+
this.maxVal = this.internalMaxVal;
|
|
76
|
+
}
|
|
77
|
+
validateValue(val, type) {
|
|
78
|
+
const defaultVal = type === 'min' ? this.min : this.max;
|
|
79
|
+
if (val === undefined || val === null)
|
|
80
|
+
return defaultVal;
|
|
81
|
+
if (val < this.min)
|
|
82
|
+
return this.min;
|
|
83
|
+
if (val > this.max)
|
|
84
|
+
return this.max;
|
|
85
|
+
return val;
|
|
92
86
|
}
|
|
93
|
-
/**
|
|
94
|
-
* Calcola lo stile per la barra di riempimento tra i due slider.
|
|
95
|
-
*/
|
|
96
87
|
getFillStyle() {
|
|
97
88
|
const range = this.max - this.min;
|
|
98
89
|
if (range === 0)
|
|
99
90
|
return { left: '0%', width: '0%' };
|
|
100
|
-
const leftPercent = ((this.
|
|
101
|
-
const rightPercent = ((this.
|
|
91
|
+
const leftPercent = ((this.internalMinVal - this.min) / range) * 100;
|
|
92
|
+
const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;
|
|
102
93
|
return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };
|
|
103
94
|
}
|
|
104
|
-
/**
|
|
105
|
-
* Metodo pubblico per impostare il valore del filtro programmaticamente.
|
|
106
|
-
*/
|
|
107
|
-
async setValue(values, emitEvent = true) {
|
|
108
|
-
if (this.disabled || !values || values.length !== 2) {
|
|
109
|
-
return this.getValues();
|
|
110
|
-
}
|
|
111
|
-
this.setComponentValues(values);
|
|
112
|
-
if (emitEvent) {
|
|
113
|
-
this.handleCommit();
|
|
114
|
-
}
|
|
115
|
-
return this.getValues();
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Metodo pubblico per ottenere il valore corrente.
|
|
119
|
-
*/
|
|
120
95
|
async getValues() {
|
|
121
|
-
return [this.
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Metodo pubblico per ottenere il nome del filtro.
|
|
125
|
-
*/
|
|
126
|
-
async getName() {
|
|
127
|
-
return this.name;
|
|
96
|
+
return [this.internalMinVal, this.internalMaxVal];
|
|
128
97
|
}
|
|
129
98
|
render() {
|
|
130
|
-
return (index.h(index.Host, { key: '
|
|
99
|
+
return (index.h(index.Host, { key: '86845857fd074c171e294dc033aa770700401d26', class: { 'is-disabled': this.disabled } }, index.h("div", { key: '113c5ed7ef5719a189811785c6e5bf35a4ff8649', class: "label-container" }, index.h("label", { key: 'b7415f0d21740dd5b65c1c82746a0f385b1d810f', class: "label-min" }, this.labelMinBefore, " ", this.internalMinVal, this.labelMinAfter), index.h("label", { key: '934a8fdff0fc69f0c2a9e6cd404c7df94d79f7ce', class: "label-max" }, this.labelMaxBefore, " ", this.internalMaxVal, this.labelMaxAfter)), index.h("div", { key: '71e3c78ba4433bb63d522e34842dcdc91e421100', class: "slider-container" }, index.h("div", { key: '6514105f0f22b475c2a7f210fed6bbb88d5f7148', class: "slider-track" }), index.h("div", { key: 'eb02aaa3b388a51136df71a94e9f0128e35653a1', class: "slider-fill", style: this.getFillStyle() }), index.h("input", { key: 'c11e5cf68251d18d15b46a9fbf2129e33a732e69', type: "range", min: this.min, max: this.max, step: this.step, value: this.internalMinVal, onInput: this.handleMinInput, onChange: this.handleCommit, disabled: this.disabled, class: "range-input", "aria-label": this.labelMinBefore }), index.h("input", { key: '41a5bc8333377c6028894735e60f8e7645c4abf3', type: "range", min: this.min, max: this.max, step: this.step, value: this.internalMaxVal, onInput: this.handleMaxInput, onChange: this.handleCommit, disabled: this.disabled, class: "range-input", "aria-label": this.labelMaxBefore }))));
|
|
131
100
|
}
|
|
132
101
|
get host() { return index.getElement(this); }
|
|
133
102
|
static get watchers() { return {
|
|
134
|
-
"
|
|
103
|
+
"minVal": ["watchMinVal"],
|
|
104
|
+
"maxVal": ["watchMaxVal"]
|
|
135
105
|
}; }
|
|
136
106
|
};
|
|
137
107
|
JumpFilterRange.style = JumpFilterRangeStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-filter-range.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,k4DAAk4D,CAAC;AAC95D,8BAAe,kBAAkB;;ACCjC;AACA,MAAM,OAAO,GAAG,CAAC,CAAC;MAOL,eAAe;;;;;;;;QAsElB,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,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IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,EACFA,oEACE,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,CACE,CACD,EACP;KACH;;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n /** I valori iniziali dello slider, come array [min, max]. */\n @Prop({ mutable: true }) value: number[] = [];\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() minVal: number;\n @State() maxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n * Ideale per lanciare chiamate API o ricalcoli onerosi.\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('value')\n valueWatcher(newValue: number[]) {\n if (newValue && newValue.length === 2 && newValue[0] === this.minVal && newValue[1] === this.maxVal) {\n return;\n }\n \n this.setComponentValues(newValue);\n }\n\n\n componentWillLoad() {\n this.setComponentValues(this.value);\n }\n\n /**\n * Imposta i valori interni del componente partendo da un array.\n */\n private setComponentValues(values: number[]) {\n if (values && values.length === 2) {\n this.minVal = values[0];\n this.maxVal = values[1];\n } else {\n // Fallback ai valori di default se l'input non è valido\n this.minVal = this.min;\n this.maxVal = this.max;\n }\n // Sincronizza la prop `value` con lo stato interno\n this.value = [this.minVal, this.maxVal];\n }\n\n /**\n * Gestisce l'aggiornamento in tempo reale dello slider MINIMO.\n * Aggiorna solo lo stato interno per un feedback visivo immediato.\n */\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.maxVal - MIN_GAP) {\n newMinVal = this.maxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.minVal = newMinVal;\n };\n\n /**\n * Gestisce l'aggiornamento in tempo reale dello slider MASSIMO.\n * Aggiorna solo lo stato interno per un feedback visivo immediato.\n */\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.minVal + MIN_GAP) {\n newMaxVal = this.minVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.maxVal = newMaxVal;\n };\n\n /**\n * Eseguito quando l'utente rilascia lo slider (evento onChange).\n * Consolida il valore e emette l'evento finale.\n */\n private handleCommit = () => {\n console.log('Committing values:', this.minVal, this.maxVal);\n const currentValues = [this.minVal, this.maxVal];\n this.value = currentValues; // Sincronizza la prop\n this.filterChange.emit({\n name: this.name,\n values: currentValues,\n });\n };\n\n /**\n * Calcola lo stile per la barra di riempimento tra i due slider.\n */\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.minVal - this.min) / range) * 100;\n const rightPercent = ((this.maxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n /**\n * Metodo pubblico per impostare il valore del filtro programmaticamente.\n */\n @Method()\n async setValue(values: number[], emitEvent: boolean = true): Promise<number[]> {\n if (this.disabled || !values || values.length !== 2) {\n return this.getValues();\n }\n this.setComponentValues(values);\n if (emitEvent) {\n this.handleCommit();\n }\n return this.getValues();\n }\n\n /**\n * Metodo pubblico per ottenere il valore corrente.\n */\n @Method()\n async getValues(): Promise<number[]> {\n return [this.minVal, this.maxVal];\n }\n\n /**\n * Metodo pubblico per ottenere il nome del filtro.\n */\n @Method()\n async getName(): Promise<string> {\n return this.name;\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.minVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.maxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.minVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.maxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
|
1
|
+
{"file":"jump-filter-range.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,k4DAAk4D,CAAC;AAC95D,8BAAe,kBAAkB;;ACCjC;AACA,MAAM,OAAO,GAAG,CAAC,CAAC;MAOL,eAAe;;;;QA2ElB,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAE1C,IAAI,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,EAAE;gBAC7C,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;gBAC1C,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;aACpC;YACD,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;SACjC,CAAC;QAEM,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAE1C,IAAI,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,EAAE;gBAC7C,SAAS,G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3CD,kEAAK,KAAK,EAAC,iBAAiB,IAC1BA,oEAAO,KAAK,EAAC,WAAW,IACrB,IAAI,CAAC,cAAc,OAAG,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,CACxD,EACRA,oEAAO,KAAK,EAAC,WAAW,IACrB,IAAI,CAAC,cAAc,OAAG,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,CACxD,CACJ,EACNA,kEAAK,KAAK,EAAC,kBAAkB,IAC3BA,kEAAK,KAAK,EAAC,cAAc,GAAO,EAChCA,kEAAK,KAAK,EAAC,aAAa,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,GAAQ,EAC3DA,oEACE,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,cAAc,EAC1B,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,EACFA,oEACE,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,cAAc,EAC1B,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,CACE,CACD,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n\n /** Il valore minimo dello slider. */\n @Prop() minVal: number;\n /** Il valore massimo dello slider. */\n @Prop() maxVal: number;\n\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() private internalMinVal: number;\n @State() private internalMaxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('minVal')\n watchMinVal(newValue: number) {\n this.internalMinVal = this.validateValue(newValue, 'min');\n }\n\n @Watch('maxVal')\n watchMaxVal(newValue: number) {\n this.internalMaxVal = this.validateValue(newValue, 'max');\n }\n\n componentWillLoad() {\n this.initializeValues();\n }\n\n private initializeValues() {\n this.internalMinVal = this.validateValue(this.minVal, 'min');\n this.internalMaxVal = this.validateValue(this.maxVal, 'max');\n\n // Assicura che il valore minimo non superi il massimo\n if (this.internalMinVal > this.internalMaxVal) {\n this.internalMinVal = this.internalMaxVal;\n }\n\n // Sincronizza le prop se erano indefinite\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n }\n\n private validateValue(val: number, type: 'min' | 'max'): number {\n const defaultVal = type === 'min' ? this.min : this.max;\n if (val === undefined || val === null) return defaultVal;\n if (val < this.min) return this.min;\n if (val > this.max) return this.max;\n return val;\n }\n\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.internalMaxVal - MIN_GAP) {\n newMinVal = this.internalMaxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.internalMinVal = newMinVal;\n };\n\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.internalMinVal + MIN_GAP) {\n newMaxVal = this.internalMinVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.internalMaxVal = newMaxVal;\n };\n\n private handleCommit = () => {\n // Sincronizza le prop con lo stato interno prima di emettere l'evento\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n\n this.filterChange.emit({\n name: this.name,\n values: [this.minVal, this.maxVal],\n });\n };\n\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.internalMinVal - this.min) / range) * 100;\n const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n @Method()\n async getValues(): Promise<number[]> {\n return [this.internalMinVal, this.internalMaxVal];\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.internalMinVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.internalMaxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e9479989.js');
|
|
6
6
|
const directiveHelpers = require('./directive-helpers-b6926fa1.js');
|
|
7
7
|
const chunk_H33C3MRM = require('./chunk.H33C3MRM-31110702.js');
|
|
8
8
|
const classMap = require('./class-map-010ed95d.js');
|
|
@@ -4131,17 +4131,8 @@ const JumpFilterSelect = class {
|
|
|
4131
4131
|
this.required = false;
|
|
4132
4132
|
this.loading = false;
|
|
4133
4133
|
this.open = false;
|
|
4134
|
-
this.hasSlottedOptions = false;
|
|
4135
4134
|
this.values = [];
|
|
4136
4135
|
}
|
|
4137
|
-
/**
|
|
4138
|
-
* Controlla se ci sono opzioni definite come slot
|
|
4139
|
-
*/
|
|
4140
|
-
componentWillRender() {
|
|
4141
|
-
// Verifica se ci sono elementi sl-option definiti come figli
|
|
4142
|
-
const slotNodes = this.hostElement.childNodes;
|
|
4143
|
-
this.hasSlottedOptions = Array.from(slotNodes).some(node => node.nodeName && node.nodeName.toLowerCase() === 'sl-option');
|
|
4144
|
-
}
|
|
4145
4136
|
/**
|
|
4146
4137
|
* Converte le opzioni da string o array a array di oggetti
|
|
4147
4138
|
*/
|
|
@@ -4164,36 +4155,61 @@ const JumpFilterSelect = class {
|
|
|
4164
4155
|
this.values = this.value ? [this.value] : [];
|
|
4165
4156
|
}
|
|
4166
4157
|
componentDidLoad() {
|
|
4167
|
-
this.listenSLChange();
|
|
4168
4158
|
// Inizializza l'array dei valori
|
|
4169
4159
|
this.updateValues();
|
|
4160
|
+
// Aspetta che il render sia completato e che Shoelace abbia processato gli slot
|
|
4161
|
+
setTimeout(() => {
|
|
4162
|
+
this.listenSLChange();
|
|
4163
|
+
}, 100); // Aumentiamo il timeout per dare più tempo a Shoelace
|
|
4164
|
+
}
|
|
4165
|
+
componentDidRender() {
|
|
4166
|
+
// Assicuriamoci che il listener sia attivo anche dopo ogni render
|
|
4167
|
+
if (this.el && !this.el._jumpListenerAttached) {
|
|
4168
|
+
this.listenSLChange();
|
|
4169
|
+
}
|
|
4170
4170
|
}
|
|
4171
4171
|
/**
|
|
4172
4172
|
* Ascolta gli eventi di cambio selezione dal select Shoelace
|
|
4173
4173
|
*/
|
|
4174
4174
|
listenSLChange() {
|
|
4175
|
-
if (this.
|
|
4176
|
-
|
|
4175
|
+
if (this.el && !this.el._jumpListenerAttached) {
|
|
4176
|
+
// Marchiamo l'elemento per evitare listener multipli
|
|
4177
|
+
this.el._jumpListenerAttached = true;
|
|
4178
|
+
this.el.addEventListener('sl-change', (event) => {
|
|
4177
4179
|
if (this.disabled) {
|
|
4178
4180
|
return;
|
|
4179
4181
|
}
|
|
4182
|
+
console.log('sl-change event received:', event.target.value);
|
|
4183
|
+
// AGGIORNA PRIMA I VALORI INTERNI
|
|
4180
4184
|
this.value = event.target.value;
|
|
4181
4185
|
this.updateValues();
|
|
4182
4186
|
const optionsArray = this.getOptionsArray();
|
|
4183
|
-
|
|
4187
|
+
let selectedOption = optionsArray.find(option => option.value === this.value);
|
|
4188
|
+
// Se non abbiamo trovato l'opzione nell'array (caso slot), proviamo a trovarla negli elementi sl-option
|
|
4189
|
+
if (!selectedOption && this.value) {
|
|
4190
|
+
const slotOptions = this.hostElement.querySelectorAll('sl-option');
|
|
4191
|
+
const slotOption = Array.from(slotOptions).find((opt) => opt.value === this.value);
|
|
4192
|
+
if (slotOption) {
|
|
4193
|
+
selectedOption = {
|
|
4194
|
+
value: this.value,
|
|
4195
|
+
label: slotOption.textContent || this.value
|
|
4196
|
+
};
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4184
4199
|
// Evento specifico per il componente select
|
|
4185
4200
|
const selectEventData = {
|
|
4186
4201
|
value: this.value,
|
|
4187
4202
|
selectedOption
|
|
4188
4203
|
};
|
|
4189
4204
|
this.selectionChange.emit(selectEventData);
|
|
4190
|
-
// Evento standard per il sistema di filtri
|
|
4205
|
+
// CORREZIONE: Evento standard per il sistema di filtri con valori aggiornati
|
|
4191
4206
|
const filterEventData = {
|
|
4192
4207
|
name: this.name,
|
|
4193
|
-
values: this.values,
|
|
4194
|
-
value: this.value,
|
|
4195
|
-
selectedOption
|
|
4208
|
+
values: this.values, // Ora questo sarà popolato correttamente
|
|
4209
|
+
value: this.value, // E anche questo
|
|
4210
|
+
selectedOption // E anche questo
|
|
4196
4211
|
};
|
|
4212
|
+
console.log('jump-filter-select: Emitting jump-filterchange with data:', filterEventData);
|
|
4197
4213
|
this.selectionFilterChange.emit(filterEventData);
|
|
4198
4214
|
});
|
|
4199
4215
|
}
|
|
@@ -4211,7 +4227,19 @@ const JumpFilterSelect = class {
|
|
|
4211
4227
|
*/
|
|
4212
4228
|
async getSelectedOption() {
|
|
4213
4229
|
const optionsArray = this.getOptionsArray();
|
|
4214
|
-
|
|
4230
|
+
let selectedOption = optionsArray.find(option => option.value === this.value);
|
|
4231
|
+
// Se non abbiamo trovato l'opzione nell'array (caso slot), proviamo a trovarla negli elementi sl-option
|
|
4232
|
+
if (!selectedOption && this.value) {
|
|
4233
|
+
const slotOptions = this.hostElement.querySelectorAll('sl-option');
|
|
4234
|
+
const slotOption = Array.from(slotOptions).find((opt) => opt.value === this.value);
|
|
4235
|
+
if (slotOption) {
|
|
4236
|
+
selectedOption = {
|
|
4237
|
+
value: this.value,
|
|
4238
|
+
label: slotOption.textContent || this.value
|
|
4239
|
+
};
|
|
4240
|
+
}
|
|
4241
|
+
}
|
|
4242
|
+
return selectedOption;
|
|
4215
4243
|
}
|
|
4216
4244
|
/**
|
|
4217
4245
|
* Metodo pubblico per ottenere i valori selezionati come array
|
|
@@ -4253,7 +4281,18 @@ const JumpFilterSelect = class {
|
|
|
4253
4281
|
// Emetti l'evento di cambio se richiesto
|
|
4254
4282
|
if (emitEvent) {
|
|
4255
4283
|
const optionsArray = this.getOptionsArray();
|
|
4256
|
-
|
|
4284
|
+
let selectedOption = optionsArray.find(option => option.value === this.value);
|
|
4285
|
+
// Se non abbiamo trovato l'opzione nell'array (caso slot), proviamo a trovarla negli elementi sl-option
|
|
4286
|
+
if (!selectedOption && this.value) {
|
|
4287
|
+
const slotOptions = this.hostElement.querySelectorAll('sl-option');
|
|
4288
|
+
const slotOption = Array.from(slotOptions).find((opt) => opt.value === this.value);
|
|
4289
|
+
if (slotOption) {
|
|
4290
|
+
selectedOption = {
|
|
4291
|
+
value: this.value,
|
|
4292
|
+
label: slotOption.textContent || this.value
|
|
4293
|
+
};
|
|
4294
|
+
}
|
|
4295
|
+
}
|
|
4257
4296
|
// Evento specifico per il componente select
|
|
4258
4297
|
const selectEventData = {
|
|
4259
4298
|
value: this.value,
|
|
@@ -4283,7 +4322,8 @@ const JumpFilterSelect = class {
|
|
|
4283
4322
|
}
|
|
4284
4323
|
render() {
|
|
4285
4324
|
const optionsArray = this.getOptionsArray();
|
|
4286
|
-
|
|
4325
|
+
const hasOptionsFromProp = optionsArray && optionsArray.length > 0;
|
|
4326
|
+
return (index.h(index.Host, { key: '97473942caed469dfb681d77e1335542d5d67808', ref: (host) => (this.host = host) }, this.label && (index.h("div", { key: 'eb5d0f4a428642694bb47f1bedf1da14d375e592', class: "select-label" }, this.label)), index.h("sl-select", { key: 'c3d4cb422603fdf837e5433dddd061c47832723a', value: this.value, placeholder: this.placeholder, disabled: this.disabled, multiple: this.multiple, required: this.required, loading: this.loading, ref: (el) => (this.el = el) }, hasOptionsFromProp ? (optionsArray.map(option => (index.h("sl-option", { value: option.value }, option.label)))) : (index.h("slot", null)))));
|
|
4287
4327
|
}
|
|
4288
4328
|
get hostElement() { return index.getElement(this); }
|
|
4289
4329
|
};
|