@atlaskit/media-table 15.2.5 → 15.3.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,22 @@
1
1
  # @atlaskit/media-table
2
2
 
3
+ ## 15.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`6099ac032dd30`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6099ac032dd30) -
8
+ Added viewerOptions to override file preview renderer in media components
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 15.2.6
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 15.2.5
4
21
 
5
22
  ### Patch Changes
@@ -217,7 +217,8 @@ var MediaTable = exports.MediaTable = /*#__PURE__*/function (_Component) {
217
217
  var mediaViewerSelectedItem = _this.state.mediaViewerSelectedItem;
218
218
  var _this$props5 = _this.props,
219
219
  mediaClient = _this$props5.mediaClient,
220
- items = _this$props5.items;
220
+ items = _this$props5.items,
221
+ viewerOptions = _this$props5.viewerOptions;
221
222
  if (!mediaViewerSelectedItem) {
222
223
  return null;
223
224
  }
@@ -230,7 +231,8 @@ var MediaTable = exports.MediaTable = /*#__PURE__*/function (_Component) {
230
231
  items: mediaViewerItems,
231
232
  selectedItem: mediaViewerSelectedItem,
232
233
  onClose: _this.onMediaViewerClose,
233
- collectionName: collectionName
234
+ collectionName: collectionName,
235
+ viewerOptions: viewerOptions
234
236
  }), document.body);
235
237
  });
236
238
  return _this;
@@ -208,7 +208,8 @@ export class MediaTable extends Component {
208
208
  } = this.state;
209
209
  const {
210
210
  mediaClient,
211
- items
211
+ items,
212
+ viewerOptions
212
213
  } = this.props;
213
214
  if (!mediaViewerSelectedItem) {
214
215
  return null;
@@ -220,7 +221,8 @@ export class MediaTable extends Component {
220
221
  items: mediaViewerItems,
221
222
  selectedItem: mediaViewerSelectedItem,
222
223
  onClose: this.onMediaViewerClose,
223
- collectionName: collectionName
224
+ collectionName: collectionName,
225
+ viewerOptions: viewerOptions
224
226
  }), document.body);
225
227
  });
226
228
  }
@@ -209,7 +209,8 @@ export var MediaTable = /*#__PURE__*/function (_Component) {
209
209
  var mediaViewerSelectedItem = _this.state.mediaViewerSelectedItem;
210
210
  var _this$props5 = _this.props,
211
211
  mediaClient = _this$props5.mediaClient,
212
- items = _this$props5.items;
212
+ items = _this$props5.items,
213
+ viewerOptions = _this$props5.viewerOptions;
213
214
  if (!mediaViewerSelectedItem) {
214
215
  return null;
215
216
  }
@@ -222,7 +223,8 @@ export var MediaTable = /*#__PURE__*/function (_Component) {
222
223
  items: mediaViewerItems,
223
224
  selectedItem: mediaViewerSelectedItem,
224
225
  onClose: _this.onMediaViewerClose,
225
- collectionName: collectionName
226
+ collectionName: collectionName,
227
+ viewerOptions: viewerOptions
226
228
  }), document.body);
227
229
  });
228
230
  return _this;
@@ -3,6 +3,7 @@ import { type Identifier, type FileIdentifier, type MediaClient } from '@atlaski
3
3
  import { type HeadType } from '@atlaskit/dynamic-table/types';
4
4
  import { type SortOrderType } from '@atlaskit/dynamic-table/types';
5
5
  import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { type ViewerOptionsProps } from '@atlaskit/media-viewer';
6
7
  export type { SortOrderType };
7
8
  export interface FileInfo {
8
9
  fileName: string;
@@ -61,6 +62,8 @@ export interface MediaTableProps {
61
62
  highlightedRowIndex?: number[];
62
63
  /** callback triggered when row click is passed, if returned true it will prevent default behaviour. **/
63
64
  onRowClick?: (rowData: RowData, index: number) => boolean;
65
+ /** Sets viewer options **/
66
+ viewerOptions?: ViewerOptionsProps;
64
67
  }
65
68
  export interface MediaTableState {
66
69
  mediaViewerSelectedItem?: Identifier;
@@ -3,6 +3,7 @@ import { type Identifier, type FileIdentifier, type MediaClient } from '@atlaski
3
3
  import { type HeadType } from '@atlaskit/dynamic-table/types';
4
4
  import { type SortOrderType } from '@atlaskit/dynamic-table/types';
5
5
  import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { type ViewerOptionsProps } from '@atlaskit/media-viewer';
6
7
  export type { SortOrderType };
7
8
  export interface FileInfo {
8
9
  fileName: string;
@@ -61,6 +62,8 @@ export interface MediaTableProps {
61
62
  highlightedRowIndex?: number[];
62
63
  /** callback triggered when row click is passed, if returned true it will prevent default behaviour. **/
63
64
  onRowClick?: (rowData: RowData, index: number) => boolean;
65
+ /** Sets viewer options **/
66
+ viewerOptions?: ViewerOptionsProps;
64
67
  }
65
68
  export interface MediaTableState {
66
69
  mediaViewerSelectedItem?: Identifier;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-table",
3
- "version": "15.2.5",
3
+ "version": "15.3.0",
4
4
  "description": "Table UI component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,16 +34,16 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/analytics-next": "^10.1.0",
37
- "@atlaskit/button": "^20.2.0",
37
+ "@atlaskit/button": "^20.3.0",
38
38
  "@atlaskit/dynamic-table": "^16.1.0",
39
- "@atlaskit/icon": "^22.22.0",
40
- "@atlaskit/media-client": "^28.0.0",
41
- "@atlaskit/media-client-react": "^2.2.0",
42
- "@atlaskit/media-ui": "^25.16.0",
43
- "@atlaskit/media-viewer": "^49.2.0",
39
+ "@atlaskit/icon": "^22.24.0",
40
+ "@atlaskit/media-client": "^28.2.0",
41
+ "@atlaskit/media-client-react": "^2.3.0",
42
+ "@atlaskit/media-ui": "^26.1.0",
43
+ "@atlaskit/media-viewer": "^49.3.0",
44
44
  "@atlaskit/theme": "^14.0.0",
45
- "@atlaskit/tokens": "^2.0.0",
46
- "@atlaskit/tooltip": "^18.8.0",
45
+ "@atlaskit/tokens": "^2.2.0",
46
+ "@atlaskit/tooltip": "^18.9.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "memoize-one": "^6.0.0"
49
49
  },
@@ -55,9 +55,9 @@
55
55
  "react-intl-next": "npm:react-intl@^5.18.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@atlaskit/icon-file-type": "^6.5.0",
58
+ "@atlaskit/icon-file-type": "^6.7.0",
59
59
  "@atlaskit/media-core": "^34.3.0",
60
- "@atlaskit/media-test-helpers": "^34.5.0",
60
+ "@atlaskit/media-test-helpers": "^34.6.0",
61
61
  "@atlaskit/range": "^7.4.0",
62
62
  "@emotion/react": "^11.7.1",
63
63
  "@testing-library/react": "^12.1.5",