@krosoft/react 0.0.312 → 0.0.314
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-BSFD13aV.js → AppActions-D4phryLI.js} +2 -2
- package/dist/{AppSubTitle-CVNe5WHv.js → AppSubTitle-C4OXWXqx.js} +2 -2
- package/dist/{AppTitle-DIHE8uen.js → AppTitle-ky6qG29Z.js} +1 -1
- package/dist/{ErrorAlert-D8XnPN0I.js → ErrorAlert-ZflPwfL1.js} +1 -1
- package/dist/{GenericForm-Dcn4Xecn.js → GenericForm-B-HE6wx0.js} +6 -6
- package/dist/{ImageInput-BtV_Ezgp.js → ImageInput-pfEyse5s.js} +2 -2
- package/dist/{MultiSelect-DyHOoUsz.js → MultiSelect-BWpBLiI-.js} +3 -3
- package/dist/{SearchInput-KPozEk_s.js → SearchInput-TWh8dk0Q.js} +4 -4
- package/dist/behavior-DOkq-VaE.js +201 -0
- package/dist/{cards-pQZw-utJ.js → cards-9ND39VtI.js} +2 -2
- package/dist/{charts-Oxpbp_Ii.js → charts-Dqw9_J2o.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 +6 -6
- 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/GlobalSearch.d.ts +19 -1
- package/dist/components/core/navbar/GlobalSearch.d.ts.map +1 -1
- 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 +2 -2
- package/dist/components/core/tabs/index.js +5 -5
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +18 -18
- package/dist/components/ui/index.js +2 -2
- package/dist/{dialogs-BLrrt68D.js → dialogs-DM3SIHMD.js} +5 -5
- package/dist/hooks/behavior/index.d.ts +2 -0
- package/dist/hooks/behavior/index.d.ts.map +1 -1
- package/dist/hooks/behavior/index.js +2 -2
- package/dist/hooks/behavior/useDebounce.d.ts +7 -0
- package/dist/hooks/behavior/useDebounce.d.ts.map +1 -0
- package/dist/hooks/behavior/useTable.d.ts +31 -0
- package/dist/hooks/behavior/useTable.d.ts.map +1 -0
- package/dist/hooks/index.js +6 -6
- package/dist/hooks/ui/index.js +4 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/krosoftLocales.d.ts +4 -0
- package/dist/i18n/krosoftLocales.d.ts.map +1 -1
- package/dist/{i18n-ClZK4zll.js → i18n-COxm2IKP.js} +6 -2
- package/dist/{inputs-c7vMvV76.js → inputs-BF_gkzmN.js} +3 -3
- package/dist/{language-VKGAsAfF.js → language-CX5k4uX5.js} +2 -2
- package/dist/{navbar-C4WWdADW.js → navbar-Ce8pq_3-.js} +88 -53
- package/dist/pwa/index.js +1 -1
- package/dist/{sheet-BjlRzLnc.js → sheet-B7qGvwk0.js} +1 -1
- package/dist/{states-C3v4BU7N.js → states-14gCg2Sl.js} +2 -2
- package/dist/{theme-Bkamu5J6.js → theme-BUl4fbtL.js} +2 -2
- package/dist/{ui-Bbn7hLKT.js → ui-B648tEnO.js} +3 -3
- package/dist/{ui-BwBUIl5y.js → ui-DjjBjKpZ.js} +1 -1
- package/dist/{useDocumentTitle-Ces2VRou.js → useDocumentTitle-wGdjZMx6.js} +1 -1
- package/dist/{useLanguage-c7lPQ7eh.js → useLanguage-JlBoVxev.js} +1 -1
- package/dist/{useTheme-CU6lGuO4.js → useTheme-DVDPwbQ2.js} +1 -1
- package/package.json +6 -1
- package/dist/behavior-2kM6-wgK.js +0 -116
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../../chart-Dq3AIrue.js";
|
|
2
|
-
import { $ as f, $t as p, A as m, An as h, At as g, B as _, Bn as v, Bt as y, C as b, Cn as x, Ct as S, D as C, Dn as w, Dt as T, E, En as D, Et as O, F as k, Fn as A, Ft as j, G as M, Gn as N, Gt as P, H as F, Hn as I, Ht as L, I as R, In as z, It as B, J as V, Jn as H, Jt as U, K as W, Kn as G, Kt as K, L as q, Ln as J, Lt as Y, M as X, Mn as Z, Mt as Q, N as $, Nn as ee, Nt as te, O as ne, On as re, Ot as ie, P as ae, Pn as oe, Pt as se, Q as ce, Qn as le, Qt as ue, R as de, Rn as fe, Rt as pe, S as me, Sn as he, St as ge, T as _e, Tn as ve, Tt as ye, U as be, Un as xe, Ut as Se, V as Ce, Vn as we, Vt as Te, W as Ee, Wn as De, Wt as Oe, X as ke, Xn as Ae, Xt as je, Y as Me, Yn as Ne, Yt as Pe, Z as Fe, Zn as Ie, Zt as Le, _ as Re, _n as ze, _t as Be, a as Ve, an as He, at as Ue, b as We, bn as Ge, bt as Ke, c as qe, cn as Je, ct as Ye, d as Xe, dn as Ze, dt as Qe, en as $e, et, f as tt, fn as nt, ft as rt, g as it, gn as at, gt as ot, h as st, hn as ct, ht as lt, i as ut, in as dt, it as ft, j as pt, jn as mt, jt as ht, k as gt, kn as _t, kt as vt, l as yt, ln as bt, lt as xt, m as St, mn as Ct, mt as wt, n as Tt, nn as Et, nt as Dt, o as Ot, on as kt, ot as At, p as jt, pn as Mt, pt as Nt, q as Pt, qn as Ft, qt as It, r as Lt, rn as Rt, rt as zt, s as Bt, sn as Vt, st as Ht, t as Ut, tn as Wt, tt as Gt, u as Kt, un as qt, ut as Jt, v as Yt, vn as Xt, vt as Zt, w as Qt, wn as $t, wt as en, x as tn, xn as nn, xt as rn, y as an, yn as on, yt as sn, z as cn, zn as ln, zt as un } from "../../ui-
|
|
2
|
+
import { $ as f, $t as p, A as m, An as h, At as g, B as _, Bn as v, Bt as y, C as b, Cn as x, Ct as S, D as C, Dn as w, Dt as T, E, En as D, Et as O, F as k, Fn as A, Ft as j, G as M, Gn as N, Gt as P, H as F, Hn as I, Ht as L, I as R, In as z, It as B, J as V, Jn as H, Jt as U, K as W, Kn as G, Kt as K, L as q, Ln as J, Lt as Y, M as X, Mn as Z, Mt as Q, N as $, Nn as ee, Nt as te, O as ne, On as re, Ot as ie, P as ae, Pn as oe, Pt as se, Q as ce, Qn as le, Qt as ue, R as de, Rn as fe, Rt as pe, S as me, Sn as he, St as ge, T as _e, Tn as ve, Tt as ye, U as be, Un as xe, Ut as Se, V as Ce, Vn as we, Vt as Te, W as Ee, Wn as De, Wt as Oe, X as ke, Xn as Ae, Xt as je, Y as Me, Yn as Ne, Yt as Pe, Z as Fe, Zn as Ie, Zt as Le, _ as Re, _n as ze, _t as Be, a as Ve, an as He, at as Ue, b as We, bn as Ge, bt as Ke, c as qe, cn as Je, ct as Ye, d as Xe, dn as Ze, dt as Qe, en as $e, et, f as tt, fn as nt, ft as rt, g as it, gn as at, gt as ot, h as st, hn as ct, ht as lt, i as ut, in as dt, it as ft, j as pt, jn as mt, jt as ht, k as gt, kn as _t, kt as vt, l as yt, ln as bt, lt as xt, m as St, mn as Ct, mt as wt, n as Tt, nn as Et, nt as Dt, o as Ot, on as kt, ot as At, p as jt, pn as Mt, pt as Nt, q as Pt, qn as Ft, qt as It, r as Lt, rn as Rt, rt as zt, s as Bt, sn as Vt, st as Ht, t as Ut, tn as Wt, tt as Gt, u as Kt, un as qt, ut as Jt, v as Yt, vn as Xt, vt as Zt, w as Qt, wn as $t, wt as en, x as tn, xn as nn, xt as rn, y as an, yn as on, yt as sn, z as cn, zn as ln, zt as un } from "../../ui-DjjBjKpZ.js";
|
|
3
3
|
import { n as dn, r as fn, t as pn } from "../../alert-REQGK9bR.js";
|
|
4
4
|
import { a as mn, c as hn, i as gn, l as _n, n as vn, o as yn, r as bn, s as xn, t as Sn } from "../../tooltip-_geGvbS7.js";
|
|
5
|
-
import { A as Cn, C as wn, D as Tn, E as En, F as Dn, M as On, N as kn, O as An, P as jn, S as Mn, T as Nn, _ as Pn, a as Fn, b as In, c as Ln, d as Rn, f as zn, g as Bn, h as Vn, i as Hn, j as Un, k as Wn, l as Gn, m as Kn, n as qn, o as Jn, p as Yn, r as Xn, s as Zn, t as Qn, u as $n, v as er, w as tr, x as nr, y as rr } from "../../sheet-
|
|
5
|
+
import { A as Cn, C as wn, D as Tn, E as En, F as Dn, M as On, N as kn, O as An, P as jn, S as Mn, T as Nn, _ as Pn, a as Fn, b as In, c as Ln, d as Rn, f as zn, g as Bn, h as Vn, i as Hn, j as Un, k as Wn, l as Gn, m as Kn, n as qn, o as Jn, p as Yn, r as Xn, s as Zn, t as Qn, u as $n, v as er, w as tr, x as nr, y as rr } from "../../sheet-B7qGvwk0.js";
|
|
6
6
|
import { a as ir, c as ar, i as or, l as sr, n as cr, o as lr, r as ur, s as dr, t as fr, u as pr } from "../../select-KWMg2_7Z.js";
|
|
7
7
|
import { t as mr } from "../../skeleton-D6Ga4BLw.js";
|
|
8
8
|
export { Ne as Accordion, Ae as AccordionContent, Ie as AccordionItem, le as AccordionTrigger, pn as Alert, dn as AlertDescription, v as AlertDialog, we as AlertDialogAction, I as AlertDialogCancel, xe as AlertDialogContent, De as AlertDialogDescription, N as AlertDialogFooter, G as AlertDialogHeader, Ft as AlertDialogTitle, H as AlertDialogTrigger, fn as AlertTitle, ln as AspectRatio, z as Avatar, J as AvatarFallback, fe as AvatarImage, oe as Badge, w as Breadcrumb, re as BreadcrumbEllipsis, _t as BreadcrumbItem, h as BreadcrumbLink, mt as BreadcrumbList, Z as BreadcrumbPage, ee as BreadcrumbSeparator, hn as Button, D as Calendar, l as Card, t as CardContent, a as CardDescription, d as CardFooter, n as CardHeader, r as CardTitle, nn as Carousel, he as CarouselContent, x as CarouselItem, $t as CarouselNext, ve as CarouselPrevious, u as ChartContainer, o as ChartLegend, c as ChartLegendContent, i as ChartStyle, e as ChartTooltip, s as ChartTooltipContent, Ge as Checkbox, ze as Collapsible, Xt as CollapsibleContent, on as CollapsibleTrigger, Pn as Command, er as CommandDialog, rr as CommandEmpty, In as CommandGroup, nr as CommandInput, Mn as CommandItem, wn as CommandList, tr as CommandSeparator, Nn as CommandShortcut, Et as ContextMenu, Rt as ContextMenuCheckboxItem, dt as ContextMenuContent, He as ContextMenuGroup, kt as ContextMenuItem, Vt as ContextMenuLabel, Je as ContextMenuPortal, bt as ContextMenuRadioGroup, qt as ContextMenuRadioItem, Ze as ContextMenuSeparator, nt as ContextMenuShortcut, Mt as ContextMenuSub, Ct as ContextMenuSubContent, ct as ContextMenuSubTrigger, at as ContextMenuTrigger, En as Dialog, Tn as DialogClose, An as DialogContent, Wn as DialogDescription, Cn as DialogFooter, Un as DialogHeader, On as DialogOverlay, kn as DialogPortal, jn as DialogTitle, Dn as DialogTrigger, K as Drawer, It as DrawerClose, U as DrawerContent, Pe as DrawerDescription, je as DrawerFooter, Le as DrawerHeader, ue as DrawerOverlay, p as DrawerPortal, $e as DrawerTitle, Wt as DrawerTrigger, ht as DropdownMenu, Q as DropdownMenuCheckboxItem, te as DropdownMenuContent, se as DropdownMenuGroup, j as DropdownMenuItem, B as DropdownMenuLabel, Y as DropdownMenuPortal, pe as DropdownMenuRadioGroup, un as DropdownMenuRadioItem, y as DropdownMenuSeparator, Te as DropdownMenuShortcut, L as DropdownMenuSub, Se as DropdownMenuSubContent, Oe as DropdownMenuSubTrigger, P as DropdownMenuTrigger, ge as Form, S as FormControl, en as FormDescription, ye as FormField, O as FormItem, T as FormLabel, ie as FormMessage, sn as HoverCard, Ke as HoverCardContent, rn as HoverCardTrigger, Bn as Input, lt as InputOTP, ot as InputOTPGroup, Be as InputOTPSeparator, Zt as InputOTPSlot, g as Label, f as Menubar, et as MenubarCheckboxItem, Gt as MenubarContent, Dt as MenubarGroup, zt as MenubarItem, ft as MenubarLabel, Ue as MenubarMenu, At as MenubarPortal, Ht as MenubarRadioGroup, Ye as MenubarRadioItem, xt as MenubarSeparator, Jt as MenubarShortcut, Qe as MenubarSub, rt as MenubarSubContent, Nt as MenubarSubTrigger, wt as MenubarTrigger, Ee as NavigationMenu, M as NavigationMenuContent, W as NavigationMenuIndicator, Pt as NavigationMenuItem, V as NavigationMenuLink, Me as NavigationMenuList, ke as NavigationMenuTrigger, Fe as NavigationMenuViewport, q as Pagination, de as PaginationContent, cn as PaginationEllipsis, _ as PaginationItem, Ce as PaginationLink, F as PaginationNext, be as PaginationPrevious, Yn as Popover, Kn as PopoverContent, Vn as PopoverTrigger, R as Progress, ae as RadioGroup, k as RadioGroupItem, pt as ResizableHandle, X as ResizablePanel, $ as ResizablePanelGroup, Rn as ScrollArea, zn as ScrollBar, fr as Select, cr as SelectContent, ur as SelectGroup, or as SelectItem, ir as SelectLabel, lr as SelectScrollDownButton, dr as SelectScrollUpButton, ar as SelectSeparator, sr as SelectTrigger, pr as SelectValue, m as Separator, Qn as Sheet, qn as SheetClose, Xn as SheetContent, Hn as SheetDescription, Fn as SheetFooter, Jn as SheetHeader, Zn as SheetOverlay, Ln as SheetPortal, Gn as SheetTitle, $n as SheetTrigger, me as SimpleTable, b as SimpleTableBody, Qt as SimpleTableCaption, _e as SimpleTableCell, E as SimpleTableFooter, C as SimpleTableHead, ne as SimpleTableHeader, gt as SimpleTableRow, mr as Skeleton, tn as Slider, an as Sonner, Yt as Switch, St as Tabs, st as TabsContent, it as TabsList, Re as TabsTrigger, jt as Textarea, Ot as Toast, Bt as ToastAction, qe as ToastClose, yt as ToastDescription, Kt as ToastProvider, Xe as ToastTitle, tt as ToastViewport, Ve as Toaster, Lt as Toggle, Ut as ToggleGroup, Tt as ToggleGroupItem, Sn as Tooltip, vn as TooltipContent, bn as TooltipProvider, gn as TooltipTrigger, A as badgeVariants, _n as buttonVariants, mn as controlBaseClass, yn as controlFilterWidthClass, xn as controlTriggerClass, ce as navigationMenuTriggerStyle, We as toast, ut as toggleVariants, vt as useFormField };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import { t } from "./i18n-
|
|
3
|
-
import { Bn as n, Gn as r, Hn as i, I as a, Kn as o, Un as s, Wn as c, qn as l } from "./ui-
|
|
2
|
+
import { t } from "./i18n-COxm2IKP.js";
|
|
3
|
+
import { Bn as n, Gn as r, Hn as i, I as a, Kn as o, Un as s, Wn as c, qn as l } from "./ui-DjjBjKpZ.js";
|
|
4
4
|
import { c as u } from "./tooltip-_geGvbS7.js";
|
|
5
|
-
import { E as d, O as f, P as p, j as m, k as h } from "./sheet-
|
|
6
|
-
import { t as g } from "./ErrorAlert-
|
|
7
|
-
import { t as _ } from "./GenericForm-
|
|
5
|
+
import { E as d, O as f, P as p, j as m, k as h } from "./sheet-B7qGvwk0.js";
|
|
6
|
+
import { t as g } from "./ErrorAlert-ZflPwfL1.js";
|
|
7
|
+
import { t as _ } from "./GenericForm-B-HE6wx0.js";
|
|
8
8
|
import { useEffect as v, useId as y, useState as b } from "react";
|
|
9
9
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
10
10
|
import { Pen as w, Save as T, X as E } from "lucide-react";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { useConfirmationDialog } from "./useConfirmationDialog";
|
|
2
2
|
export { useConfirmDeleteDialog } from "./useConfirmDeleteDialog";
|
|
3
|
+
export { useDebounce } from "./useDebounce";
|
|
3
4
|
export { useDebouncedValue } from "./useDebouncedValue";
|
|
4
5
|
export { useDialog } from "./useDialog";
|
|
5
6
|
export type { DialogState } from "./useDialog";
|
|
6
7
|
export { usePage } from "./usePage";
|
|
7
8
|
export { useSidebar } from "./useSidebar";
|
|
9
|
+
export { useTable } from "./useTable";
|
|
8
10
|
export { parseDateRange, serializeDateRange, URL_DATE_FORMAT, useUrlArrayState, useUrlDateRangeState, useUrlNumberState, useUrlState } from "./useUrlState";
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i,
|
|
2
|
-
export {
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "../../behavior-DOkq-VaE.js";
|
|
2
|
+
export { p as URL_DATE_FORMAT, c as parseDateRange, d as serializeDateRange, u as useConfirmDeleteDialog, s as useConfirmationDialog, r as useDebounce, n as useDebouncedValue, i as useDialog, m as usePage, o as useSidebar, t as useTable, a as useUrlArrayState, e as useUrlDateRangeState, l as useUrlNumberState, f as useUrlState };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retarde la propagation d'une valeur, et expose un `flush` pour l'appliquer immédiatement
|
|
3
|
+
* quand l'utilisateur déclenche une action explicite qui ne doit pas paraître en retard
|
|
4
|
+
* (réinitialisation d'un filtre, par exemple).
|
|
5
|
+
*/
|
|
6
|
+
export declare const useDebounce: <T>(value: T, delay: number) => readonly [T, (immediateValue: T) => void];
|
|
7
|
+
//# sourceMappingURL=useDebounce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useDebounce.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM,mCAcT,CAAC,UAM7C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PaginationQuery, PaginationResult, SortOption } from "@krosoft/core/types";
|
|
2
|
+
interface UseTableProps<TQueryParams, TResult> {
|
|
3
|
+
queryKey: string[];
|
|
4
|
+
queryFn: (queryParams: TQueryParams, sortOptions: SortOption[]) => Promise<PaginationResult<TResult>>;
|
|
5
|
+
defaultSortField?: string;
|
|
6
|
+
defaultSortDirection?: "asc" | "desc";
|
|
7
|
+
additionalQueryParams?: Partial<TQueryParams>;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/** Paramètres d'URL propres à la table (filtres métier) à effacer lors d'une réinitialisation. */
|
|
10
|
+
resetUrlParams?: string[];
|
|
11
|
+
onResetFilters?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useTable: <TQueryParams extends PaginationQuery, TResult>({ queryKey: baseQueryKey, queryFn, defaultSortField, defaultSortDirection, additionalQueryParams, resetUrlParams, onResetFilters, enabled, }: UseTableProps<TQueryParams, TResult>) => {
|
|
14
|
+
paginationResult: PaginationResult<TResult> | undefined;
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
error: Error | null;
|
|
17
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<PaginationResult<TResult>, Error>>;
|
|
18
|
+
pageNumber: number;
|
|
19
|
+
pageSize: number;
|
|
20
|
+
setPageNumber: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
21
|
+
setPageSize: (size: number) => void;
|
|
22
|
+
search: string;
|
|
23
|
+
debouncedSearch: string;
|
|
24
|
+
setSearch: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
25
|
+
sortField: string;
|
|
26
|
+
sortDirection: "asc" | "desc";
|
|
27
|
+
handleSort: (field: string | null) => void;
|
|
28
|
+
resetFilters: () => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=useTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useTable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMzF,UAAU,aAAa,CAAC,YAAY,EAAE,OAAO;IAC3C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;IACtG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtC,qBAAqB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,QAAQ,GAAI,YAAY,SAAS,eAAe,EAAE,OAAO,EAAE,8IASrE,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC;;;;;;;;wBAcE,MAAM;;;;;;wBAgFnC,MAAM,GAAG,IAAI;;CA2ExB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { n as t, t as n } from "../useToast-UeDRLovh.js";
|
|
|
3
3
|
import { t as r } from "../useMobile-pTQ8lWvt.js";
|
|
4
4
|
import { t as i } from "../useNotifications-CyhTruIG.js";
|
|
5
5
|
import { n as a, t as o } from "../useFixedColumns-B2yti0Rk.js";
|
|
6
|
-
import { t as s } from "../useDocumentTitle-
|
|
7
|
-
import { t as c } from "../useLanguage-
|
|
8
|
-
import { t as l } from "../ui-
|
|
9
|
-
import { t as u } from "../useTheme-
|
|
10
|
-
import { a as d, c as f, d as p, f as m, i as
|
|
11
|
-
export {
|
|
6
|
+
import { t as s } from "../useDocumentTitle-wGdjZMx6.js";
|
|
7
|
+
import { t as c } from "../useLanguage-JlBoVxev.js";
|
|
8
|
+
import { t as l } from "../ui-B648tEnO.js";
|
|
9
|
+
import { t as u } from "../useTheme-DVDPwbQ2.js";
|
|
10
|
+
import { a as d, c as f, d as p, f as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T } from "../behavior-DOkq-VaE.js";
|
|
11
|
+
export { w as URL_DATE_FORMAT, y as parseDateRange, S as serializeDateRange, n as toast, x as useConfirmDeleteDialog, v as useConfirmationDialog, a as useDataTable, m as useDebounce, p as useDebouncedValue, h as useDialog, s as useDocumentTitle, o as useFixedColumns, c as useLanguage, r as useMobile, i as useNotifications, T as usePage, e as useScrollFade, l as useServerTable, _ as useSidebar, f as useTable, u as useTheme, t as useToast, g as useUrlArrayState, d as useUrlDateRangeState, b as useUrlNumberState, C as useUrlState };
|
package/dist/hooks/ui/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { n as t, t as n } from "../../useToast-UeDRLovh.js";
|
|
|
3
3
|
import { t as r } from "../../useMobile-pTQ8lWvt.js";
|
|
4
4
|
import { t as i } from "../../useNotifications-CyhTruIG.js";
|
|
5
5
|
import { n as a, t as o } from "../../useFixedColumns-B2yti0Rk.js";
|
|
6
|
-
import { t as s } from "../../useDocumentTitle-
|
|
7
|
-
import { t as c } from "../../useLanguage-
|
|
8
|
-
import { t as l } from "../../ui-
|
|
9
|
-
import { t as u } from "../../useTheme-
|
|
6
|
+
import { t as s } from "../../useDocumentTitle-wGdjZMx6.js";
|
|
7
|
+
import { t as c } from "../../useLanguage-JlBoVxev.js";
|
|
8
|
+
import { t as l } from "../../ui-B648tEnO.js";
|
|
9
|
+
import { t as u } from "../../useTheme-DVDPwbQ2.js";
|
|
10
10
|
export { n as toast, a as useDataTable, s as useDocumentTitle, o as useFixedColumns, c as useLanguage, r as useMobile, i as useNotifications, e as useScrollFade, l as useServerTable, u as useTheme, t as useToast };
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../i18n-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../i18n-COxm2IKP.js";
|
|
2
2
|
export { t as KROSOFT_NAMESPACE, n as dateFnsLocale, e as krosoftLocales, r as registerKrosoftLocales, i as useDateFnsLocale, a as useKrosoftTranslation };
|
|
@@ -36,6 +36,8 @@ export declare const krosoftLocales: {
|
|
|
36
36
|
commandTitle: string;
|
|
37
37
|
commandDescription: string;
|
|
38
38
|
loading: string;
|
|
39
|
+
historyTitle: string;
|
|
40
|
+
removeFromHistory: string;
|
|
39
41
|
};
|
|
40
42
|
notifications: {
|
|
41
43
|
trigger: string;
|
|
@@ -150,6 +152,8 @@ export declare const krosoftLocales: {
|
|
|
150
152
|
commandTitle: string;
|
|
151
153
|
commandDescription: string;
|
|
152
154
|
loading: string;
|
|
155
|
+
historyTitle: string;
|
|
156
|
+
removeFromHistory: string;
|
|
153
157
|
};
|
|
154
158
|
notifications: {
|
|
155
159
|
trigger: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"krosoftLocales.d.ts","sourceRoot":"","sources":["../../src/i18n/krosoftLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"krosoftLocales.d.ts","sourceRoot":"","sources":["../../src/i18n/krosoftLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAEzC,gGAAgG;AAChG,UAAU,QAAQ;IAChB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IACjH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,QAAQ,EAAE,gBAAuB;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,KAAG,IAM5G,CAAC"}
|
|
@@ -29,7 +29,9 @@ var r = {
|
|
|
29
29
|
globalDescription: "Search for a page or a record across the application.",
|
|
30
30
|
commandTitle: "Command palette",
|
|
31
31
|
commandDescription: "Search for a command to run.",
|
|
32
|
-
loading: "Searching..."
|
|
32
|
+
loading: "Searching...",
|
|
33
|
+
historyTitle: "Recent searches",
|
|
34
|
+
removeFromHistory: "Remove from history"
|
|
33
35
|
},
|
|
34
36
|
notifications: {
|
|
35
37
|
trigger: "Notifications",
|
|
@@ -142,7 +144,9 @@ var r = {
|
|
|
142
144
|
globalDescription: "Rechercher une page ou une donnée dans l'application.",
|
|
143
145
|
commandTitle: "Palette de commandes",
|
|
144
146
|
commandDescription: "Rechercher une commande à exécuter.",
|
|
145
|
-
loading: "Recherche..."
|
|
147
|
+
loading: "Recherche...",
|
|
148
|
+
historyTitle: "Recherches récentes",
|
|
149
|
+
removeFromHistory: "Retirer de l'historique"
|
|
146
150
|
},
|
|
147
151
|
notifications: {
|
|
148
152
|
trigger: "Notifications",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import "./ImageInput-
|
|
3
|
-
import "./MultiSelect-
|
|
4
|
-
import "./SearchInput-
|
|
2
|
+
import "./ImageInput-pfEyse5s.js";
|
|
3
|
+
import "./MultiSelect-BWpBLiI-.js";
|
|
4
|
+
import "./SearchInput-TWh8dk0Q.js";
|
|
5
5
|
import { jsx as t } from "react/jsx-runtime";
|
|
6
6
|
import { Heart as n, Star as r } from "lucide-react";
|
|
7
7
|
//#region src/components/core/inputs/RatingInput.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./i18n-
|
|
1
|
+
import { t as e } from "./i18n-COxm2IKP.js";
|
|
2
2
|
import { c as t, i as n, n as r, r as i, t as a } from "./tooltip-_geGvbS7.js";
|
|
3
3
|
import { i as o, l as s, n as c, t as l, u } from "./select-KWMg2_7Z.js";
|
|
4
|
-
import { t as d } from "./useLanguage-
|
|
4
|
+
import { t as d } from "./useLanguage-JlBoVxev.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
7
|
import { LanguagesIcon as m } from "lucide-react";
|
|
@@ -1,63 +1,98 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import { t } from "./i18n-
|
|
2
|
+
import { t } from "./i18n-COxm2IKP.js";
|
|
3
3
|
import { c as n, i as r, n as i, r as a, t as o } from "./tooltip-_geGvbS7.js";
|
|
4
|
-
import { C as s, S as c, b as l, d as u, g as d, h as f, i as p, l as m, m as h, p as g, r as _, t as v, v as y, x as b, y as x } from "./sheet-
|
|
4
|
+
import { C as s, S as c, b as l, d as u, g as d, h as f, i as p, l as m, m as h, p as g, r as _, t as v, v as y, x as b, y as x } from "./sheet-B7qGvwk0.js";
|
|
5
5
|
import { t as S } from "./skeleton-D6Ga4BLw.js";
|
|
6
|
-
import {
|
|
6
|
+
import { l as C } from "./behavior-DOkq-VaE.js";
|
|
7
7
|
import "./hooks/index.js";
|
|
8
8
|
import * as w from "react";
|
|
9
9
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
10
|
-
import { BellIcon as O, ChevronDownIcon as k,
|
|
10
|
+
import { BellIcon as O, ChevronDownIcon as k, ClockIcon as A, LoaderCircleIcon as j, MenuIcon as M, SearchIcon as N, Trash2Icon as P, XIcon as F } from "lucide-react";
|
|
11
11
|
//#region src/components/core/navbar/GlobalSearch.tsx
|
|
12
|
-
var
|
|
13
|
-
let { t:
|
|
14
|
-
|
|
15
|
-
}, [
|
|
12
|
+
var I = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open: d, onOpenChange: f, trigger: p = !0, triggerLabel: m, shortcut: h = !0, shortcutLabel: g = "Ctrl+K", history: _, onHistorySelect: v, onHistoryRemove: S, historyHeading: C, removeFromHistoryLabel: O, placeholder: k, emptyLabel: M, loadingLabel: P, title: I, description: L, hint: R, className: z }) => {
|
|
13
|
+
let { t: B } = t(), [V, H] = w.useState(!1), U = d !== void 0, W = U ? d : V, G = w.useCallback((e) => {
|
|
14
|
+
U || H(e), f?.(e);
|
|
15
|
+
}, [U, f]);
|
|
16
16
|
w.useEffect(() => {
|
|
17
17
|
if (!h) return;
|
|
18
18
|
let e = (e) => {
|
|
19
|
-
e.key.toLowerCase() !== "k" || !(e.metaKey || e.ctrlKey) || (e.preventDefault(),
|
|
19
|
+
e.key.toLowerCase() !== "k" || !(e.metaKey || e.ctrlKey) || (e.preventDefault(), G(!W));
|
|
20
20
|
};
|
|
21
21
|
return window.addEventListener("keydown", e), () => {
|
|
22
22
|
window.removeEventListener("keydown", e);
|
|
23
23
|
};
|
|
24
24
|
}, [
|
|
25
25
|
h,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
W,
|
|
27
|
+
G
|
|
28
28
|
]);
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
},
|
|
29
|
+
let K = (e) => {
|
|
30
|
+
G(!1), a(""), o(e);
|
|
31
|
+
}, q = r.some((e) => e.items.length > 0), J = _ ?? [], Y = i.trim() === "" && J.length > 0;
|
|
32
32
|
return /* @__PURE__ */ D(T, { children: [p && /* @__PURE__ */ E(n, {
|
|
33
33
|
variant: "ghost",
|
|
34
34
|
size: "icon",
|
|
35
|
-
"aria-label": m ??
|
|
36
|
-
title: h ? `${m ??
|
|
35
|
+
"aria-label": m ?? B("search.trigger"),
|
|
36
|
+
title: h ? `${m ?? B("search.trigger")} (${g})` : m ?? B("search.trigger"),
|
|
37
37
|
className: "rounded-full",
|
|
38
38
|
onClick: () => {
|
|
39
|
-
|
|
39
|
+
G(!0);
|
|
40
40
|
},
|
|
41
|
-
children: /* @__PURE__ */ E(
|
|
41
|
+
children: /* @__PURE__ */ E(N, { className: "size-4" })
|
|
42
42
|
}), /* @__PURE__ */ D(y, {
|
|
43
|
-
open:
|
|
44
|
-
onOpenChange:
|
|
45
|
-
title:
|
|
46
|
-
description:
|
|
43
|
+
open: W,
|
|
44
|
+
onOpenChange: G,
|
|
45
|
+
title: I ?? B("search.globalTitle"),
|
|
46
|
+
description: L ?? B("search.globalDescription"),
|
|
47
47
|
shouldFilter: !1,
|
|
48
|
-
className:
|
|
48
|
+
className: z,
|
|
49
49
|
children: [
|
|
50
50
|
/* @__PURE__ */ E(b, {
|
|
51
51
|
value: i,
|
|
52
52
|
onValueChange: a,
|
|
53
|
-
placeholder:
|
|
53
|
+
placeholder: k ?? B("search.placeholder")
|
|
54
54
|
}),
|
|
55
55
|
/* @__PURE__ */ D(s, { children: [
|
|
56
56
|
u && /* @__PURE__ */ D("div", {
|
|
57
57
|
className: "flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",
|
|
58
|
-
children: [/* @__PURE__ */ E(
|
|
58
|
+
children: [/* @__PURE__ */ E(j, { className: "size-4 animate-spin" }), P ?? B("search.loading")]
|
|
59
|
+
}),
|
|
60
|
+
!q && !Y && !u && /* @__PURE__ */ E(x, { children: M ?? B("states.noResultDot") }),
|
|
61
|
+
Y && /* @__PURE__ */ E(l, {
|
|
62
|
+
heading: C ?? B("search.historyTitle"),
|
|
63
|
+
children: J.map((e) => /* @__PURE__ */ D(c, {
|
|
64
|
+
value: `history-${e}`,
|
|
65
|
+
className: "gap-3 px-2 py-2",
|
|
66
|
+
onSelect: () => {
|
|
67
|
+
v?.(e);
|
|
68
|
+
},
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ E("span", {
|
|
71
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
|
|
72
|
+
children: /* @__PURE__ */ E(A, { className: "size-4" })
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ E("span", {
|
|
75
|
+
className: "min-w-0 flex-1 truncate font-medium",
|
|
76
|
+
children: e
|
|
77
|
+
}),
|
|
78
|
+
S && /* @__PURE__ */ E(n, {
|
|
79
|
+
type: "button",
|
|
80
|
+
variant: "ghost",
|
|
81
|
+
size: "icon",
|
|
82
|
+
className: "size-7 shrink-0 text-muted-foreground hover:text-destructive",
|
|
83
|
+
"aria-label": O ?? B("search.removeFromHistory"),
|
|
84
|
+
title: O ?? B("search.removeFromHistory"),
|
|
85
|
+
onPointerDown: (e) => {
|
|
86
|
+
e.preventDefault(), e.stopPropagation();
|
|
87
|
+
},
|
|
88
|
+
onClick: (t) => {
|
|
89
|
+
t.stopPropagation(), S(e);
|
|
90
|
+
},
|
|
91
|
+
children: /* @__PURE__ */ E(F, { className: "size-4" })
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}, `history-${e}`))
|
|
59
95
|
}),
|
|
60
|
-
!B && !u && /* @__PURE__ */ E(x, { children: v ?? N("states.noResultDot") }),
|
|
61
96
|
r.map((t) => t.items.length === 0 ? null : /* @__PURE__ */ E(l, {
|
|
62
97
|
heading: t.heading,
|
|
63
98
|
children: t.items.map((t) => {
|
|
@@ -66,7 +101,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
66
101
|
value: t.key,
|
|
67
102
|
className: "gap-3 px-2 py-2",
|
|
68
103
|
onSelect: () => {
|
|
69
|
-
|
|
104
|
+
K(t);
|
|
70
105
|
},
|
|
71
106
|
children: [n && /* @__PURE__ */ E("span", {
|
|
72
107
|
className: e("flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", t.iconClassName),
|
|
@@ -85,16 +120,16 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
85
120
|
})
|
|
86
121
|
}, t.heading))
|
|
87
122
|
] }),
|
|
88
|
-
|
|
123
|
+
R !== void 0 && q && !u && /* @__PURE__ */ E("div", {
|
|
89
124
|
className: "border-t border-border p-2 text-center text-xs text-muted-foreground",
|
|
90
|
-
children:
|
|
125
|
+
children: R
|
|
91
126
|
})
|
|
92
127
|
]
|
|
93
128
|
})] });
|
|
94
|
-
},
|
|
95
|
-
let { t:
|
|
96
|
-
R ||
|
|
97
|
-
}, V = l ?? r.filter((e) => !e.read).length, H = _ ??
|
|
129
|
+
}, L = 9, R = ({ items: r, onSelect: i, onMarkAllAsRead: a, onRemove: o, onSeeAll: s, isLoading: c = !1, unreadCount: l, maxBadgeCount: d = L, open: p, onOpenChange: m, triggerLabel: _, title: v, emptyLabel: y, loadingLabel: b, markAllAsReadLabel: x, removeLabel: S, seeAllLabel: C, className: T, contentClassName: k, badgeClassName: A, itemClassName: j, unreadItemClassName: M }) => {
|
|
130
|
+
let { t: N } = t(), [F, I] = w.useState(!1), R = p !== void 0, z = R ? p : F, B = (e) => {
|
|
131
|
+
R || I(e), m?.(e);
|
|
132
|
+
}, V = l ?? r.filter((e) => !e.read).length, H = _ ?? N("notifications.trigger"), U = (e) => {
|
|
98
133
|
B(!1), i?.(e);
|
|
99
134
|
};
|
|
100
135
|
return /* @__PURE__ */ D(g, {
|
|
@@ -122,23 +157,23 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
122
157
|
className: "flex items-center justify-between gap-2 border-b px-3 py-2",
|
|
123
158
|
children: [/* @__PURE__ */ E("span", {
|
|
124
159
|
className: "text-sm font-medium",
|
|
125
|
-
children: v ??
|
|
160
|
+
children: v ?? N("notifications.title")
|
|
126
161
|
}), a && V > 0 && /* @__PURE__ */ E(n, {
|
|
127
162
|
type: "button",
|
|
128
163
|
variant: "ghost",
|
|
129
164
|
size: "sm",
|
|
130
165
|
className: "h-7 text-xs",
|
|
131
166
|
onClick: a,
|
|
132
|
-
children: x ??
|
|
167
|
+
children: x ?? N("notifications.markAllAsRead")
|
|
133
168
|
})]
|
|
134
169
|
}),
|
|
135
170
|
c && /* @__PURE__ */ E("p", {
|
|
136
171
|
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
137
|
-
children: b ??
|
|
172
|
+
children: b ?? N("states.loading")
|
|
138
173
|
}),
|
|
139
174
|
!c && r.length === 0 && /* @__PURE__ */ E("p", {
|
|
140
175
|
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
141
|
-
children: y ??
|
|
176
|
+
children: y ?? N("notifications.empty")
|
|
142
177
|
}),
|
|
143
178
|
!c && r.length > 0 && /* @__PURE__ */ E(u, {
|
|
144
179
|
viewportClassName: "max-h-96",
|
|
@@ -188,9 +223,9 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
188
223
|
onClick: () => {
|
|
189
224
|
o(t);
|
|
190
225
|
},
|
|
191
|
-
"aria-label": S ??
|
|
192
|
-
title: S ??
|
|
193
|
-
children: /* @__PURE__ */ E(
|
|
226
|
+
"aria-label": S ?? N("notifications.remove"),
|
|
227
|
+
title: S ?? N("notifications.remove"),
|
|
228
|
+
children: /* @__PURE__ */ E(P, { className: "size-3.5" })
|
|
194
229
|
})]
|
|
195
230
|
}, t.key);
|
|
196
231
|
})
|
|
@@ -206,14 +241,14 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
206
241
|
onClick: () => {
|
|
207
242
|
B(!1), s?.();
|
|
208
243
|
},
|
|
209
|
-
children: C ??
|
|
244
|
+
children: C ?? N("notifications.seeAll")
|
|
210
245
|
})
|
|
211
246
|
})
|
|
212
247
|
]
|
|
213
248
|
})]
|
|
214
249
|
});
|
|
215
|
-
},
|
|
216
|
-
let p = c?.map((e) => e.path) ?? [], [m, h] = w.useState(c?.some((e) =>
|
|
250
|
+
}, z = (e, t, n) => t === e ? !0 : e === "/" || !t.startsWith(`${e}/`) ? !1 : !n.some((n) => n !== e && n.startsWith(`${e}/`) && (t === n || t.startsWith(`${n}/`))), B = ({ path: t, icon: n, label: a, badge: s, subItems: c, currentPath: l, collapsed: u, dense: d = !1, onItemClick: f }) => {
|
|
251
|
+
let p = c?.map((e) => e.path) ?? [], [m, h] = w.useState(c?.some((e) => z(e.path, l, p)) ?? !1), g = t ? l === t || t !== "/" && l.startsWith(`${t}/`) : !1, _ = c?.some((e) => z(e.path, l, p)), v = g || !u && _, y = /* @__PURE__ */ D("a", {
|
|
217
252
|
href: t ?? "#",
|
|
218
253
|
onClick: (e) => {
|
|
219
254
|
e.ctrlKey || e.metaKey || e.button === 1 || (e.preventDefault(), c && c.length > 0 ? u || h(!m) : t && f(t));
|
|
@@ -261,7 +296,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
261
296
|
})] }) : y, !u && c && c.length > 0 && m && /* @__PURE__ */ E("div", {
|
|
262
297
|
className: e("flex flex-col ml-4 pl-4 border-l-2 border-sidebar-border/50 animate-in slide-in-from-top-2 fade-in duration-200", d ? "gap-0.5 mb-0.5" : "gap-1 mb-2"),
|
|
263
298
|
children: c.map((t, n) => {
|
|
264
|
-
let r =
|
|
299
|
+
let r = z(t.path, l, p);
|
|
265
300
|
return /* @__PURE__ */ D("a", {
|
|
266
301
|
href: t.path,
|
|
267
302
|
onClick: (e) => {
|
|
@@ -275,8 +310,8 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
275
310
|
}, n);
|
|
276
311
|
})
|
|
277
312
|
})] });
|
|
278
|
-
},
|
|
279
|
-
let { t: f } = t(), { enabled: h = !1, placeholder: g } = s ?? {}, { header: y, footer: b } = o ?? {}, { collapsed: x, isMobile: T, setCollapsed: O } = C(), [k, A] = w.useState(""), j = !T && x,
|
|
313
|
+
}, V = ({ groups: n, currentPath: r, onItemClick: i, slots: o, search: s, dense: c = !1, loading: l = !1, showCloseButton: u = !0 }) => {
|
|
314
|
+
let { t: f } = t(), { enabled: h = !1, placeholder: g } = s ?? {}, { header: y, footer: b } = o ?? {}, { collapsed: x, isMobile: T, setCollapsed: O } = C(), [k, A] = w.useState(""), j = !T && x, M = !x, P = (e) => {
|
|
280
315
|
i(e), T && O(!0);
|
|
281
316
|
}, F = k.trim().toLowerCase(), I = F === "" ? n : n.map((e) => ({
|
|
282
317
|
...e,
|
|
@@ -289,7 +324,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
289
324
|
className: e("px-4", c ? "pt-2" : "pt-4"),
|
|
290
325
|
children: /* @__PURE__ */ D("div", {
|
|
291
326
|
className: "relative",
|
|
292
|
-
children: [/* @__PURE__ */ E(
|
|
327
|
+
children: [/* @__PURE__ */ E(N, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-sidebar-muted" }), /* @__PURE__ */ E(d, {
|
|
293
328
|
type: "search",
|
|
294
329
|
value: k,
|
|
295
330
|
onChange: (e) => {
|
|
@@ -312,7 +347,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
312
347
|
children: t.title
|
|
313
348
|
}), /* @__PURE__ */ E("nav", {
|
|
314
349
|
className: e("flex flex-col", c ? "gap-0.5" : "gap-1"),
|
|
315
|
-
children: t.items.map((e, t) => /* @__PURE__ */ E(
|
|
350
|
+
children: t.items.map((e, t) => /* @__PURE__ */ E(B, {
|
|
316
351
|
...e,
|
|
317
352
|
currentPath: r,
|
|
318
353
|
collapsed: j,
|
|
@@ -329,7 +364,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
329
364
|
]
|
|
330
365
|
});
|
|
331
366
|
return T ? /* @__PURE__ */ E(v, {
|
|
332
|
-
open:
|
|
367
|
+
open: M,
|
|
333
368
|
onOpenChange: (e) => {
|
|
334
369
|
O(!e);
|
|
335
370
|
},
|
|
@@ -359,7 +394,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
359
394
|
children: L
|
|
360
395
|
})
|
|
361
396
|
});
|
|
362
|
-
},
|
|
397
|
+
}, H = ({ name: t = "appname", subName: n = "appsubname", icon: r, dense: i = !1 }) => {
|
|
363
398
|
let { collapsed: a, isMobile: o } = C(), s = !o && a;
|
|
364
399
|
return /* @__PURE__ */ D("div", {
|
|
365
400
|
className: e("flex items-center flex-shrink-0 gap-3 px-4", i ? "h-14" : "h-16 md:h-20", s ? "justify-center" : ""),
|
|
@@ -377,7 +412,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
377
412
|
})]
|
|
378
413
|
})]
|
|
379
414
|
});
|
|
380
|
-
},
|
|
415
|
+
}, U = ({ collapsed: t, isMobile: r, onToggleSidebar: i, actionsNode: a, userMenuNode: o }) => /* @__PURE__ */ D("header", {
|
|
381
416
|
className: e("fixed top-0 right-0 z-[60] h-16 md:h-20 bg-topbar text-topbar-foreground flex items-center justify-between px-4 transition-all duration-300", r && "left-0", !r && t && "left-[5rem]", !r && !t && "left-[16rem]"),
|
|
382
417
|
tabIndex: -1,
|
|
383
418
|
children: [/* @__PURE__ */ E("div", {
|
|
@@ -387,7 +422,7 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
387
422
|
size: "icon",
|
|
388
423
|
onClick: i,
|
|
389
424
|
className: "text-topbar-foreground hover:bg-topbar-accent hover:text-topbar-accent-foreground",
|
|
390
|
-
children: /* @__PURE__ */ E(
|
|
425
|
+
children: /* @__PURE__ */ E(M, { className: "size-4" })
|
|
391
426
|
})
|
|
392
427
|
}), /* @__PURE__ */ D("div", {
|
|
393
428
|
className: "flex items-center gap-2 md:gap-4 flex-shrink-0",
|
|
@@ -395,4 +430,4 @@ var P = ({ groups: r, search: i, onSearch: a, onSelect: o, loading: u = !1, open
|
|
|
395
430
|
})]
|
|
396
431
|
});
|
|
397
432
|
//#endregion
|
|
398
|
-
export {
|
|
433
|
+
export { R as a, B as i, H as n, I as o, V as r, U as t };
|
package/dist/pwa/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
2
|
import "./helpers/index.js";
|
|
3
|
-
import { t } from "./i18n-
|
|
3
|
+
import { t } from "./i18n-COxm2IKP.js";
|
|
4
4
|
import { a as n } from "./tooltip-_geGvbS7.js";
|
|
5
5
|
import * as r from "react";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./i18n-
|
|
2
|
-
import "./ErrorAlert-
|
|
1
|
+
import { t as e } from "./i18n-COxm2IKP.js";
|
|
2
|
+
import "./ErrorAlert-ZflPwfL1.js";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { Loader2Icon as r } from "lucide-react";
|
|
5
5
|
//#region src/components/core/states/ErrorState.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./i18n-
|
|
1
|
+
import { t as e } from "./i18n-COxm2IKP.js";
|
|
2
2
|
import { c as t, i as n, n as r, r as i, t as a } from "./tooltip-_geGvbS7.js";
|
|
3
3
|
import { i as o, l as s, n as c, t as l, u } from "./select-KWMg2_7Z.js";
|
|
4
|
-
import { t as d } from "./useTheme-
|
|
4
|
+
import { t as d } from "./useTheme-DVDPwbQ2.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/core/theme/ThemeSelector.tsx
|
|
@@ -3,10 +3,10 @@ import "./useToast-UeDRLovh.js";
|
|
|
3
3
|
import "./useMobile-pTQ8lWvt.js";
|
|
4
4
|
import "./useNotifications-CyhTruIG.js";
|
|
5
5
|
import "./useFixedColumns-B2yti0Rk.js";
|
|
6
|
-
import "./useDocumentTitle-
|
|
7
|
-
import "./useLanguage-
|
|
6
|
+
import "./useDocumentTitle-wGdjZMx6.js";
|
|
7
|
+
import "./useLanguage-JlBoVxev.js";
|
|
8
8
|
import "./constants/index.js";
|
|
9
|
-
import "./useTheme-
|
|
9
|
+
import "./useTheme-DVDPwbQ2.js";
|
|
10
10
|
import { useCallback as e, useEffect as t, useState as n } from "react";
|
|
11
11
|
//#region src/hooks/ui/useServerTable.ts
|
|
12
12
|
function r(r, i = "nom", a = {}) {
|
|
@@ -3,7 +3,7 @@ import "./helpers/index.js";
|
|
|
3
3
|
import "./chart-Dq3AIrue.js";
|
|
4
4
|
import "./alert-REQGK9bR.js";
|
|
5
5
|
import { c as t, l as n } from "./tooltip-_geGvbS7.js";
|
|
6
|
-
import "./sheet-
|
|
6
|
+
import "./sheet-B7qGvwk0.js";
|
|
7
7
|
import "./select-KWMg2_7Z.js";
|
|
8
8
|
import "./skeleton-D6Ga4BLw.js";
|
|
9
9
|
import { t as r } from "./useScrollFade-D9kqJBDh.js";
|