@xy-planning-network/trees 0.6.2-rc-7 → 0.6.2
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 +12 -22
- package/dist/trees.umd.js +6 -6
- package/package.json +2 -1
- package/src/lib-components/forms/RadioCards.vue +2 -2
- package/src/lib-components/lists/Table.vue +2 -2
- package/types/api/base.d.ts +2 -10
- package/types/api/client.d.ts +69 -41
- package/types/composables/useBaseAPI.d.ts +6 -6
- package/types/entry.d.ts +4 -4
- package/types/api/url.d.ts +0 -1
- package/types/composables/usePopper.d.ts +0 -19
- package/types/types/lists.d.ts +0 -12
package/dist/trees.es.js
CHANGED
|
@@ -1259,12 +1259,12 @@ axios$1.isAxiosError = isAxiosError;
|
|
|
1259
1259
|
axios$2.exports = axios$1;
|
|
1260
1260
|
axios$2.exports.default = axios$1;
|
|
1261
1261
|
var axios = axios$2.exports;
|
|
1262
|
-
const
|
|
1263
|
-
const
|
|
1262
|
+
const HTTP_ERR = "HttpError";
|
|
1263
|
+
const HTTP_ERR_CANCEL = "HttpErrorCanceled";
|
|
1264
1264
|
class HttpError extends Error {
|
|
1265
1265
|
constructor(message, status, response, name) {
|
|
1266
1266
|
super(message || "");
|
|
1267
|
-
this.name = name ||
|
|
1267
|
+
this.name = name || HTTP_ERR;
|
|
1268
1268
|
this.status = status || 0;
|
|
1269
1269
|
this.response = response;
|
|
1270
1270
|
}
|
|
@@ -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_ERR_CANCEL : HTTP_ERR
|
|
1352
1352
|
);
|
|
1353
1353
|
}
|
|
1354
1354
|
if (err instanceof Error) {
|
|
@@ -1363,12 +1363,12 @@ const httpRequest = (config, opts) => {
|
|
|
1363
1363
|
});
|
|
1364
1364
|
};
|
|
1365
1365
|
const BaseAPI = {
|
|
1366
|
-
get(path, opts, params) {
|
|
1367
|
-
return httpRequest({ url: path, method: "GET", params }, opts || {});
|
|
1368
|
-
},
|
|
1369
1366
|
delete(path, opts) {
|
|
1370
1367
|
return httpRequest({ url: path, method: "DELETE" }, opts || {});
|
|
1371
1368
|
},
|
|
1369
|
+
get(path, opts, params) {
|
|
1370
|
+
return httpRequest({ url: path, method: "GET", params }, opts || {});
|
|
1371
|
+
},
|
|
1372
1372
|
patch(path, data2, opts) {
|
|
1373
1373
|
return httpRequest({ url: path, data: data2, method: "PATCH" }, opts || {});
|
|
1374
1374
|
},
|
|
@@ -1386,20 +1386,11 @@ const BaseAPI = {
|
|
|
1386
1386
|
);
|
|
1387
1387
|
}
|
|
1388
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
1389
|
const isHttpError = (err) => {
|
|
1399
1390
|
return err instanceof HttpError;
|
|
1400
1391
|
};
|
|
1401
1392
|
const isHttpCancel = (err) => {
|
|
1402
|
-
return isHttpError(err) && err.name ===
|
|
1393
|
+
return isHttpError(err) && err.name === HTTP_ERR_CANCEL;
|
|
1403
1394
|
};
|
|
1404
1395
|
function _extends() {
|
|
1405
1396
|
_extends = Object.assign || function(target) {
|
|
@@ -10113,12 +10104,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
10113
10104
|
}, {
|
|
10114
10105
|
default: withCtx(({ active, checked: checked2, disabled }) => [
|
|
10115
10106
|
createElementVNode("div", {
|
|
10116
|
-
class: normalizeClass([
|
|
10107
|
+
class: normalizeClass(["relative bg-white border rounded-lg shadow-sm p-4 flex cursor-pointer focus:outline-none", [
|
|
10117
10108
|
checked2 ? "border-transparent" : "border-gray-300",
|
|
10118
10109
|
active ? "border-blue-500 ring-2 ring-blue-500" : "",
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
])
|
|
10110
|
+
disabled ? "cursor-not-allowed opacity-75" : ""
|
|
10111
|
+
]])
|
|
10122
10112
|
}, [
|
|
10123
10113
|
createElementVNode("div", _hoisted_2$1, [
|
|
10124
10114
|
createElementVNode("div", _hoisted_3$1, [
|
|
@@ -10386,4 +10376,4 @@ const install = function installTrees(app) {
|
|
|
10386
10376
|
app.component(componentName, component);
|
|
10387
10377
|
});
|
|
10388
10378
|
};
|
|
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,
|
|
10379
|
+
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, isHttpCancel, isHttpError, useAppFlasher, useAppFlashes, useAppSpinner, useBaseAPI, useBaseAPIDelete, useBaseAPIGet, useBaseAPIPost, useBaseAPIPut, useFlashes, useSpinnerDisplay };
|