@wordpress/edit-post 6.0.1 → 6.1.0-next.e230fbab09.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/build/components/block-manager/category.js +2 -2
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/index.js +2 -2
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/header/fullscreen-mode-close/index.js +11 -4
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.js +1 -1
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js +1 -1
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.js +3 -1
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +0 -6
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/template-title/delete-template.js +29 -20
- package/build/components/header/template-title/delete-template.js.map +1 -1
- package/build/components/header/writing-menu/index.js +7 -7
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +5 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +1 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/preferences-modal/index.js +14 -136
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +2 -4
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/preferences-modal/options/enable-custom-fields.js +2 -8
- package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/options/enable-feature.js +2 -4
- package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/options/enable-panel.js +2 -4
- package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/options/enable-publish-sidebar.js +2 -8
- package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +0 -11
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/post-link/index.js +1 -1
- package/build/components/sidebar/post-link/index.js.map +1 -1
- package/build/editor.js +4 -3
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +8 -8
- package/build/editor.native.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +1 -1
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +5 -4
- package/build/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +3 -3
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +173 -113
- package/build/store/actions.js.map +1 -1
- package/build/store/index.js +0 -3
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +0 -12
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +44 -10
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-manager/category.js +2 -2
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/index.js +2 -2
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +8 -4
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +1 -1
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +1 -1
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.js +3 -1
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +0 -5
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/template-title/delete-template.js +32 -22
- package/build-module/components/header/template-title/delete-template.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +7 -7
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +5 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/layout/index.js +2 -2
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +1 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +15 -135
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +2 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-custom-fields.js +1 -5
- package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-publish-sidebar.js +1 -5
- package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -12
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/post-link/index.js +2 -2
- package/build-module/components/sidebar/post-link/index.js.map +1 -1
- package/build-module/editor.js +5 -4
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +8 -8
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +1 -1
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +5 -4
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +3 -3
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +143 -102
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/index.js +0 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +1 -13
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +36 -6
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +105 -139
- package/build-style/style.css +105 -139
- package/package.json +30 -25
- package/src/components/block-manager/category.js +2 -2
- package/src/components/block-manager/index.js +2 -2
- package/src/components/header/fullscreen-mode-close/index.js +9 -4
- package/src/components/header/fullscreen-mode-close/style.scss +5 -1
- package/src/components/header/fullscreen-mode-close/test/index.js +1 -1
- package/src/components/header/header-toolbar/index.js +1 -1
- package/src/components/header/header-toolbar/index.native.js +1 -1
- package/src/components/header/index.js +1 -1
- package/src/components/header/more-menu/index.js +0 -6
- package/src/components/header/style.scss +1 -1
- package/src/components/header/template-title/delete-template.js +57 -46
- package/src/components/header/writing-menu/index.js +7 -7
- package/src/components/keyboard-shortcut-help-modal/config.js +4 -0
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +6 -0
- package/src/components/layout/index.js +2 -2
- package/src/components/layout/index.native.js +1 -1
- package/src/components/preferences-modal/index.js +24 -178
- package/src/components/preferences-modal/meta-boxes-section.js +3 -3
- package/src/components/preferences-modal/options/enable-custom-fields.js +1 -5
- package/src/components/preferences-modal/options/enable-feature.js +1 -1
- package/src/components/preferences-modal/options/enable-panel.js +1 -1
- package/src/components/preferences-modal/options/enable-publish-sidebar.js +1 -5
- package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +4 -4
- package/src/components/preferences-modal/options/test/enable-custom-fields.js +1 -1
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +235 -357
- package/src/components/preferences-modal/test/index.js +6 -6
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -11
- package/src/components/sidebar/post-link/index.js +2 -2
- package/src/editor.js +4 -3
- package/src/editor.native.js +7 -7
- package/src/hooks/validate-multiple-use/index.js +1 -1
- package/src/index.js +5 -4
- package/src/plugins/welcome-guide-menu-item/index.js +3 -3
- package/src/store/actions.js +129 -149
- package/src/store/index.js +0 -2
- package/src/store/reducer.js +1 -12
- package/src/store/selectors.js +56 -8
- package/src/store/test/actions.js +252 -79
- package/src/store/test/reducer.js +0 -28
- package/src/style.scss +0 -2
- package/src/test/editor.native.js +2 -2
- package/build/components/preferences-modal/options/base.js +0 -35
- package/build/components/preferences-modal/options/base.js.map +0 -1
- package/build/components/preferences-modal/section.js +0 -27
- package/build/components/preferences-modal/section.js.map +0 -1
- package/build-module/components/preferences-modal/options/base.js +0 -27
- package/build-module/components/preferences-modal/options/base.js.map +0 -1
- package/build-module/components/preferences-modal/section.js +0 -19
- package/build-module/components/preferences-modal/section.js.map +0 -1
- package/src/components/header/more-menu/style.scss +0 -35
- package/src/components/preferences-modal/options/base.js +0 -20
- package/src/components/preferences-modal/section.js +0 -15
- package/src/components/preferences-modal/style.scss +0 -112
package/build-style/style.css
CHANGED
|
@@ -304,7 +304,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
304
304
|
display: flex;
|
|
305
305
|
flex-direction: column;
|
|
306
306
|
overflow: auto;
|
|
307
|
-
z-index:
|
|
307
|
+
z-index: 91;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
.interface-interface-skeleton__secondary-sidebar,
|
|
@@ -447,6 +447,95 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
447
447
|
max-height: 24px;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
+
@media (min-width: 600px) {
|
|
451
|
+
.interface-preferences-modal {
|
|
452
|
+
width: calc(100% - 32px);
|
|
453
|
+
height: calc(100% - 120px);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
@media (min-width: 782px) {
|
|
457
|
+
.interface-preferences-modal {
|
|
458
|
+
width: 750px;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
@media (min-width: 960px) {
|
|
462
|
+
.interface-preferences-modal {
|
|
463
|
+
height: 70%;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
@media (max-width: 781px) {
|
|
467
|
+
.interface-preferences-modal .components-modal__content {
|
|
468
|
+
padding: 0;
|
|
469
|
+
}
|
|
470
|
+
.interface-preferences-modal .components-modal__content::before {
|
|
471
|
+
content: none;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.interface-preferences__tabs .components-tab-panel__tabs {
|
|
476
|
+
position: absolute;
|
|
477
|
+
top: 84px;
|
|
478
|
+
left: 16px;
|
|
479
|
+
width: 160px;
|
|
480
|
+
}
|
|
481
|
+
.interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
|
|
482
|
+
border-radius: 2px;
|
|
483
|
+
font-weight: 400;
|
|
484
|
+
}
|
|
485
|
+
.interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
|
|
486
|
+
background: #f0f0f0;
|
|
487
|
+
box-shadow: none;
|
|
488
|
+
font-weight: 500;
|
|
489
|
+
}
|
|
490
|
+
.interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
|
|
491
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
492
|
+
}
|
|
493
|
+
.interface-preferences__tabs .components-tab-panel__tab-content {
|
|
494
|
+
padding-left: 24px;
|
|
495
|
+
margin-left: 160px;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@media (max-width: 781px) {
|
|
499
|
+
.interface-preferences__provider {
|
|
500
|
+
height: 100%;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
.interface-preferences-modal__section {
|
|
504
|
+
margin: 0 0 2.5rem 0;
|
|
505
|
+
}
|
|
506
|
+
.interface-preferences-modal__section:last-child {
|
|
507
|
+
margin: 0;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.interface-preferences-modal__section-title {
|
|
511
|
+
font-size: 0.9rem;
|
|
512
|
+
font-weight: 600;
|
|
513
|
+
margin-top: 0;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.interface-preferences-modal__section-description {
|
|
517
|
+
margin: -8px 0 8px 0;
|
|
518
|
+
font-size: 12px;
|
|
519
|
+
font-style: normal;
|
|
520
|
+
color: #757575;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.interface-preferences-modal__option .components-base-control .components-base-control__field {
|
|
524
|
+
align-items: center;
|
|
525
|
+
display: flex;
|
|
526
|
+
margin-bottom: 0;
|
|
527
|
+
}
|
|
528
|
+
.interface-preferences-modal__option .components-base-control .components-base-control__field > label {
|
|
529
|
+
flex-grow: 1;
|
|
530
|
+
padding: 0.6rem 0 0.6rem 10px;
|
|
531
|
+
}
|
|
532
|
+
.interface-preferences-modal__option .components-base-control__help {
|
|
533
|
+
margin: -8px 0 8px 58px;
|
|
534
|
+
font-size: 12px;
|
|
535
|
+
font-style: normal;
|
|
536
|
+
color: #757575;
|
|
537
|
+
}
|
|
538
|
+
|
|
450
539
|
.edit-post-header {
|
|
451
540
|
height: 60px;
|
|
452
541
|
background: #fff;
|
|
@@ -510,7 +599,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
510
599
|
.edit-post-header__settings .components-button.is-tertiary {
|
|
511
600
|
padding: 0 6px;
|
|
512
601
|
}
|
|
513
|
-
.edit-post-header__settings .
|
|
602
|
+
.edit-post-header__settings .interface-more-menu-dropdown .components-button,
|
|
514
603
|
.edit-post-header__settings .interface-pinned-items .components-button {
|
|
515
604
|
margin-right: 0;
|
|
516
605
|
}
|
|
@@ -680,11 +769,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
680
769
|
margin-right: 8px;
|
|
681
770
|
}
|
|
682
771
|
|
|
683
|
-
.edit-post-fullscreen-mode-close.
|
|
772
|
+
.edit-post-fullscreen-mode-close.components-button {
|
|
684
773
|
display: none;
|
|
685
774
|
}
|
|
686
775
|
@media (min-width: 782px) {
|
|
687
|
-
.edit-post-fullscreen-mode-close.
|
|
776
|
+
.edit-post-fullscreen-mode-close.components-button {
|
|
688
777
|
display: flex;
|
|
689
778
|
align-items: center;
|
|
690
779
|
align-self: stretch;
|
|
@@ -697,13 +786,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
697
786
|
position: relative;
|
|
698
787
|
margin-bottom: -1px;
|
|
699
788
|
}
|
|
700
|
-
.edit-post-fullscreen-mode-close.
|
|
789
|
+
.edit-post-fullscreen-mode-close.components-button:active {
|
|
701
790
|
color: #fff;
|
|
702
791
|
}
|
|
703
|
-
.edit-post-fullscreen-mode-close.
|
|
792
|
+
.edit-post-fullscreen-mode-close.components-button:focus {
|
|
704
793
|
box-shadow: none;
|
|
705
794
|
}
|
|
706
|
-
.edit-post-fullscreen-mode-close.
|
|
795
|
+
.edit-post-fullscreen-mode-close.components-button::before {
|
|
707
796
|
transition: box-shadow 0.1s ease;
|
|
708
797
|
content: "";
|
|
709
798
|
display: block;
|
|
@@ -717,22 +806,27 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
717
806
|
}
|
|
718
807
|
}
|
|
719
808
|
@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
|
|
720
|
-
.edit-post-fullscreen-mode-close.
|
|
809
|
+
.edit-post-fullscreen-mode-close.components-button::before {
|
|
721
810
|
transition-duration: 0s;
|
|
722
811
|
transition-delay: 0s;
|
|
723
812
|
}
|
|
724
813
|
}
|
|
725
814
|
@media (min-width: 782px) {
|
|
726
|
-
.edit-post-fullscreen-mode-close.
|
|
815
|
+
.edit-post-fullscreen-mode-close.components-button:hover::before {
|
|
727
816
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #757575;
|
|
728
817
|
}
|
|
729
818
|
}
|
|
730
819
|
@media (min-width: 782px) {
|
|
731
|
-
.edit-post-fullscreen-mode-close.has-icon:
|
|
820
|
+
.edit-post-fullscreen-mode-close.components-button.has-icon:hover::before {
|
|
821
|
+
box-shadow: none;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
@media (min-width: 782px) {
|
|
825
|
+
.edit-post-fullscreen-mode-close.components-button:focus::before {
|
|
732
826
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) rgba(255, 255, 255, 0.1), inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
733
827
|
}
|
|
734
828
|
}
|
|
735
|
-
.edit-post-fullscreen-mode-close.
|
|
829
|
+
.edit-post-fullscreen-mode-close.components-button .edit-post-fullscreen-mode-close_site-icon {
|
|
736
830
|
width: 36px;
|
|
737
831
|
height: 36px;
|
|
738
832
|
border-radius: 2px;
|
|
@@ -853,39 +947,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
853
947
|
margin-left: 8px;
|
|
854
948
|
}
|
|
855
949
|
|
|
856
|
-
.edit-post-more-menu {
|
|
857
|
-
margin-left: -4px;
|
|
858
|
-
}
|
|
859
|
-
.edit-post-more-menu .components-button {
|
|
860
|
-
width: auto;
|
|
861
|
-
padding: 0 2px;
|
|
862
|
-
}
|
|
863
|
-
@media (min-width: 600px) {
|
|
864
|
-
.edit-post-more-menu {
|
|
865
|
-
margin-left: 0;
|
|
866
|
-
}
|
|
867
|
-
.edit-post-more-menu .components-button {
|
|
868
|
-
padding: 0 4px;
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
.edit-post-more-menu__content .components-popover__content {
|
|
873
|
-
min-width: 280px;
|
|
874
|
-
}
|
|
875
|
-
@media (min-width: 480px) {
|
|
876
|
-
.edit-post-more-menu__content .components-popover__content {
|
|
877
|
-
width: auto;
|
|
878
|
-
max-width: 480px;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
.edit-post-more-menu__content .components-popover__content .components-dropdown-menu__menu {
|
|
882
|
-
padding: 0;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
.components-popover.edit-post-more-menu__content {
|
|
886
|
-
z-index: 99998;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
950
|
.edit-post-template-top-area {
|
|
890
951
|
display: flex;
|
|
891
952
|
flex-direction: column;
|
|
@@ -1303,101 +1364,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1303
1364
|
clear: both;
|
|
1304
1365
|
}
|
|
1305
1366
|
|
|
1306
|
-
@media (min-width: 600px) {
|
|
1307
|
-
.edit-post-preferences-modal {
|
|
1308
|
-
width: calc(100% - 32px);
|
|
1309
|
-
height: calc(100% - 120px);
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
@media (min-width: 782px) {
|
|
1313
|
-
.edit-post-preferences-modal {
|
|
1314
|
-
width: 750px;
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
@media (min-width: 960px) {
|
|
1318
|
-
.edit-post-preferences-modal {
|
|
1319
|
-
height: 70%;
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
@media (max-width: 781px) {
|
|
1323
|
-
.edit-post-preferences-modal .components-modal__content {
|
|
1324
|
-
padding: 0;
|
|
1325
|
-
}
|
|
1326
|
-
.edit-post-preferences-modal .components-modal__content::before {
|
|
1327
|
-
content: none;
|
|
1328
|
-
}
|
|
1329
|
-
.edit-post-preferences-modal .components-navigator-provider {
|
|
1330
|
-
height: 100%;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs {
|
|
1334
|
-
position: absolute;
|
|
1335
|
-
top: 84px;
|
|
1336
|
-
left: 16px;
|
|
1337
|
-
width: 160px;
|
|
1338
|
-
}
|
|
1339
|
-
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
|
|
1340
|
-
border-radius: 2px;
|
|
1341
|
-
font-weight: 400;
|
|
1342
|
-
}
|
|
1343
|
-
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
|
|
1344
|
-
background: #f0f0f0;
|
|
1345
|
-
box-shadow: none;
|
|
1346
|
-
font-weight: 500;
|
|
1347
|
-
}
|
|
1348
|
-
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
|
|
1349
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1350
|
-
}
|
|
1351
|
-
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tab-content {
|
|
1352
|
-
padding-left: 24px;
|
|
1353
|
-
margin-left: 160px;
|
|
1354
|
-
}
|
|
1355
|
-
.edit-post-preferences-modal__section {
|
|
1356
|
-
margin: 0 0 2.5rem 0;
|
|
1357
|
-
}
|
|
1358
|
-
.edit-post-preferences-modal__section:last-child {
|
|
1359
|
-
margin: 0;
|
|
1360
|
-
}
|
|
1361
|
-
.edit-post-preferences-modal__section-title {
|
|
1362
|
-
font-size: 0.9rem;
|
|
1363
|
-
font-weight: 600;
|
|
1364
|
-
margin-top: 0;
|
|
1365
|
-
}
|
|
1366
|
-
.edit-post-preferences-modal__option .components-base-control .components-base-control__field {
|
|
1367
|
-
align-items: center;
|
|
1368
|
-
display: flex;
|
|
1369
|
-
margin-bottom: 0;
|
|
1370
|
-
}
|
|
1371
|
-
.edit-post-preferences-modal__option .components-base-control .components-base-control__field > label {
|
|
1372
|
-
flex-grow: 1;
|
|
1373
|
-
padding: 0.6rem 0 0.6rem 10px;
|
|
1374
|
-
}
|
|
1375
|
-
.edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1376
|
-
margin: 0 0 0.6rem 48px;
|
|
1377
|
-
}
|
|
1378
|
-
@media (min-width: 782px) {
|
|
1379
|
-
.edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1380
|
-
margin-left: 38px;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
@media (min-width: 600px) {
|
|
1384
|
-
.edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1385
|
-
max-width: 300px;
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
.edit-post-preferences-modal .components-base-control__help {
|
|
1389
|
-
margin: -8px 0 8px 58px;
|
|
1390
|
-
font-size: 12px;
|
|
1391
|
-
font-style: normal;
|
|
1392
|
-
color: #757575;
|
|
1393
|
-
}
|
|
1394
|
-
.edit-post-preferences-modal .edit-post-preferences-modal__section-description {
|
|
1395
|
-
margin: -8px 0 8px 0;
|
|
1396
|
-
font-size: 12px;
|
|
1397
|
-
font-style: normal;
|
|
1398
|
-
color: #757575;
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
1367
|
.edit-post-editor__inserter-panel,
|
|
1402
1368
|
.edit-post-editor__list-view-panel {
|
|
1403
1369
|
height: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.1.0-next.e230fbab09.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,36 +27,41 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/
|
|
32
|
-
"@wordpress/block-
|
|
33
|
-
"@wordpress/
|
|
34
|
-
"@wordpress/
|
|
35
|
-
"@wordpress/
|
|
36
|
-
"@wordpress/
|
|
37
|
-
"@wordpress/data": "^
|
|
38
|
-
"@wordpress/data
|
|
39
|
-
"@wordpress/editor": "^12.
|
|
40
|
-
"@wordpress/element": "^4.
|
|
41
|
-
"@wordpress/hooks": "^3.
|
|
42
|
-
"@wordpress/i18n": "^4.
|
|
43
|
-
"@wordpress/icons": "^7.0.0",
|
|
44
|
-
"@wordpress/interface": "^4.
|
|
45
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
46
|
-
"@wordpress/keycodes": "^3.
|
|
47
|
-
"@wordpress/media-utils": "^3.
|
|
48
|
-
"@wordpress/notices": "^3.
|
|
49
|
-
"@wordpress/plugins": "^4.
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
30
|
+
"@wordpress/a11y": "^3.4.0-next.e230fbab09.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.1.0-next.e230fbab09.0",
|
|
32
|
+
"@wordpress/block-editor": "^8.3.0-next.e230fbab09.0",
|
|
33
|
+
"@wordpress/block-library": "^7.1.0-next.e230fbab09.0",
|
|
34
|
+
"@wordpress/blocks": "^11.3.0-next.e230fbab09.0",
|
|
35
|
+
"@wordpress/components": "^19.7.0-next.e230fbab09.0",
|
|
36
|
+
"@wordpress/compose": "^5.2.0-next.e230fbab09.0",
|
|
37
|
+
"@wordpress/core-data": "^4.2.0-next.e230fbab09.0",
|
|
38
|
+
"@wordpress/data": "^6.4.0-next.e230fbab09.0",
|
|
39
|
+
"@wordpress/editor": "^12.4.0-next.e230fbab09.0",
|
|
40
|
+
"@wordpress/element": "^4.3.0-next.e230fbab09.0",
|
|
41
|
+
"@wordpress/hooks": "^3.4.0-next.e230fbab09.0",
|
|
42
|
+
"@wordpress/i18n": "^4.4.0-next.e230fbab09.0",
|
|
43
|
+
"@wordpress/icons": "^7.1.0-next.e230fbab09.0",
|
|
44
|
+
"@wordpress/interface": "^4.3.0-next.e230fbab09.0",
|
|
45
|
+
"@wordpress/keyboard-shortcuts": "^3.2.0-next.e230fbab09.0",
|
|
46
|
+
"@wordpress/keycodes": "^3.4.0-next.e230fbab09.0",
|
|
47
|
+
"@wordpress/media-utils": "^3.2.0-next.e230fbab09.0",
|
|
48
|
+
"@wordpress/notices": "^3.4.0-next.e230fbab09.0",
|
|
49
|
+
"@wordpress/plugins": "^4.2.0-next.e230fbab09.0",
|
|
50
|
+
"@wordpress/preferences": "^1.0.0-prerelease",
|
|
51
|
+
"@wordpress/url": "^3.5.0-next.e230fbab09.0",
|
|
52
|
+
"@wordpress/viewport": "^4.2.0-next.e230fbab09.0",
|
|
53
|
+
"@wordpress/warning": "^2.4.0-next.e230fbab09.0",
|
|
53
54
|
"classnames": "^2.3.1",
|
|
54
55
|
"lodash": "^4.17.21",
|
|
55
56
|
"memize": "^1.1.0",
|
|
56
57
|
"rememo": "^3.0.0"
|
|
57
58
|
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": "^17.0.0",
|
|
61
|
+
"react-dom": "^17.0.0"
|
|
62
|
+
},
|
|
58
63
|
"publishConfig": {
|
|
59
64
|
"access": "public"
|
|
60
65
|
},
|
|
61
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "308df03e6a96ded732f9c4e32471b1b4f8dea54a"
|
|
62
67
|
}
|
|
@@ -23,11 +23,11 @@ function BlockManagerCategory( { title, blockTypes } ) {
|
|
|
23
23
|
const { defaultAllowedBlockTypes, hiddenBlockTypes } = useSelect(
|
|
24
24
|
( select ) => {
|
|
25
25
|
const { getEditorSettings } = select( editorStore );
|
|
26
|
-
const {
|
|
26
|
+
const { getHiddenBlockTypes } = select( editPostStore );
|
|
27
27
|
return {
|
|
28
28
|
defaultAllowedBlockTypes: getEditorSettings()
|
|
29
29
|
.defaultAllowedBlockTypes,
|
|
30
|
-
hiddenBlockTypes:
|
|
30
|
+
hiddenBlockTypes: getHiddenBlockTypes(),
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
33
|
[]
|
|
@@ -116,8 +116,8 @@ export default withSelect( ( select ) => {
|
|
|
116
116
|
hasBlockSupport,
|
|
117
117
|
isMatchingSearchTerm,
|
|
118
118
|
} = select( blocksStore );
|
|
119
|
-
const {
|
|
120
|
-
const hiddenBlockTypes =
|
|
119
|
+
const { getHiddenBlockTypes } = select( editPostStore );
|
|
120
|
+
const hiddenBlockTypes = getHiddenBlockTypes();
|
|
121
121
|
const numberOfHiddenBlocks =
|
|
122
122
|
isArray( hiddenBlockTypes ) && hiddenBlockTypes.length;
|
|
123
123
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { get } from 'lodash';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -59,9 +60,8 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
59
60
|
|
|
60
61
|
const effect = {
|
|
61
62
|
expand: {
|
|
62
|
-
scale: 1.
|
|
63
|
-
|
|
64
|
-
transition: { type: 'tween', duration: '0.2' },
|
|
63
|
+
scale: 1.25,
|
|
64
|
+
transition: { type: 'tween', duration: '0.3' },
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -85,10 +85,15 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
85
85
|
buttonIcon = <Icon size="36px" icon={ icon } />;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
const classes = classnames( {
|
|
89
|
+
'edit-post-fullscreen-mode-close': true,
|
|
90
|
+
'has-icon': siteIconUrl,
|
|
91
|
+
} );
|
|
92
|
+
|
|
88
93
|
return (
|
|
89
94
|
<motion.div whileHover="expand">
|
|
90
95
|
<Button
|
|
91
|
-
className=
|
|
96
|
+
className={ classes }
|
|
92
97
|
href={
|
|
93
98
|
href ??
|
|
94
99
|
addQueryArgs( 'edit.php', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Developer notes: these rules are duplicated for the site editor.
|
|
2
2
|
// They need to be updated in both places.
|
|
3
3
|
|
|
4
|
-
.edit-post-fullscreen-mode-close.
|
|
4
|
+
.edit-post-fullscreen-mode-close.components-button {
|
|
5
5
|
// Do not show the toolbar icon on small screens,
|
|
6
6
|
// when Fullscreen Mode is not an option in the "More" menu.
|
|
7
7
|
display: none;
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-700;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
&.has-icon:hover::before {
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
49
53
|
// Lightened spot color focus.
|
|
50
54
|
&:focus::before {
|
|
51
55
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) rgba($white, 0.1), inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -14,7 +14,7 @@ import { useSelect } from '@wordpress/data';
|
|
|
14
14
|
import FullscreenModeClose from '../';
|
|
15
15
|
|
|
16
16
|
jest.mock( '@wordpress/data/src/components/use-select', () => {
|
|
17
|
-
// This allows us to tweak the returned value on each test
|
|
17
|
+
// This allows us to tweak the returned value on each test.
|
|
18
18
|
const mock = jest.fn();
|
|
19
19
|
return mock;
|
|
20
20
|
} );
|
|
@@ -105,7 +105,7 @@ function HeaderToolbar() {
|
|
|
105
105
|
);
|
|
106
106
|
const openInserter = useCallback( () => {
|
|
107
107
|
if ( isInserterOpened ) {
|
|
108
|
-
// Focusing the inserter button closes the inserter popover
|
|
108
|
+
// Focusing the inserter button closes the inserter popover.
|
|
109
109
|
inserterButton.current.focus();
|
|
110
110
|
} else {
|
|
111
111
|
setIsInserterOpened( true );
|
|
@@ -53,7 +53,7 @@ function HeaderToolbar( {
|
|
|
53
53
|
};
|
|
54
54
|
const renderHistoryButtons = () => {
|
|
55
55
|
const buttons = [
|
|
56
|
-
/* TODO: replace with EditorHistoryRedo and EditorHistoryUndo */
|
|
56
|
+
/* TODO: replace with EditorHistoryRedo and EditorHistoryUndo. */
|
|
57
57
|
<ToolbarButton
|
|
58
58
|
key="undoButton"
|
|
59
59
|
title={ __( 'Undo' ) }
|
|
@@ -56,7 +56,7 @@ function Header( { setEntitiesSavedStatesCallback } ) {
|
|
|
56
56
|
return (
|
|
57
57
|
<div className={ classes }>
|
|
58
58
|
<MainDashboardButton.Slot>
|
|
59
|
-
<FullscreenModeClose />
|
|
59
|
+
<FullscreenModeClose showTooltip />
|
|
60
60
|
</MainDashboardButton.Slot>
|
|
61
61
|
<div className="edit-post-header__toolbar">
|
|
62
62
|
<HeaderToolbar />
|
|
@@ -18,17 +18,11 @@ import PreferencesMenuItem from '../preferences-menu-item';
|
|
|
18
18
|
import ToolsMoreMenuGroup from '../tools-more-menu-group';
|
|
19
19
|
import WritingMenu from '../writing-menu';
|
|
20
20
|
|
|
21
|
-
const POPOVER_PROPS = {
|
|
22
|
-
className: 'edit-post-more-menu__content',
|
|
23
|
-
};
|
|
24
|
-
|
|
25
21
|
const MoreMenu = ( { showIconLabels } ) => {
|
|
26
22
|
const isLargeViewport = useViewportMatch( 'large' );
|
|
27
23
|
|
|
28
24
|
return (
|
|
29
25
|
<MoreMenuDropdown
|
|
30
|
-
className="edit-post-more-menu"
|
|
31
|
-
popoverProps={ POPOVER_PROPS }
|
|
32
26
|
toggleProps={ {
|
|
33
27
|
showTooltip: ! showIconLabels,
|
|
34
28
|
...( showIconLabels && { variant: 'tertiary' } ),
|
|
@@ -7,11 +7,16 @@ import { pickBy } from 'lodash';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { __, sprintf } from '@wordpress/i18n';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
MenuGroup,
|
|
12
|
+
MenuItem,
|
|
13
|
+
__experimentalConfirmDialog as ConfirmDialog,
|
|
14
|
+
} from '@wordpress/components';
|
|
11
15
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
12
16
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
13
17
|
import { store as editorStore } from '@wordpress/editor';
|
|
14
18
|
import { store as coreStore } from '@wordpress/core-data';
|
|
19
|
+
import { useState } from '@wordpress/element';
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* Internal dependencies
|
|
@@ -33,6 +38,7 @@ export default function DeleteTemplate() {
|
|
|
33
38
|
template: _isEditing ? getEditedPostTemplate() : null,
|
|
34
39
|
};
|
|
35
40
|
}, [] );
|
|
41
|
+
const [ showConfirmDialog, setShowConfirmDialog ] = useState( false );
|
|
36
42
|
|
|
37
43
|
if ( ! template || ! template.wp_id ) {
|
|
38
44
|
return null;
|
|
@@ -42,53 +48,58 @@ export default function DeleteTemplate() {
|
|
|
42
48
|
templateTitle = template.title;
|
|
43
49
|
}
|
|
44
50
|
|
|
51
|
+
const onDelete = () => {
|
|
52
|
+
clearSelectedBlock();
|
|
53
|
+
setIsEditingTemplate( false );
|
|
54
|
+
setShowConfirmDialog( false );
|
|
55
|
+
|
|
56
|
+
editPost( {
|
|
57
|
+
template: '',
|
|
58
|
+
} );
|
|
59
|
+
const settings = getEditorSettings();
|
|
60
|
+
const newAvailableTemplates = pickBy(
|
|
61
|
+
settings.availableTemplates,
|
|
62
|
+
( _title, id ) => {
|
|
63
|
+
return id !== template.slug;
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
updateEditorSettings( {
|
|
67
|
+
...settings,
|
|
68
|
+
availableTemplates: newAvailableTemplates,
|
|
69
|
+
} );
|
|
70
|
+
deleteEntityRecord( 'postType', 'wp_template', template.id );
|
|
71
|
+
};
|
|
72
|
+
|
|
45
73
|
return (
|
|
46
74
|
<MenuGroup className="edit-post-template-top-area__second-menu-group">
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
template
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return id !== template.slug;
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
updateEditorSettings( {
|
|
79
|
-
...settings,
|
|
80
|
-
availableTemplates: newAvailableTemplates,
|
|
81
|
-
} );
|
|
82
|
-
deleteEntityRecord(
|
|
83
|
-
'postType',
|
|
84
|
-
'wp_template',
|
|
85
|
-
template.id
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
} }
|
|
89
|
-
>
|
|
90
|
-
{ __( 'Delete template' ) }
|
|
91
|
-
</MenuItem>
|
|
75
|
+
<>
|
|
76
|
+
<MenuItem
|
|
77
|
+
className="edit-post-template-top-area__delete-template-button"
|
|
78
|
+
isDestructive
|
|
79
|
+
variant="secondary"
|
|
80
|
+
aria-label={ __( 'Delete template' ) }
|
|
81
|
+
onClick={ () => {
|
|
82
|
+
setShowConfirmDialog( true );
|
|
83
|
+
} }
|
|
84
|
+
>
|
|
85
|
+
{ __( 'Delete template' ) }
|
|
86
|
+
</MenuItem>
|
|
87
|
+
<ConfirmDialog
|
|
88
|
+
isOpen={ showConfirmDialog }
|
|
89
|
+
onConfirm={ onDelete }
|
|
90
|
+
onCancel={ () => {
|
|
91
|
+
setShowConfirmDialog( false );
|
|
92
|
+
} }
|
|
93
|
+
>
|
|
94
|
+
{ sprintf(
|
|
95
|
+
/* translators: %s: template name */
|
|
96
|
+
__(
|
|
97
|
+
'Are you sure you want to delete the %s template? It may be used by other pages or posts.'
|
|
98
|
+
),
|
|
99
|
+
templateTitle
|
|
100
|
+
) }
|
|
101
|
+
</ConfirmDialog>
|
|
102
|
+
</>
|
|
92
103
|
</MenuGroup>
|
|
93
104
|
);
|
|
94
105
|
}
|