@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
|
@@ -141,10 +141,14 @@ function ExtensionWithPluginState(props) {
|
|
|
141
141
|
var extensionContentStyles = expValEquals('platform_editor_extension_styles', 'isEnabled', true) ? extensionContent : content;
|
|
142
142
|
return jsx(Fragment, null, expValEquals('cc_editor_lcm_readonly_initial', 'isEnabled', true) ? null : showLegacyContentHeader && jsx(LegacyContentHeader, {
|
|
143
143
|
isNodeSelected: isNodeSelected,
|
|
144
|
-
isNodeHovered: isNodeHovered
|
|
144
|
+
isNodeHovered: isNodeHovered
|
|
145
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
146
|
+
,
|
|
145
147
|
onMouseEnter: function onMouseEnter() {
|
|
146
148
|
return handleMouseEvent(true);
|
|
147
|
-
}
|
|
149
|
+
}
|
|
150
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
151
|
+
,
|
|
148
152
|
onMouseLeave: function onMouseLeave() {
|
|
149
153
|
return handleMouseEvent(false);
|
|
150
154
|
}
|
|
@@ -242,7 +246,9 @@ var Extension = function Extension(props) {
|
|
|
242
246
|
width = _useSharedPluginState.width;
|
|
243
247
|
|
|
244
248
|
// Ignored via go/ees005
|
|
245
|
-
return jsx(ExtensionWithPluginState
|
|
249
|
+
return jsx(ExtensionWithPluginState
|
|
250
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
251
|
+
, _extends({
|
|
246
252
|
widthState: {
|
|
247
253
|
width: width !== null && width !== void 0 ? width : 0,
|
|
248
254
|
lineLength: lineLength
|
|
@@ -181,6 +181,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
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
|
}
|
|
@@ -76,7 +76,9 @@ export var Extension = /*#__PURE__*/function (_Component) {
|
|
|
76
76
|
}, {
|
|
77
77
|
key: "render",
|
|
78
78
|
value: function render() {
|
|
79
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
79
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
80
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
81
|
+
, {
|
|
80
82
|
providers: ['extensionProvider'],
|
|
81
83
|
providerFactory: this.providerFactory,
|
|
82
84
|
renderNode: this.renderWithProvider
|
|
@@ -27,6 +27,7 @@ export function UnknownMacroPlaceholder(_ref) {
|
|
|
27
27
|
var value = String((_param$value = param === null || param === void 0 ? void 0 : param.value) !== null && _param$value !== void 0 ? _param$value : '').trim();
|
|
28
28
|
return "".concat(key, " = ").concat(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
|
var visibleParams = Object.entries(macroParams).filter(function (_ref2) {
|
|
31
32
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
32
33
|
key = _ref3[0];
|
|
@@ -274,6 +274,7 @@ export function getAriaKeyshortcuts(keymap) {
|
|
|
274
274
|
case 'arrowdown':
|
|
275
275
|
return 'Arrow Down';
|
|
276
276
|
default:
|
|
277
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
277
278
|
return modifier.split('').join(' ');
|
|
278
279
|
}
|
|
279
280
|
}).join('+');
|
|
@@ -63,6 +63,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
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: function trigger(_ref3) {
|
|
67
68
|
var _onClick = _ref3.onClick,
|
|
68
69
|
triggerRef = _ref3.triggerRef,
|
|
@@ -75,7 +76,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
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: function onClick(e) {
|
|
80
83
|
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
81
84
|
fireLinkClickEvent();
|
|
@@ -912,13 +912,17 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
912
912
|
ariaActiveDescendant: ariaActiveDescendant,
|
|
913
913
|
ariaControls: linkSearchListId,
|
|
914
914
|
ariaAutoComplete: true,
|
|
915
|
-
describedById: screenReaderDescriptionId
|
|
915
|
+
describedById: screenReaderDescriptionId
|
|
916
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
917
|
+
,
|
|
916
918
|
ref: function ref(ele) {
|
|
917
919
|
return _this3.urlInputContainer = ele;
|
|
918
920
|
},
|
|
919
921
|
testId: 'link-url',
|
|
920
922
|
onSubmit: this.handleSubmit,
|
|
921
|
-
onChange: this.updateInput
|
|
923
|
+
onChange: this.updateInput
|
|
924
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
925
|
+
,
|
|
922
926
|
autoFocus: {
|
|
923
927
|
preventScroll: true
|
|
924
928
|
},
|
|
@@ -941,7 +945,9 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
941
945
|
css: [inputLabel, textLabelMargin]
|
|
942
946
|
}, formatMessage(messages.textVisibleLabel)), jsx("div", {
|
|
943
947
|
css: [inputWrapper, inputWrapperPosition]
|
|
944
|
-
}, jsx(PanelTextInput
|
|
948
|
+
}, jsx(PanelTextInput
|
|
949
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
950
|
+
, {
|
|
945
951
|
ref: function ref(ele) {
|
|
946
952
|
return _this3.displayTextInputContainer = ele;
|
|
947
953
|
},
|
|
@@ -985,14 +991,17 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
985
991
|
onMouseLeave: this.handleMouseLeaveResultItem
|
|
986
992
|
})));
|
|
987
993
|
if (expValEquals('platform_editor_a11y_escape_link_dialog', 'isEnabled', true)) {
|
|
988
|
-
return
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
994
|
+
return (
|
|
995
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
996
|
+
jsx(FocusLock, {
|
|
997
|
+
returnFocus: {
|
|
998
|
+
preventScroll: true
|
|
999
|
+
},
|
|
1000
|
+
focusOptions: {
|
|
1001
|
+
preventScroll: true
|
|
1002
|
+
}
|
|
1003
|
+
}, hyperlinkElement)
|
|
1004
|
+
);
|
|
996
1005
|
}
|
|
997
1006
|
return hyperlinkElement;
|
|
998
1007
|
}
|
|
@@ -36,9 +36,13 @@ export function HyperlinkAddToolbar(_ref2) {
|
|
|
36
36
|
searchSessionId = _ref2.searchSessionId,
|
|
37
37
|
timesViewed = _ref2.timesViewed,
|
|
38
38
|
isOffline = _ref2.isOffline;
|
|
39
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
39
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
40
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
41
|
+
, {
|
|
40
42
|
providers: ['activityProvider', 'searchProvider'],
|
|
41
|
-
providerFactory: providerFactory
|
|
43
|
+
providerFactory: providerFactory
|
|
44
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
45
|
+
,
|
|
42
46
|
renderNode: function renderNode(_ref3) {
|
|
43
47
|
var activityProvider = _ref3.activityProvider,
|
|
44
48
|
searchProvider = _ref3.searchProvider;
|
|
@@ -50,7 +50,9 @@ var LinkSearchList = function LinkSearchList(_ref) {
|
|
|
50
50
|
return jsx(ForwardedLinkSearchListItemNextWithIntl, {
|
|
51
51
|
id: "link-search-list-item-".concat(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: function onFocus() {
|
|
55
57
|
return _onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(index);
|
|
56
58
|
},
|
|
@@ -59,7 +61,9 @@ var LinkSearchList = function LinkSearchList(_ref) {
|
|
|
59
61
|
onMouseEnter: onMouseEnter,
|
|
60
62
|
onMouseLeave: onMouseLeave,
|
|
61
63
|
onSelect: onSelect,
|
|
62
|
-
key: item.objectId
|
|
64
|
+
key: item.objectId
|
|
65
|
+
// eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
66
|
+
,
|
|
63
67
|
ref: function ref(el) {
|
|
64
68
|
return listItemRefCallback === null || listItemRefCallback === void 0 ? void 0 : listItemRefCallback(el, item.objectId);
|
|
65
69
|
}
|
|
@@ -24,7 +24,7 @@ export default function withActivityProvider(WrappedComponent) {
|
|
|
24
24
|
_this = _callSuper(this, WithActivityProvider, [].concat(args));
|
|
25
25
|
_defineProperty(_this, "renderNode", function (providers) {
|
|
26
26
|
var _ref = _this.props,
|
|
27
|
-
|
|
27
|
+
_providerFactory = _ref.providerFactory,
|
|
28
28
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
29
|
var activityProvider = providers.activityProvider;
|
|
30
30
|
|
|
@@ -41,7 +41,9 @@ export default function withActivityProvider(WrappedComponent) {
|
|
|
41
41
|
key: "render",
|
|
42
42
|
value: function render() {
|
|
43
43
|
var providerFactory = this.props.providerFactory;
|
|
44
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
44
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
45
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
46
|
+
, {
|
|
45
47
|
providers: ['activityProvider'],
|
|
46
48
|
providerFactory: providerFactory,
|
|
47
49
|
renderNode: this.renderNode
|
|
@@ -19,8 +19,8 @@ var SMART_TO_ASCII = {
|
|
|
19
19
|
var FIND_SMART_CHAR = new RegExp("[".concat(Object.keys(SMART_TO_ASCII).join(''), "]"), 'g');
|
|
20
20
|
export function filterChildrenBetween(doc, from, to, predicate) {
|
|
21
21
|
var results = [];
|
|
22
|
-
doc.nodesBetween(from, to, function (node, pos,
|
|
23
|
-
if (predicate(node, pos,
|
|
22
|
+
doc.nodesBetween(from, to, function (node, pos, _parent) {
|
|
23
|
+
if (predicate(node, pos, _parent)) {
|
|
24
24
|
results.push({
|
|
25
25
|
node: node,
|
|
26
26
|
pos: pos
|
|
@@ -38,7 +38,7 @@ export function transformNonTextNodesToText(from, to, tr) {
|
|
|
38
38
|
emojiNodeType = _schema$nodes.emoji,
|
|
39
39
|
inlineCardNodeType = _schema$nodes.inlineCard;
|
|
40
40
|
var nodesToChange = [];
|
|
41
|
-
doc.nodesBetween(from, to, function (node, pos,
|
|
41
|
+
doc.nodesBetween(from, to, function (node, pos, _parent) {
|
|
42
42
|
if ([mentionNodeType, textNodeType, emojiNodeType, inlineCardNodeType].includes(node.type)) {
|
|
43
43
|
nodesToChange.push({
|
|
44
44
|
node: node,
|
|
@@ -61,6 +61,8 @@ export function transformNonTextNodesToText(from, to, tr) {
|
|
|
61
61
|
var startPositionInSelection = Math.max(pos, from);
|
|
62
62
|
var endPositionInSelection = Math.min(pos + node.nodeSize, to);
|
|
63
63
|
var textForReplacing = doc.textBetween(startPositionInSelection, endPositionInSelection);
|
|
64
|
+
|
|
65
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
64
66
|
var _newText = textForReplacing.replace(FIND_SMART_CHAR, function (match) {
|
|
65
67
|
var _SMART_TO_ASCII$match;
|
|
66
68
|
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 var InlineImageCard = function InlineImageCard(_ref) {
|
|
|
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: function onImageLoad() {
|
|
57
59
|
_onImageLoad(preview);
|
|
58
60
|
},
|
|
@@ -139,7 +139,9 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
139
139
|
value: mediaClient
|
|
140
140
|
}, jsx(InlineImageCard, {
|
|
141
141
|
dimensions: dimensions,
|
|
142
|
-
identifier: identifier
|
|
142
|
+
identifier: identifier
|
|
143
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
144
|
+
,
|
|
143
145
|
renderError: function renderError() {
|
|
144
146
|
return jsx(InlineImageCardErrorView, {
|
|
145
147
|
message: formatMessage(messages.unableToLoadContent)
|
|
@@ -210,7 +212,9 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
210
212
|
var mediaViewer = useMemo(function () {
|
|
211
213
|
if (isMediaViewerVisible && mediaClient !== null && mediaClient !== void 0 && mediaClient.mediaClientConfig) {
|
|
212
214
|
return /*#__PURE__*/ReactDOM.createPortal(jsx(MediaViewer, {
|
|
213
|
-
collectionName: identifier.collectionName || ''
|
|
215
|
+
collectionName: identifier.collectionName || ''
|
|
216
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
217
|
+
,
|
|
214
218
|
items: [identifier],
|
|
215
219
|
mediaClientConfig: mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig,
|
|
216
220
|
selectedItem: identifier,
|
|
@@ -89,7 +89,9 @@ export var CommentBadge = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
89
89
|
}, jsx(Tooltip, {
|
|
90
90
|
position: "top",
|
|
91
91
|
content: title
|
|
92
|
-
}, jsx(CustomThemeButton
|
|
92
|
+
}, jsx(CustomThemeButton
|
|
93
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
94
|
+
, {
|
|
93
95
|
style: {
|
|
94
96
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
95
97
|
height: badgeDimensions,
|
|
@@ -33,7 +33,9 @@ export var CommentBadgeNext = function CommentBadgeNext(_ref) {
|
|
|
33
33
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
34
34
|
position: "top",
|
|
35
35
|
content: title
|
|
36
|
-
}, /*#__PURE__*/React.createElement(Pressable
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Pressable
|
|
37
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
38
|
+
, {
|
|
37
39
|
xcss: [baseStyles, mediumBadgeStyles],
|
|
38
40
|
padding: "space.0",
|
|
39
41
|
onClick: onClick,
|
|
@@ -81,7 +81,9 @@ export var MediaBadges = function MediaBadges(_ref) {
|
|
|
81
81
|
as: "div",
|
|
82
82
|
testId: "media-badges",
|
|
83
83
|
"data-media-badges": "true",
|
|
84
|
-
contentEditable: false
|
|
84
|
+
contentEditable: false
|
|
85
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
86
|
+
,
|
|
85
87
|
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles]
|
|
86
88
|
}, children);
|
|
87
89
|
};
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "112.7.3";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorWideLayoutWidth,
|
|
2
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorWideLayoutWidth, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { BODIED_EXT_PADDING } from '../styles/shared/extension';
|
|
6
5
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles/shared/layout';
|
|
7
6
|
import { tableCellPadding } from '../styles/shared/table';
|
|
@@ -52,17 +51,12 @@ export var getParentNodeWidth = function getParentNodeWidth(pos, state, containe
|
|
|
52
51
|
};
|
|
53
52
|
switch (node.type) {
|
|
54
53
|
case schema.nodes.layoutSection:
|
|
55
|
-
// the extra width of the layout does not add to the width of the area the table can be inside
|
|
56
|
-
if (!expValEquals('platform_editor_nested_table_refresh_width_fix', 'isEnabled', true)) {
|
|
57
|
-
parentWidth += akLayoutGutterOffset * 2; // extra width that gets added to layout
|
|
58
|
-
}
|
|
59
|
-
|
|
60
54
|
// Calculate width of parent layout column when
|
|
61
55
|
// Parallel layout with viewport greater than 1024px
|
|
62
56
|
// OR side panel of an extension is open and change the node width to smaller than containerWidth
|
|
63
57
|
if (containerWidth.width > gridMediumMaxWidth || ((_contextPanelPluginKe = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe === void 0 ? void 0 : _contextPanelPluginKe.contents.length) > 0 && ((_contextPanelPluginKe2 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe2 === void 0 ? void 0 : _contextPanelPluginKe2.contents[0]) !== undefined) {
|
|
64
58
|
// margin between sections
|
|
65
|
-
parentWidth -=
|
|
59
|
+
parentWidth -= fg('platform_editor_nested_dnd_styles_changes') ? (LAYOUT_SECTION_MARGIN + NESTED_DND_MARGIN_OFFSET + 2) * (node.childCount - 1) : (LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1);
|
|
66
60
|
var $pos = state.doc.resolve(pos);
|
|
67
61
|
var column = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.layoutColumn]);
|
|
68
62
|
if (column && column.node && !isNaN(column.node.attrs.width)) {
|
|
@@ -72,7 +66,7 @@ export var getParentNodeWidth = function getParentNodeWidth(pos, state, containe
|
|
|
72
66
|
}
|
|
73
67
|
|
|
74
68
|
// account for the padding of the parent node
|
|
75
|
-
parentWidth -=
|
|
69
|
+
parentWidth -= fg('platform_editor_nested_dnd_styles_changes') ? (LAYOUT_COLUMN_PADDING + NESTED_DND_GUTTER_OFFSET) * 2 : LAYOUT_COLUMN_PADDING * 2;
|
|
76
70
|
break;
|
|
77
71
|
case schema.nodes.bodiedExtension:
|
|
78
72
|
parentWidth -= BODIED_EXT_PADDING * 2;
|
|
@@ -115,7 +109,7 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
|
115
109
|
return parent ? parent.node : null;
|
|
116
110
|
};
|
|
117
111
|
var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled, breakoutWidth) {
|
|
118
|
-
if (breakoutWidth
|
|
112
|
+
if (breakoutWidth) {
|
|
119
113
|
return isFullWidthModeEnabled ? Math.min(containerWidth.lineLength, breakoutWidth) :
|
|
120
114
|
// container width minus breakout padding
|
|
121
115
|
// --ak-editor--breakout-full-page-guttering-padding = (--ak-editor--large-gutter-padding * 2) + --ak-editor--default-gutter-padding
|
|
@@ -97,13 +97,13 @@ var linkify = function linkify(state) {
|
|
|
97
97
|
//
|
|
98
98
|
if (!links[ln].schema) {
|
|
99
99
|
// Ignored via go/ees005
|
|
100
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
100
|
+
// eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
101
101
|
urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
|
|
102
102
|
// Ignored via go/ees005
|
|
103
103
|
// eslint-disable-next-line require-unicode-regexp
|
|
104
104
|
} else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
|
|
105
105
|
// Ignored via go/ees005
|
|
106
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
106
|
+
// eslint-disable-next-line require-unicode-regexp, @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
107
107
|
urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
|
|
108
108
|
} else {
|
|
109
109
|
urlText = state.md.normalizeLinkText(urlText);
|
|
@@ -322,7 +322,9 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
return /*#__PURE__*/React.createElement(Resizer, {
|
|
325
|
-
ref: resizerRef
|
|
325
|
+
ref: resizerRef
|
|
326
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
327
|
+
,
|
|
326
328
|
enable: {
|
|
327
329
|
left: true,
|
|
328
330
|
right: true
|
|
@@ -127,6 +127,8 @@ var ResizerNext = function ResizerNext(props, ref) {
|
|
|
127
127
|
alignItems: handlePositioning === 'adjacent' ? 'center' : undefined
|
|
128
128
|
};
|
|
129
129
|
var offset = handlePositioning === 'adjacent' ? "calc(".concat(baseHandleStyles.width, " * -1)") : "calc(".concat(baseHandleStyles.width, " * -0.5)");
|
|
130
|
+
|
|
131
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
130
132
|
var nextHandleStyles = SUPPORTED_HANDLES.reduce(function (result, position) {
|
|
131
133
|
return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, position, _objectSpread(_objectSpread({}, baseHandleStyles), {}, _defineProperty({}, position, offset), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles[position])));
|
|
132
134
|
}, {});
|
|
@@ -194,7 +196,9 @@ var ResizerNext = function ResizerNext(props, ref) {
|
|
|
194
196
|
return snapGap;
|
|
195
197
|
}, [snap, snapGap]);
|
|
196
198
|
return /*#__PURE__*/React.createElement(Resizable, _extends({
|
|
197
|
-
ref: resizable
|
|
199
|
+
ref: resizable
|
|
200
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
201
|
+
,
|
|
198
202
|
size: {
|
|
199
203
|
width: width !== null && width !== void 0 ? width : 'auto',
|
|
200
204
|
// just content itself (no paddings)
|
|
@@ -24,6 +24,7 @@ export var EditorToolbarProvider = function EditorToolbarProvider(_ref) {
|
|
|
24
24
|
editorToolbarDockingPreference = _ref.editorToolbarDockingPreference,
|
|
25
25
|
isOffline = _ref.isOffline;
|
|
26
26
|
return /*#__PURE__*/React.createElement(EditorToolbarContext.Provider, {
|
|
27
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
27
28
|
value: {
|
|
28
29
|
editorView: editorView,
|
|
29
30
|
editorAppearance: editorAppearance,
|
|
@@ -54,6 +54,7 @@ export var AssistiveText = function AssistiveText(_ref) {
|
|
|
54
54
|
}, [isInFocus]);
|
|
55
55
|
useEffect(function () {
|
|
56
56
|
if (!debounced) {
|
|
57
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
57
58
|
debounceStatusUpdate();
|
|
58
59
|
return function () {
|
|
59
60
|
debounceStatusUpdate.cancel();
|
|
@@ -62,10 +63,13 @@ export var AssistiveText = function AssistiveText(_ref) {
|
|
|
62
63
|
}, [assistiveText, isInFocus, debounced, debounceStatusUpdate]);
|
|
63
64
|
useEffect(function () {
|
|
64
65
|
if (debounced) {
|
|
66
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
65
67
|
setBump(function (prevBump) {
|
|
66
68
|
return !prevBump;
|
|
67
69
|
});
|
|
70
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
68
71
|
setDebounced(true);
|
|
72
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
69
73
|
setSilenced(!isInFocus);
|
|
70
74
|
}
|
|
71
75
|
}, [assistiveText, isInFocus, debounced]);
|
|
@@ -65,7 +65,9 @@ export var ContextPanelWidthProvider = /*#__PURE__*/function (_React$Component)
|
|
|
65
65
|
var _this$state = this.state,
|
|
66
66
|
width = _this$state.width,
|
|
67
67
|
positionedOverEditor = _this$state.positionedOverEditor;
|
|
68
|
-
return /*#__PURE__*/React.createElement(Provider
|
|
68
|
+
return /*#__PURE__*/React.createElement(Provider
|
|
69
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
70
|
+
, {
|
|
69
71
|
value: {
|
|
70
72
|
width: width,
|
|
71
73
|
positionedOverEditor: positionedOverEditor,
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "112.7.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -94,7 +94,9 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
94
94
|
}, /*#__PURE__*/React.createElement(Button
|
|
95
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
96
96
|
, {
|
|
97
|
-
className: className
|
|
97
|
+
className: className
|
|
98
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
99
|
+
,
|
|
98
100
|
ref: function ref(buttonElement) {
|
|
99
101
|
setSpotlightReferenceElement(buttonElement);
|
|
100
102
|
if (forwardedRef && editorExperiment('platform_synced_block', true)) {
|
|
@@ -105,7 +107,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
110
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
109
111
|
,
|
|
110
112
|
theme: function theme(adgTheme, themeProps) {
|
|
111
113
|
var _adgTheme = adgTheme(themeProps),
|
|
@@ -230,7 +230,9 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
230
230
|
ref: hoverLinkButtonRef,
|
|
231
231
|
xcss: linkStylesCommon,
|
|
232
232
|
href: url,
|
|
233
|
-
target: "_blank"
|
|
233
|
+
target: "_blank"
|
|
234
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
235
|
+
,
|
|
234
236
|
style: {
|
|
235
237
|
paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
|
|
236
238
|
},
|
|
@@ -50,7 +50,9 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
|
50
50
|
}, {
|
|
51
51
|
key: "render",
|
|
52
52
|
value: function render() {
|
|
53
|
-
return /*#__PURE__*/React.createElement(WithProviders
|
|
53
|
+
return /*#__PURE__*/React.createElement(WithProviders
|
|
54
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
55
|
+
, {
|
|
54
56
|
providers: ['mentionProvider', 'profilecardProvider'],
|
|
55
57
|
providerFactory: this.providerFactory,
|
|
56
58
|
renderNode: this.renderWithProvider
|
|
@@ -14,7 +14,7 @@ import rafSchedule from 'raf-schd';
|
|
|
14
14
|
import { createPortal, flushSync } from 'react-dom';
|
|
15
15
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
-
import {
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
18
|
import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
|
|
19
19
|
// Ignored via go/ees005
|
|
20
20
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -64,7 +64,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
64
64
|
returnFocusOnDeactivate: false
|
|
65
65
|
};
|
|
66
66
|
var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
|
|
67
|
-
_this.focusTrap = createFocusTrap(popup,
|
|
67
|
+
_this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) ? trapConfig : defaultTrapConfig);
|
|
68
68
|
_this.focusTrap.activate();
|
|
69
69
|
}));
|
|
70
70
|
return _this;
|
|
@@ -187,7 +187,9 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
187
187
|
// Ideally, Resizable would let you pass in the component rather than
|
|
188
188
|
// the div. For now, we just apply the same styles using CSS
|
|
189
189
|
return /*#__PURE__*/React.createElement(Resizable, {
|
|
190
|
-
ref: this.resizable
|
|
190
|
+
ref: this.resizable
|
|
191
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
192
|
+
,
|
|
191
193
|
size: {
|
|
192
194
|
width: nonZeroWidth,
|
|
193
195
|
// just content itself (no paddings)
|
|
@@ -236,7 +236,9 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
236
236
|
return unbind;
|
|
237
237
|
}, [handleMouseMove, props.allowOutsideSelection, tablePopupRef]);
|
|
238
238
|
return jsx(Popup, {
|
|
239
|
-
target: props.target
|
|
239
|
+
target: props.target
|
|
240
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
241
|
+
,
|
|
240
242
|
offset: [0, 3],
|
|
241
243
|
mountTo: props.popupsMountPoint,
|
|
242
244
|
boundariesElement: props.popupsBoundariesElement,
|
|
@@ -4,6 +4,7 @@ import getColorMessage from './getColorMessage';
|
|
|
4
4
|
import paletteMessages from './paletteMessages';
|
|
5
5
|
var borderColorPalette = [];
|
|
6
6
|
colorPalette.forEach(function (label, color) {
|
|
7
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
7
8
|
var key = label.toLowerCase().replace(' ', '-');
|
|
8
9
|
var message = getColorMessage(paletteMessages, key);
|
|
9
10
|
borderColorPalette.push({
|
|
@@ -3,6 +3,7 @@ import getColorMessage from './getColorMessage';
|
|
|
3
3
|
import paletteMessages from './paletteMessages';
|
|
4
4
|
var cellBackgroundColorPalette = [];
|
|
5
5
|
tableBackgroundColorPalette.forEach(function (label, color) {
|
|
6
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
6
7
|
var key = label.toLowerCase().replace(' ', '-');
|
|
7
8
|
var message = getColorMessage(paletteMessages, key);
|
|
8
9
|
cellBackgroundColorPalette.push({
|
|
@@ -41,7 +41,7 @@ export var EditorDiagonalLineIcon = function EditorDiagonalLineIcon() {
|
|
|
41
41
|
colorMode = _useThemeObserver.colorMode;
|
|
42
42
|
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #626F86)" : "var(--ds-background-accent-gray-subtle, #8590A2)";
|
|
43
43
|
return (
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
44
|
+
// 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)
|
|
45
45
|
jsx(DiagonalLineGlyph, {
|
|
46
46
|
"aria-label": "",
|
|
47
47
|
style: {
|
|
@@ -58,9 +58,13 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
58
58
|
var currentIndex = currentSelectedItemIndex;
|
|
59
59
|
var list = getFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
60
60
|
var currentElement = list[currentIndex];
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
61
63
|
if (currentElement && currentElement.getAttribute('aria-disabled') === 'true') {
|
|
62
64
|
var _list$focusIndex;
|
|
65
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
63
66
|
var focusIndex = incrementIndex(list);
|
|
67
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
64
68
|
(_list$focusIndex = list[focusIndex]) === null || _list$focusIndex === void 0 || _list$focusIndex.focus();
|
|
65
69
|
}
|
|
66
70
|
}, [currentSelectedItemIndex, onSelection, incrementIndex, decrementIndex]);
|