@atlaskit/smart-card 23.3.0 → 23.4.0
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 +41 -0
- package/dist/cjs/constants.js +7 -2
- package/dist/cjs/extractors/common/actions/extractActions.js +3 -0
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +26 -0
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +36 -0
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +26 -0
- package/dist/cjs/extractors/flexible/index.js +9 -0
- package/dist/cjs/messages.js +15 -0
- package/dist/cjs/state/flexible-ui-context/index.js +15 -2
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/{BlockCard/utils → EmbedCard}/constants.js +4 -4
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +1 -1
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +1 -1
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +23 -5
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +9 -5
- package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +110 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +167 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +92 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +26 -2
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +51 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +19 -13
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +9 -4
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/index.js +6 -3
- package/dist/cjs/view/common/Icon.js +25 -13
- package/dist/es2019/constants.js +5 -0
- package/dist/es2019/extractors/common/actions/extractActions.js +1 -2
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +13 -0
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +23 -0
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +13 -0
- package/dist/es2019/extractors/flexible/index.js +7 -1
- package/dist/es2019/messages.js +15 -0
- package/dist/es2019/state/flexible-ui-context/index.js +8 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/{BlockCard/utils → EmbedCard}/constants.js +2 -2
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +1 -1
- package/dist/es2019/view/EmbedCard/views/NotFoundView.js +1 -1
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +19 -5
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +9 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +66 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +104 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +46 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +23 -2
- package/dist/es2019/view/FlexibleCard/components/actions/utils.js +48 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +12 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +9 -4
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/index.js +7 -4
- package/dist/es2019/view/common/Icon.js +31 -13
- package/dist/esm/constants.js +5 -0
- package/dist/esm/extractors/common/actions/extractActions.js +1 -2
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +15 -0
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +23 -0
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +15 -0
- package/dist/esm/extractors/flexible/index.js +7 -1
- package/dist/esm/messages.js +15 -0
- package/dist/esm/state/flexible-ui-context/index.js +9 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/{BlockCard/utils → EmbedCard}/constants.js +2 -2
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +1 -1
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +1 -1
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +19 -5
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +9 -5
- package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +96 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/download-action/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +136 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +77 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/view-action/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/index.js +23 -2
- package/dist/esm/view/FlexibleCard/components/actions/utils.js +45 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +19 -13
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +9 -4
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +1 -1
- package/dist/esm/view/FlexibleCard/index.js +7 -4
- package/dist/esm/view/common/Icon.js +27 -13
- package/dist/types/constants.d.ts +4 -0
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +112 -0
- package/dist/types/extractors/common/actions/extractActions.d.ts +1 -0
- package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +3 -0
- package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +3 -0
- package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +3 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/index.d.ts +76 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +32 -0
- package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +2 -2
- package/dist/types/view/{BlockCard/utils → EmbedCard}/constants.d.ts +1 -1
- package/dist/types/view/EmbedCard/types.d.ts +1 -0
- package/dist/types/view/EmbedModal/index.d.ts +20 -2
- package/dist/types/view/EmbedModal/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/actions/action/download-action/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/action/download-action/types.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/preview-action/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/actions/action/preview-action/types.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/actions/action/view-action/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/actions/action/view-action/types.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +21 -0
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +50 -3
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +6 -0
- package/dist/types/view/common/Icon.d.ts +2 -1
- package/package.json +2 -10
- package/report.api.md +30 -2
- package/tmp/api-report-tmp.d.ts +25 -3
- package/dist/types-ts4.0/__fixtures__/flexible-ui-data-context.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/index.d.ts +0 -6
- package/dist/types-ts4.0/__tests_external__/page-objects/BaseCard.d.ts +0 -16
- package/dist/types-ts4.0/__tests_external__/page-objects/BlockCard.d.ts +0 -6
- package/dist/types-ts4.0/__tests_external__/page-objects/EmbedCard.d.ts +0 -6
- package/dist/types-ts4.0/__tests_external__/page-objects/InlineCard.d.ts +0 -6
- package/dist/types-ts4.0/__tests_external__/test-cases/card.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/test-cases/embed.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/test-cases/inline.d.ts +0 -3
- package/dist/types-ts4.0/__tests_external__/test-cases/types.d.ts +0 -5
- package/dist/types-ts4.0/classNames.d.ts +0 -11
- package/dist/types-ts4.0/client/index.d.ts +0 -1
- package/dist/types-ts4.0/constants.d.ts +0 -187
- package/dist/types-ts4.0/extractors/block/index.d.ts +0 -9
- package/dist/types-ts4.0/extractors/block/types.d.ts +0 -12
- package/dist/types-ts4.0/extractors/common/__mocks__/jsonld.d.ts +0 -234
- package/dist/types-ts4.0/extractors/common/__mocks__/render.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/actions/extractActions.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/actions/extractPreviewAction.d.ts +0 -9
- package/dist/types-ts4.0/extractors/common/byline/extractByline.d.ts +0 -3
- package/dist/types-ts4.0/extractors/common/context/extractAccessContext.d.ts +0 -7
- package/dist/types-ts4.0/extractors/common/context/index.d.ts +0 -1
- package/dist/types-ts4.0/extractors/common/detail/extractAttachmentCount.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/detail/extractCommentCount.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/detail/extractDownloadUrl.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/detail/extractProgrammingLanguage.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/detail/extractSubscriberCount.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/detail/index.d.ts +0 -9
- package/dist/types-ts4.0/extractors/common/detail/types.d.ts +0 -5
- package/dist/types-ts4.0/extractors/common/icon/extractFileFormat.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/icon/extractIcon.d.ts +0 -14
- package/dist/types-ts4.0/extractors/common/icon/extractIconFromDocument.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/icon/extractIconFromTask.d.ts +0 -3
- package/dist/types-ts4.0/extractors/common/icon/index.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/icon/priority.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/lozenge/extractLozenge.d.ts +0 -3
- package/dist/types-ts4.0/extractors/common/lozenge/extractState.d.ts +0 -3
- package/dist/types-ts4.0/extractors/common/lozenge/extractTag.d.ts +0 -3
- package/dist/types-ts4.0/extractors/common/lozenge/extractTaskStatus.d.ts +0 -3
- package/dist/types-ts4.0/extractors/common/lozenge/extractTaskType.d.ts +0 -7
- package/dist/types-ts4.0/extractors/common/lozenge/index.d.ts +0 -5
- package/dist/types-ts4.0/extractors/common/lozenge/types.d.ts +0 -8
- package/dist/types-ts4.0/extractors/common/lozenge/utils.d.ts +0 -4
- package/dist/types-ts4.0/extractors/common/meta/extractIsTrusted.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/primitives/extractSummary.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/primitives/extractTitleTextColor.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/primitives/extractVisitUrl.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/primitives/index.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/title-prefix/extractTitlePrefix.d.ts +0 -5
- package/dist/types-ts4.0/extractors/common/title-prefix/index.d.ts +0 -1
- package/dist/types-ts4.0/extractors/constants.d.ts +0 -12
- package/dist/types-ts4.0/extractors/embed/index.d.ts +0 -3
- package/dist/types-ts4.0/extractors/flexible/collaboratorGroup/index.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/extract-preview.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/extract-priority.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/icon/extract-document-type-icon.d.ts +0 -3
- package/dist/types-ts4.0/extractors/flexible/icon/extract-file-formatIcon.d.ts +0 -3
- package/dist/types-ts4.0/extractors/flexible/icon/extract-icon-renderer.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/icon/extract-jira-task-icon.d.ts +0 -3
- package/dist/types-ts4.0/extractors/flexible/icon/extract-jsonld-data-icon.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/icon/extract-provider-icon.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/icon/extract-url-icon.d.ts +0 -4
- package/dist/types-ts4.0/extractors/flexible/icon/index.d.ts +0 -17
- package/dist/types-ts4.0/extractors/flexible/icon/types.d.ts +0 -6
- package/dist/types-ts4.0/extractors/flexible/index.d.ts +0 -5
- package/dist/types-ts4.0/extractors/flexible/latest-commit/index.d.ts +0 -2
- package/dist/types-ts4.0/extractors/flexible/utils.d.ts +0 -13
- package/dist/types-ts4.0/extractors/hover/extractMetadata.d.ts +0 -3
- package/dist/types-ts4.0/extractors/index.d.ts +0 -14
- package/dist/types-ts4.0/extractors/inline/index.d.ts +0 -6
- package/dist/types-ts4.0/hooks.d.ts +0 -2
- package/dist/types-ts4.0/i18n/cs.d.ts +0 -71
- package/dist/types-ts4.0/i18n/da.d.ts +0 -71
- package/dist/types-ts4.0/i18n/de.d.ts +0 -71
- package/dist/types-ts4.0/i18n/en.d.ts +0 -71
- package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -71
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -38
- package/dist/types-ts4.0/i18n/es.d.ts +0 -71
- package/dist/types-ts4.0/i18n/et.d.ts +0 -94
- package/dist/types-ts4.0/i18n/fi.d.ts +0 -71
- package/dist/types-ts4.0/i18n/fr.d.ts +0 -71
- package/dist/types-ts4.0/i18n/hu.d.ts +0 -71
- package/dist/types-ts4.0/i18n/index.d.ts +0 -35
- package/dist/types-ts4.0/i18n/is.d.ts +0 -70
- package/dist/types-ts4.0/i18n/it.d.ts +0 -71
- package/dist/types-ts4.0/i18n/ja.d.ts +0 -71
- package/dist/types-ts4.0/i18n/ko.d.ts +0 -71
- package/dist/types-ts4.0/i18n/languages.d.ts +0 -27
- package/dist/types-ts4.0/i18n/nb.d.ts +0 -71
- package/dist/types-ts4.0/i18n/nl.d.ts +0 -71
- package/dist/types-ts4.0/i18n/pl.d.ts +0 -71
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -71
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -94
- package/dist/types-ts4.0/i18n/ro.d.ts +0 -70
- package/dist/types-ts4.0/i18n/ru.d.ts +0 -71
- package/dist/types-ts4.0/i18n/sk.d.ts +0 -94
- package/dist/types-ts4.0/i18n/sv.d.ts +0 -71
- package/dist/types-ts4.0/i18n/th.d.ts +0 -71
- package/dist/types-ts4.0/i18n/tr.d.ts +0 -71
- package/dist/types-ts4.0/i18n/uk.d.ts +0 -71
- package/dist/types-ts4.0/i18n/vi.d.ts +0 -71
- package/dist/types-ts4.0/i18n/zh.d.ts +0 -71
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -71
- package/dist/types-ts4.0/in-product.d.ts +0 -1
- package/dist/types-ts4.0/index.d.ts +0 -22
- package/dist/types-ts4.0/messages.d.ts +0 -8
- package/dist/types-ts4.0/model/invoke-handler.d.ts +0 -3
- package/dist/types-ts4.0/model/invoke-opts.d.ts +0 -17
- package/dist/types-ts4.0/ssr.d.ts +0 -6
- package/dist/types-ts4.0/state/actions/constants.d.ts +0 -6
- package/dist/types-ts4.0/state/actions/index.d.ts +0 -12
- package/dist/types-ts4.0/state/actions/types.d.ts +0 -2
- package/dist/types-ts4.0/state/analytics/index.d.ts +0 -3
- package/dist/types-ts4.0/state/analytics/types.d.ts +0 -9
- package/dist/types-ts4.0/state/analytics/ufoExperiences.d.ts +0 -7
- package/dist/types-ts4.0/state/analytics/useSmartLinkAnalytics.d.ts +0 -195
- package/dist/types-ts4.0/state/config/index.d.ts +0 -2
- package/dist/types-ts4.0/state/flexible-ui-context/index.d.ts +0 -8
- package/dist/types-ts4.0/state/flexible-ui-context/types.d.ts +0 -165
- package/dist/types-ts4.0/state/helpers.d.ts +0 -16
- package/dist/types-ts4.0/state/hooks/index.d.ts +0 -2
- package/dist/types-ts4.0/state/hooks/usePrefetch.d.ts +0 -1
- package/dist/types-ts4.0/state/hooks/useSmartLink.d.ts +0 -50
- package/dist/types-ts4.0/state/hooks-external/useSmartLinkActions.d.ts +0 -49
- package/dist/types-ts4.0/state/hooks-external/useSmartLinkReload.d.ts +0 -19
- package/dist/types-ts4.0/state/index.d.ts +0 -5
- package/dist/types-ts4.0/state/reducers/types.d.ts +0 -4
- package/dist/types-ts4.0/state/renderers/index.d.ts +0 -2
- package/dist/types-ts4.0/state/store/index.d.ts +0 -3
- package/dist/types-ts4.0/state/types.d.ts +0 -1
- package/dist/types-ts4.0/types.d.ts +0 -20
- package/dist/types-ts4.0/utils/analytics/__mocks__/analytics.d.ts +0 -2
- package/dist/types-ts4.0/utils/analytics/analytics.d.ts +0 -32
- package/dist/types-ts4.0/utils/analytics/index.d.ts +0 -4
- package/dist/types-ts4.0/utils/analytics/types.d.ts +0 -93
- package/dist/types-ts4.0/utils/flexible.d.ts +0 -5
- package/dist/types-ts4.0/utils/index.d.ts +0 -12
- package/dist/types-ts4.0/utils/jsonld.d.ts +0 -3
- package/dist/types-ts4.0/utils/mocks.d.ts +0 -75
- package/dist/types-ts4.0/utils/performance.d.ts +0 -8
- package/dist/types-ts4.0/utils/test-utils.d.ts +0 -4
- package/dist/types-ts4.0/utils/token.d.ts +0 -16
- package/dist/types-ts4.0/utils/types.d.ts +0 -14
- package/dist/types-ts4.0/view/BlockCard/actions/AuthorizeAction.d.ts +0 -2
- package/dist/types-ts4.0/view/BlockCard/actions/DownloadAction.d.ts +0 -8
- package/dist/types-ts4.0/view/BlockCard/actions/ForbiddenAction.d.ts +0 -2
- package/dist/types-ts4.0/view/BlockCard/actions/PreviewAction.d.ts +0 -30
- package/dist/types-ts4.0/view/BlockCard/actions/RetryAction.d.ts +0 -2
- package/dist/types-ts4.0/view/BlockCard/actions/ViewAction.d.ts +0 -8
- package/dist/types-ts4.0/view/BlockCard/components/Action.d.ts +0 -13
- package/dist/types-ts4.0/view/BlockCard/components/ActionIcon.d.ts +0 -12
- package/dist/types-ts4.0/view/BlockCard/components/ActionList.d.ts +0 -7
- package/dist/types-ts4.0/view/BlockCard/components/CollaboratorList.d.ts +0 -15
- package/dist/types-ts4.0/view/BlockCard/components/Content.d.ts +0 -9
- package/dist/types-ts4.0/view/BlockCard/components/ContentFooter.d.ts +0 -9
- package/dist/types-ts4.0/view/BlockCard/components/ContentHeader.d.ts +0 -10
- package/dist/types-ts4.0/view/BlockCard/components/Emoji.d.ts +0 -7
- package/dist/types-ts4.0/view/BlockCard/components/Frame.d.ts +0 -16
- package/dist/types-ts4.0/view/BlockCard/components/Link.d.ts +0 -8
- package/dist/types-ts4.0/view/BlockCard/components/Name.d.ts +0 -12
- package/dist/types-ts4.0/view/BlockCard/components/Provider.d.ts +0 -8
- package/dist/types-ts4.0/view/BlockCard/components/Thumbnail.d.ts +0 -10
- package/dist/types-ts4.0/view/BlockCard/components/UnresolvedText.d.ts +0 -8
- package/dist/types-ts4.0/view/BlockCard/index.d.ts +0 -14
- package/dist/types-ts4.0/view/BlockCard/types.d.ts +0 -25
- package/dist/types-ts4.0/view/BlockCard/utils/constants.d.ts +0 -3
- package/dist/types-ts4.0/view/BlockCard/utils/handlers.d.ts +0 -2
- package/dist/types-ts4.0/view/BlockCard/views/ErroredView.d.ts +0 -14
- package/dist/types-ts4.0/view/BlockCard/views/ForbiddenView.d.ts +0 -23
- package/dist/types-ts4.0/view/BlockCard/views/NotFoundView.d.ts +0 -17
- package/dist/types-ts4.0/view/BlockCard/views/ResolvedView.d.ts +0 -34
- package/dist/types-ts4.0/view/BlockCard/views/ResolvingView.d.ts +0 -9
- package/dist/types-ts4.0/view/BlockCard/views/UnauthorizedView.d.ts +0 -19
- package/dist/types-ts4.0/view/Card/index.d.ts +0 -5
- package/dist/types-ts4.0/view/Card/types.d.ts +0 -37
- package/dist/types-ts4.0/view/CardWithData/component.d.ts +0 -5
- package/dist/types-ts4.0/view/CardWithData/loader.d.ts +0 -9
- package/dist/types-ts4.0/view/CardWithData/types.d.ts +0 -15
- package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyFallback.d.ts +0 -4
- package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +0 -3
- package/dist/types-ts4.0/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.d.ts +0 -3
- package/dist/types-ts4.0/view/CardWithUrl/component-lazy/index.d.ts +0 -3
- package/dist/types-ts4.0/view/CardWithUrl/component.d.ts +0 -3
- package/dist/types-ts4.0/view/CardWithUrl/loader.d.ts +0 -3
- package/dist/types-ts4.0/view/CardWithUrl/types.d.ts +0 -29
- package/dist/types-ts4.0/view/EmbedCard/EmbedResizeMessageListener.d.ts +0 -15
- package/dist/types-ts4.0/view/EmbedCard/components/ExpandedFrame.d.ts +0 -23
- package/dist/types-ts4.0/view/EmbedCard/components/Frame.d.ts +0 -7
- package/dist/types-ts4.0/view/EmbedCard/components/ImageIcon.d.ts +0 -9
- package/dist/types-ts4.0/view/EmbedCard/components/styled.d.ts +0 -45
- package/dist/types-ts4.0/view/EmbedCard/index.d.ts +0 -3
- package/dist/types-ts4.0/view/EmbedCard/types.d.ts +0 -46
- package/dist/types-ts4.0/view/EmbedCard/views/ErroredView.d.ts +0 -9
- package/dist/types-ts4.0/view/EmbedCard/views/ForbiddenView.d.ts +0 -13
- package/dist/types-ts4.0/view/EmbedCard/views/NotFoundView.d.ts +0 -11
- package/dist/types-ts4.0/view/EmbedCard/views/ResolvedView.d.ts +0 -27
- package/dist/types-ts4.0/view/EmbedCard/views/UnauthorisedView.d.ts +0 -12
- package/dist/types-ts4.0/view/EmbedCard/views/UnresolvedView.d.ts +0 -18
- package/dist/types-ts4.0/view/EmbedModal/components/analytics/index.d.ts +0 -5
- package/dist/types-ts4.0/view/EmbedModal/components/analytics/types.d.ts +0 -6
- package/dist/types-ts4.0/view/EmbedModal/components/embed-content/index.d.ts +0 -5
- package/dist/types-ts4.0/view/EmbedModal/components/embed-content/types.d.ts +0 -6
- package/dist/types-ts4.0/view/EmbedModal/components/error-boundary/index.d.ts +0 -4
- package/dist/types-ts4.0/view/EmbedModal/components/link-info/index.d.ts +0 -4
- package/dist/types-ts4.0/view/EmbedModal/components/link-info/link-info-button/index.d.ts +0 -4
- package/dist/types-ts4.0/view/EmbedModal/components/link-info/link-info-button/types.d.ts +0 -9
- package/dist/types-ts4.0/view/EmbedModal/components/link-info/styled.d.ts +0 -4
- package/dist/types-ts4.0/view/EmbedModal/components/link-info/types.d.ts +0 -13
- package/dist/types-ts4.0/view/EmbedModal/constants.d.ts +0 -2
- package/dist/types-ts4.0/view/EmbedModal/index.d.ts +0 -4
- package/dist/types-ts4.0/view/EmbedModal/types.d.ts +0 -31
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-button/index.d.ts +0 -5
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-button/types.d.ts +0 -8
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-dropdown-item/index.d.ts +0 -4
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-dropdown-item/types.d.ts +0 -8
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +0 -5
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +0 -7
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/index.d.ts +0 -13
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/action/types.d.ts +0 -48
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/index.d.ts +0 -20
- package/dist/types-ts4.0/view/FlexibleCard/components/actions/utils.d.ts +0 -4
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/action-group/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/action-group/types.d.ts +0 -37
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/block/index.d.ts +0 -12
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/element-group/index.d.ts +0 -15
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/element-group/types.d.ts +0 -10
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/footer-block/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/footer-block/types.d.ts +0 -10
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/index.d.ts +0 -5
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +0 -26
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/preview-block/index.d.ts +0 -10
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/preview-block/types.d.ts +0 -8
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +0 -10
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +0 -8
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +0 -12
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/index.d.ts +0 -16
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +0 -9
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/types.d.ts +0 -92
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/types.d.ts +0 -300
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/utils.d.ts +0 -13
- package/dist/types-ts4.0/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +0 -4
- package/dist/types-ts4.0/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +0 -6
- package/dist/types-ts4.0/view/FlexibleCard/components/common/image-icon/index.d.ts +0 -5
- package/dist/types-ts4.0/view/FlexibleCard/components/common/image-icon/types.d.ts +0 -7
- package/dist/types-ts4.0/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +0 -5
- package/dist/types-ts4.0/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +0 -16
- package/dist/types-ts4.0/view/FlexibleCard/components/container/index.d.ts +0 -16
- package/dist/types-ts4.0/view/FlexibleCard/components/container/layered-link/index.d.ts +0 -10
- package/dist/types-ts4.0/view/FlexibleCard/components/container/layered-link/types.d.ts +0 -12
- package/dist/types-ts4.0/view/FlexibleCard/components/container/types.d.ts +0 -25
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -12
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/avatar-group/types.d.ts +0 -21
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/badge/index.d.ts +0 -18
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/badge/types.d.ts +0 -17
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/date-time/index.d.ts +0 -12
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/date-time/types.d.ts +0 -16
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/icon/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/icon/types.d.ts +0 -27
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/index.d.ts +0 -129
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/link/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/link/types.d.ts +0 -35
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/lozenge/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/lozenge/types.d.ts +0 -13
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/media/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/media/types.d.ts +0 -17
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/text/index.d.ts +0 -11
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/text/types.d.ts +0 -17
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/types.d.ts +0 -24
- package/dist/types-ts4.0/view/FlexibleCard/components/elements/utils.d.ts +0 -3
- package/dist/types-ts4.0/view/FlexibleCard/components/types.d.ts +0 -6
- package/dist/types-ts4.0/view/FlexibleCard/components/utils.d.ts +0 -15
- package/dist/types-ts4.0/view/FlexibleCard/index.d.ts +0 -10
- package/dist/types-ts4.0/view/FlexibleCard/types.d.ts +0 -113
- package/dist/types-ts4.0/view/FlexibleCard/utils.d.ts +0 -7
- package/dist/types-ts4.0/view/HoverCard/components/HoverCardComponent.d.ts +0 -4
- package/dist/types-ts4.0/view/HoverCard/components/HoverCardContent.d.ts +0 -9
- package/dist/types-ts4.0/view/HoverCard/components/HoverCardLoadingView.d.ts +0 -4
- package/dist/types-ts4.0/view/HoverCard/components/SnippetOrPreview.d.ts +0 -4
- package/dist/types-ts4.0/view/HoverCard/index.d.ts +0 -3
- package/dist/types-ts4.0/view/HoverCard/styled.d.ts +0 -12
- package/dist/types-ts4.0/view/HoverCard/types.d.ts +0 -45
- package/dist/types-ts4.0/view/HoverCard/utils.d.ts +0 -3
- package/dist/types-ts4.0/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types-ts4.0/view/InlineCard/ForbiddenView/index.d.ts +0 -25
- package/dist/types-ts4.0/view/InlineCard/Frame/index.d.ts +0 -16
- package/dist/types-ts4.0/view/InlineCard/Frame/styled.d.ts +0 -8
- package/dist/types-ts4.0/view/InlineCard/Icon.d.ts +0 -4
- package/dist/types-ts4.0/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -19
- package/dist/types-ts4.0/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -13
- package/dist/types-ts4.0/view/InlineCard/ResolvedView/index.d.ts +0 -30
- package/dist/types-ts4.0/view/InlineCard/ResolvingView/index.d.ts +0 -18
- package/dist/types-ts4.0/view/InlineCard/ResolvingView/styled.d.ts +0 -14
- package/dist/types-ts4.0/view/InlineCard/UnauthorisedView/index.d.ts +0 -20
- package/dist/types-ts4.0/view/InlineCard/index.d.ts +0 -9
- package/dist/types-ts4.0/view/InlineCard/styled.d.ts +0 -9
- package/dist/types-ts4.0/view/InlineCard/types.d.ts +0 -21
- package/dist/types-ts4.0/view/LinkView/index.d.ts +0 -8
- package/dist/types-ts4.0/view/SmartLinkEvents/useSmartLinkEvents.d.ts +0 -2
- package/dist/types-ts4.0/view/__mocks__/intersection-observer.d.ts +0 -26
- package/dist/types-ts4.0/view/__mocks__/intersection-observer.mock.d.ts +0 -12
- package/dist/types-ts4.0/view/common/Byline.d.ts +0 -10
- package/dist/types-ts4.0/view/common/Icon.d.ts +0 -11
- package/dist/types-ts4.0/view/common/Metadata.d.ts +0 -10
- package/dist/types-ts4.0/view/common/MetadataList.d.ts +0 -9
- package/dist/types-ts4.0/view/common/utils.d.ts +0 -5
- package/dist/types-ts4.0/view/types.d.ts +0 -29
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
+
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import Action from '../index';
|
|
12
|
+
|
|
13
|
+
var ViewAction = function ViewAction(props) {
|
|
14
|
+
var appearance = props.appearance,
|
|
15
|
+
asDropDownItem = props.asDropDownItem,
|
|
16
|
+
testId = props.testId,
|
|
17
|
+
_onClick = props.onClick,
|
|
18
|
+
viewUrl = props.viewUrl,
|
|
19
|
+
url = props.url;
|
|
20
|
+
|
|
21
|
+
if (viewUrl && url) {
|
|
22
|
+
var action = _objectSpread(_objectSpread({}, props), {}, {
|
|
23
|
+
onClick: function onClick() {
|
|
24
|
+
viewFunction({
|
|
25
|
+
url: viewUrl
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
if (_onClick) {
|
|
29
|
+
_onClick();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return /*#__PURE__*/React.createElement(Action, _extends({}, action, {
|
|
35
|
+
appearance: appearance,
|
|
36
|
+
asDropDownItem: asDropDownItem,
|
|
37
|
+
testId: testId
|
|
38
|
+
}));
|
|
39
|
+
} else {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export function viewFunction(_x) {
|
|
45
|
+
return _viewFunction.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _viewFunction() {
|
|
49
|
+
_viewFunction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
50
|
+
var url;
|
|
51
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
52
|
+
while (1) {
|
|
53
|
+
switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
url = _ref.url;
|
|
56
|
+
|
|
57
|
+
if (url) {
|
|
58
|
+
_context.next = 3;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return _context.abrupt("return");
|
|
63
|
+
|
|
64
|
+
case 3:
|
|
65
|
+
window.open(url, '_blank', 'noopener=yes');
|
|
66
|
+
|
|
67
|
+
case 4:
|
|
68
|
+
case "end":
|
|
69
|
+
return _context.stop();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, _callee);
|
|
73
|
+
}));
|
|
74
|
+
return _viewFunction.apply(this, arguments);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default ViewAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActionName } from '../../../../constants';
|
|
2
|
-
import { createUIAction } from './utils';
|
|
2
|
+
import { createDataAction, createUIAction } from './utils';
|
|
3
|
+
// Attention: Keep the export name and action name the same.
|
|
3
4
|
// This will help reducing the code for mapping action inside
|
|
4
5
|
// createAction and renderActionItems
|
|
5
6
|
|
|
@@ -8,7 +9,6 @@ import { createUIAction } from './utils'; // Attention: Keep the export name and
|
|
|
8
9
|
* the icon to a cross icon.
|
|
9
10
|
* @see Action
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
12
|
export var DeleteAction = createUIAction(ActionName.DeleteAction);
|
|
13
13
|
/**
|
|
14
14
|
* Creates a EditAction component. Accepts default ActionProps, but defaults
|
|
@@ -17,6 +17,27 @@ export var DeleteAction = createUIAction(ActionName.DeleteAction);
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
export var EditAction = createUIAction(ActionName.EditAction);
|
|
20
|
+
/**
|
|
21
|
+
* Creates a PreviewAction component. Accepts default PreviewActionProps, and defaults
|
|
22
|
+
* to the text 'Preview' inside the button.
|
|
23
|
+
* @see Action
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export var PreviewAction = createDataAction(ActionName.PreviewAction);
|
|
27
|
+
/**
|
|
28
|
+
* Creates a ViewAction component. Accepts default ViewActionProps, and defaults
|
|
29
|
+
* to the text 'View' inside the button.
|
|
30
|
+
* @see Action
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export var ViewAction = createDataAction(ActionName.ViewAction);
|
|
34
|
+
/**
|
|
35
|
+
* Creates a DownloadAction component. Accepts default DownloadActionProps, and defaults
|
|
36
|
+
* to the text 'Download' inside the button.
|
|
37
|
+
* @see Action
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export var DownloadAction = createDataAction(ActionName.DownloadAction);
|
|
20
41
|
/**
|
|
21
42
|
* Creates a CustomAction component. Accepts default ActionProps. Required to provide
|
|
22
43
|
* your own icon or text.
|
|
@@ -15,6 +15,12 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
15
15
|
import { messages } from '../../../../messages';
|
|
16
16
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
17
17
|
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
18
|
+
import PreviewAction from './action/preview-action';
|
|
19
|
+
import VidFullScreenOnIcon from '@atlaskit/icon/glyph/vid-full-screen-on';
|
|
20
|
+
import ViewAction from './action/view-action';
|
|
21
|
+
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
22
|
+
import DownloadAction from './action/download-action';
|
|
23
|
+
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
18
24
|
var actionMappings = (_actionMappings = {}, _defineProperty(_actionMappings, ActionName.CustomAction, {
|
|
19
25
|
component: Action,
|
|
20
26
|
props: {}
|
|
@@ -38,6 +44,36 @@ var actionMappings = (_actionMappings = {}, _defineProperty(_actionMappings, Act
|
|
|
38
44
|
}),
|
|
39
45
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.edit)
|
|
40
46
|
}
|
|
47
|
+
}), _defineProperty(_actionMappings, ActionName.PreviewAction, {
|
|
48
|
+
component: PreviewAction,
|
|
49
|
+
props: {
|
|
50
|
+
testId: 'smart-action-preview-action',
|
|
51
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview),
|
|
52
|
+
icon: /*#__PURE__*/React.createElement(VidFullScreenOnIcon, {
|
|
53
|
+
label: "Preview"
|
|
54
|
+
}),
|
|
55
|
+
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview)
|
|
56
|
+
}
|
|
57
|
+
}), _defineProperty(_actionMappings, ActionName.ViewAction, {
|
|
58
|
+
component: ViewAction,
|
|
59
|
+
props: {
|
|
60
|
+
testId: 'smart-action-view-action',
|
|
61
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.view),
|
|
62
|
+
icon: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
63
|
+
label: "View"
|
|
64
|
+
}),
|
|
65
|
+
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.view)
|
|
66
|
+
}
|
|
67
|
+
}), _defineProperty(_actionMappings, ActionName.DownloadAction, {
|
|
68
|
+
component: DownloadAction,
|
|
69
|
+
props: {
|
|
70
|
+
testId: 'smart-action-download-action',
|
|
71
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
72
|
+
icon: /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
73
|
+
label: "Download"
|
|
74
|
+
}),
|
|
75
|
+
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.download)
|
|
76
|
+
}
|
|
41
77
|
}), _actionMappings);
|
|
42
78
|
|
|
43
79
|
var getContextKey = function getContextKey(name) {
|
|
@@ -54,8 +90,13 @@ var getActionData = function getActionData(actionName, contextKey, context) {
|
|
|
54
90
|
var data = context[contextKey];
|
|
55
91
|
|
|
56
92
|
switch (actionName) {
|
|
57
|
-
|
|
93
|
+
case ActionName.PreviewAction:
|
|
94
|
+
case ActionName.ViewAction:
|
|
95
|
+
case ActionName.DownloadAction:
|
|
58
96
|
return data;
|
|
97
|
+
|
|
98
|
+
default:
|
|
99
|
+
return undefined;
|
|
59
100
|
}
|
|
60
101
|
};
|
|
61
102
|
|
|
@@ -73,7 +114,9 @@ export var createDataAction = function createDataAction(name) {
|
|
|
73
114
|
return function (overrides) {
|
|
74
115
|
var context = useContext(FlexibleUiContext);
|
|
75
116
|
var data = getActionData(name, contextKey, context);
|
|
76
|
-
return /*#__PURE__*/React.createElement(BaseAction, _extends({}, props, data, overrides
|
|
117
|
+
return data ? /*#__PURE__*/React.createElement(BaseAction, _extends({}, props, data, overrides, {
|
|
118
|
+
url: context === null || context === void 0 ? void 0 : context.url
|
|
119
|
+
})) : null;
|
|
77
120
|
};
|
|
78
121
|
};
|
|
79
122
|
export var createUIAction = function createUIAction(name) {
|
|
@@ -43,17 +43,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
43
43
|
var _useState = useState(false),
|
|
44
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
45
|
isOpen = _useState2[0],
|
|
46
|
-
setIsOpen = _useState2[1];
|
|
47
|
-
|
|
48
|
-
var _useMemo = useMemo(function () {
|
|
49
|
-
var isMoreThenTwoItems = items.length > visibleButtonsNum;
|
|
50
|
-
var buttons = isMoreThenTwoItems ? items.slice(0, visibleButtonsNum - 1) : items;
|
|
51
|
-
var dropdownItems = isMoreThenTwoItems ? items.slice(visibleButtonsNum - 1) : [];
|
|
52
|
-
return [buttons, dropdownItems];
|
|
53
|
-
}, [items, visibleButtonsNum]),
|
|
54
|
-
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
55
|
-
buttonActions = _useMemo2[0],
|
|
56
|
-
dropdownItemActions = _useMemo2[1]; // Stop AK dropdown menu to propagate event on click.
|
|
46
|
+
setIsOpen = _useState2[1]; // Stop AK dropdown menu to propagate event on click.
|
|
57
47
|
|
|
58
48
|
|
|
59
49
|
var onClick = useCallback(function (e) {
|
|
@@ -73,11 +63,27 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
73
63
|
});
|
|
74
64
|
}
|
|
75
65
|
}, [isOpen, onOpenChange]);
|
|
66
|
+
var renderableActions = items.filter(function (action) {
|
|
67
|
+
return renderActionItems([action]);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var _useMemo = useMemo(function () {
|
|
71
|
+
var isMoreThenTwoItems = renderableActions && renderableActions.length > visibleButtonsNum;
|
|
72
|
+
var buttons = isMoreThenTwoItems ? renderableActions.slice(0, visibleButtonsNum - 1) : renderableActions;
|
|
73
|
+
var dropdownItems = isMoreThenTwoItems ? renderableActions.slice(visibleButtonsNum - 1) : [];
|
|
74
|
+
return [buttons, dropdownItems];
|
|
75
|
+
}, [renderableActions, visibleButtonsNum]),
|
|
76
|
+
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
77
|
+
buttonActions = _useMemo2[0],
|
|
78
|
+
dropdownItemActions = _useMemo2[1];
|
|
79
|
+
|
|
80
|
+
var dropdownMenuElement = renderActionItems(dropdownItemActions, size, appearance, true, onActionClick);
|
|
81
|
+
var buttonGroupElement = renderActionItems(buttonActions, size, appearance, false, onActionClick);
|
|
76
82
|
return jsx("div", {
|
|
77
83
|
css: styles,
|
|
78
84
|
className: "actions-button-group",
|
|
79
85
|
onClick: onClick
|
|
80
|
-
}, jsx(ButtonGroup, null,
|
|
86
|
+
}, jsx(ButtonGroup, null, buttonGroupElement, dropdownItemActions.length > 0 && dropdownMenuElement && dropdownMenuElement.length > 0 ? jsx(DropdownMenu, {
|
|
81
87
|
isOpen: isOpen,
|
|
82
88
|
onOpenChange: onOpenChange,
|
|
83
89
|
trigger: function trigger(_ref2) {
|
|
@@ -99,7 +105,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
99
105
|
})));
|
|
100
106
|
},
|
|
101
107
|
testId: "action-group-dropdown"
|
|
102
|
-
},
|
|
108
|
+
}, dropdownMenuElement) : null));
|
|
103
109
|
};
|
|
104
110
|
|
|
105
111
|
export default ActionGroup;
|
|
@@ -64,7 +64,7 @@ var isElementDisplayValid = function isElementDisplayValid(name, display) {
|
|
|
64
64
|
return (_ElementDisplaySchema2 = (_ElementDisplaySchema3 = ElementDisplaySchema[name]) === null || _ElementDisplaySchema3 === void 0 ? void 0 : _ElementDisplaySchema3.includes(display)) !== null && _ElementDisplaySchema2 !== void 0 ? _ElementDisplaySchema2 : false;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var isJSXElementNull = function isJSXElementNull(children) {
|
|
68
68
|
return Boolean(children.type() === null);
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -100,7 +100,7 @@ export var renderElementItems = function renderElementItems() {
|
|
|
100
100
|
key: idx
|
|
101
101
|
}, typedProps));
|
|
102
102
|
|
|
103
|
-
if (!
|
|
103
|
+
if (!isJSXElementNull(element)) {
|
|
104
104
|
return [].concat(_toConsumableArray(acc), [element]);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -148,13 +148,18 @@ export var renderActionItems = function renderActionItems() {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
var action = /*#__PURE__*/React.createElement(Action, _extends({
|
|
152
|
+
url: '',
|
|
152
153
|
asDropDownItem: asDropDownItems,
|
|
153
154
|
size: size,
|
|
154
155
|
key: idx,
|
|
155
156
|
appearance: appearance,
|
|
156
157
|
onClick: handleOnClick
|
|
157
|
-
}, actionProps))
|
|
158
|
+
}, actionProps));
|
|
159
|
+
|
|
160
|
+
if (!isJSXElementNull(action)) {
|
|
161
|
+
return [].concat(_toConsumableArray(acc), [action]);
|
|
162
|
+
}
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
return acc;
|
|
@@ -41,7 +41,7 @@ var Media = function Media(_ref) {
|
|
|
41
41
|
return jsx("div", {
|
|
42
42
|
css: [styles, overrideCss],
|
|
43
43
|
"data-smart-element": name,
|
|
44
|
-
"data-smart-element-media":
|
|
44
|
+
"data-smart-element-media": type,
|
|
45
45
|
"data-testid": testId
|
|
46
46
|
}, jsx(ImageIcon, {
|
|
47
47
|
testId: "".concat(testId, "-image"),
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { SmartLinkStatus } from '../../constants';
|
|
4
4
|
import Container from './components/container';
|
|
5
|
-
import { FlexibleUiContext } from '../../state/flexible-ui-context';
|
|
5
|
+
import { FlexibleUiAnalyticsContext, FlexibleUiContext } from '../../state/flexible-ui-context';
|
|
6
6
|
import { getContextByStatus, getRetryOptions } from './utils';
|
|
7
7
|
/**
|
|
8
8
|
* This represents a Flexible Card: a link represented by a card with metadata.
|
|
@@ -21,7 +21,8 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
21
21
|
ui = _ref.ui,
|
|
22
22
|
url = _ref.url,
|
|
23
23
|
onClick = _ref.onClick,
|
|
24
|
-
testId = _ref.testId
|
|
24
|
+
testId = _ref.testId,
|
|
25
|
+
analytics = _ref.analytics;
|
|
25
26
|
var cardType = cardState.status,
|
|
26
27
|
details = cardState.details;
|
|
27
28
|
var status = cardType;
|
|
@@ -58,7 +59,9 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
58
59
|
break;
|
|
59
60
|
}
|
|
60
61
|
}, [onError, onResolve, status, title, url]);
|
|
61
|
-
return /*#__PURE__*/React.createElement(
|
|
62
|
+
return /*#__PURE__*/React.createElement(FlexibleUiAnalyticsContext.Provider, {
|
|
63
|
+
value: analytics
|
|
64
|
+
}, /*#__PURE__*/React.createElement(FlexibleUiContext.Provider, {
|
|
62
65
|
value: context
|
|
63
66
|
}, /*#__PURE__*/React.createElement(Container, _extends({
|
|
64
67
|
testId: testId
|
|
@@ -66,7 +69,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
66
69
|
onClick: onClick,
|
|
67
70
|
retry: retry,
|
|
68
71
|
status: status
|
|
69
|
-
}), children));
|
|
72
|
+
}), children)));
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
export default FlexibleCard;
|
|
@@ -1,16 +1,39 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
|
+
|
|
1
5
|
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
3
7
|
import React from 'react';
|
|
4
8
|
import ImageLoader from 'react-render-image';
|
|
5
9
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
6
10
|
import { gs } from './utils';
|
|
7
11
|
export var blockCardIconImageClassName = 'block-card-icon-image';
|
|
12
|
+
|
|
13
|
+
var getImageStyles = function getImageStyles(isFlexibleUi) {
|
|
14
|
+
if (isFlexibleUi) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", ";\n width: ", ";\n "])), gs(2), gs(2));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var getSpanStyles = function getSpanStyles(isFlexibleUi) {
|
|
22
|
+
if (isFlexibleUi) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: ", ";\n width: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n "])), gs(2.5), gs(2));
|
|
27
|
+
};
|
|
28
|
+
|
|
8
29
|
export var Icon = function Icon(_ref) {
|
|
9
30
|
var url = _ref.url,
|
|
10
31
|
icon = _ref.icon,
|
|
11
32
|
defaultIcon = _ref.defaultIcon,
|
|
12
33
|
_ref$testId = _ref.testId,
|
|
13
|
-
testId = _ref$testId === void 0 ? 'block-card-icon' : _ref$testId
|
|
34
|
+
testId = _ref$testId === void 0 ? 'block-card-icon' : _ref$testId,
|
|
35
|
+
_ref$isFlexibleUi = _ref.isFlexibleUi,
|
|
36
|
+
isFlexibleUi = _ref$isFlexibleUi === void 0 ? false : _ref$isFlexibleUi;
|
|
14
37
|
var placeholder = defaultIcon || jsx(LinkIcon, {
|
|
15
38
|
label: "link",
|
|
16
39
|
size: "small",
|
|
@@ -19,23 +42,14 @@ export var Icon = function Icon(_ref) {
|
|
|
19
42
|
var image = url && jsx(ImageLoader, {
|
|
20
43
|
src: url,
|
|
21
44
|
loaded: jsx("img", {
|
|
22
|
-
css:
|
|
23
|
-
height: gs(2),
|
|
24
|
-
width: gs(2)
|
|
25
|
-
},
|
|
45
|
+
css: getImageStyles(isFlexibleUi),
|
|
26
46
|
src: url,
|
|
27
47
|
"data-testid": "".concat(testId, "-image")
|
|
28
48
|
}),
|
|
29
49
|
errored: placeholder
|
|
30
50
|
});
|
|
31
51
|
return jsx("span", {
|
|
32
|
-
css:
|
|
33
|
-
height: gs(2.5),
|
|
34
|
-
width: gs(2),
|
|
35
|
-
display: 'flex',
|
|
36
|
-
alignItems: 'center',
|
|
37
|
-
justifyContent: 'center'
|
|
38
|
-
},
|
|
52
|
+
css: getSpanStyles(isFlexibleUi),
|
|
39
53
|
"data-testid": testId,
|
|
40
54
|
className: blockCardIconImageClassName
|
|
41
55
|
}, icon || image || placeholder);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const CONTENT_URL_SECURITY_AND_PERMISSIONS = "https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links";
|
|
1
2
|
/**
|
|
2
3
|
* The alignment of Flexible UI component.
|
|
3
4
|
*/
|
|
@@ -111,6 +112,9 @@ export declare enum ElementName {
|
|
|
111
112
|
export declare enum ActionName {
|
|
112
113
|
DeleteAction = "DeleteAction",
|
|
113
114
|
EditAction = "EditAction",
|
|
115
|
+
PreviewAction = "PreviewAction",
|
|
116
|
+
ViewAction = "ViewAction",
|
|
117
|
+
DownloadAction = "DownloadAction",
|
|
114
118
|
CustomAction = "CustomAction"
|
|
115
119
|
}
|
|
116
120
|
/**
|
|
@@ -20,12 +20,14 @@ export declare const TEST_PROJECT: JsonLd.Data.Project;
|
|
|
20
20
|
export declare const TEST_PULL_REQUEST: JsonLd.Data.SourceCodePullRequest;
|
|
21
21
|
export declare const TEST_TASK: JsonLd.Data.Task;
|
|
22
22
|
export declare const TEST_META_DATA: JsonLd.Meta.BaseMeta;
|
|
23
|
+
export declare const TEST_RESOLVED_META_DATA: JsonLd.Meta.BaseMeta;
|
|
23
24
|
export declare const TEST_DOCUMENT: JsonLd.Data.Document;
|
|
24
25
|
export declare const TEST_CURRENT_DOCUMENT: JsonLd.Data.Document;
|
|
25
26
|
export declare const TEST_DOWNLOAD_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
|
|
26
27
|
export declare const TEST_UNDEFINED_LINK: JsonLd.Data.UndefinedLinkDocument;
|
|
27
28
|
export declare const TEST_ASSIGN_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
|
|
28
29
|
export declare const TEST_NO_ID_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
|
|
30
|
+
export declare const TEST_VIEW_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
|
|
29
31
|
export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
30
32
|
'schema:potentialAction': any[];
|
|
31
33
|
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
@@ -81,6 +83,116 @@ export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
|
81
83
|
summaryMap?: Record<string, string> | undefined;
|
|
82
84
|
updated?: string | undefined;
|
|
83
85
|
};
|
|
86
|
+
export declare const TEST_DOCUMENT_WITH_DOWNLOAD_ACTION: {
|
|
87
|
+
'atlassian:downloadUrl': string;
|
|
88
|
+
'schema:potentialAction': import("schema-dts").DownloadAction[];
|
|
89
|
+
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
90
|
+
'schema:fileFormat'?: string | undefined;
|
|
91
|
+
'atlassian:fileSize'?: number | undefined;
|
|
92
|
+
'schema:commentCount'?: number | undefined;
|
|
93
|
+
'atlassian:isDeleted'?: boolean | undefined;
|
|
94
|
+
'atlassian:attachmentCount'?: number | undefined;
|
|
95
|
+
'atlassian:dateViewed'?: string | undefined;
|
|
96
|
+
'atlassian:reactCount'?: number | undefined;
|
|
97
|
+
'atlassian:state'?: string | JsonLd.Primitives.Object<any> | undefined;
|
|
98
|
+
'atlassian:viewCount'?: number | undefined;
|
|
99
|
+
'atlassian:voteCount'?: number | undefined;
|
|
100
|
+
'@context': JsonLd.Primitives.Context;
|
|
101
|
+
'atlassian:visitUrl'?: string | undefined;
|
|
102
|
+
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
103
|
+
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
|
|
104
|
+
'schema:dateCreated'?: string | undefined;
|
|
105
|
+
'@id'?: string | undefined;
|
|
106
|
+
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
107
|
+
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
108
|
+
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
109
|
+
}> | undefined;
|
|
110
|
+
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
111
|
+
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
112
|
+
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
113
|
+
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
114
|
+
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
115
|
+
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
116
|
+
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
117
|
+
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
118
|
+
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
119
|
+
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
120
|
+
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
121
|
+
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
122
|
+
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
123
|
+
preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
124
|
+
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
125
|
+
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
126
|
+
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
127
|
+
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
128
|
+
content?: string | undefined;
|
|
129
|
+
contentMap?: Record<string, string> | undefined;
|
|
130
|
+
name?: string | undefined;
|
|
131
|
+
nameMap?: Record<string, string> | undefined;
|
|
132
|
+
duration?: string | undefined;
|
|
133
|
+
mediaType?: string | undefined;
|
|
134
|
+
endTime?: string | undefined;
|
|
135
|
+
published?: string | undefined;
|
|
136
|
+
startTime?: string | undefined;
|
|
137
|
+
summary?: string | undefined;
|
|
138
|
+
summaryMap?: Record<string, string> | undefined;
|
|
139
|
+
updated?: string | undefined;
|
|
140
|
+
};
|
|
141
|
+
export declare const TEST_DOCUMENT_WITH_VIEW_ACTION: {
|
|
142
|
+
'schema:potentialAction': import("schema-dts").ViewAction[];
|
|
143
|
+
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
144
|
+
'schema:fileFormat'?: string | undefined;
|
|
145
|
+
'atlassian:fileSize'?: number | undefined;
|
|
146
|
+
'schema:commentCount'?: number | undefined;
|
|
147
|
+
'atlassian:isDeleted'?: boolean | undefined;
|
|
148
|
+
'atlassian:attachmentCount'?: number | undefined;
|
|
149
|
+
'atlassian:dateViewed'?: string | undefined;
|
|
150
|
+
'atlassian:reactCount'?: number | undefined;
|
|
151
|
+
'atlassian:state'?: string | JsonLd.Primitives.Object<any> | undefined;
|
|
152
|
+
'atlassian:viewCount'?: number | undefined;
|
|
153
|
+
'atlassian:voteCount'?: number | undefined;
|
|
154
|
+
'@context': JsonLd.Primitives.Context;
|
|
155
|
+
'atlassian:downloadUrl'?: string | undefined;
|
|
156
|
+
'atlassian:visitUrl'?: string | undefined;
|
|
157
|
+
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
158
|
+
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
|
|
159
|
+
'schema:dateCreated'?: string | undefined;
|
|
160
|
+
'@id'?: string | undefined;
|
|
161
|
+
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
162
|
+
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
163
|
+
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
164
|
+
}> | undefined;
|
|
165
|
+
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
166
|
+
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
167
|
+
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
168
|
+
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
169
|
+
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
170
|
+
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
171
|
+
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
172
|
+
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
173
|
+
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
174
|
+
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
175
|
+
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
176
|
+
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
177
|
+
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
178
|
+
preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
179
|
+
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
180
|
+
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
181
|
+
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
182
|
+
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
183
|
+
content?: string | undefined;
|
|
184
|
+
contentMap?: Record<string, string> | undefined;
|
|
185
|
+
name?: string | undefined;
|
|
186
|
+
nameMap?: Record<string, string> | undefined;
|
|
187
|
+
duration?: string | undefined;
|
|
188
|
+
mediaType?: string | undefined;
|
|
189
|
+
endTime?: string | undefined;
|
|
190
|
+
published?: string | undefined;
|
|
191
|
+
startTime?: string | undefined;
|
|
192
|
+
summary?: string | undefined;
|
|
193
|
+
summaryMap?: Record<string, string> | undefined;
|
|
194
|
+
updated?: string | undefined;
|
|
195
|
+
};
|
|
84
196
|
export declare const PREVIEW: JsonLd.Data.BaseData['preview'];
|
|
85
197
|
export declare const TEST_DOCUMENT_WITH_PREVIEW: {
|
|
86
198
|
preview: JsonLd.Primitives.LinkModel & JsonLd.Primitives.PreviewExtension;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { InvokeHandler } from '../../../model/invoke-handler';
|
|
3
3
|
import { ActionProps } from '../../../view/BlockCard/components/Action';
|
|
4
|
+
export declare const getActionsFromJsonLd: (jsonLd: JsonLd.Data.BaseData) => JsonLd.Primitives.Action[];
|
|
4
5
|
export declare function extractActions(jsonLd: JsonLd.Data.BaseData, handler: InvokeHandler): ActionProps[];
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export declare type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description';
|
|
3
|
-
export declare type MessageKey = 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'could_not_load_link' | 'download' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'delete' | 'edit' | 'loading' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'preview' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'try_again' | 'try_another_account' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
|
|
3
|
+
export declare type MessageKey = 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'could_not_load_link' | 'download' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'delete' | 'edit' | 'learn_more_about_smart_links_security' | 'loading' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'preview' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'try_again' | 'try_another_account' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
|
|
4
4
|
declare type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|