@xy-planning-network/trees 0.4.9-rc-4 → 0.5.0
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/README.md +1 -1
- package/dist/trees.es.js +29 -31
- package/dist/trees.umd.js +6 -6
- package/package.json +1 -1
- package/src/lib-components/forms/RadioCards.vue +3 -3
- package/src/lib-components/lists/DetailList.vue +1 -1
- package/src/lib-components/lists/Table.vue +1 -1
- package/src/lib-components/overlays/Flash.vue +0 -10
- package/src/lib-components/overlays/Spinner.vue +1 -15
- package/types/composables/useFlashes.d.ts +7 -1
- package/types/composables/useSpinner.d.ts +1 -1
- package/types/types/lists.d.ts +0 -12
package/README.md
CHANGED
|
@@ -278,7 +278,7 @@ import TreesFormComponents from "./plugins/trees"
|
|
|
278
278
|
// import your project's main stylesheet
|
|
279
279
|
import "@/main.css"
|
|
280
280
|
|
|
281
|
-
// initialize mitt on VueBus for
|
|
281
|
+
// initialize mitt on VueBus for event support
|
|
282
282
|
window.VueBus = Mitt()
|
|
283
283
|
|
|
284
284
|
// initialize the app
|
package/dist/trees.es.js
CHANGED
|
@@ -59,13 +59,10 @@ function useAppSpinnerDisplay() {
|
|
|
59
59
|
}
|
|
60
60
|
return appSpinner;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
const useAppSpinner = (() => {
|
|
63
63
|
const { show, hide } = useAppSpinnerDisplay();
|
|
64
|
-
return {
|
|
65
|
-
|
|
66
|
-
hide
|
|
67
|
-
};
|
|
68
|
-
}
|
|
64
|
+
return { show, hide };
|
|
65
|
+
})();
|
|
69
66
|
var axios$2 = { exports: {} };
|
|
70
67
|
var bind$2 = function bind(fn, thisArg) {
|
|
71
68
|
return function wrap() {
|
|
@@ -1311,12 +1308,12 @@ const BaseAPI = {
|
|
|
1311
1308
|
makeRequest(config, opts) {
|
|
1312
1309
|
const wait = window.setTimeout(() => {
|
|
1313
1310
|
if (!opts.skipLoader) {
|
|
1314
|
-
useAppSpinner
|
|
1311
|
+
useAppSpinner.show();
|
|
1315
1312
|
}
|
|
1316
1313
|
}, 200);
|
|
1317
1314
|
return apiAxiosInstance(__spreadValues(__spreadValues({}, config), opts)).then((success) => success.data).finally(() => {
|
|
1318
1315
|
if (!opts.skipLoader)
|
|
1319
|
-
useAppSpinner
|
|
1316
|
+
useAppSpinner.hide();
|
|
1320
1317
|
window.clearTimeout(wait);
|
|
1321
1318
|
});
|
|
1322
1319
|
},
|
|
@@ -7568,9 +7565,23 @@ function useAppFlashes() {
|
|
|
7568
7565
|
}
|
|
7569
7566
|
return appFlashes;
|
|
7570
7567
|
}
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7568
|
+
const useAppFlasher = {
|
|
7569
|
+
error(msg, persistent) {
|
|
7570
|
+
useAppFlashes().flasher.error(msg, persistent);
|
|
7571
|
+
},
|
|
7572
|
+
info(msg, persistent) {
|
|
7573
|
+
useAppFlashes().flasher.warning(msg, persistent);
|
|
7574
|
+
},
|
|
7575
|
+
success(msg, persistent) {
|
|
7576
|
+
useAppFlashes().flasher.info(msg, persistent);
|
|
7577
|
+
},
|
|
7578
|
+
warning(msg, persistent) {
|
|
7579
|
+
useAppFlashes().flasher.success(msg, persistent);
|
|
7580
|
+
},
|
|
7581
|
+
genericError(email, persistent) {
|
|
7582
|
+
useAppFlashes().flasher.genericError(email, persistent);
|
|
7583
|
+
}
|
|
7584
|
+
};
|
|
7574
7585
|
const _hoisted_1$m = { class: "px-4 flex items-center justify-between sm:px-0" };
|
|
7575
7586
|
const _hoisted_2$h = { class: "w-0 flex-1 flex" };
|
|
7576
7587
|
const _hoisted_3$g = /* @__PURE__ */ createElementVNode("svg", {
|
|
@@ -7723,7 +7734,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
7723
7734
|
if (checkForContent)
|
|
7724
7735
|
hasContent.value = items.value.length != 0;
|
|
7725
7736
|
}, () => {
|
|
7726
|
-
useAppFlasher
|
|
7737
|
+
useAppFlasher.genericError();
|
|
7727
7738
|
});
|
|
7728
7739
|
};
|
|
7729
7740
|
watch([sortDir, dateRange], () => {
|
|
@@ -7825,12 +7836,6 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
7825
7836
|
}
|
|
7826
7837
|
};
|
|
7827
7838
|
onMounted(() => {
|
|
7828
|
-
window.VueBus.on("Flash-show-message", (flash) => {
|
|
7829
|
-
flasher.flash(flash);
|
|
7830
|
-
});
|
|
7831
|
-
window.VueBus.on("Flash-show-generic-error", (email) => {
|
|
7832
|
-
flasher.genericError(email);
|
|
7833
|
-
});
|
|
7834
7839
|
loadWindowFlashes(flasher);
|
|
7835
7840
|
});
|
|
7836
7841
|
return (_ctx, _cache) => {
|
|
@@ -8190,7 +8195,7 @@ const _hoisted_1$g = {
|
|
|
8190
8195
|
const _hoisted_2$d = { class: "mt-2" };
|
|
8191
8196
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
8192
8197
|
setup(__props) {
|
|
8193
|
-
const { idx, loading, maxIdx, messages, msg, showMsg
|
|
8198
|
+
const { idx, loading, maxIdx, messages, msg, showMsg } = useAppSpinnerDisplay();
|
|
8194
8199
|
const fadeIn = () => {
|
|
8195
8200
|
idx.value++;
|
|
8196
8201
|
if (idx.value > maxIdx.value) {
|
|
@@ -8206,14 +8211,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8206
8211
|
showMsg.value = false;
|
|
8207
8212
|
}, 2500);
|
|
8208
8213
|
};
|
|
8209
|
-
onMounted(() => {
|
|
8210
|
-
window.VueBus.on("Spinner-show", (spinMessages) => {
|
|
8211
|
-
show(spinMessages);
|
|
8212
|
-
});
|
|
8213
|
-
window.VueBus.on("Spinner-hide", () => {
|
|
8214
|
-
hide();
|
|
8215
|
-
});
|
|
8216
|
-
});
|
|
8217
8214
|
return (_ctx, _cache) => {
|
|
8218
8215
|
return unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
8219
8216
|
createVNode(_sfc_main$j, { class: "w-32 h-32" }),
|
|
@@ -9385,7 +9382,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
9385
9382
|
};
|
|
9386
9383
|
items.value = success.data.items;
|
|
9387
9384
|
}, () => {
|
|
9388
|
-
useAppFlasher
|
|
9385
|
+
useAppFlasher.genericError();
|
|
9389
9386
|
});
|
|
9390
9387
|
};
|
|
9391
9388
|
const reloadTable = () => {
|
|
@@ -9920,7 +9917,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
9920
9917
|
setup(__props, { emit }) {
|
|
9921
9918
|
const props = __props;
|
|
9922
9919
|
const attrs = useAttrs();
|
|
9923
|
-
const uuid =
|
|
9920
|
+
const uuid = Uniques.CreateIdAttribute();
|
|
9924
9921
|
const internalState = ref();
|
|
9925
9922
|
const invalid = ref();
|
|
9926
9923
|
const checked = computed(() => {
|
|
@@ -10024,13 +10021,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
10024
10021
|
class: "font-semibold leading-snug mt-4 text-gray-900 text-sm"
|
|
10025
10022
|
}, {
|
|
10026
10023
|
default: withCtx(() => [
|
|
10027
|
-
createTextVNode(toDisplayString(option.sublabel) + " ", 1),
|
|
10028
10024
|
renderSlot(_ctx.$slots, "sublabel", {
|
|
10029
10025
|
active,
|
|
10030
10026
|
checked: checked2,
|
|
10031
10027
|
disabled,
|
|
10032
10028
|
option
|
|
10033
|
-
})
|
|
10029
|
+
}, () => [
|
|
10030
|
+
createTextVNode(toDisplayString(option.sublabel), 1)
|
|
10031
|
+
])
|
|
10034
10032
|
]),
|
|
10035
10033
|
_: 2
|
|
10036
10034
|
}, 1024)
|