@wordpress/block-editor 13.0.3 → 13.2.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 +21 -17
- package/README.md +1 -1
- package/build/components/block-lock/modal.js +67 -67
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-mover/index.js +12 -6
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/child-layout-control/index.js +185 -127
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +18 -10
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/grid/grid-item-movers.js +97 -0
- package/build/components/grid/grid-item-movers.js.map +1 -0
- package/build/components/{grid-visualizer → grid}/grid-item-resizer.js +18 -56
- package/build/components/grid/grid-item-resizer.js.map +1 -0
- package/build/components/grid/grid-visualizer.js +225 -0
- package/build/components/grid/grid-visualizer.js.map +1 -0
- package/build/components/{grid-visualizer → grid}/index.js +14 -0
- package/build/components/grid/index.js.map +1 -0
- package/build/components/grid/use-get-number-of-blocks-before-cell.js +40 -0
- package/build/components/grid/use-get-number-of-blocks-before-cell.js.map +1 -0
- package/build/components/grid/use-grid-layout-sync.js +162 -0
- package/build/components/grid/use-grid-layout-sync.js.map +1 -0
- package/build/components/grid/utils.js +145 -0
- package/build/components/grid/utils.js.map +1 -0
- package/build/components/inner-blocks/index.js +1 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +1 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/link-control/link-preview.js +12 -1
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/provider/use-block-sync.js +1 -7
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/rich-text/event-listeners/input-rules.js +1 -0
- package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build/components/rich-text/index.native.js +14 -4
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +20 -4
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/hooks/block-style-variation.js +2 -2
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/layout-child.js +29 -21
- package/build/hooks/layout-child.js.map +1 -1
- package/build/layouts/grid.js +24 -47
- package/build/layouts/grid.js.map +1 -1
- package/build/store/private-actions.js +0 -34
- package/build/store/private-actions.js.map +1 -1
- package/build-module/components/block-lock/modal.js +67 -67
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-mover/index.js +12 -6
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +185 -127
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +19 -11
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/grid/grid-item-movers.js +90 -0
- package/build-module/components/grid/grid-item-movers.js.map +1 -0
- package/build-module/components/{grid-visualizer → grid}/grid-item-resizer.js +13 -51
- package/build-module/components/grid/grid-item-resizer.js.map +1 -0
- package/build-module/components/grid/grid-visualizer.js +217 -0
- package/build-module/components/grid/grid-visualizer.js.map +1 -0
- package/build-module/components/grid/index.js +5 -0
- package/build-module/components/grid/index.js.map +1 -0
- package/build-module/components/grid/use-get-number-of-blocks-before-cell.js +33 -0
- package/build-module/components/grid/use-get-number-of-blocks-before-cell.js.map +1 -0
- package/build-module/components/grid/use-grid-layout-sync.js +155 -0
- package/build-module/components/grid/use-grid-layout-sync.js.map +1 -0
- package/build-module/components/grid/utils.js +131 -0
- package/build-module/components/grid/utils.js.map +1 -0
- package/build-module/components/inner-blocks/index.js +1 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +1 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +14 -1
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +1 -7
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js +1 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +15 -5
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +20 -4
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +2 -2
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/layout-child.js +27 -19
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/layouts/grid.js +24 -47
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/store/private-actions.js +0 -33
- package/build-module/store/private-actions.js.map +1 -1
- package/build-style/style-rtl.css +38 -16
- package/build-style/style.css +38 -16
- package/package.json +31 -31
- package/src/components/block-lock/modal.js +95 -82
- package/src/components/block-lock/style.scss +11 -1
- package/src/components/block-mover/index.js +37 -24
- package/src/components/child-layout-control/index.js +224 -159
- package/src/components/date-format-picker/index.js +25 -13
- package/src/components/grid/grid-item-movers.js +128 -0
- package/src/components/{grid-visualizer → grid}/grid-item-resizer.js +14 -52
- package/src/components/grid/grid-visualizer.js +267 -0
- package/src/components/grid/index.js +4 -0
- package/src/components/grid/style.scss +63 -0
- package/src/components/grid/use-get-number-of-blocks-before-cell.js +30 -0
- package/src/components/grid/use-grid-layout-sync.js +167 -0
- package/src/components/grid/utils.js +178 -0
- package/src/components/inner-blocks/index.js +3 -1
- package/src/components/inserter/block-types-tab.native.js +2 -1
- package/src/components/link-control/link-preview.js +18 -1
- package/src/components/provider/use-block-sync.js +0 -6
- package/src/components/rich-text/event-listeners/input-rules.js +1 -1
- package/src/components/rich-text/index.native.js +14 -8
- package/src/components/rich-text/native/index.native.js +20 -1
- package/src/hooks/block-style-variation.js +2 -2
- package/src/hooks/layout-child.js +34 -14
- package/src/layouts/grid.js +54 -62
- package/src/store/private-actions.js +0 -29
- package/src/style.scss +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js.map +0 -1
- package/build/components/grid-visualizer/grid-visualizer.js +0 -92
- package/build/components/grid-visualizer/grid-visualizer.js.map +0 -1
- package/build/components/grid-visualizer/index.js.map +0 -1
- package/build/components/grid-visualizer/utils.js +0 -10
- package/build/components/grid-visualizer/utils.js.map +0 -1
- package/build/store/undo-ignore.js +0 -11
- package/build/store/undo-ignore.js.map +0 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +0 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js +0 -84
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +0 -1
- package/build-module/components/grid-visualizer/index.js +0 -3
- package/build-module/components/grid-visualizer/index.js.map +0 -1
- package/build-module/components/grid-visualizer/utils.js +0 -4
- package/build-module/components/grid-visualizer/utils.js.map +0 -1
- package/build-module/store/undo-ignore.js +0 -5
- package/build-module/store/undo-ignore.js.map +0 -1
- package/src/components/grid-visualizer/grid-visualizer.js +0 -101
- package/src/components/grid-visualizer/index.js +0 -2
- package/src/components/grid-visualizer/style.scss +0 -34
- package/src/components/grid-visualizer/utils.js +0 -5
- package/src/store/undo-ignore.js +0 -4
- /package/src/components/font-sizes/{README.MD → README.md} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 13.2.0 (2024-06-26)
|
|
6
|
+
|
|
7
|
+
## 13.1.0 (2024-06-15)
|
|
8
|
+
|
|
5
9
|
## 13.0.0 (2024-05-31)
|
|
6
10
|
|
|
7
11
|
### Breaking Changes
|
|
@@ -78,7 +82,7 @@
|
|
|
78
82
|
|
|
79
83
|
- Add `HeadingLevelDropdown` component for selecting H1-H6 and paragraph HTML tags from the block toolbar.
|
|
80
84
|
|
|
81
|
-
### Bug
|
|
85
|
+
### Bug Fixes
|
|
82
86
|
|
|
83
87
|
- Fluid typography: custom font-sizes should use max viewport width ([#51516](https://github.com/WordPress/gutenberg/pull/51516)).
|
|
84
88
|
|
|
@@ -106,13 +110,13 @@
|
|
|
106
110
|
|
|
107
111
|
## 11.5.0 (2023-03-01)
|
|
108
112
|
|
|
109
|
-
### Bug
|
|
113
|
+
### Bug Fixes
|
|
110
114
|
|
|
111
115
|
- `SpacingSizesControl`: fix white dot on thumb ([#48574](https://github.com/WordPress/gutenberg/pull/48574)).
|
|
112
116
|
|
|
113
117
|
## 11.4.0 (2023-02-15)
|
|
114
118
|
|
|
115
|
-
### Bug
|
|
119
|
+
### Bug Fixes
|
|
116
120
|
|
|
117
121
|
- `LinkControl`: fix scrollbar displayed on toggle link settings ([#47986](https://github.com/WordPress/gutenberg/pull/47986)).
|
|
118
122
|
|
|
@@ -120,7 +124,7 @@
|
|
|
120
124
|
|
|
121
125
|
## 11.2.0 (2023-01-11)
|
|
122
126
|
|
|
123
|
-
### Bug
|
|
127
|
+
### Bug Fixes
|
|
124
128
|
|
|
125
129
|
- `BlockInspector`: Fix browser warning error when block is not selected ([#46875](https://github.com/WordPress/gutenberg/pull/46875)).
|
|
126
130
|
- Move component styles needed for iframes to content styles ([#47103](https://github.com/WordPress/gutenberg/pull/47103)).
|
|
@@ -141,33 +145,33 @@
|
|
|
141
145
|
- Fluid typography: add configurable fluid typography settings for minimum font size to theme.json ([#42489](https://github.com/WordPress/gutenberg/pull/42489)).
|
|
142
146
|
- `URLInput`: Add `__nextHasNoMarginBottom` prop for opting into the new margin-free styles ([46692](https://github.com/WordPress/gutenberg/pull/46692)).
|
|
143
147
|
|
|
144
|
-
### Bug
|
|
148
|
+
### Bug Fixes
|
|
145
149
|
|
|
146
150
|
- `SpacingSizesControl`: Change ARIA role from `region` to `group` to avoid unwanted ARIA landmark regions ([#46530](https://github.com/WordPress/gutenberg/pull/46530)).
|
|
147
151
|
- `FocalPointPicker`: Fix layout misalignment when placed in the `BlockInspector` ([#46631](https://github.com/WordPress/gutenberg/pull/46631)).
|
|
148
152
|
|
|
149
153
|
## 10.5.0 (2022-11-16)
|
|
150
154
|
|
|
151
|
-
###
|
|
155
|
+
### Enhancements
|
|
152
156
|
|
|
153
157
|
- `BlockLockModal`: Move Icon component out of CheckboxControl label ([#45535](https://github.com/WordPress/gutenberg/pull/45535))
|
|
154
158
|
- Fluid typography: adjust font size min and max rules ([#45536](https://github.com/WordPress/gutenberg/pull/45536)).
|
|
155
159
|
|
|
156
160
|
## 10.4.0 (2022-11-02)
|
|
157
161
|
|
|
158
|
-
### Bug
|
|
162
|
+
### Bug Fixes
|
|
159
163
|
|
|
160
164
|
- `InserterListItem`: Fix dragging and dropping in Firefox. ([#44631](https://github.com/WordPress/gutenberg/pull/44631))
|
|
161
165
|
|
|
162
166
|
## 10.3.0 (2022-10-19)
|
|
163
167
|
|
|
164
|
-
### Bug
|
|
168
|
+
### Bug Fixes
|
|
165
169
|
|
|
166
170
|
- `FontSizePicker`: Update fluid utils so that only string, floats and integers are treated as valid font sizes for the purposes of fluid typography ([#44847](https://github.com/WordPress/gutenberg/pull/44847))
|
|
167
171
|
- `getTypographyClassesAndStyles()`: Ensure that font sizes are transformed into fluid values if fluid typography is activated ([#44852](https://github.com/WordPress/gutenberg/pull/44852))
|
|
168
172
|
- `BlockPopover`: Ensure that padding and margin visualizers display in correct position even when scrolling past block. ([#44998](https://github.com/WordPress/gutenberg/pull/44998))
|
|
169
173
|
|
|
170
|
-
### New
|
|
174
|
+
### New Features
|
|
171
175
|
|
|
172
176
|
- You can now drop files/blocks/HTML on unmodified default blocks to transform them into corresponding blocks ([#44647](https://github.com/WordPress/gutenberg/pull/44647)).
|
|
173
177
|
|
|
@@ -177,7 +181,7 @@
|
|
|
177
181
|
|
|
178
182
|
## 10.0.0 (2022-09-13)
|
|
179
183
|
|
|
180
|
-
### Breaking
|
|
184
|
+
### Breaking Changes
|
|
181
185
|
|
|
182
186
|
- `FontSizePicker`: Deprecate bottom margin style. Add a `__nextHasNoMarginBottom` prop to start opting into the margin-free styles that will become the default in a future version, currently scheduled to be WordPress 6.4 ([#43870](https://github.com/WordPress/gutenberg/pull/43870)).
|
|
183
187
|
|
|
@@ -193,7 +197,7 @@
|
|
|
193
197
|
|
|
194
198
|
## 9.3.0 (2022-06-15)
|
|
195
199
|
|
|
196
|
-
### Bug
|
|
200
|
+
### Bug Fixes
|
|
197
201
|
|
|
198
202
|
- Fix focus trap on certain `input` elements when navigating within a block with the left/right arrow keys ([#41538](https://github.com/WordPress/gutenberg/pull/41538)).
|
|
199
203
|
|
|
@@ -203,7 +207,7 @@
|
|
|
203
207
|
|
|
204
208
|
## 9.0.0 (2022-05-04)
|
|
205
209
|
|
|
206
|
-
### Breaking
|
|
210
|
+
### Breaking Changes
|
|
207
211
|
|
|
208
212
|
- `BlockNavigationDropdown` is now deprecated. Use the `Dropdown` component from the `@wordpress/components` package and the `ListView` component from this package ([#40777](https://github.com/WordPress/gutenberg/pull/40777)).
|
|
209
213
|
- `ListView` no longer accepts the `__experimentalFeatures`, `__experimentalPersistentListViewFeatures`, `__experimentalHideContainerBlockActions`, and `showNestedBlocks` props. Passing additional undocumented props through to `ListView` is also now disallowed. ([#40777](https://github.com/WordPress/gutenberg/pull/40777)).
|
|
@@ -224,7 +228,7 @@
|
|
|
224
228
|
|
|
225
229
|
## 8.1.1 (2022-02-10)
|
|
226
230
|
|
|
227
|
-
### Bug
|
|
231
|
+
### Bug Fixes
|
|
228
232
|
|
|
229
233
|
- Removed unused `@wordpress/block-serialization-default-parser`, `css-mediaquery`, `memize` and `redux-multi` dependencies ([#38388](https://github.com/WordPress/gutenberg/pull/38388)).
|
|
230
234
|
|
|
@@ -241,13 +245,13 @@
|
|
|
241
245
|
- Avoid re-rendering all List View items on block focus [#35706](https://github.com/WordPress/gutenberg/pull/35706). When List View is open Block focus time is 4 times faster in large posts.
|
|
242
246
|
- Render fixed number of items in List View [#35706](https://github.com/WordPress/gutenberg/pull/35230). Opening List View is 13 times faster in large posts.
|
|
243
247
|
|
|
244
|
-
### Breaking
|
|
248
|
+
### Breaking Changes
|
|
245
249
|
|
|
246
250
|
- List View no longer supports the `showOnlyCurrentHierarchy` flag [#35706](https://github.com/WordPress/gutenberg/pull/35706). To display a subset of blocks, use the `blocks` parameter instead.
|
|
247
251
|
|
|
248
252
|
## 7.0.0 (2021-07-29)
|
|
249
253
|
|
|
250
|
-
### Breaking
|
|
254
|
+
### Breaking Changes
|
|
251
255
|
|
|
252
256
|
- Upgraded React components to work with v17.0 ([#29118](https://github.com/WordPress/gutenberg/pull/29118)). There are no new features in React v17.0 as explained in the [blog post](https://reactjs.org/blog/2020/10/20/react-v17.html).
|
|
253
257
|
|
|
@@ -272,7 +276,7 @@
|
|
|
272
276
|
|
|
273
277
|
## 5.2.0 (2020-12-17)
|
|
274
278
|
|
|
275
|
-
### New
|
|
279
|
+
### New Features
|
|
276
280
|
|
|
277
281
|
- Added a store definition `store` for the block editor namespace to use with `@wordpress/data` API ([#26655](https://github.com/WordPress/gutenberg/pull/26655)).
|
|
278
282
|
|
|
@@ -301,7 +305,7 @@
|
|
|
301
305
|
|
|
302
306
|
- Added a `label` prop to `URLInput`. This allows the label to be set without needing to wrap the `URLInput` in a `BaseControl`.
|
|
303
307
|
|
|
304
|
-
###
|
|
308
|
+
### Deprecations
|
|
305
309
|
|
|
306
310
|
- `dropZoneUIOnly` prop in `MediaPlaceholder` component has been deprecated in favor of `disableMediaButtons` prop.
|
|
307
311
|
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ In this example, we're instantiating a block editor. A block editor is composed
|
|
|
45
45
|
|
|
46
46
|
Inside `BlockEditorProvider`, you can nest any of the available `@wordpress/block-editor` UI components to build the UI of your editor.
|
|
47
47
|
|
|
48
|
-
In the example above we're rendering the `BlockList` to show and edit the block list. For instance we could add a custom sidebar and use the `BlockInspector` component to be able to edit the advanced settings for the currently selected block. (See the [API](#
|
|
48
|
+
In the example above we're rendering the `BlockList` to show and edit the block list. For instance we could add a custom sidebar and use the `BlockInspector` component to be able to edit the advanced settings for the currently selected block. (See the [API](#api) for the list of all the available components).
|
|
49
49
|
|
|
50
50
|
The `BlockTools` component is used to render the toolbar for a selected block.
|
|
51
51
|
|
|
@@ -9,7 +9,6 @@ var _i18n = require("@wordpress/i18n");
|
|
|
9
9
|
var _element = require("@wordpress/element");
|
|
10
10
|
var _components = require("@wordpress/components");
|
|
11
11
|
var _icons = require("@wordpress/icons");
|
|
12
|
-
var _compose = require("@wordpress/compose");
|
|
13
12
|
var _data = require("@wordpress/data");
|
|
14
13
|
var _blocks = require("@wordpress/blocks");
|
|
15
14
|
var _useBlockLock = _interopRequireDefault(require("./use-block-lock"));
|
|
@@ -73,7 +72,6 @@ function BlockLockModal({
|
|
|
73
72
|
updateBlockAttributes
|
|
74
73
|
} = (0, _data.useDispatch)(_store.store);
|
|
75
74
|
const blockInformation = (0, _useBlockDisplayInformation.default)(clientId);
|
|
76
|
-
const instanceId = (0, _compose.useInstanceId)(BlockLockModal, 'block-editor-block-lock-modal__options-title');
|
|
77
75
|
(0, _element.useEffect)(() => {
|
|
78
76
|
setLock({
|
|
79
77
|
move: !canMove,
|
|
@@ -85,14 +83,12 @@ function BlockLockModal({
|
|
|
85
83
|
}, [canEdit, canMove, canRemove, allowsEditLocking]);
|
|
86
84
|
const isAllChecked = Object.values(lock).every(Boolean);
|
|
87
85
|
const isMixed = Object.values(lock).some(Boolean) && !isAllChecked;
|
|
88
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Modal, {
|
|
89
87
|
title: (0, _i18n.sprintf)( /* translators: %s: Name of the block. */
|
|
90
88
|
(0, _i18n.__)('Lock %s'), blockInformation.title),
|
|
91
89
|
overlayClassName: "block-editor-block-lock-modal",
|
|
92
90
|
onRequestClose: onClose,
|
|
93
|
-
children:
|
|
94
|
-
children: (0, _i18n.__)('Choose specific attributes to restrict or lock all available options.')
|
|
95
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
91
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
96
92
|
onSubmit: event => {
|
|
97
93
|
event.preventDefault();
|
|
98
94
|
updateBlockAttributes([clientId], {
|
|
@@ -101,71 +97,75 @@ function BlockLockModal({
|
|
|
101
97
|
});
|
|
102
98
|
onClose();
|
|
103
99
|
},
|
|
104
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("
|
|
105
|
-
role: "group",
|
|
106
|
-
"aria-labelledby": instanceId,
|
|
100
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("fieldset", {
|
|
107
101
|
className: "block-editor-block-lock-modal__options",
|
|
108
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
id: instanceId,
|
|
113
|
-
children: (0, _i18n.__)('Lock all')
|
|
114
|
-
}),
|
|
115
|
-
checked: isAllChecked,
|
|
116
|
-
indeterminate: isMixed,
|
|
117
|
-
onChange: newValue => setLock({
|
|
118
|
-
move: newValue,
|
|
119
|
-
remove: newValue,
|
|
120
|
-
...(allowsEditLocking ? {
|
|
121
|
-
edit: newValue
|
|
122
|
-
} : {})
|
|
123
|
-
})
|
|
124
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
102
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("legend", {
|
|
103
|
+
children: (0, _i18n.__)('Choose specific attributes to restrict or lock all available options.')
|
|
104
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
105
|
+
role: "list",
|
|
125
106
|
className: "block-editor-block-lock-modal__checklist",
|
|
126
|
-
children:
|
|
127
|
-
className: "block-editor-block-lock-modal__checklist-item",
|
|
128
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CheckboxControl, {
|
|
129
|
-
__nextHasNoMarginBottom: true,
|
|
130
|
-
label: (0, _i18n.__)('Restrict editing'),
|
|
131
|
-
checked: !!lock.edit,
|
|
132
|
-
onChange: edit => setLock(prevLock => ({
|
|
133
|
-
...prevLock,
|
|
134
|
-
edit
|
|
135
|
-
}))
|
|
136
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
137
|
-
className: "block-editor-block-lock-modal__lock-icon",
|
|
138
|
-
icon: lock.edit ? _icons.lock : _icons.unlock
|
|
139
|
-
})]
|
|
140
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
|
|
141
|
-
className: "block-editor-block-lock-modal__checklist-item",
|
|
107
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
|
|
142
108
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CheckboxControl, {
|
|
143
109
|
__nextHasNoMarginBottom: true,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
110
|
+
className: "block-editor-block-lock-modal__options-all",
|
|
111
|
+
label: (0, _i18n.__)('Lock all'),
|
|
112
|
+
checked: isAllChecked,
|
|
113
|
+
indeterminate: isMixed,
|
|
114
|
+
onChange: newValue => setLock({
|
|
115
|
+
move: newValue,
|
|
116
|
+
remove: newValue,
|
|
117
|
+
...(allowsEditLocking ? {
|
|
118
|
+
edit: newValue
|
|
119
|
+
} : {})
|
|
120
|
+
})
|
|
121
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
122
|
+
role: "list",
|
|
123
|
+
className: "block-editor-block-lock-modal__checklist",
|
|
124
|
+
children: [allowsEditLocking && /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
|
|
125
|
+
className: "block-editor-block-lock-modal__checklist-item",
|
|
126
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CheckboxControl, {
|
|
127
|
+
__nextHasNoMarginBottom: true,
|
|
128
|
+
label: (0, _i18n.__)('Restrict editing'),
|
|
129
|
+
checked: !!lock.edit,
|
|
130
|
+
onChange: edit => setLock(prevLock => ({
|
|
131
|
+
...prevLock,
|
|
132
|
+
edit
|
|
133
|
+
}))
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
135
|
+
className: "block-editor-block-lock-modal__lock-icon",
|
|
136
|
+
icon: lock.edit ? _icons.lock : _icons.unlock
|
|
137
|
+
})]
|
|
138
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
|
|
139
|
+
className: "block-editor-block-lock-modal__checklist-item",
|
|
140
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CheckboxControl, {
|
|
141
|
+
__nextHasNoMarginBottom: true,
|
|
142
|
+
label: (0, _i18n.__)('Disable movement'),
|
|
143
|
+
checked: lock.move,
|
|
144
|
+
onChange: move => setLock(prevLock => ({
|
|
145
|
+
...prevLock,
|
|
146
|
+
move
|
|
147
|
+
}))
|
|
148
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
149
|
+
className: "block-editor-block-lock-modal__lock-icon",
|
|
150
|
+
icon: lock.move ? _icons.lock : _icons.unlock
|
|
151
|
+
})]
|
|
152
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
|
|
153
|
+
className: "block-editor-block-lock-modal__checklist-item",
|
|
154
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CheckboxControl, {
|
|
155
|
+
__nextHasNoMarginBottom: true,
|
|
156
|
+
label: (0, _i18n.__)('Prevent removal'),
|
|
157
|
+
checked: lock.remove,
|
|
158
|
+
onChange: remove => setLock(prevLock => ({
|
|
159
|
+
...prevLock,
|
|
160
|
+
remove
|
|
161
|
+
}))
|
|
162
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
163
|
+
className: "block-editor-block-lock-modal__lock-icon",
|
|
164
|
+
icon: lock.remove ? _icons.lock : _icons.unlock
|
|
165
|
+
})]
|
|
166
|
+
})]
|
|
153
167
|
})]
|
|
154
|
-
})
|
|
155
|
-
className: "block-editor-block-lock-modal__checklist-item",
|
|
156
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CheckboxControl, {
|
|
157
|
-
__nextHasNoMarginBottom: true,
|
|
158
|
-
label: (0, _i18n.__)('Prevent removal'),
|
|
159
|
-
checked: lock.remove,
|
|
160
|
-
onChange: remove => setLock(prevLock => ({
|
|
161
|
-
...prevLock,
|
|
162
|
-
remove
|
|
163
|
-
}))
|
|
164
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
165
|
-
className: "block-editor-block-lock-modal__lock-icon",
|
|
166
|
-
icon: lock.remove ? _icons.lock : _icons.unlock
|
|
167
|
-
})]
|
|
168
|
-
})]
|
|
168
|
+
})
|
|
169
169
|
}), hasTemplateLock && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
170
170
|
__nextHasNoMarginBottom: true,
|
|
171
171
|
className: "block-editor-block-lock-modal__template-lock",
|
|
@@ -192,7 +192,7 @@ function BlockLockModal({
|
|
|
192
192
|
})
|
|
193
193
|
})]
|
|
194
194
|
})]
|
|
195
|
-
})
|
|
195
|
+
})
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_element","_components","_icons","_compose","_data","_blocks","_useBlockLock","_interopRequireDefault","_useBlockDisplayInformation","_store","_jsxRuntime","ALLOWS_EDIT_LOCKING","getTemplateLockValue","lock","remove","move","BlockLockModal","clientId","onClose","setLock","useState","canEdit","canMove","canRemove","useBlockLock","allowsEditLocking","templateLock","hasTemplateLock","useSelect","select","getBlockName","getBlockAttributes","blockEditorStore","blockName","blockType","getBlockType","includes","attributes","applyTemplateLock","setApplyTemplateLock","updateBlockAttributes","useDispatch","blockInformation","useBlockDisplayInformation","instanceId","useInstanceId","useEffect","edit","isAllChecked","Object","values","every","Boolean","isMixed","some","jsxs","Modal","title","sprintf","__","overlayClassName","onRequestClose","children","jsx","onSubmit","event","preventDefault","undefined","role","className","CheckboxControl","__nextHasNoMarginBottom","label","id","checked","indeterminate","onChange","newValue","prevLock","Icon","icon","lockIcon","unlockIcon","ToggleControl","disabled","Flex","justify","expanded","FlexItem","Button","variant","onClick","type"],"sources":["@wordpress/block-editor/src/components/block-lock/modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tCheckboxControl,\n\tFlex,\n\tFlexItem,\n\tIcon,\n\tModal,\n\tToggleControl,\n} from '@wordpress/components';\nimport { lock as lockIcon, unlock as unlockIcon } from '@wordpress/icons';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\n// Entity based blocks which allow edit locking\nconst ALLOWS_EDIT_LOCKING = [ 'core/block', 'core/navigation' ];\n\nfunction getTemplateLockValue( lock ) {\n\t// Prevents all operations.\n\tif ( lock.remove && lock.move ) {\n\t\treturn 'all';\n\t}\n\n\t// Prevents inserting or removing blocks, but allows moving existing blocks.\n\tif ( lock.remove && ! lock.move ) {\n\t\treturn 'insert';\n\t}\n\n\treturn false;\n}\n\nexport default function BlockLockModal( { clientId, onClose } ) {\n\tconst [ lock, setLock ] = useState( { move: false, remove: false } );\n\tconst { canEdit, canMove, canRemove } = useBlockLock( clientId );\n\tconst { allowsEditLocking, templateLock, hasTemplateLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\treturn {\n\t\t\t\tallowsEditLocking: ALLOWS_EDIT_LOCKING.includes( blockName ),\n\t\t\t\ttemplateLock: getBlockAttributes( clientId )?.templateLock,\n\t\t\t\thasTemplateLock: !! blockType?.attributes?.templateLock,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst [ applyTemplateLock, setApplyTemplateLock ] = useState(\n\t\t!! templateLock\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst instanceId = useInstanceId(\n\t\tBlockLockModal,\n\t\t'block-editor-block-lock-modal__options-title'\n\t);\n\n\tuseEffect( () => {\n\t\tsetLock( {\n\t\t\tmove: ! canMove,\n\t\t\tremove: ! canRemove,\n\t\t\t...( allowsEditLocking ? { edit: ! canEdit } : {} ),\n\t\t} );\n\t}, [ canEdit, canMove, canRemove, allowsEditLocking ] );\n\n\tconst isAllChecked = Object.values( lock ).every( Boolean );\n\tconst isMixed = Object.values( lock ).some( Boolean ) && ! isAllChecked;\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ sprintf(\n\t\t\t\t/* translators: %s: Name of the block. */\n\t\t\t\t__( 'Lock %s' ),\n\t\t\t\tblockInformation.title\n\t\t\t) }\n\t\t\toverlayClassName=\"block-editor-block-lock-modal\"\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Choose specific attributes to restrict or lock all available options.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\t\t\t\tlock,\n\t\t\t\t\t\ttemplateLock: applyTemplateLock\n\t\t\t\t\t\t\t? getTemplateLockValue( lock )\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t} );\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\trole=\"group\"\n\t\t\t\t\taria-labelledby={ instanceId }\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options\"\n\t\t\t\t>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options-title\"\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t<span id={ instanceId }>{ __( 'Lock all' ) }</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ isAllChecked }\n\t\t\t\t\t\tindeterminate={ isMixed }\n\t\t\t\t\t\tonChange={ ( newValue ) =>\n\t\t\t\t\t\t\tsetLock( {\n\t\t\t\t\t\t\t\tmove: newValue,\n\t\t\t\t\t\t\t\tremove: newValue,\n\t\t\t\t\t\t\t\t...( allowsEditLocking\n\t\t\t\t\t\t\t\t\t? { edit: newValue }\n\t\t\t\t\t\t\t\t\t: {} ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ul className=\"block-editor-block-lock-modal__checklist\">\n\t\t\t\t\t\t{ allowsEditLocking && (\n\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Restrict editing' ) }\n\t\t\t\t\t\t\t\t\tchecked={ !! lock.edit }\n\t\t\t\t\t\t\t\t\tonChange={ ( edit ) =>\n\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\tedit,\n\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\ticon={ lock.edit ? lockIcon : unlockIcon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Disable movement' ) }\n\t\t\t\t\t\t\t\tchecked={ lock.move }\n\t\t\t\t\t\t\t\tonChange={ ( move ) =>\n\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\tmove,\n\t\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\ticon={ lock.move ? lockIcon : unlockIcon }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Prevent removal' ) }\n\t\t\t\t\t\t\t\tchecked={ lock.remove }\n\t\t\t\t\t\t\t\tonChange={ ( remove ) =>\n\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\tremove,\n\t\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\ticon={ lock.remove ? lockIcon : unlockIcon }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t{ hasTemplateLock && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__template-lock\"\n\t\t\t\t\t\t\tlabel={ __( 'Apply to all blocks inside' ) }\n\t\t\t\t\t\t\tchecked={ applyTemplateLock }\n\t\t\t\t\t\t\tdisabled={ lock.move && ! lock.remove }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetApplyTemplateLock( ! applyTemplateLock )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__actions\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AASA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAA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;UAAA1B,QAAA,eACR,IAAApD,WAAA,CAAAqD,GAAA,EAAC9D,WAAA,CAAAwF,MAAM;YAACC,OAAO,EAAC,SAAS;YAACE,IAAI,EAAC,QAAQ;YAAA9B,QAAA,EACpC,IAAAH,QAAE,EAAE,OAAQ;UAAC,CACR;QAAC,CACA,CAAC;MAAA,CACN,CAAC;IAAA,CACF,CAAC;EAAA,CACD,CAAC;AAEV","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_element","_components","_icons","_data","_blocks","_useBlockLock","_interopRequireDefault","_useBlockDisplayInformation","_store","_jsxRuntime","ALLOWS_EDIT_LOCKING","getTemplateLockValue","lock","remove","move","BlockLockModal","clientId","onClose","setLock","useState","canEdit","canMove","canRemove","useBlockLock","allowsEditLocking","templateLock","hasTemplateLock","useSelect","select","getBlockName","getBlockAttributes","blockEditorStore","blockName","blockType","getBlockType","includes","attributes","applyTemplateLock","setApplyTemplateLock","updateBlockAttributes","useDispatch","blockInformation","useBlockDisplayInformation","useEffect","edit","isAllChecked","Object","values","every","Boolean","isMixed","some","jsx","Modal","title","sprintf","__","overlayClassName","onRequestClose","children","jsxs","onSubmit","event","preventDefault","undefined","className","role","CheckboxControl","__nextHasNoMarginBottom","label","checked","indeterminate","onChange","newValue","prevLock","Icon","icon","lockIcon","unlockIcon","ToggleControl","disabled","Flex","justify","expanded","FlexItem","Button","variant","onClick","type"],"sources":["@wordpress/block-editor/src/components/block-lock/modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tCheckboxControl,\n\tFlex,\n\tFlexItem,\n\tIcon,\n\tModal,\n\tToggleControl,\n} from '@wordpress/components';\nimport { lock as lockIcon, unlock as unlockIcon } from '@wordpress/icons';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\n// Entity based blocks which allow edit locking\nconst ALLOWS_EDIT_LOCKING = [ 'core/block', 'core/navigation' ];\n\nfunction getTemplateLockValue( lock ) {\n\t// Prevents all operations.\n\tif ( lock.remove && lock.move ) {\n\t\treturn 'all';\n\t}\n\n\t// Prevents inserting or removing blocks, but allows moving existing blocks.\n\tif ( lock.remove && ! lock.move ) {\n\t\treturn 'insert';\n\t}\n\n\treturn false;\n}\n\nexport default function BlockLockModal( { clientId, onClose } ) {\n\tconst [ lock, setLock ] = useState( { move: false, remove: false } );\n\tconst { canEdit, canMove, canRemove } = useBlockLock( clientId );\n\tconst { allowsEditLocking, templateLock, hasTemplateLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\treturn {\n\t\t\t\tallowsEditLocking: ALLOWS_EDIT_LOCKING.includes( blockName ),\n\t\t\t\ttemplateLock: getBlockAttributes( clientId )?.templateLock,\n\t\t\t\thasTemplateLock: !! blockType?.attributes?.templateLock,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst [ applyTemplateLock, setApplyTemplateLock ] = useState(\n\t\t!! templateLock\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tuseEffect( () => {\n\t\tsetLock( {\n\t\t\tmove: ! canMove,\n\t\t\tremove: ! canRemove,\n\t\t\t...( allowsEditLocking ? { edit: ! canEdit } : {} ),\n\t\t} );\n\t}, [ canEdit, canMove, canRemove, allowsEditLocking ] );\n\n\tconst isAllChecked = Object.values( lock ).every( Boolean );\n\tconst isMixed = Object.values( lock ).some( Boolean ) && ! isAllChecked;\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ sprintf(\n\t\t\t\t/* translators: %s: Name of the block. */\n\t\t\t\t__( 'Lock %s' ),\n\t\t\t\tblockInformation.title\n\t\t\t) }\n\t\t\toverlayClassName=\"block-editor-block-lock-modal\"\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\t\t\t\tlock,\n\t\t\t\t\t\ttemplateLock: applyTemplateLock\n\t\t\t\t\t\t\t? getTemplateLockValue( lock )\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t} );\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<fieldset className=\"block-editor-block-lock-modal__options\">\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Choose specific attributes to restrict or lock all available options.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</legend>\n\t\t\t\t\t{ /*\n\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t */\n\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t<ul\n\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__checklist\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options-all\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Lock all' ) }\n\t\t\t\t\t\t\t\tchecked={ isAllChecked }\n\t\t\t\t\t\t\t\tindeterminate={ isMixed }\n\t\t\t\t\t\t\t\tonChange={ ( newValue ) =>\n\t\t\t\t\t\t\t\t\tsetLock( {\n\t\t\t\t\t\t\t\t\t\tmove: newValue,\n\t\t\t\t\t\t\t\t\t\tremove: newValue,\n\t\t\t\t\t\t\t\t\t\t...( allowsEditLocking\n\t\t\t\t\t\t\t\t\t\t\t? { edit: newValue }\n\t\t\t\t\t\t\t\t\t\t\t: {} ),\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__checklist\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ allowsEditLocking && (\n\t\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Restrict editing' ) }\n\t\t\t\t\t\t\t\t\t\t\tchecked={ !! lock.edit }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ ( edit ) =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\t\tedit,\n\t\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tlock.edit\n\t\t\t\t\t\t\t\t\t\t\t\t\t? lockIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: unlockIcon\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Disable movement' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ lock.move }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( move ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\tmove,\n\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tlock.move ? lockIcon : unlockIcon\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Prevent removal' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ lock.remove }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( remove ) =>\n\t\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\t\tremove,\n\t\t\t\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__lock-icon\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tlock.remove ? lockIcon : unlockIcon\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t{ hasTemplateLock && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__template-lock\"\n\t\t\t\t\t\t\tlabel={ __( 'Apply to all blocks inside' ) }\n\t\t\t\t\t\t\tchecked={ applyTemplateLock }\n\t\t\t\t\t\t\tdisabled={ lock.move && ! lock.remove }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetApplyTemplateLock( ! applyTemplateLock )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</fieldset>\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__actions\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,K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AA,EAACnD,WAAA,CAAAoF,MAAM;YAACC,OAAO,EAAC,UAAU;YAACC,OAAO,EAAGtE,OAAS;YAAA0C,QAAA,EAC3C,IAAAH,QAAE,EAAE,QAAS;UAAC,CACT;QAAC,CACA,CAAC,eACX,IAAA/C,WAAA,CAAA2C,GAAA,EAACnD,WAAA,CAAAmF,QAAQ;UAAAzB,QAAA,eACR,IAAAlD,WAAA,CAAA2C,GAAA,EAACnD,WAAA,CAAAoF,MAAM;YAACC,OAAO,EAAC,SAAS;YAACE,IAAI,EAAC,QAAQ;YAAA7B,QAAA,EACpC,IAAAH,QAAE,EAAE,OAAQ;UAAC,CACR;QAAC,CACA,CAAC;MAAA,CACN,CAAC;IAAA,CACF;EAAC,CACD,CAAC;AAEV","ignoreList":[]}
|
|
@@ -37,14 +37,17 @@ function BlockMover({
|
|
|
37
37
|
rootClientId,
|
|
38
38
|
isFirst,
|
|
39
39
|
isLast,
|
|
40
|
-
orientation
|
|
40
|
+
orientation,
|
|
41
|
+
isManualGrid
|
|
41
42
|
} = (0, _data.useSelect)(select => {
|
|
43
|
+
var _getBlockAttributes;
|
|
42
44
|
const {
|
|
43
45
|
getBlockIndex,
|
|
44
46
|
getBlockListSettings,
|
|
45
47
|
canMoveBlocks,
|
|
46
48
|
getBlockOrder,
|
|
47
|
-
getBlockRootClientId
|
|
49
|
+
getBlockRootClientId,
|
|
50
|
+
getBlockAttributes
|
|
48
51
|
} = select(_store.store);
|
|
49
52
|
const normalizedClientIds = Array.isArray(clientIds) ? clientIds : [clientIds];
|
|
50
53
|
const firstClientId = normalizedClientIds[0];
|
|
@@ -52,18 +55,21 @@ function BlockMover({
|
|
|
52
55
|
const firstIndex = getBlockIndex(firstClientId);
|
|
53
56
|
const lastIndex = getBlockIndex(normalizedClientIds[normalizedClientIds.length - 1]);
|
|
54
57
|
const blockOrder = getBlockOrder(_rootClientId);
|
|
58
|
+
const {
|
|
59
|
+
layout = {}
|
|
60
|
+
} = (_getBlockAttributes = getBlockAttributes(_rootClientId)) !== null && _getBlockAttributes !== void 0 ? _getBlockAttributes : {};
|
|
55
61
|
return {
|
|
56
62
|
canMove: canMoveBlocks(clientIds),
|
|
57
63
|
rootClientId: _rootClientId,
|
|
58
64
|
isFirst: firstIndex === 0,
|
|
59
65
|
isLast: lastIndex === blockOrder.length - 1,
|
|
60
|
-
orientation: getBlockListSettings(_rootClientId)?.orientation
|
|
66
|
+
orientation: getBlockListSettings(_rootClientId)?.orientation,
|
|
67
|
+
isManualGrid: layout.type === 'grid' && !!layout.columnCount && window.__experimentalEnableGridInteractivity
|
|
61
68
|
};
|
|
62
69
|
}, [clientIds]);
|
|
63
70
|
if (!canMove || isFirst && isLast && !rootClientId) {
|
|
64
71
|
return null;
|
|
65
72
|
}
|
|
66
|
-
const dragHandleLabel = (0, _i18n.__)('Drag');
|
|
67
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.ToolbarGroup, {
|
|
68
74
|
className: (0, _clsx.default)('block-editor-block-mover', {
|
|
69
75
|
'is-horizontal': orientation === 'horizontal'
|
|
@@ -75,14 +81,14 @@ function BlockMover({
|
|
|
75
81
|
icon: _icons.dragHandle,
|
|
76
82
|
className: "block-editor-block-mover__drag-handle",
|
|
77
83
|
"aria-hidden": "true",
|
|
78
|
-
label:
|
|
84
|
+
label: (0, _i18n.__)('Drag')
|
|
79
85
|
// Should not be able to tab to drag handle as this
|
|
80
86
|
// button can only be used with a pointer device.
|
|
81
87
|
,
|
|
82
88
|
tabIndex: "-1",
|
|
83
89
|
...draggableProps
|
|
84
90
|
})
|
|
85
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
91
|
+
}), !isManualGrid && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
86
92
|
className: "block-editor-block-mover__move-button-container",
|
|
87
93
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarItem, {
|
|
88
94
|
children: itemProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.BlockMoverUpButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_icons","_components","_data","_i18n","_blockDraggable","_button","_store","_jsxRuntime","BlockMover","clientIds","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","canMove","rootClientId","isFirst","isLast","orientation","useSelect","select","getBlockIndex","getBlockListSettings","canMoveBlocks","getBlockOrder","getBlockRootClientId","blockEditorStore","normalizedClientIds","Array","isArray","firstClientId","_rootClientId","firstIndex","lastIndex","length","blockOrder","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_icons","_components","_data","_i18n","_blockDraggable","_button","_store","_jsxRuntime","BlockMover","clientIds","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","canMove","rootClientId","isFirst","isLast","orientation","isManualGrid","useSelect","select","_getBlockAttributes","getBlockIndex","getBlockListSettings","canMoveBlocks","getBlockOrder","getBlockRootClientId","getBlockAttributes","blockEditorStore","normalizedClientIds","Array","isArray","firstClientId","_rootClientId","firstIndex","lastIndex","length","blockOrder","layout","type","columnCount","window","__experimentalEnableGridInteractivity","jsxs","ToolbarGroup","className","clsx","children","jsx","default","fadeWhenDisabled","draggableProps","Button","icon","dragHandle","label","__","tabIndex","ToolbarItem","itemProps","BlockMoverUpButton","disabled","BlockMoverDownButton","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-mover/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\n\nimport { dragHandle } from '@wordpress/icons';\nimport { ToolbarGroup, ToolbarItem, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockDraggable from '../block-draggable';\nimport { BlockMoverUpButton, BlockMoverDownButton } from './button';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockMover( {\n\tclientIds,\n\thideDragHandle,\n\tisBlockMoverUpButtonDisabled,\n\tisBlockMoverDownButtonDisabled,\n} ) {\n\tconst {\n\t\tcanMove,\n\t\trootClientId,\n\t\tisFirst,\n\t\tisLast,\n\t\torientation,\n\t\tisManualGrid,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tcanMoveBlocks,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockAttributes,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst normalizedClientIds = Array.isArray( clientIds )\n\t\t\t\t? clientIds\n\t\t\t\t: [ clientIds ];\n\t\t\tconst firstClientId = normalizedClientIds[ 0 ];\n\t\t\tconst _rootClientId = getBlockRootClientId( firstClientId );\n\t\t\tconst firstIndex = getBlockIndex( firstClientId );\n\t\t\tconst lastIndex = getBlockIndex(\n\t\t\t\tnormalizedClientIds[ normalizedClientIds.length - 1 ]\n\t\t\t);\n\t\t\tconst blockOrder = getBlockOrder( _rootClientId );\n\t\t\tconst { layout = {} } = getBlockAttributes( _rootClientId ) ?? {};\n\n\t\t\treturn {\n\t\t\t\tcanMove: canMoveBlocks( clientIds ),\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisFirst: firstIndex === 0,\n\t\t\t\tisLast: lastIndex === blockOrder.length - 1,\n\t\t\t\torientation: getBlockListSettings( _rootClientId )?.orientation,\n\t\t\t\tisManualGrid:\n\t\t\t\t\tlayout.type === 'grid' &&\n\t\t\t\t\t!! layout.columnCount &&\n\t\t\t\t\twindow.__experimentalEnableGridInteractivity,\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tif ( ! canMove || ( isFirst && isLast && ! rootClientId ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ToolbarGroup\n\t\t\tclassName={ clsx( 'block-editor-block-mover', {\n\t\t\t\t'is-horizontal': orientation === 'horizontal',\n\t\t\t} ) }\n\t\t>\n\t\t\t{ ! hideDragHandle && (\n\t\t\t\t<BlockDraggable clientIds={ clientIds } fadeWhenDisabled>\n\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-mover__drag-handle\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tlabel={ __( 'Drag' ) }\n\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t) }\n\t\t\t{ ! isManualGrid && (\n\t\t\t\t<div className=\"block-editor-block-mover__move-button-container\">\n\t\t\t\t\t<ToolbarItem>\n\t\t\t\t\t\t{ ( itemProps ) => (\n\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\tdisabled={ isBlockMoverUpButtonDisabled }\n\t\t\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\t\t\t{ ...itemProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolbarItem>\n\t\t\t\t\t<ToolbarItem>\n\t\t\t\t\t\t{ ( itemProps ) => (\n\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\tdisabled={ isBlockMoverDownButtonDisabled }\n\t\t\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\t\t\t{ ...itemProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolbarItem>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</ToolbarGroup>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-mover/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