@vidispine/vdt-materialui 22.2.0 → 22.3.0-pre.3

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/dist/index.es.js CHANGED
@@ -47,7 +47,7 @@ import Paper from '@material-ui/core/Paper';
47
47
  import { parseFacetType, parseNowDate, formatSeconds, roles, parseShapeType, parseTranscodePreset, parseTimespan, formatTimeBase, formatSmpte, createMetadataType, formatTimeCodeText, formatTimeCodeType, parseMetadataType, parseAudioComponent, parseContainerComponent, parseVideoComponent, parseSimpleMetadataType, findNearestThumbnail, parseHighlightTimespanList, metadataTypeToWebVtt, filterShapeSource, getShapeMediaType, getDocumentType } from '@vidispine/vdt-js';
48
48
  import IconButton from '@material-ui/core/IconButton';
49
49
  import CancelIcon from '@material-ui/icons/Cancel';
50
- import { Cancel, CheckCircle, Replay, ExpandLess, Label, Search, Delete, Block, ExpandMore, Folder, Wallpaper, Add, Visibility as Visibility$1, VisibilityOff as VisibilityOff$1 } from '@material-ui/icons';
50
+ import { Cancel, CheckCircle, Replay, ExpandLess, Label, Search, Delete, Block, ExpandMore, Folder, ArrowDropUp, ArrowDropDown, Wallpaper, Add, Visibility as Visibility$1, VisibilityOff as VisibilityOff$1 } from '@material-ui/icons';
51
51
  import moment from 'moment';
52
52
  import { red, green, grey as grey$1 } from '@material-ui/core/colors';
53
53
  import Chip$1 from '@material-ui/core/Chip';
@@ -9274,6 +9274,8 @@ var toCapsCase$1 = function toCapsCase(string) {
9274
9274
  function EntityAccessMenu(_ref) {
9275
9275
  var _ref$className = _ref.className,
9276
9276
  className = _ref$className === void 0 ? 'VdtEntityAccessMenu-root' : _ref$className,
9277
+ _ref$classes = _ref.classes,
9278
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
9277
9279
  onRemove = _ref.onRemove,
9278
9280
  accessType = _ref.accessType,
9279
9281
  entityType = _ref.entityType,
@@ -9314,16 +9316,19 @@ function EntityAccessMenu(_ref) {
9314
9316
  keepMounted: true,
9315
9317
  open: Boolean(anchorEl),
9316
9318
  onClose: onClose,
9317
- children: /*#__PURE__*/jsxs(MenuItem, {
9318
- onClick: handleRemove,
9319
- children: [/*#__PURE__*/jsx(ListItemIcon$1, {
9320
- children: /*#__PURE__*/jsx(DeleteIcon, {})
9321
- }), /*#__PURE__*/jsx(ListItemText, {
9322
- primary: entityAccessMenuText,
9323
- primaryTypographyProps: {
9324
- color: 'secondary'
9325
- }
9326
- })]
9319
+ children: /*#__PURE__*/jsx("div", {
9320
+ className: classes.entityAccessMenuContext,
9321
+ children: /*#__PURE__*/jsxs(MenuItem, {
9322
+ onClick: handleRemove,
9323
+ children: [/*#__PURE__*/jsx(ListItemIcon$1, {
9324
+ children: /*#__PURE__*/jsx(DeleteIcon, {})
9325
+ }), /*#__PURE__*/jsx(ListItemText, {
9326
+ primary: entityAccessMenuText,
9327
+ primaryTypographyProps: {
9328
+ color: 'secondary'
9329
+ }
9330
+ })]
9331
+ })
9327
9332
  })
9328
9333
  })]
9329
9334
  });
