authscape 1.0.622 → 1.0.624
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 +0 -2183
- package/package.json +1 -10
- package/src/components/mapping/assignMapping.js +0 -237
- package/src/components/mapping/conditionBasedTool.js +0 -99
- package/src/components/mapping/datasources.js +0 -259
- package/src/components/mapping/fileMapping.js +0 -72
- package/src/components/mapping/manageMappingDocuments.js +0 -525
- package/src/components/mapping/mappedColumn.js +0 -70
- package/src/components/mapping/matchExisting.js +0 -135
- package/src/components/mapping/newMappingColumn.js +0 -132
- package/src/components/mapping/sortableColumn.js +0 -33
- package/src/components/mapping/uploadMappedFile.js +0 -124
package/index.js
CHANGED
|
@@ -2573,2189 +2573,6 @@ var GoogleMapsAutoComplete = function GoogleMapsAutoComplete(_ref3) {
|
|
|
2573
2573
|
exports.GoogleMapsAutoComplete = GoogleMapsAutoComplete;
|
|
2574
2574
|
"use strict";
|
|
2575
2575
|
|
|
2576
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2577
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2578
|
-
value: true
|
|
2579
|
-
});
|
|
2580
|
-
exports.AssignMapping = AssignMapping;
|
|
2581
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
2582
|
-
var _system = require("@mui/system");
|
|
2583
|
-
var _Container = _interopRequireDefault(require("@mui/material/Container"));
|
|
2584
|
-
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
2585
|
-
var _material = require("@mui/material");
|
|
2586
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
2587
|
-
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
2588
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
2589
|
-
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
2590
|
-
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
2591
|
-
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
2592
|
-
var _ArrowRightAltRounded = _interopRequireDefault(require("@mui/icons-material/ArrowRightAltRounded"));
|
|
2593
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
2594
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
2595
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
2596
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2597
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2598
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2599
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2600
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2601
|
-
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); }
|
|
2602
|
-
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; }
|
|
2603
|
-
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; } }
|
|
2604
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { apiService } from 'authscape';
|
|
2605
|
-
// import MappedColumn from './MappedColumn';
|
|
2606
|
-
// import ConditionBasedTool from './conditionBasedTool';
|
|
2607
|
-
// import SpreadsheetViewer from '../spreadsheetViewer';
|
|
2608
|
-
function AssignMapping(_ref) {
|
|
2609
|
-
var currentUser = _ref.currentUser,
|
|
2610
|
-
documentComponentId = _ref.documentComponentId,
|
|
2611
|
-
_ref$setIsLoading = _ref.setIsLoading,
|
|
2612
|
-
setIsLoading = _ref$setIsLoading === void 0 ? null : _ref$setIsLoading,
|
|
2613
|
-
_ref$onCancel = _ref.onCancel,
|
|
2614
|
-
onCancel = _ref$onCancel === void 0 ? null : _ref$onCancel,
|
|
2615
|
-
_ref$onPublished = _ref.onPublished,
|
|
2616
|
-
onPublished = _ref$onPublished === void 0 ? null : _ref$onPublished;
|
|
2617
|
-
var _useState = (0, _react.useState)(documentComponentId),
|
|
2618
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2619
|
-
documentId = _useState2[0],
|
|
2620
|
-
setDocumentId = _useState2[1];
|
|
2621
|
-
var _useState3 = (0, _react.useState)(null),
|
|
2622
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2623
|
-
fromColumnOptions = _useState4[0],
|
|
2624
|
-
setFromColumnOptions = _useState4[1];
|
|
2625
|
-
var _useState5 = (0, _react.useState)(null),
|
|
2626
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
2627
|
-
toColumnOptions = _useState6[0],
|
|
2628
|
-
setToColumnOptions = _useState6[1];
|
|
2629
|
-
var _useState7 = (0, _react.useState)(null),
|
|
2630
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
2631
|
-
documentType = _useState8[0],
|
|
2632
|
-
setDocumentType = _useState8[1];
|
|
2633
|
-
var _useState9 = (0, _react.useState)(null),
|
|
2634
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
2635
|
-
documentName = _useState10[0],
|
|
2636
|
-
setDocumentName = _useState10[1];
|
|
2637
|
-
var _useState11 = (0, _react.useState)(1),
|
|
2638
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
2639
|
-
urlTick = _useState12[0],
|
|
2640
|
-
setURLTick = _useState12[1];
|
|
2641
|
-
var _useState13 = (0, _react.useState)(null),
|
|
2642
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
2643
|
-
spreadSheetAddress = _useState14[0],
|
|
2644
|
-
setSpreadSheetAddress = _useState14[1];
|
|
2645
|
-
var _useState15 = (0, _react.useState)(false),
|
|
2646
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
2647
|
-
showPreviewDialog = _useState16[0],
|
|
2648
|
-
setShowPreviewDialog = _useState16[1];
|
|
2649
|
-
var _useState17 = (0, _react.useState)(null),
|
|
2650
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
2651
|
-
advanceQuery = _useState18[0],
|
|
2652
|
-
setAdvanceQuery = _useState18[1];
|
|
2653
|
-
var spreadSheetRef = (0, _react.useRef)(null);
|
|
2654
|
-
var fetchMappingTo = /*#__PURE__*/function () {
|
|
2655
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2656
|
-
var response;
|
|
2657
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2658
|
-
while (1) switch (_context.prev = _context.next) {
|
|
2659
|
-
case 0:
|
|
2660
|
-
_context.next = 2;
|
|
2661
|
-
return apiService().get("/DocumentMapping/GetMappedDynamicFieldsForCompany?companyId=" + currentUser.companyId + "&documentId=" + documentComponentId);
|
|
2662
|
-
case 2:
|
|
2663
|
-
response = _context.sent;
|
|
2664
|
-
if (response != null) {
|
|
2665
|
-
setToColumnOptions(response.data);
|
|
2666
|
-
}
|
|
2667
|
-
case 4:
|
|
2668
|
-
case "end":
|
|
2669
|
-
return _context.stop();
|
|
2670
|
-
}
|
|
2671
|
-
}, _callee);
|
|
2672
|
-
}));
|
|
2673
|
-
return function fetchMappingTo() {
|
|
2674
|
-
return _ref2.apply(this, arguments);
|
|
2675
|
-
};
|
|
2676
|
-
}();
|
|
2677
|
-
var fetchMappingFrom = /*#__PURE__*/function () {
|
|
2678
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2679
|
-
var response;
|
|
2680
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2681
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
2682
|
-
case 0:
|
|
2683
|
-
_context2.next = 2;
|
|
2684
|
-
return apiService().post("/DocumentMapping/GetMapping", {
|
|
2685
|
-
documentComponentId: documentComponentId,
|
|
2686
|
-
companyId: currentUser.companyId
|
|
2687
|
-
});
|
|
2688
|
-
case 2:
|
|
2689
|
-
response = _context2.sent;
|
|
2690
|
-
if (response != null) {
|
|
2691
|
-
setFromColumnOptions(response.data.documentMappings);
|
|
2692
|
-
setDocumentName(response.data.name);
|
|
2693
|
-
setDocumentType(response.data.documentType);
|
|
2694
|
-
}
|
|
2695
|
-
case 4:
|
|
2696
|
-
case "end":
|
|
2697
|
-
return _context2.stop();
|
|
2698
|
-
}
|
|
2699
|
-
}, _callee2);
|
|
2700
|
-
}));
|
|
2701
|
-
return function fetchMappingFrom() {
|
|
2702
|
-
return _ref3.apply(this, arguments);
|
|
2703
|
-
};
|
|
2704
|
-
}();
|
|
2705
|
-
(0, _react.useEffect)(function () {
|
|
2706
|
-
if (documentComponentId != null) {
|
|
2707
|
-
if (setIsLoading != null) {
|
|
2708
|
-
setIsLoading(true);
|
|
2709
|
-
}
|
|
2710
|
-
setSpreadSheetAddress("/DocumentMappingPreview/PreviewMappedData?companyId=" + currentUser.companyId + "&documentComponentId=" + documentComponentId);
|
|
2711
|
-
var fetchData = /*#__PURE__*/function () {
|
|
2712
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
2713
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
2714
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
2715
|
-
case 0:
|
|
2716
|
-
_context3.next = 2;
|
|
2717
|
-
return fetchMappingFrom();
|
|
2718
|
-
case 2:
|
|
2719
|
-
_context3.next = 4;
|
|
2720
|
-
return fetchMappingTo();
|
|
2721
|
-
case 4:
|
|
2722
|
-
if (setIsLoading != null) {
|
|
2723
|
-
setIsLoading(false);
|
|
2724
|
-
}
|
|
2725
|
-
case 5:
|
|
2726
|
-
case "end":
|
|
2727
|
-
return _context3.stop();
|
|
2728
|
-
}
|
|
2729
|
-
}, _callee3);
|
|
2730
|
-
}));
|
|
2731
|
-
return function fetchData() {
|
|
2732
|
-
return _ref4.apply(this, arguments);
|
|
2733
|
-
};
|
|
2734
|
-
}();
|
|
2735
|
-
fetchData();
|
|
2736
|
-
}
|
|
2737
|
-
}, [documentComponentId]);
|
|
2738
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Container["default"], {
|
|
2739
|
-
maxWidth: "xl",
|
|
2740
|
-
sx: {
|
|
2741
|
-
marginTop: 2
|
|
2742
|
-
}
|
|
2743
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
2744
|
-
container: true,
|
|
2745
|
-
spacing: 2
|
|
2746
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
2747
|
-
item: true,
|
|
2748
|
-
xs: 6
|
|
2749
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
2750
|
-
sx: {
|
|
2751
|
-
position: "sticky",
|
|
2752
|
-
top: 20
|
|
2753
|
-
}
|
|
2754
|
-
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
2755
|
-
variant: "h4",
|
|
2756
|
-
gutterBottom: true,
|
|
2757
|
-
sx: {
|
|
2758
|
-
paddingBottom: 2
|
|
2759
|
-
}
|
|
2760
|
-
}, "File Uploaded: ", /*#__PURE__*/_react["default"].createElement("br", null), " ", documentName), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
2761
|
-
variant: "subtitle1",
|
|
2762
|
-
gutterBottom: true,
|
|
2763
|
-
sx: {
|
|
2764
|
-
paddingBottom: 2
|
|
2765
|
-
}
|
|
2766
|
-
}, "You have ", fromColumnOptions != null && fromColumnOptions.length, " columns that can be created or mapped"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
2767
|
-
variant: "outlined",
|
|
2768
|
-
sx: {
|
|
2769
|
-
marginRight: 2
|
|
2770
|
-
},
|
|
2771
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
2772
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2773
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
2774
|
-
case 0:
|
|
2775
|
-
if (onCancel != null) {
|
|
2776
|
-
onCancel();
|
|
2777
|
-
}
|
|
2778
|
-
case 1:
|
|
2779
|
-
case "end":
|
|
2780
|
-
return _context4.stop();
|
|
2781
|
-
}
|
|
2782
|
-
}, _callee4);
|
|
2783
|
-
}))
|
|
2784
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
2785
|
-
variant: "contained",
|
|
2786
|
-
endIcon: /*#__PURE__*/_react["default"].createElement(_ArrowRightAltRounded["default"], null),
|
|
2787
|
-
sx: {
|
|
2788
|
-
marginRight: 2
|
|
2789
|
-
},
|
|
2790
|
-
onClick: function onClick() {
|
|
2791
|
-
setShowPreviewDialog(true);
|
|
2792
|
-
}
|
|
2793
|
-
}, "Next, Preview your mapping"))), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
2794
|
-
item: true,
|
|
2795
|
-
xs: 5
|
|
2796
|
-
}, fromColumnOptions != null && fromColumnOptions.map(function (column) {
|
|
2797
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(MappedColumn, {
|
|
2798
|
-
companyId: currentUser.companyId,
|
|
2799
|
-
documentId: documentId,
|
|
2800
|
-
documentType: documentType,
|
|
2801
|
-
documentMappingId: column.id,
|
|
2802
|
-
name: column.name,
|
|
2803
|
-
toName: column.toName,
|
|
2804
|
-
isMapped: column.toName == null || column.toName == "" ? true : false,
|
|
2805
|
-
toOptions: toColumnOptions,
|
|
2806
|
-
onResponse: function onResponse() {
|
|
2807
|
-
fetchMappingFrom();
|
|
2808
|
-
fetchMappingTo();
|
|
2809
|
-
}
|
|
2810
|
-
}));
|
|
2811
|
-
})))), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
2812
|
-
open: showPreviewDialog,
|
|
2813
|
-
onClose: function onClose() {
|
|
2814
|
-
setShowPreviewDialog(false);
|
|
2815
|
-
},
|
|
2816
|
-
fullWidth: true,
|
|
2817
|
-
maxWidth: "xl",
|
|
2818
|
-
"aria-labelledby": "alert-dialog-title",
|
|
2819
|
-
"aria-describedby": "alert-dialog-description"
|
|
2820
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
2821
|
-
id: "alert-dialog-title",
|
|
2822
|
-
sx: {
|
|
2823
|
-
fontSize: "25px",
|
|
2824
|
-
paddingTop: 4
|
|
2825
|
-
}
|
|
2826
|
-
}, "Preview your mapping"), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
2827
|
-
sx: {
|
|
2828
|
-
paddingLeft: 3
|
|
2829
|
-
}
|
|
2830
|
-
}, "Ensure that the data uploaded is accurately mapped and all (Required) fields are completed."), /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
2831
|
-
"aria-label": "close",
|
|
2832
|
-
onClick: function onClick() {
|
|
2833
|
-
setShowPreviewDialog(false);
|
|
2834
|
-
},
|
|
2835
|
-
sx: {
|
|
2836
|
-
position: 'absolute',
|
|
2837
|
-
right: 8,
|
|
2838
|
-
top: 8,
|
|
2839
|
-
color: function color(theme) {
|
|
2840
|
-
return theme.palette.grey[500];
|
|
2841
|
-
}
|
|
2842
|
-
}
|
|
2843
|
-
}, /*#__PURE__*/_react["default"].createElement(_Close["default"], null)), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
2844
|
-
sx: {
|
|
2845
|
-
paddingBottom: 1
|
|
2846
|
-
}
|
|
2847
|
-
}, /*#__PURE__*/_react["default"].createElement(ConditionBasedTool, {
|
|
2848
|
-
toColumnOptions: toColumnOptions,
|
|
2849
|
-
documentId: documentId,
|
|
2850
|
-
onConditionApplied: function onConditionApplied(currentQuery) {
|
|
2851
|
-
var incrementNum = urlTick + 1;
|
|
2852
|
-
setURLTick(incrementNum);
|
|
2853
|
-
setAdvanceQuery(currentQuery);
|
|
2854
|
-
|
|
2855
|
-
// setSpreadSheetAddress("/DocumentMappingPreview/PreviewMappedData?companyId=" + currentUser.companyId + "&documentComponentId=" + documentComponentId + "&tick=" + incrementNum);
|
|
2856
|
-
}
|
|
2857
|
-
})), spreadSheetAddress != null && /*#__PURE__*/_react["default"].createElement(SpreadsheetViewer, {
|
|
2858
|
-
ref: spreadSheetRef,
|
|
2859
|
-
url: spreadSheetAddress,
|
|
2860
|
-
advanceQuery: advanceQuery,
|
|
2861
|
-
currentUser: currentUser,
|
|
2862
|
-
hideToolbar: true,
|
|
2863
|
-
loadedUser: true
|
|
2864
|
-
})), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
2865
|
-
onClick: function onClick() {
|
|
2866
|
-
setShowPreviewDialog(false);
|
|
2867
|
-
}
|
|
2868
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
2869
|
-
variant: "contained",
|
|
2870
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
2871
|
-
var publishedRows, response;
|
|
2872
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
2873
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
2874
|
-
case 0:
|
|
2875
|
-
if (setIsLoading != null) {
|
|
2876
|
-
setIsLoading(true);
|
|
2877
|
-
}
|
|
2878
|
-
publishedRows = spreadSheetRef.current.getRows();
|
|
2879
|
-
_context5.next = 4;
|
|
2880
|
-
return apiService().post("/DocumentMapping/Publish", {
|
|
2881
|
-
companyId: currentUser.companyId,
|
|
2882
|
-
documentId: documentId,
|
|
2883
|
-
publishedRows: publishedRows
|
|
2884
|
-
});
|
|
2885
|
-
case 4:
|
|
2886
|
-
response = _context5.sent;
|
|
2887
|
-
if (response != null && response.status == 200) {
|
|
2888
|
-
setShowPreviewDialog(false);
|
|
2889
|
-
if (onPublished != null) {
|
|
2890
|
-
onPublished();
|
|
2891
|
-
}
|
|
2892
|
-
} else {
|
|
2893
|
-
alert(JSON.stringify(response.data));
|
|
2894
|
-
}
|
|
2895
|
-
if (setIsLoading != null) {
|
|
2896
|
-
setIsLoading(false);
|
|
2897
|
-
}
|
|
2898
|
-
case 7:
|
|
2899
|
-
case "end":
|
|
2900
|
-
return _context5.stop();
|
|
2901
|
-
}
|
|
2902
|
-
}, _callee5);
|
|
2903
|
-
}))
|
|
2904
|
-
}, "Publish"))));
|
|
2905
|
-
}
|
|
2906
|
-
"use strict";
|
|
2907
|
-
|
|
2908
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2909
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2910
|
-
value: true
|
|
2911
|
-
});
|
|
2912
|
-
exports.ConditionBasedTool = ConditionBasedTool;
|
|
2913
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
2914
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
2915
|
-
var _system = require("@mui/system");
|
|
2916
|
-
var _Accordion = _interopRequireDefault(require("@mui/material/Accordion"));
|
|
2917
|
-
var _AccordionSummary = _interopRequireDefault(require("@mui/material/AccordionSummary"));
|
|
2918
|
-
var _AccordionDetails = _interopRequireDefault(require("@mui/material/AccordionDetails"));
|
|
2919
|
-
var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
|
|
2920
|
-
var _reactQuerybuilder = require("react-querybuilder");
|
|
2921
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
2922
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
2923
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
2924
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2925
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2926
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2927
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2928
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2929
|
-
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); }
|
|
2930
|
-
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; }
|
|
2931
|
-
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; } }
|
|
2932
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { apiService, FileUploader} from 'authscape';
|
|
2933
|
-
function ConditionBasedTool(_ref) {
|
|
2934
|
-
var toColumnOptions = _ref.toColumnOptions,
|
|
2935
|
-
documentId = _ref.documentId,
|
|
2936
|
-
onConditionApplied = _ref.onConditionApplied;
|
|
2937
|
-
var _useState = (0, _react.useState)(null),
|
|
2938
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2939
|
-
currentQuery = _useState2[0],
|
|
2940
|
-
setCurrentQuery = _useState2[1];
|
|
2941
|
-
|
|
2942
|
-
// const fields = [
|
|
2943
|
-
// { name: 'firstName', label: 'First Name' },
|
|
2944
|
-
// { name: 'lastName', label: 'Last Name' }
|
|
2945
|
-
// ];
|
|
2946
|
-
|
|
2947
|
-
(0, _react.useEffect)(function () {
|
|
2948
|
-
if (documentId != null) {
|
|
2949
|
-
var fetchData = /*#__PURE__*/function () {
|
|
2950
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2951
|
-
var response;
|
|
2952
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2953
|
-
while (1) switch (_context.prev = _context.next) {
|
|
2954
|
-
case 0:
|
|
2955
|
-
_context.next = 2;
|
|
2956
|
-
return apiService().get("/DocumentMapping/GetRules?documentComponentId=" + documentId);
|
|
2957
|
-
case 2:
|
|
2958
|
-
response = _context.sent;
|
|
2959
|
-
if (response != null && response.status == 200) {
|
|
2960
|
-
if (response.data != null && response.data != "") {
|
|
2961
|
-
setCurrentQuery(response.data);
|
|
2962
|
-
} else {
|
|
2963
|
-
setCurrentQuery(null);
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
case 4:
|
|
2967
|
-
case "end":
|
|
2968
|
-
return _context.stop();
|
|
2969
|
-
}
|
|
2970
|
-
}, _callee);
|
|
2971
|
-
}));
|
|
2972
|
-
return function fetchData() {
|
|
2973
|
-
return _ref2.apply(this, arguments);
|
|
2974
|
-
};
|
|
2975
|
-
}();
|
|
2976
|
-
fetchData();
|
|
2977
|
-
}
|
|
2978
|
-
}, [documentId]);
|
|
2979
|
-
var getFields = function getFields() {
|
|
2980
|
-
var fields = [];
|
|
2981
|
-
for (var index = 0; index < toColumnOptions.length; index++) {
|
|
2982
|
-
var toColumn = toColumnOptions[index];
|
|
2983
|
-
if (toColumn.isMapped)
|
|
2984
|
-
// only show filters that are mapped
|
|
2985
|
-
{
|
|
2986
|
-
fields.push({
|
|
2987
|
-
name: toColumn.name,
|
|
2988
|
-
label: toColumn.visibleName
|
|
2989
|
-
});
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
return fields;
|
|
2993
|
-
};
|
|
2994
|
-
var customOperators = [{
|
|
2995
|
-
name: 'contains',
|
|
2996
|
-
label: 'Contains'
|
|
2997
|
-
}, {
|
|
2998
|
-
name: 'notContains',
|
|
2999
|
-
label: 'Does not contain'
|
|
3000
|
-
}];
|
|
3001
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Accordion["default"], null, /*#__PURE__*/_react["default"].createElement(_AccordionSummary["default"], {
|
|
3002
|
-
expandIcon: /*#__PURE__*/_react["default"].createElement(_ExpandMore["default"], null),
|
|
3003
|
-
"aria-controls": "panel1-content",
|
|
3004
|
-
id: "panel1-header"
|
|
3005
|
-
}, "Advance filtering"), /*#__PURE__*/_react["default"].createElement(_AccordionDetails["default"], null, /*#__PURE__*/_react["default"].createElement(_reactQuerybuilder.QueryBuilder, {
|
|
3006
|
-
fields: getFields(),
|
|
3007
|
-
operators: customOperators,
|
|
3008
|
-
query: currentQuery,
|
|
3009
|
-
onQueryChange: setCurrentQuery
|
|
3010
|
-
}), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3011
|
-
variant: "contained",
|
|
3012
|
-
sx: {
|
|
3013
|
-
marginTop: 1
|
|
3014
|
-
},
|
|
3015
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
3016
|
-
var response;
|
|
3017
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3018
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
3019
|
-
case 0:
|
|
3020
|
-
_context2.next = 2;
|
|
3021
|
-
return apiService().put("/DocumentMapping/ApplyFilterForViewer", {
|
|
3022
|
-
documentComponentId: documentId,
|
|
3023
|
-
rules: JSON.stringify(currentQuery)
|
|
3024
|
-
});
|
|
3025
|
-
case 2:
|
|
3026
|
-
response = _context2.sent;
|
|
3027
|
-
if (response != null && response.status == 200) {
|
|
3028
|
-
onConditionApplied(currentQuery);
|
|
3029
|
-
}
|
|
3030
|
-
case 4:
|
|
3031
|
-
case "end":
|
|
3032
|
-
return _context2.stop();
|
|
3033
|
-
}
|
|
3034
|
-
}, _callee2);
|
|
3035
|
-
}))
|
|
3036
|
-
}, "Apply Filter")))));
|
|
3037
|
-
}
|
|
3038
|
-
"use strict";
|
|
3039
|
-
|
|
3040
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3041
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3042
|
-
value: true
|
|
3043
|
-
});
|
|
3044
|
-
exports.Datasources = Datasources;
|
|
3045
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
3046
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
3047
|
-
var _system = require("@mui/system");
|
|
3048
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
3049
|
-
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
3050
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
3051
|
-
var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
3052
|
-
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
3053
|
-
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
3054
|
-
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
3055
|
-
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
3056
|
-
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
3057
|
-
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
3058
|
-
var _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
3059
|
-
var _RadioGroup = _interopRequireDefault(require("@mui/material/RadioGroup"));
|
|
3060
|
-
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
3061
|
-
var _FormLabel = _interopRequireDefault(require("@mui/material/FormLabel"));
|
|
3062
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
3063
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
3064
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
3065
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3066
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
3067
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3068
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3069
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3070
|
-
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); }
|
|
3071
|
-
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; }
|
|
3072
|
-
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; } }
|
|
3073
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import {apiService, authService, StripeConnect, ReactDraft, EditableDatagrid, FileUploader} from 'authscape';
|
|
3074
|
-
function Datasources(_ref) {
|
|
3075
|
-
var _ref$disableTraining = _ref.disableTraining,
|
|
3076
|
-
disableTraining = _ref$disableTraining === void 0 ? false : _ref$disableTraining;
|
|
3077
|
-
var documentColumns = [{
|
|
3078
|
-
field: 'name',
|
|
3079
|
-
headerName: 'Name',
|
|
3080
|
-
width: 150,
|
|
3081
|
-
editable: false
|
|
3082
|
-
}, {
|
|
3083
|
-
field: "type",
|
|
3084
|
-
type: "actions",
|
|
3085
|
-
width: 200,
|
|
3086
|
-
flex: 1,
|
|
3087
|
-
headerName: "Data Source",
|
|
3088
|
-
getActions: function getActions(_ref2) {
|
|
3089
|
-
var id = _ref2.id,
|
|
3090
|
-
row = _ref2.row;
|
|
3091
|
-
return [/*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3092
|
-
sx: {
|
|
3093
|
-
textAlign: "left"
|
|
3094
|
-
}
|
|
3095
|
-
}, row.type == 0 ? "Database" : "", row.type == 1 ? "Dynamic Mapping" : "", row.type == 2 ? "Custom Model" : "")];
|
|
3096
|
-
}
|
|
3097
|
-
}, {
|
|
3098
|
-
field: "Detail",
|
|
3099
|
-
type: "actions",
|
|
3100
|
-
width: 200,
|
|
3101
|
-
flex: 1,
|
|
3102
|
-
headerName: "Mapping To",
|
|
3103
|
-
getActions: function getActions(_ref3) {
|
|
3104
|
-
var id = _ref3.id,
|
|
3105
|
-
row = _ref3.row;
|
|
3106
|
-
return [/*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3107
|
-
sx: {
|
|
3108
|
-
textAlign: "left"
|
|
3109
|
-
}
|
|
3110
|
-
}, row.type == 0 ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "Table: ", row.tableName) : "", row.type == 1 ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "Database driven mapping") : "", row.type == 2 ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "Type Name: ", row.typeName, /*#__PURE__*/_react["default"].createElement("br", null), " Assembly Fullname: ", row.assemblyFullName) : "")];
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
// {
|
|
3114
|
-
// field: "actions",
|
|
3115
|
-
// type: "actions",
|
|
3116
|
-
// width: 200,
|
|
3117
|
-
// headerName: "Archive",
|
|
3118
|
-
// cellClassName: "actions",
|
|
3119
|
-
// getActions: ({ id, row }) => {
|
|
3120
|
-
// return [
|
|
3121
|
-
// <GridActionsCellItem key={id}
|
|
3122
|
-
// icon={<DeleteRoundedIcon />}
|
|
3123
|
-
// label="Archive"
|
|
3124
|
-
// className="textPrimary"
|
|
3125
|
-
// onClick={async () => {
|
|
3126
|
-
|
|
3127
|
-
// let documentMappingId = "";
|
|
3128
|
-
// let documentComponentId = "";
|
|
3129
|
-
|
|
3130
|
-
// // archive the column
|
|
3131
|
-
// await apiService().delete("/DocumentMapping/RemoveColumnFromDocumentComponent?documentMappingId=" + documentMappingId + "&documentComponentId=" + documentComponentId)
|
|
3132
|
-
|
|
3133
|
-
// }}
|
|
3134
|
-
// />,
|
|
3135
|
-
// ];
|
|
3136
|
-
// },
|
|
3137
|
-
// }
|
|
3138
|
-
];
|
|
3139
|
-
|
|
3140
|
-
var refDatabaseTableSelect = (0, _react.useRef)(null);
|
|
3141
|
-
var refNewDocTypeName = (0, _react.useRef)(null);
|
|
3142
|
-
var _useState = (0, _react.useState)(0),
|
|
3143
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3144
|
-
dataGridRefreshKey = _useState2[0],
|
|
3145
|
-
setDataGridRefreshKey = _useState2[1];
|
|
3146
|
-
var _useState3 = (0, _react.useState)(null),
|
|
3147
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
3148
|
-
document = _useState4[0],
|
|
3149
|
-
setDocument = _useState4[1];
|
|
3150
|
-
var _useState5 = (0, _react.useState)(false),
|
|
3151
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
3152
|
-
showDatasource = _useState6[0],
|
|
3153
|
-
setShowDatasource = _useState6[1];
|
|
3154
|
-
var _useState7 = (0, _react.useState)(null),
|
|
3155
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
3156
|
-
databaseTables = _useState8[0],
|
|
3157
|
-
setDatabaseTables = _useState8[1];
|
|
3158
|
-
var _useState9 = (0, _react.useState)("database"),
|
|
3159
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
3160
|
-
mappingType = _useState10[0],
|
|
3161
|
-
setMappingType = _useState10[1];
|
|
3162
|
-
var refTypeName = (0, _react.useRef)(null);
|
|
3163
|
-
var refAssemblyFullName = (0, _react.useRef)(null);
|
|
3164
|
-
(0, _react.useEffect)(function () {
|
|
3165
|
-
var fetchData = /*#__PURE__*/function () {
|
|
3166
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3167
|
-
var response;
|
|
3168
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3169
|
-
while (1) switch (_context.prev = _context.next) {
|
|
3170
|
-
case 0:
|
|
3171
|
-
_context.next = 2;
|
|
3172
|
-
return apiService().get("/DocumentMapping/GetTablesFromDatabase");
|
|
3173
|
-
case 2:
|
|
3174
|
-
response = _context.sent;
|
|
3175
|
-
if (response != null && response.status == 200) {
|
|
3176
|
-
setDatabaseTables(response.data);
|
|
3177
|
-
}
|
|
3178
|
-
case 4:
|
|
3179
|
-
case "end":
|
|
3180
|
-
return _context.stop();
|
|
3181
|
-
}
|
|
3182
|
-
}, _callee);
|
|
3183
|
-
}));
|
|
3184
|
-
return function fetchData() {
|
|
3185
|
-
return _ref4.apply(this, arguments);
|
|
3186
|
-
};
|
|
3187
|
-
}();
|
|
3188
|
-
fetchData();
|
|
3189
|
-
}, []);
|
|
3190
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3191
|
-
sx: {
|
|
3192
|
-
marginTop: 6
|
|
3193
|
-
}
|
|
3194
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, null, !disableTraining && /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3195
|
-
sx: {
|
|
3196
|
-
textAlign: "right",
|
|
3197
|
-
marginBottom: 2
|
|
3198
|
-
}
|
|
3199
|
-
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3200
|
-
variant: "contained",
|
|
3201
|
-
onClick: function onClick() {
|
|
3202
|
-
setShowDatasource(true);
|
|
3203
|
-
}
|
|
3204
|
-
}, "Add Data Source")), /*#__PURE__*/_react["default"].createElement(EditableDatagrid, {
|
|
3205
|
-
key: dataGridRefreshKey,
|
|
3206
|
-
loadedUser: true,
|
|
3207
|
-
url: "/DocumentMapping/GetDocumentTypes",
|
|
3208
|
-
columns: documentColumns
|
|
3209
|
-
})), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
3210
|
-
open: showDatasource,
|
|
3211
|
-
onClose: function onClose() {
|
|
3212
|
-
setShowDatasource(false);
|
|
3213
|
-
},
|
|
3214
|
-
"aria-labelledby": "alert-dialog-title",
|
|
3215
|
-
"aria-describedby": "alert-dialog-description"
|
|
3216
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
3217
|
-
id: "alert-dialog-title"
|
|
3218
|
-
}, "Data Source"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
3219
|
-
id: "alert-dialog-description"
|
|
3220
|
-
}, "A data source is a place or system where data is stored and collected. It can be a database, file, web service, or sensor. Data is extracted, transformed, and used for analysis and other purposes. Managing data sources is crucial for data-driven decision-making."), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3221
|
-
sx: {
|
|
3222
|
-
marginTop: 3
|
|
3223
|
-
}
|
|
3224
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
3225
|
-
inputRef: refNewDocTypeName,
|
|
3226
|
-
label: "Name for data source",
|
|
3227
|
-
variant: "outlined",
|
|
3228
|
-
fullWidth: true
|
|
3229
|
-
})), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3230
|
-
sx: {
|
|
3231
|
-
marginTop: 2
|
|
3232
|
-
}
|
|
3233
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], null, /*#__PURE__*/_react["default"].createElement(_FormLabel["default"], {
|
|
3234
|
-
id: "demo-row-radio-buttons-group-label"
|
|
3235
|
-
}, "How the data will connect:"), /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
3236
|
-
value: mappingType,
|
|
3237
|
-
row: true,
|
|
3238
|
-
"aria-labelledby": "demo-row-radio-buttons-group-label",
|
|
3239
|
-
name: "row-radio-buttons-group",
|
|
3240
|
-
onChange: function onChange(env) {
|
|
3241
|
-
setMappingType(env.currentTarget.value);
|
|
3242
|
-
}
|
|
3243
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
|
|
3244
|
-
value: "database",
|
|
3245
|
-
control: /*#__PURE__*/_react["default"].createElement(_Radio["default"], null),
|
|
3246
|
-
label: "Database"
|
|
3247
|
-
}), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
|
|
3248
|
-
value: "mappingTable",
|
|
3249
|
-
control: /*#__PURE__*/_react["default"].createElement(_Radio["default"], null),
|
|
3250
|
-
label: "Dynamic Mapping Table"
|
|
3251
|
-
}), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
|
|
3252
|
-
value: "customModelMapping",
|
|
3253
|
-
control: /*#__PURE__*/_react["default"].createElement(_Radio["default"], null),
|
|
3254
|
-
label: "Custom Model"
|
|
3255
|
-
})))), mappingType == "database" && /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3256
|
-
sx: {
|
|
3257
|
-
marginTop: 2
|
|
3258
|
-
}
|
|
3259
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3260
|
-
sx: {
|
|
3261
|
-
minWidth: 120
|
|
3262
|
-
}
|
|
3263
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
3264
|
-
fullWidth: true
|
|
3265
|
-
}, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
|
|
3266
|
-
id: "demo-simple-select-label"
|
|
3267
|
-
}, "Database Tables"), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
3268
|
-
inputRef: refDatabaseTableSelect,
|
|
3269
|
-
labelId: "demo-simple-select-label",
|
|
3270
|
-
label: "Age"
|
|
3271
|
-
}, databaseTables != null && databaseTables.map(function (table, index) {
|
|
3272
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
3273
|
-
value: table.tableName
|
|
3274
|
-
}, table.tableName);
|
|
3275
|
-
}))))), mappingType == "customModelMapping" && /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3276
|
-
sx: {
|
|
3277
|
-
marginTop: 2
|
|
3278
|
-
}
|
|
3279
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3280
|
-
sx: {
|
|
3281
|
-
minWidth: 120
|
|
3282
|
-
}
|
|
3283
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
3284
|
-
inputRef: refTypeName,
|
|
3285
|
-
label: "Type Name (Example: API.Controllers.InvoiceUpload)",
|
|
3286
|
-
variant: "outlined",
|
|
3287
|
-
fullWidth: true,
|
|
3288
|
-
sx: {
|
|
3289
|
-
marginTop: 1
|
|
3290
|
-
}
|
|
3291
|
-
}), /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
3292
|
-
inputRef: refAssemblyFullName,
|
|
3293
|
-
label: "Assembly Full Name (Example: API)",
|
|
3294
|
-
variant: "outlined",
|
|
3295
|
-
fullWidth: true,
|
|
3296
|
-
sx: {
|
|
3297
|
-
marginTop: 1
|
|
3298
|
-
}
|
|
3299
|
-
})))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3300
|
-
onClick: function onClick() {
|
|
3301
|
-
setShowDatasource(false);
|
|
3302
|
-
}
|
|
3303
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3304
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
3305
|
-
var response, _response;
|
|
3306
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3307
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
3308
|
-
case 0:
|
|
3309
|
-
if (!(mappingType == "customModelMapping")) {
|
|
3310
|
-
_context2.next = 7;
|
|
3311
|
-
break;
|
|
3312
|
-
}
|
|
3313
|
-
_context2.next = 3;
|
|
3314
|
-
return apiService().post("/DocumentMapping/AddDataSource", {
|
|
3315
|
-
name: refNewDocTypeName.current.value,
|
|
3316
|
-
dataTable: refNewDocTypeName.current.value,
|
|
3317
|
-
documentType: 2,
|
|
3318
|
-
typeName: refTypeName.current.value,
|
|
3319
|
-
assemblyFullName: refAssemblyFullName.current.value
|
|
3320
|
-
});
|
|
3321
|
-
case 3:
|
|
3322
|
-
response = _context2.sent;
|
|
3323
|
-
if (response != null && response.data.error != null) {
|
|
3324
|
-
alert(response.data.error);
|
|
3325
|
-
} else {
|
|
3326
|
-
if (response != null && (response.status == 204 || response.status == 200)) {
|
|
3327
|
-
setDataGridRefreshKey(dataGridRefreshKey + 1);
|
|
3328
|
-
setShowDatasource(false);
|
|
3329
|
-
}
|
|
3330
|
-
}
|
|
3331
|
-
_context2.next = 11;
|
|
3332
|
-
break;
|
|
3333
|
-
case 7:
|
|
3334
|
-
_context2.next = 9;
|
|
3335
|
-
return apiService().post("/DocumentMapping/AddDataSource", {
|
|
3336
|
-
name: refNewDocTypeName.current.value,
|
|
3337
|
-
dataTable: refDatabaseTableSelect.current != null ? refDatabaseTableSelect.current.value : "",
|
|
3338
|
-
documentType: mappingType == "database" ? 0 : 1
|
|
3339
|
-
});
|
|
3340
|
-
case 9:
|
|
3341
|
-
_response = _context2.sent;
|
|
3342
|
-
if (_response != null && (_response.status == 204 || _response.status == 200)) {
|
|
3343
|
-
setDataGridRefreshKey(dataGridRefreshKey + 1);
|
|
3344
|
-
setShowDatasource(false);
|
|
3345
|
-
}
|
|
3346
|
-
case 11:
|
|
3347
|
-
case "end":
|
|
3348
|
-
return _context2.stop();
|
|
3349
|
-
}
|
|
3350
|
-
}, _callee2);
|
|
3351
|
-
}))
|
|
3352
|
-
}, "Add Data Source"))));
|
|
3353
|
-
}
|
|
3354
|
-
"use strict";
|
|
3355
|
-
|
|
3356
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3357
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3358
|
-
value: true
|
|
3359
|
-
});
|
|
3360
|
-
exports.FileMapping = FileMapping;
|
|
3361
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
3362
|
-
var _system = require("@mui/system");
|
|
3363
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
3364
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
3365
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3366
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3367
|
-
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); }
|
|
3368
|
-
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; }
|
|
3369
|
-
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; } }
|
|
3370
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3371
|
-
// import ManageMappingDocuments from './manageMappingDocuments';
|
|
3372
|
-
// import AssignMapping from './AssignMapping';
|
|
3373
|
-
|
|
3374
|
-
function FileMapping(_ref) {
|
|
3375
|
-
var currentUser = _ref.currentUser,
|
|
3376
|
-
_ref$fileUploadName = _ref.fileUploadName,
|
|
3377
|
-
fileUploadName = _ref$fileUploadName === void 0 ? "Upload Document" : _ref$fileUploadName,
|
|
3378
|
-
_ref$hideDocumentMana = _ref.hideDocumentManager,
|
|
3379
|
-
hideDocumentManager = _ref$hideDocumentMana === void 0 ? false : _ref$hideDocumentMana,
|
|
3380
|
-
_ref$setIsLoading = _ref.setIsLoading,
|
|
3381
|
-
setIsLoading = _ref$setIsLoading === void 0 ? null : _ref$setIsLoading,
|
|
3382
|
-
_ref$documentTypeId = _ref.documentTypeId,
|
|
3383
|
-
documentTypeId = _ref$documentTypeId === void 0 ? null : _ref$documentTypeId,
|
|
3384
|
-
_ref$onOpened = _ref.onOpened,
|
|
3385
|
-
onOpened = _ref$onOpened === void 0 ? null : _ref$onOpened,
|
|
3386
|
-
_ref$onPublished = _ref.onPublished,
|
|
3387
|
-
_onPublished = _ref$onPublished === void 0 ? null : _ref$onPublished,
|
|
3388
|
-
_ref$onCanceled = _ref.onCanceled,
|
|
3389
|
-
onCanceled = _ref$onCanceled === void 0 ? null : _ref$onCanceled,
|
|
3390
|
-
_ref$onArchived = _ref.onArchived,
|
|
3391
|
-
onArchived = _ref$onArchived === void 0 ? null : _ref$onArchived;
|
|
3392
|
-
var _useState = (0, _react.useState)(null),
|
|
3393
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3394
|
-
documentComponentId = _useState2[0],
|
|
3395
|
-
setDocumentComponentId = _useState2[1];
|
|
3396
|
-
(0, _react.useEffect)(function () {
|
|
3397
|
-
if (documentComponentId != null) {
|
|
3398
|
-
if (onOpened != null) {
|
|
3399
|
-
onOpened(documentComponentId);
|
|
3400
|
-
}
|
|
3401
|
-
}
|
|
3402
|
-
}, [documentComponentId]);
|
|
3403
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, documentComponentId == null && /*#__PURE__*/_react["default"].createElement(ManageMappingDocuments, {
|
|
3404
|
-
fileUploadName: fileUploadName,
|
|
3405
|
-
documentTypeId: documentTypeId,
|
|
3406
|
-
hideDocumentManager: hideDocumentManager,
|
|
3407
|
-
companyId: currentUser != null ? currentUser.companyId : null,
|
|
3408
|
-
onManageField: function onManageField(documentComponentId) {
|
|
3409
|
-
setDocumentComponentId(documentComponentId);
|
|
3410
|
-
},
|
|
3411
|
-
onArchive: function onArchive(documentComponentId) {
|
|
3412
|
-
//alert(documentComponentId);
|
|
3413
|
-
if (onArchived != null) {
|
|
3414
|
-
onArchived(documentComponentId);
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
|
-
}), documentComponentId != null && /*#__PURE__*/_react["default"].createElement(AssignMapping, {
|
|
3418
|
-
currentUser: currentUser,
|
|
3419
|
-
setIsLoading: setIsLoading,
|
|
3420
|
-
documentComponentId: documentComponentId,
|
|
3421
|
-
onCancel: function onCancel() {
|
|
3422
|
-
setDocumentComponentId(null);
|
|
3423
|
-
if (onCanceled != null) {
|
|
3424
|
-
onCanceled(documentComponentId);
|
|
3425
|
-
}
|
|
3426
|
-
},
|
|
3427
|
-
onPublished: function onPublished() {
|
|
3428
|
-
setDocumentComponentId(null);
|
|
3429
|
-
if (_onPublished != null) {
|
|
3430
|
-
_onPublished(documentComponentId);
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
}));
|
|
3434
|
-
}
|
|
3435
|
-
"use strict";
|
|
3436
|
-
|
|
3437
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3438
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3439
|
-
value: true
|
|
3440
|
-
});
|
|
3441
|
-
exports.ManageMappingDocuments = ManageMappingDocuments;
|
|
3442
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
3443
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
3444
|
-
var _system = require("@mui/system");
|
|
3445
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
3446
|
-
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
3447
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
3448
|
-
var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
3449
|
-
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
3450
|
-
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
3451
|
-
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
3452
|
-
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
3453
|
-
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
3454
|
-
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
3455
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
3456
|
-
var _DeleteRounded = _interopRequireDefault(require("@mui/icons-material/DeleteRounded"));
|
|
3457
|
-
var _ListRounded = _interopRequireDefault(require("@mui/icons-material/ListRounded"));
|
|
3458
|
-
var _PublishRounded = _interopRequireDefault(require("@mui/icons-material/PublishRounded"));
|
|
3459
|
-
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
3460
|
-
var _DownloadRounded = _interopRequireDefault(require("@mui/icons-material/DownloadRounded"));
|
|
3461
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
3462
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
3463
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
3464
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3465
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
3466
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3467
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3468
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3469
|
-
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); }
|
|
3470
|
-
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; }
|
|
3471
|
-
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; } }
|
|
3472
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import {apiService, authService, StripeConnect, ReactDraft, EditableDatagrid, FileUploader} from 'authscape';
|
|
3473
|
-
function ManageMappingDocuments(_ref) {
|
|
3474
|
-
var fileUploadName = _ref.fileUploadName,
|
|
3475
|
-
_ref$hideDocumentMana = _ref.hideDocumentManager,
|
|
3476
|
-
hideDocumentManager = _ref$hideDocumentMana === void 0 ? false : _ref$hideDocumentMana,
|
|
3477
|
-
_ref$documentTypeId = _ref.documentTypeId,
|
|
3478
|
-
documentTypeId = _ref$documentTypeId === void 0 ? null : _ref$documentTypeId,
|
|
3479
|
-
_ref$companyId = _ref.companyId,
|
|
3480
|
-
companyId = _ref$companyId === void 0 ? null : _ref$companyId,
|
|
3481
|
-
_ref$locationId = _ref.locationId,
|
|
3482
|
-
locationId = _ref$locationId === void 0 ? null : _ref$locationId,
|
|
3483
|
-
_ref$userId = _ref.userId,
|
|
3484
|
-
userId = _ref$userId === void 0 ? null : _ref$userId,
|
|
3485
|
-
_ref$onManageField = _ref.onManageField,
|
|
3486
|
-
onManageField = _ref$onManageField === void 0 ? null : _ref$onManageField,
|
|
3487
|
-
_ref$onArchive = _ref.onArchive,
|
|
3488
|
-
onArchive = _ref$onArchive === void 0 ? null : _ref$onArchive;
|
|
3489
|
-
var _useState = (0, _react.useState)(null),
|
|
3490
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3491
|
-
document = _useState2[0],
|
|
3492
|
-
setDocument = _useState2[1];
|
|
3493
|
-
var _useState3 = (0, _react.useState)(false),
|
|
3494
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
3495
|
-
addColumnDialog = _useState4[0],
|
|
3496
|
-
setAddColumnDialog = _useState4[1];
|
|
3497
|
-
var _useState5 = (0, _react.useState)(false),
|
|
3498
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
3499
|
-
showAddNewDocument = _useState6[0],
|
|
3500
|
-
setShowAddNewDocument = _useState6[1];
|
|
3501
|
-
var _useState7 = (0, _react.useState)(false),
|
|
3502
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
3503
|
-
showTrainingDocument = _useState8[0],
|
|
3504
|
-
setShowTrainingDocument = _useState8[1];
|
|
3505
|
-
var _useState9 = (0, _react.useState)(''),
|
|
3506
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
3507
|
-
columnName = _useState10[0],
|
|
3508
|
-
setColumnName = _useState10[1];
|
|
3509
|
-
var _useState11 = (0, _react.useState)(null),
|
|
3510
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
3511
|
-
selectedAddedColumn = _useState12[0],
|
|
3512
|
-
setSelectedAddedColumn = _useState12[1];
|
|
3513
|
-
var _useState13 = (0, _react.useState)(null),
|
|
3514
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
3515
|
-
documentMappingColumns = _useState14[0],
|
|
3516
|
-
setDocumentMappingColumns = _useState14[1];
|
|
3517
|
-
var _useState15 = (0, _react.useState)(null),
|
|
3518
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
3519
|
-
toColumnOptions = _useState16[0],
|
|
3520
|
-
setToColumnOptions = _useState16[1];
|
|
3521
|
-
var _useState17 = (0, _react.useState)(null),
|
|
3522
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
3523
|
-
removeDocument = _useState18[0],
|
|
3524
|
-
setRemoveDocument = _useState18[1];
|
|
3525
|
-
var _useState19 = (0, _react.useState)(null),
|
|
3526
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
3527
|
-
selectedDocumentComponentId = _useState20[0],
|
|
3528
|
-
setSelectedDocumentComponentId = _useState20[1];
|
|
3529
|
-
var _useState21 = (0, _react.useState)(0),
|
|
3530
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
3531
|
-
dataGridRefreshKey = _useState22[0],
|
|
3532
|
-
setDataGridRefreshKey = _useState22[1];
|
|
3533
|
-
var _useState23 = (0, _react.useState)(0),
|
|
3534
|
-
_useState24 = _slicedToArray(_useState23, 2),
|
|
3535
|
-
dataGridMappingRefreshKey = _useState24[0],
|
|
3536
|
-
setDataGridMappingRefreshKey = _useState24[1];
|
|
3537
|
-
var _useState25 = (0, _react.useState)(null),
|
|
3538
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
3539
|
-
selectedDocument = _useState26[0],
|
|
3540
|
-
setSelectedDocument = _useState26[1];
|
|
3541
|
-
var _useState27 = (0, _react.useState)(0),
|
|
3542
|
-
_useState28 = _slicedToArray(_useState27, 2),
|
|
3543
|
-
status = _useState28[0],
|
|
3544
|
-
setStatus = _useState28[1];
|
|
3545
|
-
var _useState29 = (0, _react.useState)([]),
|
|
3546
|
-
_useState30 = _slicedToArray(_useState29, 2),
|
|
3547
|
-
componentTypes = _useState30[0],
|
|
3548
|
-
setComponentTypes = _useState30[1];
|
|
3549
|
-
var refHeaderRowInput = (0, _react.useRef)(null);
|
|
3550
|
-
var fileUploaderRef = (0, _react.useRef)(null);
|
|
3551
|
-
var refNewDocumentName = (0, _react.useRef)(null);
|
|
3552
|
-
var refSelectDocumentType = (0, _react.useRef)(null);
|
|
3553
|
-
var refNewColumnFileColumn = (0, _react.useRef)(null);
|
|
3554
|
-
var documentColumns = [{
|
|
3555
|
-
field: 'name',
|
|
3556
|
-
flex: 1,
|
|
3557
|
-
headerName: 'Document Name',
|
|
3558
|
-
width: 150,
|
|
3559
|
-
editable: false
|
|
3560
|
-
}, {
|
|
3561
|
-
field: 'documentTypeName',
|
|
3562
|
-
flex: 1,
|
|
3563
|
-
headerName: 'Document Type',
|
|
3564
|
-
width: 150,
|
|
3565
|
-
editable: false
|
|
3566
|
-
}, {
|
|
3567
|
-
field: "actions",
|
|
3568
|
-
type: "actions",
|
|
3569
|
-
width: 200,
|
|
3570
|
-
flex: 1,
|
|
3571
|
-
headerName: "",
|
|
3572
|
-
cellClassName: "actions",
|
|
3573
|
-
getActions: function getActions(_ref2) {
|
|
3574
|
-
var id = _ref2.id,
|
|
3575
|
-
row = _ref2.row;
|
|
3576
|
-
return [/*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3577
|
-
variant: "text",
|
|
3578
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_ListRounded["default"], null),
|
|
3579
|
-
onClick: function onClick() {
|
|
3580
|
-
if (onManageField != null) {
|
|
3581
|
-
onManageField(row.id);
|
|
3582
|
-
}
|
|
3583
|
-
}
|
|
3584
|
-
}, "Manage Fields"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3585
|
-
variant: "text",
|
|
3586
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_DownloadRounded["default"], null),
|
|
3587
|
-
onClick: function onClick() {
|
|
3588
|
-
window.open("https://view.officeapps.live.com/op/view.aspx?src=" + row.fileUri + "&wdOrigin=BROWSELINK");
|
|
3589
|
-
}
|
|
3590
|
-
}, "Download File"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3591
|
-
variant: "text",
|
|
3592
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_DeleteRounded["default"], null),
|
|
3593
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3594
|
-
var documentMappingId;
|
|
3595
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3596
|
-
while (1) switch (_context.prev = _context.next) {
|
|
3597
|
-
case 0:
|
|
3598
|
-
documentMappingId = row.id;
|
|
3599
|
-
setRemoveDocument({
|
|
3600
|
-
companyId: companyId,
|
|
3601
|
-
documentMappingId: documentMappingId
|
|
3602
|
-
});
|
|
3603
|
-
case 2:
|
|
3604
|
-
case "end":
|
|
3605
|
-
return _context.stop();
|
|
3606
|
-
}
|
|
3607
|
-
}, _callee);
|
|
3608
|
-
}))
|
|
3609
|
-
}, "Remove")];
|
|
3610
|
-
}
|
|
3611
|
-
}];
|
|
3612
|
-
(0, _react.useEffect)(function () {
|
|
3613
|
-
if (document != null) {
|
|
3614
|
-
var fetchData = /*#__PURE__*/function () {
|
|
3615
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
3616
|
-
var response;
|
|
3617
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
3618
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
3619
|
-
case 0:
|
|
3620
|
-
_context3.next = 2;
|
|
3621
|
-
return apiService().get("/DocumentMapping/GetMappingFieldsForDocument?documentId=" + document.id);
|
|
3622
|
-
case 2:
|
|
3623
|
-
response = _context3.sent;
|
|
3624
|
-
if (response != null) {
|
|
3625
|
-
setToColumnOptions(response.data);
|
|
3626
|
-
setDocumentMappingColumns([{
|
|
3627
|
-
field: 'name',
|
|
3628
|
-
flex: 1,
|
|
3629
|
-
headerName: 'File Column',
|
|
3630
|
-
width: 150,
|
|
3631
|
-
editable: true
|
|
3632
|
-
}, {
|
|
3633
|
-
field: 'toName',
|
|
3634
|
-
headerName: 'Upload To',
|
|
3635
|
-
flex: 1,
|
|
3636
|
-
width: 150,
|
|
3637
|
-
editable: true,
|
|
3638
|
-
type: 'singleSelect',
|
|
3639
|
-
valueOptions: response.data
|
|
3640
|
-
}, {
|
|
3641
|
-
field: "actions",
|
|
3642
|
-
type: "actions",
|
|
3643
|
-
width: 200,
|
|
3644
|
-
headerName: "Archive Fields",
|
|
3645
|
-
cellClassName: "actions",
|
|
3646
|
-
getActions: function getActions(_ref5) {
|
|
3647
|
-
var id = _ref5.id,
|
|
3648
|
-
row = _ref5.row;
|
|
3649
|
-
return [/*#__PURE__*/_react["default"].createElement(_xDataGrid.GridActionsCellItem, {
|
|
3650
|
-
key: id,
|
|
3651
|
-
icon: /*#__PURE__*/_react["default"].createElement(_DeleteRounded["default"], null),
|
|
3652
|
-
label: "Archive",
|
|
3653
|
-
className: "textPrimary",
|
|
3654
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
3655
|
-
var documentMappingId, documentComponentId, response;
|
|
3656
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3657
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
3658
|
-
case 0:
|
|
3659
|
-
documentMappingId = row.id;
|
|
3660
|
-
documentComponentId = row.documentComponentId; // archive the column
|
|
3661
|
-
_context2.next = 4;
|
|
3662
|
-
return apiService()["delete"]("/DocumentMapping/RemoveColumnFromDocumentComponent?documentMappingId=" + documentMappingId + "&documentComponentId=" + documentComponentId);
|
|
3663
|
-
case 4:
|
|
3664
|
-
response = _context2.sent;
|
|
3665
|
-
if (response != null && response.status == 200) {
|
|
3666
|
-
setDataGridMappingRefreshKey(dataGridMappingRefreshKey + 1);
|
|
3667
|
-
}
|
|
3668
|
-
case 6:
|
|
3669
|
-
case "end":
|
|
3670
|
-
return _context2.stop();
|
|
3671
|
-
}
|
|
3672
|
-
}, _callee2);
|
|
3673
|
-
}))
|
|
3674
|
-
})];
|
|
3675
|
-
}
|
|
3676
|
-
}]);
|
|
3677
|
-
}
|
|
3678
|
-
case 4:
|
|
3679
|
-
case "end":
|
|
3680
|
-
return _context3.stop();
|
|
3681
|
-
}
|
|
3682
|
-
}, _callee3);
|
|
3683
|
-
}));
|
|
3684
|
-
return function fetchData() {
|
|
3685
|
-
return _ref4.apply(this, arguments);
|
|
3686
|
-
};
|
|
3687
|
-
}();
|
|
3688
|
-
fetchData();
|
|
3689
|
-
}
|
|
3690
|
-
}, [document]);
|
|
3691
|
-
(0, _react.useEffect)(function () {
|
|
3692
|
-
if (showAddNewDocument && documentTypeId == null) {
|
|
3693
|
-
// get all document types
|
|
3694
|
-
var fetchData = /*#__PURE__*/function () {
|
|
3695
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
3696
|
-
var response;
|
|
3697
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
3698
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
3699
|
-
case 0:
|
|
3700
|
-
_context4.next = 2;
|
|
3701
|
-
return apiService().post("/DocumentMapping/GetDocumentTypes");
|
|
3702
|
-
case 2:
|
|
3703
|
-
response = _context4.sent;
|
|
3704
|
-
if (response != null && response.status == 200) {
|
|
3705
|
-
setComponentTypes(response.data.data);
|
|
3706
|
-
}
|
|
3707
|
-
case 4:
|
|
3708
|
-
case "end":
|
|
3709
|
-
return _context4.stop();
|
|
3710
|
-
}
|
|
3711
|
-
}, _callee4);
|
|
3712
|
-
}));
|
|
3713
|
-
return function fetchData() {
|
|
3714
|
-
return _ref7.apply(this, arguments);
|
|
3715
|
-
};
|
|
3716
|
-
}();
|
|
3717
|
-
fetchData();
|
|
3718
|
-
}
|
|
3719
|
-
}, [showAddNewDocument, documentTypeId]);
|
|
3720
|
-
var GetHeaderRowData = /*#__PURE__*/function () {
|
|
3721
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(documentComponentId) {
|
|
3722
|
-
var response;
|
|
3723
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
3724
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
3725
|
-
case 0:
|
|
3726
|
-
_context5.next = 2;
|
|
3727
|
-
return apiService().get("/DocumentMapping/GetHeaderRow?documentComponentId=" + documentComponentId);
|
|
3728
|
-
case 2:
|
|
3729
|
-
response = _context5.sent;
|
|
3730
|
-
if (response != null && response.status == 200) {
|
|
3731
|
-
refHeaderRowInput.current.value = response.data;
|
|
3732
|
-
}
|
|
3733
|
-
case 4:
|
|
3734
|
-
case "end":
|
|
3735
|
-
return _context5.stop();
|
|
3736
|
-
}
|
|
3737
|
-
}, _callee5);
|
|
3738
|
-
}));
|
|
3739
|
-
return function GetHeaderRowData(_x2) {
|
|
3740
|
-
return _ref8.apply(this, arguments);
|
|
3741
|
-
};
|
|
3742
|
-
}();
|
|
3743
|
-
(0, _react.useEffect)(function () {
|
|
3744
|
-
if (status != null) {
|
|
3745
|
-
setDataGridRefreshKey(dataGridRefreshKey + 1);
|
|
3746
|
-
}
|
|
3747
|
-
}, [status]);
|
|
3748
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, !hideDocumentManager && /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
3749
|
-
container: true,
|
|
3750
|
-
spacing: 2,
|
|
3751
|
-
sx: {
|
|
3752
|
-
paddingBottom: 2
|
|
3753
|
-
}
|
|
3754
|
-
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
3755
|
-
item: true,
|
|
3756
|
-
xs: 3
|
|
3757
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3758
|
-
sx: {
|
|
3759
|
-
minWidth: 120
|
|
3760
|
-
}
|
|
3761
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
3762
|
-
fullWidth: true
|
|
3763
|
-
}, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
|
|
3764
|
-
id: "demo-simple-select-label"
|
|
3765
|
-
}, "Status"), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
3766
|
-
labelId: "demo-simple-select-label",
|
|
3767
|
-
id: "demo-simple-select",
|
|
3768
|
-
value: status,
|
|
3769
|
-
label: "Status",
|
|
3770
|
-
onChange: function onChange(event) {
|
|
3771
|
-
setStatus(event.target.value);
|
|
3772
|
-
}
|
|
3773
|
-
}, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
3774
|
-
value: 0
|
|
3775
|
-
}, "Open"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
3776
|
-
value: 2
|
|
3777
|
-
}, "Published"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
3778
|
-
value: 1
|
|
3779
|
-
}, "Archived"))))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
3780
|
-
item: true,
|
|
3781
|
-
xs: 9
|
|
3782
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3783
|
-
sx: {
|
|
3784
|
-
textAlign: "right",
|
|
3785
|
-
marginBottom: 2
|
|
3786
|
-
}
|
|
3787
|
-
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3788
|
-
variant: "contained",
|
|
3789
|
-
onClick: function onClick() {
|
|
3790
|
-
setShowAddNewDocument(true);
|
|
3791
|
-
}
|
|
3792
|
-
}, fileUploadName)))), /*#__PURE__*/_react["default"].createElement(EditableDatagrid, {
|
|
3793
|
-
key: dataGridRefreshKey,
|
|
3794
|
-
loadedUser: true,
|
|
3795
|
-
params: {
|
|
3796
|
-
companyId: companyId,
|
|
3797
|
-
userId: userId,
|
|
3798
|
-
locationId: locationId,
|
|
3799
|
-
status: status
|
|
3800
|
-
},
|
|
3801
|
-
url: "/DocumentMapping/GetDocumentComponents",
|
|
3802
|
-
columns: documentColumns
|
|
3803
|
-
})), hideDocumentManager && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3804
|
-
variant: "contained",
|
|
3805
|
-
onClick: function onClick() {
|
|
3806
|
-
setShowAddNewDocument(true);
|
|
3807
|
-
}
|
|
3808
|
-
}, fileUploadName), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
3809
|
-
open: showAddNewDocument,
|
|
3810
|
-
onClose: function onClose() {
|
|
3811
|
-
setShowAddNewDocument(false);
|
|
3812
|
-
},
|
|
3813
|
-
fullWidth: true,
|
|
3814
|
-
"aria-labelledby": "alert-dialog-title",
|
|
3815
|
-
"aria-describedby": "alert-dialog-description"
|
|
3816
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
3817
|
-
id: "alert-dialog-title"
|
|
3818
|
-
}, "Upload Document"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, documentTypeId == null && /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
3819
|
-
id: "alert-dialog-description",
|
|
3820
|
-
sx: {
|
|
3821
|
-
paddingBottom: 2
|
|
3822
|
-
}
|
|
3823
|
-
}, "Please select the type of document, then click \"Choose a file\""), documentTypeId == null && /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3824
|
-
sx: {
|
|
3825
|
-
marginTop: 2
|
|
3826
|
-
}
|
|
3827
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3828
|
-
sx: {
|
|
3829
|
-
minWidth: 120
|
|
3830
|
-
}
|
|
3831
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
3832
|
-
fullWidth: true
|
|
3833
|
-
}, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
|
|
3834
|
-
id: "demo-simple-select-label"
|
|
3835
|
-
}, "Document Type"), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
3836
|
-
labelId: "demo-simple-select-label",
|
|
3837
|
-
id: "demo-simple-select",
|
|
3838
|
-
inputRef: refSelectDocumentType,
|
|
3839
|
-
onChange: function onChange(val) {
|
|
3840
|
-
var _selectedDocument = componentTypes.find(function (s) {
|
|
3841
|
-
return s.id == val.target.value;
|
|
3842
|
-
});
|
|
3843
|
-
setSelectedDocument(_selectedDocument);
|
|
3844
|
-
},
|
|
3845
|
-
label: "DocumentType"
|
|
3846
|
-
}, componentTypes != null && componentTypes.map(function (componentType) {
|
|
3847
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
3848
|
-
value: componentType.id
|
|
3849
|
-
}, componentType.name);
|
|
3850
|
-
}))))), (selectedDocument != null || selectedDocument == null && documentTypeId != null) && /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3851
|
-
sx: {
|
|
3852
|
-
textAlign: "center",
|
|
3853
|
-
width: "100%",
|
|
3854
|
-
display: "flex",
|
|
3855
|
-
alignItems: "center",
|
|
3856
|
-
paddingTop: 2
|
|
3857
|
-
}
|
|
3858
|
-
}, /*#__PURE__*/_react["default"].createElement(FileUploader, {
|
|
3859
|
-
refOveride: fileUploaderRef,
|
|
3860
|
-
params: {
|
|
3861
|
-
documentTypeId: documentTypeId == null ? selectedDocument.id : documentTypeId,
|
|
3862
|
-
companyId: companyId
|
|
3863
|
-
},
|
|
3864
|
-
url: "/DocumentMapping/SyncDocument",
|
|
3865
|
-
multiple: true,
|
|
3866
|
-
variant: "custom",
|
|
3867
|
-
onUploadCompleted: function onUploadCompleted(responses) {
|
|
3868
|
-
if (responses.length > 0) {
|
|
3869
|
-
var row = responses[0].data;
|
|
3870
|
-
if (onManageField != null) {
|
|
3871
|
-
onManageField(row.id);
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
setShowAddNewDocument(false);
|
|
3875
|
-
}
|
|
3876
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3877
|
-
sx: {
|
|
3878
|
-
display: "flex",
|
|
3879
|
-
alignItems: "center"
|
|
3880
|
-
}
|
|
3881
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3882
|
-
htmlFor: "file-upload",
|
|
3883
|
-
sx: {
|
|
3884
|
-
border: "2px dashed #aaa",
|
|
3885
|
-
padding: 20,
|
|
3886
|
-
textAlign: "center",
|
|
3887
|
-
cursor: "pointer"
|
|
3888
|
-
}
|
|
3889
|
-
}, 'Choose a file'))))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3890
|
-
onClick: function onClick() {
|
|
3891
|
-
setShowAddNewDocument(false);
|
|
3892
|
-
}
|
|
3893
|
-
}, "Cancel"))), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
3894
|
-
open: showTrainingDocument,
|
|
3895
|
-
onClose: function onClose() {
|
|
3896
|
-
setShowTrainingDocument(false);
|
|
3897
|
-
},
|
|
3898
|
-
fullWidth: true,
|
|
3899
|
-
"aria-labelledby": "alert-dialog-title",
|
|
3900
|
-
"aria-describedby": "alert-dialog-description"
|
|
3901
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
3902
|
-
id: "alert-dialog-title"
|
|
3903
|
-
}, "Setup Mapping"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
3904
|
-
id: "alert-dialog-description"
|
|
3905
|
-
}, "If you'd like to submit a file, we can assist in configuring the fields to match the formatting of your document."), document != null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(FileUploader, {
|
|
3906
|
-
refOveride: fileUploaderRef,
|
|
3907
|
-
url: "/DocumentMapping/TrainDocument",
|
|
3908
|
-
params: {
|
|
3909
|
-
documentComponentId: document.id,
|
|
3910
|
-
companyId: companyId,
|
|
3911
|
-
locationId: locationId,
|
|
3912
|
-
userId: userId
|
|
3913
|
-
},
|
|
3914
|
-
multiple: false,
|
|
3915
|
-
variant: "custom",
|
|
3916
|
-
onUploadCompleted: function onUploadCompleted() {
|
|
3917
|
-
setDataGridMappingRefreshKey(dataGridMappingRefreshKey + 1);
|
|
3918
|
-
|
|
3919
|
-
// setUpdate(!update);
|
|
3920
|
-
// handleClose();
|
|
3921
|
-
}
|
|
3922
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3923
|
-
sx: {
|
|
3924
|
-
marginTop: 2,
|
|
3925
|
-
borderRadius: 2,
|
|
3926
|
-
backgroundColor: "#f5f5f5",
|
|
3927
|
-
border: "1px solid lightgray",
|
|
3928
|
-
cursor: "pointer",
|
|
3929
|
-
padding: 2
|
|
3930
|
-
}
|
|
3931
|
-
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3932
|
-
id: "FileUploader",
|
|
3933
|
-
"aria-controls": open ? 'demo-customized-menu' : undefined,
|
|
3934
|
-
"aria-haspopup": "true",
|
|
3935
|
-
"aria-expanded": open ? 'true' : undefined,
|
|
3936
|
-
variant: "text",
|
|
3937
|
-
disableElevation: true,
|
|
3938
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_PublishRounded["default"], null),
|
|
3939
|
-
sx: {
|
|
3940
|
-
marginLeft: 1
|
|
3941
|
-
}
|
|
3942
|
-
}, "Upload Sample File"))))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3943
|
-
onClick: function onClick() {
|
|
3944
|
-
setShowTrainingDocument(false);
|
|
3945
|
-
}
|
|
3946
|
-
}, "No, thank you"))), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
3947
|
-
open: addColumnDialog,
|
|
3948
|
-
onClose: function onClose() {
|
|
3949
|
-
setAddColumnDialog(false);
|
|
3950
|
-
},
|
|
3951
|
-
fullWidth: true,
|
|
3952
|
-
"aria-labelledby": "alert-dialog-title",
|
|
3953
|
-
"aria-describedby": "alert-dialog-description"
|
|
3954
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
3955
|
-
id: "alert-dialog-title"
|
|
3956
|
-
}, "Add Column"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
3957
|
-
id: "alert-dialog-description"
|
|
3958
|
-
}, "Include a column for document mapping"), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3959
|
-
sx: {
|
|
3960
|
-
marginTop: 2
|
|
3961
|
-
}
|
|
3962
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
3963
|
-
inputRef: refNewColumnFileColumn,
|
|
3964
|
-
id: "outlined-basic",
|
|
3965
|
-
label: "File Column",
|
|
3966
|
-
fullWidth: true,
|
|
3967
|
-
variant: "outlined"
|
|
3968
|
-
})), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
3969
|
-
sx: {
|
|
3970
|
-
marginTop: 4
|
|
3971
|
-
}
|
|
3972
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
3973
|
-
fullWidth: true
|
|
3974
|
-
}, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
|
|
3975
|
-
id: "demo-simple-select-label"
|
|
3976
|
-
}, "Column Name"), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
3977
|
-
labelId: "demo-simple-select-label",
|
|
3978
|
-
id: "demo-simple-select",
|
|
3979
|
-
value: selectedAddedColumn,
|
|
3980
|
-
label: "Column Name",
|
|
3981
|
-
onChange: function onChange(data) {
|
|
3982
|
-
setSelectedAddedColumn(data.target.value);
|
|
3983
|
-
}
|
|
3984
|
-
})))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3985
|
-
onClick: function onClick() {
|
|
3986
|
-
setAddColumnDialog(false);
|
|
3987
|
-
}
|
|
3988
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3989
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
3990
|
-
var response;
|
|
3991
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
3992
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
3993
|
-
case 0:
|
|
3994
|
-
_context6.next = 2;
|
|
3995
|
-
return apiService().post("/DocumentMapping/AddNewField", {
|
|
3996
|
-
tableName: document.name,
|
|
3997
|
-
fieldName: refNewColumnFileColumn.current.value,
|
|
3998
|
-
fileColumn: selectedAddedColumn,
|
|
3999
|
-
companyId: companyId,
|
|
4000
|
-
locationId: locationId,
|
|
4001
|
-
userId: userId
|
|
4002
|
-
});
|
|
4003
|
-
case 2:
|
|
4004
|
-
response = _context6.sent;
|
|
4005
|
-
if (response != null && response.status == 200) {
|
|
4006
|
-
setDataGridMappingRefreshKey(dataGridMappingRefreshKey + 1);
|
|
4007
|
-
setAddColumnDialog(false);
|
|
4008
|
-
}
|
|
4009
|
-
case 4:
|
|
4010
|
-
case "end":
|
|
4011
|
-
return _context6.stop();
|
|
4012
|
-
}
|
|
4013
|
-
}, _callee6);
|
|
4014
|
-
})),
|
|
4015
|
-
autoFocus: true
|
|
4016
|
-
}, "Add Column"))), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
4017
|
-
open: removeDocument != null ? true : false,
|
|
4018
|
-
onClose: function onClose() {
|
|
4019
|
-
setRemoveDocument(null);
|
|
4020
|
-
},
|
|
4021
|
-
fullWidth: true,
|
|
4022
|
-
"aria-labelledby": "alert-dialog-title",
|
|
4023
|
-
"aria-describedby": "alert-dialog-description"
|
|
4024
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
4025
|
-
id: "alert-dialog-title"
|
|
4026
|
-
}, "Remove the document"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
4027
|
-
id: "alert-dialog-description"
|
|
4028
|
-
}, "Are you sure you want to remove this document?")), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4029
|
-
onClick: function onClick() {
|
|
4030
|
-
setRemoveDocument(null);
|
|
4031
|
-
}
|
|
4032
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4033
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
4034
|
-
var response;
|
|
4035
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
4036
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
4037
|
-
case 0:
|
|
4038
|
-
response = null;
|
|
4039
|
-
if (!(companyId != null)) {
|
|
4040
|
-
_context7.next = 7;
|
|
4041
|
-
break;
|
|
4042
|
-
}
|
|
4043
|
-
_context7.next = 4;
|
|
4044
|
-
return apiService()["delete"]("/DocumentMapping/RemoveDocument?companyId=" + removeDocument.companyId + "&documentId=" + removeDocument.documentMappingId);
|
|
4045
|
-
case 4:
|
|
4046
|
-
response = _context7.sent;
|
|
4047
|
-
_context7.next = 10;
|
|
4048
|
-
break;
|
|
4049
|
-
case 7:
|
|
4050
|
-
_context7.next = 9;
|
|
4051
|
-
return apiService()["delete"]("/DocumentMapping/RemoveDocument?documentId=" + removeDocument.documentMappingId);
|
|
4052
|
-
case 9:
|
|
4053
|
-
response = _context7.sent;
|
|
4054
|
-
case 10:
|
|
4055
|
-
if (response != null && response.status == 200) {
|
|
4056
|
-
setDataGridRefreshKey(dataGridRefreshKey + 1);
|
|
4057
|
-
setRemoveDocument(null);
|
|
4058
|
-
if (onArchive != null) {
|
|
4059
|
-
onArchive(removeDocument.documentMappingId);
|
|
4060
|
-
}
|
|
4061
|
-
}
|
|
4062
|
-
case 11:
|
|
4063
|
-
case "end":
|
|
4064
|
-
return _context7.stop();
|
|
4065
|
-
}
|
|
4066
|
-
}, _callee7);
|
|
4067
|
-
}))
|
|
4068
|
-
}, "Remove Document"))));
|
|
4069
|
-
}
|
|
4070
|
-
"use strict";
|
|
4071
|
-
|
|
4072
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4073
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4074
|
-
value: true
|
|
4075
|
-
});
|
|
4076
|
-
exports.MappedColumn = MappedColumn;
|
|
4077
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
4078
|
-
var _Card = _interopRequireDefault(require("@mui/material/Card"));
|
|
4079
|
-
var _CardActions = _interopRequireDefault(require("@mui/material/CardActions"));
|
|
4080
|
-
var _CardContent = _interopRequireDefault(require("@mui/material/CardContent"));
|
|
4081
|
-
var _system = require("@mui/system");
|
|
4082
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
4083
|
-
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
4084
|
-
var _Link = _interopRequireDefault(require("@mui/icons-material/Link"));
|
|
4085
|
-
var _LinkOff = _interopRequireDefault(require("@mui/icons-material/LinkOff"));
|
|
4086
|
-
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
4087
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4088
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4089
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
4090
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4091
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4092
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // import NewMappingColumn from './newMappingColumn';
|
|
4093
|
-
// import MatchExistingMappedColumn from './matchExisting';
|
|
4094
|
-
// import { apiService } from 'authscape';
|
|
4095
|
-
|
|
4096
|
-
function MappedColumn(_ref) {
|
|
4097
|
-
var companyId = _ref.companyId,
|
|
4098
|
-
documentId = _ref.documentId,
|
|
4099
|
-
documentType = _ref.documentType,
|
|
4100
|
-
documentMappingId = _ref.documentMappingId,
|
|
4101
|
-
name = _ref.name,
|
|
4102
|
-
toName = _ref.toName,
|
|
4103
|
-
isMapped = _ref.isMapped,
|
|
4104
|
-
toOptions = _ref.toOptions,
|
|
4105
|
-
onResponse = _ref.onResponse;
|
|
4106
|
-
var notMatchedColor = "#ffe5e5";
|
|
4107
|
-
var matchedColor = "#fff";
|
|
4108
|
-
return /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
4109
|
-
sx: {
|
|
4110
|
-
marginTop: 1
|
|
4111
|
-
}
|
|
4112
|
-
}, /*#__PURE__*/_react["default"].createElement(_CardContent["default"], {
|
|
4113
|
-
sx: {
|
|
4114
|
-
position: "relative",
|
|
4115
|
-
backgroundColor: isMapped ? notMatchedColor : matchedColor
|
|
4116
|
-
}
|
|
4117
|
-
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4118
|
-
gutterBottom: true,
|
|
4119
|
-
variant: "h5",
|
|
4120
|
-
component: "div"
|
|
4121
|
-
}, name), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4122
|
-
sx: {
|
|
4123
|
-
position: "absolute",
|
|
4124
|
-
top: "10px",
|
|
4125
|
-
right: "10px"
|
|
4126
|
-
}
|
|
4127
|
-
}, isMapped ? /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
4128
|
-
direction: "row",
|
|
4129
|
-
spacing: 1
|
|
4130
|
-
}, /*#__PURE__*/_react["default"].createElement(_LinkOff["default"], null), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4131
|
-
variant: "body2",
|
|
4132
|
-
sx: {
|
|
4133
|
-
paddingTop: 0.5
|
|
4134
|
-
}
|
|
4135
|
-
}, "Not Matched")) : /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
4136
|
-
direction: "row",
|
|
4137
|
-
spacing: 1
|
|
4138
|
-
}, /*#__PURE__*/_react["default"].createElement(_Link["default"], null), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4139
|
-
variant: "body2",
|
|
4140
|
-
sx: {
|
|
4141
|
-
paddingTop: 0.5
|
|
4142
|
-
}
|
|
4143
|
-
}, "Matched"))), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4144
|
-
variant: "body2",
|
|
4145
|
-
color: "text.secondary"
|
|
4146
|
-
}, !isMapped && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "This column is matched with ", toName), isMapped && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "This column is not matched. If not matched it will not import"))), /*#__PURE__*/_react["default"].createElement(_CardActions["default"], {
|
|
4147
|
-
sx: {
|
|
4148
|
-
backgroundColor: isMapped ? notMatchedColor : matchedColor
|
|
4149
|
-
}
|
|
4150
|
-
}, !isMapped ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4151
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_LinkOff["default"], null),
|
|
4152
|
-
size: "small",
|
|
4153
|
-
sx: {
|
|
4154
|
-
paddingLeft: 3
|
|
4155
|
-
},
|
|
4156
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4157
|
-
var response;
|
|
4158
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4159
|
-
while (1) switch (_context.prev = _context.next) {
|
|
4160
|
-
case 0:
|
|
4161
|
-
_context.next = 2;
|
|
4162
|
-
return apiService()["delete"]("/DocumentMapping/RemoveMatch?companyId=" + companyId + "&documentId=" + documentId + "&documentMappingId=" + documentMappingId);
|
|
4163
|
-
case 2:
|
|
4164
|
-
response = _context.sent;
|
|
4165
|
-
if (response != null && response.status == 200) {
|
|
4166
|
-
onResponse();
|
|
4167
|
-
}
|
|
4168
|
-
case 4:
|
|
4169
|
-
case "end":
|
|
4170
|
-
return _context.stop();
|
|
4171
|
-
}
|
|
4172
|
-
}, _callee);
|
|
4173
|
-
}))
|
|
4174
|
-
}, "Remove Match")) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(MatchExistingMappedColumn, {
|
|
4175
|
-
companyId: companyId,
|
|
4176
|
-
documentId: documentId,
|
|
4177
|
-
documentMappingId: documentMappingId,
|
|
4178
|
-
fromName: name,
|
|
4179
|
-
toOptions: toOptions,
|
|
4180
|
-
onResponse: onResponse
|
|
4181
|
-
}), /*#__PURE__*/_react["default"].createElement(NewMappingColumn, {
|
|
4182
|
-
name: name,
|
|
4183
|
-
companyId: companyId,
|
|
4184
|
-
documentType: documentType,
|
|
4185
|
-
documentId: documentId,
|
|
4186
|
-
documentMappingId: documentMappingId,
|
|
4187
|
-
onResponse: onResponse
|
|
4188
|
-
}))));
|
|
4189
|
-
}
|
|
4190
|
-
"use strict";
|
|
4191
|
-
|
|
4192
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4193
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4194
|
-
value: true
|
|
4195
|
-
});
|
|
4196
|
-
exports.MatchExistingMappedColumn = MatchExistingMappedColumn;
|
|
4197
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
4198
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
4199
|
-
var _system = require("@mui/system");
|
|
4200
|
-
var _LinkRounded = _interopRequireDefault(require("@mui/icons-material/LinkRounded"));
|
|
4201
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
4202
|
-
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
4203
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
4204
|
-
var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
4205
|
-
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
4206
|
-
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
4207
|
-
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
4208
|
-
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
4209
|
-
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
4210
|
-
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
4211
|
-
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
4212
|
-
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
4213
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4214
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4215
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
4216
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4217
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4218
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4219
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4220
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4221
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4222
|
-
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); }
|
|
4223
|
-
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; }
|
|
4224
|
-
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; } }
|
|
4225
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import {apiService, authService, StripeConnect, ReactDraft, EditableDatagrid, FileUploader} from 'authscape';
|
|
4226
|
-
function MatchExistingMappedColumn(_ref) {
|
|
4227
|
-
var companyId = _ref.companyId,
|
|
4228
|
-
documentId = _ref.documentId,
|
|
4229
|
-
documentMappingId = _ref.documentMappingId,
|
|
4230
|
-
fromName = _ref.fromName,
|
|
4231
|
-
toOptions = _ref.toOptions,
|
|
4232
|
-
onResponse = _ref.onResponse;
|
|
4233
|
-
var _useState = (0, _react.useState)(false),
|
|
4234
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4235
|
-
createNewOpen = _useState2[0],
|
|
4236
|
-
setCreateNewOpen = _useState2[1];
|
|
4237
|
-
var _useState3 = (0, _react.useState)(false),
|
|
4238
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4239
|
-
onlyAddRowIfFound = _useState4[0],
|
|
4240
|
-
setOnlyAddRowIfFound = _useState4[1];
|
|
4241
|
-
var _useState5 = (0, _react.useState)(true),
|
|
4242
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
4243
|
-
rememberForNextTime = _useState6[0],
|
|
4244
|
-
setRememberForNextTime = _useState6[1];
|
|
4245
|
-
var _useState7 = (0, _react.useState)(null),
|
|
4246
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
4247
|
-
selectedToColumn = _useState8[0],
|
|
4248
|
-
setSelectedToColumn = _useState8[1];
|
|
4249
|
-
var handleClose = function handleClose() {
|
|
4250
|
-
setCreateNewOpen(false);
|
|
4251
|
-
};
|
|
4252
|
-
var checkboxRememberLabel = {
|
|
4253
|
-
inputProps: {
|
|
4254
|
-
'aria-label': 'Checkbox Remember'
|
|
4255
|
-
}
|
|
4256
|
-
};
|
|
4257
|
-
var SelectedExistingColumns = function SelectedExistingColumns(_ref2) {
|
|
4258
|
-
var toOptions = _ref2.toOptions;
|
|
4259
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4260
|
-
sx: {
|
|
4261
|
-
minWidth: 120
|
|
4262
|
-
}
|
|
4263
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
4264
|
-
fullWidth: true
|
|
4265
|
-
}, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
|
|
4266
|
-
id: "demo-simple-select-label"
|
|
4267
|
-
}, "Match to column"), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
4268
|
-
labelId: "demo-simple-select-label",
|
|
4269
|
-
id: "demo-simple-select",
|
|
4270
|
-
value: selectedToColumn,
|
|
4271
|
-
label: "Age",
|
|
4272
|
-
onChange: function onChange(event) {
|
|
4273
|
-
setSelectedToColumn(event.target.value);
|
|
4274
|
-
}
|
|
4275
|
-
}, toOptions != null && toOptions.map(function (toOption) {
|
|
4276
|
-
var isRequiredMessage = "";
|
|
4277
|
-
if (toOption.isRequired) {
|
|
4278
|
-
isRequiredMessage = " (Required)";
|
|
4279
|
-
}
|
|
4280
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
4281
|
-
value: toOption.name
|
|
4282
|
-
}, toOption.visibleName, " ", isRequiredMessage);
|
|
4283
|
-
}))));
|
|
4284
|
-
};
|
|
4285
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
4286
|
-
open: createNewOpen,
|
|
4287
|
-
onClose: handleClose,
|
|
4288
|
-
fullWidth: true,
|
|
4289
|
-
"aria-labelledby": "alert-dialog-title",
|
|
4290
|
-
"aria-describedby": "alert-dialog-description"
|
|
4291
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
4292
|
-
id: "alert-dialog-title"
|
|
4293
|
-
}, "Match existing column"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
4294
|
-
id: "alert-dialog-description"
|
|
4295
|
-
}, "***Inform the user about what it means to match existing columns***"), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4296
|
-
sx: {
|
|
4297
|
-
paddingTop: 2
|
|
4298
|
-
}
|
|
4299
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
4300
|
-
id: "outlined-basic",
|
|
4301
|
-
label: "File Column Name",
|
|
4302
|
-
defaultValue: fromName,
|
|
4303
|
-
variant: "outlined",
|
|
4304
|
-
disabled: true,
|
|
4305
|
-
fullWidth: true
|
|
4306
|
-
})), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4307
|
-
sx: {
|
|
4308
|
-
paddingTop: 2
|
|
4309
|
-
}
|
|
4310
|
-
}, /*#__PURE__*/_react["default"].createElement(SelectedExistingColumns, {
|
|
4311
|
-
toOptions: toOptions
|
|
4312
|
-
})), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4313
|
-
sx: {
|
|
4314
|
-
paddingTop: 2
|
|
4315
|
-
}
|
|
4316
|
-
}, /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
|
|
4317
|
-
value: "end",
|
|
4318
|
-
control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], _extends({}, checkboxRememberLabel, {
|
|
4319
|
-
defaultChecked: true,
|
|
4320
|
-
onChange: function onChange(event) {
|
|
4321
|
-
setRememberForNextTime(event.target.checked);
|
|
4322
|
-
}
|
|
4323
|
-
})),
|
|
4324
|
-
label: "Remember match for next time",
|
|
4325
|
-
labelPlacement: "end"
|
|
4326
|
-
}))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4327
|
-
onClick: handleClose
|
|
4328
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4329
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4330
|
-
var response;
|
|
4331
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4332
|
-
while (1) switch (_context.prev = _context.next) {
|
|
4333
|
-
case 0:
|
|
4334
|
-
_context.next = 2;
|
|
4335
|
-
return apiService().put("/DocumentMapping/AssignMapping", {
|
|
4336
|
-
companyId: companyId,
|
|
4337
|
-
documentId: documentId,
|
|
4338
|
-
fileColumnName: fromName,
|
|
4339
|
-
documentMappingId: documentMappingId,
|
|
4340
|
-
matchedColumn: selectedToColumn,
|
|
4341
|
-
onlyAddRowIfColumnFound: onlyAddRowIfFound,
|
|
4342
|
-
rememberForNextTime: rememberForNextTime
|
|
4343
|
-
});
|
|
4344
|
-
case 2:
|
|
4345
|
-
response = _context.sent;
|
|
4346
|
-
if (response != null && response.status == 200) {
|
|
4347
|
-
onResponse();
|
|
4348
|
-
handleClose();
|
|
4349
|
-
}
|
|
4350
|
-
case 4:
|
|
4351
|
-
case "end":
|
|
4352
|
-
return _context.stop();
|
|
4353
|
-
}
|
|
4354
|
-
}, _callee);
|
|
4355
|
-
})),
|
|
4356
|
-
autoFocus: true
|
|
4357
|
-
}, "Match Existing"))), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4358
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_LinkRounded["default"], null),
|
|
4359
|
-
size: "small",
|
|
4360
|
-
sx: {
|
|
4361
|
-
paddingLeft: 3
|
|
4362
|
-
},
|
|
4363
|
-
onClick: function onClick() {
|
|
4364
|
-
setCreateNewOpen(true);
|
|
4365
|
-
}
|
|
4366
|
-
}, "Match Existing"));
|
|
4367
|
-
}
|
|
4368
|
-
"use strict";
|
|
4369
|
-
|
|
4370
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4371
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4372
|
-
value: true
|
|
4373
|
-
});
|
|
4374
|
-
exports.NewMappingColumn = NewMappingColumn;
|
|
4375
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
4376
|
-
var _Card = _interopRequireDefault(require("@mui/material/Card"));
|
|
4377
|
-
var _CardContent = _interopRequireDefault(require("@mui/material/CardContent"));
|
|
4378
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
4379
|
-
var _system = require("@mui/system");
|
|
4380
|
-
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
4381
|
-
var _AddRounded = _interopRequireDefault(require("@mui/icons-material/AddRounded"));
|
|
4382
|
-
var _LinkRounded = _interopRequireDefault(require("@mui/icons-material/LinkRounded"));
|
|
4383
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
4384
|
-
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
4385
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
4386
|
-
var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
4387
|
-
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
4388
|
-
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
4389
|
-
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
4390
|
-
var _LocalParkingRounded = _interopRequireDefault(require("@mui/icons-material/LocalParkingRounded"));
|
|
4391
|
-
var _TextFieldsRounded = _interopRequireDefault(require("@mui/icons-material/TextFieldsRounded"));
|
|
4392
|
-
var _IntegrationInstructionsRounded = _interopRequireDefault(require("@mui/icons-material/IntegrationInstructionsRounded"));
|
|
4393
|
-
var _ListAltRounded = _interopRequireDefault(require("@mui/icons-material/ListAltRounded"));
|
|
4394
|
-
var _CalendarMonthRounded = _interopRequireDefault(require("@mui/icons-material/CalendarMonthRounded"));
|
|
4395
|
-
var _CheckBoxRounded = _interopRequireDefault(require("@mui/icons-material/CheckBoxRounded"));
|
|
4396
|
-
var _InsertPhotoRounded = _interopRequireDefault(require("@mui/icons-material/InsertPhotoRounded"));
|
|
4397
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4398
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4399
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
4400
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4401
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4402
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4403
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4404
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4405
|
-
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); }
|
|
4406
|
-
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; }
|
|
4407
|
-
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; } }
|
|
4408
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
4409
|
-
// import { apiService } from 'authscape';
|
|
4410
|
-
|
|
4411
|
-
function NewMappingColumn(_ref) {
|
|
4412
|
-
var name = _ref.name,
|
|
4413
|
-
companyId = _ref.companyId,
|
|
4414
|
-
documentType = _ref.documentType,
|
|
4415
|
-
documentId = _ref.documentId,
|
|
4416
|
-
documentMappingId = _ref.documentMappingId,
|
|
4417
|
-
onResponse = _ref.onResponse;
|
|
4418
|
-
var newColumnNameRef = (0, _react.useRef)(null);
|
|
4419
|
-
var newColumnDescriptionRef = (0, _react.useRef)(null);
|
|
4420
|
-
var _useState = (0, _react.useState)(false),
|
|
4421
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4422
|
-
createNewOpen = _useState2[0],
|
|
4423
|
-
setCreateNewOpen = _useState2[1];
|
|
4424
|
-
var _useState3 = (0, _react.useState)(null),
|
|
4425
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4426
|
-
selectedAttributeId = _useState4[0],
|
|
4427
|
-
setSelectedAttributeId = _useState4[1];
|
|
4428
|
-
var handleClose = function handleClose() {
|
|
4429
|
-
setCreateNewOpen(false);
|
|
4430
|
-
};
|
|
4431
|
-
var AttributeTypeComponent = function AttributeTypeComponent(_ref2) {
|
|
4432
|
-
var id = _ref2.id,
|
|
4433
|
-
icon = _ref2.icon,
|
|
4434
|
-
text = _ref2.text;
|
|
4435
|
-
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
4436
|
-
item: true,
|
|
4437
|
-
xs: 3
|
|
4438
|
-
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
4439
|
-
sx: {
|
|
4440
|
-
textAlign: "center",
|
|
4441
|
-
cursor: "pointer",
|
|
4442
|
-
backgroundColor: selectedAttributeId == id ? "#e5e5e5" : "none"
|
|
4443
|
-
},
|
|
4444
|
-
onClick: function onClick() {
|
|
4445
|
-
setSelectedAttributeId(id);
|
|
4446
|
-
}
|
|
4447
|
-
}, /*#__PURE__*/_react["default"].createElement(_CardContent["default"], null, icon, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4448
|
-
variant: "body2",
|
|
4449
|
-
color: "text.secondary",
|
|
4450
|
-
sx: {
|
|
4451
|
-
paddingTop: 1
|
|
4452
|
-
}
|
|
4453
|
-
}, text))));
|
|
4454
|
-
};
|
|
4455
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
4456
|
-
open: createNewOpen,
|
|
4457
|
-
onClose: handleClose,
|
|
4458
|
-
fullWidth: true,
|
|
4459
|
-
"aria-labelledby": "alert-dialog-title",
|
|
4460
|
-
"aria-describedby": "alert-dialog-description"
|
|
4461
|
-
}, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
|
|
4462
|
-
id: "alert-dialog-title"
|
|
4463
|
-
}, "Match to new column"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
4464
|
-
id: "alert-dialog-description"
|
|
4465
|
-
}, "inform the user about adding a new columna and what that means here..."), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4466
|
-
sx: {
|
|
4467
|
-
paddingTop: 2
|
|
4468
|
-
}
|
|
4469
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
4470
|
-
inputRef: newColumnNameRef,
|
|
4471
|
-
defaultValue: name,
|
|
4472
|
-
id: "outlined-basic",
|
|
4473
|
-
label: "Name",
|
|
4474
|
-
variant: "outlined",
|
|
4475
|
-
fullWidth: true
|
|
4476
|
-
})), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4477
|
-
sx: {
|
|
4478
|
-
paddingTop: 2
|
|
4479
|
-
}
|
|
4480
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
4481
|
-
inputRef: newColumnDescriptionRef,
|
|
4482
|
-
id: "outlined-basic",
|
|
4483
|
-
label: "Description (optional)",
|
|
4484
|
-
variant: "outlined",
|
|
4485
|
-
fullWidth: true
|
|
4486
|
-
})), /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
4487
|
-
sx: {
|
|
4488
|
-
paddingTop: 2
|
|
4489
|
-
}
|
|
4490
|
-
}, /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4491
|
-
variant: "body1",
|
|
4492
|
-
gutterBottom: true
|
|
4493
|
-
}, "Select how this column will be formatted")), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
4494
|
-
container: true,
|
|
4495
|
-
spacing: 2,
|
|
4496
|
-
sx: {
|
|
4497
|
-
paddingTop: 2
|
|
4498
|
-
}
|
|
4499
|
-
}, /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4500
|
-
id: 0,
|
|
4501
|
-
icon: /*#__PURE__*/_react["default"].createElement(_TextFieldsRounded["default"], null),
|
|
4502
|
-
text: "text"
|
|
4503
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4504
|
-
id: 1,
|
|
4505
|
-
icon: /*#__PURE__*/_react["default"].createElement(_LocalParkingRounded["default"], null),
|
|
4506
|
-
text: "Paragraph"
|
|
4507
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4508
|
-
id: 2,
|
|
4509
|
-
icon: /*#__PURE__*/_react["default"].createElement(_IntegrationInstructionsRounded["default"], null),
|
|
4510
|
-
text: "HTML"
|
|
4511
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4512
|
-
id: 3,
|
|
4513
|
-
icon: /*#__PURE__*/_react["default"].createElement(_system.Box, null, 123),
|
|
4514
|
-
text: "Integer"
|
|
4515
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4516
|
-
id: 4,
|
|
4517
|
-
icon: /*#__PURE__*/_react["default"].createElement(_system.Box, null, 10.23),
|
|
4518
|
-
text: "Decimal"
|
|
4519
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4520
|
-
id: 5,
|
|
4521
|
-
icon: /*#__PURE__*/_react["default"].createElement(_ListAltRounded["default"], null),
|
|
4522
|
-
text: "Dropdown"
|
|
4523
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4524
|
-
id: 6,
|
|
4525
|
-
icon: /*#__PURE__*/_react["default"].createElement(_CalendarMonthRounded["default"], null),
|
|
4526
|
-
text: "Date"
|
|
4527
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4528
|
-
id: 7,
|
|
4529
|
-
icon: /*#__PURE__*/_react["default"].createElement(_LinkRounded["default"], null),
|
|
4530
|
-
text: "URL"
|
|
4531
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4532
|
-
id: 8,
|
|
4533
|
-
icon: /*#__PURE__*/_react["default"].createElement(_CheckBoxRounded["default"], null),
|
|
4534
|
-
text: "Boolean"
|
|
4535
|
-
}), /*#__PURE__*/_react["default"].createElement(AttributeTypeComponent, {
|
|
4536
|
-
id: 9,
|
|
4537
|
-
icon: /*#__PURE__*/_react["default"].createElement(_InsertPhotoRounded["default"], null),
|
|
4538
|
-
text: "Photo"
|
|
4539
|
-
})))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4540
|
-
onClick: handleClose
|
|
4541
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4542
|
-
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4543
|
-
var response;
|
|
4544
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4545
|
-
while (1) switch (_context.prev = _context.next) {
|
|
4546
|
-
case 0:
|
|
4547
|
-
_context.next = 2;
|
|
4548
|
-
return apiService().post("/DocumentMapping/AddNewColumnAndMapping", {
|
|
4549
|
-
companyId: companyId,
|
|
4550
|
-
documentId: documentId,
|
|
4551
|
-
documentMappingId: documentMappingId,
|
|
4552
|
-
newColumn: newColumnNameRef.current.value,
|
|
4553
|
-
description: newColumnDescriptionRef.current.value,
|
|
4554
|
-
attributeFieldType: selectedAttributeId
|
|
4555
|
-
});
|
|
4556
|
-
case 2:
|
|
4557
|
-
response = _context.sent;
|
|
4558
|
-
if (response != null && response.status == 200) {
|
|
4559
|
-
handleClose();
|
|
4560
|
-
onResponse();
|
|
4561
|
-
}
|
|
4562
|
-
case 4:
|
|
4563
|
-
case "end":
|
|
4564
|
-
return _context.stop();
|
|
4565
|
-
}
|
|
4566
|
-
}, _callee);
|
|
4567
|
-
})),
|
|
4568
|
-
autoFocus: true
|
|
4569
|
-
}, "Create"))), documentType != null && documentType == 1 && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4570
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_AddRounded["default"], null),
|
|
4571
|
-
size: "small",
|
|
4572
|
-
sx: {
|
|
4573
|
-
paddingLeft: 3
|
|
4574
|
-
},
|
|
4575
|
-
onClick: function onClick() {
|
|
4576
|
-
setCreateNewOpen(true);
|
|
4577
|
-
}
|
|
4578
|
-
}, "Create New Column"));
|
|
4579
|
-
}
|
|
4580
|
-
"use strict";
|
|
4581
|
-
|
|
4582
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4583
|
-
value: true
|
|
4584
|
-
});
|
|
4585
|
-
exports.SortableColumn = SortableColumn;
|
|
4586
|
-
var _react = _interopRequireDefault(require("react"));
|
|
4587
|
-
var _sortable = require("@dnd-kit/sortable");
|
|
4588
|
-
var _utilities = require("@dnd-kit/utilities");
|
|
4589
|
-
var _material = require("@mui/material");
|
|
4590
|
-
var _Menu = _interopRequireDefault(require("@mui/icons-material/Menu"));
|
|
4591
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4592
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4593
|
-
function SortableColumn(props) {
|
|
4594
|
-
var _useSortable = (0, _sortable.useSortable)({
|
|
4595
|
-
id: props.id
|
|
4596
|
-
}),
|
|
4597
|
-
attributes = _useSortable.attributes,
|
|
4598
|
-
listeners = _useSortable.listeners,
|
|
4599
|
-
setNodeRef = _useSortable.setNodeRef,
|
|
4600
|
-
transform = _useSortable.transform,
|
|
4601
|
-
transition = _useSortable.transition;
|
|
4602
|
-
var style = {
|
|
4603
|
-
transform: _utilities.CSS.Transform.toString(transform),
|
|
4604
|
-
transition: transition
|
|
4605
|
-
};
|
|
4606
|
-
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
4607
|
-
ref: setNodeRef,
|
|
4608
|
-
style: style
|
|
4609
|
-
}, attributes, listeners), /*#__PURE__*/_react["default"].createElement(_material.ListItem, {
|
|
4610
|
-
disablePadding: true
|
|
4611
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.ListItemButton, null, /*#__PURE__*/_react["default"].createElement(_material.ListItemIcon, null, /*#__PURE__*/_react["default"].createElement(_Menu["default"], null)), /*#__PURE__*/_react["default"].createElement(_material.ListItemText, {
|
|
4612
|
-
primary: props.id
|
|
4613
|
-
}))));
|
|
4614
|
-
}
|
|
4615
|
-
"use strict";
|
|
4616
|
-
|
|
4617
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4618
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4619
|
-
value: true
|
|
4620
|
-
});
|
|
4621
|
-
exports.UploadMappedFile = UploadMappedFile;
|
|
4622
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
4623
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
4624
|
-
var _system = require("@mui/system");
|
|
4625
|
-
var _PublishRounded = _interopRequireDefault(require("@mui/icons-material/PublishRounded"));
|
|
4626
|
-
var _Menu = _interopRequireDefault(require("@mui/material/Menu"));
|
|
4627
|
-
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
4628
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4629
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4630
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
4631
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4632
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4633
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4634
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4635
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4636
|
-
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); }
|
|
4637
|
-
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; }
|
|
4638
|
-
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; } }
|
|
4639
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { apiService, FileUploader} from 'authscape';
|
|
4640
|
-
function UploadMappedFile(_ref) {
|
|
4641
|
-
var loadedUser = _ref.loadedUser,
|
|
4642
|
-
_ref$url = _ref.url,
|
|
4643
|
-
url = _ref$url === void 0 ? null : _ref$url,
|
|
4644
|
-
_ref$companyId = _ref.companyId,
|
|
4645
|
-
companyId = _ref$companyId === void 0 ? null : _ref$companyId,
|
|
4646
|
-
_ref$locationId = _ref.locationId,
|
|
4647
|
-
locationId = _ref$locationId === void 0 ? null : _ref$locationId,
|
|
4648
|
-
_ref$userId = _ref.userId,
|
|
4649
|
-
userId = _ref$userId === void 0 ? null : _ref$userId;
|
|
4650
|
-
var _useState = (0, _react.useState)(null),
|
|
4651
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4652
|
-
documentComponentOptions = _useState2[0],
|
|
4653
|
-
setDocumentComponentOptions = _useState2[1];
|
|
4654
|
-
var _useState3 = (0, _react.useState)(null),
|
|
4655
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4656
|
-
selectedDocumentComponentId = _useState4[0],
|
|
4657
|
-
setSelectedDocumentComponentId = _useState4[1];
|
|
4658
|
-
var _useState5 = (0, _react.useState)(null),
|
|
4659
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
4660
|
-
anchorEl = _useState6[0],
|
|
4661
|
-
setAnchorEl = _useState6[1];
|
|
4662
|
-
var open = Boolean(anchorEl);
|
|
4663
|
-
var handleClose = function handleClose() {
|
|
4664
|
-
setAnchorEl(null);
|
|
4665
|
-
};
|
|
4666
|
-
var fileUploaderRef = (0, _react.useRef)(null);
|
|
4667
|
-
(0, _react.useEffect)(function () {
|
|
4668
|
-
if (selectedDocumentComponentId != null) {
|
|
4669
|
-
// trigger the file uploader, make sure param is filled in
|
|
4670
|
-
fileUploaderRef.current.click();
|
|
4671
|
-
}
|
|
4672
|
-
}, [selectedDocumentComponentId]);
|
|
4673
|
-
(0, _react.useEffect)(function () {
|
|
4674
|
-
if (loadedUser) {
|
|
4675
|
-
var fetchData = /*#__PURE__*/function () {
|
|
4676
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4677
|
-
var _params, response;
|
|
4678
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4679
|
-
while (1) switch (_context.prev = _context.next) {
|
|
4680
|
-
case 0:
|
|
4681
|
-
_params = {};
|
|
4682
|
-
if (companyId != null) {
|
|
4683
|
-
_params.companyId = companyId;
|
|
4684
|
-
}
|
|
4685
|
-
if (userId != null) {
|
|
4686
|
-
_params.userId = userId;
|
|
4687
|
-
}
|
|
4688
|
-
if (locationId != null) {
|
|
4689
|
-
_params.locationId = locationId;
|
|
4690
|
-
}
|
|
4691
|
-
_context.next = 6;
|
|
4692
|
-
return apiService().post("/DocumentMapping/GetDocumentComponents", _params);
|
|
4693
|
-
case 6:
|
|
4694
|
-
response = _context.sent;
|
|
4695
|
-
if (response != null && response.status == 200) {
|
|
4696
|
-
setDocumentComponentOptions(response.data.data);
|
|
4697
|
-
}
|
|
4698
|
-
case 8:
|
|
4699
|
-
case "end":
|
|
4700
|
-
return _context.stop();
|
|
4701
|
-
}
|
|
4702
|
-
}, _callee);
|
|
4703
|
-
}));
|
|
4704
|
-
return function fetchData() {
|
|
4705
|
-
return _ref2.apply(this, arguments);
|
|
4706
|
-
};
|
|
4707
|
-
}();
|
|
4708
|
-
fetchData();
|
|
4709
|
-
}
|
|
4710
|
-
}, [loadedUser]);
|
|
4711
|
-
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(FileUploader, {
|
|
4712
|
-
refOveride: fileUploaderRef,
|
|
4713
|
-
params: {
|
|
4714
|
-
documentComponentId: selectedDocumentComponentId,
|
|
4715
|
-
companyId: companyId,
|
|
4716
|
-
locationId: locationId,
|
|
4717
|
-
userId: userId
|
|
4718
|
-
},
|
|
4719
|
-
url: url,
|
|
4720
|
-
multiple: false,
|
|
4721
|
-
variant: "custom",
|
|
4722
|
-
onUploadCompleted: function onUploadCompleted() {
|
|
4723
|
-
setSelectedDocumentComponentId(null); // we need an onUploadCancelled
|
|
4724
|
-
}
|
|
4725
|
-
}), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4726
|
-
id: "demo-positioned-button",
|
|
4727
|
-
"aria-controls": open ? 'demo-positioned-menu' : undefined,
|
|
4728
|
-
"aria-haspopup": "true",
|
|
4729
|
-
"aria-expanded": open ? 'true' : undefined,
|
|
4730
|
-
startIcon: /*#__PURE__*/_react["default"].createElement(_PublishRounded["default"], null),
|
|
4731
|
-
sx: {
|
|
4732
|
-
marginLeft: 1
|
|
4733
|
-
},
|
|
4734
|
-
onClick: function onClick(event) {
|
|
4735
|
-
setAnchorEl(event.currentTarget);
|
|
4736
|
-
}
|
|
4737
|
-
}, "Upload File(s)"), /*#__PURE__*/_react["default"].createElement(_Menu["default"], {
|
|
4738
|
-
id: "basic-menu",
|
|
4739
|
-
anchorEl: anchorEl,
|
|
4740
|
-
open: open,
|
|
4741
|
-
onClose: handleClose,
|
|
4742
|
-
MenuListProps: {
|
|
4743
|
-
'aria-labelledby': 'basic-button'
|
|
4744
|
-
}
|
|
4745
|
-
}, documentComponentOptions != null && documentComponentOptions.map(function (documentComponent) {
|
|
4746
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
4747
|
-
onClick: function onClick() {
|
|
4748
|
-
// assigns the param document component id
|
|
4749
|
-
setSelectedDocumentComponentId(documentComponent.id);
|
|
4750
|
-
|
|
4751
|
-
// close the menu
|
|
4752
|
-
handleClose();
|
|
4753
|
-
}
|
|
4754
|
-
}, documentComponent.name + " (" + documentComponent.documentTypeName + ")");
|
|
4755
|
-
})));
|
|
4756
|
-
}
|
|
4757
|
-
"use strict";
|
|
4758
|
-
|
|
4759
2576
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4760
2577
|
Object.defineProperty(exports, "__esModule", {
|
|
4761
2578
|
value: true
|