@atlaskit/editor-core 182.1.2 → 182.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/actions/index.js +90 -98
- package/dist/cjs/create-editor/ErrorBoundary.js +86 -93
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +8 -6
- package/dist/cjs/editor-next/index.js +5 -6
- package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +34 -37
- package/dist/cjs/editor-next/utils/trackEditorActions.js +48 -51
- package/dist/cjs/editor.js +29 -34
- package/dist/cjs/i18n/cs.js +34 -6
- package/dist/cjs/i18n/da.js +34 -6
- package/dist/cjs/i18n/de.js +34 -7
- package/dist/cjs/i18n/en.js +31 -4
- package/dist/cjs/i18n/en_GB.js +34 -7
- package/dist/cjs/i18n/en_ZZ.js +35 -8
- package/dist/cjs/i18n/es.js +33 -6
- package/dist/cjs/i18n/fi.js +33 -6
- package/dist/cjs/i18n/fr.js +34 -7
- package/dist/cjs/i18n/hu.js +33 -6
- package/dist/cjs/i18n/it.js +34 -7
- package/dist/cjs/i18n/ja.js +33 -6
- package/dist/cjs/i18n/ko.js +33 -6
- package/dist/cjs/i18n/nb.js +35 -8
- package/dist/cjs/i18n/nl.js +34 -7
- package/dist/cjs/i18n/pl.js +34 -7
- package/dist/cjs/i18n/pt_BR.js +34 -7
- package/dist/cjs/i18n/ru.js +34 -7
- package/dist/cjs/i18n/sv.js +33 -6
- package/dist/cjs/i18n/th.js +34 -7
- package/dist/cjs/i18n/tr.js +33 -6
- package/dist/cjs/i18n/uk.js +34 -7
- package/dist/cjs/i18n/vi.js +35 -8
- package/dist/cjs/i18n/zh.js +33 -4
- package/dist/cjs/i18n/zh_TW.js +33 -6
- package/dist/cjs/labs/CollapsedEditor/index.js +1 -1
- package/dist/cjs/plugins/analytics/plugin.js +1 -1
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +39 -44
- package/dist/cjs/plugins/annotation/pm-plugins/types.js +4 -4
- package/dist/cjs/plugins/annotation/types.js +4 -4
- package/dist/cjs/plugins/base/pm-plugins/decoration.js +4 -4
- package/dist/cjs/plugins/block-type/commands/block-type.js +1 -1
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +5 -6
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +3 -4
- package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +16 -1
- package/dist/cjs/plugins/collab-edit/index.js +29 -32
- package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -4
- package/dist/cjs/plugins/custom-autoformat/doc.js +28 -31
- package/dist/cjs/plugins/custom-autoformat/index.js +20 -23
- package/dist/cjs/plugins/date/index.js +1 -1
- package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
- package/dist/cjs/plugins/date/utils/internal.js +1 -1
- package/dist/cjs/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
- package/dist/cjs/plugins/extension/actions.js +36 -39
- package/dist/cjs/plugins/extension/context-panel.js +123 -130
- package/dist/cjs/plugins/extension/pm-plugins/main.js +82 -89
- package/dist/cjs/plugins/extension/pm-plugins/utils.js +46 -51
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +44 -48
- package/dist/cjs/plugins/feedback-dialog/index.js +52 -57
- package/dist/cjs/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
- package/dist/cjs/plugins/find-replace/actions.js +4 -4
- package/dist/cjs/plugins/find-replace/utils/batch-decorations.js +144 -153
- package/dist/cjs/plugins/find-replace/utils/index.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -46
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ToolbarLoader.js +2 -1
- package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +86 -86
- package/dist/cjs/plugins/help-dialog/ui/HelpDialogLoader.js +2 -1
- package/dist/cjs/plugins/history/actions.js +4 -4
- package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -82
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
- package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +16 -16
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -352
- package/dist/cjs/plugins/hyperlink/utils.js +3 -0
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +24 -27
- package/dist/cjs/plugins/list/utils/node.js +4 -4
- package/dist/cjs/plugins/macro/actions.js +107 -112
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +43 -46
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +62 -66
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +38 -42
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +108 -113
- package/dist/cjs/plugins/media/picker-facade.js +22 -25
- package/dist/cjs/plugins/media/pm-plugins/linking/actions.js +4 -4
- package/dist/cjs/plugins/media/pm-plugins/main.js +159 -172
- package/dist/cjs/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
- package/dist/cjs/plugins/media/toolbar/utils.js +30 -33
- package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
- package/dist/cjs/plugins/media/utils/check-media-type.js +37 -40
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +29 -31
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -1
- package/dist/cjs/plugins/mobile-dimensions/actions.js +4 -4
- package/dist/cjs/plugins/paste/actions.js +4 -4
- package/dist/cjs/plugins/paste/handlers.js +23 -26
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -0
- package/dist/cjs/plugins/paste/md.js +3 -0
- package/dist/cjs/plugins/paste/newline-md-plugin.js +3 -0
- package/dist/cjs/plugins/paste/paragraph-md-plugin.js +3 -0
- package/dist/cjs/plugins/paste/pm-plugins/main.js +25 -27
- package/dist/cjs/plugins/quick-insert/assets/index.js +63 -39
- package/dist/cjs/plugins/quick-insert/index.js +30 -33
- package/dist/cjs/plugins/selection/actions.js +4 -4
- package/dist/cjs/plugins/selection/gap-cursor/direction.js +4 -4
- package/dist/cjs/plugins/selection/types.js +4 -4
- package/dist/cjs/plugins/status/ui/statusPicker.js +7 -8
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/commands.js +16 -6
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +12 -20
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/cjs/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -42
- package/dist/cjs/plugins/tasks-and-decisions/utils.js +31 -2
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +4 -4
- package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +4 -4
- package/dist/cjs/plugins/type-ahead/constants.js +4 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +4 -4
- package/dist/cjs/plugins/undo-redo/enums.js +4 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -2
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +68 -73
- package/dist/cjs/ui/ConfigPanel/ConfigPanelLoader.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +54 -56
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +51 -55
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +24 -27
- package/dist/cjs/ui/ConfigPanel/transformers.js +344 -363
- package/dist/cjs/ui/ConfigPanel/types.js +8 -8
- package/dist/cjs/ui/Dropdown/index.js +2 -1
- package/dist/cjs/ui/DropdownMenu/index.js +2 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +1 -1
- package/dist/cjs/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +4 -4
- package/dist/cjs/ui/ElementBrowser/types.js +4 -4
- package/dist/cjs/ui/LinkSearch/index.js +94 -101
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +19 -2
- package/dist/cjs/ui/ToolbarFeedback/index.js +27 -31
- package/dist/cjs/utils/action.js +31 -36
- package/dist/cjs/utils/clipboard.js +82 -86
- package/dist/cjs/utils/deprecation-warnings.js +1 -1
- package/dist/cjs/utils/extensions.js +62 -67
- package/dist/cjs/utils/insert.js +4 -4
- package/dist/cjs/utils/mark.js +2 -2
- package/dist/cjs/utils/performance/simple-measure-to-entries.js +1 -2
- package/dist/cjs/utils/performance/track-transactions.js +3 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +8 -9
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +5 -3
- package/dist/es2019/editor-next/index.js +5 -6
- package/dist/es2019/editor.js +29 -36
- package/dist/es2019/i18n/cs.js +34 -6
- package/dist/es2019/i18n/da.js +34 -6
- package/dist/es2019/i18n/de.js +34 -7
- package/dist/es2019/i18n/en.js +31 -4
- package/dist/es2019/i18n/en_GB.js +34 -7
- package/dist/es2019/i18n/en_ZZ.js +35 -8
- package/dist/es2019/i18n/es.js +33 -6
- package/dist/es2019/i18n/fi.js +33 -6
- package/dist/es2019/i18n/fr.js +34 -7
- package/dist/es2019/i18n/hu.js +33 -6
- package/dist/es2019/i18n/it.js +34 -7
- package/dist/es2019/i18n/ja.js +33 -6
- package/dist/es2019/i18n/ko.js +33 -6
- package/dist/es2019/i18n/nb.js +35 -8
- package/dist/es2019/i18n/nl.js +34 -7
- package/dist/es2019/i18n/pl.js +34 -7
- package/dist/es2019/i18n/pt_BR.js +34 -7
- package/dist/es2019/i18n/ru.js +34 -7
- package/dist/es2019/i18n/sv.js +33 -6
- package/dist/es2019/i18n/th.js +34 -7
- package/dist/es2019/i18n/tr.js +33 -6
- package/dist/es2019/i18n/uk.js +34 -7
- package/dist/es2019/i18n/vi.js +35 -8
- package/dist/es2019/i18n/zh.js +33 -4
- package/dist/es2019/i18n/zh_TW.js +33 -6
- package/dist/es2019/plugins/annotation/pm-plugins/types.js +3 -3
- package/dist/es2019/plugins/annotation/types.js +3 -3
- package/dist/es2019/plugins/base/pm-plugins/decoration.js +3 -3
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +5 -7
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +3 -5
- package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
- package/dist/es2019/plugins/collab-edit/plugin-state.js +1 -2
- package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +7 -11
- package/dist/es2019/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +8 -12
- package/dist/es2019/plugins/find-replace/actions.js +3 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -1
- package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +56 -71
- package/dist/es2019/plugins/history/actions.js +3 -3
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
- package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +6 -6
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
- package/dist/es2019/plugins/hyperlink/utils.js +3 -0
- package/dist/es2019/plugins/list/utils/node.js +3 -3
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +4 -8
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -3
- package/dist/es2019/plugins/media/pm-plugins/linking/actions.js +3 -3
- package/dist/es2019/plugins/media/pm-plugins/main.js +22 -31
- package/dist/es2019/plugins/mobile-dimensions/actions.js +3 -3
- package/dist/es2019/plugins/paste/actions.js +3 -3
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +3 -0
- package/dist/es2019/plugins/paste/md.js +3 -0
- package/dist/es2019/plugins/paste/newline-md-plugin.js +3 -0
- package/dist/es2019/plugins/paste/paragraph-md-plugin.js +3 -0
- package/dist/es2019/plugins/selection/actions.js +3 -3
- package/dist/es2019/plugins/selection/gap-cursor/direction.js +3 -3
- package/dist/es2019/plugins/selection/types.js +3 -3
- package/dist/es2019/plugins/status/ui/statusPicker.js +6 -7
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -11
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/commands.js +15 -3
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +6 -16
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +6 -5
- package/dist/es2019/plugins/tasks-and-decisions/utils.js +30 -0
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +3 -3
- package/dist/es2019/plugins/type-ahead/constants.js +3 -3
- package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +3 -3
- package/dist/es2019/plugins/undo-redo/enums.js +3 -3
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +5 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +3 -4
- package/dist/es2019/ui/ConfigPanel/types.js +6 -6
- package/dist/es2019/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
- package/dist/es2019/ui/ElementBrowser/types.js +3 -3
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
- package/dist/es2019/ui/ToolbarFeedback/index.js +1 -3
- package/dist/es2019/utils/insert.js +3 -3
- package/dist/es2019/utils/performance/simple-measure-to-entries.js +1 -1
- package/dist/es2019/utils/performance/track-transactions.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +90 -98
- package/dist/esm/create-editor/ErrorBoundary.js +86 -93
- package/dist/esm/create-editor/ReactEditorViewInternal.js +6 -5
- package/dist/esm/editor-next/index.js +5 -6
- package/dist/esm/editor-next/utils/sendDurationAnalytics.js +34 -37
- package/dist/esm/editor-next/utils/trackEditorActions.js +48 -51
- package/dist/esm/editor.js +29 -34
- package/dist/esm/i18n/cs.js +34 -6
- package/dist/esm/i18n/da.js +34 -6
- package/dist/esm/i18n/de.js +34 -7
- package/dist/esm/i18n/en.js +31 -4
- package/dist/esm/i18n/en_GB.js +34 -7
- package/dist/esm/i18n/en_ZZ.js +35 -8
- package/dist/esm/i18n/es.js +33 -6
- package/dist/esm/i18n/fi.js +33 -6
- package/dist/esm/i18n/fr.js +34 -7
- package/dist/esm/i18n/hu.js +33 -6
- package/dist/esm/i18n/it.js +34 -7
- package/dist/esm/i18n/ja.js +33 -6
- package/dist/esm/i18n/ko.js +33 -6
- package/dist/esm/i18n/nb.js +35 -8
- package/dist/esm/i18n/nl.js +34 -7
- package/dist/esm/i18n/pl.js +34 -7
- package/dist/esm/i18n/pt_BR.js +34 -7
- package/dist/esm/i18n/ru.js +34 -7
- package/dist/esm/i18n/sv.js +33 -6
- package/dist/esm/i18n/th.js +34 -7
- package/dist/esm/i18n/tr.js +33 -6
- package/dist/esm/i18n/uk.js +34 -7
- package/dist/esm/i18n/vi.js +35 -8
- package/dist/esm/i18n/zh.js +33 -4
- package/dist/esm/i18n/zh_TW.js +33 -6
- package/dist/esm/plugins/analytics/plugin.js +1 -1
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +39 -44
- package/dist/esm/plugins/annotation/pm-plugins/types.js +3 -3
- package/dist/esm/plugins/annotation/types.js +3 -3
- package/dist/esm/plugins/base/pm-plugins/decoration.js +3 -3
- package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
- package/dist/esm/plugins/card/nodeviews/embedCard.js +5 -6
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +3 -4
- package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
- package/dist/esm/plugins/collab-edit/index.js +29 -32
- package/dist/esm/plugins/collab-edit/plugin-state.js +2 -4
- package/dist/esm/plugins/custom-autoformat/doc.js +28 -31
- package/dist/esm/plugins/custom-autoformat/index.js +20 -23
- package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
- package/dist/esm/plugins/date/utils/internal.js +1 -1
- package/dist/esm/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
- package/dist/esm/plugins/extension/actions.js +36 -39
- package/dist/esm/plugins/extension/context-panel.js +123 -129
- package/dist/esm/plugins/extension/pm-plugins/main.js +82 -88
- package/dist/esm/plugins/extension/pm-plugins/utils.js +46 -51
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +44 -49
- package/dist/esm/plugins/feedback-dialog/index.js +52 -57
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
- package/dist/esm/plugins/find-replace/actions.js +3 -3
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +144 -153
- package/dist/esm/plugins/find-replace/utils/index.js +2 -2
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -47
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -1
- package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +78 -76
- package/dist/esm/plugins/history/actions.js +3 -3
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -83
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
- package/dist/esm/plugins/hyperlink/pm-plugins/main.js +14 -14
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -353
- package/dist/esm/plugins/hyperlink/utils.js +3 -0
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +24 -27
- package/dist/esm/plugins/list/utils/node.js +3 -3
- package/dist/esm/plugins/macro/actions.js +107 -112
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +43 -46
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +62 -67
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +38 -43
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +108 -114
- package/dist/esm/plugins/media/picker-facade.js +22 -25
- package/dist/esm/plugins/media/pm-plugins/linking/actions.js +3 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +159 -173
- package/dist/esm/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
- package/dist/esm/plugins/media/toolbar/utils.js +30 -33
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
- package/dist/esm/plugins/media/utils/check-media-type.js +37 -40
- package/dist/esm/plugins/mentions/nodeviews/mention.js +29 -32
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -1
- package/dist/esm/plugins/mobile-dimensions/actions.js +3 -3
- package/dist/esm/plugins/paste/actions.js +3 -3
- package/dist/esm/plugins/paste/handlers.js +23 -26
- package/dist/esm/plugins/paste/linkify-md-plugin.js +3 -0
- package/dist/esm/plugins/paste/md.js +3 -0
- package/dist/esm/plugins/paste/newline-md-plugin.js +3 -0
- package/dist/esm/plugins/paste/paragraph-md-plugin.js +3 -0
- package/dist/esm/plugins/paste/pm-plugins/main.js +25 -28
- package/dist/esm/plugins/quick-insert/index.js +30 -33
- package/dist/esm/plugins/selection/actions.js +3 -3
- package/dist/esm/plugins/selection/gap-cursor/direction.js +3 -3
- package/dist/esm/plugins/selection/types.js +3 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +6 -7
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/commands.js +17 -7
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +13 -21
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -43
- package/dist/esm/plugins/tasks-and-decisions/utils.js +28 -0
- package/dist/esm/plugins/text-color/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
- package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +3 -3
- package/dist/esm/plugins/type-ahead/constants.js +3 -3
- package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +3 -3
- package/dist/esm/plugins/undo-redo/enums.js +3 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +3 -2
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +68 -74
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +54 -57
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +51 -56
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +24 -27
- package/dist/esm/ui/ConfigPanel/transformers.js +344 -362
- package/dist/esm/ui/ConfigPanel/types.js +6 -6
- package/dist/esm/ui/Dropdown/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +2 -1
- package/dist/esm/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
- package/dist/esm/ui/ElementBrowser/types.js +3 -3
- package/dist/esm/ui/LinkSearch/index.js +94 -101
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
- package/dist/esm/ui/ToolbarFeedback/index.js +27 -31
- package/dist/esm/utils/action.js +31 -36
- package/dist/esm/utils/clipboard.js +82 -87
- package/dist/esm/utils/deprecation-warnings.js +1 -1
- package/dist/esm/utils/extensions.js +62 -67
- package/dist/esm/utils/insert.js +3 -3
- package/dist/esm/utils/mark.js +2 -2
- package/dist/esm/utils/performance/simple-measure-to-entries.js +1 -2
- package/dist/esm/utils/performance/track-transactions.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -0
- package/dist/types/i18n/cs.d.ts +29 -2
- package/dist/types/i18n/da.d.ts +29 -2
- package/dist/types/i18n/de.d.ts +28 -2
- package/dist/types/i18n/en.d.ts +28 -2
- package/dist/types/i18n/en_GB.d.ts +31 -5
- package/dist/types/i18n/en_ZZ.d.ts +28 -2
- package/dist/types/i18n/es.d.ts +28 -2
- package/dist/types/i18n/fi.d.ts +28 -2
- package/dist/types/i18n/fr.d.ts +28 -2
- package/dist/types/i18n/hu.d.ts +28 -2
- package/dist/types/i18n/it.d.ts +28 -2
- package/dist/types/i18n/ja.d.ts +28 -2
- package/dist/types/i18n/ko.d.ts +28 -2
- package/dist/types/i18n/nb.d.ts +28 -2
- package/dist/types/i18n/nl.d.ts +28 -2
- package/dist/types/i18n/pl.d.ts +28 -2
- package/dist/types/i18n/pt_BR.d.ts +28 -2
- package/dist/types/i18n/ru.d.ts +28 -2
- package/dist/types/i18n/sv.d.ts +28 -2
- package/dist/types/i18n/th.d.ts +28 -2
- package/dist/types/i18n/tr.d.ts +28 -2
- package/dist/types/i18n/uk.d.ts +28 -2
- package/dist/types/i18n/vi.d.ts +28 -2
- package/dist/types/i18n/zh.d.ts +30 -2
- package/dist/types/i18n/zh_TW.d.ts +28 -2
- package/dist/types/plugins/tasks-and-decisions/utils.d.ts +2 -0
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +3 -1
- package/dist/types/utils/document.d.ts +2 -2
- package/package.json +14 -14
- package/report.api.md +1 -1
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.messages = exports.default = exports.RECENT_SEARCH_LIST_SIZE = exports.HyperlinkLinkAddToolbarWithIntl = exports.HyperlinkLinkAddToolbar = void 0;
|
|
9
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -47,7 +48,6 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
47
48
|
/** @jsx jsx */
|
|
48
49
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
49
50
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
50
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
51
51
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
52
52
|
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; } }
|
|
53
53
|
var RECENT_SEARCH_LIST_SIZE = 5;
|
|
@@ -128,12 +128,11 @@ var mapSearchProviderResultToLinkSearchItemData = function mapSearchProviderResu
|
|
|
128
128
|
var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
129
129
|
(0, _inherits2.default)(HyperlinkLinkAddToolbar, _PureComponent);
|
|
130
130
|
var _super = _createSuper(HyperlinkLinkAddToolbar);
|
|
131
|
-
/* To prevent double submit */
|
|
132
|
-
|
|
133
131
|
function HyperlinkLinkAddToolbar(props) {
|
|
134
132
|
var _this;
|
|
135
133
|
(0, _classCallCheck2.default)(this, HyperlinkLinkAddToolbar);
|
|
136
134
|
_this = _super.call(this, props);
|
|
135
|
+
/* To prevent double submit */
|
|
137
136
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "submitted", false);
|
|
138
137
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "urlInputContainer", null);
|
|
139
138
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "displayTextInputContainer", null);
|
|
@@ -141,109 +140,107 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
141
140
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "quickSearchQueryVersion", 0);
|
|
142
141
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "analyticSource", 'createLinkInlineDialog');
|
|
143
142
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "quickSearch", /*#__PURE__*/function () {
|
|
144
|
-
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
143
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(input, items, quickSearchLimit) {
|
|
145
144
|
var _pluginState$searchSe;
|
|
146
145
|
var _this$state, searchProvider, displayUrl, pluginState, queryVersion, perfStart, _pluginState$searchSe2, searchProviderResultItems, searchItems, perfStop, duration, _perfStop, _duration;
|
|
147
|
-
return
|
|
148
|
-
while (1) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
_context.next = 4;
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
return _context.abrupt("return");
|
|
158
|
-
case 4:
|
|
159
|
-
queryVersion = ++_this.quickSearchQueryVersion;
|
|
160
|
-
_this.fireAnalytics({
|
|
161
|
-
action: _analytics.ACTION.ENTERED,
|
|
162
|
-
actionSubject: _analytics.ACTION_SUBJECT.TEXT,
|
|
163
|
-
actionSubjectId: _analytics.ACTION_SUBJECT_ID.LINK_SEARCH_INPUT,
|
|
164
|
-
attributes: {
|
|
165
|
-
queryLength: input.length,
|
|
166
|
-
queryVersion: queryVersion,
|
|
167
|
-
queryHash: (0, _utils2.sha1)(input),
|
|
168
|
-
searchSessionId: (_pluginState$searchSe = pluginState.searchSessionId) !== null && _pluginState$searchSe !== void 0 ? _pluginState$searchSe : '',
|
|
169
|
-
wordCount: (0, _utils2.wordCount)(input),
|
|
170
|
-
source: _this.analyticSource
|
|
171
|
-
},
|
|
172
|
-
nonPrivacySafeAttributes: {
|
|
173
|
-
query: input
|
|
174
|
-
},
|
|
175
|
-
eventType: _analytics.EVENT_TYPE.UI
|
|
176
|
-
});
|
|
177
|
-
perfStart = performance.now();
|
|
178
|
-
_context.prev = 7;
|
|
179
|
-
_context.next = 10;
|
|
180
|
-
return searchProvider.quickSearch(input, quickSearchLimit);
|
|
181
|
-
case 10:
|
|
182
|
-
searchProviderResultItems = _context.sent;
|
|
183
|
-
searchItems = limit((0, _array.filterUniqueItems)([].concat((0, _toConsumableArray2.default)(items), (0, _toConsumableArray2.default)(searchProviderResultItems.map(mapSearchProviderResultToLinkSearchItemData))), function (firstItem, secondItem) {
|
|
184
|
-
return firstItem.objectId === secondItem.objectId;
|
|
185
|
-
}));
|
|
186
|
-
if (displayUrl === input && queryVersion === _this.quickSearchQueryVersion) {
|
|
187
|
-
_this.setState({
|
|
188
|
-
items: searchItems,
|
|
189
|
-
isLoading: false
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
perfStop = performance.now();
|
|
193
|
-
duration = perfStop - perfStart;
|
|
194
|
-
_this.fireAnalytics({
|
|
195
|
-
action: _analytics.ACTION.INVOKED,
|
|
196
|
-
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
197
|
-
actionSubjectId: _analytics.ACTION_SUBJECT_ID.QUICK_SEARCH,
|
|
198
|
-
attributes: {
|
|
199
|
-
duration: duration,
|
|
200
|
-
count: searchProviderResultItems.length
|
|
201
|
-
},
|
|
202
|
-
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
203
|
-
});
|
|
204
|
-
_this.fireAnalytics({
|
|
205
|
-
action: _analytics.ACTION.SHOWN,
|
|
206
|
-
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
207
|
-
actionSubjectId: _analytics.ACTION_SUBJECT_ID.POST_QUERY_SEARCH_RESULTS,
|
|
208
|
-
attributes: {
|
|
209
|
-
source: _this.analyticSource,
|
|
210
|
-
postQueryRequestDurationMs: duration,
|
|
211
|
-
searchSessionId: (_pluginState$searchSe2 = pluginState.searchSessionId) !== null && _pluginState$searchSe2 !== void 0 ? _pluginState$searchSe2 : '',
|
|
212
|
-
resultCount: searchProviderResultItems.length,
|
|
213
|
-
results: searchProviderResultItems.map(function (item) {
|
|
214
|
-
return {
|
|
215
|
-
resultContentId: item.objectId,
|
|
216
|
-
resultType: item.contentType
|
|
217
|
-
};
|
|
218
|
-
})
|
|
219
|
-
},
|
|
220
|
-
eventType: _analytics.EVENT_TYPE.UI
|
|
221
|
-
});
|
|
222
|
-
_context.next = 24;
|
|
146
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
147
|
+
while (1) switch (_context.prev = _context.next) {
|
|
148
|
+
case 0:
|
|
149
|
+
_this$state = _this.state, searchProvider = _this$state.searchProvider, displayUrl = _this$state.displayUrl;
|
|
150
|
+
pluginState = _this.props.pluginState;
|
|
151
|
+
if (searchProvider) {
|
|
152
|
+
_context.next = 4;
|
|
223
153
|
break;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
154
|
+
}
|
|
155
|
+
return _context.abrupt("return");
|
|
156
|
+
case 4:
|
|
157
|
+
queryVersion = ++_this.quickSearchQueryVersion;
|
|
158
|
+
_this.fireAnalytics({
|
|
159
|
+
action: _analytics.ACTION.ENTERED,
|
|
160
|
+
actionSubject: _analytics.ACTION_SUBJECT.TEXT,
|
|
161
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.LINK_SEARCH_INPUT,
|
|
162
|
+
attributes: {
|
|
163
|
+
queryLength: input.length,
|
|
164
|
+
queryVersion: queryVersion,
|
|
165
|
+
queryHash: (0, _utils2.sha1)(input),
|
|
166
|
+
searchSessionId: (_pluginState$searchSe = pluginState.searchSessionId) !== null && _pluginState$searchSe !== void 0 ? _pluginState$searchSe : '',
|
|
167
|
+
wordCount: (0, _utils2.wordCount)(input),
|
|
168
|
+
source: _this.analyticSource
|
|
169
|
+
},
|
|
170
|
+
nonPrivacySafeAttributes: {
|
|
171
|
+
query: input
|
|
172
|
+
},
|
|
173
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
174
|
+
});
|
|
175
|
+
perfStart = performance.now();
|
|
176
|
+
_context.prev = 7;
|
|
177
|
+
_context.next = 10;
|
|
178
|
+
return searchProvider.quickSearch(input, quickSearchLimit);
|
|
179
|
+
case 10:
|
|
180
|
+
searchProviderResultItems = _context.sent;
|
|
181
|
+
searchItems = limit((0, _array.filterUniqueItems)([].concat((0, _toConsumableArray2.default)(items), (0, _toConsumableArray2.default)(searchProviderResultItems.map(mapSearchProviderResultToLinkSearchItemData))), function (firstItem, secondItem) {
|
|
182
|
+
return firstItem.objectId === secondItem.objectId;
|
|
183
|
+
}));
|
|
184
|
+
if (displayUrl === input && queryVersion === _this.quickSearchQueryVersion) {
|
|
185
|
+
_this.setState({
|
|
186
|
+
items: searchItems,
|
|
187
|
+
isLoading: false
|
|
242
188
|
});
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
189
|
+
}
|
|
190
|
+
perfStop = performance.now();
|
|
191
|
+
duration = perfStop - perfStart;
|
|
192
|
+
_this.fireAnalytics({
|
|
193
|
+
action: _analytics.ACTION.INVOKED,
|
|
194
|
+
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
195
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.QUICK_SEARCH,
|
|
196
|
+
attributes: {
|
|
197
|
+
duration: duration,
|
|
198
|
+
count: searchProviderResultItems.length
|
|
199
|
+
},
|
|
200
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
201
|
+
});
|
|
202
|
+
_this.fireAnalytics({
|
|
203
|
+
action: _analytics.ACTION.SHOWN,
|
|
204
|
+
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
205
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.POST_QUERY_SEARCH_RESULTS,
|
|
206
|
+
attributes: {
|
|
207
|
+
source: _this.analyticSource,
|
|
208
|
+
postQueryRequestDurationMs: duration,
|
|
209
|
+
searchSessionId: (_pluginState$searchSe2 = pluginState.searchSessionId) !== null && _pluginState$searchSe2 !== void 0 ? _pluginState$searchSe2 : '',
|
|
210
|
+
resultCount: searchProviderResultItems.length,
|
|
211
|
+
results: searchProviderResultItems.map(function (item) {
|
|
212
|
+
return {
|
|
213
|
+
resultContentId: item.objectId,
|
|
214
|
+
resultType: item.contentType
|
|
215
|
+
};
|
|
216
|
+
})
|
|
217
|
+
},
|
|
218
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
219
|
+
});
|
|
220
|
+
_context.next = 24;
|
|
221
|
+
break;
|
|
222
|
+
case 19:
|
|
223
|
+
_context.prev = 19;
|
|
224
|
+
_context.t0 = _context["catch"](7);
|
|
225
|
+
_perfStop = performance.now();
|
|
226
|
+
_duration = _perfStop - perfStart;
|
|
227
|
+
_this.fireAnalytics({
|
|
228
|
+
action: _analytics.ACTION.INVOKED,
|
|
229
|
+
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
230
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.QUICK_SEARCH,
|
|
231
|
+
attributes: {
|
|
232
|
+
duration: _duration,
|
|
233
|
+
count: -1,
|
|
234
|
+
errorCode: _context.t0.status
|
|
235
|
+
},
|
|
236
|
+
nonPrivacySafeAttributes: {
|
|
237
|
+
error: _context.t0.message
|
|
238
|
+
},
|
|
239
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
240
|
+
});
|
|
241
|
+
case 24:
|
|
242
|
+
case "end":
|
|
243
|
+
return _context.stop();
|
|
247
244
|
}
|
|
248
245
|
}, _callee, null, [[7, 19]]);
|
|
249
246
|
}));
|
|
@@ -252,66 +249,64 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
252
249
|
};
|
|
253
250
|
}());
|
|
254
251
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateInput", /*#__PURE__*/function () {
|
|
255
|
-
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
252
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(input) {
|
|
256
253
|
var _this$state2, activityProvider, searchProvider, _items, shouldQuerySearchProvider;
|
|
257
|
-
return
|
|
258
|
-
while (1) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (!activityProvider) {
|
|
266
|
-
_context2.next = 23;
|
|
267
|
-
break;
|
|
268
|
-
}
|
|
269
|
-
if (!(input.length === 0)) {
|
|
270
|
-
_context2.next = 13;
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
_context2.t0 = _this;
|
|
274
|
-
_context2.next = 7;
|
|
275
|
-
return _this.getRecentItems(activityProvider);
|
|
276
|
-
case 7:
|
|
277
|
-
_context2.t1 = _context2.sent;
|
|
278
|
-
_context2.t2 = -1;
|
|
279
|
-
_context2.t3 = {
|
|
280
|
-
items: _context2.t1,
|
|
281
|
-
selectedIndex: _context2.t2
|
|
282
|
-
};
|
|
283
|
-
_context2.t0.setState.call(_context2.t0, _context2.t3);
|
|
254
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
255
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
256
|
+
case 0:
|
|
257
|
+
_this$state2 = _this.state, activityProvider = _this$state2.activityProvider, searchProvider = _this$state2.searchProvider;
|
|
258
|
+
_this.setState({
|
|
259
|
+
displayUrl: input
|
|
260
|
+
});
|
|
261
|
+
if (!activityProvider) {
|
|
284
262
|
_context2.next = 23;
|
|
285
263
|
break;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
_this.setState({
|
|
292
|
-
items: [],
|
|
293
|
-
selectedIndex: -1,
|
|
294
|
-
isLoading: false
|
|
295
|
-
});
|
|
296
|
-
_context2.next = 23;
|
|
264
|
+
}
|
|
265
|
+
if (!(input.length === 0)) {
|
|
266
|
+
_context2.next = 13;
|
|
297
267
|
break;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
268
|
+
}
|
|
269
|
+
_context2.t0 = _this;
|
|
270
|
+
_context2.next = 7;
|
|
271
|
+
return _this.getRecentItems(activityProvider);
|
|
272
|
+
case 7:
|
|
273
|
+
_context2.t1 = _context2.sent;
|
|
274
|
+
_context2.t2 = -1;
|
|
275
|
+
_context2.t3 = {
|
|
276
|
+
items: _context2.t1,
|
|
277
|
+
selectedIndex: _context2.t2
|
|
278
|
+
};
|
|
279
|
+
_context2.t0.setState.call(_context2.t0, _context2.t3);
|
|
280
|
+
_context2.next = 23;
|
|
281
|
+
break;
|
|
282
|
+
case 13:
|
|
283
|
+
if (!(0, _adfSchema.isSafeUrl)(input)) {
|
|
284
|
+
_context2.next = 17;
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
_this.setState({
|
|
288
|
+
items: [],
|
|
289
|
+
selectedIndex: -1,
|
|
290
|
+
isLoading: false
|
|
291
|
+
});
|
|
292
|
+
_context2.next = 23;
|
|
293
|
+
break;
|
|
294
|
+
case 17:
|
|
295
|
+
_context2.next = 19;
|
|
296
|
+
return _this.getRecentItems(activityProvider, input);
|
|
297
|
+
case 19:
|
|
298
|
+
_items = _context2.sent;
|
|
299
|
+
shouldQuerySearchProvider = _items.length < RECENT_SEARCH_LIST_SIZE && !!searchProvider;
|
|
300
|
+
_this.setState({
|
|
301
|
+
items: _items,
|
|
302
|
+
isLoading: shouldQuerySearchProvider
|
|
303
|
+
});
|
|
304
|
+
if (shouldQuerySearchProvider) {
|
|
305
|
+
_this.debouncedQuickSearch(input, _items, RECENT_SEARCH_LIST_SIZE);
|
|
306
|
+
}
|
|
307
|
+
case 23:
|
|
308
|
+
case "end":
|
|
309
|
+
return _context2.stop();
|
|
315
310
|
}
|
|
316
311
|
}, _callee2);
|
|
317
312
|
}));
|
|
@@ -320,54 +315,52 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
320
315
|
};
|
|
321
316
|
}());
|
|
322
317
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createClearHandler", function (field) {
|
|
323
|
-
return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
318
|
+
return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
324
319
|
var activityProvider, _this$setState;
|
|
325
|
-
return
|
|
326
|
-
while (1) {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
320
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
321
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
322
|
+
case 0:
|
|
323
|
+
activityProvider = _this.state.activityProvider;
|
|
324
|
+
_context3.t0 = field;
|
|
325
|
+
_context3.next = _context3.t0 === 'displayUrl' ? 4 : _context3.t0 === 'displayText' ? 24 : 26;
|
|
326
|
+
break;
|
|
327
|
+
case 4:
|
|
328
|
+
_context3.t1 = _this;
|
|
329
|
+
_this$setState = {};
|
|
330
|
+
(0, _defineProperty2.default)(_this$setState, field, '');
|
|
331
|
+
_context3.t2 = _defineProperty2.default;
|
|
332
|
+
_context3.t3 = _this$setState;
|
|
333
|
+
if (!activityProvider) {
|
|
334
|
+
_context3.next = 17;
|
|
332
335
|
break;
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
return _context3.abrupt("break", 26);
|
|
362
|
-
case 24:
|
|
363
|
-
_this.setState((0, _defineProperty2.default)({}, field, ''));
|
|
364
|
-
if (_this.displayTextInputContainer) {
|
|
365
|
-
_this.displayTextInputContainer.focus();
|
|
366
|
-
}
|
|
367
|
-
case 26:
|
|
368
|
-
case "end":
|
|
369
|
-
return _context3.stop();
|
|
370
|
-
}
|
|
336
|
+
}
|
|
337
|
+
_context3.t5 = limit;
|
|
338
|
+
_context3.next = 13;
|
|
339
|
+
return activityProvider.getRecentItems();
|
|
340
|
+
case 13:
|
|
341
|
+
_context3.t6 = _context3.sent;
|
|
342
|
+
_context3.t4 = (0, _context3.t5)(_context3.t6);
|
|
343
|
+
_context3.next = 18;
|
|
344
|
+
break;
|
|
345
|
+
case 17:
|
|
346
|
+
_context3.t4 = [];
|
|
347
|
+
case 18:
|
|
348
|
+
_context3.t7 = _context3.t4;
|
|
349
|
+
(0, _context3.t2)(_context3.t3, "items", _context3.t7);
|
|
350
|
+
_context3.t8 = _this$setState;
|
|
351
|
+
_context3.t1.setState.call(_context3.t1, _context3.t8);
|
|
352
|
+
if (_this.urlInputContainer) {
|
|
353
|
+
_this.urlInputContainer.focus();
|
|
354
|
+
}
|
|
355
|
+
return _context3.abrupt("break", 26);
|
|
356
|
+
case 24:
|
|
357
|
+
_this.setState((0, _defineProperty2.default)({}, field, ''));
|
|
358
|
+
if (_this.displayTextInputContainer) {
|
|
359
|
+
_this.displayTextInputContainer.focus();
|
|
360
|
+
}
|
|
361
|
+
case 26:
|
|
362
|
+
case "end":
|
|
363
|
+
return _context3.stop();
|
|
371
364
|
}
|
|
372
365
|
}, _callee3);
|
|
373
366
|
}));
|
|
@@ -583,42 +576,40 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
583
576
|
(0, _createClass2.default)(HyperlinkLinkAddToolbar, [{
|
|
584
577
|
key: "componentDidMount",
|
|
585
578
|
value: function () {
|
|
586
|
-
var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
579
|
+
var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
587
580
|
var _pluginState$searchSe5, _pluginState$inputMet;
|
|
588
581
|
var pluginState, _yield$Promise$all, _yield$Promise$all2, activityProvider, searchProvider;
|
|
589
|
-
return
|
|
590
|
-
while (1) {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
return _context4.stop();
|
|
621
|
-
}
|
|
582
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
583
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
584
|
+
case 0:
|
|
585
|
+
pluginState = this.props.pluginState;
|
|
586
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
|
587
|
+
this.fireAnalytics({
|
|
588
|
+
action: _analytics.ACTION.VIEWED,
|
|
589
|
+
actionSubject: _analytics.ACTION_SUBJECT.CREATE_LINK_INLINE_DIALOG,
|
|
590
|
+
attributes: {
|
|
591
|
+
timesViewed: pluginState.timesViewed,
|
|
592
|
+
searchSessionId: (_pluginState$searchSe5 = pluginState.searchSessionId) !== null && _pluginState$searchSe5 !== void 0 ? _pluginState$searchSe5 : '',
|
|
593
|
+
trigger: (_pluginState$inputMet = pluginState.inputMethod) !== null && _pluginState$inputMet !== void 0 ? _pluginState$inputMet : ''
|
|
594
|
+
},
|
|
595
|
+
eventType: _analytics.EVENT_TYPE.SCREEN
|
|
596
|
+
});
|
|
597
|
+
_context4.next = 5;
|
|
598
|
+
return Promise.all([this.props.activityProvider, this.props.searchProvider]);
|
|
599
|
+
case 5:
|
|
600
|
+
_yield$Promise$all = _context4.sent;
|
|
601
|
+
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 2);
|
|
602
|
+
activityProvider = _yield$Promise$all2[0];
|
|
603
|
+
searchProvider = _yield$Promise$all2[1];
|
|
604
|
+
this.setState({
|
|
605
|
+
activityProvider: activityProvider,
|
|
606
|
+
searchProvider: searchProvider
|
|
607
|
+
});
|
|
608
|
+
_context4.next = 12;
|
|
609
|
+
return this.loadInitialLinkSearchResult();
|
|
610
|
+
case 12:
|
|
611
|
+
case "end":
|
|
612
|
+
return _context4.stop();
|
|
622
613
|
}
|
|
623
614
|
}, _callee4, this);
|
|
624
615
|
}));
|
|
@@ -649,91 +640,89 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
649
640
|
}, {
|
|
650
641
|
key: "getRecentItems",
|
|
651
642
|
value: function () {
|
|
652
|
-
var _getRecentItems = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
643
|
+
var _getRecentItems = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(activityProvider, query) {
|
|
653
644
|
var pluginState, perfStart, _pluginState$searchSe7, activityRecentItems, _items2, perfStop, duration, _perfStop2, _duration2;
|
|
654
|
-
return
|
|
655
|
-
while (1) {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
_context5.next = 10;
|
|
664
|
-
break;
|
|
665
|
-
}
|
|
666
|
-
_context5.next = 7;
|
|
667
|
-
return activityProvider.searchRecent(query);
|
|
668
|
-
case 7:
|
|
669
|
-
_context5.t1 = _context5.sent;
|
|
670
|
-
_context5.next = 13;
|
|
645
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
646
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
647
|
+
case 0:
|
|
648
|
+
pluginState = this.props.pluginState;
|
|
649
|
+
perfStart = performance.now();
|
|
650
|
+
_context5.prev = 2;
|
|
651
|
+
_context5.t0 = limit;
|
|
652
|
+
if (!query) {
|
|
653
|
+
_context5.next = 10;
|
|
671
654
|
break;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
655
|
+
}
|
|
656
|
+
_context5.next = 7;
|
|
657
|
+
return activityProvider.searchRecent(query);
|
|
658
|
+
case 7:
|
|
659
|
+
_context5.t1 = _context5.sent;
|
|
660
|
+
_context5.next = 13;
|
|
661
|
+
break;
|
|
662
|
+
case 10:
|
|
663
|
+
_context5.next = 12;
|
|
664
|
+
return activityProvider.getRecentItems();
|
|
665
|
+
case 12:
|
|
666
|
+
_context5.t1 = _context5.sent;
|
|
667
|
+
case 13:
|
|
668
|
+
_context5.t2 = _context5.t1;
|
|
669
|
+
activityRecentItems = (0, _context5.t0)(_context5.t2);
|
|
670
|
+
_items2 = activityRecentItems.map(mapActivityProviderResultToLinkSearchItemData);
|
|
671
|
+
perfStop = performance.now();
|
|
672
|
+
duration = perfStop - perfStart;
|
|
673
|
+
this.fireAnalytics({
|
|
674
|
+
action: _analytics.ACTION.INVOKED,
|
|
675
|
+
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
676
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.RECENT_ACTIVITIES,
|
|
677
|
+
attributes: {
|
|
678
|
+
duration: duration,
|
|
679
|
+
count: _items2.length
|
|
680
|
+
},
|
|
681
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
682
|
+
});
|
|
683
|
+
this.fireAnalytics({
|
|
684
|
+
action: _analytics.ACTION.SHOWN,
|
|
685
|
+
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
686
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.PRE_QUERY_SEARCH_RESULTS,
|
|
687
|
+
attributes: {
|
|
688
|
+
source: this.analyticSource,
|
|
689
|
+
preQueryRequestDurationMs: duration,
|
|
690
|
+
searchSessionId: (_pluginState$searchSe7 = pluginState.searchSessionId) !== null && _pluginState$searchSe7 !== void 0 ? _pluginState$searchSe7 : '',
|
|
691
|
+
resultCount: _items2.length,
|
|
692
|
+
results: activityRecentItems.map(function (item) {
|
|
693
|
+
var _item$type;
|
|
694
|
+
return {
|
|
695
|
+
resultContentId: item.objectId,
|
|
696
|
+
resultType: (_item$type = item.type) !== null && _item$type !== void 0 ? _item$type : ''
|
|
697
|
+
};
|
|
698
|
+
})
|
|
699
|
+
},
|
|
700
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
701
|
+
});
|
|
702
|
+
return _context5.abrupt("return", _items2);
|
|
703
|
+
case 23:
|
|
704
|
+
_context5.prev = 23;
|
|
705
|
+
_context5.t3 = _context5["catch"](2);
|
|
706
|
+
_perfStop2 = performance.now();
|
|
707
|
+
_duration2 = _perfStop2 - perfStart;
|
|
708
|
+
this.fireAnalytics({
|
|
709
|
+
action: _analytics.ACTION.INVOKED,
|
|
710
|
+
actionSubject: _analytics.ACTION_SUBJECT.SEARCH_RESULT,
|
|
711
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.RECENT_ACTIVITIES,
|
|
712
|
+
attributes: {
|
|
713
|
+
duration: _duration2,
|
|
714
|
+
count: -1,
|
|
715
|
+
errorCode: _context5.t3.status
|
|
716
|
+
},
|
|
717
|
+
nonPrivacySafeAttributes: {
|
|
718
|
+
error: _context5.t3.message
|
|
719
|
+
},
|
|
720
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
721
|
+
});
|
|
722
|
+
return _context5.abrupt("return", []);
|
|
723
|
+
case 29:
|
|
724
|
+
case "end":
|
|
725
|
+
return _context5.stop();
|
|
737
726
|
}
|
|
738
727
|
}, _callee5, this, [[2, 23]]);
|
|
739
728
|
}));
|
|
@@ -754,38 +743,36 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
754
743
|
}, {
|
|
755
744
|
key: "loadInitialLinkSearchResult",
|
|
756
745
|
value: function () {
|
|
757
|
-
var _loadInitialLinkSearchResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
746
|
+
var _loadInitialLinkSearchResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
758
747
|
var _this$state10, displayUrl, activityProvider, _items3;
|
|
759
|
-
return
|
|
760
|
-
while (1) {
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
return _context6.stop();
|
|
788
|
-
}
|
|
748
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
749
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
750
|
+
case 0:
|
|
751
|
+
_this$state10 = this.state, displayUrl = _this$state10.displayUrl, activityProvider = _this$state10.activityProvider;
|
|
752
|
+
_context6.prev = 1;
|
|
753
|
+
if (!(!displayUrl && activityProvider)) {
|
|
754
|
+
_context6.next = 8;
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
this.setState({
|
|
758
|
+
isLoading: true
|
|
759
|
+
});
|
|
760
|
+
_context6.next = 6;
|
|
761
|
+
return this.getRecentItems(activityProvider);
|
|
762
|
+
case 6:
|
|
763
|
+
_items3 = _context6.sent;
|
|
764
|
+
this.setState({
|
|
765
|
+
items: _items3
|
|
766
|
+
});
|
|
767
|
+
case 8:
|
|
768
|
+
_context6.prev = 8;
|
|
769
|
+
this.setState({
|
|
770
|
+
isLoading: false
|
|
771
|
+
});
|
|
772
|
+
return _context6.finish(8);
|
|
773
|
+
case 11:
|
|
774
|
+
case "end":
|
|
775
|
+
return _context6.stop();
|
|
789
776
|
}
|
|
790
777
|
}, _callee6, this, [[1,, 8, 11]]);
|
|
791
778
|
}));
|