@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
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
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; }
|
|
3
|
-
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; }
|
|
4
|
-
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import { InsertTypeAheadStep, InsertTypeAheadStages } from '@atlaskit/adf-schema/steps';
|
|
6
|
-
import { ACTIONS } from './actions';
|
|
7
|
-
import { pluginKey } from './key';
|
|
8
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
|
-
import { isTypeAheadHandler } from '../utils';
|
|
10
|
-
var shouldForceOpen = function shouldForceOpen(step) {
|
|
11
|
-
if (!(step instanceof InsertTypeAheadStep)) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
var isDeletionRawQueryOperation = step.isInsertionStep() && step.stage === InsertTypeAheadStages.DELETING_RAW_QUERY;
|
|
15
|
-
var isUndoingInsertionItem = step.isUndoingStep() && step.stage === InsertTypeAheadStages.INSERTING_ITEM;
|
|
16
|
-
return isDeletionRawQueryOperation || isUndoingInsertionItem;
|
|
17
|
-
};
|
|
18
|
-
var shouldForceClose = function shouldForceClose(step) {
|
|
19
|
-
if (!(step instanceof InsertTypeAheadStep)) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
var isInsertingItem = step.isInsertionStep() && step.stage === InsertTypeAheadStages.INSERTING_ITEM;
|
|
23
|
-
var isUndoingDeletionRawQuery = step.isUndoingStep() && step.stage === InsertTypeAheadStages.DELETING_RAW_QUERY;
|
|
24
|
-
return isInsertingItem || isUndoingDeletionRawQuery;
|
|
25
|
-
};
|
|
26
|
-
var createFindHandler = function createFindHandler(typeAheadHandlers) {
|
|
27
|
-
return function (step) {
|
|
28
|
-
if (!(step instanceof InsertTypeAheadStep)) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
var handler = typeAheadHandlers.find(function (h) {
|
|
32
|
-
return h.trigger === step.trigger;
|
|
33
|
-
});
|
|
34
|
-
return handler || null;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export var createReducer = function createReducer(_ref) {
|
|
38
|
-
var typeAheadHandlers = _ref.typeAheadHandlers,
|
|
39
|
-
removeDecorations = _ref.removeDecorations,
|
|
40
|
-
createDecorations = _ref.createDecorations;
|
|
41
|
-
var findHandler = createFindHandler(typeAheadHandlers);
|
|
42
|
-
var openMenu = function openMenu(currentPluginState, _ref2) {
|
|
43
|
-
var tr = _ref2.tr,
|
|
44
|
-
triggerHandler = _ref2.triggerHandler,
|
|
45
|
-
inputMethod = _ref2.inputMethod,
|
|
46
|
-
reopenQuery = _ref2.reopenQuery,
|
|
47
|
-
selectedIndex = _ref2.selectedIndex;
|
|
48
|
-
removeDecorations(currentPluginState.decorationSet);
|
|
49
|
-
var _createDecorations = createDecorations(tr, {
|
|
50
|
-
triggerHandler: triggerHandler,
|
|
51
|
-
inputMethod: inputMethod,
|
|
52
|
-
reopenQuery: reopenQuery
|
|
53
|
-
}),
|
|
54
|
-
decorationSet = _createDecorations.decorationSet,
|
|
55
|
-
decorationElement = _createDecorations.decorationElement,
|
|
56
|
-
stats = _createDecorations.stats;
|
|
57
|
-
return _objectSpread(_objectSpread({}, currentPluginState), {}, {
|
|
58
|
-
stats: stats,
|
|
59
|
-
decorationSet: decorationSet,
|
|
60
|
-
triggerHandler: triggerHandler,
|
|
61
|
-
decorationElement: decorationElement,
|
|
62
|
-
inputMethod: inputMethod,
|
|
63
|
-
selectedIndex: typeof selectedIndex === 'number' ? selectedIndex : -1,
|
|
64
|
-
items: [],
|
|
65
|
-
query: reopenQuery || ''
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
var closeMenu = function closeMenu(currentPluginState) {
|
|
69
|
-
removeDecorations(currentPluginState.decorationSet);
|
|
70
|
-
return _objectSpread(_objectSpread({}, currentPluginState), {}, {
|
|
71
|
-
inputMethod: null,
|
|
72
|
-
query: '',
|
|
73
|
-
decorationElement: null,
|
|
74
|
-
decorationSet: DecorationSet.empty,
|
|
75
|
-
stats: null,
|
|
76
|
-
triggerHandler: undefined,
|
|
77
|
-
items: []
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
return function (tr, currentPluginState, typeAheadStepOverride) {
|
|
81
|
-
var meta = tr.getMeta(pluginKey) || {};
|
|
82
|
-
|
|
83
|
-
// This code below controls when we should force
|
|
84
|
-
// the menu to open or close during undo/redo operations
|
|
85
|
-
var overrideHandler = findHandler(typeAheadStepOverride);
|
|
86
|
-
if (typeAheadStepOverride && overrideHandler && shouldForceOpen(typeAheadStepOverride)) {
|
|
87
|
-
return openMenu(currentPluginState, {
|
|
88
|
-
tr: tr,
|
|
89
|
-
triggerHandler: overrideHandler,
|
|
90
|
-
inputMethod: INPUT_METHOD.KEYBOARD,
|
|
91
|
-
reopenQuery: typeAheadStepOverride.query,
|
|
92
|
-
selectedIndex: typeAheadStepOverride.selectedIndex
|
|
93
|
-
});
|
|
94
|
-
} else if (shouldForceClose(typeAheadStepOverride)) {
|
|
95
|
-
return closeMenu(currentPluginState);
|
|
96
|
-
}
|
|
97
|
-
var _ref3 = meta || {},
|
|
98
|
-
action = _ref3.action,
|
|
99
|
-
params = _ref3.params;
|
|
100
|
-
var shouldOpenMenu = action === ACTIONS.OPEN_TYPEAHEAD_AT_CURSOR && isTypeAheadHandler(params === null || params === void 0 ? void 0 : params.triggerHandler);
|
|
101
|
-
var selectionChanged = tr.selectionSet && (tr.isGeneric || Boolean(tr.getMeta('pointer')));
|
|
102
|
-
var shouldCloseMenu = [ACTIONS.CLOSE_TYPE_AHEAD, ACTIONS.INSERT_ITEM].includes(action) || selectionChanged;
|
|
103
|
-
var shouldUpdateQuery = action === ACTIONS.CHANGE_QUERY;
|
|
104
|
-
var shouldUpdateListItems = action === ACTIONS.UPDATE_LIST_ITEMS;
|
|
105
|
-
var shouldUpdateSelectedIndex = action === ACTIONS.UPDATE_SELECTED_INDEX;
|
|
106
|
-
if (shouldOpenMenu) {
|
|
107
|
-
return openMenu(currentPluginState, {
|
|
108
|
-
tr: tr,
|
|
109
|
-
triggerHandler: params.triggerHandler,
|
|
110
|
-
inputMethod: params.inputMethod
|
|
111
|
-
});
|
|
112
|
-
} else if (shouldCloseMenu) {
|
|
113
|
-
return closeMenu(currentPluginState);
|
|
114
|
-
} else if (shouldUpdateQuery) {
|
|
115
|
-
return _objectSpread(_objectSpread({}, currentPluginState), {}, {
|
|
116
|
-
query: params.query
|
|
117
|
-
});
|
|
118
|
-
} else if (shouldUpdateListItems) {
|
|
119
|
-
var items = params.items;
|
|
120
|
-
var selectedIndex = currentPluginState.selectedIndex;
|
|
121
|
-
return _objectSpread(_objectSpread({}, currentPluginState), {}, {
|
|
122
|
-
items: items,
|
|
123
|
-
selectedIndex: Math.max(selectedIndex >= items.length ? items.length - 1 : selectedIndex, -1)
|
|
124
|
-
});
|
|
125
|
-
} else if (shouldUpdateSelectedIndex) {
|
|
126
|
-
return _objectSpread(_objectSpread({}, currentPluginState), {}, {
|
|
127
|
-
selectedIndex: params.selectedIndex
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
if (tr.docChanged) {
|
|
131
|
-
var decorationSet = currentPluginState.decorationSet;
|
|
132
|
-
var onRemove = function onRemove() {
|
|
133
|
-
// Make sure we are unmounting the component
|
|
134
|
-
// from the react tree when this decoration is removed
|
|
135
|
-
removeDecorations(currentPluginState.decorationSet);
|
|
136
|
-
};
|
|
137
|
-
var mappedDecorationSet = decorationSet.map(tr.mapping, tr.doc, {
|
|
138
|
-
onRemove: onRemove
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
// return same pluginState if decorationSet did not change
|
|
142
|
-
if (mappedDecorationSet === currentPluginState.decorationSet) {
|
|
143
|
-
return currentPluginState;
|
|
144
|
-
}
|
|
145
|
-
return _objectSpread(_objectSpread({}, currentPluginState), {}, {
|
|
146
|
-
decorationSet: mappedDecorationSet
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
return currentPluginState;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { pluginKey } from './key';
|
|
2
|
-
export var isInsertionTransaction = function isInsertionTransaction(transactions, action) {
|
|
3
|
-
var _tr$getMeta2;
|
|
4
|
-
var tr = transactions.find(function (tr) {
|
|
5
|
-
var _tr$getMeta;
|
|
6
|
-
return ((_tr$getMeta = tr.getMeta(pluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.action) === action;
|
|
7
|
-
});
|
|
8
|
-
if (!tr) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return (_tr$getMeta2 = tr.getMeta(pluginKey)) === null || _tr$getMeta2 === void 0 ? void 0 : _tr$getMeta2.params;
|
|
12
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
export var StatsModifier = /*#__PURE__*/_createClass(function StatsModifier() {
|
|
5
|
-
var _this = this;
|
|
6
|
-
_classCallCheck(this, StatsModifier);
|
|
7
|
-
_defineProperty(this, "startedAt", 0);
|
|
8
|
-
_defineProperty(this, "endedAt", 0);
|
|
9
|
-
_defineProperty(this, "keyCount", {
|
|
10
|
-
arrowUp: 0,
|
|
11
|
-
arrowDown: 0
|
|
12
|
-
});
|
|
13
|
-
_defineProperty(this, "increaseArrowUp", function () {
|
|
14
|
-
_this.keyCount.arrowUp += 1;
|
|
15
|
-
});
|
|
16
|
-
_defineProperty(this, "increaseArrowDown", function () {
|
|
17
|
-
_this.keyCount.arrowDown += 1;
|
|
18
|
-
});
|
|
19
|
-
_defineProperty(this, "serialize", function () {
|
|
20
|
-
var _this$keyCount, _this$keyCount2;
|
|
21
|
-
return {
|
|
22
|
-
startedAt: _this.startedAt,
|
|
23
|
-
endedAt: performance.now(),
|
|
24
|
-
keyCount: {
|
|
25
|
-
arrowUp: ((_this$keyCount = _this.keyCount) === null || _this$keyCount === void 0 ? void 0 : _this$keyCount.arrowUp) || 0,
|
|
26
|
-
arrowDown: ((_this$keyCount2 = _this.keyCount) === null || _this$keyCount2 === void 0 ? void 0 : _this$keyCount2.arrowDown) || 0
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
this.startedAt = performance.now();
|
|
31
|
-
this.keyCount = {
|
|
32
|
-
arrowUp: 0,
|
|
33
|
-
arrowDown: 0
|
|
34
|
-
};
|
|
35
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import { pluginKey } from '../pm-plugins/key';
|
|
4
|
-
import { ACTIONS } from '../pm-plugins/actions';
|
|
5
|
-
export var openTypeAhead = function openTypeAhead(props) {
|
|
6
|
-
return function (tr) {
|
|
7
|
-
var triggerHandler = props.triggerHandler,
|
|
8
|
-
inputMethod = props.inputMethod,
|
|
9
|
-
query = props.query;
|
|
10
|
-
tr.setMeta(pluginKey, {
|
|
11
|
-
action: ACTIONS.OPEN_TYPEAHEAD_AT_CURSOR,
|
|
12
|
-
params: {
|
|
13
|
-
triggerHandler: triggerHandler,
|
|
14
|
-
inputMethod: inputMethod,
|
|
15
|
-
query: query
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export var openTypeAheadAtCursor = function openTypeAheadAtCursor(_ref) {
|
|
21
|
-
var triggerHandler = _ref.triggerHandler,
|
|
22
|
-
inputMethod = _ref.inputMethod,
|
|
23
|
-
query = _ref.query;
|
|
24
|
-
return function (_ref2) {
|
|
25
|
-
var tr = _ref2.tr;
|
|
26
|
-
openTypeAhead({
|
|
27
|
-
triggerHandler: triggerHandler,
|
|
28
|
-
inputMethod: inputMethod,
|
|
29
|
-
query: query
|
|
30
|
-
})(tr);
|
|
31
|
-
var selection = tr.selection;
|
|
32
|
-
if (!(selection instanceof TextSelection || selection instanceof GapCursorSelection)) {
|
|
33
|
-
return tr;
|
|
34
|
-
}
|
|
35
|
-
if (selection instanceof GapCursorSelection) {
|
|
36
|
-
// Create space for the typeahead menu in gap cursor
|
|
37
|
-
tr.insertText(' ');
|
|
38
|
-
// delete 1 pos before wherever selection is now - that will delete the empty space
|
|
39
|
-
tr.delete(tr.selection.from - 1, tr.selection.from);
|
|
40
|
-
} else {
|
|
41
|
-
var _selection$$head, _selection$$head$pare, _selection$$head$pare2;
|
|
42
|
-
if (!selection.$cursor) {
|
|
43
|
-
tr.deleteSelection();
|
|
44
|
-
return tr;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Search & Destroy placeholder
|
|
48
|
-
var cursorPos = selection.$cursor.pos;
|
|
49
|
-
var nodeAtCursor = tr.doc.nodeAt(cursorPos);
|
|
50
|
-
var isPlaceholderAtCursorPosition = nodeAtCursor && nodeAtCursor.type.name === 'placeholder';
|
|
51
|
-
if (nodeAtCursor && isPlaceholderAtCursorPosition) {
|
|
52
|
-
tr.delete(cursorPos, cursorPos + nodeAtCursor.nodeSize);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// ME-2375 remove the superfluous '@' inserted before decoration
|
|
56
|
-
// by composition (https://github.com/ProseMirror/prosemirror/issues/903)
|
|
57
|
-
//
|
|
58
|
-
// Update:
|
|
59
|
-
// Now also handles any use case with superfluous typeahead triggers (ie. '@', ':', '/')
|
|
60
|
-
// being inserted due to composition by checking if we have the trigger
|
|
61
|
-
// directly before the typeahead. This should not happen unless it has
|
|
62
|
-
// been eroneously added because we require whitespace/newline for typeahead.
|
|
63
|
-
if (cursorPos >= 2 && !!(selection !== null && selection !== void 0 && (_selection$$head = selection.$head) !== null && _selection$$head !== void 0 && (_selection$$head = _selection$$head.parent) !== null && _selection$$head !== void 0 && _selection$$head.textContent) && (_selection$$head$pare = (_selection$$head$pare2 = selection.$head.parent.textContent).endsWith) !== null && _selection$$head$pare !== void 0 && _selection$$head$pare.call(_selection$$head$pare2, triggerHandler.trigger)) {
|
|
64
|
-
tr.delete(cursorPos - 1, cursorPos);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return tr;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export var setSelectionBeforeQuery = function setSelectionBeforeQuery(rawText) {
|
|
3
|
-
return function (tr) {
|
|
4
|
-
var currentPosition = tr.selection.$from.pos;
|
|
5
|
-
var positionBeforeRawText = Math.max(currentPosition - rawText.length, 0);
|
|
6
|
-
var resolvedPositionBeforeText = tr.doc.resolve(positionBeforeRawText);
|
|
7
|
-
var nextSelection = TextSelection.findFrom(resolvedPositionBeforeText, -1, true);
|
|
8
|
-
if (nextSelection) {
|
|
9
|
-
tr.setSelection(nextSelection);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
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; } }
|
|
10
|
-
/** @jsx jsx */
|
|
11
|
-
|
|
12
|
-
import debounce from 'lodash/debounce';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { css, jsx } from '@emotion/react';
|
|
15
|
-
var statusDebounceMillis = 1400;
|
|
16
|
-
var assitiveTextStyles = css({
|
|
17
|
-
border: 0,
|
|
18
|
-
clip: 'rect(0 0 0 0)',
|
|
19
|
-
height: '1px',
|
|
20
|
-
marginbottom: '-1px',
|
|
21
|
-
marginright: '-1px',
|
|
22
|
-
overflow: 'hidden',
|
|
23
|
-
padding: 0,
|
|
24
|
-
position: 'absolute',
|
|
25
|
-
whitespace: 'nowrap',
|
|
26
|
-
width: '1px'
|
|
27
|
-
});
|
|
28
|
-
var AssistveTextComponent = /*#__PURE__*/function (_React$Component) {
|
|
29
|
-
_inherits(AssistveTextComponent, _React$Component);
|
|
30
|
-
var _super = _createSuper(AssistveTextComponent);
|
|
31
|
-
function AssistveTextComponent() {
|
|
32
|
-
var _this;
|
|
33
|
-
_classCallCheck(this, AssistveTextComponent);
|
|
34
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
|
-
args[_key] = arguments[_key];
|
|
36
|
-
}
|
|
37
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
38
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
39
|
-
bump: false,
|
|
40
|
-
//when the same text needs to be read again, Hence it needs to be toggled between __status--A and __status--B
|
|
41
|
-
debounced: false,
|
|
42
|
-
silenced: false
|
|
43
|
-
});
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
_createClass(AssistveTextComponent, [{
|
|
47
|
-
key: "componentWillMount",
|
|
48
|
-
value: function componentWillMount() {
|
|
49
|
-
var _this2 = this;
|
|
50
|
-
this.debounceStatusUpdate = debounce(function () {
|
|
51
|
-
if (!_this2.state.debounced) {
|
|
52
|
-
var shouldSilence = !_this2.props.isInFocus;
|
|
53
|
-
_this2.setState(function (_ref) {
|
|
54
|
-
var bump = _ref.bump;
|
|
55
|
-
return {
|
|
56
|
-
bump: !bump,
|
|
57
|
-
debounced: true,
|
|
58
|
-
silenced: shouldSilence
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}, statusDebounceMillis);
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
|
-
key: "componentWillUnmount",
|
|
66
|
-
value: function componentWillUnmount() {
|
|
67
|
-
this.debounceStatusUpdate.cancel();
|
|
68
|
-
}
|
|
69
|
-
}, {
|
|
70
|
-
key: "componentWillReceiveProps",
|
|
71
|
-
value: function componentWillReceiveProps() {
|
|
72
|
-
this.setState(function (_ref2) {
|
|
73
|
-
var bump = _ref2.bump;
|
|
74
|
-
return {
|
|
75
|
-
bump: !bump,
|
|
76
|
-
debounced: false
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}, {
|
|
81
|
-
key: "render",
|
|
82
|
-
value: function render() {
|
|
83
|
-
var _this$props = this.props,
|
|
84
|
-
assistiveText = _this$props.assistiveText,
|
|
85
|
-
id = _this$props.id;
|
|
86
|
-
var _this$state = this.state,
|
|
87
|
-
bump = _this$state.bump,
|
|
88
|
-
debounced = _this$state.debounced,
|
|
89
|
-
silenced = _this$state.silenced;
|
|
90
|
-
this.debounceStatusUpdate();
|
|
91
|
-
return jsx("div", {
|
|
92
|
-
css: assitiveTextStyles
|
|
93
|
-
}, jsx("div", {
|
|
94
|
-
id: id + '__status--A',
|
|
95
|
-
role: "status",
|
|
96
|
-
"aria-atomic": "true",
|
|
97
|
-
"aria-live": "polite"
|
|
98
|
-
}, "".concat(!silenced && debounced && bump ? assistiveText : '')), jsx("div", {
|
|
99
|
-
id: id + '__status--B',
|
|
100
|
-
role: "status",
|
|
101
|
-
"aria-atomic": "true",
|
|
102
|
-
"aria-live": "polite"
|
|
103
|
-
}, "".concat(!silenced && debounced && !bump ? assistiveText : '')));
|
|
104
|
-
}
|
|
105
|
-
}]);
|
|
106
|
-
return AssistveTextComponent;
|
|
107
|
-
}(React.Component);
|
|
108
|
-
_defineProperty(AssistveTextComponent, "defaultProps", {
|
|
109
|
-
statusDebounceMillis: 1400,
|
|
110
|
-
debounce: true,
|
|
111
|
-
assistiveText: '',
|
|
112
|
-
isInFocus: false,
|
|
113
|
-
id: ''
|
|
114
|
-
});
|
|
115
|
-
export var AssistiveText = AssistveTextComponent;
|