@atlaskit/editor-plugin-table 14.1.1 → 14.2.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 +21 -0
- package/dist/cjs/nodeviews/TableResizer.js +9 -0
- package/dist/cjs/ui/ContentComponent.js +3 -0
- package/dist/es2019/nodeviews/TableResizer.js +9 -0
- package/dist/es2019/ui/ContentComponent.js +3 -0
- package/dist/esm/nodeviews/TableResizer.js +9 -0
- package/dist/esm/ui/ContentComponent.js +3 -0
- package/dist/types/ui/ContentComponent.d.ts +1 -1
- package/dist/types/ui/FloatingDragMenu/styles.d.ts +4 -3
- package/dist/types-ts4.5/ui/ContentComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/styles.d.ts +4 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 14.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8b18612863ea6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b18612863ea6) -
|
|
8
|
+
Add insm feature tracking for tableResize
|
|
9
|
+
- [`39f3b00f65aa0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/39f3b00f65aa0) -
|
|
10
|
+
NOISSUE: Patches emotion CSS exports in various editor packages
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 14.2.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [`b367661ba720e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b367661ba720e) -
|
|
18
|
+
EDITOR-1562 bump adf-schema for afm
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 14.1.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -23,6 +23,7 @@ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-
|
|
|
23
23
|
var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
24
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
25
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
26
|
+
var _insm = require("@atlaskit/insm");
|
|
26
27
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
28
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
28
29
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
@@ -245,6 +246,10 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
245
246
|
};
|
|
246
247
|
}, [editorView, displayGuideline, displayGapCursor]);
|
|
247
248
|
var handleResizeStart = (0, _react.useCallback)(function () {
|
|
249
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
250
|
+
var _insm$session;
|
|
251
|
+
(_insm$session = _insm.insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableResize');
|
|
252
|
+
}
|
|
248
253
|
startMeasure();
|
|
249
254
|
isResizing.current = true;
|
|
250
255
|
var dispatch = editorView.dispatch,
|
|
@@ -403,6 +408,10 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
403
408
|
if (onResizeStop) {
|
|
404
409
|
onResizeStop();
|
|
405
410
|
}
|
|
411
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
412
|
+
var _insm$session2;
|
|
413
|
+
(_insm$session2 = _insm.insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableResize');
|
|
414
|
+
}
|
|
406
415
|
return newWidth;
|
|
407
416
|
}, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
|
|
408
417
|
var handleTableSizeChangeOnKeypress = (0, _react.useCallback)(function (step) {
|
|
@@ -97,6 +97,9 @@ var ContentComponentInternal = function ContentComponentInternal(_ref) {
|
|
|
97
97
|
sizeSelectorTargetRef = _useSharedPluginState.sizeSelectorTargetRef;
|
|
98
98
|
var _ref2 = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {},
|
|
99
99
|
allowControls = _ref2.allowControls;
|
|
100
|
+
if (!editorView) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
100
103
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/_react.default.createElement(_FloatingContextualButton.default, {
|
|
101
104
|
isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
|
|
102
105
|
editorView: editorView,
|
|
@@ -13,6 +13,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
13
13
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
14
14
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
16
|
+
import { insm } from '@atlaskit/insm';
|
|
16
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
19
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -234,6 +235,10 @@ export const TableResizer = ({
|
|
|
234
235
|
};
|
|
235
236
|
}, [editorView, displayGuideline, displayGapCursor]);
|
|
236
237
|
const handleResizeStart = useCallback(() => {
|
|
238
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
239
|
+
var _insm$session;
|
|
240
|
+
(_insm$session = insm.session) === null || _insm$session === void 0 ? void 0 : _insm$session.startFeature('tableResize');
|
|
241
|
+
}
|
|
237
242
|
startMeasure();
|
|
238
243
|
isResizing.current = true;
|
|
239
244
|
const {
|
|
@@ -399,6 +404,10 @@ export const TableResizer = ({
|
|
|
399
404
|
if (onResizeStop) {
|
|
400
405
|
onResizeStop();
|
|
401
406
|
}
|
|
407
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
408
|
+
var _insm$session2;
|
|
409
|
+
(_insm$session2 = insm.session) === null || _insm$session2 === void 0 ? void 0 : _insm$session2.endFeature('tableResize');
|
|
410
|
+
}
|
|
402
411
|
return newWidth;
|
|
403
412
|
}, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
|
|
404
413
|
const handleTableSizeChangeOnKeypress = useCallback(step => {
|
|
@@ -92,6 +92,9 @@ const ContentComponentInternal = ({
|
|
|
92
92
|
const {
|
|
93
93
|
allowControls
|
|
94
94
|
} = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {};
|
|
95
|
+
if (!editorView) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
95
98
|
return /*#__PURE__*/React.createElement(React.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/React.createElement(FloatingContextualButton, {
|
|
96
99
|
isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
|
|
97
100
|
editorView: editorView,
|
|
@@ -17,6 +17,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
17
17
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
18
18
|
import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
20
|
+
import { insm } from '@atlaskit/insm';
|
|
20
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
23
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -236,6 +237,10 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
236
237
|
};
|
|
237
238
|
}, [editorView, displayGuideline, displayGapCursor]);
|
|
238
239
|
var handleResizeStart = useCallback(function () {
|
|
240
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
241
|
+
var _insm$session;
|
|
242
|
+
(_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableResize');
|
|
243
|
+
}
|
|
239
244
|
startMeasure();
|
|
240
245
|
isResizing.current = true;
|
|
241
246
|
var dispatch = editorView.dispatch,
|
|
@@ -394,6 +399,10 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
394
399
|
if (onResizeStop) {
|
|
395
400
|
onResizeStop();
|
|
396
401
|
}
|
|
402
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
403
|
+
var _insm$session2;
|
|
404
|
+
(_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableResize');
|
|
405
|
+
}
|
|
397
406
|
return newWidth;
|
|
398
407
|
}, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
|
|
399
408
|
var handleTableSizeChangeOnKeypress = useCallback(function (step) {
|
|
@@ -89,6 +89,9 @@ var ContentComponentInternal = function ContentComponentInternal(_ref) {
|
|
|
89
89
|
sizeSelectorTargetRef = _useSharedPluginState.sizeSelectorTargetRef;
|
|
90
90
|
var _ref2 = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {},
|
|
91
91
|
allowControls = _ref2.allowControls;
|
|
92
|
+
if (!editorView) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
92
95
|
return /*#__PURE__*/React.createElement(React.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/React.createElement(FloatingContextualButton, {
|
|
93
96
|
isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
|
|
94
97
|
editorView: editorView,
|
|
@@ -8,7 +8,7 @@ export type ContentComponentProps = {
|
|
|
8
8
|
defaultGetEditorContainerWidth: GetEditorContainerWidth;
|
|
9
9
|
defaultGetEditorFeatureFlags: GetEditorFeatureFlags;
|
|
10
10
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
|
|
11
|
-
editorView
|
|
11
|
+
editorView?: EditorView;
|
|
12
12
|
isTableSelectorEnabled: boolean | undefined;
|
|
13
13
|
options?: TablePluginOptions;
|
|
14
14
|
popupsBoundariesElement?: HTMLElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const cellColourPreviewStyles: (selectedColor: string) => SerializedStyles;
|
|
3
|
+
export declare const dragMenuBackgroundColorStyles: () => SerializedStyles;
|
|
4
|
+
export declare const toggleStyles: SerializedStyles;
|
|
@@ -8,7 +8,7 @@ export type ContentComponentProps = {
|
|
|
8
8
|
defaultGetEditorContainerWidth: GetEditorContainerWidth;
|
|
9
9
|
defaultGetEditorFeatureFlags: GetEditorFeatureFlags;
|
|
10
10
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
|
|
11
|
-
editorView
|
|
11
|
+
editorView?: EditorView;
|
|
12
12
|
isTableSelectorEnabled: boolean | undefined;
|
|
13
13
|
options?: TablePluginOptions;
|
|
14
14
|
popupsBoundariesElement?: HTMLElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const cellColourPreviewStyles: (selectedColor: string) => SerializedStyles;
|
|
3
|
+
export declare const dragMenuBackgroundColorStyles: () => SerializedStyles;
|
|
4
|
+
export declare const toggleStyles: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.1",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"singleton": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^51.1.
|
|
31
|
+
"@atlaskit/adf-schema": "^51.1.2",
|
|
32
32
|
"@atlaskit/button": "^23.4.0",
|
|
33
|
-
"@atlaskit/custom-steps": "^0.
|
|
33
|
+
"@atlaskit/custom-steps": "^0.13.0",
|
|
34
34
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^5.0.0",
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^5.
|
|
37
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "^5.
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^5.2.0",
|
|
37
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "^5.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^5.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "8.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "8.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^5.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^7.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^2.0.0",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
58
58
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
59
59
|
"@atlaskit/primitives": "^14.14.0",
|
|
60
|
-
"@atlaskit/react-ufo": "^4.
|
|
60
|
+
"@atlaskit/react-ufo": "^4.7.0",
|
|
61
61
|
"@atlaskit/theme": "^21.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^12.21.0",
|
|
63
63
|
"@atlaskit/toggle": "^15.1.0",
|
|
64
64
|
"@atlaskit/tokens": "^6.3.0",
|
|
65
65
|
"@atlaskit/tooltip": "^20.4.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^109.
|
|
75
|
+
"@atlaskit/editor-common": "^109.6.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-dom": "^18.2.0",
|
|
78
78
|
"react-intl-next": "npm:react-intl@^5.18.1"
|