@alfadocs/ui-kit 1.9.3 → 1.10.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.
- package/dist/_chunks/actions-cell-renderer-BbzCqcld.js +1887 -0
- package/dist/_chunks/{patient-table-S77TBCEB.js → balance-badge-cell-DK9wxCxW.js} +491 -459
- package/dist/_chunks/{data-table-tabs-C1kRUzat.js → data-table-tabs-D24qj89A.js} +343 -325
- package/dist/_chunks/editable-currency-cell-renderer-zLf_bXvL.js +412 -0
- package/dist/_chunks/{file-manager-Crg5dKez.js → file-manager-CRxq0UIl.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-x8kS41M7.js → link-cell-renderer-Cp2MSlJl.js} +237 -259
- package/dist/agent-catalog.json +1 -1
- package/dist/components/data-table/data-table.d.ts +11 -0
- package/dist/components/data-table/index.js +11 -11
- package/dist/components/data-table/toolbar.d.ts +2 -1
- package/dist/components/data-table-tabs/data-table-tabs.d.ts +2 -0
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +7 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/patient-table/cell-renderers/transaction-chip-cell.d.ts +17 -0
- package/dist/components/patient-table/index.d.ts +2 -0
- package/dist/components/patient-table/index.js +7 -6
- package/dist/components/patient-table/use-responsive-columns.d.ts +7 -4
- package/dist/index.js +336 -335
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/actions-cell-renderer-B2pw6iH8.js +0 -1784
- package/dist/_chunks/editable-currency-cell-renderer-DYdzKpjL.js +0 -390
package/dist/agent-catalog.json
CHANGED
|
@@ -24,6 +24,17 @@ export interface DataTableHandle<TData = unknown> {
|
|
|
24
24
|
clearSelection: () => void;
|
|
25
25
|
getFilter: () => Record<string, unknown>;
|
|
26
26
|
setFilter: (model: Record<string, unknown>) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Columns whose visibility the user set by hand (ColumnToggle, column menu,
|
|
29
|
+
* drag). Persisted with the column state under `gridId`; a responsive
|
|
30
|
+
* baseline must leave them alone.
|
|
31
|
+
*/
|
|
32
|
+
getUserTouchedColumns: () => string[];
|
|
33
|
+
/**
|
|
34
|
+
* Record columns as user-set — for programmatic writes that stand in for the
|
|
35
|
+
* user (a saved view), so they persist and stop being auto-managed.
|
|
36
|
+
*/
|
|
37
|
+
markColumnsUserTouched: (colIds: readonly string[]) => void;
|
|
27
38
|
getSort: () => DataTableSortEntry[];
|
|
28
39
|
setSort: (model: DataTableSortEntry[]) => void;
|
|
29
40
|
getCurrentPage: () => number;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { A as r, D as l, E as t, T as s, a as d, b as n, c as o, d as i, e as R, f as C, g as T, i as F, h as g } from "../../_chunks/actions-cell-renderer-
|
|
2
|
-
import { B as b, C as u, E as x,
|
|
3
|
-
import {
|
|
1
|
+
import { A as r, D as l, E as t, T as s, a as d, b as n, c as o, d as i, e as R, f as C, g as T, i as F, h as g } from "../../_chunks/actions-cell-renderer-BbzCqcld.js";
|
|
2
|
+
import { B as b, C as c, a as u, E as x, b as p, R as E, T as m, c as f, r as h, u as S } from "../../_chunks/editable-currency-cell-renderer-zLf_bXvL.js";
|
|
3
|
+
import { D as w, a as y, b as I, I as L, L as N, N as P, c as W, S as B, d as U, e as _, T as k, f as v, g as O, U as X } from "../../_chunks/link-cell-renderer-Cp2MSlJl.js";
|
|
4
4
|
export {
|
|
5
5
|
r as ActionsCellRenderer,
|
|
6
6
|
b as BalanceCellRenderer,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
c as ColorDotCellRenderer,
|
|
8
|
+
u as CurrencyCellRenderer,
|
|
9
9
|
l as DataTable,
|
|
10
10
|
w as DateCellRenderer,
|
|
11
11
|
y as DateRangeFilter,
|
|
12
12
|
I as DateRangeFloatingFilter,
|
|
13
13
|
t as EXPANDED_ROW_CLASS,
|
|
14
14
|
x as EditableCurrencyCellRenderer,
|
|
15
|
-
|
|
15
|
+
p as EditableTextCellRenderer,
|
|
16
16
|
L as ImageCellRenderer,
|
|
17
17
|
N as LinkCellRenderer,
|
|
18
18
|
P as NumberFilter,
|
|
19
19
|
W as NumberFloatingFilter,
|
|
20
|
-
|
|
20
|
+
E as ReorderCellRenderer,
|
|
21
21
|
B as SelectFilter,
|
|
22
22
|
U as SelectFloatingFilter,
|
|
23
23
|
_ as StatusCellRenderer,
|
|
24
24
|
k as TagListCellRenderer,
|
|
25
25
|
s as TextFilter,
|
|
26
26
|
d as TextFloatingFilter,
|
|
27
|
-
|
|
27
|
+
m as ToggleCellRenderer,
|
|
28
28
|
n as Toolbar,
|
|
29
29
|
o as ToolbarProvider,
|
|
30
|
-
|
|
30
|
+
f as ToothCellRenderer,
|
|
31
31
|
v as TypeaheadFilter,
|
|
32
32
|
O as TypeaheadFloatingFilter,
|
|
33
33
|
X as UserCellRenderer,
|
|
@@ -37,7 +37,7 @@ export {
|
|
|
37
37
|
T as expandedRowDetailId,
|
|
38
38
|
F as isExpandedRowDetail,
|
|
39
39
|
g as isExpandedRowDetailId,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
h as reorderColumnWidth,
|
|
41
|
+
S as useTotalRow
|
|
42
42
|
};
|
|
43
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,9 +6,10 @@ export interface ToolbarProviderProps {
|
|
|
6
6
|
getApi: () => GridApi | undefined;
|
|
7
7
|
selectionCount: number;
|
|
8
8
|
onPrint: () => void;
|
|
9
|
+
markColumnsUserTouched?: (colIds: readonly string[]) => void;
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
}
|
|
11
|
-
export declare function ToolbarProvider({ getApi, selectionCount, onPrint, children, }: ToolbarProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ToolbarProvider({ getApi, selectionCount, onPrint, markColumnsUserTouched, children, }: ToolbarProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export type ToolbarRootProps = HTMLAttributes<HTMLDivElement>;
|
|
13
14
|
type ToolbarIconButtonProps = Omit<IconButtonProps, 'icon' | 'aria-label' | 'tooltip' | 'onClick'> & {
|
|
14
15
|
/** Accessible label — becomes the tooltip text and `aria-label`. */
|
|
@@ -62,6 +62,8 @@ export interface DataTableTabsProps extends VariantProps<typeof dataTableTabsTri
|
|
|
62
62
|
* id is deliberately not persisted.
|
|
63
63
|
*/
|
|
64
64
|
persistKey?: string;
|
|
65
|
+
/** Persist the active tab id too (needs `persistKey`). Default `false`. */
|
|
66
|
+
persistActiveTab?: boolean;
|
|
65
67
|
/** Capture/restore the quick-filter text alongside the model. Default false. */
|
|
66
68
|
captureQuickFilter?: boolean;
|
|
67
69
|
/** Apply the active tab's model on mount + switch. Default true. */
|
|
@@ -35,6 +35,13 @@ export interface UseDataTableFilterTabsOptions {
|
|
|
35
35
|
onActiveTabChange?: (id: string) => void;
|
|
36
36
|
/** Opt-in localStorage persistence — disabled while `tabs` is controlled. */
|
|
37
37
|
persistKey?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Also persist the active tab id (needs `persistKey`), so a return to the
|
|
40
|
+
* page lands on the tab — and the filter — the user left. Off by default:
|
|
41
|
+
* the kit's baseline lands on the first tab so a stale aggressive filter is
|
|
42
|
+
* never re-applied silently.
|
|
43
|
+
*/
|
|
44
|
+
persistActiveTab?: boolean;
|
|
38
45
|
/** Capture/restore `quickFilterText` alongside the model. Default false. */
|
|
39
46
|
captureQuickFilter?: boolean;
|
|
40
47
|
/** Apply the active tab's model on mount + tab switch. Default true. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CustomCellRendererProps } from 'ag-grid-react';
|
|
2
|
+
import type { TransactionState } from '../../transaction-chip/transaction-chip';
|
|
3
|
+
import type { PatientRow } from '../types';
|
|
4
|
+
export interface TransactionChipCellParams {
|
|
5
|
+
/** State shown for a positive amount; zero always reads as `settled`. */
|
|
6
|
+
positiveState: Extract<TransactionState, 'debt' | 'credit' | 'to-invoice'>;
|
|
7
|
+
/** Show the state label beside the amount. Default `true` — a table cell has no other caption. */
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Money column → `TransactionChip`, the kit's one financial-state pill (PRS
|
|
12
|
+
* §27: "Financial transaction state pill (debt / credit / settled)"). Takes the
|
|
13
|
+
* cell VALUE in integer cents — the `PatientRow` contract — and hands the chip
|
|
14
|
+
* major units, so the row model and the chip each keep their own convention.
|
|
15
|
+
*/
|
|
16
|
+
export declare function TransactionChipCell(props: CustomCellRendererProps<PatientRow, number | null | undefined> & TransactionChipCellParams): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=transaction-chip-cell.d.ts.map
|
|
@@ -15,6 +15,8 @@ export { NextAppointmentCell } from './cell-renderers/next-appointment-cell';
|
|
|
15
15
|
export type { NextAppointmentCellParams } from './cell-renderers/next-appointment-cell';
|
|
16
16
|
export { BalanceBadgeCell } from './cell-renderers/balance-badge-cell';
|
|
17
17
|
export type { BalanceBadgeCellParams } from './cell-renderers/balance-badge-cell';
|
|
18
|
+
export { TransactionChipCell } from './cell-renderers/transaction-chip-cell';
|
|
19
|
+
export type { TransactionChipCellParams } from './cell-renderers/transaction-chip-cell';
|
|
18
20
|
export { CarePlanStatusCell } from './cell-renderers/care-plan-status-cell';
|
|
19
21
|
export type { CarePlanStatusCellParams } from './cell-renderers/care-plan-status-cell';
|
|
20
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { B as s, C as l, N as
|
|
1
|
+
import { B as s, C as l, N as n, P as t, a as C, T as i, b as o, g as T, u as p } from "../../_chunks/balance-badge-cell-DK9wxCxW.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BalanceBadgeCell,
|
|
4
4
|
l as CarePlanStatusCell,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
n as NextAppointmentCell,
|
|
6
|
+
t as PATIENT_ROW_ACTION_COUNT,
|
|
7
7
|
C as PatientTable,
|
|
8
|
-
i as
|
|
9
|
-
o as
|
|
10
|
-
|
|
8
|
+
i as TransactionChipCell,
|
|
9
|
+
o as buildPatientColumns,
|
|
10
|
+
T as getResponsiveTier,
|
|
11
|
+
p as useResponsiveColumns
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -36,10 +36,13 @@
|
|
|
36
36
|
* pollute the set (and we additionally guard with a re-entrancy flag).
|
|
37
37
|
* 3. Once a column is user-touched, the hook leaves it alone forever this
|
|
38
38
|
* session — its visibility is whatever the user chose, which is what
|
|
39
|
-
* `data-table.tsx` then persists
|
|
40
|
-
*
|
|
41
|
-
* column state
|
|
42
|
-
*
|
|
39
|
+
* `data-table.tsx` then persists. The persisted choice therefore wins on
|
|
40
|
+
* the next mount too: the DataTable persists the user-touched set with
|
|
41
|
+
* its column state (`getUserTouchedColumns` / `markColumnsUserTouched` on
|
|
42
|
+
* the handle), and every reconcile pass reads it live.
|
|
43
|
+
* 4. A programmatic visibility write by someone else (the DataTable restoring
|
|
44
|
+
* persisted state, a columnDefs update) schedules one reconcile pass, so
|
|
45
|
+
* the baseline is re-asserted for untouched columns without a resize.
|
|
43
46
|
*
|
|
44
47
|
* CONSTRAINTS: no `any` (AG Grid's `ColumnEventType` is read off the typed event,
|
|
45
48
|
* tier read via the typed `getResponsiveTier` helper). No DOM `data-*` attribute
|