@atlaskit/editor-plugin-expand 3.2.6 → 3.2.7
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 +9 -0
- package/dist/cjs/legacyExpand/commands.js +10 -13
- package/dist/cjs/legacyExpand/plugin.js +4 -8
- package/dist/cjs/legacyExpand/pm-plugins/main.js +0 -7
- package/dist/cjs/singlePlayerExpand/commands.js +9 -13
- package/dist/cjs/singlePlayerExpand/plugin.js +4 -8
- package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +0 -7
- package/dist/es2019/legacyExpand/commands.js +10 -13
- package/dist/es2019/legacyExpand/plugin.js +4 -8
- package/dist/es2019/legacyExpand/pm-plugins/main.js +0 -7
- package/dist/es2019/singlePlayerExpand/commands.js +10 -13
- package/dist/es2019/singlePlayerExpand/plugin.js +4 -8
- package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +0 -7
- package/dist/esm/legacyExpand/commands.js +10 -13
- package/dist/esm/legacyExpand/plugin.js +4 -8
- package/dist/esm/legacyExpand/pm-plugins/main.js +0 -7
- package/dist/esm/singlePlayerExpand/commands.js +9 -13
- package/dist/esm/singlePlayerExpand/plugin.js +4 -8
- package/dist/esm/singlePlayerExpand/pm-plugins/main.js +0 -7
- package/dist/types/legacyExpand/commands.d.ts +3 -3
- package/dist/types/singlePlayerExpand/commands.d.ts +3 -3
- package/dist/types-ts4.5/legacyExpand/commands.d.ts +3 -3
- package/dist/types-ts4.5/singlePlayerExpand/commands.d.ts +3 -3
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 3.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139698](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139698)
|
|
8
|
+
[`cf8ea53ed0264`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf8ea53ed0264) -
|
|
9
|
+
Clean-up nested expand feature gate
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.2.6
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -16,7 +16,6 @@ var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
17
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
19
|
var _utils4 = require("../utils");
|
|
21
20
|
var _pluginFactory = require("./pm-plugins/plugin-factory");
|
|
22
21
|
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; }
|
|
@@ -49,12 +48,10 @@ var deleteExpandAtPos = exports.deleteExpandAtPos = function deleteExpandAtPos(e
|
|
|
49
48
|
var tr = state.tr;
|
|
50
49
|
tr.delete(expandNodePos, expandNodePos + expandNode.nodeSize);
|
|
51
50
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
tr.setSelection(_state2.Selection.near(resolvedPos, -1));
|
|
57
|
-
}
|
|
51
|
+
if (expandNode.type === state.schema.nodes.nestedExpand) {
|
|
52
|
+
var resolvedPos = tr.doc.resolve(expandNodePos + 1);
|
|
53
|
+
if (resolvedPos) {
|
|
54
|
+
tr.setSelection(_state2.Selection.near(resolvedPos, -1));
|
|
58
55
|
}
|
|
59
56
|
}
|
|
60
57
|
dispatch(tr);
|
|
@@ -146,19 +143,19 @@ var toggleExpandExpanded = exports.toggleExpandExpanded = function toggleExpandE
|
|
|
146
143
|
};
|
|
147
144
|
|
|
148
145
|
// Creates either an expand or a nestedExpand node based on the current selection
|
|
149
|
-
var createExpandNode = exports.createExpandNode = function createExpandNode(state
|
|
146
|
+
var createExpandNode = exports.createExpandNode = function createExpandNode(state) {
|
|
150
147
|
var _state$schema$nodes = state.schema.nodes,
|
|
151
148
|
expand = _state$schema$nodes.expand,
|
|
152
149
|
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
153
150
|
var isSelectionInTable = !!(0, _utils3.findTable)(state.selection);
|
|
154
|
-
var isSelectionInExpand =
|
|
151
|
+
var isSelectionInExpand = (0, _utils4.isNestedInExpand)(state);
|
|
155
152
|
var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
156
153
|
return expandType.createAndFill({});
|
|
157
154
|
};
|
|
158
|
-
var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI
|
|
155
|
+
var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
|
|
159
156
|
return function (inputMethod) {
|
|
160
157
|
return function (state, dispatch) {
|
|
161
|
-
var expandNode = createExpandNode(state
|
|
158
|
+
var expandNode = createExpandNode(state);
|
|
162
159
|
if (!expandNode) {
|
|
163
160
|
return false;
|
|
164
161
|
}
|
|
@@ -183,9 +180,9 @@ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function
|
|
|
183
180
|
};
|
|
184
181
|
};
|
|
185
182
|
};
|
|
186
|
-
var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI
|
|
183
|
+
var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI) {
|
|
187
184
|
return function (state, dispatch) {
|
|
188
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI
|
|
185
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(_analytics.INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
189
186
|
};
|
|
190
187
|
};
|
|
191
188
|
var focusTitle = exports.focusTitle = function focusTitle(pos) {
|
|
@@ -11,7 +11,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _commands = require("./commands");
|
|
16
15
|
var _keymap = require("./pm-plugins/keymap");
|
|
17
16
|
var _main = require("./pm-plugins/main");
|
|
@@ -19,13 +18,10 @@ var _toolbar = require("./toolbar");
|
|
|
19
18
|
// Ignored via go/ees005
|
|
20
19
|
// eslint-disable-next-line prefer-const
|
|
21
20
|
var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
22
|
-
var _api$
|
|
21
|
+
var _api$analytics, _api$analytics2;
|
|
23
22
|
var _ref$config = _ref.config,
|
|
24
23
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
25
24
|
api = _ref.api;
|
|
26
|
-
// Confluence is injecting the FF through editor props, from an experiment
|
|
27
|
-
// Jira is pulling it in through platform feature flags, from a feature gate
|
|
28
|
-
var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || (0, _platformFeatureFlags.fg)('platform_editor_nest_nested_expand_in_expand_jira');
|
|
29
25
|
return {
|
|
30
26
|
name: 'expand',
|
|
31
27
|
nodes: function nodes() {
|
|
@@ -38,8 +34,8 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
38
34
|
}];
|
|
39
35
|
},
|
|
40
36
|
actions: {
|
|
41
|
-
insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
42
|
-
insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
37
|
+
insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
|
|
38
|
+
insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
|
|
43
39
|
},
|
|
44
40
|
pmPlugins: function pmPlugins() {
|
|
45
41
|
return [{
|
|
@@ -78,7 +74,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
78
74
|
},
|
|
79
75
|
action: function action(insert, state) {
|
|
80
76
|
var _api$analytics3;
|
|
81
|
-
var node = (0, _commands.createExpandNode)(state
|
|
77
|
+
var node = (0, _commands.createExpandNode)(state);
|
|
82
78
|
if (!node) {
|
|
83
79
|
return false;
|
|
84
80
|
}
|
|
@@ -12,7 +12,6 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
12
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
13
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
14
14
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
15
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
15
|
var _commands = require("../commands");
|
|
17
16
|
var _nodeviews = _interopRequireDefault(require("../nodeviews"));
|
|
18
17
|
var _pluginFactory = require("./plugin-factory");
|
|
@@ -136,12 +135,6 @@ function handleExpandDrag(view, event, slice) {
|
|
|
136
135
|
var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
|
|
137
136
|
var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
|
|
138
137
|
var isNodeBeingDroppedInsideNestedExpand = dropLocationNodeType === state.schema.nodes.nestedExpand || dropLocationParentNodeType === state.schema.nodes.nestedExpand;
|
|
139
|
-
if ((0, _experiments.editorExperiment)('nested-expand-in-expand', false)) {
|
|
140
|
-
if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
|
|
141
|
-
event.preventDefault();
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
138
|
var updatedSlice = slice;
|
|
146
139
|
if (sliceContainsExpand && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
|
|
147
140
|
updatedSlice = (0, _transforms.transformSliceExpandToNestedExpand)(slice);
|
|
@@ -17,19 +17,17 @@ var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
|
17
17
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
18
18
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
20
|
var _utils4 = require("../utils");
|
|
22
21
|
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; }
|
|
23
22
|
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; }
|
|
24
23
|
// Creates either an expand or a nestedExpand node based on the current selection
|
|
25
24
|
var createExpandNode = exports.createExpandNode = function createExpandNode(state) {
|
|
26
25
|
var setExpandedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
27
|
-
var isNestingExpandsSupported = arguments.length > 2 ? arguments[2] : undefined;
|
|
28
26
|
var _state$schema$nodes = state.schema.nodes,
|
|
29
27
|
expand = _state$schema$nodes.expand,
|
|
30
28
|
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
31
29
|
var isSelectionInTable = !!(0, _utils3.findTable)(state.selection);
|
|
32
|
-
var isSelectionInExpand =
|
|
30
|
+
var isSelectionInExpand = (0, _utils4.isNestedInExpand)(state);
|
|
33
31
|
var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
34
32
|
var expandNode = expandType.createAndFill({});
|
|
35
33
|
if (setExpandedState) {
|
|
@@ -39,10 +37,10 @@ var createExpandNode = exports.createExpandNode = function createExpandNode(stat
|
|
|
39
37
|
}
|
|
40
38
|
return expandNode;
|
|
41
39
|
};
|
|
42
|
-
var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI
|
|
40
|
+
var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
|
|
43
41
|
return function (inputMethod) {
|
|
44
42
|
return function (state, dispatch) {
|
|
45
|
-
var expandNode = createExpandNode(state, false
|
|
43
|
+
var expandNode = createExpandNode(state, false);
|
|
46
44
|
if (!expandNode) {
|
|
47
45
|
return false;
|
|
48
46
|
}
|
|
@@ -79,9 +77,9 @@ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function
|
|
|
79
77
|
};
|
|
80
78
|
};
|
|
81
79
|
};
|
|
82
|
-
var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI
|
|
80
|
+
var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI) {
|
|
83
81
|
return function (state, dispatch) {
|
|
84
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI
|
|
82
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(_analytics.INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
85
83
|
};
|
|
86
84
|
};
|
|
87
85
|
var deleteExpand = exports.deleteExpand = function deleteExpand(editorAnalyticsAPI) {
|
|
@@ -111,12 +109,10 @@ var deleteExpandAtPos = exports.deleteExpandAtPos = function deleteExpandAtPos(e
|
|
|
111
109
|
var tr = state.tr;
|
|
112
110
|
tr.delete(expandNodePos, expandNodePos + expandNode.nodeSize);
|
|
113
111
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
tr.setSelection(_state2.Selection.near(resolvedPos, -1));
|
|
119
|
-
}
|
|
112
|
+
if (expandNode.type === state.schema.nodes.nestedExpand) {
|
|
113
|
+
var resolvedPos = tr.doc.resolve(expandNodePos + 1);
|
|
114
|
+
if (resolvedPos) {
|
|
115
|
+
tr.setSelection(_state2.Selection.near(resolvedPos, -1));
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
118
|
dispatch(tr);
|
|
@@ -11,7 +11,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _commands = require("./commands");
|
|
16
15
|
var _keymap = require("./pm-plugins/keymap");
|
|
17
16
|
var _main = require("./pm-plugins/main");
|
|
@@ -19,13 +18,10 @@ var _toolbar = require("./toolbar");
|
|
|
19
18
|
// Ignored via go/ees005
|
|
20
19
|
// eslint-disable-next-line prefer-const
|
|
21
20
|
var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
22
|
-
var _api$
|
|
21
|
+
var _api$analytics, _api$analytics2;
|
|
23
22
|
var _ref$config = _ref.config,
|
|
24
23
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
25
24
|
api = _ref.api;
|
|
26
|
-
// Confluence is injecting the FF through editor props, from an experiment
|
|
27
|
-
// Jira is pulling it in through platform feature flags, from a feature gate
|
|
28
|
-
var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || (0, _platformFeatureFlags.fg)('platform_editor_nest_nested_expand_in_expand_jira');
|
|
29
25
|
return {
|
|
30
26
|
name: 'expand',
|
|
31
27
|
nodes: function nodes() {
|
|
@@ -38,8 +34,8 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
38
34
|
}];
|
|
39
35
|
},
|
|
40
36
|
actions: {
|
|
41
|
-
insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
42
|
-
insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
37
|
+
insertExpand: (0, _commands.insertExpand)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
|
|
38
|
+
insertExpandWithInputMethod: (0, _commands.insertExpandWithInputMethod)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
|
|
43
39
|
},
|
|
44
40
|
pmPlugins: function pmPlugins() {
|
|
45
41
|
return [{
|
|
@@ -78,7 +74,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
78
74
|
},
|
|
79
75
|
action: function action(insert, state) {
|
|
80
76
|
var _api$analytics3;
|
|
81
|
-
var node = (0, _commands.createExpandNode)(state, undefined
|
|
77
|
+
var node = (0, _commands.createExpandNode)(state, undefined);
|
|
82
78
|
if (!node) {
|
|
83
79
|
return false;
|
|
84
80
|
}
|
|
@@ -13,7 +13,6 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
13
13
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
14
14
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
16
|
var _nodeViews = _interopRequireDefault(require("../node-views"));
|
|
18
17
|
// Ignored via go/ees005
|
|
19
18
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -118,12 +117,6 @@ function handleExpandDrag(view, event, slice) {
|
|
|
118
117
|
var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
|
|
119
118
|
var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
|
|
120
119
|
var isNodeBeingDroppedInsideNestedExpand = dropLocationNodeType === state.schema.nodes.nestedExpand || dropLocationParentNodeType === state.schema.nodes.nestedExpand;
|
|
121
|
-
if ((0, _experiments.editorExperiment)('nested-expand-in-expand', false)) {
|
|
122
|
-
if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
|
|
123
|
-
event.preventDefault();
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
120
|
var updatedSlice = slice;
|
|
128
121
|
if (sliceContainsExpand && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
|
|
129
122
|
updatedSlice = (0, _transforms.transformSliceExpandToNestedExpand)(slice);
|
|
@@ -8,7 +8,6 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
8
8
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
9
9
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
11
|
import { isNestedInExpand } from '../utils';
|
|
13
12
|
import { createCommand } from './pm-plugins/plugin-factory';
|
|
14
13
|
export const setExpandRef = ref => createCommand({
|
|
@@ -35,12 +34,10 @@ export const deleteExpandAtPos = editorAnalyticsAPI => (expandNodePos, expandNod
|
|
|
35
34
|
} = state;
|
|
36
35
|
tr.delete(expandNodePos, expandNodePos + expandNode.nodeSize);
|
|
37
36
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
43
|
-
}
|
|
37
|
+
if (expandNode.type === state.schema.nodes.nestedExpand) {
|
|
38
|
+
const resolvedPos = tr.doc.resolve(expandNodePos + 1);
|
|
39
|
+
if (resolvedPos) {
|
|
40
|
+
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
dispatch(tr);
|
|
@@ -134,18 +131,18 @@ export const toggleExpandExpanded = ({
|
|
|
134
131
|
};
|
|
135
132
|
|
|
136
133
|
// Creates either an expand or a nestedExpand node based on the current selection
|
|
137
|
-
export const createExpandNode =
|
|
134
|
+
export const createExpandNode = state => {
|
|
138
135
|
const {
|
|
139
136
|
expand,
|
|
140
137
|
nestedExpand
|
|
141
138
|
} = state.schema.nodes;
|
|
142
139
|
const isSelectionInTable = !!findTable(state.selection);
|
|
143
|
-
const isSelectionInExpand =
|
|
140
|
+
const isSelectionInExpand = isNestedInExpand(state);
|
|
144
141
|
const expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
145
142
|
return expandType.createAndFill({});
|
|
146
143
|
};
|
|
147
|
-
export const insertExpandWithInputMethod =
|
|
148
|
-
const expandNode = createExpandNode(state
|
|
144
|
+
export const insertExpandWithInputMethod = editorAnalyticsAPI => inputMethod => (state, dispatch) => {
|
|
145
|
+
const expandNode = createExpandNode(state);
|
|
149
146
|
if (!expandNode) {
|
|
150
147
|
return false;
|
|
151
148
|
}
|
|
@@ -168,8 +165,8 @@ export const insertExpandWithInputMethod = (editorAnalyticsAPI, isNestingExpands
|
|
|
168
165
|
}
|
|
169
166
|
return true;
|
|
170
167
|
};
|
|
171
|
-
export const insertExpand =
|
|
172
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI
|
|
168
|
+
export const insertExpand = editorAnalyticsAPI => (state, dispatch) => {
|
|
169
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
173
170
|
};
|
|
174
171
|
export const focusTitle = pos => (state, dispatch, editorView) => {
|
|
175
172
|
if (editorView) {
|
|
@@ -4,7 +4,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
6
6
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
|
|
9
8
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
10
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -16,10 +15,7 @@ export let expandPlugin = ({
|
|
|
16
15
|
config: options = {},
|
|
17
16
|
api
|
|
18
17
|
}) => {
|
|
19
|
-
var _api$
|
|
20
|
-
// Confluence is injecting the FF through editor props, from an experiment
|
|
21
|
-
// Jira is pulling it in through platform feature flags, from a feature gate
|
|
22
|
-
const isNestingExpandsSupported = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags$sha === void 0 ? void 0 : _api$featureFlags$sha.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
|
|
18
|
+
var _api$analytics, _api$analytics2;
|
|
23
19
|
return {
|
|
24
20
|
name: 'expand',
|
|
25
21
|
nodes() {
|
|
@@ -32,8 +28,8 @@ export let expandPlugin = ({
|
|
|
32
28
|
}];
|
|
33
29
|
},
|
|
34
30
|
actions: {
|
|
35
|
-
insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
36
|
-
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
31
|
+
insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
|
|
32
|
+
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
|
|
37
33
|
},
|
|
38
34
|
pmPlugins() {
|
|
39
35
|
return [{
|
|
@@ -70,7 +66,7 @@ export let expandPlugin = ({
|
|
|
70
66
|
icon: () => /*#__PURE__*/React.createElement(IconExpand, null),
|
|
71
67
|
action(insert, state) {
|
|
72
68
|
var _api$analytics3;
|
|
73
|
-
const node = createExpandNode(state
|
|
69
|
+
const node = createExpandNode(state);
|
|
74
70
|
if (!node) {
|
|
75
71
|
return false;
|
|
76
72
|
}
|
|
@@ -3,7 +3,6 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { findExpand, transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { setExpandRef } from '../commands';
|
|
8
7
|
// Ignored via go/ees005
|
|
9
8
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -126,12 +125,6 @@ export function handleExpandDrag(view, event, slice) {
|
|
|
126
125
|
const nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
|
|
127
126
|
const isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
|
|
128
127
|
const isNodeBeingDroppedInsideNestedExpand = dropLocationNodeType === state.schema.nodes.nestedExpand || dropLocationParentNodeType === state.schema.nodes.nestedExpand;
|
|
129
|
-
if (editorExperiment('nested-expand-in-expand', false)) {
|
|
130
|
-
if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
|
|
131
|
-
event.preventDefault();
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
128
|
let updatedSlice = slice;
|
|
136
129
|
if (sliceContainsExpand && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
|
|
137
130
|
updatedSlice = transformSliceExpandToNestedExpand(slice);
|
|
@@ -9,17 +9,16 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
9
9
|
import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
12
|
import { isNestedInExpand } from '../utils';
|
|
14
13
|
|
|
15
14
|
// Creates either an expand or a nestedExpand node based on the current selection
|
|
16
|
-
export const createExpandNode = (state, setExpandedState = true
|
|
15
|
+
export const createExpandNode = (state, setExpandedState = true) => {
|
|
17
16
|
const {
|
|
18
17
|
expand,
|
|
19
18
|
nestedExpand
|
|
20
19
|
} = state.schema.nodes;
|
|
21
20
|
const isSelectionInTable = !!findTable(state.selection);
|
|
22
|
-
const isSelectionInExpand =
|
|
21
|
+
const isSelectionInExpand = isNestedInExpand(state);
|
|
23
22
|
const expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
24
23
|
const expandNode = expandType.createAndFill({});
|
|
25
24
|
if (setExpandedState) {
|
|
@@ -29,8 +28,8 @@ export const createExpandNode = (state, setExpandedState = true, isNestingExpand
|
|
|
29
28
|
}
|
|
30
29
|
return expandNode;
|
|
31
30
|
};
|
|
32
|
-
export const insertExpandWithInputMethod =
|
|
33
|
-
const expandNode = createExpandNode(state, false
|
|
31
|
+
export const insertExpandWithInputMethod = editorAnalyticsAPI => inputMethod => (state, dispatch) => {
|
|
32
|
+
const expandNode = createExpandNode(state, false);
|
|
34
33
|
if (!expandNode) {
|
|
35
34
|
return false;
|
|
36
35
|
}
|
|
@@ -65,8 +64,8 @@ export const insertExpandWithInputMethod = (editorAnalyticsAPI, isNestingExpands
|
|
|
65
64
|
}
|
|
66
65
|
return true;
|
|
67
66
|
};
|
|
68
|
-
export const insertExpand =
|
|
69
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI
|
|
67
|
+
export const insertExpand = editorAnalyticsAPI => (state, dispatch) => {
|
|
68
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
70
69
|
};
|
|
71
70
|
export const deleteExpand = editorAnalyticsAPI => (state, dispatch) => {
|
|
72
71
|
const expandNode = findExpand(state);
|
|
@@ -93,12 +92,10 @@ export const deleteExpandAtPos = editorAnalyticsAPI => (expandNodePos, expandNod
|
|
|
93
92
|
} = state;
|
|
94
93
|
tr.delete(expandNodePos, expandNodePos + expandNode.nodeSize);
|
|
95
94
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
101
|
-
}
|
|
95
|
+
if (expandNode.type === state.schema.nodes.nestedExpand) {
|
|
96
|
+
const resolvedPos = tr.doc.resolve(expandNodePos + 1);
|
|
97
|
+
if (resolvedPos) {
|
|
98
|
+
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
102
99
|
}
|
|
103
100
|
}
|
|
104
101
|
dispatch(tr);
|
|
@@ -4,7 +4,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
6
6
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
|
|
9
8
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
10
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -16,10 +15,7 @@ export let expandPlugin = ({
|
|
|
16
15
|
config: options = {},
|
|
17
16
|
api
|
|
18
17
|
}) => {
|
|
19
|
-
var _api$
|
|
20
|
-
// Confluence is injecting the FF through editor props, from an experiment
|
|
21
|
-
// Jira is pulling it in through platform feature flags, from a feature gate
|
|
22
|
-
const isNestingExpandsSupported = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags$sha === void 0 ? void 0 : _api$featureFlags$sha.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
|
|
18
|
+
var _api$analytics, _api$analytics2;
|
|
23
19
|
return {
|
|
24
20
|
name: 'expand',
|
|
25
21
|
nodes() {
|
|
@@ -32,8 +28,8 @@ export let expandPlugin = ({
|
|
|
32
28
|
}];
|
|
33
29
|
},
|
|
34
30
|
actions: {
|
|
35
|
-
insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
36
|
-
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
31
|
+
insertExpand: insertExpand(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
|
|
32
|
+
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
|
|
37
33
|
},
|
|
38
34
|
pmPlugins() {
|
|
39
35
|
return [{
|
|
@@ -70,7 +66,7 @@ export let expandPlugin = ({
|
|
|
70
66
|
icon: () => /*#__PURE__*/React.createElement(IconExpand, null),
|
|
71
67
|
action(insert, state) {
|
|
72
68
|
var _api$analytics3;
|
|
73
|
-
const node = createExpandNode(state, undefined
|
|
69
|
+
const node = createExpandNode(state, undefined);
|
|
74
70
|
if (!node) {
|
|
75
71
|
return false;
|
|
76
72
|
}
|
|
@@ -3,7 +3,6 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
// Ignored via go/ees005
|
|
8
7
|
// eslint-disable-next-line import/no-named-as-default
|
|
9
8
|
import ExpandNodeView from '../node-views';
|
|
@@ -105,12 +104,6 @@ export function handleExpandDrag(view, event, slice) {
|
|
|
105
104
|
const nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
|
|
106
105
|
const isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
|
|
107
106
|
const isNodeBeingDroppedInsideNestedExpand = dropLocationNodeType === state.schema.nodes.nestedExpand || dropLocationParentNodeType === state.schema.nodes.nestedExpand;
|
|
108
|
-
if (editorExperiment('nested-expand-in-expand', false)) {
|
|
109
|
-
if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
|
|
110
|
-
event.preventDefault();
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
107
|
let updatedSlice = slice;
|
|
115
108
|
if (sliceContainsExpand && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
|
|
116
109
|
updatedSlice = transformSliceExpandToNestedExpand(slice);
|
|
@@ -11,7 +11,6 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
11
11
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
12
12
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
14
|
import { isNestedInExpand } from '../utils';
|
|
16
15
|
import { createCommand } from './pm-plugins/plugin-factory';
|
|
17
16
|
export var setExpandRef = function setExpandRef(ref) {
|
|
@@ -42,12 +41,10 @@ export var deleteExpandAtPos = function deleteExpandAtPos(editorAnalyticsAPI) {
|
|
|
42
41
|
var tr = state.tr;
|
|
43
42
|
tr.delete(expandNodePos, expandNodePos + expandNode.nodeSize);
|
|
44
43
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
50
|
-
}
|
|
44
|
+
if (expandNode.type === state.schema.nodes.nestedExpand) {
|
|
45
|
+
var resolvedPos = tr.doc.resolve(expandNodePos + 1);
|
|
46
|
+
if (resolvedPos) {
|
|
47
|
+
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
dispatch(tr);
|
|
@@ -139,19 +136,19 @@ export var toggleExpandExpanded = function toggleExpandExpanded(_ref2) {
|
|
|
139
136
|
};
|
|
140
137
|
|
|
141
138
|
// Creates either an expand or a nestedExpand node based on the current selection
|
|
142
|
-
export var createExpandNode = function createExpandNode(state
|
|
139
|
+
export var createExpandNode = function createExpandNode(state) {
|
|
143
140
|
var _state$schema$nodes = state.schema.nodes,
|
|
144
141
|
expand = _state$schema$nodes.expand,
|
|
145
142
|
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
146
143
|
var isSelectionInTable = !!findTable(state.selection);
|
|
147
|
-
var isSelectionInExpand =
|
|
144
|
+
var isSelectionInExpand = isNestedInExpand(state);
|
|
148
145
|
var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
149
146
|
return expandType.createAndFill({});
|
|
150
147
|
};
|
|
151
|
-
export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI
|
|
148
|
+
export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
|
|
152
149
|
return function (inputMethod) {
|
|
153
150
|
return function (state, dispatch) {
|
|
154
|
-
var expandNode = createExpandNode(state
|
|
151
|
+
var expandNode = createExpandNode(state);
|
|
155
152
|
if (!expandNode) {
|
|
156
153
|
return false;
|
|
157
154
|
}
|
|
@@ -176,9 +173,9 @@ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(ed
|
|
|
176
173
|
};
|
|
177
174
|
};
|
|
178
175
|
};
|
|
179
|
-
export var insertExpand = function insertExpand(editorAnalyticsAPI
|
|
176
|
+
export var insertExpand = function insertExpand(editorAnalyticsAPI) {
|
|
180
177
|
return function (state, dispatch) {
|
|
181
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI
|
|
178
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
182
179
|
};
|
|
183
180
|
};
|
|
184
181
|
export var focusTitle = function focusTitle(pos) {
|
|
@@ -4,7 +4,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
6
6
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
|
|
9
8
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
10
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -13,13 +12,10 @@ import { getToolbarConfig } from './toolbar';
|
|
|
13
12
|
// Ignored via go/ees005
|
|
14
13
|
// eslint-disable-next-line prefer-const
|
|
15
14
|
export var expandPlugin = function expandPlugin(_ref) {
|
|
16
|
-
var _api$
|
|
15
|
+
var _api$analytics, _api$analytics2;
|
|
17
16
|
var _ref$config = _ref.config,
|
|
18
17
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
19
18
|
api = _ref.api;
|
|
20
|
-
// Confluence is injecting the FF through editor props, from an experiment
|
|
21
|
-
// Jira is pulling it in through platform feature flags, from a feature gate
|
|
22
|
-
var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
|
|
23
19
|
return {
|
|
24
20
|
name: 'expand',
|
|
25
21
|
nodes: function nodes() {
|
|
@@ -32,8 +28,8 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
32
28
|
}];
|
|
33
29
|
},
|
|
34
30
|
actions: {
|
|
35
|
-
insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
36
|
-
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
31
|
+
insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
|
|
32
|
+
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
|
|
37
33
|
},
|
|
38
34
|
pmPlugins: function pmPlugins() {
|
|
39
35
|
return [{
|
|
@@ -72,7 +68,7 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
72
68
|
},
|
|
73
69
|
action: function action(insert, state) {
|
|
74
70
|
var _api$analytics3;
|
|
75
|
-
var node = createExpandNode(state
|
|
71
|
+
var node = createExpandNode(state);
|
|
76
72
|
if (!node) {
|
|
77
73
|
return false;
|
|
78
74
|
}
|
|
@@ -3,7 +3,6 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { findExpand, transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { setExpandRef } from '../commands';
|
|
8
7
|
// Ignored via go/ees005
|
|
9
8
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -126,12 +125,6 @@ export function handleExpandDrag(view, event, slice) {
|
|
|
126
125
|
var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
|
|
127
126
|
var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
|
|
128
127
|
var isNodeBeingDroppedInsideNestedExpand = dropLocationNodeType === state.schema.nodes.nestedExpand || dropLocationParentNodeType === state.schema.nodes.nestedExpand;
|
|
129
|
-
if (editorExperiment('nested-expand-in-expand', false)) {
|
|
130
|
-
if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
|
|
131
|
-
event.preventDefault();
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
128
|
var updatedSlice = slice;
|
|
136
129
|
if (sliceContainsExpand && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
|
|
137
130
|
updatedSlice = transformSliceExpandToNestedExpand(slice);
|
|
@@ -12,18 +12,16 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
12
12
|
import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
13
13
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
15
|
import { isNestedInExpand } from '../utils';
|
|
17
16
|
|
|
18
17
|
// Creates either an expand or a nestedExpand node based on the current selection
|
|
19
18
|
export var createExpandNode = function createExpandNode(state) {
|
|
20
19
|
var setExpandedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
21
|
-
var isNestingExpandsSupported = arguments.length > 2 ? arguments[2] : undefined;
|
|
22
20
|
var _state$schema$nodes = state.schema.nodes,
|
|
23
21
|
expand = _state$schema$nodes.expand,
|
|
24
22
|
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
25
23
|
var isSelectionInTable = !!findTable(state.selection);
|
|
26
|
-
var isSelectionInExpand =
|
|
24
|
+
var isSelectionInExpand = isNestedInExpand(state);
|
|
27
25
|
var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
28
26
|
var expandNode = expandType.createAndFill({});
|
|
29
27
|
if (setExpandedState) {
|
|
@@ -33,10 +31,10 @@ export var createExpandNode = function createExpandNode(state) {
|
|
|
33
31
|
}
|
|
34
32
|
return expandNode;
|
|
35
33
|
};
|
|
36
|
-
export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI
|
|
34
|
+
export var insertExpandWithInputMethod = function insertExpandWithInputMethod(editorAnalyticsAPI) {
|
|
37
35
|
return function (inputMethod) {
|
|
38
36
|
return function (state, dispatch) {
|
|
39
|
-
var expandNode = createExpandNode(state, false
|
|
37
|
+
var expandNode = createExpandNode(state, false);
|
|
40
38
|
if (!expandNode) {
|
|
41
39
|
return false;
|
|
42
40
|
}
|
|
@@ -73,9 +71,9 @@ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(ed
|
|
|
73
71
|
};
|
|
74
72
|
};
|
|
75
73
|
};
|
|
76
|
-
export var insertExpand = function insertExpand(editorAnalyticsAPI
|
|
74
|
+
export var insertExpand = function insertExpand(editorAnalyticsAPI) {
|
|
77
75
|
return function (state, dispatch) {
|
|
78
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI
|
|
76
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
79
77
|
};
|
|
80
78
|
};
|
|
81
79
|
export var deleteExpand = function deleteExpand(editorAnalyticsAPI) {
|
|
@@ -105,12 +103,10 @@ export var deleteExpandAtPos = function deleteExpandAtPos(editorAnalyticsAPI) {
|
|
|
105
103
|
var tr = state.tr;
|
|
106
104
|
tr.delete(expandNodePos, expandNodePos + expandNode.nodeSize);
|
|
107
105
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
113
|
-
}
|
|
106
|
+
if (expandNode.type === state.schema.nodes.nestedExpand) {
|
|
107
|
+
var resolvedPos = tr.doc.resolve(expandNodePos + 1);
|
|
108
|
+
if (resolvedPos) {
|
|
109
|
+
tr.setSelection(Selection.near(resolvedPos, -1));
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
dispatch(tr);
|
|
@@ -4,7 +4,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
6
6
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './commands';
|
|
9
8
|
import { expandKeymap } from './pm-plugins/keymap';
|
|
10
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -13,13 +12,10 @@ import { getToolbarConfig } from './toolbar';
|
|
|
13
12
|
// Ignored via go/ees005
|
|
14
13
|
// eslint-disable-next-line prefer-const
|
|
15
14
|
export var expandPlugin = function expandPlugin(_ref) {
|
|
16
|
-
var _api$
|
|
15
|
+
var _api$analytics, _api$analytics2;
|
|
17
16
|
var _ref$config = _ref.config,
|
|
18
17
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
19
18
|
api = _ref.api;
|
|
20
|
-
// Confluence is injecting the FF through editor props, from an experiment
|
|
21
|
-
// Jira is pulling it in through platform feature flags, from a feature gate
|
|
22
|
-
var isNestingExpandsSupported = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 || (_api$featureFlags = _api$featureFlags.sharedState.currentState()) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.nestedExpandInExpandEx) || fg('platform_editor_nest_nested_expand_in_expand_jira');
|
|
23
19
|
return {
|
|
24
20
|
name: 'expand',
|
|
25
21
|
nodes: function nodes() {
|
|
@@ -32,8 +28,8 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
32
28
|
}];
|
|
33
29
|
},
|
|
34
30
|
actions: {
|
|
35
|
-
insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
36
|
-
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
31
|
+
insertExpand: insertExpand(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions),
|
|
32
|
+
insertExpandWithInputMethod: insertExpandWithInputMethod(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)
|
|
37
33
|
},
|
|
38
34
|
pmPlugins: function pmPlugins() {
|
|
39
35
|
return [{
|
|
@@ -72,7 +68,7 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
72
68
|
},
|
|
73
69
|
action: function action(insert, state) {
|
|
74
70
|
var _api$analytics3;
|
|
75
|
-
var node = createExpandNode(state, undefined
|
|
71
|
+
var node = createExpandNode(state, undefined);
|
|
76
72
|
if (!node) {
|
|
77
73
|
return false;
|
|
78
74
|
}
|
|
@@ -3,7 +3,6 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
// Ignored via go/ees005
|
|
8
7
|
// eslint-disable-next-line import/no-named-as-default
|
|
9
8
|
import ExpandNodeView from '../node-views';
|
|
@@ -107,12 +106,6 @@ export function handleExpandDrag(view, event, slice) {
|
|
|
107
106
|
var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
|
|
108
107
|
var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
|
|
109
108
|
var isNodeBeingDroppedInsideNestedExpand = dropLocationNodeType === state.schema.nodes.nestedExpand || dropLocationParentNodeType === state.schema.nodes.nestedExpand;
|
|
110
|
-
if (editorExperiment('nested-expand-in-expand', false)) {
|
|
111
|
-
if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
|
|
112
|
-
event.preventDefault();
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
109
|
var updatedSlice = slice;
|
|
117
110
|
if (sliceContainsExpand && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
|
|
118
111
|
updatedSlice = transformSliceExpandToNestedExpand(slice);
|
|
@@ -18,9 +18,9 @@ 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
|
|
22
|
-
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
23
|
-
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
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;
|
|
24
24
|
export declare const focusTitle: (pos: number) => Command;
|
|
25
25
|
export declare const focusIcon: (expand: Node) => Command;
|
|
26
26
|
export declare const setSelectionInsideExpand: (expandPos: number) => Command;
|
|
@@ -3,9 +3,9 @@ import type { Command } 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, setExpandedState?: boolean
|
|
7
|
-
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
8
|
-
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
6
|
+
export declare const createExpandNode: (state: EditorState, setExpandedState?: boolean) => PMNode | null;
|
|
7
|
+
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
|
|
8
|
+
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => 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;
|
|
@@ -18,9 +18,9 @@ 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
|
|
22
|
-
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
23
|
-
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
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;
|
|
24
24
|
export declare const focusTitle: (pos: number) => Command;
|
|
25
25
|
export declare const focusIcon: (expand: Node) => Command;
|
|
26
26
|
export declare const setSelectionInsideExpand: (expandPos: number) => Command;
|
|
@@ -3,9 +3,9 @@ import type { Command } 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, setExpandedState?: boolean
|
|
7
|
-
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
8
|
-
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined
|
|
6
|
+
export declare const createExpandNode: (state: EditorState, setExpandedState?: boolean) => PMNode | null;
|
|
7
|
+
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
|
|
8
|
+
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => 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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
37
|
"@atlaskit/button": "^23.0.0",
|
|
38
|
-
"@atlaskit/editor-common": "^103.
|
|
38
|
+
"@atlaskit/editor-common": "^103.9.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
48
48
|
"@atlaskit/icon": "^25.6.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^4.12.0",
|
|
51
51
|
"@atlaskit/tokens": "^4.8.0",
|
|
52
52
|
"@atlaskit/tooltip": "^20.0.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
65
65
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
66
66
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
67
|
-
"@atlaskit/editor-plugin-quick-insert": "^2.
|
|
67
|
+
"@atlaskit/editor-plugin-quick-insert": "^2.4.0",
|
|
68
68
|
"@atlaskit/editor-plugin-table": "^10.8.0",
|
|
69
|
-
"@atlaskit/editor-plugin-type-ahead": "^2.
|
|
69
|
+
"@atlaskit/editor-plugin-type-ahead": "^2.5.0",
|
|
70
70
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
71
71
|
"@testing-library/react": "^13.4.0",
|
|
72
72
|
"react-test-renderer": "^18.2.0",
|
|
@@ -115,9 +115,6 @@
|
|
|
115
115
|
"platform_editor_disable_unnecessary_expand_renders": {
|
|
116
116
|
"type": "boolean"
|
|
117
117
|
},
|
|
118
|
-
"platform_editor_nest_nested_expand_in_expand_jira": {
|
|
119
|
-
"type": "boolean"
|
|
120
|
-
},
|
|
121
118
|
"platform_editor_long_node_expand": {
|
|
122
119
|
"type": "boolean",
|
|
123
120
|
"referenceOnly": true
|