@@ -20621,6 +20626,8 @@ function SearchInput(_ref2) {
20621
20626
  onChange = _ref2.onChange,
20622
20627
  SuggestionsComponent = _ref2.SuggestionsComponent,
20623
20628
  SuggestionsProps = _ref2.SuggestionsProps,
20629
+ TopSearchesComponent = _ref2.TopSearchesComponent,
20630
+ TopSearchesProps = _ref2.TopSearchesProps,
20624
20631
  ButtonProps = _ref2.ButtonProps,
20625
20632
  InputBaseProps = _ref2.InputBaseProps,
20626
20633
  SearchIconComponent = _ref2.SearchIconComponent,
@@ -20641,6 +20648,12 @@ function SearchInput(_ref2) {
20641
20648
  canClear = _useState6[0],
20642
20649
  setCanClear = _useState6[1];
20643
20650
 
20651
+ useEffect(function () {
20652
+ if (defaultValue !== '') {
20653
+ setCanClear(true);
20654
+ }
20655
+ }, [defaultValue]);
20656
+
20644
20657
  var handleOnChange = function handleOnChange(val) {
20645
20658
  onChange(val);
20646
20659
  setCanClear(inputRef.current.value.length > 0);
@@ -20678,7 +20691,17 @@ function SearchInput(_ref2) {
20678
20691
  anchorEl = _useState8[0],
20679
20692
  setAnchorEl = _useState8[1];
20680
20693
 
20694
+ var _useState9 = useState(false),
20695
+ _useState10 = _slicedToArray(_useState9, 2),
20696
+ isTopSearchesOpen = _useState10[0],
20697
+ setIsTopSearchesOpen = _useState10[1];
20698
+
20681
20699
  var suggestionsVisible = Boolean(anchorEl) && isFocused && canClear;
20700
+ var topSearchesVisible = Boolean(anchorEl) && isTopSearchesOpen;
20701
+
20702
+ var onOpenTopSearch = function onOpenTopSearch() {
20703
+ setIsTopSearchesOpen(!isTopSearchesOpen);
20704
+ };
20682
20705
 
20683
20706
  var _useSuggestionsNaviga = useSuggestionsNavigation({
20684
20707
  suggestions: suggestions,
@@ -20715,6 +20738,16 @@ function SearchInput(_ref2) {
20715
20738
  children: [/*#__PURE__*/jsx(CloseIconComponent, {
20716
20739
  className: canClear ? classes.closeButton : classes.closeButtonHidden,
20717
20740
  onClick: onClear
20741
+ }), TopSearchesComponent && /*#__PURE__*/jsx(IconButton$1, {
20742
+ onClick: onOpenTopSearch,
20743
+ style: {
20744
+ borderRadius: '50%'
20745
+ },
20746
+ children: topSearchesVisible ? /*#__PURE__*/jsx(ArrowDropUp, {
20747
+ fontSize: "small"
20748
+ }) : /*#__PURE__*/jsx(ArrowDropDown, {
20749
+ fontSize: "small"
20750
+ })
20718
20751
  }), /*#__PURE__*/jsx(Button$1, _objectSpread$1w(_objectSpread$1w({
20719
20752
  size: "small",
20720
20753
  type: "submit",
@@ -20737,7 +20770,9 @@ function SearchInput(_ref2) {
20737
20770
  onHover: onHoverSuggestion,
20738
20771
  focused: focusedSuggestion,
20739
20772
  anchorEl: anchorEl
20740
- }, SuggestionsProps))]
20773
+ }, SuggestionsProps)), topSearchesVisible && TopSearchesComponent && /*#__PURE__*/jsx(TopSearchesComponent, _objectSpread$1w({
20774
+ anchorEl: anchorEl
20775
+ }, TopSearchesProps))]
20741
20776
  });
20742
20777
  }
20743
20778
  SearchInput.propTypes = {
@@ -20754,6 +20789,8 @@ SearchInput.propTypes = {
20754
20789
  onChange: PropTypes$1.func,
20755
20790
  SuggestionsComponent: PropTypes$1.elementType,
20756
20791
  SuggestionsProps: PropTypes$1.objectOf(PropTypes$1.any),
20792
+ TopSearchesComponent: PropTypes$1.elementType,
20793
+ TopSearchesProps: PropTypes$1.objectOf(PropTypes$1.any),
20757
20794
  ButtonProps: PropTypes$1.objectOf(PropTypes$1.any),
20758
20795
  InputBaseProps: PropTypes$1.objectOf(PropTypes$1.any),
20759
20796
  SearchIconComponent: PropTypes$1.elementType,
@@ -20775,6 +20812,8 @@ SearchInput.defaultProps = {
20775
20812
  onChange: function onChange() {},
20776
20813
  SuggestionsComponent: null,
20777
20814
  SuggestionsProps: {},
20815
+ TopSearchesComponent: null,
20816
+ TopSearchesProps: {},
20778
20817
  ButtonProps: {},
20779
20818
  InputBaseProps: {},
20780
20819
  SearchIconComponent: SearchIcon,
@@ -28746,6 +28785,7 @@ var styles$10 = function styles(theme) {
28746
28785
  disabled: {
28747
28786
  opacity: 1
28748
28787
  },
28788
+ menuContext: {},
28749
28789
  menuExpand: {
28750
28790
  minWidth: theme.breakpoints.values.sm / 2
28751
28791
  },
@@ -28778,6 +28818,8 @@ function SavedSearchRow(_ref) {
28778
28818
  disableDeletion = _ref.disableDeletion,
28779
28819
  type = _ref.type,
28780
28820
  accessTranslate = _ref.accessTranslate,
28821
+ _ref$extraMenuItems = _ref.extraMenuItems,
28822
+ extraMenuItems = _ref$extraMenuItems === void 0 ? [] : _ref$extraMenuItems,
28781
28823
  _ref$isFolderRow = _ref.isFolderRow,
28782
28824
  isFolderRow = _ref$isFolderRow === void 0 ? false : _ref$isFolderRow,
28783
28825
  _ref$hideSubFolderSha = _ref.hideSubFolderSharing,
@@ -28917,6 +28959,11 @@ function SavedSearchRow(_ref) {
28917
28959
  return handleMenuAction(onAddRow, fieldType);
28918
28960
  };
28919
28961
 
28962
+ var handleExtraMenuOnClick = function handleExtraMenuOnClick(menuFunction, id) {
28963
+ menuFunction(id);
28964
+ setAnchorEl(null);
28965
+ };
28966
+
28920
28967
  return /*#__PURE__*/jsxs(Fragment, {
28921
28968
  children: [/*#__PURE__*/jsxs(ListItem$1, {
28922
28969
  disableGutters: true,
@@ -29010,6 +29057,7 @@ function SavedSearchRow(_ref) {
29010
29057
  horizontal: 'right'
29011
29058
  },
29012
29059
  children: /*#__PURE__*/jsxs("div", {
29060
+ className: classes.menuContext,
29013
29061
  children: [allowListAccess(searchMetadata) && type === 'folder' && /*#__PURE__*/jsxs(MenuItem, {
29014
29062
  dense: true,
29015
29063
  onClick: handleNewField({
@@ -29069,7 +29117,19 @@ function SavedSearchRow(_ref) {
29069
29117
  }) : null, /*#__PURE__*/jsx(ListItemText, {
29070
29118
  primary: deleteText
29071
29119
  })]
29072
- }, 6)]
29120
+ }, 6), extraMenuItems.map(function (item) {
29121
+ return /*#__PURE__*/jsxs(MenuItem, {
29122
+ dense: true,
29123
+ onClick: function onClick() {
29124
+ return handleExtraMenuOnClick(item["function"], searchMetadata.collectionId);
29125
+ },
29126
+ children: [/*#__PURE__*/jsx(ListItemIcon$1, {
29127
+ children: /*#__PURE__*/jsx(item.icon, {})
29128
+ }), /*#__PURE__*/jsx(ListItemText, {
29129
+ primary: item.name
29130
+ })]
29131
+ }, "extraMenu".concat(item.id));
29132
+ })]
29073
29133
  })
29074
29134
  }), /*#__PURE__*/jsx(Popover, {
29075
29135
  open: expandedView !== null,
@@ -29116,7 +29176,7 @@ var SavedSearchRow$1 = withStyles(styles$10, {
29116
29176
  name: 'VdtSavedSearchRow'
29117
29177
  })(SavedSearchRow);
29118
29178
 
29119
- var _excluded$t = ["searchProps", "searchPlaceholderText", "onSelect", "onDelete", "onUpdateSearchMetadata", "RowComponent", "RowProps", "accessTranslate"];
29179
+ var _excluded$t = ["searchProps", "searchPlaceholderText", "onSelect", "onDelete", "onUpdateSearchMetadata", "RowComponent", "RowProps", "accessTranslate", "extraMenuItems"];
29120
29180
 
29121
29181
  function ownKeys$V(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; }
29122
29182
 
@@ -29135,6 +29195,7 @@ function SavedSearchList(_ref) {
29135
29195
  _ref$RowProps = _ref.RowProps,
29136
29196
  RowProps = _ref$RowProps === void 0 ? {} : _ref$RowProps,
29137
29197
  accessTranslate = _ref.accessTranslate,
29198
+ extraMenuItems = _ref.extraMenuItems,
29138
29199
  props = _objectWithoutProperties(_ref, _excluded$t);
29139
29200
 
29140
29201
  return /*#__PURE__*/jsx(Component$A, _objectSpread$V({
@@ -29165,7 +29226,8 @@ function SavedSearchList(_ref) {
29165
29226
  metadataDocument: metadataDocument
29166
29227
  }).then(onRefresh));
29167
29228
  },
29168
- accessTranslate: accessTranslate
29229
+ accessTranslate: accessTranslate,
29230
+ extraMenuItems: extraMenuItems
29169
29231
  }, RowProps), collectionType.id);
29170
29232
  })
29171
29233
  });
@@ -29285,7 +29347,8 @@ function SavedSearch(_ref) {
29285
29347
  SearchFormComponent = _ref$SearchFormCompon === void 0 ? SaveSearchForm$1 : _ref$SearchFormCompon,
29286
29348
  _ref$SearchFormProps = _ref.SearchFormProps,
29287
29349
  SearchFormProps = _ref$SearchFormProps === void 0 ? {} : _ref$SearchFormProps,
29288
- accessTranslate = _ref.accessTranslate;
29350
+ accessTranslate = _ref.accessTranslate,
29351
+ extraMenuItems = _ref.extraMenuItems;
29289
29352
 
29290
29353
  var _useSavedSearch = useSavedSearch({
29291
29354
  markerField: markerField,
@@ -29321,7 +29384,8 @@ function SavedSearch(_ref) {
29321
29384
  onDelete: onDeleteSearch,
29322
29385
  onUpdateSearchMetadata: onUpdateSearchMetadata,
29323
29386
  searchProps: searchProps,
29324
- accessTranslate: accessTranslate
29387
+ accessTranslate: accessTranslate,
29388
+ extraMenuItems: extraMenuItems
29325
29389
  }, SearchListProps))]
29326
29390
  });
29327
29391
  }
