@fast-simon/dashboard-utilities 1.0.102 → 1.0.103
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/components/CheckboxFilter/Checkbox/styles.module.css +143 -0
- package/dist/components/FromToFilter/From/styles.module.css +9 -0
- package/dist/components/FromToFilter/To/styles.module.css +9 -0
- package/dist/components/RadioFilter/Radio/styles.module.css +145 -0
- package/dist/index.css +13 -0
- package/dist/services/landingPageTest.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +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;
|
|
143
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
border-radius: 18px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.checkbox:hover input ~ .checkmark {
|
|
115
|
+
background-color: #ccc;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.checkbox input:checked ~ .checkmark {
|
|
119
|
+
background-color: #000000;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.checkmark:after {
|
|
123
|
+
content: "";
|
|
124
|
+
position: absolute;
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.checkbox input:checked ~ .checkmark:after {
|
|
129
|
+
display: block;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.checkbox .checkmark:after {
|
|
133
|
+
left: 5px;
|
|
134
|
+
width: 3px;
|
|
135
|
+
height: 8px;
|
|
136
|
+
top: 5px;
|
|
137
|
+
border: solid white;
|
|
138
|
+
border-width: 0 2px 2px 0;
|
|
139
|
+
-webkit-transform: rotate(45deg);
|
|
140
|
+
-ms-transform: rotate(45deg);
|
|
141
|
+
transform: rotate(45deg);
|
|
142
|
+
}
|
|
143
|
+
:global(.modal-mobile-filters .fs-serp-filter-count, .modal-mobile-filters .fsSerpCheckmark) {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
package/dist/index.css
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landingPageTest.js","sourceRoot":"","sources":["../../src/services/landingPageTest.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAM,YAAY,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,YAAY,EAAc,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"landingPageTest.js","sourceRoot":"","sources":["../../src/services/landingPageTest.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAM,YAAY,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,YAAY,EAAc,MAAM,uBAAuB,CAAA;AAkD/D,2HAA2H;AAC3H,MAAM,QAAQ,GAAE,kEAAkE,CAAC;AAiBnF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,WAAW,EAAE,CAAO,EAChB,IAAI,EACJ,OAAO,EACP,WAAW,EACX,IAAI,GAAG,CAAC,EACR,MAAM,GAAG,WAAW,EACpB,MAAM,GAAG,IAAI,EACb,MAAM,EACN,eAAe,EACf,qBAAqB,GAAG,SAAS,EACj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AAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACzE,CAAC,CAAA;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAgB,EAAE,gBAAyB,EAAE,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type {SortBy} from \"../@types/sortBy\";\nimport type {Narrow, ServerNarrow} from \"@fast-simon/utilities\";\nimport {API, fastSimonGet} from \"./API\";\nimport {FacetsParser, ServerFacet} from \"@fast-simon/utilities\"\nimport {AncestorCategory} from \"../@types/categories\";\nimport {EditorProduct} from \"../@types/editorProduct\";\ninterface LandingPageRequest {\n uuid: string;\n storeID: string;\n landingPage: string\n type: number\n page?: number\n sortBy?: SortBy\n facets?: boolean\n narrow?: Narrow\n productsPerPage?: number\n withProductAttributes?: boolean\n searchWithinResultsQuery?: string\n idsOnly?: boolean\n}\ninterface LandingPageFacetsOnly extends Omit<LandingPageRequest, \"facets\"> {\n avoid_tag_prefixes?: string\n}\n\ninterface LandingPageServerResponseFacetsOnly {\n total_results: number\n term: string\n narrow?: ServerNarrow\n facets_completed: true\n facets: ServerFacet[],\n}\n\ninterface LandingPageServerResponseAll {\n items: EditorProduct[]\n alternatives?: string[]\n facets_completed: boolean\n narrow?: ServerNarrow[]\n p: number\n total_p: number\n total_results: number\n term: string\n lp_slug: string\n title: string\n index_page: number\n banner_html: string\n banner_html_mobile: string\n facets: ServerFacet[]\n sort_by: SortBy\n avoid_tag_prefixes?: string\n cms_number_found?: number\n within_search_results_for?: string,\n ancestor_categories?: AncestorCategory[]\n}\n//Todo: change the url back to- import.meta.env.VITE_SERVING_BASE_URL ?? \"https://internal-v3joil6oqa-uc.a.run.app/search\";\nconst BASE_URL =\"https://ys1testlpmerch---internal-v3joil6oqa-uc.a.run.app/search\";\n\ninterface LandingPageResponse {\n items: EditorProduct[]\n facets_completed: boolean\n narrow?: Narrow[]\n p: number\n total_p: number\n isp_quick_view_mode: number\n related_results: boolean\n total_results: number\n lp_slug: string\n title: string\n facets: ServerFacet[]\n sort_by: SortBy\n avoid_tag_prefixes?: string\n}\nexport const LandingPageTest = {\n landingPage: async ({\n uuid,\n storeID,\n landingPage,\n page = 1,\n sortBy = \"relevency\",\n facets = true,\n narrow,\n productsPerPage,\n withProductAttributes = undefined,\n searchWithinResultsQuery,\n type,\n visualMerchandising,\n merchandisingRules,\n idsOnly,\n }: any) => {\n const params: Record<string, any> = {\n UUID: uuid,\n store_id: storeID,\n facets_required: facets ? 1 : 0,\n products_per_page: productsPerPage,\n narrow: JSON.stringify(narrow),\n lp: landingPage,\n page_num: page,\n type: type,\n with_product_attributes: withProductAttributes,\n search_within_search: searchWithinResultsQuery\n ? searchWithinResultsQuery\n : undefined,\n visual_merchandising:\n type == 0\n ? JSON.stringify(visualMerchandising)\n .replaceAll('\"[', \"[\")\n .replaceAll(']\"', \"]\")\n : undefined,\n m: 1,\n merchandising_rules:\n type == 1 ? JSON.stringify(merchandisingRules) : undefined,\n ids_only: idsOnly ? 1 : undefined,\n };\n const res = await fastSimonGet<LandingPageResponse>(\n BASE_URL,\n \"landing_page_editor\",\n params\n );\n return {\n data: res,\n getFacets: async () =>\n res?.facets_completed\n ? transformFacetsOnlyData(\n res.facets,\n res.avoid_tag_prefixes\n )\n : await LandingPageTest.landingPageFacetsOnly({\n uuid,\n storeID,\n landingPage,\n page,\n narrow,\n type,\n productsPerPage,\n searchWithinResultsQuery,\n withProductAttributes,\n visualMerchandising,\n merchandisingRules,\n }),\n };\n },\n\n landingPageFacetsOnly: async ({\n uuid,\n storeID,\n landingPage,\n page = 1,\n narrow,\n type,\n productsPerPage,\n searchWithinResultsQuery,\n withProductAttributes = false,\n visualMerchandising,\n merchandisingRules\n }: any) => {\n const data = await fastSimonGet<LandingPageServerResponseAll>(\n BASE_URL,\n \"landing_page_editor\",\n {\n UUID: uuid,\n store_id: storeID,\n facets_required: 2,\n products_per_page: productsPerPage,\n narrow: JSON.stringify(narrow),\n type: type,\n lp: landingPage,\n page_num: page ?? 1,\n with_product_attributes: withProductAttributes,\n search_within_search: searchWithinResultsQuery\n ? searchWithinResultsQuery\n : undefined,\n visual_merchandising:\n JSON.stringify(visualMerchandising)\n .replaceAll('\"[', \"[\")\n .replaceAll(']\"', \"]\"),\n merchandising_rules: merchandisingRules\n ? JSON.stringify(merchandisingRules)\n : undefined,\n m: 1,\n }\n );\n return transformFacetsOnlyData(data.facets, data.avoid_tag_prefixes);\n },\n};\n\nexport const transformFacetsOnlyData = (r: ServerFacet[], avoidTagPrefixes?: string) => new FacetsParser().parseFacets(r, avoidTagPrefixes ? avoidTagPrefixes.split(\",\") : []);"]}
|