@atlaskit/editor-plugin-layout 2.3.0 → 2.3.1
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 2.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#128179](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128179)
|
|
8
|
+
[`1ce5182d1a35f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ce5182d1a35f) -
|
|
9
|
+
Clean up feature flag platform_editor_advanced_layouts_post_fix_patch_3
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 2.3.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -346,21 +346,15 @@ var setPresetLayout = exports.setPresetLayout = function setPresetLayout(editorA
|
|
|
346
346
|
var _ref = _pluginKey.pluginKey.getState(state),
|
|
347
347
|
pos = _ref.pos,
|
|
348
348
|
selectedLayout = _ref.selectedLayout;
|
|
349
|
-
if (
|
|
350
|
-
if (pos === null) {
|
|
351
|
-
return false;
|
|
352
|
-
}
|
|
353
|
-
} else if (selectedLayout === layout || pos === null) {
|
|
349
|
+
if (pos === null) {
|
|
354
350
|
return false;
|
|
355
351
|
}
|
|
356
352
|
var node = state.doc.nodeAt(pos);
|
|
357
353
|
if (!node) {
|
|
358
354
|
return false;
|
|
359
355
|
}
|
|
360
|
-
if (
|
|
361
|
-
|
|
362
|
-
return false;
|
|
363
|
-
}
|
|
356
|
+
if (selectedLayout === layout && node.childCount > 1) {
|
|
357
|
+
return false;
|
|
364
358
|
}
|
|
365
359
|
var tr = forceSectionToPresetLayout(state, node, pos, layout);
|
|
366
360
|
if (tr) {
|
|
@@ -323,21 +323,15 @@ export const setPresetLayout = editorAnalyticsAPI => layout => (state, dispatch)
|
|
|
323
323
|
pos,
|
|
324
324
|
selectedLayout
|
|
325
325
|
} = pluginKey.getState(state);
|
|
326
|
-
if (
|
|
327
|
-
if (pos === null) {
|
|
328
|
-
return false;
|
|
329
|
-
}
|
|
330
|
-
} else if (selectedLayout === layout || pos === null) {
|
|
326
|
+
if (pos === null) {
|
|
331
327
|
return false;
|
|
332
328
|
}
|
|
333
329
|
const node = state.doc.nodeAt(pos);
|
|
334
330
|
if (!node) {
|
|
335
331
|
return false;
|
|
336
332
|
}
|
|
337
|
-
if (
|
|
338
|
-
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
333
|
+
if (selectedLayout === layout && node.childCount > 1) {
|
|
334
|
+
return false;
|
|
341
335
|
}
|
|
342
336
|
const tr = forceSectionToPresetLayout(state, node, pos, layout);
|
|
343
337
|
if (tr) {
|
|
@@ -337,21 +337,15 @@ export var setPresetLayout = function setPresetLayout(editorAnalyticsAPI) {
|
|
|
337
337
|
var _ref = pluginKey.getState(state),
|
|
338
338
|
pos = _ref.pos,
|
|
339
339
|
selectedLayout = _ref.selectedLayout;
|
|
340
|
-
if (
|
|
341
|
-
if (pos === null) {
|
|
342
|
-
return false;
|
|
343
|
-
}
|
|
344
|
-
} else if (selectedLayout === layout || pos === null) {
|
|
340
|
+
if (pos === null) {
|
|
345
341
|
return false;
|
|
346
342
|
}
|
|
347
343
|
var node = state.doc.nodeAt(pos);
|
|
348
344
|
if (!node) {
|
|
349
345
|
return false;
|
|
350
346
|
}
|
|
351
|
-
if (
|
|
352
|
-
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
347
|
+
if (selectedLayout === layout && node.childCount > 1) {
|
|
348
|
+
return false;
|
|
355
349
|
}
|
|
356
350
|
var tr = forceSectionToPresetLayout(state, node, pos, layout);
|
|
357
351
|
if (tr) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
|
-
"@atlaskit/editor-common": "^102.
|
|
37
|
+
"@atlaskit/editor-common": "^102.13.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
44
44
|
"@atlaskit/icon": "^25.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^4.2.0",
|
|
47
47
|
"@atlaskit/tokens": "^4.5.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1"
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
"platform-visual-refresh-icons": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"platform_editor_advanced_layouts_post_fix_patch_3": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_advanced_layouts_dnd_remove_layout": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
}
|