@atlaskit/editor-plugin-expand 2.3.0 → 2.4.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#129865](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/129865)
8
+ [`dcf004629249a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf004629249a) -
9
+ [ED-24280] Added the capability to nest nestedExpands in expands
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 2.3.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#128418](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128418)
20
+ [`8f46a682011a7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f46a682011a7) -
21
+ [ux][ED-24536] Fix: when a single player expand is inserted via main toolbar while selection is
22
+ not empty, it is inserted in closed state
23
+
3
24
  ## 2.3.0
4
25
 
5
26
  ### Minor Changes
@@ -135,17 +135,19 @@ var toggleExpandExpanded = exports.toggleExpandExpanded = function toggleExpandE
135
135
  };
136
136
 
137
137
  // Creates either an expand or a nestedExpand node based on the current selection
138
- var createExpandNode = exports.createExpandNode = function createExpandNode(state) {
138
+ var createExpandNode = exports.createExpandNode = function createExpandNode(state, featureFlags) {
139
139
  var _state$schema$nodes = state.schema.nodes,
140
140
  expand = _state$schema$nodes.expand,
141
141
  nestedExpand = _state$schema$nodes.nestedExpand;
142
- var expandType = (0, _utils3.findTable)(state.selection) ? nestedExpand : expand;
142
+ var isSelectionInTable = !!(0, _utils3.findTable)(state.selection);
143
+ var isSelectionInExpand = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.nestedExpandInExpandEx) && !!(0, _utils4.findExpand)(state, state.selection);
144
+ var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
143
145
  return expandType.createAndFill({});
144
146
  };
145
- var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
147
+ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags) {
146
148
  return function (inputMethod) {
147
149
  return function (state, dispatch) {
148
- var expandNode = createExpandNode(state);
150
+ var expandNode = createExpandNode(state, featureFlags);
149
151
  if (!expandNode) {
150
152
  return false;
151
153
  }
@@ -170,9 +172,9 @@ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function
170
172
  };
171
173
  };
172
174
  };
173
- var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI) {
175
+ var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI, featureFlags) {
174
176
  return function (state, dispatch) {
175
- return insertExpandWithInputMethod(editorAnalyticsAPI)(_analytics.INPUT_METHOD.INSERT_MENU)(state, dispatch);
177
+ return insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags)(_analytics.INPUT_METHOD.INSERT_MENU)(state, dispatch);
176
178
  };
177
179
  };
178
180
  var focusTitle = exports.focusTitle = function focusTitle(pos) {
@@ -23,24 +23,25 @@ var _main = require("./pm-plugins/main");
23
23
  var _toolbar = require("./toolbar");
24
24
  var _pluginFactory = require("./pm-plugins/plugin-factory");
25
25
  var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
26
- var _api$analytics, _api$analytics2;
26
+ var _api$featureFlags, _api$analytics, _api$analytics2;
27
27
  var _ref$config = _ref.config,
28
28
  options = _ref$config === void 0 ? {} : _ref$config,
29
29
  api = _ref.api;
30
+ var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
30
31
  return {
31
32
  name: 'expand',
32
33
  nodes: function nodes() {
33
34
  return [{
34
35
  name: 'expand',
35
- node: _adfSchema.expand
36
+ node: featureFlags.nestedExpandInExpandEx ? _adfSchema.expandWithNestedExpand : _adfSchema.expand
36
37
  }, {
37
38
  name: 'nestedExpand',
38
39
  node: _adfSchema.nestedExpand
39
40
  }];
40
41
  },
41
42
  actions: {
42
- insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
43
- insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
43
+ insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, featureFlags),
44
+ insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, featureFlags)
44
45
  },
