@atlaskit/editor-common 97.1.2 → 97.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 +21 -0
- package/dist/cjs/analytics/analytics-queue.js +8 -0
- package/dist/cjs/analytics/linking-utils.js +2 -0
- package/dist/cjs/card/LinkToolbarButtonGroup.js +2 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +15 -3
- package/dist/cjs/card/ui/assets/card.js +4 -0
- package/dist/cjs/card/ui/assets/embed.js +4 -0
- package/dist/cjs/card/ui/assets/inline.js +4 -0
- package/dist/cjs/card/ui/assets/url.js +4 -0
- package/dist/cjs/clipboard/index.js +12 -1
- package/dist/cjs/collab/index.js +2 -0
- package/dist/cjs/commands/index.js +50 -42
- package/dist/cjs/commands/insert-block.js +10 -2
- package/dist/cjs/core-utils/document-logger.js +4 -0
- package/dist/cjs/doc-utils/editor-use-only.js +8 -3
- package/dist/cjs/element-browser/ElementBrowser.js +2 -0
- package/dist/cjs/element-browser/ViewMore.js +8 -2
- package/dist/cjs/element-browser/components/CategoryList.js +2 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +12 -0
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +8 -2
- package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +13 -2
- package/dist/cjs/event-dispatcher/index.js +6 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +2 -0
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +10 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +3 -1
- package/dist/cjs/extensibility/Extension.js +2 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +17 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +4 -0
- package/dist/cjs/extensibility/extensionNodeView.js +2 -1
- package/dist/cjs/extensions/extension-fields-helpers.js +4 -1
- package/dist/cjs/extensions/extension-handlers.js +4 -0
- package/dist/cjs/extensions/module-helpers.js +14 -6
- package/dist/cjs/extensions/types/field-definitions.js +5 -0
- package/dist/cjs/floating-toolbar/index.js +18 -2
- package/dist/cjs/guideline/dynamicGuideline.js +4 -1
- package/dist/cjs/guideline/relativeGuideline.js +12 -3
- package/dist/cjs/guideline/updateGuideline.js +4 -1
- package/dist/cjs/hooks/usePluginStateEffect.js +3 -0
- package/dist/cjs/hooks/useSharedPluginState.js +3 -0
- package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
- package/dist/cjs/icons/shared/BorderIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelErrorIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelInfoIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelNoteIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelWarningIcon.js +4 -0
- package/dist/cjs/insert/index.js +6 -1
- package/dist/cjs/keymaps/index.js +48 -5
- package/dist/cjs/keymaps/keymap.js +4 -0
- package/dist/cjs/lazy-node-view/css-helper.js +4 -0
- package/dist/cjs/lazy-node-view/index.js +6 -1
- package/dist/cjs/lazy-node-view/node-view.js +2 -0
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +2 -0
- package/dist/cjs/link/ConfigureLinkOverlay/StyledButton.js +4 -1
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/index.js +4 -1
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +9 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +16 -1
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -0
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +2 -0
- package/dist/cjs/link/LinkSearch/index.js +9 -1
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +3 -0
- package/dist/cjs/lists/analytics.js +2 -0
- package/dist/cjs/mark/commands.js +24 -3
- package/dist/cjs/media-inline/inline-image-card.js +4 -2
- package/dist/cjs/media-inline/inline-image-wrapper.js +2 -0
- package/dist/cjs/media-single/MediaBadges.js +2 -0
- package/dist/cjs/media-single/utils.js +5 -0
- package/dist/cjs/monitoring/environment.js +6 -1
- package/dist/cjs/monitoring/error.js +19 -3
- package/dist/cjs/node-width/index.js +6 -1
- package/dist/cjs/normalize-feature-flags.js +4 -1
- package/dist/cjs/paste/clipboard.js +2 -0
- package/dist/cjs/paste/md-plugins/ignore-list-heading-md-plugin.js +5 -0
- package/dist/cjs/paste/md-plugins/linkify-md-plugin.js +20 -0
- package/dist/cjs/paste/md-plugins/newline-md-plugin.js +5 -0
- package/dist/cjs/paste/md-plugins/paragraph-md-plugin.js +5 -0
- package/dist/cjs/portal/common.js +4 -1
- package/dist/cjs/preset/builder.js +8 -0
- package/dist/cjs/preset/core-plugin/index.js +5 -0
- package/dist/cjs/preset/core-plugin/requestDocument.js +3 -0
- package/dist/cjs/preset/plugin-injection-api.js +61 -6
- package/dist/cjs/provider-factory/provider-factory.js +8 -1
- package/dist/cjs/provider-factory/with-providers.js +12 -0
- package/dist/cjs/provider-helpers/combine-providers.js +7 -0
- package/dist/cjs/provider-helpers/promise-helpers.js +3 -0
- package/dist/cjs/quick-insert/assets/index.js +2 -0
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +4 -0
- package/dist/cjs/react-node-view/index.js +33 -2
- package/dist/cjs/resizer/BreakoutResizer.js +0 -6
- package/dist/cjs/resizer/Resizer.js +10 -2
- package/dist/cjs/safe-plugin/index.js +3 -0
- package/dist/cjs/selection/gap-cursor/actions.js +11 -2
- package/dist/cjs/selection/gap-cursor/selection.js +8 -0
- package/dist/cjs/selection/index.js +2 -0
- package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +10 -1
- package/dist/cjs/styles/shared/lists.js +4 -1
- package/dist/cjs/transforms/code-block.js +6 -0
- package/dist/cjs/transforms/extension.js +14 -2
- package/dist/cjs/transforms/layout.js +6 -0
- package/dist/cjs/types/annotation/emitter.js +8 -2
- package/dist/cjs/types/index.js +3 -1
- package/dist/cjs/ui/Caption/index.js +4 -0
- package/dist/cjs/ui/ContextPanel/context.js +4 -0
- package/dist/cjs/ui/DropList/index.js +11 -1
- package/dist/cjs/ui/Emoji/index.js +2 -0
- package/dist/cjs/ui/ErrorBoundary/index.js +2 -0
- package/dist/cjs/ui/Expand/index.js +13 -6
- package/dist/cjs/ui/FloatingToolbar/Button.js +2 -0
- package/dist/cjs/ui/FloatingToolbar/ButtonSpotlightCard.js +4 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +3 -0
- package/dist/cjs/ui/IntlErrorBoundary/index.js +3 -0
- package/dist/cjs/ui/Layer/index.js +8 -0
- package/dist/cjs/ui/MediaSingle/grid.js +12 -2
- package/dist/cjs/ui/MediaSingle/index.js +2 -0
- package/dist/cjs/ui/MediaSingle/styled.js +6 -0
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +4 -1
- package/dist/cjs/ui/Mention/mention-with-providers.js +20 -3
- package/dist/cjs/ui/OverflowShadow/index.js +18 -4
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +12 -2
- package/dist/cjs/ui/PanelTextInput/index.js +16 -1
- package/dist/cjs/ui/Popup/index.js +23 -2
- package/dist/cjs/ui/Popup/utils.js +19 -0
- package/dist/cjs/ui/ResizerLegacy/index.js +7 -0
- package/dist/cjs/ui/unsupported-content-helper.js +6 -1
- package/dist/cjs/ui/with-outer-listeners.js +12 -1
- package/dist/cjs/ui-color/ColorPalette/utils.js +2 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +9 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +12 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/index.js +4 -0
- package/dist/cjs/ui-menu/Dropdown/index.js +9 -2
- package/dist/cjs/ui-menu/DropdownContainer/index.js +4 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +20 -3
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +17 -0
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +29 -4
- package/dist/cjs/utils/breakout.js +4 -0
- package/dist/cjs/utils/browser-extensions.js +4 -0
- package/dist/cjs/utils/browser.js +47 -5
- package/dist/cjs/utils/commands.js +4 -1
- package/dist/cjs/utils/compareNodes.js +7 -0
- package/dist/cjs/utils/compose.js +2 -0
- package/dist/cjs/utils/create-wrap-selection-transaction.js +9 -1
- package/dist/cjs/utils/dom.js +2 -0
- package/dist/cjs/utils/editor-core-utils.js +5 -0
- package/dist/cjs/utils/filter/privacy-filter.js +2 -0
- package/dist/cjs/utils/get-performance-options.js +2 -0
- package/dist/cjs/utils/hyperlink.js +16 -0
- package/dist/cjs/utils/imageLoader.js +23 -0
- package/dist/cjs/utils/index.js +10 -0
- package/dist/cjs/utils/input-rules.js +4 -1
- package/dist/cjs/utils/macro.js +2 -0
- package/dist/cjs/utils/nodes.js +6 -1
- package/dist/cjs/utils/outdated-browsers.js +21 -1
- package/dist/cjs/utils/performance/is-performance-api-available.js +4 -1
- package/dist/cjs/utils/performance/measure-render.js +5 -0
- package/dist/cjs/utils/performance/measure-tti.js +5 -0
- package/dist/cjs/utils/plugin-state-factory.js +4 -0
- package/dist/cjs/utils/processRawValue.js +13 -1
- package/dist/cjs/utils/prosemirror/autojoin.js +2 -0
- package/dist/cjs/utils/referentiality.js +5 -0
- package/dist/cjs/utils/rich-media-utils.js +4 -1
- package/dist/cjs/utils/should-auto-linkify-tld.js +5 -0
- package/dist/cjs/utils/should-force-tracking.js +2 -0
- package/dist/cjs/utils/slice.js +2 -0
- package/dist/cjs/utils/track-unsupported-content.js +15 -2
- package/dist/cjs/utils/traversor.js +6 -0
- package/dist/cjs/utils/validate-using-spec.js +13 -1
- package/dist/cjs/utils/validator.js +19 -0
- package/dist/cjs/utils/withFeatureFlaggedComponent.js +4 -0
- package/dist/cjs/with-plugin-state/index.js +94 -20
- package/dist/es2019/analytics/analytics-queue.js +8 -0
- package/dist/es2019/analytics/linking-utils.js +2 -0
- package/dist/es2019/card/LinkToolbarButtonGroup.js +2 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +15 -3
- package/dist/es2019/card/ui/assets/card.js +4 -0
- package/dist/es2019/card/ui/assets/embed.js +4 -0
- package/dist/es2019/card/ui/assets/inline.js +4 -0
- package/dist/es2019/card/ui/assets/url.js +4 -0
- package/dist/es2019/clipboard/index.js +12 -1
- package/dist/es2019/collab/index.js +2 -0
- package/dist/es2019/commands/index.js +8 -2
- package/dist/es2019/commands/insert-block.js +10 -2
- package/dist/es2019/core-utils/document-logger.js +4 -0
- package/dist/es2019/doc-utils/editor-use-only.js +5 -1
- package/dist/es2019/element-browser/ElementBrowser.js +2 -0
- package/dist/es2019/element-browser/ViewMore.js +8 -2
- package/dist/es2019/element-browser/components/CategoryList.js +2 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +12 -0
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +8 -2
- package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +13 -2
- package/dist/es2019/event-dispatcher/index.js +8 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +2 -0
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +10 -2
- package/dist/es2019/extensibility/Extension/Lozenge/index.js +3 -1
- package/dist/es2019/extensibility/Extension.js +2 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +15 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +4 -0
- package/dist/es2019/extensibility/extensionNodeView.js +3 -0
- package/dist/es2019/extensions/extension-fields-helpers.js +4 -0
- package/dist/es2019/extensions/extension-handlers.js +4 -0
- package/dist/es2019/extensions/module-helpers.js +11 -2
- package/dist/es2019/extensions/types/field-definitions.js +5 -0
- package/dist/es2019/floating-toolbar/index.js +18 -2
- package/dist/es2019/guideline/dynamicGuideline.js +4 -1
- package/dist/es2019/guideline/relativeGuideline.js +12 -3
- package/dist/es2019/guideline/snapping.js +4 -1
- package/dist/es2019/guideline/updateGuideline.js +4 -1
- package/dist/es2019/hooks/usePluginStateEffect.js +4 -0
- package/dist/es2019/hooks/useSharedPluginState.js +4 -0
- package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
- package/dist/es2019/icons/shared/BorderIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelErrorIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelInfoIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelNoteIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelSuccessIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelWarningIcon.js +4 -0
- package/dist/es2019/insert/index.js +6 -1
- package/dist/es2019/keymaps/index.js +46 -4
- package/dist/es2019/keymaps/keymap.js +4 -0
- package/dist/es2019/lazy-node-view/css-helper.js +4 -0
- package/dist/es2019/lazy-node-view/index.js +6 -1
- package/dist/es2019/lazy-node-view/node-view.js +2 -0
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +2 -0
- package/dist/es2019/link/ConfigureLinkOverlay/StyledButton.js +4 -1
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/index.js +4 -1
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +9 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +19 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -0
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +2 -0
- package/dist/es2019/link/LinkSearch/index.js +13 -0
- package/dist/es2019/link/LinkSearch/withActivityProvider.js +3 -0
- package/dist/es2019/lists/analytics.js +2 -0
- package/dist/es2019/mark/commands.js +24 -3
- package/dist/es2019/media-inline/inline-image-card.js +4 -2
- package/dist/es2019/media-inline/inline-image-wrapper.js +2 -0
- package/dist/es2019/media-single/MediaBadges.js +2 -0
- package/dist/es2019/media-single/utils.js +5 -0
- package/dist/es2019/monitoring/environment.js +6 -1
- package/dist/es2019/monitoring/error.js +19 -3
- package/dist/es2019/node-width/index.js +6 -1
- package/dist/es2019/normalize-feature-flags.js +4 -1
- package/dist/es2019/paste/clipboard.js +2 -0
- package/dist/es2019/paste/md-plugins/ignore-list-heading-md-plugin.js +5 -0
- package/dist/es2019/paste/md-plugins/linkify-md-plugin.js +20 -0
- package/dist/es2019/paste/md-plugins/newline-md-plugin.js +5 -0
- package/dist/es2019/paste/md-plugins/paragraph-md-plugin.js +5 -0
- package/dist/es2019/portal/common.js +4 -1
- package/dist/es2019/preset/builder.js +8 -0
- package/dist/es2019/preset/core-plugin/index.js +5 -0
- package/dist/es2019/preset/core-plugin/requestDocument.js +3 -0
- package/dist/es2019/preset/plugin-injection-api.js +62 -6
- package/dist/es2019/provider-factory/provider-factory.js +8 -1
- package/dist/es2019/provider-factory/with-providers.js +12 -0
- package/dist/es2019/provider-helpers/combine-providers.js +7 -0
- package/dist/es2019/provider-helpers/promise-helpers.js +3 -0
- package/dist/es2019/quick-insert/assets/index.js +2 -0
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +4 -0
- package/dist/es2019/react-node-view/index.js +32 -2
- package/dist/es2019/resizer/BreakoutResizer.js +1 -7
- package/dist/es2019/resizer/Resizer.js +10 -2
- package/dist/es2019/safe-plugin/index.js +3 -0
- package/dist/es2019/selection/gap-cursor/actions.js +11 -2
- package/dist/es2019/selection/gap-cursor/selection.js +8 -0
- package/dist/es2019/selection/index.js +2 -0
- package/dist/es2019/selection-based-node-view/SelectionBasedNodeView.js +10 -1
- package/dist/es2019/styles/shared/lists.js +4 -1
- package/dist/es2019/transforms/code-block.js +6 -0
- package/dist/es2019/transforms/extension.js +14 -2
- package/dist/es2019/transforms/layout.js +6 -0
- package/dist/es2019/types/annotation/emitter.js +4 -0
- package/dist/es2019/types/index.js +3 -1
- package/dist/es2019/ui/Caption/index.js +4 -0
- package/dist/es2019/ui/ContextPanel/context.js +4 -0
- package/dist/es2019/ui/DropList/index.js +12 -2
- package/dist/es2019/ui/Emoji/index.js +2 -0
- package/dist/es2019/ui/ErrorBoundary/index.js +2 -0
- package/dist/es2019/ui/Expand/index.js +13 -6
- package/dist/es2019/ui/FloatingToolbar/Button.js +2 -0
- package/dist/es2019/ui/FloatingToolbar/ButtonSpotlightCard.js +4 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +3 -0
- package/dist/es2019/ui/IntlErrorBoundary/index.js +3 -0
- package/dist/es2019/ui/Layer/index.js +8 -0
- package/dist/es2019/ui/MediaSingle/grid.js +12 -2
- package/dist/es2019/ui/MediaSingle/index.js +2 -0
- package/dist/es2019/ui/MediaSingle/styled.js +6 -0
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +4 -1
- package/dist/es2019/ui/Mention/mention-with-providers.js +18 -2
- package/dist/es2019/ui/OverflowShadow/index.js +19 -5
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +12 -2
- package/dist/es2019/ui/PanelTextInput/index.js +14 -0
- package/dist/es2019/ui/Popup/index.js +21 -1
- package/dist/es2019/ui/Popup/utils.js +19 -0
- package/dist/es2019/ui/ResizerLegacy/index.js +7 -0
- package/dist/es2019/ui/unsupported-content-helper.js +6 -1
- package/dist/es2019/ui/with-outer-listeners.js +12 -1
- package/dist/es2019/ui-color/ColorPalette/utils.js +2 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +9 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +12 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/index.js +4 -0
- package/dist/es2019/ui-menu/Dropdown/index.js +9 -2
- package/dist/es2019/ui-menu/DropdownContainer/index.js +4 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +20 -3
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +17 -0
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +27 -4
- package/dist/es2019/utils/breakout.js +4 -0
- package/dist/es2019/utils/browser-extensions.js +4 -0
- package/dist/es2019/utils/browser.js +47 -5
- package/dist/es2019/utils/commands.js +4 -1
- package/dist/es2019/utils/compare-props.js +4 -1
- package/dist/es2019/utils/compareNodes.js +7 -0
- package/dist/es2019/utils/compose.js +2 -0
- package/dist/es2019/utils/create-wrap-selection-transaction.js +9 -1
- package/dist/es2019/utils/dom.js +2 -0
- package/dist/es2019/utils/editor-core-utils.js +5 -0
- package/dist/es2019/utils/filter/privacy-filter.js +2 -0
- package/dist/es2019/utils/get-performance-options.js +2 -0
- package/dist/es2019/utils/hyperlink.js +16 -0
- package/dist/es2019/utils/imageLoader.js +23 -0
- package/dist/es2019/utils/index.js +11 -0
- package/dist/es2019/utils/input-rules.js +4 -1
- package/dist/es2019/utils/macro.js +2 -0
- package/dist/es2019/utils/nodes.js +6 -1
- package/dist/es2019/utils/outdated-browsers.js +21 -1
- package/dist/es2019/utils/performance/is-performance-api-available.js +4 -1
- package/dist/es2019/utils/performance/measure-render.js +6 -1
- package/dist/es2019/utils/performance/measure-tti.js +6 -0
- package/dist/es2019/utils/plugin-state-factory.js +4 -0
- package/dist/es2019/utils/processRawValue.js +13 -1
- package/dist/es2019/utils/prosemirror/autojoin.js +2 -0
- package/dist/es2019/utils/referentiality.js +5 -0
- package/dist/es2019/utils/rich-media-utils.js +4 -1
- package/dist/es2019/utils/should-auto-linkify-tld.js +5 -0
- package/dist/es2019/utils/should-force-tracking.js +2 -0
- package/dist/es2019/utils/slice.js +2 -0
- package/dist/es2019/utils/track-unsupported-content.js +19 -3
- package/dist/es2019/utils/traversor.js +7 -0
- package/dist/es2019/utils/validate-using-spec.js +13 -1
- package/dist/es2019/utils/validator.js +19 -0
- package/dist/es2019/utils/withFeatureFlaggedComponent.js +4 -0
- package/dist/es2019/with-plugin-state/index.js +77 -3
- package/dist/esm/analytics/analytics-queue.js +8 -0
- package/dist/esm/analytics/linking-utils.js +2 -0
- package/dist/esm/card/LinkToolbarButtonGroup.js +2 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +15 -3
- package/dist/esm/card/ui/assets/card.js +4 -0
- package/dist/esm/card/ui/assets/embed.js +4 -0
- package/dist/esm/card/ui/assets/inline.js +4 -0
- package/dist/esm/card/ui/assets/url.js +4 -0
- package/dist/esm/clipboard/index.js +11 -1
- package/dist/esm/collab/index.js +2 -0
- package/dist/esm/commands/index.js +50 -42
- package/dist/esm/commands/insert-block.js +10 -2
- package/dist/esm/core-utils/document-logger.js +4 -0
- package/dist/esm/doc-utils/editor-use-only.js +8 -3
- package/dist/esm/element-browser/ElementBrowser.js +2 -0
- package/dist/esm/element-browser/ViewMore.js +8 -2
- package/dist/esm/element-browser/components/CategoryList.js +2 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +12 -0
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +8 -2
- package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +13 -2
- package/dist/esm/event-dispatcher/index.js +8 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +2 -0
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +10 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +3 -1
- package/dist/esm/extensibility/Extension.js +2 -0
- package/dist/esm/extensibility/ExtensionComponent.js +17 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +4 -0
- package/dist/esm/extensibility/extensionNodeView.js +3 -0
- package/dist/esm/extensions/extension-fields-helpers.js +4 -1
- package/dist/esm/extensions/extension-handlers.js +4 -0
- package/dist/esm/extensions/module-helpers.js +15 -5
- package/dist/esm/extensions/types/field-definitions.js +5 -0
- package/dist/esm/floating-toolbar/index.js +18 -2
- package/dist/esm/guideline/dynamicGuideline.js +4 -1
- package/dist/esm/guideline/relativeGuideline.js +12 -3
- package/dist/esm/guideline/updateGuideline.js +4 -1
- package/dist/esm/hooks/usePluginStateEffect.js +4 -0
- package/dist/esm/hooks/useSharedPluginState.js +4 -0
- package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
- package/dist/esm/icons/shared/BorderIcon.js +4 -0
- package/dist/esm/icons/shared/PanelErrorIcon.js +4 -0
- package/dist/esm/icons/shared/PanelInfoIcon.js +4 -0
- package/dist/esm/icons/shared/PanelNoteIcon.js +4 -0
- package/dist/esm/icons/shared/PanelSuccessIcon.js +4 -0
- package/dist/esm/icons/shared/PanelWarningIcon.js +4 -0
- package/dist/esm/insert/index.js +6 -1
- package/dist/esm/keymaps/index.js +48 -5
- package/dist/esm/keymaps/keymap.js +4 -0
- package/dist/esm/lazy-node-view/css-helper.js +4 -0
- package/dist/esm/lazy-node-view/index.js +6 -1
- package/dist/esm/lazy-node-view/node-view.js +2 -0
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +2 -0
- package/dist/esm/link/ConfigureLinkOverlay/StyledButton.js +4 -1
- package/dist/esm/link/LinkPicker/EditorLinkPicker/index.js +4 -1
- package/dist/esm/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +9 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +16 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -0
- package/dist/esm/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +2 -0
- package/dist/esm/link/LinkSearch/index.js +9 -1
- package/dist/esm/link/LinkSearch/withActivityProvider.js +3 -0
- package/dist/esm/lists/analytics.js +2 -0
- package/dist/esm/mark/commands.js +24 -3
- package/dist/esm/media-inline/inline-image-card.js +4 -2
- package/dist/esm/media-inline/inline-image-wrapper.js +2 -0
- package/dist/esm/media-single/MediaBadges.js +2 -0
- package/dist/esm/media-single/utils.js +5 -0
- package/dist/esm/monitoring/environment.js +6 -1
- package/dist/esm/monitoring/error.js +19 -3
- package/dist/esm/node-width/index.js +6 -1
- package/dist/esm/normalize-feature-flags.js +4 -1
- package/dist/esm/paste/clipboard.js +2 -0
- package/dist/esm/paste/md-plugins/ignore-list-heading-md-plugin.js +5 -0
- package/dist/esm/paste/md-plugins/linkify-md-plugin.js +20 -0
- package/dist/esm/paste/md-plugins/newline-md-plugin.js +5 -0
- package/dist/esm/paste/md-plugins/paragraph-md-plugin.js +5 -0
- package/dist/esm/portal/common.js +4 -1
- package/dist/esm/preset/builder.js +8 -0
- package/dist/esm/preset/core-plugin/index.js +5 -0
- package/dist/esm/preset/core-plugin/requestDocument.js +3 -0
- package/dist/esm/preset/plugin-injection-api.js +62 -6
- package/dist/esm/provider-factory/provider-factory.js +8 -1
- package/dist/esm/provider-factory/with-providers.js +12 -0
- package/dist/esm/provider-helpers/combine-providers.js +7 -0
- package/dist/esm/provider-helpers/promise-helpers.js +3 -0
- package/dist/esm/quick-insert/assets/index.js +2 -0
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +4 -0
- package/dist/esm/react-node-view/index.js +33 -2
- package/dist/esm/resizer/BreakoutResizer.js +1 -7
- package/dist/esm/resizer/Resizer.js +10 -2
- package/dist/esm/safe-plugin/index.js +3 -0
- package/dist/esm/selection/gap-cursor/actions.js +11 -2
- package/dist/esm/selection/gap-cursor/selection.js +8 -0
- package/dist/esm/selection/index.js +2 -0
- package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +10 -1
- package/dist/esm/styles/shared/lists.js +4 -1
- package/dist/esm/transforms/code-block.js +6 -0
- package/dist/esm/transforms/extension.js +14 -2
- package/dist/esm/transforms/layout.js +6 -0
- package/dist/esm/types/annotation/emitter.js +8 -2
- package/dist/esm/types/index.js +3 -1
- package/dist/esm/ui/Caption/index.js +4 -0
- package/dist/esm/ui/ContextPanel/context.js +4 -0
- package/dist/esm/ui/DropList/index.js +11 -1
- package/dist/esm/ui/Emoji/index.js +2 -0
- package/dist/esm/ui/ErrorBoundary/index.js +2 -0
- package/dist/esm/ui/Expand/index.js +13 -6
- package/dist/esm/ui/FloatingToolbar/Button.js +2 -0
- package/dist/esm/ui/FloatingToolbar/ButtonSpotlightCard.js +4 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +3 -0
- package/dist/esm/ui/IntlErrorBoundary/index.js +3 -0
- package/dist/esm/ui/Layer/index.js +8 -0
- package/dist/esm/ui/MediaSingle/grid.js +12 -2
- package/dist/esm/ui/MediaSingle/index.js +2 -0
- package/dist/esm/ui/MediaSingle/styled.js +6 -0
- package/dist/esm/ui/Mention/mention-with-profilecard.js +4 -1
- package/dist/esm/ui/Mention/mention-with-providers.js +20 -3
- package/dist/esm/ui/OverflowShadow/index.js +18 -4
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +12 -2
- package/dist/esm/ui/PanelTextInput/index.js +16 -1
- package/dist/esm/ui/Popup/index.js +23 -2
- package/dist/esm/ui/Popup/utils.js +19 -0
- package/dist/esm/ui/ResizerLegacy/index.js +7 -0
- package/dist/esm/ui/unsupported-content-helper.js +6 -1
- package/dist/esm/ui/with-outer-listeners.js +12 -1
- package/dist/esm/ui-color/ColorPalette/utils.js +2 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +9 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +12 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/index.js +4 -0
- package/dist/esm/ui-menu/Dropdown/index.js +9 -2
- package/dist/esm/ui-menu/DropdownContainer/index.js +4 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +20 -3
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +17 -0
- package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +29 -4
- package/dist/esm/utils/breakout.js +4 -0
- package/dist/esm/utils/browser-extensions.js +4 -0
- package/dist/esm/utils/browser.js +47 -5
- package/dist/esm/utils/commands.js +4 -1
- package/dist/esm/utils/compareNodes.js +7 -0
- package/dist/esm/utils/compose.js +2 -0
- package/dist/esm/utils/create-wrap-selection-transaction.js +9 -1
- package/dist/esm/utils/dom.js +2 -0
- package/dist/esm/utils/editor-core-utils.js +5 -0
- package/dist/esm/utils/filter/privacy-filter.js +2 -0
- package/dist/esm/utils/get-performance-options.js +2 -0
- package/dist/esm/utils/hyperlink.js +16 -0
- package/dist/esm/utils/imageLoader.js +23 -0
- package/dist/esm/utils/index.js +11 -0
- package/dist/esm/utils/input-rules.js +4 -1
- package/dist/esm/utils/macro.js +2 -0
- package/dist/esm/utils/nodes.js +6 -1
- package/dist/esm/utils/outdated-browsers.js +21 -1
- package/dist/esm/utils/performance/is-performance-api-available.js +4 -1
- package/dist/esm/utils/performance/measure-render.js +5 -0
- package/dist/esm/utils/performance/measure-tti.js +6 -0
- package/dist/esm/utils/plugin-state-factory.js +4 -0
- package/dist/esm/utils/processRawValue.js +13 -1
- package/dist/esm/utils/prosemirror/autojoin.js +2 -0
- package/dist/esm/utils/referentiality.js +5 -0
- package/dist/esm/utils/rich-media-utils.js +4 -1
- package/dist/esm/utils/should-auto-linkify-tld.js +5 -0
- package/dist/esm/utils/should-force-tracking.js +2 -0
- package/dist/esm/utils/slice.js +2 -0
- package/dist/esm/utils/track-unsupported-content.js +15 -2
- package/dist/esm/utils/traversor.js +6 -0
- package/dist/esm/utils/validate-using-spec.js +13 -1
- package/dist/esm/utils/validator.js +19 -0
- package/dist/esm/utils/withFeatureFlaggedComponent.js +4 -0
- package/dist/esm/with-plugin-state/index.js +95 -19
- package/dist/types/analytics/types/avatar.d.ts +1 -1
- package/dist/types/analytics/types/toolbar-button.d.ts +1 -1
- package/dist/types/analytics/types/utils.d.ts +2 -2
- package/dist/types/annotation/index.d.ts +1 -1
- package/dist/types/commands/index.d.ts +3 -3
- package/dist/types/guideline/types.d.ts +1 -2
- package/dist/types/hooks/usePluginStateEffect.d.ts +2 -1
- package/dist/types/link/LinkPicker/EditorLinkPicker/index.d.ts +1 -1
- package/dist/types/link/LinkSearch/LinkSearchList.d.ts +1 -1
- package/dist/types/provider-factory/macro-provider.d.ts +1 -1
- package/dist/types/selection/types.d.ts +1 -2
- package/dist/types/types/floating-toolbar.d.ts +16 -16
- package/dist/types/types/hyperlink.d.ts +1 -2
- package/dist/types/ui/Mention/index.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/dist/types/utils/imageLoader.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/avatar.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/utils.d.ts +2 -2
- package/dist/types-ts4.5/annotation/index.d.ts +1 -1
- package/dist/types-ts4.5/commands/index.d.ts +3 -3
- package/dist/types-ts4.5/guideline/types.d.ts +1 -2
- package/dist/types-ts4.5/hooks/usePluginStateEffect.d.ts +2 -1
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/index.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/macro-provider.d.ts +1 -1
- package/dist/types-ts4.5/selection/types.d.ts +1 -2
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +16 -16
- package/dist/types-ts4.5/types/hyperlink.d.ts +1 -2
- package/dist/types-ts4.5/ui/Mention/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/dist/types-ts4.5/utils/imageLoader.d.ts +2 -2
- package/package.json +7 -7
- package/tsconfig.json +0 -1
|
@@ -4,6 +4,8 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
* A helper to get the underlying array of a fragment.
|
|
5
5
|
*/
|
|
6
6
|
export function getFragmentBackingArray(fragment) {
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
9
|
return fragment.content;
|
|
8
10
|
}
|
|
9
11
|
export function mapFragment(content, callback, parent = null) {
|
|
@@ -7,7 +7,12 @@ function concatAncestorHierarchy(node, ancestoryHierarchy) {
|
|
|
7
7
|
// Space concatenator used to reduce analytics payload size
|
|
8
8
|
return ancestoryHierarchy ? `${ancestoryHierarchy} ${name}` : name;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
13
|
const sanitizeMarks = (marks = []) => {
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
16
|
let sanitizedMarks = [];
|
|
12
17
|
marks.forEach(mark => {
|
|
13
18
|
if (mark.attrs) {
|
|
@@ -25,13 +30,18 @@ const sanitizeMarks = (marks = []) => {
|
|
|
25
30
|
return sanitizedMarks;
|
|
26
31
|
};
|
|
27
32
|
const sanitizeAttributes = (attrs = {}) => {
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
35
|
let sanitizedAttrs = Object.assign({}, attrs);
|
|
29
36
|
Object.keys(attrs).filter(key => !whitelistedAttributes.includes(key)).forEach(key => {
|
|
30
37
|
sanitizedAttrs[key] !== null ? sanitizedAttrs[key] = '' : sanitizedAttrs[key] = 'null';
|
|
31
38
|
});
|
|
32
39
|
return sanitizedAttrs;
|
|
33
40
|
};
|
|
34
|
-
const trackUnsupportedContentTooltipActionFor = (action, dispatchAnalyticsEvent, unsupportedContentType, originalNodeType
|
|
41
|
+
const trackUnsupportedContentTooltipActionFor = (action, dispatchAnalyticsEvent, unsupportedContentType, originalNodeType
|
|
42
|
+
// Ignored via go/ees005
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
44
|
+
) => {
|
|
35
45
|
dispatchAnalyticsEvent({
|
|
36
46
|
action: action,
|
|
37
47
|
actionSubjectId: unsupportedContentType,
|
|
@@ -42,7 +52,10 @@ const trackUnsupportedContentTooltipActionFor = (action, dispatchAnalyticsEvent,
|
|
|
42
52
|
}
|
|
43
53
|
});
|
|
44
54
|
};
|
|
45
|
-
export const findAndTrackUnsupportedContentNodes = (node, schema, dispatchAnalyticsEvent, ancestorHierarchy = ''
|
|
55
|
+
export const findAndTrackUnsupportedContentNodes = (node, schema, dispatchAnalyticsEvent, ancestorHierarchy = ''
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
58
|
+
) => {
|
|
46
59
|
const {
|
|
47
60
|
type: nodeType,
|
|
48
61
|
marks: nodeMarks
|
|
@@ -115,7 +128,10 @@ export const findAndTrackUnsupportedContentNodes = (node, schema, dispatchAnalyt
|
|
|
115
128
|
node.content.forEach(childNode => findAndTrackUnsupportedContentNodes(childNode, schema, dispatchAnalyticsEvent, concatAncestorHierarchy(node, ancestorHierarchy)));
|
|
116
129
|
}
|
|
117
130
|
};
|
|
118
|
-
export const fireUnsupportedEvent = (dispatchAnalyticsEvent, actionSubjectId, unsupportedNode, errorCode
|
|
131
|
+
export const fireUnsupportedEvent = (dispatchAnalyticsEvent, actionSubjectId, unsupportedNode, errorCode
|
|
132
|
+
// Ignored via go/ees005
|
|
133
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
134
|
+
) => {
|
|
119
135
|
const sanitizedAttrs = sanitizeAttributes(unsupportedNode.attrs);
|
|
120
136
|
const sanitizedMarks = sanitizeMarks(unsupportedNode.marks);
|
|
121
137
|
const sanitizedUnsupportedNode = {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
// Ignored via go/ees005
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
|
|
2
5
|
class ADFTraversor {
|
|
6
|
+
// Ignored via go/ees005
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
8
|
constructor(doc) {
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
11
|
_defineProperty(this, "subscribers", new Map());
|
|
5
12
|
this.doc = doc;
|
|
6
13
|
}
|
|
@@ -7,7 +7,10 @@ const errorCallbackFor = (marks, validate, dispatchAnalyticsEvent) => {
|
|
|
7
7
|
return validationErrorHandler(entity, error, options, marks, validate, dispatchAnalyticsEvent);
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export const validationErrorHandler = (entity, error, options, marks, validate, dispatchAnalyticsEvent
|
|
10
|
+
export const validationErrorHandler = (entity, error, options, marks, validate, dispatchAnalyticsEvent
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
13
|
+
) => {
|
|
11
14
|
if (entity && entity.type === UNSUPPORTED_NODE_ATTRIBUTE) {
|
|
12
15
|
return entity;
|
|
13
16
|
}
|
|
@@ -64,17 +67,26 @@ export const validationErrorHandler = (entity, error, options, marks, validate,
|
|
|
64
67
|
}
|
|
65
68
|
return entity;
|
|
66
69
|
};
|
|
70
|
+
|
|
71
|
+
// Ignored via go/ees005
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
67
73
|
function getEntityForInvalidContentLength(error, entity, validate, marks, dispatchAnalyticsEvent) {
|
|
68
74
|
const meta = error.meta;
|
|
69
75
|
if (meta.type === 'maximum') {
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
70
78
|
entity.content = entity.content.filter(x => !!x).map((child, index) => {
|
|
71
79
|
return index >= meta.requiredLength && child.type !== 'unsupportedBlock' ? wrapWithUnsupported(child) : validate(child, errorCallbackFor(marks, validate, dispatchAnalyticsEvent)).entity;
|
|
72
80
|
});
|
|
73
81
|
}
|
|
74
82
|
if (meta.type === 'minimum') {
|
|
83
|
+
// Ignored via go/ees005
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
75
85
|
if (entity.content.length === 0) {
|
|
76
86
|
return wrapWithUnsupported(entity);
|
|
77
87
|
}
|
|
88
|
+
// Ignored via go/ees005
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
78
90
|
entity.content = entity.content.filter(x => !!x).map(child => {
|
|
79
91
|
return child.type !== 'unsupportedBlock' ? wrapWithUnsupported(child) : child;
|
|
80
92
|
});
|
|
@@ -70,13 +70,25 @@ const wrapInlineNodes = (nodes = []) => {
|
|
|
70
70
|
export const getValidContent = (content, schema = defaultSchema, adfStage = 'final') => {
|
|
71
71
|
return content.map(node => getValidNode(node, schema, adfStage));
|
|
72
72
|
};
|
|
73
|
+
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
73
76
|
const TEXT_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
|
|
77
|
+
// Ignored via go/ees005
|
|
78
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
74
79
|
const RELATIVE_LINK = /^\//;
|
|
80
|
+
// Ignored via go/ees005
|
|
81
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
75
82
|
const ANCHOR_LINK = /^#/;
|
|
76
83
|
const flattenUnknownBlockTree = (node, schema = defaultSchema, adfStage = 'final') => {
|
|
77
84
|
const output = [];
|
|
78
85
|
let isPrevLeafNode = false;
|
|
86
|
+
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
79
89
|
for (let i = 0; i < node.content.length; i++) {
|
|
90
|
+
// Ignored via go/ees005
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
80
92
|
const childNode = node.content[i];
|
|
81
93
|
const isLeafNode = !(childNode.content && childNode.content.length);
|
|
82
94
|
if (i > 0) {
|
|
@@ -402,6 +414,8 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
402
414
|
mediaUrl = url;
|
|
403
415
|
}
|
|
404
416
|
if (mediaType === 'external' && !!mediaUrl) {
|
|
417
|
+
// Ignored via go/ees005
|
|
418
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
405
419
|
const mediaAttrs = {
|
|
406
420
|
type: mediaType,
|
|
407
421
|
url: mediaUrl,
|
|
@@ -421,6 +435,8 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
421
435
|
attrs: mediaAttrs
|
|
422
436
|
};
|
|
423
437
|
} else if (mediaId && mediaType) {
|
|
438
|
+
// Ignored via go/ees005
|
|
439
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
424
440
|
const mediaAttrs = {
|
|
425
441
|
type: mediaType,
|
|
426
442
|
id: mediaId,
|
|
@@ -858,6 +874,9 @@ export const getValidMark = (mark, adfStage = 'final') => {
|
|
|
858
874
|
if (linkHref && linkHref.indexOf(':') === -1 && !RELATIVE_LINK.test(linkHref) && !ANCHOR_LINK.test(linkHref)) {
|
|
859
875
|
linkHref = `http://${linkHref}`;
|
|
860
876
|
}
|
|
877
|
+
|
|
878
|
+
// Ignored via go/ees005
|
|
879
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
861
880
|
const linkAttrs = {
|
|
862
881
|
href: linkHref
|
|
863
882
|
};
|
|
@@ -9,6 +9,10 @@ import React from 'react';
|
|
|
9
9
|
*/
|
|
10
10
|
export const withFeatureFlaggedComponent = (ComponentOld, ComponentNext, featureFlagFn) => {
|
|
11
11
|
return props => {
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
16
|
return featureFlagFn() ? /*#__PURE__*/React.createElement(ComponentNext, props) : /*#__PURE__*/React.createElement(ComponentOld, props);
|
|
13
17
|
};
|
|
14
18
|
};
|
|
@@ -52,23 +52,34 @@ const DEFAULT_SLOW_THRESHOLD = 4;
|
|
|
52
52
|
* ```
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, react/prefer-stateless-function
|
|
55
57
|
class WithPluginState extends React.Component {
|
|
56
58
|
constructor(props) {
|
|
57
59
|
super(props);
|
|
58
60
|
}
|
|
59
61
|
render() {
|
|
60
62
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
63
|
+
// Ignored via go/ees005
|
|
64
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
61
65
|
return /*#__PURE__*/React.createElement(WithPluginStateNew, this.props);
|
|
62
66
|
}
|
|
67
|
+
// Ignored via go/ees005
|
|
68
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
63
69
|
return /*#__PURE__*/React.createElement(WithPluginStateOld, this.props);
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
function WithPluginStateNew(props) {
|
|
67
73
|
const context = React.useContext(EditorContext);
|
|
68
|
-
return /*#__PURE__*/React.createElement(WithPluginStateInner
|
|
74
|
+
return /*#__PURE__*/React.createElement(WithPluginStateInner
|
|
75
|
+
// Ignored via go/ees005
|
|
76
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
77
|
+
, _extends({}, props, {
|
|
69
78
|
editorActions: context === null || context === void 0 ? void 0 : context.editorActions
|
|
70
79
|
}));
|
|
71
80
|
}
|
|
81
|
+
// Ignored via go/ees005
|
|
82
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
72
83
|
export class WithPluginStateInner extends React.Component {
|
|
73
84
|
constructor(props) {
|
|
74
85
|
super(props);
|
|
@@ -77,8 +88,15 @@ export class WithPluginStateInner extends React.Component {
|
|
|
77
88
|
_defineProperty(this, "notAppliedState", {});
|
|
78
89
|
_defineProperty(this, "isSubscribed", false);
|
|
79
90
|
_defineProperty(this, "callsCount", 0);
|
|
80
|
-
|
|
91
|
+
// Ignored via go/ees005
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
93
|
+
_defineProperty(this, "handlePluginStateChange", (propName, pluginName, performanceOptions, skipEqualityCheck) =>
|
|
94
|
+
// Ignored via go/ees005
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
|
+
pluginState => {
|
|
81
97
|
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
98
|
+
// Ignored via go/ees005
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
100
|
if (this.state[propName] !== pluginState || skipEqualityCheck) {
|
|
83
101
|
this.updateState({
|
|
84
102
|
stateSubset: {
|
|
@@ -178,6 +196,8 @@ export class WithPluginStateInner extends React.Component {
|
|
|
178
196
|
const fakePluginKey = {
|
|
179
197
|
key: 'analyticsPlugin$',
|
|
180
198
|
getState: state => {
|
|
199
|
+
// Ignored via go/ees005
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
181
201
|
return state['analyticsPlugin$'];
|
|
182
202
|
}
|
|
183
203
|
};
|
|
@@ -194,7 +214,12 @@ export class WithPluginStateInner extends React.Component {
|
|
|
194
214
|
if (!pluginKey) {
|
|
195
215
|
return;
|
|
196
216
|
}
|
|
217
|
+
|
|
218
|
+
// Ignored via go/ees005
|
|
219
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
197
220
|
const pluginName = pluginKey.key;
|
|
221
|
+
// Ignored via go/ees005
|
|
222
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
198
223
|
const pluginState = pluginsStates[propName];
|
|
199
224
|
const isPluginWithSubscribe = pluginState && pluginState.subscribe;
|
|
200
225
|
const handler = this.handlePluginStateChange(propName, pluginName, {
|
|
@@ -205,8 +230,15 @@ export class WithPluginStateInner extends React.Component {
|
|
|
205
230
|
if (isPluginWithSubscribe) {
|
|
206
231
|
pluginState.subscribe(handler);
|
|
207
232
|
} else {
|
|
233
|
+
// Ignored via go/ees005
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
208
235
|
eventDispatcher.on(pluginKey.key, handler);
|
|
209
236
|
}
|
|
237
|
+
|
|
238
|
+
// Ignored via go/ees005
|
|
239
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
240
|
+
// Ignored via go/ees005
|
|
241
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
210
242
|
this.listeners[pluginKey.key] = {
|
|
211
243
|
handler,
|
|
212
244
|
pluginKey
|
|
@@ -220,10 +252,16 @@ export class WithPluginStateInner extends React.Component {
|
|
|
220
252
|
return;
|
|
221
253
|
}
|
|
222
254
|
Object.keys(this.listeners).forEach(key => {
|
|
255
|
+
// Ignored via go/ees005
|
|
256
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
223
257
|
const pluginState = this.listeners[key].pluginKey.getState(editorView.state);
|
|
224
258
|
if (pluginState && pluginState.unsubscribe) {
|
|
259
|
+
// Ignored via go/ees005
|
|
260
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
225
261
|
pluginState.unsubscribe(this.listeners[key].handler);
|
|
226
262
|
} else {
|
|
263
|
+
// Ignored via go/ees005
|
|
264
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
227
265
|
eventDispatcher.off(key, this.listeners[key].handler);
|
|
228
266
|
}
|
|
229
267
|
});
|
|
@@ -241,6 +279,9 @@ export class WithPluginStateInner extends React.Component {
|
|
|
241
279
|
this.subscribe(this.props);
|
|
242
280
|
this.subscribeToContextUpdates();
|
|
243
281
|
}
|
|
282
|
+
|
|
283
|
+
// Ignored via go/ees005
|
|
284
|
+
// eslint-disable-next-line react/no-unsafe
|
|
244
285
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
245
286
|
if (!this.isSubscribed) {
|
|
246
287
|
this.subscribe(nextProps);
|
|
@@ -260,6 +301,9 @@ export class WithPluginStateInner extends React.Component {
|
|
|
260
301
|
return render(this.state);
|
|
261
302
|
}
|
|
262
303
|
}
|
|
304
|
+
|
|
305
|
+
// Ignored via go/ees005
|
|
306
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
263
307
|
_defineProperty(WithPluginStateInner, "displayName", 'WithPluginState');
|
|
264
308
|
export class WithPluginStateOld extends React.Component {
|
|
265
309
|
constructor(props, context) {
|
|
@@ -269,8 +313,15 @@ export class WithPluginStateOld extends React.Component {
|
|
|
269
313
|
_defineProperty(this, "notAppliedState", {});
|
|
270
314
|
_defineProperty(this, "isSubscribed", false);
|
|
271
315
|
_defineProperty(this, "callsCount", 0);
|
|
272
|
-
|
|
316
|
+
// Ignored via go/ees005
|
|
317
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
318
|
+
_defineProperty(this, "handlePluginStateChange", (propName, pluginName, performanceOptions, skipEqualityCheck) =>
|
|
319
|
+
// Ignored via go/ees005
|
|
320
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
321
|
+
pluginState => {
|
|
273
322
|
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
323
|
+
// Ignored via go/ees005
|
|
324
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
274
325
|
if (this.state[propName] !== pluginState || skipEqualityCheck) {
|
|
275
326
|
this.updateState({
|
|
276
327
|
stateSubset: {
|
|
@@ -372,6 +423,8 @@ export class WithPluginStateOld extends React.Component {
|
|
|
372
423
|
const fakePluginKey = {
|
|
373
424
|
key: 'analyticsPlugin$',
|
|
374
425
|
getState: state => {
|
|
426
|
+
// Ignored via go/ees005
|
|
427
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
375
428
|
return state['analyticsPlugin$'];
|
|
376
429
|
}
|
|
377
430
|
};
|
|
@@ -388,7 +441,12 @@ export class WithPluginStateOld extends React.Component {
|
|
|
388
441
|
if (!pluginKey) {
|
|
389
442
|
return;
|
|
390
443
|
}
|
|
444
|
+
|
|
445
|
+
// Ignored via go/ees005
|
|
446
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
391
447
|
const pluginName = pluginKey.key;
|
|
448
|
+
// Ignored via go/ees005
|
|
449
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
392
450
|
const pluginState = pluginsStates[propName];
|
|
393
451
|
const isPluginWithSubscribe = pluginState && pluginState.subscribe;
|
|
394
452
|
const handler = this.handlePluginStateChange(propName, pluginName, {
|
|
@@ -399,8 +457,15 @@ export class WithPluginStateOld extends React.Component {
|
|
|
399
457
|
if (isPluginWithSubscribe) {
|
|
400
458
|
pluginState.subscribe(handler);
|
|
401
459
|
} else {
|
|
460
|
+
// Ignored via go/ees005
|
|
461
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
402
462
|
eventDispatcher.on(pluginKey.key, handler);
|
|
403
463
|
}
|
|
464
|
+
|
|
465
|
+
// Ignored via go/ees005
|
|
466
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
467
|
+
// Ignored via go/ees005
|
|
468
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
404
469
|
this.listeners[pluginKey.key] = {
|
|
405
470
|
handler,
|
|
406
471
|
pluginKey
|
|
@@ -414,10 +479,16 @@ export class WithPluginStateOld extends React.Component {
|
|
|
414
479
|
return;
|
|
415
480
|
}
|
|
416
481
|
Object.keys(this.listeners).forEach(key => {
|
|
482
|
+
// Ignored via go/ees005
|
|
483
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
417
484
|
const pluginState = this.listeners[key].pluginKey.getState(editorView.state);
|
|
418
485
|
if (pluginState && pluginState.unsubscribe) {
|
|
486
|
+
// Ignored via go/ees005
|
|
487
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
419
488
|
pluginState.unsubscribe(this.listeners[key].handler);
|
|
420
489
|
} else {
|
|
490
|
+
// Ignored via go/ees005
|
|
491
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
421
492
|
eventDispatcher.off(key, this.listeners[key].handler);
|
|
422
493
|
}
|
|
423
494
|
});
|
|
@@ -437,6 +508,9 @@ export class WithPluginStateOld extends React.Component {
|
|
|
437
508
|
this.subscribe(this.props);
|
|
438
509
|
this.subscribeToContextUpdates(this.context);
|
|
439
510
|
}
|
|
511
|
+
|
|
512
|
+
// Ignored via go/ees005
|
|
513
|
+
// eslint-disable-next-line react/no-unsafe
|
|
440
514
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
441
515
|
if (!this.isSubscribed) {
|
|
442
516
|
this.subscribe(nextProps);
|
|
@@ -12,7 +12,11 @@ export var AnalyticsQueue = /*#__PURE__*/function () {
|
|
|
12
12
|
return _createClass(AnalyticsQueue, [{
|
|
13
13
|
key: "request",
|
|
14
14
|
value: function request(fn) {
|
|
15
|
+
// Ignored via go/ees005
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
17
|
if (window.requestIdleCallback) {
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
20
|
window.requestIdleCallback(fn);
|
|
17
21
|
} else {
|
|
18
22
|
var start = performance.now();
|
|
@@ -31,8 +35,12 @@ export var AnalyticsQueue = /*#__PURE__*/function () {
|
|
|
31
35
|
value: function pending() {
|
|
32
36
|
var _window$navigator;
|
|
33
37
|
// Defensive coding as navigator.scheduling.isInputPending is an experimental API
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
40
|
if (typeof ((_window$navigator = window.navigator) === null || _window$navigator === void 0 || (_window$navigator = _window$navigator.scheduling) === null || _window$navigator === void 0 ? void 0 : _window$navigator.isInputPending) === 'function') {
|
|
35
41
|
var _window$navigator2;
|
|
42
|
+
// Ignored via go/ees005
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
44
|
return ((_window$navigator2 = window.navigator) === null || _window$navigator2 === void 0 || (_window$navigator2 = _window$navigator2.scheduling) === null || _window$navigator2 === void 0 ? void 0 : _window$navigator2.isInputPending()) === true;
|
|
37
45
|
}
|
|
38
46
|
return false;
|
|
@@ -5,6 +5,7 @@ export var buildEditLinkPayload = function buildEditLinkPayload(type) {
|
|
|
5
5
|
actionSubject: type === ACTION_SUBJECT_ID.HYPERLINK ? ACTION_SUBJECT.HYPERLINK : ACTION_SUBJECT.SMART_LINK,
|
|
6
6
|
actionSubjectId: ACTION_SUBJECT_ID.EDIT_LINK,
|
|
7
7
|
attributes: type !== ACTION_SUBJECT_ID.HYPERLINK ? {
|
|
8
|
+
// @ts-ignore
|
|
8
9
|
display: type
|
|
9
10
|
} : {},
|
|
10
11
|
eventType: EVENT_TYPE.UI
|
|
@@ -55,6 +56,7 @@ export var buildOpenedSettingsPayload = function buildOpenedSettingsPayload(type
|
|
|
55
56
|
actionSubject: ACTION_SUBJECT.BUTTON,
|
|
56
57
|
actionSubjectId: ACTION_SUBJECT_ID.GOTO_SMART_LINK_SETTINGS,
|
|
57
58
|
attributes: {
|
|
59
|
+
// @ts-ignore
|
|
58
60
|
inputMethod: INPUT_METHOD.TOOLBAR,
|
|
59
61
|
display: mapLinkTypeToCardAppearance(type)
|
|
60
62
|
},
|
|
@@ -23,6 +23,8 @@ var buttonStyleNoneEvent = css({
|
|
|
23
23
|
var DisallowedWrapper = function DisallowedWrapper(_ref) {
|
|
24
24
|
var disabled = _ref.disabled,
|
|
25
25
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
26
28
|
return jsx("div", props);
|
|
27
29
|
};
|
|
28
30
|
|
|
@@ -91,6 +91,9 @@ var breakoutIcons = [{
|
|
|
91
91
|
value: 'full-width',
|
|
92
92
|
icon: FullWidthIcon
|
|
93
93
|
}];
|
|
94
|
+
|
|
95
|
+
// Ignored via go/ees005
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
97
|
export var layoutToMessages = {
|
|
95
98
|
'wrap-left': toolbarMessages.wrapLeft,
|
|
96
99
|
center: commonMessages.alignImageCenter,
|
|
@@ -107,7 +110,10 @@ var getNodeWidth = function getNodeWidth(node, schema) {
|
|
|
107
110
|
}
|
|
108
111
|
return node.firstChild && node.firstChild.attrs.width || node.attrs.width;
|
|
109
112
|
};
|
|
110
|
-
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi
|
|
113
|
+
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi
|
|
114
|
+
// Ignored via go/ees005
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
116
|
+
) {
|
|
111
117
|
return function (state, dispatch) {
|
|
112
118
|
var _ref = state.selection,
|
|
113
119
|
node = _ref.node;
|
|
@@ -159,7 +165,10 @@ var getToolbarLayout = function getToolbarLayout(layout) {
|
|
|
159
165
|
}
|
|
160
166
|
return layout;
|
|
161
167
|
};
|
|
162
|
-
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled
|
|
168
|
+
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled
|
|
169
|
+
// Ignored via go/ees005
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
171
|
+
) {
|
|
163
172
|
return icons.map(function (toolbarItem) {
|
|
164
173
|
var id = toolbarItem.id,
|
|
165
174
|
value = toolbarItem.value;
|
|
@@ -182,7 +191,10 @@ var shouldHideLayoutToolbar = function shouldHideLayoutToolbar(selection, _ref2,
|
|
|
182
191
|
var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowResizing, allowResizingInTables) {
|
|
183
192
|
var allowWrapping = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
184
193
|
var allowAlignment = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : true;
|
|
185
|
-
var isChangingLayoutDisabled
|
|
194
|
+
var isChangingLayoutDisabled
|
|
195
|
+
// Ignored via go/ees005
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
197
|
+
= arguments.length > 9 ? arguments[9] : undefined;
|
|
186
198
|
var selection = state.selection;
|
|
187
199
|
if (!(selection instanceof NodeSelection) || !selection.node || !nodeType || shouldHideLayoutToolbar(selection, state.schema, allowResizingInTables)) {
|
|
188
200
|
return [];
|
|
@@ -9,6 +9,8 @@ var IconCardGlyph = function IconCardGlyph(props) {
|
|
|
9
9
|
viewBox: "0 0 32 32",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
14
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
15
|
fillRule: "evenodd",
|
|
14
16
|
clipRule: "evenodd",
|
|
@@ -17,6 +19,8 @@ var IconCardGlyph = function IconCardGlyph(props) {
|
|
|
17
19
|
}));
|
|
18
20
|
};
|
|
19
21
|
export var IconCard = function IconCard(props) {
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
24
|
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
21
25
|
glyph: IconCardGlyph
|
|
22
26
|
}, props));
|
|
@@ -9,6 +9,8 @@ var IconEmbedGlyph = function IconEmbedGlyph(props) {
|
|
|
9
9
|
viewBox: "0 0 32 32",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
14
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
15
|
fillRule: "evenodd",
|
|
14
16
|
clipRule: "evenodd",
|
|
@@ -17,6 +19,8 @@ var IconEmbedGlyph = function IconEmbedGlyph(props) {
|
|
|
17
19
|
}));
|
|
18
20
|
};
|
|
19
21
|
export var IconEmbed = function IconEmbed(props) {
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
24
|
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
21
25
|
glyph: IconEmbedGlyph
|
|
22
26
|
}, props));
|
|
@@ -9,6 +9,8 @@ var IconInlineGlyph = function IconInlineGlyph(props) {
|
|
|
9
9
|
viewBox: "0 0 32 32",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
14
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
15
|
fillRule: "evenodd",
|
|
14
16
|
clipRule: "evenodd",
|
|
@@ -17,6 +19,8 @@ var IconInlineGlyph = function IconInlineGlyph(props) {
|
|
|
17
19
|
}));
|
|
18
20
|
};
|
|
19
21
|
export var IconInline = function IconInline(props) {
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
24
|
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
21
25
|
glyph: IconInlineGlyph
|
|
22
26
|
}, props));
|
|
@@ -9,6 +9,8 @@ var IconUrlGlyph = function IconUrlGlyph(props) {
|
|
|
9
9
|
viewBox: "0 0 32 32",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
14
|
}, props), /*#__PURE__*/React.createElement("rect", {
|
|
13
15
|
x: "6",
|
|
14
16
|
y: "15",
|
|
@@ -19,6 +21,8 @@ var IconUrlGlyph = function IconUrlGlyph(props) {
|
|
|
19
21
|
}));
|
|
20
22
|
};
|
|
21
23
|
export var IconUrl = function IconUrl(props) {
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
22
26
|
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
23
27
|
glyph: IconUrlGlyph
|
|
24
28
|
}, props));
|
|
@@ -2,6 +2,8 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line import/no-namespace
|
|
5
7
|
import * as clipboard from 'clipboard-polyfill';
|
|
6
8
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
9
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
|
|
@@ -10,7 +12,11 @@ var isClipboardApiSupported = function isClipboardApiSupported() {
|
|
|
10
12
|
return !!navigator.clipboard && typeof navigator.clipboard.writeText === 'function';
|
|
11
13
|
};
|
|
12
14
|
var isIEClipboardApiSupported = function isIEClipboardApiSupported() {
|
|
13
|
-
return
|
|
15
|
+
return (
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
window.clipboardData && typeof window.clipboardData.setData === 'function'
|
|
19
|
+
);
|
|
14
20
|
};
|
|
15
21
|
var isExtensionNode = function isExtensionNode(node) {
|
|
16
22
|
if (node === 'extension' || node === 'bodiedExtension' || node === 'inlineExtension' || node === 'multiBodiedExtension') {
|
|
@@ -173,6 +179,8 @@ export var getAnalyticsPayload = function getAnalyticsPayload(state, action) {
|
|
|
173
179
|
}
|
|
174
180
|
break;
|
|
175
181
|
case ACTION_SUBJECT_ID.RANGE:
|
|
182
|
+
// Ignored via go/ees005
|
|
183
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
176
184
|
content.push.apply(content, _toConsumableArray(selectionAnalyticsPayload.attributes.nodes));
|
|
177
185
|
break;
|
|
178
186
|
case ACTION_SUBJECT_ID.ALL:
|
|
@@ -180,6 +188,8 @@ export var getAnalyticsPayload = function getAnalyticsPayload(state, action) {
|
|
|
180
188
|
break;
|
|
181
189
|
case ACTION_SUBJECT_ID.CELL:
|
|
182
190
|
{
|
|
191
|
+
// Ignored via go/ees005
|
|
192
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
183
193
|
var _ref4 = selectionAnalyticsPayload.attributes,
|
|
184
194
|
selectedCells = _ref4.selectedCells;
|
|
185
195
|
content.push.apply(content, _toConsumableArray(Array(selectedCells).fill('tableCell')));
|
package/dist/esm/collab/index.js
CHANGED
|
@@ -10,6 +10,8 @@ import { getGlobalTheme } from '@atlaskit/tokens';
|
|
|
10
10
|
|
|
11
11
|
// Format of the document and its metadata returned from the collab provider
|
|
12
12
|
// after editing and for draft sync
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
15
|
|
|
14
16
|
// Provider Errors
|
|
15
17
|
// Emitted errors
|