@atlaskit/editor-plugin-table 13.0.4 → 13.0.6
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 +15 -0
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +19 -98
- package/dist/cjs/nodeviews/TableContainer.js +14 -53
- package/dist/cjs/nodeviews/TableResizer.js +2 -15
- package/dist/cjs/nodeviews/table.js +4 -4
- package/dist/cjs/tablePlugin.js +30 -213
- package/dist/cjs/ui/DragHandle/index.js +9 -26
- package/dist/cjs/ui/DragPreview/index.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/cjs/ui/FloatingDragMenu/styles.js +1 -1
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -20
- package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +6 -19
- package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +7 -20
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +7 -20
- package/dist/cjs/ui/TableFullWidthLabel/index.js +1 -1
- package/dist/cjs/ui/global-styles.js +4 -17
- package/dist/cjs/ui/icons/SortingIconWrapper.js +2 -15
- package/dist/cjs/ui/ui-styles.js +1 -1
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +21 -102
- package/dist/es2019/nodeviews/TableContainer.js +11 -54
- package/dist/es2019/nodeviews/TableResizer.js +2 -17
- package/dist/es2019/nodeviews/table.js +4 -4
- package/dist/es2019/tablePlugin.js +19 -211
- package/dist/es2019/ui/DragHandle/index.js +8 -27
- package/dist/es2019/ui/DragPreview/index.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +3 -3
- package/dist/es2019/ui/FloatingDragMenu/styles.js +2 -2
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -22
- package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +7 -22
- package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +7 -22
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +7 -22
- package/dist/es2019/ui/TableFullWidthLabel/index.js +1 -1
- package/dist/es2019/ui/global-styles.js +6 -21
- package/dist/es2019/ui/icons/SortingIconWrapper.js +3 -18
- package/dist/es2019/ui/ui-styles.js +1 -1
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +20 -99
- package/dist/esm/nodeviews/TableContainer.js +15 -54
- package/dist/esm/nodeviews/TableResizer.js +3 -16
- package/dist/esm/nodeviews/table.js +4 -4
- package/dist/esm/tablePlugin.js +24 -208
- package/dist/esm/ui/DragHandle/index.js +10 -27
- package/dist/esm/ui/DragPreview/index.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/esm/ui/FloatingDragMenu/styles.js +1 -1
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +8 -21
- package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +7 -20
- package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +8 -21
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +8 -21
- package/dist/esm/ui/TableFullWidthLabel/index.js +1 -1
- package/dist/esm/ui/global-styles.js +5 -18
- package/dist/esm/ui/icons/SortingIconWrapper.js +3 -16
- package/dist/esm/ui/ui-styles.js +1 -1
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +1 -1
- package/package.json +4 -4
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { Global, jsx } from '@emotion/react';
|
|
7
|
-
import {
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { tableStyles } from './common-styles';
|
|
9
|
-
var
|
|
9
|
+
export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
10
|
+
var featureFlags = _ref.featureFlags,
|
|
11
|
+
isDragAndDropEnabledOption = _ref.isDragAndDropEnabledOption,
|
|
12
|
+
api = _ref.api;
|
|
10
13
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['editorViewMode'], function (states) {
|
|
11
14
|
var _states$editorViewMod;
|
|
12
15
|
return {
|
|
@@ -14,22 +17,6 @@ var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
|
14
17
|
};
|
|
15
18
|
}),
|
|
16
19
|
mode = _useSharedPluginState.mode;
|
|
17
|
-
return {
|
|
18
|
-
mode: mode
|
|
19
|
-
};
|
|
20
|
-
}, function (api) {
|
|
21
|
-
var _useSharedPluginState2 = useSharedPluginState(api, ['editorViewMode']),
|
|
22
|
-
editorViewModeState = _useSharedPluginState2.editorViewModeState;
|
|
23
|
-
return {
|
|
24
|
-
mode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
28
|
-
var featureFlags = _ref.featureFlags,
|
|
29
|
-
isDragAndDropEnabledOption = _ref.isDragAndDropEnabledOption,
|
|
30
|
-
api = _ref.api;
|
|
31
|
-
var _useSharedState = useSharedState(api),
|
|
32
|
-
mode = _useSharedState.mode;
|
|
33
20
|
var isLivePageViewMode = mode === 'view';
|
|
34
21
|
return jsx(Global, {
|
|
35
22
|
styles: tableStyles({
|
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import { SortingIcon } from '@atlaskit/editor-common/table';
|
|
4
|
-
var
|
|
5
|
-
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['editorViewMode'], function (states) {
|
|
4
|
+
export var SortingIconWrapper = function SortingIconWrapper(props) {
|
|
5
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(props.api, ['editorViewMode'], function (states) {
|
|
6
6
|
var _states$editorViewMod;
|
|
7
7
|
return {
|
|
8
8
|
mode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
9
9
|
};
|
|
10
10
|
}),
|
|
11
11
|
mode = _useSharedPluginState.mode;
|
|
12
|
-
return {
|
|
13
|
-
mode: mode
|
|
14
|
-
};
|
|
15
|
-
}, function (api) {
|
|
16
|
-
var _useSharedPluginState2 = useSharedPluginState(api, ['editorViewMode']),
|
|
17
|
-
editorViewModeState = _useSharedPluginState2.editorViewModeState;
|
|
18
|
-
return {
|
|
19
|
-
mode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
export var SortingIconWrapper = function SortingIconWrapper(props) {
|
|
23
|
-
var _useSharedState = useSharedState(props.api),
|
|
24
|
-
mode = _useSharedState.mode;
|
|
25
12
|
if (mode === 'edit') {
|
|
26
13
|
return null;
|
|
27
14
|
}
|
package/dist/esm/ui/ui-styles.js
CHANGED
|
@@ -28,7 +28,7 @@ export var InsertMarker = function InsertMarker(cssString) {
|
|
|
28
28
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t.", " {\n\t\t", ";\n\t\t", "\n\t}\n"])), ClassName.CONTROLS_INSERT_MARKER, Marker(), cssString);
|
|
29
29
|
};
|
|
30
30
|
var Button = function Button(cssString) {
|
|
31
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tborder-width: 0px;\n\tdisplay: inline-flex;\n\tmax-width: 100%;\n\ttext-align: center;\n\tmargin: 0px;\n\tpadding: 0px;\n\ttext-decoration: none;\n\ttransition:\n\t\tbackground 0.1s ease-out 0s,\n\t\tbox-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\n\toutline: none !important;\n\tcursor: none;\n\n\t> .", " {\n\t\tdisplay: inline-flex;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n\t", "\n"])), "var(--ds-
|
|
31
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tborder-width: 0px;\n\tdisplay: inline-flex;\n\tmax-width: 100%;\n\ttext-align: center;\n\tmargin: 0px;\n\tpadding: 0px;\n\ttext-decoration: none;\n\ttransition:\n\t\tbackground 0.1s ease-out 0s,\n\t\tbox-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\n\toutline: none !important;\n\tcursor: none;\n\n\t> .", " {\n\t\tdisplay: inline-flex;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n\t", "\n"])), "var(--ds-radius-small, 3px)", ClassName.CONTROLS_BUTTON_ICON, cssString);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// Explicit pixel values required here to ensure classic row controls align correctly
|
|
@@ -25,5 +25,5 @@ type TableComponentWithSharedStateProps = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Use useSharedPluginState to control re-renders from plugin dependencies
|
|
27
27
|
*/
|
|
28
|
-
export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => React.JSX.Element
|
|
28
|
+
export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => React.JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -25,5 +25,5 @@ type TableComponentWithSharedStateProps = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Use useSharedPluginState to control re-renders from plugin dependencies
|
|
27
27
|
*/
|
|
28
|
-
export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => React.JSX.Element
|
|
28
|
+
export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => React.JSX.Element;
|
|
29
29
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.6",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^4.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^4.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^6.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "7.0.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "7.0.2",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^4.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^6.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^1.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/primitives": "^14.12.0",
|
|
58
58
|
"@atlaskit/react-ufo": "^4.5.0",
|
|
59
59
|
"@atlaskit/theme": "^20.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^12.3.0",
|
|
61
61
|
"@atlaskit/toggle": "^15.1.0",
|
|
62
62
|
"@atlaskit/tokens": "^6.1.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.4.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"uuid": "^3.1.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@atlaskit/editor-common": "^108.
|
|
73
|
+
"@atlaskit/editor-common": "^108.1.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|
|
76
76
|
"react-intl-next": "npm:react-intl@^5.18.1"
|