@atlaskit/editor-plugin-table 8.4.1 → 8.4.3
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 +17 -0
- package/commands/package.json +5 -5
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/nodeviews/ExternalDropTargets.js +1 -1
- package/dist/cjs/nodeviews/TableComponent.js +3 -3
- package/dist/cjs/nodeviews/TableContainer.js +2 -2
- package/dist/cjs/nodeviews/TableResizer.js +6 -6
- package/dist/cjs/nodeviews/TableRow.js +2 -2
- package/dist/cjs/nodeviews/table-container-styles.js +1 -1
- package/dist/cjs/nodeviews/table.js +2 -2
- package/dist/cjs/{toDOM.js → nodeviews/toDOM.js} +3 -3
- package/dist/cjs/pm-plugins/analytics/plugin.js +1 -1
- package/dist/cjs/{commands → pm-plugins/commands}/column-resize.js +8 -8
- package/dist/cjs/{commands-with-analytics.js → pm-plugins/commands/commands-with-analytics.js} +15 -15
- package/dist/cjs/{commands → pm-plugins/commands}/go-to-next-cell.js +2 -2
- package/dist/cjs/{commands → pm-plugins/commands}/hover.js +2 -2
- package/dist/cjs/{commands → pm-plugins/commands}/insert.js +16 -11
- package/dist/cjs/{commands → pm-plugins/commands}/misc.js +4 -4
- package/dist/cjs/{commands → pm-plugins/commands}/referentiality.js +1 -1
- package/dist/cjs/{commands → pm-plugins/commands}/selection.js +3 -3
- package/dist/cjs/{commands → pm-plugins/commands}/sort.js +1 -1
- package/dist/cjs/{commands → pm-plugins/commands}/split-cell.js +1 -1
- package/dist/cjs/{commands → pm-plugins/commands}/toggle.js +2 -2
- package/dist/cjs/pm-plugins/decorations/utils/column-controls.js +1 -1
- package/dist/cjs/pm-plugins/decorations/utils/column-resizing.js +1 -1
- package/dist/cjs/pm-plugins/drag-and-drop/commands-with-analytics.js +3 -3
- package/dist/cjs/pm-plugins/drag-and-drop/commands.js +1 -1
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +6 -6
- package/dist/cjs/{handlers.js → pm-plugins/handlers.js} +2 -2
- package/dist/cjs/pm-plugins/keymap.js +18 -18
- package/dist/cjs/pm-plugins/main.js +7 -7
- package/dist/cjs/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/{reducer.js → pm-plugins/reducer.js} +1 -1
- package/dist/cjs/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +5 -5
- package/dist/cjs/pm-plugins/table-resizing/utils/dom.js +2 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +1 -1
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +1 -1
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/cjs/pm-plugins/table-selection-keymap.js +1 -1
- package/dist/cjs/pm-plugins/table-width-in-comment-fix.js +1 -1
- package/dist/cjs/pm-plugins/table-width.js +1 -1
- package/dist/cjs/{transforms → pm-plugins/transforms}/column-width.js +4 -4
- package/dist/cjs/{transforms → pm-plugins/transforms}/delete-columns.js +1 -1
- package/dist/cjs/{transforms → pm-plugins/transforms}/fix-tables.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/alignment.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/analytics.js +3 -3
- package/dist/cjs/{utils → pm-plugins/utils}/column-controls.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/create.js +8 -1
- package/dist/cjs/{utils → pm-plugins/utils}/decoration.js +2 -2
- package/dist/cjs/{utils → pm-plugins/utils}/dom.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/drag-menu.js +6 -6
- package/dist/cjs/{utils → pm-plugins/utils}/get-allow-add-column-custom-step.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/paste.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/row-controls.js +2 -2
- package/dist/cjs/{utils → pm-plugins/utils}/update-plugin-state-decorations.js +1 -1
- package/dist/cjs/{plugin.js → tablePlugin.js} +11 -9
- package/dist/cjs/tablePluginType.js +5 -0
- package/dist/cjs/ui/DragHandle/index.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +1 -1
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +4 -4
- package/dist/cjs/ui/FloatingDeleteButton/index.js +3 -3
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +4 -4
- package/dist/cjs/ui/FloatingInsertButton/index.js +2 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +2 -2
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +2 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +2 -2
- package/dist/cjs/ui/TableFloatingControls/index.js +2 -2
- package/dist/cjs/{event-handlers.js → ui/event-handlers.js} +8 -8
- package/dist/cjs/{toolbar.js → ui/toolbar.js} +12 -12
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/nodeviews/ExternalDropTargets.js +1 -1
- package/dist/es2019/nodeviews/TableComponent.js +3 -3
- package/dist/es2019/nodeviews/TableContainer.js +2 -2
- package/dist/es2019/nodeviews/TableResizer.js +6 -6
- package/dist/es2019/nodeviews/TableRow.js +2 -2
- package/dist/es2019/nodeviews/table-container-styles.js +1 -1
- package/dist/es2019/nodeviews/table.js +2 -2
- package/dist/es2019/{toDOM.js → nodeviews/toDOM.js} +3 -3
- package/dist/es2019/pm-plugins/analytics/plugin.js +1 -1
- package/dist/es2019/{commands → pm-plugins/commands}/column-resize.js +8 -8
- package/dist/es2019/{commands-with-analytics.js → pm-plugins/commands/commands-with-analytics.js} +15 -15
- package/dist/es2019/{commands → pm-plugins/commands}/go-to-next-cell.js +2 -2
- package/dist/es2019/{commands → pm-plugins/commands}/hover.js +2 -2
- package/dist/es2019/{commands → pm-plugins/commands}/insert.js +16 -11
- package/dist/es2019/{commands → pm-plugins/commands}/misc.js +4 -4
- package/dist/es2019/{commands → pm-plugins/commands}/referentiality.js +1 -1
- package/dist/es2019/{commands → pm-plugins/commands}/selection.js +3 -3
- package/dist/es2019/{commands → pm-plugins/commands}/sort.js +1 -1
- package/dist/es2019/{commands → pm-plugins/commands}/split-cell.js +2 -1
- package/dist/es2019/{commands → pm-plugins/commands}/toggle.js +2 -2
- package/dist/es2019/pm-plugins/decorations/utils/column-controls.js +1 -1
- package/dist/es2019/pm-plugins/decorations/utils/column-resizing.js +1 -1
- package/dist/es2019/pm-plugins/drag-and-drop/commands-with-analytics.js +3 -3
- package/dist/es2019/pm-plugins/drag-and-drop/commands.js +1 -1
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +1 -1
- package/dist/es2019/{handlers.js → pm-plugins/handlers.js} +2 -2
- package/dist/es2019/pm-plugins/keymap.js +4 -4
- package/dist/es2019/pm-plugins/main.js +7 -7
- package/dist/es2019/pm-plugins/plugin-factory.js +2 -2
- package/dist/es2019/{reducer.js → pm-plugins/reducer.js} +1 -1
- package/dist/es2019/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +5 -5
- package/dist/es2019/pm-plugins/table-resizing/utils/dom.js +2 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/es2019/pm-plugins/table-selection-keymap.js +1 -1
- package/dist/es2019/pm-plugins/table-width-in-comment-fix.js +1 -1
- package/dist/es2019/pm-plugins/table-width.js +1 -1
- package/dist/es2019/{transforms → pm-plugins/transforms}/column-width.js +5 -4
- package/dist/es2019/{transforms → pm-plugins/transforms}/delete-columns.js +1 -1
- package/dist/es2019/{transforms → pm-plugins/transforms}/fix-tables.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/alignment.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/analytics.js +2 -2
- package/dist/es2019/{utils → pm-plugins/utils}/column-controls.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/create.js +8 -1
- package/dist/es2019/{utils → pm-plugins/utils}/decoration.js +2 -2
- package/dist/es2019/{utils → pm-plugins/utils}/dom.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/drag-menu.js +6 -6
- package/dist/es2019/{utils → pm-plugins/utils}/get-allow-add-column-custom-step.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/paste.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/row-controls.js +2 -2
- package/dist/es2019/{utils → pm-plugins/utils}/update-plugin-state-decorations.js +1 -1
- package/dist/es2019/{plugin.js → tablePlugin.js} +12 -9
- package/dist/es2019/tablePluginType.js +1 -0
- package/dist/es2019/ui/DragHandle/index.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +1 -1
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +4 -4
- package/dist/es2019/ui/FloatingDeleteButton/index.js +3 -3
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +4 -4
- package/dist/es2019/ui/FloatingInsertButton/index.js +2 -2
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +2 -2
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +2 -2
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +2 -2
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +2 -2
- package/dist/es2019/ui/TableFloatingControls/index.js +2 -2
- package/dist/es2019/{event-handlers.js → ui/event-handlers.js} +8 -8
- package/dist/es2019/{toolbar.js → ui/toolbar.js} +12 -12
- package/dist/esm/index.js +1 -1
- package/dist/esm/nodeviews/ExternalDropTargets.js +1 -1
- package/dist/esm/nodeviews/TableComponent.js +3 -3
- package/dist/esm/nodeviews/TableContainer.js +2 -2
- package/dist/esm/nodeviews/TableResizer.js +6 -6
- package/dist/esm/nodeviews/TableRow.js +2 -2
- package/dist/esm/nodeviews/table-container-styles.js +1 -1
- package/dist/esm/nodeviews/table.js +2 -2
- package/dist/esm/{toDOM.js → nodeviews/toDOM.js} +3 -3
- package/dist/esm/pm-plugins/analytics/plugin.js +1 -1
- package/dist/esm/{commands → pm-plugins/commands}/column-resize.js +8 -8
- package/dist/esm/{commands-with-analytics.js → pm-plugins/commands/commands-with-analytics.js} +15 -15
- package/dist/esm/{commands → pm-plugins/commands}/go-to-next-cell.js +2 -2
- package/dist/esm/{commands → pm-plugins/commands}/hover.js +2 -2
- package/dist/esm/{commands → pm-plugins/commands}/insert.js +16 -11
- package/dist/esm/{commands → pm-plugins/commands}/misc.js +4 -4
- package/dist/esm/{commands → pm-plugins/commands}/referentiality.js +1 -1
- package/dist/esm/{commands → pm-plugins/commands}/selection.js +3 -3
- package/dist/esm/{commands → pm-plugins/commands}/sort.js +1 -1
- package/dist/esm/{commands → pm-plugins/commands}/split-cell.js +2 -1
- package/dist/esm/{commands → pm-plugins/commands}/toggle.js +2 -2
- package/dist/esm/pm-plugins/decorations/utils/column-controls.js +1 -1
- package/dist/esm/pm-plugins/decorations/utils/column-resizing.js +1 -1
- package/dist/esm/pm-plugins/drag-and-drop/commands-with-analytics.js +3 -3
- package/dist/esm/pm-plugins/drag-and-drop/commands.js +1 -1
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +1 -1
- package/dist/esm/{handlers.js → pm-plugins/handlers.js} +2 -2
- package/dist/esm/pm-plugins/keymap.js +4 -4
- package/dist/esm/pm-plugins/main.js +7 -7
- package/dist/esm/pm-plugins/plugin-factory.js +2 -2
- package/dist/esm/{reducer.js → pm-plugins/reducer.js} +1 -1
- package/dist/esm/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +5 -5
- package/dist/esm/pm-plugins/table-resizing/utils/dom.js +2 -2
- package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/esm/pm-plugins/table-selection-keymap.js +1 -1
- package/dist/esm/pm-plugins/table-width-in-comment-fix.js +1 -1
- package/dist/esm/pm-plugins/table-width.js +1 -1
- package/dist/esm/{transforms → pm-plugins/transforms}/column-width.js +5 -4
- package/dist/esm/{transforms → pm-plugins/transforms}/delete-columns.js +1 -1
- package/dist/esm/{transforms → pm-plugins/transforms}/fix-tables.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/alignment.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/analytics.js +2 -2
- package/dist/esm/{utils → pm-plugins/utils}/column-controls.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/create.js +8 -1
- package/dist/esm/{utils → pm-plugins/utils}/decoration.js +2 -2
- package/dist/esm/{utils → pm-plugins/utils}/dom.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/drag-menu.js +6 -6
- package/dist/esm/{utils → pm-plugins/utils}/get-allow-add-column-custom-step.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/paste.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/row-controls.js +2 -2
- package/dist/esm/{utils → pm-plugins/utils}/update-plugin-state-decorations.js +1 -1
- package/dist/esm/{plugin.js → tablePlugin.js} +11 -9
- package/dist/esm/tablePluginType.js +1 -0
- package/dist/esm/ui/DragHandle/index.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +1 -1
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +4 -4
- package/dist/esm/ui/FloatingDeleteButton/index.js +3 -3
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +4 -4
- package/dist/esm/ui/FloatingInsertButton/index.js +2 -2
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +2 -2
- package/dist/esm/ui/TableFloatingColumnControls/index.js +1 -1
- package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +1 -1
- package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +1 -1
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +2 -2
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +2 -2
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +2 -2
- package/dist/esm/ui/TableFloatingControls/index.js +2 -2
- package/dist/esm/{event-handlers.js → ui/event-handlers.js} +8 -8
- package/dist/esm/{toolbar.js → ui/toolbar.js} +12 -12
- package/dist/types/index.d.ts +2 -2
- package/dist/{types-ts4.5 → types/pm-plugins}/commands/column-resize.d.ts +1 -1
- package/dist/types/{commands-with-analytics.d.ts → pm-plugins/commands/commands-with-analytics.d.ts} +2 -2
- package/dist/types/{commands → pm-plugins/commands}/delete.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/commands/hover.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/commands/insert.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/commands/misc.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/commands/selection.d.ts +1 -1
- package/dist/types/{commands → pm-plugins/commands}/toggle.d.ts +1 -1
- package/dist/types/{create-plugin-config.d.ts → pm-plugins/create-plugin-config.d.ts} +1 -1
- package/dist/types/{handlers.d.ts → pm-plugins/handlers.d.ts} +1 -1
- package/dist/types/{reducer.d.ts → pm-plugins/reducer.d.ts} +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/transforms/column-width.d.ts +2 -2
- package/dist/{types-ts4.5 → types/pm-plugins}/transforms/delete-columns.d.ts +1 -1
- package/dist/types/{transforms → pm-plugins/transforms}/fix-tables.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/utils/alignment.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/utils/create.d.ts +2 -1
- package/dist/types/{utils → pm-plugins/utils}/decoration.d.ts +2 -2
- package/dist/types/{utils → pm-plugins/utils}/drag-menu.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/utils/update-plugin-state-decorations.d.ts +1 -1
- package/dist/types/pm-plugins/view-mode-sort/index.d.ts +1 -1
- package/dist/types/tablePlugin.d.ts +7 -0
- package/dist/types/{plugin.d.ts → tablePluginType.d.ts} +2 -8
- package/dist/types/{types.d.ts → types/index.d.ts} +1 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +2 -2
- package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/index.d.ts +2 -2
- package/dist/{types-ts4.5 → types/ui}/event-handlers.d.ts +1 -1
- package/dist/types/ui/icons/SortingIconWrapper.d.ts +1 -1
- package/dist/types/{toolbar.d.ts → ui/toolbar.d.ts} +2 -2
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/{types → types-ts4.5/pm-plugins}/commands/column-resize.d.ts +1 -1
- package/dist/types-ts4.5/{commands-with-analytics.d.ts → pm-plugins/commands/commands-with-analytics.d.ts} +2 -2
- package/dist/types-ts4.5/{commands → pm-plugins/commands}/delete.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/commands/hover.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/commands/insert.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/commands/misc.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/commands/selection.d.ts +1 -1
- package/dist/types-ts4.5/{commands → pm-plugins/commands}/toggle.d.ts +1 -1
- package/dist/types-ts4.5/{create-plugin-config.d.ts → pm-plugins/create-plugin-config.d.ts} +1 -1
- package/dist/types-ts4.5/{handlers.d.ts → pm-plugins/handlers.d.ts} +1 -1
- package/dist/types-ts4.5/{reducer.d.ts → pm-plugins/reducer.d.ts} +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/transforms/column-width.d.ts +2 -2
- package/dist/{types → types-ts4.5/pm-plugins}/transforms/delete-columns.d.ts +1 -1
- package/dist/types-ts4.5/{transforms → pm-plugins/transforms}/fix-tables.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/utils/alignment.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/utils/create.d.ts +2 -1
- package/dist/types-ts4.5/{utils → pm-plugins/utils}/decoration.d.ts +2 -2
- package/dist/types-ts4.5/{utils → pm-plugins/utils}/drag-menu.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/utils/update-plugin-state-decorations.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +1 -1
- package/dist/types-ts4.5/tablePlugin.d.ts +7 -0
- package/dist/types-ts4.5/{plugin.d.ts → tablePluginType.d.ts} +2 -8
- package/dist/types-ts4.5/{types.d.ts → types/index.d.ts} +1 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +2 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +2 -2
- package/dist/{types → types-ts4.5/ui}/event-handlers.d.ts +1 -1
- package/dist/types-ts4.5/ui/icons/SortingIconWrapper.d.ts +1 -1
- package/dist/types-ts4.5/{toolbar.d.ts → ui/toolbar.d.ts} +2 -2
- package/package.json +12 -8
- package/src/index.ts +2 -2
- package/src/nodeviews/ExternalDropTargets.tsx +1 -1
- package/src/nodeviews/TableComponent.tsx +12 -12
- package/src/nodeviews/TableContainer.tsx +2 -2
- package/src/nodeviews/TableResizer.tsx +13 -13
- package/src/nodeviews/TableRow.ts +3 -3
- package/src/nodeviews/table-container-styles.ts +1 -1
- package/src/nodeviews/table.tsx +2 -2
- package/src/{toDOM.ts → nodeviews/toDOM.ts} +4 -3
- package/src/pm-plugins/analytics/plugin.ts +1 -1
- package/src/{commands → pm-plugins/commands}/column-resize.ts +9 -9
- package/src/{commands-with-analytics.ts → pm-plugins/commands/commands-with-analytics.ts} +24 -23
- package/src/{commands → pm-plugins/commands}/delete.ts +1 -1
- package/src/{commands → pm-plugins/commands}/go-to-next-cell.ts +2 -2
- package/src/{commands → pm-plugins/commands}/hover.ts +3 -3
- package/src/{commands → pm-plugins/commands}/insert.ts +18 -12
- package/src/{commands → pm-plugins/commands}/misc.ts +5 -5
- package/src/{commands → pm-plugins/commands}/referentiality.ts +1 -1
- package/src/{commands → pm-plugins/commands}/selection.ts +5 -4
- package/src/{commands → pm-plugins/commands}/sort.ts +2 -2
- package/src/{commands → pm-plugins/commands}/split-cell.ts +2 -2
- package/src/{commands → pm-plugins/commands}/toggle.ts +2 -2
- package/src/{create-plugin-config.ts → pm-plugins/create-plugin-config.ts} +1 -1
- package/src/pm-plugins/decorations/utils/column-controls.ts +1 -1
- package/src/pm-plugins/decorations/utils/column-resizing.ts +1 -1
- package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +3 -3
- package/src/pm-plugins/drag-and-drop/commands.ts +1 -1
- package/src/pm-plugins/drag-and-drop/plugin.ts +1 -1
- package/src/{handlers.ts → pm-plugins/handlers.ts} +4 -3
- package/src/pm-plugins/keymap.ts +11 -10
- package/src/pm-plugins/main.ts +28 -28
- package/src/pm-plugins/plugin-factory.ts +2 -3
- package/src/{reducer.ts → pm-plugins/reducer.ts} +3 -2
- package/src/pm-plugins/table-resizing/commands.ts +1 -1
- package/src/pm-plugins/table-resizing/event-handlers.ts +7 -7
- package/src/pm-plugins/table-resizing/utils/dom.ts +2 -2
- package/src/pm-plugins/table-resizing/utils/resize-column.ts +1 -1
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +1 -1
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +2 -2
- package/src/pm-plugins/table-selection-keymap.ts +3 -2
- package/src/pm-plugins/table-width-in-comment-fix.ts +1 -1
- package/src/pm-plugins/table-width.ts +1 -2
- package/src/{transforms → pm-plugins/transforms}/column-width.ts +6 -6
- package/src/{transforms → pm-plugins/transforms}/delete-columns.ts +2 -2
- package/src/{transforms → pm-plugins/transforms}/fix-tables.ts +2 -2
- package/src/{utils → pm-plugins/utils}/alignment.ts +2 -2
- package/src/{utils → pm-plugins/utils}/analytics.ts +3 -2
- package/src/{utils → pm-plugins/utils}/column-controls.ts +1 -1
- package/src/{utils → pm-plugins/utils}/create.ts +15 -1
- package/src/{utils → pm-plugins/utils}/decoration.ts +3 -3
- package/src/{utils → pm-plugins/utils}/dom.ts +1 -1
- package/src/{utils → pm-plugins/utils}/drag-menu.ts +7 -7
- package/src/{utils → pm-plugins/utils}/get-allow-add-column-custom-step.ts +1 -1
- package/src/{utils → pm-plugins/utils}/paste.ts +1 -1
- package/src/{utils → pm-plugins/utils}/row-controls.ts +2 -2
- package/src/{utils → pm-plugins/utils}/update-plugin-state-decorations.ts +2 -2
- package/src/pm-plugins/view-mode-sort/index.ts +1 -1
- package/src/{plugin.tsx → tablePlugin.tsx} +16 -88
- package/src/tablePluginType.ts +79 -0
- package/src/{types.ts → types/index.ts} +1 -1
- package/src/ui/DragHandle/index.tsx +1 -1
- package/src/ui/FloatingContextualButton/index.tsx +1 -1
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +6 -6
- package/src/ui/FloatingDeleteButton/index.tsx +8 -5
- package/src/ui/FloatingDragMenu/DragMenu.tsx +7 -7
- package/src/ui/FloatingInsertButton/index.tsx +5 -2
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +3 -3
- package/src/ui/TableFloatingColumnControls/index.tsx +1 -1
- package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +1 -1
- package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +2 -2
- package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +1 -1
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +2 -2
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +3 -3
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +2 -2
- package/src/ui/TableFloatingControls/index.tsx +3 -3
- package/src/{event-handlers.ts → ui/event-handlers.ts} +9 -9
- package/src/ui/icons/SortingIconWrapper.tsx +1 -1
- package/src/{toolbar.tsx → ui/toolbar.tsx} +20 -19
- package/tsconfig.dev.json +1 -1
- package/types/package.json +5 -5
- package/dist/cjs/i18n/cs.js +0 -44
- package/dist/cjs/i18n/da.js +0 -42
- package/dist/cjs/i18n/de.js +0 -42
- package/dist/cjs/i18n/en.js +0 -44
- package/dist/cjs/i18n/en_GB.js +0 -44
- package/dist/cjs/i18n/en_ZZ.js +0 -44
- package/dist/cjs/i18n/es.js +0 -42
- package/dist/cjs/i18n/fi.js +0 -42
- package/dist/cjs/i18n/fr.js +0 -44
- package/dist/cjs/i18n/hu.js +0 -44
- package/dist/cjs/i18n/it.js +0 -44
- package/dist/cjs/i18n/ja.js +0 -44
- package/dist/cjs/i18n/ko.js +0 -42
- package/dist/cjs/i18n/nb.js +0 -42
- package/dist/cjs/i18n/nl.js +0 -44
- package/dist/cjs/i18n/pl.js +0 -44
- package/dist/cjs/i18n/pt_BR.js +0 -44
- package/dist/cjs/i18n/ru.js +0 -44
- package/dist/cjs/i18n/sv.js +0 -42
- package/dist/cjs/i18n/th.js +0 -42
- package/dist/cjs/i18n/tr.js +0 -44
- package/dist/cjs/i18n/uk.js +0 -44
- package/dist/cjs/i18n/vi.js +0 -42
- package/dist/cjs/i18n/zh.js +0 -44
- package/dist/cjs/i18n/zh_TW.js +0 -44
- package/dist/es2019/i18n/cs.js +0 -38
- package/dist/es2019/i18n/da.js +0 -36
- package/dist/es2019/i18n/de.js +0 -36
- package/dist/es2019/i18n/en.js +0 -38
- package/dist/es2019/i18n/en_GB.js +0 -38
- package/dist/es2019/i18n/en_ZZ.js +0 -38
- package/dist/es2019/i18n/es.js +0 -36
- package/dist/es2019/i18n/fi.js +0 -36
- package/dist/es2019/i18n/fr.js +0 -38
- package/dist/es2019/i18n/hu.js +0 -38
- package/dist/es2019/i18n/it.js +0 -38
- package/dist/es2019/i18n/ja.js +0 -38
- package/dist/es2019/i18n/ko.js +0 -36
- package/dist/es2019/i18n/nb.js +0 -36
- package/dist/es2019/i18n/nl.js +0 -38
- package/dist/es2019/i18n/pl.js +0 -38
- package/dist/es2019/i18n/pt_BR.js +0 -38
- package/dist/es2019/i18n/ru.js +0 -38
- package/dist/es2019/i18n/sv.js +0 -36
- package/dist/es2019/i18n/th.js +0 -36
- package/dist/es2019/i18n/tr.js +0 -38
- package/dist/es2019/i18n/uk.js +0 -38
- package/dist/es2019/i18n/vi.js +0 -36
- package/dist/es2019/i18n/zh.js +0 -38
- package/dist/es2019/i18n/zh_TW.js +0 -38
- package/dist/esm/i18n/cs.js +0 -38
- package/dist/esm/i18n/da.js +0 -36
- package/dist/esm/i18n/de.js +0 -36
- package/dist/esm/i18n/en.js +0 -38
- package/dist/esm/i18n/en_GB.js +0 -38
- package/dist/esm/i18n/en_ZZ.js +0 -38
- package/dist/esm/i18n/es.js +0 -36
- package/dist/esm/i18n/fi.js +0 -36
- package/dist/esm/i18n/fr.js +0 -38
- package/dist/esm/i18n/hu.js +0 -38
- package/dist/esm/i18n/it.js +0 -38
- package/dist/esm/i18n/ja.js +0 -38
- package/dist/esm/i18n/ko.js +0 -36
- package/dist/esm/i18n/nb.js +0 -36
- package/dist/esm/i18n/nl.js +0 -38
- package/dist/esm/i18n/pl.js +0 -38
- package/dist/esm/i18n/pt_BR.js +0 -38
- package/dist/esm/i18n/ru.js +0 -38
- package/dist/esm/i18n/sv.js +0 -36
- package/dist/esm/i18n/th.js +0 -36
- package/dist/esm/i18n/tr.js +0 -38
- package/dist/esm/i18n/uk.js +0 -38
- package/dist/esm/i18n/vi.js +0 -36
- package/dist/esm/i18n/zh.js +0 -38
- package/dist/esm/i18n/zh_TW.js +0 -38
- package/dist/types/i18n/cs.d.ts +0 -37
- package/dist/types/i18n/da.d.ts +0 -35
- package/dist/types/i18n/de.d.ts +0 -35
- package/dist/types/i18n/en.d.ts +0 -37
- package/dist/types/i18n/en_GB.d.ts +0 -37
- package/dist/types/i18n/en_ZZ.d.ts +0 -37
- package/dist/types/i18n/es.d.ts +0 -35
- package/dist/types/i18n/fi.d.ts +0 -35
- package/dist/types/i18n/fr.d.ts +0 -37
- package/dist/types/i18n/hu.d.ts +0 -37
- package/dist/types/i18n/it.d.ts +0 -37
- package/dist/types/i18n/ja.d.ts +0 -37
- package/dist/types/i18n/ko.d.ts +0 -35
- package/dist/types/i18n/nb.d.ts +0 -35
- package/dist/types/i18n/nl.d.ts +0 -37
- package/dist/types/i18n/pl.d.ts +0 -37
- package/dist/types/i18n/pt_BR.d.ts +0 -37
- package/dist/types/i18n/ru.d.ts +0 -37
- package/dist/types/i18n/sv.d.ts +0 -35
- package/dist/types/i18n/th.d.ts +0 -35
- package/dist/types/i18n/tr.d.ts +0 -37
- package/dist/types/i18n/uk.d.ts +0 -37
- package/dist/types/i18n/vi.d.ts +0 -35
- package/dist/types/i18n/zh.d.ts +0 -37
- package/dist/types/i18n/zh_TW.d.ts +0 -37
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -37
- package/dist/types-ts4.5/i18n/da.d.ts +0 -35
- package/dist/types-ts4.5/i18n/de.d.ts +0 -35
- package/dist/types-ts4.5/i18n/en.d.ts +0 -37
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -37
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -37
- package/dist/types-ts4.5/i18n/es.d.ts +0 -35
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -35
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -37
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -37
- package/dist/types-ts4.5/i18n/it.d.ts +0 -37
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -37
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -35
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -35
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -37
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -37
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -37
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -37
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -35
- package/dist/types-ts4.5/i18n/th.d.ts +0 -35
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -37
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -37
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -35
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -37
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -37
- package/src/i18n/cs.ts +0 -42
- package/src/i18n/da.ts +0 -37
- package/src/i18n/de.ts +0 -37
- package/src/i18n/en.ts +0 -38
- package/src/i18n/en_GB.ts +0 -38
- package/src/i18n/en_ZZ.ts +0 -43
- package/src/i18n/es.ts +0 -37
- package/src/i18n/fi.ts +0 -37
- package/src/i18n/fr.ts +0 -39
- package/src/i18n/hu.ts +0 -39
- package/src/i18n/it.ts +0 -39
- package/src/i18n/ja.ts +0 -39
- package/src/i18n/ko.ts +0 -36
- package/src/i18n/nb.ts +0 -37
- package/src/i18n/nl.ts +0 -39
- package/src/i18n/pl.ts +0 -42
- package/src/i18n/pt_BR.ts +0 -39
- package/src/i18n/ru.ts +0 -42
- package/src/i18n/sv.ts +0 -37
- package/src/i18n/th.ts +0 -36
- package/src/i18n/tr.ts +0 -39
- package/src/i18n/uk.ts +0 -42
- package/src/i18n/vi.ts +0 -36
- package/src/i18n/zh.ts +0 -38
- package/src/i18n/zh_TW.ts +0 -38
- /package/dist/cjs/{commands → pm-plugins/commands}/clear.js +0 -0
- /package/dist/cjs/{commands → pm-plugins/commands}/collapse.js +0 -0
- /package/dist/cjs/{commands → pm-plugins/commands}/delete.js +0 -0
- /package/dist/cjs/{commands → pm-plugins/commands}/display-mode.js +0 -0
- /package/dist/cjs/{commands → pm-plugins/commands}/index.js +0 -0
- /package/dist/cjs/{create-plugin-config.js → pm-plugins/create-plugin-config.js} +0 -0
- /package/dist/cjs/{transforms → pm-plugins/transforms}/delete-rows.js +0 -0
- /package/dist/cjs/{transforms → pm-plugins/transforms}/index.js +0 -0
- /package/dist/cjs/{transforms → pm-plugins/transforms}/merge.js +0 -0
- /package/dist/cjs/{transforms → pm-plugins/transforms}/replace-table.js +0 -0
- /package/dist/cjs/{transforms → pm-plugins/transforms}/split.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/collapse.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/guidelines.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/index.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/merged-cells.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/nodes.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/selection.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/snapping.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/table.js +0 -0
- /package/dist/cjs/{types.js → types/index.js} +0 -0
- /package/dist/es2019/{commands → pm-plugins/commands}/clear.js +0 -0
- /package/dist/es2019/{commands → pm-plugins/commands}/collapse.js +0 -0
- /package/dist/es2019/{commands → pm-plugins/commands}/delete.js +0 -0
- /package/dist/es2019/{commands → pm-plugins/commands}/display-mode.js +0 -0
- /package/dist/es2019/{commands → pm-plugins/commands}/index.js +0 -0
- /package/dist/es2019/{create-plugin-config.js → pm-plugins/create-plugin-config.js} +0 -0
- /package/dist/es2019/{transforms → pm-plugins/transforms}/delete-rows.js +0 -0
- /package/dist/es2019/{transforms → pm-plugins/transforms}/index.js +0 -0
- /package/dist/es2019/{transforms → pm-plugins/transforms}/merge.js +0 -0
- /package/dist/es2019/{transforms → pm-plugins/transforms}/replace-table.js +0 -0
- /package/dist/es2019/{transforms → pm-plugins/transforms}/split.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/collapse.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/guidelines.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/index.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/merged-cells.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/nodes.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/selection.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/snapping.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/table.js +0 -0
- /package/dist/es2019/{types.js → types/index.js} +0 -0
- /package/dist/esm/{commands → pm-plugins/commands}/clear.js +0 -0
- /package/dist/esm/{commands → pm-plugins/commands}/collapse.js +0 -0
- /package/dist/esm/{commands → pm-plugins/commands}/delete.js +0 -0
- /package/dist/esm/{commands → pm-plugins/commands}/display-mode.js +0 -0
- /package/dist/esm/{commands → pm-plugins/commands}/index.js +0 -0
- /package/dist/esm/{create-plugin-config.js → pm-plugins/create-plugin-config.js} +0 -0
- /package/dist/esm/{transforms → pm-plugins/transforms}/delete-rows.js +0 -0
- /package/dist/esm/{transforms → pm-plugins/transforms}/index.js +0 -0
- /package/dist/esm/{transforms → pm-plugins/transforms}/merge.js +0 -0
- /package/dist/esm/{transforms → pm-plugins/transforms}/replace-table.js +0 -0
- /package/dist/esm/{transforms → pm-plugins/transforms}/split.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/collapse.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/guidelines.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/index.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/merged-cells.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/nodes.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/selection.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/snapping.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/table.js +0 -0
- /package/dist/esm/{types.js → types/index.js} +0 -0
- /package/dist/types/{toDOM.d.ts → nodeviews/toDOM.d.ts} +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/clear.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/collapse.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/display-mode.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/go-to-next-cell.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/index.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/referentiality.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/sort.d.ts +0 -0
- /package/dist/types/{commands → pm-plugins/commands}/split-cell.d.ts +0 -0
- /package/dist/types/{transforms → pm-plugins/transforms}/delete-rows.d.ts +0 -0
- /package/dist/types/{transforms → pm-plugins/transforms}/index.d.ts +0 -0
- /package/dist/types/{transforms → pm-plugins/transforms}/merge.d.ts +0 -0
- /package/dist/types/{transforms → pm-plugins/transforms}/replace-table.d.ts +0 -0
- /package/dist/types/{transforms → pm-plugins/transforms}/split.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/analytics.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/collapse.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/column-controls.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/dom.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/get-allow-add-column-custom-step.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/guidelines.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/index.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/merged-cells.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/nodes.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/paste.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/row-controls.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/selection.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/snapping.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/table.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM.d.ts → nodeviews/toDOM.d.ts} +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/clear.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/collapse.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/display-mode.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/go-to-next-cell.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/index.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/referentiality.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/sort.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → pm-plugins/commands}/split-cell.d.ts +0 -0
- /package/dist/types-ts4.5/{transforms → pm-plugins/transforms}/delete-rows.d.ts +0 -0
- /package/dist/types-ts4.5/{transforms → pm-plugins/transforms}/index.d.ts +0 -0
- /package/dist/types-ts4.5/{transforms → pm-plugins/transforms}/merge.d.ts +0 -0
- /package/dist/types-ts4.5/{transforms → pm-plugins/transforms}/replace-table.d.ts +0 -0
- /package/dist/types-ts4.5/{transforms → pm-plugins/transforms}/split.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/analytics.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/collapse.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/column-controls.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/dom.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/get-allow-add-column-custom-step.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/guidelines.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/index.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/merged-cells.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/nodes.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/paste.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/row-controls.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/selection.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/snapping.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/table.d.ts +0 -0
- /package/src/{commands → pm-plugins/commands}/clear.ts +0 -0
- /package/src/{commands → pm-plugins/commands}/collapse.ts +0 -0
- /package/src/{commands → pm-plugins/commands}/display-mode.ts +0 -0
- /package/src/{commands → pm-plugins/commands}/index.ts +0 -0
- /package/src/{transforms → pm-plugins/transforms}/delete-rows.ts +0 -0
- /package/src/{transforms → pm-plugins/transforms}/index.ts +0 -0
- /package/src/{transforms → pm-plugins/transforms}/merge.ts +0 -0
- /package/src/{transforms → pm-plugins/transforms}/replace-table.ts +0 -0
- /package/src/{transforms → pm-plugins/transforms}/split.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/collapse.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/guidelines.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/index.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/merged-cells.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/nodes.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/selection.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/snapping.ts +0 -0
- /package/src/{utils → pm-plugins/utils}/table.ts +0 -0
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
29
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
30
30
|
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
31
|
+
import type { PluginInjectionAPI } from '../../types';
|
|
32
|
+
import { updateRowOrColumnMovedTransform } from '../analytics/commands';
|
|
33
|
+
import { META_KEYS } from '../table-analytics';
|
|
33
34
|
import { rescaleColumns } from '../transforms/column-width';
|
|
34
|
-
import type { PluginInjectionAPI } from '../types';
|
|
35
35
|
import { checkIfHeaderRowEnabled, copyPreviousRow, createTableWithWidth } from '../utils';
|
|
36
36
|
import { getAllowAddColumnCustomStep } from '../utils/get-allow-add-column-custom-step';
|
|
37
37
|
|
|
@@ -378,18 +378,10 @@ export const insertTableWithNestingSupport: InsertTableWithNestingSupportCommand
|
|
|
378
378
|
) =>
|
|
379
379
|
({ tr }) => {
|
|
380
380
|
const { schema } = tr.doc.type;
|
|
381
|
-
const node = createTableWithWidth({
|
|
382
|
-
isTableScalingEnabled,
|
|
383
|
-
isTableAlignmentEnabled,
|
|
384
|
-
isFullWidthModeEnabled,
|
|
385
|
-
isCommentEditor,
|
|
386
|
-
isChromelessEditor,
|
|
387
|
-
isTableResizingEnabled,
|
|
388
|
-
createTableProps,
|
|
389
|
-
})(schema);
|
|
390
381
|
|
|
391
382
|
// If the cursor is inside a table
|
|
392
383
|
let insertAt: Selection | undefined;
|
|
384
|
+
let isNestedTable = false;
|
|
393
385
|
if (
|
|
394
386
|
hasParentNodeOfType(schema.nodes.table)(tr.selection) &&
|
|
395
387
|
fg('platform_editor_use_nested_table_pm_nodes')
|
|
@@ -406,9 +398,23 @@ export const insertTableWithNestingSupport: InsertTableWithNestingSupportCommand
|
|
|
406
398
|
return tr;
|
|
407
399
|
}
|
|
408
400
|
insertAt = TextSelection.create(tr.doc, positionAfterTopTable);
|
|
401
|
+
} else {
|
|
402
|
+
// Table can be nested in parent table
|
|
403
|
+
isNestedTable = true;
|
|
409
404
|
}
|
|
410
405
|
}
|
|
411
406
|
|
|
407
|
+
const node = createTableWithWidth({
|
|
408
|
+
isTableScalingEnabled,
|
|
409
|
+
isTableAlignmentEnabled,
|
|
410
|
+
isFullWidthModeEnabled,
|
|
411
|
+
isCommentEditor,
|
|
412
|
+
isChromelessEditor,
|
|
413
|
+
isTableResizingEnabled,
|
|
414
|
+
isNestedTable,
|
|
415
|
+
createTableProps,
|
|
416
|
+
})(schema);
|
|
417
|
+
|
|
412
418
|
api?.contentInsertion?.commands?.insert({
|
|
413
419
|
node,
|
|
414
420
|
options: {
|
|
@@ -34,15 +34,15 @@ import {
|
|
|
34
34
|
setCellAttrs,
|
|
35
35
|
} from '@atlaskit/editor-tables/utils';
|
|
36
36
|
|
|
37
|
-
import {
|
|
37
|
+
import type { WidthToWidest } from '../../types';
|
|
38
|
+
import { TableCssClassName as ClassName, TableDecorations } from '../../types';
|
|
39
|
+
import { getDecorations } from '../decorations/plugin';
|
|
38
40
|
import {
|
|
39
41
|
buildColumnResizingDecorations,
|
|
40
42
|
clearColumnResizingDecorations,
|
|
41
|
-
} from '../
|
|
42
|
-
import { createCommand, getPluginState } from '../
|
|
43
|
+
} from '../decorations/utils';
|
|
44
|
+
import { createCommand, getPluginState } from '../plugin-factory';
|
|
43
45
|
import { fixAutoSizedTable } from '../transforms';
|
|
44
|
-
import type { WidthToWidest } from '../types';
|
|
45
|
-
import { TableCssClassName as ClassName, TableDecorations } from '../types';
|
|
46
46
|
import {
|
|
47
47
|
createColumnControlsDecoration,
|
|
48
48
|
createColumnSelectedDecoration,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { removeConnectedNodes } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
|
|
4
|
-
import { createCommand } from '../
|
|
4
|
+
import { createCommand } from '../plugin-factory';
|
|
5
5
|
|
|
6
6
|
export const removeDescendantNodes = (sourceNode: PMNode) =>
|
|
7
7
|
createCommand(
|
|
@@ -23,10 +23,11 @@ import {
|
|
|
23
23
|
selectedRect,
|
|
24
24
|
} from '@atlaskit/editor-tables/utils';
|
|
25
25
|
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { getPluginState } from '../
|
|
29
|
-
|
|
26
|
+
import type tablePlugin from '../../tablePlugin';
|
|
27
|
+
import { getClosestSelectionRect } from '../../ui/toolbar';
|
|
28
|
+
import { getPluginState } from '../plugin-factory';
|
|
29
|
+
|
|
30
|
+
import { selectColumn, selectRow } from './misc';
|
|
30
31
|
|
|
31
32
|
enum TableSelectionDirection {
|
|
32
33
|
TopToBottom = 'TopToBottom',
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
isSelectionType,
|
|
16
16
|
} from '@atlaskit/editor-tables/utils';
|
|
17
17
|
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
18
|
+
import type { TablePluginState } from '../../types';
|
|
19
|
+
import { createCommand, getPluginState } from '../plugin-factory';
|
|
20
20
|
|
|
21
21
|
const createGetInlineCardTextFromStore = (attrs: CardAttributes): string | null => {
|
|
22
22
|
const { data } = attrs as DataType;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { splitCellWithType } from '@atlaskit/editor-tables/utils';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import type { TablePluginState } from '../../types';
|
|
5
|
+
import { getPluginState } from '../plugin-factory';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* We need to split cell keeping the right type of cell given current table configuration.
|
|
@@ -6,8 +6,8 @@ import type { Command } from '@atlaskit/editor-common/types';
|
|
|
6
6
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { findTable, toggleHeader } from '@atlaskit/editor-tables/utils';
|
|
8
8
|
|
|
9
|
-
import { createCommand } from '../
|
|
10
|
-
import { META_KEYS } from '../
|
|
9
|
+
import { createCommand } from '../plugin-factory';
|
|
10
|
+
import { META_KEYS } from '../table-analytics';
|
|
11
11
|
//#endregion
|
|
12
12
|
|
|
13
13
|
// #region Utils
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
findColumnControlSelectedDecoration,
|
|
12
12
|
findControlsHoverDecoration,
|
|
13
13
|
updateDecorations,
|
|
14
|
-
} from '
|
|
14
|
+
} from '../../utils/decoration';
|
|
15
15
|
|
|
16
16
|
import { composeDecorations } from './compose-decorations';
|
|
17
17
|
import type { BuildDecorationTransformerParams, DecorationTransformer } from './types';
|
|
@@ -4,7 +4,7 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
4
4
|
import type { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
|
|
6
6
|
import { TableDecorations } from '../../../types';
|
|
7
|
-
import { createResizeHandleDecoration, updateDecorations } from '
|
|
7
|
+
import { createResizeHandleDecoration, updateDecorations } from '../../utils/decoration';
|
|
8
8
|
|
|
9
9
|
import { composeDecorations } from './compose-decorations';
|
|
10
10
|
import type { DecorationTransformer } from './types';
|
|
@@ -16,9 +16,9 @@ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
|
16
16
|
import { findCellRectClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
17
17
|
|
|
18
18
|
import type { DraggableData, DraggableType } from '../../types';
|
|
19
|
-
import { getSelectedColumnIndexes, getSelectedRowIndexes, getSelectedTableInfo } from '
|
|
20
|
-
import { withEditorAnalyticsAPI } from '
|
|
21
|
-
import { canMove, getTargetIndex } from '
|
|
19
|
+
import { getSelectedColumnIndexes, getSelectedRowIndexes, getSelectedTableInfo } from '../utils';
|
|
20
|
+
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
21
|
+
import { canMove, getTargetIndex } from '../utils/drag-menu';
|
|
22
22
|
|
|
23
23
|
import { clearDropTarget, cloneSource, moveSource } from './commands';
|
|
24
24
|
|
|
@@ -5,7 +5,7 @@ import { cloneColumn, cloneRow, moveColumn, moveRow } from '@atlaskit/editor-tab
|
|
|
5
5
|
|
|
6
6
|
import type { DraggableType, TableDirection } from '../../types';
|
|
7
7
|
import { TableDecorations } from '../../types';
|
|
8
|
-
import { createColumnInsertLine, createRowInsertLine, updateDecorations } from '
|
|
8
|
+
import { createColumnInsertLine, createRowInsertLine, updateDecorations } from '../utils';
|
|
9
9
|
|
|
10
10
|
import { DragAndDropActionType } from './actions';
|
|
11
11
|
import { DropTargetType } from './consts';
|
|
@@ -11,10 +11,10 @@ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
|
11
11
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
12
12
|
|
|
13
13
|
import type { DraggableSourceData } from '../../types';
|
|
14
|
-
import { findNearestCellIndexToPoint, hasMergedCellsInBetween } from '../../utils';
|
|
15
14
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
16
15
|
import { pluginKey as tablePluginKey } from '../plugin-key';
|
|
17
16
|
import { insertColgroupFromNode } from '../table-resizing/utils';
|
|
17
|
+
import { findNearestCellIndexToPoint, hasMergedCellsInBetween } from '../utils';
|
|
18
18
|
|
|
19
19
|
import { DragAndDropActionType } from './actions';
|
|
20
20
|
import { clearDropTarget, setDropTarget, toggleDragMenu } from './commands';
|
|
@@ -9,9 +9,10 @@ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
9
9
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
import
|
|
12
|
+
import type { TablePluginState } from '../types';
|
|
13
|
+
|
|
14
|
+
import { defaultTableSelection } from './default-table-selection';
|
|
15
|
+
import { pluginKey as tableResizingPluginKey } from './table-resizing';
|
|
15
16
|
import { isTableCollapsible } from './utils/collapse';
|
|
16
17
|
import {
|
|
17
18
|
checkIfHeaderColumnEnabled,
|
package/src/pm-plugins/keymap.ts
CHANGED
|
@@ -44,27 +44,28 @@ import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
|
44
44
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
45
45
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
46
46
|
|
|
47
|
-
import {
|
|
47
|
+
import { moveSourceWithAnalyticsViaShortcut } from '../pm-plugins/drag-and-drop/commands-with-analytics';
|
|
48
|
+
import type { PluginInjectionAPI, PluginInjectionAPIWithA11y } from '../types';
|
|
49
|
+
|
|
50
|
+
import { goToNextCell, moveCursorBackward, setFocusToCellMenu } from './commands';
|
|
51
|
+
import {
|
|
52
|
+
activateNextResizeArea,
|
|
53
|
+
initiateKeyboardColumnResizing,
|
|
54
|
+
stopKeyboardColumnResizing,
|
|
55
|
+
} from './commands/column-resize';
|
|
48
56
|
import {
|
|
49
57
|
addRowAroundSelection,
|
|
50
58
|
changeColumnWidthByStepWithAnalytics,
|
|
51
59
|
deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut,
|
|
52
60
|
deleteTableIfSelectedWithAnalytics,
|
|
53
61
|
emptyMultipleCellsWithAnalytics,
|
|
54
|
-
} from '
|
|
55
|
-
import {
|
|
56
|
-
activateNextResizeArea,
|
|
57
|
-
initiateKeyboardColumnResizing,
|
|
58
|
-
stopKeyboardColumnResizing,
|
|
59
|
-
} from '../commands/column-resize';
|
|
62
|
+
} from './commands/commands-with-analytics';
|
|
60
63
|
import {
|
|
61
64
|
addColumnAfter as addColumnAfterCommand,
|
|
62
65
|
addColumnBefore as addColumnBeforeCommand,
|
|
63
66
|
createTable,
|
|
64
67
|
insertTableWithNestingSupport,
|
|
65
|
-
} from '
|
|
66
|
-
import { moveSourceWithAnalyticsViaShortcut } from '../pm-plugins/drag-and-drop/commands-with-analytics';
|
|
67
|
-
import type { PluginInjectionAPI, PluginInjectionAPIWithA11y } from '../types';
|
|
68
|
+
} from './commands/insert';
|
|
68
69
|
|
|
69
70
|
export function keymapPlugin(
|
|
70
71
|
getEditorContainerWidth: GetEditorContainerWidth,
|
package/src/pm-plugins/main.ts
CHANGED
|
@@ -26,14 +26,20 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
26
26
|
import { TableMap } from '@atlaskit/editor-tables';
|
|
27
27
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
28
28
|
|
|
29
|
-
import { addBoldInEmptyHeaderCells, clearHoverSelection, setTableRef } from '../commands';
|
|
30
|
-
import { stopKeyboardColumnResizing } from '../commands/column-resize';
|
|
31
29
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} from '../
|
|
30
|
+
lazyTableCellView,
|
|
31
|
+
lazyTableHeaderView,
|
|
32
|
+
lazyTableRowView,
|
|
33
|
+
lazyTableView,
|
|
34
|
+
} from '../nodeviews/lazy-node-views';
|
|
35
|
+
import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
|
|
36
|
+
import type {
|
|
37
|
+
InvalidNodeAttr,
|
|
38
|
+
PluginConfig,
|
|
39
|
+
PluginInjectionAPI,
|
|
40
|
+
PluginInjectionAPIWithA11y,
|
|
41
|
+
} from '../types';
|
|
42
|
+
import { TableCssClassName as ClassName } from '../types';
|
|
37
43
|
import {
|
|
38
44
|
handleBlur,
|
|
39
45
|
handleClick,
|
|
@@ -47,33 +53,27 @@ import {
|
|
|
47
53
|
handleTripleClick,
|
|
48
54
|
whenTableInFocus,
|
|
49
55
|
withCellTracking,
|
|
50
|
-
} from '../event-handlers';
|
|
56
|
+
} from '../ui/event-handlers';
|
|
57
|
+
|
|
58
|
+
import { addBoldInEmptyHeaderCells, clearHoverSelection, setTableRef } from './commands';
|
|
59
|
+
import { stopKeyboardColumnResizing } from './commands/column-resize';
|
|
51
60
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} from '
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
60
|
-
|
|
61
|
-
PluginConfig,
|
|
62
|
-
PluginInjectionAPI,
|
|
63
|
-
PluginInjectionAPIWithA11y,
|
|
64
|
-
} from '../types';
|
|
65
|
-
import { TableCssClassName as ClassName } from '../types';
|
|
61
|
+
removeResizeHandleDecorations,
|
|
62
|
+
transformSliceRemoveCellBackgroundColor,
|
|
63
|
+
transformSliceToAddTableHeaders,
|
|
64
|
+
transformSliceToRemoveColumnsWidths,
|
|
65
|
+
} from './commands/misc';
|
|
66
|
+
import { defaultHoveredCell, defaultTableSelection } from './default-table-selection';
|
|
67
|
+
import { createPluginState, getPluginState } from './plugin-factory';
|
|
68
|
+
import { pluginKey } from './plugin-key';
|
|
69
|
+
import { fixTables, replaceSelectedTable } from './transforms';
|
|
66
70
|
import {
|
|
67
71
|
findControlsHoverDecoration,
|
|
68
72
|
transformSliceToCorrectEmptyTableCells,
|
|
69
73
|
transformSliceToFixHardBreakProblemOnCopyFromCell,
|
|
70
74
|
transformSliceToRemoveOpenTable,
|
|
71
|
-
} from '
|
|
72
|
-
import { isHeaderRowRequired, transformSliceTableLayoutDefaultToCenter } from '
|
|
73
|
-
|
|
74
|
-
import { defaultHoveredCell, defaultTableSelection } from './default-table-selection';
|
|
75
|
-
import { createPluginState, getPluginState } from './plugin-factory';
|
|
76
|
-
import { pluginKey } from './plugin-key';
|
|
75
|
+
} from './utils';
|
|
76
|
+
import { isHeaderRowRequired, transformSliceTableLayoutDefaultToCenter } from './utils/paste';
|
|
77
77
|
|
|
78
78
|
export const createPlugin = (
|
|
79
79
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
|
|
3
|
-
import { handleDocOrSelectionChanged } from '
|
|
4
|
-
import reducer from '../reducer';
|
|
5
|
-
|
|
3
|
+
import { handleDocOrSelectionChanged } from './handlers';
|
|
6
4
|
import { pluginKey } from './plugin-key';
|
|
5
|
+
import reducer from './reducer';
|
|
7
6
|
|
|
8
7
|
export const { createPluginState, createCommand, getPluginState } = pluginFactory(
|
|
9
8
|
pluginKey,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { TablePluginAction, TablePluginState } from '../types';
|
|
2
|
+
|
|
3
|
+
import { defaultTableSelection } from './default-table-selection';
|
|
3
4
|
|
|
4
5
|
export default (pluginState: TablePluginState, action: TablePluginAction): TablePluginState => {
|
|
5
6
|
switch (action.type) {
|
|
@@ -5,9 +5,9 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
5
5
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
7
7
|
|
|
8
|
-
import { updateColumnWidths } from '../../transforms';
|
|
9
8
|
import type { PluginInjectionAPI } from '../../types';
|
|
10
9
|
import { META_KEYS } from '../table-analytics';
|
|
10
|
+
import { updateColumnWidths } from '../transforms';
|
|
11
11
|
|
|
12
12
|
import { createCommand, getPluginState } from './plugin-factory';
|
|
13
13
|
import type { ResizeState } from './utils';
|
|
@@ -15,18 +15,18 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
15
15
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
16
16
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
17
17
|
|
|
18
|
-
import { stopKeyboardColumnResizing } from '../../commands/column-resize';
|
|
19
|
-
import { updateResizeHandleDecorations } from '../../commands/misc';
|
|
20
|
-
import { updateColumnWidths } from '../../transforms';
|
|
21
18
|
import type { PluginInjectionAPI } from '../../types';
|
|
22
|
-
import {
|
|
19
|
+
import { stopKeyboardColumnResizing } from '../commands/column-resize';
|
|
20
|
+
import { updateResizeHandleDecorations } from '../commands/misc';
|
|
21
|
+
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
22
|
+
import { META_KEYS } from '../table-analytics';
|
|
23
|
+
import { updateColumnWidths } from '../transforms';
|
|
24
|
+
import { getSelectedColumnIndexes, isTableNested } from '../utils';
|
|
23
25
|
import {
|
|
24
26
|
ALIGN_CENTER,
|
|
25
27
|
ALIGN_START,
|
|
26
28
|
shouldChangeAlignmentToCenterResized,
|
|
27
|
-
} from '
|
|
28
|
-
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
29
|
-
import { META_KEYS } from '../table-analytics';
|
|
29
|
+
} from '../utils/alignment';
|
|
30
30
|
|
|
31
31
|
import { evenColumns, setDragging, stopResizing } from './commands';
|
|
32
32
|
import { getPluginState } from './plugin-factory';
|
|
@@ -4,9 +4,9 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
|
|
6
6
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
7
|
-
import { colWidthsForRow } from '../../../utils/column-controls';
|
|
8
|
-
import { getRowHeights } from '../../../utils/row-controls';
|
|
9
7
|
import { getPluginState as getMainPluginState } from '../../plugin-factory';
|
|
8
|
+
import { colWidthsForRow } from '../../utils/column-controls';
|
|
9
|
+
import { getRowHeights } from '../../utils/row-controls';
|
|
10
10
|
|
|
11
11
|
export const updateControls = () => (state: EditorState) => {
|
|
12
12
|
const { tableRef } = getMainPluginState(state);
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ALIGN_CENTER,
|
|
14
14
|
ALIGN_START,
|
|
15
15
|
shouldChangeAlignmentToCenterResized,
|
|
16
|
-
} from '
|
|
16
|
+
} from '../../utils/alignment';
|
|
17
17
|
|
|
18
18
|
import { getTableScalingPercent } from './misc';
|
|
19
19
|
import { growColumn, shrinkColumn, updateAffectedColumn } from './resize-logic';
|
|
@@ -6,7 +6,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
8
8
|
|
|
9
|
-
import { getSelectedTableInfo } from '
|
|
9
|
+
import { getSelectedTableInfo } from '../../utils';
|
|
10
10
|
|
|
11
11
|
import { getColWidthFix, hasTableBeenResized, insertColgroupFromNode } from './colgroup';
|
|
12
12
|
import type { ColumnState } from './column-state';
|
|
@@ -5,9 +5,9 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
5
5
|
import type { DomAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
|
|
8
|
-
import { updateColumnWidths } from '../../../transforms';
|
|
9
8
|
import type { PluginInjectionAPI } from '../../../types';
|
|
10
|
-
import {
|
|
9
|
+
import { updateColumnWidths } from '../../transforms';
|
|
10
|
+
import { getTableWidth } from '../../utils';
|
|
11
11
|
import { getLayoutSize } from '../utils/misc';
|
|
12
12
|
import { reduceSpace } from '../utils/resize-logic';
|
|
13
13
|
import {
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
14
14
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
15
15
|
|
|
16
|
+
import { type PluginInjectionAPI } from '../types';
|
|
17
|
+
|
|
16
18
|
import {
|
|
17
19
|
arrowLeftFromTable,
|
|
18
20
|
arrowRightFromTable,
|
|
@@ -20,8 +22,7 @@ import {
|
|
|
20
22
|
selectColumns,
|
|
21
23
|
selectRows,
|
|
22
24
|
shiftArrowUpFromTable,
|
|
23
|
-
} from '
|
|
24
|
-
import { type PluginInjectionAPI } from '../types';
|
|
25
|
+
} from './commands/selection';
|
|
25
26
|
|
|
26
27
|
export function tableSelectionKeymapPlugin(
|
|
27
28
|
pluginInjectionApi?: PluginInjectionAPI,
|
|
@@ -19,7 +19,7 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
19
19
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
20
20
|
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
21
21
|
|
|
22
|
-
import { ALIGN_START } from '
|
|
22
|
+
import { ALIGN_START } from './utils/alignment';
|
|
23
23
|
|
|
24
24
|
type TableWidthInCommentFixPluginState = {
|
|
25
25
|
documentHasLoadedOnce: boolean;
|
|
@@ -16,9 +16,8 @@ import {
|
|
|
16
16
|
akEditorWideLayoutWidth,
|
|
17
17
|
} from '@atlaskit/editor-shared-styles';
|
|
18
18
|
|
|
19
|
-
import { ALIGN_START } from '../utils/alignment';
|
|
20
|
-
|
|
21
19
|
import { TABLE_MAX_WIDTH } from './table-resizing/utils';
|
|
20
|
+
import { ALIGN_START } from './utils/alignment';
|
|
22
21
|
|
|
23
22
|
type __ReplaceStep = ReplaceStep & {
|
|
24
23
|
// Properties `to` and `from` are private attributes of ReplaceStep.
|
|
@@ -8,16 +8,16 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
8
8
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type { PluginInjectionAPI } from '../../types';
|
|
12
|
+
import type { ResizeState } from '../table-resizing/utils';
|
|
12
13
|
import {
|
|
13
14
|
getTableContainerElementWidth,
|
|
14
15
|
getTableElementWidth,
|
|
15
16
|
hasTableBeenResized,
|
|
16
|
-
} from '../
|
|
17
|
-
import { isMinCellWidthTable } from '../
|
|
18
|
-
import { getResizeState } from '../
|
|
19
|
-
import { scaleTableTo } from '../
|
|
20
|
-
import type { PluginInjectionAPI } from '../types';
|
|
17
|
+
} from '../table-resizing/utils';
|
|
18
|
+
import { isMinCellWidthTable } from '../table-resizing/utils/colgroup';
|
|
19
|
+
import { getResizeState } from '../table-resizing/utils/resize-state';
|
|
20
|
+
import { scaleTableTo } from '../table-resizing/utils/scale-table';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Given a new ResizeState object, create a transaction that replaces and updates the table node based on new state.
|
|
@@ -9,8 +9,8 @@ import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
|
9
9
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
10
10
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
12
|
+
import type { PluginInjectionAPI } from '../../types';
|
|
13
|
+
import { META_KEYS } from '../table-analytics';
|
|
14
14
|
|
|
15
15
|
import { rescaleColumns } from './column-width';
|
|
16
16
|
import { splitCellsInColumns } from './split';
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
akEditorWideLayoutWidth,
|
|
8
8
|
} from '@atlaskit/editor-shared-styles';
|
|
9
9
|
|
|
10
|
+
import type { ReportInvalidNodeAttrs } from '../../types';
|
|
10
11
|
import {
|
|
11
12
|
calculateColumnWidth,
|
|
12
13
|
contentWidth,
|
|
13
14
|
getCellsRefsInColumn,
|
|
14
15
|
getLayoutSize,
|
|
15
|
-
} from '../
|
|
16
|
-
import type { ReportInvalidNodeAttrs } from '../types';
|
|
16
|
+
} from '../table-resizing/utils';
|
|
17
17
|
|
|
18
18
|
const validateTableCellNodeAttrs = (
|
|
19
19
|
{ colspan, rowspan, tableLocalId }: { colspan?: number; rowspan?: number; tableLocalId: string },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import type { AlignmentOptions } from '../../types';
|
|
5
|
+
import { FULL_WIDTH_EDITOR_CONTENT_WIDTH } from '../table-resizing/utils/consts';
|
|
6
6
|
|
|
7
7
|
export const ALIGN_START = 'align-start';
|
|
8
8
|
export const ALIGN_CENTER = 'center';
|
|
@@ -13,8 +13,9 @@ import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
|
13
13
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
14
14
|
import { findTable, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
15
15
|
|
|
16
|
-
import { hasTableBeenResized } from '../
|
|
17
|
-
|
|
16
|
+
import { hasTableBeenResized } from '../table-resizing/utils';
|
|
17
|
+
|
|
18
|
+
import { getTableWidth } from './index';
|
|
18
19
|
|
|
19
20
|
export function getSelectedTableInfo(selection: Selection): {
|
|
20
21
|
table: ReturnType<typeof findTable> | undefined;
|
|
@@ -5,7 +5,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
6
6
|
import { findTable, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
7
7
|
|
|
8
|
-
import { tableDeleteButtonSize } from '
|
|
8
|
+
import { tableDeleteButtonSize } from '../../ui/consts';
|
|
9
9
|
|
|
10
10
|
interface CellWidthInfo {
|
|
11
11
|
width: number;
|
|
@@ -2,11 +2,15 @@ import type { TableAttributes } from '@atlaskit/adf-schema';
|
|
|
2
2
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { createTable } from '@atlaskit/editor-tables/utils';
|
|
4
4
|
|
|
5
|
-
import { TABLE_MAX_WIDTH } from '../
|
|
5
|
+
import { TABLE_MAX_WIDTH } from '../table-resizing/utils';
|
|
6
|
+
const NESTED_TABLE_DEFAULT_ROWS = 2;
|
|
7
|
+
const NESTED_TABLE_DEFAULT_COLS = 2;
|
|
6
8
|
|
|
7
9
|
type CreateTableOverrides = {
|
|
8
10
|
tableWidth?: TableAttributes['width'] | 'inherit';
|
|
9
11
|
layout?: TableAttributes['layout'];
|
|
12
|
+
rowsCount?: number;
|
|
13
|
+
colsCount?: number;
|
|
10
14
|
};
|
|
11
15
|
|
|
12
16
|
export const createTableWithWidth =
|
|
@@ -17,6 +21,7 @@ export const createTableWithWidth =
|
|
|
17
21
|
isCommentEditor,
|
|
18
22
|
isChromelessEditor,
|
|
19
23
|
isTableResizingEnabled,
|
|
24
|
+
isNestedTable,
|
|
20
25
|
createTableProps,
|
|
21
26
|
}: {
|
|
22
27
|
isTableScalingEnabled?: boolean;
|
|
@@ -25,6 +30,7 @@ export const createTableWithWidth =
|
|
|
25
30
|
isCommentEditor?: boolean;
|
|
26
31
|
isChromelessEditor?: boolean;
|
|
27
32
|
isTableResizingEnabled?: boolean;
|
|
33
|
+
isNestedTable?: boolean;
|
|
28
34
|
createTableProps?: {
|
|
29
35
|
rowsCount?: number;
|
|
30
36
|
colsCount?: number;
|
|
@@ -32,6 +38,14 @@ export const createTableWithWidth =
|
|
|
32
38
|
}) =>
|
|
33
39
|
(schema: Schema) => {
|
|
34
40
|
const attrsOverrides: CreateTableOverrides = {};
|
|
41
|
+
if (isNestedTable) {
|
|
42
|
+
attrsOverrides.rowsCount = createTableProps?.rowsCount
|
|
43
|
+
? createTableProps?.rowsCount
|
|
44
|
+
: NESTED_TABLE_DEFAULT_ROWS;
|
|
45
|
+
attrsOverrides.colsCount = createTableProps?.colsCount
|
|
46
|
+
? createTableProps?.colsCount
|
|
47
|
+
: NESTED_TABLE_DEFAULT_COLS;
|
|
48
|
+
}
|
|
35
49
|
if (isTableScalingEnabled && isFullWidthModeEnabled && !isCommentEditor) {
|
|
36
50
|
attrsOverrides.tableWidth = TABLE_MAX_WIDTH;
|
|
37
51
|
}
|