@atlaskit/smart-card 26.31.0 → 26.32.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 +11 -7
- 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 +3 -6
- package/dist/cjs/view/HoverCard/components/ImagePreview.js +1 -2
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +1 -2
- 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 +2 -3
- package/dist/cjs/view/RedesignedInlineCard/ForbiddenView/index.js +8 -9
- 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 +2 -3
- 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 +7 -0
- 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/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/action/extract-lozenge-action-items.js +1 -1
- package/dist/esm/extractors/common/context/extractAccessContext.js +8 -2
- 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/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/ForbiddenView/index.js +6 -6
- package/dist/esm/view/RedesignedInlineCard/UnauthorisedView/index.js +1 -1
- 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-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/package.json +1 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractState = void 0;
|
|
7
7
|
var _utils = require("./utils");
|
|
8
|
-
var extractState = function extractState(jsonLd) {
|
|
8
|
+
var extractState = exports.extractState = function extractState(jsonLd) {
|
|
9
9
|
var state = jsonLd['atlassian:state'];
|
|
10
10
|
if (state) {
|
|
11
11
|
if (typeof state === 'string') {
|
|
@@ -32,5 +32,4 @@ var extractState = function extractState(jsonLd) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
};
|
|
36
|
-
exports.extractState = extractState;
|
|
35
|
+
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractTag = void 0;
|
|
7
7
|
var _utils = require("./utils");
|
|
8
|
-
var extractTag = function extractTag(jsonLd) {
|
|
8
|
+
var extractTag = exports.extractTag = function extractTag(jsonLd) {
|
|
9
9
|
var tag = jsonLd.tag;
|
|
10
10
|
if (tag) {
|
|
11
11
|
if (typeof tag === 'string') {
|
|
@@ -25,7 +25,6 @@ var extractTag = function extractTag(jsonLd) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
exports.extractTag = extractTag;
|
|
29
28
|
var extractTagItem = function extractTagItem(tag) {
|
|
30
29
|
if (typeof tag === 'string') {
|
|
31
30
|
return {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractTaskStatus = void 0;
|
|
7
|
-
var extractTaskStatus = function extractTaskStatus(jsonLd) {
|
|
7
|
+
var extractTaskStatus = exports.extractTaskStatus = function extractTaskStatus(jsonLd) {
|
|
8
8
|
var taskStatus = jsonLd['atlassian:taskStatus'];
|
|
9
9
|
if (taskStatus && taskStatus.name) {
|
|
10
10
|
return {
|
|
@@ -12,5 +12,4 @@ var extractTaskStatus = function extractTaskStatus(jsonLd) {
|
|
|
12
12
|
appearance: 'success'
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
};
|
|
16
|
-
exports.extractTaskStatus = extractTaskStatus;
|
|
15
|
+
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractTaskType = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
-
var extractTaskType = function extractTaskType(jsonLd) {
|
|
8
|
+
var extractTaskType = exports.extractTaskType = function extractTaskType(jsonLd) {
|
|
9
9
|
// TODO: Remove once Jira migrate to the correct type.
|
|
10
10
|
var taskType = jsonLd['atlassian:taskType'] || jsonLd.taskType;
|
|
11
11
|
if (taskType) {
|
|
@@ -25,5 +25,4 @@ var extractTaskType = function extractTaskType(jsonLd) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
};
|
|
29
|
-
exports.extractTaskType = extractTaskType;
|
|
28
|
+
};
|
|
@@ -5,11 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isValidAppearance = exports.VALID_STATES = exports.OMIT_STATES = void 0;
|
|
7
7
|
var VALID_APPEARANCES = ['default', 'success', 'removed', 'inprogress', 'new', 'moved'];
|
|
8
|
-
var isValidAppearance = function isValidAppearance(appearance) {
|
|
8
|
+
var isValidAppearance = exports.isValidAppearance = function isValidAppearance(appearance) {
|
|
9
9
|
return VALID_APPEARANCES.indexOf(appearance) !== -1;
|
|
10
10
|
};
|
|
11
|
-
exports.
|
|
12
|
-
var VALID_STATES = {
|
|
11
|
+
var VALID_STATES = exports.VALID_STATES = {
|
|
13
12
|
open: 'inprogress',
|
|
14
13
|
merged: 'success',
|
|
15
14
|
declined: 'removed',
|
|
@@ -17,6 +16,4 @@ var VALID_STATES = {
|
|
|
17
16
|
draft: 'inprogress',
|
|
18
17
|
archived: 'default'
|
|
19
18
|
};
|
|
20
|
-
exports.
|
|
21
|
-
var OMIT_STATES = ['current'];
|
|
22
|
-
exports.OMIT_STATES = OMIT_STATES;
|
|
19
|
+
var OMIT_STATES = exports.OMIT_STATES = ['current'];
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractIsSupportTheming = void 0;
|
|
7
7
|
var _constants = require("../../constants");
|
|
8
|
-
var extractIsSupportTheming = function extractIsSupportTheming(meta) {
|
|
8
|
+
var extractIsSupportTheming = exports.extractIsSupportTheming = function extractIsSupportTheming(meta) {
|
|
9
9
|
return Boolean((meta === null || meta === void 0 ? void 0 : meta.key) && _constants.PROVIDER_KEYS_WITH_THEMING.includes(meta.key));
|
|
10
|
-
};
|
|
11
|
-
exports.extractIsSupportTheming = extractIsSupportTheming;
|
|
10
|
+
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractIsTrusted = void 0;
|
|
7
7
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
|
-
var extractIsTrusted = function extractIsTrusted(meta) {
|
|
8
|
+
var extractIsTrusted = exports.extractIsTrusted = function extractIsTrusted(meta) {
|
|
9
9
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.fix-is-trusted-pop')) {
|
|
10
10
|
if (!(meta !== null && meta !== void 0 && meta.key)) {
|
|
11
11
|
return false;
|
|
@@ -13,5 +13,4 @@ var extractIsTrusted = function extractIsTrusted(meta) {
|
|
|
13
13
|
return !['iframely-object-provider', 'public-object-provider'].includes(meta.key);
|
|
14
14
|
}
|
|
15
15
|
return Boolean((meta === null || meta === void 0 ? void 0 : meta.key) && meta.key !== 'iframely-object-provider');
|
|
16
|
-
};
|
|
17
|
-
exports.extractIsTrusted = extractIsTrusted;
|
|
16
|
+
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractSummary = void 0;
|
|
7
|
-
var extractSummary = function extractSummary(jsonLd) {
|
|
7
|
+
var extractSummary = exports.extractSummary = function extractSummary(jsonLd) {
|
|
8
8
|
return jsonLd.summary;
|
|
9
|
-
};
|
|
10
|
-
exports.extractSummary = extractSummary;
|
|
9
|
+
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.extractTitleTextColor = void 0;
|
|
7
7
|
var _priority = require("../icon/priority");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
9
|
+
var extractTitleTextColor = exports.extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
10
10
|
var type = jsonLd['@type'];
|
|
11
11
|
if (Array.isArray(type)) {
|
|
12
12
|
var highestPriorityType = type.sort(function (a, b) {
|
|
@@ -19,5 +19,4 @@ var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
|
19
19
|
return undefined;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
};
|
|
23
|
-
exports.extractTitleTextColor = extractTitleTextColor;
|
|
22
|
+
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractVisitUrl = void 0;
|
|
7
|
-
var extractVisitUrl = function extractVisitUrl(jsonLd) {
|
|
7
|
+
var extractVisitUrl = exports.extractVisitUrl = function extractVisitUrl(jsonLd) {
|
|
8
8
|
return jsonLd['atlassian:visitUrl'];
|
|
9
|
-
};
|
|
10
|
-
exports.extractVisitUrl = extractVisitUrl;
|
|
9
|
+
};
|
|
@@ -7,7 +7,7 @@ exports.extractTitlePrefix = void 0;
|
|
|
7
7
|
var sanitizeEmojiValue = function sanitizeEmojiValue(value) {
|
|
8
8
|
return value && value.replace(/['"]+/g, '').replace(/null/, '') || '';
|
|
9
9
|
};
|
|
10
|
-
var extractTitlePrefix = function extractTitlePrefix(jsonLd, renderers, type) {
|
|
10
|
+
var extractTitlePrefix = exports.extractTitlePrefix = function extractTitlePrefix(jsonLd, renderers, type) {
|
|
11
11
|
var prefix = jsonLd['atlassian:titlePrefix'];
|
|
12
12
|
if (prefix) {
|
|
13
13
|
// extract and return Emoji Title Prefix
|
|
@@ -21,5 +21,4 @@ var extractTitlePrefix = function extractTitlePrefix(jsonLd, renderers, type) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
return undefined;
|
|
24
|
-
};
|
|
25
|
-
exports.extractTitlePrefix = extractTitlePrefix;
|
|
24
|
+
};
|
|
@@ -4,32 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PROVIDER_KEYS_WITH_THEMING = exports.JIRA_TASK = exports.JIRA_SUB_TASK = exports.JIRA_STORY = exports.JIRA_SERVICE_REQUEST = exports.JIRA_PROBLEM = exports.JIRA_INCIDENT = exports.JIRA_GENERATOR_ID = exports.JIRA_EPIC = exports.JIRA_CUSTOM_TASK_TYPE = exports.JIRA_CHANGE = exports.JIRA_BUG = exports.CONFLUENCE_GENERATOR_ID = void 0;
|
|
7
|
-
var CONFLUENCE_GENERATOR_ID = 'https://www.atlassian.com/#Confluence';
|
|
8
|
-
exports.
|
|
9
|
-
var JIRA_GENERATOR_ID = 'https://www.atlassian.com/#Jira';
|
|
7
|
+
var CONFLUENCE_GENERATOR_ID = exports.CONFLUENCE_GENERATOR_ID = 'https://www.atlassian.com/#Confluence';
|
|
8
|
+
var JIRA_GENERATOR_ID = exports.JIRA_GENERATOR_ID = 'https://www.atlassian.com/#Jira';
|
|
10
9
|
// To support icons for all Jira task types.
|
|
11
|
-
exports.
|
|
12
|
-
var
|
|
13
|
-
exports.
|
|
14
|
-
var
|
|
15
|
-
exports.
|
|
16
|
-
var
|
|
17
|
-
exports.
|
|
18
|
-
var
|
|
19
|
-
exports.
|
|
20
|
-
var
|
|
21
|
-
exports.JIRA_EPIC = JIRA_EPIC;
|
|
22
|
-
var JIRA_INCIDENT = 'JiraIncident';
|
|
23
|
-
exports.JIRA_INCIDENT = JIRA_INCIDENT;
|
|
24
|
-
var JIRA_SERVICE_REQUEST = 'JiraServiceRequest';
|
|
25
|
-
exports.JIRA_SERVICE_REQUEST = JIRA_SERVICE_REQUEST;
|
|
26
|
-
var JIRA_CHANGE = 'JiraChange';
|
|
27
|
-
exports.JIRA_CHANGE = JIRA_CHANGE;
|
|
28
|
-
var JIRA_PROBLEM = 'JiraProblem';
|
|
29
|
-
exports.JIRA_PROBLEM = JIRA_PROBLEM;
|
|
30
|
-
var JIRA_CUSTOM_TASK_TYPE = 'JiraCustomTaskType';
|
|
10
|
+
var JIRA_TASK = exports.JIRA_TASK = 'JiraTask';
|
|
11
|
+
var JIRA_SUB_TASK = exports.JIRA_SUB_TASK = 'JiraSubTask';
|
|
12
|
+
var JIRA_STORY = exports.JIRA_STORY = 'JiraStory';
|
|
13
|
+
var JIRA_BUG = exports.JIRA_BUG = 'JiraBug';
|
|
14
|
+
var JIRA_EPIC = exports.JIRA_EPIC = 'JiraEpic';
|
|
15
|
+
var JIRA_INCIDENT = exports.JIRA_INCIDENT = 'JiraIncident';
|
|
16
|
+
var JIRA_SERVICE_REQUEST = exports.JIRA_SERVICE_REQUEST = 'JiraServiceRequest';
|
|
17
|
+
var JIRA_CHANGE = exports.JIRA_CHANGE = 'JiraChange';
|
|
18
|
+
var JIRA_PROBLEM = exports.JIRA_PROBLEM = 'JiraProblem';
|
|
19
|
+
var JIRA_CUSTOM_TASK_TYPE = exports.JIRA_CUSTOM_TASK_TYPE = 'JiraCustomTaskType';
|
|
31
20
|
|
|
32
21
|
//List of provider keys that support theme modes for the embedded content.
|
|
33
|
-
exports.
|
|
34
|
-
var PROVIDER_KEYS_WITH_THEMING = ['jira-object-provider', 'confluence-object-provider', 'watermelon-object-provider'];
|
|
35
|
-
exports.PROVIDER_KEYS_WITH_THEMING = PROVIDER_KEYS_WITH_THEMING;
|
|
22
|
+
var PROVIDER_KEYS_WITH_THEMING = exports.PROVIDER_KEYS_WITH_THEMING = ['jira-object-provider', 'confluence-object-provider', 'watermelon-object-provider'];
|
|
@@ -19,7 +19,7 @@ var extractEmbedPreview = function extractEmbedPreview(jsonLd, platform, iframeU
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
var extractEmbedProps = function extractEmbedProps(jsonLd, meta, platform, iframeUrlType) {
|
|
22
|
+
var extractEmbedProps = exports.extractEmbedProps = function extractEmbedProps(jsonLd, meta, platform, iframeUrlType) {
|
|
23
23
|
return {
|
|
24
24
|
link: (0, _linkExtractors.extractLink)(jsonLd) || '',
|
|
25
25
|
title: (0, _linkExtractors.extractTitle)(jsonLd),
|
|
@@ -28,5 +28,4 @@ var extractEmbedProps = function extractEmbedProps(jsonLd, meta, platform, ifram
|
|
|
28
28
|
isTrusted: (0, _extractIsTrusted.extractIsTrusted)(meta),
|
|
29
29
|
isSupportTheming: (0, _extractIsSupportTheming.extractIsSupportTheming)(meta)
|
|
30
30
|
};
|
|
31
|
-
};
|
|
32
|
-
exports.extractEmbedProps = extractEmbedProps;
|
|
31
|
+
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.extractDownloadAction = void 0;
|
|
7
7
|
var _extractActions = require("../../common/actions/extractActions");
|
|
8
8
|
var _detail = require("../../common/detail");
|
|
9
|
-
var extractDownloadAction = function extractDownloadAction(data) {
|
|
9
|
+
var extractDownloadAction = exports.extractDownloadAction = function extractDownloadAction(data) {
|
|
10
10
|
var downloadActionExists = (0, _extractActions.getActionsFromJsonLd)(data).find(function (action) {
|
|
11
11
|
return action['@type'] === 'DownloadAction';
|
|
12
12
|
});
|
|
@@ -16,5 +16,4 @@ var extractDownloadAction = function extractDownloadAction(data) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
return undefined;
|
|
19
|
-
};
|
|
20
|
-
exports.extractDownloadAction = extractDownloadAction;
|
|
19
|
+
};
|
|
@@ -23,7 +23,7 @@ var extractFollowAction = function extractFollowAction(response, showServerActio
|
|
|
23
23
|
var action = actions.find(function (item) {
|
|
24
24
|
if ((item === null || item === void 0 ? void 0 : item.name) === 'UpdateAction') {
|
|
25
25
|
var _dataUpdateAction;
|
|
26
|
-
var actionName = item === null || item === void 0
|
|
26
|
+
var actionName = item === null || item === void 0 || (_dataUpdateAction = item.dataUpdateAction) === null || _dataUpdateAction === void 0 ? void 0 : _dataUpdateAction.name;
|
|
27
27
|
return actionName === _linkingTypes.SmartLinkActionType.FollowEntityAction || actionName === _linkingTypes.SmartLinkActionType.UnfollowEntityAction;
|
|
28
28
|
}
|
|
29
29
|
return false;
|
|
@@ -49,5 +49,4 @@ var extractFollowAction = function extractFollowAction(response, showServerActio
|
|
|
49
49
|
value: actionType === _linkingTypes.SmartLinkActionType.FollowEntityAction
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
var _default = extractFollowAction;
|
|
53
|
-
exports.default = _default;
|
|
52
|
+
var _default = exports.default = extractFollowAction;
|
|
@@ -8,7 +8,7 @@ var _detail = require("../../common/detail");
|
|
|
8
8
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
9
9
|
var _icon = require("../icon");
|
|
10
10
|
var _extractIsSupportTheming = require("../../common/meta/extractIsSupportTheming");
|
|
11
|
-
var extractPreviewAction = function extractPreviewAction(response) {
|
|
11
|
+
var extractPreviewAction = exports.extractPreviewAction = function extractPreviewAction(response) {
|
|
12
12
|
var _extractPreviewData;
|
|
13
13
|
var data = response.data;
|
|
14
14
|
var meta = response.meta;
|
|
@@ -25,5 +25,4 @@ var extractPreviewAction = function extractPreviewAction(response) {
|
|
|
25
25
|
isSupportTheming: (0, _extractIsSupportTheming.extractIsSupportTheming)(meta)
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
};
|
|
29
|
-
exports.extractPreviewAction = extractPreviewAction;
|
|
28
|
+
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.extractViewAction = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
8
|
var _extractActions = require("../../common/actions/extractActions");
|
|
9
|
-
var extractViewAction = function extractViewAction(data) {
|
|
9
|
+
var extractViewAction = exports.extractViewAction = function extractViewAction(data) {
|
|
10
10
|
var viewActionExists = (0, _extractActions.getActionsFromJsonLd)(data).find(function (action) {
|
|
11
11
|
return action['@type'] === 'ViewAction';
|
|
12
12
|
});
|
|
@@ -16,5 +16,4 @@ var extractViewAction = function extractViewAction(data) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
return undefined;
|
|
19
|
-
};
|
|
20
|
-
exports.extractViewAction = extractViewAction;
|
|
19
|
+
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractPersonsUpdatedBy = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
-
var extractPersonsUpdatedBy = function extractPersonsUpdatedBy(jsonLd) {
|
|
8
|
+
var extractPersonsUpdatedBy = exports.extractPersonsUpdatedBy = function extractPersonsUpdatedBy(jsonLd) {
|
|
9
9
|
if (jsonLd['@type'] === 'atlassian:Project') {
|
|
10
10
|
var members = (0, _linkExtractors.extractMembers)(jsonLd);
|
|
11
11
|
if (members && members.length !== 0) {
|
|
@@ -17,5 +17,4 @@ var extractPersonsUpdatedBy = function extractPersonsUpdatedBy(jsonLd) {
|
|
|
17
17
|
var extractedPersons = (0, _linkExtractors.extractPersonFromJsonLd)(updatedBy);
|
|
18
18
|
return extractedPersons ? [extractedPersons] : undefined;
|
|
19
19
|
}
|
|
20
|
-
};
|
|
21
|
-
exports.extractPersonsUpdatedBy = extractPersonsUpdatedBy;
|
|
20
|
+
};
|
|
@@ -12,15 +12,14 @@ var _constants = require("../../../constants");
|
|
|
12
12
|
var _extractIconRenderer = _interopRequireDefault(require("./extract-icon-renderer"));
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
var extractLinkIcon = function extractLinkIcon(response, renderers) {
|
|
15
|
+
var extractLinkIcon = exports.extractLinkIcon = function extractLinkIcon(response, renderers) {
|
|
16
16
|
var data = response.data;
|
|
17
17
|
var render = (0, _extractIconRenderer.default)(data, renderers);
|
|
18
18
|
return _objectSpread(_objectSpread({}, (0, _extractJsonldDataIcon.default)(data)), {}, {
|
|
19
19
|
render: render
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
23
|
-
var extractErrorIcon = function extractErrorIcon(response, status) {
|
|
22
|
+
var extractErrorIcon = exports.extractErrorIcon = function extractErrorIcon(response, status) {
|
|
24
23
|
// Try to get provider icon first.
|
|
25
24
|
if (response) {
|
|
26
25
|
var data = response.data;
|
|
@@ -53,5 +52,4 @@ var extractErrorIcon = function extractErrorIcon(response, status) {
|
|
|
53
52
|
icon: _constants.IconType.Default
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
|
-
};
|
|
57
|
-
exports.extractErrorIcon = extractErrorIcon;
|
|
55
|
+
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractLatestCommit = void 0;
|
|
7
|
-
var extractLatestCommit = function extractLatestCommit(jsonLd) {
|
|
7
|
+
var extractLatestCommit = exports.extractLatestCommit = function extractLatestCommit(jsonLd) {
|
|
8
8
|
var latestCommit = jsonLd['atlassian:latestCommit'];
|
|
9
9
|
if (typeof latestCommit === 'string') {
|
|
10
10
|
return latestCommit;
|
|
@@ -13,5 +13,4 @@ var extractLatestCommit = function extractLatestCommit(jsonLd) {
|
|
|
13
13
|
//todo: change the properties to latestCommit.hash when BE is ready
|
|
14
14
|
return latestCommit ? latestCommit.name : undefined;
|
|
15
15
|
}
|
|
16
|
-
};
|
|
17
|
-
exports.extractLatestCommit = extractLatestCommit;
|
|
16
|
+
};
|
|
@@ -15,85 +15,69 @@ var extractLinkName = function extractLinkName(link) {
|
|
|
15
15
|
var extractValue = function extractValue(data, key) {
|
|
16
16
|
return data === null || data === void 0 ? void 0 : data[key];
|
|
17
17
|
};
|
|
18
|
-
var extractCommentCount = function extractCommentCount(data) {
|
|
18
|
+
var extractCommentCount = exports.extractCommentCount = function extractCommentCount(data) {
|
|
19
19
|
return extractValue(data, 'schema:commentCount');
|
|
20
20
|
};
|
|
21
|
-
exports.
|
|
22
|
-
var extractDueOn = function extractDueOn(data) {
|
|
21
|
+
var extractDueOn = exports.extractDueOn = function extractDueOn(data) {
|
|
23
22
|
return extractValue(data, 'endTime');
|
|
24
23
|
};
|
|
25
|
-
exports.
|
|
26
|
-
var extractViewCount = function extractViewCount(data) {
|
|
24
|
+
var extractViewCount = exports.extractViewCount = function extractViewCount(data) {
|
|
27
25
|
return extractValue(data, 'atlassian:viewCount');
|
|
28
26
|
};
|
|
29
|
-
exports.
|
|
30
|
-
var extractReactCount = function extractReactCount(data) {
|
|
27
|
+
var extractReactCount = exports.extractReactCount = function extractReactCount(data) {
|
|
31
28
|
return extractValue(data, 'atlassian:reactCount');
|
|
32
29
|
};
|
|
33
|
-
exports.
|
|
34
|
-
var extractVoteCount = function extractVoteCount(data) {
|
|
30
|
+
var extractVoteCount = exports.extractVoteCount = function extractVoteCount(data) {
|
|
35
31
|
return extractValue(data, 'atlassian:voteCount');
|
|
36
32
|
};
|
|
37
|
-
exports.
|
|
38
|
-
var extractOwnedBy = function extractOwnedBy(data) {
|
|
33
|
+
var extractOwnedBy = exports.extractOwnedBy = function extractOwnedBy(data) {
|
|
39
34
|
var persons = (0, _linkExtractors.extractPersonOwnedBy)(data);
|
|
40
35
|
if (persons && persons.length) {
|
|
41
36
|
return persons[0].name;
|
|
42
37
|
}
|
|
43
38
|
};
|
|
44
|
-
exports.
|
|
45
|
-
var extractAssignedTo = function extractAssignedTo(data) {
|
|
39
|
+
var extractAssignedTo = exports.extractAssignedTo = function extractAssignedTo(data) {
|
|
46
40
|
var person = (0, _linkExtractors.extractPersonAssignedTo)(data);
|
|
47
41
|
if (person) {
|
|
48
42
|
return person.name;
|
|
49
43
|
}
|
|
50
44
|
};
|
|
51
|
-
exports.
|
|
52
|
-
var extractPersonAssignedToAsArray = function extractPersonAssignedToAsArray(data) {
|
|
45
|
+
var extractPersonAssignedToAsArray = exports.extractPersonAssignedToAsArray = function extractPersonAssignedToAsArray(data) {
|
|
53
46
|
var person = (0, _linkExtractors.extractPersonAssignedTo)(data);
|
|
54
47
|
return person ? [person] : undefined;
|
|
55
48
|
};
|
|
56
|
-
exports.
|
|
57
|
-
var extractCreatedBy = function extractCreatedBy(data) {
|
|
49
|
+
var extractCreatedBy = exports.extractCreatedBy = function extractCreatedBy(data) {
|
|
58
50
|
var persons = (0, _linkExtractors.extractPersonCreatedBy)(data);
|
|
59
51
|
if (persons && persons.length) {
|
|
60
52
|
return persons[0].name;
|
|
61
53
|
}
|
|
62
54
|
};
|
|
63
|
-
exports.
|
|
64
|
-
var extractModifiedBy = function extractModifiedBy(data) {
|
|
55
|
+
var extractModifiedBy = exports.extractModifiedBy = function extractModifiedBy(data) {
|
|
65
56
|
var person = (0, _linkExtractors.extractPersonUpdatedBy)(data);
|
|
66
57
|
if (person) {
|
|
67
58
|
return person.name;
|
|
68
59
|
}
|
|
69
60
|
};
|
|
70
|
-
exports.
|
|
71
|
-
var extractProgrammingLanguage = function extractProgrammingLanguage(data) {
|
|
61
|
+
var extractProgrammingLanguage = exports.extractProgrammingLanguage = function extractProgrammingLanguage(data) {
|
|
72
62
|
return extractValue(data, 'schema:programmingLanguage');
|
|
73
63
|
};
|
|
74
|
-
exports.
|
|
75
|
-
var extractSourceBranch = function extractSourceBranch(data) {
|
|
64
|
+
var extractSourceBranch = exports.extractSourceBranch = function extractSourceBranch(data) {
|
|
76
65
|
return extractLinkName(data['atlassian:mergeSource']);
|
|
77
66
|
};
|
|
78
|
-
exports.
|
|
79
|
-
var extractSubscriberCount = function extractSubscriberCount(data) {
|
|
67
|
+
var extractSubscriberCount = exports.extractSubscriberCount = function extractSubscriberCount(data) {
|
|
80
68
|
return extractValue(data, 'atlassian:subscriberCount');
|
|
81
69
|
};
|
|
82
|
-
exports.
|
|
83
|
-
var extractAttachmentCount = function extractAttachmentCount(data) {
|
|
70
|
+
var extractAttachmentCount = exports.extractAttachmentCount = function extractAttachmentCount(data) {
|
|
84
71
|
return extractValue(data, 'atlassian:attachmentCount');
|
|
85
72
|
};
|
|
86
|
-
exports.
|
|
87
|
-
var extractTargetBranch = function extractTargetBranch(data) {
|
|
73
|
+
var extractTargetBranch = exports.extractTargetBranch = function extractTargetBranch(data) {
|
|
88
74
|
return extractLinkName(data['atlassian:mergeDestination']);
|
|
89
75
|
};
|
|
90
|
-
exports.
|
|
91
|
-
var extractChecklistProgress = function extractChecklistProgress(data) {
|
|
76
|
+
var extractChecklistProgress = exports.extractChecklistProgress = function extractChecklistProgress(data) {
|
|
92
77
|
var checkItemsObj = extractValue(data, 'atlassian:checkItems');
|
|
93
78
|
return checkItemsObj ? "".concat(checkItemsObj.checkedItems, "/").concat(checkItemsObj.totalItems) : undefined;
|
|
94
79
|
};
|
|
95
|
-
exports.
|
|
96
|
-
var extractLocation = function extractLocation(data) {
|
|
80
|
+
var extractLocation = exports.extractLocation = function extractLocation(data) {
|
|
97
81
|
var _ref = extractValue(data, 'location') || {},
|
|
98
82
|
url = _ref.url,
|
|
99
83
|
name = _ref.name;
|
|
@@ -104,21 +88,16 @@ var extractLocation = function extractLocation(data) {
|
|
|
104
88
|
};
|
|
105
89
|
}
|
|
106
90
|
};
|
|
107
|
-
exports.
|
|
108
|
-
var extractSubTasksProgress = function extractSubTasksProgress(data) {
|
|
91
|
+
var extractSubTasksProgress = exports.extractSubTasksProgress = function extractSubTasksProgress(data) {
|
|
109
92
|
var subTasksObject = extractValue(data, 'atlassian:subTasks');
|
|
110
93
|
return subTasksObject && subTasksObject.totalCount ? "".concat(subTasksObject.resolvedCount, "/").concat(subTasksObject.totalCount) : undefined;
|
|
111
94
|
};
|
|
112
|
-
exports.
|
|
113
|
-
var extractReadTime = function extractReadTime(data) {
|
|
95
|
+
var extractReadTime = exports.extractReadTime = function extractReadTime(data) {
|
|
114
96
|
return extractValue(data, 'atlassian:readTimeInMinutes');
|
|
115
97
|
};
|
|
116
|
-
exports.
|
|
117
|
-
var extractSentOn = function extractSentOn(data) {
|
|
98
|
+
var extractSentOn = exports.extractSentOn = function extractSentOn(data) {
|
|
118
99
|
return extractValue(data, 'dateSent');
|
|
119
100
|
};
|
|
120
|
-
exports.
|
|
121
|
-
var extractStoryPoints = function extractStoryPoints(data) {
|
|
101
|
+
var extractStoryPoints = exports.extractStoryPoints = function extractStoryPoints(data) {
|
|
122
102
|
return extractValue(data, 'atlassian:storyPoints');
|
|
123
|
-
};
|
|
124
|
-
exports.extractStoryPoints = extractStoryPoints;
|
|
103
|
+
};
|
|
@@ -11,7 +11,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
var AvatarGroupsWithNamePrefix = [_constants.ElementName.AssignedToGroup, _constants.ElementName.OwnedByGroup, _constants.ElementName.AuthorGroup];
|
|
14
|
-
var elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
14
|
+
var elementNamesToItems = exports.elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
15
15
|
return elementNames.filter(function (element) {
|
|
16
16
|
return element in _constants.ElementName;
|
|
17
17
|
}).map(function (elementName) {
|
|
@@ -23,8 +23,7 @@ var elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
exports.
|
|
27
|
-
var extractMetadata = function extractMetadata(jsonLd) {
|
|
26
|
+
var extractMetadata = exports.extractMetadata = function extractMetadata(jsonLd) {
|
|
28
27
|
var _jsonLd$metadata, _metadata$primary, _metadata$secondary, _metadata$subtitle;
|
|
29
28
|
var metadata = (_jsonLd$metadata = jsonLd.metadata) !== null && _jsonLd$metadata !== void 0 ? _jsonLd$metadata : [];
|
|
30
29
|
return {
|
|
@@ -32,5 +31,4 @@ var extractMetadata = function extractMetadata(jsonLd) {
|
|
|
32
31
|
secondary: elementNamesToItems((_metadata$secondary = metadata.secondary) !== null && _metadata$secondary !== void 0 ? _metadata$secondary : []),
|
|
33
32
|
subtitle: elementNamesToItems((_metadata$subtitle = metadata.subtitle) !== null && _metadata$subtitle !== void 0 ? _metadata$subtitle : [])
|
|
34
33
|
};
|
|
35
|
-
};
|
|
36
|
-
exports.extractMetadata = extractMetadata;
|
|
34
|
+
};
|