@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
|
@@ -15,10 +15,8 @@ export const getContextByStatus = (url, status, details, renderers) => {
|
|
|
15
15
|
title: url,
|
|
16
16
|
url
|
|
17
17
|
};
|
|
18
|
-
|
|
19
18
|
case SmartLinkStatus.Resolved:
|
|
20
19
|
return extractFlexibleLinkContext(details, renderers);
|
|
21
|
-
|
|
22
20
|
case SmartLinkStatus.Unauthorized:
|
|
23
21
|
case SmartLinkStatus.Forbidden:
|
|
24
22
|
case SmartLinkStatus.NotFound:
|
|
@@ -35,43 +33,32 @@ export const getContextByStatus = (url, status, details, renderers) => {
|
|
|
35
33
|
};
|
|
36
34
|
}
|
|
37
35
|
};
|
|
38
|
-
|
|
39
36
|
const getForbiddenMessageKey = meta => {
|
|
40
37
|
var _meta$requestAccess;
|
|
41
|
-
|
|
42
38
|
const accessType = meta === null || meta === void 0 ? void 0 : (_meta$requestAccess = meta.requestAccess) === null || _meta$requestAccess === void 0 ? void 0 : _meta$requestAccess.accessType;
|
|
43
|
-
|
|
44
39
|
switch (accessType) {
|
|
45
40
|
case 'DIRECT_ACCESS':
|
|
46
41
|
return 'join_to_view';
|
|
47
|
-
|
|
48
42
|
case 'REQUEST_ACCESS':
|
|
49
43
|
return 'request_access_to_view';
|
|
50
|
-
|
|
51
44
|
case 'PENDING_REQUEST_EXISTS':
|
|
52
45
|
return 'pending_request';
|
|
53
|
-
|
|
54
46
|
case 'FORBIDDEN':
|
|
55
47
|
return 'forbidden_access';
|
|
56
|
-
|
|
57
48
|
case 'DENIED_REQUEST_EXISTS':
|
|
58
49
|
return 'request_denied';
|
|
59
|
-
|
|
60
50
|
default:
|
|
61
51
|
return 'restricted_link';
|
|
62
52
|
}
|
|
63
53
|
};
|
|
64
|
-
|
|
65
54
|
export const getRetryOptions = (url, status, details, onAuthorize) => {
|
|
66
55
|
var _details$meta, _access$action;
|
|
67
|
-
|
|
68
56
|
const data = details && details.data || getEmptyJsonLd();
|
|
69
57
|
const provider = extractProvider(data);
|
|
70
58
|
const context = provider === null || provider === void 0 ? void 0 : provider.text;
|
|
71
59
|
const values = context ? {
|
|
72
60
|
context
|
|
73
61
|
} : undefined;
|
|
74
|
-
|
|
75
62
|
switch (status) {
|
|
76
63
|
case SmartLinkStatus.Forbidden:
|
|
77
64
|
const meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
@@ -89,14 +76,12 @@ export const getRetryOptions = (url, status, details, onAuthorize) => {
|
|
|
89
76
|
onClick,
|
|
90
77
|
values
|
|
91
78
|
};
|
|
92
|
-
|
|
93
79
|
case SmartLinkStatus.Unauthorized:
|
|
94
80
|
return {
|
|
95
81
|
descriptor: messages.connect_link_account_card_name,
|
|
96
82
|
onClick: onAuthorize ? handleOnClick(onAuthorize) : undefined,
|
|
97
83
|
values
|
|
98
84
|
};
|
|
99
|
-
|
|
100
85
|
case SmartLinkStatus.NotFound:
|
|
101
86
|
return {
|
|
102
87
|
descriptor: messages.cannot_find_link
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import Popup from '@atlaskit/popup';
|
|
5
4
|
import { jsx } from '@emotion/react';
|
|
@@ -35,7 +34,6 @@ export const HoverCardComponent = ({
|
|
|
35
34
|
if (isOpen) {
|
|
36
35
|
return;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
mousePos.current = {
|
|
40
38
|
x: event.clientX,
|
|
41
39
|
y: event.clientY
|
|
@@ -52,22 +50,19 @@ export const HoverCardComponent = ({
|
|
|
52
50
|
status: linkStatus
|
|
53
51
|
});
|
|
54
52
|
}
|
|
55
|
-
|
|
56
53
|
setIsOpen(false);
|
|
57
54
|
}, [analytics.ui, isOpen, linkStatus]);
|
|
58
55
|
const initHideCard = useCallback(() => {
|
|
59
56
|
if (fadeInTimeoutId.current) {
|
|
60
57
|
clearTimeout(fadeInTimeoutId.current);
|
|
61
58
|
}
|
|
62
|
-
|
|
63
59
|
fadeOutTimeoutId.current = setTimeout(() => hideCard(), delay);
|
|
64
60
|
}, [hideCard]);
|
|
65
61
|
const initShowCard = useCallback(event => {
|
|
66
62
|
if (fadeOutTimeoutId.current) {
|
|
67
63
|
clearTimeout(fadeOutTimeoutId.current);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
}
|
|
65
|
+
//Set mouse position in the case it's not already set by onMouseMove, as in the case of scrolling
|
|
71
66
|
setMousePosition(event);
|
|
72
67
|
fadeInTimeoutId.current = setTimeout(() => {
|
|
73
68
|
//Check if its previously closed to avoid firing events when moving between the child and hover card components
|
|
@@ -78,9 +73,8 @@ export const HoverCardComponent = ({
|
|
|
78
73
|
previewInvokeMethod: invokeMethod,
|
|
79
74
|
status: linkStatus
|
|
80
75
|
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
}
|
|
77
|
+
//If these are undefined then popupOffset is undefined and we fallback to default bottom-start placement
|
|
84
78
|
if (parentSpan.current && mousePos.current) {
|
|
85
79
|
const {
|
|
86
80
|
bottom,
|
|
@@ -88,7 +82,6 @@ export const HoverCardComponent = ({
|
|
|
88
82
|
} = parentSpan.current.getBoundingClientRect();
|
|
89
83
|
popupOffset.current = [mousePos.current.x - left, mousePos.current.y - bottom + CARD_GAP_PX];
|
|
90
84
|
}
|
|
91
|
-
|
|
92
85
|
setIsOpen(true);
|
|
93
86
|
}, delay);
|
|
94
87
|
}, [isOpen, setMousePosition, analytics.ui, linkStatus]);
|
|
@@ -102,11 +95,12 @@ export const HoverCardComponent = ({
|
|
|
102
95
|
if (actionId === 'preview-content') {
|
|
103
96
|
hideCard();
|
|
104
97
|
}
|
|
105
|
-
}, [hideCard]);
|
|
98
|
+
}, [hideCard]);
|
|
99
|
+
|
|
100
|
+
// Stop hover preview content to propagate event to parent.
|
|
106
101
|
|
|
107
102
|
const onChildClick = useCallback(e => {
|
|
108
103
|
e.stopPropagation();
|
|
109
|
-
|
|
110
104
|
if (closeOnChildClick) {
|
|
111
105
|
hideCard();
|
|
112
106
|
}
|
|
@@ -143,6 +137,5 @@ export const HoverCardComponent = ({
|
|
|
143
137
|
content: content,
|
|
144
138
|
trigger: trigger,
|
|
145
139
|
zIndex: 511 // Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
146
|
-
|
|
147
140
|
});
|
|
148
141
|
};
|
|
@@ -28,7 +28,6 @@ export const getOpenAction = (url, analytics, onActionClick) => ({
|
|
|
28
28
|
if (onActionClick) {
|
|
29
29
|
onActionClick('open-content');
|
|
30
30
|
}
|
|
31
|
-
|
|
32
31
|
window.open(url, '_blank');
|
|
33
32
|
analytics.ui.hoverCardOpenLinkClickedEvent({
|
|
34
33
|
previewDisplay: 'card'
|
|
@@ -48,7 +47,6 @@ export const getCopyAction = url => ({
|
|
|
48
47
|
tooltipMessage: jsx(FormattedMessage, messages.copy_url_to_clipboard),
|
|
49
48
|
testId: 'hover-card-copy-button'
|
|
50
49
|
});
|
|
51
|
-
|
|
52
50
|
const HoverCardContent = ({
|
|
53
51
|
id = '',
|
|
54
52
|
analytics,
|
|
@@ -62,7 +60,6 @@ const HoverCardContent = ({
|
|
|
62
60
|
onMouseLeave
|
|
63
61
|
}) => {
|
|
64
62
|
var _cardState$details;
|
|
65
|
-
|
|
66
63
|
const extensionKey = useMemo(() => getExtensionKey(cardState.details), [cardState.details]);
|
|
67
64
|
const actions = useSmartCardActions(id, url, analytics);
|
|
68
65
|
useEffect(() => {
|
|
@@ -103,7 +100,6 @@ const HoverCardContent = ({
|
|
|
103
100
|
children: {}
|
|
104
101
|
};
|
|
105
102
|
const onClickStopPropagation = useCallback(e => e.stopPropagation(), []);
|
|
106
|
-
|
|
107
103
|
const getCardView = cardState => {
|
|
108
104
|
if (cardState.metadataStatus === 'pending') {
|
|
109
105
|
return jsx(HoverCardLoadingView, {
|
|
@@ -111,7 +107,6 @@ const HoverCardContent = ({
|
|
|
111
107
|
titleBlockProps: titleBlockProps
|
|
112
108
|
});
|
|
113
109
|
}
|
|
114
|
-
|
|
115
110
|
if (cardState.status === 'unauthorized') {
|
|
116
111
|
return jsx(HoverCardUnauthorisedView, {
|
|
117
112
|
analytics: analytics,
|
|
@@ -121,7 +116,6 @@ const HoverCardContent = ({
|
|
|
121
116
|
url: url
|
|
122
117
|
});
|
|
123
118
|
}
|
|
124
|
-
|
|
125
119
|
if (cardState.status === 'resolved') {
|
|
126
120
|
return jsx(HoverCardResolvedView, {
|
|
127
121
|
id: id,
|
|
@@ -135,10 +129,8 @@ const HoverCardContent = ({
|
|
|
135
129
|
titleBlockProps: titleBlockProps
|
|
136
130
|
});
|
|
137
131
|
}
|
|
138
|
-
|
|
139
132
|
return null;
|
|
140
133
|
};
|
|
141
|
-
|
|
142
134
|
const cardView = getCardView(cardState);
|
|
143
135
|
return cardView ? jsx("div", {
|
|
144
136
|
onMouseEnter: onMouseEnter,
|
|
@@ -148,5 +140,4 @@ const HoverCardContent = ({
|
|
|
148
140
|
css: HoverCardContainer
|
|
149
141
|
}, cardView) : null;
|
|
150
142
|
};
|
|
151
|
-
|
|
152
143
|
export default HoverCardContent;
|
|
@@ -3,7 +3,6 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
import extractPreview from '../../../extractors/flexible/extract-preview';
|
|
4
4
|
import { PreviewBlock, SnippetBlock } from '../../FlexibleCard/components/blocks';
|
|
5
5
|
import { getTransitionStyles } from '../styled';
|
|
6
|
-
|
|
7
6
|
const SnippetOrPreview = ({
|
|
8
7
|
data,
|
|
9
8
|
snippetHeight
|
|
@@ -11,16 +10,17 @@ const SnippetOrPreview = ({
|
|
|
11
10
|
const transitionStarted = useRef(false);
|
|
12
11
|
const previewBlockRef = useRef(null);
|
|
13
12
|
const [showSnippet, setShowSnippet] = useState(false);
|
|
14
|
-
const [previewCss, setPreviewCss] = useState();
|
|
13
|
+
const [previewCss, setPreviewCss] = useState();
|
|
15
14
|
|
|
15
|
+
// Set Preview to a fixed height to enable transitions
|
|
16
16
|
const onPreviewRender = useCallback(() => {
|
|
17
17
|
var _previewBlockRef$curr;
|
|
18
|
-
|
|
19
18
|
previewBlockRef.current && setPreviewCss(css`
|
|
20
19
|
height: ${(_previewBlockRef$curr = previewBlockRef.current) === null || _previewBlockRef$curr === void 0 ? void 0 : _previewBlockRef$curr.getBoundingClientRect().height}px;
|
|
21
20
|
`);
|
|
22
|
-
}, []);
|
|
21
|
+
}, []);
|
|
23
22
|
|
|
23
|
+
// On error set Preview to Snippet height with transition
|
|
24
24
|
const onPreviewError = useCallback(() => {
|
|
25
25
|
if (transitionStarted.current === false) {
|
|
26
26
|
setPreviewCss(getTransitionStyles(snippetHeight));
|
|
@@ -38,5 +38,4 @@ const SnippetOrPreview = ({
|
|
|
38
38
|
onRender: onPreviewRender
|
|
39
39
|
}) : /*#__PURE__*/React.createElement(SnippetBlock, null);
|
|
40
40
|
};
|
|
41
|
-
|
|
42
41
|
export default SnippetOrPreview;
|
|
@@ -15,12 +15,10 @@ export const toFooterActions = (cardActions, onActionClick) => cardActions.map(a
|
|
|
15
15
|
if (onActionClick) {
|
|
16
16
|
onActionClick(action.id);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
18
|
return action.invoke();
|
|
20
19
|
},
|
|
21
20
|
testId: action.id
|
|
22
21
|
}));
|
|
23
|
-
|
|
24
22
|
const HoverCardResolvedView = ({
|
|
25
23
|
flexibleCardProps,
|
|
26
24
|
titleBlockProps,
|
|
@@ -33,7 +31,6 @@ const HoverCardResolvedView = ({
|
|
|
33
31
|
extensionKey
|
|
34
32
|
}) => {
|
|
35
33
|
var _cardState$details;
|
|
36
|
-
|
|
37
34
|
const showActionableElement = useFeatureFlag('enableActionableElement');
|
|
38
35
|
useEffect(() => {
|
|
39
36
|
// Since this hover view is only rendered on resolved status,
|
|
@@ -49,8 +46,8 @@ const HoverCardResolvedView = ({
|
|
|
49
46
|
primary,
|
|
50
47
|
secondary
|
|
51
48
|
} = useMemo(() => {
|
|
52
|
-
const types = data ? extractType(data) : undefined;
|
|
53
|
-
|
|
49
|
+
const types = data ? extractType(data) : undefined;
|
|
50
|
+
//TODO: EDM-3224 deleted simulated and use real JsonLd
|
|
54
51
|
const metadata = extractMetadata(getSimulatedMetadata(extensionKey, types));
|
|
55
52
|
const primary = showActionableElement ? toActionableMetadata(onActionClick, extensionKey, types, cardActions, metadata.primary) : metadata.primary;
|
|
56
53
|
return {
|
|
@@ -63,7 +60,6 @@ const HoverCardResolvedView = ({
|
|
|
63
60
|
const snippetBlockRef = useRef(null);
|
|
64
61
|
const onSnippetRender = useCallback(() => {
|
|
65
62
|
var _snippetBlockRef$curr, _snippetBlockRef$curr2;
|
|
66
|
-
|
|
67
63
|
snippetHeight.current = (_snippetBlockRef$curr = (_snippetBlockRef$curr2 = snippetBlockRef.current) === null || _snippetBlockRef$curr2 === void 0 ? void 0 : _snippetBlockRef$curr2.getBoundingClientRect().height) !== null && _snippetBlockRef$curr !== void 0 ? _snippetBlockRef$curr : 0;
|
|
68
64
|
}, []);
|
|
69
65
|
const body = SnippetOrPreview({
|
|
@@ -87,5 +83,4 @@ const HoverCardResolvedView = ({
|
|
|
87
83
|
overrideCss: footerBlockCss
|
|
88
84
|
}));
|
|
89
85
|
};
|
|
90
|
-
|
|
91
86
|
export default HoverCardResolvedView;
|
|
@@ -6,7 +6,6 @@ import FlexibleCard from '../../../../FlexibleCard';
|
|
|
6
6
|
import { TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
7
|
import { CARD_WIDTH_REM } from '../../../styled';
|
|
8
8
|
import { loadingViewContainer, skeletonContainer } from './styled';
|
|
9
|
-
|
|
10
9
|
const HoverCardLoadingView = ({
|
|
11
10
|
flexibleCardProps,
|
|
12
11
|
titleBlockProps
|
|
@@ -29,5 +28,4 @@ const HoverCardLoadingView = ({
|
|
|
29
28
|
height: lineHeightRem
|
|
30
29
|
})));
|
|
31
30
|
};
|
|
32
|
-
|
|
33
31
|
export default HoverCardLoadingView;
|
|
@@ -11,7 +11,6 @@ import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group
|
|
|
11
11
|
import { LinkIcon } from '../../../../FlexibleCard/components/elements';
|
|
12
12
|
import { ActionName, CardDisplay } from '../../../../../constants';
|
|
13
13
|
import { useSmartCardActions } from '../../../../../state/actions';
|
|
14
|
-
|
|
15
14
|
const HoverCardUnauthorisedView = ({
|
|
16
15
|
analytics,
|
|
17
16
|
extensionKey,
|
|
@@ -21,7 +20,6 @@ const HoverCardUnauthorisedView = ({
|
|
|
21
20
|
url
|
|
22
21
|
}) => {
|
|
23
22
|
var _cardState$details, _extractProvider;
|
|
24
|
-
|
|
25
23
|
const {
|
|
26
24
|
cardState
|
|
27
25
|
} = flexibleCardProps;
|
|
@@ -70,5 +68,4 @@ const HoverCardUnauthorisedView = ({
|
|
|
70
68
|
appearance: "primary"
|
|
71
69
|
})));
|
|
72
70
|
};
|
|
73
|
-
|
|
74
71
|
export default HoverCardUnauthorisedView;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
4
|
import { jsx } from '@emotion/react';
|
|
@@ -9,7 +8,6 @@ import { useSmartLinkAnalytics } from '../../state/analytics';
|
|
|
9
8
|
import { fireSmartLinkEvent } from '../../utils/analytics';
|
|
10
9
|
import { HoverCardComponent } from './components/HoverCardComponent';
|
|
11
10
|
import { CardDisplay } from '../../constants';
|
|
12
|
-
|
|
13
11
|
const HoverCardWithErrorBoundary = props => {
|
|
14
12
|
const {
|
|
15
13
|
url,
|
|
@@ -37,7 +35,6 @@ const HoverCardWithErrorBoundary = props => {
|
|
|
37
35
|
analytics: analytics
|
|
38
36
|
}), children));
|
|
39
37
|
};
|
|
40
|
-
|
|
41
38
|
export const HoverCard = withAnalyticsContext({
|
|
42
39
|
source: 'smartLinkPreviewHoverCard',
|
|
43
40
|
attributes: {
|
|
@@ -8,8 +8,8 @@ export const flexibleUiOptions = {
|
|
|
8
8
|
theme: SmartLinkTheme.Black,
|
|
9
9
|
hidePadding: true
|
|
10
10
|
};
|
|
11
|
-
export const CARD_WIDTH_REM = 24;
|
|
12
|
-
|
|
11
|
+
export const CARD_WIDTH_REM = 24;
|
|
12
|
+
// gap between mouse cursor and hover card
|
|
13
13
|
export const CARD_GAP_PX = 10;
|
|
14
14
|
const blockGap = '0.5rem';
|
|
15
15
|
const elementGap = '0.5rem';
|
|
@@ -12,7 +12,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
return {
|
|
17
16
|
metadata: {
|
|
18
17
|
primary: [ElementName.ModifiedOn, ElementName.CreatedBy],
|
|
@@ -20,7 +19,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
20
19
|
subtitle: []
|
|
21
20
|
}
|
|
22
21
|
};
|
|
23
|
-
|
|
24
22
|
case 'confluence-object-provider':
|
|
25
23
|
return {
|
|
26
24
|
metadata: {
|
|
@@ -29,7 +27,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
29
27
|
subtitle: []
|
|
30
28
|
}
|
|
31
29
|
};
|
|
32
|
-
|
|
33
30
|
case 'jira-object-provider':
|
|
34
31
|
return {
|
|
35
32
|
metadata: {
|
|
@@ -38,7 +35,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
38
35
|
subtitle: []
|
|
39
36
|
}
|
|
40
37
|
};
|
|
41
|
-
|
|
42
38
|
case 'trello-object-provider':
|
|
43
39
|
return {
|
|
44
40
|
metadata: {
|
|
@@ -47,7 +43,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
47
43
|
subtitle: []
|
|
48
44
|
}
|
|
49
45
|
};
|
|
50
|
-
|
|
51
46
|
case 'watermelon-object-provider':
|
|
52
47
|
if (types.includes('atlassian:Project')) {
|
|
53
48
|
return {
|
|
@@ -58,7 +53,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
58
53
|
}
|
|
59
54
|
};
|
|
60
55
|
}
|
|
61
|
-
|
|
62
56
|
return {
|
|
63
57
|
metadata: {
|
|
64
58
|
primary: [ElementName.AuthorGroup, ElementName.State, ElementName.DueOn],
|
|
@@ -66,7 +60,6 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
66
60
|
subtitle: []
|
|
67
61
|
}
|
|
68
62
|
};
|
|
69
|
-
|
|
70
63
|
default:
|
|
71
64
|
return {
|
|
72
65
|
metadata: {
|
|
@@ -81,14 +74,13 @@ export const toActionableMetadata = (onActionClick, extensionKey, types = [], ca
|
|
|
81
74
|
// Actionable State for Jira issue
|
|
82
75
|
if (extensionKey === 'jira-object-provider' && types !== null && types !== void 0 && types.includes('atlassian:Task')) {
|
|
83
76
|
const previewAction = cardActions.find(action => action.id === 'preview-content');
|
|
84
|
-
|
|
85
77
|
if (previewAction) {
|
|
86
|
-
return elementItems.map(elementItem => elementItem.name === ElementName.State ? {
|
|
78
|
+
return elementItems.map(elementItem => elementItem.name === ElementName.State ? {
|
|
79
|
+
...elementItem,
|
|
87
80
|
onClick: () => {
|
|
88
81
|
if (onActionClick) {
|
|
89
82
|
onActionClick(previewAction.id);
|
|
90
83
|
}
|
|
91
|
-
|
|
92
84
|
return previewAction.invoke({
|
|
93
85
|
isReloadRequired: true
|
|
94
86
|
});
|
|
@@ -96,6 +88,5 @@ export const toActionableMetadata = (onActionClick, extensionKey, types = [], ca
|
|
|
96
88
|
} : elementItem);
|
|
97
89
|
}
|
|
98
90
|
}
|
|
99
|
-
|
|
100
91
|
return elementItems;
|
|
101
92
|
};
|
|
@@ -12,19 +12,16 @@ import { IconStyledButton, LowercaseAppearance } from '../styled';
|
|
|
12
12
|
export class InlineCardErroredView extends React.Component {
|
|
13
13
|
constructor(...args) {
|
|
14
14
|
super(...args);
|
|
15
|
-
|
|
16
15
|
_defineProperty(this, "handleRetry", event => {
|
|
17
16
|
const {
|
|
18
17
|
onRetry
|
|
19
18
|
} = this.props;
|
|
20
|
-
|
|
21
19
|
if (onRetry) {
|
|
22
20
|
event.preventDefault();
|
|
23
21
|
event.stopPropagation();
|
|
24
22
|
onRetry();
|
|
25
23
|
}
|
|
26
24
|
});
|
|
27
|
-
|
|
28
25
|
_defineProperty(this, "renderRightSide", () => {
|
|
29
26
|
const {
|
|
30
27
|
onRetry,
|
|
@@ -41,7 +38,6 @@ export class InlineCardErroredView extends React.Component {
|
|
|
41
38
|
})));
|
|
42
39
|
});
|
|
43
40
|
}
|
|
44
|
-
|
|
45
41
|
render() {
|
|
46
42
|
const {
|
|
47
43
|
url,
|
|
@@ -66,5 +62,4 @@ export class InlineCardErroredView extends React.Component {
|
|
|
66
62
|
rightSide: this.renderRightSide()
|
|
67
63
|
}));
|
|
68
64
|
}
|
|
69
|
-
|
|
70
65
|
}
|
|
@@ -21,32 +21,25 @@ const FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, nu
|
|
|
21
21
|
export class InlineCardForbiddenView extends React.Component {
|
|
22
22
|
constructor(...args) {
|
|
23
23
|
var _this$props, _this$props$requestAc;
|
|
24
|
-
|
|
25
24
|
super(...args);
|
|
26
|
-
|
|
27
25
|
_defineProperty(this, "state", {
|
|
28
26
|
hasRequestAccessContextMessage: !!((_this$props = this.props) !== null && _this$props !== void 0 && (_this$props$requestAc = _this$props.requestAccessContext) !== null && _this$props$requestAc !== void 0 && _this$props$requestAc.callToActionMessageKey)
|
|
29
27
|
});
|
|
30
|
-
|
|
31
28
|
_defineProperty(this, "handleRetry", event => {
|
|
32
29
|
const {
|
|
33
30
|
onAuthorise
|
|
34
31
|
} = this.props;
|
|
35
32
|
event.preventDefault();
|
|
36
33
|
event.stopPropagation();
|
|
37
|
-
|
|
38
34
|
if (onAuthorise) {
|
|
39
35
|
onAuthorise();
|
|
40
36
|
} else {
|
|
41
37
|
var _this$props2, _this$props2$requestA, _this$props2$requestA2;
|
|
42
|
-
|
|
43
38
|
(_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$requestA = _this$props2.requestAccessContext) === null || _this$props2$requestA === void 0 ? void 0 : (_this$props2$requestA2 = _this$props2$requestA.action) === null || _this$props2$requestA2 === void 0 ? void 0 : _this$props2$requestA2.promise();
|
|
44
39
|
}
|
|
45
40
|
});
|
|
46
|
-
|
|
47
41
|
_defineProperty(this, "renderForbiddenAccessMessage", () => {
|
|
48
42
|
var _this$props3, _this$props3$requestA;
|
|
49
|
-
|
|
50
43
|
if ((_this$props3 = this.props) !== null && _this$props3 !== void 0 && (_this$props3$requestA = _this$props3.requestAccessContext) !== null && _this$props3$requestA !== void 0 && _this$props3$requestA.callToActionMessageKey) {
|
|
51
44
|
const {
|
|
52
45
|
callToActionMessageKey
|
|
@@ -57,17 +50,14 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
57
50
|
}
|
|
58
51
|
}));
|
|
59
52
|
}
|
|
60
|
-
|
|
61
53
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.invalid_permissions, formattedMessage => {
|
|
62
54
|
return /*#__PURE__*/React.createElement(React.Fragment, null, formattedMessage);
|
|
63
55
|
}));
|
|
64
56
|
});
|
|
65
|
-
|
|
66
57
|
_defineProperty(this, "renderRightSide", () => {
|
|
67
58
|
const {
|
|
68
59
|
onAuthorise
|
|
69
60
|
} = this.props;
|
|
70
|
-
|
|
71
61
|
if (this.state.hasRequestAccessContextMessage) {
|
|
72
62
|
return /*#__PURE__*/React.createElement(Button, {
|
|
73
63
|
spacing: "none",
|
|
@@ -78,7 +68,6 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
78
68
|
role: "button"
|
|
79
69
|
}, this.renderForbiddenAccessMessage());
|
|
80
70
|
}
|
|
81
|
-
|
|
82
71
|
if (onAuthorise) {
|
|
83
72
|
return /*#__PURE__*/React.createElement(LozengeBlockWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
84
73
|
spacing: "none",
|
|
@@ -91,11 +80,9 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
91
80
|
appearance: 'moved'
|
|
92
81
|
}, this.renderForbiddenAccessMessage()))));
|
|
93
82
|
}
|
|
94
|
-
|
|
95
83
|
return null;
|
|
96
84
|
});
|
|
97
85
|
}
|
|
98
|
-
|
|
99
86
|
render() {
|
|
100
87
|
const {
|
|
101
88
|
url,
|
|
@@ -117,5 +104,4 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
117
104
|
rightSideSpacer: this.state.hasRequestAccessContextMessage
|
|
118
105
|
}));
|
|
119
106
|
}
|
|
120
|
-
|
|
121
107
|
}
|
|
@@ -22,18 +22,19 @@ export const Frame = props => {
|
|
|
22
22
|
if (event.key !== ' ' && event.key !== 'Enter') {
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
if (onClick) {
|
|
27
26
|
event.preventDefault();
|
|
28
27
|
event.stopPropagation();
|
|
29
28
|
onClick(event);
|
|
30
29
|
}
|
|
31
30
|
}, [onClick]);
|
|
32
|
-
const isInteractive = Boolean(onClick);
|
|
31
|
+
const isInteractive = Boolean(onClick);
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
// Depending on whenever Frame was given onClick or link itself we display span or anchor elements
|
|
34
|
+
const Wrapper = link || onClick ? WrapperAnchor : WrapperSpan;
|
|
36
35
|
|
|
36
|
+
// TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
|
|
37
|
+
// It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
|
|
37
38
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
38
39
|
theme: useGlobalTheme(),
|
|
39
40
|
href: link,
|
|
@@ -12,7 +12,6 @@ const selected = `
|
|
|
12
12
|
text-decoration: none;
|
|
13
13
|
}
|
|
14
14
|
`;
|
|
15
|
-
|
|
16
15
|
const isInteractive = ({
|
|
17
16
|
isInteractive
|
|
18
17
|
}) => {
|
|
@@ -38,7 +37,6 @@ const isInteractive = ({
|
|
|
38
37
|
return '';
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
|
-
|
|
42
40
|
const isSelected = ({
|
|
43
41
|
isSelected
|
|
44
42
|
}) => {
|
|
@@ -48,6 +46,7 @@ const isSelected = ({
|
|
|
48
46
|
return 'user-select: text';
|
|
49
47
|
}
|
|
50
48
|
};
|
|
49
|
+
|
|
51
50
|
/*
|
|
52
51
|
Inline smart cards should have the following layout:
|
|
53
52
|
------------------------------------
|
|
@@ -60,8 +59,6 @@ const isSelected = ({
|
|
|
60
59
|
// NB: `padding` consistent with @mentions.
|
|
61
60
|
// NB: `display: inline` required for `box-decoration-break` to work.
|
|
62
61
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
63
|
-
|
|
64
|
-
|
|
65
62
|
const baseWrapperStyle = props => `
|
|
66
63
|
line-height: 16px;
|
|
67
64
|
padding: 1px 0.24em 2px 0.24em;
|
|
@@ -85,7 +82,6 @@ const baseWrapperStyle = props => `
|
|
|
85
82
|
transition: 0.1s all ease-in-out;
|
|
86
83
|
-moz-user-select: none;
|
|
87
84
|
`;
|
|
88
|
-
|
|
89
85
|
export const WrapperAnchor = styled.a`
|
|
90
86
|
${baseWrapperStyle}
|
|
91
87
|
${isInteractive}
|
|
@@ -8,12 +8,13 @@ const placeholderShimmer = keyframes`
|
|
|
8
8
|
100% {
|
|
9
9
|
background-position: 20px 0;
|
|
10
10
|
}
|
|
11
|
-
`;
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
// TODO: Figure out a more scalable/responsive solution
|
|
12
14
|
// for vertical alignment.
|
|
13
15
|
// Current rationale: vertically positioned at the top of
|
|
14
16
|
// the smart card container (when set to 0). Offset this
|
|
15
17
|
// to position it with appropriate whitespace from the top.
|
|
16
|
-
|
|
17
18
|
export const Icon = styled.img`
|
|
18
19
|
height: 14px;
|
|
19
20
|
width: 14px;
|
|
@@ -24,10 +25,11 @@ export const Icon = styled.img`
|
|
|
24
25
|
top: 50%;
|
|
25
26
|
left: 50%;
|
|
26
27
|
transform: translate(-50%, -50%);
|
|
27
|
-
`;
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
// Used for 'untrue' icons which claim to be 16x16 but
|
|
28
31
|
// are less than that in height/width.
|
|
29
32
|
// TODO: Replace this override with proper AtlasKit solution.
|
|
30
|
-
|
|
31
33
|
export const AKIconWrapper = styled.span`
|
|
32
34
|
margin-right: -2px;
|
|
33
35
|
`;
|