@wordpress/editor 12.5.7 → 12.8.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/build/components/post-featured-image/index.js +84 -41
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-text-editor/index.js +6 -6
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +13 -2
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-visibility/index.js +132 -167
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/post-visibility/label.js +5 -22
- package/build/components/post-visibility/label.js.map +1 -1
- package/build/components/post-visibility/utils.js +14 -13
- package/build/components/post-visibility/utils.js.map +1 -1
- package/build/components/provider/index.native.js +3 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +86 -42
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +6 -6
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +12 -2
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-visibility/index.js +132 -166
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/post-visibility/label.js +5 -20
- package/build-module/components/post-visibility/label.js.map +1 -1
- package/build-module/components/post-visibility/utils.js +14 -13
- package/build-module/components/post-visibility/utils.js.map +1 -1
- package/build-module/components/provider/index.native.js +2 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-style/style-rtl.css +51 -52
- package/build-style/style.css +51 -52
- package/package.json +28 -27
- package/src/components/autosave-monitor/test/index.js +3 -0
- package/src/components/editor-help/test/index.native.js +1 -1
- package/src/components/post-featured-image/index.js +102 -69
- package/src/components/post-saved-state/style.scss +9 -0
- package/src/components/post-slug/test/index.js +4 -4
- package/src/components/post-text-editor/index.js +5 -6
- package/src/components/post-title/index.js +16 -2
- package/src/components/post-visibility/index.js +130 -150
- package/src/components/post-visibility/label.js +6 -15
- package/src/components/post-visibility/style.scss +25 -20
- package/src/components/post-visibility/utils.js +7 -12
- package/src/components/provider/index.native.js +2 -1
- package/src/components/table-of-contents/style.scss +1 -3
- package/src/store/test/selectors.js +2 -2
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.editor-post-visibility__close {
|
|
2
|
+
position: absolute;
|
|
3
|
+
right: $grid-unit-20;
|
|
4
|
+
top: $grid-unit-20;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.editor-post-visibility__fieldset {
|
|
8
|
+
padding: $grid-unit-10;
|
|
5
9
|
|
|
6
|
-
.editor-post-
|
|
10
|
+
.editor-post-visibility__legend {
|
|
7
11
|
font-weight: 600;
|
|
8
|
-
|
|
12
|
+
padding: 1em 0 0 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.editor-post-visibility__description {
|
|
9
16
|
margin-top: 0.5em;
|
|
10
|
-
padding: 0;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
|
-
.editor-post-
|
|
19
|
+
.editor-post-visibility__radio[type="radio"] {
|
|
14
20
|
@include radio-control;
|
|
15
21
|
margin-top: 2px;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
|
-
.editor-post-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
.editor-post-visibility__info {
|
|
25
|
+
color: $gray-700;
|
|
26
|
+
margin-left: $grid-unit-15 + $radio-input-size-sm;
|
|
27
|
+
margin-top: 0.5em;
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
@include break-small {
|
|
30
|
+
margin-left: $grid-unit-15 + $radio-input-size;
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
// Remove bottom margin on the last label only.
|
|
28
|
-
.editor-post-visibility__choice:last-child .editor-post-
|
|
35
|
+
.editor-post-visibility__choice:last-child .editor-post-visibility__info {
|
|
29
36
|
margin-bottom: 0;
|
|
30
37
|
}
|
|
31
|
-
}
|
|
32
38
|
|
|
33
|
-
.editor-post-
|
|
34
|
-
.editor-post-visibility__dialog-password-input[type="text"] {
|
|
39
|
+
.editor-post-visibility__password .editor-post-visibility__password-input[type="text"] {
|
|
35
40
|
@include input-control;
|
|
36
|
-
margin-left: $grid-unit * 4
|
|
37
|
-
|
|
41
|
+
margin-left: $grid-unit * 4;
|
|
42
|
+
width: calc(100% - #{$grid-unit * 4});
|
|
38
43
|
}
|
|
39
44
|
}
|
|
@@ -3,22 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
|
-
export const visibilityOptions =
|
|
7
|
-
{
|
|
8
|
-
value: 'public',
|
|
6
|
+
export const visibilityOptions = {
|
|
7
|
+
public: {
|
|
9
8
|
label: __( 'Public' ),
|
|
10
9
|
info: __( 'Visible to everyone.' ),
|
|
11
10
|
},
|
|
12
|
-
{
|
|
13
|
-
value: 'private',
|
|
11
|
+
private: {
|
|
14
12
|
label: __( 'Private' ),
|
|
15
13
|
info: __( 'Only visible to site admins and editors.' ),
|
|
16
14
|
},
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
info: __(
|
|
21
|
-
'Protected with a password you choose. Only those with the password can view this post.'
|
|
22
|
-
),
|
|
15
|
+
password: {
|
|
16
|
+
label: __( 'Password protected' ),
|
|
17
|
+
info: __( 'Only those with the password can view this post.' ),
|
|
23
18
|
},
|
|
24
|
-
|
|
19
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import memize from 'memize';
|
|
5
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -333,7 +334,7 @@ class NativeEditorProvider extends Component {
|
|
|
333
334
|
settings={ editorSettings }
|
|
334
335
|
{ ...props }
|
|
335
336
|
>
|
|
336
|
-
{ children }
|
|
337
|
+
<SafeAreaProvider>{ children }</SafeAreaProvider>
|
|
337
338
|
</EditorProvider>
|
|
338
339
|
<EditorHelpTopics
|
|
339
340
|
isVisible={ this.state.isHelpVisible }
|
|
@@ -2149,7 +2149,7 @@ describe( 'selectors', () => {
|
|
|
2149
2149
|
expect( didPostSaveRequestSucceed( state ) ).toBe( true );
|
|
2150
2150
|
} );
|
|
2151
2151
|
|
|
2152
|
-
it( 'should return
|
|
2152
|
+
it( 'should return false if the post save request has failed', () => {
|
|
2153
2153
|
const state = {
|
|
2154
2154
|
saving: {
|
|
2155
2155
|
successful: false,
|
|
@@ -2171,7 +2171,7 @@ describe( 'selectors', () => {
|
|
|
2171
2171
|
expect( didPostSaveRequestFail( state ) ).toBe( true );
|
|
2172
2172
|
} );
|
|
2173
2173
|
|
|
2174
|
-
it( 'should return
|
|
2174
|
+
it( 'should return false if the post save request is successful', () => {
|
|
2175
2175
|
const state = {
|
|
2176
2176
|
saving: {
|
|
2177
2177
|
error: false,
|