bt-core-app 2.2.28 → 2.2.30

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.
@@ -1,28 +1,31 @@
1
- import { defineComponent as N, ref as h, computed as T, onUnmounted as O, resolveComponent as w, openBlock as m, createBlock as c, unref as l, withCtx as u, createVNode as r, createElementBlock as F, createTextVNode as B, toDisplayString as E, withModifiers as V, createCommentVNode as f, createElementVNode as R, createSlots as k, Fragment as U, renderList as W } from "vue";
2
- import { useNested as G } from "../composables/nested.mjs";
3
- import { registerDialog as I } from "../composables/dialog-items.mjs";
1
+ import { defineComponent as w, ref as h, computed as T, onUnmounted as N, resolveComponent as O, openBlock as n, createBlock as v, unref as l, withCtx as r, createVNode as u, createElementBlock as C, createTextVNode as B, toDisplayString as E, withModifiers as V, createCommentVNode as f, createElementVNode as R, createSlots as F, Fragment as U, renderList as W, resolveDynamicComponent as G } from "vue";
2
+ import { useNested as Y } from "../composables/nested.mjs";
3
+ import { registerDialog as j } from "../composables/dialog-items.mjs";
4
4
  import { useList as A } from "../composables/list.mjs";
5
- import { isLengthyArray as D, isArrayOfLength as Y } from "../composables/helpers.mjs";
6
- import j from "./BT-Loader.vue.mjs";
7
- import { VDialog as q } from "../bt-core/core/node_modules/vuetify/lib/components/VDialog/VDialog.mjs";
8
- import { VCard as z } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs";
9
- import { VCardTitle as H } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCardTitle.mjs";
10
- import { VSpacer as J } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VSpacer.mjs";
5
+ import { isLengthyArray as _, isArrayOfLength as q } from "../composables/helpers.mjs";
6
+ import z from "./BT-Loader.vue.mjs";
7
+ import { VDialog as H } from "../bt-core/core/node_modules/vuetify/lib/components/VDialog/VDialog.mjs";
8
+ import { VCard as I } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs";
9
+ import { VCardTitle as J } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCardTitle.mjs";
10
+ import { VSpacer as K } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VSpacer.mjs";
11
11
  import { VBtn as x } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
