@atlaskit/editor-plugin-expand 2.9.3 → 2.9.5
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 +22 -0
- package/dist/cjs/legacyExpand/toolbar.js +6 -3
- package/dist/cjs/plugin.js +1 -1
- package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +3 -0
- package/dist/es2019/legacyExpand/toolbar.js +5 -2
- package/dist/es2019/plugin.js +1 -1
- package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +3 -0
- package/dist/esm/legacyExpand/toolbar.js +6 -3
- package/dist/esm/plugin.js +1 -1
- package/dist/esm/singlePlayerExpand/pm-plugins/main.js +3 -0
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 2.9.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#159926](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159926)
|
|
8
|
+
[`f60e3e772ea72`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f60e3e772ea72) -
|
|
9
|
+
Add null check to fix crash in legacy toolbar while swapping ebetween view and edit mode in love
|
|
10
|
+
pages
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 2.9.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#159855](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159855)
|
|
18
|
+
[`f91ace0ef7fbe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f91ace0ef7fbe) -
|
|
19
|
+
[ux] ED-25534 Fix Long Content Expand auto scroll issue
|
|
20
|
+
- [#159308](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159308)
|
|
21
|
+
[`14ef6f05d711c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14ef6f05d711c) -
|
|
22
|
+
[ED-24690] Replace LD FF with Statsig platform-editor-single-player-expand
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 2.9.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -12,13 +12,16 @@ var _commands = require("./commands");
|
|
|
12
12
|
var _pluginFactory = require("./pm-plugins/plugin-factory");
|
|
13
13
|
var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(api) {
|
|
14
14
|
return function (state, _ref) {
|
|
15
|
-
var _api$decorations$acti, _api$decorations, _api$analytics;
|
|
15
|
+
var _api$decorations$acti, _api$decorations, _api$analytics, _getPluginState;
|
|
16
16
|
var formatMessage = _ref.formatMessage;
|
|
17
17
|
var _ref2 = (_api$decorations$acti = api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions) !== null && _api$decorations$acti !== void 0 ? _api$decorations$acti : {},
|
|
18
18
|
hoverDecoration = _ref2.hoverDecoration;
|
|
19
19
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// JST-1060364: We are observing this crashing the editor where the `expandPlugin` doesn't exist
|
|
21
|
+
// in the editor (resulting in `Cannot destructure property 'expandRef' of ...`).
|
|
22
|
+
// For now let's add a null check to ensure we don't crash while we investigate further.
|
|
23
|
+
var _ref3 = (_getPluginState = (0, _pluginFactory.getPluginState)(state)) !== null && _getPluginState !== void 0 ? _getPluginState : {},
|
|
24
|
+
expandRef = _ref3.expandRef;
|
|
22
25
|
if (expandRef) {
|
|
23
26
|
var _state$schema$nodes = state.schema.nodes,
|
|
24
27
|
nestedExpand = _state$schema$nodes.nestedExpand,
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -17,7 +17,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
17
17
|
api: api
|
|
18
18
|
});
|
|
19
19
|
} else {
|
|
20
|
-
if ((0, _platformFeatureFlags.fg)('platform
|
|
20
|
+
if ((0, _platformFeatureFlags.fg)('platform-editor-single-player-expand')) {
|
|
21
21
|
return (0, _plugin2.expandPlugin)({
|
|
22
22
|
config: options,
|
|
23
23
|
api: api
|
|
@@ -54,6 +54,9 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
|
|
|
54
54
|
return containsClass(event.target, _styles.expandClassNames.titleContainer);
|
|
55
55
|
},
|
|
56
56
|
handleScrollToSelection: function handleScrollToSelection() {
|
|
57
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_expand_auto_scroll')) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
57
60
|
return containsClass(document.activeElement, _styles.expandClassNames.titleInput);
|
|
58
61
|
},
|
|
59
62
|
handleClickOn: (0, _selection.createSelectionClickHandler)(['expand', 'nestedExpand'], function (target) {
|
|
@@ -6,14 +6,17 @@ import { getPluginState } from './pm-plugins/plugin-factory';
|
|
|
6
6
|
export const getToolbarConfig = api => (state, {
|
|
7
7
|
formatMessage
|
|
8
8
|
}) => {
|
|
9
|
-
var _api$decorations$acti, _api$decorations, _api$analytics;
|
|
9
|
+
var _api$decorations$acti, _api$decorations, _api$analytics, _getPluginState;
|
|
10
10
|
const {
|
|
11
11
|
hoverDecoration
|
|
12
12
|
} = (_api$decorations$acti = api === null || api === void 0 ? void 0 : (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions) !== null && _api$decorations$acti !== void 0 ? _api$decorations$acti : {};
|
|
13
13
|
const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
14
|
+
// JST-1060364: We are observing this crashing the editor where the `expandPlugin` doesn't exist
|
|
15
|
+
// in the editor (resulting in `Cannot destructure property 'expandRef' of ...`).
|
|
16
|
+
// For now let's add a null check to ensure we don't crash while we investigate further.
|
|
14
17
|
const {
|
|
15
18
|
expandRef
|
|
16
|
-
} = getPluginState(state);
|
|
19
|
+
} = (_getPluginState = getPluginState(state)) !== null && _getPluginState !== void 0 ? _getPluginState : {};
|
|
17
20
|
if (expandRef) {
|
|
18
21
|
const {
|
|
19
22
|
nestedExpand,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -39,6 +39,9 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
|
|
|
39
39
|
return containsClass(event.target, expandClassNames.titleContainer);
|
|
40
40
|
},
|
|
41
41
|
handleScrollToSelection() {
|
|
42
|
+
if (fg('platform_editor_expand_auto_scroll')) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
42
45
|
return containsClass(document.activeElement, expandClassNames.titleInput);
|
|
43
46
|
},
|
|
44
47
|
handleClickOn: createSelectionClickHandler(['expand', 'nestedExpand'], target => target.classList.contains(expandClassNames.prefix), {
|
|
@@ -5,13 +5,16 @@ import { deleteExpand } from './commands';
|
|
|
5
5
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
6
6
|
export var getToolbarConfig = function getToolbarConfig(api) {
|
|
7
7
|
return function (state, _ref) {
|
|
8
|
-
var _api$decorations$acti, _api$decorations, _api$analytics;
|
|
8
|
+
var _api$decorations$acti, _api$decorations, _api$analytics, _getPluginState;
|
|
9
9
|
var formatMessage = _ref.formatMessage;
|
|
10
10
|
var _ref2 = (_api$decorations$acti = api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions) !== null && _api$decorations$acti !== void 0 ? _api$decorations$acti : {},
|
|
11
11
|
hoverDecoration = _ref2.hoverDecoration;
|
|
12
12
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// JST-1060364: We are observing this crashing the editor where the `expandPlugin` doesn't exist
|
|
14
|
+
// in the editor (resulting in `Cannot destructure property 'expandRef' of ...`).
|
|
15
|
+
// For now let's add a null check to ensure we don't crash while we investigate further.
|
|
16
|
+
var _ref3 = (_getPluginState = getPluginState(state)) !== null && _getPluginState !== void 0 ? _getPluginState : {},
|
|
17
|
+
expandRef = _ref3.expandRef;
|
|
15
18
|
if (expandRef) {
|
|
16
19
|
var _state$schema$nodes = state.schema.nodes,
|
|
17
20
|
nestedExpand = _state$schema$nodes.nestedExpand,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -11,7 +11,7 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
11
11
|
api: api
|
|
12
12
|
});
|
|
13
13
|
} else {
|
|
14
|
-
if (fg('platform
|
|
14
|
+
if (fg('platform-editor-single-player-expand')) {
|
|
15
15
|
return singlePlayerExpandPlugin({
|
|
16
16
|
config: options,
|
|
17
17
|
api: api
|
|
@@ -44,6 +44,9 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
|
|
|
44
44
|
return containsClass(event.target, expandClassNames.titleContainer);
|
|
45
45
|
},
|
|
46
46
|
handleScrollToSelection: function handleScrollToSelection() {
|
|
47
|
+
if (fg('platform_editor_expand_auto_scroll')) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
47
50
|
return containsClass(document.activeElement, expandClassNames.titleInput);
|
|
48
51
|
},
|
|
49
52
|
handleClickOn: createSelectionClickHandler(['expand', 'nestedExpand'], function (target) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.5",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^44.2.0",
|
|
35
35
|
"@atlaskit/button": "^20.3.0",
|
|
36
|
-
"@atlaskit/editor-common": "^94.
|
|
36
|
+
"@atlaskit/editor-common": "^94.12.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-selection": "^1.5.0",
|
|
41
41
|
"@atlaskit/editor-plugin-selection-marker": "^1.5.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
43
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
43
|
+
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
45
45
|
"@atlaskit/icon": "^22.24.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
48
|
-
"@atlaskit/tokens": "^2.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^2.11.0",
|
|
48
|
+
"@atlaskit/tokens": "^2.1.0",
|
|
49
49
|
"@atlaskit/tooltip": "^18.8.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/editor-plugin-content-insertion": "^1.9.0",
|
|
62
62
|
"@atlaskit/editor-plugin-guideline": "^1.2.0",
|
|
63
63
|
"@atlaskit/editor-plugin-quick-insert": "^1.6.0",
|
|
64
|
-
"@atlaskit/editor-plugin-table": "^7.
|
|
64
|
+
"@atlaskit/editor-plugin-table": "^7.30.0",
|
|
65
65
|
"@atlaskit/editor-plugin-type-ahead": "^1.10.0",
|
|
66
66
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
67
67
|
"@testing-library/react": "^12.1.5",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"platform.editor.live-pages-expand-divergence": {
|
|
106
106
|
"type": "boolean"
|
|
107
107
|
},
|
|
108
|
-
"platform
|
|
108
|
+
"platform-editor-single-player-expand": {
|
|
109
109
|
"type": "boolean"
|
|
110
110
|
},
|
|
111
111
|
"platform_editor_nest_nested_expand_in_expand_jira": {
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
},
|
|
117
117
|
"platform_editor_nest_nested_expand_drag_fix": {
|
|
118
118
|
"type": "boolean"
|
|
119
|
+
},
|
|
120
|
+
"platform_editor_expand_auto_scroll": {
|
|
121
|
+
"type": "boolean"
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
124
|
}
|