@atlaskit/editor-core 188.8.0 → 188.9.2
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 +20 -0
- package/dist/cjs/composable-editor/editor-internal.js +2 -2
- package/dist/cjs/create-editor/ReactEditorView.js +796 -8
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/universal.js +7 -4
- package/dist/cjs/plugins/index.js +0 -28
- package/dist/cjs/plugins/insert-block/index.js +4 -6
- package/dist/cjs/plugins/tasks-and-decisions/index.js +4 -3
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -13
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +15 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +753 -2
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +4 -1
- package/dist/es2019/plugins/index.js +0 -4
- package/dist/es2019/plugins/insert-block/index.js +4 -6
- package/dist/es2019/plugins/tasks-and-decisions/index.js +4 -3
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +43 -10
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +13 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +797 -8
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +4 -1
- package/dist/esm/plugins/index.js +0 -4
- package/dist/esm/plugins/insert-block/index.js +4 -6
- package/dist/esm/plugins/tasks-and-decisions/index.js +4 -3
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -12
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +14 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +119 -5
- package/dist/types/labs/next/presets/default.d.ts +43 -43
- package/dist/types/plugins/index.d.ts +0 -4
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -5
- package/dist/types/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
- package/dist/types/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/tasks-and-decisions/types.d.ts +6 -1
- package/dist/types/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +119 -5
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +43 -43
- package/dist/types-ts4.5/plugins/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/tasks-and-decisions/index.d.ts +2 -5
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
- package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
- package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +8 -1
- package/dist/types-ts4.5/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
- package/package.json +7 -7
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +0 -812
- package/dist/cjs/create-editor/ReactEditorViewNext.js +0 -15
- package/dist/cjs/plugins/save-on-enter/index.js +0 -70
- package/dist/cjs/plugins/scroll-into-view/index.js +0 -55
- package/dist/cjs/plugins/status/actions.js +0 -158
- package/dist/cjs/plugins/status/analytics.js +0 -31
- package/dist/cjs/plugins/status/index.js +0 -143
- package/dist/cjs/plugins/status/keymap.js +0 -22
- package/dist/cjs/plugins/status/nodeviews/status.js +0 -58
- package/dist/cjs/plugins/status/plugin-key.js +0 -9
- package/dist/cjs/plugins/status/plugin.js +0 -133
- package/dist/cjs/plugins/status/types.js +0 -5
- package/dist/cjs/plugins/status/ui/statusPicker.js +0 -314
- package/dist/cjs/plugins/status/utils.js +0 -22
- package/dist/cjs/plugins/type-ahead/api.js +0 -215
- package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -205
- package/dist/cjs/plugins/type-ahead/commands/update-list-items.js +0 -23
- package/dist/cjs/plugins/type-ahead/commands/update-query.js +0 -27
- package/dist/cjs/plugins/type-ahead/commands/update-selected-index.js +0 -27
- package/dist/cjs/plugins/type-ahead/constants.js +0 -15
- package/dist/cjs/plugins/type-ahead/index.js +0 -14
- package/dist/cjs/plugins/type-ahead/insert-utils.js +0 -107
- package/dist/cjs/plugins/type-ahead/messages.js +0 -79
- package/dist/cjs/plugins/type-ahead/plugin.js +0 -382
- package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +0 -16
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -148
- package/dist/cjs/plugins/type-ahead/pm-plugins/input-rules.js +0 -36
- package/dist/cjs/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -22
- package/dist/cjs/plugins/type-ahead/pm-plugins/key.js +0 -8
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +0 -110
- package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +0 -158
- package/dist/cjs/plugins/type-ahead/pm-plugins/utils.js +0 -18
- package/dist/cjs/plugins/type-ahead/stats-modifier.js +0 -42
- package/dist/cjs/plugins/type-ahead/transforms/close-type-ahead.js +0 -13
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -75
- package/dist/cjs/plugins/type-ahead/transforms/set-selection-before-query.js +0 -18
- package/dist/cjs/plugins/type-ahead/types.js +0 -5
- package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +0 -120
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +0 -400
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +0 -285
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +0 -179
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +0 -230
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -127
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -109
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-load-items.js +0 -50
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -41
- package/dist/cjs/plugins/type-ahead/utils.js +0 -130
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +0 -753
- package/dist/es2019/create-editor/ReactEditorViewNext.js +0 -7
- package/dist/es2019/plugins/save-on-enter/index.js +0 -63
- package/dist/es2019/plugins/scroll-into-view/index.js +0 -44
- package/dist/es2019/plugins/status/actions.js +0 -144
- package/dist/es2019/plugins/status/analytics.js +0 -18
- package/dist/es2019/plugins/status/index.js +0 -135
- package/dist/es2019/plugins/status/keymap.js +0 -13
- package/dist/es2019/plugins/status/nodeviews/status.js +0 -60
- package/dist/es2019/plugins/status/plugin-key.js +0 -3
- package/dist/es2019/plugins/status/plugin.js +0 -113
- package/dist/es2019/plugins/status/types.js +0 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +0 -293
- package/dist/es2019/plugins/status/utils.js +0 -12
- package/dist/es2019/plugins/type-ahead/api.js +0 -205
- package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -204
- package/dist/es2019/plugins/type-ahead/commands/update-list-items.js +0 -17
- package/dist/es2019/plugins/type-ahead/commands/update-query.js +0 -21
- package/dist/es2019/plugins/type-ahead/commands/update-selected-index.js +0 -21
- package/dist/es2019/plugins/type-ahead/constants.js +0 -9
- package/dist/es2019/plugins/type-ahead/index.js +0 -3
- package/dist/es2019/plugins/type-ahead/insert-utils.js +0 -106
- package/dist/es2019/plugins/type-ahead/messages.js +0 -73
- package/dist/es2019/plugins/type-ahead/plugin.js +0 -381
- package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +0 -10
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -148
- package/dist/es2019/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
- package/dist/es2019/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
- package/dist/es2019/plugins/type-ahead/pm-plugins/key.js +0 -2
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +0 -106
- package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +0 -160
- package/dist/es2019/plugins/type-ahead/pm-plugins/utils.js +0 -12
- package/dist/es2019/plugins/type-ahead/stats-modifier.js +0 -33
- package/dist/es2019/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -71
- package/dist/es2019/plugins/type-ahead/transforms/set-selection-before-query.js +0 -10
- package/dist/es2019/plugins/type-ahead/types.js +0 -1
- package/dist/es2019/plugins/type-ahead/ui/AssistiveText.js +0 -88
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +0 -393
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +0 -273
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +0 -214
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +0 -233
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -109
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -112
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-load-items.js +0 -41
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -38
- package/dist/es2019/plugins/type-ahead/utils.js +0 -126
- package/dist/esm/create-editor/ReactEditorViewInternal.js +0 -806
- package/dist/esm/create-editor/ReactEditorViewNext.js +0 -7
- package/dist/esm/plugins/save-on-enter/index.js +0 -63
- package/dist/esm/plugins/scroll-into-view/index.js +0 -50
- package/dist/esm/plugins/status/actions.js +0 -151
- package/dist/esm/plugins/status/analytics.js +0 -24
- package/dist/esm/plugins/status/index.js +0 -136
- package/dist/esm/plugins/status/keymap.js +0 -15
- package/dist/esm/plugins/status/nodeviews/status.js +0 -51
- package/dist/esm/plugins/status/plugin-key.js +0 -3
- package/dist/esm/plugins/status/plugin.js +0 -115
- package/dist/esm/plugins/status/types.js +0 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +0 -308
- package/dist/esm/plugins/status/utils.js +0 -16
- package/dist/esm/plugins/type-ahead/api.js +0 -209
- package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -198
- package/dist/esm/plugins/type-ahead/commands/update-list-items.js +0 -17
- package/dist/esm/plugins/type-ahead/commands/update-query.js +0 -21
- package/dist/esm/plugins/type-ahead/commands/update-selected-index.js +0 -21
- package/dist/esm/plugins/type-ahead/constants.js +0 -9
- package/dist/esm/plugins/type-ahead/index.js +0 -3
- package/dist/esm/plugins/type-ahead/insert-utils.js +0 -101
- package/dist/esm/plugins/type-ahead/messages.js +0 -73
- package/dist/esm/plugins/type-ahead/plugin.js +0 -374
- package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +0 -10
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -141
- package/dist/esm/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
- package/dist/esm/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
- package/dist/esm/plugins/type-ahead/pm-plugins/key.js +0 -2
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +0 -104
- package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +0 -151
- package/dist/esm/plugins/type-ahead/pm-plugins/utils.js +0 -12
- package/dist/esm/plugins/type-ahead/stats-modifier.js +0 -35
- package/dist/esm/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -69
- package/dist/esm/plugins/type-ahead/transforms/set-selection-before-query.js +0 -12
- package/dist/esm/plugins/type-ahead/types.js +0 -1
- package/dist/esm/plugins/type-ahead/ui/AssistiveText.js +0 -115
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +0 -390
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +0 -276
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +0 -169
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +0 -220
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -117
- package/dist/esm/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -103
- package/dist/esm/plugins/type-ahead/ui/hooks/use-load-items.js +0 -43
- package/dist/esm/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -35
- package/dist/esm/plugins/type-ahead/utils.js +0 -124
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -119
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +0 -8
- package/dist/types/plugins/save-on-enter/index.d.ts +0 -10
- package/dist/types/plugins/scroll-into-view/index.d.ts +0 -14
- package/dist/types/plugins/status/actions.d.ts +0 -16
- package/dist/types/plugins/status/analytics.d.ts +0 -4
- package/dist/types/plugins/status/index.d.ts +0 -15
- package/dist/types/plugins/status/keymap.d.ts +0 -3
- package/dist/types/plugins/status/nodeviews/status.d.ts +0 -25
- package/dist/types/plugins/status/plugin-key.d.ts +0 -4
- package/dist/types/plugins/status/plugin.d.ts +0 -7
- package/dist/types/plugins/status/types.d.ts +0 -18
- package/dist/types/plugins/status/ui/statusPicker.d.ts +0 -63
- package/dist/types/plugins/status/utils.d.ts +0 -5
- package/dist/types/plugins/type-ahead/api.d.ts +0 -61
- package/dist/types/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
- package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
- package/dist/types/plugins/type-ahead/commands/update-query.d.ts +0 -2
- package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -8
- package/dist/types/plugins/type-ahead/index.d.ts +0 -4
- package/dist/types/plugins/type-ahead/insert-utils.d.ts +0 -18
- package/dist/types/plugins/type-ahead/messages.d.ts +0 -72
- package/dist/types/plugins/type-ahead/plugin.d.ts +0 -10
- package/dist/types/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
- package/dist/types/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
- package/dist/types/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
- package/dist/types/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
- package/dist/types/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
- package/dist/types/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
- package/dist/types/plugins/type-ahead/stats-modifier.d.ts +0 -20
- package/dist/types/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
- package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
- package/dist/types/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
- package/dist/types/plugins/type-ahead/types.d.ts +0 -109
- package/dist/types/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
- package/dist/types/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -3
- package/dist/types/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
- package/dist/types/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
- package/dist/types/plugins/type-ahead/utils.d.ts +0 -27
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -119
- package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +0 -8
- package/dist/types-ts4.5/plugins/save-on-enter/index.d.ts +0 -10
- package/dist/types-ts4.5/plugins/scroll-into-view/index.d.ts +0 -14
- package/dist/types-ts4.5/plugins/status/actions.d.ts +0 -16
- package/dist/types-ts4.5/plugins/status/analytics.d.ts +0 -4
- package/dist/types-ts4.5/plugins/status/index.d.ts +0 -17
- package/dist/types-ts4.5/plugins/status/keymap.d.ts +0 -3
- package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +0 -25
- package/dist/types-ts4.5/plugins/status/plugin-key.d.ts +0 -4
- package/dist/types-ts4.5/plugins/status/plugin.d.ts +0 -7
- package/dist/types-ts4.5/plugins/status/types.d.ts +0 -18
- package/dist/types-ts4.5/plugins/status/ui/statusPicker.d.ts +0 -63
- package/dist/types-ts4.5/plugins/status/utils.d.ts +0 -5
- package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +0 -61
- package/dist/types-ts4.5/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
- package/dist/types-ts4.5/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
- package/dist/types-ts4.5/plugins/type-ahead/commands/update-query.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/constants.d.ts +0 -8
- package/dist/types-ts4.5/plugins/type-ahead/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/type-ahead/insert-utils.d.ts +0 -18
- package/dist/types-ts4.5/plugins/type-ahead/messages.d.ts +0 -72
- package/dist/types-ts4.5/plugins/type-ahead/plugin.d.ts +0 -10
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
- package/dist/types-ts4.5/plugins/type-ahead/stats-modifier.d.ts +0 -20
- package/dist/types-ts4.5/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
- package/dist/types-ts4.5/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
- package/dist/types-ts4.5/plugins/type-ahead/types.d.ts +0 -111
- package/dist/types-ts4.5/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
- package/dist/types-ts4.5/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
- package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
- package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
- package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
- package/dist/types-ts4.5/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
- package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -7
- package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
- package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
- package/dist/types-ts4.5/plugins/type-ahead/utils.d.ts +0 -27
|
@@ -10,7 +10,7 @@ import { unsupportedContentPlugin } from '@atlaskit/editor-plugin-unsupported-co
|
|
|
10
10
|
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
11
11
|
import { focusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
12
12
|
import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
13
|
-
import typeAheadPlugin from '
|
|
13
|
+
import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
14
14
|
import submitEditorPlugin from '../../../plugins/submit-editor';
|
|
15
15
|
import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
|
|
16
16
|
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
@@ -2,7 +2,8 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin,
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
|
|
6
|
+
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
6
7
|
import { datePlugin } from '../../../plugins/date';
|
|
7
8
|
import { captionPlugin } from '@atlaskit/editor-plugin-caption';
|
|
8
9
|
import { borderPlugin } from '@atlaskit/editor-plugin-border';
|
|
@@ -19,6 +20,8 @@ import { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
|
19
20
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
20
21
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
21
22
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
23
|
+
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
24
|
+
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
22
25
|
import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
|
|
23
26
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
24
27
|
import { createDefaultPreset } from './default';
|
|
@@ -15,12 +15,9 @@ export { default as mentionsPlugin } from './mentions';
|
|
|
15
15
|
export { default as panelPlugin } from './panel';
|
|
16
16
|
export { default as pastePlugin } from './paste';
|
|
17
17
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
18
|
-
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
19
18
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
20
19
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
21
20
|
export { default as textColorPlugin } from './text-color';
|
|
22
|
-
export { default as typeAheadPlugin } from './type-ahead';
|
|
23
|
-
export { default as statusPlugin } from './status';
|
|
24
21
|
export { default as breakoutPlugin } from './breakout';
|
|
25
22
|
export { default as alignmentPlugin } from './alignment';
|
|
26
23
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
@@ -32,7 +29,6 @@ export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
|
32
29
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
33
30
|
export { default as historyPlugin } from './history';
|
|
34
31
|
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
35
|
-
export { default as scrollIntoViewPlugin } from './scroll-into-view';
|
|
36
32
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
37
33
|
export { default as findReplacePlugin } from './find-replace';
|
|
38
34
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { isTypeAheadAllowed } from '../type-ahead/utils';
|
|
4
3
|
import { pluginKey as layoutStateKey } from '../layout';
|
|
5
4
|
import { insertMacroFromMacroBrowser } from '../macro';
|
|
6
5
|
import WithPluginState from '../../ui/WithPluginState';
|
|
7
6
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
8
|
-
import { pluginKey as typeAheadPluginKey } from '../type-ahead/pm-plugins/key';
|
|
9
7
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
10
8
|
import { INPUT_METHOD } from '../analytics';
|
|
11
9
|
import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
|
|
@@ -70,7 +68,6 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
70
68
|
// `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
|
|
71
69
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
72
70
|
plugins: {
|
|
73
|
-
typeAheadState: typeAheadPluginKey,
|
|
74
71
|
macroState: macroStateKey,
|
|
75
72
|
placeholderTextState: placeholderTextStateKey,
|
|
76
73
|
layoutState: layoutStateKey
|
|
@@ -131,20 +128,21 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
131
128
|
layoutState = _ref4.layoutState,
|
|
132
129
|
featureFlags = _ref4.featureFlags;
|
|
133
130
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
134
|
-
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media']),
|
|
131
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead']),
|
|
135
132
|
dateState = _useSharedPluginState.dateState,
|
|
136
133
|
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
137
134
|
imageUploadState = _useSharedPluginState.imageUploadState,
|
|
138
135
|
mentionState = _useSharedPluginState.mentionState,
|
|
139
136
|
emojiState = _useSharedPluginState.emojiState,
|
|
140
137
|
blockTypeState = _useSharedPluginState.blockTypeState,
|
|
141
|
-
mediaState = _useSharedPluginState.mediaState
|
|
138
|
+
mediaState = _useSharedPluginState.mediaState,
|
|
139
|
+
typeAheadState = _useSharedPluginState.typeAheadState;
|
|
142
140
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
143
141
|
pluginInjectionApi: pluginInjectionApi,
|
|
144
142
|
buttons: buttons,
|
|
145
143
|
isReducedSpacing: isToolbarReducedSpacing,
|
|
146
144
|
isDisabled: disabled,
|
|
147
|
-
isTypeAheadAllowed:
|
|
145
|
+
isTypeAheadAllowed: Boolean(typeAheadState === null || typeAheadState === void 0 ? void 0 : typeAheadState.isAllowed),
|
|
148
146
|
editorView: editorView,
|
|
149
147
|
tableSupported: !!editorView.state.schema.nodes.table,
|
|
150
148
|
actionSupported: !!editorView.state.schema.nodes.taskItem,
|
|
@@ -3,7 +3,7 @@ var _templateObject;
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { decisionItem, decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
|
|
6
|
-
import { INPUT_METHOD } from '
|
|
6
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { messages as insertBlockMessages } from '../insert-block/ui/ToolbarInsertBlock/messages';
|
|
8
8
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
9
9
|
import { insertTaskDecisionAction, getListTypes } from './commands';
|
|
@@ -32,7 +32,8 @@ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
|
|
|
32
32
|
_ref2$config2 = _ref2$config === void 0 ? {} : _ref2$config,
|
|
33
33
|
allowNestedTasks = _ref2$config2.allowNestedTasks,
|
|
34
34
|
consumeTabs = _ref2$config2.consumeTabs,
|
|
35
|
-
useLongPressSelection = _ref2$config2.useLongPressSelection
|
|
35
|
+
useLongPressSelection = _ref2$config2.useLongPressSelection,
|
|
36
|
+
api = _ref2.api;
|
|
36
37
|
return {
|
|
37
38
|
name: 'taskDecision',
|
|
38
39
|
nodes: function nodes() {
|
|
@@ -58,7 +59,7 @@ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
|
|
|
58
59
|
providerFactory = _ref3.providerFactory,
|
|
59
60
|
eventDispatcher = _ref3.eventDispatcher,
|
|
60
61
|
dispatch = _ref3.dispatch;
|
|
61
|
-
return createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, useLongPressSelection);
|
|
62
|
+
return createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, api, useLongPressSelection);
|
|
62
63
|
}
|
|
63
64
|
}, {
|
|
64
65
|
name: 'tasksAndDecisionsInputRule',
|
|
@@ -8,8 +8,19 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
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; } }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
11
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
12
|
import DecisionItem from '../ui/Decision';
|
|
12
|
-
|
|
13
|
+
var DecisionItemWrapper = function DecisionItemWrapper(_ref) {
|
|
14
|
+
var api = _ref.api,
|
|
15
|
+
forwardRef = _ref.forwardRef,
|
|
16
|
+
isContentNodeEmpty = _ref.isContentNodeEmpty;
|
|
17
|
+
var _useSharedPluginState = useSharedPluginState(api, ['typeAhead']),
|
|
18
|
+
typeAheadState = _useSharedPluginState.typeAheadState;
|
|
19
|
+
return /*#__PURE__*/React.createElement(DecisionItem, {
|
|
20
|
+
contentRef: forwardRef,
|
|
21
|
+
showPlaceholder: isContentNodeEmpty && !(typeAheadState !== null && typeAheadState !== void 0 && typeAheadState.isOpen)
|
|
22
|
+
});
|
|
23
|
+
};
|
|
13
24
|
var Decision = /*#__PURE__*/function (_ReactNodeView) {
|
|
14
25
|
_inherits(Decision, _ReactNodeView);
|
|
15
26
|
var _super = _createSuper(Decision);
|
|
@@ -22,6 +33,13 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
22
33
|
value: function isContentEmpty(node) {
|
|
23
34
|
return node.content.childCount === 0;
|
|
24
35
|
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "initWithAPI",
|
|
38
|
+
value: function initWithAPI(api) {
|
|
39
|
+
this.init();
|
|
40
|
+
this.api = api;
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
25
43
|
}, {
|
|
26
44
|
key: "createDomRef",
|
|
27
45
|
value: function createDomRef() {
|
|
@@ -43,9 +61,11 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
43
61
|
}, {
|
|
44
62
|
key: "render",
|
|
45
63
|
value: function render(_props, forwardRef) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
var isContentNodeEmpty = this.isContentEmpty(this.node);
|
|
65
|
+
return /*#__PURE__*/React.createElement(DecisionItemWrapper, {
|
|
66
|
+
forwardRef: forwardRef,
|
|
67
|
+
isContentNodeEmpty: isContentNodeEmpty,
|
|
68
|
+
api: this.api
|
|
49
69
|
});
|
|
50
70
|
}
|
|
51
71
|
}, {
|
|
@@ -71,9 +91,9 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
71
91
|
}]);
|
|
72
92
|
return Decision;
|
|
73
93
|
}(ReactNodeView);
|
|
74
|
-
export var decisionItemNodeView = function decisionItemNodeView(portalProviderAPI, eventDispatcher) {
|
|
94
|
+
export var decisionItemNodeView = function decisionItemNodeView(portalProviderAPI, eventDispatcher, api) {
|
|
75
95
|
return function (node, view, getPos) {
|
|
76
96
|
var hasIntlContext = true;
|
|
77
|
-
return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).
|
|
97
|
+
return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
|
|
78
98
|
};
|
|
79
99
|
};
|
|
@@ -13,11 +13,35 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { AnalyticsListener } from '@atlaskit/analytics-next';
|
|
15
15
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
16
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
16
17
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
17
|
-
import WithPluginState from '
|
|
18
|
+
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
18
19
|
import { stateKey as taskPluginKey } from '../pm-plugins/plugin-key';
|
|
19
20
|
import TaskItem from '../ui/Task';
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
//import { isTypeAheadOpen } from '../../type-ahead/utils';
|
|
23
|
+
|
|
24
|
+
var TaskItemWrapper = function TaskItemWrapper(_ref) {
|
|
25
|
+
var localId = _ref.localId,
|
|
26
|
+
forwardRef = _ref.forwardRef,
|
|
27
|
+
isDone = _ref.isDone,
|
|
28
|
+
onChange = _ref.onChange,
|
|
29
|
+
isFocused = _ref.isFocused,
|
|
30
|
+
isContentNodeEmpty = _ref.isContentNodeEmpty,
|
|
31
|
+
providerFactory = _ref.providerFactory,
|
|
32
|
+
api = _ref.api;
|
|
33
|
+
var _useSharedPluginState = useSharedPluginState(api, ['typeAhead']),
|
|
34
|
+
typeAheadState = _useSharedPluginState.typeAheadState;
|
|
35
|
+
return /*#__PURE__*/React.createElement(TaskItem, {
|
|
36
|
+
taskId: localId,
|
|
37
|
+
contentRef: forwardRef,
|
|
38
|
+
isDone: isDone,
|
|
39
|
+
onChange: onChange,
|
|
40
|
+
isFocused: isFocused,
|
|
41
|
+
showPlaceholder: isContentNodeEmpty && !(typeAheadState !== null && typeAheadState !== void 0 && typeAheadState.isOpen),
|
|
42
|
+
providers: providerFactory
|
|
43
|
+
});
|
|
44
|
+
};
|
|
21
45
|
var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
22
46
|
_inherits(Task, _ReactNodeView);
|
|
23
47
|
var _super = _createSuper(Task);
|
|
@@ -88,6 +112,13 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
88
112
|
return _this;
|
|
89
113
|
}
|
|
90
114
|
_createClass(Task, [{
|
|
115
|
+
key: "initWithAPI",
|
|
116
|
+
value: function initWithAPI(api) {
|
|
117
|
+
this.init();
|
|
118
|
+
this.api = api;
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
91
122
|
key: "isContentEmpty",
|
|
92
123
|
value: function isContentEmpty(node) {
|
|
93
124
|
return node.content.childCount === 0;
|
|
@@ -117,6 +148,7 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
117
148
|
var _this$node$attrs = this.node.attrs,
|
|
118
149
|
localId = _this$node$attrs.localId,
|
|
119
150
|
state = _this$node$attrs.state;
|
|
151
|
+
var isContentNodeEmpty = this.isContentEmpty(this.node);
|
|
120
152
|
return /*#__PURE__*/React.createElement(AnalyticsListener, {
|
|
121
153
|
channel: "fabric-elements",
|
|
122
154
|
onEvent: this.addListAnalyticsData
|
|
@@ -124,16 +156,17 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
124
156
|
plugins: {
|
|
125
157
|
taskDecisionPlugin: taskPluginKey
|
|
126
158
|
},
|
|
127
|
-
render: function render(
|
|
128
|
-
var taskDecisionPlugin =
|
|
129
|
-
return /*#__PURE__*/React.createElement(
|
|
130
|
-
|
|
131
|
-
|
|
159
|
+
render: function render(_ref2) {
|
|
160
|
+
var taskDecisionPlugin = _ref2.taskDecisionPlugin;
|
|
161
|
+
return /*#__PURE__*/React.createElement(TaskItemWrapper, {
|
|
162
|
+
localId: localId,
|
|
163
|
+
forwardRef: forwardRef,
|
|
132
164
|
isDone: state === 'DONE',
|
|
133
165
|
onChange: _this2.handleOnChange,
|
|
134
|
-
isFocused: (taskDecisionPlugin === null || taskDecisionPlugin === void 0 ? void 0 : taskDecisionPlugin.focusedTaskItemLocalId) === localId,
|
|
135
|
-
|
|
136
|
-
|
|
166
|
+
isFocused: Boolean((taskDecisionPlugin === null || taskDecisionPlugin === void 0 ? void 0 : taskDecisionPlugin.focusedTaskItemLocalId) === localId),
|
|
167
|
+
isContentNodeEmpty: isContentNodeEmpty,
|
|
168
|
+
providerFactory: props.providerFactory,
|
|
169
|
+
api: _this2.api
|
|
137
170
|
});
|
|
138
171
|
}
|
|
139
172
|
}));
|
|
@@ -162,11 +195,11 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
162
195
|
}]);
|
|
163
196
|
return Task;
|
|
164
197
|
}(ReactNodeView);
|
|
165
|
-
export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
198
|
+
export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api) {
|
|
166
199
|
return function (node, view, getPos) {
|
|
167
200
|
var hasIntlContext = true;
|
|
168
201
|
return new Task(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
169
202
|
providerFactory: providerFactory
|
|
170
|
-
}, undefined, undefined, undefined, hasIntlContext).
|
|
203
|
+
}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
|
|
171
204
|
};
|
|
172
205
|
}
|
|
@@ -6,14 +6,21 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { uuid } from '@atlaskit/adf-schema';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { getStepRange } from '@atlaskit/editor-common/utils';
|
|
10
|
+
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
11
|
+
import { createSelectionClickHandler, GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
11
12
|
import { decisionItemNodeView } from '../nodeviews/decisionItem';
|
|
12
13
|
import { taskItemNodeViewFactory } from '../nodeviews/taskItem';
|
|
13
14
|
import { stateKey } from './plugin-key';
|
|
14
15
|
import { getTaskItemDataToFocus, getTaskItemDataAtPos, focusCheckboxAndUpdateSelection, removeCheckboxFocus } from './helpers';
|
|
15
|
-
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
16
16
|
import { ACTIONS } from './types';
|
|
17
|
+
function nodesBetweenChanged(tr, f, startPos) {
|
|
18
|
+
var stepRange = getStepRange(tr);
|
|
19
|
+
if (!stepRange) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
23
|
+
}
|
|
17
24
|
var setContextIdentifierProvider = function setContextIdentifierProvider(provider) {
|
|
18
25
|
return function (state, dispatch) {
|
|
19
26
|
if (dispatch) {
|
|
@@ -25,13 +32,13 @@ var setContextIdentifierProvider = function setContextIdentifierProvider(provide
|
|
|
25
32
|
return true;
|
|
26
33
|
};
|
|
27
34
|
};
|
|
28
|
-
export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch) {
|
|
29
|
-
var useLongPressSelection = arguments.length >
|
|
35
|
+
export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, api) {
|
|
36
|
+
var useLongPressSelection = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
30
37
|
return new SafePlugin({
|
|
31
38
|
props: {
|
|
32
39
|
nodeViews: {
|
|
33
|
-
taskItem: taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory),
|
|
34
|
-
decisionItem: decisionItemNodeView(portalProviderAPI, eventDispatcher)
|
|
40
|
+
taskItem: taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api),
|
|
41
|
+
decisionItem: decisionItemNodeView(portalProviderAPI, eventDispatcher, api)
|
|
35
42
|
},
|
|
36
43
|
handleTextInput: function handleTextInput(view, from, to, text) {
|
|
37
44
|
// When a decision item is selected and the user starts typing, the entire node
|
|
@@ -1,8 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
8
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
9
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
+
import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
12
|
+
import type { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
|
|
13
|
+
import type { Dispatch } from '../event-dispatcher';
|
|
14
|
+
import { EventDispatcher } from '../event-dispatcher';
|
|
15
|
+
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import type { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
|
|
17
|
+
import type { EditorNextProps } from '../types/editor-props';
|
|
18
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
19
|
+
import type { SetEditorAPI } from '../presets/context';
|
|
20
|
+
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
21
|
+
import type { FireAnalyticsCallback, AnalyticsEventPayload, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
22
|
+
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
23
|
+
export interface EditorViewProps {
|
|
24
|
+
editorProps: EditorProps | EditorNextProps;
|
|
25
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
26
|
+
providerFactory: ProviderFactory;
|
|
27
|
+
portalProviderAPI: PortalProviderAPI;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
experienceStore?: ExperienceStore;
|
|
30
|
+
setEditorApi?: SetEditorAPI;
|
|
31
|
+
render?: (props: {
|
|
32
|
+
editor: JSX.Element;
|
|
33
|
+
view?: EditorView;
|
|
34
|
+
config: EditorConfig;
|
|
35
|
+
eventDispatcher: EventDispatcher;
|
|
36
|
+
transformer?: Transformer<string>;
|
|
37
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
38
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
onEditorCreated: (instance: {
|
|
41
|
+
view: EditorView;
|
|
42
|
+
config: EditorConfig;
|
|
43
|
+
eventDispatcher: EventDispatcher;
|
|
44
|
+
transformer?: Transformer<string>;
|
|
45
|
+
}) => void;
|
|
46
|
+
onEditorDestroyed: (instance: {
|
|
47
|
+
view: EditorView;
|
|
48
|
+
config: EditorConfig;
|
|
49
|
+
eventDispatcher: EventDispatcher;
|
|
50
|
+
transformer?: Transformer<string>;
|
|
51
|
+
}) => void;
|
|
52
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
4
53
|
}
|
|
5
|
-
|
|
6
|
-
|
|
54
|
+
interface CreateEditorStateOptions {
|
|
55
|
+
props: EditorViewProps;
|
|
56
|
+
context: EditorReactContext;
|
|
57
|
+
doc?: string | Object | PMNode;
|
|
58
|
+
resetting?: boolean;
|
|
59
|
+
selectionAtStart?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
|
|
62
|
+
view?: EditorView;
|
|
63
|
+
eventDispatcher: EventDispatcher;
|
|
64
|
+
contentTransformer?: Transformer<string>;
|
|
65
|
+
config: EditorConfig;
|
|
66
|
+
editorState: EditorState;
|
|
67
|
+
errorReporter: ErrorReporter;
|
|
68
|
+
dispatch: Dispatch;
|
|
69
|
+
proseMirrorRenderedSeverity?: SEVERITY;
|
|
70
|
+
transactionTracker: TransactionTracker;
|
|
71
|
+
validTransactionCount: number;
|
|
72
|
+
experienceStore?: ExperienceStore;
|
|
73
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
74
|
+
static contextTypes: {
|
|
75
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
76
|
+
};
|
|
77
|
+
private canDispatchTransactions;
|
|
78
|
+
private focusTimeoutId?;
|
|
79
|
+
private reliabilityInterval?;
|
|
80
|
+
private pluginPerformanceObserver;
|
|
81
|
+
private featureFlags;
|
|
82
|
+
private pluginInjectionAPI;
|
|
83
|
+
private onPluginObservation;
|
|
84
|
+
get transactionTracking(): import("@atlaskit/editor-common/types").TransactionTracking;
|
|
85
|
+
private getPluginNames;
|
|
86
|
+
private countNodes;
|
|
87
|
+
private isTransactionTrackingExplicitlyDisabled;
|
|
88
|
+
constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
|
|
89
|
+
getEditorState: () => EditorState | undefined;
|
|
90
|
+
getEditorView: () => EditorView | undefined;
|
|
91
|
+
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
92
|
+
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
93
|
+
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
|
94
|
+
doc: string;
|
|
95
|
+
shouldScrollToBottom: boolean;
|
|
96
|
+
}) => void;
|
|
97
|
+
blur: () => void;
|
|
98
|
+
reconfigureState(props: EditorViewProps): void;
|
|
99
|
+
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
100
|
+
componentDidMount(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Clean up any non-PM resources when the editor is unmounted
|
|
103
|
+
*/
|
|
104
|
+
componentWillUnmount(): void;
|
|
105
|
+
private editorPlugins;
|
|
106
|
+
getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
|
|
107
|
+
createEditorState: (options: CreateEditorStateOptions) => EditorState;
|
|
108
|
+
private onEditorViewStateUpdated;
|
|
109
|
+
private trackValidTransactions;
|
|
110
|
+
private dispatchTransaction;
|
|
111
|
+
getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
|
|
112
|
+
private createEditorView;
|
|
113
|
+
handleEditorViewRef: (node: HTMLDivElement) => void;
|
|
114
|
+
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
115
|
+
private createEditor;
|
|
116
|
+
private editor;
|
|
117
|
+
render(): JSX.Element;
|
|
118
|
+
}
|
|
119
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
|
|
120
|
+
WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
|
|
7
121
|
};
|
|
8
122
|
export default _default;
|