authscape 1.0.528 → 1.0.532

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/index.js CHANGED
@@ -1479,6 +1479,8 @@ var EditableDatagrid = function EditableDatagrid(_ref) {
1479
1479
  columns = _ref.columns,
1480
1480
  _ref$isCellEditable = _ref.isCellEditable,
1481
1481
  _isCellEditable = _ref$isCellEditable === void 0 ? null : _ref$isCellEditable,
1482
+ _ref$onCellClick = _ref.onCellClick,
1483
+ onCellClick = _ref$onCellClick === void 0 ? null : _ref$onCellClick,
1482
1484
  _ref$onCellEdited = _ref.onCellEdited,
1483
1485
  onCellEdited = _ref$onCellEdited === void 0 ? null : _ref$onCellEdited,
1484
1486
  _ref$params = _ref.params,
@@ -1613,6 +1615,7 @@ var EditableDatagrid = function EditableDatagrid(_ref) {
1613
1615
  },
1614
1616
  rowsPerPageOptions: rowsPerPage,
1615
1617
  disableSelectionOnClick: true,
1618
+ onCellClick: onCellClick,
1616
1619
  onCellEditCommit: handleCellEditCommit(),
1617
1620
  isCellEditable: function isCellEditable(params) {
1618
1621
  if (_isCellEditable != null) {
@@ -7145,6 +7148,9 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
7145
7148
  var cellItem = dataRow.cells.find(function (s) {
7146
7149
  return s.columnId.toLowerCase() == fieldName.toLowerCase();
7147
7150
  });
7151
+ if (cellItem.readOnly) {
7152
+ return;
7153
+ }
7148
7154
  var rowBuilder = {};
7149
7155
  for (var index = 0; index < dataRow.cells.length; index++) {
7150
7156
  var element = dataRow.cells[index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.528",
3
+ "version": "1.0.532",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,7 +2,7 @@ import React, {useEffect, useState} from 'react';
2
2
  import { DataGrid, GridActionsCellItem } from "@mui/x-data-grid";
3
3
  import { Box } from '@mui/material';
4
4
 
5
- export const EditableDatagrid = ({loadedUser, url = null, eRows = null, columns, isCellEditable = null, onCellEdited = null, params = null, sx = {}, height="50vh", pageSize = 50, rowsPerPage = [25, 50, 100], rowHeight = 70, key = null, onRowClick = null}) => {
5
+ export const EditableDatagrid = ({loadedUser, url = null, eRows = null, columns, isCellEditable = null, onCellClick = null, onCellEdited = null, params = null, sx = {}, height="50vh", pageSize = 50, rowsPerPage = [25, 50, 100], rowHeight = 70, key = null, onRowClick = null}) => {
6
6
 
7
7
  const [rows, setRows] = useState([]);
8
8
  const [totalRows, setTotalRows] = useState(0);
@@ -79,6 +79,7 @@ export const EditableDatagrid = ({loadedUser, url = null, eRows = null, columns,
79
79
  onPageChange={(newPage) => setOffset(newPage)}
80
80
  rowsPerPageOptions={rowsPerPage}
81
81
  disableSelectionOnClick={true}
82
+ onCellClick={onCellClick}
82
83
  onCellEditCommit={handleCellEditCommit()}
83
84
  isCellEditable={(params) => {
84
85
 
@@ -508,6 +508,11 @@ export const SpreadsheetViewer = forwardRef(({loadedUser, currentUser, documentI
508
508
  let dataRow = prevDetails.find((d) => d.rowId === dataRowId);
509
509
  let cellItem = dataRow.cells.find(s => s.columnId.toLowerCase() == fieldName.toLowerCase());
510
510
 
511
+ if (cellItem.readOnly)
512
+ {
513
+ return;
514
+ }
515
+
511
516
  let rowBuilder = {};
512
517
  for (let index = 0; index < dataRow.cells.length; index++) {
513
518
  const element = dataRow.cells[index];