@atlaskit/editor-core 182.1.2 → 182.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 +17 -0
- package/dist/cjs/actions/index.js +90 -98
- package/dist/cjs/create-editor/ErrorBoundary.js +86 -93
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +8 -6
- package/dist/cjs/editor-next/index.js +5 -6
- package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +34 -37
- package/dist/cjs/editor-next/utils/trackEditorActions.js +48 -51
- package/dist/cjs/editor.js +29 -34
- package/dist/cjs/i18n/cs.js +34 -6
- package/dist/cjs/i18n/da.js +34 -6
- package/dist/cjs/i18n/de.js +34 -7
- package/dist/cjs/i18n/en.js +31 -4
- package/dist/cjs/i18n/en_GB.js +34 -7
- package/dist/cjs/i18n/en_ZZ.js +35 -8
- package/dist/cjs/i18n/es.js +33 -6
- package/dist/cjs/i18n/fi.js +33 -6
- package/dist/cjs/i18n/fr.js +34 -7
- package/dist/cjs/i18n/hu.js +33 -6
- package/dist/cjs/i18n/it.js +34 -7
- package/dist/cjs/i18n/ja.js +33 -6
- package/dist/cjs/i18n/ko.js +33 -6
- package/dist/cjs/i18n/nb.js +35 -8
- package/dist/cjs/i18n/nl.js +34 -7
- package/dist/cjs/i18n/pl.js +34 -7
- package/dist/cjs/i18n/pt_BR.js +34 -7
- package/dist/cjs/i18n/ru.js +34 -7
- package/dist/cjs/i18n/sv.js +33 -6
- package/dist/cjs/i18n/th.js +34 -7
- package/dist/cjs/i18n/tr.js +33 -6
- package/dist/cjs/i18n/uk.js +34 -7
- package/dist/cjs/i18n/vi.js +35 -8
- package/dist/cjs/i18n/zh.js +33 -4
- package/dist/cjs/i18n/zh_TW.js +33 -6
- package/dist/cjs/labs/CollapsedEditor/index.js +1 -1
- package/dist/cjs/plugins/analytics/plugin.js +1 -1
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +39 -44
- package/dist/cjs/plugins/annotation/pm-plugins/types.js +4 -4
- package/dist/cjs/plugins/annotation/types.js +4 -4
- package/dist/cjs/plugins/base/pm-plugins/decoration.js +4 -4
- package/dist/cjs/plugins/block-type/commands/block-type.js +1 -1
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +5 -6
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +3 -4
- package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +16 -1
- package/dist/cjs/plugins/collab-edit/index.js +29 -32
- package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -4
- package/dist/cjs/plugins/custom-autoformat/doc.js +28 -31
- package/dist/cjs/plugins/custom-autoformat/index.js +20 -23
- package/dist/cjs/plugins/date/index.js +1 -1
- package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
- package/dist/cjs/plugins/date/utils/internal.js +1 -1
- package/dist/cjs/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
- package/dist/cjs/plugins/extension/actions.js +36 -39
- package/dist/cjs/plugins/extension/context-panel.js +123 -130
- package/dist/cjs/plugins/extension/pm-plugins/main.js +82 -89
- package/dist/cjs/plugins/extension/pm-plugins/utils.js +46 -51
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +44 -48
- package/dist/cjs/plugins/feedback-dialog/index.js +52 -57
- package/dist/cjs/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
- package/dist/cjs/plugins/find-replace/actions.js +4 -4
- package/dist/cjs/plugins/find-replace/utils/batch-decorations.js +144 -153
- package/dist/cjs/plugins/find-replace/utils/index.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -46
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ToolbarLoader.js +2 -1
- package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +86 -86
- package/dist/cjs/plugins/help-dialog/ui/HelpDialogLoader.js +2 -1
- package/dist/cjs/plugins/history/actions.js +4 -4
- package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -82
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
- package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +16 -16
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -352
- package/dist/cjs/plugins/hyperlink/utils.js +3 -0
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +24 -27
- package/dist/cjs/plugins/list/utils/node.js +4 -4
- package/dist/cjs/plugins/macro/actions.js +107 -112
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +43 -46
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +62 -66
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +38 -42
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +108 -113
- package/dist/cjs/plugins/media/picker-facade.js +22 -25
- package/dist/cjs/plugins/media/pm-plugins/linking/actions.js +4 -4
- package/dist/cjs/plugins/media/pm-plugins/main.js +159 -172
- package/dist/cjs/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
- package/dist/cjs/plugins/media/toolbar/utils.js +30 -33
- package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
- package/dist/cjs/plugins/media/utils/check-media-type.js +37 -40
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +29 -31
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -1
- package/dist/cjs/plugins/mobile-dimensions/actions.js +4 -4
- package/dist/cjs/plugins/paste/actions.js +4 -4
- package/dist/cjs/plugins/paste/handlers.js +23 -26
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -0
- package/dist/cjs/plugins/paste/md.js +3 -0
- package/dist/cjs/plugins/paste/newline-md-plugin.js +3 -0
- package/dist/cjs/plugins/paste/paragraph-md-plugin.js +3 -0
- package/dist/cjs/plugins/paste/pm-plugins/main.js +25 -27
- package/dist/cjs/plugins/quick-insert/assets/index.js +63 -39
- package/dist/cjs/plugins/quick-insert/index.js +30 -33
- package/dist/cjs/plugins/selection/actions.js +4 -4
- package/dist/cjs/plugins/selection/gap-cursor/direction.js +4 -4
- package/dist/cjs/plugins/selection/types.js +4 -4
- package/dist/cjs/plugins/status/ui/statusPicker.js +7 -8
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/commands.js +16 -6
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +12 -20
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/cjs/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -42
- package/dist/cjs/plugins/tasks-and-decisions/utils.js +31 -2
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +4 -4
- package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +4 -4
- package/dist/cjs/plugins/type-ahead/constants.js +4 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +4 -4
- package/dist/cjs/plugins/undo-redo/enums.js +4 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -2
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +68 -73
- package/dist/cjs/ui/ConfigPanel/ConfigPanelLoader.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +54 -56
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +51 -55
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +24 -27
- package/dist/cjs/ui/ConfigPanel/transformers.js +344 -363
- package/dist/cjs/ui/ConfigPanel/types.js +8 -8
- package/dist/cjs/ui/Dropdown/index.js +2 -1
- package/dist/cjs/ui/DropdownMenu/index.js +2 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +1 -1
- package/dist/cjs/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +4 -4
- package/dist/cjs/ui/ElementBrowser/types.js +4 -4
- package/dist/cjs/ui/LinkSearch/index.js +94 -101
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +19 -2
- package/dist/cjs/ui/ToolbarFeedback/index.js +27 -31
- package/dist/cjs/utils/action.js +31 -36
- package/dist/cjs/utils/clipboard.js +82 -86
- package/dist/cjs/utils/deprecation-warnings.js +1 -1
- package/dist/cjs/utils/extensions.js +62 -67
- package/dist/cjs/utils/insert.js +4 -4
- package/dist/cjs/utils/mark.js +2 -2
- package/dist/cjs/utils/performance/simple-measure-to-entries.js +1 -2
- package/dist/cjs/utils/performance/track-transactions.js +3 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +8 -9
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +5 -3
- package/dist/es2019/editor-next/index.js +5 -6
- package/dist/es2019/editor.js +29 -36
- package/dist/es2019/i18n/cs.js +34 -6
- package/dist/es2019/i18n/da.js +34 -6
- package/dist/es2019/i18n/de.js +34 -7
- package/dist/es2019/i18n/en.js +31 -4
- package/dist/es2019/i18n/en_GB.js +34 -7
- package/dist/es2019/i18n/en_ZZ.js +35 -8
- package/dist/es2019/i18n/es.js +33 -6
- package/dist/es2019/i18n/fi.js +33 -6
- package/dist/es2019/i18n/fr.js +34 -7
- package/dist/es2019/i18n/hu.js +33 -6
- package/dist/es2019/i18n/it.js +34 -7
- package/dist/es2019/i18n/ja.js +33 -6
- package/dist/es2019/i18n/ko.js +33 -6
- package/dist/es2019/i18n/nb.js +35 -8
- package/dist/es2019/i18n/nl.js +34 -7
- package/dist/es2019/i18n/pl.js +34 -7
- package/dist/es2019/i18n/pt_BR.js +34 -7
- package/dist/es2019/i18n/ru.js +34 -7
- package/dist/es2019/i18n/sv.js +33 -6
- package/dist/es2019/i18n/th.js +34 -7
- package/dist/es2019/i18n/tr.js +33 -6
- package/dist/es2019/i18n/uk.js +34 -7
- package/dist/es2019/i18n/vi.js +35 -8
- package/dist/es2019/i18n/zh.js +33 -4
- package/dist/es2019/i18n/zh_TW.js +33 -6
- package/dist/es2019/plugins/annotation/pm-plugins/types.js +3 -3
- package/dist/es2019/plugins/annotation/types.js +3 -3
- package/dist/es2019/plugins/base/pm-plugins/decoration.js +3 -3
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +5 -7
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +3 -5
- package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
- package/dist/es2019/plugins/collab-edit/plugin-state.js +1 -2
- package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +7 -11
- package/dist/es2019/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +8 -12
- package/dist/es2019/plugins/find-replace/actions.js +3 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -1
- package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +56 -71
- package/dist/es2019/plugins/history/actions.js +3 -3
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
- package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +6 -6
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
- package/dist/es2019/plugins/hyperlink/utils.js +3 -0
- package/dist/es2019/plugins/list/utils/node.js +3 -3
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +4 -8
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -3
- package/dist/es2019/plugins/media/pm-plugins/linking/actions.js +3 -3
- package/dist/es2019/plugins/media/pm-plugins/main.js +22 -31
- package/dist/es2019/plugins/mobile-dimensions/actions.js +3 -3
- package/dist/es2019/plugins/paste/actions.js +3 -3
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +3 -0
- package/dist/es2019/plugins/paste/md.js +3 -0
- package/dist/es2019/plugins/paste/newline-md-plugin.js +3 -0
- package/dist/es2019/plugins/paste/paragraph-md-plugin.js +3 -0
- package/dist/es2019/plugins/selection/actions.js +3 -3
- package/dist/es2019/plugins/selection/gap-cursor/direction.js +3 -3
- package/dist/es2019/plugins/selection/types.js +3 -3
- package/dist/es2019/plugins/status/ui/statusPicker.js +6 -7
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -11
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/commands.js +15 -3
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +6 -16
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +6 -5
- package/dist/es2019/plugins/tasks-and-decisions/utils.js +30 -0
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +3 -3
- package/dist/es2019/plugins/type-ahead/constants.js +3 -3
- package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +3 -3
- package/dist/es2019/plugins/undo-redo/enums.js +3 -3
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +5 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +3 -4
- package/dist/es2019/ui/ConfigPanel/types.js +6 -6
- package/dist/es2019/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
- package/dist/es2019/ui/ElementBrowser/types.js +3 -3
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
- package/dist/es2019/ui/ToolbarFeedback/index.js +1 -3
- package/dist/es2019/utils/insert.js +3 -3
- package/dist/es2019/utils/performance/simple-measure-to-entries.js +1 -1
- package/dist/es2019/utils/performance/track-transactions.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +90 -98
- package/dist/esm/create-editor/ErrorBoundary.js +86 -93
- package/dist/esm/create-editor/ReactEditorViewInternal.js +6 -5
- package/dist/esm/editor-next/index.js +5 -6
- package/dist/esm/editor-next/utils/sendDurationAnalytics.js +34 -37
- package/dist/esm/editor-next/utils/trackEditorActions.js +48 -51
- package/dist/esm/editor.js +29 -34
- package/dist/esm/i18n/cs.js +34 -6
- package/dist/esm/i18n/da.js +34 -6
- package/dist/esm/i18n/de.js +34 -7
- package/dist/esm/i18n/en.js +31 -4
- package/dist/esm/i18n/en_GB.js +34 -7
- package/dist/esm/i18n/en_ZZ.js +35 -8
- package/dist/esm/i18n/es.js +33 -6
- package/dist/esm/i18n/fi.js +33 -6
- package/dist/esm/i18n/fr.js +34 -7
- package/dist/esm/i18n/hu.js +33 -6
- package/dist/esm/i18n/it.js +34 -7
- package/dist/esm/i18n/ja.js +33 -6
- package/dist/esm/i18n/ko.js +33 -6
- package/dist/esm/i18n/nb.js +35 -8
- package/dist/esm/i18n/nl.js +34 -7
- package/dist/esm/i18n/pl.js +34 -7
- package/dist/esm/i18n/pt_BR.js +34 -7
- package/dist/esm/i18n/ru.js +34 -7
- package/dist/esm/i18n/sv.js +33 -6
- package/dist/esm/i18n/th.js +34 -7
- package/dist/esm/i18n/tr.js +33 -6
- package/dist/esm/i18n/uk.js +34 -7
- package/dist/esm/i18n/vi.js +35 -8
- package/dist/esm/i18n/zh.js +33 -4
- package/dist/esm/i18n/zh_TW.js +33 -6
- package/dist/esm/plugins/analytics/plugin.js +1 -1
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +39 -44
- package/dist/esm/plugins/annotation/pm-plugins/types.js +3 -3
- package/dist/esm/plugins/annotation/types.js +3 -3
- package/dist/esm/plugins/base/pm-plugins/decoration.js +3 -3
- package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
- package/dist/esm/plugins/card/nodeviews/embedCard.js +5 -6
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +3 -4
- package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
- package/dist/esm/plugins/collab-edit/index.js +29 -32
- package/dist/esm/plugins/collab-edit/plugin-state.js +2 -4
- package/dist/esm/plugins/custom-autoformat/doc.js +28 -31
- package/dist/esm/plugins/custom-autoformat/index.js +20 -23
- package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
- package/dist/esm/plugins/date/utils/internal.js +1 -1
- package/dist/esm/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
- package/dist/esm/plugins/extension/actions.js +36 -39
- package/dist/esm/plugins/extension/context-panel.js +123 -129
- package/dist/esm/plugins/extension/pm-plugins/main.js +82 -88
- package/dist/esm/plugins/extension/pm-plugins/utils.js +46 -51
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +44 -49
- package/dist/esm/plugins/feedback-dialog/index.js +52 -57
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
- package/dist/esm/plugins/find-replace/actions.js +3 -3
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +144 -153
- package/dist/esm/plugins/find-replace/utils/index.js +2 -2
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -47
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -1
- package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +78 -76
- package/dist/esm/plugins/history/actions.js +3 -3
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -83
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
- package/dist/esm/plugins/hyperlink/pm-plugins/main.js +14 -14
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -353
- package/dist/esm/plugins/hyperlink/utils.js +3 -0
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +24 -27
- package/dist/esm/plugins/list/utils/node.js +3 -3
- package/dist/esm/plugins/macro/actions.js +107 -112
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +43 -46
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +62 -67
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +38 -43
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +108 -114
- package/dist/esm/plugins/media/picker-facade.js +22 -25
- package/dist/esm/plugins/media/pm-plugins/linking/actions.js +3 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +159 -173
- package/dist/esm/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
- package/dist/esm/plugins/media/toolbar/utils.js +30 -33
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
- package/dist/esm/plugins/media/utils/check-media-type.js +37 -40
- package/dist/esm/plugins/mentions/nodeviews/mention.js +29 -32
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -1
- package/dist/esm/plugins/mobile-dimensions/actions.js +3 -3
- package/dist/esm/plugins/paste/actions.js +3 -3
- package/dist/esm/plugins/paste/handlers.js +23 -26
- package/dist/esm/plugins/paste/linkify-md-plugin.js +3 -0
- package/dist/esm/plugins/paste/md.js +3 -0
- package/dist/esm/plugins/paste/newline-md-plugin.js +3 -0
- package/dist/esm/plugins/paste/paragraph-md-plugin.js +3 -0
- package/dist/esm/plugins/paste/pm-plugins/main.js +25 -28
- package/dist/esm/plugins/quick-insert/index.js +30 -33
- package/dist/esm/plugins/selection/actions.js +3 -3
- package/dist/esm/plugins/selection/gap-cursor/direction.js +3 -3
- package/dist/esm/plugins/selection/types.js +3 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +6 -7
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/commands.js +17 -7
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +13 -21
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -43
- package/dist/esm/plugins/tasks-and-decisions/utils.js +28 -0
- package/dist/esm/plugins/text-color/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
- package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +3 -3
- package/dist/esm/plugins/type-ahead/constants.js +3 -3
- package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +3 -3
- package/dist/esm/plugins/undo-redo/enums.js +3 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +3 -2
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +68 -74
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +54 -57
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +51 -56
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +24 -27
- package/dist/esm/ui/ConfigPanel/transformers.js +344 -362
- package/dist/esm/ui/ConfigPanel/types.js +6 -6
- package/dist/esm/ui/Dropdown/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +2 -1
- package/dist/esm/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
- package/dist/esm/ui/ElementBrowser/types.js +3 -3
- package/dist/esm/ui/LinkSearch/index.js +94 -101
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
- package/dist/esm/ui/ToolbarFeedback/index.js +27 -31
- package/dist/esm/utils/action.js +31 -36
- package/dist/esm/utils/clipboard.js +82 -87
- package/dist/esm/utils/deprecation-warnings.js +1 -1
- package/dist/esm/utils/extensions.js +62 -67
- package/dist/esm/utils/insert.js +3 -3
- package/dist/esm/utils/mark.js +2 -2
- package/dist/esm/utils/performance/simple-measure-to-entries.js +1 -2
- package/dist/esm/utils/performance/track-transactions.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -0
- package/dist/types/i18n/cs.d.ts +29 -2
- package/dist/types/i18n/da.d.ts +29 -2
- package/dist/types/i18n/de.d.ts +28 -2
- package/dist/types/i18n/en.d.ts +28 -2
- package/dist/types/i18n/en_GB.d.ts +31 -5
- package/dist/types/i18n/en_ZZ.d.ts +28 -2
- package/dist/types/i18n/es.d.ts +28 -2
- package/dist/types/i18n/fi.d.ts +28 -2
- package/dist/types/i18n/fr.d.ts +28 -2
- package/dist/types/i18n/hu.d.ts +28 -2
- package/dist/types/i18n/it.d.ts +28 -2
- package/dist/types/i18n/ja.d.ts +28 -2
- package/dist/types/i18n/ko.d.ts +28 -2
- package/dist/types/i18n/nb.d.ts +28 -2
- package/dist/types/i18n/nl.d.ts +28 -2
- package/dist/types/i18n/pl.d.ts +28 -2
- package/dist/types/i18n/pt_BR.d.ts +28 -2
- package/dist/types/i18n/ru.d.ts +28 -2
- package/dist/types/i18n/sv.d.ts +28 -2
- package/dist/types/i18n/th.d.ts +28 -2
- package/dist/types/i18n/tr.d.ts +28 -2
- package/dist/types/i18n/uk.d.ts +28 -2
- package/dist/types/i18n/vi.d.ts +28 -2
- package/dist/types/i18n/zh.d.ts +30 -2
- package/dist/types/i18n/zh_TW.d.ts +28 -2
- package/dist/types/plugins/tasks-and-decisions/utils.d.ts +2 -0
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +3 -1
- package/dist/types/utils/document.d.ts +2 -2
- package/package.json +14 -14
- package/report.api.md +1 -1
|
@@ -15,7 +15,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
15
|
var IconAction = (0, _reactLoadable.default)({
|
|
16
16
|
loader: function loader() {
|
|
17
17
|
return Promise.resolve().then(function () {
|
|
18
|
-
return _interopRequireWildcard(require('./action'));
|
|
18
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-action" */'./action'));
|
|
19
19
|
}).then(function (module) {
|
|
20
20
|
return module.default;
|
|
21
21
|
});
|
|
@@ -28,7 +28,7 @@ exports.IconAction = IconAction;
|
|
|
28
28
|
var IconCode = (0, _reactLoadable.default)({
|
|
29
29
|
loader: function loader() {
|
|
30
30
|
return Promise.resolve().then(function () {
|
|
31
|
-
return _interopRequireWildcard(require('./code'));
|
|
31
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-code" */'./code'));
|
|
32
32
|
}).then(function (module) {
|
|
33
33
|
return module.default;
|
|
34
34
|
});
|
|
@@ -41,7 +41,7 @@ exports.IconCode = IconCode;
|
|
|
41
41
|
var IconDate = (0, _reactLoadable.default)({
|
|
42
42
|
loader: function loader() {
|
|
43
43
|
return Promise.resolve().then(function () {
|
|
44
|
-
return _interopRequireWildcard(require('./date'));
|
|
44
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-date" */'./date'));
|
|
45
45
|
}).then(function (module) {
|
|
46
46
|
return module.default;
|
|
47
47
|
});
|
|
@@ -54,7 +54,7 @@ exports.IconDate = IconDate;
|
|
|
54
54
|
var IconDecision = (0, _reactLoadable.default)({
|
|
55
55
|
loader: function loader() {
|
|
56
56
|
return Promise.resolve().then(function () {
|
|
57
|
-
return _interopRequireWildcard(require('./decision'));
|
|
57
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-decision" */'./decision'));
|
|
58
58
|
}).then(function (module) {
|
|
59
59
|
return module.default;
|
|
60
60
|
});
|
|
@@ -67,7 +67,7 @@ exports.IconDecision = IconDecision;
|
|
|
67
67
|
var IconDivider = (0, _reactLoadable.default)({
|
|
68
68
|
loader: function loader() {
|
|
69
69
|
return Promise.resolve().then(function () {
|
|
70
|
-
return _interopRequireWildcard(require('./divider'));
|
|
70
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-divider" */'./divider'));
|
|
71
71
|
}).then(function (module) {
|
|
72
72
|
return module.default;
|
|
73
73
|
});
|
|
@@ -80,7 +80,7 @@ exports.IconDivider = IconDivider;
|
|
|
80
80
|
var IconEmoji = (0, _reactLoadable.default)({
|
|
81
81
|
loader: function loader() {
|
|
82
82
|
return Promise.resolve().then(function () {
|
|
83
|
-
return _interopRequireWildcard(require('./emoji'));
|
|
83
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-emoji" */'./emoji'));
|
|
84
84
|
}).then(function (module) {
|
|
85
85
|
return module.default;
|
|
86
86
|
});
|
|
@@ -93,7 +93,7 @@ exports.IconEmoji = IconEmoji;
|
|
|
93
93
|
var IconImages = (0, _reactLoadable.default)({
|
|
94
94
|
loader: function loader() {
|
|
95
95
|
return Promise.resolve().then(function () {
|
|
96
|
-
return _interopRequireWildcard(require('./images'));
|
|
96
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-images" */'./images'));
|
|
97
97
|
}).then(function (module) {
|
|
98
98
|
return module.default;
|
|
99
99
|
});
|
|
@@ -106,7 +106,7 @@ exports.IconImages = IconImages;
|
|
|
106
106
|
var IconLayout = (0, _reactLoadable.default)({
|
|
107
107
|
loader: function loader() {
|
|
108
108
|
return Promise.resolve().then(function () {
|
|
109
|
-
return _interopRequireWildcard(require('./layout'));
|
|
109
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-layout" */'./layout'));
|
|
110
110
|
}).then(function (module) {
|
|
111
111
|
return module.default;
|
|
112
112
|
});
|
|
@@ -119,7 +119,7 @@ exports.IconLayout = IconLayout;
|
|
|
119
119
|
var IconLink = (0, _reactLoadable.default)({
|
|
120
120
|
loader: function loader() {
|
|
121
121
|
return Promise.resolve().then(function () {
|
|
122
|
-
return _interopRequireWildcard(require('./link'));
|
|
122
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-link" */'./link'));
|
|
123
123
|
}).then(function (module) {
|
|
124
124
|
return module.default;
|
|
125
125
|
});
|
|
@@ -132,7 +132,7 @@ exports.IconLink = IconLink;
|
|
|
132
132
|
var IconListNumber = (0, _reactLoadable.default)({
|
|
133
133
|
loader: function loader() {
|
|
134
134
|
return Promise.resolve().then(function () {
|
|
135
|
-
return _interopRequireWildcard(require('./list-number'));
|
|
135
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-list-number" */'./list-number'));
|
|
136
136
|
}).then(function (module) {
|
|
137
137
|
return module.default;
|
|
138
138
|
});
|
|
@@ -145,7 +145,7 @@ exports.IconListNumber = IconListNumber;
|
|
|
145
145
|
var IconList = (0, _reactLoadable.default)({
|
|
146
146
|
loader: function loader() {
|
|
147
147
|
return Promise.resolve().then(function () {
|
|
148
|
-
return _interopRequireWildcard(require('./list'));
|
|
148
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-list" */'./list'));
|
|
149
149
|
}).then(function (module) {
|
|
150
150
|
return module.default;
|
|
151
151
|
});
|
|
@@ -158,7 +158,7 @@ exports.IconList = IconList;
|
|
|
158
158
|
var IconMention = (0, _reactLoadable.default)({
|
|
159
159
|
loader: function loader() {
|
|
160
160
|
return Promise.resolve().then(function () {
|
|
161
|
-
return _interopRequireWildcard(require('./mention'));
|
|
161
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-mention" */'./mention'));
|
|
162
162
|
}).then(function (module) {
|
|
163
163
|
return module.default;
|
|
164
164
|
});
|
|
@@ -171,7 +171,7 @@ exports.IconMention = IconMention;
|
|
|
171
171
|
var IconPanelError = (0, _reactLoadable.default)({
|
|
172
172
|
loader: function loader() {
|
|
173
173
|
return Promise.resolve().then(function () {
|
|
174
|
-
return _interopRequireWildcard(require('./panel-error'));
|
|
174
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-panel-error" */'./panel-error'));
|
|
175
175
|
}).then(function (module) {
|
|
176
176
|
return module.default;
|
|
177
177
|
});
|
|
@@ -184,7 +184,7 @@ exports.IconPanelError = IconPanelError;
|
|
|
184
184
|
var IconPanelNote = (0, _reactLoadable.default)({
|
|
185
185
|
loader: function loader() {
|
|
186
186
|
return Promise.resolve().then(function () {
|
|
187
|
-
return _interopRequireWildcard(require('./panel-note'));
|
|
187
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-panel-note" */'./panel-note'));
|
|
188
188
|
}).then(function (module) {
|
|
189
189
|
return module.default;
|
|
190
190
|
});
|
|
@@ -197,7 +197,7 @@ exports.IconPanelNote = IconPanelNote;
|
|
|
197
197
|
var IconPanelSuccess = (0, _reactLoadable.default)({
|
|
198
198
|
loader: function loader() {
|
|
199
199
|
return Promise.resolve().then(function () {
|
|
200
|
-
return _interopRequireWildcard(require('./panel-success'));
|
|
200
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-panel-success" */'./panel-success'));
|
|
201
201
|
}).then(function (module) {
|
|
202
202
|
return module.default;
|
|
203
203
|
});
|
|
@@ -210,7 +210,7 @@ exports.IconPanelSuccess = IconPanelSuccess;
|
|
|
210
210
|
var IconPanelWarning = (0, _reactLoadable.default)({
|
|
211
211
|
loader: function loader() {
|
|
212
212
|
return Promise.resolve().then(function () {
|
|
213
|
-
return _interopRequireWildcard(require('./panel-warning'));
|
|
213
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-panel-warning" */'./panel-warning'));
|
|
214
214
|
}).then(function (module) {
|
|
215
215
|
return module.default;
|
|
216
216
|
});
|
|
@@ -223,7 +223,7 @@ exports.IconPanelWarning = IconPanelWarning;
|
|
|
223
223
|
var IconPanel = (0, _reactLoadable.default)({
|
|
224
224
|
loader: function loader() {
|
|
225
225
|
return Promise.resolve().then(function () {
|
|
226
|
-
return _interopRequireWildcard(require('./panel'));
|
|
226
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-panel" */'./panel'));
|
|
227
227
|
}).then(function (module) {
|
|
228
228
|
return module.default;
|
|
229
229
|
});
|
|
@@ -236,7 +236,7 @@ exports.IconPanel = IconPanel;
|
|
|
236
236
|
var IconQuote = (0, _reactLoadable.default)({
|
|
237
237
|
loader: function loader() {
|
|
238
238
|
return Promise.resolve().then(function () {
|
|
239
|
-
return _interopRequireWildcard(require('./quote'));
|
|
239
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-quote" */'./quote'));
|
|
240
240
|
}).then(function (module) {
|
|
241
241
|
return module.default;
|
|
242
242
|
});
|
|
@@ -249,7 +249,7 @@ exports.IconQuote = IconQuote;
|
|
|
249
249
|
var IconStatus = (0, _reactLoadable.default)({
|
|
250
250
|
loader: function loader() {
|
|
251
251
|
return Promise.resolve().then(function () {
|
|
252
|
-
return _interopRequireWildcard(require('./status'));
|
|
252
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-status" */'./status'));
|
|
253
253
|
}).then(function (module) {
|
|
254
254
|
return module.default;
|
|
255
255
|
});
|
|
@@ -262,30 +262,54 @@ exports.IconStatus = IconStatus;
|
|
|
262
262
|
function importHeading(level) {
|
|
263
263
|
switch (level) {
|
|
264
264
|
case 1:
|
|
265
|
-
return
|
|
266
|
-
return
|
|
267
|
-
|
|
265
|
+
return function (specifier) {
|
|
266
|
+
return new Promise(function (r) {
|
|
267
|
+
return r(specifier);
|
|
268
|
+
}).then(function (s) {
|
|
269
|
+
return _interopRequireWildcard(require(s));
|
|
270
|
+
});
|
|
271
|
+
}( /* webpackChunkName: "@atlaskit-internal_editor-icon-heading-1" */"./heading1");
|
|
268
272
|
case 2:
|
|
269
|
-
return
|
|
270
|
-
return
|
|
271
|
-
|
|
273
|
+
return function (specifier) {
|
|
274
|
+
return new Promise(function (r) {
|
|
275
|
+
return r(specifier);
|
|
276
|
+
}).then(function (s) {
|
|
277
|
+
return _interopRequireWildcard(require(s));
|
|
278
|
+
});
|
|
279
|
+
}( /* webpackChunkName: "@atlaskit-internal_editor-icon-heading-2" */"./heading2");
|
|
272
280
|
case 3:
|
|
273
|
-
return
|
|
274
|
-
return
|
|
275
|
-
|
|
281
|
+
return function (specifier) {
|
|
282
|
+
return new Promise(function (r) {
|
|
283
|
+
return r(specifier);
|
|
284
|
+
}).then(function (s) {
|
|
285
|
+
return _interopRequireWildcard(require(s));
|
|
286
|
+
});
|
|
287
|
+
}( /* webpackChunkName: "@atlaskit-internal_editor-icon-heading-3" */"./heading3");
|
|
276
288
|
case 4:
|
|
277
|
-
return
|
|
278
|
-
return
|
|
279
|
-
|
|
289
|
+
return function (specifier) {
|
|
290
|
+
return new Promise(function (r) {
|
|
291
|
+
return r(specifier);
|
|
292
|
+
}).then(function (s) {
|
|
293
|
+
return _interopRequireWildcard(require(s));
|
|
294
|
+
});
|
|
295
|
+
}( /* webpackChunkName: "@atlaskit-internal_editor-icon-heading-4" */"./heading4");
|
|
280
296
|
case 5:
|
|
281
|
-
return
|
|
282
|
-
return
|
|
283
|
-
|
|
297
|
+
return function (specifier) {
|
|
298
|
+
return new Promise(function (r) {
|
|
299
|
+
return r(specifier);
|
|
300
|
+
}).then(function (s) {
|
|
301
|
+
return _interopRequireWildcard(require(s));
|
|
302
|
+
});
|
|
303
|
+
}( /* webpackChunkName: "@atlaskit-internal_editor-icon-heading-5" */"./heading5");
|
|
284
304
|
case 6:
|
|
285
305
|
default:
|
|
286
|
-
return
|
|
287
|
-
return
|
|
288
|
-
|
|
306
|
+
return function (specifier) {
|
|
307
|
+
return new Promise(function (r) {
|
|
308
|
+
return r(specifier);
|
|
309
|
+
}).then(function (s) {
|
|
310
|
+
return _interopRequireWildcard(require(s));
|
|
311
|
+
});
|
|
312
|
+
}( /* webpackChunkName: "@atlaskit-internal_editor-icon-heading-6" */"./heading6");
|
|
289
313
|
}
|
|
290
314
|
}
|
|
291
315
|
var IconHeading = function IconHeading(_ref) {
|
|
@@ -307,7 +331,7 @@ exports.IconHeading = IconHeading;
|
|
|
307
331
|
var IconFeedback = (0, _reactLoadable.default)({
|
|
308
332
|
loader: function loader() {
|
|
309
333
|
return Promise.resolve().then(function () {
|
|
310
|
-
return _interopRequireWildcard(require('./feedback'));
|
|
334
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-feedback" */'./feedback'));
|
|
311
335
|
}).then(function (module) {
|
|
312
336
|
return module.default;
|
|
313
337
|
});
|
|
@@ -320,7 +344,7 @@ exports.IconFeedback = IconFeedback;
|
|
|
320
344
|
var IconExpand = (0, _reactLoadable.default)({
|
|
321
345
|
loader: function loader() {
|
|
322
346
|
return Promise.resolve().then(function () {
|
|
323
|
-
return _interopRequireWildcard(require('./expand'));
|
|
347
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-expand" */'./expand'));
|
|
324
348
|
}).then(function (module) {
|
|
325
349
|
return module.default;
|
|
326
350
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -12,6 +11,7 @@ Object.defineProperty(exports, "pluginKey", {
|
|
|
12
11
|
return _pluginKey.pluginKey;
|
|
13
12
|
}
|
|
14
13
|
});
|
|
14
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
15
15
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -21,7 +21,6 @@ var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
|
21
21
|
var _pluginKey = require("./plugin-key");
|
|
22
22
|
var _search = require("./search");
|
|
23
23
|
var _ModalElementBrowser = _interopRequireDefault(require("./ui/ModalElementBrowser"));
|
|
24
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
25
24
|
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; }
|
|
26
25
|
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) { (0, _defineProperty2.default)(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; }
|
|
27
26
|
var quickInsertPlugin = function quickInsertPlugin(options) {
|
|
@@ -146,40 +145,38 @@ function quickInsertPluginFactory(quickInsertItems, providerFactory, getIntl, di
|
|
|
146
145
|
},
|
|
147
146
|
view: function view(editorView) {
|
|
148
147
|
var providerHandler = /*#__PURE__*/function () {
|
|
149
|
-
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
148
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_name, providerPromise) {
|
|
150
149
|
var provider, providedItems;
|
|
151
|
-
return
|
|
152
|
-
while (1) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (!providerPromise) {
|
|
156
|
-
_context.next = 14;
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
_context.prev = 1;
|
|
160
|
-
_context.next = 4;
|
|
161
|
-
return providerPromise;
|
|
162
|
-
case 4:
|
|
163
|
-
provider = _context.sent;
|
|
164
|
-
_context.next = 7;
|
|
165
|
-
return provider.getItems();
|
|
166
|
-
case 7:
|
|
167
|
-
providedItems = _context.sent;
|
|
168
|
-
setProviderState({
|
|
169
|
-
provider: provider,
|
|
170
|
-
providedItems: providedItems
|
|
171
|
-
})(editorView.state, editorView.dispatch);
|
|
150
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
151
|
+
while (1) switch (_context.prev = _context.next) {
|
|
152
|
+
case 0:
|
|
153
|
+
if (!providerPromise) {
|
|
172
154
|
_context.next = 14;
|
|
173
155
|
break;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
156
|
+
}
|
|
157
|
+
_context.prev = 1;
|
|
158
|
+
_context.next = 4;
|
|
159
|
+
return providerPromise;
|
|
160
|
+
case 4:
|
|
161
|
+
provider = _context.sent;
|
|
162
|
+
_context.next = 7;
|
|
163
|
+
return provider.getItems();
|
|
164
|
+
case 7:
|
|
165
|
+
providedItems = _context.sent;
|
|
166
|
+
setProviderState({
|
|
167
|
+
provider: provider,
|
|
168
|
+
providedItems: providedItems
|
|
169
|
+
})(editorView.state, editorView.dispatch);
|
|
170
|
+
_context.next = 14;
|
|
171
|
+
break;
|
|
172
|
+
case 11:
|
|
173
|
+
_context.prev = 11;
|
|
174
|
+
_context.t0 = _context["catch"](1);
|
|
175
|
+
// eslint-disable-next-line no-console
|
|
176
|
+
console.error('Error getting items from quick insert provider', _context.t0);
|
|
177
|
+
case 14:
|
|
178
|
+
case "end":
|
|
179
|
+
return _context.stop();
|
|
183
180
|
}
|
|
184
181
|
}, _callee, null, [[1, 11]]);
|
|
185
182
|
}));
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SelectionActionTypes = void 0;
|
|
7
|
-
var SelectionActionTypes
|
|
8
|
-
exports.SelectionActionTypes = SelectionActionTypes;
|
|
9
|
-
(function (SelectionActionTypes) {
|
|
7
|
+
var SelectionActionTypes = /*#__PURE__*/function (SelectionActionTypes) {
|
|
10
8
|
SelectionActionTypes["SET_DECORATIONS"] = "SET_DECORATIONS";
|
|
11
9
|
SelectionActionTypes["SET_RELATIVE_SELECTION"] = "SET_RELATIVE_SELECTION";
|
|
12
|
-
|
|
10
|
+
return SelectionActionTypes;
|
|
11
|
+
}({});
|
|
12
|
+
exports.SelectionActionTypes = SelectionActionTypes;
|
|
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Direction = void 0;
|
|
7
7
|
exports.isBackward = isBackward;
|
|
8
8
|
exports.isForward = isForward;
|
|
9
|
-
var Direction
|
|
10
|
-
exports.Direction = Direction;
|
|
11
|
-
(function (Direction) {
|
|
9
|
+
var Direction = /*#__PURE__*/function (Direction) {
|
|
12
10
|
Direction["UP"] = "up";
|
|
13
11
|
Direction["RIGHT"] = "right";
|
|
14
12
|
Direction["DOWN"] = "down";
|
|
15
13
|
Direction["LEFT"] = "left";
|
|
16
14
|
Direction["BACKWARD"] = "backward";
|
|
17
15
|
Direction["FORWARD"] = "forward";
|
|
18
|
-
|
|
16
|
+
return Direction;
|
|
17
|
+
}({});
|
|
18
|
+
exports.Direction = Direction;
|
|
19
19
|
function isBackward(dir) {
|
|
20
20
|
return [Direction.UP, Direction.LEFT, Direction.BACKWARD].indexOf(dir) !== -1;
|
|
21
21
|
}
|
|
@@ -14,9 +14,9 @@ var _prosemirrorState = require("prosemirror-state");
|
|
|
14
14
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
15
15
|
var selectionPluginKey = new _prosemirrorState.PluginKey('selection');
|
|
16
16
|
exports.selectionPluginKey = selectionPluginKey;
|
|
17
|
-
var SelectionDirection
|
|
18
|
-
exports.SelectionDirection = SelectionDirection;
|
|
19
|
-
(function (SelectionDirection) {
|
|
17
|
+
var SelectionDirection = /*#__PURE__*/function (SelectionDirection) {
|
|
20
18
|
SelectionDirection[SelectionDirection["Before"] = -1] = "Before";
|
|
21
19
|
SelectionDirection[SelectionDirection["After"] = 1] = "After";
|
|
22
|
-
|
|
20
|
+
return SelectionDirection;
|
|
21
|
+
}({});
|
|
22
|
+
exports.SelectionDirection = SelectionDirection;
|
|
@@ -29,13 +29,13 @@ var _templateObject;
|
|
|
29
29
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
30
30
|
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; } }
|
|
31
31
|
var PopupWithListeners = (0, _withOuterListeners.default)(_ui.Popup);
|
|
32
|
-
var InputMethod
|
|
33
|
-
exports.InputMethod = InputMethod;
|
|
34
|
-
(function (InputMethod) {
|
|
32
|
+
var InputMethod = /*#__PURE__*/function (InputMethod) {
|
|
35
33
|
InputMethod["blur"] = "blur";
|
|
36
34
|
InputMethod["escKey"] = "escKey";
|
|
37
35
|
InputMethod["enterKey"] = "enterKey";
|
|
38
|
-
|
|
36
|
+
return InputMethod;
|
|
37
|
+
}({});
|
|
38
|
+
exports.InputMethod = InputMethod;
|
|
39
39
|
var pickerContainer = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n padding: ", "px 0;\n border-radius: ", "px;\n box-shadow: ", ";\n input {\n text-transform: uppercase;\n }\n"])), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), (0, _constants.gridSize)(), (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, 0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25))");
|
|
40
40
|
var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
|
|
41
41
|
(0, _inherits2.default)(StatusPickerWithoutAnalytcs, _React$Component);
|
|
@@ -112,6 +112,9 @@ var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
|
|
|
112
112
|
_this.inputMethod = InputMethod.enterKey;
|
|
113
113
|
_this.props.onEnter(_this.state);
|
|
114
114
|
});
|
|
115
|
+
// cancel bubbling to fix clickOutside logic:
|
|
116
|
+
// popup re-renders its content before the click event bubbles up to the document
|
|
117
|
+
// therefore click target element would be different from the popup content
|
|
115
118
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handlePopupClick", function (event) {
|
|
116
119
|
return event.nativeEvent.stopImmediatePropagation();
|
|
117
120
|
});
|
|
@@ -237,10 +240,6 @@ var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
|
|
|
237
240
|
onEnter: this.onEnter
|
|
238
241
|
})));
|
|
239
242
|
}
|
|
240
|
-
|
|
241
|
-
// cancel bubbling to fix clickOutside logic:
|
|
242
|
-
// popup re-renders its content before the click event bubbles up to the document
|
|
243
|
-
// therefore click target element would be different from the popup content
|
|
244
243
|
}]);
|
|
245
244
|
return StatusPickerWithoutAnalytcs;
|
|
246
245
|
}(_react.default.Component);
|
|
@@ -48,6 +48,15 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
48
48
|
tr.setMeta('scrollIntoView', false);
|
|
49
49
|
_this.view.dispatch(tr);
|
|
50
50
|
});
|
|
51
|
+
/**
|
|
52
|
+
* Dynamically generates analytics data relating to the parent list.
|
|
53
|
+
*
|
|
54
|
+
* Required to be dynamic, as list (in prosemirror model) may have
|
|
55
|
+
* changed (e.g. item movements, or additional items in list).
|
|
56
|
+
* This node view will have not rerendered for those changes, so
|
|
57
|
+
* cannot render the position and listSize into the
|
|
58
|
+
* AnalyticsContext at initial render time.
|
|
59
|
+
*/
|
|
51
60
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "addListAnalyticsData", function (event) {
|
|
52
61
|
try {
|
|
53
62
|
var resolvedPos = _this.view.state.doc.resolve(_this.getPos());
|
|
@@ -83,16 +92,6 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
83
92
|
value: function isContentEmpty(node) {
|
|
84
93
|
return node.content.childCount === 0;
|
|
85
94
|
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Dynamically generates analytics data relating to the parent list.
|
|
89
|
-
*
|
|
90
|
-
* Required to be dynamic, as list (in prosemirror model) may have
|
|
91
|
-
* changed (e.g. item movements, or additional items in list).
|
|
92
|
-
* This node view will have not rerendered for those changes, so
|
|
93
|
-
* cannot render the position and listSize into the
|
|
94
|
-
* AnalyticsContext at initial render time.
|
|
95
|
-
*/
|
|
96
95
|
}, {
|
|
97
96
|
key: "createDomRef",
|
|
98
97
|
value: function createDomRef() {
|
|
@@ -7,10 +7,11 @@ exports.wrapSelectionInTaskList = exports.liftSelection = exports.joinAtCut = vo
|
|
|
7
7
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
8
8
|
var _commands = require("../../../utils/commands");
|
|
9
9
|
var _helpers = require("./helpers");
|
|
10
|
+
var _utils = require("../utils");
|
|
10
11
|
var liftSelection = function liftSelection(state, dispatch) {
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
$to =
|
|
12
|
+
var normalizedSelection = (0, _utils.normalizeTaskItemsSelection)(state.selection);
|
|
13
|
+
var $from = normalizedSelection.$from,
|
|
14
|
+
$to = normalizedSelection.$to;
|
|
14
15
|
var tr = (0, _helpers.liftBlock)(state.tr, $from, $to);
|
|
15
16
|
if (dispatch && tr) {
|
|
16
17
|
dispatch(tr);
|
|
@@ -19,9 +20,18 @@ var liftSelection = function liftSelection(state, dispatch) {
|
|
|
19
20
|
};
|
|
20
21
|
exports.liftSelection = liftSelection;
|
|
21
22
|
var wrapSelectionInTaskList = function wrapSelectionInTaskList(state, dispatch) {
|
|
22
|
-
var
|
|
23
|
-
$from =
|
|
24
|
-
$to =
|
|
23
|
+
var _normalizeTaskItemsSe = (0, _utils.normalizeTaskItemsSelection)(state.selection),
|
|
24
|
+
$from = _normalizeTaskItemsSe.$from,
|
|
25
|
+
$to = _normalizeTaskItemsSe.$to;
|
|
26
|
+
|
|
27
|
+
// limit ui indentation to 6 levels
|
|
28
|
+
var _state$schema$nodes = state.schema.nodes,
|
|
29
|
+
taskList = _state$schema$nodes.taskList,
|
|
30
|
+
taskItem = _state$schema$nodes.taskItem;
|
|
31
|
+
var maxDepth = (0, _helpers.subtreeHeight)($from, $to, [taskList, taskItem]);
|
|
32
|
+
if (maxDepth >= 6) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
25
35
|
var blockRange = (0, _helpers.getBlockRange)($from, $to);
|
|
26
36
|
if (!blockRange) {
|
|
27
37
|
return true;
|
|
@@ -18,6 +18,7 @@ var _analytics = require("../../analytics");
|
|
|
18
18
|
var _commands2 = require("../commands");
|
|
19
19
|
var _commands3 = require("./commands");
|
|
20
20
|
var _helpers = require("./helpers");
|
|
21
|
+
var _utils = require("../utils");
|
|
21
22
|
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; }
|
|
22
23
|
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) { (0, _defineProperty2.default)(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; }
|
|
23
24
|
var indentationAnalytics = function indentationAnalytics(curIndentLevel, direction, inputMethod) {
|
|
@@ -96,7 +97,8 @@ var joinTaskDecisionFollowing = function joinTaskDecisionFollowing(state, dispat
|
|
|
96
97
|
var getUnindentCommand = function getUnindentCommand() {
|
|
97
98
|
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _analytics.INPUT_METHOD.KEYBOARD;
|
|
98
99
|
return (0, _commands.filter)(_helpers.isInsideTask, function (state, dispatch) {
|
|
99
|
-
var
|
|
100
|
+
var normalizedSelection = (0, _utils.normalizeTaskItemsSelection)(state.selection);
|
|
101
|
+
var curIndentLevel = (0, _helpers.getCurrentIndentLevel)(normalizedSelection);
|
|
100
102
|
if (!curIndentLevel || curIndentLevel === 1) {
|
|
101
103
|
return false;
|
|
102
104
|
}
|
|
@@ -122,21 +124,11 @@ var shouldLetTabThroughInTable = function shouldLetTabThroughInTable(state) {
|
|
|
122
124
|
var getIndentCommand = function getIndentCommand() {
|
|
123
125
|
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _analytics.INPUT_METHOD.KEYBOARD;
|
|
124
126
|
return (0, _commands.filter)(_helpers.isInsideTask, function (state, dispatch) {
|
|
125
|
-
|
|
126
|
-
var curIndentLevel = (0, _helpers.getCurrentIndentLevel)(
|
|
127
|
+
var normalizedSelection = (0, _utils.normalizeTaskItemsSelection)(state.selection);
|
|
128
|
+
var curIndentLevel = (0, _helpers.getCurrentIndentLevel)(normalizedSelection);
|
|
127
129
|
if (!curIndentLevel || curIndentLevel >= 6) {
|
|
128
130
|
return true;
|
|
129
131
|
}
|
|
130
|
-
var _state$schema$nodes3 = state.schema.nodes,
|
|
131
|
-
taskList = _state$schema$nodes3.taskList,
|
|
132
|
-
taskItem = _state$schema$nodes3.taskItem;
|
|
133
|
-
var _state$selection = state.selection,
|
|
134
|
-
$from = _state$selection.$from,
|
|
135
|
-
$to = _state$selection.$to;
|
|
136
|
-
var maxDepth = (0, _helpers.subtreeHeight)($from, $to, [taskList, taskItem]);
|
|
137
|
-
if (maxDepth >= 6) {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
132
|
return (0, _analytics.withAnalytics)(indentationAnalytics(curIndentLevel, _analytics.INDENT_DIRECTION.INDENT, inputMethod))((0, _prosemirrorCommands.autoJoin)(_commands3.wrapSelectionInTaskList, ['taskList']))(state, dispatch);
|
|
141
133
|
});
|
|
142
134
|
};
|
|
@@ -150,9 +142,9 @@ var backspaceFrom = function backspaceFrom($from) {
|
|
|
150
142
|
}
|
|
151
143
|
|
|
152
144
|
// if nested, just unindent
|
|
153
|
-
var _state$schema$
|
|
154
|
-
taskList = _state$schema$
|
|
155
|
-
paragraph = _state$schema$
|
|
145
|
+
var _state$schema$nodes3 = state.schema.nodes,
|
|
146
|
+
taskList = _state$schema$nodes3.taskList,
|
|
147
|
+
paragraph = _state$schema$nodes3.paragraph;
|
|
156
148
|
if ($from.node($from.depth - 2).type === taskList) {
|
|
157
149
|
return getUnindentCommand()(state, dispatch);
|
|
158
150
|
}
|
|
@@ -179,10 +171,10 @@ var backspace = (0, _commands.filter)(_commands.isEmptySelectionAtStart, (0, _pr
|
|
|
179
171
|
})), ['taskList', 'decisionList']));
|
|
180
172
|
var unindentTaskOrUnwrapTaskDecisionFollowing = function unindentTaskOrUnwrapTaskDecisionFollowing(state, dispatch) {
|
|
181
173
|
var $from = state.selection.$from,
|
|
182
|
-
_state$schema$
|
|
183
|
-
taskList = _state$schema$
|
|
184
|
-
doc = _state$schema$
|
|
185
|
-
paragraph = _state$schema$
|
|
174
|
+
_state$schema$nodes4 = state.schema.nodes,
|
|
175
|
+
taskList = _state$schema$nodes4.taskList,
|
|
176
|
+
doc = _state$schema$nodes4.doc,
|
|
177
|
+
paragraph = _state$schema$nodes4.paragraph,
|
|
186
178
|
tr = state.tr;
|
|
187
179
|
|
|
188
180
|
// only run if cursor is at the end of the node
|
|
@@ -18,10 +18,10 @@ var _pluginKey = require("./plugin-key");
|
|
|
18
18
|
var _excluded = ["localId"];
|
|
19
19
|
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; }
|
|
20
20
|
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) { (0, _defineProperty2.default)(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; }
|
|
21
|
-
var ACTIONS
|
|
22
|
-
(function (ACTIONS) {
|
|
21
|
+
var ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
23
22
|
ACTIONS[ACTIONS["SET_CONTEXT_PROVIDER"] = 0] = "SET_CONTEXT_PROVIDER";
|
|
24
|
-
|
|
23
|
+
return ACTIONS;
|
|
24
|
+
}(ACTIONS || {});
|
|
25
25
|
var setContextIdentifierProvider = function setContextIdentifierProvider(provider) {
|
|
26
26
|
return function (state, dispatch) {
|
|
27
27
|
if (dispatch) {
|