@copart/ops-tool-kit 1.13.0-beta.5 → 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.5";
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 = [
@@ -68653,64 +68653,82 @@ function hydrateTiles() {
68653
68653
  });
68654
68654
  });
68655
68655
  }
68656
- var fetcher = {
68657
- request: request,
68658
- get: function get(url) {
68659
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
68660
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68661
- method: 'get',
68662
- url: url
68663
- }));
68664
- },
68665
- post: function post(url, data) {
68666
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68667
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68668
- method: 'post',
68669
- url: url,
68670
- data: data
68671
- }));
68672
- },
68673
- put: function put(url, data) {
68674
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68675
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68676
- method: 'put',
68677
- url: url,
68678
- data: data
68679
- }));
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: {}
68680
68667
  },
68681
- delete: function _delete(url) {
68682
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
68683
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68684
- method: 'delete',
68685
- url: url
68686
- }));
68687
- },
68688
- patch: function patch(url, data) {
68689
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68690
- return request(_objectSpread2(_objectSpread2({}, config), {}, {
68691
- method: 'patch',
68692
- url: url,
68693
- data: data
68694
- }));
68695
- },
68696
- interceptors: {
68697
- request: {
68698
- use: function use(fulfilled, rejected) {
68699
- requestInterceptors.push({
68700
- fulfilled: fulfilled,
68701
- rejected: rejected
68702
- });
68703
- }
68704
- },
68705
- response: {
68706
- use: function use(fulfilled, rejected) {
68707
- responseInterceptors.push({
68708
- fulfilled: fulfilled,
68709
- rejected: rejected
68710
- });
68711
- }
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
+ });
68712
68720
  }
68713
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, {
68714
68732
  getConfig: function () {
68715
68733
  var _getConfig = _asyncToGenerator$1(/*#__PURE__*/_regenerator().m(function _callee(endpoint) {
68716
68734
  var response, config;
@@ -69077,7 +69095,7 @@ var fetcher = {
69077
69095
  }
69078
69096
  return getCobaltUserRoles;
69079
69097
  }()
69080
- };
69098
+ });
69081
69099
 
69082
69100
  var isEmpty = function isEmpty(arr) {
69083
69101
  return !arr || arr.length === 0;