@krosoft/react 0.0.231 → 0.0.233
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/dist/{AppActions-QHJ6CP5w.js → AppActions-BFwztl-1.js} +2 -2
- package/dist/{AppSubTitle-BlwAxtMX.js → AppSubTitle-BTN0YAc7.js} +1 -1
- package/dist/{AppVerticalTabs-C6MH4a0M.js → AppVerticalTabs-B7XXtAVj.js} +19 -18
- package/dist/{ConfirmationDialog-CK65nSle.js → ConfirmationDialog-Dj4WdnHg.js} +5 -5
- package/dist/{DataTable-DYp_uFEn.js → DataTable-CjrR27Di.js} +3 -3
- package/dist/{ErrorAlert-BIQ2Te6B.js → ErrorAlert-B99Xb_Hg.js} +1 -1
- package/dist/{ErrorState-ZtWe5C0s.js → ErrorState-CkeS_IBT.js} +1 -1
- package/dist/{GenericForm-B7L7NkrE.js → GenericForm-CydibLHU.js} +6 -6
- package/dist/{ImageInput-CBDkCEho.js → ImageInput-DoOOvvth.js} +3 -3
- package/dist/{KpiCardsLayout-CUDfA-AP.js → KpiCardsLayout-Ca6otKVw.js} +5 -5
- package/dist/LanguageSelector-D5Ly1SFC.js +46 -0
- package/dist/{MultiSelect-DWNOCqe1.js → MultiSelect-DbH7LrsD.js} +3 -3
- package/dist/{PieChart-gP2QNrAQ.js → PieChart-uozNJtEx.js} +1 -1
- package/dist/{SearchInput-Dkvaei9K.js → SearchInput-DIZ5Yt6L.js} +4 -4
- package/dist/{SkeletonCards-CQKcSQW3.js → SkeletonCards-B9C4cNMr.js} +2 -2
- package/dist/{TableFilter-BXD7Es8j.js → TableFilter-CmEVF5Bo.js} +25 -25
- package/dist/{ThemeSelector-BtQNjlYA.js → ThemeSelector-DKhn02V2.js} +2 -2
- package/dist/Topbar-CPWjqOBF.js +429 -0
- 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 +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +68 -65
- package/dist/components/core/inputs/index.js +3 -3
- package/dist/components/core/language/LanguageSelector.d.ts +9 -0
- package/dist/components/core/language/LanguageSelector.d.ts.map +1 -0
- package/dist/components/core/language/index.d.ts +3 -0
- package/dist/components/core/language/index.d.ts.map +1 -0
- package/dist/components/core/language/index.js +4 -0
- package/dist/components/core/layouts/index.js +3 -3
- package/dist/components/core/navbar/NotificationsBell.d.ts +64 -0
- package/dist/components/core/navbar/NotificationsBell.d.ts.map +1 -0
- package/dist/components/core/navbar/index.d.ts +2 -0
- package/dist/components/core/navbar/index.d.ts.map +1 -1
- package/dist/components/core/navbar/index.js +5 -4
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +248 -245
- package/dist/components/ui/index.js +104 -104
- package/dist/hooks/behavior/index.js +1 -1
- package/dist/hooks/index.js +16 -14
- package/dist/hooks/ui/index.d.ts +2 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/index.js +17 -15
- package/dist/hooks/ui/useLanguage.d.ts +29 -0
- package/dist/hooks/ui/useLanguage.d.ts.map +1 -0
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/krosoftLocales.d.ts +26 -0
- package/dist/i18n/krosoftLocales.d.ts.map +1 -1
- package/dist/sheet-XYI-ezvY.js +292 -0
- package/dist/{toaster-B1J0puB_.js → toaster-CyzB1m5z.js} +26 -26
- package/dist/{toggle-group-DLLrEwv2.js → toggle-group-iZqnrTj7.js} +519 -566
- package/dist/{useDateFnsLocale-C4oFFUWO.js → useDateFnsLocale-D6VExZ8U.js} +1 -1
- package/dist/useKrosoftTranslation-BTp46G94.js +47 -0
- package/dist/useLanguage-C9jI2nwn.js +19 -0
- package/dist/{usePage-D3WXYmjl.js → usePage-BQm6tdJD.js} +1 -1
- package/dist/{useTheme-DyeQyPDL.js → useTheme-DS6ZjdzM.js} +1 -1
- package/package.json +1 -1
- package/dist/Topbar-DYim779_.js +0 -319
- package/dist/sheet-tuC_C3M3.js +0 -245
- package/dist/useKrosoftTranslation-DtdbUewZ.js +0 -43
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { a3 as u, ah as t, a5 as c, ac as g, a7 as d } from "./toggle-group-
|
|
2
|
+
import { a3 as u, ah as t, a5 as c, ac as g, a7 as d } from "./toggle-group-iZqnrTj7.js";
|
|
3
3
|
import "./alert-B9F1N9Qk.js";
|
|
4
4
|
import "@radix-ui/react-aspect-ratio";
|
|
5
5
|
import { B as p } from "./tooltip-DVeqVwqV.js";
|
|
6
6
|
import "./chart-DntJZGxB.js";
|
|
7
7
|
import "@radix-ui/react-collapsible";
|
|
8
|
-
import "./sheet-
|
|
8
|
+
import "./sheet-XYI-ezvY.js";
|
|
9
9
|
import { MoreVerticalIcon as h } from "lucide-react";
|
|
10
10
|
import "react-resizable-panels";
|
|
11
11
|
import { c as i } from "./tailwind.helper-B6yFEsav.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as l } from "react-i18next";
|
|
3
|
-
import { A as m } from "./AppActions-
|
|
3
|
+
import { A as m } from "./AppActions-BFwztl-1.js";
|
|
4
4
|
function f({ titleKey: s, actions: t, className: o }) {
|
|
5
5
|
const { t: r } = l();
|
|
6
6
|
return /* @__PURE__ */ i("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4", children: [
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { C as w, d as S, a as T } from "./chart-DntJZGxB.js";
|
|
3
|
-
import { A as
|
|
4
|
-
import { A as
|
|
5
|
-
import {
|
|
6
|
-
import { useRef as
|
|
3
|
+
import { A as C } from "./AppActions-BFwztl-1.js";
|
|
4
|
+
import { A as b } from "./AppTitle-D15YXeMx.js";
|
|
5
|
+
import { bd as A, bf as P, bg as k, be as j } from "./toggle-group-iZqnrTj7.js";
|
|
6
|
+
import { useRef as z, useEffect as K } from "react";
|
|
7
7
|
import { useTranslation as g } from "react-i18next";
|
|
8
8
|
import { useSearchParams as y } from "react-router-dom";
|
|
9
|
-
import { c as
|
|
9
|
+
import { c as V } from "./tailwind.helper-B6yFEsav.js";
|
|
10
|
+
import { S as R } from "./sheet-XYI-ezvY.js";
|
|
10
11
|
import { S as q, h as I, i as L, a as H, c as U } from "./select-BpjFWqAY.js";
|
|
11
12
|
import { ConstructionIcon as v } from "lucide-react";
|
|
12
13
|
import "date-fns/locale";
|
|
13
|
-
import { u as D } from "./useKrosoftTranslation-
|
|
14
|
+
import { u as D } from "./useKrosoftTranslation-BTp46G94.js";
|
|
14
15
|
function E({ titleKey: s, descriptionKey: t, actions: c = [], className: l }) {
|
|
15
16
|
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
16
|
-
/* @__PURE__ */ a(
|
|
17
|
-
/* @__PURE__ */ a(
|
|
17
|
+
/* @__PURE__ */ a(b, { titleKey: s, descriptionKey: t, isSubTitle: !0 }),
|
|
18
|
+
/* @__PURE__ */ a(C, { actions: c, className: l })
|
|
18
19
|
] });
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function ae({ titleKey: s, descriptionKey: t, actions: c = [], className: l, children: o, isSubTitle: p }) {
|
|
21
22
|
return /* @__PURE__ */ n(w, { children: [
|
|
22
23
|
/* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(E, { titleKey: s, descriptionKey: t, actions: c, className: l }) }),
|
|
23
24
|
/* @__PURE__ */ a(T, { className: "space-y-4", children: o })
|
|
24
25
|
] });
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function se({ tabs: s, itemId: t, item: c, fit: l }) {
|
|
27
28
|
var d, u;
|
|
28
29
|
const { t: o } = g(), [p, f] = y(), i = p.get("tab"), m = ((d = s.find((e) => e.value === i)) == null ? void 0 : d.value) ?? ((u = s[0]) == null ? void 0 : u.value), x = (e) => {
|
|
29
30
|
const r = new URLSearchParams();
|
|
30
31
|
r.set("tab", e), f(r);
|
|
31
|
-
}, h =
|
|
32
|
-
return
|
|
32
|
+
}, h = z(null);
|
|
33
|
+
return K(() => {
|
|
33
34
|
var r, N;
|
|
34
35
|
const e = (r = h.current) == null ? void 0 : r.querySelector('[data-state="active"]');
|
|
35
36
|
(N = e == null ? void 0 : e.scrollIntoView) == null || N.call(e, { behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
36
37
|
}, [m]), /* @__PURE__ */ n(A, { value: m, onValueChange: x, children: [
|
|
37
|
-
/* @__PURE__ */ a(P, { ref: h, className:
|
|
38
|
+
/* @__PURE__ */ a(P, { ref: h, className: V("w-full justify-start", l && "sm:w-fit"), children: s.map((e) => /* @__PURE__ */ n(k, { value: e.value, className: "gap-2", disabled: e.disabled, children: [
|
|
38
39
|
e.icon ? /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: /* @__PURE__ */ a(e.icon, { className: "size-4" }) }) : null,
|
|
39
40
|
/* @__PURE__ */ a("span", { className: "text-xs sm:text-sm", children: o(e.titleKey) ?? "" }),
|
|
40
41
|
e.count ? /* @__PURE__ */ n("span", { className: "text-gray-500 text-xs", children: [
|
|
@@ -46,7 +47,7 @@ function ae({ tabs: s, itemId: t, item: c, fit: l }) {
|
|
|
46
47
|
s.map((e) => /* @__PURE__ */ a(j, { value: e.value, className: "mt-4", children: e.component ? e.component(t) : null }, e.value))
|
|
47
48
|
] });
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
+
const re = ({ tabs: s, item: t }) => {
|
|
50
51
|
var d, u;
|
|
51
52
|
const { t: c } = g(), { t: l } = D(), [o, p] = y(), f = o.get("tab"), i = ((d = s.find((e) => e.value === f)) == null ? void 0 : d.value) ?? ((u = s[0]) == null ? void 0 : u.value), m = (e) => {
|
|
52
53
|
const r = new URLSearchParams();
|
|
@@ -60,7 +61,7 @@ const se = ({ tabs: s, item: t }) => {
|
|
|
60
61
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-400", children: l("states.comingSoon") })
|
|
61
62
|
] }) }) });
|
|
62
63
|
return /* @__PURE__ */ n("div", { className: "flex flex-col md:flex-row h-full min-w-0 ", children: [
|
|
63
|
-
/* @__PURE__ */ a("div", { className: "w-64 lg:w-80 flex-shrink-0 hidden md:block border-r border-gray-200 dark:border-gray-700 pr-4", children: /* @__PURE__ */ a(
|
|
64
|
+
/* @__PURE__ */ a("div", { className: "w-64 lg:w-80 flex-shrink-0 hidden md:block border-r border-gray-200 dark:border-gray-700 pr-4", children: /* @__PURE__ */ a(R, { className: "h-full", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: s.map((e, r) => /* @__PURE__ */ n(
|
|
64
65
|
"div",
|
|
65
66
|
{
|
|
66
67
|
className: `px-2 py-2 rounded-control text-sm transition-colors flex items-center gap-2 ${e.disabled ? "text-gray-400 cursor-not-allowed opacity-50" : i === e.value ? "crm-color-styled font-medium cursor-pointer" : "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700 cursor-pointer"}`,
|
|
@@ -95,8 +96,8 @@ const se = ({ tabs: s, item: t }) => {
|
|
|
95
96
|
] });
|
|
96
97
|
};
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
ae as A,
|
|
99
100
|
E as a,
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
se as b,
|
|
102
|
+
re as c
|
|
102
103
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import { useTranslation as O } from "react-i18next";
|
|
4
|
-
import { u as R } from "./useKrosoftTranslation-
|
|
5
|
-
import { P as W, d as X, g as $, j, k as q, h as T, i as J, f as Q } from "./toggle-group-
|
|
4
|
+
import { u as R } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import { P as W, d as X, g as $, j, k as q, h as T, i as J, f as Q } from "./toggle-group-iZqnrTj7.js";
|
|
6
6
|
import { A as U, a as V } from "./alert-B9F1N9Qk.js";
|
|
7
7
|
import "@radix-ui/react-aspect-ratio";
|
|
8
8
|
import { B as v } from "./tooltip-DVeqVwqV.js";
|
|
9
9
|
import "./chart-DntJZGxB.js";
|
|
10
10
|
import "@radix-ui/react-collapsible";
|
|
11
|
-
import { D as Y, b as Z, e as _, h as L, c as ee } from "./sheet-
|
|
11
|
+
import { D as Y, b as Z, e as _, h as L, c as ee } from "./sheet-XYI-ezvY.js";
|
|
12
12
|
import { AlertCircleIcon as le, X as S, Save as I, Pen as K } from "lucide-react";
|
|
13
13
|
import "react-resizable-panels";
|
|
14
14
|
import "clsx";
|
|
@@ -17,8 +17,8 @@ import "./select-BpjFWqAY.js";
|
|
|
17
17
|
import "next-themes";
|
|
18
18
|
import "sonner";
|
|
19
19
|
import { useState as A, useEffect as ie } from "react";
|
|
20
|
-
import { G as re } from "./GenericForm-
|
|
21
|
-
import { E as se } from "./ErrorAlert-
|
|
20
|
+
import { G as re } from "./GenericForm-CydibLHU.js";
|
|
21
|
+
import { E as se } from "./ErrorAlert-B99Xb_Hg.js";
|
|
22
22
|
function te({ open: t, onOpenChange: d, config: l, isLoading: u, error: s, children: p }) {
|
|
23
23
|
const { t: i } = O(), { title: b, description: c, icon: f, maxWidth: g = "sm:max-w-xl", actions: n } = l;
|
|
24
24
|
return /* @__PURE__ */ e(Y, { open: t, onOpenChange: d, children: /* @__PURE__ */ r(Z, { className: `${g} max-h-[100dvh] sm:max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
|
|
@@ -2,14 +2,14 @@ import { jsxs as d, jsx as e, Fragment as pe } from "react/jsx-runtime";
|
|
|
2
2
|
import { u as ye, a as xe } from "./useFixedColumns-CKZyu4PD.js";
|
|
3
3
|
import "date-fns/locale";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import { u as K } from "./useKrosoftTranslation-
|
|
6
|
-
import { a3 as J, ah as P, a5 as q, a7 as be, E as Q, a4 as ve } from "./toggle-group-
|
|
5
|
+
import { u as K } from "./useKrosoftTranslation-BTp46G94.js";
|
|
6
|
+
import { a3 as J, ah as P, a5 as q, a7 as be, E as Q, a4 as ve } from "./toggle-group-iZqnrTj7.js";
|
|
7
7
|
import "./alert-B9F1N9Qk.js";
|
|
8
8
|
import "@radix-ui/react-aspect-ratio";
|
|
9
9
|
import { B as k } from "./tooltip-DVeqVwqV.js";
|
|
10
10
|
import "./chart-DntJZGxB.js";
|
|
11
11
|
import "@radix-ui/react-collapsible";
|
|
12
|
-
import "./sheet-
|
|
12
|
+
import "./sheet-XYI-ezvY.js";
|
|
13
13
|
import { MoreVerticalIcon as Ne, Loader2Icon as ke, AlertTriangleIcon as Se, GripVerticalIcon as Ce, ArrowUpIcon as we, ArrowDownIcon as ze, ArrowUpDownIcon as De, ChevronLeftIcon as Ie, ChevronRightIcon as je, SettingsIcon as Ae } from "lucide-react";
|
|
14
14
|
import "react-resizable-panels";
|
|
15
15
|
import "clsx";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as a } from "./useKrosoftTranslation-
|
|
4
|
+
import { u as a } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
5
|
import { A as n, a as c } from "./alert-B9F1N9Qk.js";
|
|
6
6
|
import { AlertTriangle as o } from "lucide-react";
|
|
7
7
|
const x = ({ error: s }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as s } from "./useKrosoftTranslation-
|
|
4
|
+
import { u as s } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
5
|
const n = ({ message: r }) => {
|
|
6
6
|
const { t: e } = s();
|
|
7
7
|
return /* @__PURE__ */ o("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-surface animate-fade-in", children: [
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import { useTranslation as q } from "react-i18next";
|
|
4
|
-
import { u as D } from "./useKrosoftTranslation-
|
|
5
|
-
import { I as J } from "./ImageInput-
|
|
6
|
-
import { A as V } from "./AppSubTitle-
|
|
7
|
-
import { M as L } from "./MultiSelect-
|
|
8
|
-
import { ai as Q, al as X, am as Y, an as $, aj as j, ao as F,
|
|
4
|
+
import { u as D } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import { I as J } from "./ImageInput-DoOOvvth.js";
|
|
6
|
+
import { A as V } from "./AppSubTitle-BTN0YAc7.js";
|
|
7
|
+
import { M as L } from "./MultiSelect-DbH7LrsD.js";
|
|
8
|
+
import { ai as Q, al as X, am as Y, an as $, aj as j, ao as F, bh as ee, E as te } from "./toggle-group-iZqnrTj7.js";
|
|
9
9
|
import "./alert-B9F1N9Qk.js";
|
|
10
10
|
import "@radix-ui/react-aspect-ratio";
|
|
11
11
|
import { B as P } from "./tooltip-DVeqVwqV.js";
|
|
12
12
|
import { C as ae, d as re, a as se } from "./chart-DntJZGxB.js";
|
|
13
13
|
import "@radix-ui/react-collapsible";
|
|
14
|
-
import { I as C } from "./sheet-
|
|
14
|
+
import { I as C } from "./sheet-XYI-ezvY.js";
|
|
15
15
|
import "lucide-react";
|
|
16
16
|
import "react-resizable-panels";
|
|
17
17
|
import { c as i } from "./tailwind.helper-B6yFEsav.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as x } from "./useKrosoftTranslation-
|
|
5
|
-
import "./toggle-group-
|
|
4
|
+
import { u as x } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import "./toggle-group-iZqnrTj7.js";
|
|
6
6
|
import "./alert-B9F1N9Qk.js";
|
|
7
7
|
import "@radix-ui/react-aspect-ratio";
|
|
8
8
|
import { B as N } from "./tooltip-DVeqVwqV.js";
|
|
9
9
|
import "./chart-DntJZGxB.js";
|
|
10
10
|
import "@radix-ui/react-collapsible";
|
|
11
|
-
import "./sheet-
|
|
11
|
+
import "./sheet-XYI-ezvY.js";
|
|
12
12
|
import { XIcon as w, ImageIcon as y, UploadIcon as I } from "lucide-react";
|
|
13
13
|
import "react-resizable-panels";
|
|
14
14
|
import { c as p } from "./tailwind.helper-B6yFEsav.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "./toggle-group-
|
|
2
|
+
import "./toggle-group-iZqnrTj7.js";
|
|
3
3
|
import "./alert-B9F1N9Qk.js";
|
|
4
4
|
import "@radix-ui/react-aspect-ratio";
|
|
5
5
|
import { B as c } from "./tooltip-DVeqVwqV.js";
|
|
6
6
|
import "./chart-DntJZGxB.js";
|
|
7
7
|
import "@radix-ui/react-collapsible";
|
|
8
|
-
import "./sheet-
|
|
8
|
+
import "./sheet-XYI-ezvY.js";
|
|
9
9
|
import { ArrowLeftIcon as l } from "lucide-react";
|
|
10
10
|
import "react-resizable-panels";
|
|
11
11
|
import "clsx";
|
|
@@ -14,14 +14,14 @@ import "./select-BpjFWqAY.js";
|
|
|
14
14
|
import "next-themes";
|
|
15
15
|
import "sonner";
|
|
16
16
|
import "react";
|
|
17
|
-
import { A as f } from "./AppActions-
|
|
17
|
+
import { A as f } from "./AppActions-BFwztl-1.js";
|
|
18
18
|
import { A as d } from "./AppTitle-D15YXeMx.js";
|
|
19
19
|
import { u } from "./useDocumentTitle-WNwdPz-I.js";
|
|
20
20
|
import { useTranslation as g } from "react-i18next";
|
|
21
21
|
import "@krosoft/core/helpers";
|
|
22
|
-
import { b as h, a as x } from "./SkeletonCards-
|
|
22
|
+
import { b as h, a as x } from "./SkeletonCards-B9C4cNMr.js";
|
|
23
23
|
import "date-fns/locale";
|
|
24
|
-
import { E as A } from "./ErrorState-
|
|
24
|
+
import { E as A } from "./ErrorState-CkeS_IBT.js";
|
|
25
25
|
function P({
|
|
26
26
|
icon: t,
|
|
27
27
|
titleKey: i,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "date-fns/locale";
|
|
3
|
+
import "react-i18next";
|
|
4
|
+
import { u } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import { b as h, T as g, c as f, B as v, a as p } from "./tooltip-DVeqVwqV.js";
|
|
6
|
+
import { S as b, h as T, i as N, a as x, c as S } from "./select-BpjFWqAY.js";
|
|
7
|
+
import { u as C } from "./useLanguage-C9jI2nwn.js";
|
|
8
|
+
import { LanguagesIcon as t } from "lucide-react";
|
|
9
|
+
function K({ languageOptions: o, variant: i = "select" }) {
|
|
10
|
+
const { t: r } = u(), { currentLanguageOption: a, nextLanguageOption: c, changeLanguage: n, cycleLanguage: m } = C(o);
|
|
11
|
+
if (i === "mini") {
|
|
12
|
+
const l = (a == null ? void 0 : a.icon) ?? t;
|
|
13
|
+
return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ s(g, { children: [
|
|
14
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ s(
|
|
15
|
+
v,
|
|
16
|
+
{
|
|
17
|
+
variant: "ghost",
|
|
18
|
+
size: "icon",
|
|
19
|
+
onClick: m,
|
|
20
|
+
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ e(l, { className: "size-4" }),
|
|
23
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: r("language.current", { language: (a == null ? void 0 : a.label) ?? "" }) })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
) }),
|
|
27
|
+
/* @__PURE__ */ e(p, { side: "bottom", align: "center", children: r("language.switchTo", { language: (c == null ? void 0 : c.label) ?? "" }) })
|
|
28
|
+
] }) });
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
31
|
+
/* @__PURE__ */ s(b, { value: a == null ? void 0 : a.value, onValueChange: n, children: [
|
|
32
|
+
/* @__PURE__ */ e(T, { className: "w-full", children: /* @__PURE__ */ e(N, { placeholder: r("select.language") }) }),
|
|
33
|
+
/* @__PURE__ */ e(x, { children: o.map((l) => {
|
|
34
|
+
const d = l.icon ?? t;
|
|
35
|
+
return /* @__PURE__ */ e(S, { value: l.value, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
36
|
+
/* @__PURE__ */ e(d, { className: "size-4" }),
|
|
37
|
+
l.label
|
|
38
|
+
] }) }, l.value);
|
|
39
|
+
}) })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: r("language.description") })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
K as L
|
|
46
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as O } from "./useKrosoftTranslation-
|
|
4
|
+
import { u as O } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
5
|
import { useState as L, useRef as T, useMemo as x, useEffect as z } from "react";
|
|
6
|
-
import { E as I } from "./toggle-group-
|
|
6
|
+
import { E as I } from "./toggle-group-iZqnrTj7.js";
|
|
7
7
|
import "./alert-B9F1N9Qk.js";
|
|
8
8
|
import "@radix-ui/react-aspect-ratio";
|
|
9
9
|
import { f as P } from "./tooltip-DVeqVwqV.js";
|
|
10
10
|
import "./chart-DntJZGxB.js";
|
|
11
11
|
import "@radix-ui/react-collapsible";
|
|
12
|
-
import "./sheet-
|
|
12
|
+
import "./sheet-XYI-ezvY.js";
|
|
13
13
|
import { XIcon as q, ChevronDownIcon as S, SearchIcon as F } from "lucide-react";
|
|
14
14
|
import "react-resizable-panels";
|
|
15
15
|
import { c as R } from "./tailwind.helper-B6yFEsav.js";
|
|
@@ -5,7 +5,7 @@ import * as v from "react";
|
|
|
5
5
|
import { BarChart as b, CartesianGrid as M, XAxis as w, YAxis as D, Bar as j, LineChart as O, Line as _, PieChart as $, Pie as E } from "recharts";
|
|
6
6
|
import "date-fns/locale";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import { u as I } from "./useKrosoftTranslation-
|
|
8
|
+
import { u as I } from "./useKrosoftTranslation-BTp46G94.js";
|
|
9
9
|
import { S as G } from "./skeleton-BX4RcsiK.js";
|
|
10
10
|
import { u as z } from "./useMobile-DN1_OMDB.js";
|
|
11
11
|
const L = (t, r) => t ? (n, s) => /* @__PURE__ */ d("div", { className: "flex flex-1 justify-between gap-4", children: [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as M from "react";
|
|
3
3
|
import { useState as S, useRef as G, useEffect as X, useMemo as q } from "react";
|
|
4
|
-
import { C as j
|
|
4
|
+
import { C as j } from "./toggle-group-iZqnrTj7.js";
|
|
5
5
|
import "./alert-B9F1N9Qk.js";
|
|
6
6
|
import "@radix-ui/react-aspect-ratio";
|
|
7
7
|
import { B as v, f as H } from "./tooltip-DVeqVwqV.js";
|
|
8
8
|
import "./chart-DntJZGxB.js";
|
|
9
9
|
import "@radix-ui/react-collapsible";
|
|
10
|
-
import { C as J, m as Q, o as U, k as W, l as Y, n as T, I as Z } from "./sheet-
|
|
10
|
+
import { P as E, s as R, r as _, C as J, m as Q, o as U, k as W, l as Y, n as T, I as Z } from "./sheet-XYI-ezvY.js";
|
|
11
11
|
import { CalendarIcon as O, XIcon as I, ChevronDownIcon as ee, CheckIcon as te, PlusIcon as re, SearchIcon as oe } from "lucide-react";
|
|
12
12
|
import "react-resizable-panels";
|
|
13
13
|
import { c as g } from "./tailwind.helper-B6yFEsav.js";
|
|
@@ -15,9 +15,9 @@ import "./select-BpjFWqAY.js";
|
|
|
15
15
|
import "next-themes";
|
|
16
16
|
import "sonner";
|
|
17
17
|
import { format as x } from "date-fns";
|
|
18
|
-
import { u as V } from "./useDateFnsLocale-
|
|
18
|
+
import { u as V } from "./useDateFnsLocale-D6VExZ8U.js";
|
|
19
19
|
import "react-i18next";
|
|
20
|
-
import { u as P } from "./useKrosoftTranslation-
|
|
20
|
+
import { u as P } from "./useKrosoftTranslation-BTp46G94.js";
|
|
21
21
|
import "date-fns/locale";
|
|
22
22
|
const ze = ({ date: r, onDateChange: l, placeholder: p }) => {
|
|
23
23
|
const f = V(), [a, c] = S(!1), d = G(null);
|
|
@@ -2,13 +2,13 @@ import { jsxs as s, jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { formatNumber as g } from "@krosoft/core/helpers";
|
|
3
3
|
import { useTranslation as b } from "react-i18next";
|
|
4
4
|
import { c as m } from "./tailwind.helper-B6yFEsav.js";
|
|
5
|
-
import "./toggle-group-
|
|
5
|
+
import "./toggle-group-iZqnrTj7.js";
|
|
6
6
|
import "./alert-B9F1N9Qk.js";
|
|
7
7
|
import "@radix-ui/react-aspect-ratio";
|
|
8
8
|
import "./tooltip-DVeqVwqV.js";
|
|
9
9
|
import { C as c, d as p, e as v, a as h } from "./chart-DntJZGxB.js";
|
|
10
10
|
import "@radix-ui/react-collapsible";
|
|
11
|
-
import "./sheet-
|
|
11
|
+
import "./sheet-XYI-ezvY.js";
|
|
12
12
|
import "lucide-react";
|
|
13
13
|
import "react-resizable-panels";
|
|
14
14
|
import "./select-BpjFWqAY.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as
|
|
5
|
-
import { useState as C, useEffect as O, useMemo as
|
|
6
|
-
import { a as z, D as I, b as $, S as B } from "./SearchInput-
|
|
4
|
+
import { u as S } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import { useState as C, useEffect as O, useMemo as w } from "react";
|
|
6
|
+
import { a as z, D as I, b as $, S as B } from "./SearchInput-DIZ5Yt6L.js";
|
|
7
7
|
import { getLocale as Q } from "@krosoft/core/helpers";
|
|
8
|
-
import { B as E, aw as V,
|
|
8
|
+
import { B as E, aw as V, E as P } from "./toggle-group-iZqnrTj7.js";
|
|
9
9
|
import "./alert-B9F1N9Qk.js";
|
|
10
10
|
import "@radix-ui/react-aspect-ratio";
|
|
11
|
-
import { B as F, e as
|
|
11
|
+
import { B as F, e as _ } from "./tooltip-DVeqVwqV.js";
|
|
12
12
|
import "./chart-DntJZGxB.js";
|
|
13
13
|
import "@radix-ui/react-collapsible";
|
|
14
|
-
import { I as L,
|
|
14
|
+
import { I as L, u as R, F as H, w as K, z as X, E as G, y as J, P as U, s as W, r as Y } from "./sheet-XYI-ezvY.js";
|
|
15
15
|
import { XIcon as T, Filter as Z, ChevronDown as q, Search as ee } from "lucide-react";
|
|
16
16
|
import "react-resizable-panels";
|
|
17
17
|
import "clsx";
|
|
@@ -20,7 +20,7 @@ import { S as re, h as te, i as le, a as ae, c as se } from "./select-BpjFWqAY.j
|
|
|
20
20
|
import "next-themes";
|
|
21
21
|
import "sonner";
|
|
22
22
|
import { c as j } from "./tailwind.helper-B6yFEsav.js";
|
|
23
|
-
import { M as ne } from "./MultiSelect-
|
|
23
|
+
import { M as ne } from "./MultiSelect-DbH7LrsD.js";
|
|
24
24
|
const D = (a, n, c, i = {}) => {
|
|
25
25
|
if (n instanceof Date)
|
|
26
26
|
return n.toLocaleDateString(Q());
|
|
@@ -28,7 +28,7 @@ const D = (a, n, c, i = {}) => {
|
|
|
28
28
|
return o !== void 0 ? o : a.includes("ok") || n === "true" || n === "false" ? c(n === "true" ? "filters.yes" : "filters.no") : d;
|
|
29
29
|
};
|
|
30
30
|
function ce({ filters: a, onRemoveFilter: n, onClearAll: c, filterLabels: i = {}, optionLabels: d = {} }) {
|
|
31
|
-
const { t: o } =
|
|
31
|
+
const { t: o } = S(), h = Object.entries(a).filter(([p, m]) => !(m == null || m === "" || Array.isArray(m) && m.length === 0));
|
|
32
32
|
return h.length === 0 ? null : /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-2 mb-4", children: [
|
|
33
33
|
/* @__PURE__ */ r("span", { className: "text-sm text-gray-600 font-medium", children: "Filtres actifs :" }),
|
|
34
34
|
h.flatMap(([p, m]) => {
|
|
@@ -87,7 +87,7 @@ const oe = ({
|
|
|
87
87
|
onToggleMultiSelect: i
|
|
88
88
|
}) => {
|
|
89
89
|
var o;
|
|
90
|
-
const { t: d } =
|
|
90
|
+
const { t: d } = S();
|
|
91
91
|
switch (a.type) {
|
|
92
92
|
case "text":
|
|
93
93
|
return /* @__PURE__ */ r(
|
|
@@ -159,7 +159,7 @@ function de({
|
|
|
159
159
|
buttonText: i,
|
|
160
160
|
sheetTitle: d
|
|
161
161
|
}) {
|
|
162
|
-
const { t: o } =
|
|
162
|
+
const { t: o } = S(), [h, p] = C(!1), [m, b] = C(n);
|
|
163
163
|
O(() => {
|
|
164
164
|
b(n);
|
|
165
165
|
}, [n, h]);
|
|
@@ -172,18 +172,18 @@ function de({
|
|
|
172
172
|
c(m), p(!1);
|
|
173
173
|
}, v = () => {
|
|
174
174
|
b({}), c({}), p(!1);
|
|
175
|
-
}, N =
|
|
175
|
+
}, N = w(() => {
|
|
176
176
|
const l = new Set(a.flatMap((e) => e.filters.map((t) => t.key)));
|
|
177
177
|
return Object.entries(n).filter(([e, t]) => l.has(e) && ie(t)).length;
|
|
178
178
|
}, [a, n]);
|
|
179
|
-
return /* @__PURE__ */ u(
|
|
180
|
-
/* @__PURE__ */ r(
|
|
179
|
+
return /* @__PURE__ */ u(R, { open: h, onOpenChange: p, children: [
|
|
180
|
+
/* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ u(F, { variant: "outline", className: "gap-2", children: [
|
|
181
181
|
/* @__PURE__ */ r(Z, { className: "size-4 shrink-0" }),
|
|
182
182
|
i ?? o("filters.more"),
|
|
183
183
|
N > 0 && /* @__PURE__ */ r("span", { 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", children: N })
|
|
184
184
|
] }) }),
|
|
185
|
-
/* @__PURE__ */ u(
|
|
186
|
-
/* @__PURE__ */ r(
|
|
185
|
+
/* @__PURE__ */ u(K, { side: "right", className: "w-[400px] sm:w-[500px] flex flex-col p-0", children: [
|
|
186
|
+
/* @__PURE__ */ r(X, { className: "p-6 pb-0", children: /* @__PURE__ */ r(G, { children: d ?? o("filters.advanced") }) }),
|
|
187
187
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto p-6 pt-6", children: /* @__PURE__ */ r("div", { className: "space-y-6", children: a.map((l, e) => /* @__PURE__ */ u("div", { className: "space-y-4", children: [
|
|
188
188
|
/* @__PURE__ */ r("h3", { className: "font-semibold text-sm text-gray-900 dark:text-gray-100 border-b pb-2", children: l.title }),
|
|
189
189
|
l.filters.map((t) => /* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
@@ -203,7 +203,7 @@ function de({
|
|
|
203
203
|
)
|
|
204
204
|
] }, t.key))
|
|
205
205
|
] }, e)) }) }),
|
|
206
|
-
/* @__PURE__ */ u(
|
|
206
|
+
/* @__PURE__ */ u(J, { className: "gap-2 p-6 border-t bg-white dark:bg-gray-950", children: [
|
|
207
207
|
/* @__PURE__ */ r(F, { variant: "outline", className: "flex-1", onClick: v, children: "Effacer les filtres" }),
|
|
208
208
|
/* @__PURE__ */ r(F, { className: "flex-1 bg-orange-500 hover:bg-orange-600 text-white", onClick: f, children: "Rechercher" })
|
|
209
209
|
] })
|
|
@@ -220,7 +220,7 @@ function ue({
|
|
|
220
220
|
searchable: h = !1,
|
|
221
221
|
searchPlaceholder: p
|
|
222
222
|
}) {
|
|
223
|
-
const { t: m } =
|
|
223
|
+
const { t: m } = S(), [b, x] = C(""), y = c.length > 0, f = w(() => b === "" ? n : n.filter((l) => l.label.toLowerCase().includes(b.toLowerCase())), [n, b]), v = w(() => f.length === 0 ? !1 : f.every((l) => c.includes(l.value)), [f, c]), N = () => {
|
|
224
224
|
if (v)
|
|
225
225
|
if (o !== void 0) {
|
|
226
226
|
const l = f.map((t) => t.value), e = c.filter((t) => !l.includes(t));
|
|
@@ -239,17 +239,17 @@ function ue({
|
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
241
|
return /* @__PURE__ */ u(
|
|
242
|
-
|
|
242
|
+
U,
|
|
243
243
|
{
|
|
244
244
|
onOpenChange: () => {
|
|
245
245
|
x("");
|
|
246
246
|
},
|
|
247
247
|
children: [
|
|
248
|
-
/* @__PURE__ */ r(
|
|
248
|
+
/* @__PURE__ */ r(W, { asChild: !0, children: /* @__PURE__ */ u(
|
|
249
249
|
"button",
|
|
250
250
|
{
|
|
251
251
|
className: j(
|
|
252
|
-
|
|
252
|
+
_,
|
|
253
253
|
"inline-flex items-center gap-1.5 whitespace-nowrap transition-colors",
|
|
254
254
|
y ? "border-primary bg-primary/10 text-primary font-medium" : "hover:bg-muted"
|
|
255
255
|
),
|
|
@@ -260,7 +260,7 @@ function ue({
|
|
|
260
260
|
]
|
|
261
261
|
}
|
|
262
262
|
) }),
|
|
263
|
-
/* @__PURE__ */ u(
|
|
263
|
+
/* @__PURE__ */ u(Y, { className: "w-56 p-0", align: "start", children: [
|
|
264
264
|
h ? /* @__PURE__ */ r("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ u("div", { className: "relative", children: [
|
|
265
265
|
/* @__PURE__ */ r(ee, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
266
266
|
/* @__PURE__ */ r(
|
|
@@ -323,7 +323,7 @@ function Oe({
|
|
|
323
323
|
advancedButtonText: h = "Filtres",
|
|
324
324
|
sheetTitle: p
|
|
325
325
|
}) {
|
|
326
|
-
const { t: m } =
|
|
326
|
+
const { t: m } = S(), b = (e, t) => {
|
|
327
327
|
const s = i[e], g = Array.isArray(s) ? s : [], A = g.includes(t) ? g.filter((M) => M !== t) : [...g, t], k = { ...i };
|
|
328
328
|
A.length === 0 ? delete k[e] : k[e] = A, d(k);
|
|
329
329
|
}, x = (e) => {
|
|
@@ -334,7 +334,7 @@ function Oe({
|
|
|
334
334
|
}, f = (e, t) => {
|
|
335
335
|
const s = { ...i }, g = s[e];
|
|
336
336
|
Array.isArray(g) && t !== void 0 ? (s[e] = g.filter((A) => A !== t), Array.isArray(s[e]) && s[e].length === 0 && delete s[e]) : delete s[e], d(s);
|
|
337
|
-
}, v =
|
|
337
|
+
}, v = w(() => {
|
|
338
338
|
const e = [];
|
|
339
339
|
return o.forEach((t) => {
|
|
340
340
|
t.filters.forEach((s) => {
|
|
@@ -347,14 +347,14 @@ function Oe({
|
|
|
347
347
|
});
|
|
348
348
|
});
|
|
349
349
|
}), e;
|
|
350
|
-
}, [o]), N =
|
|
350
|
+
}, [o]), N = w(() => {
|
|
351
351
|
const e = {};
|
|
352
352
|
return o.forEach((t) => {
|
|
353
353
|
t.filters.forEach((s) => {
|
|
354
354
|
e[s.key] = s.badgeLabel ?? s.label;
|
|
355
355
|
});
|
|
356
356
|
}), e;
|
|
357
|
-
}, [o]), l =
|
|
357
|
+
}, [o]), l = w(() => {
|
|
358
358
|
const e = {};
|
|
359
359
|
return o.forEach((t) => {
|
|
360
360
|
t.filters.forEach((s) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as h } from "./useKrosoftTranslation-
|
|
4
|
+
import { u as h } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
5
|
import { b as u, T as g, c as f, B as v, a as b } from "./tooltip-DVeqVwqV.js";
|
|
6
6
|
import { S as p, h as N, i as T, a as x, c as C } from "./select-BpjFWqAY.js";
|
|
7
|
-
import { u as S } from "./useTheme-
|
|
7
|
+
import { u as S } from "./useTheme-DS6ZjdzM.js";
|
|
8
8
|
function k({ themeOptions: c, variant: t = "select" }) {
|
|
9
9
|
const { t: o } = h(), { theme: i, handleThemeChange: n, currentThemeOption: e, nextThemeOption: r, cycleTheme: m } = S(c);
|
|
10
10
|
if (t === "mini") {
|