@etic-insa/ui 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +110 -63
  2. package/dist/components/etic/data-table.d.ts +13 -2
  3. package/dist/components/etic/data-table.js +227 -213
  4. package/dist/components/etic/data-table.js.map +1 -1
  5. package/dist/components/etic/empty-value.d.ts +17 -0
  6. package/dist/components/etic/empty-value.js +20 -0
  7. package/dist/components/etic/empty-value.js.map +1 -0
  8. package/dist/components/etic/external-link.d.ts +5 -2
  9. package/dist/components/etic/external-link.js +7 -3
  10. package/dist/components/etic/external-link.js.map +1 -1
  11. package/dist/components/etic/form-field.d.ts +6 -6
  12. package/dist/components/etic/form-field.js +40 -38
  13. package/dist/components/etic/form-field.js.map +1 -1
  14. package/dist/components/etic/lien.d.ts +22 -0
  15. package/dist/components/etic/lien.js +10 -1
  16. package/dist/components/etic/lien.js.map +1 -1
  17. package/dist/components/etic/save-bar.d.ts +16 -0
  18. package/dist/components/etic/save-bar.js +4 -1
  19. package/dist/components/etic/save-bar.js.map +1 -1
  20. package/dist/components/etic/search-select.js +77 -76
  21. package/dist/components/etic/search-select.js.map +1 -1
  22. package/dist/components/etic/unit-input.d.ts +25 -0
  23. package/dist/components/etic/unit-input.js +21 -0
  24. package/dist/components/etic/unit-input.js.map +1 -0
  25. package/dist/components/etic/use-unsaved-changes-guard.d.ts +32 -0
  26. package/dist/components/etic/use-unsaved-changes-guard.js +25 -0
  27. package/dist/components/etic/use-unsaved-changes-guard.js.map +1 -0
  28. package/dist/hooks/use-debounced-search.d.ts +2 -1
  29. package/dist/hooks/use-debounced-search.js.map +1 -1
  30. package/dist/hooks/use-debounced-value.js +8 -7
  31. package/dist/hooks/use-debounced-value.js.map +1 -1
  32. package/dist/index.d.ts +8 -4
  33. package/dist/index.js +122 -118
  34. package/dist/lib/delai-frappe.d.ts +3 -0
  35. package/dist/lib/delai-frappe.js +15 -0
  36. package/dist/lib/delai-frappe.js.map +1 -0
  37. package/dist/lib/format.d.ts +18 -0
  38. package/dist/lib/format.js +31 -24
  39. package/dist/lib/format.js.map +1 -1
  40. package/dist/lib/grouper.d.ts +20 -0
  41. package/dist/lib/grouper.js +16 -0
  42. package/dist/lib/grouper.js.map +1 -0
  43. package/dist/testing/controles.d.ts +35 -0
  44. package/dist/testing/controles.js +33 -0
  45. package/dist/testing/controles.js.map +1 -0
  46. package/dist/testing/index.d.ts +8 -0
  47. package/dist/testing/index.js +21 -17
  48. package/dist/testing/index.js.map +1 -1
  49. package/package.json +9 -1
package/dist/index.js CHANGED
@@ -1,120 +1,124 @@
1
1
  import { cn as e } from "./lib/utils.js";
2
2
  import { MOBILE_MEDIA_QUERY as t, useIsMobile as n } from "./hooks/use-mobile.js";
