@copart/ops-tool-kit 1.13.0-beta.2 → 1.13.0-beta.3
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/dist/ops-tool-kit.js +164 -71
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
47
47
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
48
48
|
|
|
49
49
|
const name$1 = "@copart/ops-tool-kit";
|
|
50
|
-
const version$3 = "1.13.0-beta.
|
|
50
|
+
const version$3 = "1.13.0-beta.3";
|
|
51
51
|
const main$1 = "dist/ops-tool-kit.js";
|
|
52
52
|
const style = "dist/ops-tool-kit.css";
|
|
53
53
|
const files = [
|
|
@@ -68470,152 +68470,245 @@ var fetcher = {
|
|
|
68470
68470
|
}
|
|
68471
68471
|
return getCoreAppPermissions;
|
|
68472
68472
|
}(),
|
|
68473
|
-
|
|
68474
|
-
var
|
|
68473
|
+
getUserPreferences: function () {
|
|
68474
|
+
var _getUserPreferences = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee5() {
|
|
68475
|
+
var appName,
|
|
68476
|
+
_config$endpoints,
|
|
68477
|
+
storage,
|
|
68478
|
+
config,
|
|
68479
|
+
urlTemplate,
|
|
68480
|
+
url,
|
|
68481
|
+
country,
|
|
68482
|
+
response,
|
|
68483
|
+
_args5 = arguments,
|
|
68484
|
+
_t;
|
|
68475
68485
|
return _regenerator().w(function (_context5) {
|
|
68476
|
-
while (1) switch (_context5.n) {
|
|
68486
|
+
while (1) switch (_context5.p = _context5.n) {
|
|
68477
68487
|
case 0:
|
|
68478
|
-
|
|
68488
|
+
appName = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : '';
|
|
68489
|
+
_context5.p = 1;
|
|
68490
|
+
storage = require("./storage").default;
|
|
68491
|
+
config = storage.getLocalItem('opsportal-core:config');
|
|
68492
|
+
urlTemplate = config === null || config === void 0 ? void 0 : (_config$endpoints = config.endpoints) === null || _config$endpoints === void 0 ? void 0 : _config$endpoints.userPreferences;
|
|
68493
|
+
if (urlTemplate) {
|
|
68494
|
+
_context5.n = 2;
|
|
68495
|
+
break;
|
|
68496
|
+
}
|
|
68497
|
+
return _context5.a(2, {});
|
|
68498
|
+
case 2:
|
|
68499
|
+
url = urlTemplate.replace(/\{appName\}/g, appName);
|
|
68500
|
+
country = storage.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
68501
|
+
_context5.n = 3;
|
|
68502
|
+
return fetcher.get(url, {
|
|
68503
|
+
headers: {
|
|
68504
|
+
country: country,
|
|
68505
|
+
source: 'OPS_PORTAL'
|
|
68506
|
+
}
|
|
68507
|
+
});
|
|
68508
|
+
case 3:
|
|
68509
|
+
response = _context5.v;
|
|
68510
|
+
return _context5.a(2, response.data);
|
|
68511
|
+
case 4:
|
|
68512
|
+
_context5.p = 4;
|
|
68513
|
+
_t = _context5.v;
|
|
68514
|
+
return _context5.a(2, Promise.reject(_t));
|
|
68479
68515
|
}
|
|
68480
|
-
}, _callee5);
|
|
68516
|
+
}, _callee5, null, [[1, 4]]);
|
|
68481
68517
|
}));
|
|
68482
|
-
function
|
|
68483
|
-
return
|
|
68518
|
+
function getUserPreferences() {
|
|
68519
|
+
return _getUserPreferences.apply(this, arguments);
|
|
68484
68520
|
}
|
|
68485
|
-
return
|
|
68521
|
+
return getUserPreferences;
|
|
68486
68522
|
}(),
|
|
68487
|
-
|
|
68488
|
-
var
|
|
68523
|
+
setUserPreferences: function () {
|
|
68524
|
+
var _setUserPreferences = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
68525
|
+
var appName,
|
|
68526
|
+
data,
|
|
68527
|
+
_config$endpoints2,
|
|
68528
|
+
storage,
|
|
68529
|
+
config,
|
|
68530
|
+
urlTemplate,
|
|
68531
|
+
url,
|
|
68532
|
+
country,
|
|
68533
|
+
response,
|
|
68534
|
+
_args6 = arguments,
|
|
68535
|
+
_t2;
|
|
68489
68536
|
return _regenerator().w(function (_context6) {
|
|
68490
|
-
while (1) switch (_context6.n) {
|
|
68537
|
+
while (1) switch (_context6.p = _context6.n) {
|
|
68491
68538
|
case 0:
|
|
68492
|
-
|
|
68539
|
+
appName = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : '';
|
|
68540
|
+
data = _args6.length > 1 ? _args6[1] : undefined;
|
|
68541
|
+
_context6.p = 1;
|
|
68542
|
+
storage = require("./storage").default;
|
|
68543
|
+
config = storage.getLocalItem('opsportal-core:config');
|
|
68544
|
+
urlTemplate = config === null || config === void 0 ? void 0 : (_config$endpoints2 = config.endpoints) === null || _config$endpoints2 === void 0 ? void 0 : _config$endpoints2.userPreferences;
|
|
68545
|
+
if (urlTemplate) {
|
|
68546
|
+
_context6.n = 2;
|
|
68547
|
+
break;
|
|
68548
|
+
}
|
|
68549
|
+
return _context6.a(2, '');
|
|
68550
|
+
case 2:
|
|
68551
|
+
url = urlTemplate.replace(/\{appName\}/g, appName);
|
|
68552
|
+
country = storage.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
68553
|
+
_context6.n = 3;
|
|
68554
|
+
return fetcher.put(url, data, {
|
|
68555
|
+
headers: {
|
|
68556
|
+
country: country,
|
|
68557
|
+
source: 'OPS_PORTAL'
|
|
68558
|
+
}
|
|
68559
|
+
});
|
|
68560
|
+
case 3:
|
|
68561
|
+
response = _context6.v;
|
|
68562
|
+
return _context6.a(2, response.statusText);
|
|
68563
|
+
case 4:
|
|
68564
|
+
_context6.p = 4;
|
|
68565
|
+
_t2 = _context6.v;
|
|
68566
|
+
return _context6.a(2, Promise.reject(_t2));
|
|
68493
68567
|
}
|
|
68494
|
-
}, _callee6);
|
|
68568
|
+
}, _callee6, null, [[1, 4]]);
|
|
68495
68569
|
}));
|
|
68496
|
-
function
|
|
68497
|
-
return
|
|
68570
|
+
function setUserPreferences() {
|
|
68571
|
+
return _setUserPreferences.apply(this, arguments);
|
|
68498
68572
|
}
|
|
68499
|
-
return
|
|
68573
|
+
return setUserPreferences;
|
|
68500
68574
|
}(),
|
|
68501
|
-
|
|
68502
|
-
var
|
|
68575
|
+
getPrintersForYard: function () {
|
|
68576
|
+
var _getPrintersForYard = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee7(yardNumber) {
|
|
68577
|
+
var _config$endpoints3, storage, config, url, response;
|
|
68503
68578
|
return _regenerator().w(function (_context7) {
|
|
68504
|
-
while (1) switch (_context7.n) {
|
|
68579
|
+
while (1) switch (_context7.p = _context7.n) {
|
|
68505
68580
|
case 0:
|
|
68506
|
-
|
|
68581
|
+
_context7.p = 0;
|
|
68582
|
+
storage = require("./storage").default;
|
|
68583
|
+
config = storage.getLocalItem('opsportal-core:config');
|
|
68584
|
+
url = config === null || config === void 0 ? void 0 : (_config$endpoints3 = config.endpoints) === null || _config$endpoints3 === void 0 ? void 0 : _config$endpoints3.printersByYard;
|
|
68585
|
+
if (url) {
|
|
68586
|
+
_context7.n = 1;
|
|
68587
|
+
break;
|
|
68588
|
+
}
|
|
68589
|
+
return _context7.a(2, {});
|
|
68590
|
+
case 1:
|
|
68591
|
+
_context7.n = 2;
|
|
68592
|
+
return fetcher.get("".concat(url).concat(yardNumber));
|
|
68593
|
+
case 2:
|
|
68594
|
+
response = _context7.v;
|
|
68595
|
+
return _context7.a(2, response.data);
|
|
68596
|
+
case 3:
|
|
68597
|
+
_context7.p = 3;
|
|
68598
|
+
_context7.v;
|
|
68599
|
+
return _context7.a(2, {});
|
|
68507
68600
|
}
|
|
68508
|
-
}, _callee7);
|
|
68601
|
+
}, _callee7, null, [[0, 3]]);
|
|
68509
68602
|
}));
|
|
68510
|
-
function
|
|
68511
|
-
return
|
|
68603
|
+
function getPrintersForYard(_x4) {
|
|
68604
|
+
return _getPrintersForYard.apply(this, arguments);
|
|
68512
68605
|
}
|
|
68513
|
-
return
|
|
68606
|
+
return getPrintersForYard;
|
|
68514
68607
|
}(),
|
|
68515
|
-
|
|
68516
|
-
var
|
|
68608
|
+
login: function () {
|
|
68609
|
+
var _login = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee8() {
|
|
68517
68610
|
return _regenerator().w(function (_context8) {
|
|
68518
68611
|
while (1) switch (_context8.n) {
|
|
68519
68612
|
case 0:
|
|
68520
|
-
return _context8.a(2);
|
|
68613
|
+
return _context8.a(2, {});
|
|
68521
68614
|
}
|
|
68522
68615
|
}, _callee8);
|
|
68523
68616
|
}));
|
|
68524
|
-
function
|
|
68525
|
-
return
|
|
68617
|
+
function login() {
|
|
68618
|
+
return _login.apply(this, arguments);
|
|
68526
68619
|
}
|
|
68527
|
-
return
|
|
68620
|
+
return login;
|
|
68528
68621
|
}(),
|
|
68529
|
-
|
|
68530
|
-
var
|
|
68622
|
+
oktaLogin: function () {
|
|
68623
|
+
var _oktaLogin = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
68531
68624
|
return _regenerator().w(function (_context9) {
|
|
68532
68625
|
while (1) switch (_context9.n) {
|
|
68533
68626
|
case 0:
|
|
68534
|
-
return _context9.a(2);
|
|
68627
|
+
return _context9.a(2, {});
|
|
68535
68628
|
}
|
|
68536
68629
|
}, _callee9);
|
|
68537
68630
|
}));
|
|
68538
|
-
function
|
|
68539
|
-
return
|
|
68631
|
+
function oktaLogin() {
|
|
68632
|
+
return _oktaLogin.apply(this, arguments);
|
|
68540
68633
|
}
|
|
68541
|
-
return
|
|
68634
|
+
return oktaLogin;
|
|
68542
68635
|
}(),
|
|
68543
|
-
|
|
68544
|
-
var
|
|
68636
|
+
getYardNumbers: function () {
|
|
68637
|
+
var _getYardNumbers = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee0() {
|
|
68545
68638
|
return _regenerator().w(function (_context0) {
|
|
68546
68639
|
while (1) switch (_context0.n) {
|
|
68547
68640
|
case 0:
|
|
68548
|
-
return _context0.a(2);
|
|
68641
|
+
return _context0.a(2, []);
|
|
68549
68642
|
}
|
|
68550
68643
|
}, _callee0);
|
|
68551
68644
|
}));
|
|
68552
|
-
function
|
|
68553
|
-
return
|
|
68645
|
+
function getYardNumbers() {
|
|
68646
|
+
return _getYardNumbers.apply(this, arguments);
|
|
68554
68647
|
}
|
|
68555
|
-
return
|
|
68648
|
+
return getYardNumbers;
|
|
68556
68649
|
}(),
|
|
68557
|
-
|
|
68558
|
-
var
|
|
68650
|
+
getUserDetails: function () {
|
|
68651
|
+
var _getUserDetails = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee1() {
|
|
68559
68652
|
return _regenerator().w(function (_context1) {
|
|
68560
68653
|
while (1) switch (_context1.n) {
|
|
68561
68654
|
case 0:
|
|
68562
|
-
return _context1.a(2);
|
|
68655
|
+
return _context1.a(2, {});
|
|
68563
68656
|
}
|
|
68564
68657
|
}, _callee1);
|
|
68565
68658
|
}));
|
|
68566
|
-
function
|
|
68567
|
-
return
|
|
68659
|
+
function getUserDetails() {
|
|
68660
|
+
return _getUserDetails.apply(this, arguments);
|
|
68568
68661
|
}
|
|
68569
|
-
return
|
|
68662
|
+
return getUserDetails;
|
|
68570
68663
|
}(),
|
|
68571
|
-
|
|
68572
|
-
var
|
|
68664
|
+
sendFeedback: function () {
|
|
68665
|
+
var _sendFeedback = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee10() {
|
|
68573
68666
|
return _regenerator().w(function (_context10) {
|
|
68574
68667
|
while (1) switch (_context10.n) {
|
|
68575
68668
|
case 0:
|
|
68576
|
-
return _context10.a(2);
|
|
68669
|
+
return _context10.a(2, {});
|
|
68577
68670
|
}
|
|
68578
68671
|
}, _callee10);
|
|
68579
68672
|
}));
|
|
68580
|
-
function
|
|
68581
|
-
return
|
|
68673
|
+
function sendFeedback() {
|
|
68674
|
+
return _sendFeedback.apply(this, arguments);
|
|
68582
68675
|
}
|
|
68583
|
-
return
|
|
68676
|
+
return sendFeedback;
|
|
68584
68677
|
}(),
|
|
68585
|
-
|
|
68586
|
-
var
|
|
68678
|
+
getUserRoles: function () {
|
|
68679
|
+
var _getUserRoles = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee11() {
|
|
68587
68680
|
return _regenerator().w(function (_context11) {
|
|
68588
68681
|
while (1) switch (_context11.n) {
|
|
68589
68682
|
case 0:
|
|
68590
|
-
return _context11.a(2);
|
|
68683
|
+
return _context11.a(2, []);
|
|
68591
68684
|
}
|
|
68592
68685
|
}, _callee11);
|
|
68593
68686
|
}));
|
|
68594
|
-
function
|
|
68595
|
-
return
|
|
68687
|
+
function getUserRoles() {
|
|
68688
|
+
return _getUserRoles.apply(this, arguments);
|
|
68596
68689
|
}
|
|
68597
|
-
return
|
|
68690
|
+
return getUserRoles;
|
|
68598
68691
|
}(),
|
|
68599
|
-
|
|
68600
|
-
var
|
|
68692
|
+
getHierarchyOptions: function () {
|
|
68693
|
+
var _getHierarchyOptions = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee12() {
|
|
68601
68694
|
return _regenerator().w(function (_context12) {
|
|
68602
68695
|
while (1) switch (_context12.n) {
|
|
68603
68696
|
case 0:
|
|
68604
|
-
return _context12.a(2);
|
|
68697
|
+
return _context12.a(2, []);
|
|
68605
68698
|
}
|
|
68606
68699
|
}, _callee12);
|
|
68607
68700
|
}));
|
|
68608
|
-
function
|
|
68609
|
-
return
|
|
68701
|
+
function getHierarchyOptions() {
|
|
68702
|
+
return _getHierarchyOptions.apply(this, arguments);
|
|
68610
68703
|
}
|
|
68611
|
-
return
|
|
68704
|
+
return getHierarchyOptions;
|
|
68612
68705
|
}(),
|
|
68613
68706
|
getInnovationHubToken: function () {
|
|
68614
68707
|
var _getInnovationHubToken = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee13() {
|
|
68615
68708
|
return _regenerator().w(function (_context13) {
|
|
68616
68709
|
while (1) switch (_context13.n) {
|
|
68617
68710
|
case 0:
|
|
68618
|
-
return _context13.a(2);
|
|
68711
|
+
return _context13.a(2, {});
|
|
68619
68712
|
}
|
|
68620
68713
|
}, _callee13);
|
|
68621
68714
|
}));
|
|
@@ -68629,7 +68722,7 @@ var fetcher = {
|
|
|
68629
68722
|
return _regenerator().w(function (_context14) {
|
|
68630
68723
|
while (1) switch (_context14.n) {
|
|
68631
68724
|
case 0:
|
|
68632
|
-
return _context14.a(2);
|
|
68725
|
+
return _context14.a(2, []);
|
|
68633
68726
|
}
|
|
68634
68727
|
}, _callee14);
|
|
68635
68728
|
}));
|
|
@@ -68643,7 +68736,7 @@ var fetcher = {
|
|
|
68643
68736
|
return _regenerator().w(function (_context15) {
|
|
68644
68737
|
while (1) switch (_context15.n) {
|
|
68645
68738
|
case 0:
|
|
68646
|
-
return _context15.a(2);
|
|
68739
|
+
return _context15.a(2, []);
|
|
68647
68740
|
}
|
|
68648
68741
|
}, _callee15);
|
|
68649
68742
|
}));
|
|
@@ -68657,7 +68750,7 @@ var fetcher = {
|
|
|
68657
68750
|
return _regenerator().w(function (_context16) {
|
|
68658
68751
|
while (1) switch (_context16.n) {
|
|
68659
68752
|
case 0:
|
|
68660
|
-
return _context16.a(2);
|
|
68753
|
+
return _context16.a(2, []);
|
|
68661
68754
|
}
|
|
68662
68755
|
}, _callee16);
|
|
68663
68756
|
}));
|