@atlaskit/renderer 105.1.0 → 105.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/actions/index.js +19 -71
- package/dist/cjs/actions/matches-utils.js +10 -11
- package/dist/cjs/actions.js +0 -2
- package/dist/cjs/analytics/analyticsContext.js +0 -4
- package/dist/cjs/analytics/events.js +0 -5
- package/dist/cjs/analytics/unsupported-content.js +14 -27
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -26
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/react/hooks/use-bidi-warnings.js +2 -12
- package/dist/cjs/react/hooks/use-in-viewport.js +4 -17
- package/dist/cjs/react/hooks/use-observed-width.js +20 -35
- package/dist/cjs/react/index.js +27 -114
- package/dist/cjs/react/marks/alignment.js +0 -9
- package/dist/cjs/react/marks/annotation.js +6 -21
- package/dist/cjs/react/marks/breakout.js +0 -9
- package/dist/cjs/react/marks/code.js +0 -11
- package/dist/cjs/react/marks/confluence-inline-comment.js +2 -19
- package/dist/cjs/react/marks/data-consumer.js +0 -4
- package/dist/cjs/react/marks/em.js +0 -3
- package/dist/cjs/react/marks/fragment.js +0 -4
- package/dist/cjs/react/marks/indentation.js +0 -3
- package/dist/cjs/react/marks/index.js +1 -24
- package/dist/cjs/react/marks/link.js +5 -25
- package/dist/cjs/react/marks/strike.js +0 -4
- package/dist/cjs/react/marks/strong.js +0 -3
- package/dist/cjs/react/marks/subsup.js +0 -5
- package/dist/cjs/react/marks/textColor.js +0 -9
- package/dist/cjs/react/marks/underline.js +0 -3
- package/dist/cjs/react/marks/unsupportedMark.js +0 -3
- package/dist/cjs/react/marks/unsupportedNodeAttribute.js +0 -3
- package/dist/cjs/react/nodes/blockCard.js +4 -16
- package/dist/cjs/react/nodes/blockquote.js +0 -3
- package/dist/cjs/react/nodes/bodiedExtension.js +6 -17
- package/dist/cjs/react/nodes/bulletList.js +0 -5
- package/dist/cjs/react/nodes/caption.js +1 -6
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +5 -14
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -16
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -23
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +9 -32
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +7 -31
- package/dist/cjs/react/nodes/date.js +5 -33
- package/dist/cjs/react/nodes/decisionItem.js +1 -5
- package/dist/cjs/react/nodes/decisionList.js +0 -20
- package/dist/cjs/react/nodes/doc.js +0 -6
- package/dist/cjs/react/nodes/embedCard.js +25 -54
- package/dist/cjs/react/nodes/emoji.js +6 -24
- package/dist/cjs/react/nodes/extension.js +12 -26
- package/dist/cjs/react/nodes/fallback.js +2 -24
- package/dist/cjs/react/nodes/hardBreak.js +1 -7
- package/dist/cjs/react/nodes/heading-anchor.js +1 -46
- package/dist/cjs/react/nodes/heading.js +4 -17
- package/dist/cjs/react/nodes/index.js +7 -62
- package/dist/cjs/react/nodes/inline.js +0 -6
- package/dist/cjs/react/nodes/inlineCard.js +6 -23
- package/dist/cjs/react/nodes/inlineExtension.js +2 -10
- package/dist/cjs/react/nodes/layoutColumn.js +0 -8
- package/dist/cjs/react/nodes/layoutSection.js +0 -3
- package/dist/cjs/react/nodes/listItem.js +0 -3
- package/dist/cjs/react/nodes/media.js +10 -49
- package/dist/cjs/react/nodes/mediaGroup.js +6 -47
- package/dist/cjs/react/nodes/mediaInline.js +7 -37
- package/dist/cjs/react/nodes/mediaSingle/index.js +38 -85
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -5
- package/dist/cjs/react/nodes/mention.js +5 -23
- package/dist/cjs/react/nodes/orderedList.js +0 -14
- package/dist/cjs/react/nodes/panel.js +10 -38
- package/dist/cjs/react/nodes/paragraph.js +1 -5
- package/dist/cjs/react/nodes/placeholder.js +0 -4
- package/dist/cjs/react/nodes/rule.js +0 -3
- package/dist/cjs/react/nodes/status.js +3 -22
- package/dist/cjs/react/nodes/table/colgroup.js +12 -26
- package/dist/cjs/react/nodes/table/sticky.js +17 -47
- package/dist/cjs/react/nodes/table/table.js +5 -10
- package/dist/cjs/react/nodes/table.js +19 -102
- package/dist/cjs/react/nodes/tableCell.js +26 -79
- package/dist/cjs/react/nodes/tableRow.js +4 -33
- package/dist/cjs/react/nodes/task-item-with-providers.js +4 -40
- package/dist/cjs/react/nodes/taskItem.js +8 -36
- package/dist/cjs/react/nodes/taskList.js +2 -22
- package/dist/cjs/react/nodes/text-wrapper.js +1 -8
- package/dist/cjs/react/nodes/unknownBlock.js +0 -3
- package/dist/cjs/react/renderer-node.js +0 -6
- package/dist/cjs/react/utils/clipboard.js +0 -3
- package/dist/cjs/react/utils/element-selection.js +0 -13
- package/dist/cjs/react/utils/getCardClickHandler.js +0 -3
- package/dist/cjs/react/utils/inject-props.js +4 -9
- package/dist/cjs/react/utils/links.js +2 -6
- package/dist/cjs/react/utils/lists.js +0 -1
- package/dist/cjs/react/utils/performance/RenderTracking.js +2 -10
- package/dist/cjs/react/utils/use-select-all-trap.js +1 -23
- package/dist/cjs/render-document.js +42 -83
- package/dist/cjs/renderer-context.js +0 -5
- package/dist/cjs/steps/index.js +7 -39
- package/dist/cjs/text/index.js +0 -9
- package/dist/cjs/text/nodes/blockquote.js +0 -3
- package/dist/cjs/text/nodes/bulletList.js +0 -3
- package/dist/cjs/text/nodes/date.js +0 -4
- package/dist/cjs/text/nodes/decisionItem.js +0 -5
- package/dist/cjs/text/nodes/hardBreak.js +0 -2
- package/dist/cjs/text/nodes/heading.js +0 -3
- package/dist/cjs/text/nodes/index.js +0 -21
- package/dist/cjs/text/nodes/inlineCard.js +0 -4
- package/dist/cjs/text/nodes/listItem.js +0 -3
- package/dist/cjs/text/nodes/mediaGroup.js +0 -4
- package/dist/cjs/text/nodes/mention.js +0 -3
- package/dist/cjs/text/nodes/orderedList.js +0 -4
- package/dist/cjs/text/nodes/panel.js +0 -3
- package/dist/cjs/text/nodes/paragraph.js +0 -5
- package/dist/cjs/text/nodes/rule.js +0 -2
- package/dist/cjs/text/nodes/status.js +0 -3
- package/dist/cjs/text/nodes/table.js +0 -5
- package/dist/cjs/text/nodes/taskItem.js +0 -5
- package/dist/cjs/text/nodes/unknown.js +0 -6
- package/dist/cjs/text-serializer.js +0 -2
- package/dist/cjs/ui/Expand.js +15 -59
- package/dist/cjs/ui/ExtensionRenderer.js +10 -43
- package/dist/cjs/ui/MediaCard.js +40 -116
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +0 -26
- package/dist/cjs/ui/Renderer/breakout-ssr.js +6 -32
- package/dist/cjs/ui/Renderer/click-to-edit.js +0 -6
- package/dist/cjs/ui/Renderer/index.js +47 -149
- package/dist/cjs/ui/Renderer/style.js +1 -39
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +12 -30
- package/dist/cjs/ui/RendererActionsContext/WithRendererActions.js +0 -4
- package/dist/cjs/ui/RendererActionsContext/index.js +1 -11
- package/dist/cjs/ui/SmartCardStorage.js +0 -20
- package/dist/cjs/ui/SortingIcon.js +10 -40
- package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -11
- package/dist/cjs/ui/TaskItemsFormatContext/index.js +0 -1
- package/dist/cjs/ui/active-header-id-provider.js +6 -19
- package/dist/cjs/ui/annotations/context.js +0 -24
- package/dist/cjs/ui/annotations/draft/component.js +5 -42
- package/dist/cjs/ui/annotations/draft/dom.js +3 -17
- package/dist/cjs/ui/annotations/draft/index.js +0 -2
- package/dist/cjs/ui/annotations/draft/position.js +1 -12
- package/dist/cjs/ui/annotations/draft/text.js +2 -8
- package/dist/cjs/ui/annotations/element/index.js +4 -16
- package/dist/cjs/ui/annotations/element/mark.js +8 -26
- package/dist/cjs/ui/annotations/hooks/index.js +0 -3
- package/dist/cjs/ui/annotations/hooks/use-events.js +13 -45
- package/dist/cjs/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -6
- package/dist/cjs/ui/annotations/hooks/use-inline-comments-filter.js +1 -8
- package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +4 -19
- package/dist/cjs/ui/annotations/hooks/user-selection.js +3 -18
- package/dist/cjs/ui/annotations/hooks/utils.js +0 -2
- package/dist/cjs/ui/annotations/index.js +4 -20
- package/dist/cjs/ui/annotations/selection/index.js +0 -1
- package/dist/cjs/ui/annotations/selection/mounter.js +13 -42
- package/dist/cjs/ui/annotations/selection/range-validator.js +9 -23
- package/dist/cjs/ui/annotations/selection/wrapper.js +3 -13
- package/dist/cjs/ui/annotations/types.js +0 -1
- package/dist/cjs/ui/annotations/view/index.js +1 -12
- package/dist/cjs/ui/index.js +0 -2
- package/dist/cjs/use-feature-flags.js +0 -4
- package/dist/cjs/utils.js +1 -19
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +6 -50
- package/dist/es2019/actions/matches-utils.js +10 -9
- package/dist/es2019/actions.js +2 -1
- package/dist/es2019/analytics/events.js +0 -5
- package/dist/es2019/analytics/unsupported-content.js +8 -14
- package/dist/es2019/react/hooks/use-bidi-warnings.js +0 -2
- package/dist/es2019/react/hooks/use-in-viewport.js +0 -1
- package/dist/es2019/react/hooks/use-observed-width.js +0 -2
- package/dist/es2019/react/index.js +44 -119
- package/dist/es2019/react/marks/alignment.js +0 -3
- package/dist/es2019/react/marks/annotation.js +2 -5
- package/dist/es2019/react/marks/confluence-inline-comment.js +0 -1
- package/dist/es2019/react/marks/index.js +2 -1
- package/dist/es2019/react/marks/link.js +0 -6
- package/dist/es2019/react/marks/subsup.js +0 -3
- package/dist/es2019/react/nodes/bodiedExtension.js +2 -5
- package/dist/es2019/react/nodes/caption.js +0 -2
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +0 -2
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -3
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +1 -6
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +0 -4
- package/dist/es2019/react/nodes/date.js +0 -7
- package/dist/es2019/react/nodes/decisionList.js +0 -3
- package/dist/es2019/react/nodes/embedCard.js +8 -16
- package/dist/es2019/react/nodes/emoji.js +0 -1
- package/dist/es2019/react/nodes/extension.js +4 -6
- package/dist/es2019/react/nodes/fallback.js +0 -8
- package/dist/es2019/react/nodes/hardBreak.js +0 -3
- package/dist/es2019/react/nodes/heading-anchor.js +0 -15
- package/dist/es2019/react/nodes/heading.js +0 -6
- package/dist/es2019/react/nodes/index.js +28 -61
- package/dist/es2019/react/nodes/inline.js +0 -2
- package/dist/es2019/react/nodes/inlineCard.js +0 -5
- package/dist/es2019/react/nodes/inlineExtension.js +2 -5
- package/dist/es2019/react/nodes/media.js +0 -10
- package/dist/es2019/react/nodes/mediaGroup.js +2 -22
- package/dist/es2019/react/nodes/mediaInline.js +1 -8
- package/dist/es2019/react/nodes/mediaSingle/index.js +8 -29
- package/dist/es2019/react/nodes/mention.js +0 -1
- package/dist/es2019/react/nodes/orderedList.js +0 -5
- package/dist/es2019/react/nodes/panel.js +4 -17
- package/dist/es2019/react/nodes/placeholder.js +0 -1
- package/dist/es2019/react/nodes/status.js +0 -1
- package/dist/es2019/react/nodes/table/colgroup.js +9 -18
- package/dist/es2019/react/nodes/table/sticky.js +3 -16
- package/dist/es2019/react/nodes/table.js +9 -75
- package/dist/es2019/react/nodes/tableCell.js +4 -31
- package/dist/es2019/react/nodes/tableRow.js +0 -10
- package/dist/es2019/react/nodes/task-item-with-providers.js +0 -6
- package/dist/es2019/react/nodes/taskItem.js +0 -7
- package/dist/es2019/react/nodes/taskList.js +0 -3
- package/dist/es2019/react/nodes/text-wrapper.js +0 -4
- package/dist/es2019/react/utils/clipboard.js +0 -1
- package/dist/es2019/react/utils/element-selection.js +0 -12
- package/dist/es2019/react/utils/inject-props.js +5 -7
- package/dist/es2019/react/utils/links.js +2 -4
- package/dist/es2019/react/utils/performance/RenderTracking.js +0 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +0 -7
- package/dist/es2019/render-document.js +16 -33
- package/dist/es2019/steps/index.js +4 -33
- package/dist/es2019/text/index.js +0 -3
- package/dist/es2019/text/nodes/blockquote.js +0 -2
- package/dist/es2019/text/nodes/bulletList.js +0 -2
- package/dist/es2019/text/nodes/date.js +0 -2
- package/dist/es2019/text/nodes/decisionItem.js +0 -4
- package/dist/es2019/text/nodes/hardBreak.js +0 -1
- package/dist/es2019/text/nodes/heading.js +0 -2
- package/dist/es2019/text/nodes/inlineCard.js +0 -3
- package/dist/es2019/text/nodes/listItem.js +0 -2
- package/dist/es2019/text/nodes/mediaGroup.js +0 -3
- package/dist/es2019/text/nodes/mention.js +0 -2
- package/dist/es2019/text/nodes/orderedList.js +0 -2
- package/dist/es2019/text/nodes/panel.js +0 -2
- package/dist/es2019/text/nodes/paragraph.js +0 -4
- package/dist/es2019/text/nodes/rule.js +0 -1
- package/dist/es2019/text/nodes/status.js +0 -2
- package/dist/es2019/text/nodes/table.js +0 -4
- package/dist/es2019/text/nodes/taskItem.js +0 -4
- package/dist/es2019/text/nodes/unknown.js +0 -4
- package/dist/es2019/ui/Expand.js +2 -17
- package/dist/es2019/ui/ExtensionRenderer.js +0 -19
- package/dist/es2019/ui/MediaCard.js +9 -40
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +0 -10
- package/dist/es2019/ui/Renderer/breakout-ssr.js +6 -26
- package/dist/es2019/ui/Renderer/click-to-edit.js +1 -4
- package/dist/es2019/ui/Renderer/index.js +17 -66
- package/dist/es2019/ui/Renderer/style.js +0 -14
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -6
- package/dist/es2019/ui/SmartCardStorage.js +0 -1
- package/dist/es2019/ui/SortingIcon.js +3 -20
- package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
- package/dist/es2019/ui/active-header-id-provider.js +0 -3
- package/dist/es2019/ui/annotations/context.js +0 -6
- package/dist/es2019/ui/annotations/draft/component.js +0 -13
- package/dist/es2019/ui/annotations/draft/dom.js +0 -6
- package/dist/es2019/ui/annotations/draft/position.js +0 -8
- package/dist/es2019/ui/annotations/draft/text.js +0 -1
- package/dist/es2019/ui/annotations/element/index.js +0 -3
- package/dist/es2019/ui/annotations/element/mark.js +4 -6
- package/dist/es2019/ui/annotations/hooks/use-events.js +4 -13
- package/dist/es2019/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
- package/dist/es2019/ui/annotations/hooks/use-inline-comments-filter.js +0 -1
- package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +4 -8
- package/dist/es2019/ui/annotations/hooks/user-selection.js +0 -6
- package/dist/es2019/ui/annotations/selection/mounter.js +0 -13
- package/dist/es2019/ui/annotations/selection/range-validator.js +0 -2
- package/dist/es2019/ui/annotations/selection/wrapper.js +0 -2
- package/dist/es2019/ui/annotations/types.js +0 -1
- package/dist/es2019/ui/annotations/view/index.js +0 -4
- package/dist/es2019/use-feature-flags.js +0 -1
- package/dist/es2019/utils.js +1 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +19 -63
- package/dist/esm/actions/matches-utils.js +10 -9
- package/dist/esm/actions.js +2 -1
- package/dist/esm/analytics/events.js +0 -5
- package/dist/esm/analytics/unsupported-content.js +14 -21
- package/dist/esm/react/hooks/use-bidi-warnings.js +2 -4
- package/dist/esm/react/hooks/use-in-viewport.js +4 -13
- package/dist/esm/react/hooks/use-observed-width.js +20 -29
- package/dist/esm/react/index.js +27 -111
- package/dist/esm/react/marks/alignment.js +0 -4
- package/dist/esm/react/marks/annotation.js +6 -14
- package/dist/esm/react/marks/breakout.js +0 -2
- package/dist/esm/react/marks/confluence-inline-comment.js +2 -12
- package/dist/esm/react/marks/index.js +2 -1
- package/dist/esm/react/marks/link.js +5 -12
- package/dist/esm/react/marks/subsup.js +0 -3
- package/dist/esm/react/nodes/blockCard.js +4 -4
- package/dist/esm/react/nodes/bodiedExtension.js +6 -10
- package/dist/esm/react/nodes/caption.js +1 -3
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +4 -6
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +4 -8
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -10
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +10 -21
- package/dist/esm/react/nodes/codeBlockCopyButton.js +7 -15
- package/dist/esm/react/nodes/date.js +5 -20
- package/dist/esm/react/nodes/decisionItem.js +1 -1
- package/dist/esm/react/nodes/decisionList.js +0 -12
- package/dist/esm/react/nodes/embedCard.js +25 -39
- package/dist/esm/react/nodes/emoji.js +6 -16
- package/dist/esm/react/nodes/extension.js +12 -16
- package/dist/esm/react/nodes/fallback.js +2 -18
- package/dist/esm/react/nodes/hardBreak.js +1 -5
- package/dist/esm/react/nodes/heading-anchor.js +1 -32
- package/dist/esm/react/nodes/heading.js +4 -10
- package/dist/esm/react/nodes/index.js +26 -64
- package/dist/esm/react/nodes/inline.js +0 -2
- package/dist/esm/react/nodes/inlineCard.js +6 -12
- package/dist/esm/react/nodes/inlineExtension.js +2 -6
- package/dist/esm/react/nodes/layoutColumn.js +0 -2
- package/dist/esm/react/nodes/media.js +10 -34
- package/dist/esm/react/nodes/mediaGroup.js +6 -37
- package/dist/esm/react/nodes/mediaInline.js +7 -20
- package/dist/esm/react/nodes/mediaSingle/index.js +37 -66
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -2
- package/dist/esm/react/nodes/mention.js +5 -15
- package/dist/esm/react/nodes/orderedList.js +0 -5
- package/dist/esm/react/nodes/panel.js +12 -28
- package/dist/esm/react/nodes/paragraph.js +1 -1
- package/dist/esm/react/nodes/placeholder.js +0 -1
- package/dist/esm/react/nodes/status.js +3 -13
- package/dist/esm/react/nodes/table/colgroup.js +12 -21
- package/dist/esm/react/nodes/table/sticky.js +17 -32
- package/dist/esm/react/nodes/table/table.js +5 -5
- package/dist/esm/react/nodes/table.js +19 -95
- package/dist/esm/react/nodes/tableCell.js +26 -66
- package/dist/esm/react/nodes/tableRow.js +4 -25
- package/dist/esm/react/nodes/task-item-with-providers.js +4 -27
- package/dist/esm/react/nodes/taskItem.js +8 -24
- package/dist/esm/react/nodes/taskList.js +2 -14
- package/dist/esm/react/nodes/text-wrapper.js +1 -5
- package/dist/esm/react/utils/clipboard.js +0 -1
- package/dist/esm/react/utils/element-selection.js +0 -10
- package/dist/esm/react/utils/inject-props.js +5 -7
- package/dist/esm/react/utils/links.js +2 -4
- package/dist/esm/react/utils/performance/RenderTracking.js +2 -4
- package/dist/esm/react/utils/use-select-all-trap.js +1 -9
- package/dist/esm/render-document.js +42 -70
- package/dist/esm/steps/index.js +7 -36
- package/dist/esm/text/index.js +0 -6
- package/dist/esm/text/nodes/blockquote.js +0 -2
- package/dist/esm/text/nodes/bulletList.js +0 -2
- package/dist/esm/text/nodes/date.js +0 -2
- package/dist/esm/text/nodes/decisionItem.js +0 -4
- package/dist/esm/text/nodes/hardBreak.js +0 -1
- package/dist/esm/text/nodes/heading.js +0 -2
- package/dist/esm/text/nodes/inlineCard.js +0 -3
- package/dist/esm/text/nodes/listItem.js +0 -2
- package/dist/esm/text/nodes/mediaGroup.js +0 -3
- package/dist/esm/text/nodes/mention.js +0 -2
- package/dist/esm/text/nodes/orderedList.js +0 -2
- package/dist/esm/text/nodes/panel.js +0 -2
- package/dist/esm/text/nodes/paragraph.js +0 -4
- package/dist/esm/text/nodes/rule.js +0 -1
- package/dist/esm/text/nodes/status.js +0 -2
- package/dist/esm/text/nodes/table.js +0 -4
- package/dist/esm/text/nodes/taskItem.js +0 -4
- package/dist/esm/text/nodes/unknown.js +0 -4
- package/dist/esm/ui/Expand.js +15 -36
- package/dist/esm/ui/ExtensionRenderer.js +10 -39
- package/dist/esm/ui/MediaCard.js +42 -99
- package/dist/esm/ui/Renderer/ErrorBoundary.js +0 -16
- package/dist/esm/ui/Renderer/breakout-ssr.js +7 -27
- package/dist/esm/ui/Renderer/click-to-edit.js +1 -4
- package/dist/esm/ui/Renderer/index.js +47 -110
- package/dist/esm/ui/Renderer/style.js +1 -21
- package/dist/esm/ui/Renderer/truncated-wrapper.js +12 -23
- package/dist/esm/ui/RendererActionsContext/index.js +1 -1
- package/dist/esm/ui/SmartCardStorage.js +0 -9
- package/dist/esm/ui/SortingIcon.js +10 -29
- package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
- package/dist/esm/ui/active-header-id-provider.js +6 -12
- package/dist/esm/ui/annotations/context.js +0 -15
- package/dist/esm/ui/annotations/draft/component.js +5 -19
- package/dist/esm/ui/annotations/draft/dom.js +3 -11
- package/dist/esm/ui/annotations/draft/position.js +1 -9
- package/dist/esm/ui/annotations/draft/text.js +2 -4
- package/dist/esm/ui/annotations/element/index.js +4 -7
- package/dist/esm/ui/annotations/element/mark.js +8 -14
- package/dist/esm/ui/annotations/hooks/use-events.js +13 -32
- package/dist/esm/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
- package/dist/esm/ui/annotations/hooks/use-inline-comments-filter.js +1 -2
- package/dist/esm/ui/annotations/hooks/use-load-annotations.js +4 -12
- package/dist/esm/ui/annotations/hooks/user-selection.js +3 -11
- package/dist/esm/ui/annotations/index.js +4 -6
- package/dist/esm/ui/annotations/selection/mounter.js +13 -29
- package/dist/esm/ui/annotations/selection/range-validator.js +9 -12
- package/dist/esm/ui/annotations/selection/wrapper.js +3 -5
- package/dist/esm/ui/annotations/types.js +0 -1
- package/dist/esm/ui/annotations/view/index.js +1 -5
- package/dist/esm/use-feature-flags.js +0 -1
- package/dist/esm/utils.js +1 -8
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
|
@@ -5,52 +5,38 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
|
|
11
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
|
|
13
10
|
import React from 'react';
|
|
14
11
|
import { compose } from '@atlaskit/editor-common/utils';
|
|
15
12
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
16
13
|
import { RendererCssClassName } from '../../consts';
|
|
17
|
-
|
|
18
14
|
var TableRow = /*#__PURE__*/function (_React$Component) {
|
|
19
15
|
_inherits(TableRow, _React$Component);
|
|
20
|
-
|
|
21
16
|
var _super = _createSuper(TableRow);
|
|
22
|
-
|
|
23
17
|
function TableRow() {
|
|
24
18
|
var _this;
|
|
25
|
-
|
|
26
19
|
_classCallCheck(this, TableRow);
|
|
27
|
-
|
|
28
20
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
21
|
args[_key] = arguments[_key];
|
|
30
22
|
}
|
|
31
|
-
|
|
32
23
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
33
|
-
|
|
34
24
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
35
25
|
colGroupWidths: []
|
|
36
26
|
});
|
|
37
|
-
|
|
38
27
|
_defineProperty(_assertThisInitialized(_this), "addSortableColumn", function (childrenArray) {
|
|
39
28
|
var _this$props = _this.props,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
allowColumnSorting = _this$props.allowColumnSorting,
|
|
30
|
+
rowIndex = _this$props.index;
|
|
43
31
|
if (allowColumnSorting) {
|
|
44
32
|
var isHeaderRow = !rowIndex;
|
|
45
33
|
childrenArray = childrenArray.map(function (child, index) {
|
|
46
34
|
if ( /*#__PURE__*/React.isValidElement(child)) {
|
|
47
35
|
var tableOrderStatus = _this.props.tableOrderStatus;
|
|
48
36
|
var sortOrdered = SortOrder.NO_ORDER;
|
|
49
|
-
|
|
50
37
|
if (tableOrderStatus) {
|
|
51
38
|
sortOrdered = index === tableOrderStatus.columnIndex ? tableOrderStatus.order : SortOrder.NO_ORDER;
|
|
52
39
|
}
|
|
53
|
-
|
|
54
40
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
55
41
|
columnIndex: index,
|
|
56
42
|
onSorting: _this.props.onSorting,
|
|
@@ -60,10 +46,8 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
60
46
|
}
|
|
61
47
|
});
|
|
62
48
|
}
|
|
63
|
-
|
|
64
49
|
return childrenArray;
|
|
65
50
|
});
|
|
66
|
-
|
|
67
51
|
_defineProperty(_assertThisInitialized(_this), "addColGroupWidth", function (childrenArray) {
|
|
68
52
|
if (_this.state.colGroupWidths) {
|
|
69
53
|
childrenArray = childrenArray.map(function (child, index) {
|
|
@@ -74,19 +58,16 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
74
58
|
}
|
|
75
59
|
});
|
|
76
60
|
}
|
|
77
|
-
|
|
78
61
|
return childrenArray;
|
|
79
62
|
});
|
|
80
|
-
|
|
81
63
|
return _this;
|
|
82
64
|
}
|
|
83
|
-
|
|
84
65
|
_createClass(TableRow, [{
|
|
85
66
|
key: "render",
|
|
86
67
|
value: function render() {
|
|
87
68
|
var _this$props2 = this.props,
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
children = _this$props2.children,
|
|
70
|
+
innerRef = _this$props2.innerRef;
|
|
90
71
|
var childrenArray = React.Children.toArray(children);
|
|
91
72
|
return /*#__PURE__*/React.createElement("tr", {
|
|
92
73
|
ref: innerRef
|
|
@@ -95,8 +76,6 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
95
76
|
}, this.props.index), compose(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
|
|
96
77
|
}
|
|
97
78
|
}]);
|
|
98
|
-
|
|
99
79
|
return TableRow;
|
|
100
80
|
}(React.Component);
|
|
101
|
-
|
|
102
81
|
export { TableRow as default };
|
|
@@ -10,38 +10,26 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
11
|
var _excluded = ["contextIdentifierProvider", "objectAri", "isRenderer"];
|
|
12
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
13
|
-
|
|
14
13
|
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); }; }
|
|
15
|
-
|
|
16
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17
|
-
|
|
18
15
|
import React from 'react';
|
|
19
16
|
import { Component } from 'react';
|
|
20
17
|
import { ResourcedTaskItem } from '@atlaskit/task-decision';
|
|
21
|
-
|
|
22
18
|
var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
23
19
|
_inherits(TaskItemWithProviders, _Component);
|
|
24
|
-
|
|
25
20
|
var _super = _createSuper(TaskItemWithProviders);
|
|
26
|
-
|
|
27
21
|
function TaskItemWithProviders() {
|
|
28
22
|
var _this;
|
|
29
|
-
|
|
30
23
|
_classCallCheck(this, TaskItemWithProviders);
|
|
31
|
-
|
|
32
24
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33
25
|
args[_key] = arguments[_key];
|
|
34
26
|
}
|
|
35
|
-
|
|
36
27
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
37
|
-
|
|
38
28
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
39
29
|
resolvedContextProvider: undefined
|
|
40
30
|
});
|
|
41
|
-
|
|
42
31
|
return _this;
|
|
43
32
|
}
|
|
44
|
-
|
|
45
33
|
_createClass(TaskItemWithProviders, [{
|
|
46
34
|
key: "UNSAFE_componentWillMount",
|
|
47
35
|
value: function UNSAFE_componentWillMount() {
|
|
@@ -67,11 +55,9 @@ var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
|
67
55
|
_context.next = 13;
|
|
68
56
|
break;
|
|
69
57
|
}
|
|
70
|
-
|
|
71
58
|
_context.prev = 1;
|
|
72
59
|
_context.next = 4;
|
|
73
60
|
return props.contextIdentifierProvider;
|
|
74
|
-
|
|
75
61
|
case 4:
|
|
76
62
|
resolvedContextProvider = _context.sent;
|
|
77
63
|
this.setState({
|
|
@@ -79,23 +65,19 @@ var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
|
79
65
|
});
|
|
80
66
|
_context.next = 11;
|
|
81
67
|
break;
|
|
82
|
-
|
|
83
68
|
case 8:
|
|
84
69
|
_context.prev = 8;
|
|
85
70
|
_context.t0 = _context["catch"](1);
|
|
86
71
|
this.setState({
|
|
87
72
|
resolvedContextProvider: undefined
|
|
88
73
|
});
|
|
89
|
-
|
|
90
74
|
case 11:
|
|
91
75
|
_context.next = 14;
|
|
92
76
|
break;
|
|
93
|
-
|
|
94
77
|
case 13:
|
|
95
78
|
this.setState({
|
|
96
79
|
resolvedContextProvider: undefined
|
|
97
80
|
});
|
|
98
|
-
|
|
99
81
|
case 14:
|
|
100
82
|
case "end":
|
|
101
83
|
return _context.stop();
|
|
@@ -103,22 +85,19 @@ var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
|
103
85
|
}
|
|
104
86
|
}, _callee, this, [[1, 8]]);
|
|
105
87
|
}));
|
|
106
|
-
|
|
107
88
|
function updateContextIdentifierProvider(_x) {
|
|
108
89
|
return _updateContextIdentifierProvider.apply(this, arguments);
|
|
109
90
|
}
|
|
110
|
-
|
|
111
91
|
return updateContextIdentifierProvider;
|
|
112
92
|
}()
|
|
113
93
|
}, {
|
|
114
94
|
key: "render",
|
|
115
95
|
value: function render() {
|
|
116
96
|
var _this$props = this.props,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
97
|
+
contextIdentifierProvider = _this$props.contextIdentifierProvider,
|
|
98
|
+
objectAri = _this$props.objectAri,
|
|
99
|
+
isRenderer = _this$props.isRenderer,
|
|
100
|
+
otherProps = _objectWithoutProperties(_this$props, _excluded);
|
|
122
101
|
var resolvedObjectId = this.state.resolvedContextProvider && this.state.resolvedContextProvider.objectId || objectAri;
|
|
123
102
|
return /*#__PURE__*/React.createElement(ResourcedTaskItem, _extends({}, otherProps, {
|
|
124
103
|
objectAri: resolvedObjectId,
|
|
@@ -126,8 +105,6 @@ var TaskItemWithProviders = /*#__PURE__*/function (_Component) {
|
|
|
126
105
|
}));
|
|
127
106
|
}
|
|
128
107
|
}]);
|
|
129
|
-
|
|
130
108
|
return TaskItemWithProviders;
|
|
131
109
|
}(Component);
|
|
132
|
-
|
|
133
110
|
export { TaskItemWithProviders as default };
|
|
@@ -6,54 +6,42 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
|
|
10
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
-
|
|
12
10
|
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; } }
|
|
13
|
-
|
|
14
11
|
import React from 'react';
|
|
15
12
|
import { PureComponent } from 'react';
|
|
16
13
|
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
17
14
|
import TaskItemWithProviders from './task-item-with-providers';
|
|
18
15
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
19
16
|
import { TaskItemsFormatProvider, TaskItemsFormatConsumer } from '../../ui/TaskItemsFormatContext';
|
|
20
|
-
|
|
21
17
|
var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
22
18
|
_inherits(TaskItem, _PureComponent);
|
|
23
|
-
|
|
24
19
|
var _super = _createSuper(TaskItem);
|
|
25
|
-
|
|
26
20
|
function TaskItem(props) {
|
|
27
21
|
var _this;
|
|
28
|
-
|
|
29
22
|
_classCallCheck(this, TaskItem);
|
|
30
|
-
|
|
31
23
|
_this = _super.call(this, props);
|
|
32
|
-
|
|
33
24
|
_defineProperty(_assertThisInitialized(_this), "renderWithProvider", function (providers) {
|
|
34
25
|
var taskDecisionProvider = providers.taskDecisionProvider,
|
|
35
|
-
|
|
26
|
+
contextIdentifierProvider = providers.contextIdentifierProvider;
|
|
36
27
|
var _this$props = _this.props,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
children = _this$props.children,
|
|
29
|
+
localId = _this$props.localId,
|
|
30
|
+
state = _this$props.state,
|
|
31
|
+
rendererContext = _this$props.rendererContext,
|
|
32
|
+
disabled = _this$props.disabled,
|
|
33
|
+
dataAttributes = _this$props.dataAttributes;
|
|
43
34
|
var objectAri = '';
|
|
44
|
-
|
|
45
35
|
if (rendererContext) {
|
|
46
36
|
objectAri = rendererContext.objectAri || '';
|
|
47
37
|
}
|
|
48
|
-
|
|
49
38
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
50
39
|
data: {
|
|
51
40
|
userContext: 'document'
|
|
52
41
|
}
|
|
53
42
|
}, /*#__PURE__*/React.createElement(TaskItemsFormatProvider, null, /*#__PURE__*/React.createElement(TaskItemsFormatConsumer, null, function (_ref) {
|
|
54
43
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
dispatch = _ref2[1];
|
|
57
45
|
return /*#__PURE__*/React.createElement(TaskItemWithProviders, {
|
|
58
46
|
objectAri: objectAri,
|
|
59
47
|
taskId: localId,
|
|
@@ -69,11 +57,9 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
69
57
|
}, children);
|
|
70
58
|
})));
|
|
71
59
|
});
|
|
72
|
-
|
|
73
60
|
_this.providerFactory = props.providers || new ProviderFactory();
|
|
74
61
|
return _this;
|
|
75
62
|
}
|
|
76
|
-
|
|
77
63
|
_createClass(TaskItem, [{
|
|
78
64
|
key: "componentWillUnmount",
|
|
79
65
|
value: function componentWillUnmount() {
|
|
@@ -93,8 +79,6 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
79
|
});
|
|
94
80
|
}
|
|
95
81
|
}]);
|
|
96
|
-
|
|
97
82
|
return TaskItem;
|
|
98
83
|
}(PureComponent);
|
|
99
|
-
|
|
100
84
|
export { TaskItem as default };
|
|
@@ -3,44 +3,32 @@ 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, Children } from 'react';
|
|
13
10
|
import { TaskList as AkTaskList } from '@atlaskit/task-decision';
|
|
14
|
-
|
|
15
11
|
var TaskList = /*#__PURE__*/function (_PureComponent) {
|
|
16
12
|
_inherits(TaskList, _PureComponent);
|
|
17
|
-
|
|
18
13
|
var _super = _createSuper(TaskList);
|
|
19
|
-
|
|
20
14
|
function TaskList() {
|
|
21
15
|
_classCallCheck(this, TaskList);
|
|
22
|
-
|
|
23
16
|
return _super.apply(this, arguments);
|
|
24
17
|
}
|
|
25
|
-
|
|
26
18
|
_createClass(TaskList, [{
|
|
27
19
|
key: "render",
|
|
28
20
|
value: function render() {
|
|
29
21
|
var _this$props = this.props,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
children = _this$props.children,
|
|
23
|
+
localId = _this$props.localId;
|
|
33
24
|
if (Children.count(children) === 0) {
|
|
34
25
|
return null;
|
|
35
26
|
}
|
|
36
|
-
|
|
37
27
|
return /*#__PURE__*/React.createElement(AkTaskList, {
|
|
38
28
|
listId: localId
|
|
39
29
|
}, children);
|
|
40
30
|
}
|
|
41
31
|
}]);
|
|
42
|
-
|
|
43
32
|
return TaskList;
|
|
44
33
|
}(PureComponent);
|
|
45
|
-
|
|
46
34
|
export { TaskList as default };
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextWithAnnotationDraft } from '../../ui/annotations';
|
|
3
|
-
|
|
4
3
|
var TextWrapper = function TextWrapper(props) {
|
|
5
4
|
var startPos = props.startPos,
|
|
6
|
-
|
|
5
|
+
endPos = props.endPos;
|
|
7
6
|
var children = props.children;
|
|
8
|
-
|
|
9
7
|
if (!children) {
|
|
10
8
|
return null;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
10
|
return /*#__PURE__*/React.createElement(TextWithAnnotationDraft, {
|
|
14
11
|
startPos: startPos,
|
|
15
12
|
endPos: endPos
|
|
16
13
|
}, children);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
export default TextWrapper;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export var copyTextToClipboard = function copyTextToClipboard(text) {
|
|
2
2
|
return new Promise(function (resolve, reject) {
|
|
3
3
|
var isApiSupported = !!navigator.clipboard && typeof navigator.clipboard.writeText === 'function';
|
|
4
|
-
|
|
5
4
|
if (isApiSupported) {
|
|
6
5
|
navigator.clipboard.writeText(text).then(function () {
|
|
7
6
|
return resolve();
|
|
@@ -3,36 +3,29 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
export var ElementSelection = /*#__PURE__*/function () {
|
|
4
4
|
function ElementSelection(selection) {
|
|
5
5
|
_classCallCheck(this, ElementSelection);
|
|
6
|
-
|
|
7
6
|
this.type = selection ? selection.type : 'None';
|
|
8
|
-
|
|
9
7
|
if (selection && this.type !== 'None') {
|
|
10
8
|
this.range = selection.getRangeAt(0);
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
|
-
|
|
14
11
|
_createClass(ElementSelection, [{
|
|
15
12
|
key: "eq",
|
|
16
13
|
value: function eq(selection) {
|
|
17
14
|
if (!selection) {
|
|
18
15
|
return false;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
if (this.range && selection.range) {
|
|
22
18
|
var _this$range, _this$range2;
|
|
23
|
-
|
|
24
19
|
var startMatches = ((_this$range = this.range) === null || _this$range === void 0 ? void 0 : _this$range.compareBoundaryPoints(Range.START_TO_START, selection.range)) === 0;
|
|
25
20
|
var endMatches = ((_this$range2 = this.range) === null || _this$range2 === void 0 ? void 0 : _this$range2.compareBoundaryPoints(Range.END_TO_END, selection.range)) === 0;
|
|
26
21
|
return startMatches && endMatches;
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
return this.type === 'None' && selection.type === 'None';
|
|
30
24
|
}
|
|
31
25
|
}, {
|
|
32
26
|
key: "inside",
|
|
33
27
|
value: function inside(el) {
|
|
34
28
|
var _this$range$commonAnc, _this$range3;
|
|
35
|
-
|
|
36
29
|
return el.contains((_this$range$commonAnc = (_this$range3 = this.range) === null || _this$range3 === void 0 ? void 0 : _this$range3.commonAncestorContainer) !== null && _this$range$commonAnc !== void 0 ? _this$range$commonAnc : null);
|
|
37
30
|
}
|
|
38
31
|
}, {
|
|
@@ -41,12 +34,10 @@ export var ElementSelection = /*#__PURE__*/function () {
|
|
|
41
34
|
var range = document.createRange();
|
|
42
35
|
range.selectNodeContents(el);
|
|
43
36
|
var selection = window.getSelection();
|
|
44
|
-
|
|
45
37
|
if (selection) {
|
|
46
38
|
selection.removeAllRanges();
|
|
47
39
|
selection.addRange(range);
|
|
48
40
|
}
|
|
49
|
-
|
|
50
41
|
return ElementSelection.fromWindow();
|
|
51
42
|
}
|
|
52
43
|
}], [{
|
|
@@ -56,6 +47,5 @@ export var ElementSelection = /*#__PURE__*/function () {
|
|
|
56
47
|
return new ElementSelection(win.getSelection());
|
|
57
48
|
}
|
|
58
49
|
}]);
|
|
59
|
-
|
|
60
50
|
return ElementSelection;
|
|
61
51
|
}();
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Helper function to recursively injects props to
|
|
4
5
|
* all valid children react nodes.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
7
|
export function recursivelyInjectProps(children, propsToInject) {
|
|
8
8
|
return React.Children.toArray(children).map(function (child) {
|
|
9
9
|
// Cannot add a prop to an invalid element, so just return the child
|
|
10
10
|
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
11
11
|
return child;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
}
|
|
13
|
+
// Recursive call if child has nested children
|
|
15
14
|
if (child.props.children) {
|
|
16
15
|
child = /*#__PURE__*/React.cloneElement(child, {
|
|
17
16
|
children: recursivelyInjectProps(child.props.children, propsToInject)
|
|
18
17
|
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
}
|
|
19
|
+
// Add props to react child node
|
|
22
20
|
return /*#__PURE__*/React.cloneElement(child, propsToInject);
|
|
23
21
|
});
|
|
24
22
|
}
|
|
@@ -3,15 +3,13 @@ export function isNestedHeaderLinksEnabled(allowHeadingAnchorLinks) {
|
|
|
3
3
|
if (!allowHeadingAnchorLinks || typeof allowHeadingAnchorLinks === 'boolean') {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var allowNestedHeaderLinks = allowHeadingAnchorLinks.allowNestedHeaderLinks;
|
|
7
|
+
// Explicit cast to a boolean to cover scenario where it's undefined.
|
|
9
8
|
return !!allowNestedHeaderLinks;
|
|
10
9
|
}
|
|
11
10
|
export function getActiveHeadingId(allowHeadingAnchorLinks) {
|
|
12
11
|
if (!isNestedHeaderLinksEnabled(allowHeadingAnchorLinks)) {
|
|
13
12
|
return undefined;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
return allowHeadingAnchorLinks.activeHeadingId;
|
|
17
15
|
}
|
|
@@ -9,13 +9,11 @@ export function RenderTracking(props) {
|
|
|
9
9
|
useComponentRenderTracking({
|
|
10
10
|
onRender: function onRender(_ref) {
|
|
11
11
|
var renderCount = _ref.renderCount,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
propsDifference = _ref.propsDifference,
|
|
13
|
+
componentId = _ref.componentId;
|
|
15
14
|
if (!renderCount) {
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
debouncedHandleAnalyticsEvent({
|
|
20
18
|
action: props.action,
|
|
21
19
|
actionSubject: props.actionSubject,
|
|
@@ -4,27 +4,21 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
4
4
|
import { ElementSelection } from './element-selection';
|
|
5
5
|
export var useSelectAllTrap = function useSelectAllTrap() {
|
|
6
6
|
var _React$useContext = React.useContext(AnalyticsContext),
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
fireAnalyticsEvent = _React$useContext.fireAnalyticsEvent;
|
|
9
8
|
var ref = React.useRef(null);
|
|
10
9
|
var clicked = React.useRef(false);
|
|
11
10
|
var caught = React.useRef();
|
|
12
11
|
var mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false;
|
|
13
12
|
var onKeyDown = React.useCallback(function (e) {
|
|
14
13
|
var el = ref.current;
|
|
15
|
-
|
|
16
14
|
if (!el) {
|
|
17
15
|
return;
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
var modKey = mac ? e.metaKey : e.ctrlKey;
|
|
21
|
-
|
|
22
18
|
if (!modKey || e.code !== 'KeyA') {
|
|
23
19
|
return;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
var elementSelection = ElementSelection.fromWindow();
|
|
27
|
-
|
|
28
22
|
if (elementSelection.eq(caught.current)) {
|
|
29
23
|
fireAnalyticsEvent({
|
|
30
24
|
eventType: EVENT_TYPE.TRACK,
|
|
@@ -33,7 +27,6 @@ export var useSelectAllTrap = function useSelectAllTrap() {
|
|
|
33
27
|
});
|
|
34
28
|
return;
|
|
35
29
|
}
|
|
36
|
-
|
|
37
30
|
if (elementSelection.inside(el) || elementSelection.type === 'None' && clicked.current) {
|
|
38
31
|
fireAnalyticsEvent({
|
|
39
32
|
eventType: EVENT_TYPE.TRACK,
|
|
@@ -46,7 +39,6 @@ export var useSelectAllTrap = function useSelectAllTrap() {
|
|
|
46
39
|
}, [mac, ref, fireAnalyticsEvent, clicked, caught]);
|
|
47
40
|
var onClick = React.useCallback(function (e) {
|
|
48
41
|
var _ref$current$contains, _ref$current;
|
|
49
|
-
|
|
50
42
|
clicked.current = (_ref$current$contains = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.contains(e.target)) !== null && _ref$current$contains !== void 0 ? _ref$current$contains : false;
|
|
51
43
|
}, [ref, clicked]);
|
|
52
44
|
React.useEffect(function () {
|