@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';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin,
|
|
1
|
+
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';
|
|
2
|
+
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
2
3
|
import { datePlugin } from '../../../plugins/date';
|
|
3
4
|
import { captionPlugin } from '@atlaskit/editor-plugin-caption';
|
|
4
5
|
import { borderPlugin } from '@atlaskit/editor-plugin-border';
|
|
@@ -15,6 +16,8 @@ import { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
|
15
16
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
16
17
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
17
18
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
19
|
+
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
20
|
+
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
18
21
|
import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
|
|
19
22
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
20
23
|
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';
|
|
@@ -69,7 +67,6 @@ const insertBlockPlugin = ({
|
|
|
69
67
|
// `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
|
|
70
68
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
71
69
|
plugins: {
|
|
72
|
-
typeAheadState: typeAheadPluginKey,
|
|
73
70
|
macroState: macroStateKey,
|
|
74
71
|
placeholderTextState: placeholderTextStateKey,
|
|
75
72
|
layoutState: layoutStateKey
|
|
@@ -138,14 +135,15 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
138
135
|
mentionState,
|
|
139
136
|
emojiState,
|
|
140
137
|
blockTypeState,
|
|
141
|
-
mediaState
|
|
142
|
-
|
|
138
|
+
mediaState,
|
|
139
|
+
typeAheadState
|
|
140
|
+
} = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead']);
|
|
143
141
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
144
142
|
pluginInjectionApi: pluginInjectionApi,
|
|
145
143
|
buttons: buttons,
|
|
146
144
|
isReducedSpacing: isToolbarReducedSpacing,
|
|
147
145
|
isDisabled: disabled,
|
|
148
|
-
isTypeAheadAllowed:
|
|
146
|
+
isTypeAheadAllowed: Boolean(typeAheadState === null || typeAheadState === void 0 ? void 0 : typeAheadState.isAllowed),
|
|
149
147
|
editorView: editorView,
|
|
150
148
|
tableSupported: !!editorView.state.schema.nodes.table,
|
|
151
149
|
actionSupported: !!editorView.state.schema.nodes.taskItem,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { decisionItem, decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
|
|
4
|
-
import { INPUT_METHOD } from '
|
|
4
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { messages as insertBlockMessages } from '../insert-block/ui/ToolbarInsertBlock/messages';
|
|
6
6
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { insertTaskDecisionAction, getListTypes } from './commands';
|
|
@@ -32,7 +32,8 @@ const tasksAndDecisionsPlugin = ({
|
|
|
32
32
|
allowNestedTasks,
|
|
33
33
|
consumeTabs,
|
|
34
34
|
useLongPressSelection
|
|
35
|
-
} = {}
|
|
35
|
+
} = {},
|
|
36
|
+
api
|
|
36
37
|
}) => ({
|
|
37
38
|
name: 'taskDecision',
|
|
38
39
|
nodes() {
|
|
@@ -59,7 +60,7 @@ const tasksAndDecisionsPlugin = ({
|
|
|
59
60
|
eventDispatcher,
|
|
60
61
|
dispatch
|
|
61
62
|
}) => {
|
|
62
|
-
return createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, useLongPressSelection);
|
|
63
|
+
return createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, api, useLongPressSelection);
|
|
63
64
|
}
|
|
64
65
|
}, {
|
|
65
66
|
name: 'tasksAndDecisionsInputRule',
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
3
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
4
|
import DecisionItem from '../ui/Decision';
|
|
4
|
-
|
|
5
|
+
const DecisionItemWrapper = ({
|
|
6
|
+
api,
|
|
7
|
+
forwardRef,
|
|
8
|
+
isContentNodeEmpty
|
|
9
|
+
}) => {
|
|
10
|
+
const {
|
|
11
|
+
typeAheadState
|
|
12
|
+
} = useSharedPluginState(api, ['typeAhead']);
|
|
13
|
+
return /*#__PURE__*/React.createElement(DecisionItem, {
|
|
14
|
+
contentRef: forwardRef,
|
|
15
|
+
showPlaceholder: isContentNodeEmpty && !(typeAheadState !== null && typeAheadState !== void 0 && typeAheadState.isOpen)
|
|
16
|
+
});
|
|
17
|
+
};
|
|
5
18
|
class Decision extends ReactNodeView {
|
|
6
19
|
isContentEmpty(node) {
|
|
7
20
|
return node.content.childCount === 0;
|
|
8
21
|
}
|
|
22
|
+
initWithAPI(api) {
|
|
23
|
+
this.init();
|
|
24
|
+
this.api = api;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
9
27
|
createDomRef() {
|
|
10
28
|
const domRef = document.createElement('li');
|
|
11
29
|
domRef.style['list-style-type'] = 'none';
|
|
@@ -21,9 +39,11 @@ class Decision extends ReactNodeView {
|
|
|
21
39
|
};
|
|
22
40
|
}
|
|
23
41
|
render(_props, forwardRef) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
const isContentNodeEmpty = this.isContentEmpty(this.node);
|
|
43
|
+
return /*#__PURE__*/React.createElement(DecisionItemWrapper, {
|
|
44
|
+
forwardRef: forwardRef,
|
|
45
|
+
isContentNodeEmpty: isContentNodeEmpty,
|
|
46
|
+
api: this.api
|
|
27
47
|
});
|
|
28
48
|
}
|
|
29
49
|
viewShouldUpdate(nextNode) {
|
|
@@ -40,7 +60,7 @@ class Decision extends ReactNodeView {
|
|
|
40
60
|
(_currentNode, _newNode) => !this.isContentEmpty(_newNode));
|
|
41
61
|
}
|
|
42
62
|
}
|
|
43
|
-
export const decisionItemNodeView = (portalProviderAPI, eventDispatcher) => (node, view, getPos) => {
|
|
63
|
+
export const decisionItemNodeView = (portalProviderAPI, eventDispatcher, api) => (node, view, getPos) => {
|
|
44
64
|
const hasIntlContext = true;
|
|
45
|
-
return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).
|
|
65
|
+
return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
|
|
46
66
|
};
|
|
@@ -2,11 +2,37 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { AnalyticsListener } from '@atlaskit/analytics-next';
|
|
4
4
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
5
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
6
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
6
|
-
import WithPluginState from '
|
|
7
|
+
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
7
8
|
import { stateKey as taskPluginKey } from '../pm-plugins/plugin-key';
|
|
8
9
|
import TaskItem from '../ui/Task';
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
//import { isTypeAheadOpen } from '../../type-ahead/utils';
|
|
12
|
+
|
|
13
|
+
const TaskItemWrapper = ({
|
|
14
|
+
localId,
|
|
15
|
+
forwardRef,
|
|
16
|
+
isDone,
|
|
17
|
+
onChange,
|
|
18
|
+
isFocused,
|
|
19
|
+
isContentNodeEmpty,
|
|
20
|
+
providerFactory,
|
|
21
|
+
api
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
typeAheadState
|
|
25
|
+
} = useSharedPluginState(api, ['typeAhead']);
|
|
26
|
+
return /*#__PURE__*/React.createElement(TaskItem, {
|
|
27
|
+
taskId: localId,
|
|
28
|
+
contentRef: forwardRef,
|
|
29
|
+
isDone: isDone,
|
|
30
|
+
onChange: onChange,
|
|
31
|
+
isFocused: isFocused,
|
|
32
|
+
showPlaceholder: isContentNodeEmpty && !(typeAheadState !== null && typeAheadState !== void 0 && typeAheadState.isOpen),
|
|
33
|
+
providers: providerFactory
|
|
34
|
+
});
|
|
35
|
+
};
|
|
10
36
|
class Task extends ReactNodeView {
|
|
11
37
|
constructor(...args) {
|
|
12
38
|
super(...args);
|
|
@@ -73,6 +99,11 @@ class Task extends ReactNodeView {
|
|
|
73
99
|
}
|
|
74
100
|
});
|
|
75
101
|
}
|
|
102
|
+
initWithAPI(api) {
|
|
103
|
+
this.init();
|
|
104
|
+
this.api = api;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
76
107
|
isContentEmpty(node) {
|
|
77
108
|
return node.content.childCount === 0;
|
|
78
109
|
}
|
|
@@ -95,6 +126,7 @@ class Task extends ReactNodeView {
|
|
|
95
126
|
localId,
|
|
96
127
|
state
|
|
97
128
|
} = this.node.attrs;
|
|
129
|
+
const isContentNodeEmpty = this.isContentEmpty(this.node);
|
|
98
130
|
return /*#__PURE__*/React.createElement(AnalyticsListener, {
|
|
99
131
|
channel: "fabric-elements",
|
|
100
132
|
onEvent: this.addListAnalyticsData
|
|
@@ -105,14 +137,15 @@ class Task extends ReactNodeView {
|
|
|
105
137
|
render: ({
|
|
106
138
|
taskDecisionPlugin
|
|
107
139
|
}) => {
|
|
108
|
-
return /*#__PURE__*/React.createElement(
|
|
109
|
-
|
|
110
|
-
|
|
140
|
+
return /*#__PURE__*/React.createElement(TaskItemWrapper, {
|
|
141
|
+
localId: localId,
|
|
142
|
+
forwardRef: forwardRef,
|
|
111
143
|
isDone: state === 'DONE',
|
|
112
144
|
onChange: this.handleOnChange,
|
|
113
|
-
isFocused: (taskDecisionPlugin === null || taskDecisionPlugin === void 0 ? void 0 : taskDecisionPlugin.focusedTaskItemLocalId) === localId,
|
|
114
|
-
|
|
115
|
-
|
|
145
|
+
isFocused: Boolean((taskDecisionPlugin === null || taskDecisionPlugin === void 0 ? void 0 : taskDecisionPlugin.focusedTaskItemLocalId) === localId),
|
|
146
|
+
isContentNodeEmpty: isContentNodeEmpty,
|
|
147
|
+
providerFactory: props.providerFactory,
|
|
148
|
+
api: this.api
|
|
116
149
|
});
|
|
117
150
|
}
|
|
118
151
|
}));
|
|
@@ -131,11 +164,11 @@ class Task extends ReactNodeView {
|
|
|
131
164
|
!this.isContentEmpty(newNode) && !!(currentNode.attrs.state === newNode.attrs.state));
|
|
132
165
|
}
|
|
133
166
|
}
|
|
134
|
-
export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
167
|
+
export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api) {
|
|
135
168
|
return (node, view, getPos) => {
|
|
136
169
|
const hasIntlContext = true;
|
|
137
170
|
return new Task(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
138
171
|
providerFactory
|
|
139
|
-
}, undefined, undefined, undefined, hasIntlContext).
|
|
172
|
+
}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
|
|
140
173
|
};
|
|
141
174
|
}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { uuid } from '@atlaskit/adf-schema';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { getStepRange } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
6
|
+
import { createSelectionClickHandler, GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
6
7
|
import { decisionItemNodeView } from '../nodeviews/decisionItem';
|
|
7
8
|
import { taskItemNodeViewFactory } from '../nodeviews/taskItem';
|
|
8
9
|
import { stateKey } from './plugin-key';
|
|
9
10
|
import { getTaskItemDataToFocus, getTaskItemDataAtPos, focusCheckboxAndUpdateSelection, removeCheckboxFocus } from './helpers';
|
|
10
|
-
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
11
11
|
import { ACTIONS } from './types';
|
|
12
|
+
function nodesBetweenChanged(tr, f, startPos) {
|
|
13
|
+
const stepRange = getStepRange(tr);
|
|
14
|
+
if (!stepRange) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
18
|
+
}
|
|
12
19
|
const setContextIdentifierProvider = provider => (state, dispatch) => {
|
|
13
20
|
if (dispatch) {
|
|
14
21
|
dispatch(state.tr.setMeta(stateKey, {
|
|
@@ -18,12 +25,12 @@ const setContextIdentifierProvider = provider => (state, dispatch) => {
|
|
|
18
25
|
}
|
|
19
26
|
return true;
|
|
20
27
|
};
|
|
21
|
-
export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, useLongPressSelection = false) {
|
|
28
|
+
export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, api, useLongPressSelection = false) {
|
|
22
29
|
return new SafePlugin({
|
|
23
30
|
props: {
|
|
24
31
|
nodeViews: {
|
|
25
|
-
taskItem: taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory),
|
|
26
|
-
decisionItem: decisionItemNodeView(portalProviderAPI, eventDispatcher)
|
|
32
|
+
taskItem: taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api),
|
|
33
|
+
decisionItem: decisionItemNodeView(portalProviderAPI, eventDispatcher, api)
|
|
27
34
|
},
|
|
28
35
|
handleTextInput(view, from, to, text) {
|
|
29
36
|
// When a decision item is selected and the user starts typing, the entire node
|
|
@@ -10,7 +10,7 @@ import { BaseTheme, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
10
10
|
import { getUiComponent } from '../create-editor';
|
|
11
11
|
import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
12
12
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
13
|
-
import ReactEditorView from '../create-editor/
|
|
13
|
+
import ReactEditorView from '../create-editor/ReactEditorView';
|
|
14
14
|
import { ContextAdapter } from '../nodeviews/context-adapter';
|
|
15
15
|
import EditorContext from '../ui/EditorContext';
|
|
16
16
|
import { useSetPresetContext } from '../presets/context';
|