@atlaskit/editor-core 148.0.0 → 149.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +110 -0
- package/dist/cjs/create-editor/create-plugins-list.js +6 -1
- package/dist/cjs/editor.js +1 -4
- package/dist/cjs/index.js +24 -40
- package/dist/cjs/labs/next/presets/default.js +1 -1
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/nodeviews/SelectionBasedNodeView.js +1 -2
- package/dist/cjs/plugins/analytics/plugin.js +9 -7
- package/dist/cjs/plugins/analytics/types/enums.js +5 -0
- package/dist/cjs/plugins/analytics/types/type-ahead.js +5 -0
- package/dist/cjs/plugins/block-type/messages.js +10 -0
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +1 -3
- package/dist/cjs/plugins/collab-edit/participants.js +15 -0
- package/dist/cjs/plugins/collab-edit/plugin-state.js +14 -0
- package/dist/cjs/plugins/collab-edit/ui/avatars-with-plugin-state.js +6 -4
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +19 -2
- package/dist/cjs/plugins/collab-edit/utils.js +42 -2
- package/dist/cjs/plugins/date/actions.js +4 -2
- package/dist/cjs/plugins/date/index.js +1 -1
- package/dist/cjs/plugins/date/pm-plugins/utils.js +6 -1
- package/dist/cjs/plugins/emoji/index.js +143 -120
- package/dist/cjs/plugins/emoji/pm-plugins/ascii-input-rules.js +0 -14
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +3 -7
- package/dist/cjs/plugins/extension/actions.js +16 -16
- package/dist/cjs/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +5 -4
- package/dist/cjs/plugins/extension/ui/Extension/index.js +2 -2
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ConfirmationModal.js +12 -14
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +35 -0
- package/dist/cjs/plugins/floating-toolbar/ui/EditorHideEmojiIcon.js +38 -0
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +5 -7
- package/dist/cjs/plugins/help-dialog/ui/index.js +12 -18
- package/dist/cjs/plugins/help-dialog/ui/styles.js +2 -6
- package/dist/cjs/plugins/hyperlink/index.js +4 -10
- package/dist/cjs/plugins/insert-block/index.js +9 -8
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +7 -3
- package/dist/cjs/plugins/list/index.js +5 -0
- package/dist/cjs/plugins/macro/actions.js +14 -14
- package/dist/cjs/plugins/media/index.js +1 -0
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +1 -0
- package/dist/cjs/plugins/media/pm-plugins/main.js +26 -14
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +86 -0
- package/dist/cjs/plugins/media/toolbar/index.js +161 -44
- package/dist/cjs/plugins/media/toolbar/utils.js +77 -0
- package/dist/cjs/plugins/mentions/index.js +57 -602
- package/dist/cjs/plugins/mentions/pm-plugins/key.js +11 -0
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +162 -0
- package/dist/cjs/plugins/mentions/pm-plugins/utils.js +12 -0
- package/dist/cjs/plugins/mentions/type-ahead/index.js +449 -0
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +8 -3
- package/dist/cjs/plugins/mentions/ui/ToolbarMention/index.js +3 -3
- package/dist/cjs/plugins/mentions/utils.js +24 -2
- package/dist/cjs/plugins/panel/index.js +46 -13
- package/dist/cjs/plugins/panel/nodeviews/panel.js +39 -25
- package/dist/cjs/plugins/panel/toolbar.js +94 -6
- package/dist/cjs/plugins/panel/toolbar.test.js +149 -16
- package/dist/cjs/plugins/paste/handlers.js +2 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +6 -3
- package/dist/cjs/plugins/placeholder/index.js +6 -0
- package/dist/cjs/plugins/quick-insert/api.js +30 -0
- package/dist/cjs/plugins/quick-insert/assets/custom-panel.js +55 -0
- package/dist/cjs/plugins/quick-insert/assets/index.js +14 -1
- package/dist/cjs/plugins/quick-insert/index.js +10 -24
- package/dist/cjs/plugins/quick-insert/ui/ModalElementBrowser/index.js +1 -0
- package/dist/cjs/plugins/rank.js +1 -1
- package/dist/cjs/plugins/rule/index.js +1 -25
- package/dist/cjs/plugins/scroll-into-view/index.js +1 -4
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +5 -6
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +1 -3
- package/dist/cjs/plugins/status/actions.js +5 -2
- package/dist/cjs/plugins/status/plugin.js +1 -1
- package/dist/cjs/plugins/table/commands/selection.js +24 -24
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +8 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +14 -15
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +3 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +3 -1
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
- package/dist/cjs/plugins/text-formatting/pm-plugins/cursor.js +1 -4
- package/dist/cjs/plugins/type-ahead/api.js +243 -0
- package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +238 -0
- package/dist/cjs/plugins/type-ahead/commands/update-list-items.js +30 -0
- package/dist/cjs/plugins/type-ahead/commands/update-query.js +16 -18
- package/dist/cjs/plugins/type-ahead/commands/update-selected-index.js +36 -0
- package/dist/cjs/plugins/type-ahead/constants.js +25 -0
- package/dist/cjs/plugins/type-ahead/index.js +183 -52
- package/dist/cjs/plugins/type-ahead/insert-utils.js +132 -0
- package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +12 -9
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +238 -0
- package/dist/cjs/plugins/type-ahead/pm-plugins/input-rules.js +20 -40
- package/dist/cjs/plugins/type-ahead/pm-plugins/insert-item-plugin.js +28 -0
- package/dist/cjs/plugins/type-ahead/pm-plugins/{plugin-key.js → key.js} +0 -0
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +79 -424
- package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +188 -0
- package/dist/cjs/plugins/type-ahead/pm-plugins/utils.js +26 -0
- package/dist/cjs/plugins/type-ahead/stats-modifier.js +49 -0
- package/dist/cjs/plugins/type-ahead/transforms/close-type-ahead.js +18 -0
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +51 -0
- package/dist/cjs/plugins/type-ahead/transforms/set-selection-before-query.js +24 -0
- package/dist/cjs/plugins/type-ahead/ui/DynamicHeightListItem.js +77 -0
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +325 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +195 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +141 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +141 -0
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +151 -0
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.js +118 -0
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-item-insert.js +132 -0
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-load-items.js +61 -0
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-on-force-select.js +50 -0
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-resize-observer.js +70 -0
- package/dist/cjs/plugins/type-ahead/utils.js +127 -0
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +33 -2
- package/dist/cjs/plugins/view-update-subscription/index.js +19 -14
- package/dist/cjs/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.js +10 -3
- package/dist/cjs/plugins/view-update-subscription/subscribe/type-ahead-updates.js +46 -0
- package/dist/cjs/test-utils.js +17 -0
- package/dist/cjs/types/empty-state-handler.js +5 -0
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +4 -21
- package/dist/cjs/ui/ElementBrowser/ElementBrowser.js +4 -2
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +16 -23
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +11 -4
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +12 -4
- package/dist/cjs/ui/PanelTextInput/index.js +1 -3
- package/dist/cjs/utils/compare.js +7 -7
- package/dist/cjs/utils/index.js +7 -8
- package/dist/cjs/utils/rich-media-utils.js +2 -2
- package/dist/cjs/utils/selection.js +6 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +6 -1
- package/dist/es2019/editor.js +1 -4
- package/dist/es2019/index.js +4 -6
- package/dist/es2019/labs/next/presets/default.js +2 -2
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/nodeviews/SelectionBasedNodeView.js +1 -2
- package/dist/es2019/plugins/analytics/plugin.js +5 -1
- package/dist/es2019/plugins/analytics/types/enums.js +5 -0
- package/dist/es2019/plugins/analytics/types/type-ahead.js +1 -0
- package/dist/es2019/plugins/block-type/messages.js +10 -0
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -3
- package/dist/es2019/plugins/collab-edit/participants.js +14 -0
- package/dist/es2019/plugins/collab-edit/plugin-state.js +17 -1
- package/dist/es2019/plugins/collab-edit/ui/avatars-with-plugin-state.js +6 -4
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +17 -2
- package/dist/es2019/plugins/collab-edit/utils.js +34 -0
- package/dist/es2019/plugins/date/actions.js +4 -2
- package/dist/es2019/plugins/date/index.js +1 -1
- package/dist/es2019/plugins/date/pm-plugins/utils.js +6 -1
- package/dist/es2019/plugins/emoji/index.js +169 -146
- package/dist/es2019/plugins/emoji/pm-plugins/ascii-input-rules.js +0 -11
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +3 -6
- package/dist/es2019/plugins/extension/actions.js +16 -16
- package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +5 -4
- package/dist/es2019/plugins/extension/ui/Extension/index.js +2 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/ConfirmationModal.js +12 -15
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +25 -0
- package/dist/es2019/plugins/floating-toolbar/ui/EditorHideEmojiIcon.js +28 -0
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +3 -5
- package/dist/es2019/plugins/help-dialog/ui/index.js +20 -26
- package/dist/es2019/plugins/help-dialog/ui/styles.js +2 -2
- package/dist/es2019/plugins/hyperlink/index.js +4 -12
- package/dist/es2019/plugins/insert-block/index.js +4 -4
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +8 -4
- package/dist/es2019/plugins/list/index.js +20 -14
- package/dist/es2019/plugins/macro/actions.js +14 -14
- package/dist/es2019/plugins/media/index.js +1 -0
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +1 -0
- package/dist/es2019/plugins/media/pm-plugins/main.js +27 -12
- package/dist/es2019/plugins/media/styles.js +7 -2
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +59 -0
- package/dist/es2019/plugins/media/toolbar/index.js +158 -42
- package/dist/es2019/plugins/media/toolbar/utils.js +32 -0
- package/dist/es2019/plugins/mentions/index.js +34 -536
- package/dist/es2019/plugins/mentions/pm-plugins/key.js +2 -0
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +138 -0
- package/dist/es2019/plugins/mentions/pm-plugins/utils.js +4 -0
- package/dist/es2019/plugins/mentions/type-ahead/index.js +394 -0
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +4 -2
- package/dist/es2019/plugins/mentions/ui/ToolbarMention/index.js +2 -2
- package/dist/es2019/plugins/mentions/utils.js +20 -1
- package/dist/es2019/plugins/panel/index.js +95 -62
- package/dist/es2019/plugins/panel/nodeviews/panel.js +7 -1
- package/dist/es2019/plugins/panel/toolbar.js +90 -6
- package/dist/es2019/plugins/panel/toolbar.test.js +131 -14
- package/dist/es2019/plugins/paste/handlers.js +2 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +6 -3
- package/dist/es2019/plugins/placeholder/index.js +5 -0
- package/dist/es2019/plugins/quick-insert/api.js +18 -0
- package/dist/es2019/plugins/quick-insert/assets/custom-panel.js +45 -0
- package/dist/es2019/plugins/quick-insert/assets/index.js +6 -0
- package/dist/es2019/plugins/quick-insert/index.js +12 -23
- package/dist/es2019/plugins/quick-insert/search.js +1 -3
- package/dist/es2019/plugins/quick-insert/ui/ModalElementBrowser/index.js +1 -0
- package/dist/es2019/plugins/rank.js +1 -1
- package/dist/es2019/plugins/rule/index.js +1 -22
- package/dist/es2019/plugins/scroll-into-view/index.js +1 -3
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +5 -6
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +1 -3
- package/dist/es2019/plugins/status/actions.js +5 -2
- package/dist/es2019/plugins/status/plugin.js +1 -1
- package/dist/es2019/plugins/table/commands/selection.js +25 -25
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +8 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +14 -15
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +2 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +2 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
- package/dist/es2019/plugins/text-formatting/pm-plugins/cursor.js +1 -4
- package/dist/es2019/plugins/type-ahead/api.js +224 -0
- package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +222 -0
- package/dist/es2019/plugins/type-ahead/commands/update-list-items.js +19 -0
- package/dist/es2019/plugins/type-ahead/commands/update-query.js +17 -15
- package/dist/es2019/plugins/type-ahead/commands/update-selected-index.js +25 -0
- package/dist/es2019/plugins/type-ahead/constants.js +15 -0
- package/dist/es2019/plugins/type-ahead/index.js +203 -78
- package/dist/es2019/plugins/type-ahead/insert-utils.js +119 -0
- package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +11 -8
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +211 -0
- package/dist/es2019/plugins/type-ahead/pm-plugins/input-rules.js +18 -32
- package/dist/es2019/plugins/type-ahead/pm-plugins/insert-item-plugin.js +19 -0
- package/dist/es2019/plugins/type-ahead/pm-plugins/{plugin-key.js → key.js} +0 -0
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +81 -401
- package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +165 -0
- package/dist/es2019/plugins/type-ahead/pm-plugins/utils.js +16 -0
- package/dist/es2019/plugins/type-ahead/stats-modifier.js +41 -0
- package/dist/es2019/plugins/type-ahead/transforms/close-type-ahead.js +7 -0
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +40 -0
- package/dist/es2019/plugins/type-ahead/transforms/set-selection-before-query.js +11 -0
- package/dist/es2019/plugins/type-ahead/ui/DynamicHeightListItem.js +51 -0
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +307 -0
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +163 -0
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +136 -0
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +120 -0
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +110 -0
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.js +97 -0
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-item-insert.js +126 -0
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-load-items.js +43 -0
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-on-force-select.js +41 -0
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-resize-observer.js +53 -0
- package/dist/es2019/plugins/type-ahead/utils.js +93 -0
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +29 -2
- package/dist/es2019/plugins/view-update-subscription/index.js +19 -14
- package/dist/es2019/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.js +9 -3
- package/dist/es2019/plugins/view-update-subscription/subscribe/type-ahead-updates.js +34 -0
- package/dist/es2019/test-utils.js +7 -0
- package/dist/es2019/types/empty-state-handler.js +1 -0
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +4 -8
- package/dist/es2019/ui/ConfigPanel/transformers.js +9 -9
- package/dist/es2019/ui/ElementBrowser/ElementBrowser.js +4 -2
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +20 -21
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +9 -2
- package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +12 -4
- package/dist/es2019/ui/PanelTextInput/index.js +1 -3
- package/dist/es2019/utils/compare.js +7 -7
- package/dist/es2019/utils/index.js +7 -8
- package/dist/es2019/utils/rich-media-utils.js +2 -2
- package/dist/es2019/utils/selection.js +6 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +6 -1
- package/dist/esm/editor.js +1 -4
- package/dist/esm/index.js +4 -6
- package/dist/esm/labs/next/presets/default.js +2 -2
- package/dist/esm/messages.js +5 -0
- package/dist/esm/nodeviews/SelectionBasedNodeView.js +1 -2
- package/dist/esm/plugins/analytics/plugin.js +8 -6
- package/dist/esm/plugins/analytics/types/enums.js +5 -0
- package/dist/esm/plugins/analytics/types/type-ahead.js +1 -0
- package/dist/esm/plugins/block-type/messages.js +10 -0
- package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -3
- package/dist/esm/plugins/collab-edit/participants.js +15 -0
- package/dist/esm/plugins/collab-edit/plugin-state.js +15 -1
- package/dist/esm/plugins/collab-edit/ui/avatars-with-plugin-state.js +6 -4
- package/dist/esm/plugins/collab-edit/ui/avatars.js +17 -2
- package/dist/esm/plugins/collab-edit/utils.js +32 -0
- package/dist/esm/plugins/date/actions.js +4 -2
- package/dist/esm/plugins/date/index.js +1 -1
- package/dist/esm/plugins/date/pm-plugins/utils.js +6 -1
- package/dist/esm/plugins/emoji/index.js +136 -112
- package/dist/esm/plugins/emoji/pm-plugins/ascii-input-rules.js +0 -13
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +3 -6
- package/dist/esm/plugins/extension/actions.js +16 -16
- package/dist/esm/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +5 -4
- package/dist/esm/plugins/extension/ui/Extension/index.js +2 -2
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/ConfirmationModal.js +12 -15
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +25 -0
- package/dist/esm/plugins/floating-toolbar/ui/EditorHideEmojiIcon.js +28 -0
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +3 -5
- package/dist/esm/plugins/help-dialog/ui/index.js +13 -19
- package/dist/esm/plugins/help-dialog/ui/styles.js +2 -6
- package/dist/esm/plugins/hyperlink/index.js +4 -10
- package/dist/esm/plugins/insert-block/index.js +5 -5
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +8 -4
- package/dist/esm/plugins/list/index.js +5 -0
- package/dist/esm/plugins/macro/actions.js +14 -14
- package/dist/esm/plugins/media/index.js +1 -0
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -0
- package/dist/esm/plugins/media/pm-plugins/main.js +27 -14
- package/dist/esm/plugins/media/styles.js +2 -2
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +62 -0
- package/dist/esm/plugins/media/toolbar/index.js +154 -43
- package/dist/esm/plugins/media/toolbar/utils.js +60 -0
- package/dist/esm/plugins/mentions/index.js +45 -557
- package/dist/esm/plugins/mentions/pm-plugins/key.js +2 -0
- package/dist/esm/plugins/mentions/pm-plugins/main.js +145 -0
- package/dist/esm/plugins/mentions/pm-plugins/utils.js +4 -0
- package/dist/esm/plugins/mentions/type-ahead/index.js +415 -0
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +4 -2
- package/dist/esm/plugins/mentions/ui/ToolbarMention/index.js +2 -2
- package/dist/esm/plugins/mentions/utils.js +19 -0
- package/dist/esm/plugins/panel/index.js +44 -13
- package/dist/esm/plugins/panel/nodeviews/panel.js +36 -22
- package/dist/esm/plugins/panel/toolbar.js +92 -6
- package/dist/esm/plugins/panel/toolbar.test.js +148 -16
- package/dist/esm/plugins/paste/handlers.js +2 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -3
- package/dist/esm/plugins/placeholder/index.js +5 -0
- package/dist/esm/plugins/quick-insert/api.js +20 -0
- package/dist/esm/plugins/quick-insert/assets/custom-panel.js +45 -0
- package/dist/esm/plugins/quick-insert/assets/index.js +12 -0
- package/dist/esm/plugins/quick-insert/index.js +10 -24
- package/dist/esm/plugins/quick-insert/search.js +1 -3
- package/dist/esm/plugins/quick-insert/ui/ModalElementBrowser/index.js +1 -0
- package/dist/esm/plugins/rank.js +1 -1
- package/dist/esm/plugins/rule/index.js +1 -22
- package/dist/esm/plugins/scroll-into-view/index.js +1 -3
- package/dist/esm/plugins/selection/gap-cursor/actions.js +5 -6
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +1 -3
- package/dist/esm/plugins/status/actions.js +5 -2
- package/dist/esm/plugins/status/plugin.js +1 -1
- package/dist/esm/plugins/table/commands/selection.js +24 -24
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +8 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +14 -15
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +2 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +2 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
- package/dist/esm/plugins/text-formatting/pm-plugins/cursor.js +1 -4
- package/dist/esm/plugins/type-ahead/api.js +228 -0
- package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +217 -0
- package/dist/esm/plugins/type-ahead/commands/update-list-items.js +19 -0
- package/dist/esm/plugins/type-ahead/commands/update-query.js +13 -13
- package/dist/esm/plugins/type-ahead/commands/update-selected-index.js +25 -0
- package/dist/esm/plugins/type-ahead/constants.js +15 -0
- package/dist/esm/plugins/type-ahead/index.js +173 -53
- package/dist/esm/plugins/type-ahead/insert-utils.js +116 -0
- package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +11 -8
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +204 -0
- package/dist/esm/plugins/type-ahead/pm-plugins/input-rules.js +18 -33
- package/dist/esm/plugins/type-ahead/pm-plugins/insert-item-plugin.js +18 -0
- package/dist/esm/plugins/type-ahead/pm-plugins/{plugin-key.js → key.js} +0 -0
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +80 -393
- package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +168 -0
- package/dist/esm/plugins/type-ahead/pm-plugins/utils.js +16 -0
- package/dist/esm/plugins/type-ahead/stats-modifier.js +43 -0
- package/dist/esm/plugins/type-ahead/transforms/close-type-ahead.js +7 -0
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +39 -0
- package/dist/esm/plugins/type-ahead/transforms/set-selection-before-query.js +13 -0
- package/dist/esm/plugins/type-ahead/ui/DynamicHeightListItem.js +51 -0
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +302 -0
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +168 -0
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +105 -0
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +114 -0
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +125 -0
- package/dist/esm/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.js +101 -0
- package/dist/esm/plugins/type-ahead/ui/hooks/use-item-insert.js +118 -0
- package/dist/esm/plugins/type-ahead/ui/hooks/use-load-items.js +46 -0
- package/dist/esm/plugins/type-ahead/ui/hooks/use-on-force-select.js +38 -0
- package/dist/esm/plugins/type-ahead/ui/hooks/use-resize-observer.js +48 -0
- package/dist/esm/plugins/type-ahead/utils.js +88 -0
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +33 -2
- package/dist/esm/plugins/view-update-subscription/index.js +19 -14
- package/dist/esm/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.js +10 -3
- package/dist/esm/plugins/view-update-subscription/subscribe/type-ahead-updates.js +33 -0
- package/dist/esm/test-utils.js +7 -0
- package/dist/esm/types/empty-state-handler.js +1 -0
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +4 -14
- package/dist/esm/ui/ElementBrowser/ElementBrowser.js +4 -2
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +16 -23
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +10 -3
- package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +12 -4
- package/dist/esm/ui/PanelTextInput/index.js +1 -3
- package/dist/esm/utils/compare.js +7 -7
- package/dist/esm/utils/index.js +7 -8
- package/dist/esm/utils/rich-media-utils.js +2 -2
- package/dist/esm/utils/selection.js +6 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/index.d.ts +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/index.d.ts +3 -5
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/labs/next/mobile.d.ts +1 -1
- package/dist/types/labs/next/presets/default.d.ts +2 -0
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/plugins/alignment/commands/index.d.ts +2 -2
- package/dist/types/plugins/analytics/types/enums.d.ts +6 -1
- package/dist/types/plugins/analytics/types/events.d.ts +12 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +2 -23
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +27 -0
- package/dist/types/plugins/block-type/messages.d.ts +10 -0
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/plugins/collab-edit/participants.d.ts +1 -0
- package/dist/types/plugins/collab-edit/ui/avatars.d.ts +3 -1
- package/dist/types/plugins/collab-edit/ui/invite-to-edit.d.ts +1 -1
- package/dist/types/plugins/collab-edit/utils.d.ts +4 -2
- package/dist/types/plugins/date/actions.d.ts +1 -1
- package/dist/types/plugins/date/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/emoji/index.d.ts +2 -4
- package/dist/types/plugins/emoji/types.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +2 -3
- package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -3
- package/dist/types/plugins/extension/ui/Extension/index.d.ts +2 -3
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/find-replace/ui/styles.d.ts +3 -3
- package/dist/types/plugins/floating-toolbar/ui/EditorEmojiAddIcon.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/ui/EditorHideEmojiIcon.d.ts +1 -0
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/media/toolbar/filePreviewItem.d.ts +7 -0
- package/dist/types/plugins/media/toolbar/utils.d.ts +4 -0
- package/dist/types/plugins/media/types.d.ts +3 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-single.d.ts +1 -1
- package/dist/types/plugins/mentions/analytics.d.ts +1 -1
- package/dist/types/plugins/mentions/index.d.ts +4 -30
- package/dist/types/plugins/mentions/pm-plugins/key.d.ts +3 -0
- package/dist/types/plugins/mentions/pm-plugins/main.d.ts +8 -0
- package/dist/types/plugins/mentions/pm-plugins/utils.d.ts +3 -0
- package/dist/types/plugins/mentions/type-ahead/index.d.ts +17 -0
- package/dist/types/plugins/mentions/types.d.ts +2 -0
- package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +1 -0
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +2 -0
- package/dist/types/plugins/mentions/utils.d.ts +4 -0
- package/dist/types/plugins/panel/nodeviews/panel.d.ts +19 -3
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +2 -0
- package/dist/types/plugins/quick-insert/api.d.ts +6 -0
- package/dist/types/plugins/quick-insert/assets/custom-panel.d.ts +1 -0
- package/dist/types/plugins/quick-insert/assets/index.d.ts +1 -0
- package/dist/types/plugins/quick-insert/search.d.ts +1 -1
- package/dist/types/plugins/quick-insert/types.d.ts +3 -0
- package/dist/types/plugins/status/actions.d.ts +3 -1
- package/dist/types/plugins/status/ui/statusPicker.d.ts +1 -1
- package/dist/types/plugins/type-ahead/api.d.ts +53 -0
- package/dist/types/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +12 -0
- package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +3 -0
- package/dist/types/plugins/type-ahead/commands/update-query.d.ts +2 -2
- package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +2 -0
- package/dist/types/plugins/type-ahead/constants.d.ts +10 -0
- package/dist/types/plugins/type-ahead/index.d.ts +5 -4
- package/dist/types/plugins/type-ahead/insert-utils.d.ts +18 -0
- package/dist/types/plugins/type-ahead/pm-plugins/actions.d.ts +9 -8
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +24 -0
- package/dist/types/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -1
- package/dist/types/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +2 -0
- package/dist/types/plugins/type-ahead/pm-plugins/{plugin-key.d.ts → key.d.ts} +0 -0
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +12 -39
- package/dist/types/plugins/type-ahead/pm-plugins/reducer.d.ts +10 -0
- package/dist/types/plugins/type-ahead/pm-plugins/utils.d.ts +4 -0
- package/dist/types/plugins/type-ahead/stats-modifier.d.ts +20 -0
- package/dist/types/plugins/type-ahead/transforms/close-type-ahead.d.ts +2 -0
- package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +9 -0
- package/dist/types/plugins/type-ahead/transforms/set-selection-before-query.d.ts +2 -0
- package/dist/types/plugins/type-ahead/types.d.ts +95 -30
- package/dist/types/plugins/type-ahead/ui/DynamicHeightListItem.d.ts +21 -0
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +22 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +11 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +15 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +22 -0
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +20 -0
- package/dist/types/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.d.ts +25 -0
- package/dist/types/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +3 -0
- package/dist/types/plugins/type-ahead/ui/hooks/use-load-items.d.ts +3 -0
- package/dist/types/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +11 -0
- package/dist/types/plugins/type-ahead/ui/hooks/use-resize-observer.d.ts +9 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +18 -0
- package/dist/types/plugins/view-update-subscription/subscribe/type-ahead-updates.d.ts +9 -0
- package/dist/types/test-utils.d.ts +2 -0
- package/dist/types/types/editor-props.d.ts +2 -0
- package/dist/types/types/empty-state-handler.d.ts +7 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/ElementBrowser.d.ts +2 -0
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +2 -0
- package/dist/types/ui/ElementBrowser/components/CategoryList.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +5 -1
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +3 -1
- package/dist/types/ui/LinkSearch/index.d.ts +20 -20
- package/dist/types/ui/PortalProvider/index.d.ts +1 -1
- package/dist/types/ui/ToolbarButton/index.d.ts +4 -4
- package/dist/types/ui/ToolbarButton/styles.d.ts +2 -2
- package/dist/types/utils/selection.d.ts +2 -2
- package/package.json +32 -29
- package/dist/cjs/plugins/emoji/commands/insert-emoji-query.js +0 -22
- package/dist/cjs/plugins/mentions/commands/insert-mention-query.js +0 -22
- package/dist/cjs/plugins/type-ahead/commands/dismiss.js +0 -44
- package/dist/cjs/plugins/type-ahead/commands/insert-query.js +0 -38
- package/dist/cjs/plugins/type-ahead/commands/items-list-updated.js +0 -25
- package/dist/cjs/plugins/type-ahead/commands/select-item.js +0 -163
- package/dist/cjs/plugins/type-ahead/commands/set-current-index.js +0 -25
- package/dist/cjs/plugins/type-ahead/pm-plugins/keymap.js +0 -115
- package/dist/cjs/plugins/type-ahead/ui/TypeAhead.js +0 -221
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadItemsList.js +0 -239
- package/dist/cjs/plugins/type-ahead/utils/find-query-mark.js +0 -33
- package/dist/cjs/plugins/type-ahead/utils/is-query-active.js +0 -16
- package/dist/es2019/plugins/emoji/commands/insert-emoji-query.js +0 -13
- package/dist/es2019/plugins/mentions/commands/insert-mention-query.js +0 -13
- package/dist/es2019/plugins/type-ahead/commands/dismiss.js +0 -36
- package/dist/es2019/plugins/type-ahead/commands/insert-query.js +0 -26
- package/dist/es2019/plugins/type-ahead/commands/items-list-updated.js +0 -12
- package/dist/es2019/plugins/type-ahead/commands/select-item.js +0 -119
- package/dist/es2019/plugins/type-ahead/commands/set-current-index.js +0 -13
- package/dist/es2019/plugins/type-ahead/pm-plugins/keymap.js +0 -94
- package/dist/es2019/plugins/type-ahead/ui/TypeAhead.js +0 -175
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadItemsList.js +0 -196
- package/dist/es2019/plugins/type-ahead/utils/find-query-mark.js +0 -29
- package/dist/es2019/plugins/type-ahead/utils/is-query-active.js +0 -9
- package/dist/esm/plugins/emoji/commands/insert-emoji-query.js +0 -13
- package/dist/esm/plugins/mentions/commands/insert-mention-query.js +0 -13
- package/dist/esm/plugins/type-ahead/commands/dismiss.js +0 -33
- package/dist/esm/plugins/type-ahead/commands/insert-query.js +0 -26
- package/dist/esm/plugins/type-ahead/commands/items-list-updated.js +0 -14
- package/dist/esm/plugins/type-ahead/commands/select-item.js +0 -132
- package/dist/esm/plugins/type-ahead/commands/set-current-index.js +0 -15
- package/dist/esm/plugins/type-ahead/pm-plugins/keymap.js +0 -94
- package/dist/esm/plugins/type-ahead/ui/TypeAhead.js +0 -202
- package/dist/esm/plugins/type-ahead/ui/TypeAheadItemsList.js +0 -204
- package/dist/esm/plugins/type-ahead/utils/find-query-mark.js +0 -24
- package/dist/esm/plugins/type-ahead/utils/is-query-active.js +0 -9
- package/dist/types/plugins/emoji/commands/insert-emoji-query.d.ts +0 -2
- package/dist/types/plugins/mentions/commands/insert-mention-query.d.ts +0 -2
- package/dist/types/plugins/type-ahead/commands/dismiss.d.ts +0 -2
- package/dist/types/plugins/type-ahead/commands/insert-query.d.ts +0 -2
- package/dist/types/plugins/type-ahead/commands/items-list-updated.d.ts +0 -3
- package/dist/types/plugins/type-ahead/commands/select-item.d.ts +0 -9
- package/dist/types/plugins/type-ahead/commands/set-current-index.d.ts +0 -2
- package/dist/types/plugins/type-ahead/pm-plugins/keymap.d.ts +0 -3
- package/dist/types/plugins/type-ahead/ui/TypeAhead.d.ts +0 -37
- package/dist/types/plugins/type-ahead/ui/TypeAheadItemsList.d.ts +0 -32
- package/dist/types/plugins/type-ahead/utils/find-query-mark.d.ts +0 -10
- package/dist/types/plugins/type-ahead/utils/is-query-active.d.ts +0 -2
|
@@ -1,46 +1,111 @@
|
|
|
1
|
-
import { Node } from 'prosemirror-model';
|
|
1
|
+
import { Node as PMNode, Fragment } from 'prosemirror-model';
|
|
2
|
+
import type { DecorationSet } from 'prosemirror-view';
|
|
3
|
+
import type { TypeAheadItem, TypeAheadItemRenderProps } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
+
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
2
5
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
6
|
+
import type { INPUT_METHOD } from '../analytics/types/enums';
|
|
7
|
+
import type { TypeAheadPayload } from '../analytics/types/type-ahead';
|
|
8
|
+
import type { CloseSelectionOptions } from './constants';
|
|
9
|
+
import type { UiComponentFactoryParams } from '../../types/ui-components';
|
|
10
|
+
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
11
|
+
export type { TypeAheadItem, TypeAheadItemRenderProps };
|
|
12
|
+
export declare type TypeAheadInsert = (node?: PMNode | Object | string | Fragment, opts?: {
|
|
9
13
|
selectInlineNode?: boolean;
|
|
10
14
|
}) => Transaction;
|
|
15
|
+
export declare type OnSelectItem = (props: {
|
|
16
|
+
index: number;
|
|
17
|
+
item: TypeAheadItem;
|
|
18
|
+
}) => void;
|
|
19
|
+
export interface TypeAheadStats {
|
|
20
|
+
startedAt: number;
|
|
21
|
+
endedAt: number;
|
|
22
|
+
keyCount: {
|
|
23
|
+
arrowUp: number;
|
|
24
|
+
arrowDown: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface TypeAheadStatsSerializable extends TypeAheadStats {
|
|
28
|
+
serialize: () => TypeAheadStats;
|
|
29
|
+
}
|
|
30
|
+
export interface TypeAheadStatsModifier extends TypeAheadStatsSerializable {
|
|
31
|
+
increaseArrowUp: () => void;
|
|
32
|
+
increaseArrowDown: () => void;
|
|
33
|
+
}
|
|
34
|
+
export interface TypeAheadStatsMobileModifier extends TypeAheadStatsSerializable {
|
|
35
|
+
resetTime: () => void;
|
|
36
|
+
closeTime: () => void;
|
|
37
|
+
}
|
|
11
38
|
export declare type TypeAheadSelectItem = (state: EditorState, item: TypeAheadItem, insert: TypeAheadInsert, meta: {
|
|
12
39
|
mode: SelectItemMode;
|
|
40
|
+
stats: TypeAheadStats;
|
|
41
|
+
query: string;
|
|
42
|
+
sourceListItem: Array<TypeAheadItem>;
|
|
13
43
|
}) => Transaction | false;
|
|
44
|
+
declare type TypeAheadForceSelectProps = {
|
|
45
|
+
query: string;
|
|
46
|
+
items: Array<TypeAheadItem>;
|
|
47
|
+
editorState: EditorState;
|
|
48
|
+
};
|
|
49
|
+
export declare type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
|
|
14
50
|
export declare type TypeAheadHandler = {
|
|
51
|
+
id: TypeAheadAvailableNodes;
|
|
15
52
|
trigger: string;
|
|
16
53
|
customRegex?: string;
|
|
17
54
|
headless?: boolean;
|
|
18
|
-
forceSelect?:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
55
|
+
forceSelect?: TypeAheadForceSelect;
|
|
56
|
+
onInvokeAnalytics?: TypeAheadPayload;
|
|
57
|
+
onOpen?: (editorState: EditorState) => void;
|
|
58
|
+
getItems: (props: {
|
|
59
|
+
query: string;
|
|
60
|
+
editorState: EditorState;
|
|
61
|
+
}) => Promise<Array<TypeAheadItem>>;
|
|
23
62
|
selectItem: TypeAheadSelectItem;
|
|
24
|
-
dismiss?: (
|
|
63
|
+
dismiss?: (props: {
|
|
64
|
+
editorState: EditorState;
|
|
65
|
+
query: string;
|
|
66
|
+
stats: TypeAheadStats;
|
|
67
|
+
}) => void;
|
|
25
68
|
getHighlight?: (state: EditorState) => JSX.Element | null;
|
|
26
69
|
};
|
|
27
|
-
export declare type TypeAheadItemsLoader = null | {
|
|
28
|
-
promise: Promise<Array<TypeAheadItem>>;
|
|
29
|
-
cancel(): void;
|
|
30
|
-
};
|
|
31
70
|
export declare type TypeAheadPluginState = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
query: string
|
|
36
|
-
trigger: string | null;
|
|
37
|
-
typeAheadHandler: TypeAheadHandler | null;
|
|
71
|
+
decorationSet: DecorationSet;
|
|
72
|
+
decorationElement: HTMLElement | null;
|
|
73
|
+
typeAheadHandlers: Array<TypeAheadHandler>;
|
|
74
|
+
query: string;
|
|
38
75
|
items: Array<TypeAheadItem>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
76
|
+
triggerHandler?: TypeAheadHandler;
|
|
77
|
+
selectedIndex: number;
|
|
78
|
+
stats: TypeAheadStatsSerializable | null;
|
|
79
|
+
inputMethod: TypeAheadInputMethod | null;
|
|
80
|
+
};
|
|
81
|
+
export declare type OnInsertSelectedItemProps = {
|
|
82
|
+
mode: SelectItemMode;
|
|
83
|
+
index: number;
|
|
84
|
+
query: string;
|
|
85
|
+
};
|
|
86
|
+
export declare type OnItemMatchProps = {
|
|
87
|
+
mode: SelectItemMode;
|
|
88
|
+
query: string;
|
|
89
|
+
};
|
|
90
|
+
export declare type OnInsertSelectedItem = (props: OnInsertSelectedItemProps) => void;
|
|
91
|
+
export declare type OnItemMatch = (props: OnItemMatchProps) => boolean;
|
|
92
|
+
export declare type OnTextInsertProps = {
|
|
93
|
+
forceFocusOnEditor: boolean;
|
|
94
|
+
setSelectionAt: CloseSelectionOptions;
|
|
95
|
+
text: string;
|
|
96
|
+
};
|
|
97
|
+
export declare type OnTextInsert = (props: OnTextInsertProps) => void;
|
|
98
|
+
export declare type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
|
|
99
|
+
export declare type InsertionTransactionMeta = (editorState: EditorState) => Transaction | false;
|
|
100
|
+
declare type PopupMountPoints = Pick<UiComponentFactoryParams, 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement'>;
|
|
101
|
+
export declare type PopupMountPointReference = Record<'current', PopupMountPoints | null>;
|
|
102
|
+
export declare type CreateTypeAheadDecorations = (tr: Transaction, options: {
|
|
103
|
+
triggerHandler: TypeAheadHandler;
|
|
104
|
+
inputMethod: TypeAheadInputMethod;
|
|
105
|
+
reopenQuery?: string;
|
|
106
|
+
}) => {
|
|
107
|
+
decorationSet: DecorationSet;
|
|
108
|
+
decorationElement: HTMLElement | null;
|
|
109
|
+
stats: TypeAheadStatsSerializable | null;
|
|
46
110
|
};
|
|
111
|
+
export declare type RemoveTypeAheadDecorations = (decorationSet?: DecorationSet) => boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
|
+
import type { TypeAheadItem, OnSelectItem } from '../types';
|
|
4
|
+
declare type ListItemActionsContextProps = {
|
|
5
|
+
onItemHover: OnSelectItem;
|
|
6
|
+
onItemClick: (mode: SelectItemMode, index: number) => void;
|
|
7
|
+
};
|
|
8
|
+
declare type DynamicHeightListItemProps = {
|
|
9
|
+
index: number;
|
|
10
|
+
data: Array<TypeAheadItem>;
|
|
11
|
+
style: any;
|
|
12
|
+
};
|
|
13
|
+
declare type UpdateListItemHeightContextType = (props: {
|
|
14
|
+
index: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}) => void;
|
|
17
|
+
export declare const SelectedIndexContext: React.Context<number>;
|
|
18
|
+
export declare const ListItemActionsContext: React.Context<ListItemActionsContextProps>;
|
|
19
|
+
export declare const UpdateListItemHeightContext: React.Context<UpdateListItemHeightContextType>;
|
|
20
|
+
export declare const DynamicHeightListItem: React.FC<DynamicHeightListItemProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CloseSelectionOptions } from '../constants';
|
|
3
|
+
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
+
declare type InputQueryProps = {
|
|
5
|
+
triggerQueryPrefix: string;
|
|
6
|
+
onQueryChange: (query: string) => void;
|
|
7
|
+
onItemSelect: (mode: SelectItemMode) => void;
|
|
8
|
+
selectNextItem: () => void;
|
|
9
|
+
selectPreviousItem: () => void;
|
|
10
|
+
cancel: (props: {
|
|
11
|
+
forceFocusOnEditor: boolean;
|
|
12
|
+
setSelectionAt: CloseSelectionOptions;
|
|
13
|
+
addPrefixTrigger: boolean;
|
|
14
|
+
text: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
onQueryFocus: () => void;
|
|
17
|
+
forceFocus: boolean;
|
|
18
|
+
onUndoRedo?: (inputType: 'historyUndo' | 'historyRedo') => boolean;
|
|
19
|
+
reopenQuery?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const InputQuery: React.FC<InputQueryProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
|
+
import type { TypeAheadItem, OnSelectItem } from '../types';
|
|
4
|
+
declare type TypeAheadListProps = {
|
|
5
|
+
items: Array<TypeAheadItem>;
|
|
6
|
+
selectedIndex: number;
|
|
7
|
+
onItemHover: OnSelectItem;
|
|
8
|
+
onItemClick: (mode: SelectItemMode, index: number) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const TypeAheadList: React.MemoExoticComponent<({ items, selectedIndex, onItemHover, onItemClick }: TypeAheadListProps) => JSX.Element | null>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TypeAheadItem, OnSelectItem } from '../types';
|
|
3
|
+
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
+
export declare const ICON_HEIGHT = 40;
|
|
5
|
+
export declare const ICON_WIDTH = 40;
|
|
6
|
+
export declare const ItemIcon: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
7
|
+
declare type TypeAheadListItemProps = {
|
|
8
|
+
item: TypeAheadItem;
|
|
9
|
+
itemIndex: number;
|
|
10
|
+
selectedIndex: number;
|
|
11
|
+
onItemHover: OnSelectItem;
|
|
12
|
+
onItemClick: (mode: SelectItemMode, index: number) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const TypeAheadListItem: React.FC<TypeAheadListItemProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditorView, DecorationSet } from 'prosemirror-view';
|
|
3
|
+
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
+
import type { TypeAheadHandler, TypeAheadItem, OnSelectItem } from '../types';
|
|
5
|
+
import type { FireAnalyticsCallback } from '../../analytics/fire-analytics-event';
|
|
6
|
+
declare type TypeAheadPopupProps = {
|
|
7
|
+
triggerHandler: TypeAheadHandler;
|
|
8
|
+
editorView: EditorView;
|
|
9
|
+
anchorElement?: HTMLElement;
|
|
10
|
+
popupsMountPoint?: HTMLElement;
|
|
11
|
+
popupsBoundariesElement?: HTMLElement;
|
|
12
|
+
popupsScrollableElement?: HTMLElement;
|
|
13
|
+
fireAnalyticsCallback: FireAnalyticsCallback;
|
|
14
|
+
items: Array<TypeAheadItem>;
|
|
15
|
+
selectedIndex: number;
|
|
16
|
+
setSelectedItem: OnSelectItem;
|
|
17
|
+
decorationSet: DecorationSet;
|
|
18
|
+
isEmptyQuery: boolean;
|
|
19
|
+
onItemInsert: (mode: SelectItemMode, index: number) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const TypeAheadPopup: React.FC<TypeAheadPopupProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { TypeAheadHandler, TypeAheadInputMethod } from '../types';
|
|
5
|
+
declare type WrapperProps = {
|
|
6
|
+
triggerHandler: TypeAheadHandler;
|
|
7
|
+
editorView: EditorView;
|
|
8
|
+
anchorElement: HTMLElement;
|
|
9
|
+
getDecorationPosition: () => number;
|
|
10
|
+
shouldFocusCursorInsideQuery: boolean;
|
|
11
|
+
onUndoRedo?: (inputType: 'historyUndo' | 'historyRedo') => boolean;
|
|
12
|
+
reopenQuery?: string;
|
|
13
|
+
popupsMountPoint?: HTMLElement;
|
|
14
|
+
popupsBoundariesElement?: HTMLElement;
|
|
15
|
+
popupsScrollableElement?: HTMLElement;
|
|
16
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
17
|
+
inputMethod?: TypeAheadInputMethod;
|
|
18
|
+
};
|
|
19
|
+
export declare const WrapperTypeAhead: React.FC<WrapperProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const calcVisibleListHeight: ({ startIndex, indexHeightMap, limit, listMaxHeight, listItemEstimatedHeight, }: {
|
|
2
|
+
startIndex: number;
|
|
3
|
+
indexHeightMap: Array<number>;
|
|
4
|
+
limit: number;
|
|
5
|
+
listMaxHeight: number;
|
|
6
|
+
listItemEstimatedHeight: number;
|
|
7
|
+
}) => number;
|
|
8
|
+
declare type SetListItemHeight = (props: {
|
|
9
|
+
index: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
declare type GetListItemHeight = (index: number) => number;
|
|
13
|
+
declare type Props = {
|
|
14
|
+
redrawListAtIndex: (index: number) => void;
|
|
15
|
+
getFirstVisibleIndex: () => number;
|
|
16
|
+
listLength: number;
|
|
17
|
+
listMaxHeight: number;
|
|
18
|
+
listItemEstimatedHeight: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const useDynamicListHeightCalculation: ({ redrawListAtIndex, getFirstVisibleIndex, listLength, listMaxHeight, listItemEstimatedHeight, }: Props) => {
|
|
21
|
+
getListItemHeight: GetListItemHeight;
|
|
22
|
+
setListItemHeight: SetListItemHeight;
|
|
23
|
+
renderedListHeight: number | null;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import type { TypeAheadHandler, TypeAheadItem, OnItemMatch, OnTextInsert, OnInsertSelectedItem } from '../../types';
|
|
3
|
+
export declare const useItemInsert: (triggerHandler: TypeAheadHandler, editorView: EditorView, items: Array<TypeAheadItem>) => [OnInsertSelectedItem, OnTextInsert, OnItemMatch];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { TypeAheadHandler, TypeAheadItem } from '../../types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
triggerHandler: TypeAheadHandler;
|
|
5
|
+
items: Array<TypeAheadItem>;
|
|
6
|
+
query: string;
|
|
7
|
+
editorView: EditorView;
|
|
8
|
+
closePopup: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const useOnForceSelect: ({ triggerHandler, items, query, editorView, closePopup, }: Props) => void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="resize-observer-browser" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface ElementResizable extends Element {
|
|
4
|
+
onResize?: (entry: ResizeObserverEntry) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ResizeObserverContext: React.Context<ResizeObserver | null>;
|
|
7
|
+
export declare const ResizeObserverProvider: React.FC;
|
|
8
|
+
export declare const useResizeObserver: <T extends ElementResizable>(targetRef: React.MutableRefObject<T> | null, onResize: (entry: ResizeObserverEntry) => void) => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
import { Decoration, EditorView } from 'prosemirror-view';
|
|
3
|
+
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
+
import type { TypeAheadHandler, TypeAheadPluginState } from './types';
|
|
5
|
+
export declare const findTypeAheadDecorations: (state: EditorState) => Decoration | null;
|
|
6
|
+
export declare const isTypeAheadHandler: (handler: any) => handler is TypeAheadHandler;
|
|
7
|
+
export declare const isTypeAheadOpen: (editorState: EditorState) => boolean;
|
|
8
|
+
export declare const getPluginState: (editorState: EditorState) => TypeAheadPluginState;
|
|
9
|
+
export declare const getTypeAheadHandler: (editorState: EditorState) => any;
|
|
10
|
+
export declare const getTypeAheadQuery: (editorState: EditorState) => any;
|
|
11
|
+
export declare const isTypeAheadAllowed: (state: EditorState) => boolean;
|
|
12
|
+
export declare const findHandler: (id: TypeAheadAvailableNodes, state: EditorState) => TypeAheadHandler | null;
|
|
13
|
+
declare type MoveSelectedIndexProps = {
|
|
14
|
+
editorView: EditorView;
|
|
15
|
+
direction: 'next' | 'previous';
|
|
16
|
+
};
|
|
17
|
+
export declare const moveSelectedIndex: ({ editorView, direction, }: MoveSelectedIndexProps) => () => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
|
+
import type { TypeAheadPluginState } from '../../type-ahead/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
oldPluginState: TypeAheadPluginState;
|
|
5
|
+
newPluginState: TypeAheadPluginState;
|
|
6
|
+
};
|
|
7
|
+
declare type SubscribeTypeAheadUpdates = (editorView: EditorView, cb: (props: Props) => void) => () => void;
|
|
8
|
+
export declare const subscribeTypeAheadUpdates: SubscribeTypeAheadUpdates;
|
|
9
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { LightEditorPlugin, LightPMPlugin, LightPMPluginFactoryParams, OnEditorV
|
|
|
4
4
|
import { Preset } from './labs/next/presets/preset';
|
|
5
5
|
import { Schema } from 'prosemirror-model';
|
|
6
6
|
import { MarkConfig, NodeConfig } from './types/pm-config';
|
|
7
|
+
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
7
8
|
export { Preset } from './labs/next/presets/preset';
|
|
8
9
|
export type { LightEditorPlugin } from './create-editor/get-plugins';
|
|
9
10
|
export type { DispatchAnalyticsEvent } from './plugins/analytics/types';
|
|
@@ -14,6 +15,7 @@ export interface LightEditorConfig {
|
|
|
14
15
|
plugins: Array<LightPMPlugin>;
|
|
15
16
|
onEditorViewStateUpdatedCallbacks: Array<OnEditorViewStateUpdated>;
|
|
16
17
|
}
|
|
18
|
+
export declare function getFireAnalytics(editorView: EditorView): any;
|
|
17
19
|
declare type PluginData = {
|
|
18
20
|
plugins: Plugin[];
|
|
19
21
|
schema: Schema;
|
|
@@ -27,6 +27,7 @@ import { PerformanceTracking } from './performance-tracking';
|
|
|
27
27
|
import { PanelPluginConfig } from './../plugins/panel/types';
|
|
28
28
|
import { EditorPlugin } from './editor-plugin';
|
|
29
29
|
import { MentionPluginConfig } from './../plugins/mentions/types';
|
|
30
|
+
import { EmptyStateHandler } from './empty-state-handler';
|
|
30
31
|
export declare type ReactComponents = ReactElement<any> | ReactElement<any>[];
|
|
31
32
|
declare type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
|
|
32
33
|
declare type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
|
|
@@ -154,6 +155,7 @@ export interface EditorProps {
|
|
|
154
155
|
showModal?: boolean;
|
|
155
156
|
replacePlusMenu?: boolean;
|
|
156
157
|
helpUrl?: string;
|
|
158
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
157
159
|
};
|
|
158
160
|
codeBlock?: CodeBlockOptions;
|
|
159
161
|
UNSAFE_allowUndoRedoButtons?: boolean;
|
|
@@ -234,5 +234,13 @@ export declare type FeatureFlags = {
|
|
|
234
234
|
* @default false
|
|
235
235
|
*/
|
|
236
236
|
enableViewUpdateSubscription?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* @description
|
|
239
|
+
* Enable scroll-to-telepointer for collab avatars
|
|
240
|
+
*
|
|
241
|
+
* @see https://product-fabric.atlassian.net/browse/ED-12460
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
collabAvatarScroll?: boolean;
|
|
237
245
|
};
|
|
238
246
|
export declare type FeatureFlagKey = keyof FeatureFlags;
|
|
@@ -12,7 +12,7 @@ export declare const ScrollContainer: import("styled-components").StyledComponen
|
|
|
12
12
|
featureFlags?: import("../../..").EditorFeatureFlags | undefined;
|
|
13
13
|
} & {
|
|
14
14
|
className?: string | undefined;
|
|
15
|
-
}, "className" | "theme" | "allowAnnotation"> & import("react").RefAttributes<unknown>, "
|
|
15
|
+
}, "className" | "theme" | "allowAnnotation"> & import("react").RefAttributes<unknown>, "ref" | "key" | "className" | "allowAnnotation"> & {
|
|
16
16
|
theme?: any;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const ContentArea: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
@@ -14,5 +14,5 @@ declare type Props = WithAnalyticsEventsProps & {
|
|
|
14
14
|
height: number;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props, "
|
|
17
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props, "title" | "onChange" | "placement" | "cols" | "size" | "currentColor" | "alignX" | "colorPalette"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "placement" | "cols" | "size" | "analyticsContext" | "currentColor" | "alignX" | "colorPalette"> & React.RefAttributes<any>>;
|
|
18
18
|
export default _default;
|
|
@@ -15,5 +15,5 @@ declare type Props = {
|
|
|
15
15
|
errorMessage: string | null;
|
|
16
16
|
isLoading?: boolean;
|
|
17
17
|
} & WithAnalyticsEventsProps;
|
|
18
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props, "autoSave" | "onChange" | "isLoading" | "fields" | "parameters" | "onCancel" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "
|
|
18
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props, "autoSave" | "onChange" | "isLoading" | "fields" | "parameters" | "onCancel" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "autoSave" | "onChange" | "isLoading" | "fields" | "analyticsContext" | "parameters" | "onCancel" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
|
|
19
19
|
export default _default;
|
|
@@ -12,5 +12,5 @@ interface Props {
|
|
|
12
12
|
export declare const FormErrorBoundaryImpl: React.ComponentClass<Props & WithAnalyticsEventsProps, any> & {
|
|
13
13
|
WrappedComponent: ReactIntl.ComponentConstructor<Props & WithAnalyticsEventsProps & InjectedIntlProps>;
|
|
14
14
|
};
|
|
15
|
-
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Pick<Props & WithAnalyticsEventsProps, "
|
|
15
|
+
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Pick<Props & WithAnalyticsEventsProps, "contextIdentifierProvider" | "children" | "fields" | "extensionKey"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "contextIdentifierProvider" | "children" | "key" | "fields" | "extensionKey" | "analyticsContext"> & React.RefAttributes<any>>;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { Category, Modes } from './types';
|
|
4
|
+
import { EmptyStateHandler } from '../../types/empty-state-handler';
|
|
4
5
|
export interface Props {
|
|
5
6
|
categories?: Category[];
|
|
6
7
|
mode: keyof typeof Modes;
|
|
@@ -10,6 +11,7 @@ export interface Props {
|
|
|
10
11
|
showSearch: boolean;
|
|
11
12
|
showCategories: boolean;
|
|
12
13
|
defaultCategory?: string;
|
|
14
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
13
15
|
}
|
|
14
16
|
export interface State {
|
|
15
17
|
items: QuickInsertItem[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InjectedIntlProps } from 'react-intl';
|
|
3
3
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
+
import { EmptyStateHandler } from '../../types/empty-state-handler';
|
|
4
5
|
export interface State {
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
}
|
|
@@ -10,6 +11,7 @@ export interface Props {
|
|
|
10
11
|
isOpen?: boolean;
|
|
11
12
|
onClose: () => void;
|
|
12
13
|
helpUrl?: string | undefined;
|
|
14
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
13
15
|
}
|
|
14
16
|
declare const _default: React.ComponentClass<Props, any> & {
|
|
15
17
|
WrappedComponent: ReactIntl.ComponentConstructor<Props & InjectedIntlProps>;
|
|
@@ -6,5 +6,5 @@ interface Props {
|
|
|
6
6
|
onSelectCategory: (category: Category) => void;
|
|
7
7
|
selectedCategory?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const MemoizedCategoryListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "
|
|
9
|
+
declare const MemoizedCategoryListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "createAnalyticsEvent" | "analyticsContext" | "selectedCategory" | "categories" | "onSelectCategory"> & React.RefAttributes<any>>>;
|
|
10
10
|
export default MemoizedCategoryListWithAnalytics;
|
|
@@ -2,12 +2,16 @@ import React from 'react';
|
|
|
2
2
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
4
|
import { Modes, SelectedItemProps } from '../../types';
|
|
5
|
+
import { EmptyStateHandler } from '../../../../types/empty-state-handler';
|
|
5
6
|
export interface Props {
|
|
6
7
|
items: QuickInsertItem[];
|
|
7
8
|
mode: keyof typeof Modes;
|
|
8
9
|
onInsertItem: (item: QuickInsertItem) => void;
|
|
9
10
|
setColumnCount: (columnCount: number) => void;
|
|
10
11
|
setFocusedItemIndex: (index: number) => void;
|
|
12
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
13
|
+
selectedCategory?: string;
|
|
14
|
+
searchTerm?: string;
|
|
11
15
|
}
|
|
12
|
-
declare const MemoizedElementListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & SelectedItemProps & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "mode" | "
|
|
16
|
+
declare const MemoizedElementListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & SelectedItemProps & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "mode" | "createAnalyticsEvent" | "analyticsContext" | "items" | "selectedItemIndex" | "focusedItemIndex" | "setColumnCount" | "emptyStateHandler" | "selectedCategory" | "searchTerm" | "onInsertItem" | "setFocusedItemIndex"> & React.RefAttributes<any>>>;
|
|
13
17
|
export default MemoizedElementListWithAnalytics;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
4
|
import { Category, Modes } from '../types';
|
|
5
|
+
import { EmptyStateHandler } from '../../../types/empty-state-handler';
|
|
5
6
|
export declare type StatelessElementBrowserProps = {
|
|
6
7
|
categories?: Category[];
|
|
7
8
|
items: QuickInsertItem[];
|
|
@@ -14,6 +15,7 @@ export declare type StatelessElementBrowserProps = {
|
|
|
14
15
|
showCategories: boolean;
|
|
15
16
|
mode: keyof typeof Modes;
|
|
16
17
|
searchTerm?: string;
|
|
18
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
17
19
|
} & WithAnalyticsEventsProps;
|
|
18
|
-
declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Pick<StatelessElementBrowserProps, "mode" | "items" | "
|
|
20
|
+
declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Pick<StatelessElementBrowserProps, "mode" | "items" | "emptyStateHandler" | "selectedCategory" | "searchTerm" | "onInsertItem" | "categories" | "onSelectCategory" | "onSearch" | "onSelectItem" | "showCategories" | "showSearch"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "mode" | "analyticsContext" | "items" | "emptyStateHandler" | "selectedCategory" | "searchTerm" | "onInsertItem" | "categories" | "onSelectCategory" | "onSearch" | "onSelectItem" | "showCategories" | "showSearch"> & React.RefAttributes<any>>>;
|
|
19
21
|
export default MemoizedElementBrowser;
|