authscape 1.0.516 → 1.0.520

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
@@ -4398,6 +4398,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4398
4398
 
4399
4399
  function FileMapping(_ref) {
4400
4400
  var currentUser = _ref.currentUser,
4401
+ _ref$fileUploadName = _ref.fileUploadName,
4402
+ fileUploadName = _ref$fileUploadName === void 0 ? "Upload Document" : _ref$fileUploadName,
4401
4403
  _ref$hideDocumentMana = _ref.hideDocumentManager,
4402
4404
  hideDocumentManager = _ref$hideDocumentMana === void 0 ? false : _ref$hideDocumentMana,
4403
4405
  _ref$documentTypeId = _ref.documentTypeId,
@@ -4422,6 +4424,7 @@ function FileMapping(_ref) {
4422
4424
  }
4423
4425
  }, [documentComponentId]);
4424
4426
  return /*#__PURE__*/_react["default"].createElement(_system.Box, null, documentComponentId == null && /*#__PURE__*/_react["default"].createElement(ManageMappingDocuments, {
4427
+ fileUploadName: fileUploadName,
4425
4428
  documentTypeId: documentTypeId,
4426
4429
  hideDocumentManager: hideDocumentManager,
4427
4430
  companyId: currentUser != null ? currentUser.companyId : null,
@@ -4490,7 +4493,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
4490
4493
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
4491
4494
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import {apiService, authService, StripeConnect, ReactDraft, EditableDatagrid, FileUploader} from 'authscape';
4492
4495
  function ManageMappingDocuments(_ref) {
4493
- var _ref$hideDocumentMana = _ref.hideDocumentManager,
4496
+ var fileUploadName = _ref.fileUploadName,
4497
+ _ref$hideDocumentMana = _ref.hideDocumentManager,
4494
4498
  hideDocumentManager = _ref$hideDocumentMana === void 0 ? false : _ref$hideDocumentMana,
4495
4499
  _ref$documentTypeId = _ref.documentTypeId,
4496
4500
  documentTypeId = _ref$documentTypeId === void 0 ? null : _ref$documentTypeId,
@@ -4807,7 +4811,7 @@ function ManageMappingDocuments(_ref) {
4807
4811
  onClick: function onClick() {
4808
4812
  setShowAddNewDocument(true);
4809
4813
  }
4810
- }, "Upload Document")))), /*#__PURE__*/_react["default"].createElement(EditableDatagrid, {
4814
+ }, fileUploadName)))), /*#__PURE__*/_react["default"].createElement(EditableDatagrid, {
4811
4815
  key: dataGridRefreshKey,
4812
4816
  loadedUser: true,
4813
4817
  params: {
@@ -7139,10 +7143,8 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
7139
7143
  return d.rowId === dataRowId;
7140
7144
  });
7141
7145
  var cellItem = dataRow.cells.find(function (s) {
7142
- return s.columnId == fieldName;
7146
+ return s.columnId.toLowerCase() == fieldName.toLowerCase();
7143
7147
  });
7144
- alert(fieldName);
7145
- alert(JSON.stringify(cellItem));
7146
7148
  var rowBuilder = {};
7147
7149
  for (var index = 0; index < dataRow.cells.length; index++) {
7148
7150
  var element = dataRow.cells[index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.516",
3
+ "version": "1.0.520",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ import { Box } from '@mui/system';
3
3
  // import ManageMappingDocuments from './manageMappingDocuments';
4
4
  // import AssignMapping from './AssignMapping';
5
5
 
6
- export function FileMapping({currentUser, hideDocumentManager = false, documentTypeId = null, onOpened = null, onPublished = null, onCanceled = null, onArchived = null}) {
6
+ export function FileMapping({currentUser, fileUploadName = "Upload Document", hideDocumentManager = false, documentTypeId = null, onOpened = null, onPublished = null, onCanceled = null, onArchived = null}) {
7
7
 
8
8
  const [documentComponentId, setDocumentComponentId] = useState(null);
9
9
 
@@ -23,6 +23,7 @@ export function FileMapping({currentUser, hideDocumentManager = false, documentT
23
23
  <Box>
24
24
  {documentComponentId == null &&
25
25
  <ManageMappingDocuments
26
+ fileUploadName={fileUploadName}
26
27
  documentTypeId={documentTypeId}
27
28
  hideDocumentManager={hideDocumentManager}
28
29
  companyId={currentUser != null ? currentUser.companyId : null}
@@ -19,7 +19,7 @@ import PublishRoundedIcon from '@mui/icons-material/PublishRounded';
19
19
  import Grid from '@mui/material/Grid';
20
20
  import DownloadRoundedIcon from '@mui/icons-material/DownloadRounded';
21
21
 
22
- export function ManageMappingDocuments({hideDocumentManager = false, documentTypeId = null, companyId = null, locationId = null, userId = null, onManageField = null, onArchive = null}) {
22
+ export function ManageMappingDocuments({fileUploadName, hideDocumentManager = false, documentTypeId = null, companyId = null, locationId = null, userId = null, onManageField = null, onArchive = null}) {
23
23
 
24
24
  const [document, setDocument] = useState(null);
25
25
  const [addColumnDialog, setAddColumnDialog] = useState(false);
@@ -229,7 +229,7 @@ export function ManageMappingDocuments({hideDocumentManager = false, documentTyp
229
229
  <Box sx={{textAlign:"right", marginBottom:2}}>
230
230
  <Button variant="contained" onClick={() => {
231
231
  setShowAddNewDocument(true);
232
- }}>Upload Document</Button>
232
+ }}>{fileUploadName}</Button>
233
233
  </Box>
234
234
  </Grid>
235
235
  </Grid>
@@ -506,10 +506,7 @@ export const SpreadsheetViewer = forwardRef(({loadedUser, currentUser, documentI
506
506
 
507
507
  // find the row and column
508
508
  let dataRow = prevDetails.find((d) => d.rowId === dataRowId);
509
- let cellItem = dataRow.cells.find(s => s.columnId == fieldName);
510
-
511
- alert(fieldName);
512
- alert(JSON.stringify(cellItem));
509
+ let cellItem = dataRow.cells.find(s => s.columnId.toLowerCase() == fieldName.toLowerCase());
513
510
 
514
511
  let rowBuilder = {};
515
512
  for (let index = 0; index < dataRow.cells.length; index++) {
@@ -518,8 +515,6 @@ export const SpreadsheetViewer = forwardRef(({loadedUser, currentUser, documentI
518
515
  rowBuilder[element.columnId] = element.text;
519
516
  }
520
517
 
521
-
522
-
523
518
  let JSONBuilder = {};
524
519
  if (cellItem.type == "text")
525
520
  {