45
46
  pmPlugins: function pmPlugins() {
46
47
  return [{
@@ -78,7 +79,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
78
79
  },
79
80
  action: function action(insert, state) {
80
81
  var _api$analytics3;
81
- var node = (0, _commands.createExpandNode)(state);
82
+ var node = (0, _commands.createExpandNode)(state, featureFlags);
82
83
  if (!node) {
83
84
  return false;
84
85
  }
@@ -15,29 +15,53 @@ var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
16
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
17
17
  var _utils3 = require("@atlaskit/editor-tables/utils");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20
21
  // Creates either an expand or a nestedExpand node based on the current selection
21
22
  var createExpandNode = exports.createExpandNode = function createExpandNode(state) {
23
+ var setExpandedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
24
+ var featureFlags = arguments.length > 2 ? arguments[2] : undefined;
22
25
  var _state$schema$nodes = state.schema.nodes,
23
26
  expand = _state$schema$nodes.expand,
24
27
  nestedExpand = _state$schema$nodes.nestedExpand;
25
- var expandType = (0, _utils3.findTable)(state.selection) ? nestedExpand : expand;
28
+ var isSelectionInTable = !!(0, _utils3.findTable)(state.selection);
29
+ var isSelectionInExpand = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.nestedExpandInExpandEx) && !!(0, _transforms.findExpand)(state, state.selection);
30
+ var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
26
31
  var expandNode = expandType.createAndFill({});
27
- _expand.expandedState.set(expandNode, true);
32
+ if (setExpandedState) {
33
+ _expand.expandedState.set(expandNode, true);
34
+ }
28
35
  return expandNode;
29
36
  };
30
- var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
37
+ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags) {
31
38
  return function (inputMethod) {
32
39
  return function (state, dispatch) {
33
- var expandNode = createExpandNode(state);
40
+ var expandNode = (0, _platformFeatureFlags.fg)('platform_editor_single_player_expand_ed_24536') ? createExpandNode(state, false, featureFlags) : createExpandNode(state, undefined, featureFlags);
34
41
  if (!expandNode) {
35
42
  return false;
36
43
  }
37
- var tr = state.selection.empty ? (0, _utils2.safeInsert)(expandNode)(state.tr).scrollIntoView() : (0, _utils.createWrapSelectionTransaction)({
38
- state: state,
39
- type: expandNode.type
40
- });
44
+ var tr;
45
+ if ((0, _platformFeatureFlags.fg)('platform_editor_single_player_expand_ed_24536')) {
46
+ if (state.selection.empty) {
47
+ tr = (0, _utils2.safeInsert)(expandNode)(state.tr).scrollIntoView();
48
+ _expand.expandedState.set(expandNode, true);
49
+ } else {
50
+ tr = (0, _utils.createWrapSelectionTransaction)({
51
+ state: state,
52
+ type: expandNode.type
53
+ });
54
+ var wrapperNode = (0, _utils2.findParentNodeOfType)(expandNode.type)(tr.selection);
55
+ if (wrapperNode) {
56
+ _expand.expandedState.set(wrapperNode.node, true);
57
+ }
58
+ }
59
+ } else {
60
+ tr = state.selection.empty ? (0, _utils2.safeInsert)(expandNode)(state.tr).scrollIntoView() : (0, _utils.createWrapSelectionTransaction)({
61
+ state: state,
62
+ type: expandNode.type
63
+ });
64
+ }
41
65
  var payload = {
42
66
  action: _analytics.ACTION.INSERTED,
43
67
  actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
@@ -55,9 +79,9 @@ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function
55
79
  };
56
80
  };
57
81
  };
58
- var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI) {
82
+ var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI, featureFlags) {
59
83
  return function (state, dispatch) {
60
- return insertExpandWithInputMethod(editorAnalyticsAPI)(_analytics.INPUT_METHOD.INSERT_MENU)(state, dispatch);
84
+ return insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags)(_analytics.INPUT_METHOD.INSERT_MENU)(state, dispatch);
61
85
  };
62
86
  };