3
- import { accorde as r, capitaliser as i, compte as a, formaterAnciennete as o, formaterDate as s, formaterDateHeure as c, formaterDateHeureLongue as l, formaterDuree as u, formaterDureeArrondie as d, formaterDureePrecise as f, formaterHeure as p, formaterHorodatage as m, formaterMontant as h, formaterNombre as g, formaterOctets as _, formaterPourcentage as v, initiales as y, nombreFr as b, participe as x, uniteAccordee as S } from "./lib/format.js";
4
- import { ecrireDateIso as C, lireDateIso as w } from "./lib/dates.js";
5
- import { comparerFr as T, correspondance as E, normaliser as D, normaliserRecherche as O } from "./lib/normalize.js";
6
- import { NO_AUTOFILL as k } from "./lib/autofill.js";
7
- import { useDebouncedValue as A } from "./hooks/use-debounced-value.js";
8
- import { useDebouncedSearch as j } from "./hooks/use-debounced-search.js";
9
- import { useFreshDialog as M } from "./hooks/use-fresh-dialog.js";
10
- import { useLoadOnOpen as N } from "./hooks/use-load-on-open.js";
11
- import { useSaveByKey as P } from "./hooks/use-save-by-key.js";
12
- import { useDocumentTitle as F } from "./hooks/use-document-title.js";
13
- import { Alert as I, AlertAction as L, AlertDescription as R, AlertTitle as z } from "./components/ui/alert.js";
14
- import { AlertDialog as B, AlertDialogAction as V, AlertDialogCancel as H, AlertDialogContent as U, AlertDialogDescription as W, AlertDialogFooter as G, AlertDialogHeader as K, AlertDialogMedia as q, AlertDialogOverlay as J, AlertDialogPortal as Y, AlertDialogTitle as X, AlertDialogTrigger as Z } from "./components/ui/alert-dialog.js";
15
- import { Avatar as Q, AvatarBadge as $, AvatarFallback as ee, AvatarGroup as te, AvatarGroupCount as ne, AvatarImage as re } from "./components/ui/avatar.js";
16
- import { Badge as ie, badgeVariants as ae } from "./components/ui/badge.js";
17
- import { Breadcrumb as oe, BreadcrumbEllipsis as se, BreadcrumbItem as ce, BreadcrumbLink as le, BreadcrumbList as ue, BreadcrumbPage as de, BreadcrumbSeparator as fe } from "./components/ui/breadcrumb.js";
18
- import { Button as pe, buttonVariants as me } from "./components/ui/button.js";
19
- import { ButtonGroup as he, ButtonGroupSeparator as ge, ButtonGroupText as _e, buttonGroupVariants as ve } from "./components/ui/button-group.js";
20
- import { Calendar as ye, CalendarDayButton as be } from "./components/ui/calendar.js";
21
- import { Card as xe, CardAction as Se, CardContent as Ce, CardDescription as we, CardFooter as Te, CardHeader as Ee, CardTitle as De } from "./components/ui/card.js";
22
- import { Checkbox as Oe } from "./components/ui/checkbox.js";
23
- import { Collapsible as ke, CollapsibleContent as Ae, CollapsibleTrigger as je } from "./components/ui/collapsible.js";
24
- import { Combobox as Me, ComboboxChip as Ne, ComboboxChips as Pe, ComboboxChipsInput as Fe, ComboboxCollection as Ie, ComboboxContent as Le, ComboboxEmpty as Re, ComboboxGroup as ze, ComboboxInput as Be, ComboboxItem as Ve, ComboboxLabel as He, ComboboxList as Ue, ComboboxSeparator as We, ComboboxTrigger as Ge, ComboboxValue as Ke, useComboboxAnchor as qe } from "./components/ui/combobox.js";
25
- import { Dialog as Je, DialogBody as Ye, DialogClose as Xe, DialogContent as Ze, DialogDescription as Qe, DialogFooter as $e, DialogHeader as et, DialogOverlay as tt, DialogPortal as nt, DialogTitle as rt, DialogTrigger as it } from "./components/ui/dialog.js";
26
- import { DropdownMenu as at, DropdownMenuCheckboxItem as ot, DropdownMenuContent as st, DropdownMenuGroup as ct, DropdownMenuItem as lt, DropdownMenuLabel as ut, DropdownMenuPortal as dt, DropdownMenuRadioGroup as ft, DropdownMenuRadioItem as pt, DropdownMenuSeparator as mt, DropdownMenuShortcut as ht, DropdownMenuSub as gt, DropdownMenuSubContent as _t, DropdownMenuSubTrigger as vt, DropdownMenuTrigger as yt } from "./components/ui/dropdown-menu.js";
27
- import { Empty as bt, EmptyContent as xt, EmptyDescription as St, EmptyHeader as Ct, EmptyMedia as wt, EmptyTitle as Tt } from "./components/ui/empty.js";
28
- import { Field as Et, FieldContent as Dt, FieldDescription as Ot, FieldError as kt, FieldGroup as At, FieldLabel as jt, FieldLegend as Mt, FieldSeparator as Nt, FieldSet as Pt, FieldTitle as Ft } from "./components/ui/field.js";
29
- import { Input as It } from "./components/ui/input.js";
30
- import { InputGroup as Lt, InputGroupAddon as Rt, InputGroupButton as zt, InputGroupInput as Bt, InputGroupText as Vt, InputGroupTextarea as Ht } from "./components/ui/input-group.js";
31
- import { Item as Ut, ItemActions as Wt, ItemContent as Gt, ItemDescription as Kt, ItemFooter as qt, ItemGroup as Jt, ItemHeader as Yt, ItemMedia as Xt, ItemSeparator as Zt, ItemTitle as Qt } from "./components/ui/item.js";
32
- import { Kbd as $t, KbdGroup as en } from "./components/ui/kbd.js";
33
- import { Label as tn } from "./components/ui/label.js";
34
- import { NativeSelect as nn, NativeSelectOptGroup as rn, NativeSelectOption as an } from "./components/ui/native-select.js";
35
- import { Pagination as on, PaginationContent as sn, PaginationEllipsis as cn, PaginationItem as ln, PaginationLink as un, PaginationNext as dn, PaginationPrevious as fn } from "./components/ui/pagination.js";
36
- import { Popover as pn, PopoverContent as mn, PopoverDescription as hn, PopoverHeader as gn, PopoverTitle as _n, PopoverTrigger as vn } from "./components/ui/popover.js";
37
- import { Progress as yn, ProgressIndicator as bn, ProgressLabel as xn, ProgressTrack as Sn, ProgressValue as Cn } from "./components/ui/progress.js";
38
- import { RadioGroup as wn, RadioGroupItem as Tn } from "./components/ui/radio-group.js";
39
- import { ScrollArea as En, ScrollBar as Dn } from "./components/ui/scroll-area.js";
40
- import { Select as On, SelectContent as kn, SelectGroup as An, SelectItem as jn, SelectLabel as Mn, SelectScrollDownButton as Nn, SelectScrollUpButton as Pn, SelectSeparator as Fn, SelectTrigger as In, SelectValue as Ln } from "./components/ui/select.js";
41
- import { Separator as Rn } from "./components/ui/separator.js";
42
- import { Sheet as zn, SheetBody as Bn, SheetClose as Vn, SheetContent as Hn, SheetDescription as Un, SheetFooter as Wn, SheetHeader as Gn, SheetTitle as Kn, SheetTrigger as qn } from "./components/ui/sheet.js";
43
- import { Sidebar as Jn, SidebarContent as Yn, SidebarFooter as Xn, SidebarGroup as Zn, SidebarGroupAction as Qn, SidebarGroupContent as $n, SidebarGroupLabel as er, SidebarHeader as tr, SidebarInput as nr, SidebarInset as rr, SidebarMenu as ir, SidebarMenuAction as ar, SidebarMenuBadge as or, SidebarMenuButton as sr, SidebarMenuItem as cr, SidebarMenuSkeleton as lr, SidebarMenuSub as ur, SidebarMenuSubButton as dr, SidebarMenuSubItem as fr, SidebarProvider as pr, SidebarRail as mr, SidebarSeparator as hr, SidebarTrigger as gr, useSidebar as _r } from "./components/ui/sidebar.js";
44
- import { Skeleton as vr } from "./components/ui/skeleton.js";
45
- import { Slider as yr } from "./components/ui/slider.js";
46
- import { Spinner as br, SpinnerDecoratif as xr } from "./components/ui/spinner.js";
47
- import { Switch as Sr } from "./components/ui/switch.js";
48
- import { Table as Cr, TableBody as wr, TableCaption as Tr, TableCell as Er, TableFooter as Dr, TableHead as Or, TableHeader as kr, TableRow as Ar } from "./components/ui/table.js";
49
- import { Tabs as jr, TabsContent as Mr, TabsList as Nr, TabsTrigger as Pr, tabsListVariants as Fr } from "./components/ui/tabs.js";
50
- import { Textarea as Ir } from "./components/ui/textarea.js";
51
- import { Toggle as Lr, toggleVariants as Rr } from "./components/ui/toggle.js";
52
- import { ToggleGroup as zr, ToggleGroupItem as Br } from "./components/ui/toggle-group.js";
53
- import { Tooltip as Vr, TooltipContent as Hr, TooltipProvider as Ur, TooltipTrigger as Wr } from "./components/ui/tooltip.js";
54
- import { AppShell as Gr } from "./components/etic/app-shell.js";
55
- import { NavTabs as Kr } from "./components/etic/nav-tabs.js";
56
- import { LienProvider as qr, useLien as Jr } from "./components/etic/lien.js";
57
- import { ThemeMenu as Yr } from "./components/etic/theme-menu.js";
58
- import { appliquerTheme as Xr, useThemeApplique as Zr } from "./theme.js";
59
- import { fermerSaufEnCours as Qr } from "./components/etic/action.js";
60
- import { AuthAvatar as $r, AuthImage as ei, useAuthObjectUrl as ti, useAuthObjectUrlEtat as ni } from "./components/etic/auth-image.js";
61
- import { ButtonLink as ri } from "./components/etic/button-link.js";
62
- import { DropdownMenuExternalLink as ii, ExternalLink as ai } from "./components/etic/external-link.js";
63
- import { CenteredScreen as oi, MessageScreen as si } from "./components/etic/centered-screen.js";
64
- import { ConfirmDialog as ci } from "./components/etic/confirm-dialog.js";
65
- import { CopyButton as li } from "./components/etic/copy-button.js";
66
- import { DeleteButton as ui } from "./components/etic/delete-button.js";
67
- import { DetailItem as di, DetailList as fi } from "./components/etic/detail-list.js";
68
- import { DetailSheet as pi } from "./components/etic/detail-sheet.js";
69
- import { useDetailSheet as mi } from "./components/etic/use-detail-sheet.js";
70
- import { Disclosure as hi, DisclosureTrigger as gi } from "./components/etic/disclosure.js";
71
- import { DropdownMenuAction as _i } from "./components/etic/dropdown-menu-action.js";
72
- import { DraftResumeDialog as vi } from "./components/etic/draft-resume-dialog.js";
73
- import { EmptyState as yi, FilteredEmptyState as bi } from "./components/etic/empty-state.js";
74
- import { BoutonReessayer as xi, DetailTechnique as Si, ErrorBanner as Ci, ErrorBannerProvider as wi, decrireErreur as Ti } from "./components/etic/error-banner.js";
75
- import { ErrorBoundary as Ei } from "./components/etic/error-boundary.js";
76
- import { FormDialog as Di } from "./components/etic/form-dialog.js";
77
- import { IconToggle as Oi } from "./components/etic/icon-toggle.js";
78
- import { Loading as ki, SkeletonCard as Ai, SkeletonPage as ji, SkeletonTable as Mi } from "./components/etic/loading.js";
79
- import { DetailHeader as Ni, PageHeader as Pi } from "./components/etic/page-header.js";
80
- import { DetailMeta as Fi, DetailMetaLink as Ii } from "./components/etic/detail-meta.js";
81
- import { PageContainer as Li } from "./components/etic/page-container.js";
82
- import { QueryBoundary as Ri, QueryErrorBanner as zi } from "./components/etic/query-boundary.js";
83
- import { SectionCard as Bi } from "./components/etic/section-card.js";
84
- import { SubSection as Vi } from "./components/etic/sub-section.js";
85
- import { CodeBlock as Hi } from "./components/etic/code-block.js";
86
- import { StatTile as Ui } from "./components/etic/stat-tile.js";
87
- import { ProgressRing as Wi } from "./components/etic/progress-ring.js";
88
- import { VerdictPanel as Gi } from "./components/etic/verdict-panel.js";
89
- import { StatGrid as Ki } from "./components/etic/stat-grid.js";
90
- import { StatusBadge as qi } from "./components/etic/status-badge.js";
91
- import { RemovableBadge as Ji } from "./components/etic/removable-badge.js";
92
- import { ExplainedBadge as Yi } from "./components/etic/explained-badge.js";
93
- import { Toggletip as Xi } from "./components/etic/toggletip.js";
94
- import { SaveBar as Zi } from "./components/etic/save-bar.js";
95
- import { ResetButton as Qi } from "./components/etic/reset-button.js";
96
- import { TooltipButton as $i } from "./components/etic/tooltip-button.js";
97
- import { UnsavedChangesDialog as ea } from "./components/etic/unsaved-changes.js";
98
- import { useUnsavedChangesWarning as ta } from "./components/etic/use-unsaved-changes-warning.js";
99
- import { FormField as na, FormSection as ra, RequiredMark as ia } from "./components/etic/form-field.js";
100
- import { useFormField as aa } from "./components/etic/form-field-context.js";
101
- import { DatePicker as oa } from "./components/etic/date-picker.js";
102
- import { PhoneInput as sa, formaterTelephone as ca } from "./components/etic/phone-input.js";
103
- import { FileDropZone as la, FileUploadButton as ua, SelectedFile as da } from "./components/etic/file-upload.js";
104
- import { SelectField as fa } from "./components/etic/select-field.js";
105
- import { SegmentedControl as pa } from "./components/etic/segmented-control.js";
106
- import { CheckboxList as ma } from "./components/etic/checkbox-list.js";
107
- import { useDraftAutosave as ha } from "./components/etic/use-draft-autosave.js";
108
- import { SearchSelect as ga } from "./components/etic/search-select.js";
109
- import { DataTable as _a, DataTableCellLink as va, DataTableColumnHeader as ya, DataTableRowActions as ba, createDataTableColumnHelper as xa, dataTableActionsColumn as Sa, dataTableExpandColumn as Ca, dataTableFeatures as wa, dataTableSelectionColumn as Ta, useDataTable as Ea } from "./components/etic/data-table.js";
110
- import { focaliserTableau as Da } from "./components/etic/data-table-focus.js";
111
- import { DataTableBulkActions as Oa } from "./components/etic/data-table-bulk-actions.js";
112
- import { DataTablePagination as ka, LIMITES_PAGINATION as Aa } from "./components/etic/data-table-pagination.js";
113
- import { DataTableCount as ja, DataTableSelectFilter as Ma, DataTableToolbar as Na } from "./components/etic/data-table-toolbar.js";
114
- import { DataTableViewOptions as Pa } from "./components/etic/data-table-view-options.js";
115
- import { PorteeStockageLocal as Fa, usePersistedState as Ia } from "./hooks/use-persisted-state.js";
116
- import { useColumnPrefs as La } from "./hooks/use-column-prefs.js";
117
- import { useServerPagination as Ra } from "./components/etic/use-server-pagination.js";
118
- import { useServerSorting as za } from "./components/etic/use-server-sorting.js";
119
- import { useListUrlState as Ba } from "./hooks/use-list-url-state.js";
120
- export { I as Alert, L as AlertAction, R as AlertDescription, B as AlertDialog, V as AlertDialogAction, H as AlertDialogCancel, U as AlertDialogContent, W as AlertDialogDescription, G as AlertDialogFooter, K as AlertDialogHeader, q as AlertDialogMedia, J as AlertDialogOverlay, Y as AlertDialogPortal, X as AlertDialogTitle, Z as AlertDialogTrigger, z as AlertTitle, Gr as AppShell, $r as AuthAvatar, ei as AuthImage, Q as Avatar, $ as AvatarBadge, ee as AvatarFallback, te as AvatarGroup, ne as AvatarGroupCount, re as AvatarImage, ie as Badge, xi as BoutonReessayer, oe as Breadcrumb, se as BreadcrumbEllipsis, ce as BreadcrumbItem, le as BreadcrumbLink, ue as BreadcrumbList, de as BreadcrumbPage, fe as BreadcrumbSeparator, pe as Button, he as ButtonGroup, ge as ButtonGroupSeparator, _e as ButtonGroupText, ri as ButtonLink, ye as Calendar, be as CalendarDayButton, xe as Card, Se as CardAction, Ce as CardContent, we as CardDescription, Te as CardFooter, Ee as CardHeader, De as CardTitle, oi as CenteredScreen, Oe as Checkbox, ma as CheckboxList, Hi as CodeBlock, ke as Collapsible, Ae as CollapsibleContent, je as CollapsibleTrigger, Me as Combobox, Ne as ComboboxChip, Pe as ComboboxChips, Fe as ComboboxChipsInput, Ie as ComboboxCollection, Le as ComboboxContent, Re as ComboboxEmpty, ze as ComboboxGroup, Be as ComboboxInput, Ve as ComboboxItem, He as ComboboxLabel, Ue as ComboboxList, We as ComboboxSeparator, Ge as ComboboxTrigger, Ke as ComboboxValue, ci as ConfirmDialog, li as CopyButton, _a as DataTable, Oa as DataTableBulkActions, va as DataTableCellLink, ya as DataTableColumnHeader, ja as DataTableCount, ka as DataTablePagination, ba as DataTableRowActions, Ma as DataTableSelectFilter, Na as DataTableToolbar, Pa as DataTableViewOptions, oa as DatePicker, ui as DeleteButton, Ni as DetailHeader, di as DetailItem, fi as DetailList, Fi as DetailMeta, Ii as DetailMetaLink, pi as DetailSheet, Si as DetailTechnique, Je as Dialog, Ye as DialogBody, Xe as DialogClose, Ze as DialogContent, Qe as DialogDescription, $e as DialogFooter, et as DialogHeader, tt as DialogOverlay, nt as DialogPortal, rt as DialogTitle, it as DialogTrigger, hi as Disclosure, gi as DisclosureTrigger, vi as DraftResumeDialog, at as DropdownMenu, _i as DropdownMenuAction, ot as DropdownMenuCheckboxItem, st as DropdownMenuContent, ii as DropdownMenuExternalLink, ct as DropdownMenuGroup, lt as DropdownMenuItem, ut as DropdownMenuLabel, dt as DropdownMenuPortal, ft as DropdownMenuRadioGroup, pt as DropdownMenuRadioItem, mt as DropdownMenuSeparator, ht as DropdownMenuShortcut, gt as DropdownMenuSub, _t as DropdownMenuSubContent, vt as DropdownMenuSubTrigger, yt as DropdownMenuTrigger, bt as Empty, xt as EmptyContent, St as EmptyDescription, Ct as EmptyHeader, wt as EmptyMedia, yi as EmptyState, Tt as EmptyTitle, Ci as ErrorBanner, wi as ErrorBannerProvider, Ei as ErrorBoundary, Yi as ExplainedBadge, ai as ExternalLink, Et as Field, Dt as FieldContent, Ot as FieldDescription, kt as FieldError, At as FieldGroup, jt as FieldLabel, Mt as FieldLegend, Nt as FieldSeparator, Pt as FieldSet, Ft as FieldTitle, la as FileDropZone, ua as FileUploadButton, bi as FilteredEmptyState, Di as FormDialog, na as FormField, ra as FormSection, Oi as IconToggle, It as Input, Lt as InputGroup, Rt as InputGroupAddon, zt as InputGroupButton, Bt as InputGroupInput, Vt as InputGroupText, Ht as InputGroupTextarea, Ut as Item, Wt as ItemActions, Gt as ItemContent, Kt as ItemDescription, qt as ItemFooter, Jt as ItemGroup, Yt as ItemHeader, Xt as ItemMedia, Zt as ItemSeparator, Qt as ItemTitle, $t as Kbd, en as KbdGroup, Aa as LIMITES_PAGINATION, tn as Label, qr as LienProvider, ki as Loading, t as MOBILE_MEDIA_QUERY, si as MessageScreen, k as NO_AUTOFILL, nn as NativeSelect, rn as NativeSelectOptGroup, an as NativeSelectOption, Kr as NavTabs, Li as PageContainer, Pi as PageHeader, on as Pagination, sn as PaginationContent, cn as PaginationEllipsis, ln as PaginationItem, un as PaginationLink, dn as PaginationNext, fn as PaginationPrevious, sa as PhoneInput, pn as Popover, mn as PopoverContent, hn as PopoverDescription, gn as PopoverHeader, _n as PopoverTitle, vn as PopoverTrigger, Fa as PorteeStockageLocal, yn as Progress, bn as ProgressIndicator, xn as ProgressLabel, Wi as ProgressRing, Sn as ProgressTrack, Cn as ProgressValue, Ri as QueryBoundary, zi as QueryErrorBanner, wn as RadioGroup, Tn as RadioGroupItem, Ji as RemovableBadge, ia as RequiredMark, Qi as ResetButton, Zi as SaveBar, En as ScrollArea, Dn as ScrollBar, ga as SearchSelect, Bi as SectionCard, pa as SegmentedControl, On as Select, kn as SelectContent, fa as SelectField, An as SelectGroup, jn as SelectItem, Mn as SelectLabel, Nn as SelectScrollDownButton, Pn as SelectScrollUpButton, Fn as SelectSeparator, In as SelectTrigger, Ln as SelectValue, da as SelectedFile, Rn as Separator, zn as Sheet, Bn as SheetBody, Vn as SheetClose, Hn as SheetContent, Un as SheetDescription, Wn as SheetFooter, Gn as SheetHeader, Kn as SheetTitle, qn as SheetTrigger, Jn as Sidebar, Yn as SidebarContent, Xn as SidebarFooter, Zn as SidebarGroup, Qn as SidebarGroupAction, $n as SidebarGroupContent, er as SidebarGroupLabel, tr as SidebarHeader, nr as SidebarInput, rr as SidebarInset, ir as SidebarMenu, ar as SidebarMenuAction, or as SidebarMenuBadge, sr as SidebarMenuButton, cr as SidebarMenuItem, lr as SidebarMenuSkeleton, ur as SidebarMenuSub, dr as SidebarMenuSubButton, fr as SidebarMenuSubItem, pr as SidebarProvider, mr as SidebarRail, hr as SidebarSeparator, gr as SidebarTrigger, vr as Skeleton, Ai as SkeletonCard, ji as SkeletonPage, Mi as SkeletonTable, yr as Slider, br as Spinner, xr as SpinnerDecoratif, Ki as StatGrid, Ui as StatTile, qi as StatusBadge, Vi as SubSection, Sr as Switch, Cr as Table, wr as TableBody, Tr as TableCaption, Er as TableCell, Dr as TableFooter, Or as TableHead, kr as TableHeader, Ar as TableRow, jr as Tabs, Mr as TabsContent, Nr as TabsList, Pr as TabsTrigger, Ir as Textarea, Yr as ThemeMenu, Lr as Toggle, zr as ToggleGroup, Br as ToggleGroupItem, Xi as Toggletip, Vr as Tooltip, $i as TooltipButton, Hr as TooltipContent, Ur as TooltipProvider, Wr as TooltipTrigger, ea as UnsavedChangesDialog, Gi as VerdictPanel, r as accorde, Xr as appliquerTheme, ae as badgeVariants, ve as buttonGroupVariants, me as buttonVariants, i as capitaliser, e as cn, T as comparerFr, a as compte, E as correspondance, xa as createDataTableColumnHelper, Sa as dataTableActionsColumn, Ca as dataTableExpandColumn, wa as dataTableFeatures, Ta as dataTableSelectionColumn, Ti as decrireErreur, C as ecrireDateIso, Qr as fermerSaufEnCours, Da as focaliserTableau, o as formaterAnciennete, s as formaterDate, c as formaterDateHeure, l as formaterDateHeureLongue, u as formaterDuree, d as formaterDureeArrondie, f as formaterDureePrecise, p as formaterHeure, m as formaterHorodatage, h as formaterMontant, g as formaterNombre, _ as formaterOctets, v as formaterPourcentage, ca as formaterTelephone, y as initiales, w as lireDateIso, b as nombreFr, D as normaliser, O as normaliserRecherche, x as participe, Fr as tabsListVariants, Rr as toggleVariants, S as uniteAccordee, ti as useAuthObjectUrl, ni as useAuthObjectUrlEtat, La as useColumnPrefs, qe as useComboboxAnchor, Ea as useDataTable, j as useDebouncedSearch, A as useDebouncedValue, mi as useDetailSheet, F as useDocumentTitle, ha as useDraftAutosave, aa as useFormField, M as useFreshDialog, n as useIsMobile, Jr as useLien, Ba as useListUrlState, N as useLoadOnOpen, Ia as usePersistedState, P as useSaveByKey, Ra as useServerPagination, za as useServerSorting, _r as useSidebar, Zr as useThemeApplique, ta as useUnsavedChangesWarning };
3
+ import { accorde as r, capitaliser as i, compte as a, formaterAnciennete as o, formaterDate as s, formaterDateHeure as c, formaterDateHeureLongue as l, formaterDuree as u, formaterDureeArrondie as d, formaterDureePrecise as f, formaterHeure as p, formaterHorodatage as m, formaterMontant as h, formaterNombre as g, formaterOctets as _, formaterPourcentage as v, initiales as y, lireNombre as b, nombreFr as x, participe as S, uniteAccordee as C } from "./lib/format.js";
4
+ import { ecrireDateIso as w, lireDateIso as T } from "./lib/dates.js";
5
+ import { comparerFr as E, correspondance as D, normaliser as O, normaliserRecherche as k } from "./lib/normalize.js";
6
+ import { NO_AUTOFILL as A } from "./lib/autofill.js";
7
+ import { grouperPar as j } from "./lib/grouper.js";
8
+ import { useDebouncedValue as M } from "./hooks/use-debounced-value.js";
9
+ import { useDebouncedSearch as N } from "./hooks/use-debounced-search.js";
10
+ import { useFreshDialog as P } from "./hooks/use-fresh-dialog.js";
11
+ import { useLoadOnOpen as F } from "./hooks/use-load-on-open.js";
12
+ import { useSaveByKey as I } from "./hooks/use-save-by-key.js";
13
+ import { useDocumentTitle as L } from "./hooks/use-document-title.js";
14
+ import { Alert as R, AlertAction as z, AlertDescription as B, AlertTitle as V } from "./components/ui/alert.js";
15
+ import { AlertDialog as H, AlertDialogAction as U, AlertDialogCancel as W, AlertDialogContent as G, AlertDialogDescription as K, AlertDialogFooter as q, AlertDialogHeader as J, AlertDialogMedia as Y, AlertDialogOverlay as X, AlertDialogPortal as Z, AlertDialogTitle as Q, AlertDialogTrigger as $ } from "./components/ui/alert-dialog.js";
16
+ import { Avatar as ee, AvatarBadge as te, AvatarFallback as ne, AvatarGroup as re, AvatarGroupCount as ie, AvatarImage as ae } from "./components/ui/avatar.js";
17
+ import { Badge as oe, badgeVariants as se } from "./components/ui/badge.js";
18
+ import { Breadcrumb as ce, BreadcrumbEllipsis as le, BreadcrumbItem as ue, BreadcrumbLink as de, BreadcrumbList as fe, BreadcrumbPage as pe, BreadcrumbSeparator as me } from "./components/ui/breadcrumb.js";
19
+ import { Button as he, buttonVariants as ge } from "./components/ui/button.js";
20
+ import { ButtonGroup as _e, ButtonGroupSeparator as ve, ButtonGroupText as ye, buttonGroupVariants as be } from "./components/ui/button-group.js";
21
+ import { Calendar as xe, CalendarDayButton as Se } from "./components/ui/calendar.js";
22
+ import { Card as Ce, CardAction as we, CardContent as Te, CardDescription as Ee, CardFooter as De, CardHeader as Oe, CardTitle as ke } from "./components/ui/card.js";
23
+ import { Checkbox as Ae } from "./components/ui/checkbox.js";
24
+ import { Collapsible as je, CollapsibleContent as Me, CollapsibleTrigger as Ne } from "./components/ui/collapsible.js";
25
+ import { Combobox as Pe, ComboboxChip as Fe, ComboboxChips as Ie, ComboboxChipsInput as Le, ComboboxCollection as Re, ComboboxContent as ze, ComboboxEmpty as Be, ComboboxGroup as Ve, ComboboxInput as He, ComboboxItem as Ue, ComboboxLabel as We, ComboboxList as Ge, ComboboxSeparator as Ke, ComboboxTrigger as qe, ComboboxValue as Je, useComboboxAnchor as Ye } from "./components/ui/combobox.js";
26
+ import { Dialog as Xe, DialogBody as Ze, DialogClose as Qe, DialogContent as $e, DialogDescription as et, DialogFooter as tt, DialogHeader as nt, DialogOverlay as rt, DialogPortal as it, DialogTitle as at, DialogTrigger as ot } from "./components/ui/dialog.js";
27
+ import { DropdownMenu as st, DropdownMenuCheckboxItem as ct, DropdownMenuContent as lt, DropdownMenuGroup as ut, DropdownMenuItem as dt, DropdownMenuLabel as ft, DropdownMenuPortal as pt, DropdownMenuRadioGroup as mt, DropdownMenuRadioItem as ht, DropdownMenuSeparator as gt, DropdownMenuShortcut as _t, DropdownMenuSub as vt, DropdownMenuSubContent as yt, DropdownMenuSubTrigger as bt, DropdownMenuTrigger as xt } from "./components/ui/dropdown-menu.js";
28
+ import { Empty as St, EmptyContent as Ct, EmptyDescription as wt, EmptyHeader as Tt, EmptyMedia as Et, EmptyTitle as Dt } from "./components/ui/empty.js";
29
+ import { Field as Ot, FieldContent as kt, FieldDescription as At, FieldError as jt, FieldGroup as Mt, FieldLabel as Nt, FieldLegend as Pt, FieldSeparator as Ft, FieldSet as It, FieldTitle as Lt } from "./components/ui/field.js";
30
+ import { Input as Rt } from "./components/ui/input.js";
31
+ import { InputGroup as zt, InputGroupAddon as Bt, InputGroupButton as Vt, InputGroupInput as Ht, InputGroupText as Ut, InputGroupTextarea as Wt } from "./components/ui/input-group.js";
32
+ import { Item as Gt, ItemActions as Kt, ItemContent as qt, ItemDescription as Jt, ItemFooter as Yt, ItemGroup as Xt, ItemHeader as Zt, ItemMedia as Qt, ItemSeparator as $t, ItemTitle as en } from "./components/ui/item.js";
33
+ import { Kbd as tn, KbdGroup as nn } from "./components/ui/kbd.js";
34
+ import { Label as rn } from "./components/ui/label.js";
35
+ import { NativeSelect as an, NativeSelectOptGroup as on, NativeSelectOption as sn } from "./components/ui/native-select.js";
36
+ import { Pagination as cn, PaginationContent as ln, PaginationEllipsis as un, PaginationItem as dn, PaginationLink as fn, PaginationNext as pn, PaginationPrevious as mn } from "./components/ui/pagination.js";
37
+ import { Popover as hn, PopoverContent as gn, PopoverDescription as _n, PopoverHeader as vn, PopoverTitle as yn, PopoverTrigger as bn } from "./components/ui/popover.js";
38
+ import { Progress as xn, ProgressIndicator as Sn, ProgressLabel as Cn, ProgressTrack as wn, ProgressValue as Tn } from "./components/ui/progress.js";
39
+ import { RadioGroup as En, RadioGroupItem as Dn } from "./components/ui/radio-group.js";
40
+ import { ScrollArea as On, ScrollBar as kn } from "./components/ui/scroll-area.js";
41
+ import { Select as An, SelectContent as jn, SelectGroup as Mn, SelectItem as Nn, SelectLabel as Pn, SelectScrollDownButton as Fn, SelectScrollUpButton as In, SelectSeparator as Ln, SelectTrigger as Rn, SelectValue as zn } from "./components/ui/select.js";
42
+ import { Separator as Bn } from "./components/ui/separator.js";
43
+ import { Sheet as Vn, SheetBody as Hn, SheetClose as Un, SheetContent as Wn, SheetDescription as Gn, SheetFooter as Kn, SheetHeader as qn, SheetTitle as Jn, SheetTrigger as Yn } from "./components/ui/sheet.js";
44
+ import { Sidebar as Xn, SidebarContent as Zn, SidebarFooter as Qn, SidebarGroup as $n, SidebarGroupAction as er, SidebarGroupContent as tr, SidebarGroupLabel as nr, SidebarHeader as rr, SidebarInput as ir, SidebarInset as ar, SidebarMenu as or, SidebarMenuAction as sr, SidebarMenuBadge as cr, SidebarMenuButton as lr, SidebarMenuItem as ur, SidebarMenuSkeleton as dr, SidebarMenuSub as fr, SidebarMenuSubButton as pr, SidebarMenuSubItem as mr, SidebarProvider as hr, SidebarRail as gr, SidebarSeparator as _r, SidebarTrigger as vr, useSidebar as yr } from "./components/ui/sidebar.js";
45
+ import { Skeleton as br } from "./components/ui/skeleton.js";
46
+ import { Slider as xr } from "./components/ui/slider.js";
47
+ import { Spinner as Sr, SpinnerDecoratif as Cr } from "./components/ui/spinner.js";
48
+ import { Switch as wr } from "./components/ui/switch.js";
49
+ import { Table as Tr, TableBody as Er, TableCaption as Dr, TableCell as Or, TableFooter as kr, TableHead as Ar, TableHeader as jr, TableRow as Mr } from "./components/ui/table.js";
50
+ import { Tabs as Nr, TabsContent as Pr, TabsList as Fr, TabsTrigger as Ir, tabsListVariants as Lr } from "./components/ui/tabs.js";
51
+ import { Textarea as Rr } from "./components/ui/textarea.js";
52
+ import { Toggle as zr, toggleVariants as Br } from "./components/ui/toggle.js";
53
+ import { ToggleGroup as Vr, ToggleGroupItem as Hr } from "./components/ui/toggle-group.js";
54
+ import { Tooltip as Ur, TooltipContent as Wr, TooltipProvider as Gr, TooltipTrigger as Kr } from "./components/ui/tooltip.js";
55
+ import { AppShell as qr } from "./components/etic/app-shell.js";
56
+ import { NavTabs as Jr } from "./components/etic/nav-tabs.js";
57
+ import { LienProvider as Yr, creerLienRouteur as Xr, useLien as Zr } from "./components/etic/lien.js";
58
+ import { ThemeMenu as Qr } from "./components/etic/theme-menu.js";
59
+ import { appliquerTheme as $r, useThemeApplique as ei } from "./theme.js";
60
+ import { fermerSaufEnCours as ti } from "./components/etic/action.js";
61
+ import { AuthAvatar as ni, AuthImage as ri, useAuthObjectUrl as ii, useAuthObjectUrlEtat as ai } from "./components/etic/auth-image.js";
62
+ import { ButtonLink as oi } from "./components/etic/button-link.js";
63
+ import { DropdownMenuExternalLink as si, ExternalLink as ci, MarqueExterne as li, NOUVEL_ONGLET as ui } from "./components/etic/external-link.js";
64
+ import { CenteredScreen as di, MessageScreen as fi } from "./components/etic/centered-screen.js";
65
+ import { ConfirmDialog as pi } from "./components/etic/confirm-dialog.js";
66
+ import { CopyButton as mi } from "./components/etic/copy-button.js";
67
+ import { DeleteButton as hi } from "./components/etic/delete-button.js";
68
+ import { DetailItem as gi, DetailList as _i } from "./components/etic/detail-list.js";
69
+ import { DetailSheet as vi } from "./components/etic/detail-sheet.js";
70
+ import { useDetailSheet as yi } from "./components/etic/use-detail-sheet.js";
71
+ import { Disclosure as bi, DisclosureTrigger as xi } from "./components/etic/disclosure.js";
72
+ import { DropdownMenuAction as Si } from "./components/etic/dropdown-menu-action.js";
73
+ import { DraftResumeDialog as Ci } from "./components/etic/draft-resume-dialog.js";
74
+ import { EmptyValue as wi } from "./components/etic/empty-value.js";
75
+ import { EmptyState as Ti, FilteredEmptyState as Ei } from "./components/etic/empty-state.js";
76
+ import { BoutonReessayer as Di, DetailTechnique as Oi, ErrorBanner as ki, ErrorBannerProvider as Ai, decrireErreur as ji } from "./components/etic/error-banner.js";
77
+ import { ErrorBoundary as Mi } from "./components/etic/error-boundary.js";
78
+ import { FormDialog as Ni } from "./components/etic/form-dialog.js";
79
+ import { IconToggle as Pi } from "./components/etic/icon-toggle.js";
80
+ import { Loading as Fi, SkeletonCard as Ii, SkeletonPage as Li, SkeletonTable as Ri } from "./components/etic/loading.js";
81
+ import { DetailHeader as zi, PageHeader as Bi } from "./components/etic/page-header.js";
82
+ import { DetailMeta as Vi, DetailMetaLink as Hi } from "./components/etic/detail-meta.js";
83
+ import { PageContainer as Ui } from "./components/etic/page-container.js";
84
+ import { QueryBoundary as Wi, QueryErrorBanner as Gi } from "./components/etic/query-boundary.js";
85
+ import { SectionCard as Ki } from "./components/etic/section-card.js";
86
+ import { SubSection as qi } from "./components/etic/sub-section.js";
87
+ import { CodeBlock as Ji } from "./components/etic/code-block.js";
88
+ import { StatTile as Yi } from "./components/etic/stat-tile.js";
89
+ import { ProgressRing as Xi } from "./components/etic/progress-ring.js";
90
+ import { VerdictPanel as Zi } from "./components/etic/verdict-panel.js";
91
+ import { StatGrid as Qi } from "./components/etic/stat-grid.js";
92
+ import { StatusBadge as $i } from "./components/etic/status-badge.js";
93
+ import { RemovableBadge as ea } from "./components/etic/removable-badge.js";
94
+ import { ExplainedBadge as ta } from "./components/etic/explained-badge.js";
95
+ import { Toggletip as na } from "./components/etic/toggletip.js";
96
+ import { SaveBar as ra, retablirDefautsMasque as ia } from "./components/etic/save-bar.js";
97
+ import { ResetButton as aa } from "./components/etic/reset-button.js";
98
+ import { TooltipButton as oa } from "./components/etic/tooltip-button.js";
99
+ import { UnsavedChangesDialog as sa } from "./components/etic/unsaved-changes.js";
100
+ import { useUnsavedChangesWarning as ca } from "./components/etic/use-unsaved-changes-warning.js";
101
+ import { useUnsavedChangesGuard as la } from "./components/etic/use-unsaved-changes-guard.js";
102
+ import { FormField as ua, FormSection as da, RequiredMark as fa } from "./components/etic/form-field.js";
103
+ import { useFormField as pa } from "./components/etic/form-field-context.js";
104
+ import { DatePicker as ma } from "./components/etic/date-picker.js";
105
+ import { PhoneInput as ha, formaterTelephone as ga } from "./components/etic/phone-input.js";
106
+ import { FileDropZone as _a, FileUploadButton as va, SelectedFile as ya } from "./components/etic/file-upload.js";
107
+ import { SelectField as ba } from "./components/etic/select-field.js";
108
+ import { SegmentedControl as xa } from "./components/etic/segmented-control.js";
109
+ import { CheckboxList as Sa } from "./components/etic/checkbox-list.js";
110
+ import { useDraftAutosave as Ca } from "./components/etic/use-draft-autosave.js";
111
+ import { SearchSelect as wa } from "./components/etic/search-select.js";
112
+ import { UnitInput as Ta } from "./components/etic/unit-input.js";
113
+ import { DataTable as Ea, DataTableCellLink as Da, DataTableColumnHeader as Oa, DataTableRowActions as ka, createDataTableColumnHelper as Aa, dataTableActionsColumn as ja, dataTableExpandColumn as Ma, dataTableFeatures as Na, dataTableSelectionColumn as Pa, useDataTable as Fa } from "./components/etic/data-table.js";
114
+ import { focaliserTableau as Ia } from "./components/etic/data-table-focus.js";
115
+ import { DataTableBulkActions as La } from "./components/etic/data-table-bulk-actions.js";
116
+ import { DataTablePagination as Ra, LIMITES_PAGINATION as za } from "./components/etic/data-table-pagination.js";
117
+ import { DataTableCount as Ba, DataTableSelectFilter as Va, DataTableToolbar as Ha } from "./components/etic/data-table-toolbar.js";
118
+ import { DataTableViewOptions as Ua } from "./components/etic/data-table-view-options.js";
119
+ import { PorteeStockageLocal as Wa, usePersistedState as Ga } from "./hooks/use-persisted-state.js";
120
+ import { useColumnPrefs as Ka } from "./hooks/use-column-prefs.js";
121
+ import { useServerPagination as qa } from "./components/etic/use-server-pagination.js";
122
+ import { useServerSorting as Ja } from "./components/etic/use-server-sorting.js";
123
+ import { useListUrlState as Ya } from "./hooks/use-list-url-state.js";
124
+ export { R as Alert, z as AlertAction, B as AlertDescription, H as AlertDialog, U as AlertDialogAction, W as AlertDialogCancel, G as AlertDialogContent, K as AlertDialogDescription, q as AlertDialogFooter, J as AlertDialogHeader, Y as AlertDialogMedia, X as AlertDialogOverlay, Z as AlertDialogPortal, Q as AlertDialogTitle, $ as AlertDialogTrigger, V as AlertTitle, qr as AppShell, ni as AuthAvatar, ri as AuthImage, ee as Avatar, te as AvatarBadge, ne as AvatarFallback, re as AvatarGroup, ie as AvatarGroupCount, ae as AvatarImage, oe as Badge, Di as BoutonReessayer, ce as Breadcrumb, le as BreadcrumbEllipsis, ue as BreadcrumbItem, de as BreadcrumbLink, fe as BreadcrumbList, pe as BreadcrumbPage, me as BreadcrumbSeparator, he as Button, _e as ButtonGroup, ve as ButtonGroupSeparator, ye as ButtonGroupText, oi as ButtonLink, xe as Calendar, Se as CalendarDayButton, Ce as Card, we as CardAction, Te as CardContent, Ee as CardDescription, De as CardFooter, Oe as CardHeader, ke as CardTitle, di as CenteredScreen, Ae as Checkbox, Sa as CheckboxList, Ji as CodeBlock, je as Collapsible, Me as CollapsibleContent, Ne as CollapsibleTrigger, Pe as Combobox, Fe as ComboboxChip, Ie as ComboboxChips, Le as ComboboxChipsInput, Re as ComboboxCollection, ze as ComboboxContent, Be as ComboboxEmpty, Ve as ComboboxGroup, He as ComboboxInput, Ue as ComboboxItem, We as ComboboxLabel, Ge as ComboboxList, Ke as ComboboxSeparator, qe as ComboboxTrigger, Je as ComboboxValue, pi as ConfirmDialog, mi as CopyButton, Ea as DataTable, La as DataTableBulkActions, Da as DataTableCellLink, Oa as DataTableColumnHeader, Ba as DataTableCount, Ra as DataTablePagination, ka as DataTableRowActions, Va as DataTableSelectFilter, Ha as DataTableToolbar, Ua as DataTableViewOptions, ma as DatePicker, hi as DeleteButton, zi as DetailHeader, gi as DetailItem, _i as DetailList, Vi as DetailMeta, Hi as DetailMetaLink, vi as DetailSheet, Oi as DetailTechnique, Xe as Dialog, Ze as DialogBody, Qe as DialogClose, $e as DialogContent, et as DialogDescription, tt as DialogFooter, nt as DialogHeader, rt as DialogOverlay, it as DialogPortal, at as DialogTitle, ot as DialogTrigger, bi as Disclosure, xi as DisclosureTrigger, Ci as DraftResumeDialog, st as DropdownMenu, Si as DropdownMenuAction, ct as DropdownMenuCheckboxItem, lt as DropdownMenuContent, si as DropdownMenuExternalLink, ut as DropdownMenuGroup, dt as DropdownMenuItem, ft as DropdownMenuLabel, pt as DropdownMenuPortal, mt as DropdownMenuRadioGroup, ht as DropdownMenuRadioItem, gt as DropdownMenuSeparator, _t as DropdownMenuShortcut, vt as DropdownMenuSub, yt as DropdownMenuSubContent, bt as DropdownMenuSubTrigger, xt as DropdownMenuTrigger, St as Empty, Ct as EmptyContent, wt as EmptyDescription, Tt as EmptyHeader, Et as EmptyMedia, Ti as EmptyState, Dt as EmptyTitle, wi as EmptyValue, ki as ErrorBanner, Ai as ErrorBannerProvider, Mi as ErrorBoundary, ta as ExplainedBadge, ci as ExternalLink, Ot as Field, kt as FieldContent, At as FieldDescription, jt as FieldError, Mt as FieldGroup, Nt as FieldLabel, Pt as FieldLegend, Ft as FieldSeparator, It as FieldSet, Lt as FieldTitle, _a as FileDropZone, va as FileUploadButton, Ei as FilteredEmptyState, Ni as FormDialog, ua as FormField, da as FormSection, Pi as IconToggle, Rt as Input, zt as InputGroup, Bt as InputGroupAddon, Vt as InputGroupButton, Ht as InputGroupInput, Ut as InputGroupText, Wt as InputGroupTextarea, Gt as Item, Kt as ItemActions, qt as ItemContent, Jt as ItemDescription, Yt as ItemFooter, Xt as ItemGroup, Zt as ItemHeader, Qt as ItemMedia, $t as ItemSeparator, en as ItemTitle, tn as Kbd, nn as KbdGroup, za as LIMITES_PAGINATION, rn as Label, Yr as LienProvider, Fi as Loading, t as MOBILE_MEDIA_QUERY, li as MarqueExterne, fi as MessageScreen, ui as NOUVEL_ONGLET, A as NO_AUTOFILL, an as NativeSelect, on as NativeSelectOptGroup, sn as NativeSelectOption, Jr as NavTabs, Ui as PageContainer, Bi as PageHeader, cn as Pagination, ln as PaginationContent, un as PaginationEllipsis, dn as PaginationItem, fn as PaginationLink, pn as PaginationNext, mn as PaginationPrevious, ha as PhoneInput, hn as Popover, gn as PopoverContent, _n as PopoverDescription, vn as PopoverHeader, yn as PopoverTitle, bn as PopoverTrigger, Wa as PorteeStockageLocal, xn as Progress, Sn as ProgressIndicator, Cn as ProgressLabel, Xi as ProgressRing, wn as ProgressTrack, Tn as ProgressValue, Wi as QueryBoundary, Gi as QueryErrorBanner, En as RadioGroup, Dn as RadioGroupItem, ea as RemovableBadge, fa as RequiredMark, aa as ResetButton, ra as SaveBar, On as ScrollArea, kn as ScrollBar, wa as SearchSelect, Ki as SectionCard, xa as SegmentedControl, An as Select, jn as SelectContent, ba as SelectField, Mn as SelectGroup, Nn as SelectItem, Pn as SelectLabel, Fn as SelectScrollDownButton, In as SelectScrollUpButton, Ln as SelectSeparator, Rn as SelectTrigger, zn as SelectValue, ya as SelectedFile, Bn as Separator, Vn as Sheet, Hn as SheetBody, Un as SheetClose, Wn as SheetContent, Gn as SheetDescription, Kn as SheetFooter, qn as SheetHeader, Jn as SheetTitle, Yn as SheetTrigger, Xn as Sidebar, Zn as SidebarContent, Qn as SidebarFooter, $n as SidebarGroup, er as SidebarGroupAction, tr as SidebarGroupContent, nr as SidebarGroupLabel, rr as SidebarHeader, ir as SidebarInput, ar as SidebarInset, or as SidebarMenu, sr as SidebarMenuAction, cr as SidebarMenuBadge, lr as SidebarMenuButton, ur as SidebarMenuItem, dr as SidebarMenuSkeleton, fr as SidebarMenuSub, pr as SidebarMenuSubButton, mr as SidebarMenuSubItem, hr as SidebarProvider, gr as SidebarRail, _r as SidebarSeparator, vr as SidebarTrigger, br as Skeleton, Ii as SkeletonCard, Li as SkeletonPage, Ri as SkeletonTable, xr as Slider, Sr as Spinner, Cr as SpinnerDecoratif, Qi as StatGrid, Yi as StatTile, $i as StatusBadge, qi as SubSection, wr as Switch, Tr as Table, Er as TableBody, Dr as TableCaption, Or as TableCell, kr as TableFooter, Ar as TableHead, jr as TableHeader, Mr as TableRow, Nr as Tabs, Pr as TabsContent, Fr as TabsList, Ir as TabsTrigger, Rr as Textarea, Qr as ThemeMenu, zr as Toggle, Vr as ToggleGroup, Hr as ToggleGroupItem, na as Toggletip, Ur as Tooltip, oa as TooltipButton, Wr as TooltipContent, Gr as TooltipProvider, Kr as TooltipTrigger, Ta as UnitInput, sa as UnsavedChangesDialog, Zi as VerdictPanel, r as accorde, $r as appliquerTheme, se as badgeVariants, be as buttonGroupVariants, ge as buttonVariants, i as capitaliser, e as cn, E as comparerFr, a as compte, D as correspondance, Aa as createDataTableColumnHelper, Xr as creerLienRouteur, ja as dataTableActionsColumn, Ma as dataTableExpandColumn, Na as dataTableFeatures, Pa as dataTableSelectionColumn, ji as decrireErreur, w as ecrireDateIso, ti as fermerSaufEnCours, Ia as focaliserTableau, o as formaterAnciennete, s as formaterDate, c as formaterDateHeure, l as formaterDateHeureLongue, u as formaterDuree, d as formaterDureeArrondie, f as formaterDureePrecise, p as formaterHeure, m as formaterHorodatage, h as formaterMontant, g as formaterNombre, _ as formaterOctets, v as formaterPourcentage, ga as formaterTelephone, j as grouperPar, y as initiales, T as lireDateIso, b as lireNombre, x as nombreFr, O as normaliser, k as normaliserRecherche, S as participe, ia as retablirDefautsMasque, Lr as tabsListVariants, Br as toggleVariants, C as uniteAccordee, ii as useAuthObjectUrl, ai as useAuthObjectUrlEtat, Ka as useColumnPrefs, Ye as useComboboxAnchor, Fa as useDataTable, N as useDebouncedSearch, M as useDebouncedValue, yi as useDetailSheet, L as useDocumentTitle, Ca as useDraftAutosave, pa as useFormField, P as useFreshDialog, n as useIsMobile, Zr as useLien, Ya as useListUrlState, F as useLoadOnOpen, Ga as usePersistedState, I as useSaveByKey, qa as useServerPagination, Ja as useServerSorting, yr as useSidebar, ei as useThemeApplique, la as useUnsavedChangesGuard, ca as useUnsavedChangesWarning };
@@ -0,0 +1,3 @@
1
+ export declare function delaiFrappeParDefaut(): number;
2
+ /** Sans argument : retour à la pause d'origine. */
3
+ export declare function definirDelaiFrappe(millisecondes?: number): void;
@@ -0,0 +1,15 @@
1
+ // src/lib/delai-frappe.ts
2
+ var e = Symbol.for("@etic-insa/ui/delai-frappe"), t = 300;
3
+ function n() {
4
+ return globalThis[e] ?? t;
5
+ }
6
+ function r(t) {
7
+ if (t === void 0) delete globalThis[e];
8
+ else {
9
+ if (!Number.isFinite(t) || t < 0) throw RangeError(`Pause de frappe invalide : ${t} (un nombre de millisecondes ≥ 0).`);
10
+ globalThis[e] = t;
11
+ }
12
+ }
13
+ export { r as definirDelaiFrappe, n as delaiFrappeParDefaut };
14
+
15
+ //# sourceMappingURL=delai-frappe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delai-frappe.js","names":["CLE","DEFAUT","delaiFrappeParDefaut","definirDelaiFrappe","millisecondes"],"sources":["../../src/lib/delai-frappe.ts"],"sourcesContent":["/**\n * Pause de frappe par défaut des recherches (`SearchSelect`,\n * `useDebouncedValue`, `useDebouncedSearch`), en millisecondes : celle de tout\n * appel qui ne passe pas `delai`. Les tests la règlent par `setSearchDelay`\n * (`@etic-insa/ui/test`) ; une application n'a pas à y toucher.\n *\n * Rangée sur `globalThis`, pas dans une variable du module : une application\n * qui pré-assemble l'index pour ses tests (`deps.optimizer` de vitest) en a une\n * autre copie que `@etic-insa/ui/test`, et le réglage doit valoir pour les deux.\n */\nconst CLE = Symbol.for(\"@etic-insa/ui/delai-frappe\")\nconst DEFAUT = 300\n\ntype AvecDelai = { [CLE]?: number }\n\nexport function delaiFrappeParDefaut(): number {\n return (globalThis as AvecDelai)[CLE] ?? DEFAUT\n}\n\n/** Sans argument : retour à la pause d'origine. */\nexport function definirDelaiFrappe(millisecondes?: number): void {\n if (millisecondes === undefined) {\n delete (globalThis as AvecDelai)[CLE]\n return\n }\n if (!Number.isFinite(millisecondes) || millisecondes < 0)\n throw new RangeError(\n `Pause de frappe invalide : ${millisecondes} (un nombre de millisecondes ≥ 0).`\n )\n ;(globalThis as AvecDelai)[CLE] = millisecondes\n}\n"],"mappings":";AAUA,IAAMA,IAAM,OAAO,IAAI,4BAA4B,GAC7CC,IAAS;AAIf,SAAgBC,IAA+B;CAC7C,OAAQ,WAAyBF,MAAQC;AAC3C;AAGA,SAAgBE,EAAmB,GAA8B;CAC/D,IAAIC,MAAkB,KAAA,GACpB,OAAQ,WAAyBJ;MAGnC;MAAI,CAAC,OAAO,SAASI,CAAa,KAAKA,IAAgB,GACrD,MAAU,WACR,8BAA8BA,EAAc,mCAC9C;EACD,WAA0BJ,KAAOI;CADhC;AAEJ"}
@@ -23,6 +23,24 @@ export declare const accorde: (n: number, singulier: string, pluriel?: string) =
23
23
  export declare const compte: (n: number, singulier: string, pluriel?: string) => string;
