@atlaskit/media-card 73.6.0 → 74.0.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 +44 -0
- package/dist/cjs/files/cardImageView/cardImageViewWrapper.js +60 -0
- package/dist/cjs/files/cardImageView/cardOverlay/cardOverlayComponents.js +63 -0
- package/dist/cjs/files/cardImageView/cardOverlay/index.js +31 -19
- package/dist/cjs/files/cardImageView/cardOverlay/styles.js +75 -0
- package/dist/cjs/files/cardImageView/index.js +39 -28
- package/dist/cjs/files/cardImageView/styles.js +60 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/root/card/cardAnalytics.js +1 -25
- package/dist/cjs/root/card/getCardPreview/cache.js +9 -10
- package/dist/cjs/root/card/getCardPreview/index.js +36 -26
- package/dist/cjs/root/card/index.js +25 -20
- package/dist/cjs/root/cardView.js +49 -50
- package/dist/cjs/root/cardViewWrapper.js +35 -0
- package/dist/cjs/root/inlinePlayer.js +15 -15
- package/dist/cjs/root/inlinePlayerWrapper.js +32 -0
- package/dist/cjs/root/styles.js +57 -0
- package/dist/cjs/root/types.js +5 -0
- package/dist/cjs/root/ui/actionsBar/actionsBar.js +2 -2
- package/dist/cjs/root/ui/actionsBar/actionsBarWrapper.js +21 -0
- package/dist/cjs/root/ui/actionsBar/styles.js +28 -0
- package/dist/cjs/root/ui/actionsBar/types.js +5 -0
- package/dist/cjs/root/ui/blanket/blanket.js +21 -0
- package/dist/cjs/root/ui/blanket/styles.js +30 -0
- package/dist/cjs/root/ui/iconMessage/iconMessageWrapper.js +25 -0
- package/dist/cjs/root/ui/iconMessage/index.js +3 -5
- package/dist/cjs/root/ui/iconMessage/styles.js +32 -0
- package/dist/cjs/root/ui/iconMessage/types.js +5 -0
- package/dist/cjs/root/ui/iconWrapper/iconWrapper.js +25 -0
- package/dist/cjs/root/ui/iconWrapper/{styled.js → styles.js} +7 -7
- package/dist/cjs/root/ui/iconWrapper/types.js +5 -0
- package/dist/cjs/root/ui/loadingRateLimited/styles.js +36 -0
- package/dist/cjs/root/ui/newFileExperience/newFileExperienceWrapper.js +52 -0
- package/dist/cjs/root/ui/newFileExperience/styles.js +47 -0
- package/dist/cjs/root/ui/newFileExperience/types.js +5 -0
- package/dist/cjs/root/ui/playButton/playButton.js +4 -2
- package/dist/cjs/root/ui/playButton/playButtonBackground.js +20 -0
- package/dist/cjs/root/ui/playButton/playButtonWrapper.js +20 -0
- package/dist/cjs/root/ui/playButton/styles.js +29 -0
- package/dist/cjs/root/ui/progressBar/progressBar.js +10 -5
- package/dist/cjs/root/ui/progressBar/styledBar.js +29 -0
- package/dist/cjs/root/ui/progressBar/{styled.js → styles.js} +11 -7
- package/dist/cjs/root/ui/progressBar/types.js +5 -0
- package/dist/cjs/root/ui/{styled.js → styles.js} +23 -40
- package/dist/cjs/root/ui/tickBox/styles.js +36 -0
- package/dist/cjs/root/ui/tickBox/tickBox.js +3 -3
- package/dist/cjs/root/ui/tickBox/tickBoxWrapper.js +21 -0
- package/dist/cjs/root/ui/tickBox/types.js +5 -0
- package/dist/cjs/root/ui/titleBox/failedTitleBox.js +5 -7
- package/dist/cjs/root/ui/titleBox/styles.js +62 -0
- package/dist/cjs/root/ui/titleBox/titleBox.js +7 -7
- package/dist/cjs/root/ui/titleBox/titleBoxComponents.js +66 -0
- package/dist/cjs/root/ui/titleBox/types.js +5 -0
- package/dist/cjs/styles/animations.js +2 -2
- package/dist/cjs/styles/index.js +12 -7
- package/dist/cjs/types.js +0 -1
- package/dist/cjs/utils/analytics.js +15 -1
- package/dist/cjs/utils/cardActions/cardActionButton.js +24 -0
- package/dist/cjs/utils/cardActions/cardActionIconButton.js +2 -3
- package/dist/cjs/utils/cardActions/cardActionsDropdownMenu.js +3 -3
- package/dist/cjs/utils/cardActions/cardActionsView.js +11 -13
- package/dist/cjs/utils/cardActions/index.js +2 -2
- package/dist/cjs/utils/cardActions/{styled.js → styles.js} +8 -8
- package/dist/cjs/utils/errorIcon/index.js +8 -10
- package/dist/cjs/utils/errorIcon/styles.js +17 -0
- package/dist/cjs/utils/fileIcon/index.js +9 -14
- package/dist/cjs/utils/fileIcon/styles.js +19 -0
- package/dist/cjs/utils/getMediaCardCursor.js +5 -2
- package/dist/cjs/utils/lightCards/cardError.js +2 -2
- package/dist/cjs/utils/lightCards/cardLoading.js +3 -3
- package/dist/cjs/utils/lightCards/lightCardWrappers.js +41 -0
- package/dist/cjs/utils/lightCards/styles.js +47 -0
- package/dist/cjs/utils/mediaTypeIcon/iconWrapper.js +20 -0
- package/dist/cjs/utils/mediaTypeIcon/index.js +2 -2
- package/dist/cjs/utils/mediaTypeIcon/{styled.js → styles.js} +9 -5
- package/dist/cjs/utils/mediaTypeIcon/types.js +5 -0
- package/dist/cjs/utils/progressBar/index.js +7 -9
- package/dist/cjs/utils/progressBar/styles.js +19 -0
- package/dist/cjs/utils/ufoExperiences.js +18 -18
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/files/cardImageView/cardImageViewWrapper.js +43 -0
- package/dist/es2019/files/cardImageView/cardOverlay/cardOverlayComponents.js +41 -0
- package/dist/es2019/files/cardImageView/cardOverlay/index.js +29 -15
- package/dist/es2019/files/cardImageView/cardOverlay/{styled.js → styles.js} +34 -25
- package/dist/es2019/files/cardImageView/index.js +38 -26
- package/dist/es2019/files/cardImageView/{styled.js → styles.js} +15 -14
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/root/card/cardAnalytics.js +0 -11
- package/dist/es2019/root/card/getCardPreview/cache.js +9 -10
- package/dist/es2019/root/card/getCardPreview/index.js +16 -8
- package/dist/es2019/root/card/index.js +22 -15
- package/dist/es2019/root/cardView.js +40 -39
- package/dist/es2019/root/cardViewWrapper.js +26 -0
- package/dist/es2019/root/inlinePlayer.js +9 -7
- package/dist/es2019/root/inlinePlayerWrapper.js +23 -0
- package/dist/es2019/root/{styled.js → styles.js} +18 -19
- package/dist/es2019/root/types.js +1 -0
- package/dist/es2019/root/ui/actionsBar/actionsBar.js +2 -2
- package/dist/es2019/root/ui/actionsBar/actionsBarWrapper.js +10 -0
- package/dist/es2019/root/ui/actionsBar/styles.js +15 -0
- package/dist/es2019/root/ui/actionsBar/types.js +1 -0
- package/dist/es2019/root/ui/blanket/blanket.js +12 -0
- package/dist/es2019/root/ui/blanket/styles.js +17 -0
- package/dist/es2019/root/ui/iconMessage/iconMessageWrapper.js +16 -0
- package/dist/es2019/root/ui/iconMessage/index.js +2 -3
- package/dist/es2019/root/ui/iconMessage/styles.js +32 -0
- package/dist/es2019/root/ui/iconMessage/types.js +1 -0
- package/dist/es2019/root/ui/iconWrapper/iconWrapper.js +16 -0
- package/dist/es2019/root/ui/iconWrapper/styles.js +25 -0
- package/dist/es2019/root/ui/iconWrapper/types.js +1 -0
- package/dist/es2019/root/ui/loadingRateLimited/styles.js +41 -0
- package/dist/es2019/root/ui/newFileExperience/newFileExperienceWrapper.js +42 -0
- package/dist/es2019/root/ui/newFileExperience/styles.js +50 -0
- package/dist/es2019/root/ui/newFileExperience/types.js +1 -0
- package/dist/es2019/root/ui/playButton/playButton.js +3 -2
- package/dist/es2019/root/ui/playButton/playButtonBackground.js +9 -0
- package/dist/es2019/root/ui/playButton/playButtonWrapper.js +9 -0
- package/dist/es2019/root/ui/playButton/{styled.js → styles.js} +5 -11
- package/dist/es2019/root/ui/progressBar/progressBar.js +5 -3
- package/dist/es2019/root/ui/progressBar/styledBar.js +20 -0
- package/dist/es2019/root/ui/progressBar/{styled.js → styles.js} +28 -24
- package/dist/es2019/root/ui/progressBar/types.js +1 -0
- package/dist/es2019/root/ui/styles.js +78 -0
- package/dist/es2019/root/ui/tickBox/styles.js +30 -0
- package/dist/es2019/root/ui/tickBox/tickBox.js +2 -2
- package/dist/es2019/root/ui/tickBox/tickBoxWrapper.js +10 -0
- package/dist/es2019/root/ui/tickBox/types.js +1 -0
- package/dist/es2019/root/ui/titleBox/failedTitleBox.js +3 -4
- package/dist/es2019/root/ui/titleBox/styles.js +68 -0
- package/dist/es2019/root/ui/titleBox/titleBox.js +2 -2
- package/dist/es2019/root/ui/titleBox/titleBoxComponents.js +49 -0
- package/dist/es2019/root/ui/titleBox/types.js +1 -0
- package/dist/es2019/styles/animations.js +1 -1
- package/dist/es2019/styles/index.js +4 -4
- package/dist/es2019/types.js +0 -1
- package/dist/es2019/utils/analytics.js +12 -1
- package/dist/es2019/utils/cardActions/cardActionButton.js +13 -0
- package/dist/es2019/utils/cardActions/cardActionIconButton.js +1 -2
- package/dist/es2019/utils/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/es2019/utils/cardActions/cardActionsView.js +9 -6
- package/dist/es2019/utils/cardActions/index.js +1 -1
- package/dist/es2019/utils/cardActions/{styled.js → styles.js} +14 -12
- package/dist/es2019/utils/errorIcon/index.js +7 -3
- package/dist/es2019/utils/errorIcon/styles.js +5 -0
- package/dist/es2019/utils/fileIcon/index.js +7 -5
- package/dist/es2019/utils/fileIcon/{styled.js → styles.js} +2 -2
- package/dist/es2019/utils/getMediaCardCursor.js +6 -2
- package/dist/es2019/utils/lightCards/cardError.js +1 -1
- package/dist/es2019/utils/lightCards/cardLoading.js +1 -1
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +24 -0
- package/dist/es2019/utils/lightCards/{styled.js → styles.js} +16 -9
- package/dist/es2019/utils/mediaTypeIcon/iconWrapper.js +9 -0
- package/dist/es2019/utils/mediaTypeIcon/index.js +1 -1
- package/dist/es2019/utils/mediaTypeIcon/{styled.js → styles.js} +10 -5
- package/dist/es2019/utils/mediaTypeIcon/types.js +1 -0
- package/dist/es2019/utils/progressBar/index.js +6 -3
- package/dist/es2019/utils/progressBar/{styled.js → styles.js} +2 -2
- package/dist/es2019/utils/ufoExperiences.js +15 -14
- package/dist/es2019/version.json +1 -1
- package/dist/esm/files/cardImageView/cardImageViewWrapper.js +41 -0
- package/dist/esm/files/cardImageView/cardOverlay/cardOverlayComponents.js +39 -0
- package/dist/esm/files/cardImageView/cardOverlay/index.js +28 -15
- package/dist/esm/files/cardImageView/cardOverlay/styles.js +46 -0
- package/dist/esm/files/cardImageView/index.js +37 -26
- package/dist/esm/files/cardImageView/styles.js +36 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/root/card/cardAnalytics.js +0 -15
- package/dist/esm/root/card/getCardPreview/cache.js +9 -10
- package/dist/esm/root/card/getCardPreview/helpers.js +1 -1
- package/dist/esm/root/card/getCardPreview/index.js +35 -27
- package/dist/esm/root/card/index.js +23 -18
- package/dist/esm/root/cardView.js +39 -39
- package/dist/esm/root/cardViewWrapper.js +24 -0
- package/dist/esm/root/inline/loader.js +1 -1
- package/dist/esm/root/inlinePlayer.js +10 -8
- package/dist/esm/root/inlinePlayerWrapper.js +21 -0
- package/dist/esm/root/styles.js +36 -0
- package/dist/esm/root/types.js +1 -0
- package/dist/esm/root/ui/actionsBar/actionsBar.js +2 -2
- package/dist/esm/root/ui/actionsBar/actionsBarWrapper.js +10 -0
- package/dist/esm/root/ui/actionsBar/styles.js +12 -0
- package/dist/esm/root/ui/actionsBar/types.js +1 -0
- package/dist/esm/root/ui/blanket/blanket.js +10 -0
- package/dist/esm/root/ui/blanket/styles.js +13 -0
- package/dist/esm/root/ui/iconMessage/iconMessageWrapper.js +14 -0
- package/dist/esm/root/ui/iconMessage/index.js +2 -3
- package/dist/esm/root/ui/iconMessage/styles.js +19 -0
- package/dist/esm/root/ui/iconMessage/types.js +1 -0
- package/dist/esm/root/ui/iconWrapper/iconWrapper.js +14 -0
- package/dist/esm/root/ui/iconWrapper/{styled.js → styles.js} +5 -5
- package/dist/esm/root/ui/iconWrapper/types.js +1 -0
- package/dist/esm/root/ui/loadingRateLimited/styles.js +17 -0
- package/dist/esm/root/ui/newFileExperience/newFileExperienceWrapper.js +40 -0
- package/dist/esm/root/ui/newFileExperience/styles.js +27 -0
- package/dist/esm/root/ui/newFileExperience/types.js +1 -0
- package/dist/esm/root/ui/playButton/playButton.js +3 -2
- package/dist/esm/root/ui/playButton/playButtonBackground.js +9 -0
- package/dist/esm/root/ui/playButton/playButtonWrapper.js +9 -0
- package/dist/esm/root/ui/playButton/styles.js +13 -0
- package/dist/esm/root/ui/progressBar/progressBar.js +5 -3
- package/dist/esm/root/ui/progressBar/styledBar.js +18 -0
- package/dist/esm/root/ui/progressBar/{styled.js → styles.js} +10 -5
- package/dist/esm/root/ui/progressBar/types.js +1 -0
- package/dist/esm/root/ui/styles.js +72 -0
- package/dist/esm/root/ui/tickBox/styles.js +16 -0
- package/dist/esm/root/ui/tickBox/tickBox.js +2 -2
- package/dist/esm/root/ui/tickBox/tickBoxWrapper.js +10 -0
- package/dist/esm/root/ui/tickBox/types.js +1 -0
- package/dist/esm/root/ui/titleBox/failedTitleBox.js +3 -4
- package/dist/esm/root/ui/titleBox/styles.js +39 -0
- package/dist/esm/root/ui/titleBox/titleBox.js +2 -2
- package/dist/esm/root/ui/titleBox/titleBoxComponents.js +43 -0
- package/dist/esm/root/ui/titleBox/types.js +1 -0
- package/dist/esm/styles/animations.js +1 -1
- package/dist/esm/styles/index.js +8 -4
- package/dist/esm/types.js +0 -1
- package/dist/esm/utils/analytics.js +12 -1
- package/dist/esm/utils/cardActions/cardActionButton.js +13 -0
- package/dist/esm/utils/cardActions/cardActionIconButton.js +1 -2
- package/dist/esm/utils/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/esm/utils/cardActions/cardActionsView.js +9 -6
- package/dist/esm/utils/cardActions/index.js +1 -1
- package/dist/esm/utils/cardActions/{styled.js → styles.js} +6 -6
- package/dist/esm/utils/errorIcon/index.js +6 -3
- package/dist/esm/utils/errorIcon/styles.js +6 -0
- package/dist/esm/utils/fileIcon/index.js +7 -5
- package/dist/esm/utils/fileIcon/styles.js +7 -0
- package/dist/esm/utils/getMediaCardCursor.js +6 -2
- package/dist/esm/utils/lightCards/cardError.js +1 -1
- package/dist/esm/utils/lightCards/cardLoading.js +1 -1
- package/dist/esm/utils/lightCards/lightCardWrappers.js +24 -0
- package/dist/esm/utils/lightCards/styles.js +28 -0
- package/dist/esm/utils/mediaTypeIcon/iconWrapper.js +9 -0
- package/dist/esm/utils/mediaTypeIcon/index.js +1 -1
- package/dist/esm/utils/mediaTypeIcon/{styled.js → styles.js} +8 -3
- package/dist/esm/utils/mediaTypeIcon/types.js +1 -0
- package/dist/esm/utils/progressBar/index.js +6 -3
- package/dist/esm/utils/progressBar/styles.js +7 -0
- package/dist/esm/utils/ufoExperiences.js +15 -14
- package/dist/esm/utils/videoSnapshot.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/files/cardImageView/cardImageViewWrapper.d.ts +6 -0
- package/dist/types/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
- package/dist/types/files/cardImageView/cardOverlay/index.d.ts +6 -4
- package/dist/types/files/cardImageView/cardOverlay/styles.d.ts +26 -0
- package/dist/types/files/cardImageView/index.d.ts +3 -1
- package/dist/types/files/cardImageView/styles.d.ts +24 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/root/card/cardAnalytics.d.ts +0 -10
- package/dist/types/root/card/getCardPreview/cache.d.ts +9 -8
- package/dist/types/root/card/getCardPreview/index.d.ts +7 -5
- package/dist/types/root/cardView.d.ts +5 -3
- package/dist/types/root/cardViewWrapper.d.ts +4 -0
- package/dist/types/root/inlinePlayer.d.ts +1 -1
- package/dist/types/root/inlinePlayerWrapper.d.ts +4 -0
- package/dist/types/root/styles.d.ts +10 -0
- package/dist/types/root/types.d.ts +24 -0
- package/dist/types/root/ui/actionsBar/actionsBar.d.ts +1 -5
- package/dist/types/root/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
- package/dist/types/root/ui/actionsBar/styles.d.ts +6 -0
- package/dist/types/root/ui/actionsBar/types.d.ts +10 -0
- package/dist/types/root/ui/blanket/blanket.d.ts +6 -0
- package/dist/types/root/ui/blanket/styles.d.ts +6 -0
- package/dist/types/root/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
- package/dist/types/root/ui/iconMessage/index.d.ts +1 -10
- package/dist/types/root/ui/iconMessage/styles.d.ts +5 -0
- package/dist/types/root/ui/iconMessage/types.d.ts +19 -0
- package/dist/types/root/ui/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/types/root/ui/iconWrapper/styles.d.ts +7 -0
- package/dist/types/root/ui/iconWrapper/types.d.ts +6 -0
- package/dist/types/root/ui/loadingRateLimited/styles.d.ts +13 -0
- package/dist/types/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
- package/dist/types/root/ui/newFileExperience/styles.d.ts +5 -0
- package/dist/types/root/ui/newFileExperience/types.d.ts +23 -0
- package/dist/types/root/ui/playButton/playButtonBackground.d.ts +3 -0
- package/dist/types/root/ui/playButton/playButtonWrapper.d.ts +3 -0
- package/dist/types/root/ui/playButton/styles.d.ts +5 -0
- package/dist/types/root/ui/progressBar/progressBar.d.ts +1 -0
- package/dist/types/root/ui/progressBar/styledBar.d.ts +4 -0
- package/dist/types/root/ui/progressBar/styles.d.ts +7 -0
- package/dist/types/root/ui/progressBar/types.d.ts +7 -0
- package/dist/types/root/ui/styles.d.ts +11 -0
- package/dist/types/root/ui/tickBox/styles.d.ts +7 -0
- package/dist/types/root/ui/tickBox/tickBox.d.ts +1 -3
- package/dist/types/root/ui/tickBox/tickBoxWrapper.d.ts +4 -0
- package/dist/types/root/ui/tickBox/types.d.ts +4 -0
- package/dist/types/root/ui/titleBox/failedTitleBox.d.ts +1 -7
- package/dist/types/root/ui/titleBox/styles.d.ts +15 -0
- package/dist/types/root/ui/titleBox/titleBox.d.ts +1 -13
- package/dist/types/root/ui/titleBox/titleBoxComponents.d.ts +8 -0
- package/dist/types/root/ui/titleBox/types.d.ts +32 -0
- package/dist/types/styles/animations.d.ts +1 -1
- package/dist/types/styles/index.d.ts +3 -4
- package/dist/types/styles/mixins.d.ts +2 -2
- package/dist/types/types.d.ts +2 -1
- package/dist/types/utils/analytics.d.ts +2 -0
- package/dist/types/utils/cardActions/cardActionButton.d.ts +4 -0
- package/dist/types/utils/cardActions/cardActionIconButton.d.ts +1 -1
- package/dist/types/utils/cardActions/cardActionsDropdownMenu.d.ts +1 -1
- package/dist/types/utils/cardActions/cardActionsView.d.ts +1 -1
- package/dist/types/utils/cardActions/index.d.ts +1 -1
- package/dist/types/utils/cardActions/styles.d.ts +18 -0
- package/dist/types/utils/errorIcon/index.d.ts +3 -1
- package/dist/types/utils/errorIcon/styles.d.ts +1 -0
- package/dist/types/utils/fileIcon/index.d.ts +3 -1
- package/dist/types/utils/fileIcon/styles.d.ts +1 -0
- package/dist/types/utils/getMediaCardCursor.d.ts +4 -1
- package/dist/types/utils/lightCards/lightCardWrappers.d.ts +5 -0
- package/dist/types/utils/lightCards/styles.d.ts +4 -0
- package/dist/types/utils/lightCards/types.d.ts +8 -0
- package/dist/types/utils/mediaTypeIcon/iconWrapper.d.ts +4 -0
- package/dist/types/utils/mediaTypeIcon/styles.d.ts +2 -0
- package/dist/types/utils/mediaTypeIcon/types.d.ts +6 -0
- package/dist/types/utils/progressBar/index.d.ts +3 -1
- package/dist/types/utils/progressBar/styles.d.ts +1 -0
- package/dist/types/utils/ufoExperiences.d.ts +2 -2
- package/example-helpers/cardViewWrapper.tsx +26 -0
- package/example-helpers/cards.tsx +417 -0
- package/example-helpers/index.tsx +20 -9
- package/example-helpers/styles.ts +115 -0
- package/package.json +11 -11
- package/report.api.md +269 -0
- package/dist/cjs/files/cardImageView/cardOverlay/styled.js +0 -86
- package/dist/cjs/files/cardImageView/styled.js +0 -73
- package/dist/cjs/root/styled.js +0 -58
- package/dist/cjs/root/ui/actionsBar/styled.js +0 -31
- package/dist/cjs/root/ui/blanket/styled.js +0 -33
- package/dist/cjs/root/ui/iconMessage/styled.js +0 -34
- package/dist/cjs/root/ui/loadingRateLimited/loadingRateLimited.js +0 -35
- package/dist/cjs/root/ui/loadingRateLimited/styled.js +0 -43
- package/dist/cjs/root/ui/playButton/styled.js +0 -38
- package/dist/cjs/root/ui/tickBox/styled.js +0 -37
- package/dist/cjs/root/ui/titleBox/styled.js +0 -67
- package/dist/cjs/utils/errorIcon/styled.js +0 -18
- package/dist/cjs/utils/fileIcon/styled.js +0 -20
- package/dist/cjs/utils/lightCards/styled.js +0 -43
- package/dist/cjs/utils/progressBar/styled.js +0 -20
- package/dist/es2019/root/ui/actionsBar/styled.js +0 -23
- package/dist/es2019/root/ui/blanket/styled.js +0 -25
- package/dist/es2019/root/ui/iconMessage/styled.js +0 -30
- package/dist/es2019/root/ui/iconWrapper/styled.js +0 -27
- package/dist/es2019/root/ui/loadingRateLimited/loadingRateLimited.js +0 -16
- package/dist/es2019/root/ui/loadingRateLimited/styled.js +0 -43
- package/dist/es2019/root/ui/styled.js +0 -134
- package/dist/es2019/root/ui/tickBox/styled.js +0 -41
- package/dist/es2019/root/ui/titleBox/styled.js +0 -79
- package/dist/es2019/utils/errorIcon/styled.js +0 -5
- package/dist/esm/files/cardImageView/cardOverlay/styled.js +0 -39
- package/dist/esm/files/cardImageView/styled.js +0 -34
- package/dist/esm/root/styled.js +0 -36
- package/dist/esm/root/ui/actionsBar/styled.js +0 -15
- package/dist/esm/root/ui/blanket/styled.js +0 -16
- package/dist/esm/root/ui/iconMessage/styled.js +0 -15
- package/dist/esm/root/ui/loadingRateLimited/loadingRateLimited.js +0 -17
- package/dist/esm/root/ui/loadingRateLimited/styled.js +0 -17
- package/dist/esm/root/ui/playButton/styled.js +0 -19
- package/dist/esm/root/ui/styled.js +0 -98
- package/dist/esm/root/ui/tickBox/styled.js +0 -21
- package/dist/esm/root/ui/titleBox/styled.js +0 -40
- package/dist/esm/utils/errorIcon/styled.js +0 -6
- package/dist/esm/utils/fileIcon/styled.js +0 -7
- package/dist/esm/utils/lightCards/styled.js +0 -19
- package/dist/esm/utils/progressBar/styled.js +0 -7
- package/dist/types/files/cardImageView/cardOverlay/styled.d.ts +0 -23
- package/dist/types/files/cardImageView/styled.d.ts +0 -276
- package/dist/types/root/styled.d.ts +0 -16
- package/dist/types/root/ui/actionsBar/styled.d.ts +0 -10
- package/dist/types/root/ui/blanket/styled.d.ts +0 -10
- package/dist/types/root/ui/iconMessage/styled.d.ts +0 -6
- package/dist/types/root/ui/iconWrapper/styled.d.ts +0 -8
- package/dist/types/root/ui/loadingRateLimited/loadingRateLimited.d.ts +0 -6
- package/dist/types/root/ui/loadingRateLimited/styled.d.ts +0 -11
- package/dist/types/root/ui/playButton/styled.d.ts +0 -9
- package/dist/types/root/ui/progressBar/styled.d.ts +0 -10
- package/dist/types/root/ui/styled.d.ts +0 -20
- package/dist/types/root/ui/tickBox/styled.d.ts +0 -10
- package/dist/types/root/ui/titleBox/styled.d.ts +0 -18
- package/dist/types/utils/cardActions/styled.d.ts +0 -12
- package/dist/types/utils/errorIcon/styled.d.ts +0 -2
- package/dist/types/utils/fileIcon/styled.d.ts +0 -2
- package/dist/types/utils/lightCards/styled.d.ts +0 -8
- package/dist/types/utils/mediaTypeIcon/styled.d.ts +0 -6
- package/dist/types/utils/progressBar/styled.d.ts +0 -2
- package/example-helpers/styled.ts +0 -137
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Everything about this file change is just wrong.
|
|
7
|
+
* Mostly because we do bad things with classes.
|
|
8
|
+
* This is all wrong and hopefully will be removed from existence with card v3,
|
|
9
|
+
* so please don’t be too sad about all this!
|
|
10
|
+
*/
|
|
11
|
+
import { css } from '@emotion/react';
|
|
12
|
+
import { borderRadius, size, ellipsis, absolute } from '@atlaskit/media-ui';
|
|
13
|
+
import { themed } from '@atlaskit/theme/components';
|
|
14
|
+
import * as colors from '@atlaskit/theme/colors';
|
|
15
|
+
import { rgba, centerX, easeOutCubic, transition, antialiased } from '../../../styles';
|
|
16
|
+
export var tickBoxStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n top: 8px;\n right: 8px;\n border-radius: 20px;\n color: #798599; /* TODO FIL-3884: Align color with new design */\n display: flex;\n opacity: 0;\n\n &.selected {\n opacity: 1;\n color: white;\n background-color: #0052cc; /* TODO FIL-3884: Align with tickbox icons */\n }\n\n /* Enforce dimensions of \"tick\" icon */\n svg {\n position: absolute;\n width: 14px;\n }\n"])), size(14), transition(), rgba('#ffffff', 0.5));
|
|
17
|
+
|
|
18
|
+
var getOverlayStyles = function getOverlayStyles(_ref) {
|
|
19
|
+
var hasError = _ref.hasError,
|
|
20
|
+
noHover = _ref.noHover;
|
|
21
|
+
|
|
22
|
+
if (hasError || noHover) {
|
|
23
|
+
return "\n cursor: default;\n\n &:hover {\n background: transparent;\n }\n ";
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export var overlayStyles = function overlayStyles(props) {
|
|
28
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", " display: flex;\n justify-content: space-between;\n flex-direction: column;\n background: transparent;\n transition: 0.3s background ", ", 0.3s border-color;\n padding: 16px;\n\n ", "\n &:not(.persistent):hover, &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n\n .bottom-row {\n .delete-btn {\n display: flex;\n }\n }\n }\n\n &.noHover:hover {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n .file-type-icon {\n display: block;\n }\n\n &:not(.persistent) {\n &:not(.error, .noHover):hover {\n background-color: ", ";\n }\n\n &.selectable {\n &.selected {\n background-color: ", ";\n\n &:hover {\n /* TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */\n }\n\n .title,\n .bottom-row,\n .file-size,\n .more-btn {\n color: ", ";\n }\n }\n }\n }\n\n &.persistent {\n &:not(.active) {\n overflow: hidden;\n }\n\n .top-row {\n .title {\n transition: opacity 0.3s;\n opacity: 0;\n color: white;\n visibility: hidden;\n }\n }\n\n .bottom-row {\n opacity: 0;\n transition: transform 0.2s, opacity 0.5s;\n /* This is the height of the overlay footer, needs to be present now since the parent uses flex and 100% doesn't look right anymore */\n transform: translateY(35px);\n\n .file-type-icon {\n display: none;\n }\n\n .file-size {\n color: white;\n display: none;\n }\n\n .more-btn {\n color: ", ";\n display: none;\n\n &:hover {\n background-color: rgba(9, 30, 66, 0.2);\n }\n }\n\n .delete-btn {\n display: none;\n\n &:hover {\n background-color: rgba(9, 30, 66, 0.2);\n }\n }\n }\n\n &:hover,\n &.active {\n background-color: ", ";\n\n .title {\n opacity: 1;\n visibility: visible;\n }\n\n .file-type-icon,\n .file-size {\n display: block;\n }\n\n .more-btn {\n ", " color: ", ";\n }\n\n .delete-btn {\n display: flex;\n }\n\n .bottom-row {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Selectable */\n &.selectable {\n &:hover {\n .tickbox {\n opacity: 1;\n }\n }\n\n &.selected {\n .tickbox {\n background-color: ", " !important;\n border-color: ", " !important;\n color: white;\n }\n }\n }\n }\n\n &.error {\n .top-row {\n overflow: visible;\n }\n &:hover,\n &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n }\n"])), size(), absolute(), borderRadius, easeOutCubic, getOverlayStyles(props), colors.B400, colors.N800, rgba(colors.N900, 0.06), colors.B200, colors.N0, colors.N0, rgba(colors.N900, 0.5), centerX, colors.N0, colors.B200, colors.B200, colors.N800);
|
|
29
|
+
};
|
|
30
|
+
export var errorLineStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 24px;\n display: flex;\n align-items: center;\n"])));
|
|
31
|
+
export var leftColumnStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n box-sizing: border-box;\n vertical-align: middle;\n"])));
|
|
32
|
+
export var topRowStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
|
|
33
|
+
export var bottomRowStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 16px;\n"])));
|
|
34
|
+
export var rightColumnStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""])));
|
|
35
|
+
export var errorMessageStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", " display: inline-block;\n vertical-align: middle;\n font-weight: bold;\n color: ", ";\n font-size: 12px;\n line-height: 15px;\n overflow: hidden;\n max-width: 'calc(100% - 24px)';\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: auto 3px;\n"])), antialiased, colors.N70);
|
|
36
|
+
export var altWrapperStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n font-weight: normal;\n"])), errorMessageStyles);
|
|
37
|
+
export var titleWrapperStyles = function titleWrapperStyles(theme) {
|
|
38
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n word-wrap: break-word;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n"])), themed({
|
|
39
|
+
light: colors.N800,
|
|
40
|
+
dark: colors.DN900
|
|
41
|
+
})({
|
|
42
|
+
theme: theme
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: #5e6c84;\n"])), ellipsis('100px'));
|
|
46
|
+
export var metadataStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
|
|
@@ -10,17 +10,19 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
|
+
/**@jsx jsx */
|
|
14
|
+
import { jsx } from '@emotion/react';
|
|
13
15
|
import React from 'react';
|
|
14
16
|
import { Component } from 'react';
|
|
15
17
|
import { Ellipsify, MediaImage } from '@atlaskit/media-ui';
|
|
16
18
|
import VidPlayIcon from '@atlaskit/icon/glyph/vid-play';
|
|
17
19
|
import { CardOverlay } from './cardOverlay';
|
|
18
|
-
import {
|
|
20
|
+
import { bodyStyles, cardActionsWrapperStyles, overlayStyles, progressWrapperStyles, titleStyles, playIconBackgroundStyles } from './styles';
|
|
19
21
|
import { CardLoading } from '../../utils/lightCards/cardLoading';
|
|
20
22
|
import { shouldDisplayImageThumbnail } from '../../utils/shouldDisplayImageThumbnail';
|
|
21
23
|
import { ProgressBar } from '../../utils/progressBar';
|
|
22
24
|
import CardActions from '../../utils/cardActions';
|
|
23
|
-
import {
|
|
25
|
+
import { CardImageViewWrapper, PlayIconWrapper, ProgressBarWrapper } from './cardImageViewWrapper';
|
|
24
26
|
export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
25
27
|
_inherits(FileCardImageView, _Component);
|
|
26
28
|
|
|
@@ -63,11 +65,11 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
63
65
|
});
|
|
64
66
|
|
|
65
67
|
_defineProperty(_assertThisInitialized(_this), "renderLoadingContents", function () {
|
|
66
|
-
return
|
|
68
|
+
return jsx("div", {
|
|
67
69
|
className: "wrapper"
|
|
68
|
-
},
|
|
70
|
+
}, jsx("div", {
|
|
69
71
|
className: "img-wrapper"
|
|
70
|
-
},
|
|
72
|
+
}, jsx(CardLoading, null)));
|
|
71
73
|
});
|
|
72
74
|
|
|
73
75
|
_defineProperty(_assertThisInitialized(_this), "renderErrorContents", function () {
|
|
@@ -79,9 +81,9 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
79
81
|
mediaType = _this$props2.mediaType,
|
|
80
82
|
actions = _this$props2.actions,
|
|
81
83
|
fileSize = _this$props2.fileSize;
|
|
82
|
-
return
|
|
84
|
+
return jsx(React.Fragment, null, jsx("div", {
|
|
83
85
|
className: "wrapper"
|
|
84
|
-
}),
|
|
86
|
+
}), jsx(CardOverlay, {
|
|
85
87
|
cardStatus: status,
|
|
86
88
|
error: error,
|
|
87
89
|
persistent: true,
|
|
@@ -100,9 +102,9 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
100
102
|
mediaType = _this$props3.mediaType,
|
|
101
103
|
actions = _this$props3.actions,
|
|
102
104
|
fileSize = _this$props3.fileSize;
|
|
103
|
-
return
|
|
105
|
+
return jsx(React.Fragment, null, jsx("div", {
|
|
104
106
|
className: "wrapper"
|
|
105
|
-
}),
|
|
107
|
+
}), jsx(CardOverlay, {
|
|
106
108
|
cardStatus: status,
|
|
107
109
|
noHover: true,
|
|
108
110
|
persistent: true,
|
|
@@ -122,7 +124,7 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
122
124
|
selectable = _this$props4.selectable,
|
|
123
125
|
selected = _this$props4.selected;
|
|
124
126
|
var isPersistent = mediaType === 'doc' || !dataURI;
|
|
125
|
-
return
|
|
127
|
+
return jsx(CardOverlay, {
|
|
126
128
|
cardStatus: status,
|
|
127
129
|
persistent: isPersistent,
|
|
128
130
|
mediaName: mediaName,
|
|
@@ -148,7 +150,9 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
148
150
|
return null;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
|
-
return
|
|
153
|
+
return jsx(PlayIconWrapper, null, jsx("div", {
|
|
154
|
+
css: playIconBackgroundStyles
|
|
155
|
+
}, jsx(VidPlayIcon, {
|
|
152
156
|
testId: "media-card-play-button",
|
|
153
157
|
label: "play",
|
|
154
158
|
size: "large"
|
|
@@ -189,7 +193,7 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
189
193
|
_this.wasThumbnailDisplayed = true;
|
|
190
194
|
}
|
|
191
195
|
|
|
192
|
-
return
|
|
196
|
+
return jsx(MediaImage, {
|
|
193
197
|
dataURI: dataURI,
|
|
194
198
|
alt: alt,
|
|
195
199
|
crop: _this.isCropped,
|
|
@@ -211,13 +215,23 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
211
215
|
return null;
|
|
212
216
|
}
|
|
213
217
|
|
|
214
|
-
return
|
|
218
|
+
return jsx(ProgressBarWrapper, null, jsx("div", {
|
|
219
|
+
css: overlayStyles
|
|
220
|
+
}, jsx("div", {
|
|
221
|
+
css: titleStyles
|
|
222
|
+
}, jsx(Ellipsify, {
|
|
215
223
|
testId: "media-card-file-name",
|
|
216
224
|
text: mediaName || '',
|
|
217
225
|
lines: 2
|
|
218
|
-
})),
|
|
226
|
+
})), jsx("div", {
|
|
227
|
+
css: bodyStyles
|
|
228
|
+
}, jsx("div", {
|
|
229
|
+
css: progressWrapperStyles
|
|
230
|
+
}, jsx(ProgressBar, {
|
|
219
231
|
progress: progress
|
|
220
|
-
})),
|
|
232
|
+
})), jsx("div", {
|
|
233
|
+
css: cardActionsWrapperStyles
|
|
234
|
+
}, actions ? jsx(CardActions, {
|
|
221
235
|
actions: actions,
|
|
222
236
|
triggerColor: "white"
|
|
223
237
|
}) : null))));
|
|
@@ -240,9 +254,9 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
240
254
|
}
|
|
241
255
|
}
|
|
242
256
|
|
|
243
|
-
return
|
|
257
|
+
return jsx("div", {
|
|
244
258
|
className: "wrapper"
|
|
245
|
-
},
|
|
259
|
+
}, jsx("div", {
|
|
246
260
|
className: "img-wrapper"
|
|
247
261
|
}, _this.renderMediaImage(), _this.renderProgressBar(), _this.renderPlayButton()), overlay);
|
|
248
262
|
});
|
|
@@ -258,7 +272,7 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
258
272
|
selected = _this$props11.selected,
|
|
259
273
|
actions = _this$props11.actions;
|
|
260
274
|
var isPersistent = mediaType === 'doc' || !dataURI;
|
|
261
|
-
return
|
|
275
|
+
return jsx(CardOverlay, {
|
|
262
276
|
cardStatus: status,
|
|
263
277
|
persistent: isPersistent,
|
|
264
278
|
mediaName: mediaName,
|
|
@@ -284,17 +298,14 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
284
298
|
progress = _this$props12.progress,
|
|
285
299
|
status = _this$props12.status,
|
|
286
300
|
mediaName = _this$props12.mediaName;
|
|
287
|
-
return
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
"data-test-progress": progress,
|
|
292
|
-
"data-test-selected": selected ? true : undefined,
|
|
301
|
+
return jsx(CardImageViewWrapper, {
|
|
302
|
+
mediaName: mediaName,
|
|
303
|
+
status: status,
|
|
304
|
+
progress: progress,
|
|
293
305
|
disableOverlay: disableOverlay,
|
|
294
306
|
selectable: selectable,
|
|
295
307
|
selected: selected,
|
|
296
|
-
mediaType: mediaType
|
|
297
|
-
className: "".concat(fileCardImageViewSelector, " ").concat(selected ? fileCardImageViewSelectedSelector : '')
|
|
308
|
+
mediaType: mediaType
|
|
298
309
|
}, this.renderCardContents());
|
|
299
310
|
}
|
|
300
311
|
}, {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
4
|
+
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { absolute, borderRadius, size } from '@atlaskit/media-ui';
|
|
7
|
+
import { themed } from '@atlaskit/theme/components';
|
|
8
|
+
import { N20, DN50, N0 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { rootStyles, cardShadow } from '../../styles';
|
|
10
|
+
import { getSelectedBorderStyle } from '../../styles/getSelectedBorderStyle';
|
|
11
|
+
|
|
12
|
+
var getShadowAttribute = function getShadowAttribute(props) {
|
|
13
|
+
var disableOverlay = props.disableOverlay;
|
|
14
|
+
return disableOverlay ? '' : cardShadow;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var getBackgroundColor = function getBackgroundColor(props) {
|
|
18
|
+
var mediaType = props.mediaType;
|
|
19
|
+
return "background: ".concat(mediaType === 'image' ? 'transparent' : themed({
|
|
20
|
+
light: N20,
|
|
21
|
+
dark: DN50
|
|
22
|
+
})(props), ";");
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export var wrapperStyles = function wrapperStyles(props) {
|
|
26
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n ", "\n\n line-height: normal;\n position: relative;\n\n ", "\n\n ", " .wrapper {\n ", ";\n display: block;\n height: inherit;\n position: relative;\n\n .img-wrapper {\n position: relative;\n width: inherit;\n height: inherit;\n overflow: hidden;\n display: block;\n ", "\n }\n }\n"])), rootStyles(), getShadowAttribute(props), borderRadius, getBackgroundColor(props), getSelectedBorderStyle(props), size(), borderRadius, borderRadius);
|
|
27
|
+
};
|
|
28
|
+
export var playIconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n\n /* we want to override default icon size and hover state */\n &:hover > * {\n width: 64px;\n height: 64px;\n }\n"])));
|
|
29
|
+
export var playIconBackgroundStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: rgba(23, 43, 77, 0.7);\n border-radius: 100%;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-property: width, height;\n transition-duration: 0.1s;\n width: 56px;\n height: 56px;\n"])));
|
|
30
|
+
var bodyHeight = 26;
|
|
31
|
+
export var progressBarWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n"])));
|
|
32
|
+
export var overlayStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-radius: inherit;\n background-color: rgba(9, 30, 66, 0.5);\n"])), absolute(), size());
|
|
33
|
+
export var titleStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " width: 100%;\n padding: 8px;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n word-wrap: break-word;\n"])), absolute(), N0);
|
|
34
|
+
export var bodyStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n bottom: 0;\n width: 100%;\n padding: 8px;\n color: ", ";\n"])), N0);
|
|
35
|
+
export var progressWrapperStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n flex-grow: 1;\n\n /*\n force the height to always be 20px (the height of the cancel icon),\n so that the height of the progress bar doesn't jump when cards with\n and without a cancel icon are rendered side-by-side.\n */\n height: ", "px;\n\n /*\n vertically center the progress bar within the 20px, keeping the progress bar full width\n */\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])), bodyHeight);
|
|
36
|
+
export var cardActionsWrapperStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-left: 4px;\n /*\n button must appear above overlay\n */\n z-index: 2;\n"])));
|
package/dist/esm/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { CardLoading } from './utils/lightCards/cardLoading';
|
|
|
3
3
|
export { CardError } from './utils/lightCards/cardError';
|
|
4
4
|
export { defaultImageCardDimensions } from './utils/cardDimensions';
|
|
5
5
|
export { fileCardImageViewSelector, fileCardImageViewSelectedSelector } from './files/cardImageView/classnames';
|
|
6
|
-
export { inlinePlayerClassName } from './root/
|
|
6
|
+
export { inlinePlayerClassName } from './root/styles';
|
|
7
7
|
export { newFileExperienceClassName } from './root/card/cardConstants';
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import { filterFeatureFlagNames, filterFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
2
1
|
import { fireMediaCardEvent, getRenderSucceededEventPayload, getRenderErrorEventPayload, getRenderFailedFileStatusPayload, getCopiedFilePayload, getRenderCommencedEventPayload, getRenderPreviewableCardPayload } from '../../utils/analytics';
|
|
3
|
-
export var REQUIRED_FEATURE_FLAGS = {
|
|
4
|
-
newCardExperience: true,
|
|
5
|
-
captions: true,
|
|
6
|
-
timestampOnVideo: true,
|
|
7
|
-
observedWidth: true,
|
|
8
|
-
mediaInline: false,
|
|
9
|
-
folderUploads: false
|
|
10
|
-
};
|
|
11
|
-
export var getRelevantFeatureFlagNames = function getRelevantFeatureFlagNames() {
|
|
12
|
-
return filterFeatureFlagNames(REQUIRED_FEATURE_FLAGS);
|
|
13
|
-
};
|
|
14
|
-
export var getRelevantFeatureFlagKeysWithAllProducts = function getRelevantFeatureFlagKeysWithAllProducts() {
|
|
15
|
-
return filterFeatureFlagKeysAllProducts(REQUIRED_FEATURE_FLAGS);
|
|
16
|
-
};
|
|
17
2
|
export var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability, error) {
|
|
18
3
|
var fireEvent = function fireEvent(payload) {
|
|
19
4
|
return fireMediaCardEvent(payload, createAnalyticsEvent);
|
|
@@ -2,29 +2,28 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import { createObjectURLCache } from '../../../utils/objectURLCache';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return [id, dimensions.height, dimensions.width].join('-');
|
|
5
|
+
export var getCacheKey = function getCacheKey(id, mode) {
|
|
6
|
+
var resizeMode = mode || 'crop';
|
|
7
|
+
return [id, resizeMode].join('-');
|
|
9
8
|
};
|
|
10
9
|
export var CardPreviewCacheImpl = /*#__PURE__*/_createClass(function CardPreviewCacheImpl(previewCache) {
|
|
11
10
|
var _this = this;
|
|
12
11
|
|
|
13
12
|
_classCallCheck(this, CardPreviewCacheImpl);
|
|
14
13
|
|
|
15
|
-
_defineProperty(this, "get", function (id,
|
|
16
|
-
var cacheKey = getCacheKey(id,
|
|
14
|
+
_defineProperty(this, "get", function (id, mode) {
|
|
15
|
+
var cacheKey = getCacheKey(id, mode);
|
|
17
16
|
return _this.previewCache.get(cacheKey);
|
|
18
17
|
});
|
|
19
18
|
|
|
20
|
-
_defineProperty(this, "set", function (id,
|
|
21
|
-
var cacheKey = getCacheKey(id,
|
|
19
|
+
_defineProperty(this, "set", function (id, mode, cardPreview) {
|
|
20
|
+
var cacheKey = getCacheKey(id, mode);
|
|
22
21
|
|
|
23
22
|
_this.previewCache.set(cacheKey, cardPreview);
|
|
24
23
|
});
|
|
25
24
|
|
|
26
|
-
_defineProperty(this, "remove", function (id,
|
|
27
|
-
var cacheKey = getCacheKey(id,
|
|
25
|
+
_defineProperty(this, "remove", function (id, mode) {
|
|
26
|
+
var cacheKey = getCacheKey(id, mode);
|
|
28
27
|
|
|
29
28
|
_this.previewCache.remove(cacheKey);
|
|
30
29
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { takeSnapshot } from '../../../utils/videoSnapshot';
|
|
4
4
|
import { getMediaTypeFromMimeType } from '@atlaskit/media-common';
|
|
5
5
|
import { getOrientation } from '@atlaskit/media-ui';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
@@ -26,7 +26,7 @@ export var getFilePreviewFromFileState = function getFilePreviewFromFileState(fi
|
|
|
26
26
|
return 'mimeType' in fileState && isMimeTypeSupportedByBrowser(fileState.mimeType) && isPreviewableFileState(fileState) ? fileState.preview : undefined;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
var extendAndCachePreview = function extendAndCachePreview(id,
|
|
29
|
+
var extendAndCachePreview = function extendAndCachePreview(id, mode, preview, mediaBlobUrlAttrs) {
|
|
30
30
|
var source;
|
|
31
31
|
|
|
32
32
|
switch (preview.source) {
|
|
@@ -53,7 +53,7 @@ var extendAndCachePreview = function extendAndCachePreview(id, dimensions, previ
|
|
|
53
53
|
|
|
54
54
|
var dataURI = mediaBlobUrlAttrs ? addFileAttrsToUrl(preview.dataURI, mediaBlobUrlAttrs) : preview.dataURI; // We store new cardPreview into cache
|
|
55
55
|
|
|
56
|
-
cardPreviewCache.set(id,
|
|
56
|
+
cardPreviewCache.set(id, mode, _objectSpread(_objectSpread({}, preview), {}, {
|
|
57
57
|
source: source,
|
|
58
58
|
dataURI: dataURI
|
|
59
59
|
}));
|
|
@@ -75,44 +75,48 @@ var extendAndCachePreview = function extendAndCachePreview(id, dimensions, previ
|
|
|
75
75
|
|
|
76
76
|
export var getCardPreview = /*#__PURE__*/function () {
|
|
77
77
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
78
|
-
var mediaClient, id, _ref$dimensions, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, cachedPreview, localPreview;
|
|
78
|
+
var mediaClient, id, _ref$dimensions, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, mode, cachedPreview, dimensionsAreBigger, localPreview;
|
|
79
79
|
|
|
80
80
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
81
81
|
while (1) {
|
|
82
82
|
switch (_context.prev = _context.next) {
|
|
83
83
|
case 0:
|
|
84
84
|
mediaClient = _ref.mediaClient, id = _ref.id, _ref$dimensions = _ref.dimensions, dimensions = _ref$dimensions === void 0 ? {} : _ref$dimensions, filePreview = _ref.filePreview, onLocalPreviewError = _ref.onLocalPreviewError, isRemotePreviewReady = _ref.isRemotePreviewReady, imageUrlParams = _ref.imageUrlParams, mediaBlobUrlAttrs = _ref.mediaBlobUrlAttrs;
|
|
85
|
-
|
|
85
|
+
mode = imageUrlParams.mode;
|
|
86
|
+
cachedPreview = cardPreviewCache.get(id, mode);
|
|
87
|
+
dimensionsAreBigger = isBigger(cachedPreview === null || cachedPreview === void 0 ? void 0 : cachedPreview.dimensions, dimensions);
|
|
86
88
|
|
|
87
|
-
if (!cachedPreview) {
|
|
88
|
-
_context.next =
|
|
89
|
+
if (!(cachedPreview && !dimensionsAreBigger)) {
|
|
90
|
+
_context.next = 6;
|
|
89
91
|
break;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
return _context.abrupt("return", cachedPreview);
|
|
93
95
|
|
|
94
|
-
case
|
|
95
|
-
_context.prev =
|
|
96
|
+
case 6:
|
|
97
|
+
_context.prev = 6;
|
|
96
98
|
|
|
97
99
|
if (!filePreview) {
|
|
98
|
-
_context.next =
|
|
100
|
+
_context.next = 12;
|
|
99
101
|
break;
|
|
100
102
|
}
|
|
101
103
|
|
|
102
|
-
_context.next =
|
|
104
|
+
_context.next = 10;
|
|
103
105
|
return getCardPreviewFromFilePreview(filePreview);
|
|
104
106
|
|
|
105
|
-
case
|
|
107
|
+
case 10:
|
|
106
108
|
localPreview = _context.sent;
|
|
107
|
-
return _context.abrupt("return", extendAndCachePreview(id,
|
|
109
|
+
return _context.abrupt("return", extendAndCachePreview(id, mode, _objectSpread(_objectSpread({}, localPreview), {}, {
|
|
110
|
+
dimensions: dimensions
|
|
111
|
+
}), mediaBlobUrlAttrs));
|
|
108
112
|
|
|
109
|
-
case
|
|
110
|
-
_context.next =
|
|
113
|
+
case 12:
|
|
114
|
+
_context.next = 19;
|
|
111
115
|
break;
|
|
112
116
|
|
|
113
|
-
case
|
|
114
|
-
_context.prev =
|
|
115
|
-
_context.t0 = _context["catch"](
|
|
117
|
+
case 14:
|
|
118
|
+
_context.prev = 14;
|
|
119
|
+
_context.t0 = _context["catch"](6);
|
|
116
120
|
|
|
117
121
|
/**
|
|
118
122
|
* We report the error if:
|
|
@@ -134,29 +138,29 @@ export var getCardPreview = /*#__PURE__*/function () {
|
|
|
134
138
|
|
|
135
139
|
|
|
136
140
|
if (isRemotePreviewReady) {
|
|
137
|
-
_context.next =
|
|
141
|
+
_context.next = 19;
|
|
138
142
|
break;
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
throw _context.t0;
|
|
142
146
|
|
|
143
|
-
case
|
|
147
|
+
case 19:
|
|
144
148
|
if (isRemotePreviewReady) {
|
|
145
|
-
_context.next =
|
|
149
|
+
_context.next = 21;
|
|
146
150
|
break;
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
throw new MediaCardError('remote-preview-not-ready');
|
|
150
154
|
|
|
151
|
-
case
|
|
155
|
+
case 21:
|
|
152
156
|
return _context.abrupt("return", fetchAndCacheRemotePreview(mediaClient, id, dimensions, imageUrlParams, mediaBlobUrlAttrs));
|
|
153
157
|
|
|
154
|
-
case
|
|
158
|
+
case 22:
|
|
155
159
|
case "end":
|
|
156
160
|
return _context.stop();
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
|
-
}, _callee, null, [[
|
|
163
|
+
}, _callee, null, [[6, 14]]);
|
|
160
164
|
}));
|
|
161
165
|
|
|
162
166
|
return function getCardPreview(_x) {
|
|
@@ -167,12 +171,14 @@ export var shouldResolvePreview = function shouldResolvePreview(_ref3) {
|
|
|
167
171
|
var status = _ref3.status,
|
|
168
172
|
fileState = _ref3.fileState,
|
|
169
173
|
dimensions = _ref3.dimensions,
|
|
170
|
-
|
|
174
|
+
identifier = _ref3.identifier,
|
|
175
|
+
fileImageMode = _ref3.fileImageMode,
|
|
171
176
|
hasCardPreview = _ref3.hasCardPreview,
|
|
172
177
|
isBannedLocalPreview = _ref3.isBannedLocalPreview,
|
|
173
178
|
featureFlags = _ref3.featureFlags;
|
|
174
179
|
var statusIsPreviewable = isPreviewableStatus(status, extractFilePreviewStatus(fileState, isBannedLocalPreview, featureFlags));
|
|
175
|
-
var
|
|
180
|
+
var cardPreview = cardPreviewCache.get(identifier.id, fileImageMode);
|
|
181
|
+
var dimensionsAreBigger = isBigger(cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dimensions, dimensions);
|
|
176
182
|
return statusIsPreviewable && (!hasCardPreview || dimensionsAreBigger);
|
|
177
183
|
};
|
|
178
184
|
export var getSSRCardPreview = function getSSRCardPreview(ssr, mediaClient, id, params, mediaBlobUrlAttrs) {
|
|
@@ -223,7 +229,9 @@ export var fetchAndCacheRemotePreview = /*#__PURE__*/function () {
|
|
|
223
229
|
|
|
224
230
|
case 2:
|
|
225
231
|
remotePreview = _context2.sent;
|
|
226
|
-
return _context2.abrupt("return", extendAndCachePreview(id,
|
|
232
|
+
return _context2.abrupt("return", extendAndCachePreview(id, params.mode, _objectSpread(_objectSpread({}, remotePreview), {}, {
|
|
233
|
+
dimensions: dimensions
|
|
234
|
+
}), mediaBlobUrlAttrs));
|
|
227
235
|
|
|
228
236
|
case 4:
|
|
229
237
|
case "end":
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -8,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
|
|
12
12
|
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; }
|
|
13
13
|
|
|
@@ -19,7 +19,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
19
19
|
|
|
20
20
|
import React, { Component, createRef } from 'react';
|
|
21
21
|
import ReactDOM from 'react-dom';
|
|
22
|
-
import { version as packageVersion, name as packageName } from '../../version.json';
|
|
23
22
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
24
23
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
25
24
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
@@ -32,9 +31,9 @@ import { getRequestedDimensions } from '../../utils/getDataURIDimension';
|
|
|
32
31
|
import { getCardPreview, getCardPreviewFromCache, removeCardPreviewFromCache, getFilePreviewFromFileState, shouldResolvePreview, getSSRCardPreview, isLocalPreview, isSSRPreview, isSSRClientPreview, isSSRDataPreview, fetchAndCacheRemotePreview } from './getCardPreview';
|
|
33
32
|
import { getFileDetails } from '../../utils/metadata';
|
|
34
33
|
import { InlinePlayer } from '../inlinePlayer';
|
|
35
|
-
import { getFileAttributes, extractErrorInfo } from '../../utils/analytics';
|
|
34
|
+
import { getFileAttributes, extractErrorInfo, LOGGED_FEATURE_FLAGS } from '../../utils/analytics';
|
|
36
35
|
import { isLocalPreviewError, MediaCardError, ensureMediaCardError, ImageLoadError } from '../../errors';
|
|
37
|
-
import { fireOperationalEvent as _fireOperationalEvent, fireCommencedEvent as _fireCommencedEvent,
|
|
36
|
+
import { fireOperationalEvent as _fireOperationalEvent, fireCommencedEvent as _fireCommencedEvent, fireCopiedEvent, fireScreenEvent } from './cardAnalytics';
|
|
38
37
|
import getDocument from '../../utils/document';
|
|
39
38
|
import { StoreSSRDataScript, getSSRData } from '../../utils/globalScope';
|
|
40
39
|
import { getCardStateFromFileState, createStateUpdater } from './cardState';
|
|
@@ -43,6 +42,8 @@ import { isBigger } from '../../utils/dimensionComparer';
|
|
|
43
42
|
import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
|
|
44
43
|
import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
|
|
45
44
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
45
|
+
var packageName = "@atlaskit/media-card";
|
|
46
|
+
var packageVersion = "74.0.0";
|
|
46
47
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
47
48
|
_inherits(CardBase, _Component);
|
|
48
49
|
|
|
@@ -304,9 +305,9 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
304
305
|
|
|
305
306
|
var _this$props5 = _this.props,
|
|
306
307
|
identifier = _this$props5.identifier,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
isFileIdentifier(identifier) && removeCardPreviewFromCache(identifier.id,
|
|
308
|
+
resizeMode = _this$props5.resizeMode;
|
|
309
|
+
var fileImageMode = imageResizeModeToFileImageMode(resizeMode);
|
|
310
|
+
isFileIdentifier(identifier) && removeCardPreviewFromCache(identifier.id, fileImageMode);
|
|
310
311
|
|
|
311
312
|
_this.safeSetState(updateState);
|
|
312
313
|
} else {
|
|
@@ -455,7 +456,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
455
456
|
dimensions = _this$props7.dimensions,
|
|
456
457
|
selected = _this$props7.selected,
|
|
457
458
|
testId = _this$props7.testId,
|
|
458
|
-
originalDimensions = _this$props7.originalDimensions
|
|
459
|
+
originalDimensions = _this$props7.originalDimensions,
|
|
460
|
+
onFullscreenChange = _this$props7.onFullscreenChange;
|
|
459
461
|
var _this$state = _this.state,
|
|
460
462
|
shouldAutoplay = _this$state.shouldAutoplay,
|
|
461
463
|
cardPreview = _this$state.cardPreview;
|
|
@@ -465,6 +467,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
465
467
|
originalDimensions: originalDimensions,
|
|
466
468
|
identifier: identifier,
|
|
467
469
|
autoplay: !!shouldAutoplay,
|
|
470
|
+
onFullscreenChange: onFullscreenChange,
|
|
468
471
|
onError: _this.onInlinePlayerError,
|
|
469
472
|
onClick: _this.onClick,
|
|
470
473
|
selected: selected,
|
|
@@ -675,14 +678,14 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
675
678
|
|
|
676
679
|
var _this$props11 = _this.props,
|
|
677
680
|
_identifier = _this$props11.identifier,
|
|
678
|
-
|
|
679
|
-
_dimensions = _this$props11$dimensi === void 0 ? {} : _this$props11$dimensi,
|
|
681
|
+
_resizeMode = _this$props11.resizeMode,
|
|
680
682
|
_ssr = _this$props11.ssr,
|
|
681
683
|
_mediaClient = _this$props11.mediaClient;
|
|
682
684
|
|
|
683
685
|
if (isFileIdentifier(_identifier)) {
|
|
684
686
|
var id = _identifier.id;
|
|
685
|
-
|
|
687
|
+
var fileImageMode = imageResizeModeToFileImageMode(_resizeMode);
|
|
688
|
+
_cardPreview = getCardPreviewFromCache(id, fileImageMode);
|
|
686
689
|
|
|
687
690
|
if (!_cardPreview && _ssr) {
|
|
688
691
|
var _this$ssrData, _this$ssrData2;
|
|
@@ -784,8 +787,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
784
787
|
key: "componentDidUpdate",
|
|
785
788
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
786
789
|
var prevMediaClient = prevProps.mediaClient,
|
|
787
|
-
prevIdentifier = prevProps.identifier
|
|
788
|
-
prevDimensions = prevProps.dimensions;
|
|
790
|
+
prevIdentifier = prevProps.identifier;
|
|
789
791
|
var prevIsCardVisible = prevState.isCardVisible;
|
|
790
792
|
var _this$props13 = this.props,
|
|
791
793
|
mediaClient = _this$props13.mediaClient,
|
|
@@ -793,7 +795,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
793
795
|
dimensions = _this$props13.dimensions,
|
|
794
796
|
featureFlags = _this$props13.featureFlags,
|
|
795
797
|
useInlinePlayer = _this$props13.useInlinePlayer,
|
|
796
|
-
disableOverlay = _this$props13.disableOverlay
|
|
798
|
+
disableOverlay = _this$props13.disableOverlay,
|
|
799
|
+
resizeMode = _this$props13.resizeMode;
|
|
797
800
|
var _this$state4 = this.state,
|
|
798
801
|
isCardVisible = _this$state4.isCardVisible,
|
|
799
802
|
cardPreview = _this$state4.cardPreview,
|
|
@@ -805,6 +808,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
805
808
|
var isDifferent = isDifferentIdentifier(prevIdentifier, identifier);
|
|
806
809
|
var turnedVisible = !prevIsCardVisible && isCardVisible;
|
|
807
810
|
var isNewMediaClient = prevMediaClient !== mediaClient;
|
|
811
|
+
var fileImageMode = imageResizeModeToFileImageMode(resizeMode);
|
|
808
812
|
this.updateFileStateFlag(fileState);
|
|
809
813
|
|
|
810
814
|
if (isExternalImageIdentifier(identifier) && isDifferent) {
|
|
@@ -837,7 +841,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
837
841
|
status: status,
|
|
838
842
|
fileState: fileState,
|
|
839
843
|
dimensions: dimensions,
|
|
840
|
-
|
|
844
|
+
identifier: identifier,
|
|
845
|
+
fileImageMode: fileImageMode,
|
|
841
846
|
featureFlags: featureFlags,
|
|
842
847
|
hasCardPreview: !!cardPreview,
|
|
843
848
|
isBannedLocalPreview: isBannedLocalPreview
|
|
@@ -963,7 +968,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
963
968
|
error = _this$state7.error;
|
|
964
969
|
var createAnalyticsEvent = this.props.createAnalyticsEvent;
|
|
965
970
|
createAnalyticsEvent && _fireOperationalEvent(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), this.ssrReliability, error);
|
|
966
|
-
completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.fileStateFlags, this.ssrReliability,
|
|
971
|
+
completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.fileStateFlags, this.ssrReliability, error);
|
|
967
972
|
}
|
|
968
973
|
}, {
|
|
969
974
|
key: "fireCommencedEvent",
|
|
@@ -975,7 +980,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
975
980
|
durationSincePageStart: this.timeElapsedTillCommenced
|
|
976
981
|
}
|
|
977
982
|
});
|
|
978
|
-
startUfoExperience(this.internalOccurrenceKey
|
|
983
|
+
startUfoExperience(this.internalOccurrenceKey);
|
|
979
984
|
}
|
|
980
985
|
}, {
|
|
981
986
|
key: "actions",
|
|
@@ -1036,7 +1041,7 @@ export var Card = withMediaAnalyticsContext({
|
|
|
1036
1041
|
componentName: 'mediaCard',
|
|
1037
1042
|
component: 'mediaCard'
|
|
1038
1043
|
}, {
|
|
1039
|
-
filterFeatureFlags:
|
|
1044
|
+
filterFeatureFlags: LOGGED_FEATURE_FLAGS
|
|
1040
1045
|
})(withAnalyticsEvents()(injectIntl(CardBase, {
|
|
1041
1046
|
enforceContext: false
|
|
1042
1047
|
})));
|