@atlaskit/editor-common 76.1.11 → 76.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/copy-button/package.json +15 -0
- package/dist/cjs/__tests_external__/cases/fundamentals/collection.js +2 -3
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +2 -3
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/delete.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/edit.js +3 -5
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/index.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/insert.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/delete.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/edit.js +3 -5
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/index.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/insert.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/delete.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/edit.js +3 -5
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/index.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/insert.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/index.js +2 -3
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/insert.js +2 -3
- package/dist/cjs/__tests_external__/page-objects/Editor.js +2 -3
- package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +2 -3
- package/dist/cjs/__tests_external__/page-objects/Renderer.js +2 -3
- package/dist/cjs/analytics/analytics-queue.js +8 -7
- package/dist/cjs/analytics/fire-analytics-event.js +4 -6
- package/dist/cjs/analytics/linking-utils.js +5 -9
- package/dist/cjs/analytics/types/enums.js +9 -17
- package/dist/cjs/analytics/types/extension-events.js +3 -5
- package/dist/cjs/analytics/types/format-events.js +3 -5
- package/dist/cjs/analytics/types/general-events.js +5 -9
- package/dist/cjs/analytics/types/inline-comment-events.js +2 -3
- package/dist/cjs/analytics/types/insert-events.js +5 -9
- package/dist/cjs/analytics/types/list-events.js +5 -9
- package/dist/cjs/analytics/types/node-events.js +3 -5
- package/dist/cjs/analytics/types/paste-events.js +4 -7
- package/dist/cjs/analytics/types/smart-links.js +2 -3
- package/dist/cjs/analytics/types/substitute-events.js +3 -5
- package/dist/cjs/analytics/types/table-events.js +4 -7
- package/dist/cjs/analytics/types/toolbar-button.js +2 -3
- package/dist/cjs/analytics/types/utils.js +3 -5
- package/dist/cjs/card/LinkToolbarButtonGroup.js +2 -3
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +2 -3
- package/dist/cjs/card/index.js +1 -2
- package/dist/cjs/card/link-toolbar-button-group-options.js +2 -3
- package/dist/cjs/card/ui/assets/card.js +2 -3
- package/dist/cjs/card/ui/assets/embed.js +2 -3
- package/dist/cjs/card/ui/assets/inline.js +2 -3
- package/dist/cjs/card/ui/assets/url.js +2 -3
- package/dist/cjs/card/utils.js +2 -3
- package/dist/cjs/clipboard/index.js +5 -9
- package/dist/cjs/collab/index.js +3 -5
- package/dist/cjs/commands/index.js +4 -8
- package/dist/cjs/commands/insert-block.js +2 -3
- package/dist/cjs/copy-button/index.js +21 -0
- package/dist/cjs/core-utils/inside.js +2 -3
- package/dist/cjs/editor-analytics/withAnalytics.js +2 -2
- package/dist/cjs/element-browser/ElementBrowser.js +1 -2
- package/dist/cjs/element-browser/ViewMore.js +2 -3
- package/dist/cjs/element-browser/components/CategoryList.js +1 -2
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +1 -2
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +4 -8
- package/dist/cjs/element-browser/components/ElementList/utils.js +1 -1
- package/dist/cjs/element-browser/components/ElementSearch.js +1 -2
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +1 -2
- package/dist/cjs/element-browser/constants.js +11 -22
- package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -6
- package/dist/cjs/element-browser/types.js +2 -3
- package/dist/cjs/event-dispatcher/index.js +1 -2
- package/dist/cjs/extensions/combine-extension-providers.js +2 -3
- package/dist/cjs/extensions/default-extension-provider.js +2 -3
- package/dist/cjs/extensions/manifest-helpers.js +4 -8
- package/dist/cjs/extensions/module-helpers.js +4 -8
- package/dist/cjs/extensions/types/field-definitions.js +6 -11
- package/dist/cjs/floating-toolbar/index.js +5 -9
- package/dist/cjs/guideline/constants.js +2 -4
- package/dist/cjs/guideline/defaultGuideline.js +2 -3
- package/dist/cjs/guideline/dynamicGuideline.js +1 -2
- package/dist/cjs/guideline/fixedGuideline.js +3 -5
- package/dist/cjs/guideline/relativeGuideline.js +3 -5
- package/dist/cjs/guideline/snapping.js +3 -5
- package/dist/cjs/guideline/updateGuideline.js +2 -3
- package/dist/cjs/guideline/utils.js +7 -13
- package/dist/cjs/i18n/cs.js +2 -3
- package/dist/cjs/i18n/da.js +2 -3
- package/dist/cjs/i18n/de.js +2 -3
- package/dist/cjs/i18n/en.js +2 -3
- package/dist/cjs/i18n/en_GB.js +2 -3
- package/dist/cjs/i18n/en_ZZ.js +2 -3
- package/dist/cjs/i18n/es.js +2 -3
- package/dist/cjs/i18n/et.js +1 -2
- package/dist/cjs/i18n/fi.js +2 -3
- package/dist/cjs/i18n/fr.js +2 -3
- package/dist/cjs/i18n/hu.js +2 -3
- package/dist/cjs/i18n/it.js +2 -3
- package/dist/cjs/i18n/ja.js +2 -3
- package/dist/cjs/i18n/ko.js +2 -3
- package/dist/cjs/i18n/languages.js +2 -3
- package/dist/cjs/i18n/nb.js +2 -3
- package/dist/cjs/i18n/nl.js +2 -3
- package/dist/cjs/i18n/pl.js +2 -3
- package/dist/cjs/i18n/pt_BR.js +2 -3
- package/dist/cjs/i18n/pt_PT.js +1 -2
- package/dist/cjs/i18n/ru.js +2 -3
- package/dist/cjs/i18n/sk.js +1 -2
- package/dist/cjs/i18n/sv.js +2 -3
- package/dist/cjs/i18n/th.js +2 -3
- package/dist/cjs/i18n/tr.js +2 -3
- package/dist/cjs/i18n/uk.js +2 -3
- package/dist/cjs/i18n/vi.js +2 -3
- package/dist/cjs/i18n/zh.js +2 -3
- package/dist/cjs/i18n/zh_TW.js +2 -3
- package/dist/cjs/icons/index.js +2 -3
- package/dist/cjs/icons/shared/BorderIcon.js +2 -3
- package/dist/cjs/icons/shared/PanelErrorIcon.js +2 -3
- package/dist/cjs/icons/shared/PanelInfoIcon.js +2 -3
- package/dist/cjs/icons/shared/PanelNoteIcon.js +2 -3
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +2 -3
- package/dist/cjs/icons/shared/PanelWarningIcon.js +2 -3
- package/dist/cjs/insert/index.js +6 -11
- package/dist/cjs/keymaps/consts.js +12 -24
- package/dist/cjs/keymaps/index.js +66 -132
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/index.js +6 -7
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +2 -3
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +9 -15
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/messages.js +2 -3
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/utils.js +4 -7
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +3 -5
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +5 -10
- package/dist/cjs/link/LinkSearch/ToolbarComponents.js +3 -6
- package/dist/cjs/link/LinkSearch/index.js +1 -2
- package/dist/cjs/link/LinkSearch/listItemAlts.js +2 -3
- package/dist/cjs/link/LinkSearch/transformTimeStamp.js +2 -3
- package/dist/cjs/link/types.js +3 -5
- package/dist/cjs/lists/analytics.js +3 -5
- package/dist/cjs/lists/indentation.js +2 -3
- package/dist/cjs/lists/node.js +3 -5
- package/dist/cjs/lists/replace-content.js +2 -3
- package/dist/cjs/lists/selection.js +3 -6
- package/dist/cjs/mark/commands.js +4 -7
- package/dist/cjs/mark/text-formatting.js +2 -3
- package/dist/cjs/media-single/constants.js +13 -26
- package/dist/cjs/media-single/utils.js +10 -19
- package/dist/cjs/messages/alignment.js +24 -0
- package/dist/cjs/messages/annotation.js +24 -0
- package/dist/cjs/messages/block-type.js +159 -0
- package/dist/cjs/messages/card.js +2 -3
- package/dist/cjs/messages/codeBidiWarning.js +2 -3
- package/dist/cjs/messages/codeBlockButton.js +2 -3
- package/dist/cjs/messages/full-page.js +2 -3
- package/dist/cjs/messages/index.js +30 -3
- package/dist/cjs/messages/insert-block.js +2 -3
- package/dist/cjs/messages/link-toolbar.js +2 -3
- package/dist/cjs/messages/link.js +2 -3
- package/dist/cjs/messages/list.js +2 -3
- package/dist/cjs/messages/media-and-embed-toolbar.js +2 -3
- package/dist/cjs/messages/toolbar.js +7 -3
- package/dist/cjs/messages/undo-redo.js +19 -0
- package/dist/cjs/messages/unsupportedContent.js +2 -3
- package/dist/cjs/monitoring/error.js +3 -4
- package/dist/cjs/node-width/index.js +5 -9
- package/dist/cjs/paste/md-plugins/linkify-md-plugin.js +2 -3
- package/dist/cjs/paste/md-plugins/newline-md-plugin.js +2 -3
- package/dist/cjs/paste/md-plugins/paragraph-md-plugin.js +2 -3
- package/dist/cjs/paste/md.js +1 -2
- package/dist/cjs/preset/builder.js +2 -3
- package/dist/cjs/preset/core-plugin.js +2 -3
- package/dist/cjs/preset/editor-commands.js +3 -4
- package/dist/cjs/preset/plugin-injection-api.js +4 -7
- package/dist/cjs/provider-factory/context.js +4 -7
- package/dist/cjs/provider-factory/provider-factory.js +2 -3
- package/dist/cjs/provider-factory/with-providers.js +1 -2
- package/dist/cjs/provider-helpers/combine-providers.js +2 -3
- package/dist/cjs/provider-helpers/promise-helpers.js +5 -9
- package/dist/cjs/quick-insert/assets/index.js +25 -49
- package/dist/cjs/quick-insert/use-icon-themed.js +2 -3
- package/dist/cjs/quick-insert/utils.js +1 -2
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +2 -3
- package/dist/cjs/react-node-view/index.js +4 -5
- package/dist/cjs/resizer/utils.js +4 -7
- package/dist/cjs/safe-plugin/index.js +2 -3
- package/dist/cjs/selection/gap-cursor/selection.js +5 -9
- package/dist/cjs/selection/gap-cursor/utils/is-ignored.js +2 -3
- package/dist/cjs/selection/gap-cursor/utils/is-valid-target-node.js +2 -3
- package/dist/cjs/selection/index.js +1 -2
- package/dist/cjs/selection/types.js +2 -3
- package/dist/cjs/selection/utils.js +2 -4
- package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +2 -3
- package/dist/cjs/styles/shared/annotation.js +5 -9
- package/dist/cjs/styles/shared/block-marks.js +1 -2
- package/dist/cjs/styles/shared/blockquote.js +1 -2
- package/dist/cjs/styles/shared/code-block.js +3 -6
- package/dist/cjs/styles/shared/code-mark.js +2 -3
- package/dist/cjs/styles/shared/column-layout.js +1 -2
- package/dist/cjs/styles/shared/date.js +2 -4
- package/dist/cjs/styles/shared/dropdown-menu.js +3 -5
- package/dist/cjs/styles/shared/embedCard.js +2 -4
- package/dist/cjs/styles/shared/emoji.js +2 -3
- package/dist/cjs/styles/shared/extension.js +2 -4
- package/dist/cjs/styles/shared/grid.js +2 -4
- package/dist/cjs/styles/shared/headings.js +2 -3
- package/dist/cjs/styles/shared/indentation.js +1 -2
- package/dist/cjs/styles/shared/layout.js +2 -4
- package/dist/cjs/styles/shared/link.js +1 -2
- package/dist/cjs/styles/shared/lists.js +2 -4
- package/dist/cjs/styles/shared/media-single.js +2 -4
- package/dist/cjs/styles/shared/mention.js +2 -3
- package/dist/cjs/styles/shared/panel.js +10 -19
- package/dist/cjs/styles/shared/paragraph.js +1 -2
- package/dist/cjs/styles/shared/plugins.js +4 -8
- package/dist/cjs/styles/shared/resizer.js +9 -18
- package/dist/cjs/styles/shared/rule.js +2 -3
- package/dist/cjs/styles/shared/shadow.js +1 -2
- package/dist/cjs/styles/shared/smart-card.js +2 -4
- package/dist/cjs/styles/shared/smartCard.js +3 -6
- package/dist/cjs/styles/shared/status.js +2 -3
- package/dist/cjs/styles/shared/table.js +13 -25
- package/dist/cjs/styles/shared/tableCell.js +2 -3
- package/dist/cjs/styles/shared/task-decision.js +2 -4
- package/dist/cjs/styles/shared/text-color.js +1 -2
- package/dist/cjs/styles/shared/unsupported-content.js +2 -4
- package/dist/cjs/styles/shared/whitespace.js +1 -2
- package/dist/cjs/transforms/expand.js +4 -7
- package/dist/cjs/transforms/extension.js +2 -3
- package/dist/cjs/type-ahead/index.js +3 -5
- package/dist/cjs/types/annotation/emitter.js +3 -5
- package/dist/cjs/types/index.js +2 -3
- package/dist/cjs/types/toolbar.js +4 -7
- package/dist/cjs/ufo/experience-store.js +9 -13
- package/dist/cjs/ui/Announcer/announcer.js +1 -2
- package/dist/cjs/ui/Caption/index.js +2 -4
- package/dist/cjs/ui/Caption/messages.js +2 -3
- package/dist/cjs/ui/ContextPanel/context.js +4 -8
- package/dist/cjs/ui/DropList/index.js +3 -4
- package/dist/cjs/ui/Emoji/index.js +2 -3
- package/dist/cjs/ui/ErrorBoundary/index.js +2 -3
- package/dist/cjs/ui/Expand/index.js +6 -11
- package/dist/cjs/ui/FloatingToolbar/Button.js +2 -3
- package/dist/cjs/ui/FloatingToolbar/Separator.js +2 -3
- package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +2 -3
- package/dist/cjs/ui/FloatingToolbar/styles.js +3 -5
- package/dist/cjs/ui/IntlErrorBoundary/index.js +4 -6
- package/dist/cjs/ui/Layer/index.js +1 -2
- package/dist/cjs/ui/Layer/internal/helpers.js +1 -2
- package/dist/cjs/ui/LinkSearch/const.js +4 -8
- package/dist/cjs/ui/MediaSingle/grid.js +6 -11
- package/dist/cjs/ui/MediaSingle/link.js +1 -2
- package/dist/cjs/ui/MediaSingle/styled.js +5 -9
- package/dist/cjs/ui/Mention/index.js +2 -3
- package/dist/cjs/ui/Mention/mention-with-providers.js +2 -3
- package/dist/cjs/ui/Messages/index.js +4 -7
- package/dist/cjs/ui/OverflowShadow/index.js +1 -2
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +4 -7
- package/dist/cjs/ui/PanelTextInput/index.js +2 -3
- package/dist/cjs/ui/PanelTextInput/styles.js +3 -5
- package/dist/cjs/ui/Popup/index.js +2 -3
- package/dist/cjs/ui/PortalProvider/index.js +8 -12
- package/dist/cjs/ui/ResizerLegacy/index.js +6 -7
- package/dist/cjs/ui/ResizerLegacy/styled.js +2 -3
- package/dist/cjs/ui/ResizerLegacy/utils.js +4 -7
- package/dist/cjs/ui/Toolbar/index.js +1 -2
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -2
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -2
- package/dist/cjs/ui/WidthProvider/index.js +4 -7
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +2 -3
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +2 -4
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Color/styles.js +3 -5
- package/dist/cjs/ui-color/ColorPalette/Palettes/borderColorPalette.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/common.js +2 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +2 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +10 -19
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +4 -5
- package/dist/cjs/ui-color/ColorPalette/Palettes/statusColorPalette.js +3 -5
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/index.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/styles.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/utils.js +3 -5
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +2 -3
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +7 -8
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/index.js +2 -3
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/types.js +2 -3
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +3 -4
- package/dist/cjs/ui-menu/Dropdown/index.js +4 -6
- package/dist/cjs/ui-menu/DropdownContainer/index.js +2 -3
- package/dist/cjs/ui-menu/DropdownMenu/index.js +6 -8
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +12 -14
- package/dist/cjs/ui-menu/ToolbarButton/index.js +2 -4
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -3
- package/dist/cjs/ui-react/ReactEditorViewContext.js +1 -2
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +1 -1
- package/dist/cjs/utils/analytics.js +5 -10
- package/dist/cjs/utils/annotation/index.js +3 -5
- package/dist/cjs/utils/breakout.js +7 -13
- package/dist/cjs/utils/browser-extensions.js +1 -1
- package/dist/cjs/utils/browser.js +1 -2
- package/dist/cjs/utils/commands.js +11 -21
- package/dist/cjs/utils/compare-props.js +6 -11
- package/dist/cjs/utils/compareNodes.js +2 -4
- package/dist/cjs/utils/datasource.js +3 -5
- package/dist/cjs/utils/date.js +7 -13
- package/dist/cjs/utils/document.js +3 -5
- package/dist/cjs/utils/dom.js +1 -2
- package/dist/cjs/utils/editor-core-utils.js +9 -18
- package/dist/cjs/utils/error-reporter.js +2 -3
- package/dist/cjs/utils/grid.js +2 -3
- package/dist/cjs/utils/hyperlink.js +7 -13
- package/dist/cjs/utils/imageLoader.js +2 -3
- package/dist/cjs/utils/index.js +5 -10
- package/dist/cjs/utils/input-rules.js +5 -8
- package/dist/cjs/utils/is-text-input.js +2 -3
- package/dist/cjs/utils/list.js +7 -11
- package/dist/cjs/utils/macro.js +2 -3
- package/dist/cjs/utils/nodes.js +12 -24
- package/dist/cjs/utils/outdated-browsers.js +2 -3
- package/dist/cjs/utils/performance/get-performance-timing.js +2 -3
- package/dist/cjs/utils/performance/measure-render.js +1 -2
- package/dist/cjs/utils/performance/measure-tti.js +2 -4
- package/dist/cjs/utils/profiler/render-count.js +9 -11
- package/dist/cjs/utils/referentiality.js +19 -24
- package/dist/cjs/utils/rich-media-utils.js +5 -10
- package/dist/cjs/utils/scroll-gutter.js +3 -6
- package/dist/cjs/utils/should-force-tracking.js +2 -3
- package/dist/cjs/utils/track-unsupported-content.js +4 -7
- package/dist/cjs/utils/traversor.js +1 -2
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +4 -7
- package/dist/cjs/utils/validate-using-spec.js +3 -6
- package/dist/cjs/utils/validator.js +12 -21
- package/dist/cjs/utils/whitespace.js +2 -4
- package/dist/cjs/with-plugin-state/index.js +1 -2
- package/dist/es2019/analytics/analytics-queue.js +3 -1
- package/dist/es2019/copy-button/index.js +15 -0
- package/dist/es2019/messages/alignment.js +18 -0
- package/dist/es2019/messages/annotation.js +18 -0
- package/dist/es2019/messages/block-type.js +153 -0
- package/dist/es2019/messages/index.js +4 -0
- package/dist/es2019/messages/toolbar.js +5 -0
- package/dist/es2019/messages/undo-redo.js +13 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/PortalProvider/index.js +4 -4
- package/dist/esm/analytics/analytics-queue.js +7 -5
- package/dist/esm/analytics/fire-analytics-event.js +1 -1
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +1 -1
- package/dist/esm/copy-button/index.js +14 -0
- package/dist/esm/editor-analytics/withAnalytics.js +2 -2
- package/dist/esm/element-browser/components/ElementList/utils.js +1 -1
- package/dist/esm/link/LinkPicker/EditorLinkPicker/index.js +4 -4
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +3 -3
- package/dist/esm/messages/alignment.js +18 -0
- package/dist/esm/messages/annotation.js +18 -0
- package/dist/esm/messages/block-type.js +153 -0
- package/dist/esm/messages/index.js +4 -0
- package/dist/esm/messages/toolbar.js +5 -0
- package/dist/esm/messages/undo-redo.js +13 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/editor-commands.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/esm/react-node-view/index.js +2 -2
- package/dist/esm/ufo/experience-store.js +5 -5
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Emoji/index.js +1 -1
- package/dist/esm/ui/IntlErrorBoundary/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +1 -1
- package/dist/esm/ui/PortalProvider/index.js +4 -4
- package/dist/esm/ui/ResizerLegacy/index.js +4 -4
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +1 -1
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +6 -6
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui-menu/Dropdown/index.js +2 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +3 -3
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +10 -10
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +1 -1
- package/dist/esm/utils/browser-extensions.js +1 -1
- package/dist/esm/utils/input-rules.js +1 -1
- package/dist/esm/utils/list.js +3 -3
- package/dist/esm/utils/profiler/render-count.js +6 -6
- package/dist/esm/utils/referentiality.js +13 -13
- package/dist/types/copy-button/index.d.ts +7 -0
- package/dist/types/guideline/fixedGuideline.d.ts +1 -1
- package/dist/types/messages/alignment.d.ts +17 -0
- package/dist/types/messages/annotation.d.ts +17 -0
- package/dist/types/messages/block-type.d.ts +152 -0
- package/dist/types/messages/index.d.ts +4 -0
- package/dist/types/messages/toolbar.d.ts +5 -0
- package/dist/types/messages/undo-redo.d.ts +12 -0
- package/dist/types-ts4.5/copy-button/index.d.ts +7 -0
- package/dist/types-ts4.5/guideline/fixedGuideline.d.ts +1 -1
- package/dist/types-ts4.5/messages/alignment.d.ts +17 -0
- package/dist/types-ts4.5/messages/annotation.d.ts +17 -0
- package/dist/types-ts4.5/messages/block-type.d.ts +152 -0
- package/dist/types-ts4.5/messages/index.d.ts +4 -0
- package/dist/types-ts4.5/messages/toolbar.d.ts +5 -0
- package/dist/types-ts4.5/messages/undo-redo.d.ts +12 -0
- package/package.json +4 -3
|
@@ -45,14 +45,14 @@ export var EditorLinkPicker = function EditorLinkPicker(_ref) {
|
|
|
45
45
|
var onEscape = useCallback(function () {
|
|
46
46
|
var state = view.state,
|
|
47
47
|
dispatch = view.dispatch;
|
|
48
|
-
onEscapeCallback === null || onEscapeCallback === void 0
|
|
49
|
-
onCancel === null || onCancel === void 0
|
|
48
|
+
onEscapeCallback === null || onEscapeCallback === void 0 || onEscapeCallback(state, dispatch);
|
|
49
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
50
50
|
}, [view, onCancel, onEscapeCallback]);
|
|
51
51
|
var onClickAway = useCallback(function () {
|
|
52
52
|
var state = view.state,
|
|
53
53
|
dispatch = view.dispatch;
|
|
54
|
-
onClickAwayCallback === null || onClickAwayCallback === void 0
|
|
55
|
-
onCancel === null || onCancel === void 0
|
|
54
|
+
onClickAwayCallback === null || onClickAwayCallback === void 0 || onClickAwayCallback(state, dispatch);
|
|
55
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
56
56
|
}, [view, onCancel, onClickAwayCallback]);
|
|
57
57
|
var ref = useEscapeClickaway(onEscape, onClickAway);
|
|
58
58
|
var analyticsEditorAppearance = getAnalyticsEditorAppearance(editorAppearance);
|
|
@@ -360,7 +360,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
360
360
|
state = _this$props$view.state,
|
|
361
361
|
dispatch = _this$props$view.dispatch,
|
|
362
362
|
onClickAwayCallback = _this$props.onClickAwayCallback;
|
|
363
|
-
onClickAwayCallback === null || onClickAwayCallback === void 0
|
|
363
|
+
onClickAwayCallback === null || onClickAwayCallback === void 0 || onClickAwayCallback(state, dispatch);
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
_defineProperty(_assertThisInitialized(_this), "getScreenReaderText", function () {
|
|
@@ -507,7 +507,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
507
507
|
event.preventDefault();
|
|
508
508
|
var state = view.state,
|
|
509
509
|
dispatch = view.dispatch;
|
|
510
|
-
onEscapeCallback === null || onEscapeCallback === void 0
|
|
510
|
+
onEscapeCallback === null || onEscapeCallback === void 0 || onEscapeCallback(state, dispatch);
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
513
|
if (!items || !items.length) {
|
|
@@ -554,7 +554,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
|
|
|
554
554
|
dispatch = _this$props4$view.dispatch,
|
|
555
555
|
onClickAwayCallback = _this$props4.onClickAwayCallback;
|
|
556
556
|
e.preventDefault();
|
|
557
|
-
onClickAwayCallback === null || onClickAwayCallback === void 0
|
|
557
|
+
onClickAwayCallback === null || onClickAwayCallback === void 0 || onClickAwayCallback(state, dispatch);
|
|
558
558
|
});
|
|
559
559
|
_this.state = {
|
|
560
560
|
selectedIndex: -1,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var alignmentMessages = defineMessages({
|
|
3
|
+
alignLeft: {
|
|
4
|
+
id: 'fabric.editor.alignLeft',
|
|
5
|
+
defaultMessage: 'Align left',
|
|
6
|
+
description: 'Action to align/justify text to the left'
|
|
7
|
+
},
|
|
8
|
+
alignCenter: {
|
|
9
|
+
id: 'fabric.editor.alignCenter',
|
|
10
|
+
defaultMessage: 'Align center',
|
|
11
|
+
description: 'Action to align/justify text to the center/middle'
|
|
12
|
+
},
|
|
13
|
+
alignRight: {
|
|
14
|
+
id: 'fabric.editor.alignRight',
|
|
15
|
+
defaultMessage: 'Align right',
|
|
16
|
+
description: 'Action to align/justify text to the right'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var annotationMessages = defineMessages({
|
|
3
|
+
createComment: {
|
|
4
|
+
id: 'fabric.editor.createComment',
|
|
5
|
+
defaultMessage: 'Comment',
|
|
6
|
+
description: 'Create/add an inline comment based on the users selection'
|
|
7
|
+
},
|
|
8
|
+
createCommentInvalid: {
|
|
9
|
+
id: 'fabric.editor.createCommentInvalid',
|
|
10
|
+
defaultMessage: 'You can only comment on text and headings',
|
|
11
|
+
description: 'Error message to communicate to the user they can only do the current action in certain contexts'
|
|
12
|
+
},
|
|
13
|
+
toolbar: {
|
|
14
|
+
id: 'fabric.editor.annotationToolbar',
|
|
15
|
+
defaultMessage: 'Annotation toolbar',
|
|
16
|
+
description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var messages = defineMessages({
|
|
3
|
+
normal: {
|
|
4
|
+
id: 'fabric.editor.normal',
|
|
5
|
+
defaultMessage: 'Normal text',
|
|
6
|
+
description: 'This is the default text style'
|
|
7
|
+
},
|
|
8
|
+
heading1: {
|
|
9
|
+
id: 'fabric.editor.heading1',
|
|
10
|
+
defaultMessage: 'Heading 1',
|
|
11
|
+
description: 'Used for the title of a section of your document, headings run from 1 (largest size) to 6 (smallest size)'
|
|
12
|
+
},
|
|
13
|
+
heading1Description: {
|
|
14
|
+
id: 'fabric.editor.heading1Description',
|
|
15
|
+
defaultMessage: 'Use this for a top level heading',
|
|
16
|
+
description: 'Description of the main heading, heading 1'
|
|
17
|
+
},
|
|
18
|
+
heading2: {
|
|
19
|
+
id: 'fabric.editor.heading2',
|
|
20
|
+
defaultMessage: 'Heading 2',
|
|
21
|
+
description: 'Used for the title of a section of your document, headings run from 1 (largest size) to 6 (smallest size)'
|
|
22
|
+
},
|
|
23
|
+
heading2Description: {
|
|
24
|
+
id: 'fabric.editor.heading2Description',
|
|
25
|
+
defaultMessage: 'Use this for key sections',
|
|
26
|
+
description: 'Description of a subtitle heading or secondary heading'
|
|
27
|
+
},
|
|
28
|
+
heading3: {
|
|
29
|
+
id: 'fabric.editor.heading3',
|
|
30
|
+
defaultMessage: 'Heading 3',
|
|
31
|
+
description: 'Used for the title of a section of your document, headings run from 1 (largest size) to 6 (smallest size)'
|
|
32
|
+
},
|
|
33
|
+
heading3Description: {
|
|
34
|
+
id: 'fabric.editor.heading3Description',
|
|
35
|
+
defaultMessage: 'Use this for sub sections and group headings',
|
|
36
|
+
description: ''
|
|
37
|
+
},
|
|
38
|
+
heading4: {
|
|
39
|
+
id: 'fabric.editor.heading4',
|
|
40
|
+
defaultMessage: 'Heading 4',
|
|
41
|
+
description: 'Used for the title of a section of your document, headings run from 1 (largest size) to 6 (smallest size)'
|
|
42
|
+
},
|
|
43
|
+
heading4Description: {
|
|
44
|
+
id: 'fabric.editor.heading4Description',
|
|
45
|
+
defaultMessage: 'Use this for deep headings',
|
|
46
|
+
description: ''
|
|
47
|
+
},
|
|
48
|
+
heading5: {
|
|
49
|
+
id: 'fabric.editor.heading5',
|
|
50
|
+
defaultMessage: 'Heading 5',
|
|
51
|
+
description: 'Used for the title of a section of your document, headings run from 1 (largest size) to 6 (smallest size)'
|
|
52
|
+
},
|
|
53
|
+
heading5Description: {
|
|
54
|
+
id: 'fabric.editor.heading5Description',
|
|
55
|
+
defaultMessage: 'Use this for grouping list items',
|
|
56
|
+
description: ''
|
|
57
|
+
},
|
|
58
|
+
heading6: {
|
|
59
|
+
id: 'fabric.editor.heading6',
|
|
60
|
+
defaultMessage: 'Heading 6',
|
|
61
|
+
description: 'Used for the title of a section of your document, headings run from 1 (largest size) to 6 (smallest size)'
|
|
62
|
+
},
|
|
63
|
+
heading6Description: {
|
|
64
|
+
id: 'fabric.editor.heading6Description',
|
|
65
|
+
defaultMessage: 'Use this for low level headings',
|
|
66
|
+
description: ''
|
|
67
|
+
},
|
|
68
|
+
blockquote: {
|
|
69
|
+
id: 'fabric.editor.blockquote2',
|
|
70
|
+
defaultMessage: 'Quote',
|
|
71
|
+
description: 'Quote some text'
|
|
72
|
+
},
|
|
73
|
+
blockquoteDescription: {
|
|
74
|
+
id: 'fabric.editor.blockquote.description',
|
|
75
|
+
defaultMessage: 'Insert a quote or citation',
|
|
76
|
+
description: 'Quote some text'
|
|
77
|
+
},
|
|
78
|
+
codeblock: {
|
|
79
|
+
id: 'fabric.editor.codeblock',
|
|
80
|
+
defaultMessage: 'Code snippet',
|
|
81
|
+
description: 'Insert a snippet/segment of code (code block)'
|
|
82
|
+
},
|
|
83
|
+
codeblockDescription: {
|
|
84
|
+
id: 'fabric.editor.codeblock.description',
|
|
85
|
+
defaultMessage: 'Display code with syntax highlighting',
|
|
86
|
+
description: 'Insert a snippet/segment of code (code block)'
|
|
87
|
+
},
|
|
88
|
+
infoPanel: {
|
|
89
|
+
id: 'fabric.editor.infoPanel',
|
|
90
|
+
defaultMessage: 'Info panel',
|
|
91
|
+
description: 'Visually distinguishes your text by adding a background colour (blue, purple, yellow, green, red)'
|
|
92
|
+
},
|
|
93
|
+
infoPanelDescription: {
|
|
94
|
+
id: 'fabric.editor.infoPanel.description',
|
|
95
|
+
defaultMessage: 'Highlight information in a colored panel',
|
|
96
|
+
description: 'Visually distinguishes your text by adding a background colour (blue, purple, yellow, green, red)'
|
|
97
|
+
},
|
|
98
|
+
notePanel: {
|
|
99
|
+
id: 'fabric.editor.notePanel',
|
|
100
|
+
defaultMessage: 'Note panel',
|
|
101
|
+
description: 'Visually distinguishes your text by adding a note panel'
|
|
102
|
+
},
|
|
103
|
+
notePanelDescription: {
|
|
104
|
+
id: 'fabric.editor.notePanel.description',
|
|
105
|
+
defaultMessage: 'Add a note in a colored panel',
|
|
106
|
+
description: 'Visually distinguishes your text by adding a note panel'
|
|
107
|
+
},
|
|
108
|
+
successPanel: {
|
|
109
|
+
id: 'fabric.editor.successPanel',
|
|
110
|
+
defaultMessage: 'Success panel',
|
|
111
|
+
description: 'Visually distinguishes your text by adding a success panel'
|
|
112
|
+
},
|
|
113
|
+
successPanelDescription: {
|
|
114
|
+
id: 'fabric.editor.successPanel.description',
|
|
115
|
+
defaultMessage: 'Add tips in a colored panel',
|
|
116
|
+
description: 'Visually distinguishes your text by adding a success panel'
|
|
117
|
+
},
|
|
118
|
+
warningPanel: {
|
|
119
|
+
id: 'fabric.editor.warningPanel',
|
|
120
|
+
defaultMessage: 'Warning panel',
|
|
121
|
+
description: 'Visually distinguishes your text by adding a warning panel'
|
|
122
|
+
},
|
|
123
|
+
warningPanelDescription: {
|
|
124
|
+
id: 'fabric.editor.warningPanel.description',
|
|
125
|
+
defaultMessage: 'Add a note of caution in a colored panel',
|
|
126
|
+
description: 'Visually distinguishes your text by adding a warning panel'
|
|
127
|
+
},
|
|
128
|
+
errorPanel: {
|
|
129
|
+
id: 'fabric.editor.errorPanel',
|
|
130
|
+
defaultMessage: 'Error panel',
|
|
131
|
+
description: 'Visually distinguishes your text by adding a error panel'
|
|
132
|
+
},
|
|
133
|
+
errorPanelDescription: {
|
|
134
|
+
id: 'fabric.editor.errorPanel.description',
|
|
135
|
+
defaultMessage: 'Call out errors in a colored panel',
|
|
136
|
+
description: 'Visually distinguishes your text by adding a error panel'
|
|
137
|
+
},
|
|
138
|
+
customPanel: {
|
|
139
|
+
id: 'fabric.editor.customPanel',
|
|
140
|
+
defaultMessage: 'Custom panel',
|
|
141
|
+
description: 'Visually distinguishes your panel by adding a emoji icon and background color'
|
|
142
|
+
},
|
|
143
|
+
customPanelDescription: {
|
|
144
|
+
id: 'fabric.editor.customPanel.description',
|
|
145
|
+
defaultMessage: 'Add a note with an emoji and colored background',
|
|
146
|
+
description: 'Visually distinguishes your panel by adding a emoji icon and background color '
|
|
147
|
+
},
|
|
148
|
+
other: {
|
|
149
|
+
id: 'fabric.editor.other',
|
|
150
|
+
defaultMessage: 'Others...',
|
|
151
|
+
description: 'Other text formatting'
|
|
152
|
+
}
|
|
153
|
+
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export { alignmentMessages } from './alignment';
|
|
3
|
+
export { annotationMessages } from './annotation';
|
|
4
|
+
export { messages as blockTypeMessages } from './block-type';
|
|
2
5
|
export { codeBidiWarningMessages } from './codeBidiWarning';
|
|
3
6
|
export { linkMessages } from './link';
|
|
4
7
|
export { linkToolbarMessages } from './link-toolbar';
|
|
@@ -10,6 +13,7 @@ export { messages as cardMessages } from './card';
|
|
|
10
13
|
export { messages as fullPageMessages } from './full-page';
|
|
11
14
|
export { toolbarMessages } from './toolbar';
|
|
12
15
|
export { messages as listMessages } from './list';
|
|
16
|
+
export { messages as undoRedoMessages } from './undo-redo';
|
|
13
17
|
export default defineMessages({
|
|
14
18
|
layoutFixedWidth: {
|
|
15
19
|
id: 'fabric.editor.layoutFixedWidth',
|
|
@@ -70,6 +70,11 @@ export var toolbarMessages = defineMessages({
|
|
|
70
70
|
defaultMessage: '{formattingType} Off',
|
|
71
71
|
description: 'Reports that text formatting has been turned off'
|
|
72
72
|
},
|
|
73
|
+
textStyles: {
|
|
74
|
+
id: 'fabric.editor.textStyles',
|
|
75
|
+
defaultMessage: 'Text styles',
|
|
76
|
+
description: 'Menu provides access to various heading styles or normal text'
|
|
77
|
+
},
|
|
73
78
|
textFormattingOff: {
|
|
74
79
|
id: 'fabric.editor.text.formatting.off',
|
|
75
80
|
defaultMessage: 'Text formatting Off',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var messages = defineMessages({
|
|
3
|
+
undo: {
|
|
4
|
+
id: 'fabric.editor.undo',
|
|
5
|
+
defaultMessage: 'Undo',
|
|
6
|
+
description: 'Undo the previously performed action.'
|
|
7
|
+
},
|
|
8
|
+
redo: {
|
|
9
|
+
id: 'fabric.editor.redo',
|
|
10
|
+
defaultMessage: 'Redo',
|
|
11
|
+
description: 'Redo the previously undone action.'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "76.
|
|
9
|
+
var packageVersion = "76.2.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -28,7 +28,7 @@ export function editorCommandToPMCommand(command) {
|
|
|
28
28
|
if (newTr instanceof PassiveTransaction) {
|
|
29
29
|
return true;
|
|
30
30
|
}
|
|
31
|
-
dispatch === null || dispatch === void 0
|
|
31
|
+
dispatch === null || dispatch === void 0 || dispatch(newTr);
|
|
32
32
|
return true;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
@@ -159,7 +159,7 @@ function getPortalChildren(_ref2) {
|
|
|
159
159
|
|
|
160
160
|
return jsx(ErrorBoundary, {
|
|
161
161
|
component: ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
162
|
-
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0
|
|
162
|
+
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 || (_currentNode$type = currentNode.type) === null || _currentNode$type === void 0 ? void 0 : _currentNode$type.name) !== null && _currentNode$type$nam !== void 0 ? _currentNode$type$nam : ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
163
163
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
164
164
|
}, jsx("span", {
|
|
165
165
|
"aria-hidden": "true",
|
|
@@ -98,10 +98,10 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
var componentWithErrorBoundary = function componentWithErrorBoundary() {
|
|
101
|
-
var _this3$node$type$name, _this3$node
|
|
101
|
+
var _this3$node$type$name, _this3$node;
|
|
102
102
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
103
103
|
component: ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
104
|
-
componentId: (_this3$node$type$name = _this3 === null || _this3 === void 0
|
|
104
|
+
componentId: (_this3$node$type$name = _this3 === null || _this3 === void 0 || (_this3$node = _this3.node) === null || _this3$node === void 0 || (_this3$node = _this3$node.type) === null || _this3$node === void 0 ? void 0 : _this3$node.name) !== null && _this3$node$type$name !== void 0 ? _this3$node$type$name : ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
105
105
|
dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent
|
|
106
106
|
}, component());
|
|
107
107
|
};
|
|
@@ -49,19 +49,19 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
49
49
|
key: "start",
|
|
50
50
|
value: function start(experienceId, startTime) {
|
|
51
51
|
var _this$get;
|
|
52
|
-
(_this$get = this.get(experienceId)) === null || _this$get === void 0
|
|
52
|
+
(_this$get = this.get(experienceId)) === null || _this$get === void 0 || _this$get.start(startTime);
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
key: "addMetadata",
|
|
56
56
|
value: function addMetadata(experienceId, metadata) {
|
|
57
57
|
var _this$get2;
|
|
58
|
-
(_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0
|
|
58
|
+
(_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 || _this$get2.addMetadata(metadata);
|
|
59
59
|
}
|
|
60
60
|
}, {
|
|
61
61
|
key: "mark",
|
|
62
62
|
value: function mark(experienceId, _mark, value) {
|
|
63
63
|
var _this$get3;
|
|
64
|
-
(_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0
|
|
64
|
+
(_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 || _this$get3.mark(_mark, value);
|
|
65
65
|
}
|
|
66
66
|
}, {
|
|
67
67
|
key: "success",
|
|
@@ -75,7 +75,7 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
75
75
|
key: "fail",
|
|
76
76
|
value: function fail(experienceId, metadata) {
|
|
77
77
|
var _this$getActive2;
|
|
78
|
-
(_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0
|
|
78
|
+
(_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 || _this$getActive2.failure({
|
|
79
79
|
metadata: metadata
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -88,7 +88,7 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
88
88
|
// In this case we want to fail the experience, but without this wait, abort is called first
|
|
89
89
|
setTimeout(function () {
|
|
90
90
|
var _this$getActive3;
|
|
91
|
-
(_this$getActive3 = _this.getActive(experienceId)) === null || _this$getActive3 === void 0
|
|
91
|
+
(_this$getActive3 = _this.getActive(experienceId)) === null || _this$getActive3 === void 0 || _this$getActive3.abort({
|
|
92
92
|
metadata: metadata
|
|
93
93
|
});
|
|
94
94
|
}, 0);
|
|
@@ -19,7 +19,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
19
19
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
20
20
|
import Layer from '../Layer';
|
|
21
21
|
var packageName = "@atlaskit/editor-common";
|
|
22
|
-
var packageVersion = "76.
|
|
22
|
+
var packageVersion = "76.2.0";
|
|
23
23
|
var halfFocusRing = 1;
|
|
24
24
|
var dropOffset = '0, 8';
|
|
25
25
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -47,7 +47,7 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
|
|
|
47
47
|
showTooltip: showTooltip,
|
|
48
48
|
fitToHeight: fitToHeight,
|
|
49
49
|
optimistic: true,
|
|
50
|
-
optimisticImageURL: resourceConfig === null || resourceConfig === void 0
|
|
50
|
+
optimisticImageURL: resourceConfig === null || resourceConfig === void 0 || (_resourceConfig$optim = resourceConfig.optimisticImageApi) === null || _resourceConfig$optim === void 0 ? void 0 : _resourceConfig$optim.getUrl({
|
|
51
51
|
id: id,
|
|
52
52
|
fallback: fallback,
|
|
53
53
|
shortName: shortName
|
|
@@ -12,7 +12,7 @@ import { IntlProvider } from 'react-intl-next';
|
|
|
12
12
|
export var REACT_INTL_ERROR_MESSAGE = '<IntlProvider> needs to exist in the component ancestry';
|
|
13
13
|
var isMissingIntlProviderInAncestryError = function isMissingIntlProviderInAncestryError(err) {
|
|
14
14
|
var _err$toString;
|
|
15
|
-
return err === null || err === void 0
|
|
15
|
+
return err === null || err === void 0 || (_err$toString = err.toString()) === null || _err$toString === void 0 ? void 0 : _err$toString.includes('<IntlProvider> needs to exist in the component ancestry');
|
|
16
16
|
};
|
|
17
17
|
export var IntlErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
18
18
|
_inherits(IntlErrorBoundary, _React$Component);
|
|
@@ -203,7 +203,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
203
203
|
function destroyFocusTrap() {
|
|
204
204
|
var _this$focusTrap;
|
|
205
205
|
this.initFocusTrap.cancel();
|
|
206
|
-
(_this$focusTrap = this.focusTrap) === null || _this$focusTrap === void 0
|
|
206
|
+
(_this$focusTrap = this.focusTrap) === null || _this$focusTrap === void 0 || _this$focusTrap.deactivate();
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
/**
|
|
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
var
|
|
9
|
+
var _class4;
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
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; } }
|
|
12
12
|
import React from 'react';
|
|
@@ -217,7 +217,7 @@ var dummyAnalyticsContext = {
|
|
|
217
217
|
getAtlaskitAnalyticsContext: function getAtlaskitAnalyticsContext() {},
|
|
218
218
|
getAtlaskitAnalyticsEventHandlers: function getAtlaskitAnalyticsEventHandlers() {}
|
|
219
219
|
};
|
|
220
|
-
var AnalyticsContextWrapper = (
|
|
220
|
+
var AnalyticsContextWrapper = (_class4 = /*#__PURE__*/function (_React$Component3) {
|
|
221
221
|
_inherits(AnalyticsContextWrapper, _React$Component3);
|
|
222
222
|
var _super4 = _createSuper(AnalyticsContextWrapper);
|
|
223
223
|
function AnalyticsContextWrapper() {
|
|
@@ -237,6 +237,6 @@ var AnalyticsContextWrapper = (_class = /*#__PURE__*/function (_React$Component3
|
|
|
237
237
|
}
|
|
238
238
|
}]);
|
|
239
239
|
return AnalyticsContextWrapper;
|
|
240
|
-
}(React.Component), _defineProperty(
|
|
240
|
+
}(React.Component), _defineProperty(_class4, "contextTypes", {
|
|
241
241
|
contextAdapter: PropTypes.object
|
|
242
|
-
}),
|
|
242
|
+
}), _class4);
|
|
@@ -65,7 +65,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
65
65
|
isResizing: true
|
|
66
66
|
}, function () {
|
|
67
67
|
var newHighlights = highlights(width + innerPadding, snapPoints);
|
|
68
|
-
displayGrid === null || displayGrid === void 0
|
|
68
|
+
displayGrid === null || displayGrid === void 0 || displayGrid(newHighlights.length > 0, gridTypeForLayout(layout), newHighlights);
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
_defineProperty(_assertThisInitialized(_this), "handleResize", function (_event, _direction, _elementRef, delta) {
|
|
@@ -90,7 +90,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
90
90
|
updateSize(newSize.width, newSize.layout);
|
|
91
91
|
}
|
|
92
92
|
var newHighlights = highlights(newWidth, snapPoints);
|
|
93
|
-
displayGrid === null || displayGrid === void 0
|
|
93
|
+
displayGrid === null || displayGrid === void 0 || displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
94
94
|
resizable.updateSize({
|
|
95
95
|
width: newWidth,
|
|
96
96
|
height: 'auto'
|
|
@@ -122,12 +122,12 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
122
122
|
dispatchAnalyticsEvent(getResizeAnalyticsEvent(nodeType, newSize.width, newSize.layout));
|
|
123
123
|
}
|
|
124
124
|
// show committed grid size
|
|
125
|
-
displayGrid === null || displayGrid === void 0
|
|
125
|
+
displayGrid === null || displayGrid === void 0 || displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
126
126
|
_this.setState({
|
|
127
127
|
isResizing: false
|
|
128
128
|
}, function () {
|
|
129
129
|
updateSize(newSize.width, newSize.layout);
|
|
130
|
-
displayGrid === null || displayGrid === void 0
|
|
130
|
+
displayGrid === null || displayGrid === void 0 || displayGrid(false, gridTypeForLayout(layout), []);
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
133
|
return _this;
|
package/dist/esm/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export var ColorPaletteArrowKeyNavigationProvider = function ColorPaletteArrowKe
|
|
|
58
58
|
if (!focusableElements || (focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
-
(_focusableElements$cu = focusableElements[currentSelectedColumnIndex.current]) === null || _focusableElements$cu === void 0
|
|
61
|
+
(_focusableElements$cu = focusableElements[currentSelectedColumnIndex.current]) === null || _focusableElements$cu === void 0 || _focusableElements$cu.focus();
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -52,7 +52,7 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
52
52
|
if (currentElement && currentElement.getAttribute('aria-disabled') === 'true') {
|
|
53
53
|
var _list$focusIndex;
|
|
54
54
|
var focusIndex = incrementIndex(list);
|
|
55
|
-
(_list$focusIndex = list[focusIndex]) === null || _list$focusIndex === void 0
|
|
55
|
+
(_list$focusIndex = list[focusIndex]) === null || _list$focusIndex === void 0 || _list$focusIndex.focus();
|
|
56
56
|
}
|
|
57
57
|
}, [currentSelectedItemIndex, onSelection, incrementIndex, decrementIndex]);
|
|
58
58
|
useLayoutEffect(function () {
|
|
@@ -71,7 +71,7 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
71
71
|
// Tab key on menu items can be handled in the parent components of dropdown menus with KeydownHandlerContext
|
|
72
72
|
if (event.key === 'Tab' && closeOnTab) {
|
|
73
73
|
handleClose(event);
|
|
74
|
-
keyDownHandlerContext === null || keyDownHandlerContext === void 0
|
|
74
|
+
keyDownHandlerContext === null || keyDownHandlerContext === void 0 || keyDownHandlerContext.handleTab();
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -88,7 +88,7 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
88
88
|
{
|
|
89
89
|
var _focusableElements$fo;
|
|
90
90
|
var focusIndex = incrementIndex(focusableElements);
|
|
91
|
-
(_focusableElements$fo = focusableElements[focusIndex]) === null || _focusableElements$fo === void 0
|
|
91
|
+
(_focusableElements$fo = focusableElements[focusIndex]) === null || _focusableElements$fo === void 0 || _focusableElements$fo.focus();
|
|
92
92
|
event.preventDefault();
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
@@ -96,7 +96,7 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
96
96
|
{
|
|
97
97
|
var _focusableElements$_f;
|
|
98
98
|
var _focusIndex = decrementIndex(focusableElements);
|
|
99
|
-
(_focusableElements$_f = focusableElements[_focusIndex]) === null || _focusableElements$_f === void 0
|
|
99
|
+
(_focusableElements$_f = focusableElements[_focusIndex]) === null || _focusableElements$_f === void 0 || _focusableElements$_f.focus();
|
|
100
100
|
event.preventDefault();
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
@@ -110,7 +110,7 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
110
110
|
}
|
|
111
111
|
handleClose(event);
|
|
112
112
|
if (!targetElement.closest('[data-testid="editor-floating-toolbar"]')) {
|
|
113
|
-
keyDownHandlerContext === null || keyDownHandlerContext === void 0
|
|
113
|
+
keyDownHandlerContext === null || keyDownHandlerContext === void 0 || keyDownHandlerContext.handleArrowLeft();
|
|
114
114
|
}
|
|
115
115
|
break;
|
|
116
116
|
case 'ArrowRight':
|
|
@@ -120,7 +120,7 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
|
|
|
120
120
|
}
|
|
121
121
|
handleClose(event);
|
|
122
122
|
if (!targetElement.closest('[data-testid="editor-floating-toolbar"]')) {
|
|
123
|
-
keyDownHandlerContext === null || keyDownHandlerContext === void 0
|
|
123
|
+
keyDownHandlerContext === null || keyDownHandlerContext === void 0 || keyDownHandlerContext.handleArrowRight();
|
|
124
124
|
}
|
|
125
125
|
break;
|
|
126
126
|
case 'Escape':
|
|
@@ -63,7 +63,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
63
63
|
}, [isPopupOpen]);
|
|
64
64
|
var focusButton = function focusButton() {
|
|
65
65
|
var _buttonRef$current;
|
|
66
|
-
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0
|
|
66
|
+
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 || _buttonRef$current.focus();
|
|
67
67
|
};
|
|
68
68
|
var handleEsc = React.useCallback(function () {
|
|
69
69
|
setIsOpenedByKeyboard(false);
|
|
@@ -37,8 +37,8 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
_defineProperty(_assertThisInitialized(_this), "handleCloseAndFocus", function (event) {
|
|
40
|
-
var _this$state$target
|
|
41
|
-
(_this$state$target = _this.state.target) === null || _this$state$target === void 0
|
|
40
|
+
var _this$state$target;
|
|
41
|
+
(_this$state$target = _this.state.target) === null || _this$state$target === void 0 || (_this$state$target = _this$state$target.querySelector('button')) === null || _this$state$target === void 0 || _this$state$target.focus();
|
|
42
42
|
_this.handleClose(event);
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(_assertThisInitialized(_this), "handleClose", function (event) {
|
|
@@ -97,8 +97,8 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
_defineProperty(_assertThisInitialized(_this), "handleCloseAndFocus", function () {
|
|
100
|
-
var _this$state$target
|
|
101
|
-
(_this$state$target = _this.state.target) === null || _this$state$target === void 0
|
|
100
|
+
var _this$state$target;
|
|
101
|
+
(_this$state$target = _this.state.target) === null || _this$state$target === void 0 || (_this$state$target = _this$state$target.querySelector('button')) === null || _this$state$target === void 0 || _this$state$target.focus();
|
|
102
102
|
_this.handleClose();
|
|
103
103
|
});
|
|
104
104
|
_defineProperty(_assertThisInitialized(_this), "handleClose", function () {
|
|
@@ -224,7 +224,7 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
224
224
|
key: 'ArrowDown',
|
|
225
225
|
bubbles: true
|
|
226
226
|
});
|
|
227
|
-
(_this$state$target2 = this.state.target) === null || _this$state$target2 === void 0
|
|
227
|
+
(_this$state$target2 = this.state.target) === null || _this$state$target2 === void 0 || _this$state$target2.dispatchEvent(keyboardEvent);
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
}
|