@elementor/editor-responsive 0.10.5 → 0.10.6
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 +14 -221
- package/dist/index.js +36 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +44 -44
- package/src/components/__tests__/breakpoints-switcher.test.tsx +11 -7
- package/src/components/breakpoints-switcher.tsx +38 -37
- package/src/hooks/__tests__/use-breakpoints-actions.test.tsx +1 -4
- package/src/hooks/__tests__/use-breakpoints.test.tsx +32 -23
- package/src/store/index.ts +21 -15
- package/src/store/selectors.ts +14 -25
- package/src/sync/__tests__/sync-store.test.ts +20 -16
- package/src/sync/sync-store.ts +11 -16
- package/src/types.ts +30 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,441 +3,234 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.10.
|
|
6
|
+
## [0.10.6](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.10.5...@elementor/editor-responsive@0.10.6) (2024-07-16)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
9
9
|
|
|
10
|
+
## [0.10.5](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.10.4...@elementor/editor-responsive@0.10.5) (2024-07-16)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
**Note:** Version bump only for package @elementor/editor-responsive
|
|
13
13
|
|
|
14
14
|
## [0.10.4](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.10.3...@elementor/editor-responsive@0.10.4) (2024-07-08)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
18
|
## [0.10.3](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.10.2...@elementor/editor-responsive@0.10.3) (2024-07-03)
|
|
23
19
|
|
|
24
20
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
22
|
## [0.10.2](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.10.1...@elementor/editor-responsive@0.10.2) (2024-07-03)
|
|
31
23
|
|
|
32
24
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
26
|
## [0.10.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.10.0...@elementor/editor-responsive@0.10.1) (2024-07-02)
|
|
39
27
|
|
|
40
28
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
30
|
# [0.10.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.9.0...@elementor/editor-responsive@0.10.0) (2024-06-16)
|
|
47
31
|
|
|
48
|
-
|
|
49
32
|
### Features
|
|
50
33
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
- **editor-app-bar:** add value to each responsive device switcher [ED-14367] ([#185](https://github.com/elementor/elementor-packages/issues/185)) ([4df9deb](https://github.com/elementor/elementor-packages/commit/4df9deb57d71e43aadbcd311be178bf395ac1cdc))
|
|
56
35
|
|
|
57
36
|
# [0.9.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.21...@elementor/editor-responsive@0.9.0) (2024-06-04)
|
|
58
37
|
|
|
59
|
-
|
|
60
38
|
### Features
|
|
61
39
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
40
|
+
- internal create a top bar data events collection working with mixpanel [ED-14684] ([#184](https://github.com/elementor/elementor-packages/issues/184)) ([9d25189](https://github.com/elementor/elementor-packages/commit/9d25189173a65d535347f9b2f32d377bcffb6c52))
|
|
67
41
|
|
|
68
42
|
## [0.8.21](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.20...@elementor/editor-responsive@0.8.21) (2024-06-02)
|
|
69
43
|
|
|
70
44
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
71
45
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
46
|
## [0.8.20](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.19...@elementor/editor-responsive@0.8.20) (2024-05-09)
|
|
77
47
|
|
|
78
48
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
79
49
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
50
|
## [0.8.19](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.18...@elementor/editor-responsive@0.8.19) (2024-05-08)
|
|
85
51
|
|
|
86
52
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
87
53
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
54
|
## [0.8.18](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.17...@elementor/editor-responsive@0.8.18) (2024-05-07)
|
|
93
55
|
|
|
94
56
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
95
57
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
58
|
## [0.8.17](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.16...@elementor/editor-responsive@0.8.17) (2024-04-16)
|
|
101
59
|
|
|
102
60
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
103
61
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
62
|
## [0.8.16](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.15...@elementor/editor-responsive@0.8.16) (2024-04-16)
|
|
109
63
|
|
|
110
64
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
111
65
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
66
|
## [0.8.15](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.14...@elementor/editor-responsive@0.8.15) (2024-04-04)
|
|
117
67
|
|
|
118
68
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
119
69
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
70
|
## [0.8.14](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.13...@elementor/editor-responsive@0.8.14) (2024-03-24)
|
|
125
71
|
|
|
126
72
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
127
73
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
74
|
## [0.8.13](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.12...@elementor/editor-responsive@0.8.13) (2024-03-05)
|
|
133
75
|
|
|
134
76
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
135
77
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
78
|
## [0.8.12](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.11...@elementor/editor-responsive@0.8.12) (2024-02-28)
|
|
141
79
|
|
|
142
80
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
143
81
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
82
|
## [0.8.11](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.10...@elementor/editor-responsive@0.8.11) (2024-02-22)
|
|
149
83
|
|
|
150
84
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
151
85
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
86
|
## [0.8.10](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.9...@elementor/editor-responsive@0.8.10) (2024-02-15)
|
|
157
87
|
|
|
158
88
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
159
89
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
90
|
## [0.8.9](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.8...@elementor/editor-responsive@0.8.9) (2024-02-15)
|
|
165
91
|
|
|
166
92
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
167
93
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
94
|
## [0.8.8](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.7...@elementor/editor-responsive@0.8.8) (2024-01-29)
|
|
173
95
|
|
|
174
96
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
175
97
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
98
|
## [0.8.7](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.6...@elementor/editor-responsive@0.8.7) (2023-11-07)
|
|
181
99
|
|
|
182
100
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
183
101
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
102
|
## [0.8.6](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.5...@elementor/editor-responsive@0.8.6) (2023-11-02)
|
|
189
103
|
|
|
190
104
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
191
105
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
106
|
## [0.8.5](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.4...@elementor/editor-responsive@0.8.5) (2023-10-19)
|
|
197
107
|
|
|
198
108
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
199
109
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
110
|
## [0.8.4](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.3...@elementor/editor-responsive@0.8.4) (2023-10-19)
|
|
205
111
|
|
|
206
112
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
207
113
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
114
|
## [0.8.3](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.2...@elementor/editor-responsive@0.8.3) (2023-09-27)
|
|
213
115
|
|
|
214
116
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
215
117
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
118
|
## [0.8.2](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.1...@elementor/editor-responsive@0.8.2) (2023-09-26)
|
|
221
119
|
|
|
222
120
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
223
121
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
122
|
## [0.8.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.8.0...@elementor/editor-responsive@0.8.1) (2023-09-26)
|
|
229
123
|
|
|
230
124
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
231
125
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
126
|
# [0.8.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.7.0...@elementor/editor-responsive@0.8.0) (2023-09-14)
|
|
237
127
|
|
|
238
|
-
|
|
239
128
|
### Features
|
|
240
129
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
130
|
+
- **v1-adapters:** mark private functions [ED-12029] ([#122](https://github.com/elementor/elementor-packages/issues/122)) ([2e79ccc](https://github.com/elementor/elementor-packages/commit/2e79ccc87add5f0508b5a142f9f6d832b4657062))
|
|
246
131
|
|
|
247
132
|
# [0.7.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.13...@elementor/editor-responsive@0.7.0) (2023-09-11)
|
|
248
133
|
|
|
249
|
-
|
|
250
134
|
### Bug Fixes
|
|
251
135
|
|
|
252
|
-
|
|
253
|
-
|
|
136
|
+
- ui adaptations [ED-11933] ([#107](https://github.com/elementor/elementor-packages/issues/107)) ([18ef329](https://github.com/elementor/elementor-packages/commit/18ef32928cbe921d7f5340c37c3c965b117d8d63))
|
|
254
137
|
|
|
255
138
|
### Features
|
|
256
139
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
140
|
+
- **store:** mark experimental functions [ED-12070] ([#114](https://github.com/elementor/elementor-packages/issues/114)) ([d790829](https://github.com/elementor/elementor-packages/commit/d79082911195c75f6d3a89a5619b234e2f5ce158))
|
|
262
141
|
|
|
263
142
|
## [0.6.13](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.12...@elementor/editor-responsive@0.6.13) (2023-08-22)
|
|
264
143
|
|
|
265
144
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
266
145
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
146
|
## [0.6.12](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.11...@elementor/editor-responsive@0.6.12) (2023-08-20)
|
|
272
147
|
|
|
273
148
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
274
149
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
150
|
## [0.6.11](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.10...@elementor/editor-responsive@0.6.11) (2023-08-02)
|
|
280
151
|
|
|
281
152
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
282
153
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
154
|
## [0.6.10](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.9...@elementor/editor-responsive@0.6.10) (2023-08-01)
|
|
288
155
|
|
|
289
156
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
290
157
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
158
|
## [0.6.9](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.8...@elementor/editor-responsive@0.6.9) (2023-07-17)
|
|
296
159
|
|
|
297
160
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
298
161
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
162
|
## [0.6.8](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.7...@elementor/editor-responsive@0.6.8) (2023-07-17)
|
|
304
163
|
|
|
305
164
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
306
165
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
166
|
## [0.6.7](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.6...@elementor/editor-responsive@0.6.7) (2023-07-16)
|
|
312
167
|
|
|
313
168
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
314
169
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
170
|
## [0.6.6](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.5...@elementor/editor-responsive@0.6.6) (2023-06-29)
|
|
320
171
|
|
|
321
172
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
322
173
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
174
|
## [0.6.5](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.4...@elementor/editor-responsive@0.6.5) (2023-06-28)
|
|
328
175
|
|
|
329
176
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
330
177
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
178
|
## [0.6.4](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.3...@elementor/editor-responsive@0.6.4) (2023-06-26)
|
|
336
179
|
|
|
337
180
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
338
181
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
182
|
## [0.6.3](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.2...@elementor/editor-responsive@0.6.3) (2023-06-25)
|
|
344
183
|
|
|
345
184
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
346
185
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
186
|
## [0.6.2](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.1...@elementor/editor-responsive@0.6.2) (2023-06-25)
|
|
352
187
|
|
|
353
188
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
354
189
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
190
|
## [0.6.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.6.0...@elementor/editor-responsive@0.6.1) (2023-06-11)
|
|
360
191
|
|
|
361
192
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
362
193
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
194
|
# [0.6.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.5.0...@elementor/editor-responsive@0.6.0) (2023-06-06)
|
|
368
195
|
|
|
369
|
-
|
|
370
196
|
### Features
|
|
371
197
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
198
|
+
- drop support for React 17 [ED-10982] ([#50](https://github.com/elementor/elementor-packages/issues/50)) ([59c576c](https://github.com/elementor/elementor-packages/commit/59c576ca218947dc0992616311d4d399a20e91a6))
|
|
377
199
|
|
|
378
200
|
# [0.5.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.4.0...@elementor/editor-responsive@0.5.0) (2023-06-05)
|
|
379
201
|
|
|
380
|
-
|
|
381
202
|
### Features
|
|
382
203
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
204
|
+
- **store:** support creating & registering a slice independently [ED-10914] ([#47](https://github.com/elementor/elementor-packages/issues/47)) ([3cac551](https://github.com/elementor/elementor-packages/commit/3cac551d72cc2df6e11c017323559e3e5c4ab12f))
|
|
388
205
|
|
|
389
206
|
# [0.4.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.3.1...@elementor/editor-responsive@0.4.0) (2023-06-01)
|
|
390
207
|
|
|
391
|
-
|
|
392
208
|
### Features
|
|
393
209
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
210
|
+
- add support for React 18 [ED-10905] ([#46](https://github.com/elementor/elementor-packages/issues/46)) ([c8915c6](https://github.com/elementor/elementor-packages/commit/c8915c6ea62550bcdeb5c8a576f311bedc35bcad))
|
|
399
211
|
|
|
400
212
|
## [0.3.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.3.0...@elementor/editor-responsive@0.3.1) (2023-05-30)
|
|
401
213
|
|
|
402
214
|
**Note:** Version bump only for package @elementor/editor-responsive
|
|
403
215
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
216
|
# [0.3.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-responsive@0.2.2...@elementor/editor-responsive@0.3.0) (2023-05-21)
|
|
409
217
|
|
|
410
|
-
|
|
411
218
|
### Features
|
|
412
219
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
220
|
+
- **locations:** change api to support props for slots [ED-10730] ([#38](https://github.com/elementor/elementor-packages/issues/38)) ([44bec3c](https://github.com/elementor/elementor-packages/commit/44bec3cda1020037ba7105c6f05ce4baa8e3b376))
|
|
418
221
|
|
|
419
222
|
## 0.2.2 (2023-05-16)
|
|
420
223
|
|
|
421
|
-
|
|
422
|
-
|
|
423
224
|
## 0.2.1 (2023-05-11)
|
|
424
225
|
|
|
425
|
-
|
|
426
226
|
### Bug Fixes
|
|
427
227
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
228
|
+
- **editor-app-bar:** make save options button disabled in site-settings [ED-10221] ([#30](https://github.com/elementor/elementor-packages/issues/30)) ([1991096](https://github.com/elementor/elementor-packages/commit/1991096115efeae7bc3648e4889899b85d7328d6))
|
|
431
229
|
|
|
432
230
|
# 0.2.0 (2023-05-09)
|
|
433
231
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
232
|
## [0.2.1](https://github.com/elementor/elementor-packages/compare/v0.2.0...v0.2.1) (2023-05-11)
|
|
439
233
|
|
|
440
|
-
|
|
441
234
|
### Bug Fixes
|
|
442
235
|
|
|
443
|
-
|
|
236
|
+
- **editor-app-bar:** make save options button disabled in site-settings [ED-10221] ([#30](https://github.com/elementor/elementor-packages/issues/30)) ([1991096](https://github.com/elementor/elementor-packages/commit/1991096115efeae7bc3648e4889899b85d7328d6))
|
package/dist/index.js
CHANGED
|
@@ -44,12 +44,15 @@ var slice = (0, import_store.__createSlice)({
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
function normalizeEntities(entities) {
|
|
47
|
-
return entities.reduce(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
return entities.reduce(
|
|
48
|
+
(acc, breakpoint) => {
|
|
49
|
+
return {
|
|
50
|
+
...acc,
|
|
51
|
+
[breakpoint.id]: breakpoint
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
{}
|
|
55
|
+
);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
// src/sync/sync-store.ts
|
|
@@ -62,25 +65,21 @@ function syncStore() {
|
|
|
62
65
|
}
|
|
63
66
|
function syncInitialization() {
|
|
64
67
|
const { init: init2 } = slice.actions;
|
|
65
|
-
(0, import_editor_v1_adapters.__privateListenTo)(
|
|
66
|
-
(0,
|
|
67
|
-
|
|
68
|
-
(0, import_store3.__dispatch)(init2({
|
|
68
|
+
(0, import_editor_v1_adapters.__privateListenTo)((0, import_editor_v1_adapters.v1ReadyEvent)(), () => {
|
|
69
|
+
(0, import_store3.__dispatch)(
|
|
70
|
+
init2({
|
|
69
71
|
entities: getBreakpoints(),
|
|
70
72
|
activeId: getActiveBreakpoint()
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
);
|
|
73
|
+
})
|
|
74
|
+
);
|
|
75
|
+
});
|
|
74
76
|
}
|
|
75
77
|
function syncOnChange() {
|
|
76
78
|
const { activateBreakpoint } = slice.actions;
|
|
77
|
-
(0, import_editor_v1_adapters.__privateListenTo)(
|
|
78
|
-
|
|
79
|
-
()
|
|
80
|
-
|
|
81
|
-
(0, import_store3.__dispatch)(activateBreakpoint(activeBreakpoint));
|
|
82
|
-
}
|
|
83
|
-
);
|
|
79
|
+
(0, import_editor_v1_adapters.__privateListenTo)(deviceModeChangeEvent(), () => {
|
|
80
|
+
const activeBreakpoint = getActiveBreakpoint();
|
|
81
|
+
(0, import_store3.__dispatch)(activateBreakpoint(activeBreakpoint));
|
|
82
|
+
});
|
|
84
83
|
}
|
|
85
84
|
function getBreakpoints() {
|
|
86
85
|
const { breakpoints } = window.elementor?.config?.responsive || {};
|
|
@@ -128,23 +127,16 @@ var selectActiveBreakpoint = (0, import_store4.__createSelector)(
|
|
|
128
127
|
selectActiveId,
|
|
129
128
|
(entities, activeId) => activeId && entities[activeId] ? entities[activeId] : null
|
|
130
129
|
);
|
|
131
|
-
var selectSortedBreakpoints = (0, import_store4.__createSelector)(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return [
|
|
142
|
-
...minWidth.sort(byWidth),
|
|
143
|
-
...defaults,
|
|
144
|
-
...maxWidth.sort(byWidth)
|
|
145
|
-
];
|
|
146
|
-
}
|
|
147
|
-
);
|
|
130
|
+
var selectSortedBreakpoints = (0, import_store4.__createSelector)(selectEntities, (entities) => {
|
|
131
|
+
const byWidth = (a, b) => {
|
|
132
|
+
return a.width && b.width ? b.width - a.width : 0;
|
|
133
|
+
};
|
|
134
|
+
const all = Object.values(entities);
|
|
135
|
+
const defaults = all.filter((breakpoint) => !breakpoint.width);
|
|
136
|
+
const minWidth = all.filter((breakpoint) => breakpoint.type === "min-width");
|
|
137
|
+
const maxWidth = all.filter((breakpoint) => breakpoint.type === "max-width");
|
|
138
|
+
return [...minWidth.sort(byWidth), ...defaults, ...maxWidth.sort(byWidth)];
|
|
139
|
+
});
|
|
148
140
|
|
|
149
141
|
// src/hooks/use-breakpoints.ts
|
|
150
142
|
function useBreakpoints() {
|
|
@@ -183,16 +175,13 @@ function BreakpointsSwitcher() {
|
|
|
183
175
|
const extendedWindow = window;
|
|
184
176
|
const config = extendedWindow?.elementor?.editorEvents?.config;
|
|
185
177
|
if (config) {
|
|
186
|
-
extendedWindow.elementor.editorEvents.dispatchEvent(
|
|
187
|
-
config.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
mode: value
|
|
194
|
-
}
|
|
195
|
-
);
|
|
178
|
+
extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.responsiveControls, {
|
|
179
|
+
location: config.locations.topBar,
|
|
180
|
+
secondaryLocation: config.secondaryLocations.responsiveControls,
|
|
181
|
+
trigger: config.triggers.click,
|
|
182
|
+
element: config.elements.buttonIcon,
|
|
183
|
+
mode: value
|
|
184
|
+
});
|
|
196
185
|
}
|
|
197
186
|
activate(value);
|
|
198
187
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/store/index.ts","../src/sync/sync-store.ts","../src/init.ts","../src/components/breakpoints-switcher.tsx","../src/hooks/use-breakpoints.ts","../src/store/selectors.ts","../src/hooks/use-breakpoints-actions.ts","../src/index.ts"],"sourcesContent":["import { __createSlice, PayloadAction } from '@elementor/store';\nimport { Breakpoint, BreakpointId } from '../types';\n\nexport type State = {\n\tentities: Record<BreakpointId, Breakpoint>,\n\tactiveId: BreakpointId | null,\n}\nconst initialState: State = {\n\tentities: {} as State['entities'],\n\tactiveId: null,\n};\n\nexport const slice = __createSlice( {\n\tname: 'breakpoints',\n\tinitialState,\n\treducers: {\n\t\tinit( state, action: PayloadAction<{\n\t\t\tentities: Breakpoint[],\n\t\t\tactiveId: State['activeId'],\n\t\t}> ) {\n\t\t\tstate.activeId = action.payload.activeId;\n\t\t\tstate.entities = normalizeEntities( action.payload.entities );\n\t\t},\n\n\t\tactivateBreakpoint( state, action: PayloadAction<BreakpointId> ) {\n\t\t\tif ( state.entities[ action.payload ] ) {\n\t\t\t\tstate.activeId = action.payload;\n\t\t\t}\n\t\t},\n\t},\n} );\n\nfunction normalizeEntities( entities: Breakpoint[] ) {\n\treturn entities.reduce( ( acc, breakpoint ) => {\n\t\treturn {\n\t\t\t...acc,\n\t\t\t[ breakpoint.id ]: breakpoint,\n\t\t};\n\t}, {} as State['entities'] );\n}\n","import { slice } from '../store';\nimport { __dispatch } from '@elementor/store';\nimport { Breakpoint, ExtendedWindow } from '../types';\nimport { __privateListenTo as listenTo, v1ReadyEvent, windowEvent } from '@elementor/editor-v1-adapters';\nimport { __ } from '@wordpress/i18n';\n\nexport default function syncStore() {\n\tsyncInitialization();\n\tsyncOnChange();\n}\n\nfunction syncInitialization() {\n\tconst { init } = slice.actions;\n\n\tlistenTo(\n\t\tv1ReadyEvent(),\n\t\t() => {\n\t\t\t__dispatch( init( {\n\t\t\t\tentities: getBreakpoints(),\n\t\t\t\tactiveId: getActiveBreakpoint(),\n\t\t\t} ) );\n\t\t}\n\t);\n}\n\nfunction syncOnChange() {\n\tconst { activateBreakpoint } = slice.actions;\n\n\tlistenTo(\n\t\tdeviceModeChangeEvent(),\n\t\t() => {\n\t\t\tconst activeBreakpoint = getActiveBreakpoint();\n\n\t\t\t__dispatch( activateBreakpoint( activeBreakpoint ) );\n\t\t},\n\t);\n}\n\nfunction getBreakpoints() {\n\tconst { breakpoints } = ( window as unknown as ExtendedWindow ).elementor?.config?.responsive || {};\n\n\tif ( ! breakpoints ) {\n\t\treturn [];\n\t}\n\n\tconst entities = Object\n\t\t.entries( breakpoints )\n\t\t.filter( ( [ , breakpoint ] ) => breakpoint.is_enabled )\n\t\t.map( ( [ id, { value, direction, label } ] ) => {\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\tlabel,\n\t\t\t\twidth: value,\n\t\t\t\ttype: direction === 'min' ? 'min-width' : 'max-width',\n\t\t\t} as Breakpoint;\n\t\t} );\n\n\t// Desktop breakpoint is not included in V1 config.\n\tentities.push( {\n\t\tid: 'desktop',\n\t\tlabel: __( 'Desktop', 'elementor' ),\n\t} );\n\n\treturn entities;\n}\n\nfunction getActiveBreakpoint() {\n\tconst extendedWindow = window as unknown as ExtendedWindow;\n\n\treturn extendedWindow.elementor?.channels?.deviceMode?.request?.( 'currentMode' ) || null;\n}\n\nfunction deviceModeChangeEvent() {\n\treturn windowEvent( 'elementor/device-mode/change' );\n}\n","import { slice } from './store';\nimport syncStore from './sync/sync-store';\nimport { injectIntoResponsive } from '@elementor/editor-app-bar';\nimport BreakpointsSwitcher from './components/breakpoints-switcher';\nimport { __registerSlice } from '@elementor/store';\n\nexport default function init() {\n\tinitStore();\n\n\tregisterAppBarUI();\n}\n\nfunction initStore() {\n\t__registerSlice( slice );\n\n\tsyncStore();\n}\n\nfunction registerAppBarUI() {\n\tinjectIntoResponsive( {\n\t\tid: 'responsive-breakpoints-switcher',\n\t\tcomponent: BreakpointsSwitcher,\n\t\toptions: {\n\t\t\tpriority: 20, // After document indication.\n\t\t},\n\t} );\n}\n","import * as React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { BreakpointId, ExtendedWindow } from '../types';\nimport useBreakpoints from '../hooks/use-breakpoints';\nimport { Tab, Tabs, Tooltip as BaseTooltip, TooltipProps } from '@elementor/ui';\nimport {\n\tDesktopIcon,\n\tTabletPortraitIcon,\n\tMobilePortraitIcon,\n\tWidescreenIcon,\n\tLaptopIcon,\n\tTabletLandscapeIcon,\n\tMobileLandscapeIcon,\n} from '@elementor/icons';\nimport useBreakpointsActions from '../hooks/use-breakpoints-actions';\n\nexport default function BreakpointsSwitcher() {\n\tconst { all, active } = useBreakpoints();\n\tconst { activate } = useBreakpointsActions();\n\n\tif ( ! all.length || ! active ) {\n\t\treturn null;\n\t}\n\n\tconst onChange = ( _: unknown, value: BreakpointId ) => {\n\t\tconst extendedWindow = window as unknown as ExtendedWindow;\n\t\tconst config = extendedWindow?.elementor?.editorEvents?.config;\n\n\t\tif ( config ) {\n\t\t\textendedWindow.elementor.editorEvents.dispatchEvent(\n\t\t\t\tconfig.names.topBar.responsiveControls,\n\t\t\t\t{\n\t\t\t\t\tlocation: config.locations.topBar,\n\t\t\t\t\tsecondaryLocation: config.secondaryLocations.responsiveControls,\n\t\t\t\t\ttrigger: config.triggers.click,\n\t\t\t\t\telement: config.elements.buttonIcon,\n\t\t\t\t\tmode: value,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\tactivate( value );\n\t};\n\n\treturn (\n\t\t<Tabs\n\t\t\ttextColor=\"inherit\"\n\t\t\tindicatorColor=\"secondary\"\n\t\t\tvalue={ active.id }\n\t\t\tonChange={ onChange }\n\t\t\taria-label={ __( 'Switch Device', 'elementor' ) }\n\t\t\tsx={ {\n\t\t\t\t'& .MuiTabs-indicator': {\n\t\t\t\t\tbackgroundColor: 'text.primary',\n\t\t\t\t},\n\t\t\t} }\n\t\t>\n\t\t\t{\n\t\t\t\tall.map( ( { id, label, type, width } ) => {\n\t\t\t\t\tconst Icon = iconsMap[ id ];\n\n\t\t\t\t\tconst title = labelsMap[ type || 'default' ]\n\t\t\t\t\t\t.replace( '%s', label )\n\t\t\t\t\t\t.replace( '%d', width?.toString() || '' );\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Tab value={ id }\n\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\taria-label={ title }\n\t\t\t\t\t\t\ticon={ <Tooltip title={ title }><Icon /></Tooltip> }\n\t\t\t\t\t\t\tsx={ { minWidth: 'auto' } }\n\t\t\t\t\t\t\tdata-testid={ `switch-device-to-${ id }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t}\n\t\t</Tabs>\n\n\t);\n}\n\nfunction Tooltip( props: TooltipProps ) {\n\treturn <BaseTooltip\n\t\tPopperProps={ {\n\t\t\tsx: {\n\t\t\t\t'&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom': {\n\t\t\t\t\tmt: 2.5,\n\t\t\t\t},\n\t\t\t},\n\t\t} }\n\t\t{ ...props }\n\t/>;\n}\n\nconst iconsMap = {\n\twidescreen: WidescreenIcon,\n\tdesktop: DesktopIcon,\n\tlaptop: LaptopIcon,\n\ttablet_extra: TabletLandscapeIcon,\n\ttablet: TabletPortraitIcon,\n\tmobile_extra: MobileLandscapeIcon,\n\tmobile: MobilePortraitIcon,\n};\n\nconst labelsMap = {\n\tdefault: '%s',\n\t// translators: %s: Breakpoint label, %d: Breakpoint size.\n\t'min-width': __( '%s (%dpx and up)', 'elementor' ),\n\n\t// translators: %s: Breakpoint label, %d: Breakpoint size.\n\t'max-width': __( '%s (up to %dpx)', 'elementor' ),\n} as const;\n","import { __useSelector as useSelector } from '@elementor/store';\nimport { selectActiveBreakpoint, selectSortedBreakpoints } from '../store/selectors';\n\nexport default function useBreakpoints() {\n\tconst all = useSelector( selectSortedBreakpoints );\n\tconst active = useSelector( selectActiveBreakpoint );\n\n\treturn {\n\t\tall,\n\t\tactive,\n\t};\n}\n","import { slice } from './index';\nimport { Breakpoint } from '../types';\nimport { __createSelector, SliceState } from '@elementor/store';\n\ntype State = SliceState<typeof slice>;\n\nexport const selectEntities = ( state: State ) => state.breakpoints.entities;\nexport const selectActiveId = ( state: State ) => state.breakpoints.activeId;\n\nexport const selectActiveBreakpoint = __createSelector(\n\tselectEntities,\n\tselectActiveId,\n\t( entities, activeId ) => activeId && entities[ activeId ]\n\t\t? entities[ activeId ]\n\t\t: null,\n);\n\nexport const selectSortedBreakpoints = __createSelector(\n\tselectEntities,\n\t( entities ) => {\n\t\tconst byWidth = ( a: Breakpoint, b: Breakpoint ) => {\n\t\t\treturn ( a.width && b.width ) ? b.width - a.width : 0;\n\t\t};\n\n\t\tconst all = Object.values( entities );\n\n\t\tconst defaults = all.filter( ( breakpoint ) => ! breakpoint.width ); // AKA Desktop.\n\t\tconst minWidth = all.filter( ( breakpoint ) => breakpoint.type === 'min-width' );\n\t\tconst maxWidth = all.filter( ( breakpoint ) => breakpoint.type === 'max-width' );\n\n\t\t// Sort by size, big to small.\n\t\treturn [\n\t\t\t...minWidth.sort( byWidth ),\n\t\t\t...defaults,\n\t\t\t...maxWidth.sort( byWidth ),\n\t\t];\n\t},\n);\n","import { useCallback } from 'react';\nimport { BreakpointId } from '../types';\nimport { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';\n\nexport default function useBreakpointsActions() {\n\tconst activate = useCallback( ( device: BreakpointId ) => {\n\t\treturn runCommand( 'panel/change-device-mode', { device } );\n\t}, [] );\n\n\treturn {\n\t\tactivate,\n\t};\n}\n","import init from './init';\n\ninit();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAA6C;AAO7C,IAAM,eAAsB;AAAA,EAC3B,UAAU,CAAC;AAAA,EACX,UAAU;AACX;AAEO,IAAM,YAAQ,4BAAe;AAAA,EACnC,MAAM;AAAA,E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MACR,UAAU;AAAA;AAAA,IACX;AAAA,EACD,CAAE;AACH;;;AKxBA,KAAK;","names":["import_store","init","listenTo","import_i18n","import_store","import_store","useSelector","import_editor_v1_adapters","runCommand","BaseTooltip","import_store"]}
|
|
1
|
+
{"version":3,"sources":["../src/store/index.ts","../src/sync/sync-store.ts","../src/init.ts","../src/components/breakpoints-switcher.tsx","../src/hooks/use-breakpoints.ts","../src/store/selectors.ts","../src/hooks/use-breakpoints-actions.ts","../src/index.ts"],"sourcesContent":["import { __createSlice, PayloadAction } from '@elementor/store';\nimport { Breakpoint, BreakpointId } from '../types';\n\nexport type State = {\n\tentities: Record< BreakpointId, Breakpoint >;\n\tactiveId: BreakpointId | null;\n};\nconst initialState: State = {\n\tentities: {} as State[ 'entities' ],\n\tactiveId: null,\n};\n\nexport const slice = __createSlice( {\n\tname: 'breakpoints',\n\tinitialState,\n\treducers: {\n\t\tinit(\n\t\t\tstate,\n\t\t\taction: PayloadAction< {\n\t\t\t\tentities: Breakpoint[];\n\t\t\t\tactiveId: State[ 'activeId' ];\n\t\t\t} >\n\t\t) {\n\t\t\tstate.activeId = action.payload.activeId;\n\t\t\tstate.entities = normalizeEntities( action.payload.entities );\n\t\t},\n\n\t\tactivateBreakpoint( state, action: PayloadAction< BreakpointId > ) {\n\t\t\tif ( state.entities[ action.payload ] ) {\n\t\t\t\tstate.activeId = action.payload;\n\t\t\t}\n\t\t},\n\t},\n} );\n\nfunction normalizeEntities( entities: Breakpoint[] ) {\n\treturn entities.reduce(\n\t\t( acc, breakpoint ) => {\n\t\t\treturn {\n\t\t\t\t...acc,\n\t\t\t\t[ breakpoint.id ]: breakpoint,\n\t\t\t};\n\t\t},\n\t\t{} as State[ 'entities' ]\n\t);\n}\n","import { slice } from '../store';\nimport { __dispatch } from '@elementor/store';\nimport { Breakpoint, ExtendedWindow } from '../types';\nimport { __privateListenTo as listenTo, v1ReadyEvent, windowEvent } from '@elementor/editor-v1-adapters';\nimport { __ } from '@wordpress/i18n';\n\nexport default function syncStore() {\n\tsyncInitialization();\n\tsyncOnChange();\n}\n\nfunction syncInitialization() {\n\tconst { init } = slice.actions;\n\n\tlistenTo( v1ReadyEvent(), () => {\n\t\t__dispatch(\n\t\t\tinit( {\n\t\t\t\tentities: getBreakpoints(),\n\t\t\t\tactiveId: getActiveBreakpoint(),\n\t\t\t} )\n\t\t);\n\t} );\n}\n\nfunction syncOnChange() {\n\tconst { activateBreakpoint } = slice.actions;\n\n\tlistenTo( deviceModeChangeEvent(), () => {\n\t\tconst activeBreakpoint = getActiveBreakpoint();\n\n\t\t__dispatch( activateBreakpoint( activeBreakpoint ) );\n\t} );\n}\n\nfunction getBreakpoints() {\n\tconst { breakpoints } = ( window as unknown as ExtendedWindow ).elementor?.config?.responsive || {};\n\n\tif ( ! breakpoints ) {\n\t\treturn [];\n\t}\n\n\tconst entities = Object.entries( breakpoints )\n\t\t.filter( ( [ , breakpoint ] ) => breakpoint.is_enabled )\n\t\t.map( ( [ id, { value, direction, label } ] ) => {\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\tlabel,\n\t\t\t\twidth: value,\n\t\t\t\ttype: direction === 'min' ? 'min-width' : 'max-width',\n\t\t\t} as Breakpoint;\n\t\t} );\n\n\t// Desktop breakpoint is not included in V1 config.\n\tentities.push( {\n\t\tid: 'desktop',\n\t\tlabel: __( 'Desktop', 'elementor' ),\n\t} );\n\n\treturn entities;\n}\n\nfunction getActiveBreakpoint() {\n\tconst extendedWindow = window as unknown as ExtendedWindow;\n\n\treturn extendedWindow.elementor?.channels?.deviceMode?.request?.( 'currentMode' ) || null;\n}\n\nfunction deviceModeChangeEvent() {\n\treturn windowEvent( 'elementor/device-mode/change' );\n}\n","import { slice } from './store';\nimport syncStore from './sync/sync-store';\nimport { injectIntoResponsive } from '@elementor/editor-app-bar';\nimport BreakpointsSwitcher from './components/breakpoints-switcher';\nimport { __registerSlice } from '@elementor/store';\n\nexport default function init() {\n\tinitStore();\n\n\tregisterAppBarUI();\n}\n\nfunction initStore() {\n\t__registerSlice( slice );\n\n\tsyncStore();\n}\n\nfunction registerAppBarUI() {\n\tinjectIntoResponsive( {\n\t\tid: 'responsive-breakpoints-switcher',\n\t\tcomponent: BreakpointsSwitcher,\n\t\toptions: {\n\t\t\tpriority: 20, // After document indication.\n\t\t},\n\t} );\n}\n","import * as React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { BreakpointId, ExtendedWindow } from '../types';\nimport useBreakpoints from '../hooks/use-breakpoints';\nimport { Tab, Tabs, Tooltip as BaseTooltip, TooltipProps } from '@elementor/ui';\nimport {\n\tDesktopIcon,\n\tTabletPortraitIcon,\n\tMobilePortraitIcon,\n\tWidescreenIcon,\n\tLaptopIcon,\n\tTabletLandscapeIcon,\n\tMobileLandscapeIcon,\n} from '@elementor/icons';\nimport useBreakpointsActions from '../hooks/use-breakpoints-actions';\n\nexport default function BreakpointsSwitcher() {\n\tconst { all, active } = useBreakpoints();\n\tconst { activate } = useBreakpointsActions();\n\n\tif ( ! all.length || ! active ) {\n\t\treturn null;\n\t}\n\n\tconst onChange = ( _: unknown, value: BreakpointId ) => {\n\t\tconst extendedWindow = window as unknown as ExtendedWindow;\n\t\tconst config = extendedWindow?.elementor?.editorEvents?.config;\n\n\t\tif ( config ) {\n\t\t\textendedWindow.elementor.editorEvents.dispatchEvent( config.names.topBar.responsiveControls, {\n\t\t\t\tlocation: config.locations.topBar,\n\t\t\t\tsecondaryLocation: config.secondaryLocations.responsiveControls,\n\t\t\t\ttrigger: config.triggers.click,\n\t\t\t\telement: config.elements.buttonIcon,\n\t\t\t\tmode: value,\n\t\t\t} );\n\t\t}\n\n\t\tactivate( value );\n\t};\n\n\treturn (\n\t\t<Tabs\n\t\t\ttextColor=\"inherit\"\n\t\t\tindicatorColor=\"secondary\"\n\t\t\tvalue={ active.id }\n\t\t\tonChange={ onChange }\n\t\t\taria-label={ __( 'Switch Device', 'elementor' ) }\n\t\t\tsx={ {\n\t\t\t\t'& .MuiTabs-indicator': {\n\t\t\t\t\tbackgroundColor: 'text.primary',\n\t\t\t\t},\n\t\t\t} }\n\t\t>\n\t\t\t{ all.map( ( { id, label, type, width } ) => {\n\t\t\t\tconst Icon = iconsMap[ id ];\n\n\t\t\t\tconst title = labelsMap[ type || 'default' ]\n\t\t\t\t\t.replace( '%s', label )\n\t\t\t\t\t.replace( '%d', width?.toString() || '' );\n\n\t\t\t\treturn (\n\t\t\t\t\t<Tab\n\t\t\t\t\t\tvalue={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\taria-label={ title }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<Tooltip title={ title }>\n\t\t\t\t\t\t\t\t<Icon />\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsx={ { minWidth: 'auto' } }\n\t\t\t\t\t\tdata-testid={ `switch-device-to-${ id }` }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Tabs>\n\t);\n}\n\nfunction Tooltip( props: TooltipProps ) {\n\treturn (\n\t\t<BaseTooltip\n\t\t\tPopperProps={ {\n\t\t\t\tsx: {\n\t\t\t\t\t'&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom': {\n\t\t\t\t\t\tmt: 2.5,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nconst iconsMap = {\n\twidescreen: WidescreenIcon,\n\tdesktop: DesktopIcon,\n\tlaptop: LaptopIcon,\n\ttablet_extra: TabletLandscapeIcon,\n\ttablet: TabletPortraitIcon,\n\tmobile_extra: MobileLandscapeIcon,\n\tmobile: MobilePortraitIcon,\n};\n\nconst labelsMap = {\n\tdefault: '%s',\n\t// translators: %s: Breakpoint label, %d: Breakpoint size.\n\t'min-width': __( '%s (%dpx and up)', 'elementor' ),\n\n\t// translators: %s: Breakpoint label, %d: Breakpoint size.\n\t'max-width': __( '%s (up to %dpx)', 'elementor' ),\n} as const;\n","import { __useSelector as useSelector } from '@elementor/store';\nimport { selectActiveBreakpoint, selectSortedBreakpoints } from '../store/selectors';\n\nexport default function useBreakpoints() {\n\tconst all = useSelector( selectSortedBreakpoints );\n\tconst active = useSelector( selectActiveBreakpoint );\n\n\treturn {\n\t\tall,\n\t\tactive,\n\t};\n}\n","import { slice } from './index';\nimport { Breakpoint } from '../types';\nimport { __createSelector, SliceState } from '@elementor/store';\n\ntype State = SliceState< typeof slice >;\n\nexport const selectEntities = ( state: State ) => state.breakpoints.entities;\nexport const selectActiveId = ( state: State ) => state.breakpoints.activeId;\n\nexport const selectActiveBreakpoint = __createSelector( selectEntities, selectActiveId, ( entities, activeId ) =>\n\tactiveId && entities[ activeId ] ? entities[ activeId ] : null\n);\n\nexport const selectSortedBreakpoints = __createSelector( selectEntities, ( entities ) => {\n\tconst byWidth = ( a: Breakpoint, b: Breakpoint ) => {\n\t\treturn a.width && b.width ? b.width - a.width : 0;\n\t};\n\n\tconst all = Object.values( entities );\n\n\tconst defaults = all.filter( ( breakpoint ) => ! breakpoint.width ); // AKA Desktop.\n\tconst minWidth = all.filter( ( breakpoint ) => breakpoint.type === 'min-width' );\n\tconst maxWidth = all.filter( ( breakpoint ) => breakpoint.type === 'max-width' );\n\n\t// Sort by size, big to small.\n\treturn [ ...minWidth.sort( byWidth ), ...defaults, ...maxWidth.sort( byWidth ) ];\n} );\n","import { useCallback } from 'react';\nimport { BreakpointId } from '../types';\nimport { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';\n\nexport default function useBreakpointsActions() {\n\tconst activate = useCallback( ( device: BreakpointId ) => {\n\t\treturn runCommand( 'panel/change-device-mode', { device } );\n\t}, [] );\n\n\treturn {\n\t\tactivate,\n\t};\n}\n","import init from './init';\n\ninit();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAA6C;AAO7C,IAAM,eAAsB;AAAA,EAC3B,UAAU,CAAC;AAAA,EACX,UAAU;AACX;AAE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U;AAAA;AAAA,IACX;AAAA,EACD,CAAE;AACH;;;AKxBA,KAAK;","names":["import_store","init","listenTo","import_i18n","import_store","import_store","useSelector","import_editor_v1_adapters","runCommand","BaseTooltip","import_store"]}
|