@blaze-cms/react-page-builder 0.114.1 → 0.116.0-alpha.2
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 +35 -0
- package/lib/components/CarouselWrapper.js +4 -6
- package/lib/components/CarouselWrapper.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +3 -3
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib/components/Menu/Menu.js +3 -3
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/CloseMobileForm.js +3 -2
- package/lib/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/ResetDesktopForm.js +3 -3
- package/lib/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -1
- package/lib/components/SearchFilter/components/Checkbox.js +7 -13
- package/lib/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib/components/SearchFilter/components/TextSearch.js +3 -3
- package/lib/components/SearchFilter/components/TextSearch.js.map +1 -1
- package/lib/components/SearchFilter/constants.js +1 -5
- package/lib/components/SearchFilter/constants.js.map +1 -1
- package/lib/components/SocialFollow/SFItem.js +2 -4
- package/lib/components/SocialFollow/SFItem.js.map +1 -1
- package/lib/components/SocialFollow/sf.config.js +9 -6
- package/lib/components/SocialFollow/sf.config.js.map +1 -1
- package/lib/components/TextBlock/index.js +8 -8
- package/lib/components/TextBlock/index.js.map +1 -1
- package/lib/constants/index.js +6 -2
- package/lib/constants/index.js.map +1 -1
- package/lib/helpers/index.js +8 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/parse-TextBlock.js +65 -0
- package/lib/helpers/parse-TextBlock.js.map +1 -0
- package/lib-es/components/CarouselWrapper.js +3 -6
- package/lib-es/components/CarouselWrapper.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js +2 -3
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib-es/components/Menu/Menu.js +2 -3
- package/lib-es/components/Menu/Menu.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/CloseMobileForm.js +2 -2
- package/lib-es/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/ResetDesktopForm.js +2 -3
- package/lib-es/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Checkbox.js +7 -12
- package/lib-es/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib-es/components/SearchFilter/components/TextSearch.js +2 -3
- package/lib-es/components/SearchFilter/components/TextSearch.js.map +1 -1
- package/lib-es/components/SearchFilter/constants.js +1 -3
- package/lib-es/components/SearchFilter/constants.js.map +1 -1
- package/lib-es/components/SocialFollow/SFItem.js +2 -4
- package/lib-es/components/SocialFollow/SFItem.js.map +1 -1
- package/lib-es/components/SocialFollow/sf.config.js +7 -6
- package/lib-es/components/SocialFollow/sf.config.js.map +1 -1
- package/lib-es/components/TextBlock/index.js +7 -7
- package/lib-es/components/TextBlock/index.js.map +1 -1
- package/lib-es/constants/index.js +3 -1
- package/lib-es/constants/index.js.map +1 -1
- package/lib-es/helpers/index.js +1 -0
- package/lib-es/helpers/index.js.map +1 -1
- package/lib-es/helpers/parse-TextBlock.js +34 -0
- package/lib-es/helpers/parse-TextBlock.js.map +1 -0
- package/package.json +4 -4
- package/src/components/CarouselWrapper.js +7 -2
- package/src/components/Image/GlobalLightbox/GlobalLightbox.js +4 -1
- package/src/components/Menu/Menu.js +4 -1
- package/src/components/SearchFilter/SearchFilter/CloseMobileForm.js +3 -2
- package/src/components/SearchFilter/SearchFilter/ResetDesktopForm.js +4 -1
- package/src/components/SearchFilter/components/Checkbox.js +17 -5
- package/src/components/SearchFilter/components/TextSearch.js +4 -1
- package/src/components/SearchFilter/constants.js +0 -4
- package/src/components/SocialFollow/SFItem.js +4 -2
- package/src/components/SocialFollow/sf.config.js +15 -6
- package/src/components/TextBlock/index.js +6 -6
- package/src/constants/index.js +6 -1
- package/src/helpers/index.js +1 -0
- package/src/helpers/parse-TextBlock.js +29 -0
- package/tests/unit/src/components/Image/GlobalLightbox/__snapshots__/GlobalLightbox.test.js.snap +15 -3
- package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/CloseMobileForm.test.js.snap +17 -2
- package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/ResetDesktopForm.test.js.snap +15 -3
- package/tests/unit/src/components/SearchFilter/SearchFilter/__snapshots__/SearchFilter.test.js.snap +196 -49
- package/tests/unit/src/components/SearchFilter/components/__snapshots__/TextSearch.test.js.snap +18 -4
- package/tests/unit/src/components/SocialFollow/__snapshots__/SFItem.test.js.snap +15 -3
- package/tests/unit/src/components/SocialFollow/__snapshots__/SocialFollow.test.js.snap +30 -6
- package/tests/unit/src/components/TextBlock/TextBlock.test.js +3 -4
- package/tests/unit/src/components/TextBlock/__snapshots__/TextBlock.test.js.snap +44 -12
- package/tests/unit/src/helpers/__snapshots__/parse-textBlock.test.js.snap +14 -0
- package/tests/unit/src/helpers/parse-textBlock.test.js +26 -0
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 groupAfterMobile
|
|
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=""
|
|
@@ -19,9 +19,21 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
19
19
|
title="reset--button"
|
|
20
20
|
type="button"
|
|
21
21
|
>
|
|
22
|
-
<i
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<i>
|
|
23
|
+
<svg
|
|
24
|
+
fill="currentColor"
|
|
25
|
+
height="1em"
|
|
26
|
+
stroke="currentColor"
|
|
27
|
+
stroke-width="0"
|
|
28
|
+
viewBox="0 0 512 512"
|
|
29
|
+
width="1em"
|
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
+
>
|
|
32
|
+
<path
|
|
33
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
</i>
|
|
25
37
|
</button>
|
|
26
38
|
<div
|
|
27
39
|
data-testid="reset-button"
|
|
@@ -33,18 +45,18 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
33
45
|
<div
|
|
34
46
|
class="filter__wrapper filter__wrapper--search-refine"
|
|
35
47
|
>
|
|
36
|
-
<button
|
|
37
|
-
class="filter__more-filters-mobile-toggler"
|
|
38
|
-
type="button"
|
|
39
|
-
>
|
|
40
|
-
Filters
|
|
41
|
-
</button>
|
|
42
48
|
<div
|
|
43
49
|
class="filter__more-filters-mobile-wrapper"
|
|
44
50
|
>
|
|
45
51
|
<div
|
|
46
52
|
class="filter__more-filters-mobile-content"
|
|
47
53
|
>
|
|
54
|
+
<button
|
|
55
|
+
class="filter__more-filters-desktop-toggler"
|
|
56
|
+
type="button"
|
|
57
|
+
>
|
|
58
|
+
More filters
|
|
59
|
+
</button>
|
|
48
60
|
<div
|
|
49
61
|
class="filter__more-filters-desktop-wrapper"
|
|
50
62
|
>
|
|
@@ -63,9 +75,21 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
63
75
|
title="reset--button"
|
|
64
76
|
type="button"
|
|
65
77
|
>
|
|
66
|
-
<i
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
<i>
|
|
79
|
+
<svg
|
|
80
|
+
fill="currentColor"
|
|
81
|
+
height="1em"
|
|
82
|
+
stroke="currentColor"
|
|
83
|
+
stroke-width="0"
|
|
84
|
+
viewBox="0 0 512 512"
|
|
85
|
+
width="1em"
|
|
86
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
87
|
+
>
|
|
88
|
+
<path
|
|
89
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
90
|
+
/>
|
|
91
|
+
</svg>
|
|
92
|
+
</i>
|
|
69
93
|
</button>
|
|
70
94
|
<div
|
|
71
95
|
data-testid="reset-button"
|
|
@@ -95,9 +119,21 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
95
119
|
title="reset--button"
|
|
96
120
|
type="button"
|
|
97
121
|
>
|
|
98
|
-
<i
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
<i>
|
|
123
|
+
<svg
|
|
124
|
+
fill="currentColor"
|
|
125
|
+
height="1em"
|
|
126
|
+
stroke="currentColor"
|
|
127
|
+
stroke-width="0"
|
|
128
|
+
viewBox="0 0 512 512"
|
|
129
|
+
width="1em"
|
|
130
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
131
|
+
>
|
|
132
|
+
<path
|
|
133
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
134
|
+
/>
|
|
135
|
+
</svg>
|
|
136
|
+
</i>
|
|
101
137
|
</button>
|
|
102
138
|
<div
|
|
103
139
|
data-testid="reset-button"
|
|
@@ -127,7 +163,7 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
127
163
|
</DocumentFragment>
|
|
128
164
|
`;
|
|
129
165
|
|
|
130
|
-
exports[`SearchFilter component when groupAfterMobile
|
|
166
|
+
exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop = 0 should render without throwing error and match snapshot 1`] = `
|
|
131
167
|
<DocumentFragment>
|
|
132
168
|
<form
|
|
133
169
|
class=""
|
|
@@ -146,9 +182,21 @@ exports[`SearchFilter component when groupAfterMobile = 0 and groupAfterDesktop
|
|
|
146
182
|
title="reset--button"
|
|
147
183
|
type="button"
|
|
148
184
|
>
|
|
149
|
-
<i
|
|
150
|
-
|
|
151
|
-
|
|
185
|
+
<i>
|
|
186
|
+
<svg
|
|
187
|
+
fill="currentColor"
|
|
188
|
+
height="1em"
|
|
189
|
+
stroke="currentColor"
|
|
190
|
+
stroke-width="0"
|
|
191
|
+
viewBox="0 0 512 512"
|
|
192
|
+
width="1em"
|
|
193
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
194
|
+
>
|
|
195
|
+
<path
|
|
196
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
197
|
+
/>
|
|
198
|
+
</svg>
|
|
199
|
+
</i>
|
|
152
200
|
</button>
|
|
153
201
|
<div
|
|
154
202
|
data-testid="reset-button"
|
|
@@ -160,18 +208,18 @@ exports[`SearchFilter component when groupAfterMobile = 0 and groupAfterDesktop
|
|
|
160
208
|
<div
|
|
161
209
|
class="filter__wrapper filter__wrapper--search-refine"
|
|
162
210
|
>
|
|
211
|
+
<button
|
|
212
|
+
class="filter__more-filters-mobile-toggler"
|
|
213
|
+
type="button"
|
|
214
|
+
>
|
|
215
|
+
Filters
|
|
216
|
+
</button>
|
|
163
217
|
<div
|
|
164
218
|
class="filter__more-filters-mobile-wrapper"
|
|
165
219
|
>
|
|
166
220
|
<div
|
|
167
221
|
class="filter__more-filters-mobile-content"
|
|
168
222
|
>
|
|
169
|
-
<button
|
|
170
|
-
class="filter__more-filters-desktop-toggler"
|
|
171
|
-
type="button"
|
|
172
|
-
>
|
|
173
|
-
More filters
|
|
174
|
-
</button>
|
|
175
223
|
<div
|
|
176
224
|
class="filter__more-filters-desktop-wrapper"
|
|
177
225
|
>
|
|
@@ -190,9 +238,21 @@ exports[`SearchFilter component when groupAfterMobile = 0 and groupAfterDesktop
|
|
|
190
238
|
title="reset--button"
|
|
191
239
|
type="button"
|
|
192
240
|
>
|
|
193
|
-
<i
|
|
194
|
-
|
|
195
|
-
|
|
241
|
+
<i>
|
|
242
|
+
<svg
|
|
243
|
+
fill="currentColor"
|
|
244
|
+
height="1em"
|
|
245
|
+
stroke="currentColor"
|
|
246
|
+
stroke-width="0"
|
|
247
|
+
viewBox="0 0 512 512"
|
|
248
|
+
width="1em"
|
|
249
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
250
|
+
>
|
|
251
|
+
<path
|
|
252
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
253
|
+
/>
|
|
254
|
+
</svg>
|
|
255
|
+
</i>
|
|
196
256
|
</button>
|
|
197
257
|
<div
|
|
198
258
|
data-testid="reset-button"
|
|
@@ -222,9 +282,21 @@ exports[`SearchFilter component when groupAfterMobile = 0 and groupAfterDesktop
|
|
|
222
282
|
title="reset--button"
|
|
223
283
|
type="button"
|
|
224
284
|
>
|
|
225
|
-
<i
|
|
226
|
-
|
|
227
|
-
|
|
285
|
+
<i>
|
|
286
|
+
<svg
|
|
287
|
+
fill="currentColor"
|
|
288
|
+
height="1em"
|
|
289
|
+
stroke="currentColor"
|
|
290
|
+
stroke-width="0"
|
|
291
|
+
viewBox="0 0 512 512"
|
|
292
|
+
width="1em"
|
|
293
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
294
|
+
>
|
|
295
|
+
<path
|
|
296
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
297
|
+
/>
|
|
298
|
+
</svg>
|
|
299
|
+
</i>
|
|
228
300
|
</button>
|
|
229
301
|
<div
|
|
230
302
|
data-testid="reset-button"
|
|
@@ -273,9 +345,21 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
273
345
|
title="reset--button"
|
|
274
346
|
type="button"
|
|
275
347
|
>
|
|
276
|
-
<i
|
|
277
|
-
|
|
278
|
-
|
|
348
|
+
<i>
|
|
349
|
+
<svg
|
|
350
|
+
fill="currentColor"
|
|
351
|
+
height="1em"
|
|
352
|
+
stroke="currentColor"
|
|
353
|
+
stroke-width="0"
|
|
354
|
+
viewBox="0 0 512 512"
|
|
355
|
+
width="1em"
|
|
356
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
357
|
+
>
|
|
358
|
+
<path
|
|
359
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
360
|
+
/>
|
|
361
|
+
</svg>
|
|
362
|
+
</i>
|
|
279
363
|
</button>
|
|
280
364
|
<div
|
|
281
365
|
data-testid="reset-button"
|
|
@@ -323,9 +407,21 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
323
407
|
title="reset--button"
|
|
324
408
|
type="button"
|
|
325
409
|
>
|
|
326
|
-
<i
|
|
327
|
-
|
|
328
|
-
|
|
410
|
+
<i>
|
|
411
|
+
<svg
|
|
412
|
+
fill="currentColor"
|
|
413
|
+
height="1em"
|
|
414
|
+
stroke="currentColor"
|
|
415
|
+
stroke-width="0"
|
|
416
|
+
viewBox="0 0 512 512"
|
|
417
|
+
width="1em"
|
|
418
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
419
|
+
>
|
|
420
|
+
<path
|
|
421
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
422
|
+
/>
|
|
423
|
+
</svg>
|
|
424
|
+
</i>
|
|
329
425
|
</button>
|
|
330
426
|
<div
|
|
331
427
|
data-testid="reset-button"
|
|
@@ -355,9 +451,21 @@ exports[`SearchFilter component when groupAfterMobile > 0 and groupAfterDesktop
|
|
|
355
451
|
title="reset--button"
|
|
356
452
|
type="button"
|
|
357
453
|
>
|
|
358
|
-
<i
|
|
359
|
-
|
|
360
|
-
|
|
454
|
+
<i>
|
|
455
|
+
<svg
|
|
456
|
+
fill="currentColor"
|
|
457
|
+
height="1em"
|
|
458
|
+
stroke="currentColor"
|
|
459
|
+
stroke-width="0"
|
|
460
|
+
viewBox="0 0 512 512"
|
|
461
|
+
width="1em"
|
|
462
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
463
|
+
>
|
|
464
|
+
<path
|
|
465
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
466
|
+
/>
|
|
467
|
+
</svg>
|
|
468
|
+
</i>
|
|
361
469
|
</button>
|
|
362
470
|
<div
|
|
363
471
|
data-testid="reset-button"
|
|
@@ -406,9 +514,21 @@ exports[`SearchFilter component when the device is desktop should render without
|
|
|
406
514
|
title="reset--button"
|
|
407
515
|
type="button"
|
|
408
516
|
>
|
|
409
|
-
<i
|
|
410
|
-
|
|
411
|
-
|
|
517
|
+
<i>
|
|
518
|
+
<svg
|
|
519
|
+
fill="currentColor"
|
|
520
|
+
height="1em"
|
|
521
|
+
stroke="currentColor"
|
|
522
|
+
stroke-width="0"
|
|
523
|
+
viewBox="0 0 512 512"
|
|
524
|
+
width="1em"
|
|
525
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
526
|
+
>
|
|
527
|
+
<path
|
|
528
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
529
|
+
/>
|
|
530
|
+
</svg>
|
|
531
|
+
</i>
|
|
412
532
|
</button>
|
|
413
533
|
<div
|
|
414
534
|
data-testid="reset-button"
|
|
@@ -452,9 +572,21 @@ exports[`SearchFilter component when the device is mobile when isCollapsedOnResp
|
|
|
452
572
|
title="reset--button"
|
|
453
573
|
type="button"
|
|
454
574
|
>
|
|
455
|
-
<i
|
|
456
|
-
|
|
457
|
-
|
|
575
|
+
<i>
|
|
576
|
+
<svg
|
|
577
|
+
fill="currentColor"
|
|
578
|
+
height="1em"
|
|
579
|
+
stroke="currentColor"
|
|
580
|
+
stroke-width="0"
|
|
581
|
+
viewBox="0 0 512 512"
|
|
582
|
+
width="1em"
|
|
583
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
584
|
+
>
|
|
585
|
+
<path
|
|
586
|
+
d="M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"
|
|
587
|
+
/>
|
|
588
|
+
</svg>
|
|
589
|
+
</i>
|
|
458
590
|
</button>
|
|
459
591
|
<div
|
|
460
592
|
data-testid="reset-button"
|
|
@@ -493,10 +625,25 @@ exports[`SearchFilter component when the device is mobile when isCollapsedOnResp
|
|
|
493
625
|
Search refinement
|
|
494
626
|
</p>
|
|
495
627
|
<i
|
|
496
|
-
class="material-icons"
|
|
497
628
|
role="button"
|
|
498
629
|
>
|
|
499
|
-
|
|
630
|
+
<svg
|
|
631
|
+
fill="currentColor"
|
|
632
|
+
height="1em"
|
|
633
|
+
stroke="currentColor"
|
|
634
|
+
stroke-width="0"
|
|
635
|
+
viewBox="0 0 24 24"
|
|
636
|
+
width="1em"
|
|
637
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
638
|
+
>
|
|
639
|
+
<path
|
|
640
|
+
d="M0 0h24v24H0z"
|
|
641
|
+
fill="none"
|
|
642
|
+
/>
|
|
643
|
+
<path
|
|
644
|
+
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
645
|
+
/>
|
|
646
|
+
</svg>
|
|
500
647
|
</i>
|
|
501
648
|
</div>
|
|
502
649
|
<div
|
package/tests/unit/src/components/SearchFilter/components/__snapshots__/TextSearch.test.js.snap
CHANGED
|
@@ -31,10 +31,24 @@ exports[`TextSearch component should render without throwing an error and match
|
|
|
31
31
|
class="icon-button icon-button--search"
|
|
32
32
|
type="button"
|
|
33
33
|
>
|
|
34
|
-
<i
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
<i>
|
|
35
|
+
<svg
|
|
36
|
+
fill="currentColor"
|
|
37
|
+
height="1em"
|
|
38
|
+
stroke="currentColor"
|
|
39
|
+
stroke-width="0"
|
|
40
|
+
viewBox="0 0 24 24"
|
|
41
|
+
width="1em"
|
|
42
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
43
|
+
>
|
|
44
|
+
<path
|
|
45
|
+
d="M0 0h24v24H0z"
|
|
46
|
+
fill="none"
|
|
47
|
+
/>
|
|
48
|
+
<path
|
|
49
|
+
d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
50
|
+
/>
|
|
51
|
+
</svg>
|
|
38
52
|
</i>
|
|
39
53
|
</button>
|
|
40
54
|
</div>
|
|
@@ -12,9 +12,21 @@ exports[`SFItem component should match snapshot and render without throwing an e
|
|
|
12
12
|
target="_blank"
|
|
13
13
|
title="Facebook"
|
|
14
14
|
>
|
|
15
|
-
<i
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
<i>
|
|
16
|
+
<svg
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
height="1em"
|
|
19
|
+
stroke="currentColor"
|
|
20
|
+
stroke-width="0"
|
|
21
|
+
viewBox="0 0 320 512"
|
|
22
|
+
width="1em"
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
>
|
|
25
|
+
<path
|
|
26
|
+
d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"
|
|
27
|
+
/>
|
|
28
|
+
</svg>
|
|
29
|
+
</i>
|
|
18
30
|
<span
|
|
19
31
|
class="social__network hidden"
|
|
20
32
|
>
|
|
@@ -18,9 +18,21 @@ exports[`SocialFollow component should render without throwing an error and matc
|
|
|
18
18
|
target="_blank"
|
|
19
19
|
title="Facebook"
|
|
20
20
|
>
|
|
21
|
-
<i
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
<i>
|
|
22
|
+
<svg
|
|
23
|
+
fill="currentColor"
|
|
24
|
+
height="1em"
|
|
25
|
+
stroke="currentColor"
|
|
26
|
+
stroke-width="0"
|
|
27
|
+
viewBox="0 0 320 512"
|
|
28
|
+
width="1em"
|
|
29
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
+
>
|
|
31
|
+
<path
|
|
32
|
+
d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"
|
|
33
|
+
/>
|
|
34
|
+
</svg>
|
|
35
|
+
</i>
|
|
24
36
|
<span
|
|
25
37
|
class="social__network hidden"
|
|
26
38
|
>
|
|
@@ -38,9 +50,21 @@ exports[`SocialFollow component should render without throwing an error and matc
|
|
|
38
50
|
target="_blank"
|
|
39
51
|
title="Twitter"
|
|
40
52
|
>
|
|
41
|
-
<i
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
<i>
|
|
54
|
+
<svg
|
|
55
|
+
fill="currentColor"
|
|
56
|
+
height="1em"
|
|
57
|
+
stroke="currentColor"
|
|
58
|
+
stroke-width="0"
|
|
59
|
+
viewBox="0 0 512 512"
|
|
60
|
+
width="1em"
|
|
61
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
62
|
+
>
|
|
63
|
+
<path
|
|
64
|
+
d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"
|
|
65
|
+
/>
|
|
66
|
+
</svg>
|
|
67
|
+
</i>
|
|
44
68
|
<span
|
|
45
69
|
class="social__network hidden"
|
|
46
70
|
>
|
|
@@ -5,8 +5,7 @@ import TextBlock from '../../../../../src/components/TextBlock';
|
|
|
5
5
|
const { setEnvs, deleteEnvs } = require('@blaze-cms/tools/test-helpers/test-files/test-env');
|
|
6
6
|
|
|
7
7
|
const getMockedProps = overrides => ({
|
|
8
|
-
|
|
9
|
-
'{"blocks":[{"key":"2cq53","text":"Lorem","type":"header-one","depth":0,"inlineStyleRanges":[],"entityRanges":[],"data":{}}],"entityMap":{},"imageAttributes":[]}',
|
|
8
|
+
html: "<section><h1>Lorem ipsum</h1> <a href='/'>link</a></section>",
|
|
10
9
|
modifier: 'mocked-modifier',
|
|
11
10
|
...overrides
|
|
12
11
|
});
|
|
@@ -32,13 +31,13 @@ describe('TextBlock component', () => {
|
|
|
32
31
|
|
|
33
32
|
it('should render text heading ', () => {
|
|
34
33
|
const { getByText } = render(TextBlock, getMockedProps());
|
|
35
|
-
const headerTag = getByText('Lorem');
|
|
34
|
+
const headerTag = getByText('Lorem ipsum');
|
|
36
35
|
expect(headerTag).toBeDefined();
|
|
37
36
|
expect(headerTag.nodeName).toEqual('H1');
|
|
38
37
|
});
|
|
39
38
|
|
|
40
39
|
it('should not render if textblock has no content', () => {
|
|
41
|
-
const { container } = render(TextBlock, getMockedProps({
|
|
40
|
+
const { container } = render(TextBlock, getMockedProps({ html: '' }));
|
|
42
41
|
expect(container).toBeEmptyDOMElement();
|
|
43
42
|
});
|
|
44
43
|
|
|
@@ -6,9 +6,17 @@ exports[`TextBlock component With wrapper flag should render with wrapper and le
|
|
|
6
6
|
class="page-content mocked-modifier"
|
|
7
7
|
>
|
|
8
8
|
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
<section>
|
|
10
|
+
<h1>
|
|
11
|
+
Lorem ipsum
|
|
12
|
+
</h1>
|
|
13
|
+
|
|
14
|
+
<a
|
|
15
|
+
href="/"
|
|
16
|
+
>
|
|
17
|
+
link
|
|
18
|
+
</a>
|
|
19
|
+
</section>
|
|
12
20
|
|
|
13
21
|
</div>
|
|
14
22
|
</DocumentFragment>
|
|
@@ -20,9 +28,17 @@ exports[`TextBlock component With wrapper flag should render with wrapper and le
|
|
|
20
28
|
class="page-content "
|
|
21
29
|
>
|
|
22
30
|
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
<section>
|
|
32
|
+
<h1>
|
|
33
|
+
Lorem ipsum
|
|
34
|
+
</h1>
|
|
35
|
+
|
|
36
|
+
<a
|
|
37
|
+
href="/"
|
|
38
|
+
>
|
|
39
|
+
link
|
|
40
|
+
</a>
|
|
41
|
+
</section>
|
|
26
42
|
|
|
27
43
|
</div>
|
|
28
44
|
</DocumentFragment>
|
|
@@ -34,9 +50,17 @@ exports[`TextBlock component should match snapshot 1`] = `
|
|
|
34
50
|
class=" mocked-modifier"
|
|
35
51
|
>
|
|
36
52
|
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
<section>
|
|
54
|
+
<h1>
|
|
55
|
+
Lorem ipsum
|
|
56
|
+
</h1>
|
|
57
|
+
|
|
58
|
+
<a
|
|
59
|
+
href="/"
|
|
60
|
+
>
|
|
61
|
+
link
|
|
62
|
+
</a>
|
|
63
|
+
</section>
|
|
40
64
|
|
|
41
65
|
</div>
|
|
42
66
|
</DocumentFragment>
|
|
@@ -45,9 +69,17 @@ exports[`TextBlock component should match snapshot 1`] = `
|
|
|
45
69
|
exports[`TextBlock component should not render wrapper if no modifier 1`] = `
|
|
46
70
|
<DocumentFragment>
|
|
47
71
|
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
72
|
+
<section>
|
|
73
|
+
<h1>
|
|
74
|
+
Lorem ipsum
|
|
75
|
+
</h1>
|
|
76
|
+
|
|
77
|
+
<a
|
|
78
|
+
href="/"
|
|
79
|
+
>
|
|
80
|
+
link
|
|
81
|
+
</a>
|
|
82
|
+
</section>
|
|
51
83
|
|
|
52
84
|
</DocumentFragment>
|
|
53
85
|
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
4
|
+
import parseTextBlock from '../../../../src/helpers/parse-TextBlock';
|
|
5
|
+
import BlazeLink from '../../../../src/components/BlazeLink';
|
|
6
|
+
|
|
7
|
+
describe('Parse textBlock', () => {
|
|
8
|
+
const html = "<p>lorem ipsum <a href='/'>link</a></p>";
|
|
9
|
+
|
|
10
|
+
let expectedMarkup;
|
|
11
|
+
|
|
12
|
+
beforeAll(() => {
|
|
13
|
+
const parsedTextBlock = parseTextBlock({ html, LinkWrapper: BlazeLink });
|
|
14
|
+
expectedMarkup = () => <>{parsedTextBlock}</>;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('it should match snapshot', () => {
|
|
18
|
+
const { asFragment } = render(expectedMarkup);
|
|
19
|
+
expect(asFragment()).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('it should include a link tag', () => {
|
|
23
|
+
const { container } = render(expectedMarkup);
|
|
24
|
+
expect(container).toContainHTML("<a href='/'>link</a>");
|
|
25
|
+
});
|
|
26
|
+
});
|