@atlaskit/editor-core 183.0.12 → 183.1.1
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 +35 -0
- package/dist/cjs/actions/index.js +1 -16
- package/dist/cjs/create-editor/ErrorBoundary.js +19 -8
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +40 -21
- package/dist/cjs/editor-next/editor-internal.js +6 -1
- package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +1 -41
- package/dist/cjs/labs/next/presets/default.js +23 -1
- package/dist/cjs/labs/next/presets/universal.js +9 -18
- package/dist/cjs/plugins/analytics/index.js +0 -24
- package/dist/cjs/plugins/analytics/plugin-key.js +7 -1
- package/dist/cjs/plugins/analytics/plugin.js +17 -45
- package/dist/cjs/plugins/analytics/utils.js +24 -34
- package/dist/cjs/plugins/base/index.js +7 -1
- package/dist/cjs/plugins/base/pm-plugins/decoration.js +8 -0
- package/dist/cjs/plugins/block-type/commands/block-type.js +1 -1
- package/dist/cjs/plugins/caption/index.js +3 -2
- package/dist/cjs/plugins/caption/pm-plugins/main.js +8 -7
- package/dist/cjs/plugins/card/index.js +2 -2
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +103 -70
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +3 -2
- package/dist/cjs/plugins/card/pm-plugins/analytics/events-from-tr.js +36 -20
- package/dist/cjs/plugins/card/pm-plugins/analytics/utils.js +48 -9
- package/dist/cjs/plugins/card/pm-plugins/doc.js +19 -19
- package/dist/cjs/plugins/card/pm-plugins/main.js +5 -3
- package/dist/cjs/plugins/card/pm-plugins/shouldReplaceLink.js +4 -4
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +6 -6
- package/dist/cjs/plugins/card/toolbar.js +86 -68
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +19 -13
- package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +9 -3
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +6 -5
- package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +2 -2
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +1 -2
- package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -3
- package/dist/cjs/plugins/date/index.js +4 -3
- package/dist/cjs/plugins/expand/ui/styles.js +4 -5
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +3 -3
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +5 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +4 -6
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +5 -5
- package/dist/cjs/plugins/grid/index.js +73 -39
- package/dist/cjs/plugins/history/pm-history-types.js +1 -5
- package/dist/cjs/plugins/history/utils.js +2 -2
- package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +4 -2
- package/dist/cjs/plugins/hyperlink/Toolbar.js +4 -3
- package/dist/cjs/plugins/hyperlink/commands.js +14 -14
- package/dist/cjs/plugins/hyperlink/index.js +7 -5
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +5 -5
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +2 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -3
- package/dist/cjs/plugins/insert-block/index.js +1 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +40 -44
- package/dist/cjs/plugins/layout/styles.js +2 -2
- package/dist/cjs/plugins/list/actions/conversions.js +1 -1
- package/dist/cjs/plugins/list/commands/listBackspace.js +5 -5
- package/dist/cjs/plugins/list/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/list/transforms.js +2 -2
- package/dist/cjs/plugins/list/utils/analytics.js +2 -2
- package/dist/cjs/plugins/list/utils/find.js +6 -6
- package/dist/cjs/plugins/list/utils/indentation.js +3 -3
- package/dist/cjs/plugins/list/utils/node.js +32 -23
- package/dist/cjs/plugins/list/utils/selection.js +11 -11
- package/dist/cjs/plugins/macro/actions.js +2 -2
- package/dist/cjs/plugins/media/commands/linking.js +1 -1
- package/dist/cjs/plugins/media/index.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +31 -17
- package/dist/cjs/plugins/media/pm-plugins/alt-text/index.js +2 -2
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +3 -4
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +2 -2
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +4 -4
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +4 -1
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -4
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +13 -4
- package/dist/cjs/plugins/media/utils/media-single.js +10 -57
- package/dist/cjs/plugins/paste/edge-cases/index.js +3 -3
- package/dist/cjs/plugins/paste/edge-cases/lists.js +1 -1
- package/dist/cjs/plugins/paste/handlers.js +16 -10
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +13 -20
- package/dist/cjs/plugins/quick-insert/commands.js +1 -1
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +1 -1
- package/dist/cjs/plugins/selection/commands.js +24 -23
- package/dist/cjs/plugins/selection/utils.js +2 -2
- package/dist/cjs/plugins/status/plugin.js +13 -7
- package/dist/cjs/plugins/status/ui/statusPicker.js +1 -1
- package/dist/cjs/plugins/type-ahead/insert-utils.js +2 -3
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +1 -1
- package/dist/cjs/plugins/width/index.js +12 -0
- package/dist/cjs/ui/Alignment/styles.js +1 -2
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +1 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +16 -9
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +1 -2
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +6 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -4
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +1 -2
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +1 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/cjs/ui/ContentStyles/index.js +2 -2
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +4 -0
- package/dist/cjs/ui/ErrorBoundary/index.js +7 -0
- package/dist/cjs/ui/Resizer/index.js +4 -4
- package/dist/cjs/utils/commands.js +2 -2
- package/dist/cjs/utils/document.js +4 -12
- package/dist/cjs/utils/index.js +1 -14
- package/dist/cjs/utils/selection.js +1 -26
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +1 -16
- package/dist/es2019/create-editor/ErrorBoundary.js +18 -7
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +44 -27
- package/dist/es2019/editor-next/editor-internal.js +6 -1
- package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +1 -39
- package/dist/es2019/labs/next/presets/default.js +27 -1
- package/dist/es2019/labs/next/presets/universal.js +9 -19
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/plugin-key.js +8 -1
- package/dist/es2019/plugins/analytics/plugin.js +15 -38
- package/dist/es2019/plugins/analytics/utils.js +24 -11
- package/dist/es2019/plugins/base/index.js +4 -1
- package/dist/es2019/plugins/base/pm-plugins/decoration.js +9 -0
- package/dist/es2019/plugins/block-type/commands/block-type.js +1 -1
- package/dist/es2019/plugins/caption/index.js +3 -2
- package/dist/es2019/plugins/caption/pm-plugins/main.js +8 -7
- package/dist/es2019/plugins/card/index.js +2 -2
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +105 -70
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +3 -2
- package/dist/es2019/plugins/card/pm-plugins/analytics/events-from-tr.js +33 -16
- package/dist/es2019/plugins/card/pm-plugins/analytics/utils.js +43 -7
- package/dist/es2019/plugins/card/pm-plugins/doc.js +19 -19
- package/dist/es2019/plugins/card/pm-plugins/main.js +7 -3
- package/dist/es2019/plugins/card/pm-plugins/shouldReplaceLink.js +1 -1
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +6 -6
- package/dist/es2019/plugins/card/toolbar.js +51 -30
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +11 -5
- package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +6 -0
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +6 -5
- package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +1 -1
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +1 -1
- package/dist/es2019/plugins/collab-edit/ui/styles.js +3 -4
- package/dist/es2019/plugins/date/index.js +4 -3
- package/dist/es2019/plugins/expand/ui/styles.js +1 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +6 -2
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +3 -5
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +9 -9
- package/dist/es2019/plugins/grid/index.js +76 -39
- package/dist/es2019/plugins/history/pm-history-types.js +1 -2
- package/dist/es2019/plugins/history/utils.js +1 -1
- package/dist/es2019/plugins/hyperlink/HyperlinkToolbarAppearance.js +4 -2
- package/dist/es2019/plugins/hyperlink/Toolbar.js +4 -3
- package/dist/es2019/plugins/hyperlink/commands.js +3 -3
- package/dist/es2019/plugins/hyperlink/index.js +7 -5
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +3 -3
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -2
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/es2019/plugins/insert-block/index.js +1 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +16 -19
- package/dist/es2019/plugins/layout/styles.js +4 -0
- package/dist/es2019/plugins/list/actions/conversions.js +1 -1
- package/dist/es2019/plugins/list/commands/listBackspace.js +1 -1
- package/dist/es2019/plugins/list/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/list/transforms.js +1 -1
- package/dist/es2019/plugins/list/utils/analytics.js +1 -1
- package/dist/es2019/plugins/list/utils/find.js +1 -1
- package/dist/es2019/plugins/list/utils/indentation.js +1 -1
- package/dist/es2019/plugins/list/utils/node.js +2 -12
- package/dist/es2019/plugins/list/utils/selection.js +1 -1
- package/dist/es2019/plugins/macro/actions.js +1 -1
- package/dist/es2019/plugins/media/commands/linking.js +1 -1
- package/dist/es2019/plugins/media/index.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +20 -6
- package/dist/es2019/plugins/media/pm-plugins/alt-text/index.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +1 -1
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +4 -0
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -2
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +15 -3
- package/dist/es2019/plugins/media/utils/media-single.js +5 -53
- package/dist/es2019/plugins/paste/edge-cases/index.js +1 -1
- package/dist/es2019/plugins/paste/edge-cases/lists.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +11 -4
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -3
- package/dist/es2019/plugins/quick-insert/commands.js +1 -1
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +1 -1
- package/dist/es2019/plugins/selection/commands.js +2 -1
- package/dist/es2019/plugins/selection/utils.js +1 -1
- package/dist/es2019/plugins/status/plugin.js +9 -3
- package/dist/es2019/plugins/status/ui/statusPicker.js +2 -2
- package/dist/es2019/plugins/type-ahead/insert-utils.js +1 -2
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +2 -2
- package/dist/es2019/plugins/width/index.js +12 -0
- package/dist/es2019/ui/Alignment/styles.js +1 -2
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +3 -4
- package/dist/es2019/ui/ColorPickerButton/index.js +18 -9
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +7 -3
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +5 -6
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -3
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +1 -2
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/es2019/ui/ContentStyles/index.js +2 -1
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +2 -2
- package/dist/es2019/ui/ElementBrowser/constants.js +3 -0
- package/dist/es2019/ui/ErrorBoundary/index.js +7 -0
- package/dist/es2019/ui/Resizer/index.js +4 -4
- package/dist/es2019/utils/commands.js +1 -1
- package/dist/es2019/utils/document.js +1 -8
- package/dist/es2019/utils/index.js +2 -2
- package/dist/es2019/utils/selection.js +0 -22
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +1 -16
- package/dist/esm/create-editor/ErrorBoundary.js +19 -8
- package/dist/esm/create-editor/ReactEditorViewInternal.js +40 -21
- package/dist/esm/editor-next/editor-internal.js +6 -1
- package/dist/esm/labs/next/presets/create-stub-internal-apis.js +1 -41
- package/dist/esm/labs/next/presets/default.js +23 -1
- package/dist/esm/labs/next/presets/universal.js +9 -18
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/plugin-key.js +8 -1
- package/dist/esm/plugins/analytics/plugin.js +17 -45
- package/dist/esm/plugins/analytics/utils.js +24 -11
- package/dist/esm/plugins/base/index.js +4 -1
- package/dist/esm/plugins/base/pm-plugins/decoration.js +9 -0
- package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
- package/dist/esm/plugins/caption/index.js +3 -2
- package/dist/esm/plugins/caption/pm-plugins/main.js +8 -7
- package/dist/esm/plugins/card/index.js +2 -2
- package/dist/esm/plugins/card/nodeviews/embedCard.js +103 -70
- package/dist/esm/plugins/card/nodeviews/genericCard.js +3 -2
- package/dist/esm/plugins/card/pm-plugins/analytics/events-from-tr.js +36 -20
- package/dist/esm/plugins/card/pm-plugins/analytics/utils.js +43 -7
- package/dist/esm/plugins/card/pm-plugins/doc.js +19 -19
- package/dist/esm/plugins/card/pm-plugins/main.js +5 -3
- package/dist/esm/plugins/card/pm-plugins/shouldReplaceLink.js +1 -1
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +6 -6
- package/dist/esm/plugins/card/toolbar.js +86 -68
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +19 -13
- package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +9 -3
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +6 -5
- package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +1 -1
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +1 -1
- package/dist/esm/plugins/collab-edit/ui/styles.js +2 -3
- package/dist/esm/plugins/date/index.js +4 -3
- package/dist/esm/plugins/expand/ui/styles.js +2 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +5 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +2 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -5
- package/dist/esm/plugins/grid/index.js +72 -36
- package/dist/esm/plugins/history/pm-history-types.js +1 -2
- package/dist/esm/plugins/history/utils.js +1 -1
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +4 -2
- package/dist/esm/plugins/hyperlink/Toolbar.js +4 -3
- package/dist/esm/plugins/hyperlink/commands.js +3 -3
- package/dist/esm/plugins/hyperlink/index.js +7 -5
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +3 -3
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -2
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/esm/plugins/insert-block/index.js +1 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +40 -44
- package/dist/esm/plugins/layout/styles.js +3 -1
- package/dist/esm/plugins/list/actions/conversions.js +1 -1
- package/dist/esm/plugins/list/commands/listBackspace.js +1 -1
- package/dist/esm/plugins/list/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/list/transforms.js +1 -1
- package/dist/esm/plugins/list/utils/analytics.js +1 -1
- package/dist/esm/plugins/list/utils/find.js +1 -1
- package/dist/esm/plugins/list/utils/indentation.js +1 -1
- package/dist/esm/plugins/list/utils/node.js +2 -12
- package/dist/esm/plugins/list/utils/selection.js +1 -1
- package/dist/esm/plugins/macro/actions.js +1 -1
- package/dist/esm/plugins/media/commands/linking.js +1 -1
- package/dist/esm/plugins/media/index.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +31 -17
- package/dist/esm/plugins/media/pm-plugins/alt-text/index.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +1 -1
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +4 -0
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -2
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +13 -3
- package/dist/esm/plugins/media/utils/media-single.js +5 -51
- package/dist/esm/plugins/paste/edge-cases/index.js +1 -1
- package/dist/esm/plugins/paste/edge-cases/lists.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +11 -4
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +2 -3
- package/dist/esm/plugins/quick-insert/commands.js +1 -1
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +1 -1
- package/dist/esm/plugins/selection/commands.js +2 -1
- package/dist/esm/plugins/selection/utils.js +1 -1
- package/dist/esm/plugins/status/plugin.js +9 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
- package/dist/esm/plugins/type-ahead/insert-utils.js +1 -2
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +2 -2
- package/dist/esm/plugins/width/index.js +12 -0
- package/dist/esm/ui/Alignment/styles.js +1 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +1 -2
- package/dist/esm/ui/ColorPickerButton/index.js +16 -9
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +6 -2
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +3 -4
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +1 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +2 -2
- package/dist/esm/ui/ElementBrowser/constants.js +3 -0
- package/dist/esm/ui/ErrorBoundary/index.js +7 -0
- package/dist/esm/ui/Resizer/index.js +4 -4
- package/dist/esm/utils/commands.js +1 -1
- package/dist/esm/utils/document.js +1 -8
- package/dist/esm/utils/index.js +2 -2
- package/dist/esm/utils/selection.js +0 -23
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +2 -0
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +2 -1
- package/dist/types/labs/next/presets/create-stub-internal-apis.d.ts +0 -3
- package/dist/types/labs/next/presets/cxhtml.d.ts +63 -3
- package/dist/types/labs/next/presets/default.d.ts +129 -6
- package/dist/types/labs/next/presets/mobile.d.ts +63 -3
- package/dist/types/plugins/analytics/index.d.ts +1 -1
- package/dist/types/plugins/analytics/plugin-key.d.ts +6 -0
- package/dist/types/plugins/analytics/plugin.d.ts +9 -2
- package/dist/types/plugins/analytics/utils.d.ts +16 -3
- package/dist/types/plugins/base/index.d.ts +4 -0
- package/dist/types/plugins/base/pm-plugins/decoration.d.ts +8 -0
- package/dist/types/plugins/caption/index.d.ts +4 -1
- package/dist/types/plugins/caption/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/card/index.d.ts +11 -1
- package/dist/types/plugins/card/nodeviews/embedCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +3 -0
- package/dist/types/plugins/card/pm-plugins/analytics/types.d.ts +2 -0
- package/dist/types/plugins/card/pm-plugins/analytics/utils.d.ts +8 -2
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +7 -7
- package/dist/types/plugins/card/pm-plugins/main.d.ts +3 -1
- package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
- package/dist/types/plugins/card/toolbar.d.ts +7 -4
- package/dist/types/plugins/card/types.d.ts +1 -0
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +4 -2
- package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +2 -0
- package/dist/types/plugins/date/index.d.ts +3 -2
- package/dist/types/plugins/date/ui/DatePicker/date-picker-input.d.ts +1 -1
- package/dist/types/plugins/date/ui/DatePicker/index.d.ts +1 -1
- package/dist/types/plugins/grid/index.d.ts +14 -7
- package/dist/types/plugins/grid/types.d.ts +3 -2
- package/dist/types/plugins/history/pm-history-types.d.ts +0 -1
- package/dist/types/plugins/hyperlink/HyperlinkToolbarAppearance.d.ts +2 -0
- package/dist/types/plugins/hyperlink/Toolbar.d.ts +2 -1
- package/dist/types/plugins/hyperlink/commands.d.ts +1 -1
- package/dist/types/plugins/hyperlink/index.d.ts +6 -2
- package/dist/types/plugins/insert-block/index.d.ts +6 -4
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -3
- package/dist/types/plugins/list/utils/node.d.ts +2 -6
- package/dist/types/plugins/media/index.d.ts +2 -1
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +4 -1
- package/dist/types/plugins/media/nodeviews/types.d.ts +4 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-single.d.ts +2 -15
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +0 -1
- package/dist/types/plugins/width/index.d.ts +9 -1
- package/dist/types/types/performance-tracking.d.ts +1 -323
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +5 -5
- package/dist/types/ui/ColorPickerButton/index.d.ts +6 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/components/CategoryList.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -1
- package/dist/types/ui/Resizer/types.d.ts +1 -1
- package/dist/types/utils/document.d.ts +0 -4
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/selection.d.ts +1 -2
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +2 -0
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +2 -1
- package/dist/types-ts4.5/labs/next/presets/create-stub-internal-apis.d.ts +0 -3
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +73 -3
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +149 -6
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +73 -3
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/analytics/plugin-key.d.ts +6 -0
- package/dist/types-ts4.5/plugins/analytics/plugin.d.ts +10 -2
- package/dist/types-ts4.5/plugins/analytics/utils.d.ts +16 -3
- package/dist/types-ts4.5/plugins/base/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/base/pm-plugins/decoration.d.ts +8 -0
- package/dist/types-ts4.5/plugins/caption/index.d.ts +6 -1
- package/dist/types-ts4.5/plugins/caption/pm-plugins/main.d.ts +2 -1
- package/dist/types-ts4.5/plugins/card/index.d.ts +9 -1
- package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/nodeviews/genericCard.d.ts +3 -0
- package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/utils.d.ts +8 -2
- package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +7 -7
- package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +3 -1
- package/dist/types-ts4.5/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
- package/dist/types-ts4.5/plugins/card/toolbar.d.ts +7 -4
- package/dist/types-ts4.5/plugins/card/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +4 -2
- package/dist/types-ts4.5/plugins/card/ui/LinkToolbarAppearance.d.ts +2 -0
- package/dist/types-ts4.5/plugins/date/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/date/ui/DatePicker/date-picker-input.d.ts +1 -1
- package/dist/types-ts4.5/plugins/date/ui/DatePicker/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/grid/index.d.ts +16 -7
- package/dist/types-ts4.5/plugins/grid/types.d.ts +3 -2
- package/dist/types-ts4.5/plugins/history/pm-history-types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/hyperlink/HyperlinkToolbarAppearance.d.ts +2 -0
- package/dist/types-ts4.5/plugins/hyperlink/Toolbar.d.ts +2 -1
- package/dist/types-ts4.5/plugins/hyperlink/commands.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/insert-block/index.d.ts +4 -4
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -3
- package/dist/types-ts4.5/plugins/list/utils/node.d.ts +2 -6
- package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +4 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +4 -0
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/media-single.d.ts +2 -15
- package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +0 -1
- package/dist/types-ts4.5/plugins/width/index.d.ts +9 -1
- package/dist/types-ts4.5/types/performance-tracking.d.ts +1 -323
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +5 -5
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +6 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/ElementBrowser/components/CategoryList.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -1
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +1 -1
- package/dist/types-ts4.5/utils/document.d.ts +0 -4
- package/dist/types-ts4.5/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/selection.d.ts +1 -2
- package/package.json +30 -23
- package/report.api.md +80 -151
- package/dist/cjs/analytics-api/api.js +0 -32
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +0 -36
- package/dist/cjs/analytics-api/editor-state-context.js +0 -77
- package/dist/cjs/analytics-api/map-attributes.js +0 -23
- package/dist/cjs/insert-api/api.js +0 -43
- package/dist/cjs/insert-api/insert-content-handlers.js +0 -94
- package/dist/cjs/insert-api/insert-node-helpers.js +0 -133
- package/dist/cjs/insert-api/types.js +0 -5
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +0 -93
- package/dist/cjs/plugins/hyperlink/analytics.js +0 -23
- package/dist/cjs/plugins/hyperlink/utils.js +0 -183
- package/dist/cjs/plugins/paste/md-plugins/ignore-list-heading-md-plugin.js +0 -47
- package/dist/cjs/plugins/paste/md-plugins/linkify-md-plugin.js +0 -135
- package/dist/cjs/plugins/paste/md-plugins/newline-md-plugin.js +0 -67
- package/dist/cjs/plugins/paste/md-plugins/paragraph-md-plugin.js +0 -73
- package/dist/cjs/plugins/paste/md.js +0 -31
- package/dist/cjs/plugins/undo-redo/undo-redo-input-source.js +0 -26
- package/dist/cjs/types/get-editor-props.js +0 -5
- package/dist/cjs/utils/get-editor-plugins.js +0 -30
- package/dist/cjs/utils/insert.js +0 -251
- package/dist/cjs/utils/sendLogs.js +0 -12
- package/dist/es2019/analytics-api/api.js +0 -28
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +0 -32
- package/dist/es2019/analytics-api/editor-state-context.js +0 -74
- package/dist/es2019/analytics-api/map-attributes.js +0 -14
- package/dist/es2019/insert-api/api.js +0 -42
- package/dist/es2019/insert-api/insert-content-handlers.js +0 -84
- package/dist/es2019/insert-api/insert-node-helpers.js +0 -137
- package/dist/es2019/insert-api/types.js +0 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +0 -85
- package/dist/es2019/plugins/hyperlink/analytics.js +0 -17
- package/dist/es2019/plugins/hyperlink/utils.js +0 -149
- package/dist/es2019/plugins/paste/md-plugins/ignore-list-heading-md-plugin.js +0 -43
- package/dist/es2019/plugins/paste/md-plugins/linkify-md-plugin.js +0 -128
- package/dist/es2019/plugins/paste/md-plugins/newline-md-plugin.js +0 -58
- package/dist/es2019/plugins/paste/md-plugins/paragraph-md-plugin.js +0 -64
- package/dist/es2019/plugins/paste/md.js +0 -23
- package/dist/es2019/plugins/undo-redo/undo-redo-input-source.js +0 -17
- package/dist/es2019/types/get-editor-props.js +0 -1
- package/dist/es2019/utils/get-editor-plugins.js +0 -23
- package/dist/es2019/utils/insert.js +0 -244
- package/dist/es2019/utils/sendLogs.js +0 -1
- package/dist/esm/analytics-api/api.js +0 -25
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +0 -29
- package/dist/esm/analytics-api/editor-state-context.js +0 -69
- package/dist/esm/analytics-api/map-attributes.js +0 -16
- package/dist/esm/insert-api/api.js +0 -36
- package/dist/esm/insert-api/insert-content-handlers.js +0 -86
- package/dist/esm/insert-api/insert-node-helpers.js +0 -123
- package/dist/esm/insert-api/types.js +0 -1
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +0 -85
- package/dist/esm/plugins/hyperlink/analytics.js +0 -17
- package/dist/esm/plugins/hyperlink/utils.js +0 -168
- package/dist/esm/plugins/paste/md-plugins/ignore-list-heading-md-plugin.js +0 -41
- package/dist/esm/plugins/paste/md-plugins/linkify-md-plugin.js +0 -128
- package/dist/esm/plugins/paste/md-plugins/newline-md-plugin.js +0 -60
- package/dist/esm/plugins/paste/md-plugins/paragraph-md-plugin.js +0 -66
- package/dist/esm/plugins/paste/md.js +0 -23
- package/dist/esm/plugins/undo-redo/undo-redo-input-source.js +0 -18
- package/dist/esm/types/get-editor-props.js +0 -1
- package/dist/esm/utils/get-editor-plugins.js +0 -23
- package/dist/esm/utils/insert.js +0 -241
- package/dist/esm/utils/sendLogs.js +0 -1
- package/dist/types/analytics-api/api.d.ts +0 -9
- package/dist/types/analytics-api/attach-payload-into-transaction.d.ts +0 -10
- package/dist/types/analytics-api/editor-state-context.d.ts +0 -9
- package/dist/types/analytics-api/map-attributes.d.ts +0 -2
- package/dist/types/insert-api/api.d.ts +0 -9
- package/dist/types/insert-api/insert-content-handlers.d.ts +0 -9
- package/dist/types/insert-api/insert-node-helpers.d.ts +0 -30
- package/dist/types/insert-api/types.d.ts +0 -16
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +0 -30
- package/dist/types/plugins/hyperlink/analytics.d.ts +0 -2
- package/dist/types/plugins/hyperlink/utils.d.ts +0 -25
- package/dist/types/plugins/paste/md-plugins/ignore-list-heading-md-plugin.d.ts +0 -2
- package/dist/types/plugins/paste/md-plugins/linkify-md-plugin.d.ts +0 -2
- package/dist/types/plugins/paste/md-plugins/newline-md-plugin.d.ts +0 -2
- package/dist/types/plugins/paste/md-plugins/paragraph-md-plugin.d.ts +0 -2
- package/dist/types/plugins/paste/md.d.ts +0 -2
- package/dist/types/plugins/undo-redo/undo-redo-input-source.d.ts +0 -3
- package/dist/types/types/get-editor-props.d.ts +0 -12
- package/dist/types/utils/get-editor-plugins.d.ts +0 -10
- package/dist/types/utils/insert.d.ts +0 -24
- package/dist/types/utils/sendLogs.d.ts +0 -1
- package/dist/types-ts4.5/analytics-api/api.d.ts +0 -9
- package/dist/types-ts4.5/analytics-api/attach-payload-into-transaction.d.ts +0 -10
- package/dist/types-ts4.5/analytics-api/editor-state-context.d.ts +0 -9
- package/dist/types-ts4.5/analytics-api/map-attributes.d.ts +0 -2
- package/dist/types-ts4.5/insert-api/api.d.ts +0 -9
- package/dist/types-ts4.5/insert-api/insert-content-handlers.d.ts +0 -9
- package/dist/types-ts4.5/insert-api/insert-node-helpers.d.ts +0 -30
- package/dist/types-ts4.5/insert-api/types.d.ts +0 -16
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Button.d.ts +0 -30
- package/dist/types-ts4.5/plugins/hyperlink/analytics.d.ts +0 -2
- package/dist/types-ts4.5/plugins/hyperlink/utils.d.ts +0 -25
- package/dist/types-ts4.5/plugins/paste/md-plugins/ignore-list-heading-md-plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/paste/md-plugins/linkify-md-plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/paste/md-plugins/newline-md-plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/paste/md-plugins/paragraph-md-plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/paste/md.d.ts +0 -2
- package/dist/types-ts4.5/plugins/undo-redo/undo-redo-input-source.d.ts +0 -3
- package/dist/types-ts4.5/types/get-editor-props.d.ts +0 -12
- package/dist/types-ts4.5/utils/get-editor-plugins.d.ts +0 -10
- package/dist/types-ts4.5/utils/insert.d.ts +0 -24
- package/dist/types-ts4.5/utils/sendLogs.d.ts +0 -1
|
@@ -9,12 +9,11 @@ import Select from '@atlaskit/select';
|
|
|
9
9
|
import AddCircleIcon from '@atlaskit/icon/glyph/add-circle';
|
|
10
10
|
import { messages } from '../messages';
|
|
11
11
|
import { getNameFromDuplicateField, isDuplicateField } from '../utils';
|
|
12
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
13
12
|
import { N40A } from '@atlaskit/theme/colors';
|
|
14
13
|
const actionsWrapper = css`
|
|
15
14
|
border-top: 1px solid ${`var(--ds-border, ${N40A})`};
|
|
16
|
-
margin-top: ${
|
|
17
|
-
padding-top: ${
|
|
15
|
+
margin-top: ${"var(--ds-space-200, 16px)"};
|
|
16
|
+
padding-top: ${"var(--ds-space-200, 16px)"};
|
|
18
17
|
`;
|
|
19
18
|
const populateFromParameters = (parameters, fields) => {
|
|
20
19
|
if (Object.keys(parameters).length) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import Avatar from '@atlaskit/avatar';
|
|
4
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
5
4
|
const itemWrapper = css`
|
|
6
5
|
display: flex;
|
|
7
6
|
align-items: center;
|
|
@@ -42,7 +41,7 @@ export const formatOptionLabel = ({
|
|
|
42
41
|
appearance: "square"
|
|
43
42
|
}) : icon), jsx("div", {
|
|
44
43
|
style: {
|
|
45
|
-
paddingLeft: icon ?
|
|
44
|
+
paddingLeft: icon ? "var(--ds-space-100, 8px)" : 0
|
|
46
45
|
}
|
|
47
46
|
}, jsx("p", null, label, description && context !== 'value' && jsx("small", null, description))));
|
|
48
47
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { injectIntl } from 'react-intl-next';
|
|
5
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
5
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
7
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
7
|
import { N80, R300 } from '@atlaskit/theme/colors';
|
|
@@ -12,7 +11,7 @@ const removableFieldWrapper = css`
|
|
|
12
11
|
margin-bottom: 0;
|
|
13
12
|
`;
|
|
14
13
|
const wrapperWithMarginBottom = css`
|
|
15
|
-
margin-bottom: ${
|
|
14
|
+
margin-bottom: ${"var(--ds-space-200, 16px)"};
|
|
16
15
|
`;
|
|
17
16
|
const removeButtonWrapper = css`
|
|
18
17
|
position: absolute;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
4
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
4
|
+
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { unsupportedStyles } from '../../plugins/unsupported-content/styles';
|
|
7
7
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
@@ -101,6 +101,7 @@ const contentStyles = props => css`
|
|
|
101
101
|
${dateStyles}
|
|
102
102
|
${embedCardStyles}
|
|
103
103
|
${unsupportedStyles}
|
|
104
|
+
${resizerStyles}
|
|
104
105
|
|
|
105
106
|
.panelView-content-wrap {
|
|
106
107
|
box-sizing: border-box;
|
|
@@ -5,7 +5,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
5
5
|
import { Section, ButtonItem } from '@atlaskit/menu';
|
|
6
6
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
7
7
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
8
|
-
import { borderRadius
|
|
8
|
+
import { borderRadius } from '@atlaskit/theme';
|
|
9
9
|
import { themed } from '@atlaskit/theme/components';
|
|
10
10
|
import { DN50, N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
11
11
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '../../plugins/quick-insert/assets';
|
|
@@ -154,7 +154,7 @@ const itemBefore = css`
|
|
|
154
154
|
display: flex;
|
|
155
155
|
justify-content: center;
|
|
156
156
|
align-items: center;
|
|
157
|
-
margin-right: ${
|
|
157
|
+
margin-right: ${"var(--ds-space-050, 4px)"};
|
|
158
158
|
`;
|
|
159
159
|
const flexWrapperStyles = css`
|
|
160
160
|
display: flex;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
1
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
3
|
+
// TODO: Migrate away from gridSize
|
|
4
|
+
// Recommendation: Replace gridSize with 8
|
|
2
5
|
export const GRID_SIZE = gridSize();
|
|
3
6
|
export const DEVICE_BREAKPOINT_NUMBERS = {
|
|
4
7
|
small: GRID_SIZE * 40,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
import { ACTION, EVENT_TYPE } from '../../plugins/analytics';
|
|
4
6
|
export class ErrorBoundary extends React.Component {
|
|
5
7
|
constructor(...args) {
|
|
@@ -29,6 +31,11 @@ export class ErrorBoundary extends React.Component {
|
|
|
29
31
|
}
|
|
30
32
|
});
|
|
31
33
|
}
|
|
34
|
+
if (getBooleanFF('platform.editor.sentry-error-monitoring_6bksu')) {
|
|
35
|
+
logException(error, {
|
|
36
|
+
location: 'editor-core/ui'
|
|
37
|
+
});
|
|
38
|
+
}
|
|
32
39
|
if (this.hasFallback()) {
|
|
33
40
|
this.setState({
|
|
34
41
|
errorCaptured: true
|
|
@@ -49,7 +49,7 @@ export default class Resizer extends React.Component {
|
|
|
49
49
|
isResizing: true
|
|
50
50
|
}, () => {
|
|
51
51
|
const newHighlights = highlights(width + innerPadding, snapPoints);
|
|
52
|
-
displayGrid(newHighlights.length > 0, gridTypeForLayout(layout), newHighlights);
|
|
52
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(layout), newHighlights);
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
_defineProperty(this, "handleResize", (_event, _direction, _elementRef, delta) => {
|
|
@@ -76,7 +76,7 @@ export default class Resizer extends React.Component {
|
|
|
76
76
|
updateSize(newSize.width, newSize.layout);
|
|
77
77
|
}
|
|
78
78
|
const newHighlights = highlights(newWidth, snapPoints);
|
|
79
|
-
displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
79
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
80
80
|
resizable.updateSize({
|
|
81
81
|
width: newWidth,
|
|
82
82
|
height: 'auto'
|
|
@@ -111,12 +111,12 @@ export default class Resizer extends React.Component {
|
|
|
111
111
|
dispatchAnalyticsEvent(getResizeAnalyticsEvent(nodeType, newSize.width, newSize.layout));
|
|
112
112
|
}
|
|
113
113
|
// show committed grid size
|
|
114
|
-
displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
114
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
|
|
115
115
|
this.setState({
|
|
116
116
|
isResizing: false
|
|
117
117
|
}, () => {
|
|
118
118
|
updateSize(newSize.width, newSize.layout);
|
|
119
|
-
displayGrid(false, gridTypeForLayout(layout));
|
|
119
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(false, gridTypeForLayout(layout), []);
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
}
|
|
@@ -2,7 +2,7 @@ import { TextSelection, NodeSelection } from 'prosemirror-state';
|
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
3
|
import { transformSmartCharsMentionsAndEmojis } from '../plugins/text-formatting/commands/transform-to-code';
|
|
4
4
|
import { GapCursorSelection } from '../plugins/selection/gap-cursor-selection';
|
|
5
|
-
import { isEmptyParagraph } from '
|
|
5
|
+
import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
6
6
|
const filter = (predicates, cmd) => {
|
|
7
7
|
return function (state, dispatch, view) {
|
|
8
8
|
if (!Array.isArray(predicates)) {
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { Node, Fragment } from 'prosemirror-model';
|
|
2
2
|
import { transformMediaLinkMarks, transformTextLinkCodeMarks, transformDedupeMarks, transformNodesMissingContent, transformIndentationMarks, transformInvalidMediaContent } from '@atlaskit/adf-utils/transforms';
|
|
3
3
|
import { sanitizeNodeForPrivacy } from '../utils/filter/privacy-filter';
|
|
4
|
-
import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { isEmptyParagraph, validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { getBreakoutMode } from './node-width';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../plugins/analytics/types/enums';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Checks if node is an empty paragraph.
|
|
10
|
-
*/
|
|
11
|
-
export function isEmptyParagraph(node) {
|
|
12
|
-
return !!node && node.type.name === 'paragraph' && !node.childCount;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
/**
|
|
16
9
|
* Returns false if node contains only empty inline nodes and hardBreaks.
|
|
17
10
|
*/
|
|
@@ -7,10 +7,10 @@ import { isNodeEmpty } from './document';
|
|
|
7
7
|
import { atTheBeginningOfDoc, atTheEndOfDoc } from './prosemirror/position';
|
|
8
8
|
import { isMediaNode } from '@atlaskit/editor-common/utils';
|
|
9
9
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
10
|
-
export {
|
|
10
|
+
export { hasVisibleContent, isNodeEmpty, isEmptyDocument, processRawValue, getStepRange, findFarthestParentNode, isSelectionEndOfParagraph, nodesBetweenChanged, getNodesCount } from './document';
|
|
11
11
|
export { sanitiseMarksInSelection } from './mark';
|
|
12
12
|
export { isParagraph, isText, isLinkMark } from './nodes';
|
|
13
|
-
export {
|
|
13
|
+
export { setNodeSelection, setGapCursorSelection, setTextSelection } from './selection';
|
|
14
14
|
export { default as measurements } from './performance/measure-enum';
|
|
15
15
|
function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
16
16
|
return !mark.type.excludes(markType) && !markType.excludes(mark.type);
|
|
@@ -23,28 +23,6 @@ export function setCellSelection(view, anchor, head) {
|
|
|
23
23
|
} = view;
|
|
24
24
|
dispatch(state.tr.setSelection(CellSelection.create(state.doc, anchor, head)));
|
|
25
25
|
}
|
|
26
|
-
export const normaliseNestedLayout = ({
|
|
27
|
-
selection,
|
|
28
|
-
doc
|
|
29
|
-
}, node) => {
|
|
30
|
-
if (selection.$from.depth > 1) {
|
|
31
|
-
if (node.attrs.layout && node.attrs.layout !== 'default') {
|
|
32
|
-
return node.type.createChecked({
|
|
33
|
-
...node.attrs,
|
|
34
|
-
layout: 'default'
|
|
35
|
-
}, node.content, node.marks);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// If its a breakout layout, we can remove the mark
|
|
39
|
-
// Since default isn't a valid breakout mode.
|
|
40
|
-
const breakoutMark = doc.type.schema.marks.breakout;
|
|
41
|
-
if (breakoutMark && breakoutMark.isInSet(node.marks)) {
|
|
42
|
-
const newMarks = breakoutMark.removeFromSet(node.marks);
|
|
43
|
-
return node.type.createChecked(node.attrs, node.content, newMarks);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return node;
|
|
47
|
-
};
|
|
48
26
|
|
|
49
27
|
// checks if the given position is within the ProseMirror document
|
|
50
28
|
export const isValidPosition = (pos, state) => {
|
package/dist/es2019/version.json
CHANGED
|
@@ -159,22 +159,7 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
159
159
|
if (!this.editorView || this.editorView.hasFocus()) {
|
|
160
160
|
return false;
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
// If we focus on componentDidMount the editor can crash due to a prosemirror error.
|
|
164
|
-
// This is fixed in prosemirror-view@1.23.7
|
|
165
|
-
// See: https:github.com/ProseMirror/prosemirror-view/commit/735b88107d1cbe7575a188edb85f05c22fb56e35
|
|
166
|
-
//
|
|
167
|
-
// We don't want this error to crash the editor in the case we can't
|
|
168
|
-
// focus correctly.
|
|
169
|
-
// Revert workaround in: https://product-fabric.atlassian.net/browse/ED-17172
|
|
170
|
-
try {
|
|
171
|
-
this.editorView.focus();
|
|
172
|
-
} catch (err) {
|
|
173
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
174
|
-
// eslint-disable-next-line no-console
|
|
175
|
-
console.error('EditorView focus failed with an error', err);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
162
|
+
this.editorView.focus();
|
|
178
163
|
this.editorView.dispatch(this.editorView.state.tr.scrollIntoView());
|
|
179
164
|
return true;
|
|
180
165
|
}
|
|
@@ -16,11 +16,13 @@ import uuid from 'uuid';
|
|
|
16
16
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
17
17
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
18
18
|
import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
19
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
19
20
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../plugins/analytics';
|
|
20
21
|
import { editorAnalyticsChannel } from '../plugins/analytics/consts';
|
|
21
22
|
import { getDocStructure } from '../utils/document-logger';
|
|
22
23
|
import { WithEditorView } from './WithEditorView';
|
|
23
24
|
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
25
|
+
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
24
26
|
export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
25
27
|
_inherits(ErrorBoundaryWithEditorView, _React$Component);
|
|
26
28
|
var _super = _createSuper(ErrorBoundaryWithEditorView);
|
|
@@ -49,7 +51,7 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
49
51
|
attributes = {
|
|
50
52
|
product: product,
|
|
51
53
|
browserInfo: browserInfo,
|
|
52
|
-
error: error,
|
|
54
|
+
error: error.toString(),
|
|
53
55
|
errorInfo: errorInfo,
|
|
54
56
|
errorId: sharedId,
|
|
55
57
|
browserExtensions: _this.browserExtensions,
|
|
@@ -80,7 +82,13 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
80
82
|
errorStack: errorStack
|
|
81
83
|
}));
|
|
82
84
|
}
|
|
83
|
-
|
|
85
|
+
if (getBooleanFF('platform.editor.sentry-error-monitoring_6bksu')) {
|
|
86
|
+
logException(error, {
|
|
87
|
+
location: 'editor-core/create-editor',
|
|
88
|
+
product: product
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
case 11:
|
|
84
92
|
case "end":
|
|
85
93
|
return _context.stop();
|
|
86
94
|
}
|
|
@@ -144,11 +152,13 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
144
152
|
key: "componentDidCatch",
|
|
145
153
|
value: function componentDidCatch(error, errorInfo) {
|
|
146
154
|
var _this2 = this;
|
|
147
|
-
this.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
if (this.props.errorTracking) {
|
|
156
|
+
this.sendErrorData({
|
|
157
|
+
error: error,
|
|
158
|
+
errorInfo: errorInfo,
|
|
159
|
+
errorStack: error.stack
|
|
160
|
+
});
|
|
161
|
+
}
|
|
152
162
|
|
|
153
163
|
// // Update state to allow a re-render to attempt graceful recovery (in the event that
|
|
154
164
|
// // the error was caused by a race condition or is intermittent)
|
|
@@ -201,6 +211,7 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
201
211
|
return ErrorBoundaryWithEditorView;
|
|
202
212
|
}(React.Component);
|
|
203
213
|
_defineProperty(ErrorBoundaryWithEditorView, "defaultProps", {
|
|
204
|
-
rethrow: true
|
|
214
|
+
rethrow: true,
|
|
215
|
+
errorTracking: true
|
|
205
216
|
});
|
|
206
217
|
export default WithEditorView(ErrorBoundaryWithEditorView);
|
|
@@ -54,6 +54,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
54
54
|
_inherits(ReactEditorView, _React$Component);
|
|
55
55
|
var _super = _createSuper(ReactEditorView);
|
|
56
56
|
function ReactEditorView(props, context) {
|
|
57
|
+
var _props$editorProps, _props$editorProps$pe, _props$editorProps$pe2;
|
|
57
58
|
var _this;
|
|
58
59
|
_classCallCheck(this, ReactEditorView);
|
|
59
60
|
_this = _super.call(this, props, context);
|
|
@@ -213,7 +214,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
213
214
|
});
|
|
214
215
|
_defineProperty(_assertThisInitialized(_this), "trackValidTransactions", function () {
|
|
215
216
|
var editorProps = _this.props.editorProps;
|
|
216
|
-
if (editorProps !== null && editorProps !== void 0 && editorProps.trackValidTransactions) {
|
|
217
|
+
if (!_this.isTransactionTrackingExplicitlyDisabled() && editorProps !== null && editorProps !== void 0 && editorProps.trackValidTransactions) {
|
|
217
218
|
_this.validTransactionCount++;
|
|
218
219
|
var samplingRate = _typeof(editorProps.trackValidTransactions) === 'object' && editorProps.trackValidTransactions.samplingRate || DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS;
|
|
219
220
|
if (_this.validTransactionCount >= samplingRate) {
|
|
@@ -321,15 +322,17 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
321
322
|
compact: true
|
|
322
323
|
});
|
|
323
324
|
});
|
|
324
|
-
_this.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
325
|
+
if (!_this.isTransactionTrackingExplicitlyDisabled()) {
|
|
326
|
+
_this.dispatchAnalyticsEvent({
|
|
327
|
+
action: ACTION.DISPATCHED_INVALID_TRANSACTION,
|
|
328
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
329
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
330
|
+
attributes: {
|
|
331
|
+
analyticsEventPayloads: getAnalyticsEventsFromTransaction(transaction),
|
|
332
|
+
invalidNodes: invalidNodes
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
333
336
|
(_this$experienceStore8 = _this.experienceStore) === null || _this$experienceStore8 === void 0 ? void 0 : _this$experienceStore8.fail(EditorExperience.interaction, {
|
|
334
337
|
reason: 'invalid transaction',
|
|
335
338
|
invalidNodes: invalidNodes.toString()
|
|
@@ -525,15 +528,22 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
525
528
|
// ED-4759: Don't set selection at end for full-page editor - should be at start.
|
|
526
529
|
selectionAtStart: isFullPage(props.editorProps.appearance)
|
|
527
530
|
});
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
531
|
+
|
|
532
|
+
// ED-16320: Check for explicit disable so that by default
|
|
533
|
+
// it will still be enabled as it currently is. Then we can
|
|
534
|
+
// progressively opt out synthetic tenants.
|
|
535
|
+
var isEditorStartedExplicitlyDisabled = ((_props$editorProps = props.editorProps) === null || _props$editorProps === void 0 ? void 0 : (_props$editorProps$pe = _props$editorProps.performanceTracking) === null || _props$editorProps$pe === void 0 ? void 0 : (_props$editorProps$pe2 = _props$editorProps$pe.startedTracking) === null || _props$editorProps$pe2 === void 0 ? void 0 : _props$editorProps$pe2.enabled) === false;
|
|
536
|
+
if (!isEditorStartedExplicitlyDisabled) {
|
|
537
|
+
_this.dispatchAnalyticsEvent({
|
|
538
|
+
action: ACTION.STARTED,
|
|
539
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
540
|
+
attributes: {
|
|
541
|
+
platform: PLATFORMS.WEB,
|
|
542
|
+
featureFlags: featureFlagsEnabled
|
|
543
|
+
},
|
|
544
|
+
eventType: EVENT_TYPE.UI
|
|
545
|
+
});
|
|
546
|
+
}
|
|
537
547
|
return _this;
|
|
538
548
|
}
|
|
539
549
|
_createClass(ReactEditorView, [{
|
|
@@ -556,6 +566,15 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
556
566
|
value: function countNodes() {
|
|
557
567
|
return _countNodes(this.editorState);
|
|
558
568
|
}
|
|
569
|
+
}, {
|
|
570
|
+
key: "isTransactionTrackingExplicitlyDisabled",
|
|
571
|
+
value: function isTransactionTrackingExplicitlyDisabled() {
|
|
572
|
+
var _this$props$editorPro9, _this$props$editorPro10, _this$props$editorPro11;
|
|
573
|
+
// ED-16320: Check for explicit disable so that by default
|
|
574
|
+
// it will still be enabled as it currently is. Then we can
|
|
575
|
+
// progressively opt out synthetic tenants.
|
|
576
|
+
return ((_this$props$editorPro9 = this.props.editorProps) === null || _this$props$editorPro9 === void 0 ? void 0 : (_this$props$editorPro10 = _this$props$editorPro9.performanceTracking) === null || _this$props$editorPro10 === void 0 ? void 0 : (_this$props$editorPro11 = _this$props$editorPro10.transactionTracking) === null || _this$props$editorPro11 === void 0 ? void 0 : _this$props$editorPro11.enabled) === false;
|
|
577
|
+
}
|
|
559
578
|
}, {
|
|
560
579
|
key: "UNSAFE_componentWillReceiveProps",
|
|
561
580
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
@@ -702,8 +721,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
702
721
|
}, {
|
|
703
722
|
key: "render",
|
|
704
723
|
value: function render() {
|
|
705
|
-
var _this$props$
|
|
706
|
-
var renderTracking = (_this$props$
|
|
724
|
+
var _this$props$editorPro12, _this$props$editorPro13;
|
|
725
|
+
var renderTracking = (_this$props$editorPro12 = this.props.editorProps.performanceTracking) === null || _this$props$editorPro12 === void 0 ? void 0 : (_this$props$editorPro13 = _this$props$editorPro12.renderTracking) === null || _this$props$editorPro13 === void 0 ? void 0 : _this$props$editorPro13.reactEditorView;
|
|
707
726
|
var renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
|
|
708
727
|
var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
|
|
709
728
|
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Provider, {
|
|
@@ -40,7 +40,7 @@ export default function EditorInternal(props) {
|
|
|
40
40
|
* from the `render` method of `Editor` and share it with `EditorNext`.
|
|
41
41
|
*/
|
|
42
42
|
export function EditorInternalWithoutHooks(_ref) {
|
|
43
|
-
var _props$performanceTra, _props$performanceTra2;
|
|
43
|
+
var _props$performanceTra, _props$performanceTra2, _props$performanceTra3, _props$performanceTra4;
|
|
44
44
|
var props = _ref.props,
|
|
45
45
|
handleAnalyticsEvent = _ref.handleAnalyticsEvent,
|
|
46
46
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
@@ -60,6 +60,10 @@ export function EditorInternalWithoutHooks(_ref) {
|
|
|
60
60
|
var renderTracking = (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.renderTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.editor;
|
|
61
61
|
var renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
|
|
62
62
|
var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
|
|
63
|
+
// ED-16320: Check for explicit disable so that by default
|
|
64
|
+
// it will still be enabled as it currently is. Then we can
|
|
65
|
+
// progressively opt out synthetic tenants.
|
|
66
|
+
var isErrorTrackingExplicitlyDisabled = ((_props$performanceTra3 = props.performanceTracking) === null || _props$performanceTra3 === void 0 ? void 0 : (_props$performanceTra4 = _props$performanceTra3.errorTracking) === null || _props$performanceTra4 === void 0 ? void 0 : _props$performanceTra4.enabled) === false;
|
|
63
67
|
return jsx(Fragment, null, renderTrackingEnabled && jsx(RenderTracking, {
|
|
64
68
|
componentProps: props,
|
|
65
69
|
action: ACTION.RE_RENDERED,
|
|
@@ -68,6 +72,7 @@ export function EditorInternalWithoutHooks(_ref) {
|
|
|
68
72
|
propsToIgnore: ['defaultValue'],
|
|
69
73
|
useShallow: useShallow
|
|
70
74
|
}), jsx(ErrorBoundary, {
|
|
75
|
+
errorTracking: !isErrorTrackingExplicitlyDisabled,
|
|
71
76
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
72
77
|
contextIdentifierProvider: props.contextIdentifierProvider,
|
|
73
78
|
featureFlags: featureFlags
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
-
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
4
3
|
import { createEditorSelectionAPI } from '../../../selection-api/api';
|
|
5
|
-
import { createInsertNodeAPI } from '../../../insert-api/api';
|
|
6
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import { attachPayloadIntoTransaction } from '../../../analytics-api/attach-payload-into-transaction';
|
|
8
|
-
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
7
|
* DO NOT USE THIS FUNCTION
|
|
@@ -13,9 +9,6 @@ import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
|
13
9
|
* IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
|
|
14
10
|
**/
|
|
15
11
|
export var createStubInternalApis = function createStubInternalApis() {
|
|
16
|
-
var editorViewRef = {
|
|
17
|
-
current: null
|
|
18
|
-
};
|
|
19
12
|
var createAnalyticsEventRef = {
|
|
20
13
|
current: null
|
|
21
14
|
};
|
|
@@ -37,35 +30,6 @@ export var createStubInternalApis = function createStubInternalApis() {
|
|
|
37
30
|
};
|
|
38
31
|
};
|
|
39
32
|
var editorSelectionAPI = createEditorSelectionAPI();
|
|
40
|
-
var editorAnalyticsAPI = {
|
|
41
|
-
attachAnalyticsEvent: function attachAnalyticsEvent(payload) {
|
|
42
|
-
return function (tr) {
|
|
43
|
-
var editorView = editorViewRef.current;
|
|
44
|
-
if (!tr || !createAnalyticsEvent || !editorView) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
attachPayloadIntoTransaction({
|
|
48
|
-
tr: tr,
|
|
49
|
-
editorState: editorView.state,
|
|
50
|
-
payload: payload,
|
|
51
|
-
channel: FabricChannel.editor
|
|
52
|
-
});
|
|
53
|
-
return true;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
var insertNodeAPI = createInsertNodeAPI({
|
|
58
|
-
getEditorView: function getEditorView() {
|
|
59
|
-
return editorViewRef.current;
|
|
60
|
-
},
|
|
61
|
-
getEditorPlugins: function getEditorPlugins() {
|
|
62
|
-
var fakeTablePlugin = tablesPlugin();
|
|
63
|
-
if (!(fakeTablePlugin !== null && fakeTablePlugin !== void 0 && fakeTablePlugin.pluginsOptions)) {
|
|
64
|
-
return [];
|
|
65
|
-
}
|
|
66
|
-
return [fakeTablePlugin];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
33
|
var MountCreateAnalyticsEventRef = function MountCreateAnalyticsEventRef() {
|
|
70
34
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
71
35
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
@@ -82,11 +46,9 @@ export var createStubInternalApis = function createStubInternalApis() {
|
|
|
82
46
|
name: 'stubInternalApisPMPlugin',
|
|
83
47
|
plugin: function plugin() {
|
|
84
48
|
return new SafePlugin({
|
|
85
|
-
view: function view(
|
|
86
|
-
editorViewRef.current = editorView;
|
|
49
|
+
view: function view() {
|
|
87
50
|
return {
|
|
88
51
|
destroy: function destroy() {
|
|
89
|
-
editorViewRef.current = null;
|
|
90
52
|
createAnalyticsEventRef.current = null;
|
|
91
53
|
}
|
|
92
54
|
};
|
|
@@ -102,8 +64,6 @@ export var createStubInternalApis = function createStubInternalApis() {
|
|
|
102
64
|
};
|
|
103
65
|
return {
|
|
104
66
|
editorSelectionAPI: editorSelectionAPI,
|
|
105
|
-
insertNodeAPI: insertNodeAPI,
|
|
106
|
-
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
107
67
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
108
68
|
stubInternalApisPlugin: stubInternalApisPlugin
|
|
109
69
|
};
|
|
@@ -15,6 +15,8 @@ import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
|
|
|
15
15
|
import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
16
16
|
import floatingToolbarPlugin from '../../../plugins/floating-toolbar';
|
|
17
17
|
import clipboardPlugin from '../../../plugins/clipboard';
|
|
18
|
+
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
|
|
19
|
+
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
18
20
|
import placeholderPlugin from '../../../plugins/placeholder';
|
|
19
21
|
import annotationPlugin from '../../../plugins/annotation';
|
|
20
22
|
import quickInsertPlugin from '../../../plugins/quick-insert';
|
|
@@ -29,7 +31,27 @@ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
|
29
31
|
* their placement in the editor toolbar
|
|
30
32
|
*/
|
|
31
33
|
export function createDefaultPreset(options) {
|
|
32
|
-
var preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).
|
|
34
|
+
var preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).maybeAdd(analyticsPlugin, function (plugin, builder) {
|
|
35
|
+
if (options.allowAnalyticsGASV3) {
|
|
36
|
+
var performanceTracking = options.performanceTracking,
|
|
37
|
+
createAnalyticsEvent = options.createAnalyticsEvent;
|
|
38
|
+
return builder.add([plugin, {
|
|
39
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
40
|
+
performanceTracking: performanceTracking
|
|
41
|
+
}]);
|
|
42
|
+
}
|
|
43
|
+
return builder;
|
|
44
|
+
}).maybeAdd(deprecatedAnalyticsPlugin, function (plugin, builder) {
|
|
45
|
+
if (options.allowAnalyticsGASV3) {
|
|
46
|
+
var performanceTracking = options.performanceTracking,
|
|
47
|
+
createAnalyticsEvent = options.createAnalyticsEvent;
|
|
48
|
+
return builder.add([plugin, {
|
|
49
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
50
|
+
performanceTracking: performanceTracking
|
|
51
|
+
}]);
|
|
52
|
+
}
|
|
53
|
+
return builder;
|
|
54
|
+
}).add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).maybeAdd(undoRedoPlugin, function (p, builder) {
|
|
33
55
|
var _options$featureFlags;
|
|
34
56
|
// The undo redo plugin needs to be add before the blockTypePlugin
|
|
35
57
|
if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
|