@alfadocs/ui-kit 0.19.0 → 0.20.1

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 (84) hide show
  1. package/dist/_chunks/_commonjsHelpers-DaMA6jEr.js +9 -0
  2. package/dist/_chunks/{ai-prompt-input-B-w5Rx3V.js → ai-prompt-input-B5MdixzR.js} +2 -2
  3. package/dist/_chunks/{alert-DBnawbmf.js → alert-ywPR59NE.js} +14 -1
  4. package/dist/_chunks/{leo-sidebar-DIsiTju3.js → alia-sidebar-Bof6TlFx.js} +211 -211
  5. package/dist/_chunks/{audio-recorder-DNkQLW1G.js → audio-recorder-D4xM3H5i.js} +2 -2
  6. package/dist/_chunks/{chat-message-g3lxpXM_.js → chat-message-ChOnwqf_.js} +5 -5
  7. package/dist/_chunks/editable-currency-cell-renderer-Dn3-ANF5.js +1932 -0
  8. package/dist/_chunks/{email-input-DKN5JERd.js → email-input-DvJ_kPKL.js} +2 -2
  9. package/dist/_chunks/exceljs.min-DUJ-5CGx.js +23045 -0
  10. package/dist/_chunks/file-spreadsheet-zUkY8rJ2.js +25 -0
  11. package/dist/_chunks/{file-upload-nMh-1jDD.js → file-upload-DxAQprcU.js} +103 -122
  12. package/dist/_chunks/{freemium-paywall-DXc7XlGE.js → freemium-paywall-CM6V1zNf.js} +2 -2
  13. package/dist/_chunks/grip-vertical-Dlg0_k5C.js +19 -0
  14. package/dist/_chunks/html2canvas.esm-dgT_1dIT.js +4872 -0
  15. package/dist/_chunks/{index-CFoBa86t.js → index-BcMWc8W2.js} +2 -2
  16. package/dist/_chunks/index.es-B8zMZ1wV.js +6694 -0
  17. package/dist/_chunks/jspdf.es.min-DaapWjR1.js +10007 -0
  18. package/dist/_chunks/jspdf.plugin.autotable-CSiDNyPn.js +1088 -0
  19. package/dist/_chunks/{map-view-DVP-Kp9l.js → map-view-CcwycFQX.js} +2 -2
  20. package/dist/_chunks/{patient-shell-Dr64lBp_.js → patient-shell-DavGODt9.js} +2 -2
  21. package/dist/_chunks/{payment-form-BjkuQeqR.js → payment-form-F7uh0Rqr.js} +2 -2
  22. package/dist/_chunks/{pdf-viewer-BG_nsFT5.js → pdf-viewer-CuYaVR1I.js} +2 -2
  23. package/dist/_chunks/{purify.es-DpIUMBYC.js → purify.es-Cm3utOpm.js} +2 -2
  24. package/dist/_chunks/{rich-text-editor-C7TCIlQO.js → rich-text-editor-J-wAz9eN.js} +22 -22
  25. package/dist/_chunks/{sidebar-BqzlRBvC.js → sidebar-DkyC6GvS.js} +167 -180
  26. package/dist/_chunks/{suggestion-chip-C4Jz0LrM.js → suggestion-chip-C4kxWUIs.js} +2 -2
  27. package/dist/_chunks/{warning-stack-CDH9TudY.js → warning-stack-bDicCvxs.js} +2 -2
  28. package/dist/_chunks/{workflow-map-BeKe23uw.js → workflow-map-BkLglexk.js} +2 -2
  29. package/dist/agent-catalog.json +1 -1
  30. package/dist/components/ai-prompt-input/index.js +1 -1
  31. package/dist/components/alert/index.js +1 -1
  32. package/dist/components/app-frame/app-frame.d.ts +1 -1
  33. package/dist/components/audio-recorder/index.js +1 -1
  34. package/dist/components/chat-container/chat-container.d.ts +1 -1
  35. package/dist/components/chat-message/chat-message.d.ts +1 -1
  36. package/dist/components/chat-message/index.js +1 -1
  37. package/dist/components/data-table/cell-renderers/balance-cell-renderer.d.ts +37 -0
  38. package/dist/components/data-table/cell-renderers/editable-currency-cell-renderer.d.ts +23 -0
  39. package/dist/components/data-table/cell-renderers/editable-text-cell-renderer.d.ts +11 -0
  40. package/dist/components/data-table/cell-renderers/image-cell-renderer.d.ts +19 -0
  41. package/dist/components/data-table/cell-renderers/toggle-cell-renderer.d.ts +15 -3
  42. package/dist/components/data-table/data-table.d.ts +30 -3
  43. package/dist/components/data-table/filters/date-range-filter.d.ts +30 -0
  44. package/dist/components/data-table/filters/select-filter.d.ts +64 -0
  45. package/dist/components/data-table/filters/typeahead-filter.d.ts +49 -0
  46. package/dist/components/data-table/index.d.ts +13 -2
  47. package/dist/components/data-table/index.js +24 -14
  48. package/dist/components/data-table/toolbar.d.ts +80 -1
  49. package/dist/components/email-input/index.js +1 -1
  50. package/dist/components/file-upload/index.js +1 -1
  51. package/dist/components/freemium-paywall/index.js +1 -1
  52. package/dist/components/index.d.ts +1 -1
  53. package/dist/components/map-view/index.js +1 -1
  54. package/dist/components/payment-form/index.js +1 -1
  55. package/dist/components/pdf-viewer/index.js +1 -1
  56. package/dist/components/rich-text-editor/index.js +1 -1
  57. package/dist/components/sidebar/index.js +1 -1
  58. package/dist/components/suggestion-chip/index.js +1 -1
  59. package/dist/components/warning-stack/index.js +1 -1
  60. package/dist/components/workflow/index.js +1 -1
  61. package/dist/i18n/config.js +81 -13
  62. package/dist/i18n/resources.d.ts +77 -9
  63. package/dist/index.js +421 -411
  64. package/dist/locales/de.json +13 -3
  65. package/dist/locales/en.json +32 -3
  66. package/dist/locales/it.json +32 -3
  67. package/dist/patterns/alia-assistant/alia-chat-surface.d.ts +3 -0
  68. package/dist/patterns/alia-assistant/alia-embedded.d.ts +13 -0
  69. package/dist/patterns/{leo-assistant/leo-popout.d.ts → alia-assistant/alia-popout.d.ts} +4 -4
  70. package/dist/patterns/{leo-assistant/leo-sidebar.d.ts → alia-assistant/alia-sidebar.d.ts} +10 -10
  71. package/dist/patterns/{leo-assistant/leo-types.d.ts → alia-assistant/alia-types.d.ts} +23 -23
  72. package/dist/patterns/alia-assistant/index.d.ts +20 -0
  73. package/dist/patterns/alia-assistant/index.js +8 -0
  74. package/dist/patterns/patient-shell/index.js +1 -1
  75. package/dist/patterns/patient-shell/patient-shell.d.ts +1 -1
  76. package/dist/safe-html/index.js +6 -6
  77. package/dist/tokens.css +2 -2
  78. package/package.json +7 -4
  79. package/dist/_chunks/_commonjsHelpers-C6fGbg64.js +0 -7
  80. package/dist/_chunks/balance-cell-renderer-DJB6WDPe.js +0 -1015
  81. package/dist/patterns/leo-assistant/index.d.ts +0 -20
  82. package/dist/patterns/leo-assistant/index.js +0 -8
  83. package/dist/patterns/leo-assistant/leo-chat-surface.d.ts +0 -3
  84. package/dist/patterns/leo-assistant/leo-embedded.d.ts +0 -13
