authscape 1.0.222 → 1.0.224
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 +453 -19
- package/package.json +2 -1
- package/src/components/OEMEditor.js +324 -0
- package/src/services/apiService.js +10 -6
- package/src/services/authService.js +3 -1
- package/src/services/signInValidator.js +2 -1
package/index.js
CHANGED
|
@@ -1324,6 +1324,431 @@ var GooglePlacesModal = function GooglePlacesModal(_ref3) {
|
|
|
1324
1324
|
exports.GooglePlacesModal = GooglePlacesModal;
|
|
1325
1325
|
"use strict";
|
|
1326
1326
|
|
|
1327
|
+
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); }
|
|
1328
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1329
|
+
value: true
|
|
1330
|
+
});
|
|
1331
|
+
exports.OEMEditor = OEMEditor;
|
|
1332
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
1333
|
+
var _react2 = _interopRequireWildcard(require("@monaco-editor/react"));
|
|
1334
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
1335
|
+
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
1336
|
+
var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
|
|
1337
|
+
var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
|
|
1338
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
1339
|
+
var _material = require("@mui/material");
|
|
1340
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
1341
|
+
var _excluded = ["children", "value", "index"];
|
|
1342
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1343
|
+
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); }
|
|
1344
|
+
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; }
|
|
1345
|
+
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; }
|
|
1346
|
+
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); } }
|
|
1347
|
+
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); }); }; }
|
|
1348
|
+
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); }
|
|
1349
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
1350
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
1351
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1352
|
+
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."); }
|
|
1353
|
+
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); }
|
|
1354
|
+
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; }
|
|
1355
|
+
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; } }
|
|
1356
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1357
|
+
function OEMEditor(_ref) {
|
|
1358
|
+
var loadedUser = _ref.loadedUser,
|
|
1359
|
+
notification = _ref.notification,
|
|
1360
|
+
_ref$companyId = _ref.companyId,
|
|
1361
|
+
companyId = _ref$companyId === void 0 ? null : _ref$companyId;
|
|
1362
|
+
var cssEditorRef = (0, _react.useRef)(null);
|
|
1363
|
+
var htmlEditorRef = (0, _react.useRef)(null);
|
|
1364
|
+
var _useState = (0, _react.useState)(''),
|
|
1365
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1366
|
+
data = _useState2[0],
|
|
1367
|
+
setData = _useState2[1];
|
|
1368
|
+
var _React$useState = _react["default"].useState(0),
|
|
1369
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1370
|
+
value = _React$useState2[0],
|
|
1371
|
+
setValue = _React$useState2[1];
|
|
1372
|
+
var _useState3 = (0, _react.useState)([]),
|
|
1373
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1374
|
+
fonts = _useState4[0],
|
|
1375
|
+
setFonts = _useState4[1];
|
|
1376
|
+
var _useState5 = (0, _react.useState)([]),
|
|
1377
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
1378
|
+
dnsFields = _useState6[0],
|
|
1379
|
+
setDnsFields = _useState6[1];
|
|
1380
|
+
var _useState7 = (0, _react.useState)(null),
|
|
1381
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
1382
|
+
selectedFont = _useState8[0],
|
|
1383
|
+
setSelectedFont = _useState8[1];
|
|
1384
|
+
function TabPanel(props) {
|
|
1385
|
+
var children = props.children,
|
|
1386
|
+
value = props.value,
|
|
1387
|
+
index = props.index,
|
|
1388
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
1389
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
1390
|
+
role: "tabpanel",
|
|
1391
|
+
hidden: value !== index,
|
|
1392
|
+
id: "simple-tabpanel-".concat(index),
|
|
1393
|
+
"aria-labelledby": "simple-tab-".concat(index)
|
|
1394
|
+
}, other), value === index && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1395
|
+
sx: {
|
|
1396
|
+
p: 3
|
|
1397
|
+
}
|
|
1398
|
+
}, children));
|
|
1399
|
+
}
|
|
1400
|
+
function a11yProps(index) {
|
|
1401
|
+
return {
|
|
1402
|
+
id: "simple-tab-".concat(index),
|
|
1403
|
+
'aria-controls': "simple-tabpanel-".concat(index)
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
var handleChange = function handleChange(event, newValue) {
|
|
1407
|
+
setValue(newValue);
|
|
1408
|
+
};
|
|
1409
|
+
var GetBaseUrl = function GetBaseUrl() {
|
|
1410
|
+
return window.location.protocol + "//" + window.location.host;
|
|
1411
|
+
};
|
|
1412
|
+
(0, _react.useEffect)(function () {
|
|
1413
|
+
if (loadedUser) {
|
|
1414
|
+
var fetchData = /*#__PURE__*/function () {
|
|
1415
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
1416
|
+
var response, domain, responseFields;
|
|
1417
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1418
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1419
|
+
case 0:
|
|
1420
|
+
_context.next = 2;
|
|
1421
|
+
return apiService().get("/OEM/GetFonts");
|
|
1422
|
+
case 2:
|
|
1423
|
+
response = _context.sent;
|
|
1424
|
+
if (response != null && response.status == 200) {
|
|
1425
|
+
setFonts(response.data);
|
|
1426
|
+
}
|
|
1427
|
+
domain = GetBaseUrl();
|
|
1428
|
+
_context.next = 7;
|
|
1429
|
+
return apiService().get("/OEM/GetFields?domain=" + domain + "&companyId=" + companyId);
|
|
1430
|
+
case 7:
|
|
1431
|
+
responseFields = _context.sent;
|
|
1432
|
+
if (responseFields != null && responseFields.status == 200) {
|
|
1433
|
+
setDnsFields(responseFields.data);
|
|
1434
|
+
}
|
|
1435
|
+
case 9:
|
|
1436
|
+
case "end":
|
|
1437
|
+
return _context.stop();
|
|
1438
|
+
}
|
|
1439
|
+
}, _callee);
|
|
1440
|
+
}));
|
|
1441
|
+
return function fetchData() {
|
|
1442
|
+
return _ref2.apply(this, arguments);
|
|
1443
|
+
};
|
|
1444
|
+
}();
|
|
1445
|
+
fetchData();
|
|
1446
|
+
}
|
|
1447
|
+
}, [loadedUser]);
|
|
1448
|
+
function handleCSSEditorDidMount(editor, monaco) {
|
|
1449
|
+
cssEditorRef.current = editor;
|
|
1450
|
+
}
|
|
1451
|
+
function handleHtmlEditorDidMount(editor, monaco) {
|
|
1452
|
+
htmlEditorRef.current = editor;
|
|
1453
|
+
}
|
|
1454
|
+
var monaco = (0, _react2.useMonaco)();
|
|
1455
|
+
var columns = [{
|
|
1456
|
+
field: "label",
|
|
1457
|
+
headerName: "Fonts",
|
|
1458
|
+
width: 200,
|
|
1459
|
+
editable: false,
|
|
1460
|
+
renderCell: function renderCell(params) {
|
|
1461
|
+
var RenderData = function RenderData(row) {
|
|
1462
|
+
// const { id, value, field } = params;
|
|
1463
|
+
// const apiRef = useGridApiContext();
|
|
1464
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1465
|
+
sx: {
|
|
1466
|
+
fontFamily: row.value,
|
|
1467
|
+
fontSize: 20
|
|
1468
|
+
}
|
|
1469
|
+
}, row.value), /*#__PURE__*/_react["default"].createElement("link", {
|
|
1470
|
+
href: "https://fonts.googleapis.com/css2?family=" + row.value,
|
|
1471
|
+
rel: "stylesheet"
|
|
1472
|
+
}));
|
|
1473
|
+
};
|
|
1474
|
+
return RenderData(params);
|
|
1475
|
+
}
|
|
1476
|
+
}];
|
|
1477
|
+
(0, _react.useEffect)(function () {
|
|
1478
|
+
var fetchData = /*#__PURE__*/function () {
|
|
1479
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1480
|
+
var baseUri, response;
|
|
1481
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1482
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1483
|
+
case 0:
|
|
1484
|
+
// if (monaco) {
|
|
1485
|
+
// //console.log("here is the monaco instance:", monaco);
|
|
1486
|
+
// }
|
|
1487
|
+
baseUri = GetBaseUrl();
|
|
1488
|
+
_context2.next = 3;
|
|
1489
|
+
return apiService().get("/oem/GetEditorData?domain=" + baseUri + "&companyId=" + companyId);
|
|
1490
|
+
case 3:
|
|
1491
|
+
response = _context2.sent;
|
|
1492
|
+
if (response.status == 200) {
|
|
1493
|
+
setData(response.data);
|
|
1494
|
+
setSelectedFont(response.data.fontFamily);
|
|
1495
|
+
}
|
|
1496
|
+
case 5:
|
|
1497
|
+
case "end":
|
|
1498
|
+
return _context2.stop();
|
|
1499
|
+
}
|
|
1500
|
+
}, _callee2);
|
|
1501
|
+
}));
|
|
1502
|
+
return function fetchData() {
|
|
1503
|
+
return _ref3.apply(this, arguments);
|
|
1504
|
+
};
|
|
1505
|
+
}();
|
|
1506
|
+
fetchData();
|
|
1507
|
+
}, [monaco]);
|
|
1508
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1509
|
+
sx: {
|
|
1510
|
+
width: '100%'
|
|
1511
|
+
}
|
|
1512
|
+
}, selectedFont != null && /*#__PURE__*/_react["default"].createElement("link", {
|
|
1513
|
+
href: "https://fonts.googleapis.com/css2?family=" + selectedFont,
|
|
1514
|
+
rel: "stylesheet"
|
|
1515
|
+
}), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1516
|
+
sx: {
|
|
1517
|
+
borderBottom: 1,
|
|
1518
|
+
borderColor: 'divider'
|
|
1519
|
+
}
|
|
1520
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tabs["default"], {
|
|
1521
|
+
value: value,
|
|
1522
|
+
onChange: handleChange,
|
|
1523
|
+
"aria-label": "basic tabs example"
|
|
1524
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
1525
|
+
label: "General"
|
|
1526
|
+
}, a11yProps(0))), /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
1527
|
+
label: "Fonts"
|
|
1528
|
+
}, a11yProps(1))), /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
1529
|
+
label: "Style Sheet Editor"
|
|
1530
|
+
}, a11yProps(2))), /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
1531
|
+
label: "HTML Import Editor"
|
|
1532
|
+
}, a11yProps(3))))), /*#__PURE__*/_react["default"].createElement(TabPanel, {
|
|
1533
|
+
value: value,
|
|
1534
|
+
index: 0
|
|
1535
|
+
}, dnsFields != null && dnsFields.map(function (dnsField) {
|
|
1536
|
+
return /*#__PURE__*/_react["default"].createElement(_Box["default"], null, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1537
|
+
container: true,
|
|
1538
|
+
spacing: 2
|
|
1539
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1540
|
+
item: true,
|
|
1541
|
+
xs: 3
|
|
1542
|
+
}, dnsField.name), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1543
|
+
item: true,
|
|
1544
|
+
xs: 9
|
|
1545
|
+
}, /*#__PURE__*/_react["default"].createElement(ColorPicker, {
|
|
1546
|
+
name: dnsField.name,
|
|
1547
|
+
defaultColor: dnsField.value,
|
|
1548
|
+
onColorChanged: /*#__PURE__*/function () {
|
|
1549
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(name, hex) {
|
|
1550
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1551
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1552
|
+
case 0:
|
|
1553
|
+
_context3.next = 2;
|
|
1554
|
+
return apiService().post("/OEM/SetFieldValue", {
|
|
1555
|
+
id: dnsField.id,
|
|
1556
|
+
fieldId: dnsField.fieldId,
|
|
1557
|
+
value: hex
|
|
1558
|
+
});
|
|
1559
|
+
case 2:
|
|
1560
|
+
notification(dnsField.name + " Saved");
|
|
1561
|
+
case 3:
|
|
1562
|
+
case "end":
|
|
1563
|
+
return _context3.stop();
|
|
1564
|
+
}
|
|
1565
|
+
}, _callee3);
|
|
1566
|
+
}));
|
|
1567
|
+
return function (_x2, _x3) {
|
|
1568
|
+
return _ref4.apply(this, arguments);
|
|
1569
|
+
};
|
|
1570
|
+
}()
|
|
1571
|
+
}))));
|
|
1572
|
+
})), /*#__PURE__*/_react["default"].createElement(TabPanel, {
|
|
1573
|
+
value: value,
|
|
1574
|
+
index: 1
|
|
1575
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1576
|
+
container: true,
|
|
1577
|
+
spacing: 2
|
|
1578
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1579
|
+
item: true,
|
|
1580
|
+
xs: 6
|
|
1581
|
+
}, loadedUser && /*#__PURE__*/_react["default"].createElement(_xDataGrid.DataGrid, {
|
|
1582
|
+
rows: fonts,
|
|
1583
|
+
columns: columns,
|
|
1584
|
+
sx: {
|
|
1585
|
+
height: "80vh"
|
|
1586
|
+
},
|
|
1587
|
+
onRowClick: /*#__PURE__*/function () {
|
|
1588
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(row) {
|
|
1589
|
+
var baseUri, response;
|
|
1590
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1591
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1592
|
+
case 0:
|
|
1593
|
+
baseUri = GetBaseUrl();
|
|
1594
|
+
_context4.next = 3;
|
|
1595
|
+
return apiService().post("/OEM/SetFont", {
|
|
1596
|
+
companyId: companyId,
|
|
1597
|
+
domain: baseUri,
|
|
1598
|
+
value: row.row.label
|
|
1599
|
+
});
|
|
1600
|
+
case 3:
|
|
1601
|
+
response = _context4.sent;
|
|
1602
|
+
if (response != null && response.status == 200) {
|
|
1603
|
+
setSelectedFont(row.row.label);
|
|
1604
|
+
notification("Font saved!");
|
|
1605
|
+
}
|
|
1606
|
+
case 5:
|
|
1607
|
+
case "end":
|
|
1608
|
+
return _context4.stop();
|
|
1609
|
+
}
|
|
1610
|
+
}, _callee4);
|
|
1611
|
+
}));
|
|
1612
|
+
return function (_x4) {
|
|
1613
|
+
return _ref5.apply(this, arguments);
|
|
1614
|
+
};
|
|
1615
|
+
}()
|
|
1616
|
+
})), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1617
|
+
item: true,
|
|
1618
|
+
xs: 6,
|
|
1619
|
+
sx: {
|
|
1620
|
+
marginTop: 4
|
|
1621
|
+
}
|
|
1622
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box["default"], null, "Font Selected:"), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1623
|
+
sx: {
|
|
1624
|
+
marginBottom: 2,
|
|
1625
|
+
fontWeight: "bold",
|
|
1626
|
+
fontSize: 20
|
|
1627
|
+
}
|
|
1628
|
+
}, " ", selectedFont), /*#__PURE__*/_react["default"].createElement("hr", null), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1629
|
+
sx: {
|
|
1630
|
+
fontFamily: selectedFont
|
|
1631
|
+
}
|
|
1632
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut ultricies odio. Nunc ut quam turpis. In hac habitasse platea dictumst. Suspendisse potenti. Nullam malesuada, purus id sagittis vestibulum, massa tellus gravida elit, vitae ultrices tortor nulla ac nunc. Aenean tempus semper est vel convallis. Sed feugiat, risus eu tincidunt eleifend, purus metus vulputate nulla, et condimentum sapien erat in nisi. Nunc non malesuada libero. Donec tempus tincidunt mi at vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse potenti. Etiam nec eleifend orci. Suspendisse in est vel nunc rhoncus bibendum vitae id felis. Integer bibendum dolor elit, at tincidunt lacus tempor ac. Maecenas lobortis, mauris at condimentum feugiat, nulla orci condimentum massa, sed facilisis tellus ligula vitae metus. Aliquam erat volutpat. Quisque dignissim felis augue, at semper nisl posuere ut. Proin fringilla diam vitae faucibus finibus.", /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement("br", null), "Aenean tempus semper est vel convallis. Sed feugiat, risus eu tincidunt eleifend, purus metus vulputate nulla, et condimentum sapien erat in nisi. Nunc non malesuada libero. Donec tempus tincidunt mi at vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse potenti")))), /*#__PURE__*/_react["default"].createElement(TabPanel, {
|
|
1633
|
+
value: value,
|
|
1634
|
+
index: 2
|
|
1635
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1636
|
+
container: true,
|
|
1637
|
+
spacing: 2
|
|
1638
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1639
|
+
item: true,
|
|
1640
|
+
xs: 6
|
|
1641
|
+
}, /*#__PURE__*/_react["default"].createElement("h4", {
|
|
1642
|
+
style: {
|
|
1643
|
+
marginBottom: "0px"
|
|
1644
|
+
}
|
|
1645
|
+
}, "Global CSS edits"), /*#__PURE__*/_react["default"].createElement("small", null, "You can make edits to your stylesheet")), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1646
|
+
item: true,
|
|
1647
|
+
xs: 6,
|
|
1648
|
+
sx: {
|
|
1649
|
+
textAlign: "right"
|
|
1650
|
+
}
|
|
1651
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
1652
|
+
startIcon: /*#__PURE__*/_react["default"].createElement(_Check["default"], null),
|
|
1653
|
+
sx: {
|
|
1654
|
+
marginTop: 4
|
|
1655
|
+
},
|
|
1656
|
+
variant: "contained",
|
|
1657
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
1658
|
+
var baseUri, response;
|
|
1659
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
1660
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1661
|
+
case 0:
|
|
1662
|
+
baseUri = GetBaseUrl();
|
|
1663
|
+
_context5.next = 3;
|
|
1664
|
+
return apiService().post("/OEM/SetGlobalCSS", {
|
|
1665
|
+
companyId: companyId,
|
|
1666
|
+
domain: baseUri,
|
|
1667
|
+
value: cssEditorRef.current.getValue()
|
|
1668
|
+
});
|
|
1669
|
+
case 3:
|
|
1670
|
+
response = _context5.sent;
|
|
1671
|
+
if (response != null && response.status == 200) {
|
|
1672
|
+
notification("CSS Saved!");
|
|
1673
|
+
}
|
|
1674
|
+
case 5:
|
|
1675
|
+
case "end":
|
|
1676
|
+
return _context5.stop();
|
|
1677
|
+
}
|
|
1678
|
+
}, _callee5);
|
|
1679
|
+
}))
|
|
1680
|
+
}, "Save Changes"))), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1681
|
+
sx: {
|
|
1682
|
+
paddingTop: 1
|
|
1683
|
+
}
|
|
1684
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2["default"], {
|
|
1685
|
+
height: "70vh",
|
|
1686
|
+
onMount: handleCSSEditorDidMount,
|
|
1687
|
+
defaultLanguage: "css",
|
|
1688
|
+
theme: "vs-dark",
|
|
1689
|
+
defaultValue: data.prettyCSS == null ? "" : data.prettyCSS
|
|
1690
|
+
}))), /*#__PURE__*/_react["default"].createElement(TabPanel, {
|
|
1691
|
+
value: value,
|
|
1692
|
+
index: 3
|
|
1693
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1694
|
+
container: true,
|
|
1695
|
+
spacing: 2
|
|
1696
|
+
}, /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1697
|
+
item: true,
|
|
1698
|
+
xs: 6
|
|
1699
|
+
}, /*#__PURE__*/_react["default"].createElement("h4", {
|
|
1700
|
+
style: {
|
|
1701
|
+
marginBottom: "0px"
|
|
1702
|
+
}
|
|
1703
|
+
}, "HTML import Edits"), /*#__PURE__*/_react["default"].createElement("small", null, "You can add imports such as google analytics or clarity")), /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
1704
|
+
item: true,
|
|
1705
|
+
xs: 6,
|
|
1706
|
+
sx: {
|
|
1707
|
+
textAlign: "right"
|
|
1708
|
+
}
|
|
1709
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
1710
|
+
startIcon: /*#__PURE__*/_react["default"].createElement(_Check["default"], null),
|
|
1711
|
+
sx: {
|
|
1712
|
+
marginTop: 4
|
|
1713
|
+
},
|
|
1714
|
+
variant: "contained",
|
|
1715
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
1716
|
+
var baseUri, response;
|
|
1717
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
1718
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1719
|
+
case 0:
|
|
1720
|
+
baseUri = GetBaseUrl();
|
|
1721
|
+
_context6.next = 3;
|
|
1722
|
+
return apiService().post("/OEM/SetGlobalHTML", {
|
|
1723
|
+
companyId: companyId,
|
|
1724
|
+
domain: baseUri,
|
|
1725
|
+
value: htmlEditorRef.current.getValue()
|
|
1726
|
+
});
|
|
1727
|
+
case 3:
|
|
1728
|
+
response = _context6.sent;
|
|
1729
|
+
if (response != null && response.status == 200) {
|
|
1730
|
+
notification("HTML saved!");
|
|
1731
|
+
}
|
|
1732
|
+
case 5:
|
|
1733
|
+
case "end":
|
|
1734
|
+
return _context6.stop();
|
|
1735
|
+
}
|
|
1736
|
+
}, _callee6);
|
|
1737
|
+
}))
|
|
1738
|
+
}, "Save Changes"))), /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
1739
|
+
sx: {
|
|
1740
|
+
paddingTop: 1
|
|
1741
|
+
}
|
|
1742
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2["default"], {
|
|
1743
|
+
height: "70vh",
|
|
1744
|
+
onMount: handleHtmlEditorDidMount,
|
|
1745
|
+
defaultLanguage: "html",
|
|
1746
|
+
theme: "vs-dark",
|
|
1747
|
+
defaultValue: data.prettyHTML == null ? "" : data.prettyHTML
|
|
1748
|
+
})))));
|
|
1749
|
+
}
|
|
1750
|
+
"use strict";
|
|
1751
|
+
|
|
1327
1752
|
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); }
|
|
1328
1753
|
Object.defineProperty(exports, "__esModule", {
|
|
1329
1754
|
value: true
|
|
@@ -2028,7 +2453,7 @@ var setupDefaultOptions = /*#__PURE__*/function () {
|
|
|
2028
2453
|
}();
|
|
2029
2454
|
var RefreshToken = /*#__PURE__*/function () {
|
|
2030
2455
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(originalRequest, instance) {
|
|
2031
|
-
var accessToken, refreshToken, response;
|
|
2456
|
+
var accessToken, refreshToken, response, baseURL;
|
|
2032
2457
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2033
2458
|
while (1) switch (_context2.prev = _context2.next) {
|
|
2034
2459
|
case 0:
|
|
@@ -2049,34 +2474,38 @@ var RefreshToken = /*#__PURE__*/function () {
|
|
|
2049
2474
|
case 4:
|
|
2050
2475
|
response = _context2.sent;
|
|
2051
2476
|
if (!(response != null && response.status == 200)) {
|
|
2052
|
-
_context2.next =
|
|
2477
|
+
_context2.next = 14;
|
|
2053
2478
|
break;
|
|
2054
2479
|
}
|
|
2480
|
+
baseURL = window.location.protocol + "//" + window.location.host;
|
|
2055
2481
|
originalRequest.headers['Authorization'] = 'Bearer ' + response.data.access_token;
|
|
2056
|
-
_context2.next =
|
|
2482
|
+
_context2.next = 10;
|
|
2057
2483
|
return (0, _nookies.setCookie)(null, "access_token", response.data.access_token, {
|
|
2058
2484
|
maxAge: 2147483647,
|
|
2059
2485
|
path: '/',
|
|
2060
|
-
domain:
|
|
2486
|
+
domain: baseURL,
|
|
2487
|
+
//process.env.cookieDomain,
|
|
2061
2488
|
secure: true
|
|
2062
2489
|
});
|
|
2063
|
-
case
|
|
2064
|
-
_context2.next =
|
|
2490
|
+
case 10:
|
|
2491
|
+
_context2.next = 12;
|
|
2065
2492
|
return (0, _nookies.setCookie)(null, "expires_in", response.data.expires_in, {
|
|
2066
2493
|
maxAge: 2147483647,
|
|
2067
2494
|
path: '/',
|
|
2068
|
-
domain:
|
|
2495
|
+
domain: baseURL,
|
|
2496
|
+
//process.env.cookieDomain,
|
|
2069
2497
|
secure: true
|
|
2070
2498
|
});
|
|
2071
|
-
case
|
|
2072
|
-
_context2.next =
|
|
2499
|
+
case 12:
|
|
2500
|
+
_context2.next = 14;
|
|
2073
2501
|
return (0, _nookies.setCookie)(null, "refresh_token", response.data.refresh_token, {
|
|
2074
2502
|
maxAge: 2147483647,
|
|
2075
2503
|
path: '/',
|
|
2076
|
-
domain:
|
|
2504
|
+
domain: baseURL,
|
|
2505
|
+
//process.env.cookieDomain,
|
|
2077
2506
|
secure: true
|
|
2078
2507
|
});
|
|
2079
|
-
case
|
|
2508
|
+
case 14:
|
|
2080
2509
|
case "end":
|
|
2081
2510
|
return _context2.stop();
|
|
2082
2511
|
}
|
|
@@ -2103,7 +2532,7 @@ var apiService = function apiService() {
|
|
|
2103
2532
|
return response;
|
|
2104
2533
|
}, /*#__PURE__*/function () {
|
|
2105
2534
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(error) {
|
|
2106
|
-
var originalConfig;
|
|
2535
|
+
var originalConfig, baseURL;
|
|
2107
2536
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
2108
2537
|
while (1) switch (_context3.prev = _context3.next) {
|
|
2109
2538
|
case 0:
|
|
@@ -2133,20 +2562,23 @@ var apiService = function apiService() {
|
|
|
2133
2562
|
if (error.response.config.url.includes("/connect/token"))
|
|
2134
2563
|
// remove the access and refresh if invalid
|
|
2135
2564
|
{
|
|
2565
|
+
baseURL = window.location.protocol + "//" + window.location.host;
|
|
2136
2566
|
(0, _nookies.destroyCookie)(null, "access_token", {
|
|
2137
2567
|
maxAge: 2147483647,
|
|
2138
2568
|
path: '/',
|
|
2139
|
-
domain: process.env.cookieDomain
|
|
2569
|
+
domain: baseURL //process.env.cookieDomain
|
|
2140
2570
|
});
|
|
2571
|
+
|
|
2141
2572
|
(0, _nookies.destroyCookie)(null, "refresh_token", {
|
|
2142
2573
|
maxAge: 2147483647,
|
|
2143
2574
|
path: '/',
|
|
2144
|
-
domain: process.env.cookieDomain
|
|
2575
|
+
domain: baseURL //process.env.cookieDomain
|
|
2145
2576
|
});
|
|
2577
|
+
|
|
2146
2578
|
(0, _nookies.destroyCookie)(null, "expires_in", {
|
|
2147
2579
|
maxAge: 2147483647,
|
|
2148
2580
|
path: '/',
|
|
2149
|
-
domain: process.env.cookieDomain
|
|
2581
|
+
domain: baseURL //process.env.cookieDomain
|
|
2150
2582
|
});
|
|
2151
2583
|
}
|
|
2152
2584
|
return _context3.abrupt("return", Promise.reject(error));
|
|
@@ -2600,15 +3032,15 @@ var authService = function authService() {
|
|
|
2600
3032
|
logout: function () {
|
|
2601
3033
|
var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
2602
3034
|
var redirectUri,
|
|
2603
|
-
AuthUri,
|
|
2604
3035
|
cookieDomain,
|
|
3036
|
+
AuthUri,
|
|
2605
3037
|
_args4 = arguments;
|
|
2606
3038
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2607
3039
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2608
3040
|
case 0:
|
|
2609
3041
|
redirectUri = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : null;
|
|
2610
|
-
|
|
2611
|
-
cookieDomain = process.env.cookieDomain;
|
|
3042
|
+
cookieDomain = window.location.protocol + "//" + window.location.host;
|
|
3043
|
+
AuthUri = process.env.authorityUri; //let cookieDomain = process.env.cookieDomain;
|
|
2612
3044
|
(0, _nookies.destroyCookie)({}, "access_token", {
|
|
2613
3045
|
maxAge: 2147483647,
|
|
2614
3046
|
path: '/',
|
|
@@ -2747,7 +3179,9 @@ var signInValidator = /*#__PURE__*/function () {
|
|
|
2747
3179
|
case 6:
|
|
2748
3180
|
response = _context.sent;
|
|
2749
3181
|
window.localStorage.removeItem("verifier");
|
|
2750
|
-
|
|
3182
|
+
|
|
3183
|
+
//let domain = process.env.cookieDomain;
|
|
3184
|
+
domain = window.location.protocol + "//" + window.location.host;
|
|
2751
3185
|
_context.next = 11;
|
|
2752
3186
|
return (0, _nookies.setCookie)(null, "access_token", response.data.access_token, {
|
|
2753
3187
|
maxAge: 2147483647,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authscape",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.224",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"react-dom": "^18.2.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@monaco-editor/react": "^4.5.1",
|
|
31
32
|
"@stripe/react-stripe-js": "^1.9.0",
|
|
32
33
|
"@stripe/stripe-js": "^1.32.0",
|
|
33
34
|
"axios": "^0.27.2",
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
2
|
+
import Editor, { useMonaco } from "@monaco-editor/react";
|
|
3
|
+
import Button from '@mui/material/Button';
|
|
4
|
+
import CheckIcon from '@mui/icons-material/Check';
|
|
5
|
+
import Tabs from '@mui/material/Tabs';
|
|
6
|
+
import Tab from '@mui/material/Tab';
|
|
7
|
+
import Box from '@mui/material/Box';
|
|
8
|
+
import { Grid } from "@mui/material";
|
|
9
|
+
import { DataGrid } from "@mui/x-data-grid";
|
|
10
|
+
|
|
11
|
+
export function OEMEditor({loadedUser, notification, companyId = null}) {
|
|
12
|
+
|
|
13
|
+
const cssEditorRef = useRef(null);
|
|
14
|
+
const htmlEditorRef = useRef(null);
|
|
15
|
+
|
|
16
|
+
const [data, setData] = useState('');
|
|
17
|
+
const [value, setValue] = React.useState(0);
|
|
18
|
+
const [fonts, setFonts] = useState([]);
|
|
19
|
+
const [dnsFields, setDnsFields] = useState([]);
|
|
20
|
+
const [selectedFont, setSelectedFont] = useState(null);
|
|
21
|
+
|
|
22
|
+
function TabPanel(props) {
|
|
23
|
+
const { children, value, index, ...other } = props;
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
role="tabpanel"
|
|
28
|
+
hidden={value !== index}
|
|
29
|
+
id={`simple-tabpanel-${index}`}
|
|
30
|
+
aria-labelledby={`simple-tab-${index}`}
|
|
31
|
+
{...other}
|
|
32
|
+
>
|
|
33
|
+
{value === index && (
|
|
34
|
+
<Box sx={{ p: 3 }}>
|
|
35
|
+
{children}
|
|
36
|
+
</Box>
|
|
37
|
+
)}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function a11yProps(index) {
|
|
43
|
+
return {
|
|
44
|
+
id: `simple-tab-${index}`,
|
|
45
|
+
'aria-controls': `simple-tabpanel-${index}`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const handleChange = (event, newValue) => {
|
|
50
|
+
setValue(newValue);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const GetBaseUrl = () => {
|
|
54
|
+
return window.location.protocol + "//" + window.location.host;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
|
|
59
|
+
if (loadedUser)
|
|
60
|
+
{
|
|
61
|
+
const fetchData = async () => {
|
|
62
|
+
|
|
63
|
+
let response = await apiService().get("/OEM/GetFonts");
|
|
64
|
+
if (response != null && response.status == 200)
|
|
65
|
+
{
|
|
66
|
+
setFonts(response.data);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var domain = GetBaseUrl();
|
|
70
|
+
let responseFields = await apiService().get("/OEM/GetFields?domain=" + domain + "&companyId=" + companyId);
|
|
71
|
+
if (responseFields != null && responseFields.status == 200)
|
|
72
|
+
{
|
|
73
|
+
setDnsFields(responseFields.data);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
fetchData();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
}, [loadedUser]);
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
function handleCSSEditorDidMount(editor, monaco) {
|
|
84
|
+
cssEditorRef.current = editor;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function handleHtmlEditorDidMount(editor, monaco) {
|
|
88
|
+
htmlEditorRef.current = editor;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const monaco = useMonaco();
|
|
92
|
+
|
|
93
|
+
const columns = [
|
|
94
|
+
{
|
|
95
|
+
field: "label",
|
|
96
|
+
headerName: "Fonts",
|
|
97
|
+
width: 200,
|
|
98
|
+
editable: false,
|
|
99
|
+
renderCell: (params) => {
|
|
100
|
+
const RenderData = (row) => {
|
|
101
|
+
// const { id, value, field } = params;
|
|
102
|
+
// const apiRef = useGridApiContext();
|
|
103
|
+
return (
|
|
104
|
+
<>
|
|
105
|
+
<Box sx={{fontFamily: row.value, fontSize:20}}>{row.value}</Box>
|
|
106
|
+
<link href={"https://fonts.googleapis.com/css2?family=" + row.value} rel="stylesheet"></link>
|
|
107
|
+
</>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
return RenderData(params);
|
|
111
|
+
},
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
|
|
117
|
+
const fetchData = async () => {
|
|
118
|
+
|
|
119
|
+
// if (monaco) {
|
|
120
|
+
// //console.log("here is the monaco instance:", monaco);
|
|
121
|
+
// }
|
|
122
|
+
|
|
123
|
+
var baseUri = GetBaseUrl();
|
|
124
|
+
let response = await apiService().get("/oem/GetEditorData?domain=" + baseUri + "&companyId=" + companyId);
|
|
125
|
+
if (response.status == 200)
|
|
126
|
+
{
|
|
127
|
+
setData(response.data);
|
|
128
|
+
setSelectedFont(response.data.fontFamily);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
fetchData();
|
|
132
|
+
|
|
133
|
+
}, [monaco]);
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<>
|
|
137
|
+
<Box sx={{ width: '100%' }}>
|
|
138
|
+
|
|
139
|
+
{selectedFont != null &&
|
|
140
|
+
<link href={"https://fonts.googleapis.com/css2?family=" + selectedFont} rel="stylesheet"></link>
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
|
144
|
+
<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">
|
|
145
|
+
<Tab label="General" {...a11yProps(0)} />
|
|
146
|
+
<Tab label="Fonts" {...a11yProps(1)} />
|
|
147
|
+
<Tab label="Style Sheet Editor" {...a11yProps(2)} />
|
|
148
|
+
<Tab label="HTML Import Editor" {...a11yProps(3)} />
|
|
149
|
+
</Tabs>
|
|
150
|
+
</Box>
|
|
151
|
+
<TabPanel value={value} index={0}>
|
|
152
|
+
|
|
153
|
+
{dnsFields != null && dnsFields.map((dnsField) => {
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<Box>
|
|
157
|
+
<Grid container spacing={2}>
|
|
158
|
+
<Grid item xs={3}>
|
|
159
|
+
{dnsField.name}
|
|
160
|
+
</Grid>
|
|
161
|
+
<Grid item xs={9}>
|
|
162
|
+
|
|
163
|
+
<ColorPicker name={dnsField.name} defaultColor={dnsField.value} onColorChanged={async (name, hex) => {
|
|
164
|
+
|
|
165
|
+
await apiService().post("/OEM/SetFieldValue", {
|
|
166
|
+
id: dnsField.id,
|
|
167
|
+
fieldId: dnsField.fieldId,
|
|
168
|
+
value: hex
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
notification(dnsField.name + " Saved");
|
|
172
|
+
|
|
173
|
+
}} />
|
|
174
|
+
</Grid>
|
|
175
|
+
</Grid>
|
|
176
|
+
</Box>
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
})}
|
|
182
|
+
|
|
183
|
+
{/* {dnsFields != null &&
|
|
184
|
+
<Box sx={{marginTop:2}}>
|
|
185
|
+
<Button startIcon={<SaveRoundedIcon/>} variant="contained" onClick={async () => {
|
|
186
|
+
|
|
187
|
+
await apiService().post("/oem/SetFieldValue", {
|
|
188
|
+
id: dnsField.id,
|
|
189
|
+
name: dnsField.name,
|
|
190
|
+
value: JSON.stringify(rgb)
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
}}>Save Changes</Button>
|
|
194
|
+
</Box>
|
|
195
|
+
} */}
|
|
196
|
+
|
|
197
|
+
</TabPanel>
|
|
198
|
+
<TabPanel value={value} index={1}>
|
|
199
|
+
|
|
200
|
+
<Grid container spacing={2}>
|
|
201
|
+
<Grid item xs={6}>
|
|
202
|
+
|
|
203
|
+
{(loadedUser) &&
|
|
204
|
+
|
|
205
|
+
<DataGrid
|
|
206
|
+
rows={fonts}
|
|
207
|
+
columns={columns}
|
|
208
|
+
sx={{height:"80vh"}}
|
|
209
|
+
onRowClick={async (row) => {
|
|
210
|
+
|
|
211
|
+
var baseUri = GetBaseUrl();
|
|
212
|
+
let response = await apiService().post("/OEM/SetFont", {
|
|
213
|
+
companyId: companyId,
|
|
214
|
+
domain: baseUri,
|
|
215
|
+
value: row.row.label
|
|
216
|
+
});
|
|
217
|
+
if (response != null && response.status == 200)
|
|
218
|
+
{
|
|
219
|
+
setSelectedFont(row.row.label);
|
|
220
|
+
notification("Font saved!");
|
|
221
|
+
}
|
|
222
|
+
}}
|
|
223
|
+
/>
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
</Grid>
|
|
227
|
+
<Grid item xs={6} sx={{marginTop:4}}>
|
|
228
|
+
<Box>Font Selected:</Box>
|
|
229
|
+
<Box sx={{marginBottom:2, fontWeight:"bold", fontSize:20}}> {selectedFont}</Box>
|
|
230
|
+
<hr />
|
|
231
|
+
<Box sx={{fontFamily: selectedFont}}>
|
|
232
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut ultricies odio. Nunc ut quam turpis. In hac habitasse platea dictumst.
|
|
233
|
+
Suspendisse potenti. Nullam malesuada, purus id sagittis vestibulum, massa tellus gravida elit, vitae ultrices tortor nulla ac nunc.
|
|
234
|
+
Aenean tempus semper est vel convallis. Sed feugiat, risus eu tincidunt eleifend, purus metus vulputate nulla, et condimentum sapien erat in nisi.
|
|
235
|
+
Nunc non malesuada libero. Donec tempus tincidunt mi at vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
|
|
236
|
+
Suspendisse potenti. Etiam nec eleifend orci. Suspendisse in est vel nunc rhoncus bibendum vitae id felis.
|
|
237
|
+
Integer bibendum dolor elit, at tincidunt lacus tempor ac. Maecenas lobortis, mauris at condimentum feugiat, nulla orci condimentum massa, sed facilisis tellus ligula vitae metus.
|
|
238
|
+
Aliquam erat volutpat. Quisque dignissim felis augue, at semper nisl posuere ut. Proin fringilla diam vitae faucibus finibus.
|
|
239
|
+
<br/><br/>
|
|
240
|
+
Aenean tempus semper est vel convallis. Sed feugiat, risus eu tincidunt eleifend, purus metus vulputate nulla, et condimentum sapien erat in nisi. Nunc non malesuada libero. Donec tempus tincidunt mi at vulputate. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse potenti
|
|
241
|
+
</Box>
|
|
242
|
+
</Grid>
|
|
243
|
+
</Grid>
|
|
244
|
+
|
|
245
|
+
</TabPanel>
|
|
246
|
+
<TabPanel value={value} index={2}>
|
|
247
|
+
|
|
248
|
+
<Grid container spacing={2}>
|
|
249
|
+
<Grid item xs={6}>
|
|
250
|
+
<h4 style={{marginBottom:"0px"}}>Global CSS edits</h4>
|
|
251
|
+
<small>You can make edits to your stylesheet</small>
|
|
252
|
+
</Grid>
|
|
253
|
+
<Grid item xs={6} sx={{textAlign:"right"}}>
|
|
254
|
+
<Button startIcon={<CheckIcon/>} sx={{marginTop:4}} variant="contained" onClick={async () => {
|
|
255
|
+
|
|
256
|
+
var baseUri = GetBaseUrl();
|
|
257
|
+
let response = await apiService().post("/OEM/SetGlobalCSS", {
|
|
258
|
+
companyId: companyId,
|
|
259
|
+
domain: baseUri,
|
|
260
|
+
value: cssEditorRef.current.getValue()
|
|
261
|
+
});
|
|
262
|
+
if (response != null && response.status == 200)
|
|
263
|
+
{
|
|
264
|
+
notification("CSS Saved!")
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
}}>Save Changes</Button>
|
|
268
|
+
</Grid>
|
|
269
|
+
</Grid>
|
|
270
|
+
|
|
271
|
+
<Box sx={{paddingTop:1}}>
|
|
272
|
+
|
|
273
|
+
<Editor
|
|
274
|
+
height="70vh"
|
|
275
|
+
onMount={handleCSSEditorDidMount}
|
|
276
|
+
defaultLanguage="css"
|
|
277
|
+
theme="vs-dark"
|
|
278
|
+
defaultValue={data.prettyCSS == null ? "" : data.prettyCSS}
|
|
279
|
+
/>
|
|
280
|
+
</Box>
|
|
281
|
+
|
|
282
|
+
</TabPanel>
|
|
283
|
+
<TabPanel value={value} index={3}>
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
<Grid container spacing={2}>
|
|
287
|
+
<Grid item xs={6}>
|
|
288
|
+
<h4 style={{marginBottom:"0px"}}>HTML import Edits</h4>
|
|
289
|
+
<small>You can add imports such as google analytics or clarity</small>
|
|
290
|
+
</Grid>
|
|
291
|
+
<Grid item xs={6} sx={{textAlign:"right"}}>
|
|
292
|
+
<Button startIcon={<CheckIcon/>} sx={{marginTop:4}} variant="contained" onClick={async () => {
|
|
293
|
+
|
|
294
|
+
var baseUri = GetBaseUrl();
|
|
295
|
+
let response = await apiService().post("/OEM/SetGlobalHTML", {
|
|
296
|
+
companyId: companyId,
|
|
297
|
+
domain: baseUri,
|
|
298
|
+
value: htmlEditorRef.current.getValue()
|
|
299
|
+
});
|
|
300
|
+
if (response != null && response.status == 200)
|
|
301
|
+
{
|
|
302
|
+
notification("HTML saved!")
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
}}>Save Changes</Button>
|
|
306
|
+
</Grid>
|
|
307
|
+
</Grid>
|
|
308
|
+
|
|
309
|
+
<Box sx={{paddingTop:1}}>
|
|
310
|
+
<Editor
|
|
311
|
+
height="70vh"
|
|
312
|
+
onMount={handleHtmlEditorDidMount}
|
|
313
|
+
defaultLanguage="html"
|
|
314
|
+
theme="vs-dark"
|
|
315
|
+
defaultValue={data.prettyHTML == null ? "" : data.prettyHTML}
|
|
316
|
+
/>
|
|
317
|
+
</Box>
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
</TabPanel>
|
|
321
|
+
</Box>
|
|
322
|
+
</>
|
|
323
|
+
)
|
|
324
|
+
}
|
|
@@ -55,13 +55,15 @@ const RefreshToken = async (originalRequest, instance) => {
|
|
|
55
55
|
|
|
56
56
|
if (response != null && response.status == 200)
|
|
57
57
|
{
|
|
58
|
+
var baseURL = window.location.protocol + "//" + window.location.host;
|
|
59
|
+
|
|
58
60
|
originalRequest.headers['Authorization'] = 'Bearer ' + response.data.access_token;
|
|
59
61
|
|
|
60
62
|
await setCookie(null, "access_token", response.data.access_token,
|
|
61
63
|
{
|
|
62
64
|
maxAge: 2147483647,
|
|
63
65
|
path: '/',
|
|
64
|
-
domain: process.env.cookieDomain,
|
|
66
|
+
domain: baseURL, //process.env.cookieDomain,
|
|
65
67
|
secure: true
|
|
66
68
|
});
|
|
67
69
|
|
|
@@ -69,7 +71,7 @@ const RefreshToken = async (originalRequest, instance) => {
|
|
|
69
71
|
{
|
|
70
72
|
maxAge: 2147483647,
|
|
71
73
|
path: '/',
|
|
72
|
-
domain: process.env.cookieDomain,
|
|
74
|
+
domain: baseURL, //process.env.cookieDomain,
|
|
73
75
|
secure: true
|
|
74
76
|
});
|
|
75
77
|
|
|
@@ -77,7 +79,7 @@ const RefreshToken = async (originalRequest, instance) => {
|
|
|
77
79
|
{
|
|
78
80
|
maxAge: 2147483647,
|
|
79
81
|
path: '/',
|
|
80
|
-
domain: process.env.cookieDomain,
|
|
82
|
+
domain: baseURL, //process.env.cookieDomain,
|
|
81
83
|
secure: true
|
|
82
84
|
});
|
|
83
85
|
}
|
|
@@ -123,22 +125,24 @@ export const apiService = (ctx = null) => {
|
|
|
123
125
|
|
|
124
126
|
if (error.response.config.url.includes("/connect/token")) // remove the access and refresh if invalid
|
|
125
127
|
{
|
|
128
|
+
var baseURL = window.location.protocol + "//" + window.location.host;
|
|
129
|
+
|
|
126
130
|
destroyCookie(null, "access_token", {
|
|
127
131
|
maxAge: 2147483647,
|
|
128
132
|
path: '/',
|
|
129
|
-
domain: process.env.cookieDomain
|
|
133
|
+
domain: baseURL //process.env.cookieDomain
|
|
130
134
|
});
|
|
131
135
|
|
|
132
136
|
destroyCookie(null, "refresh_token", {
|
|
133
137
|
maxAge: 2147483647,
|
|
134
138
|
path: '/',
|
|
135
|
-
domain: process.env.cookieDomain
|
|
139
|
+
domain: baseURL //process.env.cookieDomain
|
|
136
140
|
});
|
|
137
141
|
|
|
138
142
|
destroyCookie(null, "expires_in", {
|
|
139
143
|
maxAge: 2147483647,
|
|
140
144
|
path: '/',
|
|
141
|
-
domain: process.env.cookieDomain
|
|
145
|
+
domain: baseURL //process.env.cookieDomain
|
|
142
146
|
});
|
|
143
147
|
}
|
|
144
148
|
|
|
@@ -83,8 +83,10 @@ export const authService = () => {
|
|
|
83
83
|
},
|
|
84
84
|
logout: async (redirectUri = null) => {
|
|
85
85
|
|
|
86
|
+
var cookieDomain = window.location.protocol + "//" + window.location.host;
|
|
87
|
+
|
|
86
88
|
let AuthUri = process.env.authorityUri;
|
|
87
|
-
let cookieDomain = process.env.cookieDomain;
|
|
89
|
+
//let cookieDomain = process.env.cookieDomain;
|
|
88
90
|
|
|
89
91
|
destroyCookie({}, "access_token", {
|
|
90
92
|
maxAge: 2147483647,
|
|
@@ -25,7 +25,8 @@ export const signInValidator = async (queryCode) => {
|
|
|
25
25
|
|
|
26
26
|
window.localStorage.removeItem("verifier");
|
|
27
27
|
|
|
28
|
-
let domain = process.env.cookieDomain;
|
|
28
|
+
//let domain = process.env.cookieDomain;
|
|
29
|
+
var domain = window.location.protocol + "//" + window.location.host;
|
|
29
30
|
|
|
30
31
|
await setCookie(null, "access_token", response.data.access_token,
|
|
31
32
|
{
|