@alfadocs/ui-kit-debug 1.121.0 → 1.122.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/addDays-CuE8wLqb.js +9 -0
- package/dist/_chunks/addDays-CuE8wLqb.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js → anamnesis-summary-rows-CtcULkvc.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js.map → anamnesis-summary-rows-CtcULkvc.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js → antenatal-schedule-timeline-XHbig8On.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js.map → antenatal-schedule-timeline-XHbig8On.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CC7nmBOH.js → appointment-timeline-Czd4PBkF.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CC7nmBOH.js.map → appointment-timeline-Czd4PBkF.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js → balance-badge-cell-DtxbGJcA.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js.map → balance-badge-cell-DtxbGJcA.js.map} +1 -1
- package/dist/_chunks/{bill-line-table-DUMEHnQ4.js → bill-line-table-HrynB7ND.js} +2 -2
- package/dist/_chunks/{bill-line-table-DUMEHnQ4.js.map → bill-line-table-HrynB7ND.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js → calendar-appointment-editor-dialog-CiCmsBCH.js} +5 -5
- package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js.map → calendar-appointment-editor-dialog-CiCmsBCH.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-C8nWAeTk.js → cycle-calculator-WFhMfJHt.js} +4 -3
- package/dist/_chunks/{cycle-calculator-C8nWAeTk.js.map → cycle-calculator-WFhMfJHt.js.map} +1 -1
- package/dist/_chunks/{data-grid-Bbf8t4z3.js → data-grid-C71BhGDw.js} +2 -2
- package/dist/_chunks/{data-grid-Bbf8t4z3.js.map → data-grid-C71BhGDw.js.map} +1 -1
- package/dist/_chunks/{date-picker-DBVTj6lO.js → date-picker-BmVBVpVu.js} +3 -3
- package/dist/_chunks/{date-picker-DBVTj6lO.js.map → date-picker-BmVBVpVu.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-J1EeAhIH.js → date-picker-variants-DmfVRNDB.js} +184 -188
- package/dist/_chunks/date-picker-variants-DmfVRNDB.js.map +1 -0
- package/dist/_chunks/{date-range-panel-CT6nXjRM.js → date-range-panel-CT9Pk-HF.js} +2 -2
- package/dist/_chunks/{date-range-panel-CT6nXjRM.js.map → date-range-panel-CT9Pk-HF.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-PTRpDkXT.js → date-range-picker-2Up_FRrM.js} +40 -39
- package/dist/_chunks/{date-range-picker-PTRpDkXT.js.map → date-range-picker-2Up_FRrM.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-CJnqiQoT.js → date-time-picker-C6b_Vymc.js} +2 -2
- package/dist/_chunks/{date-time-picker-CJnqiQoT.js.map → date-time-picker-C6b_Vymc.js.map} +1 -1
- package/dist/_chunks/{default-tabs-Cxkw1Ws0.js → default-tabs-RvCI5uN0.js} +3 -3
- package/dist/_chunks/{default-tabs-Cxkw1Ws0.js.map → default-tabs-RvCI5uN0.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-c1NJPw9F.js → due-date-calculator-CALlODZe.js} +4 -4
- package/dist/_chunks/{due-date-calculator-c1NJPw9F.js.map → due-date-calculator-CALlODZe.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js → gestational-age-calculator-mB6brTlp.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js.map → gestational-age-calculator-mB6brTlp.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BjTa_77t.js → hcg-doubling-Dhdt3Jyd.js} +3 -3
- package/dist/_chunks/{hcg-doubling-BjTa_77t.js.map → hcg-doubling-Dhdt3Jyd.js.map} +1 -1
- package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js → invoice-upload-list-C95s5Q7m.js} +3 -3
- package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js.map → invoice-upload-list-C95s5Q7m.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-C3oL0WTp.js → kit-extensions-DUaIYyMD.js} +4 -4
- package/dist/_chunks/{kit-extensions-C3oL0WTp.js.map → kit-extensions-DUaIYyMD.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js → link-cell-renderer-BEaLczk2.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js.map → link-cell-renderer-BEaLczk2.js.map} +1 -1
- package/dist/_chunks/{map-view-h6ngp2xi.js → map-view-QWdQLHi9.js} +543 -495
- package/dist/_chunks/map-view-QWdQLHi9.js.map +1 -0
- package/dist/_chunks/{parse-BLBWPIgE.js → parse-BFur8Byx.js} +2 -2
- package/dist/_chunks/{parse-BLBWPIgE.js.map → parse-BFur8Byx.js.map} +1 -1
- package/dist/_chunks/{patient-details-C4dHR4iu.js → patient-details-Cba9HQj_.js} +2 -2
- package/dist/_chunks/{patient-details-C4dHR4iu.js.map → patient-details-Cba9HQj_.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-0QP8KCVp.js → patient-field-row-CtDihADs.js} +2 -2
- package/dist/_chunks/{patient-field-row-0QP8KCVp.js.map → patient-field-row-CtDihADs.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-x0-AhCyC.js → patient-summary-card-DnLdbtsw.js} +2 -2
- package/dist/_chunks/{patient-summary-card-x0-AhCyC.js.map → patient-summary-card-DnLdbtsw.js.map} +1 -1
- package/dist/_chunks/practice-results-BCLqPdgn.js +2683 -0
- package/dist/_chunks/practice-results-BCLqPdgn.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js → pregnancy-dating-BNI32qNw.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js.map → pregnancy-dating-BNI32qNw.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js → radiograph-panel.agent-B-r3BoqU.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js.map → radiograph-panel.agent-B-r3BoqU.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-DRSZ8UcL.js → reserved.agent-CCwsOb3M.js} +8 -7
- package/dist/_chunks/{reserved.agent-DRSZ8UcL.js.map → reserved.agent-CCwsOb3M.js.map} +1 -1
- package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js → send-registration-link-form-BjkXr0TD.js} +3 -3
- package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js.map → send-registration-link-form-BjkXr0TD.js.map} +1 -1
- package/dist/_chunks/{slot-grid-b4eZXokb.js → slot-grid-DEZRB4Yb.js} +234 -207
- package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +1 -0
- package/dist/_chunks/subDays-DC99JK7a.js +8 -0
- package/dist/_chunks/{subDays-Bsoy023P.js.map → subDays-DC99JK7a.js.map} +1 -1
- package/dist/_chunks/{task-editor-Czcx9B-3.js → task-editor-C05yx7JJ.js} +2 -2
- package/dist/_chunks/{task-editor-Czcx9B-3.js.map → task-editor-C05yx7JJ.js.map} +1 -1
- package/dist/_chunks/{toolbar-DoKcoE2q.js → toolbar-Dznu_Dou.js} +2 -2
- package/dist/_chunks/{toolbar-DoKcoE2q.js.map → toolbar-Dznu_Dou.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js → use-appointment-details-read-Bm408XzX.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js.map → use-appointment-details-read-Bm408XzX.js.map} +1 -1
- package/dist/agent-catalog.json +3 -3
- package/dist/agent-i18n/en.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/map-view/index.d.ts +1 -1
- package/dist/components/map-view/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +18 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results-slot-card.d.ts +38 -0
- package/dist/components/practice-results/practice-results-slot-card.d.ts.map +1 -0
- package/dist/components/practice-results/practice-results.d.ts +32 -2
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts +19 -0
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +9 -1
- package/dist/i18n/locales/ar.d.ts +5 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +6 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +6 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +5 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +6 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +5 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +6 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +6 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +5 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +6 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +6 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +5 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +6 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +5 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +6 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +5 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +6 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +5 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +6 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +5 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +6 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +6 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +5 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +6 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +5 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +6 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +5 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +6 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +5 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +6 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/locales/ar.json +6 -1
- package/dist/locales/de.json +6 -1
- package/dist/locales/el.json +6 -1
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +6 -1
- package/dist/locales/fr.json +6 -1
- package/dist/locales/hi.json +6 -1
- package/dist/locales/it.json +6 -1
- package/dist/locales/ja.json +6 -1
- package/dist/locales/nl.json +6 -1
- package/dist/locales/pl.json +6 -1
- package/dist/locales/pt.json +6 -1
- package/dist/locales/ro.json +6 -1
- package/dist/locales/ru.json +6 -1
- package/dist/locales/sq.json +6 -1
- package/dist/locales/sv.json +6 -1
- package/dist/locales/tr.json +6 -1
- package/dist/locales/zh.json +6 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/date-picker-variants-J1EeAhIH.js.map +0 -1
- package/dist/_chunks/map-view-h6ngp2xi.js.map +0 -1
- package/dist/_chunks/practice-results-yCresv86.js +0 -2326
- package/dist/_chunks/practice-results-yCresv86.js.map +0 -1
- package/dist/_chunks/slot-grid-b4eZXokb.js.map +0 -1
- package/dist/_chunks/subDays-Bsoy023P.js +0 -8
|
@@ -5,7 +5,7 @@ import { T as v, c as N, a as R } from "./parts-CcyRkB8t.js";
|
|
|
5
5
|
import { e as k, s as P, w as A, a as B } from "./export-files-BByoK9Cg.js";
|
|
6
6
|
import { i as O } from "./is-development-CLUAnsU7.js";
|
|
7
7
|
import { d as j, g as Q, u as _ } from "./grid-context-jn9y8tNE.js";
|
|
8
|
-
import { g as U } from "./data-grid-
|
|
8
|
+
import { g as U } from "./data-grid-C71BhGDw.js";
|
|
9
9
|
function S() {
|
|
10
10
|
var t;
|
|
11
11
|
return ((t = _()) == null ? void 0 : t.toolbarSeam) ?? null;
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
Z as D,
|
|
157
157
|
Y as a
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=toolbar-
|
|
159
|
+
//# sourceMappingURL=toolbar-Dznu_Dou.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar-DoKcoE2q.js","sources":["../../src/components/data-grid/toolbar.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* DataGridToolbar: the shared table toolbar parts over DataGrid. */\n/* */\n/* The parts live in `_shared/table-toolbar/` and reach the grid only */\n/* through its `TableToolbarSeam` (`./toolbar-seam.ts`). Inside the */\n/* grid's `toolbar` slot they find it through `DataGridContext`; a */\n/* toolbar lifted into a page header uses `DataGridToolbarProvider`. */\n/* Callbacks get a `ToolbarActionContext` (ids and an export snapshot), */\n/* never an engine API. No AG Grid, no DataTable import. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { TableToolbarProvider } from '../_shared/table-toolbar/context';\nimport {\n exportFileName,\n snapshotToTable,\n writeTablePdf,\n writeTableXlsx,\n} from '../_shared/table-toolbar/export-files';\nimport {\n actionContextOf,\n createTableToolbarParts,\n} from '../_shared/table-toolbar/parts';\nimport type { TableToolbarSeam } from '../_shared/table-toolbar/seam';\nimport { isDevelopment } from '../_shared/is-development';\nimport {\n dataGridMountSignal,\n getDataGridToolbarSeam,\n useDataGridContext,\n} from './grid-context';\nimport { dataGridSeamCaption } from './toolbar-seam';\nimport type {\n DataGridExportFormat,\n DataGridHandle,\n DataGridToolbarBulkActionProps,\n DataGridToolbarColumnToggleProps,\n DataGridToolbarExportMenuItemProps,\n DataGridToolbarExportMenuProps,\n DataGridToolbarFacetFilterProps,\n DataGridToolbarFilterChipsProps,\n DataGridToolbarPrintProps,\n DataGridToolbarProviderProps,\n DataGridToolbarQuickSearchProps,\n DataGridToolbarRefreshProps,\n DataGridToolbarRootProps,\n} from './types';\n\n/** The grid's own seam when the part sits in its `toolbar` slot. */\nfunction useSlotSeam(): TableToolbarSeam | null {\n return useDataGridContext()?.toolbarSeam ?? null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Lifted toolbar: DataGridToolbarProvider */\n/* ------------------------------------------------------------------ */\n\n/** A seam with nothing behind it, for a lifted toolbar whose grid has not\n * mounted yet: reads are empty, writes do nothing, `isReady()` is false. */\nconst UNBOUND_SEAM: TableToolbarSeam = {\n features: {\n syncsFilterInputs: true,\n exportsAllRows: false,\n keyboardReorder: true,\n },\n isReady: () => false,\n subscribe: () => () => {},\n getColumns: () => [],\n setColumnVisible: () => {},\n moveColumn: () => {},\n getQuickFilter: () => '',\n setQuickFilter: () => {},\n getFilterModel: () => ({}),\n setColumnFilter: () => {},\n clearAllFilters: () => {},\n setFacet: () => {},\n getFacet: () => null,\n getSelectionCount: () => 0,\n getSelectedRowIds: () => [],\n getExportSnapshot: () => undefined,\n exportCsv: () => {},\n print: () => {},\n};\n\ninterface Bound {\n handle: DataGridHandle | null;\n seam: TableToolbarSeam | null;\n}\n\n/**\n * For a toolbar outside the grid (a page header). Binds to whatever\n * `getGrid()` returns, once after mount and again whenever any DataGrid\n * mounts or unmounts (`dataGridMountSignal`): no polling. Until a grid is\n * bound the parts are inert.\n */\nexport function DataGridToolbarProvider({\n getGrid,\n children,\n}: DataGridToolbarProviderProps) {\n const [bound, setBound] = useState<Bound>({ handle: null, seam: null });\n useEffect(() => {\n const resolve = () => {\n const handle = getGrid() ?? null;\n const seam = getDataGridToolbarSeam(handle);\n setBound((prev) =>\n prev.handle === handle && prev.seam === seam ? prev : { handle, seam },\n );\n };\n resolve();\n return dataGridMountSignal.subscribe(resolve);\n }, [getGrid]);\n return (\n <TableToolbarProvider seam={bound.seam ?? UNBOUND_SEAM}>\n {children}\n </TableToolbarProvider>\n );\n}\n\n/**\n * Builds the toolbar and its parts. One call, at module level, marked pure:\n * a bundler drops it (and every shared part, DropdownMenu, Tag and Kbd with\n * it) from an app that imports `DataGrid` without `DataGridToolbar`.\n */\nfunction createDataGridToolbar() {\n const parts = createTableToolbarParts({\n prefix: 'DataGrid.Toolbar',\n missingProvider: (caller) =>\n `${caller} must be rendered in a DataGrid's \\`toolbar\\` slot or inside <DataGridToolbarProvider>.`,\n useEngineSeam: useSlotSeam,\n });\n\n /* ---- Root ---- */\n\n const Root = forwardRef<HTMLDivElement, DataGridToolbarRootProps>(\n (props, ref) => {\n const slotSeam = useSlotSeam();\n const root = (\n <parts.Root ref={ref} data-component=\"data-grid-toolbar\" {...props} />\n );\n // In the grid's slot, the grid's own seam is the nearest one, even\n // under a lifted provider for another grid.\n return slotSeam ? (\n <TableToolbarProvider seam={slotSeam}>{root}</TableToolbarProvider>\n ) : (\n root\n );\n },\n );\n Root.displayName = 'DataGrid.Toolbar';\n\n /* ---- Parts with DataGrid-shaped props ---- */\n\n const QuickSearch = (props: DataGridToolbarQuickSearchProps) => (\n <parts.QuickSearch {...props} />\n );\n QuickSearch.displayName = 'DataGrid.Toolbar.QuickSearch';\n\n const FilterChips = (_props: DataGridToolbarFilterChipsProps) => (\n <parts.FilterChips />\n );\n FilterChips.displayName = 'DataGrid.Toolbar.FilterChips';\n\n /**\n * Pills for one `select` column (or, in server mode, a host key). Any other\n * field renders nothing and warns in development: v9 would evaluate a set\n * model with the column's own (wrong) filter fn.\n */\n const FacetFilter = ({\n field,\n options,\n label,\n }: DataGridToolbarFacetFilterProps) => {\n const seam = parts.useSeam('FacetFilter');\n const column = seam.getColumns().find((c) => c.id === field);\n // A DataGrid seam exports every row exactly in client mode, so a host key\n // (no column) is allowed when it does not.\n const allowed = !seam.isReady()\n ? true\n : column\n ? column.filterKind === 'select' && !column.masked\n : !seam.features.exportsAllRows;\n useEffect(() => {\n if (!allowed && isDevelopment()) {\n console.warn(\n `DataGridToolbar.FacetFilter: \"${field}\" is not a column with filter { kind: 'select' }` +\n ' (or a host key in server mode); the pills are not rendered.',\n );\n }\n }, [allowed, field]);\n if (!allowed) return null;\n return <parts.FacetFilter field={field} options={options} label={label} />;\n };\n FacetFilter.displayName = 'DataGrid.Toolbar.FacetFilter';\n\n const ColumnToggle = forwardRef<\n HTMLButtonElement,\n DataGridToolbarColumnToggleProps\n >((props, ref) => <parts.ColumnToggle ref={ref} {...props} />);\n ColumnToggle.displayName = 'DataGrid.Toolbar.ColumnToggle';\n\n const Print = forwardRef<HTMLButtonElement, DataGridToolbarPrintProps>(\n (props, ref) => <parts.Print ref={ref} {...props} />,\n );\n Print.displayName = 'DataGrid.Toolbar.Print';\n\n const Refresh = forwardRef<HTMLButtonElement, DataGridToolbarRefreshProps>(\n (props, ref) => <parts.Refresh ref={ref} {...props} />,\n );\n Refresh.displayName = 'DataGrid.Toolbar.Refresh';\n\n const BulkAction = forwardRef<\n HTMLButtonElement,\n DataGridToolbarBulkActionProps\n >((props, ref) => <parts.BulkAction ref={ref} {...props} />);\n BulkAction.displayName = 'DataGrid.Toolbar.BulkAction';\n\n const DEFAULT_EXPORT_ITEMS: Exclude<DataGridExportFormat, 'custom'>[] = [\n 'csv',\n 'xlsx',\n 'pdf',\n ];\n\n /**\n * One export item. Built-ins write every filtered row (client mode); in\n * server mode the grid holds one page, so they render disabled with the\n * reason. `custom` always runs and gets the action context.\n */\n const ExportMenuItem = (props: DataGridToolbarExportMenuItemProps) => {\n const { t } = useTranslation('ui');\n const seam = parts.useSeam('ExportMenu.Item');\n const builtIn = props.format !== 'custom';\n const disabled = builtIn && !seam.features.exportsAllRows;\n const handleSelect = useCallback(() => {\n if (props.format === 'custom') {\n props.onExport(actionContextOf(seam));\n return;\n }\n const snapshot = seam.getExportSnapshot();\n if (!snapshot) return;\n const fileName =\n props.fileName ??\n exportFileName(dataGridSeamCaption(seam), props.format);\n if (props.format === 'csv') {\n seam.exportCsv(fileName);\n return;\n }\n const table = snapshotToTable(snapshot);\n if (props.format === 'xlsx') void writeTableXlsx(table, { fileName });\n else void writeTablePdf(table, { fileName });\n }, [props, seam]);\n return (\n <parts.ExportMenuItemBase\n format={props.format}\n label={props.label}\n onSelect={handleSelect}\n disabled={disabled}\n description={\n disabled ? t('dataGrid.toolbar.exportPageOnly') : undefined\n }\n />\n );\n };\n ExportMenuItem.displayName = 'DataGrid.Toolbar.ExportMenu.Item';\n\n const ExportMenu = forwardRef<\n HTMLButtonElement,\n DataGridToolbarExportMenuProps\n >(({ children, ...rest }, ref) => (\n <parts.ExportMenu ref={ref} {...rest}>\n {children ??\n DEFAULT_EXPORT_ITEMS.map((f) => <ExportMenuItem key={f} format={f} />)}\n </parts.ExportMenu>\n ));\n ExportMenu.displayName = 'DataGrid.Toolbar.ExportMenu';\n\n // These leaves render a single DS <IconButton> trigger, so IconButtonGroup\n // accepts them as direct children (see its rendersIconButton DEV check).\n for (const leaf of [ColumnToggle, Print, Refresh, ExportMenu]) {\n (leaf as { rendersIconButton?: boolean }).rendersIconButton = true;\n }\n // Folded into a group's \"More\" menu, Print and Refresh render the shared\n // part's menu item (their action is not an onClick prop).\n Object.assign(Print, { overflowMenuItem: parts.Print.overflowMenuItem });\n Object.assign(Refresh, { overflowMenuItem: parts.Refresh.overflowMenuItem });\n\n const FilterBar = parts.FilterBar;\n const Actions = parts.Actions;\n\n return Object.assign(Root, {\n FilterBar,\n Actions,\n QuickSearch,\n FilterChips,\n FacetFilter,\n ColumnToggle,\n ExportMenu: Object.assign(ExportMenu, { Item: ExportMenuItem }),\n Print,\n Refresh,\n BulkAction,\n });\n}\n\n/**\n * The DataGrid toolbar. Put it in the grid's `toolbar` prop, or lift it into\n * a page header under `DataGridToolbarProvider`.\n */\nexport const DataGridToolbar = /* @__PURE__ */ createDataGridToolbar();\n"],"names":["useSlotSeam","_a","useDataGridContext","UNBOUND_SEAM","DataGridToolbarProvider","getGrid","children","bound","setBound","useState","useEffect","resolve","handle","seam","getDataGridToolbarSeam","prev","dataGridMountSignal","TableToolbarProvider","createDataGridToolbar","parts","createTableToolbarParts","caller","Root","forwardRef","props","ref","slotSeam","root","jsx","QuickSearch","FilterChips","_props","FacetFilter","field","options","label","column","c","allowed","isDevelopment","ColumnToggle","Print","Refresh","BulkAction","DEFAULT_EXPORT_ITEMS","ExportMenuItem","t","useTranslation","disabled","handleSelect","useCallback","actionContextOf","snapshot","fileName","exportFileName","dataGridSeamCaption","table","snapshotToTable","writeTableXlsx","writeTablePdf","ExportMenu","rest","f","leaf","FilterBar","Actions","DataGridToolbar"],"mappings":";;;;;;;;AAiDA,SAASA,IAAuC;;AAC9C,WAAOC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,gBAAe;AAC9C;AAQA,MAAME,IAAiC;AAAA,EACrC,UAAU;AAAA,IACR,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,EAAA;AAAA,EAEnB,SAAS,M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B,WACE,gBAAAe;AAAA,MAACT,EAAM;AAAA,MAAN;AAAA,QACC,QAAQK,EAAM;AAAA,QACd,OAAOA,EAAM;AAAA,QACb,UAAUyB;AAAA,QACV,UAAAD;AAAA,QACA,aACEA,IAAWF,EAAE,iCAAiC,IAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAI1D;AACA,EAAAD,EAAe,cAAc;AAE7B,QAAMe,IAAarC,EAGjB,CAAC,EAAE,UAAAjB,GAAU,GAAGuD,EAAA,GAAQpC,MACxB,gBAAAG,EAACT,EAAM,YAAN,EAAiB,KAAAM,GAAW,GAAGoC,GAC7B,UAAAvD,KACCsC,EAAqB,IAAI,CAACkB,MAAM,gBAAAlC,EAACiB,GAAA,EAAuB,QAAQiB,EAAA,GAAXA,CAAc,CAAE,EAAA,CACzE,CACD;AACD,EAAAF,EAAW,cAAc;AAIzB,aAAWG,KAAQ,CAACvB,GAAcC,GAAOC,GAASkB,CAAU;AACzD,IAAAG,EAAyC,oBAAoB;AAIhE,SAAO,OAAOtB,GAAO,EAAE,kBAAkBtB,EAAM,MAAM,kBAAkB,GACvE,OAAO,OAAOuB,GAAS,EAAE,kBAAkBvB,EAAM,QAAQ,kBAAkB;AAE3E,QAAM6C,IAAY7C,EAAM,WAClB8C,IAAU9C,EAAM;AAEtB,SAAO,OAAO,OAAOG,GAAM;AAAA,IACzB,WAAA0C;AAAA,IACA,SAAAC;AAAA,IACA,aAAApC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAE;AAAA,IACA,cAAAQ;AAAA,IACA,YAAY,OAAO,OAAOoB,GAAY,EAAE,MAAMf,GAAgB;AAAA,IAC9D,OAAAJ;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,CACD;AACH;AAMO,MAAMuB,IAAkC,gBAAAhD,EAAA;"}
|
|
1
|
+
{"version":3,"file":"toolbar-Dznu_Dou.js","sources":["../../src/components/data-grid/toolbar.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* DataGridToolbar: the shared table toolbar parts over DataGrid. */\n/* */\n/* The parts live in `_shared/table-toolbar/` and reach the grid only */\n/* through its `TableToolbarSeam` (`./toolbar-seam.ts`). Inside the */\n/* grid's `toolbar` slot they find it through `DataGridContext`; a */\n/* toolbar lifted into a page header uses `DataGridToolbarProvider`. */\n/* Callbacks get a `ToolbarActionContext` (ids and an export snapshot), */\n/* never an engine API. No AG Grid, no DataTable import. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { TableToolbarProvider } from '../_shared/table-toolbar/context';\nimport {\n exportFileName,\n snapshotToTable,\n writeTablePdf,\n writeTableXlsx,\n} from '../_shared/table-toolbar/export-files';\nimport {\n actionContextOf,\n createTableToolbarParts,\n} from '../_shared/table-toolbar/parts';\nimport type { TableToolbarSeam } from '../_shared/table-toolbar/seam';\nimport { isDevelopment } from '../_shared/is-development';\nimport {\n dataGridMountSignal,\n getDataGridToolbarSeam,\n useDataGridContext,\n} from './grid-context';\nimport { dataGridSeamCaption } from './toolbar-seam';\nimport type {\n DataGridExportFormat,\n DataGridHandle,\n DataGridToolbarBulkActionProps,\n DataGridToolbarColumnToggleProps,\n DataGridToolbarExportMenuItemProps,\n DataGridToolbarExportMenuProps,\n DataGridToolbarFacetFilterProps,\n DataGridToolbarFilterChipsProps,\n DataGridToolbarPrintProps,\n DataGridToolbarProviderProps,\n DataGridToolbarQuickSearchProps,\n DataGridToolbarRefreshProps,\n DataGridToolbarRootProps,\n} from './types';\n\n/** The grid's own seam when the part sits in its `toolbar` slot. */\nfunction useSlotSeam(): TableToolbarSeam | null {\n return useDataGridContext()?.toolbarSeam ?? null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Lifted toolbar: DataGridToolbarProvider */\n/* ------------------------------------------------------------------ */\n\n/** A seam with nothing behind it, for a lifted toolbar whose grid has not\n * mounted yet: reads are empty, writes do nothing, `isReady()` is false. */\nconst UNBOUND_SEAM: TableToolbarSeam = {\n features: {\n syncsFilterInputs: true,\n exportsAllRows: false,\n keyboardReorder: true,\n },\n isReady: () => false,\n subscribe: () => () => {},\n getColumns: () => [],\n setColumnVisible: () => {},\n moveColumn: () => {},\n getQuickFilter: () => '',\n setQuickFilter: () => {},\n getFilterModel: () => ({}),\n setColumnFilter: () => {},\n clearAllFilters: () => {},\n setFacet: () => {},\n getFacet: () => null,\n getSelectionCount: () => 0,\n getSelectedRowIds: () => [],\n getExportSnapshot: () => undefined,\n exportCsv: () => {},\n print: () => {},\n};\n\ninterface Bound {\n handle: DataGridHandle | null;\n seam: TableToolbarSeam | null;\n}\n\n/**\n * For a toolbar outside the grid (a page header). Binds to whatever\n * `getGrid()` returns, once after mount and again whenever any DataGrid\n * mounts or unmounts (`dataGridMountSignal`): no polling. Until a grid is\n * bound the parts are inert.\n */\nexport function DataGridToolbarProvider({\n getGrid,\n children,\n}: DataGridToolbarProviderProps) {\n const [bound, setBound] = useState<Bound>({ handle: null, seam: null });\n useEffect(() => {\n const resolve = () => {\n const handle = getGrid() ?? null;\n const seam = getDataGridToolbarSeam(handle);\n setBound((prev) =>\n prev.handle === handle && prev.seam === seam ? prev : { handle, seam },\n );\n };\n resolve();\n return dataGridMountSignal.subscribe(resolve);\n }, [getGrid]);\n return (\n <TableToolbarProvider seam={bound.seam ?? UNBOUND_SEAM}>\n {children}\n </TableToolbarProvider>\n );\n}\n\n/**\n * Builds the toolbar and its parts. One call, at module level, marked pure:\n * a bundler drops it (and every shared part, DropdownMenu, Tag and Kbd with\n * it) from an app that imports `DataGrid` without `DataGridToolbar`.\n */\nfunction createDataGridToolbar() {\n const parts = createTableToolbarParts({\n prefix: 'DataGrid.Toolbar',\n missingProvider: (caller) =>\n `${caller} must be rendered in a DataGrid's \\`toolbar\\` slot or inside <DataGridToolbarProvider>.`,\n useEngineSeam: useSlotSeam,\n });\n\n /* ---- Root ---- */\n\n const Root = forwardRef<HTMLDivElement, DataGridToolbarRootProps>(\n (props, ref) => {\n const slotSeam = useSlotSeam();\n const root = (\n <parts.Root ref={ref} data-component=\"data-grid-toolbar\" {...props} />\n );\n // In the grid's slot, the grid's own seam is the nearest one, even\n // under a lifted provider for another grid.\n return slotSeam ? (\n <TableToolbarProvider seam={slotSeam}>{root}</TableToolbarProvider>\n ) : (\n root\n );\n },\n );\n Root.displayName = 'DataGrid.Toolbar';\n\n /* ---- Parts with DataGrid-shaped props ---- */\n\n const QuickSearch = (props: DataGridToolbarQuickSearchProps) => (\n <parts.QuickSearch {...props} />\n );\n QuickSearch.displayName = 'DataGrid.Toolbar.QuickSearch';\n\n const FilterChips = (_props: DataGridToolbarFilterChipsProps) => (\n <parts.FilterChips />\n );\n FilterChips.displayName = 'DataGrid.Toolbar.FilterChips';\n\n /**\n * Pills for one `select` column (or, in server mode, a host key). Any other\n * field renders nothing and warns in development: v9 would evaluate a set\n * model with the column's own (wrong) filter fn.\n */\n const FacetFilter = ({\n field,\n options,\n label,\n }: DataGridToolbarFacetFilterProps) => {\n const seam = parts.useSeam('FacetFilter');\n const column = seam.getColumns().find((c) => c.id === field);\n // A DataGrid seam exports every row exactly in client mode, so a host key\n // (no column) is allowed when it does not.\n const allowed = !seam.isReady()\n ? true\n : column\n ? column.filterKind === 'select' && !column.masked\n : !seam.features.exportsAllRows;\n useEffect(() => {\n if (!allowed && isDevelopment()) {\n console.warn(\n `DataGridToolbar.FacetFilter: \"${field}\" is not a column with filter { kind: 'select' }` +\n ' (or a host key in server mode); the pills are not rendered.',\n );\n }\n }, [allowed, field]);\n if (!allowed) return null;\n return <parts.FacetFilter field={field} options={options} label={label} />;\n };\n FacetFilter.displayName = 'DataGrid.Toolbar.FacetFilter';\n\n const ColumnToggle = forwardRef<\n HTMLButtonElement,\n DataGridToolbarColumnToggleProps\n >((props, ref) => <parts.ColumnToggle ref={ref} {...props} />);\n ColumnToggle.displayName = 'DataGrid.Toolbar.ColumnToggle';\n\n const Print = forwardRef<HTMLButtonElement, DataGridToolbarPrintProps>(\n (props, ref) => <parts.Print ref={ref} {...props} />,\n );\n Print.displayName = 'DataGrid.Toolbar.Print';\n\n const Refresh = forwardRef<HTMLButtonElement, DataGridToolbarRefreshProps>(\n (props, ref) => <parts.Refresh ref={ref} {...props} />,\n );\n Refresh.displayName = 'DataGrid.Toolbar.Refresh';\n\n const BulkAction = forwardRef<\n HTMLButtonElement,\n DataGridToolbarBulkActionProps\n >((props, ref) => <parts.BulkAction ref={ref} {...props} />);\n BulkAction.displayName = 'DataGrid.Toolbar.BulkAction';\n\n const DEFAULT_EXPORT_ITEMS: Exclude<DataGridExportFormat, 'custom'>[] = [\n 'csv',\n 'xlsx',\n 'pdf',\n ];\n\n /**\n * One export item. Built-ins write every filtered row (client mode); in\n * server mode the grid holds one page, so they render disabled with the\n * reason. `custom` always runs and gets the action context.\n */\n const ExportMenuItem = (props: DataGridToolbarExportMenuItemProps) => {\n const { t } = useTranslation('ui');\n const seam = parts.useSeam('ExportMenu.Item');\n const builtIn = props.format !== 'custom';\n const disabled = builtIn && !seam.features.exportsAllRows;\n const handleSelect = useCallback(() => {\n if (props.format === 'custom') {\n props.onExport(actionContextOf(seam));\n return;\n }\n const snapshot = seam.getExportSnapshot();\n if (!snapshot) return;\n const fileName =\n props.fileName ??\n exportFileName(dataGridSeamCaption(seam), props.format);\n if (props.format === 'csv') {\n seam.exportCsv(fileName);\n return;\n }\n const table = snapshotToTable(snapshot);\n if (props.format === 'xlsx') void writeTableXlsx(table, { fileName });\n else void writeTablePdf(table, { fileName });\n }, [props, seam]);\n return (\n <parts.ExportMenuItemBase\n format={props.format}\n label={props.label}\n onSelect={handleSelect}\n disabled={disabled}\n description={\n disabled ? t('dataGrid.toolbar.exportPageOnly') : undefined\n }\n />\n );\n };\n ExportMenuItem.displayName = 'DataGrid.Toolbar.ExportMenu.Item';\n\n const ExportMenu = forwardRef<\n HTMLButtonElement,\n DataGridToolbarExportMenuProps\n >(({ children, ...rest }, ref) => (\n <parts.ExportMenu ref={ref} {...rest}>\n {children ??\n DEFAULT_EXPORT_ITEMS.map((f) => <ExportMenuItem key={f} format={f} />)}\n </parts.ExportMenu>\n ));\n ExportMenu.displayName = 'DataGrid.Toolbar.ExportMenu';\n\n // These leaves render a single DS <IconButton> trigger, so IconButtonGroup\n // accepts them as direct children (see its rendersIconButton DEV check).\n for (const leaf of [ColumnToggle, Print, Refresh, ExportMenu]) {\n (leaf as { rendersIconButton?: boolean }).rendersIconButton = true;\n }\n // Folded into a group's \"More\" menu, Print and Refresh render the shared\n // part's menu item (their action is not an onClick prop).\n Object.assign(Print, { overflowMenuItem: parts.Print.overflowMenuItem });\n Object.assign(Refresh, { overflowMenuItem: parts.Refresh.overflowMenuItem });\n\n const FilterBar = parts.FilterBar;\n const Actions = parts.Actions;\n\n return Object.assign(Root, {\n FilterBar,\n Actions,\n QuickSearch,\n FilterChips,\n FacetFilter,\n ColumnToggle,\n ExportMenu: Object.assign(ExportMenu, { Item: ExportMenuItem }),\n Print,\n Refresh,\n BulkAction,\n });\n}\n\n/**\n * The DataGrid toolbar. Put it in the grid's `toolbar` prop, or lift it into\n * a page header under `DataGridToolbarProvider`.\n */\nexport const DataGridToolbar = /* @__PURE__ */ createDataGridToolbar();\n"],"names":["useSlotSeam","_a","useDataGridContext","UNBOUND_SEAM","DataGridToolbarProvider","getGrid","children","bound","setBound","useState","useEffect","resolve","handle","seam","getDataGridToolbarSeam","prev","dataGridMountSignal","TableToolbarProvider","createDataGridToolbar","parts","createTableToolbarParts","caller","Root","forwardRef","props","ref","slotSeam","root","jsx","QuickSearch","FilterChips","_props","FacetFilter","field","options","label","column","c","allowed","isDevelopment","ColumnToggle","Print","Refresh","BulkAction","DEFAULT_EXPORT_ITEMS","ExportMenuItem","t","useTranslation","disabled","handleSelect","useCallback","actionContextOf","snapshot","fileName","exportFileName","dataGridSeamCaption","table","snapshotToTable","writeTableXlsx","writeTablePdf","ExportMenu","rest","f","leaf","FilterBar","Actions","DataGridToolbar"],"mappings":";;;;;;;;AAiDA,SAASA,IAAuC;;A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;AAAA,IACA,YAAAC;AAAA,EAAA,CACD;AACH;AAMO,MAAMuB,IAAkC,gBAAAhD,EAAA;"}
|
|
@@ -16,7 +16,7 @@ import { E as zt } from "./editable-description-KU56SP4P.js";
|
|
|
16
16
|
import { N as Xe } from "./note-timeline-BrjHBQfx.js";
|
|
17
17
|
import { P as Ot } from "./panel-header-CbtlTe85.js";
|
|
18
18
|
import { P as Ge } from "./panel-subview-DCyvn-49.js";
|
|
19
|
-
import { P as _t } from "./patient-summary-card-
|
|
19
|
+
import { P as _t } from "./patient-summary-card-DnLdbtsw.js";
|
|
20
20
|
import { S as ne } from "./section-card-CYfeQ6EQ.js";
|
|
21
21
|
import { C as nn, S as ue } from "./skeleton-tTWJpvAq.js";
|
|
22
22
|
import { T as an } from "./text-area-COMVJ1yE.js";
|
|
@@ -2195,4 +2195,4 @@ export {
|
|
|
2195
2195
|
Kn as s,
|
|
2196
2196
|
_s as u
|
|
2197
2197
|
};
|
|
2198
|
-
//# sourceMappingURL=use-appointment-details-read-
|
|
2198
|
+
//# sourceMappingURL=use-appointment-details-read-Bm408XzX.js.map
|