@atlaskit/editor-common 112.7.2 → 112.7.4
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/analytics/types/ai-autocomplete-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +2 -0
- package/dist/cjs/card/ui/assets/card.js +3 -1
- package/dist/cjs/card/ui/assets/embed.js +3 -1
- package/dist/cjs/card/ui/assets/inline.js +3 -1
- package/dist/cjs/card/ui/assets/url.js +3 -1
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/cjs/extensibility/Extension/Extension/index.js +9 -3
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -0
- package/dist/cjs/extensibility/Extension.js +3 -1
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +1 -0
- package/dist/cjs/keymaps/index.js +1 -0
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +4 -1
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +20 -11
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +6 -2
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +6 -2
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +5 -3
- package/dist/cjs/mark/commands.js +5 -3
- package/dist/cjs/media-inline/inline-image-card.js +3 -1
- package/dist/cjs/media-inline/media-inline-image-card.js +6 -2
- package/dist/cjs/media-single/CommentBadge.js +3 -1
- package/dist/cjs/media-single/CommentBadgeNext.js +3 -1
- package/dist/cjs/media-single/MediaBadges.js +3 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +3 -9
- package/dist/cjs/paste/md-plugins/linkify-md-plugin.js +2 -2
- package/dist/cjs/resizer/BreakoutResizer.js +3 -1
- package/dist/cjs/resizer/Resizer.js +5 -1
- package/dist/cjs/toolbar/context.js +1 -0
- package/dist/cjs/ui/AssistiveText/AssistiveText.js +4 -0
- package/dist/cjs/ui/ContextPanel/context.js +3 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +4 -2
- package/dist/cjs/ui/HoverLinkOverlay/index.js +3 -1
- package/dist/cjs/ui/Mention/index.js +3 -1
- package/dist/cjs/ui/Popup/index.js +2 -2
- package/dist/cjs/ui/ResizerLegacy/index.js +3 -1
- package/dist/cjs/ui/TableSelector/index.js +3 -1
- package/dist/cjs/ui-color/ColorPalette/Palettes/borderColorPalette.js +1 -0
- package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -0
- package/dist/cjs/ui-color/ColorPalette/Palettes/highlightColorPalette.js +1 -1
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +4 -0
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +12 -4
- package/dist/cjs/ui-menu/DropdownMenu/index.js +18 -6
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +1 -1
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +9 -4
- package/dist/cjs/utils/commands.js +3 -3
- package/dist/es2019/analytics/types/ai-autocomplete-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +2 -0
- package/dist/es2019/card/ui/assets/card.js +3 -1
- package/dist/es2019/card/ui/assets/embed.js +3 -1
- package/dist/es2019/card/ui/assets/inline.js +3 -1
- package/dist/es2019/card/ui/assets/url.js +3 -1
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/es2019/extensibility/Extension/Extension/index.js +9 -3
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -0
- package/dist/es2019/extensibility/Extension.js +3 -1
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +1 -0
- package/dist/es2019/keymaps/index.js +1 -0
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +4 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +20 -11
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +6 -2
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +6 -2
- package/dist/es2019/link/LinkSearch/withActivityProvider.js +4 -2
- package/dist/es2019/mark/commands.js +5 -3
- package/dist/es2019/media-inline/inline-image-card.js +3 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +6 -2
- package/dist/es2019/media-single/CommentBadge.js +3 -1
- package/dist/es2019/media-single/CommentBadgeNext.js +3 -1
- package/dist/es2019/media-single/MediaBadges.js +3 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +4 -10
- package/dist/es2019/paste/md-plugins/linkify-md-plugin.js +2 -2
- package/dist/es2019/resizer/BreakoutResizer.js +3 -1
- package/dist/es2019/resizer/Resizer.js +5 -1
- package/dist/es2019/toolbar/context.js +1 -0
- package/dist/es2019/ui/AssistiveText/AssistiveText.js +4 -0
- package/dist/es2019/ui/ContextPanel/context.js +3 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +4 -2
- package/dist/es2019/ui/HoverLinkOverlay/index.js +3 -1
- package/dist/es2019/ui/Mention/index.js +3 -1
- package/dist/es2019/ui/Popup/index.js +2 -2
- package/dist/es2019/ui/ResizerLegacy/index.js +3 -1
- package/dist/es2019/ui/TableSelector/index.js +3 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/borderColorPalette.js +1 -0
- package/dist/es2019/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -0
- package/dist/es2019/ui-color/ColorPalette/Palettes/highlightColorPalette.js +1 -1
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +4 -0
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +12 -4
- package/dist/es2019/ui-menu/DropdownMenu/index.js +18 -6
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +1 -1
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +9 -4
- package/dist/es2019/utils/commands.js +3 -3
- package/dist/esm/analytics/types/ai-autocomplete-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +2 -0
- package/dist/esm/card/ui/assets/card.js +3 -1
- package/dist/esm/card/ui/assets/embed.js +3 -1
- package/dist/esm/card/ui/assets/inline.js +3 -1
- package/dist/esm/card/ui/assets/url.js +3 -1
- package/dist/esm/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/esm/extensibility/Extension/Extension/index.js +9 -3
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -0
- package/dist/esm/extensibility/Extension.js +3 -1
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +1 -0
- package/dist/esm/keymaps/index.js +1 -0
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +4 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +20 -11
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +6 -2
- package/dist/esm/link/LinkSearch/LinkSearchList.js +6 -2
- package/dist/esm/link/LinkSearch/withActivityProvider.js +4 -2
- package/dist/esm/mark/commands.js +5 -3
- package/dist/esm/media-inline/inline-image-card.js +3 -1
- package/dist/esm/media-inline/media-inline-image-card.js +6 -2
- package/dist/esm/media-single/CommentBadge.js +3 -1
- package/dist/esm/media-single/CommentBadgeNext.js +3 -1
- package/dist/esm/media-single/MediaBadges.js +3 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +4 -10
- package/dist/esm/paste/md-plugins/linkify-md-plugin.js +2 -2
- package/dist/esm/resizer/BreakoutResizer.js +3 -1
- package/dist/esm/resizer/Resizer.js +5 -1
- package/dist/esm/toolbar/context.js +1 -0
- package/dist/esm/ui/AssistiveText/AssistiveText.js +4 -0
- package/dist/esm/ui/ContextPanel/context.js +3 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +4 -2
- package/dist/esm/ui/HoverLinkOverlay/index.js +3 -1
- package/dist/esm/ui/Mention/index.js +3 -1
- package/dist/esm/ui/Popup/index.js +2 -2
- package/dist/esm/ui/ResizerLegacy/index.js +3 -1
- package/dist/esm/ui/TableSelector/index.js +3 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/borderColorPalette.js +1 -0
- package/dist/esm/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -0
- package/dist/esm/ui-color/ColorPalette/Palettes/highlightColorPalette.js +1 -1
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +4 -0
- package/dist/esm/ui-menu/ColorPickerButton/index.js +12 -4
- package/dist/esm/ui-menu/DropdownMenu/index.js +18 -6
- package/dist/esm/ui-menu/ToolbarButton/styles.js +1 -1
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +9 -4
- package/dist/esm/utils/commands.js +3 -3
- package/dist/types/analytics/types/ai-autocomplete-events.d.ts +8 -0
- package/dist/types/analytics/types/enums.d.ts +3 -1
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/ui/Popup/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/ai-autocomplete-events.d.ts +8 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +3 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/ui/Popup/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -243,7 +243,9 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
243
243
|
ref: hoverLinkButtonRef,
|
|
244
244
|
xcss: linkStylesCommon,
|
|
245
245
|
href: url,
|
|
246
|
-
target: "_blank"
|
|
246
|
+
target: "_blank"
|
|
247
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
248
|
+
,
|
|
247
249
|
style: {
|
|
248
250
|
paddingBlock: compactPadding ? '1px' : (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
|
|
249
251
|
},
|
|
@@ -58,7 +58,9 @@ var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
58
58
|
}, {
|
|
59
59
|
key: "render",
|
|
60
60
|
value: function render() {
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
|
|
62
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
63
|
+
, {
|
|
62
64
|
providers: ['mentionProvider', 'profilecardProvider'],
|
|
63
65
|
providerFactory: this.providerFactory,
|
|
64
66
|
renderNode: this.renderWithProvider
|
|
@@ -17,7 +17,7 @@ var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
|
17
17
|
var _reactDom = require("react-dom");
|
|
18
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
|
-
var
|
|
20
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
21
|
var _utils = require("./utils");
|
|
22
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; }
|
|
23
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; }
|
|
@@ -71,7 +71,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
71
71
|
returnFocusOnDeactivate: false
|
|
72
72
|
};
|
|
73
73
|
var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
|
|
74
|
-
_this.focusTrap = (0, _focusTrap.default)(popup, (0,
|
|
74
|
+
_this.focusTrap = (0, _focusTrap.default)(popup, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? trapConfig : defaultTrapConfig);
|
|
75
75
|
_this.focusTrap.activate();
|
|
76
76
|
}));
|
|
77
77
|
return _this;
|
|
@@ -194,7 +194,9 @@ var Resizer = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
194
194
|
// Ideally, Resizable would let you pass in the component rather than
|
|
195
195
|
// the div. For now, we just apply the same styles using CSS
|
|
196
196
|
return /*#__PURE__*/_react.default.createElement(_reResizable.Resizable, {
|
|
197
|
-
ref: this.resizable
|
|
197
|
+
ref: this.resizable
|
|
198
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
199
|
+
,
|
|
198
200
|
size: {
|
|
199
201
|
width: nonZeroWidth,
|
|
200
202
|
// just content itself (no paddings)
|
|
@@ -241,7 +241,9 @@ var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopu
|
|
|
241
241
|
return unbind;
|
|
242
242
|
}, [handleMouseMove, props.allowOutsideSelection, tablePopupRef]);
|
|
243
243
|
return (0, _react2.jsx)(_Popup.default, {
|
|
244
|
-
target: props.target
|
|
244
|
+
target: props.target
|
|
245
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
246
|
+
,
|
|
245
247
|
offset: [0, 3],
|
|
246
248
|
mountTo: props.popupsMountPoint,
|
|
247
249
|
boundariesElement: props.popupsBoundariesElement,
|
|
@@ -11,6 +11,7 @@ var _getColorMessage = _interopRequireDefault(require("./getColorMessage"));
|
|
|
11
11
|
var _paletteMessages = _interopRequireDefault(require("./paletteMessages"));
|
|
12
12
|
var borderColorPalette = [];
|
|
13
13
|
_adfSchema.borderColorPalette.forEach(function (label, color) {
|
|
14
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
14
15
|
var key = label.toLowerCase().replace(' ', '-');
|
|
15
16
|
var message = (0, _getColorMessage.default)(_paletteMessages.default, key);
|
|
16
17
|
borderColorPalette.push({
|
|
@@ -10,6 +10,7 @@ var _getColorMessage = _interopRequireDefault(require("./getColorMessage"));
|
|
|
10
10
|
var _paletteMessages = _interopRequireDefault(require("./paletteMessages"));
|
|
11
11
|
var cellBackgroundColorPalette = [];
|
|
12
12
|
_adfSchema.tableBackgroundColorPalette.forEach(function (label, color) {
|
|
13
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
13
14
|
var key = label.toLowerCase().replace(' ', '-');
|
|
14
15
|
var message = (0, _getColorMessage.default)(_paletteMessages.default, key);
|
|
15
16
|
cellBackgroundColorPalette.push({
|
|
@@ -49,7 +49,7 @@ var EditorDiagonalLineIcon = exports.EditorDiagonalLineIcon = function EditorDia
|
|
|
49
49
|
colorMode = _useThemeObserver.colorMode;
|
|
50
50
|
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #626F86)" : "var(--ds-background-accent-gray-subtle, #8590A2)";
|
|
51
51
|
return (
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
53
|
(0, _react.jsx)(DiagonalLineGlyph, {
|
|
54
54
|
"aria-label": "",
|
|
55
55
|
style: {
|
|
@@ -67,9 +67,13 @@ var MenuArrowKeyNavigationProvider = exports.MenuArrowKeyNavigationProvider = fu
|
|
|
67
67
|
var currentIndex = currentSelectedItemIndex;
|
|
68
68
|
var list = getFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
69
69
|
var currentElement = list[currentIndex];
|
|
70
|
+
|
|
71
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
70
72
|
if (currentElement && currentElement.getAttribute('aria-disabled') === 'true') {
|
|
71
73
|
var _list$focusIndex;
|
|
74
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
72
75
|
var focusIndex = incrementIndex(list);
|
|
76
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
73
77
|
(_list$focusIndex = list[focusIndex]) === null || _list$focusIndex === void 0 || _list$focusIndex.focus();
|
|
74
78
|
}
|
|
75
79
|
}, [currentSelectedItemIndex, onSelection, incrementIndex, decrementIndex]);
|
|
@@ -156,7 +156,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
156
156
|
return (0, _react2.jsx)(_Popup.default, {
|
|
157
157
|
target: buttonRef.current,
|
|
158
158
|
fitHeight: 350,
|
|
159
|
-
fitWidth: 350
|
|
159
|
+
fitWidth: 350
|
|
160
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
161
|
+
,
|
|
160
162
|
offset: [0, 10],
|
|
161
163
|
alignX: props.alignX,
|
|
162
164
|
mountTo: props.setDisableParentScroll ? props.mountPoint : undefined,
|
|
@@ -175,7 +177,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
175
177
|
type: _types.ArrowKeyNavigationType.COLOR,
|
|
176
178
|
selectedRowIndex: selectedRowIndex,
|
|
177
179
|
selectedColumnIndex: selectedColumnIndex,
|
|
178
|
-
closeOnTab: true
|
|
180
|
+
closeOnTab: true
|
|
181
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
182
|
+
,
|
|
179
183
|
handleClose: function handleClose() {
|
|
180
184
|
return setIsPopupOpen(false);
|
|
181
185
|
},
|
|
@@ -187,7 +191,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
187
191
|
selectedColor: selectedColor,
|
|
188
192
|
onClick: onColorSelected,
|
|
189
193
|
handleClickOutside: togglePopup,
|
|
190
|
-
handleEscapeKeydown: handleEsc
|
|
194
|
+
handleEscapeKeydown: handleEsc
|
|
195
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
196
|
+
,
|
|
191
197
|
paletteOptions: {
|
|
192
198
|
palette: props.colorPalette,
|
|
193
199
|
hexToPaletteColor: props.hexToPaletteColor,
|
|
@@ -235,7 +241,9 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
235
241
|
"aria-label": title,
|
|
236
242
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
237
243
|
spacing: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : 'compact',
|
|
238
|
-
onClick: togglePopup
|
|
244
|
+
onClick: togglePopup
|
|
245
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
246
|
+
,
|
|
239
247
|
onKeyDown: function onKeyDown(event) {
|
|
240
248
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
241
249
|
event.preventDefault();
|
|
@@ -199,7 +199,9 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
199
199
|
position: popupPlacement.join(' '),
|
|
200
200
|
shouldFitContainer: true,
|
|
201
201
|
handleClickOutside: this.handleClose,
|
|
202
|
-
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus
|
|
202
|
+
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus
|
|
203
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
204
|
+
,
|
|
203
205
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
204
206
|
if (!allowEnterDefaultBehavior) {
|
|
205
207
|
e.preventDefault();
|
|
@@ -336,7 +338,9 @@ function DropdownMenuItem(_ref) {
|
|
|
336
338
|
role: shouldUseDefaultRole ? 'button' : (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
337
339
|
iconBefore: item.elemBefore,
|
|
338
340
|
iconAfter: item.elemAfter,
|
|
339
|
-
isDisabled: item.isDisabled
|
|
341
|
+
isDisabled: item.isDisabled
|
|
342
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
343
|
+
,
|
|
340
344
|
onClick: function onClick() {
|
|
341
345
|
return onItemActivated && onItemActivated({
|
|
342
346
|
item: item
|
|
@@ -344,16 +348,22 @@ function DropdownMenuItem(_ref) {
|
|
|
344
348
|
},
|
|
345
349
|
"aria-label": ariaLabel,
|
|
346
350
|
"aria-pressed": shouldUseDefaultRole ? item.isActive : undefined,
|
|
347
|
-
"aria-keyshortcuts": item['aria-keyshortcuts']
|
|
351
|
+
"aria-keyshortcuts": item['aria-keyshortcuts']
|
|
352
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
353
|
+
,
|
|
348
354
|
onMouseDown: function onMouseDown(e) {
|
|
349
355
|
e.preventDefault();
|
|
350
356
|
},
|
|
351
|
-
component: DropdownMenuItemCustomComponent
|
|
357
|
+
component: DropdownMenuItemCustomComponent
|
|
358
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
359
|
+
,
|
|
352
360
|
onMouseEnter: function onMouseEnter() {
|
|
353
361
|
return _onMouseEnter && _onMouseEnter({
|
|
354
362
|
item: item
|
|
355
363
|
});
|
|
356
|
-
}
|
|
364
|
+
}
|
|
365
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
366
|
+
,
|
|
357
367
|
onMouseLeave: function onMouseLeave() {
|
|
358
368
|
return _onMouseLeave && _onMouseLeave({
|
|
359
369
|
item: item
|
|
@@ -380,7 +390,9 @@ function (_ref2) {
|
|
|
380
390
|
|
|
381
391
|
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
382
392
|
// Default context has the void callbacks for above key events
|
|
383
|
-
return (0, _react2.jsx)(DropdownMenuWrapper
|
|
393
|
+
return (0, _react2.jsx)(DropdownMenuWrapper
|
|
394
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
395
|
+
, (0, _extends2.default)({
|
|
384
396
|
arrowKeyNavigationProviderOptions: _objectSpread(_objectSpread({}, props.arrowKeyNavigationProviderOptions), {}, {
|
|
385
397
|
keyDownHandlerContext: keyDownHandlerContext
|
|
386
398
|
})
|
|
@@ -20,7 +20,7 @@ var _default_1 = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
20
20
|
// Ignored via go/ees007
|
|
21
21
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
22
22
|
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
24
24
|
style: {
|
|
25
25
|
alignItems: 'center'
|
|
26
26
|
}
|
|
@@ -16,7 +16,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
19
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
20
|
var _ReactEditorViewContext = _interopRequireDefault(require("./ReactEditorViewContext"));
|
|
22
21
|
var _excluded = ["captureClick", "closeOnTab", "handleBackspaceDeleteKeydown", "handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown", "handleKeyDown"];
|
|
@@ -74,7 +73,9 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
74
73
|
} else if ((evt.code === 'Delete' || evt.code === 'Backspace') && _this.props.handleBackspaceDeleteKeydown) {
|
|
75
74
|
_this.props.handleBackspaceDeleteKeydown(evt);
|
|
76
75
|
}
|
|
77
|
-
if ((0,
|
|
76
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
77
|
+
exposure: true
|
|
78
|
+
})) {
|
|
78
79
|
var _this$props$handleKey, _this$props;
|
|
79
80
|
(_this$props$handleKey = (_this$props = _this.props).handleKeyDown) === null || _this$props$handleKey === void 0 || _this$props$handleKey.call(_this$props, evt);
|
|
80
81
|
}
|
|
@@ -93,7 +94,9 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
94
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
94
95
|
document.addEventListener('click', this.handleClick, options);
|
|
95
96
|
}
|
|
96
|
-
if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && (0,
|
|
97
|
+
if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
98
|
+
exposure: true
|
|
99
|
+
})) {
|
|
97
100
|
var _this$props$editorRef;
|
|
98
101
|
// Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
|
|
99
102
|
// Ignored via go/ees005
|
|
@@ -118,7 +121,9 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
118
121
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
119
122
|
document.removeEventListener('click', this.handleClick, options);
|
|
120
123
|
}
|
|
121
|
-
if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && (0,
|
|
124
|
+
if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
125
|
+
exposure: true
|
|
126
|
+
})) {
|
|
122
127
|
var _this$props$editorRef2;
|
|
123
128
|
// Ignored via go/ees005
|
|
124
129
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
@@ -15,7 +15,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
15
15
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
16
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
-
var
|
|
18
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
19
|
var _analytics = require("../analytics");
|
|
20
20
|
var _editorAnalytics = require("../editor-analytics");
|
|
21
21
|
var _selection = require("../selection");
|
|
@@ -193,7 +193,7 @@ function canMoveUp(state) {
|
|
|
193
193
|
if (selection instanceof _state.NodeSelection && (0, _nodes.isMediaNode)(selection.node)) {
|
|
194
194
|
return true;
|
|
195
195
|
}
|
|
196
|
-
if (selection instanceof _state.TextSelection && !(0,
|
|
196
|
+
if (selection instanceof _state.TextSelection && !(0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
197
197
|
if (!selection.empty) {
|
|
198
198
|
return true;
|
|
199
199
|
}
|
|
@@ -209,7 +209,7 @@ function canMoveDown(state) {
|
|
|
209
209
|
if (selection instanceof _state.NodeSelection && (0, _nodes.isMediaNode)(selection.node)) {
|
|
210
210
|
return true;
|
|
211
211
|
}
|
|
212
|
-
if (selection instanceof _state.TextSelection && !(0,
|
|
212
|
+
if (selection instanceof _state.TextSelection && !(0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
213
213
|
if (!selection.empty) {
|
|
214
214
|
return true;
|
|
215
215
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -358,6 +358,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
358
358
|
ACTION_SUBJECT["EDITOR_PLUGIN_SELECTION_EXTENSION"] = "editorPluginSelectionExtension";
|
|
359
359
|
ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
|
|
360
360
|
ACTION_SUBJECT["AI_QUICK_PROMPT"] = "aiQuickPrompt";
|
|
361
|
+
ACTION_SUBJECT["AI_AUTOCOMPLETE"] = "aiAutocomplete";
|
|
361
362
|
ACTION_SUBJECT["USER_PREFERENCES"] = "userPreferences";
|
|
362
363
|
ACTION_SUBJECT["ALIGNMENT"] = "alignment";
|
|
363
364
|
ACTION_SUBJECT["OFFLINE_EDITING"] = "offlineEditing";
|
|
@@ -367,6 +368,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
367
368
|
ACTION_SUBJECT["BLOCK_MENU_ITEM"] = "blockMenuItem";
|
|
368
369
|
ACTION_SUBJECT["PASTE_ACTIONS_MENU"] = "pasteActionsMenu";
|
|
369
370
|
ACTION_SUBJECT["SYNCED_BLOCK"] = "syncedBlock";
|
|
371
|
+
ACTION_SUBJECT["NATIVE_EMBED"] = "nativeEmbed";
|
|
370
372
|
return ACTION_SUBJECT;
|
|
371
373
|
}({});
|
|
372
374
|
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -26,7 +26,9 @@ export const IconCard = ({
|
|
|
26
26
|
label
|
|
27
27
|
}) => {
|
|
28
28
|
return /*#__PURE__*/React.createElement(IconCardGlyph, {
|
|
29
|
-
"aria-label": label
|
|
29
|
+
"aria-label": label
|
|
30
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
31
|
+
,
|
|
30
32
|
style: {
|
|
31
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
32
34
|
width: '24px',
|
|
@@ -26,7 +26,9 @@ export const IconEmbed = ({
|
|
|
26
26
|
label
|
|
27
27
|
}) => {
|
|
28
28
|
return /*#__PURE__*/React.createElement(IconEmbedGlyph, {
|
|
29
|
-
"aria-label": label
|
|
29
|
+
"aria-label": label
|
|
30
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
31
|
+
,
|
|
30
32
|
style: {
|
|
31
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
32
34
|
width: '24px',
|
|
@@ -26,7 +26,9 @@ export const IconInline = ({
|
|
|
26
26
|
label
|
|
27
27
|
}) => {
|
|
28
28
|
return /*#__PURE__*/React.createElement(IconInlineGlyph, {
|
|
29
|
-
"aria-label": label
|
|
29
|
+
"aria-label": label
|
|
30
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
31
|
+
,
|
|
30
32
|
style: {
|
|
31
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
32
34
|
width: '24px',
|
|
@@ -28,7 +28,9 @@ export const IconUrl = ({
|
|
|
28
28
|
label
|
|
29
29
|
}) => {
|
|
30
30
|
return /*#__PURE__*/React.createElement(IconUrlGlyph, {
|
|
31
|
-
"aria-label": label
|
|
31
|
+
"aria-label": label
|
|
32
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
33
|
+
,
|
|
32
34
|
style: {
|
|
33
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
34
36
|
width: '24px',
|
|
@@ -82,6 +82,7 @@ function ElementList({
|
|
|
82
82
|
setColumnCount(getColumnCount(containerWidth));
|
|
83
83
|
const updatedScrollbarWidth = getScrollbarWidth();
|
|
84
84
|
if (updatedScrollbarWidth > 0) {
|
|
85
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
85
86
|
setScrollbarWidth(updatedScrollbarWidth);
|
|
86
87
|
}
|
|
87
88
|
}
|
|
@@ -506,8 +507,7 @@ const elementItemsWrapper = css({
|
|
|
506
507
|
padding: "var(--ds-space-025, 2px)",
|
|
507
508
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
508
509
|
'.ReactVirtualized__Grid': {
|
|
509
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
510
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
510
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-design-token-usage -- Ignored via go/DSP-18766
|
|
511
511
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
512
512
|
outline: 'none',
|
|
513
513
|
'&:focus': {
|
|
@@ -148,8 +148,12 @@ function ExtensionWithPluginState(props) {
|
|
|
148
148
|
const extensionContentStyles = expValEquals('platform_editor_extension_styles', 'isEnabled', true) ? extensionContent : content;
|
|
149
149
|
return jsx(Fragment, null, expValEquals('cc_editor_lcm_readonly_initial', 'isEnabled', true) ? null : showLegacyContentHeader && jsx(LegacyContentHeader, {
|
|
150
150
|
isNodeSelected: isNodeSelected,
|
|
151
|
-
isNodeHovered: isNodeHovered
|
|
152
|
-
|
|
151
|
+
isNodeHovered: isNodeHovered
|
|
152
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
153
|
+
,
|
|
154
|
+
onMouseEnter: () => handleMouseEvent(true)
|
|
155
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
156
|
+
,
|
|
153
157
|
onMouseLeave: () => handleMouseEvent(false)
|
|
154
158
|
}), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
155
159
|
isNodeSelected: isNodeSelected,
|
|
@@ -244,7 +248,9 @@ const Extension = props => {
|
|
|
244
248
|
});
|
|
245
249
|
|
|
246
250
|
// Ignored via go/ees005
|
|
247
|
-
return jsx(ExtensionWithPluginState
|
|
251
|
+
return jsx(ExtensionWithPluginState
|
|
252
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
253
|
+
, _extends({
|
|
248
254
|
widthState: {
|
|
249
255
|
width: width !== null && width !== void 0 ? width : 0,
|
|
250
256
|
lineLength
|
|
@@ -181,6 +181,7 @@ export const ExtensionLabel = ({
|
|
|
181
181
|
// Ignored via go/ees005
|
|
182
182
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
183
183
|
, _extends({}, i18n.configure, {
|
|
184
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
184
185
|
values: {
|
|
185
186
|
macroName: text
|
|
186
187
|
}
|
|
@@ -64,7 +64,9 @@ export class Extension extends Component {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
67
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
68
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
69
|
+
, {
|
|
68
70
|
providers: ['extensionProvider'],
|
|
69
71
|
providerFactory: this.providerFactory,
|
|
70
72
|
renderNode: this.renderWithProvider
|
|
@@ -27,6 +27,7 @@ export function UnknownMacroPlaceholder({
|
|
|
27
27
|
const value = String((_param$value = param === null || param === void 0 ? void 0 : param.value) !== null && _param$value !== void 0 ? _param$value : '').trim();
|
|
28
28
|
return `${key} = ${value}`;
|
|
29
29
|
};
|
|
30
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
30
31
|
const visibleParams = Object.entries(macroParams).filter(([key]) => !key.startsWith('_')).map(([key, param]) => formatParam(key, param)).join(' | ');
|
|
31
32
|
const headerText = visibleParams ? `${intl.formatMessage(messages.unknownMacroHeader, {
|
|
32
33
|
macroTitle
|
|
@@ -270,6 +270,7 @@ export function getAriaKeyshortcuts(keymap) {
|
|
|
270
270
|
case 'arrowdown':
|
|
271
271
|
return 'Arrow Down';
|
|
272
272
|
default:
|
|
273
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
273
274
|
return modifier.split('').join(' ');
|
|
274
275
|
}
|
|
275
276
|
}).join('+');
|
|
@@ -63,6 +63,7 @@ const Dropdown = ({
|
|
|
63
63
|
focusEditor();
|
|
64
64
|
}, [fireActionClickEvent, focusEditor, onConfigureClickCallback]);
|
|
65
65
|
return jsx(DropdownMenu, {
|
|
66
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
66
67
|
trigger: ({
|
|
67
68
|
onClick,
|
|
68
69
|
triggerRef,
|
|
@@ -75,7 +76,9 @@ const Dropdown = ({
|
|
|
75
76
|
iconBefore: jsx(ChevronDownIcon, {
|
|
76
77
|
label: configureLinkLabel,
|
|
77
78
|
size: "small"
|
|
78
|
-
})
|
|
79
|
+
})
|
|
80
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
81
|
+
,
|
|
79
82
|
onClick: e => {
|
|
80
83
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
81
84
|
fireLinkClickEvent();
|
|
@@ -768,11 +768,15 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
768
768
|
ariaActiveDescendant: ariaActiveDescendant,
|
|
769
769
|
ariaControls: linkSearchListId,
|
|
770
770
|
ariaAutoComplete: true,
|
|
771
|
-
describedById: screenReaderDescriptionId
|
|
771
|
+
describedById: screenReaderDescriptionId
|
|
772
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
773
|
+
,
|
|
772
774
|
ref: ele => this.urlInputContainer = ele,
|
|
773
775
|
testId: 'link-url',
|
|
774
776
|
onSubmit: this.handleSubmit,
|
|
775
|
-
onChange: this.updateInput
|
|
777
|
+
onChange: this.updateInput
|
|
778
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
779
|
+
,
|
|
776
780
|
autoFocus: {
|
|
777
781
|
preventScroll: true
|
|
778
782
|
},
|
|
@@ -795,7 +799,9 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
795
799
|
css: [inputLabel, textLabelMargin]
|
|
796
800
|
}, formatMessage(messages.textVisibleLabel)), jsx("div", {
|
|
797
801
|
css: [inputWrapper, inputWrapperPosition]
|
|
798
|
-
}, jsx(PanelTextInput
|
|
802
|
+
}, jsx(PanelTextInput
|
|
803
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
804
|
+
, {
|
|
799
805
|
ref: ele => this.displayTextInputContainer = ele,
|
|
800
806
|
testId: 'link-text',
|
|
801
807
|
onChange: this.updateTextInput,
|
|
@@ -837,14 +843,17 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
837
843
|
onMouseLeave: this.handleMouseLeaveResultItem
|
|
838
844
|
})));
|
|
839
845
|
if (expValEquals('platform_editor_a11y_escape_link_dialog', 'isEnabled', true)) {
|
|
840
|
-
return
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
846
|
+
return (
|
|
847
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
848
|
+
jsx(FocusLock, {
|
|
849
|
+
returnFocus: {
|
|
850
|
+
preventScroll: true
|
|
851
|
+
},
|
|
852
|
+
focusOptions: {
|
|
853
|
+
preventScroll: true
|
|
854
|
+
}
|
|
855
|
+
}, hyperlinkElement)
|
|
856
|
+
);
|
|
848
857
|
}
|
|
849
858
|
return hyperlinkElement;
|
|
850
859
|
}
|
|
@@ -35,9 +35,13 @@ export function HyperlinkAddToolbar({
|
|
|
35
35
|
timesViewed,
|
|
36
36
|
isOffline
|
|
37
37
|
}) {
|
|
38
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
38
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
39
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
40
|
+
, {
|
|
39
41
|
providers: ['activityProvider', 'searchProvider'],
|
|
40
|
-
providerFactory: providerFactory
|
|
42
|
+
providerFactory: providerFactory
|
|
43
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
44
|
+
,
|
|
41
45
|
renderNode: ({
|
|
42
46
|
activityProvider,
|
|
43
47
|
searchProvider
|
|
@@ -50,14 +50,18 @@ const LinkSearchList = ({
|
|
|
50
50
|
}, items.map((item, index) => jsx(ForwardedLinkSearchListItemNextWithIntl, {
|
|
51
51
|
id: `link-search-list-item-${index}`,
|
|
52
52
|
item: item,
|
|
53
|
-
selected: selectedIndex === index
|
|
53
|
+
selected: selectedIndex === index
|
|
54
|
+
// eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
55
|
+
,
|
|
54
56
|
onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(index),
|
|
55
57
|
onKeyDown: onKeyDown,
|
|
56
58
|
onMouseMove: onMouseMove,
|
|
57
59
|
onMouseEnter: onMouseEnter,
|
|
58
60
|
onMouseLeave: onMouseLeave,
|
|
59
61
|
onSelect: onSelect,
|
|
60
|
-
key: item.objectId
|
|
62
|
+
key: item.objectId
|
|
63
|
+
// eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
64
|
+
,
|
|
61
65
|
ref: el => listItemRefCallback === null || listItemRefCallback === void 0 ? void 0 : listItemRefCallback(el, item.objectId)
|
|
62
66
|
})));
|
|
63
67
|
}
|
|
@@ -10,7 +10,7 @@ export default function withActivityProvider(WrappedComponent) {
|
|
|
10
10
|
super(...args);
|
|
11
11
|
_defineProperty(this, "renderNode", providers => {
|
|
12
12
|
const {
|
|
13
|
-
providerFactory,
|
|
13
|
+
providerFactory: _providerFactory,
|
|
14
14
|
...props
|
|
15
15
|
} = this.props;
|
|
16
16
|
const {
|
|
@@ -28,7 +28,9 @@ export default function withActivityProvider(WrappedComponent) {
|
|
|
28
28
|
const {
|
|
29
29
|
providerFactory
|
|
30
30
|
} = this.props;
|
|
31
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
31
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
32
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
33
|
+
, {
|
|
32
34
|
providers: ['activityProvider'],
|
|
33
35
|
providerFactory: providerFactory,
|
|
34
36
|
renderNode: this.renderNode
|
|
@@ -19,8 +19,8 @@ const SMART_TO_ASCII = {
|
|
|
19
19
|
const FIND_SMART_CHAR = new RegExp(`[${Object.keys(SMART_TO_ASCII).join('')}]`, 'g');
|
|
20
20
|
export function filterChildrenBetween(doc, from, to, predicate) {
|
|
21
21
|
const results = [];
|
|
22
|
-
doc.nodesBetween(from, to, (node, pos,
|
|
23
|
-
if (predicate(node, pos,
|
|
22
|
+
doc.nodesBetween(from, to, (node, pos, _parent) => {
|
|
23
|
+
if (predicate(node, pos, _parent)) {
|
|
24
24
|
results.push({
|
|
25
25
|
node,
|
|
26
26
|
pos
|
|
@@ -43,7 +43,7 @@ export function transformNonTextNodesToText(from, to, tr) {
|
|
|
43
43
|
inlineCard: inlineCardNodeType
|
|
44
44
|
} = schema.nodes;
|
|
45
45
|
const nodesToChange = [];
|
|
46
|
-
doc.nodesBetween(from, to, (node, pos,
|
|
46
|
+
doc.nodesBetween(from, to, (node, pos, _parent) => {
|
|
47
47
|
if ([mentionNodeType, textNodeType, emojiNodeType, inlineCardNodeType].includes(node.type)) {
|
|
48
48
|
nodesToChange.push({
|
|
49
49
|
node,
|
|
@@ -67,6 +67,8 @@ export function transformNonTextNodesToText(from, to, tr) {
|
|
|
67
67
|
const startPositionInSelection = Math.max(pos, from);
|
|
68
68
|
const endPositionInSelection = Math.min(pos + node.nodeSize, to);
|
|
69
69
|
const textForReplacing = doc.textBetween(startPositionInSelection, endPositionInSelection);
|
|
70
|
+
|
|
71
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
70
72
|
const newText = textForReplacing.replace(FIND_SMART_CHAR, match => {
|
|
71
73
|
var _SMART_TO_ASCII$match;
|
|
72
74
|
return (_SMART_TO_ASCII$match = SMART_TO_ASCII[match]) !== null && _SMART_TO_ASCII$match !== void 0 ? _SMART_TO_ASCII$match : match;
|
|
@@ -52,7 +52,9 @@ export const InlineImageCard = ({
|
|
|
52
52
|
return jsx(Fragment, null, jsx(MediaImage, {
|
|
53
53
|
dataURI: preview.dataURI,
|
|
54
54
|
alt: alt,
|
|
55
|
-
previewOrientation: preview.orientation
|
|
55
|
+
previewOrientation: preview.orientation
|
|
56
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
57
|
+
,
|
|
56
58
|
onImageLoad: () => {
|
|
57
59
|
onImageLoad(preview);
|
|
58
60
|
},
|