@wordpress/edit-site 6.33.3-next.36001005c.0 → 6.33.4
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/build/components/dataviews-actions/index.js +8 -6
- package/build/components/dataviews-actions/index.js.map +2 -2
- package/build/components/global-styles-renderer/index.js +4 -2
- package/build/components/global-styles-renderer/index.js.map +3 -3
- package/build/components/page-templates/fields.js +19 -26
- package/build/components/page-templates/fields.js.map +2 -2
- package/build/components/page-templates/index.js +52 -39
- package/build/components/page-templates/index.js.map +2 -2
- package/build/components/page-templates/view-utils.js +4 -0
- package/build/components/page-templates/view-utils.js.map +2 -2
- package/build/components/revisions/index.js +2 -2
- package/build/components/revisions/index.js.map +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +8 -9
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
- package/build/components/style-book/index.js +8 -4
- package/build/components/style-book/index.js.map +2 -2
- package/build-module/components/dataviews-actions/index.js +8 -6
- package/build-module/components/dataviews-actions/index.js.map +2 -2
- package/build-module/components/global-styles-renderer/index.js +3 -1
- package/build-module/components/global-styles-renderer/index.js.map +2 -2
- package/build-module/components/page-templates/fields.js +19 -26
- package/build-module/components/page-templates/fields.js.map +2 -2
- package/build-module/components/page-templates/index.js +52 -39
- package/build-module/components/page-templates/index.js.map +2 -2
- package/build-module/components/page-templates/view-utils.js +4 -0
- package/build-module/components/page-templates/view-utils.js.map +2 -2
- package/build-module/components/revisions/index.js +1 -1
- package/build-module/components/revisions/index.js.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +9 -10
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
- package/build-module/components/style-book/index.js +6 -2
- package/build-module/components/style-book/index.js.map +2 -2
- package/build-style/posts-rtl.css +13 -13
- package/build-style/posts.css +13 -13
- package/build-style/style-rtl.css +23 -23
- package/build-style/style.css +23 -23
- package/package.json +44 -45
- package/src/components/dataviews-actions/index.js +12 -10
- package/src/components/global-styles/font-library-modal/style.scss +3 -3
- package/src/components/global-styles/style.scss +1 -1
- package/src/components/global-styles-renderer/index.js +4 -1
- package/src/components/global-styles-sidebar/style.scss +2 -2
- package/src/components/page-templates/fields.js +23 -29
- package/src/components/page-templates/index.js +62 -45
- package/src/components/page-templates/view-utils.js +7 -0
- package/src/components/revisions/index.js +1 -1
- package/src/components/sidebar-navigation-screen/style.scss +1 -1
- package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +9 -10
- package/src/components/site-hub/style.scss +1 -1
- package/src/components/style-book/index.js +6 -3
- package/tsconfig.json +0 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/hooks/use-global-styles-output.js +0 -77
- package/build/hooks/use-global-styles-output.js.map +0 -7
- package/build-module/hooks/use-global-styles-output.js +0 -52
- package/build-module/hooks/use-global-styles-output.js.map +0 -7
- package/src/hooks/use-global-styles-output.js +0 -80
|
@@ -28,6 +28,13 @@ const DEFAULT_VIEW = {
|
|
|
28
28
|
export function getDefaultView( activeView ) {
|
|
29
29
|
return {
|
|
30
30
|
...DEFAULT_VIEW,
|
|
31
|
+
sort:
|
|
32
|
+
activeView === 'user'
|
|
33
|
+
? {
|
|
34
|
+
field: 'date',
|
|
35
|
+
direction: 'desc',
|
|
36
|
+
}
|
|
37
|
+
: DEFAULT_VIEW.sort,
|
|
31
38
|
filters: ! [ 'active', 'user' ].includes( activeView )
|
|
32
39
|
? [
|
|
33
40
|
{
|
|
@@ -20,11 +20,11 @@ import { useContext, useMemo } from '@wordpress/element';
|
|
|
20
20
|
|
|
21
21
|
import { unlock } from '../../lock-unlock';
|
|
22
22
|
import EditorCanvasContainer from '../editor-canvas-container';
|
|
23
|
-
import { useGlobalStylesOutputWithConfig } from '../../hooks/use-global-styles-output';
|
|
24
23
|
|
|
25
24
|
const {
|
|
26
25
|
ExperimentalBlockEditorProvider,
|
|
27
26
|
GlobalStylesContext,
|
|
27
|
+
useGlobalStylesOutputWithConfig,
|
|
28
28
|
__unstableBlockStyleVariationOverridesWithConfig,
|
|
29
29
|
} = unlock( blockEditorPrivateApis );
|
|
30
30
|
const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
|
|
@@ -13,7 +13,7 @@ import { addQueryArgs } from '@wordpress/url';
|
|
|
13
13
|
*/
|
|
14
14
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
15
15
|
import { useAddedBy } from '../page-templates/hooks';
|
|
16
|
-
import {
|
|
16
|
+
import { commentAuthorAvatar, published } from '@wordpress/icons';
|
|
17
17
|
import { unlock } from '../../lock-unlock';
|
|
18
18
|
|
|
19
19
|
const { useLocation } = unlock( routerPrivateApis );
|
|
@@ -38,13 +38,12 @@ export default function DataviewsTemplatesSidebarContent() {
|
|
|
38
38
|
const {
|
|
39
39
|
query: { activeView = 'active' },
|
|
40
40
|
} = useLocation();
|
|
41
|
-
const { records } = useEntityRecords(
|
|
42
|
-
|
|
43
|
-
'
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
);
|
|
41
|
+
const { records } = useEntityRecords( 'root', 'registeredTemplate', {
|
|
42
|
+
// This should not be needed, the endpoint returns all registered
|
|
43
|
+
// templates, but it's not possible right now to turn off pagination for
|
|
44
|
+
// entity configs.
|
|
45
|
+
per_page: -1,
|
|
46
|
+
} );
|
|
48
47
|
const firstItemPerAuthorText = useMemo( () => {
|
|
49
48
|
const firstItemPerAuthor = records?.reduce( ( acc, template ) => {
|
|
50
49
|
const author = template.author_text;
|
|
@@ -63,14 +62,14 @@ export default function DataviewsTemplatesSidebarContent() {
|
|
|
63
62
|
<ItemGroup className="edit-site-sidebar-navigation-screen-templates-browse">
|
|
64
63
|
<SidebarNavigationItem
|
|
65
64
|
to="/template"
|
|
66
|
-
icon={
|
|
65
|
+
icon={ published }
|
|
67
66
|
aria-current={ activeView === 'active' }
|
|
68
67
|
>
|
|
69
68
|
{ __( 'Active templates' ) }
|
|
70
69
|
</SidebarNavigationItem>
|
|
71
70
|
<SidebarNavigationItem
|
|
72
71
|
to={ addQueryArgs( '/template', { activeView: 'user' } ) }
|
|
73
|
-
icon={
|
|
72
|
+
icon={ commentAuthorAvatar }
|
|
74
73
|
aria-current={ activeView === 'user' }
|
|
75
74
|
>
|
|
76
75
|
{
|
|
@@ -56,10 +56,13 @@ import {
|
|
|
56
56
|
STYLE_BOOK_COLOR_GROUPS,
|
|
57
57
|
STYLE_BOOK_PREVIEW_CATEGORIES,
|
|
58
58
|
} from '../style-book/constants';
|
|
59
|
-
import { useGlobalStylesOutputWithConfig } from '../../hooks/use-global-styles-output';
|
|
60
59
|
|
|
61
|
-
const {
|
|
62
|
-
|
|
60
|
+
const {
|
|
61
|
+
ExperimentalBlockEditorProvider,
|
|
62
|
+
useGlobalStyle,
|
|
63
|
+
GlobalStylesContext,
|
|
64
|
+
useGlobalStylesOutputWithConfig,
|
|
65
|
+
} = unlock( blockEditorPrivateApis );
|
|
63
66
|
const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
|
|
64
67
|
|
|
65
68
|
const { Tabs } = unlock( componentsPrivateApis );
|