@atlaskit/smart-card 27.5.4 → 27.6.1
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 +21 -0
- package/compass.yml +0 -1
- package/dist/cjs/extractors/flexible/actions/extract-ai-summary-action.js +2 -5
- package/dist/cjs/extractors/flexible/index.js +8 -4
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +4 -4
- package/dist/cjs/state/hooks/use-ai-summary/index.js +12 -32
- package/dist/cjs/state/hooks/use-ai-summary-action/index.js +58 -0
- package/dist/cjs/state/hooks/use-ai-summary-config/index.js +4 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/mocks.js +3 -0
- package/dist/cjs/view/BlockCard/components/Action.js +6 -3
- package/dist/cjs/view/BlockCard/components/ActionList.js +8 -5
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +25 -21
- package/dist/cjs/view/BlockCard/components/Content.js +3 -1
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +9 -7
- package/dist/cjs/view/BlockCard/components/Emoji.js +12 -8
- package/dist/cjs/view/BlockCard/components/Frame.js +8 -2
- package/dist/cjs/view/BlockCard/components/Link.js +6 -4
- package/dist/cjs/view/BlockCard/components/Name.js +23 -16
- package/dist/cjs/view/BlockCard/components/Provider.js +26 -19
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +8 -5
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +6 -4
- package/dist/cjs/view/BlockCard/index.js +2 -0
- package/dist/cjs/view/BlockCard/views/ErroredView.js +1 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +1 -0
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +2 -0
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +8 -6
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -0
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +15 -0
- package/dist/cjs/view/BlockCard/views/flexible/unresolved-view/index.js +2 -0
- package/dist/cjs/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +7 -3
- package/dist/cjs/view/BlockCard/views/styled.js +4 -1
- package/dist/cjs/view/EmbedCard/components/Frame.js +12 -10
- package/dist/cjs/view/EmbedCard/components/styled.js +48 -25
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +17 -14
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +1 -0
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +2 -0
- package/dist/cjs/view/EmbedCard/views/unresolved-view/styled.js +12 -0
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +2 -0
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +27 -21
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +11 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +10 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -3
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +6 -12
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +1 -3
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +30 -3
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +4 -10
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +8 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +14 -23
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +20 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +5 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +13 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +8 -3
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +4 -0
- package/dist/cjs/view/FlexibleCard/components/container/index.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +6 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +24 -13
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +15 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +13 -8
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +4 -0
- package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +6 -1
- package/dist/cjs/view/FlexibleCard/components/utils.js +13 -1
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +10 -24
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +6 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -0
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -0
- package/dist/cjs/view/HoverCard/components/ImagePreview.js +2 -0
- package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +8 -0
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +8 -21
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +6 -2
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +32 -28
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +9 -0
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +9 -0
- package/dist/cjs/view/HoverCard/index.js +2 -0
- package/dist/cjs/view/HoverCard/styled.js +17 -8
- package/dist/cjs/view/InlineCard/Frame/styled.js +3 -3
- package/dist/cjs/view/InlineCard/Icon.js +4 -2
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +20 -10
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +3 -1
- package/dist/cjs/view/InlineCard/styled.js +9 -4
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +2 -0
- package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +3 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +2 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +1 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +2 -0
- package/dist/cjs/view/RelatedLinksModal/index.js +20 -0
- package/dist/cjs/view/RelatedLinksModal/types.js +1 -0
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.js +1 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/index.js +2 -0
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +1 -0
- package/dist/cjs/view/common/Byline.js +6 -1
- package/dist/cjs/view/common/Icon.js +9 -1
- package/dist/cjs/view/common/Metadata.js +19 -15
- package/dist/cjs/view/common/MetadataList.js +12 -9
- package/dist/cjs/view/common/ai-icon-loading/index.js +1 -0
- package/dist/cjs/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +3 -0
- package/dist/cjs/view/common/ai-prism/ai-glowing-border/index.js +4 -0
- package/dist/cjs/view/common/ai-prism/index.js +5 -1
- package/dist/cjs/view/common/ai-summary/index.js +2 -0
- package/dist/cjs/view/common/ai-summary/ulist.js +1 -0
- package/dist/es2019/extractors/flexible/actions/extract-ai-summary-action.js +2 -5
- package/dist/es2019/extractors/flexible/index.js +4 -2
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
- package/dist/es2019/state/hooks/use-ai-summary/index.js +13 -34
- package/dist/es2019/state/hooks/use-ai-summary-action/index.js +54 -0
- package/dist/es2019/state/hooks/use-ai-summary-config/index.js +4 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/mocks.js +3 -0
- package/dist/es2019/view/BlockCard/components/Action.js +7 -4
- package/dist/es2019/view/BlockCard/components/ActionList.js +9 -6
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +25 -21
- package/dist/es2019/view/BlockCard/components/Content.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +10 -8
- package/dist/es2019/view/BlockCard/components/Emoji.js +13 -9
- package/dist/es2019/view/BlockCard/components/Frame.js +8 -1
- package/dist/es2019/view/BlockCard/components/Link.js +7 -5
- package/dist/es2019/view/BlockCard/components/Name.js +34 -25
- package/dist/es2019/view/BlockCard/components/Provider.js +27 -20
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +9 -5
- package/dist/es2019/view/BlockCard/components/UnresolvedText.js +7 -5
- package/dist/es2019/view/BlockCard/index.js +1 -0
- package/dist/es2019/view/BlockCard/views/ErroredView.js +1 -0
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +1 -0
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +1 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +2 -0
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +9 -7
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +1 -0
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -0
- package/dist/es2019/view/BlockCard/views/flexible/styled.js +14 -0
- package/dist/es2019/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- package/dist/es2019/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +7 -3
- package/dist/es2019/view/BlockCard/views/styled.js +3 -1
- package/dist/es2019/view/EmbedCard/components/Frame.js +13 -11
- package/dist/es2019/view/EmbedCard/components/styled.js +48 -22
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +18 -15
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +1 -0
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/es2019/view/EmbedCard/views/unresolved-view/styled.js +12 -0
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -0
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +27 -21
- package/dist/es2019/view/EmbedModal/components/link-info/styled.js +10 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +2 -8
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +21 -1
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +4 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +3 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +8 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +10 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +8 -19
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +20 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +13 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +4 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +4 -0
- package/dist/es2019/view/FlexibleCard/components/container/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +4 -0
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +10 -2
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +14 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +13 -7
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/elements/preview/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +4 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/utils.js +13 -0
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +9 -24
- package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +6 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -0
- package/dist/es2019/view/HoverCard/components/ImagePreview.js +2 -0
- package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +7 -0
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +5 -19
- package/dist/es2019/view/HoverCard/components/views/resolved/styled.js +6 -1
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +30 -26
- package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +9 -0
- package/dist/es2019/view/HoverCard/components/views/unauthorised/styled.js +8 -0
- package/dist/es2019/view/HoverCard/index.js +1 -0
- package/dist/es2019/view/HoverCard/styled.js +12 -3
- package/dist/es2019/view/InlineCard/Frame/styled.js +6 -2
- package/dist/es2019/view/InlineCard/Icon.js +3 -2
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +19 -10
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +2 -1
- package/dist/es2019/view/InlineCard/styled.js +8 -4
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +1 -0
- package/dist/es2019/view/LinkUrl/LinkWarningModal/styled.js +3 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +1 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +1 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +1 -0
- package/dist/es2019/view/RelatedLinksModal/index.js +14 -0
- package/dist/es2019/view/RelatedLinksModal/types.js +0 -0
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +1 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +1 -0
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +1 -0
- package/dist/es2019/view/common/Byline.js +6 -1
- package/dist/es2019/view/common/Icon.js +9 -1
- package/dist/es2019/view/common/Metadata.js +20 -16
- package/dist/es2019/view/common/MetadataList.js +13 -10
- package/dist/es2019/view/common/ai-icon-loading/index.js +1 -0
- package/dist/es2019/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +3 -0
- package/dist/es2019/view/common/ai-prism/ai-glowing-border/index.js +4 -0
- package/dist/es2019/view/common/ai-prism/index.js +5 -1
- package/dist/es2019/view/common/ai-summary/index.js +1 -0
- package/dist/es2019/view/common/ai-summary/ulist.js +1 -0
- package/dist/esm/extractors/flexible/actions/extract-ai-summary-action.js +2 -5
- package/dist/esm/extractors/flexible/index.js +8 -4
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +4 -4
- package/dist/esm/state/hooks/use-ai-summary/index.js +13 -33
- package/dist/esm/state/hooks/use-ai-summary-action/index.js +52 -0
- package/dist/esm/state/hooks/use-ai-summary-config/index.js +4 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/mocks.js +3 -0
- package/dist/esm/view/BlockCard/components/Action.js +7 -4
- package/dist/esm/view/BlockCard/components/ActionList.js +9 -6
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +25 -21
- package/dist/esm/view/BlockCard/components/Content.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentHeader.js +10 -8
- package/dist/esm/view/BlockCard/components/Emoji.js +13 -9
- package/dist/esm/view/BlockCard/components/Frame.js +8 -1
- package/dist/esm/view/BlockCard/components/Link.js +7 -5
- package/dist/esm/view/BlockCard/components/Name.js +24 -17
- package/dist/esm/view/BlockCard/components/Provider.js +27 -20
- package/dist/esm/view/BlockCard/components/Thumbnail.js +9 -5
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +7 -5
- package/dist/esm/view/BlockCard/index.js +1 -0
- package/dist/esm/view/BlockCard/views/ErroredView.js +1 -0
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +1 -0
- package/dist/esm/view/BlockCard/views/NotFoundView.js +1 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.js +2 -0
- package/dist/esm/view/BlockCard/views/ResolvingView.js +9 -7
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +1 -0
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -0
- package/dist/esm/view/BlockCard/views/flexible/styled.js +14 -0
- package/dist/esm/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- package/dist/esm/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +7 -3
- package/dist/esm/view/BlockCard/views/styled.js +3 -1
- package/dist/esm/view/EmbedCard/components/Frame.js +13 -11
- package/dist/esm/view/EmbedCard/components/styled.js +48 -24
- package/dist/esm/view/EmbedCard/views/ErroredView.js +18 -15
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +1 -0
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/esm/view/EmbedCard/views/unresolved-view/styled.js +12 -0
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +1 -0
- package/dist/esm/view/EmbedModal/components/link-info/index.js +27 -21
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +10 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +6 -12
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +3 -0
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +26 -1
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +4 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +4 -10
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +2 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +8 -4
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +10 -2
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +13 -23
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +20 -2
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -0
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +13 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +4 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +8 -2
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +4 -0
- package/dist/esm/view/FlexibleCard/components/container/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +4 -0
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +23 -13
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +14 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +13 -7
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +8 -1
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/elements/preview/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +4 -1
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/utils.js +13 -0
- package/dist/esm/view/HoverCard/components/ContentContainer.js +10 -24
- package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +6 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -0
- package/dist/esm/view/HoverCard/components/ImagePreview.js +2 -0
- package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +7 -0
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +8 -21
- package/dist/esm/view/HoverCard/components/views/resolved/styled.js +6 -1
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +32 -28
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +9 -0
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +8 -0
- package/dist/esm/view/HoverCard/index.js +1 -0
- package/dist/esm/view/HoverCard/styled.js +17 -7
- package/dist/esm/view/InlineCard/Frame/styled.js +3 -2
- package/dist/esm/view/InlineCard/Icon.js +3 -2
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +19 -10
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +2 -1
- package/dist/esm/view/InlineCard/styled.js +8 -4
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +1 -0
- package/dist/esm/view/LinkUrl/LinkWarningModal/styled.js +3 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +1 -0
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +1 -0
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +1 -0
- package/dist/esm/view/RelatedLinksModal/index.js +13 -0
- package/dist/esm/view/RelatedLinksModal/types.js +0 -0
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +1 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +1 -0
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +1 -0
- package/dist/esm/view/common/Byline.js +6 -1
- package/dist/esm/view/common/Icon.js +9 -1
- package/dist/esm/view/common/Metadata.js +20 -16
- package/dist/esm/view/common/MetadataList.js +13 -10
- package/dist/esm/view/common/ai-icon-loading/index.js +1 -0
- package/dist/esm/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +3 -0
- package/dist/esm/view/common/ai-prism/ai-glowing-border/index.js +4 -0
- package/dist/esm/view/common/ai-prism/index.js +5 -1
- package/dist/esm/view/common/ai-summary/index.js +1 -0
- package/dist/esm/view/common/ai-summary/ulist.js +1 -0
- package/dist/types/extractors/flexible/actions/extract-ai-summary-action.d.ts +1 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +0 -3
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +0 -1
- package/dist/types/state/hooks/use-ai-summary/index.d.ts +4 -0
- package/dist/types/state/hooks/use-ai-summary-action/index.d.ts +5 -0
- package/dist/types/state/hooks/use-ai-summary-config/types.d.ts +3 -1
- package/dist/types/utils/mocks.d.ts +4 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +7 -1
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types/view/RelatedLinksModal/index.d.ts +4 -0
- package/dist/types/view/RelatedLinksModal/types.d.ts +5 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-ai-summary-action.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +0 -3
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +0 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +4 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary-action/index.d.ts +5 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary-config/types.d.ts +3 -1
- package/dist/types-ts4.5/utils/mocks.d.ts +4 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +7 -1
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/view/RelatedLinksModal/index.d.ts +4 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/types.d.ts +5 -0
- package/package.json +191 -191
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 27.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#102669](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102669)
|
|
8
|
+
[`8530f56308283`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8530f56308283) -
|
|
9
|
+
Refactor useAISummary hook
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 27.6.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#109796](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109796)
|
|
17
|
+
[`c9e8631e9b24f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c9e8631e9b24f) -
|
|
18
|
+
EDM-10129: add functionality to View Related Links Action to open Related Links Modal
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 27.5.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/compass.yml
CHANGED
|
@@ -7,14 +7,11 @@ exports.extractAISummaryAction = void 0;
|
|
|
7
7
|
var _types = require("../../../view/Card/types");
|
|
8
8
|
var _canShowAction = require("../../../utils/actions/can-show-action");
|
|
9
9
|
var _aiSummary = require("../../../utils/ai-summary");
|
|
10
|
-
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
11
10
|
var extractAISummaryAction = exports.extractAISummaryAction = function extractAISummaryAction(response, url, actionOptions, aiSummaryConfig) {
|
|
12
|
-
if (!(0, _canShowAction.canShowAction)(_types.CardAction.AISummaryAction, actionOptions) || !(0, _aiSummary.getIsAISummaryEnabled)(aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.isAdminHubAIEnabled, response) || !
|
|
11
|
+
if (!(0, _canShowAction.canShowAction)(_types.CardAction.AISummaryAction, actionOptions) || !(0, _aiSummary.getIsAISummaryEnabled)(aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.isAdminHubAIEnabled, response) || !url) {
|
|
13
12
|
return;
|
|
14
13
|
}
|
|
15
14
|
return {
|
|
16
|
-
url: url
|
|
17
|
-
ari: (0, _linkExtractors.extractAri)(response.data),
|
|
18
|
-
product: aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.product
|
|
15
|
+
url: url
|
|
19
16
|
};
|
|
20
17
|
};
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
8
9
|
var _primitives = require("../common/primitives");
|
|
9
10
|
var _actions = _interopRequireDefault(require("./actions"));
|
|
10
11
|
var _icon = require("./icon");
|
|
@@ -17,20 +18,23 @@ var _extractPreview = _interopRequireDefault(require("./extract-preview"));
|
|
|
17
18
|
var _extractState = _interopRequireDefault(require("./extract-state"));
|
|
18
19
|
var _latestCommit = require("./latest-commit");
|
|
19
20
|
var _extractViewAction = require("./actions/extract-view-action");
|
|
21
|
+
var _excluded = ["id", "renderers", "actionOptions", "response", "aiSummaryConfig"];
|
|
20
22
|
var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
21
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}
|
|
22
|
-
|
|
23
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
24
|
+
var id = _ref.id,
|
|
23
25
|
renderers = _ref.renderers,
|
|
24
26
|
actionOptions = _ref.actionOptions,
|
|
25
27
|
response = _ref.response,
|
|
26
|
-
aiSummaryConfig = _ref.aiSummaryConfig
|
|
28
|
+
aiSummaryConfig = _ref.aiSummaryConfig,
|
|
29
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
27
30
|
if (!response) {
|
|
28
31
|
return undefined;
|
|
29
32
|
}
|
|
30
33
|
var data = response.data;
|
|
31
34
|
var url = (0, _linkExtractors.extractLink)(data);
|
|
32
35
|
return {
|
|
33
|
-
|
|
36
|
+
// Use the original URL in edge cases, such as short links for AI summary and copy link actions.
|
|
37
|
+
actions: (0, _actions.default)(response, props.url, actionOptions, id, aiSummaryConfig),
|
|
34
38
|
assignedToGroup: (0, _utils.extractPersonAssignedToAsArray)(data),
|
|
35
39
|
attachmentCount: (0, _utils.extractAttachmentCount)(data),
|
|
36
40
|
authorGroup: (0, _linkExtractors.extractPersonCreatedBy)(data),
|
|
@@ -15,11 +15,11 @@ var _types = require("./types");
|
|
|
15
15
|
var _utils = require("./utils");
|
|
16
16
|
var _readStream = require("./readStream");
|
|
17
17
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
18
20
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
19
21
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
22
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
21
|
-
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; }
|
|
22
|
-
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; }
|
|
23
23
|
function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
24
24
|
function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
|
|
25
25
|
var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
|
|
@@ -79,11 +79,11 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
|
|
|
79
79
|
})));
|
|
80
80
|
this.config = {
|
|
81
81
|
requestUrl: this.getRequestUrl(props.envKey, props.baseUrl),
|
|
82
|
-
headers:
|
|
82
|
+
headers: {
|
|
83
83
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
84
84
|
'x-experience-id': 'smart-link',
|
|
85
85
|
'x-product': ((_getXProductHeaderVal = (0, _utils.getXProductHeaderValue)(props.product)) === null || _getXProductHeaderVal === void 0 ? void 0 : _getXProductHeaderVal.toLowerCase()) || 'confluence'
|
|
86
|
-
}
|
|
86
|
+
}
|
|
87
87
|
};
|
|
88
88
|
this.url = props.url;
|
|
89
89
|
this.ari = props.ari;
|
|
@@ -9,17 +9,20 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _store = require("./ai-summary-service/store");
|
|
11
11
|
var _aiSummaryService = require("./ai-summary-service");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Stream AI summary for an url.
|
|
14
|
+
* For hook specific to AI summary on as a smart link, please see useAISummaryAction.
|
|
15
|
+
*/
|
|
15
16
|
var useAISummary = exports.useAISummary = function useAISummary(props) {
|
|
16
17
|
var _AISummariesStore$get;
|
|
17
18
|
var url = props.url,
|
|
18
19
|
baseUrl = props.baseUrl,
|
|
19
|
-
headers = props.headers,
|
|
20
20
|
product = props.product,
|
|
21
21
|
ari = props.ari,
|
|
22
|
-
envKey = props.envKey
|
|
22
|
+
envKey = props.envKey,
|
|
23
|
+
onError = props.onError,
|
|
24
|
+
onStart = props.onStart,
|
|
25
|
+
onSuccess = props.onSuccess;
|
|
23
26
|
var _useState = (0, _react.useState)(((_AISummariesStore$get = _store.AISummariesStore.get(url)) === null || _AISummariesStore$get === void 0 ? void 0 : _AISummariesStore$get.state) || {
|
|
24
27
|
status: 'ready',
|
|
25
28
|
content: ''
|
|
@@ -27,28 +30,6 @@ var useAISummary = exports.useAISummary = function useAISummary(props) {
|
|
|
27
30
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
28
31
|
state = _useState2[0],
|
|
29
32
|
setState = _useState2[1];
|
|
30
|
-
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
31
|
-
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
32
|
-
var onStart = (0, _react.useCallback)(function (id) {
|
|
33
|
-
(0, _analytics.startUfoExperience)(EXPERIENCE_NAME, id);
|
|
34
|
-
}, []);
|
|
35
|
-
var onSuccess = (0, _react.useCallback)(function (id) {
|
|
36
|
-
fireEvent('operational.summary.success', {});
|
|
37
|
-
(0, _analytics.succeedUfoExperience)(EXPERIENCE_NAME, id);
|
|
38
|
-
}, [fireEvent]);
|
|
39
|
-
var onError = (0, _react.useCallback)(function (id, reason) {
|
|
40
|
-
/**
|
|
41
|
-
* Errors should only be counted to the SLO if they are not due to acceptable use violations
|
|
42
|
-
* HIPAA content detected or exceeding context length.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
var isSloError = reason === undefined ? true : !['ACCEPTABLE_USE_VIOLATIONS', 'HIPAA_CONTENT_DETECTED', 'EXCEEDING_CONTEXT_LENGTH_ERROR'].includes(reason);
|
|
46
|
-
fireEvent('operational.summary.failed', {
|
|
47
|
-
reason: reason || null,
|
|
48
|
-
isSloError: isSloError
|
|
49
|
-
});
|
|
50
|
-
(0, _analytics.failUfoExperience)(EXPERIENCE_NAME, id);
|
|
51
|
-
}, [fireEvent]);
|
|
52
33
|
(0, _react.useEffect)(function () {
|
|
53
34
|
var _AISummariesStore$get2;
|
|
54
35
|
//do not create a service for the empty URL string when the link data is not yet available,
|
|
@@ -58,18 +39,17 @@ var useAISummary = exports.useAISummary = function useAISummary(props) {
|
|
|
58
39
|
url: url,
|
|
59
40
|
ari: ari,
|
|
60
41
|
baseUrl: baseUrl,
|
|
61
|
-
|
|
42
|
+
product: product,
|
|
43
|
+
envKey: envKey,
|
|
62
44
|
onError: onError,
|
|
63
45
|
onStart: onStart,
|
|
64
|
-
onSuccess: onSuccess
|
|
65
|
-
product: product,
|
|
66
|
-
envKey: envKey
|
|
46
|
+
onSuccess: onSuccess
|
|
67
47
|
}));
|
|
68
48
|
}
|
|
69
49
|
|
|
70
50
|
//returns function that calls unsubscribe method
|
|
71
51
|
return (_AISummariesStore$get2 = _store.AISummariesStore.get(url)) === null || _AISummariesStore$get2 === void 0 ? void 0 : _AISummariesStore$get2.subscribe(setState);
|
|
72
|
-
}, [url, baseUrl,
|
|
52
|
+
}, [url, baseUrl, onError, onStart, onSuccess, product, ari, envKey]);
|
|
73
53
|
var summariseUrl = function summariseUrl() {
|
|
74
54
|
var _AISummariesStore$get3;
|
|
75
55
|
return (_AISummariesStore$get3 = _store.AISummariesStore.get(url)) === null || _AISummariesStore$get3 === void 0 ? void 0 : _AISummariesStore$get3.summariseUrl();
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
|
|
10
|
+
var _analytics = require("../../analytics");
|
|
11
|
+
var _store = require("../../store");
|
|
12
|
+
var _useAiSummary = require("../use-ai-summary");
|
|
13
|
+
var _useAiSummaryConfig = require("../use-ai-summary-config");
|
|
14
|
+
var EXPERIENCE_NAME = 'smart-link-ai-summary';
|
|
15
|
+
var useAISummaryAction = function useAISummaryAction(url) {
|
|
16
|
+
var _cardState$details;
|
|
17
|
+
var _useAISummaryConfig = (0, _useAiSummaryConfig.useAISummaryConfig)(),
|
|
18
|
+
baseUrl = _useAISummaryConfig.baseUrl,
|
|
19
|
+
envKey = _useAISummaryConfig.envKey,
|
|
20
|
+
product = _useAISummaryConfig.product;
|
|
21
|
+
var cardState = (0, _store.useSmartCardState)(url);
|
|
22
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
23
|
+
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
24
|
+
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
25
|
+
var ari = data && (0, _linkExtractors.extractAri)(data);
|
|
26
|
+
var dataUrl = data && (0, _linkExtractors.extractLink)(data) || '';
|
|
27
|
+
var onStart = (0, _react.useCallback)(function (id) {
|
|
28
|
+
(0, _analytics.startUfoExperience)(EXPERIENCE_NAME, id);
|
|
29
|
+
}, []);
|
|
30
|
+
var onSuccess = (0, _react.useCallback)(function (id) {
|
|
31
|
+
fireEvent('operational.summary.success', {});
|
|
32
|
+
(0, _analytics.succeedUfoExperience)(EXPERIENCE_NAME, id);
|
|
33
|
+
}, [fireEvent]);
|
|
34
|
+
var onError = (0, _react.useCallback)(function (id, reason) {
|
|
35
|
+
/**
|
|
36
|
+
* Errors should only be counted to the SLO if they are not due to acceptable use violations
|
|
37
|
+
* HIPAA content detected or exceeding context length.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
var isSloError = reason === undefined ? true : !['ACCEPTABLE_USE_VIOLATIONS', 'HIPAA_CONTENT_DETECTED', 'EXCEEDING_CONTEXT_LENGTH_ERROR'].includes(reason);
|
|
41
|
+
fireEvent('operational.summary.failed', {
|
|
42
|
+
reason: reason || null,
|
|
43
|
+
isSloError: isSloError
|
|
44
|
+
});
|
|
45
|
+
(0, _analytics.failUfoExperience)(EXPERIENCE_NAME, id);
|
|
46
|
+
}, [fireEvent]);
|
|
47
|
+
return (0, _useAiSummary.useAISummary)({
|
|
48
|
+
url: dataUrl,
|
|
49
|
+
ari: ari,
|
|
50
|
+
product: product,
|
|
51
|
+
envKey: envKey,
|
|
52
|
+
baseUrl: baseUrl,
|
|
53
|
+
onStart: onStart,
|
|
54
|
+
onSuccess: onSuccess,
|
|
55
|
+
onError: onError
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var _default = exports.default = useAISummaryAction;
|
|
@@ -8,12 +8,15 @@ var _linkProvider = require("@atlaskit/link-provider");
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var useAISummaryConfig = exports.useAISummaryConfig = function useAISummaryConfig() {
|
|
10
10
|
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
11
|
+
connections = _useSmartLinkContext.connections,
|
|
11
12
|
product = _useSmartLinkContext.product,
|
|
12
13
|
isAdminHubAIEnabled = _useSmartLinkContext.isAdminHubAIEnabled;
|
|
13
14
|
return (0, _react.useMemo)(function () {
|
|
14
15
|
return {
|
|
16
|
+
baseUrl: connections.client.baseUrlOverride,
|
|
17
|
+
envKey: connections.client.envKey,
|
|
15
18
|
product: product,
|
|
16
19
|
isAdminHubAIEnabled: isAdminHubAIEnabled
|
|
17
20
|
};
|
|
18
|
-
}, [product, isAdminHubAIEnabled]);
|
|
21
|
+
}, [connections.client.baseUrlOverride, connections.client.envKey, product, isAdminHubAIEnabled]);
|
|
19
22
|
};
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "27.
|
|
25
|
+
packageVersion: "27.6.1"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/utils/mocks.js
CHANGED
|
@@ -11,8 +11,12 @@ var _react2 = require("react");
|
|
|
11
11
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
12
12
|
var _ActionIcon = require("./ActionIcon");
|
|
13
13
|
/** @jsx jsx */
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
15
|
|
|
15
16
|
var spinnerDelay = exports.spinnerDelay = 1000;
|
|
17
|
+
var baseTextStyles = (0, _react.css)({
|
|
18
|
+
transition: 'opacity 0.3s'
|
|
19
|
+
});
|
|
16
20
|
var Action = exports.Action = function Action(_ref) {
|
|
17
21
|
var promise = _ref.promise,
|
|
18
22
|
text = _ref.text,
|
|
@@ -45,10 +49,9 @@ var Action = exports.Action = function Action(_ref) {
|
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
}, (0, _react.jsx)("div", {
|
|
48
|
-
css: {
|
|
49
|
-
transition: 'opacity 0.3s',
|
|
52
|
+
css: [baseTextStyles, {
|
|
50
53
|
opacity: state !== 'init' ? 0 : 1
|
|
51
|
-
}
|
|
54
|
+
}]
|
|
52
55
|
}, text), (0, _react.jsx)(_ActionIcon.ActionIcon, {
|
|
53
56
|
state: state
|
|
54
57
|
}));
|
|
@@ -18,16 +18,21 @@ var _utils = require("../../common/utils");
|
|
|
18
18
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
19
19
|
var _excluded = ["triggerRef"];
|
|
20
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
var buttonStyles = (0, _react.css)({
|
|
25
|
+
height: 'auto'
|
|
26
|
+
});
|
|
23
27
|
var ActionList = exports.ActionList = function ActionList(_ref) {
|
|
24
28
|
var items = _ref.items;
|
|
25
29
|
var actionsToShow = items.slice(0, 2);
|
|
26
30
|
var actionsToList = items.slice(2, items.length);
|
|
27
31
|
return (0, _react.jsx)("div", {
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
28
33
|
css: (0, _utils.mq)({
|
|
29
34
|
display: 'flex',
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
31
36
|
marginTop: [(0, _utils.gs)(2), 0]
|
|
32
37
|
})
|
|
33
38
|
}, (0, _react.jsx)(_buttonGroup.default, null, actionsToShow.map(function (action) {
|
|
@@ -35,7 +40,7 @@ var ActionList = exports.ActionList = function ActionList(_ref) {
|
|
|
35
40
|
key: action.id
|
|
36
41
|
}, action));
|
|
37
42
|
})), actionsToList.length ?
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
39
44
|
(0, _react.jsx)("div", {
|
|
40
45
|
css: {
|
|
41
46
|
marginLeft: (0, _utils.gs)(0.5)
|
|
@@ -49,9 +54,7 @@ var ActionList = exports.ActionList = function ActionList(_ref) {
|
|
|
49
54
|
label: "more"
|
|
50
55
|
}),
|
|
51
56
|
ref: triggerRef,
|
|
52
|
-
css:
|
|
53
|
-
height: 'auto'
|
|
54
|
-
},
|
|
57
|
+
css: buttonStyles,
|
|
55
58
|
testId: "dropdown-trigger"
|
|
56
59
|
}));
|
|
57
60
|
},
|
|
@@ -9,6 +9,7 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
10
10
|
var _utils = require("../../common/utils");
|
|
11
11
|
/** @jsx jsx */
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
13
|
|
|
13
14
|
var CollaboratorList = exports.CollaboratorList = function CollaboratorList(_ref) {
|
|
14
15
|
var items = _ref.items,
|
|
@@ -21,25 +22,28 @@ var CollaboratorList = exports.CollaboratorList = function CollaboratorList(_ref
|
|
|
21
22
|
if (items.length === 0) {
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
24
|
-
return (
|
|
25
|
-
css
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
event
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
event
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
return (
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
27
|
+
(0, _react.jsx)("span", {
|
|
28
|
+
css: (0, _utils.mq)({
|
|
29
|
+
display: ['none', 'inherit']
|
|
30
|
+
})
|
|
31
|
+
}, (0, _react.jsx)(_avatarGroup.default, {
|
|
32
|
+
maxCount: 4,
|
|
33
|
+
appearance: "stack",
|
|
34
|
+
size: "small",
|
|
35
|
+
data: items,
|
|
36
|
+
onAvatarClick: function onAvatarClick(event) {
|
|
37
|
+
event.stopPropagation();
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
handleAvatarClick(event);
|
|
40
|
+
},
|
|
41
|
+
onMoreClick: function onMoreClick(event) {
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
handleMoreAvatarsClick(event);
|
|
45
|
+
},
|
|
46
|
+
testId: testId
|
|
47
|
+
}))
|
|
48
|
+
);
|
|
45
49
|
};
|
|
@@ -7,6 +7,7 @@ exports.blockCardContentClassName = exports.Content = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _utils = require("../../common/utils");
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Class name for selecting non-flexible block card content
|
|
@@ -20,8 +21,9 @@ var Content = exports.Content = function Content(_ref) {
|
|
|
20
21
|
_ref$isCompact = _ref.isCompact,
|
|
21
22
|
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
22
23
|
return (0, _react.jsx)("div", {
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
23
25
|
css: (0, _utils.mq)({
|
|
24
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
27
|
padding: isCompact ? (0, _utils.gs)(1) : (0, _utils.gs)(2),
|
|
26
28
|
display: 'flex',
|
|
27
29
|
flexDirection: 'column',
|
|
@@ -7,6 +7,7 @@ exports.contentFooterClassName = exports.ContentFooter = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _utils = require("../../common/utils");
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
|
|
11
12
|
var contentFooterClassName = exports.contentFooterClassName = 'smart-link-content-footer';
|
|
12
13
|
var ContentFooter = exports.ContentFooter = function ContentFooter(_ref) {
|
|
@@ -14,13 +15,14 @@ var ContentFooter = exports.ContentFooter = function ContentFooter(_ref) {
|
|
|
14
15
|
_ref$hasSpaceBetween = _ref.hasSpaceBetween,
|
|
15
16
|
hasSpaceBetween = _ref$hasSpaceBetween === void 0 ? false : _ref$hasSpaceBetween;
|
|
16
17
|
return (0, _react.jsx)("div", {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
19
|
css: (0, _utils.mq)({
|
|
18
20
|
display: 'flex',
|
|
19
21
|
flexDirection: ['column', 'row'],
|
|
20
22
|
flexGrow: [1, 'unset'],
|
|
21
23
|
justifyContent: [hasSpaceBetween ? 'space-between' : 'flex-end', 'space-between'],
|
|
22
24
|
alignItems: ['unset', 'center'],
|
|
23
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
24
26
|
marginTop: [(0, _utils.gs)(1), (0, _utils.gs)(1.5)]
|
|
25
27
|
})
|
|
26
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -7,6 +7,7 @@ exports.blockCardContentHeaderClassName = exports.ContentHeader = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Class name for selecting non-flexible block card header
|
|
@@ -15,6 +16,13 @@ var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
|
15
16
|
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
17
|
*/
|
|
17
18
|
var blockCardContentHeaderClassName = exports.blockCardContentHeaderClassName = 'block-card-content-header';
|
|
19
|
+
var styles = (0, _react.css)({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'flex-start',
|
|
22
|
+
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
23
|
+
// due to HTML its unwrapping behaviour on paste.
|
|
24
|
+
MozUserSelect: 'none'
|
|
25
|
+
});
|
|
18
26
|
var ContentHeader = exports.ContentHeader = function ContentHeader(_ref) {
|
|
19
27
|
var onClick = _ref.onClick,
|
|
20
28
|
link = _ref.link,
|
|
@@ -25,13 +33,7 @@ var ContentHeader = exports.ContentHeader = function ContentHeader(_ref) {
|
|
|
25
33
|
onMouseDown: onMouseDown,
|
|
26
34
|
href: link,
|
|
27
35
|
target: "_blank",
|
|
28
|
-
css:
|
|
29
|
-
display: 'flex',
|
|
30
|
-
alignItems: 'flex-start',
|
|
31
|
-
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
32
|
-
// due to HTML its unwrapping behaviour on paste.
|
|
33
|
-
MozUserSelect: 'none'
|
|
34
|
-
},
|
|
36
|
+
css: styles,
|
|
35
37
|
"data-trello-do-not-use-override": "block-card-content-header"
|
|
36
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
37
39
|
,
|
|
@@ -9,17 +9,21 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
var _react2 = _interopRequireDefault(require("react"));
|
|
10
10
|
var _utils = require("../../common/utils");
|
|
11
11
|
/** @jsx jsx */
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
13
|
|
|
14
|
+
var styles = (0, _react.css)({
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
16
|
+
height: (0, _utils.gs)(2.5),
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
|
+
width: (0, _utils.gs)(2),
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
marginTop: "var(--ds-space-negative-025, -2px)"
|
|
23
|
+
});
|
|
13
24
|
var Emoji = exports.Emoji = function Emoji(_ref) {
|
|
14
25
|
var emoji = _ref.emoji;
|
|
15
26
|
return (0, _react.jsx)("span", {
|
|
16
|
-
css:
|
|
17
|
-
height: (0, _utils.gs)(2.5),
|
|
18
|
-
width: (0, _utils.gs)(2),
|
|
19
|
-
display: 'flex',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
justifyContent: 'center',
|
|
22
|
-
marginTop: "var(--ds-space-negative-025, -2px)"
|
|
23
|
-
}
|
|
27
|
+
css: styles
|
|
24
28
|
}, emoji);
|
|
25
29
|
};
|
|
@@ -11,7 +11,7 @@ var _react2 = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _utils = require("../../common/utils");
|
|
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
|
-
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; } /** @jsx jsx */
|
|
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; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
15
|
var Frame = exports.Frame = function Frame() {
|
|
16
16
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
17
17
|
isSelected: false,
|
|
@@ -34,13 +34,16 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
34
34
|
className = _ref.className,
|
|
35
35
|
isFluidHeight = _ref.isFluidHeight;
|
|
36
36
|
return (0, _react.jsx)("div", {
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
37
38
|
css: (0, _utils.mq)(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
38
39
|
'&:hover': isHoverable ? {
|
|
39
40
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
40
41
|
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20A, ")"),
|
|
41
42
|
cursor: 'pointer'
|
|
42
43
|
} : undefined,
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
43
45
|
minHeight: isFluidHeight ? 0 : [(0, _utils.gs)(21), (0, _utils.gs)(15)],
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
44
47
|
borderRadius: isSelected ? (0, _utils.br)() : (0, _utils.br)(0.5),
|
|
45
48
|
border: "2px solid ".concat(isSelected ? "var(--ds-border-selected, ".concat(_colors.B200, ")") : 'transparent'),
|
|
46
49
|
justifyContent: 'space-between',
|
|
@@ -62,18 +65,21 @@ var CompactFrame = exports.CompactFrame = function CompactFrame(_ref2) {
|
|
|
62
65
|
className = _ref2.className,
|
|
63
66
|
inheritDimensions = _ref2.inheritDimensions;
|
|
64
67
|
return (0, _react.jsx)("div", {
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
65
69
|
css: (0, _utils.mq)(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
66
70
|
'&:hover': isHoverable ? {
|
|
67
71
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")")
|
|
68
72
|
} : undefined,
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
69
74
|
borderRadius: isSelected ? (0, _utils.br)() : (0, _utils.br)(0.5),
|
|
70
75
|
border: isSelected ? "2px solid ".concat("var(--ds-border-selected, ".concat(_colors.B200, ")")) : '',
|
|
71
76
|
justifyContent: 'center',
|
|
72
77
|
alignItems: 'center',
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
73
79
|
height: inheritDimensions ? '100%' : (0, _utils.gs)(5),
|
|
74
80
|
backgroundColor: "var(--ds-background-neutral, ".concat(_colors.N20A, ")"),
|
|
75
81
|
width: ['calc(100% - 16px)', '100%'],
|
|
76
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
82
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
77
83
|
padding: ["0px ".concat((0, _utils.gs)(1)), '0']
|
|
78
84
|
})),
|
|
79
85
|
"data-testid": testId
|
|
@@ -7,7 +7,12 @@ exports.Link = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
|
|
12
|
+
var styles = (0, _react.css)({
|
|
13
|
+
color: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
14
|
+
wordBreak: 'break-all'
|
|
15
|
+
});
|
|
11
16
|
var Link = exports.Link = function Link(_ref) {
|
|
12
17
|
var url = _ref.url,
|
|
13
18
|
_ref$testId = _ref.testId,
|
|
@@ -18,9 +23,6 @@ var Link = exports.Link = function Link(_ref) {
|
|
|
18
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
19
24
|
,
|
|
20
25
|
className: className,
|
|
21
|
-
css:
|
|
22
|
-
color: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
23
|
-
wordBreak: 'break-all'
|
|
24
|
-
}
|
|
26
|
+
css: styles
|
|
25
27
|
}, url);
|
|
26
28
|
};
|