12
- import { VTextField as K } from "../bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs";
13
- import { VList as Q } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VList.mjs";
14
- import { VSlideYTransition as X } from "../bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs";
15
- import { VListItem as Z } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs";
16
- import { VListItemTitle as ee } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItemTitle.mjs";
17
- import { VListItemSubtitle as te } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItemSubtitle.mjs";
18
- const le = {
12
+ import { VTextField as Q } from "../bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs";
13
+ import { VList as X } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VList.mjs";
14
+ import { VSlideYTransition as Z } from "../bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs";
15
+ import { VListItem as ee } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs";
16
+ import { VListItemTitle as te } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItemTitle.mjs";
17
+ import { VListItemSubtitle as le } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItemSubtitle.mjs";
18
+ const ie = {
19
19
  key: 0,
20
20
  class: "d-flex align-center"
21
- }, ie = { class: "d-flex align-center" }, Se = /* @__PURE__ */ N({
21
+ }, ae = { class: "d-flex align-center" }, ue = {
22
+ key: 1,
23
+ class: "w-100"
24
+ }, be = /* @__PURE__ */ w({
22
25
  __name: "BT-Dialog-Select",
23
- setup(ae) {
24
- const v = h(!1), e = h({}), o = h([]), { getValue: C } = G();
25
- let d, n = A(e.value);
26
+ setup(re) {
27
+ const c = h(!1), e = h({}), s = h([]), { getValue: y } = Y();
28
+ let d, o = A(e.value);
26
29
  const S = T(() => ({
27
30
  itemText: e.value.itemTitle,
28
31
  prefix: e.value.itemTitlePrefix,
@@ -40,7 +43,7 @@ const le = {
40
43
  value: e.value.itemSubtitleProp ?? e.value.itemSubtitle
41
44
  };
42
45
  return t.itemText != null || t.textFilter != null || t.textFunction != null || t.value != null ? t : void 0;
43
- }), y = T(() => {
46
+ }), k = T(() => {
44
47
  let t = {
45
48
  itemText: e.value.itemActionTitle,
46
49
  prefix: e.value.itemActionPrefix,
@@ -50,26 +53,26 @@ const le = {
50
53
  value: e.value.itemActionProp ?? e.value.itemActionTitle
51
54
  };
52
55
  return t.itemText != null || t.textFilter != null || t.textFunction != null || t.value != null ? t : void 0;
53
- }), _ = I({
56
+ }), D = j({
54
57
  dialogType: "items",
55
58
  open: (t, a) => {
56
59
  t.height ?? (t.height = "65vh"), t.maxWidth ?? (t.maxWidth = "350px"), t.cancelText ?? (t.cancelText = "Cancel"), t.confirmText ?? (t.confirmText = "Confirm"), t.onDisabled ?? (t.onDisabled = () => !1), e.value = t;
57
- const s = t.selector ?? ((i) => i.id);
60
+ const m = t.selector ?? ((i) => i.id);
58
61
  t.onGetSuccessAsync = async (i) => {
59
62
  if (t.selected != null)
60
63
  if (Array.isArray(t.selected))
61
- o.value = i.data.filter((p) => {
64
+ s.value = i.data.filter((p) => {
62
65
  var g;
63
- return (g = t.selected) == null ? void 0 : g.some((M) => s(M) == s(p));
66
+ return (g = t.selected) == null ? void 0 : g.some((M) => m(M) == m(p));
64
67
  });
65
68
  else {
66
- const p = i.data.filter((g) => s(g) == s(t.selected));
67
- p != null && (o.value = [p]);
69
+ const p = i.data.filter((g) => m(g) == m(t.selected));
70
+ p != null && (s.value = [p]);
68
71
  }
69
72
  else
70
- o.value = [];
73
+ s.value = [];
71
74
  return i;
72
- }, n = A(t, void 0, { isNotSetup: !0 }), n.refresh({ deepRefresh: t.refresh }), v.value = !0, d = a;
75
+ }, o = A(t, void 0, { isNotSetup: !0 }), o.refresh({ deepRefresh: t.refresh }), c.value = !0, d = a;
73
76
  }
74
77
  });
75
78
  function L(t) {
@@ -81,7 +84,7 @@ const le = {
81
84
  isConfirmed: !0,
82
85
  isError: !1,
83
86
  result: t.value == !0 ? t.id : void 0
84
- }), v.value = !1;
87
+ }), c.value = !1;
85
88
  }
86
89
  }
87
90
  function P() {
@@ -89,61 +92,61 @@ const le = {
89
92
  isCancelled: !1,
90
93
  isConfirmed: !0,
91
94
  isError: !1,
92
- result: e.value.selectMode == "single" && Y(o.value, 0) ? void 0 : o.value
93
- }), v.value = !1;
95
+ result: e.value.selectMode == "single" && q(s.value, 0) ? void 0 : s.value
96
+ }), c.value = !1;
94
97
  }
95
98
  function $() {
96
99
  d != null && d({
97
100
  isCancelled: !0,
98
101
  isConfirmed: !1,
99
102
  isError: !1
100
- }), v.value = !1;
103
+ }), c.value = !1;
101
104
  }
