@jumpgroup/jump-design-system 0.3.52 → 0.3.53
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-97b3526b.js → index-e91b2b41.js} +26 -4
- package/dist/cjs/index-e91b2b41.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.cjs.entry.js +1 -1
- package/dist/cjs/jump-filtergroup.cjs.entry.js +1 -1
- package/dist/cjs/jump-navbar.cjs.entry.js +1 -1
- package/dist/cjs/jump-pagination-table.cjs.entry.js +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +1 -1
- package/dist/cjs/jump-quantity.cjs.entry.js +1 -1
- package/dist/cjs/jump-search-bar-dropdown-item.cjs.entry.js +46 -0
- package/dist/cjs/jump-search-bar-dropdown-item.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-search-bar-mobile.cjs.entry.js +130 -0
- package/dist/cjs/jump-search-bar-mobile.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-search-bar.cjs.entry.js +139 -21
- package/dist/cjs/jump-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab-item.cjs.entry.js +4 -4
- package/dist/cjs/jump-tab-item.cjs.entry.js.map +1 -1
- 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/collection-manifest.json +2 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.css +173 -47
- package/dist/collection/components/jump-search-bar/jump-search-bar.js +424 -27
- package/dist/collection/components/jump-search-bar/jump-search-bar.js.map +1 -1
- package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js +320 -49
- package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js.map +1 -1
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.css +3 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.js +122 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.js.map +1 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.stories.js +13 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.stories.js.map +1 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.e2e.js +10 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.e2e.js.map +1 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.spec.js +18 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.spec.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.css +91 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.js +414 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.stories.js +192 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.stories.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.e2e.js +10 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.e2e.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.spec.js +18 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.spec.js.map +1 -0
- package/dist/collection/components/jump-tab/jump-tab.js +1 -1
- package/dist/collection/components/jump-tab-item/jump-tab-item.css +11 -6
- 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/components/jump-search-bar-dropdown-item.d.ts +11 -0
- package/dist/components/jump-search-bar-dropdown-item.js +65 -0
- package/dist/components/jump-search-bar-dropdown-item.js.map +1 -0
- package/dist/components/jump-search-bar-mobile.d.ts +11 -0
- package/dist/components/jump-search-bar-mobile.js +175 -0
- package/dist/components/jump-search-bar-mobile.js.map +1 -0
- package/dist/components/jump-search-bar.js +159 -22
- package/dist/components/jump-search-bar.js.map +1 -1
- package/dist/components/jump-tab-item.js +3 -3
- package/dist/components/jump-tab-item.js.map +1 -1
- package/dist/components/jump-tab-panel.js +1 -1
- package/dist/components/jump-tab.js +1 -1
- package/dist/esm/{index-14b73bd6.js → index-9a1da0f0.js} +26 -4
- package/dist/esm/index-9a1da0f0.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.entry.js +1 -1
- package/dist/esm/jump-filtergroup.entry.js +1 -1
- package/dist/esm/jump-navbar.entry.js +1 -1
- package/dist/esm/jump-pagination-table.entry.js +1 -1
- package/dist/esm/jump-pagination.entry.js +1 -1
- package/dist/esm/jump-quantity.entry.js +1 -1
- package/dist/esm/jump-search-bar-dropdown-item.entry.js +42 -0
- package/dist/esm/jump-search-bar-dropdown-item.entry.js.map +1 -0
- package/dist/esm/jump-search-bar-mobile.entry.js +126 -0
- package/dist/esm/jump-search-bar-mobile.entry.js.map +1 -0
- package/dist/esm/jump-search-bar.entry.js +139 -21
- package/dist/esm/jump-search-bar.entry.js.map +1 -1
- package/dist/esm/jump-tab-item.entry.js +4 -4
- package/dist/esm/jump-tab-item.entry.js.map +1 -1
- 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-18df1585.entry.js → p-02e863db.entry.js} +2 -2
- package/dist/jump-design-system/p-07633158.entry.js +2 -0
- package/dist/jump-design-system/p-07633158.entry.js.map +1 -0
- package/dist/jump-design-system/p-1aa5fb8a.entry.js +2 -0
- package/dist/jump-design-system/p-1aa5fb8a.entry.js.map +1 -0
- package/dist/jump-design-system/{p-6e26f3ef.entry.js → p-1da9811d.entry.js} +2 -2
- package/dist/jump-design-system/p-21aa0095.js +3 -0
- package/dist/jump-design-system/p-21aa0095.js.map +1 -0
- package/dist/jump-design-system/p-2e2bd8a9.entry.js +2 -0
- package/dist/jump-design-system/{p-6f1c7238.entry.js → p-3f6d50d5.entry.js} +2 -2
- package/dist/jump-design-system/{p-8bdb9702.entry.js → p-466e0ade.entry.js} +2 -2
- package/dist/jump-design-system/{p-396d2541.entry.js → p-506950ea.entry.js} +2 -2
- package/dist/jump-design-system/{p-4b284def.entry.js → p-6acb16c6.entry.js} +3 -3
- package/dist/jump-design-system/{p-7b6c9e01.entry.js → p-6b1ab8c3.entry.js} +2 -2
- package/dist/jump-design-system/{p-53129684.entry.js → p-6dc529fc.entry.js} +2 -2
- package/dist/jump-design-system/{p-30c9d7c7.entry.js → p-6e7c80a3.entry.js} +2 -2
- package/dist/jump-design-system/p-8f581228.entry.js +2 -0
- package/dist/jump-design-system/{p-8873623c.entry.js → p-a1c25113.entry.js} +2 -2
- package/dist/jump-design-system/{p-1c882126.entry.js → p-a826c477.entry.js} +2 -2
- package/dist/jump-design-system/{p-e0e82d36.entry.js → p-b03c5b24.entry.js} +2 -2
- package/dist/jump-design-system/{p-174d297f.entry.js → p-bdafe87d.entry.js} +2 -2
- package/dist/jump-design-system/p-c77d216c.entry.js +2 -0
- package/dist/jump-design-system/p-c77d216c.entry.js.map +1 -0
- package/dist/jump-design-system/p-f7c323d2.entry.js +2 -0
- package/dist/jump-design-system/p-f7c323d2.entry.js.map +1 -0
- package/dist/jump-design-system/{p-f371718a.entry.js → p-feb825e0.entry.js} +2 -2
- package/dist/jump-design-system-elements.json +97 -3
- package/dist/types/components/jump-search-bar/jump-search-bar.d.ts +51 -11
- package/dist/types/components/jump-search-bar/jump-search-bar.stories.d.ts +137 -10
- package/dist/types/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.d.ts +10 -0
- package/dist/types/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.stories.d.ts +7 -0
- package/dist/types/components/jump-search-bar-mobile/jump-search-bar-mobile.d.ts +46 -0
- package/dist/types/components/jump-search-bar-mobile/jump-search-bar-mobile.stories.d.ts +131 -0
- package/dist/types/components.d.ts +135 -10
- package/package.json +1 -1
- package/dist/cjs/index-97b3526b.js.map +0 -1
- package/dist/esm/index-14b73bd6.js.map +0 -1
- package/dist/jump-design-system/p-134e548b.entry.js +0 -2
- package/dist/jump-design-system/p-134e548b.entry.js.map +0 -1
- package/dist/jump-design-system/p-1c5db8d3.js +0 -3
- package/dist/jump-design-system/p-1c5db8d3.js.map +0 -1
- package/dist/jump-design-system/p-3dd1f9a0.entry.js +0 -2
- package/dist/jump-design-system/p-5f12bbbb.entry.js +0 -2
- package/dist/jump-design-system/p-6363b6ee.entry.js +0 -2
- package/dist/jump-design-system/p-6363b6ee.entry.js.map +0 -1
- /package/dist/jump-design-system/{p-18df1585.entry.js.map → p-02e863db.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-6e26f3ef.entry.js.map → p-1da9811d.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-3dd1f9a0.entry.js.map → p-2e2bd8a9.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-6f1c7238.entry.js.map → p-3f6d50d5.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-8bdb9702.entry.js.map → p-466e0ade.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-396d2541.entry.js.map → p-506950ea.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-4b284def.entry.js.map → p-6acb16c6.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-7b6c9e01.entry.js.map → p-6b1ab8c3.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-53129684.entry.js.map → p-6dc529fc.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-30c9d7c7.entry.js.map → p-6e7c80a3.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-5f12bbbb.entry.js.map → p-8f581228.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-8873623c.entry.js.map → p-a1c25113.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-1c882126.entry.js.map → p-a826c477.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-e0e82d36.entry.js.map → p-b03c5b24.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-174d297f.entry.js.map → p-bdafe87d.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-f371718a.entry.js.map → p-feb825e0.entry.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpFilterCss = ":host{--primary-standard:var(--secondary-hard, #435171);--jump-button-background-hover:red;--bg-drawer:var(--bg-drawer, #fff);--header-height:var(--header-height, 80px);--drawer-width:var(--drawer-width, 240px);--overlay-bg-color:var(--overlay-bg-color, rgba(0, 0, 0, 0.35))}:host h3{margin:0}.filtersDrawer__overlay{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);background-color:var(--overlay-bg-color, rgba(0, 0, 0, 0.35));z-index:1;width:100vw;height:100vh;display:none;opacity:0;transition:opacity 0.3s ease-in-out}.filtersDrawer__overlay.filtersDrawer__overlay--active{display:block}.filtersDrawer__overlay.filtersDrawer__overlay--active{opacity:1}.filtersDrawer{position:fixed;display:flex;flex-direction:column;gap:2.5rem;left:-100vw;top:0;height:-webkit-fill-available;max-height:calc(100vh - var(--header-height));transition:0.3s all ease-in-out;background-color:var(--bg-drawer, #fff);padding:1rem;width:100%;max-width:var(--drawer-width);box-shadow:8px 0 15px 0 rgba(0, 0, 0, 0.1490196078);z-index:2;overflow:auto}.filtersDrawer[aria-hidden=false]{left:0;right:0;width:auto;transition:0.3s all ease-in-out}.filtersDrawer[aria-hidden=false] .filtersDrawer__close{position:fixed;top:calc(var(--header-height) + 1rem);left:calc(var(--drawer-width) - 2rem)}@media (min-width: 768px){.filtersDrawer{position:relative;left:0;height:auto;max-width:initial;max-height:initial;box-shadow:none}}@media (max-width: 767px){.filtersDrawer{top:var(--header-height)}}.filtersDrawer .filtersDrawer__header{display:flex;justify-content:flex-start;align-items:center;gap:0.5rem}";
|
|
4
4
|
const JumpFilterStyle0 = jumpFilterCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpFiltergroupCss = ":host{--hidden-display:none;--font-family:var(--ff-primary, \"Inter\"), serif;--font-size:var(--fs-400, 16px);--line-height:var(--lh-300, 1.2);--font-weight:var(--fw-900, 700);--color:var(--neutral-grey-primary, #282828);--distance-items:.25rem;display:block}:host h5{font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);font-weight:var(--font-weight);color:var(--color);margin:0 0 var(--distance-items, 0.25rem)}:host slot{display:flex;flex-direction:column;margin-bottom:1rem}:host ::slotted(.item){max-height:500px;transition:all 0.3s ease-in-out;margin-top:var(--distance-items, 0.25rem);display:flex;align-items:center;justify-content:flex-start;gap:0.25rem}:host ::slotted(.hidden){max-height:0;overflow:hidden}";
|
|
4
4
|
const JumpFiltergroupStyle0 = jumpFiltergroupCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpNavbarCss = ":host{--jump-navbar-height:var(--header-height, 100px);--jump-navbar-background:var(--bg-drawer, #fff);--jump-navbar-width:var(--drawer-width, 240px);--jump-navbar-shadow:8px 0 15px 0 #00000026;--jump-navbar-zindex:2;--jump-navbar-transition:0.3s all ease-in-out;--jump-navbar-gap:2.5rem;--jump-navbar-padding:1rem;--jump-navbar-close-top:calc(var(--header-height) + 1rem);--jump-navbar-close-left:calc(var(--drawer-width) - 2rem);--jump-navbar-close-gap:0.5rem}";
|
|
4
4
|
const JumpNavbarStyle0 = jumpNavbarCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpPaginationTableCss = ":host{display:block}.JumpPaginationTable{--jump-pagination-table-label:var(--neutral-grey-secondary);--jump-pagination-table-arrows:var(--neutral-grey-secondary);--jump-pagination-table-arrows-disabled:var(--neutral-grey-disabled);font-family:var(--ff-primary)}.JumpPaginationTable__Wrapper{display:flex;justify-content:space-between}.JumpPaginationTable__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPaginationTable__Wrapper .elementsPerPage label{color:var(--jump-pagination-table-label);font-size:var(--fs-300);font-weight:normal}.JumpPaginationTable__Wrapper .indicators{font-size:var(--fs-400);font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--jump-pagination-table-label)}.JumpPaginationTable__Wrapper .indicators .arrow{color:var(--jump-pagination-table-arrows);display:flex;align-items:center;gap:10px}.JumpPaginationTable__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPaginationTable__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--jump-pagination-table-arrows-disabled)}.JumpPaginationTable__Wrapper .indicators .elements{color:var(--jump-pagination-table-label);display:flex;align-items:center;gap:5px}";
|
|
4
4
|
const JumpPaginationTableStyle0 = jumpPaginationTableCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpPaginationCss = ":host{display:block;--jump-button-color:yellow}.JumpPagination{--jump-pagination-label:var(--neutral-grey-secondary);--jump-pagination-arrows-color:var(--neutral-grey-secondary);--jump-pagination-arrows-disabled:var(--neutral-grey-disabled);font-family:var(--ff-primary)}.JumpPagination__Wrapper{display:flex;justify-content:space-between}.JumpPagination__Wrapper .indicators{font-size:var(--fs-400);font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--jump-pagination-label)}.JumpPagination__Wrapper .indicators .arrow{color:var(--jump-pagination-arrows-color);display:flex;align-items:center;gap:10px}.JumpPagination__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPagination__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--jump-pagination-arrows-disabled)}.JumpPagination__Wrapper .indicators .elements{color:var(--jump-pagination-label);display:flex;align-items:center;gap:5px}";
|
|
4
4
|
const JumpPaginationStyle0 = jumpPaginationCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpQuantityCss = ":host{display:inline-flex;align-items:flex-start;justify-content:center;flex-direction:column;gap:0.5rem}:host jump-button,:host button{--jump-button-padding:0.5rem}:host [data-variant=horizontal]{flex-direction:row}:host label{color:var(--neutral-grey-secondary);font-size:0.875rem}:host input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;margin:0;outline:none;border:1px solid transparent;border-radius:3px;padding:0.5rem;height:14px;width:36px;font-size:0.875rem;text-align:center}:host input::-webkit-inner-spin-button,:host input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host input:focus{border-color:var(--secondary-standard)}:host input:not([aria-hasbuttons]){border-color:var(--neutral-grey-secondary)}:host input[type=button]{cursor:pointer}:host ::slotted(jump-button){--jump-button-padding:0}:host .jump-quantity__InnerWrapper{display:flex;flex-direction:row;align-items:flex-start;justify-content:center;gap:0}";
|
|
4
4
|
const JumpQuantityStyle0 = jumpQuantityCss;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
|
+
|
|
3
|
+
const jumpSearchBarDropdownItemCss = ":host{display:block}";
|
|
4
|
+
const JumpSearchBarDropdownItemStyle0 = jumpSearchBarDropdownItemCss;
|
|
5
|
+
|
|
6
|
+
const JumpSearchBarDropdownItem = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.connectedEvent = createEvent(this, "jump-search-bar-dropdown-item-connected", 7);
|
|
10
|
+
this.value = undefined;
|
|
11
|
+
this.img = undefined;
|
|
12
|
+
this.href = undefined;
|
|
13
|
+
this.details = undefined;
|
|
14
|
+
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
// devo recuperare da host tutti gli attributi che hanno davanti "details" e creare un oggetto con chiave e valore
|
|
17
|
+
if (this.componentRef.hasAttributes()) {
|
|
18
|
+
const attributes = this.componentRef.attributes;
|
|
19
|
+
this.details = {};
|
|
20
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
21
|
+
if (attributes[i].name.includes('details')) {
|
|
22
|
+
// Come nome della chiave vorrei dare solo quello che c'è dopo details-
|
|
23
|
+
this.details[attributes[i].name.split('details-')[1]] = attributes[i].value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
this.connectedEvent.emit({
|
|
28
|
+
value: this.value,
|
|
29
|
+
details: this.details,
|
|
30
|
+
img: this.img,
|
|
31
|
+
href: this.href,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h(Host, { key: '2cd1b4ef033699ffa631a6529da6c167756ca77b', ref: (el) => this.componentRef = el }));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
JumpSearchBarDropdownItem.style = JumpSearchBarDropdownItemStyle0;
|
|
39
|
+
|
|
40
|
+
export { JumpSearchBarDropdownItem as jump_search_bar_dropdown_item };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=jump-search-bar-dropdown-item.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-search-bar-dropdown-item.entry.js","mappings":";;AAAA,MAAM,4BAA4B,GAAG,sBAAsB,CAAC;AAC5D,wCAAe,4BAA4B;;MCM9B,yBAAyB;;;;;;;;;IAUpC,gBAAgB;;QAEd,IAAG,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE;YACpC,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;YAChD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC1C,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;;oBAG1C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;iBAC7E;aACF;SACF;QAED,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;KACJ;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAiB,GACjD,EACP;KACH;;;;;;","names":[],"sources":["src/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.scss?tag=jump-search-bar-dropdown-item&encapsulation=shadow","src/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, State, Prop, Event, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar-dropdown-item',\n styleUrl: 'jump-search-bar-dropdown-item.scss',\n shadow: true,\n})\nexport class JumpSearchBarDropdownItem {\n private componentRef: HTMLElement;\n\n @Prop() value: string;\n @Prop() img: string;\n @Prop() href: string;\n @State() details: object;\n\n @Event({ eventName: \"jump-search-bar-dropdown-item-connected\" }) connectedEvent;\n\n componentDidLoad() {\n // devo recuperare da host tutti gli attributi che hanno davanti \"details\" e creare un oggetto con chiave e valore\n if(this.componentRef.hasAttributes()) {\n const attributes = this.componentRef.attributes;\n this.details = {};\n for (let i = 0; i < attributes.length; i++) {\n if (attributes[i].name.includes('details')) {\n\n // Come nome della chiave vorrei dare solo quello che c'è dopo details- \n this.details[attributes[i].name.split('details-')[1]] = attributes[i].value;\n }\n }\n }\n\n this.connectedEvent.emit({\n value: this.value,\n details: this.details,\n img: this.img,\n href: this.href,\n });\n }\n\n render() {\n return (\n <Host ref={(el) => this.componentRef = el as HTMLElement}>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
|
+
|
|
3
|
+
const jumpSearchBarMobileCss = ":host{display:block;position:relative;--jump-search-bar-mobile-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-mobile-background-color:var(--gray-ultralight, #FFFFFF);--jump-search-bar-mobile-border-color:var(--neutral-grey-secondary, #707070);font-family:var(--ff-primary)}:host .DropdownWrapper{background-color:var(--jump-search-bar-mobile-background-color);padding:16px;position:fixed;top:0;left:0;height:100vh;z-index:1000;}:host .DropdownWrapper .closeButton{cursor:pointer}:host .DropdownWrapper.open{display:block}:host .DropdownWrapper:not(.open){display:none}:host .DropdownWrapper .InputWrapper{background-color:white;width:100%;display:flex;gap:12px;border-bottom:1px solid var(--jump-search-bar-mobile-border-color);padding-bottom:4px}:host .DropdownWrapper .InputWrapper.focused{border-color:var(--jump-search-bar-mobile-focus-color) !important}:host .DropdownWrapper .InputWrapper.focused jump-icon{color:var(--jump-search-bar-mobile-focus-color) !important}:host .DropdownWrapper .InputWrapper.focused input{outline:none !important}:host .DropdownWrapper input{width:100%;border:none}:host .DropdownWrapper .Results{margin-top:12px}:host .DropdownWrapper .Results__Recents .title{color:#707070;font-size:14px;line-height:20px;padding:8px 0;font-weight:700;display:flex}:host .DropdownWrapper .Results__Results .totalRes{display:flex;justify-content:space-between}:host .DropdownWrapper .Results .ResWrapper{display:flex;flex-direction:column}:host .DropdownWrapper .Results .ResWrapper div{padding:8px 0;color:#707070;font-size:14px;display:flex;gap:12px;align-items:center}:host .DropdownWrapper .Results .ResWrapper div img{width:40px;height:48px;object-fit:cover;border-radius:3px}:host .DropdownWrapper .Results .ResWrapper div:hover{cursor:pointer}:host .DropdownWrapper .Results .ResWrapper .helperText{color:#CBCBCB}:host .DropdownWrapper .Results .ResWrapper .helperText svg{width:25px;height:25px}";
|
|
4
|
+
const JumpSearchBarMobileStyle0 = jumpSearchBarMobileCss;
|
|
5
|
+
|
|
6
|
+
const JumpSearchBarMobile = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.resultClicked = createEvent(this, "jump-search-bar-mobile-res-clicked", 7);
|
|
10
|
+
this.search = createEvent(this, "jump-search-bar-mobile", 7);
|
|
11
|
+
this.showFullSearch = createEvent(this, "jump-search-bar-mobile-show-all", 7);
|
|
12
|
+
// Gestisce l'evento focus sull'input
|
|
13
|
+
this.handleFocus = () => {
|
|
14
|
+
const searchBarContainer = this.jumpSearchBar.closest('.InputWrapper');
|
|
15
|
+
if (searchBarContainer) {
|
|
16
|
+
searchBarContainer.classList.add('focused');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
// Gestisce l'evento blur sull'input
|
|
20
|
+
this.handleBlur = () => {
|
|
21
|
+
const searchBarContainer = this.jumpSearchBar.closest('.InputWrapper');
|
|
22
|
+
if (searchBarContainer) {
|
|
23
|
+
searchBarContainer.classList.remove('focused');
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.doSearch = () => {
|
|
27
|
+
if (this.jumpSearchBar) {
|
|
28
|
+
this.searchValue = this.jumpSearchBar.value;
|
|
29
|
+
// Iniziare la ricerca solamente se ci sono almeno tre caratteri
|
|
30
|
+
if (this.searchValue.length >= 3) {
|
|
31
|
+
this.resType = 'results';
|
|
32
|
+
this.innerResults = undefined;
|
|
33
|
+
this.search.emit({ search: this.searchValue });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.isOpen = false;
|
|
38
|
+
this.innerResults = [];
|
|
39
|
+
this.totalResults = 0;
|
|
40
|
+
this.resType = 'recents';
|
|
41
|
+
this.searchValue = undefined;
|
|
42
|
+
this.identifier = 'search-bar-mobile';
|
|
43
|
+
this.placeholder = 'Cerca...';
|
|
44
|
+
this.recents = [];
|
|
45
|
+
this.recentsTitle = 'Recenti';
|
|
46
|
+
this.debounceTime = 500;
|
|
47
|
+
this.loadingText = 'Sto caricando...';
|
|
48
|
+
this.noResultText = 'Nessun risultato corrispondente';
|
|
49
|
+
this.results = [];
|
|
50
|
+
this.resultsText = 'risultati';
|
|
51
|
+
this.showAllResText = 'Mostra tutti i risultati';
|
|
52
|
+
}
|
|
53
|
+
searchValueChanged(newValue) {
|
|
54
|
+
if (newValue === '') {
|
|
55
|
+
// Create a new array reference to trigger re-render
|
|
56
|
+
this.innerResults = [...this.recents];
|
|
57
|
+
this.results = [];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/* ---------------------- @EVENTS ------------------------- */
|
|
61
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
62
|
+
/* -------------------- @LISTEN ------------------------------- */
|
|
63
|
+
addOption(e) {
|
|
64
|
+
let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}
|
|
65
|
+
// Aggiungi l'elemento solo a `recents`
|
|
66
|
+
this.recents = [...this.recents, Object.assign({}, props)];
|
|
67
|
+
// Aggiorna `innerResults` basandoti solo su `recents`
|
|
68
|
+
this.innerResults = [...this.recents];
|
|
69
|
+
}
|
|
70
|
+
/* -------------------- @METHOD ------------------------------- */
|
|
71
|
+
/** Imposta i risultati della ricerca all'interno della dropdown */
|
|
72
|
+
async setResults(results, tot) {
|
|
73
|
+
this.results = results;
|
|
74
|
+
this.innerResults = results;
|
|
75
|
+
this.totalResults = tot;
|
|
76
|
+
}
|
|
77
|
+
/* -------------------- LOCAL METHODS ------------------------- */
|
|
78
|
+
openDropdown() {
|
|
79
|
+
console.log('openDropdown');
|
|
80
|
+
this.isOpen = true;
|
|
81
|
+
}
|
|
82
|
+
closeDropdown() {
|
|
83
|
+
this.isOpen = false;
|
|
84
|
+
}
|
|
85
|
+
/** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */
|
|
86
|
+
btnOrShowOtherClicked() {
|
|
87
|
+
this.showFullSearch.emit({ search: this.searchValue });
|
|
88
|
+
}
|
|
89
|
+
/** Emette l'evento di click su un risultato, mandandone tutti i dati */
|
|
90
|
+
handleResClicked(item) {
|
|
91
|
+
this.resultClicked.emit({ clicked: item });
|
|
92
|
+
}
|
|
93
|
+
debounce(fn, delay = this.debounceTime) {
|
|
94
|
+
let timeoutId;
|
|
95
|
+
return (...args) => {
|
|
96
|
+
if (timeoutId) {
|
|
97
|
+
clearTimeout(timeoutId);
|
|
98
|
+
}
|
|
99
|
+
timeoutId = setTimeout(() => {
|
|
100
|
+
fn.apply(null, args);
|
|
101
|
+
}, delay);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
;
|
|
105
|
+
/* --------------------- RENDER ------------------------------- */
|
|
106
|
+
render() {
|
|
107
|
+
return (h(Host, { key: 'f0535a70395bacabc372999896fc410c948bbed4', class: "JumpSearchBarMobile", ref: (el) => (this.componentRef = el) }, h("jump-icon", { key: '34431a69c6c68f48b5f92b03f5a876f485d66e34', name: "magnifying-glass", category: "light", onClick: () => this.openDropdown() }), h("div", { key: '89575c7a7a1c0a601a589ac451242e591d907a43', class: "DropdownWrapper " + (this.isOpen ? 'open' : '') }, h("div", { key: '633c8543dc2eaf36b7fc61857d7d63aadf852cd8', class: "InputWrapper" }, h("jump-icon", { key: '3c85be9683007c77faf9fe705c382b753dc8d6fb', class: "closeButton", category: "light", name: "arrow-left", onClick: () => this.closeDropdown() }), h("input", { key: '29f98929f8ed596072f1fe31d5820e9bde0a5604', placeholder: this.placeholder, type: "search", id: this.identifier, class: "search-input", ref: (el) => { this.jumpSearchBar = el; }, onInput: this.debounce(this.doSearch), onFocus: this.handleFocus, onBlur: this.handleBlur }), h("jump-icon", { key: '0e577fbdc3cfcc3d1628360487a828437459e01a', name: "magnifying-glass", category: "light" })), h("div", { key: 'da670ec6f527cc0015b42eea74acc355d081e260', class: "Results" }, (this.resType == 'recents') &&
|
|
108
|
+
h("div", { key: 'bb8eed320957070598e1fb57b3db5a7aa0cea4bd', class: "Results__Recents" }, this.recents.length != 0 && h("span", { key: '748a65cfbb955af507acc30a86afa2366b31d99a', class: "title" }, this.recentsTitle), h("div", { key: 'e3fd0b306f42a56a85d1efc4898a4ead272ce15d', class: "ResWrapper" }, this.innerResults.length > 0 && this.innerResults.map((item) => (h("div", { onClick: () => this.handleResClicked(item) }, h("jump-icon", { name: "magnifying-glass", category: "light" }), item['value']))))), this.resType == 'results' &&
|
|
109
|
+
h("div", { key: '29f82834ad14a34547f9f856f045c7cccc9431e0', class: "Results__Results" }, h("div", { key: '1c005fe5f1d9a88c151886eda65f372c52f4710f', class: "ResWrapper" }, this.innerResults === undefined ?
|
|
110
|
+
h("div", { class: "helperText" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", width: "252", height: "252" }, h("g", null, h("g", { transform: "rotate(0 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.9s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(36 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.8s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(72 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.7s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(108 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.6s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(144 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.5s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(180 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.4s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(216 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.3s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(252 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.2s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(288 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.1s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(324 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "0s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", null))), this.loadingText)
|
|
111
|
+
:
|
|
112
|
+
(this.innerResults.length > 0 ?
|
|
113
|
+
this.innerResults.map((item) => (h("div", { onClick: () => this.handleResClicked(item), key: item['id'] }, item['img'] && h("img", { src: item['img'], alt: "result" }), item['value'])))
|
|
114
|
+
:
|
|
115
|
+
h("div", { class: "helperText" }, this.noResultText)), (this.innerResults && this.innerResults.length > 0) &&
|
|
116
|
+
h("div", { key: '084038e82063eb93fea6ea10d0a405fb7f1e04a8', class: "totalRes" }, h("jump-button", { key: 'f09ae73865768a64e75fcc2b887c4631e3271697', variant: "secondary", size: "small", text: true, onClick: () => this.btnOrShowOtherClicked(), target: "_blank" }, " ", this.showAllResText, " "), this.totalResults && h("div", { key: '66c370a16342ebfe68e3032299bf3da32ed53acd' }, this.totalResults, " ", this.resultsText))))))));
|
|
117
|
+
}
|
|
118
|
+
static get watchers() { return {
|
|
119
|
+
"searchValue": ["searchValueChanged"]
|
|
120
|
+
}; }
|
|
121
|
+
};
|
|
122
|
+
JumpSearchBarMobile.style = JumpSearchBarMobileStyle0;
|
|
123
|
+
|
|
124
|
+
export { JumpSearchBarMobile as jump_search_bar_mobile };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=jump-search-bar-mobile.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-search-bar-mobile.entry.js","mappings":";;AAAA,MAAM,sBAAsB,GAAG,q5DAAq5D,CAAC;AACr7D,kCAAe,sBAAsB;;MCMxB,mBAAmB;;;;;;;QAgG9B,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACvE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAC7C;SACF,CAAC;;QAGF,eAAU,GAAG;YACX,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACvE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,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K,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa,EAAC,SAAS,GAAW,CAC/G,CACL,EAAA,YAAO,CAAI,CAAM,EAAC,IAAI,CAAC,WAAW,CAAO;;qBAE9C,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;wBAC3B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,MACzB,WAAK,OAAO,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,IAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,WAAK,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAC,QAAQ,GAAG,EACrD,IAAI,CAAC,OAAO,CAAC,CACV,CACP,CAAC;;4BAEF,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,YAAY,CAAO,CAClD,EAEF,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;gBACjD,4DAAK,KAAK,EAAC,UAAU,IACnB,oEAAa,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ,SAAG,IAAI,CAAC,cAAc,MAAgB,EACpJ,IAAI,CAAC,YAAY,IAAI,8DAAM,IAAI,CAAC,YAAY,OAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAGJ,CACF,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/jump-search-bar-mobile/jump-search-bar-mobile.scss?tag=jump-search-bar-mobile&encapsulation=shadow","src/components/jump-search-bar-mobile/jump-search-bar-mobile.tsx"],"sourcesContent":[":host {\n display: block;\n position: relative;\n\n --jump-search-bar-mobile-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-mobile-background-color: var(--gray-ultralight, #FFFFFF);\n --jump-search-bar-mobile-border-color: var(--neutral-grey-secondary, #707070);\n\n font-family: var(--ff-primary);\n\n .DropdownWrapper {\n background-color: var(--jump-search-bar-mobile-background-color);\n padding: 16px;\n position: fixed;\n top: 0;\n left: 0;\n //width: 100vw; tengo commentato solo per i test\n height: 100vh;\n z-index: 1000;\n\n .closeButton {\n cursor: pointer;\n }\n\n &.open {\n display: block;\n }\n\n &:not(.open){\n display: none;\n }\n\n\n /* Stile parte interna del dropdown*/\n .InputWrapper {\n background-color: white;\n width: 100%;\n display: flex;\n gap: 12px;\n border-bottom: 1px solid var(--jump-search-bar-mobile-border-color);\n padding-bottom: 4px;\n\n &.focused {\n border-color: var(--jump-search-bar-mobile-focus-color) !important;\n\n jump-icon{\n color: var(--jump-search-bar-mobile-focus-color) !important;\n }\n\n input {\n outline: none !important;\n }\n }\n }\n\n input {\n width: 100%;\n border: none;\n }\n\n .Results {\n margin-top: 12px;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex;\n justify-content: space-between;\n }\n }\n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n \n }\n}\n","import { Component, Watch, Method, Event, EventEmitter, State, Listen, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar-mobile',\n styleUrl: 'jump-search-bar-mobile.scss',\n shadow: true,\n})\nexport class JumpSearchBarMobile {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() isOpen: boolean = false;\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() resType: string = 'recents';\n \n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() identifier: string = 'search-bar-mobile'; // Identificatore della searchbar\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-mobile-res-clicked' }) resultClicked: EventEmitter; \n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar-mobile' }) search: EventEmitter;\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n*/\n @Event({ eventName: 'jump-search-bar-mobile-show-all' }) showFullSearch: EventEmitter;\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n openDropdown(){\n console.log('openDropdown');\n this.isOpen = true;\n } \n\n closeDropdown(){\n this.isOpen = false;\n }\n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked() {\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.InputWrapper');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.InputWrapper');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n\n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n\n this.search.emit({ search: this.searchValue });\n\n \n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n /* --------------------- RENDER ------------------------------- */\n\n render() {\n return (\n <Host class=\"JumpSearchBarMobile\" ref={(el) => (this.componentRef = el as HTMLElement)}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.openDropdown()}\n ></jump-icon>\n <div class={\"DropdownWrapper \" + (this.isOpen ? 'open' : '')}>\n <div class=\"InputWrapper\">\n <jump-icon class=\"closeButton\" category=\"light\" name=\"arrow-left\" onClick={() => this.closeDropdown()}></jump-icon>\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n </div>\n <div class=\"Results\">\n {(this.resType == 'recents') &&\n <div class=\"Results__Recents\">\n {this.recents.length != 0 && <span class=\"title\">{this.recentsTitle}</span>}\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Results__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,53 +1,171 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
|
-
const jumpSearchBarCss = ":host{display:
|
|
3
|
+
const jumpSearchBarCss = ":host{display:block;--jump-search-bar-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-border-color:var(--neutral-grey-secondary, #707070);--jump-search-bar-bg-color:var(--gray-ultralight, #F8F8F8);--jump-search-bar-dropdown-border-color:var(--neutral-grey-disabled, #CBCBCB);font-family:var(--ff-primary);}:host jump-button{--jump-button-border-radius:0px 3px 3px 0px}:host .SearchBar{position:relative}:host .SearchBar.focused .InputWrapper{border-color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper jump-icon{color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper input{outline:none !important}:host .SearchBar:not(.iconOnly){display:flex;width:100%;}:host .SearchBar:not(.iconOnly) .InputWrapper{width:100%;display:flex}:host .SearchBar:not(.iconOnly) input{width:100%;border:none}:host .SearchBar:not(.iconOnly).outline .InputWrapper{border:1px solid var(--jump-search-bar-border-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).outline .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).outline.withBtn .InputWrapper{border-radius:3px 0px 0px 3px}:host .SearchBar:not(.iconOnly).filled .InputWrapper{border:1px solid var(--jump-search-bar-bg-color);background-color:var(--jump-search-bar-bg-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).filled .InputWrapper input{background-color:var(--jump-search-bar-bg-color)}:host .SearchBar:not(.iconOnly).filled .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).filled.focused.withBtn .InputWrapper{border-radius:3px 0px 0px 3px !important}:host .SearchBar:not(.iconOnly).linear .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);padding-bottom:4px}:host .SearchBar:not(.iconOnly).linear .InputWrapper jump-icon{padding-right:6px}:host .Dropdown{margin-top:10px;border-radius:3px;border:1px solid var(--jump-search-bar-dropdown-border-color);padding:4px 16px;background-color:white}:host .Dropdown.dropAbsolute{position:absolute;box-sizing:border-box;position:absolute;left:0;width:100%}:host .Dropdown.dropRelative{position:relative}:host .Dropdown__Recents .title{color:#707070;font-size:14px;line-height:20px;padding:8px 0;font-weight:700;display:flex}:host .Dropdown__Results .totalRes{display:flex;justify-content:space-between}:host .Dropdown .ResWrapper{display:flex;flex-direction:column}:host .Dropdown .ResWrapper div{padding:8px 0;color:#707070;font-size:14px;display:flex;gap:12px;align-items:center}:host .Dropdown .ResWrapper div img{width:40px;height:48px;object-fit:cover;border-radius:3px}:host .Dropdown .ResWrapper div:hover{cursor:pointer}:host .Dropdown .ResWrapper .helperText{color:#CBCBCB}:host .Dropdown .ResWrapper .helperText svg{width:25px;height:25px}:host .SearchBar.iconOnly.linear{display:flex;width:100%}:host .SearchBar.iconOnly.linear .InputWrapper{width:100%;display:flex;align-items:center;transition:border-bottom 0.3s ease;border-bottom:1px solid transparent;padding-bottom:4px;overflow:hidden;}:host .SearchBar.iconOnly.linear .InputWrapper jump-icon{padding-right:6px;}:host .SearchBar.iconOnly.linear .InputWrapper input{width:0;border:none;transform:translateX(-100%);transition:width 0.3s ease, transform 0.3s ease;animation:none;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);transition:border-bottom 0.3s ease;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper input{width:100%;transform:translateX(0);animation:slide-right 0.3s ease forwards;}@keyframes slide-right{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes border-slide-right{from{border-bottom-width:0}to{border-bottom-width:1px}}";
|
|
4
4
|
const JumpSearchBarStyle0 = jumpSearchBarCss;
|
|
5
5
|
|
|
6
6
|
const JumpSearchBar = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
|
+
this.searchbarExpanded = createEvent(this, "jump-search-bar-expanded", 7);
|
|
9
10
|
this.search = createEvent(this, "jump-search-bar", 7);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
this.showFullSearch = createEvent(this, "jump-search-bar-show-all", 7);
|
|
12
|
+
this.resultClicked = createEvent(this, "jump-search-bar-res-clicked", 7);
|
|
13
|
+
// Gestisce l'evento focus sull'input
|
|
14
|
+
this.handleFocus = () => {
|
|
15
|
+
const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');
|
|
16
|
+
if (searchBarContainer) {
|
|
17
|
+
searchBarContainer.classList.add('focused');
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
// Gestisce l'evento blur sull'input
|
|
21
|
+
this.handleBlur = () => {
|
|
22
|
+
const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');
|
|
23
|
+
if (searchBarContainer) {
|
|
24
|
+
searchBarContainer.classList.remove('focused');
|
|
25
|
+
}
|
|
26
|
+
};
|
|
18
27
|
this.doSearch = () => {
|
|
19
28
|
if (this.jumpSearchBar) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this.
|
|
29
|
+
this.searchValue = this.jumpSearchBar.value;
|
|
30
|
+
// Iniziare la ricerca solamente se ci sono almeno tre caratteri
|
|
31
|
+
if (this.searchValue.length >= 3) {
|
|
32
|
+
this.resType = 'results';
|
|
33
|
+
this.innerResults = undefined;
|
|
34
|
+
this.search.emit({ search: this.searchValue });
|
|
35
|
+
// Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti
|
|
36
|
+
if (!this.dropdownVisible) {
|
|
37
|
+
this.dropdownVisible = true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else if (this.searchValue.length == 0) {
|
|
41
|
+
this.dropdownVisible = false;
|
|
42
|
+
}
|
|
23
43
|
}
|
|
24
44
|
};
|
|
45
|
+
this.dropdownVisible = false;
|
|
46
|
+
this.searchValue = undefined;
|
|
47
|
+
this.resType = 'recents';
|
|
48
|
+
this.innerResults = [];
|
|
49
|
+
this.totalResults = 0;
|
|
50
|
+
this.isExpanded = false;
|
|
25
51
|
this.placeholder = 'Cerca...';
|
|
52
|
+
this.noResultText = 'Nessun risultato corrispondente';
|
|
53
|
+
this.loadingText = 'Sto caricando...';
|
|
54
|
+
this.resultsText = 'risultati';
|
|
55
|
+
this.showAllResText = 'Mostra tutti i risultati';
|
|
26
56
|
this.identifier = 'search-bar';
|
|
27
57
|
this.debounceTime = 500;
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
58
|
+
this.variant = 'outline';
|
|
59
|
+
this.withBtn = false;
|
|
60
|
+
this.recentsTitle = 'Recenti';
|
|
61
|
+
this.recents = [];
|
|
62
|
+
this.results = [];
|
|
63
|
+
this.dropdown = false;
|
|
64
|
+
this.linearIconOnly = false;
|
|
65
|
+
this.dropdownPosition = 'relative';
|
|
66
|
+
}
|
|
67
|
+
searchValueChanged(newValue) {
|
|
68
|
+
if (newValue === '') {
|
|
69
|
+
// Create a new array reference to trigger re-render
|
|
70
|
+
this.innerResults = [...this.recents];
|
|
71
|
+
this.results = [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
75
|
+
componentDidLoad() {
|
|
76
|
+
// Aggiungi l'event listener per il clic al di fuori del componente
|
|
77
|
+
document.addEventListener('click', this.handleOutsideClick.bind(this));
|
|
78
|
+
}
|
|
79
|
+
disconnectedCallback() {
|
|
80
|
+
// Rimuovi l'event listener per evitare perdite di memoria
|
|
81
|
+
document.removeEventListener('click', this.handleOutsideClick.bind(this));
|
|
82
|
+
}
|
|
83
|
+
/* -------------------- @LISTEN ------------------------------- */
|
|
84
|
+
addOption(e) {
|
|
85
|
+
let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}
|
|
86
|
+
// Aggiungi l'elemento solo a `recents`
|
|
87
|
+
this.recents = [...this.recents, Object.assign({}, props)];
|
|
88
|
+
// Aggiorna `innerResults` basandoti solo su `recents`
|
|
89
|
+
this.innerResults = [...this.recents];
|
|
90
|
+
}
|
|
91
|
+
/* -------------------- @METHOD ------------------------------- */
|
|
92
|
+
/** Imposta i risultati della ricerca all'interno della dropdown */
|
|
93
|
+
async setResults(results, tot) {
|
|
94
|
+
this.results = results;
|
|
95
|
+
this.innerResults = results;
|
|
96
|
+
this.totalResults = tot;
|
|
97
|
+
}
|
|
98
|
+
/* -------------------- LOCAL METHODS ------------------------- */
|
|
99
|
+
handleOutsideClick(event) {
|
|
100
|
+
// Controlla se il clic è fuori dal componente
|
|
101
|
+
if (this.componentRef && !this.componentRef.contains(event.target)) {
|
|
102
|
+
this.dropdownVisible = false;
|
|
103
|
+
}
|
|
30
104
|
}
|
|
31
|
-
/** Used to filters/searchbar */
|
|
32
105
|
debounce(fn, delay = this.debounceTime) {
|
|
33
106
|
let timeoutId;
|
|
34
107
|
return (...args) => {
|
|
35
|
-
// cancel the previous timer
|
|
36
108
|
if (timeoutId) {
|
|
37
109
|
clearTimeout(timeoutId);
|
|
38
110
|
}
|
|
39
|
-
// setup a new timer
|
|
40
111
|
timeoutId = setTimeout(() => {
|
|
41
112
|
fn.apply(null, args);
|
|
42
113
|
}, delay);
|
|
43
114
|
};
|
|
44
115
|
}
|
|
45
116
|
;
|
|
46
|
-
|
|
117
|
+
openDropdown() {
|
|
118
|
+
this.resType = 'recents';
|
|
119
|
+
this.dropdownVisible = true;
|
|
120
|
+
}
|
|
121
|
+
/** Emette l'evento di click su un risultato, mandandone tutti i dati */
|
|
122
|
+
handleResClicked(item) {
|
|
123
|
+
this.resultClicked.emit({ clicked: item });
|
|
124
|
+
}
|
|
125
|
+
/** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */
|
|
126
|
+
btnOrShowOtherClicked() {
|
|
127
|
+
this.showFullSearch.emit({ search: this.searchValue });
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Se clicco l'icona espando la searchbar ed emetto un evento dedicato
|
|
131
|
+
*/
|
|
132
|
+
expandSearchBar() {
|
|
133
|
+
this.isExpanded = true;
|
|
134
|
+
this.searchbarExpanded.emit();
|
|
135
|
+
}
|
|
136
|
+
/* --------------------- RENDER ------------------------------- */
|
|
137
|
+
renderLinearIconOnly() {
|
|
138
|
+
return (h(Host, { class: "JumpSearchBar ", ref: (el) => (this.componentRef = el) }, h("div", { class: "SearchBar iconOnly " + this.variant + (this.isExpanded ? " expanded" : "") }, h("div", { class: "InputWrapper", onClick: (this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null }, h("jump-icon", { name: "magnifying-glass", category: "light", onClick: () => this.expandSearchBar() }), this.isExpanded &&
|
|
139
|
+
// Mostra la barra di ricerca con l'animazione di slide
|
|
140
|
+
h("input", { placeholder: this.placeholder, type: "search", id: this.identifier, class: "search-input", ref: (el) => { this.jumpSearchBar = el; }, onInput: this.debounce(this.doSearch), onFocus: this.handleFocus, onBlur: this.handleBlur }))), (this.dropdown && this.dropdownVisible) && this.renderDropdown()));
|
|
141
|
+
}
|
|
142
|
+
renderDefault() {
|
|
143
|
+
return (h(Host, { class: "JumpSearchBar", ref: (el) => (this.componentRef = el) }, h("div", { class: "SearchBar " + this.variant + " " + (this.withBtn ? "withBtn" : "") + (this.isExpanded ? " expanded" : "") }, h("div", { class: "InputWrapper", onClick: (this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null }, !this.withBtn && h("jump-icon", { name: "magnifying-glass", category: "light" }), h("input", { placeholder: this.placeholder, type: "search", id: this.identifier, class: "search-input", ref: (el) => { this.jumpSearchBar = el; }, onInput: this.debounce(this.doSearch), onFocus: this.handleFocus, onBlur: this.handleBlur })), this.withBtn && !this.linearIconOnly && (h("jump-button", { variant: "secondary", size: "medium", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, onClick: () => this.btnOrShowOtherClicked() }, h("jump-icon", { slot: "suffix", name: "magnifying-glass" })))), (this.dropdown && this.dropdownVisible) && this.renderDropdown()));
|
|
144
|
+
}
|
|
145
|
+
renderDropdown() {
|
|
146
|
+
console.log('POSITION', this.dropdownPosition);
|
|
147
|
+
return h("div", { class: "Dropdown " + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative') }, (this.resType == 'recents') &&
|
|
148
|
+
h("div", { class: "Dropdown__Recents" }, h("span", { class: "title" }, this.recentsTitle), h("div", { class: "ResWrapper" }, this.innerResults.length > 0 && this.innerResults.map((item) => (h("div", { onClick: () => this.handleResClicked(item) }, h("jump-icon", { name: "magnifying-glass", category: "light" }), item['value']))))), this.resType == 'results' &&
|
|
149
|
+
h("div", { class: "Dropdown__Results" }, h("div", { class: "ResWrapper" }, this.innerResults === undefined ?
|
|
150
|
+
h("div", { class: "helperText" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", width: "252", height: "252" }, h("g", null, h("g", { transform: "rotate(0 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.9s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(36 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.8s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(72 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.7s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(108 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.6s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(144 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.5s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(180 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.4s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(216 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.3s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(252 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.2s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(288 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "-0.1s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", { transform: "rotate(324 50 50)" }, h("rect", { fill: "#707070", height: "11", width: "4", ry: "1.87", rx: "1.87", y: "27.5", x: "48" }, h("animate", { repeatCount: "indefinite", begin: "0s", dur: "1s", keyTimes: "0;1", values: "1;0", attributeName: "opacity" }))), h("g", null))), this.loadingText)
|
|
151
|
+
:
|
|
152
|
+
(this.innerResults.length > 0 ?
|
|
153
|
+
this.innerResults.map((item) => (h("div", { onClick: () => this.handleResClicked(item), key: item['id'] }, item['img'] && h("img", { src: item['img'], alt: "result" }), item['value'])))
|
|
154
|
+
:
|
|
155
|
+
h("div", { class: "helperText" }, this.noResultText)), (this.innerResults && this.innerResults.length > 0) &&
|
|
156
|
+
h("div", { class: "totalRes" }, h("jump-button", { variant: "secondary", size: "small", text: true, onClick: () => this.btnOrShowOtherClicked(), target: "_blank" }, " ", this.showAllResText, " "), this.totalResults && h("div", null, this.totalResults, " ", this.resultsText)))));
|
|
157
|
+
}
|
|
47
158
|
render() {
|
|
48
|
-
|
|
49
|
-
|
|
159
|
+
if (this.variant === 'linear' && this.linearIconOnly) {
|
|
160
|
+
return this.renderLinearIconOnly();
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
return this.renderDefault();
|
|
164
|
+
}
|
|
50
165
|
}
|
|
166
|
+
static get watchers() { return {
|
|
167
|
+
"searchValue": ["searchValueChanged"]
|
|
168
|
+
}; }
|
|
51
169
|
};
|
|
52
170
|
JumpSearchBar.style = JumpSearchBarStyle0;
|
|
53
171
|
|