@atlaskit/editor-plugin-table 12.2.6 → 12.2.7

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 (204) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +4 -4
  3. package/afm-cc/tsconfig.json +0 -123
  4. package/afm-dev-agents/tsconfig.json +0 -123
  5. package/afm-jira/tsconfig.json +0 -123
  6. package/afm-passionfruit/tsconfig.json +0 -123
  7. package/afm-post-office/tsconfig.json +0 -123
  8. package/afm-rovo-extension/tsconfig.json +0 -123
  9. package/afm-townsquare/tsconfig.json +0 -123
  10. package/afm-volt/tsconfig.json +0 -114
  11. package/build/tsconfig.json +0 -23
  12. package/docs/0-intro.tsx +0 -57
  13. package/src/index.ts +0 -21
  14. package/src/nodeviews/ExternalDropTargets.tsx +0 -91
  15. package/src/nodeviews/OverflowShadowsObserver.ts +0 -156
  16. package/src/nodeviews/TableCell.ts +0 -134
  17. package/src/nodeviews/TableComponent.tsx +0 -1590
  18. package/src/nodeviews/TableComponentWithSharedState.tsx +0 -278
  19. package/src/nodeviews/TableContainer.tsx +0 -926
  20. package/src/nodeviews/TableNodeViewBase.ts +0 -29
  21. package/src/nodeviews/TableResizer.tsx +0 -884
  22. package/src/nodeviews/TableRow.ts +0 -830
  23. package/src/nodeviews/TableStickyScrollbar.ts +0 -211
  24. package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +0 -15
  25. package/src/nodeviews/__mocks__/OverridableMock.ts +0 -26
  26. package/src/nodeviews/table-container-styles.ts +0 -9
  27. package/src/nodeviews/table-node-views.ts +0 -76
  28. package/src/nodeviews/table.tsx +0 -530
  29. package/src/nodeviews/toDOM.ts +0 -244
  30. package/src/nodeviews/types.ts +0 -36
  31. package/src/nodeviews/update-overflow-shadows.ts +0 -11
  32. package/src/pm-plugins/analytics/actions.ts +0 -21
  33. package/src/pm-plugins/analytics/commands.ts +0 -47
  34. package/src/pm-plugins/analytics/plugin-factory.ts +0 -9
  35. package/src/pm-plugins/analytics/plugin-key.ts +0 -5
  36. package/src/pm-plugins/analytics/plugin.ts +0 -80
  37. package/src/pm-plugins/analytics/reducer.ts +0 -27
  38. package/src/pm-plugins/analytics/types.ts +0 -20
  39. package/src/pm-plugins/analytics/utils/moved-event.ts +0 -51
  40. package/src/pm-plugins/commands/clear.ts +0 -43
  41. package/src/pm-plugins/commands/collapse.ts +0 -17
  42. package/src/pm-plugins/commands/column-resize.ts +0 -478
  43. package/src/pm-plugins/commands/commands-with-analytics.ts +0 -715
  44. package/src/pm-plugins/commands/delete.ts +0 -42
  45. package/src/pm-plugins/commands/display-mode.ts +0 -18
  46. package/src/pm-plugins/commands/go-to-next-cell.ts +0 -198
  47. package/src/pm-plugins/commands/hover.ts +0 -242
  48. package/src/pm-plugins/commands/index.ts +0 -51
  49. package/src/pm-plugins/commands/insert.ts +0 -438
  50. package/src/pm-plugins/commands/misc.ts +0 -811
  51. package/src/pm-plugins/commands/referentiality.ts +0 -15
  52. package/src/pm-plugins/commands/selection.ts +0 -537
  53. package/src/pm-plugins/commands/sort.ts +0 -102
  54. package/src/pm-plugins/commands/split-cell.ts +0 -28
  55. package/src/pm-plugins/commands/toggle.ts +0 -109
  56. package/src/pm-plugins/create-plugin-config.ts +0 -17
  57. package/src/pm-plugins/decorations/plugin.ts +0 -107
  58. package/src/pm-plugins/decorations/utils/column-controls.ts +0 -91
  59. package/src/pm-plugins/decorations/utils/column-resizing.ts +0 -71
  60. package/src/pm-plugins/decorations/utils/compose-decorations.ts +0 -9
  61. package/src/pm-plugins/decorations/utils/types.ts +0 -16
  62. package/src/pm-plugins/default-table-selection.ts +0 -14
  63. package/src/pm-plugins/drag-and-drop/actions.ts +0 -48
  64. package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +0 -222
  65. package/src/pm-plugins/drag-and-drop/commands.ts +0 -194
  66. package/src/pm-plugins/drag-and-drop/consts.ts +0 -7
  67. package/src/pm-plugins/drag-and-drop/plugin-factory.ts +0 -33
  68. package/src/pm-plugins/drag-and-drop/plugin-key.ts +0 -5
  69. package/src/pm-plugins/drag-and-drop/plugin.ts +0 -398
  70. package/src/pm-plugins/drag-and-drop/reducer.ts +0 -38
  71. package/src/pm-plugins/drag-and-drop/types.ts +0 -18
  72. package/src/pm-plugins/drag-and-drop/utils/autoscrollers.ts +0 -49
  73. package/src/pm-plugins/drag-and-drop/utils/getDragBehaviour.ts +0 -9
  74. package/src/pm-plugins/drag-and-drop/utils/monitor.ts +0 -73
  75. package/src/pm-plugins/handlers.ts +0 -161
  76. package/src/pm-plugins/keymap.ts +0 -436
  77. package/src/pm-plugins/main.ts +0 -433
  78. package/src/pm-plugins/plugin-factory.ts +0 -42
  79. package/src/pm-plugins/plugin-key.ts +0 -8
  80. package/src/pm-plugins/reducer.ts +0 -145
  81. package/src/pm-plugins/safari-delete-composition-text-issue-workaround.ts +0 -102
  82. package/src/pm-plugins/sticky-headers/commands.ts +0 -8
  83. package/src/pm-plugins/sticky-headers/plugin-key.ts +0 -5
  84. package/src/pm-plugins/sticky-headers/plugin-state.ts +0 -52
  85. package/src/pm-plugins/sticky-headers/plugin.ts +0 -12
  86. package/src/pm-plugins/sticky-headers/types.ts +0 -20
  87. package/src/pm-plugins/sticky-headers/util.ts +0 -18
  88. package/src/pm-plugins/table-analytics.ts +0 -100
  89. package/src/pm-plugins/table-local-id.ts +0 -213
  90. package/src/pm-plugins/table-resizing/commands.ts +0 -116
  91. package/src/pm-plugins/table-resizing/event-handlers.ts +0 -352
  92. package/src/pm-plugins/table-resizing/plugin-factory.ts +0 -29
  93. package/src/pm-plugins/table-resizing/plugin-key.ts +0 -5
  94. package/src/pm-plugins/table-resizing/plugin.ts +0 -94
  95. package/src/pm-plugins/table-resizing/reducer.ts +0 -37
  96. package/src/pm-plugins/table-resizing/utils/colgroup.ts +0 -306
  97. package/src/pm-plugins/table-resizing/utils/column-state.ts +0 -120
  98. package/src/pm-plugins/table-resizing/utils/consts.ts +0 -11
  99. package/src/pm-plugins/table-resizing/utils/content-width.ts +0 -118
  100. package/src/pm-plugins/table-resizing/utils/dom.ts +0 -132
  101. package/src/pm-plugins/table-resizing/utils/misc.ts +0 -282
  102. package/src/pm-plugins/table-resizing/utils/resize-column.ts +0 -34
  103. package/src/pm-plugins/table-resizing/utils/resize-logic.ts +0 -289
  104. package/src/pm-plugins/table-resizing/utils/resize-state.ts +0 -417
  105. package/src/pm-plugins/table-resizing/utils/scale-table.ts +0 -290
  106. package/src/pm-plugins/table-resizing/utils/types.ts +0 -25
  107. package/src/pm-plugins/table-resizing/utils/unit-to-number.ts +0 -1
  108. package/src/pm-plugins/table-selection-keymap.ts +0 -64
  109. package/src/pm-plugins/table-size-selector.ts +0 -39
  110. package/src/pm-plugins/table-width-in-comment-fix.ts +0 -113
  111. package/src/pm-plugins/table-width.ts +0 -153
  112. package/src/pm-plugins/transforms/column-width.ts +0 -249
  113. package/src/pm-plugins/transforms/delete-columns.ts +0 -281
  114. package/src/pm-plugins/transforms/delete-rows.ts +0 -154
  115. package/src/pm-plugins/transforms/fix-tables.ts +0 -249
  116. package/src/pm-plugins/transforms/merge.ts +0 -301
  117. package/src/pm-plugins/transforms/replace-table.ts +0 -38
  118. package/src/pm-plugins/transforms/split.ts +0 -90
  119. package/src/pm-plugins/utils/alignment.ts +0 -33
  120. package/src/pm-plugins/utils/analytics.ts +0 -238
  121. package/src/pm-plugins/utils/collapse.ts +0 -93
  122. package/src/pm-plugins/utils/column-controls.ts +0 -250
  123. package/src/pm-plugins/utils/create.ts +0 -64
  124. package/src/pm-plugins/utils/decoration.ts +0 -672
  125. package/src/pm-plugins/utils/dom.ts +0 -251
  126. package/src/pm-plugins/utils/drag-menu.tsx +0 -491
  127. package/src/pm-plugins/utils/get-allow-add-column-custom-step.ts +0 -10
  128. package/src/pm-plugins/utils/guidelines.ts +0 -30
  129. package/src/pm-plugins/utils/merged-cells.ts +0 -239
  130. package/src/pm-plugins/utils/nodes.ts +0 -162
  131. package/src/pm-plugins/utils/paste.ts +0 -386
  132. package/src/pm-plugins/utils/row-controls.ts +0 -211
  133. package/src/pm-plugins/utils/selection.ts +0 -17
  134. package/src/pm-plugins/utils/snapping.ts +0 -136
  135. package/src/pm-plugins/utils/table.ts +0 -60
  136. package/src/pm-plugins/utils/update-plugin-state-decorations.ts +0 -13
  137. package/src/pm-plugins/view-mode-sort/consts.ts +0 -3
  138. package/src/pm-plugins/view-mode-sort/index.ts +0 -291
  139. package/src/pm-plugins/view-mode-sort/plugin-key.ts +0 -7
  140. package/src/pm-plugins/view-mode-sort/types.ts +0 -23
  141. package/src/pm-plugins/view-mode-sort/utils.ts +0 -136
  142. package/src/tablePlugin.tsx +0 -971
  143. package/src/tablePluginType.ts +0 -102
  144. package/src/types/index.ts +0 -592
  145. package/src/ui/ColumnResizeWidget/index.tsx +0 -61
  146. package/src/ui/ContentComponent.tsx +0 -311
  147. package/src/ui/DragHandle/HandleIconComponent.tsx +0 -21
  148. package/src/ui/DragHandle/index.tsx +0 -391
  149. package/src/ui/DragPreview/index.tsx +0 -51
  150. package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +0 -59
  151. package/src/ui/FloatingContextualButton/FixedButton.tsx +0 -203
  152. package/src/ui/FloatingContextualButton/index.tsx +0 -168
  153. package/src/ui/FloatingContextualButton/styles.ts +0 -69
  154. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +0 -931
  155. package/src/ui/FloatingContextualMenu/index.tsx +0 -141
  156. package/src/ui/FloatingContextualMenu/styles.ts +0 -77
  157. package/src/ui/FloatingDeleteButton/DeleteButton.tsx +0 -54
  158. package/src/ui/FloatingDeleteButton/getPopUpOptions.ts +0 -65
  159. package/src/ui/FloatingDeleteButton/index.tsx +0 -383
  160. package/src/ui/FloatingDeleteButton/types.ts +0 -3
  161. package/src/ui/FloatingDragMenu/DragMenu.tsx +0 -668
  162. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +0 -221
  163. package/src/ui/FloatingDragMenu/index.tsx +0 -136
  164. package/src/ui/FloatingDragMenu/styles.ts +0 -83
  165. package/src/ui/FloatingInsertButton/InsertButton.tsx +0 -263
  166. package/src/ui/FloatingInsertButton/getPopupOptions.ts +0 -131
  167. package/src/ui/FloatingInsertButton/index.tsx +0 -314
  168. package/src/ui/FloatingToolbarLabel/FloatingToolbarLabel.tsx +0 -31
  169. package/src/ui/SizeSelector/index.tsx +0 -74
  170. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +0 -397
  171. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +0 -105
  172. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +0 -63
  173. package/src/ui/TableFloatingColumnControls/index.tsx +0 -151
  174. package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +0 -106
  175. package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +0 -143
  176. package/src/ui/TableFloatingControls/CornerControls/types.ts +0 -12
  177. package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +0 -88
  178. package/src/ui/TableFloatingControls/NumberColumn/index.tsx +0 -175
  179. package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +0 -131
  180. package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +0 -429
  181. package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +0 -96
  182. package/src/ui/TableFloatingControls/index.tsx +0 -275
  183. package/src/ui/TableFullWidthLabel/index.tsx +0 -38
  184. package/src/ui/common-styles.ts +0 -1218
  185. package/src/ui/consts.ts +0 -109
  186. package/src/ui/event-handlers.ts +0 -662
  187. package/src/ui/global-styles.tsx +0 -55
  188. package/src/ui/hooks/useInternalTablePluginStateSelector.ts +0 -38
  189. package/src/ui/icons/AddColLeftIcon.tsx +0 -37
  190. package/src/ui/icons/AddColRightIcon.tsx +0 -37
  191. package/src/ui/icons/AddRowAboveIcon.tsx +0 -22
  192. package/src/ui/icons/AddRowBelowIcon.tsx +0 -39
  193. package/src/ui/icons/DragHandleDisabledIcon.tsx +0 -25
  194. package/src/ui/icons/DragHandleIcon.tsx +0 -16
  195. package/src/ui/icons/DragInMotionIcon.tsx +0 -54
  196. package/src/ui/icons/MergeCellsIcon.tsx +0 -26
  197. package/src/ui/icons/MinimisedHandle.tsx +0 -15
  198. package/src/ui/icons/SortingIconWrapper.tsx +0 -43
  199. package/src/ui/icons/SplitCellIcon.tsx +0 -34
  200. package/src/ui/toolbar.tsx +0 -1153
  201. package/src/ui/ui-styles.ts +0 -960
  202. package/tsconfig.app.json +0 -135
  203. package/tsconfig.dev.json +0 -54
  204. package/tsconfig.json +0 -18