@@ -5,7 +5,7 @@ import { useTranslation as J } from "react-i18next";
5
5
  const Q = q(
6
6
  [
7
7
  // `max-w-full` keeps a chip from blowing past its container when the
8
- // label is long and the container is narrow (e.g. a 22rem Leo sidebar
8
+ // label is long and the container is narrow (e.g. a 22rem Alia sidebar
9
9
  // dock). Labels wrap onto multiple lines via `whitespace-normal` +
10
10
  // `break-words` so the full text stays legible — rounded pills grow
11
11
  // taller rather than hiding content behind an ellipsis.
@@ -164,4 +164,4 @@ export {
164
164
  X as S,
165
165
  W as a
166
166
  };
167
- //# sourceMappingURL=suggestion-chip-C4Jz0LrM.js.map
167
+ //# sourceMappingURL=suggestion-chip-C4kxWUIs.js.map
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as M, useId as N, useState as O, useRef as y, useEffect as V, useMemo as _, useCallback as j } from "react";
3
3
  import { c as W } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as q } from "react-i18next";
5
- import { A as u } from "./alert-DBnawbmf.js";
5
+ import { A as u } from "./alert-ywPR59NE.js";
6
6
  import { B as F } from "./button-DD_0Xdmr.js";
7
7
  import { C as H } from "./chevron-down-BX_NP2Yh.js";
