@xy-planning-network/trees 0.5.0-rc-1 → 0.5.0-rc-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 CHANGED
@@ -40,13 +40,10 @@ function useAppSpinnerDisplay() {
40
40
  }
41
41
  return appSpinner;
42
42
  }
43
- function useAppSpinner() {
43
+ const useAppSpinner = (() => {
44
44
  const { show, hide } = useAppSpinnerDisplay();
45
- return {
46
- show,
47
- hide
48
- };
49
- }
45
+ return { show, hide };
46
+ })();
50
47
  var axios$2 = { exports: {} };
51
48
  var bind$2 = function bind(fn, thisArg) {
52
49
  return function wrap() {
@@ -1292,12 +1289,12 @@ const BaseAPI = {
1292
1289
  makeRequest(config, opts) {
1293
1290
  const wait = window.setTimeout(() => {
1294
1291
  if (!opts.skipLoader) {
1295
- useAppSpinner().show();
1292
+ useAppSpinner.show();
1296
1293
  }
1297
1294
  }, 200);
1298
1295
  return apiAxiosInstance({ ...config, ...opts }).then((success) => success.data).finally(() => {
1299
1296
  if (!opts.skipLoader)
1300
- useAppSpinner().hide();
1297
+ useAppSpinner.hide();
1301
1298
  window.clearTimeout(wait);
1302
1299
  });
1303
1300
  },
@@ -7556,9 +7553,23 @@ function useAppFlashes() {
7556
7553
  }
7557
7554
  return appFlashes;
7558
7555
  }
7559
- function useAppFlasher() {
7560
- return useAppFlashes().flasher;
7561
- }
7556
+ const useAppFlasher = {
7557
+ error(msg, persistent) {
7558
+ useAppFlashes().flasher.error(msg, persistent);
7559
+ },
7560
+ info(msg, persistent) {
7561
+ useAppFlashes().flasher.warning(msg, persistent);
7562
+ },
7563
+ success(msg, persistent) {
7564
+ useAppFlashes().flasher.info(msg, persistent);
7565
+ },
7566
+ warning(msg, persistent) {
7567
+ useAppFlashes().flasher.success(msg, persistent);
7568
+ },
7569
+ genericError(email, persistent) {
7570
+ useAppFlashes().flasher.genericError(email, persistent);
7571
+ }
7572
+ };
7562
7573
  const _hoisted_1$m = { class: "px-4 flex items-center justify-between sm:px-0" };
7563
7574
  const _hoisted_2$h = { class: "w-0 flex-1 flex" };
7564
7575
  const _hoisted_3$g = /* @__PURE__ */ createElementVNode("svg", {
@@ -7712,7 +7723,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
7712
7723
  if (checkForContent)
7713
7724
  hasContent.value = items.value.length != 0;
7714
7725
  }, () => {
7715
- useAppFlasher().genericError();
7726
+ useAppFlasher.genericError();
7716
7727
  });
7717
7728
  };
7718
7729
  watch([sortDir, dateRange], () => {
@@ -9360,7 +9371,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9360
9371
  };
9361
9372
  items.value = success.data.items;
9362
9373
  }, () => {
9363
- useAppFlasher().genericError();
9374
+ useAppFlasher.genericError();
9364
9375
  });
9365
9376
  };
9366
9377
  const reloadTable = () => {