vlite3 1.4.27 → 1.4.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.
@@ -0,0 +1,48 @@
1
+ import { GoogleMapClickEvent, GoogleMapCoordinate, GoogleMapError, GoogleMapMarker, GoogleMapMarkerClickEvent, GoogleMapProps, GoogleMapReadyEvent } from '../types/GoogleMap.type';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ loading?(_: {}): any;
6
+ error?(_: {
7
+ error: GoogleMapError;
8
+ }): any;
9
+ };
10
+ refs: {
11
+ mapElement: HTMLDivElement;
12
+ };
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<GoogleMapProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ error: (error: GoogleMapError) => any;
18
+ click: (event: GoogleMapClickEvent) => any;
19
+ ready: (event: GoogleMapReadyEvent) => any;
20
+ "center-changed": (center: GoogleMapCoordinate) => any;
21
+ "zoom-changed": (zoom: number) => any;
22
+ "marker-click": (event: GoogleMapMarkerClickEvent) => any;
23
+ }, string, import('vue').PublicProps, Readonly<GoogleMapProps> & Readonly<{
24
+ onError?: (error: GoogleMapError) => any;
25
+ onClick?: (event: GoogleMapClickEvent) => any;
26
+ onReady?: (event: GoogleMapReadyEvent) => any;
27
+ "onCenter-changed"?: (center: GoogleMapCoordinate) => any;
28
+ "onZoom-changed"?: (zoom: number) => any;
29
+ "onMarker-click"?: (event: GoogleMapMarkerClickEvent) => any;
30
+ }>, {
31
+ width: string | number;
32
+ height: string | number;
33
+ options: import('..').GoogleMapOptions;
34
+ zoom: number;
35
+ markers: GoogleMapMarker[];
36
+ ariaLabel: string;
37
+ loadingText: string;
38
+ errorText: string;
39
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
40
+ mapElement: HTMLDivElement;
41
+ }, HTMLDivElement>;
42
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
43
+ export default _default;
44
+ type __VLS_WithTemplateSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./GoogleMap.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0cfbb6c9"]]);
5
+ export {
6
+ c as default
7
+ };
@@ -0,0 +1,164 @@
1
+ import { defineComponent as P, shallowRef as i, computed as u, watch as f, onMounted as Z, onBeforeUnmount as j, openBlock as h, createElementBlock as k, normalizeStyle as q, createElementVNode as D, renderSlot as N, createTextVNode as S, toDisplayString as c, createCommentVNode as L, markRaw as M, nextTick as H } from "vue";
2
+ import { useVLiteConfig as U } from "../core/config.js";
3
+ import { onGoogleMapsAuthFailure as J, loadGoogleMaps as Q } from "../utils/GoogleMapLoader.js";
4
+ const W = ["aria-label", "aria-busy"], X = {
5
+ key: 0,
6
+ class: "vlite-google-map__state",
7
+ role: "status",
8
+ "aria-live": "polite"
9
+ }, Y = {
10
+ key: 1,
11
+ class: "vlite-google-map__state vlite-google-map__state--error",
12
+ role: "alert"
13
+ }, ee = {
14
+ key: 2,
15
+ class: "vlite-google-map__notice",
16
+ "aria-live": "polite"
17
+ }, oe = /* @__PURE__ */ P({
18
+ __name: "GoogleMap",
19
+ props: {
20
+ apiKey: {},
21
+ center: {},
22
+ markers: { default: () => [] },
23
+ zoom: { default: 12 },
24
+ height: { default: "400px" },
25
+ width: { default: "100%" },
26
+ options: { default: () => ({}) },
27
+ ariaLabel: { default: "Interactive Google map" },
28
+ loadingText: { default: "Loading map…" },
29
+ errorText: { default: "The map is unavailable." }
30
+ },
31
+ emits: ["ready", "click", "center-changed", "zoom-changed", "marker-click", "error"],
32
+ setup(d, { emit: F }) {
33
+ const l = d, n = F, K = U(), v = i(null), a = i(null), o = i(null), y = i([]), w = [], x = [], s = i(!0), r = i(null);
34
+ let b = null, _ = !1;
35
+ const O = J((e) => {
36
+ _ || g(e);
37
+ }), C = u(() => l.apiKey?.trim() || K.components?.googleMap?.apiKey?.trim()), R = u(() => ({
38
+ height: A(l.height),
39
+ width: A(l.width)
40
+ }));
41
+ function A(e) {
42
+ return typeof e == "number" ? `${e}px` : e;
43
+ }
44
+ function E(e) {
45
+ if (!e || typeof e != "object") return !1;
46
+ const t = e;
47
+ return Number.isFinite(t.lat) && Number.isFinite(t.lng) && t.lat >= -90 && t.lat <= 90 && t.lng >= -180 && t.lng <= 180;
48
+ }
49
+ const m = u(
50
+ () => l.markers.filter((e) => E(e))
51
+ ), z = u(() => l.markers.length - m.value.length), p = u(() => E(l.center) ? l.center : m.value[0] ?? null);
52
+ function g(e) {
53
+ r.value = e, s.value = !1, n("error", e);
54
+ }
55
+ function T() {
56
+ x.splice(0).forEach((e) => e.remove()), y.value.forEach((e) => {
57
+ o.value?.maps.event.clearInstanceListeners(e), e.setMap(null);
58
+ }), y.value = [];
59
+ }
60
+ function G() {
61
+ !a.value || !o.value || (T(), y.value = m.value.map((e, t) => {
62
+ const I = M(
63
+ new o.value.maps.Marker({
64
+ map: a.value,
65
+ position: { lat: e.lat, lng: e.lng },
66
+ title: e.title,
67
+ label: e.label
68
+ })
69
+ );
70
+ return x.push(
71
+ I.addListener(
72
+ "click",
73
+ ($) => n("marker-click", { marker: e, index: t, nativeEvent: $ })
74
+ )
75
+ ), I;
76
+ }));
77
+ }
78
+ function V() {
79
+ a.value && w.push(
80
+ a.value.addListener("click", (e) => {
81
+ const t = e?.latLng;
82
+ n("click", {
83
+ coordinate: t ? { lat: t.lat(), lng: t.lng() } : null,
84
+ nativeEvent: e
85
+ });
86
+ }),
87
+ a.value.addListener("center_changed", () => {
88
+ const e = a.value?.getCenter();
89
+ e && n("center-changed", { lat: e.lat(), lng: e.lng() });
90
+ }),
91
+ a.value.addListener("zoom_changed", () => {
92
+ const e = a.value?.getZoom();
93
+ typeof e == "number" && n("zoom-changed", e);
94
+ })
95
+ );
96
+ }
97
+ async function B() {
98
+ if (!C.value) {
99
+ g({ code: "invalid-api-key", message: "A Google Maps API key is required." });
100
+ return;
101
+ }
102
+ if (!p.value) {
103
+ g({
104
+ code: l.center == null ? "invalid-markers" : "invalid-center",
105
+ message: "Provide a valid center or at least one valid marker coordinate."
106
+ });
107
+ return;
108
+ }
109
+ s.value = !0, r.value = null;
110
+ try {
111
+ const e = await Q(C.value);
112
+ if (await H(), _ || !v.value || !p.value) return;
113
+ o.value = M(e), a.value = M(
114
+ new e.maps.Map(v.value, {
115
+ ...l.options,
116
+ center: p.value,
117
+ zoom: l.zoom
118
+ })
119
+ ), V(), G(), s.value = !1, n("ready", { map: a.value }), typeof ResizeObserver < "u" && (b = new ResizeObserver(() => {
120
+ a.value && o.value && o.value.maps.event.trigger(a.value, "resize");
121
+ }), b.observe(v.value));
122
+ } catch (e) {
123
+ const t = e;
124
+ g(
125
+ t?.code ? t : { code: "load-failed", message: "Google Maps could not be initialized.", cause: e }
126
+ );
127
+ }
128
+ }
129
+ return f(p, (e) => {
130
+ e && a.value && a.value.setCenter(e);
131
+ }), f(() => l.zoom, (e) => a.value?.setZoom(e)), f(() => l.options, (e) => a.value?.setOptions(e), {
132
+ deep: !0
133
+ }), f(m, G, { deep: !0 }), Z(B), j(() => {
134
+ _ = !0, O(), b?.disconnect(), T(), w.splice(0).forEach((e) => e.remove()), a.value && o.value?.maps.event.clearInstanceListeners(a.value), a.value = null, o.value = null;
135
+ }), (e, t) => (h(), k("div", {
136
+ class: "vlite-google-map",
137
+ style: q(R.value),
138
+ "aria-label": d.ariaLabel,
139
+ "aria-busy": s.value,
140
+ role: "region"
141
+ }, [
142
+ D("div", {
143
+ ref_key: "mapElement",
144
+ ref: v,
145
+ class: "vlite-google-map__canvas",
146
+ tabindex: "0"
147
+ }, null, 512),
148
+ s.value && !r.value ? (h(), k("div", X, [
149
+ N(e.$slots, "loading", {}, () => [
150
+ S(c(d.loadingText), 1)
151
+ ], !0)
152
+ ])) : L("", !0),
153
+ r.value ? (h(), k("div", Y, [
154
+ N(e.$slots, "error", { error: r.value }, () => [
155
+ S(c(d.errorText) + " " + c(r.value.message), 1)
156
+ ], !0)
157
+ ])) : L("", !0),
158
+ z.value ? (h(), k("p", ee, c(z.value) + " invalid marker" + c(z.value === 1 ? "" : "s") + " omitted. ", 1)) : L("", !0)
159
+ ], 12, W));
160
+ }
161
+ });
162
+ export {
163
+ oe as default
164
+ };
@@ -16,7 +16,7 @@ import "v-datepicker-lite/style.css";
16
16
  /* empty css */
