@atlaskit/editor-core 172.1.2 → 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 +24 -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/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/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/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 +5 -6
- 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
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default function getColorMessage(messages, color) {
|
|
2
|
-
var message = messages[color];
|
|
3
|
-
|
|
4
|
-
if (!message) {
|
|
5
|
-
// eslint-disable-next-line no-console
|
|
6
|
-
console.warn("Text color palette does not have an internationalization message for color ".concat(color.toUpperCase(), ".\nYou must add a message description to properly translate this color.\nUsing current label as default message.\nThis could have happen when someone changed the 'colorPalette' from 'adf-schema' without updating this file.\n"));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
return message;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
|
-
export var colorPaletteWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 ", "px;\n /* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */\n display: flex;\n"])), gridSize());
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
11
|
-
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
|
|
14
|
-
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; } }
|
|
15
|
-
|
|
16
|
-
/** @jsx jsx */
|
|
17
|
-
import { Component } from 'react';
|
|
18
|
-
import { css, jsx } from '@emotion/react';
|
|
19
|
-
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
20
|
-
import Layer from '../Layer';
|
|
21
|
-
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
22
|
-
import { N0, DN50, DN600, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
23
|
-
import { themed } from '@atlaskit/theme/components';
|
|
24
|
-
import { token } from '@atlaskit/tokens';
|
|
25
|
-
var packageName = "@atlaskit/editor-core";
|
|
26
|
-
var packageVersion = "172.1.2";
|
|
27
|
-
var halfFocusRing = 1;
|
|
28
|
-
var dropOffset = "0, ".concat(gridSize(), "px");
|
|
29
|
-
|
|
30
|
-
var DropList = /*#__PURE__*/function (_Component) {
|
|
31
|
-
_inherits(DropList, _Component);
|
|
32
|
-
|
|
33
|
-
var _super = _createSuper(DropList);
|
|
34
|
-
|
|
35
|
-
function DropList() {
|
|
36
|
-
var _this;
|
|
37
|
-
|
|
38
|
-
_classCallCheck(this, DropList);
|
|
39
|
-
|
|
40
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41
|
-
args[_key] = arguments[_key];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
45
|
-
|
|
46
|
-
_defineProperty(_assertThisInitialized(_this), "wrapperStyles", css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n "])), _this.props.shouldFitContainer ? 'display: block; flex: 1 1 auto;' : 'display: inline-flex;'));
|
|
47
|
-
|
|
48
|
-
_defineProperty(_assertThisInitialized(_this), "triggerStyles", css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n ", "\n "])), _this.props.shouldFitContainer ? 'display: block; box-sizing: border-box;' : 'display: inline-flex;'));
|
|
49
|
-
|
|
50
|
-
_defineProperty(_assertThisInitialized(_this), "menuWrapper", function (theme) {
|
|
51
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: 0 ", "px ", "px -", "px ", ",\n 0 0 1px ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", "px 0;\n max-height: 90vh;\n "])), themed({
|
|
52
|
-
light: token('color.text', N900),
|
|
53
|
-
dark: token('color.text', DN600)
|
|
54
|
-
})(theme), themed({
|
|
55
|
-
light: token('elevation.surface.overlay', N0),
|
|
56
|
-
dark: token('elevation.surface.overlay', DN50)
|
|
57
|
-
})(theme), borderRadius(), gridSize() / 2, gridSize(), gridSize() / 4, N50A, N60A, gridSize() / 2);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
_defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {
|
|
61
|
-
_this.setContentWidth(); // We use a captured event here to avoid a radio or checkbox dropdown item firing its
|
|
62
|
-
// click event first, which would cause a re-render of the element and prevent DropList
|
|
63
|
-
// from detecting the actual source of this original click event.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
document.addEventListener('click', _this.handleClickOutside, true);
|
|
67
|
-
document.addEventListener('keydown', _this.handleEsc);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
_defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function () {
|
|
71
|
-
if (_this.props.isOpen) {
|
|
72
|
-
_this.setContentWidth();
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
_defineProperty(_assertThisInitialized(_this), "componentWillUnmount", function () {
|
|
77
|
-
document.removeEventListener('click', _this.handleClickOutside, true);
|
|
78
|
-
document.removeEventListener('keydown', _this.handleEsc);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
_defineProperty(_assertThisInitialized(_this), "setContentWidth", function () {
|
|
82
|
-
var _assertThisInitialize = _assertThisInitialized(_this),
|
|
83
|
-
dropContentRef = _assertThisInitialize.dropContentRef,
|
|
84
|
-
triggerRef = _assertThisInitialize.triggerRef;
|
|
85
|
-
|
|
86
|
-
var shouldFitContainer = _this.props.shouldFitContainer; // We need to manually set the content width to match the trigger width
|
|
87
|
-
|
|
88
|
-
if (shouldFitContainer && dropContentRef && triggerRef) {
|
|
89
|
-
dropContentRef.style.width = "".concat(triggerRef.offsetWidth - halfFocusRing * 2, "px");
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
_defineProperty(_assertThisInitialized(_this), "handleEsc", function (event) {
|
|
94
|
-
if ((event.key === 'Escape' || event.key === 'Esc') && _this.props.isOpen) {
|
|
95
|
-
_this.close(event);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
_defineProperty(_assertThisInitialized(_this), "handleClickOutside", function (event) {
|
|
100
|
-
if (_this.props.isOpen) {
|
|
101
|
-
if (event.target instanceof Node) {
|
|
102
|
-
// Rather than check for the target within the entire DropList, we specify the trigger/content.
|
|
103
|
-
// This aids with future effort in scroll-locking DropList when isMenuFixed is enabled; the scroll
|
|
104
|
-
// blanket which stretches to the viewport should not stop 'close' from being triggered.
|
|
105
|
-
var withinTrigger = _this.triggerRef && _this.triggerRef.contains(event.target);
|
|
106
|
-
|
|
107
|
-
var withinContent = _this.dropContentRef && _this.dropContentRef.contains(event.target);
|
|
108
|
-
|
|
109
|
-
if (!withinTrigger && !withinContent) {
|
|
110
|
-
_this.close(event);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
_defineProperty(_assertThisInitialized(_this), "close", function (event) {
|
|
117
|
-
if (_this.props.onOpenChange) {
|
|
118
|
-
_this.props.onOpenChange({
|
|
119
|
-
isOpen: false,
|
|
120
|
-
event: event
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
_defineProperty(_assertThisInitialized(_this), "handleContentRef", function (ref) {
|
|
126
|
-
_this.dropContentRef = ref; // If the dropdown has just been opened, we focus on the containing element so the
|
|
127
|
-
// user can tab to the first dropdown item. We will only receive this ref if isOpen
|
|
128
|
-
// is true or null, so no need to check for truthiness here.
|
|
129
|
-
|
|
130
|
-
if (ref) {
|
|
131
|
-
ref.focus();
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
_defineProperty(_assertThisInitialized(_this), "handleTriggerRef", function (ref) {
|
|
136
|
-
_this.triggerRef = ref;
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
return _this;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
_createClass(DropList, [{
|
|
143
|
-
key: "getChildContext",
|
|
144
|
-
value: function getChildContext() {
|
|
145
|
-
return {
|
|
146
|
-
shouldAllowMultilineItems: false
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
}, {
|
|
150
|
-
key: "render",
|
|
151
|
-
value: function render() {
|
|
152
|
-
var _this2 = this;
|
|
153
|
-
|
|
154
|
-
var _this$props = this.props,
|
|
155
|
-
children = _this$props.children,
|
|
156
|
-
isOpen = _this$props.isOpen,
|
|
157
|
-
position = _this$props.position,
|
|
158
|
-
trigger = _this$props.trigger,
|
|
159
|
-
onPositioned = _this$props.onPositioned,
|
|
160
|
-
testId = _this$props.testId;
|
|
161
|
-
var layerContent = isOpen ? jsx("div", {
|
|
162
|
-
css: function css(theme) {
|
|
163
|
-
return _this2.menuWrapper({
|
|
164
|
-
theme: theme
|
|
165
|
-
});
|
|
166
|
-
},
|
|
167
|
-
"data-role": "droplistContent",
|
|
168
|
-
"data-testid": testId && "".concat(testId, "--content"),
|
|
169
|
-
ref: this.handleContentRef
|
|
170
|
-
}, children) : null;
|
|
171
|
-
return jsx("div", {
|
|
172
|
-
css: this.wrapperStyles
|
|
173
|
-
}, jsx(Layer, {
|
|
174
|
-
content: layerContent,
|
|
175
|
-
offset: dropOffset,
|
|
176
|
-
position: position,
|
|
177
|
-
onPositioned: onPositioned
|
|
178
|
-
}, jsx("div", {
|
|
179
|
-
css: this.triggerStyles,
|
|
180
|
-
ref: this.handleTriggerRef
|
|
181
|
-
}, trigger)));
|
|
182
|
-
}
|
|
183
|
-
}]);
|
|
184
|
-
|
|
185
|
-
return DropList;
|
|
186
|
-
}(Component);
|
|
187
|
-
|
|
188
|
-
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
189
|
-
export default withAnalyticsContext({
|
|
190
|
-
componentName: 'droplist',
|
|
191
|
-
packageName: packageName,
|
|
192
|
-
packageVersion: packageVersion
|
|
193
|
-
})(withAnalyticsEvents({
|
|
194
|
-
onOpenChange: createAndFireEventOnAtlaskit({
|
|
195
|
-
action: 'toggled',
|
|
196
|
-
actionSubject: 'droplist',
|
|
197
|
-
attributes: {
|
|
198
|
-
componentName: 'droplist',
|
|
199
|
-
packageName: packageName,
|
|
200
|
-
packageVersion: packageVersion
|
|
201
|
-
}
|
|
202
|
-
})
|
|
203
|
-
})(DropList));
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
-
|
|
13
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
|
|
15
|
-
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; } }
|
|
16
|
-
|
|
17
|
-
import React, { Component } from 'react';
|
|
18
|
-
import rafSchedule from 'raf-schd';
|
|
19
|
-
import Popper from 'popper.js'; // eslint-disable-line import/extensions
|
|
20
|
-
|
|
21
|
-
import { positionPropToPopperPosition } from './internal/helpers';
|
|
22
|
-
var defaultState = {
|
|
23
|
-
hasExtractedStyles: false,
|
|
24
|
-
// We set these default offsets to prevent a flash of popper content in the wrong position
|
|
25
|
-
// which can cause incorrect height calculations. Popper will calculate these values
|
|
26
|
-
offsets: {
|
|
27
|
-
popper: {
|
|
28
|
-
left: -9999,
|
|
29
|
-
top: -9999,
|
|
30
|
-
position: null
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
// fix Safari parent width: https://product-fabric.atlassian.net/browse/ED-1784
|
|
34
|
-
cssPosition: 'absolute',
|
|
35
|
-
originalHeight: null,
|
|
36
|
-
maxHeight: null
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
var Layer = /*#__PURE__*/function (_Component) {
|
|
40
|
-
_inherits(Layer, _Component);
|
|
41
|
-
|
|
42
|
-
var _super = _createSuper(Layer);
|
|
43
|
-
|
|
44
|
-
// working with extract-react-types
|
|
45
|
-
function Layer(props) {
|
|
46
|
-
var _this;
|
|
47
|
-
|
|
48
|
-
_classCallCheck(this, Layer);
|
|
49
|
-
|
|
50
|
-
_this = _super.call(this, props);
|
|
51
|
-
|
|
52
|
-
_defineProperty(_assertThisInitialized(_this), "targetRef", /*#__PURE__*/React.createRef());
|
|
53
|
-
|
|
54
|
-
_defineProperty(_assertThisInitialized(_this), "contentRef", /*#__PURE__*/React.createRef());
|
|
55
|
-
|
|
56
|
-
_defineProperty(_assertThisInitialized(_this), "extractStyles", function (state) {
|
|
57
|
-
if (state) {
|
|
58
|
-
var popperHeight = state.offsets.popper.height;
|
|
59
|
-
var left = Math.round(state.offsets.popper.left);
|
|
60
|
-
var top = Math.round(state.offsets.popper.top);
|
|
61
|
-
var cssPosition = 'absolute';
|
|
62
|
-
var originalHeight = _this.state.originalHeight || popperHeight;
|
|
63
|
-
|
|
64
|
-
var maxHeight = _this.calculateMaxHeight(originalHeight, popperHeight, top, cssPosition);
|
|
65
|
-
|
|
66
|
-
_this.setState({
|
|
67
|
-
// position: fixed or absolute
|
|
68
|
-
cssPosition: cssPosition,
|
|
69
|
-
hasExtractedStyles: true,
|
|
70
|
-
transform: "translate3d(".concat(left, "px, ").concat(top, "px, 0px)"),
|
|
71
|
-
originalHeight: originalHeight,
|
|
72
|
-
maxHeight: maxHeight
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
_this.state = defaultState;
|
|
78
|
-
_this.extractStyles = rafSchedule(_this.extractStyles.bind(_assertThisInitialized(_this)));
|
|
79
|
-
return _this;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
_createClass(Layer, [{
|
|
83
|
-
key: "componentDidMount",
|
|
84
|
-
value: function componentDidMount() {
|
|
85
|
-
this.applyPopper(this.props);
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
89
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
90
|
-
this.applyPopper(nextProps);
|
|
91
|
-
}
|
|
92
|
-
}, {
|
|
93
|
-
key: "componentDidUpdate",
|
|
94
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
95
|
-
var onPositioned = this.props.onPositioned;
|
|
96
|
-
var hasExtractedStyles = this.state.hasExtractedStyles; // This flag is set the first time the position is calculated from Popper and applied to the content
|
|
97
|
-
|
|
98
|
-
if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {
|
|
99
|
-
onPositioned();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "componentWillUnmount",
|
|
104
|
-
value: function componentWillUnmount() {
|
|
105
|
-
// this.extractStyles.cancel();
|
|
106
|
-
if (this.popper) {
|
|
107
|
-
this.popper.destroy();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/* Calculate the max height of the popper if it's height is greater than the viewport to prevent
|
|
111
|
-
* the bottom of the popper not being viewable.
|
|
112
|
-
* Only works if the popper uses viewport as the boundary and has a fixed position ancestor.
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
}, {
|
|
116
|
-
key: "calculateMaxHeight",
|
|
117
|
-
value: function calculateMaxHeight(originalHeight, currentHeight, positionTop, cssPosition) {
|
|
118
|
-
var DocumentElementClientHeight = 0;
|
|
119
|
-
|
|
120
|
-
if (document.documentElement) {
|
|
121
|
-
DocumentElementClientHeight = document.documentElement.clientHeight;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (cssPosition !== 'fixed') {
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
var viewportHeight = Math.max(DocumentElementClientHeight, window.innerHeight || 0);
|
|
129
|
-
return viewportHeight < originalHeight && currentHeight + positionTop >= viewportHeight - 50 ? // allow some spacing either side of viewport height
|
|
130
|
-
viewportHeight - 12 : null;
|
|
131
|
-
}
|
|
132
|
-
}, {
|
|
133
|
-
key: "applyPopper",
|
|
134
|
-
value: function applyPopper(props) {
|
|
135
|
-
if (!this.targetRef.current || !this.contentRef.current) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (this.popper) {
|
|
140
|
-
this.popper.destroy();
|
|
141
|
-
} // "new Popper(...)" operation is very expensive when called on virtual DOM.
|
|
142
|
-
// This condition reduces the number of calls so we can run our tests faster
|
|
143
|
-
// (time was reduced from 100s to 13s).
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (!props.content) {
|
|
147
|
-
return;
|
|
148
|
-
} // we wrap our target in a div so that we can safely get a reference to it, but we pass the
|
|
149
|
-
// actual target to popper
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
var isAlwaysFixed = false;
|
|
153
|
-
var actualTarget = this.targetRef.current.children[0];
|
|
154
|
-
var popperOpts = {
|
|
155
|
-
placement: positionPropToPopperPosition(props.position),
|
|
156
|
-
onCreate: this.extractStyles,
|
|
157
|
-
onUpdate: this.extractStyles,
|
|
158
|
-
modifiers: {
|
|
159
|
-
applyStyle: {
|
|
160
|
-
enabled: false
|
|
161
|
-
},
|
|
162
|
-
hide: {
|
|
163
|
-
enabled: false
|
|
164
|
-
},
|
|
165
|
-
offset: {
|
|
166
|
-
enabled: true,
|
|
167
|
-
offset: this.props.offset
|
|
168
|
-
},
|
|
169
|
-
flip: {
|
|
170
|
-
enabled: false,
|
|
171
|
-
flipVariations: true,
|
|
172
|
-
boundariesElement: 'viewport',
|
|
173
|
-
padding: 0 // leave 0 pixels between popper and the boundariesElement
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
preventOverflow: {
|
|
177
|
-
enabled: false,
|
|
178
|
-
escapeWithReference: true
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
positionFixed: isAlwaysFixed
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
if (actualTarget) {
|
|
185
|
-
this.popper = new Popper(actualTarget, this.contentRef.current, popperOpts);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}, {
|
|
189
|
-
key: "render",
|
|
190
|
-
value: function render() {
|
|
191
|
-
var _this$state = this.state,
|
|
192
|
-
transform = _this$state.transform,
|
|
193
|
-
hasExtractedStyles = _this$state.hasExtractedStyles,
|
|
194
|
-
maxHeight = _this$state.maxHeight;
|
|
195
|
-
var opacity = hasExtractedStyles ? {} : {
|
|
196
|
-
opacity: 0
|
|
197
|
-
};
|
|
198
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
199
|
-
ref: this.targetRef
|
|
200
|
-
}, this.props.children), /*#__PURE__*/React.createElement("div", {
|
|
201
|
-
ref: this.contentRef,
|
|
202
|
-
style: _objectSpread({
|
|
203
|
-
top: 0,
|
|
204
|
-
left: 0,
|
|
205
|
-
position: 'absolute',
|
|
206
|
-
transform: transform,
|
|
207
|
-
maxHeight: maxHeight ? maxHeight : 'auto'
|
|
208
|
-
}, opacity)
|
|
209
|
-
}, this.props.content));
|
|
210
|
-
}
|
|
211
|
-
}]);
|
|
212
|
-
|
|
213
|
-
return Layer;
|
|
214
|
-
}(Component);
|
|
215
|
-
|
|
216
|
-
_defineProperty(Layer, "defaultProps", {
|
|
217
|
-
boundariesElement: 'viewport',
|
|
218
|
-
children: null,
|
|
219
|
-
content: null,
|
|
220
|
-
offset: '0, 0',
|
|
221
|
-
position: 'right middle',
|
|
222
|
-
zIndex: 400,
|
|
223
|
-
lockScroll: false,
|
|
224
|
-
isAlwaysFixed: false,
|
|
225
|
-
onPositioned: function onPositioned() {}
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
export { Layer as default };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
var positionMap = {
|
|
2
|
-
'top left': {
|
|
3
|
-
position: 'top-start',
|
|
4
|
-
animation: 'top'
|
|
5
|
-
},
|
|
6
|
-
'top center': {
|
|
7
|
-
position: 'top',
|
|
8
|
-
animation: 'top'
|
|
9
|
-
},
|
|
10
|
-
'top right': {
|
|
11
|
-
position: 'top-end',
|
|
12
|
-
animation: 'top'
|
|
13
|
-
},
|
|
14
|
-
'right top': {
|
|
15
|
-
position: 'right-start',
|
|
16
|
-
animation: 'right'
|
|
17
|
-
},
|
|
18
|
-
'right middle': {
|
|
19
|
-
position: 'right',
|
|
20
|
-
animation: 'right'
|
|
21
|
-
},
|
|
22
|
-
'right bottom': {
|
|
23
|
-
position: 'right-end',
|
|
24
|
-
animation: 'right'
|
|
25
|
-
},
|
|
26
|
-
'bottom left': {
|
|
27
|
-
position: 'bottom-start',
|
|
28
|
-
animation: 'bottom'
|
|
29
|
-
},
|
|
30
|
-
'bottom center': {
|
|
31
|
-
position: 'bottom',
|
|
32
|
-
animation: 'bottom'
|
|
33
|
-
},
|
|
34
|
-
'bottom right': {
|
|
35
|
-
position: 'bottom-end',
|
|
36
|
-
animation: 'bottom'
|
|
37
|
-
},
|
|
38
|
-
'left top': {
|
|
39
|
-
position: 'left-start',
|
|
40
|
-
animation: 'left'
|
|
41
|
-
},
|
|
42
|
-
'left middle': {
|
|
43
|
-
position: 'left',
|
|
44
|
-
animation: 'left'
|
|
45
|
-
},
|
|
46
|
-
'left bottom': {
|
|
47
|
-
position: 'left-end',
|
|
48
|
-
animation: 'left'
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
export var POSITION_ATTRIBUTE_ENUM = {
|
|
52
|
-
values: ['top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom left', 'bottom center', 'bottom right', 'left top', 'left middle', 'left bottom'],
|
|
53
|
-
default: 'right middle'
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
function positionToPopper(position) {
|
|
57
|
-
return position && positionMap[position] ? positionMap[position].position : null;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function positionPropToPopperPosition(position) {
|
|
61
|
-
return positionToPopper(position) || positionMap[POSITION_ATTRIBUTE_ENUM.default].position;
|
|
62
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Button from '@atlaskit/button/standard-button';
|
|
4
|
-
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
6
|
-
ref: ref
|
|
7
|
-
}, props, {
|
|
8
|
-
style: {
|
|
9
|
-
alignItems: 'center'
|
|
10
|
-
}
|
|
11
|
-
}));
|
|
12
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { UIAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
3
|
-
declare type AvatarButtonViewedAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AVATAR_GROUP_PLUGIN, {}, undefined>;
|
|
4
|
-
export declare type AvatarEventPayload = AvatarButtonViewedAEP;
|
|
5
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { UIAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT } from './enums';
|
|
3
|
-
declare type OpenAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.CONFIG_PANEL, undefined, {}, undefined>;
|
|
4
|
-
declare type CloseAEP = UIAEP<ACTION.CLOSED, ACTION_SUBJECT.CONFIG_PANEL, undefined, {}, undefined>;
|
|
5
|
-
declare type ConfigPanelCrashedAEP = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.CONFIG_PANEL, undefined, {
|
|
6
|
-
product: string;
|
|
7
|
-
browserInfo: string;
|
|
8
|
-
extensionKey: string;
|
|
9
|
-
fields: string;
|
|
10
|
-
error: string;
|
|
11
|
-
errorInfo?: {
|
|
12
|
-
componentStack: string;
|
|
13
|
-
};
|
|
14
|
-
errorStack?: string;
|
|
15
|
-
}, undefined>;
|
|
16
|
-
export declare type ConfigPanelEventPayload = OpenAEP | CloseAEP | ConfigPanelCrashedAEP;
|
|
17
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TrackAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT } from './enums';
|
|
3
|
-
declare type CopyAEP = TrackAEP<ACTION.COPIED, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
4
|
-
content: string[];
|
|
5
|
-
inputMethod?: string;
|
|
6
|
-
nodeType?: string;
|
|
7
|
-
}, undefined>;
|
|
8
|
-
declare type CutAEP = TrackAEP<ACTION.CUT, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
9
|
-
content: string[];
|
|
10
|
-
}, undefined>;
|
|
11
|
-
export declare type CutCopyEventPayload = CutAEP | CopyAEP;
|
|
12
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TrackAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
3
|
-
declare type TypeDateStartedAEP = TrackAEP<ACTION.TYPING_STARTED, ACTION_SUBJECT.DATE, undefined, undefined, undefined>;
|
|
4
|
-
declare type TypeDateFinishedAEP = TrackAEP<ACTION.TYPING_FINISHED, ACTION_SUBJECT.DATE, undefined, undefined, undefined>;
|
|
5
|
-
declare type IncrementDateSegmentAEP = TrackAEP<ACTION.INCREMENTED, ACTION_SUBJECT.DATE_SEGMENT, undefined, {
|
|
6
|
-
dateSegment: ACTION_SUBJECT_ID.DATE_DAY | ACTION_SUBJECT_ID.DATE_MONTH | ACTION_SUBJECT_ID.DATE_YEAR;
|
|
7
|
-
}, undefined>;
|
|
8
|
-
declare type DecrementDateSegmentAEP = TrackAEP<ACTION.DECREMENTED, ACTION_SUBJECT.DATE_SEGMENT, undefined, {
|
|
9
|
-
dateSegment: ACTION_SUBJECT_ID.DATE_DAY | ACTION_SUBJECT_ID.DATE_MONTH | ACTION_SUBJECT_ID.DATE_YEAR;
|
|
10
|
-
}, undefined>;
|
|
11
|
-
declare type CommitDateAEP = TrackAEP<ACTION.COMMITTED, ACTION_SUBJECT.DATE, undefined, {
|
|
12
|
-
commitMethod: INPUT_METHOD.PICKER | INPUT_METHOD.BLUR | INPUT_METHOD.KEYBOARD;
|
|
13
|
-
isValid: true | false;
|
|
14
|
-
isToday: true | false;
|
|
15
|
-
}, undefined>;
|
|
16
|
-
export declare type DateEventPayload = TypeDateStartedAEP | TypeDateFinishedAEP | IncrementDateSegmentAEP | DecrementDateSegmentAEP | CommitDateAEP;
|
|
17
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UIAEP, TrackAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
3
|
-
declare type OpenAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.ELEMENT_BROWSER, undefined, {
|
|
4
|
-
mode: 'full' | 'inline';
|
|
5
|
-
}, undefined>;
|
|
6
|
-
declare type CloseAEP = UIAEP<ACTION.CLOSED, ACTION_SUBJECT.ELEMENT_BROWSER, undefined, {
|
|
7
|
-
mode: 'full' | 'inline';
|
|
8
|
-
}, undefined>;
|
|
9
|
-
declare type ClickedElementBrowserCategory = TrackAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.BUTTON_CATEGORY, any, undefined>;
|
|
10
|
-
export declare type ElementBrowserEventPayload = OpenAEP | CloseAEP | ClickedElementBrowserCategory;
|
|
11
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UIAEP, TrackAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, TRIGGER_METHOD } from './enums';
|
|
3
|
-
declare type ActivateAEP = UIAEP<ACTION.ACTIVATED, ACTION_SUBJECT.FIND_REPLACE_DIALOG, undefined, {
|
|
4
|
-
inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.PREFILL;
|
|
5
|
-
triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR;
|
|
6
|
-
}, undefined>;
|
|
7
|
-
declare type DeactivateAEP = UIAEP<ACTION.DEACTIVATED, ACTION_SUBJECT.FIND_REPLACE_DIALOG, undefined, {
|
|
8
|
-
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
|
|
9
|
-
}, undefined>;
|
|
10
|
-
declare type FindAEP = TrackAEP<ACTION.FIND_PERFORMED, ACTION_SUBJECT.TEXT, undefined, undefined, undefined>;
|
|
11
|
-
declare type FindNextAEP = TrackAEP<ACTION.FIND_NEXT_PERFORMED, ACTION_SUBJECT.TEXT, undefined, {
|
|
12
|
-
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
13
|
-
}, undefined>;
|
|
14
|
-
declare type FindPrevAEP = TrackAEP<ACTION.FIND_PREV_PERFORMED, ACTION_SUBJECT.TEXT, undefined, {
|
|
15
|
-
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
16
|
-
}, undefined>;
|
|
17
|
-
declare type ReplaceTextChangeAEP = TrackAEP<ACTION.CHANGED_REPLACEMENT_TEXT, ACTION_SUBJECT.FIND_REPLACE_DIALOG, undefined, undefined, undefined>;
|
|
18
|
-
declare type ReplaceOneAEP = TrackAEP<ACTION.REPLACED_ONE, ACTION_SUBJECT.TEXT, undefined, {
|
|
19
|
-
triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
|
|
20
|
-
}, undefined>;
|
|
21
|
-
declare type ReplaceAllAEP = TrackAEP<ACTION.REPLACED_ALL, ACTION_SUBJECT.TEXT, undefined, undefined, undefined>;
|
|
22
|
-
export declare type FindReplaceEventPayload = ActivateAEP | DeactivateAEP | FindAEP | FindNextAEP | FindPrevAEP | ReplaceTextChangeAEP | ReplaceOneAEP | ReplaceAllAEP;
|
|
23
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { TrackAEP } from './utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
3
|
-
import { HeadingLevelsAndNormalText } from '../../block-type/types';
|
|
4
|
-
export declare enum INDENT_DIRECTION {
|
|
5
|
-
INDENT = "indent",
|
|
6
|
-
OUTDENT = "outdent"
|
|
7
|
-
}
|
|
8
|
-
export declare enum INDENT_TYPE {
|
|
9
|
-
PARAGRAPH = "paragraph",
|
|
10
|
-
LIST = "list",
|
|
11
|
-
HEADING = "heading",
|
|
12
|
-
CODE_BLOCK = "codeBlock",
|
|
13
|
-
TASK_LIST = "taskList"
|
|
14
|
-
}
|
|
15
|
-
declare type FormatAEP<ActionSubjectID, Attributes> = TrackAEP<ACTION.FORMATTED, ACTION_SUBJECT.TEXT, ActionSubjectID, Attributes, undefined>;
|
|
16
|
-
declare type FormatBasicAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_STRONG | ACTION_SUBJECT_ID.FORMAT_ITALIC | ACTION_SUBJECT_ID.FORMAT_UNDERLINE | ACTION_SUBJECT_ID.FORMAT_CODE | ACTION_SUBJECT_ID.FORMAT_STRIKE, {
|
|
17
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING | INPUT_METHOD.FLOATING_TB;
|
|
18
|
-
}>;
|
|
19
|
-
declare type FormatSuperSubAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_SUPER | ACTION_SUBJECT_ID.FORMAT_SUB, {
|
|
20
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING;
|
|
21
|
-
}>;
|
|
22
|
-
declare type FormatIndentationAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_INDENT, {
|
|
23
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.KEYBOARD;
|
|
24
|
-
direction: INDENT_DIRECTION.INDENT | INDENT_DIRECTION.OUTDENT;
|
|
25
|
-
previousIndentationLevel: number;
|
|
26
|
-
newIndentLevel: number;
|
|
27
|
-
indentType: INDENT_TYPE.PARAGRAPH | INDENT_TYPE.LIST | INDENT_TYPE.HEADING | INDENT_TYPE.CODE_BLOCK | INDENT_TYPE.TASK_LIST;
|
|
28
|
-
}>;
|
|
29
|
-
declare type FormatHeadingAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_HEADING, {
|
|
30
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT;
|
|
31
|
-
newHeadingLevel: HeadingLevelsAndNormalText;
|
|
32
|
-
previousHeadingLevel?: HeadingLevelsAndNormalText;
|
|
33
|
-
}>;
|
|
34
|
-
declare type FormatBlockQuoteAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_BLOCK_QUOTE, {
|
|
35
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT;
|
|
36
|
-
}>;
|
|
37
|
-
declare type FormatClearAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_CLEAR, {
|
|
38
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
39
|
-
formattingCleared: string[];
|
|
40
|
-
}>;
|
|
41
|
-
declare type FormatColorAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_COLOR, {
|
|
42
|
-
newColor: string;
|
|
43
|
-
previousColor: string;
|
|
44
|
-
}>;
|
|
45
|
-
declare type FormatListAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER | ACTION_SUBJECT_ID.FORMAT_LIST_BULLET, {
|
|
46
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT;
|
|
47
|
-
}>;
|
|
48
|
-
export declare type FormatEventPayload = FormatBasicAEP | FormatSuperSubAEP | FormatIndentationAEP | FormatHeadingAEP | FormatBlockQuoteAEP | FormatClearAEP | FormatColorAEP | FormatListAEP;
|
|
49
|
-
export {};
|