@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
package/dist/agent-i18n/en.json
CHANGED
|
@@ -126,6 +126,56 @@
|
|
|
126
126
|
"close": "Close the suggestion list."
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
+
"billLineTable": {
|
|
130
|
+
"state": {
|
|
131
|
+
"lines": "Every invoice line in invoice order, with what Confirm will do with it. Quantities are exact decimal text as shown, unsigned; there are no descriptions or names.",
|
|
132
|
+
"selection": "Ids of the ticked lines: the lines Confirm will load.",
|
|
133
|
+
"summary": "Counts and totals of the ticked lines. net, vat and gross are exact decimal text with 2 places (\"14.58\"). canConfirm is false while no line is ticked, a ticked line cannot load, or the invoice is already loaded (invoiceLoaded).",
|
|
134
|
+
"invalidLineIds": "Ticked lines that cannot load as they are: an empty or zero quantity, an item no longer in the warehouse, or an error from the server."
|
|
135
|
+
},
|
|
136
|
+
"actions": {
|
|
137
|
+
"selectLines": "Tick or untick lines. Lines of an invoice that is already loaded cannot be ticked. Returns the ticked ids.",
|
|
138
|
+
"selectAllLines": "Tick every line that can load. Returns the ticked ids.",
|
|
139
|
+
"clearSelection": "Untick every line.",
|
|
140
|
+
"setQuantity": "Set the quantity of a line as shown in the table: a decimal above 0 and at most 10000000, with a dot and up to 8 places, never signed. On a credit note it is the quantity to remove. The line amount stays as invoiced. Does not tick the line.",
|
|
141
|
+
"setItem": "Load a line into an existing warehouse item, by item id. Does not tick the line.",
|
|
142
|
+
"createNewItem": "Mark a line to create a new warehouse item when the invoice is loaded. Without a name, the item takes the line description. Nothing is created until Confirm. Does not tick the line.",
|
|
143
|
+
"focusLine": "Scroll a line into view and move focus to its checkbox, quantity or item field."
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"billTable": {
|
|
147
|
+
"state": {
|
|
148
|
+
"features": "What this bill list can do now: selection, privacy mode, the warehouse column, sortable columns and loading status.",
|
|
149
|
+
"rows": "The bills on the current page, amounts in hundredths. A counterparty name is given only for companies; patients and other people are never named.",
|
|
150
|
+
"selection": "Ids of the selected bills, on every page.",
|
|
151
|
+
"sort": "The active sort, as the server receives it. A counterparty sort is left out while privacy mode is on.",
|
|
152
|
+
"filter": "The active filters. Under privacy mode, filters that can point at a person read { masked: true }.",
|
|
153
|
+
"quickFilter": "Empty when no quick search is set; otherwise { masked: true }, since the text may be a name. Set it with set_quick_filter.",
|
|
154
|
+
"currentPage": "Zero-based page index.",
|
|
155
|
+
"pageSize": "Bills per page.",
|
|
156
|
+
"pageCount": "Number of pages; -1 when the total is unknown.",
|
|
157
|
+
"rowCount": "Bills matching the filters, on every page; -1 when unknown.",
|
|
158
|
+
"columns": "The columns, in display order."
|
|
159
|
+
},
|
|
160
|
+
"actions": {
|
|
161
|
+
"selectRows": "Replace the selection with the given bill ids. Changing a filter or the search clears it.",
|
|
162
|
+
"selectRange": "Select every bill from fromId to toId on the current page, inclusive.",
|
|
163
|
+
"clearSelection": "Clear the selection on every page.",
|
|
164
|
+
"sortBy": "Sort the bills by one column. The host fetches the first page again.",
|
|
165
|
+
"applyFilter": "Replace the filters. The host fetches the first page again.",
|
|
166
|
+
"setQuickFilter": "Search by bill number, and by counterparty name unless privacy mode is on.",
|
|
167
|
+
"clearFilters": "Remove every filter and the quick search.",
|
|
168
|
+
"goToPage": "Go to a zero-based page.",
|
|
169
|
+
"setPageSize": "Change how many bills show per page.",
|
|
170
|
+
"scrollToRow": "Scroll a bill on the current page into view.",
|
|
171
|
+
"setColumnVisibility": "Show or hide a column. The choice is saved for this list.",
|
|
172
|
+
"resetColumns": "Put every column back to its default and delete the column choices saved for this list.",
|
|
173
|
+
"getRowActions": "Which actions one bill offers now, and why a disabled one is disabled.",
|
|
174
|
+
"openBill": "Open one bill. The host shows its page.",
|
|
175
|
+
"downloadBill": "Download one bill as a PDF or an electronic invoice (XML).",
|
|
176
|
+
"loadIntoWarehouse": "Open the dialog that loads an incoming SDI bill's lines into the warehouse. Nothing loads until the user confirms."
|
|
177
|
+
}
|
|
178
|
+
},
|
|
129
179
|
"bishopScore": {
|
|
130
180
|
"state": {
|
|
131
181
|
"selection": "The five cervical-exam findings keyed by component (dilation, effacement, station, consistency, position). Each value is an enumerated option key, not free text.",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The accessible themes' target floor for a compact control (05:9; WCAG
|
|
3
|
+
* 2.5.5, AAA). A control grows to `--min-target-size` where
|
|
4
|
+
* `--accessible-target-floor` is set (`.theme-accessible`) and keeps its
|
|
5
|
+
* compact size elsewhere. The calendar toolbar's precedent
|
|
6
|
+
* (`ACCESSIBLE_TARGET_SQUARE_CLASS`).
|
|
7
|
+
*/
|
|
8
|
+
export declare const accessibleTargetBlockClass = "ds:[min-block-size:var(--accessible-target-floor,auto)]";
|
|
9
|
+
/** The same floor on both axes, for icon-only buttons (DataGrid's expander
|
|
10
|
+
* and filter trigger, RowActions). */
|
|
11
|
+
export declare const accessibleTargetSquareClass = "ds:[min-block-size:var(--accessible-target-floor,auto)] ds:[min-inline-size:var(--accessible-target-floor,auto)]";
|
|
12
|
+
//# sourceMappingURL=accessible-target.d.ts.map
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exact decimal strings, with no float step.
|
|
3
|
+
*
|
|
4
|
+
* FatturaPA (Italian e-invoice) values such as `Quantita` "2.50000000" or
|
|
5
|
+
* `PrezzoUnitario` "12.345600" carry up to 8 decimal places, and no double
|
|
6
|
+
* holds most of them exactly. This module reads such text into integer
|
|
7
|
+
* units plus a scale, computes with BigInt, and rounds once, half away from
|
|
8
|
+
* zero, the rule NumberInput and Money use.
|
|
9
|
+
*
|
|
10
|
+
* React-free on purpose: hosts can use it in plain TypeScript through
|
|
11
|
+
* `@alfadocs/ui-kit/decimal`. Money takes the result as `value={units}`
|
|
12
|
+
* and `scale={scale}`; NumberInput takes `decimalToNumber(value)` and
|
|
13
|
+
* reports back through `numberToDecimal(n, digits)`.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* A plain decimal as text: an optional "-", digits, then optionally "." and
|
|
17
|
+
* digits. Dot only: no grouping, no exponent, no "+". It is the form
|
|
18
|
+
* FatturaPA uses (`Quantita` `[0-9]{1,12}\.[0-9]{2,8}`, `PrezzoUnitario`
|
|
19
|
+
* and `PrezzoTotale` `[\-]?[0-9]{1,11}\.[0-9]{2,8}`) and the form a JSON
|
|
20
|
+
* API should send for these fields.
|
|
21
|
+
*/
|
|
22
|
+
export type DecimalString = string;
|
|
23
|
+
/** value = units / 10^scale. `units` is always a safe integer and `scale`
|
|
24
|
+
* a whole number of 0 or more. */
|
|
25
|
+
export interface ScaledDecimal {
|
|
26
|
+
units: number;
|
|
27
|
+
scale: number;
|
|
28
|
+
}
|
|
29
|
+
/** Why a text is not a valid decimal. Codes, not copy: the host maps them
|
|
30
|
+
* to its own messages. */
|
|
31
|
+
export type DecimalError = 'empty' | 'syntax' | 'negative' | 'integer-digits' | 'fraction-digits' | 'unsafe';
|
|
32
|
+
export type ParseDecimalResult = {
|
|
33
|
+
ok: true;
|
|
34
|
+
value: ScaledDecimal;
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
error: DecimalError;
|
|
38
|
+
};
|
|
39
|
+
export interface DecimalRules {
|
|
40
|
+
/** Default true: credit notes (TD04, TD08) and discounts carry a minus. */
|
|
41
|
+
allowNegative?: boolean;
|
|
42
|
+
/** Most digits before the point (leading zeros not counted). */
|
|
43
|
+
maxIntegerDigits?: number;
|
|
44
|
+
/** Fewest digits after the point. Default 0 (the point is optional). */
|
|
45
|
+
minFractionDigits?: number;
|
|
46
|
+
/** Most digits after the point. Default: no limit. */
|
|
47
|
+
maxFractionDigits?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* FatturaPA 1.2 field rules, for validating XML text (the wire). `Quantita`
|
|
51
|
+
* is unsigned with 2 to 8 decimals; `PrezzoUnitario` and `PrezzoTotale` are
|
|
52
|
+
* signed with 2 to 8; `AliquotaIVA` has exactly 2. Check them against the
|
|
53
|
+
* published schema before relying on them for anything but display.
|
|
54
|
+
*/
|
|
55
|
+
export declare const FATTURAPA_DECIMAL: {
|
|
56
|
+
readonly quantity: {
|
|
57
|
+
readonly allowNegative: false;
|
|
58
|
+
readonly maxIntegerDigits: 12;
|
|
59
|
+
readonly minFractionDigits: 2;
|
|
60
|
+
readonly maxFractionDigits: 8;
|
|
61
|
+
};
|
|
62
|
+
readonly unitPrice: {
|
|
63
|
+
readonly allowNegative: true;
|
|
64
|
+
readonly maxIntegerDigits: 11;
|
|
65
|
+
readonly minFractionDigits: 2;
|
|
66
|
+
readonly maxFractionDigits: 8;
|
|
67
|
+
};
|
|
68
|
+
readonly lineTotal: {
|
|
69
|
+
readonly allowNegative: true;
|
|
70
|
+
readonly maxIntegerDigits: 11;
|
|
71
|
+
readonly minFractionDigits: 2;
|
|
72
|
+
readonly maxFractionDigits: 8;
|
|
73
|
+
};
|
|
74
|
+
readonly rate: {
|
|
75
|
+
readonly allowNegative: false;
|
|
76
|
+
readonly maxIntegerDigits: 3;
|
|
77
|
+
readonly minFractionDigits: 2;
|
|
78
|
+
readonly maxFractionDigits: 2;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* The same limits with the point optional (`minFractionDigits: 0`), for
|
|
83
|
+
* values a kit component holds and normalises rather than XML text: "1"
|
|
84
|
+
* (the platform's value when `Quantita` is absent) and "2.5" (an edited
|
|
85
|
+
* quantity) are valid here and invalid as FatturaPA text.
|
|
86
|
+
*/
|
|
87
|
+
export declare const FATTURAPA_VALUE: {
|
|
88
|
+
readonly quantity: {
|
|
89
|
+
readonly minFractionDigits: 0;
|
|
90
|
+
readonly allowNegative: false;
|
|
91
|
+
readonly maxIntegerDigits: 12;
|
|
92
|
+
readonly maxFractionDigits: 8;
|
|
93
|
+
};
|
|
94
|
+
readonly unitPrice: {
|
|
95
|
+
readonly minFractionDigits: 0;
|
|
96
|
+
readonly allowNegative: true;
|
|
97
|
+
readonly maxIntegerDigits: 11;
|
|
98
|
+
readonly maxFractionDigits: 8;
|
|
99
|
+
};
|
|
100
|
+
readonly lineTotal: {
|
|
101
|
+
readonly minFractionDigits: 0;
|
|
102
|
+
readonly allowNegative: true;
|
|
103
|
+
readonly maxIntegerDigits: 11;
|
|
104
|
+
readonly maxFractionDigits: 8;
|
|
105
|
+
};
|
|
106
|
+
readonly rate: {
|
|
107
|
+
readonly minFractionDigits: 0;
|
|
108
|
+
readonly allowNegative: false;
|
|
109
|
+
readonly maxIntegerDigits: 3;
|
|
110
|
+
readonly maxFractionDigits: 2;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Split a decimal string into integer units and a scale with no float step:
|
|
115
|
+
* "12.345600" gives `{ units: 12345600, scale: 6 }`, the string's own
|
|
116
|
+
* scale. Surrounding whitespace is trimmed (XML text nodes). When the units
|
|
117
|
+
* would pass `Number.MAX_SAFE_INTEGER`, trailing zeros are dropped first
|
|
118
|
+
* (same value, smaller scale), and the result is `'unsafe'` only when that
|
|
119
|
+
* is still too big. With no rules, any sign and any number of digits pass.
|
|
120
|
+
*/
|
|
121
|
+
export declare function parseDecimal(text: string, rules?: DecimalRules): ParseDecimalResult;
|
|
122
|
+
/** Does the text parse under these rules? */
|
|
123
|
+
export declare function isDecimalString(text: string, rules?: DecimalRules): boolean;
|
|
124
|
+
/** Exact text for a scaled decimal, padded with zeros to
|
|
125
|
+
* `minFractionDigits` (FatturaPA wants at least 2). Never rounds and never
|
|
126
|
+
* drops digits: `{ units: 25, scale: 1 }` gives "2.5", or "2.50" with 2. */
|
|
127
|
+
export declare function formatDecimal(value: ScaledDecimal, minFractionDigits?: number): DecimalString;
|
|
128
|
+
/** The same value at another scale, rounded half away from zero when the
|
|
129
|
+
* scale shrinks. `null` when the result is not a safe integer. */
|
|
130
|
+
export declare function rescaleDecimal(value: ScaledDecimal, scale: number): ScaledDecimal | null;
|
|
131
|
+
/** a × b at `scale` (scale 2 for a line amount in cents), exact until the
|
|
132
|
+
* one final rounding. `null` when the result is not a safe integer. */
|
|
133
|
+
export declare function multiplyDecimal(a: ScaledDecimal, b: ScaledDecimal, scale: number): ScaledDecimal | null;
|
|
134
|
+
/** a ÷ b at `scale`, with one rounding half away from zero (the net unit
|
|
135
|
+
* cost of a line: `PrezzoTotale` ÷ quantity). `null` when `b` is zero or
|
|
136
|
+
* the result is not a safe integer. */
|
|
137
|
+
export declare function divideDecimal(a: ScaledDecimal, b: ScaledDecimal, scale: number): ScaledDecimal | null;
|
|
138
|
+
/** The exact sum at the largest scale given (a totals footer). `null` when
|
|
139
|
+
* the result is not a safe integer. An empty list sums to 0. */
|
|
140
|
+
export declare function sumDecimals(values: readonly ScaledDecimal[]): ScaledDecimal | null;
|
|
141
|
+
/** Compare by value, whatever the scales: "1.50" equals "1.5". */
|
|
142
|
+
export declare function compareDecimal(a: ScaledDecimal, b: ScaledDecimal): -1 | 0 | 1;
|
|
143
|
+
/**
|
|
144
|
+
* The number for NumberInput's `value`, only when it is exact both ways: up
|
|
145
|
+
* to 15 significant digits a double gives back the same decimal text, so
|
|
146
|
+
* the field shows what the platform sent. `null` beyond that: the host
|
|
147
|
+
* keeps the value read-only rather than lose digits.
|
|
148
|
+
*/
|
|
149
|
+
export declare function decimalToNumber(value: ScaledDecimal): number | null;
|
|
150
|
+
/**
|
|
151
|
+
* A finite number as plain decimal text, never exponent notation:
|
|
152
|
+
* `String(2e-7)` is "2e-7", which an edit text cannot use. Values from 1e-6
|
|
153
|
+
* up to 1e21 already print plainly and pass through.
|
|
154
|
+
*/
|
|
155
|
+
export declare function toPlainString(n: number): string;
|
|
156
|
+
/**
|
|
157
|
+
* Move the decimal point `by` places. Working on the exponent, not by
|
|
158
|
+
* multiplying, avoids binary error: `0.07 * 100` is 7.000000000000001 and
|
|
159
|
+
* `Math.round(1.005 * 100) / 100` is 1, where this gives 7 and 100.5.
|
|
160
|
+
* Handles values that print in exponent notation (5e-7, 1e21) by adding to
|
|
161
|
+
* their exponent instead of appending a second one.
|
|
162
|
+
*/
|
|
163
|
+
export declare function shiftDecimal(n: number, by: number): number;
|
|
164
|
+
/**
|
|
165
|
+
* NumberInput's `onChange` value back to a decimal: the double's shortest
|
|
166
|
+
* text, rounded half away from zero to `maxFractionDigits` (8 for a
|
|
167
|
+
* FatturaPA quantity). `null` for NaN, Infinity or an unsafe result. Then
|
|
168
|
+
* `formatDecimal` gives the text to store.
|
|
169
|
+
*/
|
|
170
|
+
export declare function numberToDecimal(n: number, maxFractionDigits: number): ScaledDecimal | null;
|
|
171
|
+
//# sourceMappingURL=decimal.d.ts.map
|
|
@@ -17,7 +17,56 @@
|
|
|
17
17
|
* Both apply the same zero-decimal divisor rule; only the failure
|
|
18
18
|
* behaviour differs.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Extra precision for a price whose integer carries more (or fewer)
|
|
22
|
+
* decimal places than the currency's usual minor unit: an invoice unit
|
|
23
|
+
* price such as 12.3456 EUR (FatturaPA `PrezzoUnitario`) arrives as
|
|
24
|
+
* `123456` with `scale: 4`.
|
|
25
|
+
*
|
|
26
|
+
* Leave every field out and the price formats exactly as before. Any field
|
|
27
|
+
* set moves the amount onto an exact path: the integer is rounded with
|
|
28
|
+
* integer arithmetic and handed to `Intl` as a decimal string, so no
|
|
29
|
+
* floating-point division can shift a digit.
|
|
30
|
+
*
|
|
31
|
+
* On this exact path, exact digits are promised for safe integers only. A
|
|
32
|
+
* non-integer or an integer beyond `Number.MAX_SAFE_INTEGER` is divided as
|
|
33
|
+
* a float and rounded by `Intl`, as the default path does: 12.5 at scale 2
|
|
34
|
+
* shows 0.13, and a warning is logged once per value in development. Above
|
|
35
|
+
* 15 significant digits, exactness also needs an engine that formats a
|
|
36
|
+
* decimal string exactly (see `DecimalFormatter`). With no field set, the
|
|
37
|
+
* amount is divided by 100 as a float and nothing is warned, as before.
|
|
38
|
+
*
|
|
39
|
+
* Passing the default scale explicitly gives the same output as leaving
|
|
40
|
+
* it out, with three exceptions, all in the exact path's favour: `-0`
|
|
41
|
+
* shows without a minus sign; an amount above 15 significant digits keeps
|
|
42
|
+
* its exact last digit where the float division would not; and a currency
|
|
43
|
+
* that `Intl` shows with fewer digits than the kit's divisor of 100 (ISK,
|
|
44
|
+
* for one) keeps its minor digits instead of rounding them away, since
|
|
45
|
+
* the exact path never rounds unless asked.
|
|
46
|
+
*/
|
|
47
|
+
export interface PricePrecision {
|
|
48
|
+
/**
|
|
49
|
+
* How many decimal places the integer encodes. Defaults to the kit's
|
|
50
|
+
* minor-unit rule: 2, or 0 for a zero-decimal currency such as JPY, so
|
|
51
|
+
* `8000` EUR is still 80.00. Whole numbers from 0 to 20; anything else
|
|
52
|
+
* falls back to the default and logs a warning in development, since
|
|
53
|
+
* the amount would then show off by a power of ten.
|
|
54
|
+
*/
|
|
55
|
+
scale?: number;
|
|
56
|
+
/**
|
|
57
|
+
* The fewest fraction digits to show. Defaults to the currency's own
|
|
58
|
+
* (2 for EUR), so trailing zeros beyond it are trimmed: `123400` at
|
|
59
|
+
* scale 4 shows 12.34, `123450` shows 12.345.
|
|
60
|
+
*/
|
|
61
|
+
minimumFractionDigits?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The most fraction digits to show. Defaults to the larger of `scale` and
|
|
64
|
+
* the currency's own digits, so a price is never rounded by default. Set
|
|
65
|
+
* it below `scale` to round half away from zero.
|
|
66
|
+
*/
|
|
67
|
+
maximumFractionDigits?: number;
|
|
68
|
+
}
|
|
69
|
+
export declare function formatPrice(minorUnits: number, currency: string, locale: string, precision?: PricePrecision): string;
|
|
21
70
|
/**
|
|
22
71
|
* A first-visit price caption: `0` means the visit is free, so it reads as
|
|
23
72
|
* the caller's translated word ("Free" / "Gratuito"), never as "€0.00".
|
|
@@ -37,6 +86,9 @@ export declare function formatPriceOrFree(minorUnits: number, currency: string,
|
|
|
37
86
|
*
|
|
38
87
|
* Returns `null` when the locale or currency is rejected — callers fall
|
|
39
88
|
* back to {@link formatPrice}, which keeps the zero-decimal rule.
|
|
89
|
+
*
|
|
90
|
+
* The {@link PricePrecision} fields work as they do in `formatPrice`; pass
|
|
91
|
+
* the same ones to both so the fallback agrees with the parts.
|
|
40
92
|
*/
|
|
41
|
-
export declare function formatPriceParts(minorUnits: number, currency: string, locale: string, options?: Pick<Intl.NumberFormatOptions, 'signDisplay'>): Intl.NumberFormatPart[] | null;
|
|
93
|
+
export declare function formatPriceParts(minorUnits: number, currency: string, locale: string, options?: Pick<Intl.NumberFormatOptions, 'signDisplay'> & PricePrecision): Intl.NumberFormatPart[] | null;
|
|
42
94
|
//# sourceMappingURL=format-price.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as p } from "../../_chunks/appointment-card-
|
|
2
|
-
import { A as e, a as o, b as r } from "../../_chunks/appointment-tray-
|
|
1
|
+
import { A as p } from "../../_chunks/appointment-card-BMZoXaGx.js";
|
|
2
|
+
import { A as e, a as o, b as r } from "../../_chunks/appointment-tray-DIxpgIXM.js";
|
|
3
3
|
import { i } from "../../_chunks/is-safe-url-DkETxeHz.js";
|
|
4
4
|
export {
|
|
5
5
|
p as AppointmentCard,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a as n, p, u as s } from "../../_chunks/use-appointment-details-read-
|
|
1
|
+
import { A as e, a as n, p, u as s } from "../../_chunks/use-appointment-details-read-_r7cjTtm.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AppointmentDetailsPanel,
|
|
4
4
|
n as appointmentDetailsPanelAgent,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import { type ComboboxOption } from '../combobox';
|
|
3
|
+
import type { DataGridColumn } from '../data-grid';
|
|
4
|
+
import { type DecimalString } from '../_shared/decimal';
|
|
5
|
+
import type { BillDocumentKind, BillLineItemChoice, BillLineItemOption, BillLineRow, BillLineSummary } from './bill-line-table.types';
|
|
6
|
+
/** What the item editors read that changes while a person works. */
|
|
7
|
+
export interface BillLineItemSearch {
|
|
8
|
+
/** `items` as Combobox options, mapped once per change of `items`. */
|
|
9
|
+
itemOptions: ComboboxOption[];
|
|
10
|
+
/** Ids in `itemOptions`. */
|
|
11
|
+
itemOptionIds: ReadonlySet<string>;
|
|
12
|
+
/** `onItemQueryChange` is set: the host filters, the Combobox does not. */
|
|
13
|
+
serverSearch: boolean;
|
|
14
|
+
itemsLoading: boolean;
|
|
15
|
+
/** The line whose item field typed last: only its list shows loading. */
|
|
16
|
+
searchingLineId: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare const BillLineItemSearchContext: import("react").Context<BillLineItemSearch>;
|
|
19
|
+
/** The rendered summary, for the totals row. */
|
|
20
|
+
export declare const BillLineSummaryContext: import("react").Context<BillLineSummary | null>;
|
|
21
|
+
export interface BillLineColumnDeps {
|
|
22
|
+
t: TFunction<'ui'>;
|
|
23
|
+
/** The UI language (`i18n.language`), for `formatNumber`. */
|
|
24
|
+
language: string;
|
|
25
|
+
documentKind: BillDocumentKind;
|
|
26
|
+
currency: string;
|
|
27
|
+
privacyMode: boolean;
|
|
28
|
+
/** A person edited a quantity; `null` while the field is empty. */
|
|
29
|
+
setQuantity: (lineId: string, quantity: DecimalString | null) => void;
|
|
30
|
+
/** A person chose an item, or "Create new item". */
|
|
31
|
+
setItem: (lineId: string, choice: BillLineItemChoice) => void;
|
|
32
|
+
/** A person typed in a line's item field (server search only). */
|
|
33
|
+
queryItems: (lineId: string, query: string) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The columns. The working columns come first after the pinned description
|
|
37
|
+
* (quantity, item, status, warnings: about 1,050 px with the checkbox, so
|
|
38
|
+
* they fit the `xl` Dialog), then the figures to check against the paper
|
|
39
|
+
* invoice. Widths are DataGrid `size` numbers (the column API, not CSS);
|
|
40
|
+
* the table is in fixed layout. No sorting, filtering, hiding or moving
|
|
41
|
+
* (D10), and no responsive tiers: a column hidden at 200% zoom would have
|
|
42
|
+
* no way back, so the table scrolls sideways instead (WCAG 1.4.10).
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildBillLineColumns(deps: BillLineColumnDeps): DataGridColumn<BillLineRow>[];
|
|
45
|
+
/** `items` as Combobox options (mapped once per change of `items`). */
|
|
46
|
+
export declare function toItemOptions(items: readonly BillLineItemOption[]): ComboboxOption[];
|
|
47
|
+
//# sourceMappingURL=bill-line-table.columns.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BillLineTableHandle, BillLineTableProps } from './bill-line-table.types';
|
|
2
|
+
export type { BillLineTableHandle, BillLineTableProps, } from './bill-line-table.types';
|
|
3
|
+
export declare const BillLineTable: import("react").ForwardRefExoticComponent<BillLineTableProps & import("react").RefAttributes<BillLineTableHandle>>;
|
|
4
|
+
//# sourceMappingURL=bill-line-table.d.ts.map
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { type DecimalString, type ScaledDecimal } from '../_shared/decimal';
|
|
2
|
+
import type { BillDocumentKind, BillLine, BillLineInfo, BillLineItemChoice, BillLineItemOption, BillLineLoadResult, BillLineMatchState, BillLineRow, BillLineSummary, BillLineValue, BillLineValues } from './bill-line-table.types';
|
|
3
|
+
/** Most fraction digits of a quantity: FatturaPA 2.2.1.5 `Quantita`
|
|
4
|
+
* (`[0-9]{1,12}\.[0-9]{2,8}`, quoted in `Version20260608180319.php:38`). */
|
|
5
|
+
export declare const BILL_LINE_QUANTITY_FRACTION_DIGITS = 8;
|
|
6
|
+
/** Most fraction digits of a price or amount: FatturaPA 2.2.1.9
|
|
7
|
+
* `PrezzoUnitario`, 2.2.1.11 `PrezzoTotale`, 2.2.1.10.3 `Importo`. */
|
|
8
|
+
export declare const BILL_LINE_PRICE_FRACTION_DIGITS = 8;
|
|
9
|
+
/** Fraction digits of a rate: 2.2.1.12 `AliquotaIVA`, 2.2.1.10.2
|
|
10
|
+
* `Percentuale`. */
|
|
11
|
+
export declare const BILL_LINE_PERCENT_FRACTION_DIGITS = 2;
|
|
12
|
+
/** Largest quantity the editor accepts (D15). It keeps every typed value
|
|
13
|
+
* where a double and its decimal text agree exactly. An invoiced quantity
|
|
14
|
+
* above it, or with more than 15 significant digits, is shown read-only
|
|
15
|
+
* with the kit's "too large to edit here" note and loads unchanged: it is
|
|
16
|
+
* never clamped. The handle and the agent refuse a larger value with
|
|
17
|
+
* `INVALID_QUANTITY`. */
|
|
18
|
+
export declare const BILL_LINE_MAX_QUANTITY = 10000000;
|
|
19
|
+
/** Longest new-item name: `DoctorInventoryItem.name` is a string of 255
|
|
20
|
+
* (`DoctorInventoryItem.orm.xml`). */
|
|
21
|
+
export declare const BILL_LINE_ITEM_NAME_MAX_LENGTH = 255;
|
|
22
|
+
/** Combobox value of the per-line "New item: …" option. Never a platform
|
|
23
|
+
* article id: `DoctorInventoryItem.id` is an integer
|
|
24
|
+
* (`DoctorInventoryItem.orm.xml`, `<id name="id" type="integer">`). */
|
|
25
|
+
export declare const BILL_LINE_NEW_ITEM_VALUE = "bill-line-table:new-item";
|
|
26
|
+
/** The kit's own warning code for a locked quantity (D15). */
|
|
27
|
+
export declare const BILL_LINE_QUANTITY_TOO_LARGE = "quantityTooLarge";
|
|
28
|
+
/** What a quantity text means to the table. */
|
|
29
|
+
export interface BillLineQuantityReading {
|
|
30
|
+
/** No text: the field is empty. */
|
|
31
|
+
empty: boolean;
|
|
32
|
+
/** Syntax and digits pass `FATTURAPA_VALUE.quantity`, the sign aside. */
|
|
33
|
+
wellFormed: boolean;
|
|
34
|
+
/** Above zero. */
|
|
35
|
+
positive: boolean;
|
|
36
|
+
/** The exact value when a safe integer holds its units, else `null`. */
|
|
37
|
+
value: ScaledDecimal | null;
|
|
38
|
+
/** The number NumberInput shows: exact both ways (at most 15 significant
|
|
39
|
+
* digits) and at most `BILL_LINE_MAX_QUANTITY` in size. `null` for an
|
|
40
|
+
* empty, malformed or out-of-range quantity. */
|
|
41
|
+
editorNumber: number | null;
|
|
42
|
+
}
|
|
43
|
+
export declare function readBillLineQuantity(text: DecimalString | null): BillLineQuantityReading;
|
|
44
|
+
/** Can the editor hold this quantity exactly (D15)? False above
|
|
45
|
+
* `BILL_LINE_MAX_QUANTITY` or beyond 15 significant digits: the line then
|
|
46
|
+
* shows its quantity read-only with the kit's `quantityTooLarge` note and
|
|
47
|
+
* loads it as invoiced. A malformed quantity stays editable, so the
|
|
48
|
+
* reviewer can type a correct one. */
|
|
49
|
+
export declare function isBillLineQuantityEditable(quantity: DecimalString): boolean;
|
|
50
|
+
/** A NumberInput value back to exact decimal text, at most 8 fraction
|
|
51
|
+
* digits, never padded and with no trailing zeros (`2.5` is `"2.5"`,
|
|
52
|
+
* `0.1 + 0.2` is `"0.3"`). `null` for NaN or Infinity. */
|
|
53
|
+
export declare function billLineQuantityFromNumber(value: number): DecimalString | null;
|
|
54
|
+
/** A signed amount (line total, unit price, adjustment, summary figure),
|
|
55
|
+
* up to 8 places. `null` when the text is malformed or its units pass a
|
|
56
|
+
* safe integer (about 90 million at 8 places): the platform flags such a
|
|
57
|
+
* line `valueOutOfRange`, and the kit counts it as invalid. */
|
|
58
|
+
export declare function readBillLineAmount(text: DecimalString): ScaledDecimal | null;
|
|
59
|
+
/** A rate (VAT or a discount percentage), unsigned, 2 places. */
|
|
60
|
+
export declare function readBillLineRate(text: DecimalString | null): ScaledDecimal | null;
|
|
61
|
+
/** Net unit cost (D14): `lineTotal` / quantity at 8 places, one rounding
|
|
62
|
+
* half away from zero, trailing zeros dropped (30.86 / 2.5 is
|
|
63
|
+
* `"12.344"`). `null` for an empty, zero or unreadable quantity. */
|
|
64
|
+
export declare function netUnitCost(lineTotal: DecimalString, quantity: DecimalString | null): DecimalString | null;
|
|
65
|
+
/** Do two signed amounts have the same size? A credit note may carry an
|
|
66
|
+
* unsigned `PrezzoUnitario` beside an inverted `PrezzoTotale`, so the
|
|
67
|
+
* "Net per unit" line compares sizes, not signs. */
|
|
68
|
+
export declare function sameBillLineMagnitude(a: DecimalString, b: DecimalString): boolean;
|
|
69
|
+
/** A new-item name as the platform stores it: trimmed, at most 255
|
|
70
|
+
* characters (code points, as MySQL counts them). */
|
|
71
|
+
export declare function normaliseBillLineItemName(name: string): string;
|
|
72
|
+
/** A choice as the table stores it: a new item with no name takes the line
|
|
73
|
+
* description (D5). */
|
|
74
|
+
export declare function normaliseBillLineItemChoice(choice: BillLineItemChoice, line: BillLine): BillLineItemChoice;
|
|
75
|
+
/** D15: a quantity a person set above `BILL_LINE_MAX_QUANTITY`. The
|
|
76
|
+
* invoiced quantity itself never counts: a locked line loads as invoiced. */
|
|
77
|
+
export declare function isBillLineQuantityTooLarge(line: BillLine, value: BillLineValue): boolean;
|
|
78
|
+
/** A new item with no name: the description was blank and nothing was
|
|
79
|
+
* typed. The platform cannot create an item without a name. */
|
|
80
|
+
export declare function isBillLineNewItemNameMissing(value: BillLineValue): boolean;
|
|
81
|
+
/** A new item that still carries the line description as its name (the
|
|
82
|
+
* prefill, D5). On a lab invoice that name can be a patient's (Q3), so
|
|
83
|
+
* privacy mode asks the reviewer to check it with privacy mode off. */
|
|
84
|
+
export declare function isBillLineNewItemNamedFromDescription(line: BillLine, value: BillLineValue): boolean;
|
|
85
|
+
/** True when any line is already loaded: the HTP-7311 one-load rule then
|
|
86
|
+
* locks the whole invoice (D8). */
|
|
87
|
+
export declare function isBillInvoiceLoaded(lines: readonly BillLine[]): boolean;
|
|
88
|
+
/** The value every line starts with: its invoiced quantity and the
|
|
89
|
+
* proposal's item, or a new item named after the description (see product
|
|
90
|
+
* question Q3 on lab lines that name a patient). */
|
|
91
|
+
export declare function getDefaultBillLineValue(line: BillLine): BillLineValue;
|
|
92
|
+
export declare function getDefaultBillLineValues(lines: readonly BillLine[]): Record<string, BillLineValue>;
|
|
93
|
+
/** Every line that can load and was not proposed as skip. None once the
|
|
94
|
+
* invoice is loaded. */
|
|
95
|
+
export declare function getDefaultBillLineSelection(lines: readonly BillLine[]): string[];
|
|
96
|
+
/** Every current line's value, missing entries as their default; entries
|
|
97
|
+
* for lines no longer in `lines` are dropped. */
|
|
98
|
+
export declare function resolveBillLineValues(lines: readonly BillLine[], values: BillLineValues): Record<string, BillLineValue>;
|
|
99
|
+
/** The ids that are ticked in effect: known, tickable lines only, unique,
|
|
100
|
+
* in invoice order. */
|
|
101
|
+
export declare function resolveBillLineSelection(lines: readonly BillLine[], selection: readonly string[]): string[];
|
|
102
|
+
/** Same value whatever the scale ("2.50" equals "2.5"). */
|
|
103
|
+
export declare function sameBillLineValue(a: BillLineValue, b: BillLineValue): boolean;
|
|
104
|
+
/** What Confirm will do with the line (D3): the badge cannot disagree with
|
|
105
|
+
* the checkbox. */
|
|
106
|
+
export declare function getBillLineMatchState(line: BillLine, value: BillLineValue, selected: boolean): BillLineMatchState;
|
|
107
|
+
/**
|
|
108
|
+
* Can this line load as it stands? Judged for ticked lines. Invalid when:
|
|
109
|
+
* - the quantity is empty, malformed, zero or negative (quantities are
|
|
110
|
+
* unsigned, so a negative one is a contract error);
|
|
111
|
+
* - a person set the quantity above `BILL_LINE_MAX_QUANTITY` (D15);
|
|
112
|
+
* - a new item has no name;
|
|
113
|
+
* - an `'error'` warning is on the line;
|
|
114
|
+
* - the line amount cannot be read exactly (`valueOutOfRange`);
|
|
115
|
+
* - `itemKnown` is false: the chosen existing item is no longer known
|
|
116
|
+
* (the table passes this; a host calling the helper may leave it out).
|
|
117
|
+
*/
|
|
118
|
+
export declare function isBillLineInvalid(line: BillLine, value: BillLineValue, itemKnown?: boolean): boolean;
|
|
119
|
+
/** Item lookup the table passes to the helpers; the default knows every
|
|
120
|
+
* item. */
|
|
121
|
+
export type BillLineItemLookup = (itemId: string) => boolean;
|
|
122
|
+
/** The ticks and values the table starts from, for `dirty`. */
|
|
123
|
+
export interface BillLineDefaults {
|
|
124
|
+
values: BillLineValues;
|
|
125
|
+
selection: readonly string[];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Totals and counts (see `BillLineSummary`). Net is the ticked lines'
|
|
129
|
+
* `PrezzoTotale` summed exactly and rounded once to cents; VAT is, per rate,
|
|
130
|
+
* the rate's net rounded to cents first (FatturaPA 2.2.2.5
|
|
131
|
+
* `ImponibileImporto` has two places), times the rate, rounded to cents,
|
|
132
|
+
* then added, the `DatiRiepilogo` shape; gross
|
|
133
|
+
* is net plus VAT (D7, design section 4.1). A quantity edit changes none of
|
|
134
|
+
* them.
|
|
135
|
+
*/
|
|
136
|
+
export declare function summariseBillLines(lines: readonly BillLine[], values: BillLineValues, selection: readonly string[], defaults: BillLineDefaults, isItemKnown?: BillLineItemLookup): BillLineSummary;
|
|
137
|
+
/**
|
|
138
|
+
* The HTP-7311 request body, or the ticked lines that block it. The only
|
|
139
|
+
* place the credit-note sign is applied (D6): a credit note's quantities go
|
|
140
|
+
* out negative. A loaded invoice gives no payload (D8).
|
|
141
|
+
*/
|
|
142
|
+
export declare function getBillLineLoadPayload(lines: readonly BillLine[], values: BillLineValues, selection: readonly string[], documentKind: BillDocumentKind, isItemKnown?: BillLineItemLookup): BillLineLoadResult;
|
|
143
|
+
export interface BillLineRowContext {
|
|
144
|
+
/** `isBillInvoiceLoaded(lines)`. */
|
|
145
|
+
invoiceLoaded: boolean;
|
|
146
|
+
/** Ticked ids in effect (`resolveBillLineSelection`). */
|
|
147
|
+
ticked: ReadonlySet<string>;
|
|
148
|
+
/** The item behind an id, when the table knows it. */
|
|
149
|
+
findItem: (itemId: string) => BillLineItemOption | undefined;
|
|
150
|
+
}
|
|
151
|
+
/** One line's view model. */
|
|
152
|
+
export declare function buildBillLineRow(line: BillLine, value: BillLineValue, context: BillLineRowContext): BillLineRow;
|
|
153
|
+
export interface BillLineRowsInput {
|
|
154
|
+
lines: readonly BillLine[];
|
|
155
|
+
values: BillLineValues;
|
|
156
|
+
selection: readonly string[];
|
|
157
|
+
findItem: (itemId: string) => BillLineItemOption | undefined;
|
|
158
|
+
/** The rows of the last build, by line id: an unchanged line keeps its
|
|
159
|
+
* object, so DataGrid re-renders only the lines that changed. */
|
|
160
|
+
previous?: ReadonlyMap<string, BillLineRow>;
|
|
161
|
+
}
|
|
162
|
+
/** Every line's view model, in invoice order, with structural sharing. */
|
|
163
|
+
export declare function buildBillLineRows(input: BillLineRowsInput): BillLineRow[];
|
|
164
|
+
/** The privacy-safe facts the handle and the agent read. */
|
|
165
|
+
export declare function toBillLineInfo(row: BillLineRow, options: {
|
|
166
|
+
tableReadOnly: boolean;
|
|
167
|
+
documentKind: BillDocumentKind;
|
|
168
|
+
}): BillLineInfo;
|
|
169
|
+
/** A quantity a handle or agent write may set: unsigned, above 0, at most 8
|
|
170
|
+
* fraction digits and at most `BILL_LINE_MAX_QUANTITY`. Returns the
|
|
171
|
+
* normalised text (`"02.50"` is `"2.5"`), or `null` to refuse it. */
|
|
172
|
+
export declare function normaliseBillLineQuantityInput(text: string): DecimalString | null;
|
|
173
|
+
//# sourceMappingURL=bill-line-table.model.d.ts.map
|