@atlaskit/editor-plugin-text-color 26.0.4 → 26.0.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 +18 -0
- package/dist/cjs/editor-commands/change-color.js +5 -5
- package/dist/cjs/editor-commands/toggle-color.js +2 -1
- package/dist/cjs/pm-plugins/commands/change-color.js +7 -7
- package/dist/cjs/pm-plugins/commands/toggle-color.js +2 -1
- package/dist/cjs/pm-plugins/keymap.js +2 -1
- package/dist/cjs/pm-plugins/main.js +2 -1
- package/dist/cjs/pm-plugins/utils/inputType.js +2 -2
- package/dist/cjs/ui/ColorAccessibilityMenuItem.js +23 -20
- package/dist/cjs/ui/FloatingToolbarComponent.js +2 -2
- package/dist/cjs/ui/PrimaryToolbarComponent.js +2 -2
- package/dist/cjs/ui/RemoveColorMenuItem.js +7 -7
- package/dist/cjs/ui/TextColorHighlightMenu.js +28 -22
- package/dist/cjs/ui/TextColorMenuItem.js +14 -12
- package/dist/cjs/ui/TextMenuSection.js +4 -4
- package/dist/cjs/ui/ToolbarTextColor/index.js +38 -32
- package/dist/cjs/ui/toolbar-components.js +26 -25
- package/dist/es2019/editor-commands/change-color.js +1 -1
- package/dist/es2019/editor-commands/toggle-color.js +2 -1
- package/dist/es2019/pm-plugins/commands/change-color.js +2 -2
- package/dist/es2019/pm-plugins/commands/toggle-color.js +2 -1
- package/dist/es2019/pm-plugins/keymap.js +2 -1
- package/dist/es2019/pm-plugins/main.js +2 -1
- package/dist/es2019/pm-plugins/utils/inputType.js +1 -1
- package/dist/es2019/ui/ColorAccessibilityMenuItem.js +9 -6
- package/dist/es2019/ui/FloatingToolbarComponent.js +1 -1
- package/dist/es2019/ui/PrimaryToolbarComponent.js +1 -1
- package/dist/es2019/ui/RemoveColorMenuItem.js +3 -3
- package/dist/es2019/ui/TextColorHighlightMenu.js +10 -4
- package/dist/es2019/ui/TextColorMenuItem.js +8 -6
- package/dist/es2019/ui/TextMenuSection.js +2 -2
- package/dist/es2019/ui/ToolbarTextColor/index.js +14 -8
- package/dist/es2019/ui/toolbar-components.js +2 -1
- package/dist/esm/editor-commands/change-color.js +1 -1
- package/dist/esm/editor-commands/toggle-color.js +2 -1
- package/dist/esm/pm-plugins/commands/change-color.js +2 -2
- package/dist/esm/pm-plugins/commands/toggle-color.js +2 -1
- package/dist/esm/pm-plugins/keymap.js +2 -1
- package/dist/esm/pm-plugins/main.js +2 -1
- package/dist/esm/pm-plugins/utils/inputType.js +1 -1
- package/dist/esm/ui/ColorAccessibilityMenuItem.js +9 -6
- package/dist/esm/ui/FloatingToolbarComponent.js +1 -1
- package/dist/esm/ui/PrimaryToolbarComponent.js +1 -1
- package/dist/esm/ui/RemoveColorMenuItem.js +3 -3
- package/dist/esm/ui/TextColorHighlightMenu.js +10 -4
- package/dist/esm/ui/TextColorMenuItem.js +8 -6
- package/dist/esm/ui/TextMenuSection.js +2 -2
- package/dist/esm/ui/ToolbarTextColor/index.js +14 -8
- package/dist/esm/ui/toolbar-components.js +2 -1
- package/dist/types/editor-commands/change-color.d.ts +2 -1
- package/dist/types/editor-commands/palette.d.ts +2 -1
- package/dist/types/editor-commands/remove-color.d.ts +1 -1
- package/dist/types/editor-commands/toggle-color.d.ts +1 -1
- package/dist/types/pm-plugins/commands/change-color.d.ts +2 -2
- package/dist/types/pm-plugins/commands/remove-color.d.ts +1 -1
- package/dist/types/pm-plugins/commands/toggle-color.d.ts +1 -1
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/textColorPluginType.d.ts +10 -8
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/ColorAccessibilityMenuItem.d.ts +1 -1
- package/dist/types/ui/FloatingToolbarComponent.d.ts +2 -2
- package/dist/types/ui/PrimaryToolbarComponent.d.ts +2 -2
- package/dist/types/ui/RemoveColorMenuItem.d.ts +2 -2
- package/dist/types/ui/TextColorHighlightMenu.d.ts +1 -1
- package/dist/types/ui/TextColorMenuItem.d.ts +2 -2
- package/dist/types/ui/TextMenuSection.d.ts +1 -1
- package/dist/types/ui/ToolbarTextColor/index.d.ts +3 -2
- package/dist/types/ui/toolbar-components.d.ts +2 -2
- package/package.json +3 -3
|
@@ -15,21 +15,27 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _reactIntl = require("react-intl");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
18
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
19
|
+
var _toolbarButton = require("@atlaskit/editor-common/analytics/types/toolbar-button");
|
|
20
|
+
var _DynamicStrokeIconDecoration = require("@atlaskit/editor-common/icons/DynamicStrokeIconDecoration");
|
|
21
|
+
var _textColor = require("@atlaskit/editor-common/messages/text-color");
|
|
22
|
+
var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
23
|
+
var _plugins = require("@atlaskit/editor-common/styles/plugins");
|
|
24
|
+
var _ColorPalette = _interopRequireDefault(require("@atlaskit/editor-common/ui-color/ColorPalette"));
|
|
25
|
+
var _paletteMessagesTokenModeNames = require("@atlaskit/editor-common/ui-color/ColorPalette/paletteMessagesTokenModeNames");
|
|
26
|
+
var _utils = require("@atlaskit/editor-common/ui-color/ColorPalette/utils");
|
|
27
|
+
var _types = require("@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types");
|
|
28
|
+
var _DropdownContainer = require("@atlaskit/editor-common/ui-menu/DropdownContainer");
|
|
29
|
+
var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
|
|
30
|
+
var _text = require("@atlaskit/editor-palette/text");
|
|
31
|
+
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
26
32
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
27
33
|
var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
|
|
28
34
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
29
35
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
36
|
var _changeColor = require("../../pm-plugins/commands/change-color");
|
|
31
37
|
var _inputType = require("../../pm-plugins/utils/inputType");
|
|
32
|
-
var
|
|
38
|
+
var _types2 = require("../../types");
|
|
33
39
|
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; }
|
|
34
40
|
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; }
|
|
35
41
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -98,7 +104,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
98
104
|
});
|
|
99
105
|
}
|
|
100
106
|
if (logCloseEvent) {
|
|
101
|
-
_this.dispatchAnalyticsEvent(_this.buildAnalyticsPalette(isOpen ?
|
|
107
|
+
_this.dispatchAnalyticsEvent(_this.buildAnalyticsPalette(isOpen ? _enums.ACTION.OPENED : _enums.ACTION.CLOSED, {
|
|
102
108
|
noSelect: isOpen === false
|
|
103
109
|
}));
|
|
104
110
|
}
|
|
@@ -106,7 +112,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
106
112
|
(0, _defineProperty2.default)(_this, "hide", function (e) {
|
|
107
113
|
var isOpen = _this.state.isOpen;
|
|
108
114
|
if (isOpen === true) {
|
|
109
|
-
_this.dispatchAnalyticsEvent(_this.buildAnalyticsPalette(
|
|
115
|
+
_this.dispatchAnalyticsEvent(_this.buildAnalyticsPalette(_enums.ACTION.CLOSED, {
|
|
110
116
|
noSelect: true
|
|
111
117
|
}));
|
|
112
118
|
_this.setState({
|
|
@@ -161,39 +167,39 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
161
167
|
return paletteItem.value === pluginState.color;
|
|
162
168
|
})) === null || _palette$find === void 0 ? void 0 : _palette$find.label;
|
|
163
169
|
var selectedColorPaletteItemLabelText = selectedColorPaletteItemLabel || '';
|
|
164
|
-
var labelTextColor = formatMessage(
|
|
170
|
+
var labelTextColor = formatMessage(_textColor.textColorMessages.textColor, {
|
|
165
171
|
selectedColorName: selectedColorPaletteItemLabelText
|
|
166
172
|
});
|
|
167
|
-
var tooltipTextColor = formatMessage(
|
|
168
|
-
var _getSelectedRowAndCol = (0,
|
|
173
|
+
var tooltipTextColor = formatMessage(_textColor.textColorMessages.textColorTooltip);
|
|
174
|
+
var _getSelectedRowAndCol = (0, _utils.getSelectedRowAndColumnFromPalette)(palette, pluginState.color, colorPickerColumns),
|
|
169
175
|
selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
|
|
170
176
|
selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
|
|
171
|
-
var reducedSpacing = this.props.toolbarType ===
|
|
177
|
+
var reducedSpacing = this.props.toolbarType === _types2.ToolbarType.FLOATING ? 'compact' : 'none';
|
|
172
178
|
return (0, _react2.jsx)("span", {
|
|
173
179
|
css:
|
|
174
180
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
175
|
-
[
|
|
176
|
-
}, (0, _react2.jsx)(
|
|
181
|
+
[_plugins.wrapperStyle, addMarginToWrapper]
|
|
182
|
+
}, (0, _react2.jsx)(_DropdownContainer.DropdownContainer, {
|
|
177
183
|
mountTo: popupsMountPoint,
|
|
178
184
|
boundariesElement: popupsBoundariesElement,
|
|
179
185
|
scrollableElement: popupsScrollableElement,
|
|
180
186
|
isOpen: isOpen && !pluginState.disabled,
|
|
181
187
|
handleClickOutside: this.hide,
|
|
182
188
|
handleEscapeKeydown: this.hideonEsc,
|
|
183
|
-
zIndex:
|
|
189
|
+
zIndex: _constants.akEditorMenuZIndex,
|
|
184
190
|
fitWidth: fitWidth,
|
|
185
191
|
closeOnTab: true
|
|
186
192
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
187
193
|
,
|
|
188
194
|
arrowKeyNavigationProviderOptions: {
|
|
189
|
-
type:
|
|
195
|
+
type: _types.ArrowKeyNavigationType.COLOR,
|
|
190
196
|
selectedRowIndex: selectedRowIndex,
|
|
191
197
|
selectedColumnIndex: selectedColumnIndex,
|
|
192
198
|
isOpenedByKeyboard: isOpenedByKeyboard,
|
|
193
199
|
isPopupPositioned: true
|
|
194
200
|
},
|
|
195
|
-
trigger: (0, _react2.jsx)(
|
|
196
|
-
buttonId:
|
|
201
|
+
trigger: (0, _react2.jsx)(_ToolbarButton.default, {
|
|
202
|
+
buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.TEXT_COLOR,
|
|
197
203
|
spacing: !isReducedSpacing || (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : reducedSpacing,
|
|
198
204
|
disabled: disabled || pluginState.disabled,
|
|
199
205
|
selected: isOpen,
|
|
@@ -207,8 +213,8 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
207
213
|
iconBefore: (0, _react2.jsx)("div", {
|
|
208
214
|
css:
|
|
209
215
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
210
|
-
|
|
211
|
-
}, (0, _react2.jsx)(
|
|
216
|
+
_plugins.triggerWrapperStylesWithPadding
|
|
217
|
+
}, (0, _react2.jsx)(_DynamicStrokeIconDecoration.DynamicStrokeIconDecoration, {
|
|
212
218
|
selectedColor: selectedColor,
|
|
213
219
|
disabled: pluginState.disabled,
|
|
214
220
|
icon: (0, _react2.jsx)(_textStyle.default, {
|
|
@@ -219,7 +225,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
219
225
|
}),
|
|
220
226
|
//eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
221
227
|
(0, _react2.jsx)("span", {
|
|
222
|
-
css:
|
|
228
|
+
css: _expand.expandIconContainerStyle
|
|
223
229
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
224
230
|
label: "",
|
|
225
231
|
color: "currentColor",
|
|
@@ -228,7 +234,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
228
234
|
})
|
|
229
235
|
}, (0, _react2.jsx)("div", {
|
|
230
236
|
"data-testid": "text-color-palette"
|
|
231
|
-
}, (0, _react2.jsx)(
|
|
237
|
+
}, (0, _react2.jsx)(_ColorPalette.default, {
|
|
232
238
|
cols: colorPickerColumns
|
|
233
239
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
234
240
|
,
|
|
@@ -241,13 +247,13 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
241
247
|
,
|
|
242
248
|
paletteOptions: {
|
|
243
249
|
palette: palette,
|
|
244
|
-
hexToPaletteColor:
|
|
245
|
-
paletteColorTooltipMessages:
|
|
250
|
+
hexToPaletteColor: _text.hexToEditorTextPaletteColor,
|
|
251
|
+
paletteColorTooltipMessages: _paletteMessagesTokenModeNames.textPaletteTooltipMessages
|
|
246
252
|
}
|
|
247
253
|
}))), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
248
254
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
249
255
|
(0, _react2.jsx)("span", {
|
|
250
|
-
css:
|
|
256
|
+
css: _plugins.separatorStyles
|
|
251
257
|
}));
|
|
252
258
|
}
|
|
253
259
|
}, {
|
|
@@ -256,7 +262,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
256
262
|
var selectedColor = pluginState.color !== pluginState.defaultColor ? pluginState.color ?
|
|
257
263
|
// Ignored via go/ees005
|
|
258
264
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
259
|
-
(0,
|
|
265
|
+
(0, _text.hexToEditorTextPaletteColor)(pluginState.color) : pluginState.color : null;
|
|
260
266
|
return selectedColor;
|
|
261
267
|
}
|
|
262
268
|
}, {
|
|
@@ -264,9 +270,9 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
264
270
|
value: function buildAnalyticsPalette(action, data) {
|
|
265
271
|
return {
|
|
266
272
|
action: action,
|
|
267
|
-
actionSubject:
|
|
268
|
-
actionSubjectId:
|
|
269
|
-
eventType:
|
|
273
|
+
actionSubject: _enums.ACTION_SUBJECT.TOOLBAR,
|
|
274
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
275
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
270
276
|
attributes: _objectSpread({}, data)
|
|
271
277
|
};
|
|
272
278
|
}
|
|
@@ -8,7 +8,8 @@ exports.getToolbarComponents = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _keys = require("@atlaskit/editor-common/toolbar/keys");
|
|
12
|
+
var _rank = require("@atlaskit/editor-common/toolbar/rank");
|
|
12
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _ColorAccessibilityMenuItem = require("./ColorAccessibilityMenuItem");
|
|
14
15
|
var _RemoveColorMenuItem = require("./RemoveColorMenuItem");
|
|
@@ -18,17 +19,17 @@ var _TextMenuSection = require("./TextMenuSection");
|
|
|
18
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
21
|
var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api) {
|
|
21
|
-
return [_objectSpread(_objectSpread({},
|
|
22
|
-
parents: [_objectSpread(_objectSpread({},
|
|
23
|
-
rank:
|
|
22
|
+
return [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_GROUP), {}, {
|
|
23
|
+
parents: [_objectSpread(_objectSpread({}, _keys.TEXT_SECTION), {}, {
|
|
24
|
+
rank: _rank.TEXT_SECTION_RANK[_keys.TEXT_COLOR_HIGHLIGHT_GROUP.key]
|
|
24
25
|
}), {
|
|
25
|
-
type:
|
|
26
|
-
key:
|
|
27
|
-
rank:
|
|
26
|
+
type: _keys.TEXT_SECTION_PRIMARY_TOOLBAR.type,
|
|
27
|
+
key: _keys.TEXT_SECTION_PRIMARY_TOOLBAR.key,
|
|
28
|
+
rank: _rank.TEXT_SECTION_PRIMARY_TOOLBAR_RANK[_keys.TEXT_COLOR_HIGHLIGHT_GROUP.key]
|
|
28
29
|
}]
|
|
29
|
-
}), _objectSpread(_objectSpread({},
|
|
30
|
-
parents: [_objectSpread(_objectSpread({},
|
|
31
|
-
rank:
|
|
30
|
+
}), _objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU), {}, {
|
|
31
|
+
parents: [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_GROUP), {}, {
|
|
32
|
+
rank: _rank.TEXT_COLOR_HIGHLIGHT_GROUP_RANK[_keys.TEXT_COLOR_HIGHLIGHT_MENU.key]
|
|
32
33
|
})],
|
|
33
34
|
component: function component(_ref) {
|
|
34
35
|
var children = _ref.children;
|
|
@@ -36,18 +37,18 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
36
37
|
api: api
|
|
37
38
|
}, children);
|
|
38
39
|
}
|
|
39
|
-
}), _objectSpread(_objectSpread({},
|
|
40
|
-
parents: [_objectSpread(_objectSpread({},
|
|
41
|
-
rank:
|
|
40
|
+
}), _objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
|
|
41
|
+
parents: [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU), {}, {
|
|
42
|
+
rank: _rank.TEXT_COLOR_HIGHLIGHT_MENU_RANK[_keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION.key]
|
|
42
43
|
}), {
|
|
43
|
-
type:
|
|
44
|
-
key:
|
|
45
|
-
rank:
|
|
44
|
+
type: _keys.TEXT_COLLAPSED_MENU.type,
|
|
45
|
+
key: _keys.TEXT_COLLAPSED_MENU.key,
|
|
46
|
+
rank: _rank.TEXT_COLLAPSED_MENU_RANK[_keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION.key]
|
|
46
47
|
}],
|
|
47
48
|
component: _TextMenuSection.TextMenuSection
|
|
48
|
-
}), _objectSpread(_objectSpread({},
|
|
49
|
-
parents: [_objectSpread(_objectSpread({},
|
|
50
|
-
rank:
|
|
49
|
+
}), _objectSpread(_objectSpread({}, _keys.TEXT_COLOR_MENU_ITEM), {}, {
|
|
50
|
+
parents: [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
|
|
51
|
+
rank: _rank.TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[_keys.TEXT_COLOR_MENU_ITEM.key]
|
|
51
52
|
})],
|
|
52
53
|
component: function component(_ref2) {
|
|
53
54
|
var parents = _ref2.parents;
|
|
@@ -56,9 +57,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
56
57
|
parents: parents
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
}), _objectSpread(_objectSpread({},
|
|
60
|
-
parents: [_objectSpread(_objectSpread({},
|
|
61
|
-
rank:
|
|
60
|
+
}), _objectSpread(_objectSpread({}, _keys.CLEAR_COLOR_MENU_ITEM), {}, {
|
|
61
|
+
parents: [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
|
|
62
|
+
rank: _rank.TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[_keys.CLEAR_COLOR_MENU_ITEM.key]
|
|
62
63
|
})],
|
|
63
64
|
component: function component(_ref3) {
|
|
64
65
|
var parents = _ref3.parents;
|
|
@@ -67,9 +68,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
67
68
|
parents: parents
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
})].concat((0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) ? [_objectSpread(_objectSpread({},
|
|
71
|
-
parents: [_objectSpread(_objectSpread({},
|
|
72
|
-
rank:
|
|
71
|
+
})].concat((0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) ? [_objectSpread(_objectSpread({}, _keys.COLOR_ACCESSIBILITY_MENU_ITEM), {}, {
|
|
72
|
+
parents: [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
|
|
73
|
+
rank: _rank.TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[_keys.COLOR_ACCESSIBILITY_MENU_ITEM.key]
|
|
73
74
|
})],
|
|
74
75
|
component: function component() {
|
|
75
76
|
return /*#__PURE__*/_react.default.createElement(_ColorAccessibilityMenuItem.ColorAccessibilityMenuItem, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { getHadMarkAttributes } from '@atlaskit/editor-common/mark';
|
|
3
3
|
import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
|
|
4
4
|
import { getActiveColorNew } from '../pm-plugins/utils/color';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { removeMark
|
|
1
|
+
import { removeMark } from '@atlaskit/editor-common/mark';
|
|
2
|
+
import { toggleMark } from '@atlaskit/editor-common/mark/commands';
|
|
2
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
import { ACTIONS, pluginKey } from '../pm-plugins/main';
|
|
4
5
|
import { overrideMarks } from '../pm-plugins/utils/constants';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
2
|
import { getHadMarkAttributes } from '@atlaskit/editor-common/mark';
|
|
3
|
+
import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
|
|
4
4
|
import { pluginKey } from '../main';
|
|
5
5
|
import { getActiveColor } from '../utils/color';
|
|
6
6
|
import { removeColor } from './remove-color';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { removeMark
|
|
1
|
+
import { removeMark } from '@atlaskit/editor-common/mark';
|
|
2
|
+
import { toggleMark } from '@atlaskit/editor-common/mark/commands';
|
|
2
3
|
import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { ACTIONS, pluginKey } from '../main';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { keymap } from '@atlaskit/editor-common/keymap';
|
|
2
|
+
import { bindKeymapWithEditorCommand, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
|
|
2
3
|
import { togglePalette } from '../editor-commands/palette';
|
|
3
4
|
export function keymapPlugin({
|
|
4
5
|
api
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import {
|
|
2
|
+
import { textColorPaletteNew } from '@atlaskit/editor-common/ui-color';
|
|
3
|
+
import { textColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/textColorPalette';
|
|
3
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
6
|
import { getActiveColor } from './utils/color';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { ToolbarType } from '../../types';
|
|
3
3
|
const toolbarTypeToInputMethod = {
|
|
4
4
|
[ToolbarType.PRIMARY]: INPUT_METHOD.TOOLBAR,
|
|
@@ -6,12 +6,15 @@ import { useIntl } from 'react-intl';
|
|
|
6
6
|
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
7
7
|
import IconButton from '@atlaskit/button/icon/button';
|
|
8
8
|
import { cx } from '@atlaskit/css';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { colorAccessibilityMessages as messages } from '@atlaskit/editor-common/messages/color-accessibility';
|
|
10
|
+
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/styles/panel';
|
|
11
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
12
|
+
import { getTextColorInNonActiveTheme } from '@atlaskit/editor-common/ui-color';
|
|
13
|
+
import { getTokenCSSVariableValue, getTokenCSSVariableValueForNonActiveTheme } from '@atlaskit/editor-common/ui-color/ColorPalette/utils';
|
|
14
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
15
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette/background';
|
|
16
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
17
|
+
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
|
|
15
18
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
19
|
import AccessibilityIcon from '@atlaskit/icon/core/accessibility';
|
|
17
20
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { ToolbarType } from '../types';
|
|
4
4
|
// Ignored via go/ees005
|
|
5
5
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { ToolbarType } from '../types';
|
|
4
4
|
// Ignored via go/ees005
|
|
5
5
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -4,10 +4,10 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import Button from '@atlaskit/button/default/button';
|
|
7
|
-
import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
|
|
8
8
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
9
|
-
import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
10
|
-
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
9
|
+
import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
|
|
10
|
+
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu-context';
|
|
11
11
|
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
12
12
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { toggleHighlightPalette, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
|
-
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
+
import { textColorMessages as messages } from '@atlaskit/editor-common/messages/text-color';
|
|
5
5
|
import { SelectedTextColorProvider } from '@atlaskit/editor-common/ui-color';
|
|
6
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/
|
|
7
|
-
import { hexToEditorTextPaletteColor
|
|
8
|
-
import {
|
|
6
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
|
|
7
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
8
|
+
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
|
|
9
|
+
import { TextColorIcon } from '@atlaskit/editor-toolbar/text-color-icon';
|
|
10
|
+
import { ToolbarColorSwatch } from '@atlaskit/editor-toolbar/toolbar-color-swatch';
|
|
11
|
+
import { ToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu';
|
|
12
|
+
import { ToolbarDropdownMenuProvider } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu-context';
|
|
13
|
+
import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
|
|
14
|
+
import { useToolbarUI } from '@atlaskit/editor-toolbar/ui-context';
|
|
9
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
16
|
const getIconColor = (textColor, defaultColor, highlightColor) => {
|
|
11
17
|
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
@@ -3,12 +3,14 @@ import "./TextColorMenuItem.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useId } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { textColorMessages as messages } from '@atlaskit/editor-common/messages/text-color';
|
|
7
|
+
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
8
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
9
|
+
import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color/ColorPalette/paletteMessagesTokenModeNames';
|
|
10
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
11
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
12
|
+
import { ColorPalette } from '@atlaskit/editor-toolbar/color-palette';
|
|
13
|
+
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu-context';
|
|
12
14
|
import Heading from '@atlaskit/heading/heading';
|
|
13
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
16
|
import { Bleed, Stack } from '@atlaskit/primitives/compiled';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import "./TextMenuSection.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar';
|
|
6
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
5
|
+
import { TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar/keys';
|
|
6
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
const styles = {
|
|
@@ -8,14 +8,20 @@ import React from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { injectIntl } from 'react-intl';
|
|
11
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
12
|
+
import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
|
|
13
|
+
import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons/DynamicStrokeIconDecoration';
|
|
14
|
+
import { textColorMessages as messages } from '@atlaskit/editor-common/messages/text-color';
|
|
15
|
+
import { expandIconContainerStyle } from '@atlaskit/editor-common/styles/expand';
|
|
16
|
+
import { separatorStyles, triggerWrapperStylesWithPadding, wrapperStyle } from '@atlaskit/editor-common/styles/plugins';
|
|
17
|
+
import ColorPalette from '@atlaskit/editor-common/ui-color/ColorPalette';
|
|
18
|
+
import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color/ColorPalette/paletteMessagesTokenModeNames';
|
|
19
|
+
import { getSelectedRowAndColumnFromPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/utils';
|
|
20
|
+
import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
|
|
21
|
+
import { DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu/DropdownContainer';
|
|
22
|
+
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
23
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
24
|
+
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
19
25
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
20
26
|
import TextStyleIcon from '@atlaskit/icon/core/text-style';
|
|
21
27
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TEXT_SECTION,
|
|
2
|
+
import { TEXT_SECTION, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, TEXT_COLLAPSED_MENU, CLEAR_COLOR_MENU_ITEM, COLOR_ACCESSIBILITY_MENU_ITEM, TEXT_SECTION_PRIMARY_TOOLBAR } from '@atlaskit/editor-common/toolbar/keys';
|
|
3
|
+
import { TEXT_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, TEXT_COLLAPSED_MENU_RANK, TEXT_SECTION_PRIMARY_TOOLBAR_RANK } from '@atlaskit/editor-common/toolbar/rank';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { ColorAccessibilityMenuItem } from './ColorAccessibilityMenuItem';
|
|
5
6
|
import { RemoveColorMenuItem } from './RemoveColorMenuItem';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
5
|
import { getHadMarkAttributes } from '@atlaskit/editor-common/mark';
|
|
6
6
|
import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
|
|
7
7
|
import { getActiveColorNew } from '../pm-plugins/utils/color';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { removeMark
|
|
1
|
+
import { removeMark } from '@atlaskit/editor-common/mark';
|
|
2
|
+
import { toggleMark } from '@atlaskit/editor-common/mark/commands';
|
|
2
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
import { ACTIONS, pluginKey } from '../pm-plugins/main';
|
|
4
5
|
import { overrideMarks } from '../pm-plugins/utils/constants';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
5
|
import { getHadMarkAttributes } from '@atlaskit/editor-common/mark';
|
|
6
|
+
import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
|
|
7
7
|
import { pluginKey } from '../main';
|
|
8
8
|
import { getActiveColor } from '../utils/color';
|
|
9
9
|
import { removeColor } from './remove-color';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { removeMark
|
|
1
|
+
import { removeMark } from '@atlaskit/editor-common/mark';
|
|
2
|
+
import { toggleMark } from '@atlaskit/editor-common/mark/commands';
|
|
2
3
|
import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { ACTIONS, pluginKey } from '../main';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { keymap } from '@atlaskit/editor-common/keymap';
|
|
2
|
+
import { bindKeymapWithEditorCommand, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
|
|
2
3
|
import { togglePalette } from '../editor-commands/palette';
|
|
3
4
|
export function keymapPlugin(_ref) {
|
|
4
5
|
var api = _ref.api;
|
|
@@ -3,7 +3,8 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
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; }
|
|
4
4
|
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) { _defineProperty(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; }
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import {
|
|
6
|
+
import { textColorPaletteNew } from '@atlaskit/editor-common/ui-color';
|
|
7
|
+
import { textColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/textColorPalette';
|
|
7
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
10
|
import { getActiveColor } from './utils/color';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
3
|
import { ToolbarType } from '../../types';
|
|
4
4
|
var toolbarTypeToInputMethod = _defineProperty(_defineProperty({}, ToolbarType.PRIMARY, INPUT_METHOD.TOOLBAR), ToolbarType.FLOATING, INPUT_METHOD.FLOATING_TB);
|
|
5
5
|
export var getInputMethod = function getInputMethod(toolbarType) {
|
|
@@ -9,12 +9,15 @@ import { useIntl } from 'react-intl';
|
|
|
9
9
|
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
10
10
|
import IconButton from '@atlaskit/button/icon/button';
|
|
11
11
|
import { cx } from '@atlaskit/css';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
12
|
+
import { colorAccessibilityMessages as messages } from '@atlaskit/editor-common/messages/color-accessibility';
|
|
13
|
+
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/styles/panel';
|
|
14
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
15
|
+
import { getTextColorInNonActiveTheme } from '@atlaskit/editor-common/ui-color';
|
|
16
|
+
import { getTokenCSSVariableValue, getTokenCSSVariableValueForNonActiveTheme } from '@atlaskit/editor-common/ui-color/ColorPalette/utils';
|
|
17
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
18
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette/background';
|
|
19
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
20
|
+
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
|
|
18
21
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
19
22
|
import AccessibilityIcon from '@atlaskit/icon/core/accessibility';
|
|
20
23
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { ToolbarType } from '../types';
|
|
4
4
|
// Ignored via go/ees005
|
|
5
5
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { ToolbarType } from '../types';
|
|
4
4
|
// Ignored via go/ees005
|
|
5
5
|
// eslint-disable-next-line import/no-named-as-default
|