@@ -1,55 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { Global, jsx } from '@emotion/react';
7
-
8
- import {
9
- sharedPluginStateHookMigratorFactory,
10
- useSharedPluginState,
11
- useSharedPluginStateWithSelector,
12
- } from '@atlaskit/editor-common/hooks';
13
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
14
-
15
- import type { PluginInjectionAPI } from '../types';
16
-
17
- import { tableStyles } from './common-styles';
18
-
19
- const useSharedState = sharedPluginStateHookMigratorFactory(
20
- (api: PluginInjectionAPI | undefined) => {
21
- const { mode } = useSharedPluginStateWithSelector(api, ['editorViewMode'], (states) => ({
22
- mode: states.editorViewModeState?.mode,
23
- }));
24
- return {
25
- mode,
26
- };
27
- },
28
- (api: PluginInjectionAPI | undefined) => {
29
- const { editorViewModeState } = useSharedPluginState(api, ['editorViewMode']);
30
- return {
31
- mode: editorViewModeState?.mode,
32
- };
33
- },
34
- );
35
-
36
- export const GlobalStylesWrapper = ({
37
- featureFlags,
38
- isDragAndDropEnabledOption,
39
- api,
40
- }: {
41
- featureFlags: FeatureFlags | undefined;
42
- isDragAndDropEnabledOption?: boolean;
43
- api?: PluginInjectionAPI;
44
- }) => {
45
- const { mode } = useSharedState(api);
46
- const isLivePageViewMode = mode === 'view';
47
- return (
48
- <Global
49
- styles={tableStyles({
50
- featureFlags,
51
- isDragAndDropEnabled: isDragAndDropEnabledOption && !isLivePageViewMode,
52
- })}
53
- />
54
- );
55
- };
@@ -1,38 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
3
-
4
- import type { TablePlugin } from '../../tablePluginType';
5
- import type { TableSharedStateInternal } from '../../types';
6
-
7
- type Options = {
8
- disabled?: boolean;
9
- };
10
-
11
- /**
12
- * **This hook is only for internal use and should not be used outside of the table plugin.**
13
- *
14
- * Hook to select a value from the internal table plugin state.
15
- * This is a wrapper around `useSharedPluginStateSelector` to provide access to the entire
16
- * `TableSharedStateInternal` type. Since tables plugin has a lot of internal state that is not
17
- * exposed via the `TableSharedState` type, we need to use this hook to access it in a type safe way.
18
- *
19
- * @param api The editor API
20
- * @param key Key of TableSharedStateInternal to select
21
- * @param options
22
- * @returns
23
- * @example
24
- */
25
- export const useInternalTablePluginStateSelector = <K extends keyof TableSharedStateInternal>(
26
- api: ExtractInjectionAPI<TablePlugin> | undefined,
27
- key: K,
28
- options?: Options,
29
- ): TableSharedStateInternal[K] | undefined => {
30
- // Need to disable the eslint rule here because the key is for the TableSharedStateInternal type
31
- // and we are using it as a string to access the value in the useSharedPluginStateSelector
32
- // which is typed only for the public TableSharedState type.
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- const value = useSharedPluginStateSelector(api, `table.${key}` as any, options) as
35
- | TableSharedStateInternal[K]
36
- | undefined;
37
- return value;
38
- };
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
-
3
- export const AddColLeftIcon = () => (
4
- <svg
5
- width="24"
6
- height="24"
7
- viewBox="0 0 24 24"
8
- fill="currentColor"
9
- xmlns="http://www.w3.org/2000/svg"
10
- >
11
- <rect width="24" height="24" transform="matrix(0 -1 1 0 0 24)" fill="none" fillOpacity="0.01" />
12
- <rect
13
- x="12"
14
- y="18"
15
- width="12"
16
- height="3"
17
- rx="0.5"
18
- transform="rotate(-90 12 18)"
19
- fill="currentColor"
20
- />
21
- <rect
22
- x="16"
23
- y="18"
24
- width="12"
25
- height="3"
26
- rx="0.5"
27
- transform="rotate(-90 16 18)"
28
- fill="currentColor"
29
- />
30
- <path
31
- fillRule="evenodd"
32
- clipRule="evenodd"
33
- d="M7 11H5.99C5.72652 11.0026 5.47473 11.1092 5.28935 11.2964C5.10397 11.4837 4.99999 11.7365 5 12C5 12.556 5.444 13 5.99 13H7V14C7 14.2652 7.10536 14.5196 7.29289 14.7071C7.48043 14.8946 7.73478 15 8 15C8.26522 15 8.51957 14.8946 8.70711 14.7071C8.89464 14.5196 9 14.2652 9 14V13H10.01C10.2735 12.9974 10.5253 12.8908 10.7107 12.7036C10.896 12.5163 11 12.2635 11 12C11 11.444 10.556 11 10.01 11H9V10C9 9.73478 8.89464 9.48043 8.70711 9.29289C8.51957 9.10536 8.26522 9 8 9C7.73478 9 7.48043 9.10536 7.29289 9.29289C7.10536 9.48043 7 9.73478 7 10V11Z"
34
- fill="currentColor"
35
- />
36
- </svg>
37
- );
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
-
3
- export const AddColRightIcon = () => (
4
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <rect
6
- width="24"
7
- height="24"
8
- transform="translate(0 24) rotate(-90)"
9
- fill="none"
10
- fillOpacity="0.01"
11
- />
12
- <rect
13
- x="9"
14
- y="18"
15
- width="12"
16
- height="3"
17
- rx="0.5"
18
- transform="rotate(-90 9 18)"
19
- fill="currentColor"
20
- />
21
- <rect
22
- x="5"
23
- y="18"
24
- width="12"
25
- height="3"
26
- rx="0.5"
27
- transform="rotate(-90 5 18)"
28
- fill="currentColor"
29
- />
30
- <path
31
- fillRule="evenodd"
32
- clipRule="evenodd"
33
- d="M15 11L13.99 11C13.7265 11.0026 13.4747 11.1092 13.2893 11.2964C13.104 11.4837 13 11.7365 13 12C13 12.556 13.444 13 13.99 13L15 13L15 14C15 14.2652 15.1054 14.5196 15.2929 14.7071C15.4804 14.8946 15.7348 15 16 15C16.2652 15 16.5196 14.8946 16.7071 14.7071C16.8946 14.5196 17 14.2652 17 14L17 13L18.01 13C18.2735 12.9974 18.5253 12.8908 18.7107 12.7036C18.896 12.5163 19 12.2635 19 12C19 11.444 18.556 11 18.01 11L17 11L17 10C17 9.73478 16.8946 9.48043 16.7071 9.29289C16.5196 9.10536 16.2652 9 16 9C15.7348 9 15.4804 9.10536 15.2929 9.29289C15.1054 9.48043 15 9.73478 15 10L15 11Z"
34
- fill="currentColor"
35
- />
36
- </svg>
37
- );
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
-
3
- import { token } from '@atlaskit/tokens';
4
-
5
- export const AddRowAboveIcon = () => (
6
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
7
- <rect
8
- width="24"
9
- height="24"
10
- fill={token('color.border.inverse', '#FFFFFF')}
11
- fillOpacity="0.01"
12
- />
13
- <rect x="6" y="12" width="12" height="3" rx="0.5" fill="currentColor" />
14
- <rect x="6" y="16" width="12" height="3" rx="0.5" fill="currentColor" />
15
- <path
16
- fillRule="evenodd"
17
- clipRule="evenodd"
18
- d="M13 7V5.99C12.9974 5.72652 12.8908 5.47473 12.7036 5.28935C12.5163 5.10397 12.2635 4.99999 12 5C11.444 5 11 5.444 11 5.99V7H10C9.73478 7 9.48043 7.10536 9.29289 7.29289C9.10536 7.48043 9 7.73478 9 8C9 8.26522 9.10536 8.51957 9.29289 8.70711C9.48043 8.89464 9.73478 9 10 9H11V10.01C11.0026 10.2735 11.1092 10.5253 11.2964 10.7107C11.4837 10.896 11.7365 11 12 11C12.556 11 13 10.556 13 10.01V9H14C14.2652 9 14.5196 8.89464 14.7071 8.70711C14.8946 8.51957 15 8.26522 15 8C15 7.73478 14.8946 7.48043 14.7071 7.29289C14.5196 7.10536 14.2652 7 14 7H13Z"
19
- fill="currentColor"
20
- />
21
- </svg>
22
- );
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
-
3
- import { token } from '@atlaskit/tokens';
4
-
5
- export const AddRowBelowIcon = () => (
6
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
7
- <rect
8
- width="24"
9
- height="24"
10
- transform="matrix(-1 0 0 -1 24 24)"
11
- fill={token('color.border.inverse', '#FFFFFF')}
12
- fillOpacity="0.01"
13
- />
14
- <rect
15
- x="18"
16
- y="12"
17
- width="12"
18
- height="3"
19
- rx="0.5"
20
- transform="rotate(-180 18 12)"
21
- fill="currentColor"
22
- />
23
- <rect
24
- x="18"
25
- y="8"
26
- width="12"
27
- height="3"
28
- rx="0.5"
29
- transform="rotate(-180 18 8)"
30
- fill="currentColor"
31
- />
32
- <path
33
- fillRule="evenodd"
34
- clipRule="evenodd"
35
- d="M11 17V18.01C11.0026 18.2735 11.1092 18.5253 11.2964 18.7107C11.4837 18.896 11.7365 19 12 19C12.556 19 13 18.556 13 18.01V17H14C14.2652 17 14.5196 16.8946 14.7071 16.7071C14.8946 16.5196 15 16.2652 15 16C15 15.7348 14.8946 15.4804 14.7071 15.2929C14.5196 15.1054 14.2652 15 14 15H13V13.99C12.9974 13.7265 12.8908 13.4747 12.7036 13.2893C12.5163 13.104 12.2635 13 12 13C11.444 13 11 13.444 11 13.99V15H10C9.73478 15 9.48043 15.1054 9.29289 15.2929C9.10536 15.4804 9 15.7348 9 16C9 16.2652 9.10536 16.5196 9.29289 16.7071C9.48043 16.8946 9.73478 17 10 17H11Z"
36
- fill="currentColor"
37
- />
38
- </svg>
39
- );
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
-
3
- interface DragHandleDisabledIconProps {
4
- style?: React.CSSProperties;
5
- }
6
-
7
- export const DragHandleDisabledIcon = ({ style }: DragHandleDisabledIconProps) => (
8
- <svg
9
- width="24"
10
- height="16"
11
- viewBox="0 0 24 16"
12
- fill="none"
13
- xmlns="http://www.w3.org/2000/svg"
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
15
- style={style}
16
- data-testid="drag-icon-disabled"
17
- >
18
- <rect width="24" height="16" rx="4" />
19
- <g>
20
- <rect x="7" y="4" width="2" height="8" rx="1" />
21
- <rect x="11" y="4" width="2" height="8" rx="1" />
22
- <rect x="15" y="4" width="2" height="8" rx="1" />
23
- </g>
24
- </svg>
25
- );
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
-
3
- export const DragHandleIcon = () => (
4
- <svg
5
- xmlns="http://www.w3.org/2000/svg"
6
- width="24"
7
- height="16"
8
- fill="none"
9
- data-testid="drag-icon-enabled"
10
- >
11
- <rect width="24" height="16" rx="4" />
12
- <g>
13
- <path d="M9 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM9 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z" />
14
- </g>
15
- </svg>
16
- );
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
-
3
- import { token } from '@atlaskit/tokens';
4
-
5
- interface DragInMotionIconProps {
6
- style?: React.CSSProperties;
7
- }
8
-
9
- export const DragInMotionIcon = ({ style }: DragInMotionIconProps) => (
10
- <svg
11
- width="28"
12
- height="20"
13
- viewBox="0 0 28 20"
14
- fill="none"
15
- xmlns="http://www.w3.org/2000/svg"
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
17
- style={style}
18
- >
19
- <rect
20
- x="1"
21
- y="1"
22
- width="26"
23
- height="18"
24
- rx="5"
25
- fill={token('color.background.accent.blue.subtle', '#579DFF')}
26
- />
27
- <rect x="9" y="6" width="2" height="8" rx="1" fill={token('color.border.inverse', '#FFFFFF')} />
28
- <rect
29
- x="13"
30
- y="6"
31
- width="2"
32
- height="8"
33
- rx="1"
34
- fill={token('color.border.inverse', '#FFFFFF')}
35
- />
36
- <rect
37
- x="17"
38
- y="6"
39
- width="2"
40
- height="8"
41
- rx="1"
42
- fill={token('color.border.inverse', '#FFFFFF')}
43
- />
44
- <rect
45
- x="1"
46
- y="1"
47
- width="26"
48
- height="18"
49
- rx="5"
50
- stroke={token('color.border.inverse', '#FFFFFF')}
51
- strokeWidth="2"
52
- />
53
- </svg>
54
- );
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
-
3
- export const MergeCellsIcon = () => (
4
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path
6
- fillRule="evenodd"
7
- clipRule="evenodd"
8
- d="M10 19C10.5523 19 11 18.5523 11 18C11 17.4477 10.5523 17 10 17H6V7L10 7C10.5523 7 11 6.55228 11 6C11 5.44771 10.5523 5 10 5H6C4.89543 5 4 5.89543 4 7V17C4 18.1046 4.89543 19 6 19H10ZM14 5C13.4477 5 13 5.44772 13 6C13 6.55228 13.4477 7 14 7H18V17L14 17C13.4477 17 13 17.4477 13 18C13 18.5523 13.4477 19 14 19H18C19.1046 19 20 18.1046 20 17V7C20 5.89543 19.1046 5 18 5H14Z"
9
- fill="currentColor"
10
- />
11
- <path
12
- d="M15.75 10L13.75 12L15.75 14"
13
- stroke="currentColor"
14
- strokeWidth="1.5"
15
- strokeLinecap="round"
16
- strokeLinejoin="round"
17
- />
18
- <path
19
- d="M8.25 14L10.25 12L8.25 10"
20
- stroke="currentColor"
21
- strokeWidth="1.5"
22
- strokeLinecap="round"
23
- strokeLinejoin="round"
24
- />
25
- </svg>
26
- );
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
-
3
- import { TableCssClassName as ClassName } from '../../types';
4
-
5
- export const MinimisedHandleIcon = () => (
6
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="5" fill="none">
7
- <rect
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
9
- className={ClassName.DRAG_HANDLE_MINIMISED}
10
- width="24"
11
- height="5"
12
- rx="3"
13
- />
14
- </svg>
15
- );
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
-
3
- import {
4
- sharedPluginStateHookMigratorFactory,
5
- useSharedPluginState,
6
- useSharedPluginStateWithSelector,
7
- } from '@atlaskit/editor-common/hooks';
8
- import { SortingIcon } from '@atlaskit/editor-common/table';
9
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
10
-
11
- import type { TablePlugin } from '../../tablePluginType';
12
-
13
- type SortingIconProps = React.ComponentProps<typeof SortingIcon>;
14
- type SortingIconWrapperProps = SortingIconProps & {
15
- api: ExtractInjectionAPI<TablePlugin>;
16
- };
17
-
18
- const useSharedState = sharedPluginStateHookMigratorFactory(
19
- (api: ExtractInjectionAPI<TablePlugin> | undefined) => {
20
- const { mode } = useSharedPluginStateWithSelector(api, ['editorViewMode'], (states) => ({
21
- mode: states.editorViewModeState?.mode,
22
- }));
23
- return {
24
- mode,
25
- };
26
- },
27
- (api: ExtractInjectionAPI<TablePlugin> | undefined) => {
28
- const { editorViewModeState } = useSharedPluginState(api, ['editorViewMode']);
29
- return {
30
- mode: editorViewModeState?.mode,
31
- };
32
- },
33
- );
34
-
35
- export const SortingIconWrapper = (props: SortingIconWrapperProps) => {
36
- const { mode } = useSharedState(props.api);
37
- if (mode === 'edit') {
38
- return null;
39
- }
40
- // Ignored via go/ees005
41
- // eslint-disable-next-line react/jsx-props-no-spreading
42
- return <SortingIcon {...props} />;
43
- };
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
-
3
- export const SplitCellIcon = () => (
4
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
- <path
6
- d="M19 18L14 18L14 6L19 6"
7
- stroke="currentColor"
8
- strokeWidth="2"
9
- strokeLinecap="round"
10
- strokeLinejoin="round"
11
- />
12
- <path
13
- d="M5 6L10 6L9.99999 18L5 18"
14
- stroke="currentColor"
15
- strokeWidth="2"
16
- strokeLinecap="round"
17
- strokeLinejoin="round"
18
- />
19
- <path
20
- d="M7 10L5 12L7 14"
21
- stroke="currentColor"
22
- strokeWidth="1.5"
23
- strokeLinecap="round"
24
- strokeLinejoin="round"
25
- />
26
- <path
27
- d="M17 14L19 12L17 10"
28
- stroke="currentColor"
29
- strokeWidth="1.5"
30
- strokeLinecap="round"
31
- strokeLinejoin="round"
32
- />
33
- </svg>
34
- );