@atlaskit/editor-core 172.1.1 → 172.2.0
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 +30 -0
- package/dist/cjs/analytics-api/api.js +38 -0
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +36 -0
- package/dist/cjs/analytics-api/editor-state-context.js +96 -0
- package/dist/cjs/analytics-api/map-attributes.js +30 -0
- package/dist/cjs/create-editor/ReactEditorView.js +47 -6
- package/dist/cjs/create-editor/ReactEditorViewContext.js +2 -6
- package/dist/cjs/create-editor/create-plugins-list.js +12 -3
- package/dist/cjs/event-dispatcher/index.js +12 -81
- package/dist/cjs/insert-api/api.js +48 -0
- package/dist/cjs/insert-api/insert-content-handlers.js +101 -0
- package/dist/cjs/insert-api/insert-node-helpers.js +157 -0
- package/dist/cjs/{plugins/analytics/types/avatar.js → insert-api/types.js} +0 -0
- package/dist/cjs/keymaps/index.js +437 -288
- package/dist/cjs/messages.js +8 -125
- package/dist/cjs/plugins/analytics/index.js +26 -26
- package/dist/cjs/plugins/analytics/types/enums.js +49 -344
- package/dist/cjs/plugins/analytics/types/extension-events.js +19 -26
- package/dist/cjs/plugins/analytics/types/general-events.js +25 -34
- package/dist/cjs/plugins/analytics/types/index.js +10 -56
- package/dist/cjs/plugins/analytics/types/inline-comment-events.js +7 -8
- package/dist/cjs/plugins/analytics/types/node-events.js +13 -20
- package/dist/cjs/plugins/analytics/types/smart-links.js +8 -14
- package/dist/cjs/plugins/analytics/types/toolbar-button.js +7 -20
- package/dist/cjs/plugins/analytics/utils.js +37 -127
- package/dist/cjs/plugins/expand/utils.js +18 -45
- package/dist/cjs/plugins/extension/actions.js +10 -30
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +18 -8
- package/dist/cjs/plugins/insert-block/index.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +31 -22
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +6 -170
- package/dist/cjs/plugins/layout/styles.js +14 -6
- package/dist/cjs/plugins/layout/utils.js +25 -66
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +10 -0
- package/dist/cjs/plugins/paste/handlers.js +19 -15
- package/dist/cjs/plugins/paste/util/index.js +30 -1
- package/dist/cjs/plugins/selection/gap-cursor/selection.js +23 -188
- package/dist/cjs/plugins/selection/gap-cursor/utils/is-ignored.js +7 -8
- package/dist/cjs/plugins/selection/gap-cursor/utils/is-valid-target-node.js +7 -8
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +6 -6
- package/dist/cjs/plugins/selection/gap-cursor-selection.js +1 -1
- package/dist/cjs/plugins/selection/types.js +9 -11
- package/dist/cjs/plugins/selection/utils.js +2 -2
- package/dist/cjs/plugins/table/commands/go-to-next-cell.js +40 -38
- package/dist/cjs/plugins/table/commands/insert.js +57 -49
- package/dist/cjs/plugins/table/commands/selection.js +302 -218
- package/dist/cjs/plugins/table/commands-with-analytics.js +241 -219
- package/dist/cjs/plugins/table/event-handlers.js +60 -60
- package/dist/cjs/plugins/table/index.js +64 -20
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +20 -22
- package/dist/cjs/plugins/table/nodeviews/table.js +19 -11
- package/dist/cjs/plugins/table/nodeviews/tableCell.js +11 -13
- package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +25 -25
- package/dist/cjs/plugins/table/pm-plugins/keymap.js +15 -13
- package/dist/cjs/plugins/table/pm-plugins/main.js +8 -8
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -8
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -10
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +30 -28
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -7
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
- package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
- package/dist/cjs/plugins/table/toolbar.js +74 -72
- package/dist/cjs/plugins/table/transforms/column-width.js +41 -38
- package/dist/cjs/plugins/table/transforms/replace-table.js +4 -4
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -4
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +25 -21
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +7 -4
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +12 -11
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +2 -2
- package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +4 -6
- package/dist/cjs/plugins/table/ui/common-styles.js +3 -3
- package/dist/cjs/plugins/table/utils/analytics.js +26 -1
- package/dist/cjs/plugins/table/utils/index.js +0 -6
- package/dist/cjs/selection-api/api.js +34 -0
- package/dist/cjs/types/browser.js +1 -2
- package/dist/cjs/ui/ColorPalette/Color/index.js +2 -106
- package/dist/cjs/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +2 -21
- package/dist/cjs/ui/ColorPalette/Palettes/common.js +7 -25
- package/dist/cjs/ui/ColorPalette/Palettes/paletteMessages.js +2 -114
- package/dist/cjs/ui/ColorPalette/Palettes/panelBackgroundPalette.js +12 -152
- package/dist/cjs/ui/ColorPalette/Palettes/statusColorPalette.js +13 -61
- package/dist/cjs/ui/ColorPalette/Palettes/textColorPalette.js +12 -34
- package/dist/cjs/ui/ColorPalette/index.js +2 -76
- package/dist/cjs/ui/Dropdown/index.js +3 -119
- package/dist/cjs/ui/DropdownMenu/index.js +3 -286
- package/dist/cjs/ui/Toolbar/types.js +19 -33
- package/dist/cjs/ui/ToolbarButton/index.js +8 -120
- package/dist/cjs/ui/WithPluginState/index.js +1 -3
- package/dist/cjs/ui/styles.js +35 -27
- package/dist/cjs/ui/with-outer-listeners.js +4 -152
- package/dist/cjs/utils/dom.js +46 -123
- package/dist/cjs/utils/index.js +40 -42
- package/dist/cjs/utils/node-width.js +7 -79
- package/dist/cjs/utils/nodes.js +57 -124
- package/dist/cjs/utils/plugin-state-factory.js +7 -107
- package/dist/cjs/utils/selection.js +11 -62
- package/dist/cjs/utils/slice.js +28 -68
- package/dist/cjs/utils/step.js +18 -46
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics-api/api.js +30 -0
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +25 -0
- package/dist/es2019/analytics-api/editor-state-context.js +85 -0
- package/dist/es2019/analytics-api/map-attributes.js +14 -0
- package/dist/es2019/create-editor/ReactEditorView.js +33 -4
- package/dist/es2019/create-editor/ReactEditorViewContext.js +1 -2
- package/dist/es2019/create-editor/create-plugins-list.js +13 -4
- package/dist/es2019/event-dispatcher/index.js +1 -60
- package/dist/es2019/insert-api/api.js +43 -0
- package/dist/es2019/insert-api/insert-content-handlers.js +85 -0
- package/dist/es2019/insert-api/insert-node-helpers.js +149 -0
- package/dist/es2019/{plugins/analytics/types/avatar.js → insert-api/types.js} +0 -0
- package/dist/es2019/keymaps/index.js +1 -186
- package/dist/es2019/messages.js +2 -123
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/types/enums.js +1 -336
- package/dist/es2019/plugins/analytics/types/extension-events.js +1 -22
- package/dist/es2019/plugins/analytics/types/general-events.js +1 -30
- package/dist/es2019/plugins/analytics/types/index.js +1 -6
- package/dist/es2019/plugins/analytics/types/inline-comment-events.js +1 -7
- package/dist/es2019/plugins/analytics/types/node-events.js +1 -18
- package/dist/es2019/plugins/analytics/types/smart-links.js +1 -12
- package/dist/es2019/plugins/analytics/types/toolbar-button.js +1 -19
- package/dist/es2019/plugins/analytics/utils.js +12 -113
- package/dist/es2019/plugins/expand/utils.js +1 -36
- package/dist/es2019/plugins/extension/actions.js +1 -26
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +2 -3
- package/dist/es2019/plugins/insert-block/index.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -12
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +1 -168
- package/dist/es2019/plugins/layout/styles.js +2 -3
- package/dist/es2019/plugins/layout/utils.js +1 -54
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +10 -0
- package/dist/es2019/plugins/paste/handlers.js +8 -4
- package/dist/es2019/plugins/paste/util/index.js +23 -0
- package/dist/es2019/plugins/selection/gap-cursor/selection.js +1 -136
- package/dist/es2019/plugins/selection/gap-cursor/utils/is-ignored.js +1 -5
- package/dist/es2019/plugins/selection/gap-cursor/utils/is-valid-target-node.js +1 -4
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +4 -4
- package/dist/es2019/plugins/selection/gap-cursor-selection.js +1 -1
- package/dist/es2019/plugins/selection/types.js +2 -9
- package/dist/es2019/plugins/selection/utils.js +1 -1
- package/dist/es2019/plugins/table/commands/go-to-next-cell.js +4 -4
- package/dist/es2019/plugins/table/commands/insert.js +26 -24
- package/dist/es2019/plugins/table/commands/selection.js +109 -51
- package/dist/es2019/plugins/table/commands-with-analytics.js +39 -38
- package/dist/es2019/plugins/table/event-handlers.js +6 -7
- package/dist/es2019/plugins/table/index.js +56 -16
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +11 -12
- package/dist/es2019/plugins/table/nodeviews/table.js +18 -8
- package/dist/es2019/plugins/table/nodeviews/tableCell.js +2 -3
- package/dist/es2019/plugins/table/nodeviews/update-overflow-shadows.js +3 -4
- package/dist/es2019/plugins/table/pm-plugins/keymap.js +13 -12
- package/dist/es2019/plugins/table/pm-plugins/main.js +8 -8
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -6
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -8
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
- package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
- package/dist/es2019/plugins/table/toolbar.js +24 -24
- package/dist/es2019/plugins/table/transforms/column-width.js +3 -2
- package/dist/es2019/plugins/table/transforms/replace-table.js +4 -4
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +19 -16
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +8 -4
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +9 -6
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +2 -2
- package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +2 -3
- package/dist/es2019/plugins/table/ui/common-styles.js +1 -1
- package/dist/es2019/plugins/table/utils/analytics.js +16 -1
- package/dist/es2019/plugins/table/utils/index.js +1 -1
- package/dist/es2019/selection-api/api.js +22 -0
- package/dist/es2019/types/browser.js +0 -1
- package/dist/es2019/ui/ColorPalette/Color/index.js +1 -66
- package/dist/es2019/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -14
- package/dist/es2019/ui/ColorPalette/Palettes/common.js +1 -20
- package/dist/es2019/ui/ColorPalette/Palettes/paletteMessages.js +2 -113
- package/dist/es2019/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -137
- package/dist/es2019/ui/ColorPalette/Palettes/statusColorPalette.js +1 -51
- package/dist/es2019/ui/ColorPalette/Palettes/textColorPalette.js +1 -25
- package/dist/es2019/ui/ColorPalette/index.js +2 -62
- package/dist/es2019/ui/Dropdown/index.js +2 -84
- package/dist/es2019/ui/DropdownMenu/index.js +2 -244
- package/dist/es2019/ui/Toolbar/types.js +1 -30
- package/dist/es2019/ui/ToolbarButton/index.js +2 -94
- package/dist/es2019/ui/WithPluginState/index.js +1 -1
- package/dist/es2019/ui/styles.js +9 -47
- package/dist/es2019/ui/with-outer-listeners.js +2 -104
- package/dist/es2019/utils/dom.js +1 -113
- package/dist/es2019/utils/index.js +2 -21
- package/dist/es2019/utils/node-width.js +1 -75
- package/dist/es2019/utils/nodes.js +1 -88
- package/dist/es2019/utils/plugin-state-factory.js +1 -107
- package/dist/es2019/utils/selection.js +2 -52
- package/dist/es2019/utils/slice.js +1 -56
- package/dist/es2019/utils/step.js +1 -35
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics-api/api.js +27 -0
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +22 -0
- package/dist/esm/analytics-api/editor-state-context.js +81 -0
- package/dist/esm/analytics-api/map-attributes.js +20 -0
- package/dist/esm/create-editor/ReactEditorView.js +44 -6
- package/dist/esm/create-editor/ReactEditorViewContext.js +1 -2
- package/dist/esm/create-editor/create-plugins-list.js +15 -4
- package/dist/esm/event-dispatcher/index.js +1 -74
- package/dist/esm/insert-api/api.js +37 -0
- package/dist/esm/insert-api/insert-content-handlers.js +88 -0
- package/dist/esm/insert-api/insert-node-helpers.js +138 -0
- package/dist/{es2019/plugins/analytics/types/config-panel-events.js → esm/insert-api/types.js} +0 -0
- package/dist/esm/keymaps/index.js +1 -184
- package/dist/esm/messages.js +2 -123
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/types/enums.js +1 -336
- package/dist/esm/plugins/analytics/types/extension-events.js +1 -22
- package/dist/esm/plugins/analytics/types/general-events.js +1 -30
- package/dist/esm/plugins/analytics/types/index.js +1 -6
- package/dist/esm/plugins/analytics/types/inline-comment-events.js +1 -7
- package/dist/esm/plugins/analytics/types/node-events.js +1 -18
- package/dist/esm/plugins/analytics/types/smart-links.js +1 -12
- package/dist/esm/plugins/analytics/types/toolbar-button.js +1 -19
- package/dist/esm/plugins/analytics/utils.js +12 -113
- package/dist/esm/plugins/expand/utils.js +1 -34
- package/dist/esm/plugins/extension/actions.js +1 -24
- package/dist/esm/plugins/extension/ui/Extension/styles.js +2 -3
- package/dist/esm/plugins/insert-block/index.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -12
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +1 -168
- package/dist/esm/plugins/layout/styles.js +2 -3
- package/dist/esm/plugins/layout/utils.js +1 -58
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +10 -0
- package/dist/esm/plugins/paste/handlers.js +8 -4
- package/dist/esm/plugins/paste/util/index.js +23 -0
- package/dist/esm/plugins/selection/gap-cursor/selection.js +1 -176
- package/dist/esm/plugins/selection/gap-cursor/utils/is-ignored.js +1 -5
- package/dist/esm/plugins/selection/gap-cursor/utils/is-valid-target-node.js +1 -4
- package/dist/esm/plugins/selection/gap-cursor/utils.js +4 -4
- package/dist/esm/plugins/selection/gap-cursor-selection.js +1 -1
- package/dist/esm/plugins/selection/types.js +2 -9
- package/dist/esm/plugins/selection/utils.js +1 -1
- package/dist/esm/plugins/table/commands/go-to-next-cell.js +34 -32
- package/dist/esm/plugins/table/commands/insert.js +57 -49
- package/dist/esm/plugins/table/commands/selection.js +303 -215
- package/dist/esm/plugins/table/commands-with-analytics.js +241 -220
- package/dist/esm/plugins/table/event-handlers.js +60 -59
- package/dist/esm/plugins/table/index.js +62 -18
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +20 -21
- package/dist/esm/plugins/table/nodeviews/table.js +19 -9
- package/dist/esm/plugins/table/nodeviews/tableCell.js +11 -12
- package/dist/esm/plugins/table/nodeviews/update-overflow-shadows.js +25 -24
- package/dist/esm/plugins/table/pm-plugins/keymap.js +14 -13
- package/dist/esm/plugins/table/pm-plugins/main.js +8 -8
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -6
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -8
- package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +30 -28
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
- package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
- package/dist/esm/plugins/table/toolbar.js +75 -73
- package/dist/esm/plugins/table/transforms/column-width.js +41 -38
- package/dist/esm/plugins/table/transforms/replace-table.js +4 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +2 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +25 -21
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
- package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +6 -4
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +9 -6
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +2 -2
- package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +4 -5
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/utils/analytics.js +22 -1
- package/dist/esm/plugins/table/utils/index.js +1 -1
- package/dist/esm/selection-api/api.js +23 -0
- package/dist/esm/types/browser.js +0 -1
- package/dist/esm/ui/ColorPalette/Color/index.js +1 -93
- package/dist/esm/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -14
- package/dist/esm/ui/ColorPalette/Palettes/common.js +1 -19
- package/dist/esm/ui/ColorPalette/Palettes/paletteMessages.js +2 -113
- package/dist/esm/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -147
- package/dist/esm/ui/ColorPalette/Palettes/statusColorPalette.js +1 -51
- package/dist/esm/ui/ColorPalette/Palettes/textColorPalette.js +1 -25
- package/dist/esm/ui/ColorPalette/index.js +2 -64
- package/dist/esm/ui/Dropdown/index.js +2 -106
- package/dist/esm/ui/DropdownMenu/index.js +2 -265
- package/dist/esm/ui/Toolbar/types.js +1 -30
- package/dist/esm/ui/ToolbarButton/index.js +2 -102
- package/dist/esm/ui/WithPluginState/index.js +1 -1
- package/dist/esm/ui/styles.js +17 -20
- package/dist/esm/ui/with-outer-listeners.js +2 -139
- package/dist/esm/utils/dom.js +1 -113
- package/dist/esm/utils/index.js +5 -23
- package/dist/esm/utils/node-width.js +1 -73
- package/dist/esm/utils/nodes.js +1 -100
- package/dist/esm/utils/plugin-state-factory.js +1 -106
- package/dist/esm/utils/selection.js +2 -50
- package/dist/esm/utils/slice.js +1 -59
- package/dist/esm/utils/step.js +1 -37
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +2 -16
- package/dist/types/analytics-api/api.d.ts +9 -0
- package/dist/types/analytics-api/attach-payload-into-transaction.d.ts +10 -0
- package/dist/types/analytics-api/editor-state-context.d.ts +9 -0
- package/dist/types/analytics-api/map-attributes.d.ts +2 -0
- package/dist/types/create-editor/ReactEditorView.d.ts +1 -0
- package/dist/types/create-editor/ReactEditorViewContext.d.ts +1 -7
- package/dist/types/create-editor/create-plugins-list.d.ts +5 -1
- package/dist/types/event-dispatcher/index.d.ts +2 -19
- package/dist/types/insert-api/api.d.ts +9 -0
- package/dist/types/insert-api/insert-content-handlers.d.ts +9 -0
- package/dist/types/insert-api/insert-node-helpers.d.ts +30 -0
- package/dist/types/insert-api/types.d.ts +16 -0
- package/dist/types/keymaps/index.d.ts +2 -89
- package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
- package/dist/types/labs/next/presets/mobile.d.ts +1 -1
- package/dist/types/messages.d.ts +2 -124
- package/dist/types/plugins/analytics/index.d.ts +2 -2
- package/dist/types/plugins/analytics/types/dispatch-analytics-event.d.ts +1 -2
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -313
- package/dist/types/plugins/analytics/types/events.d.ts +1 -111
- package/dist/types/plugins/analytics/types/experimental-events.d.ts +1 -17
- package/dist/types/plugins/analytics/types/extension-events.d.ts +2 -43
- package/dist/types/plugins/analytics/types/general-events.d.ts +2 -179
- package/dist/types/plugins/analytics/types/index.d.ts +4 -14
- package/dist/types/plugins/analytics/types/inline-comment-events.d.ts +2 -17
- package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -76
- package/dist/types/plugins/analytics/types/media-events.d.ts +1 -16
- package/dist/types/plugins/analytics/types/node-events.d.ts +2 -56
- package/dist/types/plugins/analytics/types/selection-events.d.ts +1 -18
- package/dist/types/plugins/analytics/types/smart-links.d.ts +2 -13
- package/dist/types/plugins/analytics/types/toolbar-button.d.ts +2 -22
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +1 -27
- package/dist/types/plugins/analytics/utils.d.ts +3 -8
- package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -1
- package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/context-panel/types.d.ts +1 -3
- package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/expand/utils.d.ts +1 -5
- package/dist/types/plugins/extension/actions.d.ts +2 -6
- package/dist/types/plugins/extension/commands.d.ts +7 -7
- package/dist/types/plugins/extension/plugin-factory.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/styles.d.ts +2 -2
- package/dist/types/plugins/find-replace/commands.d.ts +7 -7
- package/dist/types/plugins/find-replace/plugin.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/types.d.ts +1 -153
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +2 -1
- package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +2 -12
- package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -20
- package/dist/types/plugins/insert-block/index.d.ts +2 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/messages.d.ts +1 -167
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -1
- package/dist/types/plugins/layout/styles.d.ts +2 -2
- package/dist/types/plugins/layout/utils.d.ts +1 -15
- package/dist/types/plugins/media/commands/linking.d.ts +3 -3
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -2
- package/dist/types/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types/plugins/mobile-dimensions/commands.d.ts +4 -4
- package/dist/types/plugins/mobile-dimensions/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/paste/util/index.d.ts +2 -1
- package/dist/types/plugins/selection/commands.d.ts +1 -1
- package/dist/types/plugins/selection/gap-cursor/selection.d.ts +1 -40
- package/dist/types/plugins/selection/gap-cursor/utils/is-ignored.d.ts +1 -2
- package/dist/types/plugins/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -2
- package/dist/types/plugins/selection/gap-cursor-selection.d.ts +1 -1
- package/dist/types/plugins/selection/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/selection/types.d.ts +4 -19
- package/dist/types/plugins/table/commands/go-to-next-cell.d.ts +3 -2
- package/dist/types/plugins/table/commands/hover.d.ts +7 -7
- package/dist/types/plugins/table/commands/insert.d.ts +5 -4
- package/dist/types/plugins/table/commands/misc.d.ts +8 -8
- package/dist/types/plugins/table/commands/selection.d.ts +4 -3
- package/dist/types/plugins/table/commands/toggle.d.ts +1 -1
- package/dist/types/plugins/table/commands-with-analytics.d.ts +21 -19
- package/dist/types/plugins/table/event-handlers.d.ts +4 -2
- package/dist/types/plugins/table/index.d.ts +7 -0
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +4 -2
- package/dist/types/plugins/table/nodeviews/table.d.ts +2 -1
- package/dist/types/plugins/table/nodeviews/tableCell.d.ts +2 -1
- package/dist/types/plugins/table/nodeviews/types.d.ts +3 -0
- package/dist/types/plugins/table/nodeviews/update-overflow-shadows.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/keymap.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/commands.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/commands.d.ts +4 -4
- package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-selection-keymap.d.ts +2 -1
- package/dist/types/plugins/table/toolbar.d.ts +5 -3
- package/dist/types/plugins/table/transforms/column-width.d.ts +2 -1
- package/dist/types/plugins/table/transforms/replace-table.d.ts +3 -2
- package/dist/types/plugins/table/types.d.ts +3 -1
- package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -0
- package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +5 -1
- package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -0
- package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +5 -1
- package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +2 -0
- package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +2 -0
- package/dist/types/plugins/table/utils/analytics.d.ts +3 -0
- package/dist/types/plugins/table/utils/index.d.ts +1 -1
- package/dist/types/plugins/type-ahead/types.d.ts +2 -50
- package/dist/types/plugins/width/index.d.ts +3 -6
- package/dist/types/selection-api/api.d.ts +11 -0
- package/dist/types/types/browser.d.ts +1 -10
- package/dist/types/types/editor-appearance.d.ts +1 -1
- package/dist/types/types/editor-plugin.d.ts +1 -59
- package/dist/types/types/editor-react-context.d.ts +1 -6
- package/dist/types/types/empty-state-handler.d.ts +1 -7
- package/dist/types/types/feature-flags.d.ts +1 -343
- package/dist/types/types/pm-config.d.ts +1 -14
- package/dist/types/types/pm-plugin.d.ts +1 -27
- package/dist/types/types/ui-components.d.ts +1 -22
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +118 -118
- package/dist/types/ui/ColorPalette/Color/index.d.ts +1 -19
- package/dist/types/ui/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -2
- package/dist/types/ui/ColorPalette/Palettes/common.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/paletteMessages.d.ts +2 -113
- package/dist/types/ui/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -3
- package/dist/types/ui/ColorPalette/Palettes/statusColorPalette.d.ts +1 -3
- package/dist/types/ui/ColorPalette/Palettes/textColorPalette.d.ts +1 -3
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -8
- package/dist/types/ui/ColorPalette/index.d.ts +2 -23
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/Dropdown/index.d.ts +2 -33
- package/dist/types/ui/DropdownMenu/index.d.ts +2 -18
- package/dist/types/ui/DropdownMenu/types.d.ts +1 -43
- package/dist/types/ui/Toolbar/types.d.ts +2 -30
- package/dist/types/ui/ToolbarButton/index.d.ts +3 -52
- package/dist/types/ui/styles.d.ts +3 -3
- package/dist/types/ui/with-outer-listeners.d.ts +2 -10
- package/dist/types/utils/document-logger.d.ts +2 -7
- package/dist/types/utils/dom.d.ts +2 -26
- package/dist/types/utils/index.d.ts +3 -6
- package/dist/types/utils/node-width.d.ts +1 -7
- package/dist/types/utils/nodes.d.ts +1 -35
- package/dist/types/utils/performance/plugin-performance-report.d.ts +2 -25
- package/dist/types/utils/plugin-state-factory.d.ts +2 -16
- package/dist/types/utils/selection.d.ts +3 -6
- package/dist/types/utils/slice.d.ts +2 -11
- package/dist/types/utils/step.d.ts +1 -15
- package/package.json +8 -9
- package/dist/cjs/plugins/analytics/types/config-panel-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/cut-copy-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/date-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/element-browser-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/find-replace-events.js +0 -5
- package/dist/cjs/plugins/analytics/types/format-events.js +0 -24
- package/dist/cjs/plugins/analytics/types/insert-events.js +0 -51
- package/dist/cjs/plugins/analytics/types/list-events.js +0 -25
- package/dist/cjs/plugins/analytics/types/paste-events.js +0 -55
- package/dist/cjs/plugins/analytics/types/substitute-events.js +0 -24
- package/dist/cjs/plugins/analytics/types/table-events.js +0 -43
- package/dist/cjs/plugins/analytics/types/utils.js +0 -27
- package/dist/cjs/ui/ColorPalette/Color/styles.js +0 -21
- package/dist/cjs/ui/ColorPalette/Palettes/getColorMessage.js +0 -17
- package/dist/cjs/ui/ColorPalette/styles.js +0 -19
- package/dist/cjs/ui/DropList/index.js +0 -215
- package/dist/cjs/ui/Layer/index.js +0 -245
- package/dist/cjs/ui/Layer/internal/helpers.js +0 -70
- package/dist/cjs/ui/ToolbarButton/styles.js +0 -26
- package/dist/es2019/plugins/analytics/types/cut-copy-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/date-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/element-browser-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/find-replace-events.js +0 -1
- package/dist/es2019/plugins/analytics/types/format-events.js +0 -16
- package/dist/es2019/plugins/analytics/types/insert-events.js +0 -41
- package/dist/es2019/plugins/analytics/types/list-events.js +0 -17
- package/dist/es2019/plugins/analytics/types/paste-events.js +0 -46
- package/dist/es2019/plugins/analytics/types/substitute-events.js +0 -16
- package/dist/es2019/plugins/analytics/types/table-events.js +0 -34
- package/dist/es2019/plugins/analytics/types/utils.js +0 -19
- package/dist/es2019/ui/ColorPalette/Color/styles.js +0 -24
- package/dist/es2019/ui/ColorPalette/Palettes/getColorMessage.js +0 -14
- package/dist/es2019/ui/ColorPalette/styles.js +0 -7
- package/dist/es2019/ui/DropList/index.js +0 -186
- package/dist/es2019/ui/Layer/index.js +0 -195
- package/dist/es2019/ui/Layer/internal/helpers.js +0 -62
- package/dist/es2019/ui/ToolbarButton/styles.js +0 -12
- package/dist/esm/plugins/analytics/types/avatar.js +0 -1
- package/dist/esm/plugins/analytics/types/config-panel-events.js +0 -1
- package/dist/esm/plugins/analytics/types/cut-copy-events.js +0 -1
- package/dist/esm/plugins/analytics/types/date-events.js +0 -1
- package/dist/esm/plugins/analytics/types/element-browser-events.js +0 -1
- package/dist/esm/plugins/analytics/types/find-replace-events.js +0 -1
- package/dist/esm/plugins/analytics/types/format-events.js +0 -16
- package/dist/esm/plugins/analytics/types/insert-events.js +0 -41
- package/dist/esm/plugins/analytics/types/list-events.js +0 -17
- package/dist/esm/plugins/analytics/types/paste-events.js +0 -46
- package/dist/esm/plugins/analytics/types/substitute-events.js +0 -16
- package/dist/esm/plugins/analytics/types/table-events.js +0 -34
- package/dist/esm/plugins/analytics/types/utils.js +0 -19
- package/dist/esm/ui/ColorPalette/Color/styles.js +0 -8
- package/dist/esm/ui/ColorPalette/Palettes/getColorMessage.js +0 -10
- package/dist/esm/ui/ColorPalette/styles.js +0 -7
- package/dist/esm/ui/DropList/index.js +0 -203
- package/dist/esm/ui/Layer/index.js +0 -228
- package/dist/esm/ui/Layer/internal/helpers.js +0 -62
- package/dist/esm/ui/ToolbarButton/styles.js +0 -12
- package/dist/types/plugins/analytics/types/avatar.d.ts +0 -5
- package/dist/types/plugins/analytics/types/config-panel-events.d.ts +0 -17
- package/dist/types/plugins/analytics/types/cut-copy-events.d.ts +0 -12
- package/dist/types/plugins/analytics/types/date-events.d.ts +0 -17
- package/dist/types/plugins/analytics/types/element-browser-events.d.ts +0 -11
- package/dist/types/plugins/analytics/types/find-replace-events.d.ts +0 -23
- package/dist/types/plugins/analytics/types/format-events.d.ts +0 -49
- package/dist/types/plugins/analytics/types/insert-events.d.ts +0 -128
- package/dist/types/plugins/analytics/types/list-events.d.ts +0 -52
- package/dist/types/plugins/analytics/types/paste-events.d.ts +0 -39
- package/dist/types/plugins/analytics/types/substitute-events.d.ts +0 -26
- package/dist/types/plugins/analytics/types/table-events.d.ts +0 -94
- package/dist/types/plugins/analytics/types/utils.d.ts +0 -45
- package/dist/types/ui/ColorPalette/Color/styles.d.ts +0 -2
- package/dist/types/ui/ColorPalette/Palettes/getColorMessage.d.ts +0 -2
- package/dist/types/ui/ColorPalette/styles.d.ts +0 -1
- package/dist/types/ui/DropList/index.d.ts +0 -22
- package/dist/types/ui/Layer/index.d.ts +0 -47
- package/dist/types/ui/Layer/internal/helpers.d.ts +0 -5
- package/dist/types/ui/ToolbarButton/styles.d.ts +0 -4
|
@@ -39,7 +39,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
39
39
|
|
|
40
40
|
var _dom = require("../../../../utils/dom");
|
|
41
41
|
|
|
42
|
-
var _analytics = require("
|
|
42
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
43
43
|
|
|
44
44
|
var _commandsWithAnalytics = require("../../commands-with-analytics");
|
|
45
45
|
|
|
@@ -51,8 +51,6 @@ var _getPopupOptions = _interopRequireDefault(require("./getPopupOptions"));
|
|
|
51
51
|
|
|
52
52
|
var _InsertButton = _interopRequireDefault(require("./InsertButton"));
|
|
53
53
|
|
|
54
|
-
var _enums = require("../../../analytics/types/enums");
|
|
55
|
-
|
|
56
54
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
57
55
|
|
|
58
56
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -128,11 +126,11 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
128
126
|
|
|
129
127
|
if (dispatchAnalyticsEvent) {
|
|
130
128
|
var payload = {
|
|
131
|
-
action:
|
|
132
|
-
actionSubject:
|
|
133
|
-
eventType:
|
|
129
|
+
action: _analytics.ACTION.ERRORED,
|
|
130
|
+
actionSubject: _analytics.ACTION_SUBJECT.CONTENT_COMPONENT,
|
|
131
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
134
132
|
attributes: {
|
|
135
|
-
component:
|
|
133
|
+
component: _analytics.CONTENT_COMPONENT.FLOATING_INSERT_BUTTON,
|
|
136
134
|
selection: editorView.state.selection.toJSON(),
|
|
137
135
|
position: pos,
|
|
138
136
|
docSize: editorView.state.doc.nodeSize,
|
|
@@ -205,13 +203,14 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
205
203
|
value: function insertRow(event) {
|
|
206
204
|
var _this$props3 = this.props,
|
|
207
205
|
editorView = _this$props3.editorView,
|
|
208
|
-
insertRowButtonIndex = _this$props3.insertRowButtonIndex
|
|
206
|
+
insertRowButtonIndex = _this$props3.insertRowButtonIndex,
|
|
207
|
+
editorAnalyticsAPI = _this$props3.editorAnalyticsAPI;
|
|
209
208
|
|
|
210
209
|
if (typeof insertRowButtonIndex !== 'undefined') {
|
|
211
210
|
event.preventDefault();
|
|
212
211
|
var state = editorView.state,
|
|
213
212
|
dispatch = editorView.dispatch;
|
|
214
|
-
(0, _commandsWithAnalytics.insertRowWithAnalytics)(_analytics.INPUT_METHOD.BUTTON, {
|
|
213
|
+
(0, _commandsWithAnalytics.insertRowWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.BUTTON, {
|
|
215
214
|
index: insertRowButtonIndex,
|
|
216
215
|
moveCursorToInsertedRow: true
|
|
217
216
|
})(state, dispatch);
|
|
@@ -222,13 +221,15 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
222
221
|
value: function insertColumn(event) {
|
|
223
222
|
var _this$props4 = this.props,
|
|
224
223
|
editorView = _this$props4.editorView,
|
|
225
|
-
insertColumnButtonIndex = _this$props4.insertColumnButtonIndex
|
|
224
|
+
insertColumnButtonIndex = _this$props4.insertColumnButtonIndex,
|
|
225
|
+
editorAnalyticsAPI = _this$props4.editorAnalyticsAPI,
|
|
226
|
+
getEditorContainerWidth = _this$props4.getEditorContainerWidth;
|
|
226
227
|
|
|
227
228
|
if (typeof insertColumnButtonIndex !== 'undefined') {
|
|
228
229
|
event.preventDefault();
|
|
229
230
|
var state = editorView.state,
|
|
230
231
|
dispatch = editorView.dispatch;
|
|
231
|
-
(0, _commandsWithAnalytics.insertColumnWithAnalytics)(_analytics.INPUT_METHOD.BUTTON, insertColumnButtonIndex)(state, dispatch, editorView);
|
|
232
|
+
(0, _commandsWithAnalytics.insertColumnWithAnalytics)(getEditorContainerWidth, editorAnalyticsAPI)(_analytics.INPUT_METHOD.BUTTON, insertColumnButtonIndex)(state, dispatch, editorView);
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
}]);
|
|
@@ -35,7 +35,7 @@ var _collapse = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/coll
|
|
|
35
35
|
|
|
36
36
|
var _expand = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/expand"));
|
|
37
37
|
|
|
38
|
-
var _messages = _interopRequireDefault(require("
|
|
38
|
+
var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
|
|
39
39
|
|
|
40
40
|
var _ToolbarButton = _interopRequireDefault(require("../../../../ui/ToolbarButton"));
|
|
41
41
|
|
|
@@ -109,7 +109,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
109
109
|
var _this$props$editorVie = _this.props.editorView,
|
|
110
110
|
state = _this$props$editorVie.state,
|
|
111
111
|
dispatch = _this$props$editorVie.dispatch;
|
|
112
|
-
(0, _commandsWithAnalytics.toggleTableLayoutWithAnalytics)()(state, dispatch);
|
|
112
|
+
(0, _commandsWithAnalytics.toggleTableLayoutWithAnalytics)(_this.props.editorAnalyticsAPI)(state, dispatch);
|
|
113
113
|
});
|
|
114
114
|
return _this;
|
|
115
115
|
}
|
|
@@ -37,8 +37,6 @@ var _NumberColumn = _interopRequireDefault(require("./NumberColumn"));
|
|
|
37
37
|
|
|
38
38
|
var _RowControls = _interopRequireDefault(require("./RowControls"));
|
|
39
39
|
|
|
40
|
-
var _featureFlagsContext = require("../../../feature-flags-context");
|
|
41
|
-
|
|
42
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
41
|
|
|
44
42
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -108,8 +106,8 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
|
|
|
108
106
|
|
|
109
107
|
var tableRef = this.props.tableRef;
|
|
110
108
|
|
|
111
|
-
var
|
|
112
|
-
tableRenderOptimization =
|
|
109
|
+
var _this$props$getEditor = this.props.getEditorFeatureFlags(),
|
|
110
|
+
tableRenderOptimization = _this$props$getEditor.tableRenderOptimization;
|
|
113
111
|
|
|
114
112
|
if (tableRenderOptimization && tableRef && !this.resizeObserver && (_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
|
|
115
113
|
this.resizeObserver = new ResizeObserver(function (entries) {
|
|
@@ -153,8 +151,8 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
|
|
|
153
151
|
headerRowHeight = _this$props.headerRowHeight,
|
|
154
152
|
stickyHeader = _this$props.stickyHeader;
|
|
155
153
|
|
|
156
|
-
var
|
|
157
|
-
tableRenderOptimization =
|
|
154
|
+
var _this$props$getEditor2 = this.props.getEditorFeatureFlags(),
|
|
155
|
+
tableRenderOptimization = _this$props$getEditor2.tableRenderOptimization;
|
|
158
156
|
|
|
159
157
|
var tableHeight = tableRenderOptimization ? (_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.tableHeight : this.props.tableHeight;
|
|
160
158
|
var nextTableHeight = tableRenderOptimization ? nextState === null || nextState === void 0 ? void 0 : nextState.tableHeight : nextProps.tableHeight;
|
|
@@ -19,7 +19,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
19
19
|
|
|
20
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
23
23
|
|
|
24
24
|
var _types = require("../types");
|
|
25
25
|
|
|
@@ -38,11 +38,11 @@ var sentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n
|
|
|
38
38
|
var tableStyles = function tableStyles(props) {
|
|
39
39
|
var _props$featureFlags;
|
|
40
40
|
|
|
41
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n td.", ", td.", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), _types.TableCssClassName.LAYOUT_BUTTON, (0, _tokens.token)('color.background.neutral', _colors.N20A), (0, _tokens.token)('color.icon', _colors.N300), _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, (0, _tokens.token)('color.background.neutral.hovered', _colors.B300), (0, _tokens.token)('color.icon', 'white'), (0, _styles.tableSharedStyle)(props), (0, _uiStyles.columnControlsLineMarker)(props), _uiStyles.hoveredDeleteButton, _uiStyles.hoveredCell, _uiStyles.hoveredWarningCell, _uiStyles.resizeHandle, rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, (0, _consts.tableCellBackgroundColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, _uiStyles.insertColumnButtonWrapper, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, _uiStyles.insertRowButtonWrapper, _uiStyles.DeleteButton, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, (0, _tokens.token)('elevation.surface', 'white'), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, (0, _tokens.token)('elevation.surface', 'white'), _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, (0, _tokens.token)('elevation.surface', 'white'), _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, (0, _tokens.token)('elevation.surface', 'green'), _consts.stickyRowOffsetTop, _consts.stickyRowZIndex, (0, _tokens.token)('elevation.surface', 'white'), (0, _tokens.token)('elevation.shadow.overflow', "0 6px 4px -4px ".concat(_colors.N40A)), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.stickyRowZIndex + 1, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, (0, _consts.tableBorderColor)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, (0, _tokens.token)('elevation.surface', 'white'), (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', (0, _uiStyles.OverflowShadow)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tablePadding, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts.tablePadding - 1, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.TABLE_CONTAINER, (0, _uiStyles.columnControlsDecoration)(props), _types.TableCssClassName.CORNER_CONTROLS, _consts.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)(props, "\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, (0, _uiStyles.InsertMarker)(props, "\n right: -1px;\n top: -12px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize + 1, _consts.tableToolbarSize + 1, (0, _consts.tableBorderColor)(props), _consts.tableBorderRadiusSize, (0, _consts.tableToolbarColor)(props), _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableBorderDeleteColor, _consts.tableToolbarDeleteColor, _types.TableCssClassName.ROW_CONTROLS, _consts.tableToolbarSize, (0, _uiStyles.InsertMarker)(props, "\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)(props, "\n border-bottom: 1px solid ".concat((0, _consts.tableBorderColor)(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types.TableCssClassName.NUMBERED_COLUMN, _editorSharedStyles.akEditorTableToolbarSize - 1, _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderColor)(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _consts.tableToolbarColor)(props), (0, _consts.tableTextColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, (0, _tokens.token)('color.text.inverse', _colors.N0), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, (0, _tokens.token)('color.text.inverse', _colors.N0), _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableToolbarDeleteColor, _consts.tableBorderDeleteColor, (0, _tokens.token)('color.text.inverse', _colors.R500), _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, _consts.tableBorderSelectedColor, _types.TableCssClassName.SELECTED_CELL, _consts.tableCellSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableCellDeleteColor, _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _consts.tableBorderSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableBorderDeleteColor, _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop - cornerControlHeight + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_LEFT_SHADOW, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_NODE_WRAPPER, _consts.tableInsertColumnButtonSize / 2, _consts.tableInsertColumnButtonSize / 2, _consts.tableScrollbarOffset, _consts.tableScrollbarOffset, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _styles2.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR);
|
|
41
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n td.", ", td.", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), _types.TableCssClassName.LAYOUT_BUTTON, (0, _tokens.token)('color.background.neutral', _colors.N20A), (0, _tokens.token)('color.icon', _colors.N300), _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, (0, _tokens.token)('color.background.neutral.hovered', _colors.B300), (0, _tokens.token)('color.icon', 'white'), (0, _styles.tableSharedStyle)(props), (0, _uiStyles.columnControlsLineMarker)(props), _uiStyles.hoveredDeleteButton, _uiStyles.hoveredCell, _uiStyles.hoveredWarningCell, _uiStyles.resizeHandle, rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, (0, _consts.tableCellBackgroundColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, _uiStyles.insertColumnButtonWrapper, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, _uiStyles.insertRowButtonWrapper, _uiStyles.DeleteButton, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, (0, _tokens.token)('elevation.surface', 'white'), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, (0, _tokens.token)('elevation.surface', 'white'), _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, (0, _tokens.token)('elevation.surface', 'white'), _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, (0, _tokens.token)('elevation.surface', 'green'), _consts.stickyRowOffsetTop, _consts.stickyRowZIndex, (0, _tokens.token)('elevation.surface', 'white'), (0, _tokens.token)('elevation.shadow.overflow', "0 6px 4px -4px ".concat(_colors.N40A)), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.stickyRowZIndex + 1, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, (0, _consts.tableBorderColor)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, (0, _tokens.token)('elevation.surface', 'white'), (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', (0, _uiStyles.OverflowShadow)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tablePadding, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts.tablePadding - 1, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.TABLE_CONTAINER, (0, _uiStyles.columnControlsDecoration)(props), _types.TableCssClassName.CORNER_CONTROLS, _consts.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)(props, "\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, (0, _uiStyles.InsertMarker)(props, "\n right: -1px;\n top: -12px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize + 1, _consts.tableToolbarSize + 1, (0, _consts.tableBorderColor)(props), _consts.tableBorderRadiusSize, (0, _consts.tableToolbarColor)(props), _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableBorderDeleteColor, _consts.tableToolbarDeleteColor, _types.TableCssClassName.ROW_CONTROLS, _consts.tableToolbarSize, (0, _uiStyles.InsertMarker)(props, "\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)(props, "\n border-bottom: 1px solid ".concat((0, _consts.tableBorderColor)(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types.TableCssClassName.NUMBERED_COLUMN, _editorSharedStyles.akEditorTableToolbarSize - 1, _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderColor)(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _consts.tableToolbarColor)(props), (0, _consts.tableTextColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, (0, _tokens.token)('color.text.inverse', _colors.N0), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, (0, _tokens.token)('color.text.inverse', _colors.N0), _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableToolbarDeleteColor, _consts.tableBorderDeleteColor, (0, _tokens.token)('color.text.inverse', _colors.R500), _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, _consts.tableBorderSelectedColor, _types.TableCssClassName.SELECTED_CELL, _consts.tableCellSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableCellDeleteColor, _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _consts.tableBorderSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableBorderDeleteColor, _editorSharedStyles.akEditorUnitZIndex * 100, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop - cornerControlHeight + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_LEFT_SHADOW, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_NODE_WRAPPER, _consts.tableInsertColumnButtonSize / 2, _consts.tableInsertColumnButtonSize / 2, _consts.tableScrollbarOffset, _consts.tableScrollbarOffset, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR);
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
exports.tableStyles = tableStyles;
|
|
45
45
|
var tableFullPageEditorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER);
|
|
46
46
|
exports.tableFullPageEditorStyles = tableFullPageEditorStyles;
|
|
47
|
-
var tableCommentEditorStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER,
|
|
47
|
+
var tableCommentEditorStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _scrollbar.scrollbarStyles);
|
|
48
48
|
exports.tableCommentEditorStyles = tableCommentEditorStyles;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getSelectedCellInfo = getSelectedCellInfo;
|
|
7
7
|
exports.getSelectedTableInfo = getSelectedTableInfo;
|
|
8
|
+
exports.withEditorAnalyticsAPI = void 0;
|
|
8
9
|
|
|
9
10
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
10
11
|
|
|
@@ -58,4 +59,28 @@ function getSelectedCellInfo(selection) {
|
|
|
58
59
|
verticalCells: verticalCells,
|
|
59
60
|
totalCells: totalCells
|
|
60
61
|
};
|
|
61
|
-
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var withEditorAnalyticsAPI = function withEditorAnalyticsAPI(payload) {
|
|
65
|
+
return function (editorAnalyticsAPI) {
|
|
66
|
+
return function (command) {
|
|
67
|
+
return function (state, dispatch, view) {
|
|
68
|
+
return command(state, function (tr) {
|
|
69
|
+
var dynamicPayload = payload instanceof Function ? payload(state) : payload;
|
|
70
|
+
|
|
71
|
+
if (dynamicPayload) {
|
|
72
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(dynamicPayload)(tr);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (dispatch) {
|
|
76
|
+
dispatch(tr);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return true;
|
|
80
|
+
}, view);
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
exports.withEditorAnalyticsAPI = withEditorAnalyticsAPI;
|
|
@@ -99,12 +99,6 @@ Object.defineProperty(exports, "getColumnOrRowIndex", {
|
|
|
99
99
|
return _dom.getColumnOrRowIndex;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
Object.defineProperty(exports, "getColumnsWidths", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function get() {
|
|
105
|
-
return _columnControls.getColumnsWidths;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
102
|
Object.defineProperty(exports, "getMergedCellsPositions", {
|
|
109
103
|
enumerable: true,
|
|
110
104
|
get: function get() {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createEditorSelectionAPI = void 0;
|
|
7
|
+
|
|
8
|
+
var _commands = require("../plugins/selection/commands");
|
|
9
|
+
|
|
10
|
+
var _pluginFactory = require("../plugins/selection/plugin-factory");
|
|
11
|
+
|
|
12
|
+
var createEditorSelectionAPI = function createEditorSelectionAPI() {
|
|
13
|
+
return {
|
|
14
|
+
getSelectionPluginState: function getSelectionPluginState(state) {
|
|
15
|
+
return (0, _pluginFactory.getPluginState)(state);
|
|
16
|
+
},
|
|
17
|
+
setSelectionRelativeToNode: function setSelectionRelativeToNode(_ref) {
|
|
18
|
+
var selectionRelativeToNode = _ref.selectionRelativeToNode,
|
|
19
|
+
selection = _ref.selection;
|
|
20
|
+
return function (state) {
|
|
21
|
+
var tr = state.tr;
|
|
22
|
+
|
|
23
|
+
var fakeDispatch = function fakeDispatch(_tr) {
|
|
24
|
+
tr = _tr;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
(0, _commands.setSelectionRelativeToNode)(selectionRelativeToNode, selection)(state, fakeDispatch);
|
|
28
|
+
return tr;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.createEditorSelectionAPI = createEditorSelectionAPI;
|
|
@@ -1,115 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
3
|
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
6
|
exports.default = void 0;
|
|
11
7
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
-
|
|
22
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
27
|
-
|
|
28
|
-
var _react2 = require("@emotion/react");
|
|
29
|
-
|
|
30
|
-
var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
|
|
31
|
-
|
|
32
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
33
|
-
|
|
34
|
-
var _styles = require("./styles");
|
|
35
|
-
|
|
36
|
-
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
37
|
-
|
|
38
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
-
|
|
40
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
-
|
|
42
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
43
|
-
|
|
44
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
|
-
|
|
46
|
-
var Color = /*#__PURE__*/function (_PureComponent) {
|
|
47
|
-
(0, _inherits2.default)(Color, _PureComponent);
|
|
48
|
-
|
|
49
|
-
var _super = _createSuper(Color);
|
|
50
|
-
|
|
51
|
-
function Color() {
|
|
52
|
-
var _this;
|
|
53
|
-
|
|
54
|
-
(0, _classCallCheck2.default)(this, Color);
|
|
55
|
-
|
|
56
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
57
|
-
args[_key] = arguments[_key];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
61
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMouseDown", function (e) {
|
|
62
|
-
e.preventDefault();
|
|
63
|
-
});
|
|
64
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClick", function (e) {
|
|
65
|
-
var _this$props = _this.props,
|
|
66
|
-
onClick = _this$props.onClick,
|
|
67
|
-
value = _this$props.value,
|
|
68
|
-
label = _this$props.label;
|
|
69
|
-
e.preventDefault();
|
|
70
|
-
onClick(value, label);
|
|
71
|
-
});
|
|
72
|
-
return _this;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
(0, _createClass2.default)(Color, [{
|
|
76
|
-
key: "render",
|
|
77
|
-
value: function render() {
|
|
78
|
-
var _this$props2 = this.props,
|
|
79
|
-
autoFocus = _this$props2.autoFocus,
|
|
80
|
-
tabIndex = _this$props2.tabIndex,
|
|
81
|
-
value = _this$props2.value,
|
|
82
|
-
label = _this$props2.label,
|
|
83
|
-
isSelected = _this$props2.isSelected,
|
|
84
|
-
borderColor = _this$props2.borderColor,
|
|
85
|
-
_this$props2$checkMar = _this$props2.checkMarkColor,
|
|
86
|
-
checkMarkColor = _this$props2$checkMar === void 0 ? _colors.N0 : _this$props2$checkMar;
|
|
87
|
-
return (0, _react2.jsx)(_tooltip.default, {
|
|
88
|
-
content: label
|
|
89
|
-
}, (0, _react2.jsx)("span", {
|
|
90
|
-
css: _styles.buttonWrapperStyle
|
|
91
|
-
}, (0, _react2.jsx)("button", {
|
|
92
|
-
css: _styles.buttonStyle,
|
|
93
|
-
"aria-label": label,
|
|
94
|
-
role: "radio",
|
|
95
|
-
"aria-checked": isSelected,
|
|
96
|
-
onClick: this.onClick,
|
|
97
|
-
onMouseDown: this.onMouseDown,
|
|
98
|
-
tabIndex: tabIndex,
|
|
99
|
-
className: "".concat(isSelected ? 'selected' : ''),
|
|
100
|
-
style: {
|
|
101
|
-
backgroundColor: value || 'transparent',
|
|
102
|
-
border: "1px solid ".concat(borderColor)
|
|
103
|
-
},
|
|
104
|
-
autoFocus: autoFocus
|
|
105
|
-
}, isSelected && (0, _react2.jsx)(_done.default, {
|
|
106
|
-
primaryColor: checkMarkColor,
|
|
107
|
-
label: ""
|
|
108
|
-
}))));
|
|
109
|
-
}
|
|
110
|
-
}]);
|
|
111
|
-
return Color;
|
|
112
|
-
}(_react.PureComponent);
|
|
8
|
+
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
113
9
|
|
|
114
|
-
var _default = Color;
|
|
10
|
+
var _default = _uiColor.Color;
|
|
115
11
|
exports.default = _default;
|
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _getColorMessage = _interopRequireDefault(require("./getColorMessage"));
|
|
13
|
-
|
|
14
|
-
var _paletteMessages = _interopRequireDefault(require("./paletteMessages"));
|
|
15
|
-
|
|
16
|
-
var cellBackgroundColorPalette = [];
|
|
17
|
-
|
|
18
|
-
_adfSchema.tableBackgroundColorPalette.forEach(function (label, color) {
|
|
19
|
-
var key = label.toLowerCase().replace(' ', '-');
|
|
20
|
-
var message = (0, _getColorMessage.default)(_paletteMessages.default, key);
|
|
21
|
-
cellBackgroundColorPalette.push({
|
|
22
|
-
value: color,
|
|
23
|
-
label: label,
|
|
24
|
-
border: _adfSchema.tableBackgroundBorderColor,
|
|
25
|
-
message: message
|
|
26
|
-
});
|
|
27
|
-
});
|
|
8
|
+
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
28
9
|
|
|
29
|
-
var _default = cellBackgroundColorPalette;
|
|
10
|
+
var _default = _uiColor.cellBackgroundColorPalette;
|
|
30
11
|
exports.default = _default;
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* For a given color set the alpha channel to alpha
|
|
16
|
-
*
|
|
17
|
-
* @param color color string, suppports HEX, RGB, RGBA etc.
|
|
18
|
-
* @param alpha Alpha channel value as fraction of 1
|
|
19
|
-
* @return CSS RGBA string with applied alpha channel
|
|
20
|
-
*/
|
|
21
|
-
function setAlpha(color, alpha) {
|
|
22
|
-
var _chromatism$convert$r = _chromatism.default.convert(color).rgb,
|
|
23
|
-
r = _chromatism$convert$r.r,
|
|
24
|
-
g = _chromatism$convert$r.g,
|
|
25
|
-
b = _chromatism$convert$r.b;
|
|
26
|
-
|
|
27
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
28
|
-
}
|
|
6
|
+
Object.defineProperty(exports, "DEFAULT_BORDER_COLOR", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _uiColor.DEFAULT_BORDER_COLOR;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
29
12
|
|
|
30
|
-
var
|
|
31
|
-
exports.DEFAULT_BORDER_COLOR = DEFAULT_BORDER_COLOR;
|
|
13
|
+
var _uiColor = require("@atlaskit/editor-common/ui-color");
|