@atlaskit/media-client 24.0.2 → 24.0.3
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 +6 -0
- package/dist/cjs/utils/with-media-client-hoc.js +24 -0
- package/dist/es2019/utils/with-media-client-hoc.js +25 -0
- package/dist/esm/utils/with-media-client-hoc.js +25 -0
- package/dist/types/utils/with-media-client-hoc.d.ts +18 -0
- package/dist/types-ts4.5/utils/with-media-client-hoc.d.ts +18 -0
- package/package.json +1 -1
- package/report.api.md +6 -6
- package/tmp/api-report-tmp.d.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 24.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41932](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41932) [`756dd90f1a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/756dd90f1a3) - 1. Deprecate withMediaClient HOC in media-client and migrated it to media-client-react 2. clean up deprecated imports from media-client
|
|
8
|
+
|
|
3
9
|
## 24.0.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -17,7 +17,19 @@ var _mediaClient = require("../client/media-client");
|
|
|
17
17
|
var _excluded = ["mediaClientConfig"];
|
|
18
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
19
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
26
|
+
*/
|
|
27
|
+
|
|
20
28
|
var mediaClientsMap = new Map();
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
32
|
+
*/
|
|
21
33
|
var getMediaClient = exports.getMediaClient = function getMediaClient(mediaClientConfig) {
|
|
22
34
|
var mediaClient = mediaClientsMap.get(mediaClientConfig);
|
|
23
35
|
if (!mediaClient) {
|
|
@@ -38,6 +50,18 @@ var createEmptyMediaClient = function createEmptyMediaClient() {
|
|
|
38
50
|
};
|
|
39
51
|
return new _mediaClient.MediaClient(emptyConfig);
|
|
40
52
|
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
64
|
+
*/
|
|
41
65
|
var withMediaClient = exports.withMediaClient = function withMediaClient(Component) {
|
|
42
66
|
return /*#__PURE__*/function (_React$Component) {
|
|
43
67
|
(0, _inherits2.default)(_class, _React$Component);
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MediaClient } from '../client/media-client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
11
|
+
*/
|
|
12
|
+
|
|
4
13
|
const mediaClientsMap = new Map();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
17
|
+
*/
|
|
5
18
|
export const getMediaClient = mediaClientConfig => {
|
|
6
19
|
let mediaClient = mediaClientsMap.get(mediaClientConfig);
|
|
7
20
|
if (!mediaClient) {
|
|
@@ -20,6 +33,18 @@ const createEmptyMediaClient = () => {
|
|
|
20
33
|
};
|
|
21
34
|
return new MediaClient(emptyConfig);
|
|
22
35
|
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
47
|
+
*/
|
|
23
48
|
export const withMediaClient = Component => {
|
|
24
49
|
return class extends React.Component {
|
|
25
50
|
render() {
|
|
@@ -10,7 +10,20 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { MediaClient } from '../client/media-client';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
20
|
+
*/
|
|
21
|
+
|
|
13
22
|
var mediaClientsMap = new Map();
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
26
|
+
*/
|
|
14
27
|
export var getMediaClient = function getMediaClient(mediaClientConfig) {
|
|
15
28
|
var mediaClient = mediaClientsMap.get(mediaClientConfig);
|
|
16
29
|
if (!mediaClient) {
|
|
@@ -31,6 +44,18 @@ var createEmptyMediaClient = function createEmptyMediaClient() {
|
|
|
31
44
|
};
|
|
32
45
|
return new MediaClient(emptyConfig);
|
|
33
46
|
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
58
|
+
*/
|
|
34
59
|
export var withMediaClient = function withMediaClient(Component) {
|
|
35
60
|
return /*#__PURE__*/function (_React$Component) {
|
|
36
61
|
_inherits(_class, _React$Component);
|
|
@@ -2,14 +2,32 @@ import React from 'react';
|
|
|
2
2
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
3
|
import { MediaClient } from '../client/media-client';
|
|
4
4
|
import { Identifier } from '../identifier';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
7
|
+
*/
|
|
5
8
|
export interface WithMediaClientConfig {
|
|
6
9
|
mediaClientConfig: MediaClientConfig;
|
|
7
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
13
|
+
*/
|
|
8
14
|
export interface WithMediaClient {
|
|
9
15
|
mediaClient: MediaClient;
|
|
10
16
|
identifier?: Identifier;
|
|
11
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
20
|
+
*/
|
|
12
21
|
export declare const getMediaClient: (mediaClientConfig: MediaClientConfig) => MediaClient;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
24
|
+
*/
|
|
13
25
|
export type WithMediaClientConfigProps<P extends WithMediaClient> = Omit<P, 'mediaClient'> & WithMediaClientConfig;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
28
|
+
*/
|
|
14
29
|
export type WithMediaClientFunction = <P extends WithMediaClient>(Component: React.ComponentType<P>) => React.ComponentType<WithMediaClientConfigProps<P>>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
32
|
+
*/
|
|
15
33
|
export declare const withMediaClient: WithMediaClientFunction;
|
|
@@ -2,14 +2,32 @@ import React from 'react';
|
|
|
2
2
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
3
|
import { MediaClient } from '../client/media-client';
|
|
4
4
|
import { Identifier } from '../identifier';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
7
|
+
*/
|
|
5
8
|
export interface WithMediaClientConfig {
|
|
6
9
|
mediaClientConfig: MediaClientConfig;
|
|
7
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
13
|
+
*/
|
|
8
14
|
export interface WithMediaClient {
|
|
9
15
|
mediaClient: MediaClient;
|
|
10
16
|
identifier?: Identifier;
|
|
11
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
20
|
+
*/
|
|
12
21
|
export declare const getMediaClient: (mediaClientConfig: MediaClientConfig) => MediaClient;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
24
|
+
*/
|
|
13
25
|
export type WithMediaClientConfigProps<P extends WithMediaClient> = Omit<P, 'mediaClient'> & WithMediaClientConfig;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
28
|
+
*/
|
|
14
29
|
export type WithMediaClientFunction = <P extends WithMediaClient>(Component: React.ComponentType<P>) => React.ComponentType<WithMediaClientConfigProps<P>>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated This export will be removed. Please use one from `@atlaskit/media-client-react`
|
|
32
|
+
*/
|
|
15
33
|
export declare const withMediaClient: WithMediaClientFunction;
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -448,7 +448,7 @@ export interface GetFileOptions {
|
|
|
448
448
|
// @public (undocumented)
|
|
449
449
|
export const getFileStreamsCache: () => StreamsCache<FileState>;
|
|
450
450
|
|
|
451
|
-
// @public (undocumented)
|
|
451
|
+
// @public @deprecated (undocumented)
|
|
452
452
|
export const getMediaClient: (
|
|
453
453
|
mediaClientConfig: MediaClientConfig,
|
|
454
454
|
) => MediaClient;
|
|
@@ -1517,7 +1517,7 @@ export interface UploadFileResult {
|
|
|
1517
1517
|
|
|
1518
1518
|
export { UploadingFileState };
|
|
1519
1519
|
|
|
1520
|
-
// @public (undocumented)
|
|
1520
|
+
// @public @deprecated (undocumented)
|
|
1521
1521
|
export interface WithMediaClient {
|
|
1522
1522
|
// (undocumented)
|
|
1523
1523
|
identifier?: Identifier;
|
|
@@ -1525,23 +1525,23 @@ export interface WithMediaClient {
|
|
|
1525
1525
|
mediaClient: MediaClient;
|
|
1526
1526
|
}
|
|
1527
1527
|
|
|
1528
|
-
// @public (undocumented)
|
|
1528
|
+
// @public @deprecated (undocumented)
|
|
1529
1529
|
export const withMediaClient: WithMediaClientFunction;
|
|
1530
1530
|
|
|
1531
|
-
// @public (undocumented)
|
|
1531
|
+
// @public @deprecated (undocumented)
|
|
1532
1532
|
export interface WithMediaClientConfig {
|
|
1533
1533
|
// (undocumented)
|
|
1534
1534
|
mediaClientConfig: MediaClientConfig;
|
|
1535
1535
|
}
|
|
1536
1536
|
|
|
1537
|
-
// @public (undocumented)
|
|
1537
|
+
// @public @deprecated (undocumented)
|
|
1538
1538
|
export type WithMediaClientConfigProps<P extends WithMediaClient> = Omit<
|
|
1539
1539
|
P,
|
|
1540
1540
|
'mediaClient'
|
|
1541
1541
|
> &
|
|
1542
1542
|
WithMediaClientConfig;
|
|
1543
1543
|
|
|
1544
|
-
// @public (undocumented)
|
|
1544
|
+
// @public @deprecated (undocumented)
|
|
1545
1545
|
export type WithMediaClientFunction = <P extends WithMediaClient>(
|
|
1546
1546
|
Component: React_2.ComponentType<P>,
|
|
1547
1547
|
) => React_2.ComponentType<WithMediaClientConfigProps<P>>;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -337,7 +337,7 @@ export interface GetFileOptions {
|
|
|
337
337
|
// @public (undocumented)
|
|
338
338
|
export const getFileStreamsCache: () => StreamsCache<FileState>;
|
|
339
339
|
|
|
340
|
-
// @public (undocumented)
|
|
340
|
+
// @public @deprecated (undocumented)
|
|
341
341
|
export const getMediaClient: (mediaClientConfig: MediaClientConfig) => MediaClient;
|
|
342
342
|
|
|
343
343
|
// @public (undocumented)
|
|
@@ -1197,7 +1197,7 @@ export interface UploadFileResult {
|
|
|
1197
1197
|
|
|
1198
1198
|
export { UploadingFileState }
|
|
1199
1199
|
|
|
1200
|
-
// @public (undocumented)
|
|
1200
|
+
// @public @deprecated (undocumented)
|
|
1201
1201
|
export interface WithMediaClient {
|
|
1202
1202
|
// (undocumented)
|
|
1203
1203
|
identifier?: Identifier;
|
|
@@ -1205,19 +1205,19 @@ export interface WithMediaClient {
|
|
|
1205
1205
|
mediaClient: MediaClient;
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
|
-
// @public (undocumented)
|
|
1208
|
+
// @public @deprecated (undocumented)
|
|
1209
1209
|
export const withMediaClient: WithMediaClientFunction;
|
|
1210
1210
|
|
|
1211
|
-
// @public (undocumented)
|
|
1211
|
+
// @public @deprecated (undocumented)
|
|
1212
1212
|
export interface WithMediaClientConfig {
|
|
1213
1213
|
// (undocumented)
|
|
1214
1214
|
mediaClientConfig: MediaClientConfig;
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
// @public (undocumented)
|
|
1217
|
+
// @public @deprecated (undocumented)
|
|
1218
1218
|
export type WithMediaClientConfigProps<P extends WithMediaClient> = Omit<P, 'mediaClient'> & WithMediaClientConfig;
|
|
1219
1219
|
|
|
1220
|
-
// @public (undocumented)
|
|
1220
|
+
// @public @deprecated (undocumented)
|
|
1221
1221
|
export type WithMediaClientFunction = <P extends WithMediaClient>(Component: React_2.ComponentType<P>) => React_2.ComponentType<WithMediaClientConfigProps<P>>;
|
|
1222
1222
|
|
|
1223
1223
|
// (No @packageDocumentation comment for this package)
|