@inveniosoftware/react-invenio-app-ils 1.0.0-alpha.86 → 1.0.0-alpha.87
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/CHANGES.md +5 -1
- package/dist/cjs/index.js +46 -39
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +46 -40
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGES.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
-
Version 1.0.0-alpha.
|
|
3
|
+
Version 1.0.0-alpha.87 (released 2024-06-14)
|
|
4
|
+
|
|
5
|
+
- document items: add overridable id
|
|
6
|
+
|
|
7
|
+
Version 1.0.0-alpha.86 (released 2024-06-06)
|
|
4
8
|
|
|
5
9
|
- checkout: add optional self-checkout
|
|
6
10
|
- installation: add barcode scanner dependency
|
package/dist/cjs/index.js
CHANGED
|
@@ -16394,6 +16394,44 @@ class DocumentItems$3 extends React.Component {
|
|
|
16394
16394
|
} = _ref2;
|
|
16395
16395
|
return "".concat(row.metadata.internal_location.name, " (").concat(row.metadata.internal_location.location.name, ")");
|
|
16396
16396
|
};
|
|
16397
|
+
this.getColumnFormat = () => {
|
|
16398
|
+
return [{
|
|
16399
|
+
title: 'Barcode',
|
|
16400
|
+
field: 'metadata.barcode',
|
|
16401
|
+
formatter: this.viewDetails
|
|
16402
|
+
}, {
|
|
16403
|
+
title: 'Status',
|
|
16404
|
+
field: 'metadata.status'
|
|
16405
|
+
}, {
|
|
16406
|
+
title: 'Medium',
|
|
16407
|
+
field: 'metadata.medium'
|
|
16408
|
+
}, {
|
|
16409
|
+
title: 'Location',
|
|
16410
|
+
field: 'metadata.internal_location.name',
|
|
16411
|
+
formatter: this.locationFormatter
|
|
16412
|
+
}, {
|
|
16413
|
+
title: 'Shelf',
|
|
16414
|
+
field: 'metadata.shelf'
|
|
16415
|
+
}, {
|
|
16416
|
+
title: 'Restrictions',
|
|
16417
|
+
field: 'metadata.circulation_restriction'
|
|
16418
|
+
}, {
|
|
16419
|
+
title: 'Loan Status',
|
|
16420
|
+
field: 'metadata.circulation.state',
|
|
16421
|
+
formatter: _ref3 => {
|
|
16422
|
+
let {
|
|
16423
|
+
row,
|
|
16424
|
+
col
|
|
16425
|
+
} = _ref3;
|
|
16426
|
+
if (_get__default["default"](row, col.field) === 'ITEM_ON_LOAN') {
|
|
16427
|
+
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
16428
|
+
to: BackOfficeRoutes.loanDetailsFor(row.metadata.circulation.loan_pid)
|
|
16429
|
+
}, "on loan");
|
|
16430
|
+
}
|
|
16431
|
+
return _get__default["default"](row, col.field) || '-';
|
|
16432
|
+
}
|
|
16433
|
+
}];
|
|
16434
|
+
};
|
|
16397
16435
|
}
|
|
16398
16436
|
componentDidMount() {
|
|
16399
16437
|
const {
|
|
@@ -16404,44 +16442,10 @@ class DocumentItems$3 extends React.Component {
|
|
|
16404
16442
|
}
|
|
16405
16443
|
renderTable(data) {
|
|
16406
16444
|
const {
|
|
16407
|
-
showMaxItems
|
|
16445
|
+
showMaxItems,
|
|
16446
|
+
columnFormat
|
|
16408
16447
|
} = this.props;
|
|
16409
|
-
const columns =
|
|
16410
|
-
title: 'Barcode',
|
|
16411
|
-
field: 'metadata.barcode',
|
|
16412
|
-
formatter: this.viewDetails
|
|
16413
|
-
}, {
|
|
16414
|
-
title: 'Status',
|
|
16415
|
-
field: 'metadata.status'
|
|
16416
|
-
}, {
|
|
16417
|
-
title: 'Medium',
|
|
16418
|
-
field: 'metadata.medium'
|
|
16419
|
-
}, {
|
|
16420
|
-
title: 'Location',
|
|
16421
|
-
field: 'metadata.internal_location.name',
|
|
16422
|
-
formatter: this.locationFormatter
|
|
16423
|
-
}, {
|
|
16424
|
-
title: 'Shelf',
|
|
16425
|
-
field: 'metadata.shelf'
|
|
16426
|
-
}, {
|
|
16427
|
-
title: 'Restrictions',
|
|
16428
|
-
field: 'metadata.circulation_restriction'
|
|
16429
|
-
}, {
|
|
16430
|
-
title: 'Loan Status',
|
|
16431
|
-
field: 'metadata.circulation.state',
|
|
16432
|
-
formatter: _ref3 => {
|
|
16433
|
-
let {
|
|
16434
|
-
row,
|
|
16435
|
-
col
|
|
16436
|
-
} = _ref3;
|
|
16437
|
-
if (_get__default["default"](row, col.field) === 'ITEM_ON_LOAN') {
|
|
16438
|
-
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
16439
|
-
to: BackOfficeRoutes.loanDetailsFor(row.metadata.circulation.loan_pid)
|
|
16440
|
-
}, "on loan");
|
|
16441
|
-
}
|
|
16442
|
-
return _get__default["default"](row, col.field) || '-';
|
|
16443
|
-
}
|
|
16444
|
-
}];
|
|
16448
|
+
const columns = columnFormat !== null ? columnFormat() : this.getColumnFormat();
|
|
16445
16449
|
return /*#__PURE__*/React__default["default"].createElement(ResultsTable, {
|
|
16446
16450
|
data: data.hits,
|
|
16447
16451
|
columns: columns,
|
|
@@ -16467,8 +16471,10 @@ class DocumentItems$3 extends React.Component {
|
|
|
16467
16471
|
DocumentItems$3.defaultProps = {
|
|
16468
16472
|
showMaxItems: 5,
|
|
16469
16473
|
isLoading: false,
|
|
16470
|
-
error: null
|
|
16474
|
+
error: null,
|
|
16475
|
+
columnFormat: null
|
|
16471
16476
|
};
|
|
16477
|
+
var DocumentItemsComponent$1 = Overridable__default["default"].component('DocumentDetails.DocumentItems', DocumentItems$3);
|
|
16472
16478
|
|
|
16473
16479
|
const mapStateToProps$1p = state => ({
|
|
16474
16480
|
documentDetails: state.documentDetails.data,
|
|
@@ -16480,7 +16486,7 @@ const mapStateToProps$1p = state => ({
|
|
|
16480
16486
|
const mapDispatchToProps$13 = dispatch => ({
|
|
16481
16487
|
fetchDocumentItems: documentPid => dispatch(fetchDocumentItems(documentPid))
|
|
16482
16488
|
});
|
|
16483
|
-
const DocumentItems$2 = reactRedux.connect(mapStateToProps$1p, mapDispatchToProps$13)(
|
|
16489
|
+
const DocumentItems$2 = reactRedux.connect(mapStateToProps$1p, mapDispatchToProps$13)(DocumentItemsComponent$1);
|
|
16484
16490
|
|
|
16485
16491
|
const IS_LOADING$C = 'fetchPendingLoansOnDocument/IS_LOADING';
|
|
16486
16492
|
const SUCCESS$C = 'fetchPendingLoansOnDocument/SUCCESS';
|
|
@@ -44228,6 +44234,7 @@ exports.BackOfficeRoutes = BackOfficeRoutes;
|
|
|
44228
44234
|
exports.DocumentCardGroup = DocumentCardGroup$1;
|
|
44229
44235
|
exports.DocumentIcon = DocumentIcon;
|
|
44230
44236
|
exports.DocumentItemBody = DocumentItemBody;
|
|
44237
|
+
exports.DocumentItems = DocumentItems$2;
|
|
44231
44238
|
exports.DocumentRequestForm = DocumentRequestForm;
|
|
44232
44239
|
exports.FrontSiteRoutes = FrontSiteRoutes;
|
|
44233
44240
|
exports.Headline = Headline$1;
|