@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,48 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { LoadingButton as Button } from '@atlaskit/button';
|
|
10
|
-
import { ActionIcon } from './ActionIcon';
|
|
11
|
-
export const spinnerDelay = 1000;
|
|
12
|
-
const baseTextStyles = css({
|
|
13
|
-
transition: 'opacity 0.3s'
|
|
14
|
-
});
|
|
15
|
-
export const Action = ({
|
|
16
|
-
promise,
|
|
17
|
-
text,
|
|
18
|
-
buttonAppearance = 'default',
|
|
19
|
-
id
|
|
20
|
-
}) => {
|
|
21
|
-
const [state, setState] = useState('init');
|
|
22
|
-
return jsx(Button, {
|
|
23
|
-
spacing: "compact",
|
|
24
|
-
appearance: buttonAppearance,
|
|
25
|
-
isLoading: state === 'loading',
|
|
26
|
-
testId: `button-${id}`,
|
|
27
|
-
onClick: event => {
|
|
28
|
-
event.stopPropagation();
|
|
29
|
-
event.preventDefault();
|
|
30
|
-
if (state !== 'loading') {
|
|
31
|
-
setState('loading');
|
|
32
|
-
promise().then(() => {
|
|
33
|
-
setState('success');
|
|
34
|
-
}).catch(() => {
|
|
35
|
-
setState('failure');
|
|
36
|
-
}).finally(() => {
|
|
37
|
-
setTimeout(() => setState('init'), spinnerDelay);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, jsx("div", {
|
|
42
|
-
css: [baseTextStyles, {
|
|
43
|
-
opacity: state !== 'init' ? 0 : 1
|
|
44
|
-
}]
|
|
45
|
-
}, text), jsx(ActionIcon, {
|
|
46
|
-
state: state
|
|
47
|
-
}));
|
|
48
|
-
};
|
|
1
|
+
export {};
|
|
@@ -1,193 +1,61 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
|
-
import { extractBlockProps } from '../../extractors/block';
|
|
10
|
-
import { extractRequestAccessContextImproved } from '../../extractors/common/context';
|
|
11
|
-
import { getExtensionKey } from '../../state/helpers';
|
|
12
|
-
import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
|
|
2
|
+
import React from 'react';
|
|
13
3
|
import { CardLinkView } from '../LinkView';
|
|
14
|
-
import { AuthorizeAction } from './actions/AuthorizeAction';
|
|
15
|
-
import { ForbiddenAction } from './actions/ForbiddenAction';
|
|
16
4
|
import { handleClickCommon } from './utils/handlers';
|
|
17
|
-
import { ErroredView as BlockCardErroredView } from './views/ErroredView';
|
|
18
5
|
import FlexibleErroredView from './views/flexible/FlexibleErroredView';
|
|
19
6
|
import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
|
|
20
7
|
import FlexibleNotFoundView from './views/flexible/FlexibleNotFoundView';
|
|
21
8
|
import FlexibleResolvedView from './views/flexible/FlexibleResolvedView';
|
|
22
9
|
import FlexibleUnauthorisedView from './views/flexible/FlexibleUnauthorisedView';
|
|
23
|
-
import { ForbiddenView as BlockCardForbiddenView } from './views/ForbiddenView';
|
|
24
|
-
import { NotFoundView as BlockCardNotFoundView } from './views/NotFoundView';
|
|
25
|
-
import { ResolvedView as BlockCardResolvedView } from './views/ResolvedView';
|
|
26
|
-
import { ResolvingView as BlockCardResolvingView } from './views/ResolvingView';
|
|
27
|
-
import { UnauthorizedView as BlockCardUnauthorisedView } from './views/UnauthorizedView';
|
|
28
|
-
export { default as PreviewAction } from './actions/PreviewAction';
|
|
29
|
-
export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, BlockCardForbiddenView, BlockCardErroredView, BlockCardNotFoundView };
|
|
30
10
|
export const BlockCard = ({
|
|
31
11
|
id,
|
|
32
12
|
url,
|
|
33
13
|
cardState,
|
|
34
14
|
authFlow,
|
|
35
15
|
handleAuthorize,
|
|
36
|
-
handleErrorRetry,
|
|
37
16
|
handleFrameClick,
|
|
38
|
-
handleInvoke,
|
|
39
17
|
renderers,
|
|
40
18
|
isSelected,
|
|
41
19
|
onResolve,
|
|
42
20
|
onError,
|
|
43
21
|
testId,
|
|
44
|
-
platform,
|
|
45
22
|
analytics,
|
|
46
|
-
enableFlexibleBlockCard,
|
|
47
23
|
actionOptions
|
|
48
24
|
}) => {
|
|
49
|
-
var _details$meta, _forbiddenViewProps$c, _forbiddenViewProps$c2;
|
|
50
25
|
const {
|
|
51
|
-
|
|
52
|
-
} = useAnalyticsEvents();
|
|
53
|
-
const {
|
|
54
|
-
status,
|
|
55
|
-
details
|
|
26
|
+
status
|
|
56
27
|
} = cardState;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
28
|
+
const flexibleBlockCardProps = {
|
|
29
|
+
id,
|
|
30
|
+
cardState,
|
|
31
|
+
url,
|
|
32
|
+
testId,
|
|
33
|
+
onClick: event => handleClickCommon(event, handleFrameClick),
|
|
34
|
+
onError,
|
|
35
|
+
onResolve,
|
|
36
|
+
renderers,
|
|
37
|
+
actionOptions,
|
|
38
|
+
analytics
|
|
66
39
|
};
|
|
67
|
-
if (enableFlexibleBlockCard) {
|
|
68
|
-
const flexibleBlockCardProps = {
|
|
69
|
-
id,
|
|
70
|
-
cardState,
|
|
71
|
-
url,
|
|
72
|
-
testId,
|
|
73
|
-
onClick: event => handleClickCommon(event, handleFrameClick),
|
|
74
|
-
onError,
|
|
75
|
-
onResolve,
|
|
76
|
-
renderers,
|
|
77
|
-
actionOptions,
|
|
78
|
-
analytics
|
|
79
|
-
};
|
|
80
|
-
switch (status) {
|
|
81
|
-
case 'pending':
|
|
82
|
-
case 'resolving':
|
|
83
|
-
return jsx(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
84
|
-
testId: 'smart-block-resolving-view'
|
|
85
|
-
}));
|
|
86
|
-
case 'resolved':
|
|
87
|
-
return jsx(FlexibleResolvedView, flexibleBlockCardProps);
|
|
88
|
-
case 'unauthorized':
|
|
89
|
-
return jsx(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
90
|
-
onAuthorize: handleAuthorize
|
|
91
|
-
}));
|
|
92
|
-
case 'forbidden':
|
|
93
|
-
return jsx(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
94
|
-
onAuthorize: handleAuthorize
|
|
95
|
-
}));
|
|
96
|
-
case 'not_found':
|
|
97
|
-
return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
98
|
-
onAuthorize: handleAuthorize
|
|
99
|
-
}));
|
|
100
|
-
case 'fallback':
|
|
101
|
-
case 'errored':
|
|
102
|
-
default:
|
|
103
|
-
if (onError) {
|
|
104
|
-
onError({
|
|
105
|
-
url,
|
|
106
|
-
status
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
if (authFlow && authFlow === 'disabled') {
|
|
110
|
-
return jsx(CardLinkView, {
|
|
111
|
-
link: url,
|
|
112
|
-
isSelected: isSelected,
|
|
113
|
-
onClick: handleFrameClick,
|
|
114
|
-
testId: `${testId}-${status}`
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
return jsx(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
118
|
-
onAuthorize: handleAuthorize
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
40
|
switch (status) {
|
|
123
41
|
case 'pending':
|
|
124
42
|
case 'resolving':
|
|
125
|
-
return
|
|
126
|
-
testId:
|
|
127
|
-
isSelected: isSelected
|
|
128
|
-
});
|
|
129
|
-
case 'resolved':
|
|
130
|
-
const resolvedViewProps = extractBlockProps(data, meta, extractorOpts, renderers, platform);
|
|
131
|
-
if (onResolve) {
|
|
132
|
-
onResolve({
|
|
133
|
-
title: resolvedViewProps.title,
|
|
134
|
-
url
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
return jsx(BlockCardResolvedView, _extends({}, resolvedViewProps, {
|
|
138
|
-
isSelected: isSelected,
|
|
139
|
-
testId: testId,
|
|
140
|
-
onClick: handleFrameClick
|
|
43
|
+
return /*#__PURE__*/React.createElement(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
44
|
+
testId: 'smart-block-resolving-view'
|
|
141
45
|
}));
|
|
46
|
+
case 'resolved':
|
|
47
|
+
return /*#__PURE__*/React.createElement(FlexibleResolvedView, flexibleBlockCardProps);
|
|
142
48
|
case 'unauthorized':
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
url,
|
|
146
|
-
status
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
const unauthorizedViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
150
|
-
return jsx(BlockCardUnauthorisedView, _extends({}, unauthorizedViewProps, {
|
|
151
|
-
isSelected: isSelected,
|
|
152
|
-
testId: testId,
|
|
153
|
-
actions: handleAuthorize ? [AuthorizeAction(handleAuthorize)] : [],
|
|
154
|
-
actionOptions: actionOptions,
|
|
155
|
-
onClick: handleFrameClick
|
|
49
|
+
return /*#__PURE__*/React.createElement(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
50
|
+
onAuthorize: handleAuthorize
|
|
156
51
|
}));
|
|
157
52
|
case 'forbidden':
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
url,
|
|
161
|
-
status
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
const forbiddenViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
165
|
-
const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
166
|
-
const requestAccessContext = extractRequestAccessContextImproved({
|
|
167
|
-
jsonLd: cardMetadata,
|
|
168
|
-
url,
|
|
169
|
-
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : '',
|
|
170
|
-
createAnalyticsEvent
|
|
171
|
-
});
|
|
172
|
-
return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
|
|
173
|
-
isSelected: isSelected,
|
|
174
|
-
actions: handleAuthorize ? [ForbiddenAction(handleAuthorize)] : [],
|
|
175
|
-
actionOptions: actionOptions,
|
|
176
|
-
onClick: handleFrameClick,
|
|
177
|
-
requestAccessContext: requestAccessContext
|
|
53
|
+
return /*#__PURE__*/React.createElement(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
54
|
+
onAuthorize: handleAuthorize
|
|
178
55
|
}));
|
|
179
56
|
case 'not_found':
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
url,
|
|
183
|
-
status
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
const notFoundViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
187
|
-
return jsx(BlockCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
188
|
-
isSelected: isSelected,
|
|
189
|
-
testId: testId,
|
|
190
|
-
onClick: handleFrameClick
|
|
57
|
+
return /*#__PURE__*/React.createElement(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
58
|
+
onAuthorize: handleAuthorize
|
|
191
59
|
}));
|
|
192
60
|
case 'fallback':
|
|
193
61
|
case 'errored':
|
|
@@ -199,19 +67,15 @@ export const BlockCard = ({
|
|
|
199
67
|
});
|
|
200
68
|
}
|
|
201
69
|
if (authFlow && authFlow === 'disabled') {
|
|
202
|
-
return
|
|
70
|
+
return /*#__PURE__*/React.createElement(CardLinkView, {
|
|
203
71
|
link: url,
|
|
204
72
|
isSelected: isSelected,
|
|
205
73
|
onClick: handleFrameClick,
|
|
206
74
|
testId: `${testId}-${status}`
|
|
207
75
|
});
|
|
208
76
|
}
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
onRetry: handleErrorRetry,
|
|
213
|
-
onClick: handleFrameClick,
|
|
214
|
-
testId: testId
|
|
215
|
-
});
|
|
77
|
+
return /*#__PURE__*/React.createElement(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
78
|
+
onAuthorize: handleAuthorize
|
|
79
|
+
}));
|
|
216
80
|
}
|
|
217
81
|
};
|
|
@@ -4,6 +4,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
4
4
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
5
|
import { CardDisplay } from '../../constants';
|
|
6
6
|
import { useSmartLink } from '../../state';
|
|
7
|
+
import { succeedUfoExperience } from '../../state/analytics';
|
|
7
8
|
import { getCanBeDatasource, getClickUrl, getDefinitionId, getExtensionKey, getProduct, getResourceType, getServices, getSubproduct, isFinalState } from '../../state/helpers';
|
|
8
9
|
import { SmartLinkModalProvider } from '../../state/modal';
|
|
9
10
|
import { isSpecialEvent } from '../../utils';
|
|
@@ -154,16 +155,32 @@ function Component({
|
|
|
154
155
|
// - the unresolved states: viz. forbidden, not_found, unauthorized, errored.
|
|
155
156
|
useEffect(() => {
|
|
156
157
|
if (isFinalState(state.status)) {
|
|
157
|
-
analytics
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
159
|
+
succeedUfoExperience('smart-link-rendered', id || 'NULL', {
|
|
160
|
+
extensionKey,
|
|
161
|
+
display: isFlexibleUi ? 'flexible' : appearance
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
165
|
+
succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
|
|
166
|
+
display: isFlexibleUi ? 'flexible' : appearance
|
|
167
|
+
});
|
|
168
|
+
fireEvent('ui.smartLink.renderSuccess', {
|
|
169
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
170
|
+
display: isFlexibleUi ? 'flexible' : appearance
|
|
171
|
+
});
|
|
172
|
+
} else {
|
|
173
|
+
analytics.ui.renderSuccessEvent({
|
|
174
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
175
|
+
status: state.status,
|
|
176
|
+
id,
|
|
177
|
+
definitionId,
|
|
178
|
+
extensionKey,
|
|
179
|
+
canBeDatasource
|
|
180
|
+
});
|
|
181
|
+
}
|
|
165
182
|
}
|
|
166
|
-
}, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource]);
|
|
183
|
+
}, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource, fireEvent]);
|
|
167
184
|
const onIframeDwell = useCallback((dwellTime, dwellPercentVisible) => {
|
|
168
185
|
fireEvent('ui.smartLinkIframe.dwelled', {
|
|
169
186
|
id,
|
|
@@ -247,17 +264,13 @@ function Component({
|
|
|
247
264
|
authFlow: config && config.authFlow,
|
|
248
265
|
cardState: state,
|
|
249
266
|
handleAuthorize: services.length && handleAuthorize || undefined,
|
|
250
|
-
handleErrorRetry: handleRetry,
|
|
251
|
-
handleInvoke: handleInvoke,
|
|
252
267
|
handleFrameClick: handleClickWrapper,
|
|
253
268
|
analytics: analytics,
|
|
254
269
|
isSelected: isSelected,
|
|
255
270
|
onResolve: onResolve,
|
|
256
271
|
onError: onError,
|
|
257
272
|
testId: testId,
|
|
258
|
-
actionOptions: actionOptions
|
|
259
|
-
platform: platform,
|
|
260
|
-
enableFlexibleBlockCard: true
|
|
273
|
+
actionOptions: actionOptions
|
|
261
274
|
});
|
|
262
275
|
case 'embed':
|
|
263
276
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|
|
@@ -2,8 +2,10 @@ import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
|
|
|
2
2
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
3
3
|
import { di } from 'react-magnetic-di';
|
|
4
4
|
import uuid from 'uuid';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
6
|
-
import { useSmartLinkAnalytics } from '../../state
|
|
7
|
+
import { useSmartLinkAnalytics } from '../../state';
|
|
8
|
+
import { failUfoExperience, startUfoExperience } from '../../state/analytics';
|
|
7
9
|
import { importWithRetry } from '../../utils';
|
|
8
10
|
import { isFlexibleUiCard } from '../../utils/flexible';
|
|
9
11
|
import { clearMarks, clearMeasures } from '../../utils/performance';
|
|
@@ -71,12 +73,24 @@ export function CardWithURLRenderer(props) {
|
|
|
71
73
|
definitionId: null
|
|
72
74
|
});
|
|
73
75
|
} else if (error.name !== 'APIError') {
|
|
74
|
-
analytics
|
|
75
|
-
|
|
76
|
-
id
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
77
|
+
startUfoExperience('smart-link-rendered', id || 'NULL');
|
|
78
|
+
failUfoExperience('smart-link-rendered', id || 'NULL');
|
|
79
|
+
failUfoExperience('smart-link-authenticated', id || 'NULL');
|
|
80
|
+
fireEvent('ui.smartLink.renderFailed', {
|
|
81
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
82
|
+
id: id !== null && id !== void 0 ? id : null,
|
|
83
|
+
error: error,
|
|
84
|
+
errorInfo: errorInfo
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
analytics.ui.renderFailedEvent({
|
|
88
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
89
|
+
id,
|
|
90
|
+
error,
|
|
91
|
+
errorInfo
|
|
92
|
+
});
|
|
93
|
+
}
|
|
80
94
|
}
|
|
81
95
|
onError && onError({
|
|
82
96
|
status: 'errored',
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
3
5
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize, SmartLinkStatus } from '../../../../../constants';
|
|
4
|
-
import {
|
|
6
|
+
import { succeedUfoExperience } from '../../../../../state/analytics';
|
|
7
|
+
import { getCanBeDatasource, getDefinitionId } from '../../../../../state/helpers';
|
|
5
8
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
6
9
|
import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
10
|
import { getMetadata } from '../../../utils';
|
|
@@ -14,19 +17,40 @@ const HoverCardResolvedView = ({
|
|
|
14
17
|
flexibleCardProps,
|
|
15
18
|
isAISummaryEnabled,
|
|
16
19
|
onActionClick,
|
|
17
|
-
titleBlockProps
|
|
20
|
+
titleBlockProps,
|
|
21
|
+
id
|
|
18
22
|
}) => {
|
|
19
23
|
var _cardState$details;
|
|
20
|
-
const
|
|
24
|
+
const {
|
|
25
|
+
fireEvent
|
|
26
|
+
} = useAnalyticsEvents();
|
|
27
|
+
const definitionId = React.useMemo(() => getDefinitionId(cardState.details), [cardState.details]);
|
|
28
|
+
const canBeDatasource = React.useMemo(() => getCanBeDatasource(cardState.details), [cardState.details]);
|
|
21
29
|
useEffect(() => {
|
|
22
30
|
// Since this hover view is only rendered on resolved status,
|
|
23
31
|
// there is no need to check for statuses.
|
|
24
|
-
analytics
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
33
|
+
succeedUfoExperience('smart-link-rendered', id || 'NULL', {
|
|
34
|
+
extensionKey,
|
|
35
|
+
display: CardDisplay.HoverCardPreview
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
39
|
+
succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
|
|
40
|
+
display: CardDisplay.HoverCardPreview
|
|
41
|
+
});
|
|
42
|
+
fireEvent('ui.smartLink.renderSuccess', {
|
|
43
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
44
|
+
display: CardDisplay.HoverCardPreview
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
analytics.ui.renderSuccessEvent({
|
|
48
|
+
display: CardDisplay.HoverCardPreview,
|
|
49
|
+
status: cardState.status,
|
|
50
|
+
canBeDatasource
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}, [analytics.ui, cardState.status, canBeDatasource, fireEvent, definitionId, extensionKey, id]);
|
|
30
54
|
const data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
31
55
|
const {
|
|
32
56
|
primary,
|
|
@@ -9,11 +9,17 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
10
10
|
import { di } from 'react-magnetic-di';
|
|
11
11
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
12
14
|
import { CardDisplay } from '../../constants';
|
|
13
|
-
import { useSmartLinkAnalytics } from '../../state
|
|
15
|
+
import { useSmartLinkAnalytics } from '../../state';
|
|
16
|
+
import { failUfoExperience, startUfoExperience } from '../../state/analytics';
|
|
14
17
|
import { SmartLinkModalProvider } from '../../state/modal';
|
|
15
18
|
import { HoverCardComponent } from './components/HoverCardComponent';
|
|
16
19
|
const HoverCardWithErrorBoundary = props => {
|
|
20
|
+
const {
|
|
21
|
+
fireEvent
|
|
22
|
+
} = useAnalyticsEvents();
|
|
17
23
|
const {
|
|
18
24
|
url,
|
|
19
25
|
id,
|
|
@@ -21,13 +27,25 @@ const HoverCardWithErrorBoundary = props => {
|
|
|
21
27
|
} = props;
|
|
22
28
|
const analytics = useSmartLinkAnalytics(url, id);
|
|
23
29
|
const onError = useCallback((error, info) => {
|
|
24
|
-
analytics
|
|
25
|
-
|
|
26
|
-
id
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
31
|
+
startUfoExperience('smart-link-rendered', id || 'NULL');
|
|
32
|
+
failUfoExperience('smart-link-rendered', id || 'NULL');
|
|
33
|
+
failUfoExperience('smart-link-authenticated', id || 'NULL');
|
|
34
|
+
fireEvent('ui.smartLink.renderFailed', {
|
|
35
|
+
display: CardDisplay.HoverCardPreview,
|
|
36
|
+
id: id !== null && id !== void 0 ? id : null,
|
|
37
|
+
error: error,
|
|
38
|
+
errorInfo: info
|
|
39
|
+
});
|
|
40
|
+
} else {
|
|
41
|
+
analytics.ui.renderFailedEvent({
|
|
42
|
+
display: CardDisplay.HoverCardPreview,
|
|
43
|
+
id,
|
|
44
|
+
error,
|
|
45
|
+
errorInfo: info
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}, [analytics.ui, id, fireEvent]);
|
|
31
49
|
return jsx(ErrorBoundary, {
|
|
32
50
|
fallback: children,
|
|
33
51
|
onError: onError
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "32.7.
|
|
13
|
+
packageVersion: "32.7.3",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
package/dist/esm/classNames.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export var contentFooterClassName = 'smart-link-content-footer';
|
|
2
|
+
export var metadataListClassName = 'smart-link-metadata-list';
|
|
3
|
+
export var blockCardResolvingViewClassName = 'block-card-resolving-view';
|
|
4
|
+
export var blockCardResolvedViewClassName = 'block-card-resolved-view';
|
|
5
|
+
export var blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
|
|
6
|
+
export var blockCardForbiddenViewClassName = 'block-card-forbidden-view';
|
|
7
|
+
export var blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
|
|
6
8
|
export { blockCardIconImageClassName } from './view/common/Icon';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
9
|
+
export var blockCardContentClassName = 'block-card-content';
|
|
10
|
+
export var blockCardContentHeaderClassName = 'block-card-content-header';
|
|
11
|
+
export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
12
|
+
export var blockCardNotFoundViewClassName = 'block-card-not-found-view';
|
|
13
|
+
export var blockCardErroredViewClassName = 'block-card-errored-view';
|
|
@@ -1,52 +1,3 @@
|
|
|
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 { canShowAction } from '../../../utils/actions/can-show-action';
|
|
5
|
-
import { DownloadAction } from '../../../view/BlockCard/actions/DownloadAction';
|
|
6
|
-
import { ViewAction } from '../../../view/BlockCard/actions/ViewAction';
|
|
7
|
-
import { CardAction } from '../../../view/Card/types';
|
|
8
|
-
var isClientAction = function isClientAction(action) {
|
|
9
|
-
return ['ViewAction', 'DownloadAction'].indexOf(action['@type']) > -1;
|
|
10
|
-
};
|
|
11
|
-
var getClientAction = function getClientAction(jsonLd, action) {
|
|
12
|
-
switch (action['@type']) {
|
|
13
|
-
case 'ViewAction':
|
|
14
|
-
return ViewAction({
|
|
15
|
-
url: jsonLd.url
|
|
16
|
-
});
|
|
17
|
-
case 'DownloadAction':
|
|
18
|
-
return DownloadAction({
|
|
19
|
-
url: jsonLd['atlassian:downloadUrl']
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var isActionEnabled = function isActionEnabled(action, actionOptions) {
|
|
24
|
-
switch (action['@type']) {
|
|
25
|
-
case 'ViewAction':
|
|
26
|
-
return canShowAction(CardAction.ViewAction, actionOptions);
|
|
27
|
-
case 'DownloadAction':
|
|
28
|
-
return canShowAction(CardAction.DownloadAction, actionOptions);
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
};
|
|
32
|
-
var getClientActionProps = function getClientActionProps(jsonLd, action, handler) {
|
|
33
|
-
var clientAction = getClientAction(jsonLd, action);
|
|
34
|
-
var clientActionInvokeOpts = {
|
|
35
|
-
type: 'client',
|
|
36
|
-
key: action.identifier,
|
|
37
|
-
action: {
|
|
38
|
-
type: action['@type'],
|
|
39
|
-
promise: clientAction.promise
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
// Send client actions through common invocation flow; for analytics
|
|
43
|
-
// and, in future, in order to propagate state changes.
|
|
44
|
-
return _objectSpread(_objectSpread({}, clientAction), {}, {
|
|
45
|
-
promise: function promise() {
|
|
46
|
-
return handler(clientActionInvokeOpts);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
1
|
export var getActionsFromJsonLd = function getActionsFromJsonLd(jsonLd) {
|
|
51
2
|
var actions = jsonLd && jsonLd['schema:potentialAction'];
|
|
52
3
|
if (!actions) {
|
|
@@ -56,19 +7,4 @@ export var getActionsFromJsonLd = function getActionsFromJsonLd(jsonLd) {
|
|
|
56
7
|
actions = [actions];
|
|
57
8
|
}
|
|
58
9
|
return actions;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @private
|
|
63
|
-
* @deprecated - use flexible extractors instead
|
|
64
|
-
*/
|
|
65
|
-
export function extractClientActions(jsonLd, handler, actionOptions) {
|
|
66
|
-
var actions = getActionsFromJsonLd(jsonLd);
|
|
67
|
-
var clientActions = actions.filter(function (action) {
|
|
68
|
-
return isClientAction(action) && isActionEnabled(action, actionOptions);
|
|
69
|
-
});
|
|
70
|
-
var clientActionImpls = clientActions.map(function (action) {
|
|
71
|
-
return getClientActionProps(jsonLd, action, handler);
|
|
72
|
-
});
|
|
73
|
-
return clientActionImpls;
|
|
74
|
-
}
|
|
10
|
+
};
|
package/dist/esm/i18n/cs.js
CHANGED
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
'fabric.linking.automation-action.confluence.page.modal.description': 'Použijte automatizaci u položky <b>{name}</b>.{br}Dostupné výběry jsou určeny správci Confluence a prostorů.',
|
|
39
39
|
'fabric.linking.automation-action.confluence.page.modal.title': 'Automatizace stránek',
|
|
40
40
|
'fabric.linking.automation-action.icon.label': 'Ikona automatizace',
|
|
41
|
-
'fabric.linking.automation-action.title': 'Zobrazit pravidla automatizace
|
|
41
|
+
'fabric.linking.automation-action.title': 'Zobrazit pravidla automatizace',
|
|
42
42
|
'fabric.linking.automation-action.tooltip': 'Vyberte pravidlo automatizace, které chcete spustit.',
|
|
43
43
|
'fabric.linking.beta': 'Beta',
|
|
44
44
|
'fabric.linking.cancel': 'Zrušit',
|
|
@@ -90,7 +90,6 @@ export default {
|
|
|
90
90
|
'fabric.linking.invalid_permissions': 'Omezený obsah',
|
|
91
91
|
'fabric.linking.invalid_permissions_description': 'Pokud si chcete zobrazit tento náhled, požádejte o přístup nebo vyzkoušejte jiný účet.',
|
|
92
92
|
'fabric.linking.join_to_view': 'Chcete-li si zobrazit tento požadavek, připojte se ke službě {context}.',
|
|
93
|
-
'fabric.linking.last_mentioned_in': 'Naposledy zmíněno v:',
|
|
94
93
|
'fabric.linking.learn_more_about_connecting_account': 'Další informace o propojení účtu s produkty Atlassian.',
|
|
95
94
|
'fabric.linking.learn_more_about_smart_links': 'Další informace o chytrých odkazech',
|
|
96
95
|
'fabric.linking.link_safety_warning_message': 'Odkaz {unsafeLinkText} vás přesměruje na jiný web (<a>actual link here</a>)',
|
|
@@ -131,8 +130,7 @@ export default {
|
|
|
131
130
|
'fabric.linking.related_links_modal_unavailable_header': 'Žádné nedávné odkazy',
|
|
132
131
|
'fabric.linking.related_links_modal_unavailable_message': 'Nebyly nalezeny žádné odkazy, které bychom tu mohli zobrazit. Neustále kontrolujeme a přidáváme odkazy na nedávno aktualizované stránky nebo jiné typy obsahu.',
|
|
133
132
|
'fabric.linking.related_links_not_found': 'Nebyly nalezeny žádné odkazy, které bychom tu mohli zobrazit.',
|
|
134
|
-
'fabric.linking.related_links_view_related_urls
|
|
135
|
-
'fabric.linking.related_work_items_not_found': 'Tento odkaz není nikde jinde zmíněn.',
|
|
133
|
+
'fabric.linking.related_links_view_related_urls': 'Zobrazit nedávné odkazy',
|
|
136
134
|
'fabric.linking.request_access': 'Požádat o přístup',
|
|
137
135
|
'fabric.linking.request_access_description': 'Váš tým spolupracuje v {product}. Pošlete správci žádost o přístup.',
|
|
138
136
|
'fabric.linking.request_access_pending': 'Čeká na schválení',
|