@alfadocs/ui-kit 1.115.0 → 1.116.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/accessible-target-Bs9ELM3l.js +6 -0
- package/dist/_chunks/{actions-cell-renderer-bI27uXXC.js → actions-cell-renderer-DzHxDyI7.js} +3 -3
- package/dist/_chunks/{address-fields-D5Ije0S2.js → address-fields-BFVCtfP2.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-BZ36ULQk.js → anamnesis-summary-rows-gEXqU5i5.js} +6 -6
- package/dist/_chunks/{appointment-card-D_-aBrx5.js → appointment-card-BMZoXaGx.js} +3 -3
- package/dist/_chunks/{appointment-peek-DWfcpoGy.js → appointment-peek-B1CCv-7J.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DxLu3afn.js → appointment-timeline-0k4LxODn.js} +3 -3
- package/dist/_chunks/{appointment-tray-BhXOJpIJ.js → appointment-tray-DIxpgIXM.js} +2 -2
- package/dist/_chunks/arrow-down-left-DECv-dJt.js +15 -0
- package/dist/_chunks/{balance-badge-cell-CXHihM22.js → balance-badge-cell-L7bD0Nsh.js} +6 -6
- package/dist/_chunks/bill-line-table-WEIRDcv6.js +1563 -0
- package/dist/_chunks/{bmi-calculator-Ba4yoR31.js → bmi-calculator-BjUfXqcY.js} +2 -2
- package/dist/_chunks/{button-group-CUnNnt8a.js → button-group-BvU9vRnX.js} +2 -2
- package/dist/_chunks/{calculator-dialog-D4TyJwqy.js → calculator-dialog-BGX5XQCM.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BVzFi4hH.js → calendar-appointment-editor-dialog-DqZMb4yd.js} +16 -16
- package/dist/_chunks/{care-plan-card-BA3MfdfZ.js → care-plan-card-CfV8jiF0.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CUtFZ813.js → care-plan-entry-card-Bt01kyTl.js} +3 -3
- package/dist/_chunks/{chart-DebrFZ6L.js → chart-BSx8cfMm.js} +2 -2
- package/dist/_chunks/circle-off-DuT9pVy2.js +16 -0
- package/dist/_chunks/combobox-BBCVQS-S.js +935 -0
- package/dist/_chunks/{compact-editor-fields-cP6yh7xv.js → compact-editor-fields-6sTWRLtf.js} +3 -3
- package/dist/_chunks/{contact-profile-card-DMXWBBkU.js → contact-profile-card-BRCHbQ3-.js} +2 -2
- package/dist/_chunks/{country-select-CUuGOAoZ.js → country-select-C2GdvRtS.js} +2 -2
- package/dist/_chunks/{cycle-calculator-C68V9rdH.js → cycle-calculator-Brd0PP4U.js} +2 -2
- package/dist/_chunks/{dashboard-grid-DrOkTtya.js → dashboard-grid-3aidD-IQ.js} +2 -2
- package/dist/_chunks/{toolbar-Bc3pjfG5.js → data-grid-ByhrYGVw.js} +3013 -3106
- package/dist/_chunks/{data-grid-tabs-CsLbIv0h.js → data-grid-tabs-D9Y4DeeH.js} +2 -2
- package/dist/_chunks/{data-table-DXaE2Ret.js → data-table-B47iw2CO.js} +101 -100
- package/dist/_chunks/{date-range-panel-CBFfkgmz.js → date-range-panel-B-DUtfw3.js} +7 -7
- package/dist/_chunks/default-tabs-BQcSqcNG.js +2250 -0
- package/dist/_chunks/dialog-CIUn5oLb.js +348 -0
- package/dist/_chunks/{document-preview-WvJKHJOP.js → document-preview-B_JGHsEW.js} +2 -2
- package/dist/_chunks/{dropdown-menu-CqxBthww.js → dropdown-menu-Dmbak7q6.js} +320 -248
- package/dist/_chunks/{due-date-calculator-C1UA5jpS.js → due-date-calculator-DzIQXEX5.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-CtlMhLai.js → editable-currency-cell-renderer-p-Q1UkZS.js} +2 -2
- package/dist/_chunks/export-files-BByoK9Cg.js +248 -0
- package/dist/_chunks/{face-scheme-DkoxiDCh.js → face-scheme-CEjJUnNe.js} +19 -18
- package/dist/_chunks/{fetal-weight-DmZzMRzB.js → fetal-weight-CJTlfh_k.js} +2 -2
- package/dist/_chunks/{file-manager-DFFExyym.js → file-manager-DEe51ZDe.js} +5 -5
- package/dist/_chunks/format-price-CIX0YJZn.js +179 -0
- package/dist/_chunks/{grid-context-AwsLJRhH.js → grid-context-jn9y8tNE.js} +4 -4
- package/dist/_chunks/{hcg-doubling-CC-dbKE8.js → hcg-doubling-BUZQkSYC.js} +2 -2
- package/dist/_chunks/{header-settings-Df9q1uHt.js → header-settings-DNgvO8fS.js} +2 -2
- package/dist/_chunks/{heatmap-eXdtmEoU.js → heatmap-tn1WxoMT.js} +3 -3
- package/dist/_chunks/{help-me-write-templates-CWxgjDZl.js → help-me-write-templates-C28E_rOt.js} +2 -2
- package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
- package/dist/_chunks/{icon-button-group-C9mPK-bX.js → icon-button-group-Ca2VkXy5.js} +2 -2
- package/dist/_chunks/{kit-extensions-CzG0RmhQ.js → kit-extensions-BFfLg7c-.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-Ditt5mvT.js → link-cell-renderer-D-Io828l.js} +4 -4
- package/dist/_chunks/{marketplace-app-shell-CcEHJgDd.js → marketplace-app-shell-CBHNg8x-.js} +4 -4
- package/dist/_chunks/money-OE6_oDPH.js +138 -0
- package/dist/_chunks/{muscle-scheme-BkmDUTmk.js → muscle-scheme-7UsRsCHP.js} +2 -2
- package/dist/_chunks/{notes-panel-BVYG_MJE.js → notes-panel-DexbfrFo.js} +3 -3
- package/dist/_chunks/number-input-DUSvP7Dq.js +625 -0
- package/dist/_chunks/{optical-prescription-CvbN8yD2.js → optical-prescription-Da_r8pMr.js} +2 -2
- package/dist/_chunks/parts-CtcTW1PN.js +869 -0
- package/dist/_chunks/{patient-details-DlT-vpSe.js → patient-details-PJ0Y__7t.js} +2 -2
- package/dist/_chunks/{patient-field-row-B54uzvu-.js → patient-field-row-0QP8KCVp.js} +5 -5
- package/dist/_chunks/{patient-search-DDRDCjZi.js → patient-search-Bdx_Ob3y.js} +2 -2
- package/dist/_chunks/{patient-summary-card-Dy9-CzON.js → patient-summary-card-BOfXDP8a.js} +3 -3
- package/dist/_chunks/{payment-request-card-BmV2pLoM.js → payment-request-card-_04afZEx.js} +14 -13
- package/dist/_chunks/{practice-results-BlxfBx-D.js → practice-results-CrBjScXX.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-qZpw3zj8.js → pregnancy-dating-Bg_VUPwl.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DQoOM8QV.js → pregnancy-weight-gain-B-eXFdmq.js} +2 -2
- package/dist/_chunks/{province-select-cVOlwEc5.js → province-select-CTM8A9SM.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-C1LGeX-G.js → radiograph-panel.agent-9jwXlOXB.js} +2 -2
- package/dist/_chunks/{reserved.agent-6p3Hm4oH.js → reserved.agent-C1zRHaya.js} +4 -4
- package/dist/_chunks/{rich-text-editor-efaMWbYz.js → rich-text-editor-r80Zw8ll.js} +12 -11
- package/dist/_chunks/row-actions-Df7TJbNR.js +213 -0
- package/dist/_chunks/{signature-request-BnTihryS.js → signature-request-CgvjLic3.js} +3 -3
- package/dist/_chunks/{tab-bar-C_pggqVr.js → tab-bar-DTn8pHqH.js} +2 -2
- package/dist/_chunks/{tabs-CXYjr_8O.js → tabs-CsmgkiG6.js} +2 -2
- package/dist/_chunks/{task-editor-CSa6vQ9r.js → task-editor-DgUjtqpX.js} +168 -178
- package/dist/_chunks/{tasks-panel-CVjY1d7Q.js → tasks-panel-B5Nsf10r.js} +2 -2
- package/dist/_chunks/{theme-toggle-CObX2Ffa.js → theme-toggle-DfvdEg_V.js} +3 -3
- package/dist/_chunks/{token-insert-menu-Dl3x2ekR.js → token-insert-menu-BdcmK5Um.js} +2 -2
- package/dist/_chunks/toolbar-DbUQBrq4.js +159 -0
- package/dist/_chunks/{tooth-scheme-C-ALCHaV.js → tooth-scheme-LTkT4EXd.js} +2 -2
- package/dist/_chunks/{transaction-chip-CohY6sTA.js → transaction-chip-CkYd-3ky.js} +47 -57
- package/dist/_chunks/{treatment-receipt-BydbojdD.js → treatment-receipt-1VnuinhY.js} +2 -2
- package/dist/_chunks/undo-2-EBxWjj1W.js +15 -0
- package/dist/_chunks/{unit-converter-D77vmlzN.js → unit-converter-YKlHyUC2.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BMAiQYo6.js → use-appointment-details-read-_r7cjTtm.js} +7 -7
- package/dist/_chunks/{verify-identity-types-C85EXNzy.js → verify-identity-types-D_LdByCp.js} +2 -2
- package/dist/_chunks/{widget-picker-U4JsEhQE.js → widget-picker-DrxJjEkv.js} +2 -2
- package/dist/_chunks/{workflow-map-B4XkcET0.js → workflow-map-D-u8_YSr.js} +2 -2
- package/dist/_chunks/{workflow-status-9wb7iWUd.js → workflow-status-fykpTxfb.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DNSe65yd.js → workflow-webhook-action-DM3W8XZE.js} +2 -2
- package/dist/agent-catalog.json +1080 -1
- package/dist/agent-i18n/en.json +50 -0
- package/dist/components/_shared/accessible-target.d.ts +12 -0
- package/dist/components/_shared/decimal.d.ts +171 -0
- package/dist/components/_shared/format-price.d.ts +54 -2
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/bill-line-table.agent.d.ts +4 -0
- package/dist/components/bill-line-table/bill-line-table.columns.d.ts +47 -0
- package/dist/components/bill-line-table/bill-line-table.d.ts +4 -0
- package/dist/components/bill-line-table/bill-line-table.model.d.ts +173 -0
- package/dist/components/bill-line-table/bill-line-table.types.d.ts +443 -0
- package/dist/components/bill-line-table/bill-line-table.variants.d.ts +34 -0
- package/dist/components/bill-line-table/index.d.ts +6 -0
- package/dist/components/bill-line-table/index.js +23 -0
- package/dist/components/bill-table/bill-table.agent.d.ts +4 -0
- package/dist/components/bill-table/bill-table.d.ts +13 -0
- package/dist/components/bill-table/bill-table.variants.d.ts +55 -0
- package/dist/components/bill-table/cells.d.ts +89 -0
- package/dist/components/bill-table/columns.d.ts +21 -0
- package/dist/components/bill-table/default-tabs.d.ts +21 -0
- package/dist/components/bill-table/handle.d.ts +19 -0
- package/dist/components/bill-table/index.d.ts +7 -0
- package/dist/components/bill-table/index.js +19 -0
- package/dist/components/bill-table/model.d.ts +103 -0
- package/dist/components/bill-table/row-actions.d.ts +27 -0
- package/dist/components/bill-table/status-maps.d.ts +225 -0
- package/dist/components/bill-table/types.d.ts +542 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +59 -1
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-grid/body.d.ts +6 -0
- package/dist/components/data-grid/data-grid.variants.d.ts +1 -9
- package/dist/components/data-grid/editors.d.ts +7 -1
- package/dist/components/data-grid/index.js +9 -8
- package/dist/components/data-grid/selection.d.ts +10 -0
- package/dist/components/data-grid/types.d.ts +61 -11
- package/dist/components/data-grid-tabs/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/dialog/focus-return.d.ts +12 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -0
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/money/index.js +1 -1
- package/dist/components/money/money.d.ts +39 -6
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.d.ts +2 -2
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +43 -2
- package/dist/components/number-input/use-locale-number.d.ts +67 -3
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/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/payment-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/row-actions/index.d.ts +3 -0
- package/dist/components/row-actions/index.js +5 -0
- package/dist/components/row-actions/row-actions.d.ts +63 -0
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/smart-date/smart-date.d.ts +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/decimal/index.js +149 -0
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +248 -0
- package/dist/i18n/locales/ar.js +249 -1
- package/dist/i18n/locales/de.d.ts +248 -0
- package/dist/i18n/locales/de.js +249 -1
- package/dist/i18n/locales/el.d.ts +248 -0
- package/dist/i18n/locales/el.js +249 -1
- package/dist/i18n/locales/en.d.ts +248 -0
- package/dist/i18n/locales/en.js +249 -1
- package/dist/i18n/locales/es.d.ts +248 -0
- package/dist/i18n/locales/es.js +249 -1
- package/dist/i18n/locales/fr.d.ts +248 -0
- package/dist/i18n/locales/fr.js +249 -1
- package/dist/i18n/locales/hi.d.ts +248 -0
- package/dist/i18n/locales/hi.js +249 -1
- package/dist/i18n/locales/it.d.ts +248 -0
- package/dist/i18n/locales/it.js +249 -1
- package/dist/i18n/locales/ja.d.ts +248 -0
- package/dist/i18n/locales/ja.js +249 -1
- package/dist/i18n/locales/nl.d.ts +248 -0
- package/dist/i18n/locales/nl.js +249 -1
- package/dist/i18n/locales/pl.d.ts +248 -0
- package/dist/i18n/locales/pl.js +249 -1
- package/dist/i18n/locales/pt.d.ts +248 -0
- package/dist/i18n/locales/pt.js +249 -1
- package/dist/i18n/locales/ro.d.ts +248 -0
- package/dist/i18n/locales/ro.js +249 -1
- package/dist/i18n/locales/ru.d.ts +248 -0
- package/dist/i18n/locales/ru.js +249 -1
- package/dist/i18n/locales/sq.d.ts +248 -0
- package/dist/i18n/locales/sq.js +249 -1
- package/dist/i18n/locales/sv.d.ts +248 -0
- package/dist/i18n/locales/sv.js +249 -1
- package/dist/i18n/locales/tr.d.ts +248 -0
- package/dist/i18n/locales/tr.js +249 -1
- package/dist/i18n/locales/zh.d.ts +248 -0
- package/dist/i18n/locales/zh.js +249 -1
- package/dist/index.js +1298 -1246
- package/dist/locales/ar.json +249 -1
- package/dist/locales/de.json +249 -1
- package/dist/locales/el.json +249 -1
- package/dist/locales/en.json +249 -1
- package/dist/locales/es.json +249 -1
- package/dist/locales/fr.json +249 -1
- package/dist/locales/hi.json +249 -1
- package/dist/locales/it.json +249 -1
- package/dist/locales/ja.json +249 -1
- package/dist/locales/nl.json +249 -1
- package/dist/locales/pl.json +249 -1
- package/dist/locales/pt.json +249 -1
- package/dist/locales/ro.json +249 -1
- package/dist/locales/ru.json +249 -1
- package/dist/locales/sq.json +249 -1
- package/dist/locales/sv.json +249 -1
- package/dist/locales/tr.json +249 -1
- package/dist/locales/zh.json +249 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/verify-identity/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +17 -1
- package/dist/_chunks/combobox-duuDRI1t.js +0 -688
- package/dist/_chunks/dialog-BTjSQjdY.js +0 -274
- package/dist/_chunks/format-price-BcFBa-WP.js +0 -52
- package/dist/_chunks/money-Tsczpjfz.js +0 -102
- package/dist/_chunks/number-input-CVwI1ltI.js +0 -423
- package/dist/_chunks/parts-Wz2LeGnH.js +0 -1113
- package/dist/_chunks/undo-2-CYNAzclj.js +0 -26
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { DataGridChange, DataGridPagination, DataGridWriteOptions } from '../data-grid/types';
|
|
3
|
+
import type { DateRangeFilterModel, NumberFilterModel } from '../_shared/table-toolbar/seam';
|
|
4
|
+
import type { EmptyStateHeadingLevel } from '../empty-state';
|
|
5
|
+
/** Platform: `DoctorBill::DIRECTION_*` (DB:37-38), field `direction`
|
|
6
|
+
* (DB:1198). `incoming` = a bill the practice received (a cost);
|
|
7
|
+
* `outgoing` = a bill the practice issued (revenue). */
|
|
8
|
+
export declare const BILL_DIRECTIONS: readonly ["incoming", "outgoing"];
|
|
9
|
+
export type BillDirection = (typeof BILL_DIRECTIONS)[number];
|
|
10
|
+
/** Platform: `DoctorBill::TYPE_*` (DB:40-44), field `type` (DB:854).
|
|
11
|
+
* `credit` is a credit note. Incoming SDI credit notes carry their kind in
|
|
12
|
+
* `documentType` (DB:282, `getDocumentType()` DB:2480); the conversion
|
|
13
|
+
* maps TD04 to `credit` (`CreateRealBillForIncomingBillService.php:115`)
|
|
14
|
+
* and refuses TD08 as unsupported (`:103-111`). */
|
|
15
|
+
export declare const BILL_TYPES: readonly ["full", "partial", "credit", "proforma", "other"];
|
|
16
|
+
export type BillType = (typeof BILL_TYPES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Payment state of the bill. The platform has NO field for it: the host
|
|
19
|
+
* derives it per row, on MAGNITUDES (a credit note's gross, paid and
|
|
20
|
+
* unpaid amounts are negative, `DoctorBill.php:341-342`), first match wins:
|
|
21
|
+
* 1. `noPaymentDue`: `type === 'proforma'` (DB:43; `isProformaOrWrittenOff()`
|
|
22
|
+
* DB:2045 forces unpaid to 0).
|
|
23
|
+
* 2. `writtenOff`: `writtenOff` true (DB:177).
|
|
24
|
+
* 3. `paid`: `getUnpaidAmount()` (DB:806; SQL `unpaid_amount`, REPO:1033)
|
|
25
|
+
* is 0.
|
|
26
|
+
* 4. `overdue`: |unpaid| > 0 and at least one open liability is due
|
|
27
|
+
* (`Liability::isDue()`, LIAB:205-208).
|
|
28
|
+
* 5. `partiallyPaid`: |`getPaidAmount()`| (DB:791; SQL `paid_amount`) > 0.
|
|
29
|
+
* 6. `unpaid`: anything else.
|
|
30
|
+
* Direction-neutral on purpose: one label per state.
|
|
31
|
+
*/
|
|
32
|
+
export declare const BILL_PAYMENT_STATUSES: readonly ["paid", "partiallyPaid", "unpaid", "overdue", "writtenOff", "noPaymentDue"];
|
|
33
|
+
export type BillPaymentStatus = (typeof BILL_PAYMENT_STATUSES)[number];
|
|
34
|
+
/**
|
|
35
|
+
* SDI (Sistema di Interscambio) state. The platform has NO field on the
|
|
36
|
+
* bill: the host derives it, first match wins:
|
|
37
|
+
* - `received`: incoming and `fatturazioneElettronicaIncomingBillId` set
|
|
38
|
+
* (DB:207).
|
|
39
|
+
* - `notApplicable`: practice country is not `it`, or an incoming bill
|
|
40
|
+
* neither from SDI nor a self-bill (`isAutoBill()` DB:2461). Renders an
|
|
41
|
+
* empty cell.
|
|
42
|
+
* - outgoing (and incoming self-bills), from the latest sending snapshot
|
|
43
|
+
* `FatturazioneElettronica\Sending\Bill` (SEND) and its batch `Sending`
|
|
44
|
+
* (`STATE_*`, Sending.php:28-30):
|
|
45
|
+
* - `notSent`: no snapshot row for the bill.
|
|
46
|
+
* - `sending`: batch state `todo` or `waiting_to_be_sent`.
|
|
47
|
+
* - `pending`: `sent` true (SEND:22), `result` null (SEND:24).
|
|
48
|
+
* - `rejected`: `result === 'rejected'` (SEND:32).
|
|
49
|
+
* - `notDelivered`: accepted and `nonDeliveryNotificationIncomingMessageId`
|
|
50
|
+
* set (SEND:28).
|
|
51
|
+
* - `delivered`: accepted and `deliveryReceiptIncomingMessageId` set
|
|
52
|
+
* (SEND:27).
|
|
53
|
+
* - `accepted`: `result === 'accepted'` (SEND:31), no receipt yet.
|
|
54
|
+
*/
|
|
55
|
+
export declare const BILL_SDI_STATUSES: readonly ["notApplicable", "notSent", "sending", "pending", "accepted", "delivered", "notDelivered", "rejected", "received"];
|
|
56
|
+
export type BillSdiStatus = (typeof BILL_SDI_STATUSES)[number];
|
|
57
|
+
/**
|
|
58
|
+
* Warehouse loading state of an incoming SDI bill. NO platform field yet:
|
|
59
|
+
* HTP-7309 adds the invoice-line reference on stock movements, which is the
|
|
60
|
+
* single source (HTP-7312: "no second status store").
|
|
61
|
+
* - `loaded`: at least one line of the bill carries a reference.
|
|
62
|
+
* - `toReview`: automatic loading ran and found an unmatched line, or it is
|
|
63
|
+
* switched off (HTP-7313).
|
|
64
|
+
* - `notLoaded`: an incoming SDI bill with neither.
|
|
65
|
+
* `null` or absent: not an incoming SDI bill, or no module (HTP-7314).
|
|
66
|
+
* Renders an empty cell.
|
|
67
|
+
*/
|
|
68
|
+
export declare const BILL_WAREHOUSE_STATUSES: readonly ["notLoaded", "toReview", "loaded"];
|
|
69
|
+
export type BillWarehouseStatus = (typeof BILL_WAREHOUSE_STATUSES)[number];
|
|
70
|
+
/**
|
|
71
|
+
* Who the counterparty is, for privacy. Privacy mode hides `patient` and
|
|
72
|
+
* `person`; `company` stays visible.
|
|
73
|
+
* - `patient`: a care-plan bill, `doctorCarePlan` (DB:92) set.
|
|
74
|
+
* - `person`: an individual who is not a patient: `doctorOperator`
|
|
75
|
+
* (DB:1208), or no linked entity and a snapshot with
|
|
76
|
+
* `counterpartFirstName`/`counterpartLastName` (DB:113, DB:118) and no
|
|
77
|
+
* `counterpartCompanyName` (DB:108).
|
|
78
|
+
* - `company`: `doctorCompany` (DB:1203; a supplier or lab), or a snapshot
|
|
79
|
+
* with `counterpartCompanyName`. NOTE: DoctorCompany has no person flag,
|
|
80
|
+
* so a sole trader stored as a company shows.
|
|
81
|
+
*/
|
|
82
|
+
export declare const BILL_COUNTERPARTY_KINDS: readonly ["patient", "person", "company"];
|
|
83
|
+
export type BillCounterpartyKind = (typeof BILL_COUNTERPARTY_KINDS)[number];
|
|
84
|
+
/**
|
|
85
|
+
* Every row action BillTable can offer, in menu order. The first four are
|
|
86
|
+
* the brief's; the rest keep today's list working and render only when the
|
|
87
|
+
* host makes them available (see `BillRow.actions`).
|
|
88
|
+
* - `open`: `ic_dcp_doctor_bill_show` (CTRL:1162).
|
|
89
|
+
* - `downloadPdf`: `ic_dcp_doctor_bill_download` (CTRL:1275).
|
|
90
|
+
* - `downloadXml`: outgoing or self-bill (`canHaveFatturazioneElettronicaXml()`
|
|
91
|
+
* DB:2507) or received from SDI.
|
|
92
|
+
* - `loadIntoWarehouse`: opens the HTP-7311 dialog, or the HTP-7314 upsell
|
|
93
|
+
* without the module. Not tied to `showWarehouseStatus`.
|
|
94
|
+
* - `edit`, `recordPayment`, `writeOff`, `undoWriteOff`, `delete`: today's
|
|
95
|
+
* edit, per-liability "Incassa"/"Pagato", "Stralcia", "Non più stralciare"
|
|
96
|
+
* and "Elimina".
|
|
97
|
+
*/
|
|
98
|
+
export declare const BILL_ROW_ACTIONS: readonly ["open", "downloadPdf", "downloadXml", "loadIntoWarehouse", "edit", "recordPayment", "writeOff", "undoWriteOff", "delete"];
|
|
99
|
+
export type BillRowActionId = (typeof BILL_ROW_ACTIONS)[number];
|
|
100
|
+
/**
|
|
101
|
+
* Kit-owned reasons, so the copy exists in 18 languages.
|
|
102
|
+
* - `alreadyLoaded`: one-load rule (HTP-7309, HTP-7311).
|
|
103
|
+
* - `sentToSdi`, `legalStorage`: `dcp.doctor_bill.list.can_not_edit_message`
|
|
104
|
+
* (canEditOrDelete false, `BillListDTO.canEditOrDelete`).
|
|
105
|
+
* - `paymentAutomation`: `...can_not_edit_or_delete_payment_automation`.
|
|
106
|
+
* - `noPermission`: the user lacks `doctor_bill_edit` / `practice_bill_delete`.
|
|
107
|
+
* - `inProgress`: the host is already running this action for the row.
|
|
108
|
+
*/
|
|
109
|
+
export declare const BILL_ACTION_DISABLED_REASONS: readonly ["alreadyLoaded", "sentToSdi", "legalStorage", "paymentAutomation", "noPermission", "inProgress"];
|
|
110
|
+
export type BillActionDisabledReason = (typeof BILL_ACTION_DISABLED_REASONS)[number];
|
|
111
|
+
/**
|
|
112
|
+
* `'enabled'`, or disabled with a kit reason or a host text (translated
|
|
113
|
+
* by the host). An action absent from the map is not shown.
|
|
114
|
+
*
|
|
115
|
+
* Don't name a person in the host text (nor in `error.description` or
|
|
116
|
+
* `extraFilterLabels`): use a kit reason code where one fits. The kit
|
|
117
|
+
* cannot tell whether a text names someone, so under privacy mode every
|
|
118
|
+
* host text reads as kit copy, and agent reads carry only the code
|
|
119
|
+
* `'host'`, never the text.
|
|
120
|
+
*/
|
|
121
|
+
export type BillRowActionState = 'enabled' | {
|
|
122
|
+
disabled: BillActionDisabledReason;
|
|
123
|
+
} | {
|
|
124
|
+
disabled: {
|
|
125
|
+
text: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export type BillRowActionMap = Partial<Record<BillRowActionId, BillRowActionState>>;
|
|
129
|
+
/** An action's state as an agent reads it: a host's own disabled text is
|
|
130
|
+
* reduced to the code `'host'`, whatever privacy mode says, since it may
|
|
131
|
+
* name a person. */
|
|
132
|
+
export type BillRowActionSummaryState = 'enabled' | {
|
|
133
|
+
disabled: BillActionDisabledReason | 'host';
|
|
134
|
+
};
|
|
135
|
+
export type BillRowActionSummaryMap = Partial<Record<BillRowActionId, BillRowActionSummaryState>>;
|
|
136
|
+
export interface BillCounterparty {
|
|
137
|
+
kind: BillCounterpartyKind;
|
|
138
|
+
/**
|
|
139
|
+
* The linked entity's name as the list shows it today: the patient of
|
|
140
|
+
* `doctorCarePlan` (DB:92), `doctorCompany.name` (DB:1203,
|
|
141
|
+
* DoctorCompany.php:20) or the `doctorOperator` (DB:1208). Fallback for a
|
|
142
|
+
* bill with no linked entity: `getRelevantCounterpartName()` (DB:2099).
|
|
143
|
+
* NOT the SDI sending snapshot. Masked under privacy mode unless `kind`
|
|
144
|
+
* is `company`.
|
|
145
|
+
*/
|
|
146
|
+
name: string;
|
|
147
|
+
/** The linked entity is soft-deleted (`DoctorCompany.deleted`,
|
|
148
|
+
* DoctorCompany.php:94; list.html.twig:100-112 appends "(cancellato)"). */
|
|
149
|
+
deleted?: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface BillRow {
|
|
152
|
+
/** `DoctorBill.id` (DB:82), as a string. The only field in the DOM. */
|
|
153
|
+
id: string;
|
|
154
|
+
/** `getNumberPrefixAndNumber()` (DB:1687): `incomingNumber` (DB:1617)
|
|
155
|
+
* for incoming, `outgoingNumberPrefix` (DB:1607) + `outgoingNumber`
|
|
156
|
+
* (DB:1612) for outgoing. Plain text, never masked: it names the row. */
|
|
157
|
+
number: string;
|
|
158
|
+
/** `DoctorBill.type` (DB:854). */
|
|
159
|
+
type: BillType;
|
|
160
|
+
/** `DoctorBill.date` (DB:72) as a calendar day `YYYY-MM-DD`. */
|
|
161
|
+
date: string;
|
|
162
|
+
/** `DoctorBill.direction` (DB:1198). */
|
|
163
|
+
direction: BillDirection;
|
|
164
|
+
/** `null` when the bill has no counterparty at all. */
|
|
165
|
+
counterparty: BillCounterparty | null;
|
|
166
|
+
/**
|
|
167
|
+
* `getGross()` (DB:773; SQL alias `gross`, REPO:1018) in minor units:
|
|
168
|
+
* the host sends `(int) round($gross * 100)` from PHP. Exact here only
|
|
169
|
+
* because SQL already rounds `gross` to 2 places (REPO:1016-1018);
|
|
170
|
+
* FatturaPA line values (up to 8 places) travel as decimal strings
|
|
171
|
+
* instead (BillLineTable). Never parsed from a float string in the
|
|
172
|
+
* browser. Sign as stored: negative for a credit note
|
|
173
|
+
* (`DoctorBill::setNet` asserts net <= 0 for credit bills,
|
|
174
|
+
* `DoctorBill.php:341-342`). The cell uses Money's default tone, so a
|
|
175
|
+
* credit note reads as a minus sign, not an alarm. In the table's
|
|
176
|
+
* `currency`. The amount FILTER is in major units (see
|
|
177
|
+
* `BillTableFilterModel.amount`).
|
|
178
|
+
*/
|
|
179
|
+
amountMinor: number;
|
|
180
|
+
paymentStatus: BillPaymentStatus;
|
|
181
|
+
/** Earliest open liability date (`DoctorBill.liabilities` DB:952,
|
|
182
|
+
* `Liability.date`), `YYYY-MM-DD`; shown under `unpaid`,
|
|
183
|
+
* `partiallyPaid` and `overdue` only. */
|
|
184
|
+
nextDueDate?: string | null;
|
|
185
|
+
sdiStatus: BillSdiStatus;
|
|
186
|
+
/** See `BillWarehouseStatus`. Read only when `showWarehouseStatus`. */
|
|
187
|
+
warehouseStatus?: BillWarehouseStatus | null;
|
|
188
|
+
/** Per-row availability; absent action = hidden. `open` should always be
|
|
189
|
+
* present (the bill number is the open control). */
|
|
190
|
+
actions: BillRowActionMap;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Sums over every bill that matches the query (all pages) for ONE
|
|
194
|
+
* direction. Same sums as today (CTRL:289-297, GeneralManager.php:193-232),
|
|
195
|
+
* split by direction because today's single sum adds costs and revenue
|
|
196
|
+
* together. Minor units, `(int) round($sum * 100)` on the server (exact:
|
|
197
|
+
* every summand is already at 2 places). Signed: credit notes count
|
|
198
|
+
* negative, as stored.
|
|
199
|
+
*/
|
|
200
|
+
export interface BillDirectionTotals {
|
|
201
|
+
/** Bills counted (`count($rows)`, GeneralManager.php:199-203). */
|
|
202
|
+
count: number;
|
|
203
|
+
/** Sum of SQL `gross` (REPO:1018). */
|
|
204
|
+
grossMinor: number;
|
|
205
|
+
/** Sum of `db.net` (DB:67). */
|
|
206
|
+
netMinor: number;
|
|
207
|
+
/** Sum of `db.vat` (DB:747). */
|
|
208
|
+
vatMinor: number;
|
|
209
|
+
/** Sum of `db.tax_at_source` (DB:1419). */
|
|
210
|
+
taxAtSourceMinor: number;
|
|
211
|
+
/** Sum of SQL `paid_amount` (REPO:1032). */
|
|
212
|
+
paidMinor: number;
|
|
213
|
+
/** Sum of SQL `unpaid_amount` (REPO:1033). */
|
|
214
|
+
unpaidMinor: number;
|
|
215
|
+
}
|
|
216
|
+
/** A direction with no matching bill is `null` or absent and gets no line. */
|
|
217
|
+
export interface BillTableTotals {
|
|
218
|
+
incoming?: BillDirectionTotals | null;
|
|
219
|
+
outgoing?: BillDirectionTotals | null;
|
|
220
|
+
}
|
|
221
|
+
export declare const BILL_TABLE_COLUMNS: readonly ["number", "date", "direction", "counterparty", "amount", "paymentStatus", "sdiStatus", "warehouseStatus", "actions"];
|
|
222
|
+
export type BillTableColumnId = (typeof BILL_TABLE_COLUMNS)[number];
|
|
223
|
+
/** Columns the server can sort. Default: all four. */
|
|
224
|
+
export declare const BILL_TABLE_SORT_COLUMNS: readonly ["number", "date", "counterparty", "amount"];
|
|
225
|
+
export type BillTableSortColumn = (typeof BILL_TABLE_SORT_COLUMNS)[number];
|
|
226
|
+
export interface BillTableSortEntry {
|
|
227
|
+
colId: BillTableSortColumn;
|
|
228
|
+
sort: 'asc' | 'desc';
|
|
229
|
+
}
|
|
230
|
+
/** A set filter whose values are one of BillTable's enums. Assignable to
|
|
231
|
+
* the kit `SelectFilterModel`. */
|
|
232
|
+
export interface BillSetFilter<TValue extends string> {
|
|
233
|
+
type: 'set';
|
|
234
|
+
values: TValue[];
|
|
235
|
+
}
|
|
236
|
+
/** Relative periods the server resolves on each request, so a saved tab
|
|
237
|
+
* "This year" stays right next year. Replaces CTRL:160-163's fixed
|
|
238
|
+
* `date_from`. */
|
|
239
|
+
export type BillDatePreset = 'today' | 'thisMonth' | 'thisYear';
|
|
240
|
+
/**
|
|
241
|
+
* Every filter BillTable carries. Column keys are evaluated by the server
|
|
242
|
+
* from the column filters in the header; host keys are written by the
|
|
243
|
+
* platform's own advanced-filter panel (`toolbarStart`) and are never
|
|
244
|
+
* evaluated by the kit. Chips show a host key's label only, never its value.
|
|
245
|
+
* A type alias (not an interface) so it is assignable to
|
|
246
|
+
* `DataGridFilterModel`.
|
|
247
|
+
*/
|
|
248
|
+
export type BillTableFilterModel = {
|
|
249
|
+
/** FORM `date_from`/`date_to`. */
|
|
250
|
+
date?: DateRangeFilterModel;
|
|
251
|
+
/** FORM `direction`. */
|
|
252
|
+
direction?: BillSetFilter<BillDirection>;
|
|
253
|
+
/** FORM `amount_from`/`amount_to` (`inRange`, either bound). MAJOR units
|
|
254
|
+
* as typed (12.50), like the platform form. Note the unit differs from
|
|
255
|
+
* `BillRow.amountMinor` (minor units): the server converts. */
|
|
256
|
+
amount?: NumberFilterModel;
|
|
257
|
+
/** New: needs the derived status in SQL. */
|
|
258
|
+
paymentStatus?: BillSetFilter<BillPaymentStatus>;
|
|
259
|
+
/** New: needs the derived status in SQL. */
|
|
260
|
+
sdiStatus?: BillSetFilter<BillSdiStatus>;
|
|
261
|
+
/** New (HTP-7312). Ignored by the server without the module. */
|
|
262
|
+
warehouseStatus?: BillSetFilter<BillWarehouseStatus>;
|
|
263
|
+
datePreset?: BillDatePreset;
|
|
264
|
+
/** FORM `type` (multi). */
|
|
265
|
+
type?: BillSetFilter<BillType>;
|
|
266
|
+
/** FORM `number` (exact). Shares its id with the `number` column, so
|
|
267
|
+
* DataGrid reads it as that column's key: its chip is named by the
|
|
268
|
+
* column, not by `filterLabels` (a bill number is not personal data). */
|
|
269
|
+
number?: string;
|
|
270
|
+
/** FORM `prefix` (exact). */
|
|
271
|
+
prefix?: string;
|
|
272
|
+
/** FORM yes/no fields: `true` = yes, `false` = no, absent = any. */
|
|
273
|
+
withInsuranceNet?: boolean;
|
|
274
|
+
withVat?: boolean;
|
|
275
|
+
withTaxAtSource?: boolean;
|
|
276
|
+
withWelfareFundContribution?: boolean;
|
|
277
|
+
withUnpaidAmount?: boolean;
|
|
278
|
+
writtenOff?: boolean;
|
|
279
|
+
/** FORM `tax_office_notification`. */
|
|
280
|
+
taxOfficeNotification?: boolean;
|
|
281
|
+
/** FORM `fatturazione_elettronica_incoming_bill`. */
|
|
282
|
+
receivedFromSdi?: boolean;
|
|
283
|
+
/** FORM `fatturazione_elettronica_sending_bill` (accepted by SDI,
|
|
284
|
+
* CTRL:189-211). */
|
|
285
|
+
sentToSdi?: boolean;
|
|
286
|
+
/** FORM `self_bill`. */
|
|
287
|
+
selfBill?: boolean;
|
|
288
|
+
/** FORM `with_liability_from`/`_to`. */
|
|
289
|
+
liabilityDate?: DateRangeFilterModel;
|
|
290
|
+
/** FORM `sdi_entry_date_from`/`_to`. */
|
|
291
|
+
sdiEntryDate?: DateRangeFilterModel;
|
|
292
|
+
/** FORM `relation_type`. */
|
|
293
|
+
relationType?: 'patient' | 'company' | 'operator';
|
|
294
|
+
/** FORM `relation`: an entity id, never a name. */
|
|
295
|
+
relation?: {
|
|
296
|
+
type: 'patient' | 'company' | 'operator';
|
|
297
|
+
id: string;
|
|
298
|
+
};
|
|
299
|
+
/** FORM `insurance`: an insurer key or `'none'`. */
|
|
300
|
+
insurance?: string;
|
|
301
|
+
/** FORM `personal_assistant`: a practice member id. */
|
|
302
|
+
personalAssistant?: string;
|
|
303
|
+
};
|
|
304
|
+
export type BillTableHostFilterKey = Exclude<keyof BillTableFilterModel, BillTableColumnId>;
|
|
305
|
+
/** The query a host holds and feeds back (controlled). */
|
|
306
|
+
export interface BillTableQueryState {
|
|
307
|
+
/** Default `[{ colId: 'date', sort: 'desc' }]` (CTRL:180-183). */
|
|
308
|
+
sorting: BillTableSortEntry[];
|
|
309
|
+
filters: BillTableFilterModel;
|
|
310
|
+
/** Matches the bill number and, unless `privacyMode`, the counterparty
|
|
311
|
+
* name. New on the platform (no free-text search today). */
|
|
312
|
+
quickFilter: string;
|
|
313
|
+
/** Zero-based. Default `{ pageIndex: 0, pageSize: 25 }`. */
|
|
314
|
+
pagination: DataGridPagination;
|
|
315
|
+
}
|
|
316
|
+
/** What `onQueryChange` reports: the state plus the privacy flag, so the
|
|
317
|
+
* server searches bill numbers only while names are hidden. */
|
|
318
|
+
export interface BillTableQuery extends BillTableQueryState {
|
|
319
|
+
privacyMode: boolean;
|
|
320
|
+
}
|
|
321
|
+
/** Who triggered a row action: a person in the table, or the handle (an
|
|
322
|
+
* agent). The platform can keep agent calls out of its analytics. */
|
|
323
|
+
export type BillActionSource = 'user' | 'api';
|
|
324
|
+
export interface BillActionContext {
|
|
325
|
+
source: BillActionSource;
|
|
326
|
+
}
|
|
327
|
+
/** HTP-7312 analytics: `bill_warehouse_load_clicked { warehouse_status }`. */
|
|
328
|
+
export interface BillLoadContext extends BillActionContext {
|
|
329
|
+
/** The row's status, or `null` (not computed without the module). */
|
|
330
|
+
warehouseStatus: BillWarehouseStatus | null;
|
|
331
|
+
}
|
|
332
|
+
export type BillDownloadFormat = 'pdf' | 'xml';
|
|
333
|
+
/** List downloads that apply the current query to EVERY matching bill
|
|
334
|
+
* (index.html.twig:91-131, IndexPage.js:29-34). Labels are kit copy. */
|
|
335
|
+
export declare const BILL_LIST_DOWNLOADS: readonly ["csv", "csvDetailed", "pdfZip", "pdfSingle", "xmlOutgoingZip", "xmlIncomingZip"];
|
|
336
|
+
export type BillListDownloadKind = (typeof BILL_LIST_DOWNLOADS)[number];
|
|
337
|
+
export interface BillTableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dir' | 'onChange'> {
|
|
338
|
+
/** The current page only. */
|
|
339
|
+
rows: readonly BillRow[];
|
|
340
|
+
/** Bills matching the query, all pages. `-1` = unknown. */
|
|
341
|
+
rowCount: number;
|
|
342
|
+
/** ISO 4217, for every amount (`current_doctor_address().currency`,
|
|
343
|
+
* list.html.twig:2). Default `'EUR'`. */
|
|
344
|
+
currency?: string;
|
|
345
|
+
/** Server sums, all pages. Absent or `null`: no totals row (the user
|
|
346
|
+
* lacks `practice_see_total_values`, index.html.twig:309-311). */
|
|
347
|
+
totals?: BillTableTotals | null;
|
|
348
|
+
/** Controlled. Pair with `onQueryChange`. */
|
|
349
|
+
query?: BillTableQueryState;
|
|
350
|
+
/** Uncontrolled seed. */
|
|
351
|
+
defaultQuery?: Partial<BillTableQueryState>;
|
|
352
|
+
/** The single fetch trigger. Never fires on mount; fires once per change
|
|
353
|
+
* of sorting, filters, quick search, page or page size (a sort, filter or
|
|
354
|
+
* search change resets the page to 0), whatever the source (the UI, the
|
|
355
|
+
* handle, a DataGridTabs switch, a new controlled `query`), and once when
|
|
356
|
+
* `privacyMode` changes while a quick search or a counterparty sort is
|
|
357
|
+
* active. That last emission is DataGrid's (the query carries the
|
|
358
|
+
* effective sort: a counterparty sort is paused, not sent, while names
|
|
359
|
+
* are hidden, and comes back when privacy mode turns off); BillTable only
|
|
360
|
+
* adds `privacyMode` to it and never emits on its own. A controlled host
|
|
361
|
+
* stores what this reports and passes it back as `query`. */
|
|
362
|
+
onQueryChange?: (query: BillTableQuery) => void;
|
|
363
|
+
/** Columns the server can sort. Default all of
|
|
364
|
+
* `BILL_TABLE_SORT_COLUMNS`. */
|
|
365
|
+
sortableColumns?: readonly BillTableSortColumn[];
|
|
366
|
+
/** Default `[25, 50, 100]`. */
|
|
367
|
+
pageSizeOptions?: readonly number[];
|
|
368
|
+
/** Checkbox column and bulk actions. Default `true`; `false` for a
|
|
369
|
+
* read-only list. */
|
|
370
|
+
selectable?: boolean;
|
|
371
|
+
/** Controlled ids, every page. Survives paging and sorting; cleared when
|
|
372
|
+
* filters or quick search change (DataGrid
|
|
373
|
+
* `clearSelectionOnFilterChange`, always on). */
|
|
374
|
+
selection?: readonly string[];
|
|
375
|
+
defaultSelection?: readonly string[];
|
|
376
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
377
|
+
/** Adds the warehouse status column (HTP-7314: practices with the
|
|
378
|
+
* module). Does not affect the `loadIntoWarehouse` action. */
|
|
379
|
+
showWarehouseStatus?: boolean;
|
|
380
|
+
/** BillTable's `data-component-id` and agent instance id, and the inner
|
|
381
|
+
* DataGrid's column-state storage key. Default `'accounting-bills'`.
|
|
382
|
+
* The inner DataGrid gets `registerAgent={false}`, so only
|
|
383
|
+
* `billTableAgent` registers under this id. */
|
|
384
|
+
gridId?: string;
|
|
385
|
+
/** Default `true`. */
|
|
386
|
+
persistColumnState?: boolean;
|
|
387
|
+
onOpen: (row: BillRow, context: BillActionContext) => void;
|
|
388
|
+
onDownload?: (row: BillRow, format: BillDownloadFormat, context: BillActionContext) => void;
|
|
389
|
+
onLoadIntoWarehouse?: (row: BillRow, context: BillLoadContext) => void;
|
|
390
|
+
onEdit?: (row: BillRow, context: BillActionContext) => void;
|
|
391
|
+
onRecordPayment?: (row: BillRow, context: BillActionContext) => void;
|
|
392
|
+
/** `revert` true = "Undo write-off". */
|
|
393
|
+
onWriteOff?: (row: BillRow, revert: boolean, context: BillActionContext) => void;
|
|
394
|
+
/** The host confirms (AlertDialog) before deleting. */
|
|
395
|
+
onDelete?: (row: BillRow, context: BillActionContext) => void;
|
|
396
|
+
/** Shows "Download PDFs" and "Download XML files" for the selection. */
|
|
397
|
+
onBulkDownload?: (ids: string[], format: BillDownloadFormat) => void;
|
|
398
|
+
/** List downloads offered in the toolbar's download menu, in this order.
|
|
399
|
+
* Default none. */
|
|
400
|
+
listDownloads?: readonly BillListDownloadKind[];
|
|
401
|
+
onListDownload?: (kind: BillListDownloadKind, query: BillTableQuery) => void;
|
|
402
|
+
/** Shows the toolbar Refresh button. */
|
|
403
|
+
onRefresh?: () => void;
|
|
404
|
+
/** Host content at the start of the filter bar: the platform's
|
|
405
|
+
* "Show advanced filters" trigger, whose panel writes host keys through
|
|
406
|
+
* the controlled `query` or `handle.setFilter`. */
|
|
407
|
+
toolbarStart?: ReactNode;
|
|
408
|
+
/** Chip labels for extra host keys the platform adds later (translated
|
|
409
|
+
* by the host). Kit keys already have kit labels. Don't name a person
|
|
410
|
+
* in a label. */
|
|
411
|
+
extraFilterLabels?: Record<string, string>;
|
|
412
|
+
/** Default `'ready'`. */
|
|
413
|
+
status?: 'ready' | 'loading' | 'error';
|
|
414
|
+
/** Overrides `ui.billTable.error.*`; `onRetry` shows "Try again".
|
|
415
|
+
* Don't name a person in the title or description. */
|
|
416
|
+
error?: {
|
|
417
|
+
title?: string;
|
|
418
|
+
description?: string;
|
|
419
|
+
onRetry?: () => void;
|
|
420
|
+
};
|
|
421
|
+
/** First-use action ("Add bill"); omitted when the user cannot create. */
|
|
422
|
+
onCreateBill?: () => void;
|
|
423
|
+
/** Heading level for the empty and error states. Default 3. */
|
|
424
|
+
headingLevel?: EmptyStateHeadingLevel;
|
|
425
|
+
/** Masks patient and person names; companies stay visible. Default
|
|
426
|
+
* `false`. */
|
|
427
|
+
privacyMode?: boolean;
|
|
428
|
+
/** Default `t('billTable.caption')`, "Bills". */
|
|
429
|
+
caption?: string;
|
|
430
|
+
/** Default `'default'`. */
|
|
431
|
+
density?: 'default' | 'compact';
|
|
432
|
+
/** `'fill'`: BillTable fills a flex column parent and its grid becomes
|
|
433
|
+
* the bounded scroll container, so the header and the totals row stay
|
|
434
|
+
* in view and a page above 100 rows is virtualised. Give the parent a
|
|
435
|
+
* bounded block size. Default `'auto'` (the grid grows with its rows). */
|
|
436
|
+
height?: 'auto' | 'fill';
|
|
437
|
+
}
|
|
438
|
+
export interface BillTableFeatureInfo {
|
|
439
|
+
selectable: boolean;
|
|
440
|
+
privacyMode: boolean;
|
|
441
|
+
showWarehouseStatus: boolean;
|
|
442
|
+
sortableColumns: BillTableSortColumn[];
|
|
443
|
+
status: 'ready' | 'loading' | 'error';
|
|
444
|
+
}
|
|
445
|
+
export interface BillTableColumnInfo {
|
|
446
|
+
id: BillTableColumnId;
|
|
447
|
+
/** Plain, translated name. */
|
|
448
|
+
label: string;
|
|
449
|
+
visible: boolean;
|
|
450
|
+
canHide: boolean;
|
|
451
|
+
sortable: boolean;
|
|
452
|
+
/** Masked by privacy mode (counterparty while `privacyMode`). */
|
|
453
|
+
masked: boolean;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* One bill as an agent may read it (state slot `rows`). The counterparty
|
|
457
|
+
* name is present only for `company`; patients and other people are never
|
|
458
|
+
* named here, whatever `privacyMode` says (agent state carries no PHI,
|
|
459
|
+
* `src/agent/types.ts:76-80`).
|
|
460
|
+
*/
|
|
461
|
+
export interface BillRowSummary {
|
|
462
|
+
id: string;
|
|
463
|
+
number: string;
|
|
464
|
+
type: BillType;
|
|
465
|
+
date: string;
|
|
466
|
+
direction: BillDirection;
|
|
467
|
+
counterpartyKind: BillCounterpartyKind | null;
|
|
468
|
+
counterpartyName?: string;
|
|
469
|
+
amountMinor: number;
|
|
470
|
+
paymentStatus: BillPaymentStatus;
|
|
471
|
+
sdiStatus: BillSdiStatus;
|
|
472
|
+
warehouseStatus: BillWarehouseStatus | null;
|
|
473
|
+
/** Reason codes only: a host's own text reads as `'host'`. */
|
|
474
|
+
actions: BillRowActionSummaryMap;
|
|
475
|
+
}
|
|
476
|
+
/** Who caused a change, as DataGrid reports it. */
|
|
477
|
+
export type BillTableChange = DataGridChange;
|
|
478
|
+
/**
|
|
479
|
+
* Curated handle (`ref`). Ids and kit shapes only: no DataGrid handle, no
|
|
480
|
+
* TanStack object, no row object, no DOM node. Reads go to the live grid,
|
|
481
|
+
* so a read straight after a write is fresh.
|
|
482
|
+
*
|
|
483
|
+
* Saved views: wrap BillTable in `DataGridTabs`. The DataGrid inside
|
|
484
|
+
* registers itself with the tabs through context, so no `getTable` is
|
|
485
|
+
* needed. This handle is not a `DataGridTabsSeam` (the seam also needs
|
|
486
|
+
* `applyView`, `isPrivacyMode` and DataGrid's full column info), so do not
|
|
487
|
+
* pass it as `getTable`.
|
|
488
|
+
*/
|
|
489
|
+
export interface BillTableHandle {
|
|
490
|
+
getFeatures(): BillTableFeatureInfo;
|
|
491
|
+
/** The effective query, as `onQueryChange` reports it (a paused
|
|
492
|
+
* counterparty sort left out under privacy mode). */
|
|
493
|
+
getQuery(): BillTableQuery;
|
|
494
|
+
/** Refused (no-op, DEV warning) for a column outside `sortableColumns`
|
|
495
|
+
* or masked by privacy mode. The server sorts by one column: only the
|
|
496
|
+
* first entry is used. */
|
|
497
|
+
setSort(model: readonly BillTableSortEntry[]): void;
|
|
498
|
+
/** Every filter the table holds: column models and host keys, a filter
|
|
499
|
+
* paused by privacy mode included. */
|
|
500
|
+
getFilter(): BillTableFilterModel;
|
|
501
|
+
setFilter(model: BillTableFilterModel, options?: DataGridWriteOptions): void;
|
|
502
|
+
getQuickFilter(): string;
|
|
503
|
+
setQuickFilter(text: string, options?: DataGridWriteOptions): void;
|
|
504
|
+
clearFilters(): void;
|
|
505
|
+
goToPage(pageIndex: number): void;
|
|
506
|
+
setPageSize(size: number): void;
|
|
507
|
+
/** `-1` when the total is unknown. */
|
|
508
|
+
getPageCount(): number;
|
|
509
|
+
getRowCount(): number;
|
|
510
|
+
/** The current page, display order. */
|
|
511
|
+
getRowIds(): string[];
|
|
512
|
+
getSelection(): string[];
|
|
513
|
+
setSelection(ids: readonly string[]): void;
|
|
514
|
+
selectRange(fromId: string, toId: string): void;
|
|
515
|
+
clearSelection(): void;
|
|
516
|
+
getColumns(): BillTableColumnInfo[];
|
|
517
|
+
setColumnVisible(id: BillTableColumnId, visible: boolean): void;
|
|
518
|
+
resetColumns(): void;
|
|
519
|
+
scrollToRow(id: string): void;
|
|
520
|
+
/** Focus the row's control in `columnId` (`number` = the open button,
|
|
521
|
+
* `actions` = the menu button). Default `number`. */
|
|
522
|
+
focusRow(id: string, columnId?: 'number' | 'actions'): void;
|
|
523
|
+
/** Never a patient's or person's name; see `BillRowSummary`. */
|
|
524
|
+
getRowSummaries(): BillRowSummary[];
|
|
525
|
+
/** The actions the table offers for the row: entries of `row.actions`
|
|
526
|
+
* whose callback is set (`open` always has one). Under privacy mode
|
|
527
|
+
* every host's own disabled text reads as kit copy, whatever the
|
|
528
|
+
* counterparty. For the host; agents read `getRowSummaries()`, which
|
|
529
|
+
* carries reason codes only. Throws `UNKNOWN_ROW`. */
|
|
530
|
+
getRowActions(id: string): BillRowActionMap;
|
|
531
|
+
/** Throws `UNKNOWN_ROW`, `ACTION_UNAVAILABLE` (absent from the row's map,
|
|
532
|
+
* or no callback) or `ACTION_DISABLED: <reason>`, where the reason is the
|
|
533
|
+
* kit code or `host` (never a host's text). */
|
|
534
|
+
openBill(id: string): void;
|
|
535
|
+
downloadBill(id: string, format: BillDownloadFormat): void;
|
|
536
|
+
loadIntoWarehouse(id: string): void;
|
|
537
|
+
subscribe(listener: (change: BillTableChange) => void): () => void;
|
|
538
|
+
}
|
|
539
|
+
/** Stable tab ids (developer constants; emitted as `data-tab-id`). */
|
|
540
|
+
export declare const BILL_TABLE_DEFAULT_TAB_IDS: readonly ["bills-this-year", "bills-all", "bills-incoming", "bills-outgoing", "bills-to-pay", "bills-to-collect", "bills-to-load"];
|
|
541
|
+
export type BillTableDefaultTabId = (typeof BILL_TABLE_DEFAULT_TAB_IDS)[number];
|
|
542
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as m } from "../../_chunks/bmi-calculator-
|
|
1
|
+
import { B as m } from "../../_chunks/bmi-calculator-BjUfXqcY.js";
|
|
2
2
|
import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
|
|
3
3
|
export {
|
|
4
4
|
m as BmiCalculator,
|