@wordpress/edit-post 6.6.0 → 6.9.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 +6 -0
- package/README.md +1 -1
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/index.js +12 -4
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/device-preview/index.js.map +1 -1
- package/build/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/mode-switcher/index.js.map +1 -1
- package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build/components/header/template-title/delete-template.js.map +1 -1
- package/build/components/header/template-title/index.js.map +1 -1
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +12 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/actions-panel.js.map +1 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/sidebar/discussion-panel/index.js.map +1 -1
- package/build/components/sidebar/featured-image/index.js.map +1 -1
- package/build/components/sidebar/page-attributes/index.js.map +1 -1
- package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-post-status-info/index.js +2 -2
- package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-excerpt/index.js.map +1 -1
- package/build/components/sidebar/post-link/index.js.map +1 -1
- package/build/components/sidebar/post-schedule/index.js +14 -7
- package/build/components/sidebar/post-schedule/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +4 -2
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-template/create-modal.js +116 -0
- package/build/components/sidebar/post-template/create-modal.js.map +1 -0
- package/build/components/sidebar/post-template/form.js +123 -0
- package/build/components/sidebar/post-template/form.js.map +1 -0
- package/build/components/sidebar/post-template/index.js +123 -0
- package/build/components/sidebar/post-template/index.js.map +1 -0
- package/build/components/sidebar/settings-sidebar/index.js +1 -3
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/components/start-page-options/index.js +31 -13
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/visual-editor/block-inspector-button.js +3 -7
- package/build/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build/editor.js +1 -1
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +9 -1
- package/build/editor.native.js.map +1 -1
- package/build/plugins/copy-content-menu-item/index.js +1 -1
- package/build/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/selectors.js +8 -8
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/index.js +13 -5
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/device-preview/index.js.map +1 -1
- package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/mode-switcher/index.js.map +1 -1
- package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
- package/build-module/components/header/template-title/delete-template.js.map +1 -1
- package/build-module/components/header/template-title/index.js.map +1 -1
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +12 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/actions-panel.js.map +1 -1
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +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.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
- package/build-module/components/sidebar/featured-image/index.js.map +1 -1
- package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-post-status-info/index.js +2 -2
- package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
- package/build-module/components/sidebar/post-link/index.js.map +1 -1
- package/build-module/components/sidebar/post-schedule/index.js +15 -5
- package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +3 -2
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-template/create-modal.js +104 -0
- package/build-module/components/sidebar/post-template/create-modal.js.map +1 -0
- package/build-module/components/sidebar/post-template/form.js +106 -0
- package/build-module/components/sidebar/post-template/form.js.map +1 -0
- package/build-module/components/sidebar/post-template/index.js +109 -0
- package/build-module/components/sidebar/post-template/index.js.map +1 -0
- package/build-module/components/sidebar/settings-sidebar/index.js +1 -2
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +32 -14
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/visual-editor/block-inspector-button.js +3 -5
- package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
- package/build-module/editor.js +2 -2
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +10 -2
- package/build-module/editor.native.js.map +1 -1
- package/build-module/plugins/copy-content-menu-item/index.js +1 -1
- package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/selectors.js +8 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +60 -49
- package/build-style/style.css +60 -49
- package/package.json +28 -28
- package/src/components/block-manager/category.js +2 -2
- package/src/components/block-manager/index.js +15 -4
- package/src/components/device-preview/index.js +4 -6
- package/src/components/editor-initialization/listener-hooks.js +2 -3
- package/src/components/header/fullscreen-mode-close/index.js +2 -3
- package/src/components/header/header-toolbar/index.js +6 -11
- package/src/components/header/index.js +6 -9
- package/src/components/header/mode-switcher/index.js +4 -4
- package/src/components/header/post-publish-button-or-toggle.js +4 -6
- package/src/components/header/template-title/delete-template.js +2 -3
- package/src/components/header/template-title/index.js +2 -3
- package/src/components/header/tools-more-menu-group/index.js +2 -3
- package/src/components/keyboard-shortcut-help-modal/config.js +8 -0
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +14 -0
- package/src/components/keyboard-shortcut-help-modal/test/index.js +2 -1
- package/src/components/keyboard-shortcuts/index.js +4 -8
- package/src/components/layout/actions-panel.js +6 -9
- package/src/components/layout/index.js +12 -21
- package/src/components/layout/index.native.js +4 -5
- package/src/components/preferences-modal/options/enable-custom-fields.js +2 -2
- package/src/components/preferences-modal/options/enable-panel.js +2 -3
- package/src/components/preferences-modal/options/enable-publish-sidebar.js +2 -3
- package/src/components/secondary-sidebar/inserter-sidebar.js +2 -3
- package/src/components/sidebar/discussion-panel/index.js +2 -3
- package/src/components/sidebar/featured-image/index.js +2 -3
- package/src/components/sidebar/page-attributes/index.js +2 -3
- package/src/components/sidebar/plugin-document-setting-panel/index.js +2 -3
- package/src/components/sidebar/plugin-post-status-info/index.js +2 -2
- package/src/components/sidebar/plugin-sidebar/index.js +2 -3
- package/src/components/sidebar/post-excerpt/index.js +2 -3
- package/src/components/sidebar/post-link/index.js +2 -3
- package/src/components/sidebar/post-schedule/index.js +8 -4
- package/src/components/sidebar/post-schedule/style.scss +19 -6
- package/src/components/sidebar/post-status/index.js +5 -4
- package/src/components/sidebar/post-template/create-modal.js +146 -0
- package/src/components/sidebar/post-template/form.js +140 -0
- package/src/components/sidebar/post-template/index.js +101 -0
- package/src/components/sidebar/post-template/style.scss +46 -0
- package/src/components/sidebar/post-visibility/style.scss +5 -4
- package/src/components/sidebar/settings-sidebar/index.js +0 -2
- package/src/components/start-page-options/index.js +48 -28
- package/src/components/visual-editor/block-inspector-button.js +4 -8
- package/src/editor.js +8 -10
- package/src/editor.native.js +13 -6
- package/src/plugins/copy-content-menu-item/index.js +1 -1
- package/src/store/actions.js +322 -295
- package/src/store/selectors.js +21 -24
- package/src/style.scss +1 -1
- package/build/components/sidebar/template/actions.js +0 -167
- package/build/components/sidebar/template/actions.js.map +0 -1
- package/build/components/sidebar/template/index.js +0 -164
- package/build/components/sidebar/template/index.js.map +0 -1
- package/build-module/components/sidebar/template/actions.js +0 -153
- package/build-module/components/sidebar/template/actions.js.map +0 -1
- package/build-module/components/sidebar/template/index.js +0 -145
- package/build-module/components/sidebar/template/index.js.map +0 -1
- package/src/components/sidebar/template/actions.js +0 -203
- package/src/components/sidebar/template/index.js +0 -164
- package/src/components/sidebar/template/style.scss +0 -43
|
@@ -806,8 +806,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
806
806
|
width: 36px;
|
|
807
807
|
height: 36px;
|
|
808
808
|
border-radius: 2px;
|
|
809
|
-
|
|
810
|
-
object-fit: cover;
|
|
809
|
+
object-fit: cover;
|
|
811
810
|
margin-top: -1px;
|
|
812
811
|
}
|
|
813
812
|
|
|
@@ -1461,19 +1460,27 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1461
1460
|
.edit-post-post-schedule {
|
|
1462
1461
|
width: 100%;
|
|
1463
1462
|
position: relative;
|
|
1464
|
-
justify-content:
|
|
1463
|
+
justify-content: flex-start;
|
|
1464
|
+
align-items: flex-start;
|
|
1465
1465
|
}
|
|
1466
1466
|
.edit-post-post-schedule span {
|
|
1467
1467
|
display: block;
|
|
1468
1468
|
width: 45%;
|
|
1469
|
+
flex-shrink: 0;
|
|
1470
|
+
padding: 6px 0;
|
|
1469
1471
|
}
|
|
1470
1472
|
|
|
1471
1473
|
.components-button.edit-post-post-schedule__toggle {
|
|
1472
|
-
text-align:
|
|
1474
|
+
text-align: right;
|
|
1475
|
+
white-space: normal;
|
|
1476
|
+
height: auto;
|
|
1477
|
+
}
|
|
1478
|
+
.components-button.edit-post-post-schedule__toggle span {
|
|
1479
|
+
width: 0;
|
|
1473
1480
|
}
|
|
1474
1481
|
|
|
1475
|
-
.edit-post-post-schedule__dialog .
|
|
1476
|
-
|
|
1482
|
+
.edit-post-post-schedule__dialog .block-editor-publish-date-time-picker {
|
|
1483
|
+
margin: 8px;
|
|
1477
1484
|
}
|
|
1478
1485
|
|
|
1479
1486
|
.editor-post-slug__input {
|
|
@@ -1487,17 +1494,60 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1487
1494
|
text-align: center;
|
|
1488
1495
|
}
|
|
1489
1496
|
|
|
1497
|
+
.edit-post-post-template {
|
|
1498
|
+
width: 100%;
|
|
1499
|
+
justify-content: flex-start;
|
|
1500
|
+
}
|
|
1501
|
+
.edit-post-post-template span {
|
|
1502
|
+
display: block;
|
|
1503
|
+
width: 45%;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.edit-post-post-template__dropdown {
|
|
1507
|
+
max-width: 55%;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.components-button.edit-post-post-template__toggle {
|
|
1511
|
+
display: inline-block;
|
|
1512
|
+
width: 100%;
|
|
1513
|
+
overflow: hidden;
|
|
1514
|
+
text-overflow: ellipsis;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.edit-post-post-template__dialog {
|
|
1518
|
+
z-index: 99999;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.edit-post-post-template__form {
|
|
1522
|
+
min-width: 248px;
|
|
1523
|
+
margin: 8px;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
.edit-post-post-template__create-modal .components-modal__header {
|
|
1527
|
+
border-bottom: none;
|
|
1528
|
+
}
|
|
1529
|
+
.edit-post-post-template__create-modal .components-modal__content::before {
|
|
1530
|
+
margin-bottom: 4px;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
@media (min-width: 782px) {
|
|
1534
|
+
.edit-post-post-template__create-form {
|
|
1535
|
+
width: 320px;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1490
1539
|
.edit-post-post-visibility {
|
|
1491
1540
|
width: 100%;
|
|
1492
|
-
justify-content:
|
|
1541
|
+
justify-content: flex-start;
|
|
1493
1542
|
}
|
|
1494
1543
|
.edit-post-post-visibility span {
|
|
1495
1544
|
display: block;
|
|
1496
1545
|
width: 45%;
|
|
1497
1546
|
}
|
|
1498
1547
|
|
|
1499
|
-
.edit-post-post-visibility__dialog .
|
|
1500
|
-
width:
|
|
1548
|
+
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
1549
|
+
min-width: 248px;
|
|
1550
|
+
margin: 8px;
|
|
1501
1551
|
}
|
|
1502
1552
|
|
|
1503
1553
|
.components-button.edit-post-sidebar__panel-tab {
|
|
@@ -1544,44 +1594,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1544
1594
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -3px 0 0 var(--wp-admin-theme-color);
|
|
1545
1595
|
}
|
|
1546
1596
|
|
|
1547
|
-
@media (min-width: 782px) {
|
|
1548
|
-
.edit-post-template__modal .components-base-control {
|
|
1549
|
-
width: 320px;
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
.edit-post-template__modal .components-modal__header {
|
|
1553
|
-
border-bottom: none;
|
|
1554
|
-
}
|
|
1555
|
-
.edit-post-template__modal .components-modal__content::before {
|
|
1556
|
-
margin-bottom: 4px;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
.edit-post-template__modal-actions {
|
|
1560
|
-
margin-top: 12px;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
.edit-post-template-modal__tip {
|
|
1564
|
-
padding: 16px 24px;
|
|
1565
|
-
background: #f0f0f0;
|
|
1566
|
-
border-radius: 2px;
|
|
1567
|
-
}
|
|
1568
|
-
@media (min-width: 782px) {
|
|
1569
|
-
.edit-post-template-modal__tip {
|
|
1570
|
-
width: 240px;
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
.edit-post-template__notice {
|
|
1575
|
-
margin: 0 0 8px 0;
|
|
1576
|
-
}
|
|
1577
|
-
.edit-post-template__notice .components-notice__content {
|
|
1578
|
-
margin: 0;
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
.edit-post-template__actions button:not(:last-child) {
|
|
1582
|
-
margin-left: 8px;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
1597
|
h2.edit-post-template-summary__title {
|
|
1586
1598
|
line-height: 24px;
|
|
1587
1599
|
margin: 0 0 4px;
|
|
@@ -1714,8 +1726,7 @@ h2.edit-post-template-summary__title {
|
|
|
1714
1726
|
.edit-template-welcome-guide__image > img {
|
|
1715
1727
|
display: block;
|
|
1716
1728
|
max-width: 100%;
|
|
1717
|
-
|
|
1718
|
-
object-fit: cover;
|
|
1729
|
+
object-fit: cover;
|
|
1719
1730
|
}
|
|
1720
1731
|
.edit-post-welcome-guide__heading,
|
|
1721
1732
|
.edit-template-welcome-guide__heading {
|
package/build-style/style.css
CHANGED
|
@@ -806,8 +806,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
806
806
|
width: 36px;
|
|
807
807
|
height: 36px;
|
|
808
808
|
border-radius: 2px;
|
|
809
|
-
|
|
810
|
-
object-fit: cover;
|
|
809
|
+
object-fit: cover;
|
|
811
810
|
margin-top: -1px;
|
|
812
811
|
}
|
|
813
812
|
|
|
@@ -1465,19 +1464,27 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1465
1464
|
.edit-post-post-schedule {
|
|
1466
1465
|
width: 100%;
|
|
1467
1466
|
position: relative;
|
|
1468
|
-
justify-content:
|
|
1467
|
+
justify-content: flex-start;
|
|
1468
|
+
align-items: flex-start;
|
|
1469
1469
|
}
|
|
1470
1470
|
.edit-post-post-schedule span {
|
|
1471
1471
|
display: block;
|
|
1472
1472
|
width: 45%;
|
|
1473
|
+
flex-shrink: 0;
|
|
1474
|
+
padding: 6px 0;
|
|
1473
1475
|
}
|
|
1474
1476
|
|
|
1475
1477
|
.components-button.edit-post-post-schedule__toggle {
|
|
1476
|
-
text-align:
|
|
1478
|
+
text-align: left;
|
|
1479
|
+
white-space: normal;
|
|
1480
|
+
height: auto;
|
|
1481
|
+
}
|
|
1482
|
+
.components-button.edit-post-post-schedule__toggle span {
|
|
1483
|
+
width: 0;
|
|
1477
1484
|
}
|
|
1478
1485
|
|
|
1479
|
-
.edit-post-post-schedule__dialog .
|
|
1480
|
-
|
|
1486
|
+
.edit-post-post-schedule__dialog .block-editor-publish-date-time-picker {
|
|
1487
|
+
margin: 8px;
|
|
1481
1488
|
}
|
|
1482
1489
|
|
|
1483
1490
|
.editor-post-slug__input {
|
|
@@ -1491,17 +1498,60 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1491
1498
|
text-align: center;
|
|
1492
1499
|
}
|
|
1493
1500
|
|
|
1501
|
+
.edit-post-post-template {
|
|
1502
|
+
width: 100%;
|
|
1503
|
+
justify-content: flex-start;
|
|
1504
|
+
}
|
|
1505
|
+
.edit-post-post-template span {
|
|
1506
|
+
display: block;
|
|
1507
|
+
width: 45%;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.edit-post-post-template__dropdown {
|
|
1511
|
+
max-width: 55%;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
.components-button.edit-post-post-template__toggle {
|
|
1515
|
+
display: inline-block;
|
|
1516
|
+
width: 100%;
|
|
1517
|
+
overflow: hidden;
|
|
1518
|
+
text-overflow: ellipsis;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.edit-post-post-template__dialog {
|
|
1522
|
+
z-index: 99999;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
.edit-post-post-template__form {
|
|
1526
|
+
min-width: 248px;
|
|
1527
|
+
margin: 8px;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.edit-post-post-template__create-modal .components-modal__header {
|
|
1531
|
+
border-bottom: none;
|
|
1532
|
+
}
|
|
1533
|
+
.edit-post-post-template__create-modal .components-modal__content::before {
|
|
1534
|
+
margin-bottom: 4px;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
@media (min-width: 782px) {
|
|
1538
|
+
.edit-post-post-template__create-form {
|
|
1539
|
+
width: 320px;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1494
1543
|
.edit-post-post-visibility {
|
|
1495
1544
|
width: 100%;
|
|
1496
|
-
justify-content:
|
|
1545
|
+
justify-content: flex-start;
|
|
1497
1546
|
}
|
|
1498
1547
|
.edit-post-post-visibility span {
|
|
1499
1548
|
display: block;
|
|
1500
1549
|
width: 45%;
|
|
1501
1550
|
}
|
|
1502
1551
|
|
|
1503
|
-
.edit-post-post-visibility__dialog .
|
|
1504
|
-
width:
|
|
1552
|
+
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
1553
|
+
min-width: 248px;
|
|
1554
|
+
margin: 8px;
|
|
1505
1555
|
}
|
|
1506
1556
|
|
|
1507
1557
|
.components-button.edit-post-sidebar__panel-tab {
|
|
@@ -1548,44 +1598,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1548
1598
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -3px 0 0 var(--wp-admin-theme-color);
|
|
1549
1599
|
}
|
|
1550
1600
|
|
|
1551
|
-
@media (min-width: 782px) {
|
|
1552
|
-
.edit-post-template__modal .components-base-control {
|
|
1553
|
-
width: 320px;
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
.edit-post-template__modal .components-modal__header {
|
|
1557
|
-
border-bottom: none;
|
|
1558
|
-
}
|
|
1559
|
-
.edit-post-template__modal .components-modal__content::before {
|
|
1560
|
-
margin-bottom: 4px;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
.edit-post-template__modal-actions {
|
|
1564
|
-
margin-top: 12px;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
.edit-post-template-modal__tip {
|
|
1568
|
-
padding: 16px 24px;
|
|
1569
|
-
background: #f0f0f0;
|
|
1570
|
-
border-radius: 2px;
|
|
1571
|
-
}
|
|
1572
|
-
@media (min-width: 782px) {
|
|
1573
|
-
.edit-post-template-modal__tip {
|
|
1574
|
-
width: 240px;
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
.edit-post-template__notice {
|
|
1579
|
-
margin: 0 0 8px 0;
|
|
1580
|
-
}
|
|
1581
|
-
.edit-post-template__notice .components-notice__content {
|
|
1582
|
-
margin: 0;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
.edit-post-template__actions button:not(:last-child) {
|
|
1586
|
-
margin-right: 8px;
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
1601
|
h2.edit-post-template-summary__title {
|
|
1590
1602
|
line-height: 24px;
|
|
1591
1603
|
margin: 0 0 4px;
|
|
@@ -1718,8 +1730,7 @@ h2.edit-post-template-summary__title {
|
|
|
1718
1730
|
.edit-template-welcome-guide__image > img {
|
|
1719
1731
|
display: block;
|
|
1720
1732
|
max-width: 100%;
|
|
1721
|
-
|
|
1722
|
-
object-fit: cover;
|
|
1733
|
+
object-fit: cover;
|
|
1723
1734
|
}
|
|
1724
1735
|
.edit-post-welcome-guide__heading,
|
|
1725
1736
|
.edit-template-welcome-guide__heading {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,35 +27,35 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/api-fetch": "^6.
|
|
32
|
-
"@wordpress/block-editor": "^9.
|
|
33
|
-
"@wordpress/block-library": "^7.
|
|
34
|
-
"@wordpress/blocks": "^11.
|
|
35
|
-
"@wordpress/components": "^19.
|
|
36
|
-
"@wordpress/compose": "^5.
|
|
37
|
-
"@wordpress/core-data": "^4.
|
|
38
|
-
"@wordpress/data": "^6.
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/editor": "^12.
|
|
41
|
-
"@wordpress/element": "^4.
|
|
42
|
-
"@wordpress/hooks": "^3.
|
|
43
|
-
"@wordpress/i18n": "^4.
|
|
44
|
-
"@wordpress/icons": "^9.
|
|
45
|
-
"@wordpress/interface": "^4.
|
|
46
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
47
|
-
"@wordpress/keycodes": "^3.
|
|
48
|
-
"@wordpress/media-utils": "^4.
|
|
49
|
-
"@wordpress/notices": "^3.
|
|
50
|
-
"@wordpress/plugins": "^4.
|
|
51
|
-
"@wordpress/preferences": "^2.
|
|
52
|
-
"@wordpress/url": "^3.
|
|
53
|
-
"@wordpress/viewport": "^4.
|
|
54
|
-
"@wordpress/warning": "^2.
|
|
30
|
+
"@wordpress/a11y": "^3.12.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.9.0",
|
|
32
|
+
"@wordpress/block-editor": "^9.4.0",
|
|
33
|
+
"@wordpress/block-library": "^7.9.0",
|
|
34
|
+
"@wordpress/blocks": "^11.11.0",
|
|
35
|
+
"@wordpress/components": "^19.14.0",
|
|
36
|
+
"@wordpress/compose": "^5.10.0",
|
|
37
|
+
"@wordpress/core-data": "^4.10.0",
|
|
38
|
+
"@wordpress/data": "^6.12.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.12.0",
|
|
40
|
+
"@wordpress/editor": "^12.11.0",
|
|
41
|
+
"@wordpress/element": "^4.10.0",
|
|
42
|
+
"@wordpress/hooks": "^3.12.0",
|
|
43
|
+
"@wordpress/i18n": "^4.12.0",
|
|
44
|
+
"@wordpress/icons": "^9.3.0",
|
|
45
|
+
"@wordpress/interface": "^4.11.0",
|
|
46
|
+
"@wordpress/keyboard-shortcuts": "^3.10.0",
|
|
47
|
+
"@wordpress/keycodes": "^3.12.0",
|
|
48
|
+
"@wordpress/media-utils": "^4.3.0",
|
|
49
|
+
"@wordpress/notices": "^3.12.0",
|
|
50
|
+
"@wordpress/plugins": "^4.10.0",
|
|
51
|
+
"@wordpress/preferences": "^2.4.0",
|
|
52
|
+
"@wordpress/url": "^3.13.0",
|
|
53
|
+
"@wordpress/viewport": "^4.10.0",
|
|
54
|
+
"@wordpress/warning": "^2.12.0",
|
|
55
55
|
"classnames": "^2.3.1",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"memize": "^1.1.0",
|
|
58
|
-
"rememo": "^
|
|
58
|
+
"rememo": "^4.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"react": "^17.0.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "a80eeb62ec7cb1418b9915c277e084a29d6665e3"
|
|
68
68
|
}
|
|
@@ -25,8 +25,8 @@ function BlockManagerCategory( { title, blockTypes } ) {
|
|
|
25
25
|
const { getEditorSettings } = select( editorStore );
|
|
26
26
|
const { getHiddenBlockTypes } = select( editPostStore );
|
|
27
27
|
return {
|
|
28
|
-
defaultAllowedBlockTypes:
|
|
29
|
-
.defaultAllowedBlockTypes,
|
|
28
|
+
defaultAllowedBlockTypes:
|
|
29
|
+
getEditorSettings().defaultAllowedBlockTypes,
|
|
30
30
|
hiddenBlockTypes: getHiddenBlockTypes(),
|
|
31
31
|
};
|
|
32
32
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { filter, includes
|
|
4
|
+
import { filter, includes } from 'lodash';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -117,12 +117,23 @@ export default withSelect( ( select ) => {
|
|
|
117
117
|
isMatchingSearchTerm,
|
|
118
118
|
} = select( blocksStore );
|
|
119
119
|
const { getHiddenBlockTypes } = select( editPostStore );
|
|
120
|
-
|
|
120
|
+
|
|
121
|
+
// Some hidden blocks become unregistered
|
|
122
|
+
// by removing for instance the plugin that registered them, yet
|
|
123
|
+
// they're still remain as hidden by the user's action.
|
|
124
|
+
// We consider "hidden", blocks which were hidden and
|
|
125
|
+
// are still registered.
|
|
126
|
+
const blockTypes = getBlockTypes();
|
|
127
|
+
const hiddenBlockTypes = getHiddenBlockTypes().filter( ( hiddenBlock ) => {
|
|
128
|
+
return blockTypes.some(
|
|
129
|
+
( registeredBlock ) => registeredBlock.name === hiddenBlock
|
|
130
|
+
);
|
|
131
|
+
} );
|
|
121
132
|
const numberOfHiddenBlocks =
|
|
122
|
-
isArray( hiddenBlockTypes ) && hiddenBlockTypes.length;
|
|
133
|
+
Array.isArray( hiddenBlockTypes ) && hiddenBlockTypes.length;
|
|
123
134
|
|
|
124
135
|
return {
|
|
125
|
-
blockTypes
|
|
136
|
+
blockTypes,
|
|
126
137
|
categories: getCategories(),
|
|
127
138
|
hasBlockSupport,
|
|
128
139
|
isMatchingSearchTerm,
|
|
@@ -36,14 +36,12 @@ export default function DevicePreview() {
|
|
|
36
36
|
isSaving: select( editPostStore ).isSavingMetaBoxes(),
|
|
37
37
|
isPostSaveable: select( editorStore ).isEditedPostSaveable(),
|
|
38
38
|
isViewable: get( postType, [ 'viewable' ], false ),
|
|
39
|
-
deviceType:
|
|
40
|
-
editPostStore
|
|
41
|
-
).__experimentalGetPreviewDeviceType(),
|
|
39
|
+
deviceType:
|
|
40
|
+
select( editPostStore ).__experimentalGetPreviewDeviceType(),
|
|
42
41
|
};
|
|
43
42
|
}, [] );
|
|
44
|
-
const {
|
|
45
|
-
|
|
46
|
-
} = useDispatch( editPostStore );
|
|
43
|
+
const { __experimentalSetPreviewDeviceType: setPreviewDeviceType } =
|
|
44
|
+
useDispatch( editPostStore );
|
|
47
45
|
|
|
48
46
|
return (
|
|
49
47
|
<PreviewOptions
|
|
@@ -24,9 +24,8 @@ import {
|
|
|
24
24
|
export const useBlockSelectionListener = ( postId ) => {
|
|
25
25
|
const { hasBlockSelection, isEditorSidebarOpened } = useSelect(
|
|
26
26
|
( select ) => ( {
|
|
27
|
-
hasBlockSelection:
|
|
28
|
-
blockEditorStore
|
|
29
|
-
).getBlockSelectionStart(),
|
|
27
|
+
hasBlockSelection:
|
|
28
|
+
!! select( blockEditorStore ).getBlockSelectionStart(),
|
|
30
29
|
isEditorSidebarOpened: select( STORE_NAME ).isEditorSidebarOpened(),
|
|
31
30
|
} ),
|
|
32
31
|
[ postId ]
|
|
@@ -30,9 +30,8 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
30
30
|
( select ) => {
|
|
31
31
|
const { getCurrentPostType } = select( editorStore );
|
|
32
32
|
const { isFeatureActive } = select( editPostStore );
|
|
33
|
-
const { getEntityRecord, getPostType, isResolving } =
|
|
34
|
-
coreStore
|
|
35
|
-
);
|
|
33
|
+
const { getEntityRecord, getPostType, isResolving } =
|
|
34
|
+
select( coreStore );
|
|
36
35
|
const siteData =
|
|
37
36
|
getEntityRecord( 'root', '__unstableBase', undefined ) || {};
|
|
38
37
|
|
|
@@ -31,9 +31,8 @@ const preventDefault = ( event ) => {
|
|
|
31
31
|
|
|
32
32
|
function HeaderToolbar() {
|
|
33
33
|
const inserterButton = useRef();
|
|
34
|
-
const { setIsInserterOpened, setIsListViewOpened } =
|
|
35
|
-
editPostStore
|
|
36
|
-
);
|
|
34
|
+
const { setIsInserterOpened, setIsListViewOpened } =
|
|
35
|
+
useDispatch( editPostStore );
|
|
37
36
|
const {
|
|
38
37
|
isInserterEnabled,
|
|
39
38
|
isInserterOpened,
|
|
@@ -42,15 +41,11 @@ function HeaderToolbar() {
|
|
|
42
41
|
isListViewOpen,
|
|
43
42
|
listViewShortcut,
|
|
44
43
|
} = useSelect( ( select ) => {
|
|
45
|
-
const {
|
|
46
|
-
|
|
47
|
-
getBlockRootClientId,
|
|
48
|
-
getBlockSelectionEnd,
|
|
49
|
-
} = select( blockEditorStore );
|
|
44
|
+
const { hasInserterItems, getBlockRootClientId, getBlockSelectionEnd } =
|
|
45
|
+
select( blockEditorStore );
|
|
50
46
|
const { getEditorSettings } = select( editorStore );
|
|
51
|
-
const { getEditorMode, isFeatureActive, isListViewOpened } =
|
|
52
|
-
editPostStore
|
|
53
|
-
);
|
|
47
|
+
const { getEditorMode, isFeatureActive, isListViewOpened } =
|
|
48
|
+
select( editPostStore );
|
|
54
49
|
const { getShortcutRepresentation } = select( keyboardShortcutsStore );
|
|
55
50
|
|
|
56
51
|
return {
|
|
@@ -33,16 +33,13 @@ function Header( { setEntitiesSavedStatesCallback } ) {
|
|
|
33
33
|
} = useSelect(
|
|
34
34
|
( select ) => ( {
|
|
35
35
|
hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
|
|
36
|
-
isPublishSidebarOpened:
|
|
37
|
-
editPostStore
|
|
38
|
-
).isPublishSidebarOpened(),
|
|
36
|
+
isPublishSidebarOpened:
|
|
37
|
+
select( editPostStore ).isPublishSidebarOpened(),
|
|
39
38
|
isSaving: select( editPostStore ).isSavingMetaBoxes(),
|
|
40
|
-
showIconLabels:
|
|
41
|
-
'showIconLabels'
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'reducedUI'
|
|
45
|
-
),
|
|
39
|
+
showIconLabels:
|
|
40
|
+
select( editPostStore ).isFeatureActive( 'showIconLabels' ),
|
|
41
|
+
hasReducedUI:
|
|
42
|
+
select( editPostStore ).isFeatureActive( 'reducedUI' ),
|
|
46
43
|
} ),
|
|
47
44
|
[]
|
|
48
45
|
);
|
|
@@ -40,10 +40,10 @@ function ModeSwitcher() {
|
|
|
40
40
|
shortcut: select(
|
|
41
41
|
keyboardShortcutsStore
|
|
42
42
|
).getShortcutRepresentation( 'core/edit-post/toggle-mode' ),
|
|
43
|
-
isRichEditingEnabled:
|
|
44
|
-
.richEditingEnabled,
|
|
45
|
-
isCodeEditingEnabled:
|
|
46
|
-
.codeEditingEnabled,
|
|
43
|
+
isRichEditingEnabled:
|
|
44
|
+
select( editorStore ).getEditorSettings().richEditingEnabled,
|
|
45
|
+
isCodeEditingEnabled:
|
|
46
|
+
select( editorStore ).getEditorSettings().codeEditingEnabled,
|
|
47
47
|
isEditingTemplate: select( editPostStore ).isEditingTemplate(),
|
|
48
48
|
mode: select( editPostStore ).getEditorMode(),
|
|
49
49
|
} ),
|
|
@@ -91,12 +91,10 @@ export default compose(
|
|
|
91
91
|
isBeingScheduled: select( editorStore ).isEditedPostBeingScheduled(),
|
|
92
92
|
isPending: select( editorStore ).isCurrentPostPending(),
|
|
93
93
|
isPublished: select( editorStore ).isCurrentPostPublished(),
|
|
94
|
-
isPublishSidebarEnabled:
|
|
95
|
-
editorStore
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
editPostStore
|
|
99
|
-
).isPublishSidebarOpened(),
|
|
94
|
+
isPublishSidebarEnabled:
|
|
95
|
+
select( editorStore ).isPublishSidebarEnabled(),
|
|
96
|
+
isPublishSidebarOpened:
|
|
97
|
+
select( editPostStore ).isPublishSidebarOpened(),
|
|
100
98
|
isScheduled: select( editorStore ).isCurrentPostScheduled(),
|
|
101
99
|
} ) ),
|
|
102
100
|
withDispatch( ( dispatch ) => {
|
|
@@ -30,9 +30,8 @@ export default function DeleteTemplate() {
|
|
|
30
30
|
const { updateEditorSettings, editPost } = useDispatch( editorStore );
|
|
31
31
|
const { deleteEntityRecord } = useDispatch( coreStore );
|
|
32
32
|
const { template } = useSelect( ( select ) => {
|
|
33
|
-
const { isEditingTemplate, getEditedPostTemplate } =
|
|
34
|
-
editPostStore
|
|
35
|
-
);
|
|
33
|
+
const { isEditingTemplate, getEditedPostTemplate } =
|
|
34
|
+
select( editPostStore );
|
|
36
35
|
const _isEditing = isEditingTemplate();
|
|
37
36
|
return {
|
|
38
37
|
template: _isEditing ? getEditedPostTemplate() : null,
|
|
@@ -22,9 +22,8 @@ import TemplateDescription from './template-description';
|
|
|
22
22
|
|
|
23
23
|
function TemplateTitle() {
|
|
24
24
|
const { template, isEditing, title } = useSelect( ( select ) => {
|
|
25
|
-
const { isEditingTemplate, getEditedPostTemplate } =
|
|
26
|
-
editPostStore
|
|
27
|
-
);
|
|
25
|
+
const { isEditingTemplate, getEditedPostTemplate } =
|
|
26
|
+
select( editPostStore );
|
|
28
27
|
const { getEditedPostAttribute } = select( editorStore );
|
|
29
28
|
|
|
30
29
|
const _isEditing = isEditingTemplate();
|
|
@@ -9,9 +9,8 @@ import { isEmpty } from 'lodash';
|
|
|
9
9
|
import { createSlotFill, MenuGroup } from '@wordpress/components';
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
11
11
|
|
|
12
|
-
const { Fill: ToolsMoreMenuGroup, Slot } =
|
|
13
|
-
'ToolsMoreMenuGroup'
|
|
14
|
-
);
|
|
12
|
+
const { Fill: ToolsMoreMenuGroup, Slot } =
|
|
13
|
+
createSlotFill( 'ToolsMoreMenuGroup' );
|
|
15
14
|
|
|
16
15
|
ToolsMoreMenuGroup.Slot = ( { fillProps } ) => (
|
|
17
16
|
<Slot fillProps={ fillProps }>
|
|
@@ -28,4 +28,12 @@ export const textFormattingShortcuts = [
|
|
|
28
28
|
keyCombination: { modifier: 'primary', character: 'u' },
|
|
29
29
|
description: __( 'Underline the selected text.' ),
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
keyCombination: { modifier: 'access', character: 'd' },
|
|
33
|
+
description: __( 'Strikethrough the selected text.' ),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
keyCombination: { modifier: 'access', character: 'x' },
|
|
37
|
+
description: __( 'Make the selected text inline code.' ),
|
|
38
|
+
},
|
|
31
39
|
];
|
|
@@ -82,6 +82,20 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
|
|
|
82
82
|
"modifier": "primary",
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
|
+
Object {
|
|
86
|
+
"description": "Strikethrough the selected text.",
|
|
87
|
+
"keyCombination": Object {
|
|
88
|
+
"character": "d",
|
|
89
|
+
"modifier": "access",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
Object {
|
|
93
|
+
"description": "Make the selected text inline code.",
|
|
94
|
+
"keyCombination": Object {
|
|
95
|
+
"character": "x",
|
|
96
|
+
"modifier": "access",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
85
99
|
]
|
|
86
100
|
}
|
|
87
101
|
title="Text formatting"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { noop } from 'lodash';
|
|
5
4
|
import { shallow } from 'enzyme';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -9,6 +8,8 @@ import { shallow } from 'enzyme';
|
|
|
9
8
|
*/
|
|
10
9
|
import { KeyboardShortcutHelpModal } from '../index';
|
|
11
10
|
|
|
11
|
+
const noop = () => {};
|
|
12
|
+
|
|
12
13
|
describe( 'KeyboardShortcutHelpModal', () => {
|
|
13
14
|
it( 'should match snapshot when the modal is active', () => {
|
|
14
15
|
const wrapper = shallow(
|