@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,7 +8,8 @@ import { filter, isEmptySelectionAtStart, deleteEmptyParagraphAndMoveBlockUp, is
|
|
|
8
8
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, withAnalytics } from '../../analytics';
|
|
9
9
|
import { insertTaskDecisionWithAnalytics } from '../commands';
|
|
10
10
|
import { joinAtCut, liftSelection, wrapSelectionInTaskList } from './commands';
|
|
11
|
-
import { getBlockRange, getCurrentIndentLevel, isActionOrDecisionItem, isActionOrDecisionList, isEmptyTaskDecision, isInsideTask, isInsideTaskOrDecisionItem, liftBlock,
|
|
11
|
+
import { getBlockRange, getCurrentIndentLevel, isActionOrDecisionItem, isActionOrDecisionList, isEmptyTaskDecision, isInsideTask, isInsideTaskOrDecisionItem, liftBlock, walkOut, getTaskItemIndex, isInsideDecision, isTable } from './helpers';
|
|
12
|
+
import { normalizeTaskItemsSelection } from '../utils';
|
|
12
13
|
const indentationAnalytics = (curIndentLevel, direction, inputMethod) => ({
|
|
13
14
|
action: ACTION.FORMATTED,
|
|
14
15
|
actionSubject: ACTION_SUBJECT.TEXT,
|
|
@@ -80,7 +81,8 @@ const joinTaskDecisionFollowing = (state, dispatch) => {
|
|
|
80
81
|
return false;
|
|
81
82
|
};
|
|
82
83
|
export const getUnindentCommand = (inputMethod = INPUT_METHOD.KEYBOARD) => filter(isInsideTask, (state, dispatch) => {
|
|
83
|
-
const
|
|
84
|
+
const normalizedSelection = normalizeTaskItemsSelection(state.selection);
|
|
85
|
+
const curIndentLevel = getCurrentIndentLevel(normalizedSelection);
|
|
84
86
|
if (!curIndentLevel || curIndentLevel === 1) {
|
|
85
87
|
return false;
|
|
86
88
|
}
|
|
@@ -103,23 +105,11 @@ const shouldLetTabThroughInTable = state => {
|
|
|
103
105
|
return false;
|
|
104
106
|
};
|
|
105
107
|
export const getIndentCommand = (inputMethod = INPUT_METHOD.KEYBOARD) => filter(isInsideTask, (state, dispatch) => {
|
|
106
|
-
|
|
107
|
-
const curIndentLevel = getCurrentIndentLevel(
|
|
108
|
+
const normalizedSelection = normalizeTaskItemsSelection(state.selection);
|
|
109
|
+
const curIndentLevel = getCurrentIndentLevel(normalizedSelection);
|
|
108
110
|
if (!curIndentLevel || curIndentLevel >= 6) {
|
|
109
111
|
return true;
|
|
110
112
|
}
|
|
111
|
-
const {
|
|
112
|
-
taskList,
|
|
113
|
-
taskItem
|
|
114
|
-
} = state.schema.nodes;
|
|
115
|
-
const {
|
|
116
|
-
$from,
|
|
117
|
-
$to
|
|
118
|
-
} = state.selection;
|
|
119
|
-
const maxDepth = subtreeHeight($from, $to, [taskList, taskItem]);
|
|
120
|
-
if (maxDepth >= 6) {
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
113
|
return withAnalytics(indentationAnalytics(curIndentLevel, INDENT_DIRECTION.INDENT, inputMethod))(autoJoin(wrapSelectionInTaskList, ['taskList']))(state, dispatch);
|
|
124
114
|
});
|
|
125
115
|
const backspaceFrom = $from => (state, dispatch) => {
|
|
@@ -6,10 +6,10 @@ import { createSelectionClickHandler } from '../../selection/utils';
|
|
|
6
6
|
import { decisionItemNodeView } from '../nodeviews/decisionItem';
|
|
7
7
|
import { taskItemNodeViewFactory } from '../nodeviews/taskItem';
|
|
8
8
|
import { stateKey } from './plugin-key';
|
|
9
|
-
var ACTIONS
|
|
10
|
-
(function (ACTIONS) {
|
|
9
|
+
var ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
11
10
|
ACTIONS[ACTIONS["SET_CONTEXT_PROVIDER"] = 0] = "SET_CONTEXT_PROVIDER";
|
|
12
|
-
|
|
11
|
+
return ACTIONS;
|
|
12
|
+
}(ACTIONS || {});
|
|
13
13
|
const setContextIdentifierProvider = provider => (state, dispatch) => {
|
|
14
14
|
if (dispatch) {
|
|
15
15
|
dispatch(state.tr.setMeta(stateKey, {
|
|
@@ -9,12 +9,13 @@ export default class TaskItemWithProviders extends Component {
|
|
|
9
9
|
_defineProperty(this, "state", {
|
|
10
10
|
resolvedContextProvider: undefined
|
|
11
11
|
});
|
|
12
|
+
// Storing the mounted state is an anti-pattern, however the asynchronous state
|
|
13
|
+
// updates via `updateContextIdentifierProvider` means we may be dismounted before
|
|
14
|
+
// it receives a response.
|
|
15
|
+
// Since we can't cancel the Promise we store the mounted state to avoid state
|
|
16
|
+
// updates when no longer suitable.
|
|
12
17
|
_defineProperty(this, "mounted", false);
|
|
13
|
-
}
|
|
14
|
-
// updates via `updateContextIdentifierProvider` means we may be dismounted before
|
|
15
|
-
// it receives a response.
|
|
16
|
-
// Since we can't cancel the Promise we store the mounted state to avoid state
|
|
17
|
-
// updates when no longer suitable.
|
|
18
|
+
}
|
|
18
19
|
UNSAFE_componentWillMount() {
|
|
19
20
|
this.mounted = true;
|
|
20
21
|
this.updateContextIdentifierProvider(this.props);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Fragment, Slice } from 'prosemirror-model';
|
|
2
|
+
import { NodeSelection, Selection, TextSelection } from 'prosemirror-state';
|
|
2
3
|
|
|
3
4
|
// If slice is decisionItem, wrap it inside a decisionList. This prevents an
|
|
4
5
|
// additional newline from being pasted along with the selected decision item.
|
|
@@ -9,4 +10,33 @@ export const transformSliceToDecisionList = (slice, schema) => {
|
|
|
9
10
|
return new Slice(Fragment.from(decisionListWrapperNode), slice.openStart, slice.openEnd);
|
|
10
11
|
}
|
|
11
12
|
return slice;
|
|
13
|
+
};
|
|
14
|
+
function isTaskListNode(node) {
|
|
15
|
+
return Boolean(node && node.type && 'taskList' === node.type.name);
|
|
16
|
+
}
|
|
17
|
+
const resolvePositionToStartOfTaskItem = $pos => {
|
|
18
|
+
const fromRange = $pos.blockRange($pos, isTaskListNode);
|
|
19
|
+
const fromPosition = fromRange && $pos.textOffset === 0 && fromRange.end - 1 === $pos.pos ? Selection.near($pos.doc.resolve(fromRange.end + 1), 1).$from : $pos;
|
|
20
|
+
return fromPosition;
|
|
21
|
+
};
|
|
22
|
+
const resolvePositionToEndOfTaskItem = $pos => {
|
|
23
|
+
const toRange = $pos.blockRange($pos, isTaskListNode);
|
|
24
|
+
const toPosition = toRange && $pos.textOffset === 0 && toRange.start + 1 === $pos.pos ? Selection.near($pos.doc.resolve(toRange.start - 1), -1).$to : $pos;
|
|
25
|
+
return toPosition;
|
|
26
|
+
};
|
|
27
|
+
export const normalizeTaskItemsSelection = selection => {
|
|
28
|
+
if (selection.empty) {
|
|
29
|
+
return selection;
|
|
30
|
+
}
|
|
31
|
+
const {
|
|
32
|
+
$from,
|
|
33
|
+
$to
|
|
34
|
+
} = selection;
|
|
35
|
+
if (selection instanceof NodeSelection) {
|
|
36
|
+
const head = resolvePositionToStartOfTaskItem($from);
|
|
37
|
+
return new TextSelection(head, head);
|
|
38
|
+
}
|
|
39
|
+
const head = resolvePositionToStartOfTaskItem($from);
|
|
40
|
+
const anchor = resolvePositionToEndOfTaskItem($to);
|
|
41
|
+
return new TextSelection(anchor, head);
|
|
12
42
|
};
|
|
@@ -20,12 +20,12 @@ function createInitialPluginState(editorState, pluginConfig) {
|
|
|
20
20
|
};
|
|
21
21
|
return state;
|
|
22
22
|
}
|
|
23
|
-
export let ACTIONS
|
|
24
|
-
(function (ACTIONS) {
|
|
23
|
+
export let ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
25
24
|
ACTIONS[ACTIONS["RESET_COLOR"] = 0] = "RESET_COLOR";
|
|
26
25
|
ACTIONS[ACTIONS["SET_COLOR"] = 1] = "SET_COLOR";
|
|
27
26
|
ACTIONS[ACTIONS["DISABLE"] = 2] = "DISABLE";
|
|
28
|
-
|
|
27
|
+
return ACTIONS;
|
|
28
|
+
}({});
|
|
29
29
|
export const pluginKey = new PluginKey('textColorPlugin');
|
|
30
30
|
export function createPlugin(dispatch, pluginConfig) {
|
|
31
31
|
return new SafePlugin({
|
|
@@ -2,15 +2,15 @@ import { createPlugin, createRule, ruleWithAnalytics } from '../../../utils/inpu
|
|
|
2
2
|
import { leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '../../analytics';
|
|
4
4
|
import { transformSmartCharsMentionsAndEmojis } from '../commands/transform-to-code';
|
|
5
|
-
var ValidAutoformatChars
|
|
6
|
-
(function (ValidAutoformatChars) {
|
|
5
|
+
var ValidAutoformatChars = /*#__PURE__*/function (ValidAutoformatChars) {
|
|
7
6
|
ValidAutoformatChars["STRONG"] = "__";
|
|
8
7
|
ValidAutoformatChars["STRIKE"] = "~~";
|
|
9
8
|
ValidAutoformatChars["STRONG_MARKDOWN"] = "**";
|
|
10
9
|
ValidAutoformatChars["ITALIC_MARKDOWN"] = "*";
|
|
11
10
|
ValidAutoformatChars["ITALIC"] = "_";
|
|
12
11
|
ValidAutoformatChars["CODE"] = "`";
|
|
13
|
-
|
|
12
|
+
return ValidAutoformatChars;
|
|
13
|
+
}(ValidAutoformatChars || {});
|
|
14
14
|
export const ValidCombinations = {
|
|
15
15
|
[ValidAutoformatChars.STRIKE]: [
|
|
16
16
|
// e.g: _~~lol~~_
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export let IconTypes
|
|
2
|
-
(function (IconTypes) {
|
|
1
|
+
export let IconTypes = /*#__PURE__*/function (IconTypes) {
|
|
3
2
|
IconTypes["strong"] = "strong";
|
|
4
3
|
IconTypes["em"] = "em";
|
|
5
4
|
IconTypes["underline"] = "underline";
|
|
@@ -7,4 +6,5 @@ export let IconTypes;
|
|
|
7
6
|
IconTypes["code"] = "code";
|
|
8
7
|
IconTypes["subscript"] = "subscript";
|
|
9
8
|
IconTypes["superscript"] = "superscript";
|
|
10
|
-
|
|
9
|
+
return IconTypes;
|
|
10
|
+
}({});
|
|
@@ -2,8 +2,8 @@ export const TYPE_AHEAD_DECORATION_KEY = 'typeahead_decoration_key';
|
|
|
2
2
|
export const TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = 'typeaheadDecoration';
|
|
3
3
|
export const TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
|
|
4
4
|
export const TYPE_AHEAD_DECORATION_ELEMENT_ID = 'typeahaed_decoration_element_id';
|
|
5
|
-
export let CloseSelectionOptions
|
|
6
|
-
(function (CloseSelectionOptions) {
|
|
5
|
+
export let CloseSelectionOptions = /*#__PURE__*/function (CloseSelectionOptions) {
|
|
7
6
|
CloseSelectionOptions["BEFORE_TEXT_INSERTED"] = "BEFORE_TEXT_INSERTED";
|
|
8
7
|
CloseSelectionOptions["AFTER_TEXT_INSERTED"] = "AFTER_TEXT_INSERTED";
|
|
9
|
-
|
|
8
|
+
return CloseSelectionOptions;
|
|
9
|
+
}({});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export let ACTIONS
|
|
2
|
-
(function (ACTIONS) {
|
|
1
|
+
export let ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
3
2
|
ACTIONS["OPEN_TYPEAHEAD_AT_CURSOR"] = "OPEN_TYPEAHEAD_AT_CURSOR";
|
|
4
3
|
ACTIONS["CLOSE_TYPE_AHEAD"] = "CLOSE_TYPE_AHEAD";
|
|
5
4
|
ACTIONS["CHANGE_QUERY"] = "CHANGE_QUERY";
|
|
@@ -7,4 +6,5 @@ export let ACTIONS;
|
|
|
7
6
|
ACTIONS["INSERT_RAW_QUERY"] = "INSERT_RAW_QUERY";
|
|
8
7
|
ACTIONS["UPDATE_LIST_ITEMS"] = "UPDATE_LIST_ITEMS";
|
|
9
8
|
ACTIONS["UPDATE_SELECTED_INDEX"] = "UPDATE_SELECTED_INDEX";
|
|
10
|
-
|
|
9
|
+
return ACTIONS;
|
|
10
|
+
}({});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INPUT_METHOD } from '../analytics/types/enums';
|
|
2
|
-
export let InputSource
|
|
3
|
-
(function (InputSource) {
|
|
2
|
+
export let InputSource = function (InputSource) {
|
|
4
3
|
InputSource[InputSource["TOOLBAR"] = INPUT_METHOD.TOOLBAR] = "TOOLBAR";
|
|
5
4
|
InputSource[InputSource["KEYBOARD"] = INPUT_METHOD.KEYBOARD] = "KEYBOARD";
|
|
6
|
-
|
|
5
|
+
return InputSource;
|
|
6
|
+
}({});
|
|
@@ -78,12 +78,11 @@ const secondaryToolbarStyle = css`
|
|
|
78
78
|
padding: 12px 1px;
|
|
79
79
|
`;
|
|
80
80
|
class Editor extends React.Component {
|
|
81
|
-
// Wrapper container for toolbar and content area
|
|
82
|
-
|
|
83
81
|
constructor(props) {
|
|
84
82
|
super(props);
|
|
85
83
|
_defineProperty(this, "appearance", 'comment');
|
|
86
84
|
_defineProperty(this, "containerElement", null);
|
|
85
|
+
// Wrapper container for toolbar and content area
|
|
87
86
|
_defineProperty(this, "wrapperElementRef", /*#__PURE__*/React.createRef());
|
|
88
87
|
_defineProperty(this, "handleSave", () => {
|
|
89
88
|
if (this.props.editorView && this.props.onSave) {
|
|
@@ -151,7 +150,8 @@ class Editor extends React.Component {
|
|
|
151
150
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
152
151
|
handleEscape: handleEscape,
|
|
153
152
|
editorAppearance: this.appearance,
|
|
154
|
-
useStickyToolbar: useStickyToolbar
|
|
153
|
+
useStickyToolbar: useStickyToolbar,
|
|
154
|
+
intl: intl
|
|
155
155
|
}, jsx(Toolbar, {
|
|
156
156
|
editorView: editorView,
|
|
157
157
|
editorActions: editorActions,
|
|
@@ -9,14 +9,13 @@ import { ContextPanelWidthProvider } from '../../ContextPanel/context';
|
|
|
9
9
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
10
10
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
11
11
|
export class FullPageEditor extends React.Component {
|
|
12
|
-
// Wrapper container for toolbar and content area
|
|
13
|
-
|
|
14
12
|
constructor(props) {
|
|
15
13
|
super(props);
|
|
16
14
|
_defineProperty(this, "state", {
|
|
17
15
|
showKeyline: false
|
|
18
16
|
});
|
|
19
17
|
_defineProperty(this, "scrollContainer", null);
|
|
18
|
+
// Wrapper container for toolbar and content area
|
|
20
19
|
_defineProperty(this, "wrapperElementRef", /*#__PURE__*/React.createRef());
|
|
21
20
|
_defineProperty(this, "contentAreaRef", contentArea => {
|
|
22
21
|
this.contentArea = contentArea;
|
|
@@ -85,7 +85,8 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
85
85
|
editorView: props.editorView,
|
|
86
86
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
87
87
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
88
|
-
handleEscape: handleEscape
|
|
88
|
+
handleEscape: handleEscape,
|
|
89
|
+
intl: props.intl
|
|
89
90
|
}, jsx("div", {
|
|
90
91
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)),
|
|
91
92
|
"data-testid": "ak-editor-main-toolbar"
|
|
@@ -34,7 +34,7 @@ const colorPickerWrapper = theme => css`
|
|
|
34
34
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
35
35
|
|
|
36
36
|
const ColorPickerButton = props => {
|
|
37
|
-
var _props$size, _props$size2;
|
|
37
|
+
var _props$size, _props$size2, _props$size3;
|
|
38
38
|
const buttonRef = React.useRef(null);
|
|
39
39
|
const [isPopupOpen, setIsPopupOpen] = React.useState(false);
|
|
40
40
|
const [isPopupPositioned, setIsPopupPositioned] = React.useState(false);
|
|
@@ -145,6 +145,8 @@ const ColorPickerButton = props => {
|
|
|
145
145
|
const buttonStyle = css`
|
|
146
146
|
padding: 6px;
|
|
147
147
|
background-color: ${"var(--ds-background-neutral, transparent)"};
|
|
148
|
+
${
|
|
149
|
+
/* If custom props size height, override the button base height property */!!((_props$size = props.size) !== null && _props$size !== void 0 && _props$size.height) && `height: inherit;`}
|
|
148
150
|
&:before {
|
|
149
151
|
display: flex;
|
|
150
152
|
justify-content: center;
|
|
@@ -154,8 +156,8 @@ const ColorPickerButton = props => {
|
|
|
154
156
|
border: 1px solid ${DEFAULT_BORDER_COLOR};
|
|
155
157
|
border-radius: ${borderRadius()}px;
|
|
156
158
|
background-color: ${currentColor || 'transparent'};
|
|
157
|
-
width: ${((_props$
|
|
158
|
-
height: ${((_props$
|
|
159
|
+
width: ${((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.width) || 14}px;
|
|
160
|
+
height: ${((_props$size3 = props.size) === null || _props$size3 === void 0 ? void 0 : _props$size3.height) || 14}px;
|
|
159
161
|
padding: 0;
|
|
160
162
|
}
|
|
161
163
|
`;
|
|
@@ -121,6 +121,8 @@ class ConfigPanel extends React.Component {
|
|
|
121
121
|
this.props.onCancel();
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
+
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
125
|
+
// workaround for DST-2697, remove this function once fix.
|
|
124
126
|
_defineProperty(this, "backfillTabFormData", (fields, formData, currentParameters) => {
|
|
125
127
|
const getRelevantData = (field, formParams, currentParams, backfill) => {
|
|
126
128
|
if (field.hasGroupedValues && !(field.name in backfill)) {
|
|
@@ -209,6 +211,7 @@ class ConfigPanel extends React.Component {
|
|
|
209
211
|
hasParsedParameters: true
|
|
210
212
|
});
|
|
211
213
|
});
|
|
214
|
+
// memoized to prevent rerender on new parameters
|
|
212
215
|
_defineProperty(this, "renderHeader", memoizeOne(extensionManifest => {
|
|
213
216
|
const {
|
|
214
217
|
onCancel,
|
|
@@ -321,10 +324,6 @@ class ConfigPanel extends React.Component {
|
|
|
321
324
|
});
|
|
322
325
|
}
|
|
323
326
|
}
|
|
324
|
-
|
|
325
|
-
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
326
|
-
// workaround for DST-2697, remove this function once fix.
|
|
327
|
-
// memoized to prevent rerender on new parameters
|
|
328
327
|
render() {
|
|
329
328
|
const {
|
|
330
329
|
extensionManifest,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export let ValidationError
|
|
2
|
-
(function (ValidationError) {
|
|
1
|
+
export let ValidationError = /*#__PURE__*/function (ValidationError) {
|
|
3
2
|
ValidationError["Required"] = "required";
|
|
4
3
|
ValidationError["Invalid"] = "invalid";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
return ValidationError;
|
|
5
|
+
}({});
|
|
6
|
+
export let FieldTypeError = /*#__PURE__*/function (FieldTypeError) {
|
|
8
7
|
FieldTypeError["isMultipleAndRadio"] = "isMultipleAndRadio";
|
|
9
|
-
|
|
8
|
+
return FieldTypeError;
|
|
9
|
+
}({});
|
|
@@ -39,12 +39,12 @@ import { useCallback, useEffect, useRef, useReducer } from 'react';
|
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
-
export let ACTIONS
|
|
43
|
-
(function (ACTIONS) {
|
|
42
|
+
export let ACTIONS = /*#__PURE__*/function (ACTIONS) {
|
|
44
43
|
ACTIONS["FOCUS_SEARCH"] = "focusOnSearch";
|
|
45
44
|
ACTIONS["UPDATE_STATE"] = "updateState";
|
|
46
45
|
ACTIONS["MOVE"] = "move";
|
|
47
|
-
|
|
46
|
+
return ACTIONS;
|
|
47
|
+
}({});
|
|
48
48
|
const reducer = (state, action) => {
|
|
49
49
|
switch (action.type) {
|
|
50
50
|
case ACTIONS.UPDATE_STATE:
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { centeredToolbarContainer } from '../styles';
|
|
5
5
|
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
6
|
+
import { EDIT_AREA_ID } from '../../create-editor/ReactEditorViewInternal';
|
|
7
|
+
import messages from '../Appearance/FullPage/messages';
|
|
6
8
|
/*
|
|
7
9
|
** The context is used to handle the keydown events of submenus.
|
|
8
10
|
** Because the keyboard navigation is explicitly managed for main toolbar items
|
|
@@ -28,7 +30,8 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
28
30
|
disableArrowKeyNavigation,
|
|
29
31
|
isShortcutToFocusToolbar,
|
|
30
32
|
editorAppearance,
|
|
31
|
-
useStickyToolbar
|
|
33
|
+
useStickyToolbar,
|
|
34
|
+
intl
|
|
32
35
|
}) => {
|
|
33
36
|
const wrapperRef = useRef(null);
|
|
34
37
|
const selectedItemIndex = useRef(0);
|
|
@@ -65,6 +68,13 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
65
68
|
const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
66
69
|
(_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
|
|
67
70
|
};
|
|
71
|
+
const handleTabLocal = () => {
|
|
72
|
+
const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
73
|
+
filteredFocusableElements.forEach(element => {
|
|
74
|
+
element.setAttribute('tabindex', '-1');
|
|
75
|
+
});
|
|
76
|
+
filteredFocusableElements[selectedItemIndex.current].setAttribute('tabindex', '0');
|
|
77
|
+
};
|
|
68
78
|
const focusAndScrollToElement = (element, scrollToElement = true) => {
|
|
69
79
|
if (scrollToElement) {
|
|
70
80
|
element === null || element === void 0 ? void 0 : element.scrollIntoView({
|
|
@@ -137,6 +147,9 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
137
147
|
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current], allowScrollToElement);
|
|
138
148
|
event.preventDefault();
|
|
139
149
|
break;
|
|
150
|
+
case 'Tab':
|
|
151
|
+
handleTabLocal();
|
|
152
|
+
break;
|
|
140
153
|
case 'Escape':
|
|
141
154
|
handleEscape(event);
|
|
142
155
|
break;
|
|
@@ -171,7 +184,10 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
171
184
|
return jsx("div", {
|
|
172
185
|
css: editorAppearance === 'comment' && centeredToolbarContainer,
|
|
173
186
|
className: "custom-key-handler-wrapper",
|
|
174
|
-
ref: wrapperRef
|
|
187
|
+
ref: wrapperRef,
|
|
188
|
+
role: "toolbar",
|
|
189
|
+
"aria-label": intl.formatMessage(messages.toolbarLabel),
|
|
190
|
+
"aria-controls": EDIT_AREA_ID
|
|
175
191
|
}, jsx(KeyDownHandlerContext.Provider, {
|
|
176
192
|
value: submenuKeydownHandleContext
|
|
177
193
|
}, children));
|
|
@@ -50,6 +50,7 @@ export default class ToolbarFeedback extends PureComponent {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
+
// Create a FeedbackInfo instance from props.
|
|
53
54
|
_defineProperty(this, "getFeedbackInfo", () => {
|
|
54
55
|
const isFeedbackInfoAttr = attr => ['product', 'packageVersion', 'packageName', 'labels'].indexOf(attr) >= 0;
|
|
55
56
|
return pickBy((key, value) => isFeedbackInfoAttr(key) && !isNullOrUndefined(value), this.props);
|
|
@@ -112,9 +113,6 @@ export default class ToolbarFeedback extends PureComponent {
|
|
|
112
113
|
});
|
|
113
114
|
deprecationWarnings(ToolbarFeedback.name, props, deprecations);
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
-
// Create a FeedbackInfo instance from props.
|
|
117
|
-
|
|
118
116
|
render() {
|
|
119
117
|
const {
|
|
120
118
|
popupsMountPoint,
|
|
@@ -6,11 +6,11 @@ import { isEmptyParagraph } from './document';
|
|
|
6
6
|
import { GapCursorSelection, Side } from '../plugins/selection/gap-cursor-selection';
|
|
7
7
|
import { normaliseNestedLayout } from './selection';
|
|
8
8
|
import { isListItemNode } from '../plugins/list/utils/node';
|
|
9
|
-
export let LookDirection
|
|
10
|
-
(function (LookDirection) {
|
|
9
|
+
export let LookDirection = /*#__PURE__*/function (LookDirection) {
|
|
11
10
|
LookDirection["Before"] = "before";
|
|
12
11
|
LookDirection["After"] = "after";
|
|
13
|
-
|
|
12
|
+
return LookDirection;
|
|
13
|
+
}({});
|
|
14
14
|
const isLastChild = ($pos, doc) => doc.resolve($pos.after()).node().lastChild === $pos.node();
|
|
15
15
|
const isFirstChild = ($pos, doc) => doc.resolve($pos.before()).node().firstChild === $pos.node();
|
|
16
16
|
const nodeIsInsideAList = tr => {
|
|
@@ -11,7 +11,9 @@ const DEFAULT_SAMPLING_RATE = 100;
|
|
|
11
11
|
const noop = () => {};
|
|
12
12
|
export class TransactionTracker {
|
|
13
13
|
constructor() {
|
|
14
|
+
// Counter so we can rate limit the transaction performance tracking
|
|
14
15
|
_defineProperty(this, "dispatchCallCounter", 0);
|
|
16
|
+
// A map containing the time which measurement starts
|
|
15
17
|
_defineProperty(this, "measureMap", new Map());
|
|
16
18
|
_defineProperty(this, "measureListeners", []);
|
|
17
19
|
_defineProperty(this, "bumpDispatchCounter", options => {
|
|
@@ -68,8 +70,7 @@ export class TransactionTracker {
|
|
|
68
70
|
}));
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
|
-
}
|
|
72
|
-
// A map containing the time which measurement starts
|
|
73
|
+
}
|
|
73
74
|
addMeasureListener(listener) {
|
|
74
75
|
this.measureListeners.push(listener);
|
|
75
76
|
}
|
package/dist/es2019/version.json
CHANGED