@atlaskit/media-table 10.0.3 → 11.0.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 CHANGED
@@ -1,5 +1,90 @@
1
1
  # @atlaskit/media-table
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f862d5ae7aa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f862d5ae7aa) - remove RxJs peer dependency
8
+ - [`118f3af101f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/118f3af101f) - Media Client APIs has been updated to use MediaSubscribable which provides subscription functionality (similar to RxJs observables).
9
+ It exposes subscribe method that is called with MediaObserver as an argument and returns MediaSubscription.
10
+ MediaSubscription exposes unsubscribe method.
11
+
12
+ getFileState:
13
+ The returned type of this function has changed from RxJs ReplaySubject to MediaSubscribable.
14
+
15
+ ```
16
+ import { MediaClient, MediaObserver, MediaSubscribable, MediaSubscription } from '@atlaskit/media-client';
17
+
18
+ const mediaClient = new MediaClient({ authProvider });
19
+
20
+ const fileStateSubscribable: MediaSubscribable<FileState> = mediaClient.file.getFileState(id);
21
+
22
+ const mediaObserver: MediaObserver<FileState> = {
23
+ next: (fileState) => {
24
+ nextCallback(fileState)
25
+ },
26
+ error: (error) => {
27
+ errorCallback(error)
28
+ },
29
+ };
30
+
31
+ const subscription: MediaSubscription = fileStateSubscribable.subscribe(mediaObserver);
32
+
33
+ subscription.unsubscribe();
34
+ ```
35
+
36
+ upload:
37
+ The returned type of this function has changed from RxJs ReplaySubject to MediaSubscribable.
38
+
39
+ ```
40
+ import { MediaClient, MediaObserver, MediaSubscribable, MediaSubscription } from '@atlaskit/media-client';
41
+
42
+ const mediaClient = new MediaClient({ authProvider });
43
+
44
+ const uploadFileSubscribable: MediaSubscribable<FileState> = mediaClient.file.upload(uploadableFile);
45
+
46
+ const mediaObserver: MediaObserver<FileState> = {
47
+ next: (fileState) => {
48
+ nextCallback(fileState)
49
+ },
50
+ error: (error) => {
51
+ errorCallback(error)
52
+ },
53
+ };
54
+
55
+ const subscription: MediaSubscription = uploadFileSubscribable.subscribe(mediaObserver);
56
+
57
+ subscription.unsubscribe();
58
+ ```
59
+
60
+ getItems:
61
+ The returned type of this function has changed from RxJs ReplaySubject to MediaSubscribable.
62
+
63
+ ```
64
+ import { MediaClient, MediaObserver, MediaSubscribable, MediaSubscription } from '@atlaskit/media-client';
65
+
66
+ const mediaClient = new MediaClient({ authProvider });
67
+
68
+ const collectionItemsSubscribable: MediaSubscribable<MediaCollectionItem[]> = mediaClient.collection.getItems(collectionName);
69
+
70
+ const mediaObserver: MediaObserver<MediaCollectionItem[]> = {
71
+ next: (items) => {
72
+ nextCallback(items)
73
+ },
74
+ error: (error) => {
75
+ errorCallback(error)
76
+ },
77
+ };
78
+
79
+ const subscription: MediaSubscription = collectionItemsSubscribable.subscribe(mediaObserver);
80
+
81
+ subscription.unsubscribe();
82
+ ```
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies
87
+
3
88
  ## 10.0.3
4
89
 
5
90
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-table",
3
- "version": "10.0.3",
3
+ "version": "11.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-table",
3
- "version": "10.0.3",
3
+ "version": "11.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-table",
3
- "version": "10.0.3",
3
+ "version": "11.0.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-table",
3
- "version": "10.0.3",
3
+ "version": "11.0.0",
4
4
  "description": "Table UI component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,28 +30,27 @@
30
30
  "@atlaskit/button": "^16.2.0",
31
31
  "@atlaskit/dynamic-table": "^14.5.0",
32
32
  "@atlaskit/icon": "^21.10.0",
33
- "@atlaskit/media-client": "^14.4.0",
34
- "@atlaskit/media-ui": "^20.0.0",
35
- "@atlaskit/media-viewer": "^46.1.0",
33
+ "@atlaskit/media-client": "^15.0.0",
34
+ "@atlaskit/media-ui": "^21.0.0",
35
+ "@atlaskit/media-viewer": "^46.2.0",
36
36
  "@atlaskit/theme": "^12.1.0",
37
37
  "@atlaskit/tooltip": "^17.5.0",
38
38
  "@babel/runtime": "^7.0.0",
39
39
  "memoize-one": "^6.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@atlaskit/media-core": "^32.2.0",
42
+ "@atlaskit/media-core": "^32.3.0",
43
43
  "react": "^16.8.0",
44
44
  "react-dom": "^16.8.0",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1",
46
- "rxjs": "^5.5.0",
47
46
  "styled-components": "^3.2.6"
48
47
  },
49
48
  "devDependencies": {
50
49
  "@atlaskit/docs": "^9.0.0",
51
50
  "@atlaskit/icon-file-type": "^6.3.0",
52
51
  "@atlaskit/media-common": "^2.11.0",
53
- "@atlaskit/media-core": "^32.2.0",
54
- "@atlaskit/media-test-helpers": "^29.2.0",
52
+ "@atlaskit/media-core": "^32.3.0",
53
+ "@atlaskit/media-test-helpers": "^29.3.0",
55
54
  "@atlaskit/range": "^6.0.0",
56
55
  "@atlaskit/ssr": "*",
57
56
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -59,7 +58,6 @@
59
58
  "enzyme": "^3.10.0",
60
59
  "react": "^16.8.0",
61
60
  "react-dom": "^16.8.0",
62
- "rxjs": "^5.5.0",
63
61
  "styled-components": "^3.2.6",
64
62
  "typescript": "3.9.6"
65
63
  },