package/dist/index.js CHANGED
@@ -9463,6 +9463,8 @@ var toCapsCase$1 = function toCapsCase(string) {
9463
9463
  function EntityAccessMenu(_ref) {
9464
9464
  var _ref$className = _ref.className,
9465
9465
  className = _ref$className === void 0 ? 'VdtEntityAccessMenu-root' : _ref$className,
9466
+ _ref$classes = _ref.classes,
9467
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
9466
9468
  onRemove = _ref.onRemove,
9467
9469
  accessType = _ref.accessType,
9468
9470
  entityType = _ref.entityType,
@@ -9503,16 +9505,19 @@ function EntityAccessMenu(_ref) {
9503
9505
  keepMounted: true,
9504
9506
  open: Boolean(anchorEl),
9505
9507
  onClose: onClose,
9506
- children: /*#__PURE__*/jsxRuntime.jsxs(MenuItem__default["default"], {
9507
- onClick: handleRemove,
9508
- children: [/*#__PURE__*/jsxRuntime.jsx(ListItemIcon__default["default"], {
9509
- children: /*#__PURE__*/jsxRuntime.jsx(DeleteIcon__default["default"], {})
9510
- }), /*#__PURE__*/jsxRuntime.jsx(ListItemText__default["default"], {
9511
- primary: entityAccessMenuText,
9512
- primaryTypographyProps: {
9513
- color: 'secondary'
9514
- }
9515
- })]
9508
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
9509
+ className: classes.entityAccessMenuContext,
9510
+ children: /*#__PURE__*/jsxRuntime.jsxs(MenuItem__default["default"], {
9511
+ onClick: handleRemove,
9512
+ children: [/*#__PURE__*/jsxRuntime.jsx(ListItemIcon__default["default"], {
9513
+ children: /*#__PURE__*/jsxRuntime.jsx(DeleteIcon__default["default"], {})
9514
+ }), /*#__PURE__*/jsxRuntime.jsx(ListItemText__default["default"], {
9515
+ primary: entityAccessMenuText,
9516
+ primaryTypographyProps: {
9517
+ color: 'secondary'
9518
+ }
9519
+ })]
9520
+ })
9516
9521
  })
9517
9522
  })]
