@atlaskit/smart-card 23.14.0 → 23.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/__tests_external__/index.js +0 -6
- package/dist/cjs/__tests_external__/page-objects/BaseCard.js +6 -26
- package/dist/cjs/__tests_external__/page-objects/BlockCard.js +0 -15
- package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +0 -15
- package/dist/cjs/__tests_external__/page-objects/InlineCard.js +0 -15
- package/dist/cjs/__tests_external__/test-cases/card.js +2 -6
- package/dist/cjs/__tests_external__/test-cases/embed.js +1 -5
- package/dist/cjs/__tests_external__/test-cases/inline.js +2 -6
- package/dist/cjs/classNames.js +0 -11
- package/dist/cjs/client/index.js +0 -1
- package/dist/cjs/constants.js +1 -36
- package/dist/cjs/extractors/block/index.js +2 -29
- package/dist/cjs/extractors/common/actions/extractActions.js +2 -20
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +18 -34
- package/dist/cjs/extractors/common/byline/extractByline.js +4 -15
- package/dist/cjs/extractors/common/context/extractAccessContext.js +2 -17
- package/dist/cjs/extractors/common/context/index.js +0 -1
- package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +0 -7
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +0 -7
- package/dist/cjs/extractors/common/detail/extractDownloadUrl.js +0 -2
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +0 -7
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +0 -7
- package/dist/cjs/extractors/common/detail/index.js +0 -5
- package/dist/cjs/extractors/common/icon/extractFileFormat.js +0 -2
- package/dist/cjs/extractors/common/icon/extractIcon.js +0 -26
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +2 -22
- package/dist/cjs/extractors/common/icon/extractIconFromTask.js +1 -28
- package/dist/cjs/extractors/common/icon/index.js +0 -4
- package/dist/cjs/extractors/common/lozenge/extractLozenge.js +0 -15
- package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +1 -6
- package/dist/cjs/extractors/common/lozenge/extractState.js +0 -5
- package/dist/cjs/extractors/common/lozenge/extractTag.js +0 -6
- package/dist/cjs/extractors/common/lozenge/extractTaskStatus.js +0 -3
- package/dist/cjs/extractors/common/lozenge/extractTaskType.js +0 -4
- package/dist/cjs/extractors/common/lozenge/index.js +0 -5
- package/dist/cjs/extractors/common/lozenge/utils.js +0 -2
- package/dist/cjs/extractors/common/meta/extractIsTrusted.js +0 -2
- package/dist/cjs/extractors/common/primitives/extractSummary.js +0 -2
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +0 -7
- package/dist/cjs/extractors/common/primitives/extractVisitUrl.js +0 -2
- package/dist/cjs/extractors/common/primitives/index.js +0 -2
- package/dist/cjs/extractors/common/title-prefix/extractTitlePrefix.js +0 -6
- package/dist/cjs/extractors/common/title-prefix/index.js +0 -1
- package/dist/cjs/extractors/constants.js +2 -2
- package/dist/cjs/extractors/embed/index.js +0 -10
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +0 -6
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +0 -9
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -6
- package/dist/cjs/extractors/flexible/collaboratorGroup/index.js +0 -4
- package/dist/cjs/extractors/flexible/extract-preview.js +0 -4
- package/dist/cjs/extractors/flexible/extract-priority.js +0 -7
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +0 -10
- package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +0 -25
- package/dist/cjs/extractors/flexible/icon/extract-icon-renderer.js +0 -5
- package/dist/cjs/extractors/flexible/icon/extract-jira-task-icon.js +0 -12
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -35
- package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +0 -11
- package/dist/cjs/extractors/flexible/icon/extract-url-icon.js +0 -3
- package/dist/cjs/extractors/flexible/icon/index.js +4 -20
- package/dist/cjs/extractors/flexible/index.js +0 -17
- package/dist/cjs/extractors/flexible/latest-commit/index.js +0 -4
- package/dist/cjs/extractors/flexible/utils.js +0 -33
- package/dist/cjs/extractors/hover/extractMetadata.js +0 -5
- package/dist/cjs/extractors/index.js +4 -16
- package/dist/cjs/extractors/inline/index.js +0 -12
- package/dist/cjs/hooks.js +0 -2
- package/dist/cjs/hoverCard.js +0 -1
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -30
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/in-product.js +0 -1
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/linkUrl.js +0 -2
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/ssr.js +4 -23
- package/dist/cjs/state/actions/index.js +36 -76
- package/dist/cjs/state/analytics/index.js +0 -2
- package/dist/cjs/state/analytics/ufoExperiences.js +0 -11
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +165 -205
- package/dist/cjs/state/config/index.js +0 -5
- package/dist/cjs/state/flexible-ui-context/index.js +1 -7
- package/dist/cjs/state/flexible-ui-context/utils.js +0 -2
- package/dist/cjs/state/helpers.js +3 -39
- package/dist/cjs/state/hooks/index.js +0 -2
- package/dist/cjs/state/hooks/usePrefetch.js +10 -31
- package/dist/cjs/state/hooks/useSmartLink.js +11 -23
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +12 -29
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -7
- package/dist/cjs/state/index.js +0 -3
- package/dist/cjs/state/renderers/index.js +0 -4
- package/dist/cjs/state/store/index.js +7 -15
- package/dist/cjs/utils/analytics/analytics.js +133 -197
- package/dist/cjs/utils/analytics/index.js +8 -18
- package/dist/cjs/utils/flexible.js +0 -20
- package/dist/cjs/utils/index.js +5 -54
- package/dist/cjs/utils/jsonld.js +0 -11
- package/dist/cjs/utils/mocks.js +0 -35
- package/dist/cjs/utils/performance.js +0 -23
- package/dist/cjs/utils/test-utils.js +0 -10
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +0 -6
- package/dist/cjs/view/BlockCard/actions/DownloadAction.js +0 -15
- package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +0 -7
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -30
- package/dist/cjs/view/BlockCard/actions/RetryAction.js +0 -11
- package/dist/cjs/view/BlockCard/actions/ViewAction.js +0 -14
- package/dist/cjs/view/BlockCard/actions/flexible/AuthorizeAction.js +0 -8
- package/dist/cjs/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -8
- package/dist/cjs/view/BlockCard/actions/flexible/RetryAction.js +0 -7
- package/dist/cjs/view/BlockCard/components/Action.js +8 -19
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +0 -10
- package/dist/cjs/view/BlockCard/components/ActionList.js +1 -17
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +7 -14
- package/dist/cjs/view/BlockCard/components/Content.js +3 -7
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -7
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -6
- package/dist/cjs/view/BlockCard/components/Emoji.js +1 -6
- package/dist/cjs/view/BlockCard/components/Frame.js +10 -24
- package/dist/cjs/view/BlockCard/components/Link.js +4 -7
- package/dist/cjs/view/BlockCard/components/Name.js +5 -10
- package/dist/cjs/view/BlockCard/components/Provider.js +2 -8
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +3 -15
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +2 -4
- package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +7 -19
- package/dist/cjs/view/BlockCard/index.js +17 -68
- package/dist/cjs/view/BlockCard/utils/handlers.js +0 -2
- package/dist/cjs/view/BlockCard/views/ErroredView.js +10 -36
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +20 -42
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -36
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +34 -57
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +5 -16
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +15 -37
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -23
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +8 -31
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -19
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +16 -33
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -30
- package/dist/cjs/view/Card/index.js +0 -20
- package/dist/cjs/view/CardWithData/component.js +7 -32
- package/dist/cjs/view/CardWithData/loader.js +9 -30
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyFallback.js +2 -8
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -22
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -14
- package/dist/cjs/view/CardWithUrl/component-lazy/index.js +0 -6
- package/dist/cjs/view/CardWithUrl/component.js +35 -60
- package/dist/cjs/view/CardWithUrl/loader.js +31 -50
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +0 -22
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +20 -29
- package/dist/cjs/view/EmbedCard/components/Frame.js +21 -48
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +14 -23
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +6 -14
- package/dist/cjs/view/EmbedCard/components/styled.js +1 -61
- package/dist/cjs/view/EmbedCard/index.js +18 -53
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +6 -17
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +11 -26
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +6 -16
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +13 -25
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +9 -24
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +8 -17
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +5 -20
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +3 -11
- package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +0 -8
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +11 -32
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +5 -11
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +0 -5
- package/dist/cjs/view/EmbedModal/index.js +24 -47
- package/dist/cjs/view/EmbedModal/types.js +0 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +8 -25
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -10
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -15
- package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +5 -27
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +13 -25
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -42
- package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +5 -25
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +4 -8
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +4 -43
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -32
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +13 -47
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +11 -24
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +12 -30
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +7 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/index.js +0 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -34
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +10 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +20 -52
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +9 -21
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -44
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +4 -31
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +5 -11
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -9
- package/dist/cjs/view/FlexibleCard/components/container/index.js +29 -77
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -13
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -25
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +7 -28
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +11 -30
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +13 -35
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +0 -28
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +15 -37
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -28
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +8 -18
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +8 -20
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -51
- package/dist/cjs/view/FlexibleCard/components/utils.js +1 -39
- package/dist/cjs/view/FlexibleCard/index.js +13 -30
- package/dist/cjs/view/FlexibleCard/utils.js +0 -28
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +20 -45
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +13 -55
- package/dist/cjs/view/HoverCard/components/SnippetOrPreview.js +10 -26
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +22 -46
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +0 -6
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +2 -11
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +0 -5
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +8 -30
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +0 -5
- package/dist/cjs/view/HoverCard/index.js +4 -15
- package/dist/cjs/view/HoverCard/styled.js +2 -11
- package/dist/cjs/view/HoverCard/utils.js +0 -21
- package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -37
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +6 -46
- package/dist/cjs/view/InlineCard/Frame/index.js +11 -18
- package/dist/cjs/view/InlineCard/Frame/styled.js +1 -18
- package/dist/cjs/view/InlineCard/Icon.js +4 -13
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +10 -48
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +17 -34
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +13 -37
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +7 -27
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +0 -6
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +10 -44
- package/dist/cjs/view/InlineCard/index.js +13 -43
- package/dist/cjs/view/InlineCard/styled.js +2 -15
- package/dist/cjs/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -30
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +5 -20
- package/dist/cjs/view/LinkUrl/index.js +10 -24
- package/dist/cjs/view/LinkView/index.js +0 -16
- package/dist/cjs/view/SmartLinkEvents/useSmartLinkEvents.js +0 -3
- package/dist/cjs/view/common/Byline.js +4 -8
- package/dist/cjs/view/common/Icon.js +6 -21
- package/dist/cjs/view/common/Metadata.js +4 -14
- package/dist/cjs/view/common/MetadataList.js +2 -9
- package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -14
- package/dist/cjs/view/common/utils.js +0 -7
- package/dist/es2019/__tests_external__/page-objects/BaseCard.js +6 -15
- package/dist/es2019/__tests_external__/page-objects/BlockCard.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/EmbedCard.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/InlineCard.js +0 -1
- package/dist/es2019/constants.js +11 -26
- package/dist/es2019/extractors/block/index.js +6 -12
- package/dist/es2019/extractors/common/actions/extractActions.js +4 -12
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +14 -16
- package/dist/es2019/extractors/common/byline/extractByline.js +0 -2
- package/dist/es2019/extractors/common/context/extractAccessContext.js +10 -11
- package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +0 -1
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +0 -1
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +0 -1
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +0 -1
- package/dist/es2019/extractors/common/icon/extractIcon.js +0 -10
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +2 -11
- package/dist/es2019/extractors/common/icon/extractIconFromTask.js +0 -12
- package/dist/es2019/extractors/common/lozenge/extractLozenge.js +0 -3
- package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +0 -1
- package/dist/es2019/extractors/common/lozenge/extractState.js +0 -2
- package/dist/es2019/extractors/common/lozenge/extractTag.js +0 -3
- package/dist/es2019/extractors/common/lozenge/extractTaskStatus.js +0 -1
- package/dist/es2019/extractors/common/lozenge/extractTaskType.js +0 -1
- package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +0 -3
- package/dist/es2019/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
- package/dist/es2019/extractors/constants.js +2 -2
- package/dist/es2019/extractors/embed/index.js +2 -4
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -2
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -3
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -2
- package/dist/es2019/extractors/flexible/collaboratorGroup/index.js +0 -1
- package/dist/es2019/extractors/flexible/extract-preview.js +0 -2
- package/dist/es2019/extractors/flexible/extract-priority.js +0 -4
- package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +0 -9
- package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
- package/dist/es2019/extractors/flexible/icon/extract-icon-renderer.js +0 -4
- package/dist/es2019/extractors/flexible/icon/extract-jira-task-icon.js +0 -10
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +0 -18
- package/dist/es2019/extractors/flexible/icon/extract-provider-icon.js +0 -6
- package/dist/es2019/extractors/flexible/icon/extract-url-icon.js +0 -2
- package/dist/es2019/extractors/flexible/icon/index.js +4 -6
- package/dist/es2019/extractors/flexible/index.js +0 -3
- package/dist/es2019/extractors/flexible/latest-commit/index.js +0 -2
- package/dist/es2019/extractors/flexible/utils.js +0 -5
- package/dist/es2019/extractors/hover/extractMetadata.js +0 -3
- package/dist/es2019/extractors/index.js +0 -6
- package/dist/es2019/extractors/inline/index.js +0 -2
- package/dist/es2019/index.js +4 -4
- package/dist/es2019/ssr.js +2 -4
- package/dist/es2019/state/actions/index.js +25 -33
- package/dist/es2019/state/analytics/ufoExperiences.js +0 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +31 -46
- package/dist/es2019/state/config/index.js +0 -2
- package/dist/es2019/state/flexible-ui-context/index.js +1 -2
- package/dist/es2019/state/helpers.js +2 -11
- package/dist/es2019/state/hooks/usePrefetch.js +14 -15
- package/dist/es2019/state/hooks/useSmartLink.js +8 -7
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -8
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +0 -1
- package/dist/es2019/state/store/index.js +6 -5
- package/dist/es2019/utils/analytics/analytics.js +46 -24
- package/dist/es2019/utils/analytics/index.js +8 -5
- package/dist/es2019/utils/flexible.js +0 -1
- package/dist/es2019/utils/index.js +0 -7
- package/dist/es2019/utils/jsonld.js +4 -2
- package/dist/es2019/utils/mocks.js +0 -3
- package/dist/es2019/utils/performance.js +0 -9
- package/dist/es2019/utils/test-utils.js +0 -2
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/DownloadAction.js +0 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +1 -3
- package/dist/es2019/view/BlockCard/actions/ViewAction.js +0 -1
- package/dist/es2019/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
- package/dist/es2019/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
- package/dist/es2019/view/BlockCard/actions/flexible/RetryAction.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +0 -1
- package/dist/es2019/view/BlockCard/components/ActionIcon.js +0 -3
- package/dist/es2019/view/BlockCard/components/ActionList.js +0 -1
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +0 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +4 -2
- package/dist/es2019/view/BlockCard/components/Provider.js +0 -2
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +4 -2
- package/dist/es2019/view/BlockCard/components/flexible/footer/index.js +1 -4
- package/dist/es2019/view/BlockCard/index.js +1 -24
- package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +0 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +0 -2
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +2 -3
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +0 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -5
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +0 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -3
- package/dist/es2019/view/Card/index.js +0 -3
- package/dist/es2019/view/CardWithData/component.js +0 -6
- package/dist/es2019/view/CardWithData/loader.js +1 -10
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -4
- package/dist/es2019/view/CardWithUrl/component.js +10 -15
- package/dist/es2019/view/CardWithUrl/loader.js +8 -13
- package/dist/es2019/view/EmbedCard/EmbedResizeMessageListener.js +0 -8
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +4 -6
- package/dist/es2019/view/EmbedCard/components/Frame.js +1 -11
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +4 -6
- package/dist/es2019/view/EmbedCard/components/ImageIcon.js +0 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +0 -9
- package/dist/es2019/view/EmbedCard/index.js +0 -17
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +0 -5
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +0 -1
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +0 -1
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +0 -1
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +0 -7
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -2
- package/dist/es2019/view/EmbedModal/components/error-boundary/index.js +0 -3
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +0 -2
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +0 -2
- package/dist/es2019/view/EmbedModal/index.js +0 -6
- package/dist/es2019/view/EmbedModal/types.js +0 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +2 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +3 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +2 -6
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +4 -5
- package/dist/es2019/view/FlexibleCard/components/actions/utils.js +2 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +1 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +2 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +3 -18
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +62 -195
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -27
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +1 -7
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -7
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +0 -25
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +0 -23
- package/dist/es2019/view/FlexibleCard/components/utils.js +0 -11
- package/dist/es2019/view/FlexibleCard/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/utils.js +0 -15
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -14
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +0 -9
- package/dist/es2019/view/HoverCard/components/SnippetOrPreview.js +4 -5
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +0 -2
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +0 -3
- package/dist/es2019/view/HoverCard/index.js +0 -3
- package/dist/es2019/view/HoverCard/styled.js +2 -2
- package/dist/es2019/view/HoverCard/utils.js +2 -11
- package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -5
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -14
- package/dist/es2019/view/InlineCard/Frame/index.js +5 -4
- package/dist/es2019/view/InlineCard/Frame/styled.js +1 -5
- package/dist/es2019/view/InlineCard/Icon.js +6 -4
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -21
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +22 -15
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -6
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -2
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -6
- package/dist/es2019/view/InlineCard/index.js +0 -14
- package/dist/es2019/view/InlineCard/styled.js +3 -2
- package/dist/es2019/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +1 -9
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +0 -2
- package/dist/es2019/view/LinkUrl/index.js +0 -2
- package/dist/es2019/view/LinkView/index.js +0 -1
- package/dist/es2019/view/common/Icon.js +0 -5
- package/dist/es2019/view/common/Metadata.js +0 -4
- package/dist/es2019/view/common/MetadataList.js +0 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +0 -2
- package/dist/es2019/view/common/utils.js +0 -3
- package/dist/esm/__tests_external__/page-objects/BaseCard.js +6 -20
- package/dist/esm/__tests_external__/page-objects/BlockCard.js +0 -8
- package/dist/esm/__tests_external__/page-objects/EmbedCard.js +0 -8
- package/dist/esm/__tests_external__/page-objects/InlineCard.js +0 -8
- package/dist/esm/__tests_external__/test-cases/card.js +2 -2
- package/dist/esm/__tests_external__/test-cases/embed.js +1 -1
- package/dist/esm/__tests_external__/test-cases/inline.js +2 -2
- package/dist/esm/constants.js +11 -26
- package/dist/esm/extractors/block/index.js +2 -13
- package/dist/esm/extractors/common/actions/extractActions.js +2 -14
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +18 -28
- package/dist/esm/extractors/common/byline/extractByline.js +4 -8
- package/dist/esm/extractors/common/context/extractAccessContext.js +2 -12
- package/dist/esm/extractors/common/detail/extractAttachmentCount.js +0 -1
- package/dist/esm/extractors/common/detail/extractCommentCount.js +0 -1
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +0 -1
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +0 -1
- package/dist/esm/extractors/common/icon/extractIcon.js +0 -10
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +2 -11
- package/dist/esm/extractors/common/icon/extractIconFromTask.js +1 -13
- package/dist/esm/extractors/common/lozenge/extractLozenge.js +0 -7
- package/dist/esm/extractors/common/lozenge/extractLozengeText.js +1 -3
- package/dist/esm/extractors/common/lozenge/extractState.js +0 -2
- package/dist/esm/extractors/common/lozenge/extractTag.js +0 -3
- package/dist/esm/extractors/common/lozenge/extractTaskStatus.js +0 -1
- package/dist/esm/extractors/common/lozenge/extractTaskType.js +0 -1
- package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +0 -3
- package/dist/esm/extractors/common/title-prefix/extractTitlePrefix.js +0 -4
- package/dist/esm/extractors/constants.js +2 -2
- package/dist/esm/extractors/embed/index.js +0 -6
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -2
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -3
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -2
- package/dist/esm/extractors/flexible/collaboratorGroup/index.js +0 -1
- package/dist/esm/extractors/flexible/extract-preview.js +0 -2
- package/dist/esm/extractors/flexible/extract-priority.js +0 -4
- package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +0 -9
- package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +0 -24
- package/dist/esm/extractors/flexible/icon/extract-icon-renderer.js +0 -4
- package/dist/esm/extractors/flexible/icon/extract-jira-task-icon.js +0 -11
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +4 -24
- package/dist/esm/extractors/flexible/icon/extract-provider-icon.js +0 -6
- package/dist/esm/extractors/flexible/icon/extract-url-icon.js +0 -2
- package/dist/esm/extractors/flexible/icon/index.js +4 -11
- package/dist/esm/extractors/flexible/index.js +0 -3
- package/dist/esm/extractors/flexible/latest-commit/index.js +0 -2
- package/dist/esm/extractors/flexible/utils.js +0 -5
- package/dist/esm/extractors/hover/extractMetadata.js +0 -3
- package/dist/esm/extractors/index.js +4 -15
- package/dist/esm/extractors/inline/index.js +0 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/ssr.js +4 -11
- package/dist/esm/state/actions/index.js +36 -57
- package/dist/esm/state/analytics/ufoExperiences.js +0 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +165 -195
- package/dist/esm/state/config/index.js +0 -2
- package/dist/esm/state/flexible-ui-context/index.js +1 -2
- package/dist/esm/state/helpers.js +3 -12
- package/dist/esm/state/hooks/usePrefetch.js +10 -24
- package/dist/esm/state/hooks/useSmartLink.js +11 -13
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +12 -18
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -2
- package/dist/esm/state/store/index.js +7 -9
- package/dist/esm/utils/analytics/analytics.js +133 -139
- package/dist/esm/utils/analytics/index.js +8 -13
- package/dist/esm/utils/flexible.js +0 -1
- package/dist/esm/utils/index.js +5 -21
- package/dist/esm/utils/jsonld.js +0 -3
- package/dist/esm/utils/mocks.js +0 -20
- package/dist/esm/utils/performance.js +0 -9
- package/dist/esm/utils/test-utils.js +0 -2
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/DownloadAction.js +0 -6
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -15
- package/dist/esm/view/BlockCard/actions/RetryAction.js +0 -3
- package/dist/esm/view/BlockCard/actions/ViewAction.js +0 -6
- package/dist/esm/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -1
- package/dist/esm/view/BlockCard/actions/flexible/ForbiddenAction.js +1 -1
- package/dist/esm/view/BlockCard/actions/flexible/RetryAction.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +7 -11
- package/dist/esm/view/BlockCard/components/ActionIcon.js +0 -4
- package/dist/esm/view/BlockCard/components/ActionList.js +1 -3
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +6 -8
- package/dist/esm/view/BlockCard/components/Content.js +2 -2
- package/dist/esm/view/BlockCard/components/ContentFooter.js +2 -2
- package/dist/esm/view/BlockCard/components/ContentHeader.js +2 -2
- package/dist/esm/view/BlockCard/components/Frame.js +10 -13
- package/dist/esm/view/BlockCard/components/Link.js +3 -3
- package/dist/esm/view/BlockCard/components/Name.js +4 -4
- package/dist/esm/view/BlockCard/components/Provider.js +1 -3
- package/dist/esm/view/BlockCard/components/Thumbnail.js +3 -6
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +1 -1
- package/dist/esm/view/BlockCard/components/flexible/footer/index.js +7 -12
- package/dist/esm/view/BlockCard/index.js +18 -42
- package/dist/esm/view/BlockCard/views/ErroredView.js +10 -17
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +19 -22
- package/dist/esm/view/BlockCard/views/NotFoundView.js +11 -18
- package/dist/esm/view/BlockCard/views/ResolvedView.js +33 -35
- package/dist/esm/view/BlockCard/views/ResolvingView.js +4 -4
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +15 -22
- package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +7 -9
- package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +9 -13
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +7 -9
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +17 -22
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +11 -15
- package/dist/esm/view/Card/index.js +0 -10
- package/dist/esm/view/CardWithData/component.js +7 -20
- package/dist/esm/view/CardWithData/loader.js +10 -24
- package/dist/esm/view/CardWithUrl/component-lazy/LazyFallback.js +2 -2
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +9 -11
- package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -3
- package/dist/esm/view/CardWithUrl/component.js +35 -42
- package/dist/esm/view/CardWithUrl/loader.js +31 -37
- package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +0 -15
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +20 -23
- package/dist/esm/view/EmbedCard/components/Frame.js +20 -38
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +15 -20
- package/dist/esm/view/EmbedCard/components/ImageIcon.js +6 -8
- package/dist/esm/view/EmbedCard/components/styled.js +1 -17
- package/dist/esm/view/EmbedCard/index.js +18 -35
- package/dist/esm/view/EmbedCard/views/ErroredView.js +5 -5
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +11 -16
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +6 -6
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +12 -13
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +9 -10
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +7 -8
- package/dist/esm/view/EmbedModal/components/analytics/index.js +5 -12
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -7
- package/dist/esm/view/EmbedModal/components/error-boundary/index.js +0 -3
- package/dist/esm/view/EmbedModal/components/link-info/index.js +10 -14
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +5 -7
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +0 -2
- package/dist/esm/view/EmbedModal/index.js +24 -33
- package/dist/esm/view/EmbedModal/types.js +0 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +8 -15
- package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -6
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +5 -21
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +14 -18
- package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +10 -25
- package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +5 -19
- package/dist/esm/view/FlexibleCard/components/actions/index.js +4 -5
- package/dist/esm/view/FlexibleCard/components/actions/utils.js +4 -20
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +8 -23
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +13 -28
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +11 -16
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +12 -22
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +7 -14
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -22
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -9
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -18
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -10
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +20 -32
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +10 -12
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -8
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +4 -22
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +64 -200
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +4 -6
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -6
- package/dist/esm/view/FlexibleCard/components/container/index.js +29 -61
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +5 -9
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +10 -19
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -17
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +11 -20
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +13 -24
- package/dist/esm/view/FlexibleCard/components/elements/index.js +0 -25
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +15 -26
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -18
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +8 -14
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +8 -15
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +2 -28
- package/dist/esm/view/FlexibleCard/components/utils.js +1 -14
- package/dist/esm/view/FlexibleCard/index.js +14 -20
- package/dist/esm/view/FlexibleCard/utils.js +0 -15
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +19 -29
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +12 -28
- package/dist/esm/view/HoverCard/components/SnippetOrPreview.js +10 -16
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +22 -29
- package/dist/esm/view/HoverCard/components/views/resolved/styled.js +0 -2
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +1 -3
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +0 -2
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +8 -13
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +0 -2
- package/dist/esm/view/HoverCard/index.js +3 -6
- package/dist/esm/view/HoverCard/styled.js +2 -4
- package/dist/esm/view/HoverCard/utils.js +0 -15
- package/dist/esm/view/InlineCard/ErroredView/index.js +8 -22
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +6 -29
- package/dist/esm/view/InlineCard/Frame/index.js +11 -10
- package/dist/esm/view/InlineCard/Frame/styled.js +1 -9
- package/dist/esm/view/InlineCard/Icon.js +5 -5
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +10 -36
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +20 -15
- package/dist/esm/view/InlineCard/ResolvedView/index.js +13 -25
- package/dist/esm/view/InlineCard/ResolvingView/index.js +7 -16
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -2
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +10 -25
- package/dist/esm/view/InlineCard/index.js +13 -27
- package/dist/esm/view/InlineCard/styled.js +3 -4
- package/dist/esm/view/LinkUrl/LinkWarningModal/hooks/use-link-warning-modal.js +11 -22
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +5 -7
- package/dist/esm/view/LinkUrl/index.js +10 -14
- package/dist/esm/view/LinkView/index.js +0 -8
- package/dist/esm/view/common/Byline.js +3 -3
- package/dist/esm/view/common/Icon.js +6 -13
- package/dist/esm/view/common/Metadata.js +3 -7
- package/dist/esm/view/common/MetadataList.js +1 -2
- package/dist/esm/view/common/UnauthorisedViewContent.js +3 -5
- package/dist/esm/view/common/utils.js +0 -3
- package/package.json +3 -3
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject, _templateObject2;
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import React, { useCallback } from 'react';
|
|
7
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -9,32 +7,28 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
9
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
8
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
11
9
|
import { sizeToButtonSpacing } from '../../../utils';
|
|
12
|
-
|
|
13
10
|
var getButtonStyle = function getButtonStyle(size, iconOnly) {
|
|
14
11
|
switch (size) {
|
|
15
12
|
case SmartLinkSize.Large:
|
|
16
13
|
return iconOnly ? css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n button,\n button:hover,\n button:focus,\n button:active {\n padding: 0;\n > span {\n margin: 0;\n }\n }\n "]))) : '';
|
|
17
|
-
|
|
18
14
|
case SmartLinkSize.Small:
|
|
19
15
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 0.75rem;\n font-weight: 500;\n line-height: 1rem;\n button,\n button:hover,\n button:focus,\n button:active {\n line-height: 1rem;\n ", "\n }\n "])), iconOnly ? "\n padding: 0.125rem;\n " : "\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n ");
|
|
20
|
-
|
|
21
16
|
case SmartLinkSize.XLarge:
|
|
22
17
|
case SmartLinkSize.Medium:
|
|
23
18
|
default:
|
|
24
19
|
return '';
|
|
25
20
|
}
|
|
26
21
|
};
|
|
27
|
-
|
|
28
22
|
var ActionButton = function ActionButton(_ref) {
|
|
29
23
|
var appearance = _ref.appearance,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
content = _ref.content,
|
|
25
|
+
iconAfter = _ref.iconAfter,
|
|
26
|
+
iconBefore = _ref.iconBefore,
|
|
27
|
+
onClick = _ref.onClick,
|
|
28
|
+
overrideCss = _ref.overrideCss,
|
|
29
|
+
size = _ref.size,
|
|
30
|
+
testId = _ref.testId,
|
|
31
|
+
tooltipMessage = _ref.tooltipMessage;
|
|
38
32
|
var iconOnly = !content;
|
|
39
33
|
var onButtonClick = useCallback(function (handler) {
|
|
40
34
|
return function (e) {
|
|
@@ -58,5 +52,4 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
58
52
|
testId: testId
|
|
59
53
|
}, content)));
|
|
60
54
|
};
|
|
61
|
-
|
|
62
55
|
export default ActionButton;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
3
3
|
import { handleOnClick } from '../../../../../../utils';
|
|
4
|
-
|
|
5
4
|
var ActionDropdownItem = function ActionDropdownItem(_ref) {
|
|
6
5
|
var content = _ref.content,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
iconAfter = _ref.iconAfter,
|
|
7
|
+
iconBefore = _ref.iconBefore,
|
|
8
|
+
onClick = _ref.onClick,
|
|
9
|
+
testId = _ref.testId;
|
|
11
10
|
return /*#__PURE__*/React.createElement(DropdownItem, {
|
|
12
11
|
elemAfter: iconAfter,
|
|
13
12
|
elemBefore: iconBefore,
|
|
@@ -15,5 +14,4 @@ var ActionDropdownItem = function ActionDropdownItem(_ref) {
|
|
|
15
14
|
testId: testId
|
|
16
15
|
}, content);
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
export default ActionDropdownItem;
|
|
@@ -1,39 +1,32 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import { css, jsx } from '@emotion/react';
|
|
8
6
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
9
7
|
import { tokens } from '../../../../../../utils/token';
|
|
10
8
|
import { getIconSizeStyles } from '../../../utils';
|
|
11
|
-
|
|
12
9
|
var getIconWidth = function getIconWidth(size) {
|
|
13
10
|
switch (size) {
|
|
14
11
|
case SmartLinkSize.XLarge:
|
|
15
12
|
case SmartLinkSize.Large:
|
|
16
13
|
return '1.5rem';
|
|
17
|
-
|
|
18
14
|
case SmartLinkSize.Medium:
|
|
19
15
|
case SmartLinkSize.Small:
|
|
20
16
|
default:
|
|
21
17
|
return '1rem';
|
|
22
18
|
}
|
|
23
19
|
};
|
|
24
|
-
|
|
25
20
|
var getIconStyles = function getIconStyles(size) {
|
|
26
21
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n ", ";\n"])), tokens.actionIcon, getIconSizeStyles(getIconWidth(size)));
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
var ActionIcon = function ActionIcon(_ref) {
|
|
30
24
|
var size = _ref.size,
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
testId = _ref.testId,
|
|
26
|
+
icon = _ref.icon;
|
|
33
27
|
return jsx("span", {
|
|
34
28
|
css: getIconStyles(size),
|
|
35
29
|
"data-testid": "".concat(testId, "-icon")
|
|
36
30
|
}, icon);
|
|
37
31
|
};
|
|
38
|
-
|
|
39
32
|
export default ActionIcon;
|
|
@@ -2,35 +2,28 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
|
|
6
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
10
7
|
import React from 'react';
|
|
11
8
|
import Action from '../index';
|
|
12
|
-
|
|
13
9
|
var DownloadAction = function DownloadAction(props) {
|
|
14
10
|
var appearance = props.appearance,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
asDropDownItem = props.asDropDownItem,
|
|
12
|
+
downloadUrl = props.downloadUrl,
|
|
13
|
+
_onClick = props.onClick,
|
|
14
|
+
testId = props.testId,
|
|
15
|
+
url = props.url;
|
|
21
16
|
if (downloadUrl && url) {
|
|
22
17
|
var action = _objectSpread(_objectSpread({}, props), {}, {
|
|
23
18
|
onClick: function onClick() {
|
|
24
19
|
downloadFunction({
|
|
25
20
|
url: downloadUrl
|
|
26
21
|
});
|
|
27
|
-
|
|
28
22
|
if (_onClick) {
|
|
29
23
|
_onClick();
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
26
|
});
|
|
33
|
-
|
|
34
27
|
return /*#__PURE__*/React.createElement(Action, _extends({}, action, {
|
|
35
28
|
appearance: appearance,
|
|
36
29
|
asDropDownItem: asDropDownItem,
|
|
@@ -40,11 +33,9 @@ var DownloadAction = function DownloadAction(props) {
|
|
|
40
33
|
return null;
|
|
41
34
|
}
|
|
42
35
|
};
|
|
43
|
-
|
|
44
36
|
function downloadFunction(_x) {
|
|
45
37
|
return _downloadFunction.apply(this, arguments);
|
|
46
38
|
}
|
|
47
|
-
|
|
48
39
|
function _downloadFunction() {
|
|
49
40
|
_downloadFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
50
41
|
var url, isIE11, isSafari, iframeName, link, iframe;
|
|
@@ -53,21 +44,17 @@ function _downloadFunction() {
|
|
|
53
44
|
switch (_context.prev = _context.next) {
|
|
54
45
|
case 0:
|
|
55
46
|
url = _ref.url;
|
|
56
|
-
|
|
57
47
|
if (url) {
|
|
58
48
|
_context.next = 3;
|
|
59
49
|
break;
|
|
60
50
|
}
|
|
61
|
-
|
|
62
51
|
return _context.abrupt("return");
|
|
63
|
-
|
|
64
52
|
case 3:
|
|
65
53
|
isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
|
|
66
54
|
isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
67
55
|
iframeName = 'media-download-iframe';
|
|
68
56
|
link = document.createElement('a');
|
|
69
57
|
iframe = document.getElementById(iframeName);
|
|
70
|
-
|
|
71
58
|
if (!iframe) {
|
|
72
59
|
iframe = document.createElement('iframe');
|
|
73
60
|
iframe.style.display = 'none';
|
|
@@ -75,14 +62,12 @@ function _downloadFunction() {
|
|
|
75
62
|
iframe.name = iframeName;
|
|
76
63
|
document.body.appendChild(iframe);
|
|
77
64
|
}
|
|
78
|
-
|
|
79
65
|
link.href = url;
|
|
80
66
|
link.download = url;
|
|
81
67
|
link.target = isIE11 || isSafari ? '_blank' : iframeName;
|
|
82
68
|
document.body.appendChild(link);
|
|
83
69
|
link.click();
|
|
84
70
|
document.body.removeChild(link);
|
|
85
|
-
|
|
86
71
|
case 15:
|
|
87
72
|
case "end":
|
|
88
73
|
return _context.stop();
|
|
@@ -92,5 +77,4 @@ function _downloadFunction() {
|
|
|
92
77
|
}));
|
|
93
78
|
return _downloadFunction.apply(this, arguments);
|
|
94
79
|
}
|
|
95
|
-
|
|
96
80
|
export default DownloadAction;
|
|
@@ -5,6 +5,7 @@ import { SmartLinkSize } from '../../../../../constants';
|
|
|
5
5
|
import ActionButton from './action-button';
|
|
6
6
|
import ActionDropdownItem from './action-dropdown-item';
|
|
7
7
|
import ActionIcon from './action-icon';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* A base action that can be triggered with an on click.
|
|
10
11
|
* @internal
|
|
@@ -13,27 +14,24 @@ import ActionIcon from './action-icon';
|
|
|
13
14
|
* @see EditAction
|
|
14
15
|
* @see CustomAction
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
17
|
var Action = function Action(_ref) {
|
|
18
18
|
var _ref$appearance = _ref.appearance,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
appearance = _ref$appearance === void 0 ? 'subtle' : _ref$appearance,
|
|
20
|
+
content = _ref.content,
|
|
21
|
+
onClick = _ref.onClick,
|
|
22
|
+
_ref$size = _ref.size,
|
|
23
|
+
size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
|
|
24
|
+
_ref$testId = _ref.testId,
|
|
25
|
+
testId = _ref$testId === void 0 ? 'smart-action' : _ref$testId,
|
|
26
|
+
icon = _ref.icon,
|
|
27
|
+
_ref$iconPosition = _ref.iconPosition,
|
|
28
|
+
iconPosition = _ref$iconPosition === void 0 ? 'before' : _ref$iconPosition,
|
|
29
|
+
tooltipMessage = _ref.tooltipMessage,
|
|
30
|
+
asDropDownItem = _ref.asDropDownItem,
|
|
31
|
+
overrideCss = _ref.overrideCss;
|
|
33
32
|
if (!onClick) {
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
var actionIcon = icon && jsx(ActionIcon, {
|
|
38
36
|
icon: icon,
|
|
39
37
|
size: size,
|
|
@@ -41,7 +39,6 @@ var Action = function Action(_ref) {
|
|
|
41
39
|
});
|
|
42
40
|
var iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
|
|
43
41
|
var iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
|
|
44
|
-
|
|
45
42
|
if (asDropDownItem) {
|
|
46
43
|
return jsx(ActionDropdownItem, {
|
|
47
44
|
content: content,
|
|
@@ -64,5 +61,4 @@ var Action = function Action(_ref) {
|
|
|
64
61
|
});
|
|
65
62
|
}
|
|
66
63
|
};
|
|
67
|
-
|
|
68
64
|
export default Action;
|
|
@@ -4,11 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
var _excluded = ["popupMountPointId"];
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
|
-
|
|
8
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
-
|
|
10
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
|
|
12
9
|
import React from 'react';
|
|
13
10
|
import Action from '../index';
|
|
14
11
|
import ReactDOM from 'react-dom';
|
|
@@ -16,25 +13,23 @@ import { IntlProvider } from 'react-intl-next';
|
|
|
16
13
|
import { useFlexibleUiAnalyticsContext } from '../../../../../../state/flexible-ui-context';
|
|
17
14
|
import { useSmartLinkAnalytics } from '../../../../../../state';
|
|
18
15
|
import Icon from '../../../elements/icon';
|
|
19
|
-
|
|
20
16
|
var PreviewAction = function PreviewAction(props) {
|
|
21
17
|
var appearance = props.appearance,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
asDropDownItem = props.asDropDownItem,
|
|
19
|
+
testId = props.testId,
|
|
20
|
+
_onClick = props.onClick,
|
|
21
|
+
linkIcon = props.linkIcon,
|
|
22
|
+
src = props.src,
|
|
23
|
+
url = props.url,
|
|
24
|
+
title = props.title,
|
|
25
|
+
providerName = props.providerName,
|
|
26
|
+
downloadUrl = props.downloadUrl;
|
|
31
27
|
var defaultAnalytics = useSmartLinkAnalytics(url, function () {});
|
|
32
28
|
var analytics = useFlexibleUiAnalyticsContext() || defaultAnalytics;
|
|
33
29
|
var EmbedIcon = {
|
|
34
30
|
icon: /*#__PURE__*/React.createElement(Icon, linkIcon),
|
|
35
31
|
isFlexibleUi: true
|
|
36
32
|
};
|
|
37
|
-
|
|
38
33
|
if (src && url) {
|
|
39
34
|
var embedModal = function embedModal() {
|
|
40
35
|
return previewFunction({
|
|
@@ -52,17 +47,14 @@ var PreviewAction = function PreviewAction(props) {
|
|
|
52
47
|
origin: 'smartLinkCard'
|
|
53
48
|
});
|
|
54
49
|
};
|
|
55
|
-
|
|
56
50
|
var action = _objectSpread(_objectSpread({}, props), {}, {
|
|
57
51
|
onClick: function onClick() {
|
|
58
52
|
embedModal();
|
|
59
|
-
|
|
60
53
|
if (_onClick) {
|
|
61
54
|
_onClick();
|
|
62
55
|
}
|
|
63
56
|
}
|
|
64
57
|
});
|
|
65
|
-
|
|
66
58
|
return /*#__PURE__*/React.createElement(Action, _extends({}, action, {
|
|
67
59
|
appearance: appearance,
|
|
68
60
|
asDropDownItem: asDropDownItem,
|
|
@@ -72,6 +64,7 @@ var PreviewAction = function PreviewAction(props) {
|
|
|
72
64
|
return null;
|
|
73
65
|
}
|
|
74
66
|
};
|
|
67
|
+
|
|
75
68
|
/*
|
|
76
69
|
Explanatory note:
|
|
77
70
|
Actions don't have access to the react tree of whatever is rendered them
|
|
@@ -85,12 +78,9 @@ var PreviewAction = function PreviewAction(props) {
|
|
|
85
78
|
you find an elegant solution around this, you should definitely feel free to
|
|
86
79
|
refactor it.
|
|
87
80
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
81
|
export function previewFunction(_x) {
|
|
91
82
|
return _previewFunction.apply(this, arguments);
|
|
92
83
|
}
|
|
93
|
-
|
|
94
84
|
function _previewFunction() {
|
|
95
85
|
_previewFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
96
86
|
var popupMountPointId, rest, popupMountPoint, Modal;
|
|
@@ -100,17 +90,14 @@ function _previewFunction() {
|
|
|
100
90
|
case 0:
|
|
101
91
|
popupMountPointId = _ref.popupMountPointId, rest = _objectWithoutProperties(_ref, _excluded);
|
|
102
92
|
popupMountPoint = document.getElementById(popupMountPointId);
|
|
103
|
-
|
|
104
93
|
if (!popupMountPoint) {
|
|
105
94
|
popupMountPoint = document.createElement('div');
|
|
106
95
|
popupMountPoint.id = popupMountPointId;
|
|
107
96
|
popupMountPoint.setAttribute('data-testid', 'preview-modal');
|
|
108
97
|
document.body.appendChild(popupMountPoint);
|
|
109
98
|
}
|
|
110
|
-
|
|
111
99
|
_context2.next = 5;
|
|
112
100
|
return import('../../../../../EmbedModal');
|
|
113
|
-
|
|
114
101
|
case 5:
|
|
115
102
|
Modal = _context2.sent;
|
|
116
103
|
ReactDOM.render( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
@@ -122,7 +109,6 @@ function _previewFunction() {
|
|
|
122
109
|
}
|
|
123
110
|
}
|
|
124
111
|
}))), popupMountPoint);
|
|
125
|
-
|
|
126
112
|
case 7:
|
|
127
113
|
case "end":
|
|
128
114
|
return _context2.stop();
|
|
@@ -132,5 +118,4 @@ function _previewFunction() {
|
|
|
132
118
|
}));
|
|
133
119
|
return _previewFunction.apply(this, arguments);
|
|
134
120
|
}
|
|
135
|
-
|
|
136
121
|
export default PreviewAction;
|
|
@@ -2,35 +2,28 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
|
|
6
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
10
7
|
import React from 'react';
|
|
11
8
|
import Action from '../index';
|
|
12
|
-
|
|
13
9
|
var ViewAction = function ViewAction(props) {
|
|
14
10
|
var appearance = props.appearance,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
asDropDownItem = props.asDropDownItem,
|
|
12
|
+
testId = props.testId,
|
|
13
|
+
_onClick = props.onClick,
|
|
14
|
+
viewUrl = props.viewUrl,
|
|
15
|
+
url = props.url;
|
|
21
16
|
if (viewUrl && url) {
|
|
22
17
|
var action = _objectSpread(_objectSpread({}, props), {}, {
|
|
23
18
|
onClick: function onClick() {
|
|
24
19
|
viewFunction({
|
|
25
20
|
url: viewUrl
|
|
26
21
|
});
|
|
27
|
-
|
|
28
22
|
if (_onClick) {
|
|
29
23
|
_onClick();
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
26
|
});
|
|
33
|
-
|
|
34
27
|
return /*#__PURE__*/React.createElement(Action, _extends({}, action, {
|
|
35
28
|
appearance: appearance,
|
|
36
29
|
asDropDownItem: asDropDownItem,
|
|
@@ -40,11 +33,9 @@ var ViewAction = function ViewAction(props) {
|
|
|
40
33
|
return null;
|
|
41
34
|
}
|
|
42
35
|
};
|
|
43
|
-
|
|
44
36
|
export function viewFunction(_x) {
|
|
45
37
|
return _viewFunction.apply(this, arguments);
|
|
46
38
|
}
|
|
47
|
-
|
|
48
39
|
function _viewFunction() {
|
|
49
40
|
_viewFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
50
41
|
var url;
|
|
@@ -53,17 +44,13 @@ function _viewFunction() {
|
|
|
53
44
|
switch (_context.prev = _context.next) {
|
|
54
45
|
case 0:
|
|
55
46
|
url = _ref.url;
|
|
56
|
-
|
|
57
47
|
if (url) {
|
|
58
48
|
_context.next = 3;
|
|
59
49
|
break;
|
|
60
50
|
}
|
|
61
|
-
|
|
62
51
|
return _context.abrupt("return");
|
|
63
|
-
|
|
64
52
|
case 3:
|
|
65
53
|
window.open(url, '_blank', 'noopener=yes');
|
|
66
|
-
|
|
67
54
|
case 4:
|
|
68
55
|
case "end":
|
|
69
56
|
return _context.stop();
|
|
@@ -73,5 +60,4 @@ function _viewFunction() {
|
|
|
73
60
|
}));
|
|
74
61
|
return _viewFunction.apply(this, arguments);
|
|
75
62
|
}
|
|
76
|
-
|
|
77
63
|
export default ViewAction;
|
|
@@ -15,33 +15,32 @@ export var DeleteAction = createUIAction(ActionName.DeleteAction);
|
|
|
15
15
|
* the icon to an edit (pencil) icon.
|
|
16
16
|
* @see Action
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
18
|
export var EditAction = createUIAction(ActionName.EditAction);
|
|
19
|
+
|
|
20
20
|
/**
|
|
21
21
|
* Creates a PreviewAction component. Accepts default PreviewActionProps, and defaults
|
|
22
22
|
* to the text 'Preview' inside the button.
|
|
23
23
|
* @see Action
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
25
|
export var PreviewAction = createDataAction(ActionName.PreviewAction);
|
|
26
|
+
|
|
27
27
|
/**
|
|
28
28
|
* Creates a ViewAction component. Accepts default ViewActionProps, and defaults
|
|
29
29
|
* to the text 'View' inside the button.
|
|
30
30
|
* @see Action
|
|
31
31
|
*/
|
|
32
|
-
|
|
33
32
|
export var ViewAction = createDataAction(ActionName.ViewAction);
|
|
33
|
+
|
|
34
34
|
/**
|
|
35
35
|
* Creates a DownloadAction component. Accepts default DownloadActionProps, and defaults
|
|
36
36
|
* to the text 'Download' inside the button.
|
|
37
37
|
* @see Action
|
|
38
38
|
*/
|
|
39
|
-
|
|
40
39
|
export var DownloadAction = createDataAction(ActionName.DownloadAction);
|
|
40
|
+
|
|
41
41
|
/**
|
|
42
42
|
* Creates a CustomAction component. Accepts default ActionProps. Required to provide
|
|
43
43
|
* your own icon or text.
|
|
44
44
|
* @see Action
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
46
|
export var CustomAction = createUIAction(ActionName.CustomAction);
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
|
|
4
3
|
var _actionMappings;
|
|
5
|
-
|
|
6
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
10
6
|
import { ActionName } from '../../../../constants';
|
|
11
7
|
import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
12
8
|
import React, { useContext } from 'react';
|
|
@@ -75,42 +71,33 @@ var actionMappings = (_actionMappings = {}, _defineProperty(_actionMappings, Act
|
|
|
75
71
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.download)
|
|
76
72
|
}
|
|
77
73
|
}), _actionMappings);
|
|
78
|
-
|
|
79
74
|
var getContextKey = function getContextKey(name) {
|
|
80
75
|
// Attempt to predict context prop name in advance to reduce the amount of
|
|
81
76
|
// code run during runtime
|
|
82
77
|
return name.length > 0 ? name.charAt(0).toLowerCase() + name.slice(1) : undefined;
|
|
83
78
|
};
|
|
84
|
-
|
|
85
79
|
var getActionData = function getActionData(actionName, contextKey, context) {
|
|
86
80
|
if (!context) {
|
|
87
81
|
return undefined;
|
|
88
82
|
}
|
|
89
|
-
|
|
90
83
|
var data = context[contextKey];
|
|
91
|
-
|
|
92
84
|
switch (actionName) {
|
|
93
85
|
case ActionName.PreviewAction:
|
|
94
86
|
case ActionName.ViewAction:
|
|
95
87
|
case ActionName.DownloadAction:
|
|
96
88
|
return data;
|
|
97
|
-
|
|
98
89
|
default:
|
|
99
90
|
return undefined;
|
|
100
91
|
}
|
|
101
92
|
};
|
|
102
|
-
|
|
103
93
|
export var createDataAction = function createDataAction(name) {
|
|
104
94
|
var _ref = actionMappings[name] || {},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
BaseAction = _ref.component,
|
|
96
|
+
props = _ref.props;
|
|
108
97
|
var contextKey = getContextKey(name);
|
|
109
|
-
|
|
110
98
|
if (!BaseAction) {
|
|
111
99
|
throw Error("Action ".concat(name, " does not exist."));
|
|
112
100
|
}
|
|
113
|
-
|
|
114
101
|
return function (overrides) {
|
|
115
102
|
var context = useContext(FlexibleUiContext);
|
|
116
103
|
var data = getActionData(name, contextKey, context);
|
|
@@ -121,16 +108,13 @@ export var createDataAction = function createDataAction(name) {
|
|
|
121
108
|
};
|
|
122
109
|
export var createUIAction = function createUIAction(name) {
|
|
123
110
|
var _ref2 = actionMappings[name] || {},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
111
|
+
BaseAction = _ref2.component,
|
|
112
|
+
props = _ref2.props;
|
|
127
113
|
if (!BaseAction) {
|
|
128
114
|
throw Error("Action ".concat(name, " does not exist."));
|
|
129
115
|
}
|
|
130
|
-
|
|
131
116
|
return function (overrides) {
|
|
132
117
|
var combinedProps = _objectSpread(_objectSpread({}, props), overrides);
|
|
133
|
-
|
|
134
118
|
return /*#__PURE__*/React.createElement(BaseAction, combinedProps);
|
|
135
119
|
};
|
|
136
120
|
};
|
package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js
CHANGED
|
@@ -2,55 +2,43 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["name", "hideContent", "hideIcon", "onClick"];
|
|
5
|
-
|
|
6
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
10
7
|
/** @jsx jsx */
|
|
11
8
|
import { jsx } from '@emotion/react';
|
|
12
9
|
import React, { useCallback } from 'react';
|
|
13
10
|
import * as Actions from '../../../actions';
|
|
14
11
|
import { isJSXElementNull } from '../../utils';
|
|
15
|
-
|
|
16
12
|
var ActionGroupItem = function ActionGroupItem(_ref) {
|
|
17
13
|
var item = _ref.item,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
size = _ref.size,
|
|
15
|
+
appearance = _ref.appearance,
|
|
16
|
+
asDropDownItems = _ref.asDropDownItems,
|
|
17
|
+
onActionItemClick = _ref.onActionItemClick;
|
|
23
18
|
var name = item.name,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
hideContent = item.hideContent,
|
|
20
|
+
hideIcon = item.hideIcon,
|
|
21
|
+
onClick = item.onClick,
|
|
22
|
+
props = _objectWithoutProperties(item, _excluded);
|
|
29
23
|
var handleOnClick = useCallback(function () {
|
|
30
24
|
if (onActionItemClick) {
|
|
31
25
|
onActionItemClick();
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
if (onClick) {
|
|
35
28
|
onClick();
|
|
36
29
|
}
|
|
37
30
|
}, [onActionItemClick, onClick]);
|
|
38
31
|
var Action = Actions[name];
|
|
39
|
-
|
|
40
32
|
if (!Action) {
|
|
41
33
|
return null;
|
|
42
34
|
}
|
|
43
|
-
|
|
44
35
|
var actionProps = _objectSpread({}, props);
|
|
45
|
-
|
|
46
36
|
if (hideContent && !asDropDownItems) {
|
|
47
37
|
actionProps.content = '';
|
|
48
38
|
}
|
|
49
|
-
|
|
50
39
|
if (hideIcon) {
|
|
51
40
|
actionProps.icon = undefined;
|
|
52
41
|
}
|
|
53
|
-
|
|
54
42
|
var action = jsx(Action, _extends({
|
|
55
43
|
url: "",
|
|
56
44
|
asDropDownItem: asDropDownItems,
|
|
@@ -58,12 +46,9 @@ var ActionGroupItem = function ActionGroupItem(_ref) {
|
|
|
58
46
|
appearance: appearance,
|
|
59
47
|
onClick: handleOnClick
|
|
60
48
|
}, actionProps));
|
|
61
|
-
|
|
62
49
|
if (!isJSXElementNull(action)) {
|
|
63
50
|
return action;
|
|
64
51
|
}
|
|
65
|
-
|
|
66
52
|
return null;
|
|
67
53
|
};
|
|
68
|
-
|
|
69
54
|
export default ActionGroupItem;
|