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,22 +1,23 @@
1
- import { defineComponent as K, computed as r, ref as g, provide as C, watch as Q, onMounted as X, resolveComponent as Y, openBlock as p, createBlock as m, unref as l, normalizeClass as Z, normalizeStyle as x, withCtx as a, createVNode as n, renderSlot as u, createCommentVNode as i, createTextVNode as N, toDisplayString as B, mergeProps as _, createElementVNode as ee } from "vue";
2
- import { usePresets as te } from "../composables/presets.mjs";
3
- import { useBlade as le } from "../composables/blade.mjs";
4
- import { useNavBack as ae } from "../composables/navigation.mjs";
5
- import { useSpring as oe } from "../bt-core/core/node_modules/vue-use-spring/dist/index.mjs";
6
- import { useDisplay as ie } from "vuetify";
7
- import { useComponentConfig as re } from "../composables/component-config.mjs";
1
+ import { defineComponent as J, computed as r, ref as g, provide as $, watch as K, onMounted as Q, openBlock as v, createBlock as m, unref as l, normalizeClass as X, normalizeStyle as Z, withCtx as a, createVNode as n, renderSlot as u, createCommentVNode as i, createTextVNode as C, toDisplayString as B, mergeProps as x, createElementVNode as _ } from "vue";
2
+ import { usePresets as ee } from "../composables/presets.mjs";
3
+ import { useBlade as te } from "../composables/blade.mjs";
4
+ import { useNavBack as le } from "../composables/navigation.mjs";
5
+ import { useSpring as ae } from "../bt-core/core/node_modules/vue-use-spring/dist/index.mjs";
6
+ import { useDisplay as oe } from "vuetify";
7
+ import { useComponentConfig as ie } from "../composables/component-config.mjs";
8
8
  import { VToolbar as W } from "../bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbar.mjs";
9
- import { VToolbarTitle as ne } from "../bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbarTitle.mjs";
10
- import { VListSubheader as se } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListSubheader.mjs";
11
- import { VAlert as de } from "../bt-core/core/node_modules/vuetify/lib/components/VAlert/VAlert.mjs";
12
- import { VOverlay as ue } from "../bt-core/core/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs";
13
- import { VProgressCircular as fe } from "../bt-core/core/node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.mjs";
9
+ import { VToolbarTitle as re } from "../bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbarTitle.mjs";
10
+ import { VListSubheader as ne } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListSubheader.mjs";
11
+ import { VAlert as se } from "../bt-core/core/node_modules/vuetify/lib/components/VAlert/VAlert.mjs";
12
+ import { VOverlay as de } from "../bt-core/core/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs";
13
+ import { VProgressCircular as ue } from "../bt-core/core/node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.mjs";
14
14
  import { VCard as D } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs";
15
+ import { VSlideYTransition as N } from "../bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs";
15
16
  import { VBtn as T } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
16
- import { VMenu as ve } from "../bt-core/core/node_modules/vuetify/lib/components/VMenu/VMenu.mjs";
17
+ import { VMenu as fe } from "../bt-core/core/node_modules/vuetify/lib/components/VMenu/VMenu.mjs";
17
18
  import { VList as pe } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VList.mjs";
