@atlaskit/smart-card 23.14.0 → 23.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/__tests_external__/index.js +0 -6
- package/dist/cjs/__tests_external__/page-objects/BaseCard.js +6 -26
- package/dist/cjs/__tests_external__/page-objects/BlockCard.js +0 -15
- package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +0 -15
- package/dist/cjs/__tests_external__/page-objects/InlineCard.js +0 -15
- package/dist/cjs/__tests_external__/test-cases/card.js +2 -6
- package/dist/cjs/__tests_external__/test-cases/embed.js +1 -5
- package/dist/cjs/__tests_external__/test-cases/inline.js +2 -6
- package/dist/cjs/classNames.js +0 -11
- package/dist/cjs/client/index.js +0 -1
- package/dist/cjs/constants.js +1 -36
- package/dist/cjs/extractors/block/index.js +2 -29
- package/dist/cjs/extractors/common/actions/extractActions.js +2 -20
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +18 -34
- package/dist/cjs/extractors/common/byline/extractByline.js +4 -15
- package/dist/cjs/extractors/common/context/extractAccessContext.js +2 -17
- package/dist/cjs/extractors/common/context/index.js +0 -1
- package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +0 -7
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +0 -7
- package/dist/cjs/extractors/common/detail/extractDownloadUrl.js +0 -2
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +0 -7
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +0 -7
- package/dist/cjs/extractors/common/detail/index.js +0 -5
- package/dist/cjs/extractors/common/icon/extractFileFormat.js +0 -2
- package/dist/cjs/extractors/common/icon/extractIcon.js +0 -26
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +2 -22
- package/dist/cjs/extractors/common/icon/extractIconFromTask.js +1 -28
- package/dist/cjs/extractors/common/icon/index.js +0 -4
- package/dist/cjs/extractors/common/lozenge/extractLozenge.js +0 -15
- package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +1 -6
- package/dist/cjs/extractors/common/lozenge/extractState.js +0 -5
- package/dist/cjs/extractors/common/lozenge/extractTag.js +0 -6
- package/dist/cjs/extractors/common/lozenge/extractTaskStatus.js +0 -3
- package/dist/cjs/extractors/common/lozenge/extractTaskType.js +0 -4
- package/dist/cjs/extractors/common/lozenge/index.js +0 -5
- package/dist/cjs/extractors/common/lozenge/utils.js +0 -2
- package/dist/cjs/extractors/common/meta/extractIsTrusted.js +0 -2
- package/dist/cjs/extractors/common/primitives/extractSummary.js +0 -2
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +0 -7
- package/dist/cjs/extractors/common/primitives/extractVisitUrl.js +0 -2
- package/dist/cjs/extractors/common/primitives/index.js +0 -2
- package/dist/cjs/extractors/common/title-prefix/extractTitlePrefix.js +0 -6
- package/dist/cjs/extractors/common/title-prefix/index.js +0 -1
- package/dist/cjs/extractors/constants.js +2 -2
- package/dist/cjs/extractors/embed/index.js +0 -10
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +0 -6
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +0 -9
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -6
- package/dist/cjs/extractors/flexible/collaboratorGroup/index.js +0 -4
- package/dist/cjs/extractors/flexible/extract-preview.js +0 -4
- package/dist/cjs/extractors/flexible/extract-priority.js +0 -7
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +0 -10
- package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +0 -25
- package/dist/cjs/extractors/flexible/icon/extract-icon-renderer.js +0 -5
- package/dist/cjs/extractors/flexible/icon/extract-jira-task-icon.js +0 -12
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -35
- package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +0 -11
- package/dist/cjs/extractors/flexible/icon/extract-url-icon.js +0 -3
- package/dist/cjs/extractors/flexible/icon/index.js +4 -20
- package/dist/cjs/extractors/flexible/index.js +0 -17
- package/dist/cjs/extractors/flexible/latest-commit/index.js +0 -4
- package/dist/cjs/extractors/flexible/utils.js +0 -33
- package/dist/cjs/extractors/hover/extractMetadata.js +0 -5
- package/dist/cjs/extractors/index.js +4 -16
- package/dist/cjs/extractors/inline/index.js +0 -12
- package/dist/cjs/hooks.js +0 -2
- package/dist/cjs/hoverCard.js +0 -1
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -30
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/in-product.js +0 -1
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/linkUrl.js +0 -2
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/ssr.js +4 -23
- package/dist/cjs/state/actions/index.js +36 -76
- package/dist/cjs/state/analytics/index.js +0 -2
- package/dist/cjs/state/analytics/ufoExperiences.js +0 -11
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +165 -205
- package/dist/cjs/state/config/index.js +0 -5
- package/dist/cjs/state/flexible-ui-context/index.js +1 -7
- package/dist/cjs/state/flexible-ui-context/utils.js +0 -2
- package/dist/cjs/state/helpers.js +3 -39
- package/dist/cjs/state/hooks/index.js +0 -2
- package/dist/cjs/state/hooks/usePrefetch.js +10 -31
- package/dist/cjs/state/hooks/useSmartLink.js +11 -23
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +12 -29
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -7
- package/dist/cjs/state/index.js +0 -3
- package/dist/cjs/state/renderers/index.js +0 -4
- package/dist/cjs/state/store/index.js +7 -15
- package/dist/cjs/utils/analytics/analytics.js +133 -197
- package/dist/cjs/utils/analytics/index.js +8 -18
- package/dist/cjs/utils/flexible.js +0 -20
- package/dist/cjs/utils/index.js +5 -54
- package/dist/cjs/utils/jsonld.js +0 -11
- package/dist/cjs/utils/mocks.js +0 -35
- package/dist/cjs/utils/performance.js +0 -23
- package/dist/cjs/utils/test-utils.js +0 -10
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +0 -6
- package/dist/cjs/view/BlockCard/actions/DownloadAction.js +0 -15
- package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +0 -7
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -30
- package/dist/cjs/view/BlockCard/actions/RetryAction.js +0 -11
- package/dist/cjs/view/BlockCard/actions/ViewAction.js +0 -14
- package/dist/cjs/view/BlockCard/actions/flexible/AuthorizeAction.js +0 -8
- package/dist/cjs/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -8
- package/dist/cjs/view/BlockCard/actions/flexible/RetryAction.js +0 -7
- package/dist/cjs/view/BlockCard/components/Action.js +8 -19
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +0 -10
- package/dist/cjs/view/BlockCard/components/ActionList.js +1 -17
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +7 -14
- package/dist/cjs/view/BlockCard/components/Content.js +3 -7
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -7
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -6
- package/dist/cjs/view/BlockCard/components/Emoji.js +1 -6
- package/dist/cjs/view/BlockCard/components/Frame.js +10 -24
- package/dist/cjs/view/BlockCard/components/Link.js +4 -7
- package/dist/cjs/view/BlockCard/components/Name.js +5 -10
- package/dist/cjs/view/BlockCard/components/Provider.js +2 -8
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +3 -15
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +2 -4
- package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +7 -19
- package/dist/cjs/view/BlockCard/index.js +17 -68
- package/dist/cjs/view/BlockCard/utils/handlers.js +0 -2
- package/dist/cjs/view/BlockCard/views/ErroredView.js +10 -36
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +20 -42
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -36
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +34 -57
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +5 -16
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +15 -37
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -23
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +8 -31
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -19
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +16 -33
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -30
- package/dist/cjs/view/Card/index.js +0 -20
- package/dist/cjs/view/CardWithData/component.js +7 -32
- package/dist/cjs/view/CardWithData/loader.js +9 -30
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyFallback.js +2 -8
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -22
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -14
- package/dist/cjs/view/CardWithUrl/component-lazy/index.js +0 -6
- package/dist/cjs/view/CardWithUrl/component.js +35 -60
- package/dist/cjs/view/CardWithUrl/loader.js +31 -50
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +0 -22
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +20 -29
- package/dist/cjs/view/EmbedCard/components/Frame.js +21 -48
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +14 -23
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +6 -14
- package/dist/cjs/view/EmbedCard/components/styled.js +1 -61
- package/dist/cjs/view/EmbedCard/index.js +18 -53
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +6 -17
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +11 -26
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +6 -16
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +13 -25
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +9 -24
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +8 -17
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +5 -20
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +3 -11
- package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +0 -8
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +11 -32
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +5 -11
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +0 -5
- package/dist/cjs/view/EmbedModal/index.js +24 -47
- package/dist/cjs/view/EmbedModal/types.js +0 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +8 -25
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -10
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -15
- package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +5 -27
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +13 -25
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -42
- package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +5 -25
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +4 -8
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +4 -43
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -32
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +13 -47
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +11 -24
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +12 -30
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +7 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/index.js +0 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -34
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +10 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +20 -52
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +9 -21
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -44
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +4 -31
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +5 -11
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -9
- package/dist/cjs/view/FlexibleCard/components/container/index.js +29 -77
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -13
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -25
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +7 -28
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +11 -30
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +13 -35
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +0 -28
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +15 -37
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -28
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +8 -18
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +8 -20
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -51
- package/dist/cjs/view/FlexibleCard/components/utils.js +1 -39
- package/dist/cjs/view/FlexibleCard/index.js +13 -30
- package/dist/cjs/view/FlexibleCard/utils.js +0 -28
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +20 -45
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +13 -55
- package/dist/cjs/view/HoverCard/components/SnippetOrPreview.js +10 -26
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +22 -46
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +0 -6
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +2 -11
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +0 -5
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +8 -30
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +0 -5
- package/dist/cjs/view/HoverCard/index.js +4 -15
- package/dist/cjs/view/HoverCard/styled.js +2 -11
- package/dist/cjs/view/HoverCard/utils.js +0 -21
- package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -37
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +6 -46
- package/dist/cjs/view/InlineCard/Frame/index.js +11 -18
- package/dist/cjs/view/InlineCard/Frame/styled.js +1 -18
- package/dist/cjs/view/InlineCard/Icon.js +4 -13
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +10 -48
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +17 -34
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +13 -37
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +7 -27
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +0 -6
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +10 -44
- package/dist/cjs/view/InlineCard/index.js +13 -43
- package/dist/cjs/view/InlineCard/styled.js +2 -15
- package/dist/cjs/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -30
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +5 -20
- package/dist/cjs/view/LinkUrl/index.js +10 -24
- package/dist/cjs/view/LinkView/index.js +0 -16
- package/dist/cjs/view/SmartLinkEvents/useSmartLinkEvents.js +0 -3
- package/dist/cjs/view/common/Byline.js +4 -8
- package/dist/cjs/view/common/Icon.js +6 -21
- package/dist/cjs/view/common/Metadata.js +4 -14
- package/dist/cjs/view/common/MetadataList.js +2 -9
- package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -14
- package/dist/cjs/view/common/utils.js +0 -7
- package/dist/es2019/__tests_external__/page-objects/BaseCard.js +6 -15
- package/dist/es2019/__tests_external__/page-objects/BlockCard.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/EmbedCard.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/InlineCard.js +0 -1
- package/dist/es2019/constants.js +11 -26
- package/dist/es2019/extractors/block/index.js +6 -12
- package/dist/es2019/extractors/common/actions/extractActions.js +4 -12
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +14 -16
- package/dist/es2019/extractors/common/byline/extractByline.js +0 -2
- package/dist/es2019/extractors/common/context/extractAccessContext.js +10 -11
- package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +0 -1
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +0 -1
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +0 -1
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +0 -1
- package/dist/es2019/extractors/common/icon/extractIcon.js +0 -10
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +2 -11
- package/dist/es2019/extractors/common/icon/extractIconFromTask.js +0 -12
- package/dist/es2019/extractors/common/lozenge/extractLozenge.js +0 -3
- package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +0 -1
- package/dist/es2019/extractors/common/lozenge/extractState.js +0 -2
- package/dist/es2019/extractors/common/lozenge/extractTag.js +0 -3
- package/dist/es2019/extractors/common/lozenge/extractTaskStatus.js +0 -1
- package/dist/es2019/extractors/common/lozenge/extractTaskType.js +0 -1
- package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +0 -3
- package/dist/es2019/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
- package/dist/es2019/extractors/constants.js +2 -2
- package/dist/es2019/extractors/embed/index.js +2 -4
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -2
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -3
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -2
- package/dist/es2019/extractors/flexible/collaboratorGroup/index.js +0 -1
- package/dist/es2019/extractors/flexible/extract-preview.js +0 -2
- package/dist/es2019/extractors/flexible/extract-priority.js +0 -4
- package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +0 -9
- package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
- package/dist/es2019/extractors/flexible/icon/extract-icon-renderer.js +0 -4
- package/dist/es2019/extractors/flexible/icon/extract-jira-task-icon.js +0 -10
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +0 -18
- package/dist/es2019/extractors/flexible/icon/extract-provider-icon.js +0 -6
- package/dist/es2019/extractors/flexible/icon/extract-url-icon.js +0 -2
- package/dist/es2019/extractors/flexible/icon/index.js +4 -6
- package/dist/es2019/extractors/flexible/index.js +0 -3
- package/dist/es2019/extractors/flexible/latest-commit/index.js +0 -2
- package/dist/es2019/extractors/flexible/utils.js +0 -5
- package/dist/es2019/extractors/hover/extractMetadata.js +0 -3
- package/dist/es2019/extractors/index.js +0 -6
- package/dist/es2019/extractors/inline/index.js +0 -2
- package/dist/es2019/index.js +4 -4
- package/dist/es2019/ssr.js +2 -4
- package/dist/es2019/state/actions/index.js +25 -33
- package/dist/es2019/state/analytics/ufoExperiences.js +0 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +31 -46
- package/dist/es2019/state/config/index.js +0 -2
- package/dist/es2019/state/flexible-ui-context/index.js +1 -2
- package/dist/es2019/state/helpers.js +2 -11
- package/dist/es2019/state/hooks/usePrefetch.js +14 -15
- package/dist/es2019/state/hooks/useSmartLink.js +8 -7
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -8
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +0 -1
- package/dist/es2019/state/store/index.js +6 -5
- package/dist/es2019/utils/analytics/analytics.js +46 -24
- package/dist/es2019/utils/analytics/index.js +8 -5
- package/dist/es2019/utils/flexible.js +0 -1
- package/dist/es2019/utils/index.js +0 -7
- package/dist/es2019/utils/jsonld.js +4 -2
- package/dist/es2019/utils/mocks.js +0 -3
- package/dist/es2019/utils/performance.js +0 -9
- package/dist/es2019/utils/test-utils.js +0 -2
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/DownloadAction.js +0 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +1 -3
- package/dist/es2019/view/BlockCard/actions/ViewAction.js +0 -1
- package/dist/es2019/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
- package/dist/es2019/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
- package/dist/es2019/view/BlockCard/actions/flexible/RetryAction.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +0 -1
- package/dist/es2019/view/BlockCard/components/ActionIcon.js +0 -3
- package/dist/es2019/view/BlockCard/components/ActionList.js +0 -1
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +0 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +4 -2
- package/dist/es2019/view/BlockCard/components/Provider.js +0 -2
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +4 -2
- package/dist/es2019/view/BlockCard/components/flexible/footer/index.js +1 -4
- package/dist/es2019/view/BlockCard/index.js +1 -24
- package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +0 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +0 -2
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +2 -3
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +0 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -5
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +0 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -3
- package/dist/es2019/view/Card/index.js +0 -3
- package/dist/es2019/view/CardWithData/component.js +0 -6
- package/dist/es2019/view/CardWithData/loader.js +1 -10
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -4
- package/dist/es2019/view/CardWithUrl/component.js +10 -15
- package/dist/es2019/view/CardWithUrl/loader.js +8 -13
- package/dist/es2019/view/EmbedCard/EmbedResizeMessageListener.js +0 -8
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +4 -6
- package/dist/es2019/view/EmbedCard/components/Frame.js +1 -11
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +4 -6
- package/dist/es2019/view/EmbedCard/components/ImageIcon.js +0 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +0 -9
- package/dist/es2019/view/EmbedCard/index.js +0 -17
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +0 -5
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +0 -1
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +0 -1
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +0 -1
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +0 -7
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -2
- package/dist/es2019/view/EmbedModal/components/error-boundary/index.js +0 -3
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +0 -2
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +0 -2
- package/dist/es2019/view/EmbedModal/index.js +0 -6
- package/dist/es2019/view/EmbedModal/types.js +0 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +2 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +3 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +2 -6
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +4 -5
- package/dist/es2019/view/FlexibleCard/components/actions/utils.js +2 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +1 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +2 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +3 -18
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +62 -195
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -27
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +1 -7
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -7
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +0 -25
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +0 -23
- package/dist/es2019/view/FlexibleCard/components/utils.js +0 -11
- package/dist/es2019/view/FlexibleCard/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/utils.js +0 -15
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -14
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +0 -9
- package/dist/es2019/view/HoverCard/components/SnippetOrPreview.js +4 -5
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +0 -2
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +0 -3
- package/dist/es2019/view/HoverCard/index.js +0 -3
- package/dist/es2019/view/HoverCard/styled.js +2 -2
- package/dist/es2019/view/HoverCard/utils.js +2 -11
- package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -5
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -14
- package/dist/es2019/view/InlineCard/Frame/index.js +5 -4
- package/dist/es2019/view/InlineCard/Frame/styled.js +1 -5
- package/dist/es2019/view/InlineCard/Icon.js +6 -4
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -21
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +22 -15
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -6
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -2
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -6
- package/dist/es2019/view/InlineCard/index.js +0 -14
- package/dist/es2019/view/InlineCard/styled.js +3 -2
- package/dist/es2019/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +1 -9
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +0 -2
- package/dist/es2019/view/LinkUrl/index.js +0 -2
- package/dist/es2019/view/LinkView/index.js +0 -1
- package/dist/es2019/view/common/Icon.js +0 -5
- package/dist/es2019/view/common/Metadata.js +0 -4
- package/dist/es2019/view/common/MetadataList.js +0 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +0 -2
- package/dist/es2019/view/common/utils.js +0 -3
- package/dist/esm/__tests_external__/page-objects/BaseCard.js +6 -20
- package/dist/esm/__tests_external__/page-objects/BlockCard.js +0 -8
- package/dist/esm/__tests_external__/page-objects/EmbedCard.js +0 -8
- package/dist/esm/__tests_external__/page-objects/InlineCard.js +0 -8
- package/dist/esm/__tests_external__/test-cases/card.js +2 -2
- package/dist/esm/__tests_external__/test-cases/embed.js +1 -1
- package/dist/esm/__tests_external__/test-cases/inline.js +2 -2
- package/dist/esm/constants.js +11 -26
- package/dist/esm/extractors/block/index.js +2 -13
- package/dist/esm/extractors/common/actions/extractActions.js +2 -14
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +18 -28
- package/dist/esm/extractors/common/byline/extractByline.js +4 -8
- package/dist/esm/extractors/common/context/extractAccessContext.js +2 -12
- package/dist/esm/extractors/common/detail/extractAttachmentCount.js +0 -1
- package/dist/esm/extractors/common/detail/extractCommentCount.js +0 -1
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +0 -1
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +0 -1
- package/dist/esm/extractors/common/icon/extractIcon.js +0 -10
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +2 -11
- package/dist/esm/extractors/common/icon/extractIconFromTask.js +1 -13
- package/dist/esm/extractors/common/lozenge/extractLozenge.js +0 -7
- package/dist/esm/extractors/common/lozenge/extractLozengeText.js +1 -3
- package/dist/esm/extractors/common/lozenge/extractState.js +0 -2
- package/dist/esm/extractors/common/lozenge/extractTag.js +0 -3
- package/dist/esm/extractors/common/lozenge/extractTaskStatus.js +0 -1
- package/dist/esm/extractors/common/lozenge/extractTaskType.js +0 -1
- package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +0 -3
- package/dist/esm/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
- package/dist/esm/extractors/constants.js +2 -2
- package/dist/esm/extractors/embed/index.js +0 -6
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -2
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -3
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -2
- package/dist/esm/extractors/flexible/collaboratorGroup/index.js +0 -1
- package/dist/esm/extractors/flexible/extract-preview.js +0 -2
- package/dist/esm/extractors/flexible/extract-priority.js +0 -4
- package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +0 -9
- package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
- package/dist/esm/extractors/flexible/icon/extract-icon-renderer.js +0 -4
- package/dist/esm/extractors/flexible/icon/extract-jira-task-icon.js +0 -11
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -24
- package/dist/esm/extractors/flexible/icon/extract-provider-icon.js +0 -6
- package/dist/esm/extractors/flexible/icon/extract-url-icon.js +0 -2
- package/dist/esm/extractors/flexible/icon/index.js +4 -11
- package/dist/esm/extractors/flexible/index.js +0 -3
- package/dist/esm/extractors/flexible/latest-commit/index.js +0 -2
- package/dist/esm/extractors/flexible/utils.js +0 -5
- package/dist/esm/extractors/hover/extractMetadata.js +0 -3
- package/dist/esm/extractors/index.js +4 -15
- package/dist/esm/extractors/inline/index.js +0 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/ssr.js +4 -11
- package/dist/esm/state/actions/index.js +36 -57
- package/dist/esm/state/analytics/ufoExperiences.js +0 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +165 -195
- package/dist/esm/state/config/index.js +0 -2
- package/dist/esm/state/flexible-ui-context/index.js +1 -2
- package/dist/esm/state/helpers.js +3 -12
- package/dist/esm/state/hooks/usePrefetch.js +10 -24
- package/dist/esm/state/hooks/useSmartLink.js +11 -13
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +12 -18
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -2
- package/dist/esm/state/store/index.js +7 -9
- package/dist/esm/utils/analytics/analytics.js +133 -139
- package/dist/esm/utils/analytics/index.js +8 -13
- package/dist/esm/utils/flexible.js +0 -1
- package/dist/esm/utils/index.js +5 -21
- package/dist/esm/utils/jsonld.js +0 -3
- package/dist/esm/utils/mocks.js +0 -20
- package/dist/esm/utils/performance.js +0 -9
- package/dist/esm/utils/test-utils.js +0 -2
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/DownloadAction.js +0 -6
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -15
- package/dist/esm/view/BlockCard/actions/RetryAction.js +0 -3
- package/dist/esm/view/BlockCard/actions/ViewAction.js +0 -6
- package/dist/esm/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
- package/dist/esm/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
- package/dist/esm/view/BlockCard/actions/flexible/RetryAction.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +7 -11
- package/dist/esm/view/BlockCard/components/ActionIcon.js +0 -4
- package/dist/esm/view/BlockCard/components/ActionList.js +1 -3
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +6 -8
- package/dist/esm/view/BlockCard/components/Content.js +2 -2
- package/dist/esm/view/BlockCard/components/ContentFooter.js +2 -2
- package/dist/esm/view/BlockCard/components/ContentHeader.js +2 -2
- package/dist/esm/view/BlockCard/components/Frame.js +10 -13
- package/dist/esm/view/BlockCard/components/Link.js +3 -3
- package/dist/esm/view/BlockCard/components/Name.js +4 -4
- package/dist/esm/view/BlockCard/components/Provider.js +1 -3
- package/dist/esm/view/BlockCard/components/Thumbnail.js +3 -6
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +1 -1
- package/dist/esm/view/BlockCard/components/flexible/footer/index.js +7 -12
- package/dist/esm/view/BlockCard/index.js +18 -42
- package/dist/esm/view/BlockCard/views/ErroredView.js +10 -17
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +19 -22
- package/dist/esm/view/BlockCard/views/NotFoundView.js +11 -18
- package/dist/esm/view/BlockCard/views/ResolvedView.js +33 -35
- package/dist/esm/view/BlockCard/views/ResolvingView.js +4 -4
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +15 -22
- package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -9
- package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +9 -13
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -9
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +17 -22
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -15
- package/dist/esm/view/Card/index.js +0 -10
- package/dist/esm/view/CardWithData/component.js +7 -20
- package/dist/esm/view/CardWithData/loader.js +10 -24
- package/dist/esm/view/CardWithUrl/component-lazy/LazyFallback.js +2 -2
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +9 -11
- package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -3
- package/dist/esm/view/CardWithUrl/component.js +35 -42
- package/dist/esm/view/CardWithUrl/loader.js +31 -37
- package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +0 -15
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +20 -23
- package/dist/esm/view/EmbedCard/components/Frame.js +20 -38
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +15 -20
- package/dist/esm/view/EmbedCard/components/ImageIcon.js +6 -8
- package/dist/esm/view/EmbedCard/components/styled.js +1 -17
- package/dist/esm/view/EmbedCard/index.js +18 -35
- package/dist/esm/view/EmbedCard/views/ErroredView.js +5 -5
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +11 -16
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +6 -6
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +12 -13
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +9 -10
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +7 -8
- package/dist/esm/view/EmbedModal/components/analytics/index.js +5 -12
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -7
- package/dist/esm/view/EmbedModal/components/error-boundary/index.js +0 -3
- package/dist/esm/view/EmbedModal/components/link-info/index.js +10 -14
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +5 -7
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +0 -2
- package/dist/esm/view/EmbedModal/index.js +24 -33
- package/dist/esm/view/EmbedModal/types.js +0 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +8 -15
- package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -6
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +5 -21
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +14 -18
- package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -25
- package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +5 -19
- package/dist/esm/view/FlexibleCard/components/actions/index.js +4 -5
- package/dist/esm/view/FlexibleCard/components/actions/utils.js +4 -20
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -23
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +13 -28
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +11 -16
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +12 -22
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +7 -14
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -22
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -9
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -18
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -10
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +20 -32
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +10 -12
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -8
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +4 -22
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +64 -200
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +4 -6
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -6
- package/dist/esm/view/FlexibleCard/components/container/index.js +29 -61
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +5 -9
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +10 -19
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -17
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +11 -20
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +13 -24
- package/dist/esm/view/FlexibleCard/components/elements/index.js +0 -25
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +15 -26
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -18
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +8 -14
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +8 -15
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +2 -28
- package/dist/esm/view/FlexibleCard/components/utils.js +1 -14
- package/dist/esm/view/FlexibleCard/index.js +14 -20
- package/dist/esm/view/FlexibleCard/utils.js +0 -15
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +19 -29
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +12 -28
- package/dist/esm/view/HoverCard/components/SnippetOrPreview.js +10 -16
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +22 -29
- package/dist/esm/view/HoverCard/components/views/resolved/styled.js +0 -2
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +1 -3
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +0 -2
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +8 -13
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +0 -2
- package/dist/esm/view/HoverCard/index.js +3 -6
- package/dist/esm/view/HoverCard/styled.js +2 -4
- package/dist/esm/view/HoverCard/utils.js +0 -15
- package/dist/esm/view/InlineCard/ErroredView/index.js +8 -22
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +6 -29
- package/dist/esm/view/InlineCard/Frame/index.js +11 -10
- package/dist/esm/view/InlineCard/Frame/styled.js +1 -9
- package/dist/esm/view/InlineCard/Icon.js +5 -5
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +10 -36
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +20 -15
- package/dist/esm/view/InlineCard/ResolvedView/index.js +13 -25
- package/dist/esm/view/InlineCard/ResolvingView/index.js +7 -16
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -2
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +10 -25
- package/dist/esm/view/InlineCard/index.js +13 -27
- package/dist/esm/view/InlineCard/styled.js +3 -4
- package/dist/esm/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -22
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +5 -7
- package/dist/esm/view/LinkUrl/index.js +10 -14
- package/dist/esm/view/LinkView/index.js +0 -8
- package/dist/esm/view/common/Byline.js +3 -3
- package/dist/esm/view/common/Icon.js +6 -13
- package/dist/esm/view/common/Metadata.js +3 -7
- package/dist/esm/view/common/MetadataList.js +1 -2
- package/dist/esm/view/common/UnauthorisedViewContent.js +3 -5
- package/dist/esm/view/common/utils.js +0 -3
- package/package.json +3 -3
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
|
|
4
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
|
|
6
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
-
|
|
8
5
|
import { useMemo } from 'react';
|
|
9
6
|
import { getUrl } from '@atlaskit/linking-common';
|
|
10
7
|
import { chunkloadFailedEvent as _chunkloadFailedEvent, connectFailedEvent as _connectFailedEvent, connectSucceededEvent as _connectSucceededEvent, context, instrumentEvent, invokeFailedEvent as _invokeFailedEvent, invokeSucceededEvent as _invokeSucceededEvent, screenAuthPopupEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent } from '../../utils/analytics';
|
|
@@ -12,22 +9,20 @@ import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './u
|
|
|
12
9
|
import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getSubproduct } from '../helpers';
|
|
13
10
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
14
11
|
import { trackLinkUpdated, uiIframeDwelledEvent, uiIframeFocusedEvent } from '../../utils/analytics/analytics';
|
|
15
|
-
|
|
16
12
|
var applyCommonAttributes = function applyCommonAttributes(event, commonAttributes) {
|
|
17
13
|
if (event && event.attributes) {
|
|
18
14
|
for (var _i = 0, _Object$entries = Object.entries(commonAttributes); _i < _Object$entries.length; _i++) {
|
|
19
15
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
_key = _Object$entries$_i[0],
|
|
17
|
+
value = _Object$entries$_i[1];
|
|
23
18
|
if (event.attributes[_key] === undefined) {
|
|
24
19
|
event.attributes[_key] = value;
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
return event;
|
|
30
24
|
};
|
|
25
|
+
|
|
31
26
|
/**
|
|
32
27
|
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
33
28
|
* Can be provided to Card via the analyticsEvents prop to change the analytics events.
|
|
@@ -37,14 +32,11 @@ var applyCommonAttributes = function applyCommonAttributes(event, commonAttribut
|
|
|
37
32
|
* @param defaultLocation location attribute to be used
|
|
38
33
|
* @returns
|
|
39
34
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
35
|
export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytics, id, defaultLocation) {
|
|
43
|
-
var defaultId = id || 'NULL';
|
|
44
|
-
|
|
36
|
+
var defaultId = id || 'NULL';
|
|
37
|
+
// We don't want to trigger a re-render by using useSmartCardState
|
|
45
38
|
var _useSmartLinkContext = useSmartLinkContext(),
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
store = _useSmartLinkContext.store;
|
|
48
40
|
var state = store ? getUrl(store, url) : undefined;
|
|
49
41
|
var details = state ? state.details : undefined;
|
|
50
42
|
var extractedDefinitionId = getDefinitionId(details);
|
|
@@ -63,8 +55,8 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
63
55
|
location: defaultLocation
|
|
64
56
|
};
|
|
65
57
|
}, [defaultId, extractedDefinitionId, extractedExtensionKey, extractedResourceType, extractedSubproduct, extractedProduct, defaultLocation]);
|
|
66
|
-
/** Contains all ui analytics events */
|
|
67
58
|
|
|
59
|
+
/** Contains all ui analytics events */
|
|
68
60
|
var ui = useMemo(function () {
|
|
69
61
|
return {
|
|
70
62
|
/**
|
|
@@ -77,12 +69,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
77
69
|
*/
|
|
78
70
|
authEvent: function authEvent(_ref) {
|
|
79
71
|
var display = _ref.display,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
72
|
+
extensionKey = _ref.extensionKey,
|
|
73
|
+
definitionId = _ref.definitionId,
|
|
74
|
+
resourceType = _ref.resourceType,
|
|
75
|
+
destinationProduct = _ref.destinationProduct,
|
|
76
|
+
destinationSubproduct = _ref.destinationSubproduct,
|
|
77
|
+
location = _ref.location;
|
|
86
78
|
return dispatchAnalytics(applyCommonAttributes(uiAuthEvent({
|
|
87
79
|
display: display,
|
|
88
80
|
extensionKey: extensionKey,
|
|
@@ -93,7 +85,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
93
85
|
location: location
|
|
94
86
|
}), commonAttributes));
|
|
95
87
|
},
|
|
96
|
-
|
|
97
88
|
/**
|
|
98
89
|
* This fires an event that represents when a user clicks on the authentication
|
|
99
90
|
* call to action with a forbidden authenticated account. (i.e. Try another account).
|
|
@@ -104,12 +95,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
104
95
|
*/
|
|
105
96
|
authAlternateAccountEvent: function authAlternateAccountEvent(_ref2) {
|
|
106
97
|
var display = _ref2.display,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
98
|
+
extensionKey = _ref2.extensionKey,
|
|
99
|
+
definitionId = _ref2.definitionId,
|
|
100
|
+
resourceType = _ref2.resourceType,
|
|
101
|
+
destinationProduct = _ref2.destinationProduct,
|
|
102
|
+
destinationSubproduct = _ref2.destinationSubproduct,
|
|
103
|
+
location = _ref2.location;
|
|
113
104
|
return dispatchAnalytics(applyCommonAttributes(uiAuthAlternateAccountEvent({
|
|
114
105
|
display: display,
|
|
115
106
|
extensionKey: extensionKey,
|
|
@@ -120,7 +111,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
120
111
|
location: location
|
|
121
112
|
}), commonAttributes));
|
|
122
113
|
},
|
|
123
|
-
|
|
124
114
|
/**
|
|
125
115
|
* This fires an event that represents when a user
|
|
126
116
|
* click a button.
|
|
@@ -135,7 +125,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
135
125
|
eventType: 'ui'
|
|
136
126
|
}, commonAttributes));
|
|
137
127
|
},
|
|
138
|
-
|
|
139
128
|
/**
|
|
140
129
|
* This fires an event that represents when a user clicks on a Smart Link.
|
|
141
130
|
* @param id The unique ID for this Smart Link.
|
|
@@ -150,15 +139,15 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
150
139
|
*/
|
|
151
140
|
cardClickedEvent: function cardClickedEvent(_ref3) {
|
|
152
141
|
var id = _ref3.id,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
142
|
+
display = _ref3.display,
|
|
143
|
+
status = _ref3.status,
|
|
144
|
+
definitionId = _ref3.definitionId,
|
|
145
|
+
extensionKey = _ref3.extensionKey,
|
|
146
|
+
isModifierKeyPressed = _ref3.isModifierKeyPressed,
|
|
147
|
+
location = _ref3.location,
|
|
148
|
+
destinationProduct = _ref3.destinationProduct,
|
|
149
|
+
destinationSubproduct = _ref3.destinationSubproduct,
|
|
150
|
+
actionSubjectId = _ref3.actionSubjectId;
|
|
162
151
|
return dispatchAnalytics(applyCommonAttributes(uiCardClickedEvent({
|
|
163
152
|
id: id,
|
|
164
153
|
display: display,
|
|
@@ -172,7 +161,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
172
161
|
actionSubjectId: actionSubjectId
|
|
173
162
|
}), commonAttributes));
|
|
174
163
|
},
|
|
175
|
-
|
|
176
164
|
/**
|
|
177
165
|
* This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
|
|
178
166
|
* @param id The unique ID for this Smart Link.
|
|
@@ -188,15 +176,15 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
188
176
|
*/
|
|
189
177
|
iframeDwelledEvent: function iframeDwelledEvent(_ref4) {
|
|
190
178
|
var id = _ref4.id,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
179
|
+
display = _ref4.display,
|
|
180
|
+
status = _ref4.status,
|
|
181
|
+
definitionId = _ref4.definitionId,
|
|
182
|
+
extensionKey = _ref4.extensionKey,
|
|
183
|
+
location = _ref4.location,
|
|
184
|
+
destinationProduct = _ref4.destinationProduct,
|
|
185
|
+
destinationSubproduct = _ref4.destinationSubproduct,
|
|
186
|
+
dwellTime = _ref4.dwellTime,
|
|
187
|
+
dwellPercentVisible = _ref4.dwellPercentVisible;
|
|
200
188
|
return dispatchAnalytics(applyCommonAttributes(uiIframeDwelledEvent({
|
|
201
189
|
id: id,
|
|
202
190
|
display: display,
|
|
@@ -210,7 +198,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
210
198
|
dwellPercentVisible: dwellPercentVisible
|
|
211
199
|
}), commonAttributes));
|
|
212
200
|
},
|
|
213
|
-
|
|
214
201
|
/**
|
|
215
202
|
* This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
|
|
216
203
|
* @param id The unique ID for this Smart Link.
|
|
@@ -224,13 +211,13 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
224
211
|
*/
|
|
225
212
|
iframeFocusedEvent: function iframeFocusedEvent(_ref5) {
|
|
226
213
|
var id = _ref5.id,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
214
|
+
display = _ref5.display,
|
|
215
|
+
status = _ref5.status,
|
|
216
|
+
definitionId = _ref5.definitionId,
|
|
217
|
+
extensionKey = _ref5.extensionKey,
|
|
218
|
+
location = _ref5.location,
|
|
219
|
+
destinationProduct = _ref5.destinationProduct,
|
|
220
|
+
destinationSubproduct = _ref5.destinationSubproduct;
|
|
234
221
|
return dispatchAnalytics(applyCommonAttributes(uiIframeFocusedEvent({
|
|
235
222
|
id: id,
|
|
236
223
|
display: display,
|
|
@@ -242,7 +229,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
242
229
|
destinationSubproduct: destinationSubproduct
|
|
243
230
|
}), commonAttributes));
|
|
244
231
|
},
|
|
245
|
-
|
|
246
232
|
/**
|
|
247
233
|
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
248
234
|
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
@@ -255,15 +241,15 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
255
241
|
*/
|
|
256
242
|
actionClickedEvent: function actionClickedEvent(_ref6) {
|
|
257
243
|
var id = _ref6.id,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
244
|
+
actionType = _ref6.actionType,
|
|
245
|
+
display = _ref6.display,
|
|
246
|
+
invokeType = _ref6.invokeType,
|
|
247
|
+
extensionKey = _ref6.extensionKey,
|
|
248
|
+
definitionId = _ref6.definitionId,
|
|
249
|
+
resourceType = _ref6.resourceType,
|
|
250
|
+
destinationProduct = _ref6.destinationProduct,
|
|
251
|
+
destinationSubproduct = _ref6.destinationSubproduct,
|
|
252
|
+
location = _ref6.location;
|
|
267
253
|
startUfoExperience('smart-link-action-invocation', id, {
|
|
268
254
|
actionType: actionType,
|
|
269
255
|
display: display,
|
|
@@ -282,7 +268,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
282
268
|
location: location
|
|
283
269
|
}), commonAttributes));
|
|
284
270
|
},
|
|
285
|
-
|
|
286
271
|
/**
|
|
287
272
|
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
288
273
|
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
@@ -293,12 +278,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
293
278
|
*/
|
|
294
279
|
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref7) {
|
|
295
280
|
var previewDisplay = _ref7.previewDisplay,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
281
|
+
definitionId = _ref7.definitionId,
|
|
282
|
+
extensionKey = _ref7.extensionKey,
|
|
283
|
+
destinationProduct = _ref7.destinationProduct,
|
|
284
|
+
destinationSubproduct = _ref7.destinationSubproduct,
|
|
285
|
+
location = _ref7.location,
|
|
286
|
+
previewInvokeMethod = _ref7.previewInvokeMethod;
|
|
302
287
|
dispatchAnalytics(applyCommonAttributes(uiHoverCardOpenLinkClickedEvent({
|
|
303
288
|
id: defaultId,
|
|
304
289
|
previewDisplay: previewDisplay,
|
|
@@ -310,7 +295,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
310
295
|
previewInvokeMethod: previewInvokeMethod
|
|
311
296
|
}), commonAttributes));
|
|
312
297
|
},
|
|
313
|
-
|
|
314
298
|
/**
|
|
315
299
|
* This fires an event that represents when a user closed the authentication window without authenticating after opening it.
|
|
316
300
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
@@ -320,12 +304,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
320
304
|
*/
|
|
321
305
|
closedAuthEvent: function closedAuthEvent(_ref8) {
|
|
322
306
|
var display = _ref8.display,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
307
|
+
extensionKey = _ref8.extensionKey,
|
|
308
|
+
definitionId = _ref8.definitionId,
|
|
309
|
+
resourceType = _ref8.resourceType,
|
|
310
|
+
destinationProduct = _ref8.destinationProduct,
|
|
311
|
+
destinationSubproduct = _ref8.destinationSubproduct,
|
|
312
|
+
location = _ref8.location;
|
|
329
313
|
return dispatchAnalytics(applyCommonAttributes(uiClosedAuthEvent({
|
|
330
314
|
display: display,
|
|
331
315
|
extensionKey: extensionKey,
|
|
@@ -336,7 +320,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
336
320
|
location: location
|
|
337
321
|
}), commonAttributes));
|
|
338
322
|
},
|
|
339
|
-
|
|
340
323
|
/**
|
|
341
324
|
* This fires an event that represents when a user close a modal.
|
|
342
325
|
* @param data A partial analytics event payload
|
|
@@ -350,7 +333,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
350
333
|
eventType: 'ui'
|
|
351
334
|
}, commonAttributes));
|
|
352
335
|
},
|
|
353
|
-
|
|
354
336
|
/**
|
|
355
337
|
* This fires an event that represents when a Smart Link was rendered successfully.
|
|
356
338
|
* Note: this fires even if the Smart Link request errored out.
|
|
@@ -361,20 +343,21 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
361
343
|
*/
|
|
362
344
|
renderSuccessEvent: function renderSuccessEvent(_ref9) {
|
|
363
345
|
var display = _ref9.display,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
346
|
+
status = _ref9.status,
|
|
347
|
+
id = _ref9.id,
|
|
348
|
+
extensionKey = _ref9.extensionKey,
|
|
349
|
+
definitionId = _ref9.definitionId,
|
|
350
|
+
resourceType = _ref9.resourceType,
|
|
351
|
+
destinationProduct = _ref9.destinationProduct,
|
|
352
|
+
destinationSubproduct = _ref9.destinationSubproduct,
|
|
353
|
+
location = _ref9.location;
|
|
372
354
|
var experienceId = id ? id : defaultId;
|
|
373
355
|
succeedUfoExperience('smart-link-rendered', experienceId, {
|
|
374
356
|
extensionKey: extensionKey,
|
|
375
357
|
display: display
|
|
376
|
-
});
|
|
358
|
+
});
|
|
377
359
|
|
|
360
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
378
361
|
succeedUfoExperience('smart-link-authenticated', experienceId, {
|
|
379
362
|
display: display
|
|
380
363
|
});
|
|
@@ -389,7 +372,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
389
372
|
location: location
|
|
390
373
|
}), commonAttributes));
|
|
391
374
|
},
|
|
392
|
-
|
|
393
375
|
/**
|
|
394
376
|
* This fires an event that represents when a Smart Link renders unsuccessfuly.
|
|
395
377
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
@@ -399,18 +381,18 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
399
381
|
*/
|
|
400
382
|
renderFailedEvent: function renderFailedEvent(_ref10) {
|
|
401
383
|
var display = _ref10.display,
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
var experienceId = id ? id : defaultId;
|
|
384
|
+
id = _ref10.id,
|
|
385
|
+
error = _ref10.error,
|
|
386
|
+
errorInfo = _ref10.errorInfo,
|
|
387
|
+
extensionKey = _ref10.extensionKey,
|
|
388
|
+
definitionId = _ref10.definitionId,
|
|
389
|
+
resourceType = _ref10.resourceType,
|
|
390
|
+
destinationProduct = _ref10.destinationProduct,
|
|
391
|
+
destinationSubproduct = _ref10.destinationSubproduct,
|
|
392
|
+
location = _ref10.location;
|
|
393
|
+
var experienceId = id ? id : defaultId;
|
|
394
|
+
// Start and fail the smart-link-rendered experience. If it has already
|
|
412
395
|
// been started nothing happens.
|
|
413
|
-
|
|
414
396
|
startUfoExperience('smart-link-rendered', experienceId);
|
|
415
397
|
failUfoExperience('smart-link-rendered', experienceId);
|
|
416
398
|
failUfoExperience('smart-link-authenticated', experienceId);
|
|
@@ -426,7 +408,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
426
408
|
location: location
|
|
427
409
|
}), commonAttributes));
|
|
428
410
|
},
|
|
429
|
-
|
|
430
411
|
/**
|
|
431
412
|
* This fires an event that represents a hover preview being opened.
|
|
432
413
|
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
@@ -437,15 +418,15 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
437
418
|
*/
|
|
438
419
|
hoverCardViewedEvent: function hoverCardViewedEvent(_ref11) {
|
|
439
420
|
var previewDisplay = _ref11.previewDisplay,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
421
|
+
previewInvokeMethod = _ref11.previewInvokeMethod,
|
|
422
|
+
id = _ref11.id,
|
|
423
|
+
extensionKey = _ref11.extensionKey,
|
|
424
|
+
definitionId = _ref11.definitionId,
|
|
425
|
+
resourceType = _ref11.resourceType,
|
|
426
|
+
destinationProduct = _ref11.destinationProduct,
|
|
427
|
+
destinationSubproduct = _ref11.destinationSubproduct,
|
|
428
|
+
location = _ref11.location,
|
|
429
|
+
status = _ref11.status;
|
|
449
430
|
return dispatchAnalytics(applyCommonAttributes(uiHoverCardViewedEvent({
|
|
450
431
|
id: id,
|
|
451
432
|
previewDisplay: previewDisplay,
|
|
@@ -459,7 +440,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
459
440
|
status: status
|
|
460
441
|
}), commonAttributes));
|
|
461
442
|
},
|
|
462
|
-
|
|
463
443
|
/**
|
|
464
444
|
* This fires an event that represents a hover preview being dismissed.
|
|
465
445
|
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
@@ -471,16 +451,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
471
451
|
*/
|
|
472
452
|
hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref12) {
|
|
473
453
|
var id = _ref12.id,
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
454
|
+
previewDisplay = _ref12.previewDisplay,
|
|
455
|
+
hoverTime = _ref12.hoverTime,
|
|
456
|
+
previewInvokeMethod = _ref12.previewInvokeMethod,
|
|
457
|
+
extensionKey = _ref12.extensionKey,
|
|
458
|
+
definitionId = _ref12.definitionId,
|
|
459
|
+
resourceType = _ref12.resourceType,
|
|
460
|
+
destinationProduct = _ref12.destinationProduct,
|
|
461
|
+
destinationSubproduct = _ref12.destinationSubproduct,
|
|
462
|
+
location = _ref12.location,
|
|
463
|
+
status = _ref12.status;
|
|
484
464
|
return dispatchAnalytics(applyCommonAttributes(uiHoverCardDismissedEvent({
|
|
485
465
|
previewDisplay: previewDisplay,
|
|
486
466
|
id: id,
|
|
@@ -495,7 +475,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
495
475
|
status: status
|
|
496
476
|
}), commonAttributes));
|
|
497
477
|
},
|
|
498
|
-
|
|
499
478
|
/**
|
|
500
479
|
* Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
|
|
501
480
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
@@ -506,8 +485,8 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
506
485
|
}
|
|
507
486
|
};
|
|
508
487
|
}, [defaultId, commonAttributes, dispatchAnalytics]);
|
|
509
|
-
/** Contains all operational analytics events */
|
|
510
488
|
|
|
489
|
+
/** Contains all operational analytics events */
|
|
511
490
|
var operational = useMemo(function () {
|
|
512
491
|
return {
|
|
513
492
|
/**
|
|
@@ -519,14 +498,14 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
519
498
|
*/
|
|
520
499
|
invokeSucceededEvent: function invokeSucceededEvent(_ref13) {
|
|
521
500
|
var id = _ref13.id,
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
501
|
+
actionType = _ref13.actionType,
|
|
502
|
+
display = _ref13.display,
|
|
503
|
+
extensionKey = _ref13.extensionKey,
|
|
504
|
+
definitionId = _ref13.definitionId,
|
|
505
|
+
resourceType = _ref13.resourceType,
|
|
506
|
+
destinationProduct = _ref13.destinationProduct,
|
|
507
|
+
destinationSubproduct = _ref13.destinationSubproduct,
|
|
508
|
+
location = _ref13.location;
|
|
530
509
|
succeedUfoExperience('smart-link-action-invocation', id);
|
|
531
510
|
dispatchAnalytics(applyCommonAttributes(_invokeSucceededEvent({
|
|
532
511
|
id: id,
|
|
@@ -540,7 +519,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
540
519
|
location: location
|
|
541
520
|
}), commonAttributes));
|
|
542
521
|
},
|
|
543
|
-
|
|
544
522
|
/**
|
|
545
523
|
* This fires an event that represents an action being unsuccessfully invoked.
|
|
546
524
|
* @param id The unique ID for this Smart Link.
|
|
@@ -551,15 +529,15 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
551
529
|
*/
|
|
552
530
|
invokeFailedEvent: function invokeFailedEvent(_ref14) {
|
|
553
531
|
var id = _ref14.id,
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
532
|
+
actionType = _ref14.actionType,
|
|
533
|
+
display = _ref14.display,
|
|
534
|
+
reason = _ref14.reason,
|
|
535
|
+
extensionKey = _ref14.extensionKey,
|
|
536
|
+
definitionId = _ref14.definitionId,
|
|
537
|
+
resourceType = _ref14.resourceType,
|
|
538
|
+
destinationProduct = _ref14.destinationProduct,
|
|
539
|
+
destinationSubproduct = _ref14.destinationSubproduct,
|
|
540
|
+
location = _ref14.location;
|
|
563
541
|
failUfoExperience('smart-link-action-invocation', id);
|
|
564
542
|
dispatchAnalytics(applyCommonAttributes(_invokeFailedEvent({
|
|
565
543
|
id: id,
|
|
@@ -574,7 +552,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
574
552
|
location: location
|
|
575
553
|
}), commonAttributes));
|
|
576
554
|
},
|
|
577
|
-
|
|
578
555
|
/**
|
|
579
556
|
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
580
557
|
* @param id The unique ID for this Smart Link.
|
|
@@ -583,12 +560,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
583
560
|
*/
|
|
584
561
|
connectSucceededEvent: function connectSucceededEvent(_ref15) {
|
|
585
562
|
var id = _ref15.id,
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
563
|
+
extensionKey = _ref15.extensionKey,
|
|
564
|
+
definitionId = _ref15.definitionId,
|
|
565
|
+
resourceType = _ref15.resourceType,
|
|
566
|
+
destinationProduct = _ref15.destinationProduct,
|
|
567
|
+
destinationSubproduct = _ref15.destinationSubproduct,
|
|
568
|
+
location = _ref15.location;
|
|
592
569
|
var experienceId = id ? id : defaultId;
|
|
593
570
|
startUfoExperience('smart-link-authenticated', experienceId, {
|
|
594
571
|
extensionKey: extensionKey,
|
|
@@ -604,7 +581,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
604
581
|
location: location
|
|
605
582
|
})), commonAttributes));
|
|
606
583
|
},
|
|
607
|
-
|
|
608
584
|
/**
|
|
609
585
|
* This fires an event that represents an account unsuccessfully being connected.
|
|
610
586
|
* @param id The unique ID for this Smart Link.
|
|
@@ -614,13 +590,13 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
614
590
|
*/
|
|
615
591
|
connectFailedEvent: function connectFailedEvent(_ref16) {
|
|
616
592
|
var id = _ref16.id,
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
593
|
+
reason = _ref16.reason,
|
|
594
|
+
extensionKey = _ref16.extensionKey,
|
|
595
|
+
definitionId = _ref16.definitionId,
|
|
596
|
+
resourceType = _ref16.resourceType,
|
|
597
|
+
destinationProduct = _ref16.destinationProduct,
|
|
598
|
+
destinationSubproduct = _ref16.destinationSubproduct,
|
|
599
|
+
location = _ref16.location;
|
|
624
600
|
var experienceId = id ? id : defaultId;
|
|
625
601
|
startUfoExperience('smart-link-authenticated', experienceId, {
|
|
626
602
|
extensionKey: extensionKey,
|
|
@@ -637,7 +613,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
637
613
|
location: location
|
|
638
614
|
})), commonAttributes));
|
|
639
615
|
},
|
|
640
|
-
|
|
641
616
|
/**
|
|
642
617
|
* This fires an event which represents a Smart Link request succeeding or failing based on the status.
|
|
643
618
|
* @param id The unique ID for this Smart Link.
|
|
@@ -649,14 +624,14 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
649
624
|
*/
|
|
650
625
|
instrument: function instrument(_ref17) {
|
|
651
626
|
var id = _ref17.id,
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
627
|
+
status = _ref17.status,
|
|
628
|
+
extensionKey = _ref17.extensionKey,
|
|
629
|
+
definitionId = _ref17.definitionId,
|
|
630
|
+
resourceType = _ref17.resourceType,
|
|
631
|
+
destinationProduct = _ref17.destinationProduct,
|
|
632
|
+
destinationSubproduct = _ref17.destinationSubproduct,
|
|
633
|
+
location = _ref17.location,
|
|
634
|
+
error = _ref17.error;
|
|
660
635
|
var event = instrumentEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
661
636
|
id: id,
|
|
662
637
|
status: status,
|
|
@@ -668,12 +643,10 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
668
643
|
location: location,
|
|
669
644
|
error: error
|
|
670
645
|
}));
|
|
671
|
-
|
|
672
646
|
if (event) {
|
|
673
647
|
dispatchAnalytics(applyCommonAttributes(event, commonAttributes));
|
|
674
648
|
}
|
|
675
649
|
},
|
|
676
|
-
|
|
677
650
|
/**
|
|
678
651
|
* This fires an event that represents when a Smart Link renders unsuccessfuly.
|
|
679
652
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
@@ -683,14 +656,14 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
683
656
|
*/
|
|
684
657
|
chunkloadFailedEvent: function chunkloadFailedEvent(_ref18) {
|
|
685
658
|
var display = _ref18.display,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
659
|
+
error = _ref18.error,
|
|
660
|
+
errorInfo = _ref18.errorInfo,
|
|
661
|
+
extensionKey = _ref18.extensionKey,
|
|
662
|
+
definitionId = _ref18.definitionId,
|
|
663
|
+
resourceType = _ref18.resourceType,
|
|
664
|
+
destinationProduct = _ref18.destinationProduct,
|
|
665
|
+
destinationSubproduct = _ref18.destinationSubproduct,
|
|
666
|
+
location = _ref18.location;
|
|
694
667
|
dispatchAnalytics(applyCommonAttributes(_chunkloadFailedEvent({
|
|
695
668
|
display: display,
|
|
696
669
|
error: error,
|
|
@@ -705,8 +678,8 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
705
678
|
}
|
|
706
679
|
};
|
|
707
680
|
}, [defaultId, commonAttributes, dispatchAnalytics]);
|
|
708
|
-
/** Contains all track analytics events */
|
|
709
681
|
|
|
682
|
+
/** Contains all track analytics events */
|
|
710
683
|
var track = useMemo(function () {
|
|
711
684
|
return {
|
|
712
685
|
/**
|
|
@@ -717,11 +690,11 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
717
690
|
*/
|
|
718
691
|
appAccountConnected: function appAccountConnected(_ref19) {
|
|
719
692
|
var extensionKey = _ref19.extensionKey,
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
693
|
+
definitionId = _ref19.definitionId,
|
|
694
|
+
resourceType = _ref19.resourceType,
|
|
695
|
+
destinationProduct = _ref19.destinationProduct,
|
|
696
|
+
destinationSubproduct = _ref19.destinationSubproduct,
|
|
697
|
+
location = _ref19.location;
|
|
725
698
|
return dispatchAnalytics(applyCommonAttributes(trackAppAccountConnected(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
726
699
|
extensionKey: extensionKey,
|
|
727
700
|
definitionId: definitionId,
|
|
@@ -731,7 +704,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
731
704
|
location: location
|
|
732
705
|
})), commonAttributes));
|
|
733
706
|
},
|
|
734
|
-
|
|
735
707
|
/**
|
|
736
708
|
* This fires an event which represents a user starting the Smart Link connect account process.
|
|
737
709
|
* @param location a location where the Smart Link auth action was initiated.
|
|
@@ -740,13 +712,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
740
712
|
*/
|
|
741
713
|
appAccountAuthStarted: function appAccountAuthStarted(_ref20) {
|
|
742
714
|
var extensionKey = _ref20.extensionKey,
|
|
743
|
-
|
|
715
|
+
location = _ref20.location;
|
|
744
716
|
return dispatchAnalytics(applyCommonAttributes(trackAppAccountAuthStarted(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
745
717
|
extensionKey: extensionKey,
|
|
746
718
|
location: location
|
|
747
719
|
})), commonAttributes));
|
|
748
720
|
},
|
|
749
|
-
|
|
750
721
|
/**
|
|
751
722
|
* This fires a tracking event before and after link updated.
|
|
752
723
|
*/
|
|
@@ -755,8 +726,8 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
755
726
|
}
|
|
756
727
|
};
|
|
757
728
|
}, [commonAttributes, dispatchAnalytics]);
|
|
758
|
-
/** Contains all screen analytics events */
|
|
759
729
|
|
|
730
|
+
/** Contains all screen analytics events */
|
|
760
731
|
var screen = useMemo(function () {
|
|
761
732
|
return {
|
|
762
733
|
/**
|
|
@@ -767,11 +738,11 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
767
738
|
*/
|
|
768
739
|
authPopupEvent: function authPopupEvent(_ref21) {
|
|
769
740
|
var extensionKey = _ref21.extensionKey,
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
741
|
+
definitionId = _ref21.definitionId,
|
|
742
|
+
resourceType = _ref21.resourceType,
|
|
743
|
+
destinationProduct = _ref21.destinationProduct,
|
|
744
|
+
destinationSubproduct = _ref21.destinationSubproduct,
|
|
745
|
+
location = _ref21.location;
|
|
775
746
|
return dispatchAnalytics(applyCommonAttributes(screenAuthPopupEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
776
747
|
extensionKey: extensionKey,
|
|
777
748
|
definitionId: definitionId,
|
|
@@ -781,7 +752,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
781
752
|
location: location
|
|
782
753
|
})), commonAttributes));
|
|
783
754
|
},
|
|
784
|
-
|
|
785
755
|
/**
|
|
786
756
|
* This fires an event that represents when a user view a modal.
|
|
787
757
|
* @param data A partial analytics event payload
|