102
- return O(() => {
103
- _();
105
+ return N(() => {
106
+ D();
104
107
  }), (t, a) => {
105
- const s = w("bt-header-option");
106
- return m(), c(l(q), {
108
+ const m = O("bt-header-option");
109
+ return n(), v(l(H), {
107
110
  "max-width": e.value.maxWidth,
108
- modelValue: v.value,
109
- "onUpdate:modelValue": a[7] || (a[7] = (i) => v.value = i)
111
+ modelValue: c.value,
112
+ "onUpdate:modelValue": a[7] || (a[7] = (i) => c.value = i)
110
113
  }, {
111
- default: u(() => [
112
- r(l(z), {
114
+ default: r(() => [
115
+ u(l(I), {
113
116
  subtitle: e.value.subtitle,
114
117
  text: e.value.text
115
118
  }, {
116
- default: u(() => [
117
- e.value.title != null ? (m(), F("div", le, [
118
- r(l(H), null, {
119
- default: u(() => [
119
+ default: r(() => [
120
+ e.value.title != null ? (n(), C("div", ie, [
121
+ u(l(J), null, {
122
+ default: r(() => [
120
123
  B(E(e.value.title), 1)
121
124
  ]),
122
125
  _: 1
123
126
  }),
124
- r(l(J)),
125
- r(l(x), {
126
- onClick: a[0] || (a[0] = V((i) => l(n).refresh({ deepRefresh: !0 }), ["stop"])),
127
+ u(l(K)),
128
+ u(l(x), {
129
+ onClick: a[0] || (a[0] = V((i) => l(o).refresh({ deepRefresh: !0 }), ["stop"])),
127
130
  icon: "$refresh",
128
131
  title: "Refresh list",
129
132
  variant: "text"
130
133
  })
131
134
  ])) : f("", !0),
132
- R("div", ie, [
133
- l(D)(e.value.searchProps) ? (m(), c(l(K), {
135
+ R("div", ae, [
136
+ l(_)(e.value.searchProps) ? (n(), v(l(Q), {
134
137
  key: 0,
135
138
  autofocus: "",
136
139
  clearable: "",
137
140
  "hide-details": "",
138
141
  placeholder: "Search",
139
- modelValue: l(n).searchString.value,
140
- "onUpdate:modelValue": a[2] || (a[2] = (i) => l(n).searchString.value = i)
141
- }, k({ _: 2 }, [
142
+ modelValue: l(o).searchString.value,
143
+ "onUpdate:modelValue": a[2] || (a[2] = (i) => l(o).searchString.value = i)
144
+ }, F({ _: 2 }, [
142
145
  e.value.title == null ? {
143
146
  name: "append-inner",
144
- fn: u(() => [
145
- r(l(x), {
146
- onClick: a[1] || (a[1] = V((i) => l(n).refresh({ deepRefresh: !0 }), ["stop"])),
147
+ fn: r(() => [
148
+ u(l(x), {
149
+ onClick: a[1] || (a[1] = V((i) => l(o).refresh({ deepRefresh: !0 }), ["stop"])),
147
150
  icon: "$refresh",
148
151
  title: "Refresh list",
149
152
  variant: "text"
@@ -152,61 +155,66 @@ const le = {
152
155
  key: "0"
153
156
  } : void 0
154
157
  ]), 1032, ["modelValue"])) : f("", !0),
155
- !l(D)(e.value.searchProps) && e.value.title == null ? (m(), c(l(x), {
158
+ !l(_)(e.value.searchProps) && e.value.title == null ? (n(), v(l(x), {
156
159
  key: 1,
157
- onClick: a[3] || (a[3] = V((i) => l(n).refresh({ deepRefresh: !0 }), ["stop"])),
160
+ onClick: a[3] || (a[3] = V((i) => l(o).refresh({ deepRefresh: !0 }), ["stop"])),
158
161
  icon: "$refresh",
159
162
  title: "Refresh list",
160
163
  variant: "text"
161
164
  })) : f("", !0)
162
165
  ]),
163
- r(l(Q), {
166
+ u(l(X), {
164
167
  "onClick:select": L,
165
168
  height: e.value.height,
166
169
  lines: e.value.lines,
167
170
  "open-strategy": "multiple",
168
171
  "select-strategy": e.value.selectMode == "multi" ? "classic" : "single-independent",
169
- selected: o.value,
170
- "onUpdate:selected": a[4] || (a[4] = (i) => o.value = i)
172
+ selected: s.value,
173
+ "onUpdate:selected": a[4] || (a[4] = (i) => s.value = i)
171
174
  }, {
172
- default: u(() => [
173
- r(l(X), {
175
+ default: r(() => [
176
+ u(l(Z), {
174
177
  group: "",
175
178
  "hide-on-leave": ""
176
179
  }, {
177
- default: u(() => [
178
- (m(!0), F(U, null, W(l(n).filteredItems.value, (i) => (m(), c(l(Z), {
179
- key: `${i.id ?? l(C)(i, e.value.itemValue)}-table-list-item`,
180
- value: l(C)(i, e.value.itemValue),
180
+ default: r(() => [
181
+ (n(!0), C(U, null, W(l(o).filteredItems.value, (i) => (n(), v(l(ee), {
182
+ key: `${i.id ?? l(y)(i, e.value.itemValue)}-table-list-item`,
183
+ value: l(y)(i, e.value.itemValue),
181
184
  disabled: e.value.onDisabled(i)
182
- }, k({
183
- default: u(() => [
184
- S.value != null ? (m(), c(l(ee), { key: 0 }, {
185
- default: u(() => [
186
- r(s, {
187
- option: S.value,
188
- data: i
189
- }, null, 8, ["option", "data"])
190
- ]),
191
- _: 2
192
- }, 1024)) : f("", !0),
193
- b.value != null ? (m(), c(l(te), { key: 1 }, {
194
- default: u(() => [
195
- r(s, {
196
- option: b.value,
197
- data: i
198
- }, null, 8, ["option", "data"])
199
- ]),
200
- _: 2
201
- }, 1024)) : f("", !0)
185
+ }, F({
186
+ default: r(() => [
187
+ e.value.itemComponent != null ? (n(), v(G(e.value.itemComponent), {
188
+ key: 0,
189
+ item: i
190
+ }, null, 8, ["item"])) : (n(), C("div", ue, [
191
+ S.value != null ? (n(), v(l(te), { key: 0 }, {
192
+ default: r(() => [
193
+ u(m, {
194
+ option: S.value,
195
+ data: i
196
+ }, null, 8, ["option", "data"])
197
+ ]),
198
+ _: 2
199
+ }, 1024)) : f("", !0),
200
+ b.value != null ? (n(), v(l(le), { key: 1 }, {
201
+ default: r(() => [
202
+ u(m, {
203
+ option: b.value,
204
+ data: i
205
+ }, null, 8, ["option", "data"])
206
+ ]),
207
+ _: 2
208
+ }, 1024)) : f("", !0)
209
+ ]))
202
210
  ]),
203
211
  _: 2
204
212
  }, [
205
- y.value != null ? {
213
+ e.value.itemComponent == null && k.value != null ? {
206
214
  name: "append",
207
- fn: u(() => [
208
- r(s, {
209
- option: y.value,
215
+ fn: r(() => [
216
+ u(m, {
217
+ option: k.value,
210
218
  data: i
211
219
  }, null, 8, ["option", "data"])
212
220
  ]),
@@ -219,16 +227,16 @@ const le = {
219
227
  ]),
220
228
  _: 1
221
229
  }, 8, ["height", "lines", "select-strategy", "selected"]),
222
- r(j, {
223
- loadingMsg: l(n).loadingMsg.value
230
+ u(z, {
231
+ loadingMsg: l(o).loadingMsg.value
224
232
  }, null, 8, ["loadingMsg"])
225
233
  ]),
226
- actions: u(() => [
227
- r(l(x), {
234
+ actions: r(() => [
235
+ u(l(x), {
228
236
  onClick: a[5] || (a[5] = () => $()),
229
237
  text: e.value.cancelText
230
238
  }, null, 8, ["text"]),
231
- r(l(x), {
239
+ u(l(x), {
232
240
  onClick: a[6] || (a[6] = () => P()),
233
241
  text: e.value.confirmText
234
242
  }, null, 8, ["text"])
@@ -242,5 +250,5 @@ const le = {
242
250
  }
243
251
  });
244
252
  export {
245
- Se as default
253
+ be as default
246
254
  };
@@ -33,7 +33,9 @@ export interface UseCronOptions {
33
33
  }
34
34
  export interface PredictOptions {
35
35
  adjustments?: string;
36
- futureCount: number;
36
+ futureCount?: number;
37
+ fromDate?: string;
38
+ toDate?: string;
37
39
  cron?: string;
38
40
  }
39
41
  export interface StringCron {