@gspa/ui 0.1.4 → 0.3.0
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.
- package/README.md +34 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
- package/dist/DataTable.css +1 -0
- package/dist/DataTableToolBar.css +1 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-CIKiZaO1.cjs +1 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-Dx_9f8DO.js +557 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-BljDj5YZ.js +205 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-FWitIR3U.cjs +1 -0
- package/dist/Header.css +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
- package/dist/Loader.css +1 -0
- package/dist/ReminderConfig.css +1 -0
- package/dist/ReusableForm.css +1 -0
- package/dist/Sidebar.css +1 -0
- package/dist/Toast.css +1 -0
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.js +5 -5
- package/dist/components/Alert.cjs +1 -1
- package/dist/components/Alert.js +71 -66
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.js +2 -188
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.js +1 -1
- package/dist/components/DataTableFilters.cjs +1 -1
- package/dist/components/DataTableFilters.js +19 -19
- package/dist/components/DataTableToolBar.cjs +1 -1
- package/dist/components/DataTableToolBar.js +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.js +2 -399
- package/dist/components/FormField.cjs +1 -1
- package/dist/components/FormField.js +2 -188
- package/dist/components/GraphFilters.cjs +1 -1
- package/dist/components/GraphFilters.js +29 -29
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.js +23 -16
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.js +2 -164
- package/dist/components/ReusableForm.cjs +1 -1
- package/dist/components/ReusableForm.js +188 -159
- package/dist/components/ThemeConfigurator.cjs +1 -1
- package/dist/components/ThemeConfigurator.js +51 -28
- package/dist/gspa-ui.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +124 -118
- package/dist/layouts/AuthLayout.cjs +1 -1
- package/dist/layouts/AuthLayout.js +110 -112
- package/dist/lib/form-field.cjs +1 -0
- package/dist/lib/form-field.js +4 -0
- package/dist/lib/icon.cjs +1 -0
- package/dist/lib/icon.js +4 -0
- package/dist/lib/theme.cjs +1 -1
- package/dist/lib/theme.js +73 -63
- package/dist/src/components/Alert.vue.d.ts.map +1 -1
- package/dist/src/components/Button.vue.d.ts +127 -29
- package/dist/src/components/Button.vue.d.ts.map +1 -1
- package/dist/src/components/Calendar.vue.d.ts +4 -4
- package/dist/src/components/Checkbox.vue.d.ts +2 -2
- package/dist/src/components/DataTable.vue.d.ts +1 -1
- package/dist/src/components/DatePicker.vue.d.ts +139 -29
- package/dist/src/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/src/components/FormField.vue.d.ts +106 -38
- package/dist/src/components/FormField.vue.d.ts.map +1 -1
- package/dist/src/components/Icon.vue.d.ts.map +1 -1
- package/dist/src/components/Input.vue.d.ts +137 -33
- package/dist/src/components/Input.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
- package/dist/src/components/Textarea.vue.d.ts +2 -2
- package/dist/src/index.d.ts +9 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
- package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
- package/dist/src/lib/form-field.d.ts +2 -0
- package/dist/src/lib/form-field.d.ts.map +1 -0
- package/dist/src/lib/icon.d.ts +2 -0
- package/dist/src/lib/icon.d.ts.map +1 -0
- package/dist/src/lib/theme.d.ts +4 -0
- package/dist/src/lib/theme.d.ts.map +1 -1
- package/dist/src/types.d.ts +47 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/styles/auth-layout.css +1 -0
- package/dist/styles/button.css +1 -0
- package/dist/styles/form-field.css +1 -0
- package/dist/styles/input.css +1 -0
- package/dist/styles/tokens.css +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -3
- package/dist/src/__tests__/Alert.spec.d.ts +0 -2
- package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
- package/dist/src/__tests__/App.spec.d.ts +0 -2
- package/dist/src/__tests__/App.spec.d.ts.map +0 -1
- package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
- package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Badge.spec.d.ts +0 -2
- package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Button.spec.d.ts +0 -2
- package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Card.spec.d.ts +0 -2
- package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
- package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
- package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Input.spec.d.ts +0 -2
- package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Modal.spec.d.ts +0 -2
- package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Radio.spec.d.ts +0 -2
- package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
- package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
- package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
- package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
|
@@ -1,401 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const ge = { class: "relative w-full bg-(--ui-surface) rounded-md" }, be = { class: "relative" }, ye = ["id", "value", "disabled", "placeholder", "required", "aria-describedby"], he = { class: "flex items-center justify-between mb-3" }, xe = { class: "text-sm font-semibold ui-text" }, we = { class: "grid grid-cols-7 gap-1 mb-1" }, De = { class: "grid grid-cols-7 gap-1" }, ke = ["disabled", "onClick"], Se = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "mt-3 pt-2 border-t ui-border"
|
|
5
|
-
}, Me = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "border-l pl-3 ui-border"
|
|
8
|
-
}, Te = { class: "max-h-[260px] overflow-y-auto pr-1 space-y-1" }, Ce = ["onClick"], $e = {
|
|
9
|
-
__name: "DatePicker",
|
|
10
|
-
props: {
|
|
11
|
-
id: String,
|
|
12
|
-
modelValue: [String, Date],
|
|
13
|
-
disabled: Boolean,
|
|
14
|
-
required: Boolean,
|
|
15
|
-
min: [String, Date],
|
|
16
|
-
max: [String, Date],
|
|
17
|
-
placeholder: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "Select date"
|
|
20
|
-
},
|
|
21
|
-
format: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "DD/MM/YYYY"
|
|
24
|
-
},
|
|
25
|
-
clearable: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !0
|
|
28
|
-
},
|
|
29
|
-
showToday: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: !0
|
|
32
|
-
},
|
|
33
|
-
ariaDescribedby: String,
|
|
34
|
-
// Custom validation function: (date: Date) => string | null
|
|
35
|
-
// Return error message string if invalid, null if valid
|
|
36
|
-
customValidation: {
|
|
37
|
-
type: Function,
|
|
38
|
-
default: null
|
|
39
|
-
},
|
|
40
|
-
// Array of disabled dates or function to determine if date is disabled
|
|
41
|
-
disabledDates: {
|
|
42
|
-
type: [Array, Function],
|
|
43
|
-
default: null
|
|
44
|
-
},
|
|
45
|
-
enableTime: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: !1
|
|
48
|
-
},
|
|
49
|
-
minuteInterval: {
|
|
50
|
-
type: Number,
|
|
51
|
-
default: 1
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
emits: ["update:modelValue", "validation-error"],
|
|
55
|
-
setup(d, { emit: G }) {
|
|
56
|
-
const r = d, y = G, m = p(!1), B = p(null), Y = p(null), F = p({}), g = /* @__PURE__ */ new Date(), i = p(g.getMonth()), u = p(g.getFullYear()), c = p(null), D = p(!1), k = p("00:00"), J = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], K = x(
|
|
57
|
-
() => new Date(u.value, i.value).toLocaleString("default", {
|
|
58
|
-
month: "long"
|
|
59
|
-
})
|
|
60
|
-
), I = x(() => new Date(u.value, i.value + 1, 0).getDate()), Q = x(() => new Date(u.value, i.value, 1).getDay()), E = x(() => {
|
|
61
|
-
const n = new Date(u.value, i.value, 0).getDate(), e = Q.value;
|
|
62
|
-
return Array.from({ length: e }, (t, a) => n - e + a + 1);
|
|
63
|
-
}), X = x(() => {
|
|
64
|
-
const n = E.value.length + I.value, e = n % 7 === 0 ? 0 : 7 - n % 7;
|
|
65
|
-
return Array.from({ length: e }, (t, a) => a + 1);
|
|
66
|
-
}), N = x(() => c.value ? r.enableTime ? ee(c.value) : z(c.value) : ""), Z = x(() => {
|
|
67
|
-
const n = Math.min(60, Math.max(1, Number(r.minuteInterval) || 1)), e = [];
|
|
68
|
-
for (let t = 0; t < 24; t++)
|
|
69
|
-
for (let a = 0; a < 60; a += n) {
|
|
70
|
-
const v = String(t).padStart(2, "0"), f = String(a).padStart(2, "0");
|
|
71
|
-
e.push(`${v}:${f}`);
|
|
72
|
-
}
|
|
73
|
-
return e;
|
|
74
|
-
});
|
|
75
|
-
function z(n) {
|
|
76
|
-
if (!n) return "";
|
|
77
|
-
const e = new Date(n), t = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0"), v = e.getFullYear();
|
|
78
|
-
return r.format.replace("MM", t).replace("DD", a).replace("YYYY", v);
|
|
79
|
-
}
|
|
80
|
-
function ee(n) {
|
|
81
|
-
const e = z(n), t = String(n.getHours()).padStart(2, "0"), a = String(n.getMinutes()).padStart(2, "0");
|
|
82
|
-
return `${e} ${t}:${a}`;
|
|
83
|
-
}
|
|
84
|
-
function S(n) {
|
|
85
|
-
if (!n) return null;
|
|
86
|
-
if (n instanceof Date) return n;
|
|
87
|
-
if (typeof n == "string") {
|
|
88
|
-
if (n.includes("T")) {
|
|
89
|
-
const [a, v] = n.split("T"), f = S(a);
|
|
90
|
-
if (!f) return null;
|
|
91
|
-
const [h = "00", b = "00"] = (v || "").slice(0, 5).split(":");
|
|
92
|
-
return f.setHours(parseInt(h, 10) || 0, parseInt(b, 10) || 0, 0, 0), f;
|
|
93
|
-
}
|
|
94
|
-
const t = n.split("-");
|
|
95
|
-
if (t.length === 3) {
|
|
96
|
-
const a = parseInt(t[0], 10), v = parseInt(t[1], 10) - 1, f = parseInt(t[2], 10);
|
|
97
|
-
return new Date(a, v, f);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
const e = new Date(n);
|
|
101
|
-
return isNaN(e.getTime()) ? null : e;
|
|
102
|
-
}
|
|
103
|
-
function te(n) {
|
|
104
|
-
return g.getDate() === n && g.getMonth() === i.value && g.getFullYear() === u.value;
|
|
105
|
-
}
|
|
106
|
-
function H(n) {
|
|
107
|
-
if (!c.value) return !1;
|
|
108
|
-
const e = new Date(c.value);
|
|
109
|
-
return e.getDate() === n && e.getMonth() === i.value && e.getFullYear() === u.value;
|
|
110
|
-
}
|
|
111
|
-
function $(n) {
|
|
112
|
-
const e = new Date(u.value, i.value, n);
|
|
113
|
-
if (r.min) {
|
|
114
|
-
const t = S(r.min);
|
|
115
|
-
if (t && e < t) return !0;
|
|
116
|
-
}
|
|
117
|
-
if (r.max) {
|
|
118
|
-
const t = S(r.max);
|
|
119
|
-
if (t && e > t) return !0;
|
|
120
|
-
}
|
|
121
|
-
if (r.disabledDates) {
|
|
122
|
-
if (typeof r.disabledDates == "function")
|
|
123
|
-
return r.disabledDates(e);
|
|
124
|
-
if (Array.isArray(r.disabledDates))
|
|
125
|
-
return r.disabledDates.some((t) => {
|
|
126
|
-
const a = S(t);
|
|
127
|
-
return a && a.getTime() === e.getTime();
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
return !!(r.customValidation && r.customValidation(e));
|
|
131
|
-
}
|
|
132
|
-
function L(n) {
|
|
133
|
-
if (!n)
|
|
134
|
-
return D.value = !1, y("validation-error", null), !0;
|
|
135
|
-
if (r.customValidation) {
|
|
136
|
-
const e = r.customValidation(n);
|
|
137
|
-
if (e)
|
|
138
|
-
return D.value = !0, y("validation-error", e), !1;
|
|
139
|
-
}
|
|
140
|
-
return D.value = !1, y("validation-error", null), !0;
|
|
141
|
-
}
|
|
142
|
-
async function R() {
|
|
143
|
-
await pe();
|
|
144
|
-
const n = Y.value || (r.id ? document.getElementById(r.id) : null);
|
|
145
|
-
if (!n || !B.value) return;
|
|
146
|
-
const e = n.getBoundingClientRect(), t = 320, a = window.innerHeight - e.bottom, v = e.top, f = 8;
|
|
147
|
-
let h, b;
|
|
148
|
-
a >= t || a > v ? h = e.bottom + f : h = e.top - t - f, b = e.left;
|
|
149
|
-
const O = 256;
|
|
150
|
-
b + O > window.innerWidth && (b = window.innerWidth - O - 16), b < 16 && (b = 16), F.value = {
|
|
151
|
-
top: `${h}px`,
|
|
152
|
-
left: `${b}px`
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
async function ne() {
|
|
156
|
-
r.disabled || (m.value = !m.value, m.value && await R());
|
|
157
|
-
}
|
|
158
|
-
function A() {
|
|
159
|
-
m.value = !1;
|
|
160
|
-
}
|
|
161
|
-
function ae() {
|
|
162
|
-
i.value === 0 ? (i.value = 11, u.value--) : i.value--;
|
|
163
|
-
}
|
|
164
|
-
function re() {
|
|
165
|
-
i.value === 11 ? (i.value = 0, u.value++) : i.value++;
|
|
166
|
-
}
|
|
167
|
-
function j(n) {
|
|
168
|
-
if ($(n)) return;
|
|
169
|
-
const e = new Date(u.value, i.value, n);
|
|
170
|
-
L(e) && (c.value = e, P(e), setTimeout(() => {
|
|
171
|
-
r.enableTime || (m.value = !1);
|
|
172
|
-
}, 150));
|
|
173
|
-
}
|
|
174
|
-
function P(n) {
|
|
175
|
-
const e = n.getFullYear(), t = String(n.getMonth() + 1).padStart(2, "0"), a = String(n.getDate()).padStart(2, "0");
|
|
176
|
-
if (!r.enableTime) {
|
|
177
|
-
y("update:modelValue", `${e}-${t}-${a}`);
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const [v = "00", f = "00"] = k.value.split(":"), h = `${e}-${t}-${a}T${v}:${f}`;
|
|
181
|
-
y("update:modelValue", h);
|
|
182
|
-
}
|
|
183
|
-
function oe() {
|
|
184
|
-
i.value = g.getMonth(), u.value = g.getFullYear(), j(g.getDate());
|
|
185
|
-
}
|
|
186
|
-
function ie() {
|
|
187
|
-
c.value = null, k.value = "00:00", D.value = !1, y("update:modelValue", ""), y("validation-error", null);
|
|
188
|
-
}
|
|
189
|
-
_(() => r.modelValue, (n) => {
|
|
190
|
-
if (n) {
|
|
191
|
-
const e = S(n);
|
|
192
|
-
if (e) {
|
|
193
|
-
c.value = e;
|
|
194
|
-
const t = String(e.getHours()).padStart(2, "0"), a = String(e.getMinutes()).padStart(2, "0");
|
|
195
|
-
k.value = `${t}:${a}`, i.value = e.getMonth(), u.value = e.getFullYear(), L(e);
|
|
196
|
-
}
|
|
197
|
-
} else
|
|
198
|
-
c.value = null, D.value = !1;
|
|
199
|
-
}, { immediate: !0 }), _(k, (n) => {
|
|
200
|
-
if (!r.enableTime || !c.value) return;
|
|
201
|
-
const [e = "00", t = "00"] = (n || "00:00").split(":");
|
|
202
|
-
c.value.setHours(parseInt(e, 10) || 0, parseInt(t, 10) || 0, 0, 0), P(c.value);
|
|
203
|
-
});
|
|
204
|
-
function q() {
|
|
205
|
-
m.value && R();
|
|
206
|
-
}
|
|
207
|
-
function W(n) {
|
|
208
|
-
n.key === "Escape" && m.value && A();
|
|
209
|
-
}
|
|
210
|
-
return le(() => {
|
|
211
|
-
document.addEventListener("keydown", W), window.addEventListener("resize", q);
|
|
212
|
-
}), se(() => {
|
|
213
|
-
document.removeEventListener("keydown", W), window.removeEventListener("resize", q);
|
|
214
|
-
}), (n, e) => (l(), s("div", ge, [
|
|
215
|
-
o("div", be, [
|
|
216
|
-
o("input", {
|
|
217
|
-
id: d.id,
|
|
218
|
-
ref_key: "inputRef",
|
|
219
|
-
ref: Y,
|
|
220
|
-
type: "text",
|
|
221
|
-
value: N.value,
|
|
222
|
-
readonly: "",
|
|
223
|
-
disabled: d.disabled,
|
|
224
|
-
placeholder: d.placeholder,
|
|
225
|
-
required: d.required,
|
|
226
|
-
"aria-describedby": d.ariaDescribedby,
|
|
227
|
-
class: T([
|
|
228
|
-
"w-full px-3 py-2 pr-10 border rounded-md ui-surface ui-text placeholder-slate-400 text-sm ",
|
|
229
|
-
"focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-(--ui-primary) cursor-pointer transition-colors",
|
|
230
|
-
"disabled:bg-(--ui-bg) disabled:text-(--ui-text) disabled:cursor-not-allowed",
|
|
231
|
-
D.value ? "border-(--ui-danger) focus:ring-(--ui-danger) focus:border-(--ui-danger)" : "ui-border"
|
|
232
|
-
]),
|
|
233
|
-
onClick: ne
|
|
234
|
-
}, null, 10, ye),
|
|
235
|
-
e[2] || (e[2] = o("div", { class: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" }, [
|
|
236
|
-
o("svg", {
|
|
237
|
-
class: "w-4 h-4 ui-text",
|
|
238
|
-
fill: "none",
|
|
239
|
-
stroke: "currentColor",
|
|
240
|
-
viewBox: "0 0 24 24"
|
|
241
|
-
}, [
|
|
242
|
-
o("path", {
|
|
243
|
-
"stroke-linecap": "round",
|
|
244
|
-
"stroke-linejoin": "round",
|
|
245
|
-
"stroke-width": "2",
|
|
246
|
-
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
247
|
-
})
|
|
248
|
-
])
|
|
249
|
-
], -1)),
|
|
250
|
-
d.clearable && N.value && !d.disabled ? (l(), s("button", {
|
|
251
|
-
key: 0,
|
|
252
|
-
type: "button",
|
|
253
|
-
class: "absolute right-9 top-1/2 -translate-y-1/2 p-1 hover:bg-(--ui-bg) rounded transition-colors",
|
|
254
|
-
"aria-label": "Clear date",
|
|
255
|
-
onClick: U(ie, ["stop"])
|
|
256
|
-
}, [...e[1] || (e[1] = [
|
|
257
|
-
o("svg", {
|
|
258
|
-
class: "w-3.5 h-3.5 ui-text",
|
|
259
|
-
fill: "none",
|
|
260
|
-
stroke: "currentColor",
|
|
261
|
-
viewBox: "0 0 24 24"
|
|
262
|
-
}, [
|
|
263
|
-
o("path", {
|
|
264
|
-
"stroke-linecap": "round",
|
|
265
|
-
"stroke-linejoin": "round",
|
|
266
|
-
"stroke-width": "2",
|
|
267
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
268
|
-
})
|
|
269
|
-
], -1)
|
|
270
|
-
])])) : M("", !0)
|
|
271
|
-
]),
|
|
272
|
-
(l(), ue(de, { to: "body" }, [
|
|
273
|
-
ce(fe, {
|
|
274
|
-
"enter-active-class": "transition ease-out duration-100",
|
|
275
|
-
"enter-from-class": "transform opacity-0 scale-95",
|
|
276
|
-
"enter-to-class": "transform opacity-100 scale-100",
|
|
277
|
-
"leave-active-class": "transition ease-in duration-75",
|
|
278
|
-
"leave-from-class": "transform opacity-100 scale-100",
|
|
279
|
-
"leave-to-class": "transform opacity-0 scale-95"
|
|
280
|
-
}, {
|
|
281
|
-
default: ve(() => [
|
|
282
|
-
m.value ? (l(), s("div", {
|
|
283
|
-
key: 0,
|
|
284
|
-
ref_key: "calendarRef",
|
|
285
|
-
ref: B,
|
|
286
|
-
style: me(F.value),
|
|
287
|
-
class: T(["fixed z-10000 rounded-lg shadow-xl p-3 ui-surface ui-border-strong", d.enableTime ? "w-[420px]" : "w-64"]),
|
|
288
|
-
onClick: e[0] || (e[0] = U(() => {
|
|
289
|
-
}, ["stop"]))
|
|
290
|
-
}, [
|
|
291
|
-
o("div", {
|
|
292
|
-
class: T(d.enableTime ? "grid grid-cols-[1fr_124px] gap-3" : "block")
|
|
293
|
-
}, [
|
|
294
|
-
o("div", null, [
|
|
295
|
-
o("div", he, [
|
|
296
|
-
o("button", {
|
|
297
|
-
type: "button",
|
|
298
|
-
class: "p-1.5 rounded hover:bg-(--ui-bg) transition-colors",
|
|
299
|
-
"aria-label": "Previous Month",
|
|
300
|
-
onClick: ae
|
|
301
|
-
}, [...e[3] || (e[3] = [
|
|
302
|
-
o("svg", {
|
|
303
|
-
class: "w-4 h-4 ui-text",
|
|
304
|
-
fill: "none",
|
|
305
|
-
stroke: "currentColor",
|
|
306
|
-
viewBox: "0 0 24 24"
|
|
307
|
-
}, [
|
|
308
|
-
o("path", {
|
|
309
|
-
"stroke-linecap": "round",
|
|
310
|
-
"stroke-linejoin": "round",
|
|
311
|
-
"stroke-width": "2",
|
|
312
|
-
d: "M15 18l-6-6 6-6"
|
|
313
|
-
})
|
|
314
|
-
], -1)
|
|
315
|
-
])]),
|
|
316
|
-
o("div", xe, w(K.value) + " " + w(u.value), 1),
|
|
317
|
-
o("button", {
|
|
318
|
-
type: "button",
|
|
319
|
-
class: "p-1.5 rounded hover:bg-(--ui-bg) transition-colors",
|
|
320
|
-
"aria-label": "Next Month",
|
|
321
|
-
onClick: re
|
|
322
|
-
}, [...e[4] || (e[4] = [
|
|
323
|
-
o("svg", {
|
|
324
|
-
class: "w-4 h-4 ui-text",
|
|
325
|
-
fill: "none",
|
|
326
|
-
stroke: "currentColor",
|
|
327
|
-
viewBox: "0 0 24 24"
|
|
328
|
-
}, [
|
|
329
|
-
o("path", {
|
|
330
|
-
"stroke-linecap": "round",
|
|
331
|
-
"stroke-linejoin": "round",
|
|
332
|
-
"stroke-width": "2",
|
|
333
|
-
d: "M9 18l6-6-6-6"
|
|
334
|
-
})
|
|
335
|
-
], -1)
|
|
336
|
-
])])
|
|
337
|
-
]),
|
|
338
|
-
o("div", we, [
|
|
339
|
-
(l(), s(C, null, V(J, (t) => o("div", {
|
|
340
|
-
key: t,
|
|
341
|
-
class: "text-center text-xs font-medium ui-text py-1"
|
|
342
|
-
}, w(t), 1)), 64))
|
|
343
|
-
]),
|
|
344
|
-
o("div", De, [
|
|
345
|
-
(l(!0), s(C, null, V(E.value, (t, a) => (l(), s("div", {
|
|
346
|
-
key: "prev-" + a,
|
|
347
|
-
class: "text-center text-xs ui-text py-1.5"
|
|
348
|
-
}, w(t), 1))), 128)),
|
|
349
|
-
(l(!0), s(C, null, V(I.value, (t) => (l(), s("button", {
|
|
350
|
-
key: t,
|
|
351
|
-
type: "button",
|
|
352
|
-
disabled: $(t),
|
|
353
|
-
class: T([
|
|
354
|
-
"w-8 h-8 rounded text-xs font-medium transition-colors",
|
|
355
|
-
te(t) && !H(t) ? "ui-primary-soft ui-primary ring-1 ring-(--ui-primary)" : "",
|
|
356
|
-
H(t) ? "ui-primary-bg ui-text hover:bg-(--ui-primary)" : "ui-text hover:bg-(--ui-bg)",
|
|
357
|
-
$(t) ? "ui-text cursor-not-allowed hover:bg-transparent line-through" : "cursor-pointer"
|
|
358
|
-
]),
|
|
359
|
-
onClick: (a) => j(t)
|
|
360
|
-
}, w(t), 11, ke))), 128)),
|
|
361
|
-
(l(!0), s(C, null, V(X.value, (t, a) => (l(), s("div", {
|
|
362
|
-
key: "next-" + a,
|
|
363
|
-
class: "text-center text-xs ui-text py-1.5"
|
|
364
|
-
}, w(t), 1))), 128))
|
|
365
|
-
]),
|
|
366
|
-
d.showToday ? (l(), s("div", Se, [
|
|
367
|
-
o("button", {
|
|
368
|
-
type: "button",
|
|
369
|
-
class: "w-full px-3 py-1.5 text-xs font-medium ui-primary hover:bg-(--ui-primary-soft) rounded transition-colors",
|
|
370
|
-
onClick: oe
|
|
371
|
-
}, " Today ")
|
|
372
|
-
])) : M("", !0)
|
|
373
|
-
]),
|
|
374
|
-
d.enableTime ? (l(), s("div", Me, [
|
|
375
|
-
e[5] || (e[5] = o("div", { class: "text-xs font-semibold ui-text mb-2" }, "Time", -1)),
|
|
376
|
-
o("div", Te, [
|
|
377
|
-
(l(!0), s(C, null, V(Z.value, (t) => (l(), s("button", {
|
|
378
|
-
key: t,
|
|
379
|
-
type: "button",
|
|
380
|
-
class: T(["w-full px-2 py-1.5 text-left text-sm rounded transition-colors", t === k.value ? "ui-primary-bg ui-text" : "ui-text hover:bg-(--ui-bg)"]),
|
|
381
|
-
onClick: (a) => k.value = t
|
|
382
|
-
}, w(t), 11, Ce))), 128))
|
|
383
|
-
])
|
|
384
|
-
])) : M("", !0)
|
|
385
|
-
], 2)
|
|
386
|
-
], 6)) : M("", !0)
|
|
387
|
-
]),
|
|
388
|
-
_: 1
|
|
389
|
-
}),
|
|
390
|
-
m.value ? (l(), s("div", {
|
|
391
|
-
key: 0,
|
|
392
|
-
class: "fixed inset-0 z-9999",
|
|
393
|
-
onClick: A
|
|
394
|
-
})) : M("", !0)
|
|
395
|
-
]))
|
|
396
|
-
]));
|
|
397
|
-
}
|
|
398
|
-
};
|
|
1
|
+
import { _ as f } from "../DatePicker.vue_vue_type_script_setup_true_lang-Dx_9f8DO.js";
|
|
399
2
|
export {
|
|
400
|
-
|
|
3
|
+
f as default
|
|
401
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../FormField.vue_vue_type_script_setup_true_lang-FWitIR3U.cjs");exports.default=e._sfc_main;
|
|
@@ -1,190 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cva as v } from "class-variance-authority";
|
|
3
|
-
import { cn as o } from "../utils/cn.js";
|
|
4
|
-
import M from "./DatePicker.js";
|
|
5
|
-
const j = ["for"], H = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "ui-danger ml-1",
|
|
8
|
-
"aria-label": "required"
|
|
9
|
-
}, U = { class: "relative" }, A = ["aria-label"], G = ["id"], J = ["id"], R = {
|
|
10
|
-
__name: "FormField",
|
|
11
|
-
props: {
|
|
12
|
-
label: String,
|
|
13
|
-
description: String,
|
|
14
|
-
error: String,
|
|
15
|
-
success: String,
|
|
16
|
-
helpText: String,
|
|
17
|
-
required: { type: Boolean, default: !1 },
|
|
18
|
-
type: { type: String, default: "text" },
|
|
19
|
-
// Added type prop
|
|
20
|
-
modelValue: [String, Date],
|
|
21
|
-
size: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "md",
|
|
24
|
-
validator: (e) => ["sm", "md", "lg"].includes(e)
|
|
25
|
-
},
|
|
26
|
-
id: String
|
|
27
|
-
},
|
|
28
|
-
emits: ["update:modelValue"],
|
|
29
|
-
setup(e, { emit: k }) {
|
|
30
|
-
const f = e, w = k, S = `field-${Math.random().toString(36).slice(2, 9)}`, i = x(() => `${f.id || S}-${Math.random().toString(36).slice(2, 5)}`), c = x(() => !!f.error), d = E(!1), g = () => {
|
|
31
|
-
d.value = !d.value;
|
|
32
|
-
}, $ = x(() => {
|
|
33
|
-
const l = [];
|
|
34
|
-
return f.error ? l.push(`${i.value}-error`) : f.helpText && l.push(`${i.value}-help`), l.length > 0 ? l.join(" ") : void 0;
|
|
35
|
-
}), q = v("ui-text", {
|
|
36
|
-
variants: {
|
|
37
|
-
size: {
|
|
38
|
-
sm: "space-y-1",
|
|
39
|
-
md: "space-y-2",
|
|
40
|
-
lg: "space-y-3"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
defaultVariants: { size: "md" }
|
|
44
|
-
}), B = v("block ui-text", {
|
|
45
|
-
variants: {
|
|
46
|
-
size: {
|
|
47
|
-
sm: "text-xs font-medium",
|
|
48
|
-
md: "text-sm font-medium",
|
|
49
|
-
lg: "text-base font-medium"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
defaultVariants: { size: "md" }
|
|
53
|
-
}), T = v("ui-text", {
|
|
54
|
-
variants: {
|
|
55
|
-
size: {
|
|
56
|
-
sm: "text-xs",
|
|
57
|
-
md: "text-sm",
|
|
58
|
-
lg: "text-base"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
defaultVariants: { size: "md" }
|
|
62
|
-
}), z = v("flex items-start gap-2", {
|
|
63
|
-
variants: {
|
|
64
|
-
size: {
|
|
65
|
-
sm: "text-xs",
|
|
66
|
-
md: "text-sm",
|
|
67
|
-
lg: "text-sm"
|
|
68
|
-
},
|
|
69
|
-
intent: {
|
|
70
|
-
error: "ui-danger",
|
|
71
|
-
success: "ui-success"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
defaultVariants: { size: "md", intent: "error" }
|
|
75
|
-
}), C = v("ui-text", {
|
|
76
|
-
variants: {
|
|
77
|
-
size: {
|
|
78
|
-
sm: "text-xs",
|
|
79
|
-
md: "text-sm",
|
|
80
|
-
lg: "text-sm"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
defaultVariants: { size: "md" }
|
|
84
|
-
});
|
|
85
|
-
return (l, V) => {
|
|
86
|
-
const y = N("font-awesome-icon");
|
|
87
|
-
return a(), s("div", {
|
|
88
|
-
class: r(t(o)(t(q)({ size: e.size }), l.$attrs.class))
|
|
89
|
-
}, [
|
|
90
|
-
e.label ? (a(), s("label", {
|
|
91
|
-
key: 0,
|
|
92
|
-
for: i.value,
|
|
93
|
-
class: r(t(o)(t(B)({ size: e.size })))
|
|
94
|
-
}, [
|
|
95
|
-
P(m(e.label) + " ", 1),
|
|
96
|
-
e.required ? (a(), s("span", H, "*")) : n("", !0)
|
|
97
|
-
], 10, j)) : n("", !0),
|
|
98
|
-
e.description ? (a(), s("p", {
|
|
99
|
-
key: 1,
|
|
100
|
-
class: r(t(o)(t(T)({ size: e.size })))
|
|
101
|
-
}, m(e.description), 3)) : n("", !0),
|
|
102
|
-
h("div", U, [
|
|
103
|
-
e.type === "date" ? (a(), I(M, {
|
|
104
|
-
key: 0,
|
|
105
|
-
id: i.value,
|
|
106
|
-
"model-value": e.modelValue,
|
|
107
|
-
disabled: !1,
|
|
108
|
-
required: e.required,
|
|
109
|
-
class: r(c.value ? "border-(--ui-danger)" : ""),
|
|
110
|
-
"onUpdate:modelValue": V[0] || (V[0] = (D) => w("update:modelValue", D))
|
|
111
|
-
}, null, 8, ["id", "model-value", "required", "class"])) : F(l.$slots, "default", {
|
|
112
|
-
key: 1,
|
|
113
|
-
fieldId: i.value,
|
|
114
|
-
hasError: c.value,
|
|
115
|
-
ariaDescribedBy: $.value,
|
|
116
|
-
showPassword: d.value,
|
|
117
|
-
togglePasswordVisibility: g
|
|
118
|
-
}),
|
|
119
|
-
e.type === "password" ? (a(), s("button", {
|
|
120
|
-
key: 2,
|
|
121
|
-
type: "button",
|
|
122
|
-
class: "absolute inset-y-0 right-0 pr-3 flex items-center ui-text hover:text-(--ui-text) transition-colors",
|
|
123
|
-
"aria-label": d.value ? "Hide password" : "Show password",
|
|
124
|
-
onClick: g
|
|
125
|
-
}, [
|
|
126
|
-
u(y, {
|
|
127
|
-
icon: d.value ? "eye-slash" : "eye",
|
|
128
|
-
class: "w-4 h-4"
|
|
129
|
-
}, null, 8, ["icon"])
|
|
130
|
-
], 8, A)) : n("", !0)
|
|
131
|
-
]),
|
|
132
|
-
u(b, {
|
|
133
|
-
"enter-active-class": "transition-all duration-200",
|
|
134
|
-
"enter-from-class": "opacity-0 -translate-y-1",
|
|
135
|
-
"enter-to-class": "opacity-100 translate-y-0",
|
|
136
|
-
"leave-active-class": "transition-all duration-150",
|
|
137
|
-
"leave-from-class": "opacity-100 translate-y-0",
|
|
138
|
-
"leave-to-class": "opacity-0 -translate-y-1"
|
|
139
|
-
}, {
|
|
140
|
-
default: p(() => [
|
|
141
|
-
c.value ? (a(), s("div", {
|
|
142
|
-
key: 0,
|
|
143
|
-
id: `${i.value}-error`,
|
|
144
|
-
class: r(t(o)(t(z)({ size: e.size, intent: "error" }))),
|
|
145
|
-
role: "alert",
|
|
146
|
-
"aria-live": "polite"
|
|
147
|
-
}, [
|
|
148
|
-
u(y, {
|
|
149
|
-
icon: "exclamation-triangle",
|
|
150
|
-
class: "w-4 h-4 shrink-0 mt-0.5"
|
|
151
|
-
}),
|
|
152
|
-
h("span", null, m(e.error), 1)
|
|
153
|
-
], 10, G)) : n("", !0)
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
}),
|
|
157
|
-
e.helpText && !c.value ? (a(), s("p", {
|
|
158
|
-
key: 2,
|
|
159
|
-
id: `${i.value}-help`,
|
|
160
|
-
class: r(t(o)(t(C)({ size: e.size })))
|
|
161
|
-
}, m(e.helpText), 11, J)) : n("", !0),
|
|
162
|
-
u(b, {
|
|
163
|
-
"enter-active-class": "transition-all duration-200",
|
|
164
|
-
"enter-from-class": "opacity-0 -translate-y-1",
|
|
165
|
-
"enter-to-class": "opacity-100 translate-y-0",
|
|
166
|
-
"leave-active-class": "transition-all duration-150",
|
|
167
|
-
"leave-from-class": "opacity-100 translate-y-0",
|
|
168
|
-
"leave-to-class": "opacity-0 -translate-y-1"
|
|
169
|
-
}, {
|
|
170
|
-
default: p(() => [
|
|
171
|
-
e.success && !c.value ? (a(), s("div", {
|
|
172
|
-
key: 0,
|
|
173
|
-
class: r(t(o)(t(z)({ size: e.size, intent: "success" })))
|
|
174
|
-
}, [
|
|
175
|
-
u(y, {
|
|
176
|
-
icon: "check",
|
|
177
|
-
class: "w-4 h-4 shrink-0 mt-0.5"
|
|
178
|
-
}),
|
|
179
|
-
h("span", null, m(e.success), 1)
|
|
180
|
-
], 2)) : n("", !0)
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
})
|
|
184
|
-
], 2);
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
};
|
|
1
|
+
import { _ as f } from "../FormField.vue_vue_type_script_setup_true_lang-BljDj5YZ.js";
|
|
188
2
|
export {
|
|
189
|
-
|
|
3
|
+
f as default
|
|
190
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("class-variance-authority"),D=require("../utils/cn.cjs"),m=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs"),y=require("./Select.cjs"),u=require("./Icon.cjs"),$={class:"border-b"},q={key:0,class:"flex items-center gap-3 min-w-64"},A={class:"relative flex-1"},R={class:"relative flex-1"},U={key:1,class:"min-w-40"},L={class:"relative"},M={key:2,class:"min-w-40"},I={class:"relative"},P=["value"],j={key:3,class:"flex items-center gap-2"},G={class:"flex items-center gap-3 ml-auto"},O={class:"flex items-center gap-3 flex-wrap"},H=["onClick"],J={__name:"GraphFilters",props:{showDateFilter:{type:Boolean,default:!0},showChartTypeFilter:{type:Boolean,default:!0},showExport:{type:Boolean,default:!1},showRefresh:{type:Boolean,default:!0},dataSources:{type:Array,default:()=>[]},variant:{type:String,default:"default",validator:o=>["default","minimal","bordered"].includes(o)},padding:{type:String,default:"normal",validator:o=>["compact","normal","comfortable"].includes(o)}},emits:["update:dateFrom","update:dateTo","update:chartType","update:dataSource","export","refresh","clear-filters"],setup(o,{emit:h}){const c=o,i=h,r=e.ref(""),s=e.ref(""),d=e.ref("bar"),n=e.ref(""),g=z.cva("flex flex-wrap items-center gap-4",{variants:{variant:{default:"",minimal:"bg-transparent",bordered:""},padding:{compact:"px-4 py-3",normal:"px-6 py-4",comfortable:"px-8 py-6"}},defaultVariants:{variant:"default",padding:"normal"}}),x=e.computed(()=>r.value||s.value||n.value),p=e.computed(()=>{const l=[];if(r.value||s.value){let t="";r.value&&s.value?t=`${r.value} to ${s.value}`:r.value?t=`From ${r.value}`:s.value&&(t=`Until ${s.value}`),t&&l.push({key:"date",label:"Date Range",value:t,icon:"calendar"})}if(n.value){const t=c.dataSources.find(a=>a.value===n.value);l.push({key:"dataSource",label:"Data Source",value:t?.label||n.value,icon:"database"})}return l}),C=e.computed(()=>D.cn(g({variant:c.variant,padding:c.padding}))),v=e.computed(()=>"w-full pl-10 pr-3 py-2 border ui-border-strong rounded-lg focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-transparent text-sm ui-surface "),f=e.computed(()=>"w-full pr-8 appearance-none border ui-border-strong rounded-lg focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-transparent text-sm py-2 pl-3 ui-surface "),V=e.computed(()=>"ui-text hover:text-(--ui-text) border hover:brightness-105 px-3 py-2 rounded-lg text-sm font-medium transition-all"),k=e.computed(()=>"ui-text ui-primary-bg hover:bg-(--ui-primary-strong) border border-(--ui-primary) px-3 py-2 rounded-lg text-sm font-medium transition-all"),b=e.computed(()=>"ui-text hover:text-(--ui-text) border hover:brightness-105 px-3 py-2 rounded-lg text-sm font-medium transition-all"),N=e.computed(()=>"px-6 py-3 ui-primary-soft border-t border-(--ui-primary-soft)"),B=e.computed(()=>"text-sm font-semibold ui-primary"),w=e.computed(()=>"flex items-center gap-1.5 ui-surface border border-(--ui-primary-soft) ui-primary px-3 py-1.5 rounded-full text-sm font-medium"),E=e.computed(()=>"ui-primary hover:text-(--ui-primary) ml-1 hover:bg-(--ui-primary-soft) rounded-full p-0.5 transition-all"),F=l=>{d.value=l.target.value,i("update:chartType",l.target.value)},S=l=>{n.value=l.target.value,i("update:dataSource",l.target.value)},T=()=>{r.value="",s.value="",n.value="",i("clear-filters")},_=l=>{switch(l){case"date":r.value="",s.value="";break;case"dataSource":n.value="";break}};return e.watch(()=>r.value,l=>{i("update:dateFrom",l)}),e.watch(()=>s.value,l=>{i("update:dateTo",l)}),(l,t)=>(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",{class:e.normalizeClass(C.value)},[o.showDateFilter?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",A,[e.createVNode(u.default,{icon:"calendar",class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>r.value=a),type:"date",class:e.normalizeClass(v.value),placeholder:"From date"},null,2),[[e.vModelText,r.value]])]),t[6]||(t[6]=e.createElementVNode("span",{class:"ui-text text-sm"},"to",-1)),e.createElementVNode("div",R,[e.createVNode(u.default,{icon:"calendar",class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>s.value=a),type:"date",class:e.normalizeClass(v.value),placeholder:"To date"},null,2),[[e.vModelText,s.value]])])])):e.createCommentVNode("",!0),o.showChartTypeFilter?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",L,[e.createVNode(y.default,{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=a=>d.value=a),class:e.normalizeClass(f.value),onChange:F},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createElementVNode("option",{value:"bar"}," Bar Chart ",-1),e.createElementVNode("option",{value:"line"}," Line Chart ",-1),e.createElementVNode("option",{value:"pie"}," Pie Chart ",-1)])]),_:1},8,["modelValue","class"]),e.createVNode(u.default,{icon:"chart-bar",class:"absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text pointer-events-none"})])])):e.createCommentVNode("",!0),o.dataSources.length>0?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",I,[e.createVNode(y.default,{modelValue:n.value,"onUpdate:modelValue":t[3]||(t[3]=a=>n.value=a),class:e.normalizeClass(f.value),onChange:S},{default:e.withCtx(()=>[t[8]||(t[8]=e.createElementVNode("option",{value:""}," All Sources ",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dataSources,a=>(e.openBlock(),e.createElementBlock("option",{key:a.value,value:a.value},e.toDisplayString(a.label),9,P))),128))]),_:1},8,["modelValue","class"]),e.createVNode(u.default,{icon:"database",class:"absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text pointer-events-none"})])])):e.createCommentVNode("",!0),l.$slots.filters?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(l.$slots,"filters")])):e.createCommentVNode("",!0),e.createElementVNode("div",G,[x.value?(e.openBlock(),e.createBlock(m._sfc_main,{key:0,class:e.normalizeClass(V.value),onClick:T},{default:e.withCtx(()=>[e.createVNode(u.default,{icon:"rotate-left",class:"w-4 h-4 mr-2"}),t[9]||(t[9]=e.createTextVNode(" Clear Filters ",-1))]),_:1},8,["class"])):e.createCommentVNode("",!0),o.showExport?(e.openBlock(),e.createBlock(m._sfc_main,{key:1,class:e.normalizeClass(k.value),onClick:t[4]||(t[4]=a=>l.$emit("export"))},{default:e.withCtx(()=>[e.createVNode(u.default,{icon:"download",class:"w-4 h-4 mr-2"}),t[10]||(t[10]=e.createTextVNode(" Export ",-1))]),_:1},8,["class"])):e.createCommentVNode("",!0),o.showRefresh?(e.openBlock(),e.createBlock(m._sfc_main,{key:2,class:e.normalizeClass(b.value),onClick:t[5]||(t[5]=a=>l.$emit("refresh"))},{default:e.withCtx(()=>[e.createVNode(u.default,{icon:"sync",class:"w-4 h-4 mr-2"}),t[11]||(t[11]=e.createTextVNode(" Refresh ",-1))]),_:1},8,["class"])):e.createCommentVNode("",!0)])],2),p.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(N.value)},[e.createElementVNode("div",O,[e.createElementVNode("span",{class:e.normalizeClass(B.value)},"Active filters:",2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.key,class:e.normalizeClass(w.value)},[e.createVNode(u.default,{icon:a.icon,class:"w-3 h-3"},null,8,["icon"]),e.createElementVNode("span",null,e.toDisplayString(a.label)+": "+e.toDisplayString(a.value),1),e.createElementVNode("button",{class:e.normalizeClass(E.value),onClick:K=>_(a.key)},[e.createVNode(u.default,{icon:"circle-xmark",class:"w-3 h-3"})],10,H)],2))),128))])],2)):e.createCommentVNode("",!0)]))}};exports.default=J;
|