@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
|
@@ -26,7 +26,6 @@ export class SmartLinkEvents {
|
|
|
26
26
|
}
|
|
27
27
|
}, createAnalyticsEvent);
|
|
28
28
|
}
|
|
29
|
-
|
|
30
29
|
}
|
|
31
30
|
export const fireSmartLinkEvent = (payload, createAnalyticsEvent) => {
|
|
32
31
|
if (createAnalyticsEvent) {
|
|
@@ -37,7 +36,8 @@ export const resolvedEvent = props => ({
|
|
|
37
36
|
action: 'resolved',
|
|
38
37
|
actionSubject: 'smartLink',
|
|
39
38
|
eventType: 'operational',
|
|
40
|
-
attributes: {
|
|
39
|
+
attributes: {
|
|
40
|
+
...props,
|
|
41
41
|
...context
|
|
42
42
|
}
|
|
43
43
|
});
|
|
@@ -101,7 +101,8 @@ export const invokeSucceededEvent = ({
|
|
|
101
101
|
action: 'resolved',
|
|
102
102
|
actionSubject: 'smartLinkAction',
|
|
103
103
|
eventType: 'operational',
|
|
104
|
-
attributes: {
|
|
104
|
+
attributes: {
|
|
105
|
+
...context,
|
|
105
106
|
id,
|
|
106
107
|
actionType,
|
|
107
108
|
display,
|
|
@@ -132,7 +133,8 @@ export const invokeFailedEvent = ({
|
|
|
132
133
|
action: 'unresolved',
|
|
133
134
|
actionSubject: 'smartLinkAction',
|
|
134
135
|
eventType: 'operational',
|
|
135
|
-
attributes: {
|
|
136
|
+
attributes: {
|
|
137
|
+
...context,
|
|
136
138
|
id,
|
|
137
139
|
actionType,
|
|
138
140
|
display,
|
|
@@ -156,7 +158,8 @@ export const connectSucceededEvent = ({
|
|
|
156
158
|
action: 'connectSucceeded',
|
|
157
159
|
actionSubject: 'smartLink',
|
|
158
160
|
eventType: 'operational',
|
|
159
|
-
attributes: {
|
|
161
|
+
attributes: {
|
|
162
|
+
...context,
|
|
160
163
|
definitionId,
|
|
161
164
|
extensionKey,
|
|
162
165
|
destinationProduct,
|
|
@@ -176,7 +179,8 @@ export const connectFailedEvent = ({
|
|
|
176
179
|
actionSubject: 'smartLink',
|
|
177
180
|
actionSubjectId: reason,
|
|
178
181
|
eventType: 'operational',
|
|
179
|
-
attributes: {
|
|
182
|
+
attributes: {
|
|
183
|
+
...context,
|
|
180
184
|
reason,
|
|
181
185
|
extensionKey,
|
|
182
186
|
definitionId,
|
|
@@ -195,7 +199,8 @@ export const trackAppAccountConnected = ({
|
|
|
195
199
|
action: 'connected',
|
|
196
200
|
actionSubject: 'applicationAccount',
|
|
197
201
|
eventType: 'track',
|
|
198
|
-
attributes: {
|
|
202
|
+
attributes: {
|
|
203
|
+
...context,
|
|
199
204
|
definitionId,
|
|
200
205
|
extensionKey,
|
|
201
206
|
destinationProduct,
|
|
@@ -210,7 +215,8 @@ export const trackAppAccountAuthStarted = ({
|
|
|
210
215
|
action: 'authStarted',
|
|
211
216
|
actionSubject: 'applicationAccount',
|
|
212
217
|
eventType: 'track',
|
|
213
|
-
attributes: {
|
|
218
|
+
attributes: {
|
|
219
|
+
...context,
|
|
214
220
|
extensionKey,
|
|
215
221
|
location
|
|
216
222
|
}
|
|
@@ -223,7 +229,8 @@ export const trackLinkUpdated = ({
|
|
|
223
229
|
actionSubject: 'link',
|
|
224
230
|
actionSubjectId,
|
|
225
231
|
eventType: 'track',
|
|
226
|
-
attributes: {
|
|
232
|
+
attributes: {
|
|
233
|
+
...context,
|
|
227
234
|
...attributes
|
|
228
235
|
}
|
|
229
236
|
});
|
|
@@ -239,7 +246,8 @@ export const uiAuthEvent = ({
|
|
|
239
246
|
actionSubject: 'button',
|
|
240
247
|
actionSubjectId: 'connectAccount',
|
|
241
248
|
eventType: 'ui',
|
|
242
|
-
attributes: {
|
|
249
|
+
attributes: {
|
|
250
|
+
...context,
|
|
243
251
|
definitionId,
|
|
244
252
|
extensionKey,
|
|
245
253
|
destinationProduct,
|
|
@@ -260,7 +268,8 @@ export const uiAuthAlternateAccountEvent = ({
|
|
|
260
268
|
actionSubject: 'smartLink',
|
|
261
269
|
actionSubjectId: 'tryAnotherAccount',
|
|
262
270
|
eventType: 'ui',
|
|
263
|
-
attributes: {
|
|
271
|
+
attributes: {
|
|
272
|
+
...context,
|
|
264
273
|
definitionId,
|
|
265
274
|
extensionKey,
|
|
266
275
|
destinationProduct,
|
|
@@ -285,7 +294,8 @@ export const uiCardClickedEvent = ({
|
|
|
285
294
|
actionSubject: 'smartLink',
|
|
286
295
|
actionSubjectId,
|
|
287
296
|
eventType: 'ui',
|
|
288
|
-
attributes: {
|
|
297
|
+
attributes: {
|
|
298
|
+
...context,
|
|
289
299
|
id,
|
|
290
300
|
status,
|
|
291
301
|
definitionId,
|
|
@@ -312,7 +322,8 @@ export const uiIframeDwelledEvent = ({
|
|
|
312
322
|
action: 'dwelled',
|
|
313
323
|
actionSubject: 'smartLinkIframe',
|
|
314
324
|
eventType: 'ui',
|
|
315
|
-
attributes: {
|
|
325
|
+
attributes: {
|
|
326
|
+
...context,
|
|
316
327
|
id,
|
|
317
328
|
status,
|
|
318
329
|
definitionId,
|
|
@@ -338,7 +349,8 @@ export const uiIframeFocusedEvent = ({
|
|
|
338
349
|
action: 'focused',
|
|
339
350
|
actionSubject: 'smartLinkIframe',
|
|
340
351
|
eventType: 'ui',
|
|
341
|
-
attributes: {
|
|
352
|
+
attributes: {
|
|
353
|
+
...context,
|
|
342
354
|
id,
|
|
343
355
|
status,
|
|
344
356
|
definitionId,
|
|
@@ -363,7 +375,8 @@ export const uiActionClickedEvent = ({
|
|
|
363
375
|
actionSubject: 'button',
|
|
364
376
|
actionSubjectId: uiActionSubjectIds[actionType],
|
|
365
377
|
eventType: 'ui',
|
|
366
|
-
attributes: {
|
|
378
|
+
attributes: {
|
|
379
|
+
...context,
|
|
367
380
|
id,
|
|
368
381
|
display,
|
|
369
382
|
actionType: actionType,
|
|
@@ -385,7 +398,8 @@ export const uiClosedAuthEvent = ({
|
|
|
385
398
|
action: 'closed',
|
|
386
399
|
actionSubject: 'consentModal',
|
|
387
400
|
eventType: 'ui',
|
|
388
|
-
attributes: {
|
|
401
|
+
attributes: {
|
|
402
|
+
...context,
|
|
389
403
|
extensionKey,
|
|
390
404
|
definitionId,
|
|
391
405
|
destinationProduct,
|
|
@@ -403,7 +417,8 @@ export const screenAuthPopupEvent = ({
|
|
|
403
417
|
}) => ({
|
|
404
418
|
actionSubject: 'consentModal',
|
|
405
419
|
eventType: 'screen',
|
|
406
|
-
attributes: {
|
|
420
|
+
attributes: {
|
|
421
|
+
...context,
|
|
407
422
|
extensionKey,
|
|
408
423
|
definitionId,
|
|
409
424
|
destinationProduct,
|
|
@@ -423,7 +438,8 @@ export const uiRenderSuccessEvent = ({
|
|
|
423
438
|
action: 'renderSuccess',
|
|
424
439
|
actionSubject: 'smartLink',
|
|
425
440
|
eventType: 'ui',
|
|
426
|
-
attributes: {
|
|
441
|
+
attributes: {
|
|
442
|
+
...context,
|
|
427
443
|
status,
|
|
428
444
|
extensionKey,
|
|
429
445
|
definitionId,
|
|
@@ -446,7 +462,8 @@ export const uiRenderFailedEvent = ({
|
|
|
446
462
|
actionSubject: 'smartLink',
|
|
447
463
|
action: 'renderFailed',
|
|
448
464
|
eventType: 'ui',
|
|
449
|
-
attributes: {
|
|
465
|
+
attributes: {
|
|
466
|
+
...context,
|
|
450
467
|
error,
|
|
451
468
|
errorInfo,
|
|
452
469
|
display,
|
|
@@ -471,7 +488,8 @@ export const uiHoverCardViewedEvent = ({
|
|
|
471
488
|
action: 'viewed',
|
|
472
489
|
actionSubject: 'hoverCard',
|
|
473
490
|
eventType: 'ui',
|
|
474
|
-
attributes: {
|
|
491
|
+
attributes: {
|
|
492
|
+
...context,
|
|
475
493
|
id,
|
|
476
494
|
previewDisplay,
|
|
477
495
|
extensionKey,
|
|
@@ -498,7 +516,8 @@ export const uiHoverCardDismissedEvent = ({
|
|
|
498
516
|
action: 'dismissed',
|
|
499
517
|
actionSubject: 'hoverCard',
|
|
500
518
|
eventType: 'ui',
|
|
501
|
-
attributes: {
|
|
519
|
+
attributes: {
|
|
520
|
+
...context,
|
|
502
521
|
id,
|
|
503
522
|
previewDisplay,
|
|
504
523
|
hoverTime,
|
|
@@ -525,7 +544,8 @@ export const uiHoverCardOpenLinkClickedEvent = ({
|
|
|
525
544
|
actionSubject: 'button',
|
|
526
545
|
actionSubjectId: 'shortcutGoToLink',
|
|
527
546
|
eventType: 'ui',
|
|
528
|
-
attributes: {
|
|
547
|
+
attributes: {
|
|
548
|
+
...context,
|
|
529
549
|
id,
|
|
530
550
|
previewDisplay,
|
|
531
551
|
extensionKey,
|
|
@@ -541,7 +561,8 @@ export const uiLearnMoreLinkClickedEvent = () => ({
|
|
|
541
561
|
actionSubject: 'button',
|
|
542
562
|
actionSubjectId: 'learnMore',
|
|
543
563
|
eventType: 'ui',
|
|
544
|
-
attributes: {
|
|
564
|
+
attributes: {
|
|
565
|
+
...context
|
|
545
566
|
}
|
|
546
567
|
});
|
|
547
568
|
export const chunkloadFailedEvent = ({
|
|
@@ -557,7 +578,8 @@ export const chunkloadFailedEvent = ({
|
|
|
557
578
|
action: 'chunkLoadFailed',
|
|
558
579
|
actionSubject: 'smartLink',
|
|
559
580
|
eventType: 'operational',
|
|
560
|
-
attributes: {
|
|
581
|
+
attributes: {
|
|
582
|
+
...context,
|
|
561
583
|
error,
|
|
562
584
|
errorInfo,
|
|
563
585
|
display,
|
|
@@ -15,7 +15,6 @@ export const instrumentEvent = ({
|
|
|
15
15
|
const measure = getMeasure(id, status) || {
|
|
16
16
|
duration: undefined
|
|
17
17
|
};
|
|
18
|
-
|
|
19
18
|
if (status === 'resolved') {
|
|
20
19
|
const event = resolvedEvent({
|
|
21
20
|
id,
|
|
@@ -26,8 +25,10 @@ export const instrumentEvent = ({
|
|
|
26
25
|
destinationSubproduct,
|
|
27
26
|
location
|
|
28
27
|
});
|
|
29
|
-
return {
|
|
30
|
-
|
|
28
|
+
return {
|
|
29
|
+
...event,
|
|
30
|
+
attributes: {
|
|
31
|
+
...event.attributes,
|
|
31
32
|
duration: measure.duration
|
|
32
33
|
}
|
|
33
34
|
};
|
|
@@ -44,8 +45,10 @@ export const instrumentEvent = ({
|
|
|
44
45
|
location,
|
|
45
46
|
error
|
|
46
47
|
});
|
|
47
|
-
return {
|
|
48
|
-
|
|
48
|
+
return {
|
|
49
|
+
...event,
|
|
50
|
+
attributes: {
|
|
51
|
+
...event.attributes,
|
|
49
52
|
duration: measure.duration
|
|
50
53
|
}
|
|
51
54
|
};
|
|
@@ -6,7 +6,6 @@ export const isFlexibleUiCard = children => {
|
|
|
6
6
|
if (children && React.Children.toArray(children).some(child => isFlexibleUiTitleBlock(child))) {
|
|
7
7
|
return true;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
return false;
|
|
11
10
|
};
|
|
12
11
|
export const isFlexibleUiBlock = node => /*#__PURE__*/React.isValidElement(node) && Object.values(Blocks).some(type => type === node.type);
|
|
@@ -9,19 +9,14 @@ export const getIconForFileType = fileMimeType => {
|
|
|
9
9
|
if (!fileMimeType) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
12
|
let icon = typeToIcon[fileMimeType.toLowerCase()];
|
|
14
|
-
|
|
15
13
|
if (!icon) {
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
const [label, importCb] = icon;
|
|
20
|
-
|
|
21
17
|
if (!importCb) {
|
|
22
18
|
return;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
const Icon = Loadable({
|
|
26
21
|
loader: () => importCb().then(module => module.default),
|
|
27
22
|
loading: () => null
|
|
@@ -34,11 +29,9 @@ export const getIconForFileType = fileMimeType => {
|
|
|
34
29
|
};
|
|
35
30
|
export const getLabelForFileType = fileMimeType => {
|
|
36
31
|
let icon = typeToIcon[fileMimeType.toLowerCase()];
|
|
37
|
-
|
|
38
32
|
if (!icon) {
|
|
39
33
|
return;
|
|
40
34
|
}
|
|
41
|
-
|
|
42
35
|
const [label] = icon;
|
|
43
36
|
return label;
|
|
44
37
|
};
|
|
@@ -14,7 +14,8 @@ export const getUnauthorizedJsonLd = () => ({
|
|
|
14
14
|
auth: [],
|
|
15
15
|
definitionId: 'provider-not-found'
|
|
16
16
|
},
|
|
17
|
-
data: {
|
|
17
|
+
data: {
|
|
18
|
+
...emptyData
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
export const getForbiddenJsonLd = () => ({
|
|
@@ -24,6 +25,7 @@ export const getForbiddenJsonLd = () => ({
|
|
|
24
25
|
auth: [],
|
|
25
26
|
definitionId: 'provider-not-found'
|
|
26
27
|
},
|
|
27
|
-
data: {
|
|
28
|
+
data: {
|
|
29
|
+
...emptyData
|
|
28
30
|
}
|
|
29
31
|
});
|
|
@@ -197,15 +197,12 @@ export const fakeFactory = (implementation, implementationPost, implementationPr
|
|
|
197
197
|
async fetchData(url) {
|
|
198
198
|
return await implementation(url);
|
|
199
199
|
}
|
|
200
|
-
|
|
201
200
|
async postData() {
|
|
202
201
|
return await implementationPost();
|
|
203
202
|
}
|
|
204
|
-
|
|
205
203
|
async prefetchData() {
|
|
206
204
|
return await implementationPrefetch();
|
|
207
205
|
}
|
|
208
|
-
|
|
209
206
|
};
|
|
210
207
|
export const waitFor = (time = 1) => new Promise(res => setTimeout(res, time));
|
|
211
208
|
export const mockAnalytics = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const isPerformanceAPIAvailable = () => {
|
|
2
2
|
return typeof window !== 'undefined' && 'performance' in window && ['measure', 'clearMeasures', 'clearMarks', 'getEntriesByName', 'getEntriesByType'].every(api => !!performance[api]);
|
|
3
3
|
};
|
|
4
|
-
|
|
5
4
|
const hasPerformanceAPIAvailable = isPerformanceAPIAvailable();
|
|
6
5
|
export const getMarkName = (id, status) => `${status}:${id}`;
|
|
7
6
|
export const getMeasureName = (id, status) => `time-to-${status}:${id}`;
|
|
@@ -17,29 +16,23 @@ export const clearMeasures = id => {
|
|
|
17
16
|
measures.forEach(measure => performance.clearMeasures(measure.name));
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
|
-
|
|
21
19
|
const getMark = (id, status) => {
|
|
22
20
|
if (hasPerformanceAPIAvailable) {
|
|
23
21
|
const name = getMarkName(id, status);
|
|
24
22
|
const marks = performance.getEntriesByName(name);
|
|
25
|
-
|
|
26
23
|
if (marks.length > 0) {
|
|
27
24
|
return marks[0];
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
return undefined;
|
|
31
27
|
}
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
export const getMeasure = (id, status) => {
|
|
35
30
|
if (hasPerformanceAPIAvailable) {
|
|
36
31
|
const name = getMeasureName(id, status);
|
|
37
32
|
const measures = performance.getEntriesByName(name);
|
|
38
|
-
|
|
39
33
|
if (measures.length > 0) {
|
|
40
34
|
return measures[0];
|
|
41
35
|
}
|
|
42
|
-
|
|
43
36
|
return undefined;
|
|
44
37
|
}
|
|
45
38
|
};
|
|
@@ -53,11 +46,9 @@ export const create = (id, status) => {
|
|
|
53
46
|
if (hasPerformanceAPIAvailable) {
|
|
54
47
|
const name = getMeasureName(id, status);
|
|
55
48
|
const measure = getMeasure(id, status);
|
|
56
|
-
|
|
57
49
|
if (!measure) {
|
|
58
50
|
const startMark = getMark(id, 'pending');
|
|
59
51
|
const endMark = getMark(id, status);
|
|
60
|
-
|
|
61
52
|
if (startMark && endMark) {
|
|
62
53
|
performance.measure(name, startMark.name, endMark.name);
|
|
63
54
|
}
|
|
@@ -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
|
const Hook = props => {
|
|
7
6
|
props.callback();
|
|
8
7
|
return null;
|
|
9
8
|
};
|
|
10
|
-
|
|
11
9
|
export const renderHook = callback => {
|
|
12
10
|
return /*#__PURE__*/React.createElement(Hook, {
|
|
13
11
|
callback: callback
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
import { FormattedMessage, IntlProvider } from 'react-intl-next';
|
|
5
5
|
import { messages } from '../../../messages';
|
|
6
|
-
|
|
7
6
|
/*
|
|
8
7
|
Explanatory note:
|
|
9
8
|
Actions don't have access to the react tree of whatever is rendered them
|
|
@@ -24,14 +23,12 @@ export async function previewFunction({
|
|
|
24
23
|
}) {
|
|
25
24
|
let popupMountPoint;
|
|
26
25
|
popupMountPoint = document.getElementById(popupMountPointId);
|
|
27
|
-
|
|
28
26
|
if (!popupMountPoint) {
|
|
29
27
|
popupMountPoint = document.createElement('div');
|
|
30
28
|
popupMountPoint.id = popupMountPointId;
|
|
31
29
|
popupMountPoint.setAttribute('data-testid', 'preview-modal');
|
|
32
30
|
document.body.appendChild(popupMountPoint);
|
|
33
31
|
}
|
|
34
|
-
|
|
35
32
|
let Modal = await import('../../EmbedModal');
|
|
36
33
|
ReactDOM.render( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
37
34
|
locale: "en"
|
|
@@ -44,6 +41,7 @@ export async function previewFunction({
|
|
|
44
41
|
}
|
|
45
42
|
}))), popupMountPoint);
|
|
46
43
|
}
|
|
44
|
+
|
|
47
45
|
/*
|
|
48
46
|
Most of these are optional as we are being fault-tolerant
|
|
49
47
|
However src, details, icon, title, and providerName are STRONGLY encouraged
|
|
@@ -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 const AuthorizeAction = (onAuthorize, providerName) => ({
|
|
15
15
|
name: ActionName.CustomAction,
|
|
16
16
|
content: providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_unauthorised_account_action, {
|
|
@@ -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 const ForbiddenAction = (onClick, content, context) => ({
|
|
16
16
|
name: ActionName.CustomAction,
|
|
17
17
|
content: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[content], {
|
|
@@ -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 const RetryAction = onRetry => ({
|
|
13
13
|
name: ActionName.CustomAction,
|
|
14
14
|
onClick: onRetry,
|
|
@@ -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.
|
|
@@ -20,7 +19,6 @@ export const ActionIcon = ({
|
|
|
20
19
|
case 'init':
|
|
21
20
|
case 'loading':
|
|
22
21
|
return null;
|
|
23
|
-
|
|
24
22
|
case 'success':
|
|
25
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
24
|
"data-testid": "check-icon",
|
|
@@ -29,7 +27,6 @@ export const ActionIcon = ({
|
|
|
29
27
|
size: "small",
|
|
30
28
|
label: "check"
|
|
31
29
|
}));
|
|
32
|
-
|
|
33
30
|
case 'failure':
|
|
34
31
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
32
|
"data-testid": "cross-icon",
|
|
@@ -23,7 +23,8 @@ export const ExpandedFrame = ({
|
|
|
23
23
|
isFluidHeight
|
|
24
24
|
}) => {
|
|
25
25
|
return jsx("div", {
|
|
26
|
-
css: mq({
|
|
26
|
+
css: mq({
|
|
27
|
+
...sharedFrameStyles,
|
|
27
28
|
'&:hover': isHoverable ? {
|
|
28
29
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
29
30
|
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N20A})`,
|
|
@@ -50,7 +51,8 @@ export const CompactFrame = ({
|
|
|
50
51
|
inheritDimensions
|
|
51
52
|
}) => {
|
|
52
53
|
return jsx("div", {
|
|
53
|
-
css: mq({
|
|
54
|
+
css: mq({
|
|
55
|
+
...sharedFrameStyles,
|
|
54
56
|
'&:hover': isHoverable ? {
|
|
55
57
|
backgroundColor: `var(--ds-background-neutral-hovered, ${N30A})`
|
|
56
58
|
} : undefined,
|
|
@@ -7,7 +7,6 @@ export const Provider = ({
|
|
|
7
7
|
icon
|
|
8
8
|
}) => {
|
|
9
9
|
let iconToRender = icon || null;
|
|
10
|
-
|
|
11
10
|
if (typeof icon === 'string') {
|
|
12
11
|
iconToRender = jsx("img", {
|
|
13
12
|
className: "smart-link-icon",
|
|
@@ -18,7 +17,6 @@ export const Provider = ({
|
|
|
18
17
|
src: icon
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
return jsx("div", {
|
|
23
21
|
css: {
|
|
24
22
|
display: 'flex',
|
|
@@ -15,7 +15,8 @@ export const ThumbnailDefault = ({
|
|
|
15
15
|
testId
|
|
16
16
|
}) => {
|
|
17
17
|
return jsx("div", {
|
|
18
|
-
css: mq({
|
|
18
|
+
css: mq({
|
|
19
|
+
...sharedStyles,
|
|
19
20
|
backgroundSize: 'cover',
|
|
20
21
|
backgroundRepeat: 'no-repeat',
|
|
21
22
|
backgroundPosition: '50% 50%',
|
|
@@ -31,7 +32,8 @@ export const ThumbnailWithBackground = ({
|
|
|
31
32
|
testId
|
|
32
33
|
}) => {
|
|
33
34
|
return jsx("div", {
|
|
34
|
-
css: mq({
|
|
35
|
+
css: mq({
|
|
36
|
+
...sharedStyles,
|
|
35
37
|
backgroundColor: color,
|
|
36
38
|
display: 'flex',
|
|
37
39
|
alignItems: 'center',
|
|
@@ -4,7 +4,6 @@ import { Provider } from '../../../../FlexibleCard/components/elements';
|
|
|
4
4
|
import ElementGroup from '../../../../FlexibleCard/components/blocks/element-group';
|
|
5
5
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
6
6
|
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
7
|
-
|
|
8
7
|
const getActionGroupStyles = size => {
|
|
9
8
|
if (size === SmartLinkSize.XLarge) {
|
|
10
9
|
// The biggest height of the action button exceeds the max line-height
|
|
@@ -15,12 +14,12 @@ const getActionGroupStyles = size => {
|
|
|
15
14
|
`;
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
const providerStyles = css`
|
|
20
18
|
span:first-child {
|
|
21
19
|
margin-right: 0.375rem;
|
|
22
20
|
}
|
|
23
21
|
`;
|
|
22
|
+
|
|
24
23
|
/**
|
|
25
24
|
* This Component is a footer that is used in a Block Card with Flexible UI.
|
|
26
25
|
* It contains a provider icon if provider is present and an actions list if one is passed.
|
|
@@ -29,7 +28,6 @@ const providerStyles = css`
|
|
|
29
28
|
* @see CustomBlock
|
|
30
29
|
* @param props are the data required for the block, such as actions to be displayed.
|
|
31
30
|
*/
|
|
32
|
-
|
|
33
31
|
const BlockCardFooter = props => {
|
|
34
32
|
const {
|
|
35
33
|
actions,
|
|
@@ -51,5 +49,4 @@ const BlockCardFooter = props => {
|
|
|
51
49
|
appearance: actionGroupAppearance
|
|
52
50
|
})) : null);
|
|
53
51
|
};
|
|
54
|
-
|
|
55
52
|
export default BlockCardFooter;
|