@atlaskit/smart-card 32.7.0 → 32.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/analytics.spec.yaml +63 -9
- package/dist/cjs/classNames.js +14 -82
- package/dist/cjs/extractors/action/extract-invoke-copy-link-action.js +53 -0
- package/dist/cjs/extractors/action/extract-invoke-download-action.js +57 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +78 -0
- package/dist/cjs/extractors/action/extract-invoke-view-action.js +60 -0
- package/dist/cjs/extractors/action/extractDownloadActionProps.js +4 -0
- package/dist/cjs/extractors/action/extractPreviewActionProps.js +4 -0
- package/dist/cjs/extractors/action/extractViewActionProps.js +4 -0
- package/dist/cjs/extractors/common/actions/extractActions.js +1 -67
- package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +12 -1
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +12 -1
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +12 -1
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +3 -0
- package/dist/cjs/extractors/flexible/actions/index.js +40 -3
- package/dist/cjs/extractors/flexible/extract-state.js +19 -5
- package/dist/cjs/extractors/flexible/index.js +22 -8
- package/dist/cjs/i18n/cs.js +2 -4
- package/dist/cjs/i18n/da.js +2 -4
- package/dist/cjs/i18n/de.js +2 -4
- package/dist/cjs/i18n/en.js +2 -4
- package/dist/cjs/i18n/en_GB.js +2 -4
- package/dist/cjs/i18n/en_ZZ.js +2 -4
- package/dist/cjs/i18n/es.js +8 -10
- package/dist/cjs/i18n/fi.js +5 -7
- package/dist/cjs/i18n/fr.js +2 -4
- package/dist/cjs/i18n/hu.js +2 -4
- package/dist/cjs/i18n/it.js +2 -4
- package/dist/cjs/i18n/ja.js +8 -10
- package/dist/cjs/i18n/ko.js +2 -4
- package/dist/cjs/i18n/nb.js +2 -4
- package/dist/cjs/i18n/nl.js +2 -4
- package/dist/cjs/i18n/pl.js +2 -4
- package/dist/cjs/i18n/pt_BR.js +2 -4
- package/dist/cjs/i18n/ru.js +2 -4
- package/dist/cjs/i18n/sv.js +2 -4
- package/dist/cjs/i18n/th.js +2 -4
- package/dist/cjs/i18n/tr.js +8 -10
- package/dist/cjs/i18n/uk.js +2 -4
- package/dist/cjs/i18n/vi.js +2 -4
- package/dist/cjs/i18n/zh.js +2 -4
- package/dist/cjs/i18n/zh_TW.js +2 -4
- package/dist/cjs/state/hooks/use-invoke-client-action/index.js +56 -17
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +22 -3
- package/dist/cjs/utils/analytics/LinkAnalyticsContext.js +7 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/mocks.js +4 -1
- package/dist/cjs/view/BlockCard/components/Action.js +1 -58
- package/dist/cjs/view/BlockCard/index.js +29 -218
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
- package/dist/cjs/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- package/dist/cjs/view/CardWithUrl/component.js +2 -5
- package/dist/cjs/view/EmbedModal/index.js +72 -51
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +65 -32
- package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +36 -28
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +40 -32
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +13 -6
- package/dist/cjs/view/FlexibleCard/components/utils.js +4 -0
- package/dist/cjs/view/FlexibleCard/index.js +11 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/classNames.js +12 -10
- package/dist/es2019/extractors/action/extract-invoke-copy-link-action.js +29 -0
- package/dist/es2019/extractors/action/extract-invoke-download-action.js +31 -0
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +57 -0
- package/dist/es2019/extractors/action/extract-invoke-view-action.js +34 -0
- package/dist/es2019/extractors/action/extractDownloadActionProps.js +5 -0
- package/dist/es2019/extractors/action/extractPreviewActionProps.js +5 -0
- package/dist/es2019/extractors/action/extractViewActionProps.js +5 -0
- package/dist/es2019/extractors/common/actions/extractActions.js +1 -55
- package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +11 -0
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +12 -0
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +12 -0
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +4 -0
- package/dist/es2019/extractors/flexible/actions/index.js +48 -3
- package/dist/es2019/extractors/flexible/extract-state.js +17 -5
- package/dist/es2019/extractors/flexible/index.js +17 -6
- package/dist/es2019/i18n/cs.js +2 -4
- package/dist/es2019/i18n/da.js +2 -4
- package/dist/es2019/i18n/de.js +2 -4
- package/dist/es2019/i18n/en.js +2 -4
- package/dist/es2019/i18n/en_GB.js +2 -4
- package/dist/es2019/i18n/en_ZZ.js +2 -4
- package/dist/es2019/i18n/es.js +8 -10
- package/dist/es2019/i18n/fi.js +5 -7
- package/dist/es2019/i18n/fr.js +2 -4
- package/dist/es2019/i18n/hu.js +2 -4
- package/dist/es2019/i18n/it.js +2 -4
- package/dist/es2019/i18n/ja.js +8 -10
- package/dist/es2019/i18n/ko.js +2 -4
- package/dist/es2019/i18n/nb.js +2 -4
- package/dist/es2019/i18n/nl.js +2 -4
- package/dist/es2019/i18n/pl.js +2 -4
- package/dist/es2019/i18n/pt_BR.js +2 -4
- package/dist/es2019/i18n/ru.js +2 -4
- package/dist/es2019/i18n/sv.js +2 -4
- package/dist/es2019/i18n/th.js +2 -4
- package/dist/es2019/i18n/tr.js +8 -10
- package/dist/es2019/i18n/uk.js +2 -4
- package/dist/es2019/i18n/vi.js +2 -4
- package/dist/es2019/i18n/zh.js +2 -4
- package/dist/es2019/i18n/zh_TW.js +2 -4
- package/dist/es2019/state/hooks/use-invoke-client-action/index.js +91 -43
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +21 -3
- package/dist/es2019/utils/analytics/LinkAnalyticsContext.js +3 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/mocks.js +4 -1
- package/dist/es2019/view/BlockCard/components/Action.js +1 -48
- package/dist/es2019/view/BlockCard/index.js +27 -163
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
- package/dist/es2019/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- package/dist/es2019/view/CardWithUrl/component.js +2 -5
- package/dist/es2019/view/EmbedModal/index.js +41 -20
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +31 -16
- package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +20 -12
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +25 -17
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +14 -7
- package/dist/es2019/view/FlexibleCard/components/utils.js +4 -0
- package/dist/es2019/view/FlexibleCard/index.js +12 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/classNames.js +12 -10
- package/dist/esm/extractors/action/extract-invoke-copy-link-action.js +46 -0
- package/dist/esm/extractors/action/extract-invoke-download-action.js +50 -0
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +71 -0
- package/dist/esm/extractors/action/extract-invoke-view-action.js +53 -0
- package/dist/esm/extractors/action/extractDownloadActionProps.js +5 -0
- package/dist/esm/extractors/action/extractPreviewActionProps.js +5 -0
- package/dist/esm/extractors/action/extractViewActionProps.js +5 -0
- package/dist/esm/extractors/common/actions/extractActions.js +1 -65
- package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +11 -0
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +12 -0
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +12 -0
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +4 -0
- package/dist/esm/extractors/flexible/actions/index.js +42 -5
- package/dist/esm/extractors/flexible/extract-state.js +19 -5
- package/dist/esm/extractors/flexible/index.js +19 -8
- package/dist/esm/i18n/cs.js +2 -4
- package/dist/esm/i18n/da.js +2 -4
- package/dist/esm/i18n/de.js +2 -4
- package/dist/esm/i18n/en.js +2 -4
- package/dist/esm/i18n/en_GB.js +2 -4
- package/dist/esm/i18n/en_ZZ.js +2 -4
- package/dist/esm/i18n/es.js +8 -10
- package/dist/esm/i18n/fi.js +5 -7
- package/dist/esm/i18n/fr.js +2 -4
- package/dist/esm/i18n/hu.js +2 -4
- package/dist/esm/i18n/it.js +2 -4
- package/dist/esm/i18n/ja.js +8 -10
- package/dist/esm/i18n/ko.js +2 -4
- package/dist/esm/i18n/nb.js +2 -4
- package/dist/esm/i18n/nl.js +2 -4
- package/dist/esm/i18n/pl.js +2 -4
- package/dist/esm/i18n/pt_BR.js +2 -4
- package/dist/esm/i18n/ru.js +2 -4
- package/dist/esm/i18n/sv.js +2 -4
- package/dist/esm/i18n/th.js +2 -4
- package/dist/esm/i18n/tr.js +8 -10
- package/dist/esm/i18n/uk.js +2 -4
- package/dist/esm/i18n/vi.js +2 -4
- package/dist/esm/i18n/zh.js +2 -4
- package/dist/esm/i18n/zh_TW.js +2 -4
- package/dist/esm/state/hooks/use-invoke-client-action/index.js +56 -17
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +22 -3
- package/dist/esm/utils/analytics/LinkAnalyticsContext.js +7 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/mocks.js +4 -1
- package/dist/esm/view/BlockCard/components/Action.js +1 -54
- package/dist/esm/view/BlockCard/index.js +29 -164
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
- package/dist/esm/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- package/dist/esm/view/CardWithUrl/component.js +2 -5
- package/dist/esm/view/EmbedModal/index.js +73 -52
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +65 -32
- package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +36 -28
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +40 -32
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +13 -6
- package/dist/esm/view/FlexibleCard/components/utils.js +4 -0
- package/dist/esm/view/FlexibleCard/index.js +11 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/classNames.d.ts +12 -10
- package/dist/types/common/analytics/generated/analytics.types.d.ts +63 -2
- package/dist/types/common/analytics/types.d.ts +2 -0
- package/dist/types/extractors/action/extract-invoke-copy-link-action.d.ts +3 -0
- package/dist/types/extractors/action/extract-invoke-download-action.d.ts +3 -0
- package/dist/types/extractors/action/extract-invoke-preview-action.d.ts +11 -0
- package/dist/types/extractors/action/extract-invoke-view-action.d.ts +3 -0
- package/dist/types/extractors/action/extractDownloadActionProps.d.ts +4 -0
- package/dist/types/extractors/action/extractPreviewActionProps.d.ts +5 -1
- package/dist/types/extractors/action/extractViewActionProps.d.ts +4 -0
- package/dist/types/extractors/action/types.d.ts +9 -0
- package/dist/types/extractors/common/actions/extractActions.d.ts +0 -8
- package/dist/types/extractors/common/actions/types.d.ts +0 -9
- package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +6 -0
- package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +6 -0
- package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +6 -0
- package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +3 -0
- package/dist/types/extractors/flexible/actions/index.d.ts +21 -4
- package/dist/types/extractors/flexible/extract-state.d.ts +5 -2
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/i18n/cs.d.ts +1 -3
- package/dist/types/i18n/da.d.ts +1 -3
- package/dist/types/i18n/de.d.ts +1 -3
- package/dist/types/i18n/en.d.ts +1 -3
- package/dist/types/i18n/en_GB.d.ts +1 -3
- package/dist/types/i18n/en_ZZ.d.ts +1 -3
- package/dist/types/i18n/es.d.ts +1 -3
- package/dist/types/i18n/fi.d.ts +1 -3
- package/dist/types/i18n/fr.d.ts +1 -3
- package/dist/types/i18n/hu.d.ts +1 -3
- package/dist/types/i18n/it.d.ts +1 -3
- package/dist/types/i18n/ja.d.ts +1 -3
- package/dist/types/i18n/ko.d.ts +1 -3
- package/dist/types/i18n/nb.d.ts +1 -3
- package/dist/types/i18n/nl.d.ts +1 -3
- package/dist/types/i18n/pl.d.ts +1 -3
- package/dist/types/i18n/pt_BR.d.ts +1 -3
- package/dist/types/i18n/ru.d.ts +1 -3
- package/dist/types/i18n/sv.d.ts +1 -3
- package/dist/types/i18n/th.d.ts +1 -3
- package/dist/types/i18n/tr.d.ts +1 -3
- package/dist/types/i18n/uk.d.ts +1 -3
- package/dist/types/i18n/vi.d.ts +1 -3
- package/dist/types/i18n/zh.d.ts +1 -3
- package/dist/types/i18n/zh_TW.d.ts +1 -3
- package/dist/types/state/flexible-ui-context/types.d.ts +9 -3
- package/dist/types/state/hooks/use-invoke/types.d.ts +7 -1
- package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +2 -2
- package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +24 -2
- package/dist/types/state/hooks/use-resolve/index.d.ts +1 -0
- package/dist/types/utils/analytics/click.d.ts +1 -1
- package/dist/types/view/BlockCard/components/Action.d.ts +0 -4
- package/dist/types/view/BlockCard/index.d.ts +2 -17
- package/dist/types/view/BlockCard/types.d.ts +1 -6
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/EmbedModal/index.d.ts +4 -0
- package/dist/types/view/EmbedModal/types.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/utils.d.ts +4 -1
- package/dist/types/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +12 -3
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/classNames.d.ts +12 -10
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +63 -2
- package/dist/types-ts4.5/common/analytics/types.d.ts +2 -0
- package/dist/types-ts4.5/extractors/action/extract-invoke-copy-link-action.d.ts +3 -0
- package/dist/types-ts4.5/extractors/action/extract-invoke-download-action.d.ts +3 -0
- package/dist/types-ts4.5/extractors/action/extract-invoke-preview-action.d.ts +11 -0
- package/dist/types-ts4.5/extractors/action/extract-invoke-view-action.d.ts +3 -0
- package/dist/types-ts4.5/extractors/action/extractDownloadActionProps.d.ts +4 -0
- package/dist/types-ts4.5/extractors/action/extractPreviewActionProps.d.ts +5 -1
- package/dist/types-ts4.5/extractors/action/extractViewActionProps.d.ts +4 -0
- package/dist/types-ts4.5/extractors/action/types.d.ts +9 -0
- package/dist/types-ts4.5/extractors/common/actions/extractActions.d.ts +0 -8
- package/dist/types-ts4.5/extractors/common/actions/types.d.ts +0 -9
- package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +6 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-download-action.d.ts +6 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-preview-action.d.ts +6 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-view-action.d.ts +3 -0
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +21 -4
- package/dist/types-ts4.5/extractors/flexible/extract-state.d.ts +5 -2
- package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +1 -3
- package/dist/types-ts4.5/i18n/da.d.ts +1 -3
- package/dist/types-ts4.5/i18n/de.d.ts +1 -3
- package/dist/types-ts4.5/i18n/en.d.ts +1 -3
- package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -3
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -3
- package/dist/types-ts4.5/i18n/es.d.ts +1 -3
- package/dist/types-ts4.5/i18n/fi.d.ts +1 -3
- package/dist/types-ts4.5/i18n/fr.d.ts +1 -3
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -3
- package/dist/types-ts4.5/i18n/it.d.ts +1 -3
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -3
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -3
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -3
- package/dist/types-ts4.5/i18n/nl.d.ts +1 -3
- package/dist/types-ts4.5/i18n/pl.d.ts +1 -3
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -3
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -3
- package/dist/types-ts4.5/i18n/sv.d.ts +1 -3
- package/dist/types-ts4.5/i18n/th.d.ts +1 -3
- package/dist/types-ts4.5/i18n/tr.d.ts +1 -3
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -3
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -3
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -3
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -3
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +9 -3
- package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +7 -1
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +2 -2
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/types.d.ts +24 -2
- package/dist/types-ts4.5/state/hooks/use-resolve/index.d.ts +1 -0
- package/dist/types-ts4.5/utils/analytics/click.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/components/Action.d.ts +0 -4
- package/dist/types-ts4.5/view/BlockCard/index.d.ts +2 -17
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +1 -6
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/index.d.ts +8 -0
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +7 -0
- 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/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +6 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +4 -1
- package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +12 -3
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/package.json +4 -1
- package/dist/cjs/extractors/block/index.js +0 -96
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +0 -106
- package/dist/cjs/view/BlockCard/actions/AuthorizeAction.js +0 -22
- package/dist/cjs/view/BlockCard/actions/DownloadAction.js +0 -21
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +0 -35
- package/dist/cjs/view/BlockCard/actions/RetryAction.js +0 -35
- package/dist/cjs/view/BlockCard/actions/ViewAction.js +0 -21
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +0 -57
- package/dist/cjs/view/BlockCard/components/ActionList.js +0 -78
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +0 -52
- package/dist/cjs/view/BlockCard/components/Content.js +0 -45
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +0 -41
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +0 -45
- package/dist/cjs/view/BlockCard/components/Emoji.js +0 -33
- package/dist/cjs/view/BlockCard/components/Link.js +0 -31
- package/dist/cjs/view/BlockCard/components/Name.js +0 -61
- package/dist/cjs/view/BlockCard/components/Provider.js +0 -57
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +0 -62
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +0 -24
- package/dist/cjs/view/BlockCard/views/ErroredView.js +0 -91
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +0 -121
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +0 -82
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +0 -143
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +0 -57
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +0 -72
- package/dist/cjs/view/BlockCard/views/styled.js +0 -18
- package/dist/cjs/view/CardWithData/component.js +0 -66
- package/dist/cjs/view/CardWithData/types.js +0 -5
- package/dist/cjs/view/common/Byline.js +0 -52
- package/dist/cjs/view/common/Metadata.js +0 -56
- package/dist/cjs/view/common/MetadataList.js +0 -43
- package/dist/es2019/extractors/block/index.js +0 -86
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +0 -91
- package/dist/es2019/view/BlockCard/actions/AuthorizeAction.js +0 -9
- package/dist/es2019/view/BlockCard/actions/DownloadAction.js +0 -11
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +0 -23
- package/dist/es2019/view/BlockCard/actions/RetryAction.js +0 -8
- package/dist/es2019/view/BlockCard/actions/ViewAction.js +0 -11
- package/dist/es2019/view/BlockCard/components/ActionIcon.js +0 -51
- package/dist/es2019/view/BlockCard/components/ActionList.js +0 -63
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +0 -42
- package/dist/es2019/view/BlockCard/components/Content.js +0 -36
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +0 -32
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +0 -39
- package/dist/es2019/view/BlockCard/components/Emoji.js +0 -26
- package/dist/es2019/view/BlockCard/components/Link.js +0 -24
- package/dist/es2019/view/BlockCard/components/Name.js +0 -54
- package/dist/es2019/view/BlockCard/components/Provider.js +0 -51
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +0 -58
- package/dist/es2019/view/BlockCard/components/UnresolvedText.js +0 -18
- package/dist/es2019/view/BlockCard/views/ErroredView.js +0 -78
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +0 -104
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +0 -71
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +0 -121
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +0 -46
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +0 -60
- package/dist/es2019/view/BlockCard/views/styled.js +0 -10
- package/dist/es2019/view/CardWithData/component.js +0 -43
- package/dist/es2019/view/common/Byline.js +0 -44
- package/dist/es2019/view/common/Metadata.js +0 -49
- package/dist/es2019/view/common/MetadataList.js +0 -34
- package/dist/esm/extractors/block/index.js +0 -89
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +0 -99
- package/dist/esm/state/reducers/types.js +0 -1
- package/dist/esm/view/BlockCard/actions/AuthorizeAction.js +0 -15
- package/dist/esm/view/BlockCard/actions/DownloadAction.js +0 -14
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +0 -30
- package/dist/esm/view/BlockCard/actions/RetryAction.js +0 -28
- package/dist/esm/view/BlockCard/actions/ViewAction.js +0 -14
- package/dist/esm/view/BlockCard/components/ActionIcon.js +0 -50
- package/dist/esm/view/BlockCard/components/ActionList.js +0 -69
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +0 -44
- package/dist/esm/view/BlockCard/components/Content.js +0 -38
- package/dist/esm/view/BlockCard/components/ContentFooter.js +0 -34
- package/dist/esm/view/BlockCard/components/ContentHeader.js +0 -38
- package/dist/esm/view/BlockCard/components/Emoji.js +0 -25
- package/dist/esm/view/BlockCard/components/Link.js +0 -24
- package/dist/esm/view/BlockCard/components/Name.js +0 -54
- package/dist/esm/view/BlockCard/components/Provider.js +0 -50
- package/dist/esm/view/BlockCard/components/Thumbnail.js +0 -57
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +0 -17
- package/dist/esm/view/BlockCard/views/ErroredView.js +0 -87
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +0 -113
- package/dist/esm/view/BlockCard/views/NotFoundView.js +0 -78
- package/dist/esm/view/BlockCard/views/ResolvedView.js +0 -135
- package/dist/esm/view/BlockCard/views/ResolvingView.js +0 -49
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +0 -68
- package/dist/esm/view/BlockCard/views/styled.js +0 -10
- package/dist/esm/view/CardWithData/component.js +0 -59
- package/dist/esm/view/CardWithData/types.js +0 -1
- package/dist/esm/view/common/Byline.js +0 -45
- package/dist/esm/view/common/Metadata.js +0 -48
- package/dist/esm/view/common/MetadataList.js +0 -35
- package/dist/types/extractors/block/index.d.ts +0 -10
- package/dist/types/extractors/block/types.d.ts +0 -13
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +0 -14
- package/dist/types/state/reducers/types.d.ts +0 -4
- package/dist/types/view/BlockCard/actions/AuthorizeAction.d.ts +0 -2
- package/dist/types/view/BlockCard/actions/DownloadAction.d.ts +0 -4
- package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +0 -27
- package/dist/types/view/BlockCard/actions/RetryAction.d.ts +0 -2
- package/dist/types/view/BlockCard/actions/ViewAction.d.ts +0 -4
- package/dist/types/view/BlockCard/components/ActionIcon.d.ts +0 -12
- package/dist/types/view/BlockCard/components/ActionList.d.ts +0 -10
- package/dist/types/view/BlockCard/components/CollaboratorList.d.ts +0 -18
- package/dist/types/view/BlockCard/components/Content.d.ts +0 -18
- package/dist/types/view/BlockCard/components/ContentFooter.d.ts +0 -12
- package/dist/types/view/BlockCard/components/ContentHeader.d.ts +0 -19
- package/dist/types/view/BlockCard/components/Emoji.d.ts +0 -10
- package/dist/types/view/BlockCard/components/Link.d.ts +0 -11
- package/dist/types/view/BlockCard/components/Name.d.ts +0 -21
- package/dist/types/view/BlockCard/components/Provider.d.ts +0 -11
- package/dist/types/view/BlockCard/components/Thumbnail.d.ts +0 -13
- package/dist/types/view/BlockCard/components/UnresolvedText.d.ts +0 -11
- package/dist/types/view/BlockCard/views/ErroredView.d.ts +0 -19
- package/dist/types/view/BlockCard/views/ForbiddenView.d.ts +0 -35
- package/dist/types/view/BlockCard/views/NotFoundView.d.ts +0 -26
- package/dist/types/view/BlockCard/views/ResolvedView.d.ts +0 -46
- package/dist/types/view/BlockCard/views/ResolvingView.d.ts +0 -18
- package/dist/types/view/BlockCard/views/UnauthorizedView.d.ts +0 -19
- package/dist/types/view/BlockCard/views/styled.d.ts +0 -5
- package/dist/types/view/CardWithData/component.d.ts +0 -5
- package/dist/types/view/CardWithData/types.d.ts +0 -15
- package/dist/types/view/common/Byline.d.ts +0 -13
- package/dist/types/view/common/Metadata.d.ts +0 -13
- package/dist/types/view/common/MetadataList.d.ts +0 -12
- package/dist/types-ts4.5/extractors/block/index.d.ts +0 -10
- package/dist/types-ts4.5/extractors/block/types.d.ts +0 -13
- package/dist/types-ts4.5/extractors/common/actions/extractPreviewAction.d.ts +0 -14
- package/dist/types-ts4.5/state/reducers/types.d.ts +0 -4
- package/dist/types-ts4.5/view/BlockCard/actions/AuthorizeAction.d.ts +0 -2
- package/dist/types-ts4.5/view/BlockCard/actions/DownloadAction.d.ts +0 -4
- package/dist/types-ts4.5/view/BlockCard/actions/PreviewAction.d.ts +0 -27
- package/dist/types-ts4.5/view/BlockCard/actions/RetryAction.d.ts +0 -2
- package/dist/types-ts4.5/view/BlockCard/actions/ViewAction.d.ts +0 -4
- package/dist/types-ts4.5/view/BlockCard/components/ActionIcon.d.ts +0 -12
- package/dist/types-ts4.5/view/BlockCard/components/ActionList.d.ts +0 -10
- package/dist/types-ts4.5/view/BlockCard/components/CollaboratorList.d.ts +0 -18
- package/dist/types-ts4.5/view/BlockCard/components/Content.d.ts +0 -18
- package/dist/types-ts4.5/view/BlockCard/components/ContentFooter.d.ts +0 -12
- package/dist/types-ts4.5/view/BlockCard/components/ContentHeader.d.ts +0 -19
- package/dist/types-ts4.5/view/BlockCard/components/Emoji.d.ts +0 -10
- package/dist/types-ts4.5/view/BlockCard/components/Link.d.ts +0 -11
- package/dist/types-ts4.5/view/BlockCard/components/Name.d.ts +0 -21
- package/dist/types-ts4.5/view/BlockCard/components/Provider.d.ts +0 -11
- package/dist/types-ts4.5/view/BlockCard/components/Thumbnail.d.ts +0 -13
- package/dist/types-ts4.5/view/BlockCard/components/UnresolvedText.d.ts +0 -11
- package/dist/types-ts4.5/view/BlockCard/views/ErroredView.d.ts +0 -19
- package/dist/types-ts4.5/view/BlockCard/views/ForbiddenView.d.ts +0 -35
- package/dist/types-ts4.5/view/BlockCard/views/NotFoundView.d.ts +0 -26
- package/dist/types-ts4.5/view/BlockCard/views/ResolvedView.d.ts +0 -46
- package/dist/types-ts4.5/view/BlockCard/views/ResolvingView.d.ts +0 -18
- package/dist/types-ts4.5/view/BlockCard/views/UnauthorizedView.d.ts +0 -19
- package/dist/types-ts4.5/view/BlockCard/views/styled.d.ts +0 -5
- package/dist/types-ts4.5/view/CardWithData/component.d.ts +0 -5
- package/dist/types-ts4.5/view/CardWithData/types.d.ts +0 -15
- package/dist/types-ts4.5/view/common/Byline.d.ts +0 -13
- package/dist/types-ts4.5/view/common/Metadata.d.ts +0 -13
- package/dist/types-ts4.5/view/common/MetadataList.d.ts +0 -12
- /package/dist/cjs/{extractors/block → common/analytics}/types.js +0 -0
- /package/dist/cjs/{state/reducers → extractors/action}/types.js +0 -0
- /package/dist/es2019/{extractors/block → common/analytics}/types.js +0 -0
- /package/dist/es2019/{state/reducers → extractors/action}/types.js +0 -0
- /package/dist/{es2019/view/CardWithData → esm/common/analytics}/types.js +0 -0
- /package/dist/esm/extractors/{block → action}/types.js +0 -0
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
'fabric.linking.automation-action.confluence.page.modal.description': '对 <b>{name}</b> 应用自动化。{br}可用选项由 Confluence 与空间管理员进行控制。',
|
|
39
39
|
'fabric.linking.automation-action.confluence.page.modal.title': '页面自动化',
|
|
40
40
|
'fabric.linking.automation-action.icon.label': '自动化图标',
|
|
41
|
-
'fabric.linking.automation-action.title': '
|
|
41
|
+
'fabric.linking.automation-action.title': '查看自动化规则',
|
|
42
42
|
'fabric.linking.automation-action.tooltip': '选择要运行的自动化规则',
|
|
43
43
|
'fabric.linking.beta': '测试版',
|
|
44
44
|
'fabric.linking.cancel': '取消',
|
|
@@ -90,7 +90,6 @@ export default {
|
|
|
90
90
|
'fabric.linking.invalid_permissions': '受限内容',
|
|
91
91
|
'fabric.linking.invalid_permissions_description': '您需要请求访问权限或尝试使用其他帐户来查看此预览。',
|
|
92
92
|
'fabric.linking.join_to_view': '加入{context}以查看此事务',
|
|
93
|
-
'fabric.linking.last_mentioned_in': '上次提及位置',
|
|
94
93
|
'fabric.linking.learn_more_about_connecting_account': '了解有关将您的帐户关联到 Atlassian 产品的信息。',
|
|
95
94
|
'fabric.linking.learn_more_about_smart_links': '了解有关智能链接的更多信息。',
|
|
96
95
|
'fabric.linking.link_safety_warning_message': '{unsafeLinkText} 链接会将您带到其他站点,<a>actual link here</a>',
|
|
@@ -131,8 +130,7 @@ export default {
|
|
|
131
130
|
'fabric.linking.related_links_modal_unavailable_header': '没有最近的链接',
|
|
132
131
|
'fabric.linking.related_links_modal_unavailable_message': '未找到可在此处显示的任何链接。我们会不断审查并添加针对已更新页面或其他内容类型的最近链接。',
|
|
133
132
|
'fabric.linking.related_links_not_found': '未找到可在此处显示的任何链接。',
|
|
134
|
-
'fabric.linking.related_links_view_related_urls
|
|
135
|
-
'fabric.linking.related_work_items_not_found': '此链接在其他任何地方均未提及。',
|
|
133
|
+
'fabric.linking.related_links_view_related_urls': '查看最近的链接',
|
|
136
134
|
'fabric.linking.request_access': '请求访问',
|
|
137
135
|
'fabric.linking.request_access_description': '您的团队使用 {product} 进行协作。请向您的管理员发送访问请求。',
|
|
138
136
|
'fabric.linking.request_access_pending': '待批准',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
'fabric.linking.automation-action.confluence.page.modal.description': '將自動化套用至 <b>{name}</b>。{br}可用的選項是由 Confluence 和空間管理員所控管。',
|
|
39
39
|
'fabric.linking.automation-action.confluence.page.modal.title': '頁面自動化',
|
|
40
40
|
'fabric.linking.automation-action.icon.label': '自動化圖示',
|
|
41
|
-
'fabric.linking.automation-action.title': '
|
|
41
|
+
'fabric.linking.automation-action.title': '檢視自動化規則',
|
|
42
42
|
'fabric.linking.automation-action.tooltip': '選取要執行的自動化規則',
|
|
43
43
|
'fabric.linking.beta': '測試版',
|
|
44
44
|
'fabric.linking.cancel': '取消',
|
|
@@ -90,7 +90,6 @@ export default {
|
|
|
90
90
|
'fabric.linking.invalid_permissions': '受限制的內容',
|
|
91
91
|
'fabric.linking.invalid_permissions_description': '您需要請求存取或嘗試不同的帳戶,來檢視此預覽。',
|
|
92
92
|
'fabric.linking.join_to_view': '加入 {context} 以查看此議題',
|
|
93
|
-
'fabric.linking.last_mentioned_in': '最後提及位置:',
|
|
94
93
|
'fabric.linking.learn_more_about_connecting_account': '進一步了解如何將您的帳戶連接至 Atlassian 產品。',
|
|
95
94
|
'fabric.linking.learn_more_about_smart_links': '深入了解智慧連結。',
|
|
96
95
|
'fabric.linking.link_safety_warning_message': '此連結 {unsafeLinkText} 會帶您前往不同的網站,<a>actual link here</a>',
|
|
@@ -131,8 +130,7 @@ export default {
|
|
|
131
130
|
'fabric.linking.related_links_modal_unavailable_header': '沒有最近的連結',
|
|
132
131
|
'fabric.linking.related_links_modal_unavailable_message': '我們沒有找到任何可在這裡顯示的連結。我們會持續檢閱更新的頁面或其他內容類型,並新增最近的連結。',
|
|
133
132
|
'fabric.linking.related_links_not_found': '我們沒有找到任何可在這裡顯示的連結。',
|
|
134
|
-
'fabric.linking.related_links_view_related_urls
|
|
135
|
-
'fabric.linking.related_work_items_not_found': '這個連結並未在其他任何位置提及。',
|
|
133
|
+
'fabric.linking.related_links_view_related_urls': '查看最近的連結',
|
|
136
134
|
'fabric.linking.request_access': '要求存取權',
|
|
137
135
|
'fabric.linking.request_access_description': '您的團隊使用 {product} 來協作。向您的管理員傳送存取要求。',
|
|
138
136
|
'fabric.linking.request_access_pending': '待核准',
|
|
@@ -2,6 +2,8 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import uuid from 'uuid';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
5
7
|
import * as measure from '../../../utils/performance';
|
|
6
8
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from '../../analytics';
|
|
7
9
|
var ACTION_EXPERIENCE_NAME = 'smart-link-action-invocation';
|
|
@@ -10,14 +12,18 @@ var ACTION_EXPERIENCE_NAME = 'smart-link-action-invocation';
|
|
|
10
12
|
* Invoke client action such as preview, download and open link
|
|
11
13
|
*/
|
|
12
14
|
var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
13
|
-
var analytics = _ref.analytics
|
|
15
|
+
var analytics = _ref.analytics,
|
|
16
|
+
fireEventProp = _ref.fireEvent;
|
|
17
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
18
|
+
defaultFireEvent = _useAnalyticsEvents.fireEvent;
|
|
19
|
+
var fireEvent = fireEventProp !== null && fireEventProp !== void 0 ? fireEventProp : defaultFireEvent;
|
|
14
20
|
return useCallback( /*#__PURE__*/function () {
|
|
15
21
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
16
|
-
var actionType, actionFn, extensionKey, display, experienceId, markName, result, reason;
|
|
22
|
+
var actionSubjectId, actionType, actionFn, _ref2$definitionId, definitionId, extensionKey, display, id, _ref2$resourceType, resourceType, experienceId, markName, result, _measure$getMeasure$d, _measure$getMeasure, reason, _measure$getMeasure$d2, _measure$getMeasure2;
|
|
17
23
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18
24
|
while (1) switch (_context.prev = _context.next) {
|
|
19
25
|
case 0:
|
|
20
|
-
actionType = _ref2.actionType, actionFn = _ref2.actionFn, extensionKey = _ref2.extensionKey, display = _ref2.display;
|
|
26
|
+
actionSubjectId = _ref2.actionSubjectId, actionType = _ref2.actionType, actionFn = _ref2.actionFn, _ref2$definitionId = _ref2.definitionId, definitionId = _ref2$definitionId === void 0 ? null : _ref2$definitionId, extensionKey = _ref2.extensionKey, display = _ref2.display, id = _ref2.id, _ref2$resourceType = _ref2.resourceType, resourceType = _ref2$resourceType === void 0 ? null : _ref2$resourceType;
|
|
21
27
|
experienceId = uuid(); // Begin performance instrumentation.
|
|
22
28
|
markName = "".concat(experienceId, "-").concat(actionType);
|
|
23
29
|
measure.mark(markName, 'pending');
|
|
@@ -31,10 +37,20 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
31
37
|
});
|
|
32
38
|
|
|
33
39
|
// Begin analytics instrumentation.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
if (actionSubjectId && fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
41
|
+
fireEvent("ui.button.clicked.".concat(actionSubjectId), {
|
|
42
|
+
actionType: actionType !== null && actionType !== void 0 ? actionType : null,
|
|
43
|
+
definitionId: definitionId,
|
|
44
|
+
display: display !== null && display !== void 0 ? display : null,
|
|
45
|
+
id: id !== null && id !== void 0 ? id : experienceId,
|
|
46
|
+
resourceType: resourceType
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
analytics === null || analytics === void 0 || analytics.ui.actionClickedEvent({
|
|
50
|
+
actionType: actionType,
|
|
51
|
+
display: display
|
|
52
|
+
});
|
|
53
|
+
}
|
|
38
54
|
|
|
39
55
|
// Invoke action
|
|
40
56
|
_context.next = 9;
|
|
@@ -43,10 +59,21 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
43
59
|
result = _context.sent;
|
|
44
60
|
measure.mark(markName, 'resolved');
|
|
45
61
|
succeedUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
62
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
63
|
+
fireEvent('operational.smartLinkAction.resolved', {
|
|
64
|
+
actionType: actionType !== null && actionType !== void 0 ? actionType : null,
|
|
65
|
+
definitionId: definitionId,
|
|
66
|
+
display: display !== null && display !== void 0 ? display : null,
|
|
67
|
+
duration: (_measure$getMeasure$d = (_measure$getMeasure = measure.getMeasure(markName, 'resolved')) === null || _measure$getMeasure === void 0 ? void 0 : _measure$getMeasure.duration) !== null && _measure$getMeasure$d !== void 0 ? _measure$getMeasure$d : null,
|
|
68
|
+
id: id !== null && id !== void 0 ? id : experienceId,
|
|
69
|
+
resourceType: resourceType
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
analytics === null || analytics === void 0 || analytics.operational.invokeSucceededEvent({
|
|
73
|
+
actionType: actionType,
|
|
74
|
+
display: display
|
|
75
|
+
});
|
|
76
|
+
}
|
|
50
77
|
return _context.abrupt("return", result);
|
|
51
78
|
case 16:
|
|
52
79
|
_context.prev = 16;
|
|
@@ -54,11 +81,23 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
54
81
|
measure.mark(markName, 'errored');
|
|
55
82
|
failUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
|
|
56
83
|
reason = typeof _context.t0 === 'string' ? _context.t0 : _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
84
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
85
|
+
fireEvent('operational.smartLinkAction.unresolved', {
|
|
86
|
+
actionType: actionType !== null && actionType !== void 0 ? actionType : null,
|
|
87
|
+
definitionId: definitionId,
|
|
88
|
+
display: display !== null && display !== void 0 ? display : null,
|
|
89
|
+
duration: (_measure$getMeasure$d2 = (_measure$getMeasure2 = measure.getMeasure(markName, 'errored')) === null || _measure$getMeasure2 === void 0 ? void 0 : _measure$getMeasure2.duration) !== null && _measure$getMeasure$d2 !== void 0 ? _measure$getMeasure$d2 : null,
|
|
90
|
+
id: id !== null && id !== void 0 ? id : experienceId,
|
|
91
|
+
reason: reason,
|
|
92
|
+
resourceType: resourceType
|
|
93
|
+
});
|
|
94
|
+
} else {
|
|
95
|
+
analytics === null || analytics === void 0 || analytics.operational.invokeFailedEvent({
|
|
96
|
+
actionType: actionType,
|
|
97
|
+
display: display,
|
|
98
|
+
reason: reason
|
|
99
|
+
});
|
|
100
|
+
}
|
|
62
101
|
case 22:
|
|
63
102
|
case "end":
|
|
64
103
|
return _context.stop();
|
|
@@ -68,6 +107,6 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
|
|
|
68
107
|
return function (_x) {
|
|
69
108
|
return _ref3.apply(this, arguments);
|
|
70
109
|
};
|
|
71
|
-
}(), [analytics === null || analytics === void 0 ? void 0 : analytics.operational, analytics === null || analytics === void 0 ? void 0 : analytics.ui]);
|
|
110
|
+
}(), [analytics === null || analytics === void 0 ? void 0 : analytics.operational, analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent]);
|
|
72
111
|
};
|
|
73
112
|
export default useInvokeClientAction;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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) { _defineProperty(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; }
|
|
1
4
|
import { useMemo } from 'react';
|
|
2
5
|
import uuid from 'uuid';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
8
|
+
import { extractInvokeDownloadAction } from '../../extractors/action/extract-invoke-download-action';
|
|
9
|
+
import { extractInvokePreviewAction } from '../../extractors/action/extract-invoke-preview-action';
|
|
10
|
+
import { extractInvokeViewAction } from '../../extractors/action/extract-invoke-view-action';
|
|
3
11
|
import { extractDownloadActionProps } from '../../extractors/action/extractDownloadActionProps';
|
|
4
12
|
import { extractPreviewActionProps } from '../../extractors/action/extractPreviewActionProps';
|
|
5
13
|
import { extractViewActionProps } from '../../extractors/action/extractViewActionProps';
|
|
@@ -19,6 +27,8 @@ export function useSmartLinkActions(_ref) {
|
|
|
19
27
|
}, []);
|
|
20
28
|
var linkState = useLinkState(url);
|
|
21
29
|
var linkAnalytics = useLinkAnalytics(url, id);
|
|
30
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
31
|
+
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
22
32
|
var invokeClientAction = useInvokeClientAction({
|
|
23
33
|
analytics: linkAnalytics
|
|
24
34
|
});
|
|
@@ -33,15 +43,24 @@ export function useSmartLinkActions(_ref) {
|
|
|
33
43
|
actionOptions: actionOptions
|
|
34
44
|
};
|
|
35
45
|
var actions = [];
|
|
36
|
-
var
|
|
46
|
+
var invokeParam = {
|
|
47
|
+
actionOptions: actionOptions,
|
|
48
|
+
appearance: appearance,
|
|
49
|
+
id: id,
|
|
50
|
+
response: linkState.details
|
|
51
|
+
};
|
|
52
|
+
var downloadActionProps = fg('platform-smart-card-migrate-embed-modal-analytics') ? extractInvokeDownloadAction(invokeParam) : extractDownloadActionProps(opts);
|
|
37
53
|
if (downloadActionProps) {
|
|
38
54
|
actions.push(toAction(downloadActionProps, invokeClientAction, messages.download, 'download-content'));
|
|
39
55
|
}
|
|
40
|
-
var viewActionProps = extractViewActionProps(opts);
|
|
56
|
+
var viewActionProps = fg('platform-smart-card-migrate-embed-modal-analytics') ? extractInvokeViewAction(invokeParam) : extractViewActionProps(opts);
|
|
41
57
|
if (viewActionProps) {
|
|
42
58
|
actions.push(toAction(viewActionProps, invokeClientAction, messages.view, 'view-content'));
|
|
43
59
|
}
|
|
44
|
-
var previewActionProps =
|
|
60
|
+
var previewActionProps = fg('platform-smart-card-migrate-embed-modal-analytics') ? extractInvokePreviewAction(_objectSpread(_objectSpread({}, invokeParam), {}, {
|
|
61
|
+
fireEvent: fireEvent,
|
|
62
|
+
origin: origin
|
|
63
|
+
})) : extractPreviewActionProps(opts);
|
|
45
64
|
if (previewActionProps) {
|
|
46
65
|
actions.push(toAction(previewActionProps, invokeClientAction, messages.preview_improved, 'preview-content'));
|
|
47
66
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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) { _defineProperty(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; }
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { context } from './analytics';
|
|
3
8
|
/**
|
|
4
9
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
5
10
|
*/
|
|
@@ -12,11 +17,11 @@ export var LinkAnalyticsContext = function LinkAnalyticsContext(_ref) {
|
|
|
12
17
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
13
18
|
data: {
|
|
14
19
|
source: source,
|
|
15
|
-
attributes: {
|
|
20
|
+
attributes: _objectSpread(_objectSpread({}, fg('platform-smart-card-migrate-embed-modal-analytics') ? context : {}), {}, {
|
|
16
21
|
displayCategory: displayCategory,
|
|
17
22
|
display: display,
|
|
18
23
|
id: id
|
|
19
|
-
}
|
|
24
|
+
})
|
|
20
25
|
}
|
|
21
26
|
}, children);
|
|
22
27
|
};
|
|
@@ -10,7 +10,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
10
10
|
export var context = {
|
|
11
11
|
componentName: 'smart-cards',
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "32.7.
|
|
13
|
+
packageVersion: "32.7.2"
|
|
14
14
|
};
|
|
15
15
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
16
16
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/mocks.js
CHANGED
|
@@ -28,7 +28,10 @@ export var mockByUrl = function mockByUrl(url) {
|
|
|
28
28
|
access: 'granted',
|
|
29
29
|
auth: [],
|
|
30
30
|
definitionId: 'd1',
|
|
31
|
-
key: 'object-provider'
|
|
31
|
+
key: 'object-provider',
|
|
32
|
+
resourceType: 'object-resource',
|
|
33
|
+
subproduct: 'object-subproduct',
|
|
34
|
+
product: 'object-product'
|
|
32
35
|
},
|
|
33
36
|
data: {
|
|
34
37
|
'@context': {
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import { useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { LoadingButton as Button } from '@atlaskit/button';
|
|
11
|
-
import { ActionIcon } from './ActionIcon';
|
|
12
|
-
export var spinnerDelay = 1000;
|
|
13
|
-
var baseTextStyles = css({
|
|
14
|
-
transition: 'opacity 0.3s'
|
|
15
|
-
});
|
|
16
|
-
export var Action = function Action(_ref) {
|
|
17
|
-
var promise = _ref.promise,
|
|
18
|
-
text = _ref.text,
|
|
19
|
-
_ref$buttonAppearance = _ref.buttonAppearance,
|
|
20
|
-
buttonAppearance = _ref$buttonAppearance === void 0 ? 'default' : _ref$buttonAppearance,
|
|
21
|
-
id = _ref.id;
|
|
22
|
-
var _useState = useState('init'),
|
|
23
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
-
state = _useState2[0],
|
|
25
|
-
setState = _useState2[1];
|
|
26
|
-
return jsx(Button, {
|
|
27
|
-
spacing: "compact",
|
|
28
|
-
appearance: buttonAppearance,
|
|
29
|
-
isLoading: state === 'loading',
|
|
30
|
-
testId: "button-".concat(id),
|
|
31
|
-
onClick: function onClick(event) {
|
|
32
|
-
event.stopPropagation();
|
|
33
|
-
event.preventDefault();
|
|
34
|
-
if (state !== 'loading') {
|
|
35
|
-
setState('loading');
|
|
36
|
-
promise().then(function () {
|
|
37
|
-
setState('success');
|
|
38
|
-
}).catch(function () {
|
|
39
|
-
setState('failure');
|
|
40
|
-
}).finally(function () {
|
|
41
|
-
setTimeout(function () {
|
|
42
|
-
return setState('init');
|
|
43
|
-
}, spinnerDelay);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}, jsx("div", {
|
|
48
|
-
css: [baseTextStyles, {
|
|
49
|
-
opacity: state !== 'init' ? 0 : 1
|
|
50
|
-
}]
|
|
51
|
-
}, text), jsx(ActionIcon, {
|
|
52
|
-
state: state
|
|
53
|
-
}));
|
|
54
|
-
};
|
|
1
|
+
export {};
|
|
@@ -1,191 +1,60 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
|
-
import { extractBlockProps } from '../../extractors/block';
|
|
10
|
-
import { extractRequestAccessContextImproved } from '../../extractors/common/context';
|
|
11
|
-
import { getExtensionKey } from '../../state/helpers';
|
|
12
|
-
import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
|
|
2
|
+
import React from 'react';
|
|
13
3
|
import { CardLinkView } from '../LinkView';
|
|
14
|
-
import { AuthorizeAction } from './actions/AuthorizeAction';
|
|
15
|
-
import { ForbiddenAction } from './actions/ForbiddenAction';
|
|
16
4
|
import { handleClickCommon } from './utils/handlers';
|
|
17
|
-
import { ErroredView as BlockCardErroredView } from './views/ErroredView';
|
|
18
5
|
import FlexibleErroredView from './views/flexible/FlexibleErroredView';
|
|
19
6
|
import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
|
|
20
7
|
import FlexibleNotFoundView from './views/flexible/FlexibleNotFoundView';
|
|
21
8
|
import FlexibleResolvedView from './views/flexible/FlexibleResolvedView';
|
|
22
9
|
import FlexibleUnauthorisedView from './views/flexible/FlexibleUnauthorisedView';
|
|
23
|
-
import { ForbiddenView as BlockCardForbiddenView } from './views/ForbiddenView';
|
|
24
|
-
import { NotFoundView as BlockCardNotFoundView } from './views/NotFoundView';
|
|
25
|
-
import { ResolvedView as BlockCardResolvedView } from './views/ResolvedView';
|
|
26
|
-
import { ResolvingView as BlockCardResolvingView } from './views/ResolvingView';
|
|
27
|
-
import { UnauthorizedView as BlockCardUnauthorisedView } from './views/UnauthorizedView';
|
|
28
|
-
export { default as PreviewAction } from './actions/PreviewAction';
|
|
29
|
-
export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, BlockCardForbiddenView, BlockCardErroredView, BlockCardNotFoundView };
|
|
30
10
|
export var BlockCard = function BlockCard(_ref) {
|
|
31
|
-
var _details$meta, _forbiddenViewProps$c, _forbiddenViewProps$c2;
|
|
32
11
|
var id = _ref.id,
|
|
33
12
|
url = _ref.url,
|
|
34
13
|
cardState = _ref.cardState,
|
|
35
14
|
authFlow = _ref.authFlow,
|
|
36
15
|
handleAuthorize = _ref.handleAuthorize,
|
|
37
|
-
handleErrorRetry = _ref.handleErrorRetry,
|
|
38
16
|
handleFrameClick = _ref.handleFrameClick,
|
|
39
|
-
handleInvoke = _ref.handleInvoke,
|
|
40
17
|
renderers = _ref.renderers,
|
|
41
18
|
isSelected = _ref.isSelected,
|
|
42
19
|
onResolve = _ref.onResolve,
|
|
43
20
|
onError = _ref.onError,
|
|
44
21
|
testId = _ref.testId,
|
|
45
|
-
platform = _ref.platform,
|
|
46
22
|
analytics = _ref.analytics,
|
|
47
|
-
enableFlexibleBlockCard = _ref.enableFlexibleBlockCard,
|
|
48
23
|
actionOptions = _ref.actionOptions;
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
actionOptions: actionOptions
|
|
24
|
+
var status = cardState.status;
|
|
25
|
+
var flexibleBlockCardProps = {
|
|
26
|
+
id: id,
|
|
27
|
+
cardState: cardState,
|
|
28
|
+
url: url,
|
|
29
|
+
testId: testId,
|
|
30
|
+
onClick: function onClick(event) {
|
|
31
|
+
return handleClickCommon(event, handleFrameClick);
|
|
32
|
+
},
|
|
33
|
+
onError: onError,
|
|
34
|
+
onResolve: onResolve,
|
|
35
|
+
renderers: renderers,
|
|
36
|
+
actionOptions: actionOptions,
|
|
37
|
+
analytics: analytics
|
|
62
38
|
};
|
|
63
|
-
if (enableFlexibleBlockCard) {
|
|
64
|
-
var flexibleBlockCardProps = {
|
|
65
|
-
id: id,
|
|
66
|
-
cardState: cardState,
|
|
67
|
-
url: url,
|
|
68
|
-
testId: testId,
|
|
69
|
-
onClick: function onClick(event) {
|
|
70
|
-
return handleClickCommon(event, handleFrameClick);
|
|
71
|
-
},
|
|
72
|
-
onError: onError,
|
|
73
|
-
onResolve: onResolve,
|
|
74
|
-
renderers: renderers,
|
|
75
|
-
actionOptions: actionOptions,
|
|
76
|
-
analytics: analytics
|
|
77
|
-
};
|
|
78
|
-
switch (status) {
|
|
79
|
-
case 'pending':
|
|
80
|
-
case 'resolving':
|
|
81
|
-
return jsx(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
82
|
-
testId: 'smart-block-resolving-view'
|
|
83
|
-
}));
|
|
84
|
-
case 'resolved':
|
|
85
|
-
return jsx(FlexibleResolvedView, flexibleBlockCardProps);
|
|
86
|
-
case 'unauthorized':
|
|
87
|
-
return jsx(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
88
|
-
onAuthorize: handleAuthorize
|
|
89
|
-
}));
|
|
90
|
-
case 'forbidden':
|
|
91
|
-
return jsx(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
92
|
-
onAuthorize: handleAuthorize
|
|
93
|
-
}));
|
|
94
|
-
case 'not_found':
|
|
95
|
-
return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
96
|
-
onAuthorize: handleAuthorize
|
|
97
|
-
}));
|
|
98
|
-
case 'fallback':
|
|
99
|
-
case 'errored':
|
|
100
|
-
default:
|
|
101
|
-
if (onError) {
|
|
102
|
-
onError({
|
|
103
|
-
url: url,
|
|
104
|
-
status: status
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
if (authFlow && authFlow === 'disabled') {
|
|
108
|
-
return jsx(CardLinkView, {
|
|
109
|
-
link: url,
|
|
110
|
-
isSelected: isSelected,
|
|
111
|
-
onClick: handleFrameClick,
|
|
112
|
-
testId: "".concat(testId, "-").concat(status)
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
return jsx(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
116
|
-
onAuthorize: handleAuthorize
|
|
117
|
-
}));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
39
|
switch (status) {
|
|
121
40
|
case 'pending':
|
|
122
41
|
case 'resolving':
|
|
123
|
-
return
|
|
124
|
-
testId:
|
|
125
|
-
isSelected: isSelected
|
|
126
|
-
});
|
|
127
|
-
case 'resolved':
|
|
128
|
-
var resolvedViewProps = extractBlockProps(data, meta, extractorOpts, renderers, platform);
|
|
129
|
-
if (onResolve) {
|
|
130
|
-
onResolve({
|
|
131
|
-
title: resolvedViewProps.title,
|
|
132
|
-
url: url
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
return jsx(BlockCardResolvedView, _extends({}, resolvedViewProps, {
|
|
136
|
-
isSelected: isSelected,
|
|
137
|
-
testId: testId,
|
|
138
|
-
onClick: handleFrameClick
|
|
42
|
+
return /*#__PURE__*/React.createElement(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
43
|
+
testId: 'smart-block-resolving-view'
|
|
139
44
|
}));
|
|
45
|
+
case 'resolved':
|
|
46
|
+
return /*#__PURE__*/React.createElement(FlexibleResolvedView, flexibleBlockCardProps);
|
|
140
47
|
case 'unauthorized':
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
url: url,
|
|
144
|
-
status: status
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
var unauthorizedViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
148
|
-
return jsx(BlockCardUnauthorisedView, _extends({}, unauthorizedViewProps, {
|
|
149
|
-
isSelected: isSelected,
|
|
150
|
-
testId: testId,
|
|
151
|
-
actions: handleAuthorize ? [AuthorizeAction(handleAuthorize)] : [],
|
|
152
|
-
actionOptions: actionOptions,
|
|
153
|
-
onClick: handleFrameClick
|
|
48
|
+
return /*#__PURE__*/React.createElement(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
49
|
+
onAuthorize: handleAuthorize
|
|
154
50
|
}));
|
|
155
51
|
case 'forbidden':
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
url: url,
|
|
159
|
-
status: status
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
var forbiddenViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
163
|
-
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
164
|
-
var requestAccessContext = extractRequestAccessContextImproved({
|
|
165
|
-
jsonLd: cardMetadata,
|
|
166
|
-
url: url,
|
|
167
|
-
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : '',
|
|
168
|
-
createAnalyticsEvent: createAnalyticsEvent
|
|
169
|
-
});
|
|
170
|
-
return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
|
|
171
|
-
isSelected: isSelected,
|
|
172
|
-
actions: handleAuthorize ? [ForbiddenAction(handleAuthorize)] : [],
|
|
173
|
-
actionOptions: actionOptions,
|
|
174
|
-
onClick: handleFrameClick,
|
|
175
|
-
requestAccessContext: requestAccessContext
|
|
52
|
+
return /*#__PURE__*/React.createElement(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
53
|
+
onAuthorize: handleAuthorize
|
|
176
54
|
}));
|
|
177
55
|
case 'not_found':
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
url: url,
|
|
181
|
-
status: status
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
var notFoundViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
185
|
-
return jsx(BlockCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
186
|
-
isSelected: isSelected,
|
|
187
|
-
testId: testId,
|
|
188
|
-
onClick: handleFrameClick
|
|
56
|
+
return /*#__PURE__*/React.createElement(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
57
|
+
onAuthorize: handleAuthorize
|
|
189
58
|
}));
|
|
190
59
|
case 'fallback':
|
|
191
60
|
case 'errored':
|
|
@@ -197,19 +66,15 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
197
66
|
});
|
|
198
67
|
}
|
|
199
68
|
if (authFlow && authFlow === 'disabled') {
|
|
200
|
-
return
|
|
69
|
+
return /*#__PURE__*/React.createElement(CardLinkView, {
|
|
201
70
|
link: url,
|
|
202
71
|
isSelected: isSelected,
|
|
203
72
|
onClick: handleFrameClick,
|
|
204
73
|
testId: "".concat(testId, "-").concat(status)
|
|
205
74
|
});
|
|
206
75
|
}
|
|
207
|
-
return
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
onRetry: handleErrorRetry,
|
|
211
|
-
onClick: handleFrameClick,
|
|
212
|
-
testId: testId
|
|
213
|
-
});
|
|
76
|
+
return /*#__PURE__*/React.createElement(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
77
|
+
onAuthorize: handleAuthorize
|
|
78
|
+
}));
|
|
214
79
|
}
|
|
215
80
|
};
|
|
@@ -198,6 +198,7 @@ function Component(_ref) {
|
|
|
198
198
|
cardState: cardState,
|
|
199
199
|
onAuthorize: services.length && handleAuthorize || undefined,
|
|
200
200
|
onClick: handleClickWrapper,
|
|
201
|
+
origin: "smartLinkCard",
|
|
201
202
|
renderers: renderers,
|
|
202
203
|
ui: ui,
|
|
203
204
|
showHoverPreview: showHoverPreview,
|
|
@@ -248,17 +249,13 @@ function Component(_ref) {
|
|
|
248
249
|
authFlow: config && config.authFlow,
|
|
249
250
|
cardState: state,
|
|
250
251
|
handleAuthorize: services.length && handleAuthorize || undefined,
|
|
251
|
-
handleErrorRetry: handleRetry,
|
|
252
|
-
handleInvoke: handleInvoke,
|
|
253
252
|
handleFrameClick: handleClickWrapper,
|
|
254
253
|
analytics: analytics,
|
|
255
254
|
isSelected: isSelected,
|
|
256
255
|
onResolve: onResolve,
|
|
257
256
|
onError: onError,
|
|
258
257
|
testId: testId,
|
|
259
|
-
actionOptions: actionOptions
|
|
260
|
-
platform: platform,
|
|
261
|
-
enableFlexibleBlockCard: true
|
|
258
|
+
actionOptions: actionOptions
|
|
262
259
|
});
|
|
263
260
|
case 'embed':
|
|
264
261
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|