9518
9523
  });
@@ -20810,6 +20815,8 @@ function SearchInput(_ref2) {
20810
20815
  onChange = _ref2.onChange,
20811
20816
  SuggestionsComponent = _ref2.SuggestionsComponent,
20812
20817
  SuggestionsProps = _ref2.SuggestionsProps,
20818
+ TopSearchesComponent = _ref2.TopSearchesComponent,
20819
+ TopSearchesProps = _ref2.TopSearchesProps,
20813
20820
  ButtonProps = _ref2.ButtonProps,
20814
20821
  InputBaseProps = _ref2.InputBaseProps,
20815
20822
  SearchIconComponent = _ref2.SearchIconComponent,
@@ -20830,6 +20837,12 @@ function SearchInput(_ref2) {
20830
20837
  canClear = _useState6[0],
20831
20838
  setCanClear = _useState6[1];
20832
20839
 
20840
+ React.useEffect(function () {
20841
+ if (defaultValue !== '') {
20842
+ setCanClear(true);
20843
+ }
20844
+ }, [defaultValue]);
20845
+
20833
20846
  var handleOnChange = function handleOnChange(val) {
20834
20847
  onChange(val);
20835
20848
  setCanClear(inputRef.current.value.length > 0);
@@ -20867,7 +20880,17 @@ function SearchInput(_ref2) {
20867
20880
  anchorEl = _useState8[0],
20868
20881
  setAnchorEl = _useState8[1];
20869
20882
 
20883
+ var _useState9 = React.useState(false),
20884
+ _useState10 = _slicedToArray__default["default"](_useState9, 2),
20885
+ isTopSearchesOpen = _useState10[0],
20886
+ setIsTopSearchesOpen = _useState10[1];
20887
+
20870
20888
  var suggestionsVisible = Boolean(anchorEl) && isFocused && canClear;
20889
+ var topSearchesVisible = Boolean(anchorEl) && isTopSearchesOpen;
20890
+
20891
+ var onOpenTopSearch = function onOpenTopSearch() {
20892
+ setIsTopSearchesOpen(!isTopSearchesOpen);
20893
+ };
20871
20894
 
20872
20895
  var _useSuggestionsNaviga = useSuggestionsNavigation({
20873
20896
  suggestions: suggestions,
@@ -20904,6 +20927,16 @@ function SearchInput(_ref2) {
20904
20927
  children: [/*#__PURE__*/jsxRuntime.jsx(CloseIconComponent, {
20905
20928
  className: canClear ? classes.closeButton : classes.closeButtonHidden,
20906
20929
  onClick: onClear
20930
+ }), TopSearchesComponent && /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
20931
+ onClick: onOpenTopSearch,
20932
+ style: {
20933
+ borderRadius: '50%'
20934
+ },
20935
+ children: topSearchesVisible ? /*#__PURE__*/jsxRuntime.jsx(icons.ArrowDropUp, {
20936
+ fontSize: "small"
20937
+ }) : /*#__PURE__*/jsxRuntime.jsx(icons.ArrowDropDown, {
20938
+ fontSize: "small"
20939
+ })
20907
20940
  }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], _objectSpread$1w(_objectSpread$1w({
20908
20941
  size: "small",
20909
20942
  type: "submit",
@@ -20926,7 +20959,9 @@ function SearchInput(_ref2) {
20926
20959
  onHover: onHoverSuggestion,
20927
20960
  focused: focusedSuggestion,
20928
20961
  anchorEl: anchorEl
20929
- }, SuggestionsProps))]
20962
+ }, SuggestionsProps)), topSearchesVisible && TopSearchesComponent && /*#__PURE__*/jsxRuntime.jsx(TopSearchesComponent, _objectSpread$1w({
20963
+ anchorEl: anchorEl
20964
+ }, TopSearchesProps))]
20930
20965
  });
