@wordpress/editor 14.26.0 → 14.27.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/README.md +1 -1
- package/build/components/collab-sidebar/comments.js +1 -1
- package/build/components/collab-sidebar/comments.js.map +1 -1
- package/build/components/media-categories/index.js +1 -1
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/post-actions/actions.js +30 -13
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-locked-modal/index.js +10 -7
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/hooks/media-upload.js +1 -21
- package/build/hooks/media-upload.js.map +1 -1
- package/build/store/private-actions.js +1 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/selectors.js +20 -0
- package/build/store/selectors.js.map +1 -1
- package/build/utils/media-upload/index.js +1 -1
- package/build/utils/media-upload/index.js.map +1 -1
- package/build-module/components/collab-sidebar/comments.js +1 -1
- package/build-module/components/collab-sidebar/comments.js.map +1 -1
- package/build-module/components/media-categories/index.js +1 -1
- package/build-module/components/media-categories/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +30 -13
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +10 -9
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/hooks/media-upload.js +1 -21
- package/build-module/hooks/media-upload.js.map +1 -1
- package/build-module/store/private-actions.js +1 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/selectors.js +20 -0
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/media-upload/index.js +1 -1
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-style/style-rtl.css +12 -1
- package/build-style/style.css +12 -1
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +59 -3
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -1
- package/build-types/components/post-actions/actions.d.ts.map +1 -1
- package/build-types/components/post-actions/set-as-homepage.d.ts +1 -1
- package/build-types/components/post-actions/set-as-posts-page.d.ts +1 -1
- package/build-types/components/post-format/index.d.ts +30 -3
- package/build-types/components/post-format/index.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts +53 -7
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-status/index.d.ts +20 -4
- package/build-types/components/post-status/index.d.ts.map +1 -1
- package/build-types/components/post-visibility/utils.d.ts +12 -4
- package/build-types/components/post-visibility/utils.d.ts.map +1 -1
- package/build-types/dataviews/store/reducer.d.ts +1 -1
- package/build-types/store/reducer.d.ts +1 -1
- package/build-types/store/selectors.d.ts +20 -0
- package/build-types/store/selectors.d.ts.map +1 -1
- package/build-types/utils/media-upload/index.d.ts +1 -1
- package/build-types/utils/pageTypeBadge.d.ts +1 -1
- package/build-types/utils/pageTypeBadge.d.ts.map +1 -1
- package/package.json +37 -37
- package/src/components/collab-sidebar/comments.js +1 -1
- package/src/components/media-categories/index.js +1 -1
- package/src/components/post-actions/actions.js +37 -16
- package/src/components/post-locked-modal/index.js +12 -7
- package/src/components/post-publish-panel/maybe-post-format-panel.js +1 -1
- package/src/components/post-url/style.scss +14 -1
- package/src/hooks/media-upload.js +1 -14
- package/src/store/private-actions.js +1 -1
- package/src/store/selectors.js +20 -0
- package/src/utils/media-upload/index.js +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function useSetAsHomepageAction(): {
|
|
2
2
|
id: string;
|
|
3
|
-
label:
|
|
3
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Set as homepage">;
|
|
4
4
|
isEligible(post: any): boolean;
|
|
5
5
|
modalFocusOnMount: string;
|
|
6
6
|
RenderModal: ({ items, closeModal }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function useSetAsPostsPageAction(): {
|
|
2
2
|
id: string;
|
|
3
|
-
label:
|
|
3
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Set as posts page">;
|
|
4
4
|
isEligible(post: any): boolean;
|
|
5
5
|
modalFocusOnMount: string;
|
|
6
6
|
RenderModal: ({ items, closeModal }: {
|
|
@@ -9,8 +9,35 @@
|
|
|
9
9
|
* @return {React.ReactNode} The rendered PostFormat component.
|
|
10
10
|
*/
|
|
11
11
|
export default function PostFormat(): React.ReactNode;
|
|
12
|
-
export const POST_FORMATS: {
|
|
12
|
+
export const POST_FORMATS: ({
|
|
13
13
|
id: string;
|
|
14
|
-
caption:
|
|
15
|
-
}
|
|
14
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Aside">;
|
|
15
|
+
} | {
|
|
16
|
+
id: string;
|
|
17
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Audio">;
|
|
18
|
+
} | {
|
|
19
|
+
id: string;
|
|
20
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Chat">;
|
|
21
|
+
} | {
|
|
22
|
+
id: string;
|
|
23
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Gallery">;
|
|
24
|
+
} | {
|
|
25
|
+
id: string;
|
|
26
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Image">;
|
|
27
|
+
} | {
|
|
28
|
+
id: string;
|
|
29
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Link">;
|
|
30
|
+
} | {
|
|
31
|
+
id: string;
|
|
32
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Quote">;
|
|
33
|
+
} | {
|
|
34
|
+
id: string;
|
|
35
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Standard">;
|
|
36
|
+
} | {
|
|
37
|
+
id: string;
|
|
38
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Status">;
|
|
39
|
+
} | {
|
|
40
|
+
id: string;
|
|
41
|
+
caption: import("@wordpress/i18n/build-types/types").TranslatableText<"Video">;
|
|
42
|
+
})[];
|
|
16
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-format/index.js"],"names":[],"mappings":"AAwCA;;;;;;;;;GASG;AACH,sCAFY,KAAK,CAAC,SAAS,CAuE1B;AAvGD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-format/index.js"],"names":[],"mappings":"AAwCA;;;;;;;;;GASG;AACH,sCAFY,KAAK,CAAC,SAAS,CAuE1B;AAvGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsBI"}
|
|
@@ -1,8 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (props: {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}): {
|
|
5
|
+
componentDidMount(): void;
|
|
6
|
+
componentWillUnmount(): void;
|
|
7
|
+
render(): import("react").JSX.Element;
|
|
8
|
+
context: unknown;
|
|
9
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
10
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
11
|
+
readonly props: Readonly<{}>;
|
|
12
|
+
state: Readonly<{}>;
|
|
13
|
+
refs: {
|
|
14
|
+
[key: string]: import("react").ReactInstance;
|
|
15
|
+
};
|
|
16
|
+
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
17
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
18
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
19
|
+
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
20
|
+
componentWillMount?(): void;
|
|
21
|
+
UNSAFE_componentWillMount?(): void;
|
|
22
|
+
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
23
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
24
|
+
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
25
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
26
|
+
};
|
|
27
|
+
instances: {
|
|
28
|
+
componentDidMount(): void;
|
|
29
|
+
componentWillUnmount(): void;
|
|
30
|
+
render(): import("react").JSX.Element;
|
|
31
|
+
context: unknown;
|
|
32
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
33
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
+
readonly props: Readonly<{}>;
|
|
35
|
+
state: Readonly<{}>;
|
|
36
|
+
refs: {
|
|
37
|
+
[key: string]: import("react").ReactInstance;
|
|
38
|
+
};
|
|
39
|
+
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
40
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
41
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
42
|
+
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
43
|
+
componentWillMount?(): void;
|
|
44
|
+
UNSAFE_componentWillMount?(): void;
|
|
45
|
+
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
46
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
47
|
+
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
48
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
49
|
+
}[];
|
|
50
|
+
contextType?: import("react").Context<any> | undefined;
|
|
51
|
+
} | typeof PostLockedModal;
|
|
52
|
+
export default _default;
|
|
53
|
+
declare function PostLockedModal(): import("react").JSX.Element | null;
|
|
8
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-locked-modal/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-locked-modal/index.js"],"names":[],"mappings":";;;;;;yBAiDG,OAAG;;wJAKe,CAAC;4BACuB,CAAC;;;;kCAS/B,OAAO;;6BACR,CAAC;yBAE4B,CAAC,iCAEtC,OAAO;+BAEJ,CAAC;0BAKC,CAAC,2DAKqB,CAAC;0BAAwC,CAAC;iCAEjE,CAAC;iCAA2C,CAAC;wCAGhB,CAAA;2BAKpC,CAAA;kCAGa,CAAC;;;;;yBAQgB,OAC/B;;wJAWC,CAAH;4BAII,CAAC;;;;kCAGK,OAAO;;6BACoB,CAAC;yBAGS,CAAC,iCAE3C,OAAO;+BACM,CAAC;0BAKH,CAAC,2DACI,CAAC;0BAAwC,CAAC;iCAC5B,CAAC;iCACd,CAAC;wCAC+B,CAAC;2BAIjD,CAAC;kCAGN,CAAD;;yBAOuB,OAAO;;;AAhI9B,uEA0PC"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
export default function PostStatus(): import("react").JSX.Element | null;
|
|
2
|
-
export const STATUS_OPTIONS: {
|
|
3
|
-
label:
|
|
2
|
+
export const STATUS_OPTIONS: ({
|
|
3
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Draft">;
|
|
4
4
|
value: string;
|
|
5
|
-
description:
|
|
6
|
-
}
|
|
5
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Not ready to publish.">;
|
|
6
|
+
} | {
|
|
7
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Pending">;
|
|
8
|
+
value: string;
|
|
9
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Waiting for review before publishing.">;
|
|
10
|
+
} | {
|
|
11
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Private">;
|
|
12
|
+
value: string;
|
|
13
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Only visible to site admins and editors.">;
|
|
14
|
+
} | {
|
|
15
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Scheduled">;
|
|
16
|
+
value: string;
|
|
17
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Publish automatically on a chosen date.">;
|
|
18
|
+
} | {
|
|
19
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Published">;
|
|
20
|
+
value: string;
|
|
21
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Visible to everyone.">;
|
|
22
|
+
})[];
|
|
7
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-status/index.js"],"names":[],"mappings":"AAmFA,yEAuMC;AA1OD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-status/index.js"],"names":[],"mappings":"AAmFA,yEAuMC;AA1OD;;;;;;;;;;;;;;;;;;;;KA0BE"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
export const VISIBILITY_OPTIONS: {
|
|
2
|
-
label:
|
|
1
|
+
export const VISIBILITY_OPTIONS: ({
|
|
2
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Public">;
|
|
3
3
|
value: string;
|
|
4
|
-
description:
|
|
5
|
-
}
|
|
4
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Visible to everyone.">;
|
|
5
|
+
} | {
|
|
6
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Private">;
|
|
7
|
+
value: string;
|
|
8
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Only visible to site admins and editors.">;
|
|
9
|
+
} | {
|
|
10
|
+
label: import("@wordpress/i18n/build-types/types").TranslatableText<"Password protected">;
|
|
11
|
+
value: string;
|
|
12
|
+
description: import("@wordpress/i18n/build-types/types").TranslatableText<"Only visible to those who know the password.">;
|
|
13
|
+
})[];
|
|
6
14
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/post-visibility/utils.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/post-visibility/utils.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;KAgBE"}
|
|
@@ -16,7 +16,7 @@ declare const _default: import("redux").Reducer<{
|
|
|
16
16
|
};
|
|
17
17
|
fields: {
|
|
18
18
|
[x: string]: Record<string, Field<any>[]> | {
|
|
19
|
-
[x: string]: Field<any>[] | (Field<
|
|
19
|
+
[x: string]: Field<any>[] | (Field<any> | Field<unknown>)[];
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
isReady: ReadyState;
|
|
@@ -203,7 +203,7 @@ declare const _default: import("redux").Reducer<{
|
|
|
203
203
|
};
|
|
204
204
|
fields: {
|
|
205
205
|
[x: string]: Record<string, import("@wordpress/dataviews").Field<any>[]> | {
|
|
206
|
-
[x: string]: import("@wordpress/dataviews").Field<any>[] | (import("@wordpress/dataviews").Field<
|
|
206
|
+
[x: string]: import("@wordpress/dataviews").Field<any>[] | (import("@wordpress/dataviews").Field<any> | import("@wordpress/dataviews").Field<unknown>)[];
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
209
|
isReady: import("../dataviews/store/reducer").ReadyState;
|
|
@@ -307,6 +307,26 @@ export function isPostSavingLocked(state: Object): boolean;
|
|
|
307
307
|
*
|
|
308
308
|
* @param {Object} state Global application state.
|
|
309
309
|
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```jsx
|
|
312
|
+
* import { __ } from '@wordpress/i18n';
|
|
313
|
+
* import { store as editorStore } from '@wordpress/editor';
|
|
314
|
+
* import { useSelect } from '@wordpress/data';
|
|
315
|
+
*
|
|
316
|
+
* const ExampleComponent = () => {
|
|
317
|
+
* const isAutoSavingLocked = useSelect(
|
|
318
|
+
* ( select ) => select( editorStore ).isPostAutosavingLocked(),
|
|
319
|
+
* []
|
|
320
|
+
* );
|
|
321
|
+
*
|
|
322
|
+
* return isAutoSavingLocked ? (
|
|
323
|
+
* <p>{ __( 'Post auto saving is locked' ) }</p>
|
|
324
|
+
* ) : (
|
|
325
|
+
* <p>{ __( 'Post auto saving is not locked' ) }</p>
|
|
326
|
+
* );
|
|
327
|
+
* };
|
|
328
|
+
* ```
|
|
329
|
+
*
|
|
310
330
|
* @return {boolean} Is locked.
|
|
311
331
|
*/
|
|
312
332
|
export function isPostAutosavingLocked(state: Object): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"AAgEA;;;;;;;GAOG;AACH,uCAJW,MAAM,GAEL,OAAO,CAIlB;AAED;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,OAAO,CAKlB;AA+CD;;;;;;;GAOG;AACH,sCAJW,MAAM,GAEL,OAAO,CAIlB;AAgCD;;;;;;;;;;;GAWG;AACH,0CATW,MAAM,GAOL,MAAM,CAIjB;AAED;;;;;;;GAOG;AACH,wCAJW,MAAM,GAEJ,MAAM,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AEhD;;GAEG;AACH;;;;EAAqE;AAErE;;GAEG;AACH;;;;EAA6D;AAE7D;;GAEG;AACH;;;;EAEE;AAEF;;GAEG;AACH;;;;EAEE;AAEF;;GAEG;AACH;;;;EAEE;AAEF;;GAEG;AACH;;;;EAA2E;AAE3E;;GAEG;AACH;;;;EAAmE;AAEnE;;GAEG;AACH;;;;EAA2E;AAE3E;;GAEG;AACH;;;;EACgD;AAEhD;;GAEG;AACH;;;;EAA6E;AAE7E;;GAEG;AACH;;;;EAA6E;AAE7E;;GAEG;AACH;;;;EAEE;AAEF;;;;EAYE;AAEF;;;;;;GAMG;AACH;;;;EAoBE;AAEF;;;;;;;GAOG;AACH;;;;EAsBE;AAEF;;;;;;;GAOG;AACH;;;;EAuBE;AAEF;;;;;;GAMG;AACH;;;;EAQE;;;;;;;;cAtmBY,MAAM;;;;kBACN,MAAM;;;;;YACN,MAAM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Upload a media file when the file upload button is activated.
|
|
3
|
-
* Wrapper around
|
|
3
|
+
* Wrapper around uploadMedia() that injects the current post ID.
|
|
4
4
|
*
|
|
5
5
|
* @param {Object} $0 Parameters object passed to the function.
|
|
6
6
|
* @param {?Object} $0.additionalData Additional data to include in the request.
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {number|string} postId postId of the current post being edited.
|
|
5
5
|
*/
|
|
6
|
-
export default function usePageTypeBadge(postId: number | string):
|
|
6
|
+
export default function usePageTypeBadge(postId: number | string): false | import("@wordpress/i18n/build-types/types").TranslatableText<"Homepage"> | import("@wordpress/i18n/build-types/types").TranslatableText<"Posts Page">;
|
|
7
7
|
//# sourceMappingURL=pageTypeBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageTypeBadge.d.ts","sourceRoot":"","sources":["../../src/utils/pageTypeBadge.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,iDAFW,MAAM,GAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"pageTypeBadge.d.ts","sourceRoot":"","sources":["../../src/utils/pageTypeBadge.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,iDAFW,MAAM,GAAC,MAAM,iKA2BvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.27.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,41 +34,41 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "7.25.7",
|
|
37
|
-
"@wordpress/a11y": "^4.
|
|
38
|
-
"@wordpress/api-fetch": "^7.
|
|
39
|
-
"@wordpress/blob": "^4.
|
|
40
|
-
"@wordpress/block-editor": "^
|
|
41
|
-
"@wordpress/blocks": "^
|
|
42
|
-
"@wordpress/commands": "^1.
|
|
43
|
-
"@wordpress/components": "^
|
|
44
|
-
"@wordpress/compose": "^7.
|
|
45
|
-
"@wordpress/core-data": "^7.
|
|
46
|
-
"@wordpress/data": "^10.
|
|
47
|
-
"@wordpress/dataviews": "^
|
|
48
|
-
"@wordpress/date": "^5.
|
|
49
|
-
"@wordpress/deprecated": "^4.
|
|
50
|
-
"@wordpress/dom": "^4.
|
|
51
|
-
"@wordpress/element": "^6.
|
|
52
|
-
"@wordpress/fields": "^0.
|
|
53
|
-
"@wordpress/hooks": "^4.
|
|
54
|
-
"@wordpress/html-entities": "^4.
|
|
55
|
-
"@wordpress/i18n": "^
|
|
56
|
-
"@wordpress/icons": "^10.
|
|
57
|
-
"@wordpress/interface": "^9.
|
|
58
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
59
|
-
"@wordpress/keycodes": "^4.
|
|
60
|
-
"@wordpress/media-utils": "^5.
|
|
61
|
-
"@wordpress/notices": "^5.
|
|
62
|
-
"@wordpress/patterns": "^2.
|
|
63
|
-
"@wordpress/plugins": "^7.
|
|
64
|
-
"@wordpress/preferences": "^4.
|
|
65
|
-
"@wordpress/private-apis": "^1.
|
|
66
|
-
"@wordpress/reusable-blocks": "^5.
|
|
67
|
-
"@wordpress/rich-text": "^7.
|
|
68
|
-
"@wordpress/server-side-render": "^6.
|
|
69
|
-
"@wordpress/url": "^4.
|
|
70
|
-
"@wordpress/warning": "^3.
|
|
71
|
-
"@wordpress/wordcount": "^4.
|
|
37
|
+
"@wordpress/a11y": "^4.27.0",
|
|
38
|
+
"@wordpress/api-fetch": "^7.27.0",
|
|
39
|
+
"@wordpress/blob": "^4.27.0",
|
|
40
|
+
"@wordpress/block-editor": "^15.0.0",
|
|
41
|
+
"@wordpress/blocks": "^15.0.0",
|
|
42
|
+
"@wordpress/commands": "^1.27.0",
|
|
43
|
+
"@wordpress/components": "^30.0.0",
|
|
44
|
+
"@wordpress/compose": "^7.27.0",
|
|
45
|
+
"@wordpress/core-data": "^7.27.0",
|
|
46
|
+
"@wordpress/data": "^10.27.0",
|
|
47
|
+
"@wordpress/dataviews": "^5.0.0",
|
|
48
|
+
"@wordpress/date": "^5.27.0",
|
|
49
|
+
"@wordpress/deprecated": "^4.27.0",
|
|
50
|
+
"@wordpress/dom": "^4.27.0",
|
|
51
|
+
"@wordpress/element": "^6.27.0",
|
|
52
|
+
"@wordpress/fields": "^0.19.0",
|
|
53
|
+
"@wordpress/hooks": "^4.27.0",
|
|
54
|
+
"@wordpress/html-entities": "^4.27.0",
|
|
55
|
+
"@wordpress/i18n": "^6.0.0",
|
|
56
|
+
"@wordpress/icons": "^10.27.0",
|
|
57
|
+
"@wordpress/interface": "^9.12.0",
|
|
58
|
+
"@wordpress/keyboard-shortcuts": "^5.27.0",
|
|
59
|
+
"@wordpress/keycodes": "^4.27.0",
|
|
60
|
+
"@wordpress/media-utils": "^5.27.0",
|
|
61
|
+
"@wordpress/notices": "^5.27.0",
|
|
62
|
+
"@wordpress/patterns": "^2.27.0",
|
|
63
|
+
"@wordpress/plugins": "^7.27.0",
|
|
64
|
+
"@wordpress/preferences": "^4.27.0",
|
|
65
|
+
"@wordpress/private-apis": "^1.27.0",
|
|
66
|
+
"@wordpress/reusable-blocks": "^5.27.0",
|
|
67
|
+
"@wordpress/rich-text": "^7.27.0",
|
|
68
|
+
"@wordpress/server-side-render": "^6.3.0",
|
|
69
|
+
"@wordpress/url": "^4.27.0",
|
|
70
|
+
"@wordpress/warning": "^3.27.0",
|
|
71
|
+
"@wordpress/wordcount": "^4.27.0",
|
|
72
72
|
"change-case": "^4.1.2",
|
|
73
73
|
"client-zip": "^2.4.5",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "abe06a6f2aef8d03c30ea9d5b3e133f041e523b1"
|
|
92
92
|
}
|
|
@@ -144,7 +144,7 @@ function Thread( {
|
|
|
144
144
|
{ ! isFocused && (
|
|
145
145
|
<VStack className="editor-collab-sidebar-panel__show-more-reply">
|
|
146
146
|
{ sprintf(
|
|
147
|
-
// translators:
|
|
147
|
+
// translators: %s: number of replies.
|
|
148
148
|
_x(
|
|
149
149
|
'%s more replies..',
|
|
150
150
|
'Show replies button'
|
|
@@ -63,7 +63,7 @@ const getOpenverseCaption = ( item ) => {
|
|
|
63
63
|
if ( _creator ) {
|
|
64
64
|
_caption = title
|
|
65
65
|
? sprintf(
|
|
66
|
-
// translators: %1s: Title of a media work from Openverse; %
|
|
66
|
+
// translators: %1s: Title of a media work from Openverse; %2$s: Name of the work's creator; %3s: Work's licence e.g: "CC0 1.0".
|
|
67
67
|
_x( '"%1$s" by %2$s/ %3$s', 'caption' ),
|
|
68
68
|
getExternalLink(
|
|
69
69
|
foreignLandingUrl,
|
|
@@ -24,34 +24,55 @@ export function usePostActions( { postType, onActionPerformed, context } ) {
|
|
|
24
24
|
[ postType ]
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const shouldShowHomepageActions = useSelect(
|
|
28
28
|
( select ) => {
|
|
29
|
-
|
|
29
|
+
if ( postType !== 'page' ) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const { getDefaultTemplateId, getEntityRecord, canUser } =
|
|
34
|
+
select( coreStore );
|
|
30
35
|
const canUpdateSettings = canUser( 'update', {
|
|
31
36
|
kind: 'root',
|
|
32
37
|
name: 'site',
|
|
33
38
|
} );
|
|
34
|
-
const templates =
|
|
35
|
-
'page' === postType && canUpdateSettings
|
|
36
|
-
? getEntityRecords( 'postType', 'wp_template', {
|
|
37
|
-
per_page: -1,
|
|
38
|
-
} )
|
|
39
|
-
: [];
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
if ( ! canUpdateSettings ) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Note that resolved template for `front-page` is not necessarily a
|
|
45
|
+
// `front-page` template.
|
|
46
|
+
const frontPageTemplateId = getDefaultTemplateId( {
|
|
47
|
+
slug: 'front-page',
|
|
48
|
+
} );
|
|
49
|
+
|
|
50
|
+
if ( ! frontPageTemplateId ) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// This won't trigger a second network request, getDefaultTemplateId
|
|
55
|
+
// will have received the whole template from the REST API.
|
|
56
|
+
const frontPageTemplate = getEntityRecord(
|
|
57
|
+
'postType',
|
|
58
|
+
'wp_template',
|
|
59
|
+
frontPageTemplateId
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
if ( ! frontPageTemplate ) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// When there is a front page template, the front page cannot be
|
|
67
|
+
// changed. See
|
|
68
|
+
// https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
69
|
+
return frontPageTemplate.slug !== 'front-page';
|
|
47
70
|
},
|
|
48
71
|
[ postType ]
|
|
49
72
|
);
|
|
50
73
|
|
|
51
74
|
const setAsHomepageAction = useSetAsHomepageAction();
|
|
52
75
|
const setAsPostsPageAction = useSetAsPostsPageAction();
|
|
53
|
-
const shouldShowHomepageActions =
|
|
54
|
-
canManageOptions && ! hasFrontPageTemplate;
|
|
55
76
|
|
|
56
77
|
const { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );
|
|
57
78
|
useEffect( () => {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Button,
|
|
8
8
|
ExternalLink,
|
|
9
9
|
__experimentalHStack as HStack,
|
|
10
|
+
withFilters,
|
|
10
11
|
} from '@wordpress/components';
|
|
11
12
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
12
13
|
import { addQueryArgs } from '@wordpress/url';
|
|
@@ -20,13 +21,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
20
21
|
*/
|
|
21
22
|
import { store as editorStore } from '../../store';
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
* A modal component that is displayed when a post is locked for editing by another user.
|
|
25
|
-
* The modal provides information about the lock status and options to take over or exit the editor.
|
|
26
|
-
*
|
|
27
|
-
* @return {React.ReactNode} The rendered PostLockedModal component.
|
|
28
|
-
*/
|
|
29
|
-
export default function PostLockedModal() {
|
|
24
|
+
function PostLockedModal() {
|
|
30
25
|
const instanceId = useInstanceId( PostLockedModal );
|
|
31
26
|
const hookName = 'core/editor/post-locked-modal-' + instanceId;
|
|
32
27
|
const { autosave, updatePostLock } = useDispatch( editorStore );
|
|
@@ -277,3 +272,13 @@ export default function PostLockedModal() {
|
|
|
277
272
|
</Modal>
|
|
278
273
|
);
|
|
279
274
|
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* A modal component that is displayed when a post is locked for editing by another user.
|
|
278
|
+
* The modal provides information about the lock status and options to take over or exit the editor.
|
|
279
|
+
*
|
|
280
|
+
* @return {React.ReactNode} The rendered PostLockedModal component.
|
|
281
|
+
*/
|
|
282
|
+
export default globalThis.IS_GUTENBERG_PLUGIN
|
|
283
|
+
? withFilters( 'editor.PostLockedModal' )( PostLockedModal )
|
|
284
|
+
: PostLockedModal;
|
|
@@ -75,7 +75,7 @@ export default function PostFormatPanel() {
|
|
|
75
75
|
onUpdatePostFormat={ onUpdatePostFormat }
|
|
76
76
|
suggestedPostFormat={ suggestion.id }
|
|
77
77
|
suggestionText={ sprintf(
|
|
78
|
-
/* translators: %
|
|
78
|
+
/* translators: %1s: post format */
|
|
79
79
|
__( 'Apply the "%1$s" format.' ),
|
|
80
80
|
suggestion.caption
|
|
81
81
|
) }
|
|
@@ -18,7 +18,20 @@
|
|
|
18
18
|
|
|
19
19
|
.editor-post-url__front-page-link {
|
|
20
20
|
// Match padding on tertiary buttons for alignment.
|
|
21
|
-
padding: $grid-unit-15 * 0.5
|
|
21
|
+
padding: $grid-unit-15 * 0.5 $grid-unit-15;
|
|
22
|
+
border-radius: $radius-small;
|
|
23
|
+
color: var(--wp-admin-theme-color);
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background: color-mix(in srgb, var(--wp-admin-theme-color) 4%, transparent);
|
|
27
|
+
color: var(--wp-admin-theme-color-darker-20, #183ad6);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:focus {
|
|
31
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
32
|
+
color: var(--wp-admin-theme-color);
|
|
33
|
+
outline: 3px solid #0000;
|
|
34
|
+
}
|
|
22
35
|
}
|
|
23
36
|
|
|
24
37
|
|
|
@@ -3,22 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { addFilter } from '@wordpress/hooks';
|
|
5
5
|
import { MediaUpload } from '@wordpress/media-utils';
|
|
6
|
-
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
-
import { useDispatch } from '@wordpress/data';
|
|
8
|
-
|
|
9
|
-
function MediaUploadWithCacheInvalidation( props ) {
|
|
10
|
-
const { invalidateResolutionForStoreSelector } = useDispatch( coreStore );
|
|
11
|
-
const { onClose: originalOnClose, ...rest } = props;
|
|
12
|
-
|
|
13
|
-
const onClose = ( ...onCloseArgs ) => {
|
|
14
|
-
invalidateResolutionForStoreSelector( 'getMediaItems' );
|
|
15
|
-
originalOnClose?.( ...onCloseArgs );
|
|
16
|
-
};
|
|
17
|
-
return <MediaUpload onClose={ onClose } { ...rest } />;
|
|
18
|
-
}
|
|
19
6
|
|
|
20
7
|
addFilter(
|
|
21
8
|
'editor.MediaUpload',
|
|
22
9
|
'core/editor/components/media-upload',
|
|
23
|
-
() =>
|
|
10
|
+
() => MediaUpload
|
|
24
11
|
);
|
package/src/store/selectors.js
CHANGED
|
@@ -1084,6 +1084,26 @@ export function isPostSavingLocked( state ) {
|
|
|
1084
1084
|
*
|
|
1085
1085
|
* @param {Object} state Global application state.
|
|
1086
1086
|
*
|
|
1087
|
+
* @example
|
|
1088
|
+
* ```jsx
|
|
1089
|
+
* import { __ } from '@wordpress/i18n';
|
|
1090
|
+
* import { store as editorStore } from '@wordpress/editor';
|
|
1091
|
+
* import { useSelect } from '@wordpress/data';
|
|
1092
|
+
*
|
|
1093
|
+
* const ExampleComponent = () => {
|
|
1094
|
+
* const isAutoSavingLocked = useSelect(
|
|
1095
|
+
* ( select ) => select( editorStore ).isPostAutosavingLocked(),
|
|
1096
|
+
* []
|
|
1097
|
+
* );
|
|
1098
|
+
*
|
|
1099
|
+
* return isAutoSavingLocked ? (
|
|
1100
|
+
* <p>{ __( 'Post auto saving is locked' ) }</p>
|
|
1101
|
+
* ) : (
|
|
1102
|
+
* <p>{ __( 'Post auto saving is not locked' ) }</p>
|
|
1103
|
+
* );
|
|
1104
|
+
* };
|
|
1105
|
+
* ```
|
|
1106
|
+
*
|
|
1087
1107
|
* @return {boolean} Is locked.
|
|
1088
1108
|
*/
|
|
1089
1109
|
export function isPostAutosavingLocked( state ) {
|
|
@@ -19,7 +19,7 @@ const noop = () => {};
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Upload a media file when the file upload button is activated.
|
|
22
|
-
* Wrapper around
|
|
22
|
+
* Wrapper around uploadMedia() that injects the current post ID.
|
|
23
23
|
*
|
|
24
24
|
* @param {Object} $0 Parameters object passed to the function.
|
|
25
25
|
* @param {?Object} $0.additionalData Additional data to include in the request.
|