@atlaskit/smart-card 26.31.1 → 26.33.0
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__/page-objects/BaseCard.js +1 -2
- package/dist/cjs/__tests_external__/page-objects/BlockCard.js +2 -3
- package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +2 -3
- package/dist/cjs/__tests_external__/page-objects/InlineCard.js +2 -3
- package/dist/cjs/__tests_external__/test-cases/card.js +2 -3
- package/dist/cjs/__tests_external__/test-cases/embed.js +2 -3
- package/dist/cjs/__tests_external__/test-cases/inline.js +2 -3
- package/dist/cjs/constants.js +16 -31
- package/dist/cjs/extractors/action/extract-lozenge-action-items.js +2 -3
- package/dist/cjs/extractors/block/index.js +4 -7
- package/dist/cjs/extractors/common/actions/extractActions.js +1 -2
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +2 -3
- package/dist/cjs/extractors/common/byline/extractByline.js +1 -2
- package/dist/cjs/extractors/common/context/extractAccessContext.js +7 -8
- package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +2 -3
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +2 -3
- package/dist/cjs/extractors/common/detail/extractDownloadUrl.js +2 -3
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +2 -3
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +2 -3
- package/dist/cjs/extractors/common/hostname/extractHostname.js +1 -2
- package/dist/cjs/extractors/common/icon/extractFileFormat.js +2 -3
- package/dist/cjs/extractors/common/icon/extractIcon.js +1 -2
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +1 -2
- package/dist/cjs/extractors/common/icon/extractIconFromTask.js +2 -3
- package/dist/cjs/extractors/common/icon/priority.js +2 -3
- package/dist/cjs/extractors/common/lozenge/extractLozenge.js +1 -2
- package/dist/cjs/extractors/common/lozenge/extractState.js +2 -3
- package/dist/cjs/extractors/common/lozenge/extractTag.js +1 -2
- package/dist/cjs/extractors/common/lozenge/extractTaskStatus.js +2 -3
- package/dist/cjs/extractors/common/lozenge/extractTaskType.js +2 -3
- package/dist/cjs/extractors/common/lozenge/utils.js +3 -6
- package/dist/cjs/extractors/common/meta/extractIsSupportTheming.js +2 -3
- package/dist/cjs/extractors/common/meta/extractIsTrusted.js +2 -3
- package/dist/cjs/extractors/common/primitives/extractSummary.js +2 -3
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +2 -3
- package/dist/cjs/extractors/common/primitives/extractVisitUrl.js +2 -3
- package/dist/cjs/extractors/common/title-prefix/extractTitlePrefix.js +2 -3
- package/dist/cjs/extractors/constants.js +13 -26
- package/dist/cjs/extractors/embed/index.js +2 -3
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +2 -3
- package/dist/cjs/extractors/flexible/actions/extract-follow-action.js +2 -3
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +2 -3
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +2 -3
- package/dist/cjs/extractors/flexible/collaboratorGroup/index.js +2 -3
- package/dist/cjs/extractors/flexible/extract-preview.js +1 -2
- package/dist/cjs/extractors/flexible/extract-priority.js +1 -2
- package/dist/cjs/extractors/flexible/extract-server-action.js +1 -2
- package/dist/cjs/extractors/flexible/extract-state.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-icon-renderer.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-jira-task-icon.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +1 -2
- package/dist/cjs/extractors/flexible/icon/extract-url-icon.js +1 -2
- package/dist/cjs/extractors/flexible/icon/index.js +3 -5
- package/dist/cjs/extractors/flexible/index.js +1 -2
- package/dist/cjs/extractors/flexible/latest-commit/index.js +2 -3
- package/dist/cjs/extractors/flexible/utils.js +22 -43
- package/dist/cjs/extractors/hover/extractMetadata.js +3 -5
- package/dist/cjs/extractors/inline/index.js +3 -5
- package/dist/cjs/i18n/cs.js +2 -3
- package/dist/cjs/i18n/da.js +2 -3
- package/dist/cjs/i18n/de.js +2 -3
- package/dist/cjs/i18n/en.js +2 -3
- package/dist/cjs/i18n/en_GB.js +2 -3
- package/dist/cjs/i18n/en_ZZ.js +2 -3
- package/dist/cjs/i18n/es.js +2 -3
- package/dist/cjs/i18n/et.js +2 -3
- package/dist/cjs/i18n/fi.js +2 -3
- package/dist/cjs/i18n/fr.js +2 -3
- package/dist/cjs/i18n/hu.js +2 -3
- package/dist/cjs/i18n/is.js +2 -3
- package/dist/cjs/i18n/it.js +2 -3
- package/dist/cjs/i18n/ja.js +2 -3
- package/dist/cjs/i18n/ko.js +2 -3
- package/dist/cjs/i18n/languages.js +2 -3
- package/dist/cjs/i18n/nb.js +2 -3
- package/dist/cjs/i18n/nl.js +2 -3
- package/dist/cjs/i18n/pl.js +2 -3
- package/dist/cjs/i18n/pt_BR.js +2 -3
- package/dist/cjs/i18n/pt_PT.js +2 -3
- package/dist/cjs/i18n/ro.js +2 -3
- package/dist/cjs/i18n/ru.js +2 -3
- package/dist/cjs/i18n/sk.js +2 -3
- package/dist/cjs/i18n/sv.js +2 -3
- package/dist/cjs/i18n/th.js +2 -3
- package/dist/cjs/i18n/tr.js +2 -3
- package/dist/cjs/i18n/uk.js +2 -3
- package/dist/cjs/i18n/vi.js +2 -3
- package/dist/cjs/i18n/zh.js +2 -3
- package/dist/cjs/i18n/zh_TW.js +2 -3
- package/dist/cjs/messages.js +2 -3
- package/dist/cjs/ssr.js +2 -3
- package/dist/cjs/state/actions/constants.js +6 -12
- package/dist/cjs/state/actions/index.js +2 -3
- package/dist/cjs/state/analytics/ufoExperiences.js +5 -9
- package/dist/cjs/state/analytics/useDispatchAnalytics.js +2 -3
- package/dist/cjs/state/analytics/useLinkClicked.js +5 -8
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +2 -3
- package/dist/cjs/state/config/index.js +2 -3
- package/dist/cjs/state/flexible-ui-context/index.js +7 -13
- package/dist/cjs/state/flexible-ui-context/utils.js +2 -3
- package/dist/cjs/state/helpers.js +23 -38
- package/dist/cjs/state/hooks/use-invoke/index.js +1 -2
- package/dist/cjs/state/hooks/use-invoke/utils.js +3 -5
- package/dist/cjs/state/hooks/use-invoke-client-action/index.js +4 -5
- package/dist/cjs/state/hooks/use-resolve/index.js +1 -2
- package/dist/cjs/state/renderers/index.js +2 -3
- package/dist/cjs/utils/actions/create-invoke-request.js +1 -2
- package/dist/cjs/utils/actions/create-status-update-request.js +1 -2
- package/dist/cjs/utils/analytics/LinkAnalyticsContext.js +2 -3
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +2 -3
- package/dist/cjs/utils/analytics/analytics.js +41 -80
- package/dist/cjs/utils/analytics/click.js +4 -8
- package/dist/cjs/utils/analytics/index.js +2 -3
- package/dist/cjs/utils/flexible.js +12 -17
- package/dist/cjs/utils/index.js +15 -29
- package/dist/cjs/utils/intl-utils/index.js +2 -3
- package/dist/cjs/utils/jsonld.js +4 -7
- package/dist/cjs/utils/mocks.js +8 -15
- package/dist/cjs/utils/performance.js +8 -15
- package/dist/cjs/utils/test-utils.js +3 -5
- package/dist/cjs/utils/token.js +2 -3
- package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/DownloadAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/RetryAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/ViewAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/flexible/AuthorizeAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/flexible/ForbiddenAction.js +2 -3
- package/dist/cjs/view/BlockCard/actions/flexible/RetryAction.js +2 -3
- package/dist/cjs/view/BlockCard/components/Action.js +3 -5
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +3 -5
- package/dist/cjs/view/BlockCard/components/ActionList.js +2 -3
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +2 -3
- package/dist/cjs/view/BlockCard/components/Content.js +3 -5
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -5
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -5
- package/dist/cjs/view/BlockCard/components/Emoji.js +2 -3
- package/dist/cjs/view/BlockCard/components/Frame.js +4 -7
- package/dist/cjs/view/BlockCard/components/Link.js +2 -3
- package/dist/cjs/view/BlockCard/components/Name.js +3 -5
- package/dist/cjs/view/BlockCard/components/Provider.js +2 -3
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +4 -7
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +2 -3
- package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +1 -2
- package/dist/cjs/view/BlockCard/index.js +2 -3
- package/dist/cjs/view/BlockCard/utils/handlers.js +2 -3
- package/dist/cjs/view/BlockCard/views/ErroredView.js +3 -5
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +4 -7
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +3 -5
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +4 -7
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +3 -5
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +2 -3
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -2
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +4 -8
- package/dist/cjs/view/BlockCard/views/flexible/utils/index.js +3 -5
- package/dist/cjs/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +2 -3
- package/dist/cjs/view/Card/index.js +2 -3
- package/dist/cjs/view/CardWithData/component.js +2 -3
- package/dist/cjs/view/CardWithData/loader.js +1 -2
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyFallback.js +3 -5
- package/dist/cjs/view/CardWithUrl/component.js +2 -3
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +2 -3
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +2 -3
- package/dist/cjs/view/EmbedCard/components/Frame.js +2 -3
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +2 -3
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +2 -3
- package/dist/cjs/view/EmbedCard/components/styled.js +25 -46
- package/dist/cjs/view/EmbedCard/constants.js +3 -6
- package/dist/cjs/view/EmbedCard/index.js +21 -5
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +2 -3
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +6 -3
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +6 -3
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +2 -3
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +2 -3
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +2 -3
- package/dist/cjs/view/EmbedCard/views/forbidden-view/index.js +23 -28
- package/dist/cjs/view/EmbedCard/views/not-found-view/index.js +52 -0
- package/dist/cjs/view/EmbedCard/views/not-found-view/types.js +5 -0
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -2
- package/dist/cjs/view/EmbedCard/views/unresolved-view/styled.js +4 -8
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +6 -7
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +1 -2
- package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +1 -2
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +1 -2
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +1 -2
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +4 -8
- package/dist/cjs/view/EmbedModal/constants.js +2 -4
- package/dist/cjs/view/EmbedModal/index.js +1 -2
- package/dist/cjs/view/EmbedModal/types.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +5 -6
- package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +6 -12
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +3 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +2 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +9 -17
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/container/hover-card-control/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -4
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +34 -66
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/error-boundary/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/styled.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -11
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-analytics.js +5 -9
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +5 -9
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +3 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -6
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/utils.js +13 -25
- package/dist/cjs/view/FlexibleCard/index.js +3 -4
- package/dist/cjs/view/FlexibleCard/utils.js +5 -7
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +1 -2
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -3
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +4 -7
- package/dist/cjs/view/HoverCard/components/ImagePreview.js +1 -2
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +16 -26
- package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +3 -6
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -4
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +3 -6
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +1 -2
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +4 -8
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +1 -2
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +3 -6
- package/dist/cjs/view/HoverCard/index.js +3 -5
- package/dist/cjs/view/HoverCard/styled.js +11 -21
- package/dist/cjs/view/HoverCard/utils.js +3 -5
- package/dist/cjs/view/InlineCard/ErroredView/index.js +2 -3
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +8 -9
- package/dist/cjs/view/InlineCard/Frame/index.js +2 -3
- package/dist/cjs/view/InlineCard/Frame/styled.js +2 -4
- package/dist/cjs/view/InlineCard/Icon.js +4 -7
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +12 -24
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +2 -3
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +2 -3
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +1 -2
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +3 -4
- package/dist/cjs/view/InlineCard/index.js +2 -3
- package/dist/cjs/view/InlineCard/styled.js +5 -9
- package/dist/cjs/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +2 -3
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +2 -3
- package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +1 -2
- package/dist/cjs/view/LinkUrl/index.js +2 -3
- package/dist/cjs/view/LinkView/index.js +2 -3
- package/dist/cjs/view/RedesignedInlineCard/ErroredView/index.js +11 -4
- package/dist/cjs/view/RedesignedInlineCard/ForbiddenView/index.js +17 -10
- package/dist/cjs/view/RedesignedInlineCard/Frame/index.js +2 -3
- package/dist/cjs/view/RedesignedInlineCard/Frame/styled.js +2 -4
- package/dist/cjs/view/RedesignedInlineCard/Icon.js +4 -7
- package/dist/cjs/view/RedesignedInlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/cjs/view/RedesignedInlineCard/IconAndTitleLayout/styled.js +11 -22
- package/dist/cjs/view/RedesignedInlineCard/ResolvedView/index.js +2 -3
- package/dist/cjs/view/RedesignedInlineCard/ResolvingView/index.js +2 -3
- package/dist/cjs/view/RedesignedInlineCard/ResolvingView/styled.js +1 -2
- package/dist/cjs/view/RedesignedInlineCard/UnauthorisedView/index.js +3 -4
- package/dist/cjs/view/RedesignedInlineCard/index.js +6 -5
- package/dist/cjs/view/RedesignedInlineCard/styled.js +5 -9
- package/dist/cjs/view/RedesignedInlineCard/utils/withFrameStyleControl.js +2 -3
- package/dist/cjs/view/common/Byline.js +2 -3
- package/dist/cjs/view/common/Icon.js +3 -5
- package/dist/cjs/view/common/Metadata.js +2 -3
- package/dist/cjs/view/common/MetadataList.js +3 -5
- package/dist/cjs/view/common/UnauthorisedViewContent.js +2 -3
- package/dist/cjs/view/common/utils.js +3 -6
- package/dist/es2019/extractors/common/context/extractAccessContext.js +2 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/index.js +19 -2
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +4 -0
- package/dist/es2019/view/EmbedCard/views/NotFoundView.js +4 -0
- package/dist/es2019/view/EmbedCard/views/forbidden-view/index.js +14 -20
- package/dist/es2019/view/EmbedCard/views/not-found-view/index.js +39 -0
- package/dist/es2019/view/EmbedCard/views/not-found-view/types.js +1 -0
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +13 -17
- package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +1 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RedesignedInlineCard/ErroredView/index.js +9 -1
- package/dist/es2019/view/RedesignedInlineCard/ForbiddenView/index.js +9 -1
- package/dist/es2019/view/RedesignedInlineCard/index.js +4 -2
- package/dist/esm/extractors/action/extract-lozenge-action-items.js +1 -1
- package/dist/esm/extractors/common/context/extractAccessContext.js +4 -3
- package/dist/esm/extractors/flexible/actions/extract-follow-action.js +1 -1
- package/dist/esm/state/analytics/useLinkClicked.js +1 -1
- package/dist/esm/state/helpers.js +7 -7
- package/dist/esm/state/hooks/use-invoke-client-action/index.js +3 -3
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/index.js +19 -2
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +4 -0
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +4 -0
- package/dist/esm/view/EmbedCard/views/forbidden-view/index.js +22 -26
- package/dist/esm/view/EmbedCard/views/not-found-view/index.js +42 -0
- package/dist/esm/view/EmbedCard/views/not-found-view/types.js +1 -0
- package/dist/esm/view/EmbedModal/components/analytics/index.js +5 -5
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +9 -9
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +2 -2
- package/dist/esm/view/FlexibleCard/index.js +2 -2
- package/dist/esm/view/FlexibleCard/utils.js +2 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +15 -21
- package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +1 -1
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +6 -6
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RedesignedInlineCard/ErroredView/index.js +9 -1
- package/dist/esm/view/RedesignedInlineCard/ForbiddenView/index.js +15 -7
- package/dist/esm/view/RedesignedInlineCard/UnauthorisedView/index.js +1 -1
- package/dist/esm/view/RedesignedInlineCard/index.js +4 -2
- package/dist/esm/view/common/UnauthorisedViewContent.js +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/ForbiddenView.d.ts +4 -0
- package/dist/types/view/EmbedCard/views/NotFoundView.d.ts +4 -0
- package/dist/types/view/EmbedCard/views/forbidden-view/types.d.ts +3 -8
- package/dist/types/view/EmbedCard/views/not-found-view/index.d.ts +4 -0
- package/dist/types/view/EmbedCard/views/not-found-view/types.d.ts +7 -0
- package/dist/types/view/RedesignedInlineCard/ErroredView/index.d.ts +2 -0
- package/dist/types/view/RedesignedInlineCard/ForbiddenView/index.d.ts +2 -0
- package/dist/types/view/types.d.ts +1 -0
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/ForbiddenView.d.ts +4 -0
- package/dist/types-ts4.5/view/EmbedCard/views/NotFoundView.d.ts +4 -0
- package/dist/types-ts4.5/view/EmbedCard/views/forbidden-view/types.d.ts +3 -8
- package/dist/types-ts4.5/view/EmbedCard/views/not-found-view/index.d.ts +4 -0
- package/dist/types-ts4.5/view/EmbedCard/views/not-found-view/types.d.ts +7 -0
- package/dist/types-ts4.5/view/RedesignedInlineCard/ErroredView/index.d.ts +2 -0
- package/dist/types-ts4.5/view/RedesignedInlineCard/ForbiddenView/index.d.ts +2 -0
- package/dist/types-ts4.5/view/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,14 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.mq = exports.gs = exports.br = void 0;
|
|
8
8
|
var _constants = require("@atlaskit/theme/constants");
|
|
9
9
|
var _facepaint = _interopRequireDefault(require("facepaint"));
|
|
10
|
-
var gs = function gs(times) {
|
|
10
|
+
var gs = exports.gs = function gs(times) {
|
|
11
11
|
return "".concat((0, _constants.gridSize)() * times, "px");
|
|
12
12
|
};
|
|
13
|
-
exports.
|
|
14
|
-
var br = function br() {
|
|
13
|
+
var br = exports.br = function br() {
|
|
15
14
|
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
16
15
|
return "".concat((0, _constants.borderRadius)() * times, "px");
|
|
17
16
|
};
|
|
18
|
-
exports.
|
|
19
|
-
var mq = (0, _facepaint.default)(['@media(min-width: 576px)']);
|
|
20
|
-
exports.mq = mq;
|
|
17
|
+
var mq = exports.mq = (0, _facepaint.default)(['@media(min-width: 576px)']);
|
|
@@ -80,7 +80,8 @@ export const extractRequestAccessContextImproved = ({
|
|
|
80
80
|
titleMessageKey: 'request_access_pending_title_crossjoin',
|
|
81
81
|
descriptiveMessageKey: 'request_access_pending_description_crossjoin',
|
|
82
82
|
callToActionMessageKey: 'request_access_pending_crossjoin',
|
|
83
|
-
action: ForbiddenAction(() => window.open(url), 'request_access_pending', messages.request_access_pending_crossjoin)
|
|
83
|
+
action: ForbiddenAction(() => window.open(url), 'request_access_pending', messages.request_access_pending_crossjoin),
|
|
84
|
+
buttonDisabled: true
|
|
84
85
|
};
|
|
85
86
|
case 'DENIED_REQUEST_EXISTS':
|
|
86
87
|
return {
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.
|
|
7
|
+
packageVersion: "26.33.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -16,6 +16,7 @@ import { EmbedCardResolvedView } from './views/ResolvedView';
|
|
|
16
16
|
import { EmbedCardUnauthorisedView } from './views/UnauthorisedView';
|
|
17
17
|
import { EmbedCardErroredView } from './views/ErroredView';
|
|
18
18
|
import ForbiddenView from './views/forbidden-view';
|
|
19
|
+
import NotFoundView from './views/not-found-view';
|
|
19
20
|
export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
20
21
|
url,
|
|
21
22
|
cardState: {
|
|
@@ -134,7 +135,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
134
135
|
}
|
|
135
136
|
if (getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
136
137
|
var _forbiddenViewProps$c, _forbiddenViewProps$c2;
|
|
137
|
-
const
|
|
138
|
+
const accessContext = extractRequestAccessContextImproved({
|
|
138
139
|
jsonLd: cardMetadata,
|
|
139
140
|
url,
|
|
140
141
|
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : ''
|
|
@@ -145,7 +146,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
145
146
|
isSelected: isSelected,
|
|
146
147
|
onAuthorise: handleAuthorize,
|
|
147
148
|
onClick: handleFrameClick,
|
|
148
|
-
|
|
149
|
+
accessContext: accessContext,
|
|
149
150
|
url: forbiddenViewProps.link
|
|
150
151
|
});
|
|
151
152
|
}
|
|
@@ -169,6 +170,22 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
172
|
const notFoundViewProps = extractEmbedProps(data, meta, platform);
|
|
173
|
+
if (getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
174
|
+
var _notFoundViewProps$co, _notFoundViewProps$co2;
|
|
175
|
+
const accessContext = details !== null && details !== void 0 && details.meta ? extractRequestAccessContextImproved({
|
|
176
|
+
jsonLd: details === null || details === void 0 ? void 0 : details.meta,
|
|
177
|
+
url,
|
|
178
|
+
product: (_notFoundViewProps$co = (_notFoundViewProps$co2 = notFoundViewProps.context) === null || _notFoundViewProps$co2 === void 0 ? void 0 : _notFoundViewProps$co2.text) !== null && _notFoundViewProps$co !== void 0 ? _notFoundViewProps$co : ''
|
|
179
|
+
}) : undefined;
|
|
180
|
+
return /*#__PURE__*/React.createElement(NotFoundView, {
|
|
181
|
+
context: notFoundViewProps.context,
|
|
182
|
+
inheritDimensions: inheritDimensions,
|
|
183
|
+
isSelected: isSelected,
|
|
184
|
+
onClick: handleFrameClick,
|
|
185
|
+
accessContext: accessContext,
|
|
186
|
+
url: notFoundViewProps.link
|
|
187
|
+
});
|
|
188
|
+
}
|
|
172
189
|
return /*#__PURE__*/React.createElement(EmbedCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
173
190
|
isSelected: isSelected,
|
|
174
191
|
inheritDimensions: inheritDimensions,
|
|
@@ -3,6 +3,10 @@ import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
|
3
3
|
import { LockImage } from '../constants';
|
|
4
4
|
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
5
5
|
import { ImageIcon } from '../components/ImageIcon';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
8
|
+
* @deprecated Replaced by forbidden-view
|
|
9
|
+
*/
|
|
6
10
|
export const EmbedCardForbiddenView = ({
|
|
7
11
|
link,
|
|
8
12
|
context,
|
|
@@ -3,6 +3,10 @@ import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
|
3
3
|
import { NotFoundImage } from '../constants';
|
|
4
4
|
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
5
5
|
import { ImageIcon } from '../components/ImageIcon';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
8
|
+
* @deprecated Replaced by not-found-view
|
|
9
|
+
*/
|
|
6
10
|
export const EmbedCardNotFoundView = ({
|
|
7
11
|
link,
|
|
8
12
|
context,
|
|
@@ -8,14 +8,16 @@ import { LockImage } from '../../constants';
|
|
|
8
8
|
import UnresolvedView from '../unresolved-view';
|
|
9
9
|
const ForbiddenView = ({
|
|
10
10
|
context,
|
|
11
|
-
inheritDimensions,
|
|
12
|
-
isSelected,
|
|
13
11
|
onAuthorise,
|
|
14
|
-
|
|
15
|
-
requestAccessContext,
|
|
12
|
+
accessContext,
|
|
16
13
|
testId = 'embed-card-forbidden-view',
|
|
17
|
-
|
|
14
|
+
...unresolvedViewProps
|
|
18
15
|
}) => {
|
|
16
|
+
const {
|
|
17
|
+
icon,
|
|
18
|
+
image,
|
|
19
|
+
text = ''
|
|
20
|
+
} = context !== null && context !== void 0 ? context : {};
|
|
19
21
|
const {
|
|
20
22
|
accessType,
|
|
21
23
|
hostname,
|
|
@@ -23,7 +25,7 @@ const ForbiddenView = ({
|
|
|
23
25
|
descriptiveMessageKey,
|
|
24
26
|
callToActionMessageKey,
|
|
25
27
|
action
|
|
26
|
-
} =
|
|
28
|
+
} = accessContext !== null && accessContext !== void 0 ? accessContext : {};
|
|
27
29
|
const values = useMemo(() => {
|
|
28
30
|
var _context$text;
|
|
29
31
|
const product = (_context$text = context === null || context === void 0 ? void 0 : context.text) !== null && _context$text !== void 0 ? _context$text : '';
|
|
@@ -33,10 +35,6 @@ const ForbiddenView = ({
|
|
|
33
35
|
hostname: /*#__PURE__*/React.createElement("b", null, hostname)
|
|
34
36
|
};
|
|
35
37
|
}, [hostname, context === null || context === void 0 ? void 0 : context.text]);
|
|
36
|
-
const image = useMemo(() => {
|
|
37
|
-
var _context$image;
|
|
38
|
-
return (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : LockImage;
|
|
39
|
-
}, [context === null || context === void 0 ? void 0 : context.image]);
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
40
|
* if there is a request access context, but no action to perform, do not show any button.
|
|
@@ -58,22 +56,18 @@ const ForbiddenView = ({
|
|
|
58
56
|
values: values
|
|
59
57
|
})));
|
|
60
58
|
}, [accessType, action === null || action === void 0 ? void 0 : action.id, action === null || action === void 0 ? void 0 : action.promise, callToActionMessageKey, onAuthorise, values]);
|
|
61
|
-
return /*#__PURE__*/React.createElement(UnresolvedView, {
|
|
62
|
-
icon:
|
|
63
|
-
image: image,
|
|
64
|
-
inheritDimensions: inheritDimensions,
|
|
65
|
-
isSelected: isSelected,
|
|
66
|
-
onClick: onClick,
|
|
59
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, unresolvedViewProps, {
|
|
60
|
+
icon: icon,
|
|
61
|
+
image: image !== null && image !== void 0 ? image : LockImage,
|
|
67
62
|
testId: testId,
|
|
68
|
-
text:
|
|
63
|
+
text: text,
|
|
69
64
|
title: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, toMessage(messages.invalid_permissions, titleMessageKey), {
|
|
70
65
|
values: values
|
|
71
66
|
})),
|
|
72
67
|
description: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, toMessage(messages.invalid_permissions_description, descriptiveMessageKey), {
|
|
73
68
|
values: values
|
|
74
69
|
})),
|
|
75
|
-
button: button
|
|
76
|
-
|
|
77
|
-
});
|
|
70
|
+
button: button
|
|
71
|
+
}));
|
|
78
72
|
};
|
|
79
73
|
export default ForbiddenView;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { messages } from '../../../../messages';
|
|
5
|
+
import { toMessage } from '../../../../utils/intl-utils';
|
|
6
|
+
import { NotFoundImage } from '../../constants';
|
|
7
|
+
import UnresolvedView from '../unresolved-view';
|
|
8
|
+
const NotFoundView = ({
|
|
9
|
+
context,
|
|
10
|
+
accessContext,
|
|
11
|
+
testId = 'embed-card-not-found-view',
|
|
12
|
+
...unresolvedViewProps
|
|
13
|
+
}) => {
|
|
14
|
+
const {
|
|
15
|
+
icon,
|
|
16
|
+
image,
|
|
17
|
+
text = ''
|
|
18
|
+
} = context !== null && context !== void 0 ? context : {};
|
|
19
|
+
const {
|
|
20
|
+
titleMessageKey,
|
|
21
|
+
descriptiveMessageKey
|
|
22
|
+
} = accessContext !== null && accessContext !== void 0 ? accessContext : {};
|
|
23
|
+
const values = useMemo(() => ({
|
|
24
|
+
product: text
|
|
25
|
+
}), [text]);
|
|
26
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, unresolvedViewProps, {
|
|
27
|
+
icon: icon,
|
|
28
|
+
image: image !== null && image !== void 0 ? image : NotFoundImage,
|
|
29
|
+
testId: testId,
|
|
30
|
+
text: text,
|
|
31
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, toMessage(messages.not_found_title, titleMessageKey), {
|
|
32
|
+
values: values
|
|
33
|
+
})),
|
|
34
|
+
description: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, toMessage(messages.not_found_description, descriptiveMessageKey), {
|
|
35
|
+
values: values
|
|
36
|
+
}))
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
export default NotFoundView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -144,7 +144,7 @@ const HoverCardContent = ({
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
if (getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
147
|
-
if (cardState.status === 'forbidden') {
|
|
147
|
+
if (cardState.status === 'forbidden' || cardState.status === 'not_found') {
|
|
148
148
|
return jsx(HoverCardForbiddenView, {
|
|
149
149
|
flexibleCardProps: flexibleCardProps
|
|
150
150
|
});
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
5
5
|
import { messages } from '../../../../../messages';
|
|
6
6
|
import { CustomBlock, PreviewBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
|
+
import Button from '@atlaskit/button';
|
|
7
8
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
8
9
|
import { connectButtonStyles, mainTextStyles, titleBlockStyles } from './styled';
|
|
9
|
-
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
10
|
-
import { ActionName } from '../../../../../constants';
|
|
11
10
|
import { getPreviewBlockStyles } from '../../../styled';
|
|
12
11
|
import { extractRequestAccessContextImproved } from '../../../../../extractors/common/context/extractAccessContext';
|
|
13
12
|
const HoverCardForbiddenView = ({
|
|
14
13
|
flexibleCardProps,
|
|
15
14
|
testId = 'hover-card-forbidden-view'
|
|
16
15
|
}) => {
|
|
17
|
-
var _cardState$details, _cardState$details2, _extractProvider$text, _extractProvider;
|
|
16
|
+
var _cardState$details, _cardState$details2, _extractProvider$text, _extractProvider, _extractRequestAccess;
|
|
18
17
|
const {
|
|
19
18
|
cardState,
|
|
20
19
|
url
|
|
@@ -22,21 +21,17 @@ const HoverCardForbiddenView = ({
|
|
|
22
21
|
const data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
23
22
|
const meta = (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.meta;
|
|
24
23
|
const product = (_extractProvider$text = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text) !== null && _extractProvider$text !== void 0 ? _extractProvider$text : '';
|
|
25
|
-
const hostname = new URL(url).hostname;
|
|
24
|
+
const hostname = /*#__PURE__*/React.createElement("b", null, new URL(url).hostname);
|
|
26
25
|
const {
|
|
27
26
|
action,
|
|
28
27
|
descriptiveMessageKey,
|
|
29
|
-
titleMessageKey
|
|
30
|
-
|
|
28
|
+
titleMessageKey,
|
|
29
|
+
buttonDisabled
|
|
30
|
+
} = (_extractRequestAccess = extractRequestAccessContextImproved({
|
|
31
31
|
jsonLd: meta,
|
|
32
32
|
url,
|
|
33
33
|
product
|
|
34
|
-
});
|
|
35
|
-
const actions = useMemo(() => [{
|
|
36
|
-
name: ActionName.CustomAction,
|
|
37
|
-
content: action === null || action === void 0 ? void 0 : action.text,
|
|
38
|
-
onClick: action === null || action === void 0 ? void 0 : action.promise
|
|
39
|
-
}], [action]);
|
|
34
|
+
})) !== null && _extractRequestAccess !== void 0 ? _extractRequestAccess : {};
|
|
40
35
|
if (!titleMessageKey || !descriptiveMessageKey) {
|
|
41
36
|
return null;
|
|
42
37
|
}
|
|
@@ -64,9 +59,10 @@ const HoverCardForbiddenView = ({
|
|
|
64
59
|
}))), action && /*#__PURE__*/React.createElement(CustomBlock, {
|
|
65
60
|
overrideCss: connectButtonStyles,
|
|
66
61
|
testId: `${testId}-button`
|
|
67
|
-
}, /*#__PURE__*/React.createElement(
|
|
68
|
-
|
|
69
|
-
appearance: "primary"
|
|
70
|
-
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
63
|
+
onClick: action === null || action === void 0 ? void 0 : action.promise,
|
|
64
|
+
appearance: "primary",
|
|
65
|
+
isDisabled: buttonDisabled
|
|
66
|
+
}, action === null || action === void 0 ? void 0 : action.text)));
|
|
71
67
|
};
|
|
72
68
|
export default HoverCardForbiddenView;
|
|
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
const PACKAGE_DATA = {
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.
|
|
11
|
+
packageVersion: "26.33.0",
|
|
12
12
|
componentName: 'linkUrl'
|
|
13
13
|
};
|
|
14
14
|
const Link = withLinkClickedEvent('a');
|
|
@@ -10,6 +10,8 @@ import { messages } from '../../../messages';
|
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import { IconStyledButton } from '../styled';
|
|
12
12
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
13
|
+
import { HoverCard } from '../../HoverCard';
|
|
14
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
13
15
|
export class InlineCardErroredView extends React.Component {
|
|
14
16
|
constructor(...args) {
|
|
15
17
|
super(...args);
|
|
@@ -46,7 +48,7 @@ export class InlineCardErroredView extends React.Component {
|
|
|
46
48
|
icon,
|
|
47
49
|
message
|
|
48
50
|
} = this.props;
|
|
49
|
-
|
|
51
|
+
const content = /*#__PURE__*/React.createElement(Frame, {
|
|
50
52
|
testId: testId,
|
|
51
53
|
isSelected: isSelected,
|
|
52
54
|
ref: this.frameRef
|
|
@@ -62,5 +64,11 @@ export class InlineCardErroredView extends React.Component {
|
|
|
62
64
|
onClick: onClick,
|
|
63
65
|
rightSide: message
|
|
64
66
|
}), this.renderActionButton());
|
|
67
|
+
if (this.props.showHoverPreview && getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
69
|
+
url: url
|
|
70
|
+
}, content);
|
|
71
|
+
}
|
|
72
|
+
return content;
|
|
65
73
|
}
|
|
66
74
|
}
|
|
@@ -13,6 +13,8 @@ import { IconStyledButton } from '../styled';
|
|
|
13
13
|
import Lozenge from '@atlaskit/lozenge';
|
|
14
14
|
import { LozengeWrapper } from '../IconAndTitleLayout/styled';
|
|
15
15
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
16
|
+
import { HoverCard } from '../../HoverCard';
|
|
17
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
16
18
|
const FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
17
19
|
label: "error",
|
|
18
20
|
size: "small",
|
|
@@ -92,7 +94,7 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
92
94
|
isSelected,
|
|
93
95
|
testId = 'inline-card-forbidden-view'
|
|
94
96
|
} = this.props;
|
|
95
|
-
|
|
97
|
+
const content = /*#__PURE__*/React.createElement(Frame, {
|
|
96
98
|
testId: testId,
|
|
97
99
|
isSelected: isSelected,
|
|
98
100
|
ref: this.frameRef
|
|
@@ -103,5 +105,11 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
103
105
|
onClick: onClick,
|
|
104
106
|
titleColor: `var(--ds-text-subtle, ${N500})`
|
|
105
107
|
}), this.renderActionButton());
|
|
108
|
+
if (this.props.showHoverPreview && getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
109
|
+
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
110
|
+
url: url
|
|
111
|
+
}, content);
|
|
112
|
+
}
|
|
113
|
+
return content;
|
|
106
114
|
}
|
|
107
115
|
}
|
|
@@ -112,7 +112,8 @@ export const InlineCard = ({
|
|
|
112
112
|
onClick: handleFrameClick,
|
|
113
113
|
onAuthorise: handleAuthorize,
|
|
114
114
|
testId: testIdWithStatus,
|
|
115
|
-
requestAccessContext: requestAccessContext
|
|
115
|
+
requestAccessContext: requestAccessContext,
|
|
116
|
+
showHoverPreview: showHoverPreview
|
|
116
117
|
});
|
|
117
118
|
case 'not_found':
|
|
118
119
|
if (onError) {
|
|
@@ -128,7 +129,8 @@ export const InlineCard = ({
|
|
|
128
129
|
isSelected: isSelected,
|
|
129
130
|
message: "Can't find link",
|
|
130
131
|
onClick: handleFrameClick,
|
|
131
|
-
testId: testIdWithStatus || 'inline-card-not-found-view'
|
|
132
|
+
testId: testIdWithStatus || 'inline-card-not-found-view',
|
|
133
|
+
showHoverPreview: showHoverPreview
|
|
132
134
|
});
|
|
133
135
|
case 'fallback':
|
|
134
136
|
case 'errored':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var extractLozengeActionItems = function extractLozengeActionItems(response) {
|
|
2
2
|
var _response$transitions, _response$transitions2;
|
|
3
|
-
var items = (_response$transitions = response === null || response === void 0
|
|
3
|
+
var items = (_response$transitions = response === null || response === void 0 || (_response$transitions2 = response.transitions) === null || _response$transitions2 === void 0 ? void 0 : _response$transitions2.map(function (_ref) {
|
|
4
4
|
var _ref2;
|
|
5
5
|
var appearance = _ref.appearance,
|
|
6
6
|
id = _ref.id,
|
|
@@ -9,7 +9,7 @@ export var extractRequestAccessContext = function extractRequestAccessContext(_r
|
|
|
9
9
|
var jsonLd = _ref.jsonLd,
|
|
10
10
|
url = _ref.url,
|
|
11
11
|
context = _ref.context;
|
|
12
|
-
switch (jsonLd === null || jsonLd === void 0
|
|
12
|
+
switch (jsonLd === null || jsonLd === void 0 || (_jsonLd$requestAccess = jsonLd.requestAccess) === null || _jsonLd$requestAccess === void 0 ? void 0 : _jsonLd$requestAccess.accessType) {
|
|
13
13
|
case 'DIRECT_ACCESS':
|
|
14
14
|
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
15
15
|
callToActionMessageKey: 'click_to_join',
|
|
@@ -54,7 +54,7 @@ export var extractRequestAccessContextImproved = function extractRequestAccessCo
|
|
|
54
54
|
var requestAccess = jsonLd !== null && jsonLd !== void 0 && jsonLd.requestAccess ? _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
55
55
|
hostname: extractHostname(url)
|
|
56
56
|
}) : undefined;
|
|
57
|
-
switch (jsonLd === null || jsonLd === void 0
|
|
57
|
+
switch (jsonLd === null || jsonLd === void 0 || (_jsonLd$requestAccess2 = jsonLd.requestAccess) === null || _jsonLd$requestAccess2 === void 0 ? void 0 : _jsonLd$requestAccess2.accessType) {
|
|
58
58
|
case 'DIRECT_ACCESS':
|
|
59
59
|
return _objectSpread(_objectSpread({}, requestAccess), {}, {
|
|
60
60
|
titleMessageKey: 'direct_access_title_crossjoin',
|
|
@@ -82,7 +82,8 @@ export var extractRequestAccessContextImproved = function extractRequestAccessCo
|
|
|
82
82
|
callToActionMessageKey: 'request_access_pending_crossjoin',
|
|
83
83
|
action: ForbiddenAction(function () {
|
|
84
84
|
return window.open(url);
|
|
85
|
-
}, 'request_access_pending', messages.request_access_pending_crossjoin)
|
|
85
|
+
}, 'request_access_pending', messages.request_access_pending_crossjoin),
|
|
86
|
+
buttonDisabled: true
|
|
86
87
|
});
|
|
87
88
|
case 'DENIED_REQUEST_EXISTS':
|
|
88
89
|
return _objectSpread(_objectSpread({}, requestAccess), {}, {
|
|
@@ -16,7 +16,7 @@ var extractFollowAction = function extractFollowAction(response, showServerActio
|
|
|
16
16
|
var action = actions.find(function (item) {
|
|
17
17
|
if ((item === null || item === void 0 ? void 0 : item.name) === 'UpdateAction') {
|
|
18
18
|
var _dataUpdateAction;
|
|
19
|
-
var actionName = item === null || item === void 0
|
|
19
|
+
var actionName = item === null || item === void 0 || (_dataUpdateAction = item.dataUpdateAction) === null || _dataUpdateAction === void 0 ? void 0 : _dataUpdateAction.name;
|
|
20
20
|
return actionName === SmartLinkActionType.FollowEntityAction || actionName === SmartLinkActionType.UnfollowEntityAction;
|
|
21
21
|
}
|
|
22
22
|
return false;
|
|
@@ -15,7 +15,7 @@ export var useLinkClicked = function useLinkClicked(handler, predicate) {
|
|
|
15
15
|
args[_key] = arguments[_key];
|
|
16
16
|
}
|
|
17
17
|
var event = args[0];
|
|
18
|
-
handler === null || handler === void 0
|
|
18
|
+
handler === null || handler === void 0 || handler.apply(null, args);
|
|
19
19
|
if (!predicate || predicate !== null && predicate !== void 0 && predicate(event)) {
|
|
20
20
|
fireLinkClickedEvent(createAnalyticsEvent)(event);
|
|
21
21
|
}
|
|
@@ -17,23 +17,23 @@ export var getClickUrl = function getClickUrl(url, jsonLd) {
|
|
|
17
17
|
};
|
|
18
18
|
export var getDefinitionId = function getDefinitionId(details) {
|
|
19
19
|
var _details$meta;
|
|
20
|
-
return details === null || details === void 0
|
|
20
|
+
return details === null || details === void 0 || (_details$meta = details.meta) === null || _details$meta === void 0 ? void 0 : _details$meta.definitionId;
|
|
21
21
|
};
|
|
22
22
|
export var getExtensionKey = function getExtensionKey(details) {
|
|
23
23
|
var _details$meta2;
|
|
24
|
-
return details === null || details === void 0
|
|
24
|
+
return details === null || details === void 0 || (_details$meta2 = details.meta) === null || _details$meta2 === void 0 ? void 0 : _details$meta2.key;
|
|
25
25
|
};
|
|
26
26
|
export var getResourceType = function getResourceType(details) {
|
|
27
27
|
var _details$meta3;
|
|
28
|
-
return details === null || details === void 0
|
|
28
|
+
return details === null || details === void 0 || (_details$meta3 = details.meta) === null || _details$meta3 === void 0 ? void 0 : _details$meta3.resourceType;
|
|
29
29
|
};
|
|
30
30
|
export var getProduct = function getProduct(details) {
|
|
31
31
|
var _details$meta4;
|
|
32
|
-
return details === null || details === void 0
|
|
32
|
+
return details === null || details === void 0 || (_details$meta4 = details.meta) === null || _details$meta4 === void 0 ? void 0 : _details$meta4.product;
|
|
33
33
|
};
|
|
34
34
|
export var getSubproduct = function getSubproduct(details) {
|
|
35
35
|
var _details$meta5;
|
|
36
|
-
return details === null || details === void 0
|
|
36
|
+
return details === null || details === void 0 || (_details$meta5 = details.meta) === null || _details$meta5 === void 0 ? void 0 : _details$meta5.subproduct;
|
|
37
37
|
};
|
|
38
38
|
export var getServices = function getServices(details) {
|
|
39
39
|
return details && details.meta.auth || [];
|
|
@@ -50,8 +50,8 @@ export var isVisible = function isVisible(_ref2) {
|
|
|
50
50
|
return visibility === 'restricted' || visibility === 'public';
|
|
51
51
|
};
|
|
52
52
|
export var getStatusDetails = function getStatusDetails(details) {
|
|
53
|
-
var _details$meta6
|
|
54
|
-
return details === null || details === void 0
|
|
53
|
+
var _details$meta6;
|
|
54
|
+
return details === null || details === void 0 || (_details$meta6 = details.meta) === null || _details$meta6 === void 0 || (_details$meta6 = _details$meta6.requestAccess) === null || _details$meta6 === void 0 ? void 0 : _details$meta6.accessType;
|
|
55
55
|
};
|
|
56
56
|
export var isFinalState = function isFinalState(status) {
|
|
57
57
|
return ['unauthorized', 'forbidden', 'errored', 'resolved', 'not_found'].indexOf(status) > -1;
|
|
@@ -31,7 +31,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
// Begin analytics instrumentation.
|
|
34
|
-
analytics === null || analytics === void 0
|
|
34
|
+
analytics === null || analytics === void 0 || analytics.ui.actionClickedEvent({
|
|
35
35
|
actionType: actionType,
|
|
36
36
|
display: display
|
|
37
37
|
});
|
|
@@ -43,7 +43,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
43
43
|
result = _context.sent;
|
|
44
44
|
measure.mark(markName, 'resolved');
|
|
45
45
|
succeedUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
|
|
46
|
-
analytics === null || analytics === void 0
|
|
46
|
+
analytics === null || analytics === void 0 || analytics.operational.invokeSucceededEvent({
|
|
47
47
|
actionType: actionType,
|
|
48
48
|
display: display
|
|
49
49
|
});
|
|
@@ -54,7 +54,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
54
54
|
measure.mark(markName, 'errored');
|
|
55
55
|
failUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
|
|
56
56
|
reason = typeof _context.t0 === 'string' ? _context.t0 : _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message;
|
|
57
|
-
analytics === null || analytics === void 0
|
|
57
|
+
analytics === null || analytics === void 0 || analytics.operational.invokeFailedEvent({
|
|
58
58
|
actionType: actionType,
|
|
59
59
|
display: display,
|
|
60
60
|
reason: reason
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.33.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -16,6 +16,7 @@ import { EmbedCardResolvedView } from './views/ResolvedView';
|
|
|
16
16
|
import { EmbedCardUnauthorisedView } from './views/UnauthorisedView';
|
|
17
17
|
import { EmbedCardErroredView } from './views/ErroredView';
|
|
18
18
|
import ForbiddenView from './views/forbidden-view';
|
|
19
|
+
import NotFoundView from './views/not-found-view';
|
|
19
20
|
export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
20
21
|
var _details$meta, _forbiddenViewProps$c3;
|
|
21
22
|
var url = _ref.url,
|
|
@@ -132,7 +133,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
132
133
|
}
|
|
133
134
|
if (getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
134
135
|
var _forbiddenViewProps$c, _forbiddenViewProps$c2;
|
|
135
|
-
var
|
|
136
|
+
var accessContext = extractRequestAccessContextImproved({
|
|
136
137
|
jsonLd: cardMetadata,
|
|
137
138
|
url: url,
|
|
138
139
|
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : ''
|
|
@@ -143,7 +144,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
143
144
|
isSelected: isSelected,
|
|
144
145
|
onAuthorise: handleAuthorize,
|
|
145
146
|
onClick: handleFrameClick,
|
|
146
|
-
|
|
147
|
+
accessContext: accessContext,
|
|
147
148
|
url: forbiddenViewProps.link
|
|
148
149
|
});
|
|
149
150
|
}
|
|
@@ -167,6 +168,22 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
167
168
|
});
|
|
168
169
|
}
|
|
169
170
|
var notFoundViewProps = extractEmbedProps(data, meta, platform);
|
|
171
|
+
if (getBooleanFF('platform.linking-platform.smart-card.cross-join')) {
|
|
172
|
+
var _notFoundViewProps$co, _notFoundViewProps$co2;
|
|
173
|
+
var _accessContext = details !== null && details !== void 0 && details.meta ? extractRequestAccessContextImproved({
|
|
174
|
+
jsonLd: details === null || details === void 0 ? void 0 : details.meta,
|
|
175
|
+
url: url,
|
|
176
|
+
product: (_notFoundViewProps$co = (_notFoundViewProps$co2 = notFoundViewProps.context) === null || _notFoundViewProps$co2 === void 0 ? void 0 : _notFoundViewProps$co2.text) !== null && _notFoundViewProps$co !== void 0 ? _notFoundViewProps$co : ''
|
|
177
|
+
}) : undefined;
|
|
178
|
+
return /*#__PURE__*/React.createElement(NotFoundView, {
|
|
179
|
+
context: notFoundViewProps.context,
|
|
180
|
+
inheritDimensions: inheritDimensions,
|
|
181
|
+
isSelected: isSelected,
|
|
182
|
+
onClick: handleFrameClick,
|
|
183
|
+
accessContext: _accessContext,
|
|
184
|
+
url: notFoundViewProps.link
|
|
185
|
+
});
|
|
186
|
+
}
|
|
170
187
|
return /*#__PURE__*/React.createElement(EmbedCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
171
188
|
isSelected: isSelected,
|
|
172
189
|
inheritDimensions: inheritDimensions,
|
|
@@ -3,6 +3,10 @@ import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
|
3
3
|
import { LockImage } from '../constants';
|
|
4
4
|
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
5
5
|
import { ImageIcon } from '../components/ImageIcon';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
8
|
+
* @deprecated Replaced by forbidden-view
|
|
9
|
+
*/
|
|
6
10
|
export var EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
|
|
7
11
|
var _action$promise;
|
|
8
12
|
var link = _ref.link,
|
|
@@ -3,6 +3,10 @@ import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
|
3
3
|
import { NotFoundImage } from '../constants';
|
|
4
4
|
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
5
5
|
import { ImageIcon } from '../components/ImageIcon';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
8
|
+
* @deprecated Replaced by not-found-view
|
|
9
|
+
*/
|
|
6
10
|
export var EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
|
|
7
11
|
var link = _ref.link,
|
|
8
12
|
context = _ref.context,
|