@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/es2019/i18n/uk.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/es2019/i18n/vi.js
CHANGED
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
'fabric.linking.automation-action.confluence.page.modal.description': 'Áp dụng một phương thức tự động hóa cho <b>{name}</b>.{br}Các lựa chọn có sẵn được kiểm soát bởi Confluence và quản lý không gian.',
|
|
39
39
|
'fabric.linking.automation-action.confluence.page.modal.title': 'Tự động hóa đối với trang',
|
|
40
40
|
'fabric.linking.automation-action.icon.label': 'Biểu tượng tự động hóa',
|
|
41
|
-
'fabric.linking.automation-action.title': 'Xem quy tắc tự động hóa
|
|
41
|
+
'fabric.linking.automation-action.title': 'Xem quy tắc tự động hóa',
|
|
42
42
|
'fabric.linking.automation-action.tooltip': 'Chọn quy tắc tự động hóa để chạy',
|
|
43
43
|
'fabric.linking.beta': 'Beta',
|
|
44
44
|
'fabric.linking.cancel': 'Hủy',
|
|
@@ -90,7 +90,6 @@ export default {
|
|
|
90
90
|
'fabric.linking.invalid_permissions': 'Nội dung bị hạn chế',
|
|
91
91
|
'fabric.linking.invalid_permissions_description': 'Bạn cần có quyền truy cập hoặc thử một tài khoản khác để xem bản xem trước này.',
|
|
92
92
|
'fabric.linking.join_to_view': 'Tham gia {context} để xem vấn đề này',
|
|
93
|
-
'fabric.linking.last_mentioned_in': 'Được nhắc đến lần gần đây nhất trong',
|
|
94
93
|
'fabric.linking.learn_more_about_connecting_account': 'Tìm hiểu thêm về cách kết nối tài khoản với các sản phẩm của Atlassian.',
|
|
95
94
|
'fabric.linking.learn_more_about_smart_links': 'Tìm hiểu thêm về Liên kết Thông minh.',
|
|
96
95
|
'fabric.linking.link_safety_warning_message': 'Liên kết {unsafeLinkText} sẽ đưa bạn đến một trang khác, <a>actual link here</a>',
|
|
@@ -131,8 +130,7 @@ export default {
|
|
|
131
130
|
'fabric.linking.related_links_modal_unavailable_header': 'Không có liên kết gần đây',
|
|
132
131
|
'fabric.linking.related_links_modal_unavailable_message': 'Chúng tôi không tìm được liên kết nào để hiển thị ở đây. Chúng tôi liên tục xem xét và thêm các liên kết gần đây cho các trang cập nhật hoặc các loại nội dung khác.',
|
|
133
132
|
'fabric.linking.related_links_not_found': 'Chúng tôi không tìm được liên kết nào để hiển thị ở đây.',
|
|
134
|
-
'fabric.linking.related_links_view_related_urls
|
|
135
|
-
'fabric.linking.related_work_items_not_found': 'Liên kết này chưa được nhắc đến ở bất cứ đâu.',
|
|
133
|
+
'fabric.linking.related_links_view_related_urls': 'Xem các liên kết gần đây',
|
|
136
134
|
'fabric.linking.request_access': 'Yêu cầu cấp quyền truy cập',
|
|
137
135
|
'fabric.linking.request_access_description': 'Nhóm của bạn sử dụng {product} để cộng tác. Hãy gửi yêu cầu cho quản trị viên của bạn để được cấp quyền truy cập.',
|
|
138
136
|
'fabric.linking.request_access_pending': 'Đang chờ phê duyệt',
|
package/dist/es2019/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': '待批准',
|
|
@@ -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': '待核准',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
import uuid from 'uuid';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
3
5
|
import * as measure from '../../../utils/performance';
|
|
4
6
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from '../../analytics';
|
|
5
7
|
const ACTION_EXPERIENCE_NAME = 'smart-link-action-invocation';
|
|
@@ -8,51 +10,97 @@ const ACTION_EXPERIENCE_NAME = 'smart-link-action-invocation';
|
|
|
8
10
|
* Invoke client action such as preview, download and open link
|
|
9
11
|
*/
|
|
10
12
|
const useInvokeClientAction = ({
|
|
11
|
-
analytics
|
|
12
|
-
|
|
13
|
-
actionType,
|
|
14
|
-
actionFn,
|
|
15
|
-
extensionKey,
|
|
16
|
-
display
|
|
13
|
+
analytics,
|
|
14
|
+
fireEvent: fireEventProp
|
|
17
15
|
}) => {
|
|
18
|
-
const
|
|
16
|
+
const {
|
|
17
|
+
fireEvent: defaultFireEvent
|
|
18
|
+
} = useAnalyticsEvents();
|
|
19
|
+
const fireEvent = fireEventProp !== null && fireEventProp !== void 0 ? fireEventProp : defaultFireEvent;
|
|
20
|
+
return useCallback(async ({
|
|
21
|
+
actionSubjectId,
|
|
22
|
+
actionType,
|
|
23
|
+
actionFn,
|
|
24
|
+
definitionId = null,
|
|
25
|
+
extensionKey,
|
|
26
|
+
display,
|
|
27
|
+
id,
|
|
28
|
+
resourceType = null
|
|
29
|
+
}) => {
|
|
30
|
+
const experienceId = uuid();
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
// Begin performance instrumentation.
|
|
33
|
+
const markName = `${experienceId}-${actionType}`;
|
|
34
|
+
measure.mark(markName, 'pending');
|
|
35
|
+
try {
|
|
36
|
+
// Begin UFO experience
|
|
37
|
+
startUfoExperience(ACTION_EXPERIENCE_NAME, experienceId, {
|
|
38
|
+
actionType,
|
|
39
|
+
display,
|
|
40
|
+
extensionKey,
|
|
41
|
+
invokeType: 'client'
|
|
42
|
+
});
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
// Begin analytics instrumentation.
|
|
45
|
+
if (actionSubjectId && fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
46
|
+
fireEvent(`ui.button.clicked.${actionSubjectId}`, {
|
|
47
|
+
actionType: actionType !== null && actionType !== void 0 ? actionType : null,
|
|
48
|
+
definitionId,
|
|
49
|
+
display: display !== null && display !== void 0 ? display : null,
|
|
50
|
+
id: id !== null && id !== void 0 ? id : experienceId,
|
|
51
|
+
resourceType
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.ui.actionClickedEvent({
|
|
55
|
+
actionType,
|
|
56
|
+
display
|
|
57
|
+
});
|
|
58
|
+
}
|
|
37
59
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
60
|
+
// Invoke action
|
|
61
|
+
const result = await actionFn();
|
|
62
|
+
measure.mark(markName, 'resolved');
|
|
63
|
+
succeedUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
|
|
64
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
65
|
+
var _measure$getMeasure$d, _measure$getMeasure;
|
|
66
|
+
fireEvent('operational.smartLinkAction.resolved', {
|
|
67
|
+
actionType: actionType !== null && actionType !== void 0 ? actionType : null,
|
|
68
|
+
definitionId,
|
|
69
|
+
display: display !== null && display !== void 0 ? display : null,
|
|
70
|
+
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,
|
|
71
|
+
id: id !== null && id !== void 0 ? id : experienceId,
|
|
72
|
+
resourceType
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.operational.invokeSucceededEvent({
|
|
76
|
+
actionType,
|
|
77
|
+
display
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
} catch (err) {
|
|
82
|
+
measure.mark(markName, 'errored');
|
|
83
|
+
failUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
|
|
84
|
+
const reason = typeof err === 'string' ? err : err === null || err === void 0 ? void 0 : err.message;
|
|
85
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
86
|
+
var _measure$getMeasure$d2, _measure$getMeasure2;
|
|
87
|
+
fireEvent('operational.smartLinkAction.unresolved', {
|
|
88
|
+
actionType: actionType !== null && actionType !== void 0 ? actionType : null,
|
|
89
|
+
definitionId,
|
|
90
|
+
display: display !== null && display !== void 0 ? display : null,
|
|
91
|
+
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,
|
|
92
|
+
id: id !== null && id !== void 0 ? id : experienceId,
|
|
93
|
+
reason,
|
|
94
|
+
resourceType
|
|
95
|
+
});
|
|
96
|
+
} else {
|
|
97
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.operational.invokeFailedEvent({
|
|
98
|
+
actionType,
|
|
99
|
+
display,
|
|
100
|
+
reason
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}, [analytics === null || analytics === void 0 ? void 0 : analytics.operational, analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent]);
|
|
105
|
+
};
|
|
58
106
|
export default useInvokeClientAction;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import uuid from 'uuid';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
|
+
import { extractInvokeDownloadAction } from '../../extractors/action/extract-invoke-download-action';
|
|
6
|
+
import { extractInvokePreviewAction } from '../../extractors/action/extract-invoke-preview-action';
|
|
7
|
+
import { extractInvokeViewAction } from '../../extractors/action/extract-invoke-view-action';
|
|
3
8
|
import { extractDownloadActionProps } from '../../extractors/action/extractDownloadActionProps';
|
|
4
9
|
import { extractPreviewActionProps } from '../../extractors/action/extractPreviewActionProps';
|
|
5
10
|
import { extractViewActionProps } from '../../extractors/action/extractViewActionProps';
|
|
@@ -18,6 +23,9 @@ export function useSmartLinkActions({
|
|
|
18
23
|
const id = useMemo(() => uuid(), []);
|
|
19
24
|
const linkState = useLinkState(url);
|
|
20
25
|
const linkAnalytics = useLinkAnalytics(url, id);
|
|
26
|
+
const {
|
|
27
|
+
fireEvent
|
|
28
|
+
} = useAnalyticsEvents();
|
|
21
29
|
const invokeClientAction = useInvokeClientAction({
|
|
22
30
|
analytics: linkAnalytics
|
|
23
31
|
});
|
|
@@ -32,15 +40,25 @@ export function useSmartLinkActions({
|
|
|
32
40
|
actionOptions
|
|
33
41
|
};
|
|
34
42
|
const actions = [];
|
|
35
|
-
const
|
|
43
|
+
const invokeParam = {
|
|
44
|
+
actionOptions,
|
|
45
|
+
appearance,
|
|
46
|
+
id,
|
|
47
|
+
response: linkState.details
|
|
48
|
+
};
|
|
49
|
+
const downloadActionProps = fg('platform-smart-card-migrate-embed-modal-analytics') ? extractInvokeDownloadAction(invokeParam) : extractDownloadActionProps(opts);
|
|
36
50
|
if (downloadActionProps) {
|
|
37
51
|
actions.push(toAction(downloadActionProps, invokeClientAction, messages.download, 'download-content'));
|
|
38
52
|
}
|
|
39
|
-
const viewActionProps = extractViewActionProps(opts);
|
|
53
|
+
const viewActionProps = fg('platform-smart-card-migrate-embed-modal-analytics') ? extractInvokeViewAction(invokeParam) : extractViewActionProps(opts);
|
|
40
54
|
if (viewActionProps) {
|
|
41
55
|
actions.push(toAction(viewActionProps, invokeClientAction, messages.view, 'view-content'));
|
|
42
56
|
}
|
|
43
|
-
const previewActionProps =
|
|
57
|
+
const previewActionProps = fg('platform-smart-card-migrate-embed-modal-analytics') ? extractInvokePreviewAction({
|
|
58
|
+
...invokeParam,
|
|
59
|
+
fireEvent,
|
|
60
|
+
origin
|
|
61
|
+
}) : extractPreviewActionProps(opts);
|
|
44
62
|
if (previewActionProps) {
|
|
45
63
|
actions.push(toAction(previewActionProps, invokeClientAction, messages.preview_improved, 'preview-content'));
|
|
46
64
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { context } from './analytics';
|
|
3
5
|
/**
|
|
4
6
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
5
7
|
*/
|
|
@@ -14,6 +16,7 @@ export const LinkAnalyticsContext = ({
|
|
|
14
16
|
data: {
|
|
15
17
|
source,
|
|
16
18
|
attributes: {
|
|
19
|
+
...(fg('platform-smart-card-migrate-embed-modal-analytics') ? context : {}),
|
|
17
20
|
displayCategory,
|
|
18
21
|
display,
|
|
19
22
|
id
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "32.7.
|
|
7
|
+
packageVersion: "32.7.2"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -16,7 +16,10 @@ export const mockByUrl = url => {
|
|
|
16
16
|
access: 'granted',
|
|
17
17
|
auth: [],
|
|
18
18
|
definitionId: 'd1',
|
|
19
|
-
key: 'object-provider'
|
|
19
|
+
key: 'object-provider',
|
|
20
|
+
resourceType: 'object-resource',
|
|
21
|
+
subproduct: 'object-subproduct',
|
|
22
|
+
product: 'object-product'
|
|
20
23
|
},
|
|
21
24
|
data: {
|
|
22
25
|
'@context': {
|
|
@@ -1,48 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { LoadingButton as Button } from '@atlaskit/button';
|
|
10
|
-
import { ActionIcon } from './ActionIcon';
|
|
11
|
-
export const spinnerDelay = 1000;
|
|
12
|
-
const baseTextStyles = css({
|
|
13
|
-
transition: 'opacity 0.3s'
|
|
14
|
-
});
|
|
15
|
-
export const Action = ({
|
|
16
|
-
promise,
|
|
17
|
-
text,
|
|
18
|
-
buttonAppearance = 'default',
|
|
19
|
-
id
|
|
20
|
-
}) => {
|
|
21
|
-
const [state, setState] = useState('init');
|
|
22
|
-
return jsx(Button, {
|
|
23
|
-
spacing: "compact",
|
|
24
|
-
appearance: buttonAppearance,
|
|
25
|
-
isLoading: state === 'loading',
|
|
26
|
-
testId: `button-${id}`,
|
|
27
|
-
onClick: event => {
|
|
28
|
-
event.stopPropagation();
|
|
29
|
-
event.preventDefault();
|
|
30
|
-
if (state !== 'loading') {
|
|
31
|
-
setState('loading');
|
|
32
|
-
promise().then(() => {
|
|
33
|
-
setState('success');
|
|
34
|
-
}).catch(() => {
|
|
35
|
-
setState('failure');
|
|
36
|
-
}).finally(() => {
|
|
37
|
-
setTimeout(() => setState('init'), spinnerDelay);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, jsx("div", {
|
|
42
|
-
css: [baseTextStyles, {
|
|
43
|
-
opacity: state !== 'init' ? 0 : 1
|
|
44
|
-
}]
|
|
45
|
-
}, text), jsx(ActionIcon, {
|
|
46
|
-
state: state
|
|
47
|
-
}));
|
|
48
|
-
};
|
|
1
|
+
export {};
|
|
@@ -1,193 +1,61 @@
|
|
|
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 const BlockCard = ({
|
|
31
11
|
id,
|
|
32
12
|
url,
|
|
33
13
|
cardState,
|
|
34
14
|
authFlow,
|
|
35
15
|
handleAuthorize,
|
|
36
|
-
handleErrorRetry,
|
|
37
16
|
handleFrameClick,
|
|
38
|
-
handleInvoke,
|
|
39
17
|
renderers,
|
|
40
18
|
isSelected,
|
|
41
19
|
onResolve,
|
|
42
20
|
onError,
|
|
43
21
|
testId,
|
|
44
|
-
platform,
|
|
45
22
|
analytics,
|
|
46
|
-
enableFlexibleBlockCard,
|
|
47
23
|
actionOptions
|
|
48
24
|
}) => {
|
|
49
|
-
var _details$meta, _forbiddenViewProps$c, _forbiddenViewProps$c2;
|
|
50
25
|
const {
|
|
51
|
-
|
|
52
|
-
} = useAnalyticsEvents();
|
|
53
|
-
const {
|
|
54
|
-
status,
|
|
55
|
-
details
|
|
26
|
+
status
|
|
56
27
|
} = cardState;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
28
|
+
const flexibleBlockCardProps = {
|
|
29
|
+
id,
|
|
30
|
+
cardState,
|
|
31
|
+
url,
|
|
32
|
+
testId,
|
|
33
|
+
onClick: event => handleClickCommon(event, handleFrameClick),
|
|
34
|
+
onError,
|
|
35
|
+
onResolve,
|
|
36
|
+
renderers,
|
|
37
|
+
actionOptions,
|
|
38
|
+
analytics
|
|
66
39
|
};
|
|
67
|
-
if (enableFlexibleBlockCard) {
|
|
68
|
-
const flexibleBlockCardProps = {
|
|
69
|
-
id,
|
|
70
|
-
cardState,
|
|
71
|
-
url,
|
|
72
|
-
testId,
|
|
73
|
-
onClick: event => handleClickCommon(event, handleFrameClick),
|
|
74
|
-
onError,
|
|
75
|
-
onResolve,
|
|
76
|
-
renderers,
|
|
77
|
-
actionOptions,
|
|
78
|
-
analytics
|
|
79
|
-
};
|
|
80
|
-
switch (status) {
|
|
81
|
-
case 'pending':
|
|
82
|
-
case 'resolving':
|
|
83
|
-
return jsx(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
84
|
-
testId: 'smart-block-resolving-view'
|
|
85
|
-
}));
|
|
86
|
-
case 'resolved':
|
|
87
|
-
return jsx(FlexibleResolvedView, flexibleBlockCardProps);
|
|
88
|
-
case 'unauthorized':
|
|
89
|
-
return jsx(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
90
|
-
onAuthorize: handleAuthorize
|
|
91
|
-
}));
|
|
92
|
-
case 'forbidden':
|
|
93
|
-
return jsx(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
94
|
-
onAuthorize: handleAuthorize
|
|
95
|
-
}));
|
|
96
|
-
case 'not_found':
|
|
97
|
-
return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
98
|
-
onAuthorize: handleAuthorize
|
|
99
|
-
}));
|
|
100
|
-
case 'fallback':
|
|
101
|
-
case 'errored':
|
|
102
|
-
default:
|
|
103
|
-
if (onError) {
|
|
104
|
-
onError({
|
|
105
|
-
url,
|
|
106
|
-
status
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
if (authFlow && authFlow === 'disabled') {
|
|
110
|
-
return jsx(CardLinkView, {
|
|
111
|
-
link: url,
|
|
112
|
-
isSelected: isSelected,
|
|
113
|
-
onClick: handleFrameClick,
|
|
114
|
-
testId: `${testId}-${status}`
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
return jsx(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
118
|
-
onAuthorize: handleAuthorize
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
40
|
switch (status) {
|
|
123
41
|
case 'pending':
|
|
124
42
|
case 'resolving':
|
|
125
|
-
return
|
|
126
|
-
testId:
|
|
127
|
-
isSelected: isSelected
|
|
128
|
-
});
|
|
129
|
-
case 'resolved':
|
|
130
|
-
const resolvedViewProps = extractBlockProps(data, meta, extractorOpts, renderers, platform);
|
|
131
|
-
if (onResolve) {
|
|
132
|
-
onResolve({
|
|
133
|
-
title: resolvedViewProps.title,
|
|
134
|
-
url
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
return jsx(BlockCardResolvedView, _extends({}, resolvedViewProps, {
|
|
138
|
-
isSelected: isSelected,
|
|
139
|
-
testId: testId,
|
|
140
|
-
onClick: handleFrameClick
|
|
43
|
+
return /*#__PURE__*/React.createElement(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
44
|
+
testId: 'smart-block-resolving-view'
|
|
141
45
|
}));
|
|
46
|
+
case 'resolved':
|
|
47
|
+
return /*#__PURE__*/React.createElement(FlexibleResolvedView, flexibleBlockCardProps);
|
|
142
48
|
case 'unauthorized':
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
url,
|
|
146
|
-
status
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
const unauthorizedViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
150
|
-
return jsx(BlockCardUnauthorisedView, _extends({}, unauthorizedViewProps, {
|
|
151
|
-
isSelected: isSelected,
|
|
152
|
-
testId: testId,
|
|
153
|
-
actions: handleAuthorize ? [AuthorizeAction(handleAuthorize)] : [],
|
|
154
|
-
actionOptions: actionOptions,
|
|
155
|
-
onClick: handleFrameClick
|
|
49
|
+
return /*#__PURE__*/React.createElement(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
50
|
+
onAuthorize: handleAuthorize
|
|
156
51
|
}));
|
|
157
52
|
case 'forbidden':
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
url,
|
|
161
|
-
status
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
const forbiddenViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
165
|
-
const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
166
|
-
const requestAccessContext = extractRequestAccessContextImproved({
|
|
167
|
-
jsonLd: cardMetadata,
|
|
168
|
-
url,
|
|
169
|
-
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : '',
|
|
170
|
-
createAnalyticsEvent
|
|
171
|
-
});
|
|
172
|
-
return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
|
|
173
|
-
isSelected: isSelected,
|
|
174
|
-
actions: handleAuthorize ? [ForbiddenAction(handleAuthorize)] : [],
|
|
175
|
-
actionOptions: actionOptions,
|
|
176
|
-
onClick: handleFrameClick,
|
|
177
|
-
requestAccessContext: requestAccessContext
|
|
53
|
+
return /*#__PURE__*/React.createElement(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
54
|
+
onAuthorize: handleAuthorize
|
|
178
55
|
}));
|
|
179
56
|
case 'not_found':
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
url,
|
|
183
|
-
status
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
const notFoundViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
187
|
-
return jsx(BlockCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
188
|
-
isSelected: isSelected,
|
|
189
|
-
testId: testId,
|
|
190
|
-
onClick: handleFrameClick
|
|
57
|
+
return /*#__PURE__*/React.createElement(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
58
|
+
onAuthorize: handleAuthorize
|
|
191
59
|
}));
|
|
192
60
|
case 'fallback':
|
|
193
61
|
case 'errored':
|
|
@@ -199,19 +67,15 @@ export const BlockCard = ({
|
|
|
199
67
|
});
|
|
200
68
|
}
|
|
201
69
|
if (authFlow && authFlow === 'disabled') {
|
|
202
|
-
return
|
|
70
|
+
return /*#__PURE__*/React.createElement(CardLinkView, {
|
|
203
71
|
link: url,
|
|
204
72
|
isSelected: isSelected,
|
|
205
73
|
onClick: handleFrameClick,
|
|
206
74
|
testId: `${testId}-${status}`
|
|
207
75
|
});
|
|
208
76
|
}
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
onRetry: handleErrorRetry,
|
|
213
|
-
onClick: handleFrameClick,
|
|
214
|
-
testId: testId
|
|
215
|
-
});
|
|
77
|
+
return /*#__PURE__*/React.createElement(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
78
|
+
onAuthorize: handleAuthorize
|
|
79
|
+
}));
|
|
216
80
|
}
|
|
217
81
|
};
|