@atlaskit/media-card 73.5.1 → 73.6.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 +15 -0
- package/classnames/package.json +1 -0
- package/dist/cjs/root/card/cardAnalytics.js +18 -9
- package/dist/cjs/root/card/index.js +22 -2
- package/dist/cjs/root/cardView.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +27 -17
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/root/card/cardAnalytics.js +5 -3
- package/dist/es2019/root/card/index.js +25 -3
- package/dist/es2019/root/cardView.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +26 -17
- package/dist/es2019/version.json +1 -1
- package/dist/esm/root/card/cardAnalytics.js +13 -9
- package/dist/esm/root/card/index.js +24 -3
- package/dist/esm/root/cardView.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +26 -17
- package/dist/esm/version.json +1 -1
- package/dist/types/root/card/cardAnalytics.d.ts +9 -0
- package/dist/types/root/card/index.d.ts +3 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types/utils/ufoExperiences.d.ts +3 -2
- package/in-product/package.json +1 -0
- package/package.json +9 -8
- package/types/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 73.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b4fd2a59367`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b4fd2a59367) - Attach media environment and region to the media-card UFO events
|
|
8
|
+
- [`7e767393469`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7e767393469) - Add ufo feature flag logging to `media-card`
|
|
9
|
+
- [`ade1a5c3e23`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ade1a5c3e23) - Flagged events with file states processing and uploading for UFO payload
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`bf0e7c8e46b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bf0e7c8e46b) - [MEX-1413] Hot fix for remove useMediaPickerAuthProvider flag
|
|
14
|
+
- [`79c431ca1a6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c431ca1a6) - Removed "Creating Preview" message for files already processed
|
|
15
|
+
- [`f87afac53b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f87afac53b3) - Add ufo logging for media-card
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 73.5.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/classnames/package.json
CHANGED
|
@@ -3,25 +3,34 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getRelevantFeatureFlagNames = exports.fireScreenEvent = exports.fireOperationalEvent = exports.fireCopiedEvent = exports.fireCommencedEvent = void 0;
|
|
6
|
+
exports.getRelevantFeatureFlagNames = exports.getRelevantFeatureFlagKeysWithAllProducts = exports.fireScreenEvent = exports.fireOperationalEvent = exports.fireCopiedEvent = exports.fireCommencedEvent = exports.REQUIRED_FEATURE_FLAGS = void 0;
|
|
7
7
|
|
|
8
8
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
9
9
|
|
|
10
10
|
var _analytics = require("../../utils/analytics");
|
|
11
11
|
|
|
12
|
+
var REQUIRED_FEATURE_FLAGS = {
|
|
13
|
+
newCardExperience: true,
|
|
14
|
+
captions: true,
|
|
15
|
+
timestampOnVideo: true,
|
|
16
|
+
observedWidth: true,
|
|
17
|
+
mediaInline: false,
|
|
18
|
+
folderUploads: false
|
|
19
|
+
};
|
|
20
|
+
exports.REQUIRED_FEATURE_FLAGS = REQUIRED_FEATURE_FLAGS;
|
|
21
|
+
|
|
12
22
|
var getRelevantFeatureFlagNames = function getRelevantFeatureFlagNames() {
|
|
13
|
-
return (0, _mediaCommon.filterFeatureFlagNames)(
|
|
14
|
-
newCardExperience: true,
|
|
15
|
-
captions: true,
|
|
16
|
-
timestampOnVideo: true,
|
|
17
|
-
observedWidth: true,
|
|
18
|
-
mediaInline: false,
|
|
19
|
-
folderUploads: false
|
|
20
|
-
});
|
|
23
|
+
return (0, _mediaCommon.filterFeatureFlagNames)(REQUIRED_FEATURE_FLAGS);
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
exports.getRelevantFeatureFlagNames = getRelevantFeatureFlagNames;
|
|
24
27
|
|
|
28
|
+
var getRelevantFeatureFlagKeysWithAllProducts = function getRelevantFeatureFlagKeysWithAllProducts() {
|
|
29
|
+
return (0, _mediaCommon.filterFeatureFlagKeysAllProducts)(REQUIRED_FEATURE_FLAGS);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.getRelevantFeatureFlagKeysWithAllProducts = getRelevantFeatureFlagKeysWithAllProducts;
|
|
33
|
+
|
|
25
34
|
var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability, error) {
|
|
26
35
|
var fireEvent = function fireEvent(payload) {
|
|
27
36
|
return (0, _analytics.fireMediaCardEvent)(payload, createAnalyticsEvent);
|
|
@@ -107,6 +107,10 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
107
107
|
_this = _super.call(this, props);
|
|
108
108
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "internalOccurrenceKey", (0, _generateUniqueId.generateUniqueId)());
|
|
109
109
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hasBeenMounted", false);
|
|
110
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fileStateFlags", {
|
|
111
|
+
wasStatusUploading: false,
|
|
112
|
+
wasStatusProcessing: false
|
|
113
|
+
});
|
|
110
114
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "viewportPreAnchorRef", /*#__PURE__*/(0, _react.createRef)());
|
|
111
115
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "viewportPostAnchorRef", /*#__PURE__*/(0, _react.createRef)());
|
|
112
116
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ssrReliability", {
|
|
@@ -815,6 +819,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
815
819
|
var isDifferent = (0, _mediaClient2.isDifferentIdentifier)(prevIdentifier, identifier);
|
|
816
820
|
var turnedVisible = !prevIsCardVisible && isCardVisible;
|
|
817
821
|
var isNewMediaClient = prevMediaClient !== mediaClient;
|
|
822
|
+
this.updateFileStateFlag(fileState);
|
|
818
823
|
|
|
819
824
|
if ((0, _mediaClient2.isExternalImageIdentifier)(identifier) && isDifferent) {
|
|
820
825
|
this.fireCommencedEvent();
|
|
@@ -890,6 +895,21 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
890
895
|
this.fireCommencedEvent();
|
|
891
896
|
this.subscribeInternalFile(identifier);
|
|
892
897
|
}
|
|
898
|
+
}, {
|
|
899
|
+
key: "updateFileStateFlag",
|
|
900
|
+
value: function updateFileStateFlag(fileState) {
|
|
901
|
+
if (!fileState) {
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
var status = fileState.status;
|
|
906
|
+
|
|
907
|
+
if (status === 'processing') {
|
|
908
|
+
this.fileStateFlags.wasStatusProcessing = true;
|
|
909
|
+
} else if (status === 'uploading') {
|
|
910
|
+
this.fileStateFlags.wasStatusUploading = true;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
893
913
|
}, {
|
|
894
914
|
key: "subscribeInternalFile",
|
|
895
915
|
value: function subscribeInternalFile(identifier) {
|
|
@@ -957,7 +977,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
957
977
|
error = _this$state7.error;
|
|
958
978
|
var createAnalyticsEvent = this.props.createAnalyticsEvent;
|
|
959
979
|
createAnalyticsEvent && (0, _cardAnalytics.fireOperationalEvent)(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), this.ssrReliability, error);
|
|
960
|
-
(0, _ufoExperiences.completeUfoExperience)(this.internalOccurrenceKey, status, this.fileAttributes, this.ssrReliability, error);
|
|
980
|
+
(0, _ufoExperiences.completeUfoExperience)(this.internalOccurrenceKey, status, this.fileAttributes, this.fileStateFlags, this.ssrReliability, (0, _cardAnalytics.getRelevantFeatureFlagKeysWithAllProducts)(), error);
|
|
961
981
|
}
|
|
962
982
|
}, {
|
|
963
983
|
key: "fireCommencedEvent",
|
|
@@ -969,7 +989,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
969
989
|
durationSincePageStart: this.timeElapsedTillCommenced
|
|
970
990
|
}
|
|
971
991
|
});
|
|
972
|
-
(0, _ufoExperiences.startUfoExperience)(this.internalOccurrenceKey);
|
|
992
|
+
(0, _ufoExperiences.startUfoExperience)(this.internalOccurrenceKey, (0, _cardAnalytics.getRelevantFeatureFlagKeysWithAllProducts)());
|
|
973
993
|
}
|
|
974
994
|
}, {
|
|
975
995
|
key: "actions",
|
|
@@ -297,7 +297,6 @@ var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
297
297
|
});
|
|
298
298
|
|
|
299
299
|
case 'processing':
|
|
300
|
-
case 'loading-preview':
|
|
301
300
|
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
302
301
|
iconMessage: !didImageRender && !isZeroSize ? /*#__PURE__*/_react.default.createElement(_iconMessage.CreatingPreview, {
|
|
303
302
|
disableAnimation: disableAnimation
|
|
@@ -347,6 +346,7 @@ var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
347
346
|
iconMessage: iconMessage
|
|
348
347
|
});
|
|
349
348
|
|
|
349
|
+
case 'loading-preview':
|
|
350
350
|
case 'loading':
|
|
351
351
|
default:
|
|
352
352
|
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
@@ -15,20 +15,23 @@ var _version = require("../version.json");
|
|
|
15
15
|
|
|
16
16
|
var _analytics = require("./analytics");
|
|
17
17
|
|
|
18
|
+
var _mediaClient = require("@atlaskit/media-client");
|
|
19
|
+
|
|
18
20
|
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; }
|
|
19
21
|
|
|
20
22
|
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; }
|
|
21
23
|
|
|
22
24
|
var concurrentExperience;
|
|
23
25
|
|
|
24
|
-
var getExperience = function getExperience(id) {
|
|
26
|
+
var getExperience = function getExperience(id, featureFlagsKeys) {
|
|
25
27
|
if (!concurrentExperience) {
|
|
26
28
|
var inlineExperience = {
|
|
27
29
|
platform: {
|
|
28
30
|
component: 'media-card'
|
|
29
31
|
},
|
|
30
32
|
type: _ufo.ExperienceTypes.Experience,
|
|
31
|
-
performanceType: _ufo.ExperiencePerformanceTypes.InlineResult
|
|
33
|
+
performanceType: _ufo.ExperiencePerformanceTypes.InlineResult,
|
|
34
|
+
featureFlagsKeys: featureFlagsKeys
|
|
32
35
|
};
|
|
33
36
|
concurrentExperience = new _ufo.ConcurrentExperience('media-card-render', inlineExperience);
|
|
34
37
|
}
|
|
@@ -36,35 +39,38 @@ var getExperience = function getExperience(id) {
|
|
|
36
39
|
return concurrentExperience.getInstance(id);
|
|
37
40
|
};
|
|
38
41
|
|
|
39
|
-
var startUfoExperience = function startUfoExperience(id) {
|
|
40
|
-
getExperience(id).start();
|
|
42
|
+
var startUfoExperience = function startUfoExperience(id, featureFlagsKeys) {
|
|
43
|
+
getExperience(id, featureFlagsKeys).start();
|
|
41
44
|
};
|
|
42
45
|
|
|
43
46
|
exports.startUfoExperience = startUfoExperience;
|
|
44
47
|
|
|
45
|
-
var completeUfoExperience = function completeUfoExperience(id, status, fileAttributes, ssrReliability, error) {
|
|
48
|
+
var completeUfoExperience = function completeUfoExperience(id, status, fileAttributes, fileStateFlags, ssrReliability, featureFlagsKeys, error) {
|
|
46
49
|
switch (status) {
|
|
47
50
|
case 'complete':
|
|
48
|
-
succeedUfoExperience(id, {
|
|
51
|
+
succeedUfoExperience(id, featureFlagsKeys, {
|
|
49
52
|
fileAttributes: fileAttributes,
|
|
50
|
-
ssrReliability: ssrReliability
|
|
53
|
+
ssrReliability: ssrReliability,
|
|
54
|
+
fileStateFlags: fileStateFlags
|
|
51
55
|
});
|
|
52
56
|
break;
|
|
53
57
|
|
|
54
58
|
case 'failed-processing':
|
|
55
|
-
failUfoExperience(id, {
|
|
59
|
+
failUfoExperience(id, featureFlagsKeys, {
|
|
56
60
|
fileAttributes: fileAttributes,
|
|
57
61
|
failReason: 'failed-processing',
|
|
58
|
-
ssrReliability: ssrReliability
|
|
62
|
+
ssrReliability: ssrReliability,
|
|
63
|
+
fileStateFlags: fileStateFlags
|
|
59
64
|
});
|
|
60
65
|
break;
|
|
61
66
|
|
|
62
67
|
case 'error':
|
|
63
|
-
error && failUfoExperience(id, _objectSpread(_objectSpread({
|
|
68
|
+
error && failUfoExperience(id, featureFlagsKeys, _objectSpread(_objectSpread({
|
|
64
69
|
fileAttributes: fileAttributes
|
|
65
70
|
}, (0, _analytics.extractErrorInfo)(error)), {}, {
|
|
66
71
|
request: (0, _analytics.getRenderErrorRequestMetadata)(error),
|
|
67
|
-
ssrReliability: ssrReliability
|
|
72
|
+
ssrReliability: ssrReliability,
|
|
73
|
+
fileStateFlags: fileStateFlags
|
|
68
74
|
}));
|
|
69
75
|
break;
|
|
70
76
|
}
|
|
@@ -72,20 +78,24 @@ var completeUfoExperience = function completeUfoExperience(id, status, fileAttri
|
|
|
72
78
|
|
|
73
79
|
exports.completeUfoExperience = completeUfoExperience;
|
|
74
80
|
|
|
75
|
-
var succeedUfoExperience = function succeedUfoExperience(id, properties) {
|
|
76
|
-
getExperience(id).success({
|
|
81
|
+
var succeedUfoExperience = function succeedUfoExperience(id, featureFlagsKeys, properties) {
|
|
82
|
+
getExperience(id, featureFlagsKeys).success({
|
|
77
83
|
metadata: _objectSpread(_objectSpread({}, properties), {}, {
|
|
78
84
|
packageName: _version.name,
|
|
79
|
-
packageVersion: _version.version
|
|
85
|
+
packageVersion: _version.version,
|
|
86
|
+
mediaEnvironment: (0, _mediaClient.getMediaEnvironment)(),
|
|
87
|
+
mediaRegion: (0, _mediaClient.getMediaRegion)()
|
|
80
88
|
})
|
|
81
89
|
});
|
|
82
90
|
};
|
|
83
91
|
|
|
84
|
-
var failUfoExperience = function failUfoExperience(id, properties) {
|
|
85
|
-
getExperience(id).failure({
|
|
92
|
+
var failUfoExperience = function failUfoExperience(id, featureFlagsKeys, properties) {
|
|
93
|
+
getExperience(id, featureFlagsKeys).failure({
|
|
86
94
|
metadata: _objectSpread(_objectSpread({}, properties), {}, {
|
|
87
95
|
packageName: _version.name,
|
|
88
|
-
packageVersion: _version.version
|
|
96
|
+
packageVersion: _version.version,
|
|
97
|
+
mediaEnvironment: (0, _mediaClient.getMediaEnvironment)(),
|
|
98
|
+
mediaRegion: (0, _mediaClient.getMediaRegion)()
|
|
89
99
|
})
|
|
90
100
|
});
|
|
91
101
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { filterFeatureFlagNames } from '@atlaskit/media-common';
|
|
1
|
+
import { filterFeatureFlagNames, filterFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
2
2
|
import { fireMediaCardEvent, getRenderSucceededEventPayload, getRenderErrorEventPayload, getRenderFailedFileStatusPayload, getCopiedFilePayload, getRenderCommencedEventPayload, getRenderPreviewableCardPayload } from '../../utils/analytics';
|
|
3
|
-
export const
|
|
3
|
+
export const REQUIRED_FEATURE_FLAGS = {
|
|
4
4
|
newCardExperience: true,
|
|
5
5
|
captions: true,
|
|
6
6
|
timestampOnVideo: true,
|
|
7
7
|
observedWidth: true,
|
|
8
8
|
mediaInline: false,
|
|
9
9
|
folderUploads: false
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export const getRelevantFeatureFlagNames = () => filterFeatureFlagNames(REQUIRED_FEATURE_FLAGS);
|
|
12
|
+
export const getRelevantFeatureFlagKeysWithAllProducts = () => filterFeatureFlagKeysAllProducts(REQUIRED_FEATURE_FLAGS);
|
|
11
13
|
export const fireOperationalEvent = (createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability, error) => {
|
|
12
14
|
const fireEvent = payload => fireMediaCardEvent(payload, createAnalyticsEvent);
|
|
13
15
|
|
|
@@ -16,7 +16,7 @@ import { getFileDetails } from '../../utils/metadata';
|
|
|
16
16
|
import { InlinePlayer } from '../inlinePlayer';
|
|
17
17
|
import { getFileAttributes, extractErrorInfo } from '../../utils/analytics';
|
|
18
18
|
import { isLocalPreviewError, MediaCardError, ensureMediaCardError, ImageLoadError } from '../../errors';
|
|
19
|
-
import { fireOperationalEvent, fireCommencedEvent, getRelevantFeatureFlagNames, fireCopiedEvent, fireScreenEvent } from './cardAnalytics';
|
|
19
|
+
import { fireOperationalEvent, fireCommencedEvent, getRelevantFeatureFlagNames, getRelevantFeatureFlagKeysWithAllProducts, fireCopiedEvent, fireScreenEvent } from './cardAnalytics';
|
|
20
20
|
import getDocument from '../../utils/document';
|
|
21
21
|
import { StoreSSRDataScript, getSSRData } from '../../utils/globalScope';
|
|
22
22
|
import { getCardStateFromFileState, createStateUpdater } from './cardState';
|
|
@@ -37,6 +37,11 @@ export class CardBase extends Component {
|
|
|
37
37
|
|
|
38
38
|
_defineProperty(this, "hasBeenMounted", false);
|
|
39
39
|
|
|
40
|
+
_defineProperty(this, "fileStateFlags", {
|
|
41
|
+
wasStatusUploading: false,
|
|
42
|
+
wasStatusProcessing: false
|
|
43
|
+
});
|
|
44
|
+
|
|
40
45
|
_defineProperty(this, "viewportPreAnchorRef", /*#__PURE__*/createRef());
|
|
41
46
|
|
|
42
47
|
_defineProperty(this, "viewportPostAnchorRef", /*#__PURE__*/createRef());
|
|
@@ -763,6 +768,7 @@ export class CardBase extends Component {
|
|
|
763
768
|
const isDifferent = isDifferentIdentifier(prevIdentifier, identifier);
|
|
764
769
|
const turnedVisible = !prevIsCardVisible && isCardVisible;
|
|
765
770
|
const isNewMediaClient = prevMediaClient !== mediaClient;
|
|
771
|
+
this.updateFileStateFlag(fileState);
|
|
766
772
|
|
|
767
773
|
if (isExternalImageIdentifier(identifier) && isDifferent) {
|
|
768
774
|
this.fireCommencedEvent();
|
|
@@ -839,6 +845,22 @@ export class CardBase extends Component {
|
|
|
839
845
|
this.subscribeInternalFile(identifier);
|
|
840
846
|
}
|
|
841
847
|
|
|
848
|
+
updateFileStateFlag(fileState) {
|
|
849
|
+
if (!fileState) {
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
const {
|
|
854
|
+
status
|
|
855
|
+
} = fileState;
|
|
856
|
+
|
|
857
|
+
if (status === 'processing') {
|
|
858
|
+
this.fileStateFlags.wasStatusProcessing = true;
|
|
859
|
+
} else if (status === 'uploading') {
|
|
860
|
+
this.fileStateFlags.wasStatusUploading = true;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
842
864
|
subscribeInternalFile(identifier) {
|
|
843
865
|
const {
|
|
844
866
|
mediaClient
|
|
@@ -908,7 +930,7 @@ export class CardBase extends Component {
|
|
|
908
930
|
createAnalyticsEvent
|
|
909
931
|
} = this.props;
|
|
910
932
|
createAnalyticsEvent && fireOperationalEvent(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), this.ssrReliability, error);
|
|
911
|
-
completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.ssrReliability, error);
|
|
933
|
+
completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.fileStateFlags, this.ssrReliability, getRelevantFeatureFlagKeysWithAllProducts(), error);
|
|
912
934
|
}
|
|
913
935
|
|
|
914
936
|
fireCommencedEvent() {
|
|
@@ -921,7 +943,7 @@ export class CardBase extends Component {
|
|
|
921
943
|
durationSincePageStart: this.timeElapsedTillCommenced
|
|
922
944
|
}
|
|
923
945
|
});
|
|
924
|
-
startUfoExperience(this.internalOccurrenceKey);
|
|
946
|
+
startUfoExperience(this.internalOccurrenceKey, getRelevantFeatureFlagKeysWithAllProducts());
|
|
925
947
|
}
|
|
926
948
|
|
|
927
949
|
get actions() {
|
|
@@ -237,7 +237,6 @@ export class CardViewBase extends React.Component {
|
|
|
237
237
|
};
|
|
238
238
|
|
|
239
239
|
case 'processing':
|
|
240
|
-
case 'loading-preview':
|
|
241
240
|
return { ...defaultConfig,
|
|
242
241
|
iconMessage: !didImageRender && !isZeroSize ? /*#__PURE__*/React.createElement(CreatingPreview, {
|
|
243
242
|
disableAnimation: disableAnimation
|
|
@@ -286,6 +285,7 @@ export class CardViewBase extends React.Component {
|
|
|
286
285
|
iconMessage
|
|
287
286
|
};
|
|
288
287
|
|
|
288
|
+
case 'loading-preview':
|
|
289
289
|
case 'loading':
|
|
290
290
|
default:
|
|
291
291
|
return { ...defaultConfig,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo';
|
|
2
2
|
import { name as packageName, version as packageVersion } from '../version.json';
|
|
3
3
|
import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
4
|
+
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
4
5
|
let concurrentExperience;
|
|
5
6
|
|
|
6
|
-
const getExperience = id => {
|
|
7
|
+
const getExperience = (id, featureFlagsKeys) => {
|
|
7
8
|
if (!concurrentExperience) {
|
|
8
9
|
const inlineExperience = {
|
|
9
10
|
platform: {
|
|
10
11
|
component: 'media-card'
|
|
11
12
|
},
|
|
12
13
|
type: ExperienceTypes.Experience,
|
|
13
|
-
performanceType: ExperiencePerformanceTypes.InlineResult
|
|
14
|
+
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
15
|
+
featureFlagsKeys
|
|
14
16
|
};
|
|
15
17
|
concurrentExperience = new ConcurrentExperience('media-card-render', inlineExperience);
|
|
16
18
|
}
|
|
@@ -18,51 +20,58 @@ const getExperience = id => {
|
|
|
18
20
|
return concurrentExperience.getInstance(id);
|
|
19
21
|
};
|
|
20
22
|
|
|
21
|
-
export const startUfoExperience = id => {
|
|
22
|
-
getExperience(id).start();
|
|
23
|
+
export const startUfoExperience = (id, featureFlagsKeys) => {
|
|
24
|
+
getExperience(id, featureFlagsKeys).start();
|
|
23
25
|
};
|
|
24
|
-
export const completeUfoExperience = (id, status, fileAttributes, ssrReliability, error) => {
|
|
26
|
+
export const completeUfoExperience = (id, status, fileAttributes, fileStateFlags, ssrReliability, featureFlagsKeys, error) => {
|
|
25
27
|
switch (status) {
|
|
26
28
|
case 'complete':
|
|
27
|
-
succeedUfoExperience(id, {
|
|
29
|
+
succeedUfoExperience(id, featureFlagsKeys, {
|
|
28
30
|
fileAttributes,
|
|
29
|
-
ssrReliability
|
|
31
|
+
ssrReliability,
|
|
32
|
+
fileStateFlags
|
|
30
33
|
});
|
|
31
34
|
break;
|
|
32
35
|
|
|
33
36
|
case 'failed-processing':
|
|
34
|
-
failUfoExperience(id, {
|
|
37
|
+
failUfoExperience(id, featureFlagsKeys, {
|
|
35
38
|
fileAttributes,
|
|
36
39
|
failReason: 'failed-processing',
|
|
37
|
-
ssrReliability
|
|
40
|
+
ssrReliability,
|
|
41
|
+
fileStateFlags
|
|
38
42
|
});
|
|
39
43
|
break;
|
|
40
44
|
|
|
41
45
|
case 'error':
|
|
42
|
-
error && failUfoExperience(id, {
|
|
46
|
+
error && failUfoExperience(id, featureFlagsKeys, {
|
|
43
47
|
fileAttributes,
|
|
44
48
|
...extractErrorInfo(error),
|
|
45
49
|
request: getRenderErrorRequestMetadata(error),
|
|
46
|
-
ssrReliability
|
|
50
|
+
ssrReliability,
|
|
51
|
+
fileStateFlags
|
|
47
52
|
});
|
|
48
53
|
break;
|
|
49
54
|
}
|
|
50
55
|
};
|
|
51
56
|
|
|
52
|
-
const succeedUfoExperience = (id, properties) => {
|
|
53
|
-
getExperience(id).success({
|
|
57
|
+
const succeedUfoExperience = (id, featureFlagsKeys, properties) => {
|
|
58
|
+
getExperience(id, featureFlagsKeys).success({
|
|
54
59
|
metadata: { ...properties,
|
|
55
60
|
packageName,
|
|
56
|
-
packageVersion
|
|
61
|
+
packageVersion,
|
|
62
|
+
mediaEnvironment: getMediaEnvironment(),
|
|
63
|
+
mediaRegion: getMediaRegion()
|
|
57
64
|
}
|
|
58
65
|
});
|
|
59
66
|
};
|
|
60
67
|
|
|
61
|
-
const failUfoExperience = (id, properties) => {
|
|
62
|
-
getExperience(id).failure({
|
|
68
|
+
const failUfoExperience = (id, featureFlagsKeys, properties) => {
|
|
69
|
+
getExperience(id, featureFlagsKeys).failure({
|
|
63
70
|
metadata: { ...properties,
|
|
64
71
|
packageName,
|
|
65
|
-
packageVersion
|
|
72
|
+
packageVersion,
|
|
73
|
+
mediaEnvironment: getMediaEnvironment(),
|
|
74
|
+
mediaRegion: getMediaRegion()
|
|
66
75
|
}
|
|
67
76
|
});
|
|
68
77
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { filterFeatureFlagNames } from '@atlaskit/media-common';
|
|
1
|
+
import { filterFeatureFlagNames, filterFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
2
2
|
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
|
+
};
|
|
3
11
|
export var getRelevantFeatureFlagNames = function getRelevantFeatureFlagNames() {
|
|
4
|
-
return filterFeatureFlagNames(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
observedWidth: true,
|
|
9
|
-
mediaInline: false,
|
|
10
|
-
folderUploads: false
|
|
11
|
-
});
|
|
12
|
+
return filterFeatureFlagNames(REQUIRED_FEATURE_FLAGS);
|
|
13
|
+
};
|
|
14
|
+
export var getRelevantFeatureFlagKeysWithAllProducts = function getRelevantFeatureFlagKeysWithAllProducts() {
|
|
15
|
+
return filterFeatureFlagKeysAllProducts(REQUIRED_FEATURE_FLAGS);
|
|
12
16
|
};
|
|
13
17
|
export var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability, error) {
|
|
14
18
|
var fireEvent = function fireEvent(payload) {
|
|
@@ -34,7 +34,7 @@ import { getFileDetails } from '../../utils/metadata';
|
|
|
34
34
|
import { InlinePlayer } from '../inlinePlayer';
|
|
35
35
|
import { getFileAttributes, extractErrorInfo } from '../../utils/analytics';
|
|
36
36
|
import { isLocalPreviewError, MediaCardError, ensureMediaCardError, ImageLoadError } from '../../errors';
|
|
37
|
-
import { fireOperationalEvent as _fireOperationalEvent, fireCommencedEvent as _fireCommencedEvent, getRelevantFeatureFlagNames, fireCopiedEvent, fireScreenEvent } from './cardAnalytics';
|
|
37
|
+
import { fireOperationalEvent as _fireOperationalEvent, fireCommencedEvent as _fireCommencedEvent, getRelevantFeatureFlagNames, getRelevantFeatureFlagKeysWithAllProducts, fireCopiedEvent, fireScreenEvent } from './cardAnalytics';
|
|
38
38
|
import getDocument from '../../utils/document';
|
|
39
39
|
import { StoreSSRDataScript, getSSRData } from '../../utils/globalScope';
|
|
40
40
|
import { getCardStateFromFileState, createStateUpdater } from './cardState';
|
|
@@ -63,6 +63,11 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
63
63
|
|
|
64
64
|
_defineProperty(_assertThisInitialized(_this), "hasBeenMounted", false);
|
|
65
65
|
|
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "fileStateFlags", {
|
|
67
|
+
wasStatusUploading: false,
|
|
68
|
+
wasStatusProcessing: false
|
|
69
|
+
});
|
|
70
|
+
|
|
66
71
|
_defineProperty(_assertThisInitialized(_this), "viewportPreAnchorRef", /*#__PURE__*/createRef());
|
|
67
72
|
|
|
68
73
|
_defineProperty(_assertThisInitialized(_this), "viewportPostAnchorRef", /*#__PURE__*/createRef());
|
|
@@ -800,6 +805,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
800
805
|
var isDifferent = isDifferentIdentifier(prevIdentifier, identifier);
|
|
801
806
|
var turnedVisible = !prevIsCardVisible && isCardVisible;
|
|
802
807
|
var isNewMediaClient = prevMediaClient !== mediaClient;
|
|
808
|
+
this.updateFileStateFlag(fileState);
|
|
803
809
|
|
|
804
810
|
if (isExternalImageIdentifier(identifier) && isDifferent) {
|
|
805
811
|
this.fireCommencedEvent();
|
|
@@ -875,6 +881,21 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
875
881
|
this.fireCommencedEvent();
|
|
876
882
|
this.subscribeInternalFile(identifier);
|
|
877
883
|
}
|
|
884
|
+
}, {
|
|
885
|
+
key: "updateFileStateFlag",
|
|
886
|
+
value: function updateFileStateFlag(fileState) {
|
|
887
|
+
if (!fileState) {
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
var status = fileState.status;
|
|
892
|
+
|
|
893
|
+
if (status === 'processing') {
|
|
894
|
+
this.fileStateFlags.wasStatusProcessing = true;
|
|
895
|
+
} else if (status === 'uploading') {
|
|
896
|
+
this.fileStateFlags.wasStatusUploading = true;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
878
899
|
}, {
|
|
879
900
|
key: "subscribeInternalFile",
|
|
880
901
|
value: function subscribeInternalFile(identifier) {
|
|
@@ -942,7 +963,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
942
963
|
error = _this$state7.error;
|
|
943
964
|
var createAnalyticsEvent = this.props.createAnalyticsEvent;
|
|
944
965
|
createAnalyticsEvent && _fireOperationalEvent(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), this.ssrReliability, error);
|
|
945
|
-
completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.ssrReliability, error);
|
|
966
|
+
completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.fileStateFlags, this.ssrReliability, getRelevantFeatureFlagKeysWithAllProducts(), error);
|
|
946
967
|
}
|
|
947
968
|
}, {
|
|
948
969
|
key: "fireCommencedEvent",
|
|
@@ -954,7 +975,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
954
975
|
durationSincePageStart: this.timeElapsedTillCommenced
|
|
955
976
|
}
|
|
956
977
|
});
|
|
957
|
-
startUfoExperience(this.internalOccurrenceKey);
|
|
978
|
+
startUfoExperience(this.internalOccurrenceKey, getRelevantFeatureFlagKeysWithAllProducts());
|
|
958
979
|
}
|
|
959
980
|
}, {
|
|
960
981
|
key: "actions",
|
|
@@ -259,7 +259,6 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
case 'processing':
|
|
262
|
-
case 'loading-preview':
|
|
263
262
|
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
264
263
|
iconMessage: !didImageRender && !isZeroSize ? /*#__PURE__*/React.createElement(CreatingPreview, {
|
|
265
264
|
disableAnimation: disableAnimation
|
|
@@ -309,6 +308,7 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
309
308
|
iconMessage: iconMessage
|
|
310
309
|
});
|
|
311
310
|
|
|
311
|
+
case 'loading-preview':
|
|
312
312
|
case 'loading':
|
|
313
313
|
default:
|
|
314
314
|
return _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
@@ -7,16 +7,18 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo';
|
|
8
8
|
import { name as packageName, version as packageVersion } from '../version.json';
|
|
9
9
|
import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
10
|
+
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
11
|
var concurrentExperience;
|
|
11
12
|
|
|
12
|
-
var getExperience = function getExperience(id) {
|
|
13
|
+
var getExperience = function getExperience(id, featureFlagsKeys) {
|
|
13
14
|
if (!concurrentExperience) {
|
|
14
15
|
var inlineExperience = {
|
|
15
16
|
platform: {
|
|
16
17
|
component: 'media-card'
|
|
17
18
|
},
|
|
18
19
|
type: ExperienceTypes.Experience,
|
|
19
|
-
performanceType: ExperiencePerformanceTypes.InlineResult
|
|
20
|
+
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
21
|
+
featureFlagsKeys: featureFlagsKeys
|
|
20
22
|
};
|
|
21
23
|
concurrentExperience = new ConcurrentExperience('media-card-render', inlineExperience);
|
|
22
24
|
}
|
|
@@ -24,51 +26,58 @@ var getExperience = function getExperience(id) {
|
|
|
24
26
|
return concurrentExperience.getInstance(id);
|
|
25
27
|
};
|
|
26
28
|
|
|
27
|
-
export var startUfoExperience = function startUfoExperience(id) {
|
|
28
|
-
getExperience(id).start();
|
|
29
|
+
export var startUfoExperience = function startUfoExperience(id, featureFlagsKeys) {
|
|
30
|
+
getExperience(id, featureFlagsKeys).start();
|
|
29
31
|
};
|
|
30
|
-
export var completeUfoExperience = function completeUfoExperience(id, status, fileAttributes, ssrReliability, error) {
|
|
32
|
+
export var completeUfoExperience = function completeUfoExperience(id, status, fileAttributes, fileStateFlags, ssrReliability, featureFlagsKeys, error) {
|
|
31
33
|
switch (status) {
|
|
32
34
|
case 'complete':
|
|
33
|
-
succeedUfoExperience(id, {
|
|
35
|
+
succeedUfoExperience(id, featureFlagsKeys, {
|
|
34
36
|
fileAttributes: fileAttributes,
|
|
35
|
-
ssrReliability: ssrReliability
|
|
37
|
+
ssrReliability: ssrReliability,
|
|
38
|
+
fileStateFlags: fileStateFlags
|
|
36
39
|
});
|
|
37
40
|
break;
|
|
38
41
|
|
|
39
42
|
case 'failed-processing':
|
|
40
|
-
failUfoExperience(id, {
|
|
43
|
+
failUfoExperience(id, featureFlagsKeys, {
|
|
41
44
|
fileAttributes: fileAttributes,
|
|
42
45
|
failReason: 'failed-processing',
|
|
43
|
-
ssrReliability: ssrReliability
|
|
46
|
+
ssrReliability: ssrReliability,
|
|
47
|
+
fileStateFlags: fileStateFlags
|
|
44
48
|
});
|
|
45
49
|
break;
|
|
46
50
|
|
|
47
51
|
case 'error':
|
|
48
|
-
error && failUfoExperience(id, _objectSpread(_objectSpread({
|
|
52
|
+
error && failUfoExperience(id, featureFlagsKeys, _objectSpread(_objectSpread({
|
|
49
53
|
fileAttributes: fileAttributes
|
|
50
54
|
}, extractErrorInfo(error)), {}, {
|
|
51
55
|
request: getRenderErrorRequestMetadata(error),
|
|
52
|
-
ssrReliability: ssrReliability
|
|
56
|
+
ssrReliability: ssrReliability,
|
|
57
|
+
fileStateFlags: fileStateFlags
|
|
53
58
|
}));
|
|
54
59
|
break;
|
|
55
60
|
}
|
|
56
61
|
};
|
|
57
62
|
|
|
58
|
-
var succeedUfoExperience = function succeedUfoExperience(id, properties) {
|
|
59
|
-
getExperience(id).success({
|
|
63
|
+
var succeedUfoExperience = function succeedUfoExperience(id, featureFlagsKeys, properties) {
|
|
64
|
+
getExperience(id, featureFlagsKeys).success({
|
|
60
65
|
metadata: _objectSpread(_objectSpread({}, properties), {}, {
|
|
61
66
|
packageName: packageName,
|
|
62
|
-
packageVersion: packageVersion
|
|
67
|
+
packageVersion: packageVersion,
|
|
68
|
+
mediaEnvironment: getMediaEnvironment(),
|
|
69
|
+
mediaRegion: getMediaRegion()
|
|
63
70
|
})
|
|
64
71
|
});
|
|
65
72
|
};
|
|
66
73
|
|
|
67
|
-
var failUfoExperience = function failUfoExperience(id, properties) {
|
|
68
|
-
getExperience(id).failure({
|
|
74
|
+
var failUfoExperience = function failUfoExperience(id, featureFlagsKeys, properties) {
|
|
75
|
+
getExperience(id, featureFlagsKeys).failure({
|
|
69
76
|
metadata: _objectSpread(_objectSpread({}, properties), {}, {
|
|
70
77
|
packageName: packageName,
|
|
71
|
-
packageVersion: packageVersion
|
|
78
|
+
packageVersion: packageVersion,
|
|
79
|
+
mediaEnvironment: getMediaEnvironment(),
|
|
80
|
+
mediaRegion: getMediaRegion()
|
|
72
81
|
})
|
|
73
82
|
});
|
|
74
83
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -3,7 +3,16 @@ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { SSRStatus } from '../../utils/analytics';
|
|
4
4
|
import { CardStatus } from '../..';
|
|
5
5
|
import { MediaCardError } from './../../errors';
|
|
6
|
+
export declare const REQUIRED_FEATURE_FLAGS: {
|
|
7
|
+
newCardExperience: boolean;
|
|
8
|
+
captions: boolean;
|
|
9
|
+
timestampOnVideo: boolean;
|
|
10
|
+
observedWidth: boolean;
|
|
11
|
+
mediaInline: boolean;
|
|
12
|
+
folderUploads: boolean;
|
|
13
|
+
};
|
|
6
14
|
export declare const getRelevantFeatureFlagNames: () => (keyof import("@atlaskit/media-common").MediaFeatureFlags)[];
|
|
15
|
+
export declare const getRelevantFeatureFlagKeysWithAllProducts: () => string[];
|
|
7
16
|
export declare const fireOperationalEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, status: CardStatus, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, error?: MediaCardError | undefined) => void;
|
|
8
17
|
export declare const fireCommencedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => void;
|
|
9
18
|
export declare const fireCopiedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileId: string, cardRef: HTMLDivElement) => void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import { FileIdentifier, MediaSubscription } from '@atlaskit/media-client';
|
|
3
|
+
import { FileIdentifier, FileState, MediaSubscription } from '@atlaskit/media-client';
|
|
4
4
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
5
|
import { CardAction, CardProps, CardState } from '../..';
|
|
6
6
|
export declare type CardBaseProps = CardProps & WithAnalyticsEventsProps & Partial<WrappedComponentProps>;
|
|
7
7
|
export declare class CardBase extends Component<CardBaseProps, CardState> {
|
|
8
8
|
private internalOccurrenceKey;
|
|
9
9
|
private hasBeenMounted;
|
|
10
|
+
private fileStateFlags;
|
|
10
11
|
private viewportPreAnchorRef;
|
|
11
12
|
private viewportPostAnchorRef;
|
|
12
13
|
private ssrReliability;
|
|
@@ -25,6 +26,7 @@ export declare class CardBase extends Component<CardBaseProps, CardState> {
|
|
|
25
26
|
private setCacheSSRPreview;
|
|
26
27
|
private refetchSSRPreview;
|
|
27
28
|
private resolvePreview;
|
|
29
|
+
updateFileStateFlag(fileState?: FileState): void;
|
|
28
30
|
subscribeInternalFile(identifier: FileIdentifier): void;
|
|
29
31
|
private get requestedDimensions();
|
|
30
32
|
private get metadata();
|
package/dist/types/types.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export declare type FilePreviewStatus = {
|
|
|
5
5
|
hasPreview: boolean;
|
|
6
6
|
isSupportedByBrowser: boolean;
|
|
7
7
|
};
|
|
8
|
+
export declare type FileStateFlags = {
|
|
9
|
+
wasStatusProcessing: boolean;
|
|
10
|
+
wasStatusUploading: boolean;
|
|
11
|
+
};
|
|
8
12
|
export declare type CardAppearance = 'auto' | 'image' | 'square' | 'horizontal';
|
|
9
13
|
export declare type CardDimensionValue = number | string;
|
|
10
14
|
export declare type CardPreviewSource = 'local' | 'remote' | 'ssr-server' | 'ssr-client' | 'ssr-data' | 'cache-local' | 'cache-remote' | 'cache-ssr-client' | 'cache-ssr-server' | 'external';
|
|
@@ -2,5 +2,6 @@ import { CardStatus } from '../../src';
|
|
|
2
2
|
import { FileAttributes } from '@atlaskit/media-common';
|
|
3
3
|
import { SSRStatus } from './analytics';
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
5
|
+
import { FileStateFlags } from '../types';
|
|
6
|
+
export declare const startUfoExperience: (id: string, featureFlagsKeys: string[]) => void;
|
|
7
|
+
export declare const completeUfoExperience: (id: string, status: CardStatus, fileAttributes: FileAttributes, fileStateFlags: FileStateFlags, ssrReliability: SSRStatus, featureFlagsKeys: string[], error?: MediaCardError | undefined) => void;
|
package/in-product/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "73.
|
|
3
|
+
"version": "73.6.0",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
33
33
|
"@atlaskit/dropdown-menu": "^11.1.0",
|
|
34
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
34
|
+
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
35
35
|
"@atlaskit/icon": "^21.10.0",
|
|
36
36
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
37
|
-
"@atlaskit/media-client": "^
|
|
38
|
-
"@atlaskit/media-common": "^2.
|
|
39
|
-
"@atlaskit/media-ui": "^
|
|
40
|
-
"@atlaskit/media-viewer": "^46.
|
|
37
|
+
"@atlaskit/media-client": "^16.0.0",
|
|
38
|
+
"@atlaskit/media-common": "^2.13.0",
|
|
39
|
+
"@atlaskit/media-ui": "^22.0.0",
|
|
40
|
+
"@atlaskit/media-viewer": "^46.3.0",
|
|
41
41
|
"@atlaskit/spinner": "^15.1.0",
|
|
42
42
|
"@atlaskit/theme": "^12.1.0",
|
|
43
43
|
"@atlaskit/tooltip": "^17.5.0",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"@atlaskit/checkbox": "^12.3.0",
|
|
63
63
|
"@atlaskit/docs": "*",
|
|
64
64
|
"@atlaskit/inline-message": "^11.2.0",
|
|
65
|
-
"@atlaskit/media-core": "^
|
|
66
|
-
"@atlaskit/media-test-helpers": "^
|
|
65
|
+
"@atlaskit/media-core": "^33.0.0",
|
|
66
|
+
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
67
67
|
"@atlaskit/radio": "^5.3.2",
|
|
68
68
|
"@atlaskit/range": "^6.0.0",
|
|
69
69
|
"@atlaskit/select": "^15.2.1",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@atlaskit/visual-regression": "*",
|
|
73
73
|
"@atlaskit/webdriver-runner": "*",
|
|
74
74
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
75
|
+
"@atlassian/ufo": "^0.1.10",
|
|
75
76
|
"@testing-library/react": "^8.0.1",
|
|
76
77
|
"@types/classnames": "^2.2.6",
|
|
77
78
|
"@types/react-loadable": "^5.4.1",
|