63
87
  var deleteExpand = exports.deleteExpand = function deleteExpand(editorAnalyticsAPI) {
@@ -16,24 +16,25 @@ var _keymap = require("./pm-plugins/keymap");
16
16
  var _main = require("./pm-plugins/main");
17
17
  var _toolbar = require("./toolbar");
18
18
  var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
19
- var _api$analytics, _api$analytics2;
19
+ var _api$featureFlags, _api$analytics, _api$analytics2;
20
20
  var _ref$config = _ref.config,
21
21
  options = _ref$config === void 0 ? {} : _ref$config,
22
22
  api = _ref.api;
23
+ var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
23
24
  return {
24
25
  name: 'expand',
25
26
  nodes: function nodes() {
26
27
  return [{
27
28
  name: 'expand',
28
- node: _adfSchema.expand
29
+ node: featureFlags.nestedExpandInExpandEx ? _adfSchema.expandWithNestedExpand : _adfSchema.expand
29
30
  }, {
30
31
  name: 'nestedExpand',
31
32
  node: _adfSchema.nestedExpand
32
33
  }];
33
34
  },
34
35
  actions: {
35
- insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
36
- insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
36
+ insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, featureFlags),
37
+ insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, featureFlags)
37
38
  },
38
39
  pmPlugins: function pmPlugins() {
39
40
  return [{
@@ -71,7 +72,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
71
72
  },
72
73
  action: function action(insert, state) {
73
74
  var _api$analytics3;
74
- var node = (0, _commands.createExpandNode)(state);
75
+ var node = (0, _commands.createExpandNode)(state, undefined, featureFlags);
75
76
  if (!node) {
76
77
  return false;
77
78
  }
@@ -123,16 +123,18 @@ export const toggleExpandExpanded = ({
123
123
  };
124
124
 
125
125
  // Creates either an expand or a nestedExpand node based on the current selection
126
- export const createExpandNode = state => {
126
+ export const createExpandNode = (state, featureFlags) => {
127
127
  const {
128
128
  expand,
129
129
  nestedExpand
130
130
  } = state.schema.nodes;
131
- const expandType = findTable(state.selection) ? nestedExpand : expand;
131
+ const isSelectionInTable = !!findTable(state.selection);
132
+ const isSelectionInExpand = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.nestedExpandInExpandEx) && !!findExpand(state, state.selection);
133
+ const expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
132
134
  return expandType.createAndFill({});
133
135
  };
134
- export const insertExpandWithInputMethod = editorAnalyticsAPI => inputMethod => (state, dispatch) => {
135
- const expandNode = createExpandNode(state);
136
+ export const insertExpandWithInputMethod = (editorAnalyticsAPI, featureFlags) => inputMethod => (state, dispatch) => {
137
+ const expandNode = createExpandNode(state, featureFlags);
136
138
  if (!expandNode) {
137
139
  return false;
138
140
  }
@@ -155,8 +157,8 @@ export const insertExpandWithInputMethod = editorAnalyticsAPI => inputMethod =>
155
157
  }
156
158
  return true;
157
159
  };
158
- export const insertExpand = editorAnalyticsAPI => (state, dispatch) => {
159
- return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
160
+ export const insertExpand = (editorAnalyticsAPI, featureFlags) => (state, dispatch) => {
161
+ return insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
160
162
  };
161
163
  export const focusTitle = pos => (state, dispatch, editorView) => {
162
164
  if (editorView) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { expand, nestedExpand } from '@atlaskit/adf-schema';
2
+ import { expand, expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
@@ -13,21 +13,22 @@ export const expandPlugin = ({
13
13
  config: options = {},
14
14
  api
15
15
  }) => {
16
- var _api$analytics, _api$analytics2;
16
+ var _api$featureFlags, _api$analytics, _api$analytics2;
17
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
17
18
  return {
18
19
  name: 'expand',
19
20
  nodes() {
20
21
  return [{
21
22
  name: 'expand',
22
- node: expand
23
+ node: featureFlags.nestedExpandInExpandEx ? expandWithNestedExpand : expand
23
24
  }, {
24
25
  name: 'nestedExpand',
25
26
  node: nestedExpand
26
27
  }];
27
28
  },
28
29
  actions: {
29
- insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
30
- insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
30
+ insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, featureFlags),
31
+ insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, featureFlags)
31
32
  },
32
33
  pmPlugins() {
33
34
  return [{
@@ -63,7 +64,7 @@ export const expandPlugin = ({
63
64
  icon: () => /*#__PURE__*/React.createElement(IconExpand, null),
64
65
  action(insert, state) {
65
66
  var _api$analytics3;
66
- const node = createExpandNode(state);
67
+ const node = createExpandNode(state, featureFlags);
67
68
  if (!node) {
68
69
  return false;
69
70
  }
@@ -5,28 +5,50 @@ import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
5
5
  import { findExpand } from '@atlaskit/editor-common/transforms';
6
6
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
7
  import { Selection } from '@atlaskit/editor-prosemirror/state';
8
- import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
8
+ import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
9
9
  import { findTable } from '@atlaskit/editor-tables/utils';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  // Creates either an expand or a nestedExpand node based on the current selection
11
- export const createExpandNode = state => {
12
+ export const createExpandNode = (state, setExpandedState = true, featureFlags) => {
12
13
  const {
13
14
  expand,
14
15
  nestedExpand
15
16
  } = state.schema.nodes;
16
- const expandType = findTable(state.selection) ? nestedExpand : expand;
17
+ const isSelectionInTable = !!findTable(state.selection);
18
+ const isSelectionInExpand = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.nestedExpandInExpandEx) && !!findExpand(state, state.selection);
19
+ const expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
17
20
  const expandNode = expandType.createAndFill({});
18
- expandedState.set(expandNode, true);
21
+ if (setExpandedState) {
22
+ expandedState.set(expandNode, true);
23
+ }
19
24
  return expandNode;
20
25
  };
21
- export const insertExpandWithInputMethod = editorAnalyticsAPI => inputMethod => (state, dispatch) => {
22
- const expandNode = createExpandNode(state);
26
+ export const insertExpandWithInputMethod = (editorAnalyticsAPI, featureFlags) => inputMethod => (state, dispatch) => {
27
+ const expandNode = fg('platform_editor_single_player_expand_ed_24536') ? createExpandNode(state, false, featureFlags) : createExpandNode(state, undefined, featureFlags);
23
28
  if (!expandNode) {
24
29
  return false;
25
30
  }
26
- const tr = state.selection.empty ? safeInsert(expandNode)(state.tr).scrollIntoView() : createWrapSelectionTransaction({
27
- state,
28
- type: expandNode.type
29
- });
31
+ let tr;
32
+ if (fg('platform_editor_single_player_expand_ed_24536')) {
33
+ if (state.selection.empty) {
34
+ tr = safeInsert(expandNode)(state.tr).scrollIntoView();
35
+ expandedState.set(expandNode, true);
36
+ } else {
37
+ tr = createWrapSelectionTransaction({
38
+ state,
39
+ type: expandNode.type
40
+ });
41
+ const wrapperNode = findParentNodeOfType(expandNode.type)(tr.selection);
42
+ if (wrapperNode) {
43
+ expandedState.set(wrapperNode.node, true);
44
+ }
45
+ }
46
+ } else {
47
+ tr = state.selection.empty ? safeInsert(expandNode)(state.tr).scrollIntoView() : createWrapSelectionTransaction({
48
+ state,
49
+ type: expandNode.type
50
+ });
51
+ }
30
52
  const payload = {
31
53
  action: ACTION.INSERTED,
32
54
  actionSubject: ACTION_SUBJECT.DOCUMENT,
@@ -42,8 +64,8 @@ export const insertExpandWithInputMethod = editorAnalyticsAPI => inputMethod =>
42
64
  }
43
65
  return true;
44
66
  };
45
- export const insertExpand = editorAnalyticsAPI => (state, dispatch) => {
46
- return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
67
+ export const insertExpand = (editorAnalyticsAPI, featureFlags) => (state, dispatch) => {
68
+ return insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
47
69
  };
48
70
  export const deleteExpand = editorAnalyticsAPI => (state, dispatch) => {
49
71
  const expandNode = findExpand(state);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { expand, nestedExpand } from '@atlaskit/adf-schema';
2
+ import { expand, expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
@@ -12,21 +12,22 @@ export const expandPlugin = ({
12
12
  config: options = {},
13
13
  api
14
14
  }) => {
15
- var _api$analytics, _api$analytics2;
15
+ var _api$featureFlags, _api$analytics, _api$analytics2;
16
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
16
17
  return {
17
18
  name: 'expand',
18
19
  nodes() {
19
20
  return [{
20
21
  name: 'expand',
21
- node: expand
22
+ node: featureFlags.nestedExpandInExpandEx ? expandWithNestedExpand : expand
22
23
  }, {
23
24
  name: 'nestedExpand',
24
25
  node: nestedExpand
25
26
  }];
26
27
  },
27
28
  actions: {
28
- insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
29
- insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
29
+ insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, featureFlags),
30
+ insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, featureFlags)
30
31
  },
31
32
  pmPlugins() {
32
33
  return [{
@@ -62,7 +63,7 @@ export const expandPlugin = ({
62
63
  icon: () => /*#__PURE__*/React.createElement(IconExpand, null),
63
64
  action(insert, state) {
64
65
  var _api$analytics3;
65
- const node = createExpandNode(state);
66
+ const node = createExpandNode(state, undefined, featureFlags);
66
67
  if (!node) {
67
68
  return false;
68
69
  }
@@ -128,17 +128,19 @@ export var toggleExpandExpanded = function toggleExpandExpanded(_ref2) {
128
128
  };
129
129
 
130
130
  // Creates either an expand or a nestedExpand node based on the current selection
131
- export var createExpandNode = function createExpandNode(state) {
131
+ export var createExpandNode = function createExpandNode(state, featureFlags) {
132
132
  var _state$schema$nodes = state.schema.nodes,
133
133
  expand = _state$schema$nodes.expand,
134
134
  nestedExpand = _state$schema$nodes.nestedExpand;
135
- var expandType = findTable(state.selection) ? nestedExpand : expand;
135
+ var isSelectionInTable = !!findTable(state.selection);
136
+ var isSelectionInExpand = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.nestedExpandInExpandEx) && !!findExpand(state, state.selection);
137
+ var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
136
138
  return expandType.createAndFill({});
137
139
  };
138
- export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
140
+ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags) {
139
141
  return function (inputMethod) {
140
142
  return function (state, dispatch) {
141
- var expandNode = createExpandNode(state);
143
+ var expandNode = createExpandNode(state, featureFlags);
142
144
  if (!expandNode) {
143
145
  return false;
144
146
  }
@@ -163,9 +165,9 @@ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(ed
163
165
  };
164
166
  };
165
167
  };
166
- export var insertExpand = function insertExpand(editorAnalyticsAPI) {
168
+ export var insertExpand = function insertExpand(editorAnalyticsAPI, featureFlags) {
167
169
  return function (state, dispatch) {
168
- return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
170
+ return insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
169
171
  };
170
172
  };
171
173
  export var focusTitle = function focusTitle(pos) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { expand, nestedExpand } from '@atlaskit/adf-schema';
2
+ import { expand, expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
@@ -10,24 +10,25 @@ import { createPlugin } from './pm-plugins/main';
10
10
  import { getToolbarConfig } from './toolbar';
11
11
  export { pluginKey } from './pm-plugins/plugin-factory';
12
12
  export var expandPlugin = function expandPlugin(_ref) {
13
- var _api$analytics, _api$analytics2;
13
+ var _api$featureFlags, _api$analytics, _api$analytics2;
14
14
  var _ref$config = _ref.config,
15
15
  options = _ref$config === void 0 ? {} : _ref$config,
16
16
  api = _ref.api;
17
+ var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
17
18
  return {
18
19
  name: 'expand',
19
20
  nodes: function nodes() {
20
21
  return [{
21
22
  name: 'expand',
22
- node: expand
23
+ node: featureFlags.nestedExpandInExpandEx ? expandWithNestedExpand : expand
23
24
  }, {
24
25
  name: 'nestedExpand',
25
26
  node: nestedExpand
26
27
  }];
27
28
  },
28
29
  actions: {
29
- insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
30
- insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
30
+ insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, featureFlags),
31
+ insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, featureFlags)
31
32
  },
32
33
  pmPlugins: function pmPlugins() {
33
34
  return [{
@@ -65,7 +66,7 @@ export var expandPlugin = function expandPlugin(_ref) {
65
66
  },
66
67
  action: function action(insert, state) {
67
68
  var _api$analytics3;
68
- var node = createExpandNode(state);
69
+ var node = createExpandNode(state, featureFlags);
69
70
  if (!node) {
70
71
  return false;
71
72
  }
@@ -8,29 +8,53 @@ import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
8
8
  import { findExpand } from '@atlaskit/editor-common/transforms';
9
9
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
10
10
  import { Selection } from '@atlaskit/editor-prosemirror/state';
11
- import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
11
+ import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
12
12
  import { findTable } from '@atlaskit/editor-tables/utils';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  // Creates either an expand or a nestedExpand node based on the current selection
14
15
  export var createExpandNode = function createExpandNode(state) {
16
+ var setExpandedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
17
+ var featureFlags = arguments.length > 2 ? arguments[2] : undefined;
15
18
  var _state$schema$nodes = state.schema.nodes,
16
19
  expand = _state$schema$nodes.expand,
17
20
  nestedExpand = _state$schema$nodes.nestedExpand;
18
- var expandType = findTable(state.selection) ? nestedExpand : expand;
21
+ var isSelectionInTable = !!findTable(state.selection);
22
+ var isSelectionInExpand = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.nestedExpandInExpandEx) && !!findExpand(state, state.selection);
23
+ var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
19
24
  var expandNode = expandType.createAndFill({});
20
- expandedState.set(expandNode, true);
25
+ if (setExpandedState) {
26
+ expandedState.set(expandNode, true);
27
+ }
21
28
  return expandNode;
22
29
  };
23
- export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
30
+ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags) {
24
31
  return function (inputMethod) {
25
32
  return function (state, dispatch) {
26
- var expandNode = createExpandNode(state);
33
+ var expandNode = fg('platform_editor_single_player_expand_ed_24536') ? createExpandNode(state, false, featureFlags) : createExpandNode(state, undefined, featureFlags);
27
34
  if (!expandNode) {
28
35
  return false;
29
36
  }
30
- var tr = state.selection.empty ? safeInsert(expandNode)(state.tr).scrollIntoView() : createWrapSelectionTransaction({
31
- state: state,
32
- type: expandNode.type
33
- });
37
+ var tr;
38
+ if (fg('platform_editor_single_player_expand_ed_24536')) {
39
+ if (state.selection.empty) {
40
+ tr = safeInsert(expandNode)(state.tr).scrollIntoView();
41
+ expandedState.set(expandNode, true);
42
+ } else {
43
+ tr = createWrapSelectionTransaction({
44
+ state: state,
45
+ type: expandNode.type
46
+ });
47
+ var wrapperNode = findParentNodeOfType(expandNode.type)(tr.selection);
48
+ if (wrapperNode) {
49
+ expandedState.set(wrapperNode.node, true);
50
+ }
51
+ }
52
+ } else {
53
+ tr = state.selection.empty ? safeInsert(expandNode)(state.tr).scrollIntoView() : createWrapSelectionTransaction({
54
+ state: state,
55
+ type: expandNode.type
56
+ });
57
+ }
34
58
  var payload = {
35
59
  action: ACTION.INSERTED,
36
60
  actionSubject: ACTION_SUBJECT.DOCUMENT,
@@ -48,9 +72,9 @@ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(ed
48
72
  };
49
73
  };
50
74
  };
51
- export var insertExpand = function insertExpand(editorAnalyticsAPI) {
75
+ export var insertExpand = function insertExpand(editorAnalyticsAPI, featureFlags) {
52
76
  return function (state, dispatch) {
53
- return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
77
+ return insertExpandWithInputMethod(editorAnalyticsAPI, featureFlags)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
54
78
  };
55
79
  };
56
80
  export var deleteExpand = function deleteExpand(editorAnalyticsAPI) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { expand, nestedExpand } from '@atlaskit/adf-schema';
2
+ import { expand, expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
@@ -9,24 +9,25 @@ import { expandKeymap } from './pm-plugins/keymap';
9
9
  import { createPlugin } from './pm-plugins/main';
10
10
  import { getToolbarConfig } from './toolbar';
11
11
  export var expandPlugin = function expandPlugin(_ref) {
12
- var _api$analytics, _api$analytics2;
12
+ var _api$featureFlags, _api$analytics, _api$analytics2;
13
13
  var _ref$config = _ref.config,
14
14
  options = _ref$config === void 0 ? {} : _ref$config,
15
15
  api = _ref.api;
16
+ var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
16
17
  return {
17
18
  name: 'expand',
18
19
  nodes: function nodes() {
19
20
  return [{
20
21
  name: 'expand',
21
- node: expand
22
+ node: featureFlags.nestedExpandInExpandEx ? expandWithNestedExpand : expand
22
23
  }, {
23
24
  name: 'nestedExpand',
24
25
  node: nestedExpand
25
26
  }];
26
27
  },
27
28
  actions: {
28
- insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
29
- insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
29
+ insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, featureFlags),
30
+ insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, featureFlags)
30
31
  },
31
32
  pmPlugins: function pmPlugins() {
32
33
  return [{
@@ -64,7 +65,7 @@ export var expandPlugin = function expandPlugin(_ref) {
64
65
  },
65
66
  action: function action(insert, state) {
66
67
  var _api$analytics3;
67
- var node = createExpandNode(state);
68
+ var node = createExpandNode(state, undefined, featureFlags);
68
69
  if (!node) {
69
70
  return false;
70
71
  }
@@ -1,5 +1,5 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
2
+ import type { Command, FeatureFlags } from '@atlaskit/editor-common/types';
3
3
  import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
5
  import { type InsertMethod } from '../types';
@@ -18,8 +18,8 @@ export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, nodeType,
18
18
  nodeType: NodeType;
19
19
  __livePage: boolean;
20
20
  }) => Command;
21
- export declare const createExpandNode: (state: EditorState) => PMNode | null;
22
- export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
23
- export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
21
+ export declare const createExpandNode: (state: EditorState, featureFlags?: FeatureFlags) => PMNode | null;
22
+ export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => (inputMethod: InsertMethod) => Command;
23
+ export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => Command;
24
24
  export declare const focusTitle: (pos: number) => Command;
25
25
  export declare const setSelectionInsideExpand: (expandPos: number) => Command;
@@ -1,11 +1,11 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
2
+ import type { Command, FeatureFlags } from '@atlaskit/editor-common/types';
3
3
  import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
5
  import { type InsertMethod } from '../types';
6
- export declare const createExpandNode: (state: EditorState) => PMNode | null;
7
- export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
8
- export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
6
+ export declare const createExpandNode: (state: EditorState, setExpandedState?: boolean, featureFlags?: FeatureFlags) => PMNode | null;
7
+ export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => (inputMethod: InsertMethod) => Command;
8
+ export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => Command;
9
9
  export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
10
10
  export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (expandNodePos: number, expandNode: PMNode) => Command;
11
11
  export declare const setSelectionInsideExpand: (expandPos: number) => Command;
@@ -3,6 +3,7 @@ import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugi
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
7
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
7
8
  import type { SelectionMarkerPlugin } from '@atlaskit/editor-plugin-selection-marker';
8
9
  import type { insertExpand, insertExpandWithInputMethod } from './legacyExpand/commands';
@@ -43,7 +44,8 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
43
44
  SelectionPlugin,
44
45
  OptionalPlugin<AnalyticsPlugin>,
45
46
  OptionalPlugin<SelectionMarkerPlugin>,
46
- OptionalPlugin<EditorDisabledPlugin>
47
+ OptionalPlugin<EditorDisabledPlugin>,
48
+ OptionalPlugin<FeatureFlagsPlugin>
47
49
  ];
48
50
  actions: {
49
51
  /**
@@ -1,5 +1,5 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
2
+ import type { Command, FeatureFlags } from '@atlaskit/editor-common/types';
3
3
  import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
5
  import { type InsertMethod } from '../types';
@@ -18,8 +18,8 @@ export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, nodeType,
18
18
  nodeType: NodeType;
19
19
  __livePage: boolean;
20
20
  }) => Command;
21
- export declare const createExpandNode: (state: EditorState) => PMNode | null;
22
- export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
23
- export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
21
+ export declare const createExpandNode: (state: EditorState, featureFlags?: FeatureFlags) => PMNode | null;
22
+ export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => (inputMethod: InsertMethod) => Command;
23
+ export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => Command;
24
24
  export declare const focusTitle: (pos: number) => Command;
25
25
  export declare const setSelectionInsideExpand: (expandPos: number) => Command;
@@ -1,11 +1,11 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
2
+ import type { Command, FeatureFlags } from '@atlaskit/editor-common/types';
3
3
  import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
5
  import { type InsertMethod } from '../types';
6
- export declare const createExpandNode: (state: EditorState) => PMNode | null;
7
- export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
8
- export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
6
+ export declare const createExpandNode: (state: EditorState, setExpandedState?: boolean, featureFlags?: FeatureFlags) => PMNode | null;
7
+ export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => (inputMethod: InsertMethod) => Command;
8
+ export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, featureFlags?: FeatureFlags) => Command;
9
9
  export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
10
10
  export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (expandNodePos: number, expandNode: PMNode) => Command;
11
11
  export declare const setSelectionInsideExpand: (expandPos: number) => Command;
@@ -3,6 +3,7 @@ import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugi
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
7
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
7
8
  import type { SelectionMarkerPlugin } from '@atlaskit/editor-plugin-selection-marker';
8
9
  import type { insertExpand, insertExpandWithInputMethod } from './legacyExpand/commands';
@@ -43,7 +44,8 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
43
44
  SelectionPlugin,
44
45
  OptionalPlugin<AnalyticsPlugin>,
45
46
  OptionalPlugin<SelectionMarkerPlugin>,
46
- OptionalPlugin<EditorDisabledPlugin>
47
+ OptionalPlugin<EditorDisabledPlugin>,
48
+ OptionalPlugin<FeatureFlagsPlugin>
47
49
  ];
48
50
  actions: {
49
51
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^40.8.1",
37
- "@atlaskit/button": "^19.1.0",
38
- "@atlaskit/editor-common": "^87.6.0",
37
+ "@atlaskit/button": "^20.0.0",
38
+ "@atlaskit/editor-common": "^87.10.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.7.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^1.2.0",
41
41
  "@atlaskit/editor-plugin-editor-disabled": "^1.2.0",
@@ -44,9 +44,9 @@
44
44
  "@atlaskit/editor-prosemirror": "5.0.1",
45
45
  "@atlaskit/editor-shared-styles": "^2.13.0",
46
46
  "@atlaskit/editor-tables": "^2.8.0",
47
- "@atlaskit/icon": "^22.11.0",
47
+ "@atlaskit/icon": "^22.13.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.3.0",
49
- "@atlaskit/tooltip": "^18.6.0",
49
+ "@atlaskit/tooltip": "^18.7.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
52
52
  "w3c-keyname": "^2.1.8"
@@ -57,7 +57,7 @@
57
57
  "react-intl-next": "npm:react-intl@^5.18.1"
58
58
  },
59
59
  "devDependencies": {
60
- "@atlaskit/analytics-next": "^10.0.0",
60
+ "@atlaskit/analytics-next": "^10.1.0",
61
61
  "@atlaskit/editor-plugin-content-insertion": "^1.7.0",
62
62
  "@atlaskit/editor-plugin-guideline": "^1.2.0",
63
63
  "@atlaskit/editor-plugin-quick-insert": "^1.2.0",
@@ -110,6 +110,9 @@
110
110
  },
111
111
  "platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
112
112
  "type": "boolean"
113
+ },
114
+ "platform_editor_single_player_expand_ed_24536": {
115
+ "type": "boolean"
113
116
  }
114
117
  }
115
118
  }