@atlaskit/smart-card 32.7.1 → 32.7.3
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 +20 -0
- package/analytics.spec.yaml +112 -53
- package/dist/cjs/classNames.js +14 -82
- package/dist/cjs/extractors/common/actions/extractActions.js +1 -67
- 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/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Action.js +1 -58
- package/dist/cjs/view/BlockCard/index.js +29 -218
- package/dist/cjs/view/CardWithUrl/component.js +27 -14
- package/dist/cjs/view/CardWithUrl/loader.js +21 -7
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +35 -8
- package/dist/cjs/view/HoverCard/index.js +25 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/classNames.js +12 -10
- package/dist/es2019/extractors/common/actions/extractActions.js +1 -55
- 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/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +1 -48
- package/dist/es2019/view/BlockCard/index.js +27 -163
- package/dist/es2019/view/CardWithUrl/component.js +27 -14
- package/dist/es2019/view/CardWithUrl/loader.js +21 -7
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +33 -9
- package/dist/es2019/view/HoverCard/index.js +26 -8
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/classNames.js +12 -10
- package/dist/esm/extractors/common/actions/extractActions.js +1 -65
- 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/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +1 -54
- package/dist/esm/view/BlockCard/index.js +29 -164
- package/dist/esm/view/CardWithUrl/component.js +27 -14
- package/dist/esm/view/CardWithUrl/loader.js +21 -7
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +36 -9
- package/dist/esm/view/HoverCard/index.js +25 -8
- 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 +35 -1
- 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/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/types.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/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/utils.d.ts +1 -1
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/index.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 +35 -1
- 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/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/types.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/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/extractors/block/index.js +0 -96
- package/dist/cjs/extractors/block/types.js +0 -5
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +0 -106
- package/dist/cjs/state/reducers/types.js +0 -5
- 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/block/types.js +0 -1
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +0 -91
- package/dist/es2019/state/reducers/types.js +0 -1
- 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/CardWithData/types.js +0 -1
- 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/block/types.js +0 -1
- 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
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CardWithDataContent = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _block = require("../../extractors/block");
|
|
16
|
-
var _inline = require("../../extractors/inline");
|
|
17
|
-
var _jsonld = require("../../utils/jsonld");
|
|
18
|
-
var _BlockCard = require("../BlockCard");
|
|
19
|
-
var _ResolvedView = require("../InlineCard/ResolvedView");
|
|
20
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
var CardWithDataContent = exports.CardWithDataContent = /*#__PURE__*/function (_React$Component) {
|
|
23
|
-
(0, _inherits2.default)(CardWithDataContent, _React$Component);
|
|
24
|
-
var _super = _createSuper(CardWithDataContent);
|
|
25
|
-
function CardWithDataContent() {
|
|
26
|
-
(0, _classCallCheck2.default)(this, CardWithDataContent);
|
|
27
|
-
return _super.apply(this, arguments);
|
|
28
|
-
}
|
|
29
|
-
(0, _createClass2.default)(CardWithDataContent, [{
|
|
30
|
-
key: "render",
|
|
31
|
-
value: function render() {
|
|
32
|
-
var _this$props = this.props,
|
|
33
|
-
details = _this$props.data,
|
|
34
|
-
isSelected = _this$props.isSelected,
|
|
35
|
-
appearance = _this$props.appearance,
|
|
36
|
-
onClick = _this$props.onClick,
|
|
37
|
-
onResolve = _this$props.onResolve,
|
|
38
|
-
testId = _this$props.testId;
|
|
39
|
-
if (appearance === 'inline') {
|
|
40
|
-
var props = (0, _inline.extractInlineProps)(details || (0, _jsonld.getEmptyJsonLd)());
|
|
41
|
-
if (onResolve) {
|
|
42
|
-
onResolve({
|
|
43
|
-
title: props.title
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_ResolvedView.InlineCardResolvedView, (0, _extends2.default)({}, props, {
|
|
47
|
-
isSelected: isSelected,
|
|
48
|
-
onClick: onClick,
|
|
49
|
-
testId: testId
|
|
50
|
-
}));
|
|
51
|
-
} else {
|
|
52
|
-
var _props = (0, _block.extractBlockProps)(details || (0, _jsonld.getEmptyJsonLd)());
|
|
53
|
-
if (onResolve) {
|
|
54
|
-
onResolve({
|
|
55
|
-
title: _props.title
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_BlockCard.BlockCardResolvedView, (0, _extends2.default)({}, _props, {
|
|
59
|
-
isSelected: isSelected,
|
|
60
|
-
onClick: onClick
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}]);
|
|
65
|
-
return CardWithDataContent;
|
|
66
|
-
}(_react.default.Component);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Byline = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
var _utils = require("./utils");
|
|
10
|
-
/**
|
|
11
|
-
* @jsxRuntime classic
|
|
12
|
-
* @jsx jsx
|
|
13
|
-
*/
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
-
|
|
16
|
-
var baseStyles = (0, _react.css)({
|
|
17
|
-
// Spec: only allow two lines MAX to be shown.
|
|
18
|
-
display: '-webkit-box',
|
|
19
|
-
overflow: 'hidden',
|
|
20
|
-
textOverflow: 'ellipsis',
|
|
21
|
-
WebkitLineClamp: 2,
|
|
22
|
-
WebkitBoxOrient: 'vertical',
|
|
23
|
-
wordBreak: 'break-word',
|
|
24
|
-
whiteSpace: 'pre-line',
|
|
25
|
-
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
26
|
-
// due to HTML its unwrapping behaviour on paste.
|
|
27
|
-
MozUserSelect: 'none'
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
31
|
-
var styles = (0, _utils.mq)({
|
|
32
|
-
fontSize: (0, _utils.gs)(1.5),
|
|
33
|
-
lineHeight: (0, _utils.gs)(2.5),
|
|
34
|
-
color: "".concat("var(--ds-text-subtlest, ".concat(_colors.N300, ")")),
|
|
35
|
-
fontWeight: 'normal',
|
|
36
|
-
marginTop: (0, _utils.gs)(0.5),
|
|
37
|
-
// Fallback options.
|
|
38
|
-
maxHeight: (0, _utils.gs)(5)
|
|
39
|
-
});
|
|
40
|
-
var Byline = exports.Byline = function Byline(_ref) {
|
|
41
|
-
var text = _ref.text,
|
|
42
|
-
children = _ref.children,
|
|
43
|
-
testId = _ref.testId,
|
|
44
|
-
className = _ref.className;
|
|
45
|
-
return (0, _react.jsx)("span", {
|
|
46
|
-
css: [baseStyles, styles],
|
|
47
|
-
"data-testid": testId
|
|
48
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
49
|
-
,
|
|
50
|
-
className: className
|
|
51
|
-
}, text || children);
|
|
52
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Metadata = void 0;
|
|
8
|
-
var _react = require("@emotion/react");
|
|
9
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
-
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
11
|
-
/**
|
|
12
|
-
* @jsxRuntime classic
|
|
13
|
-
* @jsx jsx
|
|
14
|
-
*/
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
|
|
17
|
-
var wrapperStyles = (0, _react.css)({
|
|
18
|
-
display: 'flex',
|
|
19
|
-
alignItems: 'center',
|
|
20
|
-
marginRight: "var(--ds-space-050, 4px)"
|
|
21
|
-
});
|
|
22
|
-
var imgStyles = (0, _react.css)({
|
|
23
|
-
width: "var(--ds-space-100, 8px)",
|
|
24
|
-
height: "var(--ds-space-100, 8px)"
|
|
25
|
-
});
|
|
26
|
-
var textStyles = (0, _react.css)({
|
|
27
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
28
|
-
color: "".concat("var(--ds-text-subtlest, ".concat(_colors.N300, ")")),
|
|
29
|
-
marginRight: "var(--ds-space-050, 4px)",
|
|
30
|
-
marginLeft: "var(--ds-space-025, 2px)"
|
|
31
|
-
});
|
|
32
|
-
var Metadata = exports.Metadata = function Metadata(_ref) {
|
|
33
|
-
var text = _ref.text,
|
|
34
|
-
icon = _ref.icon,
|
|
35
|
-
iconUrl = _ref.iconUrl,
|
|
36
|
-
tooltip = _ref.tooltip;
|
|
37
|
-
var metadataIcon = icon || null;
|
|
38
|
-
if (!metadataIcon && iconUrl) {
|
|
39
|
-
// eslint-disable-next-line jsx-a11y/alt-text
|
|
40
|
-
metadataIcon = (0, _react.jsx)("img", {
|
|
41
|
-
src: iconUrl,
|
|
42
|
-
css: imgStyles
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
var metadata = (0, _react.jsx)("div", {
|
|
46
|
-
css: wrapperStyles
|
|
47
|
-
}, metadataIcon, (0, _react.jsx)("span", {
|
|
48
|
-
css: textStyles
|
|
49
|
-
}, text));
|
|
50
|
-
if (tooltip) {
|
|
51
|
-
return (0, _react.jsx)(_tooltip.default, {
|
|
52
|
-
content: tooltip
|
|
53
|
-
}, metadata);
|
|
54
|
-
}
|
|
55
|
-
return metadata;
|
|
56
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.metadataListClassName = exports.MetadataList = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _Metadata = require("./Metadata");
|
|
11
|
-
var _utils = require("./utils");
|
|
12
|
-
/**
|
|
13
|
-
* @jsxRuntime classic
|
|
14
|
-
* @jsx jsx
|
|
15
|
-
*/
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
-
|
|
18
|
-
var metadataListClassName = exports.metadataListClassName = 'smart-link-metadata-list';
|
|
19
|
-
var wrapperStyles = (0, _react.css)({
|
|
20
|
-
display: 'flex',
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
22
|
-
marginTop: (0, _utils.gs)(0.5),
|
|
23
|
-
alignItems: 'center',
|
|
24
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
25
|
-
'&:last-child': {
|
|
26
|
-
marginRight: '0px'
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
var MetadataList = exports.MetadataList = function MetadataList(_ref) {
|
|
30
|
-
var items = _ref.items,
|
|
31
|
-
testId = _ref.testId;
|
|
32
|
-
return (0, _react.jsx)("div", {
|
|
33
|
-
css: wrapperStyles,
|
|
34
|
-
"data-testid": testId
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
36
|
-
,
|
|
37
|
-
className: metadataListClassName
|
|
38
|
-
}, items.map(function (item) {
|
|
39
|
-
return (0, _react.jsx)(_Metadata.Metadata, (0, _extends2.default)({
|
|
40
|
-
key: item.text
|
|
41
|
-
}, item));
|
|
42
|
-
}));
|
|
43
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { extractImage, extractLink, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractProvider, extractTitle } from '@atlaskit/link-extractors';
|
|
2
|
-
import { extractClientActions } from '../common/actions/extractActions';
|
|
3
|
-
import { extractPreviewAction } from '../common/actions/extractPreviewAction';
|
|
4
|
-
import { extractByline } from '../common/byline/extractByline';
|
|
5
|
-
import { extractAttachmentCount, extractCommentCount, extractProgrammingLanguage, extractSubscriberCount } from '../common/detail';
|
|
6
|
-
import { extractIcon } from '../common/icon';
|
|
7
|
-
import { extractLozenge } from '../common/lozenge';
|
|
8
|
-
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
9
|
-
import { extractSummary, extractTitleTextColor } from '../common/primitives';
|
|
10
|
-
import { extractTitlePrefix } from '../common/title-prefix/extractTitlePrefix';
|
|
11
|
-
const extractBlockIcon = jsonLd => {
|
|
12
|
-
const icon = extractIcon(jsonLd);
|
|
13
|
-
if (typeof icon === 'string') {
|
|
14
|
-
return {
|
|
15
|
-
url: icon
|
|
16
|
-
};
|
|
17
|
-
} else {
|
|
18
|
-
return {
|
|
19
|
-
icon
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const extractBlockDetails = jsonLd => [extractCommentCount(jsonLd), extractProgrammingLanguage(jsonLd), extractSubscriberCount(jsonLd), extractAttachmentCount(jsonLd)].filter(detail => !!detail);
|
|
24
|
-
export const extractBlockActions = (props, jsonLd, opts, platform, meta) => {
|
|
25
|
-
if (opts) {
|
|
26
|
-
const {
|
|
27
|
-
handleInvoke,
|
|
28
|
-
actionOptions
|
|
29
|
-
} = opts;
|
|
30
|
-
const actions = extractClientActions(jsonLd, handleInvoke, actionOptions);
|
|
31
|
-
const previewAction = extractPreviewAction({
|
|
32
|
-
...opts,
|
|
33
|
-
viewProps: props,
|
|
34
|
-
jsonLd,
|
|
35
|
-
platform,
|
|
36
|
-
meta
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// The previewAction should always be the last action
|
|
40
|
-
if (previewAction) {
|
|
41
|
-
actions.push(previewAction);
|
|
42
|
-
}
|
|
43
|
-
return actions;
|
|
44
|
-
}
|
|
45
|
-
return [];
|
|
46
|
-
};
|
|
47
|
-
export const extractBlockUsers = jsonLd => {
|
|
48
|
-
if (jsonLd['@type'] === 'atlassian:Project') {
|
|
49
|
-
return extractMembers(jsonLd);
|
|
50
|
-
} else if (jsonLd['@type'] === 'atlassian:Task') {
|
|
51
|
-
const assignedMembers = extractPersonAssignedTo(jsonLd);
|
|
52
|
-
if (assignedMembers) {
|
|
53
|
-
return [assignedMembers];
|
|
54
|
-
}
|
|
55
|
-
} else if (jsonLd['@type'] === 'atlassian:SourceCodePullRequest') {
|
|
56
|
-
return extractPersonCreatedBy(jsonLd);
|
|
57
|
-
} else {
|
|
58
|
-
const updatedBy = extractPersonUpdatedBy(jsonLd);
|
|
59
|
-
let updatedByMembers;
|
|
60
|
-
if (updatedBy) {
|
|
61
|
-
updatedByMembers = [updatedBy];
|
|
62
|
-
}
|
|
63
|
-
const createdByMembers = extractPersonCreatedBy(jsonLd);
|
|
64
|
-
return updatedByMembers || createdByMembers;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
export const extractBlockProps = (jsonLd, meta, opts, renderers, platform) => {
|
|
68
|
-
const props = {
|
|
69
|
-
link: extractLink(jsonLd),
|
|
70
|
-
title: extractTitle(jsonLd),
|
|
71
|
-
titleTextColor: extractTitleTextColor(jsonLd),
|
|
72
|
-
lozenge: extractLozenge(jsonLd),
|
|
73
|
-
icon: extractBlockIcon(jsonLd),
|
|
74
|
-
context: extractProvider(jsonLd),
|
|
75
|
-
details: extractBlockDetails(jsonLd),
|
|
76
|
-
byline: extractSummary(jsonLd) || extractByline(jsonLd),
|
|
77
|
-
thumbnail: extractImage(jsonLd),
|
|
78
|
-
users: extractBlockUsers(jsonLd),
|
|
79
|
-
titlePrefix: extractTitlePrefix(jsonLd, renderers, 'block'),
|
|
80
|
-
isTrusted: extractIsTrusted(meta)
|
|
81
|
-
};
|
|
82
|
-
return {
|
|
83
|
-
...props,
|
|
84
|
-
actions: extractBlockActions(props, jsonLd, opts, platform, meta)
|
|
85
|
-
};
|
|
86
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { extractPreview, extractProvider } from '@atlaskit/link-extractors';
|
|
2
|
-
import { CardDisplay } from '../../../constants';
|
|
3
|
-
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
4
|
-
import { PreviewAction } from '../../../view/BlockCard';
|
|
5
|
-
import { CardAction } from '../../../view/Card/types';
|
|
6
|
-
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
7
|
-
import { extractDownloadUrl } from '../detail';
|
|
8
|
-
const getMetadataFromJsonLd = (jsonLd, platform) => {
|
|
9
|
-
const download = extractDownloadUrl(jsonLd);
|
|
10
|
-
const provider = extractProvider(jsonLd);
|
|
11
|
-
const preview = extractPreview(jsonLd, platform);
|
|
12
|
-
return {
|
|
13
|
-
download,
|
|
14
|
-
providerName: provider && provider.text,
|
|
15
|
-
src: preview && preview.src
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
const getMetadataFromResolvedProps = props => ({
|
|
19
|
-
/* 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 */
|
|
20
|
-
link: props.link,
|
|
21
|
-
title: props.title,
|
|
22
|
-
details: props.details,
|
|
23
|
-
icon: props.icon,
|
|
24
|
-
url: props.link,
|
|
25
|
-
byline: props.byline,
|
|
26
|
-
isTrusted: props.isTrusted
|
|
27
|
-
});
|
|
28
|
-
const getInvokeOpts = (key, action, source) => ({
|
|
29
|
-
type: 'client',
|
|
30
|
-
key,
|
|
31
|
-
// NB: the preview action is invoked from a block card -
|
|
32
|
-
// the actions on the preview state are invoked from the
|
|
33
|
-
// preview card. Hence, we have a `source` for distinguishing
|
|
34
|
-
// between the two.
|
|
35
|
-
source: source || CardDisplay.EmbedPreview,
|
|
36
|
-
action: {
|
|
37
|
-
type: action,
|
|
38
|
-
promise: () => Promise.resolve()
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @private
|
|
44
|
-
* @deprecated - use extractPreviewActionProps instead
|
|
45
|
-
*/
|
|
46
|
-
export const extractPreviewAction = ({
|
|
47
|
-
extensionKey = 'empty-object-provider',
|
|
48
|
-
viewProps,
|
|
49
|
-
jsonLd,
|
|
50
|
-
handleInvoke,
|
|
51
|
-
testId,
|
|
52
|
-
platform,
|
|
53
|
-
origin,
|
|
54
|
-
source = 'block',
|
|
55
|
-
analytics,
|
|
56
|
-
meta,
|
|
57
|
-
actionOptions
|
|
58
|
-
}) => {
|
|
59
|
-
if (!canShowAction(CardAction.PreviewAction, actionOptions)) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Extract metadata from view props & raw JSON-LD.
|
|
64
|
-
const metadataFromJsonLd = getMetadataFromJsonLd(jsonLd, platform);
|
|
65
|
-
const metadataFromViewProps = getMetadataFromResolvedProps(viewProps);
|
|
66
|
-
const metadata = {
|
|
67
|
-
...metadataFromJsonLd,
|
|
68
|
-
...metadataFromViewProps
|
|
69
|
-
};
|
|
70
|
-
// Extract preview action only if we have an iframe src.
|
|
71
|
-
if (metadataFromJsonLd.src) {
|
|
72
|
-
// Build action using instrumentation hooks.
|
|
73
|
-
const key = extensionKey;
|
|
74
|
-
const previewAction = PreviewAction({
|
|
75
|
-
...metadata,
|
|
76
|
-
analytics,
|
|
77
|
-
extensionKey,
|
|
78
|
-
origin,
|
|
79
|
-
testId,
|
|
80
|
-
isSupportTheming: extractIsSupportTheming(meta)
|
|
81
|
-
});
|
|
82
|
-
// Setup props to go through proper Redux 'invocation' flow
|
|
83
|
-
// for analytics, further state management if required in future.
|
|
84
|
-
const previewActionProps = getInvokeOpts(key, 'PreviewAction', source);
|
|
85
|
-
// - Promise invoked by the action invocation handler; open preview.
|
|
86
|
-
previewActionProps.action.promise = previewAction.promise;
|
|
87
|
-
// - Promise invoked on click of `Preview` on block card; trigger above promise.
|
|
88
|
-
previewAction.promise = () => handleInvoke(previewActionProps);
|
|
89
|
-
return previewAction;
|
|
90
|
-
}
|
|
91
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import { messages } from '../../../messages';
|
|
4
|
-
export const AuthorizeAction = handler => ({
|
|
5
|
-
id: 'connect-account',
|
|
6
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_link_account_card),
|
|
7
|
-
promise: () => new Promise(resolve => resolve(handler())),
|
|
8
|
-
buttonAppearance: 'default'
|
|
9
|
-
});
|
|
@@ -1,11 +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 const DownloadAction = ({
|
|
6
|
-
url
|
|
7
|
-
}) => ({
|
|
8
|
-
id: 'download-content',
|
|
9
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
10
|
-
promise: () => downloadUrl(url)
|
|
11
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import { messages } from '../../../messages';
|
|
4
|
-
import { openEmbedModal } from '../../EmbedModal/utils';
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
Most of these are optional as we are being fault-tolerant
|
|
8
|
-
However src, details, icon, title, and providerName are STRONGLY encouraged
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export default (({
|
|
12
|
-
details,
|
|
13
|
-
...rest
|
|
14
|
-
}) => ({
|
|
15
|
-
id: 'preview-content',
|
|
16
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_improved),
|
|
17
|
-
promise: () => openEmbedModal({
|
|
18
|
-
providerName: 'Preview',
|
|
19
|
-
showModal: true,
|
|
20
|
-
onClose: () => {},
|
|
21
|
-
...rest
|
|
22
|
-
})
|
|
23
|
-
}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import { messages } from '../../../messages';
|
|
4
|
-
export const RetryAction = handler => ({
|
|
5
|
-
id: 'try-again',
|
|
6
|
-
promise: async () => handler(),
|
|
7
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again)
|
|
8
|
-
});
|
|
@@ -1,11 +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 const ViewAction = ({
|
|
6
|
-
url
|
|
7
|
-
}) => ({
|
|
8
|
-
id: 'view-content',
|
|
9
|
-
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.view),
|
|
10
|
-
promise: () => openUrl(url)
|
|
11
|
-
});
|
|
@@ -1,51 +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 const 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 const ActionIcon = ({
|
|
18
|
-
state
|
|
19
|
-
}) => {
|
|
20
|
-
switch (state) {
|
|
21
|
-
case 'init':
|
|
22
|
-
case 'loading':
|
|
23
|
-
return null;
|
|
24
|
-
case 'success':
|
|
25
|
-
return (
|
|
26
|
-
/*#__PURE__*/
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
28
|
-
React.createElement("div", {
|
|
29
|
-
"data-testid": "check-icon",
|
|
30
|
-
style: spinnerStyles
|
|
31
|
-
}, /*#__PURE__*/React.createElement(CheckIcon, {
|
|
32
|
-
LEGACY_size: "small",
|
|
33
|
-
label: "check",
|
|
34
|
-
color: "currentColor"
|
|
35
|
-
}))
|
|
36
|
-
);
|
|
37
|
-
case 'failure':
|
|
38
|
-
return (
|
|
39
|
-
/*#__PURE__*/
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
41
|
-
React.createElement("div", {
|
|
42
|
-
"data-testid": "cross-icon",
|
|
43
|
-
style: spinnerStyles
|
|
44
|
-
}, /*#__PURE__*/React.createElement(CrossIcon, {
|
|
45
|
-
LEGACY_size: "small",
|
|
46
|
-
label: "check",
|
|
47
|
-
color: "currentColor"
|
|
48
|
-
}))
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
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 { css, jsx } from '@emotion/react';
|
|
8
|
-
import { di } from 'react-magnetic-di';
|
|
9
|
-
import ButtonGroup from '@atlaskit/button/button-group';
|
|
10
|
-
import Button from '@atlaskit/button/standard-button';
|
|
11
|
-
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
12
|
-
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
13
|
-
import { gs, mq } from '../../common/utils';
|
|
14
|
-
import { Action } from './Action';
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
17
|
-
const wrapperStyles = mq({
|
|
18
|
-
display: 'flex',
|
|
19
|
-
marginTop: [gs(2), 0]
|
|
20
|
-
});
|
|
21
|
-
const buttonStyles = css({
|
|
22
|
-
height: 'auto'
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
26
|
-
const actionsWrapperStyles = {
|
|
27
|
-
marginLeft: gs(0.5)
|
|
28
|
-
};
|
|
29
|
-
export const ActionList = ({
|
|
30
|
-
items
|
|
31
|
-
}) => {
|
|
32
|
-
const actionsToShow = items.slice(0, 2);
|
|
33
|
-
const actionsToList = items.slice(2, items.length);
|
|
34
|
-
return jsx("div", {
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
36
|
-
css: wrapperStyles
|
|
37
|
-
}, jsx(ButtonGroup, null, actionsToShow.map(action => jsx(Action, _extends({
|
|
38
|
-
key: action.id
|
|
39
|
-
}, action)))), actionsToList.length ?
|
|
40
|
-
// 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
|
|
41
|
-
jsx("div", {
|
|
42
|
-
css: actionsWrapperStyles
|
|
43
|
-
}, jsx(DropdownMenu, {
|
|
44
|
-
trigger: ({
|
|
45
|
-
triggerRef,
|
|
46
|
-
...props
|
|
47
|
-
}) => jsx(Button, _extends({}, props, {
|
|
48
|
-
iconBefore: jsx(MoreIcon, {
|
|
49
|
-
label: "more",
|
|
50
|
-
color: "currentColor",
|
|
51
|
-
spacing: "spacious"
|
|
52
|
-
}),
|
|
53
|
-
ref: triggerRef,
|
|
54
|
-
css: buttonStyles,
|
|
55
|
-
testId: "dropdown-trigger"
|
|
56
|
-
})),
|
|
57
|
-
placement: "right-start"
|
|
58
|
-
}, jsx(DropdownItemGroup, {
|
|
59
|
-
testId: "dropdown-menu"
|
|
60
|
-
}, actionsToList.map(actionToList => jsx(DropdownItem, {
|
|
61
|
-
key: actionToList.id
|
|
62
|
-
}, actionToList.text))))) : null);
|
|
63
|
-
};
|
|
@@ -1,42 +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 const CollaboratorList = ({
|
|
10
|
-
items,
|
|
11
|
-
handleAvatarClick = () => {},
|
|
12
|
-
handleMoreAvatarsClick = () => {},
|
|
13
|
-
testId = 'collaborator-list'
|
|
14
|
-
}) => {
|
|
15
|
-
if (items.length === 0) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
return (
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
20
|
-
jsx("span", {
|
|
21
|
-
css: mq({
|
|
22
|
-
display: ['none', 'inherit']
|
|
23
|
-
})
|
|
24
|
-
}, jsx(AvatarGroup, {
|
|
25
|
-
maxCount: 4,
|
|
26
|
-
appearance: "stack",
|
|
27
|
-
size: "small",
|
|
28
|
-
data: items,
|
|
29
|
-
onAvatarClick: event => {
|
|
30
|
-
event.stopPropagation();
|
|
31
|
-
event.preventDefault();
|
|
32
|
-
handleAvatarClick(event);
|
|
33
|
-
},
|
|
34
|
-
onMoreClick: event => {
|
|
35
|
-
event.stopPropagation();
|
|
36
|
-
event.preventDefault();
|
|
37
|
-
handleMoreAvatarsClick(event);
|
|
38
|
-
},
|
|
39
|
-
testId: testId
|
|
40
|
-
}))
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,36 +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 const blockCardContentClassName = 'block-card-content';
|
|
15
|
-
const baseStyles = css({
|
|
16
|
-
display: 'flex',
|
|
17
|
-
flexDirection: 'column',
|
|
18
|
-
flexGrow: 1
|
|
19
|
-
});
|
|
20
|
-
export const Content = ({
|
|
21
|
-
children,
|
|
22
|
-
isCompact = false
|
|
23
|
-
}) => jsx("div", {
|
|
24
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
|
-
css: [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
|
-
// 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
|
|
29
|
-
padding: isCompact ? gs(1) : gs(2),
|
|
30
|
-
justifyContent: isCompact ? 'unset' : ['unset', 'space-between']
|
|
31
|
-
})],
|
|
32
|
-
"data-trello-do-not-use-override": "block-card-content"
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
34
|
-
,
|
|
35
|
-
className: blockCardContentClassName
|
|
36
|
-
}, children);
|