@atlaskit/editor-common 97.1.2 → 97.1.3
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 +8 -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-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-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-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 +1 -1
- package/tsconfig.json +0 -1
|
@@ -45,52 +45,60 @@ export var changeImageAlignment = function changeImageAlignment(align) {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
export var createToggleBlockMarkOnRange = function createToggleBlockMarkOnRange(markType, getAttrs, allowedBlocks) {
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return mark.type === markType;
|
|
57
|
-
});
|
|
58
|
-
var prevAttrs = oldMarks.length ? oldMarks[0].attrs : undefined;
|
|
59
|
-
var newAttrs = getAttrs(prevAttrs, node);
|
|
60
|
-
if (newAttrs !== undefined) {
|
|
61
|
-
tr.setNodeMarkup(pos, node.type, node.attrs, node.marks.filter(function (mark) {
|
|
62
|
-
return !markType.excludes(mark.type);
|
|
63
|
-
}).concat(newAttrs === false ? [] : markType.create(newAttrs)));
|
|
64
|
-
markApplied = true;
|
|
48
|
+
return (
|
|
49
|
+
// Ignored via go/ees005
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
51
|
+
function (from, to, tr, state) {
|
|
52
|
+
var markApplied = false;
|
|
53
|
+
state.doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
54
|
+
if (!node.type.isBlock) {
|
|
55
|
+
return false;
|
|
65
56
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
|
|
58
|
+
var oldMarks = node.marks.filter(function (mark) {
|
|
59
|
+
return mark.type === markType;
|
|
60
|
+
});
|
|
61
|
+
var prevAttrs = oldMarks.length ? oldMarks[0].attrs : undefined;
|
|
62
|
+
var newAttrs = getAttrs(prevAttrs, node);
|
|
63
|
+
if (newAttrs !== undefined) {
|
|
64
|
+
tr.setNodeMarkup(pos, node.type, node.attrs, node.marks.filter(function (mark) {
|
|
65
|
+
return !markType.excludes(mark.type);
|
|
66
|
+
}).concat(newAttrs === false ? [] : markType.create(newAttrs)));
|
|
67
|
+
markApplied = true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return;
|
|
71
|
+
});
|
|
72
|
+
return markApplied;
|
|
73
|
+
}
|
|
74
|
+
);
|
|
71
75
|
};
|
|
72
76
|
export var createToggleInlineMarkOnRange = function createToggleInlineMarkOnRange(markType, getAttrs) {
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
return (
|
|
78
|
+
// Ignored via go/ees005
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
80
|
+
function (from, to, tr, state) {
|
|
81
|
+
var markApplied = false;
|
|
82
|
+
state.doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
83
|
+
if (parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
|
|
84
|
+
var oldMarks = node.marks.filter(function (mark) {
|
|
85
|
+
return mark.type === markType;
|
|
86
|
+
});
|
|
87
|
+
var prevAttrs = oldMarks.length ? oldMarks[0].attrs : undefined;
|
|
88
|
+
var newAttrs = getAttrs(prevAttrs, node);
|
|
89
|
+
if (newAttrs !== undefined) {
|
|
90
|
+
tr.setNodeMarkup(pos, node.type, node.attrs, node.marks.filter(function (mark) {
|
|
91
|
+
return !markType.excludes(mark.type);
|
|
92
|
+
}).concat(newAttrs === false ? [] : markType.create(newAttrs)));
|
|
93
|
+
tr.setSelection(NodeSelection.create(tr.doc, state.selection.from));
|
|
94
|
+
markApplied = true;
|
|
95
|
+
}
|
|
88
96
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
return;
|
|
98
|
+
});
|
|
99
|
+
return markApplied;
|
|
100
|
+
}
|
|
101
|
+
);
|
|
94
102
|
};
|
|
95
103
|
|
|
96
104
|
/**
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
-
export var insertBlock = function insertBlock(state, nodeType, start, end, attrs
|
|
3
|
+
export var insertBlock = function insertBlock(state, nodeType, start, end, attrs
|
|
4
|
+
// Ignored via go/ees005
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
6
|
+
) {
|
|
4
7
|
// To ensure that match is done after HardBreak.
|
|
5
8
|
var _state$schema$nodes = state.schema.nodes,
|
|
6
9
|
hardBreak = _state$schema$nodes.hardBreak,
|
|
7
10
|
codeBlock = _state$schema$nodes.codeBlock,
|
|
8
11
|
listItem = _state$schema$nodes.listItem;
|
|
9
12
|
var $pos = state.doc.resolve(start);
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10
15
|
if ($pos.nodeAfter.type !== hardBreak) {
|
|
11
16
|
return null;
|
|
12
17
|
}
|
|
@@ -48,6 +53,9 @@ export var insertBlock = function insertBlock(state, nodeType, start, end, attrs
|
|
|
48
53
|
var newNode = nodeType.create(attrs, content);
|
|
49
54
|
|
|
50
55
|
// Add new node.
|
|
51
|
-
tr = tr.setSelection(new NodeSelection(tr.doc.resolve(start + 1)))
|
|
56
|
+
tr = tr.setSelection(new NodeSelection(tr.doc.resolve(start + 1)))
|
|
57
|
+
// Ignored via go/ees005
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
59
|
+
.replaceSelectionWith(newNode).setSelection(new TextSelection(tr.doc.resolve(start + depth)));
|
|
52
60
|
return tr;
|
|
53
61
|
};
|
|
@@ -71,6 +71,8 @@ function compactStringifier(node) {
|
|
|
71
71
|
var isContentArray = Array.isArray(node.content);
|
|
72
72
|
var marks = function marks(child) {
|
|
73
73
|
if (hasMarks) {
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
74
76
|
return node.marks.reduce(function (str, mark) {
|
|
75
77
|
return "".concat(shortHash(mark, true), "(").concat(str, ")");
|
|
76
78
|
}, child);
|
|
@@ -83,6 +85,8 @@ function compactStringifier(node) {
|
|
|
83
85
|
} else if (isContentEmpty) {
|
|
84
86
|
content = '';
|
|
85
87
|
} else if (isContentArray) {
|
|
88
|
+
// Ignored via go/ees005
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
86
90
|
content = node.content.map(function (node) {
|
|
87
91
|
return compactStringifier(node);
|
|
88
92
|
}).join(',');
|
|
@@ -12,9 +12,14 @@ function AlternativePackagesMessage(_ref) {
|
|
|
12
12
|
}, alternatePackages[0].name), " instead.");
|
|
13
13
|
}
|
|
14
14
|
return /*#__PURE__*/React.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/React.createElement("ul", null, alternatePackages.map(function (p) {
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
return (
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line react/jsx-key
|
|
19
|
+
React.createElement("li", null, /*#__PURE__*/React.createElement("a", {
|
|
20
|
+
href: p.link
|
|
21
|
+
}, p.name))
|
|
22
|
+
);
|
|
18
23
|
})));
|
|
19
24
|
}
|
|
20
25
|
export function createEditorUseOnlyNotice(componentName, alternatePackages) {
|
|
@@ -8,6 +8,8 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React, { PureComponent } from 'react';
|
|
10
10
|
import StatelessElementBrowser from './components/StatelessElementBrowser';
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
11
13
|
var ElementBrowser = /*#__PURE__*/function (_PureComponent) {
|
|
12
14
|
function ElementBrowser() {
|
|
13
15
|
var _this;
|
|
@@ -27,8 +27,14 @@ export var ViewMore = function ViewMore(_ref) {
|
|
|
27
27
|
}, [focus]);
|
|
28
28
|
return jsx(Section, {
|
|
29
29
|
hasSeparator: true
|
|
30
|
-
}, jsx(ButtonItem
|
|
31
|
-
|
|
30
|
+
}, jsx(ButtonItem
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
+
, {
|
|
34
|
+
onClick: item.action
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
+
,
|
|
32
38
|
iconBefore: jsx("div", {
|
|
33
39
|
css: itemBefore
|
|
34
40
|
}, item.icon()),
|
|
@@ -57,6 +57,8 @@ function CategoryList(_ref) {
|
|
|
57
57
|
index: index,
|
|
58
58
|
category: category,
|
|
59
59
|
focus: focusedCategoryIndex === index
|
|
60
|
+
// Ignored via go/ees005
|
|
61
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
60
62
|
}, props, {
|
|
61
63
|
setFocusedCategoryIndex: setFocusedCategoryIndex,
|
|
62
64
|
selectPreviousCategory: selectPreviousCategory,
|
|
@@ -165,6 +165,8 @@ function ElementListOld(_ref) {
|
|
|
165
165
|
selected: selectedItemIndex === index,
|
|
166
166
|
focus: focusedItemIndex === index,
|
|
167
167
|
setFocusedItemIndex: setFocusedItemIndex
|
|
168
|
+
// Ignored via go/ees005
|
|
169
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
168
170
|
}, props))));
|
|
169
171
|
};
|
|
170
172
|
},
|
|
@@ -203,6 +205,8 @@ function ElementListOld(_ref) {
|
|
|
203
205
|
columnCount: columnCount,
|
|
204
206
|
columnWidth: columnWidth,
|
|
205
207
|
deferredMeasurementCache: cache
|
|
208
|
+
// Ignored via go/ees005
|
|
209
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
206
210
|
}, selectedItemIndex !== undefined && {
|
|
207
211
|
scrollToRow: Math.floor(selectedItemIndex / columnCount)
|
|
208
212
|
}));
|
|
@@ -394,6 +398,8 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
|
|
|
394
398
|
overscanRowCount: 3,
|
|
395
399
|
containerRole: "presentation",
|
|
396
400
|
role: "listbox"
|
|
401
|
+
// Ignored via go/ees005
|
|
402
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
397
403
|
}, selectedItemIndex !== undefined && {
|
|
398
404
|
scrollToIndex: selectedItemIndex
|
|
399
405
|
}));
|
|
@@ -489,6 +495,8 @@ var ElementListMultipleColumns = function ElementListMultipleColumns(props) {
|
|
|
489
495
|
columnCount: columnCount,
|
|
490
496
|
columnWidth: columnWidth,
|
|
491
497
|
deferredMeasurementCache: cache
|
|
498
|
+
// Ignored via go/ees005
|
|
499
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
492
500
|
}, selectedItemIndex !== undefined && {
|
|
493
501
|
scrollToRow: Math.floor(selectedItemIndex / columnCount)
|
|
494
502
|
}));
|
|
@@ -778,6 +786,8 @@ function ElementList(_ref13) {
|
|
|
778
786
|
searchTerm: searchTerm,
|
|
779
787
|
setFocusedCategoryIndex: setFocusedCategoryIndex,
|
|
780
788
|
setFocusedItemIndex: setFocusedItemIndex
|
|
789
|
+
// Ignored via go/ees005
|
|
790
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
781
791
|
}, props));
|
|
782
792
|
}
|
|
783
793
|
return jsx(ElementListOld, _extends({
|
|
@@ -794,6 +804,8 @@ function ElementList(_ref13) {
|
|
|
794
804
|
searchTerm: searchTerm,
|
|
795
805
|
setFocusedCategoryIndex: setFocusedCategoryIndex,
|
|
796
806
|
setFocusedItemIndex: setFocusedItemIndex
|
|
807
|
+
// Ignored via go/ees005
|
|
808
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
797
809
|
}, props));
|
|
798
810
|
}
|
|
799
811
|
var MemoizedElementListWithAnalytics = /*#__PURE__*/memo(withAnalyticsContext({
|
|
@@ -223,7 +223,10 @@ function StatelessElementBrowser(props) {
|
|
|
223
223
|
css: wrapper,
|
|
224
224
|
"data-testid": "element-browser",
|
|
225
225
|
id: ELEMENT_BROWSER_ID
|
|
226
|
-
}, jsx(ContainerWidthMonitor, null), containerWidth < DEVICE_BREAKPOINT_NUMBERS.medium ? jsx(MobileBrowser
|
|
226
|
+
}, jsx(ContainerWidthMonitor, null), containerWidth < DEVICE_BREAKPOINT_NUMBERS.medium ? jsx(MobileBrowser
|
|
227
|
+
// Ignored via go/ees005
|
|
228
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
229
|
+
, _extends({}, props, {
|
|
227
230
|
selectedItemIndex: selectedItemIndex,
|
|
228
231
|
focusedItemIndex: focusedItemIndex,
|
|
229
232
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
@@ -238,7 +241,10 @@ function StatelessElementBrowser(props) {
|
|
|
238
241
|
viewMoreItem: viewMoreItem,
|
|
239
242
|
focusOnViewMore: focusOnViewMore,
|
|
240
243
|
cache: cache
|
|
241
|
-
})) : jsx(DesktopBrowser
|
|
244
|
+
})) : jsx(DesktopBrowser
|
|
245
|
+
// Ignored via go/ees005
|
|
246
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
247
|
+
, _extends({}, props, {
|
|
242
248
|
selectedItemIndex: selectedItemIndex,
|
|
243
249
|
focusedItemIndex: focusedItemIndex,
|
|
244
250
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
@@ -120,7 +120,13 @@ var moveReducer = function moveReducer(state, action) {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var newIndex = state.selectedItemIndex ?
|
|
123
|
+
var newIndex = state.selectedItemIndex ?
|
|
124
|
+
// Ignored via go/ees005
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
126
|
+
state.selectedItemIndex + action.payload.positions :
|
|
127
|
+
// Ignored via go/ees005
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
129
|
+
action.payload.positions;
|
|
124
130
|
var safeIndex = ensureSafeIndex(newIndex, state.listSize);
|
|
125
131
|
// down arrow key is pressed or right arrow key is pressed.
|
|
126
132
|
if (state.focusedItemIndex !== undefined && action.payload.positions && action.payload.positions >= 1) {
|
|
@@ -183,7 +189,10 @@ var getInitialState = function getInitialState(listSize, canFocusViewMore) {
|
|
|
183
189
|
};
|
|
184
190
|
|
|
185
191
|
// Get the offset forwards - skip items that are disabled
|
|
186
|
-
var skipForwardOffsetToSafeItem = function skipForwardOffsetToSafeItem(currentIndex, listSize, stepSize, itemIsDisabled
|
|
192
|
+
var skipForwardOffsetToSafeItem = function skipForwardOffsetToSafeItem(currentIndex, listSize, stepSize, itemIsDisabled
|
|
193
|
+
// Ignored via go/ees005
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
195
|
+
) {
|
|
187
196
|
if (currentIndex === undefined) {
|
|
188
197
|
return undefined;
|
|
189
198
|
}
|
|
@@ -214,6 +223,8 @@ var skipBackwardOffsetToSafeItem = function skipBackwardOffsetToSafeItem(current
|
|
|
214
223
|
// Move to search if no available index
|
|
215
224
|
return currentIndex + 1;
|
|
216
225
|
};
|
|
226
|
+
// Ignored via go/ees005
|
|
227
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
217
228
|
function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch) {
|
|
218
229
|
var _useReducer = useReducer(reducer, initialState, getInitialState(listSize, canFocusViewMore)),
|
|
219
230
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
// Ignored via go/ees005
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
|
|
10
|
+
// Ignored via go/ees005
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
12
|
export var EventDispatcher = /*#__PURE__*/function () {
|
|
5
13
|
function EventDispatcher() {
|
|
6
14
|
_classCallCheck(this, EventDispatcher);
|
|
@@ -189,6 +189,8 @@ var Extension = function Extension(props) {
|
|
|
189
189
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
190
190
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
191
191
|
widthState = _useSharedPluginState.widthState;
|
|
192
|
+
// Ignored via go/ees005
|
|
193
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
192
194
|
return jsx(ExtensionWithPluginState, _extends({
|
|
193
195
|
widthState: widthState
|
|
194
196
|
}, props));
|
|
@@ -92,7 +92,10 @@ var i18n = defineMessages({
|
|
|
92
92
|
description: 'Text in tooltip that tells user they can configure the specific macro.'
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
|
-
export var getShouldShowBodiedMacroLabel = function getShouldShowBodiedMacroLabel(isBodiedMacro, isNodeHovered, showLivePagesBodiedMacrosRendererView, showBodiedExtensionRendererView, showUpdatedLivePages1PBodiedExtensionUI
|
|
95
|
+
export var getShouldShowBodiedMacroLabel = function getShouldShowBodiedMacroLabel(isBodiedMacro, isNodeHovered, showLivePagesBodiedMacrosRendererView, showBodiedExtensionRendererView, showUpdatedLivePages1PBodiedExtensionUI
|
|
96
|
+
// Ignored via go/ees005
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
98
|
+
) {
|
|
96
99
|
// Bodied macros show the label by default except for the new live pages 1P bodied macro experience where we only show it on hover
|
|
97
100
|
if (!isBodiedMacro || showUpdatedLivePages1PBodiedExtensionUI) {
|
|
98
101
|
return isNodeHovered;
|
|
@@ -156,7 +159,10 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
156
159
|
},
|
|
157
160
|
"data-testid": "new-lozenge-container"
|
|
158
161
|
}, jsx(Tooltip, {
|
|
159
|
-
content: jsx(FormattedMessage
|
|
162
|
+
content: jsx(FormattedMessage
|
|
163
|
+
// Ignored via go/ees005
|
|
164
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
165
|
+
, _extends({}, i18n.configure, {
|
|
160
166
|
values: {
|
|
161
167
|
macroName: text
|
|
162
168
|
}
|
|
@@ -165,6 +171,8 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
165
171
|
}, function (tooltipProps) {
|
|
166
172
|
return jsx("span", _extends({
|
|
167
173
|
"data-testid": "new-lozenge-button"
|
|
174
|
+
// Ignored via go/ees005
|
|
175
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
168
176
|
}, tooltipProps, {
|
|
169
177
|
css: labelStyles
|
|
170
178
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -19,6 +19,8 @@ import { jsx } from '@emotion/react';
|
|
|
19
19
|
import { getExtensionLozengeData } from '../../../utils';
|
|
20
20
|
import { styledImage } from '../styles';
|
|
21
21
|
import { LozengeComponent } from './LozengeComponent';
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
|
|
22
24
|
var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
23
25
|
function ExtensionLozenge() {
|
|
24
26
|
var _this;
|
|
@@ -31,7 +33,7 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
31
33
|
var extensionKey = _this.props.node.attrs.extensionKey;
|
|
32
34
|
var url = lozengeData.url,
|
|
33
35
|
rest = _objectWithoutProperties(lozengeData, _excluded);
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
36
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
35
37
|
return jsx("img", _extends({
|
|
36
38
|
css: styledImage,
|
|
37
39
|
src: url
|
|
@@ -9,6 +9,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
import React, { Component } from 'react';
|
|
10
10
|
import { ProviderFactory, WithProviders } from '../provider-factory';
|
|
11
11
|
import { ExtensionComponent } from './ExtensionComponent';
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
|
|
12
14
|
export var Extension = /*#__PURE__*/function (_Component) {
|
|
13
15
|
function Extension(props) {
|
|
14
16
|
var _this;
|
|
@@ -59,6 +59,8 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
|
|
|
59
59
|
showBodiedExtensionRendererView: showRendererView
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
|
+
// Ignored via go/ees005
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
64
|
_defineProperty(_this, "setStateFromPromise", function (stateKey, promise) {
|
|
63
65
|
promise && promise.then(function (p) {
|
|
64
66
|
if (!_this.mounted) {
|
|
@@ -180,7 +182,10 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
|
|
|
180
182
|
_inherits(ExtensionComponentOld, _Component);
|
|
181
183
|
return _createClass(ExtensionComponentOld, [{
|
|
182
184
|
key: "UNSAFE_componentWillMount",
|
|
183
|
-
value:
|
|
185
|
+
value:
|
|
186
|
+
// Ignored via go/ees005
|
|
187
|
+
// eslint-disable-next-line react/no-unsafe
|
|
188
|
+
function UNSAFE_componentWillMount() {
|
|
184
189
|
this.mounted = true;
|
|
185
190
|
var _this$props2 = this.props,
|
|
186
191
|
node = _this$props2.node,
|
|
@@ -210,6 +215,9 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
|
|
|
210
215
|
value: function componentWillUnmount() {
|
|
211
216
|
this.mounted = false;
|
|
212
217
|
}
|
|
218
|
+
|
|
219
|
+
// Ignored via go/ees005
|
|
220
|
+
// eslint-disable-next-line react/no-unsafe
|
|
213
221
|
}, {
|
|
214
222
|
key: "UNSAFE_componentWillReceiveProps",
|
|
215
223
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
@@ -339,7 +347,10 @@ export var ExtensionComponentNew = function ExtensionComponentNew(props) {
|
|
|
339
347
|
}
|
|
340
348
|
});
|
|
341
349
|
}, [extensionProviderResolver]);
|
|
342
|
-
return /*#__PURE__*/React.createElement(ExtensionComponentInner
|
|
350
|
+
return /*#__PURE__*/React.createElement(ExtensionComponentInner
|
|
351
|
+
// Ignored via go/ees005
|
|
352
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
353
|
+
, _extends({}, restProps, {
|
|
343
354
|
extensionProvider: extensionProvider,
|
|
344
355
|
node: node,
|
|
345
356
|
showLivePagesBodiedMacrosRendererView: showLivePagesBodiedMacrosRendererView,
|
|
@@ -580,7 +591,11 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
|
|
|
580
591
|
}(Component);
|
|
581
592
|
export var ExtensionComponent = function ExtensionComponent(props) {
|
|
582
593
|
if (fg('platform_editor_react18_extension_component_v2')) {
|
|
594
|
+
// Ignored via go/ees005
|
|
595
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
583
596
|
return /*#__PURE__*/React.createElement(ExtensionComponentNew, props);
|
|
584
597
|
}
|
|
598
|
+
// Ignored via go/ees005
|
|
599
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
585
600
|
return /*#__PURE__*/React.createElement(ExtensionComponentOld, props);
|
|
586
601
|
};
|
|
@@ -53,6 +53,8 @@ var getWrapperTitleContent = function getWrapperTitleContent(imageData, title, s
|
|
|
53
53
|
}, jsx("img", _extends({
|
|
54
54
|
css: imageStyles,
|
|
55
55
|
src: url
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
56
58
|
}, rest, {
|
|
57
59
|
alt: title
|
|
58
60
|
})), title)
|
|
@@ -211,6 +213,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
211
213
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
212
214
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
213
215
|
widthState = _useSharedPluginState.widthState;
|
|
216
|
+
// Ignored via go/ees005
|
|
217
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
214
218
|
return jsx(MultiBodiedExtensionWithWidth, _extends({
|
|
215
219
|
widthState: widthState
|
|
216
220
|
}, props));
|
|
@@ -73,6 +73,9 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
73
73
|
}
|
|
74
74
|
}]);
|
|
75
75
|
}(ReactNodeView);
|
|
76
|
+
|
|
77
|
+
// Ignored via go/ees005
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
76
79
|
export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, rendererExtensionHandlers) {
|
|
77
80
|
return function (node, view, getPos) {
|
|
78
81
|
return new ExtensionNode(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
// Ignored via go/ees005
|
|
4
|
+
// eslint-disable-next-line require-await
|
|
3
5
|
function getExtensionModuleField(_x, _x2, _x3) {
|
|
4
6
|
return _getExtensionModuleField.apply(this, arguments);
|
|
5
7
|
}
|
|
@@ -28,7 +30,8 @@ function _getExtensionModuleField() {
|
|
|
28
30
|
}
|
|
29
31
|
throw new Error("No definition for field type \"".concat(fieldType, "\" on manifest for extension with type \"").concat(manifest.type, "\" and key \"").concat(manifest.key, "\""));
|
|
30
32
|
case 6:
|
|
31
|
-
type = handlerLink.type;
|
|
33
|
+
type = handlerLink.type; // Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
32
35
|
handler = manifest.modules.fields[fieldType][type];
|
|
33
36
|
if (handler) {
|
|
34
37
|
_context.next = 10;
|
|
@@ -66,8 +66,12 @@ function _getExtensionModuleNodePrivateProps() {
|
|
|
66
66
|
return _context2.abrupt("return", Object.keys(moduleNode).filter(function (key) {
|
|
67
67
|
return key.startsWith('__');
|
|
68
68
|
}).reduce(function (acc, key) {
|
|
69
|
+
// Ignored via go/ees005
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
71
|
acc[key] = moduleNode[key];
|
|
70
72
|
return acc;
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
71
75
|
}, {}));
|
|
72
76
|
case 4:
|
|
73
77
|
case "end":
|
|
@@ -9,10 +9,14 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
9
9
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10
10
|
import { buildAction } from './manifest-helpers';
|
|
11
11
|
export var groupBy = function groupBy(arr, attr, keyRenamer) {
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
return (
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
arr.reduce(function (acc, item) {
|
|
16
|
+
acc[keyRenamer(item[attr])] = item;
|
|
17
|
+
return acc;
|
|
18
|
+
}, {})
|
|
19
|
+
);
|
|
16
20
|
};
|
|
17
21
|
export function buildMenuItem(manifest, extensionModule) {
|
|
18
22
|
var title = extensionModule.title || manifest.title;
|
|
@@ -58,7 +62,10 @@ function _getAutoConvertPatternsFromModule() {
|
|
|
58
62
|
while (1) switch (_context2.prev = _context2.next) {
|
|
59
63
|
case 0:
|
|
60
64
|
_context2.next = 2;
|
|
61
|
-
return Promise.all(
|
|
65
|
+
return Promise.all(
|
|
66
|
+
// Ignored via go/ees005
|
|
67
|
+
// eslint-disable-next-line require-await
|
|
68
|
+
extensions.map( /*#__PURE__*/function () {
|
|
62
69
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(manifest) {
|
|
63
70
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
64
71
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -113,6 +120,9 @@ export var createAutoConverterRunner = function createAutoConverterRunner(autoCo
|
|
|
113
120
|
export function getExtensionAutoConvertersFromProvider(_x2) {
|
|
114
121
|
return _getExtensionAutoConvertersFromProvider.apply(this, arguments);
|
|
115
122
|
}
|
|
123
|
+
|
|
124
|
+
// Ignored via go/ees005
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
116
126
|
function _getExtensionAutoConvertersFromProvider() {
|
|
117
127
|
_getExtensionAutoConvertersFromProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(extensionProviderPromise) {
|
|
118
128
|
var extensionProvider, extensionAutoConverters;
|
|
@@ -9,12 +9,17 @@ export var isFieldset = function isFieldset(field) {
|
|
|
9
9
|
export var isTabGroup = function isTabGroup(field) {
|
|
10
10
|
return field.type === 'tab-group';
|
|
11
11
|
};
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
14
|
export var isTabField = function isTabField(field) {
|
|
13
15
|
return 'type' in field && field.type === 'tab';
|
|
14
16
|
};
|
|
15
17
|
export var isExpand = function isExpand(field) {
|
|
16
18
|
return field.type === 'expand';
|
|
17
19
|
};
|
|
20
|
+
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
23
|
export var isDateRange = function isDateRange(value) {
|
|
19
24
|
return value && value.hasOwnProperty('type') && value.type === 'date-range';
|
|
20
25
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Ignored via go/ees005
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1
3
|
function makeSameType(_a, _b) {
|
|
2
4
|
return true;
|
|
3
5
|
}
|
|
@@ -19,12 +21,18 @@ export var shallowEqual = function shallowEqual(objA, objB) {
|
|
|
19
21
|
if (!bHasOwnProperty(key)) {
|
|
20
22
|
return false;
|
|
21
23
|
}
|
|
24
|
+
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
27
|
if (objA[key] !== objB[key]) {
|
|
23
28
|
return false;
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
return true;
|
|
27
32
|
};
|
|
33
|
+
|
|
34
|
+
// Ignored via go/ees005
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
36
|
export var compareArrays = function compareArrays(left, right) {
|
|
29
37
|
var compareFn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : shallowEqual;
|
|
30
38
|
if (left.length !== right.length) {
|
|
@@ -42,7 +50,12 @@ var compareItemWithKeys = function compareItemWithKeys(leftItem, rightItem) {
|
|
|
42
50
|
return Object.keys(leftItem).filter(function (key) {
|
|
43
51
|
return excludedKeys.indexOf(key) === -1;
|
|
44
52
|
}).every(function (key) {
|
|
45
|
-
return leftItem[key] instanceof Object ?
|
|
53
|
+
return leftItem[key] instanceof Object ?
|
|
54
|
+
// Ignored via go/ees005
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
58
|
+
shallowEqual(leftItem[key], rightItem[key]) : leftItem[key] === rightItem[key];
|
|
46
59
|
});
|
|
47
60
|
};
|
|
48
61
|
export var isSameItem = function isSameItem(leftItem, rightItem) {
|
|
@@ -59,7 +72,10 @@ export var isSameItem = function isSameItem(leftItem, rightItem) {
|
|
|
59
72
|
case 'input':
|
|
60
73
|
return compareItemWithKeys(leftItem, rightItem, ['type', 'onSubmit', 'onBlur']);
|
|
61
74
|
case 'select':
|
|
62
|
-
if (makeSameType(leftItem, rightItem) && Array.isArray(leftItem.options) && Array.isArray(rightItem.options) &&
|
|
75
|
+
if (makeSameType(leftItem, rightItem) && Array.isArray(leftItem.options) && Array.isArray(rightItem.options) &&
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
78
|
+
!compareArrays(leftItem.options, rightItem.options, function (left, right) {
|
|
63
79
|
return compareItemWithKeys(left, right);
|
|
64
80
|
})) {
|
|
65
81
|
return false;
|