@krosoft/react 0.0.356 → 0.0.357
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 +17 -0
- package/dist/{AppActions-DNYn0HUi.js → AppActions-DhI7gUdH.js} +9 -9
- package/dist/{AppSubTitle-DG0JQO_2.js → AppSubTitle-Il_qgP4I.js} +2 -2
- package/dist/{AppTitle-BmIuUBxu.js → AppTitle-Dcz860yY.js} +1 -1
- package/dist/{ErrorAlert-DssOWPCS.js → ErrorAlert-B6v1MVRR.js} +1 -1
- package/dist/{GenericForm-0RClRCcd.js → GenericForm-CH6e_xTW.js} +22 -22
- package/dist/{ImageInput-CPOTYevx.js → ImageInput-Dq4RVy4c.js} +2 -2
- package/dist/{MultiSelect-a_kQHMOe.js → MultiSelect-T2G5xVtD.js} +3 -3
- package/dist/{SearchInput-BDlQAl-9.js → SearchInput-CjpiwvDs.js} +4 -4
- package/dist/{behavior-SAdHU_Ew.js → behavior-CSwLI_GG.js} +1 -1
- package/dist/{cards-B3X4sUq3.js → cards-zcPRJrU_.js} +2 -2
- package/dist/{charts-vsA1ZPoV.js → charts-53H0FPPD.js} +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/charts/index.js +1 -1
- package/dist/components/core/dialogs/index.js +3 -3
- package/dist/components/core/filters/index.js +117 -116
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +18 -18
- package/dist/components/core/inputs/index.js +4 -4
- package/dist/components/core/language/index.js +1 -1
- package/dist/components/core/layouts/index.js +8 -8
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/index.js +49 -48
- package/dist/components/core/tabs/index.js +5 -5
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +22 -21
- package/dist/components/ui/index.js +6 -5
- package/dist/{dialogs-BwxuV1sI.js → dialogs-Cc0rZDqp.js} +18 -18
- package/dist/hooks/behavior/index.js +1 -1
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/ui/index.js +4 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/krosoftLocales.d.ts +36 -0
- package/dist/i18n/krosoftLocales.d.ts.map +1 -1
- package/dist/{i18n-IJZY85S7.js → i18n-4vaVzTli.js} +36 -0
- package/dist/{inputs-CFHt4Asu.js → inputs-CCNet0vi.js} +4 -4
- package/dist/{language-C_T5CI5F.js → language-DH9zG-XJ.js} +2 -2
- package/dist/{navbar-B__jqT_n.js → navbar-a8FGZilA.js} +3 -3
- package/dist/pwa/index.js +1 -1
- package/dist/seasonal/SeasonalEffects.d.ts +20 -0
- package/dist/seasonal/SeasonalEffects.d.ts.map +1 -0
- package/dist/seasonal/SeasonalEffectsSettings.d.ts +13 -0
- package/dist/seasonal/SeasonalEffectsSettings.d.ts.map +1 -0
- package/dist/seasonal/index.d.ts +5 -0
- package/dist/seasonal/index.d.ts.map +1 -0
- package/dist/seasonal/index.js +120 -0
- package/dist/seasonal/seasons.d.ts +5 -0
- package/dist/seasonal/seasons.d.ts.map +1 -0
- package/dist/seasonal/useSeasonalEffects.d.ts +25 -0
- package/dist/seasonal/useSeasonalEffects.d.ts.map +1 -0
- package/dist/seasonal/useStoredToggle.d.ts +3 -0
- package/dist/seasonal/useStoredToggle.d.ts.map +1 -0
- package/dist/{sheet-C_t76Ttr.js → sheet-DjBA9WGR.js} +1 -1
- package/dist/{states-DHlx93fV.js → states-CaW0ib8X.js} +2 -2
- package/dist/switch-DzZwmpBG.js +25 -0
- package/dist/{theme-CQeUAOst.js → theme-h2e-zfkV.js} +2 -2
- package/dist/{ui-DkYZe7sQ.js → ui-DdOKgsjM.js} +414 -432
- package/dist/{ui-upSp3vBd.js → ui-DgZ6ZX8o.js} +3 -3
- package/dist/{useDocumentTitle-TS5jFguv.js → useDocumentTitle-BYBTo7Ho.js} +1 -1
- package/dist/{useLanguage-hjza5s3o.js → useLanguage-CKnwpudX.js} +1 -1
- package/dist/{useTheme-dRbDEXab.js → useTheme-8vZc97M6.js} +1 -1
- package/package.json +6 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as e } from "../../../tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import { t } from "../../../i18n-
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
2
|
+
import { t } from "../../../i18n-4vaVzTli.js";
|
|
3
|
+
import { $t as n, Gt as r, Jt as i, Kt as a, Mn as o, Qt as s, Wt as c, Yt as l, n as u, t as d } from "../../../ui-DdOKgsjM.js";
|
|
4
|
+
import { a as f, c as p } from "../../../tooltip-_geGvbS7.js";
|
|
5
|
+
import { a as m, g as h, h as g, l as _, m as v, o as y, p as b, r as x, t as S, u as C } from "../../../sheet-DjBA9WGR.js";
|
|
6
|
+
import { n as w } from "../../../switch-DzZwmpBG.js";
|
|
6
7
|
import { t as T } from "../../../useMobile-pTQ8lWvt.js";
|
|
7
|
-
import { t as E } from "../../../MultiSelect-
|
|
8
|
-
import { i as D, n as O, r as k, t as A } from "../../../SearchInput-
|
|
9
|
-
import "../../../ui-
|
|
8
|
+
import { t as E } from "../../../MultiSelect-T2G5xVtD.js";
|
|
9
|
+
import { i as D, n as O, r as k, t as A } from "../../../SearchInput-CjpiwvDs.js";
|
|
10
|
+
import "../../../ui-DgZ6ZX8o.js";
|
|
10
11
|
import { useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
11
12
|
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
12
13
|
import { getLocale as R } from "@krosoft/core/helpers";
|
|
@@ -17,7 +18,7 @@ var G = (e, t, n, r = {}) => {
|
|
|
17
18
|
let i = String(t), a = r[`${e}_${i}`];
|
|
18
19
|
return a === void 0 ? e.includes("ok") || t === "true" || t === "false" ? n(t === "true" ? "filters.yes" : "filters.no") : i : a;
|
|
19
20
|
};
|
|
20
|
-
function K({ filters: e, onRemoveFilter: n, onClearAll: r, filterLabelKeys: i = {}, optionLabels:
|
|
21
|
+
function K({ filters: e, onRemoveFilter: n, onClearAll: r, filterLabelKeys: i = {}, optionLabels: a = {} }) {
|
|
21
22
|
let { t: s } = t(), c = Object.entries(e).filter(([e, t]) => !(t == null || t === "" || Array.isArray(t) && t.length === 0));
|
|
22
23
|
return c.length === 0 ? null : /* @__PURE__ */ L("div", {
|
|
23
24
|
className: "flex flex-wrap items-center gap-2 mb-4",
|
|
@@ -29,8 +30,8 @@ function K({ filters: e, onRemoveFilter: n, onClearAll: r, filterLabelKeys: i =
|
|
|
29
30
|
c.flatMap(([e, t]) => {
|
|
30
31
|
let r = i[e], c = r === void 0 ? e : s(r);
|
|
31
32
|
if (Array.isArray(t)) return t.map((t) => {
|
|
32
|
-
let r = G(e, t, s,
|
|
33
|
-
return /* @__PURE__ */ L(
|
|
33
|
+
let r = G(e, t, s, a);
|
|
34
|
+
return /* @__PURE__ */ L(o, {
|
|
34
35
|
variant: "secondary",
|
|
35
36
|
className: "flex items-center gap-1 px-3 py-1 bg-primary/10 text-primary border border-primary/20 hover:bg-primary/20",
|
|
36
37
|
children: [
|
|
@@ -47,8 +48,8 @@ function K({ filters: e, onRemoveFilter: n, onClearAll: r, filterLabelKeys: i =
|
|
|
47
48
|
]
|
|
48
49
|
}, `${e}_${String(t)}`);
|
|
49
50
|
});
|
|
50
|
-
let l = G(e, t, s,
|
|
51
|
-
return /* @__PURE__ */ L(
|
|
51
|
+
let l = G(e, t, s, a);
|
|
52
|
+
return /* @__PURE__ */ L(o, {
|
|
52
53
|
variant: "secondary",
|
|
53
54
|
className: "flex items-center gap-1 px-3 py-1 bg-primary/10 text-primary border border-primary/20 hover:bg-primary/20",
|
|
54
55
|
children: [
|
|
@@ -78,14 +79,14 @@ function K({ filters: e, onRemoveFilter: n, onClearAll: r, filterLabelKeys: i =
|
|
|
78
79
|
var q = ({ field: e, value: n, onChange: r, onToggleMultiSelect: i }) => {
|
|
79
80
|
let { t: a } = t();
|
|
80
81
|
switch (e.type) {
|
|
81
|
-
case "text": return /* @__PURE__ */ I(
|
|
82
|
+
case "text": return /* @__PURE__ */ I(h, {
|
|
82
83
|
placeholder: e.placeholder,
|
|
83
84
|
value: n ?? "",
|
|
84
85
|
onChange: (e) => {
|
|
85
86
|
r(e.target.value);
|
|
86
87
|
}
|
|
87
88
|
});
|
|
88
|
-
case "number": return /* @__PURE__ */ I(
|
|
89
|
+
case "number": return /* @__PURE__ */ I(h, {
|
|
89
90
|
type: "number",
|
|
90
91
|
placeholder: e.placeholder,
|
|
91
92
|
value: n ?? "",
|
|
@@ -128,51 +129,51 @@ var q = ({ field: e, value: n, onChange: r, onToggleMultiSelect: i }) => {
|
|
|
128
129
|
default: return null;
|
|
129
130
|
}
|
|
130
131
|
}, J = (e) => !(e == null || e === "" || Array.isArray(e) && e.length === 0);
|
|
131
|
-
function Y({ sections: e, filters:
|
|
132
|
-
let { t:
|
|
132
|
+
function Y({ sections: e, filters: n, onFiltersChange: r, buttonText: i, sheetTitle: a }) {
|
|
133
|
+
let { t: o } = t(), [s, c] = P(!1), [l, u] = P(n);
|
|
133
134
|
j(() => {
|
|
134
|
-
|
|
135
|
-
}, [
|
|
136
|
-
let
|
|
137
|
-
|
|
135
|
+
u(n);
|
|
136
|
+
}, [n, s]);
|
|
137
|
+
let d = (e, t) => {
|
|
138
|
+
u((n) => ({
|
|
138
139
|
...n,
|
|
139
140
|
[e]: t
|
|
140
141
|
}));
|
|
141
|
-
},
|
|
142
|
-
let n =
|
|
143
|
-
|
|
142
|
+
}, f = (e, t) => {
|
|
143
|
+
let n = l[e], r = Array.isArray(n) ? n : [], i = r.includes(t) ? r.filter((e) => e !== t) : [...r, t];
|
|
144
|
+
d(e, i);
|
|
145
|
+
}, h = () => {
|
|
146
|
+
r(l), c(!1);
|
|
144
147
|
}, g = () => {
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
d({}), i({}), l(!1);
|
|
148
|
-
}, y = M(() => {
|
|
148
|
+
u({}), r({}), c(!1);
|
|
149
|
+
}, v = M(() => {
|
|
149
150
|
let t = new Set(e.flatMap((e) => e.filters.map((e) => e.key)));
|
|
150
|
-
return Object.entries(
|
|
151
|
-
}, [e,
|
|
152
|
-
return /* @__PURE__ */ L(
|
|
153
|
-
open:
|
|
154
|
-
onOpenChange:
|
|
155
|
-
children: [/* @__PURE__ */ I(
|
|
151
|
+
return Object.entries(n).filter(([e, n]) => t.has(e) && J(n)).length;
|
|
152
|
+
}, [e, n]);
|
|
153
|
+
return /* @__PURE__ */ L(S, {
|
|
154
|
+
open: s,
|
|
155
|
+
onOpenChange: c,
|
|
156
|
+
children: [/* @__PURE__ */ I(C, {
|
|
156
157
|
asChild: !0,
|
|
157
|
-
children: /* @__PURE__ */ L(
|
|
158
|
+
children: /* @__PURE__ */ L(p, {
|
|
158
159
|
variant: "outline",
|
|
159
160
|
className: "gap-2",
|
|
160
161
|
children: [
|
|
161
162
|
/* @__PURE__ */ I(B, { className: "size-4 shrink-0" }),
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
i ?? o("filters.more"),
|
|
164
|
+
v > 0 && /* @__PURE__ */ I("span", {
|
|
164
165
|
className: "ml-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-xs font-semibold text-primary-foreground",
|
|
165
|
-
children:
|
|
166
|
+
children: v
|
|
166
167
|
})
|
|
167
168
|
]
|
|
168
169
|
})
|
|
169
|
-
}), /* @__PURE__ */ L(
|
|
170
|
+
}), /* @__PURE__ */ L(x, {
|
|
170
171
|
side: "right",
|
|
171
172
|
className: "w-[400px] sm:w-[500px] flex flex-col p-0",
|
|
172
173
|
children: [
|
|
173
|
-
/* @__PURE__ */ I(
|
|
174
|
+
/* @__PURE__ */ I(y, {
|
|
174
175
|
className: "p-6 pb-0",
|
|
175
|
-
children: /* @__PURE__ */ I(
|
|
176
|
+
children: /* @__PURE__ */ I(_, { children: a ?? o("filters.advanced") })
|
|
176
177
|
}),
|
|
177
178
|
/* @__PURE__ */ I("div", {
|
|
178
179
|
className: "flex-1 overflow-y-auto p-6 pt-6",
|
|
@@ -182,37 +183,37 @@ function Y({ sections: e, filters: r, onFiltersChange: i, buttonText: a, sheetTi
|
|
|
182
183
|
className: "space-y-4",
|
|
183
184
|
children: [/* @__PURE__ */ I("h3", {
|
|
184
185
|
className: "font-semibold text-sm text-foreground border-b pb-2",
|
|
185
|
-
children:
|
|
186
|
+
children: o(e.titleKey)
|
|
186
187
|
}), e.filters.map((e) => /* @__PURE__ */ L("div", {
|
|
187
188
|
className: "space-y-2",
|
|
188
|
-
children: [/* @__PURE__ */ I(
|
|
189
|
+
children: [/* @__PURE__ */ I(w, {
|
|
189
190
|
htmlFor: e.key,
|
|
190
|
-
children:
|
|
191
|
+
children: o(e.labelKey)
|
|
191
192
|
}), /* @__PURE__ */ I(q, {
|
|
192
193
|
field: e,
|
|
193
|
-
value:
|
|
194
|
+
value: l[e.key],
|
|
194
195
|
onChange: (t) => {
|
|
195
|
-
|
|
196
|
+
d(e.key, t);
|
|
196
197
|
},
|
|
197
198
|
onToggleMultiSelect: (t) => {
|
|
198
|
-
|
|
199
|
+
f(e.key, t);
|
|
199
200
|
}
|
|
200
201
|
})]
|
|
201
202
|
}, e.key))]
|
|
202
203
|
}, t))
|
|
203
204
|
})
|
|
204
205
|
}),
|
|
205
|
-
/* @__PURE__ */ L(
|
|
206
|
+
/* @__PURE__ */ L(m, {
|
|
206
207
|
className: "gap-2 p-6 border-t bg-background",
|
|
207
|
-
children: [/* @__PURE__ */ I(
|
|
208
|
+
children: [/* @__PURE__ */ I(p, {
|
|
208
209
|
variant: "outline",
|
|
209
|
-
className: "flex-1",
|
|
210
|
-
onClick: _,
|
|
211
|
-
children: s("filters.clear")
|
|
212
|
-
}), /* @__PURE__ */ I(m, {
|
|
213
210
|
className: "flex-1",
|
|
214
211
|
onClick: g,
|
|
215
|
-
children:
|
|
212
|
+
children: o("filters.clear")
|
|
213
|
+
}), /* @__PURE__ */ I(p, {
|
|
214
|
+
className: "flex-1",
|
|
215
|
+
onClick: h,
|
|
216
|
+
children: o("filters.apply")
|
|
216
217
|
})]
|
|
217
218
|
})
|
|
218
219
|
]
|
|
@@ -267,48 +268,48 @@ function te({ options: e, value: t, onChange: n, variant: r = "solid" }) {
|
|
|
267
268
|
}
|
|
268
269
|
//#endregion
|
|
269
270
|
//#region src/components/core/filters/FiltersMobileDrawer.tsx
|
|
270
|
-
function Q({ children: e, activeFiltersCount:
|
|
271
|
-
let { t:
|
|
272
|
-
return /* @__PURE__ */ L(
|
|
273
|
-
open:
|
|
271
|
+
function Q({ children: e, activeFiltersCount: o = 0, onReset: u, onApply: d }) {
|
|
272
|
+
let { t: f } = t(), [m, h] = P(!1);
|
|
273
|
+
return /* @__PURE__ */ L(c, {
|
|
274
|
+
open: m,
|
|
274
275
|
onOpenChange: h,
|
|
275
|
-
children: [/* @__PURE__ */ I(
|
|
276
|
+
children: [/* @__PURE__ */ I(n, {
|
|
276
277
|
asChild: !0,
|
|
277
|
-
children: /* @__PURE__ */ L(
|
|
278
|
+
children: /* @__PURE__ */ L(p, {
|
|
278
279
|
variant: "outline",
|
|
279
280
|
className: "relative",
|
|
280
281
|
children: [
|
|
281
282
|
/* @__PURE__ */ I(V, { className: "h-4 w-4 mr-2" }),
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
f("filters.filter"),
|
|
284
|
+
o > 0 && /* @__PURE__ */ I("span", {
|
|
284
285
|
className: "absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-xs text-primary-foreground",
|
|
285
|
-
children:
|
|
286
|
+
children: o
|
|
286
287
|
})
|
|
287
288
|
]
|
|
288
289
|
})
|
|
289
|
-
}), /* @__PURE__ */ L(
|
|
290
|
-
/* @__PURE__ */ I(
|
|
290
|
+
}), /* @__PURE__ */ L(a, { children: [
|
|
291
|
+
/* @__PURE__ */ I(l, { children: /* @__PURE__ */ I(s, { children: f("filters.title") }) }),
|
|
291
292
|
/* @__PURE__ */ I("div", {
|
|
292
293
|
className: "flex flex-col gap-4 px-4 pb-4",
|
|
293
294
|
children: e
|
|
294
295
|
}),
|
|
295
|
-
/* @__PURE__ */ L(
|
|
296
|
+
/* @__PURE__ */ L(i, {
|
|
296
297
|
className: "flex-row gap-2",
|
|
297
|
-
children: [/* @__PURE__ */ L(
|
|
298
|
+
children: [/* @__PURE__ */ L(p, {
|
|
298
299
|
variant: "outline",
|
|
299
300
|
onClick: () => {
|
|
300
|
-
|
|
301
|
+
u?.(), h(!1);
|
|
301
302
|
},
|
|
302
303
|
className: "flex-1",
|
|
303
|
-
children: [/* @__PURE__ */ I(H, { className: "h-4 w-4 mr-2" }),
|
|
304
|
-
}), /* @__PURE__ */ I(
|
|
304
|
+
children: [/* @__PURE__ */ I(H, { className: "h-4 w-4 mr-2" }), f("filters.reset")]
|
|
305
|
+
}), /* @__PURE__ */ I(r, {
|
|
305
306
|
asChild: !0,
|
|
306
|
-
children: /* @__PURE__ */ I(
|
|
307
|
+
children: /* @__PURE__ */ I(p, {
|
|
307
308
|
onClick: () => {
|
|
308
|
-
|
|
309
|
+
d?.(), h(!1);
|
|
309
310
|
},
|
|
310
311
|
className: "flex-1",
|
|
311
|
-
children:
|
|
312
|
+
children: f("actions.apply")
|
|
312
313
|
})
|
|
313
314
|
})]
|
|
314
315
|
})
|
|
@@ -344,7 +345,7 @@ function ne({ children: e, search: n, searchPlaceholder: r, activeFiltersCount:
|
|
|
344
345
|
}), e]
|
|
345
346
|
}), a && /* @__PURE__ */ I("div", {
|
|
346
347
|
className: "flex flex-wrap gap-4",
|
|
347
|
-
children: /* @__PURE__ */ L(
|
|
348
|
+
children: /* @__PURE__ */ L(p, {
|
|
348
349
|
variant: "outline",
|
|
349
350
|
onClick: a,
|
|
350
351
|
className: "relative",
|
|
@@ -456,93 +457,93 @@ function re({ searchQuery: e, onSearchChange: n, searchPlaceholder: r, filters:
|
|
|
456
457
|
//#endregion
|
|
457
458
|
//#region src/components/core/filters/ConditionFilter.tsx
|
|
458
459
|
var ie = (e) => e?.requiresValue !== !1;
|
|
459
|
-
function $({ fields:
|
|
460
|
-
let { t:
|
|
461
|
-
e &&
|
|
460
|
+
function $({ fields: n, operators: r, value: i, onChange: a, labelKey: o, icon: s, disabled: c = !1, className: l }) {
|
|
461
|
+
let { t: m } = t(), [_, y] = P(!1), [x, S] = P({ value: "" }), C = i === void 0 ? void 0 : n.find((e) => e.value === i.field), T = i === void 0 ? void 0 : r.find((e) => e.value === i.operator), E = i !== void 0, D = r.find((e) => e.value === x.operator), k = ie(D), A = D?.numeric === !0, j = x.value.trim(), M = k && A && j !== "" && Number.isNaN(Number(j)), N = x.field !== void 0 && D !== void 0 && (!k || j !== "") && !M, R = (e) => {
|
|
462
|
+
e && S(i === void 0 ? { value: "" } : { ...i }), y(e);
|
|
462
463
|
}, B = () => {
|
|
463
|
-
N &&
|
|
464
|
-
field:
|
|
464
|
+
N && x.field !== void 0 && D !== void 0 && (a({
|
|
465
|
+
field: x.field,
|
|
465
466
|
operator: D.value,
|
|
466
467
|
value: k ? j : ""
|
|
467
|
-
}),
|
|
468
|
+
}), y(!1));
|
|
468
469
|
}, V = () => {
|
|
469
|
-
|
|
470
|
-
}, H =
|
|
471
|
-
return /* @__PURE__ */ L(
|
|
472
|
-
open:
|
|
470
|
+
a(void 0), y(!1);
|
|
471
|
+
}, H = m(o === void 0 ? "filters.condition.label" : o);
|
|
472
|
+
return /* @__PURE__ */ L(b, {
|
|
473
|
+
open: _,
|
|
473
474
|
onOpenChange: R,
|
|
474
|
-
children: [/* @__PURE__ */ I(
|
|
475
|
+
children: [/* @__PURE__ */ I(g, {
|
|
475
476
|
asChild: !0,
|
|
476
477
|
children: /* @__PURE__ */ L("button", {
|
|
477
478
|
type: "button",
|
|
478
|
-
disabled:
|
|
479
|
-
className: e(
|
|
479
|
+
disabled: c,
|
|
480
|
+
className: e(f, "inline-flex items-center justify-between gap-1.5 whitespace-nowrap transition-colors", E ? "border-primary bg-primary/10 text-primary" : "hover:bg-muted", !E && "w-full md:w-[200px]", l),
|
|
480
481
|
children: [/* @__PURE__ */ L("span", {
|
|
481
482
|
className: "flex min-w-0 items-center gap-1.5",
|
|
482
|
-
children: [
|
|
483
|
+
children: [s !== void 0 && /* @__PURE__ */ I(s, { className: "size-3.5 shrink-0 opacity-70" }), /* @__PURE__ */ I("span", {
|
|
483
484
|
className: "truncate",
|
|
484
|
-
children:
|
|
485
|
+
children: i === void 0 ? H : /* @__PURE__ */ L(F, { children: [
|
|
485
486
|
H,
|
|
486
487
|
" :",
|
|
487
488
|
" ",
|
|
488
489
|
/* @__PURE__ */ I("span", {
|
|
489
490
|
className: "font-semibold",
|
|
490
|
-
children:
|
|
491
|
+
children: C?.label ?? i.field
|
|
491
492
|
}),
|
|
492
493
|
" ",
|
|
493
|
-
T?.label ??
|
|
494
|
-
|
|
494
|
+
T?.label ?? i.operator,
|
|
495
|
+
i.value !== "" && /* @__PURE__ */ L("span", {
|
|
495
496
|
className: "font-semibold",
|
|
496
|
-
children: [" ",
|
|
497
|
+
children: [" ", i.value]
|
|
497
498
|
})
|
|
498
499
|
] })
|
|
499
500
|
})]
|
|
500
501
|
}), /* @__PURE__ */ L("span", {
|
|
501
502
|
className: "flex shrink-0 items-center gap-1",
|
|
502
|
-
children: [E && !
|
|
503
|
+
children: [E && !c && /* @__PURE__ */ I("span", {
|
|
503
504
|
role: "button",
|
|
504
505
|
tabIndex: -1,
|
|
505
|
-
"aria-label":
|
|
506
|
+
"aria-label": m("filters.condition.clear"),
|
|
506
507
|
onClick: (e) => {
|
|
507
508
|
e.stopPropagation();
|
|
508
509
|
},
|
|
509
510
|
onPointerDown: (e) => {
|
|
510
|
-
e.preventDefault(), e.stopPropagation(),
|
|
511
|
+
e.preventDefault(), e.stopPropagation(), a(void 0);
|
|
511
512
|
},
|
|
512
513
|
className: "opacity-70 hover:opacity-100",
|
|
513
514
|
children: /* @__PURE__ */ I(W, { className: "size-3.5" })
|
|
514
|
-
}), /* @__PURE__ */ I(z, { className: e("size-3.5 opacity-60 transition-transform",
|
|
515
|
+
}), /* @__PURE__ */ I(z, { className: e("size-3.5 opacity-60 transition-transform", _ && "rotate-180") })]
|
|
515
516
|
})]
|
|
516
517
|
})
|
|
517
|
-
}), /* @__PURE__ */ L(
|
|
518
|
+
}), /* @__PURE__ */ L(v, {
|
|
518
519
|
align: "start",
|
|
519
520
|
className: "w-80 space-y-4",
|
|
520
521
|
children: [
|
|
521
522
|
/* @__PURE__ */ L("div", {
|
|
522
523
|
className: "space-y-1.5",
|
|
523
|
-
children: [/* @__PURE__ */ I(
|
|
524
|
-
options:
|
|
525
|
-
value:
|
|
524
|
+
children: [/* @__PURE__ */ I(w, { children: m("filters.condition.field") }), /* @__PURE__ */ I(O, {
|
|
525
|
+
options: n,
|
|
526
|
+
value: x.field,
|
|
526
527
|
onChange: (e) => {
|
|
527
|
-
|
|
528
|
+
S((t) => ({
|
|
528
529
|
...t,
|
|
529
530
|
field: e
|
|
530
531
|
}));
|
|
531
532
|
},
|
|
532
|
-
placeholder:
|
|
533
|
+
placeholder: m("filters.condition.selectField")
|
|
533
534
|
})]
|
|
534
535
|
}),
|
|
535
536
|
/* @__PURE__ */ L("div", {
|
|
536
537
|
className: "space-y-1.5",
|
|
537
|
-
children: [/* @__PURE__ */ I(
|
|
538
|
+
children: [/* @__PURE__ */ I(w, { children: m("filters.condition.operator") }), /* @__PURE__ */ I(d, {
|
|
538
539
|
type: "single",
|
|
539
540
|
variant: "outline",
|
|
540
541
|
size: "sm",
|
|
541
542
|
className: "flex-wrap justify-start",
|
|
542
|
-
value:
|
|
543
|
+
value: x.operator ?? "",
|
|
543
544
|
onValueChange: (e) => {
|
|
544
|
-
|
|
545
|
-
let n =
|
|
545
|
+
S((t) => {
|
|
546
|
+
let n = r.find((t) => t.value === e)?.numeric !== !0 || !Number.isNaN(Number(t.value.trim()));
|
|
546
547
|
return {
|
|
547
548
|
...t,
|
|
548
549
|
operator: e === "" ? void 0 : e,
|
|
@@ -550,7 +551,7 @@ function $({ fields: r, operators: i, value: a, onChange: o, labelKey: s, icon:
|
|
|
550
551
|
};
|
|
551
552
|
});
|
|
552
553
|
},
|
|
553
|
-
children:
|
|
554
|
+
children: r.map((e) => /* @__PURE__ */ I(u, {
|
|
554
555
|
value: e.value,
|
|
555
556
|
title: e.title,
|
|
556
557
|
"aria-label": e.title ?? e.label,
|
|
@@ -562,17 +563,17 @@ function $({ fields: r, operators: i, value: a, onChange: o, labelKey: s, icon:
|
|
|
562
563
|
k && /* @__PURE__ */ L("div", {
|
|
563
564
|
className: "space-y-1.5",
|
|
564
565
|
children: [
|
|
565
|
-
/* @__PURE__ */ I(
|
|
566
|
+
/* @__PURE__ */ I(w, {
|
|
566
567
|
htmlFor: "condition-filter-value",
|
|
567
|
-
children:
|
|
568
|
+
children: m("filters.condition.value")
|
|
568
569
|
}),
|
|
569
|
-
/* @__PURE__ */ I(
|
|
570
|
+
/* @__PURE__ */ I(h, {
|
|
570
571
|
id: "condition-filter-value",
|
|
571
|
-
value:
|
|
572
|
+
value: x.value,
|
|
572
573
|
type: A ? "number" : "text",
|
|
573
574
|
step: "any",
|
|
574
575
|
onChange: (e) => {
|
|
575
|
-
|
|
576
|
+
S((t) => ({
|
|
576
577
|
...t,
|
|
577
578
|
value: e.target.value
|
|
578
579
|
}));
|
|
@@ -586,16 +587,16 @@ function $({ fields: r, operators: i, value: a, onChange: o, labelKey: s, icon:
|
|
|
586
587
|
}),
|
|
587
588
|
/* @__PURE__ */ L("div", {
|
|
588
589
|
className: "flex justify-end gap-2",
|
|
589
|
-
children: [E && /* @__PURE__ */ I(
|
|
590
|
+
children: [E && /* @__PURE__ */ I(p, {
|
|
590
591
|
variant: "ghost",
|
|
591
592
|
size: "sm",
|
|
592
593
|
onClick: V,
|
|
593
|
-
children:
|
|
594
|
-
}), /* @__PURE__ */ I(
|
|
594
|
+
children: m("filters.condition.clear")
|
|
595
|
+
}), /* @__PURE__ */ I(p, {
|
|
595
596
|
size: "sm",
|
|
596
597
|
onClick: B,
|
|
597
598
|
disabled: !N,
|
|
598
|
-
children:
|
|
599
|
+
children: m("filters.condition.apply")
|
|
599
600
|
})]
|
|
600
601
|
})
|
|
601
602
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as GenericForm } from "../../../GenericForm-
|
|
1
|
+
export { t as GenericForm } from "../../../GenericForm-CH6e_xTW.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../../cards-
|
|
2
|
-
import {
|
|
3
|
-
import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-
|
|
4
|
-
import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "../../charts-
|
|
5
|
-
import { t as T } from "../../ErrorAlert-
|
|
6
|
-
import { n as E, r as D, t as O } from "../../dialogs-
|
|
7
|
-
import { t as k } from "../../ImageInput-
|
|
8
|
-
import { t as A } from "../../AppActions-
|
|
9
|
-
import { t as j } from "../../AppSubTitle-
|
|
10
|
-
import { t as M } from "../../MultiSelect-
|
|
11
|
-
import { t as N } from "../../GenericForm-
|
|
12
|
-
import { i as P, n as F, r as I, t as L } from "../../SearchInput-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../cards-zcPRJrU_.js";
|
|
2
|
+
import { F as o } from "../../ui-DdOKgsjM.js";
|
|
3
|
+
import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-DjBA9WGR.js";
|
|
4
|
+
import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "../../charts-53H0FPPD.js";
|
|
5
|
+
import { t as T } from "../../ErrorAlert-B6v1MVRR.js";
|
|
6
|
+
import { n as E, r as D, t as O } from "../../dialogs-Cc0rZDqp.js";
|
|
7
|
+
import { t as k } from "../../ImageInput-Dq4RVy4c.js";
|
|
8
|
+
import { t as A } from "../../AppActions-DhI7gUdH.js";
|
|
9
|
+
import { t as j } from "../../AppSubTitle-Il_qgP4I.js";
|
|
10
|
+
import { t as M } from "../../MultiSelect-T2G5xVtD.js";
|
|
11
|
+
import { t as N } from "../../GenericForm-CH6e_xTW.js";
|
|
12
|
+
import { i as P, n as F, r as I, t as L } from "../../SearchInput-CjpiwvDs.js";
|
|
13
13
|
import { ActiveFilters as R, AdvancedFilters as z, ConditionFilter as B, ConditionFilterGroup as V, FilterField as H, FilterPills as U, FilterPillsGroup as W, FiltersContainer as G, FiltersMobileDrawer as K, TableFilter as q } from "./filters/index.js";
|
|
14
14
|
import "./forms/index.js";
|
|
15
15
|
import { n as J, t as Y } from "../../icons-n0m_1w7z.js";
|
|
16
|
-
import { n as X, t as Z } from "../../inputs-
|
|
17
|
-
import { t as Q } from "../../language-
|
|
18
|
-
import { t as $ } from "../../AppTitle-
|
|
19
|
-
import { n as ee, t as te } from "../../states-
|
|
16
|
+
import { n as X, t as Z } from "../../inputs-CCNet0vi.js";
|
|
17
|
+
import { t as Q } from "../../language-DH9zG-XJ.js";
|
|
18
|
+
import { t as $ } from "../../AppTitle-Dcz860yY.js";
|
|
19
|
+
import { n as ee, t as te } from "../../states-CaW0ib8X.js";
|
|
20
20
|
import { AppPageHeader as ne, KpiCardsLayout as re } from "./layouts/index.js";
|
|
21
|
-
import { a as ie, i as ae, n as oe, o as se, r as ce, t as le } from "../../navbar-
|
|
21
|
+
import { a as ie, i as ae, n as oe, o as se, r as ce, t as le } from "../../navbar-a8FGZilA.js";
|
|
22
22
|
import { DataTable as ue, JsonTableOutput as de, TableActions as fe, TableBody as pe, TableBulkActions as me, TableHeader as he, TablePagination as ge, TableSettings as _e } from "./table/index.js";
|
|
23
23
|
import { AppTabContainer as ve, AppTabHeader as ye, AppTabs as be, AppVerticalTabs as xe } from "./tabs/index.js";
|
|
24
|
-
import { t as Se } from "../../theme-
|
|
24
|
+
import { t as Se } from "../../theme-h2e-zfkV.js";
|
|
25
25
|
export { R as ActiveFilters, z as AdvancedFilters, A as AppActions, D as AppDialog, ne as AppPageHeader, j as AppSubTitle, ve as AppTabContainer, ye as AppTabHeader, be as AppTabs, $ as AppTitle, xe as AppVerticalTabs, v as BarChartHorizontal, C as BarChartVertical, _ as CHART_COLORS, y as ChartCard, S as CircularGauge, B as ConditionFilter, V as ConditionFilterGroup, O as ConfirmationDialog, r as DashboardCard, ue as DataTable, P as DatePicker, I as DateRangePicker, l as Dialog, c as DialogClose, p as DialogContent, g as DialogDescription, s as DialogFooter, h as DialogHeader, d as DialogOverlay, f as DialogPortal, m as DialogTitle, u as DialogTrigger, T as ErrorAlert, ee as ErrorState, X as FileDropzone, H as FilterField, U as FilterPills, W as FilterPillsGroup, G as FiltersContainer, K as FiltersMobileDrawer, J as FlagFrIcon, Y as FlagGbIcon, E as FormDialog, N as GenericForm, se as GlobalSearch, k as ImageInput, de as JsonTableOutput, e as KpiCard, t as KpiCards, re as KpiCardsLayout, Q as LanguageSelector, b as LineChart, te as LoadingState, i as MetricCard, M as MultiSelect, ie as NotificationsBell, w as PieChart, o as Progress, Z as RatingInput, L as SearchInput, ce as Sidebar, oe as SidebarHeader, ae as SidebarNavItem, F as SingleSelect, n as SkeletonCard, a as SkeletonCards, fe as TableActions, pe as TableBody, me as TableBulkActions, q as TableFilter, he as TableHeader, ge as TablePagination, _e as TableSettings, Se as ThemeSelector, le as Topbar, x as getChartColor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../../../ImageInput-
|
|
2
|
-
import { t } from "../../../MultiSelect-
|
|
3
|
-
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-
|
|
4
|
-
import { n as o, t as s } from "../../../inputs-
|
|
1
|
+
import { t as e } from "../../../ImageInput-Dq4RVy4c.js";
|
|
2
|
+
import { t } from "../../../MultiSelect-T2G5xVtD.js";
|
|
3
|
+
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-CjpiwvDs.js";
|
|
4
|
+
import { n as o, t as s } from "../../../inputs-CCNet0vi.js";
|
|
5
5
|
export { n as DatePicker, i as DateRangePicker, o as FileDropzone, e as ImageInput, t as MultiSelect, s as RatingInput, a as SearchInput, r as SingleSelect };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as LanguageSelector } from "../../../language-
|
|
1
|
+
export { t as LanguageSelector } from "../../../language-DH9zG-XJ.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as e } from "../../../i18n-
|
|
2
|
-
import { i as t, t as n } from "../../../cards-
|
|
3
|
-
import "../../../ui-
|
|
1
|
+
import { t as e } from "../../../i18n-4vaVzTli.js";
|
|
2
|
+
import { i as t, t as n } from "../../../cards-zcPRJrU_.js";
|
|
3
|
+
import "../../../ui-DdOKgsjM.js";
|
|
4
4
|
import { c as r } from "../../../tooltip-_geGvbS7.js";
|
|
5
|
-
import { t as i } from "../../../AppActions-
|
|
6
|
-
import { t as a } from "../../../AppSubTitle-
|
|
7
|
-
import { t as o } from "../../../useDocumentTitle-
|
|
8
|
-
import { t as s } from "../../../AppTitle-
|
|
9
|
-
import { n as c } from "../../../states-
|
|
5
|
+
import { t as i } from "../../../AppActions-DhI7gUdH.js";
|
|
6
|
+
import { t as a } from "../../../AppSubTitle-Il_qgP4I.js";
|
|
7
|
+
import { t as o } from "../../../useDocumentTitle-BYBTo7Ho.js";
|
|
8
|
+
import { t as s } from "../../../AppTitle-Dcz860yY.js";
|
|
9
|
+
import { n as c } from "../../../states-CaW0ib8X.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
12
|
import { ArrowLeftIcon as d } from "lucide-react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as GlobalSearch, a as NotificationsBell, r as Sidebar, n as SidebarHeader, i as SidebarNavItem, t as Topbar } from "../../../navbar-
|
|
1
|
+
export { o as GlobalSearch, a as NotificationsBell, r as Sidebar, n as SidebarHeader, i as SidebarNavItem, t as Topbar } from "../../../navbar-a8FGZilA.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../../../ErrorAlert-
|
|
2
|
-
import { n as t, t as n } from "../../../states-
|
|
1
|
+
import { t as e } from "../../../ErrorAlert-B6v1MVRR.js";
|
|
2
|
+
import { n as t, t as n } from "../../../states-CaW0ib8X.js";
|
|
3
3
|
export { e as ErrorAlert, t as ErrorState, n as LoadingState };
|