@atlaskit/media-card 79.3.9 → 79.3.10
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 +9 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/styles.js +1 -2
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/styles.js +0 -2
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/styles.js +1 -2
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/example-helpers/svg-helpers/mediaApiTweaks.ts +39 -17
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 79.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#178862](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/178862)
|
|
8
|
+
[`c85957c962811`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c85957c962811) -
|
|
9
|
+
clean up fg
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 79.3.9
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
|
|
|
20
20
|
var _excluded = ["identifier"];
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
var packageName = "@atlaskit/media-card";
|
|
23
|
-
var packageVersion = "79.3.
|
|
23
|
+
var packageVersion = "79.3.9";
|
|
24
24
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
25
25
|
var identifier = _ref.identifier,
|
|
26
26
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
87
87
|
}(_react.default.Component);
|
|
88
88
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
89
89
|
var packageName = "@atlaskit/media-card";
|
|
90
|
-
var packageVersion = "79.3.
|
|
90
|
+
var packageVersion = "79.3.9";
|
|
91
91
|
|
|
92
92
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
93
93
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -8,7 +8,6 @@ exports.transition = exports.rgba = exports.getWrapperShadow = exports.getWrappe
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
10
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _getCSSUnitValue = require("../../utils/getCSSUnitValue");
|
|
13
12
|
var _cardDimensions = require("../../utils/cardDimensions");
|
|
14
13
|
var _styles = require("./tickBox/styles");
|
|
@@ -39,7 +38,7 @@ var getWrapperDimensions = exports.getWrapperDimensions = function getWrapperDim
|
|
|
39
38
|
var _getDefaultCardDimens = (0, _cardDimensions.getDefaultCardDimensions)(appearance),
|
|
40
39
|
defaultWidth = _getDefaultCardDimens.width,
|
|
41
40
|
defaultHeight = _getDefaultCardDimens.height;
|
|
42
|
-
return "\n
|
|
41
|
+
return "\n\t/* If container doesn't exists, it will fallback to this */\n\twidth: ".concat((0, _getCSSUnitValue.getCSSUnitValue)(width || defaultWidth), ";\n\n max-width: 100%;\n height: ").concat((0, _getCSSUnitValue.getCSSUnitValue)(height || defaultHeight), ";\n max-height: 100%;\n ");
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
// This is a trick to simulate the blue border without affecting the dimensions.
|
|
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
116
116
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
117
117
|
var analyticsContext = {
|
|
118
118
|
packageVersion: "@atlaskit/media-card",
|
|
119
|
-
packageName: "79.3.
|
|
119
|
+
packageName: "79.3.9",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
var packageName = "@atlaskit/media-card";
|
|
18
|
-
var packageVersion = "79.3.
|
|
18
|
+
var packageVersion = "79.3.9";
|
|
19
19
|
var SAMPLE_RATE = 0.05;
|
|
20
20
|
var concurrentExperience;
|
|
21
21
|
var getExperience = function getExperience(id) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "79.3.
|
|
12
|
+
const packageVersion = "79.3.9";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "79.3.
|
|
69
|
+
const packageVersion = "79.3.9";
|
|
70
70
|
|
|
71
71
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
72
72
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { N60A } from '@atlaskit/theme/colors';
|
|
2
2
|
import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
|
|
5
4
|
import { getDefaultCardDimensions } from '../../utils/cardDimensions';
|
|
6
5
|
import { tickBoxClassName, tickboxFixedStyles } from './tickBox/styles';
|
|
@@ -28,7 +27,6 @@ export const getWrapperDimensions = (dimensions, appearance) => {
|
|
|
28
27
|
height: defaultHeight
|
|
29
28
|
} = getDefaultCardDimensions(appearance);
|
|
30
29
|
return `
|
|
31
|
-
${fg('platform_fix_media_image_resizing') ? `@container view-page-content (min-width: 1px) { width: 100cqw; }` : ''}
|
|
32
30
|
/* If container doesn't exists, it will fallback to this */
|
|
33
31
|
width: ${getCSSUnitValue(width || defaultWidth)};
|
|
34
32
|
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "79.3.
|
|
40
|
+
packageName: "79.3.9",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
5
5
|
import { MediaCardError } from '../errors';
|
|
6
6
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
7
7
|
const packageName = "@atlaskit/media-card";
|
|
8
|
-
const packageVersion = "79.3.
|
|
8
|
+
const packageVersion = "79.3.9";
|
|
9
9
|
const SAMPLE_RATE = 0.05;
|
|
10
10
|
let concurrentExperience;
|
|
11
11
|
const getExperience = id => {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "79.3.
|
|
14
|
+
var packageVersion = "79.3.9";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "79.3.
|
|
83
|
+
var packageVersion = "79.3.9";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { N60A } from '@atlaskit/theme/colors';
|
|
3
3
|
import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
|
|
6
5
|
import { getDefaultCardDimensions } from '../../utils/cardDimensions';
|
|
7
6
|
import { tickBoxClassName, tickboxFixedStyles } from './tickBox/styles';
|
|
@@ -32,7 +31,7 @@ export var getWrapperDimensions = function getWrapperDimensions(dimensions, appe
|
|
|
32
31
|
var _getDefaultCardDimens = getDefaultCardDimensions(appearance),
|
|
33
32
|
defaultWidth = _getDefaultCardDimens.width,
|
|
34
33
|
defaultHeight = _getDefaultCardDimens.height;
|
|
35
|
-
return "\n
|
|
34
|
+
return "\n\t/* If container doesn't exists, it will fallback to this */\n\twidth: ".concat(getCSSUnitValue(width || defaultWidth), ";\n\n max-width: 100%;\n height: ").concat(getCSSUnitValue(height || defaultHeight), ";\n max-height: 100%;\n ");
|
|
36
35
|
};
|
|
37
36
|
|
|
38
37
|
// This is a trick to simulate the blue border without affecting the dimensions.
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "79.3.
|
|
104
|
+
packageName: "79.3.9",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
8
8
|
import { MediaCardError } from '../errors';
|
|
9
9
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "79.3.
|
|
11
|
+
var packageVersion = "79.3.9";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type MediaApi
|
|
1
|
+
import { type MediaApi } from '@atlaskit/media-client';
|
|
2
|
+
import { createServerUnauthorizedError } from '@atlaskit/media-client/test-helpers';
|
|
2
3
|
import { sleep } from '@atlaskit/media-test-helpers';
|
|
3
4
|
|
|
4
5
|
type Endpoints = Partial<Record<keyof MediaApi, number>>;
|
|
@@ -31,15 +32,9 @@ export const errorApiResponses = {
|
|
|
31
32
|
mediaApi.getFileBinary = async () => {
|
|
32
33
|
throw (
|
|
33
34
|
error ||
|
|
34
|
-
|
|
35
|
+
createServerUnauthorizedError({
|
|
36
|
+
endpoint: '/file/:id/binary',
|
|
35
37
|
method: 'GET',
|
|
36
|
-
endpoint: '/file/:id/inary',
|
|
37
|
-
mediaRegion: 'adev',
|
|
38
|
-
mediaEnv: 'adev',
|
|
39
|
-
traceContext: { traceId: 'some-traceId', spanId: 'some-spanId' },
|
|
40
|
-
attempts: 10,
|
|
41
|
-
clientExhaustedRetries: true,
|
|
42
|
-
statusCode: 430,
|
|
43
38
|
})
|
|
44
39
|
);
|
|
45
40
|
};
|
|
@@ -48,15 +43,42 @@ export const errorApiResponses = {
|
|
|
48
43
|
mediaApi.getImage = async () => {
|
|
49
44
|
throw (
|
|
50
45
|
error ||
|
|
51
|
-
|
|
52
|
-
method: 'GET',
|
|
46
|
+
createServerUnauthorizedError({
|
|
53
47
|
endpoint: '/file/:id/image',
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
method: 'GET',
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
getArtifactBinary: (mediaApi: MediaApi, error?: Error) => {
|
|
54
|
+
mediaApi.getArtifactBinary = async (...params) => {
|
|
55
|
+
throw (
|
|
56
|
+
error ||
|
|
57
|
+
createServerUnauthorizedError({
|
|
58
|
+
endpoint: '/file/:id/binary/:artifactName',
|
|
59
|
+
method: 'GET',
|
|
60
|
+
})
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
uploadArtifact: (mediaApi: MediaApi, error?: Error) => {
|
|
65
|
+
mediaApi.uploadArtifact = async (...params) => {
|
|
66
|
+
throw (
|
|
67
|
+
error ||
|
|
68
|
+
createServerUnauthorizedError({
|
|
69
|
+
endpoint: '/file/:id/artifact/:artifactName',
|
|
70
|
+
method: 'POST',
|
|
71
|
+
})
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
deleteArtifact: (mediaApi: MediaApi, error?: Error) => {
|
|
76
|
+
mediaApi.deleteArtifact = async (...params) => {
|
|
77
|
+
throw (
|
|
78
|
+
error ||
|
|
79
|
+
createServerUnauthorizedError({
|
|
80
|
+
endpoint: '/file/:id/artifact/:artifactName',
|
|
81
|
+
method: 'DELETE',
|
|
60
82
|
})
|
|
61
83
|
);
|
|
62
84
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.3.
|
|
3
|
+
"version": "79.3.10",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/media-common": "^12.3.0",
|
|
47
47
|
"@atlaskit/media-file-preview": "^0.11.0",
|
|
48
48
|
"@atlaskit/media-svg": "^2.1.0",
|
|
49
|
-
"@atlaskit/media-ui": "^28.
|
|
49
|
+
"@atlaskit/media-ui": "^28.6.0",
|
|
50
50
|
"@atlaskit/media-viewer": "^52.4.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/primitives": "^14.10.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/media-core": "^37.0.0",
|
|
82
82
|
"@atlaskit/media-picker": "^70.0.0",
|
|
83
83
|
"@atlaskit/media-state": "^1.7.0",
|
|
84
|
-
"@atlaskit/media-test-data": "^3.
|
|
84
|
+
"@atlaskit/media-test-data": "^3.2.0",
|
|
85
85
|
"@atlaskit/media-test-helpers": "^37.0.0",
|
|
86
86
|
"@atlaskit/radio": "^8.1.0",
|
|
87
87
|
"@atlaskit/range": "^9.1.0",
|
|
@@ -127,9 +127,6 @@
|
|
|
127
127
|
"platform_media_compiled": {
|
|
128
128
|
"type": "boolean"
|
|
129
129
|
},
|
|
130
|
-
"platform_fix_media_image_resizing": {
|
|
131
|
-
"type": "boolean"
|
|
132
|
-
},
|
|
133
130
|
"platform_editor_ssr_media": {
|
|
134
131
|
"type": "boolean"
|
|
135
132
|
},
|