@blaze-cms/react-page-builder 0.113.0 → 0.114.0-alpha.0
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/CHANGELOG.md +11 -0
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +53 -20
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +8 -4
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/constants.js +13 -1
- package/lib/components/SearchFilter/constants.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-responsive-filter-classnames.js +29 -0
- package/lib/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -0
- package/lib/components/SearchFilter/helpers/index.js +8 -0
- package/lib/components/SearchFilter/helpers/index.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js +47 -21
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilterContainer.js +8 -4
- package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib-es/components/SearchFilter/constants.js +12 -1
- package/lib-es/components/SearchFilter/constants.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-responsive-filter-classnames.js +20 -0
- package/lib-es/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/index.js +2 -1
- package/lib-es/components/SearchFilter/helpers/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/SearchFilter/SearchFilter/SearchFilter.js +71 -25
- package/src/components/SearchFilter/SearchFilterContainer.js +8 -4
- package/src/components/SearchFilter/constants.js +14 -1
- package/src/components/SearchFilter/helpers/get-responsive-filter-classnames.js +22 -0
- package/src/components/SearchFilter/helpers/index.js +2 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/SearchFilter.test.js +29 -3
- package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/SearchFilter.test.js.snap +304 -6
package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/SearchFilter.test.js.snap
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`SearchFilter component when
|
|
3
|
+
exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop = 0 should render without throwing error and match snapshot 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<form
|
|
6
6
|
class=""
|
|
@@ -34,19 +34,317 @@ exports[`SearchFilter component when groupAfter > 0 should render without throwi
|
|
|
34
34
|
class="filter__wrapper filter__wrapper--search-refine"
|
|
35
35
|
>
|
|
36
36
|
<button
|
|
37
|
-
class="filter__more-filters-toggler"
|
|
37
|
+
class="filter__more-filters-mobile-toggler"
|
|
38
38
|
type="button"
|
|
39
39
|
>
|
|
40
|
-
|
|
40
|
+
Filters
|
|
41
41
|
</button>
|
|
42
42
|
<div
|
|
43
|
-
class="filter__more-filters-wrapper"
|
|
43
|
+
class="filter__more-filters-mobile-wrapper"
|
|
44
44
|
>
|
|
45
45
|
<div
|
|
46
|
-
class="filter__more-filters-content"
|
|
46
|
+
class="filter__more-filters-mobile-content"
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
class="filter__more-filters-desktop-wrapper"
|
|
50
|
+
>
|
|
51
|
+
<div
|
|
52
|
+
class="filter__more-filters-desktop-content"
|
|
53
|
+
/>
|
|
54
|
+
<div
|
|
55
|
+
class="filter__more-filters-desktop-buttons"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
class="filter__reset"
|
|
59
|
+
>
|
|
60
|
+
<button
|
|
61
|
+
class="icon-button icon-button--reset"
|
|
62
|
+
data-testid="reset-icon"
|
|
63
|
+
title="reset--button"
|
|
64
|
+
type="button"
|
|
65
|
+
>
|
|
66
|
+
<i
|
|
67
|
+
class="fas fa-redo-alt"
|
|
68
|
+
/>
|
|
69
|
+
</button>
|
|
70
|
+
<div
|
|
71
|
+
data-testid="reset-button"
|
|
72
|
+
role="button"
|
|
73
|
+
>
|
|
74
|
+
Reset all filters
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<button
|
|
78
|
+
class="button button--full-width"
|
|
79
|
+
type="submit"
|
|
80
|
+
>
|
|
81
|
+
Search
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div
|
|
87
|
+
class="filter__more-filters-mobile-buttons"
|
|
88
|
+
>
|
|
89
|
+
<div
|
|
90
|
+
class="filter__reset"
|
|
91
|
+
>
|
|
92
|
+
<button
|
|
93
|
+
class="icon-button icon-button--reset"
|
|
94
|
+
data-testid="reset-icon"
|
|
95
|
+
title="reset--button"
|
|
96
|
+
type="button"
|
|
97
|
+
>
|
|
98
|
+
<i
|
|
99
|
+
class="fas fa-redo-alt"
|
|
100
|
+
/>
|
|
101
|
+
</button>
|
|
102
|
+
<div
|
|
103
|
+
data-testid="reset-button"
|
|
104
|
+
role="button"
|
|
105
|
+
>
|
|
106
|
+
Reset all filters
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
<button
|
|
110
|
+
class="button button--full-width"
|
|
111
|
+
type="submit"
|
|
112
|
+
>
|
|
113
|
+
Search
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<br />
|
|
118
|
+
<button
|
|
119
|
+
class="button button--full-width"
|
|
120
|
+
type="submit"
|
|
121
|
+
>
|
|
122
|
+
Search
|
|
123
|
+
</button>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</form>
|
|
127
|
+
</DocumentFragment>
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
exports[`SearchFilter component when groupAfterMobile = 0 and groupAfterDesktop > 0 should render without throwing error and match snapshot 1`] = `
|
|
131
|
+
<DocumentFragment>
|
|
132
|
+
<form
|
|
133
|
+
class=""
|
|
134
|
+
data-testid="filter-test-form"
|
|
135
|
+
id="filter-test-form"
|
|
136
|
+
>
|
|
137
|
+
<div
|
|
138
|
+
class="filter filter--search-refine"
|
|
139
|
+
>
|
|
140
|
+
<div
|
|
141
|
+
class="filter__reset"
|
|
142
|
+
>
|
|
143
|
+
<button
|
|
144
|
+
class="icon-button icon-button--reset"
|
|
145
|
+
data-testid="reset-icon"
|
|
146
|
+
title="reset--button"
|
|
147
|
+
type="button"
|
|
148
|
+
>
|
|
149
|
+
<i
|
|
150
|
+
class="fas fa-redo-alt"
|
|
151
|
+
/>
|
|
152
|
+
</button>
|
|
153
|
+
<div
|
|
154
|
+
data-testid="reset-button"
|
|
155
|
+
role="button"
|
|
156
|
+
>
|
|
157
|
+
Reset all filters
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div
|
|
161
|
+
class="filter__wrapper filter__wrapper--search-refine"
|
|
162
|
+
>
|
|
163
|
+
<div
|
|
164
|
+
class="filter__more-filters-mobile-wrapper"
|
|
165
|
+
>
|
|
166
|
+
<div
|
|
167
|
+
class="filter__more-filters-mobile-content"
|
|
168
|
+
>
|
|
169
|
+
<button
|
|
170
|
+
class="filter__more-filters-desktop-toggler"
|
|
171
|
+
type="button"
|
|
172
|
+
>
|
|
173
|
+
More filters
|
|
174
|
+
</button>
|
|
175
|
+
<div
|
|
176
|
+
class="filter__more-filters-desktop-wrapper"
|
|
177
|
+
>
|
|
178
|
+
<div
|
|
179
|
+
class="filter__more-filters-desktop-content"
|
|
180
|
+
/>
|
|
181
|
+
<div
|
|
182
|
+
class="filter__more-filters-desktop-buttons"
|
|
183
|
+
>
|
|
184
|
+
<div
|
|
185
|
+
class="filter__reset"
|
|
186
|
+
>
|
|
187
|
+
<button
|
|
188
|
+
class="icon-button icon-button--reset"
|
|
189
|
+
data-testid="reset-icon"
|
|
190
|
+
title="reset--button"
|
|
191
|
+
type="button"
|
|
192
|
+
>
|
|
193
|
+
<i
|
|
194
|
+
class="fas fa-redo-alt"
|
|
195
|
+
/>
|
|
196
|
+
</button>
|
|
197
|
+
<div
|
|
198
|
+
data-testid="reset-button"
|
|
199
|
+
role="button"
|
|
200
|
+
>
|
|
201
|
+
Reset all filters
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
<button
|
|
205
|
+
class="button button--full-width"
|
|
206
|
+
type="submit"
|
|
207
|
+
>
|
|
208
|
+
Search
|
|
209
|
+
</button>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div
|
|
214
|
+
class="filter__more-filters-mobile-buttons"
|
|
215
|
+
>
|
|
216
|
+
<div
|
|
217
|
+
class="filter__reset"
|
|
218
|
+
>
|
|
219
|
+
<button
|
|
220
|
+
class="icon-button icon-button--reset"
|
|
221
|
+
data-testid="reset-icon"
|
|
222
|
+
title="reset--button"
|
|
223
|
+
type="button"
|
|
224
|
+
>
|
|
225
|
+
<i
|
|
226
|
+
class="fas fa-redo-alt"
|
|
227
|
+
/>
|
|
228
|
+
</button>
|
|
229
|
+
<div
|
|
230
|
+
data-testid="reset-button"
|
|
231
|
+
role="button"
|
|
232
|
+
>
|
|
233
|
+
Reset all filters
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
<button
|
|
237
|
+
class="button button--full-width"
|
|
238
|
+
type="submit"
|
|
239
|
+
>
|
|
240
|
+
Search
|
|
241
|
+
</button>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
<br />
|
|
245
|
+
<button
|
|
246
|
+
class="button button--full-width"
|
|
247
|
+
type="submit"
|
|
248
|
+
>
|
|
249
|
+
Search
|
|
250
|
+
</button>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</form>
|
|
254
|
+
</DocumentFragment>
|
|
255
|
+
`;
|
|
256
|
+
|
|
257
|
+
exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop > 0 should render without throwing error and match snapshot 1`] = `
|
|
258
|
+
<DocumentFragment>
|
|
259
|
+
<form
|
|
260
|
+
class=""
|
|
261
|
+
data-testid="filter-test-form"
|
|
262
|
+
id="filter-test-form"
|
|
263
|
+
>
|
|
264
|
+
<div
|
|
265
|
+
class="filter filter--search-refine"
|
|
266
|
+
>
|
|
267
|
+
<div
|
|
268
|
+
class="filter__reset"
|
|
269
|
+
>
|
|
270
|
+
<button
|
|
271
|
+
class="icon-button icon-button--reset"
|
|
272
|
+
data-testid="reset-icon"
|
|
273
|
+
title="reset--button"
|
|
274
|
+
type="button"
|
|
275
|
+
>
|
|
276
|
+
<i
|
|
277
|
+
class="fas fa-redo-alt"
|
|
47
278
|
/>
|
|
279
|
+
</button>
|
|
280
|
+
<div
|
|
281
|
+
data-testid="reset-button"
|
|
282
|
+
role="button"
|
|
283
|
+
>
|
|
284
|
+
Reset all filters
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
<div
|
|
288
|
+
class="filter__wrapper filter__wrapper--search-refine"
|
|
289
|
+
>
|
|
290
|
+
<button
|
|
291
|
+
class="filter__more-filters-mobile-toggler"
|
|
292
|
+
type="button"
|
|
293
|
+
>
|
|
294
|
+
Filters
|
|
295
|
+
</button>
|
|
296
|
+
<div
|
|
297
|
+
class="filter__more-filters-mobile-wrapper"
|
|
298
|
+
>
|
|
299
|
+
<div
|
|
300
|
+
class="filter__more-filters-mobile-content"
|
|
301
|
+
>
|
|
302
|
+
<button
|
|
303
|
+
class="filter__more-filters-desktop-toggler"
|
|
304
|
+
type="button"
|
|
305
|
+
>
|
|
306
|
+
More filters
|
|
307
|
+
</button>
|
|
308
|
+
<div
|
|
309
|
+
class="filter__more-filters-desktop-wrapper"
|
|
310
|
+
>
|
|
311
|
+
<div
|
|
312
|
+
class="filter__more-filters-desktop-content"
|
|
313
|
+
/>
|
|
314
|
+
<div
|
|
315
|
+
class="filter__more-filters-desktop-buttons"
|
|
316
|
+
>
|
|
317
|
+
<div
|
|
318
|
+
class="filter__reset"
|
|
319
|
+
>
|
|
320
|
+
<button
|
|
321
|
+
class="icon-button icon-button--reset"
|
|
322
|
+
data-testid="reset-icon"
|
|
323
|
+
title="reset--button"
|
|
324
|
+
type="button"
|
|
325
|
+
>
|
|
326
|
+
<i
|
|
327
|
+
class="fas fa-redo-alt"
|
|
328
|
+
/>
|
|
329
|
+
</button>
|
|
330
|
+
<div
|
|
331
|
+
data-testid="reset-button"
|
|
332
|
+
role="button"
|
|
333
|
+
>
|
|
334
|
+
Reset all filters
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
<button
|
|
338
|
+
class="button button--full-width"
|
|
339
|
+
type="submit"
|
|
340
|
+
>
|
|
341
|
+
Search
|
|
342
|
+
</button>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
48
346
|
<div
|
|
49
|
-
class="filter__more-filters-buttons"
|
|
347
|
+
class="filter__more-filters-mobile-buttons"
|
|
50
348
|
>
|
|
51
349
|
<div
|
|
52
350
|
class="filter__reset"
|