authscape 1.0.492 → 1.0.496

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
@@ -3665,8 +3665,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import
3665
3665
  function AssignMapping(_ref) {
3666
3666
  var currentUser = _ref.currentUser,
3667
3667
  documentComponentId = _ref.documentComponentId,
3668
- _ref$onOpen = _ref.onOpen,
3669
- onOpen = _ref$onOpen === void 0 ? null : _ref$onOpen,
3670
3668
  _ref$onCancel = _ref.onCancel,
3671
3669
  onCancel = _ref$onCancel === void 0 ? null : _ref$onCancel,
3672
3670
  _ref$onPublished = _ref.onPublished,
@@ -4430,6 +4428,13 @@ function FileMapping(_ref) {
4430
4428
  _useState2 = _slicedToArray(_useState, 2),
4431
4429
  documentComponentId = _useState2[0],
4432
4430
  setDocumentComponentId = _useState2[1];
4431
+ (0, _react.useEffect)(function () {
4432
+ if (documentComponentId != null) {
4433
+ if (onOpened != null) {
4434
+ onOpened(documentComponentId);
4435
+ }
4436
+ }
4437
+ }, [documentComponentId]);
4433
4438
  return /*#__PURE__*/_react["default"].createElement(_system.Box, null, documentComponentId == null && /*#__PURE__*/_react["default"].createElement(ManageMappingDocuments, {
4434
4439
  hideDocumentManager: hideDocumentManager,
4435
4440
  companyId: currentUser != null ? currentUser.companyId : null,
@@ -4445,11 +4450,6 @@ function FileMapping(_ref) {
4445
4450
  }), documentComponentId != null && /*#__PURE__*/_react["default"].createElement(AssignMapping, {
4446
4451
  currentUser: currentUser,
4447
4452
  documentComponentId: documentComponentId,
4448
- onOpen: function onOpen() {
4449
- if (onOpened != null) {
4450
- onOpened(documentComponentId);
4451
- }
4452
- },
4453
4453
  onCancel: function onCancel() {
4454
4454
  setDocumentComponentId(null);
4455
4455
  if (onCanceled != null) {
@@ -9278,10 +9278,10 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
9278
9278
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9279
9279
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9280
9280
  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; } }
9281
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9282
- function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); } // import { FileUploader, apiService } from 'authscape';
9281
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { FileUploader, apiService } from 'authscape';
9283
9282
  function UserManagement(_ref) {
9284
- _objectDestructuringEmpty(_ref);
9283
+ var _ref$onUploadComplete = _ref.onUploadCompleted,
9284
+ _onUploadCompleted = _ref$onUploadComplete === void 0 ? null : _ref$onUploadComplete;
9285
9285
  // const [comments, setComments] = useState([]);
9286
9286
  // const [message, setMessage] = useState("");
9287
9287
 
@@ -9424,8 +9424,10 @@ function UserManagement(_ref) {
9424
9424
  }
9425
9425
  }, /*#__PURE__*/_react["default"].createElement(FileUploader, {
9426
9426
  url: "/UserManagement/UploadUsers",
9427
- onUploadCompleted: function onUploadCompleted() {
9428
- alert("Uploaded");
9427
+ onUploadCompleted: function onUploadCompleted(results) {
9428
+ if (_onUploadCompleted != null) {
9429
+ _onUploadCompleted(results);
9430
+ }
9429
9431
  }
9430
9432
  }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_material.Button, {
9431
9433
  onClick: function onClick() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.492",
3
+ "version": "1.0.496",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@ import CloseIcon from '@mui/icons-material/Close';
15
15
  import IconButton from '@mui/material/IconButton';
16
16
  import ArrowRightAltRoundedIcon from '@mui/icons-material/ArrowRightAltRounded';
17
17
 
18
- export function AssignMapping({currentUser, documentComponentId, onOpen = null, onCancel = null, onPublished = null}) {
18
+ export function AssignMapping({currentUser, documentComponentId, onCancel = null, onPublished = null}) {
19
19
 
20
20
  const [documentId, setDocumentId] = useState(documentComponentId);
21
21
 
@@ -6,7 +6,19 @@ import { Box } from '@mui/system';
6
6
  export function FileMapping({currentUser, hideDocumentManager, onOpened = null, onPublished = null, onCanceled = null, onArchived = null}) {
7
7
 
8
8
  const [documentComponentId, setDocumentComponentId] = useState(null);
9
-
9
+
10
+ useEffect(() => {
11
+
12
+ if (documentComponentId != null)
13
+ {
14
+ if (onOpened != null)
15
+ {
16
+ onOpened(documentComponentId);
17
+ }
18
+ }
19
+
20
+ }, [documentComponentId]);
21
+
10
22
  return (
11
23
  <Box>
12
24
  {documentComponentId == null &&
@@ -32,12 +44,6 @@ export function FileMapping({currentUser, hideDocumentManager, onOpened = null,
32
44
 
33
45
  {documentComponentId != null &&
34
46
  <AssignMapping currentUser={currentUser} documentComponentId={documentComponentId}
35
- onOpen={() => {
36
- if (onOpened != null)
37
- {
38
- onOpened(documentComponentId);
39
- }
40
- }}
41
47
  onCancel={() => {
42
48
 
43
49
  setDocumentComponentId(null);
@@ -22,7 +22,7 @@ import DialogContent from '@mui/material/DialogContent';
22
22
  import DialogContentText from '@mui/material/DialogContentText';
23
23
  import DialogTitle from '@mui/material/DialogTitle';
24
24
 
25
- export function UserManagement({}) {
25
+ export function UserManagement({onUploadCompleted = null}) {
26
26
 
27
27
  // const [comments, setComments] = useState([]);
28
28
  // const [message, setMessage] = useState("");
@@ -125,8 +125,13 @@ export function UserManagement({}) {
125
125
  </DialogContentText>
126
126
 
127
127
  <Box sx={{height:200}}>
128
- <FileUploader url={"/UserManagement/UploadUsers"} onUploadCompleted={() => {
129
- alert("Uploaded");
128
+ <FileUploader url={"/UserManagement/UploadUsers"} onUploadCompleted={(results) => {
129
+
130
+ if (onUploadCompleted != null)
131
+ {
132
+ onUploadCompleted(results);
133
+ }
134
+
130
135
  }} />
131
136
  </Box>
132
137