20931
20966
  }
20932
20967
  SearchInput.propTypes = {
@@ -20943,6 +20978,8 @@ SearchInput.propTypes = {
20943
20978
  onChange: PropTypes$1.func,
20944
20979
  SuggestionsComponent: PropTypes$1.elementType,
20945
20980
  SuggestionsProps: PropTypes$1.objectOf(PropTypes$1.any),
20981
+ TopSearchesComponent: PropTypes$1.elementType,
20982
+ TopSearchesProps: PropTypes$1.objectOf(PropTypes$1.any),
20946
20983
  ButtonProps: PropTypes$1.objectOf(PropTypes$1.any),
20947
20984
  InputBaseProps: PropTypes$1.objectOf(PropTypes$1.any),
20948
20985
  SearchIconComponent: PropTypes$1.elementType,
@@ -20964,6 +21001,8 @@ SearchInput.defaultProps = {
20964
21001
  onChange: function onChange() {},
20965
21002
  SuggestionsComponent: null,
20966
21003
  SuggestionsProps: {},
21004
+ TopSearchesComponent: null,
21005
+ TopSearchesProps: {},
20967
21006
  ButtonProps: {},
20968
21007
  InputBaseProps: {},
20969
21008
  SearchIconComponent: SearchIcon__default["default"],
@@ -28935,6 +28974,7 @@ var styles$10 = function styles(theme) {
28935
28974
  disabled: {
28936
28975
  opacity: 1
28937
28976
  },
28977
+ menuContext: {},
28938
28978
  menuExpand: {
28939
28979
  minWidth: theme.breakpoints.values.sm / 2
28940
28980
  },
@@ -28967,6 +29007,8 @@ function SavedSearchRow(_ref) {
28967
29007
  disableDeletion = _ref.disableDeletion,
28968
29008
  type = _ref.type,
28969
29009
  accessTranslate = _ref.accessTranslate,
29010
+ _ref$extraMenuItems = _ref.extraMenuItems,
29011
+ extraMenuItems = _ref$extraMenuItems === void 0 ? [] : _ref$extraMenuItems,
28970
29012
  _ref$isFolderRow = _ref.isFolderRow,
28971
29013
  isFolderRow = _ref$isFolderRow === void 0 ? false : _ref$isFolderRow,
28972
29014
  _ref$hideSubFolderSha = _ref.hideSubFolderSharing,
@@ -29106,6 +29148,11 @@ function SavedSearchRow(_ref) {
29106
29148
  return handleMenuAction(onAddRow, fieldType);
29107
29149
  };
29108
29150
 
29151
+ var handleExtraMenuOnClick = function handleExtraMenuOnClick(menuFunction, id) {
29152
+ menuFunction(id);
29153
+ setAnchorEl(null);
29154
+ };
29155
+
29109
29156
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
29110
29157
  children: [/*#__PURE__*/jsxRuntime.jsxs(ListItem__default["default"], {
29111
29158
  disableGutters: true,
@@ -29199,6 +29246,7 @@ function SavedSearchRow(_ref) {
29199
29246
  horizontal: 'right'
29200
29247
  },
29201
29248
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
29249
+ className: classes.menuContext,
29202
29250
  children: [allowListAccess(searchMetadata) && type === 'folder' && /*#__PURE__*/jsxRuntime.jsxs(MenuItem__default["default"], {
29203
29251
  dense: true,
29204
29252
  onClick: handleNewField({
@@ -29258,7 +29306,19 @@ function SavedSearchRow(_ref) {
29258
29306
  }) : null, /*#__PURE__*/jsxRuntime.jsx(ListItemText__default["default"], {
29259
29307
  primary: deleteText
29260
29308
  })]
29261
- }, 6)]
29309
+ }, 6), extraMenuItems.map(function (item) {
29310
+ return /*#__PURE__*/jsxRuntime.jsxs(MenuItem__default["default"], {
29311
+ dense: true,
29312
+ onClick: function onClick() {
29313
+ return handleExtraMenuOnClick(item["function"], searchMetadata.collectionId);
29314
+ },
29315
+ children: [/*#__PURE__*/jsxRuntime.jsx(ListItemIcon__default["default"], {
29316
+ children: /*#__PURE__*/jsxRuntime.jsx(item.icon, {})
29317
+ }), /*#__PURE__*/jsxRuntime.jsx(ListItemText__default["default"], {
29318
+ primary: item.name
29319
+ })]
29320
+ }, "extraMenu".concat(item.id));
29321
+ })]
29262
29322
  })
29263
29323
  }), /*#__PURE__*/jsxRuntime.jsx(Popover__default["default"], {
29264
29324
  open: expandedView !== null,
@@ -29305,7 +29365,7 @@ var SavedSearchRow$1 = styles$2B.withStyles(styles$10, {
29305
29365
  name: 'VdtSavedSearchRow'
29306
29366
  })(SavedSearchRow);
29307
29367
 
29308
- var _excluded$t = ["searchProps", "searchPlaceholderText", "onSelect", "onDelete", "onUpdateSearchMetadata", "RowComponent", "RowProps", "accessTranslate"];
29368
+ var _excluded$t = ["searchProps", "searchPlaceholderText", "onSelect", "onDelete", "onUpdateSearchMetadata", "RowComponent", "RowProps", "accessTranslate", "extraMenuItems"];
29309
29369
 
29310
29370
  function ownKeys$V(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; }
29311
29371
 
@@ -29324,6 +29384,7 @@ function SavedSearchList(_ref) {
29324
29384
  _ref$RowProps = _ref.RowProps,
29325
29385
  RowProps = _ref$RowProps === void 0 ? {} : _ref$RowProps,
29326
29386
  accessTranslate = _ref.accessTranslate,
29387
+ extraMenuItems = _ref.extraMenuItems,
29327
29388
  props = _objectWithoutProperties__default["default"](_ref, _excluded$t);
29328
29389
 
29329
29390
  return /*#__PURE__*/jsxRuntime.jsx(Component$A, _objectSpread$V({
@@ -29354,7 +29415,8 @@ function SavedSearchList(_ref) {
29354
29415
  metadataDocument: metadataDocument
29355
29416
  }).then(onRefresh));
29356
29417
  },
29357
- accessTranslate: accessTranslate
29418
+ accessTranslate: accessTranslate,
29419
+ extraMenuItems: extraMenuItems
29358
29420
  }, RowProps), collectionType.id);
29359
29421
  })
