@xy-planning-network/trees 0.6.2-rc-5 → 0.6.2-rc-7
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 +18 -18
- package/dist/trees.umd.js +6 -6
- package/package.json +1 -1
- package/types/api/base.d.ts +21 -1
- package/types/api/client.d.ts +12 -20
- package/types/entry.d.ts +4 -4
package/dist/trees.es.js
CHANGED
|
@@ -1348,7 +1348,7 @@ const httpRequest = (config, opts) => {
|
|
|
1348
1348
|
err.message,
|
|
1349
1349
|
(_a = err.response) == null ? void 0 : _a.status,
|
|
1350
1350
|
(_b = err.response) == null ? void 0 : _b.data,
|
|
1351
|
-
axios.isCancel(err) ?
|
|
1351
|
+
axios.isCancel(err) ? HTTP_CANCELLED_ERROR : HTTP_ERROR
|
|
1352
1352
|
);
|
|
1353
1353
|
}
|
|
1354
1354
|
if (err instanceof Error) {
|
|
@@ -1369,21 +1369,6 @@ const BaseAPI = {
|
|
|
1369
1369
|
delete(path, opts) {
|
|
1370
1370
|
return httpRequest({ url: path, method: "DELETE" }, opts || {});
|
|
1371
1371
|
},
|
|
1372
|
-
hasErrStatus(err, codes) {
|
|
1373
|
-
if (typeof codes === "number") {
|
|
1374
|
-
codes = [codes];
|
|
1375
|
-
}
|
|
1376
|
-
if (this.isHttpError(err)) {
|
|
1377
|
-
return codes.includes(err.status);
|
|
1378
|
-
}
|
|
1379
|
-
return false;
|
|
1380
|
-
},
|
|
1381
|
-
isHttpCancel(err) {
|
|
1382
|
-
return this.isHttpError(err) && err.name === HTTP_CANCELLED_ERROR;
|
|
1383
|
-
},
|
|
1384
|
-
isHttpError(err) {
|
|
1385
|
-
return err instanceof HttpError;
|
|
1386
|
-
},
|
|
1387
1372
|
patch(path, data2, opts) {
|
|
1388
1373
|
return httpRequest({ url: path, data: data2, method: "PATCH" }, opts || {});
|
|
1389
1374
|
},
|
|
@@ -1401,6 +1386,21 @@ const BaseAPI = {
|
|
|
1401
1386
|
);
|
|
1402
1387
|
}
|
|
1403
1388
|
};
|
|
1389
|
+
const hasHttpErrStatus = (err, codes) => {
|
|
1390
|
+
if (typeof codes === "number") {
|
|
1391
|
+
codes = [codes];
|
|
1392
|
+
}
|
|
1393
|
+
if (isHttpError(err)) {
|
|
1394
|
+
return codes.includes(err.status);
|
|
1395
|
+
}
|
|
1396
|
+
return false;
|
|
1397
|
+
};
|
|
1398
|
+
const isHttpError = (err) => {
|
|
1399
|
+
return err instanceof HttpError;
|
|
1400
|
+
};
|
|
1401
|
+
const isHttpCancel = (err) => {
|
|
1402
|
+
return isHttpError(err) && err.name === HTTP_CANCELLED_ERROR;
|
|
1403
|
+
};
|
|
1404
1404
|
function _extends() {
|
|
1405
1405
|
_extends = Object.assign || function(target) {
|
|
1406
1406
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -7513,7 +7513,7 @@ function useBaseAPI(path, method = "GET", initOpts = {}) {
|
|
|
7513
7513
|
},
|
|
7514
7514
|
(err) => {
|
|
7515
7515
|
error.value = err;
|
|
7516
|
-
if (
|
|
7516
|
+
if (isHttpCancel(err)) {
|
|
7517
7517
|
isAborted.value = true;
|
|
7518
7518
|
}
|
|
7519
7519
|
throw err;
|
|
@@ -10386,4 +10386,4 @@ const install = function installTrees(app) {
|
|
|
10386
10386
|
app.component(componentName, component);
|
|
10387
10387
|
});
|
|
10388
10388
|
};
|
|
10389
|
-
export { _sfc_main$x as ActionsDropdown, BaseAPI, _sfc_main$s as BaseInput, _sfc_main$w as Cards, _sfc_main$6 as Checkbox, _sfc_main$v as ContentModal, _sfc_main$p as DateFilter, _sfc_main$r as DateRangePicker, _sfc_main$n as DetailList, _sfc_main$m as DownloadCell, _sfc_main$5 as FieldsetLegend, _sfc_main$l as Flash, _sfc_main$t as InputHelp, _sfc_main$u as InputLabel, _sfc_main$k as Modal, _sfc_main$4 as MultiCheckboxes, _sfc_main$o as Paginator, _sfc_main$g as Popover, PopoverContent, _sfc_main$g as PopoverPosition, _sfc_main$3 as Radio, _sfc_main$2 as RadioCards, _sfc_main$q as Select, _sfc_main$h as SidebarLayout, _sfc_main$e as Slideover, _sfc_main$i as Spinner, _sfc_main$c as StackedLayout, _sfc_main$b as StaticTable, _sfc_main$a as Steps, _sfc_main$9 as Table, _sfc_main$8 as Tabs, _sfc_main$1 as TextArea, _sfc_main$7 as Toggle, _sfc_main$d as Tooltip, _sfc_main$j as XYSpinner, _sfc_main as YesOrNoRadio, install as default, useAppFlasher, useAppFlashes, useAppSpinner, useBaseAPI, useBaseAPIDelete, useBaseAPIGet, useBaseAPIPost, useBaseAPIPut, useFlashes, useSpinnerDisplay };
|
|
10389
|
+
export { _sfc_main$x as ActionsDropdown, BaseAPI, _sfc_main$s as BaseInput, _sfc_main$w as Cards, _sfc_main$6 as Checkbox, _sfc_main$v as ContentModal, _sfc_main$p as DateFilter, _sfc_main$r as DateRangePicker, _sfc_main$n as DetailList, _sfc_main$m as DownloadCell, _sfc_main$5 as FieldsetLegend, _sfc_main$l as Flash, _sfc_main$t as InputHelp, _sfc_main$u as InputLabel, _sfc_main$k as Modal, _sfc_main$4 as MultiCheckboxes, _sfc_main$o as Paginator, _sfc_main$g as Popover, PopoverContent, _sfc_main$g as PopoverPosition, _sfc_main$3 as Radio, _sfc_main$2 as RadioCards, _sfc_main$q as Select, _sfc_main$h as SidebarLayout, _sfc_main$e as Slideover, _sfc_main$i as Spinner, _sfc_main$c as StackedLayout, _sfc_main$b as StaticTable, _sfc_main$a as Steps, _sfc_main$9 as Table, _sfc_main$8 as Tabs, _sfc_main$1 as TextArea, _sfc_main$7 as Toggle, _sfc_main$d as Tooltip, _sfc_main$j as XYSpinner, _sfc_main as YesOrNoRadio, install as default, hasHttpErrStatus, isHttpCancel, isHttpError, useAppFlasher, useAppFlashes, useAppSpinner, useBaseAPI, useBaseAPIDelete, useBaseAPIGet, useBaseAPIPost, useBaseAPIPut, useFlashes, useSpinnerDisplay };
|