@inveniosoftware/react-invenio-app-ils 1.0.0-alpha.58 → 1.0.0-alpha.59

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/esm/index.js CHANGED
@@ -36,8 +36,8 @@ import _groupBy from 'lodash/groupBy';
36
36
  import _keys from 'lodash/keys';
37
37
  import ShowMore from 'react-show-more';
38
38
  import _first from 'lodash/first';
39
- import { omit } from 'lodash/object';
40
39
  import ReactDOM from 'react-dom';
40
+ import { omit } from 'lodash/object';
41
41
  import _difference from 'lodash/difference';
42
42
  import _concat from 'lodash/concat';
43
43
  import { random } from 'lodash/number';
@@ -6309,11 +6309,17 @@ var QueryBuilder$4 = /*#__PURE__*/function () {
6309
6309
  return this;
6310
6310
  }
6311
6311
  }, {
6312
- key: "sortByRequestStartDate",
6313
- value: function sortByRequestStartDate() {
6312
+ key: "sortByRequestStartDateDesc",
6313
+ value: function sortByRequestStartDateDesc() {
6314
6314
  this.sortBy = "&sort=-request_start_date";
6315
6315
  return this;
6316
6316
  }
6317
+ }, {
6318
+ key: "sortByRequestStartDateAsc",
6319
+ value: function sortByRequestStartDateAsc() {
6320
+ this.sortBy = "&sort=request_start_date";
6321
+ return this;
6322
+ }
6317
6323
  }, {
6318
6324
  key: "qs",
6319
6325
  value: function qs() {
@@ -7895,12 +7901,18 @@ var isAPIError = function isAPIError(error) {
7895
7901
  };
7896
7902
 
7897
7903
  var shouldShowErrorPage = function shouldShowErrorPage(error) {
7898
- if (!isAPIError(error)) {
7899
- return true;
7900
- }
7904
+ var _error$response;
7905
+
7906
+ if (isAPIError(error)) {
7907
+ // do not display the error in a full page, show the error only in the specific component (probably a notification).
7908
+ return false;
7909
+ } // when the exception is handled, we don't want to display a full page error (probably a notification).
7901
7910
 
7902
- return error.response.status !== 400;
7911
+
7912
+ var handledException = (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 400;
7913
+ return handledException ? false : true;
7903
7914
  };
7915
+
7904
7916
  var Error$1 = /*#__PURE__*/function (_Component) {
7905
7917
  _inherits(Error, _Component);
7906
7918
 
@@ -8550,12 +8562,14 @@ var REMOVE = 'notifications/REMOVE';
8550
8562
  var CLEAR_ALL = 'notifications/CLEAR_ALL';
8551
8563
  var sendErrorNotification = function sendErrorNotification(error) {
8552
8564
  return function (dispatch) {
8553
- if (!shouldShowErrorPage(error)) {
8565
+ if (isAPIError(error)) {
8554
8566
  var errorData = error.response.data;
8555
8567
  var errorModule = errorData.error_module,
8556
8568
  message = errorData.message;
8557
8569
  var title = errorModule ? "".concat(errorModule) : 'Something went wrong';
8558
8570
  dispatch(addNotification(title, message, 'error'));
8571
+ } else {
8572
+ dispatch(addNotification('Something went wrong', error.message, 'error'));
8559
8573
  }
8560
8574
  };
8561
8575
  };
@@ -8684,7 +8698,7 @@ var mapStateToProps$1D = function mapStateToProps(state) {
8684
8698
  };
8685
8699
  };
8686
8700
 
8687
- var mapDispatchToProps$1k = function mapDispatchToProps(dispatch) {
8701
+ var mapDispatchToProps$1l = function mapDispatchToProps(dispatch) {
8688
8702
  return {
8689
8703
  sendErrorNotification: function sendErrorNotification(title, content) {
8690
8704
  return dispatch(addNotification(title, content, 'error'));
@@ -8692,7 +8706,7 @@ var mapDispatchToProps$1k = function mapDispatchToProps(dispatch) {
8692
8706
  };
8693
8707
  };
8694
8708
 
8695
- var AuthenticationGuard = connect(mapStateToProps$1D, mapDispatchToProps$1k)(AuthenticationGuard$1);
8709
+ var AuthenticationGuard = connect(mapStateToProps$1D, mapDispatchToProps$1l)(AuthenticationGuard$1);
8696
8710
 
8697
8711
  var _excluded$x = ["autoDismiss"];
8698
8712
  var IlsMessage = /*#__PURE__*/function (_Component) {
@@ -8843,7 +8857,7 @@ var mapStateToProps$1C = function mapStateToProps(state) {
8843
8857
  };
8844
8858
  };
8845
8859
 
8846
- var mapDispatchToProps$1j = function mapDispatchToProps(dispatch) {
8860
+ var mapDispatchToProps$1k = function mapDispatchToProps(dispatch) {
8847
8861
  return {
8848
8862
  removeNotification: function removeNotification(notificationId) {
8849
8863
  return dispatch({
@@ -8854,7 +8868,7 @@ var mapDispatchToProps$1j = function mapDispatchToProps(dispatch) {
8854
8868
  };
8855
8869
  };
8856
8870
 
8857
- var Notifications = connect(mapStateToProps$1C, mapDispatchToProps$1j)(Notifications$1);
8871
+ var Notifications = connect(mapStateToProps$1C, mapDispatchToProps$1k)(Notifications$1);
8858
8872
 
8859
8873
  function _arrayLikeToArray(arr, len) {
8860
8874
  if (len == null || len > arr.length) len = arr.length;
@@ -9254,7 +9268,7 @@ BaseForm$1.defaultProps = {
9254
9268
  buttons: null
9255
9269
  };
9256
9270
 
9257
- var mapDispatchToProps$1i = function mapDispatchToProps(dispatch) {
9271
+ var mapDispatchToProps$1j = function mapDispatchToProps(dispatch) {
9258
9272
  return {
9259
9273
  sendSuccessNotification: function sendSuccessNotification$1(title, content) {
9260
9274
  return dispatch(sendSuccessNotification(title, content));
@@ -9262,7 +9276,7 @@ var mapDispatchToProps$1i = function mapDispatchToProps(dispatch) {
9262
9276
  };
9263
9277
  };
9264
9278
 
9265
- var BaseForm = connect(null, mapDispatchToProps$1i)(BaseForm$1);
9279
+ var BaseForm = connect(null, mapDispatchToProps$1j)(BaseForm$1);
9266
9280
 
9267
9281
  var YearPicker = /*#__PURE__*/function (_Component) {
9268
9282
  _inherits(YearPicker, _Component);
@@ -10297,7 +10311,7 @@ var mapStateToProps$1B = function mapStateToProps(state) {
10297
10311
  };
10298
10312
  };
10299
10313
 
10300
- var mapDispatchToProps$1h = function mapDispatchToProps(dispatch) {
10314
+ var mapDispatchToProps$1i = function mapDispatchToProps(dispatch) {
10301
10315
  return {
10302
10316
  sendSuccessNotification: function sendSuccessNotification$1(title, content) {
10303
10317
  return dispatch(sendSuccessNotification(title, content));
@@ -10305,7 +10319,7 @@ var mapDispatchToProps$1h = function mapDispatchToProps(dispatch) {
10305
10319
  };
10306
10320
  };
10307
10321
 
10308
- var DocumentRequestForm = connect(mapStateToProps$1B, mapDispatchToProps$1h)(DocumentRequestFormComponent);
10322
+ var DocumentRequestForm = connect(mapStateToProps$1B, mapDispatchToProps$1i)(DocumentRequestFormComponent);
10309
10323
 
10310
10324
  var DynamicResponsive = createCommonjsModule(function (module, exports) {
10311
10325
 
@@ -14156,7 +14170,7 @@ LoginWithLocalAccountLayout.defaultProps = {
14156
14170
  };
14157
14171
  var LoginWithLocalAccountComponent = Overridable.component('LoginWithLocalAccount', LoginWithLocalAccount$1);
14158
14172
 
14159
- var mapDispatchToProps$1g = function mapDispatchToProps(dispatch) {
14173
+ var mapDispatchToProps$1h = function mapDispatchToProps(dispatch) {
14160
14174
  return {
14161
14175
  fetchUserProfile: function fetchUserProfile$1() {
14162
14176
  return dispatch(fetchUserProfile());
@@ -14164,7 +14178,7 @@ var mapDispatchToProps$1g = function mapDispatchToProps(dispatch) {
14164
14178
  };
14165
14179
  };
14166
14180
 
14167
- var LoginWithLocalAccount = connect(null, mapDispatchToProps$1g)(LoginWithLocalAccountComponent);
14181
+ var LoginWithLocalAccount = connect(null, mapDispatchToProps$1h)(LoginWithLocalAccountComponent);
14168
14182
 
14169
14183
  var _excluded$i = ["nextUrl", "url", "hasError", "errorMessage"];
14170
14184
 
@@ -14540,7 +14554,7 @@ var mapStateToProps$1A = function mapStateToProps(state) {
14540
14554
  };
14541
14555
  };
14542
14556
 
14543
- var mapDispatchToProps$1f = function mapDispatchToProps(dispatch) {
14557
+ var mapDispatchToProps$1g = function mapDispatchToProps(dispatch) {
14544
14558
  return {
14545
14559
  fetchUserProfile: function fetchUserProfile$1() {
14546
14560
  return dispatch(fetchUserProfile());
@@ -14548,7 +14562,7 @@ var mapDispatchToProps$1f = function mapDispatchToProps(dispatch) {
14548
14562
  };
14549
14563
  };
14550
14564
 
14551
- var Login = connect(mapStateToProps$1A, mapDispatchToProps$1f)(LoginComponent);
14565
+ var Login = connect(mapStateToProps$1A, mapDispatchToProps$1g)(LoginComponent);
14552
14566
 
14553
14567
  var ConfirmEmailLayout = function ConfirmEmailLayout(_ref) {
14554
14568
  var isConfirmed = _ref.isConfirmed,
@@ -14655,7 +14669,7 @@ var mapStateToProps$1z = function mapStateToProps(state) {
14655
14669
  };
14656
14670
  };
14657
14671
 
14658
- var mapDispatchToProps$1e = function mapDispatchToProps(dispatch) {
14672
+ var mapDispatchToProps$1f = function mapDispatchToProps(dispatch) {
14659
14673
  return {
14660
14674
  sendErrorNotification: function sendErrorNotification(title, content) {
14661
14675
  return dispatch(addNotification(title, content, 'error'));
@@ -14669,7 +14683,7 @@ var mapDispatchToProps$1e = function mapDispatchToProps(dispatch) {
14669
14683
  };
14670
14684
  };
14671
14685
 
14672
- var ConfirmEmail = connect(mapStateToProps$1z, mapDispatchToProps$1e)(ConfirmEmailComponent);
14686
+ var ConfirmEmail = connect(mapStateToProps$1z, mapDispatchToProps$1f)(ConfirmEmailComponent);
14673
14687
 
14674
14688
  var HttpError = /*#__PURE__*/function (_Component) {
14675
14689
  _inherits(HttpError, _Component);
@@ -15090,7 +15104,7 @@ var mapStateToProps$1y = function mapStateToProps(state) {
15090
15104
  };
15091
15105
  };
15092
15106
 
15093
- var mapDispatchToProps$1d = function mapDispatchToProps(dispatch) {
15107
+ var mapDispatchToProps$1e = function mapDispatchToProps(dispatch) {
15094
15108
  return {
15095
15109
  sendErrorNotification: function sendErrorNotification(title, content) {
15096
15110
  return dispatch(addNotification(title, content, 'error'));
@@ -15101,7 +15115,7 @@ var mapDispatchToProps$1d = function mapDispatchToProps(dispatch) {
15101
15115
  };
15102
15116
  };
15103
15117
 
15104
- var Sidebar = connect(mapStateToProps$1y, mapDispatchToProps$1d)(SidebarComponent);
15118
+ var Sidebar = connect(mapStateToProps$1y, mapDispatchToProps$1e)(SidebarComponent);
15105
15119
 
15106
15120
  var FETCH_BANNER_EVERY_SECS = 60 * 5; // 5 minutes
15107
15121
 
@@ -15256,7 +15270,7 @@ var mapStateToProps$1x = function mapStateToProps(state) {
15256
15270
  };
15257
15271
  };
15258
15272
 
15259
- var mapDispatchToProps$1c = function mapDispatchToProps(dispatch) {
15273
+ var mapDispatchToProps$1d = function mapDispatchToProps(dispatch) {
15260
15274
  return {
15261
15275
  fetchBanner: function fetchBanner$1() {
15262
15276
  return dispatch(fetchBanner());
@@ -15267,7 +15281,7 @@ var mapDispatchToProps$1c = function mapDispatchToProps(dispatch) {
15267
15281
  };
15268
15282
  };
15269
15283
 
15270
- var Banner = connect(mapStateToProps$1x, mapDispatchToProps$1c)(BannerComponent);
15284
+ var Banner = connect(mapStateToProps$1x, mapDispatchToProps$1d)(BannerComponent);
15271
15285
 
15272
15286
  var IS_LOADING$H = 'fetchOrderDetails/IS_LOADING';
15273
15287
  var SUCCESS$H = 'fetchOrderDetails/SUCCESS';
@@ -16384,7 +16398,7 @@ var mapStateToProps$1w = function mapStateToProps(state) {
16384
16398
  };
16385
16399
  };
16386
16400
 
16387
- var mapDispatchToProps$1b = function mapDispatchToProps(dispatch) {
16401
+ var mapDispatchToProps$1c = function mapDispatchToProps(dispatch) {
16388
16402
  return {
16389
16403
  fetchOrderDetails: function fetchOrderDetails$1(orderPid) {
16390
16404
  return dispatch(fetchOrderDetails(orderPid));
@@ -16392,7 +16406,7 @@ var mapDispatchToProps$1b = function mapDispatchToProps(dispatch) {
16392
16406
  };
16393
16407
  };
16394
16408
 
16395
- var OrderDetails = connect(mapStateToProps$1w, mapDispatchToProps$1b)(OrderDetails$1);
16409
+ var OrderDetails = connect(mapStateToProps$1w, mapDispatchToProps$1c)(OrderDetails$1);
16396
16410
 
16397
16411
  /**
16398
16412
  * Generic React JSONSchema Form widget to search and select hits
@@ -18291,6 +18305,20 @@ var RJSFVocabulary = /*#__PURE__*/function (_Component) {
18291
18305
 
18292
18306
  _this = _super.call(this, props);
18293
18307
 
18308
+ _this.validateValue = function (value, options, isLoading) {
18309
+ var noOptionSelected = !value;
18310
+ if (noOptionSelected) return true;
18311
+ if (!options.length || isLoading) return;
18312
+
18313
+ var foundValue = function foundValue(value) {
18314
+ return options.find(function (option) {
18315
+ return option.value === value;
18316
+ });
18317
+ };
18318
+
18319
+ return !!foundValue(value);
18320
+ };
18321
+
18294
18322
  _this.serializer = function (hit) {
18295
18323
  return {
18296
18324
  key: hit.metadata.key,
@@ -18411,12 +18439,17 @@ var RJSFVocabulary = /*#__PURE__*/function (_Component) {
18411
18439
  isLoading = _this$state.isLoading,
18412
18440
  value = _this$state.value,
18413
18441
  error = _this$state.error;
18442
+ var valueIsValid = this.validateValue(value, options, isLoading);
18443
+ var invalidValueError = {
18444
+ content: ' Invalid option was selected',
18445
+ pointing: 'above'
18446
+ };
18414
18447
  return /*#__PURE__*/React.createElement(Form.Select, {
18415
18448
  fluid: true,
18416
18449
  selection: true,
18417
18450
  options: options,
18418
18451
  label: label,
18419
- value: value,
18452
+ value: valueIsValid ? value : undefined,
18420
18453
  clearable: true,
18421
18454
  required: required,
18422
18455
  autoFocus: autofocus,
@@ -18424,7 +18457,8 @@ var RJSFVocabulary = /*#__PURE__*/function (_Component) {
18424
18457
  onChange: this.handleChange,
18425
18458
  disabled: isLoading || readonly,
18426
18459
  loading: isLoading,
18427
- noResultsMessage: error ? error : 'No results found'
18460
+ noResultsMessage: error ? error : 'No results found',
18461
+ error: !valueIsValid && invalidValueError
18428
18462
  });
18429
18463
  }
18430
18464
  }]);
@@ -18795,7 +18829,7 @@ RJSForm$1.defaultProps = {
18795
18829
  successCallback: null
18796
18830
  };
18797
18831
 
18798
- var mapDispatchToProps$1a = function mapDispatchToProps(dispatch) {
18832
+ var mapDispatchToProps$1b = function mapDispatchToProps(dispatch) {
18799
18833
  return {
18800
18834
  sendSuccessNotification: function sendSuccessNotification$1(title, content) {
18801
18835
  return dispatch(sendSuccessNotification(title, content));
@@ -18803,7 +18837,7 @@ var mapDispatchToProps$1a = function mapDispatchToProps(dispatch) {
18803
18837
  };
18804
18838
  };
18805
18839
 
18806
- var RJSForm = connect(null, mapDispatchToProps$1a)(RJSForm$1);
18840
+ var RJSForm = connect(null, mapDispatchToProps$1b)(RJSForm$1);
18807
18841
 
18808
18842
  var schema$9 = function schema() {
18809
18843
  var _schema = {
@@ -20319,7 +20353,7 @@ var checkin = function checkin(barcode, onSuccess) {
20319
20353
  type: LOAN_HAS_ERROR,
20320
20354
  payload: _context.t0
20321
20355
  });
20322
- dispatch(sendErrorNotification('Error'));
20356
+ dispatch(sendErrorNotification(_context.t0));
20323
20357
 
20324
20358
  case 14:
20325
20359
  case "end":
@@ -20402,7 +20436,7 @@ var clearResults$2 = function clearResults() {
20402
20436
  };
20403
20437
  };
20404
20438
 
20405
- var mapDispatchToProps$19 = function mapDispatchToProps(dispatch) {
20439
+ var mapDispatchToProps$1a = function mapDispatchToProps(dispatch) {
20406
20440
  return {
20407
20441
  checkin: function checkin$1(barcode, onSuccess) {
20408
20442
  return dispatch(checkin(barcode, onSuccess));
@@ -20416,7 +20450,7 @@ var mapStateToProps$1v = function mapStateToProps(state) {
20416
20450
  };
20417
20451
  };
20418
20452
 
20419
- var ItemsSearch$2 = connect(mapStateToProps$1v, mapDispatchToProps$19)(ItemsSearch$3);
20453
+ var ItemsSearch$2 = connect(mapStateToProps$1v, mapDispatchToProps$1a)(ItemsSearch$3);
20420
20454
 
20421
20455
  var ItemCirculation$2 = /*#__PURE__*/function (_Component) {
20422
20456
  _inherits(ItemCirculation, _Component);
@@ -20629,7 +20663,7 @@ CheckedInItems$1.defaultProps = {
20629
20663
  items: []
20630
20664
  };
20631
20665
 
20632
- var mapDispatchToProps$18 = function mapDispatchToProps(dispatch) {
20666
+ var mapDispatchToProps$19 = function mapDispatchToProps(dispatch) {
20633
20667
  return {
20634
20668
  clearResults: function clearResults() {
20635
20669
  return dispatch(clearResults$2());
@@ -20643,7 +20677,7 @@ var mapStateToProps$1u = function mapStateToProps(state) {
20643
20677
  };
20644
20678
  };
20645
20679
 
20646
- var CheckedInItems = connect(mapStateToProps$1u, mapDispatchToProps$18)(CheckedInItems$1);
20680
+ var CheckedInItems = connect(mapStateToProps$1u, mapDispatchToProps$19)(CheckedInItems$1);
20647
20681
 
20648
20682
  var CheckIn = /*#__PURE__*/function (_Component) {
20649
20683
  _inherits(CheckIn, _Component);
@@ -20868,7 +20902,7 @@ var checkOutSearch = function checkOutSearch(term) {
20868
20902
  type: SEARCH_HAS_ERROR,
20869
20903
  payload: _context3.t0
20870
20904
  });
20871
- dispatch(sendErrorNotification('Error'));
20905
+ dispatch(sendErrorNotification(_context3.t0));
20872
20906
 
20873
20907
  case 21:
20874
20908
  case "end":
@@ -20884,7 +20918,7 @@ var checkOutSearch = function checkOutSearch(term) {
20884
20918
  }();
20885
20919
  };
20886
20920
 
20887
- var mapDispatchToProps$17 = function mapDispatchToProps(dispatch) {
20921
+ var mapDispatchToProps$18 = function mapDispatchToProps(dispatch) {
20888
20922
  return {
20889
20923
  checkOutSearch: function checkOutSearch$1(term) {
20890
20924
  return dispatch(checkOutSearch(term));
@@ -20901,7 +20935,7 @@ var mapStateToProps$1t = function mapStateToProps(state) {
20901
20935
  };
20902
20936
  };
20903
20937
 
20904
- var CheckOutSearch = connect(mapStateToProps$1t, mapDispatchToProps$17)(CheckOutSearch$1);
20938
+ var CheckOutSearch = connect(mapStateToProps$1t, mapDispatchToProps$18)(CheckOutSearch$1);
20905
20939
 
20906
20940
  var ItemList = function ItemList(_ref) {
20907
20941
  var items = _ref.items;
@@ -21286,7 +21320,7 @@ CheckOutResults$1.defaultProps = {
21286
21320
  isLoading: false
21287
21321
  };
21288
21322
 
21289
- var mapDispatchToProps$16 = function mapDispatchToProps(dispatch) {
21323
+ var mapDispatchToProps$17 = function mapDispatchToProps(dispatch) {
21290
21324
  return {
21291
21325
  clearResults: function clearResults() {
21292
21326
  return dispatch(clearResults$1());
@@ -21303,7 +21337,7 @@ var mapStateToProps$1s = function mapStateToProps(state) {
21303
21337
  };
21304
21338
  };
21305
21339
 
21306
- var CheckOutResults = connect(mapStateToProps$1s, mapDispatchToProps$16)(CheckOutResults$1);
21340
+ var CheckOutResults = connect(mapStateToProps$1s, mapDispatchToProps$17)(CheckOutResults$1);
21307
21341
 
21308
21342
  var CheckOut = /*#__PURE__*/function (_Component) {
21309
21343
  _inherits(CheckOut, _Component);
@@ -22864,7 +22898,7 @@ var mapStateToProps$1r = function mapStateToProps(state) {
22864
22898
  };
22865
22899
  };
22866
22900
 
22867
- var mapDispatchToProps$15 = function mapDispatchToProps(dispatch) {
22901
+ var mapDispatchToProps$16 = function mapDispatchToProps(dispatch) {
22868
22902
  return {
22869
22903
  fetchReferences: function fetchReferences$1(promiseArray) {
22870
22904
  return dispatch(fetchReferences(promiseArray));
@@ -22872,7 +22906,7 @@ var mapDispatchToProps$15 = function mapDispatchToProps(dispatch) {
22872
22906
  };
22873
22907
  };
22874
22908
 
22875
- var DeleteRecordModal = connect(mapStateToProps$1r, mapDispatchToProps$15)(DeleteRecordModal$1);
22909
+ var DeleteRecordModal = connect(mapStateToProps$1r, mapDispatchToProps$16)(DeleteRecordModal$1);
22876
22910
 
22877
22911
  function formatPidTypeToName(pidType) {
22878
22912
  switch (pidType) {
@@ -23096,7 +23130,7 @@ var DocumentDeleteModal$1 = /*#__PURE__*/function (_Component) {
23096
23130
  return DocumentDeleteModal;
23097
23131
  }(Component);
23098
23132
 
23099
- var mapDispatchToProps$14 = function mapDispatchToProps(dispatch) {
23133
+ var mapDispatchToProps$15 = function mapDispatchToProps(dispatch) {
23100
23134
  return {
23101
23135
  deleteDocument: function deleteDocument$1(documentPid) {
23102
23136
  return dispatch(deleteDocument(documentPid));
@@ -23104,7 +23138,7 @@ var mapDispatchToProps$14 = function mapDispatchToProps(dispatch) {
23104
23138
  };
23105
23139
  };
23106
23140
 
23107
- var DocumentDeleteModal = connect(null, mapDispatchToProps$14)(DocumentDeleteModal$1);
23141
+ var DocumentDeleteModal = connect(null, mapDispatchToProps$15)(DocumentDeleteModal$1);
23108
23142
 
23109
23143
  var DocumentActionMenu$1 = /*#__PURE__*/function (_Component) {
23110
23144
  _inherits(DocumentActionMenu, _Component);
@@ -23250,7 +23284,7 @@ var mapStateToProps$1q = function mapStateToProps(state) {
23250
23284
  };
23251
23285
  };
23252
23286
 
23253
- var mapDispatchToProps$13 = function mapDispatchToProps(dispatch) {
23287
+ var mapDispatchToProps$14 = function mapDispatchToProps(dispatch) {
23254
23288
  return {
23255
23289
  deleteDocument: function deleteDocument$1(documentPid) {
23256
23290
  return dispatch(deleteDocument(documentPid));
@@ -23262,7 +23296,7 @@ var mapDispatchToProps$13 = function mapDispatchToProps(dispatch) {
23262
23296
  };
23263
23297
  };
23264
23298
 
23265
- var DocumentActionMenu = connect(mapStateToProps$1q, mapDispatchToProps$13)(DocumentActionMenu$1);
23299
+ var DocumentActionMenu = connect(mapStateToProps$1q, mapDispatchToProps$14)(DocumentActionMenu$1);
23266
23300
 
23267
23301
  var DocumentExtras = /*#__PURE__*/function (_Component) {
23268
23302
  _inherits(DocumentExtras, _Component);
@@ -24216,7 +24250,7 @@ var mapStateToProps$1p = function mapStateToProps(state) {
24216
24250
  };
24217
24251
  };
24218
24252
 
24219
- var mapDispatchToProps$12 = function mapDispatchToProps(dispatch) {
24253
+ var mapDispatchToProps$13 = function mapDispatchToProps(dispatch) {
24220
24254
  return {
24221
24255
  fetchDocumentDetails: function fetchDocumentDetails$1(documentPid) {
24222
24256
  return dispatch(fetchDocumentDetails(documentPid));
@@ -24224,7 +24258,7 @@ var mapDispatchToProps$12 = function mapDispatchToProps(dispatch) {
24224
24258
  };
24225
24259
  };
24226
24260
 
24227
- var DocumentMetadata$2 = connect(mapStateToProps$1p, mapDispatchToProps$12)(DocumentMetadata$3);
24261
+ var DocumentMetadata$2 = connect(mapStateToProps$1p, mapDispatchToProps$13)(DocumentMetadata$3);
24228
24262
 
24229
24263
  var DocumentSummary$1 = /*#__PURE__*/function (_Component) {
24230
24264
  _inherits(DocumentSummary, _Component);
@@ -24540,7 +24574,7 @@ var mapStateToProps$1n = function mapStateToProps(state) {
24540
24574
  };
24541
24575
  };
24542
24576
 
24543
- var mapDispatchToProps$11 = function mapDispatchToProps(dispatch) {
24577
+ var mapDispatchToProps$12 = function mapDispatchToProps(dispatch) {
24544
24578
  return {
24545
24579
  fetchDocumentEItems: function fetchDocumentEItems$1(documentPid) {
24546
24580
  return dispatch(fetchDocumentEItems(documentPid));
@@ -24548,7 +24582,7 @@ var mapDispatchToProps$11 = function mapDispatchToProps(dispatch) {
24548
24582
  };
24549
24583
  };
24550
24584
 
24551
- var DocumentEItems$1 = connect(mapStateToProps$1n, mapDispatchToProps$11)(DocumentEItems$2);
24585
+ var DocumentEItems$1 = connect(mapStateToProps$1n, mapDispatchToProps$12)(DocumentEItems$2);
24552
24586
 
24553
24587
  var IS_LOADING$D = 'fetchDocumentItems/IS_LOADING';
24554
24588
  var SUCCESS$D = 'fetchDocumentItems/SUCCESS';
@@ -24730,7 +24764,7 @@ var mapStateToProps$1m = function mapStateToProps(state) {
24730
24764
  };
24731
24765
  };
24732
24766
 
24733
- var mapDispatchToProps$10 = function mapDispatchToProps(dispatch) {
24767
+ var mapDispatchToProps$11 = function mapDispatchToProps(dispatch) {
24734
24768
  return {
24735
24769
  fetchDocumentItems: function fetchDocumentItems$1(documentPid) {
24736
24770
  return dispatch(fetchDocumentItems(documentPid));
@@ -24738,7 +24772,7 @@ var mapDispatchToProps$10 = function mapDispatchToProps(dispatch) {
24738
24772
  };
24739
24773
  };
24740
24774
 
24741
- var DocumentItems$2 = connect(mapStateToProps$1m, mapDispatchToProps$10)(DocumentItems$3);
24775
+ var DocumentItems$2 = connect(mapStateToProps$1m, mapDispatchToProps$11)(DocumentItems$3);
24742
24776
 
24743
24777
  var IS_LOADING$C = 'fetchPendingLoansOnDocument/IS_LOADING';
24744
24778
  var SUCCESS$C = 'fetchPendingLoansOnDocument/SUCCESS';
@@ -24756,7 +24790,7 @@ var fetchPendingLoans = function fetchPendingLoans(documentPid) {
24756
24790
  });
24757
24791
  _context.prev = 1;
24758
24792
  _context.next = 4;
24759
- return loanApi.list(loanApi.query().withDocPid(documentPid).withState(invenioConfig.CIRCULATION.loanRequestStates).qs());
24793
+ return loanApi.list(loanApi.query().withDocPid(documentPid).withState(invenioConfig.CIRCULATION.loanRequestStates).sortByRequestStartDateAsc().qs());
24760
24794
 
24761
24795
  case 4:
24762
24796
  response = _context.sent;
@@ -24900,7 +24934,7 @@ var mapStateToProps$1l = function mapStateToProps(state) {
24900
24934
  };
24901
24935
  };
24902
24936
 
24903
- var mapDispatchToProps$$ = function mapDispatchToProps(dispatch) {
24937
+ var mapDispatchToProps$10 = function mapDispatchToProps(dispatch) {
24904
24938
  return {
24905
24939
  fetchPendingLoans: function fetchPendingLoans$1(documentPid) {
24906
24940
  return dispatch(fetchPendingLoans(documentPid));
@@ -24908,7 +24942,7 @@ var mapDispatchToProps$$ = function mapDispatchToProps(dispatch) {
24908
24942
  };
24909
24943
  };
24910
24944
 
24911
- var DocumentPendingLoans = connect(mapStateToProps$1l, mapDispatchToProps$$)(DocumentPendingLoans$1);
24945
+ var DocumentPendingLoans = connect(mapStateToProps$1l, mapDispatchToProps$10)(DocumentPendingLoans$1);
24912
24946
 
24913
24947
  var IS_LOADING$B = 'fetchDocumentStats/IS_LOADING';
24914
24948
  var SUCCESS$B = 'fetchDocumentStats/SUCCESS';
@@ -25137,7 +25171,7 @@ var mapStateToProps$1k = function mapStateToProps(state) {
25137
25171
  };
25138
25172
  };
25139
25173
 
25140
- var mapDispatchToProps$_ = function mapDispatchToProps(dispatch) {
25174
+ var mapDispatchToProps$$ = function mapDispatchToProps(dispatch) {
25141
25175
  return {
25142
25176
  fetchDocumentStats: function fetchDocumentStats$1(args) {
25143
25177
  return dispatch(fetchDocumentStats(args));
@@ -25145,7 +25179,7 @@ var mapDispatchToProps$_ = function mapDispatchToProps(dispatch) {
25145
25179
  };
25146
25180
  };
25147
25181
 
25148
- var DocumentStats$2 = connect(mapStateToProps$1k, mapDispatchToProps$_)(DocumentStats$3);
25182
+ var DocumentStats$2 = connect(mapStateToProps$1k, mapDispatchToProps$$)(DocumentStats$3);
25149
25183
 
25150
25184
  var _excluded$b = ["pidValue", "children"];
25151
25185
  var DocumentDetailsLink = /*#__PURE__*/function (_Component) {
@@ -25462,7 +25496,7 @@ RelationRemover$1.defaultProps = {
25462
25496
  trigger: null
25463
25497
  };
25464
25498
 
25465
- var mapDispatchToProps$Z = function mapDispatchToProps(dispatch) {
25499
+ var mapDispatchToProps$_ = function mapDispatchToProps(dispatch) {
25466
25500
  return {
25467
25501
  deleteRelation: function deleteRelation$1(referrer, related) {
25468
25502
  return dispatch(deleteRelation(referrer, related));
@@ -25470,7 +25504,7 @@ var mapDispatchToProps$Z = function mapDispatchToProps(dispatch) {
25470
25504
  };
25471
25505
  };
25472
25506
 
25473
- var RelationRemover = connect(null, mapDispatchToProps$Z)(RelationRemover$1);
25507
+ var RelationRemover = connect(null, mapDispatchToProps$_)(RelationRemover$1);
25474
25508
 
25475
25509
  var DocumentSelectListEntry = /*#__PURE__*/function (_Component) {
25476
25510
  _inherits(DocumentSelectListEntry, _Component);
@@ -25712,7 +25746,7 @@ var MultipleSelections$1 = /*#__PURE__*/function (_Component) {
25712
25746
  return MultipleSelections;
25713
25747
  }(Component);
25714
25748
 
25715
- var mapDispatchToProps$Y = function mapDispatchToProps(dispatch) {
25749
+ var mapDispatchToProps$Z = function mapDispatchToProps(dispatch) {
25716
25750
  return {
25717
25751
  removeSelection: function removeSelection$1(removePid) {
25718
25752
  return dispatch(removeSelection(removePid));
@@ -25726,7 +25760,7 @@ var mapStateToProps$1j = function mapStateToProps(state) {
25726
25760
  };
25727
25761
  };
25728
25762
 
25729
- var MultipleSelections = connect(mapStateToProps$1j, mapDispatchToProps$Y)(MultipleSelections$1);
25763
+ var MultipleSelections = connect(mapStateToProps$1j, mapDispatchToProps$Z)(MultipleSelections$1);
25730
25764
 
25731
25765
  var RelationModal$1 = /*#__PURE__*/function (_Component) {
25732
25766
  _inherits(RelationModal, _Component);
@@ -25857,7 +25891,7 @@ RelationModal$1.defaultProps = {
25857
25891
  disabledContent: null
25858
25892
  };
25859
25893
 
25860
- var mapDispatchToProps$X = function mapDispatchToProps(dispatch) {
25894
+ var mapDispatchToProps$Y = function mapDispatchToProps(dispatch) {
25861
25895
  return {
25862
25896
  createRelations: function createRelations$1(relationType, selections, extraRelationField, referrerRecord) {
25863
25897
  return dispatch(createRelations(relationType, selections, extraRelationField, referrerRecord));
@@ -25874,7 +25908,7 @@ var mapStateToProps$1i = function mapStateToProps(state) {
25874
25908
  };
25875
25909
  };
25876
25910
 
25877
- var RelationModal = connect(mapStateToProps$1i, mapDispatchToProps$X)(RelationModal$1);
25911
+ var RelationModal = connect(mapStateToProps$1i, mapDispatchToProps$Y)(RelationModal$1);
25878
25912
 
25879
25913
  var RelationSelector$1 = /*#__PURE__*/function (_Component) {
25880
25914
  _inherits(RelationSelector, _Component);
@@ -25989,7 +26023,7 @@ var mapStateToProps$1h = function mapStateToProps(state) {
25989
26023
  };
25990
26024
  };
25991
26025
 
25992
- var mapDispatchToProps$W = function mapDispatchToProps(dispatch) {
26026
+ var mapDispatchToProps$X = function mapDispatchToProps(dispatch) {
25993
26027
  return {
25994
26028
  selectOption: function selectOption$1(option) {
25995
26029
  return dispatch(selectOption(option));
@@ -26003,7 +26037,7 @@ var mapDispatchToProps$W = function mapDispatchToProps(dispatch) {
26003
26037
  };
26004
26038
  };
26005
26039
 
26006
- var RelationSelector = connect(mapStateToProps$1h, mapDispatchToProps$W)(RelationSelector$1);
26040
+ var RelationSelector = connect(mapStateToProps$1h, mapDispatchToProps$X)(RelationSelector$1);
26007
26041
 
26008
26042
  var SeriesCard = /*#__PURE__*/function (_Component) {
26009
26043
  _inherits(SeriesCard, _Component);
@@ -26546,7 +26580,7 @@ var SingleSelection$1 = /*#__PURE__*/function (_Component) {
26546
26580
  return SingleSelection;
26547
26581
  }(Component);
26548
26582
 
26549
- var mapDispatchToProps$V = function mapDispatchToProps(dispatch) {
26583
+ var mapDispatchToProps$W = function mapDispatchToProps(dispatch) {
26550
26584
  return {
26551
26585
  removeSelection: function removeSelection$1(removePid) {
26552
26586
  return dispatch(removeSelection(removePid));
@@ -26560,7 +26594,7 @@ var mapStateToProps$1d = function mapStateToProps(state) {
26560
26594
  };
26561
26595
  };
26562
26596
 
26563
- var SingleSelection = connect(mapStateToProps$1d, mapDispatchToProps$V)(SingleSelection$1);
26597
+ var SingleSelection = connect(mapStateToProps$1d, mapDispatchToProps$W)(SingleSelection$1);
26564
26598
 
26565
26599
  var RelationOtherModal$4 = /*#__PURE__*/function (_Component) {
26566
26600
  _inherits(RelationOtherModal, _Component);
@@ -28042,7 +28076,7 @@ var mapStateToProps$12 = function mapStateToProps(state) {
28042
28076
  };
28043
28077
  };
28044
28078
 
28045
- var mapDispatchToProps$U = function mapDispatchToProps(dispatch) {
28079
+ var mapDispatchToProps$V = function mapDispatchToProps(dispatch) {
28046
28080
  return {
28047
28081
  fetchDocumentDetails: function fetchDocumentDetails$1(documentPid) {
28048
28082
  return dispatch(fetchDocumentDetails(documentPid));
@@ -28050,7 +28084,7 @@ var mapDispatchToProps$U = function mapDispatchToProps(dispatch) {
28050
28084
  };
28051
28085
  };
28052
28086
 
28053
- var DocumentDetails$2 = connect(mapStateToProps$12, mapDispatchToProps$U)(DocumentDetails$3);
28087
+ var DocumentDetails$2 = connect(mapStateToProps$12, mapDispatchToProps$V)(DocumentDetails$3);
28054
28088
 
28055
28089
  var getSchemaFieldProps = function getSchemaFieldProps(fieldConfig) {
28056
28090
  var schemaProps = {};
@@ -30364,7 +30398,7 @@ var DocumentRequestActions$1 = /*#__PURE__*/function (_Component) {
30364
30398
  }(Component);
30365
30399
  DocumentRequestActions$1.defaultProps = {};
30366
30400
 
30367
- var mapDispatchToProps$T = function mapDispatchToProps(dispatch) {
30401
+ var mapDispatchToProps$U = function mapDispatchToProps(dispatch) {
30368
30402
  return {
30369
30403
  declineRequest: function declineRequest$1(pid, data) {
30370
30404
  return dispatch(declineRequest(pid, data));
@@ -30378,7 +30412,7 @@ var mapDispatchToProps$T = function mapDispatchToProps(dispatch) {
30378
30412
  };
30379
30413
  };
30380
30414
 
30381
- var DocumentRequestActions = connect(null, mapDispatchToProps$T)(DocumentRequestActions$1);
30415
+ var DocumentRequestActions = connect(null, mapDispatchToProps$U)(DocumentRequestActions$1);
30382
30416
 
30383
30417
  var DocumentRequestHeader = /*#__PURE__*/function (_Component) {
30384
30418
  _inherits(DocumentRequestHeader, _Component);
@@ -30730,7 +30764,7 @@ var AcceptStepPanel$1 = /*#__PURE__*/function (_Component) {
30730
30764
  return AcceptStepPanel;
30731
30765
  }(Component);
30732
30766
 
30733
- var mapDispatchToProps$S = function mapDispatchToProps(dispatch) {
30767
+ var mapDispatchToProps$T = function mapDispatchToProps(dispatch) {
30734
30768
  return {
30735
30769
  acceptRequest: function acceptRequest$1(documentRequestPid) {
30736
30770
  return dispatch(acceptRequest(documentRequestPid));
@@ -30738,7 +30772,7 @@ var mapDispatchToProps$S = function mapDispatchToProps(dispatch) {
30738
30772
  };
30739
30773
  };
30740
30774
 
30741
- var AcceptStepPanel = connect(null, mapDispatchToProps$S)(AcceptStepPanel$1);
30775
+ var AcceptStepPanel = connect(null, mapDispatchToProps$T)(AcceptStepPanel$1);
30742
30776
 
30743
30777
  /**
30744
30778
  * @callback customizedValueFunction
@@ -30872,7 +30906,7 @@ var ChooseDocumentStepPanel$1 = /*#__PURE__*/function (_Component) {
30872
30906
  return ChooseDocumentStepPanel;
30873
30907
  }(Component);
30874
30908
 
30875
- var mapDispatchToProps$R = function mapDispatchToProps(dispatch) {
30909
+ var mapDispatchToProps$S = function mapDispatchToProps(dispatch) {
30876
30910
  return {
30877
30911
  addDocument: function addDocument$1(pid, key) {
30878
30912
  return dispatch(addDocument(pid, key));
@@ -30880,7 +30914,7 @@ var mapDispatchToProps$R = function mapDispatchToProps(dispatch) {
30880
30914
  };
30881
30915
  };
30882
30916
 
30883
- var ChooseDocumentStepPanel = connect(null, mapDispatchToProps$R)(ChooseDocumentStepPanel$1);
30917
+ var ChooseDocumentStepPanel = connect(null, mapDispatchToProps$S)(ChooseDocumentStepPanel$1);
30884
30918
 
30885
30919
  var AcqProvider = /*#__PURE__*/function (_Component) {
30886
30920
  _inherits(AcqProvider, _Component);
@@ -31076,7 +31110,7 @@ var ChooseProviderStepPanel$1 = /*#__PURE__*/function (_Component3) {
31076
31110
  return ChooseProviderStepPanel;
31077
31111
  }(Component);
31078
31112
 
31079
- var mapDispatchToProps$Q = function mapDispatchToProps(dispatch) {
31113
+ var mapDispatchToProps$R = function mapDispatchToProps(dispatch) {
31080
31114
  return {
31081
31115
  addProvider: function addProvider$1(provDataPid, pid, pidType) {
31082
31116
  return dispatch(addProvider(provDataPid, pid, pidType));
@@ -31084,7 +31118,7 @@ var mapDispatchToProps$Q = function mapDispatchToProps(dispatch) {
31084
31118
  };
31085
31119
  };
31086
31120
 
31087
- var ChooseProviderStepPanel = connect(null, mapDispatchToProps$Q)(ChooseProviderStepPanel$1);
31121
+ var ChooseProviderStepPanel = connect(null, mapDispatchToProps$R)(ChooseProviderStepPanel$1);
31088
31122
 
31089
31123
  var DocumentRequestStepPanels = /*#__PURE__*/function (_Component) {
31090
31124
  _inherits(DocumentRequestStepPanels, _Component);
@@ -31350,7 +31384,7 @@ var mapStateToProps$11 = function mapStateToProps(state) {
31350
31384
  };
31351
31385
  };
31352
31386
 
31353
- var mapDispatchToProps$P = function mapDispatchToProps(dispatch) {
31387
+ var mapDispatchToProps$Q = function mapDispatchToProps(dispatch) {
31354
31388
  return {
31355
31389
  fetchDocumentRequestDetails: function fetchDocumentRequestDetails$1(documentRequestPid) {
31356
31390
  return dispatch(fetchDocumentRequestDetails(documentRequestPid));
@@ -31358,7 +31392,7 @@ var mapDispatchToProps$P = function mapDispatchToProps(dispatch) {
31358
31392
  };
31359
31393
  };
31360
31394
 
31361
- var DocumentRequestDetails = connect(mapStateToProps$11, mapDispatchToProps$P)(DocumentRequestDetails$1);
31395
+ var DocumentRequestDetails = connect(mapStateToProps$11, mapDispatchToProps$Q)(DocumentRequestDetails$1);
31362
31396
 
31363
31397
  var schema$7 = function schema() {
31364
31398
  var _invenioConfig$DOCUME;
@@ -32406,7 +32440,7 @@ var mapStateToProps$10 = function mapStateToProps(state) {
32406
32440
  };
32407
32441
  };
32408
32442
 
32409
- var mapDispatchToProps$O = function mapDispatchToProps(dispatch) {
32443
+ var mapDispatchToProps$P = function mapDispatchToProps(dispatch) {
32410
32444
  return {
32411
32445
  sendErrorNotification: function sendErrorNotification(title, message) {
32412
32446
  return dispatch(addNotification(title, message, 'error'));
@@ -32420,7 +32454,7 @@ var mapDispatchToProps$O = function mapDispatchToProps(dispatch) {
32420
32454
  };
32421
32455
  };
32422
32456
 
32423
- var EItemFiles = connect(mapStateToProps$10, mapDispatchToProps$O)(EItemFiles$1);
32457
+ var EItemFiles = connect(mapStateToProps$10, mapDispatchToProps$P)(EItemFiles$1);
32424
32458
 
32425
32459
  var EItemHeader = /*#__PURE__*/function (_Component) {
32426
32460
  _inherits(EItemHeader, _Component);
@@ -32634,7 +32668,7 @@ var mapStateToProps$$ = function mapStateToProps(state) {
32634
32668
  };
32635
32669
  };
32636
32670
 
32637
- var mapDispatchToProps$N = function mapDispatchToProps(dispatch) {
32671
+ var mapDispatchToProps$O = function mapDispatchToProps(dispatch) {
32638
32672
  return {
32639
32673
  deleteEItem: function deleteEItem$1(eitemPid) {
32640
32674
  return dispatch(deleteEItem(eitemPid));
@@ -32642,7 +32676,7 @@ var mapDispatchToProps$N = function mapDispatchToProps(dispatch) {
32642
32676
  };
32643
32677
  };
32644
32678
 
32645
- var EItemMetadata = connect(mapStateToProps$$, mapDispatchToProps$N)(EItemMetadata$1);
32679
+ var EItemMetadata = connect(mapStateToProps$$, mapDispatchToProps$O)(EItemMetadata$1);
32646
32680
 
32647
32681
  var UploadButton$1 = /*#__PURE__*/function (_React$Component) {
32648
32682
  _inherits(UploadButton, _React$Component);
@@ -32744,7 +32778,7 @@ var mapStateToProps$_ = function mapStateToProps(state) {
32744
32778
  };
32745
32779
  };
32746
32780
 
32747
- var mapDispatchToProps$M = function mapDispatchToProps(dispatch) {
32781
+ var mapDispatchToProps$N = function mapDispatchToProps(dispatch) {
32748
32782
  return {
32749
32783
  sendErrorNotification: function sendErrorNotification(title, message) {
32750
32784
  return dispatch(addNotification(title, message, 'error'));
@@ -32755,7 +32789,7 @@ var mapDispatchToProps$M = function mapDispatchToProps(dispatch) {
32755
32789
  };
32756
32790
  };
32757
32791
 
32758
- var UploadButton = connect(mapStateToProps$_, mapDispatchToProps$M)(UploadButton$1);
32792
+ var UploadButton = connect(mapStateToProps$_, mapDispatchToProps$N)(UploadButton$1);
32759
32793
 
32760
32794
  var EItemActionMenu$1 = /*#__PURE__*/function (_Component) {
32761
32795
  _inherits(EItemActionMenu, _Component);
@@ -32834,7 +32868,7 @@ var mapStateToProps$Z = function mapStateToProps(state) {
32834
32868
  };
32835
32869
  };
32836
32870
 
32837
- var mapDispatchToProps$L = function mapDispatchToProps(dispatch) {
32871
+ var mapDispatchToProps$M = function mapDispatchToProps(dispatch) {
32838
32872
  return {
32839
32873
  deleteEItem: function deleteEItem$1(itemPid) {
32840
32874
  return dispatch(deleteEItem(itemPid));
@@ -32842,7 +32876,7 @@ var mapDispatchToProps$L = function mapDispatchToProps(dispatch) {
32842
32876
  };
32843
32877
  };
32844
32878
 
32845
- var EItemActionMenu = connect(mapStateToProps$Z, mapDispatchToProps$L)(EItemActionMenu$1);
32879
+ var EItemActionMenu = connect(mapStateToProps$Z, mapDispatchToProps$M)(EItemActionMenu$1);
32846
32880
 
32847
32881
  var EItemDetails$1 = /*#__PURE__*/function (_Component) {
32848
32882
  _inherits(EItemDetails, _Component);
@@ -32939,7 +32973,7 @@ var mapStateToProps$Y = function mapStateToProps(state) {
32939
32973
  };
32940
32974
  };
32941
32975
 
32942
- var mapDispatchToProps$K = function mapDispatchToProps(dispatch) {
32976
+ var mapDispatchToProps$L = function mapDispatchToProps(dispatch) {
32943
32977
  return {
32944
32978
  fetchEItemDetails: function fetchEItemDetails$1(eitemPid) {
32945
32979
  return dispatch(fetchEItemDetails(eitemPid));
@@ -32947,7 +32981,7 @@ var mapDispatchToProps$K = function mapDispatchToProps(dispatch) {
32947
32981
  };
32948
32982
  };
32949
32983
 
32950
- var EItemDetails = connect(mapStateToProps$Y, mapDispatchToProps$K)(EItemDetails$1);
32984
+ var EItemDetails = connect(mapStateToProps$Y, mapDispatchToProps$L)(EItemDetails$1);
32951
32985
 
32952
32986
  var schema$6 = function schema() {
32953
32987
  var _schema = {
@@ -35542,7 +35576,7 @@ var mapStateToProps$X = function mapStateToProps(state) {
35542
35576
  };
35543
35577
  };
35544
35578
 
35545
- var mapDispatchToProps$J = function mapDispatchToProps(dispatch) {
35579
+ var mapDispatchToProps$K = function mapDispatchToProps(dispatch) {
35546
35580
  return {
35547
35581
  borrowingRequestLoanExtensionAccept: function borrowingRequestLoanExtensionAccept$1(brwReqPid, loanEndDate) {
35548
35582
  return dispatch(borrowingRequestLoanExtensionAccept(brwReqPid, loanEndDate));
@@ -35553,7 +35587,7 @@ var mapDispatchToProps$J = function mapDispatchToProps(dispatch) {
35553
35587
  };
35554
35588
  };
35555
35589
 
35556
- var BorrowingRequestLoanExtension = connect(mapStateToProps$X, mapDispatchToProps$J)(BorrowingRequestLoanExtension$1);
35590
+ var BorrowingRequestLoanExtension = connect(mapStateToProps$X, mapDispatchToProps$K)(BorrowingRequestLoanExtension$1);
35557
35591
 
35558
35592
  var CreateLoanButton = /*#__PURE__*/function (_React$Component) {
35559
35593
  _inherits(CreateLoanButton, _React$Component);
@@ -35841,7 +35875,7 @@ var mapStateToProps$W = function mapStateToProps(state) {
35841
35875
  };
35842
35876
  };
35843
35877
 
35844
- var mapDispatchToProps$I = function mapDispatchToProps(dispatch) {
35878
+ var mapDispatchToProps$J = function mapDispatchToProps(dispatch) {
35845
35879
  return {
35846
35880
  borrowingRequestPatronLoanCreate: function borrowingRequestPatronLoanCreate$1(brwReqPid, loanStartDate, loanEndDate) {
35847
35881
  return dispatch(borrowingRequestPatronLoanCreate(brwReqPid, loanStartDate, loanEndDate));
@@ -35849,7 +35883,7 @@ var mapDispatchToProps$I = function mapDispatchToProps(dispatch) {
35849
35883
  };
35850
35884
  };
35851
35885
 
35852
- var BorrowingRequestPatronLoan = connect(mapStateToProps$W, mapDispatchToProps$I)(BorrowingRequestPatronLoan$1);
35886
+ var BorrowingRequestPatronLoan = connect(mapStateToProps$W, mapDispatchToProps$J)(BorrowingRequestPatronLoan$1);
35853
35887
 
35854
35888
  var Loan$1 = /*#__PURE__*/function (_React$Component) {
35855
35889
  _inherits(Loan, _React$Component);
@@ -36517,7 +36551,7 @@ var mapStateToProps$V = function mapStateToProps(state) {
36517
36551
  };
36518
36552
  };
36519
36553
 
36520
- var mapDispatchToProps$H = function mapDispatchToProps(dispatch) {
36554
+ var mapDispatchToProps$I = function mapDispatchToProps(dispatch) {
36521
36555
  return {
36522
36556
  fetchBorrowingRequestDetails: function fetchBorrowingRequestDetails$1(brwReqPid) {
36523
36557
  return dispatch(fetchBorrowingRequestDetails(brwReqPid));
@@ -36525,7 +36559,7 @@ var mapDispatchToProps$H = function mapDispatchToProps(dispatch) {
36525
36559
  };
36526
36560
  };
36527
36561
 
36528
- var BorrowingRequestDetails = connect(mapStateToProps$V, mapDispatchToProps$H)(BorrowingRequestDetails$1);
36562
+ var BorrowingRequestDetails = connect(mapStateToProps$V, mapDispatchToProps$I)(BorrowingRequestDetails$1);
36529
36563
 
36530
36564
  var schema$5 = function schema() {
36531
36565
  var _schema = {
@@ -37586,7 +37620,7 @@ var mapStateToProps$U = function mapStateToProps(state) {
37586
37620
  };
37587
37621
  };
37588
37622
 
37589
- var mapDispatchToProps$G = function mapDispatchToProps(dispatch) {
37623
+ var mapDispatchToProps$H = function mapDispatchToProps(dispatch) {
37590
37624
  return {
37591
37625
  deleteItem: function deleteItem$1(itemPid) {
37592
37626
  return dispatch(deleteItem(itemPid));
@@ -37598,7 +37632,7 @@ var mapDispatchToProps$G = function mapDispatchToProps(dispatch) {
37598
37632
  };
37599
37633
  };
37600
37634
 
37601
- var ItemActionMenu = connect(mapStateToProps$U, mapDispatchToProps$G)(ItemActionMenu$1);
37635
+ var ItemActionMenu = connect(mapStateToProps$U, mapDispatchToProps$H)(ItemActionMenu$1);
37602
37636
 
37603
37637
  var _excluded$9 = ["bcc", "body", "cc", "children", "email", "subject", "asButton"];
37604
37638
  var EmailLink = function EmailLink(_ref) {
@@ -38048,7 +38082,7 @@ var mapStateToProps$S = function mapStateToProps(state) {
38048
38082
  };
38049
38083
  };
38050
38084
 
38051
- var mapDispatchToProps$F = function mapDispatchToProps(dispatch) {
38085
+ var mapDispatchToProps$G = function mapDispatchToProps(dispatch) {
38052
38086
  return {
38053
38087
  fetchItemDetails: function fetchItemDetails$1(itemPid) {
38054
38088
  return dispatch(fetchItemDetails(itemPid));
@@ -38063,7 +38097,7 @@ var mapDispatchToProps$F = function mapDispatchToProps(dispatch) {
38063
38097
  };
38064
38098
  };
38065
38099
 
38066
- var ItemMetadata$1 = connect(mapStateToProps$S, mapDispatchToProps$F)(ItemMetadata$2);
38100
+ var ItemMetadata$1 = connect(mapStateToProps$S, mapDispatchToProps$G)(ItemMetadata$2);
38067
38101
 
38068
38102
  var IS_LOADING$s = 'fetchPastLoans/IS_LOADING';
38069
38103
  var SUCCESS$s = 'fetchPastLoans/SUCCESS';
@@ -38253,7 +38287,7 @@ var mapStateToProps$R = function mapStateToProps(state) {
38253
38287
  };
38254
38288
  };
38255
38289
 
38256
- var mapDispatchToProps$E = function mapDispatchToProps(dispatch) {
38290
+ var mapDispatchToProps$F = function mapDispatchToProps(dispatch) {
38257
38291
  return {
38258
38292
  fetchPastLoans: function fetchPastLoans$1(itemPid) {
38259
38293
  return dispatch(fetchPastLoans(itemPid));
@@ -38261,7 +38295,7 @@ var mapDispatchToProps$E = function mapDispatchToProps(dispatch) {
38261
38295
  };
38262
38296
  };
38263
38297
 
38264
- var ItemPastLoans = connect(mapStateToProps$R, mapDispatchToProps$E)(ItemPastLoans$1);
38298
+ var ItemPastLoans = connect(mapStateToProps$R, mapDispatchToProps$F)(ItemPastLoans$1);
38265
38299
 
38266
38300
  var ACTION_IS_LOADING = 'loanAction/IS_LOADING';
38267
38301
  var ACTION_SUCCESS = 'loanAction/SUCCESS';
@@ -38295,7 +38329,7 @@ var fetchLoanDetails = function fetchLoanDetails(loanPid) {
38295
38329
  }
38296
38330
 
38297
38331
  _context.next = 9;
38298
- return loanApi.list(loanApi.query().withDocPid(response.data.metadata.document_pid).withState(invenioConfig.CIRCULATION.loanRequestStates).sortByRequestStartDate().qs());
38332
+ return loanApi.list(loanApi.query().withDocPid(response.data.metadata.document_pid).withState(invenioConfig.CIRCULATION.loanRequestStates).sortByRequestStartDateAsc().qs());
38299
38333
 
38300
38334
  case 9:
38301
38335
  pendingLoansResponse = _context.sent;
@@ -38558,7 +38592,7 @@ var mapStateToProps$Q = function mapStateToProps(state) {
38558
38592
  };
38559
38593
  };
38560
38594
 
38561
- var mapDispatchToProps$D = function mapDispatchToProps(dispatch) {
38595
+ var mapDispatchToProps$E = function mapDispatchToProps(dispatch) {
38562
38596
  return {
38563
38597
  fetchPendingLoans: function fetchPendingLoans$1(documentPid) {
38564
38598
  return dispatch(fetchPendingLoans(documentPid));
@@ -38572,7 +38606,7 @@ var mapDispatchToProps$D = function mapDispatchToProps(dispatch) {
38572
38606
  };
38573
38607
  };
38574
38608
 
38575
- var ItemPendingLoans = connect(mapStateToProps$Q, mapDispatchToProps$D)(ItemPendingLoans$1);
38609
+ var ItemPendingLoans = connect(mapStateToProps$Q, mapDispatchToProps$E)(ItemPendingLoans$1);
38576
38610
 
38577
38611
  var ItemDetails$1 = /*#__PURE__*/function (_Component) {
38578
38612
  _inherits(ItemDetails, _Component);
@@ -38672,7 +38706,7 @@ var mapStateToProps$P = function mapStateToProps(state) {
38672
38706
  };
38673
38707
  };
38674
38708
 
38675
- var mapDispatchToProps$C = function mapDispatchToProps(dispatch) {
38709
+ var mapDispatchToProps$D = function mapDispatchToProps(dispatch) {
38676
38710
  return {
38677
38711
  fetchItemDetails: function fetchItemDetails$1(itemPid) {
38678
38712
  return dispatch(fetchItemDetails(itemPid));
@@ -38683,7 +38717,7 @@ var mapDispatchToProps$C = function mapDispatchToProps(dispatch) {
38683
38717
  };
38684
38718
  };
38685
38719
 
38686
- var ItemDetails = connect(mapStateToProps$P, mapDispatchToProps$C)(ItemDetails$1);
38720
+ var ItemDetails = connect(mapStateToProps$P, mapDispatchToProps$D)(ItemDetails$1);
38687
38721
 
38688
38722
  var schema$4 = function schema() {
38689
38723
  var _schema = {
@@ -40275,7 +40309,7 @@ var mapStateToProps$M = function mapStateToProps(state) {
40275
40309
  };
40276
40310
  };
40277
40311
 
40278
- var mapDispatchToProps$B = function mapDispatchToProps(dispatch) {
40312
+ var mapDispatchToProps$C = function mapDispatchToProps(dispatch) {
40279
40313
  return {
40280
40314
  fetchAvailableItems: function fetchAvailableItems$1(documentPid) {
40281
40315
  return dispatch(fetchAvailableItems(documentPid));
@@ -40294,7 +40328,7 @@ var mapDispatchToProps$B = function mapDispatchToProps(dispatch) {
40294
40328
  };
40295
40329
  };
40296
40330
 
40297
- var AvailableItems = connect(mapStateToProps$M, mapDispatchToProps$B)(AvailableItems$1);
40331
+ var AvailableItems = connect(mapStateToProps$M, mapDispatchToProps$C)(AvailableItems$1);
40298
40332
 
40299
40333
  var LoanUpdateDates$1 = /*#__PURE__*/function (_Component) {
40300
40334
  _inherits(LoanUpdateDates, _Component);
@@ -40552,7 +40586,7 @@ var clearError = function clearError() {
40552
40586
  };
40553
40587
  };
40554
40588
 
40555
- var mapDispatchToProps$A = function mapDispatchToProps(dispatch) {
40589
+ var mapDispatchToProps$B = function mapDispatchToProps(dispatch) {
40556
40590
  return {
40557
40591
  loanUpdateDates: function loanUpdateDates$1(loanPid, data) {
40558
40592
  return dispatch(loanUpdateDates(loanPid, data));
@@ -40572,7 +40606,7 @@ var mapStateToProps$L = function mapStateToProps(state) {
40572
40606
  };
40573
40607
  };
40574
40608
 
40575
- var LoanUpdateDates = connect(mapStateToProps$L, mapDispatchToProps$A)(LoanUpdateDates$1);
40609
+ var LoanUpdateDates = connect(mapStateToProps$L, mapDispatchToProps$B)(LoanUpdateDates$1);
40576
40610
 
40577
40611
  var IS_LOADING$p = 'overdueLoanSendNotificationModal/IS_LOADING';
40578
40612
  var SUCCESS$p = 'overdueLoanSendNotificationModal/SUCCESS';
@@ -40909,7 +40943,7 @@ var mapStateToProps$K = function mapStateToProps(state) {
40909
40943
  };
40910
40944
  };
40911
40945
 
40912
- var mapDispatchToProps$z = function mapDispatchToProps(dispatch) {
40946
+ var mapDispatchToProps$A = function mapDispatchToProps(dispatch) {
40913
40947
  return {
40914
40948
  sendOverdueLoansNotificationReminder: function sendOverdueLoansNotificationReminder$1(loanPid) {
40915
40949
  return dispatch(sendOverdueLoansNotificationReminder(loanPid));
@@ -40917,7 +40951,156 @@ var mapDispatchToProps$z = function mapDispatchToProps(dispatch) {
40917
40951
  };
40918
40952
  };
40919
40953
 
40920
- var OverdueLoanSendNotificationModal = connect(mapStateToProps$K, mapDispatchToProps$z)(OverdueLoanSendNotificationModal$1);
40954
+ var OverdueLoanSendNotificationModal = connect(mapStateToProps$K, mapDispatchToProps$A)(OverdueLoanSendNotificationModal$1);
40955
+
40956
+ var ExtendModal$1 = /*#__PURE__*/function (_Component) {
40957
+ _inherits(ExtendModal, _Component);
40958
+
40959
+ var _super = _createSuper(ExtendModal);
40960
+
40961
+ function ExtendModal(props) {
40962
+ var _this;
40963
+
40964
+ _classCallCheck(this, ExtendModal);
40965
+
40966
+ _this = _super.call(this, props);
40967
+ _this.fetchCirculation = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
40968
+ var _this$props, loanDetails, sendErrorNotification, document_pid, response, circulation;
40969
+
40970
+ return regenerator.wrap(function _callee$(_context) {
40971
+ while (1) {
40972
+ switch (_context.prev = _context.next) {
40973
+ case 0:
40974
+ _this$props = _this.props, loanDetails = _this$props.loanDetails, sendErrorNotification = _this$props.sendErrorNotification;
40975
+ document_pid = loanDetails.metadata.document_pid;
40976
+ _context.prev = 2;
40977
+ _this.cancellableCirculation = withCancel(documentApi.get(document_pid));
40978
+ _context.next = 6;
40979
+ return _this.cancellableCirculation.promise;
40980
+
40981
+ case 6:
40982
+ response = _context.sent;
40983
+ circulation = response.data.metadata.circulation;
40984
+
40985
+ _this.setState({
40986
+ overbooked: circulation.overbooked === true
40987
+ });
40988
+
40989
+ _context.next = 14;
40990
+ break;
40991
+
40992
+ case 11:
40993
+ _context.prev = 11;
40994
+ _context.t0 = _context["catch"](2);
40995
+
40996
+ if (_context.t0 !== 'UNMOUNTED') {
40997
+ sendErrorNotification('Something went wrong while checking if the literature is overbooked.', 'If the problem persists, please contact technical support.');
40998
+ }
40999
+
41000
+ case 14:
41001
+ case "end":
41002
+ return _context.stop();
41003
+ }
41004
+ }
41005
+ }, _callee, null, [[2, 11]]);
41006
+ }));
41007
+
41008
+ _this.extend = function () {
41009
+ var loanAction = _this.props.loanAction;
41010
+ loanAction();
41011
+
41012
+ _this.hide();
41013
+ };
41014
+
41015
+ _this.hide = function () {
41016
+ return _this.setState({
41017
+ open: false
41018
+ });
41019
+ };
41020
+
41021
+ _this.show = function () {
41022
+ return _this.setState({
41023
+ open: true
41024
+ });
41025
+ };
41026
+
41027
+ _this.state = {
41028
+ overbooked: false,
41029
+ open: false
41030
+ };
41031
+ return _this;
41032
+ }
41033
+
41034
+ _createClass(ExtendModal, [{
41035
+ key: "componentDidMount",
41036
+ value: function componentDidMount() {
41037
+ this.fetchCirculation();
41038
+ }
41039
+ }, {
41040
+ key: "componentWillUnmount",
41041
+ value: function componentWillUnmount() {
41042
+ this.cancellableCirculation && this.cancellableCirculation.cancel();
41043
+ }
41044
+ }, {
41045
+ key: "render",
41046
+ value: function render() {
41047
+ var _this$props2 = this.props,
41048
+ pid = _this$props2.pid,
41049
+ isLoading = _this$props2.isLoading;
41050
+ var _this$state = this.state,
41051
+ open = _this$state.open,
41052
+ overbooked = _this$state.overbooked;
41053
+ return /*#__PURE__*/React.createElement(React.Fragment, null, overbooked ? /*#__PURE__*/React.createElement(Modal, {
41054
+ size: "small",
41055
+ trigger: /*#__PURE__*/React.createElement(Button, {
41056
+ primary: true,
41057
+ fluid: true,
41058
+ content: "Extend",
41059
+ onClick: this.show,
41060
+ loading: isLoading,
41061
+ disabled: isLoading
41062
+ }),
41063
+ open: open,
41064
+ onClose: this.hide
41065
+ }, /*#__PURE__*/React.createElement(Header, {
41066
+ content: "Extend Loan #".concat(pid)
41067
+ }), /*#__PURE__*/React.createElement(Modal.Content, null, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
41068
+ width: 1
41069
+ }, /*#__PURE__*/React.createElement(Icon, {
41070
+ name: "warning sign",
41071
+ color: "red",
41072
+ size: "large"
41073
+ })), /*#__PURE__*/React.createElement(Grid.Column, {
41074
+ width: 15
41075
+ }, /*#__PURE__*/React.createElement("p", null, "Are you sure you want to extend the loan #".concat(pid, "?\n This literature is overbooked."))))), /*#__PURE__*/React.createElement(Modal.Actions, null, /*#__PURE__*/React.createElement(Button, {
41076
+ secondary: true,
41077
+ onClick: this.hide
41078
+ }, "Cancel"), /*#__PURE__*/React.createElement(Button, {
41079
+ primary: true,
41080
+ onClick: this.extend
41081
+ }, "Extend"))) : /*#__PURE__*/React.createElement(Button, {
41082
+ size: "small",
41083
+ fluid: true,
41084
+ primary: true,
41085
+ onClick: this.extend,
41086
+ loading: isLoading,
41087
+ disabled: isLoading
41088
+ }, "Extend"));
41089
+ }
41090
+ }]);
41091
+
41092
+ return ExtendModal;
41093
+ }(Component);
41094
+
41095
+ var mapDispatchToProps$z = function mapDispatchToProps(dispatch) {
41096
+ return {
41097
+ sendErrorNotification: function sendErrorNotification(title, message) {
41098
+ return dispatch(addNotification(title, message, 'error'));
41099
+ }
41100
+ };
41101
+ };
41102
+
41103
+ var ExtendModal = connect(null, mapDispatchToProps$z)(ExtendModal$1);
40921
41104
 
40922
41105
  var CancelModal = /*#__PURE__*/function (_Component) {
40923
41106
  _inherits(CancelModal, _Component);
@@ -41003,7 +41186,6 @@ var CancelModal = /*#__PURE__*/function (_Component) {
41003
41186
  value = _this$state.value,
41004
41187
  showPopup = _this$state.showPopup;
41005
41188
  return /*#__PURE__*/React.createElement(Modal, {
41006
- basic: true,
41007
41189
  size: "small",
41008
41190
  trigger: /*#__PURE__*/React.createElement(Button, {
41009
41191
  primary: true,
@@ -41032,13 +41214,10 @@ var CancelModal = /*#__PURE__*/function (_Component) {
41032
41214
  position: "bottom left",
41033
41215
  open: showPopup
41034
41216
  })), /*#__PURE__*/React.createElement(Modal.Actions, null, /*#__PURE__*/React.createElement(Button, {
41035
- basic: true,
41036
- color: "black",
41037
- inverted: true,
41217
+ secondary: true,
41038
41218
  onClick: this.hide
41039
41219
  }, "Back"), /*#__PURE__*/React.createElement(Button, {
41040
41220
  color: "red",
41041
- inverted: true,
41042
41221
  onClick: this.cancel
41043
41222
  }, /*#__PURE__*/React.createElement(Icon, {
41044
41223
  name: "remove"
@@ -41053,6 +41232,20 @@ CancelModal.defaultProps = {
41053
41232
  isLoading: false
41054
41233
  };
41055
41234
 
41235
+ var CancelLoanModal = function CancelLoanModal(_ref) {
41236
+ var pid = _ref.pid,
41237
+ isLoading = _ref.isLoading,
41238
+ cancelAction = _ref.cancelAction;
41239
+ return /*#__PURE__*/React.createElement(CancelModal, {
41240
+ header: "Cancel Loan #".concat(pid),
41241
+ content: "You are about to cancel loan #".concat(pid, ".\n Please enter a reason for cancelling this loan."),
41242
+ cancelText: "Cancel Loan",
41243
+ buttonText: "Cancel",
41244
+ action: cancelAction,
41245
+ isLoading: isLoading
41246
+ });
41247
+ };
41248
+
41056
41249
  var LoanActions$1 = /*#__PURE__*/function (_Component) {
41057
41250
  _inherits(LoanActions, _Component);
41058
41251
 
@@ -41070,7 +41263,8 @@ var LoanActions$1 = /*#__PURE__*/function (_Component) {
41070
41263
  var actions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
41071
41264
  var _this$props = this.props,
41072
41265
  performLoanAction = _this$props.performLoanAction,
41073
- isLoading = _this$props.isLoading; // omit checkout because it must done in one of the available items
41266
+ isLoading = _this$props.isLoading,
41267
+ loanDetails = _this$props.loanDetails; // omit checkout because it must done in one of the available items
41074
41268
 
41075
41269
  if (!itemPid) {
41076
41270
  actions = omit(actions, 'checkout');
@@ -41090,13 +41284,15 @@ var LoanActions$1 = /*#__PURE__*/function (_Component) {
41090
41284
 
41091
41285
  return /*#__PURE__*/React.createElement(List.Item, {
41092
41286
  key: action
41093
- }, action === 'cancel' ? /*#__PURE__*/React.createElement(CancelModal, {
41094
- header: "Cancel Loan #".concat(pid),
41095
- content: "You are about to cancel loan #".concat(pid, ".\n Please enter a reason for cancelling this loan."),
41096
- cancelText: "Cancel Loan",
41097
- buttonText: capitalize('cancel'),
41098
- action: cancelAction,
41099
- isLoading: isLoading
41287
+ }, action === 'cancel' ? /*#__PURE__*/React.createElement(CancelLoanModal, {
41288
+ pid: pid,
41289
+ isLoading: isLoading,
41290
+ cancelAction: cancelAction
41291
+ }) : action === 'extend' ? /*#__PURE__*/React.createElement(ExtendModal, {
41292
+ pid: pid,
41293
+ isLoading: isLoading,
41294
+ loanAction: loanAction,
41295
+ loanDetails: loanDetails
41100
41296
  }) : /*#__PURE__*/React.createElement(Button, {
41101
41297
  size: "small",
41102
41298
  fluid: true,
@@ -41460,7 +41656,10 @@ var LoanSearch = /*#__PURE__*/function (_Component) {
41460
41656
  placeholder: "Search for loans"
41461
41657
  }, invenioConfig.APP.SEARCH_BAR_PROPS)), /*#__PURE__*/React.createElement(QueryBuildHelper, {
41462
41658
  fields: helperFields
41463
- })), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Row, {
41659
+ })), /*#__PURE__*/React.createElement(Container, {
41660
+ fluid: true,
41661
+ className: "bo-search-body"
41662
+ }, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Row, {
41464
41663
  columns: 2
41465
41664
  }, /*#__PURE__*/React.createElement(ResultsLoader, null, /*#__PURE__*/React.createElement(Grid.Column, {
41466
41665
  width: 3,
@@ -41471,7 +41670,16 @@ var LoanSearch = /*#__PURE__*/function (_Component) {
41471
41670
  modelName: this.modelName
41472
41671
  }), /*#__PURE__*/React.createElement(SearchDateRange, null)), /*#__PURE__*/React.createElement(Grid.Column, {
41473
41672
  width: 13
41474
- }, /*#__PURE__*/React.createElement(EmptyResults, {
41673
+ }, /*#__PURE__*/React.createElement(Grid, {
41674
+ columns: 2
41675
+ }, /*#__PURE__*/React.createElement(Grid.Column, {
41676
+ width: 8
41677
+ }), /*#__PURE__*/React.createElement(Grid.Column, {
41678
+ width: 8,
41679
+ textAlign: "right"
41680
+ }, /*#__PURE__*/React.createElement(ExportReactSearchKitResults, {
41681
+ exportBaseUrl: loanApi.searchBaseURL
41682
+ }))), /*#__PURE__*/React.createElement(EmptyResults, {
41475
41683
  extraContent: /*#__PURE__*/React.createElement(NewButton, {
41476
41684
  text: "Add document",
41477
41685
  to: BackOfficeRoutes.documentCreate
@@ -41481,7 +41689,7 @@ var LoanSearch = /*#__PURE__*/function (_Component) {
41481
41689
  withLayoutSwitcher: false
41482
41690
  }), /*#__PURE__*/React.createElement(ResultsList, {
41483
41691
  ListEntryElement: LoanListEntry
41484
- }), /*#__PURE__*/React.createElement(SearchFooter, null)))))))));
41692
+ }), /*#__PURE__*/React.createElement(SearchFooter, null))))))))));
41485
41693
  }
41486
41694
  }]);
41487
41695
 
@@ -45106,7 +45314,7 @@ var PatronPastLoans$3 = /*#__PURE__*/function (_Component) {
45106
45314
  _this.seeAllButton = function () {
45107
45315
  var patronDetails = _this.props.patronDetails;
45108
45316
  var patronPid = patronDetails.user_pid;
45109
- var path = BackOfficeRoutes.loansListWithQuery(loanApi.query().withPatronPid(patronPid).withState(invenioConfig.CIRCULATION.loanRequestStates).qs());
45317
+ var path = BackOfficeRoutes.loansListWithQuery(loanApi.query().withPatronPid(patronPid).withState(invenioConfig.CIRCULATION.loanCompletedStates).qs());
45110
45318
  return /*#__PURE__*/React.createElement(SeeAllButton, {
45111
45319
  to: path
45112
45320
  });