29360
29422
  });
@@ -29474,7 +29536,8 @@ function SavedSearch(_ref) {
29474
29536
  SearchFormComponent = _ref$SearchFormCompon === void 0 ? SaveSearchForm$1 : _ref$SearchFormCompon,
29475
29537
  _ref$SearchFormProps = _ref.SearchFormProps,
29476
29538
  SearchFormProps = _ref$SearchFormProps === void 0 ? {} : _ref$SearchFormProps,
29477
- accessTranslate = _ref.accessTranslate;
29539
+ accessTranslate = _ref.accessTranslate,
29540
+ extraMenuItems = _ref.extraMenuItems;
29478
29541
 
29479
29542
  var _useSavedSearch = vdtReact.useSavedSearch({
29480
29543
  markerField: markerField,
@@ -29510,7 +29573,8 @@ function SavedSearch(_ref) {
29510
29573
  onDelete: onDeleteSearch,
29511
29574
  onUpdateSearchMetadata: onUpdateSearchMetadata,
29512
29575
  searchProps: searchProps,
29513
- accessTranslate: accessTranslate
29576
+ accessTranslate: accessTranslate,
29577
+ extraMenuItems: extraMenuItems
29514
29578
  }, SearchListProps))]
29515
29579
  });
29516
29580
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-materialui",
3
- "version": "22.2.0",
3
+ "version": "22.3.0-pre.3",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.17.0",
30
- "@vidispine/vdt-api": "22.2.0",
31
- "@vidispine/vdt-js": "22.2.0",
32
- "@vidispine/vdt-react": "22.2.0",
33
- "@vidispine/vdt-videojs-react": "22.2.0",
30
+ "@vidispine/vdt-api": "22.3.0-pre.3",
31
+ "@vidispine/vdt-js": "22.3.0-pre.3",
32
+ "@vidispine/vdt-react": "22.3.0-pre.3",
33
+ "@vidispine/vdt-videojs-react": "22.3.0-pre.3",
34
34
  "clsx": "^1.1.1",
