@xy-planning-network/trees 0.4.8 → 0.4.9-rc-1

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/trees.es.js CHANGED
@@ -1255,37 +1255,38 @@ const apiDataRespIntercept = (response) => {
1255
1255
  const apiAxiosInstance = axios.create({
1256
1256
  baseURL: process.env.VUE_APP_BASE_API_URL || "/api/v1",
1257
1257
  responseType: "json",
1258
- withCredentials: true,
1259
- headers: {
1260
- "Content-Type": "application/json"
1261
- }
1258
+ withCredentials: true
1262
1259
  });
1263
1260
  apiAxiosInstance.interceptors.request.use(apiDelayReqIntercept);
1264
1261
  apiAxiosInstance.interceptors.response.use(apiDataRespIntercept);
1265
1262
  const BaseAPI = {
1266
- makeRequest(opts) {
1263
+ makeRequest(config, opts) {
1267
1264
  const wait = window.setTimeout(() => {
1268
1265
  if (!opts.skipLoader) {
1269
1266
  window.VueBus.emit("Spinner-show");
1270
1267
  }
1271
1268
  }, 200);
1272
- return apiAxiosInstance(opts).then((success) => success.data).finally(() => {
1269
+ return apiAxiosInstance(__spreadValues(__spreadValues({}, config), opts)).then((success) => success.data).finally(() => {
1273
1270
  if (!opts.skipLoader)
1274
1271
  window.VueBus.emit("Spinner-hide");
1275
1272
  window.clearTimeout(wait);
1276
1273
  });
1277
1274
  },
1278
1275
  get(path, opts, params) {
1279
- return this.makeRequest(__spreadValues({ url: path, method: "GET", params }, opts));
1276
+ return this.makeRequest({ url: path, method: "GET", params }, opts);
1280
1277
  },
1281
1278
  delete(path, opts) {
1282
- return this.makeRequest(__spreadValues({ url: path, method: "DELETE" }, opts));
1279
+ return this.makeRequest({ url: path, method: "DELETE" }, opts);
1283
1280
  },
1284
1281
  post(path, data2, opts) {
1285
- return this.makeRequest(__spreadValues({ url: path, data: data2, method: "POST" }, opts));
1282
+ return this.makeRequest({ url: path, data: data2, method: "POST" }, opts);
1286
1283
  },
1287
1284
  put(path, data2, opts) {
1288
- return this.makeRequest(__spreadValues({ url: path, data: data2, method: "PUT" }, opts));
1285
+ return this.makeRequest({
1286
+ url: path,
1287
+ data: data2,
1288
+ method: "PUT"
1289
+ }, opts);
1289
1290
  }
1290
1291
  };
1291
1292
  function _extends() {
@@ -9449,14 +9450,14 @@ function useBaseAPI(path, method = "GET", initOpts = {}) {
9449
9450
  isAborted.value = false;
9450
9451
  isFinished.value = false;
9451
9452
  isLoading.value = true;
9452
- const requestOpts = __spreadValues(__spreadProps(__spreadValues({}, initOpts), {
9453
+ const requestConfig = {
9453
9454
  data: ["POST", "post", "PUT", "put"].includes(method) ? data2 : {},
9454
9455
  method,
9455
9456
  params: ["GET", "get"].includes(method) ? data2 : {},
9456
9457
  signal: controller.signal,
9457
9458
  url: path
9458
- }), opts);
9459
- return BaseAPI.makeRequest(requestOpts).then((success) => {
9459
+ };
9460
+ return BaseAPI.makeRequest(requestConfig, __spreadValues(__spreadValues({}, initOpts), opts)).then((success) => {
9460
9461
  result.value = success;
9461
9462
  error.value = void 0;
9462
9463
  isAborted.value = false;