@wordpress/block-library 8.17.1 → 8.18.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 +2 -0
- package/build/cover/edit/index.js +3 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/shared.js +26 -21
- package/build/cover/shared.js.map +1 -1
- package/build/embed/embed-link-settings.native.js +0 -1
- package/build/embed/embed-link-settings.native.js.map +1 -1
- package/build/post-content/edit.js +1 -1
- package/build/post-content/edit.js.map +1 -1
- package/build/post-template/index.js +1 -1
- package/build/query/edit/inspector-controls/index.js +28 -3
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +2 -1
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/index.js +9 -2
- package/build/query/index.js.map +1 -1
- package/build/query/view.js +75 -0
- package/build/query/view.js.map +1 -0
- package/build/query-pagination-next/index.js +1 -1
- package/build/query-pagination-numbers/edit.js +50 -5
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-pagination-numbers/index.js +7 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +1 -1
- package/build/search/edit.js +3 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/utils.js +2 -4
- package/build/search/utils.js.map +1 -1
- package/build/social-link/edit.native.js +1 -3
- package/build/social-link/edit.native.js.map +1 -1
- package/build-module/cover/edit/index.js +3 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/shared.js +26 -21
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/embed/embed-link-settings.native.js +0 -1
- package/build-module/embed/embed-link-settings.native.js.map +1 -1
- package/build-module/post-content/edit.js +1 -1
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -1
- package/build-module/query/edit/inspector-controls/index.js +29 -4
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +2 -1
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/index.js +9 -2
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/view.js +72 -0
- package/build-module/query/view.js.map +1 -0
- package/build-module/query-pagination-next/index.js +1 -1
- package/build-module/query-pagination-numbers/edit.js +51 -6
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +7 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +1 -1
- package/build-module/search/edit.js +4 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/utils.js +0 -1
- package/build-module/search/utils.js.map +1 -1
- package/build-module/social-link/edit.native.js +1 -3
- package/build-module/social-link/edit.native.js.map +1 -1
- package/build-style/query/style-rtl.css +140 -0
- package/build-style/query/style.css +140 -0
- package/build-style/site-logo/style-rtl.css +1 -0
- package/build-style/site-logo/style.css +1 -0
- package/build-style/style-rtl.css +1 -0
- package/build-style/style.css +1 -0
- package/package.json +32 -32
- package/src/audio/test/__snapshots__/edit.native.js.snap +106 -78
- package/src/cover/edit/index.js +3 -1
- package/src/cover/shared.js +25 -20
- package/src/cover/test/edit.native.js +1 -5
- package/src/embed/embed-link-settings.native.js +0 -1
- package/src/embed/test/index.native.js +9 -9
- package/src/file/test/__snapshots__/edit.native.js.snap +218 -162
- package/src/image/index.php +5 -0
- package/src/post-content/edit.js +2 -2
- package/src/post-content/index.php +0 -6
- package/src/post-featured-image/index.php +0 -6
- package/src/post-template/block.json +2 -1
- package/src/post-template/index.php +19 -4
- package/src/query/block.json +9 -2
- package/src/query/edit/inspector-controls/index.js +46 -3
- package/src/query/edit/query-content.js +1 -0
- package/src/query/index.php +94 -1
- package/src/query/style.scss +63 -0
- package/src/query/view.js +82 -0
- package/src/query-no-results/index.php +1 -5
- package/src/query-pagination-next/block.json +7 -1
- package/src/query-pagination-next/index.php +20 -3
- package/src/query-pagination-numbers/block.json +7 -1
- package/src/query-pagination-numbers/edit.js +64 -16
- package/src/query-pagination-numbers/index.php +27 -4
- package/src/query-pagination-previous/block.json +7 -1
- package/src/query-pagination-previous/index.php +19 -2
- package/src/search/edit.js +8 -2
- package/src/search/test/__snapshots__/edit.native.js.snap +363 -265
- package/src/search/utils.js +0 -1
- package/src/site-logo/style.scss +1 -0
- package/src/social-link/edit.native.js +1 -1
- package/src/social-link/editor.native.scss +0 -4
- package/src/social-links/test/edit.native.js +30 -0
- package/src/social-link/test/index.native.js +0 -132
|
@@ -64,7 +64,7 @@ exports[`File block renders file error state without crashing 1`] = `
|
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
>
|
|
67
|
-
<
|
|
67
|
+
<View
|
|
68
68
|
accessibilityState={
|
|
69
69
|
{
|
|
70
70
|
"busy": undefined,
|
|
@@ -74,59 +74,73 @@ exports[`File block renders file error state without crashing 1`] = `
|
|
|
74
74
|
"selected": undefined,
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
activeFormats={[]}
|
|
79
|
-
blockType={
|
|
77
|
+
accessibilityValue={
|
|
80
78
|
{
|
|
81
|
-
"
|
|
79
|
+
"max": undefined,
|
|
80
|
+
"min": undefined,
|
|
81
|
+
"now": undefined,
|
|
82
|
+
"text": undefined,
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
accessible={false}
|
|
86
|
+
collapsable={false}
|
|
86
87
|
focusable={true}
|
|
87
|
-
fontFamily="serif"
|
|
88
|
-
fontSize={16}
|
|
89
|
-
isMultiline={false}
|
|
90
|
-
maxImagesWidth={200}
|
|
91
|
-
onBackspace={[Function]}
|
|
92
88
|
onBlur={[Function]}
|
|
93
|
-
onChange={[Function]}
|
|
94
89
|
onClick={[Function]}
|
|
95
|
-
onContentSizeChange={[Function]}
|
|
96
|
-
onEnter={[Function]}
|
|
97
90
|
onFocus={[Function]}
|
|
98
|
-
onHTMLContentWithCursor={[Function]}
|
|
99
|
-
onKeyDown={[Function]}
|
|
100
|
-
onPaste={[Function]}
|
|
101
91
|
onResponderGrant={[Function]}
|
|
102
92
|
onResponderMove={[Function]}
|
|
103
93
|
onResponderRelease={[Function]}
|
|
104
94
|
onResponderTerminate={[Function]}
|
|
105
95
|
onResponderTerminationRequest={[Function]}
|
|
106
|
-
onSelectionChange={[Function]}
|
|
107
96
|
onStartShouldSetResponder={[Function]}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"minHeight": 0,
|
|
97
|
+
>
|
|
98
|
+
<RCTAztecView
|
|
99
|
+
activeFormats={[]}
|
|
100
|
+
blockType={
|
|
101
|
+
{
|
|
102
|
+
"tag": "p",
|
|
103
|
+
}
|
|
116
104
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
105
|
+
deleteEnter={true}
|
|
106
|
+
disableEditingMenu={false}
|
|
107
|
+
fontFamily="serif"
|
|
108
|
+
fontSize={16}
|
|
109
|
+
isMultiline={false}
|
|
110
|
+
maxImagesWidth={200}
|
|
111
|
+
onBackspace={[Function]}
|
|
112
|
+
onBlur={[Function]}
|
|
113
|
+
onChange={[Function]}
|
|
114
|
+
onContentSizeChange={[Function]}
|
|
115
|
+
onEnter={[Function]}
|
|
116
|
+
onFocus={[Function]}
|
|
117
|
+
onHTMLContentWithCursor={[Function]}
|
|
118
|
+
onKeyDown={[Function]}
|
|
119
|
+
onPaste={[Function]}
|
|
120
|
+
onSelectionChange={[Function]}
|
|
121
|
+
placeholder="File name"
|
|
122
|
+
placeholderTextColor="gray"
|
|
123
|
+
selectionColor="black"
|
|
124
|
+
style={
|
|
125
|
+
{
|
|
126
|
+
"backgroundColor": undefined,
|
|
127
|
+
"maxWidth": undefined,
|
|
128
|
+
"minHeight": 0,
|
|
129
|
+
}
|
|
125
130
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
text={
|
|
132
|
+
{
|
|
133
|
+
"eventCount": undefined,
|
|
134
|
+
"linkTextColor": undefined,
|
|
135
|
+
"selection": null,
|
|
136
|
+
"tag": "p",
|
|
137
|
+
"text": "<p>File name</p>",
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
textAlign="left"
|
|
141
|
+
triggerKeyCodes={[]}
|
|
142
|
+
/>
|
|
143
|
+
</View>
|
|
130
144
|
</View>
|
|
131
145
|
<View>
|
|
132
146
|
<Svg
|
|
@@ -179,7 +193,7 @@ exports[`File block renders file error state without crashing 1`] = `
|
|
|
179
193
|
]
|
|
180
194
|
}
|
|
181
195
|
>
|
|
182
|
-
<
|
|
196
|
+
<View
|
|
183
197
|
accessibilityState={
|
|
184
198
|
{
|
|
185
199
|
"busy": undefined,
|
|
@@ -189,62 +203,76 @@ exports[`File block renders file error state without crashing 1`] = `
|
|
|
189
203
|
"selected": undefined,
|
|
190
204
|
}
|
|
191
205
|
}
|
|
192
|
-
|
|
193
|
-
activeFormats={[]}
|
|
194
|
-
blockType={
|
|
206
|
+
accessibilityValue={
|
|
195
207
|
{
|
|
196
|
-
"
|
|
208
|
+
"max": undefined,
|
|
209
|
+
"min": undefined,
|
|
210
|
+
"now": undefined,
|
|
211
|
+
"text": undefined,
|
|
197
212
|
}
|
|
198
213
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
disableEditingMenu={false}
|
|
214
|
+
accessible={false}
|
|
215
|
+
collapsable={false}
|
|
202
216
|
focusable={true}
|
|
203
|
-
fontFamily="serif"
|
|
204
|
-
fontSize={16}
|
|
205
|
-
isMultiline={false}
|
|
206
|
-
maxImagesWidth={200}
|
|
207
|
-
minWidth={40}
|
|
208
|
-
onBackspace={[Function]}
|
|
209
217
|
onBlur={[Function]}
|
|
210
|
-
onChange={[Function]}
|
|
211
218
|
onClick={[Function]}
|
|
212
|
-
onContentSizeChange={[Function]}
|
|
213
|
-
onEnter={[Function]}
|
|
214
219
|
onFocus={[Function]}
|
|
215
|
-
onHTMLContentWithCursor={[Function]}
|
|
216
|
-
onKeyDown={[Function]}
|
|
217
|
-
onPaste={[Function]}
|
|
218
220
|
onResponderGrant={[Function]}
|
|
219
221
|
onResponderMove={[Function]}
|
|
220
222
|
onResponderRelease={[Function]}
|
|
221
223
|
onResponderTerminate={[Function]}
|
|
222
224
|
onResponderTerminationRequest={[Function]}
|
|
223
|
-
onSelectionChange={[Function]}
|
|
224
225
|
onStartShouldSetResponder={[Function]}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
"maxWidth": 80,
|
|
233
|
-
"minHeight": 0,
|
|
226
|
+
>
|
|
227
|
+
<RCTAztecView
|
|
228
|
+
activeFormats={[]}
|
|
229
|
+
blockType={
|
|
230
|
+
{
|
|
231
|
+
"tag": "p",
|
|
232
|
+
}
|
|
234
233
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
234
|
+
color="white"
|
|
235
|
+
deleteEnter={true}
|
|
236
|
+
disableEditingMenu={false}
|
|
237
|
+
fontFamily="serif"
|
|
238
|
+
fontSize={16}
|
|
239
|
+
isMultiline={false}
|
|
240
|
+
maxImagesWidth={200}
|
|
241
|
+
minWidth={40}
|
|
242
|
+
onBackspace={[Function]}
|
|
243
|
+
onBlur={[Function]}
|
|
244
|
+
onChange={[Function]}
|
|
245
|
+
onContentSizeChange={[Function]}
|
|
246
|
+
onEnter={[Function]}
|
|
247
|
+
onFocus={[Function]}
|
|
248
|
+
onHTMLContentWithCursor={[Function]}
|
|
249
|
+
onKeyDown={[Function]}
|
|
250
|
+
onPaste={[Function]}
|
|
251
|
+
onSelectionChange={[Function]}
|
|
252
|
+
placeholder=""
|
|
253
|
+
placeholderTextColor="white"
|
|
254
|
+
selectionColor="white"
|
|
255
|
+
style={
|
|
256
|
+
{
|
|
257
|
+
"backgroundColor": undefined,
|
|
258
|
+
"color": "white",
|
|
259
|
+
"maxWidth": 80,
|
|
260
|
+
"minHeight": 0,
|
|
261
|
+
}
|
|
243
262
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
263
|
+
text={
|
|
264
|
+
{
|
|
265
|
+
"eventCount": undefined,
|
|
266
|
+
"linkTextColor": undefined,
|
|
267
|
+
"selection": null,
|
|
268
|
+
"tag": "p",
|
|
269
|
+
"text": "<p>Download</p>",
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
textAlign="center"
|
|
273
|
+
triggerKeyCodes={[]}
|
|
274
|
+
/>
|
|
275
|
+
</View>
|
|
248
276
|
</View>
|
|
249
277
|
</View>
|
|
250
278
|
</View>
|
|
@@ -315,7 +343,7 @@ exports[`File block renders file without crashing 1`] = `
|
|
|
315
343
|
]
|
|
316
344
|
}
|
|
317
345
|
>
|
|
318
|
-
<
|
|
346
|
+
<View
|
|
319
347
|
accessibilityState={
|
|
320
348
|
{
|
|
321
349
|
"busy": undefined,
|
|
@@ -325,59 +353,73 @@ exports[`File block renders file without crashing 1`] = `
|
|
|
325
353
|
"selected": undefined,
|
|
326
354
|
}
|
|
327
355
|
}
|
|
328
|
-
|
|
329
|
-
activeFormats={[]}
|
|
330
|
-
blockType={
|
|
356
|
+
accessibilityValue={
|
|
331
357
|
{
|
|
332
|
-
"
|
|
358
|
+
"max": undefined,
|
|
359
|
+
"min": undefined,
|
|
360
|
+
"now": undefined,
|
|
361
|
+
"text": undefined,
|
|
333
362
|
}
|
|
334
363
|
}
|
|
335
|
-
|
|
336
|
-
|
|
364
|
+
accessible={false}
|
|
365
|
+
collapsable={false}
|
|
337
366
|
focusable={true}
|
|
338
|
-
fontFamily="serif"
|
|
339
|
-
fontSize={16}
|
|
340
|
-
isMultiline={false}
|
|
341
|
-
maxImagesWidth={200}
|
|
342
|
-
onBackspace={[Function]}
|
|
343
367
|
onBlur={[Function]}
|
|
344
|
-
onChange={[Function]}
|
|
345
368
|
onClick={[Function]}
|
|
346
|
-
onContentSizeChange={[Function]}
|
|
347
|
-
onEnter={[Function]}
|
|
348
369
|
onFocus={[Function]}
|
|
349
|
-
onHTMLContentWithCursor={[Function]}
|
|
350
|
-
onKeyDown={[Function]}
|
|
351
|
-
onPaste={[Function]}
|
|
352
370
|
onResponderGrant={[Function]}
|
|
353
371
|
onResponderMove={[Function]}
|
|
354
372
|
onResponderRelease={[Function]}
|
|
355
373
|
onResponderTerminate={[Function]}
|
|
356
374
|
onResponderTerminationRequest={[Function]}
|
|
357
|
-
onSelectionChange={[Function]}
|
|
358
375
|
onStartShouldSetResponder={[Function]}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
"minHeight": 0,
|
|
376
|
+
>
|
|
377
|
+
<RCTAztecView
|
|
378
|
+
activeFormats={[]}
|
|
379
|
+
blockType={
|
|
380
|
+
{
|
|
381
|
+
"tag": "p",
|
|
382
|
+
}
|
|
367
383
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
384
|
+
deleteEnter={true}
|
|
385
|
+
disableEditingMenu={false}
|
|
386
|
+
fontFamily="serif"
|
|
387
|
+
fontSize={16}
|
|
388
|
+
isMultiline={false}
|
|
389
|
+
maxImagesWidth={200}
|
|
390
|
+
onBackspace={[Function]}
|
|
391
|
+
onBlur={[Function]}
|
|
392
|
+
onChange={[Function]}
|
|
393
|
+
onContentSizeChange={[Function]}
|
|
394
|
+
onEnter={[Function]}
|
|
395
|
+
onFocus={[Function]}
|
|
396
|
+
onHTMLContentWithCursor={[Function]}
|
|
397
|
+
onKeyDown={[Function]}
|
|
398
|
+
onPaste={[Function]}
|
|
399
|
+
onSelectionChange={[Function]}
|
|
400
|
+
placeholder="File name"
|
|
401
|
+
placeholderTextColor="gray"
|
|
402
|
+
selectionColor="black"
|
|
403
|
+
style={
|
|
404
|
+
{
|
|
405
|
+
"backgroundColor": undefined,
|
|
406
|
+
"maxWidth": undefined,
|
|
407
|
+
"minHeight": 0,
|
|
408
|
+
}
|
|
376
409
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
410
|
+
text={
|
|
411
|
+
{
|
|
412
|
+
"eventCount": undefined,
|
|
413
|
+
"linkTextColor": undefined,
|
|
414
|
+
"selection": null,
|
|
415
|
+
"tag": "p",
|
|
416
|
+
"text": "<p>File name</p>",
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
textAlign="left"
|
|
420
|
+
triggerKeyCodes={[]}
|
|
421
|
+
/>
|
|
422
|
+
</View>
|
|
381
423
|
</View>
|
|
382
424
|
</View>
|
|
383
425
|
<View
|
|
@@ -404,7 +446,7 @@ exports[`File block renders file without crashing 1`] = `
|
|
|
404
446
|
]
|
|
405
447
|
}
|
|
406
448
|
>
|
|
407
|
-
<
|
|
449
|
+
<View
|
|
408
450
|
accessibilityState={
|
|
409
451
|
{
|
|
410
452
|
"busy": undefined,
|
|
@@ -414,62 +456,76 @@ exports[`File block renders file without crashing 1`] = `
|
|
|
414
456
|
"selected": undefined,
|
|
415
457
|
}
|
|
416
458
|
}
|
|
417
|
-
|
|
418
|
-
activeFormats={[]}
|
|
419
|
-
blockType={
|
|
459
|
+
accessibilityValue={
|
|
420
460
|
{
|
|
421
|
-
"
|
|
461
|
+
"max": undefined,
|
|
462
|
+
"min": undefined,
|
|
463
|
+
"now": undefined,
|
|
464
|
+
"text": undefined,
|
|
422
465
|
}
|
|
423
466
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
disableEditingMenu={false}
|
|
467
|
+
accessible={false}
|
|
468
|
+
collapsable={false}
|
|
427
469
|
focusable={true}
|
|
428
|
-
fontFamily="serif"
|
|
429
|
-
fontSize={16}
|
|
430
|
-
isMultiline={false}
|
|
431
|
-
maxImagesWidth={200}
|
|
432
|
-
minWidth={40}
|
|
433
|
-
onBackspace={[Function]}
|
|
434
470
|
onBlur={[Function]}
|
|
435
|
-
onChange={[Function]}
|
|
436
471
|
onClick={[Function]}
|
|
437
|
-
onContentSizeChange={[Function]}
|
|
438
|
-
onEnter={[Function]}
|
|
439
472
|
onFocus={[Function]}
|
|
440
|
-
onHTMLContentWithCursor={[Function]}
|
|
441
|
-
onKeyDown={[Function]}
|
|
442
|
-
onPaste={[Function]}
|
|
443
473
|
onResponderGrant={[Function]}
|
|
444
474
|
onResponderMove={[Function]}
|
|
445
475
|
onResponderRelease={[Function]}
|
|
446
476
|
onResponderTerminate={[Function]}
|
|
447
477
|
onResponderTerminationRequest={[Function]}
|
|
448
|
-
onSelectionChange={[Function]}
|
|
449
478
|
onStartShouldSetResponder={[Function]}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
"maxWidth": 80,
|
|
458
|
-
"minHeight": 0,
|
|
479
|
+
>
|
|
480
|
+
<RCTAztecView
|
|
481
|
+
activeFormats={[]}
|
|
482
|
+
blockType={
|
|
483
|
+
{
|
|
484
|
+
"tag": "p",
|
|
485
|
+
}
|
|
459
486
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
{
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
487
|
+
color="white"
|
|
488
|
+
deleteEnter={true}
|
|
489
|
+
disableEditingMenu={false}
|
|
490
|
+
fontFamily="serif"
|
|
491
|
+
fontSize={16}
|
|
492
|
+
isMultiline={false}
|
|
493
|
+
maxImagesWidth={200}
|
|
494
|
+
minWidth={40}
|
|
495
|
+
onBackspace={[Function]}
|
|
496
|
+
onBlur={[Function]}
|
|
497
|
+
onChange={[Function]}
|
|
498
|
+
onContentSizeChange={[Function]}
|
|
499
|
+
onEnter={[Function]}
|
|
500
|
+
onFocus={[Function]}
|
|
501
|
+
onHTMLContentWithCursor={[Function]}
|
|
502
|
+
onKeyDown={[Function]}
|
|
503
|
+
onPaste={[Function]}
|
|
504
|
+
onSelectionChange={[Function]}
|
|
505
|
+
placeholder=""
|
|
506
|
+
placeholderTextColor="white"
|
|
507
|
+
selectionColor="white"
|
|
508
|
+
style={
|
|
509
|
+
{
|
|
510
|
+
"backgroundColor": undefined,
|
|
511
|
+
"color": "white",
|
|
512
|
+
"maxWidth": 80,
|
|
513
|
+
"minHeight": 0,
|
|
514
|
+
}
|
|
468
515
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
516
|
+
text={
|
|
517
|
+
{
|
|
518
|
+
"eventCount": undefined,
|
|
519
|
+
"linkTextColor": undefined,
|
|
520
|
+
"selection": null,
|
|
521
|
+
"tag": "p",
|
|
522
|
+
"text": "<p>Download</p>",
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
textAlign="center"
|
|
526
|
+
triggerKeyCodes={[]}
|
|
527
|
+
/>
|
|
528
|
+
</View>
|
|
473
529
|
</View>
|
|
474
530
|
</View>
|
|
475
531
|
</View>
|
package/src/image/index.php
CHANGED
|
@@ -54,6 +54,11 @@ function render_block_core_image( $attributes, $content, $block ) {
|
|
|
54
54
|
$should_load_view_script = true;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// If at least one block in the page has the lightbox, mark the block type as interactive.
|
|
58
|
+
if ( $should_load_view_script ) {
|
|
59
|
+
$block->block_type->supports['interactivity'] = true;
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
$view_js_file = 'wp-block-image-view';
|
|
58
63
|
if ( ! wp_script_is( $view_js_file ) ) {
|
|
59
64
|
$script_handles = $block->block_type->view_script_handles;
|
package/src/post-content/edit.js
CHANGED
|
@@ -103,7 +103,7 @@ function Placeholder( { layoutClassNames } ) {
|
|
|
103
103
|
<div { ...blockProps }>
|
|
104
104
|
<p>
|
|
105
105
|
{ __(
|
|
106
|
-
'This is the
|
|
106
|
+
'This is the Content block, it will display all the blocks in any single post or page.'
|
|
107
107
|
) }
|
|
108
108
|
</p>
|
|
109
109
|
<p>
|
|
@@ -113,7 +113,7 @@ function Placeholder( { layoutClassNames } ) {
|
|
|
113
113
|
</p>
|
|
114
114
|
<p>
|
|
115
115
|
{ __(
|
|
116
|
-
'If there are any Custom Post Types registered at your site, the
|
|
116
|
+
'If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.'
|
|
117
117
|
) }
|
|
118
118
|
</p>
|
|
119
119
|
</div>
|
|
@@ -35,12 +35,6 @@ function render_block_core_post_content( $attributes, $content, $block ) {
|
|
|
35
35
|
|
|
36
36
|
$seen_ids[ $post_id ] = true;
|
|
37
37
|
|
|
38
|
-
// Check is needed for backward compatibility with third-party plugins
|
|
39
|
-
// that might rely on the `in_the_loop` check; calling `the_post` sets it to true.
|
|
40
|
-
if ( ! in_the_loop() && have_posts() ) {
|
|
41
|
-
the_post();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
38
|
// When inside the main loop, we want to use queried object
|
|
45
39
|
// so that `the_preview` for the current post can apply.
|
|
46
40
|
// We force this behavior by omitting the third argument (post ID) from the `get_the_content`.
|
|
@@ -19,12 +19,6 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
19
19
|
}
|
|
20
20
|
$post_ID = $block->context['postId'];
|
|
21
21
|
|
|
22
|
-
// Check is needed for backward compatibility with third-party plugins
|
|
23
|
-
// that might rely on the `in_the_loop` check; calling `the_post` sets it to true.
|
|
24
|
-
if ( ! in_the_loop() && have_posts() ) {
|
|
25
|
-
the_post();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
22
|
$is_link = isset( $attributes['isLink'] ) && $attributes['isLink'];
|
|
29
23
|
$size_slug = isset( $attributes['sizeSlug'] ) ? $attributes['sizeSlug'] : 'post-thumbnail';
|
|
30
24
|
$attr = get_block_core_post_featured_image_border_attributes( $attributes );
|
|
@@ -43,14 +43,26 @@ function block_core_post_template_uses_featured_image( $inner_blocks ) {
|
|
|
43
43
|
* @return string Returns the output of the query, structured using the layout defined by the block's inner blocks.
|
|
44
44
|
*/
|
|
45
45
|
function render_block_core_post_template( $attributes, $content, $block ) {
|
|
46
|
-
$page_key
|
|
47
|
-
$
|
|
46
|
+
$page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
|
|
47
|
+
$enhanced_pagination = isset( $block->context['enhancedPagination'] ) && $block->context['enhancedPagination'];
|
|
48
|
+
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
|
|
48
49
|
|
|
49
50
|
// Use global query if needed.
|
|
50
51
|
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
|
|
51
52
|
if ( $use_global_query ) {
|
|
52
53
|
global $wp_query;
|
|
53
|
-
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* If already in the main query loop, duplicate the query instance to not tamper with the main instance.
|
|
57
|
+
* Since this is a nested query, it should start at the beginning, therefore rewind posts.
|
|
58
|
+
* Otherwise, the main query loop has not started yet and this block is responsible for doing so.
|
|
59
|
+
*/
|
|
60
|
+
if ( in_the_loop() ) {
|
|
61
|
+
$query = clone $wp_query;
|
|
62
|
+
$query->rewind_posts();
|
|
63
|
+
} else {
|
|
64
|
+
$query = $wp_query;
|
|
65
|
+
}
|
|
54
66
|
} else {
|
|
55
67
|
$query_args = build_query_vars_from_query_block( $block, $page );
|
|
56
68
|
$query = new WP_Query( $query_args );
|
|
@@ -109,7 +121,10 @@ function render_block_core_post_template( $attributes, $content, $block ) {
|
|
|
109
121
|
|
|
110
122
|
// Wrap the render inner blocks in a `li` element with the appropriate post classes.
|
|
111
123
|
$post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );
|
|
112
|
-
|
|
124
|
+
|
|
125
|
+
$inner_block_directives = $enhanced_pagination ? ' data-wp-key="post-template-item-' . $post_id . '"' : '';
|
|
126
|
+
|
|
127
|
+
$content .= '<li' . $inner_block_directives . ' class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
|
|
113
128
|
}
|
|
114
129
|
|
|
115
130
|
/*
|
package/src/query/block.json
CHANGED
|
@@ -34,17 +34,24 @@
|
|
|
34
34
|
},
|
|
35
35
|
"namespace": {
|
|
36
36
|
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"enhancedPagination": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": false
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"providesContext": {
|
|
40
44
|
"queryId": "queryId",
|
|
41
45
|
"query": "query",
|
|
42
|
-
"displayLayout": "displayLayout"
|
|
46
|
+
"displayLayout": "displayLayout",
|
|
47
|
+
"enhancedPagination": "enhancedPagination"
|
|
43
48
|
},
|
|
44
49
|
"supports": {
|
|
45
50
|
"align": [ "wide", "full" ],
|
|
46
51
|
"html": false,
|
|
47
52
|
"layout": true
|
|
48
53
|
},
|
|
49
|
-
"editorStyle": "wp-block-query-editor"
|
|
54
|
+
"editorStyle": "wp-block-query-editor",
|
|
55
|
+
"style": "wp-block-query",
|
|
56
|
+
"viewScript": "file:./view.min.js"
|
|
50
57
|
}
|