bt-core-app 2.2.21 → 2.2.22

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.
@@ -156,6 +156,7 @@ const Re = {
156
156
  sortDirection: {},
157
157
  sortProp: {},
158
158
  startEditing: { type: Boolean },
159
+ startRefreshing: { type: Boolean },
159
160
  startShowingInactive: { type: Boolean },
160
161
  startShowingSearch: { type: Boolean },
161
162
  storeMode: {},
@@ -175,6 +175,7 @@ const bt = {
175
175
  sortDirection: {},
176
176
  sortProp: {},
177
177
  startEditing: { type: Boolean, default: !0 },
178
+ startRefreshing: { type: Boolean },
178
179
  startShowingInactive: { type: Boolean },
179
180
  startShowingSearch: { type: Boolean },
180
181
  storeMode: {},
@@ -1,7 +1,7 @@
1
- import { defineComponent as Y, ref as V, inject as C, computed as m, openBlock as a, createBlock as s, unref as t, normalizeClass as J, withCtx as i, createElementVNode as $, renderSlot as u, createVNode as r, createTextVNode as c, mergeProps as z, createCommentVNode as p, toDisplayString as f, createElementBlock as P, Fragment as O, renderList as W } from "vue";
1
+ import { defineComponent as Y, ref as V, inject as C, computed as m, openBlock as a, createBlock as s, unref as t, normalizeClass as J, withCtx as i, createElementVNode as $, renderSlot as u, createVNode as r, createTextVNode as c, mergeProps as z, createCommentVNode as p, toDisplayString as f, createElementBlock as P, Fragment as R, renderList as W } from "vue";
2
2
  import { useList as Z } from "../composables/list.mjs";
3
3
  import { useFilters as x } from "../composables/filters.mjs";
4
- import { nestedValue as R, isLengthyArray as _ } from "../composables/helpers.mjs";
4
+ import { nestedValue as O, isLengthyArray as _ } from "../composables/helpers.mjs";
5
5
  import { VCol as ee } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VCol.mjs";
6
6
  import { VListItem as S } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs";
7
7
  import { VIcon as E } from "../bt-core/core/node_modules/vuetify/lib/components/VIcon/VIcon.mjs";
@@ -122,6 +122,7 @@ const re = { class: "d-flex align-center" }, ue = { class: "d-flex align-center"
122
122
  sortDirection: {},
123
123
  sortProp: {},
124
124
  startEditing: { type: Boolean },
125
+ startRefreshing: { type: Boolean },
125
126
  startShowingInactive: { type: Boolean },
126
127
  startShowingSearch: { type: Boolean },
127
128
  storeMode: {},
@@ -138,10 +139,10 @@ const re = { class: "d-flex align-center" }, ue = { class: "d-flex align-center"
138
139
  // useRouteSrc: false
139
140
  }), D = x(), L = m(() => (e) => {
140
141
  let l = n.subtextFunction != null ? n.subtextFunction(e) : e;
141
- return l = n.itemSubtext != null ? R(l, n.itemSubtext) : l, n.subtextFilter != null ? D.findFilter(n.subtextFilter)(l) : l;
142
+ return l = n.itemSubtext != null ? O(l, n.itemSubtext) : l, n.subtextFilter != null ? D.findFilter(n.subtextFilter)(l) : l;
142
143
  }), k = m(() => (e) => {
143
144
  let l = n.textFunction != null ? n.textFunction(e) : e;
144
- return l = n.itemText != null ? R(l, n.itemText) : l, n.textFilter != null ? D.findFilter(n.textFilter)(l) : l;
145
+ return l = n.itemText != null ? O(l, n.itemText) : l, n.textFilter != null ? D.findFilter(n.textFilter)(l) : l;
145
146
  }), h = m(() => (e) => (n.itemValue ? e[n.itemValue] : e) == n.modelValue);
146
147
  function M() {
147
148
  K.value && (y.value = !0);
@@ -291,7 +292,7 @@ const re = { class: "d-flex align-center" }, ue = { class: "d-flex align-center"
291
292
  "hide-on-leave": ""
292
293
  }, {
293
294
  default: i(() => [
294
- (a(!0), P(O, null, W(t(d).filteredItems.value, (o, B) => (a(), P(O, {
295
+ (a(!0), P(R, null, W(t(d).filteredItems.value, (o, B) => (a(), P(R, {
295
296
  key: `${o.id ?? B}-list-item`
296
297
  }, [
297
298
  u(e.$slots, "item", {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as m, computed as d, openBlock as u, createBlock as y, unref as o, mergeProps as S } from "vue";
2
2
  import { useList as g } from "../composables/list.mjs";
3
3
  import { useNavigation as B } from "../composables/navigation.mjs";
4
- import { TestRequired as v } from "../composables/rules.mjs";
5
- import { VSelect as f } from "../bt-core/core/node_modules/vuetify/lib/components/VSelect/VSelect.mjs";
4
+ import { TestRequired as f } from "../composables/rules.mjs";
5
+ import { VSelect as v } from "../bt-core/core/node_modules/vuetify/lib/components/VSelect/VSelect.mjs";
6
6
  const D = /* @__PURE__ */ m({
7
7
  __name: "BT-Select-Simple",
8
8
  props: {
@@ -87,6 +87,7 @@ const D = /* @__PURE__ */ m({
87
87
  sortDirection: {},
88
88
  sortProp: {},
89
89
  startEditing: { type: Boolean },
90
+ startRefreshing: { type: Boolean },
90
91
  startShowingInactive: { type: Boolean },
91
92
  startShowingSearch: { type: Boolean },
92
93
  storeMode: {},
@@ -102,9 +103,9 @@ const D = /* @__PURE__ */ m({
102
103
  var e = [
103
104
  ...t.rules ?? []
104
105
  ];
105
- return t.required && e.push(v), e.length > 0 ? e : void 0;
106
+ return t.required && e.push(f), e.length > 0 ? e : void 0;
106
107
  });
107
- return (e, l) => (u(), y(o(f), S({
108
+ return (e, l) => (u(), y(o(v), S({
108
109
  "append-icon": e.canRefresh ? "$refresh" : void 0,
109
110
  clearable: e.canSelectNone,
110
111
  "onClick:appendIcon": l[0] || (l[0] = (h) => o(n).refresh({ deepRefresh: !0 })),
@@ -1,10 +1,10 @@
1
- import { defineComponent as B, computed as f, openBlock as h, createBlock as A, unref as t, mergeProps as I, withCtx as c, renderSlot as p, normalizeProps as a, guardReactiveProps as r, createVNode as m } from "vue";
1
+ import { defineComponent as f, computed as v, openBlock as h, createBlock as A, unref as t, mergeProps as I, withCtx as c, renderSlot as p, normalizeProps as a, guardReactiveProps as r, createVNode as m } from "vue";
2
2
  import { useList as C } from "../composables/list.mjs";
3
3
  import { useNavigation as R } from "../composables/navigation.mjs";
4
4
  import { TestRequired as T } from "../composables/rules.mjs";
5
5
  import { VSelect as P } from "../bt-core/core/node_modules/vuetify/lib/components/VSelect/VSelect.mjs";
6
6
  import { VListItem as u } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs";
7
- const k = /* @__PURE__ */ B({
7
+ const k = /* @__PURE__ */ f({
8
8
  __name: "BT-Select",
9
9
  props: {
10
10
  additionalUrl: {},
@@ -88,6 +88,7 @@ const k = /* @__PURE__ */ B({
88
88
  sortDirection: {},
89
89
  sortProp: {},
90
90
  startEditing: { type: Boolean },
91
+ startRefreshing: { type: Boolean },
91
92
  startShowingInactive: { type: Boolean },
92
93
  startShowingSearch: { type: Boolean },
93
94
  storeMode: {},
@@ -99,7 +100,7 @@ const k = /* @__PURE__ */ B({
99
100
  },
100
101
  emits: ["change", "deleted", "fetched", "input", "select", "confirm", "mouse-over-item"],
101
102
  setup(d, { emit: y }) {
102
- const S = y, g = R(), o = d, v = o.itemText ?? (o.nav != null ? g.findItemText(o.nav) : void 0) ?? void 0, l = C(o, S), s = f(() => {
103
+ const g = y, S = R(), o = d, B = o.itemText ?? (o.nav != null ? S.findItemText(o.nav) : void 0) ?? void 0, l = C(o, g), s = v(() => {
103
104
  var e = [
104
105
  ...o.rules ?? []
105
106
  ];
@@ -111,7 +112,7 @@ const k = /* @__PURE__ */ B({
111
112
  "onClick:appendIcon": i[0] || (i[0] = (n) => t(l).refresh({ deepRefresh: !0 })),
112
113
  "hide-details": s.value == null,
113
114
  items: t(l).filteredItems.value,
114
- "item-title": t(v),
115
+ "item-title": t(B),
115
116
  "item-value": e.itemValue,
116
117
  loading: t(l).isLoading.value,
117
118
  multiple: e.multiple,
@@ -134,6 +134,7 @@ export interface ListProps<T, TSave, TReturn> {
134
134
  sortDirection?: 'asc' | 'desc' | -1 | 1;
135
135
  sortProp?: string | string[];
136
136
  startEditing?: boolean;
137
+ startRefreshing?: boolean;
137
138
  startShowingInactive?: boolean;
138
139
  startShowingSearch?: boolean;
139
140
  storeMode?: StoreMode;
@@ -1,15 +1,15 @@
1
1
  import { useCSV as ca } from "./csv.mjs";
2
2
  import { isNullOrEmpty as Ie, isLengthyArray as q, nestedValue as _, hasSearch as ia } from "./helpers.mjs";
3
3
  import { t as j } from "../bt-core/core/node_modules/thenby/thenBy.module.mjs";
4
- import { ref as y, toValue as V, computed as v, shallowRef as p, watch as C, onMounted as da } from "vue";
5
- import { useArrayUnique as fa, useArrayDifference as oe, watchDebounced as sa, watchArray as Fe } from "@vueuse/core";
4
+ import { ref as y, toValue as V, computed as v, shallowRef as p, watch as C, onMounted as fa } from "vue";
5
+ import { useArrayUnique as da, useArrayDifference as Fe, watchDebounced as sa, watchArray as oe } from "@vueuse/core";
6
6
  import { useActions as va } from "./actions.mjs";
7
7
  import { useStoreDefinition as ya } from "./stores.mjs";
8
8
  import { useNavigation as ma } from "./navigation.mjs";
9
9
  import { useBlade as ha } from "./blade.mjs";
10
10
  import { useDialogConfirm as ga } from "./dialog-items.mjs";
11
11
  import { useUrlUpdater as Sa } from "./routing.mjs";
12
- function Ua(a, F, r) {
12
+ function Ua(a, o, r) {
13
13
  var ge, Se, Pe, Ae;
14
14
  const we = ca(), xe = ma(), Ne = Sa(), ee = (r == null ? void 0 : r.idSelector) ?? a.idSelector ?? ((e) => e.id), n = (r == null ? void 0 : r.isNotSetup) == !0 ? void 0 : ha({
15
15
  bladeGroup: a.bladeGroup,
@@ -21,14 +21,14 @@ function Ua(a, F, r) {
21
21
  bladeStartShowing: a.bladeStartShowing
22
22
  }), w = a.useBladeSrc ?? !!a.bladeName, k = a.useRouteSrc ?? a.variant == "page", A = a.nav ?? a.bladeName ?? a.itemBladeName;
23
23
  var h = xe.findItem(A);
24
- const z = a.storeMode ?? (h == null ? void 0 : h.storeMode), Be = a.storageMode ?? (h == null ? void 0 : h.storageMode), ae = h == null ? void 0 : h.deleteStrat, le = y((h == null ? void 0 : h.externals) ?? []), U = y(), te = V(a.customFilters) ?? [], re = y([]), $ = v(() => fa([
24
+ const z = a.storeMode ?? (h == null ? void 0 : h.storeMode), Be = a.storageMode ?? (h == null ? void 0 : h.storageMode), ae = h == null ? void 0 : h.deleteStrat, le = y((h == null ? void 0 : h.externals) ?? []), U = y(), te = V(a.customFilters) ?? [], re = y([]), $ = v(() => da([
25
25
  ...(a.localFilters ?? []).filter((e) => e.predicate != null || e.onFilter != null).map((e) => e.name),
26
26
  ...te.filter((e) => e.name != null).map((e) => e.name),
27
27
  ...a.defaultFilters ?? [],
28
28
  ...re.value
29
29
  ]).value), M = y((a.defaultFilters ?? []).map((e) => $.value.indexOf(e)));
30
30
  let J = y([...M.value]);
31
- const Ce = v(() => oe(J, M).value.length > 0 || oe(M, J).value.length > 0), Ue = y([]), x = y(Me());
31
+ const Ce = v(() => Fe(J, M).value.length > 0 || Fe(M, J).value.length > 0), Ue = y([]), x = y(Me());
32
32
  function Me() {
33
33
  var e, l, t, u;
34
34
  if (w) {
@@ -56,13 +56,13 @@ function Ua(a, F, r) {
56
56
  const T = y(V(a.startShowingInactive) ?? !1), Te = v(() => [
57
57
  ...a.searchProps ?? [],
58
58
  ...(a.headers ?? []).filter((e) => e.searchable != null && e.value != null).map((e) => e.value ?? "")
59
- ]), f = y(), ie = y(), L = p([]), Q = y([]);
59
+ ]), d = y(), ie = y(), L = p([]), Q = y([]);
60
60
  let N;
61
- const b = a.onFinished ?? (r == null ? void 0 : r.onFinished), { actionErrorMsg: Ge, actionLoadingMsg: Le, deleteItem: be, doAction: qe, getItem: Ve, getAllItems: ke, restoreItem: Ke, saveItem: He, syncItem: de } = va({
61
+ const b = a.onFinished ?? (r == null ? void 0 : r.onFinished), { actionErrorMsg: Ge, actionLoadingMsg: Le, deleteItem: be, doAction: qe, getItem: Ve, getAllItems: ke, restoreItem: Re, saveItem: Ke, syncItem: fe } = va({
62
62
  nav: A,
63
63
  onError: a.onError ?? (r == null ? void 0 : r.onError),
64
64
  onFinished: () => {
65
- b != null && b(f.value);
65
+ b != null && b(d.value);
66
66
  },
67
67
  proxyID: D.value,
68
68
  store: A != null ? ya({
@@ -71,45 +71,45 @@ function Ua(a, F, r) {
71
71
  nav: A,
72
72
  proxyID: D.value
73
73
  }) : void 0
74
- }), fe = v(() => a.errorMsg ?? Ge.value), X = y(), se = v(() => X.value ?? a.loadingMsg ?? Le.value), Re = v(() => se.value != null), Y = p(!1), K = p($e());
74
+ }), de = v(() => a.errorMsg ?? Ge.value), X = y(), se = v(() => X.value ?? a.loadingMsg ?? Le.value), He = v(() => se.value != null), Y = p(!1), R = p($e());
75
75
  function $e() {
76
76
  return a.startShowingSearch ? !0 : !Ie(ce());
77
77
  }
78
78
  const Z = y(0), ve = v(() => {
79
79
  let e, l = [];
80
80
  M.value.forEach((u) => {
81
- const c = $.value[u], i = te.find((d) => d.name == c);
81
+ const c = $.value[u], i = te.find((f) => f.name == c);
82
82
  i != null ? e = e != null ? `${e}ANDALSO${i.filterFunction()}` : i.filterFunction() : l.push(c);
83
83
  });
84
84
  const t = {};
85
85
  return q(l) && (t.filterBy = l.toString()), e != null && (t.query = e), t;
86
86
  }), W = v(() => {
87
- var l, t, u, c, i, d;
87
+ var l, t, u, c, i, f;
88
88
  let e = a.itemID;
89
- return e == null && w && (e = (t = (l = n == null ? void 0 : n.bladeData) == null ? void 0 : l.data) == null ? void 0 : t.id), e == null && k && (e = (c = (u = r == null ? void 0 : r.route) == null ? void 0 : u.query) == null ? void 0 : c.id), e == null && k && (e = (d = (i = r == null ? void 0 : r.route) == null ? void 0 : i.params) == null ? void 0 : d.id), e;
89
+ return e == null && w && (e = (t = (l = n == null ? void 0 : n.bladeData) == null ? void 0 : l.data) == null ? void 0 : t.id), e == null && k && (e = (c = (u = r == null ? void 0 : r.route) == null ? void 0 : u.query) == null ? void 0 : c.id), e == null && k && (e = (f = (i = r == null ? void 0 : r.route) == null ? void 0 : i.params) == null ? void 0 : f.id), e;
90
90
  }), E = y(W.value == "new" ? "new" : a.startEditing ? "edit" : "view"), ye = v(() => {
91
91
  var u, c, i;
92
92
  var e = a.params ?? {}, l = (r == null ? void 0 : r.params) ?? {};
93
93
  let t = { ...e, ...l };
94
- return a.paginate == "server" && a.itemsPerPage != null && (t.includeCount = !0, t.takeAmount = a.itemsPerPage, t.takeFrom = (x.value - 1) * a.itemsPerPage), ve.value != null && (t = { ...t, ...ve.value }), T.value && (t.includeInactive = !0), q(a.selectProps) && (t.properties = (u = a.selectProps) == null ? void 0 : u.toString()), S.value != null && (t.searchString = S.value), q(a.queryParams) && ((c = r == null ? void 0 : r.route) == null ? void 0 : c.query) != null && ((i = a.queryParams) == null || i.forEach((d) => {
95
- var B, m, P, R;
96
- typeof d == "string" ? ((B = r.route) == null ? void 0 : B.query[d]) != null && (t[d] = (m = r.route) == null ? void 0 : m.query[d]) : ((P = r.route) == null ? void 0 : P.query[d.key]) != null && (t[d.value] = (R = r.route) == null ? void 0 : R.query[d.key]);
94
+ return a.paginate == "server" && a.itemsPerPage != null && (t.includeCount = !0, t.takeAmount = a.itemsPerPage, t.takeFrom = (x.value - 1) * a.itemsPerPage), ve.value != null && (t = { ...t, ...ve.value }), T.value && (t.includeInactive = !0), q(a.selectProps) && (t.properties = (u = a.selectProps) == null ? void 0 : u.toString()), S.value != null && (t.searchString = S.value), q(a.queryParams) && ((c = r == null ? void 0 : r.route) == null ? void 0 : c.query) != null && ((i = a.queryParams) == null || i.forEach((f) => {
95
+ var B, m, P, H;
96
+ typeof f == "string" ? ((B = r.route) == null ? void 0 : B.query[f]) != null && (t[f] = (m = r.route) == null ? void 0 : m.query[f]) : ((P = r.route) == null ? void 0 : P.query[f.key]) != null && (t[f.value] = (H = r.route) == null ? void 0 : H.query[f.key]);
97
97
  })), t;
98
98
  }), Qe = v(() => (e) => a.onCanDelete != null ? a.onCanDelete(e) : !(e != null && e.isInactive === !0)), We = v(() => (e) => a.onCanIntegrate != null ? a.onCanIntegrate(e) : !(!q(le.value) || U.value == null || (e == null ? void 0 : e.isInactive) === !0)), _e = v(() => (e) => U.value != null ? !Ie(_(e, U.value.localIDProp)) : !1), je = v(() => (e) => T.value ? a.onCanRestore != null ? a.onCanRestore(e) : (e == null ? void 0 : e.isInactive) === !0 : !1), me = a.onUpdateAsyncItem ?? ((e, l) => {
99
99
  l.hasOwnProperty("rowVersion") && (e.rowVersion = l.rowVersion), l.hasOwnProperty("version") && (e.version = l.version), l.hasOwnProperty("isDeleted") && (e.isDeleted = l.isDeleted), l.hasOwnProperty("isInactive") && (e.isInactive = l.isInactive), l.hasOwnProperty("id") && (e.id = l.id);
100
- }), H = v(() => Q.value.filter((e) => !e.hide)), ze = v(() => {
100
+ }), K = v(() => Q.value.filter((e) => !e.hide)), ze = v(() => {
101
101
  let e = new Array();
102
- return H.value.filter((t) => t.sublevel != null).forEach((t) => {
102
+ return K.value.filter((t) => t.sublevel != null).forEach((t) => {
103
103
  let u = e.find((c) => c.position == t.sublevel);
104
104
  u == null ? e.push({ position: t.sublevel ?? 0, values: [t] }) : u.values.push(t);
105
105
  }), e.sort(j.firstBy((t) => t.position));
106
106
  }), Je = v(() => {
107
107
  let e = new Array();
108
- return H.value.filter((t) => t.level != null).forEach((t) => {
108
+ return K.value.filter((t) => t.level != null).forEach((t) => {
109
109
  let u = e.find((c) => c.position == t.level);
110
110
  u == null ? e.push({ position: t.level ?? 0, values: [t] }) : u.values.push(t);
111
111
  }), e.sort(j.firstBy((t) => t.position));
112
- }), Xe = v(() => H.value.filter((e) => e.nav != null && e.itemText != null || e.textFilter != null || e.display != null || e.bool != null));
112
+ }), Xe = v(() => K.value.filter((e) => e.nav != null && e.itemText != null || e.textFilter != null || e.display != null || e.bool != null));
113
113
  function Ye(e) {
114
114
  U.value = e, Ue.value = [];
115
115
  }
@@ -138,31 +138,31 @@ function Ua(a, F, r) {
138
138
  if (!c.isConfirmed)
139
139
  return;
140
140
  }
141
- const i = (d, B) => {
142
- if (d == null || !Array.isArray(d))
141
+ const i = (f, B) => {
142
+ if (f == null || !Array.isArray(f))
143
143
  return !1;
144
144
  if (B != null) {
145
- let m = d.findIndex((P) => ee(P) == B);
145
+ let m = f.findIndex((P) => ee(P) == B);
146
146
  if (m > -1)
147
- return d.splice(m, 1), !0;
147
+ return f.splice(m, 1), !0;
148
148
  } else {
149
- let m = d.findIndex((P) => P === e);
150
- if (m == -1 && (m = d.findIndex((P) => P == e)), m > -1)
151
- return d.splice(m, 1), !0;
149
+ let m = f.findIndex((P) => P === e);
150
+ if (m == -1 && (m = f.findIndex((P) => P == e)), m > -1)
151
+ return f.splice(m, 1), !0;
152
152
  }
153
153
  return !1;
154
154
  };
155
- a.localOnly == !0 || A == null ? ae != "soft" ? (i(f.value, l), i(a.items, l)) : T.value || i(L.value, l) : await be({
155
+ a.localOnly == !0 || A == null ? ae != "soft" ? (i(d.value, l), i(a.items, l)) : T.value || i(L.value, l) : await be({
156
156
  additionalUrl: t,
157
157
  data: e,
158
158
  nav: A,
159
159
  onCanDeleteAsync: a.onCanDeleteAsync,
160
160
  onDeleteAsync: u,
161
- onDeleteSuccessAsync: async (d) => (ae != "soft" ? i(a.items, l) : (me(e, d), T.value || i(L.value, l)), a.onDeleteSuccessAsync != null ? a.onDeleteSuccessAsync(e) : Promise.resolve(void 0)),
161
+ onDeleteSuccessAsync: async (f) => (ae != "soft" ? i(a.items, l) : (me(e, f), T.value || i(L.value, l)), a.onDeleteSuccessAsync != null ? a.onDeleteSuccessAsync(e) : Promise.resolve(void 0)),
162
162
  proxyID: D.value
163
163
  // ...(useBladeSrc ? bladeData.value : {}),
164
164
  // requireConfirmation: true
165
- }), F && F("deleted", e);
165
+ }), o && o("deleted", e);
166
166
  }
167
167
  async function Oe(e) {
168
168
  let l = U.value;
@@ -172,7 +172,7 @@ function Ua(a, F, r) {
172
172
  nav: u,
173
173
  onSyncAsync: c
174
174
  } = { ...a };
175
- var i = await de({
175
+ var i = await fe({
176
176
  actions: [{
177
177
  action: "push",
178
178
  item: e,
@@ -194,7 +194,7 @@ function Ua(a, F, r) {
194
194
  nav: u,
195
195
  onSyncAsync: c
196
196
  } = { ...a };
197
- var i = await de({
197
+ var i = await fe({
198
198
  actions: [{
199
199
  action: "unlink",
200
200
  item: e,
@@ -214,7 +214,7 @@ function Ua(a, F, r) {
214
214
  onRestoreAsync: t,
215
215
  onRestoreSuccessAsync: u = (c) => (me(e, c), c)
216
216
  } = { ...a };
217
- return Ke({
217
+ return Re({
218
218
  additionalUrl: l,
219
219
  data: e,
220
220
  nav: A,
@@ -231,23 +231,23 @@ function Ua(a, F, r) {
231
231
  onCanSaveAsync: u,
232
232
  onGetSaveAsync: c,
233
233
  onSaveAsync: i,
234
- onSaveSuccessAsync: d
234
+ onSaveSuccessAsync: f
235
235
  } = { ...a };
236
- return He({
236
+ return Ke({
237
237
  additionalUrl: t,
238
238
  data: l,
239
239
  nav: A,
240
240
  onCanSaveAsync: u,
241
241
  onGetSaveAsync: c,
242
242
  onSaveAsync: i,
243
- onSaveSuccessAsync: d,
243
+ onSaveSuccessAsync: f,
244
244
  proxyID: D.value
245
245
  });
246
246
  }
247
247
  function la() {
248
248
  qe(() => {
249
- var e = z == "session" ? L.value : f.value;
250
- e != null && we.exportToCSV({ headers: H.value, items: e });
249
+ var e = z == "session" ? L.value : d.value;
250
+ e != null && we.exportToCSV({ headers: K.value, items: e });
251
251
  }, { loadingMsg: "Exporting to CSV" });
252
252
  }
253
253
  function he(e) {
@@ -262,11 +262,11 @@ function Ua(a, F, r) {
262
262
  return e.sort(j.firstBy((t) => _(t, a.sortProp), a.sortDirection ?? "asc"));
263
263
  }
264
264
  function G() {
265
- if (f.value == null || !Array.isArray(f.value)) {
265
+ if (d.value == null || !Array.isArray(d.value)) {
266
266
  L.value = [];
267
267
  return;
268
268
  }
269
- let e = he(f.value);
269
+ let e = he(d.value);
270
270
  if (a.onFilter != null && (e = a.onFilter(e)), q(a.localFilters) && M.value.forEach((l) => {
271
271
  var u;
272
272
  const t = (u = a.localFilters) == null ? void 0 : u.find((c) => c.name == $.value[l]);
@@ -296,21 +296,21 @@ function Ua(a, F, r) {
296
296
  t <= 0 || (a.paginate == "server" ? l != null && (Z.value = Math.ceil(l / t)) : a.paginate == "local" && (Z.value = Math.ceil(e.length / t)));
297
297
  }
298
298
  async function g(e) {
299
- var t, u, c, i, d, B, m, P, R, De;
300
- if (Y.value = !1, (e == null ? void 0 : e.resetSearch) == !0 && (K.value = !1, S.value = void 0), a.items != null) {
299
+ var t, u, c, i, f, B, m, P, H, De;
300
+ if (Y.value = !1, (e == null ? void 0 : e.resetSearch) == !0 && (R.value = !1, S.value = void 0), a.items != null) {
301
301
  let I = { data: a.items };
302
302
  X.value = "Loading";
303
303
  let s = a.onGetSuccessAsync != null ? await a.onGetSuccessAsync(I) : I;
304
304
  if (X.value = void 0, s == null || !Array.isArray(s.data))
305
305
  return;
306
- f.value = (s == null ? void 0 : s.data) ?? [], a.paginate != "local" && O(f.value, f.value.length), G(), b != null && b(f.value), (r == null ? void 0 : r.onFinishedAsync) != null && await (r == null ? void 0 : r.onFinishedAsync(f.value)), F && F("fetched", f.value);
306
+ d.value = (s == null ? void 0 : s.data) ?? [], a.paginate != "local" && O(d.value, d.value.length), G(), b != null && b(d.value), (r == null ? void 0 : r.onFinishedAsync) != null && await (r == null ? void 0 : r.onFinishedAsync(d.value)), o && o("fetched", d.value);
307
307
  return;
308
308
  }
309
309
  if (a.isSingle) {
310
310
  var l = w ? (u = (t = n == null ? void 0 : n.bladeData) == null ? void 0 : t.data) == null ? void 0 : u.data : void 0;
311
311
  if (l != null) {
312
312
  let I = { data: l }, s = a.onGetSingleSuccessAsync != null ? await a.onGetSingleSuccessAsync(I) : I;
313
- Array.isArray(s == null ? void 0 : s.data) ? f.value = s.data : f.value = (s == null ? void 0 : s.data) != null ? [s.data] : void 0;
313
+ Array.isArray(s == null ? void 0 : s.data) ? d.value = s.data : d.value = (s == null ? void 0 : s.data) != null ? [s.data] : void 0;
314
314
  } else {
315
315
  const I = {
316
316
  additionalUrl: a.additionalUrl,
@@ -328,22 +328,22 @@ function Ua(a, F, r) {
328
328
  onGetSuccessAsync: a.onGetSingleSuccessAsync
329
329
  };
330
330
  if (I.id === "new")
331
- f.value = [];
331
+ d.value = [];
332
332
  else {
333
333
  const s = await Ve(I);
334
- s == null ? f.value = void 0 : Array.isArray(s.data) ? f.value = s.data : f.value = s.data != null ? [s.data] : void 0;
334
+ s == null ? d.value = void 0 : Array.isArray(s.data) ? d.value = s.data : d.value = s.data != null ? [s.data] : void 0;
335
335
  }
336
336
  }
337
337
  } else {
338
338
  const I = {
339
339
  additionalUrl: a.additionalUrl,
340
- dateFrom: (w ? (B = (d = n == null ? void 0 : n.bladeData) == null ? void 0 : d.data) == null ? void 0 : B.dateFrom : void 0) ?? a.dateFrom,
340
+ dateFrom: (w ? (B = (f = n == null ? void 0 : n.bladeData) == null ? void 0 : f.data) == null ? void 0 : B.dateFrom : void 0) ?? a.dateFrom,
341
341
  dateTo: (w ? (P = (m = n == null ? void 0 : n.bladeData) == null ? void 0 : m.data) == null ? void 0 : P.dateTo : void 0) ?? a.dateTo,
342
342
  id: a.ignoreID ? void 0 : W.value,
343
343
  nav: A,
344
344
  params: {
345
345
  ...ye.value,
346
- ...w ? (De = (R = n == null ? void 0 : n.bladeData) == null ? void 0 : R.data) == null ? void 0 : De.params : {},
346
+ ...w ? (De = (H = n == null ? void 0 : n.bladeData) == null ? void 0 : H.data) == null ? void 0 : De.params : {},
347
347
  ...r == null ? void 0 : r.params,
348
348
  ...e == null ? void 0 : e.params
349
349
  },
@@ -354,11 +354,11 @@ function Ua(a, F, r) {
354
354
  };
355
355
  let s = await ke({
356
356
  ...I,
357
- onGetSuccessAsync: async (o, na) => o != null && (o.filters != null && (re.value = (o == null ? void 0 : o.filters) ?? []), ie.value = o.count, O(o.data, o.count), a.onGetSuccessAsync != null) ? await a.onGetSuccessAsync(o, na) : o
357
+ onGetSuccessAsync: async (F, na) => F != null && (F.filters != null && (re.value = (F == null ? void 0 : F.filters) ?? []), ie.value = F.count, O(F.data, F.count), a.onGetSuccessAsync != null) ? await a.onGetSuccessAsync(F, na) : F
358
358
  });
359
- f.value = (s == null ? void 0 : s.data) ?? [], J.value = [...M.value];
359
+ d.value = (s == null ? void 0 : s.data) ?? [], J.value = [...M.value];
360
360
  }
361
- G(), b && b(f.value), (r == null ? void 0 : r.onFinishedAsync) != null && await (r == null ? void 0 : r.onFinishedAsync(f.value)), F && F("fetched", f.value);
361
+ G(), b && b(d.value), (r == null ? void 0 : r.onFinishedAsync) != null && await (r == null ? void 0 : r.onFinishedAsync(d.value)), o && o("fetched", d.value);
362
362
  }
363
363
  function ra(e, l) {
364
364
  var c;
@@ -375,10 +375,10 @@ function Ua(a, F, r) {
375
375
  closeBladeNames: a.closeBladeNames
376
376
  }));
377
377
  }
378
- F != null && (F("select", N), F("confirm", N));
378
+ o != null && (o("select", N), o("confirm", N));
379
379
  }
380
380
  function ua() {
381
- K.value = !K.value, S.value = void 0, g();
381
+ R.value = !R.value, S.value = void 0, g();
382
382
  }
383
383
  return ta(), sa([S], ([e]) => {
384
384
  (a.trackSearchQuery || a.variant == "page") && Ne.updateSearch(e), x.value != 1 ? x.value = 1 : G();
@@ -388,7 +388,7 @@ function Ua(a, F, r) {
388
388
  z == "whole-last-updated" ? G() : await g();
389
389
  }), C(x, async () => {
390
390
  await g();
391
- }), C([fe, () => a.errorMsg], ([e, l]) => {
391
+ }), C([de, () => a.errorMsg], ([e, l]) => {
392
392
  Y.value = e != null || l != null;
393
393
  }), C(() => a.refreshToggle, () => {
394
394
  g({ deepRefresh: !0 });
@@ -398,24 +398,24 @@ function Ua(a, F, r) {
398
398
  G();
399
399
  }), C(() => a.proxyID, () => {
400
400
  g();
401
- }), Fe([f], () => {
401
+ }), oe([d], () => {
402
402
  G();
403
- }, { deep: !0 }), Fe([() => a.items], () => {
403
+ }, { deep: !0 }), oe([() => a.items], () => {
404
404
  g();
405
- }, { deep: !0 }), r != null && r.isNotSetup ? (r == null ? void 0 : r.isNotSetup) == !0 && a.eager == !0 && g({ deepRefresh: ((Se = (ge = r == null ? void 0 : r.route) == null ? void 0 : ge.params) == null ? void 0 : Se.refresh) == "true" || ((Ae = (Pe = r == null ? void 0 : r.route) == null ? void 0 : Pe.query) == null ? void 0 : Ae.refresh) == "true" }) : da(async () => {
405
+ }, { deep: !0 }), r != null && r.isNotSetup ? (r == null ? void 0 : r.isNotSetup) == !0 && a.eager == !0 && g({ deepRefresh: ((Se = (ge = r == null ? void 0 : r.route) == null ? void 0 : ge.params) == null ? void 0 : Se.refresh) == "true" || ((Ae = (Pe = r == null ? void 0 : r.route) == null ? void 0 : Pe.query) == null ? void 0 : Ae.refresh) == "true" || !!a.startRefreshing }) : fa(async () => {
406
406
  var e, l, t, u;
407
- a.eager == !0 && await g({ deepRefresh: ((l = (e = r == null ? void 0 : r.route) == null ? void 0 : e.params) == null ? void 0 : l.refresh) == "true" || ((u = (t = r == null ? void 0 : r.route) == null ? void 0 : t.query) == null ? void 0 : u.refresh) == "true" });
407
+ a.eager == !0 && await g({ deepRefresh: ((l = (e = r == null ? void 0 : r.route) == null ? void 0 : e.params) == null ? void 0 : l.refresh) == "true" || ((u = (t = r == null ? void 0 : r.route) == null ? void 0 : t.query) == null ? void 0 : u.refresh) == "true" || !!a.startRefreshing });
408
408
  }), {
409
409
  add: Ze,
410
410
  applyFilters: async () => {
411
- x.value != 1 ? (K.value = !1, S.value = void 0, x.value = 1) : await g({ resetSearch: !0 });
411
+ x.value != 1 ? (R.value = !1, S.value = void 0, x.value = 1) : await g({ resetSearch: !0 });
412
412
  },
413
- asyncItems: f,
413
+ asyncItems: d,
414
414
  currentExternalParty: U,
415
415
  currentPage: x,
416
416
  deleteItem: Ee,
417
417
  displayHeaders: Xe,
418
- errorMsg: fe,
418
+ errorMsg: de,
419
419
  exportToCSV: la,
420
420
  externalParties: le,
421
421
  filteredItems: L,
@@ -427,7 +427,7 @@ function Ua(a, F, r) {
427
427
  isEditing: v(() => E.value == "new" || E.value == "edit"),
428
428
  isIntegratable: We,
429
429
  isIntegrated: _e,
430
- isLoading: Re,
430
+ isLoading: He,
431
431
  isRestorable: je,
432
432
  loadingMsg: se,
433
433
  mode: E,
@@ -443,9 +443,9 @@ function Ua(a, F, r) {
443
443
  selectItem: ra,
444
444
  showError: Y,
445
445
  showInactive: T,
446
- showSearch: K,
446
+ showSearch: R,
447
447
  subtitleOptions: ze,
448
- tableHeaders: H,
448
+ tableHeaders: K,
449
449
  titleOptions: Je,
450
450
  toggleSearch: ua,
451
451
  totalCount: ie,