@atlaskit/editor-plugin-table 7.16.19 → 7.17.1
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 +22 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/cjs/toolbar.js +3 -0
- package/dist/cjs/ui/DragHandle/index.js +4 -2
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +5 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/cjs/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/cjs/ui/FloatingDragMenu/index.js +5 -2
- package/dist/cjs/ui/FloatingDragMenu/styles.js +12 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/cjs/ui/TableFloatingControls/index.js +4 -1
- package/dist/cjs/ui/common-styles.js +3 -1
- package/dist/cjs/ui/consts.js +4 -1
- package/dist/cjs/ui/ui-styles.js +35 -3
- package/dist/cjs/utils/drag-menu.js +32 -27
- package/dist/es2019/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/es2019/toolbar.js +3 -0
- package/dist/es2019/ui/DragHandle/index.js +6 -2
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +5 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +38 -11
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/es2019/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +34 -13
- package/dist/es2019/ui/FloatingDragMenu/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/styles.js +11 -3
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +6 -2
- package/dist/es2019/ui/TableFloatingControls/index.js +5 -1
- package/dist/es2019/ui/common-styles.js +3 -1
- package/dist/es2019/ui/consts.js +3 -0
- package/dist/es2019/ui/ui-styles.js +36 -3
- package/dist/es2019/utils/drag-menu.js +23 -19
- package/dist/esm/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/esm/toolbar.js +3 -0
- package/dist/esm/ui/DragHandle/index.js +4 -2
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +5 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/esm/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/esm/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/esm/ui/FloatingDragMenu/index.js +5 -2
- package/dist/esm/ui/FloatingDragMenu/styles.js +13 -2
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/esm/ui/TableFloatingControls/index.js +4 -1
- package/dist/esm/ui/common-styles.js +3 -1
- package/dist/esm/ui/consts.js +3 -0
- package/dist/esm/ui/ui-styles.js +35 -3
- package/dist/esm/utils/drag-menu.js +32 -27
- package/dist/types/plugin.d.ts +3 -1
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +8 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +16 -4
- package/dist/types/ui/TableFloatingControls/index.d.ts +8 -2
- package/dist/types/ui/consts.d.ts +3 -0
- package/dist/types/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/plugin.d.ts +3 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +20 -4
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +10 -2
- package/dist/types-ts4.5/ui/consts.d.ts +3 -0
- package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
- package/package.json +3 -6
- package/src/nodeviews/ExternalDropTargets.tsx +2 -1
- package/src/plugin.tsx +2 -0
- package/src/toolbar.tsx +3 -0
- package/src/ui/DragHandle/index.tsx +4 -2
- package/src/ui/FloatingContextualButton/FixedButton.tsx +1 -1
- package/src/ui/FloatingContextualButton/index.tsx +2 -0
- package/src/ui/FloatingContextualButton/styles.ts +10 -0
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +22 -3
- package/src/ui/FloatingContextualMenu/index.tsx +1 -0
- package/src/ui/FloatingContextualMenu/styles.ts +2 -0
- package/src/ui/FloatingDeleteButton/index.tsx +2 -1
- package/src/ui/FloatingDragMenu/DragMenu.tsx +39 -16
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +1 -1
- package/src/ui/FloatingDragMenu/index.tsx +6 -2
- package/src/ui/FloatingDragMenu/styles.ts +20 -3
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +1 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +1 -1
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +4 -2
- package/src/ui/TableFloatingControls/index.tsx +4 -1
- package/src/ui/common-styles.ts +2 -1
- package/src/ui/consts.ts +4 -0
- package/src/ui/ui-styles.ts +25 -0
- package/src/utils/drag-menu.ts +28 -18
- package/tsconfig.app.json +3 -0
|
@@ -74,6 +74,8 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
|
|
|
74
74
|
var tableDuplicateCellColouring = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : false;
|
|
75
75
|
var isTableFixedColumnWidthsOptionEnabled = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : false;
|
|
76
76
|
var shouldUseIncreasedScalingPercent = arguments.length > 14 && arguments[14] !== undefined ? arguments[14] : false;
|
|
77
|
+
var tableSortColumnDiscoverability = arguments.length > 15 && arguments[15] !== undefined ? arguments[15] : false;
|
|
78
|
+
var selection = editorView.state.selection;
|
|
77
79
|
var addOptions = direction === 'row' ? [{
|
|
78
80
|
label: 'above',
|
|
79
81
|
offset: 0,
|
|
@@ -95,7 +97,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
|
|
|
95
97
|
icon: AddColRightIcon,
|
|
96
98
|
keymap: addColumnAfter
|
|
97
99
|
}];
|
|
98
|
-
var selection = editorView.state.selection;
|
|
99
100
|
var moveOptions = direction === 'row' ? [{
|
|
100
101
|
label: 'up',
|
|
101
102
|
icon: ArrowUpIcon,
|
|
@@ -142,11 +143,26 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
|
|
|
142
143
|
order: SortOrder.DESC,
|
|
143
144
|
icon: HipchatChevronDoubleDownIcon
|
|
144
145
|
}] : [];
|
|
145
|
-
|
|
146
|
+
var sortConfigs = _toConsumableArray(sortOptions.map(function (_ref) {
|
|
146
147
|
var label = _ref.label,
|
|
147
|
-
|
|
148
|
-
icon = _ref.icon
|
|
149
|
-
|
|
148
|
+
order = _ref.order,
|
|
149
|
+
icon = _ref.icon;
|
|
150
|
+
return {
|
|
151
|
+
id: "sort_column_".concat(order),
|
|
152
|
+
title: "Sort ".concat(label),
|
|
153
|
+
disabled: hasMergedCellsInTable,
|
|
154
|
+
icon: icon,
|
|
155
|
+
onClick: function onClick(state, dispatch) {
|
|
156
|
+
sortColumnWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.TABLE_CONTEXT_MENU, index !== null && index !== void 0 ? index : 0, order)(state, dispatch);
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}));
|
|
161
|
+
var restConfigs = [].concat(_toConsumableArray(addOptions.map(function (_ref2) {
|
|
162
|
+
var label = _ref2.label,
|
|
163
|
+
offset = _ref2.offset,
|
|
164
|
+
icon = _ref2.icon,
|
|
165
|
+
keymap = _ref2.keymap;
|
|
150
166
|
return {
|
|
151
167
|
id: "add_".concat(direction, "_").concat(label),
|
|
152
168
|
title: "Add ".concat(direction, " ").concat(label),
|
|
@@ -203,13 +219,13 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
|
|
|
203
219
|
},
|
|
204
220
|
icon: RemoveIcon,
|
|
205
221
|
keymap: direction === 'row' ? tooltip(deleteRow) : tooltip(deleteColumn)
|
|
206
|
-
}], _toConsumableArray(moveOptions.map(function (
|
|
207
|
-
var label =
|
|
208
|
-
canMove =
|
|
209
|
-
icon =
|
|
210
|
-
keymap =
|
|
211
|
-
getOriginIndexes =
|
|
212
|
-
getTargetIndex =
|
|
222
|
+
}], _toConsumableArray(moveOptions.map(function (_ref3) {
|
|
223
|
+
var label = _ref3.label,
|
|
224
|
+
canMove = _ref3.canMove,
|
|
225
|
+
icon = _ref3.icon,
|
|
226
|
+
keymap = _ref3.keymap,
|
|
227
|
+
getOriginIndexes = _ref3.getOriginIndexes,
|
|
228
|
+
getTargetIndex = _ref3.getTargetIndex;
|
|
213
229
|
return {
|
|
214
230
|
id: "move_".concat(direction, "_").concat(label),
|
|
215
231
|
title: "Move ".concat(direction, " ").concat(label),
|
|
@@ -226,19 +242,8 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
|
|
|
226
242
|
},
|
|
227
243
|
keymap: keymap && tooltip(keymap)
|
|
228
244
|
};
|
|
229
|
-
}))
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return {
|
|
234
|
-
id: "sort_column_".concat(order),
|
|
235
|
-
title: "Sort ".concat(label),
|
|
236
|
-
disabled: hasMergedCellsInTable,
|
|
237
|
-
icon: icon,
|
|
238
|
-
onClick: function onClick(state, dispatch) {
|
|
239
|
-
sortColumnWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.TABLE_CONTEXT_MENU, index !== null && index !== void 0 ? index : 0, order)(state, dispatch);
|
|
240
|
-
return true;
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
}))).filter(Boolean);
|
|
245
|
+
})));
|
|
246
|
+
var allConfigs = _toConsumableArray(restConfigs);
|
|
247
|
+
tableSortColumnDiscoverability ? allConfigs.unshift.apply(allConfigs, _toConsumableArray(sortConfigs)) : allConfigs.push.apply(allConfigs, _toConsumableArray(sortConfigs));
|
|
248
|
+
return allConfigs.filter(Boolean);
|
|
244
249
|
};
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
7
7
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
8
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
9
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
9
10
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
11
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
@@ -44,7 +45,8 @@ export type TablePlugin = NextEditorPlugin<'table', {
|
|
|
44
45
|
SelectionPlugin,
|
|
45
46
|
OptionalPlugin<AccessibilityUtilsPlugin>,
|
|
46
47
|
OptionalPlugin<MediaPlugin>,
|
|
47
|
-
OptionalPlugin<EditorViewModePlugin
|
|
48
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
49
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
48
50
|
];
|
|
49
51
|
}>;
|
|
50
52
|
/**
|
|
@@ -28,8 +28,9 @@ type DragMenuProps = {
|
|
|
28
28
|
tableDuplicateCellColouring?: boolean;
|
|
29
29
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
30
30
|
isTableFixedColumnWidthsOptionEnabled?: boolean;
|
|
31
|
+
tableSortColumnDiscoverability?: boolean;
|
|
31
32
|
};
|
|
32
|
-
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, isTableFixedColumnWidthsOptionEnabled, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
33
|
+
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, isTableFixedColumnWidthsOptionEnabled, tableSortColumnDiscoverability, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
33
34
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps>> & {
|
|
34
35
|
WrappedComponent: React.ComponentType<DragMenuProps & WrappedComponentProps>;
|
|
35
36
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/react").SerializedStyles;
|
|
2
2
|
export declare const elementBeforeIconStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
-
export declare const dragMenuBackgroundColorStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const dragMenuBackgroundColorStyles: (tableSortColumnDiscoverability?: boolean) => import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const toggleStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -130,7 +130,10 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
130
130
|
};
|
|
131
131
|
}, {
|
|
132
132
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
133
|
-
} | undefined
|
|
133
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
134
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
135
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
136
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
134
137
|
}, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
135
138
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
136
139
|
sharedState: {
|
|
@@ -231,6 +234,9 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
231
234
|
};
|
|
232
235
|
}, {
|
|
233
236
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
234
|
-
} | undefined
|
|
237
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
238
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
239
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
240
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
235
241
|
}) => JSX.Element;
|
|
236
242
|
export default ColumnControls;
|
|
@@ -111,7 +111,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
111
111
|
};
|
|
112
112
|
}, {
|
|
113
113
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
114
|
-
} | undefined
|
|
114
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
115
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
116
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
117
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
115
118
|
}, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
116
119
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
117
120
|
sharedState: {
|
|
@@ -212,7 +215,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
212
215
|
};
|
|
213
216
|
}, {
|
|
214
217
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
215
|
-
} | undefined
|
|
218
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
219
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
220
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
221
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
216
222
|
}>> & {
|
|
217
223
|
WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
|
|
218
224
|
api?: import("@atlaskit/editor-common/types").PublicPluginAPI<[import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"table", {
|
|
@@ -324,7 +330,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
324
330
|
};
|
|
325
331
|
}, {
|
|
326
332
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
327
|
-
} | undefined
|
|
333
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
334
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
335
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
336
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
328
337
|
}, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
329
338
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
330
339
|
sharedState: {
|
|
@@ -425,7 +434,10 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
425
434
|
};
|
|
426
435
|
}, {
|
|
427
436
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
428
|
-
} | undefined
|
|
437
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
438
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
439
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
440
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
429
441
|
}>;
|
|
430
442
|
};
|
|
431
443
|
export declare const DragCornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps>> & {
|
|
@@ -139,7 +139,10 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
139
139
|
};
|
|
140
140
|
}, {
|
|
141
141
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
142
|
-
} | undefined
|
|
142
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
143
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
144
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
145
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
143
146
|
}, import("../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
144
147
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
145
148
|
sharedState: {
|
|
@@ -240,6 +243,9 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
240
243
|
};
|
|
241
244
|
}, {
|
|
242
245
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
243
|
-
} | undefined
|
|
246
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
247
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
248
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
249
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>]> | undefined;
|
|
244
250
|
}) => JSX.Element | null;
|
|
245
251
|
export default TableFloatingControls;
|
|
@@ -54,6 +54,9 @@ export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
|
54
54
|
export declare const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
55
55
|
export declare const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
56
56
|
export declare const TABLE_GUIDELINE_VISIBLE_ADJUSTMENT = -68;
|
|
57
|
+
export declare const TABLE_DRAG_MENU_SORT_GROUP_HEIGHT = 92;
|
|
58
|
+
export declare const TABLE_DRAG_MENU_PADDING_TOP = 4;
|
|
59
|
+
export declare const TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT = 6;
|
|
57
60
|
export declare const dragMenuDropdownWidth = 250;
|
|
58
61
|
export declare const dragTableInsertColumnButtonSize = 16;
|
|
59
62
|
export declare const dropTargetExtendedWidth = 150;
|
|
@@ -13,4 +13,4 @@ export interface DragMenuConfig extends DropdownOptionT<Command> {
|
|
|
13
13
|
icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
14
14
|
keymap?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => DragMenuConfig[];
|
|
16
|
+
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, tableSortColumnDiscoverability?: boolean) => DragMenuConfig[];
|
|
@@ -5,6 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
7
7
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
8
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
9
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
9
10
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
10
11
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
@@ -44,7 +45,8 @@ export type TablePlugin = NextEditorPlugin<'table', {
|
|
|
44
45
|
SelectionPlugin,
|
|
45
46
|
OptionalPlugin<AccessibilityUtilsPlugin>,
|
|
46
47
|
OptionalPlugin<MediaPlugin>,
|
|
47
|
-
OptionalPlugin<EditorViewModePlugin
|
|
48
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
49
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
48
50
|
];
|
|
49
51
|
}>;
|
|
50
52
|
/**
|
|
@@ -28,8 +28,9 @@ type DragMenuProps = {
|
|
|
28
28
|
tableDuplicateCellColouring?: boolean;
|
|
29
29
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
30
30
|
isTableFixedColumnWidthsOptionEnabled?: boolean;
|
|
31
|
+
tableSortColumnDiscoverability?: boolean;
|
|
31
32
|
};
|
|
32
|
-
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, isTableFixedColumnWidthsOptionEnabled, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
33
|
+
export declare const DragMenu: React.MemoExoticComponent<({ direction, index, target, isOpen, editorView, tableNode, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, fitHeight, fitWidth, mountPoint, scrollableElement, boundariesElement, isTableScalingEnabled, tableDuplicateCellColouring, shouldUseIncreasedScalingPercent, isTableFixedColumnWidthsOptionEnabled, tableSortColumnDiscoverability, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null>;
|
|
33
34
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps>> & {
|
|
34
35
|
WrappedComponent: React.ComponentType<DragMenuProps & WrappedComponentProps>;
|
|
35
36
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/react").SerializedStyles;
|
|
2
2
|
export declare const elementBeforeIconStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
-
export declare const dragMenuBackgroundColorStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const dragMenuBackgroundColorStyles: (tableSortColumnDiscoverability?: boolean) => import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const toggleStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -155,7 +155,11 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
155
155
|
};
|
|
156
156
|
}, {
|
|
157
157
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
158
|
-
} | undefined
|
|
158
|
+
} | undefined>>,
|
|
159
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
160
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
161
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
162
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
159
163
|
];
|
|
160
164
|
}, import("../../../plugin").TablePluginOptions | undefined>,
|
|
161
165
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
@@ -281,7 +285,11 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
281
285
|
};
|
|
282
286
|
}, {
|
|
283
287
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
284
|
-
} | undefined
|
|
288
|
+
} | undefined>>,
|
|
289
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
290
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
291
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
292
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
285
293
|
]> | undefined;
|
|
286
294
|
}) => JSX.Element;
|
|
287
295
|
export default ColumnControls;
|
|
@@ -136,7 +136,11 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
136
136
|
};
|
|
137
137
|
}, {
|
|
138
138
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
139
|
-
} | undefined
|
|
139
|
+
} | undefined>>,
|
|
140
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
141
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
142
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
143
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
140
144
|
];
|
|
141
145
|
}, import("../../../plugin").TablePluginOptions | undefined>,
|
|
142
146
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
@@ -262,7 +266,11 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
262
266
|
};
|
|
263
267
|
}, {
|
|
264
268
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
265
|
-
} | undefined
|
|
269
|
+
} | undefined>>,
|
|
270
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
271
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
272
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
273
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
266
274
|
]> | undefined;
|
|
267
275
|
}>> & {
|
|
268
276
|
WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
|
|
@@ -400,7 +408,11 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
400
408
|
};
|
|
401
409
|
}, {
|
|
402
410
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
403
|
-
} | undefined
|
|
411
|
+
} | undefined>>,
|
|
412
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
413
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
414
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
415
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
404
416
|
];
|
|
405
417
|
}, import("../../../plugin").TablePluginOptions | undefined>,
|
|
406
418
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
@@ -526,7 +538,11 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
526
538
|
};
|
|
527
539
|
}, {
|
|
528
540
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
529
|
-
} | undefined
|
|
541
|
+
} | undefined>>,
|
|
542
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
543
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
544
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
545
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
530
546
|
]> | undefined;
|
|
531
547
|
}>;
|
|
532
548
|
};
|
|
@@ -164,7 +164,11 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
164
164
|
};
|
|
165
165
|
}, {
|
|
166
166
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
167
|
-
} | undefined
|
|
167
|
+
} | undefined>>,
|
|
168
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
169
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
170
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
171
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
168
172
|
];
|
|
169
173
|
}, import("../../plugin").TablePluginOptions | undefined>,
|
|
170
174
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
@@ -290,7 +294,11 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
290
294
|
};
|
|
291
295
|
}, {
|
|
292
296
|
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
293
|
-
} | undefined
|
|
297
|
+
} | undefined>>,
|
|
298
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
299
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
300
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
301
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
294
302
|
]> | undefined;
|
|
295
303
|
}) => JSX.Element | null;
|
|
296
304
|
export default TableFloatingControls;
|
|
@@ -54,6 +54,9 @@ export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
|
54
54
|
export declare const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
55
55
|
export declare const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
56
56
|
export declare const TABLE_GUIDELINE_VISIBLE_ADJUSTMENT = -68;
|
|
57
|
+
export declare const TABLE_DRAG_MENU_SORT_GROUP_HEIGHT = 92;
|
|
58
|
+
export declare const TABLE_DRAG_MENU_PADDING_TOP = 4;
|
|
59
|
+
export declare const TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT = 6;
|
|
57
60
|
export declare const dragMenuDropdownWidth = 250;
|
|
58
61
|
export declare const dragTableInsertColumnButtonSize = 16;
|
|
59
62
|
export declare const dropTargetExtendedWidth = 150;
|
|
@@ -13,4 +13,4 @@ export interface DragMenuConfig extends DropdownOptionT<Command> {
|
|
|
13
13
|
icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
|
|
14
14
|
keymap?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => DragMenuConfig[];
|
|
16
|
+
export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, canDrag: boolean, hasMergedCellsInTable: boolean, editorView: EditorView, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect, editorAnalyticsAPI?: EditorAnalyticsAPI, isHeaderRowRequired?: boolean, isTableScalingEnabled?: boolean, tableDuplicateCellColouring?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, tableSortColumnDiscoverability?: boolean) => DragMenuConfig[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.17.1",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/adf-schema": "^36.10.7",
|
|
32
32
|
"@atlaskit/button": "^17.17.0",
|
|
33
33
|
"@atlaskit/custom-steps": "^0.2.0",
|
|
34
|
-
"@atlaskit/editor-common": "^82.
|
|
34
|
+
"@atlaskit/editor-common": "^82.4.0",
|
|
35
35
|
"@atlaskit/editor-palette": "1.6.0",
|
|
36
36
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/primitives": "^7.0.0",
|
|
53
53
|
"@atlaskit/theme": "^12.9.0",
|
|
54
54
|
"@atlaskit/toggle": "^13.1.0",
|
|
55
|
-
"@atlaskit/tokens": "^1.
|
|
55
|
+
"@atlaskit/tokens": "^1.50.0",
|
|
56
56
|
"@atlaskit/tooltip": "^18.4.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|
|
@@ -143,9 +143,6 @@
|
|
|
143
143
|
},
|
|
144
144
|
"platform.editor.table.editor-num-col-style-changes": {
|
|
145
145
|
"type": "boolean"
|
|
146
|
-
},
|
|
147
|
-
"platform.editor.drag-and-drop_wmv9t": {
|
|
148
|
-
"type": "boolean"
|
|
149
146
|
}
|
|
150
147
|
}
|
|
151
148
|
}
|
|
@@ -53,10 +53,11 @@ export const ExternalDropTargets = ({
|
|
|
53
53
|
overflow: 'hidden',
|
|
54
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
55
55
|
position: 'absolute',
|
|
56
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
56
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
57
57
|
top: `-${dropTargetExtendedWidth - tableMarginTop}px`,
|
|
58
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
59
59
|
pointerEvents: 'auto',
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
60
61
|
zIndex: `${dropTargetsZIndex}`,
|
|
61
62
|
}}
|
|
62
63
|
data-testid="table-floating-column-extended-drop-targets"
|
package/src/plugin.tsx
CHANGED
|
@@ -30,6 +30,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
30
30
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
31
31
|
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
32
32
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
33
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
33
34
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
34
35
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
35
36
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
@@ -134,6 +135,7 @@ export type TablePlugin = NextEditorPlugin<
|
|
|
134
135
|
OptionalPlugin<AccessibilityUtilsPlugin>,
|
|
135
136
|
OptionalPlugin<MediaPlugin>,
|
|
136
137
|
OptionalPlugin<EditorViewModePlugin>,
|
|
138
|
+
OptionalPlugin<FeatureFlagsPlugin>,
|
|
137
139
|
];
|
|
138
140
|
}
|
|
139
141
|
>;
|
package/src/toolbar.tsx
CHANGED
|
@@ -224,6 +224,7 @@ export const getToolbarCellOptionsConfig = (
|
|
|
224
224
|
},
|
|
225
225
|
selected: false,
|
|
226
226
|
disabled: false,
|
|
227
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
227
228
|
elemAfter: <div css={shortcutStyle}>{tooltip(addColumnAfter)}</div>,
|
|
228
229
|
},
|
|
229
230
|
{
|
|
@@ -242,6 +243,7 @@ export const getToolbarCellOptionsConfig = (
|
|
|
242
243
|
},
|
|
243
244
|
selected: false,
|
|
244
245
|
disabled: false,
|
|
246
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
245
247
|
elemAfter: <div css={shortcutStyle}>{tooltip(addRowAfter)}</div>,
|
|
246
248
|
},
|
|
247
249
|
{
|
|
@@ -414,6 +416,7 @@ export const getToolbarCellOptionsConfig = (
|
|
|
414
416
|
},
|
|
415
417
|
selected: false,
|
|
416
418
|
disabled: false,
|
|
419
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
417
420
|
elemAfter: <div css={shortcutStyle}>{tooltip(backspace)}</div>,
|
|
418
421
|
});
|
|
419
422
|
|
|
@@ -199,11 +199,13 @@ const DragHandleComponent = ({
|
|
|
199
199
|
data-testid="table-drag-handle-clickable-zone-button"
|
|
200
200
|
style={{
|
|
201
201
|
height: isRow
|
|
202
|
-
?
|
|
202
|
+
? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
203
|
+
`calc(100% - ${dragTableInsertColumnButtonSize}px)`
|
|
203
204
|
: `${token('space.200', '16px')}`, // 16px here because it's the size of drag handle button's large side
|
|
204
205
|
width: isRow
|
|
205
206
|
? `${token('space.200', '16px')}` // 16px here because it's the size of drag handle button's large side
|
|
206
|
-
:
|
|
207
|
+
: // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
208
|
+
`calc(100% - ${dragTableInsertColumnButtonSize}px)`,
|
|
207
209
|
left: isRow ? `${token('space.050', '4px')}` : undefined,
|
|
208
210
|
bottom: isColumn ? `${token('space.0', '0px')}` : undefined,
|
|
209
211
|
alignSelf: isColumn ? 'none' : 'center',
|
|
@@ -160,7 +160,7 @@ export const FixedButton = ({
|
|
|
160
160
|
position: 'fixed',
|
|
161
161
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
162
162
|
top: stickyHeader.top + stickyHeader.padding + offset * 2,
|
|
163
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
163
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
164
164
|
zIndex: akEditorTableCellOnStickyHeaderZIndex,
|
|
165
165
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
166
166
|
left: calcLeftPos({
|
|
@@ -77,7 +77,9 @@ const FloatingContextualButtonInner = React.memo((props: Props & WrappedComponen
|
|
|
77
77
|
const button = (
|
|
78
78
|
<div
|
|
79
79
|
css={[
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
80
81
|
tableFloatingCellButtonStyles(),
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
81
83
|
isContextualMenuOpen && tableFloatingCellButtonSelectedStyles(),
|
|
82
84
|
]}
|
|
83
85
|
>
|
|
@@ -7,14 +7,17 @@ import { contextualMenuTriggerSize } from '../consts';
|
|
|
7
7
|
|
|
8
8
|
export const tableFloatingCellButtonStyles = () =>
|
|
9
9
|
css({
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
10
11
|
'> div': {
|
|
11
12
|
// Sits behind button to provide surface-color background
|
|
12
13
|
background: token('elevation.surface', N20),
|
|
13
14
|
borderRadius: token('border.radius', '3px'),
|
|
14
15
|
display: 'flex',
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
15
17
|
height: `${contextualMenuTriggerSize + 2}px`,
|
|
16
18
|
flexDirection: 'column',
|
|
17
19
|
},
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
18
21
|
'&& button': {
|
|
19
22
|
background: token('color.background.neutral', 'none'),
|
|
20
23
|
flexDirection: 'column',
|
|
@@ -25,15 +28,19 @@ export const tableFloatingCellButtonStyles = () =>
|
|
|
25
28
|
height: 'calc(100% - 4px)',
|
|
26
29
|
display: 'flex',
|
|
27
30
|
},
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
28
32
|
'&& button:hover': {
|
|
29
33
|
background: token('color.background.neutral.hovered', N30A),
|
|
30
34
|
},
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
31
36
|
'&& button:active': {
|
|
32
37
|
background: token('color.background.neutral.pressed', 'rgba(179, 212, 255, 0.6)'),
|
|
33
38
|
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
34
40
|
'&& button > span': {
|
|
35
41
|
margin: `0px ${token('space.negative.050', '-4px')}`,
|
|
36
42
|
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
44
|
'&& span': {
|
|
38
45
|
pointerEvents: 'none',
|
|
39
46
|
},
|
|
@@ -41,12 +48,15 @@ export const tableFloatingCellButtonStyles = () =>
|
|
|
41
48
|
|
|
42
49
|
export const tableFloatingCellButtonSelectedStyles = () =>
|
|
43
50
|
css({
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
44
52
|
'&& button': {
|
|
45
53
|
background: token('color.background.selected', N700),
|
|
46
54
|
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
47
56
|
'&& button:hover': {
|
|
48
57
|
background: token('color.background.selected.hovered', N700),
|
|
49
58
|
},
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
50
60
|
'&& button:active': {
|
|
51
61
|
background: token('color.background.selected.pressed', N700),
|
|
52
62
|
},
|