35
35
  "core-js": "^3.8.3",
36
36
  "filesize": "^6.1.0",
@@ -72,10 +72,10 @@
72
72
  "@rollup/plugin-commonjs": "^21.0.1",
73
73
  "@rollup/plugin-node-resolve": "^13.1.3",
74
74
  "@svgr/rollup": "^6.2.1",
75
- "@vidispine/eslint-config-react": "22.2.0",
76
- "@vidispine/eslint-config-storybook": "22.2.0",
77
- "@vidispine/prettier-config": "22.2.0",
78
- "@vidispine/proptypes": "22.2.0",
75
+ "@vidispine/eslint-config-react": "22.3.0-pre.3",
76
+ "@vidispine/eslint-config-storybook": "22.3.0-pre.3",
77
+ "@vidispine/prettier-config": "22.3.0-pre.3",
78
+ "@vidispine/proptypes": "22.3.0-pre.3",
79
79
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
80
80
  "axios-mock-adapter": "^1.20.0",
81
81
  "enzyme": "^3.11.0",
@@ -110,5 +110,5 @@
110
110
  }
111
111
  },
112
112
  "prettier": "@vidispine/prettier-config",
113
- "gitHead": "9873cf54bedeb5a1ee4c396eb9f101f3915ca1d1"
113
+ "gitHead": "9819429aa7af26cf9a1be230b50c66acd9d721f2"
114
114
  }