@atlaskit/media-card 71.0.0 → 73.1.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 +104 -0
- package/dist/cjs/actions.js +2 -2
- package/dist/cjs/errors.js +83 -8
- package/dist/cjs/files/cardImageView/cardOverlay/styled.js +1 -1
- package/dist/cjs/files/cardImageView/index.js +53 -104
- package/dist/cjs/files/cardImageView/styled.js +1 -1
- package/dist/cjs/files/index.js +0 -6
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/root/card/cardAnalytics.js +4 -16
- package/dist/cjs/root/card/cardLoader.js +66 -124
- package/dist/cjs/root/card/cardState.js +50 -0
- package/dist/cjs/root/card/getCardPreview/cache.js +10 -5
- package/dist/cjs/root/card/getCardPreview/filePreviewStatus.js +53 -0
- package/dist/cjs/root/card/getCardPreview/helpers.js +14 -22
- package/dist/cjs/root/card/getCardPreview/index.js +177 -97
- package/dist/cjs/root/card/getCardStatus.js +7 -1
- package/dist/cjs/root/card/index.js +384 -285
- package/dist/cjs/root/cardView.js +113 -88
- package/dist/cjs/root/inline/loader.js +47 -15
- package/dist/cjs/root/inline/mediaInlineCard.js +33 -12
- package/dist/cjs/root/inlinePlayer.js +77 -24
- package/dist/cjs/root/styled.js +7 -3
- package/dist/cjs/root/ui/actionsBar/styled.js +1 -1
- package/dist/cjs/root/ui/blanket/styled.js +1 -1
- package/dist/cjs/root/ui/common.js +11 -5
- package/dist/cjs/root/ui/iconMessage/index.js +16 -7
- package/dist/cjs/root/ui/iconWrapper/styled.js +1 -1
- package/dist/cjs/root/ui/imageRenderer/imageRenderer.js +47 -123
- package/dist/cjs/root/ui/loadingRateLimited/loadingRateLimited.js +6 -4
- package/dist/cjs/root/ui/loadingRateLimited/styled.js +2 -2
- package/dist/cjs/root/ui/playButton/styled.js +1 -1
- package/dist/cjs/root/ui/progressBar/progressBar.js +7 -4
- package/dist/cjs/root/ui/progressBar/styled.js +8 -9
- package/dist/cjs/root/ui/styled.js +80 -17
- package/dist/cjs/root/ui/tickBox/styled.js +1 -1
- package/dist/cjs/root/ui/titleBox/failedTitleBox.js +9 -3
- package/dist/cjs/root/ui/titleBox/styled.js +2 -4
- package/dist/cjs/root/ui/titleBox/titleBox.js +2 -2
- package/dist/cjs/styles/index.js +25 -23
- package/dist/cjs/styles/mixins.js +1 -1
- package/dist/cjs/utils/analytics.js +7 -44
- package/dist/cjs/utils/breakpoint.js +1 -1
- package/dist/cjs/utils/cardActions/cardActionsDropdownMenu.js +18 -9
- package/dist/cjs/utils/cardActions/index.js +10 -10
- package/dist/cjs/utils/cardActions/styled.js +1 -1
- package/dist/cjs/utils/cardDimensions.js +1 -1
- package/dist/cjs/utils/dimensionComparer.js +1 -1
- package/dist/cjs/utils/getErrorMessage.js +2 -2
- package/dist/cjs/utils/index.js +46 -46
- package/dist/cjs/utils/lightCards/styled.js +1 -1
- package/dist/cjs/utils/metadata.js +11 -3
- package/dist/cjs/utils/objectURLCache.js +7 -1
- package/dist/cjs/utils/shouldDisplayImageThumbnail.js +1 -1
- package/dist/cjs/utils/viewportDetector.js +49 -22
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/errors.js +42 -2
- package/dist/es2019/files/cardImageView/index.js +8 -61
- package/dist/es2019/files/index.js +1 -1
- package/dist/es2019/root/card/cardAnalytics.js +3 -14
- package/dist/es2019/root/card/cardLoader.js +47 -53
- package/dist/es2019/root/card/cardState.js +26 -0
- package/dist/es2019/root/card/getCardPreview/cache.js +5 -0
- package/dist/es2019/root/card/getCardPreview/filePreviewStatus.js +38 -0
- package/dist/es2019/root/card/getCardPreview/helpers.js +2 -12
- package/dist/es2019/root/card/getCardPreview/index.js +112 -73
- package/dist/es2019/root/card/getCardStatus.js +1 -0
- package/dist/es2019/root/card/index.js +308 -190
- package/dist/es2019/root/cardView.js +97 -68
- package/dist/es2019/root/inline/loader.js +17 -5
- package/dist/es2019/root/inline/mediaInlineCard.js +32 -11
- package/dist/es2019/root/inlinePlayer.js +56 -4
- package/dist/es2019/root/styled.js +2 -1
- package/dist/es2019/root/ui/common.js +7 -1
- package/dist/es2019/root/ui/iconMessage/index.js +8 -5
- package/dist/es2019/root/ui/imageRenderer/imageRenderer.js +35 -88
- package/dist/es2019/root/ui/loadingRateLimited/loadingRateLimited.js +4 -3
- package/dist/es2019/root/ui/loadingRateLimited/styled.js +1 -1
- package/dist/es2019/root/ui/progressBar/progressBar.js +5 -3
- package/dist/es2019/root/ui/progressBar/styled.js +7 -6
- package/dist/es2019/root/ui/styled.js +65 -4
- package/dist/es2019/root/ui/titleBox/failedTitleBox.js +6 -3
- package/dist/es2019/root/ui/titleBox/styled.js +1 -2
- package/dist/es2019/root/ui/titleBox/titleBox.js +1 -1
- package/dist/es2019/utils/analytics.js +5 -34
- package/dist/es2019/utils/cardActions/cardActionsDropdownMenu.js +8 -4
- package/dist/es2019/utils/dimensionComparer.js +1 -1
- package/dist/es2019/utils/getErrorMessage.js +1 -1
- package/dist/es2019/utils/metadata.js +12 -4
- package/dist/es2019/utils/objectURLCache.js +5 -0
- package/dist/es2019/utils/shouldDisplayImageThumbnail.js +1 -1
- package/dist/es2019/utils/viewportDetector.js +48 -18
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions.js +2 -2
- package/dist/esm/errors.js +64 -4
- package/dist/esm/files/cardImageView/index.js +51 -102
- package/dist/esm/files/index.js +1 -1
- package/dist/esm/root/card/cardAnalytics.js +3 -15
- package/dist/esm/root/card/cardLoader.js +66 -126
- package/dist/esm/root/card/cardState.js +32 -0
- package/dist/esm/root/card/getCardPreview/cache.js +9 -2
- package/dist/esm/root/card/getCardPreview/filePreviewStatus.js +38 -0
- package/dist/esm/root/card/getCardPreview/helpers.js +13 -21
- package/dist/esm/root/card/getCardPreview/index.js +144 -91
- package/dist/esm/root/card/getCardStatus.js +3 -0
- package/dist/esm/root/card/index.js +396 -288
- package/dist/esm/root/cardView.js +113 -86
- package/dist/esm/root/inline/loader.js +48 -15
- package/dist/esm/root/inline/mediaInlineCard.js +32 -11
- package/dist/esm/root/inlinePlayer.js +74 -23
- package/dist/esm/root/styled.js +3 -2
- package/dist/esm/root/ui/common.js +7 -1
- package/dist/esm/root/ui/iconMessage/index.js +10 -5
- package/dist/esm/root/ui/imageRenderer/imageRenderer.js +37 -116
- package/dist/esm/root/ui/loadingRateLimited/loadingRateLimited.js +4 -3
- package/dist/esm/root/ui/loadingRateLimited/styled.js +1 -1
- package/dist/esm/root/ui/progressBar/progressBar.js +6 -3
- package/dist/esm/root/ui/progressBar/styled.js +7 -7
- package/dist/esm/root/ui/styled.js +61 -13
- package/dist/esm/root/ui/titleBox/failedTitleBox.js +7 -3
- package/dist/esm/root/ui/titleBox/styled.js +1 -2
- package/dist/esm/root/ui/titleBox/titleBox.js +1 -1
- package/dist/esm/utils/analytics.js +5 -36
- package/dist/esm/utils/cardActions/cardActionsDropdownMenu.js +17 -9
- package/dist/esm/utils/dimensionComparer.js +1 -1
- package/dist/esm/utils/getErrorMessage.js +1 -1
- package/dist/esm/utils/metadata.js +12 -4
- package/dist/esm/utils/objectURLCache.js +6 -0
- package/dist/esm/utils/shouldDisplayImageThumbnail.js +1 -1
- package/dist/esm/utils/viewportDetector.js +48 -21
- package/dist/esm/version.json +1 -1
- package/dist/types/errors.d.ts +15 -1
- package/dist/types/files/cardImageView/index.d.ts +4 -13
- package/dist/types/files/cardImageView/styled.d.ts +1 -1
- package/dist/types/files/index.d.ts +1 -1
- package/dist/types/index.d.ts +7 -4
- package/dist/types/root/card/cardAnalytics.d.ts +1 -6
- package/dist/types/root/card/cardLoader.d.ts +5 -19
- package/dist/types/root/card/cardState.d.ts +5 -0
- package/dist/types/root/card/getCardPreview/cache.d.ts +3 -1
- package/dist/types/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
- package/dist/types/root/card/getCardPreview/helpers.d.ts +3 -4
- package/dist/types/root/card/getCardPreview/index.d.ts +24 -14
- package/dist/types/root/card/getCardStatus.d.ts +1 -0
- package/dist/types/root/card/index.d.ts +20 -18
- package/dist/types/root/cardView.d.ts +13 -8
- package/dist/types/root/inline/loader.d.ts +2 -0
- package/dist/types/root/inline/mediaInlineCard.d.ts +3 -5
- package/dist/types/root/inlinePlayer.d.ts +8 -1
- package/dist/types/root/styled.d.ts +1 -0
- package/dist/types/root/ui/common.d.ts +4 -1
- package/dist/types/root/ui/iconMessage/index.d.ts +4 -3
- package/dist/types/root/ui/iconWrapper/styled.d.ts +1 -1
- package/dist/types/root/ui/imageRenderer/imageRenderer.d.ts +14 -15
- package/dist/types/root/ui/loadingRateLimited/loadingRateLimited.d.ts +2 -1
- package/dist/types/root/ui/loadingRateLimited/styled.d.ts +1 -1
- package/dist/types/root/ui/playButton/playButton.d.ts +1 -0
- package/dist/types/root/ui/progressBar/progressBar.d.ts +4 -2
- package/dist/types/root/ui/progressBar/styled.d.ts +3 -2
- package/dist/types/root/ui/styled.d.ts +10 -3
- package/dist/types/root/ui/tickBox/tickBox.d.ts +1 -0
- package/dist/types/root/ui/titleBox/failedTitleBox.d.ts +3 -1
- package/dist/types/root/ui/titleBox/styled.d.ts +1 -1
- package/dist/types/root/ui/titleBox/titleBox.d.ts +2 -10
- package/dist/types/styles/mixins.d.ts +1 -1
- package/dist/types/types.d.ts +7 -1
- package/dist/types/utils/analytics.d.ts +6 -15
- package/dist/types/utils/cardDimensions.d.ts +4 -4
- package/dist/types/utils/dimensionComparer.d.ts +1 -1
- package/dist/types/utils/getErrorMessage.d.ts +1 -0
- package/dist/types/utils/metadata.d.ts +2 -2
- package/dist/types/utils/objectURLCache.d.ts +2 -1
- package/dist/types/utils/viewportDetector.d.ts +13 -5
- package/example-helpers/developmentUseMessage.tsx +14 -0
- package/example-helpers/index.tsx +55 -4
- package/example-helpers/selectableCard.tsx +2 -1
- package/package.json +18 -16
- package/dist/cjs/root/card/cardSSRView.js +0 -112
- package/dist/cjs/root/card/getCardPreview/types.js +0 -5
- package/dist/cjs/root/ui/Breakpoint.js +0 -13
- package/dist/cjs/root/ui/styledSSR.js +0 -108
- package/dist/cjs/utils/fileAttributesContext.js +0 -40
- package/dist/cjs/utils/lazyContent/index.js +0 -56
- package/dist/cjs/utils/lazyContent/styled.js +0 -23
- package/dist/es2019/root/card/cardSSRView.js +0 -92
- package/dist/es2019/root/card/getCardPreview/types.js +0 -1
- package/dist/es2019/root/ui/Breakpoint.js +0 -6
- package/dist/es2019/root/ui/styledSSR.js +0 -93
- package/dist/es2019/utils/fileAttributesContext.js +0 -19
- package/dist/es2019/utils/lazyContent/index.js +0 -18
- package/dist/es2019/utils/lazyContent/styled.js +0 -12
- package/dist/esm/root/card/cardSSRView.js +0 -91
- package/dist/esm/root/card/getCardPreview/types.js +0 -1
- package/dist/esm/root/ui/Breakpoint.js +0 -6
- package/dist/esm/root/ui/styledSSR.js +0 -76
- package/dist/esm/utils/fileAttributesContext.js +0 -18
- package/dist/esm/utils/lazyContent/index.js +0 -41
- package/dist/esm/utils/lazyContent/styled.js +0 -14
- package/dist/types/root/card/cardSSRView.d.ts +0 -13
- package/dist/types/root/card/getCardPreview/types.d.ts +0 -5
- package/dist/types/root/ui/Breakpoint.d.ts +0 -4
- package/dist/types/root/ui/styledSSR.d.ts +0 -16
- package/dist/types/utils/fileAttributesContext.d.ts +0 -10
- package/dist/types/utils/lazyContent/index.d.ts +0 -11
- package/dist/types/utils/lazyContent/styled.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,109 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 73.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - [ux] Displaying the control bar including the timestamp by default for videos that have been processed.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - fix percent width on media-card
|
|
12
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Refactor solution for fixing media card images overlaps with creating preview message
|
|
13
|
+
- [`e221ee215e7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e221ee215e7) - fix vertical scroll for firefox when media link is wrapped
|
|
14
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Improved card lazy offset
|
|
15
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Add media node updater to media inline node
|
|
16
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - show progress bar for inline player when videos is uploading
|
|
17
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Adding a feature flag for TimestampOnVideo
|
|
18
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Fix cardview issue with creating preview text overlaps with image in safari"
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 73.0.0
|
|
22
|
+
|
|
23
|
+
### Major Changes
|
|
24
|
+
|
|
25
|
+
- [`47f58da5946`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f58da5946) - ED-13322, ED-13324, ED-13326, ED-13323, ED-13204: Upgrade and support react-intl@^5.18.1 including breaking API changes, types and tests in atlassian-frontend packages
|
|
26
|
+
|
|
27
|
+
What changed: Upgraded our react-intl support from ^2.6.0 to ^5.18.1. This means editor packages now rely on consumers installing ^5.18.1, otherwise editor usage of react-intl will mismatch with actual installed react-intl APIs.
|
|
28
|
+
Why change was made: As part of a coordinated upgrade effort across AF packages, as react-intl v2 is quite dated.
|
|
29
|
+
How consumer should update their code: Ensure react-intl ^5.18.1 is installed in consuming applications.
|
|
30
|
+
|
|
31
|
+
Upgrade guide: To consume atlassian-frontend packages that use react-intl5 setup a second provider for the new version, using an npm alias
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
"react-intl": "^2.6.0",
|
|
35
|
+
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
import { IntlProvider } from 'react-intl';
|
|
40
|
+
import { IntlProvider as IntlNextProvider } from 'react-intl-next';
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<IntlProvider
|
|
44
|
+
key={locale}
|
|
45
|
+
data-test-language={locale}
|
|
46
|
+
locale={locale}
|
|
47
|
+
defaultLocale={DEFAULT_LOCALE}
|
|
48
|
+
messages={messages}
|
|
49
|
+
>
|
|
50
|
+
<IntlNextProvider
|
|
51
|
+
key={locale}
|
|
52
|
+
data-test-language={locale}
|
|
53
|
+
locale={locale}
|
|
54
|
+
defaultLocale={DEFAULT_LOCALE}
|
|
55
|
+
messages={messages}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</IntlNextProvider>
|
|
59
|
+
</IntlProvider>
|
|
60
|
+
);
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies
|
|
66
|
+
|
|
67
|
+
## 72.1.0
|
|
68
|
+
|
|
69
|
+
### Minor Changes
|
|
70
|
+
|
|
71
|
+
- [`1724e1b8277`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1724e1b8277) - Added SSR capabilities to Media Card
|
|
72
|
+
- [`ca519a86b1d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ca519a86b1d) - Add new prop forceSyncDisplay in MediaImage to provide an option of always showing images.
|
|
73
|
+
Enable MediaCard to turn on forceSyncDisplay when server side rendering is enabled.
|
|
74
|
+
- [`ac4846d0f3f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ac4846d0f3f) - Added native lazy load support
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- [`fc70978492a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fc70978492a) - Using type for SSR prop to reduce dependency on media-common
|
|
79
|
+
- [`dc1f9d42903`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dc1f9d42903) - Fixed error message logic
|
|
80
|
+
- [`27c61b8cdd8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/27c61b8cdd8) - revert CardSSRView component
|
|
81
|
+
- [`12bfc09a21e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/12bfc09a21e) - Fixing internal prop calls for testId and removing references to the old DropdownMenuStateless export when using the new default export.
|
|
82
|
+
- [`2b24fcc59f2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2b24fcc59f2) - Removed Code Viewer and Zip Previews Feature Flags
|
|
83
|
+
- [`bccde8a4127`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bccde8a4127) - Update dependency of dropdown menu to the lite mode version. Update all usages to cater to the new API. The padding within dropdown menu items is 8px more, which makes the menu look bigger.
|
|
84
|
+
- [`3a56ce8792b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a56ce8792b) - [ux] Show selected for mediaInline in other states
|
|
85
|
+
- [`f461edcfd05`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f461edcfd05) - Update CardLoader to use react-loadable
|
|
86
|
+
Add SSR feature prop to be passed in renderer and media card
|
|
87
|
+
- Updated dependencies
|
|
88
|
+
|
|
89
|
+
## 72.0.0
|
|
90
|
+
|
|
91
|
+
### Major Changes
|
|
92
|
+
|
|
93
|
+
- [`b3606652fa1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b3606652fa1) - [ux] Editor integration for Media Inline component
|
|
94
|
+
|
|
95
|
+
### Minor Changes
|
|
96
|
+
|
|
97
|
+
- [`269ee940b87`](https://bitbucket.org/atlassian/atlassian-frontend/commits/269ee940b87) - redesign error UI on new media card experience
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- [`a81fdad4b7b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a81fdad4b7b) - Refactored the internal status logic based on file processing status and preview render outcome
|
|
102
|
+
- [`b51fc0a9062`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b51fc0a9062) - Refactored internal helpers to match common type definitions from Media Client
|
|
103
|
+
- [`ebad8bc86e5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ebad8bc86e5) - Moved analytics from image renderer to root component
|
|
104
|
+
- [`fe9ced0cd70`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe9ced0cd70) - Removed feature flags for polling settings
|
|
105
|
+
- Updated dependencies
|
|
106
|
+
|
|
3
107
|
## 71.0.0
|
|
4
108
|
|
|
5
109
|
### Major Changes
|
package/dist/cjs/actions.js
CHANGED
|
@@ -9,9 +9,9 @@ exports.attachDetailsToActions = attachDetailsToActions;
|
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
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
|
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
14
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
15
15
|
|
|
16
16
|
function attachDetailsToActions(actions, details) {
|
|
17
17
|
return actions.map(function (action) {
|
package/dist/cjs/errors.js
CHANGED
|
@@ -5,8 +5,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.getImageLoadPrimaryReason = exports.ensureMediaCardError = exports.SsrPreviewError = exports.RemotePreviewError = exports.MediaCardError = exports.LocalPreviewError = exports.ImageLoadError = void 0;
|
|
9
|
+
exports.isImageLoadError = isImageLoadError;
|
|
10
|
+
exports.isLocalPreviewError = void 0;
|
|
8
11
|
exports.isMediaCardError = isMediaCardError;
|
|
9
|
-
exports.
|
|
12
|
+
exports.isUploadError = exports.isUnsupportedLocalPreviewError = exports.isRemotePreviewError = void 0;
|
|
13
|
+
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
15
|
|
|
11
16
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
17
|
|
|
@@ -46,7 +51,7 @@ var MediaCardError = /*#__PURE__*/function (_Error) {
|
|
|
46
51
|
return _this;
|
|
47
52
|
}
|
|
48
53
|
|
|
49
|
-
return MediaCardError;
|
|
54
|
+
return (0, _createClass2.default)(MediaCardError);
|
|
50
55
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
51
56
|
|
|
52
57
|
exports.MediaCardError = MediaCardError;
|
|
@@ -66,7 +71,7 @@ var LocalPreviewError = /*#__PURE__*/function (_MediaCardError) {
|
|
|
66
71
|
return _this2;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
return LocalPreviewError;
|
|
74
|
+
return (0, _createClass2.default)(LocalPreviewError);
|
|
70
75
|
}(MediaCardError);
|
|
71
76
|
|
|
72
77
|
exports.LocalPreviewError = LocalPreviewError;
|
|
@@ -86,11 +91,71 @@ var RemotePreviewError = /*#__PURE__*/function (_MediaCardError2) {
|
|
|
86
91
|
return _this3;
|
|
87
92
|
}
|
|
88
93
|
|
|
89
|
-
return RemotePreviewError;
|
|
94
|
+
return (0, _createClass2.default)(RemotePreviewError);
|
|
90
95
|
}(MediaCardError);
|
|
91
96
|
|
|
92
97
|
exports.RemotePreviewError = RemotePreviewError;
|
|
93
98
|
|
|
99
|
+
var SsrPreviewError = /*#__PURE__*/function (_MediaCardError3) {
|
|
100
|
+
(0, _inherits2.default)(SsrPreviewError, _MediaCardError3);
|
|
101
|
+
|
|
102
|
+
var _super4 = _createSuper(SsrPreviewError);
|
|
103
|
+
|
|
104
|
+
function SsrPreviewError(primaryReason, secondaryError) {
|
|
105
|
+
var _this4;
|
|
106
|
+
|
|
107
|
+
(0, _classCallCheck2.default)(this, SsrPreviewError);
|
|
108
|
+
_this4 = _super4.call(this, primaryReason, secondaryError);
|
|
109
|
+
_this4.primaryReason = primaryReason;
|
|
110
|
+
_this4.secondaryError = secondaryError;
|
|
111
|
+
return _this4;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return (0, _createClass2.default)(SsrPreviewError);
|
|
115
|
+
}(MediaCardError);
|
|
116
|
+
|
|
117
|
+
exports.SsrPreviewError = SsrPreviewError;
|
|
118
|
+
|
|
119
|
+
var getImageLoadPrimaryReason = function getImageLoadPrimaryReason(source) {
|
|
120
|
+
switch (source) {
|
|
121
|
+
case 'cache-remote':
|
|
122
|
+
return 'cache-remote-uri';
|
|
123
|
+
|
|
124
|
+
case 'cache-local':
|
|
125
|
+
return 'cache-local-uri';
|
|
126
|
+
|
|
127
|
+
case 'external':
|
|
128
|
+
return 'external-uri';
|
|
129
|
+
|
|
130
|
+
case 'local':
|
|
131
|
+
return 'local-uri';
|
|
132
|
+
|
|
133
|
+
case 'remote':
|
|
134
|
+
return 'remote-uri';
|
|
135
|
+
// This fail reason will come from a bug, most likely.
|
|
136
|
+
|
|
137
|
+
default:
|
|
138
|
+
return "unknown-uri";
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
exports.getImageLoadPrimaryReason = getImageLoadPrimaryReason;
|
|
143
|
+
|
|
144
|
+
var ImageLoadError = /*#__PURE__*/function (_MediaCardError4) {
|
|
145
|
+
(0, _inherits2.default)(ImageLoadError, _MediaCardError4);
|
|
146
|
+
|
|
147
|
+
var _super5 = _createSuper(ImageLoadError);
|
|
148
|
+
|
|
149
|
+
function ImageLoadError(source) {
|
|
150
|
+
(0, _classCallCheck2.default)(this, ImageLoadError);
|
|
151
|
+
return _super5.call(this, getImageLoadPrimaryReason(source));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return (0, _createClass2.default)(ImageLoadError);
|
|
155
|
+
}(MediaCardError);
|
|
156
|
+
|
|
157
|
+
exports.ImageLoadError = ImageLoadError;
|
|
158
|
+
|
|
94
159
|
function isMediaCardError(err) {
|
|
95
160
|
return err instanceof MediaCardError;
|
|
96
161
|
}
|
|
@@ -109,14 +174,24 @@ exports.isRemotePreviewError = isRemotePreviewError;
|
|
|
109
174
|
|
|
110
175
|
var isUnsupportedLocalPreviewError = function isUnsupportedLocalPreviewError(err) {
|
|
111
176
|
return isMediaCardError(err) && err.primaryReason === 'local-preview-unsupported';
|
|
112
|
-
};
|
|
113
|
-
// We can use this helper to ensure that the error handled is the type of MediaCardError if unsure
|
|
114
|
-
|
|
177
|
+
};
|
|
115
178
|
|
|
116
179
|
exports.isUnsupportedLocalPreviewError = isUnsupportedLocalPreviewError;
|
|
117
180
|
|
|
181
|
+
function isImageLoadError(err) {
|
|
182
|
+
return err instanceof ImageLoadError;
|
|
183
|
+
} // In a try/catch statement, the error caught is the type of any.
|
|
184
|
+
// We can use this helper to ensure that the error handled is the type of MediaCardError if unsure
|
|
185
|
+
|
|
186
|
+
|
|
118
187
|
var ensureMediaCardError = function ensureMediaCardError(primaryReason, error) {
|
|
119
188
|
return isMediaCardError(error) ? error : new MediaCardError(primaryReason, error);
|
|
120
189
|
};
|
|
121
190
|
|
|
122
|
-
exports.ensureMediaCardError = ensureMediaCardError;
|
|
191
|
+
exports.ensureMediaCardError = ensureMediaCardError;
|
|
192
|
+
|
|
193
|
+
var isUploadError = function isUploadError(error) {
|
|
194
|
+
return error && error.primaryReason === 'upload';
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
exports.isUploadError = isUploadError;
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.TopRow = exports.TitleWrapper = exports.TickBox = exports.Subtitle = exports.RightColumn = exports.Overlay = exports.Metadata = exports.LeftColumn = exports.ErrorMessage = exports.ErrorLine = exports.BottomRow = exports.AltWrapper = void 0;
|
|
11
11
|
|
|
12
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.fileCardImageViewSelector = exports.fileCardImageViewSelectedSelector = exports.FileCardImageView = void 0;
|
|
11
11
|
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
|
|
@@ -41,12 +41,6 @@ var _progressBar = require("../../utils/progressBar");
|
|
|
41
41
|
|
|
42
42
|
var _cardActions = _interopRequireDefault(require("../../utils/cardActions"));
|
|
43
43
|
|
|
44
|
-
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
45
|
-
|
|
46
|
-
var _analytics = require("../../utils/analytics");
|
|
47
|
-
|
|
48
|
-
var _fileAttributesContext = require("../../utils/fileAttributesContext");
|
|
49
|
-
|
|
50
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
45
|
|
|
52
46
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -60,15 +54,15 @@ exports.fileCardImageViewSelector = fileCardImageViewSelector;
|
|
|
60
54
|
var fileCardImageViewSelectedSelector = 'media-file-card-view-selected';
|
|
61
55
|
exports.fileCardImageViewSelectedSelector = fileCardImageViewSelectedSelector;
|
|
62
56
|
|
|
63
|
-
var
|
|
64
|
-
(0, _inherits2.default)(
|
|
57
|
+
var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
58
|
+
(0, _inherits2.default)(FileCardImageView, _Component);
|
|
65
59
|
|
|
66
|
-
var _super = _createSuper(
|
|
60
|
+
var _super = _createSuper(FileCardImageView);
|
|
67
61
|
|
|
68
|
-
function
|
|
62
|
+
function FileCardImageView() {
|
|
69
63
|
var _this;
|
|
70
64
|
|
|
71
|
-
(0, _classCallCheck2.default)(this,
|
|
65
|
+
(0, _classCallCheck2.default)(this, FileCardImageView);
|
|
72
66
|
|
|
73
67
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
74
68
|
args[_key] = arguments[_key];
|
|
@@ -186,58 +180,18 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
186
180
|
size: "large"
|
|
187
181
|
})));
|
|
188
182
|
});
|
|
189
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onImageLoad", function () {
|
|
190
|
-
var _this$props6 = _this.props,
|
|
191
|
-
createAnalyticsEvent = _this$props6.createAnalyticsEvent,
|
|
192
|
-
fileAttributes = _this$props6.fileAttributes,
|
|
193
|
-
timeElapsedTillCommenced = _this$props6.timeElapsedTillCommenced;
|
|
194
|
-
|
|
195
|
-
if (fileAttributes && _this.shouldFireEvent(_analytics.RenderEventAction.SUCCEEDED)) {
|
|
196
|
-
var timeElapsedTillSucceeded = performance.now();
|
|
197
|
-
var durationSinceCommenced = timeElapsedTillCommenced && timeElapsedTillSucceeded - timeElapsedTillCommenced;
|
|
198
|
-
var performanceAttributes = {
|
|
199
|
-
overall: {
|
|
200
|
-
durationSincePageStart: timeElapsedTillSucceeded,
|
|
201
|
-
durationSinceCommenced: durationSinceCommenced
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
(0, _analytics.fireMediaCardEvent)((0, _analytics.getRenderSucceededEventPayload)(fileAttributes, performanceAttributes), createAnalyticsEvent);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onImageError", function () {
|
|
208
|
-
var fileAttributes = _this.props.fileAttributes;
|
|
209
|
-
|
|
210
|
-
if (fileAttributes && _this.shouldFireEvent(_analytics.RenderEventAction.FAILED)) {
|
|
211
|
-
var _this$props7 = _this.props,
|
|
212
|
-
createAnalyticsEvent = _this$props7.createAnalyticsEvent,
|
|
213
|
-
mediaItemType = _this$props7.mediaItemType,
|
|
214
|
-
timeElapsedTillCommenced = _this$props7.timeElapsedTillCommenced;
|
|
215
|
-
var timeElapsedTillFailed = performance.now();
|
|
216
|
-
var durationSinceCommenced = timeElapsedTillCommenced && timeElapsedTillFailed - timeElapsedTillCommenced;
|
|
217
|
-
var performanceAttributes = {
|
|
218
|
-
overall: {
|
|
219
|
-
durationSincePageStart: timeElapsedTillFailed,
|
|
220
|
-
durationSinceCommenced: durationSinceCommenced
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
if (mediaItemType === 'file') {
|
|
225
|
-
(0, _analytics.fireMediaCardEvent)((0, _analytics.getRenderFailedFileUriPayload)(fileAttributes, performanceAttributes), createAnalyticsEvent);
|
|
226
|
-
} else if (mediaItemType === 'external-image') {
|
|
227
|
-
(0, _analytics.fireMediaCardEvent)((0, _analytics.getRenderFailedExternalUriPayload)(fileAttributes, performanceAttributes), createAnalyticsEvent);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
183
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderMediaImage", function () {
|
|
232
|
-
var _this$
|
|
233
|
-
status = _this$
|
|
234
|
-
mediaItemType = _this$
|
|
235
|
-
dataURI = _this$
|
|
236
|
-
mediaType = _this$
|
|
237
|
-
mimeType = _this$
|
|
238
|
-
previewOrientation = _this$
|
|
239
|
-
onDisplayImage = _this$
|
|
240
|
-
alt = _this$
|
|
184
|
+
var _this$props6 = _this.props,
|
|
185
|
+
status = _this$props6.status,
|
|
186
|
+
mediaItemType = _this$props6.mediaItemType,
|
|
187
|
+
dataURI = _this$props6.dataURI,
|
|
188
|
+
mediaType = _this$props6.mediaType,
|
|
189
|
+
mimeType = _this$props6.mimeType,
|
|
190
|
+
previewOrientation = _this$props6.previewOrientation,
|
|
191
|
+
onDisplayImage = _this$props6.onDisplayImage,
|
|
192
|
+
alt = _this$props6.alt,
|
|
193
|
+
onImageLoad = _this$props6.onImageLoad,
|
|
194
|
+
onImageError = _this$props6.onImageError;
|
|
241
195
|
|
|
242
196
|
if (!(0, _shouldDisplayImageThumbnail.shouldDisplayImageThumbnail)(status, mediaItemType, dataURI, mediaType, mimeType)) {
|
|
243
197
|
return null;
|
|
@@ -254,19 +208,16 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
254
208
|
crop: _this.isCropped,
|
|
255
209
|
stretch: _this.isStretched,
|
|
256
210
|
previewOrientation: previewOrientation,
|
|
257
|
-
onImageLoad:
|
|
258
|
-
onImageError:
|
|
211
|
+
onImageLoad: onImageLoad,
|
|
212
|
+
onImageError: onImageError
|
|
259
213
|
});
|
|
260
214
|
});
|
|
261
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "shouldFireEvent", function (action) {
|
|
262
|
-
return !_this.lastAnalyticsAction || _this.lastAnalyticsAction !== action;
|
|
263
|
-
});
|
|
264
215
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderProgressBar", function () {
|
|
265
|
-
var _this$
|
|
266
|
-
mediaName = _this$
|
|
267
|
-
progress = _this$
|
|
268
|
-
actions = _this$
|
|
269
|
-
status = _this$
|
|
216
|
+
var _this$props7 = _this.props,
|
|
217
|
+
mediaName = _this$props7.mediaName,
|
|
218
|
+
progress = _this$props7.progress,
|
|
219
|
+
actions = _this$props7.actions,
|
|
220
|
+
status = _this$props7.status;
|
|
270
221
|
|
|
271
222
|
if (status !== 'uploading') {
|
|
272
223
|
return null;
|
|
@@ -284,10 +235,10 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
284
235
|
}) : null))));
|
|
285
236
|
});
|
|
286
237
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderSuccessCardContents", function () {
|
|
287
|
-
var _this$
|
|
288
|
-
disableOverlay = _this$
|
|
289
|
-
selectable = _this$
|
|
290
|
-
status = _this$
|
|
238
|
+
var _this$props8 = _this.props,
|
|
239
|
+
disableOverlay = _this$props8.disableOverlay,
|
|
240
|
+
selectable = _this$props8.selectable,
|
|
241
|
+
status = _this$props8.status;
|
|
291
242
|
var overlay = null;
|
|
292
243
|
|
|
293
244
|
if (!disableOverlay) {
|
|
@@ -307,15 +258,15 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
307
258
|
}, _this.renderMediaImage(), _this.renderProgressBar(), _this.renderPlayButton()), overlay);
|
|
308
259
|
});
|
|
309
260
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderSuccessCardOverlay", function () {
|
|
310
|
-
var _this$
|
|
311
|
-
status = _this$
|
|
312
|
-
mediaName = _this$
|
|
313
|
-
mediaType = _this$
|
|
314
|
-
fileSize = _this$
|
|
315
|
-
dataURI = _this$
|
|
316
|
-
selectable = _this$
|
|
317
|
-
selected = _this$
|
|
318
|
-
actions = _this$
|
|
261
|
+
var _this$props9 = _this.props,
|
|
262
|
+
status = _this$props9.status,
|
|
263
|
+
mediaName = _this$props9.mediaName,
|
|
264
|
+
mediaType = _this$props9.mediaType,
|
|
265
|
+
fileSize = _this$props9.fileSize,
|
|
266
|
+
dataURI = _this$props9.dataURI,
|
|
267
|
+
selectable = _this$props9.selectable,
|
|
268
|
+
selected = _this$props9.selected,
|
|
269
|
+
actions = _this$props9.actions;
|
|
319
270
|
var isPersistent = mediaType === 'doc' || !dataURI;
|
|
320
271
|
return /*#__PURE__*/_react.default.createElement(_cardOverlay.CardOverlay, {
|
|
321
272
|
cardStatus: status,
|
|
@@ -331,17 +282,17 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
331
282
|
return _this;
|
|
332
283
|
}
|
|
333
284
|
|
|
334
|
-
(0, _createClass2.default)(
|
|
285
|
+
(0, _createClass2.default)(FileCardImageView, [{
|
|
335
286
|
key: "render",
|
|
336
287
|
value: function render() {
|
|
337
|
-
var _this$
|
|
338
|
-
disableOverlay = _this$
|
|
339
|
-
selectable = _this$
|
|
340
|
-
selected = _this$
|
|
341
|
-
mediaType = _this$
|
|
342
|
-
progress = _this$
|
|
343
|
-
status = _this$
|
|
344
|
-
mediaName = _this$
|
|
288
|
+
var _this$props10 = this.props,
|
|
289
|
+
disableOverlay = _this$props10.disableOverlay,
|
|
290
|
+
selectable = _this$props10.selectable,
|
|
291
|
+
selected = _this$props10.selected,
|
|
292
|
+
mediaType = _this$props10.mediaType,
|
|
293
|
+
progress = _this$props10.progress,
|
|
294
|
+
status = _this$props10.status,
|
|
295
|
+
mediaName = _this$props10.mediaName;
|
|
345
296
|
return /*#__PURE__*/_react.default.createElement(_styled.Wrapper, {
|
|
346
297
|
"data-testid": "media-file-card-view",
|
|
347
298
|
"data-test-media-name": mediaName,
|
|
@@ -358,9 +309,9 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
358
309
|
}, {
|
|
359
310
|
key: "isFileCardImageReadyForDisplay",
|
|
360
311
|
get: function get() {
|
|
361
|
-
var _this$
|
|
362
|
-
dataURI = _this$
|
|
363
|
-
status = _this$
|
|
312
|
+
var _this$props11 = this.props,
|
|
313
|
+
dataURI = _this$props11.dataURI,
|
|
314
|
+
status = _this$props11.status;
|
|
364
315
|
return !!dataURI || !['loading', 'processing', 'loading-preview'].includes(status);
|
|
365
316
|
}
|
|
366
317
|
}, {
|
|
@@ -376,13 +327,11 @@ var FileCardImageViewBase = /*#__PURE__*/function (_Component) {
|
|
|
376
327
|
return resizeMode === 'stretchy-fit';
|
|
377
328
|
}
|
|
378
329
|
}]);
|
|
379
|
-
return
|
|
330
|
+
return FileCardImageView;
|
|
380
331
|
}(_react.Component);
|
|
381
332
|
|
|
382
|
-
exports.
|
|
383
|
-
(0, _defineProperty2.default)(
|
|
333
|
+
exports.FileCardImageView = FileCardImageView;
|
|
334
|
+
(0, _defineProperty2.default)(FileCardImageView, "defaultProps", {
|
|
384
335
|
resizeMode: 'crop',
|
|
385
336
|
disableOverlay: false
|
|
386
|
-
});
|
|
387
|
-
var FileCardImageView = (0, _analyticsNext.withAnalyticsEvents)()((0, _fileAttributesContext.withFileAttributes)(FileCardImageViewBase));
|
|
388
|
-
exports.FileCardImageView = FileCardImageView;
|
|
337
|
+
});
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.Wrapper = exports.Title = exports.ProgressWrapper = exports.ProgressBarWrapper = exports.PlayIconWrapper = exports.PlayIconBackground = exports.Overlay = exports.CardActionsWrapper = exports.Body = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
package/dist/cjs/files/index.js
CHANGED
|
@@ -9,11 +9,5 @@ Object.defineProperty(exports, "FileCardImageView", {
|
|
|
9
9
|
return _cardImageView.FileCardImageView;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "FileCardImageViewBase", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _cardImageView.FileCardImageViewBase;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
12
|
|
|
19
13
|
var _cardImageView = require("./cardImageView");
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "Card", {
|
|
|
9
9
|
return _root.Card;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "CardError", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return
|
|
15
|
+
return _cardError.CardError;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "CardLoading", {
|
|
@@ -21,10 +21,10 @@ Object.defineProperty(exports, "CardLoading", {
|
|
|
21
21
|
return _cardLoading.CardLoading;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "MediaInlineCard", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function get() {
|
|
27
|
-
return
|
|
27
|
+
return _root.MediaInlineCard;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "defaultImageCardDimensions", {
|
|
@@ -33,16 +33,16 @@ Object.defineProperty(exports, "defaultImageCardDimensions", {
|
|
|
33
33
|
return _cardDimensions.defaultImageCardDimensions;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports, "
|
|
36
|
+
Object.defineProperty(exports, "fileCardImageViewSelectedSelector", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function get() {
|
|
39
|
-
return _cardImageView.
|
|
39
|
+
return _cardImageView.fileCardImageViewSelectedSelector;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
42
|
+
Object.defineProperty(exports, "fileCardImageViewSelector", {
|
|
43
43
|
enumerable: true,
|
|
44
44
|
get: function get() {
|
|
45
|
-
return _cardImageView.
|
|
45
|
+
return _cardImageView.fileCardImageViewSelector;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "inlinePlayerClassName", {
|
|
@@ -3,33 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.relevantFeatureFlagNames = exports.fireScreenEvent = exports.fireOperationalEvent = exports.fireCopiedEvent = exports.fireCommencedEvent = void 0;
|
|
7
7
|
|
|
8
8
|
var _analytics = require("../../utils/analytics");
|
|
9
9
|
|
|
10
|
-
var relevantFeatureFlagNames = ['newCardExperience', '
|
|
10
|
+
var relevantFeatureFlagNames = ['newCardExperience', 'captions', 'timestampOnVideo'];
|
|
11
11
|
exports.relevantFeatureFlagNames = relevantFeatureFlagNames;
|
|
12
12
|
|
|
13
|
-
var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes) {
|
|
14
|
-
var _ref = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {},
|
|
15
|
-
cardPreview = _ref.cardPreview,
|
|
16
|
-
error = _ref.error;
|
|
17
|
-
|
|
13
|
+
var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, error) {
|
|
18
14
|
var fireEvent = function fireEvent(payload) {
|
|
19
15
|
return (0, _analytics.fireMediaCardEvent)(payload, createAnalyticsEvent);
|
|
20
16
|
};
|
|
21
17
|
|
|
22
18
|
switch (status) {
|
|
23
19
|
case 'complete':
|
|
24
|
-
|
|
25
|
-
* A Card that is considered Complete and has no preview,
|
|
26
|
-
* reflects an expected behaviour, and thus a legitimate
|
|
27
|
-
* success case to be logged.
|
|
28
|
-
*/
|
|
29
|
-
if (!(cardPreview !== null && cardPreview !== void 0 && cardPreview.dataURI)) {
|
|
30
|
-
fireEvent((0, _analytics.getRenderSucceededEventPayload)(fileAttributes, performanceAttributes));
|
|
31
|
-
}
|
|
32
|
-
|
|
20
|
+
fireEvent((0, _analytics.getRenderSucceededEventPayload)(fileAttributes, performanceAttributes));
|
|
33
21
|
break;
|
|
34
22
|
|
|
35
23
|
case 'failed-processing':
|