@vidispine/vdt-mui 22.3.0-pre.5 → 22.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.
Files changed (3) hide show
  1. package/dist/index.es.js +164 -45
  2. package/dist/index.js +172 -52
  3. package/package.json +31 -31
package/dist/index.es.js CHANGED
@@ -5,7 +5,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
5
5
  import clsx from 'clsx';
6
6
  import List from '@mui/material/List';
7
7
  import VidispinePropTypes from '@vidispine/proptypes';
8
- import { memo, useMemo, Fragment as Fragment$1, createContext, useState, useCallback, useContext } from 'react';
8
+ import { useMemo, Fragment as Fragment$1, createContext, useState, useCallback, useContext } from 'react';
9
9
  import { Avatar, Skeleton, ListItem, ListItemAvatar, ListItemText, ListItemSecondaryAction, createTheme, ThemeProvider as ThemeProvider$1 } from '@mui/material';
10
10
  import { parseMetadataType } from '@vidispine/vdt-js';
11
11
  import FolderIcon from '@mui/icons-material/Folder';
@@ -1149,7 +1149,7 @@ function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) {
1149
1149
  var AUDIO_MIMETYPE_PREFIX = 'audio';
1150
1150
  var VIDEO_MIMETYPE_PREFIX = 'video';
1151
1151
  var IMAGE_MIMETYPE_PREFIX = 'image';
1152
- var styles$7 = function styles() {
1152
+ var styles$8 = function styles() {
1153
1153
  return {
1154
1154
  root: {}
1155
1155
  };
@@ -1230,10 +1230,10 @@ MimeTypeIcon.defaultProps = {
1230
1230
  placeholderIcon: NoteAddIcon
1231
1231
  };
1232
1232
 
1233
- var Component$7 = withStyles(styles$7, {
1233
+ var Component$8 = withStyles(styles$8, {
1234
1234
  name: 'VdtMimeTypeIcon'
1235
1235
  })(MimeTypeIcon);
1236
- Component$7.displayName = 'MimeTypeIcon';
1236
+ Component$8.displayName = 'MimeTypeIcon';
1237
1237
 
1238
1238
  var _excluded$7 = ["mediaType"],
1239
1239
  _excluded2 = ["className", "classes", "entityType", "mediaType", "itemIcon", "collectionIcon", "libraryIcon", "libraryAudioIcon", "libraryVideoIcon", "libraryImageIcon", "placeholderIcon", "MediaTypeComponent", "MediaTypeProps"];
@@ -1249,12 +1249,12 @@ function MediaTypeIcon(_ref) {
1249
1249
  var mediaType = _ref.mediaType,
1250
1250
  props = _objectWithoutProperties(_ref, _excluded$7);
1251
1251
 
1252
- return /*#__PURE__*/jsx(Component$7, _objectSpread$7({
1252
+ return /*#__PURE__*/jsx(Component$8, _objectSpread$7({
1253
1253
  mimeType: mediaType
1254
1254
  }, props));
1255
1255
  }
1256
1256
 
1257
- var styles$6 = function styles() {
1257
+ var styles$7 = function styles() {
1258
1258
  return {
1259
1259
  root: {},
1260
1260
  mediaType: {}
@@ -1277,6 +1277,7 @@ function EntityIcon(_ref2) {
1277
1277
  props = _objectWithoutProperties(_ref2, _excluded2);
1278
1278
 
1279
1279
  var IconComponent = placeholderIcon;
1280
+ var iconProps = {};
1280
1281
 
1281
1282
  if (entityType && typeof entityType === 'string') {
1282
1283
  switch (entityType.toLowerCase()) {
@@ -1285,12 +1286,11 @@ function EntityIcon(_ref2) {
1285
1286
  IconComponent = itemIcon;
1286
1287
 
1287
1288
  if (mediaType && typeof mediaType === 'string') {
1288
- IconComponent = /*#__PURE__*/memo(function (iconProps) {
1289
- return /*#__PURE__*/jsx(MediaTypeComponent, _objectSpread$7(_objectSpread$7({
1290
- className: clsx(classes.mediaType, 'VdtEntityIcon-mediaType'),
1291
- mediaType: mediaType
1292
- }, MediaTypeProps), iconProps));
1293
- }, [mediaType, MediaTypeProps]);
1289
+ IconComponent = MediaTypeComponent;
1290
+ iconProps = _objectSpread$7({
1291
+ className: clsx(classes.mediaType, 'VdtEntityIcon-mediaType'),
1292
+ mediaType: mediaType
1293
+ }, MediaTypeProps);
1294
1294
  }
1295
1295
 
1296
1296
  break;
@@ -1316,9 +1316,9 @@ function EntityIcon(_ref2) {
1316
1316
  }
1317
1317
  }
1318
1318
 
1319
- return /*#__PURE__*/jsx(IconComponent, _objectSpread$7({
1319
+ return /*#__PURE__*/jsx(IconComponent, _objectSpread$7(_objectSpread$7({
1320
1320
  className: clsx(className, classes.root, 'VdtEntityIcon-root')
1321
- }, props));
1321
+ }, iconProps), props));
1322
1322
  }
1323
1323
  EntityIcon.propTypes = {
1324
1324
  /**
@@ -1402,17 +1402,17 @@ EntityIcon.defaultProps = {
1402
1402
  MediaTypeProps: {}
1403
1403
  };
1404
1404
 
1405
- var Component$6 = withStyles(styles$6, {
1405
+ var Component$7 = withStyles(styles$7, {
1406
1406
  name: 'VdtEntityIcon'
1407
1407
  })(EntityIcon);
1408
- Component$6.displayName = 'EntityIcon';
1408
+ Component$7.displayName = 'EntityIcon';
1409
1409
 
1410
1410
  var _excluded$6 = ["className", "classes", "isLoading", "entityType", "mediaType", "variant", "IconComponent", "IconProps", "SkeletonProps"];
1411
1411
 
1412
1412
  function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1413
1413
 
1414
1414
  function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1415
- var styles$5 = function styles() {
1415
+ var styles$6 = function styles() {
1416
1416
  return {
1417
1417
  root: {
1418
1418
  transition: 'background-color .2s ease-out'
@@ -1509,22 +1509,22 @@ EntityAvatar.defaultProps = {
1509
1509
  mediaType: undefined,
1510
1510
  variant: 'square',
1511
1511
  isLoading: false,
1512
- IconComponent: Component$6,
1512
+ IconComponent: Component$7,
1513
1513
  IconProps: {},
1514
1514
  SkeletonProps: {}
1515
1515
  };
1516
1516
 
1517
- var Component$5 = withStyles(styles$5, {
1517
+ var Component$6 = withStyles(styles$6, {
1518
1518
  name: 'VdtEntityAvatar'
1519
1519
  })(EntityAvatar);
1520
- Component$5.displayName = 'EntityAvatar';
1520
+ Component$6.displayName = 'EntityAvatar';
1521
1521
 
1522
1522
  var _excluded$5 = ["className", "classes", "collectionType", "onClick", "parseMetadataOptions", "primaryFieldName", "primaryFunction", "secondaryFieldName", "secondaryFunction", "isLoading", "AvatarComponent", "AvatarProps", "ActionComponent", "ActionProps"];
1523
1523
 
1524
1524
  function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1525
1525
 
1526
1526
  function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1527
- var styles$4 = function styles() {
1527
+ var styles$5 = function styles() {
1528
1528
  return {
1529
1529
  root: {
1530
1530
  '&:hover .VdtCollectionListItem-secondaryAction': {
@@ -1696,7 +1696,7 @@ var defaultProps$4 = {
1696
1696
  onClick: undefined,
1697
1697
  ActionComponent: undefined,
1698
1698
  ActionProps: {},
1699
- AvatarComponent: Component$5,
1699
+ AvatarComponent: Component$6,
1700
1700
  AvatarProps: {},
1701
1701
  parseMetadataOptions: {
1702
1702
  flat: true,
@@ -1707,17 +1707,17 @@ var defaultProps$4 = {
1707
1707
  CollectionListItem.propTypes = propTypes$4;
1708
1708
  CollectionListItem.defaultProps = defaultProps$4;
1709
1709
 
1710
- var Component$4 = withStyles(styles$4, {
1710
+ var Component$5 = withStyles(styles$5, {
1711
1711
  name: 'VdtCollectionListItem'
1712
1712
  })(CollectionListItem);
1713
- Component$4.displayName = 'CollectionListItem';
1713
+ Component$5.displayName = 'CollectionListItem';
1714
1714
 
1715
1715
  var _excluded$4 = ["className", "classes", "collectionListType", "emptyText", "isLoading", "loadingAmount", "onListItemClick", "ListItemComponent", "ListItemProps"];
1716
1716
 
1717
1717
  function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1718
1718
 
1719
1719
  function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1720
- var styles$3 = function styles() {
1720
+ var styles$4 = function styles() {
1721
1721
  return {
1722
1722
  root: {
1723
1723
  width: '100%'
@@ -1813,23 +1813,23 @@ var defaultProps$3 = {
1813
1813
  isLoading: false,
1814
1814
  loadingAmount: 3,
1815
1815
  onListItemClick: undefined,
1816
- ListItemComponent: Component$4,
1816
+ ListItemComponent: Component$5,
1817
1817
  ListItemProps: {}
1818
1818
  };
1819
1819
  CollectionList.propTypes = propTypes$3;
1820
1820
  CollectionList.defaultProps = defaultProps$3;
1821
1821
 
1822
- var Component$3 = withStyles(styles$3, {
1822
+ var Component$4 = withStyles(styles$4, {
1823
1823
  name: 'VdtCollectionList'
1824
1824
  })(CollectionList);
1825
- Component$3.displayName = 'CollectionList';
1825
+ Component$4.displayName = 'CollectionList';
1826
1826
 
1827
1827
  var _excluded$3 = ["className", "classes", "itemType", "onClick", "parseMetadataOptions", "primaryFieldName", "primaryFunction", "secondaryFieldName", "secondaryFunction", "isLoading", "AvatarComponent", "AvatarProps", "ActionComponent", "ActionProps"];
1828
1828
 
1829
1829
  function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1830
1830
 
1831
1831
  function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1832
- var styles$2 = function styles() {
1832
+ var styles$3 = function styles() {
1833
1833
  return {
1834
1834
  root: {
1835
1835
  '&:hover .VdtCollectionListItem-secondaryAction': {
@@ -2003,7 +2003,7 @@ var defaultProps$2 = {
2003
2003
  onClick: undefined,
2004
2004
  ActionComponent: undefined,
2005
2005
  ActionProps: {},
2006
- AvatarComponent: Component$5,
2006
+ AvatarComponent: Component$6,
2007
2007
  AvatarProps: {},
2008
2008
  parseMetadataOptions: {
2009
2009
  flat: true,
@@ -2014,17 +2014,17 @@ var defaultProps$2 = {
2014
2014
  ItemListItem.propTypes = propTypes$2;
2015
2015
  ItemListItem.defaultProps = defaultProps$2;
2016
2016
 
2017
- var Component$2 = withStyles(styles$2, {
2017
+ var Component$3 = withStyles(styles$3, {
2018
2018
  name: 'VdtItemListItem'
2019
2019
  })(ItemListItem);
2020
- Component$2.displayName = 'ItemListItem';
2020
+ Component$3.displayName = 'ItemListItem';
2021
2021
 
2022
2022
  var _excluded$2 = ["className", "classes", "itemListType", "emptyText", "isLoading", "loadingAmount", "onListItemClick", "ListItemComponent", "ListItemProps"];
2023
2023
 
2024
2024
  function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2025
2025
 
2026
2026
  function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2027
- var styles$1 = function styles() {
2027
+ var styles$2 = function styles() {
2028
2028
  return {
2029
2029
  root: {
2030
2030
  width: '100%'
@@ -2119,23 +2119,23 @@ var defaultProps$1 = {
2119
2119
  isLoading: false,
2120
2120
  loadingAmount: 3,
2121
2121
  onListItemClick: undefined,
2122
- ListItemComponent: Component$2,
2122
+ ListItemComponent: Component$3,
2123
2123
  ListItemProps: {}
2124
2124
  };
2125
2125
  ItemList.propTypes = propTypes$1;
2126
2126
  ItemList.defaultProps = defaultProps$1;
2127
2127
 
2128
- var Component$1 = withStyles(styles$1, {
2128
+ var Component$2 = withStyles(styles$2, {
2129
2129
  name: 'VdtItemList'
2130
2130
  })(ItemList);
2131
- Component$1.displayName = 'ItemList';
2131
+ Component$2.displayName = 'ItemList';
2132
2132
 
2133
2133
  var _excluded$1 = ["className", "classes", "entities", "emptyText", "isLoading", "loadingAmount", "onItemListItemClick", "onCollectionListItemClick", "onListItemClick", "ItemListItemComponent", "ItemListItemProps", "CollectionListItemComponent", "CollectionListItemProps", "ListItemProps"];
2134
2134
 
2135
2135
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2136
2136
 
2137
2137
  function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2138
- var styles = function styles() {
2138
+ var styles$1 = function styles() {
2139
2139
  return {
2140
2140
  root: {
2141
2141
  width: '100%'
@@ -2278,19 +2278,140 @@ var defaultProps = {
2278
2278
  onItemListItemClick: undefined,
2279
2279
  onCollectionListItemClick: undefined,
2280
2280
  onListItemClick: undefined,
2281
- ItemListItemComponent: Component$2,
2281
+ ItemListItemComponent: Component$3,
2282
2282
  ItemListItemProps: {},
2283
- CollectionListItemComponent: Component$4,
2283
+ CollectionListItemComponent: Component$5,
2284
2284
  CollectionListItemProps: {},
2285
2285
  ListItemProps: {}
2286
2286
  };
2287
2287
  EntityList.propTypes = propTypes;
2288
2288
  EntityList.defaultProps = defaultProps;
2289
2289
 
2290
- var Component = withStyles(styles, {
2290
+ var Component$1 = withStyles(styles$1, {
2291
2291
  name: 'VdtEntityList'
2292
2292
  })(EntityList);
2293
- Component.displayName = 'EntityList';
2293
+ Component$1.displayName = 'EntityList';
2294
+
2295
+ var styles = {
2296
+ root: {
2297
+ display: 'flex',
2298
+ flexWrap: 'wrap',
2299
+ pointerEvents: 'none',
2300
+ width: 'inherit',
2301
+ height: 'inherit'
2302
+ },
2303
+ row: {},
2304
+ image: {
2305
+ objectFit: 'cover',
2306
+ // Left align if multiple images
2307
+ '&:last-child:not(:first-child)': {
2308
+ marginRight: 'auto'
2309
+ }
2310
+ },
2311
+ notStretchSingle: {
2312
+ // Do not set full width or height for single image
2313
+ '&:last-child&:first-child': {
2314
+ objectFit: 'contain'
2315
+ }
2316
+ }
2317
+ };
2318
+ function ImageCollage(_ref) {
2319
+ var className = _ref.className,
2320
+ classes = _ref.classes,
2321
+ urls = _ref.urls,
2322
+ maxImages = _ref.maxImages,
2323
+ maxColumns = _ref.maxColumns,
2324
+ showSingleStretched = _ref.showSingleStretched,
2325
+ showLastRowStretched = _ref.showLastRowStretched,
2326
+ onError = _ref.onError;
2327
+
2328
+ if (!(urls !== null && urls !== void 0 && urls.length) || maxImages < 0 || maxColumns < 0) {
2329
+ return null;
2330
+ }
2331
+
2332
+ var amountOfImages = Math.min(maxImages, urls.length);
2333
+ var amountOfCols = Math.min(maxColumns, amountOfImages);
2334
+ var amountOfRows = Math.ceil(amountOfImages / amountOfCols);
2335
+ var height = "".concat(100 / amountOfRows, "%");
2336
+ var amountOfImagesOnLastRow = amountOfImages % amountOfCols || amountOfCols;
2337
+ return /*#__PURE__*/jsx("div", {
2338
+ className: clsx(className, classes.root, 'VdtImageCollage-root'),
2339
+ children: urls.slice(0, maxImages).map(function (url, i) {
2340
+ var _clsx;
2341
+
2342
+ var isLastRow = Math.ceil((i + 1) / amountOfCols) === amountOfRows;
2343
+ var width = "".concat(100 / Math.max(Math.min(isLastRow && showLastRowStretched ? amountOfImagesOnLastRow : amountOfCols, amountOfImages), 1), "%");
2344
+ return /*#__PURE__*/jsx("img", {
2345
+ className: clsx((_clsx = {}, _defineProperty(_clsx, classes.image, true), _defineProperty(_clsx, 'VdtImageCollage-image', true), _defineProperty(_clsx, classes.notStretchSingle, !showSingleStretched), _clsx)),
2346
+ src: url,
2347
+ style: {
2348
+ height: height,
2349
+ width: width
2350
+ },
2351
+ onError: onError,
2352
+ alt: ""
2353
+ }, url);
2354
+ })
2355
+ });
2356
+ }
2357
+ ImageCollage.propTypes = {
2358
+ /**
2359
+ * Override or extend the styles applied to the component
2360
+ */
2361
+ classes: PropTypes.objectOf(PropTypes.string),
2362
+
2363
+ /**
2364
+ * Override styles with className
2365
+ */
2366
+ className: PropTypes.string,
2367
+
2368
+ /**
2369
+ * Image urls to show
2370
+ */
2371
+ urls: PropTypes.arrayOf(PropTypes.string),
2372
+
2373
+ /**
2374
+ * Max amount of columns to display
2375
+ */
2376
+ maxColumns: PropTypes.number,
2377
+
2378
+ /**
2379
+ * Max amount of images to display
2380
+ */
2381
+ maxImages: PropTypes.number,
2382
+
2383
+ /**
2384
+ * Whether to stretch full width or follow height for single image
2385
+ */
2386
+ showSingleStretched: PropTypes.bool,
2387
+
2388
+ /**
2389
+ * Whether to stretch full width or follow height for last images
2390
+ */
2391
+ showLastRowStretched: PropTypes.bool,
2392
+
2393
+ /**
2394
+ * Callback for error
2395
+ */
2396
+ onError: PropTypes.func
2397
+ };
2398
+ ImageCollage.defaultProps = {
2399
+ className: undefined,
2400
+ classes: {},
2401
+ urls: [],
2402
+ maxColumns: 2,
2403
+ maxImages: 4,
2404
+ showSingleStretched: true,
2405
+ showLastRowStretched: true,
2406
+ onError: function onError() {
2407
+ return null;
2408
+ }
2409
+ };
2410
+
2411
+ var Component = withStyles(styles, {
2412
+ name: 'VdtImageCollage'
2413
+ })(ImageCollage);
2414
+ Component.displayName = 'ImageCollage';
2294
2415
 
2295
2416
  var _excluded = ["themes", "defaultPaletteKey", "localStoragePaletteKey", "MuiThemeProviderProps", "CssBaselineProps", "children"];
2296
2417
 
@@ -2360,9 +2481,7 @@ function ThemeProvider(_ref) {
2360
2481
  var newPaletteKey = paletteKeys[0];
2361
2482
 
2362
2483
  if (paletteKeys.length > 0 && palette === paletteKeys[0]) {
2363
- var _paletteKeys = _slicedToArray(paletteKeys, 2);
2364
-
2365
- newPaletteKey = _paletteKeys[1];
2484
+ newPaletteKey = paletteKeys[1];
2366
2485
  }
2367
2486
 
2368
2487
  updatePalette(newPaletteKey);
@@ -2400,4 +2519,4 @@ function useThemeContext() {
2400
2519
  return context;
2401
2520
  }
2402
2521
 
2403
- export { Component$3 as CollectionList, Component$4 as CollectionListItem, Component$5 as EntityAvatar, Component$6 as EntityIcon, Component as EntityList, Component$1 as ItemList, Component$2 as ItemListItem, Component$7 as MimeTypeIcon, ThemeContext, ThemeProvider, useThemeContext };
2522
+ export { Component$4 as CollectionList, Component$5 as CollectionListItem, Component$6 as EntityAvatar, Component$7 as EntityIcon, Component$1 as EntityList, Component as ImageCollage, Component$2 as ItemList, Component$3 as ItemListItem, Component$8 as MimeTypeIcon, ThemeContext, ThemeProvider, useThemeContext };
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var styles$8 = require('@mui/styles');
5
+ var styles$9 = require('@mui/styles');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
7
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
8
8
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
@@ -1174,7 +1174,7 @@ function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) {
1174
1174
  var AUDIO_MIMETYPE_PREFIX = 'audio';
1175
1175
  var VIDEO_MIMETYPE_PREFIX = 'video';
1176
1176
  var IMAGE_MIMETYPE_PREFIX = 'image';
1177
- var styles$7 = function styles() {
1177
+ var styles$8 = function styles() {
1178
1178
  return {
1179
1179
  root: {}
1180
1180
  };
@@ -1255,10 +1255,10 @@ MimeTypeIcon.defaultProps = {
1255
1255
  placeholderIcon: NoteAddIcon__default["default"]
1256
1256
  };
1257
1257
 
1258
- var Component$7 = styles$8.withStyles(styles$7, {
1258
+ var Component$8 = styles$9.withStyles(styles$8, {
1259
1259
  name: 'VdtMimeTypeIcon'
1260
1260
  })(MimeTypeIcon);
1261
- Component$7.displayName = 'MimeTypeIcon';
1261
+ Component$8.displayName = 'MimeTypeIcon';
1262
1262
 
1263
1263
  var _excluded$7 = ["mediaType"],
1264
1264
  _excluded2 = ["className", "classes", "entityType", "mediaType", "itemIcon", "collectionIcon", "libraryIcon", "libraryAudioIcon", "libraryVideoIcon", "libraryImageIcon", "placeholderIcon", "MediaTypeComponent", "MediaTypeProps"];
@@ -1274,12 +1274,12 @@ function MediaTypeIcon(_ref) {
1274
1274
  var mediaType = _ref.mediaType,
1275
1275
  props = _objectWithoutProperties__default["default"](_ref, _excluded$7);
1276
1276
 
1277
- return /*#__PURE__*/jsxRuntime.jsx(Component$7, _objectSpread$7({
1277
+ return /*#__PURE__*/jsxRuntime.jsx(Component$8, _objectSpread$7({
1278
1278
  mimeType: mediaType
1279
1279
  }, props));
1280
1280
  }
1281
1281
 
1282
- var styles$6 = function styles() {
1282
+ var styles$7 = function styles() {
1283
1283
  return {
1284
1284
  root: {},
1285
1285
  mediaType: {}
@@ -1302,6 +1302,7 @@ function EntityIcon(_ref2) {
1302
1302
  props = _objectWithoutProperties__default["default"](_ref2, _excluded2);
1303
1303
 
1304
1304
  var IconComponent = placeholderIcon;
1305
+ var iconProps = {};
1305
1306
 
1306
1307
  if (entityType && typeof entityType === 'string') {
1307
1308
  switch (entityType.toLowerCase()) {
@@ -1310,12 +1311,11 @@ function EntityIcon(_ref2) {
1310
1311
  IconComponent = itemIcon;
1311
1312
 
1312
1313
  if (mediaType && typeof mediaType === 'string') {
1313
- IconComponent = /*#__PURE__*/react.memo(function (iconProps) {
1314
- return /*#__PURE__*/jsxRuntime.jsx(MediaTypeComponent, _objectSpread$7(_objectSpread$7({
1315
- className: clsx__default["default"](classes.mediaType, 'VdtEntityIcon-mediaType'),
1316
- mediaType: mediaType
1317
- }, MediaTypeProps), iconProps));
1318
- }, [mediaType, MediaTypeProps]);
1314
+ IconComponent = MediaTypeComponent;
1315
+ iconProps = _objectSpread$7({
1316
+ className: clsx__default["default"](classes.mediaType, 'VdtEntityIcon-mediaType'),
1317
+ mediaType: mediaType
1318
+ }, MediaTypeProps);
1319
1319
  }
1320
1320
 
1321
1321
  break;
@@ -1341,9 +1341,9 @@ function EntityIcon(_ref2) {
1341
1341
  }
1342
1342
  }
1343
1343
 
1344
- return /*#__PURE__*/jsxRuntime.jsx(IconComponent, _objectSpread$7({
1344
+ return /*#__PURE__*/jsxRuntime.jsx(IconComponent, _objectSpread$7(_objectSpread$7({
1345
1345
  className: clsx__default["default"](className, classes.root, 'VdtEntityIcon-root')
1346
- }, props));
1346
+ }, iconProps), props));
1347
1347
  }
1348
1348
  EntityIcon.propTypes = {
1349
1349
  /**
@@ -1427,17 +1427,17 @@ EntityIcon.defaultProps = {
1427
1427
  MediaTypeProps: {}
1428
1428
  };
1429
1429
 
1430
- var Component$6 = styles$8.withStyles(styles$6, {
1430
+ var Component$7 = styles$9.withStyles(styles$7, {
1431
1431
  name: 'VdtEntityIcon'
1432
1432
  })(EntityIcon);
1433
- Component$6.displayName = 'EntityIcon';
1433
+ Component$7.displayName = 'EntityIcon';
1434
1434
 
1435
1435
  var _excluded$6 = ["className", "classes", "isLoading", "entityType", "mediaType", "variant", "IconComponent", "IconProps", "SkeletonProps"];
1436
1436
 
1437
1437
  function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1438
1438
 
1439
1439
  function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1440
- var styles$5 = function styles() {
1440
+ var styles$6 = function styles() {
1441
1441
  return {
1442
1442
  root: {
1443
1443
  transition: 'background-color .2s ease-out'
@@ -1534,22 +1534,22 @@ EntityAvatar.defaultProps = {
1534
1534
  mediaType: undefined,
1535
1535
  variant: 'square',
1536
1536
  isLoading: false,
1537
- IconComponent: Component$6,
1537
+ IconComponent: Component$7,
1538
1538
  IconProps: {},
1539
1539
  SkeletonProps: {}
1540
1540
  };
1541
1541
 
1542
- var Component$5 = styles$8.withStyles(styles$5, {
1542
+ var Component$6 = styles$9.withStyles(styles$6, {
1543
1543
  name: 'VdtEntityAvatar'
1544
1544
  })(EntityAvatar);
1545
- Component$5.displayName = 'EntityAvatar';
1545
+ Component$6.displayName = 'EntityAvatar';
1546
1546
 
1547
1547
  var _excluded$5 = ["className", "classes", "collectionType", "onClick", "parseMetadataOptions", "primaryFieldName", "primaryFunction", "secondaryFieldName", "secondaryFunction", "isLoading", "AvatarComponent", "AvatarProps", "ActionComponent", "ActionProps"];
1548
1548
 
1549
1549
  function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1550
1550
 
1551
1551
  function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1552
- var styles$4 = function styles() {
1552
+ var styles$5 = function styles() {
1553
1553
  return {
1554
1554
  root: {
1555
1555
  '&:hover .VdtCollectionListItem-secondaryAction': {
@@ -1721,7 +1721,7 @@ var defaultProps$4 = {
1721
1721
  onClick: undefined,
1722
1722
  ActionComponent: undefined,
1723
1723
  ActionProps: {},
1724
- AvatarComponent: Component$5,
1724
+ AvatarComponent: Component$6,
1725
1725
  AvatarProps: {},
1726
1726
  parseMetadataOptions: {
1727
1727
  flat: true,
@@ -1732,17 +1732,17 @@ var defaultProps$4 = {
1732
1732
  CollectionListItem.propTypes = propTypes$4;
1733
1733
  CollectionListItem.defaultProps = defaultProps$4;
1734
1734
 
1735
- var Component$4 = styles$8.withStyles(styles$4, {
1735
+ var Component$5 = styles$9.withStyles(styles$5, {
1736
1736
  name: 'VdtCollectionListItem'
1737
1737
  })(CollectionListItem);
1738
- Component$4.displayName = 'CollectionListItem';
1738
+ Component$5.displayName = 'CollectionListItem';
1739
1739
 
1740
1740
  var _excluded$4 = ["className", "classes", "collectionListType", "emptyText", "isLoading", "loadingAmount", "onListItemClick", "ListItemComponent", "ListItemProps"];
1741
1741
 
1742
1742
  function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1743
1743
 
1744
1744
  function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1745
- var styles$3 = function styles() {
1745
+ var styles$4 = function styles() {
1746
1746
  return {
1747
1747
  root: {
1748
1748
  width: '100%'
@@ -1838,23 +1838,23 @@ var defaultProps$3 = {
1838
1838
  isLoading: false,
1839
1839
  loadingAmount: 3,
1840
1840
  onListItemClick: undefined,
1841
- ListItemComponent: Component$4,
1841
+ ListItemComponent: Component$5,
1842
1842
  ListItemProps: {}
1843
1843
  };
1844
1844
  CollectionList.propTypes = propTypes$3;
1845
1845
  CollectionList.defaultProps = defaultProps$3;
1846
1846
 
1847
- var Component$3 = styles$8.withStyles(styles$3, {
1847
+ var Component$4 = styles$9.withStyles(styles$4, {
1848
1848
  name: 'VdtCollectionList'
1849
1849
  })(CollectionList);
1850
- Component$3.displayName = 'CollectionList';
1850
+ Component$4.displayName = 'CollectionList';
1851
1851
 
1852
1852
  var _excluded$3 = ["className", "classes", "itemType", "onClick", "parseMetadataOptions", "primaryFieldName", "primaryFunction", "secondaryFieldName", "secondaryFunction", "isLoading", "AvatarComponent", "AvatarProps", "ActionComponent", "ActionProps"];
1853
1853
 
1854
1854
  function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1855
1855
 
1856
1856
  function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1857
- var styles$2 = function styles() {
1857
+ var styles$3 = function styles() {
1858
1858
  return {
1859
1859
  root: {
1860
1860
  '&:hover .VdtCollectionListItem-secondaryAction': {
@@ -2028,7 +2028,7 @@ var defaultProps$2 = {
2028
2028
  onClick: undefined,
2029
2029
  ActionComponent: undefined,
2030
2030
  ActionProps: {},
2031
- AvatarComponent: Component$5,
2031
+ AvatarComponent: Component$6,
2032
2032
  AvatarProps: {},
2033
2033
  parseMetadataOptions: {
2034
2034
  flat: true,
@@ -2039,17 +2039,17 @@ var defaultProps$2 = {
2039
2039
  ItemListItem.propTypes = propTypes$2;
2040
2040
  ItemListItem.defaultProps = defaultProps$2;
2041
2041
 
2042
- var Component$2 = styles$8.withStyles(styles$2, {
2042
+ var Component$3 = styles$9.withStyles(styles$3, {
2043
2043
  name: 'VdtItemListItem'
2044
2044
  })(ItemListItem);
2045
- Component$2.displayName = 'ItemListItem';
2045
+ Component$3.displayName = 'ItemListItem';
2046
2046
 
2047
2047
  var _excluded$2 = ["className", "classes", "itemListType", "emptyText", "isLoading", "loadingAmount", "onListItemClick", "ListItemComponent", "ListItemProps"];
2048
2048
 
2049
2049
  function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2050
2050
 
2051
2051
  function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2052
- var styles$1 = function styles() {
2052
+ var styles$2 = function styles() {
2053
2053
  return {
2054
2054
  root: {
2055
2055
  width: '100%'
@@ -2144,23 +2144,23 @@ var defaultProps$1 = {
2144
2144
  isLoading: false,
2145
2145
  loadingAmount: 3,
2146
2146
  onListItemClick: undefined,
2147
- ListItemComponent: Component$2,
2147
+ ListItemComponent: Component$3,
2148
2148
  ListItemProps: {}
2149
2149
  };
2150
2150
  ItemList.propTypes = propTypes$1;
2151
2151
  ItemList.defaultProps = defaultProps$1;
2152
2152
 
2153
- var Component$1 = styles$8.withStyles(styles$1, {
2153
+ var Component$2 = styles$9.withStyles(styles$2, {
2154
2154
  name: 'VdtItemList'
2155
2155
  })(ItemList);
2156
- Component$1.displayName = 'ItemList';
2156
+ Component$2.displayName = 'ItemList';
2157
2157
 
2158
2158
  var _excluded$1 = ["className", "classes", "entities", "emptyText", "isLoading", "loadingAmount", "onItemListItemClick", "onCollectionListItemClick", "onListItemClick", "ItemListItemComponent", "ItemListItemProps", "CollectionListItemComponent", "CollectionListItemProps", "ListItemProps"];
2159
2159
 
2160
2160
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2161
2161
 
2162
2162
  function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2163
- var styles = function styles() {
2163
+ var styles$1 = function styles() {
2164
2164
  return {
2165
2165
  root: {
2166
2166
  width: '100%'
@@ -2303,19 +2303,140 @@ var defaultProps = {
2303
2303
  onItemListItemClick: undefined,
2304
2304
  onCollectionListItemClick: undefined,
2305
2305
  onListItemClick: undefined,
2306
- ItemListItemComponent: Component$2,
2306
+ ItemListItemComponent: Component$3,
2307
2307
  ItemListItemProps: {},
2308
- CollectionListItemComponent: Component$4,
2308
+ CollectionListItemComponent: Component$5,
2309
2309
  CollectionListItemProps: {},
2310
2310
  ListItemProps: {}
2311
2311
  };
2312
2312
  EntityList.propTypes = propTypes;
2313
2313
  EntityList.defaultProps = defaultProps;
2314
2314
 
2315
- var Component = styles$8.withStyles(styles, {
2315
+ var Component$1 = styles$9.withStyles(styles$1, {
2316
2316
  name: 'VdtEntityList'
2317
2317
  })(EntityList);
2318
- Component.displayName = 'EntityList';
2318
+ Component$1.displayName = 'EntityList';
2319
+
2320
+ var styles = {
2321
+ root: {
2322
+ display: 'flex',
2323
+ flexWrap: 'wrap',
2324
+ pointerEvents: 'none',
2325
+ width: 'inherit',
2326
+ height: 'inherit'
2327
+ },
2328
+ row: {},
2329
+ image: {
2330
+ objectFit: 'cover',
2331
+ // Left align if multiple images
2332
+ '&:last-child:not(:first-child)': {
2333
+ marginRight: 'auto'
2334
+ }
2335
+ },
2336
+ notStretchSingle: {
2337
+ // Do not set full width or height for single image
2338
+ '&:last-child&:first-child': {
2339
+ objectFit: 'contain'
2340
+ }
2341
+ }
2342
+ };
2343
+ function ImageCollage(_ref) {
2344
+ var className = _ref.className,
2345
+ classes = _ref.classes,
2346
+ urls = _ref.urls,
2347
+ maxImages = _ref.maxImages,
2348
+ maxColumns = _ref.maxColumns,
2349
+ showSingleStretched = _ref.showSingleStretched,
2350
+ showLastRowStretched = _ref.showLastRowStretched,
2351
+ onError = _ref.onError;
2352
+
2353
+ if (!(urls !== null && urls !== void 0 && urls.length) || maxImages < 0 || maxColumns < 0) {
2354
+ return null;
2355
+ }
2356
+
2357
+ var amountOfImages = Math.min(maxImages, urls.length);
2358
+ var amountOfCols = Math.min(maxColumns, amountOfImages);
2359
+ var amountOfRows = Math.ceil(amountOfImages / amountOfCols);
2360
+ var height = "".concat(100 / amountOfRows, "%");
2361
+ var amountOfImagesOnLastRow = amountOfImages % amountOfCols || amountOfCols;
2362
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
2363
+ className: clsx__default["default"](className, classes.root, 'VdtImageCollage-root'),
2364
+ children: urls.slice(0, maxImages).map(function (url, i) {
2365
+ var _clsx;
2366
+
2367
+ var isLastRow = Math.ceil((i + 1) / amountOfCols) === amountOfRows;
2368
+ var width = "".concat(100 / Math.max(Math.min(isLastRow && showLastRowStretched ? amountOfImagesOnLastRow : amountOfCols, amountOfImages), 1), "%");
2369
+ return /*#__PURE__*/jsxRuntime.jsx("img", {
2370
+ className: clsx__default["default"]((_clsx = {}, _defineProperty__default["default"](_clsx, classes.image, true), _defineProperty__default["default"](_clsx, 'VdtImageCollage-image', true), _defineProperty__default["default"](_clsx, classes.notStretchSingle, !showSingleStretched), _clsx)),
2371
+ src: url,
2372
+ style: {
2373
+ height: height,
2374
+ width: width
2375
+ },
2376
+ onError: onError,
2377
+ alt: ""
2378
+ }, url);
2379
+ })
2380
+ });
2381
+ }
2382
+ ImageCollage.propTypes = {
2383
+ /**
2384
+ * Override or extend the styles applied to the component
2385
+ */
2386
+ classes: PropTypes.objectOf(PropTypes.string),
2387
+
2388
+ /**
2389
+ * Override styles with className
2390
+ */
2391
+ className: PropTypes.string,
2392
+
2393
+ /**
2394
+ * Image urls to show
2395
+ */
2396
+ urls: PropTypes.arrayOf(PropTypes.string),
2397
+
2398
+ /**
2399
+ * Max amount of columns to display
2400
+ */
2401
+ maxColumns: PropTypes.number,
2402
+
2403
+ /**
2404
+ * Max amount of images to display
2405
+ */
2406
+ maxImages: PropTypes.number,
2407
+
2408
+ /**
2409
+ * Whether to stretch full width or follow height for single image
2410
+ */
2411
+ showSingleStretched: PropTypes.bool,
2412
+
2413
+ /**
2414
+ * Whether to stretch full width or follow height for last images
2415
+ */
2416
+ showLastRowStretched: PropTypes.bool,
2417
+
2418
+ /**
2419
+ * Callback for error
2420
+ */
2421
+ onError: PropTypes.func
2422
+ };
2423
+ ImageCollage.defaultProps = {
2424
+ className: undefined,
2425
+ classes: {},
2426
+ urls: [],
2427
+ maxColumns: 2,
2428
+ maxImages: 4,
2429
+ showSingleStretched: true,
2430
+ showLastRowStretched: true,
2431
+ onError: function onError() {
2432
+ return null;
2433
+ }
2434
+ };
2435
+
2436
+ var Component = styles$9.withStyles(styles, {
2437
+ name: 'VdtImageCollage'
2438
+ })(ImageCollage);
2439
+ Component.displayName = 'ImageCollage';
2319
2440
 
2320
2441
  var _excluded = ["themes", "defaultPaletteKey", "localStoragePaletteKey", "MuiThemeProviderProps", "CssBaselineProps", "children"];
2321
2442
 
@@ -2385,9 +2506,7 @@ function ThemeProvider(_ref) {
2385
2506
  var newPaletteKey = paletteKeys[0];
2386
2507
 
2387
2508
  if (paletteKeys.length > 0 && palette === paletteKeys[0]) {
2388
- var _paletteKeys = _slicedToArray__default["default"](paletteKeys, 2);
2389
-
2390
- newPaletteKey = _paletteKeys[1];
2509
+ newPaletteKey = paletteKeys[1];
2391
2510
  }
2392
2511
 
2393
2512
  updatePalette(newPaletteKey);
@@ -2425,14 +2544,15 @@ function useThemeContext() {
2425
2544
  return context;
2426
2545
  }
2427
2546
 
2428
- exports.CollectionList = Component$3;
2429
- exports.CollectionListItem = Component$4;
2430
- exports.EntityAvatar = Component$5;
2431
- exports.EntityIcon = Component$6;
2432
- exports.EntityList = Component;
2433
- exports.ItemList = Component$1;
2434
- exports.ItemListItem = Component$2;
2435
- exports.MimeTypeIcon = Component$7;
2547
+ exports.CollectionList = Component$4;
2548
+ exports.CollectionListItem = Component$5;
2549
+ exports.EntityAvatar = Component$6;
2550
+ exports.EntityIcon = Component$7;
2551
+ exports.EntityList = Component$1;
2552
+ exports.ImageCollage = Component;
2553
+ exports.ItemList = Component$2;
2554
+ exports.ItemListItem = Component$3;
2555
+ exports.MimeTypeIcon = Component$8;
2436
2556
  exports.ThemeContext = ThemeContext;
2437
2557
  exports.ThemeProvider = ThemeProvider;
2438
2558
  exports.useThemeContext = useThemeContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-mui",
3
- "version": "22.3.0-pre.5",
3
+ "version": "22.3.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -26,40 +26,40 @@
26
26
  "new:component": "hygen new component"
27
27
  },
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.17.0",
30
- "@mui/icons-material": "^5.5.1",
31
- "@mui/lab": "^5.0.0-alpha.75",
32
- "@mui/material": "^5.5.3",
33
- "@mui/styles": "^5.5.3",
34
- "@vidispine/proptypes": "22.3.0-pre.5",
35
- "@vidispine/vdt-api": "22.3.0-pre.5",
36
- "@vidispine/vdt-js": "22.3.0-pre.5",
37
- "@vidispine/vdt-react": "22.3.0-pre.5",
38
- "@vidispine/vdt-videojs-react": "22.3.0-pre.5",
39
- "clsx": "^1.1.1"
29
+ "@babel/runtime": "^7.18.9",
30
+ "@mui/icons-material": "^5.8.4",
31
+ "@mui/lab": "^5.0.0-alpha.95",
32
+ "@mui/material": "^5.10.1",
33
+ "@mui/styles": "^5.9.3",
34
+ "@vidispine/proptypes": "22.3.0",
35
+ "@vidispine/vdt-api": "22.3.0",
36
+ "@vidispine/vdt-js": "22.3.0",
37
+ "@vidispine/vdt-react": "22.3.0",
38
+ "@vidispine/vdt-videojs-react": "22.3.0",
39
+ "clsx": "^1.2.1"
40
40
  },
41
41
  "peerDependencies": {
42
- "react": "^17.0.2",
43
- "react-dom": "^17.0.2"
42
+ "react": "^17.0.0",
43
+ "react-dom": "^17.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@babel/core": "^7.17.0",
47
- "@babel/plugin-transform-runtime": "^7.17.0",
48
- "@babel/preset-env": "^7.16.11",
49
- "@babel/preset-react": "^7.16.7",
50
- "@rollup/plugin-babel": "^5.3.0",
51
- "@rollup/plugin-commonjs": "^21.0.1",
52
- "@rollup/plugin-node-resolve": "^13.1.3",
53
- "@svgr/rollup": "^6.2.1",
54
- "@testing-library/jest-dom": "^5.16.2",
55
- "@testing-library/react": "^12.1.4",
56
- "@vidispine/eslint-config-react": "22.3.0-pre.5",
57
- "@vidispine/eslint-config-storybook": "22.3.0-pre.5",
58
- "@vidispine/prettier-config": "22.3.0-pre.5",
59
- "@vidispine/vdt-storybook": "22.3.0-pre.5",
60
- "hygen": "^6.1.0",
46
+ "@babel/core": "^7.18.10",
47
+ "@babel/plugin-transform-runtime": "^7.18.10",
48
+ "@babel/preset-env": "^7.18.10",
49
+ "@babel/preset-react": "^7.18.6",
50
+ "@rollup/plugin-babel": "^5.3.1",
51
+ "@rollup/plugin-commonjs": "^21.1.0",
52
+ "@rollup/plugin-node-resolve": "^13.3.0",
53
+ "@svgr/rollup": "^6.3.1",
54
+ "@testing-library/jest-dom": "^5.16.5",
55
+ "@testing-library/react": "^12.1.5",
56
+ "@vidispine/eslint-config-react": "22.3.0",
57
+ "@vidispine/eslint-config-storybook": "22.3.0",
58
+ "@vidispine/prettier-config": "22.3.0",
59
+ "@vidispine/vdt-storybook": "22.3.0",
60
+ "hygen": "^6.2.8",
61
61
  "prop-types": "^15.8.1",
62
- "rollup": "^2.67.0",
62
+ "rollup": "^2.78.0",
63
63
  "rollup-plugin-peer-deps-external": "^2.2.4"
64
64
  },
65
65
  "eslintConfig": {
@@ -69,5 +69,5 @@
69
69
  ]
70
70
  },
71
71
  "prettier": "@vidispine/prettier-config",
72
- "gitHead": "b7c1ead11e7e2fc68c5fb0072e6dbdb019f26ddc"
72
+ "gitHead": "bf53eaf85f596bc3cc70b490d18dbf3c59045350"
73
73
  }