@atlaskit/renderer 105.1.0 → 105.1.2
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 +12 -0
- package/dist/cjs/actions/index.js +19 -71
- package/dist/cjs/actions/matches-utils.js +10 -11
- package/dist/cjs/actions.js +0 -2
- package/dist/cjs/analytics/analyticsContext.js +0 -4
- package/dist/cjs/analytics/events.js +0 -5
- package/dist/cjs/analytics/unsupported-content.js +14 -27
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -26
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/react/hooks/use-bidi-warnings.js +2 -12
- package/dist/cjs/react/hooks/use-in-viewport.js +4 -17
- package/dist/cjs/react/hooks/use-observed-width.js +20 -35
- package/dist/cjs/react/index.js +27 -114
- package/dist/cjs/react/marks/alignment.js +0 -9
- package/dist/cjs/react/marks/annotation.js +6 -21
- package/dist/cjs/react/marks/breakout.js +0 -9
- package/dist/cjs/react/marks/code.js +0 -11
- package/dist/cjs/react/marks/confluence-inline-comment.js +2 -19
- package/dist/cjs/react/marks/data-consumer.js +0 -4
- package/dist/cjs/react/marks/em.js +0 -3
- package/dist/cjs/react/marks/fragment.js +0 -4
- package/dist/cjs/react/marks/indentation.js +0 -3
- package/dist/cjs/react/marks/index.js +1 -24
- package/dist/cjs/react/marks/link.js +5 -25
- package/dist/cjs/react/marks/strike.js +0 -4
- package/dist/cjs/react/marks/strong.js +0 -3
- package/dist/cjs/react/marks/subsup.js +0 -5
- package/dist/cjs/react/marks/textColor.js +0 -9
- package/dist/cjs/react/marks/underline.js +0 -3
- package/dist/cjs/react/marks/unsupportedMark.js +0 -3
- package/dist/cjs/react/marks/unsupportedNodeAttribute.js +0 -3
- package/dist/cjs/react/nodes/blockCard.js +4 -16
- package/dist/cjs/react/nodes/blockquote.js +0 -3
- package/dist/cjs/react/nodes/bodiedExtension.js +6 -17
- package/dist/cjs/react/nodes/bulletList.js +0 -5
- package/dist/cjs/react/nodes/caption.js +1 -6
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +5 -14
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -16
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -23
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +9 -32
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +7 -31
- package/dist/cjs/react/nodes/date.js +5 -33
- package/dist/cjs/react/nodes/decisionItem.js +1 -5
- package/dist/cjs/react/nodes/decisionList.js +0 -20
- package/dist/cjs/react/nodes/doc.js +0 -6
- package/dist/cjs/react/nodes/embedCard.js +25 -54
- package/dist/cjs/react/nodes/emoji.js +6 -24
- package/dist/cjs/react/nodes/extension.js +12 -26
- package/dist/cjs/react/nodes/fallback.js +2 -24
- package/dist/cjs/react/nodes/hardBreak.js +1 -7
- package/dist/cjs/react/nodes/heading-anchor.js +1 -46
- package/dist/cjs/react/nodes/heading.js +4 -17
- package/dist/cjs/react/nodes/index.js +7 -62
- package/dist/cjs/react/nodes/inline.js +0 -6
- package/dist/cjs/react/nodes/inlineCard.js +6 -23
- package/dist/cjs/react/nodes/inlineExtension.js +2 -10
- package/dist/cjs/react/nodes/layoutColumn.js +0 -8
- package/dist/cjs/react/nodes/layoutSection.js +0 -3
- package/dist/cjs/react/nodes/listItem.js +0 -3
- package/dist/cjs/react/nodes/media.js +10 -49
- package/dist/cjs/react/nodes/mediaGroup.js +6 -47
- package/dist/cjs/react/nodes/mediaInline.js +7 -37
- package/dist/cjs/react/nodes/mediaSingle/index.js +38 -85
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -5
- package/dist/cjs/react/nodes/mention.js +5 -23
- package/dist/cjs/react/nodes/orderedList.js +0 -14
- package/dist/cjs/react/nodes/panel.js +10 -38
- package/dist/cjs/react/nodes/paragraph.js +1 -5
- package/dist/cjs/react/nodes/placeholder.js +0 -4
- package/dist/cjs/react/nodes/rule.js +0 -3
- package/dist/cjs/react/nodes/status.js +3 -22
- package/dist/cjs/react/nodes/table/colgroup.js +12 -26
- package/dist/cjs/react/nodes/table/sticky.js +17 -47
- package/dist/cjs/react/nodes/table/table.js +5 -10
- package/dist/cjs/react/nodes/table.js +19 -102
- package/dist/cjs/react/nodes/tableCell.js +26 -79
- package/dist/cjs/react/nodes/tableRow.js +4 -33
- package/dist/cjs/react/nodes/task-item-with-providers.js +4 -40
- package/dist/cjs/react/nodes/taskItem.js +8 -36
- package/dist/cjs/react/nodes/taskList.js +2 -22
- package/dist/cjs/react/nodes/text-wrapper.js +1 -8
- package/dist/cjs/react/nodes/unknownBlock.js +0 -3
- package/dist/cjs/react/renderer-node.js +0 -6
- package/dist/cjs/react/utils/clipboard.js +0 -3
- package/dist/cjs/react/utils/element-selection.js +0 -13
- package/dist/cjs/react/utils/getCardClickHandler.js +0 -3
- package/dist/cjs/react/utils/inject-props.js +4 -9
- package/dist/cjs/react/utils/links.js +2 -6
- package/dist/cjs/react/utils/lists.js +0 -1
- package/dist/cjs/react/utils/performance/RenderTracking.js +2 -10
- package/dist/cjs/react/utils/use-select-all-trap.js +1 -23
- package/dist/cjs/render-document.js +42 -83
- package/dist/cjs/renderer-context.js +0 -5
- package/dist/cjs/steps/index.js +7 -39
- package/dist/cjs/text/index.js +0 -9
- package/dist/cjs/text/nodes/blockquote.js +0 -3
- package/dist/cjs/text/nodes/bulletList.js +0 -3
- package/dist/cjs/text/nodes/date.js +0 -4
- package/dist/cjs/text/nodes/decisionItem.js +0 -5
- package/dist/cjs/text/nodes/hardBreak.js +0 -2
- package/dist/cjs/text/nodes/heading.js +0 -3
- package/dist/cjs/text/nodes/index.js +0 -21
- package/dist/cjs/text/nodes/inlineCard.js +0 -4
- package/dist/cjs/text/nodes/listItem.js +0 -3
- package/dist/cjs/text/nodes/mediaGroup.js +0 -4
- package/dist/cjs/text/nodes/mention.js +0 -3
- package/dist/cjs/text/nodes/orderedList.js +0 -4
- package/dist/cjs/text/nodes/panel.js +0 -3
- package/dist/cjs/text/nodes/paragraph.js +0 -5
- package/dist/cjs/text/nodes/rule.js +0 -2
- package/dist/cjs/text/nodes/status.js +0 -3
- package/dist/cjs/text/nodes/table.js +0 -5
- package/dist/cjs/text/nodes/taskItem.js +0 -5
- package/dist/cjs/text/nodes/unknown.js +0 -6
- package/dist/cjs/text-serializer.js +0 -2
- package/dist/cjs/ui/Expand.js +15 -59
- package/dist/cjs/ui/ExtensionRenderer.js +10 -43
- package/dist/cjs/ui/MediaCard.js +40 -116
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +0 -26
- package/dist/cjs/ui/Renderer/breakout-ssr.js +6 -32
- package/dist/cjs/ui/Renderer/click-to-edit.js +0 -6
- package/dist/cjs/ui/Renderer/index.js +47 -149
- package/dist/cjs/ui/Renderer/style.js +1 -39
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +12 -30
- package/dist/cjs/ui/RendererActionsContext/WithRendererActions.js +0 -4
- package/dist/cjs/ui/RendererActionsContext/index.js +1 -11
- package/dist/cjs/ui/SmartCardStorage.js +0 -20
- package/dist/cjs/ui/SortingIcon.js +10 -40
- package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -11
- package/dist/cjs/ui/TaskItemsFormatContext/index.js +0 -1
- package/dist/cjs/ui/active-header-id-provider.js +6 -19
- package/dist/cjs/ui/annotations/context.js +0 -24
- package/dist/cjs/ui/annotations/draft/component.js +5 -42
- package/dist/cjs/ui/annotations/draft/dom.js +3 -17
- package/dist/cjs/ui/annotations/draft/index.js +0 -2
- package/dist/cjs/ui/annotations/draft/position.js +1 -12
- package/dist/cjs/ui/annotations/draft/text.js +2 -8
- package/dist/cjs/ui/annotations/element/index.js +4 -16
- package/dist/cjs/ui/annotations/element/mark.js +8 -26
- package/dist/cjs/ui/annotations/hooks/index.js +0 -3
- package/dist/cjs/ui/annotations/hooks/use-events.js +13 -45
- package/dist/cjs/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -6
- package/dist/cjs/ui/annotations/hooks/use-inline-comments-filter.js +1 -8
- package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +4 -19
- package/dist/cjs/ui/annotations/hooks/user-selection.js +3 -18
- package/dist/cjs/ui/annotations/hooks/utils.js +0 -2
- package/dist/cjs/ui/annotations/index.js +4 -20
- package/dist/cjs/ui/annotations/selection/index.js +0 -1
- package/dist/cjs/ui/annotations/selection/mounter.js +13 -42
- package/dist/cjs/ui/annotations/selection/range-validator.js +9 -23
- package/dist/cjs/ui/annotations/selection/wrapper.js +3 -13
- package/dist/cjs/ui/annotations/types.js +0 -1
- package/dist/cjs/ui/annotations/view/index.js +1 -12
- package/dist/cjs/ui/index.js +0 -2
- package/dist/cjs/use-feature-flags.js +0 -4
- package/dist/cjs/utils.js +1 -19
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +6 -50
- package/dist/es2019/actions/matches-utils.js +10 -9
- package/dist/es2019/actions.js +2 -1
- package/dist/es2019/analytics/events.js +0 -5
- package/dist/es2019/analytics/unsupported-content.js +8 -14
- package/dist/es2019/react/hooks/use-bidi-warnings.js +0 -2
- package/dist/es2019/react/hooks/use-in-viewport.js +0 -1
- package/dist/es2019/react/hooks/use-observed-width.js +0 -2
- package/dist/es2019/react/index.js +44 -119
- package/dist/es2019/react/marks/alignment.js +0 -3
- package/dist/es2019/react/marks/annotation.js +2 -5
- package/dist/es2019/react/marks/confluence-inline-comment.js +0 -1
- package/dist/es2019/react/marks/index.js +2 -1
- package/dist/es2019/react/marks/link.js +0 -6
- package/dist/es2019/react/marks/subsup.js +0 -3
- package/dist/es2019/react/nodes/bodiedExtension.js +2 -5
- package/dist/es2019/react/nodes/caption.js +0 -2
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +0 -2
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -3
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +1 -6
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +0 -4
- package/dist/es2019/react/nodes/date.js +0 -7
- package/dist/es2019/react/nodes/decisionList.js +0 -3
- package/dist/es2019/react/nodes/embedCard.js +8 -16
- package/dist/es2019/react/nodes/emoji.js +0 -1
- package/dist/es2019/react/nodes/extension.js +4 -6
- package/dist/es2019/react/nodes/fallback.js +0 -8
- package/dist/es2019/react/nodes/hardBreak.js +0 -3
- package/dist/es2019/react/nodes/heading-anchor.js +0 -15
- package/dist/es2019/react/nodes/heading.js +0 -6
- package/dist/es2019/react/nodes/index.js +28 -61
- package/dist/es2019/react/nodes/inline.js +0 -2
- package/dist/es2019/react/nodes/inlineCard.js +0 -5
- package/dist/es2019/react/nodes/inlineExtension.js +2 -5
- package/dist/es2019/react/nodes/media.js +0 -10
- package/dist/es2019/react/nodes/mediaGroup.js +2 -22
- package/dist/es2019/react/nodes/mediaInline.js +1 -8
- package/dist/es2019/react/nodes/mediaSingle/index.js +8 -29
- package/dist/es2019/react/nodes/mention.js +0 -1
- package/dist/es2019/react/nodes/orderedList.js +0 -5
- package/dist/es2019/react/nodes/panel.js +4 -17
- package/dist/es2019/react/nodes/placeholder.js +0 -1
- package/dist/es2019/react/nodes/status.js +0 -1
- package/dist/es2019/react/nodes/table/colgroup.js +9 -18
- package/dist/es2019/react/nodes/table/sticky.js +3 -16
- package/dist/es2019/react/nodes/table.js +9 -75
- package/dist/es2019/react/nodes/tableCell.js +4 -31
- package/dist/es2019/react/nodes/tableRow.js +0 -10
- package/dist/es2019/react/nodes/task-item-with-providers.js +0 -6
- package/dist/es2019/react/nodes/taskItem.js +0 -7
- package/dist/es2019/react/nodes/taskList.js +0 -3
- package/dist/es2019/react/nodes/text-wrapper.js +0 -4
- package/dist/es2019/react/utils/clipboard.js +0 -1
- package/dist/es2019/react/utils/element-selection.js +0 -12
- package/dist/es2019/react/utils/inject-props.js +5 -7
- package/dist/es2019/react/utils/links.js +2 -4
- package/dist/es2019/react/utils/performance/RenderTracking.js +0 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +0 -7
- package/dist/es2019/render-document.js +16 -33
- package/dist/es2019/steps/index.js +4 -33
- package/dist/es2019/text/index.js +0 -3
- package/dist/es2019/text/nodes/blockquote.js +0 -2
- package/dist/es2019/text/nodes/bulletList.js +0 -2
- package/dist/es2019/text/nodes/date.js +0 -2
- package/dist/es2019/text/nodes/decisionItem.js +0 -4
- package/dist/es2019/text/nodes/hardBreak.js +0 -1
- package/dist/es2019/text/nodes/heading.js +0 -2
- package/dist/es2019/text/nodes/inlineCard.js +0 -3
- package/dist/es2019/text/nodes/listItem.js +0 -2
- package/dist/es2019/text/nodes/mediaGroup.js +0 -3
- package/dist/es2019/text/nodes/mention.js +0 -2
- package/dist/es2019/text/nodes/orderedList.js +0 -2
- package/dist/es2019/text/nodes/panel.js +0 -2
- package/dist/es2019/text/nodes/paragraph.js +0 -4
- package/dist/es2019/text/nodes/rule.js +0 -1
- package/dist/es2019/text/nodes/status.js +0 -2
- package/dist/es2019/text/nodes/table.js +0 -4
- package/dist/es2019/text/nodes/taskItem.js +0 -4
- package/dist/es2019/text/nodes/unknown.js +0 -4
- package/dist/es2019/ui/Expand.js +2 -17
- package/dist/es2019/ui/ExtensionRenderer.js +0 -19
- package/dist/es2019/ui/MediaCard.js +9 -40
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +0 -10
- package/dist/es2019/ui/Renderer/breakout-ssr.js +6 -26
- package/dist/es2019/ui/Renderer/click-to-edit.js +1 -4
- package/dist/es2019/ui/Renderer/index.js +17 -66
- package/dist/es2019/ui/Renderer/style.js +0 -14
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -6
- package/dist/es2019/ui/SmartCardStorage.js +0 -1
- package/dist/es2019/ui/SortingIcon.js +3 -20
- package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
- package/dist/es2019/ui/active-header-id-provider.js +0 -3
- package/dist/es2019/ui/annotations/context.js +0 -6
- package/dist/es2019/ui/annotations/draft/component.js +0 -13
- package/dist/es2019/ui/annotations/draft/dom.js +0 -6
- package/dist/es2019/ui/annotations/draft/position.js +0 -8
- package/dist/es2019/ui/annotations/draft/text.js +0 -1
- package/dist/es2019/ui/annotations/element/index.js +0 -3
- package/dist/es2019/ui/annotations/element/mark.js +4 -6
- package/dist/es2019/ui/annotations/hooks/use-events.js +4 -13
- package/dist/es2019/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
- package/dist/es2019/ui/annotations/hooks/use-inline-comments-filter.js +0 -1
- package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +4 -8
- package/dist/es2019/ui/annotations/hooks/user-selection.js +0 -6
- package/dist/es2019/ui/annotations/selection/mounter.js +0 -13
- package/dist/es2019/ui/annotations/selection/range-validator.js +0 -2
- package/dist/es2019/ui/annotations/selection/wrapper.js +0 -2
- package/dist/es2019/ui/annotations/types.js +0 -1
- package/dist/es2019/ui/annotations/view/index.js +0 -4
- package/dist/es2019/use-feature-flags.js +0 -1
- package/dist/es2019/utils.js +1 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +19 -63
- package/dist/esm/actions/matches-utils.js +10 -9
- package/dist/esm/actions.js +2 -1
- package/dist/esm/analytics/events.js +0 -5
- package/dist/esm/analytics/unsupported-content.js +14 -21
- package/dist/esm/react/hooks/use-bidi-warnings.js +2 -4
- package/dist/esm/react/hooks/use-in-viewport.js +4 -13
- package/dist/esm/react/hooks/use-observed-width.js +20 -29
- package/dist/esm/react/index.js +27 -111
- package/dist/esm/react/marks/alignment.js +0 -4
- package/dist/esm/react/marks/annotation.js +6 -14
- package/dist/esm/react/marks/breakout.js +0 -2
- package/dist/esm/react/marks/confluence-inline-comment.js +2 -12
- package/dist/esm/react/marks/index.js +2 -1
- package/dist/esm/react/marks/link.js +5 -12
- package/dist/esm/react/marks/subsup.js +0 -3
- package/dist/esm/react/nodes/blockCard.js +4 -4
- package/dist/esm/react/nodes/bodiedExtension.js +6 -10
- package/dist/esm/react/nodes/caption.js +1 -3
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +4 -6
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +4 -8
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -10
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +10 -21
- package/dist/esm/react/nodes/codeBlockCopyButton.js +7 -15
- package/dist/esm/react/nodes/date.js +5 -20
- package/dist/esm/react/nodes/decisionItem.js +1 -1
- package/dist/esm/react/nodes/decisionList.js +0 -12
- package/dist/esm/react/nodes/embedCard.js +25 -39
- package/dist/esm/react/nodes/emoji.js +6 -16
- package/dist/esm/react/nodes/extension.js +12 -16
- package/dist/esm/react/nodes/fallback.js +2 -18
- package/dist/esm/react/nodes/hardBreak.js +1 -5
- package/dist/esm/react/nodes/heading-anchor.js +1 -32
- package/dist/esm/react/nodes/heading.js +4 -10
- package/dist/esm/react/nodes/index.js +26 -64
- package/dist/esm/react/nodes/inline.js +0 -2
- package/dist/esm/react/nodes/inlineCard.js +6 -12
- package/dist/esm/react/nodes/inlineExtension.js +2 -6
- package/dist/esm/react/nodes/layoutColumn.js +0 -2
- package/dist/esm/react/nodes/media.js +10 -34
- package/dist/esm/react/nodes/mediaGroup.js +6 -37
- package/dist/esm/react/nodes/mediaInline.js +7 -20
- package/dist/esm/react/nodes/mediaSingle/index.js +37 -66
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -2
- package/dist/esm/react/nodes/mention.js +5 -15
- package/dist/esm/react/nodes/orderedList.js +0 -5
- package/dist/esm/react/nodes/panel.js +12 -28
- package/dist/esm/react/nodes/paragraph.js +1 -1
- package/dist/esm/react/nodes/placeholder.js +0 -1
- package/dist/esm/react/nodes/status.js +3 -13
- package/dist/esm/react/nodes/table/colgroup.js +12 -21
- package/dist/esm/react/nodes/table/sticky.js +17 -32
- package/dist/esm/react/nodes/table/table.js +5 -5
- package/dist/esm/react/nodes/table.js +19 -95
- package/dist/esm/react/nodes/tableCell.js +26 -66
- package/dist/esm/react/nodes/tableRow.js +4 -25
- package/dist/esm/react/nodes/task-item-with-providers.js +4 -27
- package/dist/esm/react/nodes/taskItem.js +8 -24
- package/dist/esm/react/nodes/taskList.js +2 -14
- package/dist/esm/react/nodes/text-wrapper.js +1 -5
- package/dist/esm/react/utils/clipboard.js +0 -1
- package/dist/esm/react/utils/element-selection.js +0 -10
- package/dist/esm/react/utils/inject-props.js +5 -7
- package/dist/esm/react/utils/links.js +2 -4
- package/dist/esm/react/utils/performance/RenderTracking.js +2 -4
- package/dist/esm/react/utils/use-select-all-trap.js +1 -9
- package/dist/esm/render-document.js +42 -70
- package/dist/esm/steps/index.js +7 -36
- package/dist/esm/text/index.js +0 -6
- package/dist/esm/text/nodes/blockquote.js +0 -2
- package/dist/esm/text/nodes/bulletList.js +0 -2
- package/dist/esm/text/nodes/date.js +0 -2
- package/dist/esm/text/nodes/decisionItem.js +0 -4
- package/dist/esm/text/nodes/hardBreak.js +0 -1
- package/dist/esm/text/nodes/heading.js +0 -2
- package/dist/esm/text/nodes/inlineCard.js +0 -3
- package/dist/esm/text/nodes/listItem.js +0 -2
- package/dist/esm/text/nodes/mediaGroup.js +0 -3
- package/dist/esm/text/nodes/mention.js +0 -2
- package/dist/esm/text/nodes/orderedList.js +0 -2
- package/dist/esm/text/nodes/panel.js +0 -2
- package/dist/esm/text/nodes/paragraph.js +0 -4
- package/dist/esm/text/nodes/rule.js +0 -1
- package/dist/esm/text/nodes/status.js +0 -2
- package/dist/esm/text/nodes/table.js +0 -4
- package/dist/esm/text/nodes/taskItem.js +0 -4
- package/dist/esm/text/nodes/unknown.js +0 -4
- package/dist/esm/ui/Expand.js +15 -36
- package/dist/esm/ui/ExtensionRenderer.js +10 -39
- package/dist/esm/ui/MediaCard.js +42 -99
- package/dist/esm/ui/Renderer/ErrorBoundary.js +0 -16
- package/dist/esm/ui/Renderer/breakout-ssr.js +7 -27
- package/dist/esm/ui/Renderer/click-to-edit.js +1 -4
- package/dist/esm/ui/Renderer/index.js +47 -110
- package/dist/esm/ui/Renderer/style.js +1 -21
- package/dist/esm/ui/Renderer/truncated-wrapper.js +12 -23
- package/dist/esm/ui/RendererActionsContext/index.js +1 -1
- package/dist/esm/ui/SmartCardStorage.js +0 -9
- package/dist/esm/ui/SortingIcon.js +10 -29
- package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
- package/dist/esm/ui/active-header-id-provider.js +6 -12
- package/dist/esm/ui/annotations/context.js +0 -15
- package/dist/esm/ui/annotations/draft/component.js +5 -19
- package/dist/esm/ui/annotations/draft/dom.js +3 -11
- package/dist/esm/ui/annotations/draft/position.js +1 -9
- package/dist/esm/ui/annotations/draft/text.js +2 -4
- package/dist/esm/ui/annotations/element/index.js +4 -7
- package/dist/esm/ui/annotations/element/mark.js +8 -14
- package/dist/esm/ui/annotations/hooks/use-events.js +13 -32
- package/dist/esm/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
- package/dist/esm/ui/annotations/hooks/use-inline-comments-filter.js +1 -2
- package/dist/esm/ui/annotations/hooks/use-load-annotations.js +4 -12
- package/dist/esm/ui/annotations/hooks/user-selection.js +3 -11
- package/dist/esm/ui/annotations/index.js +4 -6
- package/dist/esm/ui/annotations/selection/mounter.js +13 -29
- package/dist/esm/ui/annotations/selection/range-validator.js +9 -12
- package/dist/esm/ui/annotations/selection/wrapper.js +3 -5
- package/dist/esm/ui/annotations/types.js +0 -1
- package/dist/esm/ui/annotations/view/index.js +1 -5
- package/dist/esm/use-feature-flags.js +0 -1
- package/dist/esm/utils.js +1 -8
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -142,63 +141,34 @@ Object.defineProperty(exports, "UnknownBlock", {
|
|
|
142
141
|
exports.isText = exports.isEmojiDoc = exports.WindowedCodeBlock = void 0;
|
|
143
142
|
exports.isTextNode = isTextNode;
|
|
144
143
|
exports.toReact = exports.nodeToReact = exports.mergeTextNodes = exports.isTextWrapper = void 0;
|
|
145
|
-
|
|
146
144
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
147
|
-
|
|
148
145
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
149
|
-
|
|
150
146
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
151
|
-
|
|
152
147
|
var _blockquote = _interopRequireDefault(require("./blockquote"));
|
|
153
|
-
|
|
154
148
|
var _bodiedExtension = _interopRequireDefault(require("./bodiedExtension"));
|
|
155
|
-
|
|
156
149
|
var _bulletList = _interopRequireDefault(require("./bulletList"));
|
|
157
|
-
|
|
158
150
|
var _doc = _interopRequireWildcard(require("./doc"));
|
|
159
|
-
|
|
160
151
|
var _extension = _interopRequireDefault(require("./extension"));
|
|
161
|
-
|
|
162
152
|
var _hardBreak = _interopRequireDefault(require("./hardBreak"));
|
|
163
|
-
|
|
164
153
|
var _heading = _interopRequireDefault(require("./heading"));
|
|
165
|
-
|
|
166
154
|
var _inlineExtension = _interopRequireDefault(require("./inlineExtension"));
|
|
167
|
-
|
|
168
155
|
var _layoutSection = _interopRequireDefault(require("./layoutSection"));
|
|
169
|
-
|
|
170
156
|
var _layoutColumn = _interopRequireDefault(require("./layoutColumn"));
|
|
171
|
-
|
|
172
157
|
var _listItem = _interopRequireDefault(require("./listItem"));
|
|
173
|
-
|
|
174
158
|
var _caption = _interopRequireDefault(require("./caption"));
|
|
175
|
-
|
|
176
159
|
var _orderedList = _interopRequireDefault(require("./orderedList"));
|
|
177
|
-
|
|
178
160
|
var _paragraph = _interopRequireDefault(require("./paragraph"));
|
|
179
|
-
|
|
180
161
|
var _placeholder = _interopRequireDefault(require("./placeholder"));
|
|
181
|
-
|
|
182
162
|
var _rule = _interopRequireDefault(require("./rule"));
|
|
183
|
-
|
|
184
163
|
var _table = _interopRequireDefault(require("./table"));
|
|
185
|
-
|
|
186
164
|
var _tableCell = require("./tableCell");
|
|
187
|
-
|
|
188
165
|
var _tableRow = _interopRequireDefault(require("./tableRow"));
|
|
189
|
-
|
|
190
166
|
var _unknownBlock = _interopRequireDefault(require("./unknownBlock"));
|
|
191
|
-
|
|
192
167
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
193
|
-
|
|
194
168
|
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; }
|
|
195
|
-
|
|
196
169
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
197
|
-
|
|
198
170
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
199
|
-
|
|
200
171
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
201
|
-
|
|
202
172
|
var WindowedCodeBlock = (0, _reactLoadable.default)({
|
|
203
173
|
loader: function loader() {
|
|
204
174
|
return Promise.resolve().then(function () {
|
|
@@ -490,28 +460,22 @@ var nodeToReact = {
|
|
|
490
460
|
embedCard: EmbedCard
|
|
491
461
|
};
|
|
492
462
|
exports.nodeToReact = nodeToReact;
|
|
493
|
-
|
|
494
463
|
var toReact = function toReact(node, flags, nodeComponents) {
|
|
495
464
|
if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
|
|
496
465
|
return _doc.DocWithSelectAllTrap;
|
|
497
466
|
}
|
|
498
|
-
|
|
499
467
|
if (node.type.name === 'codeBlock') {
|
|
500
468
|
if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
|
|
501
469
|
return WindowedCodeBlock;
|
|
502
470
|
}
|
|
503
|
-
|
|
504
471
|
return CodeBlock;
|
|
505
|
-
}
|
|
506
|
-
|
|
472
|
+
}
|
|
507
473
|
|
|
474
|
+
// Allowing custom components to override those provided in nodeToReact
|
|
508
475
|
var nodes = _objectSpread(_objectSpread({}, nodeToReact), nodeComponents);
|
|
509
|
-
|
|
510
476
|
return nodes[node.type.name];
|
|
511
477
|
};
|
|
512
|
-
|
|
513
478
|
exports.toReact = toReact;
|
|
514
|
-
|
|
515
479
|
/*
|
|
516
480
|
* Wraps adjacent textnodes in a textWrapper
|
|
517
481
|
*
|
|
@@ -559,9 +523,9 @@ var mergeTextNodes = function mergeTextNodes(nodes) {
|
|
|
559
523
|
if (!isText(current.type.name)) {
|
|
560
524
|
acc.push(current);
|
|
561
525
|
return acc;
|
|
562
|
-
}
|
|
563
|
-
|
|
526
|
+
}
|
|
564
527
|
|
|
528
|
+
// Append node to previous node, if it was a text wrapper
|
|
565
529
|
if (acc.length > 0 && isTextWrapper(acc[acc.length - 1])) {
|
|
566
530
|
var textWrapper = acc[acc.length - 1];
|
|
567
531
|
textWrapper.content.push(current);
|
|
@@ -575,40 +539,31 @@ var mergeTextNodes = function mergeTextNodes(nodes) {
|
|
|
575
539
|
nodeSize: current.nodeSize
|
|
576
540
|
});
|
|
577
541
|
}
|
|
578
|
-
|
|
579
542
|
return acc;
|
|
580
543
|
}, []);
|
|
581
544
|
};
|
|
582
|
-
|
|
583
545
|
exports.mergeTextNodes = mergeTextNodes;
|
|
584
|
-
|
|
585
546
|
var isText = function isText(type) {
|
|
586
547
|
return type === 'text';
|
|
587
548
|
};
|
|
588
|
-
|
|
589
549
|
exports.isText = isText;
|
|
590
|
-
|
|
591
550
|
var isTextWrapper = function isTextWrapper(node) {
|
|
592
551
|
return node.type.name === 'textWrapper';
|
|
593
552
|
};
|
|
594
|
-
|
|
595
553
|
exports.isTextWrapper = isTextWrapper;
|
|
596
|
-
|
|
597
554
|
function isTextNode(node) {
|
|
598
555
|
return node.type.name === 'text';
|
|
599
556
|
}
|
|
600
|
-
|
|
601
557
|
var whitespaceRegex = /^\s*$/;
|
|
558
|
+
|
|
602
559
|
/**
|
|
603
560
|
* Detects whether a fragment contains a single paragraph node
|
|
604
561
|
* whose content satisfies the condition for an emoji block
|
|
605
562
|
*/
|
|
606
|
-
|
|
607
563
|
var isEmojiDoc = function isEmojiDoc(doc) {
|
|
608
564
|
if (doc.childCount !== 1) {
|
|
609
565
|
return false;
|
|
610
566
|
}
|
|
611
|
-
|
|
612
567
|
var parentNodes = [];
|
|
613
568
|
doc.forEach(function (child) {
|
|
614
569
|
return parentNodes.push(child);
|
|
@@ -616,44 +571,34 @@ var isEmojiDoc = function isEmojiDoc(doc) {
|
|
|
616
571
|
var node = parentNodes[0];
|
|
617
572
|
return node.type.name === 'paragraph' && isEmojiBlock(node.content);
|
|
618
573
|
};
|
|
619
|
-
|
|
620
574
|
exports.isEmojiDoc = isEmojiDoc;
|
|
621
|
-
|
|
622
575
|
var isEmojiBlock = function isEmojiBlock(pnode) {
|
|
623
|
-
var content = [];
|
|
624
|
-
|
|
576
|
+
var content = [];
|
|
577
|
+
// Optimisation for long documents - worst case block will be space-emoji-space
|
|
625
578
|
if (pnode.childCount > 7) {
|
|
626
579
|
return false;
|
|
627
580
|
}
|
|
628
|
-
|
|
629
581
|
pnode.forEach(function (child) {
|
|
630
582
|
return content.push(child);
|
|
631
583
|
});
|
|
632
584
|
var emojiCount = 0;
|
|
633
|
-
|
|
634
585
|
for (var i = 0; i < content.length; ++i) {
|
|
635
586
|
var node = content[i];
|
|
636
|
-
|
|
637
587
|
switch (node.type.name) {
|
|
638
588
|
case 'text':
|
|
639
589
|
if (node.text && !node.text.match(whitespaceRegex)) {
|
|
640
590
|
return false;
|
|
641
591
|
}
|
|
642
|
-
|
|
643
592
|
continue;
|
|
644
|
-
|
|
645
593
|
case 'emoji':
|
|
646
594
|
if (++emojiCount > 3) {
|
|
647
595
|
return false;
|
|
648
596
|
}
|
|
649
|
-
|
|
650
597
|
continue;
|
|
651
|
-
|
|
652
598
|
default:
|
|
653
599
|
// Only text and emoji nodes are allowed
|
|
654
600
|
return false;
|
|
655
601
|
}
|
|
656
602
|
}
|
|
657
|
-
|
|
658
603
|
return emojiCount > 0;
|
|
659
604
|
};
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = Inline;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
function Inline(props) {
|
|
13
10
|
var children = props.children;
|
|
14
|
-
|
|
15
11
|
var childCount = _react.default.Children.toArray(children).length;
|
|
16
|
-
|
|
17
12
|
if (!childCount) {
|
|
18
13
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "\xA0");
|
|
19
14
|
}
|
|
20
|
-
|
|
21
15
|
return children;
|
|
22
16
|
}
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _smartCard = require("@atlaskit/smart-card");
|
|
15
|
-
|
|
16
11
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
17
|
-
|
|
18
12
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
19
|
-
|
|
20
13
|
var _fallback = require("./fallback");
|
|
21
|
-
|
|
22
14
|
var _SmartCardStorage = require("../../ui/SmartCardStorage");
|
|
23
|
-
|
|
24
15
|
var _getCardClickHandler = require("../utils/getCardClickHandler");
|
|
25
|
-
|
|
26
16
|
var _useFeatureFlags = require("../../use-feature-flags");
|
|
27
|
-
|
|
28
17
|
var InlineCard = function InlineCard(props) {
|
|
29
18
|
var url = props.url,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
data = props.data,
|
|
20
|
+
eventHandlers = props.eventHandlers,
|
|
21
|
+
portal = props.portal,
|
|
22
|
+
smartLinks = props.smartLinks;
|
|
34
23
|
var onClick = (0, _getCardClickHandler.getCardClickHandler)(eventHandlers, url);
|
|
35
24
|
var cardProps = {
|
|
36
25
|
url: url,
|
|
@@ -39,11 +28,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
39
28
|
container: portal
|
|
40
29
|
};
|
|
41
30
|
var featureFlags = (0, _useFeatureFlags.useFeatureFlags)();
|
|
42
|
-
|
|
43
31
|
var _ref = smartLinks || {},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
showAuthTooltip = _ref.showAuthTooltip,
|
|
33
|
+
ssr = _ref.ssr;
|
|
47
34
|
if (ssr && url) {
|
|
48
35
|
return /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
|
|
49
36
|
appearance: "inline",
|
|
@@ -51,7 +38,6 @@ var InlineCard = function InlineCard(props) {
|
|
|
51
38
|
showAuthTooltip: showAuthTooltip
|
|
52
39
|
});
|
|
53
40
|
}
|
|
54
|
-
|
|
55
41
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
56
42
|
"data-inline-card": true,
|
|
57
43
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
@@ -67,12 +53,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
67
53
|
if (!data.url || !data.title) {
|
|
68
54
|
return;
|
|
69
55
|
}
|
|
70
|
-
|
|
71
56
|
props.smartCardStorage.set(data.url, data.title);
|
|
72
57
|
}
|
|
73
58
|
}))));
|
|
74
59
|
};
|
|
75
|
-
|
|
76
60
|
var _default = (0, _SmartCardStorage.withSmartCardStorage)(InlineCard);
|
|
77
|
-
|
|
78
61
|
exports.default = _default;
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRenderer"));
|
|
15
|
-
|
|
16
11
|
var InlineExtension = function InlineExtension(props) {
|
|
17
12
|
var text = props.text;
|
|
18
13
|
return /*#__PURE__*/_react.default.createElement(_ExtensionRenderer.default, (0, _extends2.default)({}, props, {
|
|
19
14
|
type: "inlineExtension"
|
|
20
15
|
}), function (_ref) {
|
|
21
16
|
var result = _ref.result;
|
|
22
|
-
|
|
23
17
|
try {
|
|
24
18
|
// Return the result directly if it's a valid JSX.Element
|
|
25
19
|
if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
|
|
@@ -27,14 +21,12 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
27
21
|
}
|
|
28
22
|
} catch (e) {
|
|
29
23
|
/** We don't want this error to block renderer */
|
|
30
|
-
|
|
31
24
|
/** We keep rendering the default content */
|
|
32
|
-
}
|
|
33
|
-
|
|
25
|
+
}
|
|
34
26
|
|
|
27
|
+
// Always return default content if anything goes wrong
|
|
35
28
|
return /*#__PURE__*/_react.default.createElement("span", null, text || 'inlineExtension');
|
|
36
29
|
});
|
|
37
30
|
};
|
|
38
|
-
|
|
39
31
|
var _default = InlineExtension;
|
|
40
32
|
exports.default = _default;
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = LayoutSection;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _react2 = require("@emotion/react");
|
|
15
|
-
|
|
16
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
17
|
-
|
|
18
12
|
var _templateObject;
|
|
19
|
-
|
|
20
13
|
var layoutColumnClearMarginTopStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n"])), _ui.clearNextSiblingMarginTopStyle, _ui.clearNextSiblingBlockMarkMarginTopStyle);
|
|
21
|
-
|
|
22
14
|
function LayoutSection(props) {
|
|
23
15
|
return (0, _react2.jsx)("div", {
|
|
24
16
|
"data-layout-column": true,
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = LayoutSection;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
function LayoutSection(props) {
|
|
13
10
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
14
11
|
"data-layout-section": true
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = ListItem;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
function ListItem(props) {
|
|
13
10
|
return /*#__PURE__*/_react.default.createElement("li", null, props.children);
|
|
14
11
|
}
|
|
@@ -1,83 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
12
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
-
|
|
20
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
-
|
|
22
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
-
|
|
24
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
-
|
|
26
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
-
|
|
28
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
29
|
-
|
|
30
18
|
var _react2 = require("@emotion/react");
|
|
31
|
-
|
|
32
19
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
33
|
-
|
|
34
20
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
35
|
-
|
|
36
21
|
var _MediaCard = require("../../ui/MediaCard");
|
|
37
|
-
|
|
38
22
|
var _utils = require("../../utils");
|
|
39
|
-
|
|
40
23
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
41
|
-
|
|
42
24
|
var _events = require("../../analytics/events");
|
|
43
|
-
|
|
44
25
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
|
-
|
|
46
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
47
|
-
|
|
48
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
49
|
-
|
|
50
28
|
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; } }
|
|
51
|
-
|
|
52
29
|
var Media = /*#__PURE__*/function (_PureComponent) {
|
|
53
30
|
(0, _inherits2.default)(Media, _PureComponent);
|
|
54
|
-
|
|
55
31
|
var _super = _createSuper(Media);
|
|
56
|
-
|
|
57
32
|
function Media() {
|
|
58
33
|
var _this;
|
|
59
|
-
|
|
60
34
|
(0, _classCallCheck2.default)(this, Media);
|
|
61
|
-
|
|
62
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
63
36
|
args[_key] = arguments[_key];
|
|
64
37
|
}
|
|
65
|
-
|
|
66
38
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
67
39
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderCard", function () {
|
|
68
40
|
var providers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
69
41
|
var mediaProvider = providers.mediaProvider,
|
|
70
|
-
|
|
42
|
+
contextIdentifierProvider = providers.contextIdentifierProvider;
|
|
71
43
|
var _this$props = _this.props,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
44
|
+
allowAltTextOnImages = _this$props.allowAltTextOnImages,
|
|
45
|
+
alt = _this$props.alt,
|
|
46
|
+
featureFlags = _this$props.featureFlags,
|
|
47
|
+
allowMediaViewer = _this$props.shouldOpenMediaViewer,
|
|
48
|
+
enableDownloadButton = _this$props.enableDownloadButton,
|
|
49
|
+
ssr = _this$props.ssr;
|
|
79
50
|
var linkMark = _this.props.marks.find(_this.props.isLinkMark);
|
|
80
|
-
|
|
81
51
|
var linkHref = linkMark === null || linkMark === void 0 ? void 0 : linkMark.attrs.href;
|
|
82
52
|
var eventHandlers = linkHref ? undefined : _this.props.eventHandlers;
|
|
83
53
|
var shouldOpenMediaViewer = !linkHref && allowMediaViewer;
|
|
@@ -102,10 +72,9 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
72
|
});
|
|
103
73
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMediaLinkClick", function (event) {
|
|
104
74
|
var _this$props2 = _this.props,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
75
|
+
fireAnalyticsEvent = _this$props2.fireAnalyticsEvent,
|
|
76
|
+
isLinkMark = _this$props2.isLinkMark,
|
|
77
|
+
marks = _this$props2.marks;
|
|
109
78
|
if (fireAnalyticsEvent) {
|
|
110
79
|
fireAnalyticsEvent({
|
|
111
80
|
action: _analytics.ACTION.VISITED,
|
|
@@ -118,30 +87,23 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
118
87
|
}
|
|
119
88
|
});
|
|
120
89
|
}
|
|
121
|
-
|
|
122
90
|
var linkMark = _this.props.marks.find(_this.props.isLinkMark);
|
|
123
|
-
|
|
124
91
|
var linkHref = linkMark === null || linkMark === void 0 ? void 0 : linkMark.attrs.href;
|
|
125
92
|
var handler = (0, _utils.getEventHandler)(_this.props.eventHandlers, 'link');
|
|
126
|
-
|
|
127
93
|
if (handler) {
|
|
128
94
|
var _linkMark = marks.find(isLinkMark);
|
|
129
|
-
|
|
130
95
|
handler(event, _linkMark && linkHref);
|
|
131
96
|
}
|
|
132
97
|
});
|
|
133
98
|
return _this;
|
|
134
99
|
}
|
|
135
|
-
|
|
136
100
|
(0, _createClass2.default)(Media, [{
|
|
137
101
|
key: "render",
|
|
138
102
|
value: function render() {
|
|
139
103
|
var providers = this.props.providers;
|
|
140
|
-
|
|
141
104
|
if (!providers) {
|
|
142
105
|
return this.renderCard();
|
|
143
106
|
}
|
|
144
|
-
|
|
145
107
|
return (0, _react2.jsx)(_providerFactory.WithProviders, {
|
|
146
108
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
147
109
|
providerFactory: providers,
|
|
@@ -151,5 +113,4 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
151
113
|
}]);
|
|
152
114
|
return Media;
|
|
153
115
|
}(_react.PureComponent);
|
|
154
|
-
|
|
155
116
|
exports.default = Media;
|