@wordpress/editor 13.12.2 → 13.12.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/post-sync-status/index.js +2 -20
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +4 -22
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-style/style-rtl.css +2 -2
- package/build-style/style.css +2 -2
- package/package.json +13 -13
- package/src/components/post-sync-status/index.js +7 -27
- package/src/components/post-sync-status/style.scss +2 -2
|
@@ -23,9 +23,6 @@ var _store = require("../../store");
|
|
|
23
23
|
* Internal dependencies
|
|
24
24
|
*/
|
|
25
25
|
function PostSyncStatus() {
|
|
26
|
-
const {
|
|
27
|
-
editPost
|
|
28
|
-
} = (0, _data.useDispatch)(_store.store);
|
|
29
26
|
const {
|
|
30
27
|
meta,
|
|
31
28
|
postType
|
|
@@ -43,25 +40,10 @@ function PostSyncStatus() {
|
|
|
43
40
|
return null;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
const
|
|
47
|
-
meta: { ...meta,
|
|
48
|
-
wp_block: syncStatus === 'unsynced' ? {
|
|
49
|
-
sync_status: syncStatus
|
|
50
|
-
} : null
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
const syncStatus = meta?.wp_block?.sync_status;
|
|
43
|
+
const syncStatus = meta?.sync_status;
|
|
55
44
|
const isFullySynced = !syncStatus;
|
|
56
45
|
return (0, _element.createElement)(_components.PanelRow, {
|
|
57
46
|
className: "edit-post-sync-status"
|
|
58
|
-
}, (0, _element.createElement)("span", null, (0, _i18n.__)('
|
|
59
|
-
__nextHasNoMarginBottom: true,
|
|
60
|
-
label: isFullySynced ? (0, _i18n.__)('Fully synced') : (0, _i18n.__)('Not synced'),
|
|
61
|
-
checked: isFullySynced,
|
|
62
|
-
onChange: () => {
|
|
63
|
-
onUpdateSync(syncStatus === 'unsynced' ? 'fully' : 'unsynced');
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
47
|
+
}, (0, _element.createElement)("span", null, (0, _i18n.__)('Sync status')), (0, _element.createElement)("div", null, isFullySynced ? (0, _i18n.__)('Fully synced') : (0, _i18n.__)('Not synced')));
|
|
66
48
|
}
|
|
67
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/post-sync-status/index.js"],"names":["PostSyncStatus","
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/post-sync-status/index.js"],"names":["PostSyncStatus","meta","postType","select","getEditedPostAttribute","editorStore","syncStatus","sync_status","isFullySynced"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;AAGe,SAASA,cAAT,GAA0B;AACxC,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAqB,qBAAaC,MAAF,IAAc;AACnD,UAAM;AAAEC,MAAAA;AAAF,QAA6BD,MAAM,CAAEE,YAAF,CAAzC;AACA,WAAO;AACNJ,MAAAA,IAAI,EAAEG,sBAAsB,CAAE,MAAF,CADtB;AAENF,MAAAA,QAAQ,EAAEE,sBAAsB,CAAE,MAAF;AAF1B,KAAP;AAIA,GAN0B,EAMxB,EANwB,CAA3B;;AAOA,MAAKF,QAAQ,KAAK,UAAlB,EAA+B;AAC9B,WAAO,IAAP;AACA;;AACD,QAAMI,UAAU,GAAGL,IAAI,EAAEM,WAAzB;AACA,QAAMC,aAAa,GAAG,CAAEF,UAAxB;AAEA,SACC,4BAAC,oBAAD;AAAU,IAAA,SAAS,EAAC;AAApB,KACC,0CAAQ,cAAI,aAAJ,CAAR,CADD,EAEC,yCACGE,aAAa,GAAG,cAAI,cAAJ,CAAH,GAA0B,cAAI,YAAJ,CAD1C,CAFD,CADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { PanelRow } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostSyncStatus() {\n\tconst { meta, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\treturn {\n\t\t\tmeta: getEditedPostAttribute( 'meta' ),\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t};\n\t}, [] );\n\tif ( postType !== 'wp_block' ) {\n\t\treturn null;\n\t}\n\tconst syncStatus = meta?.sync_status;\n\tconst isFullySynced = ! syncStatus;\n\n\treturn (\n\t\t<PanelRow className=\"edit-post-sync-status\">\n\t\t\t<span>{ __( 'Sync status' ) }</span>\n\t\t\t<div>\n\t\t\t\t{ isFullySynced ? __( 'Fully synced' ) : __( 'Not synced' ) }\n\t\t\t</div>\n\t\t</PanelRow>\n\t);\n}\n"]}
|
|
@@ -3,18 +3,15 @@ import { createElement } from "@wordpress/element";
|
|
|
3
3
|
/**
|
|
4
4
|
* WordPress dependencies
|
|
5
5
|
*/
|
|
6
|
-
import { useSelect
|
|
6
|
+
import { useSelect } from '@wordpress/data';
|
|
7
7
|
import { __ } from '@wordpress/i18n';
|
|
8
|
-
import {
|
|
8
|
+
import { PanelRow } from '@wordpress/components';
|
|
9
9
|
/**
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { store as editorStore } from '../../store';
|
|
14
14
|
export default function PostSyncStatus() {
|
|
15
|
-
const {
|
|
16
|
-
editPost
|
|
17
|
-
} = useDispatch(editorStore);
|
|
18
15
|
const {
|
|
19
16
|
meta,
|
|
20
17
|
postType
|
|
@@ -32,25 +29,10 @@ export default function PostSyncStatus() {
|
|
|
32
29
|
return null;
|
|
33
30
|
}
|
|
34
31
|
|
|
35
|
-
const
|
|
36
|
-
meta: { ...meta,
|
|
37
|
-
wp_block: syncStatus === 'unsynced' ? {
|
|
38
|
-
sync_status: syncStatus
|
|
39
|
-
} : null
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const syncStatus = meta?.wp_block?.sync_status;
|
|
32
|
+
const syncStatus = meta?.sync_status;
|
|
44
33
|
const isFullySynced = !syncStatus;
|
|
45
34
|
return createElement(PanelRow, {
|
|
46
35
|
className: "edit-post-sync-status"
|
|
47
|
-
}, createElement("span", null, __('
|
|
48
|
-
__nextHasNoMarginBottom: true,
|
|
49
|
-
label: isFullySynced ? __('Fully synced') : __('Not synced'),
|
|
50
|
-
checked: isFullySynced,
|
|
51
|
-
onChange: () => {
|
|
52
|
-
onUpdateSync(syncStatus === 'unsynced' ? 'fully' : 'unsynced');
|
|
53
|
-
}
|
|
54
|
-
}));
|
|
36
|
+
}, createElement("span", null, __('Sync status')), createElement("div", null, isFullySynced ? __('Fully synced') : __('Not synced')));
|
|
55
37
|
}
|
|
56
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/editor/src/components/post-sync-status/index.js"],"names":["useSelect","
|
|
1
|
+
{"version":3,"sources":["@wordpress/editor/src/components/post-sync-status/index.js"],"names":["useSelect","__","PanelRow","store","editorStore","PostSyncStatus","meta","postType","select","getEditedPostAttribute","syncStatus","sync_status","isFullySynced"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,QAAyB,uBAAzB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,aAArC;AAEA,eAAe,SAASC,cAAT,GAA0B;AACxC,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAqBP,SAAS,CAAIQ,MAAF,IAAc;AACnD,UAAM;AAAEC,MAAAA;AAAF,QAA6BD,MAAM,CAAEJ,WAAF,CAAzC;AACA,WAAO;AACNE,MAAAA,IAAI,EAAEG,sBAAsB,CAAE,MAAF,CADtB;AAENF,MAAAA,QAAQ,EAAEE,sBAAsB,CAAE,MAAF;AAF1B,KAAP;AAIA,GANmC,EAMjC,EANiC,CAApC;;AAOA,MAAKF,QAAQ,KAAK,UAAlB,EAA+B;AAC9B,WAAO,IAAP;AACA;;AACD,QAAMG,UAAU,GAAGJ,IAAI,EAAEK,WAAzB;AACA,QAAMC,aAAa,GAAG,CAAEF,UAAxB;AAEA,SACC,cAAC,QAAD;AAAU,IAAA,SAAS,EAAC;AAApB,KACC,4BAAQT,EAAE,CAAE,aAAF,CAAV,CADD,EAEC,2BACGW,aAAa,GAAGX,EAAE,CAAE,cAAF,CAAL,GAA0BA,EAAE,CAAE,YAAF,CAD5C,CAFD,CADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { PanelRow } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostSyncStatus() {\n\tconst { meta, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\treturn {\n\t\t\tmeta: getEditedPostAttribute( 'meta' ),\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t};\n\t}, [] );\n\tif ( postType !== 'wp_block' ) {\n\t\treturn null;\n\t}\n\tconst syncStatus = meta?.sync_status;\n\tconst isFullySynced = ! syncStatus;\n\n\treturn (\n\t\t<PanelRow className=\"edit-post-sync-status\">\n\t\t\t<span>{ __( 'Sync status' ) }</span>\n\t\t\t<div>\n\t\t\t\t{ isFullySynced ? __( 'Fully synced' ) : __( 'Not synced' ) }\n\t\t\t</div>\n\t\t</PanelRow>\n\t);\n}\n"]}
|
package/build-style/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.4",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"@wordpress/a11y": "^3.35.1",
|
|
35
35
|
"@wordpress/api-fetch": "^6.32.1",
|
|
36
36
|
"@wordpress/blob": "^3.35.1",
|
|
37
|
-
"@wordpress/block-editor": "^12.3.
|
|
38
|
-
"@wordpress/blocks": "^12.12.
|
|
39
|
-
"@wordpress/components": "^25.1.
|
|
37
|
+
"@wordpress/block-editor": "^12.3.4",
|
|
38
|
+
"@wordpress/blocks": "^12.12.2",
|
|
39
|
+
"@wordpress/components": "^25.1.4",
|
|
40
40
|
"@wordpress/compose": "^6.12.1",
|
|
41
|
-
"@wordpress/core-data": "^6.12.
|
|
42
|
-
"@wordpress/data": "^9.5.
|
|
41
|
+
"@wordpress/core-data": "^6.12.4",
|
|
42
|
+
"@wordpress/data": "^9.5.2",
|
|
43
43
|
"@wordpress/date": "^4.35.1",
|
|
44
44
|
"@wordpress/deprecated": "^3.35.1",
|
|
45
45
|
"@wordpress/dom": "^3.35.1",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
"@wordpress/html-entities": "^3.35.1",
|
|
49
49
|
"@wordpress/i18n": "^4.35.1",
|
|
50
50
|
"@wordpress/icons": "^9.26.2",
|
|
51
|
-
"@wordpress/keyboard-shortcuts": "^4.12.
|
|
51
|
+
"@wordpress/keyboard-shortcuts": "^4.12.2",
|
|
52
52
|
"@wordpress/keycodes": "^3.35.1",
|
|
53
53
|
"@wordpress/media-utils": "^4.26.1",
|
|
54
|
-
"@wordpress/notices": "^4.3.
|
|
55
|
-
"@wordpress/preferences": "^3.12.
|
|
54
|
+
"@wordpress/notices": "^4.3.2",
|
|
55
|
+
"@wordpress/preferences": "^3.12.4",
|
|
56
56
|
"@wordpress/private-apis": "^0.17.1",
|
|
57
|
-
"@wordpress/reusable-blocks": "^4.12.
|
|
58
|
-
"@wordpress/rich-text": "^6.12.
|
|
59
|
-
"@wordpress/server-side-render": "^4.12.
|
|
57
|
+
"@wordpress/reusable-blocks": "^4.12.4",
|
|
58
|
+
"@wordpress/rich-text": "^6.12.2",
|
|
59
|
+
"@wordpress/server-side-render": "^4.12.4",
|
|
60
60
|
"@wordpress/url": "^3.36.1",
|
|
61
61
|
"@wordpress/wordcount": "^3.35.1",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "65fb4cd5187a47ca274c24c04a220bcdb2ddfa67"
|
|
77
77
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useSelect
|
|
4
|
+
import { useSelect } from '@wordpress/data';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
|
-
import {
|
|
6
|
+
import { PanelRow } from '@wordpress/components';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Internal dependencies
|
|
@@ -11,7 +11,6 @@ import { ToggleControl, PanelRow } from '@wordpress/components';
|
|
|
11
11
|
import { store as editorStore } from '../../store';
|
|
12
12
|
|
|
13
13
|
export default function PostSyncStatus() {
|
|
14
|
-
const { editPost } = useDispatch( editorStore );
|
|
15
14
|
const { meta, postType } = useSelect( ( select ) => {
|
|
16
15
|
const { getEditedPostAttribute } = select( editorStore );
|
|
17
16
|
return {
|
|
@@ -22,34 +21,15 @@ export default function PostSyncStatus() {
|
|
|
22
21
|
if ( postType !== 'wp_block' ) {
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
|
-
const
|
|
26
|
-
editPost( {
|
|
27
|
-
meta: {
|
|
28
|
-
...meta,
|
|
29
|
-
wp_block:
|
|
30
|
-
syncStatus === 'unsynced'
|
|
31
|
-
? { sync_status: syncStatus }
|
|
32
|
-
: null,
|
|
33
|
-
},
|
|
34
|
-
} );
|
|
35
|
-
const syncStatus = meta?.wp_block?.sync_status;
|
|
24
|
+
const syncStatus = meta?.sync_status;
|
|
36
25
|
const isFullySynced = ! syncStatus;
|
|
37
26
|
|
|
38
27
|
return (
|
|
39
28
|
<PanelRow className="edit-post-sync-status">
|
|
40
|
-
<span>{ __( '
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
isFullySynced ? __( 'Fully synced' ) : __( 'Not synced' )
|
|
45
|
-
}
|
|
46
|
-
checked={ isFullySynced }
|
|
47
|
-
onChange={ () => {
|
|
48
|
-
onUpdateSync(
|
|
49
|
-
syncStatus === 'unsynced' ? 'fully' : 'unsynced'
|
|
50
|
-
);
|
|
51
|
-
} }
|
|
52
|
-
/>
|
|
29
|
+
<span>{ __( 'Sync status' ) }</span>
|
|
30
|
+
<div>
|
|
31
|
+
{ isFullySynced ? __( 'Fully synced' ) : __( 'Not synced' ) }
|
|
32
|
+
</div>
|
|
53
33
|
</PanelRow>
|
|
54
34
|
);
|
|
55
35
|
}
|