@copart/ops-tool-kit 1.13.0-beta.4 → 1.13.0-beta.6

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.
@@ -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.4";
50
+ const version$3 = "1.13.0-beta.6";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -68250,8 +68250,13 @@ function getInitialUri() {
68250
68250
  });
68251
68251
  }
68252
68252
 
68253
+ var _appName = null;
68254
+ function setAppName(name) {
68255
+ _appName = name;
68256
+ }
68253
68257
  function getAppName() {
68254
68258
  var _window$toolkitEnv;
68259
+ if (_appName) return _appName;
68255
68260
  return (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.APP_NAME ? window.toolkitEnv.APP_NAME : typeof process !== 'undefined' && process.env && process.env.APP_NAME || 'test-app';
68256
68261
  }
68257
68262
  function getByPath(obj, path) {
@@ -68648,64 +68653,82 @@ function hydrateTiles() {
68648
68653
  });
68649
68654
  });
68650
68655
  }
68651
- var fetcher = {
68652
- request: request,
68653
- get: function get(url) {
68654
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
68655
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68656
- method: 'get',
68657
- url: url
68658
- }));
68659
- },
68660
- post: function post(url, data) {
68661
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68662
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68663
- method: 'post',
68664
- url: url,
68665
- data: data
68666
- }));
68667
- },
68668
- put: function put(url, data) {
68669
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68670
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68671
- method: 'put',
68672
- url: url,
68673
- data: data
68674
- }));
68675
- },
68676
- delete: function _delete(url) {
68677
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
68678
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68679
- method: 'delete',
68680
- url: url
68681
- }));
68682
- },
68683
- patch: function patch(url, data) {
68684
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68685
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68686
- method: 'patch',
68687
- url: url,
68688
- data: data
68689
- }));
68656
+ function fetcher(config) {
68657
+ return request(config);
68658
+ }
68659
+ fetcher.defaults = {
68660
+ headers: {
68661
+ common: {},
68662
+ get: {},
68663
+ post: {},
68664
+ put: {},
68665
+ patch: {},
68666
+ delete: {}
68690
68667
  },
68691
- interceptors: {
68692
- request: {
68693
- use: function use(fulfilled, rejected) {
68694
- requestInterceptors.push({
68695
- fulfilled: fulfilled,
68696
- rejected: rejected
68697
- });
68698
- }
68699
- },
68700
- response: {
68701
- use: function use(fulfilled, rejected) {
68702
- responseInterceptors.push({
68703
- fulfilled: fulfilled,
68704
- rejected: rejected
68705
- });
68706
- }
68668
+ baseURL: '',
68669
+ timeout: 0
68670
+ };
68671
+ fetcher.create = function (instanceConfig) {
68672
+ return fetcher;
68673
+ };
68674
+ fetcher.request = request;
68675
+ fetcher.get = function (url) {
68676
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
68677
+ return request(_objectSpread2(_objectSpread2({}, config), {}, {
68678
+ method: 'get',
68679
+ url: url
68680
+ }));
68681
+ };
68682
+ fetcher.post = function (url, data) {
68683
+ var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68684
+ return request(_objectSpread2(_objectSpread2({}, config), {}, {
68685
+ method: 'post',
68686
+ url: url,
68687
+ data: data
68688
+ }));
68689
+ };
68690
+ fetcher.put = function (url, data) {
68691
+ var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68692
+ return request(_objectSpread2(_objectSpread2({}, config), {}, {
68693
+ method: 'put',
68694
+ url: url,
68695
+ data: data
68696
+ }));
68697
+ };
68698
+ fetcher.delete = function (url) {
68699
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
68700
+ return request(_objectSpread2(_objectSpread2({}, config), {}, {
68701
+ method: 'delete',
68702
+ url: url
68703
+ }));
68704
+ };
68705
+ fetcher.patch = function (url, data) {
68706
+ var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68707
+ return request(_objectSpread2(_objectSpread2({}, config), {}, {
68708
+ method: 'patch',
68709
+ url: url,
68710
+ data: data
68711
+ }));
68712
+ };
68713
+ fetcher.interceptors = {
68714
+ request: {
68715
+ use: function use(fulfilled, rejected) {
68716
+ requestInterceptors.push({
68717
+ fulfilled: fulfilled,
68718
+ rejected: rejected
68719
+ });
68707
68720
  }
68708
68721
  },
68722
+ response: {
68723
+ use: function use(fulfilled, rejected) {
68724
+ responseInterceptors.push({
68725
+ fulfilled: fulfilled,
68726
+ rejected: rejected
68727
+ });
68728
+ }
68729
+ }
68730
+ };
68731
+ Object.assign(fetcher, {
68709
68732
  getConfig: function () {
68710
68733
  var _getConfig = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(endpoint) {
68711
68734
  var response, config;
@@ -69072,7 +69095,7 @@ var fetcher = {
69072
69095
  }
69073
69096
  return getCobaltUserRoles;
69074
69097
  }()
69075
- };
69098
+ });
69076
69099
 
69077
69100
  var isEmpty = function isEmpty(arr) {
69078
69101
  return !arr || arr.length === 0;
@@ -69317,6 +69340,7 @@ var iframeFacade = {
69317
69340
  getInitialUri: getInitialUri,
69318
69341
  setInitCache: setInitCache,
69319
69342
  setExtraLocal: setExtraLocal,
69343
+ setAppName: setAppName,
69320
69344
  getInitDataForBootstrap: getInitDataForBootstrap,
69321
69345
  sendStorageGet: sendStorageGet
69322
69346
  }