@atlaskit/media-test-helpers 42.2.4 → 42.2.5
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
CHANGED
|
@@ -19,7 +19,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
19
19
|
var _createFileState = require("./createFileState");
|
|
20
20
|
var _helpers = require("./helpers");
|
|
21
21
|
var _nextTick = require("../../nextTick");
|
|
22
|
-
var
|
|
22
|
+
var _mediaStore = require("@atlaskit/media-state/media-store");
|
|
23
23
|
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; }
|
|
24
24
|
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; }
|
|
25
25
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -119,14 +119,14 @@ var FileStateFactory = exports.FileStateFactory = /*#__PURE__*/(0, _createClass2
|
|
|
119
119
|
(0, _defineProperty2.default)(this, "subscription", {
|
|
120
120
|
next: function next(fileState) {
|
|
121
121
|
// also set the file state in the media store
|
|
122
|
-
|
|
122
|
+
_mediaStore.mediaStore.setState(function (state) {
|
|
123
123
|
state.files[_this2.identifier.id] = fileState;
|
|
124
124
|
});
|
|
125
125
|
_this2.observable.next(fileState);
|
|
126
126
|
},
|
|
127
127
|
error: function error(_error) {
|
|
128
128
|
// also set the file state in the media store
|
|
129
|
-
|
|
129
|
+
_mediaStore.mediaStore.setState(function (state) {
|
|
130
130
|
state.files[_this2.identifier.id] = {
|
|
131
131
|
status: 'error',
|
|
132
132
|
id: _this2.identifier.id
|
|
@@ -5,7 +5,7 @@ import { MediaClient, createMediaSubject } from '@atlaskit/media-client';
|
|
|
5
5
|
import { createFileState } from './createFileState';
|
|
6
6
|
import { createFileDetails } from './helpers';
|
|
7
7
|
import { sleep } from '../../nextTick';
|
|
8
|
-
import { mediaStore } from '@atlaskit/media-state';
|
|
8
|
+
import { mediaStore } from '@atlaskit/media-state/media-store';
|
|
9
9
|
export class MediaClientMock extends MediaClient {
|
|
10
10
|
constructor(observable, mediaClientConfig, featureFlags, options = {}) {
|
|
11
11
|
super(mediaClientConfig);
|
|
@@ -16,7 +16,7 @@ import { MediaClient, createMediaSubject } from '@atlaskit/media-client';
|
|
|
16
16
|
import { createFileState } from './createFileState';
|
|
17
17
|
import { createFileDetails } from './helpers';
|
|
18
18
|
import { sleep } from '../../nextTick';
|
|
19
|
-
import { mediaStore } from '@atlaskit/media-state';
|
|
19
|
+
import { mediaStore } from '@atlaskit/media-state/media-store';
|
|
20
20
|
export var MediaClientMock = /*#__PURE__*/function (_MediaClient) {
|
|
21
21
|
function MediaClientMock(observable, mediaClientConfig, featureFlags) {
|
|
22
22
|
var _this;
|
package/dist/types/getJest.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export interface MockStub<T, R> extends MockFunction<T> {
|
|
|
11
11
|
mockImplementation: (value: T) => R;
|
|
12
12
|
mockResolvedValue: (value: T) => R;
|
|
13
13
|
}
|
|
14
|
-
declare const _default: <F, S>() => typeof jest | MockedJest<F, S>;
|
|
15
14
|
export default _default;
|
|
15
|
+
declare function _default<F, S>(): typeof jest | MockedJest<F, S>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-test-helpers",
|
|
3
|
-
"version": "42.2.
|
|
3
|
+
"version": "42.2.5",
|
|
4
4
|
"description": "Collection of test helpers used in media component stories and specs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"@atlaskit/button": "^24.3.0",
|
|
28
28
|
"@atlaskit/checkbox": "^18.2.0",
|
|
29
29
|
"@atlaskit/form": "^16.1.0",
|
|
30
|
-
"@atlaskit/icon": "^37.
|
|
30
|
+
"@atlaskit/icon": "^37.2.0",
|
|
31
31
|
"@atlaskit/locale": "^5.0.0",
|
|
32
32
|
"@atlaskit/media-client": "^37.2.0",
|
|
33
33
|
"@atlaskit/media-common": "^14.3.0",
|
|
34
34
|
"@atlaskit/media-state": "^3.1.0",
|
|
35
|
-
"@atlaskit/media-ui": "^30.
|
|
36
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
37
|
-
"@atlaskit/popup": "^5.
|
|
38
|
-
"@atlaskit/primitives": "^22.
|
|
35
|
+
"@atlaskit/media-ui": "^30.11.0",
|
|
36
|
+
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
37
|
+
"@atlaskit/popup": "^5.2.0",
|
|
38
|
+
"@atlaskit/primitives": "^22.2.0",
|
|
39
39
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
40
40
|
"@atlaskit/tabs": "^20.1.0",
|
|
41
41
|
"@atlaskit/textfield": "^9.1.0",
|
|
42
|
-
"@atlaskit/tokens": "^16.
|
|
43
|
-
"@atlaskit/tooltip": "^
|
|
42
|
+
"@atlaskit/tokens": "^16.3.0",
|
|
43
|
+
"@atlaskit/tooltip": "^24.0.0",
|
|
44
44
|
"@atlaskit/ufo": "^1.0.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|