@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
|
@@ -1,89 +0,0 @@
|
|
|
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; }
|
|
4
|
-
import { extractImage, extractLink, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractProvider, extractTitle } from '@atlaskit/link-extractors';
|
|
5
|
-
import { extractClientActions } from '../common/actions/extractActions';
|
|
6
|
-
import { extractPreviewAction } from '../common/actions/extractPreviewAction';
|
|
7
|
-
import { extractByline } from '../common/byline/extractByline';
|
|
8
|
-
import { extractAttachmentCount, extractCommentCount, extractProgrammingLanguage, extractSubscriberCount } from '../common/detail';
|
|
9
|
-
import { extractIcon } from '../common/icon';
|
|
10
|
-
import { extractLozenge } from '../common/lozenge';
|
|
11
|
-
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
12
|
-
import { extractSummary, extractTitleTextColor } from '../common/primitives';
|
|
13
|
-
import { extractTitlePrefix } from '../common/title-prefix/extractTitlePrefix';
|
|
14
|
-
var extractBlockIcon = function extractBlockIcon(jsonLd) {
|
|
15
|
-
var icon = extractIcon(jsonLd);
|
|
16
|
-
if (typeof icon === 'string') {
|
|
17
|
-
return {
|
|
18
|
-
url: icon
|
|
19
|
-
};
|
|
20
|
-
} else {
|
|
21
|
-
return {
|
|
22
|
-
icon: icon
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var extractBlockDetails = function extractBlockDetails(jsonLd) {
|
|
27
|
-
return [extractCommentCount(jsonLd), extractProgrammingLanguage(jsonLd), extractSubscriberCount(jsonLd), extractAttachmentCount(jsonLd)].filter(function (detail) {
|
|
28
|
-
return !!detail;
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
export var extractBlockActions = function extractBlockActions(props, jsonLd, opts, platform, meta) {
|
|
32
|
-
if (opts) {
|
|
33
|
-
var handleInvoke = opts.handleInvoke,
|
|
34
|
-
actionOptions = opts.actionOptions;
|
|
35
|
-
var actions = extractClientActions(jsonLd, handleInvoke, actionOptions);
|
|
36
|
-
var previewAction = extractPreviewAction(_objectSpread(_objectSpread({}, opts), {}, {
|
|
37
|
-
viewProps: props,
|
|
38
|
-
jsonLd: jsonLd,
|
|
39
|
-
platform: platform,
|
|
40
|
-
meta: meta
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
// The previewAction should always be the last action
|
|
44
|
-
if (previewAction) {
|
|
45
|
-
actions.push(previewAction);
|
|
46
|
-
}
|
|
47
|
-
return actions;
|
|
48
|
-
}
|
|
49
|
-
return [];
|
|
50
|
-
};
|
|
51
|
-
export var extractBlockUsers = function extractBlockUsers(jsonLd) {
|
|
52
|
-
if (jsonLd['@type'] === 'atlassian:Project') {
|
|
53
|
-
return extractMembers(jsonLd);
|
|
54
|
-
} else if (jsonLd['@type'] === 'atlassian:Task') {
|
|
55
|
-
var assignedMembers = extractPersonAssignedTo(jsonLd);
|
|
56
|
-
if (assignedMembers) {
|
|
57
|
-
return [assignedMembers];
|
|
58
|
-
}
|
|
59
|
-
} else if (jsonLd['@type'] === 'atlassian:SourceCodePullRequest') {
|
|
60
|
-
return extractPersonCreatedBy(jsonLd);
|
|
61
|
-
} else {
|
|
62
|
-
var updatedBy = extractPersonUpdatedBy(jsonLd);
|
|
63
|
-
var updatedByMembers;
|
|
64
|
-
if (updatedBy) {
|
|
65
|
-
updatedByMembers = [updatedBy];
|
|
66
|
-
}
|
|
67
|
-
var createdByMembers = extractPersonCreatedBy(jsonLd);
|
|
68
|
-
return updatedByMembers || createdByMembers;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
export var extractBlockProps = function extractBlockProps(jsonLd, meta, opts, renderers, platform) {
|
|
72
|
-
var props = {
|
|
73
|
-
link: extractLink(jsonLd),
|
|
74
|
-
title: extractTitle(jsonLd),
|
|
75
|
-
titleTextColor: extractTitleTextColor(jsonLd),
|
|
76
|
-
lozenge: extractLozenge(jsonLd),
|
|
77
|
-
icon: extractBlockIcon(jsonLd),
|
|
78
|
-
context: extractProvider(jsonLd),
|
|
79
|
-
details: extractBlockDetails(jsonLd),
|
|
80
|
-
byline: extractSummary(jsonLd) || extractByline(jsonLd),
|
|
81
|
-
thumbnail: extractImage(jsonLd),
|
|
82
|
-
users: extractBlockUsers(jsonLd),
|
|
83
|
-
titlePrefix: extractTitlePrefix(jsonLd, renderers, 'block'),
|
|
84
|
-
isTrusted: extractIsTrusted(meta)
|
|
85
|
-
};
|
|
86
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
87
|
-
actions: extractBlockActions(props, jsonLd, opts, platform, meta)
|
|
88
|
-
});
|
|
89
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
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; }
|
|
4
|
-
import { extractPreview, extractProvider } from '@atlaskit/link-extractors';
|
|
5
|
-
import { CardDisplay } from '../../../constants';
|
|
6
|
-
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
7
|
-
import { PreviewAction } from '../../../view/BlockCard';
|
|
8
|
-
import { CardAction } from '../../../view/Card/types';
|
|
9
|
-
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
10
|
-
import { extractDownloadUrl } from '../detail';
|
|
11
|
-
var getMetadataFromJsonLd = function getMetadataFromJsonLd(jsonLd, platform) {
|
|
12
|
-
var download = extractDownloadUrl(jsonLd);
|
|
13
|
-
var provider = extractProvider(jsonLd);
|
|
14
|
-
var preview = extractPreview(jsonLd, platform);
|
|
15
|
-
return {
|
|
16
|
-
download: download,
|
|
17
|
-
providerName: provider && provider.text,
|
|
18
|
-
src: preview && preview.src
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
var getMetadataFromResolvedProps = function getMetadataFromResolvedProps(props) {
|
|
22
|
-
return {
|
|
23
|
-
/* It's fine for content to be undefined, but src is still needed for the link out, even if it's not the source for the iframing */
|
|
24
|
-
link: props.link,
|
|
25
|
-
title: props.title,
|
|
26
|
-
details: props.details,
|
|
27
|
-
icon: props.icon,
|
|
28
|
-
url: props.link,
|
|
29
|
-
byline: props.byline,
|
|
30
|
-
isTrusted: props.isTrusted
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
var getInvokeOpts = function getInvokeOpts(key, action, source) {
|
|
34
|
-
return {
|
|
35
|
-
type: 'client',
|
|
36
|
-
key: key,
|
|
37
|
-
// NB: the preview action is invoked from a block card -
|
|
38
|
-
// the actions on the preview state are invoked from the
|
|
39
|
-
// preview card. Hence, we have a `source` for distinguishing
|
|
40
|
-
// between the two.
|
|
41
|
-
source: source || CardDisplay.EmbedPreview,
|
|
42
|
-
action: {
|
|
43
|
-
type: action,
|
|
44
|
-
promise: function promise() {
|
|
45
|
-
return Promise.resolve();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @private
|
|
53
|
-
* @deprecated - use extractPreviewActionProps instead
|
|
54
|
-
*/
|
|
55
|
-
export var extractPreviewAction = function extractPreviewAction(_ref) {
|
|
56
|
-
var _ref$extensionKey = _ref.extensionKey,
|
|
57
|
-
extensionKey = _ref$extensionKey === void 0 ? 'empty-object-provider' : _ref$extensionKey,
|
|
58
|
-
viewProps = _ref.viewProps,
|
|
59
|
-
jsonLd = _ref.jsonLd,
|
|
60
|
-
handleInvoke = _ref.handleInvoke,
|
|
61
|
-
testId = _ref.testId,
|
|
62
|
-
platform = _ref.platform,
|
|
63
|
-
origin = _ref.origin,
|
|
64
|
-
_ref$source = _ref.source,
|
|
65
|
-
source = _ref$source === void 0 ? 'block' : _ref$source,
|
|
66
|
-
analytics = _ref.analytics,
|
|
67
|
-
meta = _ref.meta,
|
|
68
|
-
actionOptions = _ref.actionOptions;
|
|
69
|
-
if (!canShowAction(CardAction.PreviewAction, actionOptions)) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Extract metadata from view props & raw JSON-LD.
|
|
74
|
-
var metadataFromJsonLd = getMetadataFromJsonLd(jsonLd, platform);
|
|
75
|
-
var metadataFromViewProps = getMetadataFromResolvedProps(viewProps);
|
|
76
|
-
var metadata = _objectSpread(_objectSpread({}, metadataFromJsonLd), metadataFromViewProps);
|
|
77
|
-
// Extract preview action only if we have an iframe src.
|
|
78
|
-
if (metadataFromJsonLd.src) {
|
|
79
|
-
// Build action using instrumentation hooks.
|
|
80
|
-
var key = extensionKey;
|
|
81
|
-
var previewAction = PreviewAction(_objectSpread(_objectSpread({}, metadata), {}, {
|
|
82
|
-
analytics: analytics,
|
|
83
|
-
extensionKey: extensionKey,
|
|
84
|
-
origin: origin,
|
|
85
|
-
testId: testId,
|
|
86
|
-
isSupportTheming: extractIsSupportTheming(meta)
|
|
87
|
-
}));
|
|
88
|
-
// Setup props to go through proper Redux 'invocation' flow
|
|
89
|
-
// for analytics, further state management if required in future.
|
|
90
|
-
var previewActionProps = getInvokeOpts(key, 'PreviewAction', source);
|
|
91
|
-
// - Promise invoked by the action invocation handler; open preview.
|
|
92
|
-
previewActionProps.action.promise = previewAction.promise;
|
|
93
|
-
// - Promise invoked on click of `Preview` on block card; trigger above promise.
|
|
94
|
-
previewAction.promise = function () {
|
|
95
|
-
return handleInvoke(previewActionProps);
|
|
96
|
-
};
|
|
97
|
-
return previewAction;
|
|
98
|
-
}
|
|
99
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import { messages } from '../../../messages';
|
|
4
|
-
export var AuthorizeAction = function AuthorizeAction(handler) {
|
|
5
|
-
return {
|
|
6
|
-
id: 'connect-account',
|
|
7
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_link_account_card),
|
|
8
|
-
promise: function promise() {
|
|
9
|
-
return new Promise(function (resolve) {
|
|
10
|
-
return resolve(handler());
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
buttonAppearance: 'default'
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import { messages } from '../../../messages';
|
|
4
|
-
import { downloadUrl } from '../../../utils';
|
|
5
|
-
export var DownloadAction = function DownloadAction(_ref) {
|
|
6
|
-
var url = _ref.url;
|
|
7
|
-
return {
|
|
8
|
-
id: 'download-content',
|
|
9
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
10
|
-
promise: function promise() {
|
|
11
|
-
return downloadUrl(url);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["details"];
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
8
|
-
import { messages } from '../../../messages';
|
|
9
|
-
import { openEmbedModal } from '../../EmbedModal/utils';
|
|
10
|
-
|
|
11
|
-
/*
|
|
12
|
-
Most of these are optional as we are being fault-tolerant
|
|
13
|
-
However src, details, icon, title, and providerName are STRONGLY encouraged
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export default (function (_ref) {
|
|
17
|
-
var details = _ref.details,
|
|
18
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return {
|
|
20
|
-
id: 'preview-content',
|
|
21
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_improved),
|
|
22
|
-
promise: function promise() {
|
|
23
|
-
return openEmbedModal(_objectSpread({
|
|
24
|
-
providerName: 'Preview',
|
|
25
|
-
showModal: true,
|
|
26
|
-
onClose: function onClose() {}
|
|
27
|
-
}, rest));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
-
import { messages } from '../../../messages';
|
|
6
|
-
export var RetryAction = function RetryAction(handler) {
|
|
7
|
-
return {
|
|
8
|
-
id: 'try-again',
|
|
9
|
-
promise: function () {
|
|
10
|
-
var _promise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
11
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
12
|
-
while (1) switch (_context.prev = _context.next) {
|
|
13
|
-
case 0:
|
|
14
|
-
return _context.abrupt("return", handler());
|
|
15
|
-
case 1:
|
|
16
|
-
case "end":
|
|
17
|
-
return _context.stop();
|
|
18
|
-
}
|
|
19
|
-
}, _callee);
|
|
20
|
-
}));
|
|
21
|
-
function promise() {
|
|
22
|
-
return _promise.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
return promise;
|
|
25
|
-
}(),
|
|
26
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again)
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import { messages } from '../../../messages';
|
|
4
|
-
import { openUrl } from '../../../utils';
|
|
5
|
-
export var ViewAction = function ViewAction(_ref) {
|
|
6
|
-
var url = _ref.url;
|
|
7
|
-
return {
|
|
8
|
-
id: 'view-content',
|
|
9
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.view),
|
|
10
|
-
promise: function promise() {
|
|
11
|
-
return openUrl(url);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CheckIcon from '@atlaskit/icon/core/migration/check-mark--check';
|
|
3
|
-
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
4
|
-
/*
|
|
5
|
-
These styles are taken fro the spinner style for button. There was not an
|
|
6
|
-
easy way to share tehm between the two components.
|
|
7
|
-
*/
|
|
8
|
-
export var spinnerStyles = {
|
|
9
|
-
display: 'flex',
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
12
|
-
left: '50%',
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
14
|
-
top: '50%',
|
|
15
|
-
transform: 'translate(-50%, -50%)'
|
|
16
|
-
};
|
|
17
|
-
export var ActionIcon = function ActionIcon(_ref) {
|
|
18
|
-
var state = _ref.state;
|
|
19
|
-
switch (state) {
|
|
20
|
-
case 'init':
|
|
21
|
-
case 'loading':
|
|
22
|
-
return null;
|
|
23
|
-
case 'success':
|
|
24
|
-
return (
|
|
25
|
-
/*#__PURE__*/
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
27
|
-
React.createElement("div", {
|
|
28
|
-
"data-testid": "check-icon",
|
|
29
|
-
style: spinnerStyles
|
|
30
|
-
}, /*#__PURE__*/React.createElement(CheckIcon, {
|
|
31
|
-
LEGACY_size: "small",
|
|
32
|
-
label: "check",
|
|
33
|
-
color: "currentColor"
|
|
34
|
-
}))
|
|
35
|
-
);
|
|
36
|
-
case 'failure':
|
|
37
|
-
return (
|
|
38
|
-
/*#__PURE__*/
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
40
|
-
React.createElement("div", {
|
|
41
|
-
"data-testid": "cross-icon",
|
|
42
|
-
style: spinnerStyles
|
|
43
|
-
}, /*#__PURE__*/React.createElement(CrossIcon, {
|
|
44
|
-
LEGACY_size: "small",
|
|
45
|
-
label: "check",
|
|
46
|
-
color: "currentColor"
|
|
47
|
-
}))
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
var _excluded = ["triggerRef"];
|
|
4
|
-
/**
|
|
5
|
-
* @jsxRuntime classic
|
|
6
|
-
* @jsx jsx
|
|
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 { di } from 'react-magnetic-di';
|
|
11
|
-
import ButtonGroup from '@atlaskit/button/button-group';
|
|
12
|
-
import Button from '@atlaskit/button/standard-button';
|
|
13
|
-
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
14
|
-
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
15
|
-
import { gs, mq } from '../../common/utils';
|
|
16
|
-
import { Action } from './Action';
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
19
|
-
var wrapperStyles = mq({
|
|
20
|
-
display: 'flex',
|
|
21
|
-
marginTop: [gs(2), 0]
|
|
22
|
-
});
|
|
23
|
-
var buttonStyles = css({
|
|
24
|
-
height: 'auto'
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
28
|
-
var actionsWrapperStyles = {
|
|
29
|
-
marginLeft: gs(0.5)
|
|
30
|
-
};
|
|
31
|
-
export var ActionList = function ActionList(_ref) {
|
|
32
|
-
var items = _ref.items;
|
|
33
|
-
var actionsToShow = items.slice(0, 2);
|
|
34
|
-
var actionsToList = items.slice(2, items.length);
|
|
35
|
-
return jsx("div", {
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
37
|
-
css: wrapperStyles
|
|
38
|
-
}, jsx(ButtonGroup, null, actionsToShow.map(function (action) {
|
|
39
|
-
return jsx(Action, _extends({
|
|
40
|
-
key: action.id
|
|
41
|
-
}, action));
|
|
42
|
-
})), actionsToList.length ?
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
44
|
-
jsx("div", {
|
|
45
|
-
css: actionsWrapperStyles
|
|
46
|
-
}, jsx(DropdownMenu, {
|
|
47
|
-
trigger: function trigger(_ref2) {
|
|
48
|
-
var triggerRef = _ref2.triggerRef,
|
|
49
|
-
props = _objectWithoutProperties(_ref2, _excluded);
|
|
50
|
-
return jsx(Button, _extends({}, props, {
|
|
51
|
-
iconBefore: jsx(MoreIcon, {
|
|
52
|
-
label: "more",
|
|
53
|
-
color: "currentColor",
|
|
54
|
-
spacing: "spacious"
|
|
55
|
-
}),
|
|
56
|
-
ref: triggerRef,
|
|
57
|
-
css: buttonStyles,
|
|
58
|
-
testId: "dropdown-trigger"
|
|
59
|
-
}));
|
|
60
|
-
},
|
|
61
|
-
placement: "right-start"
|
|
62
|
-
}, jsx(DropdownItemGroup, {
|
|
63
|
-
testId: "dropdown-menu"
|
|
64
|
-
}, actionsToList.map(function (actionToList) {
|
|
65
|
-
return jsx(DropdownItem, {
|
|
66
|
-
key: actionToList.id
|
|
67
|
-
}, actionToList.text);
|
|
68
|
-
})))) : null);
|
|
69
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import AvatarGroup from '@atlaskit/avatar-group';
|
|
8
|
-
import { mq } from '../../common/utils';
|
|
9
|
-
export var CollaboratorList = function CollaboratorList(_ref) {
|
|
10
|
-
var items = _ref.items,
|
|
11
|
-
_ref$handleAvatarClic = _ref.handleAvatarClick,
|
|
12
|
-
handleAvatarClick = _ref$handleAvatarClic === void 0 ? function () {} : _ref$handleAvatarClic,
|
|
13
|
-
_ref$handleMoreAvatar = _ref.handleMoreAvatarsClick,
|
|
14
|
-
handleMoreAvatarsClick = _ref$handleMoreAvatar === void 0 ? function () {} : _ref$handleMoreAvatar,
|
|
15
|
-
_ref$testId = _ref.testId,
|
|
16
|
-
testId = _ref$testId === void 0 ? 'collaborator-list' : _ref$testId;
|
|
17
|
-
if (items.length === 0) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return (
|
|
21
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
22
|
-
jsx("span", {
|
|
23
|
-
css: mq({
|
|
24
|
-
display: ['none', 'inherit']
|
|
25
|
-
})
|
|
26
|
-
}, jsx(AvatarGroup, {
|
|
27
|
-
maxCount: 4,
|
|
28
|
-
appearance: "stack",
|
|
29
|
-
size: "small",
|
|
30
|
-
data: items,
|
|
31
|
-
onAvatarClick: function onAvatarClick(event) {
|
|
32
|
-
event.stopPropagation();
|
|
33
|
-
event.preventDefault();
|
|
34
|
-
handleAvatarClick(event);
|
|
35
|
-
},
|
|
36
|
-
onMoreClick: function onMoreClick(event) {
|
|
37
|
-
event.stopPropagation();
|
|
38
|
-
event.preventDefault();
|
|
39
|
-
handleMoreAvatarsClick(event);
|
|
40
|
-
},
|
|
41
|
-
testId: testId
|
|
42
|
-
}))
|
|
43
|
-
);
|
|
44
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { gs, mq } from '../../common/utils';
|
|
8
|
-
/**
|
|
9
|
-
* Class name for selecting non-flexible block card content
|
|
10
|
-
*
|
|
11
|
-
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
12
|
-
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
13
|
-
*/
|
|
14
|
-
export var blockCardContentClassName = 'block-card-content';
|
|
15
|
-
var baseStyles = css({
|
|
16
|
-
display: 'flex',
|
|
17
|
-
flexDirection: 'column',
|
|
18
|
-
flexGrow: 1
|
|
19
|
-
});
|
|
20
|
-
export var Content = function Content(_ref) {
|
|
21
|
-
var children = _ref.children,
|
|
22
|
-
_ref$isCompact = _ref.isCompact,
|
|
23
|
-
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
24
|
-
return jsx("div", {
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
26
|
-
css: [baseStyles,
|
|
27
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
28
|
-
mq({
|
|
29
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
|
-
padding: isCompact ? gs(1) : gs(2),
|
|
31
|
-
justifyContent: isCompact ? 'unset' : ['unset', 'space-between']
|
|
32
|
-
})],
|
|
33
|
-
"data-trello-do-not-use-override": "block-card-content"
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
35
|
-
,
|
|
36
|
-
className: blockCardContentClassName
|
|
37
|
-
}, children);
|
|
38
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { gs, mq } from '../../common/utils';
|
|
8
|
-
export var contentFooterClassName = 'smart-link-content-footer';
|
|
9
|
-
var flexStyles = css({
|
|
10
|
-
display: 'flex'
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
14
|
-
var baseStyles = mq({
|
|
15
|
-
flexDirection: ['column', 'row'],
|
|
16
|
-
flexGrow: [1, 'unset'],
|
|
17
|
-
alignItems: ['unset', 'center'],
|
|
18
|
-
marginTop: [gs(1), gs(1.5)]
|
|
19
|
-
});
|
|
20
|
-
export var ContentFooter = function ContentFooter(_ref) {
|
|
21
|
-
var children = _ref.children,
|
|
22
|
-
_ref$hasSpaceBetween = _ref.hasSpaceBetween,
|
|
23
|
-
hasSpaceBetween = _ref$hasSpaceBetween === void 0 ? false : _ref$hasSpaceBetween;
|
|
24
|
-
return jsx("div", {
|
|
25
|
-
css: [flexStyles, baseStyles,
|
|
26
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
27
|
-
mq({
|
|
28
|
-
justifyContent: [hasSpaceBetween ? 'space-between' : 'flex-end', 'space-between']
|
|
29
|
-
})]
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
31
|
-
,
|
|
32
|
-
className: contentFooterClassName
|
|
33
|
-
}, children);
|
|
34
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
8
|
-
/**
|
|
9
|
-
* Class name for selecting non-flexible block card header
|
|
10
|
-
*
|
|
11
|
-
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
12
|
-
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
13
|
-
*/
|
|
14
|
-
export var blockCardContentHeaderClassName = 'block-card-content-header';
|
|
15
|
-
var styles = css({
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'flex-start',
|
|
18
|
-
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
19
|
-
// due to HTML its unwrapping behaviour on paste.
|
|
20
|
-
MozUserSelect: 'none'
|
|
21
|
-
});
|
|
22
|
-
export var ContentHeader = function ContentHeader(_ref) {
|
|
23
|
-
var onClick = _ref.onClick,
|
|
24
|
-
link = _ref.link,
|
|
25
|
-
children = _ref.children;
|
|
26
|
-
var onMouseDown = useMouseDownEvent();
|
|
27
|
-
return jsx("a", {
|
|
28
|
-
onClick: onClick,
|
|
29
|
-
onMouseDown: onMouseDown,
|
|
30
|
-
href: link,
|
|
31
|
-
target: "_blank",
|
|
32
|
-
css: styles,
|
|
33
|
-
"data-trello-do-not-use-override": "block-card-content-header"
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
35
|
-
,
|
|
36
|
-
className: blockCardContentHeaderClassName
|
|
37
|
-
}, children);
|
|
38
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React 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 { gs } from '../../common/utils';
|
|
10
|
-
var styles = css({
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
12
|
-
height: gs(2.5),
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
-
width: gs(2),
|
|
15
|
-
display: 'flex',
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
marginTop: "var(--ds-space-negative-025, -2px)"
|
|
19
|
-
});
|
|
20
|
-
export var Emoji = function Emoji(_ref) {
|
|
21
|
-
var emoji = _ref.emoji;
|
|
22
|
-
return jsx("span", {
|
|
23
|
-
css: styles
|
|
24
|
-
}, emoji);
|
|
25
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { B400 } from '@atlaskit/theme/colors';
|
|
8
|
-
var styles = css({
|
|
9
|
-
color: "var(--ds-link, ".concat(B400, ")"),
|
|
10
|
-
wordBreak: 'break-all'
|
|
11
|
-
});
|
|
12
|
-
export var Link = function Link(_ref) {
|
|
13
|
-
var url = _ref.url,
|
|
14
|
-
_ref$testId = _ref.testId,
|
|
15
|
-
testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
|
|
16
|
-
className = _ref.className;
|
|
17
|
-
return jsx("span", {
|
|
18
|
-
"data-testid": "".concat(testId, "-link")
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
20
|
-
,
|
|
21
|
-
className: className,
|
|
22
|
-
css: styles
|
|
23
|
-
}, url);
|
|
24
|
-
};
|