18
- import { VCardText as me } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCardText.mjs";
19
- const We = /* @__PURE__ */ K({
19
+ import { VCardText as ve } from "../bt-core/core/node_modules/vuetify/lib/components/VCard/VCardText.mjs";
20
+ const We = /* @__PURE__ */ J({
20
21
  __name: "BT-Blade",
21
22
  props: {
22
23
  bordered: { type: Boolean },
@@ -58,7 +59,7 @@ const We = /* @__PURE__ */ K({
58
59
  },
59
60
  emits: ["close", "titled"],
60
61
  setup(P, { emit: H }) {
61
- const t = P, M = H, c = te(t.preset), s = r(() => {
62
+ const t = P, S = H, V = ee(t.preset), s = r(() => {
62
63
  if (t.width == "grow")
63
64
  return "grow";
64
65
  if (t.width == "auto")
@@ -70,21 +71,21 @@ const We = /* @__PURE__ */ K({
70
71
  return "auto";
71
72
  }
72
73
  return "number";
73
- }), S = r(() => t.bladeName == null || !!t.bladeStartShowing), V = r(() => S.value ? typeof t.width == "number" ? t.width : 400 : 0), y = g(!S.value);
74
+ }), M = r(() => t.bladeName == null || !!t.bladeStartShowing), c = r(() => M.value ? typeof t.width == "number" ? t.width : 400 : 0), y = g(!M.value);
74
75
  let w = 0;
75
- const d = oe(
76
- { width: V.value },
76
+ const d = ae(
77
+ { width: c.value },
77
78
  { precision: 0.1, mass: 1, friction: 26, tension: 250 },
78
79
  { onRest() {
79
80
  f.value = !1;
80
81
  } }
81
- ), { xs: U } = ie(), f = g(!1), b = g(null), z = g(null), { navBack: E } = ae();
82
+ ), { xs: U } = oe(), f = g(!1), b = g(null), z = g(null), { navBack: E } = le();
82
83
  function I() {
83
84
  var e = t.getNavBack ?? (() => {
84
85
  }), o = e() ?? E;
85
86
  o();
86
87
  }
87
- const v = le({
88
+ const p = te({
88
89
  ...t,
89
90
  blade: b,
90
91
  handle: z,
@@ -92,186 +93,183 @@ const We = /* @__PURE__ */ K({
92
93
  y.value || (b.value != null && (w = parseInt(window.getComputedStyle(b.value.$el).getPropertyValue("width"))), (s.value == "auto" || s.value == "percent" || s.value == "grow") && (d.width = w), f.value = !0, y.value = !0, d.width = 0);
93
94
  },
94
95
  onUpdate: () => {
95
- d.width == 0 && (typeof t.width == "number" ? d.width = t.width : w > 0 ? d.width = w : d.width = V.value != 0 ? V.value : 400, f.value = !0, y.value = !1);
96
+ d.width == 0 && (typeof t.width == "number" ? d.width = t.width : w > 0 ? d.width = w : d.width = c.value != 0 ? c.value : 400, f.value = !0, y.value = !1);
96
97
  }
97
- }), { editVariant: R, viewVariant: j } = re();
98
- C("isMobile", v.isMobile), C("editVariant", t.editVariant ?? R ?? "outlined"), C("viewVariant", t.viewVariant ?? j ?? "list-item");
99
- const L = r(() => t.loadingMsg != null), A = r(() => !!(c.hideBladeControls ?? t.hideBladeControls) || !t.bladeName), G = r(() => !!(c.hideNavigation ?? t.hideNavigation) || v.variant.value != "page"), q = r(() => {
100
- const e = c.noMargins ?? t.noMargins;
98
+ }), { editVariant: R, viewVariant: j } = ie();
99
+ $("isMobile", p.isMobile), $("editVariant", t.editVariant ?? R ?? "outlined"), $("viewVariant", t.viewVariant ?? j ?? "list-item");
100
+ const L = r(() => t.loadingMsg != null), A = r(() => !!(V.hideBladeControls ?? t.hideBladeControls) || !t.bladeName), G = r(() => !!(V.hideNavigation ?? t.hideNavigation) || p.variant.value != "page"), Y = r(() => {
101
+ const e = V.noMargins ?? t.noMargins;
101
102
  return e ?? U.value;
102
103
  }), O = r(() => {
103
104
  if (t.toolbarVariant != "inverted")
104
105
  return t.bordered || t.variant == "inline" ? "transparent" : "primary";
105
- }), k = g(!1), F = r(() => {
106
+ }), k = g(!1), q = r(() => {
106
107
  var e = "";
107
- return q.value ? e = "" : (t.bordered && !y.value || v.variant.value == "page") && (e = "ma-2"), t.bordered && !y.value && (e = `${e} border-thin pa-1`), t.bladeName != null && s.value == "grow" && (e = `${e} flex-grow-1`), e;
108
- }), J = r(() => {
108
+ return Y.value ? e = "" : (t.bordered && !y.value || p.variant.value == "page") && (e = "ma-2"), t.bordered && !y.value && (e = `${e} border-thin pa-1`), t.bladeName != null && s.value == "grow" && (e = `${e} flex-grow-1`), e;
109
+ }), F = r(() => {
109
110
  var e = t.opacity != null ? `opacity: ${t.opacity};` : "";
110
111
  return t.maxWidth != null && (e = `${e} max-width: ${t.maxWidth};`), t.bladeName != null ? f.value ? `${e} width: ${d.width}px;` : y.value ? `${e} width: 0px;` : s.value == "grow" ? e : s.value == "number" ? `${e} width: ${d.width}px;` : s.value == "auto" ? e : `${e} width: calc(${t.width});` : e;
111
112
  });
112
- return Q(() => t.errorMsg, (e) => {
113
+ return K(() => t.errorMsg, (e) => {
113
114
  k.value = e != null;
114
- }), X(() => {
115
+ }), Q(() => {
115
116
  (s.value == "percent" || s.value == "auto") && b.value != null && (d.width = parseInt(window.getComputedStyle(b.value.$el).getPropertyValue("width")));
116
- }), (e, o) => {
117
- const $ = Y("v-slide-y-transition");
118
- return f.value || !y.value ? (p(), m(l(D), {
119
- class: Z(F.value),
120
- color: e.transparent ? "transparent" : void 0,
121
- density: e.density,
122
- flat: e.flat ?? (l(v).variant.value == "inline" || l(v).variant.value == "pure"),
123
- key: "1",
124
- "min-height": e.minHeight,
125
- ref_key: "blade",
126
- ref: b,
127
- style: x(J.value)
128
- }, {
129
- default: a(() => [
130
- n($, { "hide-on-leave": "" }, {
131
- default: a(() => [
132
- !f.value && !e.hideToolbar && e.variant != "pure" ? (p(), m(l(W), {
133
- key: 0,
134
- class: "overflow-x-auto",
135
- color: O.value,
136
- density: e.density,
137
- ref_key: "handle",
138
- ref: z
139
- }, {
140
- default: a(() => [
141
- u(e.$slots, "blade-toolbar", {}, () => [
142
- G.value ? i("", !0) : (p(), m(l(T), {
143
- key: 0,
144
- icon: "$arrow-left",
145
- size: e.size,
146
- title: "Back",
147
- onClick: o[0] || (o[0] = () => I())
148
- }, null, 8, ["size"])),
149
- e.showOnlyTitleLeft ? i("", !0) : u(e.$slots, "blade-toolbar-left", { key: 1 }),
150
- u(e.$slots, "blade-title-left"),
151
- u(e.$slots, "blade-label", {}, () => [
152
- !e.showOnlyTitleLeft && e.label != null && e.variant != "inline" ? (p(), m(l(ne), {
153
- key: 0,
154
- onClick: o[1] || (o[1] = (h) => M("titled"))
155
- }, {
156
- default: a(() => [
157
- N(B(e.label), 1)
158
- ]),
159
- _: 1
160
- })) : !e.showOnlyTitleLeft && e.label != null ? (p(), m(l(se), {
161
- key: 1,
162
- class: "text-truncate",
163
- onClick: o[2] || (o[2] = (h) => M("titled"))
164
- }, {
165
- default: a(() => [
166
- N(B(e.label), 1)
167
- ]),
168
- _: 1
169
- })) : i("", !0)
170
- ]),
171
- e.showOnlyTitleLeft ? i("", !0) : u(e.$slots, "blade-title-right", { key: 2 })
172
- ])
173
- ]),
174
- append: a(() => [
175
- e.showOnlyTitleLeft ? i("", !0) : u(e.$slots, "blade-toolbar-right", { key: 0 }),
176
- !A.value && !e.showOnlyTitleLeft ? (p(), m(l(T), {
177
- icon: "$close",
178
- key: "6.1",
117
+ }), (e, o) => f.value || !y.value ? (v(), m(l(D), {
118
+ class: X(q.value),
119
+ color: e.transparent ? "transparent" : void 0,
120
+ density: e.density,
121
+ flat: e.flat ?? (l(p).variant.value == "inline" || l(p).variant.value == "pure"),
122
+ key: "1",
123
+ "min-height": e.minHeight,
124
+ ref_key: "blade",
125
+ ref: b,
126
+ style: Z(F.value)
127
+ }, {
128
+ default: a(() => [
129
+ n(l(N), { "hide-on-leave": "" }, {
130
+ default: a(() => [
131
+ !f.value && !e.hideToolbar && e.variant != "pure" ? (v(), m(l(W), {
132
+ key: 0,
133
+ class: "overflow-x-auto",
134
+ color: O.value,
135
+ density: e.density,
136
+ ref_key: "handle",
137
+ ref: z
138
+ }, {
139
+ default: a(() => [
140
+ u(e.$slots, "blade-toolbar", {}, () => [
141
+ G.value ? i("", !0) : (v(), m(l(T), {
142
+ key: 0,
143
+ icon: "$arrow-left",
179
144
  size: e.size,
180
- title: "Close",
181
- onClick: o[3] || (o[3] = () => l(v).closeBlade({ bladeName: e.bladeName, mode: "remove" }))
182
- }, null, 8, ["size"])) : i("", !0),
183
- !e.hideToolbarSettings && !e.showOnlyTitleLeft ? (p(), m(l(ve), {
184
- "close-on-content-click": !1,
185
- density: e.density,
186
- key: "7"
187
- }, {
188
- activator: a(({ props: h }) => [
189
- n(l(T), _({
190
- icon: "$cog",
191
- size: e.size
192
- }, h), null, 16, ["size"])
193
- ]),
194
- default: a(() => [
195
- n(l(pe), { density: e.density }, {
196
- default: a(() => [
197
- u(e.$slots, "blade-settings")
198
- ]),
199
- _: 3
200
- }, 8, ["density"])
201
- ]),
202
- _: 3
203
- }, 8, ["density"])) : i("", !0)
204
- ]),
205
- _: 3
206
- }, 8, ["color", "density"])) : i("", !0)
207
- ]),
208
- _: 3
209
- }),
210
- n($, { "hide-on-leave": "" }, {
211
- default: a(() => [
212
- !f.value && !e.hideSubtoolbar && e.variant != "pure" ? (p(), m(l(W), {
213
- key: 0,
214
- color: O.value,
215
- density: e.density,
216
- tile: ""
217
- }, {
218
- default: a(() => [
219
- u(e.$slots, "subtoolbar")
220
- ]),
221
- _: 3
222
- }, 8, ["color", "density"])) : i("", !0)
223
- ]),
224
- _: 3
225
- }),
226
- n($, null, {
227
- default: a(() => [
228
- n(l(de), {
229
- closable: "",
230
- color: "red-lighten-1",
231
- title: "Error",
232
- modelValue: k.value,
233
- "onUpdate:modelValue": o[4] || (o[4] = (h) => k.value = h)
234
- }, {
235
- default: a(() => [
236
- N(B(e.errorMsg), 1)
237
- ]),
238
- _: 1
239
- }, 8, ["modelValue"])
240
- ]),
241
- _: 1
242
- }),
243
- f.value ? i("", !0) : u(e.$slots, "content", {
244
- key: 0,
245
- isMobile: l(v).isMobile.value,
246
- bladeData: l(v).bladeData
247
- }),
248
- n(l(ue), {
249
- modelValue: L.value,
250
- "onUpdate:modelValue": o[5] || (o[5] = (h) => L.value = h),
251
- class: "align-center justify-center text-center overlay",
252
- contained: "",
253
- persistent: ""
254
- }, {
255
- default: a(() => [
256
- n(l(D), null, {
257
- default: a(() => [
258
- n(l(me), null, {
259
- default: a(() => [
260
- n(l(fe), { indeterminate: "" }),
261
- ee("p", null, B(e.loadingMsg), 1)
262
- ]),
263
- _: 1
264
- })
265
- ]),
266
- _: 1
267
- })
268
- ]),
269
- _: 1
270
- }, 8, ["modelValue"])
271
- ]),
272
- _: 3
273
- }, 8, ["class", "color", "density", "flat", "min-height", "style"])) : i("", !0);
274
- };
145
+ title: "Back",
146
+ onClick: o[0] || (o[0] = () => I())
147
+ }, null, 8, ["size"])),
148
+ e.showOnlyTitleLeft ? i("", !0) : u(e.$slots, "blade-toolbar-left", { key: 1 }),
149
+ u(e.$slots, "blade-title-left"),
150
+ u(e.$slots, "blade-label", {}, () => [
151
+ !e.showOnlyTitleLeft && e.label != null && e.variant != "inline" ? (v(), m(l(re), {
152
+ key: 0,
153
+ onClick: o[1] || (o[1] = (h) => S("titled"))
154
+ }, {
155
+ default: a(() => [
156
+ C(B(e.label), 1)
157
+ ]),
158
+ _: 1
159
+ })) : !e.showOnlyTitleLeft && e.label != null ? (v(), m(l(ne), {
160
+ key: 1,
161
+ class: "text-truncate",
162
+ onClick: o[2] || (o[2] = (h) => S("titled"))
163
+ }, {
164
+ default: a(() => [
165
+ C(B(e.label), 1)
166
+ ]),
167
+ _: 1
168
+ })) : i("", !0)
169
+ ]),
170
+ e.showOnlyTitleLeft ? i("", !0) : u(e.$slots, "blade-title-right", { key: 2 })
171
+ ])
172
+ ]),
173
+ append: a(() => [
174
+ e.showOnlyTitleLeft ? i("", !0) : u(e.$slots, "blade-toolbar-right", { key: 0 }),
175
+ !A.value && !e.showOnlyTitleLeft ? (v(), m(l(T), {
176
+ icon: "$close",
177
+ key: "6.1",
178
+ size: e.size,
179
+ title: "Close",
180
+ onClick: o[3] || (o[3] = () => l(p).closeBlade({ bladeName: e.bladeName, mode: "remove" }))
181
+ }, null, 8, ["size"])) : i("", !0),
182
+ !e.hideToolbarSettings && !e.showOnlyTitleLeft ? (v(), m(l(fe), {
183
+ "close-on-content-click": !1,
184
+ density: e.density,
185
+ key: "7"
186
+ }, {
187
+ activator: a(({ props: h }) => [
188
+ n(l(T), x({
189
+ icon: "$cog",
190
+ size: e.size
191
+ }, h), null, 16, ["size"])
192
+ ]),
193
+ default: a(() => [
194
+ n(l(pe), { density: e.density }, {
195
+ default: a(() => [
196
+ u(e.$slots, "blade-settings")
197
+ ]),
198
+ _: 3
199
+ }, 8, ["density"])
200
+ ]),
201
+ _: 3
202
+ }, 8, ["density"])) : i("", !0)
203
+ ]),
204
+ _: 3
205
+ }, 8, ["color", "density"])) : i("", !0)
206
+ ]),
207
+ _: 3
208
+ }),
209
+ n(l(N), { "hide-on-leave": "" }, {
210
+ default: a(() => [
211
+ !f.value && !e.hideSubtoolbar && e.variant != "pure" ? (v(), m(l(W), {
212
+ key: 0,
213
+ color: O.value,
214
+ density: e.density,
215
+ tile: ""
216
+ }, {
217
+ default: a(() => [
218
+ u(e.$slots, "subtoolbar")
219
+ ]),
220
+ _: 3
221
+ }, 8, ["color", "density"])) : i("", !0)
222
+ ]),
223
+ _: 3
224
+ }),
225
+ n(l(N), null, {
226
+ default: a(() => [
227
+ n(l(se), {
228
+ closable: "",
229
+ color: "red-lighten-1",
230
+ title: "Error",
231
+ modelValue: k.value,
232
+ "onUpdate:modelValue": o[4] || (o[4] = (h) => k.value = h)
233
+ }, {
234
+ default: a(() => [
235
+ C(B(e.errorMsg), 1)
236
+ ]),
237
+ _: 1
238
+ }, 8, ["modelValue"])
239
+ ]),
240
+ _: 1
241
+ }),
242
+ f.value ? i("", !0) : u(e.$slots, "content", {
243
+ key: 0,
244
+ isMobile: l(p).isMobile.value,
245
+ bladeData: l(p).bladeData
246
+ }),
247
+ n(l(de), {
248
+ modelValue: L.value,
249
+ "onUpdate:modelValue": o[5] || (o[5] = (h) => L.value = h),
250
+ class: "align-center justify-center text-center overlay",
251
+ contained: "",
252
+ persistent: ""
253
+ }, {
254
+ default: a(() => [
255
+ n(l(D), null, {
256
+ default: a(() => [
257
+ n(l(ve), null, {
258
+ default: a(() => [
259
+ n(l(ue), { indeterminate: "" }),
260
+ _("p", null, B(e.loadingMsg), 1)
261
+ ]),
262
+ _: 1
263
+ })
264
+ ]),
265
+ _: 1
266
+ })
267
+ ]),
268
+ _: 1
269
+ }, 8, ["modelValue"])
270
+ ]),
271
+ _: 3
272
+ }, 8, ["class", "color", "density", "flat", "min-height", "style"])) : i("", !0);
275
273
  }
276
274
  });
277
275
  export {