@atlaskit/editor-plugin-breakout 2.8.2 → 2.8.3
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-breakout
|
|
2
2
|
|
|
3
|
+
## 2.8.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#174482](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174482)
|
|
8
|
+
[`6947eb8ffc2bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6947eb8ffc2bc) -
|
|
9
|
+
Add new FG to fix issue with migration logic for full width pages
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 2.8.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -51,7 +51,9 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
51
51
|
updatedDocChanged = true;
|
|
52
52
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
53
53
|
var mode = breakoutMark.attrs.mode;
|
|
54
|
-
var newWidth =
|
|
54
|
+
var newWidth = (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_patch_1') ?
|
|
55
|
+
// if breakout is present on node, but page appearance is 'full width' force width to full width to maintain backwards compatibility
|
|
56
|
+
isFullWidthEnabled || mode === 'full-width' ? _editorSharedStyles.akEditorFullWidthLayoutWidth : _editorSharedStyles.akEditorCalculatedWideLayoutWidth : mode === 'wide' ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : _editorSharedStyles.akEditorFullWidthLayoutWidth;
|
|
55
57
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
56
58
|
width: newWidth,
|
|
57
59
|
mode: mode
|
|
@@ -119,10 +121,17 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
|
|
|
119
121
|
handleKeyDown: (0, _handleKeyDown.handleKeyDown)(api)
|
|
120
122
|
},
|
|
121
123
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_patch_1')) {
|
|
125
|
+
var _api$editorViewMode;
|
|
126
|
+
if ((api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view') {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
var _api$editorViewMode2;
|
|
131
|
+
// if editor is in live-view mode don't send transactions
|
|
132
|
+
if ((api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'edit' && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
126
135
|
}
|
|
127
136
|
var newTr = newState.tr;
|
|
128
137
|
var hasDocChanged = false;
|
|
@@ -44,7 +44,9 @@ const addBreakoutToResizableNode = ({
|
|
|
44
44
|
updatedDocChanged = true;
|
|
45
45
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
46
46
|
const mode = breakoutMark.attrs.mode;
|
|
47
|
-
const newWidth =
|
|
47
|
+
const newWidth = fg('platform_editor_breakout_resizing_patch_1') ?
|
|
48
|
+
// if breakout is present on node, but page appearance is 'full width' force width to full width to maintain backwards compatibility
|
|
49
|
+
isFullWidthEnabled || mode === 'full-width' ? akEditorFullWidthLayoutWidth : akEditorCalculatedWideLayoutWidth : mode === 'wide' ? akEditorCalculatedWideLayoutWidth : akEditorFullWidthLayoutWidth;
|
|
48
50
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
49
51
|
width: newWidth,
|
|
50
52
|
mode: mode
|
|
@@ -115,10 +117,17 @@ export const createResizingPlugin = (api, getIntl, nodeViewPortalProviderAPI, op
|
|
|
115
117
|
handleKeyDown: handleKeyDown(api)
|
|
116
118
|
},
|
|
117
119
|
appendTransaction(transactions, oldState, newState) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
if (fg('platform_editor_breakout_resizing_patch_1')) {
|
|
121
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
122
|
+
if ((api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view') {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
var _api$editorViewMode2, _api$editorViewMode2$;
|
|
127
|
+
// if editor is in live-view mode don't send transactions
|
|
128
|
+
if ((api === null || api === void 0 ? void 0 : (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 ? void 0 : (_api$editorViewMode2$ = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2$ === void 0 ? void 0 : _api$editorViewMode2$.mode) !== 'edit' && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
122
131
|
}
|
|
123
132
|
let newTr = newState.tr;
|
|
124
133
|
let hasDocChanged = false;
|
|
@@ -44,7 +44,9 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
44
44
|
updatedDocChanged = true;
|
|
45
45
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
46
46
|
var mode = breakoutMark.attrs.mode;
|
|
47
|
-
var newWidth =
|
|
47
|
+
var newWidth = fg('platform_editor_breakout_resizing_patch_1') ?
|
|
48
|
+
// if breakout is present on node, but page appearance is 'full width' force width to full width to maintain backwards compatibility
|
|
49
|
+
isFullWidthEnabled || mode === 'full-width' ? akEditorFullWidthLayoutWidth : akEditorCalculatedWideLayoutWidth : mode === 'wide' ? akEditorCalculatedWideLayoutWidth : akEditorFullWidthLayoutWidth;
|
|
48
50
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
49
51
|
width: newWidth,
|
|
50
52
|
mode: mode
|
|
@@ -112,10 +114,17 @@ export var createResizingPlugin = function createResizingPlugin(api, getIntl, no
|
|
|
112
114
|
handleKeyDown: handleKeyDown(api)
|
|
113
115
|
},
|
|
114
116
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
if (fg('platform_editor_breakout_resizing_patch_1')) {
|
|
118
|
+
var _api$editorViewMode;
|
|
119
|
+
if ((api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view') {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
var _api$editorViewMode2;
|
|
124
|
+
// if editor is in live-view mode don't send transactions
|
|
125
|
+
if ((api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'edit' && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
119
128
|
}
|
|
120
129
|
var newTr = newState.tr;
|
|
121
130
|
var hasDocChanged = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "Breakout 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": "^107.
|
|
37
|
+
"@atlaskit/editor-common": "^107.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-block-controls": "^3.19.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
46
46
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
47
|
-
"@atlaskit/icon": "^27.
|
|
47
|
+
"@atlaskit/icon": "^27.1.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
50
50
|
"@atlaskit/theme": "^18.0.0",
|
|
51
51
|
"@atlaskit/tmp-editor-statsig": "^8.0.0",
|
|
52
|
-
"@atlaskit/tokens": "^5.
|
|
52
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
53
53
|
"@atlaskit/tooltip": "^20.3.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1",
|
|
@@ -119,6 +119,9 @@
|
|
|
119
119
|
},
|
|
120
120
|
"platform_editor_breakout_resizing_hello_release": {
|
|
121
121
|
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"platform_editor_breakout_resizing_patch_1": {
|
|
124
|
+
"type": "boolean"
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
}
|