@atlaskit/editor-plugin-table 15.0.10 → 15.0.11
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 +10 -0
- package/dist/cjs/nodeviews/TableResizer.js +8 -7
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +2 -2
- package/dist/cjs/ui/toolbar.js +0 -1
- package/dist/es2019/nodeviews/TableResizer.js +8 -7
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +2 -2
- package/dist/es2019/ui/toolbar.js +0 -1
- package/dist/esm/nodeviews/TableResizer.js +8 -7
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +2 -2
- package/dist/esm/ui/toolbar.js +0 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 15.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef001bf65d48f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef001bf65d48f) -
|
|
8
|
+
Remove usage of `platform_editor_toolbar_aifc` inside editor packages - instead rely on checking
|
|
9
|
+
for new toolbar plugin option, make `enableNewToolbarExperience` mandatory for consumers to opt in
|
|
10
|
+
to new toolbar experience
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 15.0.10
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -120,7 +120,7 @@ var selector = function selector(states) {
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
123
|
-
var _editorView$state, _pluginInjectionApi$a2;
|
|
123
|
+
var _editorView$state, _pluginInjectionApi$a2, _pluginInjectionApi$u2;
|
|
124
124
|
var children = _ref.children,
|
|
125
125
|
width = _ref.width,
|
|
126
126
|
maxWidth = _ref.maxWidth,
|
|
@@ -162,6 +162,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
162
162
|
setSnappingEnabled = _useState2[1];
|
|
163
163
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
164
164
|
formatMessage = _useIntl.formatMessage;
|
|
165
|
+
var isToolbarAIFCEnabled = Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar);
|
|
165
166
|
var currentSelection = (_editorView$state = editorView.state) === null || _editorView$state === void 0 ? void 0 : _editorView$state.selection;
|
|
166
167
|
var tableFromSelection = (0, _react.useMemo)(function () {
|
|
167
168
|
return (0, _utils.findTable)(currentSelection);
|
|
@@ -265,7 +266,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
265
266
|
tr.setMeta(_tableAnalytics.META_KEYS.OVERFLOW_TRIGGER, {
|
|
266
267
|
name: _analytics.TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED
|
|
267
268
|
});
|
|
268
|
-
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ||
|
|
269
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) || isToolbarAIFCEnabled) {
|
|
269
270
|
var _pluginInjectionApi$u;
|
|
270
271
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u === void 0 || _pluginInjectionApi$u.commands.setCurrentUserIntent('resizing')({
|
|
271
272
|
tr: tr
|
|
@@ -277,7 +278,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
277
278
|
if (onResizeStart) {
|
|
278
279
|
onResizeStart();
|
|
279
280
|
}
|
|
280
|
-
}, [startMeasure, editorView, displayGapCursor, node.attrs.localId, tableRef, isTableScalingEnabled,
|
|
281
|
+
}, [startMeasure, editorView, displayGapCursor, node.attrs.localId, tableRef, isToolbarAIFCEnabled, isTableScalingEnabled, isFullWidthModeEnabled, lineLength, containerWidth, excludeGuidelineConfig, displayGuideline, onResizeStart, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u2 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u2 === void 0 ? void 0 : _pluginInjectionApi$u2.commands]);
|
|
281
282
|
var handleResize = (0, _react.useCallback)(
|
|
282
283
|
// Ignored via go/ees005
|
|
283
284
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -342,9 +343,9 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
342
343
|
tableRef: null
|
|
343
344
|
});
|
|
344
345
|
tr.setMeta('is-resizer-resizing', false);
|
|
345
|
-
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ||
|
|
346
|
-
var _pluginInjectionApi$
|
|
347
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$
|
|
346
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) || isToolbarAIFCEnabled) {
|
|
347
|
+
var _pluginInjectionApi$u3;
|
|
348
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u3 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u3 === void 0 || _pluginInjectionApi$u3.commands.setCurrentUserIntent('default')({
|
|
348
349
|
tr: tr
|
|
349
350
|
});
|
|
350
351
|
}
|
|
@@ -414,7 +415,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
414
415
|
(_insm$session2 = _insm.insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableResize');
|
|
415
416
|
}
|
|
416
417
|
return newWidth;
|
|
417
|
-
}, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef,
|
|
418
|
+
}, [editorView, getPos, node, isCommentEditor, widthToWidest, isToolbarAIFCEnabled, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, pluginInjectionApi, attachAnalyticsEvent, tableRef, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
|
|
418
419
|
var handleTableSizeChangeOnKeypress = (0, _react.useCallback)(function (step) {
|
|
419
420
|
var newWidth = width + step;
|
|
420
421
|
if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
@@ -25,7 +25,6 @@ var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
|
25
25
|
var _paintBucketEditorBackgroundColor = _interopRequireDefault(require("@atlaskit/icon/core/migration/paint-bucket--editor-background-color"));
|
|
26
26
|
var _primitives = require("@atlaskit/primitives");
|
|
27
27
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
28
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
29
28
|
var _toggle = _interopRequireDefault(require("@atlaskit/toggle"));
|
|
30
29
|
var _commands = require("../../pm-plugins/commands");
|
|
31
30
|
var _commandsWithAnalytics = require("../../pm-plugins/commands/commands-with-analytics");
|
|
@@ -239,6 +238,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
239
238
|
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect),
|
|
240
239
|
menuItems = _convertToDropdownIte.menuItems,
|
|
241
240
|
menuCallback = _convertToDropdownIte.menuCallback;
|
|
241
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
|
|
242
242
|
var handleSubMenuRef = function handleSubMenuRef(ref) {
|
|
243
243
|
var parent = (0, _utils.closestElement)(
|
|
244
244
|
// Ignored via go/ees005
|
|
@@ -526,7 +526,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
526
526
|
boundariesElement: boundariesElement,
|
|
527
527
|
scrollableElement: scrollableElement
|
|
528
528
|
});
|
|
529
|
-
return
|
|
529
|
+
return isToolbarAIFCEnabled ? (0, _react2.jsx)(_userIntent.UserIntentPopupWrapper, {
|
|
530
530
|
api: api
|
|
531
531
|
}, Menu) : Menu;
|
|
532
532
|
});
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -115,7 +115,6 @@ var getToolbarMenuConfig = exports.getToolbarMenuConfig = function getToolbarMen
|
|
|
115
115
|
id: 'editor.table.tableOptions',
|
|
116
116
|
type: 'dropdown',
|
|
117
117
|
testId: 'table_options',
|
|
118
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
119
118
|
icon: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? undefined : _customizePreferences.default,
|
|
120
119
|
iconBefore: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? _customizePreferences.default : undefined,
|
|
121
120
|
title: formatMessage(_messages.tableMessages.tableOptions),
|
|
@@ -132,7 +132,7 @@ export const TableResizer = ({
|
|
|
132
132
|
isCommentEditor,
|
|
133
133
|
disabled
|
|
134
134
|
}) => {
|
|
135
|
-
var _editorView$state, _pluginInjectionApi$a2;
|
|
135
|
+
var _editorView$state, _pluginInjectionApi$a2, _pluginInjectionApi$u2;
|
|
136
136
|
const currentGap = useRef(0);
|
|
137
137
|
// track resizing state - use ref over state to avoid re-render
|
|
138
138
|
const isResizing = useRef(false);
|
|
@@ -149,6 +149,7 @@ export const TableResizer = ({
|
|
|
149
149
|
const {
|
|
150
150
|
formatMessage
|
|
151
151
|
} = useIntl();
|
|
152
|
+
const isToolbarAIFCEnabled = Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar);
|
|
152
153
|
const currentSelection = (_editorView$state = editorView.state) === null || _editorView$state === void 0 ? void 0 : _editorView$state.selection;
|
|
153
154
|
const tableFromSelection = useMemo(() => {
|
|
154
155
|
return findTable(currentSelection);
|
|
@@ -258,7 +259,7 @@ export const TableResizer = ({
|
|
|
258
259
|
tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
|
|
259
260
|
name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED
|
|
260
261
|
});
|
|
261
|
-
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
262
|
+
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || isToolbarAIFCEnabled) {
|
|
262
263
|
var _pluginInjectionApi$u;
|
|
263
264
|
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$u = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u === void 0 ? void 0 : _pluginInjectionApi$u.commands.setCurrentUserIntent('resizing')({
|
|
264
265
|
tr
|
|
@@ -270,7 +271,7 @@ export const TableResizer = ({
|
|
|
270
271
|
if (onResizeStart) {
|
|
271
272
|
onResizeStart();
|
|
272
273
|
}
|
|
273
|
-
}, [startMeasure, editorView, displayGapCursor, node.attrs.localId, tableRef, isTableScalingEnabled,
|
|
274
|
+
}, [startMeasure, editorView, displayGapCursor, node.attrs.localId, tableRef, isToolbarAIFCEnabled, isTableScalingEnabled, isFullWidthModeEnabled, lineLength, containerWidth, excludeGuidelineConfig, displayGuideline, onResizeStart, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$u2 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u2 === void 0 ? void 0 : _pluginInjectionApi$u2.commands]);
|
|
274
275
|
const handleResize = useCallback(
|
|
275
276
|
// Ignored via go/ees005
|
|
276
277
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -337,9 +338,9 @@ export const TableResizer = ({
|
|
|
337
338
|
tableRef: null
|
|
338
339
|
});
|
|
339
340
|
tr.setMeta('is-resizer-resizing', false);
|
|
340
|
-
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
341
|
-
var _pluginInjectionApi$
|
|
342
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
341
|
+
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || isToolbarAIFCEnabled) {
|
|
342
|
+
var _pluginInjectionApi$u3;
|
|
343
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$u3 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u3 === void 0 ? void 0 : _pluginInjectionApi$u3.commands.setCurrentUserIntent('default')({
|
|
343
344
|
tr
|
|
344
345
|
});
|
|
345
346
|
}
|
|
@@ -410,7 +411,7 @@ export const TableResizer = ({
|
|
|
410
411
|
(_insm$session2 = insm.session) === null || _insm$session2 === void 0 ? void 0 : _insm$session2.endFeature('tableResize');
|
|
411
412
|
}
|
|
412
413
|
return newWidth;
|
|
413
|
-
}, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef,
|
|
414
|
+
}, [editorView, getPos, node, isCommentEditor, widthToWidest, isToolbarAIFCEnabled, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, pluginInjectionApi, attachAnalyticsEvent, tableRef, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
|
|
414
415
|
const handleTableSizeChangeOnKeypress = useCallback(step => {
|
|
415
416
|
const newWidth = width + step;
|
|
416
417
|
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
@@ -24,7 +24,6 @@ import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-
|
|
|
24
24
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
25
25
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
26
26
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
28
27
|
import Toggle from '@atlaskit/toggle';
|
|
29
28
|
import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
|
|
30
29
|
import { setColorWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
|
|
@@ -229,6 +228,7 @@ const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
229
228
|
menuItems,
|
|
230
229
|
menuCallback
|
|
231
230
|
} = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect);
|
|
231
|
+
const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
|
|
232
232
|
const handleSubMenuRef = ref => {
|
|
233
233
|
const parent = closestElement(
|
|
234
234
|
// Ignored via go/ees005
|
|
@@ -525,7 +525,7 @@ const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
525
525
|
boundariesElement: boundariesElement,
|
|
526
526
|
scrollableElement: scrollableElement
|
|
527
527
|
});
|
|
528
|
-
return
|
|
528
|
+
return isToolbarAIFCEnabled ? jsx(UserIntentPopupWrapper, {
|
|
529
529
|
api: api
|
|
530
530
|
}, Menu) : Menu;
|
|
531
531
|
});
|
|
@@ -103,7 +103,6 @@ export const getToolbarMenuConfig = (config, state, {
|
|
|
103
103
|
id: 'editor.table.tableOptions',
|
|
104
104
|
type: 'dropdown',
|
|
105
105
|
testId: 'table_options',
|
|
106
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
107
106
|
icon: fg('platform-visual-refresh-icons') ? undefined : CustomizeIcon,
|
|
108
107
|
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
109
108
|
title: formatMessage(messages.tableOptions),
|
|
@@ -111,7 +111,7 @@ var selector = function selector(states) {
|
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
export var TableResizer = function TableResizer(_ref) {
|
|
114
|
-
var _editorView$state, _pluginInjectionApi$a2;
|
|
114
|
+
var _editorView$state, _pluginInjectionApi$a2, _pluginInjectionApi$u2;
|
|
115
115
|
var children = _ref.children,
|
|
116
116
|
width = _ref.width,
|
|
117
117
|
maxWidth = _ref.maxWidth,
|
|
@@ -153,6 +153,7 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
153
153
|
setSnappingEnabled = _useState2[1];
|
|
154
154
|
var _useIntl = useIntl(),
|
|
155
155
|
formatMessage = _useIntl.formatMessage;
|
|
156
|
+
var isToolbarAIFCEnabled = Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar);
|
|
156
157
|
var currentSelection = (_editorView$state = editorView.state) === null || _editorView$state === void 0 ? void 0 : _editorView$state.selection;
|
|
157
158
|
var tableFromSelection = useMemo(function () {
|
|
158
159
|
return findTable(currentSelection);
|
|
@@ -256,7 +257,7 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
256
257
|
tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
|
|
257
258
|
name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED
|
|
258
259
|
});
|
|
259
|
-
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
260
|
+
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || isToolbarAIFCEnabled) {
|
|
260
261
|
var _pluginInjectionApi$u;
|
|
261
262
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u === void 0 || _pluginInjectionApi$u.commands.setCurrentUserIntent('resizing')({
|
|
262
263
|
tr: tr
|
|
@@ -268,7 +269,7 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
268
269
|
if (onResizeStart) {
|
|
269
270
|
onResizeStart();
|
|
270
271
|
}
|
|
271
|
-
}, [startMeasure, editorView, displayGapCursor, node.attrs.localId, tableRef, isTableScalingEnabled,
|
|
272
|
+
}, [startMeasure, editorView, displayGapCursor, node.attrs.localId, tableRef, isToolbarAIFCEnabled, isTableScalingEnabled, isFullWidthModeEnabled, lineLength, containerWidth, excludeGuidelineConfig, displayGuideline, onResizeStart, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u2 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u2 === void 0 ? void 0 : _pluginInjectionApi$u2.commands]);
|
|
272
273
|
var handleResize = useCallback(
|
|
273
274
|
// Ignored via go/ees005
|
|
274
275
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -333,9 +334,9 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
333
334
|
tableRef: null
|
|
334
335
|
});
|
|
335
336
|
tr.setMeta('is-resizer-resizing', false);
|
|
336
|
-
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
|
|
337
|
-
var _pluginInjectionApi$
|
|
338
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$
|
|
337
|
+
if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || isToolbarAIFCEnabled) {
|
|
338
|
+
var _pluginInjectionApi$u3;
|
|
339
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$u3 = pluginInjectionApi.userIntent) === null || _pluginInjectionApi$u3 === void 0 || _pluginInjectionApi$u3.commands.setCurrentUserIntent('default')({
|
|
339
340
|
tr: tr
|
|
340
341
|
});
|
|
341
342
|
}
|
|
@@ -405,7 +406,7 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
405
406
|
(_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableResize');
|
|
406
407
|
}
|
|
407
408
|
return newWidth;
|
|
408
|
-
}, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef,
|
|
409
|
+
}, [editorView, getPos, node, isCommentEditor, widthToWidest, isToolbarAIFCEnabled, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, pluginInjectionApi, attachAnalyticsEvent, tableRef, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
|
|
409
410
|
var handleTableSizeChangeOnKeypress = useCallback(function (step) {
|
|
410
411
|
var newWidth = width + step;
|
|
411
412
|
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
@@ -26,7 +26,6 @@ import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-
|
|
|
26
26
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
27
27
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
28
28
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
29
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
30
29
|
import Toggle from '@atlaskit/toggle';
|
|
31
30
|
import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
|
|
32
31
|
import { setColorWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
|
|
@@ -228,6 +227,7 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
228
227
|
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect),
|
|
229
228
|
menuItems = _convertToDropdownIte.menuItems,
|
|
230
229
|
menuCallback = _convertToDropdownIte.menuCallback;
|
|
230
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
|
|
231
231
|
var handleSubMenuRef = function handleSubMenuRef(ref) {
|
|
232
232
|
var parent = closestElement(
|
|
233
233
|
// Ignored via go/ees005
|
|
@@ -515,7 +515,7 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
515
515
|
boundariesElement: boundariesElement,
|
|
516
516
|
scrollableElement: scrollableElement
|
|
517
517
|
});
|
|
518
|
-
return
|
|
518
|
+
return isToolbarAIFCEnabled ? jsx(UserIntentPopupWrapper, {
|
|
519
519
|
api: api
|
|
520
520
|
}, Menu) : Menu;
|
|
521
521
|
});
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -108,7 +108,6 @@ export var getToolbarMenuConfig = function getToolbarMenuConfig(config, state, _
|
|
|
108
108
|
id: 'editor.table.tableOptions',
|
|
109
109
|
type: 'dropdown',
|
|
110
110
|
testId: 'table_options',
|
|
111
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
112
111
|
icon: fg('platform-visual-refresh-icons') ? undefined : CustomizeIcon,
|
|
113
112
|
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
114
113
|
title: formatMessage(messages.tableOptions),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.11",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^8.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^3.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
45
|
-
"@atlaskit/editor-plugin-toolbar": "^3.
|
|
45
|
+
"@atlaskit/editor-plugin-toolbar": "^3.2.0",
|
|
46
46
|
"@atlaskit/editor-plugin-user-intent": "^4.0.0",
|
|
47
47
|
"@atlaskit/editor-plugin-width": "^7.0.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
49
|
+
"@atlaskit/editor-shared-styles": "^3.7.0",
|
|
50
50
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
51
51
|
"@atlaskit/icon": "^28.5.0",
|
|
52
52
|
"@atlaskit/insm": "^0.1.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/primitives": "^14.15.0",
|
|
60
60
|
"@atlaskit/react-ufo": "^4.11.0",
|
|
61
61
|
"@atlaskit/theme": "^21.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
63
63
|
"@atlaskit/toggle": "^15.1.0",
|
|
64
64
|
"@atlaskit/tokens": "^6.4.0",
|
|
65
65
|
"@atlaskit/tooltip": "^20.5.0",
|