@atlaskit/editor-plugin-expand 27.0.3 → 27.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/legacyExpand/commands.js +27 -25
- package/dist/cjs/legacyExpand/nodeviews/index.js +34 -31
- package/dist/cjs/legacyExpand/plugin.js +16 -15
- package/dist/cjs/legacyExpand/pm-plugins/keymap.js +6 -4
- package/dist/cjs/legacyExpand/pm-plugins/main.js +6 -6
- package/dist/cjs/legacyExpand/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/legacyExpand/ui/ExpandIconButton.js +9 -9
- package/dist/cjs/singlePlayerExpand/commands.js +33 -31
- package/dist/cjs/singlePlayerExpand/node-views/index.js +18 -15
- package/dist/cjs/singlePlayerExpand/plugin.js +16 -15
- package/dist/cjs/singlePlayerExpand/pm-plugins/keymap.js +6 -4
- package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +6 -6
- package/dist/cjs/singlePlayerExpand/ui/ExpandButton.js +9 -9
- package/dist/cjs/singlePlayerExpand/ui/NodeView.js +16 -16
- package/dist/cjs/ui/ExpandBlockMenuItem.js +7 -7
- package/dist/cjs/ui/quick-insert/ExpandQuickInsertMenuItem.js +15 -15
- package/dist/cjs/ui/quick-insert/getExpandQuickInsertComponents.js +3 -3
- package/dist/es2019/legacyExpand/commands.js +6 -4
- package/dist/es2019/legacyExpand/nodeviews/index.js +7 -4
- package/dist/es2019/legacyExpand/plugin.js +5 -4
- package/dist/es2019/legacyExpand/pm-plugins/keymap.js +3 -1
- package/dist/es2019/legacyExpand/pm-plugins/main.js +1 -1
- package/dist/es2019/legacyExpand/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/legacyExpand/ui/ExpandIconButton.js +3 -3
- package/dist/es2019/singlePlayerExpand/commands.js +6 -4
- package/dist/es2019/singlePlayerExpand/node-views/index.js +6 -3
- package/dist/es2019/singlePlayerExpand/plugin.js +5 -4
- package/dist/es2019/singlePlayerExpand/pm-plugins/keymap.js +3 -1
- package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +1 -1
- package/dist/es2019/singlePlayerExpand/ui/ExpandButton.js +3 -3
- package/dist/es2019/singlePlayerExpand/ui/NodeView.js +2 -2
- package/dist/es2019/ui/ExpandBlockMenuItem.js +3 -3
- package/dist/es2019/ui/quick-insert/ExpandQuickInsertMenuItem.js +4 -4
- package/dist/es2019/ui/quick-insert/getExpandQuickInsertComponents.js +1 -1
- package/dist/esm/legacyExpand/commands.js +6 -4
- package/dist/esm/legacyExpand/nodeviews/index.js +7 -4
- package/dist/esm/legacyExpand/plugin.js +5 -4
- package/dist/esm/legacyExpand/pm-plugins/keymap.js +3 -1
- package/dist/esm/legacyExpand/pm-plugins/main.js +1 -1
- package/dist/esm/legacyExpand/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/legacyExpand/ui/ExpandIconButton.js +3 -3
- package/dist/esm/singlePlayerExpand/commands.js +6 -4
- package/dist/esm/singlePlayerExpand/node-views/index.js +6 -3
- package/dist/esm/singlePlayerExpand/plugin.js +5 -4
- package/dist/esm/singlePlayerExpand/pm-plugins/keymap.js +3 -1
- package/dist/esm/singlePlayerExpand/pm-plugins/main.js +1 -1
- package/dist/esm/singlePlayerExpand/ui/ExpandButton.js +3 -3
- package/dist/esm/singlePlayerExpand/ui/NodeView.js +2 -2
- package/dist/esm/ui/ExpandBlockMenuItem.js +3 -3
- package/dist/esm/ui/quick-insert/ExpandQuickInsertMenuItem.js +4 -4
- package/dist/esm/ui/quick-insert/getExpandQuickInsertComponents.js +1 -1
- package/dist/types/legacyExpand/commands.d.ts +3 -2
- package/dist/types/legacyExpand/nodeviews/index.d.ts +4 -3
- package/dist/types/legacyExpand/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/legacyExpand/pm-plugins/main.d.ts +3 -2
- package/dist/types/legacyExpand/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/legacyExpand/toolbar.d.ts +2 -1
- package/dist/types/singlePlayerExpand/commands.d.ts +4 -3
- package/dist/types/singlePlayerExpand/node-views/index.d.ts +4 -3
- package/dist/types/singlePlayerExpand/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/singlePlayerExpand/pm-plugins/main.d.ts +3 -2
- package/dist/types/singlePlayerExpand/toolbar.d.ts +2 -1
- package/dist/types/types.d.ts +16 -13
- package/dist/types/ui/ExpandBlockMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/ExpandQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/getExpandQuickInsertComponents.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,15 +7,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.updateExpandTitle = exports.toggleExpandWithMatch = exports.toggleExpandExpanded = exports.setSelectionInsideExpand = exports.setExpandRef = exports.insertExpandWithInputMethod = exports.insertExpand = exports.focusTitle = exports.focusIcon = exports.deleteExpandAtPos = exports.deleteExpand = exports.createExpandNode = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _setAttrs = require("@atlaskit/adf-schema/steps/set-attrs");
|
|
10
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _generalEvents = require("@atlaskit/editor-common/analytics/types/general-events");
|
|
11
12
|
var _selection2 = require("@atlaskit/editor-common/selection");
|
|
12
|
-
var
|
|
13
|
+
var _selection3 = require("@atlaskit/editor-common/selection/gap-cursor/selection");
|
|
14
|
+
var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
13
15
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
14
|
-
var
|
|
16
|
+
var _createWrapSelectionTransaction = require("@atlaskit/editor-common/utils/create-wrap-selection-transaction");
|
|
15
17
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
18
|
+
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
19
|
+
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
20
|
+
var _utils3 = require("../utils");
|
|
19
21
|
var _pluginFactory = require("./pm-plugins/plugin-factory");
|
|
20
22
|
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; }
|
|
21
23
|
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; }
|
|
@@ -36,12 +38,12 @@ var deleteExpandAtPos = exports.deleteExpandAtPos = function deleteExpandAtPos(e
|
|
|
36
38
|
return false;
|
|
37
39
|
}
|
|
38
40
|
var payload = {
|
|
39
|
-
action:
|
|
40
|
-
actionSubject: expandNode.type === state.schema.nodes.expand ?
|
|
41
|
+
action: _enums.ACTION.DELETED,
|
|
42
|
+
actionSubject: expandNode.type === state.schema.nodes.expand ? _enums.ACTION_SUBJECT.EXPAND : _enums.ACTION_SUBJECT.NESTED_EXPAND,
|
|
41
43
|
attributes: {
|
|
42
|
-
inputMethod:
|
|
44
|
+
inputMethod: _enums.INPUT_METHOD.FLOATING_TB
|
|
43
45
|
},
|
|
44
|
-
eventType:
|
|
46
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
45
47
|
};
|
|
46
48
|
if (expandNode && dispatch) {
|
|
47
49
|
var tr = state.tr;
|
|
@@ -115,20 +117,20 @@ var toggleExpandExpanded = exports.toggleExpandExpanded = function toggleExpandE
|
|
|
115
117
|
// Move to a right gap cursor, if the toolbar is interacted (or an API),
|
|
116
118
|
// it will insert below rather than inside (which will be invisible).
|
|
117
119
|
if (__livePage ? isExpandedNext === true : isExpandedNext === false && (0, _transforms.findExpand)(state)) {
|
|
118
|
-
tr.setSelection(new
|
|
120
|
+
tr.setSelection(new _selection3.GapCursorSelection(tr.doc.resolve(pos + node.nodeSize), _selection2.Side.RIGHT));
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
// log when people open/close expands
|
|
122
124
|
// TODO: ED-8523 - make platform/mode global attributes?
|
|
123
125
|
var payload = {
|
|
124
|
-
action:
|
|
125
|
-
actionSubject: nodeType === state.schema.nodes.expand ?
|
|
126
|
+
action: _enums.ACTION.TOGGLE_EXPAND,
|
|
127
|
+
actionSubject: nodeType === state.schema.nodes.expand ? _enums.ACTION_SUBJECT.EXPAND : _enums.ACTION_SUBJECT.NESTED_EXPAND,
|
|
126
128
|
attributes: {
|
|
127
|
-
platform:
|
|
128
|
-
mode:
|
|
129
|
+
platform: _generalEvents.PLATFORMS.WEB,
|
|
130
|
+
mode: _generalEvents.MODE.EDITOR,
|
|
129
131
|
expanded: __livePage ? !isExpandedNext : isExpandedNext
|
|
130
132
|
},
|
|
131
|
-
eventType:
|
|
133
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
132
134
|
};
|
|
133
135
|
|
|
134
136
|
// `isRemote` meta prevents this step from being
|
|
@@ -146,8 +148,8 @@ var createExpandNode = exports.createExpandNode = function createExpandNode(stat
|
|
|
146
148
|
var _state$schema$nodes = state.schema.nodes,
|
|
147
149
|
expand = _state$schema$nodes.expand,
|
|
148
150
|
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
149
|
-
var isSelectionInTable = !!(0,
|
|
150
|
-
var isSelectionInExpand = (0,
|
|
151
|
+
var isSelectionInTable = !!(0, _utils2.findTable)(state.selection);
|
|
152
|
+
var isSelectionInExpand = (0, _utils3.isNestedInExpand)(state);
|
|
151
153
|
var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
|
|
152
154
|
return expandType.createAndFill({});
|
|
153
155
|
};
|
|
@@ -158,18 +160,18 @@ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function
|
|
|
158
160
|
if (!expandNode) {
|
|
159
161
|
return false;
|
|
160
162
|
}
|
|
161
|
-
var tr = state.selection.empty ? (0,
|
|
163
|
+
var tr = state.selection.empty ? (0, _utils.safeInsert)(expandNode)(state.tr).scrollIntoView() : (0, _createWrapSelectionTransaction.createWrapSelectionTransaction)({
|
|
162
164
|
state: state,
|
|
163
165
|
type: expandNode.type
|
|
164
166
|
});
|
|
165
167
|
var payload = {
|
|
166
|
-
action:
|
|
167
|
-
actionSubject:
|
|
168
|
-
actionSubjectId: (expandNode === null || expandNode === void 0 ? void 0 : expandNode.type) === state.schema.nodes.expand ?
|
|
168
|
+
action: _enums.ACTION.INSERTED,
|
|
169
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
170
|
+
actionSubjectId: (expandNode === null || expandNode === void 0 ? void 0 : expandNode.type) === state.schema.nodes.expand ? _enums.ACTION_SUBJECT_ID.EXPAND : _enums.ACTION_SUBJECT_ID.NESTED_EXPAND,
|
|
169
171
|
attributes: {
|
|
170
172
|
inputMethod: inputMethod
|
|
171
173
|
},
|
|
172
|
-
eventType:
|
|
174
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
173
175
|
};
|
|
174
176
|
if (dispatch && expandNode) {
|
|
175
177
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(payload)(tr);
|
|
@@ -181,7 +183,7 @@ var insertExpandWithInputMethod = exports.insertExpandWithInputMethod = function
|
|
|
181
183
|
};
|
|
182
184
|
var insertExpand = exports.insertExpand = function insertExpand(editorAnalyticsAPI) {
|
|
183
185
|
return function (state, dispatch) {
|
|
184
|
-
return insertExpandWithInputMethod(editorAnalyticsAPI)(
|
|
186
|
+
return insertExpandWithInputMethod(editorAnalyticsAPI)(_enums.INPUT_METHOD.INSERT_MENU)(state, dispatch);
|
|
185
187
|
};
|
|
186
188
|
};
|
|
187
189
|
var focusTitle = exports.focusTitle = function focusTitle(pos) {
|
|
@@ -206,7 +208,7 @@ var focusIcon = exports.focusIcon = function focusIcon(expand) {
|
|
|
206
208
|
if (!(expand instanceof HTMLElement)) {
|
|
207
209
|
return false;
|
|
208
210
|
}
|
|
209
|
-
var iconContainer = expand.querySelector(".".concat(
|
|
211
|
+
var iconContainer = expand.querySelector(".".concat(_expand.expandClassNames.iconContainer));
|
|
210
212
|
if (iconContainer && iconContainer.focus) {
|
|
211
213
|
var tr = state.tr;
|
|
212
214
|
var pos = state.selection.from;
|
|
@@ -15,10 +15,13 @@ var _uuid = require("uuid");
|
|
|
15
15
|
var _w3cKeyname = require("w3c-keyname");
|
|
16
16
|
var _surfaceKeys = require("@atlaskit/editor-common/block-controls/surface-keys");
|
|
17
17
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var _selection2 = require("@atlaskit/editor-common/selection/gap-cursor/selection");
|
|
19
|
+
var _types = require("@atlaskit/editor-common/selection/types");
|
|
20
|
+
var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
21
|
+
var _uiExpand = require("@atlaskit/editor-common/ui-expand");
|
|
20
22
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
21
23
|
var _contentVisibility = require("@atlaskit/editor-common/utils/content-visibility");
|
|
24
|
+
var _dom2 = require("@atlaskit/editor-common/utils/dom");
|
|
22
25
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
23
26
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
24
27
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
@@ -31,13 +34,13 @@ var _ExpandIconButton = require("../ui/ExpandIconButton");
|
|
|
31
34
|
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; }
|
|
32
35
|
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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
33
36
|
function buildExpandClassName(type, expanded) {
|
|
34
|
-
return "".concat(
|
|
37
|
+
return "".concat(_expand.expandClassNames.prefix, " ").concat(_expand.expandClassNames.type(type), " ").concat(expanded ? _expand.expandClassNames.expanded : '');
|
|
35
38
|
}
|
|
36
39
|
function getExpandBodyAriaLabel(title, intl) {
|
|
37
|
-
var safeTitle = title.trim() || (intl === null || intl === void 0 ? void 0 : intl.formatMessage(
|
|
38
|
-
return (intl === null || intl === void 0 ? void 0 : intl.formatMessage(
|
|
40
|
+
var safeTitle = title.trim() || (intl === null || intl === void 0 ? void 0 : intl.formatMessage(_uiExpand.messages.expandBodyAriaLabelUntitled)) || _uiExpand.messages.expandBodyAriaLabelUntitled.defaultMessage;
|
|
41
|
+
return (intl === null || intl === void 0 ? void 0 : intl.formatMessage(_uiExpand.messages.expandBodyAriaLabel, {
|
|
39
42
|
title: safeTitle
|
|
40
|
-
})) ||
|
|
43
|
+
})) || _uiExpand.messages.expandBodyAriaLabel.defaultMessage.replace('{title}', safeTitle);
|
|
41
44
|
}
|
|
42
45
|
var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditable) {
|
|
43
46
|
var _node$attrs$title, _intl$formatMessage;
|
|
@@ -50,7 +53,7 @@ var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditabl
|
|
|
50
53
|
'data-local-id': node.attrs.localId
|
|
51
54
|
}), ['div', {
|
|
52
55
|
// prettier-ignore
|
|
53
|
-
'class':
|
|
56
|
+
'class': _expand.expandClassNames.titleContainer,
|
|
54
57
|
contenteditable: 'false',
|
|
55
58
|
// Element gains access to focus events.
|
|
56
59
|
// This is needed to prevent PM gaining access
|
|
@@ -59,31 +62,31 @@ var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditabl
|
|
|
59
62
|
},
|
|
60
63
|
// prettier-ignore
|
|
61
64
|
['div', {
|
|
62
|
-
'class':
|
|
65
|
+
'class': _expand.expandClassNames.icon,
|
|
63
66
|
style: "display: flex; width: ".concat("var(--ds-space-300, 24px)", "; height: ", "var(--ds-space-300, 24px)")
|
|
64
67
|
}], ['div', {
|
|
65
68
|
// prettier-ignore
|
|
66
|
-
'class':
|
|
69
|
+
'class': _expand.expandClassNames.inputContainer
|
|
67
70
|
}, ['input', {
|
|
68
71
|
// prettier-ignore
|
|
69
|
-
'class':
|
|
70
|
-
'aria-label': intl && intl.formatMessage(
|
|
72
|
+
'class': _expand.expandClassNames.titleInput,
|
|
73
|
+
'aria-label': intl && intl.formatMessage(_uiExpand.messages.expandArialabel) || _uiExpand.messages.expandArialabel.defaultMessage,
|
|
71
74
|
value: node.attrs.title,
|
|
72
|
-
placeholder: intl && intl.formatMessage(
|
|
75
|
+
placeholder: intl && intl.formatMessage(_uiExpand.messages.expandPlaceholderText) || _uiExpand.messages.expandPlaceholderText.defaultMessage,
|
|
73
76
|
type: 'text',
|
|
74
77
|
readonly: titleReadOnly ? 'true' : undefined
|
|
75
78
|
}]]], [(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_expand_content_a11y_2') ? 'section' : 'div', _objectSpread(_objectSpread({
|
|
76
79
|
// prettier-ignore
|
|
77
|
-
class: "".concat(
|
|
80
|
+
class: "".concat(_expand.expandClassNames.content, " ").concat((__livePage ? !node.attrs.__expanded : node.attrs.__expanded) ? '' : _expand.expandClassNames.contentCollapsed),
|
|
78
81
|
contenteditable: contentEditable !== undefined ? contentEditable ? 'true' : 'false' : undefined
|
|
79
82
|
}, !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_expand_content_a11y_2') && {
|
|
80
83
|
role: 'textbox',
|
|
81
84
|
'aria-multiline': 'true',
|
|
82
|
-
'aria-label': intl && intl.formatMessage(
|
|
85
|
+
'aria-label': intl && intl.formatMessage(_uiExpand.messages.expandBodyAriaLabelOriginal) || _uiExpand.messages.expandBodyAriaLabelOriginal.defaultMessage
|
|
83
86
|
}), (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_expand_content_a11y_2') && {
|
|
84
87
|
'aria-label': getExpandBodyAriaLabel((_node$attrs$title = node.attrs.title) !== null && _node$attrs$title !== void 0 ? _node$attrs$title : '', intl),
|
|
85
|
-
'aria-description': (intl === null || intl === void 0 ? void 0 : intl.formatMessage(
|
|
86
|
-
'aria-roledescription': (_intl$formatMessage = intl === null || intl === void 0 ? void 0 : intl.formatMessage(
|
|
88
|
+
'aria-description': (intl === null || intl === void 0 ? void 0 : intl.formatMessage(_uiExpand.messages.expandBodyAriaDescription)) || _uiExpand.messages.expandBodyAriaDescription.defaultMessage,
|
|
89
|
+
'aria-roledescription': (_intl$formatMessage = intl === null || intl === void 0 ? void 0 : intl.formatMessage(_uiExpand.messages.expandBodyRoleDescription)) !== null && _intl$formatMessage !== void 0 ? _intl$formatMessage : _uiExpand.messages.expandBodyRoleDescription.defaultMessage
|
|
87
90
|
}), 0]];
|
|
88
91
|
};
|
|
89
92
|
var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
@@ -103,7 +106,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
103
106
|
dispatch = _this$view.dispatch;
|
|
104
107
|
if (_this.selectNearNode) {
|
|
105
108
|
var tr = _this.selectNearNode({
|
|
106
|
-
selectionRelativeToNode:
|
|
109
|
+
selectionRelativeToNode: _types.RelativeSelectionPos.Start
|
|
107
110
|
})(state);
|
|
108
111
|
if (dispatch) {
|
|
109
112
|
dispatch(tr);
|
|
@@ -140,7 +143,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
140
143
|
var _this$view2 = _this.view,
|
|
141
144
|
state = _this$view2.state,
|
|
142
145
|
dispatch = _this$view2.dispatch;
|
|
143
|
-
if ((0,
|
|
146
|
+
if ((0, _dom2.closestElement)(target, ".".concat(_expand.expandClassNames.icon))) {
|
|
144
147
|
var _this$api;
|
|
145
148
|
if (!_this.allowInteractiveExpand) {
|
|
146
149
|
return;
|
|
@@ -388,7 +391,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
388
391
|
dispatch = _this$view6.dispatch;
|
|
389
392
|
event.preventDefault();
|
|
390
393
|
_this.view.focus();
|
|
391
|
-
dispatch(state.tr.setSelection(new
|
|
394
|
+
dispatch(state.tr.setSelection(new _selection2.GapCursorSelection(state.doc.resolve(_this.node.nodeSize + pos), _selection.Side.RIGHT)));
|
|
392
395
|
}
|
|
393
396
|
});
|
|
394
397
|
(0, _defineProperty2.default)(this, "moveToPreviousLine", function (event) {
|
|
@@ -439,7 +442,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
439
442
|
state = _this$view8.state,
|
|
440
443
|
dispatch = _this$view8.dispatch;
|
|
441
444
|
_this.view.focus();
|
|
442
|
-
dispatch(state.tr.setSelection(new
|
|
445
|
+
dispatch(state.tr.setSelection(new _selection2.GapCursorSelection(state.doc.resolve(pos), _selection.Side.LEFT)));
|
|
443
446
|
}
|
|
444
447
|
});
|
|
445
448
|
(0, _defineProperty2.default)(this, "handleArrowRightFromTitle", function (event) {
|
|
@@ -461,7 +464,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
461
464
|
dispatch = _this$view9.dispatch;
|
|
462
465
|
_this.view.focus();
|
|
463
466
|
var tr = _this.selectNearNode({
|
|
464
|
-
selectionRelativeToNode:
|
|
467
|
+
selectionRelativeToNode: _types.RelativeSelectionPos.End,
|
|
465
468
|
selection: _state.NodeSelection.create(state.doc, pos)
|
|
466
469
|
})(state);
|
|
467
470
|
if (dispatch) {
|
|
@@ -493,14 +496,14 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
493
496
|
if ((selectionSharedState === null || selectionSharedState === void 0 ? void 0 : selectionSharedState.selectionRelativeToNode) === undefined) {
|
|
494
497
|
var tr = _this.selectNearNode({
|
|
495
498
|
selectionRelativeToNode: undefined,
|
|
496
|
-
selection: new
|
|
499
|
+
selection: new _selection2.GapCursorSelection(state.doc.resolve(pos), _selection.Side.LEFT)
|
|
497
500
|
})(state);
|
|
498
501
|
if (dispatch) {
|
|
499
502
|
dispatch(tr);
|
|
500
503
|
}
|
|
501
504
|
} else {
|
|
502
505
|
var _tr = _this.selectNearNode({
|
|
503
|
-
selectionRelativeToNode:
|
|
506
|
+
selectionRelativeToNode: _types.RelativeSelectionPos.Start,
|
|
504
507
|
selection: _state.NodeSelection.create(state.doc, pos)
|
|
505
508
|
})(state);
|
|
506
509
|
if (dispatch) {
|
|
@@ -553,10 +556,10 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
553
556
|
this.contentDOM = contentDOM;
|
|
554
557
|
this.isMobile = isMobile;
|
|
555
558
|
this.api = api;
|
|
556
|
-
this.icon = this.dom.querySelector(".".concat(
|
|
557
|
-
this.input = this.dom.querySelector(".".concat(
|
|
558
|
-
this.titleContainer = this.dom.querySelector(".".concat(
|
|
559
|
-
this.content = this.dom.querySelector(".".concat(
|
|
559
|
+
this.icon = this.dom.querySelector(".".concat(_expand.expandClassNames.icon));
|
|
560
|
+
this.input = this.dom.querySelector(".".concat(_expand.expandClassNames.titleInput));
|
|
561
|
+
this.titleContainer = this.dom.querySelector(".".concat(_expand.expandClassNames.titleContainer));
|
|
562
|
+
this.content = this.dom.querySelector(".".concat(_expand.expandClassNames.content));
|
|
560
563
|
(0, _contentVisibility.applyContentVisibility)(this.dom, this.isLimitedModeEnabled(), function () {
|
|
561
564
|
return {
|
|
562
565
|
height: (0, _contentVisibility.estimateExpandIntrinsicHeight)(_this.node, !_this.isCollapsed())
|
|
@@ -636,9 +639,9 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
636
639
|
var isCollapsed = this.__livePage ? node.attrs.__expanded : !node.attrs.__expanded;
|
|
637
640
|
if (this.content) {
|
|
638
641
|
if (isCollapsed) {
|
|
639
|
-
this.content.classList.add(
|
|
642
|
+
this.content.classList.add(_expand.expandClassNames.contentCollapsed);
|
|
640
643
|
} else {
|
|
641
|
-
this.content.classList.remove(
|
|
644
|
+
this.content.classList.remove(_expand.expandClassNames.contentCollapsed);
|
|
642
645
|
}
|
|
643
646
|
}
|
|
644
647
|
// Collapsed vs expanded changes the reserved height, so re-apply the intrinsic-size estimate.
|
|
@@ -667,7 +670,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
667
670
|
// Ignored via go/ees005
|
|
668
671
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
669
672
|
var target = event.target;
|
|
670
|
-
return target === this.input || target === this.icon || !!(0,
|
|
673
|
+
return target === this.input || target === this.icon || !!(0, _dom2.closestElement)(target, ".".concat(_expand.expandClassNames.icon));
|
|
671
674
|
}
|
|
672
675
|
}, {
|
|
673
676
|
key: "ignoreMutation",
|
|
@@ -699,7 +702,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
699
702
|
// Instead of re-rendering the view on an expand toggle
|
|
700
703
|
// we toggle a class name to hide the content and animate the chevron.
|
|
701
704
|
if (this.dom) {
|
|
702
|
-
this.dom.classList.toggle(
|
|
705
|
+
this.dom.classList.toggle(_expand.expandClassNames.expanded);
|
|
703
706
|
this.renderIcon(this.intl, node);
|
|
704
707
|
}
|
|
705
708
|
if (this.content) {
|
|
@@ -9,11 +9,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _expand = require("@atlaskit/adf-schema/expand");
|
|
11
11
|
var _nestedExpand = require("@atlaskit/adf-schema/nested-expand");
|
|
12
|
-
var
|
|
12
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
13
13
|
var _assets = require("@atlaskit/editor-common/assets");
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
14
|
+
var _key = require("@atlaskit/editor-common/block-menu/key");
|
|
15
|
+
var _rank = require("@atlaskit/editor-common/block-menu/rank");
|
|
16
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
17
|
+
var _createWrapSelectionTransaction = require("@atlaskit/editor-common/utils/create-wrap-selection-transaction");
|
|
17
18
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
18
19
|
var _toggleExpandRange = require("../editor-commands/toggleExpandRange");
|
|
19
20
|
var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
|
|
@@ -35,11 +36,11 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
35
36
|
var isRegisteredSlashCommandEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command');
|
|
36
37
|
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
|
|
37
38
|
type: 'block-menu-item',
|
|
38
|
-
key:
|
|
39
|
+
key: _key.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key,
|
|
39
40
|
parent: {
|
|
40
41
|
type: 'block-menu-section',
|
|
41
|
-
key:
|
|
42
|
-
rank:
|
|
42
|
+
key: _key.TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
43
|
+
rank: _rank.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_key.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]
|
|
43
44
|
},
|
|
44
45
|
component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api),
|
|
45
46
|
isHidden: function isHidden() {
|
|
@@ -110,8 +111,8 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
110
111
|
}
|
|
111
112
|
return [{
|
|
112
113
|
id: 'expand',
|
|
113
|
-
title: formatMessage(
|
|
114
|
-
description: formatMessage(
|
|
114
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.expand),
|
|
115
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.expandDescription),
|
|
115
116
|
keywords: ['accordion', 'collapse'],
|
|
116
117
|
priority: 600,
|
|
117
118
|
icon: function icon() {
|
|
@@ -123,18 +124,18 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
123
124
|
if (!node) {
|
|
124
125
|
return false;
|
|
125
126
|
}
|
|
126
|
-
var tr = state.selection.empty ? insert(node) : (0,
|
|
127
|
+
var tr = state.selection.empty ? insert(node) : (0, _createWrapSelectionTransaction.createWrapSelectionTransaction)({
|
|
127
128
|
state: state,
|
|
128
129
|
type: node.type
|
|
129
130
|
});
|
|
130
131
|
api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 || _api$analytics3.actions.attachAnalyticsEvent({
|
|
131
|
-
action:
|
|
132
|
-
actionSubject:
|
|
133
|
-
actionSubjectId: node.type === state.schema.nodes.nestedExpand ?
|
|
132
|
+
action: _enums.ACTION.INSERTED,
|
|
133
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
134
|
+
actionSubjectId: node.type === state.schema.nodes.nestedExpand ? _enums.ACTION_SUBJECT_ID.NESTED_EXPAND : _enums.ACTION_SUBJECT_ID.EXPAND,
|
|
134
135
|
attributes: {
|
|
135
|
-
inputMethod:
|
|
136
|
+
inputMethod: _enums.INPUT_METHOD.QUICK_INSERT
|
|
136
137
|
},
|
|
137
|
-
eventType:
|
|
138
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
138
139
|
})(tr);
|
|
139
140
|
return tr;
|
|
140
141
|
}
|
|
@@ -7,6 +7,8 @@ exports.expandKeymap = expandKeymap;
|
|
|
7
7
|
var _expand2 = require("@atlaskit/editor-common/expand");
|
|
8
8
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
9
9
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
10
|
+
var _selection2 = require("@atlaskit/editor-common/selection/gap-cursor/selection");
|
|
11
|
+
var _types = require("@atlaskit/editor-common/selection/types");
|
|
10
12
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
11
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
14
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
@@ -33,7 +35,7 @@ function expandKeymap(api, options) {
|
|
|
33
35
|
var selection = state.selection;
|
|
34
36
|
var selectionSharedState = (api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.currentState()) || {};
|
|
35
37
|
var selectionRelativeToNode = selectionSharedState.selectionRelativeToNode;
|
|
36
|
-
if (isExpandSelected(selection) && selectionRelativeToNode ===
|
|
38
|
+
if (isExpandSelected(selection) && selectionRelativeToNode === _types.RelativeSelectionPos.Start) {
|
|
37
39
|
return (0, _commands.focusTitle)(selection.from + 1)(state, dispatch, editorView);
|
|
38
40
|
}
|
|
39
41
|
return false;
|
|
@@ -49,7 +51,7 @@ function expandKeymap(api, options) {
|
|
|
49
51
|
var selection = state.selection;
|
|
50
52
|
var selectionSharedState = (api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.currentState()) || {};
|
|
51
53
|
var selectionRelativeToNode = selectionSharedState.selectionRelativeToNode;
|
|
52
|
-
if (isExpandSelected(selection) && (selectionRelativeToNode === undefined || selectionRelativeToNode ===
|
|
54
|
+
if (isExpandSelected(selection) && (selectionRelativeToNode === undefined || selectionRelativeToNode === _types.RelativeSelectionPos.End)) {
|
|
53
55
|
return (0, _commands.focusTitle)(selection.from + 1)(state, dispatch, editorView);
|
|
54
56
|
}
|
|
55
57
|
return false;
|
|
@@ -93,7 +95,7 @@ function expandKeymap(api, options) {
|
|
|
93
95
|
var selection = state.selection,
|
|
94
96
|
schema = state.schema;
|
|
95
97
|
var nodeBefore = selection.$from.nodeBefore;
|
|
96
|
-
if (selection instanceof
|
|
98
|
+
if (selection instanceof _selection2.GapCursorSelection && selection.side === _selection.Side.RIGHT && nodeBefore && (nodeBefore.type === schema.nodes.expand || nodeBefore.type === schema.nodes.nestedExpand) && (options.__livePage ? nodeBefore.attrs.__expanded : !nodeBefore.attrs.__expanded)) {
|
|
97
99
|
var _$from = selection.$from;
|
|
98
100
|
return (0, _commands.focusTitle)(Math.max(_$from.pos - 1, 0))(state, dispatch, editorView);
|
|
99
101
|
}
|
|
@@ -141,7 +143,7 @@ function expandKeymap(api, options) {
|
|
|
141
143
|
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
142
144
|
var selection = state.selection;
|
|
143
145
|
var nodeAfter = selection.$from.nodeAfter;
|
|
144
|
-
if (selection instanceof
|
|
146
|
+
if (selection instanceof _selection2.GapCursorSelection && selection.side === _selection.Side.LEFT && nodeAfter && (nodeAfter.type === expand || nodeAfter.type === nestedExpand) && (options.__livePage ? nodeAfter.attrs.__expanded : !nodeAfter.attrs.__expanded)) {
|
|
145
147
|
var $from = selection.$from;
|
|
146
148
|
return (0, _commands.focusTitle)($from.pos + 1)(state, dispatch, editorView);
|
|
147
149
|
}
|
|
@@ -9,7 +9,7 @@ exports.createPlugin = void 0;
|
|
|
9
9
|
exports.handleExpandDrag = handleExpandDrag;
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
12
|
-
var
|
|
12
|
+
var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
13
13
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
14
14
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
15
15
|
var _commands = require("../commands");
|
|
@@ -54,16 +54,16 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
|
|
|
54
54
|
})
|
|
55
55
|
},
|
|
56
56
|
handleKeyDown: function handleKeyDown(_view, event) {
|
|
57
|
-
return containsClass(event.target,
|
|
57
|
+
return containsClass(event.target, _expand.expandClassNames.titleContainer);
|
|
58
58
|
},
|
|
59
59
|
handleKeyPress: function handleKeyPress(_view, event) {
|
|
60
|
-
return containsClass(event.target,
|
|
60
|
+
return containsClass(event.target, _expand.expandClassNames.titleContainer);
|
|
61
61
|
},
|
|
62
62
|
handleScrollToSelection: function handleScrollToSelection() {
|
|
63
|
-
return containsClass(document.activeElement,
|
|
63
|
+
return containsClass(document.activeElement, _expand.expandClassNames.titleInput);
|
|
64
64
|
},
|
|
65
65
|
handleClickOn: (0, _selection.createSelectionClickHandler)(['expand', 'nestedExpand'], function (target) {
|
|
66
|
-
return target.classList.contains(
|
|
66
|
+
return target.classList.contains(_expand.expandClassNames.prefix);
|
|
67
67
|
}, {
|
|
68
68
|
useLongPressSelection: useLongPressSelection
|
|
69
69
|
}),
|
|
@@ -73,7 +73,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
|
|
|
73
73
|
},
|
|
74
74
|
// @see ED-8027 to follow up on this work-around
|
|
75
75
|
filterTransaction: function filterTransaction(tr) {
|
|
76
|
-
if (containsClass(document.activeElement,
|
|
76
|
+
if (containsClass(document.activeElement, _expand.expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
|
|
77
77
|
return false;
|
|
78
78
|
}
|
|
79
79
|
return true;
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.pluginKey = exports.getPluginState = exports.createPluginState = exports.createCommand = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _pluginStateFactory = require("@atlaskit/editor-common/utils/plugin-state-factory");
|
|
9
9
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
10
10
|
var _reducer = _interopRequireDefault(require("../reducer"));
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
12
12
|
|
|
13
13
|
var pluginKey = exports.pluginKey = new _state.PluginKey('expandPlugin');
|
|
14
|
-
var dest = (0,
|
|
14
|
+
var dest = (0, _pluginStateFactory.pluginFactory)(pluginKey, _reducer.default);
|
|
15
15
|
var createPluginState = exports.createPluginState = dest.createPluginState;
|
|
16
16
|
var createCommand = exports.createCommand = dest.createCommand;
|
|
17
17
|
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
@@ -17,9 +17,9 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button/custom-theme-button"));
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
20
|
+
var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
21
|
+
var _uiExpand = require("@atlaskit/editor-common/ui-expand");
|
|
22
|
+
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
23
23
|
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
|
|
24
24
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
25
25
|
var _excluded = ["buttonStyles"];
|
|
@@ -47,7 +47,7 @@ var withTooltip = exports.withTooltip = function withTooltip(WrapperComponent) {
|
|
|
47
47
|
(0, _react2.jsx)(_Tooltip.default, {
|
|
48
48
|
content: label,
|
|
49
49
|
position: "top",
|
|
50
|
-
tag:
|
|
50
|
+
tag: _uiExpand.ExpandLayoutWrapperWithRef
|
|
51
51
|
}, (0, _react2.jsx)(WrapperComponent
|
|
52
52
|
// Ignored via go/ees005
|
|
53
53
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -73,18 +73,18 @@ var CustomButton = exports.CustomButton = function CustomButton(props) {
|
|
|
73
73
|
height: '100%',
|
|
74
74
|
'& svg': {
|
|
75
75
|
transform: props.expanded ? 'transform: rotate(90deg);' : 'transform: rotate(0deg);',
|
|
76
|
-
transition: "transform 0.2s ".concat(
|
|
76
|
+
transition: "transform 0.2s ".concat(_constants.akEditorSwoopCubicBezier, ";")
|
|
77
77
|
}
|
|
78
78
|
})
|
|
79
79
|
}, rest);
|
|
80
80
|
}, [props]);
|
|
81
|
-
var label = expanded ?
|
|
81
|
+
var label = expanded ? _uiExpand.messages.collapseNode : _uiExpand.messages.expandNode;
|
|
82
82
|
var labelIntl = intl ? intl.formatMessage(label) : label.defaultMessage;
|
|
83
83
|
return (0, _react2.jsx)(_customThemeButton.default, {
|
|
84
84
|
appearance: "subtle"
|
|
85
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
86
86
|
,
|
|
87
|
-
className:
|
|
87
|
+
className: _expand.expandClassNames.iconContainer,
|
|
88
88
|
iconBefore: (0, _react2.jsx)(_chevronRight.default, {
|
|
89
89
|
label: '',
|
|
90
90
|
size: "small"
|
|
@@ -101,7 +101,7 @@ var ButtonWithoutTooltip = CustomButton;
|
|
|
101
101
|
var ExpandIconButton = exports.ExpandIconButton = function ExpandIconButton(props) {
|
|
102
102
|
var expanded = props.expanded,
|
|
103
103
|
intl = props.intl;
|
|
104
|
-
var message = expanded ?
|
|
104
|
+
var message = expanded ? _uiExpand.messages.collapseNode : _uiExpand.messages.expandNode;
|
|
105
105
|
var label = intl && intl.formatMessage(message) || message.defaultMessage;
|
|
106
106
|
// check to ensure device supports any-hover
|
|
107
107
|
var supportsAnyHover = !!window.matchMedia ? window.matchMedia('(any-hover: hover)').matches !== window.matchMedia('(any-hover: none)').matches : false;
|
|
@@ -118,7 +118,7 @@ var ExpandIconButton = exports.ExpandIconButton = function ExpandIconButton(prop
|
|
|
118
118
|
return (
|
|
119
119
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
120
120
|
(0, _react2.jsx)("div", {
|
|
121
|
-
css:
|
|
121
|
+
css: _uiExpand.expandLayoutWrapperStyle
|
|
122
122
|
}, (0, _react2.jsx)(ButtonWithoutTooltip, (0, _extends2.default)({
|
|
123
123
|
label: label
|
|
124
124
|
// Ignored via go/ees005
|