@atlaskit/editor-core 162.0.1 → 163.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +2 -2
- package/dist/cjs/editor.js +3 -7
- package/dist/cjs/keymaps/index.js +14 -9
- package/dist/cjs/labs/next/full-page.js +34 -46
- package/dist/cjs/labs/next/presets/cxhtml.js +0 -1
- package/dist/cjs/nodeviews/ReactNodeView.js +16 -41
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +227 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +21 -0
- package/dist/cjs/nodeviews/getPerformanceOptions.js +64 -0
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +16 -6
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +10 -17
- package/dist/cjs/plugins/analytics/types/enums.js +2 -0
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -16
- package/dist/cjs/plugins/base/index.js +26 -7
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +141 -76
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -8
- package/dist/cjs/plugins/block-type/commands/block-type.js +21 -9
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +9 -9
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +4 -4
- package/dist/cjs/plugins/card/pm-plugins/doc.js +53 -6
- package/dist/cjs/plugins/card/pm-plugins/main.js +16 -1
- package/dist/cjs/plugins/card/styles.js +2 -2
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +7 -8
- package/dist/cjs/plugins/code-block/styles.js +2 -2
- package/dist/cjs/plugins/collab-edit/styles.js +2 -2
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +6 -1
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -5
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +15 -4
- package/dist/cjs/plugins/collab-edit/ui/styles.js +10 -14
- package/dist/cjs/plugins/date/nodeviews/date.js +30 -75
- package/dist/cjs/plugins/date/pm-plugins/main.js +8 -11
- package/dist/cjs/plugins/date/styles.js +2 -2
- package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -6
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +8 -7
- package/dist/cjs/plugins/emoji/styles.js +3 -3
- package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +13 -16
- package/dist/cjs/plugins/expand/ui/styles.js +26 -12
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +16 -9
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +9 -6
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +7 -3
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +7 -4
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +14 -13
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +20 -26
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +14 -17
- package/dist/cjs/plugins/extension/ui/styles.js +2 -2
- package/dist/cjs/plugins/fake-text-cursor/styles.js +2 -2
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
- package/dist/cjs/plugins/find-replace/styles.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +7 -1
- package/dist/cjs/plugins/grid/styles.js +2 -2
- package/dist/cjs/plugins/help-dialog/ui/index.js +134 -40
- package/dist/cjs/plugins/help-dialog/ui/styles.js +26 -49
- package/dist/cjs/plugins/hyperlink/styles.js +6 -16
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +23 -20
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +13 -10
- package/dist/cjs/plugins/list/commands/index.js +8 -0
- package/dist/cjs/plugins/list/pm-plugins/main.js +6 -0
- package/dist/cjs/plugins/list/styles.js +2 -2
- package/dist/cjs/plugins/list/utils/node.js +4 -3
- package/dist/cjs/plugins/media/index.js +9 -40
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +28 -23
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -8
- package/dist/cjs/plugins/media/pm-plugins/media-editor-plugin-factory.js +2 -67
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/index.js +0 -13
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +12 -8
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/styled.js +7 -6
- package/dist/cjs/plugins/media/utils/media-single.js +8 -4
- package/dist/cjs/plugins/mentions/styles.js +2 -2
- package/dist/cjs/plugins/panel/styles.js +5 -2
- package/dist/cjs/plugins/placeholder/styles.js +2 -2
- package/dist/cjs/plugins/placeholder-text/styles.js +2 -2
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +2 -1
- package/dist/cjs/plugins/rule/styles.js +5 -2
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +4 -4
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +13 -30
- package/dist/cjs/plugins/status/index.js +9 -12
- package/dist/cjs/plugins/status/nodeviews/status.js +43 -126
- package/dist/cjs/plugins/status/plugin.js +14 -6
- package/dist/cjs/plugins/status/styles.js +2 -2
- package/dist/cjs/plugins/table/index.js +1 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +10 -16
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +7 -12
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +2 -2
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +2 -2
- package/dist/cjs/plugins/type-ahead/constants.js +3 -1
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +8 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +15 -56
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +48 -3
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +4 -1
- package/dist/cjs/plugins/unsupported-content/styles.js +2 -2
- package/dist/cjs/profiler/render-count.js +1 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +0 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
- package/dist/cjs/ui/Appearance/FullPage/messages.js +2 -2
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +18 -16
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +16 -14
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +13 -10
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +15 -4
- package/dist/cjs/ui/ConfigPanel/Header.js +30 -30
- package/dist/cjs/ui/ContentStyles/index.js +13 -20
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +5 -6
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +30 -23
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +51 -47
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +17 -14
- package/dist/cjs/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +18 -18
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +55 -68
- package/dist/cjs/ui/ElementBrowser/hooks/use-container-width.js +10 -11
- package/dist/cjs/ui/FloatingToolbar/styles.js +1 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchList.js +18 -22
- package/dist/cjs/ui/PortalProvider/index.js +3 -3
- package/dist/cjs/ui/Resizer/styled.js +7 -5
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -3
- package/dist/cjs/ui/WithFlash/index.js +9 -17
- package/dist/cjs/utils/insert.js +25 -2
- package/dist/cjs/utils/performance/components/RenderTracking.js +52 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +2 -2
- package/dist/es2019/create-editor/ReactEditorView.js +1 -1
- package/dist/es2019/editor.js +3 -5
- package/dist/es2019/keymaps/index.js +10 -4
- package/dist/es2019/labs/next/full-page.js +44 -43
- package/dist/es2019/labs/next/presets/cxhtml.js +0 -1
- package/dist/es2019/nodeviews/ReactNodeView.js +13 -35
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +216 -0
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +15 -0
- package/dist/es2019/nodeviews/getPerformanceOptions.js +47 -0
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +18 -7
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
- package/dist/es2019/plugins/analytics/types/enums.js +2 -0
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +12 -7
- package/dist/es2019/plugins/base/index.js +24 -5
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +135 -77
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
- package/dist/es2019/plugins/block-type/commands/block-type.js +18 -11
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +10 -6
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +5 -5
- package/dist/es2019/plugins/card/pm-plugins/doc.js +44 -4
- package/dist/es2019/plugins/card/pm-plugins/main.js +17 -1
- package/dist/es2019/plugins/card/styles.js +1 -1
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +8 -7
- package/dist/es2019/plugins/code-block/styles.js +4 -0
- package/dist/es2019/plugins/collab-edit/styles.js +1 -1
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +6 -2
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +9 -5
- package/dist/es2019/plugins/collab-edit/ui/styles.js +5 -7
- package/dist/es2019/plugins/date/nodeviews/date.js +37 -48
- package/dist/es2019/plugins/date/pm-plugins/main.js +8 -10
- package/dist/es2019/plugins/date/styles.js +1 -1
- package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +8 -4
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +9 -5
- package/dist/es2019/plugins/emoji/styles.js +1 -2
- package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +13 -14
- package/dist/es2019/plugins/expand/ui/styles.js +32 -22
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +17 -11
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +7 -6
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +14 -7
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +14 -8
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
- package/dist/es2019/plugins/extension/ui/styles.js +2 -1
- package/dist/es2019/plugins/fake-text-cursor/styles.js +1 -1
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
- package/dist/es2019/plugins/find-replace/styles.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +12 -8
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +7 -1
- package/dist/es2019/plugins/grid/styles.js +1 -1
- package/dist/es2019/plugins/help-dialog/ui/index.js +132 -37
- package/dist/es2019/plugins/help-dialog/ui/styles.js +13 -13
- package/dist/es2019/plugins/hyperlink/styles.js +1 -5
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +25 -20
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
- package/dist/es2019/plugins/list/commands/index.js +7 -0
- package/dist/es2019/plugins/list/pm-plugins/main.js +6 -0
- package/dist/es2019/plugins/list/styles.js +1 -1
- package/dist/es2019/plugins/list/utils/node.js +4 -3
- package/dist/es2019/plugins/media/index.js +1 -28
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +30 -16
- package/dist/es2019/plugins/media/pm-plugins/main.js +1 -7
- package/dist/es2019/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -49
- package/dist/es2019/plugins/media/styles.js +1 -2
- package/dist/es2019/plugins/media/toolbar/index.js +0 -12
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +0 -1
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +14 -9
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/styled.js +4 -5
- package/dist/es2019/plugins/media/utils/media-single.js +9 -5
- package/dist/es2019/plugins/mentions/styles.js +1 -1
- package/dist/es2019/plugins/panel/styles.js +3 -3
- package/dist/es2019/plugins/placeholder/styles.js +1 -1
- package/dist/es2019/plugins/placeholder-text/styles.js +1 -1
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +4 -1
- package/dist/es2019/plugins/rule/styles.js +3 -3
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +2 -2
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +4 -20
- package/dist/es2019/plugins/status/index.js +1 -5
- package/dist/es2019/plugins/status/nodeviews/status.js +45 -82
- package/dist/es2019/plugins/status/plugin.js +13 -6
- package/dist/es2019/plugins/status/styles.js +1 -7
- package/dist/es2019/plugins/table/index.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +11 -10
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +7 -8
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +1 -1
- package/dist/es2019/plugins/type-ahead/constants.js +1 -0
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +11 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +19 -51
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +41 -3
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
- package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
- package/dist/es2019/profiler/render-count.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +0 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
- package/dist/es2019/ui/Appearance/FullPage/messages.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +18 -13
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +14 -8
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +12 -3
- package/dist/es2019/ui/ConfigPanel/Header.js +30 -19
- package/dist/es2019/ui/ContentStyles/index.js +33 -38
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +5 -6
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +49 -38
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +54 -33
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
- package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
- package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +132 -119
- package/dist/es2019/ui/ElementBrowser/hooks/use-container-width.js +10 -9
- package/dist/es2019/ui/FloatingToolbar/styles.js +2 -1
- package/dist/es2019/ui/LinkSearch/LinkSearchList.js +14 -9
- package/dist/es2019/ui/PortalProvider/index.js +3 -3
- package/dist/es2019/ui/Resizer/styled.js +3 -3
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +6 -3
- package/dist/es2019/ui/WithFlash/index.js +15 -6
- package/dist/es2019/utils/insert.js +20 -0
- package/dist/es2019/utils/performance/components/RenderTracking.js +37 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +2 -2
- package/dist/esm/create-editor/ReactEditorView.js +1 -1
- package/dist/esm/editor.js +3 -5
- package/dist/esm/keymaps/index.js +7 -4
- package/dist/esm/labs/next/full-page.js +38 -36
- package/dist/esm/labs/next/presets/cxhtml.js +0 -1
- package/dist/esm/nodeviews/ReactNodeView.js +17 -38
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +212 -0
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
- package/dist/esm/nodeviews/getPerformanceOptions.js +45 -0
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +17 -7
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
- package/dist/esm/plugins/analytics/types/enums.js +2 -0
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -9
- package/dist/esm/plugins/base/index.js +26 -7
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +134 -69
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
- package/dist/esm/plugins/block-type/commands/block-type.js +19 -9
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +9 -6
- package/dist/esm/plugins/card/nodeviews/genericCard.js +5 -5
- package/dist/esm/plugins/card/pm-plugins/doc.js +47 -4
- package/dist/esm/plugins/card/pm-plugins/main.js +15 -1
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +8 -9
- package/dist/esm/plugins/code-block/styles.js +2 -2
- package/dist/esm/plugins/collab-edit/styles.js +1 -1
- package/dist/esm/plugins/collab-edit/ui/avatars.js +6 -2
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +9 -5
- package/dist/esm/plugins/collab-edit/ui/styles.js +6 -7
- package/dist/esm/plugins/date/nodeviews/date.js +30 -71
- package/dist/esm/plugins/date/pm-plugins/main.js +8 -9
- package/dist/esm/plugins/date/styles.js +1 -1
- package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -4
- package/dist/esm/plugins/date/ui/DatePicker/index.js +8 -5
- package/dist/esm/plugins/emoji/styles.js +2 -2
- package/dist/esm/plugins/expand/ui/ExpandIconButton.js +13 -15
- package/dist/esm/plugins/expand/ui/styles.js +24 -12
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +18 -11
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -5
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +13 -7
- package/dist/esm/plugins/extension/ui/Extension/styles.js +13 -11
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
- package/dist/esm/plugins/extension/ui/styles.js +2 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
- package/dist/esm/plugins/find-replace/styles.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +7 -1
- package/dist/esm/plugins/grid/styles.js +1 -1
- package/dist/esm/plugins/help-dialog/ui/index.js +135 -41
- package/dist/esm/plugins/help-dialog/ui/styles.js +13 -13
- package/dist/esm/plugins/hyperlink/styles.js +3 -5
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -20
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
- package/dist/esm/plugins/list/commands/index.js +7 -0
- package/dist/esm/plugins/list/pm-plugins/main.js +6 -0
- package/dist/esm/plugins/list/styles.js +1 -1
- package/dist/esm/plugins/list/utils/node.js +4 -3
- package/dist/esm/plugins/media/index.js +9 -37
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +29 -15
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -9
- package/dist/esm/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -58
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/toolbar/index.js +0 -12
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +13 -9
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/styled.js +4 -3
- package/dist/esm/plugins/media/utils/media-single.js +9 -5
- package/dist/esm/plugins/mentions/styles.js +1 -1
- package/dist/esm/plugins/panel/styles.js +4 -2
- package/dist/esm/plugins/placeholder/styles.js +1 -1
- package/dist/esm/plugins/placeholder-text/styles.js +1 -1
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +2 -1
- package/dist/esm/plugins/rule/styles.js +4 -2
- package/dist/esm/plugins/selection/gap-cursor/styles.js +3 -3
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +5 -21
- package/dist/esm/plugins/status/index.js +9 -12
- package/dist/esm/plugins/status/nodeviews/status.js +37 -115
- package/dist/esm/plugins/status/plugin.js +13 -6
- package/dist/esm/plugins/status/styles.js +2 -2
- package/dist/esm/plugins/table/index.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +10 -11
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +7 -10
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/styles.js +1 -1
- package/dist/esm/plugins/type-ahead/constants.js +1 -0
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +9 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +18 -56
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +44 -3
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
- package/dist/esm/plugins/unsupported-content/styles.js +1 -1
- package/dist/esm/profiler/render-count.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +0 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
- package/dist/esm/ui/Appearance/FullPage/messages.js +1 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +17 -13
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +13 -8
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +14 -3
- package/dist/esm/ui/ConfigPanel/Header.js +30 -19
- package/dist/esm/ui/ContentStyles/index.js +12 -17
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -6
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +29 -18
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +50 -35
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
- package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
- package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +53 -52
- package/dist/esm/ui/ElementBrowser/hooks/use-container-width.js +9 -8
- package/dist/esm/ui/FloatingToolbar/styles.js +1 -1
- package/dist/esm/ui/LinkSearch/LinkSearchList.js +14 -9
- package/dist/esm/ui/PortalProvider/index.js +3 -3
- package/dist/esm/ui/Resizer/styled.js +4 -2
- package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
- package/dist/esm/ui/WithFlash/index.js +8 -8
- package/dist/esm/utils/insert.js +20 -0
- package/dist/esm/utils/performance/components/RenderTracking.js +39 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/editor.d.ts +1 -1
- package/dist/types/keymaps/index.d.ts +3 -2
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/labs/next/mobile.d.ts +1 -1
- package/dist/types/nodeviews/ReactNodeView.d.ts +0 -5
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +23 -0
- package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +1 -0
- package/dist/types/nodeviews/getPerformanceOptions.d.ts +19 -0
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/styles.d.ts +4 -5
- package/dist/types/plugins/analytics/types/enums.d.ts +2 -0
- package/dist/types/plugins/analytics/types/events.d.ts +11 -3
- package/dist/types/plugins/analytics/types/general-events.d.ts +1 -1
- package/dist/types/plugins/analytics/types/utils.d.ts +4 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -2
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +12 -6
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +3 -3
- package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -0
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -0
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/card/styles.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +1 -1
- package/dist/types/plugins/collab-edit/styles.d.ts +1 -1
- package/dist/types/plugins/collab-edit/ui/avatars.d.ts +1 -0
- package/dist/types/plugins/collab-edit/ui/colored-avatar-item.d.ts +3 -2
- package/dist/types/plugins/collab-edit/ui/invite-to-edit.d.ts +1 -0
- package/dist/types/plugins/collab-edit/ui/styles.d.ts +3 -8
- package/dist/types/plugins/date/nodeviews/date.d.ts +3 -15
- package/dist/types/plugins/date/styles.d.ts +1 -1
- package/dist/types/plugins/date/ui/DatePicker/date-picker-input.d.ts +1 -0
- package/dist/types/plugins/date/ui/DatePicker/index.d.ts +1 -0
- package/dist/types/plugins/emoji/styles.d.ts +2 -2
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +5 -3
- package/dist/types/plugins/expand/ui/styles.d.ts +2 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +3 -8
- package/dist/types/plugins/extension/ui/Extension/InlineExtension/index.d.ts +3 -1
- package/dist/types/plugins/extension/ui/Extension/InlineExtension/styles.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/Lozenge.d.ts +3 -1
- package/dist/types/plugins/extension/ui/Extension/styles.d.ts +6 -6
- package/dist/types/plugins/extension/ui/SaveIndicator/SaveIndicator.d.ts +1 -0
- package/dist/types/plugins/extension/ui/styles.d.ts +1 -1
- package/dist/types/plugins/fake-text-cursor/styles.d.ts +1 -1
- package/dist/types/plugins/find-replace/styles.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/styles.d.ts +6 -1
- package/dist/types/plugins/grid/styles.d.ts +1 -1
- package/dist/types/plugins/help-dialog/ui/index.d.ts +3 -1
- package/dist/types/plugins/help-dialog/ui/styles.d.ts +12 -13
- package/dist/types/plugins/hyperlink/styles.d.ts +2 -4
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +4 -2
- package/dist/types/plugins/jira-issue/nodeviews/jira-issue.d.ts +3 -2
- package/dist/types/plugins/list/styles.d.ts +1 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +3 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +0 -1
- package/dist/types/plugins/media/pm-plugins/media-editor-plugin-factory.d.ts +1 -3
- package/dist/types/plugins/media/types.d.ts +0 -19
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +3 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/styled.d.ts +2 -2
- package/dist/types/plugins/mentions/styles.d.ts +1 -1
- package/dist/types/plugins/panel/styles.d.ts +2 -1
- package/dist/types/plugins/placeholder/styles.d.ts +1 -1
- package/dist/types/plugins/placeholder-text/styles.d.ts +1 -1
- package/dist/types/plugins/rule/styles.d.ts +2 -1
- package/dist/types/plugins/selection/gap-cursor/styles.d.ts +1 -1
- package/dist/types/plugins/status/nodeviews/status.d.ts +6 -13
- package/dist/types/plugins/status/plugin.d.ts +2 -3
- package/dist/types/plugins/status/styles.d.ts +1 -1
- package/dist/types/plugins/status/ui/statusPicker.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +4 -2
- package/dist/types/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +3 -2
- package/dist/types/plugins/table/ui/FloatingContextualMenu/styles.d.ts +1 -1
- package/dist/types/plugins/tasks-and-decisions/styles.d.ts +1 -1
- package/dist/types/plugins/type-ahead/constants.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +26 -0
- package/dist/types/plugins/unsupported-content/styles.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -9
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ErrorMessage/ErrorImage.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +3 -3
- package/dist/types/ui/ContentStyles/index.d.ts +1 -4
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +1 -0
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -0
- package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +2 -1
- package/dist/types/ui/ElementBrowser/hooks/use-container-width.d.ts +1 -0
- package/dist/types/ui/LinkSearch/LinkSearchList.d.ts +4 -3
- package/dist/types/ui/Resizer/styled.d.ts +1 -2
- package/dist/types/ui/Toolbar/ToolbarInner.d.ts +3 -1
- package/dist/types/ui/ToolbarButton/index.d.ts +3 -3
- package/dist/types/ui/ToolbarButton/styles.d.ts +2 -2
- package/dist/types/ui/WithFlash/index.d.ts +3 -1
- package/dist/types/utils/insert.d.ts +2 -1
- package/dist/types/utils/performance/components/RenderTracking.d.ts +13 -0
- package/package.json +27 -29
- package/dist/cjs/plugins/media/commands/media-editor.js +0 -80
- package/dist/cjs/plugins/media/pm-plugins/media-editor.js +0 -106
- package/dist/cjs/plugins/media/toolbar/annotation.js +0 -244
- package/dist/cjs/plugins/media/ui/MediaEditor.js +0 -88
- package/dist/cjs/utils/compare.js +0 -136
- package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +0 -83
- package/dist/es2019/plugins/media/commands/media-editor.js +0 -46
- package/dist/es2019/plugins/media/pm-plugins/media-editor.js +0 -43
- package/dist/es2019/plugins/media/toolbar/annotation.js +0 -136
- package/dist/es2019/plugins/media/ui/MediaEditor.js +0 -51
- package/dist/es2019/utils/compare.js +0 -99
- package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +0 -66
- package/dist/esm/plugins/media/commands/media-editor.js +0 -59
- package/dist/esm/plugins/media/pm-plugins/media-editor.js +0 -90
- package/dist/esm/plugins/media/toolbar/annotation.js +0 -218
- package/dist/esm/plugins/media/ui/MediaEditor.js +0 -76
- package/dist/esm/utils/compare.js +0 -115
- package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +0 -68
- package/dist/types/plugins/media/commands/media-editor.d.ts +0 -7
- package/dist/types/plugins/media/pm-plugins/media-editor.d.ts +0 -3
- package/dist/types/plugins/media/toolbar/annotation.d.ts +0 -24
- package/dist/types/plugins/media/ui/MediaEditor.d.ts +0 -14
- package/dist/types/utils/compare.d.ts +0 -32
- package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +0 -30
|
@@ -33,8 +33,8 @@ var primitiveStyles = css({
|
|
|
33
33
|
});
|
|
34
34
|
var interactiveStyles = css({
|
|
35
35
|
'&:active': {
|
|
36
|
-
backgroundColor: token('color.background.
|
|
37
|
-
color: token('color.text.
|
|
36
|
+
backgroundColor: token('color.background.selected.pressed', B50),
|
|
37
|
+
color: token('color.text.selected', B400)
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
var unselectedStyles = css({
|
|
@@ -44,11 +44,11 @@ var unselectedStyles = css({
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
var selectedOptionStyles = css({
|
|
47
|
-
backgroundColor: token('color.background.
|
|
48
|
-
color: token('color.text.
|
|
47
|
+
backgroundColor: token('color.background.selected.pressed', B50),
|
|
48
|
+
color: token('color.text.selected', 'currentColor'),
|
|
49
49
|
'&:hover': {
|
|
50
|
-
backgroundColor: token('color.background.
|
|
51
|
-
color: token('color.text.
|
|
50
|
+
backgroundColor: token('color.background.selected.pressed', B50),
|
|
51
|
+
color: token('color.text.selected', 'currentColor')
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
var titleOffsetStyles = css({
|
|
@@ -22,7 +22,7 @@ import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from 'prosemirr
|
|
|
22
22
|
import { calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
23
23
|
import { akEditorMediaResizeHandlerPaddingWide, akEditorBreakoutPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
24
24
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
25
|
-
import {
|
|
25
|
+
import { wrapperStyle } from '../../../ui/Resizer/styled';
|
|
26
26
|
import Resizer from '../../../ui/Resizer';
|
|
27
27
|
import { handleSides, imageAlignmentMap, snapTo } from '../../../ui/Resizer/utils';
|
|
28
28
|
import { calcMediaPxWidth } from '../../../plugins/media/utils/media-single';
|
|
@@ -381,14 +381,13 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
381
381
|
return jsx("div", {
|
|
382
382
|
css: embedSpacingStyles,
|
|
383
383
|
"data-testid": "resizable-embed-card-spacing"
|
|
384
|
-
}, jsx(
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
fullWidthMode: fullWidthMode
|
|
384
|
+
}, jsx("div", {
|
|
385
|
+
css: wrapperStyle({
|
|
386
|
+
layout: layout,
|
|
387
|
+
isResized: !!pctWidth,
|
|
388
|
+
containerWidth: containerWidth || DEFAULT_EMBED_CARD_WIDTH,
|
|
389
|
+
fullWidthMode: fullWidthMode
|
|
390
|
+
})
|
|
392
391
|
}, jsx(Resizer, _extends({}, this.props, {
|
|
393
392
|
width: initialWidth // Starting or initial width of embed <iframe> itself.
|
|
394
393
|
,
|
|
@@ -9,7 +9,7 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
9
9
|
import { blockNodesVerticalMargin, akEditorTableCellMinWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, SelectionStyle, getSelectionStyles, akEditorCodeFontFamily, akEditorSelectedNodeClassName, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { codeBlockClassNames } from './ui/class-names';
|
|
11
11
|
export var highlightingCodeBlockStyles = function highlightingCodeBlockStyles(props) {
|
|
12
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n background-repeat: no-repeat;\n background-color: ", ";\n --ds--code--bg-color: transparent;\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n color: ", ";\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n overflow: hidden;\n tab-size: 4;\n\n & [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n\n .", " {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n\n > code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n\n &[data-debounce='true'] {\n .", " {\n display: none;\n }\n }\n\n &:not([data-debounce='true']) {\n > code:not([data-language='plaintext']):not([data-language='none']):not([data-language='']) {\n color: transparent;\n caret-color: ", ";\n }\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), overflowShadow({
|
|
12
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n background-repeat: no-repeat;\n background-color: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n color: ", ";\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n overflow: hidden;\n tab-size: 4;\n\n & [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n\n .", " {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n\n > code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n\n &[data-debounce='true'] {\n .", " {\n display: none;\n }\n }\n\n &:not([data-debounce='true']) {\n > code:not([data-language='plaintext']):not([data-language='none']):not([data-language='']) {\n color: transparent;\n caret-color: ", ";\n }\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), overflowShadow({
|
|
13
13
|
background: themed({
|
|
14
14
|
light: colors.N20,
|
|
15
15
|
dark: colors.DN50
|
|
@@ -33,7 +33,7 @@ export var highlightingCodeBlockStyles = function highlightingCodeBlockStyles(pr
|
|
|
33
33
|
})(props), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, akEditorDeleteBorder, codeBlockClassNames.gutter, colors.R75, akEditorDeleteIconColor, codeBlockClassNames.content, akEditorDeleteBackground, codeBlockClassNames.gutter, akEditorDeleteIconColor, codeBlockClassNames.content);
|
|
34
34
|
};
|
|
35
35
|
export var codeBlockStyles = function codeBlockStyles(props) {
|
|
36
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n --ds--code--bg-color: transparent;\n background-repeat: no-repeat;\n background-color: ", ";\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), overflowShadow({
|
|
36
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-repeat: no-repeat;\n background-color: ", ";\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), overflowShadow({
|
|
37
37
|
background: themed({
|
|
38
38
|
light: colors.N20,
|
|
39
39
|
dark: colors.DN50
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { css } from '
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { TELEPOINTER_DIM_CLASS } from './plugin-state';
|
|
7
7
|
import { colors } from './utils';
|
|
8
8
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
3
|
-
import {
|
|
5
|
+
import { avatarContainer } from './styles';
|
|
4
6
|
import toAvatar from './to-avatar';
|
|
5
7
|
import { scrollToCollabCursor } from '../utils';
|
|
6
8
|
import { getFeatureFlags } from '../../feature-flags-context';
|
|
@@ -16,7 +18,9 @@ export var Avatars = /*#__PURE__*/React.memo(function (props) {
|
|
|
16
18
|
return null;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
return
|
|
21
|
+
return jsx("div", {
|
|
22
|
+
css: avatarContainer
|
|
23
|
+
}, jsx(AvatarGroup, {
|
|
20
24
|
appearance: "stack",
|
|
21
25
|
size: "medium",
|
|
22
26
|
data: avatars,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { getAvatarColor } from '../utils';
|
|
3
|
-
import {
|
|
4
|
+
import { badge } from './styles';
|
|
4
5
|
export var ColoredAvatarItem = function ColoredAvatarItem(props) {
|
|
5
6
|
var color = getAvatarColor(props.sessionId).color.solid;
|
|
6
7
|
var avatar = props.name.substr(0, 1).toUpperCase();
|
|
7
|
-
return
|
|
8
|
-
|
|
8
|
+
return jsx("div", {
|
|
9
|
+
css: badge(color),
|
|
9
10
|
"data-testid": "editor-collab-badge"
|
|
10
11
|
}, avatar);
|
|
11
12
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React, { Fragment } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import InviteTeamIcon from '@atlaskit/icon/glyph/editor/add';
|
|
3
5
|
import ToolbarButton from '../../../ui/ToolbarButton';
|
|
4
|
-
import {
|
|
6
|
+
import { inviteTeamWrapper } from './styles';
|
|
5
7
|
|
|
6
8
|
var ID = function ID(props) {
|
|
7
|
-
return
|
|
9
|
+
return jsx(Fragment, null, props.children);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export var InviteToEditButton = function InviteToEditButton(props) {
|
|
@@ -13,7 +15,7 @@ export var InviteToEditButton = function InviteToEditButton(props) {
|
|
|
13
15
|
selected = props.selected,
|
|
14
16
|
title = props.title;
|
|
15
17
|
var iconBefore = React.useMemo(function () {
|
|
16
|
-
return
|
|
18
|
+
return jsx(InviteTeamIcon, {
|
|
17
19
|
label: title
|
|
18
20
|
});
|
|
19
21
|
}, [title]);
|
|
@@ -23,7 +25,9 @@ export var InviteToEditButton = function InviteToEditButton(props) {
|
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
var Wrapper = Component ? Component : ID;
|
|
26
|
-
return
|
|
28
|
+
return jsx("div", {
|
|
29
|
+
css: inviteTeamWrapper
|
|
30
|
+
}, jsx(Wrapper, null, jsx(ToolbarButton, {
|
|
27
31
|
className: "invite-to-edit",
|
|
28
32
|
onClick: onClick,
|
|
29
33
|
selected: selected,
|
|
@@ -2,13 +2,12 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3;
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { N20 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { akEditorSmallZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
export var
|
|
10
|
-
export var
|
|
11
|
-
export var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, relativeFontSizeToBase16(9));
|
|
9
|
+
export var inviteTeamWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 50%;\n min-width: ", "px;\n margin-left: -", "px;\n"])), N20, gridSize() * 4, gridSize() / 2);
|
|
10
|
+
export var avatarContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", "px;\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding: 2px;\n }\n"])), gridSize());
|
|
11
|
+
export var badge = function badge(color) {
|
|
12
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color: #fff;\n font-size: ", ";\n line-height: 0;\n padding-top: 7px;\n text-align: center;\n box-shadow: 0 0 1px #fff;\n box-sizing: border-box;\n"])), akEditorSmallZIndex, color, relativeFontSizeToBase16(9));
|
|
13
|
+
};
|
|
@@ -1,77 +1,36 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
|
|
11
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
|
|
13
1
|
import React from 'react';
|
|
14
2
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
15
|
-
import {
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
16
4
|
import { timestampToString, timestampToTaskContext, isPastDate } from '@atlaskit/editor-common/utils';
|
|
17
5
|
import { Date } from '@atlaskit/date';
|
|
18
6
|
import { setDatePickerAt } from '../actions';
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
7
|
+
export function DateNodeView(props) {
|
|
8
|
+
var timestamp = props.node.attrs.timestamp,
|
|
9
|
+
_props$view$state = props.view.state,
|
|
10
|
+
doc = _props$view$state.doc,
|
|
11
|
+
schema = _props$view$state.schema,
|
|
12
|
+
selection = _props$view$state.selection,
|
|
13
|
+
getPos = props.getPos;
|
|
14
|
+
var intl = useIntl(); // We fall back to selection.$from even though it does not cover all use cases
|
|
15
|
+
// eg. upon Editor init, selection is at the start, not at the Date node
|
|
16
|
+
|
|
17
|
+
var $nodePos = typeof getPos === 'function' ? doc.resolve(getPos()) : selection.$from;
|
|
18
|
+
var parent = $nodePos.parent;
|
|
19
|
+
var withinIncompleteTask = parent.type === schema.nodes.taskItem && parent.attrs.state !== 'DONE';
|
|
20
|
+
var color = withinIncompleteTask && isPastDate(timestamp) ? 'red' : undefined;
|
|
21
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
className: DateSharedCssClassName.DATE_WRAPPER,
|
|
23
|
+
onClick: handleClick
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Date, {
|
|
25
|
+
color: color,
|
|
26
|
+
value: timestamp
|
|
27
|
+
}, withinIncompleteTask ? timestampToTaskContext(timestamp, intl) : timestampToString(timestamp, intl)));
|
|
28
|
+
|
|
29
|
+
function handleClick(event) {
|
|
30
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
31
|
+
var _props$view = props.view,
|
|
32
|
+
state = _props$view.state,
|
|
33
|
+
dispatch = _props$view.dispatch;
|
|
34
|
+
setDatePickerAt(state.selection.from)(state, dispatch);
|
|
45
35
|
}
|
|
46
|
-
|
|
47
|
-
_createClass(DateNodeView, [{
|
|
48
|
-
key: "render",
|
|
49
|
-
value: function render() {
|
|
50
|
-
var _this$props = this.props,
|
|
51
|
-
timestamp = _this$props.node.attrs.timestamp,
|
|
52
|
-
_this$props$view$stat = _this$props.view.state,
|
|
53
|
-
doc = _this$props$view$stat.doc,
|
|
54
|
-
schema = _this$props$view$stat.schema,
|
|
55
|
-
selection = _this$props$view$stat.selection,
|
|
56
|
-
intl = _this$props.intl,
|
|
57
|
-
getPos = _this$props.getPos; // We fall back to selection.$from even though it does not cover all use cases
|
|
58
|
-
// eg. upon Editor init, selection is at the start, not at the Date node
|
|
59
|
-
|
|
60
|
-
var $nodePos = typeof getPos === 'function' ? doc.resolve(getPos()) : selection.$from;
|
|
61
|
-
var parent = $nodePos.parent;
|
|
62
|
-
var withinIncompleteTask = parent.type === schema.nodes.taskItem && parent.attrs.state !== 'DONE';
|
|
63
|
-
var color = withinIncompleteTask && isPastDate(timestamp) ? 'red' : undefined;
|
|
64
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
65
|
-
className: DateSharedCssClassName.DATE_WRAPPER,
|
|
66
|
-
onClick: this.handleClick
|
|
67
|
-
}, /*#__PURE__*/React.createElement(Date, {
|
|
68
|
-
color: color,
|
|
69
|
-
value: timestamp
|
|
70
|
-
}, withinIncompleteTask ? timestampToTaskContext(timestamp, intl) : timestampToString(timestamp, intl)));
|
|
71
|
-
}
|
|
72
|
-
}]);
|
|
73
|
-
|
|
74
|
-
return DateNodeView;
|
|
75
|
-
}(React.Component);
|
|
76
|
-
|
|
77
|
-
export default injectIntl(DateNodeView);
|
|
36
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import DateNodeView from '../nodeviews/date';
|
|
3
|
-
import {
|
|
2
|
+
import { DateNodeView } from '../nodeviews/date';
|
|
3
|
+
import { getInlineNodeViewProducer } from '../../../nodeviews/getInlineNodeViewProducer';
|
|
4
4
|
import { pluginFactory } from '../../../utils/plugin-state-factory';
|
|
5
5
|
import { reducer, mapping, onSelectionChanged } from './utils';
|
|
6
6
|
import { pluginKey } from './plugin-key';
|
|
@@ -12,23 +12,22 @@ var _pluginFactory = pluginFactory(pluginKey, reducer, {
|
|
|
12
12
|
createPluginState = _pluginFactory.createPluginState,
|
|
13
13
|
getPluginState = _pluginFactory.getPluginState;
|
|
14
14
|
|
|
15
|
-
var createPlugin = function createPlugin(
|
|
16
|
-
var dispatch = _ref.dispatch,
|
|
17
|
-
portalProviderAPI = _ref.portalProviderAPI,
|
|
18
|
-
eventDispatcher = _ref.eventDispatcher;
|
|
15
|
+
var createPlugin = function createPlugin(pmPluginFactoryParams) {
|
|
19
16
|
var newPluginState = {
|
|
20
17
|
showDatePickerAt: null,
|
|
21
18
|
isNew: false,
|
|
22
19
|
isDateEmpty: false,
|
|
23
20
|
focusDateInput: false
|
|
24
21
|
};
|
|
25
|
-
var hasIntlContext = true;
|
|
26
22
|
return new SafePlugin({
|
|
27
|
-
state: createPluginState(dispatch, newPluginState),
|
|
23
|
+
state: createPluginState(pmPluginFactoryParams.dispatch, newPluginState),
|
|
28
24
|
key: pluginKey,
|
|
29
25
|
props: {
|
|
30
26
|
nodeViews: {
|
|
31
|
-
date:
|
|
27
|
+
date: getInlineNodeViewProducer({
|
|
28
|
+
pmPluginFactoryParams: pmPluginFactoryParams,
|
|
29
|
+
Component: DateNodeView
|
|
30
|
+
})
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
});
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { css } from '
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { SelectionStyle, getSelectionStyles, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
export var dateStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n }\n }\n"])), DateSharedCssClassName.DATE_CONTAINER, DateSharedCssClassName.DATE_WRAPPER, akEditorSelectedNodeClassName, DateSharedCssClassName.DATE_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), DateSharedCssClassName.DATE_CONTAINER, akEditorSelectedNodeClassName, DateSharedCssClassName.DATE_WRAPPER, akEditorSelectedBorderSize, akEditorDeleteBorder);
|
|
@@ -13,15 +13,16 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
13
13
|
|
|
14
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
15
|
|
|
16
|
+
/** @jsx jsx */
|
|
16
17
|
import React from 'react';
|
|
18
|
+
import { css, jsx } from '@emotion/react';
|
|
17
19
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
18
|
-
import styled from 'styled-components';
|
|
19
20
|
import { findDateSegmentByPosition, adjustDate, isDatePossiblyValid } from '../../utils/internal';
|
|
20
21
|
import { parseDateType, formatDateType } from '../../utils/formatParse';
|
|
21
22
|
import { EVENT_TYPE, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../../../analytics/types/enums';
|
|
22
23
|
import TextField from '@atlaskit/textfield';
|
|
23
24
|
import { ErrorMessage } from '@atlaskit/form';
|
|
24
|
-
var
|
|
25
|
+
var dateTextFieldWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 22px;\n padding-bottom: 12px;\n"])));
|
|
25
26
|
var messages = defineMessages({
|
|
26
27
|
invalidDateError: {
|
|
27
28
|
id: 'fabric.editor.invalidDateError',
|
|
@@ -227,7 +228,9 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
227
228
|
var attemptedDateParse = parseDateType(inputText, locale); // Don't display an error for an empty input.
|
|
228
229
|
|
|
229
230
|
var displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
230
|
-
return
|
|
231
|
+
return jsx("div", {
|
|
232
|
+
css: dateTextFieldWrapper
|
|
233
|
+
}, jsx(TextField, {
|
|
231
234
|
name: "datetextfield",
|
|
232
235
|
value: inputText,
|
|
233
236
|
ref: this.handleInputRef,
|
|
@@ -237,7 +240,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
237
240
|
spellCheck: false,
|
|
238
241
|
autoComplete: "off",
|
|
239
242
|
isInvalid: displayError
|
|
240
|
-
}), displayError &&
|
|
243
|
+
}), displayError && jsx(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
241
244
|
}
|
|
242
245
|
}, {
|
|
243
246
|
key: "componentDidUpdate",
|
|
@@ -13,7 +13,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
13
13
|
|
|
14
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
15
|
|
|
16
|
+
/** @jsx jsx */
|
|
16
17
|
import React from 'react';
|
|
18
|
+
import { css, jsx } from '@emotion/react';
|
|
17
19
|
import ReactDOM from 'react-dom';
|
|
18
20
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
19
21
|
import { timestampToUTCDate, timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
@@ -22,12 +24,11 @@ import Calendar from '@atlaskit/calendar';
|
|
|
22
24
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
23
25
|
import { N60A, N0 } from '@atlaskit/theme/colors';
|
|
24
26
|
import withOuterListeners from '../../../../ui/with-outer-listeners';
|
|
25
|
-
import styled from 'styled-components';
|
|
26
27
|
var PopupWithListeners = withOuterListeners(Popup);
|
|
27
28
|
import { INPUT_METHOD } from '../../../analytics/types/enums';
|
|
28
29
|
import { injectIntl } from 'react-intl-next';
|
|
29
30
|
import DatePickerInput from './date-picker-input';
|
|
30
|
-
var
|
|
31
|
+
var popupContentWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 2px;\n border-radius: ", "px;\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n background-color: ", ";\n"])), borderRadius(), N60A, N60A, N0);
|
|
31
32
|
|
|
32
33
|
var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
33
34
|
_inherits(DatePicker, _React$Component);
|
|
@@ -145,7 +146,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
145
146
|
return null;
|
|
146
147
|
}
|
|
147
148
|
|
|
148
|
-
return
|
|
149
|
+
return jsx(PopupWithListeners, {
|
|
149
150
|
target: element,
|
|
150
151
|
offset: [0, 8],
|
|
151
152
|
fitHeight: 327,
|
|
@@ -156,7 +157,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
156
157
|
mountTo: mountTo,
|
|
157
158
|
boundariesElement: boundariesElement,
|
|
158
159
|
scrollableElement: scrollableElement
|
|
159
|
-
},
|
|
160
|
+
}, jsx("div", {
|
|
161
|
+
css: popupContentWrapper
|
|
162
|
+
}, showTextField === true && jsx(DatePickerInput, {
|
|
160
163
|
date: date,
|
|
161
164
|
onNewDate: this.handleNewDate,
|
|
162
165
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -165,7 +168,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
165
168
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
166
169
|
autoFocus: autoFocus,
|
|
167
170
|
autoSelectAll: isNew
|
|
168
|
-
}),
|
|
171
|
+
}), jsx(Calendar, {
|
|
169
172
|
onChange: this.handleOnChange,
|
|
170
173
|
onSelect: function onSelect(date) {
|
|
171
174
|
return _onSelect(date, INPUT_METHOD.PICKER);
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
|
-
import { css } from '
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { N0, N20, N900 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { borderRadius, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
|
|
8
8
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
@@ -16,4 +16,4 @@ var maxWidth = 105 * grid; // ~420px
|
|
|
16
16
|
var leftAndRightTextPadding = 2 * grid;
|
|
17
17
|
var topAndBottomPadding = grid / 4;
|
|
18
18
|
var marginDistance = 2 * grid;
|
|
19
|
-
export var emojiStylesNext = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .editor-emoji {\n position: relative;\n display: inline-block;\n width: 20px;\n height: 20px;\n background-repeat: none;\n background-size: contain;\n cursor: pointer;\n vertical-align: middle;\n\n &.editor-emoji-loading {\n border-radius: ", "px;\n background: ", ";\n }\n\n &.editor-emoji-fallback {\n display: inline;\n background: transparent;\n vertical-align: baseline;\n }\n\n &.ProseMirror-selectednode:empty {\n outline: none;\n }\n\n &:not(.editor-emoji-fallback) {\n font-size: 0px;\n }\n\n &:not(.editor-emoji-fallback)::before {\n content: attr(data-emoji-shortname);\n display: block;\n box-sizing: border-box;\n width: auto;\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, ", "px);\n\n // packages/css-packs/reduced-ui-pack/src/tooltip.js:25\n color: ", ";\n background-color: ", ";\n font-size: ", ";\n line-height: ", ";\n max-width: ", "px;\n border-radius: ", "px;\n overflow: hidden;\n padding: ", "px ", "px;\n pointer-events: none;\n
|
|
19
|
+
export var emojiStylesNext = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .editor-emoji {\n position: relative;\n display: inline-block;\n width: 20px;\n height: 20px;\n background-repeat: none;\n background-size: contain;\n cursor: pointer;\n vertical-align: middle;\n\n &.editor-emoji-loading {\n border-radius: ", "px;\n background: ", ";\n }\n\n &.editor-emoji-fallback {\n display: inline;\n background: transparent;\n vertical-align: baseline;\n }\n\n &.ProseMirror-selectednode:empty {\n outline: none;\n }\n\n &:not(.editor-emoji-fallback) {\n font-size: 0px;\n }\n\n &:not(.editor-emoji-fallback)::before {\n content: attr(data-emoji-shortname);\n display: block;\n box-sizing: border-box;\n width: auto;\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, ", "px);\n\n // packages/css-packs/reduced-ui-pack/src/tooltip.js:25\n color: ", ";\n background-color: ", ";\n font-size: ", ";\n line-height: ", ";\n max-width: ", "px;\n border-radius: ", "px;\n overflow: hidden;\n padding: ", "px ", "px;\n pointer-events: none;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n z-index: 10000;\n\n opacity: 0; // invisible by default\n transition: opacity 0.35s; // (durationStep * 14)\n }\n\n &:not(.editor-emoji-fallback):hover::before {\n opacity: 1;\n transition: opacity 0s 0.35s; // (durationStep * 14)\n }\n\n &.", " {\n z-index: 2;\n border-radius: 2px;\n ", "\n }\n }\n"])), borderRadius(), N20, marginDistance, N0, N900, relativeFontSizeToBase16(fontSize), lineHeight, maxWidth, borderRadius(), topAndBottomPadding, leftAndRightTextPadding, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
@@ -5,7 +6,6 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
5
6
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
9
9
|
var _excluded = ["buttonStyles"];
|
|
10
10
|
|
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -16,19 +16,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
16
16
|
|
|
17
17
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
/** @jsx jsx */
|
|
20
|
+
import React, { useCallback } from 'react';
|
|
21
|
+
import { jsx } from '@emotion/react';
|
|
20
22
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
21
|
-
import { expandMessages,
|
|
23
|
+
import { expandMessages, expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef } from '@atlaskit/editor-common/ui';
|
|
22
24
|
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
23
25
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
24
26
|
import Tooltip from '@atlaskit/tooltip';
|
|
25
27
|
import { expandClassNames } from './class-names';
|
|
26
|
-
var ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef(function WithRef(props, ref) {
|
|
27
|
-
// @ts-ignore: incorrect innerRef typing
|
|
28
|
-
return /*#__PURE__*/React.createElement(ExpandLayoutWrapper, _extends({}, props, {
|
|
29
|
-
innerRef: ref
|
|
30
|
-
}));
|
|
31
|
-
});
|
|
32
28
|
export var withTooltip = function withTooltip(WrapperComponent) {
|
|
33
29
|
return /*#__PURE__*/function (_React$Component) {
|
|
34
30
|
_inherits(WithSortableColumn, _React$Component);
|
|
@@ -45,11 +41,11 @@ export var withTooltip = function withTooltip(WrapperComponent) {
|
|
|
45
41
|
key: "render",
|
|
46
42
|
value: function render() {
|
|
47
43
|
var label = this.props.label;
|
|
48
|
-
return
|
|
44
|
+
return jsx(Tooltip, {
|
|
49
45
|
content: label,
|
|
50
46
|
position: "top",
|
|
51
47
|
tag: ExpandLayoutWrapperWithRef
|
|
52
|
-
},
|
|
48
|
+
}, jsx(WrapperComponent, this.props));
|
|
53
49
|
}
|
|
54
50
|
}]);
|
|
55
51
|
|
|
@@ -74,10 +70,10 @@ export var CustomButton = function CustomButton(props) {
|
|
|
74
70
|
})
|
|
75
71
|
}, rest);
|
|
76
72
|
}, [props]);
|
|
77
|
-
return
|
|
73
|
+
return jsx(Button, {
|
|
78
74
|
appearance: "subtle",
|
|
79
75
|
className: expandClassNames.iconContainer,
|
|
80
|
-
iconBefore:
|
|
76
|
+
iconBefore: jsx(ChevronRightIcon, {
|
|
81
77
|
label: label
|
|
82
78
|
}),
|
|
83
79
|
shouldFitContainer: true,
|
|
@@ -97,12 +93,14 @@ export var ExpandIconButton = function ExpandIconButton(props) {
|
|
|
97
93
|
var hoverEventCheck = supportsAnyHover ? window.matchMedia('(any-hover: hover)').matches : true; // hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
|
|
98
94
|
|
|
99
95
|
if (props.allowInteractiveExpand && hoverEventCheck) {
|
|
100
|
-
return
|
|
96
|
+
return jsx(ButtonWithTooltip, _extends({
|
|
101
97
|
label: label
|
|
102
98
|
}, props));
|
|
103
99
|
}
|
|
104
100
|
|
|
105
|
-
return
|
|
101
|
+
return jsx("div", {
|
|
102
|
+
css: expandLayoutWrapperStyle
|
|
103
|
+
}, jsx(ButtonWithoutTooltip, _extends({
|
|
106
104
|
label: label
|
|
107
105
|
}, props)));
|
|
108
106
|
};
|