bt-core-app 2.2.6 → 2.2.7

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,8 +1,9 @@
1
- import { defineComponent as w, computed as a, resolveComponent as u, openBlock as n, createBlock as i, withCtx as r, createElementBlock as p, toDisplayString as d, createCommentVNode as x, unref as l, createTextVNode as m, normalizeClass as T, normalizeStyle as z } from "vue";
1
+ import { defineComponent as F, computed as u, resolveComponent as h, openBlock as n, createBlock as l, unref as i, withCtx as r, createElementBlock as p, toDisplayString as a, createCommentVNode as w, createTextVNode as d, normalizeClass as T, normalizeStyle as x } from "vue";
2
2
  import { nestedValue as s } from "../composables/helpers.mjs";
3
- import { useFilters as C } from "../composables/filters.mjs";
4
- import { VIcon as c } from "../bt-core/core/node_modules/vuetify/lib/components/VIcon/VIcon.mjs";
5
- const b = { key: 0 }, B = { key: 1 }, D = /* @__PURE__ */ w({
3
+ import { useFilters as z } from "../composables/filters.mjs";
4
+ import { VSlideXTransition as C } from "../bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs";
5
+ import { VIcon as m } from "../bt-core/core/node_modules/vuetify/lib/components/VIcon/VIcon.mjs";
6
+ const S = { key: 0 }, V = { key: 1 }, I = /* @__PURE__ */ F({
6
7
  __name: "BT-Header-Option",
7
8
  props: {
8
9
  data: {},
@@ -10,39 +11,39 @@ const b = { key: 0 }, B = { key: 1 }, D = /* @__PURE__ */ w({
10
11
  size: {}
11
12
  },
12
13
  setup(f) {
13
- const e = f, v = C(), y = a(() => (t) => {
14
+ const e = f, c = z(), y = u(() => (t) => {
14
15
  let o = t;
15
- return e.option.textFunction != null ? o = e.option.textFunction(o) : e.option.value != null && (o = s(t, e.option.value)), e.option.textFilter != null && (o = v.findFilter(e.option.textFilter)(o)), o;
16
- }), k = a(() => e.option.truncate == !0 && e.option.width != null ? `display: inline-block; width: ${e.option.width.includes("px") || e.option.width.includes("%") ? e.option.width : `${e.option.width}px`};` : "");
16
+ return e.option.textFunction != null ? o = e.option.textFunction(o) : e.option.value != null && (o = s(t, e.option.value)), e.option.textFilter != null && (o = c.findFilter(e.option.textFilter)(o)), o;
17
+ }), v = u(() => e.option.truncate == !0 && e.option.width != null ? `display: inline-block; width: ${e.option.width.includes("px") || e.option.width.includes("%") ? e.option.width : `${e.option.width}px`};` : "");
17
18
  return (t, o) => {
18
- const F = u("bt-entity"), h = u("v-slide-x-transition");
19
- return n(), i(h, { group: "" }, {
19
+ const k = h("bt-entity");
20
+ return n(), l(i(C), { group: "" }, {
20
21
  default: r(() => [
21
- t.option.prefix != null ? (n(), p("span", b, d(t.option.prefix), 1)) : x("", !0),
22
- t.option.bool != null ? (n(), p("span", B, [
23
- l(s)(t.data, t.option.value) === !0 ? (n(), i(l(c), {
22
+ t.option.prefix != null ? (n(), p("span", S, a(t.option.prefix), 1)) : w("", !0),
23
+ t.option.bool != null ? (n(), p("span", V, [
24
+ i(s)(t.data, t.option.value) === !0 ? (n(), l(i(m), {
24
25
  key: 0,
25
26
  class: "text-success",
26
27
  size: t.size
27
28
  }, {
28
29
  default: r(() => o[0] || (o[0] = [
29
- m("$check")
30
+ d("$check")
30
31
  ])),
31
32
  _: 1
32
- }, 8, ["size"])) : (n(), i(l(c), {
33
+ }, 8, ["size"])) : (n(), l(i(m), {
33
34
  key: 1,
34
35
  class: "text-error"
35
36
  }, {
36
37
  default: r(() => o[1] || (o[1] = [
37
- m("$close")
38
+ d("$close")
38
39
  ])),
39
40
  _: 1
40
41
  }))
41
- ])) : t.option.nav != null && (t.option.itemText != null || t.option.textFilter != null) ? (n(), i(F, {
42
+ ])) : t.option.nav != null && (t.option.itemText != null || t.option.textFilter != null) ? (n(), l(k, {
42
43
  key: 2,
43
44
  inline: "",
44
45
  itemText: t.option.itemText,
45
- itemID: l(s)(t.data, t.option.value),
46
+ itemID: i(s)(t.data, t.option.value),
46
47
  nav: t.option.nav,
47
48
  isSingle: !0,
48
49
  textFilter: t.option.textFilter,
@@ -50,8 +51,8 @@ const b = { key: 0 }, B = { key: 1 }, D = /* @__PURE__ */ w({
50
51
  }, null, 8, ["itemText", "itemID", "nav", "textFilter", "truncate"])) : (n(), p("span", {
51
52
  key: 3,
52
53
  class: T({ "text-truncate": t.option.truncate == !0 }),
53
- style: z(k.value)
54
- }, d(y.value(t.data)), 7))
54
+ style: x(v.value)
55
+ }, a(y.value(t.data)), 7))
55
56
  ]),
56
57
  _: 1
57
58
  });
@@ -59,5 +60,5 @@ const b = { key: 0 }, B = { key: 1 }, D = /* @__PURE__ */ w({
59
60
  }
60
61
  });
61
62
  export {
62
- D as default
63
+ I as default
63
64
  };
@@ -1,10 +1,11 @@
1
- import { defineComponent as x, ref as N, computed as g, watch as y, resolveComponent as B, openBlock as r, createBlock as d, unref as a, withCtx as s, renderSlot as E, createVNode as u, createElementBlock as z, Fragment as I, renderList as M, normalizeClass as f, createCommentVNode as k, createTextVNode as O } from "vue";
2
- import { VContainer as U } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VContainer.mjs";
3
- import { VTextField as W } from "../bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs";
4
- import { VRow as $ } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VRow.mjs";
5
- import { VCol as v } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VCol.mjs";
6
- import { VBtn as p } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
7
- const X = /* @__PURE__ */ x({
1
+ import { defineComponent as D, ref as C, computed as g, watch as N, openBlock as r, createBlock as c, unref as a, withCtx as s, renderSlot as L, createVNode as n, createElementBlock as E, Fragment as x, renderList as z, normalizeClass as h, createCommentVNode as V, createTextVNode as y } from "vue";
2
+ import { VContainer as I } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VContainer.mjs";
3
+ import { VTextField as M } from "../bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs";
4
+ import { VRow as B } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VRow.mjs";
5
+ import { VCol as p } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VCol.mjs";
6
+ import { VBtn as v } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
7
+ import { VSlideXTransition as U, VSlideYReverseTransition as W } from "../bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs";
8
+ const Q = /* @__PURE__ */ D({
8
9
  __name: "BT-Numpad",
9
10
  props: {
10
11
  buttonClass: {},
@@ -21,12 +22,12 @@ const X = /* @__PURE__ */ x({
21
22
  startingValue: {}
22
23
  },
23
24
  emits: ["change", "update:modelValue", "update:currentValue"],
24
- setup(T, { emit: _ }) {
25
+ setup(O, { emit: T }) {
25
26
  var b, w;
26
- const o = T, c = _, l = N(""), V = g(() => l.value != null && l.value.length > 0 && !Number.isNaN(l.value)), i = g(() => {
27
+ const o = O, d = T, l = C(""), k = g(() => l.value != null && l.value.length > 0 && !Number.isNaN(l.value)), i = g(() => {
27
28
  const e = o.showDecimal == !1 ? Number.parseInt(l.value) : Number.parseFloat(l.value);
28
29
  return isNaN(e) ? void 0 : e;
29
- }), R = N(4), S = g(() => {
30
+ }), S = C(4), $ = g(() => {
30
31
  const e = [
31
32
  { cols: 4, num: 1 },
32
33
  { cols: 4, num: 2 },
@@ -39,158 +40,155 @@ const X = /* @__PURE__ */ x({
39
40
  { cols: 4, num: 9 }
40
41
  ], t = [{ cols: "auto", num: void 0, icon: "$backspace" }];
41
42
  o.showNegative && t.push({ cols: "auto", num: "-" }), o.showDecimal && t.push({ cols: "auto", num: "." }), t.push({ cols: "4", num: 0 });
42
- let m = t.length;
43
- o.showOk !== !1 && m++;
44
- const h = Math.floor(12 / m);
45
- return R.value = h, t.forEach((n) => {
46
- n.cols = h;
43
+ let u = t.length;
44
+ o.showOk !== !1 && u++;
45
+ const m = Math.floor(12 / u);
46
+ return S.value = m, t.forEach((f) => {
47
+ f.cols = m;
47
48
  }), e.push(...t), e;
48
49
  });
49
- function A(e) {
50
- e != null ? e == "-" ? l.value.startsWith("-") ? l.value = l.value.substring(1) : l.value = `${e}${l.value}` : e == "." && l.value.includes(".") || (l.value = `${l.value ?? ""}${e}`) : l.value.length == 1 ? l.value = "" : l.value = l.value.substring(0, l.value.length - 1), c("update:currentValue", i.value);
50
+ function R(e) {
51
+ e != null ? e == "-" ? l.value.startsWith("-") ? l.value = l.value.substring(1) : l.value = `${e}${l.value}` : e == "." && l.value.includes(".") || (l.value = `${l.value ?? ""}${e}`) : l.value.length == 1 ? l.value = "" : l.value = l.value.substring(0, l.value.length - 1), d("update:currentValue", i.value);
51
52
  }
52
- function F() {
53
- i.value != null && (c("change", i.value), o.clearOnOk == !0 && (l.value = ""));
53
+ function A() {
54
+ i.value != null && (d("change", i.value), o.clearOnOk == !0 && (l.value = ""));
54
55
  }
55
- function H() {
56
- i.value != null && (c("change", 0 - i.value), o.clearOnOk == !0 && (l.value = ""));
56
+ function F() {
57
+ i.value != null && (d("change", 0 - i.value), o.clearOnOk == !0 && (l.value = ""));
57
58
  }
58
- function D(e) {
59
+ function H(e) {
59
60
  if (i.value != null) {
60
61
  const t = e ? i.value : 0 - i.value;
61
- c("change", t), c("update:modelValue", t), o.clearOnOk == !0 && (l.value = "");
62
+ d("change", t), d("update:modelValue", t), o.clearOnOk == !0 && (l.value = "");
62
63
  }
63
64
  }
64
- return y(() => o.modelValue, (e) => {
65
+ return N(() => o.modelValue, (e) => {
65
66
  l.value = (e == null ? void 0 : e.toString()) ?? "";
66
- }), y(() => o.startingValue, (e) => {
67
+ }), N(() => o.startingValue, (e) => {
67
68
  l.value = (e == null ? void 0 : e.toString()) ?? "";
68
- }), l.value = ((b = o.modelValue) == null ? void 0 : b.toString()) ?? ((w = o.startingValue) == null ? void 0 : w.toString()) ?? "", (e, t) => {
69
- const m = B("v-slide-x-transition"), h = B("v-slide-y-reverse-transition");
70
- return r(), d(a(U), { class: "ma-0 pa-0 mt-3" }, {
71
- default: s(() => [
72
- E(e.$slots, "display", { value: l.value }, () => [
73
- u(a(W), {
74
- color: "transparent",
75
- disabled: e.disableTextField,
76
- "hide-details": "",
77
- tile: "",
78
- modelValue: l.value,
79
- "onUpdate:modelValue": t[0] || (t[0] = (n) => l.value = n)
80
- }, null, 8, ["disabled", "modelValue"])
81
- ]),
82
- u(a($), { class: "ma-0 pa-0" }, {
83
- default: s(() => [
84
- (r(!0), z(I, null, M(S.value, (n, L) => (r(), d(a(v), {
85
- class: "ma-0 pa-0",
86
- cols: n.cols,
87
- key: L
88
- }, {
89
- default: s(() => {
90
- var C;
91
- return [
92
- u(a(p), {
93
- onClick: (j) => A(n.num),
94
- class: f(["text-h6", e.buttonClass]),
69
+ }), l.value = ((b = o.modelValue) == null ? void 0 : b.toString()) ?? ((w = o.startingValue) == null ? void 0 : w.toString()) ?? "", (e, t) => (r(), c(a(I), { class: "ma-0 pa-0 mt-3" }, {
70
+ default: s(() => [
71
+ L(e.$slots, "display", { value: l.value }, () => [
72
+ n(a(M), {
73
+ color: "transparent",
74
+ disabled: e.disableTextField,
75
+ "hide-details": "",
76
+ tile: "",
77
+ modelValue: l.value,
78
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => l.value = u)
79
+ }, null, 8, ["disabled", "modelValue"])
80
+ ]),
81
+ n(a(B), { class: "ma-0 pa-0" }, {
82
+ default: s(() => [
83
+ (r(!0), E(x, null, z($.value, (u, m) => (r(), c(a(p), {
84
+ class: "ma-0 pa-0",
85
+ cols: u.cols,
86
+ key: m
87
+ }, {
88
+ default: s(() => {
89
+ var f;
90
+ return [
91
+ n(a(v), {
92
+ onClick: (X) => R(u.num),
93
+ class: h(["text-h6", e.buttonClass]),
94
+ color: "transparent",
95
+ height: e.buttonHeight,
96
+ icon: u.icon,
97
+ text: ((f = u.num) == null ? void 0 : f.toString()) ?? u.text,
98
+ tile: "",
99
+ width: "100%"
100
+ }, null, 8, ["onClick", "class", "height", "icon", "text"])
101
+ ];
102
+ }),
103
+ _: 2
104
+ }, 1032, ["cols"]))), 128)),
105
+ e.showOk ? (r(), c(a(p), {
106
+ key: 0,
107
+ class: "ma-0 pa-0"
108
+ }, {
109
+ default: s(() => [
110
+ n(a(U), { "hide-on-leave": "" }, {
111
+ default: s(() => [
112
+ k.value ? (r(), c(a(v), {
113
+ key: 0,
114
+ class: h(["text-h6", e.buttonClass]),
95
115
  color: "transparent",
116
+ disabled: e.showAddRemove,
96
117
  height: e.buttonHeight,
97
- icon: n.icon,
98
- text: ((C = n.num) == null ? void 0 : C.toString()) ?? n.text,
118
+ icon: "$check",
99
119
  tile: "",
120
+ onClick: t[1] || (t[1] = () => H(!0)),
100
121
  width: "100%"
101
- }, null, 8, ["onClick", "class", "height", "icon", "text"])
102
- ];
122
+ }, null, 8, ["class", "disabled", "height"])) : V("", !0)
123
+ ]),
124
+ _: 1
125
+ })
126
+ ]),
127
+ _: 1
128
+ })) : V("", !0)
129
+ ]),
130
+ _: 1
131
+ }),
132
+ n(a(W), { "hide-on-leave": "" }, {
133
+ default: s(() => [
134
+ k.value && e.showAddRemove ? (r(), c(a(B), {
135
+ key: 0,
136
+ class: "ma-0 pa-0"
137
+ }, {
138
+ default: s(() => [
139
+ n(a(p), {
140
+ cols: "6",
141
+ class: "ma-0 pa-0"
142
+ }, {
143
+ default: s(() => [
144
+ n(a(v), {
145
+ onClick: F,
146
+ class: h(["text-h6", e.buttonClass]),
147
+ color: "error",
148
+ height: e.buttonHeight,
149
+ tile: "",
150
+ width: "100%"
151
+ }, {
152
+ default: s(() => t[2] || (t[2] = [
153
+ y("Remove")
154
+ ])),
155
+ _: 1
156
+ }, 8, ["class", "height"])
157
+ ]),
158
+ _: 1
103
159
  }),
104
- _: 2
105
- }, 1032, ["cols"]))), 128)),
106
- e.showOk ? (r(), d(a(v), {
107
- key: 0,
108
- class: "ma-0 pa-0"
109
- }, {
110
- default: s(() => [
111
- u(m, { "hide-on-leave": "" }, {
112
- default: s(() => [
113
- V.value ? (r(), d(a(p), {
114
- key: 0,
115
- class: f(["text-h6", e.buttonClass]),
116
- color: "transparent",
117
- disabled: e.showAddRemove,
118
- height: e.buttonHeight,
119
- icon: "$check",
120
- tile: "",
121
- onClick: t[1] || (t[1] = () => D(!0)),
122
- width: "100%"
123
- }, null, 8, ["class", "disabled", "height"])) : k("", !0)
124
- ]),
125
- _: 1
126
- })
127
- ]),
128
- _: 1
129
- })) : k("", !0)
130
- ]),
131
- _: 1
132
- }),
133
- u(h, { "hide-on-leave": "" }, {
134
- default: s(() => [
135
- V.value && e.showAddRemove ? (r(), d(a($), {
136
- key: 0,
137
- class: "ma-0 pa-0"
138
- }, {
139
- default: s(() => [
140
- u(a(v), {
141
- cols: "6",
142
- class: "ma-0 pa-0"
143
- }, {
144
- default: s(() => [
145
- u(a(p), {
146
- onClick: H,
147
- class: f(["text-h6", e.buttonClass]),
148
- color: "error",
149
- height: e.buttonHeight,
150
- tile: "",
151
- width: "100%"
152
- }, {
153
- default: s(() => t[2] || (t[2] = [
154
- O("Remove")
155
- ])),
156
- _: 1
157
- }, 8, ["class", "height"])
158
- ]),
159
- _: 1
160
- }),
161
- u(a(v), {
162
- cols: "6",
163
- class: "ma-0 pa-0"
164
- }, {
165
- default: s(() => [
166
- u(a(p), {
167
- onClick: F,
168
- class: f(["text-h6", e.buttonClass]),
169
- color: "success",
170
- height: e.buttonHeight,
171
- tile: "",
172
- width: "100%"
173
- }, {
174
- default: s(() => t[3] || (t[3] = [
175
- O("Add")
176
- ])),
177
- _: 1
178
- }, 8, ["class", "height"])
179
- ]),
180
- _: 1
181
- })
182
- ]),
183
- _: 1
184
- })) : k("", !0)
185
- ]),
186
- _: 1
187
- })
188
- ]),
189
- _: 3
190
- });
191
- };
160
+ n(a(p), {
161
+ cols: "6",
162
+ class: "ma-0 pa-0"
163
+ }, {
164
+ default: s(() => [
165
+ n(a(v), {
166
+ onClick: A,
167
+ class: h(["text-h6", e.buttonClass]),
168
+ color: "success",
169
+ height: e.buttonHeight,
170
+ tile: "",
171
+ width: "100%"
172
+ }, {
173
+ default: s(() => t[3] || (t[3] = [
174
+ y("Add")
175
+ ])),
176
+ _: 1
177
+ }, 8, ["class", "height"])
178
+ ]),
179
+ _: 1
180
+ })
181
+ ]),
182
+ _: 1
183
+ })) : V("", !0)
184
+ ]),
185
+ _: 1
186
+ })
187
+ ]),
188
+ _: 3
189
+ }));
192
190
  }
193
191
  });
194
192
  export {
195
- X as default
193
+ Q as default
196
194
  };