authscape 1.0.622 → 1.0.626
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 +181 -2348
- package/package.json +1 -10
- package/src/components/AuthScapeApp.js +1 -1
- package/src/components/EditableDatagrid.js +1 -1
- package/src/components/FileUploader.js +2 -2
- package/src/components/GoogleMapsAutoComplete.js +3 -5
- package/src/components/PlansAndPricing.js +4 -2
- package/src/components/RichTextEditor.js +2 -1
- package/src/components/dropzone.js +1 -1
- package/src/components/spreadsheet/spreadsheetViewer.js +11 -6
- package/src/components/stripe/StripePayment.js +8 -1
- 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
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.AuthScapeApp = AuthScapeApp;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactToastify = require("react-toastify");
|
|
10
|
-
var
|
|
10
|
+
var _ThemeProvider = _interopRequireDefault(require("@mui/material/styles/ThemeProvider"));
|
|
11
11
|
var _head = _interopRequireDefault(require("next/head"));
|
|
12
12
|
var _navigation = require("next/navigation");
|
|
13
13
|
var _axios = _interopRequireDefault(require("axios"));
|
|
@@ -410,7 +410,7 @@ function AuthScapeApp(_ref) {
|
|
|
410
410
|
}), pageProps != null && pageProps.oemCompanyId != null && /*#__PURE__*/_react["default"].createElement("link", {
|
|
411
411
|
href: process.env.apiUri + "/api/PrivateLabel/GetDataFromRecord?oemCompanyId=" + pageProps.oemCompanyId,
|
|
412
412
|
rel: "stylesheet"
|
|
413
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
413
|
+
})), /*#__PURE__*/_react["default"].createElement(_ThemeProvider["default"], {
|
|
414
414
|
theme: muiTheme
|
|
415
415
|
}, frontEndLoadedState != null && frontEndLoadedState && pathname != "/signin-oidc" && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, layout != null && layout({
|
|
416
416
|
children: /*#__PURE__*/_react["default"].createElement(Component, _extends({}, pageProps, {
|
|
@@ -1505,11 +1505,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1505
1505
|
});
|
|
1506
1506
|
exports.Dropzone = void 0;
|
|
1507
1507
|
var _iconsMaterial = require("@mui/icons-material");
|
|
1508
|
-
var
|
|
1508
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
1509
1509
|
var _react = _interopRequireWildcard(require("react"));
|
|
1510
1510
|
var _reactDropzone = require("react-dropzone");
|
|
1511
1511
|
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); }
|
|
1512
1512
|
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; }
|
|
1513
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1513
1514
|
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); }
|
|
1514
1515
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1515
1516
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -1583,14 +1584,14 @@ var Dropzone = function Dropzone(_ref) {
|
|
|
1583
1584
|
var style = (0, _react.useMemo)(function () {
|
|
1584
1585
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, baseStyle), isFocused ? focusedStyle : {}), isDragAccept ? acceptStyle : {}), isDragReject ? rejectStyle : {});
|
|
1585
1586
|
}, [isFocused, isDragAccept, isDragReject]);
|
|
1586
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
1587
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1587
1588
|
className: "container",
|
|
1588
1589
|
sx: {
|
|
1589
1590
|
cursor: "pointer"
|
|
1590
1591
|
}
|
|
1591
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
1592
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], getRootProps({
|
|
1592
1593
|
style: style
|
|
1593
|
-
}), /*#__PURE__*/_react["default"].createElement("input", getInputProps()), /*#__PURE__*/_react["default"].createElement(
|
|
1594
|
+
}), /*#__PURE__*/_react["default"].createElement("input", getInputProps()), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1594
1595
|
sx: {
|
|
1595
1596
|
paddingBottom: 1
|
|
1596
1597
|
}
|
|
@@ -1601,7 +1602,7 @@ var Dropzone = function Dropzone(_ref) {
|
|
|
1601
1602
|
style: {
|
|
1602
1603
|
objectFit: "contain"
|
|
1603
1604
|
}
|
|
1604
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
1605
|
+
})), /*#__PURE__*/_react["default"].createElement(_Box["default"], null, text)));
|
|
1605
1606
|
};
|
|
1606
1607
|
exports.Dropzone = Dropzone;
|
|
1607
1608
|
"use strict";
|
|
@@ -1613,7 +1614,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1613
1614
|
exports.EditableDatagrid = void 0;
|
|
1614
1615
|
var _react = _interopRequireWildcard(require("react"));
|
|
1615
1616
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
1616
|
-
var
|
|
1617
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
1618
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1617
1619
|
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); }
|
|
1618
1620
|
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; }
|
|
1619
1621
|
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; }
|
|
@@ -1751,7 +1753,7 @@ var EditableDatagrid = function EditableDatagrid(_ref) {
|
|
|
1751
1753
|
};
|
|
1752
1754
|
}();
|
|
1753
1755
|
}, []);
|
|
1754
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
1756
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1755
1757
|
sx: {
|
|
1756
1758
|
height: height
|
|
1757
1759
|
}
|
|
@@ -1788,8 +1790,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1788
1790
|
exports.FileUploader = void 0;
|
|
1789
1791
|
var _react = _interopRequireWildcard(require("react"));
|
|
1790
1792
|
var _LinearProgress = _interopRequireDefault(require("@mui/material/LinearProgress"));
|
|
1791
|
-
var
|
|
1792
|
-
var
|
|
1793
|
+
var _Box = _interopRequireDefault(require("@mui/system/Box"));
|
|
1794
|
+
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
1793
1795
|
var _FileCopyRounded = _interopRequireDefault(require("@mui/icons-material/FileCopyRounded"));
|
|
1794
1796
|
var _UploadRounded = _interopRequireDefault(require("@mui/icons-material/UploadRounded"));
|
|
1795
1797
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
@@ -2027,7 +2029,7 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
2027
2029
|
fetchAsync();
|
|
2028
2030
|
}
|
|
2029
2031
|
}, [fileLoaderUri]);
|
|
2030
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
2032
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
2031
2033
|
sx: {
|
|
2032
2034
|
display: isHidden ? "none" : "block"
|
|
2033
2035
|
}
|
|
@@ -2043,20 +2045,20 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
2043
2045
|
style: {
|
|
2044
2046
|
display: "none"
|
|
2045
2047
|
}
|
|
2046
|
-
}), variant == "custom" && /*#__PURE__*/_react["default"].createElement(
|
|
2048
|
+
}), variant == "custom" && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
2047
2049
|
ref: refOveride,
|
|
2048
2050
|
onClick: function onClick() {
|
|
2049
2051
|
handleUploadFileInput();
|
|
2050
2052
|
}
|
|
2051
|
-
}, children), variant == "filemanager" && /*#__PURE__*/_react["default"].createElement(
|
|
2053
|
+
}, children), variant == "filemanager" && /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2052
2054
|
container: true,
|
|
2053
2055
|
spacing: 2
|
|
2054
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2056
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2055
2057
|
ref: refOveride,
|
|
2056
2058
|
item: true,
|
|
2057
2059
|
xs: 12,
|
|
2058
2060
|
onClick: handleUploadFileInput
|
|
2059
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2061
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2060
2062
|
container: true,
|
|
2061
2063
|
sx: {
|
|
2062
2064
|
padding: 2,
|
|
@@ -2066,19 +2068,19 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
2066
2068
|
borderRadius: "8px",
|
|
2067
2069
|
border: "1px dashed #C8D4D5"
|
|
2068
2070
|
}
|
|
2069
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2071
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2070
2072
|
item: true,
|
|
2071
2073
|
xs: 2
|
|
2072
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2074
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], null, /*#__PURE__*/_react["default"].createElement(_FileCopyRounded["default"], {
|
|
2073
2075
|
sx: {
|
|
2074
2076
|
fill: "#C8D4D5",
|
|
2075
2077
|
width: 50,
|
|
2076
2078
|
height: 50
|
|
2077
2079
|
}
|
|
2078
|
-
}))), /*#__PURE__*/_react["default"].createElement(
|
|
2080
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2079
2081
|
item: true,
|
|
2080
2082
|
xs: 10
|
|
2081
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2083
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], null, "Drag and drop files here or"), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
2082
2084
|
sx: {
|
|
2083
2085
|
marginTop: 1
|
|
2084
2086
|
}
|
|
@@ -2098,7 +2100,7 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
2098
2100
|
color: primaryColor,
|
|
2099
2101
|
paddingTop: 0.6
|
|
2100
2102
|
}
|
|
2101
|
-
}, "Upload")))), /*#__PURE__*/_react["default"].createElement(
|
|
2103
|
+
}, "Upload")))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2102
2104
|
item: true,
|
|
2103
2105
|
xs: 12
|
|
2104
2106
|
}, loaded > 0 && /*#__PURE__*/_react["default"].createElement(_LinearProgress["default"], {
|
|
@@ -2114,13 +2116,13 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
2114
2116
|
color: primaryColor,
|
|
2115
2117
|
paddingTop: 0.6
|
|
2116
2118
|
}
|
|
2117
|
-
}, "Completed")))), children, /*#__PURE__*/_react["default"].createElement(
|
|
2119
|
+
}, "Completed")))), children, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2118
2120
|
container: true,
|
|
2119
2121
|
sx: {
|
|
2120
2122
|
paddingTop: 1
|
|
2121
2123
|
}
|
|
2122
2124
|
}, filesDownloadable != null && filesDownloadable.map(function (fileUpload, idx) {
|
|
2123
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
2125
|
+
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2124
2126
|
key: "fileDownloadable-" + idx,
|
|
2125
2127
|
item: true,
|
|
2126
2128
|
xs: 8,
|
|
@@ -2158,14 +2160,14 @@ var FileUploader = function FileUploader(_ref) {
|
|
|
2158
2160
|
spacing: 1,
|
|
2159
2161
|
display: "flex",
|
|
2160
2162
|
justifyContent: "space-between"
|
|
2161
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2163
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
2162
2164
|
display: "flex",
|
|
2163
2165
|
alignItems: "center"
|
|
2164
2166
|
}, /*#__PURE__*/_react["default"].createElement(_FileDownloadOutlined["default"], {
|
|
2165
2167
|
sx: {
|
|
2166
2168
|
fill: "#92D6E3"
|
|
2167
2169
|
}
|
|
2168
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
2170
|
+
}), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
2169
2171
|
sx: {
|
|
2170
2172
|
paddingTop: 0.6,
|
|
2171
2173
|
marginLeft: "5px"
|
|
@@ -2236,17 +2238,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2236
2238
|
});
|
|
2237
2239
|
exports.GoogleMapsAutoComplete = void 0;
|
|
2238
2240
|
var _react = _interopRequireWildcard(require("react"));
|
|
2239
|
-
var
|
|
2240
|
-
var _system = require("@mui/system");
|
|
2241
|
+
var _Box = _interopRequireDefault(require("@mui/system/Box"));
|
|
2241
2242
|
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
2242
2243
|
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
2243
|
-
var
|
|
2244
|
-
var
|
|
2244
|
+
var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
|
|
2245
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
2245
2246
|
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
2246
2247
|
var _LocationOnRounded = _interopRequireDefault(require("@mui/icons-material/LocationOnRounded"));
|
|
2247
2248
|
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
2248
2249
|
var _reactCoolOnclickoutside = _interopRequireDefault(require("react-cool-onclickoutside"));
|
|
2249
|
-
var _reactHookForm = require("react-hook-form");
|
|
2250
2250
|
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
2251
2251
|
var _usePlacesAutocomplete = _interopRequireWildcard(require("use-places-autocomplete"));
|
|
2252
2252
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -2442,7 +2442,7 @@ var AutoCompleteDialog = function AutoCompleteDialog(_ref) {
|
|
|
2442
2442
|
_suggestion$structure = suggestion.structured_formatting,
|
|
2443
2443
|
main_text = _suggestion$structure.main_text,
|
|
2444
2444
|
secondary_text = _suggestion$structure.secondary_text;
|
|
2445
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
2445
|
+
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
2446
2446
|
key: place_id,
|
|
2447
2447
|
onClick: handleSelect(suggestion, place_id),
|
|
2448
2448
|
sx: {
|
|
@@ -2463,7 +2463,7 @@ var AutoCompleteDialog = function AutoCompleteDialog(_ref) {
|
|
|
2463
2463
|
fullWidth: true,
|
|
2464
2464
|
value: value,
|
|
2465
2465
|
onChange: handleInput
|
|
2466
|
-
})), status == "OK" && /*#__PURE__*/_react["default"].createElement(
|
|
2466
|
+
})), status == "OK" && /*#__PURE__*/_react["default"].createElement(_MenuList["default"], {
|
|
2467
2467
|
ref: ref,
|
|
2468
2468
|
sx: {
|
|
2469
2469
|
position: "absolute",
|
|
@@ -2507,7 +2507,7 @@ var GoogleMapsAutoComplete = function GoogleMapsAutoComplete(_ref3) {
|
|
|
2507
2507
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
2508
2508
|
lng = _useState12[0],
|
|
2509
2509
|
setLng = _useState12[1];
|
|
2510
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(
|
|
2510
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Box["default"], null, /*#__PURE__*/_react["default"].createElement(AutoCompleteDialog, {
|
|
2511
2511
|
placeholder: "Address",
|
|
2512
2512
|
defaultValue: address,
|
|
2513
2513
|
onSelected: function onSelected(data) {
|
|
@@ -2531,7 +2531,7 @@ var GoogleMapsAutoComplete = function GoogleMapsAutoComplete(_ref3) {
|
|
|
2531
2531
|
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2532
2532
|
item: true,
|
|
2533
2533
|
xs: 6
|
|
2534
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2534
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], null, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
2535
2535
|
id: "outlined-basic",
|
|
2536
2536
|
label: "City",
|
|
2537
2537
|
name: "city",
|
|
@@ -2544,7 +2544,7 @@ var GoogleMapsAutoComplete = function GoogleMapsAutoComplete(_ref3) {
|
|
|
2544
2544
|
}))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
2545
2545
|
item: true,
|
|
2546
2546
|
xs: 6
|
|
2547
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2547
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], null, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
2548
2548
|
id: "outlined-basic",
|
|
2549
2549
|
label: "State",
|
|
2550
2550
|
name: "state",
|
|
@@ -2554,7 +2554,7 @@ var GoogleMapsAutoComplete = function GoogleMapsAutoComplete(_ref3) {
|
|
|
2554
2554
|
onChange: function onChange(val) {
|
|
2555
2555
|
setState(val.currentTarget.value);
|
|
2556
2556
|
}
|
|
2557
|
-
})))), /*#__PURE__*/_react["default"].createElement(
|
|
2557
|
+
})))), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
2558
2558
|
sx: {
|
|
2559
2559
|
marginTop: 2
|
|
2560
2560
|
}
|
|
@@ -2577,19 +2577,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2577
2577
|
Object.defineProperty(exports, "__esModule", {
|
|
2578
2578
|
value: true
|
|
2579
2579
|
});
|
|
2580
|
-
exports.
|
|
2580
|
+
exports.NextImage = void 0;
|
|
2581
2581
|
var _react = _interopRequireWildcard(require("react"));
|
|
2582
|
-
var
|
|
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"));
|
|
2582
|
+
var _image = _interopRequireDefault(require("next/image"));
|
|
2593
2583
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
2594
2584
|
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
2585
|
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; }
|
|
@@ -2601,2261 +2591,88 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
2601
2591
|
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
2592
|
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
2593
|
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; }
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
_ref$
|
|
2612
|
-
|
|
2613
|
-
_ref$
|
|
2614
|
-
|
|
2615
|
-
_ref$
|
|
2616
|
-
|
|
2617
|
-
var _useState = (0, _react.useState)(documentComponentId),
|
|
2594
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2595
|
+
var NextImage = function NextImage(_ref) {
|
|
2596
|
+
var src = _ref.src,
|
|
2597
|
+
alt = _ref.alt,
|
|
2598
|
+
_ref$width = _ref.width,
|
|
2599
|
+
width = _ref$width === void 0 ? 200 : _ref$width,
|
|
2600
|
+
_ref$height = _ref.height,
|
|
2601
|
+
height = _ref$height === void 0 ? 200 : _ref$height,
|
|
2602
|
+
_ref$objectFit = _ref.objectFit,
|
|
2603
|
+
objectFit = _ref$objectFit === void 0 ? "contain" : _ref$objectFit,
|
|
2604
|
+
_ref$enableAuth = _ref.enableAuth,
|
|
2605
|
+
enableAuth = _ref$enableAuth === void 0 ? false : _ref$enableAuth;
|
|
2606
|
+
var _useState = (0, _react.useState)(false),
|
|
2618
2607
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2619
|
-
|
|
2620
|
-
|
|
2608
|
+
imageError = _useState2[0],
|
|
2609
|
+
setImageError = _useState2[1];
|
|
2621
2610
|
var _useState3 = (0, _react.useState)(null),
|
|
2622
2611
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2623
|
-
|
|
2624
|
-
|
|
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
|
-
}();
|
|
2612
|
+
imageSrc = _useState4[0],
|
|
2613
|
+
setImageSrc = _useState4[1];
|
|
2705
2614
|
(0, _react.useEffect)(function () {
|
|
2706
|
-
if (
|
|
2707
|
-
if (setIsLoading != null) {
|
|
2708
|
-
setIsLoading(true);
|
|
2709
|
-
}
|
|
2710
|
-
setSpreadSheetAddress("/DocumentMappingPreview/PreviewMappedData?companyId=" + currentUser.companyId + "&documentComponentId=" + documentComponentId);
|
|
2615
|
+
if (enableAuth) {
|
|
2711
2616
|
var fetchData = /*#__PURE__*/function () {
|
|
2712
|
-
var
|
|
2713
|
-
return _regeneratorRuntime().wrap(function
|
|
2714
|
-
while (1) switch (
|
|
2617
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2618
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2619
|
+
while (1) switch (_context.prev = _context.next) {
|
|
2715
2620
|
case 0:
|
|
2716
|
-
|
|
2717
|
-
return
|
|
2621
|
+
_context.next = 2;
|
|
2622
|
+
return apiService().DownloadFile(src, "", function (data) {
|
|
2623
|
+
setImageSrc(data);
|
|
2624
|
+
}, true);
|
|
2718
2625
|
case 2:
|
|
2719
|
-
_context3.next = 4;
|
|
2720
|
-
return fetchMappingTo();
|
|
2721
|
-
case 4:
|
|
2722
|
-
if (setIsLoading != null) {
|
|
2723
|
-
setIsLoading(false);
|
|
2724
|
-
}
|
|
2725
|
-
case 5:
|
|
2726
2626
|
case "end":
|
|
2727
|
-
return
|
|
2627
|
+
return _context.stop();
|
|
2728
2628
|
}
|
|
2729
|
-
},
|
|
2629
|
+
}, _callee);
|
|
2730
2630
|
}));
|
|
2731
2631
|
return function fetchData() {
|
|
2732
|
-
return
|
|
2632
|
+
return _ref2.apply(this, arguments);
|
|
2733
2633
|
};
|
|
2734
2634
|
}();
|
|
2735
2635
|
fetchData();
|
|
2736
2636
|
}
|
|
2737
|
-
}, [
|
|
2738
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
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);
|
|
2637
|
+
}, [enableAuth]);
|
|
2638
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, enableAuth && imageSrc != null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
2639
|
+
src: imageError ? process.env.fallbackImageSrc : imageSrc,
|
|
2640
|
+
alt: alt,
|
|
2641
|
+
width: width,
|
|
2642
|
+
height: height,
|
|
2643
|
+
style: {
|
|
2644
|
+
objectFit: objectFit
|
|
2815
2645
|
},
|
|
2816
|
-
|
|
2817
|
-
|
|
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
|
|
2646
|
+
onError: function onError() {
|
|
2647
|
+
return setImageError(true);
|
|
2829
2648
|
}
|
|
2830
|
-
},
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2649
|
+
})), !enableAuth && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
2650
|
+
src: imageError ? process.env.fallbackImageSrc : src,
|
|
2651
|
+
alt: alt,
|
|
2652
|
+
width: width,
|
|
2653
|
+
height: height,
|
|
2654
|
+
style: {
|
|
2655
|
+
objectFit: objectFit
|
|
2834
2656
|
},
|
|
2835
|
-
|
|
2836
|
-
|
|
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);
|
|
2657
|
+
onError: function onError() {
|
|
2658
|
+
return setImageError(true);
|
|
2867
2659
|
}
|
|
2868
|
-
}
|
|
2869
|
-
|
|
2870
|
-
|
|
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
|
-
}
|
|
2660
|
+
})));
|
|
2661
|
+
};
|
|
2662
|
+
exports.NextImage = NextImage;
|
|
2906
2663
|
"use strict";
|
|
2907
2664
|
|
|
2908
2665
|
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
2666
|
Object.defineProperty(exports, "__esModule", {
|
|
2910
2667
|
value: true
|
|
2911
2668
|
});
|
|
2912
|
-
exports.
|
|
2669
|
+
exports.PageToPDF = void 0;
|
|
2913
2670
|
var _react = _interopRequireWildcard(require("react"));
|
|
2671
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
2672
|
+
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
2673
|
+
var _jspdf = require("jspdf");
|
|
2914
2674
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
2915
|
-
var
|
|
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
|
-
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
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4761
|
-
value: true
|
|
4762
|
-
});
|
|
4763
|
-
exports.NextImage = void 0;
|
|
4764
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
4765
|
-
var _image = _interopRequireDefault(require("next/image"));
|
|
4766
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4767
|
-
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); }
|
|
4768
|
-
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; }
|
|
4769
|
-
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; }
|
|
4770
|
-
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); } }
|
|
4771
|
-
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); }); }; }
|
|
4772
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4773
|
-
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."); }
|
|
4774
|
-
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); }
|
|
4775
|
-
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; }
|
|
4776
|
-
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; } }
|
|
4777
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
4778
|
-
var NextImage = function NextImage(_ref) {
|
|
4779
|
-
var src = _ref.src,
|
|
4780
|
-
alt = _ref.alt,
|
|
4781
|
-
_ref$width = _ref.width,
|
|
4782
|
-
width = _ref$width === void 0 ? 200 : _ref$width,
|
|
4783
|
-
_ref$height = _ref.height,
|
|
4784
|
-
height = _ref$height === void 0 ? 200 : _ref$height,
|
|
4785
|
-
_ref$objectFit = _ref.objectFit,
|
|
4786
|
-
objectFit = _ref$objectFit === void 0 ? "contain" : _ref$objectFit,
|
|
4787
|
-
_ref$enableAuth = _ref.enableAuth,
|
|
4788
|
-
enableAuth = _ref$enableAuth === void 0 ? false : _ref$enableAuth;
|
|
4789
|
-
var _useState = (0, _react.useState)(false),
|
|
4790
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4791
|
-
imageError = _useState2[0],
|
|
4792
|
-
setImageError = _useState2[1];
|
|
4793
|
-
var _useState3 = (0, _react.useState)(null),
|
|
4794
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4795
|
-
imageSrc = _useState4[0],
|
|
4796
|
-
setImageSrc = _useState4[1];
|
|
4797
|
-
(0, _react.useEffect)(function () {
|
|
4798
|
-
if (enableAuth) {
|
|
4799
|
-
var fetchData = /*#__PURE__*/function () {
|
|
4800
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4801
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4802
|
-
while (1) switch (_context.prev = _context.next) {
|
|
4803
|
-
case 0:
|
|
4804
|
-
_context.next = 2;
|
|
4805
|
-
return apiService().DownloadFile(src, "", function (data) {
|
|
4806
|
-
setImageSrc(data);
|
|
4807
|
-
}, true);
|
|
4808
|
-
case 2:
|
|
4809
|
-
case "end":
|
|
4810
|
-
return _context.stop();
|
|
4811
|
-
}
|
|
4812
|
-
}, _callee);
|
|
4813
|
-
}));
|
|
4814
|
-
return function fetchData() {
|
|
4815
|
-
return _ref2.apply(this, arguments);
|
|
4816
|
-
};
|
|
4817
|
-
}();
|
|
4818
|
-
fetchData();
|
|
4819
|
-
}
|
|
4820
|
-
}, [enableAuth]);
|
|
4821
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, enableAuth && imageSrc != null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
4822
|
-
src: imageError ? process.env.fallbackImageSrc : imageSrc,
|
|
4823
|
-
alt: alt,
|
|
4824
|
-
width: width,
|
|
4825
|
-
height: height,
|
|
4826
|
-
style: {
|
|
4827
|
-
objectFit: objectFit
|
|
4828
|
-
},
|
|
4829
|
-
onError: function onError() {
|
|
4830
|
-
return setImageError(true);
|
|
4831
|
-
}
|
|
4832
|
-
})), !enableAuth && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
4833
|
-
src: imageError ? process.env.fallbackImageSrc : src,
|
|
4834
|
-
alt: alt,
|
|
4835
|
-
width: width,
|
|
4836
|
-
height: height,
|
|
4837
|
-
style: {
|
|
4838
|
-
objectFit: objectFit
|
|
4839
|
-
},
|
|
4840
|
-
onError: function onError() {
|
|
4841
|
-
return setImageError(true);
|
|
4842
|
-
}
|
|
4843
|
-
})));
|
|
4844
|
-
};
|
|
4845
|
-
exports.NextImage = NextImage;
|
|
4846
|
-
"use strict";
|
|
4847
|
-
|
|
4848
|
-
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); }
|
|
4849
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4850
|
-
value: true
|
|
4851
|
-
});
|
|
4852
|
-
exports.PageToPDF = void 0;
|
|
4853
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
4854
|
-
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
4855
|
-
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
4856
|
-
var _jspdf = require("jspdf");
|
|
4857
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
4858
|
-
var _DownloadRounded = _interopRequireDefault(require("@mui/icons-material/DownloadRounded"));
|
|
2675
|
+
var _DownloadRounded = _interopRequireDefault(require("@mui/icons-material/DownloadRounded"));
|
|
4859
2676
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4860
2677
|
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); }
|
|
4861
2678
|
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; }
|
|
@@ -4930,9 +2747,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4930
2747
|
value: true
|
|
4931
2748
|
});
|
|
4932
2749
|
exports.Pricing = Pricing;
|
|
4933
|
-
var _react =
|
|
2750
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4934
2751
|
var _system = require("@mui/system");
|
|
4935
|
-
var
|
|
2752
|
+
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
2753
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
2754
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
4936
2755
|
var _ChevronRightRounded = _interopRequireDefault(require("@mui/icons-material/ChevronRightRounded"));
|
|
4937
2756
|
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
4938
2757
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
@@ -4940,8 +2759,6 @@ var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
|
4940
2759
|
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
4941
2760
|
var _reactHookForm = require("react-hook-form");
|
|
4942
2761
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4943
|
-
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); }
|
|
4944
|
-
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; }
|
|
4945
2762
|
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; }
|
|
4946
2763
|
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); } }
|
|
4947
2764
|
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); }); }; }
|
|
@@ -4976,23 +2793,23 @@ function Pricing(_ref) {
|
|
|
4976
2793
|
sx: {
|
|
4977
2794
|
paddingTop: 2
|
|
4978
2795
|
}
|
|
4979
|
-
}, /*#__PURE__*/_react["default"].createElement("form", null, /*#__PURE__*/_react["default"].createElement(
|
|
2796
|
+
}, /*#__PURE__*/_react["default"].createElement("form", null, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
4980
2797
|
container: true,
|
|
4981
2798
|
spacing: 0,
|
|
4982
2799
|
justifyContent: "center",
|
|
4983
2800
|
alignItems: "stretch",
|
|
4984
2801
|
direction: "row"
|
|
4985
|
-
}, title != null && /*#__PURE__*/_react["default"].createElement(
|
|
2802
|
+
}, title != null && /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
4986
2803
|
item: true,
|
|
4987
2804
|
xs: 12,
|
|
4988
2805
|
sm: 6,
|
|
4989
2806
|
md: 3,
|
|
4990
2807
|
key: "plans"
|
|
4991
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2808
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
4992
2809
|
variant: "h4",
|
|
4993
2810
|
gutterBottom: true
|
|
4994
2811
|
}, title)), tiers.map(function (tier) {
|
|
4995
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
2812
|
+
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
4996
2813
|
item: true,
|
|
4997
2814
|
xs: 12,
|
|
4998
2815
|
sm: 6,
|
|
@@ -5012,22 +2829,22 @@ function Pricing(_ref) {
|
|
|
5012
2829
|
src: tier.image,
|
|
5013
2830
|
width: 200,
|
|
5014
2831
|
height: 200
|
|
5015
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
2832
|
+
}), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
5016
2833
|
variant: "h3",
|
|
5017
2834
|
component: "h2",
|
|
5018
2835
|
sx: {
|
|
5019
2836
|
paddingTop: 3
|
|
5020
2837
|
}
|
|
5021
|
-
}, tier.title), tier.subTitle && /*#__PURE__*/_react["default"].createElement(
|
|
2838
|
+
}, tier.title), tier.subTitle && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
5022
2839
|
variant: "h6",
|
|
5023
2840
|
component: "h2",
|
|
5024
2841
|
sx: {
|
|
5025
2842
|
paddingTop: 2
|
|
5026
2843
|
}
|
|
5027
|
-
}, tier.subTitle), /*#__PURE__*/_react["default"].createElement(
|
|
2844
|
+
}, tier.subTitle), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
5028
2845
|
container: true,
|
|
5029
2846
|
spacing: 0
|
|
5030
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2847
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
5031
2848
|
item: true,
|
|
5032
2849
|
xs: tier.qty != null ? 6 : 12,
|
|
5033
2850
|
sx: {
|
|
@@ -5041,7 +2858,7 @@ function Pricing(_ref) {
|
|
|
5041
2858
|
}
|
|
5042
2859
|
}, "$", tier.price), tier.duration != null && /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
5043
2860
|
component: "span"
|
|
5044
|
-
}, "/ ", tier.duration)), tier.qty != null && /*#__PURE__*/_react["default"].createElement(
|
|
2861
|
+
}, "/ ", tier.duration)), tier.qty != null && /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
5045
2862
|
item: true,
|
|
5046
2863
|
xs: 6,
|
|
5047
2864
|
sx: {
|
|
@@ -5109,7 +2926,7 @@ function Pricing(_ref) {
|
|
|
5109
2926
|
})));
|
|
5110
2927
|
}
|
|
5111
2928
|
});
|
|
5112
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
2929
|
+
})), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5113
2930
|
fullWidth: true,
|
|
5114
2931
|
variant: tier.buttonVariant,
|
|
5115
2932
|
endIcon: /*#__PURE__*/_react["default"].createElement(_ChevronRightRounded["default"], null),
|
|
@@ -5150,7 +2967,7 @@ function Pricing(_ref) {
|
|
|
5150
2967
|
return _ref4.apply(this, arguments);
|
|
5151
2968
|
};
|
|
5152
2969
|
}())
|
|
5153
|
-
}, tier.buttonText), /*#__PURE__*/_react["default"].createElement(
|
|
2970
|
+
}, tier.buttonText), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
5154
2971
|
variant: "body2",
|
|
5155
2972
|
sx: {
|
|
5156
2973
|
paddingTop: 2,
|
|
@@ -5174,16 +2991,16 @@ function Pricing(_ref) {
|
|
|
5174
2991
|
padding: 1,
|
|
5175
2992
|
borderRadius: 2
|
|
5176
2993
|
}
|
|
5177
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
2994
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
5178
2995
|
variant: "h5",
|
|
5179
2996
|
gutterBottom: true
|
|
5180
|
-
}, feature.name)), /*#__PURE__*/_react["default"].createElement(
|
|
2997
|
+
}, feature.name)), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
5181
2998
|
container: true,
|
|
5182
2999
|
spacing: 0,
|
|
5183
3000
|
justifyContent: "center"
|
|
5184
3001
|
}, feature.subfeatures.map(function (subfeature, subFeatureIndex) {
|
|
5185
3002
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, subfeature.map(function (item, index) {
|
|
5186
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
3003
|
+
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
5187
3004
|
item: true,
|
|
5188
3005
|
xs: 3,
|
|
5189
3006
|
key: subfeature
|
|
@@ -5209,7 +3026,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
5209
3026
|
var _draftJs = require("draft-js");
|
|
5210
3027
|
var _draftjsToHtml = _interopRequireDefault(require("draftjs-to-html"));
|
|
5211
3028
|
var _dynamic = _interopRequireDefault(require("next/dynamic"));
|
|
5212
|
-
var
|
|
3029
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
3030
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
5213
3031
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
5214
3032
|
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); }
|
|
5215
3033
|
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; }
|
|
@@ -5278,11 +3096,11 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
5278
3096
|
// { text: "HONEYDEW", value: "honeydew", url: "honeydew" }
|
|
5279
3097
|
// ]
|
|
5280
3098
|
// }}
|
|
5281
|
-
}), /*#__PURE__*/_react["default"].createElement("hr", null), /*#__PURE__*/_react["default"].createElement(
|
|
3099
|
+
}), /*#__PURE__*/_react["default"].createElement("hr", null), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
5282
3100
|
sx: {
|
|
5283
3101
|
textAlign: "right"
|
|
5284
3102
|
}
|
|
5285
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
3103
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5286
3104
|
variant: "contained",
|
|
5287
3105
|
disabled: isDisabled,
|
|
5288
3106
|
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -5307,8 +3125,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5307
3125
|
value: true
|
|
5308
3126
|
});
|
|
5309
3127
|
exports.SpreadsheetViewer = void 0;
|
|
5310
|
-
var _material = require("@mui/material");
|
|
5311
3128
|
var _react = _interopRequireWildcard(require("react"));
|
|
3129
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
3130
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
3131
|
+
var _List = _interopRequireDefault(require("@mui/material/List"));
|
|
3132
|
+
var _Table = _interopRequireDefault(require("@mui/material/Table"));
|
|
3133
|
+
var _TableBody = _interopRequireDefault(require("@mui/material/TableBody"));
|
|
3134
|
+
var _TableCell = _interopRequireDefault(require("@mui/material/TableCell"));
|
|
3135
|
+
var _TableContainer = _interopRequireDefault(require("@mui/material/TableContainer"));
|
|
3136
|
+
var _TableHead = _interopRequireDefault(require("@mui/material/TableHead"));
|
|
3137
|
+
var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
|
|
5312
3138
|
var _reactgrid = require("@silevis/reactgrid");
|
|
5313
3139
|
var _reactDeviceDetect = require("react-device-detect");
|
|
5314
3140
|
var signalR = _interopRequireWildcard(require("@microsoft/signalr"));
|
|
@@ -5352,7 +3178,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
5352
3178
|
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); }
|
|
5353
3179
|
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; }
|
|
5354
3180
|
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; } }
|
|
5355
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3181
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5356
3182
|
// import { SortableColumn } from './Mapping/sortableColumn';
|
|
5357
3183
|
|
|
5358
3184
|
var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
@@ -5931,7 +3757,7 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
5931
3757
|
}
|
|
5932
3758
|
return arrayItem;
|
|
5933
3759
|
};
|
|
5934
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
3760
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], null, !hideToolbar && /*#__PURE__*/_react["default"].createElement(_AppBar["default"], {
|
|
5935
3761
|
position: "static",
|
|
5936
3762
|
elevation: 0,
|
|
5937
3763
|
sx: {
|
|
@@ -5942,17 +3768,17 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
5942
3768
|
sx: {
|
|
5943
3769
|
color: "black"
|
|
5944
3770
|
}
|
|
5945
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
3771
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
5946
3772
|
sx: {
|
|
5947
3773
|
flexGrow: 1
|
|
5948
3774
|
}
|
|
5949
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
3775
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5950
3776
|
variant: "text",
|
|
5951
3777
|
startIcon: /*#__PURE__*/_react["default"].createElement(_VisibilityOffRounded["default"], null),
|
|
5952
3778
|
sx: {
|
|
5953
3779
|
color: "black"
|
|
5954
3780
|
}
|
|
5955
|
-
}, "Hide Fields"), /*#__PURE__*/_react["default"].createElement(
|
|
3781
|
+
}, "Hide Fields"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5956
3782
|
variant: "text",
|
|
5957
3783
|
startIcon: /*#__PURE__*/_react["default"].createElement(_PivotTableChartRounded["default"], null),
|
|
5958
3784
|
sx: {
|
|
@@ -5962,35 +3788,35 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
5962
3788
|
onClick: function onClick() {
|
|
5963
3789
|
setShowStickyDialog(true);
|
|
5964
3790
|
}
|
|
5965
|
-
}, "Sticky"), /*#__PURE__*/_react["default"].createElement(
|
|
3791
|
+
}, "Sticky"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5966
3792
|
variant: "text",
|
|
5967
3793
|
startIcon: /*#__PURE__*/_react["default"].createElement(_FilterListRounded["default"], null),
|
|
5968
3794
|
sx: {
|
|
5969
3795
|
color: "black",
|
|
5970
3796
|
paddingLeft: 4
|
|
5971
3797
|
}
|
|
5972
|
-
}, "Filter"), /*#__PURE__*/_react["default"].createElement(
|
|
3798
|
+
}, "Filter"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5973
3799
|
variant: "text",
|
|
5974
3800
|
startIcon: /*#__PURE__*/_react["default"].createElement(_SwapVertRounded["default"], null),
|
|
5975
3801
|
sx: {
|
|
5976
3802
|
color: "black",
|
|
5977
3803
|
paddingLeft: 4
|
|
5978
3804
|
}
|
|
5979
|
-
}, "Sort"), /*#__PURE__*/_react["default"].createElement(
|
|
3805
|
+
}, "Sort"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5980
3806
|
variant: "text",
|
|
5981
3807
|
startIcon: /*#__PURE__*/_react["default"].createElement(_LineWeightRounded["default"], null),
|
|
5982
3808
|
sx: {
|
|
5983
3809
|
color: "black",
|
|
5984
3810
|
paddingLeft: 4
|
|
5985
3811
|
}
|
|
5986
|
-
}, "Row Height"), /*#__PURE__*/_react["default"].createElement(
|
|
3812
|
+
}, "Row Height"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
5987
3813
|
variant: "text",
|
|
5988
3814
|
startIcon: /*#__PURE__*/_react["default"].createElement(_ViewWeekRounded["default"], null),
|
|
5989
3815
|
sx: {
|
|
5990
3816
|
color: "black",
|
|
5991
3817
|
paddingLeft: 4
|
|
5992
3818
|
}
|
|
5993
|
-
}, "Reorder Columns")), /*#__PURE__*/_react["default"].createElement(
|
|
3819
|
+
}, "Reorder Columns")), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
5994
3820
|
sx: {
|
|
5995
3821
|
flexGrow: 0
|
|
5996
3822
|
}
|
|
@@ -6003,9 +3829,9 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6003
3829
|
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({}, stringAvatar(user.name, user.borderColor), {
|
|
6004
3830
|
alt: user.name
|
|
6005
3831
|
})));
|
|
6006
|
-
}))))), leftColumnSticky != null && rightColumnSticky != null && topRowSticky != null && bottomRowSticky != null && data != null && columns != null && /*#__PURE__*/_react["default"].createElement(
|
|
3832
|
+
}))))), leftColumnSticky != null && rightColumnSticky != null && topRowSticky != null && bottomRowSticky != null && data != null && columns != null && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6007
3833
|
sx: _objectSpread({}, sx)
|
|
6008
|
-
}, data != null && rows != null && /*#__PURE__*/_react["default"].createElement(
|
|
3834
|
+
}, data != null && rows != null && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6009
3835
|
className: "reactgrid-gold",
|
|
6010
3836
|
onKeyDown: function onKeyDown(e) {
|
|
6011
3837
|
var isMac = /Mac|iPod|iPhone|iPad/.test(navigator.platform);
|
|
@@ -6057,21 +3883,21 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6057
3883
|
id: "alert-dialog-title"
|
|
6058
3884
|
}, "Sticky"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
6059
3885
|
id: "alert-dialog-description"
|
|
6060
|
-
}, "Stick chosen rows and columns at the top or bottom rows or left and right columns. Sticky rows or columns will remain visible at all times."), /*#__PURE__*/_react["default"].createElement(
|
|
3886
|
+
}, "Stick chosen rows and columns at the top or bottom rows or left and right columns. Sticky rows or columns will remain visible at all times."), /*#__PURE__*/_react["default"].createElement(_TableContainer["default"], {
|
|
6061
3887
|
sx: {
|
|
6062
3888
|
paddingTop: 4
|
|
6063
3889
|
}
|
|
6064
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
3890
|
+
}, /*#__PURE__*/_react["default"].createElement(_Table["default"], {
|
|
6065
3891
|
"aria-label": "customized table"
|
|
6066
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
3892
|
+
}, /*#__PURE__*/_react["default"].createElement(_TableHead["default"], null, /*#__PURE__*/_react["default"].createElement(_TableRow["default"], null, /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6067
3893
|
align: "left"
|
|
6068
|
-
}, "Left Column"), /*#__PURE__*/_react["default"].createElement(
|
|
3894
|
+
}, "Left Column"), /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6069
3895
|
align: "left"
|
|
6070
|
-
}, "Right Column"), /*#__PURE__*/_react["default"].createElement(
|
|
3896
|
+
}, "Right Column"), /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6071
3897
|
align: "left"
|
|
6072
|
-
}, "Top Row"), /*#__PURE__*/_react["default"].createElement(
|
|
3898
|
+
}, "Top Row"), /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6073
3899
|
align: "left"
|
|
6074
|
-
}, "Bottom Row"))), /*#__PURE__*/_react["default"].createElement(
|
|
3900
|
+
}, "Bottom Row"))), /*#__PURE__*/_react["default"].createElement(_TableBody["default"], null, /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6075
3901
|
sx: {
|
|
6076
3902
|
paddingTop: 0
|
|
6077
3903
|
}
|
|
@@ -6080,7 +3906,7 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6080
3906
|
type: "number",
|
|
6081
3907
|
defaultValue: "0",
|
|
6082
3908
|
variant: "outlined"
|
|
6083
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
3909
|
+
})), /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6084
3910
|
sx: {
|
|
6085
3911
|
paddingTop: 0
|
|
6086
3912
|
}
|
|
@@ -6089,7 +3915,7 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6089
3915
|
type: "number",
|
|
6090
3916
|
defaultValue: "0",
|
|
6091
3917
|
variant: "outlined"
|
|
6092
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
3918
|
+
})), /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6093
3919
|
sx: {
|
|
6094
3920
|
paddingTop: 0
|
|
6095
3921
|
}
|
|
@@ -6098,7 +3924,7 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6098
3924
|
type: "number",
|
|
6099
3925
|
defaultValue: "0",
|
|
6100
3926
|
variant: "outlined"
|
|
6101
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
3927
|
+
})), /*#__PURE__*/_react["default"].createElement(_TableCell["default"], {
|
|
6102
3928
|
sx: {
|
|
6103
3929
|
paddingTop: 0
|
|
6104
3930
|
}
|
|
@@ -6107,11 +3933,11 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6107
3933
|
type: "number",
|
|
6108
3934
|
defaultValue: "0",
|
|
6109
3935
|
variant: "outlined"
|
|
6110
|
-
})))))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(
|
|
3936
|
+
})))))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
6111
3937
|
onClick: function onClick() {
|
|
6112
3938
|
setShowStickyDialog(false);
|
|
6113
3939
|
}
|
|
6114
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(
|
|
3940
|
+
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
6115
3941
|
onClick: function onClick() {
|
|
6116
3942
|
localStorage.setItem("leftColumn", leftColumnRef.current.value);
|
|
6117
3943
|
localStorage.setItem("rightColumn", rightColumnRef.current.value);
|
|
@@ -6137,7 +3963,7 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6137
3963
|
id: "alert-dialog-title"
|
|
6138
3964
|
}, "Reorder Columns"), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
|
|
6139
3965
|
id: "alert-dialog-description"
|
|
6140
|
-
}, "Assign the column order from left to right."), columns != null && /*#__PURE__*/_react["default"].createElement(
|
|
3966
|
+
}, "Assign the column order from left to right."), columns != null && /*#__PURE__*/_react["default"].createElement(_List["default"], null, /*#__PURE__*/_react["default"].createElement(_core.DndContext, {
|
|
6141
3967
|
onDragEnd: function onDragEnd(event) {
|
|
6142
3968
|
var over = event.over;
|
|
6143
3969
|
alert(over.id);
|
|
@@ -6152,11 +3978,11 @@ var SpreadsheetViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
6152
3978
|
key: item.columnId,
|
|
6153
3979
|
id: item.columnId
|
|
6154
3980
|
});
|
|
6155
|
-
}))))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(
|
|
3981
|
+
}))))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
6156
3982
|
onClick: function onClick() {
|
|
6157
3983
|
setShowStickyDialog(false);
|
|
6158
3984
|
}
|
|
6159
|
-
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(
|
|
3985
|
+
}, "Cancel"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
6160
3986
|
onClick: function onClick() {},
|
|
6161
3987
|
autoFocus: true
|
|
6162
3988
|
}, "Apply"))));
|
|
@@ -6210,7 +4036,14 @@ var _reactStripeJs = require("@stripe/react-stripe-js");
|
|
|
6210
4036
|
var _stripeJs = require("@stripe/stripe-js");
|
|
6211
4037
|
var _PaymentRounded = _interopRequireDefault(require("@mui/icons-material/PaymentRounded"));
|
|
6212
4038
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
6213
|
-
var
|
|
4039
|
+
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
4040
|
+
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
4041
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
4042
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
4043
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
4044
|
+
var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
|
|
4045
|
+
var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
|
|
4046
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
6214
4047
|
var _excluded = ["children", "value", "index"];
|
|
6215
4048
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6216
4049
|
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); }
|
|
@@ -6453,7 +4286,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
6453
4286
|
}();
|
|
6454
4287
|
return /*#__PURE__*/_react["default"].createElement("form", {
|
|
6455
4288
|
onSubmit: handleSubmit
|
|
6456
|
-
}, /*#__PURE__*/_react["default"].createElement(_reactStripeJs.PaymentElement, null), /*#__PURE__*/_react["default"].createElement(
|
|
4289
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactStripeJs.PaymentElement, null), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
6457
4290
|
startIcon: /*#__PURE__*/_react["default"].createElement(_PaymentRounded["default"], null),
|
|
6458
4291
|
type: "submit",
|
|
6459
4292
|
fullWidth: true,
|
|
@@ -6581,7 +4414,7 @@ function StripePayment(_ref3) {
|
|
|
6581
4414
|
var PaymentMethod = function PaymentMethod(_ref5) {
|
|
6582
4415
|
var paymentMethod = _ref5.paymentMethod,
|
|
6583
4416
|
clicked = _ref5.clicked;
|
|
6584
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
4417
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6585
4418
|
fullWidth: true,
|
|
6586
4419
|
sx: {
|
|
6587
4420
|
height: 160,
|
|
@@ -6620,7 +4453,7 @@ function StripePayment(_ref3) {
|
|
|
6620
4453
|
fontSize: 18,
|
|
6621
4454
|
color: "white"
|
|
6622
4455
|
}
|
|
6623
|
-
}, "* * * * \xA0 * * * * \xA0 * * * * \xA0 ", paymentMethod.last4), /*#__PURE__*/_react["default"].createElement(
|
|
4456
|
+
}, "* * * * \xA0 * * * * \xA0 * * * * \xA0 ", paymentMethod.last4), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
6624
4457
|
container: true,
|
|
6625
4458
|
spacing: 1,
|
|
6626
4459
|
sx: {
|
|
@@ -6629,7 +4462,7 @@ function StripePayment(_ref3) {
|
|
|
6629
4462
|
marginLeft: 0,
|
|
6630
4463
|
width: "100%"
|
|
6631
4464
|
}
|
|
6632
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4465
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
6633
4466
|
item: true,
|
|
6634
4467
|
xs: 12,
|
|
6635
4468
|
sx: {
|
|
@@ -6668,42 +4501,42 @@ function StripePayment(_ref3) {
|
|
|
6668
4501
|
hidden: value !== index,
|
|
6669
4502
|
id: "simple-tabpanel-".concat(index),
|
|
6670
4503
|
"aria-labelledby": "simple-tab-".concat(index)
|
|
6671
|
-
}, other), value === index && /*#__PURE__*/_react["default"].createElement(
|
|
4504
|
+
}, other), value === index && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6672
4505
|
sx: {
|
|
6673
4506
|
p: 3
|
|
6674
4507
|
}
|
|
6675
4508
|
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], null, children)));
|
|
6676
4509
|
}
|
|
6677
4510
|
var PaymentContent = function PaymentContent() {
|
|
6678
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
4511
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6679
4512
|
sx: {
|
|
6680
4513
|
width: '100%'
|
|
6681
4514
|
}
|
|
6682
|
-
}, currentUser == null && /*#__PURE__*/_react["default"].createElement(
|
|
4515
|
+
}, currentUser == null && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6683
4516
|
mt: 4
|
|
6684
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4517
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
6685
4518
|
container: true,
|
|
6686
4519
|
spacing: 2
|
|
6687
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4520
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
6688
4521
|
item: true,
|
|
6689
4522
|
xs: 6
|
|
6690
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4523
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
6691
4524
|
id: "outlined-basic",
|
|
6692
4525
|
label: "First Name",
|
|
6693
4526
|
variant: "outlined",
|
|
6694
4527
|
fullWidth: true
|
|
6695
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
4528
|
+
})), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
6696
4529
|
item: true,
|
|
6697
4530
|
xs: 6
|
|
6698
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4531
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
6699
4532
|
id: "outlined-basic",
|
|
6700
4533
|
label: "Last Name",
|
|
6701
4534
|
variant: "outlined",
|
|
6702
4535
|
fullWidth: true
|
|
6703
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
4536
|
+
})), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
6704
4537
|
item: true,
|
|
6705
4538
|
xs: 12
|
|
6706
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4539
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
|
|
6707
4540
|
id: "outlined-basic",
|
|
6708
4541
|
label: "Email",
|
|
6709
4542
|
variant: "outlined",
|
|
@@ -6720,23 +4553,23 @@ function StripePayment(_ref3) {
|
|
|
6720
4553
|
currentUser: currentUser,
|
|
6721
4554
|
walletId: walletId,
|
|
6722
4555
|
amount: amount
|
|
6723
|
-
}))), currentUser != null && /*#__PURE__*/_react["default"].createElement(
|
|
4556
|
+
}))), currentUser != null && /*#__PURE__*/_react["default"].createElement(_Box["default"], null, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6724
4557
|
sx: {
|
|
6725
4558
|
borderBottom: 1,
|
|
6726
4559
|
borderColor: 'divider'
|
|
6727
4560
|
}
|
|
6728
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4561
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tabs["default"], {
|
|
6729
4562
|
value: value,
|
|
6730
4563
|
onChange: handleChange,
|
|
6731
4564
|
"aria-label": "basic tabs example"
|
|
6732
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4565
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
6733
4566
|
label: "Add Payment Method"
|
|
6734
|
-
}, a11yProps(0))), paymentMethods.length > 0 && /*#__PURE__*/_react["default"].createElement(
|
|
4567
|
+
}, a11yProps(0))), paymentMethods.length > 0 && /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
6735
4568
|
label: "Existing Payment Method"
|
|
6736
4569
|
}, a11yProps(1))))), paymentMethods.length > 0 && /*#__PURE__*/_react["default"].createElement(TabPanel, {
|
|
6737
4570
|
value: value,
|
|
6738
4571
|
index: 1
|
|
6739
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
4572
|
+
}, /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
6740
4573
|
sx: {
|
|
6741
4574
|
marginTop: 4
|
|
6742
4575
|
},
|
|
@@ -6747,7 +4580,7 @@ function StripePayment(_ref3) {
|
|
|
6747
4580
|
setPaymentMethod(val.target.value);
|
|
6748
4581
|
}
|
|
6749
4582
|
}, paymentMethods != null && paymentMethods.map(function (paymentMethod, index) {
|
|
6750
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
4583
|
+
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
6751
4584
|
key: index,
|
|
6752
4585
|
value: paymentMethod.id,
|
|
6753
4586
|
fullWidth: true,
|
|
@@ -6758,7 +4591,7 @@ function StripePayment(_ref3) {
|
|
|
6758
4591
|
paymentMethod: paymentMethod,
|
|
6759
4592
|
clicked: function clicked() {}
|
|
6760
4593
|
}));
|
|
6761
|
-
})), amount != null && /*#__PURE__*/_react["default"].createElement(
|
|
4594
|
+
})), amount != null && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
6762
4595
|
startIcon: /*#__PURE__*/_react["default"].createElement(_PaymentRounded["default"], null),
|
|
6763
4596
|
type: "submit",
|
|
6764
4597
|
variant: "contained",
|
|
@@ -6808,7 +4641,7 @@ function StripePayment(_ref3) {
|
|
|
6808
4641
|
}, payButtonText != null ? payButtonText : "Pay Now")), /*#__PURE__*/_react["default"].createElement(TabPanel, {
|
|
6809
4642
|
value: value,
|
|
6810
4643
|
index: 0
|
|
6811
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(
|
|
4644
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
6812
4645
|
mt: 4
|
|
6813
4646
|
}, options != null && process.env.stripePublicKey != null && /*#__PURE__*/_react["default"].createElement(_reactStripeJs.Elements, {
|
|
6814
4647
|
stripe: stripePromise,
|