@atlaskit/smart-card 40.13.0 → 40.13.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 +8 -0
- package/dist/cjs/i18n/en.js +5 -0
- package/dist/cjs/i18n/en_GB.js +5 -0
- package/dist/cjs/i18n/en_ZZ.js +5 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +3 -0
- package/dist/cjs/view/EmbedCard/index.js +3 -0
- package/dist/cjs/view/InlineCard/index.js +3 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/i18n/en.js +5 -0
- package/dist/es2019/i18n/en_GB.js +5 -0
- package/dist/es2019/i18n/en_ZZ.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/index.js +2 -0
- package/dist/es2019/view/EmbedCard/index.js +2 -0
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/i18n/en.js +5 -0
- package/dist/esm/i18n/en_GB.js +5 -0
- package/dist/esm/i18n/en_ZZ.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/index.js +2 -0
- package/dist/esm/view/EmbedCard/index.js +2 -0
- package/dist/esm/view/InlineCard/index.js +2 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/action/extract-invoke-preview-action.d.ts +5 -5
- package/dist/types/extractors/common/actions/types.d.ts +2 -2
- package/dist/types/extractors/common/context/extractAccessContext.d.ts +2 -2
- package/dist/types/extractors/common/icon/extractIcon.d.ts +4 -4
- package/dist/types/extractors/common/icon/prioritiseIcon.d.ts +6 -6
- package/dist/types/extractors/common/lozenge/extractTaskType.d.ts +1 -1
- package/dist/types/extractors/common/lozenge/types.d.ts +1 -1
- package/dist/types/extractors/flexible/actions/index.d.ts +6 -6
- package/dist/types/extractors/flexible/extract-state.d.ts +2 -2
- package/dist/types/extractors/index.d.ts +3 -3
- package/dist/types/i18n/en.d.ts +5 -0
- package/dist/types/i18n/en_GB.d.ts +5 -0
- package/dist/types/i18n/en_ZZ.d.ts +5 -0
- package/dist/types/model/invoke-opts.d.ts +2 -2
- package/dist/types/ssr.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +105 -105
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +38 -38
- package/dist/types/state/hooks/use-ai-summary-config/types.d.ts +1 -1
- package/dist/types/state/hooks/use-invoke/types.d.ts +1 -1
- package/dist/types/state/hooks/useSmartLink.d.ts +2 -2
- package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +14 -14
- package/dist/types/state/modal/types.d.ts +4 -4
- package/dist/types/types.d.ts +2 -2
- package/dist/types/utils/analytics/LinkAnalyticsContext.d.ts +2 -2
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +3 -3
- package/dist/types/utils/analytics/types.d.ts +6 -6
- package/dist/types/view/BlockCard/types.d.ts +11 -11
- package/dist/types/view/BlockCard/views/utils/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +19 -19
- package/dist/types/view/CardWithUrl/types.d.ts +22 -22
- package/dist/types/view/EmbedCard/components/ErrorFrame.d.ts +4 -4
- package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +22 -22
- package/dist/types/view/EmbedCard/components/Frame.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/IFrame.d.ts +1 -1
- package/dist/types/view/EmbedCard/components/IframeDwellTracker.d.ts +1 -1
- package/dist/types/view/EmbedCard/components/ImageIcon.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types/view/EmbedCard/types.d.ts +13 -13
- package/dist/types/view/EmbedCard/useEmbedResolvePostMessageListener.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/ErroredView.d.ts +2 -2
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +20 -20
- package/dist/types/view/EmbedCard/views/forbidden-view/types.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/not-found-view/types.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/embed-content/types.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/link-info/types.d.ts +1 -1
- package/dist/types/view/EmbedModal/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/action/action-button/types.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +40 -40
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +10 -10
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +6 -6
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/utils/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/custom-unresolved-action/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/unresolved-action/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +13 -13
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +11 -11
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +35 -35
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +45 -45
- package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +5 -5
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/container/hover-card-control/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +12 -12
- package/dist/types/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +19 -19
- package/dist/types/view/FlexibleCard/components/elements/common/base-link-element/index.d.ts +10 -10
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +9 -9
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/elements/media-element/index.d.ts +6 -6
- package/dist/types/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/preview-element/index.d.ts +4 -4
- package/dist/types/view/FlexibleCard/types.d.ts +41 -41
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +3 -3
- package/dist/types/view/HoverCard/types.d.ts +26 -26
- package/dist/types/view/InlineCard/ErroredView/index.d.ts +7 -7
- package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +10 -10
- package/dist/types/view/InlineCard/Frame/index.d.ts +6 -6
- package/dist/types/view/InlineCard/Frame/styled.d.ts +3 -3
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +8 -8
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +15 -15
- package/dist/types/view/InlineCard/ResolvingView/index.d.ts +6 -6
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +14 -14
- package/dist/types/view/InlineCard/types.d.ts +11 -11
- package/dist/types/view/LinkUrl/types.d.ts +2 -2
- package/dist/types/view/RelatedLinksModal/components/EmptyState.d.ts +2 -2
- package/dist/types/view/RelatedLinksModal/components/types.d.ts +10 -10
- package/dist/types/view/RelatedLinksModal/types.d.ts +5 -5
- package/dist/types/view/common/Icon.d.ts +3 -3
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +5 -5
- package/dist/types/view/common/ai-prism/ai-glowing-border/types.d.ts +7 -7
- package/dist/types/view/common/ai-prism/types.d.ts +1 -1
- package/dist/types/view/common/ai-summary/types.d.ts +6 -6
- package/dist/types/view/common/render-svg.d.ts +2 -2
- package/dist/types/view/types.d.ts +6 -6
- package/dist/types-ts4.5/extractors/action/extract-invoke-preview-action.d.ts +5 -5
- package/dist/types-ts4.5/extractors/common/actions/types.d.ts +2 -2
- package/dist/types-ts4.5/extractors/common/context/extractAccessContext.d.ts +2 -2
- package/dist/types-ts4.5/extractors/common/icon/extractIcon.d.ts +4 -4
- package/dist/types-ts4.5/extractors/common/icon/prioritiseIcon.d.ts +6 -6
- package/dist/types-ts4.5/extractors/common/lozenge/extractTaskType.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/lozenge/types.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +6 -6
- package/dist/types-ts4.5/extractors/flexible/extract-state.d.ts +2 -2
- package/dist/types-ts4.5/extractors/index.d.ts +3 -3
- package/dist/types-ts4.5/i18n/en.d.ts +5 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +5 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +5 -0
- package/dist/types-ts4.5/model/invoke-opts.d.ts +2 -2
- package/dist/types-ts4.5/ssr.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +105 -105
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +38 -38
- package/dist/types-ts4.5/state/hooks/use-ai-summary-config/types.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +2 -2
- package/dist/types-ts4.5/state/hooks-external/useSmartLinkActions.d.ts +14 -14
- package/dist/types-ts4.5/state/modal/types.d.ts +4 -4
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/dist/types-ts4.5/utils/analytics/LinkAnalyticsContext.d.ts +2 -2
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +3 -3
- package/dist/types-ts4.5/utils/analytics/types.d.ts +6 -6
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +11 -11
- package/dist/types-ts4.5/view/BlockCard/views/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +19 -19
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +22 -22
- package/dist/types-ts4.5/view/EmbedCard/components/ErrorFrame.d.ts +4 -4
- package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrame.d.ts +22 -22
- package/dist/types-ts4.5/view/EmbedCard/components/Frame.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/components/IFrame.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/components/IframeDwellTracker.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/components/ImageIcon.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +13 -13
- package/dist/types-ts4.5/view/EmbedCard/useEmbedResolvePostMessageListener.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/ErroredView.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +20 -20
- package/dist/types-ts4.5/view/EmbedCard/views/forbidden-view/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/not-found-view/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/components/embed-content/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/types.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +40 -40
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +10 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +6 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/custom-unresolved-action/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/unresolved-action/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/types.d.ts +13 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/types.d.ts +11 -11
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +35 -35
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +45 -45
- package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +5 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +12 -12
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +19 -19
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-link-element/index.d.ts +10 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +9 -9
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/media-element/index.d.ts +6 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/preview-element/index.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +41 -41
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +3 -3
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +26 -26
- package/dist/types-ts4.5/view/InlineCard/ErroredView/index.d.ts +7 -7
- package/dist/types-ts4.5/view/InlineCard/ForbiddenView/index.d.ts +10 -10
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +6 -6
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +3 -3
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +8 -8
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +15 -15
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/index.d.ts +6 -6
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +14 -14
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +11 -11
- package/dist/types-ts4.5/view/LinkUrl/types.d.ts +2 -2
- package/dist/types-ts4.5/view/RelatedLinksModal/components/EmptyState.d.ts +2 -2
- package/dist/types-ts4.5/view/RelatedLinksModal/components/types.d.ts +10 -10
- package/dist/types-ts4.5/view/RelatedLinksModal/types.d.ts +5 -5
- package/dist/types-ts4.5/view/common/Icon.d.ts +3 -3
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +5 -5
- package/dist/types-ts4.5/view/common/ai-prism/ai-glowing-border/types.d.ts +7 -7
- package/dist/types-ts4.5/view/common/ai-prism/types.d.ts +1 -1
- package/dist/types-ts4.5/view/common/ai-summary/types.d.ts +6 -6
- package/dist/types-ts4.5/view/common/render-svg.d.ts +2 -2
- package/dist/types-ts4.5/view/types.d.ts +6 -6
- package/package.json +2 -3
|
@@ -7,42 +7,42 @@ export interface LinkAction {
|
|
|
7
7
|
* @example `delete-action`
|
|
8
8
|
*/
|
|
9
9
|
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Promise to invoke on triggering this action.
|
|
12
|
+
* @example Clicking on `Delete` leading to deletion of content.
|
|
13
|
+
*/
|
|
14
|
+
invoke: () => Promise<any>;
|
|
10
15
|
/**
|
|
11
16
|
* Text to render for the action.
|
|
12
17
|
* @description Use this in tooltips and UI.
|
|
13
18
|
* @example `Delete`.
|
|
14
19
|
*/
|
|
15
20
|
text: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Promise to invoke on triggering this action.
|
|
18
|
-
* @example Clicking on `Delete` leading to deletion of content.
|
|
19
|
-
*/
|
|
20
|
-
invoke: () => Promise<any>;
|
|
21
21
|
}
|
|
22
22
|
export interface UseSmartLinkActionsOpts {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @example https://start.atlassian.com
|
|
24
|
+
* Configure the visiblity of actions
|
|
26
25
|
*/
|
|
27
|
-
|
|
26
|
+
actionOptions?: CardActionOptions;
|
|
28
27
|
/**
|
|
29
28
|
* Appearance under which these actions will be invoked.
|
|
30
29
|
* @example `block` for card views.
|
|
31
30
|
*/
|
|
32
31
|
appearance: CardInnerAppearance;
|
|
32
|
+
/**
|
|
33
|
+
* Smart link origin that the action being invoked from.
|
|
34
|
+
*/
|
|
35
|
+
origin?: AnalyticsOrigin;
|
|
33
36
|
/**
|
|
34
37
|
* Platform on which actions are being invoked.
|
|
35
38
|
* @default 'web'
|
|
36
39
|
*/
|
|
37
40
|
platform?: JsonLd.Primitives.Platforms;
|
|
38
41
|
/**
|
|
39
|
-
* Smart
|
|
40
|
-
|
|
41
|
-
origin?: AnalyticsOrigin;
|
|
42
|
-
/**
|
|
43
|
-
* Configure the visiblity of actions
|
|
42
|
+
* Smart Link URL for which actions will be invoked.
|
|
43
|
+
* @example https://start.atlassian.com
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
url: string;
|
|
46
46
|
}
|
|
47
47
|
export declare function useSmartLinkActions({ url, appearance, origin, actionOptions, }: UseSmartLinkActionsOpts): {
|
|
48
48
|
id: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export type SmartLinkModalAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Remove modal component.
|
|
5
|
+
*/
|
|
6
|
+
close: () => void;
|
|
3
7
|
/**
|
|
4
8
|
* Insert a modal component on the root of Card or standalone HoverCard.
|
|
5
9
|
* This is to ensure that the modal would not be unmounted
|
|
6
10
|
* when HoverCard is unmounted.
|
|
7
11
|
*/
|
|
8
12
|
open: (node: JSX.Element) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Remove modal component.
|
|
11
|
-
*/
|
|
12
|
-
close: () => void;
|
|
13
13
|
};
|
|
14
14
|
export type SmartLinkModalProviderProps = {
|
|
15
15
|
children?: ReactNode;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export { type CardProps, type CardAppearance, type CardPlatform } from './view/C
|
|
|
8
8
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
9
9
|
export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
|
|
10
10
|
export interface LozengeProps {
|
|
11
|
-
text: string;
|
|
12
11
|
appearance?: LozengeColor;
|
|
13
|
-
style?: AtlaskitLozengeProps['style'];
|
|
14
12
|
isBold?: boolean;
|
|
13
|
+
style?: AtlaskitLozengeProps['style'];
|
|
14
|
+
text: string;
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type LinkAnalyticsContextProps = {
|
|
3
|
-
|
|
3
|
+
children?: React.ReactNode;
|
|
4
4
|
/**
|
|
5
5
|
* The display mode of the link
|
|
6
6
|
* @example 'url'
|
|
@@ -8,7 +8,7 @@ type LinkAnalyticsContextProps = {
|
|
|
8
8
|
display?: string | undefined;
|
|
9
9
|
id?: string | undefined;
|
|
10
10
|
source?: string;
|
|
11
|
-
|
|
11
|
+
url?: string;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
@@ -2,18 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import { getResolvedAttributes } from '@atlaskit/link-analytics/resolved-attributes';
|
|
3
3
|
import { context } from './analytics';
|
|
4
4
|
type SmartLinkAnalyticsContextProps = {
|
|
5
|
-
|
|
5
|
+
children?: React.ReactNode;
|
|
6
6
|
display?: string;
|
|
7
7
|
id?: string | undefined;
|
|
8
8
|
source?: string;
|
|
9
|
-
|
|
9
|
+
url: string;
|
|
10
10
|
};
|
|
11
11
|
type SmartLinkAnalyticsContextType = {
|
|
12
|
-
source?: string;
|
|
13
12
|
attributes?: typeof context & ReturnType<typeof getResolvedAttributes> & {
|
|
14
13
|
display?: string;
|
|
15
14
|
id?: string;
|
|
16
15
|
};
|
|
16
|
+
source?: string;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Provides an analytics context data to supply attributes to events based on a URL
|
|
@@ -3,10 +3,6 @@ export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
|
3
3
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
4
4
|
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'previewPanel' | 'unknown';
|
|
5
5
|
export type UiLinkClickedEventProps = {
|
|
6
|
-
/**
|
|
7
|
-
* Whether the click occurred with the left, middle or right mouse button
|
|
8
|
-
*/
|
|
9
|
-
clickType: ClickType;
|
|
10
6
|
/**
|
|
11
7
|
* The user outcome for clicking the link as far as can be reasonably be determined
|
|
12
8
|
* This ignores any programmatic cancellation of the outcome (ie e.preventDefault()) and
|
|
@@ -14,11 +10,15 @@ export type UiLinkClickedEventProps = {
|
|
|
14
10
|
*/
|
|
15
11
|
clickOutcome: ClickOutcome;
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
13
|
+
* Whether the click occurred with the left, middle or right mouse button
|
|
18
14
|
*/
|
|
19
|
-
|
|
15
|
+
clickType: ClickType;
|
|
20
16
|
/**
|
|
21
17
|
* Whether the browser's default behaviour was prevented programmatically
|
|
22
18
|
*/
|
|
23
19
|
defaultPrevented: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The keys held by the user at the time of clicking the link (which influence `clickOutcome`)
|
|
22
|
+
*/
|
|
23
|
+
keysHeld: ('alt' | 'ctrl' | 'meta' | 'shift')[];
|
|
24
24
|
};
|
|
@@ -3,21 +3,21 @@ import { type CardState } from '../../state/types';
|
|
|
3
3
|
import { type CardActionOptions, type OnResolveCallback } from '../Card/types';
|
|
4
4
|
import { type OnErrorCallback } from '../types';
|
|
5
5
|
export type BlockCardProps = {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
cardState: CardState;
|
|
6
|
+
actionOptions?: CardActionOptions;
|
|
9
7
|
authFlow?: CardAuthFlowOpts['authFlow'];
|
|
8
|
+
cardState: CardState;
|
|
9
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
10
|
+
linkType?: string;
|
|
11
|
+
sourceUrl: string;
|
|
12
|
+
}>;
|
|
10
13
|
handleAuthorize: (() => void) | undefined;
|
|
11
14
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
15
|
+
hideIconLoadingSkeleton?: boolean;
|
|
16
|
+
id: string;
|
|
12
17
|
isSelected?: boolean;
|
|
13
|
-
onResolve?: OnResolveCallback;
|
|
14
18
|
onError?: OnErrorCallback;
|
|
15
|
-
|
|
16
|
-
actionOptions?: CardActionOptions;
|
|
19
|
+
onResolve?: OnResolveCallback;
|
|
17
20
|
renderers?: CardProviderRenderers;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
linkType?: string;
|
|
21
|
-
}>;
|
|
22
|
-
hideIconLoadingSkeleton?: boolean;
|
|
21
|
+
testId?: string;
|
|
22
|
+
url: string;
|
|
23
23
|
};
|
|
@@ -5,9 +5,9 @@ import type { ElementItem } from '../../../FlexibleCard/components/blocks/types'
|
|
|
5
5
|
import { type InternalFlexibleUiOptions } from '../../../FlexibleCard/types';
|
|
6
6
|
export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
|
|
7
7
|
type SimulatedMetadata = {
|
|
8
|
+
bottomMetadata?: ElementItem[];
|
|
8
9
|
titleMetadata: ElementItem[];
|
|
9
10
|
topMetadata: ElementItem[];
|
|
10
|
-
bottomMetadata?: ElementItem[];
|
|
11
11
|
};
|
|
12
12
|
export declare const FlexibleCardUiOptions: InternalFlexibleUiOptions;
|
|
13
13
|
export declare const titleBlockOptions: Partial<TitleBlockProps>;
|
|
@@ -9,9 +9,9 @@ export type { CardAppearance, CardPlatform };
|
|
|
9
9
|
export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
10
10
|
export type EmbedIframeUrlType = 'href' | 'interactiveHref';
|
|
11
11
|
export type OnResolveCallback = (data: {
|
|
12
|
-
url?: string;
|
|
13
|
-
title?: string;
|
|
14
12
|
aspectRatio?: number;
|
|
13
|
+
title?: string;
|
|
14
|
+
url?: string;
|
|
15
15
|
}) => void;
|
|
16
16
|
export declare enum CardAction {
|
|
17
17
|
DownloadAction = "DownloadAction",
|
|
@@ -26,8 +26,8 @@ export declare enum CardAction {
|
|
|
26
26
|
export type CardActionOptions = {
|
|
27
27
|
hide: true;
|
|
28
28
|
} | {
|
|
29
|
-
hide: false;
|
|
30
29
|
exclude?: Array<CardAction>;
|
|
30
|
+
hide: false;
|
|
31
31
|
};
|
|
32
32
|
interface ActionProps {
|
|
33
33
|
/**
|
|
@@ -39,26 +39,38 @@ interface ActionProps {
|
|
|
39
39
|
actionOptions?: CardActionOptions;
|
|
40
40
|
}
|
|
41
41
|
interface HoverPreviewProps extends ActionProps {
|
|
42
|
-
/**
|
|
43
|
-
* Flag to display hover preview on hover.
|
|
44
|
-
*/
|
|
45
|
-
showHoverPreview?: boolean;
|
|
46
42
|
/**
|
|
47
43
|
* Configuration for hover card.
|
|
48
44
|
*/
|
|
49
45
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
46
|
+
/**
|
|
47
|
+
* Flag to display hover preview on hover.
|
|
48
|
+
*/
|
|
49
|
+
showHoverPreview?: boolean;
|
|
50
50
|
}
|
|
51
51
|
export interface BaseCardProps {
|
|
52
52
|
/**
|
|
53
53
|
* Define smart card default appearance.
|
|
54
54
|
*/
|
|
55
55
|
appearance: CardAppearance;
|
|
56
|
+
/**
|
|
57
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
58
|
+
*/
|
|
59
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
60
|
+
linkType?: string;
|
|
61
|
+
sourceUrl: string;
|
|
62
|
+
}>;
|
|
56
63
|
/**
|
|
57
64
|
* The container which `react-lazily-render` listens to for scroll events.
|
|
58
65
|
* This property can be used in a scenario where you want to specify your own scroll container
|
|
59
66
|
* while the Card component is (lazy)loading.
|
|
60
67
|
*/
|
|
61
68
|
container?: HTMLElement;
|
|
69
|
+
/**
|
|
70
|
+
* When Preview panel is supported, onClick is ignored and the panel opens by default.
|
|
71
|
+
* This prop allows smartlinks inside of editor to bypass that as they have other ways to open Preview panel.
|
|
72
|
+
*/
|
|
73
|
+
disablePreviewPanel?: boolean;
|
|
62
74
|
/**
|
|
63
75
|
* A React component responsible for returning a fallback UI when smart link fails to render because of uncaught errors.
|
|
64
76
|
*/
|
|
@@ -104,18 +116,6 @@ export interface BaseCardProps {
|
|
|
104
116
|
* The url link of the resource to be resolved and shown as Smart Link.
|
|
105
117
|
*/
|
|
106
118
|
url?: string;
|
|
107
|
-
/**
|
|
108
|
-
* Competitor Prompt Component for Competitor link experiment
|
|
109
|
-
*/
|
|
110
|
-
CompetitorPrompt?: React.ComponentType<{
|
|
111
|
-
sourceUrl: string;
|
|
112
|
-
linkType?: string;
|
|
113
|
-
}>;
|
|
114
|
-
/**
|
|
115
|
-
* When Preview panel is supported, onClick is ignored and the panel opens by default.
|
|
116
|
-
* This prop allows smartlinks inside of editor to bypass that as they have other ways to open Preview panel.
|
|
117
|
-
*/
|
|
118
|
-
disablePreviewPanel?: boolean;
|
|
119
119
|
}
|
|
120
120
|
export interface InlineProps extends HoverPreviewProps {
|
|
121
121
|
/**
|
|
@@ -5,35 +5,35 @@ import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
|
5
5
|
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
6
6
|
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
7
7
|
export type CardWithUrlContentProps = {
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
8
|
+
actionOptions?: CardActionOptions;
|
|
10
9
|
appearance: CardAppearance;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
12
|
+
linkType?: string;
|
|
13
|
+
sourceUrl: string;
|
|
14
|
+
}>;
|
|
16
15
|
container?: HTMLElement;
|
|
17
|
-
|
|
18
|
-
onResolve?: OnResolveCallback;
|
|
19
|
-
onError?: OnErrorCallback;
|
|
20
|
-
actionOptions?: CardActionOptions;
|
|
21
|
-
inheritDimensions?: boolean;
|
|
16
|
+
disablePreviewPanel?: boolean;
|
|
22
17
|
embedIframeRef?: React.Ref<HTMLIFrameElement>;
|
|
23
18
|
embedIframeUrlType?: EmbedIframeUrlType;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
children?: React.ReactNode;
|
|
27
|
-
showHoverPreview?: boolean;
|
|
19
|
+
frameStyle?: FrameStyle;
|
|
20
|
+
hideIconLoadingSkeleton?: boolean;
|
|
28
21
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
22
|
+
id: string;
|
|
23
|
+
inheritDimensions?: boolean;
|
|
24
|
+
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
25
|
+
isHovered?: boolean;
|
|
26
|
+
isSelected?: boolean;
|
|
27
|
+
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
28
|
+
onError?: OnErrorCallback;
|
|
29
|
+
onResolve?: OnResolveCallback;
|
|
29
30
|
placeholder?: string;
|
|
31
|
+
platform?: CardPlatform;
|
|
30
32
|
removeTextHighlightingFromTitle?: boolean;
|
|
31
33
|
resolvingPlaceholder?: string;
|
|
34
|
+
showHoverPreview?: boolean;
|
|
35
|
+
testId?: string;
|
|
32
36
|
truncateInline?: boolean;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
linkType?: string;
|
|
36
|
-
}>;
|
|
37
|
-
hideIconLoadingSkeleton?: boolean;
|
|
38
|
-
disablePreviewPanel?: boolean;
|
|
37
|
+
ui?: FlexibleUiOptions;
|
|
38
|
+
url: string;
|
|
39
39
|
};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export interface FrameProps {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
8
9
|
compact?: boolean;
|
|
9
|
-
|
|
10
|
-
isHoverable?: boolean;
|
|
10
|
+
inheritDimensions?: boolean;
|
|
11
11
|
isFluidHeight?: boolean;
|
|
12
|
+
isHoverable?: boolean;
|
|
13
|
+
isSelected?: boolean;
|
|
12
14
|
testId?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
inheritDimensions?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export declare const Frame: (props?: FrameProps) => JSX.Element;
|
|
17
17
|
export declare const ExpandedFrame: ({ children, isSelected, isHoverable, testId, className, isFluidHeight, }: FrameProps) => JSX.Element;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { type FrameStyle } from '../types';
|
|
2
2
|
export interface ExpandedFrameProps {
|
|
3
|
-
isPlaceholder?: boolean;
|
|
4
|
-
href?: string;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
text?: React.ReactNode;
|
|
7
|
-
minWidth?: number;
|
|
8
|
-
maxWidth?: number;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
11
|
-
isSelected?: boolean;
|
|
12
|
-
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
13
|
-
frameStyle?: FrameStyle;
|
|
14
|
-
/** The optional click handler */
|
|
15
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
16
|
-
/** For testing purposes only */
|
|
17
|
-
testId?: string;
|
|
18
|
-
/** If dimensions of the card are to be inherited from the parent */
|
|
19
|
-
inheritDimensions?: boolean;
|
|
20
3
|
/**
|
|
21
4
|
* To enable scrolling in use cases where the content will not have it's own scrollbar.
|
|
22
5
|
*
|
|
@@ -25,6 +8,25 @@ export interface ExpandedFrameProps {
|
|
|
25
8
|
* Always enable this when when the card is not resolved so the connect account button is not hiddden.
|
|
26
9
|
*/
|
|
27
10
|
allowScrollBar?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/** Component to prompt for competitor link */
|
|
13
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
14
|
+
linkType?: string;
|
|
15
|
+
sourceUrl: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
18
|
+
frameStyle?: FrameStyle;
|
|
19
|
+
href?: string;
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/** If dimensions of the card are to be inherited from the parent */
|
|
22
|
+
inheritDimensions?: boolean;
|
|
23
|
+
isPlaceholder?: boolean;
|
|
24
|
+
/** A flag that determines whether the card is selected in edit mode. */
|
|
25
|
+
isSelected?: boolean;
|
|
26
|
+
maxWidth?: number;
|
|
27
|
+
minWidth?: number;
|
|
28
|
+
/** The optional click handler */
|
|
29
|
+
onClick?: (evt: React.MouseEvent) => void;
|
|
28
30
|
/**
|
|
29
31
|
* Should the CSS `overflow` property be set to hidden or auto (clipping or
|
|
30
32
|
* supporting a scroll bar), or left out altogether.
|
|
@@ -35,10 +37,8 @@ export interface ExpandedFrameProps {
|
|
|
35
37
|
* @default true
|
|
36
38
|
*/
|
|
37
39
|
setOverflow?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
linkType?: string;
|
|
42
|
-
}>;
|
|
40
|
+
/** For testing purposes only */
|
|
41
|
+
testId?: string;
|
|
42
|
+
text?: React.ReactNode;
|
|
43
43
|
}
|
|
44
44
|
export declare const ExpandedFrame: ({ isPlaceholder, children, onClick, icon, text, isSelected, frameStyle, href, minWidth, maxWidth, testId, inheritDimensions, allowScrollBar, setOverflow, CompetitorPrompt, }: ExpandedFrameProps) => JSX.Element;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export interface FrameProps {
|
|
7
|
-
url?: string;
|
|
8
7
|
isTrusted?: boolean;
|
|
9
|
-
testId?: string;
|
|
10
8
|
onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
|
|
11
9
|
onIframeFocus?: () => void;
|
|
10
|
+
testId?: string;
|
|
12
11
|
title?: string;
|
|
12
|
+
url?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const Frame: React.ForwardRefExoticComponent<FrameProps & React.RefAttributes<HTMLIFrameElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface IframeDwellTrackerProps {
|
|
2
|
+
iframePercentVisible: number;
|
|
2
3
|
isIframeLoaded: boolean;
|
|
3
4
|
isMouseOver: boolean;
|
|
4
5
|
isWindowFocused: boolean;
|
|
5
|
-
iframePercentVisible: number;
|
|
6
6
|
onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const IframeDwellTracker: ({ isIframeLoaded, isMouseOver, isWindowFocused, iframePercentVisible, onIframeDwell, }: IframeDwellTrackerProps) => null;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export interface ImageIconProps {
|
|
7
7
|
alt?: string;
|
|
8
|
+
appearance?: 'square' | 'round';
|
|
9
|
+
default?: React.ReactElement;
|
|
8
10
|
size?: number;
|
|
9
11
|
src?: string;
|
|
10
12
|
title?: string;
|
|
11
|
-
default?: React.ReactElement;
|
|
12
|
-
appearance?: 'square' | 'round';
|
|
13
13
|
}
|
|
14
14
|
export declare const ImageIcon: ({ alt, src, size, title, default: defaultIcon, appearance, }: ImageIconProps) => JSX.Element | null;
|
|
@@ -2,29 +2,29 @@ import type { FrameStyle } from '../types';
|
|
|
2
2
|
export declare const className = "media-card-frame";
|
|
3
3
|
export declare const embedHeaderHeight = 32;
|
|
4
4
|
export interface WrapperProps {
|
|
5
|
-
|
|
6
|
-
maxWidth?: number;
|
|
7
|
-
isInteractive?: boolean;
|
|
8
|
-
isSelected?: boolean;
|
|
5
|
+
className?: string;
|
|
9
6
|
frameStyle?: FrameStyle;
|
|
10
7
|
inheritDimensions?: boolean;
|
|
11
|
-
|
|
8
|
+
isInteractive?: boolean;
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
maxWidth?: number;
|
|
11
|
+
minWidth?: number;
|
|
12
12
|
}
|
|
13
13
|
export interface HeaderProps {
|
|
14
14
|
frameStyle?: FrameStyle;
|
|
15
15
|
}
|
|
16
16
|
export interface ContentProps {
|
|
17
|
-
isInteractive: boolean;
|
|
18
17
|
/**
|
|
19
18
|
* Whether to show a scroll bar (use overflow: auto) or hide overflow (overflow:hidden).
|
|
20
19
|
* Always set to true for unresolved embeds, otherwise the connect account button may be hidden and unreachable.
|
|
21
20
|
*/
|
|
22
21
|
allowScrollBar: boolean;
|
|
22
|
+
frameStyle?: FrameStyle;
|
|
23
|
+
isInteractive: boolean;
|
|
23
24
|
/**
|
|
24
25
|
* Remove the overflow: ... CSS property altogether.
|
|
25
26
|
*/
|
|
26
27
|
removeOverflow?: boolean;
|
|
27
|
-
frameStyle?: FrameStyle;
|
|
28
28
|
}
|
|
29
29
|
export interface ImageProps {
|
|
30
30
|
size: number;
|
|
@@ -5,29 +5,29 @@ import { type CardState } from '../../state/types';
|
|
|
5
5
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
6
6
|
import { type OnErrorCallback } from '../types';
|
|
7
7
|
export type EmbedCardProps = {
|
|
8
|
-
|
|
8
|
+
actionOptions?: CardActionOptions;
|
|
9
9
|
cardState: CardState;
|
|
10
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
11
|
+
linkType?: string;
|
|
12
|
+
sourceUrl: string;
|
|
13
|
+
}>;
|
|
14
|
+
frameStyle?: FrameStyle;
|
|
10
15
|
handleAuthorize: (() => void) | undefined;
|
|
11
16
|
handleErrorRetry: () => void;
|
|
12
17
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
13
18
|
handleInvoke: InvokeHandler;
|
|
14
19
|
id?: string;
|
|
20
|
+
iframeUrlType?: EmbedIframeUrlType;
|
|
21
|
+
inheritDimensions?: boolean;
|
|
15
22
|
isSelected?: boolean;
|
|
16
|
-
frameStyle?: FrameStyle;
|
|
17
|
-
platform?: CardPlatform;
|
|
18
|
-
onResolve?: OnResolveCallback;
|
|
19
23
|
onError?: OnErrorCallback;
|
|
20
|
-
testId?: string;
|
|
21
|
-
inheritDimensions?: boolean;
|
|
22
|
-
actionOptions?: CardActionOptions;
|
|
23
24
|
onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
|
|
24
25
|
onIframeFocus?: () => void;
|
|
25
|
-
|
|
26
|
+
onResolve?: OnResolveCallback;
|
|
27
|
+
platform?: CardPlatform;
|
|
26
28
|
renderers?: CardProviderRenderers;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
linkType?: string;
|
|
30
|
-
}>;
|
|
29
|
+
testId?: string;
|
|
30
|
+
url: string;
|
|
31
31
|
};
|
|
32
32
|
export interface WithShowControlMethodProp {
|
|
33
33
|
showControls?: () => void;
|
|
@@ -41,8 +41,8 @@ export type AccessTypes = 'REQUEST_ACCESS' | 'PENDING_REQUEST_EXISTS' | 'FORBIDD
|
|
|
41
41
|
export interface AccessContext {
|
|
42
42
|
accessType?: AccessTypes;
|
|
43
43
|
cloudId?: string;
|
|
44
|
-
url?: string;
|
|
45
44
|
smartLinksAccessMetadataExperimentCohort?: 'experiment' | 'control' | 'not-enrolled';
|
|
45
|
+
url?: string;
|
|
46
46
|
}
|
|
47
47
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
48
48
|
export type FrameStyle = 'show' | 'hide' | 'showOnHover';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface UseEmbedResolvePostMessageListenerProps {
|
|
2
|
-
url: string;
|
|
3
2
|
embedIframeRef: React.ForwardedRef<HTMLIFrameElement>;
|
|
3
|
+
url: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const useEmbedResolvePostMessageListener: ({ url, embedIframeRef, }: UseEmbedResolvePostMessageListenerProps) => void;
|
|
6
6
|
export {};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
export interface ErroredViewProps {
|
|
6
|
-
|
|
6
|
+
inheritDimensions?: boolean;
|
|
7
7
|
isSelected?: boolean;
|
|
8
|
+
onRetry?: (val: any) => void;
|
|
8
9
|
testId?: string;
|
|
9
|
-
inheritDimensions?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare const EmbedCardErroredView: ({ onRetry, isSelected, testId, inheritDimensions, }: ErroredViewProps) => JSX.Element;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ContextViewModel, type FrameStyle } from '../types';
|
|
3
3
|
export interface EmbedCardResolvedViewProps {
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/** Component to prompt for competitor link */
|
|
5
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
6
|
+
linkType?: string;
|
|
7
|
+
sourceUrl: string;
|
|
8
|
+
}>;
|
|
6
9
|
/** The context view model */
|
|
7
10
|
context?: ContextViewModel;
|
|
8
|
-
/** The link to display */
|
|
9
|
-
link: string;
|
|
10
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
11
|
-
isSelected?: boolean;
|
|
12
11
|
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
13
12
|
frameStyle?: FrameStyle;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
13
|
+
inheritDimensions?: boolean;
|
|
14
|
+
/** A flag that determines whether the card is selected in edit mode. */
|
|
15
|
+
isSelected?: boolean;
|
|
16
|
+
isSupportTheming?: boolean;
|
|
19
17
|
/** A flag that determines whether link source can be trusted in iframe **/
|
|
20
18
|
isTrusted?: boolean;
|
|
19
|
+
/** The link to display */
|
|
20
|
+
link: string;
|
|
21
21
|
/** The optional click handler */
|
|
22
22
|
onClick?: (evt: React.MouseEvent) => void;
|
|
23
|
-
/** For testing purposes only. */
|
|
24
|
-
testId?: string;
|
|
25
|
-
isSupportTheming?: boolean;
|
|
26
|
-
inheritDimensions?: boolean;
|
|
27
23
|
/** Optional callback for when user dwells cursor over iframe - for analytics **/
|
|
28
24
|
onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
|
|
29
25
|
/** Optional callback for when user navigates into an iframe - for analytics **/
|
|
30
26
|
onIframeFocus?: () => void;
|
|
27
|
+
/** The src to be used for the `iframe` */
|
|
28
|
+
preview?: {
|
|
29
|
+
aspectRatio?: number;
|
|
30
|
+
src?: string;
|
|
31
|
+
};
|
|
32
|
+
/** For testing purposes only. */
|
|
33
|
+
testId?: string;
|
|
34
|
+
/** The title of the link */
|
|
35
|
+
title?: string;
|
|
31
36
|
/** Type of the object */
|
|
32
37
|
type?: string[];
|
|
33
|
-
/** Component to prompt for competitor link */
|
|
34
|
-
CompetitorPrompt?: React.ComponentType<{
|
|
35
|
-
sourceUrl: string;
|
|
36
|
-
linkType?: string;
|
|
37
|
-
}>;
|
|
38
38
|
}
|
|
39
39
|
export declare const EmbedCardResolvedView: React.ForwardRefExoticComponent<EmbedCardResolvedViewProps & React.RefAttributes<HTMLIFrameElement>>;
|
|
@@ -2,7 +2,7 @@ import type { RequestAccessContextProps } from '../../../types';
|
|
|
2
2
|
import type { ContextViewModel } from '../../types';
|
|
3
3
|
import type { UnresolvedViewCardProps } from '../unresolved-view/types';
|
|
4
4
|
export type ForbiddenViewProps = UnresolvedViewCardProps & {
|
|
5
|
+
accessContext: RequestAccessContextProps;
|
|
5
6
|
context?: ContextViewModel;
|
|
6
7
|
onAuthorize?: () => void;
|
|
7
|
-
accessContext: RequestAccessContextProps;
|
|
8
8
|
};
|