@atlaskit/smart-card 23.14.0 → 23.14.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/__tests_external__/index.js +0 -6
- package/dist/cjs/__tests_external__/page-objects/BaseCard.js +6 -26
- package/dist/cjs/__tests_external__/page-objects/BlockCard.js +0 -15
- package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +0 -15
- package/dist/cjs/__tests_external__/page-objects/InlineCard.js +0 -15
- package/dist/cjs/__tests_external__/test-cases/card.js +2 -6
- package/dist/cjs/__tests_external__/test-cases/embed.js +1 -5
- package/dist/cjs/__tests_external__/test-cases/inline.js +2 -6
- package/dist/cjs/classNames.js +0 -11
- package/dist/cjs/client/index.js +0 -1
- package/dist/cjs/constants.js +1 -36
- package/dist/cjs/extractors/block/index.js +2 -29
- package/dist/cjs/extractors/common/actions/extractActions.js +2 -20
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +18 -34
- package/dist/cjs/extractors/common/byline/extractByline.js +4 -15
- package/dist/cjs/extractors/common/context/extractAccessContext.js +2 -17
- package/dist/cjs/extractors/common/context/index.js +0 -1
- package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +0 -7
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +0 -7
- package/dist/cjs/extractors/common/detail/extractDownloadUrl.js +0 -2
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +0 -7
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +0 -7
- package/dist/cjs/extractors/common/detail/index.js +0 -5
- package/dist/cjs/extractors/common/icon/extractFileFormat.js +0 -2
- package/dist/cjs/extractors/common/icon/extractIcon.js +0 -26
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +2 -22
- package/dist/cjs/extractors/common/icon/extractIconFromTask.js +1 -28
- package/dist/cjs/extractors/common/icon/index.js +0 -4
- package/dist/cjs/extractors/common/lozenge/extractLozenge.js +0 -15
- package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +1 -6
- package/dist/cjs/extractors/common/lozenge/extractState.js +0 -5
- package/dist/cjs/extractors/common/lozenge/extractTag.js +0 -6
- package/dist/cjs/extractors/common/lozenge/extractTaskStatus.js +0 -3
- package/dist/cjs/extractors/common/lozenge/extractTaskType.js +0 -4
- package/dist/cjs/extractors/common/lozenge/index.js +0 -5
- package/dist/cjs/extractors/common/lozenge/utils.js +0 -2
- package/dist/cjs/extractors/common/meta/extractIsTrusted.js +0 -2
- package/dist/cjs/extractors/common/primitives/extractSummary.js +0 -2
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +0 -7
- package/dist/cjs/extractors/common/primitives/extractVisitUrl.js +0 -2
- package/dist/cjs/extractors/common/primitives/index.js +0 -2
- package/dist/cjs/extractors/common/title-prefix/extractTitlePrefix.js +0 -6
- package/dist/cjs/extractors/common/title-prefix/index.js +0 -1
- package/dist/cjs/extractors/constants.js +2 -2
- package/dist/cjs/extractors/embed/index.js +0 -10
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +0 -6
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +0 -9
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -6
- package/dist/cjs/extractors/flexible/collaboratorGroup/index.js +0 -4
- package/dist/cjs/extractors/flexible/extract-preview.js +0 -4
- package/dist/cjs/extractors/flexible/extract-priority.js +0 -7
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +0 -10
- package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +0 -25
- package/dist/cjs/extractors/flexible/icon/extract-icon-renderer.js +0 -5
- package/dist/cjs/extractors/flexible/icon/extract-jira-task-icon.js +0 -12
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -35
- package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +0 -11
- package/dist/cjs/extractors/flexible/icon/extract-url-icon.js +0 -3
- package/dist/cjs/extractors/flexible/icon/index.js +4 -20
- package/dist/cjs/extractors/flexible/index.js +0 -17
- package/dist/cjs/extractors/flexible/latest-commit/index.js +0 -4
- package/dist/cjs/extractors/flexible/utils.js +0 -33
- package/dist/cjs/extractors/hover/extractMetadata.js +0 -5
- package/dist/cjs/extractors/index.js +4 -16
- package/dist/cjs/extractors/inline/index.js +0 -12
- package/dist/cjs/hooks.js +0 -2
- package/dist/cjs/hoverCard.js +0 -1
- 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 -30
- 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/in-product.js +0 -1
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/linkUrl.js +0 -2
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/ssr.js +4 -23
- package/dist/cjs/state/actions/index.js +36 -76
- package/dist/cjs/state/analytics/index.js +0 -2
- package/dist/cjs/state/analytics/ufoExperiences.js +0 -11
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +165 -205
- package/dist/cjs/state/config/index.js +0 -5
- package/dist/cjs/state/flexible-ui-context/index.js +1 -7
- package/dist/cjs/state/flexible-ui-context/utils.js +0 -2
- package/dist/cjs/state/helpers.js +3 -39
- package/dist/cjs/state/hooks/index.js +0 -2
- package/dist/cjs/state/hooks/usePrefetch.js +10 -31
- package/dist/cjs/state/hooks/useSmartLink.js +11 -23
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +12 -29
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -7
- package/dist/cjs/state/index.js +0 -3
- package/dist/cjs/state/renderers/index.js +0 -4
- package/dist/cjs/state/store/index.js +7 -15
- package/dist/cjs/utils/analytics/analytics.js +133 -197
- package/dist/cjs/utils/analytics/index.js +8 -18
- package/dist/cjs/utils/flexible.js +0 -20
- package/dist/cjs/utils/index.js +5 -54
- package/dist/cjs/utils/jsonld.js +0 -11
- package/dist/cjs/utils/mocks.js +0 -35
- package/dist/cjs/utils/performance.js +0 -23
- package/dist/cjs/utils/test-utils.js +0 -10
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +0 -6
- package/dist/cjs/view/BlockCard/actions/DownloadAction.js +0 -15
- package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +0 -7
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -30
- package/dist/cjs/view/BlockCard/actions/RetryAction.js +0 -11
- package/dist/cjs/view/BlockCard/actions/ViewAction.js +0 -14
- package/dist/cjs/view/BlockCard/actions/flexible/AuthorizeAction.js +0 -8
- package/dist/cjs/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -8
- package/dist/cjs/view/BlockCard/actions/flexible/RetryAction.js +0 -7
- package/dist/cjs/view/BlockCard/components/Action.js +8 -19
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +0 -10
- package/dist/cjs/view/BlockCard/components/ActionList.js +1 -17
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +7 -14
- package/dist/cjs/view/BlockCard/components/Content.js +3 -7
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -7
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -6
- package/dist/cjs/view/BlockCard/components/Emoji.js +1 -6
- package/dist/cjs/view/BlockCard/components/Frame.js +10 -24
- package/dist/cjs/view/BlockCard/components/Link.js +4 -7
- package/dist/cjs/view/BlockCard/components/Name.js +5 -10
- package/dist/cjs/view/BlockCard/components/Provider.js +2 -8
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +3 -15
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +2 -4
- package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +7 -19
- package/dist/cjs/view/BlockCard/index.js +17 -68
- package/dist/cjs/view/BlockCard/utils/handlers.js +0 -2
- package/dist/cjs/view/BlockCard/views/ErroredView.js +10 -36
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +20 -42
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -36
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +34 -57
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +5 -16
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +15 -37
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -23
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +8 -31
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -19
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +16 -33
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -30
- package/dist/cjs/view/Card/index.js +0 -20
- package/dist/cjs/view/CardWithData/component.js +7 -32
- package/dist/cjs/view/CardWithData/loader.js +9 -30
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyFallback.js +2 -8
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -22
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -14
- package/dist/cjs/view/CardWithUrl/component-lazy/index.js +0 -6
- package/dist/cjs/view/CardWithUrl/component.js +35 -60
- package/dist/cjs/view/CardWithUrl/loader.js +31 -50
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +0 -22
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +20 -29
- package/dist/cjs/view/EmbedCard/components/Frame.js +21 -48
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +14 -23
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +6 -14
- package/dist/cjs/view/EmbedCard/components/styled.js +1 -61
- package/dist/cjs/view/EmbedCard/index.js +18 -53
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +6 -17
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +11 -26
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +6 -16
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +13 -25
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +9 -24
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +8 -17
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +5 -20
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +3 -11
- package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +0 -8
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +11 -32
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +5 -11
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +0 -5
- package/dist/cjs/view/EmbedModal/index.js +24 -47
- package/dist/cjs/view/EmbedModal/types.js +0 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +8 -25
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -10
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -15
- package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +5 -27
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +13 -25
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -42
- package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +5 -25
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +4 -8
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +4 -43
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -32
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +13 -47
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +11 -24
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +12 -30
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +7 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/index.js +0 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -34
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +10 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +20 -52
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +9 -21
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -44
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +4 -31
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +5 -11
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -9
- package/dist/cjs/view/FlexibleCard/components/container/index.js +29 -77
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -13
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -25
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +7 -28
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +11 -30
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +13 -35
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +0 -28
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +15 -37
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -28
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +8 -18
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +8 -20
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -51
- package/dist/cjs/view/FlexibleCard/components/utils.js +1 -39
- package/dist/cjs/view/FlexibleCard/index.js +13 -30
- package/dist/cjs/view/FlexibleCard/utils.js +0 -28
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +20 -45
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +13 -55
- package/dist/cjs/view/HoverCard/components/SnippetOrPreview.js +10 -26
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +22 -46
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +0 -6
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +2 -11
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +0 -5
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +8 -30
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +0 -5
- package/dist/cjs/view/HoverCard/index.js +4 -15
- package/dist/cjs/view/HoverCard/styled.js +2 -11
- package/dist/cjs/view/HoverCard/utils.js +0 -21
- package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -37
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +6 -46
- package/dist/cjs/view/InlineCard/Frame/index.js +11 -18
- package/dist/cjs/view/InlineCard/Frame/styled.js +1 -18
- package/dist/cjs/view/InlineCard/Icon.js +4 -13
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +10 -48
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +17 -34
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +13 -37
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +7 -27
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +0 -6
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +10 -44
- package/dist/cjs/view/InlineCard/index.js +13 -43
- package/dist/cjs/view/InlineCard/styled.js +2 -15
- package/dist/cjs/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -30
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +5 -20
- package/dist/cjs/view/LinkUrl/index.js +10 -24
- package/dist/cjs/view/LinkView/index.js +0 -16
- package/dist/cjs/view/SmartLinkEvents/useSmartLinkEvents.js +0 -3
- package/dist/cjs/view/common/Byline.js +4 -8
- package/dist/cjs/view/common/Icon.js +6 -21
- package/dist/cjs/view/common/Metadata.js +4 -14
- package/dist/cjs/view/common/MetadataList.js +2 -9
- package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -14
- package/dist/cjs/view/common/utils.js +0 -7
- package/dist/es2019/__tests_external__/page-objects/BaseCard.js +6 -15
- package/dist/es2019/__tests_external__/page-objects/BlockCard.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/EmbedCard.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/InlineCard.js +0 -1
- package/dist/es2019/constants.js +11 -26
- package/dist/es2019/extractors/block/index.js +6 -12
- package/dist/es2019/extractors/common/actions/extractActions.js +4 -12
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +14 -16
- package/dist/es2019/extractors/common/byline/extractByline.js +0 -2
- package/dist/es2019/extractors/common/context/extractAccessContext.js +10 -11
- package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +0 -1
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +0 -1
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +0 -1
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +0 -1
- package/dist/es2019/extractors/common/icon/extractIcon.js +0 -10
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +2 -11
- package/dist/es2019/extractors/common/icon/extractIconFromTask.js +0 -12
- package/dist/es2019/extractors/common/lozenge/extractLozenge.js +0 -3
- package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +0 -1
- package/dist/es2019/extractors/common/lozenge/extractState.js +0 -2
- package/dist/es2019/extractors/common/lozenge/extractTag.js +0 -3
- package/dist/es2019/extractors/common/lozenge/extractTaskStatus.js +0 -1
- package/dist/es2019/extractors/common/lozenge/extractTaskType.js +0 -1
- package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +0 -3
- package/dist/es2019/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
- package/dist/es2019/extractors/constants.js +2 -2
- package/dist/es2019/extractors/embed/index.js +2 -4
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -2
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -3
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -2
- package/dist/es2019/extractors/flexible/collaboratorGroup/index.js +0 -1
- package/dist/es2019/extractors/flexible/extract-preview.js +0 -2
- package/dist/es2019/extractors/flexible/extract-priority.js +0 -4
- package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +0 -9
- package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
- package/dist/es2019/extractors/flexible/icon/extract-icon-renderer.js +0 -4
- package/dist/es2019/extractors/flexible/icon/extract-jira-task-icon.js +0 -10
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +0 -18
- package/dist/es2019/extractors/flexible/icon/extract-provider-icon.js +0 -6
- package/dist/es2019/extractors/flexible/icon/extract-url-icon.js +0 -2
- package/dist/es2019/extractors/flexible/icon/index.js +4 -6
- package/dist/es2019/extractors/flexible/index.js +0 -3
- package/dist/es2019/extractors/flexible/latest-commit/index.js +0 -2
- package/dist/es2019/extractors/flexible/utils.js +0 -5
- package/dist/es2019/extractors/hover/extractMetadata.js +0 -3
- package/dist/es2019/extractors/index.js +0 -6
- package/dist/es2019/extractors/inline/index.js +0 -2
- package/dist/es2019/index.js +4 -4
- package/dist/es2019/ssr.js +2 -4
- package/dist/es2019/state/actions/index.js +25 -33
- package/dist/es2019/state/analytics/ufoExperiences.js +0 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +31 -46
- package/dist/es2019/state/config/index.js +0 -2
- package/dist/es2019/state/flexible-ui-context/index.js +1 -2
- package/dist/es2019/state/helpers.js +2 -11
- package/dist/es2019/state/hooks/usePrefetch.js +14 -15
- package/dist/es2019/state/hooks/useSmartLink.js +8 -7
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -8
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +0 -1
- package/dist/es2019/state/store/index.js +6 -5
- package/dist/es2019/utils/analytics/analytics.js +46 -24
- package/dist/es2019/utils/analytics/index.js +8 -5
- package/dist/es2019/utils/flexible.js +0 -1
- package/dist/es2019/utils/index.js +0 -7
- package/dist/es2019/utils/jsonld.js +4 -2
- package/dist/es2019/utils/mocks.js +0 -3
- package/dist/es2019/utils/performance.js +0 -9
- package/dist/es2019/utils/test-utils.js +0 -2
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/DownloadAction.js +0 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +1 -3
- package/dist/es2019/view/BlockCard/actions/ViewAction.js +0 -1
- package/dist/es2019/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
- package/dist/es2019/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
- package/dist/es2019/view/BlockCard/actions/flexible/RetryAction.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +0 -1
- package/dist/es2019/view/BlockCard/components/ActionIcon.js +0 -3
- package/dist/es2019/view/BlockCard/components/ActionList.js +0 -1
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +0 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +4 -2
- package/dist/es2019/view/BlockCard/components/Provider.js +0 -2
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +4 -2
- package/dist/es2019/view/BlockCard/components/flexible/footer/index.js +1 -4
- package/dist/es2019/view/BlockCard/index.js +1 -24
- package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +0 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +0 -2
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +2 -3
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +0 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -5
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +0 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -3
- package/dist/es2019/view/Card/index.js +0 -3
- package/dist/es2019/view/CardWithData/component.js +0 -6
- package/dist/es2019/view/CardWithData/loader.js +1 -10
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -4
- package/dist/es2019/view/CardWithUrl/component.js +10 -15
- package/dist/es2019/view/CardWithUrl/loader.js +8 -13
- package/dist/es2019/view/EmbedCard/EmbedResizeMessageListener.js +0 -8
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +4 -6
- package/dist/es2019/view/EmbedCard/components/Frame.js +1 -11
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +4 -6
- package/dist/es2019/view/EmbedCard/components/ImageIcon.js +0 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +0 -9
- package/dist/es2019/view/EmbedCard/index.js +0 -17
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +0 -5
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +0 -1
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +0 -1
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +0 -1
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +0 -7
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -2
- package/dist/es2019/view/EmbedModal/components/error-boundary/index.js +0 -3
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +0 -2
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +0 -2
- package/dist/es2019/view/EmbedModal/index.js +0 -6
- package/dist/es2019/view/EmbedModal/types.js +0 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +2 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +3 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +2 -6
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +4 -5
- package/dist/es2019/view/FlexibleCard/components/actions/utils.js +2 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +1 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +2 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +3 -18
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +62 -195
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -27
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +1 -7
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -7
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +0 -25
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +0 -23
- package/dist/es2019/view/FlexibleCard/components/utils.js +0 -11
- package/dist/es2019/view/FlexibleCard/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/utils.js +0 -15
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -14
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +0 -9
- package/dist/es2019/view/HoverCard/components/SnippetOrPreview.js +4 -5
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +0 -2
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +0 -3
- package/dist/es2019/view/HoverCard/index.js +0 -3
- package/dist/es2019/view/HoverCard/styled.js +2 -2
- package/dist/es2019/view/HoverCard/utils.js +2 -11
- package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -5
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -14
- package/dist/es2019/view/InlineCard/Frame/index.js +5 -4
- package/dist/es2019/view/InlineCard/Frame/styled.js +1 -5
- package/dist/es2019/view/InlineCard/Icon.js +6 -4
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -21
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +22 -15
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -6
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -2
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -6
- package/dist/es2019/view/InlineCard/index.js +0 -14
- package/dist/es2019/view/InlineCard/styled.js +3 -2
- package/dist/es2019/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +1 -9
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +0 -2
- package/dist/es2019/view/LinkUrl/index.js +0 -2
- package/dist/es2019/view/LinkView/index.js +0 -1
- package/dist/es2019/view/common/Icon.js +0 -5
- package/dist/es2019/view/common/Metadata.js +0 -4
- package/dist/es2019/view/common/MetadataList.js +0 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +0 -2
- package/dist/es2019/view/common/utils.js +0 -3
- package/dist/esm/__tests_external__/page-objects/BaseCard.js +6 -20
- package/dist/esm/__tests_external__/page-objects/BlockCard.js +0 -8
- package/dist/esm/__tests_external__/page-objects/EmbedCard.js +0 -8
- package/dist/esm/__tests_external__/page-objects/InlineCard.js +0 -8
- package/dist/esm/__tests_external__/test-cases/card.js +2 -2
- package/dist/esm/__tests_external__/test-cases/embed.js +1 -1
- package/dist/esm/__tests_external__/test-cases/inline.js +2 -2
- package/dist/esm/constants.js +11 -26
- package/dist/esm/extractors/block/index.js +2 -13
- package/dist/esm/extractors/common/actions/extractActions.js +2 -14
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +18 -28
- package/dist/esm/extractors/common/byline/extractByline.js +4 -8
- package/dist/esm/extractors/common/context/extractAccessContext.js +2 -12
- package/dist/esm/extractors/common/detail/extractAttachmentCount.js +0 -1
- package/dist/esm/extractors/common/detail/extractCommentCount.js +0 -1
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +0 -1
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +0 -1
- package/dist/esm/extractors/common/icon/extractIcon.js +0 -10
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +2 -11
- package/dist/esm/extractors/common/icon/extractIconFromTask.js +1 -13
- package/dist/esm/extractors/common/lozenge/extractLozenge.js +0 -7
- package/dist/esm/extractors/common/lozenge/extractLozengeText.js +1 -3
- package/dist/esm/extractors/common/lozenge/extractState.js +0 -2
- package/dist/esm/extractors/common/lozenge/extractTag.js +0 -3
- package/dist/esm/extractors/common/lozenge/extractTaskStatus.js +0 -1
- package/dist/esm/extractors/common/lozenge/extractTaskType.js +0 -1
- package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +0 -3
- package/dist/esm/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
- package/dist/esm/extractors/constants.js +2 -2
- package/dist/esm/extractors/embed/index.js +0 -6
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -2
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -3
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -2
- package/dist/esm/extractors/flexible/collaboratorGroup/index.js +0 -1
- package/dist/esm/extractors/flexible/extract-preview.js +0 -2
- package/dist/esm/extractors/flexible/extract-priority.js +0 -4
- package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +0 -9
- package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
- package/dist/esm/extractors/flexible/icon/extract-icon-renderer.js +0 -4
- package/dist/esm/extractors/flexible/icon/extract-jira-task-icon.js +0 -11
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -24
- package/dist/esm/extractors/flexible/icon/extract-provider-icon.js +0 -6
- package/dist/esm/extractors/flexible/icon/extract-url-icon.js +0 -2
- package/dist/esm/extractors/flexible/icon/index.js +4 -11
- package/dist/esm/extractors/flexible/index.js +0 -3
- package/dist/esm/extractors/flexible/latest-commit/index.js +0 -2
- package/dist/esm/extractors/flexible/utils.js +0 -5
- package/dist/esm/extractors/hover/extractMetadata.js +0 -3
- package/dist/esm/extractors/index.js +4 -15
- package/dist/esm/extractors/inline/index.js +0 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/ssr.js +4 -11
- package/dist/esm/state/actions/index.js +36 -57
- package/dist/esm/state/analytics/ufoExperiences.js +0 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +165 -195
- package/dist/esm/state/config/index.js +0 -2
- package/dist/esm/state/flexible-ui-context/index.js +1 -2
- package/dist/esm/state/helpers.js +3 -12
- package/dist/esm/state/hooks/usePrefetch.js +10 -24
- package/dist/esm/state/hooks/useSmartLink.js +11 -13
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +12 -18
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -2
- package/dist/esm/state/store/index.js +7 -9
- package/dist/esm/utils/analytics/analytics.js +133 -139
- package/dist/esm/utils/analytics/index.js +8 -13
- package/dist/esm/utils/flexible.js +0 -1
- package/dist/esm/utils/index.js +5 -21
- package/dist/esm/utils/jsonld.js +0 -3
- package/dist/esm/utils/mocks.js +0 -20
- package/dist/esm/utils/performance.js +0 -9
- package/dist/esm/utils/test-utils.js +0 -2
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/DownloadAction.js +0 -6
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -15
- package/dist/esm/view/BlockCard/actions/RetryAction.js +0 -3
- package/dist/esm/view/BlockCard/actions/ViewAction.js +0 -6
- package/dist/esm/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
- package/dist/esm/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
- package/dist/esm/view/BlockCard/actions/flexible/RetryAction.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +7 -11
- package/dist/esm/view/BlockCard/components/ActionIcon.js +0 -4
- package/dist/esm/view/BlockCard/components/ActionList.js +1 -3
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +6 -8
- package/dist/esm/view/BlockCard/components/Content.js +2 -2
- package/dist/esm/view/BlockCard/components/ContentFooter.js +2 -2
- package/dist/esm/view/BlockCard/components/ContentHeader.js +2 -2
- package/dist/esm/view/BlockCard/components/Frame.js +10 -13
- package/dist/esm/view/BlockCard/components/Link.js +3 -3
- package/dist/esm/view/BlockCard/components/Name.js +4 -4
- package/dist/esm/view/BlockCard/components/Provider.js +1 -3
- package/dist/esm/view/BlockCard/components/Thumbnail.js +3 -6
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +1 -1
- package/dist/esm/view/BlockCard/components/flexible/footer/index.js +7 -12
- package/dist/esm/view/BlockCard/index.js +18 -42
- package/dist/esm/view/BlockCard/views/ErroredView.js +10 -17
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +19 -22
- package/dist/esm/view/BlockCard/views/NotFoundView.js +11 -18
- package/dist/esm/view/BlockCard/views/ResolvedView.js +33 -35
- package/dist/esm/view/BlockCard/views/ResolvingView.js +4 -4
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +15 -22
- package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -9
- package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +9 -13
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -9
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +17 -22
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -15
- package/dist/esm/view/Card/index.js +0 -10
- package/dist/esm/view/CardWithData/component.js +7 -20
- package/dist/esm/view/CardWithData/loader.js +10 -24
- package/dist/esm/view/CardWithUrl/component-lazy/LazyFallback.js +2 -2
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +9 -11
- package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -3
- package/dist/esm/view/CardWithUrl/component.js +35 -42
- package/dist/esm/view/CardWithUrl/loader.js +31 -37
- package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +0 -15
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +20 -23
- package/dist/esm/view/EmbedCard/components/Frame.js +20 -38
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +15 -20
- package/dist/esm/view/EmbedCard/components/ImageIcon.js +6 -8
- package/dist/esm/view/EmbedCard/components/styled.js +1 -17
- package/dist/esm/view/EmbedCard/index.js +18 -35
- package/dist/esm/view/EmbedCard/views/ErroredView.js +5 -5
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +11 -16
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +6 -6
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +12 -13
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +9 -10
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +7 -8
- package/dist/esm/view/EmbedModal/components/analytics/index.js +5 -12
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -7
- package/dist/esm/view/EmbedModal/components/error-boundary/index.js +0 -3
- package/dist/esm/view/EmbedModal/components/link-info/index.js +10 -14
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +5 -7
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +0 -2
- package/dist/esm/view/EmbedModal/index.js +24 -33
- package/dist/esm/view/EmbedModal/types.js +0 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +8 -15
- package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -6
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +5 -21
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +14 -18
- package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -25
- package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +5 -19
- package/dist/esm/view/FlexibleCard/components/actions/index.js +4 -5
- package/dist/esm/view/FlexibleCard/components/actions/utils.js +4 -20
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -23
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +13 -28
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +11 -16
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +12 -22
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +7 -14
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -22
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -9
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -18
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -10
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +20 -32
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +10 -12
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -8
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +4 -22
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +64 -200
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +4 -6
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -6
- package/dist/esm/view/FlexibleCard/components/container/index.js +29 -61
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +5 -9
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +10 -19
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -17
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +11 -20
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +13 -24
- package/dist/esm/view/FlexibleCard/components/elements/index.js +0 -25
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +15 -26
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -18
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +8 -14
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +8 -15
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +2 -28
- package/dist/esm/view/FlexibleCard/components/utils.js +1 -14
- package/dist/esm/view/FlexibleCard/index.js +14 -20
- package/dist/esm/view/FlexibleCard/utils.js +0 -15
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +19 -29
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +12 -28
- package/dist/esm/view/HoverCard/components/SnippetOrPreview.js +10 -16
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +22 -29
- package/dist/esm/view/HoverCard/components/views/resolved/styled.js +0 -2
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +1 -3
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +0 -2
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +8 -13
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +0 -2
- package/dist/esm/view/HoverCard/index.js +3 -6
- package/dist/esm/view/HoverCard/styled.js +2 -4
- package/dist/esm/view/HoverCard/utils.js +0 -15
- package/dist/esm/view/InlineCard/ErroredView/index.js +8 -22
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +6 -29
- package/dist/esm/view/InlineCard/Frame/index.js +11 -10
- package/dist/esm/view/InlineCard/Frame/styled.js +1 -9
- package/dist/esm/view/InlineCard/Icon.js +5 -5
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +10 -36
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +20 -15
- package/dist/esm/view/InlineCard/ResolvedView/index.js +13 -25
- package/dist/esm/view/InlineCard/ResolvingView/index.js +7 -16
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -2
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +10 -25
- package/dist/esm/view/InlineCard/index.js +13 -27
- package/dist/esm/view/InlineCard/styled.js +3 -4
- package/dist/esm/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -22
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +5 -7
- package/dist/esm/view/LinkUrl/index.js +10 -14
- package/dist/esm/view/LinkView/index.js +0 -8
- package/dist/esm/view/common/Byline.js +3 -3
- package/dist/esm/view/common/Icon.js +6 -13
- package/dist/esm/view/common/Metadata.js +3 -7
- package/dist/esm/view/common/MetadataList.js +1 -2
- package/dist/esm/view/common/UnauthorisedViewContent.js +3 -5
- package/dist/esm/view/common/utils.js +0 -3
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IconType } from '../../../constants';
|
|
2
|
-
|
|
3
2
|
var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
4
3
|
switch (fileFormat) {
|
|
5
4
|
// Generic documents
|
|
@@ -8,7 +7,6 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
8
7
|
icon: IconType.Folder,
|
|
9
8
|
label: 'Folder'
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
case 'text/plain':
|
|
13
11
|
case 'application/vnd.oasis.opendocument.text':
|
|
14
12
|
case 'application/vnd.apple.pages':
|
|
@@ -16,20 +14,17 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
16
14
|
icon: IconType.Document,
|
|
17
15
|
label: 'Document'
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
case 'application/pdf':
|
|
21
18
|
return {
|
|
22
19
|
icon: IconType.PDF,
|
|
23
20
|
label: 'PDF document'
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
case 'application/vnd.oasis.opendocument.presentation':
|
|
27
23
|
case 'application/vnd.apple.keynote':
|
|
28
24
|
return {
|
|
29
25
|
icon: IconType.Presentation,
|
|
30
26
|
label: 'Presentation'
|
|
31
27
|
};
|
|
32
|
-
|
|
33
28
|
case 'application/vnd.oasis.opendocument.spreadsheet':
|
|
34
29
|
case 'application/vnd.apple.numbers':
|
|
35
30
|
return {
|
|
@@ -37,53 +32,45 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
37
32
|
label: 'Spreadsheet'
|
|
38
33
|
};
|
|
39
34
|
// Google Drive
|
|
40
|
-
|
|
41
35
|
case 'application/vnd.google-apps.document':
|
|
42
36
|
return {
|
|
43
37
|
icon: IconType.GoogleDocs,
|
|
44
38
|
label: 'Google Docs'
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
case 'application/vnd.google-apps.form':
|
|
48
41
|
return {
|
|
49
42
|
icon: IconType.GoogleForms,
|
|
50
43
|
label: 'Google Form'
|
|
51
44
|
};
|
|
52
|
-
|
|
53
45
|
case 'application/vnd.google-apps.spreadsheet':
|
|
54
46
|
return {
|
|
55
47
|
icon: IconType.GoogleSheets,
|
|
56
48
|
label: 'Google Sheets'
|
|
57
49
|
};
|
|
58
|
-
|
|
59
50
|
case 'application/vnd.google-apps.presentation':
|
|
60
51
|
return {
|
|
61
52
|
icon: IconType.GoogleSlides,
|
|
62
53
|
label: 'Google Slides'
|
|
63
54
|
};
|
|
64
55
|
// Microsoft
|
|
65
|
-
|
|
66
56
|
case 'application/vnd.ms-excel':
|
|
67
57
|
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
|
68
58
|
return {
|
|
69
59
|
icon: IconType.MSExcel,
|
|
70
60
|
label: 'Excel spreadsheet'
|
|
71
61
|
};
|
|
72
|
-
|
|
73
62
|
case 'application/vnd.ms-powerpoint':
|
|
74
63
|
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
|
|
75
64
|
return {
|
|
76
65
|
icon: IconType.MSPowerpoint,
|
|
77
66
|
label: 'PowerPoint presentation'
|
|
78
67
|
};
|
|
79
|
-
|
|
80
68
|
case 'application/msword':
|
|
81
69
|
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
|
82
70
|
return {
|
|
83
71
|
icon: IconType.MSWord,
|
|
84
72
|
label: 'Word document'
|
|
85
73
|
};
|
|
86
|
-
|
|
87
74
|
case 'image/png':
|
|
88
75
|
case 'image/jpeg':
|
|
89
76
|
case 'image/bmp':
|
|
@@ -93,13 +80,11 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
93
80
|
icon: IconType.Image,
|
|
94
81
|
label: 'Image'
|
|
95
82
|
};
|
|
96
|
-
|
|
97
83
|
case 'image/gif':
|
|
98
84
|
return {
|
|
99
85
|
icon: IconType.GIF,
|
|
100
86
|
label: 'GIF'
|
|
101
87
|
};
|
|
102
|
-
|
|
103
88
|
case 'audio/midi':
|
|
104
89
|
case 'audio/mpeg':
|
|
105
90
|
case 'audio/webm':
|
|
@@ -109,7 +94,6 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
109
94
|
icon: IconType.Audio,
|
|
110
95
|
label: 'Audio'
|
|
111
96
|
};
|
|
112
|
-
|
|
113
97
|
case 'video/mp4':
|
|
114
98
|
case 'video/quicktime':
|
|
115
99
|
case 'video/mov':
|
|
@@ -122,7 +106,6 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
122
106
|
label: 'Video'
|
|
123
107
|
};
|
|
124
108
|
// Others
|
|
125
|
-
|
|
126
109
|
case 'text/css':
|
|
127
110
|
case 'text/html':
|
|
128
111
|
case 'application/javascript':
|
|
@@ -130,7 +113,6 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
130
113
|
icon: IconType.Code,
|
|
131
114
|
label: 'Source Code'
|
|
132
115
|
};
|
|
133
|
-
|
|
134
116
|
case 'application/zip':
|
|
135
117
|
case 'application/x-tar':
|
|
136
118
|
case 'application/x-gtar':
|
|
@@ -141,34 +123,28 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
141
123
|
icon: IconType.Archive,
|
|
142
124
|
label: 'Archive'
|
|
143
125
|
};
|
|
144
|
-
|
|
145
126
|
case 'application/dmg':
|
|
146
127
|
return {
|
|
147
128
|
icon: IconType.Executable,
|
|
148
129
|
label: 'Executable'
|
|
149
130
|
};
|
|
150
|
-
|
|
151
131
|
case 'application/sketch':
|
|
152
132
|
return {
|
|
153
133
|
icon: IconType.Sketch,
|
|
154
134
|
label: 'Sketch'
|
|
155
135
|
};
|
|
156
|
-
|
|
157
136
|
case 'application/octet-stream':
|
|
158
137
|
return {
|
|
159
138
|
icon: IconType.Generic,
|
|
160
139
|
label: 'Binary file'
|
|
161
140
|
};
|
|
162
|
-
|
|
163
141
|
case 'application/invision.prototype':
|
|
164
142
|
return {
|
|
165
143
|
icon: IconType.Generic,
|
|
166
144
|
label: 'Prototype'
|
|
167
145
|
};
|
|
168
|
-
|
|
169
146
|
default:
|
|
170
147
|
return undefined;
|
|
171
148
|
}
|
|
172
149
|
};
|
|
173
|
-
|
|
174
150
|
export default extractFileFormatIcon;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
var sanitizeEmojiValue = function sanitizeEmojiValue(value) {
|
|
2
2
|
return value && value.replace(/['"]+/g, '').replace(/null/, '') || '';
|
|
3
3
|
};
|
|
4
|
-
|
|
5
4
|
var extractIconRenderer = function extractIconRenderer(data, renderers) {
|
|
6
5
|
var prefix = data['atlassian:titlePrefix'];
|
|
7
|
-
|
|
8
6
|
if ((prefix === null || prefix === void 0 ? void 0 : prefix['@type']) === 'atlassian:Emoji') {
|
|
9
7
|
var emojiId = sanitizeEmojiValue(prefix['text']);
|
|
10
8
|
var emojiRenderer = renderers === null || renderers === void 0 ? void 0 : renderers.emoji;
|
|
11
|
-
|
|
12
9
|
if (emojiId && emojiRenderer) {
|
|
13
10
|
return function () {
|
|
14
11
|
return emojiRenderer(emojiId);
|
|
@@ -16,5 +13,4 @@ var extractIconRenderer = function extractIconRenderer(data, renderers) {
|
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
export default extractIconRenderer;
|
|
@@ -1,57 +1,47 @@
|
|
|
1
1
|
import { IconType } from '../../../constants';
|
|
2
|
-
|
|
3
2
|
var extractJiraTaskIcon = function extractJiraTaskIcon(taskType) {
|
|
4
3
|
var label = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Task';
|
|
5
|
-
|
|
6
4
|
switch (taskType) {
|
|
7
5
|
case 'JiraBug':
|
|
8
6
|
return {
|
|
9
7
|
icon: IconType.Bug,
|
|
10
8
|
label: label
|
|
11
9
|
};
|
|
12
|
-
|
|
13
10
|
case 'JiraChange':
|
|
14
11
|
return {
|
|
15
12
|
icon: IconType.Change,
|
|
16
13
|
label: label
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
case 'JiraEpic':
|
|
20
16
|
return {
|
|
21
17
|
icon: IconType.Epic,
|
|
22
18
|
label: label
|
|
23
19
|
};
|
|
24
|
-
|
|
25
20
|
case 'JiraIncident':
|
|
26
21
|
return {
|
|
27
22
|
icon: IconType.Incident,
|
|
28
23
|
label: label
|
|
29
24
|
};
|
|
30
|
-
|
|
31
25
|
case 'JiraProblem':
|
|
32
26
|
return {
|
|
33
27
|
icon: IconType.Problem,
|
|
34
28
|
label: label
|
|
35
29
|
};
|
|
36
|
-
|
|
37
30
|
case 'JiraServiceRequest':
|
|
38
31
|
return {
|
|
39
32
|
icon: IconType.ServiceRequest,
|
|
40
33
|
label: label
|
|
41
34
|
};
|
|
42
|
-
|
|
43
35
|
case 'JiraStory':
|
|
44
36
|
return {
|
|
45
37
|
icon: IconType.Story,
|
|
46
38
|
label: label
|
|
47
39
|
};
|
|
48
|
-
|
|
49
40
|
case 'JiraSubTask':
|
|
50
41
|
return {
|
|
51
42
|
icon: IconType.SubTask,
|
|
52
43
|
label: label
|
|
53
44
|
};
|
|
54
|
-
|
|
55
45
|
case 'JiraTask':
|
|
56
46
|
default:
|
|
57
47
|
return {
|
|
@@ -60,5 +50,4 @@ var extractJiraTaskIcon = function extractJiraTaskIcon(taskType) {
|
|
|
60
50
|
};
|
|
61
51
|
}
|
|
62
52
|
};
|
|
63
|
-
|
|
64
53
|
export default extractJiraTaskIcon;
|
|
@@ -8,12 +8,10 @@ import { extractTaskType } from '../../common/lozenge';
|
|
|
8
8
|
import { extractTitle } from '@atlaskit/linking-common/extractors';
|
|
9
9
|
import { extractorPriorityMap as priorityMap } from '../../common/icon/priority';
|
|
10
10
|
import { IconType } from '../../../constants';
|
|
11
|
-
|
|
12
11
|
var extractTask = function extractTask(data, label) {
|
|
13
12
|
var _ref = extractTaskType(data) || {},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
id = _ref.id,
|
|
14
|
+
url = _ref.icon;
|
|
17
15
|
var taskType = id === null || id === void 0 ? void 0 : id.split('#').pop();
|
|
18
16
|
var taskIcon = url ? {
|
|
19
17
|
label: label,
|
|
@@ -24,26 +22,21 @@ var extractTask = function extractTask(data, label) {
|
|
|
24
22
|
taskIcon: taskIcon
|
|
25
23
|
};
|
|
26
24
|
};
|
|
27
|
-
|
|
28
25
|
var extractType = function extractType(jsonLd) {
|
|
29
26
|
var type = jsonLd['@type'];
|
|
30
27
|
return Array.isArray(type) ? type.sort(function (a, b) {
|
|
31
28
|
return priorityMap[b] - priorityMap[a];
|
|
32
29
|
})[0] : type;
|
|
33
30
|
};
|
|
34
|
-
|
|
35
31
|
var isConfluenceProvider = function isConfluenceProvider(provider) {
|
|
36
32
|
return provider === CONFLUENCE_GENERATOR_ID;
|
|
37
33
|
};
|
|
38
|
-
|
|
39
34
|
var isJiraProvider = function isJiraProvider(provider) {
|
|
40
35
|
return provider === JIRA_GENERATOR_ID;
|
|
41
36
|
};
|
|
42
|
-
|
|
43
37
|
var isNativeProvider = function isNativeProvider(provider) {
|
|
44
38
|
return isConfluenceProvider(provider) || isJiraProvider(provider);
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
|
|
48
41
|
var generator = data.generator;
|
|
49
42
|
var label = extractTitle(data);
|
|
@@ -51,7 +44,6 @@ var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
|
|
|
51
44
|
var urlIcon = extractUrlIcon(data.icon, label);
|
|
52
45
|
var provider = generator === null || generator === void 0 ? void 0 : generator['@id'];
|
|
53
46
|
var providerIcon = extractProviderIcon(data);
|
|
54
|
-
|
|
55
47
|
switch (type) {
|
|
56
48
|
case 'Document':
|
|
57
49
|
case 'schema:BlogPosting':
|
|
@@ -70,65 +62,53 @@ var extractJsonldDataIcon = function extractJsonldDataIcon(data) {
|
|
|
70
62
|
var fileFormatIcon = extractFileFormatIcon(fileFormat);
|
|
71
63
|
var documentTypeIcon = extractDocumentTypeIcon(type, label);
|
|
72
64
|
return isNativeProvider(provider) ? fileFormatIcon || documentTypeIcon || providerIcon : providerIcon || fileFormatIcon || documentTypeIcon;
|
|
73
|
-
|
|
74
65
|
case 'atlassian:Task':
|
|
75
66
|
var taskLabel = label || 'Task';
|
|
76
|
-
|
|
77
67
|
if (isJiraProvider(provider)) {
|
|
78
68
|
var _extractTask = extractTask(data),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
taskType = _extractTask.taskType,
|
|
70
|
+
taskIcon = _extractTask.taskIcon;
|
|
82
71
|
return taskType === 'JiraCustomTaskType' ? taskIcon || urlIcon || providerIcon || {
|
|
83
72
|
icon: IconType.Task,
|
|
84
73
|
label: taskLabel
|
|
85
74
|
} : extractJiraTaskIcon(taskType, taskLabel);
|
|
86
75
|
}
|
|
87
|
-
|
|
88
76
|
return {
|
|
89
77
|
icon: IconType.Task,
|
|
90
78
|
label: taskLabel
|
|
91
79
|
};
|
|
92
|
-
|
|
93
80
|
case 'atlassian:Goal':
|
|
94
81
|
return urlIcon || {
|
|
95
82
|
icon: IconType.Task,
|
|
96
83
|
label: label || 'Goal'
|
|
97
84
|
};
|
|
98
|
-
|
|
99
85
|
case 'atlassian:Project':
|
|
100
86
|
return urlIcon || {
|
|
101
87
|
icon: IconType.Project,
|
|
102
88
|
label: label || 'Project'
|
|
103
89
|
};
|
|
104
|
-
|
|
105
90
|
case 'atlassian:SourceCodeCommit':
|
|
106
91
|
return {
|
|
107
92
|
icon: IconType.Commit,
|
|
108
93
|
label: label || 'Commit'
|
|
109
94
|
};
|
|
110
|
-
|
|
111
95
|
case 'atlassian:SourceCodePullRequest':
|
|
112
96
|
return {
|
|
113
97
|
icon: IconType.PullRequest,
|
|
114
98
|
label: label || 'Pull request'
|
|
115
99
|
};
|
|
116
|
-
|
|
117
100
|
case 'atlassian:SourceCodeReference':
|
|
118
101
|
return {
|
|
119
102
|
icon: IconType.Branch,
|
|
120
103
|
label: label || 'Reference'
|
|
121
104
|
};
|
|
122
|
-
|
|
123
105
|
case 'atlassian:SourceCodeRepository':
|
|
124
106
|
return {
|
|
125
107
|
icon: IconType.Repo,
|
|
126
108
|
label: label || 'Repository'
|
|
127
109
|
};
|
|
128
|
-
|
|
129
110
|
default:
|
|
130
111
|
return providerIcon;
|
|
131
112
|
}
|
|
132
113
|
};
|
|
133
|
-
|
|
134
114
|
export default extractJsonldDataIcon;
|
|
@@ -2,32 +2,26 @@ import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../../constants';
|
|
|
2
2
|
import { IconType } from '../../../constants';
|
|
3
3
|
import extractUrlIcon from './extract-url-icon';
|
|
4
4
|
import { extractTitle } from '@atlaskit/linking-common/extractors';
|
|
5
|
-
|
|
6
5
|
var extractProviderIcon = function extractProviderIcon(data) {
|
|
7
6
|
if (!data) {
|
|
8
7
|
return undefined;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
var generator = data.generator;
|
|
12
10
|
var provider = generator === null || generator === void 0 ? void 0 : generator['@id'];
|
|
13
11
|
var icon = generator === null || generator === void 0 ? void 0 : generator.icon;
|
|
14
12
|
var label = (generator === null || generator === void 0 ? void 0 : generator.name) || extractTitle(data);
|
|
15
|
-
|
|
16
13
|
if (provider === CONFLUENCE_GENERATOR_ID) {
|
|
17
14
|
return {
|
|
18
15
|
icon: IconType.Confluence,
|
|
19
16
|
label: label || 'Confluence'
|
|
20
17
|
};
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
if (provider === JIRA_GENERATOR_ID) {
|
|
24
20
|
return {
|
|
25
21
|
icon: IconType.Jira,
|
|
26
22
|
label: label || 'Jira'
|
|
27
23
|
};
|
|
28
24
|
}
|
|
29
|
-
|
|
30
25
|
return extractUrlIcon(icon, label);
|
|
31
26
|
};
|
|
32
|
-
|
|
33
27
|
export default extractProviderIcon;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extractUrlFromIconJsonLd } from '@atlaskit/linking-common/extractors';
|
|
2
|
-
|
|
3
2
|
var extractUrlIcon = function extractUrlIcon(icon, label) {
|
|
4
3
|
var url = icon && extractUrlFromIconJsonLd(icon);
|
|
5
4
|
return url ? {
|
|
@@ -7,5 +6,4 @@ var extractUrlIcon = function extractUrlIcon(icon, label) {
|
|
|
7
6
|
url: url
|
|
8
7
|
} : undefined;
|
|
9
8
|
};
|
|
10
|
-
|
|
11
9
|
export default extractUrlIcon;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
import extractJsonldDataIcon from './extract-jsonld-data-icon';
|
|
8
5
|
import extractProviderIcon from './extract-provider-icon';
|
|
9
6
|
import { IconType, SmartLinkStatus } from '../../../constants';
|
|
@@ -19,32 +16,28 @@ export var extractErrorIcon = function extractErrorIcon(response, status) {
|
|
|
19
16
|
// Try to get provider icon first.
|
|
20
17
|
if (response) {
|
|
21
18
|
var data = response.data;
|
|
22
|
-
|
|
23
19
|
var _ref = extractProviderIcon(data) || {},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
icon = _ref.icon,
|
|
21
|
+
url = _ref.url;
|
|
27
22
|
if (icon || url) {
|
|
28
23
|
return {
|
|
29
24
|
icon: icon,
|
|
30
25
|
url: url
|
|
31
26
|
};
|
|
32
27
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
35
29
|
|
|
30
|
+
// Otherwise, use fallback icon for each status.
|
|
36
31
|
switch (status) {
|
|
37
32
|
case SmartLinkStatus.Forbidden:
|
|
38
33
|
case SmartLinkStatus.Unauthorized:
|
|
39
34
|
return {
|
|
40
35
|
icon: IconType.Forbidden
|
|
41
36
|
};
|
|
42
|
-
|
|
43
37
|
case SmartLinkStatus.NotFound:
|
|
44
38
|
return {
|
|
45
39
|
icon: IconType.Error
|
|
46
40
|
};
|
|
47
|
-
|
|
48
41
|
case SmartLinkStatus.Errored:
|
|
49
42
|
case SmartLinkStatus.Fallback:
|
|
50
43
|
default:
|
|
@@ -11,12 +11,10 @@ import { extractLatestCommit } from './latest-commit';
|
|
|
11
11
|
import { extractPreviewAction } from './actions/extract-preview-action';
|
|
12
12
|
import { extractDownloadAction } from './actions/extract-download-action';
|
|
13
13
|
import { extractViewAction } from './actions/extract-view-action';
|
|
14
|
-
|
|
15
14
|
var extractFlexibleUiContext = function extractFlexibleUiContext(response, renderers) {
|
|
16
15
|
if (!response) {
|
|
17
16
|
return undefined;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
18
|
var data = response.data;
|
|
21
19
|
var url = extractLink(data);
|
|
22
20
|
return {
|
|
@@ -52,5 +50,4 @@ var extractFlexibleUiContext = function extractFlexibleUiContext(response, rende
|
|
|
52
50
|
url: url
|
|
53
51
|
};
|
|
54
52
|
};
|
|
55
|
-
|
|
56
53
|
export default extractFlexibleUiContext;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export var extractLatestCommit = function extractLatestCommit(jsonLd) {
|
|
2
2
|
var latestCommit = jsonLd['atlassian:latestCommit'];
|
|
3
|
-
|
|
4
3
|
if (typeof latestCommit === 'string') {
|
|
5
4
|
return latestCommit;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
6
|
if (latestCommit) {
|
|
9
7
|
//todo: change the properties to latestCommit.hash when BE is ready
|
|
10
8
|
return latestCommit ? latestCommit.name : undefined;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import { extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/linking-common/extractors';
|
|
3
|
-
|
|
4
3
|
var extractLinkName = function extractLinkName(link) {
|
|
5
4
|
if (link && _typeof(link) === 'object' && link['@type'] === 'Link') {
|
|
6
5
|
return link.name;
|
|
7
6
|
}
|
|
8
7
|
};
|
|
9
|
-
|
|
10
8
|
var extractValue = function extractValue(data, key) {
|
|
11
9
|
return data === null || data === void 0 ? void 0 : data[key];
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
export var extractCommentCount = function extractCommentCount(data) {
|
|
15
12
|
return extractValue(data, 'schema:commentCount');
|
|
16
13
|
};
|
|
@@ -28,14 +25,12 @@ export var extractVoteCount = function extractVoteCount(data) {
|
|
|
28
25
|
};
|
|
29
26
|
export var extractCreatedBy = function extractCreatedBy(data) {
|
|
30
27
|
var persons = extractPersonCreatedBy(data);
|
|
31
|
-
|
|
32
28
|
if (persons && persons.length) {
|
|
33
29
|
return persons[0].name;
|
|
34
30
|
}
|
|
35
31
|
};
|
|
36
32
|
export var extractModifiedBy = function extractModifiedBy(data) {
|
|
37
33
|
var person = extractPersonUpdatedBy(data);
|
|
38
|
-
|
|
39
34
|
if (person) {
|
|
40
35
|
return person.name;
|
|
41
36
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ElementName } from '../../constants';
|
|
2
|
-
|
|
3
2
|
var elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
4
3
|
return elementNames.filter(function (element) {
|
|
5
4
|
return element in ElementName;
|
|
@@ -10,10 +9,8 @@ var elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
|
10
9
|
};
|
|
11
10
|
});
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
export var extractMetadata = function extractMetadata(jsonLd) {
|
|
15
13
|
var _jsonLd$metadata, _metadata$primary, _metadata$secondary, _metadata$subtitle;
|
|
16
|
-
|
|
17
14
|
var metadata = (_jsonLd$metadata = jsonLd.metadata) !== null && _jsonLd$metadata !== void 0 ? _jsonLd$metadata : [];
|
|
18
15
|
return {
|
|
19
16
|
primary: elementNamesToItems((_metadata$primary = metadata.primary) !== null && _metadata$primary !== void 0 ? _metadata$primary : []),
|
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
|
-
|
|
3
2
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
|
|
5
3
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
6
|
-
|
|
7
4
|
export function genericExtractPropsFromJSONLD(options) {
|
|
8
5
|
var defaultExtractorFunction = options.defaultExtractorFunction,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
extractorPrioritiesByType = options.extractorPrioritiesByType,
|
|
7
|
+
extractorFunctionsByType = options.extractorFunctionsByType,
|
|
8
|
+
json = options.json;
|
|
13
9
|
if (json) {
|
|
14
10
|
var _type = json['@type'];
|
|
15
|
-
|
|
16
11
|
if (_type && Array.isArray(_type)) {
|
|
17
12
|
var highestPriority = 0;
|
|
18
13
|
var highestPriorityExtractorFunction = defaultExtractorFunction;
|
|
19
|
-
|
|
20
14
|
var _iterator = _createForOfIteratorHelper(_type),
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
_step;
|
|
23
16
|
try {
|
|
24
17
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
25
18
|
var t = _step.value;
|
|
26
|
-
|
|
27
19
|
if (extractorPrioritiesByType[t] > highestPriority) {
|
|
28
20
|
highestPriority = extractorPrioritiesByType[t];
|
|
29
21
|
highestPriorityExtractorFunction = extractorFunctionsByType[t];
|
|
@@ -34,14 +26,11 @@ export function genericExtractPropsFromJSONLD(options) {
|
|
|
34
26
|
} finally {
|
|
35
27
|
_iterator.f();
|
|
36
28
|
}
|
|
37
|
-
|
|
38
29
|
return highestPriorityExtractorFunction(json);
|
|
39
30
|
}
|
|
40
|
-
|
|
41
31
|
if (_type && extractorFunctionsByType[_type]) {
|
|
42
32
|
return extractorFunctionsByType[_type](json);
|
|
43
33
|
}
|
|
44
34
|
}
|
|
45
|
-
|
|
46
35
|
return defaultExtractorFunction(json);
|
|
47
36
|
}
|
|
@@ -6,13 +6,11 @@ import { extractLink, extractTitle, extractProvider } from '@atlaskit/linking-co
|
|
|
6
6
|
import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../constants';
|
|
7
7
|
export var extractInlineIcon = function extractInlineIcon(jsonLd) {
|
|
8
8
|
var provider = extractProvider(jsonLd);
|
|
9
|
-
|
|
10
9
|
if (provider && provider.id) {
|
|
11
10
|
if (provider.id === CONFLUENCE_GENERATOR_ID || provider.id === JIRA_GENERATOR_ID) {
|
|
12
11
|
return extractIcon(jsonLd);
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
return extractIcon(jsonLd, 'provider');
|
|
17
15
|
};
|
|
18
16
|
export var extractInlineProps = function extractInlineProps(jsonLd, renderers) {
|
package/dist/esm/index.js
CHANGED
|
@@ -7,10 +7,10 @@ export { SmartCardContext as Context } from '@atlaskit/link-provider';
|
|
|
7
7
|
export { EmbedResizeMessageListener } from './view/EmbedCard/EmbedResizeMessageListener';
|
|
8
8
|
export { embedHeaderHeight } from './view/EmbedCard/components/styled';
|
|
9
9
|
export { SmartLinkEvents } from './utils/analytics/analytics';
|
|
10
|
-
export { useSmartLinkEvents } from './view/SmartLinkEvents/useSmartLinkEvents';
|
|
11
|
-
|
|
10
|
+
export { useSmartLinkEvents } from './view/SmartLinkEvents/useSmartLinkEvents';
|
|
11
|
+
// Classnames for integrators
|
|
12
12
|
export { contentFooterClassName, metadataListClassName, blockCardResolvingViewClassName, blockCardResolvedViewClassName, blockCardForbiddenViewClassName, blockCardIconImageClassName, blockCardResolvedViewByClassName, blockCardForbiddenViewLinkClassName, blockCardContentClassName, blockCardContentHeaderClassName, blockCardContentHeaderNameClassName, blockCardNotFoundViewClassName, blockCardErroredViewClassName } from './classNames';
|
|
13
|
-
export { loadingPlaceholderClassName } from './view/CardWithUrl/component-lazy/LazyFallback';
|
|
14
|
-
|
|
13
|
+
export { loadingPlaceholderClassName } from './view/CardWithUrl/component-lazy/LazyFallback';
|
|
14
|
+
// Flexible UI
|
|
15
15
|
export { ActionName, ElementName, MediaPlacement, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkTheme } from './constants';
|
|
16
16
|
export { MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock, FooterBlock } from './view/FlexibleCard/components/blocks';
|
package/dist/esm/ssr.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
|
|
4
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
|
|
6
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
-
|
|
8
5
|
import React from 'react';
|
|
9
6
|
import { useState } from 'react';
|
|
10
7
|
import uuid from 'uuid';
|
|
@@ -16,19 +13,15 @@ import { LoadingCardLink } from './view/CardWithUrl/component-lazy/LazyFallback'
|
|
|
16
13
|
// only contains whats necessary to render the card on SSR mode
|
|
17
14
|
export var CardSSR = function CardSSR(props) {
|
|
18
15
|
var _useState = useState(function () {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
return uuid();
|
|
17
|
+
}),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
19
|
+
id = _useState2[0];
|
|
24
20
|
var dispatchAnalytics = function dispatchAnalytics() {}; // we can't dispatch events on SSR, after hydration the we will provide the real callback
|
|
25
|
-
|
|
26
|
-
|
|
27
21
|
var cardProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
28
22
|
id: id,
|
|
29
23
|
dispatchAnalytics: dispatchAnalytics
|
|
30
24
|
});
|
|
31
|
-
|
|
32
25
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
33
26
|
FallbackComponent: function FallbackComponent() {
|
|
34
27
|
return /*#__PURE__*/React.createElement(LoadingCardLink, cardProps);
|