8
8
  const L = W(
@@ -176,4 +176,4 @@ P.displayName = "WarningStack";
176
176
  export {
177
177
  P as W
178
178
  };
179
- //# sourceMappingURL=warning-stack-CDH9TudY.js.map
179
+ //# sourceMappingURL=warning-stack-bDicCvxs.js.map
@@ -10,7 +10,7 @@ import { I as S } from "./icon-button-C4CGcYuz.js";
10
10
  import { c as _ } from "./createLucideIcon-CrFbzy84.js";
11
11
  import { C as Ne } from "./circle-BkqTgYmt.js";
12
12
  import { u as Ce } from "./registry-C9nwlNyL.js";
13
- import { A as V } from "./alert-DBnawbmf.js";
13
+ import { A as V } from "./alert-ywPR59NE.js";
14
14
  import { B as _e } from "./button-DD_0Xdmr.js";
15
15
  import { D as N } from "./dropdown-menu-DZxwF23X.js";
16
16
  import { E } from "./empty-state-3CLJIXSj.js";
@@ -1412,4 +1412,4 @@ export {
1412
1412
  ee as r,
1413
1413
  D as w
1414
1414
  };
1415
- //# sourceMappingURL=workflow-map-BeKe23uw.js.map
1415
+ //# sourceMappingURL=workflow-map-BkLglexk.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.19.0",
3
+ "packageVersion": "0.20.1",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { A as a, a as o } from "../../_chunks/ai-prompt-input-B-w5Rx3V.js";
1
+ import { A as a, a as o } from "../../_chunks/ai-prompt-input-B5MdixzR.js";
2
2
  export {
3
3
  a as AIPromptInput,
4
4
  o as aiPromptInputAgent
@@ -1,4 +1,4 @@
1
- import { A as o } from "../../_chunks/alert-DBnawbmf.js";
1
+ import { A as o } from "../../_chunks/alert-ywPR59NE.js";
2
2
  export {
3
3
  o as Alert
4
4
  };
@@ -10,7 +10,7 @@ export interface AppFrameProps extends Omit<HTMLAttributes<HTMLDivElement>, 'chi
10
10
  sidebar: ReactNode;
11
11
  /** Main content — rendered inside a `<main>` landmark. */
12
12
  children: ReactNode;
13
- /** Optional inline-end docked panel (typically `<LeoSidebar />`) sharing the same row as the main region on ≥ md viewports. Hidden on narrow viewports — consumers should flip to an overlay/popout mode there. */
13
+ /** Optional inline-end docked panel (typically `<AliaSidebar />`) sharing the same row as the main region on ≥ md viewports. Hidden on narrow viewports — consumers should flip to an overlay/popout mode there. */
14
14
  endSidebar?: ReactNode;
15
15
  /** Optional block-end footer — renders full-width below the sidebar + main row. */
16
16
  footer?: ReactNode;
@@ -1,4 +1,4 @@
1
- import { A as r, a } from "../../_chunks/audio-recorder-DNkQLW1G.js";
1
+ import { A as r, a } from "../../_chunks/audio-recorder-D4xM3H5i.js";
2
2
  export {
3
3
  r as AudioRecorder,
4
4
  a as audioRecorderAgent
@@ -28,7 +28,7 @@ export interface ChatContainerProps extends Omit<HTMLAttributes<HTMLDivElement>,
28
28
  * away from the newest message. Defaults to `false` because the
29
29
  * affordance is only useful in long-form chat surfaces (fullscreen
30
30
  * assistants, dedicated messaging views); in compact docks — e.g. the
31
- * Leo side-panel — conversations rarely exceed one screen and the FAB
31
+ * Alia side-panel — conversations rarely exceed one screen and the FAB
32
32
  * just adds visual noise. Turn on for fullscreen chat surfaces.
33
33
  */
34
34
  showScrollToLatest?: boolean;
@@ -7,7 +7,7 @@ export interface ChatMessageAvatar {
7
7
  src?: string;
8
8
  /**
9
9
  * Optional custom avatar node. When provided, it REPLACES the built-in
10
- * `<Avatar>` (initials / image) for this message. Used by the Leo
10
+ * `<Avatar>` (initials / image) for this message. Used by the Alia
11
11
  * pattern to render a Sparkles identity tile instead of an avatar, and
12
12
  * by consumers that want to swap in a user-icon chip, brand glyph, etc.
13
13
  * The caller is responsible for accessible labelling on the custom node
@@ -1,4 +1,4 @@
1
- import { C as s } from "../../_chunks/chat-message-g3lxpXM_.js";
1
+ import { C as s } from "../../_chunks/chat-message-ChOnwqf_.js";
2
2
  export {
3
3
  s as ChatMessage
4
4
  };
@@ -1,3 +1,4 @@
1
+ import type { ColDef } from 'ag-grid-community';
1
2
  import type { CustomCellRendererProps } from 'ag-grid-react';
2
3
  export interface BalanceLine {
3
4
  /** User-visible label for this line. */
@@ -14,5 +15,41 @@ export interface BalanceCellRendererParams {
14
15
  /** Apply destructive color to negative values. */
15
16
  highlightNegative?: boolean;
16
17
  }
18
+ /**
19
+ * Renders a compact set of label / value pairs inside a single AG Grid cell.
20
+ *
21
+ * Layout is **horizontal** with middle-dot separators so the cell fits
22
+ * inside the default AG Grid row height without spilling into the row
23
+ * below. Use the SALDI / Listini patterns (Totale · Incassato · Da Incassare)
24
+ * as the canonical example.
25
+ *
26
+ * If a consumer's content wraps (long localized labels, narrow columns)
27
+ * they can opt into row auto-growth by spreading
28
+ * {@link balanceCellRendererColDefDefaults} onto the column definition.
29
+ */
17
30
  export declare function BalanceCellRenderer<TData = unknown>(props: CustomCellRendererProps<TData> & BalanceCellRendererParams): import("react/jsx-runtime").JSX.Element | null;
31
+ /**
32
+ * Column-definition defaults consumers can spread onto a `ColDef` when they
33
+ * want the renderer's wrapped / multi-line behaviour to grow the row.
34
+ *
35
+ * The default compact horizontal layout is engineered to fit the standard
36
+ * AG Grid row height, so this opt-in is only needed when a long label set
37
+ * wraps across two or more lines and the consumer would rather grow the
38
+ * row than wrap silently.
39
+ *
40
+ * AG Grid does NOT auto-grow row height to fit a tall cell unless
41
+ * `autoHeight` and `wrapText` are set on the colDef itself — a cell
42
+ * renderer can't impose that from inside.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * {
47
+ * headerName: 'Saldi',
48
+ * cellRenderer: BalanceCellRenderer,
49
+ * cellRendererParams: { lines, currency: 'EUR' },
50
+ * ...balanceCellRendererColDefDefaults,
51
+ * }
52
+ * ```
53
+ */
54
+ export declare const balanceCellRendererColDefDefaults: Readonly<Pick<ColDef, 'autoHeight' | 'wrapText'>>;
18
55
  //# sourceMappingURL=balance-cell-renderer.d.ts.map
@@ -0,0 +1,23 @@
1
+ import type { CustomCellEditorProps } from 'ag-grid-react';
2
+ export interface EditableCurrencyCellEditorParams {
3
+ /** ISO 4217 currency code (e.g. `EUR`, `USD`). Defaults to `EUR`. */
4
+ currency?: string;
5
+ /** Decimal places allowed in the editor. Defaults to 2 (cents precision). */
6
+ decimals?: number;
7
+ /** Minimum allowed value — values below this are clamped on commit. */
8
+ min?: number;
9
+ /** Maximum allowed value — values above this are clamped on commit. */
10
+ max?: number;
11
+ }
12
+ /**
13
+ * Inline numeric editor that visually matches `<TextInput size="sm">`. Use as
14
+ * `cellEditor` on a colDef with `editable: true`. The display formatting is
15
+ * still the renderer's job — once editing stops, the cell hands back to
16
+ * `CurrencyCellRenderer` (or whichever renderer the colDef declares).
17
+ *
18
+ * Stores a Number, not a string, so consumers receive `row.amount = 12.5`
19
+ * not `"12.5"`. Strips locale separators on each change so commas/dots in
20
+ * any language convert to a clean numeric value.
21
+ */
22
+ export declare function EditableCurrencyCellRenderer<TData = unknown>(props: CustomCellEditorProps<TData, number> & EditableCurrencyCellEditorParams): import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=editable-currency-cell-renderer.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { CustomCellEditorProps } from 'ag-grid-react';
2
+ /**
3
+ * Inline text editor that visually matches `<TextInput size="sm">`. Use as
4
+ * `cellEditor` on a colDef with `editable: true`. The cell renderer (default
5
+ * or custom) takes over again once editing stops.
6
+ *
7
+ * AG Grid commits on Enter or Tab or blur; cancels on Escape. The consumer
8
+ * receives the committed value via `onCellValueChanged`.
9
+ */
10
+ export declare function EditableTextCellRenderer<TData = unknown>(props: CustomCellEditorProps<TData, string>): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=editable-text-cell-renderer.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type { CustomCellRendererProps } from 'ag-grid-react';
2
+ export interface ImageCellRendererParams {
3
+ /** Field name on the row whose value holds the image URL. */
4
+ srcField: string;
5
+ /** Optional field name holding alt text. Falls back to '' (decorative). */
6
+ altField?: string;
7
+ /**
8
+ * Optional field name holding a name string. When the src URL is missing or
9
+ * rejected, the cell falls back to `<Avatar name={fallback}>` so the cell
10
+ * still has a visual.
11
+ */
12
+ fallbackField?: string;
13
+ /** Visual size of the image. Matches `<Avatar>` sizes (sm=32, md=40, lg=48). */
14
+ size?: 'sm' | 'md' | 'lg';
15
+ /** Corner radius preset. `circle` matches `<Avatar>`. */
16
+ shape?: 'square' | 'rounded' | 'circle';
17
+ }
18
+ export declare function ImageCellRenderer<TData = unknown>(props: CustomCellRendererProps<TData> & ImageCellRendererParams): import("react/jsx-runtime").JSX.Element | null;
19
+ //# sourceMappingURL=image-cell-renderer.d.ts.map
@@ -1,8 +1,20 @@
1
- import type { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  import type { CustomCellRendererProps } from 'ag-grid-react';
3
3
  export interface ToggleCellRendererParams<TData = unknown> {
4
- /** Fires with the row and the new target value. */
5
- onToggle: (data: TData, newValue: boolean) => void;
4
+ /**
5
+ * Fires with the row and the new target value. May return a `Promise` —
6
+ * if it rejects, the consumer is expected to revert the underlying value
7
+ * and flash the row with `data-table-row-error` (return that row class
8
+ * from `getRowClass`). Use `onError` below to be notified inside this
9
+ * renderer.
10
+ */
11
+ onToggle: (data: TData, newValue: boolean) => void | Promise<void>;
12
+ /**
13
+ * Optional reject hook. Fires when the `onToggle` promise rejects, with
14
+ * the row and the error. The button auto-disables during the in-flight
15
+ * promise and re-enables on either settle.
16
+ */
17
+ onError?: (data: TData, error: unknown) => void;
6
18
  /** Icon shown when the current value is truthy. */
7
19
  trueIcon?: ReactNode;
8
20
  /** Icon shown when the current value is falsy. */
@@ -3,7 +3,7 @@ import 'ag-grid-community/styles/agGridQuartzFont.css';
3
3
  import '../../tokens/ag-grid-theme.css';
4
4
  import { type ComponentType, type ReactNode } from 'react';
5
5
  import { type VariantProps } from 'class-variance-authority';
6
- import { type ColDef, type FilterChangedEvent, type GridApi, type GridOptions, type IServerSideDatasource, type RowClassParams, type SortChangedEvent } from 'ag-grid-community';
6
+ import { type ColDef, type ColGroupDef, type FilterChangedEvent, type GridApi, type GridOptions, type RowClassParams, type SortChangedEvent } from 'ag-grid-community';
7
7
  declare const dataTableVariants: (props?: ({
8
8
  density?: "default" | "compact" | "expanded" | null | undefined;
9
9
  bordered?: boolean | null | undefined;
@@ -31,12 +31,20 @@ export interface DataTableHandle<TData = unknown> {
31
31
  getRawApi: () => GridApi<TData> | undefined;
32
32
  }
33
33
  export interface DataTableProps<TData = unknown> extends Omit<VariantProps<typeof dataTableVariants>, 'density'> {
34
- columnDefs: ColDef<TData>[];
34
+ /**
35
+ * Column definitions — accepts a mix of leaf `ColDef`s and header
36
+ * `ColGroupDef`s (for two-row grouped headers via `children: [...]`).
37
+ */
38
+ columnDefs: (ColDef<TData> | ColGroupDef<TData>)[];
35
39
  rowData?: TData[];
36
40
  rowSelection?: 'single' | 'multiple';
37
41
  pagination?: boolean;
38
42
  paginationPageSize?: number;
39
- serverSideDatasource?: IServerSideDatasource;
43
+ /**
44
+ * Page-size dropdown options shown in the AG Grid pagination panel.
45
+ * Pass `false` to hide the dropdown entirely. Default: `[10, 25, 50, 100]`.
46
+ */
47
+ paginationPageSizeSelector?: number[] | false;
40
48
  gridId?: string;
41
49
  onSelectionChanged?: (rows: TData[]) => void;
42
50
  onSortChanged?: (event: SortChangedEvent<TData>) => void;
@@ -74,6 +82,25 @@ export declare const DataTable: (<TData = unknown>(props: DataTableProps<TData>
74
82
  displayName: string;
75
83
  };
76
84
  BulkAction: import("react").ForwardRefExoticComponent<import("./toolbar").BulkActionProps & import("react").RefAttributes<HTMLButtonElement>>;
85
+ QuickSearch: {
86
+ ({ placeholder, debounceMs }: import("./toolbar").QuickSearchProps): import("react/jsx-runtime").JSX.Element;
87
+ displayName: string;
88
+ };
89
+ Refresh: import("react").ForwardRefExoticComponent<import("./toolbar").RefreshButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
90
+ FilterChips: {
91
+ (): import("react/jsx-runtime").JSX.Element | null;
92
+ displayName: string;
93
+ };
94
+ FacetFilter: <TValue extends string | number | boolean = string>({ field, options, label, }: import("./toolbar").FacetFilterProps<TValue>) => import("react/jsx-runtime").JSX.Element;
95
+ ExportMenu: {
96
+ ({ children, label }: import("./toolbar").ExportMenuProps): import("react/jsx-runtime").JSX.Element;
97
+ displayName: string;
98
+ } & {
99
+ Item: {
100
+ ({ format, label, onClick, fileName, }: import("./toolbar").ExportMenuItemProps): import("react/jsx-runtime").JSX.Element;
101
+ displayName: string;
102
+ };
103
+ };
77
104
  };
78
105
  };
79
106
  export {};
@@ -0,0 +1,30 @@
1
+ import type { CustomFilterProps, CustomFloatingFilterProps } from 'ag-grid-react';
2
+ import type { IFilter } from 'ag-grid-community';
3
+ /**
4
+ * Custom AG Grid filter component for date *ranges*. AG Grid Community's
5
+ * built-in `agDateColumnFilter` only handles single-date comparison —
6
+ * platform needs "between X and Y" for invoice / transaction lists.
7
+ *
8
+ * Wire on a colDef:
9
+ * ```tsx
10
+ * { field: 'date', filter: DateRangeFilter }
11
+ * ```
12
+ *
13
+ * The filter model has shape `{ type: 'inRange', dateFrom, dateTo }` to
14
+ * stay close to AG Grid's own date-filter convention so server-side
15
+ * adapters can interpret it the same way.
16
+ */
17
+ export interface DateRangeFilterModel {
18
+ type: 'inRange';
19
+ dateFrom: string | null;
20
+ dateTo: string | null;
21
+ }
22
+ export declare function DateRangeFilter(props: CustomFilterProps): import("react/jsx-runtime").JSX.Element;
23
+ /**
24
+ * Floating-filter companion for `DateRangeFilter`. Renders a compact
25
+ * button showing the current range ("All" or "Jan 1 – Mar 31") that
26
+ * opens the column's main filter popup. See `SelectFloatingFilter` in
27
+ * `select-filter.tsx` for the rationale.
28
+ */
29
+ export declare function DateRangeFloatingFilter(props: CustomFloatingFilterProps<IFilter, unknown, unknown, DateRangeFilterModel>): import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=date-range-filter.d.ts.map
@@ -0,0 +1,64 @@
1
+ import type { CustomFilterProps, CustomFloatingFilterProps } from 'ag-grid-react';
2
+ import type { IFilter } from 'ag-grid-community';
3
+ /**
4
+ * Custom AG Grid filter component — multi-select facet filter.
5
+ *
6
+ * The Community-friendly equivalent of AG Grid Enterprise's
7
+ * `agSetColumnFilter`. Surfaces a checkbox list of every value the column
8
+ * can take, so users tick to include / untick to exclude. Much faster than
9
+ * the default `agTextColumnFilter` for closed enums (status, room,
10
+ * operator).
11
+ *
12
+ * Wire on a colDef:
13
+ * ```tsx
14
+ * {
15
+ * field: 'status',
16
+ * filter: SelectFilter,
17
+ * filterParams: {
18
+ * options: [
19
+ * { value: 'open', label: 'Aperte' },
20
+ * { value: 'paid', label: 'Pagate' },
21
+ * ],
22
+ * },
23
+ * }
24
+ * ```
25
+ *
26
+ * Model shape `{ type: 'set', values: Array<string | number> }` matches
27
+ * AG Grid Enterprise's set-filter convention so server-side adapters can
28
+ * read either implementation the same way.
29
+ */
30
+ export interface SelectFilterOption {
31
+ value: string | number;
32
+ label: string;
33
+ }
34
+ export interface SelectFilterModel {
35
+ type: 'set';
36
+ values: Array<string | number>;
37
+ }
38
+ export interface SelectFilterParams {
39
+ options?: SelectFilterOption[];
40
+ placeholder?: string;
41
+ }
42
+ export declare function SelectFilter(props: CustomFilterProps<unknown, unknown, SelectFilterModel> & SelectFilterParams): import("react/jsx-runtime").JSX.Element;
43
+ /**
44
+ * Floating-filter companion for `SelectFilter`.
45
+ *
46
+ * AG Grid's default behaviour, when a column uses a custom React filter
47
+ * without a paired floating-filter component, is to render a disabled
48
+ * placeholder input in the floating-filter row. That reads as "this
49
+ * filter is broken" to users. This component renders a compact button
50
+ * showing the current model state ("All" or "N selected") that opens
51
+ * the column's main filter popup when clicked.
52
+ *
53
+ * Wire on the same colDef:
54
+ * ```tsx
55
+ * {
56
+ * field: 'status',
57
+ * filter: SelectFilter,
58
+ * floatingFilterComponent: SelectFloatingFilter,
59
+ * filterParams: { options: [...] },
60
+ * }
61
+ * ```
62
+ */
63
+ export declare function SelectFloatingFilter(props: CustomFloatingFilterProps<IFilter, unknown, unknown, SelectFilterModel>): import("react/jsx-runtime").JSX.Element;
64
+ //# sourceMappingURL=select-filter.d.ts.map
@@ -0,0 +1,49 @@
1
+ import type { CustomFilterProps, CustomFloatingFilterProps } from 'ag-grid-react';
2
+ import type { IFilter } from 'ag-grid-community';
3
+ /**
4
+ * Custom AG Grid filter component — single-select typeahead filter.
5
+ *
6
+ * Wraps the kit's existing `<Autocomplete>` so the user types to filter a
7
+ * bounded-but-large set of values (e.g. patient names), picks one
8
+ * suggestion, and the grid filters to rows matching that value exactly.
9
+ *
10
+ * Wire on a colDef:
11
+ * ```tsx
12
+ * {
13
+ * field: 'patient',
14
+ * filter: TypeaheadFilter,
15
+ * filterParams: {
16
+ * options: PATIENTS.map(p => ({ value: p.name, label: p.name })),
17
+ * },
18
+ * }
19
+ * ```
20
+ *
21
+ * Model shape `{ type: 'equals', value: string }` matches AG Grid's
22
+ * text-filter `equals` convention so server-side adapters can read either
23
+ * implementation the same way.
24
+ */
25
+ export interface TypeaheadFilterOption {
26
+ value: string;
27
+ label: string;
28
+ }
29
+ export interface TypeaheadFilterModel {
30
+ type: 'equals';
31
+ value: string;
32
+ }
33
+ export interface TypeaheadFilterParams {
34
+ options?: TypeaheadFilterOption[];
35
+ loadOptions?: (input: string, opts: {
36
+ signal: AbortSignal;
37
+ locale: string;
38
+ }) => Promise<TypeaheadFilterOption[]>;
39
+ placeholder?: string;
40
+ }
41
+ export declare function TypeaheadFilter(props: CustomFilterProps<unknown, unknown, TypeaheadFilterModel> & TypeaheadFilterParams): import("react/jsx-runtime").JSX.Element;
42
+ /**
43
+ * Floating-filter companion for `TypeaheadFilter`. Renders a compact
44
+ * button showing the current selection ("All" or the picked label) that
45
+ * opens the column's main filter popup. See `SelectFloatingFilter` in
46
+ * `select-filter.tsx` for the rationale.
47
+ */
48
+ export declare function TypeaheadFloatingFilter(props: CustomFloatingFilterProps<IFilter, unknown, unknown, TypeaheadFilterModel>): import("react/jsx-runtime").JSX.Element;
49
+ //# sourceMappingURL=typeahead-filter.d.ts.map
@@ -1,13 +1,21 @@
1
1
  export { DataTable } from './data-table';
2
2
  export type { DataTableProps, DataTableHandle, DataTableSortEntry, } from './data-table';
3
3
  export { dataTableAgent } from './data-table.agent';
4
- export { Toolbar, ToolbarProvider } from './toolbar';
5
- export type { ToolbarProviderProps, ToolbarRootProps, ExportCsvProps, ExportPdfProps, PrintProps, ColumnToggleProps, BulkActionProps, } from './toolbar';
4
+ export { Toolbar, ToolbarProvider, defaultExportPdf } from './toolbar';
5
+ export type { ToolbarProviderProps, ToolbarRootProps, ExportCsvProps, ExportPdfProps, PrintProps, ColumnToggleProps, BulkActionProps, QuickSearchProps, RefreshButtonProps, FacetFilterOption, FacetFilterProps, ExportFormat, ExportMenuProps, ExportMenuItemProps, } from './toolbar';
6
6
  export { useTotalRow } from './hooks/use-total-row';
7
+ export { DateRangeFilter, DateRangeFloatingFilter, } from './filters/date-range-filter';
8
+ export type { DateRangeFilterModel } from './filters/date-range-filter';
9
+ export { SelectFilter, SelectFloatingFilter } from './filters/select-filter';
10
+ export type { SelectFilterModel, SelectFilterOption, SelectFilterParams, } from './filters/select-filter';
11
+ export { TypeaheadFilter, TypeaheadFloatingFilter, } from './filters/typeahead-filter';
12
+ export type { TypeaheadFilterModel, TypeaheadFilterOption, TypeaheadFilterParams, } from './filters/typeahead-filter';
7
13
  export { StatusCellRenderer } from './cell-renderers/status-cell-renderer';
8
14
  export type { BadgeVariant, StatusCellRendererParams, } from './cell-renderers/status-cell-renderer';
9
15
  export { UserCellRenderer } from './cell-renderers/user-cell-renderer';
10
16
  export type { UserCellValue } from './cell-renderers/user-cell-renderer';
17
+ export { ImageCellRenderer } from './cell-renderers/image-cell-renderer';
18
+ export type { ImageCellRendererParams } from './cell-renderers/image-cell-renderer';
11
19
  export { TagListCellRenderer } from './cell-renderers/tag-list-cell-renderer';
12
20
  export type { TagListCellRendererParams } from './cell-renderers/tag-list-cell-renderer';
13
21
  export { DateCellRenderer } from './cell-renderers/date-cell-renderer';
@@ -24,4 +32,7 @@ export { ColorDotCellRenderer } from './cell-renderers/color-dot-cell-renderer';
24
32
  export type { ColorDotCellRendererParams } from './cell-renderers/color-dot-cell-renderer';
25
33
  export { BalanceCellRenderer } from './cell-renderers/balance-cell-renderer';
26
34
  export type { BalanceLine, BalanceCellRendererParams, } from './cell-renderers/balance-cell-renderer';
35
+ export { EditableTextCellRenderer } from './cell-renderers/editable-text-cell-renderer';
36
+ export { EditableCurrencyCellRenderer } from './cell-renderers/editable-currency-cell-renderer';
37
+ export type { EditableCurrencyCellEditorParams } from './cell-renderers/editable-currency-cell-renderer';
27
38
  //# sourceMappingURL=index.d.ts.map
@@ -1,19 +1,29 @@
1
- import { A as r, B as l, C as s, a as n, D as o, b as d, L as C, S as t, T as R, c as T, d as b, e as c, U as g, f as i, u } from "../../_chunks/balance-cell-renderer-DJB6WDPe.js";
1
+ import { A as l, B as r, C as s, a as t, D as n, b as d, c as o, d as C, E as i, e as R, I as g, L as T, S as F, f as b, g as c, T as u, h as D, i as f, j as p, k as y, l as E, U as S, m as h, n as m, u as x } from "../../_chunks/editable-currency-cell-renderer-Dn3-ANF5.js";
2
2
  export {
3
- r as ActionsCellRenderer,
4
- l as BalanceCellRenderer,
3
+ l as ActionsCellRenderer,
4
+ r as BalanceCellRenderer,
5
5
  s as ColorDotCellRenderer,
6
- n as CurrencyCellRenderer,
7
- o as DataTable,
6
+ t as CurrencyCellRenderer,
7
+ n as DataTable,
8
8
  d as DateCellRenderer,
9
- C as LinkCellRenderer,
10
- t as StatusCellRenderer,
11
- R as TagListCellRenderer,
12
- T as ToggleCellRenderer,
13
- b as Toolbar,
14
- c as ToolbarProvider,
15
- g as UserCellRenderer,
16
- i as dataTableAgent,
17
- u as useTotalRow
9
+ o as DateRangeFilter,
10
+ C as DateRangeFloatingFilter,
11
+ i as EditableCurrencyCellRenderer,
12
+ R as EditableTextCellRenderer,
13
+ g as ImageCellRenderer,
14
+ T as LinkCellRenderer,
15
+ F as SelectFilter,
16
+ b as SelectFloatingFilter,
17
+ c as StatusCellRenderer,
18
+ u as TagListCellRenderer,
19
+ D as ToggleCellRenderer,
20
+ f as Toolbar,
21
+ p as ToolbarProvider,
22
+ y as TypeaheadFilter,
23
+ E as TypeaheadFloatingFilter,
24
+ S as UserCellRenderer,
25
+ h as dataTableAgent,
26
+ m as defaultExportPdf,
27
+ x as useTotalRow
18
28
  };
19
29
  //# sourceMappingURL=index.js.map
@@ -19,9 +19,67 @@ export interface ExportCsvProps extends ToolbarIconButtonProps {
19
19
  onExport?: (api: GridApi) => void;
20
20
  }
21
21
  export interface ExportPdfProps extends ToolbarIconButtonProps {
22
- onClick: (api: GridApi | undefined) => void;
22
+ /**
23
+ * Optional override for the default PDF generation. When omitted, clicking
24
+ * the button calls the built-in handler (`defaultExportPdf`) which
25
+ * dynamic-imports `jspdf` + `jspdf-autotable` and produces a paged PDF
26
+ * of the current sort/filter state. Supply your own to plug in a
27
+ * server-side PDF generator or a custom layout.
28
+ */
29
+ onClick?: (api: GridApi | undefined) => void;
30
+ /** Filename for the generated PDF (default `data-table-export.pdf`). */
31
+ fileName?: string;
32
+ }
33
+ interface DefaultExportPdfOptions {
34
+ fileName: string;
23
35
  }
36
+ /**
37
+ * Default Export PDF handler. Exported for tests and for consumers who want
38
+ * to call it from a custom `onClick` (e.g. to add a logo or signature).
39
+ */
40
+ export declare function defaultExportPdf(api: GridApi | undefined, options: DefaultExportPdfOptions): Promise<void>;
24
41
  export type PrintProps = ToolbarIconButtonProps;
42
+ export interface QuickSearchProps {
43
+ /** Placeholder text. Falls back to `t('dataTable.quickSearch.placeholder')`. */
44
+ placeholder?: string;
45
+ /** Debounce ms before pushing to AG Grid. Defaults to 150 ms. */
46
+ debounceMs?: number;
47
+ }
48
+ export interface RefreshButtonProps extends Omit<IconButtonProps, 'icon' | 'aria-label' | 'tooltip' | 'onClick'> {
49
+ /** Called when the user clicks Refresh. */
50
+ onRefresh: () => void;
51
+ /** Accessible label. Falls back to `t('dataTable.refresh')`. */
52
+ label?: string;
53
+ }
54
+ export interface FacetFilterOption<TValue = string> {
55
+ value: TValue | null;
56
+ label: string;
57
+ }
58
+ export interface FacetFilterProps<TValue = string> {
59
+ /** Column field to filter on. */
60
+ field: string;
61
+ /** Options shown as pills. `value: null` clears the filter. */
62
+ options: FacetFilterOption<TValue>[];
63
+ /** Accessible label for the pill group. */
64
+ label?: string;
65
+ }
66
+ export type ExportFormat = 'csv' | 'xlsx' | 'pdf' | 'custom';
67
+ export interface ExportMenuItemProps {
68
+ /** Built-in format or `custom` for consumer-supplied handler. */
69
+ format: ExportFormat;
70
+ /** Label override. Built-in formats default to `t('dataTable.export.{format}')`. */
71
+ label?: string;
72
+ /** Consumer handler — required for `format: 'custom'`. */
73
+ onClick?: (api: GridApi | undefined) => void;
74
+ /** File-name override (only used by built-in formats). */
75
+ fileName?: string;
76
+ }
77
+ export interface ExportMenuProps {
78
+ /** Custom menu items. When omitted, renders the default CSV+Excel+PDF trio. */
79
+ children?: ReactNode;
80
+ /** Accessible label for the trigger. */
81
+ label?: string;
82
+ }
25
83
  export interface ColumnToggleProps {
26
84
  label?: string;
27
85
  }
@@ -34,7 +92,9 @@ export interface BulkActionProps extends Omit<ButtonProps, 'onClick' | 'children
34
92
  export declare const Toolbar: import("react").ForwardRefExoticComponent<ToolbarRootProps & import("react").RefAttributes<HTMLDivElement>> & {
35
93
  FilterBar: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
36
94
  Actions: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
95
+ /** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
37
96
  ExportCsv: import("react").ForwardRefExoticComponent<ExportCsvProps & import("react").RefAttributes<HTMLButtonElement>>;
97
+ /** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
38
98
  ExportPdf: import("react").ForwardRefExoticComponent<ExportPdfProps & import("react").RefAttributes<HTMLButtonElement>>;
39
99
  Print: import("react").ForwardRefExoticComponent<Omit<IconButtonProps, "aria-label" | "onClick" | "tooltip" | "icon"> & {
40
100
  /** Accessible label — becomes the tooltip text and `aria-label`. */
@@ -45,6 +105,25 @@ export declare const Toolbar: import("react").ForwardRefExoticComponent<ToolbarR
45
105
  displayName: string;
46
106
  };
47
107
  BulkAction: import("react").ForwardRefExoticComponent<BulkActionProps & import("react").RefAttributes<HTMLButtonElement>>;
108
+ QuickSearch: {
109
+ ({ placeholder, debounceMs }: QuickSearchProps): import("react/jsx-runtime").JSX.Element;
110
+ displayName: string;
111
+ };
112
+ Refresh: import("react").ForwardRefExoticComponent<RefreshButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
113
+ FilterChips: {
114
+ (): import("react/jsx-runtime").JSX.Element | null;
115
+ displayName: string;
116
+ };
117
+ FacetFilter: <TValue extends string | number | boolean = string>({ field, options, label, }: FacetFilterProps<TValue>) => import("react/jsx-runtime").JSX.Element;
118
+ ExportMenu: {
119
+ ({ children, label }: ExportMenuProps): import("react/jsx-runtime").JSX.Element;
120
+ displayName: string;
121
+ } & {
122
+ Item: {
123
+ ({ format, label, onClick, fileName, }: ExportMenuItemProps): import("react/jsx-runtime").JSX.Element;
124
+ displayName: string;
125
+ };
126
+ };
48
127
  };
49
128
  export {};
50
129
  //# sourceMappingURL=toolbar.d.ts.map
@@ -1,4 +1,4 @@
1
- import { E as t, e as m } from "../../_chunks/email-input-DKN5JERd.js";
1
+ import { E as t, e as m } from "../../_chunks/email-input-DvJ_kPKL.js";
2
2
  export {
3
3
  t as EmailInput,
4
4
  m as emailInputAgent
@@ -1,4 +1,4 @@
1
- import { F as l, f as o } from "../../_chunks/file-upload-nMh-1jDD.js";
1
+ import { F as l, f as o } from "../../_chunks/file-upload-DxAQprcU.js";
2
2
  export {
3
3
  l as FileUpload,
4
4
  o as fileUploadAgent