@xy-planning-network/trees 0.5.1 → 0.6.0-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
@@ -1,22 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
1
  import { ref, cloneVNode, h, inject, provide, watchEffect, defineComponent, onUnmounted, Teleport, reactive, onUpdated, computed, unref, onMounted, nextTick, toRaw, watch, openBlock, createBlock, createVNode, withCtx, Transition, createElementVNode, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot, resolveDynamicComponent, mergeProps, createTextVNode, normalizeProps, useAttrs, shallowRef, withModifiers, TransitionGroup, withDirectives, vShow, normalizeStyle, getCurrentInstance, vModelText, resolveComponent, Comment as Comment$1, Text, useSlots } from "vue";
21
2
  function useSpinnerDisplay() {
22
3
  const idx = ref(0);
@@ -80,7 +61,7 @@ var kindOf = function(cache) {
80
61
  var str = toString.call(thing);
81
62
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
82
63
  };
83
- }(Object.create(null));
64
+ }(/* @__PURE__ */ Object.create(null));
84
65
  function kindOfTest(type) {
85
66
  type = type.toLowerCase();
86
67
  return function isKindOf(thing) {
@@ -475,7 +456,13 @@ var settle$1 = function settle(resolve, reject, response) {
475
456
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
476
457
  resolve(response);
477
458
  } else {
478
- reject(new AxiosError$4("Request failed with status code " + response.status, [AxiosError$4.ERR_BAD_REQUEST, AxiosError$4.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
459
+ reject(new AxiosError$4(
460
+ "Request failed with status code " + response.status,
461
+ [AxiosError$4.ERR_BAD_REQUEST, AxiosError$4.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
462
+ response.config,
463
+ response.request,
464
+ response
465
+ ));
479
466
  }
480
467
  };
481
468
  var utils$b = utils$h;
@@ -713,7 +700,12 @@ var xhr = function xhrAdapter(config) {
713
700
  if (config.timeoutErrorMessage) {
714
701
  timeoutErrorMessage = config.timeoutErrorMessage;
715
702
  }
716
- reject(new AxiosError$2(timeoutErrorMessage, transitional3.clarifyTimeoutError ? AxiosError$2.ETIMEDOUT : AxiosError$2.ECONNABORTED, config, request2));
703
+ reject(new AxiosError$2(
704
+ timeoutErrorMessage,
705
+ transitional3.clarifyTimeoutError ? AxiosError$2.ETIMEDOUT : AxiosError$2.ECONNABORTED,
706
+ config,
707
+ request2
708
+ ));
717
709
  request2 = null;
718
710
  };
719
711
  if (utils$7.isStandardBrowserEnv()) {
@@ -903,21 +895,43 @@ function throwIfCancellationRequested(config) {
903
895
  var dispatchRequest$1 = function dispatchRequest(config) {
904
896
  throwIfCancellationRequested(config);
905
897
  config.headers = config.headers || {};
906
- config.data = transformData2.call(config, config.data, config.headers, config.transformRequest);
907
- config.headers = utils$4.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
908
- utils$4.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
909
- delete config.headers[method];
910
- });
898
+ config.data = transformData2.call(
899
+ config,
900
+ config.data,
901
+ config.headers,
902
+ config.transformRequest
903
+ );
904
+ config.headers = utils$4.merge(
905
+ config.headers.common || {},
906
+ config.headers[config.method] || {},
907
+ config.headers
908
+ );
909
+ utils$4.forEach(
910
+ ["delete", "get", "head", "post", "put", "patch", "common"],
911
+ function cleanHeaderConfig(method) {
912
+ delete config.headers[method];
913
+ }
914
+ );
911
915
  var adapter = config.adapter || defaults$2.adapter;
912
916
  return adapter(config).then(function onAdapterResolution(response) {
913
917
  throwIfCancellationRequested(config);
914
- response.data = transformData2.call(config, response.data, response.headers, config.transformResponse);
918
+ response.data = transformData2.call(
919
+ config,
920
+ response.data,
921
+ response.headers,
922
+ config.transformResponse
923
+ );
915
924
  return response;
916
925
  }, function onAdapterRejection(reason) {
917
926
  if (!isCancel2(reason)) {
918
927
  throwIfCancellationRequested(config);
919
928
  if (reason && reason.response) {
920
- reason.response.data = transformData2.call(config, reason.response.data, reason.response.headers, config.transformResponse);
929
+ reason.response.data = transformData2.call(
930
+ config,
931
+ reason.response.data,
932
+ reason.response.headers,
933
+ config.transformResponse
934
+ );
921
935
  }
922
936
  }
923
937
  return Promise.reject(reason);
@@ -1017,11 +1031,19 @@ validators$1.transitional = function transitional2(validator2, version, message)
1017
1031
  }
1018
1032
  return function(value, opt, opts) {
1019
1033
  if (validator2 === false) {
1020
- throw new AxiosError(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError.ERR_DEPRECATED);
1034
+ throw new AxiosError(
1035
+ formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
1036
+ AxiosError.ERR_DEPRECATED
1037
+ );
1021
1038
  }
1022
1039
  if (version && !deprecatedWarnings[opt]) {
1023
1040
  deprecatedWarnings[opt] = true;
1024
- console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
1041
+ console.warn(
1042
+ formatMessage(
1043
+ opt,
1044
+ " has been deprecated since v" + version + " and will be removed in the near future"
1045
+ )
1046
+ );
1025
1047
  }
1026
1048
  return validator2 ? validator2(value, opt, opts) : true;
1027
1049
  };
@@ -1311,7 +1333,7 @@ const BaseAPI = {
1311
1333
  useAppSpinner.show();
1312
1334
  }
1313
1335
  }, 200);
1314
- return apiAxiosInstance(__spreadValues(__spreadValues({}, config), opts)).then((success) => success.data).finally(() => {
1336
+ return apiAxiosInstance({ ...config, ...opts }).then((success) => success.data).finally(() => {
1315
1337
  if (!opts.skipLoader)
1316
1338
  useAppSpinner.hide();
1317
1339
  window.clearTimeout(wait);
@@ -1327,11 +1349,14 @@ const BaseAPI = {
1327
1349
  return this.makeRequest({ url: path, data: data2, method: "POST" }, opts);
1328
1350
  },
1329
1351
  put(path, data2, opts) {
1330
- return this.makeRequest({
1331
- url: path,
1332
- data: data2,
1333
- method: "PUT"
1334
- }, opts);
1352
+ return this.makeRequest(
1353
+ {
1354
+ url: path,
1355
+ data: data2,
1356
+ method: "PUT"
1357
+ },
1358
+ opts
1359
+ );
1335
1360
  }
1336
1361
  };
1337
1362
  function _extends() {
@@ -1615,15 +1640,19 @@ var Portal = /* @__PURE__ */ defineComponent({
1615
1640
  var propsWeControl = {
1616
1641
  ref: element
1617
1642
  };
1618
- return h(Teleport, {
1619
- to: myTarget.value
1620
- }, render$9({
1621
- props: _extends({}, props, propsWeControl),
1622
- slot: {},
1623
- attrs,
1624
- slots,
1625
- name: "Portal"
1626
- }));
1643
+ return h(
1644
+ Teleport,
1645
+ {
1646
+ to: myTarget.value
1647
+ },
1648
+ render$9({
1649
+ props: _extends({}, props, propsWeControl),
1650
+ slot: {},
1651
+ attrs,
1652
+ slots,
1653
+ name: "Portal"
1654
+ })
1655
+ );
1627
1656
  };
1628
1657
  }
1629
1658
  });
@@ -2162,7 +2191,7 @@ var Dialog = /* @__PURE__ */ defineComponent({
2162
2191
  },
2163
2192
  setup: function setup5(props, _ref) {
2164
2193
  var emit = _ref.emit;
2165
- var containers = ref(new Set());
2194
+ var containers = ref(/* @__PURE__ */ new Set());
2166
2195
  var usesOpenClosedState = useOpenClosed();
2167
2196
  var open = computed(function() {
2168
2197
  if (props.open === Missing && usesOpenClosedState !== null) {
@@ -7141,7 +7170,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
7141
7170
  "block my-1 text-sm font-semibold leading-snug text-gray-900": true,
7142
7171
  "opacity-75": __props.disabled
7143
7172
  }
7144
- }, __spreadValues({}, _ctx.$attrs)), {
7173
+ }, {
7174
+ ..._ctx.$attrs
7175
+ }), {
7145
7176
  default: withCtx(() => [
7146
7177
  createTextVNode(toDisplayString(__props.label), 1)
7147
7178
  ]),
@@ -7157,9 +7188,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
7157
7188
  },
7158
7189
  setup(__props) {
7159
7190
  return (_ctx, _cache) => {
7160
- return __props.text ? (openBlock(), createBlock(resolveDynamicComponent(__props.tag), normalizeProps(mergeProps({ key: 0 }, __spreadProps(__spreadValues({}, _ctx.$attrs), {
7191
+ return __props.text ? (openBlock(), createBlock(resolveDynamicComponent(__props.tag), normalizeProps(mergeProps({ key: 0 }, {
7192
+ ..._ctx.$attrs,
7161
7193
  class: "mt-1 text-sm leading-snug font-normal text-gray-700"
7162
- }))), {
7194
+ })), {
7163
7195
  default: withCtx(() => [
7164
7196
  createTextVNode(toDisplayString(__props.text), 1)
7165
7197
  ]),
@@ -7262,7 +7294,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
7262
7294
  if (selectedDates.length === 2) {
7263
7295
  updateModelValue3({
7264
7296
  minDate: selectedDates[0].setUTCHours(0, 0, 0, 0) / 1e3,
7265
- maxDate: Math.floor(selectedDates[1].setUTCHours(23, 59, 59, 999) / 1e3)
7297
+ maxDate: Math.floor(
7298
+ selectedDates[1].setUTCHours(23, 59, 59, 999) / 1e3
7299
+ )
7266
7300
  });
7267
7301
  } else if (selectedDates.length === 0) {
7268
7302
  updateModelValue3({
@@ -7325,11 +7359,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
7325
7359
  class: unref(classes),
7326
7360
  id: unref(uuid),
7327
7361
  value: __props.modelValue
7328
- }, __spreadProps(__spreadValues({}, _ctx.$attrs), {
7362
+ }, {
7363
+ ..._ctx.$attrs,
7329
7364
  onChange: ($event) => {
7330
7365
  emit("update:modelValue", $event.target.value);
7331
7366
  }
7332
- })), [
7367
+ }), [
7333
7368
  __props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_2$j, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true),
7334
7369
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
7335
7370
  return openBlock(), createElementBlock("option", {
@@ -7427,18 +7462,21 @@ function useBaseAPI(path, method = "GET", initOpts = {}) {
7427
7462
  signal: controller.signal,
7428
7463
  url: path
7429
7464
  };
7430
- return BaseAPI.makeRequest(requestConfig, __spreadValues(__spreadValues({}, initOpts), opts)).then((success) => {
7431
- result.value = success;
7432
- error.value = void 0;
7433
- isAborted.value = false;
7434
- return success;
7435
- }, (err) => {
7436
- error.value = err;
7437
- if (axios.isCancel(err)) {
7438
- isAborted.value = true;
7439
- }
7440
- throw err;
7441
- }).finally(() => {
7465
+ return BaseAPI.makeRequest(requestConfig, { ...initOpts, ...opts }).then(
7466
+ (success) => {
7467
+ result.value = success;
7468
+ error.value = void 0;
7469
+ isAborted.value = false;
7470
+ return success;
7471
+ },
7472
+ (err) => {
7473
+ error.value = err;
7474
+ if (axios.isCancel(err)) {
7475
+ isAborted.value = true;
7476
+ }
7477
+ throw err;
7478
+ }
7479
+ ).finally(() => {
7442
7480
  if (count == requestCount) {
7443
7481
  isFinished.value = true;
7444
7482
  isLoading.value = false;
@@ -7473,13 +7511,16 @@ function useBaseAPIPut(url, opts = {}) {
7473
7511
  return useBaseAPI(url, "PUT", opts);
7474
7512
  }
7475
7513
  function useFlashes(flasherConfig = {}) {
7476
- const flashes = ref(new Map());
7514
+ const flashes = ref(/* @__PURE__ */ new Map());
7477
7515
  let config = {
7478
7516
  removeDelay: 1e4,
7479
7517
  email: ""
7480
7518
  };
7481
7519
  const configure = (newConfig) => {
7482
- config = __spreadValues(__spreadValues({}, config), newConfig);
7520
+ config = {
7521
+ ...config,
7522
+ ...newConfig
7523
+ };
7483
7524
  };
7484
7525
  const remove = (id2) => {
7485
7526
  flashes.value.delete(id2);
@@ -7627,9 +7668,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
7627
7668
  setup(__props, { emit }) {
7628
7669
  const props = __props;
7629
7670
  const changePage = (page) => {
7630
- emit("update:modelValue", __spreadProps(__spreadValues({}, props.modelValue), {
7671
+ emit("update:modelValue", {
7672
+ ...props.modelValue,
7631
7673
  page
7632
- }));
7674
+ });
7633
7675
  };
7634
7676
  const pageShortcuts = computed(() => {
7635
7677
  const shortcuts = [];
@@ -7723,30 +7765,39 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
7723
7765
  perPage: pagination.value.perPage,
7724
7766
  sortDir: sortDir.value
7725
7767
  };
7726
- BaseAPI.get(props.url, {}, Object.assign(params, dateRange.value)).then((success) => {
7727
- pagination.value = {
7728
- page: success.data.page,
7729
- perPage: success.data.perPage,
7730
- totalItems: success.data.totalItems,
7731
- totalPages: success.data.totalPages
7732
- };
7733
- items.value = success.data.items;
7734
- if (checkForContent)
7735
- hasContent.value = items.value.length != 0;
7736
- }, () => {
7737
- useAppFlasher.genericError();
7738
- });
7768
+ BaseAPI.get(props.url, {}, Object.assign(params, dateRange.value)).then(
7769
+ (success) => {
7770
+ pagination.value = {
7771
+ page: success.data.page,
7772
+ perPage: success.data.perPage,
7773
+ totalItems: success.data.totalItems,
7774
+ totalPages: success.data.totalPages
7775
+ };
7776
+ items.value = success.data.items;
7777
+ if (checkForContent)
7778
+ hasContent.value = items.value.length != 0;
7779
+ },
7780
+ () => {
7781
+ useAppFlasher.genericError();
7782
+ }
7783
+ );
7739
7784
  };
7740
7785
  watch([sortDir, dateRange], () => {
7741
7786
  loadAndRender(false);
7742
7787
  });
7743
- watch(() => props.refreshTrigger, () => {
7744
- loadAndRender(false);
7745
- });
7746
- watch(() => props.reloadTrigger, () => {
7747
- pagination.value.page = 1;
7748
- loadAndRender(true);
7749
- });
7788
+ watch(
7789
+ () => props.refreshTrigger,
7790
+ () => {
7791
+ loadAndRender(false);
7792
+ }
7793
+ );
7794
+ watch(
7795
+ () => props.reloadTrigger,
7796
+ () => {
7797
+ pagination.value.page = 1;
7798
+ loadAndRender(true);
7799
+ }
7800
+ );
7750
7801
  loadAndRender(true);
7751
7802
  return (_ctx, _cache) => {
7752
7803
  return openBlock(), createElementBlock("div", null, [
@@ -7804,7 +7855,7 @@ const _hoisted_3$f = { class: "p-4" };
7804
7855
  const _hoisted_4$d = { class: "flex items-center" };
7805
7856
  const _hoisted_5$c = { class: "w-0 flex-1 flex justify-between" };
7806
7857
  const _hoisted_6$a = ["innerHTML"];
7807
- const _hoisted_7$9 = { class: "ml-4 flex-shrink-0 flex" };
7858
+ const _hoisted_7$9 = { class: "ml-4 shrink-0 flex" };
7808
7859
  const _hoisted_8$7 = ["onClick"];
7809
7860
  const _hoisted_9$7 = /* @__PURE__ */ createElementVNode("svg", {
7810
7861
  class: "h-5 w-5",
@@ -8091,7 +8142,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
8091
8142
  };
8092
8143
  }
8093
8144
  });
8094
- const _hoisted_1$h = { class: "aspect-w-1 aspect-h-1 overflow-hidden" };
8145
+ const _hoisted_1$h = { class: "aspect-square overflow-hidden" };
8095
8146
  const _hoisted_2$e = { class: "flex justify-center relative" };
8096
8147
  const _hoisted_3$d = { class: "sr-only" };
8097
8148
  const _hoisted_4$b = /* @__PURE__ */ createElementVNode("div", { class: "animate-spin-gear" }, [
@@ -8244,25 +8295,25 @@ const _hoisted_1$f = { class: "h-screen flex overflow-hidden bg-gray-100" };
8244
8295
  const _hoisted_2$c = { class: "relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white" };
8245
8296
  const _hoisted_3$c = { class: "absolute top-0 right-0 -mr-12 pt-2" };
8246
8297
  const _hoisted_4$a = /* @__PURE__ */ createElementVNode("span", { class: "sr-only" }, "Close sidebar", -1);
8247
- const _hoisted_5$9 = { class: "flex-shrink-0 flex justify-center px-4" };
8298
+ const _hoisted_5$9 = { class: "shrink-0 flex justify-center px-4" };
8248
8299
  const _hoisted_6$8 = ["src"];
8249
8300
  const _hoisted_7$7 = { class: "mt-5 flex-1 h-0 overflow-y-auto" };
8250
8301
  const _hoisted_8$5 = { class: "px-2 space-y-1" };
8251
8302
  const _hoisted_9$5 = ["href", "target"];
8252
8303
  const _hoisted_10$5 = /* @__PURE__ */ createElementVNode("div", {
8253
- class: "flex-shrink-0 w-14",
8304
+ class: "shrink-0 w-14",
8254
8305
  "aria-hidden": "true"
8255
8306
  }, null, -1);
8256
- const _hoisted_11$4 = { class: "hidden md:flex md:flex-shrink-0" };
8307
+ const _hoisted_11$4 = { class: "hidden md:flex md:shrink-0" };
8257
8308
  const _hoisted_12$3 = { class: "flex flex-col w-64" };
8258
- const _hoisted_13$3 = { class: "flex flex-col flex-grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto" };
8259
- const _hoisted_14$3 = { class: "flex items-center flex-shrink-0 px-4" };
8309
+ const _hoisted_13$3 = { class: "flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto" };
8310
+ const _hoisted_14$3 = { class: "flex items-center shrink-0 px-4" };
8260
8311
  const _hoisted_15$2 = ["src"];
8261
- const _hoisted_16$2 = { class: "mt-5 flex-grow flex flex-col" };
8312
+ const _hoisted_16$2 = { class: "mt-5 grow flex flex-col" };
8262
8313
  const _hoisted_17$2 = { class: "flex-1 px-2 bg-white space-y-1" };
8263
8314
  const _hoisted_18$2 = ["href", "target"];
8264
8315
  const _hoisted_19$2 = { class: "flex flex-col w-0 flex-1 overflow-hidden" };
8265
- const _hoisted_20$2 = { class: "relative z-10 flex-shrink-0 flex h-16 bg-xy-blue shadow" };
8316
+ const _hoisted_20$2 = { class: "relative z-10 shrink-0 flex h-16 bg-xy-blue shadow" };
8266
8317
  const _hoisted_21$2 = /* @__PURE__ */ createElementVNode("span", { class: "sr-only" }, "Open sidebar", -1);
8267
8318
  const _hoisted_22$2 = { class: "flex-1 px-4 flex justify-between" };
8268
8319
  const _hoisted_23$2 = { class: "flex-1 flex" };
@@ -8868,7 +8919,7 @@ const _hoisted_1$b = { class: "min-h-screen bg-gray-100" };
8868
8919
  const _hoisted_2$9 = { class: "mx-auto px-4 sm:px-6 lg:px-8" };
8869
8920
  const _hoisted_3$9 = { class: "flex justify-between h-16" };
8870
8921
  const _hoisted_4$8 = { class: "flex" };
8871
- const _hoisted_5$7 = { class: "flex-shrink-0 flex items-center" };
8922
+ const _hoisted_5$7 = { class: "shrink-0 flex items-center" };
8872
8923
  const _hoisted_6$6 = ["src"];
8873
8924
  const _hoisted_7$5 = { class: "hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8" };
8874
8925
  const _hoisted_8$3 = ["href", "aria-current"];
@@ -8881,7 +8932,7 @@ const _hoisted_14$2 = { class: "pt-2 pb-3 space-y-1" };
8881
8932
  const _hoisted_15$1 = ["href", "aria-current"];
8882
8933
  const _hoisted_16$1 = { class: "pt-4 pb-3 border-t border-gray-200" };
8883
8934
  const _hoisted_17$1 = { class: "flex items-center px-4" };
8884
- const _hoisted_18$1 = { class: "flex-shrink-0" };
8935
+ const _hoisted_18$1 = { class: "shrink-0" };
8885
8936
  const _hoisted_19$1 = { class: "ml-3" };
8886
8937
  const _hoisted_20$1 = ["textContent"];
8887
8938
  const _hoisted_21$1 = ["textContent"];
@@ -9089,7 +9140,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
9089
9140
  }
9090
9141
  if (col.presenter) {
9091
9142
  const internalInstance = getCurrentInstance();
9092
- return col.presenter(item, internalInstance == null ? void 0 : internalInstance.proxy);
9143
+ return col.presenter(
9144
+ item,
9145
+ internalInstance == null ? void 0 : internalInstance.proxy
9146
+ );
9093
9147
  }
9094
9148
  return "";
9095
9149
  };
@@ -9174,7 +9228,7 @@ const _hoisted_9$1 = {
9174
9228
  };
9175
9229
  const _hoisted_10$1 = {
9176
9230
  key: 0,
9177
- class: "flex flex-shrink-0"
9231
+ class: "flex shrink-0"
9178
9232
  };
9179
9233
  const _hoisted_11$1 = {
9180
9234
  key: 0,
@@ -9325,8 +9379,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9325
9379
  },
9326
9380
  setup(__props) {
9327
9381
  const props = __props;
9328
- const currentSort = ref(props.tableData.defaultSort ? props.tableData.defaultSort : "");
9329
- const currentSortDirection = ref(props.tableData.defaultSortDirection ? props.tableData.defaultSortDirection : "desc");
9382
+ const currentSort = ref(
9383
+ props.tableData.defaultSort ? props.tableData.defaultSort : ""
9384
+ );
9385
+ const currentSortDirection = ref(
9386
+ props.tableData.defaultSortDirection ? props.tableData.defaultSortDirection : "desc"
9387
+ );
9330
9388
  const dateRange = ref({
9331
9389
  minDate: 0,
9332
9390
  maxDate: 0
@@ -9345,7 +9403,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9345
9403
  }
9346
9404
  if (col.presenter) {
9347
9405
  const internalInstance = getCurrentInstance();
9348
- return col.presenter(item, internalInstance == null ? void 0 : internalInstance.proxy);
9406
+ return col.presenter(
9407
+ item,
9408
+ internalInstance == null ? void 0 : internalInstance.proxy
9409
+ );
9349
9410
  }
9350
9411
  return "";
9351
9412
  };
@@ -9373,17 +9434,20 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9373
9434
  sortDir: currentSortDirection.value,
9374
9435
  q: query.value
9375
9436
  };
9376
- BaseAPI.get(props.tableData.url, { skipLoader: !props.loader }, params).then((success) => {
9377
- pagination.value = {
9378
- page: success.data.page,
9379
- perPage: success.data.perPage,
9380
- totalItems: success.data.totalItems,
9381
- totalPages: success.data.totalPages
9382
- };
9383
- items.value = success.data.items;
9384
- }, () => {
9385
- useAppFlasher.genericError();
9386
- });
9437
+ BaseAPI.get(props.tableData.url, { skipLoader: !props.loader }, params).then(
9438
+ (success) => {
9439
+ pagination.value = {
9440
+ page: success.data.page,
9441
+ perPage: success.data.perPage,
9442
+ totalItems: success.data.totalItems,
9443
+ totalPages: success.data.totalPages
9444
+ };
9445
+ items.value = success.data.items;
9446
+ },
9447
+ () => {
9448
+ useAppFlasher.genericError();
9449
+ }
9450
+ );
9387
9451
  };
9388
9452
  const reloadTable = () => {
9389
9453
  pagination.value.page = 1;
@@ -9392,12 +9456,18 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9392
9456
  const hasContent = computed(() => {
9393
9457
  return items.value.length ? true : false;
9394
9458
  });
9395
- watch(() => props.tableData.refreshTrigger, () => {
9396
- loadAndRender();
9397
- });
9398
- watch(() => props.tableData.reloadTrigger, () => {
9399
- reloadTable();
9400
- });
9459
+ watch(
9460
+ () => props.tableData.refreshTrigger,
9461
+ () => {
9462
+ loadAndRender();
9463
+ }
9464
+ );
9465
+ watch(
9466
+ () => props.tableData.reloadTrigger,
9467
+ () => {
9468
+ reloadTable();
9469
+ }
9470
+ );
9401
9471
  loadAndRender();
9402
9472
  return (_ctx, _cache) => {
9403
9473
  return openBlock(), createElementBlock("div", null, [
@@ -9590,7 +9660,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
9590
9660
  return openBlock(), createBlock(unref(Switch), {
9591
9661
  class: normalizeClass([
9592
9662
  __props.modelValue ? "bg-blue-600" : "bg-gray-200",
9593
- "relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
9663
+ "relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
9594
9664
  ]),
9595
9665
  modelValue: __props.modelValue,
9596
9666
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emits("update:modelValue", $event))
@@ -9634,11 +9704,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9634
9704
  checked: __props.modelValue,
9635
9705
  class: "focus:ring-blue-500 h-4 w-4 text-blue-500 border-gray-600 rounded disabled:opacity-50 disabled:cursor-not-allowed",
9636
9706
  type: "checkbox"
9637
- }, __spreadValues({
9707
+ }, {
9638
9708
  onChange: ($event) => {
9639
9709
  emits("update:modelValue", $event.target.checked);
9640
- }
9641
- }, _ctx.$attrs)), null, 16, _hoisted_3$4)
9710
+ },
9711
+ ..._ctx.$attrs
9712
+ }), null, 16, _hoisted_3$4)
9642
9713
  ]),
9643
9714
  createElementVNode("div", _hoisted_4$4, [
9644
9715
  createVNode(_sfc_main$u, {
@@ -9675,9 +9746,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
9675
9746
  },
9676
9747
  setup(__props) {
9677
9748
  return (_ctx, _cache) => {
9678
- return unref(hasSlotContent)(_ctx.$slots.default) ? (openBlock(), createBlock(resolveDynamicComponent(__props.tag), normalizeProps(mergeProps({ key: 0 }, __spreadProps(__spreadValues({}, _ctx.$attrs), {
9749
+ return unref(hasSlotContent)(_ctx.$slots.default) ? (openBlock(), createBlock(resolveDynamicComponent(__props.tag), normalizeProps(mergeProps({ key: 0 }, {
9750
+ ..._ctx.$attrs,
9679
9751
  class: "text-sm font-semibold leading-snug text-gray-900"
9680
- }))), {
9752
+ })), {
9681
9753
  default: withCtx(() => [
9682
9754
  renderSlot(_ctx.$slots, "default")
9683
9755
  ]),
@@ -9767,11 +9839,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9767
9839
  disabled: option.disabled === true ? true : void 0,
9768
9840
  class: "focus:ring-blue-500 h-4 w-4 text-blue-500 border-gray-600 rounded disabled:opacity-50 disabled:cursor-not-allowed",
9769
9841
  type: "checkbox"
9770
- }, __spreadValues({
9842
+ }, {
9771
9843
  onChange: ($event) => {
9772
9844
  onChange($event.target.checked, option.value);
9773
- }
9774
- }, _ctx.$attrs)), null, 16, _hoisted_6$2)
9845
+ },
9846
+ ..._ctx.$attrs
9847
+ }), null, 16, _hoisted_6$2)
9775
9848
  ]),
9776
9849
  createElementVNode("div", _hoisted_7$1, [
9777
9850
  createVNode(_sfc_main$u, {
@@ -9869,11 +9942,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9869
9942
  name: unref(uuid),
9870
9943
  type: "radio",
9871
9944
  value: option.value
9872
- }, __spreadValues({
9945
+ }, {
9873
9946
  onChange: () => {
9874
9947
  emits("update:modelValue", option.value);
9875
- }
9876
- }, _ctx.$attrs)), null, 16, _hoisted_6$1)
9948
+ },
9949
+ ..._ctx.$attrs
9950
+ }), null, 16, _hoisted_6$1)
9877
9951
  ]),
9878
9952
  createElementVNode("div", _hoisted_7, [
9879
9953
  createVNode(_sfc_main$u, {
@@ -10174,9 +10248,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10174
10248
  name: unref(hasNameAttr) ? __props.name : unref(uuid),
10175
10249
  value: true,
10176
10250
  checked: __props.modelValue === true
10177
- }, __spreadProps(__spreadValues({}, _ctx.$attrs), {
10251
+ }, {
10252
+ ..._ctx.$attrs,
10178
10253
  onChange
10179
- })), null, 16, _hoisted_4),
10254
+ }), null, 16, _hoisted_4),
10180
10255
  createVNode(_sfc_main$u, {
10181
10256
  class: "ml-2",
10182
10257
  disabled: _ctx.$attrs.hasOwnProperty("disabled") && _ctx.$attrs.disabled !== false,
@@ -10195,9 +10270,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10195
10270
  name: unref(hasNameAttr) ? __props.name : unref(uuid),
10196
10271
  value: false,
10197
10272
  checked: __props.modelValue === false
10198
- }, __spreadProps(__spreadValues({}, _ctx.$attrs), {
10273
+ }, {
10274
+ ..._ctx.$attrs,
10199
10275
  onChange
10200
- })), null, 16, _hoisted_6),
10276
+ }), null, 16, _hoisted_6),
10201
10277
  createVNode(_sfc_main$u, {
10202
10278
  class: "ml-2",
10203
10279
  disabled: _ctx.$attrs.hasOwnProperty("disabled") && _ctx.$attrs.disabled !== false,