@wordpress/editor 14.30.1-next.836ecdcae.0 → 14.31.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/bindings/api.js +2 -0
- package/build/bindings/api.js.map +1 -1
- package/build/bindings/term-data.js +171 -0
- package/build/bindings/term-data.js.map +1 -0
- package/build/components/collab-sidebar/add-comment.js +6 -3
- package/build/components/collab-sidebar/add-comment.js.map +1 -1
- package/build/components/collab-sidebar/comment-author-info.js +3 -3
- package/build/components/collab-sidebar/comment-author-info.js.map +1 -1
- package/build/components/collab-sidebar/comment-form.js +24 -8
- package/build/components/collab-sidebar/comment-form.js.map +1 -1
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +112 -0
- package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -0
- package/build/components/collab-sidebar/comments.js +47 -58
- package/build/components/collab-sidebar/comments.js.map +1 -1
- package/build/components/collab-sidebar/index.js +120 -96
- package/build/components/collab-sidebar/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +5 -2
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +21 -9
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-template/hooks.js +20 -5
- package/build/components/post-template/hooks.js.map +1 -1
- package/build/components/provider/index.js +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/dataviews/store/private-actions.js +1 -1
- package/build/dataviews/store/private-actions.js.map +1 -1
- package/build-module/bindings/api.js +2 -0
- package/build-module/bindings/api.js.map +1 -1
- package/build-module/bindings/term-data.js +165 -0
- package/build-module/bindings/term-data.js.map +1 -0
- package/build-module/components/collab-sidebar/add-comment.js +6 -3
- package/build-module/components/collab-sidebar/add-comment.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-author-info.js +4 -4
- package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-form.js +24 -9
- package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +104 -0
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -0
- package/build-module/components/collab-sidebar/comments.js +50 -61
- package/build-module/components/collab-sidebar/comments.js.map +1 -1
- package/build-module/components/collab-sidebar/index.js +121 -97
- package/build-module/components/collab-sidebar/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +5 -2
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +21 -11
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-template/hooks.js +20 -5
- package/build-module/components/post-template/hooks.js.map +1 -1
- package/build-module/components/provider/index.js +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/dataviews/store/private-actions.js +1 -1
- package/build-module/dataviews/store/private-actions.js.map +1 -1
- package/build-style/style-rtl.css +71 -15
- package/build-style/style.css +71 -15
- package/build-types/bindings/api.d.ts.map +1 -1
- package/build-types/bindings/term-data.d.ts +25 -0
- package/build-types/bindings/term-data.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-form.d.ts +5 -1
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts +7 -0
- package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comments.d.ts +3 -1
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +10 -1
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/package.json +37 -37
- package/src/bindings/api.js +2 -0
- package/src/bindings/term-data.js +159 -0
- package/src/components/collab-sidebar/add-comment.js +20 -9
- package/src/components/collab-sidebar/comment-author-info.js +14 -4
- package/src/components/collab-sidebar/comment-form.js +32 -10
- package/src/components/collab-sidebar/comment-indicator-toolbar.js +124 -0
- package/src/components/collab-sidebar/comments.js +104 -106
- package/src/components/collab-sidebar/index.js +157 -122
- package/src/components/collab-sidebar/style.scss +82 -17
- package/src/components/post-excerpt/panel.js +6 -1
- package/src/components/post-taxonomies/hierarchical-term-selector.js +25 -8
- package/src/components/post-template/hooks.js +23 -7
- package/src/components/provider/index.js +4 -1
- package/src/dataviews/store/private-actions.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/collab-sidebar/comment-button-toolbar.js +0 -37
- package/build/components/collab-sidebar/comment-button-toolbar.js.map +0 -1
- package/build-module/components/collab-sidebar/comment-button-toolbar.js +0 -30
- package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +0 -1
- package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts +0 -5
- package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts.map +0 -1
- package/src/components/collab-sidebar/comment-button-toolbar.js +0 -29
|
@@ -633,6 +633,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
633
633
|
.editor-collab-sidebar-panel__comment-field {
|
|
634
634
|
flex: 1;
|
|
635
635
|
}
|
|
636
|
+
.editor-collab-sidebar-panel__comment-field button {
|
|
637
|
+
flex-grow: 1;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
}
|
|
636
640
|
.editor-collab-sidebar-panel__child-thread {
|
|
637
641
|
margin-top: 15px;
|
|
638
642
|
}
|
|
@@ -651,14 +655,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
651
655
|
text-align: right;
|
|
652
656
|
color: #757575;
|
|
653
657
|
}
|
|
654
|
-
.editor-collab-sidebar-panel__user-comment {
|
|
655
|
-
font-size: 13px;
|
|
656
|
-
font-weight: 400;
|
|
657
|
-
line-height: 20px;
|
|
658
|
-
text-align: right;
|
|
659
|
-
color: #1e1e1e;
|
|
660
|
-
}
|
|
661
|
-
.editor-collab-sidebar-panel__user-comment p {
|
|
658
|
+
.editor-collab-sidebar-panel__user-comment p:last-child {
|
|
662
659
|
margin-bottom: 0;
|
|
663
660
|
}
|
|
664
661
|
.editor-collab-sidebar-panel__user-avatar {
|
|
@@ -698,16 +695,75 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
698
695
|
.editor-collab-sidebar-panel__comment-dropdown-menu {
|
|
699
696
|
flex-shrink: 0;
|
|
700
697
|
}
|
|
701
|
-
.editor-collab-sidebar-panel__comment-dropdown-menu button.has-icon {
|
|
702
|
-
min-width: 24px;
|
|
703
|
-
padding: 0;
|
|
704
|
-
width: 24px;
|
|
705
|
-
height: 24px;
|
|
706
|
-
}
|
|
707
698
|
.editor-collab-sidebar-panel__show-more-reply {
|
|
708
699
|
font-weight: 500;
|
|
709
700
|
font-style: italic;
|
|
710
|
-
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.comment-avatar-indicator {
|
|
704
|
+
position: relative;
|
|
705
|
+
padding: 4px;
|
|
706
|
+
min-width: auto;
|
|
707
|
+
background: transparent;
|
|
708
|
+
border: none;
|
|
709
|
+
}
|
|
710
|
+
.comment-avatar-indicator:hover::before {
|
|
711
|
+
background: rgba(0, 0, 0, 0.04);
|
|
712
|
+
}
|
|
713
|
+
.comment-avatar-indicator.has-unresolved .comment-avatar-stack::after {
|
|
714
|
+
content: "";
|
|
715
|
+
position: absolute;
|
|
716
|
+
top: -2px;
|
|
717
|
+
left: -2px;
|
|
718
|
+
width: 8px;
|
|
719
|
+
height: 8px;
|
|
720
|
+
background: #d63638;
|
|
721
|
+
border-radius: 50%;
|
|
722
|
+
border: 1px solid #fff;
|
|
723
|
+
z-index: 10;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.comment-avatar-stack {
|
|
727
|
+
display: flex;
|
|
728
|
+
align-items: center;
|
|
729
|
+
position: relative;
|
|
730
|
+
height: 24px;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.comment-avatar {
|
|
734
|
+
width: 24px;
|
|
735
|
+
height: 24px;
|
|
736
|
+
border-radius: 50%;
|
|
737
|
+
border: 2px solid #fff;
|
|
738
|
+
margin-right: -6px;
|
|
739
|
+
flex-shrink: 0;
|
|
740
|
+
}
|
|
741
|
+
.comment-avatar:first-child {
|
|
742
|
+
margin-right: 0;
|
|
743
|
+
border-color: #de6e55;
|
|
744
|
+
}
|
|
745
|
+
.comment-avatar:nth-child(2) {
|
|
746
|
+
border-color: #599637;
|
|
747
|
+
}
|
|
748
|
+
.comment-avatar:nth-child(3) {
|
|
749
|
+
border-color: #3858e9;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.comment-avatar-overflow {
|
|
753
|
+
width: fit-content;
|
|
754
|
+
height: 24px;
|
|
755
|
+
border-radius: 4rem;
|
|
756
|
+
padding: 0 4px;
|
|
757
|
+
background: #757575;
|
|
758
|
+
color: #fff;
|
|
759
|
+
border: 2px solid #fff;
|
|
760
|
+
margin-right: -6px;
|
|
761
|
+
display: flex;
|
|
762
|
+
align-items: center;
|
|
763
|
+
justify-content: center;
|
|
764
|
+
font-size: 10px;
|
|
765
|
+
font-weight: 600;
|
|
766
|
+
flex-shrink: 0;
|
|
711
767
|
}
|
|
712
768
|
|
|
713
769
|
.editor-collapsible-block-toolbar {
|
package/build-style/style.css
CHANGED
|
@@ -633,6 +633,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
633
633
|
.editor-collab-sidebar-panel__comment-field {
|
|
634
634
|
flex: 1;
|
|
635
635
|
}
|
|
636
|
+
.editor-collab-sidebar-panel__comment-field button {
|
|
637
|
+
flex-grow: 1;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
}
|
|
636
640
|
.editor-collab-sidebar-panel__child-thread {
|
|
637
641
|
margin-top: 15px;
|
|
638
642
|
}
|
|
@@ -651,14 +655,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
651
655
|
text-align: left;
|
|
652
656
|
color: #757575;
|
|
653
657
|
}
|
|
654
|
-
.editor-collab-sidebar-panel__user-comment {
|
|
655
|
-
font-size: 13px;
|
|
656
|
-
font-weight: 400;
|
|
657
|
-
line-height: 20px;
|
|
658
|
-
text-align: left;
|
|
659
|
-
color: #1e1e1e;
|
|
660
|
-
}
|
|
661
|
-
.editor-collab-sidebar-panel__user-comment p {
|
|
658
|
+
.editor-collab-sidebar-panel__user-comment p:last-child {
|
|
662
659
|
margin-bottom: 0;
|
|
663
660
|
}
|
|
664
661
|
.editor-collab-sidebar-panel__user-avatar {
|
|
@@ -698,16 +695,75 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
698
695
|
.editor-collab-sidebar-panel__comment-dropdown-menu {
|
|
699
696
|
flex-shrink: 0;
|
|
700
697
|
}
|
|
701
|
-
.editor-collab-sidebar-panel__comment-dropdown-menu button.has-icon {
|
|
702
|
-
min-width: 24px;
|
|
703
|
-
padding: 0;
|
|
704
|
-
width: 24px;
|
|
705
|
-
height: 24px;
|
|
706
|
-
}
|
|
707
698
|
.editor-collab-sidebar-panel__show-more-reply {
|
|
708
699
|
font-weight: 500;
|
|
709
700
|
font-style: italic;
|
|
710
|
-
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.comment-avatar-indicator {
|
|
704
|
+
position: relative;
|
|
705
|
+
padding: 4px;
|
|
706
|
+
min-width: auto;
|
|
707
|
+
background: transparent;
|
|
708
|
+
border: none;
|
|
709
|
+
}
|
|
710
|
+
.comment-avatar-indicator:hover::before {
|
|
711
|
+
background: rgba(0, 0, 0, 0.04);
|
|
712
|
+
}
|
|
713
|
+
.comment-avatar-indicator.has-unresolved .comment-avatar-stack::after {
|
|
714
|
+
content: "";
|
|
715
|
+
position: absolute;
|
|
716
|
+
top: -2px;
|
|
717
|
+
right: -2px;
|
|
718
|
+
width: 8px;
|
|
719
|
+
height: 8px;
|
|
720
|
+
background: #d63638;
|
|
721
|
+
border-radius: 50%;
|
|
722
|
+
border: 1px solid #fff;
|
|
723
|
+
z-index: 10;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.comment-avatar-stack {
|
|
727
|
+
display: flex;
|
|
728
|
+
align-items: center;
|
|
729
|
+
position: relative;
|
|
730
|
+
height: 24px;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.comment-avatar {
|
|
734
|
+
width: 24px;
|
|
735
|
+
height: 24px;
|
|
736
|
+
border-radius: 50%;
|
|
737
|
+
border: 2px solid #fff;
|
|
738
|
+
margin-left: -6px;
|
|
739
|
+
flex-shrink: 0;
|
|
740
|
+
}
|
|
741
|
+
.comment-avatar:first-child {
|
|
742
|
+
margin-left: 0;
|
|
743
|
+
border-color: #de6e55;
|
|
744
|
+
}
|
|
745
|
+
.comment-avatar:nth-child(2) {
|
|
746
|
+
border-color: #599637;
|
|
747
|
+
}
|
|
748
|
+
.comment-avatar:nth-child(3) {
|
|
749
|
+
border-color: #3858e9;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.comment-avatar-overflow {
|
|
753
|
+
width: fit-content;
|
|
754
|
+
height: 24px;
|
|
755
|
+
border-radius: 4rem;
|
|
756
|
+
padding: 0 4px;
|
|
757
|
+
background: #757575;
|
|
758
|
+
color: #fff;
|
|
759
|
+
border: 2px solid #fff;
|
|
760
|
+
margin-left: -6px;
|
|
761
|
+
display: flex;
|
|
762
|
+
align-items: center;
|
|
763
|
+
justify-content: center;
|
|
764
|
+
font-size: 10px;
|
|
765
|
+
font-weight: 600;
|
|
766
|
+
flex-shrink: 0;
|
|
711
767
|
}
|
|
712
768
|
|
|
713
769
|
.editor-collapsible-block-toolbar {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/bindings/api.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/bindings/api.js"],"names":[],"mappings":"AAaA;;;;;;;;;GASG;AACH,yDAKC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
name: string;
|
|
3
|
+
usesContext: string[];
|
|
4
|
+
getValues({ select, context, bindings }: {
|
|
5
|
+
select: any;
|
|
6
|
+
context: any;
|
|
7
|
+
bindings: any;
|
|
8
|
+
}): {};
|
|
9
|
+
setValues({ dispatch, context, bindings }: {
|
|
10
|
+
dispatch: any;
|
|
11
|
+
context: any;
|
|
12
|
+
bindings: any;
|
|
13
|
+
}): boolean;
|
|
14
|
+
canUserEditValue({ select, context, args }: {
|
|
15
|
+
select: any;
|
|
16
|
+
context: any;
|
|
17
|
+
args: any;
|
|
18
|
+
}): boolean;
|
|
19
|
+
getFieldsList({ select, context }: {
|
|
20
|
+
select: any;
|
|
21
|
+
context: any;
|
|
22
|
+
}): Object;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
//# sourceMappingURL=term-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"term-data.d.ts","sourceRoot":"","sources":["../../src/bindings/term-data.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-comment.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/add-comment.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-comment.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/add-comment.js"],"names":[],"mappings":"AAkBA;;;;;;;;GAQG;AACH,iFALG;IAAwB,QAAQ;IACR,gBAAgB,EAAhC,OAAO;IACS,mBAAmB;CAC3C,GAAS,KAAK,CAAC,SAAS,CAiD1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-author-info.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-author-info.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"comment-author-info.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-author-info.js"],"names":[],"mappings":";AAcA;;;;;;;;;GASG;AACH,2DANG;IAAsB,MAAM,EAApB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,IAAI,EAAlB,MAAM;CAEd,GAAS,KAAK,CAAC,SAAS,CAqD1B"}
|
|
@@ -7,12 +7,16 @@ export default CommentForm;
|
|
|
7
7
|
* @param {Function} props.onCancel - The function to call when canceling the comment update.
|
|
8
8
|
* @param {Object} props.thread - The comment thread object.
|
|
9
9
|
* @param {string} props.submitButtonText - The text to display on the submit button.
|
|
10
|
+
* @param {string?} props.placeholderText - The placeholder text for the comment input.
|
|
11
|
+
* @param {number?} props.rows - The number of rows for the comment input.
|
|
10
12
|
* @return {React.ReactNode} The CommentForm component.
|
|
11
13
|
*/
|
|
12
|
-
declare function CommentForm({ onSubmit, onCancel, thread, submitButtonText }: {
|
|
14
|
+
declare function CommentForm({ onSubmit, onCancel, thread, submitButtonText, placeholderText, rows, }: {
|
|
13
15
|
onSubmit: Function;
|
|
14
16
|
onCancel: Function;
|
|
15
17
|
thread: Object;
|
|
16
18
|
submitButtonText: string;
|
|
19
|
+
placeholderText: string | null;
|
|
20
|
+
rows: number | null;
|
|
17
21
|
}): React.ReactNode;
|
|
18
22
|
//# sourceMappingURL=comment-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-form.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-form.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"comment-form.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-form.js"],"names":[],"mappings":";AAsBA;;;;;;;;;;;GAWG;AACH,uGARG;IAAwB,QAAQ;IACR,QAAQ;IACR,MAAM,EAAtB,MAAM;IACU,gBAAgB,EAAhC,MAAM;IACU,eAAe,EAA/B,MAAM,OAAC;IACS,IAAI,EAApB,MAAM,OAAC;CACf,GAAS,KAAK,CAAC,SAAS,CAsD1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default CommentAvatarIndicator;
|
|
2
|
+
declare function CommentAvatarIndicator({ onClick, thread, hasMoreComments }: {
|
|
3
|
+
onClick: any;
|
|
4
|
+
thread: any;
|
|
5
|
+
hasMoreComments: any;
|
|
6
|
+
}): import("react").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=comment-indicator-toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-indicator-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comment-indicator-toolbar.js"],"names":[],"mappings":";AAoBA;;;;uCAqGC"}
|
|
@@ -7,16 +7,18 @@
|
|
|
7
7
|
* @param {Function} props.onAddReply - The function to add a reply to a comment.
|
|
8
8
|
* @param {Function} props.onCommentDelete - The function to delete a comment.
|
|
9
9
|
* @param {Function} props.onCommentResolve - The function to mark a comment as resolved.
|
|
10
|
+
* @param {Function} props.onCommentReopen - The function to reopen a resolved comment.
|
|
10
11
|
* @param {boolean} props.showCommentBoard - Whether to show the comment board.
|
|
11
12
|
* @param {Function} props.setShowCommentBoard - The function to set the comment board visibility.
|
|
12
13
|
* @return {React.ReactNode} The rendered Comments component.
|
|
13
14
|
*/
|
|
14
|
-
export function Comments({ threads, onEditComment, onAddReply, onCommentDelete, onCommentResolve, showCommentBoard, setShowCommentBoard, }: {
|
|
15
|
+
export function Comments({ threads, onEditComment, onAddReply, onCommentDelete, onCommentResolve, onCommentReopen, showCommentBoard, setShowCommentBoard, }: {
|
|
15
16
|
threads: any[];
|
|
16
17
|
onEditComment: Function;
|
|
17
18
|
onAddReply: Function;
|
|
18
19
|
onCommentDelete: Function;
|
|
19
20
|
onCommentResolve: Function;
|
|
21
|
+
onCommentReopen: Function;
|
|
20
22
|
showCommentBoard: boolean;
|
|
21
23
|
setShowCommentBoard: Function;
|
|
22
24
|
}): React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comments.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/comments.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;;GAaG;AACH,6JAVG;IAAwB,OAAO;IACP,aAAa;IACb,UAAU;IACV,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB,EAAhC,OAAO;IACS,mBAAmB;CAC3C,GAAS,KAAK,CAAC,SAAS,CAqF1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AAyOA;;GAEG;AACH,4EAyKC"}
|
|
@@ -39,7 +39,16 @@ declare const _default: {
|
|
|
39
39
|
}): {
|
|
40
40
|
componentDidMount(): void;
|
|
41
41
|
componentWillUnmount(): void;
|
|
42
|
-
render(): import(
|
|
42
|
+
render(): import(
|
|
43
|
+
/**
|
|
44
|
+
* Sort Terms by Selected.
|
|
45
|
+
*
|
|
46
|
+
* @param {Object[]} termsTree Array of terms in tree format.
|
|
47
|
+
* @param {number[]} terms Selected terms.
|
|
48
|
+
*
|
|
49
|
+
* @return {Object[]} Sorted array of terms.
|
|
50
|
+
*/
|
|
51
|
+
"react").JSX.Element;
|
|
43
52
|
context: unknown;
|
|
44
53
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
45
54
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/hierarchical-term-selector.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hierarchical-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/hierarchical-term-selector.js"],"names":[],"mappings":"AAmDA;;;;;;;GAOG;AACH,0CALW,MAAM,EAAE,SACR,MAAM,EAAE,GAEP,MAAM,EAAE,CAqCnB;AAED;;;;;;;GAOG;AACH,gCALW,MAAM,EAAE,UACR,MAAM,GAAC,MAAM,QACb,MAAM,GACL,MAAM,CAUjB;AAED;;;;;GAKG;AACH,8CAHW,MAAM,GACL,CAAC,CAAS,IAAM,EAAN,MAAM,KAAG,CAAC,MAAM,GAAC,OAAO,CAAC,CAAC,CAqC/C;AAED;;;;;;GAMG;AACH,mDAHG;IAAsB,IAAI,EAAlB,MAAM;CACd,GAAS,OAAO,CAkVlB;;;;;;;;QAjcD;;;;;;;WAOG;QACH,OAPE;;wJAOE,CAAC;4BACU,CAAC;;;;kCAKF,OAEd;;6BAEyB,CAAC;yBAIsB,CAAA,iCACpB,OAAO;+BACA,CAAC;0BAM7B,CAAA,2DAIJ,CAAC;0BACD,CAAF;iCAKS,CAAC;iCACI,CAAC;wCAMf,CAAA;2BAE0B,CAAC;kCAIR,CAAC;;;;;yBAKU,OAAM;;wJAW3B,CAAC;4BACa,CAAC;;;;kCAK0C,OAChE;;6BACY,CAAC;yBAGP,CAAC,iCACK,OAAO;+BAElB,CAAC;0BAIW,CAAC,2DACV,CAAC;0BAAwC,CAAC;iCAG7C,CAAD;iCACE,CAAJ;wCAIS,CAAA;2BAG0D,CAAA;kCAQ3D,CAAC;;yBAG6B,OACtC"}
|
|
@@ -3,6 +3,6 @@ export function useEditedPostContext(): {
|
|
|
3
3
|
postType: string;
|
|
4
4
|
};
|
|
5
5
|
export function useAllowSwitchingTemplates(): boolean;
|
|
6
|
-
export function useAvailableTemplates(postType: any): false |
|
|
6
|
+
export function useAvailableTemplates(postType: any): false | Partial<import("@wordpress/core-data").UnstableBase<any> | import("@wordpress/core-data").Attachment<any> | import("@wordpress/core-data").Comment<any> | import("@wordpress/core-data").GlobalStylesRevision<any> | import("@wordpress/core-data").MenuLocation<any> | import("@wordpress/core-data").NavMenu<any> | import("@wordpress/core-data").NavMenuItem<any> | import("@wordpress/core-data").Page<any> | import("@wordpress/core-data").Plugin<any> | import("@wordpress/core-data").Post<any> | import("@wordpress/core-data").PostStatusObject<any> | import("@wordpress/core-data").PostRevision<any> | import("@wordpress/core-data").Settings<any> | import("@wordpress/core-data").Sidebar<any> | import("@wordpress/core-data").Taxonomy<any> | import("@wordpress/core-data").Term<any> | import("@wordpress/core-data").Theme<any> | import("@wordpress/core-data").User<any> | import("@wordpress/core-data").Type<any> | import("@wordpress/core-data").Widget<any> | import("@wordpress/core-data").WidgetType<any> | import("@wordpress/core-data").WpTemplate<any> | import("@wordpress/core-data").WpTemplatePart<any>>[];
|
|
7
7
|
export function useCurrentTemplateSlug(): any;
|
|
8
8
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA8BC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA8BC;AA6BD,ipCAeC;AAED,8CAuBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"AA4YA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sCArBG;IAAgC,IAAI;IACJ,kBAAkB;IAElB,QAAQ;IAER,QAAQ,GAAhC,KAAK,CAAC,SAAS;CAGvB,GAWS,KAAK,CAAC,SAAS,CAW1B;AAlTD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4GA+OE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.31.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": "^15.
|
|
41
|
-
"@wordpress/blocks": "^15.
|
|
42
|
-
"@wordpress/commands": "^1.
|
|
43
|
-
"@wordpress/components": "^30.
|
|
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": "^6.
|
|
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.31.0",
|
|
38
|
+
"@wordpress/api-fetch": "^7.31.0",
|
|
39
|
+
"@wordpress/blob": "^4.31.0",
|
|
40
|
+
"@wordpress/block-editor": "^15.4.0",
|
|
41
|
+
"@wordpress/blocks": "^15.4.0",
|
|
42
|
+
"@wordpress/commands": "^1.31.0",
|
|
43
|
+
"@wordpress/components": "^30.4.0",
|
|
44
|
+
"@wordpress/compose": "^7.31.0",
|
|
45
|
+
"@wordpress/core-data": "^7.31.0",
|
|
46
|
+
"@wordpress/data": "^10.31.0",
|
|
47
|
+
"@wordpress/dataviews": "^9.0.0",
|
|
48
|
+
"@wordpress/date": "^5.31.0",
|
|
49
|
+
"@wordpress/deprecated": "^4.31.0",
|
|
50
|
+
"@wordpress/dom": "^4.31.0",
|
|
51
|
+
"@wordpress/element": "^6.31.0",
|
|
52
|
+
"@wordpress/fields": "^0.23.0",
|
|
53
|
+
"@wordpress/hooks": "^4.31.0",
|
|
54
|
+
"@wordpress/html-entities": "^4.31.0",
|
|
55
|
+
"@wordpress/i18n": "^6.4.0",
|
|
56
|
+
"@wordpress/icons": "^10.31.0",
|
|
57
|
+
"@wordpress/interface": "^9.16.0",
|
|
58
|
+
"@wordpress/keyboard-shortcuts": "^5.31.0",
|
|
59
|
+
"@wordpress/keycodes": "^4.31.0",
|
|
60
|
+
"@wordpress/media-utils": "^5.31.0",
|
|
61
|
+
"@wordpress/notices": "^5.31.0",
|
|
62
|
+
"@wordpress/patterns": "^2.31.0",
|
|
63
|
+
"@wordpress/plugins": "^7.31.0",
|
|
64
|
+
"@wordpress/preferences": "^4.31.0",
|
|
65
|
+
"@wordpress/private-apis": "^1.31.0",
|
|
66
|
+
"@wordpress/reusable-blocks": "^5.31.0",
|
|
67
|
+
"@wordpress/rich-text": "^7.31.0",
|
|
68
|
+
"@wordpress/server-side-render": "^6.7.0",
|
|
69
|
+
"@wordpress/url": "^4.31.0",
|
|
70
|
+
"@wordpress/warning": "^3.31.0",
|
|
71
|
+
"@wordpress/wordcount": "^4.31.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": "d7601d30d49462ea942168e8ab6bf449fb93097e"
|
|
92
92
|
}
|
package/src/bindings/api.js
CHANGED
|
@@ -9,6 +9,7 @@ import { registerBlockBindingsSource } from '@wordpress/blocks';
|
|
|
9
9
|
import patternOverrides from './pattern-overrides';
|
|
10
10
|
import postData from './post-data';
|
|
11
11
|
import postMeta from './post-meta';
|
|
12
|
+
import termData from './term-data';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Function to register core block bindings sources provided by the editor.
|
|
@@ -24,4 +25,5 @@ export function registerCoreBlockBindingsSources() {
|
|
|
24
25
|
registerBlockBindingsSource( patternOverrides );
|
|
25
26
|
registerBlockBindingsSource( postData );
|
|
26
27
|
registerBlockBindingsSource( postMeta );
|
|
28
|
+
registerBlockBindingsSource( termData );
|
|
27
29
|
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { store as coreDataStore } from '@wordpress/core-data';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Creates the data fields object with the given term data values and ID value.
|
|
9
|
+
*
|
|
10
|
+
* @param {Object} termDataValues The term data values.
|
|
11
|
+
* @param {string|number} idValue The ID value to use.
|
|
12
|
+
* @return {Object} The data fields object.
|
|
13
|
+
*/
|
|
14
|
+
function createDataFields( termDataValues, idValue ) {
|
|
15
|
+
return {
|
|
16
|
+
id: {
|
|
17
|
+
label: __( 'Term ID' ),
|
|
18
|
+
value: idValue,
|
|
19
|
+
type: 'string',
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
label: __( 'Name' ),
|
|
23
|
+
value: termDataValues?.name,
|
|
24
|
+
type: 'string',
|
|
25
|
+
},
|
|
26
|
+
slug: {
|
|
27
|
+
label: __( 'Slug' ),
|
|
28
|
+
value: termDataValues?.slug,
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
link: {
|
|
32
|
+
label: __( 'Link' ),
|
|
33
|
+
value: termDataValues?.link,
|
|
34
|
+
type: 'string',
|
|
35
|
+
},
|
|
36
|
+
description: {
|
|
37
|
+
label: __( 'Description' ),
|
|
38
|
+
value: termDataValues?.description,
|
|
39
|
+
type: 'string',
|
|
40
|
+
},
|
|
41
|
+
parent: {
|
|
42
|
+
label: __( 'Parent ID' ),
|
|
43
|
+
value: termDataValues?.parent,
|
|
44
|
+
type: 'string',
|
|
45
|
+
},
|
|
46
|
+
count: {
|
|
47
|
+
label: __( 'Count' ),
|
|
48
|
+
value: `(${ termDataValues?.count ?? 0 })`,
|
|
49
|
+
type: 'string',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Gets a list of term data fields with their values and labels
|
|
56
|
+
* to be consumed in the needed callbacks.
|
|
57
|
+
* If the value is not available based on context, like in templates,
|
|
58
|
+
* it falls back to the default value, label, or key.
|
|
59
|
+
*
|
|
60
|
+
* @param {Object} select The select function from the data store.
|
|
61
|
+
* @param {Object} context The context provided.
|
|
62
|
+
* @return {Object} List of term data fields with their value and label.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```js
|
|
66
|
+
* {
|
|
67
|
+
* name: {
|
|
68
|
+
* label: 'Term Name',
|
|
69
|
+
* value: 'Category Name',
|
|
70
|
+
* },
|
|
71
|
+
* count: {
|
|
72
|
+
* label: 'Term Count',
|
|
73
|
+
* value: 5,
|
|
74
|
+
* },
|
|
75
|
+
* ...
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
function getTermDataFields( select, context ) {
|
|
80
|
+
const { getEntityRecord } = select( coreDataStore );
|
|
81
|
+
|
|
82
|
+
let termDataValues, dataFields;
|
|
83
|
+
if ( context?.taxonomy && context?.termId ) {
|
|
84
|
+
termDataValues = getEntityRecord(
|
|
85
|
+
'taxonomy',
|
|
86
|
+
context?.taxonomy,
|
|
87
|
+
context?.termId
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
if ( ! termDataValues && context?.termData ) {
|
|
91
|
+
termDataValues = context.termData;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if ( termDataValues ) {
|
|
95
|
+
dataFields = createDataFields( termDataValues, context?.termId );
|
|
96
|
+
}
|
|
97
|
+
} else if ( context?.termData ) {
|
|
98
|
+
termDataValues = context.termData;
|
|
99
|
+
dataFields = createDataFields(
|
|
100
|
+
termDataValues,
|
|
101
|
+
termDataValues?.term_id
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if ( ! dataFields || ! Object.keys( dataFields ).length ) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return dataFields;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @type {WPBlockBindingsSource}
|
|
114
|
+
*/
|
|
115
|
+
export default {
|
|
116
|
+
name: 'core/term-data',
|
|
117
|
+
usesContext: [ 'taxonomy', 'termId', 'termData' ],
|
|
118
|
+
getValues( { select, context, bindings } ) {
|
|
119
|
+
const dataFields = getTermDataFields( select, context );
|
|
120
|
+
|
|
121
|
+
const newValues = {};
|
|
122
|
+
for ( const [ attributeName, source ] of Object.entries( bindings ) ) {
|
|
123
|
+
// Use the value, the field label, or the field key.
|
|
124
|
+
const fieldKey = source.args.key;
|
|
125
|
+
const { value: fieldValue, label: fieldLabel } =
|
|
126
|
+
dataFields?.[ fieldKey ] || {};
|
|
127
|
+
newValues[ attributeName ] = fieldValue ?? fieldLabel ?? fieldKey;
|
|
128
|
+
}
|
|
129
|
+
return newValues;
|
|
130
|
+
},
|
|
131
|
+
// eslint-disable-next-line no-unused-vars
|
|
132
|
+
setValues( { dispatch, context, bindings } ) {
|
|
133
|
+
// Terms are typically not editable through block bindings in most contexts.
|
|
134
|
+
return false;
|
|
135
|
+
},
|
|
136
|
+
canUserEditValue( { select, context, args } ) {
|
|
137
|
+
// Terms are typically read-only when displayed.
|
|
138
|
+
if ( context?.termQuery || context?.termQueryId ) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Lock editing when `taxonomy` or `termId` is not defined.
|
|
143
|
+
if ( ! context?.taxonomy || ! context?.termId ) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const fieldValue = getTermDataFields( select, context )?.[ args.key ]
|
|
148
|
+
?.value;
|
|
149
|
+
// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.
|
|
150
|
+
if ( fieldValue === undefined ) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return false;
|
|
155
|
+
},
|
|
156
|
+
getFieldsList( { select, context } ) {
|
|
157
|
+
return getTermDataFields( select, context );
|
|
158
|
+
},
|
|
159
|
+
};
|