@wordpress/edit-post 8.44.0 → 8.45.1-next.v.202604201441.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 +6 -0
- package/build/components/meta-boxes/use-meta-box-initialization.cjs +5 -16
- package/build/components/meta-boxes/use-meta-box-initialization.cjs.map +2 -2
- package/build/store/actions.cjs +0 -8
- package/build/store/actions.cjs.map +2 -2
- package/build/store/reducer.cjs +7 -14
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +0 -5
- package/build/store/selectors.cjs.map +2 -2
- package/build-module/components/meta-boxes/use-meta-box-initialization.mjs +5 -16
- package/build-module/components/meta-boxes/use-meta-box-initialization.mjs.map +2 -2
- package/build-module/store/actions.mjs +0 -7
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/reducer.mjs +6 -12
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +0 -4
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-style/style-rtl.css +2 -16
- package/build-style/style.css +2 -16
- package/package.json +33 -33
- package/src/components/layout/style.scss +1 -1
- package/src/components/meta-boxes/test/use-meta-box-initialization.js +22 -9
- package/src/components/meta-boxes/use-meta-box-initialization.js +9 -24
- package/src/store/actions.js +0 -13
- package/src/store/reducer.js +4 -19
- package/src/store/selectors.js +0 -12
package/src/store/actions.js
CHANGED
|
@@ -277,19 +277,6 @@ export function setAvailableMetaBoxesPerLocation( metaBoxesPerLocation ) {
|
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
/**
|
|
281
|
-
* Stores the IDs of meta boxes marked as compatible with real-time collaboration
|
|
282
|
-
* via the __rtc_compatible_meta_box flag on the server.
|
|
283
|
-
*
|
|
284
|
-
* @param {string[]} ids Meta box IDs that are RTC-compatible.
|
|
285
|
-
*/
|
|
286
|
-
export function setRtcCompatibleMetaBoxIds( ids ) {
|
|
287
|
-
return {
|
|
288
|
-
type: 'SET_RTC_COMPATIBLE_META_BOX_IDS',
|
|
289
|
-
ids,
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
|
|
293
280
|
/**
|
|
294
281
|
* Update a metabox.
|
|
295
282
|
*/
|
package/src/store/reducer.js
CHANGED
|
@@ -32,7 +32,10 @@ function mergeMetaboxes( metaboxes = [], newMetaboxes ) {
|
|
|
32
32
|
( box ) => box.id === metabox.id
|
|
33
33
|
);
|
|
34
34
|
if ( existing !== -1 ) {
|
|
35
|
-
mergedMetaboxes[ existing ] =
|
|
35
|
+
mergedMetaboxes[ existing ] = {
|
|
36
|
+
...mergedMetaboxes[ existing ],
|
|
37
|
+
...metabox,
|
|
38
|
+
};
|
|
36
39
|
} else {
|
|
37
40
|
mergedMetaboxes.push( metabox );
|
|
38
41
|
}
|
|
@@ -83,28 +86,10 @@ function metaBoxesInitialized( state = false, action ) {
|
|
|
83
86
|
return state;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
|
-
/**
|
|
87
|
-
* Reducer tracking meta box IDs marked as compatible with real-time collaboration
|
|
88
|
-
* via the add_meta_box() __rtc_compatible_meta_box compatibility flag.
|
|
89
|
-
*
|
|
90
|
-
* @param {string[]} state Previous state.
|
|
91
|
-
* @param {Object} action Action Object.
|
|
92
|
-
*
|
|
93
|
-
* @return {string[]} Updated state.
|
|
94
|
-
*/
|
|
95
|
-
export function rtcCompatibleMetaBoxIds( state = [], action ) {
|
|
96
|
-
switch ( action.type ) {
|
|
97
|
-
case 'SET_RTC_COMPATIBLE_META_BOX_IDS':
|
|
98
|
-
return action.ids;
|
|
99
|
-
}
|
|
100
|
-
return state;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
89
|
const metaBoxes = combineReducers( {
|
|
104
90
|
isSaving: isSavingMetaBoxes,
|
|
105
91
|
locations: metaBoxLocations,
|
|
106
92
|
initialized: metaBoxesInitialized,
|
|
107
|
-
rtcCompatibleIds: rtcCompatibleMetaBoxIds,
|
|
108
93
|
} );
|
|
109
94
|
|
|
110
95
|
export default combineReducers( {
|
package/src/store/selectors.js
CHANGED
|
@@ -424,18 +424,6 @@ export const getAllMetaBoxes = createSelector(
|
|
|
424
424
|
( state ) => [ state.metaBoxes.locations ]
|
|
425
425
|
);
|
|
426
426
|
|
|
427
|
-
/**
|
|
428
|
-
* Returns the list of meta box IDs marked as compatible with real-time
|
|
429
|
-
* collaboration via the add_meta_box() __rtc_compatible_meta_box compatibility flag.
|
|
430
|
-
*
|
|
431
|
-
* @param {Object} state Global application state.
|
|
432
|
-
*
|
|
433
|
-
* @return {string[]} List of RTC-compatible meta box IDs.
|
|
434
|
-
*/
|
|
435
|
-
export function getRtcCompatibleMetaBoxIds( state ) {
|
|
436
|
-
return state.metaBoxes.rtcCompatibleIds;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
427
|
/**
|
|
440
428
|
* Returns true if the post is using Meta Boxes
|
|
441
429
|
*
|