@atlaskit/editor-core 182.1.2 → 183.0.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 +27 -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/code-block/language-list.d.ts +1 -1
- 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 +97 -97
- package/report.api.md +1 -1
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -22,7 +23,6 @@ var _taskDecision = require("@atlaskit/task-decision");
|
|
|
22
23
|
var _excluded = ["contextIdentifierProvider"];
|
|
23
24
|
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); }
|
|
24
25
|
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; }
|
|
25
|
-
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; }
|
|
26
26
|
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); }; }
|
|
27
27
|
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; } }
|
|
28
28
|
var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
@@ -38,13 +38,14 @@ var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
|
38
38
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
39
39
|
resolvedContextProvider: undefined
|
|
40
40
|
});
|
|
41
|
+
// Storing the mounted state is an anti-pattern, however the asynchronous state
|
|
42
|
+
// updates via `updateContextIdentifierProvider` means we may be dismounted before
|
|
43
|
+
// it receives a response.
|
|
44
|
+
// Since we can't cancel the Promise we store the mounted state to avoid state
|
|
45
|
+
// updates when no longer suitable.
|
|
41
46
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mounted", false);
|
|
42
47
|
return _this;
|
|
43
|
-
}
|
|
44
|
-
// updates via `updateContextIdentifierProvider` means we may be dismounted before
|
|
45
|
-
// it receives a response.
|
|
46
|
-
// Since we can't cancel the Promise we store the mounted state to avoid state
|
|
47
|
-
// updates when no longer suitable.
|
|
48
|
+
}
|
|
48
49
|
(0, _createClass2.default)(TaskItemWithProviders, [{
|
|
49
50
|
key: "UNSAFE_componentWillMount",
|
|
50
51
|
value: function UNSAFE_componentWillMount() {
|
|
@@ -66,47 +67,45 @@ var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
|
66
67
|
}, {
|
|
67
68
|
key: "updateContextIdentifierProvider",
|
|
68
69
|
value: function () {
|
|
69
|
-
var _updateContextIdentifierProvider = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
70
|
+
var _updateContextIdentifierProvider = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(props) {
|
|
70
71
|
var resolvedContextProvider;
|
|
71
|
-
return
|
|
72
|
-
while (1) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_context.next = 13;
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
_context.prev = 1;
|
|
80
|
-
_context.next = 4;
|
|
81
|
-
return props.contextIdentifierProvider;
|
|
82
|
-
case 4:
|
|
83
|
-
resolvedContextProvider = _context.sent;
|
|
84
|
-
if (this.mounted) {
|
|
85
|
-
this.setState({
|
|
86
|
-
resolvedContextProvider: resolvedContextProvider
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
_context.next = 11;
|
|
72
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
73
|
+
while (1) switch (_context.prev = _context.next) {
|
|
74
|
+
case 0:
|
|
75
|
+
if (!props.contextIdentifierProvider) {
|
|
76
|
+
_context.next = 13;
|
|
90
77
|
break;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
78
|
+
}
|
|
79
|
+
_context.prev = 1;
|
|
80
|
+
_context.next = 4;
|
|
81
|
+
return props.contextIdentifierProvider;
|
|
82
|
+
case 4:
|
|
83
|
+
resolvedContextProvider = _context.sent;
|
|
84
|
+
if (this.mounted) {
|
|
85
|
+
this.setState({
|
|
86
|
+
resolvedContextProvider: resolvedContextProvider
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
_context.next = 11;
|
|
90
|
+
break;
|
|
91
|
+
case 8:
|
|
92
|
+
_context.prev = 8;
|
|
93
|
+
_context.t0 = _context["catch"](1);
|
|
94
|
+
if (this.mounted) {
|
|
103
95
|
this.setState({
|
|
104
96
|
resolvedContextProvider: undefined
|
|
105
97
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
}
|
|
99
|
+
case 11:
|
|
100
|
+
_context.next = 14;
|
|
101
|
+
break;
|
|
102
|
+
case 13:
|
|
103
|
+
this.setState({
|
|
104
|
+
resolvedContextProvider: undefined
|
|
105
|
+
});
|
|
106
|
+
case 14:
|
|
107
|
+
case "end":
|
|
108
|
+
return _context.stop();
|
|
110
109
|
}
|
|
111
110
|
}, _callee, this, [[1, 8]]);
|
|
112
111
|
}));
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.transformSliceToDecisionList = void 0;
|
|
6
|
+
exports.transformSliceToDecisionList = exports.normalizeTaskItemsSelection = void 0;
|
|
7
7
|
var _prosemirrorModel = require("prosemirror-model");
|
|
8
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
8
9
|
// If slice is decisionItem, wrap it inside a decisionList. This prevents an
|
|
9
10
|
// additional newline from being pasted along with the selected decision item.
|
|
10
11
|
var transformSliceToDecisionList = function transformSliceToDecisionList(slice, schema) {
|
|
@@ -15,4 +16,32 @@ var transformSliceToDecisionList = function transformSliceToDecisionList(slice,
|
|
|
15
16
|
}
|
|
16
17
|
return slice;
|
|
17
18
|
};
|
|
18
|
-
exports.transformSliceToDecisionList = transformSliceToDecisionList;
|
|
19
|
+
exports.transformSliceToDecisionList = transformSliceToDecisionList;
|
|
20
|
+
function isTaskListNode(node) {
|
|
21
|
+
return Boolean(node && node.type && 'taskList' === node.type.name);
|
|
22
|
+
}
|
|
23
|
+
var resolvePositionToStartOfTaskItem = function resolvePositionToStartOfTaskItem($pos) {
|
|
24
|
+
var fromRange = $pos.blockRange($pos, isTaskListNode);
|
|
25
|
+
var fromPosition = fromRange && $pos.textOffset === 0 && fromRange.end - 1 === $pos.pos ? _prosemirrorState.Selection.near($pos.doc.resolve(fromRange.end + 1), 1).$from : $pos;
|
|
26
|
+
return fromPosition;
|
|
27
|
+
};
|
|
28
|
+
var resolvePositionToEndOfTaskItem = function resolvePositionToEndOfTaskItem($pos) {
|
|
29
|
+
var toRange = $pos.blockRange($pos, isTaskListNode);
|
|
30
|
+
var toPosition = toRange && $pos.textOffset === 0 && toRange.start + 1 === $pos.pos ? _prosemirrorState.Selection.near($pos.doc.resolve(toRange.start - 1), -1).$to : $pos;
|
|
31
|
+
return toPosition;
|
|
32
|
+
};
|
|
33
|
+
var normalizeTaskItemsSelection = function normalizeTaskItemsSelection(selection) {
|
|
34
|
+
if (selection.empty) {
|
|
35
|
+
return selection;
|
|
36
|
+
}
|
|
37
|
+
var $from = selection.$from,
|
|
38
|
+
$to = selection.$to;
|
|
39
|
+
if (selection instanceof _prosemirrorState.NodeSelection) {
|
|
40
|
+
var _head = resolvePositionToStartOfTaskItem($from);
|
|
41
|
+
return new _prosemirrorState.TextSelection(_head, _head);
|
|
42
|
+
}
|
|
43
|
+
var head = resolvePositionToStartOfTaskItem($from);
|
|
44
|
+
var anchor = resolvePositionToEndOfTaskItem($to);
|
|
45
|
+
return new _prosemirrorState.TextSelection(anchor, head);
|
|
46
|
+
};
|
|
47
|
+
exports.normalizeTaskItemsSelection = normalizeTaskItemsSelection;
|
|
@@ -38,13 +38,13 @@ function createInitialPluginState(editorState, pluginConfig) {
|
|
|
38
38
|
};
|
|
39
39
|
return state;
|
|
40
40
|
}
|
|
41
|
-
var ACTIONS
|
|
42
|
-
exports.ACTIONS = ACTIONS;
|
|
43
|
-
(function (ACTIONS) {
|
|
41
|
+
var ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
44
42
|
ACTIONS[ACTIONS["RESET_COLOR"] = 0] = "RESET_COLOR";
|
|
45
43
|
ACTIONS[ACTIONS["SET_COLOR"] = 1] = "SET_COLOR";
|
|
46
44
|
ACTIONS[ACTIONS["DISABLE"] = 2] = "DISABLE";
|
|
47
|
-
|
|
45
|
+
return ACTIONS;
|
|
46
|
+
}({});
|
|
47
|
+
exports.ACTIONS = ACTIONS;
|
|
48
48
|
var pluginKey = new _prosemirrorState.PluginKey('textColorPlugin');
|
|
49
49
|
exports.pluginKey = pluginKey;
|
|
50
50
|
function createPlugin(dispatch, pluginConfig) {
|
|
@@ -23,15 +23,15 @@ var _transformToCode = require("../commands/transform-to-code");
|
|
|
23
23
|
var _ValidCombinations;
|
|
24
24
|
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); }; }
|
|
25
25
|
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; } }
|
|
26
|
-
var ValidAutoformatChars
|
|
27
|
-
(function (ValidAutoformatChars) {
|
|
26
|
+
var ValidAutoformatChars = /*#__PURE__*/function (ValidAutoformatChars) {
|
|
28
27
|
ValidAutoformatChars["STRONG"] = "__";
|
|
29
28
|
ValidAutoformatChars["STRIKE"] = "~~";
|
|
30
29
|
ValidAutoformatChars["STRONG_MARKDOWN"] = "**";
|
|
31
30
|
ValidAutoformatChars["ITALIC_MARKDOWN"] = "*";
|
|
32
31
|
ValidAutoformatChars["ITALIC"] = "_";
|
|
33
32
|
ValidAutoformatChars["CODE"] = "`";
|
|
34
|
-
|
|
33
|
+
return ValidAutoformatChars;
|
|
34
|
+
}(ValidAutoformatChars || {});
|
|
35
35
|
var ValidCombinations = (_ValidCombinations = {}, (0, _defineProperty2.default)(_ValidCombinations, ValidAutoformatChars.STRIKE, [
|
|
36
36
|
// e.g: _~~lol~~_
|
|
37
37
|
ValidAutoformatChars.ITALIC,
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.IconTypes = void 0;
|
|
7
|
-
var IconTypes
|
|
8
|
-
exports.IconTypes = IconTypes;
|
|
9
|
-
(function (IconTypes) {
|
|
7
|
+
var IconTypes = /*#__PURE__*/function (IconTypes) {
|
|
10
8
|
IconTypes["strong"] = "strong";
|
|
11
9
|
IconTypes["em"] = "em";
|
|
12
10
|
IconTypes["underline"] = "underline";
|
|
@@ -14,4 +12,6 @@ exports.IconTypes = IconTypes;
|
|
|
14
12
|
IconTypes["code"] = "code";
|
|
15
13
|
IconTypes["subscript"] = "subscript";
|
|
16
14
|
IconTypes["superscript"] = "superscript";
|
|
17
|
-
|
|
15
|
+
return IconTypes;
|
|
16
|
+
}({});
|
|
17
|
+
exports.IconTypes = IconTypes;
|
|
@@ -12,9 +12,9 @@ var TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
|
|
|
12
12
|
exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = TYPE_AHEAD_POPUP_CONTENT_CLASS;
|
|
13
13
|
var TYPE_AHEAD_DECORATION_ELEMENT_ID = 'typeahaed_decoration_element_id';
|
|
14
14
|
exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = TYPE_AHEAD_DECORATION_ELEMENT_ID;
|
|
15
|
-
var CloseSelectionOptions
|
|
16
|
-
exports.CloseSelectionOptions = CloseSelectionOptions;
|
|
17
|
-
(function (CloseSelectionOptions) {
|
|
15
|
+
var CloseSelectionOptions = /*#__PURE__*/function (CloseSelectionOptions) {
|
|
18
16
|
CloseSelectionOptions["BEFORE_TEXT_INSERTED"] = "BEFORE_TEXT_INSERTED";
|
|
19
17
|
CloseSelectionOptions["AFTER_TEXT_INSERTED"] = "AFTER_TEXT_INSERTED";
|
|
20
|
-
|
|
18
|
+
return CloseSelectionOptions;
|
|
19
|
+
}({});
|
|
20
|
+
exports.CloseSelectionOptions = CloseSelectionOptions;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ACTIONS = void 0;
|
|
7
|
-
var ACTIONS
|
|
8
|
-
exports.ACTIONS = ACTIONS;
|
|
9
|
-
(function (ACTIONS) {
|
|
7
|
+
var ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
10
8
|
ACTIONS["OPEN_TYPEAHEAD_AT_CURSOR"] = "OPEN_TYPEAHEAD_AT_CURSOR";
|
|
11
9
|
ACTIONS["CLOSE_TYPE_AHEAD"] = "CLOSE_TYPE_AHEAD";
|
|
12
10
|
ACTIONS["CHANGE_QUERY"] = "CHANGE_QUERY";
|
|
@@ -14,4 +12,6 @@ exports.ACTIONS = ACTIONS;
|
|
|
14
12
|
ACTIONS["INSERT_RAW_QUERY"] = "INSERT_RAW_QUERY";
|
|
15
13
|
ACTIONS["UPDATE_LIST_ITEMS"] = "UPDATE_LIST_ITEMS";
|
|
16
14
|
ACTIONS["UPDATE_SELECTED_INDEX"] = "UPDATE_SELECTED_INDEX";
|
|
17
|
-
|
|
15
|
+
return ACTIONS;
|
|
16
|
+
}({});
|
|
17
|
+
exports.ACTIONS = ACTIONS;
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.InputSource = void 0;
|
|
7
7
|
var _enums = require("../analytics/types/enums");
|
|
8
|
-
var InputSource
|
|
9
|
-
exports.InputSource = InputSource;
|
|
10
|
-
(function (InputSource) {
|
|
8
|
+
var InputSource = function (InputSource) {
|
|
11
9
|
InputSource[InputSource["TOOLBAR"] = _enums.INPUT_METHOD.TOOLBAR] = "TOOLBAR";
|
|
12
10
|
InputSource[InputSource["KEYBOARD"] = _enums.INPUT_METHOD.KEYBOARD] = "KEYBOARD";
|
|
13
|
-
|
|
11
|
+
return InputSource;
|
|
12
|
+
}({});
|
|
13
|
+
exports.InputSource = InputSource;
|
|
@@ -50,14 +50,13 @@ var secondaryToolbarStyle = (0, _react2.css)(_templateObject3 || (_templateObjec
|
|
|
50
50
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
51
51
|
(0, _inherits2.default)(Editor, _React$Component);
|
|
52
52
|
var _super = _createSuper(Editor);
|
|
53
|
-
// Wrapper container for toolbar and content area
|
|
54
|
-
|
|
55
53
|
function Editor(props) {
|
|
56
54
|
var _this;
|
|
57
55
|
(0, _classCallCheck2.default)(this, Editor);
|
|
58
56
|
_this = _super.call(this, props);
|
|
59
57
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "appearance", 'comment');
|
|
60
58
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "containerElement", null);
|
|
59
|
+
// Wrapper container for toolbar and content area
|
|
61
60
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "wrapperElementRef", /*#__PURE__*/_react.default.createRef());
|
|
62
61
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSave", function () {
|
|
63
62
|
if (_this.props.editorView && _this.props.onSave) {
|
|
@@ -122,7 +121,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
122
121
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
123
122
|
handleEscape: handleEscape,
|
|
124
123
|
editorAppearance: _this.appearance,
|
|
125
|
-
useStickyToolbar: useStickyToolbar
|
|
124
|
+
useStickyToolbar: useStickyToolbar,
|
|
125
|
+
intl: intl
|
|
126
126
|
}, (0, _react2.jsx)(_Toolbar.default, {
|
|
127
127
|
editorView: editorView,
|
|
128
128
|
editorActions: editorActions,
|
|
@@ -25,8 +25,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
25
25
|
var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
26
26
|
(0, _inherits2.default)(FullPageEditor, _React$Component);
|
|
27
27
|
var _super = _createSuper(FullPageEditor);
|
|
28
|
-
// Wrapper container for toolbar and content area
|
|
29
|
-
|
|
30
28
|
function FullPageEditor(props) {
|
|
31
29
|
var _this;
|
|
32
30
|
(0, _classCallCheck2.default)(this, FullPageEditor);
|
|
@@ -35,6 +33,7 @@ var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
35
33
|
showKeyline: false
|
|
36
34
|
});
|
|
37
35
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scrollContainer", null);
|
|
36
|
+
// Wrapper container for toolbar and content area
|
|
38
37
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "wrapperElementRef", /*#__PURE__*/_react.default.createRef());
|
|
39
38
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "contentAreaRef", function (contentArea) {
|
|
40
39
|
_this.contentArea = contentArea;
|
|
@@ -101,7 +101,8 @@ var EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
101
101
|
editorView: props.editorView,
|
|
102
102
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
103
103
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
104
|
-
handleEscape: handleEscape
|
|
104
|
+
handleEscape: handleEscape,
|
|
105
|
+
intl: props.intl
|
|
105
106
|
}, (0, _react2.jsx)("div", {
|
|
106
107
|
css: (0, _MainToolbar.mainToolbarStyle)(props.showKeyline || contextPanelWidth > 0, !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)),
|
|
107
108
|
"data-testid": "ak-editor-main-toolbar"
|
|
@@ -39,7 +39,7 @@ var colorPickerWrapper = function colorPickerWrapper(theme) {
|
|
|
39
39
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
40
40
|
|
|
41
41
|
var ColorPickerButton = function ColorPickerButton(props) {
|
|
42
|
-
var _props$size, _props$size2;
|
|
42
|
+
var _props$size, _props$size2, _props$size3;
|
|
43
43
|
var buttonRef = _react.default.useRef(null);
|
|
44
44
|
var _React$useState = _react.default.useState(false),
|
|
45
45
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -159,7 +159,8 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
159
159
|
};
|
|
160
160
|
var title = props.title || '';
|
|
161
161
|
var currentColor = props.currentColor && props.hexToPaletteColor ? props.hexToPaletteColor(props.currentColor) : props.currentColor;
|
|
162
|
-
var buttonStyle = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 6px;\n background-color: ", ";\n &:before {\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n content: '';\n border: 1px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n padding: 0;\n }\n "])), "var(--ds-background-neutral, transparent)",
|
|
162
|
+
var buttonStyle = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 6px;\n background-color: ", ";\n ", "\n &:before {\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n content: '';\n border: 1px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n padding: 0;\n }\n "])), "var(--ds-background-neutral, transparent)", /* If custom props size height, override the button base height property */
|
|
163
|
+
!!((_props$size = props.size) !== null && _props$size !== void 0 && _props$size.height) && "height: inherit;", _common.DEFAULT_BORDER_COLOR, (0, _constants.borderRadius)(), currentColor || 'transparent', ((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.width) || 14, ((_props$size3 = props.size) === null || _props$size3 === void 0 ? void 0 : _props$size3.height) || 14);
|
|
163
164
|
return (0, _react2.jsx)("div", {
|
|
164
165
|
css: colorPickerButtonWrapper
|
|
165
166
|
}, (0, _react2.jsx)(_tooltip.default, {
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -37,7 +38,6 @@ var _messages = require("./messages");
|
|
|
37
38
|
var _FormErrorBoundary = require("./FormErrorBoundary");
|
|
38
39
|
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); }
|
|
39
40
|
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; }
|
|
40
|
-
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; }
|
|
41
41
|
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); }; }
|
|
42
42
|
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; } }
|
|
43
43
|
function ConfigForm(_ref) {
|
|
@@ -142,6 +142,8 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
142
142
|
_this.props.onCancel();
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
|
+
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
146
|
+
// workaround for DST-2697, remove this function once fix.
|
|
145
147
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "backfillTabFormData", function (fields, formData, currentParameters) {
|
|
146
148
|
var getRelevantData = function getRelevantData(field, formParams, currentParams, backfill) {
|
|
147
149
|
if (field.hasGroupedValues && !(field.name in backfill)) {
|
|
@@ -184,42 +186,40 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
184
186
|
return (0, _merge.default)({}, mergedTabGroups, formData);
|
|
185
187
|
});
|
|
186
188
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSubmit", /*#__PURE__*/function () {
|
|
187
|
-
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
189
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(formData) {
|
|
188
190
|
var _this$props, fields, extensionManifest, onChange, autoSaveReject, serializedData;
|
|
189
|
-
return
|
|
190
|
-
while (1) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
_context.next = 4;
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
if (!extensionManifest) {
|
|
199
|
-
autoSaveReject === null || autoSaveReject === void 0 ? void 0 : autoSaveReject(new Error('Extension manifest not loaded'));
|
|
200
|
-
} else if (!fields) {
|
|
201
|
-
autoSaveReject === null || autoSaveReject === void 0 ? void 0 : autoSaveReject(new Error('Config fields not loaded'));
|
|
202
|
-
}
|
|
203
|
-
return _context.abrupt("return");
|
|
204
|
-
case 4:
|
|
205
|
-
_context.prev = 4;
|
|
206
|
-
_context.next = 7;
|
|
207
|
-
return (0, _transformers.serialize)(extensionManifest, _this.backfillTabFormData(fields, formData, _this.state.currentParameters), fields);
|
|
208
|
-
case 7:
|
|
209
|
-
serializedData = _context.sent;
|
|
210
|
-
onChange(serializedData);
|
|
211
|
-
_context.next = 15;
|
|
191
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
192
|
+
while (1) switch (_context.prev = _context.next) {
|
|
193
|
+
case 0:
|
|
194
|
+
_this$props = _this.props, fields = _this$props.fields, extensionManifest = _this$props.extensionManifest, onChange = _this$props.onChange, autoSaveReject = _this$props.autoSaveReject;
|
|
195
|
+
if (!(!extensionManifest || !fields)) {
|
|
196
|
+
_context.next = 4;
|
|
212
197
|
break;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
198
|
+
}
|
|
199
|
+
if (!extensionManifest) {
|
|
200
|
+
autoSaveReject === null || autoSaveReject === void 0 ? void 0 : autoSaveReject(new Error('Extension manifest not loaded'));
|
|
201
|
+
} else if (!fields) {
|
|
202
|
+
autoSaveReject === null || autoSaveReject === void 0 ? void 0 : autoSaveReject(new Error('Config fields not loaded'));
|
|
203
|
+
}
|
|
204
|
+
return _context.abrupt("return");
|
|
205
|
+
case 4:
|
|
206
|
+
_context.prev = 4;
|
|
207
|
+
_context.next = 7;
|
|
208
|
+
return (0, _transformers.serialize)(extensionManifest, _this.backfillTabFormData(fields, formData, _this.state.currentParameters), fields);
|
|
209
|
+
case 7:
|
|
210
|
+
serializedData = _context.sent;
|
|
211
|
+
onChange(serializedData);
|
|
212
|
+
_context.next = 15;
|
|
213
|
+
break;
|
|
214
|
+
case 11:
|
|
215
|
+
_context.prev = 11;
|
|
216
|
+
_context.t0 = _context["catch"](4);
|
|
217
|
+
autoSaveReject === null || autoSaveReject === void 0 ? void 0 : autoSaveReject(_context.t0);
|
|
218
|
+
// eslint-disable-next-line no-console
|
|
219
|
+
console.error("Error serializing parameters", _context.t0);
|
|
220
|
+
case 15:
|
|
221
|
+
case "end":
|
|
222
|
+
return _context.stop();
|
|
223
223
|
}
|
|
224
224
|
}, _callee, null, [[4, 11]]);
|
|
225
225
|
}));
|
|
@@ -228,41 +228,39 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
228
228
|
};
|
|
229
229
|
}());
|
|
230
230
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parseParameters", /*#__PURE__*/function () {
|
|
231
|
-
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
231
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(fields, parameters) {
|
|
232
232
|
var extensionManifest, currentParameters;
|
|
233
|
-
return
|
|
234
|
-
while (1) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
return _context2.stop();
|
|
265
|
-
}
|
|
233
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
234
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
235
|
+
case 0:
|
|
236
|
+
extensionManifest = _this.props.extensionManifest;
|
|
237
|
+
if (!(!extensionManifest || !fields || fields.length === 0)) {
|
|
238
|
+
_context2.next = 3;
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
return _context2.abrupt("return");
|
|
242
|
+
case 3:
|
|
243
|
+
if (!(typeof parameters === 'undefined')) {
|
|
244
|
+
_context2.next = 6;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
_this.setState({
|
|
248
|
+
currentParameters: {},
|
|
249
|
+
hasParsedParameters: true
|
|
250
|
+
});
|
|
251
|
+
return _context2.abrupt("return");
|
|
252
|
+
case 6:
|
|
253
|
+
_context2.next = 8;
|
|
254
|
+
return (0, _transformers.deserialize)(extensionManifest, parameters, fields);
|
|
255
|
+
case 8:
|
|
256
|
+
currentParameters = _context2.sent;
|
|
257
|
+
_this.setState({
|
|
258
|
+
currentParameters: currentParameters,
|
|
259
|
+
hasParsedParameters: true
|
|
260
|
+
});
|
|
261
|
+
case 10:
|
|
262
|
+
case "end":
|
|
263
|
+
return _context2.stop();
|
|
266
264
|
}
|
|
267
265
|
}, _callee2);
|
|
268
266
|
}));
|
|
@@ -270,6 +268,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
270
268
|
return _ref4.apply(this, arguments);
|
|
271
269
|
};
|
|
272
270
|
}());
|
|
271
|
+
// memoized to prevent rerender on new parameters
|
|
273
272
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderHeader", (0, _memoizeOne.default)(function (extensionManifest) {
|
|
274
273
|
var _this$props2 = _this.props,
|
|
275
274
|
onCancel = _this$props2.onCancel,
|
|
@@ -385,10 +384,6 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
385
384
|
});
|
|
386
385
|
}
|
|
387
386
|
}
|
|
388
|
-
|
|
389
|
-
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
390
|
-
// workaround for DST-2697, remove this function once fix.
|
|
391
|
-
// memoized to prevent rerender on new parameters
|
|
392
387
|
}, {
|
|
393
388
|
key: "render",
|
|
394
389
|
value: function render() {
|
|
@@ -13,7 +13,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
13
13
|
var _default = (0, _reactLoadable.default)({
|
|
14
14
|
loader: function loader() {
|
|
15
15
|
return Promise.resolve().then(function () {
|
|
16
|
-
return _interopRequireWildcard(require(
|
|
16
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-core-config-panel" */
|
|
17
|
+
'./ConfigPanelFieldsLoader'));
|
|
17
18
|
}).then(function (module) {
|
|
18
19
|
return module.default;
|
|
19
20
|
});
|