@atlaskit/renderer 105.1.1 → 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 +6 -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,47 +1,33 @@
|
|
|
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 = OrderedList;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
15
|
-
|
|
16
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
17
|
-
|
|
18
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
19
|
-
|
|
20
13
|
var _lists = require("../utils/lists");
|
|
21
|
-
|
|
22
14
|
var _useFeatureFlags = require("../../use-feature-flags");
|
|
23
|
-
|
|
24
15
|
function OrderedList(props) {
|
|
25
16
|
var featureFlags = (0, _useFeatureFlags.useFeatureFlags)();
|
|
26
17
|
var extraProps = {};
|
|
27
|
-
|
|
28
18
|
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists) {
|
|
29
19
|
var _props$content;
|
|
30
|
-
|
|
31
20
|
var itemCounterDigitsSize = (0, _utils.getItemCounterDigitsSize)({
|
|
32
21
|
order: props.order,
|
|
33
22
|
itemsCount: props === null || props === void 0 ? void 0 : (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
34
23
|
});
|
|
35
|
-
|
|
36
24
|
if (itemCounterDigitsSize) {
|
|
37
25
|
extraProps.style = (0, _styles.getOrderedListInlineStyles)(itemCounterDigitsSize, 'object');
|
|
38
26
|
}
|
|
39
|
-
|
|
40
27
|
if (props.order !== undefined) {
|
|
41
28
|
extraProps.start = (0, _utils.resolveOrder)(props.order);
|
|
42
29
|
}
|
|
43
30
|
}
|
|
44
|
-
|
|
45
31
|
return /*#__PURE__*/_react.default.createElement("ol", (0, _extends2.default)({
|
|
46
32
|
className: _adfSchema.orderedListSelector.substr(1),
|
|
47
33
|
"data-indent-level": props.path ? (0, _lists.getListIndentLevel)(props.path) : 1,
|
|
@@ -1,51 +1,33 @@
|
|
|
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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
12
|
var _react2 = require("@emotion/react");
|
|
19
|
-
|
|
20
13
|
var _hint = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/hint"));
|
|
21
|
-
|
|
22
14
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
23
|
-
|
|
24
15
|
var _panel = require("@atlaskit/editor-common/panel");
|
|
25
|
-
|
|
26
16
|
var _emoji = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/emoji"));
|
|
27
|
-
|
|
28
17
|
var _emoji2 = _interopRequireDefault(require("./emoji"));
|
|
29
|
-
|
|
30
18
|
var _theme = require("@atlaskit/theme");
|
|
31
|
-
|
|
32
19
|
var _icons = require("@atlaskit/editor-common/icons");
|
|
33
|
-
|
|
34
20
|
var _templateObject, _templateObject2;
|
|
35
|
-
|
|
36
21
|
var _excluded = ["backgroundColor", "hasIcon"];
|
|
37
|
-
|
|
38
22
|
var PanelStyled = function PanelStyled(_ref) {
|
|
39
23
|
var backgroundColor = _ref.backgroundColor,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
hasIcon = _ref.hasIcon,
|
|
25
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
26
|
var styles = function styles(theme) {
|
|
44
27
|
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)({
|
|
45
28
|
theme: theme
|
|
46
29
|
}), _adfSchema.PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
47
30
|
};
|
|
48
|
-
|
|
49
31
|
if (props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor) {
|
|
50
32
|
styles = function styles(theme) {
|
|
51
33
|
var customStyle = (0, _theme.themed)({
|
|
@@ -59,12 +41,10 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
59
41
|
}), _adfSchema.PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
60
42
|
};
|
|
61
43
|
}
|
|
62
|
-
|
|
63
44
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
64
45
|
css: styles
|
|
65
46
|
}, props), props.children);
|
|
66
47
|
};
|
|
67
|
-
|
|
68
48
|
PanelStyled.displayName = 'PanelStyled';
|
|
69
49
|
var panelIcons = {
|
|
70
50
|
info: _icons.PanelInfoIcon,
|
|
@@ -75,20 +55,18 @@ var panelIcons = {
|
|
|
75
55
|
error: _icons.PanelErrorIcon,
|
|
76
56
|
custom: _emoji.default
|
|
77
57
|
};
|
|
78
|
-
|
|
79
58
|
var Panel = function Panel(props) {
|
|
80
59
|
var allowCustomPanels = props.allowCustomPanels,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
60
|
+
type = props.panelType,
|
|
61
|
+
panelColor = props.panelColor,
|
|
62
|
+
panelIcon = props.panelIcon,
|
|
63
|
+
panelIconId = props.panelIconId,
|
|
64
|
+
panelIconText = props.panelIconText,
|
|
65
|
+
providers = props.providers,
|
|
66
|
+
children = props.children;
|
|
67
|
+
// only allow custom panel type if flag is set
|
|
88
68
|
// otherwise fall back to info if custom panel is given
|
|
89
|
-
|
|
90
69
|
var panelType = allowCustomPanels ? type : type === _adfSchema.PanelType.CUSTOM ? _adfSchema.PanelType.INFO : type;
|
|
91
|
-
|
|
92
70
|
var getIcon = function getIcon() {
|
|
93
71
|
if (panelType === _adfSchema.PanelType.CUSTOM) {
|
|
94
72
|
if (panelIcon && providers) {
|
|
@@ -99,18 +77,14 @@ var Panel = function Panel(props) {
|
|
|
99
77
|
providers: providers
|
|
100
78
|
});
|
|
101
79
|
}
|
|
102
|
-
|
|
103
80
|
return null;
|
|
104
81
|
}
|
|
105
|
-
|
|
106
82
|
var Icon = panelIcons[panelType];
|
|
107
83
|
return (0, _react2.jsx)(Icon, {
|
|
108
84
|
label: "Panel ".concat(panelType)
|
|
109
85
|
});
|
|
110
86
|
};
|
|
111
|
-
|
|
112
87
|
var icon = getIcon();
|
|
113
|
-
|
|
114
88
|
var renderIcon = function renderIcon() {
|
|
115
89
|
if (icon) {
|
|
116
90
|
return (0, _react2.jsx)("div", {
|
|
@@ -118,7 +92,6 @@ var Panel = function Panel(props) {
|
|
|
118
92
|
}, icon);
|
|
119
93
|
}
|
|
120
94
|
};
|
|
121
|
-
|
|
122
95
|
return (0, _react2.jsx)(PanelStyled, {
|
|
123
96
|
className: _panel.PanelSharedCssClassName.prefix,
|
|
124
97
|
"data-panel-type": panelType,
|
|
@@ -132,6 +105,5 @@ var Panel = function Panel(props) {
|
|
|
132
105
|
className: _panel.PanelSharedCssClassName.content
|
|
133
106
|
}, children));
|
|
134
107
|
};
|
|
135
|
-
|
|
136
108
|
var _default = Panel;
|
|
137
109
|
exports.default = _default;
|
|
@@ -1,18 +1,14 @@
|
|
|
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 = Paragraph;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _inline = _interopRequireDefault(require("./inline"));
|
|
13
|
-
|
|
14
10
|
function Paragraph(_ref) {
|
|
15
11
|
var children = _ref.children,
|
|
16
|
-
|
|
12
|
+
dataAttributes = _ref.dataAttributes;
|
|
17
13
|
return /*#__PURE__*/_react.default.createElement("p", dataAttributes, /*#__PURE__*/_react.default.createElement(_inline.default, null, children));
|
|
18
14
|
}
|
|
@@ -1,20 +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 = Placeholder;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
function Placeholder(props) {
|
|
13
10
|
if (props.allowPlaceholderText) {
|
|
14
11
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
15
12
|
"data-placeholder": "".concat(props.text)
|
|
16
13
|
}, props.text);
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
return /*#__PURE__*/_react.default.createElement("span", null);
|
|
20
16
|
}
|
|
@@ -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 = Rule;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
function Rule() {
|
|
13
10
|
return /*#__PURE__*/_react.default.createElement("hr", null);
|
|
14
11
|
}
|
|
@@ -1,55 +1,37 @@
|
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
|
-
|
|
24
15
|
var _element = require("@atlaskit/status/element");
|
|
25
|
-
|
|
26
16
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
27
|
-
|
|
28
17
|
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); }
|
|
29
|
-
|
|
30
18
|
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; }
|
|
31
|
-
|
|
32
19
|
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); }; }
|
|
33
|
-
|
|
34
20
|
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; } }
|
|
35
|
-
|
|
36
21
|
var Status = /*#__PURE__*/function (_PureComponent) {
|
|
37
22
|
(0, _inherits2.default)(Status, _PureComponent);
|
|
38
|
-
|
|
39
23
|
var _super = _createSuper(Status);
|
|
40
|
-
|
|
41
24
|
function Status() {
|
|
42
25
|
(0, _classCallCheck2.default)(this, Status);
|
|
43
26
|
return _super.apply(this, arguments);
|
|
44
27
|
}
|
|
45
|
-
|
|
46
28
|
(0, _createClass2.default)(Status, [{
|
|
47
29
|
key: "render",
|
|
48
30
|
value: function render() {
|
|
49
31
|
var _this$props = this.props,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
text = _this$props.text,
|
|
33
|
+
color = _this$props.color,
|
|
34
|
+
localId = _this$props.localId;
|
|
53
35
|
return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
54
36
|
data: {
|
|
55
37
|
userContext: 'document'
|
|
@@ -64,5 +46,4 @@ var Status = /*#__PURE__*/function (_PureComponent) {
|
|
|
64
46
|
}]);
|
|
65
47
|
return Status;
|
|
66
48
|
}(_react.PureComponent);
|
|
67
|
-
|
|
68
49
|
exports.default = Status;
|
|
@@ -1,69 +1,58 @@
|
|
|
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.Colgroup = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
|
-
|
|
14
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
-
|
|
16
11
|
var getTableLayoutWidth = function getTableLayoutWidth(layout, opts) {
|
|
17
12
|
switch (layout) {
|
|
18
13
|
case 'full-width':
|
|
19
14
|
return _editorSharedStyles.akEditorFullWidthLayoutWidth;
|
|
20
|
-
|
|
21
15
|
case 'wide':
|
|
22
16
|
return _editorSharedStyles.akEditorWideLayoutWidth;
|
|
23
|
-
|
|
24
17
|
default:
|
|
25
18
|
return _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
26
19
|
}
|
|
27
20
|
};
|
|
28
|
-
|
|
29
21
|
var isTableResized = function isTableResized(columnWidths) {
|
|
30
22
|
var filteredWidths = columnWidths.filter(function (width) {
|
|
31
23
|
return width !== 0;
|
|
32
24
|
});
|
|
33
25
|
return !!filteredWidths.length;
|
|
34
26
|
};
|
|
35
|
-
|
|
36
27
|
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount) {
|
|
37
28
|
if (columnWidth === 0) {
|
|
38
29
|
return columnWidth;
|
|
39
30
|
}
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
return Math.max(
|
|
32
|
+
// We need to take tableCellBorderWidth, to avoid unneccesary overflow.
|
|
42
33
|
columnWidth - _styles.tableCellBorderWidth, zeroWidthColumnsCount ? _editorSharedStyles.akEditorTableLegacyCellMinWidth : _styles.tableCellMinWidth);
|
|
43
34
|
};
|
|
44
|
-
|
|
45
35
|
var Colgroup = function Colgroup(props) {
|
|
46
36
|
var columnWidths = props.columnWidths,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
layout = props.layout,
|
|
38
|
+
isNumberColumnEnabled = props.isNumberColumnEnabled,
|
|
39
|
+
renderWidth = props.renderWidth;
|
|
51
40
|
if (!columnWidths || !isTableResized(columnWidths)) {
|
|
52
41
|
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
42
|
+
}
|
|
55
43
|
|
|
44
|
+
// @see ED-6056
|
|
56
45
|
var layoutWidth = getTableLayoutWidth(layout, {
|
|
57
46
|
containerWidth: renderWidth
|
|
58
47
|
});
|
|
59
|
-
var maxTableWidth = renderWidth < layoutWidth ? renderWidth : layoutWidth;
|
|
48
|
+
var maxTableWidth = renderWidth < layoutWidth ? renderWidth : layoutWidth;
|
|
49
|
+
|
|
50
|
+
// If table has a layout of default, it is confined by the defined column width.
|
|
60
51
|
// renderWidth is better used for breakout tables.
|
|
61
52
|
// @see ED-6737
|
|
62
|
-
|
|
63
53
|
if (layout === 'default') {
|
|
64
54
|
renderWidth = Math.min(renderWidth, layoutWidth);
|
|
65
55
|
}
|
|
66
|
-
|
|
67
56
|
var tableWidth = isNumberColumnEnabled ? _editorSharedStyles.akEditorTableNumberColumnWidth : 0;
|
|
68
57
|
var minTableWidth = tableWidth;
|
|
69
58
|
var zeroWidthColumnsCount = 0;
|
|
@@ -73,18 +62,16 @@ var Colgroup = function Colgroup(props) {
|
|
|
73
62
|
} else {
|
|
74
63
|
zeroWidthColumnsCount += 1;
|
|
75
64
|
}
|
|
76
|
-
|
|
77
65
|
minTableWidth += Math.ceil(width) || _editorSharedStyles.akEditorTableLegacyCellMinWidth;
|
|
78
66
|
});
|
|
79
|
-
var cellMinWidth = 0;
|
|
80
|
-
|
|
67
|
+
var cellMinWidth = 0;
|
|
68
|
+
// fixes migration tables with zero-width columns
|
|
81
69
|
if (zeroWidthColumnsCount > 0) {
|
|
82
70
|
if (minTableWidth > maxTableWidth) {
|
|
83
71
|
var minWidth = Math.ceil((maxTableWidth - tableWidth) / zeroWidthColumnsCount);
|
|
84
72
|
cellMinWidth = minWidth < _editorSharedStyles.akEditorTableLegacyCellMinWidth ? _editorSharedStyles.akEditorTableLegacyCellMinWidth : minWidth;
|
|
85
73
|
}
|
|
86
74
|
}
|
|
87
|
-
|
|
88
75
|
return /*#__PURE__*/_react.default.createElement("colgroup", null, isNumberColumnEnabled && /*#__PURE__*/_react.default.createElement("col", {
|
|
89
76
|
style: {
|
|
90
77
|
width: _editorSharedStyles.akEditorTableNumberColumnWidth
|
|
@@ -100,5 +87,4 @@ var Colgroup = function Colgroup(props) {
|
|
|
100
87
|
});
|
|
101
88
|
}));
|
|
102
89
|
};
|
|
103
|
-
|
|
104
90
|
exports.Colgroup = Colgroup;
|
|
@@ -1,52 +1,38 @@
|
|
|
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.tableStickyPadding = exports.StickyTable = exports.OverflowParent = exports.FixedTableDiv = void 0;
|
|
9
|
-
|
|
10
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
-
|
|
16
11
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
-
|
|
18
12
|
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
13
|
var _react2 = require("@emotion/react");
|
|
21
|
-
|
|
22
14
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
23
|
-
|
|
24
15
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
|
-
|
|
26
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
27
|
-
|
|
28
17
|
var _table = require("./table");
|
|
29
|
-
|
|
30
18
|
var _injectProps = require("../../utils/inject-props");
|
|
31
|
-
|
|
32
19
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
33
|
-
|
|
34
20
|
var tableStickyPadding = 8;
|
|
35
21
|
exports.tableStickyPadding = tableStickyPadding;
|
|
36
22
|
var modeSpecficStyles = {
|
|
37
23
|
none: (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: none;\n "]))),
|
|
38
24
|
stick: (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n "]))),
|
|
39
25
|
'pin-bottom': (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n "])))
|
|
40
|
-
};
|
|
26
|
+
};
|
|
41
27
|
|
|
28
|
+
// TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
42
29
|
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
|
|
43
30
|
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(_colors.N40A), ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
|
|
44
31
|
};
|
|
45
|
-
|
|
46
32
|
var FixedTableDiv = function FixedTableDiv(props) {
|
|
47
33
|
var top = props.top,
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
wrapperWidth = props.wrapperWidth,
|
|
35
|
+
mode = props.mode;
|
|
50
36
|
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
|
|
51
37
|
var attrs = {
|
|
52
38
|
mode: mode
|
|
@@ -56,23 +42,21 @@ var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
56
42
|
css: fixedTableCss
|
|
57
43
|
}), props.children);
|
|
58
44
|
};
|
|
59
|
-
|
|
60
45
|
exports.FixedTableDiv = FixedTableDiv;
|
|
61
|
-
|
|
62
46
|
var StickyTable = function StickyTable(_ref) {
|
|
63
47
|
var top = _ref.top,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
48
|
+
left = _ref.left,
|
|
49
|
+
mode = _ref.mode,
|
|
50
|
+
shadowClassNames = _ref.shadowClassNames,
|
|
51
|
+
innerRef = _ref.innerRef,
|
|
52
|
+
wrapperWidth = _ref.wrapperWidth,
|
|
53
|
+
tableWidth = _ref.tableWidth,
|
|
54
|
+
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
55
|
+
layout = _ref.layout,
|
|
56
|
+
children = _ref.children,
|
|
57
|
+
columnWidths = _ref.columnWidths,
|
|
58
|
+
renderWidth = _ref.renderWidth,
|
|
59
|
+
rowHeight = _ref.rowHeight;
|
|
76
60
|
return (0, _react2.jsx)("div", {
|
|
77
61
|
css: {
|
|
78
62
|
left: left && left < 0 ? left : undefined,
|
|
@@ -111,39 +95,31 @@ var StickyTable = function StickyTable(_ref) {
|
|
|
111
95
|
invisible: true
|
|
112
96
|
}))))));
|
|
113
97
|
};
|
|
98
|
+
|
|
114
99
|
/**
|
|
115
100
|
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
116
101
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
102
|
exports.StickyTable = StickyTable;
|
|
120
|
-
|
|
121
103
|
function findHorizontalOverflowScrollParent(table) {
|
|
122
104
|
var parent = table;
|
|
123
|
-
|
|
124
105
|
if (!parent) {
|
|
125
106
|
return null;
|
|
126
107
|
}
|
|
127
|
-
|
|
128
108
|
while (parent = parent.parentElement) {
|
|
129
109
|
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
130
110
|
var style = window.getComputedStyle(parent);
|
|
131
|
-
|
|
132
111
|
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
133
112
|
return parent;
|
|
134
113
|
}
|
|
135
114
|
}
|
|
136
|
-
|
|
137
115
|
return null;
|
|
138
116
|
}
|
|
139
|
-
|
|
140
117
|
var OverflowParent = /*#__PURE__*/function () {
|
|
141
118
|
function OverflowParent(ref) {
|
|
142
119
|
(0, _classCallCheck2.default)(this, OverflowParent);
|
|
143
120
|
this.ref = ref;
|
|
144
121
|
this.ref = ref;
|
|
145
122
|
}
|
|
146
|
-
|
|
147
123
|
(0, _createClass2.default)(OverflowParent, [{
|
|
148
124
|
key: "isElement",
|
|
149
125
|
get: function get() {
|
|
@@ -155,29 +131,24 @@ var OverflowParent = /*#__PURE__*/function () {
|
|
|
155
131
|
if (this.ref instanceof HTMLElement) {
|
|
156
132
|
return this.ref.getBoundingClientRect().top;
|
|
157
133
|
}
|
|
158
|
-
|
|
159
134
|
return 0;
|
|
160
135
|
}
|
|
161
136
|
}, {
|
|
162
137
|
key: "addEventListener",
|
|
163
138
|
value: function addEventListener(type, cb) {
|
|
164
139
|
var _this$ref;
|
|
165
|
-
|
|
166
140
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
167
141
|
args[_key - 2] = arguments[_key];
|
|
168
142
|
}
|
|
169
|
-
|
|
170
143
|
(_this$ref = this.ref).addEventListener.apply(_this$ref, [type, cb].concat(args));
|
|
171
144
|
}
|
|
172
145
|
}, {
|
|
173
146
|
key: "removeEventListener",
|
|
174
147
|
value: function removeEventListener(type, cb) {
|
|
175
148
|
var _this$ref2;
|
|
176
|
-
|
|
177
149
|
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
178
150
|
args[_key2 - 2] = arguments[_key2];
|
|
179
151
|
}
|
|
180
|
-
|
|
181
152
|
(_this$ref2 = this.ref).removeEventListener.apply(_this$ref2, [type, cb].concat(args));
|
|
182
153
|
}
|
|
183
154
|
}], [{
|
|
@@ -188,5 +159,4 @@ var OverflowParent = /*#__PURE__*/function () {
|
|
|
188
159
|
}]);
|
|
189
160
|
return OverflowParent;
|
|
190
161
|
}();
|
|
191
|
-
|
|
192
162
|
exports.OverflowParent = OverflowParent;
|
|
@@ -1,23 +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.Table = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _colgroup = require("./colgroup");
|
|
13
|
-
|
|
14
10
|
var Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
15
11
|
var innerRef = _ref.innerRef,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
13
|
+
columnWidths = _ref.columnWidths,
|
|
14
|
+
layout = _ref.layout,
|
|
15
|
+
renderWidth = _ref.renderWidth,
|
|
16
|
+
children = _ref.children;
|
|
21
17
|
return /*#__PURE__*/_react.default.createElement("table", {
|
|
22
18
|
"data-number-column": isNumberColumnEnabled,
|
|
23
19
|
ref: innerRef
|
|
@@ -28,5 +24,4 @@ var Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
28
24
|
renderWidth: renderWidth
|
|
29
25
|
}), /*#__PURE__*/_react.default.createElement("tbody", null, children));
|
|
30
26
|
});
|
|
31
|
-
|
|
32
27
|
exports.Table = Table;
|