24
24
  /** Nombre à la française (« 2,5 », « 1 234 ») ; le repli sans valeur. */
25
25
  export declare function formaterNombre(valeur: number | null | undefined, repli?: string): string;
26
+ /**
27
+ * Nombre saisi à la française, pendant de `formaterNombre` : `null` s'il
28
+ * n'est pas lisible (texte vide compris, jamais 0 par défaut). Admet la
29
+ * virgule ou le point décimal et les espaces, insécables compris
30
+ * (« 1 234,5 », tel que `formaterNombre` l'écrit). Avec `pourcentage`, un
31
+ * « % » final est toléré ; la valeur reste celle saisie (« 15 % » → 15, et
32
+ * non 0,15). Seule l'écriture décimale est admise : « 1e3 », « 0x10 » ou
33
+ * « Infinity », que `Number` accepterait, sont refusés.
34
+ *
35
+ * ```ts
36
+ * lireNombre("1 234,5") // 1234.5
37
+ * lireNombre("15 %", { pourcentage: true }) // 15
38
+ * lireNombre("") // null
39
+ * ```
40
+ */
41
+ export declare function lireNombre(texte: string, { pourcentage }?: {
42
+ pourcentage?: boolean;
43
+ }): number | null;
26
44
  /** Montant : « 1 234 € » s'il est rond, « 1 234,50 € » sinon (euros par
27
45
  * défaut, `devise` ISO 4217 sinon). */
