@alfadocs/ui-kit 0.46.0 → 0.48.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/{agenda-card-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
- package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
- package/dist/_chunks/ai-consent-banner-DO5ingMq.js +169 -0
- package/dist/_chunks/ai-tools-rail-CxYG04cw.js +280 -0
- package/dist/_chunks/alia-sidebar-DlvyXgVC.js +1126 -0
- package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
- package/dist/_chunks/{audio-recorder-C1rhKhSN.js → audio-recorder-DC-v9YFW.js} +81 -91
- package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
- package/dist/_chunks/{booking-DlDVuWMd.js → booking-WV2GSru5.js} +291 -303
- package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
- package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
- package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
- package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
- package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
- package/dist/_chunks/{chat-input-CQe7nR_v.js → chat-input-CFwc7JxL.js} +2 -1
- package/dist/_chunks/{chat-message-ASgGtj-L.js → chat-message-Dm8U2RY1.js} +81 -74
- package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
- package/dist/_chunks/code-block-HoddNOKJ.js +106 -0
- package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
- package/dist/_chunks/{cycle-calculator-KxA8dqDf.js → cycle-calculator-DYvGm_m1.js} +2 -2
- package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
- package/dist/_chunks/download-CDF1sbL9.js +16 -0
- package/dist/_chunks/{due-date-calculator-mFxpHLml.js → due-date-calculator-BXd3ANj7.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-BEBUQl9P.js → editable-currency-cell-renderer-CLil9B29.js} +283 -293
- package/dist/_chunks/entity-card-COhmqHly.js +69 -0
- package/dist/_chunks/{gestational-age-calculator-gWI_uRA1.js → gestational-age-calculator-Crj6FgZw.js} +2 -2
- package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
- package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
- package/dist/_chunks/languages-DsVf_WzT.js +19 -0
- package/dist/_chunks/layers-pzGcbLPj.js +34 -0
- package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
- package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
- package/dist/_chunks/mic-B4Gog3Gi.js +16 -0
- package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
- package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
- package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
- package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-G8SU6Azw.js} +3 -3
- package/dist/_chunks/pencil-CfQX-0Qc.js +21 -0
- package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
- package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
- package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-BFL_mcDW.js} +3 -2
- package/dist/_chunks/{pregnancy-weight-gain-BtEHaSqy.js → pregnancy-weight-gain-C7dK89jE.js} +2 -2
- package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
- package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
- package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-DPI2pY9V.js} +2 -2
- package/dist/_chunks/{streaming-text-GH07yIYh.js → streaming-text-CfhDqtIT.js} +49 -45
- package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
- package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
- package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
- package/dist/_chunks/video-BAeICxCT.js +21 -0
- package/dist/_chunks/{workflow-map-BFNpzTiw.js → workflow-map-ZXw-zsZ8.js} +186 -219
- package/dist/agent-catalog.json +324 -1
- package/dist/components/_shared/code-block.d.ts +39 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
- package/dist/components/_shared/entity-card/index.d.ts +3 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/is-safe-url.d.ts +13 -0
- package/dist/components/agenda-card/agenda-card.d.ts +1 -2
- package/dist/components/agenda-card/index.d.ts +2 -1
- package/dist/components/agenda-card/index.js +6 -5
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
- package/dist/components/ai-consent-banner/index.d.ts +4 -0
- package/dist/components/ai-consent-banner/index.js +6 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
- package/dist/components/ai-tools-rail/index.d.ts +4 -0
- package/dist/components/ai-tools-rail/index.js +6 -0
- package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
- package/dist/components/anamnesis-card/index.d.ts +3 -0
- package/dist/components/anamnesis-card/index.js +5 -0
- package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
- package/dist/components/appointment-card/appointment-card.d.ts +93 -0
- package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
- package/dist/components/appointment-card/index.d.ts +8 -0
- package/dist/components/appointment-card/index.js +10 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
- package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
- package/dist/components/care-plan-card/index.d.ts +4 -0
- package/dist/components/care-plan-card/index.js +6 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
- package/dist/components/care-plan-entry-card/index.d.ts +4 -0
- package/dist/components/care-plan-entry-card/index.js +6 -0
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/chat-message.d.ts +13 -0
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
- package/dist/components/clinical-note-card/index.d.ts +4 -0
- package/dist/components/clinical-note-card/index.js +6 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +7 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/message-card/index.js +5 -4
- package/dist/components/message-card/message-card.d.ts +1 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +9 -0
- package/dist/components/patient-summary-card/index.d.ts +4 -0
- package/dist/components/patient-summary-card/index.js +6 -0
- package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
- package/dist/components/payment-card/index.d.ts +7 -0
- package/dist/components/payment-card/index.js +8 -0
- package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-card.d.ts +71 -0
- package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-request-card.d.ts +43 -0
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.d.ts +4 -0
- package/dist/components/periodontal-chart-card/index.js +7 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +366 -0
- package/dist/i18n/locales/ar.js +367 -1
- package/dist/i18n/locales/de.d.ts +366 -0
- package/dist/i18n/locales/de.js +367 -1
- package/dist/i18n/locales/el.d.ts +366 -0
- package/dist/i18n/locales/el.js +367 -1
- package/dist/i18n/locales/en.d.ts +366 -0
- package/dist/i18n/locales/en.js +367 -1
- package/dist/i18n/locales/es.d.ts +366 -0
- package/dist/i18n/locales/es.js +367 -1
- package/dist/i18n/locales/fr.d.ts +366 -0
- package/dist/i18n/locales/fr.js +367 -1
- package/dist/i18n/locales/hi.d.ts +366 -0
- package/dist/i18n/locales/hi.js +367 -1
- package/dist/i18n/locales/it.d.ts +366 -0
- package/dist/i18n/locales/it.js +367 -1
- package/dist/i18n/locales/ja.d.ts +366 -0
- package/dist/i18n/locales/ja.js +367 -1
- package/dist/i18n/locales/nl.d.ts +366 -0
- package/dist/i18n/locales/nl.js +367 -1
- package/dist/i18n/locales/pl.d.ts +366 -0
- package/dist/i18n/locales/pl.js +367 -1
- package/dist/i18n/locales/pt.d.ts +366 -0
- package/dist/i18n/locales/pt.js +367 -1
- package/dist/i18n/locales/ro.d.ts +366 -0
- package/dist/i18n/locales/ro.js +367 -1
- package/dist/i18n/locales/ru.d.ts +366 -0
- package/dist/i18n/locales/ru.js +367 -1
- package/dist/i18n/locales/sq.d.ts +366 -0
- package/dist/i18n/locales/sq.js +367 -1
- package/dist/i18n/locales/sv.d.ts +366 -0
- package/dist/i18n/locales/sv.js +367 -1
- package/dist/i18n/locales/tr.d.ts +366 -0
- package/dist/i18n/locales/tr.js +367 -1
- package/dist/i18n/locales/zh.d.ts +366 -0
- package/dist/i18n/locales/zh.js +367 -1
- package/dist/index.js +527 -491
- package/dist/locales/ar.json +367 -1
- package/dist/locales/de.json +367 -1
- package/dist/locales/el.json +367 -1
- package/dist/locales/en.json +367 -1
- package/dist/locales/es.json +367 -1
- package/dist/locales/fr.json +367 -1
- package/dist/locales/hi.json +367 -1
- package/dist/locales/it.json +367 -1
- package/dist/locales/ja.json +367 -1
- package/dist/locales/nl.json +367 -1
- package/dist/locales/pl.json +367 -1
- package/dist/locales/pt.json +367 -1
- package/dist/locales/ro.json +367 -1
- package/dist/locales/ru.json +367 -1
- package/dist/locales/sq.json +367 -1
- package/dist/locales/sv.json +367 -1
- package/dist/locales/tr.json +367 -1
- package/dist/locales/zh.json +367 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +76 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +42 -1
- package/dist/_chunks/alia-sidebar-Be8FhKYd.js +0 -837
- package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
- package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as B, useId as G, useMemo as I } from "react";
|
|
3
|
+
import { c as H } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as K } from "react-i18next";
|
|
5
|
+
import { B as O } from "./badge-zsf5i5bH.js";
|
|
6
|
+
import { C as R } from "./card-DPmk26CL.js";
|
|
7
|
+
import { D as d } from "./description-list-BEbK2g93.js";
|
|
8
|
+
import { K as Y, a as j } from "./key-value-pair-CkQIb9EG.js";
|
|
9
|
+
import { T as W, A as te, a as re } from "./transaction-chip-BZCa6XDn.js";
|
|
10
|
+
import { u as J } from "./registry-nPAVE19X.js";
|
|
11
|
+
import { c as F } from "./createLucideIcon-CrFbzy84.js";
|
|
12
|
+
import { C as ne } from "./calendar-days-C4BmpCZg.js";
|
|
13
|
+
import { F as Q } from "./file-text-DSNuv2B8.js";
|
|
14
|
+
import { U as le } from "./user-CPxpqFjJ.js";
|
|
15
|
+
import { U as ie } from "./user-cog-BS_qc8nA.js";
|
|
16
|
+
import { e as X } from "./entity-card-COhmqHly.js";
|
|
17
|
+
import { L as de } from "./link-DrD_cRUg.js";
|
|
18
|
+
import { C as oe } from "./calendar-clock-CYkcqdwl.js";
|
|
19
|
+
import { i as se } from "./is-safe-url-DkETxeHz.js";
|
|
20
|
+
/**
|
|
21
|
+
* @license lucide-react v1.8.0 - ISC
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the ISC license.
|
|
24
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/
|
|
26
|
+
const ce = [
|
|
27
|
+
["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
|
|
28
|
+
["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
|
|
29
|
+
], M = F("credit-card", ce);
|
|
30
|
+
/**
|
|
31
|
+
* @license lucide-react v1.8.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
const ue = [
|
|
37
|
+
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
38
|
+
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
39
|
+
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
40
|
+
["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
|
|
41
|
+
], me = F("hash", ue);
|
|
42
|
+
/**
|
|
43
|
+
* @license lucide-react v1.8.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/
|
|
48
|
+
const pe = [
|
|
49
|
+
["path", { d: "M13 16H8", key: "wsln4y" }],
|
|
50
|
+
["path", { d: "M14 8H8", key: "1l3xfs" }],
|
|
51
|
+
["path", { d: "M16 12H8", key: "1fr5h0" }],
|
|
52
|
+
[
|
|
53
|
+
"path",
|
|
54
|
+
{
|
|
55
|
+
d: "M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",
|
|
56
|
+
key: "ycz6yz"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
], ye = F("receipt-text", pe), he = {
|
|
60
|
+
id: "payment-card",
|
|
61
|
+
capabilities: [],
|
|
62
|
+
state: {
|
|
63
|
+
number: {
|
|
64
|
+
type: "string",
|
|
65
|
+
descriptionKey: "ui.agent.paymentCard.state.number",
|
|
66
|
+
description: "Payment number / reference currently rendered.",
|
|
67
|
+
read: (a) => a.getNumber()
|
|
68
|
+
},
|
|
69
|
+
state: {
|
|
70
|
+
type: "'debt' | 'to-invoice' | 'settled'",
|
|
71
|
+
descriptionKey: "ui.agent.paymentCard.state.state",
|
|
72
|
+
description: "Resolved headline financial state. Structural state only — never patient identity.",
|
|
73
|
+
read: (a) => a.getState()
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
actions: {},
|
|
77
|
+
domHooks: {
|
|
78
|
+
root: {
|
|
79
|
+
attr: "data-component",
|
|
80
|
+
value: "payment-card",
|
|
81
|
+
description: "Marks the PaymentCard root region."
|
|
82
|
+
},
|
|
83
|
+
instanceId: {
|
|
84
|
+
attr: "data-component-id",
|
|
85
|
+
sourceProp: "id",
|
|
86
|
+
description: "Sourced from the id prop. Addresses a specific card."
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}, fe = {
|
|
90
|
+
full: "success",
|
|
91
|
+
partial: "warning",
|
|
92
|
+
credit: "info",
|
|
93
|
+
proforma: "neutral",
|
|
94
|
+
other: "neutral"
|
|
95
|
+
}, ve = "EUR", ge = {
|
|
96
|
+
full: "Full payment",
|
|
97
|
+
partial: "Partial payment",
|
|
98
|
+
credit: "Credit note",
|
|
99
|
+
proforma: "Proforma",
|
|
100
|
+
other: "Other"
|
|
101
|
+
}, be = {
|
|
102
|
+
incoming: "Incoming",
|
|
103
|
+
outgoing: "Outgoing"
|
|
104
|
+
}, xe = H("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
105
|
+
variants: {
|
|
106
|
+
surface: {
|
|
107
|
+
flat: "",
|
|
108
|
+
elevated: ""
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
defaultVariants: { surface: "elevated" }
|
|
112
|
+
});
|
|
113
|
+
function A(a, l, r) {
|
|
114
|
+
try {
|
|
115
|
+
return new Intl.NumberFormat(r, {
|
|
116
|
+
style: "currency",
|
|
117
|
+
currency: l
|
|
118
|
+
}).format(a / 100);
|
|
119
|
+
} catch {
|
|
120
|
+
return (a / 100).toFixed(2);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function Ce(a, l) {
|
|
124
|
+
const r = new Date(a);
|
|
125
|
+
if (Number.isNaN(r.getTime())) return a;
|
|
126
|
+
try {
|
|
127
|
+
return new Intl.DateTimeFormat(l, {
|
|
128
|
+
year: "numeric",
|
|
129
|
+
month: "short",
|
|
130
|
+
day: "numeric"
|
|
131
|
+
}).format(r);
|
|
132
|
+
} catch {
|
|
133
|
+
return a;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function Ne(a, l, r, p) {
|
|
137
|
+
return p ? "settled" : r != null && r > 0 ? "debt" : a === "proforma" && (l == null || l === 0) ? "to-invoice" : "settled";
|
|
138
|
+
}
|
|
139
|
+
const ke = B(
|
|
140
|
+
({
|
|
141
|
+
id: a,
|
|
142
|
+
number: l,
|
|
143
|
+
dateIso: r,
|
|
144
|
+
type: p,
|
|
145
|
+
direction: v,
|
|
146
|
+
grossCents: n,
|
|
147
|
+
paidCents: y,
|
|
148
|
+
unpaidCents: u,
|
|
149
|
+
writtenOff: D = !1,
|
|
150
|
+
relations: i,
|
|
151
|
+
lineItems: g,
|
|
152
|
+
locale: L,
|
|
153
|
+
currency: m = ve,
|
|
154
|
+
surface: N = "elevated",
|
|
155
|
+
"aria-label": q,
|
|
156
|
+
className: h,
|
|
157
|
+
...S
|
|
158
|
+
}, k) => {
|
|
159
|
+
const { t, i18n: P } = K(), w = G(), o = L ?? P.language ?? "en", _ = q ?? t("paymentCard.regionLabel", {
|
|
160
|
+
number: l,
|
|
161
|
+
defaultValue: "Payment {{number}}"
|
|
162
|
+
}), C = Ne(p, y, u, D), z = C === "debt" && u != null ? u : n ?? y ?? u ?? 0;
|
|
163
|
+
J(
|
|
164
|
+
he,
|
|
165
|
+
{
|
|
166
|
+
getNumber: () => l,
|
|
167
|
+
getState: () => C
|
|
168
|
+
},
|
|
169
|
+
a
|
|
170
|
+
);
|
|
171
|
+
const b = t(`paymentCard.type.${p}`, {
|
|
172
|
+
defaultValue: ge[p]
|
|
173
|
+
}), T = v === "incoming" ? /* @__PURE__ */ e(te, { "aria-hidden": "true" }) : /* @__PURE__ */ e(re, { "aria-hidden": "true" }), x = t(`paymentCard.direction.${v}`, {
|
|
174
|
+
defaultValue: be[v]
|
|
175
|
+
}), f = [];
|
|
176
|
+
f.push({
|
|
177
|
+
key: "number",
|
|
178
|
+
icon: /* @__PURE__ */ e(me, { "aria-hidden": "true" }),
|
|
179
|
+
label: t("paymentCard.label.number", "Number"),
|
|
180
|
+
value: l
|
|
181
|
+
}), r && f.push({
|
|
182
|
+
key: "date",
|
|
183
|
+
icon: /* @__PURE__ */ e(ne, { "aria-hidden": "true" }),
|
|
184
|
+
label: t("paymentCard.label.date", "Date"),
|
|
185
|
+
value: Ce(r, o)
|
|
186
|
+
}), f.push({
|
|
187
|
+
key: "type",
|
|
188
|
+
icon: /* @__PURE__ */ e(ye, { "aria-hidden": "true" }),
|
|
189
|
+
label: t("paymentCard.label.type", "Type"),
|
|
190
|
+
value: /* @__PURE__ */ e(O, { variant: fe[p], children: b })
|
|
191
|
+
}), f.push({
|
|
192
|
+
key: "direction",
|
|
193
|
+
icon: T,
|
|
194
|
+
label: t("paymentCard.label.direction", "Direction"),
|
|
195
|
+
value: x
|
|
196
|
+
}), i != null && i.carePlanNumber && f.push({
|
|
197
|
+
key: "carePlan",
|
|
198
|
+
icon: /* @__PURE__ */ e(Q, { "aria-hidden": "true" }),
|
|
199
|
+
label: t("paymentCard.label.carePlan", "Care plan"),
|
|
200
|
+
value: i.carePlanNumber
|
|
201
|
+
}), i != null && i.patientName && f.push({
|
|
202
|
+
key: "patient",
|
|
203
|
+
icon: /* @__PURE__ */ e(le, { "aria-hidden": "true" }),
|
|
204
|
+
label: t("paymentCard.label.patient", "Patient"),
|
|
205
|
+
value: i.patientName
|
|
206
|
+
}), i != null && i.operatorName && f.push({
|
|
207
|
+
key: "operator",
|
|
208
|
+
icon: /* @__PURE__ */ e(ie, { "aria-hidden": "true" }),
|
|
209
|
+
label: t("paymentCard.label.operator", "Operator"),
|
|
210
|
+
value: i.operatorName
|
|
211
|
+
});
|
|
212
|
+
const E = I(
|
|
213
|
+
() => n != null ? A(n, m, o) : void 0,
|
|
214
|
+
[n, m, o]
|
|
215
|
+
), U = I(
|
|
216
|
+
() => y != null ? A(y, m, o) : void 0,
|
|
217
|
+
[y, m, o]
|
|
218
|
+
), V = I(
|
|
219
|
+
() => u != null ? A(u, m, o) : void 0,
|
|
220
|
+
[u, m, o]
|
|
221
|
+
), Z = E != null || U != null || V != null, ee = !!g && g.length > 0, $ = /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
222
|
+
/* @__PURE__ */ c("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap", children: [
|
|
223
|
+
/* @__PURE__ */ e(
|
|
224
|
+
"h3",
|
|
225
|
+
{
|
|
226
|
+
id: w,
|
|
227
|
+
className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
|
|
228
|
+
children: t("paymentCard.heading", {
|
|
229
|
+
number: l,
|
|
230
|
+
defaultValue: "Payment {{number}}"
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
/* @__PURE__ */ e("span", { className: "ds:ms-auto ds:shrink-0", children: /* @__PURE__ */ e(
|
|
235
|
+
W,
|
|
236
|
+
{
|
|
237
|
+
state: C,
|
|
238
|
+
amount: z / 100,
|
|
239
|
+
currency: m,
|
|
240
|
+
locale: o,
|
|
241
|
+
size: "lg"
|
|
242
|
+
}
|
|
243
|
+
) })
|
|
244
|
+
] }),
|
|
245
|
+
/* @__PURE__ */ e(Y, { rowGap: "sm", children: f.map((s) => /* @__PURE__ */ e(
|
|
246
|
+
j,
|
|
247
|
+
{
|
|
248
|
+
icon: s.icon,
|
|
249
|
+
label: s.label,
|
|
250
|
+
value: s.value
|
|
251
|
+
},
|
|
252
|
+
s.key
|
|
253
|
+
)) }),
|
|
254
|
+
Z ? /* @__PURE__ */ c(d, { layout: "inline", density: "compact", labelWidth: "fixed", children: [
|
|
255
|
+
E != null ? /* @__PURE__ */ c(d.Row, { children: [
|
|
256
|
+
/* @__PURE__ */ e(d.Term, { children: t("paymentCard.label.gross", "Gross total") }),
|
|
257
|
+
/* @__PURE__ */ e(d.Detail, { numeric: !0, children: E })
|
|
258
|
+
] }) : null,
|
|
259
|
+
U != null ? /* @__PURE__ */ c(d.Row, { children: [
|
|
260
|
+
/* @__PURE__ */ e(d.Term, { children: t("paymentCard.label.paid", "Paid") }),
|
|
261
|
+
/* @__PURE__ */ e(d.Detail, { numeric: !0, children: U })
|
|
262
|
+
] }) : null,
|
|
263
|
+
V != null ? /* @__PURE__ */ c(d.Row, { children: [
|
|
264
|
+
/* @__PURE__ */ e(d.Term, { children: t("paymentCard.label.unpaid", "Outstanding") }),
|
|
265
|
+
/* @__PURE__ */ e(d.Detail, { numeric: !0, children: V })
|
|
266
|
+
] }) : null
|
|
267
|
+
] }) : null,
|
|
268
|
+
ee ? /* @__PURE__ */ c(
|
|
269
|
+
"section",
|
|
270
|
+
{
|
|
271
|
+
"aria-label": t("paymentCard.lineItems.heading", "Line items"),
|
|
272
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ e("h4", { className: "type-eyebrow ds:m-0 ds:text-[color:var(--muted-foreground)]", children: t("paymentCard.lineItems.heading", "Line items") }),
|
|
275
|
+
/* @__PURE__ */ e(
|
|
276
|
+
d,
|
|
277
|
+
{
|
|
278
|
+
layout: "inline",
|
|
279
|
+
density: "compact",
|
|
280
|
+
labelWidth: "auto",
|
|
281
|
+
children: g.map((s, ae) => /* @__PURE__ */ c(d.Row, { children: [
|
|
282
|
+
/* @__PURE__ */ e(d.Term, { children: s.vatPercentage != null ? t("paymentCard.lineItems.withVat", {
|
|
283
|
+
description: s.description,
|
|
284
|
+
vat: s.vatPercentage,
|
|
285
|
+
defaultValue: "{{description}} (VAT {{vat}}%)"
|
|
286
|
+
}) : s.description }),
|
|
287
|
+
/* @__PURE__ */ e(d.Detail, { numeric: !0, children: A(s.amountCents, m, o) })
|
|
288
|
+
] }, `${s.description}-${ae}`))
|
|
289
|
+
}
|
|
290
|
+
)
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
) : null
|
|
294
|
+
] });
|
|
295
|
+
return /* @__PURE__ */ e(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
ref: k,
|
|
299
|
+
role: "region",
|
|
300
|
+
"aria-label": _,
|
|
301
|
+
"aria-labelledby": w,
|
|
302
|
+
"data-component": "payment-card",
|
|
303
|
+
"data-component-id": a,
|
|
304
|
+
"data-state": C,
|
|
305
|
+
"data-type": p,
|
|
306
|
+
"data-direction": v,
|
|
307
|
+
id: a,
|
|
308
|
+
className: xe({ surface: N, className: h }),
|
|
309
|
+
...S,
|
|
310
|
+
children: N === "elevated" ? /* @__PURE__ */ e(R, { variant: "elevated", children: /* @__PURE__ */ e(R.Body, { children: $ }) }) : /* @__PURE__ */ e("div", { className: X({ surface: "flat" }), children: $ })
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
ke.displayName = "PaymentCard";
|
|
316
|
+
const Pe = {
|
|
317
|
+
id: "payment-request-card",
|
|
318
|
+
capabilities: [],
|
|
319
|
+
state: {
|
|
320
|
+
status: {
|
|
321
|
+
type: "'new' | 'authorization_requested' | 'authorized' | 'paid' | 'failed' | 'cancelled'",
|
|
322
|
+
descriptionKey: "ui.agent.paymentRequestCard.state.status",
|
|
323
|
+
description: "Current lifecycle status of the payment request. Structural state only.",
|
|
324
|
+
read: (a) => a.getStatus()
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
actions: {},
|
|
328
|
+
domHooks: {
|
|
329
|
+
root: {
|
|
330
|
+
attr: "data-component",
|
|
331
|
+
value: "payment-request-card",
|
|
332
|
+
description: "Marks the PaymentRequestCard root region."
|
|
333
|
+
},
|
|
334
|
+
instanceId: {
|
|
335
|
+
attr: "data-component-id",
|
|
336
|
+
sourceProp: "id",
|
|
337
|
+
description: "Sourced from the id prop. Addresses a specific request card."
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}, we = {
|
|
341
|
+
new: "info",
|
|
342
|
+
authorization_requested: "warning",
|
|
343
|
+
authorized: "info",
|
|
344
|
+
paid: "success",
|
|
345
|
+
failed: "error",
|
|
346
|
+
cancelled: "neutral"
|
|
347
|
+
}, Te = "EUR", Ae = {
|
|
348
|
+
new: "New",
|
|
349
|
+
authorization_requested: "Authorization requested",
|
|
350
|
+
authorized: "Authorized",
|
|
351
|
+
paid: "Paid",
|
|
352
|
+
failed: "Failed",
|
|
353
|
+
cancelled: "Cancelled"
|
|
354
|
+
}, Re = H("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
355
|
+
variants: {
|
|
356
|
+
surface: {
|
|
357
|
+
flat: "",
|
|
358
|
+
elevated: ""
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
defaultVariants: { surface: "elevated" }
|
|
362
|
+
});
|
|
363
|
+
function De(a, l) {
|
|
364
|
+
const r = new Date(a);
|
|
365
|
+
if (Number.isNaN(r.getTime())) return a;
|
|
366
|
+
try {
|
|
367
|
+
return new Intl.DateTimeFormat(l, {
|
|
368
|
+
year: "numeric",
|
|
369
|
+
month: "short",
|
|
370
|
+
day: "numeric"
|
|
371
|
+
}).format(r);
|
|
372
|
+
} catch {
|
|
373
|
+
return a;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
const Le = B(
|
|
377
|
+
({
|
|
378
|
+
id: a,
|
|
379
|
+
title: l,
|
|
380
|
+
description: r,
|
|
381
|
+
amountCents: p,
|
|
382
|
+
dueDateIso: v,
|
|
383
|
+
status: n,
|
|
384
|
+
paymentUrl: y,
|
|
385
|
+
carePlanNumber: u,
|
|
386
|
+
locale: D,
|
|
387
|
+
currency: i = Te,
|
|
388
|
+
surface: g = "elevated",
|
|
389
|
+
"aria-label": L,
|
|
390
|
+
className: m,
|
|
391
|
+
...N
|
|
392
|
+
}, q) => {
|
|
393
|
+
const { t: h, i18n: S } = K(), k = G(), t = D ?? S.language ?? "en", P = l ?? h("paymentRequestCard.heading", "Payment request"), w = L ?? P;
|
|
394
|
+
J(
|
|
395
|
+
Pe,
|
|
396
|
+
{ getStatus: () => n },
|
|
397
|
+
a
|
|
398
|
+
);
|
|
399
|
+
const o = h(`paymentRequestCard.status.${n}`, {
|
|
400
|
+
defaultValue: Ae[n]
|
|
401
|
+
}), _ = n === "paid" ? "settled" : n === "failed" || n === "cancelled" ? "debt" : "to-invoice", z = (n === "new" || n === "authorization_requested" || n === "authorized") && !!y && se(y), b = [];
|
|
402
|
+
b.push({
|
|
403
|
+
key: "status",
|
|
404
|
+
icon: /* @__PURE__ */ e(M, { "aria-hidden": "true" }),
|
|
405
|
+
label: h("paymentRequestCard.label.status", "Status"),
|
|
406
|
+
value: /* @__PURE__ */ e(O, { variant: we[n], children: o })
|
|
407
|
+
}), v && b.push({
|
|
408
|
+
key: "dueDate",
|
|
409
|
+
icon: /* @__PURE__ */ e(oe, { "aria-hidden": "true" }),
|
|
410
|
+
label: h("paymentRequestCard.label.dueDate", "Due date"),
|
|
411
|
+
value: De(v, t)
|
|
412
|
+
}), u && b.push({
|
|
413
|
+
key: "carePlan",
|
|
414
|
+
icon: /* @__PURE__ */ e(Q, { "aria-hidden": "true" }),
|
|
415
|
+
label: h("paymentRequestCard.label.carePlan", "Care plan"),
|
|
416
|
+
value: u
|
|
417
|
+
});
|
|
418
|
+
const T = /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
419
|
+
/* @__PURE__ */ c("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap", children: [
|
|
420
|
+
/* @__PURE__ */ c("div", { className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
421
|
+
/* @__PURE__ */ e(
|
|
422
|
+
"h3",
|
|
423
|
+
{
|
|
424
|
+
id: k,
|
|
425
|
+
className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
|
|
426
|
+
children: P
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
r ? /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: r }) : null
|
|
430
|
+
] }),
|
|
431
|
+
/* @__PURE__ */ e("span", { className: "ds:ms-auto ds:shrink-0", children: /* @__PURE__ */ e(
|
|
432
|
+
W,
|
|
433
|
+
{
|
|
434
|
+
state: _,
|
|
435
|
+
amount: p / 100,
|
|
436
|
+
currency: i,
|
|
437
|
+
locale: t,
|
|
438
|
+
size: "lg"
|
|
439
|
+
}
|
|
440
|
+
) })
|
|
441
|
+
] }),
|
|
442
|
+
/* @__PURE__ */ e(Y, { rowGap: "sm", children: b.map((x) => /* @__PURE__ */ e(
|
|
443
|
+
j,
|
|
444
|
+
{
|
|
445
|
+
icon: x.icon,
|
|
446
|
+
label: x.label,
|
|
447
|
+
value: x.value
|
|
448
|
+
},
|
|
449
|
+
x.key
|
|
450
|
+
)) }),
|
|
451
|
+
z ? /* @__PURE__ */ e("div", { className: "ds:flex", children: /* @__PURE__ */ e(de, { href: y, external: !0, startIcon: /* @__PURE__ */ e(M, {}), children: h("paymentRequestCard.pay", "Pay now") }) }) : null
|
|
452
|
+
] });
|
|
453
|
+
return /* @__PURE__ */ e(
|
|
454
|
+
"div",
|
|
455
|
+
{
|
|
456
|
+
ref: q,
|
|
457
|
+
role: "region",
|
|
458
|
+
"aria-label": w,
|
|
459
|
+
"aria-labelledby": k,
|
|
460
|
+
"data-component": "payment-request-card",
|
|
461
|
+
"data-component-id": a,
|
|
462
|
+
"data-status": n,
|
|
463
|
+
id: a,
|
|
464
|
+
className: Re({ surface: g, className: m }),
|
|
465
|
+
...N,
|
|
466
|
+
children: g === "elevated" ? /* @__PURE__ */ e(R, { variant: "elevated", children: /* @__PURE__ */ e(R.Body, { children: T }) }) : /* @__PURE__ */ e("div", { className: X({ surface: "flat" }), children: T })
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
);
|
|
471
|
+
Le.displayName = "PaymentRequestCard";
|
|
472
|
+
export {
|
|
473
|
+
ke as P,
|
|
474
|
+
Le as a,
|
|
475
|
+
Pe as b,
|
|
476
|
+
he as p
|
|
477
|
+
};
|
|
478
|
+
//# sourceMappingURL=payment-request-card-B_lyobd0.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as B } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as Ee, useId as _e, useMemo as xe, useState as b, useEffect as C, useRef as V, useCallback as K, useImperativeHandle as Le } from "react";
|
|
3
|
-
import * as fe from "pdfjs-dist";
|
|
3
|
+
import * as fe from "pdfjs-dist/legacy/build/pdf.min.mjs";
|
|
4
4
|
import { c as J } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as pe } from "react-i18next";
|
|
6
6
|
import * as ee from "@radix-ui/react-popover";
|
|
7
|
-
import Ce from "pdfjs-dist/build/pdf.worker.min.mjs?url";
|
|
7
|
+
import Ce from "pdfjs-dist/legacy/build/pdf.worker.min.mjs?url";
|
|
8
8
|
import { S as Ze } from "./spinner-OjQNn8oN.js";
|
|
9
9
|
import { A as we } from "./alert-ywPR59NE.js";
|
|
10
10
|
import { u as Ke } from "./registry-nPAVE19X.js";
|
|
@@ -957,4 +957,4 @@ export {
|
|
|
957
957
|
at as P,
|
|
958
958
|
Ge as p
|
|
959
959
|
};
|
|
960
|
-
//# sourceMappingURL=pdf-viewer-
|
|
960
|
+
//# sourceMappingURL=pdf-viewer-G8SU6Azw.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { c as a } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const c = [
|
|
9
|
+
[
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
13
|
+
key: "1a8usu"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
17
|
+
], o = a("pencil", c);
|
|
18
|
+
export {
|
|
19
|
+
o as P
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=pencil-CfQX-0Qc.js.map
|