17
17
  import "@jaames/iro";
18
18
  import "@vueuse/core";
19
- /* empty css */
19
+ /* empty css */
20
20
  import "iconify-icon-picker";
21
21
  import "iconify-icon-picker/style.css";
22
22
  /* empty css */
@@ -1,4 +1,4 @@
1
- import { defineComponent as M, computed as y, openBlock as e, createElementBlock as n, normalizeStyle as I, normalizeClass as c, Fragment as w, createBlock as l, createCommentVNode as d, createElementVNode as o, toDisplayString as u, unref as h, withCtx as x, createVNode as D } from "vue";
1
+ import { defineComponent as M, computed as y, openBlock as e, createElementBlock as o, normalizeStyle as I, normalizeClass as c, Fragment as w, createElementVNode as l, createBlock as n, createCommentVNode as u, toDisplayString as d, unref as b, withCtx as x, createVNode as D } from "vue";
2
2
  import { $t as v } from "../../utils/i18n.js";
3
3
  import { formatCurrency as N, formatNumber as $ } from "../../utils/functions.js";
4
4
  import k from "./components/StatTrend.vue.js";
@@ -7,37 +7,37 @@ import S from "../Tooltip.vue.js";
7
7
  import E from "../Chart/LineChart.vue.js";
8
8
  import { configState as L } from "../../core/config.js";
