@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
package/dist/esm/utils/mocks.js
CHANGED
|
@@ -5,11 +5,8 @@ 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 _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
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 { CardClient } from '@atlaskit/link-provider';
|
|
14
11
|
export var mockContext = {
|
|
15
12
|
'@vocab': 'https://www.w3.org/ns/activitystreams#',
|
|
@@ -210,15 +207,11 @@ export var fakeResponse = function fakeResponse() {
|
|
|
210
207
|
export var fakeFactory = function fakeFactory(implementation, implementationPost, implementationPrefetch) {
|
|
211
208
|
return /*#__PURE__*/function (_CardClient) {
|
|
212
209
|
_inherits(CustomClient, _CardClient);
|
|
213
|
-
|
|
214
210
|
var _super = _createSuper(CustomClient);
|
|
215
|
-
|
|
216
211
|
function CustomClient() {
|
|
217
212
|
_classCallCheck(this, CustomClient);
|
|
218
|
-
|
|
219
213
|
return _super.apply(this, arguments);
|
|
220
214
|
}
|
|
221
|
-
|
|
222
215
|
_createClass(CustomClient, [{
|
|
223
216
|
key: "fetchData",
|
|
224
217
|
value: function () {
|
|
@@ -229,10 +222,8 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
229
222
|
case 0:
|
|
230
223
|
_context.next = 2;
|
|
231
224
|
return implementation(url);
|
|
232
|
-
|
|
233
225
|
case 2:
|
|
234
226
|
return _context.abrupt("return", _context.sent);
|
|
235
|
-
|
|
236
227
|
case 3:
|
|
237
228
|
case "end":
|
|
238
229
|
return _context.stop();
|
|
@@ -240,11 +231,9 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
240
231
|
}
|
|
241
232
|
}, _callee);
|
|
242
233
|
}));
|
|
243
|
-
|
|
244
234
|
function fetchData(_x) {
|
|
245
235
|
return _fetchData.apply(this, arguments);
|
|
246
236
|
}
|
|
247
|
-
|
|
248
237
|
return fetchData;
|
|
249
238
|
}()
|
|
250
239
|
}, {
|
|
@@ -257,10 +246,8 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
257
246
|
case 0:
|
|
258
247
|
_context2.next = 2;
|
|
259
248
|
return implementationPost();
|
|
260
|
-
|
|
261
249
|
case 2:
|
|
262
250
|
return _context2.abrupt("return", _context2.sent);
|
|
263
|
-
|
|
264
251
|
case 3:
|
|
265
252
|
case "end":
|
|
266
253
|
return _context2.stop();
|
|
@@ -268,11 +255,9 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
268
255
|
}
|
|
269
256
|
}, _callee2);
|
|
270
257
|
}));
|
|
271
|
-
|
|
272
258
|
function postData() {
|
|
273
259
|
return _postData.apply(this, arguments);
|
|
274
260
|
}
|
|
275
|
-
|
|
276
261
|
return postData;
|
|
277
262
|
}()
|
|
278
263
|
}, {
|
|
@@ -285,10 +270,8 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
285
270
|
case 0:
|
|
286
271
|
_context3.next = 2;
|
|
287
272
|
return implementationPrefetch();
|
|
288
|
-
|
|
289
273
|
case 2:
|
|
290
274
|
return _context3.abrupt("return", _context3.sent);
|
|
291
|
-
|
|
292
275
|
case 3:
|
|
293
276
|
case "end":
|
|
294
277
|
return _context3.stop();
|
|
@@ -296,15 +279,12 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
296
279
|
}
|
|
297
280
|
}, _callee3);
|
|
298
281
|
}));
|
|
299
|
-
|
|
300
282
|
function prefetchData() {
|
|
301
283
|
return _prefetchData.apply(this, arguments);
|
|
302
284
|
}
|
|
303
|
-
|
|
304
285
|
return prefetchData;
|
|
305
286
|
}()
|
|
306
287
|
}]);
|
|
307
|
-
|
|
308
288
|
return CustomClient;
|
|
309
289
|
}(CardClient);
|
|
310
290
|
};
|
|
@@ -3,7 +3,6 @@ var isPerformanceAPIAvailable = function isPerformanceAPIAvailable() {
|
|
|
3
3
|
return !!performance[api];
|
|
4
4
|
});
|
|
5
5
|
};
|
|
6
|
-
|
|
7
6
|
var hasPerformanceAPIAvailable = isPerformanceAPIAvailable();
|
|
8
7
|
export var getMarkName = function getMarkName(id, status) {
|
|
9
8
|
return "".concat(status, ":").concat(id);
|
|
@@ -31,29 +30,23 @@ export var clearMeasures = function clearMeasures(id) {
|
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
|
-
|
|
35
33
|
var getMark = function getMark(id, status) {
|
|
36
34
|
if (hasPerformanceAPIAvailable) {
|
|
37
35
|
var name = getMarkName(id, status);
|
|
38
36
|
var marks = performance.getEntriesByName(name);
|
|
39
|
-
|
|
40
37
|
if (marks.length > 0) {
|
|
41
38
|
return marks[0];
|
|
42
39
|
}
|
|
43
|
-
|
|
44
40
|
return undefined;
|
|
45
41
|
}
|
|
46
42
|
};
|
|
47
|
-
|
|
48
43
|
export var getMeasure = function getMeasure(id, status) {
|
|
49
44
|
if (hasPerformanceAPIAvailable) {
|
|
50
45
|
var name = getMeasureName(id, status);
|
|
51
46
|
var measures = performance.getEntriesByName(name);
|
|
52
|
-
|
|
53
47
|
if (measures.length > 0) {
|
|
54
48
|
return measures[0];
|
|
55
49
|
}
|
|
56
|
-
|
|
57
50
|
return undefined;
|
|
58
51
|
}
|
|
59
52
|
};
|
|
@@ -67,11 +60,9 @@ export var create = function create(id, status) {
|
|
|
67
60
|
if (hasPerformanceAPIAvailable) {
|
|
68
61
|
var name = getMeasureName(id, status);
|
|
69
62
|
var measure = getMeasure(id, status);
|
|
70
|
-
|
|
71
63
|
if (!measure) {
|
|
72
64
|
var startMark = getMark(id, 'pending');
|
|
73
65
|
var endMark = getMark(id, status);
|
|
74
|
-
|
|
75
66
|
if (startMark && endMark) {
|
|
76
67
|
performance.measure(name, startMark.name, endMark.name);
|
|
77
68
|
}
|
|
@@ -2,12 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CardClient } from '@atlaskit/link-provider';
|
|
4
4
|
import { SmartCardProvider } from '../state';
|
|
5
|
-
|
|
6
5
|
var Hook = function Hook(props) {
|
|
7
6
|
props.callback();
|
|
8
7
|
return null;
|
|
9
8
|
};
|
|
10
|
-
|
|
11
9
|
export var renderHook = function renderHook(callback) {
|
|
12
10
|
return /*#__PURE__*/React.createElement(Hook, {
|
|
13
11
|
callback: callback
|
package/dist/esm/version.json
CHANGED
|
@@ -7,7 +7,6 @@ import { messages } from '../../../messages';
|
|
|
7
7
|
export function downloadFunction(_x) {
|
|
8
8
|
return _downloadFunction.apply(this, arguments);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
10
|
function _downloadFunction() {
|
|
12
11
|
_downloadFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
13
12
|
var url;
|
|
@@ -16,17 +15,13 @@ function _downloadFunction() {
|
|
|
16
15
|
switch (_context.prev = _context.next) {
|
|
17
16
|
case 0:
|
|
18
17
|
url = _ref.url;
|
|
19
|
-
|
|
20
18
|
if (url) {
|
|
21
19
|
_context.next = 3;
|
|
22
20
|
break;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
return _context.abrupt("return");
|
|
26
|
-
|
|
27
23
|
case 3:
|
|
28
24
|
downloadUrl(url);
|
|
29
|
-
|
|
30
25
|
case 4:
|
|
31
26
|
case "end":
|
|
32
27
|
return _context.stop();
|
|
@@ -36,7 +31,6 @@ function _downloadFunction() {
|
|
|
36
31
|
}));
|
|
37
32
|
return _downloadFunction.apply(this, arguments);
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
export var DownloadAction = function DownloadAction(_ref2) {
|
|
41
35
|
var url = _ref2.url;
|
|
42
36
|
return {
|
|
@@ -3,18 +3,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
5
5
|
var _excluded = ["popupMountPointId", "onClose"],
|
|
6
|
-
|
|
6
|
+
_excluded2 = ["details"];
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
-
|
|
9
8
|
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; }
|
|
10
|
-
|
|
11
9
|
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; }
|
|
12
|
-
|
|
13
10
|
import React from 'react';
|
|
14
11
|
import ReactDOM from 'react-dom';
|
|
15
12
|
import { FormattedMessage, IntlProvider } from 'react-intl-next';
|
|
16
13
|
import { messages } from '../../../messages';
|
|
17
|
-
|
|
18
14
|
/*
|
|
19
15
|
Explanatory note:
|
|
20
16
|
Actions don't have access to the react tree of whatever is rendered them
|
|
@@ -31,32 +27,28 @@ import { messages } from '../../../messages';
|
|
|
31
27
|
export function previewFunction(_x) {
|
|
32
28
|
return _previewFunction.apply(this, arguments);
|
|
33
29
|
}
|
|
30
|
+
|
|
34
31
|
/*
|
|
35
32
|
Most of these are optional as we are being fault-tolerant
|
|
36
33
|
However src, details, icon, title, and providerName are STRONGLY encouraged
|
|
37
34
|
*/
|
|
38
|
-
|
|
39
35
|
function _previewFunction() {
|
|
40
36
|
_previewFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
41
37
|
var popupMountPointId, _onClose, rest, popupMountPoint, Modal;
|
|
42
|
-
|
|
43
38
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
44
39
|
while (1) {
|
|
45
40
|
switch (_context.prev = _context.next) {
|
|
46
41
|
case 0:
|
|
47
42
|
popupMountPointId = _ref.popupMountPointId, _onClose = _ref.onClose, rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
43
|
popupMountPoint = document.getElementById(popupMountPointId);
|
|
49
|
-
|
|
50
44
|
if (!popupMountPoint) {
|
|
51
45
|
popupMountPoint = document.createElement('div');
|
|
52
46
|
popupMountPoint.id = popupMountPointId;
|
|
53
47
|
popupMountPoint.setAttribute('data-testid', 'preview-modal');
|
|
54
48
|
document.body.appendChild(popupMountPoint);
|
|
55
49
|
}
|
|
56
|
-
|
|
57
50
|
_context.next = 5;
|
|
58
51
|
return import('../../EmbedModal');
|
|
59
|
-
|
|
60
52
|
case 5:
|
|
61
53
|
Modal = _context.sent;
|
|
62
54
|
ReactDOM.render( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
@@ -65,12 +57,10 @@ function _previewFunction() {
|
|
|
65
57
|
onClose: function onClose(context) {
|
|
66
58
|
if (popupMountPoint) {
|
|
67
59
|
_onClose(context);
|
|
68
|
-
|
|
69
60
|
ReactDOM.unmountComponentAtNode(popupMountPoint);
|
|
70
61
|
}
|
|
71
62
|
}
|
|
72
63
|
}))), popupMountPoint);
|
|
73
|
-
|
|
74
64
|
case 7:
|
|
75
65
|
case "end":
|
|
76
66
|
return _context.stop();
|
|
@@ -80,11 +70,9 @@ function _previewFunction() {
|
|
|
80
70
|
}));
|
|
81
71
|
return _previewFunction.apply(this, arguments);
|
|
82
72
|
}
|
|
83
|
-
|
|
84
73
|
export default (function (_ref2) {
|
|
85
74
|
var details = _ref2.details,
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
88
76
|
return {
|
|
89
77
|
id: 'preview-content',
|
|
90
78
|
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview),
|
|
@@ -13,7 +13,6 @@ export var RetryAction = function RetryAction(handler) {
|
|
|
13
13
|
switch (_context.prev = _context.next) {
|
|
14
14
|
case 0:
|
|
15
15
|
return _context.abrupt("return", handler());
|
|
16
|
-
|
|
17
16
|
case 1:
|
|
18
17
|
case "end":
|
|
19
18
|
return _context.stop();
|
|
@@ -21,11 +20,9 @@ export var RetryAction = function RetryAction(handler) {
|
|
|
21
20
|
}
|
|
22
21
|
}, _callee);
|
|
23
22
|
}));
|
|
24
|
-
|
|
25
23
|
function promise() {
|
|
26
24
|
return _promise.apply(this, arguments);
|
|
27
25
|
}
|
|
28
|
-
|
|
29
26
|
return promise;
|
|
30
27
|
}(),
|
|
31
28
|
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again)
|
|
@@ -6,7 +6,6 @@ import { messages } from '../../../messages';
|
|
|
6
6
|
export function viewFunction(_x) {
|
|
7
7
|
return _viewFunction.apply(this, arguments);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
function _viewFunction() {
|
|
11
10
|
_viewFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
12
11
|
var url;
|
|
@@ -15,17 +14,13 @@ function _viewFunction() {
|
|
|
15
14
|
switch (_context.prev = _context.next) {
|
|
16
15
|
case 0:
|
|
17
16
|
url = _ref.url;
|
|
18
|
-
|
|
19
17
|
if (url) {
|
|
20
18
|
_context.next = 3;
|
|
21
19
|
break;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
return _context.abrupt("return");
|
|
25
|
-
|
|
26
22
|
case 3:
|
|
27
23
|
window.open(url, '_blank', 'noopener=yes');
|
|
28
|
-
|
|
29
24
|
case 4:
|
|
30
25
|
case "end":
|
|
31
26
|
return _context.stop();
|
|
@@ -35,7 +30,6 @@ function _viewFunction() {
|
|
|
35
30
|
}));
|
|
36
31
|
return _viewFunction.apply(this, arguments);
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
export var ViewAction = function ViewAction(_ref2) {
|
|
40
34
|
var url = _ref2.url;
|
|
41
35
|
return {
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { ActionName } from '../../../../constants';
|
|
5
5
|
import { messages } from '../../../../messages';
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Returns a CustomActionItem with a "Connect to <providerName>" message
|
|
8
9
|
*
|
|
@@ -10,7 +11,6 @@ import { messages } from '../../../../messages';
|
|
|
10
11
|
* @param onAuthorize a function that will be called on the click of the button
|
|
11
12
|
* @param providerName a string which is inserted into the message of the button
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
14
|
export var AuthorizeAction = function AuthorizeAction(onAuthorize, providerName) {
|
|
15
15
|
return {
|
|
16
16
|
name: ActionName.CustomAction,
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { ActionName } from '../../../../constants';
|
|
5
5
|
import { messages } from '../../../../messages';
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
8
9
|
*
|
|
@@ -11,7 +12,6 @@ import { messages } from '../../../../messages';
|
|
|
11
12
|
* @param content is a message key for a message to be displayed in the action
|
|
12
13
|
* @param context is a variable for a message in case a message contains a placeholder
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
15
|
export var ForbiddenAction = function ForbiddenAction(onClick, content, context) {
|
|
16
16
|
return {
|
|
17
17
|
name: ActionName.CustomAction,
|
|
@@ -2,13 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
3
|
import { ActionName } from '../../../../constants';
|
|
4
4
|
import { messages } from '../../../../messages';
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Returns a CustomActionItem with a "Retry" default message
|
|
7
8
|
*
|
|
8
9
|
* @see CustomActionItem
|
|
9
10
|
* @param onRetry a function that will be called on the click of the "Retry" button
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
12
|
export var RetryAction = function RetryAction(onRetry) {
|
|
13
13
|
return {
|
|
14
14
|
name: ActionName.CustomAction,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { jsx } from '@emotion/react';
|
|
5
4
|
import { useState } from 'react';
|
|
@@ -8,16 +7,14 @@ import { ActionIcon } from './ActionIcon';
|
|
|
8
7
|
export var spinnerDelay = 1000;
|
|
9
8
|
export var Action = function Action(_ref) {
|
|
10
9
|
var promise = _ref.promise,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
text = _ref.text,
|
|
11
|
+
_ref$buttonAppearance = _ref.buttonAppearance,
|
|
12
|
+
buttonAppearance = _ref$buttonAppearance === void 0 ? 'default' : _ref$buttonAppearance,
|
|
13
|
+
id = _ref.id;
|
|
16
14
|
var _useState = useState('init'),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16
|
+
state = _useState2[0],
|
|
17
|
+
setState = _useState2[1];
|
|
21
18
|
return jsx(Button, {
|
|
22
19
|
spacing: "compact",
|
|
23
20
|
appearance: buttonAppearance,
|
|
@@ -26,7 +23,6 @@ export var Action = function Action(_ref) {
|
|
|
26
23
|
onClick: function onClick(event) {
|
|
27
24
|
event.stopPropagation();
|
|
28
25
|
event.preventDefault();
|
|
29
|
-
|
|
30
26
|
if (state !== 'loading') {
|
|
31
27
|
setState('loading');
|
|
32
28
|
promise().then(function () {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import CheckIcon from '@atlaskit/icon/glyph/check';
|
|
3
3
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
4
|
-
|
|
5
4
|
/*
|
|
6
5
|
These styles are taken fro the spinner style for button. There was not an
|
|
7
6
|
easy way to share tehm between the two components.
|
|
@@ -15,12 +14,10 @@ export var spinnerStyles = {
|
|
|
15
14
|
};
|
|
16
15
|
export var ActionIcon = function ActionIcon(_ref) {
|
|
17
16
|
var state = _ref.state;
|
|
18
|
-
|
|
19
17
|
switch (state) {
|
|
20
18
|
case 'init':
|
|
21
19
|
case 'loading':
|
|
22
20
|
return null;
|
|
23
|
-
|
|
24
21
|
case 'success':
|
|
25
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
23
|
"data-testid": "check-icon",
|
|
@@ -29,7 +26,6 @@ export var ActionIcon = function ActionIcon(_ref) {
|
|
|
29
26
|
size: "small",
|
|
30
27
|
label: "check"
|
|
31
28
|
}));
|
|
32
|
-
|
|
33
29
|
case 'failure':
|
|
34
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
31
|
"data-testid": "cross-icon",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
var _excluded = ["triggerRef"];
|
|
4
|
-
|
|
5
4
|
/** @jsx jsx */
|
|
6
5
|
import { jsx } from '@emotion/react';
|
|
7
6
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
@@ -30,8 +29,7 @@ export var ActionList = function ActionList(_ref) {
|
|
|
30
29
|
}, jsx(DropdownMenu, {
|
|
31
30
|
trigger: function trigger(_ref2) {
|
|
32
31
|
var triggerRef = _ref2.triggerRef,
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
35
33
|
return jsx(Button, _extends({}, props, {
|
|
36
34
|
iconBefore: jsx(MoreIcon, {
|
|
37
35
|
label: "more"
|
|
@@ -4,17 +4,15 @@ import AvatarGroup from '@atlaskit/avatar-group';
|
|
|
4
4
|
import { mq } from '../../common/utils';
|
|
5
5
|
export var CollaboratorList = function CollaboratorList(_ref) {
|
|
6
6
|
var items = _ref.items,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
_ref$handleAvatarClic = _ref.handleAvatarClick,
|
|
8
|
+
handleAvatarClick = _ref$handleAvatarClic === void 0 ? function () {} : _ref$handleAvatarClic,
|
|
9
|
+
_ref$handleMoreAvatar = _ref.handleMoreAvatarsClick,
|
|
10
|
+
handleMoreAvatarsClick = _ref$handleMoreAvatar === void 0 ? function () {} : _ref$handleMoreAvatar,
|
|
11
|
+
_ref$testId = _ref.testId,
|
|
12
|
+
testId = _ref$testId === void 0 ? 'collaborator-list' : _ref$testId;
|
|
14
13
|
if (items.length === 0) {
|
|
15
14
|
return null;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
return jsx("span", {
|
|
19
17
|
css: mq({
|
|
20
18
|
display: ['none', 'inherit']
|
|
@@ -4,8 +4,8 @@ import { gs, mq } from '../../common/utils';
|
|
|
4
4
|
export var blockCardContentClassName = 'block-card-content';
|
|
5
5
|
export var Content = function Content(_ref) {
|
|
6
6
|
var children = _ref.children,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
_ref$isCompact = _ref.isCompact,
|
|
8
|
+
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
9
9
|
return jsx("div", {
|
|
10
10
|
css: mq({
|
|
11
11
|
padding: isCompact ? gs(1) : gs(2),
|
|
@@ -4,8 +4,8 @@ import { gs, mq } from '../../common/utils';
|
|
|
4
4
|
export var contentFooterClassName = 'smart-link-content-footer';
|
|
5
5
|
export var ContentFooter = function ContentFooter(_ref) {
|
|
6
6
|
var children = _ref.children,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
_ref$hasSpaceBetween = _ref.hasSpaceBetween,
|
|
8
|
+
hasSpaceBetween = _ref$hasSpaceBetween === void 0 ? false : _ref$hasSpaceBetween;
|
|
9
9
|
return jsx("div", {
|
|
10
10
|
css: mq({
|
|
11
11
|
display: 'flex',
|
|
@@ -3,8 +3,8 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
export var blockCardContentHeaderClassName = 'block-card-content-header';
|
|
4
4
|
export var ContentHeader = function ContentHeader(_ref) {
|
|
5
5
|
var onClick = _ref.onClick,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
link = _ref.link,
|
|
7
|
+
children = _ref.children;
|
|
8
8
|
return jsx("a", {
|
|
9
9
|
onClick: onClick,
|
|
10
10
|
href: link,
|
|
@@ -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
|
/** @jsx jsx */
|
|
8
5
|
import { jsx } from '@emotion/react';
|
|
9
6
|
import React from 'react';
|
|
@@ -25,11 +22,11 @@ var sharedFrameStyles = {
|
|
|
25
22
|
};
|
|
26
23
|
export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
27
24
|
var children = _ref.children,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
isSelected = _ref.isSelected,
|
|
26
|
+
isHoverable = _ref.isHoverable,
|
|
27
|
+
testId = _ref.testId,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
isFluidHeight = _ref.isFluidHeight;
|
|
33
30
|
return jsx("div", {
|
|
34
31
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
35
32
|
'&:hover': isHoverable ? {
|
|
@@ -51,11 +48,11 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
51
48
|
};
|
|
52
49
|
export var CompactFrame = function CompactFrame(_ref2) {
|
|
53
50
|
var children = _ref2.children,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
isHoverable = _ref2.isHoverable,
|
|
52
|
+
isSelected = _ref2.isSelected,
|
|
53
|
+
testId = _ref2.testId,
|
|
54
|
+
className = _ref2.className,
|
|
55
|
+
inheritDimensions = _ref2.inheritDimensions;
|
|
59
56
|
return jsx("div", {
|
|
60
57
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
61
58
|
'&:hover': isHoverable ? {
|
|
@@ -3,9 +3,9 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import { B400 } from '@atlaskit/theme/colors';
|
|
4
4
|
export var Link = function Link(_ref) {
|
|
5
5
|
var url = _ref.url,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
_ref$testId = _ref.testId,
|
|
7
|
+
testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
|
|
8
|
+
className = _ref.className;
|
|
9
9
|
return jsx("span", {
|
|
10
10
|
"data-testid": "".concat(testId, "-link"),
|
|
11
11
|
className: className,
|
|
@@ -5,10 +5,10 @@ import { gs } from '../../common/utils';
|
|
|
5
5
|
export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
6
6
|
export var Name = function Name(_ref) {
|
|
7
7
|
var name = _ref.name,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
_ref$isLeftPadded = _ref.isLeftPadded,
|
|
9
|
+
isLeftPadded = _ref$isLeftPadded === void 0 ? true : _ref$isLeftPadded,
|
|
10
|
+
testId = _ref.testId,
|
|
11
|
+
textColor = _ref.textColor;
|
|
12
12
|
return jsx("span", {
|
|
13
13
|
css: {
|
|
14
14
|
fontSize: "".concat(fontSize(), "px"),
|
|
@@ -4,9 +4,8 @@ import { N300 } from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { gs } from '../../common/utils';
|
|
5
5
|
export var Provider = function Provider(_ref) {
|
|
6
6
|
var name = _ref.name,
|
|
7
|
-
|
|
7
|
+
icon = _ref.icon;
|
|
8
8
|
var iconToRender = icon || null;
|
|
9
|
-
|
|
10
9
|
if (typeof icon === 'string') {
|
|
11
10
|
iconToRender = jsx("img", {
|
|
12
11
|
className: "smart-link-icon",
|
|
@@ -17,7 +16,6 @@ export var Provider = function Provider(_ref) {
|
|
|
17
16
|
src: icon
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
return jsx("div", {
|
|
22
20
|
css: {
|
|
23
21
|
display: 'flex',
|
|
@@ -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
|
/** @jsx jsx */
|
|
8
5
|
import { jsx } from '@emotion/react';
|
|
9
6
|
import { gs, mq } from '../../common/utils';
|
|
@@ -18,7 +15,7 @@ var sharedStyles = {
|
|
|
18
15
|
};
|
|
19
16
|
export var ThumbnailDefault = function ThumbnailDefault(_ref) {
|
|
20
17
|
var src = _ref.src,
|
|
21
|
-
|
|
18
|
+
testId = _ref.testId;
|
|
22
19
|
return jsx("div", {
|
|
23
20
|
css: mq(_objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
24
21
|
backgroundSize: 'cover',
|
|
@@ -32,8 +29,8 @@ export var ThumbnailDefault = function ThumbnailDefault(_ref) {
|
|
|
32
29
|
};
|
|
33
30
|
export var ThumbnailWithBackground = function ThumbnailWithBackground(_ref2) {
|
|
34
31
|
var src = _ref2.src,
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
color = _ref2.color,
|
|
33
|
+
testId = _ref2.testId;
|
|
37
34
|
return jsx("div", {
|
|
38
35
|
css: mq(_objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
39
36
|
backgroundColor: color,
|