@fast-simon/dashboard-utilities 1.0.96 → 1.0.97
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/@types/autocomplete.d.ts +58 -58
- package/dist/@types/autocomplete.js +1 -1
- package/dist/@types/autocomplete.js.map +1 -1
- package/dist/@types/banner.d.ts +7 -7
- package/dist/@types/banner.js +1 -1
- package/dist/@types/banner.js.map +1 -1
- package/dist/@types/categories.d.ts +113 -113
- package/dist/@types/categories.js +1 -1
- package/dist/@types/categories.js.map +1 -1
- package/dist/@types/categoriesNavigation.d.ts +27 -27
- package/dist/@types/categoriesNavigation.js +1 -1
- package/dist/@types/categoriesNavigation.js.map +1 -1
- package/dist/@types/context.d.ts +49 -49
- package/dist/@types/context.js +1 -1
- package/dist/@types/context.js.map +1 -1
- package/dist/@types/currency.d.ts +1 -1
- package/dist/@types/currency.js +1 -1
- package/dist/@types/currency.js.map +1 -1
- package/dist/@types/editorProduct.d.ts +26 -26
- package/dist/@types/editorProduct.js +5 -5
- package/dist/@types/editorProduct.js.map +1 -1
- package/dist/@types/facets.d.ts +59 -59
- package/dist/@types/facets.js +18 -18
- package/dist/@types/facets.js.map +1 -1
- package/dist/@types/iconProps.d.ts +9 -9
- package/dist/@types/iconProps.js +1 -1
- package/dist/@types/iconProps.js.map +1 -1
- package/dist/@types/narrow.d.ts +7 -7
- package/dist/@types/narrow.js +1 -1
- package/dist/@types/narrow.js.map +1 -1
- package/dist/@types/product.d.ts +160 -160
- package/dist/@types/product.js +7 -7
- package/dist/@types/product.js.map +1 -1
- package/dist/@types/productLabel.d.ts +1 -1
- package/dist/@types/productLabel.js +1 -1
- package/dist/@types/promoTile.d.ts +11 -11
- package/dist/@types/promoTile.js +1 -1
- package/dist/@types/promoTile.js.map +1 -1
- package/dist/@types/results.d.ts +142 -142
- package/dist/@types/results.js +1 -1
- package/dist/@types/results.js.map +1 -1
- package/dist/@types/sideMenu.d.ts +19 -19
- package/dist/@types/sideMenu.js +1 -1
- package/dist/@types/sideMenu.js.map +1 -1
- package/dist/@types/sortBy.d.ts +3 -3
- package/dist/@types/sortBy.js +1 -1
- package/dist/@types/sortBy.js.map +1 -1
- package/dist/@types/widget.d.ts +8 -8
- package/dist/@types/widget.js +1 -1
- package/dist/@types/widget.js.map +1 -1
- package/dist/App.d.ts +3 -3
- package/dist/App.js +14 -14
- package/dist/App.js.map +1 -1
- package/dist/components/BackOfficeFiltersMenu/BackOfficeFiltersMenu.d.ts +9 -9
- package/dist/components/BackOfficeFiltersMenu/BackOfficeFiltersMenu.js +73 -73
- package/dist/components/BackOfficeFiltersMenu/BackOfficeFiltersMenu.js.map +1 -1
- package/dist/components/BackOfficeFiltersMenu/index.d.ts +1 -1
- package/dist/components/BackOfficeFiltersMenu/index.js +1 -1
- package/dist/components/BackOfficeFiltersMenu/index.js.map +1 -1
- package/dist/components/BackOfficeFiltersMenu/styles.module.css +9 -9
- package/dist/components/BackOfficeFiltersMenu/utils.d.ts +7 -7
- package/dist/components/BackOfficeFiltersMenu/utils.js +238 -238
- package/dist/components/BackOfficeFiltersMenu/utils.js.map +1 -1
- package/dist/components/CheckboxFilter/Checkbox/Checkbox.d.ts +10 -10
- package/dist/components/CheckboxFilter/Checkbox/Checkbox.js +6 -6
- package/dist/components/CheckboxFilter/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CheckboxFilter/Checkbox/styles.module.css +142 -142
- package/dist/components/CheckboxFilter/CheckboxFilter.d.ts +6 -6
- package/dist/components/CheckboxFilter/CheckboxFilter.js +8 -8
- package/dist/components/CheckboxFilter/CheckboxFilter.js.map +1 -1
- package/dist/components/CheckboxFilter/styles.module.css +4 -4
- package/dist/components/DragAndDrop/DndContextWrapper.d.ts +19 -19
- package/dist/components/DragAndDrop/DndContextWrapper.js +30 -30
- package/dist/components/DragAndDrop/DndContextWrapper.js.map +1 -1
- package/dist/components/DragAndDrop/Droppable.d.ts +7 -7
- package/dist/components/DragAndDrop/Droppable.js +9 -9
- package/dist/components/DragAndDrop/Droppable.js.map +1 -1
- package/dist/components/DragAndDrop/SortableItem.d.ts +13 -13
- package/dist/components/DragAndDrop/SortableItem.js +38 -38
- package/dist/components/DragAndDrop/SortableItem.js.map +1 -1
- package/dist/components/DragAndDrop/styles.module.css +15 -15
- package/dist/components/FacetItem/FacetItem.d.ts +13 -13
- package/dist/components/FacetItem/FacetItem.js +39 -39
- package/dist/components/FacetItem/FacetItem.js.map +1 -1
- package/dist/components/FacetItem/styles.module.css +54 -54
- package/dist/components/FastSimonApi/FastSimonApi.d.ts +39 -39
- package/dist/components/FastSimonApi/FastSimonApi.js +605 -605
- package/dist/components/FastSimonApi/FastSimonApi.js.map +1 -1
- package/dist/components/FastSimonApi/context.d.ts +62 -62
- package/dist/components/FastSimonApi/context.js +9 -9
- package/dist/components/FastSimonApi/context.js.map +1 -1
- package/dist/components/FastSimonApi/index.d.ts +3 -3
- package/dist/components/FastSimonApi/index.js +2 -2
- package/dist/components/FastSimonApi/index.js.map +1 -1
- package/dist/components/FastSimonApi/reducer.d.ts +458 -458
- package/dist/components/FastSimonApi/reducer.js +76 -76
- package/dist/components/FastSimonApi/reducer.js.map +1 -1
- package/dist/components/FromToFilter/From/From.d.ts +17 -17
- package/dist/components/FromToFilter/From/From.js +21 -21
- package/dist/components/FromToFilter/From/From.js.map +1 -1
- package/dist/components/FromToFilter/From/styles.module.css +8 -8
- package/dist/components/FromToFilter/FromToFilter.d.ts +14 -14
- package/dist/components/FromToFilter/FromToFilter.js +57 -57
- package/dist/components/FromToFilter/FromToFilter.js.map +1 -1
- package/dist/components/FromToFilter/To/To.d.ts +18 -18
- package/dist/components/FromToFilter/To/To.js +22 -22
- package/dist/components/FromToFilter/To/To.js.map +1 -1
- package/dist/components/FromToFilter/To/styles.module.css +8 -8
- package/dist/components/FromToFilter/styles.module.css +33 -33
- package/dist/components/FromToFilter/utils.d.ts +25 -25
- package/dist/components/FromToFilter/utils.js +6 -6
- package/dist/components/FromToFilter/utils.js.map +1 -1
- package/dist/components/InStoreFiltersMenu/InStoreFiltersMenu.d.ts +10 -10
- package/dist/components/InStoreFiltersMenu/InStoreFiltersMenu.js +33 -33
- package/dist/components/InStoreFiltersMenu/InStoreFiltersMenu.js.map +1 -1
- package/dist/components/InStoreFiltersMenu/index.d.ts +1 -1
- package/dist/components/InStoreFiltersMenu/index.js +1 -1
- package/dist/components/InStoreFiltersMenu/index.js.map +1 -1
- package/dist/components/InStoreFiltersMenu/styles.module.css +9 -9
- package/dist/components/Input/Input.d.ts +22 -22
- package/dist/components/Input/Input.js +48 -48
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/Input/styles.module.css +2 -2
- package/dist/components/LastReceivedDateFilter/LastReceivedDate.d.ts +9 -9
- package/dist/components/LastReceivedDateFilter/LastReceivedDate.js +87 -87
- package/dist/components/LastReceivedDateFilter/LastReceivedDate.js.map +1 -1
- package/dist/components/LastReceivedDateFilter/styles.module.css +40 -40
- package/dist/components/LastReceivedDateFilter/utils.d.ts +3 -3
- package/dist/components/LastReceivedDateFilter/utils.js +42 -42
- package/dist/components/LastReceivedDateFilter/utils.js.map +1 -1
- package/dist/components/ProductLabel/ProductLabel.d.ts +11 -11
- package/dist/components/ProductLabel/ProductLabel.js +10 -10
- package/dist/components/ProductLabel/ProductLabel.js.map +1 -1
- package/dist/components/ProductLabel/index.d.ts +1 -1
- package/dist/components/ProductLabel/index.js +1 -1
- package/dist/components/ProductLabel/index.js.map +1 -1
- package/dist/components/ProductLabel/styles.module.css +41 -41
- package/dist/components/ProductLabel/utils.d.ts +8 -8
- package/dist/components/ProductLabel/utils.js +8 -8
- package/dist/components/ProductLabel/utils.js.map +1 -1
- package/dist/components/RadioFilter/Radio/Radio.d.ts +10 -10
- package/dist/components/RadioFilter/Radio/Radio.js +6 -6
- package/dist/components/RadioFilter/Radio/Radio.js.map +1 -1
- package/dist/components/RadioFilter/Radio/styles.module.css +144 -144
- package/dist/components/RadioFilter/RadioFilter.d.ts +9 -9
- package/dist/components/RadioFilter/RadioFilter.js +44 -44
- package/dist/components/RadioFilter/RadioFilter.js.map +1 -1
- package/dist/components/RadioFilter/styles.module.css +22 -22
- package/dist/components/RadioFilter/utils.d.ts +1 -1
- package/dist/components/RadioFilter/utils.js +7 -7
- package/dist/components/RadioFilter/utils.js.map +1 -1
- package/dist/components/ReactDatePicker/ReactDatePicker.d.ts +11 -11
- package/dist/components/ReactDatePicker/ReactDatePicker.js +15 -15
- package/dist/components/ReactDatePicker/ReactDatePicker.js.map +1 -1
- package/dist/components/ReactDatePicker/index.d.ts +1 -1
- package/dist/components/ReactDatePicker/index.js +1 -1
- package/dist/components/ReactDatePicker/index.js.map +1 -1
- package/dist/components/ReactDatePicker/styles.module.css +2 -2
- package/dist/components/RenderIfVisible/RenderIfVisible.d.ts +12 -12
- package/dist/components/RenderIfVisible/RenderIfVisible.js +58 -58
- package/dist/components/RenderIfVisible/RenderIfVisible.js.map +1 -1
- package/dist/components/RenderIfVisible/index.d.ts +1 -1
- package/dist/components/RenderIfVisible/index.js +1 -1
- package/dist/components/RenderIfVisible/index.js.map +1 -1
- package/dist/components/ScrollToTop/ScrollToTop.d.ts +6 -6
- package/dist/components/ScrollToTop/ScrollToTop.js +27 -27
- package/dist/components/ScrollToTop/ScrollToTop.js.map +1 -1
- package/dist/components/ScrollToTop/styles.module.css +18 -18
- package/dist/components/SelectCard/SelectCard.d.ts +5 -5
- package/dist/components/SelectCard/SelectCard.js +6 -6
- package/dist/components/SelectCard/SelectCard.js.map +1 -1
- package/dist/components/SelectCard/index.d.ts +1 -1
- package/dist/components/SelectCard/index.js +1 -1
- package/dist/components/SelectCard/index.js.map +1 -1
- package/dist/components/SelectCard/styles.module.css +20 -20
- package/dist/components/SingleFilter/SingleFilter.d.ts +11 -11
- package/dist/components/SingleFilter/SingleFilter.js +89 -89
- package/dist/components/SingleFilter/SingleFilter.js.map +1 -1
- package/dist/components/SingleFilter/styles.module.css +23 -23
- package/dist/components/SingleFilter/utils.d.ts +3 -3
- package/dist/components/SingleFilter/utils.js +41 -41
- package/dist/components/SingleFilter/utils.js.map +1 -1
- package/dist/components/SliderFilter/SliderFilter.d.ts +20 -20
- package/dist/components/SliderFilter/SliderFilter.js +45 -45
- package/dist/components/SliderFilter/SliderFilter.js.map +1 -1
- package/dist/components/SliderFilter/index.d.ts +1 -1
- package/dist/components/SliderFilter/index.js +1 -1
- package/dist/components/SliderFilter/index.js.map +1 -1
- package/dist/components/SliderFilter/styles.module.css +15 -15
- package/dist/components/Tooltip/Tooltip.d.ts +8 -8
- package/dist/components/Tooltip/Tooltip.js +8 -8
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/styles.module.css +33 -33
- package/dist/components/common.d.ts +23 -23
- package/dist/components/common.js +30 -30
- package/dist/components/common.js.map +1 -1
- package/dist/components/productGrid/ProductGrid.d.ts +11 -11
- package/dist/components/productGrid/ProductGrid.js +32 -32
- package/dist/components/productGrid/ProductGrid.js.map +1 -1
- package/dist/components/productGrid/index.d.ts +1 -1
- package/dist/components/productGrid/index.js +1 -1
- package/dist/components/productGrid/index.js.map +1 -1
- package/dist/components/productGrid/styles.module.css +25 -25
- package/dist/icons/BackOfficeFiltersIcon.d.ts +2 -2
- package/dist/icons/BackOfficeFiltersIcon.js +6 -6
- package/dist/icons/BackOfficeFiltersIcon.js.map +1 -1
- package/dist/icons/BannersIcon.d.ts +2 -2
- package/dist/icons/BannersIcon.js +6 -6
- package/dist/icons/BannersIcon.js.map +1 -1
- package/dist/icons/GeneralIcon.d.ts +2 -2
- package/dist/icons/GeneralIcon.js +6 -6
- package/dist/icons/GeneralIcon.js.map +1 -1
- package/dist/icons/HelpIcon.d.ts +7 -7
- package/dist/icons/HelpIcon.js +4 -4
- package/dist/icons/HelpIcon.js.map +1 -1
- package/dist/icons/InStoreFiltersIcon.d.ts +2 -2
- package/dist/icons/InStoreFiltersIcon.js +6 -6
- package/dist/icons/InStoreFiltersIcon.js.map +1 -1
- package/dist/icons/PromoteIcon.d.ts +2 -2
- package/dist/icons/PromoteIcon.js +6 -6
- package/dist/icons/PromoteIcon.js.map +1 -1
- package/dist/icons/RemoveIcon.d.ts +2 -2
- package/dist/icons/RemoveIcon.js +6 -6
- package/dist/icons/RemoveIcon.js.map +1 -1
- package/dist/icons/RestoreIcon.d.ts +2 -2
- package/dist/icons/RestoreIcon.js +6 -6
- package/dist/icons/RestoreIcon.js.map +1 -1
- package/dist/icons/styles.module.css +60 -60
- package/dist/index.css +13 -0
- package/dist/index.d.ts +41 -41
- package/dist/index.js +32 -32
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +5 -5
- package/dist/main.js.map +1 -1
- package/dist/services/API.d.ts +21 -21
- package/dist/services/API.js +49 -49
- package/dist/services/API.js.map +1 -1
- package/dist/services/autocomplete.d.ts +4 -4
- package/dist/services/autocomplete.js +25 -25
- package/dist/services/autocomplete.js.map +1 -1
- package/dist/services/getFormatProducts.d.ts +13 -13
- package/dist/services/getFormatProducts.js +43 -43
- package/dist/services/getFormatProducts.js.map +1 -1
- package/dist/services/landingPage.d.ts +28 -28
- package/dist/services/landingPage.js +86 -86
- package/dist/services/landingPage.js.map +1 -1
- package/dist/services/products.d.ts +9 -9
- package/dist/services/products.js +30 -30
- package/dist/services/products.js.map +1 -1
- package/dist/services/search.d.ts +13 -13
- package/dist/services/search.js +113 -113
- package/dist/services/search.js.map +1 -1
- package/dist/services/smartCollections.d.ts +5 -5
- package/dist/services/smartCollections.js +44 -44
- package/dist/services/smartCollections.js.map +1 -1
- package/dist/utils/customTagsFilters.d.ts +4 -4
- package/dist/utils/customTagsFilters.js +9 -9
- package/dist/utils/customTagsFilters.js.map +1 -1
- package/dist/utils/getCacheSettings.d.ts +16 -16
- package/dist/utils/getCacheSettings.js +25 -25
- package/dist/utils/getCacheSettings.js.map +1 -1
- package/dist/utils/getInternalURL.d.ts +1 -1
- package/dist/utils/getInternalURL.js +7 -7
- package/dist/utils/getInternalURL.js.map +1 -1
- package/dist/utils/getLSVectorSearch.d.ts +4 -4
- package/dist/utils/getLSVectorSearch.js +8 -8
- package/dist/utils/getLSVectorSearch.js.map +1 -1
- package/dist/utils/useDragToSelect.d.ts +13 -13
- package/dist/utils/useDragToSelect.js +172 -172
- package/dist/utils/useDragToSelect.js.map +1 -1
- package/dist/utils/useProductsPerRow.d.ts +3 -3
- package/dist/utils/useProductsPerRow.js +18 -18
- package/dist/utils/useProductsPerRow.js.map +1 -1
- package/package.json +64 -64
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
.fsCheckbox {
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
padding: 0 5px 0 0;
|
|
5
|
-
margin-top: 5px;
|
|
6
|
-
margin-bottom: 5px;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
-webkit-user-select: none;
|
|
9
|
-
-moz-user-select: none;
|
|
10
|
-
-ms-user-select: none;
|
|
11
|
-
user-select: none;
|
|
12
|
-
font-family: Arial, serif;
|
|
13
|
-
animation: growDown 300ms ease forwards;
|
|
14
|
-
align-items: center;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.fsCheckbox input {
|
|
18
|
-
position: fixed;
|
|
19
|
-
opacity: 0;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
height: 0;
|
|
22
|
-
width: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.checkmark {
|
|
26
|
-
min-height: 16px;
|
|
27
|
-
min-width: 16px;
|
|
28
|
-
background-color: #eee;
|
|
29
|
-
margin-right: 10px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.fsCheckbox:hover input ~ .checkmark {
|
|
33
|
-
background-color: #d00202cf;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.fsCheckbox input:checked ~ .checkmark {
|
|
37
|
-
background-color: white;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.fsCheckbox input:checked ~ .checkmark:after {
|
|
41
|
-
display: block;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.fsCheckboxx .checkmark:after {
|
|
45
|
-
left: 5px;
|
|
46
|
-
width: 4px;
|
|
47
|
-
height: 9px;
|
|
48
|
-
border: solid white;
|
|
49
|
-
border-width: 0 2px 2px 0;
|
|
50
|
-
-webkit-transform: rotate(45deg);
|
|
51
|
-
-ms-transform: rotate(45deg);
|
|
52
|
-
transform: rotate(45deg);
|
|
53
|
-
}
|
|
54
|
-
.fsSelectedCheckboxTrue{}
|
|
55
|
-
.fsSelectedCheckboxFalse{}
|
|
56
|
-
|
|
57
|
-
@keyframes growDown {
|
|
58
|
-
0% {
|
|
59
|
-
transform: scaleY(0)
|
|
60
|
-
}
|
|
61
|
-
80% {
|
|
62
|
-
transform: scaleY(1.1)
|
|
63
|
-
}
|
|
64
|
-
100% {
|
|
65
|
-
transform: scaleY(1)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.checkbox {
|
|
70
|
-
display: flex;
|
|
71
|
-
position: relative;
|
|
72
|
-
padding: 0 5px 0 0;
|
|
73
|
-
margin-top: 5px;
|
|
74
|
-
margin-bottom: 5px;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
-webkit-user-select: none;
|
|
77
|
-
-moz-user-select: none;
|
|
78
|
-
-ms-user-select: none;
|
|
79
|
-
user-select: none;
|
|
80
|
-
font-family: Arial, serif;
|
|
81
|
-
animation: growDown 300ms ease forwards;
|
|
82
|
-
align-items: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.checkbox .checkboxLabel {
|
|
86
|
-
align-self: start;
|
|
87
|
-
text-transform: capitalize;
|
|
88
|
-
display: flex;
|
|
89
|
-
line-height: 20px;
|
|
90
|
-
align-items: center;
|
|
91
|
-
margin-top: 2px;
|
|
92
|
-
width: -webkit-fill-available;
|
|
93
|
-
justify-content: space-between;
|
|
94
|
-
text-overflow: ellipsis;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.checkbox input {
|
|
99
|
-
position: fixed;
|
|
100
|
-
opacity: 0;
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
height: 0;
|
|
103
|
-
width: 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.checkmark {
|
|
107
|
-
min-height: 16px;
|
|
108
|
-
min-width: 16px;
|
|
109
|
-
background-color: #eee;
|
|
110
|
-
margin-right: 10px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.checkbox:hover input ~ .checkmark {
|
|
114
|
-
background-color: #ccc;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.checkbox input:checked ~ .checkmark {
|
|
118
|
-
background-color: #000000;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.checkmark:after {
|
|
122
|
-
content: "";
|
|
123
|
-
position: absolute;
|
|
124
|
-
display: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.checkbox input:checked ~ .checkmark:after {
|
|
128
|
-
display: block;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.checkbox .checkmark:after {
|
|
132
|
-
left: 5px;
|
|
133
|
-
width: 4px;
|
|
134
|
-
height: 9px;
|
|
135
|
-
border: solid white;
|
|
136
|
-
border-width: 0 2px 2px 0;
|
|
137
|
-
-webkit-transform: rotate(45deg);
|
|
138
|
-
-ms-transform: rotate(45deg);
|
|
139
|
-
transform: rotate(45deg);
|
|
140
|
-
}
|
|
141
|
-
:global(.modal-mobile-filters .fs-serp-filter-count, .modal-mobile-filters .fsSerpCheckmark) {
|
|
142
|
-
display: none;
|
|
1
|
+
.fsCheckbox {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
padding: 0 5px 0 0;
|
|
5
|
+
margin-top: 5px;
|
|
6
|
+
margin-bottom: 5px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
-ms-user-select: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
font-family: Arial, serif;
|
|
13
|
+
animation: growDown 300ms ease forwards;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fsCheckbox input {
|
|
18
|
+
position: fixed;
|
|
19
|
+
opacity: 0;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
height: 0;
|
|
22
|
+
width: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.checkmark {
|
|
26
|
+
min-height: 16px;
|
|
27
|
+
min-width: 16px;
|
|
28
|
+
background-color: #eee;
|
|
29
|
+
margin-right: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.fsCheckbox:hover input ~ .checkmark {
|
|
33
|
+
background-color: #d00202cf;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.fsCheckbox input:checked ~ .checkmark {
|
|
37
|
+
background-color: white;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.fsCheckbox input:checked ~ .checkmark:after {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.fsCheckboxx .checkmark:after {
|
|
45
|
+
left: 5px;
|
|
46
|
+
width: 4px;
|
|
47
|
+
height: 9px;
|
|
48
|
+
border: solid white;
|
|
49
|
+
border-width: 0 2px 2px 0;
|
|
50
|
+
-webkit-transform: rotate(45deg);
|
|
51
|
+
-ms-transform: rotate(45deg);
|
|
52
|
+
transform: rotate(45deg);
|
|
53
|
+
}
|
|
54
|
+
.fsSelectedCheckboxTrue{}
|
|
55
|
+
.fsSelectedCheckboxFalse{}
|
|
56
|
+
|
|
57
|
+
@keyframes growDown {
|
|
58
|
+
0% {
|
|
59
|
+
transform: scaleY(0)
|
|
60
|
+
}
|
|
61
|
+
80% {
|
|
62
|
+
transform: scaleY(1.1)
|
|
63
|
+
}
|
|
64
|
+
100% {
|
|
65
|
+
transform: scaleY(1)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.checkbox {
|
|
70
|
+
display: flex;
|
|
71
|
+
position: relative;
|
|
72
|
+
padding: 0 5px 0 0;
|
|
73
|
+
margin-top: 5px;
|
|
74
|
+
margin-bottom: 5px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
-webkit-user-select: none;
|
|
77
|
+
-moz-user-select: none;
|
|
78
|
+
-ms-user-select: none;
|
|
79
|
+
user-select: none;
|
|
80
|
+
font-family: Arial, serif;
|
|
81
|
+
animation: growDown 300ms ease forwards;
|
|
82
|
+
align-items: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.checkbox .checkboxLabel {
|
|
86
|
+
align-self: start;
|
|
87
|
+
text-transform: capitalize;
|
|
88
|
+
display: flex;
|
|
89
|
+
line-height: 20px;
|
|
90
|
+
align-items: center;
|
|
91
|
+
margin-top: 2px;
|
|
92
|
+
width: -webkit-fill-available;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
text-overflow: ellipsis;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.checkbox input {
|
|
99
|
+
position: fixed;
|
|
100
|
+
opacity: 0;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
height: 0;
|
|
103
|
+
width: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.checkmark {
|
|
107
|
+
min-height: 16px;
|
|
108
|
+
min-width: 16px;
|
|
109
|
+
background-color: #eee;
|
|
110
|
+
margin-right: 10px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.checkbox:hover input ~ .checkmark {
|
|
114
|
+
background-color: #ccc;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.checkbox input:checked ~ .checkmark {
|
|
118
|
+
background-color: #000000;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.checkmark:after {
|
|
122
|
+
content: "";
|
|
123
|
+
position: absolute;
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.checkbox input:checked ~ .checkmark:after {
|
|
128
|
+
display: block;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.checkbox .checkmark:after {
|
|
132
|
+
left: 5px;
|
|
133
|
+
width: 4px;
|
|
134
|
+
height: 9px;
|
|
135
|
+
border: solid white;
|
|
136
|
+
border-width: 0 2px 2px 0;
|
|
137
|
+
-webkit-transform: rotate(45deg);
|
|
138
|
+
-ms-transform: rotate(45deg);
|
|
139
|
+
transform: rotate(45deg);
|
|
140
|
+
}
|
|
141
|
+
:global(.modal-mobile-filters .fs-serp-filter-count, .modal-mobile-filters .fsSerpCheckmark) {
|
|
142
|
+
display: none;
|
|
143
143
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Facet } from "@fast-simon/utilities";
|
|
2
|
-
interface Props {
|
|
3
|
-
facet: Facet;
|
|
4
|
-
}
|
|
5
|
-
export declare function CheckboxFilter({ facet }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
1
|
+
import { Facet } from "@fast-simon/utilities";
|
|
2
|
+
interface Props {
|
|
3
|
+
facet: Facet;
|
|
4
|
+
}
|
|
5
|
+
export declare function CheckboxFilter({ facet }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Checkbox } from "./Checkbox/Checkbox";
|
|
3
|
-
export function CheckboxFilter({ facet }) {
|
|
4
|
-
const handleChange = (e) => {
|
|
5
|
-
console.log();
|
|
6
|
-
};
|
|
7
|
-
return (_jsx(Checkbox, Object.assign({ isChecked: true, ariaLabel: facet.name }, { children: _jsx("span", Object.assign({ className: "filters-option-text fs-serp-filter-text" }, { children: facet.name })) })));
|
|
8
|
-
}
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox } from "./Checkbox/Checkbox";
|
|
3
|
+
export function CheckboxFilter({ facet }) {
|
|
4
|
+
const handleChange = (e) => {
|
|
5
|
+
console.log();
|
|
6
|
+
};
|
|
7
|
+
return (_jsx(Checkbox, Object.assign({ isChecked: true, ariaLabel: facet.name }, { children: _jsx("span", Object.assign({ className: "filters-option-text fs-serp-filter-text" }, { children: facet.name })) })));
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=CheckboxFilter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxFilter.js","sourceRoot":"","sources":["../../../src/components/CheckboxFilter/CheckboxFilter.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAM7C,MAAM,UAAU,cAAc,CAAC,EAAC,KAAK,EAAQ;IACzC,MAAM,YAAY,GAAG,CAAC,CAAM,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,EAAE,CAAC;IAClB,CAAC,CAAA;IACD,OAAO,CACH,KAAC,QAAQ,kBAAC,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,gBAC5C,6BAAM,SAAS,EAAC,yCAAyC,gBAAE,KAAK,CAAC,IAAI,IAAQ,IACtE,CAClB,CAAA;AAED,CAAC","sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"CheckboxFilter.js","sourceRoot":"","sources":["../../../src/components/CheckboxFilter/CheckboxFilter.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAM7C,MAAM,UAAU,cAAc,CAAC,EAAC,KAAK,EAAQ;IACzC,MAAM,YAAY,GAAG,CAAC,CAAM,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,EAAE,CAAC;IAClB,CAAC,CAAA;IACD,OAAO,CACH,KAAC,QAAQ,kBAAC,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,gBAC5C,6BAAM,SAAS,EAAC,yCAAyC,gBAAE,KAAK,CAAC,IAAI,IAAQ,IACtE,CAClB,CAAA;AAED,CAAC","sourcesContent":["import React from 'react';\nimport {Facet} from \"@fast-simon/utilities\";\nimport classes from './styles.module.css';\nimport {Checkbox} from \"./Checkbox/Checkbox\";\n\ninterface Props {\n facet: Facet;\n}\n\nexport function CheckboxFilter({facet}: Props) {\n const handleChange = (e: any) => {\n console.log();\n }\n return (\n <Checkbox isChecked={true} ariaLabel={facet.name}>\n <span className=\"filters-option-text fs-serp-filter-text\">{facet.name}</span>\n </Checkbox>\n)\n\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.fs-switch-left-margin{
|
|
2
|
-
margin-left: 10px;
|
|
3
|
-
}
|
|
4
|
-
.fs-serp-filter-text {}
|
|
1
|
+
.fs-switch-left-margin{
|
|
2
|
+
margin-left: 10px;
|
|
3
|
+
}
|
|
4
|
+
.fs-serp-filter-text {}
|
|
5
5
|
.filters-option-text {}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { EditorProduct } from "../../@types/editorProduct";
|
|
3
|
-
export interface DndContextWrapperProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
onDragStart: ({ active }: {
|
|
6
|
-
active: any;
|
|
7
|
-
}) => void;
|
|
8
|
-
onDragEnd: ({ over, active }: {
|
|
9
|
-
over: any;
|
|
10
|
-
active: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
activeId: string | null;
|
|
13
|
-
findActiveProduct: (activeId: string) => EditorProduct | undefined;
|
|
14
|
-
selectedProductIds: Record<string, number>;
|
|
15
|
-
ProductCardComponent: React.ComponentType<any>;
|
|
16
|
-
SelectCardComponent: React.ComponentType<any>;
|
|
17
|
-
}
|
|
18
|
-
declare const DndContextWrapper: ({ children, onDragStart, onDragEnd, activeId, selectedProductIds, findActiveProduct, ProductCardComponent, SelectCardComponent }: DndContextWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export default DndContextWrapper;
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { EditorProduct } from "../../@types/editorProduct";
|
|
3
|
+
export interface DndContextWrapperProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onDragStart: ({ active }: {
|
|
6
|
+
active: any;
|
|
7
|
+
}) => void;
|
|
8
|
+
onDragEnd: ({ over, active }: {
|
|
9
|
+
over: any;
|
|
10
|
+
active: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
activeId: string | null;
|
|
13
|
+
findActiveProduct: (activeId: string) => EditorProduct | undefined;
|
|
14
|
+
selectedProductIds: Record<string, number>;
|
|
15
|
+
ProductCardComponent: React.ComponentType<any>;
|
|
16
|
+
SelectCardComponent: React.ComponentType<any>;
|
|
17
|
+
}
|
|
18
|
+
declare const DndContextWrapper: ({ children, onDragStart, onDragEnd, activeId, selectedProductIds, findActiveProduct, ProductCardComponent, SelectCardComponent }: DndContextWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default DndContextWrapper;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { closestCorners, defaultDropAnimationSideEffects, DndContext, DragOverlay, MouseSensor, useSensor, useSensors, } from "@dnd-kit/core";
|
|
3
|
-
import { isEditorProduct } from "../../@types/editorProduct";
|
|
4
|
-
const DndContextWrapper = ({ children, onDragStart, onDragEnd, activeId, selectedProductIds, findActiveProduct, ProductCardComponent, SelectCardComponent }) => {
|
|
5
|
-
const sensors = useSensors(useSensor(MouseSensor, {
|
|
6
|
-
activationConstraint: {
|
|
7
|
-
distance: 10,
|
|
8
|
-
},
|
|
9
|
-
}));
|
|
10
|
-
return (_jsx(_Fragment, { children: _jsxs(DndContext, Object.assign({ sensors: sensors, collisionDetection: closestCorners, onDragStart: onDragStart, onDragEnd: onDragEnd }, { children: [children, _jsx(DragOverlay, Object.assign({ style: {
|
|
11
|
-
boxShadow: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
12
|
-
zIndex: 9999999,
|
|
13
|
-
}, dropAnimation: {
|
|
14
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
15
|
-
keyframes: (parameters) => [{}],
|
|
16
|
-
sideEffects: defaultDropAnimationSideEffects({
|
|
17
|
-
styles: {
|
|
18
|
-
active: {
|
|
19
|
-
opacity: "0.5",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
}),
|
|
23
|
-
} }, { children: activeId &&
|
|
24
|
-
(Object.keys(selectedProductIds).length <= 1 &&
|
|
25
|
-
isEditorProduct(findActiveProduct(activeId)) ? (_jsx(ProductCardComponent, { isSelected: false, onClick: () => { }, product: findActiveProduct(activeId) })) : (_jsx(SelectCardComponent, { numSelected: (Object.keys(selectedProductIds).length) +
|
|
26
|
-
(activeId in selectedProductIds
|
|
27
|
-
? 0
|
|
28
|
-
: 1) }))) }))] })) }));
|
|
29
|
-
};
|
|
30
|
-
export default DndContextWrapper;
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { closestCorners, defaultDropAnimationSideEffects, DndContext, DragOverlay, MouseSensor, useSensor, useSensors, } from "@dnd-kit/core";
|
|
3
|
+
import { isEditorProduct } from "../../@types/editorProduct";
|
|
4
|
+
const DndContextWrapper = ({ children, onDragStart, onDragEnd, activeId, selectedProductIds, findActiveProduct, ProductCardComponent, SelectCardComponent }) => {
|
|
5
|
+
const sensors = useSensors(useSensor(MouseSensor, {
|
|
6
|
+
activationConstraint: {
|
|
7
|
+
distance: 10,
|
|
8
|
+
},
|
|
9
|
+
}));
|
|
10
|
+
return (_jsx(_Fragment, { children: _jsxs(DndContext, Object.assign({ sensors: sensors, collisionDetection: closestCorners, onDragStart: onDragStart, onDragEnd: onDragEnd }, { children: [children, _jsx(DragOverlay, Object.assign({ style: {
|
|
11
|
+
boxShadow: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
12
|
+
zIndex: 9999999,
|
|
13
|
+
}, dropAnimation: {
|
|
14
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
15
|
+
keyframes: (parameters) => [{}],
|
|
16
|
+
sideEffects: defaultDropAnimationSideEffects({
|
|
17
|
+
styles: {
|
|
18
|
+
active: {
|
|
19
|
+
opacity: "0.5",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
} }, { children: activeId &&
|
|
24
|
+
(Object.keys(selectedProductIds).length <= 1 &&
|
|
25
|
+
isEditorProduct(findActiveProduct(activeId)) ? (_jsx(ProductCardComponent, { isSelected: false, onClick: () => { }, product: findActiveProduct(activeId) })) : (_jsx(SelectCardComponent, { numSelected: (Object.keys(selectedProductIds).length) +
|
|
26
|
+
(activeId in selectedProductIds
|
|
27
|
+
? 0
|
|
28
|
+
: 1) }))) }))] })) }));
|
|
29
|
+
};
|
|
30
|
+
export default DndContextWrapper;
|
|
31
31
|
//# sourceMappingURL=DndContextWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DndContextWrapper.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/DndContextWrapper.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,cAAc,EACd,+BAA+B,EAC/B,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAa7D,MAAM,iBAAiB,GAAG,CAAC,EACI,QAAQ,EACR,WAAW,EACX,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACxB,EAAE,EAAE;IAE1B,MAAM,OAAO,GAAG,UAAU,CACxB,SAAS,CAAC,WAAW,EAAE;QACrB,oBAAoB,EAAE;YACpB,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CACH,CAAC;IAEJ,OAAO,CACH,4BACE,MAAC,UAAU,kBACP,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,cAAc,EAClC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,iBAEnB,QAAQ,EACT,KAAC,WAAW,kBACV,KAAK,EAAE;wBACL,SAAS,EAAE,qCAAqC;wBAChD,MAAM,EAAE,OAAO;qBAChB,EACD,aAAa,EAAE;wBACb,MAAM,EAAE,gCAAgC;wBACxC,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;wBAC/B,WAAW,EAAE,+BAA+B,CAAC;4BAC3C,MAAM,EAAE;gCACN,MAAM,EAAE;oCACN,OAAO,EAAE,KAAK;iCACf;6BACF;yBACF,CAAC;qBACH,gBAEA,QAAQ;wBACP,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,IAAI,CAAC;4BAC5C,eAAe,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,KAAC,oBAAoB,IACjB,UAAU,EAAE,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,EACjB,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAmB,GACtD,CACP,CAAC,CAAC,CAAC,CACC,KAAC,mBAAmB,IACjB,WAAW,EACT,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC;gCACxC,CAAC,QAAQ,IAAI,kBAAkB;oCAC7B,CAAC,CAAC,CAAC;oCACH,CAAC,CAAC,CAAC,CAAC,GAEZ,CACH,CAAC,IACQ,KACH,GACd,CACN,CAAC;AAEJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { ReactNode, useMemo, useState } from \"react\";\
|
|
1
|
+
{"version":3,"file":"DndContextWrapper.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/DndContextWrapper.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,cAAc,EACd,+BAA+B,EAC/B,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAa7D,MAAM,iBAAiB,GAAG,CAAC,EACI,QAAQ,EACR,WAAW,EACX,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACxB,EAAE,EAAE;IAE1B,MAAM,OAAO,GAAG,UAAU,CACxB,SAAS,CAAC,WAAW,EAAE;QACrB,oBAAoB,EAAE;YACpB,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CACH,CAAC;IAEJ,OAAO,CACH,4BACE,MAAC,UAAU,kBACP,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,cAAc,EAClC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,iBAEnB,QAAQ,EACT,KAAC,WAAW,kBACV,KAAK,EAAE;wBACL,SAAS,EAAE,qCAAqC;wBAChD,MAAM,EAAE,OAAO;qBAChB,EACD,aAAa,EAAE;wBACb,MAAM,EAAE,gCAAgC;wBACxC,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;wBAC/B,WAAW,EAAE,+BAA+B,CAAC;4BAC3C,MAAM,EAAE;gCACN,MAAM,EAAE;oCACN,OAAO,EAAE,KAAK;iCACf;6BACF;yBACF,CAAC;qBACH,gBAEA,QAAQ;wBACP,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,IAAI,CAAC;4BAC5C,eAAe,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,KAAC,oBAAoB,IACjB,UAAU,EAAE,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,EACjB,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAmB,GACtD,CACP,CAAC,CAAC,CAAC,CACC,KAAC,mBAAmB,IACjB,WAAW,EACT,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC;gCACxC,CAAC,QAAQ,IAAI,kBAAkB;oCAC7B,CAAC,CAAC,CAAC;oCACH,CAAC,CAAC,CAAC,CAAC,GAEZ,CACH,CAAC,IACQ,KACH,GACd,CACN,CAAC;AAEJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { ReactNode, useMemo, useState } from \"react\";\nimport {\n closestCorners,\n defaultDropAnimationSideEffects,\n DndContext,\n DragOverlay,\n MouseSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { EditorProduct } from \"../../@types/editorProduct\";\nimport { isEditorProduct } from \"../../@types/editorProduct\";\n\nexport interface DndContextWrapperProps {\n children: ReactNode;\n onDragStart: ({active}: {active: any}) => void;\n onDragEnd: ({over, active}: {over: any, active: any}) => void;\n activeId: string | null;\n findActiveProduct: (activeId: string) => EditorProduct | undefined;\n selectedProductIds: Record<string, number>;\n ProductCardComponent: React.ComponentType<any>;\n SelectCardComponent: React.ComponentType<any>;\n}\n\nconst DndContextWrapper = ({\n children,\n onDragStart,\n onDragEnd,\n activeId,\n selectedProductIds,\n findActiveProduct,\n ProductCardComponent,\n SelectCardComponent\n} : DndContextWrapperProps) => {\n\n const sensors = useSensors(\n useSensor(MouseSensor, {\n activationConstraint: {\n distance: 10,\n },\n }),\n );\n\n return (\n <>\n <DndContext\n sensors={sensors}\n collisionDetection={closestCorners}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\n >\n {children}\n <DragOverlay\n style={{\n boxShadow: \"0 25px 50px -12px rgb(0 0 0 / 0.25)\",\n zIndex: 9999999,\n }}\n dropAnimation={{\n easing: \"cubic-bezier(0.22, 1, 0.36, 1)\",\n keyframes: (parameters) => [{}],\n sideEffects: defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: \"0.5\",\n },\n },\n }),\n }}\n >\n {activeId &&\n (Object.keys(selectedProductIds).length <= 1 &&\n isEditorProduct(findActiveProduct(activeId)) ? (\n <ProductCardComponent\n isSelected={false}\n onClick={() => {}}\n product={findActiveProduct(activeId)! as EditorProduct}\n />\n ) : (\n <SelectCardComponent\n numSelected={\n (Object.keys(selectedProductIds).length) +\n (activeId in selectedProductIds\n ? 0\n : 1)\n }\n />\n ))}\n </DragOverlay>\n </DndContext>\n </>\n );\n\n};\n\nexport default DndContextWrapper;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
interface DroppableProps {
|
|
3
|
-
id: string;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
declare const Droppable: ({ id, children }: DroppableProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default Droppable;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface DroppableProps {
|
|
3
|
+
id: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const Droppable: ({ id, children }: DroppableProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Droppable;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDroppable } from "@dnd-kit/core";
|
|
3
|
-
const Droppable = ({ id, children }) => {
|
|
4
|
-
const { setNodeRef } = useDroppable({
|
|
5
|
-
id: id,
|
|
6
|
-
});
|
|
7
|
-
return (_jsx("div", Object.assign({ ref: setNodeRef, style: { width: '100%', height: '100%', position: 'relative' } }, { children: children })));
|
|
8
|
-
};
|
|
9
|
-
export default Droppable;
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useDroppable } from "@dnd-kit/core";
|
|
3
|
+
const Droppable = ({ id, children }) => {
|
|
4
|
+
const { setNodeRef } = useDroppable({
|
|
5
|
+
id: id,
|
|
6
|
+
});
|
|
7
|
+
return (_jsx("div", Object.assign({ ref: setNodeRef, style: { width: '100%', height: '100%', position: 'relative' } }, { children: children })));
|
|
8
|
+
};
|
|
9
|
+
export default Droppable;
|
|
10
10
|
//# sourceMappingURL=Droppable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Droppable.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/Droppable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAQ3C,MAAM,SAAS,GAAG,CAAC,EAAC,EAAE,EAAE,QAAQ,EAAiB,EAAE,EAAE;IACjD,MAAM,EAAC,UAAU,EAAC,GAAG,YAAY,CAAC;QAC9B,EAAE,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,OAAO,CACH,4BAAK,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAC,gBAC7E,QAAQ,IACP,CACT,CAAC;AACN,CAAC,CAAA;AAED,eAAe,SAAS,CAAA","sourcesContent":["import {useDroppable} from \"@dnd-kit/core\";\
|
|
1
|
+
{"version":3,"file":"Droppable.js","sourceRoot":"","sources":["../../../src/components/DragAndDrop/Droppable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAQ3C,MAAM,SAAS,GAAG,CAAC,EAAC,EAAE,EAAE,QAAQ,EAAiB,EAAE,EAAE;IACjD,MAAM,EAAC,UAAU,EAAC,GAAG,YAAY,CAAC;QAC9B,EAAE,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,OAAO,CACH,4BAAK,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAC,gBAC7E,QAAQ,IACP,CACT,CAAC;AACN,CAAC,CAAA;AAED,eAAe,SAAS,CAAA","sourcesContent":["import {useDroppable} from \"@dnd-kit/core\";\nimport { ReactNode } from \"react\";\n\ninterface DroppableProps {\n id: string;\n children: ReactNode;\n}\n\nconst Droppable = ({id, children}: DroppableProps) => {\n const {setNodeRef} = useDroppable({\n id: id,\n });\n\n return (\n <div ref={setNodeRef} style={{width: '100%', height: '100%', position: 'relative'}}>\n {children}\n </div>\n );\n}\n\nexport default Droppable"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { Narrow } from "@fast-simon/utilities";
|
|
3
|
-
interface Props {
|
|
4
|
-
id: string;
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
narrow: Narrow;
|
|
7
|
-
searchWithinResultsQuery?: string;
|
|
8
|
-
style?: Record<string, any>;
|
|
9
|
-
cssClass?: string | undefined;
|
|
10
|
-
index?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function SortableItem({ id, children, searchWithinResultsQuery, style, narrow, cssClass, index, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { Narrow } from "@fast-simon/utilities";
|
|
3
|
+
interface Props {
|
|
4
|
+
id: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
narrow: Narrow;
|
|
7
|
+
searchWithinResultsQuery?: string;
|
|
8
|
+
style?: Record<string, any>;
|
|
9
|
+
cssClass?: string | undefined;
|
|
10
|
+
index?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function SortableItem({ id, children, searchWithinResultsQuery, style, narrow, cssClass, index, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useSortable } from "@dnd-kit/sortable";
|
|
3
|
-
import { CSS } from "@dnd-kit/utilities";
|
|
4
|
-
import classes from "./styles.module.css";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
export function SortableItem({ id, children, searchWithinResultsQuery, style, narrow, cssClass, index, }) {
|
|
7
|
-
var _a;
|
|
8
|
-
const { attributes, listeners, setNodeRef, transform, transition, isDragging, isOver, isSorting, activeIndex, overIndex, active, over, } = useSortable({
|
|
9
|
-
id,
|
|
10
|
-
animateLayoutChanges: () => true,
|
|
11
|
-
disabled: !!searchWithinResultsQuery || !!Object.keys(narrow).length,
|
|
12
|
-
});
|
|
13
|
-
const activeId = active === null || active === void 0 ? void 0 : active.id;
|
|
14
|
-
const overId = over === null || over === void 0 ? void 0 : over.id;
|
|
15
|
-
const noOverlay = activeId === overId ||
|
|
16
|
-
(overId === null || overId === void 0 ? void 0 : overId.includes("_")) ||
|
|
17
|
-
overIndex === -1 ||
|
|
18
|
-
activeId.startsWith("related");
|
|
19
|
-
let isAfter = true;
|
|
20
|
-
if (overIndex < activeIndex || ((_a = active === null || active === void 0 ? void 0 : active.id) === null || _a === void 0 ? void 0 : _a.includes("_"))) {
|
|
21
|
-
isAfter = false;
|
|
22
|
-
}
|
|
23
|
-
let opacity = isDragging ? 0.5 : 1;
|
|
24
|
-
let zIndex = isDragging ? 10 : 0;
|
|
25
|
-
const combinedStyle = {
|
|
26
|
-
transition: transition,
|
|
27
|
-
transform: isSorting ? undefined : CSS.Translate.toString(transform),
|
|
28
|
-
zIndex: zIndex,
|
|
29
|
-
opacity: opacity,
|
|
30
|
-
width: "100%",
|
|
31
|
-
height: "100%",
|
|
32
|
-
outlineOffset: "2px",
|
|
33
|
-
borderRadius: "8px",
|
|
34
|
-
border: "1px solid #e0e0e0",
|
|
35
|
-
display: "flex",
|
|
36
|
-
};
|
|
37
|
-
return (_jsx("div", Object.assign({ "product-id": id, "product-index": index, className: cssClass, style: Object.assign({ display: "flex", position: "relative", height: "100%", width: "100%" }, style) }, { children: _jsx("div", Object.assign({ style: combinedStyle, className: clsx(isOver && !isDragging && !noOverlay && classes.over, isAfter ? classes.after : classes.before), ref: setNodeRef }, attributes, listeners, { children: children })) })));
|
|
38
|
-
}
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSortable } from "@dnd-kit/sortable";
|
|
3
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
4
|
+
import classes from "./styles.module.css";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
export function SortableItem({ id, children, searchWithinResultsQuery, style, narrow, cssClass, index, }) {
|
|
7
|
+
var _a;
|
|
8
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging, isOver, isSorting, activeIndex, overIndex, active, over, } = useSortable({
|
|
9
|
+
id,
|
|
10
|
+
animateLayoutChanges: () => true,
|
|
11
|
+
disabled: !!searchWithinResultsQuery || !!Object.keys(narrow).length,
|
|
12
|
+
});
|
|
13
|
+
const activeId = active === null || active === void 0 ? void 0 : active.id;
|
|
14
|
+
const overId = over === null || over === void 0 ? void 0 : over.id;
|
|
15
|
+
const noOverlay = activeId === overId ||
|
|
16
|
+
(overId === null || overId === void 0 ? void 0 : overId.includes("_")) ||
|
|
17
|
+
overIndex === -1 ||
|
|
18
|
+
activeId.startsWith("related");
|
|
19
|
+
let isAfter = true;
|
|
20
|
+
if (overIndex < activeIndex || ((_a = active === null || active === void 0 ? void 0 : active.id) === null || _a === void 0 ? void 0 : _a.includes("_"))) {
|
|
21
|
+
isAfter = false;
|
|
22
|
+
}
|
|
23
|
+
let opacity = isDragging ? 0.5 : 1;
|
|
24
|
+
let zIndex = isDragging ? 10 : 0;
|
|
25
|
+
const combinedStyle = {
|
|
26
|
+
transition: transition,
|
|
27
|
+
transform: isSorting ? undefined : CSS.Translate.toString(transform),
|
|
28
|
+
zIndex: zIndex,
|
|
29
|
+
opacity: opacity,
|
|
30
|
+
width: "100%",
|
|
31
|
+
height: "100%",
|
|
32
|
+
outlineOffset: "2px",
|
|
33
|
+
borderRadius: "8px",
|
|
34
|
+
border: "1px solid #e0e0e0",
|
|
35
|
+
display: "flex",
|
|
36
|
+
};
|
|
37
|
+
return (_jsx("div", Object.assign({ "product-id": id, "product-index": index, className: cssClass, style: Object.assign({ display: "flex", position: "relative", height: "100%", width: "100%" }, style) }, { children: _jsx("div", Object.assign({ style: combinedStyle, className: clsx(isOver && !isDragging && !noOverlay && classes.over, isAfter ? classes.after : classes.before), ref: setNodeRef }, attributes, listeners, { children: children })) })));
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=SortableItem.js.map
|