9
9
  import { resolveColor as q } from "../Chart/utils.js";
10
- const A = {
11
- key: 1,
10
+ const A = { class: "flex items-start gap-3 w-full" }, G = { class: "flex-1 min-w-0" }, J = {
11
+ key: 0,
12
12
  class: "h-8 w-28 bg-gray-50 animate-pulse rounded-md mt-1"
13
- }, G = {
14
- key: 4,
13
+ }, K = {
14
+ key: 0,
15
15
  class: "mt-auto pt-3 -mx-1"
16
- }, J = {
17
- key: 6,
16
+ }, O = {
17
+ key: 2,
18
18
  class: "mt-auto pt-3 h-14 bg-gray-50/80 animate-pulse rounded-md"
19
- }, K = { class: "flex items-center justify-between w-full mt-1" }, O = {
19
+ }, Q = { class: "flex items-center justify-between w-full mt-1" }, R = {
20
20
  key: 0,
21
21
  class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
22
- }, Q = {
22
+ }, U = {
23
23
  key: 0,
24
24
  class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md"
25
- }, R = {
25
+ }, W = {
26
26
  key: 1,
27
27
  class: "h-8 w-20 bg-gray-50 animate-pulse rounded-md mt-1"
28
- }, U = {
28
+ }, X = {
29
29
  key: 4,
30
30
  class: "flex-1 flex flex-col justify-center min-w-0"
31
- }, W = {
31
+ }, Y = {
32
32
  key: 0,
33
33
  class: "h-9 w-24 bg-gray-50 animate-pulse rounded-md mt-0.5"
34
- }, X = {
34
+ }, Z = {
35
35
  key: 1,
36
36
  class: "h-6 w-5 bg-gray-50 animate-pulse rounded-sm shrink-0"
37
- }, Y = { class: "flex-1 flex flex-col justify-center min-w-0" }, Z = { class: "flex items-baseline gap-2 mt-1" }, p = {
37
+ }, p = { class: "flex-1 flex flex-col justify-center min-w-0" }, _ = { class: "flex items-baseline gap-2 mt-1" }, tt = {
38
38
  key: 0,
39
39
  class: "h-8 w-24 bg-gray-50 animate-pulse rounded-md"
40
- }, ct = /* @__PURE__ */ M({
40
+ }, ut = /* @__PURE__ */ M({
41
41
  __name: "StatItem",
42
42
  props: {
43
43
  item: {},
@@ -69,7 +69,7 @@ const A = {
69
69
  if (!a.item.isPrice && !a.item.numberFormat || (a.item.numberFormat || (a.item.isPrice ? "compact" : "standard")) !== "compact") return !1;
70
70
  const s = a.item.compactThreshold ?? L?.components?.price?.compactThreshold ?? 1e3;
71
71
  return Math.abs(i) >= s;
72
- }), b = y(() => {
72
+ }), h = y(() => {
73
73
  const i = Number(a.item.value) || 0;
74
74
  return a.item.isPrice ? N(i, { numberFormat: "standard" }) : a.item.numberFormat ? $(i, { numberFormat: "standard" }) : String(a.item.value);
75
75
  }), j = y(() => {
@@ -156,46 +156,50 @@ const A = {
156
156
  ), V = y(
157
157
  () => a.item.sparklineFill === void 0 ? !0 : a.item.sparklineFill
158
158
  );
159
- return (i, r) => (e(), n("div", {
159
+ return (i, r) => (e(), o("div", {
160
160
  class: c(j.value),
161
161
  style: I(T.value)
162
162
  }, [
163
- t.layout === "layout-9" ? (e(), n(w, { key: 0 }, [
164
- t.item.icon ? (e(), l(z, {
165
- key: 0,
166
- item: t.item,
167
- variant: t.variant,
168
- layout: t.layout,
169
- attached: t.attached,
170
- "icon-box-shape": t.iconBoxShape,
171
- "icon-box-style": t.iconBoxStyle,
172
- "icon-size": t.iconSize || "w-4 h-4",
173
- class: "!p-2.5 self-start"
174
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
175
- o("h3", {
176
- class: c([
177
- t.titleSize || "text-xs font-medium text-muted-foreground",
178
- "truncate mt-3 w-full"
163
+ t.layout === "layout-9" ? (e(), o(w, { key: 0 }, [
164
+ l("div", A, [
165
+ t.item.icon ? (e(), n(z, {
166
+ key: 0,
167
+ item: t.item,
168
+ variant: t.variant,
169
+ layout: t.layout,
170
+ attached: t.attached,
171
+ "icon-box-shape": t.iconBoxShape,
172
+ "icon-box-style": t.iconBoxStyle,
173
+ "icon-size": t.iconSize || "w-4 h-4",
174
+ class: "!p-2.5 shrink-0"
175
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : u("", !0),
176
+ l("div", G, [
177
+ l("h3", {
178
+ class: c([
179
+ t.titleSize || "text-xs font-medium text-muted-foreground",
180
+ "truncate w-full"
181
+ ])
182
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
183
+ t.loading ? (e(), o("div", J)) : (e(), n(S, {
184
+ key: 1,
185
+ content: h.value,
186
+ disabled: !g.value
187
+ }, {
188
+ default: x(() => [
189
+ l("p", {
190
+ class: c(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
191
+ }, d(f(t.item)), 3)
192
+ ]),
193
+ _: 1
194
+ }, 8, ["content", "disabled"])),
195
+ t.item.trend && !t.loading ? (e(), n(k, {
196
+ key: 2,
197
+ trend: t.item.trend,
198
+ layout: t.layout
199
+ }, null, 8, ["trend", "layout"])) : u("", !0)
179
200
  ])
180
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
181
- t.loading ? (e(), n("div", A)) : (e(), l(S, {
182
- key: 2,
183
- content: b.value,
184
- disabled: !g.value
185
- }, {
186
- default: x(() => [
187
- o("p", {
188
- class: c(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
189
- }, u(f(t.item)), 3)
190
- ]),
191
- _: 1
192
- }, 8, ["content", "disabled"])),
193
- t.item.trend && !t.loading ? (e(), l(k, {
194
- key: 3,
195
- trend: t.item.trend,
196
- layout: t.layout
197
- }, null, 8, ["trend", "layout"])) : d("", !0),
198
- !t.loading && B.value.length ? (e(), n("div", G, [
201
+ ]),
202
+ !t.loading && B.value.length ? (e(), o("div", K, [
199
203
  D(E, {
200
204
  data: B.value,
201
205
  height: C.value,
@@ -214,36 +218,36 @@ const A = {
214
218
  colors: [H.value],
215
219
  "line-width": 2
216
220
  }, null, 8, ["data", "height", "fill", "colors"])
217
- ])) : t.loading ? (e(), n("div", J)) : (e(), n("div", {
218
- key: 5,
221
+ ])) : t.loading ? (e(), o("div", O)) : (e(), o("div", {
222
+ key: 1,
219
223
  class: "mt-auto pt-3",
220
224
  style: I({ minHeight: `${C.value}px` })
221
225
  }, null, 4))
222
- ], 64)) : t.layout === "layout-4" ? (e(), n(w, { key: 1 }, [
223
- o("h3", {
226
+ ], 64)) : t.layout === "layout-4" ? (e(), o(w, { key: 1 }, [
227
+ l("h3", {
224
228
  class: c(t.titleSize || "text-sm font-medium text-muted-foreground truncate w-full")
225
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
226
- o("div", K, [
227
- o("div", null, [
228
- t.loading ? (e(), n("div", O)) : (e(), l(S, {
229
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
230
+ l("div", Q, [
231
+ l("div", null, [
232
+ t.loading ? (e(), o("div", R)) : (e(), n(S, {
229
233
  key: 1,
230
- content: b.value,
234
+ content: h.value,
231
235
  disabled: !g.value
232
236
  }, {
233
237
  default: x(() => [
234
- o("p", {
238
+ l("p", {
235
239
  class: c(t.valueSize || "text-2xl font-bold text-foreground truncate")
236
- }, u(f(t.item)), 3)
240
+ }, d(f(t.item)), 3)
237
241
  ]),
238
242
  _: 1
239
243
  }, 8, ["content", "disabled"])),
240
- t.item.trend && !t.loading ? (e(), l(k, {
244
+ t.item.trend && !t.loading ? (e(), n(k, {
241
245
  key: 2,
242
246
  trend: t.item.trend,
243
247
  layout: t.layout
244
- }, null, 8, ["trend", "layout"])) : d("", !0)
248
+ }, null, 8, ["trend", "layout"])) : u("", !0)
245
249
  ]),
246
- t.item.icon ? (e(), l(z, {
250
+ t.item.icon ? (e(), n(z, {
247
251
  key: 0,
248
252
  item: t.item,
249
253
  variant: t.variant,
@@ -252,31 +256,31 @@ const A = {
252
256
  "icon-box-shape": t.iconBoxShape,
253
257
  "icon-box-style": t.iconBoxStyle,
254
258
  "icon-size": t.iconSize
255
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
259
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : u("", !0)
256
260
  ])
257
- ], 64)) : t.layout === "layout-5" ? (e(), n(w, { key: 2 }, [
258
- t.loading ? (e(), n("div", Q)) : (e(), l(S, {
261
+ ], 64)) : t.layout === "layout-5" ? (e(), o(w, { key: 2 }, [
262
+ t.loading ? (e(), o("div", U)) : (e(), n(S, {
259
263
  key: 1,
260
- content: b.value,
264
+ content: h.value,
261
265
  disabled: !g.value
262
266
  }, {
263
267
  default: x(() => [
264
- o("p", {
268
+ l("p", {
265
269
  class: c(t.valueSize || "text-3xl font-bold text-foreground")
266
- }, u(f(t.item)), 3)
270
+ }, d(f(t.item)), 3)
267
271
  ]),
268
272
  _: 1
269
273
  }, 8, ["content", "disabled"])),
270
- o("h3", {
274
+ l("h3", {
271
275
  class: c(t.titleSize || "text-sm font-medium text-muted-foreground")
272
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
273
- t.item.trend && !t.loading ? (e(), l(k, {
276
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
277
+ t.item.trend && !t.loading ? (e(), n(k, {
274
278
  key: 2,
275
279
  trend: t.item.trend,
276
280
  layout: t.layout
277
- }, null, 8, ["trend", "layout"])) : d("", !0)
278
- ], 64)) : t.layout === "layout-6" ? (e(), n(w, { key: 3 }, [
279
- t.item.icon ? (e(), l(z, {
281
+ }, null, 8, ["trend", "layout"])) : u("", !0)
282
+ ], 64)) : t.layout === "layout-6" ? (e(), o(w, { key: 3 }, [
283
+ t.item.icon ? (e(), n(z, {
280
284
  key: 0,
281
285
  item: t.item,
282
286
  variant: t.variant,
@@ -286,52 +290,52 @@ const A = {
286
290
  "icon-box-style": t.iconBoxStyle,
287
291
  "icon-size": t.iconSize,
288
292
  class: "absolute top-4 right-4"
289
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
290
- o("h3", {
293
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : u("", !0),
294
+ l("h3", {
291
295
  class: c(t.titleSize || "text-sm font-medium text-muted-foreground truncate pr-12")
292
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
293
- t.loading ? (e(), n("div", R)) : (e(), l(S, {
296
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
297
+ t.loading ? (e(), o("div", W)) : (e(), n(S, {
294
298
  key: 2,
295
- content: b.value,
299
+ content: h.value,
296
300
  disabled: !g.value
297
301
  }, {
298
302
  default: x(() => [
299
- o("p", {
303
+ l("p", {
300
304
  class: c(t.valueSize || "text-2xl font-bold text-foreground truncate mt-1")
301
- }, u(f(t.item)), 3)
305
+ }, d(f(t.item)), 3)
302
306
  ]),
303
307
  _: 1
304
308
  }, 8, ["content", "disabled"])),
305
- t.item.trend && !t.loading ? (e(), l(k, {
309
+ t.item.trend && !t.loading ? (e(), n(k, {
306
310
  key: 3,
307
311
  trend: t.item.trend,
308
312
  layout: t.layout
309
- }, null, 8, ["trend", "layout"])) : d("", !0)
310
- ], 64)) : t.layout === "layout-7" ? (e(), n("div", U, [
311
- o("h3", {
313
+ }, null, 8, ["trend", "layout"])) : u("", !0)
314
+ ], 64)) : t.layout === "layout-7" ? (e(), o("div", X, [
315
+ l("h3", {
312
316
  class: c(
313
317
  t.titleSize || "text-xs font-semibold uppercase tracking-widest text-muted-foreground truncate"
314
318
  )
315
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
316
- t.loading ? (e(), n("div", W)) : (e(), l(S, {
319
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
320
+ t.loading ? (e(), o("div", Y)) : (e(), n(S, {
317
321
  key: 1,
318
- content: b.value,
322
+ content: h.value,
319
323
  disabled: !g.value
320
324
  }, {
321
325
  default: x(() => [
322
- o("p", {
326
+ l("p", {
323
327
  class: c(t.valueSize || "text-3xl font-black text-foreground truncate mt-0.5")
324
- }, u(f(t.item)), 3)
328
+ }, d(f(t.item)), 3)
325
329
  ]),
326
330
  _: 1
327
331
  }, 8, ["content", "disabled"])),
328
- t.item.trend && !t.loading ? (e(), l(k, {
332
+ t.item.trend && !t.loading ? (e(), n(k, {
329
333
  key: 2,
330
334
  trend: t.item.trend,
331
335
  layout: t.layout
332
- }, null, 8, ["trend", "layout"])) : d("", !0)
333
- ])) : t.layout === "layout-8" ? (e(), n(w, { key: 5 }, [
334
- t.item.icon ? (e(), l(z, {
336
+ }, null, 8, ["trend", "layout"])) : u("", !0)
337
+ ])) : t.layout === "layout-8" ? (e(), o(w, { key: 5 }, [
338
+ t.item.icon ? (e(), n(z, {
335
339
  key: 0,
336
340
  item: t.item,
337
341
  variant: t.variant,
@@ -340,29 +344,29 @@ const A = {
340
344
  "icon-box-shape": t.iconBoxShape,
341
345
  "icon-box-style": t.iconBoxStyle,
342
346
  "icon-size": t.iconSize
343
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
344
- o("span", {
347
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : u("", !0),
348
+ l("span", {
345
349
  class: c([t.titleSize || "-text-fs-2 font-medium text-muted-foreground truncate", "flex-1 min-w-0"])
346
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
347
- t.loading ? (e(), n("div", X)) : (e(), l(S, {
350
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
351
+ t.loading ? (e(), o("div", Z)) : (e(), n(S, {
348
352
  key: 2,
349
- content: b.value,
353
+ content: h.value,
350
354
  disabled: !g.value
351
355
  }, {
352
356
  default: x(() => [
353
- o("span", {
357
+ l("span", {
354
358
  class: c(t.valueSize || "-text-fs-1 font-semibold text-foreground tabular-nums shrink-0")
355
- }, u(f(t.item)), 3)
359
+ }, d(f(t.item)), 3)
356
360
  ]),
357
361
  _: 1
358
362
  }, 8, ["content", "disabled"])),
359
- t.item.trend && !t.loading ? (e(), l(k, {
363
+ t.item.trend && !t.loading ? (e(), n(k, {
360
364
  key: 3,
361
365
  trend: t.item.trend,
362
366
  layout: t.layout
363
- }, null, 8, ["trend", "layout"])) : d("", !0)
364
- ], 64)) : (e(), n(w, { key: 6 }, [
365
- t.item.icon && t.layout !== "layout-2" ? (e(), l(z, {
367
+ }, null, 8, ["trend", "layout"])) : u("", !0)
368
+ ], 64)) : (e(), o(w, { key: 6 }, [
369
+ t.item.icon && t.layout !== "layout-2" ? (e(), n(z, {
366
370
  key: 0,
367
371
  item: t.item,
368
372
  variant: t.variant,
@@ -371,32 +375,32 @@ const A = {
371
375
  "icon-box-shape": t.iconBoxShape,
372
376
  "icon-box-style": t.iconBoxStyle,
373
377
  "icon-size": t.iconSize
374
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0),
375
- o("div", Y, [
376
- o("h3", {
378
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : u("", !0),
379
+ l("div", p, [
380
+ l("h3", {
377
381
  class: c(t.titleSize || "text-sm font-medium text-muted-foreground truncate")
378
- }, u(t.item.titleI18n ? h(v)(t.item.titleI18n) : t.item.title), 3),
379
- o("div", Z, [
380
- t.loading ? (e(), n("div", p)) : (e(), l(S, {
382
+ }, d(t.item.titleI18n ? b(v)(t.item.titleI18n) : t.item.title), 3),
383
+ l("div", _, [
384
+ t.loading ? (e(), o("div", tt)) : (e(), n(S, {
381
385
  key: 1,
382
- content: b.value,
386
+ content: h.value,
383
387
  disabled: !g.value
384
388
  }, {
385
389
  default: x(() => [
386
- o("p", {
390
+ l("p", {
387
391
  class: c(t.valueSize || "text-2xl font-bold text-foreground truncate")
388
- }, u(f(t.item)), 3)
392
+ }, d(f(t.item)), 3)
389
393
  ]),
390
394
  _: 1
391
395
  }, 8, ["content", "disabled"]))
392
396
  ]),
393
- t.item.trend && !t.loading ? (e(), l(k, {
397
+ t.item.trend && !t.loading ? (e(), n(k, {
394
398
  key: 0,
395
399
  trend: t.item.trend,
396
400
  layout: t.layout
397
- }, null, 8, ["trend", "layout"])) : d("", !0)
401
+ }, null, 8, ["trend", "layout"])) : u("", !0)
398
402
  ]),
399
- t.item.icon && t.layout === "layout-2" ? (e(), l(z, {
403
+ t.item.icon && t.layout === "layout-2" ? (e(), n(z, {
400
404
  key: 1,
401
405
  item: t.item,
402
406
  variant: t.variant,
@@ -405,11 +409,11 @@ const A = {
405
409
  "icon-box-shape": t.iconBoxShape,
406
410
  "icon-box-style": t.iconBoxStyle,
407
411
  "icon-size": t.iconSize
408
- }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : d("", !0)
412
+ }, null, 8, ["item", "variant", "layout", "attached", "icon-box-shape", "icon-box-style", "icon-size"])) : u("", !0)
409
413
  ], 64))
410
414
  ], 6));
411
415
  }
412
416
  });
413
417
  export {
414
- ct as default
418
+ ut as default
415
419
  };
@@ -33,9 +33,9 @@ declare const __VLS_component: import('vue').DefineComponent<WorkbookProps, {},
33
33
  }>, {
34
34
  variant: "chrome" | "folder" | "simple" | "card";
35
35
  itemClass: string;
36
+ draggable: boolean;
36
37
  modelValue: string;
37
38
  editable: boolean;
38
- draggable: boolean;
39
39
  confirmDelete: boolean;
40
40
  allowIconChange: boolean;
41
41
  activeItemClass: string;