@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
|
@@ -94,6 +94,8 @@ function setAllSelection(view) {
|
|
|
94
94
|
function setCellSelection(view, anchor, head) {
|
|
95
95
|
var state = view.state,
|
|
96
96
|
dispatch = view.dispatch;
|
|
97
|
+
// Ignored via go/ees005
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
99
|
dispatch(state.tr.setSelection(_cellSelection.CellSelection.create(state.doc, anchor, head)));
|
|
98
100
|
}
|
|
99
101
|
function nonNullable(value) {
|
|
@@ -113,6 +115,9 @@ var isValidPosition = exports.isValidPosition = function isValidPosition(pos, st
|
|
|
113
115
|
var isInLayoutColumn = exports.isInLayoutColumn = function isInLayoutColumn(state) {
|
|
114
116
|
return (0, _utils.hasParentNodeOfType)(state.schema.nodes.layoutSection)(state.selection);
|
|
115
117
|
};
|
|
118
|
+
|
|
119
|
+
// Ignored via go/ees005
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
116
121
|
function filterChildrenBetween(doc, from, to, predicate) {
|
|
117
122
|
var results = [];
|
|
118
123
|
doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
@@ -19,6 +19,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
function sanitizeNodeForPrivacy(json, providerFactory) {
|
|
20
20
|
var mentionNames = new Map();
|
|
21
21
|
var hasCacheableMentions = false;
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
24
|
var sanitizedJSON = (0, _traverse.traverse)(json, {
|
|
23
25
|
mention: function mention(node) {
|
|
24
26
|
if (node.attrs && node.attrs.text) {
|
|
@@ -21,6 +21,8 @@ function getPerformanceOptions(view) {
|
|
|
21
21
|
var fakePluginKey = {
|
|
22
22
|
key: 'analyticsPlugin$',
|
|
23
23
|
getState: function getState(state) {
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
26
|
return state['analyticsPlugin$'];
|
|
25
27
|
}
|
|
26
28
|
};
|
|
@@ -21,9 +21,13 @@ var _slice = require("./slice");
|
|
|
21
21
|
// If changes are made to this file, please make the same update in the linked file.
|
|
22
22
|
|
|
23
23
|
// Regular expression for a windows filepath in the format <DRIVE LETTER>:\<folder name>\
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
24
26
|
var FILEPATH_REGEXP = exports.FILEPATH_REGEXP = /([a-zA-Z]:|\\)([^\/:*?<>"|]+\\)?([^\/:*?<>"| ]+(?=\s?))?/gim;
|
|
25
27
|
|
|
26
28
|
// Don't linkify if starts with $ or {
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
27
31
|
var DONTLINKIFY_REGEXP = exports.DONTLINKIFY_REGEXP = /^(\$|{)/;
|
|
28
32
|
|
|
29
33
|
/**
|
|
@@ -97,6 +101,8 @@ function linkifyContent(schema) {
|
|
|
97
101
|
}
|
|
98
102
|
if (isAllowedInParent && node.isText && !link.isInSet(node.marks)) {
|
|
99
103
|
var linkified = [];
|
|
104
|
+
// Ignored via go/ees005
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
100
106
|
var text = node.text;
|
|
101
107
|
var matches = findLinkMatches(text).filter(_shouldAutoLinkifyTld.shouldAutoLinkifyMatch);
|
|
102
108
|
var pos = 0;
|
|
@@ -124,10 +130,16 @@ function linkifyContent(schema) {
|
|
|
124
130
|
}
|
|
125
131
|
function getLinkDomain(url) {
|
|
126
132
|
// Remove protocol and www., if either exists
|
|
133
|
+
// Ignored via go/ees005
|
|
134
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
127
135
|
var withoutProtocol = url.toLowerCase().replace(/^(.*):\/\//, '');
|
|
136
|
+
// Ignored via go/ees005
|
|
137
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
128
138
|
var withoutWWW = withoutProtocol.replace(/^(www\.)/, '');
|
|
129
139
|
|
|
130
140
|
// Remove port, fragment, path, query string
|
|
141
|
+
// Ignored via go/ees005
|
|
142
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
131
143
|
return withoutWWW.replace(/[:\/?#](.*)$/, '');
|
|
132
144
|
}
|
|
133
145
|
function isFromCurrentDomain(url) {
|
|
@@ -153,10 +165,14 @@ function findLinkMatches(text) {
|
|
|
153
165
|
var findFilepaths = exports.findFilepaths = function findFilepaths(text) {
|
|
154
166
|
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
155
167
|
// Creation of a copy of the RegExp is necessary as lastIndex is stored on it when we run .exec()
|
|
168
|
+
// Ignored via go/ees005
|
|
169
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
156
170
|
var localRegExp = new RegExp(FILEPATH_REGEXP);
|
|
157
171
|
var match;
|
|
158
172
|
var matchesList = [];
|
|
159
173
|
var maxFilepathSize = 260;
|
|
174
|
+
// Ignored via go/ees005
|
|
175
|
+
// eslint-disable-next-line no-cond-assign
|
|
160
176
|
while ((match = localRegExp.exec(text)) !== null) {
|
|
161
177
|
var start = match.index + offset;
|
|
162
178
|
var end = localRegExp.lastIndex + offset;
|
|
@@ -56,6 +56,9 @@ var withImageLoaderOld = exports.withImageLoaderOld = function withImageLoaderOl
|
|
|
56
56
|
value: function componentDidMount() {
|
|
57
57
|
this.fetchImage(this.props);
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
// Ignored via go/ees005
|
|
61
|
+
// eslint-disable-next-line react/no-unsafe
|
|
59
62
|
}, {
|
|
60
63
|
key: "UNSAFE_componentWillReceiveProps",
|
|
61
64
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
@@ -70,7 +73,11 @@ var withImageLoaderOld = exports.withImageLoaderOld = function withImageLoaderOl
|
|
|
70
73
|
key: "componentWillUnmount",
|
|
71
74
|
value: function componentWillUnmount() {
|
|
72
75
|
if (this.img) {
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
73
78
|
this.img.removeEventListener('load', this.onLoad);
|
|
79
|
+
// Ignored via go/ees005
|
|
80
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
74
81
|
this.img.removeEventListener('error', this.onError);
|
|
75
82
|
this.img = null;
|
|
76
83
|
}
|
|
@@ -82,7 +89,11 @@ var withImageLoaderOld = exports.withImageLoaderOld = function withImageLoaderOl
|
|
|
82
89
|
if (url) {
|
|
83
90
|
if (!this.img) {
|
|
84
91
|
this.img = new Image();
|
|
92
|
+
// Ignored via go/ees005
|
|
93
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
85
94
|
this.img.addEventListener('load', this.onLoad);
|
|
95
|
+
// Ignored via go/ees005
|
|
96
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
86
97
|
this.img.addEventListener('error', this.onError);
|
|
87
98
|
}
|
|
88
99
|
this.img.src = url;
|
|
@@ -92,6 +103,8 @@ var withImageLoaderOld = exports.withImageLoaderOld = function withImageLoaderOl
|
|
|
92
103
|
key: "render",
|
|
93
104
|
value: function render() {
|
|
94
105
|
var imageStatus = this.state.imageStatus;
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
95
108
|
return /*#__PURE__*/_react.default.createElement(Wrapped, (0, _extends2.default)({}, this.props, {
|
|
96
109
|
imageStatus: imageStatus
|
|
97
110
|
}));
|
|
@@ -150,7 +163,11 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
150
163
|
key: "componentWillUnmount",
|
|
151
164
|
value: function componentWillUnmount() {
|
|
152
165
|
if (this.img) {
|
|
166
|
+
// Ignored via go/ees005
|
|
167
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
153
168
|
this.img.removeEventListener('load', this.onLoad);
|
|
169
|
+
// Ignored via go/ees005
|
|
170
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
154
171
|
this.img.removeEventListener('error', this.onError);
|
|
155
172
|
this.img = null;
|
|
156
173
|
}
|
|
@@ -162,7 +179,11 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
162
179
|
if (url) {
|
|
163
180
|
if (!this.img) {
|
|
164
181
|
this.img = new Image();
|
|
182
|
+
// Ignored via go/ees005
|
|
183
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
165
184
|
this.img.addEventListener('load', this.onLoad);
|
|
185
|
+
// Ignored via go/ees005
|
|
186
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
166
187
|
this.img.addEventListener('error', this.onError);
|
|
167
188
|
}
|
|
168
189
|
this.img.src = url;
|
|
@@ -172,6 +193,8 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
172
193
|
key: "render",
|
|
173
194
|
value: function render() {
|
|
174
195
|
var imageStatus = this.state.imageStatus;
|
|
196
|
+
// Ignored via go/ees005
|
|
197
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
175
198
|
return /*#__PURE__*/_react.default.createElement(Wrapped, (0, _extends2.default)({}, this.props, {
|
|
176
199
|
imageStatus: imageStatus
|
|
177
200
|
}));
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -1269,6 +1269,8 @@ var pmHistoryPluginKey = exports.pmHistoryPluginKey = 'history$';
|
|
|
1269
1269
|
* Private API - do not use.
|
|
1270
1270
|
*/
|
|
1271
1271
|
|
|
1272
|
+
// Ignored via go/ees005
|
|
1273
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1272
1274
|
function shallowEqual() {
|
|
1273
1275
|
var obj1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1274
1276
|
var obj2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -1318,6 +1320,8 @@ var insideTableCell = exports.insideTableCell = function insideTableCell(state)
|
|
|
1318
1320
|
/**
|
|
1319
1321
|
* Traverse the document until an "ancestor" is found. Any nestable block can be an ancestor.
|
|
1320
1322
|
*/
|
|
1323
|
+
// Ignored via go/ees005
|
|
1324
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1321
1325
|
function findAncestorPosition(doc, pos) {
|
|
1322
1326
|
var nestableBlocks = ['blockquote', 'bulletList', 'orderedList'];
|
|
1323
1327
|
if (pos.depth === 1) {
|
|
@@ -1379,12 +1383,18 @@ var isEmptyNode = exports.isEmptyNode = function isEmptyNode(schema) {
|
|
|
1379
1383
|
case blockquote:
|
|
1380
1384
|
case panel:
|
|
1381
1385
|
case listItem:
|
|
1386
|
+
// Ignored via go/ees005
|
|
1387
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1382
1388
|
return node.content.size === 2 && innerIsEmptyNode(node.content.firstChild);
|
|
1383
1389
|
case bulletList:
|
|
1384
1390
|
case orderedList:
|
|
1391
|
+
// Ignored via go/ees005
|
|
1392
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1385
1393
|
return node.content.size === 4 && innerIsEmptyNode(node.content.firstChild);
|
|
1386
1394
|
case taskList:
|
|
1387
1395
|
case decisionList:
|
|
1396
|
+
// Ignored via go/ees005
|
|
1397
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1388
1398
|
return node.content.size === 2 && innerIsEmptyNode(node.content.firstChild);
|
|
1389
1399
|
case doc:
|
|
1390
1400
|
var isEmpty = true;
|
|
@@ -34,7 +34,10 @@ var createWrappingJoinRule = exports.createWrappingJoinRule = function createWra
|
|
|
34
34
|
nodeType = _ref.nodeType,
|
|
35
35
|
getAttrs = _ref.getAttrs,
|
|
36
36
|
joinPredicate = _ref.joinPredicate;
|
|
37
|
-
var handler = function handler(state, match, start, end
|
|
37
|
+
var handler = function handler(state, match, start, end
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
40
|
+
) {
|
|
38
41
|
var attrs = (getAttrs instanceof Function ? getAttrs(match) : getAttrs) || {};
|
|
39
42
|
var tr = state.tr;
|
|
40
43
|
var fixedStart = Math.max(start, 1);
|
package/dist/cjs/utils/macro.js
CHANGED
|
@@ -13,6 +13,8 @@ var getExtensionLozengeData = exports.getExtensionLozengeData = function getExte
|
|
|
13
13
|
var macroMetadata = node.attrs.parameters.macroMetadata;
|
|
14
14
|
if (macroMetadata && macroMetadata.placeholder) {
|
|
15
15
|
var placeholderData;
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
18
|
macroMetadata.placeholder.forEach(function (placeholder) {
|
|
17
19
|
if (placeholder.type === type && placeholder.data && placeholder.data.url) {
|
|
18
20
|
placeholderData = placeholder.data;
|
package/dist/cjs/utils/nodes.js
CHANGED
|
@@ -18,6 +18,8 @@ var findChangedNodesFromTransaction = exports.findChangedNodesFromTransaction =
|
|
|
18
18
|
var nodes = [];
|
|
19
19
|
var steps = tr.steps || [];
|
|
20
20
|
steps.forEach(function (step) {
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
21
23
|
step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
22
24
|
tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
|
|
23
25
|
if (!nodes.find(function (n) {
|
|
@@ -67,7 +69,10 @@ var SelectedState = exports.SelectedState = /*#__PURE__*/function (SelectedState
|
|
|
67
69
|
* If the node is selected then an enum is returned that describes weather the node
|
|
68
70
|
* is fully selected by a range or if the "inside" of the node has been selected or clicked.
|
|
69
71
|
*/
|
|
70
|
-
var isNodeSelectedOrInRange = exports.isNodeSelectedOrInRange = function isNodeSelectedOrInRange(anchorPosition, headPosition, nodePosition, nodeSize
|
|
72
|
+
var isNodeSelectedOrInRange = exports.isNodeSelectedOrInRange = function isNodeSelectedOrInRange(anchorPosition, headPosition, nodePosition, nodeSize
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
75
|
+
) {
|
|
71
76
|
if (typeof nodePosition !== 'number') {
|
|
72
77
|
return null;
|
|
73
78
|
}
|
|
@@ -6,23 +6,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isOutdatedBrowser = void 0;
|
|
7
7
|
var isOutdatedBrowser = exports.isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
|
|
8
8
|
// Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
9
13
|
var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
10
16
|
var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
|
|
11
17
|
if (chromeVersion >= 84) {
|
|
12
18
|
return false;
|
|
13
19
|
}
|
|
20
|
+
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
14
23
|
var gecko = /gecko\/\d/i.test(userAgent);
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
15
26
|
var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
|
|
16
27
|
if (geckoVersion >= 84) {
|
|
17
28
|
return false;
|
|
18
29
|
}
|
|
30
|
+
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
19
33
|
var edge = /Edge\/(\d+)/.exec(userAgent);
|
|
20
34
|
var edgeVersion = edge ? +edge[1] : 0;
|
|
21
35
|
if (edgeVersion >= 84) {
|
|
22
36
|
return false;
|
|
23
37
|
}
|
|
38
|
+
|
|
39
|
+
// Ignored via go/ees005
|
|
40
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
24
41
|
var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
|
|
25
|
-
var safariVersion = safari ?
|
|
42
|
+
var safariVersion = safari ?
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
45
|
+
parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
|
|
26
46
|
if (safariVersion >= 12) {
|
|
27
47
|
return false;
|
|
28
48
|
}
|
|
@@ -9,7 +9,10 @@ exports.isPerformanceObserverLongTaskAvailable = isPerformanceObserverLongTaskAv
|
|
|
9
9
|
var hasRequiredPerformanceAPIs;
|
|
10
10
|
function isPerformanceAPIAvailable() {
|
|
11
11
|
if (hasRequiredPerformanceAPIs === undefined) {
|
|
12
|
-
hasRequiredPerformanceAPIs = typeof window !== 'undefined' && 'performance' in window && ['measure', 'clearMeasures', 'clearMarks', 'getEntriesByName', 'getEntriesByType', 'now'
|
|
12
|
+
hasRequiredPerformanceAPIs = typeof window !== 'undefined' && 'performance' in window && ['measure', 'clearMeasures', 'clearMarks', 'getEntriesByName', 'getEntriesByType', 'now'
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
].every(function (api) {
|
|
13
16
|
return !!performance[api];
|
|
14
17
|
});
|
|
15
18
|
}
|
|
@@ -33,6 +33,9 @@ var getDistortedDurationMonitor = exports.getDistortedDurationMonitor = function
|
|
|
33
33
|
distortedDuration = true;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
36
39
|
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
37
40
|
return {
|
|
38
41
|
distortedDuration: distortedDuration,
|
|
@@ -40,6 +43,8 @@ var getDistortedDurationMonitor = exports.getDistortedDurationMonitor = function
|
|
|
40
43
|
* Cleans up the document visibility event listener
|
|
41
44
|
*/
|
|
42
45
|
cleanup: function cleanup() {
|
|
46
|
+
// Ignored via go/ees005
|
|
47
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
43
48
|
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
44
49
|
}
|
|
45
50
|
};
|
|
@@ -9,6 +9,8 @@ exports.measureTTI = measureTTI;
|
|
|
9
9
|
var _analytics = require("../analytics");
|
|
10
10
|
var _isPerformanceApiAvailable = require("./is-performance-api-available");
|
|
11
11
|
var _measureRender = require("./measure-render");
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
12
14
|
function measureTTI(onMeasureComplete) {
|
|
13
15
|
var idleThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
|
|
14
16
|
var cancelAfter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
|
|
@@ -74,6 +76,9 @@ var TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = exports.TTI_FROM_INVOCATIO
|
|
|
74
76
|
NORMAL: 5000,
|
|
75
77
|
DEGRADED: 8000
|
|
76
78
|
};
|
|
79
|
+
|
|
80
|
+
// Ignored via go/ees005
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
77
82
|
function getTTISeverity(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
|
|
78
83
|
var ttiNormalThreshold = ttiSeverityNormalThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
|
|
79
84
|
var ttiDegradedThreshold = ttiSeverityDegradedThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.DEGRADED;
|
|
@@ -51,6 +51,8 @@ exports.pluginFactory = pluginFactory;
|
|
|
51
51
|
*
|
|
52
52
|
*/
|
|
53
53
|
|
|
54
|
+
// Ignored via go/ees005
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
56
|
function isFunction(x) {
|
|
55
57
|
return typeof x === 'function';
|
|
56
58
|
}
|
|
@@ -65,6 +67,8 @@ function pluginFactory(pluginKey, reducer) {
|
|
|
65
67
|
init: function init(_, state) {
|
|
66
68
|
return isFunction(initialState) ? initialState(state) : initialState;
|
|
67
69
|
},
|
|
70
|
+
// Ignored via go/ees005
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
68
72
|
apply: function apply(tr, _pluginState, _oldEditorState, newEditorState) {
|
|
69
73
|
var oldPluginState = mapping ? mapping(tr, _pluginState, newEditorState) : _pluginState;
|
|
70
74
|
var newPluginState = oldPluginState;
|
|
@@ -73,6 +73,9 @@ function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent)
|
|
|
73
73
|
return _model.Node.fromJSON(schema, node);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
// Ignored via go/ees005
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
76
79
|
function processRawValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
|
|
77
80
|
if (!value) {
|
|
78
81
|
return;
|
|
@@ -242,6 +245,9 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
|
|
|
242
245
|
return;
|
|
243
246
|
}
|
|
244
247
|
}
|
|
248
|
+
|
|
249
|
+
// Ignored via go/ees005
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
245
251
|
function processRawFragmentValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
|
|
246
252
|
if (!value) {
|
|
247
253
|
return;
|
|
@@ -257,7 +263,13 @@ function processRawFragmentValue(schema, value, providerFactory, sanitizePrivate
|
|
|
257
263
|
return _model.Fragment.from(adfEntities);
|
|
258
264
|
}
|
|
259
265
|
function isProseMirrorSchemaCheckError(error) {
|
|
260
|
-
return error instanceof RangeError && (
|
|
266
|
+
return error instanceof RangeError && (
|
|
267
|
+
// Ignored via go/ees005
|
|
268
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
269
|
+
!!error.message.match(/^Invalid collection of marks for node/) ||
|
|
270
|
+
// Ignored via go/ees005
|
|
271
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
272
|
+
!!error.message.match(/^Invalid content for node/));
|
|
261
273
|
}
|
|
262
274
|
var maySanitizePrivateContent = function maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent) {
|
|
263
275
|
if (sanitizePrivateContent && providerFactory) {
|
|
@@ -28,6 +28,8 @@ function autoJoinTr(tr, isJoinable) {
|
|
|
28
28
|
for (var j = 0; j < ranges.length; j++) {
|
|
29
29
|
ranges[j] = map.map(ranges[j]);
|
|
30
30
|
}
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
31
33
|
map.forEach(function (_s, _e, from, to) {
|
|
32
34
|
return ranges.push(from, to);
|
|
33
35
|
});
|
|
@@ -168,6 +168,8 @@ var getIdsToBeDeleted = function getIdsToBeDeleted(selectedIds, allNodes) {
|
|
|
168
168
|
var searchSet = (0, _toConsumableArray2.default)(selectedIds);
|
|
169
169
|
var deletedIds = new Set();
|
|
170
170
|
while (searchSet.length) {
|
|
171
|
+
// Ignored via go/ees005
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
171
173
|
var id = searchSet.pop();
|
|
172
174
|
if (allNodes[id]) {
|
|
173
175
|
var _allNodes$id$targets$, _allNodes$id2;
|
|
@@ -241,6 +243,9 @@ var getChildrenNodeAmount = function getChildrenNodeAmount(id, allNodes) {
|
|
|
241
243
|
}
|
|
242
244
|
return childrenIds.size;
|
|
243
245
|
};
|
|
246
|
+
|
|
247
|
+
// Ignored via go/ees005
|
|
248
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
244
249
|
var getNodeTargetsById = function getNodeTargetsById(id, allNodes) {
|
|
245
250
|
if (!id || !allNodes[id]) {
|
|
246
251
|
return [];
|
|
@@ -32,7 +32,10 @@ var isRichMediaInsideOfBlockNode = exports.isRichMediaInsideOfBlockNode = functi
|
|
|
32
32
|
var alignAttributes = exports.alignAttributes = function alignAttributes(layout, oldAttrs) {
|
|
33
33
|
var gridSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 12;
|
|
34
34
|
var originalWidth = arguments.length > 3 ? arguments[3] : undefined;
|
|
35
|
-
var lineLength
|
|
35
|
+
var lineLength
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
38
|
+
= arguments.length > 4 ? arguments[4] : undefined;
|
|
36
39
|
var width = oldAttrs.width;
|
|
37
40
|
var oldLayout = oldAttrs.layout;
|
|
38
41
|
var oldLayoutIsNonWrapped = nonWrappedLayouts.indexOf(oldLayout) > -1;
|
|
@@ -51,10 +51,15 @@ var tldsToNotAutoLinkify = ['name', 'zip', 'doc', 'mov',
|
|
|
51
51
|
* @param url Link that hasn't been already prefixed with http://, https:// or www.
|
|
52
52
|
*/
|
|
53
53
|
function shouldAutoLinkifyTld(url) {
|
|
54
|
+
// Ignored via go/ees005
|
|
55
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
54
56
|
var startsWithHttpHttps = /^https?:\/\//.test(url);
|
|
55
57
|
if (startsWithHttpHttps) {
|
|
56
58
|
return true;
|
|
57
59
|
}
|
|
60
|
+
|
|
61
|
+
// Ignored via go/ees005
|
|
62
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
58
63
|
var startsWithWWW = /^www\./.test(url);
|
|
59
64
|
if (startsWithWWW) {
|
|
60
65
|
return true;
|
|
@@ -7,6 +7,8 @@ exports.shouldForceTracking = void 0;
|
|
|
7
7
|
// START: temporary code https://product-fabric.atlassian.net/browse/ED-10260
|
|
8
8
|
var shouldForceTracking = exports.shouldForceTracking = function shouldForceTracking() {
|
|
9
9
|
try {
|
|
10
|
+
// Ignored via go/ees005
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
12
|
var _ref = window.__buildInfo || {},
|
|
11
13
|
_ref$FRONTEND_VERSION = _ref.FRONTEND_VERSION,
|
|
12
14
|
FRONTEND_VERSION = _ref$FRONTEND_VERSION === void 0 ? '' : _ref$FRONTEND_VERSION;
|
package/dist/cjs/utils/slice.js
CHANGED
|
@@ -15,6 +15,8 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
15
15
|
* A helper to get the underlying array of a fragment.
|
|
16
16
|
*/
|
|
17
17
|
function getFragmentBackingArray(fragment) {
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
20
|
return fragment.content;
|
|
19
21
|
}
|
|
20
22
|
function mapFragment(content, callback) {
|
|
@@ -15,8 +15,13 @@ function concatAncestorHierarchy(node, ancestoryHierarchy) {
|
|
|
15
15
|
// Space concatenator used to reduce analytics payload size
|
|
16
16
|
return ancestoryHierarchy ? "".concat(ancestoryHierarchy, " ").concat(name) : name;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
21
|
var sanitizeMarks = function sanitizeMarks() {
|
|
19
22
|
var marks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
25
|
var sanitizedMarks = [];
|
|
21
26
|
marks.forEach(function (mark) {
|
|
22
27
|
if (mark.attrs) {
|
|
@@ -32,6 +37,8 @@ var sanitizeMarks = function sanitizeMarks() {
|
|
|
32
37
|
};
|
|
33
38
|
var sanitizeAttributes = function sanitizeAttributes() {
|
|
34
39
|
var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
42
|
var sanitizedAttrs = Object.assign({}, attrs);
|
|
36
43
|
Object.keys(attrs).filter(function (key) {
|
|
37
44
|
return !whitelistedAttributes.includes(key);
|
|
@@ -40,7 +47,10 @@ var sanitizeAttributes = function sanitizeAttributes() {
|
|
|
40
47
|
});
|
|
41
48
|
return sanitizedAttrs;
|
|
42
49
|
};
|
|
43
|
-
var trackUnsupportedContentTooltipActionFor = function trackUnsupportedContentTooltipActionFor(action, dispatchAnalyticsEvent, unsupportedContentType, originalNodeType
|
|
50
|
+
var trackUnsupportedContentTooltipActionFor = function trackUnsupportedContentTooltipActionFor(action, dispatchAnalyticsEvent, unsupportedContentType, originalNodeType
|
|
51
|
+
// Ignored via go/ees005
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
53
|
+
) {
|
|
44
54
|
dispatchAnalyticsEvent({
|
|
45
55
|
action: action,
|
|
46
56
|
actionSubjectId: unsupportedContentType,
|
|
@@ -116,7 +126,10 @@ var findAndTrackUnsupportedContentNodes = exports.findAndTrackUnsupportedContent
|
|
|
116
126
|
});
|
|
117
127
|
}
|
|
118
128
|
};
|
|
119
|
-
var fireUnsupportedEvent = exports.fireUnsupportedEvent = function fireUnsupportedEvent(dispatchAnalyticsEvent, actionSubjectId, unsupportedNode, errorCode
|
|
129
|
+
var fireUnsupportedEvent = exports.fireUnsupportedEvent = function fireUnsupportedEvent(dispatchAnalyticsEvent, actionSubjectId, unsupportedNode, errorCode
|
|
130
|
+
// Ignored via go/ees005
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
132
|
+
) {
|
|
120
133
|
var sanitizedAttrs = sanitizeAttributes(unsupportedNode.attrs);
|
|
121
134
|
var sanitizedMarks = sanitizeMarks(unsupportedNode.marks);
|
|
122
135
|
var sanitizedUnsupportedNode = {
|
|
@@ -8,9 +8,15 @@ exports.default = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
13
|
var ADFTraversor = /*#__PURE__*/function () {
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
16
|
function ADFTraversor(doc) {
|
|
13
17
|
(0, _classCallCheck2.default)(this, ADFTraversor);
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
20
|
(0, _defineProperty2.default)(this, "subscribers", new Map());
|
|
15
21
|
this.doc = doc;
|
|
16
22
|
}
|
|
@@ -14,7 +14,10 @@ var errorCallbackFor = function errorCallbackFor(marks, validate, dispatchAnalyt
|
|
|
14
14
|
return validationErrorHandler(entity, error, options, marks, validate, dispatchAnalyticsEvent);
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
var validationErrorHandler = exports.validationErrorHandler = function validationErrorHandler(entity, error, options, marks, validate, dispatchAnalyticsEvent
|
|
17
|
+
var validationErrorHandler = exports.validationErrorHandler = function validationErrorHandler(entity, error, options, marks, validate, dispatchAnalyticsEvent
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
20
|
+
) {
|
|
18
21
|
if (entity && entity.type === UNSUPPORTED_NODE_ATTRIBUTE) {
|
|
19
22
|
return entity;
|
|
20
23
|
}
|
|
@@ -71,9 +74,14 @@ var validationErrorHandler = exports.validationErrorHandler = function validatio
|
|
|
71
74
|
}
|
|
72
75
|
return entity;
|
|
73
76
|
};
|
|
77
|
+
|
|
78
|
+
// Ignored via go/ees005
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
74
80
|
function getEntityForInvalidContentLength(error, entity, validate, marks, dispatchAnalyticsEvent) {
|
|
75
81
|
var meta = error.meta;
|
|
76
82
|
if (meta.type === 'maximum') {
|
|
83
|
+
// Ignored via go/ees005
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
77
85
|
entity.content = entity.content.filter(function (x) {
|
|
78
86
|
return !!x;
|
|
79
87
|
}).map(function (child, index) {
|
|
@@ -81,9 +89,13 @@ function getEntityForInvalidContentLength(error, entity, validate, marks, dispat
|
|
|
81
89
|
});
|
|
82
90
|
}
|
|
83
91
|
if (meta.type === 'minimum') {
|
|
92
|
+
// Ignored via go/ees005
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
94
|
if (entity.content.length === 0) {
|
|
85
95
|
return wrapWithUnsupported(entity);
|
|
86
96
|
}
|
|
97
|
+
// Ignored via go/ees005
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
87
99
|
entity.content = entity.content.filter(function (x) {
|
|
88
100
|
return !!x;
|
|
89
101
|
}).map(function (child) {
|
|
@@ -92,15 +92,27 @@ var getValidContent = exports.getValidContent = function getValidContent(content
|
|
|
92
92
|
return getValidNode(node, schema, adfStage);
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
+
|
|
96
|
+
// Ignored via go/ees005
|
|
97
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
95
98
|
var TEXT_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
|
|
99
|
+
// Ignored via go/ees005
|
|
100
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
96
101
|
var RELATIVE_LINK = /^\//;
|
|
102
|
+
// Ignored via go/ees005
|
|
103
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
97
104
|
var ANCHOR_LINK = /^#/;
|
|
98
105
|
var flattenUnknownBlockTree = function flattenUnknownBlockTree(node) {
|
|
99
106
|
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _schemaDefault.defaultSchema;
|
|
100
107
|
var adfStage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'final';
|
|
101
108
|
var output = [];
|
|
102
109
|
var isPrevLeafNode = false;
|
|
110
|
+
|
|
111
|
+
// Ignored via go/ees005
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
103
113
|
for (var i = 0; i < node.content.length; i++) {
|
|
114
|
+
// Ignored via go/ees005
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
104
116
|
var childNode = node.content[i];
|
|
105
117
|
var isLeafNode = !(childNode.content && childNode.content.length);
|
|
106
118
|
if (i > 0) {
|
|
@@ -413,6 +425,8 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
413
425
|
mediaUrl = url;
|
|
414
426
|
}
|
|
415
427
|
if (mediaType === 'external' && !!mediaUrl) {
|
|
428
|
+
// Ignored via go/ees005
|
|
429
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
416
430
|
var mediaAttrs = {
|
|
417
431
|
type: mediaType,
|
|
418
432
|
url: mediaUrl,
|
|
@@ -432,6 +446,8 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
432
446
|
attrs: mediaAttrs
|
|
433
447
|
};
|
|
434
448
|
} else if (_mediaId && mediaType) {
|
|
449
|
+
// Ignored via go/ees005
|
|
450
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
435
451
|
var _mediaAttrs = {
|
|
436
452
|
type: mediaType,
|
|
437
453
|
id: _mediaId,
|
|
@@ -864,6 +880,9 @@ var getValidMark = exports.getValidMark = function getValidMark(mark) {
|
|
|
864
880
|
if (linkHref && linkHref.indexOf(':') === -1 && !RELATIVE_LINK.test(linkHref) && !ANCHOR_LINK.test(linkHref)) {
|
|
865
881
|
linkHref = "http://".concat(linkHref);
|
|
866
882
|
}
|
|
883
|
+
|
|
884
|
+
// Ignored via go/ees005
|
|
885
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
867
886
|
var linkAttrs = {
|
|
868
887
|
href: linkHref
|
|
869
888
|
};
|