@wordpress/edit-site 6.12.0 → 6.13.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/components/add-new-template/utils.js +1 -2
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +0 -3
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +4 -12
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/editor/index.js +18 -27
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +13 -5
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/editor/use-resolve-edited-entity.js +133 -0
- package/build/components/editor/use-resolve-edited-entity.js.map +1 -0
- package/build/components/editor-canvas-container/index.js +1 -1
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +8 -10
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/screen-block.js +18 -5
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +11 -5
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +17 -1
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/page-patterns/header.js +2 -2
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +4 -8
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/post-edit/index.js +10 -12
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-list/index.js +3 -3
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/posts-app/index.js +3 -4
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/posts-app-routes/home.js +48 -0
- package/build/components/posts-app-routes/home.js.map +1 -0
- package/build/components/posts-app-routes/index.js +37 -0
- package/build/components/posts-app-routes/index.js.map +1 -0
- package/build/components/posts-app-routes/posts-edit.js +44 -0
- package/build/components/posts-app-routes/posts-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-list-view-quick-edit.js +63 -0
- package/build/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-list-view.js +48 -0
- package/build/components/posts-app-routes/posts-list-view.js.map +1 -0
- package/build/components/posts-app-routes/posts-view-quick-edit.js +60 -0
- package/build/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
- package/build/components/posts-app-routes/posts-view.js +41 -0
- package/build/components/posts-app-routes/posts-view.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-footer/index.js +17 -23
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +4 -18
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +2 -3
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/site-editor-routes/index.js +1 -2
- package/build/components/site-editor-routes/index.js.map +1 -1
- package/build/components/style-book/examples.js +24 -2
- package/build/components/style-book/examples.js.map +1 -1
- package/build/index.js +0 -9
- package/build/index.js.map +1 -1
- package/build/store/actions.js +13 -0
- package/build/store/actions.js.map +1 -1
- package/build/store/selectors.js +21 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +1 -2
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +0 -3
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +4 -12
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/editor/index.js +18 -27
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +13 -5
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +125 -0
- package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -0
- package/build-module/components/editor-canvas-container/index.js +1 -1
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +8 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +18 -5
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +11 -5
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/ui.js +1 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +18 -2
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/page-patterns/header.js +2 -2
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +4 -8
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/post-edit/index.js +9 -11
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-list/index.js +2 -2
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/posts-app/index.js +3 -4
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/posts-app-routes/home.js +40 -0
- package/build-module/components/posts-app-routes/home.js.map +1 -0
- package/build-module/components/posts-app-routes/index.js +30 -0
- package/build-module/components/posts-app-routes/index.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-edit.js +36 -0
- package/build-module/components/posts-app-routes/posts-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js +55 -0
- package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-list-view.js +40 -0
- package/build-module/components/posts-app-routes/posts-list-view.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-view-quick-edit.js +52 -0
- package/build-module/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
- package/build-module/components/posts-app-routes/posts-view.js +33 -0
- package/build-module/components/posts-app-routes/posts-view.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +20 -26
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +4 -18
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +3 -4
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/site-editor-routes/index.js +1 -2
- package/build-module/components/site-editor-routes/index.js.map +1 -1
- package/build-module/components/style-book/examples.js +24 -2
- package/build-module/components/style-book/examples.js.map +1 -1
- package/build-module/index.js +1 -10
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +13 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/selectors.js +21 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/posts-rtl.css +59 -18
- package/build-style/posts.css +59 -18
- package/build-style/style-rtl.css +74 -57
- package/build-style/style.css +74 -57
- package/package.json +2 -2
- package/src/components/add-new-template/utils.js +2 -2
- package/src/components/app/index.js +0 -3
- package/src/components/block-editor/use-site-editor-settings.js +7 -21
- package/src/components/editor/index.js +22 -33
- package/src/components/editor/use-editor-title.js +17 -4
- package/src/components/editor/use-resolve-edited-entity.js +132 -0
- package/src/components/editor-canvas-container/index.js +1 -1
- package/src/components/global-styles/block-preview-panel.js +10 -10
- package/src/components/global-styles/screen-block.js +26 -8
- package/src/components/global-styles/screen-style-variations.js +14 -5
- package/src/components/global-styles/ui.js +1 -1
- package/src/components/global-styles-sidebar/index.js +16 -2
- package/src/components/page-patterns/header.js +3 -2
- package/src/components/page-patterns/use-patterns.js +9 -7
- package/src/components/page-templates/style.scss +1 -0
- package/src/components/post-edit/index.js +10 -13
- package/src/components/post-list/index.js +1 -2
- package/src/components/posts-app/index.js +3 -4
- package/src/components/posts-app-routes/home.js +36 -0
- package/src/components/posts-app-routes/index.js +36 -0
- package/src/components/posts-app-routes/posts-edit.js +31 -0
- package/src/components/posts-app-routes/posts-list-view-quick-edit.js +52 -0
- package/src/components/posts-app-routes/posts-list-view.js +40 -0
- package/src/components/posts-app-routes/posts-view-quick-edit.js +49 -0
- package/src/components/posts-app-routes/posts-view.js +35 -0
- package/src/components/sidebar-navigation-screen/style.scss +7 -2
- package/src/components/sidebar-navigation-screen-details-footer/index.js +27 -38
- package/src/components/sidebar-navigation-screen-details-footer/style.scss +0 -4
- package/src/components/sidebar-navigation-screen-global-styles/index.js +8 -17
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +8 -0
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +4 -4
- package/src/components/site-editor-routes/README.md +2 -2
- package/src/components/site-editor-routes/index.js +0 -2
- package/src/components/site-hub/style.scss +1 -1
- package/src/components/style-book/examples.tsx +24 -2
- package/src/index.js +1 -13
- package/src/store/actions.js +15 -0
- package/src/store/selectors.js +24 -1
- package/src/style.scss +0 -2
- package/build/components/post-fields/index.js +0 -96
- package/build/components/post-fields/index.js.map +0 -1
- package/build/components/posts-app/router.js +0 -85
- package/build/components/posts-app/router.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +0 -54
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -21
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -33
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -21
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
- package/build/components/site-editor-routes/styles-edit.js +0 -33
- package/build/components/site-editor-routes/styles-edit.js.map +0 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -219
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
- package/build-module/components/post-fields/index.js +0 -88
- package/build-module/components/post-fields/index.js.map +0 -1
- package/build-module/components/posts-app/router.js +0 -77
- package/build-module/components/posts-app/router.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +0 -29
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -25
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
- package/build-module/components/site-editor-routes/styles-edit.js +0 -25
- package/build-module/components/site-editor-routes/styles-edit.js.map +0 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -212
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
- package/src/components/post-fields/index.js +0 -107
- package/src/components/post-fields/style.scss +0 -3
- package/src/components/posts-app/router.js +0 -69
- package/src/components/sidebar-navigation-screen-details-panel/index.js +0 -40
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -31
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
- package/src/components/sidebar-navigation-screen-details-panel/style.scss +0 -26
- package/src/components/site-editor-routes/styles-edit.js +0 -26
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -257
- package/src/store/test/actions.js +0 -83
- package/src/store/test/reducer.js +0 -69
- package/src/store/test/selectors.js +0 -41
package/src/store/actions.js
CHANGED
|
@@ -142,11 +142,16 @@ export const removeTemplate =
|
|
|
142
142
|
/**
|
|
143
143
|
* Action that sets a template part.
|
|
144
144
|
*
|
|
145
|
+
* @deprecated
|
|
145
146
|
* @param {string} templatePartId The template part ID.
|
|
146
147
|
*
|
|
147
148
|
* @return {Object} Action object.
|
|
148
149
|
*/
|
|
149
150
|
export function setTemplatePart( templatePartId ) {
|
|
151
|
+
deprecated( "dispatch( 'core/edit-site' ).setTemplatePart", {
|
|
152
|
+
since: '6.8',
|
|
153
|
+
} );
|
|
154
|
+
|
|
150
155
|
return {
|
|
151
156
|
type: 'SET_EDITED_POST',
|
|
152
157
|
postType: TEMPLATE_PART_POST_TYPE,
|
|
@@ -157,11 +162,16 @@ export function setTemplatePart( templatePartId ) {
|
|
|
157
162
|
/**
|
|
158
163
|
* Action that sets a navigation menu.
|
|
159
164
|
*
|
|
165
|
+
* @deprecated
|
|
160
166
|
* @param {string} navigationMenuId The Navigation Menu Post ID.
|
|
161
167
|
*
|
|
162
168
|
* @return {Object} Action object.
|
|
163
169
|
*/
|
|
164
170
|
export function setNavigationMenu( navigationMenuId ) {
|
|
171
|
+
deprecated( "dispatch( 'core/edit-site' ).setNavigationMenu", {
|
|
172
|
+
since: '6.8',
|
|
173
|
+
} );
|
|
174
|
+
|
|
165
175
|
return {
|
|
166
176
|
type: 'SET_EDITED_POST',
|
|
167
177
|
postType: NAVIGATION_POST_TYPE,
|
|
@@ -172,6 +182,7 @@ export function setNavigationMenu( navigationMenuId ) {
|
|
|
172
182
|
/**
|
|
173
183
|
* Action that sets an edited entity.
|
|
174
184
|
*
|
|
185
|
+
* @deprecated
|
|
175
186
|
* @param {string} postType The entity's post type.
|
|
176
187
|
* @param {string} postId The entity's ID.
|
|
177
188
|
* @param {Object} context The entity's context.
|
|
@@ -204,11 +215,15 @@ export function setHomeTemplateId() {
|
|
|
204
215
|
/**
|
|
205
216
|
* Set's the current block editor context.
|
|
206
217
|
*
|
|
218
|
+
* @deprecated
|
|
207
219
|
* @param {Object} context The context object.
|
|
208
220
|
*
|
|
209
221
|
* @return {Object} Action object.
|
|
210
222
|
*/
|
|
211
223
|
export function setEditedPostContext( context ) {
|
|
224
|
+
deprecated( "dispatch( 'core/edit-site' ).setEditedPostContext", {
|
|
225
|
+
since: '6.8',
|
|
226
|
+
} );
|
|
212
227
|
return {
|
|
213
228
|
type: 'SET_EDITED_POST_CONTEXT',
|
|
214
229
|
context,
|
package/src/store/selectors.js
CHANGED
|
@@ -135,22 +135,32 @@ export function getHomeTemplateId() {
|
|
|
135
135
|
/**
|
|
136
136
|
* Returns the current edited post type (wp_template or wp_template_part).
|
|
137
137
|
*
|
|
138
|
+
* @deprecated
|
|
138
139
|
* @param {Object} state Global application state.
|
|
139
140
|
*
|
|
140
141
|
* @return {?TemplateType} Template type.
|
|
141
142
|
*/
|
|
142
143
|
export function getEditedPostType( state ) {
|
|
144
|
+
deprecated( "select( 'core/edit-site' ).getEditedPostType", {
|
|
145
|
+
since: '6.8',
|
|
146
|
+
alternative: "select( 'core/editor' ).getCurrentPostType",
|
|
147
|
+
} );
|
|
143
148
|
return state.editedPost.postType;
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
/**
|
|
147
152
|
* Returns the ID of the currently edited template or template part.
|
|
148
153
|
*
|
|
154
|
+
* @deprecated
|
|
149
155
|
* @param {Object} state Global application state.
|
|
150
156
|
*
|
|
151
157
|
* @return {?string} Post ID.
|
|
152
158
|
*/
|
|
153
159
|
export function getEditedPostId( state ) {
|
|
160
|
+
deprecated( "select( 'core/edit-site' ).getEditedPostId", {
|
|
161
|
+
since: '6.8',
|
|
162
|
+
alternative: "select( 'core/editor' ).getCurrentPostId",
|
|
163
|
+
} );
|
|
154
164
|
return state.editedPost.id;
|
|
155
165
|
}
|
|
156
166
|
|
|
@@ -163,6 +173,10 @@ export function getEditedPostId( state ) {
|
|
|
163
173
|
* @return {Object} Page.
|
|
164
174
|
*/
|
|
165
175
|
export function getEditedPostContext( state ) {
|
|
176
|
+
deprecated( "select( 'core/edit-site' ).getEditedPostContext", {
|
|
177
|
+
since: '6.8',
|
|
178
|
+
} );
|
|
179
|
+
|
|
166
180
|
return state.editedPost.context;
|
|
167
181
|
}
|
|
168
182
|
|
|
@@ -175,6 +189,10 @@ export function getEditedPostContext( state ) {
|
|
|
175
189
|
* @return {Object} Page.
|
|
176
190
|
*/
|
|
177
191
|
export function getPage( state ) {
|
|
192
|
+
deprecated( "select( 'core/edit-site' ).getPage", {
|
|
193
|
+
since: '6.8',
|
|
194
|
+
} );
|
|
195
|
+
|
|
178
196
|
return { context: state.editedPost.context };
|
|
179
197
|
}
|
|
180
198
|
|
|
@@ -333,12 +351,17 @@ export function isNavigationOpened() {
|
|
|
333
351
|
* Whether or not the editor has a page loaded into it.
|
|
334
352
|
*
|
|
335
353
|
* @see setPage
|
|
336
|
-
*
|
|
354
|
+
* @deprecated
|
|
337
355
|
* @param {Object} state Global application state.
|
|
338
356
|
*
|
|
339
357
|
* @return {boolean} Whether or not the editor has a page loaded into it.
|
|
340
358
|
*/
|
|
341
359
|
export function isPage( state ) {
|
|
360
|
+
deprecated( "select( 'core/edit-site' ).isPage", {
|
|
361
|
+
since: '6.8',
|
|
362
|
+
alternative: "select( 'core/editor' ).getCurrentPostType",
|
|
363
|
+
} );
|
|
364
|
+
|
|
342
365
|
return !! state.editedPost.context?.postId;
|
|
343
366
|
}
|
|
344
367
|
|
package/src/style.scss
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
@import "./components/sidebar-navigation-screen/style.scss";
|
|
21
21
|
@import "./components/sidebar-navigation-screen-details-footer/style.scss";
|
|
22
22
|
@import "./components/sidebar-navigation-screen-navigation-menu/style.scss";
|
|
23
|
-
@import "components/sidebar-navigation-screen-details-panel/style.scss";
|
|
24
23
|
@import "./components/sidebar-navigation-screen-patterns/style.scss";
|
|
25
24
|
@import "./components/sidebar-dataviews/style.scss";
|
|
26
25
|
@import "./components/site-hub/style.scss";
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
@import "./components/editor-canvas-container/style.scss";
|
|
31
30
|
@import "./components/post-edit/style.scss";
|
|
32
31
|
@import "./components/post-list/style.scss";
|
|
33
|
-
@import "./components/post-fields/style.scss";
|
|
34
32
|
@import "./components/resizable-frame/style.scss";
|
|
35
33
|
@import "./hooks/push-changes-to-global-styles/style.scss";
|
|
36
34
|
@import "./components/global-styles/font-library-modal/style.scss";
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
-
var _i18n = require("@wordpress/i18n");
|
|
10
|
-
var _fields = require("@wordpress/fields");
|
|
11
|
-
var _element = require("@wordpress/element");
|
|
12
|
-
var _icons = require("@wordpress/icons");
|
|
13
|
-
var _components = require("@wordpress/components");
|
|
14
|
-
var _data = require("@wordpress/data");
|
|
15
|
-
var _coreData = require("@wordpress/core-data");
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
/**
|
|
18
|
-
* External dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* WordPress dependencies
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
function PostAuthorField({
|
|
26
|
-
item
|
|
27
|
-
}) {
|
|
28
|
-
const {
|
|
29
|
-
text,
|
|
30
|
-
imageUrl
|
|
31
|
-
} = (0, _data.useSelect)(select => {
|
|
32
|
-
const {
|
|
33
|
-
getUser
|
|
34
|
-
} = select(_coreData.store);
|
|
35
|
-
const user = getUser(item.author);
|
|
36
|
-
return {
|
|
37
|
-
imageUrl: user?.avatar_urls?.[48],
|
|
38
|
-
text: user?.name
|
|
39
|
-
};
|
|
40
|
-
}, [item]);
|
|
41
|
-
const [isImageLoaded, setIsImageLoaded] = (0, _element.useState)(false);
|
|
42
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
|
|
43
|
-
alignment: "left",
|
|
44
|
-
spacing: 0,
|
|
45
|
-
children: [!!imageUrl && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
|
-
className: (0, _clsx.default)('page-templates-author-field__avatar', {
|
|
47
|
-
'is-loaded': isImageLoaded
|
|
48
|
-
}),
|
|
49
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
50
|
-
onLoad: () => setIsImageLoaded(true),
|
|
51
|
-
alt: (0, _i18n.__)('Author avatar'),
|
|
52
|
-
src: imageUrl
|
|
53
|
-
})
|
|
54
|
-
}), !imageUrl && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
-
className: "page-templates-author-field__icon",
|
|
56
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
57
|
-
icon: _icons.commentAuthorAvatar
|
|
58
|
-
})
|
|
59
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
60
|
-
className: "page-templates-author-field__name",
|
|
61
|
-
children: text
|
|
62
|
-
})]
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
function usePostFields() {
|
|
66
|
-
const {
|
|
67
|
-
records: authors,
|
|
68
|
-
isResolving: isLoadingAuthors
|
|
69
|
-
} = (0, _coreData.useEntityRecords)('root', 'user', {
|
|
70
|
-
per_page: -1
|
|
71
|
-
});
|
|
72
|
-
const fields = (0, _element.useMemo)(() => [_fields.featuredImageField, _fields.titleField, {
|
|
73
|
-
label: (0, _i18n.__)('Author'),
|
|
74
|
-
id: 'author',
|
|
75
|
-
type: 'integer',
|
|
76
|
-
elements: authors?.map(({
|
|
77
|
-
id,
|
|
78
|
-
name
|
|
79
|
-
}) => ({
|
|
80
|
-
value: id,
|
|
81
|
-
label: name
|
|
82
|
-
})) || [],
|
|
83
|
-
render: PostAuthorField,
|
|
84
|
-
sort: (a, b, direction) => {
|
|
85
|
-
const nameA = a._embedded?.author?.[0]?.name || '';
|
|
86
|
-
const nameB = b._embedded?.author?.[0]?.name || '';
|
|
87
|
-
return direction === 'asc' ? nameA.localeCompare(nameB) : nameB.localeCompare(nameA);
|
|
88
|
-
}
|
|
89
|
-
}, _fields.statusField, _fields.dateField, _fields.slugField, _fields.parentField, _fields.commentStatusField, _fields.passwordField], [authors]);
|
|
90
|
-
return {
|
|
91
|
-
isLoading: isLoadingAuthors,
|
|
92
|
-
fields
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
var _default = exports.default = usePostFields;
|
|
96
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_fields","_element","_icons","_components","_data","_coreData","_jsxRuntime","PostAuthorField","item","text","imageUrl","useSelect","select","getUser","coreStore","user","author","avatar_urls","name","isImageLoaded","setIsImageLoaded","useState","jsxs","__experimentalHStack","alignment","spacing","children","jsx","className","clsx","onLoad","alt","__","src","Icon","icon","authorIcon","usePostFields","records","authors","isResolving","isLoadingAuthors","useEntityRecords","per_page","fields","useMemo","featuredImageField","titleField","label","id","type","elements","map","value","render","sort","a","b","direction","nameA","_embedded","nameB","localeCompare","statusField","dateField","slugField","parentField","commentStatusField","passwordField","isLoading","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/post-fields/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tfeaturedImageField,\n\tslugField,\n\tparentField,\n\tpasswordField,\n\tstatusField,\n\tcommentStatusField,\n\ttitleField,\n\tdateField,\n} from '@wordpress/fields';\nimport { useMemo, useState } from '@wordpress/element';\nimport { commentAuthorAvatar as authorIcon } from '@wordpress/icons';\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\n\nfunction PostAuthorField( { item } ) {\n\tconst { text, imageUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getUser } = select( coreStore );\n\t\t\tconst user = getUser( item.author );\n\t\t\treturn {\n\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\ttext: user?.name,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ !! imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt={ __( 'Author avatar' ) }\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ authorIcon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction usePostFields() {\n\tconst { records: authors, isResolving: isLoadingAuthors } =\n\t\tuseEntityRecords( 'root', 'user', { per_page: -1 } );\n\n\tconst fields = useMemo(\n\t\t() => [\n\t\t\tfeaturedImageField,\n\t\t\ttitleField,\n\t\t\t{\n\t\t\t\tlabel: __( 'Author' ),\n\t\t\t\tid: 'author',\n\t\t\t\ttype: 'integer',\n\t\t\t\telements:\n\t\t\t\t\tauthors?.map( ( { id, name } ) => ( {\n\t\t\t\t\t\tvalue: id,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t} ) ) || [],\n\t\t\t\trender: PostAuthorField,\n\t\t\t\tsort: ( a, b, direction ) => {\n\t\t\t\t\tconst nameA = a._embedded?.author?.[ 0 ]?.name || '';\n\t\t\t\t\tconst nameB = b._embedded?.author?.[ 0 ]?.name || '';\n\n\t\t\t\t\treturn direction === 'asc'\n\t\t\t\t\t\t? nameA.localeCompare( nameB )\n\t\t\t\t\t\t: nameB.localeCompare( nameA );\n\t\t\t\t},\n\t\t\t},\n\t\t\tstatusField,\n\t\t\tdateField,\n\t\t\tslugField,\n\t\t\tparentField,\n\t\t\tcommentStatusField,\n\t\t\tpasswordField,\n\t\t],\n\t\t[ authors ]\n\t);\n\n\treturn {\n\t\tisLoading: isLoadingAuthors,\n\t\tfields,\n\t};\n}\n\nexport default usePostFields;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAUA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAA4E,IAAAQ,WAAA,GAAAR,OAAA;AAvB5E;AACA;A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ACV,CAAC;EAED,OAAO;IACN8B,SAAS,EAAE5B,gBAAgB;IAC3BG;EACD,CAAC;AACF;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnC,aAAa","ignoreList":[]}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = useActiveRoute;
|
|
8
|
-
var _router = require("@wordpress/router");
|
|
9
|
-
var _data = require("@wordpress/data");
|
|
10
|
-
var _coreData = require("@wordpress/core-data");
|
|
11
|
-
var _lockUnlock = require("../../lock-unlock");
|
|
12
|
-
var _editor = _interopRequireDefault(require("../editor"));
|
|
13
|
-
var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
|
|
14
|
-
var _sidebarNavigationScreenMain = _interopRequireDefault(require("../sidebar-navigation-screen-main"));
|
|
15
|
-
var _sidebarDataviews = _interopRequireDefault(require("../sidebar-dataviews"));
|
|
16
|
-
var _postList = _interopRequireDefault(require("../post-list"));
|
|
17
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Internal dependencies
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
const {
|
|
27
|
-
useLocation
|
|
28
|
-
} = (0, _lockUnlock.unlock)(_router.privateApis);
|
|
29
|
-
function useActiveRoute() {
|
|
30
|
-
const {
|
|
31
|
-
params = {}
|
|
32
|
-
} = useLocation();
|
|
33
|
-
const {
|
|
34
|
-
postType,
|
|
35
|
-
layout,
|
|
36
|
-
canvas
|
|
37
|
-
} = params;
|
|
38
|
-
const labels = (0, _data.useSelect)(select => {
|
|
39
|
-
return select(_coreData.store).getPostType(postType)?.labels;
|
|
40
|
-
}, [postType]);
|
|
41
|
-
|
|
42
|
-
// Posts list.
|
|
43
|
-
if (['post'].includes(postType)) {
|
|
44
|
-
const isListLayout = layout === 'list' || !layout;
|
|
45
|
-
return {
|
|
46
|
-
name: 'posts-list',
|
|
47
|
-
areas: {
|
|
48
|
-
sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreen.default, {
|
|
49
|
-
title: labels?.name,
|
|
50
|
-
isRoot: true,
|
|
51
|
-
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarDataviews.default, {})
|
|
52
|
-
}),
|
|
53
|
-
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_postList.default, {
|
|
54
|
-
postType: postType
|
|
55
|
-
}),
|
|
56
|
-
preview: (isListLayout || canvas === 'edit') && /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {
|
|
57
|
-
isPostsList: true
|
|
58
|
-
}),
|
|
59
|
-
mobile: canvas === 'edit' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {
|
|
60
|
-
isPostsList: true
|
|
61
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_postList.default, {
|
|
62
|
-
postType: postType
|
|
63
|
-
})
|
|
64
|
-
},
|
|
65
|
-
widths: {
|
|
66
|
-
content: isListLayout ? 380 : undefined
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Fallback shows the home page preview
|
|
72
|
-
return {
|
|
73
|
-
name: 'default',
|
|
74
|
-
areas: {
|
|
75
|
-
sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenMain.default, {}),
|
|
76
|
-
preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {
|
|
77
|
-
isPostsList: true
|
|
78
|
-
}),
|
|
79
|
-
mobile: canvas === 'edit' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {
|
|
80
|
-
isPostsList: true
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_router","require","_data","_coreData","_lockUnlock","_editor","_interopRequireDefault","_sidebarNavigationScreen","_sidebarNavigationScreenMain","_sidebarDataviews","_postList","_jsxRuntime","useLocation","unlock","routerPrivateApis","useActiveRoute","params","postType","layout","canvas","labels","useSelect","select","coreStore","getPostType","includes","isListLayout","name","areas","sidebar","jsx","default","title","isRoot","content","preview","isPostsList","mobile","widths","undefined"],"sources":["@wordpress/edit-site/src/components/posts-app/router.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Editor from '../editor';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport PostList from '../post-list';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function useActiveRoute() {\n\tconst { params = {} } = useLocation();\n\tconst { postType, layout, canvas } = params;\n\tconst labels = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getPostType( postType )?.labels;\n\t\t},\n\t\t[ postType ]\n\t);\n\n\t// Posts list.\n\tif ( [ 'post' ].includes( postType ) ) {\n\t\tconst isListLayout = layout === 'list' || ! layout;\n\t\treturn {\n\t\t\tname: 'posts-list',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\t\ttitle={ labels?.name }\n\t\t\t\t\t\tisRoot\n\t\t\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tcontent: <PostList postType={ postType } />,\n\t\t\t\tpreview: ( isListLayout || canvas === 'edit' ) && (\n\t\t\t\t\t<Editor isPostsList />\n\t\t\t\t),\n\t\t\t\tmobile:\n\t\t\t\t\tcanvas === 'edit' ? (\n\t\t\t\t\t\t<Editor isPostsList />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<PostList postType={ postType } />\n\t\t\t\t\t),\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Fallback shows the home page preview\n\treturn {\n\t\tname: 'default',\n\t\tareas: {\n\t\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\t\tpreview: <Editor isPostsList />,\n\t\t\tmobile: canvas === 'edit' && <Editor isPostsList />,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,wBAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,4BAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,iBAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,SAAA,GAAAJ,sBAAA,CAAAL,OAAA;AAAoC,IAAAU,WAAA,GAAAV,OAAA;AAfpC;AACA;AACA;;AAKA;AACA;AACA;;AAQA,MAAM;EAAEW;AAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEpC,SAASC,cAAcA,CAAA,EAAG;EACxC,MAAM;IAAEC,MAAM,GAAG,CAAC;EAAE,CAAC,GAAGJ,WAAW,CAAC,CAAC;EACrC,MAAM;IAAEK,QAAQ;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAC3C,MAAMI,MAAM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KAAK,EAAE;MACNC,OAAO,eAAE,IAAAlB,WAAA,CAAAmB,GAAA,EAACtB,4BAAA,CAAAuB,OAA2B,IAAE,CAAC;MACxCI,OAAO,eAAE,IAAAxB,WAAA,CAAAmB,GAAA,EAACzB,OAAA,CAAA0B,OAAM;QAACK,WAAW;MAAA,CAAE,CAAC;MAC/BC,MAAM,EAAElB,MAAM,KAAK,MAAM,iBAAI,IAAAR,WAAA,CAAAmB,GAAA,EAACzB,OAAA,CAAA0B,OAAM;QAACK,WAAW;MAAA,CAAE;IACnD;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.SidebarNavigationScreenDetailsPanel = SidebarNavigationScreenDetailsPanel;
|
|
8
|
-
Object.defineProperty(exports, "SidebarNavigationScreenDetailsPanelLabel", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () {
|
|
11
|
-
return _sidebarNavigationScreenDetailsPanelLabel.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "SidebarNavigationScreenDetailsPanelRow", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return _sidebarNavigationScreenDetailsPanelRow.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "SidebarNavigationScreenDetailsPanelValue", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return _sidebarNavigationScreenDetailsPanelValue.default;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
var _components = require("@wordpress/components");
|
|
27
|
-
var _sidebarNavigationScreenDetailsPanelLabel = _interopRequireDefault(require("./sidebar-navigation-screen-details-panel-label"));
|
|
28
|
-
var _sidebarNavigationScreenDetailsPanelRow = _interopRequireDefault(require("./sidebar-navigation-screen-details-panel-row"));
|
|
29
|
-
var _sidebarNavigationScreenDetailsPanelValue = _interopRequireDefault(require("./sidebar-navigation-screen-details-panel-value"));
|
|
30
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
|
-
/**
|
|
32
|
-
* WordPress dependencies
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Internal dependencies
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
function SidebarNavigationScreenDetailsPanel({
|
|
40
|
-
title,
|
|
41
|
-
children,
|
|
42
|
-
spacing
|
|
43
|
-
}) {
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
|
|
45
|
-
className: "edit-site-sidebar-navigation-details-screen-panel",
|
|
46
|
-
spacing: spacing,
|
|
47
|
-
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHeading, {
|
|
48
|
-
className: "edit-site-sidebar-navigation-details-screen-panel__heading",
|
|
49
|
-
level: 2,
|
|
50
|
-
children: title
|
|
51
|
-
}), children]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_sidebarNavigationScreenDetailsPanelLabel","_interopRequireDefault","_sidebarNavigationScreenDetailsPanelRow","_sidebarNavigationScreenDetailsPanelValue","_jsxRuntime","SidebarNavigationScreenDetailsPanel","title","children","spacing","jsxs","__experimentalVStack","className","jsx","__experimentalHeading","level"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,yCAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uCAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,yCAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAuG,IAAAK,WAAA,GAAAL,OAAA;AAbvG;AACA;AACA;;AAMA;AACA;AACA;;AAKA,SAASM,mCAAmCA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC5E,oBACC,IAAAJ,WAAA,CAAAK,IAAA,EAACX,WAAA,CAAAY,oBAAM;IACNC,SAAS,EAAC,mDAAmD;IAC7DH,OAAO,EAAGA,OAAS;IAAAD,QAAA,GAEjBD,KAAK,iBACN,IAAAF,WAAA,CAAAQ,GAAA,EAACd,WAAA,CAAAe,qBAAO;MACPF,SAAS,EAAC,4DAA4D;MACtEG,KAAK,EAAG,CAAG;MAAAP,QAAA,EAETD;IAAK,CACC,CACT,EACCC,QAAQ;EAAA,CACH,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = SidebarNavigationScreenDetailsPanelLabel;
|
|
7
|
-
var _components = require("@wordpress/components");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
/**
|
|
10
|
-
* WordPress dependencies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
function SidebarNavigationScreenDetailsPanelLabel({
|
|
14
|
-
children
|
|
15
|
-
}) {
|
|
16
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
|
|
17
|
-
className: "edit-site-sidebar-navigation-details-screen-panel__label",
|
|
18
|
-
children: children
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=sidebar-navigation-screen-details-panel-label.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_jsxRuntime","SidebarNavigationScreenDetailsPanelLabel","children","jsx","__experimentalText","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAmE,IAAAC,WAAA,GAAAD,OAAA;AAHnE;AACA;AACA;;AAGe,SAASE,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,oBACC,IAAAF,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,kBAAI;IAACC,SAAS,EAAC,0DAA0D;IAAAH,QAAA,EACvEA;EAAQ,CACL,CAAC;AAET","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = SidebarNavigationScreenDetailsPanelRow;
|
|
8
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/**
|
|
12
|
-
* External dependencies
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* WordPress dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function SidebarNavigationScreenDetailsPanelRow({
|
|
20
|
-
label,
|
|
21
|
-
children,
|
|
22
|
-
className,
|
|
23
|
-
...extraProps
|
|
24
|
-
}) {
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHStack, {
|
|
26
|
-
spacing: 5,
|
|
27
|
-
alignment: "left",
|
|
28
|
-
className: (0, _clsx.default)('edit-site-sidebar-navigation-details-screen-panel__row', className),
|
|
29
|
-
...extraProps,
|
|
30
|
-
children: children
|
|
31
|
-
}, label);
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=sidebar-navigation-screen-details-panel-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_jsxRuntime","SidebarNavigationScreenDetailsPanelRow","label","children","className","extraProps","jsx","__experimentalHStack","spacing","alignment","clsx"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n\t...extraProps\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAAuE,IAAAE,WAAA,GAAAF,OAAA;AARvE;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASG,sCAAsCA,CAAE;EAC/DC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH,oBACC,IAAAL,WAAA,CAAAM,GAAA,EAACP,WAAA,CAAAQ,oBAAM;IAENC,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC,MAAM;IAChBL,SAAS,EAAG,IAAAM,aAAI,EACf,wDAAwD,EACxDN,SACD,CAAG;IAAA,GACEC,UAAU;IAAAF,QAAA,EAEbA;EAAQ,GATJD,KAUC,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = SidebarNavigationScreenDetailsPanelValue;
|
|
7
|
-
var _components = require("@wordpress/components");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
/**
|
|
10
|
-
* WordPress dependencies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
function SidebarNavigationScreenDetailsPanelValue({
|
|
14
|
-
children
|
|
15
|
-
}) {
|
|
16
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
|
|
17
|
-
className: "edit-site-sidebar-navigation-details-screen-panel__value",
|
|
18
|
-
children: children
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=sidebar-navigation-screen-details-panel-value.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_jsxRuntime","SidebarNavigationScreenDetailsPanelValue","children","jsx","__experimentalText","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAmE,IAAAC,WAAA,GAAAD,OAAA;AAHnE;AACA;AACA;;AAGe,SAASE,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,oBACC,IAAAF,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,kBAAI;IAACC,SAAS,EAAC,0DAA0D;IAAAH,QAAA,EACvEA;EAAQ,CACL,CAAC;AAET","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.stylesEditRoute = void 0;
|
|
8
|
-
var _editor = _interopRequireDefault(require("../editor"));
|
|
9
|
-
var _sidebarNavigationScreenGlobalStyles = _interopRequireDefault(require("../sidebar-navigation-screen-global-styles"));
|
|
10
|
-
var _sidebarGlobalStylesWrapper = _interopRequireDefault(require("../sidebar-global-styles-wrapper"));
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
/**
|
|
13
|
-
* Internal dependencies
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const stylesEditRoute = exports.stylesEditRoute = {
|
|
17
|
-
name: 'styles-edit',
|
|
18
|
-
match: params => {
|
|
19
|
-
return params.path && params.path.startsWith('/wp_global_styles') && params.canvas !== 'edit';
|
|
20
|
-
},
|
|
21
|
-
areas: {
|
|
22
|
-
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarGlobalStylesWrapper.default, {}),
|
|
23
|
-
sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenGlobalStyles.default, {
|
|
24
|
-
backPath: {}
|
|
25
|
-
}),
|
|
26
|
-
preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
|
|
27
|
-
mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
|
|
28
|
-
},
|
|
29
|
-
widths: {
|
|
30
|
-
content: 380
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=styles-edit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_editor","_interopRequireDefault","require","_sidebarNavigationScreenGlobalStyles","_sidebarGlobalStylesWrapper","_jsxRuntime","stylesEditRoute","exports","name","match","params","path","startsWith","canvas","areas","content","jsx","default","sidebar","backPath","preview","mobile","widths"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/styles-edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport GlobalStylesUIWrapper from '../sidebar-global-styles-wrapper';\n\nexport const stylesEditRoute = {\n\tname: 'styles-edit',\n\tmatch: ( params ) => {\n\t\treturn (\n\t\t\tparams.path &&\n\t\t\tparams.path.startsWith( '/wp_global_styles' ) &&\n\t\t\tparams.canvas !== 'edit'\n\t\t);\n\t},\n\tareas: {\n\t\tcontent: <GlobalStylesUIWrapper />,\n\t\tsidebar: <SidebarNavigationScreenGlobalStyles backPath={ {} } />,\n\t\tpreview: <Editor />,\n\t\tmobile: <Editor />,\n\t},\n\twidths: {\n\t\tcontent: 380,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oCAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,2BAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAqE,IAAAG,WAAA,GAAAH,OAAA;AALrE;AACA;AACA;;AAKO,MAAMI,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC9BE,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OACCA,MAAM,CAACC,IAAI,IACXD,MAAM,CAACC,IAAI,CAACC,UAAU,CAAE,mBAAoB,CAAC,IAC7CF,MAAM,CAACG,MAAM,KAAK,MAAM;EAE1B,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAV,WAAA,CAAAW,GAAA,EAACZ,2BAAA,CAAAa,OAAqB,IAAE,CAAC;IAClCC,OAAO,eAAE,IAAAb,WAAA,CAAAW,GAAA,EAACb,oCAAA,CAAAc,OAAmC;MAACE,QAAQ,EAAG,CAAC;IAAG,CAAE,CAAC;IAChEC,OAAO,eAAE,IAAAf,WAAA,CAAAW,GAAA,EAAChB,OAAA,CAAAiB,OAAM,IAAE,CAAC;IACnBI,MAAM,eAAE,IAAAhB,WAAA,CAAAW,GAAA,EAAChB,OAAA,CAAAiB,OAAM,IAAE;EAClB,CAAC;EACDK,MAAM,EAAE;IACPP,OAAO,EAAE;EACV;AACD,CAAC","ignoreList":[]}
|