@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
|
@@ -3,35 +3,27 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
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; } }
|
|
10
|
-
|
|
11
8
|
import React from 'react';
|
|
12
9
|
import { PureComponent } from 'react';
|
|
13
10
|
import { Mention } from '@atlaskit/editor-common/mention';
|
|
14
|
-
|
|
15
11
|
var MentionItem = /*#__PURE__*/function (_PureComponent) {
|
|
16
12
|
_inherits(MentionItem, _PureComponent);
|
|
17
|
-
|
|
18
13
|
var _super = _createSuper(MentionItem);
|
|
19
|
-
|
|
20
14
|
function MentionItem() {
|
|
21
15
|
_classCallCheck(this, MentionItem);
|
|
22
|
-
|
|
23
16
|
return _super.apply(this, arguments);
|
|
24
17
|
}
|
|
25
|
-
|
|
26
18
|
_createClass(MentionItem, [{
|
|
27
19
|
key: "render",
|
|
28
20
|
value: function render() {
|
|
29
21
|
var _this$props = this.props,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
eventHandlers = _this$props.eventHandlers,
|
|
23
|
+
id = _this$props.id,
|
|
24
|
+
providers = _this$props.providers,
|
|
25
|
+
text = _this$props.text,
|
|
26
|
+
accessLevel = _this$props.accessLevel;
|
|
35
27
|
return /*#__PURE__*/React.createElement(Mention, {
|
|
36
28
|
id: id,
|
|
37
29
|
text: text,
|
|
@@ -41,8 +33,6 @@ var MentionItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
41
33
|
});
|
|
42
34
|
}
|
|
43
35
|
}]);
|
|
44
|
-
|
|
45
36
|
return MentionItem;
|
|
46
37
|
}(PureComponent);
|
|
47
|
-
|
|
48
38
|
export { MentionItem as default };
|
|
@@ -8,24 +8,19 @@ import { useFeatureFlags } from '../../use-feature-flags';
|
|
|
8
8
|
export default function OrderedList(props) {
|
|
9
9
|
var featureFlags = useFeatureFlags();
|
|
10
10
|
var extraProps = {};
|
|
11
|
-
|
|
12
11
|
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists) {
|
|
13
12
|
var _props$content;
|
|
14
|
-
|
|
15
13
|
var itemCounterDigitsSize = getItemCounterDigitsSize({
|
|
16
14
|
order: props.order,
|
|
17
15
|
itemsCount: props === null || props === void 0 ? void 0 : (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
if (itemCounterDigitsSize) {
|
|
21
18
|
extraProps.style = getOrderedListInlineStyles(itemCounterDigitsSize, 'object');
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
if (props.order !== undefined) {
|
|
25
21
|
extraProps.start = resolveOrder(props.order);
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
|
-
|
|
29
24
|
return /*#__PURE__*/React.createElement("ol", _extends({
|
|
30
25
|
className: orderedListSelector.substr(1),
|
|
31
26
|
"data-indent-level": props.path ? getListIndentLevel(props.path) : 1,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
|
|
5
4
|
var _templateObject, _templateObject2;
|
|
6
|
-
|
|
7
5
|
var _excluded = ["backgroundColor", "hasIcon"];
|
|
8
|
-
|
|
9
6
|
/** @jsx jsx */
|
|
10
7
|
import React from 'react';
|
|
11
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -13,23 +10,20 @@ import TipIcon from '@atlaskit/icon/glyph/editor/hint';
|
|
|
13
10
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
14
11
|
import { getPanelBackgroundDarkModeColors, panelSharedStylesWithoutPrefix, PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
15
12
|
import EmojiIcon from '@atlaskit/icon/glyph/editor/emoji';
|
|
16
|
-
import EmojiItem from './emoji';
|
|
13
|
+
import EmojiItem from './emoji';
|
|
14
|
+
// AFP-2532 TODO: Fix automatic suppressions below
|
|
17
15
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
18
|
-
|
|
19
16
|
import { themed } from '@atlaskit/theme';
|
|
20
17
|
import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
|
|
21
|
-
|
|
22
18
|
var PanelStyled = function PanelStyled(_ref) {
|
|
23
19
|
var backgroundColor = _ref.backgroundColor,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
hasIcon = _ref.hasIcon,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
22
|
var styles = function styles(theme) {
|
|
28
23
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
29
24
|
theme: theme
|
|
30
25
|
}), PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
31
26
|
};
|
|
32
|
-
|
|
33
27
|
if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
|
|
34
28
|
styles = function styles(theme) {
|
|
35
29
|
var customStyle = themed({
|
|
@@ -43,12 +37,10 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
43
37
|
}), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
44
38
|
};
|
|
45
39
|
}
|
|
46
|
-
|
|
47
40
|
return jsx("div", _extends({
|
|
48
41
|
css: styles
|
|
49
42
|
}, props), props.children);
|
|
50
43
|
};
|
|
51
|
-
|
|
52
44
|
PanelStyled.displayName = 'PanelStyled';
|
|
53
45
|
var panelIcons = {
|
|
54
46
|
info: PanelInfoIcon,
|
|
@@ -59,20 +51,18 @@ var panelIcons = {
|
|
|
59
51
|
error: PanelErrorIcon,
|
|
60
52
|
custom: EmojiIcon
|
|
61
53
|
};
|
|
62
|
-
|
|
63
54
|
var Panel = function Panel(props) {
|
|
64
55
|
var allowCustomPanels = props.allowCustomPanels,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
type = props.panelType,
|
|
57
|
+
panelColor = props.panelColor,
|
|
58
|
+
panelIcon = props.panelIcon,
|
|
59
|
+
panelIconId = props.panelIconId,
|
|
60
|
+
panelIconText = props.panelIconText,
|
|
61
|
+
providers = props.providers,
|
|
62
|
+
children = props.children;
|
|
63
|
+
// only allow custom panel type if flag is set
|
|
72
64
|
// otherwise fall back to info if custom panel is given
|
|
73
|
-
|
|
74
65
|
var panelType = allowCustomPanels ? type : type === PanelType.CUSTOM ? PanelType.INFO : type;
|
|
75
|
-
|
|
76
66
|
var getIcon = function getIcon() {
|
|
77
67
|
if (panelType === PanelType.CUSTOM) {
|
|
78
68
|
if (panelIcon && providers) {
|
|
@@ -83,18 +73,14 @@ var Panel = function Panel(props) {
|
|
|
83
73
|
providers: providers
|
|
84
74
|
});
|
|
85
75
|
}
|
|
86
|
-
|
|
87
76
|
return null;
|
|
88
77
|
}
|
|
89
|
-
|
|
90
78
|
var Icon = panelIcons[panelType];
|
|
91
79
|
return jsx(Icon, {
|
|
92
80
|
label: "Panel ".concat(panelType)
|
|
93
81
|
});
|
|
94
82
|
};
|
|
95
|
-
|
|
96
83
|
var icon = getIcon();
|
|
97
|
-
|
|
98
84
|
var renderIcon = function renderIcon() {
|
|
99
85
|
if (icon) {
|
|
100
86
|
return jsx("div", {
|
|
@@ -102,7 +88,6 @@ var Panel = function Panel(props) {
|
|
|
102
88
|
}, icon);
|
|
103
89
|
}
|
|
104
90
|
};
|
|
105
|
-
|
|
106
91
|
return jsx(PanelStyled, {
|
|
107
92
|
className: PanelSharedCssClassName.prefix,
|
|
108
93
|
"data-panel-type": panelType,
|
|
@@ -116,5 +101,4 @@ var Panel = function Panel(props) {
|
|
|
116
101
|
className: PanelSharedCssClassName.content
|
|
117
102
|
}, children));
|
|
118
103
|
};
|
|
119
|
-
|
|
120
104
|
export default Panel;
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import Inline from './inline';
|
|
3
3
|
export default function Paragraph(_ref) {
|
|
4
4
|
var children = _ref.children,
|
|
5
|
-
|
|
5
|
+
dataAttributes = _ref.dataAttributes;
|
|
6
6
|
return /*#__PURE__*/React.createElement("p", dataAttributes, /*#__PURE__*/React.createElement(Inline, null, children));
|
|
7
7
|
}
|
|
@@ -3,34 +3,26 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
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; } }
|
|
10
|
-
|
|
11
8
|
import React from 'react';
|
|
12
9
|
import { PureComponent } from 'react';
|
|
13
10
|
import { Status as AkStatus } from '@atlaskit/status/element';
|
|
14
11
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
15
|
-
|
|
16
12
|
var Status = /*#__PURE__*/function (_PureComponent) {
|
|
17
13
|
_inherits(Status, _PureComponent);
|
|
18
|
-
|
|
19
14
|
var _super = _createSuper(Status);
|
|
20
|
-
|
|
21
15
|
function Status() {
|
|
22
16
|
_classCallCheck(this, Status);
|
|
23
|
-
|
|
24
17
|
return _super.apply(this, arguments);
|
|
25
18
|
}
|
|
26
|
-
|
|
27
19
|
_createClass(Status, [{
|
|
28
20
|
key: "render",
|
|
29
21
|
value: function render() {
|
|
30
22
|
var _this$props = this.props,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
text = _this$props.text,
|
|
24
|
+
color = _this$props.color,
|
|
25
|
+
localId = _this$props.localId;
|
|
34
26
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
35
27
|
data: {
|
|
36
28
|
userContext: 'document'
|
|
@@ -43,8 +35,6 @@ var Status = /*#__PURE__*/function (_PureComponent) {
|
|
|
43
35
|
}));
|
|
44
36
|
}
|
|
45
37
|
}]);
|
|
46
|
-
|
|
47
38
|
return Status;
|
|
48
39
|
}(PureComponent);
|
|
49
|
-
|
|
50
40
|
export { Status as default };
|
|
@@ -1,58 +1,51 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableNumberColumnWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorTableLegacyCellMinWidth, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
|
|
5
4
|
var getTableLayoutWidth = function getTableLayoutWidth(layout, opts) {
|
|
6
5
|
switch (layout) {
|
|
7
6
|
case 'full-width':
|
|
8
7
|
return akEditorFullWidthLayoutWidth;
|
|
9
|
-
|
|
10
8
|
case 'wide':
|
|
11
9
|
return akEditorWideLayoutWidth;
|
|
12
|
-
|
|
13
10
|
default:
|
|
14
11
|
return akEditorDefaultLayoutWidth;
|
|
15
12
|
}
|
|
16
13
|
};
|
|
17
|
-
|
|
18
14
|
var isTableResized = function isTableResized(columnWidths) {
|
|
19
15
|
var filteredWidths = columnWidths.filter(function (width) {
|
|
20
16
|
return width !== 0;
|
|
21
17
|
});
|
|
22
18
|
return !!filteredWidths.length;
|
|
23
19
|
};
|
|
24
|
-
|
|
25
20
|
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount) {
|
|
26
21
|
if (columnWidth === 0) {
|
|
27
22
|
return columnWidth;
|
|
28
23
|
}
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
return Math.max(
|
|
25
|
+
// We need to take tableCellBorderWidth, to avoid unneccesary overflow.
|
|
31
26
|
columnWidth - tableCellBorderWidth, zeroWidthColumnsCount ? akEditorTableLegacyCellMinWidth : tableCellMinWidth);
|
|
32
27
|
};
|
|
33
|
-
|
|
34
28
|
export var Colgroup = function Colgroup(props) {
|
|
35
29
|
var columnWidths = props.columnWidths,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
layout = props.layout,
|
|
31
|
+
isNumberColumnEnabled = props.isNumberColumnEnabled,
|
|
32
|
+
renderWidth = props.renderWidth;
|
|
40
33
|
if (!columnWidths || !isTableResized(columnWidths)) {
|
|
41
34
|
return null;
|
|
42
|
-
}
|
|
43
|
-
|
|
35
|
+
}
|
|
44
36
|
|
|
37
|
+
// @see ED-6056
|
|
45
38
|
var layoutWidth = getTableLayoutWidth(layout, {
|
|
46
39
|
containerWidth: renderWidth
|
|
47
40
|
});
|
|
48
|
-
var maxTableWidth = renderWidth < layoutWidth ? renderWidth : layoutWidth;
|
|
41
|
+
var maxTableWidth = renderWidth < layoutWidth ? renderWidth : layoutWidth;
|
|
42
|
+
|
|
43
|
+
// If table has a layout of default, it is confined by the defined column width.
|
|
49
44
|
// renderWidth is better used for breakout tables.
|
|
50
45
|
// @see ED-6737
|
|
51
|
-
|
|
52
46
|
if (layout === 'default') {
|
|
53
47
|
renderWidth = Math.min(renderWidth, layoutWidth);
|
|
54
48
|
}
|
|
55
|
-
|
|
56
49
|
var tableWidth = isNumberColumnEnabled ? akEditorTableNumberColumnWidth : 0;
|
|
57
50
|
var minTableWidth = tableWidth;
|
|
58
51
|
var zeroWidthColumnsCount = 0;
|
|
@@ -62,18 +55,16 @@ export var Colgroup = function Colgroup(props) {
|
|
|
62
55
|
} else {
|
|
63
56
|
zeroWidthColumnsCount += 1;
|
|
64
57
|
}
|
|
65
|
-
|
|
66
58
|
minTableWidth += Math.ceil(width) || akEditorTableLegacyCellMinWidth;
|
|
67
59
|
});
|
|
68
|
-
var cellMinWidth = 0;
|
|
69
|
-
|
|
60
|
+
var cellMinWidth = 0;
|
|
61
|
+
// fixes migration tables with zero-width columns
|
|
70
62
|
if (zeroWidthColumnsCount > 0) {
|
|
71
63
|
if (minTableWidth > maxTableWidth) {
|
|
72
64
|
var minWidth = Math.ceil((maxTableWidth - tableWidth) / zeroWidthColumnsCount);
|
|
73
65
|
cellMinWidth = minWidth < akEditorTableLegacyCellMinWidth ? akEditorTableLegacyCellMinWidth : minWidth;
|
|
74
66
|
}
|
|
75
67
|
}
|
|
76
|
-
|
|
77
68
|
return /*#__PURE__*/React.createElement("colgroup", null, isNumberColumnEnabled && /*#__PURE__*/React.createElement("col", {
|
|
78
69
|
style: {
|
|
79
70
|
width: akEditorTableNumberColumnWidth
|
|
@@ -2,9 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
|
-
|
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
7
|
-
|
|
8
6
|
/** @jsx jsx */
|
|
9
7
|
import React from 'react';
|
|
10
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -18,16 +16,16 @@ var modeSpecficStyles = {
|
|
|
18
16
|
none: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: none;\n "]))),
|
|
19
17
|
stick: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n "]))),
|
|
20
18
|
'pin-bottom': css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n "])))
|
|
21
|
-
};
|
|
19
|
+
};
|
|
22
20
|
|
|
21
|
+
// TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
23
22
|
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
|
|
24
23
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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, akEditorStickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
|
|
25
24
|
};
|
|
26
|
-
|
|
27
25
|
export var FixedTableDiv = function FixedTableDiv(props) {
|
|
28
26
|
var top = props.top,
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
wrapperWidth = props.wrapperWidth,
|
|
28
|
+
mode = props.mode;
|
|
31
29
|
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
|
|
32
30
|
var attrs = {
|
|
33
31
|
mode: mode
|
|
@@ -39,18 +37,18 @@ export var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
39
37
|
};
|
|
40
38
|
export var StickyTable = function StickyTable(_ref) {
|
|
41
39
|
var top = _ref.top,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
left = _ref.left,
|
|
41
|
+
mode = _ref.mode,
|
|
42
|
+
shadowClassNames = _ref.shadowClassNames,
|
|
43
|
+
innerRef = _ref.innerRef,
|
|
44
|
+
wrapperWidth = _ref.wrapperWidth,
|
|
45
|
+
tableWidth = _ref.tableWidth,
|
|
46
|
+
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
47
|
+
layout = _ref.layout,
|
|
48
|
+
children = _ref.children,
|
|
49
|
+
columnWidths = _ref.columnWidths,
|
|
50
|
+
renderWidth = _ref.renderWidth,
|
|
51
|
+
rowHeight = _ref.rowHeight;
|
|
54
52
|
return jsx("div", {
|
|
55
53
|
css: {
|
|
56
54
|
left: left && left < 0 ? left : undefined,
|
|
@@ -89,37 +87,30 @@ export var StickyTable = function StickyTable(_ref) {
|
|
|
89
87
|
invisible: true
|
|
90
88
|
}))))));
|
|
91
89
|
};
|
|
90
|
+
|
|
92
91
|
/**
|
|
93
92
|
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
94
93
|
*/
|
|
95
|
-
|
|
96
94
|
function findHorizontalOverflowScrollParent(table) {
|
|
97
95
|
var parent = table;
|
|
98
|
-
|
|
99
96
|
if (!parent) {
|
|
100
97
|
return null;
|
|
101
98
|
}
|
|
102
|
-
|
|
103
99
|
while (parent = parent.parentElement) {
|
|
104
100
|
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
105
101
|
var style = window.getComputedStyle(parent);
|
|
106
|
-
|
|
107
102
|
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
108
103
|
return parent;
|
|
109
104
|
}
|
|
110
105
|
}
|
|
111
|
-
|
|
112
106
|
return null;
|
|
113
107
|
}
|
|
114
|
-
|
|
115
108
|
export var OverflowParent = /*#__PURE__*/function () {
|
|
116
109
|
function OverflowParent(ref) {
|
|
117
110
|
_classCallCheck(this, OverflowParent);
|
|
118
|
-
|
|
119
111
|
this.ref = ref;
|
|
120
112
|
this.ref = ref;
|
|
121
113
|
}
|
|
122
|
-
|
|
123
114
|
_createClass(OverflowParent, [{
|
|
124
115
|
key: "isElement",
|
|
125
116
|
get: function get() {
|
|
@@ -131,29 +122,24 @@ export var OverflowParent = /*#__PURE__*/function () {
|
|
|
131
122
|
if (this.ref instanceof HTMLElement) {
|
|
132
123
|
return this.ref.getBoundingClientRect().top;
|
|
133
124
|
}
|
|
134
|
-
|
|
135
125
|
return 0;
|
|
136
126
|
}
|
|
137
127
|
}, {
|
|
138
128
|
key: "addEventListener",
|
|
139
129
|
value: function addEventListener(type, cb) {
|
|
140
130
|
var _this$ref;
|
|
141
|
-
|
|
142
131
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
143
132
|
args[_key - 2] = arguments[_key];
|
|
144
133
|
}
|
|
145
|
-
|
|
146
134
|
(_this$ref = this.ref).addEventListener.apply(_this$ref, [type, cb].concat(args));
|
|
147
135
|
}
|
|
148
136
|
}, {
|
|
149
137
|
key: "removeEventListener",
|
|
150
138
|
value: function removeEventListener(type, cb) {
|
|
151
139
|
var _this$ref2;
|
|
152
|
-
|
|
153
140
|
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
154
141
|
args[_key2 - 2] = arguments[_key2];
|
|
155
142
|
}
|
|
156
|
-
|
|
157
143
|
(_this$ref2 = this.ref).removeEventListener.apply(_this$ref2, [type, cb].concat(args));
|
|
158
144
|
}
|
|
159
145
|
}], [{
|
|
@@ -162,6 +148,5 @@ export var OverflowParent = /*#__PURE__*/function () {
|
|
|
162
148
|
return new OverflowParent(findHorizontalOverflowScrollParent(el) || window);
|
|
163
149
|
}
|
|
164
150
|
}]);
|
|
165
|
-
|
|
166
151
|
return OverflowParent;
|
|
167
152
|
}();
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { Colgroup } from './colgroup';
|
|
3
3
|
export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
4
4
|
var innerRef = _ref.innerRef,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
6
|
+
columnWidths = _ref.columnWidths,
|
|
7
|
+
layout = _ref.layout,
|
|
8
|
+
renderWidth = _ref.renderWidth,
|
|
9
|
+
children = _ref.children;
|
|
10
10
|
return /*#__PURE__*/React.createElement("table", {
|
|
11
11
|
"data-number-column": isNumberColumnEnabled,
|
|
12
12
|
ref: innerRef
|