@atlaskit/media-table 10.0.2 → 11.0.1
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,103 @@
|
|
|
1
1
|
# @atlaskit/media-table
|
|
2
2
|
|
|
3
|
+
## 11.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 11.0.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`f862d5ae7aa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f862d5ae7aa) - remove RxJs peer dependency
|
|
15
|
+
- [`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).
|
|
16
|
+
It exposes subscribe method that is called with MediaObserver as an argument and returns MediaSubscription.
|
|
17
|
+
MediaSubscription exposes unsubscribe method.
|
|
18
|
+
|
|
19
|
+
getFileState:
|
|
20
|
+
The returned type of this function has changed from RxJs ReplaySubject to MediaSubscribable.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
import { MediaClient, MediaObserver, MediaSubscribable, MediaSubscription } from '@atlaskit/media-client';
|
|
24
|
+
|
|
25
|
+
const mediaClient = new MediaClient({ authProvider });
|
|
26
|
+
|
|
27
|
+
const fileStateSubscribable: MediaSubscribable<FileState> = mediaClient.file.getFileState(id);
|
|
28
|
+
|
|
29
|
+
const mediaObserver: MediaObserver<FileState> = {
|
|
30
|
+
next: (fileState) => {
|
|
31
|
+
nextCallback(fileState)
|
|
32
|
+
},
|
|
33
|
+
error: (error) => {
|
|
34
|
+
errorCallback(error)
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const subscription: MediaSubscription = fileStateSubscribable.subscribe(mediaObserver);
|
|
39
|
+
|
|
40
|
+
subscription.unsubscribe();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
upload:
|
|
44
|
+
The returned type of this function has changed from RxJs ReplaySubject to MediaSubscribable.
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
import { MediaClient, MediaObserver, MediaSubscribable, MediaSubscription } from '@atlaskit/media-client';
|
|
48
|
+
|
|
49
|
+
const mediaClient = new MediaClient({ authProvider });
|
|
50
|
+
|
|
51
|
+
const uploadFileSubscribable: MediaSubscribable<FileState> = mediaClient.file.upload(uploadableFile);
|
|
52
|
+
|
|
53
|
+
const mediaObserver: MediaObserver<FileState> = {
|
|
54
|
+
next: (fileState) => {
|
|
55
|
+
nextCallback(fileState)
|
|
56
|
+
},
|
|
57
|
+
error: (error) => {
|
|
58
|
+
errorCallback(error)
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const subscription: MediaSubscription = uploadFileSubscribable.subscribe(mediaObserver);
|
|
63
|
+
|
|
64
|
+
subscription.unsubscribe();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
getItems:
|
|
68
|
+
The returned type of this function has changed from RxJs ReplaySubject to MediaSubscribable.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
import { MediaClient, MediaObserver, MediaSubscribable, MediaSubscription } from '@atlaskit/media-client';
|
|
72
|
+
|
|
73
|
+
const mediaClient = new MediaClient({ authProvider });
|
|
74
|
+
|
|
75
|
+
const collectionItemsSubscribable: MediaSubscribable<MediaCollectionItem[]> = mediaClient.collection.getItems(collectionName);
|
|
76
|
+
|
|
77
|
+
const mediaObserver: MediaObserver<MediaCollectionItem[]> = {
|
|
78
|
+
next: (items) => {
|
|
79
|
+
nextCallback(items)
|
|
80
|
+
},
|
|
81
|
+
error: (error) => {
|
|
82
|
+
errorCallback(error)
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const subscription: MediaSubscription = collectionItemsSubscribable.subscribe(mediaObserver);
|
|
87
|
+
|
|
88
|
+
subscription.unsubscribe();
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies
|
|
94
|
+
|
|
95
|
+
## 10.0.3
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies
|
|
100
|
+
|
|
3
101
|
## 10.0.2
|
|
4
102
|
|
|
5
103
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -21,5 +21,5 @@ export declare class MediaTable extends Component<MediaTableProps & WrappedCompo
|
|
|
21
21
|
private renderMediaViewer;
|
|
22
22
|
render(): JSX.Element;
|
|
23
23
|
}
|
|
24
|
-
declare const _default: React.ComponentType<import("@atlaskit/media-client").WithMediaClientConfigProps<
|
|
24
|
+
declare const _default: React.ComponentType<import("@atlaskit/media-client").WithMediaClientConfigProps<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<MediaTableProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>>;
|
|
25
25
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const NameCellWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
3
|
-
export declare const TruncateWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
4
|
-
export declare const MediaTableWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
2
|
+
export declare const NameCellWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const TruncateWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const MediaTableWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Table UI component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,31 +27,30 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
30
|
-
"@atlaskit/button": "^16.
|
|
30
|
+
"@atlaskit/button": "^16.3.0",
|
|
31
31
|
"@atlaskit/dynamic-table": "^14.5.0",
|
|
32
32
|
"@atlaskit/icon": "^21.10.0",
|
|
33
|
-
"@atlaskit/media-client": "^
|
|
34
|
-
"@atlaskit/media-ui": "^
|
|
35
|
-
"@atlaskit/media-viewer": "^46.
|
|
33
|
+
"@atlaskit/media-client": "^15.1.0",
|
|
34
|
+
"@atlaskit/media-ui": "^21.1.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.
|
|
42
|
+
"@atlaskit/media-core": "^32.3.1",
|
|
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
|
-
"@atlaskit/media-common": "^2.
|
|
53
|
-
"@atlaskit/media-core": "^32.
|
|
54
|
-
"@atlaskit/media-test-helpers": "^29.
|
|
51
|
+
"@atlaskit/media-common": "^2.12.0",
|
|
52
|
+
"@atlaskit/media-core": "^32.3.0",
|
|
53
|
+
"@atlaskit/media-test-helpers": "^29.4.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,9 +58,8 @@
|
|
|
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
|
-
"typescript": "
|
|
62
|
+
"typescript": "4.2.4"
|
|
65
63
|
},
|
|
66
64
|
"resolutions": {
|
|
67
65
|
"lru-fast": "0.2.2"
|