@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.
Files changed (58) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/nodeviews/TableComponentWithSharedState.js +19 -98
  3. package/dist/cjs/nodeviews/TableContainer.js +14 -53
  4. package/dist/cjs/nodeviews/TableResizer.js +2 -15
  5. package/dist/cjs/nodeviews/table.js +4 -4
  6. package/dist/cjs/tablePlugin.js +30 -213
  7. package/dist/cjs/ui/DragHandle/index.js +9 -26
  8. package/dist/cjs/ui/DragPreview/index.js +1 -1
  9. package/dist/cjs/ui/FloatingContextualButton/styles.js +1 -1
  10. package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -1
  11. package/dist/cjs/ui/FloatingDragMenu/styles.js +1 -1
  12. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -20
  13. package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +6 -19
  14. package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +7 -20
  15. package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +7 -20
  16. package/dist/cjs/ui/TableFullWidthLabel/index.js +1 -1
  17. package/dist/cjs/ui/global-styles.js +4 -17
  18. package/dist/cjs/ui/icons/SortingIconWrapper.js +2 -15
  19. package/dist/cjs/ui/ui-styles.js +1 -1
  20. package/dist/es2019/nodeviews/TableComponentWithSharedState.js +21 -102
  21. package/dist/es2019/nodeviews/TableContainer.js +11 -54
  22. package/dist/es2019/nodeviews/TableResizer.js +2 -17
  23. package/dist/es2019/nodeviews/table.js +4 -4
  24. package/dist/es2019/tablePlugin.js +19 -211
  25. package/dist/es2019/ui/DragHandle/index.js +8 -27
  26. package/dist/es2019/ui/DragPreview/index.js +1 -1
  27. package/dist/es2019/ui/FloatingContextualButton/styles.js +1 -1
  28. package/dist/es2019/ui/FloatingContextualMenu/styles.js +3 -3
  29. package/dist/es2019/ui/FloatingDragMenu/styles.js +2 -2
  30. package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -22
  31. package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +7 -22
  32. package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +7 -22
  33. package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +7 -22
  34. package/dist/es2019/ui/TableFullWidthLabel/index.js +1 -1
  35. package/dist/es2019/ui/global-styles.js +6 -21
  36. package/dist/es2019/ui/icons/SortingIconWrapper.js +3 -18
  37. package/dist/es2019/ui/ui-styles.js +1 -1
  38. package/dist/esm/nodeviews/TableComponentWithSharedState.js +20 -99
  39. package/dist/esm/nodeviews/TableContainer.js +15 -54
  40. package/dist/esm/nodeviews/TableResizer.js +3 -16
  41. package/dist/esm/nodeviews/table.js +4 -4
  42. package/dist/esm/tablePlugin.js +24 -208
  43. package/dist/esm/ui/DragHandle/index.js +10 -27
  44. package/dist/esm/ui/DragPreview/index.js +1 -1
  45. package/dist/esm/ui/FloatingContextualButton/styles.js +1 -1
  46. package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -1
  47. package/dist/esm/ui/FloatingDragMenu/styles.js +1 -1
  48. package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +8 -21
  49. package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +7 -20
  50. package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +8 -21
  51. package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +8 -21
  52. package/dist/esm/ui/TableFullWidthLabel/index.js +1 -1
  53. package/dist/esm/ui/global-styles.js +5 -18
  54. package/dist/esm/ui/icons/SortingIconWrapper.js +3 -16
  55. package/dist/esm/ui/ui-styles.js +1 -1
  56. package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +1 -1
  57. package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +1 -1
  58. 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 { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
7
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
8
8
  import { tableStyles } from './common-styles';
9
- var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
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 { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
2
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
3
3
  import { SortingIcon } from '@atlaskit/editor-common/table';
4
- var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
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
  }
@@ -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-border-radius, 3px)", ClassName.CONTROLS_BUTTON_ICON, 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-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 | null;
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 | null;
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.4",
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.1",
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.1.0",
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.0.0",
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"