28
46
  export declare function formaterMontant(valeur: number | null | undefined, { devise, repli }?: {
@@ -7,46 +7,53 @@ var t = (e) => e.toLocaleString("fr-FR"), n = (e, t) => e > 1 ? t.pluriel : t.si
7
7
  function s(e, n = "—") {
8
8
  return o(e) ? t(e) : n;
9
9
  }
10
- function c(e, { devise: t = "EUR", repli: n = "—" } = {}) {
10
+ var c = /^[+-]?(?:\d+\.?\d*|\.\d+)$/;
11
+ function l(e, { pourcentage: t = !1 } = {}) {
12
+ let n = e.replace(/\s/g, "");
13
+ if (t && (n = n.replace(/%$/, "")), n = n.replace(",", "."), !c.test(n)) return null;
14
+ let r = Number(n);
15
+ return Number.isFinite(r) ? r : null;
16
+ }
17
+ function u(e, { devise: t = "EUR", repli: n = "—" } = {}) {
11
18
  return o(e) ? e.toLocaleString("fr-FR", {
12
19
  style: "currency",
13
20
  currency: t,
14
21
  trailingZeroDisplay: "stripIfInteger"
15
22
  }) : n;
16
23
  }
17
- function l(e, { decimales: t = 0, repli: n = "—" } = {}) {
24
+ function d(e, { decimales: t = 0, repli: n = "—" } = {}) {
18
25
  return o(e) ? e.toLocaleString("fr-FR", {
19
26
  style: "percent",
20
27
  maximumFractionDigits: t
21
28
  }) : n;
22
29
  }
23
- function u(e) {
30
+ function f(e) {
24
31
  return e.charAt(0).toLocaleUpperCase("fr-FR") + e.slice(1);
25
32
  }
26
- function d(e, t) {
33
+ function p(e, t) {
27
34
  return ((e?.trim().split(/\s+/).filter(Boolean) ?? []).slice(0, 2).map((e) => e[0]).join("") || t?.trim()[0] || "?").toLocaleUpperCase("fr-FR");
28
35
  }
29
- var f = [
36
+ var m = [
30
37
  "o",
31
38
  "Ko",
32
39
  "Mo",
33
40
  "Go",
34
41
  "To"
35
42
  ];
36
- function p(e, t = "—") {
43
+ function h(e, t = "—") {
37
44
  if (e == null) return t;
38
45
  if (e === 0) return "0 o";
39
46
  let n = e, r = 0;
40
- for (; n >= 1024 && r < f.length - 1;) n /= 1024, r += 1;
47
+ for (; n >= 1024 && r < m.length - 1;) n /= 1024, r += 1;
41
48
  let i = n >= 100 || r === 0 ? 0 : 1;
42
- return `${n.toLocaleString("fr-FR", { maximumFractionDigits: i })} ${f[r]}`;
49
+ return `${n.toLocaleString("fr-FR", { maximumFractionDigits: i })} ${m[r]}`;
43
50
  }
44
- function m(e, t = "—") {
51
+ function g(e, t = "—") {
45
52
  if (e == null) return t;
46
53
  let n = Math.floor(e / 86400), r = Math.floor(e % 86400 / 3600), i = Math.floor(e % 3600 / 60);
47
54
  return n > 0 ? `${n} j ${r} h` : r > 0 ? `${r} h ${i} min` : i > 0 ? `${i} min` : `${Math.floor(e)} s`;
48
55
  }
49
- function h(e, t = "—") {
56
+ function _(e, t = "—") {
50
57
  if (!o(e)) return t;
51
58
  let n = Math.round(e);
52
59
  if (n < 1) return "moins d'une seconde";
@@ -54,55 +61,55 @@ function h(e, t = "—") {
54
61
  let r = Math.floor(n / 3600), i = Math.floor(n % 3600 / 60), a = String(n % 60).padStart(2, "0");
55
62
  return r === 0 ? `${i} min ${a} s` : `${r} h ${String(i).padStart(2, "0")} min ${a} s`;
56
63
  }
57
- function g(e) {
64
+ function v(e) {
58
65
  let t = Math.floor(e / 86400);
59
66
  if (t > 0) return `${t} j`;
60
67
  let n = Math.floor(e / 3600);
61
68
  return n > 0 ? `${n} h` : `${Math.floor(e / 60)} min`;
62
69
  }
63
- function _(e, { arrondie: t = !1, ilYA: n = !0, repli: r = "—" } = {}) {
70
+ function y(e, { arrondie: t = !1, ilYA: n = !0, repli: r = "—" } = {}) {
64
71
  if (!e) return r;
65
72
  let i = new Date(e).getTime();
66
73
  if (Number.isNaN(i)) return e;
67
74
  let a = (Date.now() - i) / 1e3;
68
75
  if (a < 60) return "à l'instant";
69
- let o = t ? g(a) : m(a);
76
+ let o = t ? v(a) : g(a);
70
77
  return n ? `il y a ${o}` : o;
71
78
  }
72
- function v(e) {
79
+ function b(e) {
73
80
  let t = new Date(e);
74
81
  return Number.isNaN(t.getTime()) ? null : t;
75
82
  }
76
- function y(t, n = "—") {
83
+ function x(t, n = "—") {
77
84
  if (!t) return n;
78
- let r = e(t) ?? v(t);
85
+ let r = e(t) ?? b(t);
79
86
  return r ? r.toLocaleDateString("fr-FR", {
80
87
  day: "2-digit",
81
88
  month: "long",
82
89
  year: "numeric"
83
90
  }) : t;
84
91
  }
85
- function b(e, t = "—") {
92
+ function S(e, t = "—") {
86
93
  if (!e) return t;
87
- let n = v(e);
94
+ let n = b(e);
88
95
  return n ? n.toLocaleString("fr-FR", {
89
96
  dateStyle: "short",
90
97
  timeStyle: "short"
91
98
  }) : e;
92
99
  }
93
- function x(e, t = "—") {
100
+ function C(e, t = "—") {
94
101
  if (!e) return t;
95
- let n = v(e);
102
+ let n = b(e);
96
103
  return n ? n.toLocaleString("fr-FR") : e;
97
104
  }
98
- function S(e, t = "—") {
105
+ function w(e, t = "—") {
99
106
  if (e == null || e === "" || typeof e == "number" && (!o(e) || e === 0)) return t;
100
107
  let n = new Date(e);
101
108
  return Number.isNaN(n.getTime()) ? String(e) : n.toLocaleTimeString("fr-FR", { timeStyle: "medium" });
102
109
  }
103
- function C(e, t = "—") {
110
+ function T(e, t = "—") {
104
111
  if (!e) return t;
105
- let n = v(e);
112
+ let n = b(e);
106
113
  return n ? n.toLocaleString("fr-FR", {
107
114
  day: "2-digit",
108
115
  month: "long",
@@ -111,6 +118,6 @@ function C(e, t = "—") {
111
118
  minute: "2-digit"
112
119
  }) : e;
113
120
  }
114
- export { i as accorde, u as capitaliser, a as compte, _ as formaterAnciennete, y as formaterDate, b as formaterDateHeure, C as formaterDateHeureLongue, m as formaterDuree, g as formaterDureeArrondie, h as formaterDureePrecise, S as formaterHeure, x as formaterHorodatage, c as formaterMontant, s as formaterNombre, p as formaterOctets, l as formaterPourcentage, d as initiales, t as nombreFr, r as participe, n as uniteAccordee };
121
+ export { i as accorde, f as capitaliser, a as compte, y as formaterAnciennete, x as formaterDate, S as formaterDateHeure, T as formaterDateHeureLongue, g as formaterDuree, v as formaterDureeArrondie, _ as formaterDureePrecise, w as formaterHeure, C as formaterHorodatage, u as formaterMontant, s as formaterNombre, h as formaterOctets, d as formaterPourcentage, p as initiales, l as lireNombre, t as nombreFr, r as participe, n as uniteAccordee };
115
122
 
116
123
  //# sourceMappingURL=format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","names":["nombreFr","n","uniteAccordee","unite","participe","base","feminin","accorde","pluriel","singulier","compte","fini","valeur","formaterNombre","repli","formaterMontant","devise","formaterPourcentage","fraction","decimales","capitaliser","texte","initiales","nom","mot","secours","UNITES_OCTETS","formaterOctets","octets","formaterDuree","secondes","j","h","min","formaterDureePrecise","total","s","formaterDureeArrondie","formaterAnciennete","instant","duree","arrondie","ilYA","lireInstant","date","formaterDate","lireDateIso","formaterDateHeure","formaterHorodatage","formaterHeure","formaterDateHeureLongue"],"sources":["../../src/lib/format.ts"],"sourcesContent":["/**\n * Textes chiffrés en français, communs à la suite : accords, nombres, octets,\n * durées et dates. Chaque formateur rend un repli (« — » par défaut) pour une\n * valeur absente, et rend telle quelle une date illisible (une valeur\n * inattendue de l'API reste visible au lieu de « Invalid Date »).\n */\n\nimport { lireDateIso } from \"@etic-ui/lib/dates\"\n\n// Accords et nombres\n\n/** Nom d'un élément, au singulier et au pluriel. */\nexport interface Unite {\n singulier: string\n pluriel: string\n}\n\n/** 1234 → « 1 234 » (espace fine insécable, comme `Intl`). */\nexport const nombreFr = (n: number) => n.toLocaleString(\"fr-FR\")\n\n/** Nom accordé au nombre : 0 et 1 au singulier, comme en français. */\nexport const uniteAccordee = (n: number, unite: Unite) =>\n n > 1 ? unite.pluriel : unite.singulier\n\n/** Participe accordé : `participe(\"sélectionné\", 3, true)` → « sélectionnées ». */\nexport const participe = (base: string, n: number, feminin: boolean) =>\n `${base}${feminin ? \"e\" : \"\"}${n > 1 ? \"s\" : \"\"}`\n\n/** Mot accordé au nombre : `accorde(3, \"ligne\")` → « lignes » ; pluriel\n * irrégulier en troisième argument (`accorde(2, \"journal\", \"journaux\")`). */\nexport const accorde = (n: number, singulier: string, pluriel?: string) =>\n uniteAccordee(n, { singulier, pluriel: pluriel ?? `${singulier}s` })\n\n/** Nombre et nom accordé : `compte(1234, \"ligne\")` → « 1 234 lignes »,\n * `compte(0, \"doublon\")` → « 0 doublon ». */\nexport const compte = (n: number, singulier: string, pluriel?: string) =>\n `${nombreFr(n)} ${accorde(n, singulier, pluriel)}`\n\n/** Un nombre fini, ou rien (absent, `NaN`, infini). */\nconst fini = (valeur: number | null | undefined): valeur is number =>\n typeof valeur === \"number\" && Number.isFinite(valeur)\n\n/** Nombre à la française (« 2,5 », « 1 234 ») ; le repli sans valeur. */\nexport function formaterNombre(\n valeur: number | null | undefined,\n repli = \"—\"\n): string {\n return fini(valeur) ? nombreFr(valeur) : repli\n}\n\n/** Montant : « 1 234 € » s'il est rond, « 1 234,50 € » sinon (euros par\n * défaut, `devise` ISO 4217 sinon). */\nexport function formaterMontant(\n valeur: number | null | undefined,\n { devise = \"EUR\", repli = \"—\" }: { devise?: string; repli?: string } = {}\n): string {\n if (!fini(valeur)) return repli\n return valeur.toLocaleString(\"fr-FR\", {\n style: \"currency\",\n currency: devise,\n trailingZeroDisplay: \"stripIfInteger\",\n })\n}\n\n/** Une fraction en pourcentage : 0,55 → « 55 % » ; `decimales` au plus\n * (0 par défaut : arrondi à l'unité). */\nexport function formaterPourcentage(\n fraction: number | null | undefined,\n { decimales = 0, repli = \"—\" }: { decimales?: number; repli?: string } = {}\n): string {\n if (!fini(fraction)) return repli\n return fraction.toLocaleString(\"fr-FR\", {\n style: \"percent\",\n maximumFractionDigits: decimales,\n })\n}\n\n/** Première lettre en capitale : un libellé servi en minuscules qui ouvre\n * une ligne (« en attente » → « En attente »). */\nexport function capitaliser(texte: string): string {\n return texte.charAt(0).toLocaleUpperCase(\"fr-FR\") + texte.slice(1)\n}\n\n/**\n * Initiales d'un nom affiché, pour un avatar : les deux premiers mots\n * (« Camille Martin » → « CM »), sinon la première lettre du `secours`\n * (l'adresse e-mail), sinon « ? ».\n */\nexport function initiales(\n nom: string | null | undefined,\n secours?: string | null\n): string {\n const mots = nom?.trim().split(/\\s+/).filter(Boolean) ?? []\n const lettres = mots\n .slice(0, 2)\n .map((mot) => mot[0])\n .join(\"\")\n return (lettres || secours?.trim()[0] || \"?\").toLocaleUpperCase(\"fr-FR\")\n}\n\n// Octets\n\nconst UNITES_OCTETS = [\"o\", \"Ko\", \"Mo\", \"Go\", \"To\"]\n\n/** Taille en octets, en base 1024 : « 0 o », « 512 o », « 1,5 Ko »,\n * « 120 Mo » (une décimale sous 100). */\nexport function formaterOctets(\n octets: number | null | undefined,\n repli = \"—\"\n): string {\n if (octets === null || octets === undefined) return repli\n if (octets === 0) return \"0 o\"\n let valeur = octets\n let unite = 0\n while (valeur >= 1024 && unite < UNITES_OCTETS.length - 1) {\n valeur /= 1024\n unite += 1\n }\n const decimales = valeur >= 100 || unite === 0 ? 0 : 1\n return `${valeur.toLocaleString(\"fr-FR\", { maximumFractionDigits: decimales })} ${UNITES_OCTETS[unite]}`\n}\n\n// Durées\n\n/** Durée en secondes, ses deux plus grandes unités : « 3 j 4 h »,\n * « 2 h 15 min », « 15 min », « 42 s ». */\nexport function formaterDuree(\n secondes: number | null | undefined,\n repli = \"—\"\n): string {\n if (secondes === null || secondes === undefined) return repli\n const j = Math.floor(secondes / 86400)\n const h = Math.floor((secondes % 86400) / 3600)\n const min = Math.floor((secondes % 3600) / 60)\n if (j > 0) return `${j} j ${h} h`\n if (h > 0) return `${h} h ${min} min`\n if (min > 0) return `${min} min`\n return `${Math.floor(secondes)} s`\n}\n\n/** Durée à la seconde, pour une opération qui se compte en secondes ou en\n * minutes (un traitement, un envoi) : « moins d'une seconde », « 23 s »,\n * « 1 min 05 s », « 1 h 02 min 05 s ». */\nexport function formaterDureePrecise(\n secondes: number | null | undefined,\n repli = \"—\"\n): string {\n if (!fini(secondes)) return repli\n const total = Math.round(secondes)\n if (total < 1) return \"moins d'une seconde\"\n if (total < 60) return `${total} s`\n const h = Math.floor(total / 3600)\n const min = Math.floor((total % 3600) / 60)\n const s = String(total % 60).padStart(2, \"0\")\n if (h === 0) return `${min} min ${s} s`\n return `${h} h ${String(min).padStart(2, \"0\")} min ${s} s`\n}\n\n/** L'ordre de grandeur d'une durée, sa plus grande unité seulement : « 3 j »,\n * « 18 h », « 15 min » (jamais en secondes : « 0 min » sous la minute). */\nexport function formaterDureeArrondie(secondes: number): string {\n const j = Math.floor(secondes / 86400)\n if (j > 0) return `${j} j`\n const h = Math.floor(secondes / 3600)\n if (h > 0) return `${h} h`\n return `${Math.floor(secondes / 60)} min`\n}\n\nexport interface AncienneteOptions {\n /** Plus grande unité seulement (« 3 j ») au lieu des deux (« 3 j 4 h »). */\n arrondie?: boolean\n /** Précédée de « il y a » (par défaut) ; `false` pour « 3 j » seul. */\n ilYA?: boolean\n /** Texte d'une valeur absente. */\n repli?: string\n}\n\n/** Ancienneté d'un instant ISO : « il y a 3 j 4 h », ou « à l'instant » sous\n * la minute (instant à venir compris). */\nexport function formaterAnciennete(\n valeur: string | null | undefined,\n { arrondie = false, ilYA = true, repli = \"—\" }: AncienneteOptions = {}\n): string {\n if (!valeur) return repli\n const instant = new Date(valeur).getTime()\n if (Number.isNaN(instant)) return valeur\n const secondes = (Date.now() - instant) / 1000\n if (secondes < 60) return \"à l'instant\"\n const duree = arrondie\n ? formaterDureeArrondie(secondes)\n : formaterDuree(secondes)\n return ilYA ? `il y a ${duree}` : duree\n}\n\n// Dates\n\nfunction lireInstant(valeur: string): Date | null {\n const date = new Date(valeur)\n return Number.isNaN(date.getTime()) ? null : date\n}\n\n/** Date seule, mois en lettres : « 05 juillet 2026 ». Une date sans heure\n * (`2026-07-05`, une date de naissance) est lue en heure locale : lue comme\n * minuit UTC, ce serait la veille à l'ouest de Greenwich. */\nexport function formaterDate(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireDateIso(valeur) ?? lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleDateString(\"fr-FR\", {\n day: \"2-digit\",\n month: \"long\",\n year: \"numeric\",\n })\n}\n\n/** Date et heure compactes, en chiffres : « 05/07/2026 14:30 ». */\nexport function formaterDateHeure(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleString(\"fr-FR\", {\n dateStyle: \"short\",\n timeStyle: \"short\",\n })\n}\n\n/** Date et heure à la seconde : « 05/07/2026 14:30:12 », là où l'instant\n * exact compte (journal, événements). */\nexport function formaterHorodatage(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleString(\"fr-FR\")\n}\n\n/** Heure seule, à la seconde : « 14:30:12 ». Accepte un instant en\n * millisecondes (`Date.now()`, `dataUpdatedAt` de TanStack Query) comme\n * une date ISO. Le repli pour `0` (`dataUpdatedAt` avant la première\n * réponse) et pour un nombre non fini. */\nexport function formaterHeure(\n valeur: number | string | null | undefined,\n repli = \"—\"\n): string {\n if (valeur === null || valeur === undefined || valeur === \"\") return repli\n if (typeof valeur === \"number\" && (!fini(valeur) || valeur === 0))\n return repli\n const date = new Date(valeur)\n if (Number.isNaN(date.getTime())) return String(valeur)\n return date.toLocaleTimeString(\"fr-FR\", { timeStyle: \"medium\" })\n}\n\n/** Date et heure, mois en lettres, pour une fiche : « 05 juillet 2026 à 14:30 ». */\nexport function formaterDateHeureLongue(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleString(\"fr-FR\", {\n day: \"2-digit\",\n month: \"long\",\n year: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n })\n}\n"],"mappings":";;AAkBA,IAAaA,KAAY,MAAcC,EAAE,eAAe,OAAO,GAGlDC,KAAiB,GAAW,MACvCD,IAAI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EACX,WAAW;CACb,CAAC,IAJiBhC;AAKpB;AAIA,SAAgBoC,EACd,GACA,IAAQ,KACA;CACR,IAAI,CAACpC,GAAQ,OAAOE;CACpB,IAAM8B,IAAOD,EAAY/B,CAAM;CAE/B,OADKgC,IACEA,EAAK,eAAe,OAAO,IADhBhC;AAEpB;AAMA,SAAgBqC,EACd,GACA,IAAQ,KACA;CAER,IADIrC,KAAW,QAAgCA,MAAW,MACtD,OAAOA,KAAW,aAAa,CAACD,EAAKC,CAAM,KAAKA,MAAW,IAC7D,OAAOE;CACT,IAAM8B,IAAO,IAAI,KAAKhC,CAAM;CAE5B,OADI,OAAO,MAAMgC,EAAK,QAAQ,CAAC,IAAU,OAAOhC,CAAM,IAC/CgC,EAAK,mBAAmB,SAAS,EAAE,WAAW,SAAS,CAAC;AACjE;AAGA,SAAgBM,EACd,GACA,IAAQ,KACA;CACR,IAAI,CAACtC,GAAQ,OAAOE;CACpB,IAAM8B,IAAOD,EAAY/B,CAAM;CAE/B,OADKgC,IACEA,EAAK,eAAe,SAAS;EAClC,KAAK;EACL,OAAO;EACP,MAAM;EACN,MAAM;EACN,QAAQ;CACV,CAAC,IAPiBhC;AAQpB"}
1
+ {"version":3,"file":"format.js","names":["nombreFr","n","uniteAccordee","unite","participe","base","feminin","accorde","pluriel","singulier","compte","fini","valeur","formaterNombre","repli","ECRITURE_DECIMALE","lireNombre","saisie","texte","pourcentage","nombre","formaterMontant","devise","formaterPourcentage","fraction","decimales","capitaliser","initiales","nom","mot","secours","UNITES_OCTETS","formaterOctets","octets","formaterDuree","secondes","j","h","min","formaterDureePrecise","total","s","formaterDureeArrondie","formaterAnciennete","instant","duree","arrondie","ilYA","lireInstant","date","formaterDate","lireDateIso","formaterDateHeure","formaterHorodatage","formaterHeure","formaterDateHeureLongue"],"sources":["../../src/lib/format.ts"],"sourcesContent":["/**\n * Textes chiffrés en français, communs à la suite : accords, nombres, octets,\n * durées et dates. Chaque formateur rend un repli (« — » par défaut) pour une\n * valeur absente, et rend telle quelle une date illisible (une valeur\n * inattendue de l'API reste visible au lieu de « Invalid Date »).\n */\n\nimport { lireDateIso } from \"@etic-ui/lib/dates\"\n\n// Accords et nombres\n\n/** Nom d'un élément, au singulier et au pluriel. */\nexport interface Unite {\n singulier: string\n pluriel: string\n}\n\n/** 1234 → « 1 234 » (espace fine insécable, comme `Intl`). */\nexport const nombreFr = (n: number) => n.toLocaleString(\"fr-FR\")\n\n/** Nom accordé au nombre : 0 et 1 au singulier, comme en français. */\nexport const uniteAccordee = (n: number, unite: Unite) =>\n n > 1 ? unite.pluriel : unite.singulier\n\n/** Participe accordé : `participe(\"sélectionné\", 3, true)` → « sélectionnées ». */\nexport const participe = (base: string, n: number, feminin: boolean) =>\n `${base}${feminin ? \"e\" : \"\"}${n > 1 ? \"s\" : \"\"}`\n\n/** Mot accordé au nombre : `accorde(3, \"ligne\")` → « lignes » ; pluriel\n * irrégulier en troisième argument (`accorde(2, \"journal\", \"journaux\")`). */\nexport const accorde = (n: number, singulier: string, pluriel?: string) =>\n uniteAccordee(n, { singulier, pluriel: pluriel ?? `${singulier}s` })\n\n/** Nombre et nom accordé : `compte(1234, \"ligne\")` → « 1 234 lignes »,\n * `compte(0, \"doublon\")` → « 0 doublon ». */\nexport const compte = (n: number, singulier: string, pluriel?: string) =>\n `${nombreFr(n)} ${accorde(n, singulier, pluriel)}`\n\n/** Un nombre fini, ou rien (absent, `NaN`, infini). */\nconst fini = (valeur: number | null | undefined): valeur is number =>\n typeof valeur === \"number\" && Number.isFinite(valeur)\n\n/** Nombre à la française (« 2,5 », « 1 234 ») ; le repli sans valeur. */\nexport function formaterNombre(\n valeur: number | null | undefined,\n repli = \"—\"\n): string {\n return fini(valeur) ? nombreFr(valeur) : repli\n}\n\n/** Écriture décimale, signe facultatif : « 12 », « -3.5 », « .5 », « 12. ». */\nconst ECRITURE_DECIMALE = /^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)$/\n\n/**\n * Nombre saisi à la française, pendant de `formaterNombre` : `null` s'il\n * n'est pas lisible (texte vide compris, jamais 0 par défaut). Admet la\n * virgule ou le point décimal et les espaces, insécables compris\n * (« 1 234,5 », tel que `formaterNombre` l'écrit). Avec `pourcentage`, un\n * « % » final est toléré ; la valeur reste celle saisie (« 15 % » → 15, et\n * non 0,15). Seule l'écriture décimale est admise : « 1e3 », « 0x10 » ou\n * « Infinity », que `Number` accepterait, sont refusés.\n *\n * ```ts\n * lireNombre(\"1 234,5\") // 1234.5\n * lireNombre(\"15 %\", { pourcentage: true }) // 15\n * lireNombre(\"\") // null\n * ```\n */\nexport function lireNombre(\n texte: string,\n { pourcentage = false }: { pourcentage?: boolean } = {}\n): number | null {\n let saisie = texte.replace(/\\s/g, \"\")\n if (pourcentage) saisie = saisie.replace(/%$/, \"\")\n saisie = saisie.replace(\",\", \".\")\n if (!ECRITURE_DECIMALE.test(saisie)) return null\n const nombre = Number(saisie)\n return Number.isFinite(nombre) ? nombre : null\n}\n\n/** Montant : « 1 234 € » s'il est rond, « 1 234,50 € » sinon (euros par\n * défaut, `devise` ISO 4217 sinon). */\nexport function formaterMontant(\n valeur: number | null | undefined,\n { devise = \"EUR\", repli = \"—\" }: { devise?: string; repli?: string } = {}\n): string {\n if (!fini(valeur)) return repli\n return valeur.toLocaleString(\"fr-FR\", {\n style: \"currency\",\n currency: devise,\n trailingZeroDisplay: \"stripIfInteger\",\n })\n}\n\n/** Une fraction en pourcentage : 0,55 → « 55 % » ; `decimales` au plus\n * (0 par défaut : arrondi à l'unité). */\nexport function formaterPourcentage(\n fraction: number | null | undefined,\n { decimales = 0, repli = \"—\" }: { decimales?: number; repli?: string } = {}\n): string {\n if (!fini(fraction)) return repli\n return fraction.toLocaleString(\"fr-FR\", {\n style: \"percent\",\n maximumFractionDigits: decimales,\n })\n}\n\n/** Première lettre en capitale : un libellé servi en minuscules qui ouvre\n * une ligne (« en attente » → « En attente »). */\nexport function capitaliser(texte: string): string {\n return texte.charAt(0).toLocaleUpperCase(\"fr-FR\") + texte.slice(1)\n}\n\n/**\n * Initiales d'un nom affiché, pour un avatar : les deux premiers mots\n * (« Camille Martin » → « CM »), sinon la première lettre du `secours`\n * (l'adresse e-mail), sinon « ? ».\n */\nexport function initiales(\n nom: string | null | undefined,\n secours?: string | null\n): string {\n const mots = nom?.trim().split(/\\s+/).filter(Boolean) ?? []\n const lettres = mots\n .slice(0, 2)\n .map((mot) => mot[0])\n .join(\"\")\n return (lettres || secours?.trim()[0] || \"?\").toLocaleUpperCase(\"fr-FR\")\n}\n\n// Octets\n\nconst UNITES_OCTETS = [\"o\", \"Ko\", \"Mo\", \"Go\", \"To\"]\n\n/** Taille en octets, en base 1024 : « 0 o », « 512 o », « 1,5 Ko »,\n * « 120 Mo » (une décimale sous 100). */\nexport function formaterOctets(\n octets: number | null | undefined,\n repli = \"—\"\n): string {\n if (octets === null || octets === undefined) return repli\n if (octets === 0) return \"0 o\"\n let valeur = octets\n let unite = 0\n while (valeur >= 1024 && unite < UNITES_OCTETS.length - 1) {\n valeur /= 1024\n unite += 1\n }\n const decimales = valeur >= 100 || unite === 0 ? 0 : 1\n return `${valeur.toLocaleString(\"fr-FR\", { maximumFractionDigits: decimales })} ${UNITES_OCTETS[unite]}`\n}\n\n// Durées\n\n/** Durée en secondes, ses deux plus grandes unités : « 3 j 4 h »,\n * « 2 h 15 min », « 15 min », « 42 s ». */\nexport function formaterDuree(\n secondes: number | null | undefined,\n repli = \"—\"\n): string {\n if (secondes === null || secondes === undefined) return repli\n const j = Math.floor(secondes / 86400)\n const h = Math.floor((secondes % 86400) / 3600)\n const min = Math.floor((secondes % 3600) / 60)\n if (j > 0) return `${j} j ${h} h`\n if (h > 0) return `${h} h ${min} min`\n if (min > 0) return `${min} min`\n return `${Math.floor(secondes)} s`\n}\n\n/** Durée à la seconde, pour une opération qui se compte en secondes ou en\n * minutes (un traitement, un envoi) : « moins d'une seconde », « 23 s »,\n * « 1 min 05 s », « 1 h 02 min 05 s ». */\nexport function formaterDureePrecise(\n secondes: number | null | undefined,\n repli = \"—\"\n): string {\n if (!fini(secondes)) return repli\n const total = Math.round(secondes)\n if (total < 1) return \"moins d'une seconde\"\n if (total < 60) return `${total} s`\n const h = Math.floor(total / 3600)\n const min = Math.floor((total % 3600) / 60)\n const s = String(total % 60).padStart(2, \"0\")\n if (h === 0) return `${min} min ${s} s`\n return `${h} h ${String(min).padStart(2, \"0\")} min ${s} s`\n}\n\n/** L'ordre de grandeur d'une durée, sa plus grande unité seulement : « 3 j »,\n * « 18 h », « 15 min » (jamais en secondes : « 0 min » sous la minute). */\nexport function formaterDureeArrondie(secondes: number): string {\n const j = Math.floor(secondes / 86400)\n if (j > 0) return `${j} j`\n const h = Math.floor(secondes / 3600)\n if (h > 0) return `${h} h`\n return `${Math.floor(secondes / 60)} min`\n}\n\nexport interface AncienneteOptions {\n /** Plus grande unité seulement (« 3 j ») au lieu des deux (« 3 j 4 h »). */\n arrondie?: boolean\n /** Précédée de « il y a » (par défaut) ; `false` pour « 3 j » seul. */\n ilYA?: boolean\n /** Texte d'une valeur absente. */\n repli?: string\n}\n\n/** Ancienneté d'un instant ISO : « il y a 3 j 4 h », ou « à l'instant » sous\n * la minute (instant à venir compris). */\nexport function formaterAnciennete(\n valeur: string | null | undefined,\n { arrondie = false, ilYA = true, repli = \"—\" }: AncienneteOptions = {}\n): string {\n if (!valeur) return repli\n const instant = new Date(valeur).getTime()\n if (Number.isNaN(instant)) return valeur\n const secondes = (Date.now() - instant) / 1000\n if (secondes < 60) return \"à l'instant\"\n const duree = arrondie\n ? formaterDureeArrondie(secondes)\n : formaterDuree(secondes)\n return ilYA ? `il y a ${duree}` : duree\n}\n\n// Dates\n\nfunction lireInstant(valeur: string): Date | null {\n const date = new Date(valeur)\n return Number.isNaN(date.getTime()) ? null : date\n}\n\n/** Date seule, mois en lettres : « 05 juillet 2026 ». Une date sans heure\n * (`2026-07-05`, une date de naissance) est lue en heure locale : lue comme\n * minuit UTC, ce serait la veille à l'ouest de Greenwich. */\nexport function formaterDate(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireDateIso(valeur) ?? lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleDateString(\"fr-FR\", {\n day: \"2-digit\",\n month: \"long\",\n year: \"numeric\",\n })\n}\n\n/** Date et heure compactes, en chiffres : « 05/07/2026 14:30 ». */\nexport function formaterDateHeure(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleString(\"fr-FR\", {\n dateStyle: \"short\",\n timeStyle: \"short\",\n })\n}\n\n/** Date et heure à la seconde : « 05/07/2026 14:30:12 », là où l'instant\n * exact compte (journal, événements). */\nexport function formaterHorodatage(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleString(\"fr-FR\")\n}\n\n/** Heure seule, à la seconde : « 14:30:12 ». Accepte un instant en\n * millisecondes (`Date.now()`, `dataUpdatedAt` de TanStack Query) comme\n * une date ISO. Le repli pour `0` (`dataUpdatedAt` avant la première\n * réponse) et pour un nombre non fini. */\nexport function formaterHeure(\n valeur: number | string | null | undefined,\n repli = \"—\"\n): string {\n if (valeur === null || valeur === undefined || valeur === \"\") return repli\n if (typeof valeur === \"number\" && (!fini(valeur) || valeur === 0))\n return repli\n const date = new Date(valeur)\n if (Number.isNaN(date.getTime())) return String(valeur)\n return date.toLocaleTimeString(\"fr-FR\", { timeStyle: \"medium\" })\n}\n\n/** Date et heure, mois en lettres, pour une fiche : « 05 juillet 2026 à 14:30 ». */\nexport function formaterDateHeureLongue(\n valeur: string | null | undefined,\n repli = \"—\"\n): string {\n if (!valeur) return repli\n const date = lireInstant(valeur)\n if (!date) return valeur\n return date.toLocaleString(\"fr-FR\", {\n day: \"2-digit\",\n month: \"long\",\n year: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n })\n}\n"],"mappings":";;AAkBA,I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