@atlaskit/media-client 26.2.1 → 26.2.2
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/constants/package.json +1 -1
- package/dist/cjs/client/file-fetcher/error.js +1 -1
- package/dist/cjs/client/media-client.js +2 -2
- package/dist/cjs/client/media-store/error.js +1 -1
- package/dist/cjs/models/errors/index.js +1 -1
- package/dist/cjs/models/errors/types.js +1 -5
- package/dist/cjs/uploader/error.js +1 -1
- package/dist/cjs/utils/hashing/hasher.js +1 -5
- package/dist/cjs/utils/hashing/hasherCreator.js +2 -2
- package/dist/cjs/utils/hashing/simpleHasher.js +2 -2
- package/dist/cjs/utils/mobileUpload/error.js +1 -1
- package/dist/cjs/utils/polling/errors.js +1 -1
- package/dist/cjs/utils/polling/types.js +1 -5
- package/dist/cjs/utils/request/errors.js +1 -1
- package/dist/cjs/utils/request/helpers.js +0 -1
- package/dist/es2019/models/errors/types.js +0 -1
- package/dist/es2019/models/media.js +1 -0
- package/dist/es2019/test-helpers/MockedMediaApi/helpers.js +1 -0
- package/dist/es2019/utils/hashing/hasher.js +0 -1
- package/dist/es2019/utils/polling/types.js +0 -1
- package/dist/es2019/utils/request/helpers.js +0 -1
- package/dist/esm/client/file-fetcher/error.js +1 -1
- package/dist/esm/client/media-store/error.js +1 -1
- package/dist/esm/models/errors/index.js +1 -1
- package/dist/esm/models/errors/types.js +0 -1
- package/dist/esm/models/media.js +1 -0
- package/dist/esm/test-helpers/MockedMediaApi/helpers.js +1 -0
- package/dist/esm/uploader/error.js +1 -1
- package/dist/esm/utils/hashing/hasher.js +0 -1
- package/dist/esm/utils/mobileUpload/error.js +1 -1
- package/dist/esm/utils/polling/errors.js +1 -1
- package/dist/esm/utils/polling/types.js +0 -1
- package/dist/esm/utils/request/errors.js +1 -1
- package/dist/esm/utils/request/helpers.js +0 -1
- package/dist/types/globalMediaEventEmitter.d.ts +2 -2
- package/dist/types/test-helpers/MockedMediaApi/helpers.d.ts +1 -1
- package/dist/types/test-helpers/collectionNames.d.ts +1 -1
- package/dist/types-ts4.5/globalMediaEventEmitter.d.ts +2 -2
- package/dist/types-ts4.5/test-helpers/MockedMediaApi/helpers.d.ts +1 -1
- package/dist/types-ts4.5/test-helpers/collectionNames.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 26.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
8
|
+
|
|
3
9
|
## 26.2.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/constants/package.json
CHANGED
|
@@ -13,7 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
15
|
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); }; }
|
|
16
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var FileFetcherError = exports.FileFetcherError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(FileFetcherError, _BaseMediaClientError);
|
|
19
19
|
var _super = _createSuper(FileFetcherError);
|
|
@@ -16,8 +16,8 @@ var _mediaStore = require("./media-store");
|
|
|
16
16
|
var _fileFetcher = require("./file-fetcher");
|
|
17
17
|
var _stargateClient = require("./stargate-client");
|
|
18
18
|
var _mediaState = require("@atlaskit/media-state");
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
var MediaClient = exports.MediaClient = /*#__PURE__*/function () {
|
|
22
22
|
// mobile upload is lazily loaded
|
|
23
23
|
|
|
@@ -13,7 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
15
|
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); }; }
|
|
16
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var MediaStoreError = exports.MediaStoreError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(MediaStoreError, _BaseMediaClientError);
|
|
19
19
|
var _super = _createSuper(MediaStoreError);
|
|
@@ -26,7 +26,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
26
26
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
27
27
|
var _helpers = require("./helpers");
|
|
28
28
|
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); }; }
|
|
29
|
-
function _isNativeReflectConstruct() {
|
|
29
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
30
|
/**
|
|
31
31
|
* Base class for media errors
|
|
32
32
|
*/
|
|
@@ -13,7 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../models/errors");
|
|
15
15
|
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); }; }
|
|
16
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var UploaderError = exports.UploaderError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(UploaderError, _BaseMediaClientError);
|
|
19
19
|
var _super = _createSuper(UploaderError);
|
|
@@ -9,8 +9,8 @@ exports.destroyHasher = exports.createHasher = void 0;
|
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _mediaCore = require("@atlaskit/media-core");
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var hasher = null;
|
|
15
15
|
var sha256Hasher = null;
|
|
16
16
|
var destroyHasher = exports.destroyHasher = function destroyHasher() {
|
|
@@ -9,8 +9,8 @@ exports.SimpleHasher = void 0;
|
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
11
|
var Rusha = _interopRequireWildcard(require("rusha"));
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var SimpleHasher = exports.SimpleHasher = /*#__PURE__*/function () {
|
|
15
15
|
function SimpleHasher() {
|
|
16
16
|
(0, _classCallCheck2.default)(this, SimpleHasher);
|
|
@@ -13,7 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
15
|
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); }; }
|
|
16
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var MobileUploadError = exports.MobileUploadError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(MobileUploadError, _BaseMediaClientError);
|
|
19
19
|
var _super = _createSuper(MobileUploadError);
|
|
@@ -13,7 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
15
|
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); }; }
|
|
16
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var PollingError = exports.PollingError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(PollingError, _BaseMediaClientError);
|
|
19
19
|
var _super = _createSuper(PollingError);
|
|
@@ -13,7 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
15
|
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); }; }
|
|
16
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var RequestError = exports.RequestError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(RequestError, _BaseMediaClientError);
|
|
19
19
|
var _super = _createSuper(RequestError);
|
|
@@ -159,7 +159,6 @@ var DEFAULT_RETRY_OPTIONS = exports.DEFAULT_RETRY_OPTIONS = {
|
|
|
159
159
|
// Current test delay is 60s, so retries should finish before if a promise takes < 1s
|
|
160
160
|
factor: 2 // Good for polling, which is out main use case
|
|
161
161
|
};
|
|
162
|
-
|
|
163
162
|
function cloneRequestError(error, extraMetadata) {
|
|
164
163
|
var reason = error.reason,
|
|
165
164
|
metadata = error.metadata,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Warning! You can't add new media file processing status!
|
|
2
2
|
// See packages/media/media-core/src/__tests__/cache-backward-compatibility.spec.ts
|
|
3
|
+
|
|
3
4
|
export const isPreviewableType = type => {
|
|
4
5
|
const defaultPreviewableTypes = ['audio', 'video', 'image', 'doc'];
|
|
5
6
|
return defaultPreviewableTypes.indexOf(type) > -1;
|
|
@@ -2,6 +2,7 @@ import uuid from 'uuid/v4';
|
|
|
2
2
|
// --------------------------------------------------------
|
|
3
3
|
// Factory Utils
|
|
4
4
|
// --------------------------------------------------------
|
|
5
|
+
|
|
5
6
|
export const normaliseInput = input => !input ? [] : input instanceof Array ? input : [input];
|
|
6
7
|
|
|
7
8
|
// --------------------------------------------------------
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -102,7 +102,6 @@ export const DEFAULT_RETRY_OPTIONS = {
|
|
|
102
102
|
// Current test delay is 60s, so retries should finish before if a promise takes < 1s
|
|
103
103
|
factor: 2 // Good for polling, which is out main use case
|
|
104
104
|
};
|
|
105
|
-
|
|
106
105
|
export function cloneRequestError(error, extraMetadata) {
|
|
107
106
|
const {
|
|
108
107
|
reason,
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var FileFetcherError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
10
10
|
_inherits(FileFetcherError, _BaseMediaClientError);
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var MediaStoreError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
10
10
|
_inherits(MediaStoreError, _BaseMediaClientError);
|
|
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
export { isMediaClientError, getMediaClientErrorReason } from './helpers';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/models/media.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Warning! You can't add new media file processing status!
|
|
2
2
|
// See packages/media/media-core/src/__tests__/cache-backward-compatibility.spec.ts
|
|
3
|
+
|
|
3
4
|
export var isPreviewableType = function isPreviewableType(type) {
|
|
4
5
|
var defaultPreviewableTypes = ['audio', 'video', 'image', 'doc'];
|
|
5
6
|
return defaultPreviewableTypes.indexOf(type) > -1;
|
|
@@ -6,6 +6,7 @@ import uuid from 'uuid/v4';
|
|
|
6
6
|
// --------------------------------------------------------
|
|
7
7
|
// Factory Utils
|
|
8
8
|
// --------------------------------------------------------
|
|
9
|
+
|
|
9
10
|
export var normaliseInput = function normaliseInput(input) {
|
|
10
11
|
return !input ? [] : input instanceof Array ? input : [input];
|
|
11
12
|
};
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../models/errors';
|
|
9
9
|
export var UploaderError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
10
10
|
_inherits(UploaderError, _BaseMediaClientError);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var MobileUploadError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
10
10
|
_inherits(MobileUploadError, _BaseMediaClientError);
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var PollingError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
10
10
|
_inherits(PollingError, _BaseMediaClientError);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var RequestError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
10
10
|
_inherits(RequestError, _BaseMediaClientError);
|
|
@@ -137,7 +137,6 @@ export var DEFAULT_RETRY_OPTIONS = {
|
|
|
137
137
|
// Current test delay is 60s, so retries should finish before if a promise takes < 1s
|
|
138
138
|
factor: 2 // Good for polling, which is out main use case
|
|
139
139
|
};
|
|
140
|
-
|
|
141
140
|
export function cloneRequestError(error, extraMetadata) {
|
|
142
141
|
var reason = error.reason,
|
|
143
142
|
metadata = error.metadata,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadEventPayloadMap, EventPayloadListener } from './client/events';
|
|
2
2
|
export declare const globalMediaEventEmitter: {
|
|
3
|
-
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E
|
|
4
|
-
off<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1
|
|
3
|
+
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
4
|
+
off<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1>): void;
|
|
5
5
|
emit<E_2 extends keyof UploadEventPayloadMap>(event: E_2, payload: UploadEventPayloadMap[E_2]): boolean | undefined;
|
|
6
6
|
};
|
|
@@ -2,7 +2,7 @@ import { UploadingFileState, ErrorFileState, FileState } from '@atlaskit/media-s
|
|
|
2
2
|
import { MediaFile } from '../../models/media';
|
|
3
3
|
import { ResponseFileItem } from '../../client/media-store/types';
|
|
4
4
|
import type { FileIdentifier } from '../../identifier';
|
|
5
|
-
export declare const normaliseInput: <T>(input?: T | T[]
|
|
5
|
+
export declare const normaliseInput: <T>(input?: T | T[]) => T[];
|
|
6
6
|
export declare const getMediaFile: (fileItem: ResponseFileItem) => MediaFile;
|
|
7
7
|
export declare const createEmptyFileItem: (id: string, collection?: string) => ResponseFileItem;
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const defaultCollectionName = "MediaServicesSample";
|
|
2
2
|
export declare const onlyAnimatedGifsCollectionName = "only-animated-gifs";
|
|
3
|
-
export declare const fileCollectionName
|
|
3
|
+
export declare const fileCollectionName = "MediaServicesSampleFiles";
|
|
4
4
|
export declare const defaultMediaPickerCollectionName = "mediapicker-test";
|
|
5
5
|
export declare const collectionNames: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadEventPayloadMap, EventPayloadListener } from './client/events';
|
|
2
2
|
export declare const globalMediaEventEmitter: {
|
|
3
|
-
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E
|
|
4
|
-
off<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1
|
|
3
|
+
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
4
|
+
off<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1>): void;
|
|
5
5
|
emit<E_2 extends keyof UploadEventPayloadMap>(event: E_2, payload: UploadEventPayloadMap[E_2]): boolean | undefined;
|
|
6
6
|
};
|
|
@@ -2,7 +2,7 @@ import { UploadingFileState, ErrorFileState, FileState } from '@atlaskit/media-s
|
|
|
2
2
|
import { MediaFile } from '../../models/media';
|
|
3
3
|
import { ResponseFileItem } from '../../client/media-store/types';
|
|
4
4
|
import type { FileIdentifier } from '../../identifier';
|
|
5
|
-
export declare const normaliseInput: <T>(input?: T | T[]
|
|
5
|
+
export declare const normaliseInput: <T>(input?: T | T[]) => T[];
|
|
6
6
|
export declare const getMediaFile: (fileItem: ResponseFileItem) => MediaFile;
|
|
7
7
|
export declare const createEmptyFileItem: (id: string, collection?: string) => ResponseFileItem;
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const defaultCollectionName = "MediaServicesSample";
|
|
2
2
|
export declare const onlyAnimatedGifsCollectionName = "only-animated-gifs";
|
|
3
|
-
export declare const fileCollectionName
|
|
3
|
+
export declare const fileCollectionName = "MediaServicesSampleFiles";
|
|
4
4
|
export declare const defaultMediaPickerCollectionName = "mediapicker-test";
|
|
5
5
|
export declare const collectionNames: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.2",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/chunkinator": "^6.0.0",
|
|
40
|
-
"@atlaskit/media-common": "^11.
|
|
40
|
+
"@atlaskit/media-common": "^11.1.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"dataloader": "^2.0.0",
|
|
43
43
|
"deep-equal": "^1.0.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/media-core": "^34.2.0",
|
|
60
60
|
"@atlaskit/media-state": "^1.0.0",
|
|
61
61
|
"@atlaskit/ssr": "*",
|
|
62
|
-
"@atlaskit/tokens": "^1.
|
|
62
|
+
"@atlaskit/tokens": "^1.42.0",
|
|
63
63
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
64
64
|
"@emotion/react": "^11.7.1",
|
|
65
65
|
"@types/deep-equal": "^1.0.1",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fetch-mock": "^8.0.0",
|
|
68
68
|
"react": "^16.8.0",
|
|
69
69
|
"react-dom": "^16.8.0",
|
|
70
|
-
"typescript": "~4.
|
|
70
|
+
"typescript": "~5.4.2"
|
|
71
71
|
},
|
|
72
72
|
"techstack": {
|
|
73
73
|
"@atlassian/frontend": {
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
86
|
-
}
|
|
86
|
+
}
|