@alfadocs/ui-kit 1.12.6 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/actions-cell-renderer-yy03OgRL.js +137 -0
- package/dist/_chunks/{address-fields-CZP4Wncx.js → address-fields-CZ0pEdEI.js} +4 -4
- package/dist/_chunks/{ai-prompt-input-DnbfEJnr.js → ai-prompt-input-CrHr-5H8.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BfhxWPO3.js → anamnesis-summary-rows-CRWO8x8g.js} +4 -4
- package/dist/_chunks/{audio-recorder-EWBCNIsd.js → audio-recorder-DXG6LTtO.js} +2 -2
- package/dist/_chunks/{autocomplete-BrONKN8l.js → autocomplete-MpBhz-fG.js} +86 -74
- package/dist/_chunks/{balance-badge-cell-7L6nzB29.js → balance-badge-cell-CgkxYO96.js} +9 -8
- package/dist/_chunks/{bishop-score-Cnu0xs-z.js → bishop-score-CJUVBfAu.js} +2 -2
- package/dist/_chunks/{booking-CBHKdsZl.js → booking-DQbo6mQF.js} +609 -591
- package/dist/_chunks/{calendar-B4Gnyu1C.js → calendar-CHT9Rm3M.js} +2 -2
- package/dist/_chunks/{calendar-event-card-Bjdbik8G.js → calendar-event-card-BjdHZaqz.js} +18 -14
- package/dist/_chunks/calendar-plus-BFrIRE4r.js +19 -0
- package/dist/_chunks/calendar-workspace-DI49_t6t.js +7429 -0
- package/dist/_chunks/{care-plan-card-aDN4oem9.js → care-plan-card-D-FMfDKH.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-BEhANdBE.js → care-plan-entry-card-Bvw_9T-d.js} +2 -2
- package/dist/_chunks/{care-plan-header-CkpPyQqG.js → care-plan-header-B5CBE0zu.js} +2 -2
- package/dist/_chunks/{city-input-towzBenY.js → city-input-DaQc-Hbj.js} +2 -2
- package/dist/_chunks/clipboard-list-rSzfIYZB.js +25 -0
- package/dist/_chunks/{color-picker-oZ6zYks8.js → color-picker-CU303VjY.js} +4 -2
- package/dist/_chunks/{combobox-DiMLItyu.js → combobox-D7_NLE2Z.js} +89 -81
- package/dist/_chunks/{contact-profile-card-BMIBr5s9.js → contact-profile-card-BZqi8Hck.js} +38 -36
- package/dist/_chunks/{country-select-UEF9BEeQ.js → country-select-DzbPFktV.js} +2 -2
- package/dist/_chunks/data-table-DC5rO3Ty.js +1817 -0
- package/dist/_chunks/{document-preview-oyx9RhCo.js → document-preview-CDb-n_W7.js} +2 -2
- package/dist/_chunks/{face-scheme-CZaKm6fG.js → face-scheme-DA2vjqaM.js} +2 -2
- package/dist/_chunks/{field-value-DG8zaZvo.js → field-value-D-vkX9uL.js} +120 -140
- package/dist/_chunks/{file-manager-C0y7HBAN.js → file-manager-DJMeB3V8.js} +138 -153
- package/dist/_chunks/folder-plus-CutOs4DP.js +22 -0
- package/dist/_chunks/{gestational-age-calculator-CxZelpu2.js → gestational-age-calculator-CiOQjzgx.js} +2 -2
- package/dist/_chunks/hourglass-BEAzW1wE.js +26 -0
- package/dist/_chunks/key-value-pair-BIBdZBLg.js +188 -0
- package/dist/_chunks/{link-cell-renderer-CenJx-_7.js → link-cell-renderer-CIASXsVM.js} +4 -4
- package/dist/_chunks/{multi-select-DqL4o0qV.js → multi-select-DYOvx2SJ.js} +56 -48
- package/dist/_chunks/{muscle-scheme-yfzP_xoJ.js → muscle-scheme-BSJsI4-I.js} +2 -2
- package/dist/_chunks/{notes-panel-CymneXtl.js → notes-panel-DYAtlq_i.js} +2 -2
- package/dist/_chunks/{optical-prescription-Dj3Eh5Ok.js → optical-prescription-BvwuqTpl.js} +2 -2
- package/dist/_chunks/{patient-details-xrqe13az.js → patient-details-BfzvFnxQ.js} +75 -94
- package/dist/_chunks/{patient-search-D5ufYoRc.js → patient-search-HeEUB-_X.js} +2 -2
- package/dist/_chunks/{patient-summary-card-CBfuDvJ5.js → patient-summary-card-D5Vfa321.js} +3 -3
- package/dist/_chunks/{payment-request-card-YVCcCZ25.js → payment-request-card-lmKLwsDs.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BatZEFar.js → periodontal-chart-B9fphroR.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-BBpY_rBc.js → periodontal-chart-card-qEZPXj83.js} +2 -2
- package/dist/_chunks/{practice-results-D7ygCj_W.js → practice-results-DL_ExLYE.js} +159 -172
- package/dist/_chunks/{pregnancy-dating-DtToyMyc.js → pregnancy-dating-D2wchD11.js} +2 -2
- package/dist/_chunks/{province-select-BDywtmL-.js → province-select-BBc7s7vR.js} +2 -2
- package/dist/_chunks/{rich-text-editor-BDfFtK4H.js → rich-text-editor-DtbcA6s1.js} +2 -2
- package/dist/_chunks/{select-BW5ecXlX.js → select-Bi8zril7.js} +165 -136
- package/dist/_chunks/signature-CpFNpsVK.js +21 -0
- package/dist/_chunks/{signature-field-0rFODJlW.js → signature-field-CEiPe-vX.js} +19 -34
- package/dist/_chunks/{signature-request-DVDTKLjM.js → signature-request-CUe903hj.js} +2 -2
- package/dist/_chunks/smartphone-C0rFF2if.js +15 -0
- package/dist/_chunks/{tabs-CBb2AidH.js → tabs-DqKtTIjZ.js} +2 -2
- package/dist/_chunks/{tasks-panel-Do5SFp-j.js → tasks-panel-DPCNaRko.js} +2 -2
- package/dist/_chunks/{toast.agent-D1tdg6DS.js → toast-YZz2sBzB.js} +160 -212
- package/dist/_chunks/toast.agent-DNQ0JYGv.js +56 -0
- package/dist/_chunks/{tooth-scheme-WdyVymQ1.js → tooth-scheme-2IsmbE6w.js} +2 -2
- package/dist/_chunks/{unit-converter-BPumXMA6.js → unit-converter-C6jMjqL9.js} +2 -2
- package/dist/_chunks/{workflow-map-DE_ribRM.js → workflow-map-dNzJjBWG.js} +104 -113
- package/dist/agent-catalog.json +867 -1
- package/dist/agent-i18n/en.json +27 -0
- package/dist/components/_shared/option.d.ts +1 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/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/care-plan-header/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/color-picker/index.js +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/data-table/index.js +39 -38
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts +16 -0
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- 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/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-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/province-select/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +24 -0
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/toast/index.js +7 -6
- package/dist/components/tooth-scheme/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 +680 -0
- package/dist/i18n/locales/ar.js +680 -0
- package/dist/i18n/locales/de.d.ts +680 -0
- package/dist/i18n/locales/de.js +680 -0
- package/dist/i18n/locales/el.d.ts +680 -0
- package/dist/i18n/locales/el.js +680 -0
- package/dist/i18n/locales/en.d.ts +680 -0
- package/dist/i18n/locales/en.js +680 -0
- package/dist/i18n/locales/es.d.ts +680 -0
- package/dist/i18n/locales/es.js +680 -0
- package/dist/i18n/locales/fr.d.ts +680 -0
- package/dist/i18n/locales/fr.js +680 -0
- package/dist/i18n/locales/hi.d.ts +680 -0
- package/dist/i18n/locales/hi.js +680 -0
- package/dist/i18n/locales/it.d.ts +680 -0
- package/dist/i18n/locales/it.js +680 -0
- package/dist/i18n/locales/ja.d.ts +680 -0
- package/dist/i18n/locales/ja.js +680 -0
- package/dist/i18n/locales/nl.d.ts +680 -0
- package/dist/i18n/locales/nl.js +680 -0
- package/dist/i18n/locales/pl.d.ts +680 -0
- package/dist/i18n/locales/pl.js +680 -0
- package/dist/i18n/locales/pt.d.ts +680 -0
- package/dist/i18n/locales/pt.js +680 -0
- package/dist/i18n/locales/ro.d.ts +680 -0
- package/dist/i18n/locales/ro.js +680 -0
- package/dist/i18n/locales/ru.d.ts +680 -0
- package/dist/i18n/locales/ru.js +680 -0
- package/dist/i18n/locales/sq.d.ts +680 -0
- package/dist/i18n/locales/sq.js +680 -0
- package/dist/i18n/locales/sv.d.ts +680 -0
- package/dist/i18n/locales/sv.js +680 -0
- package/dist/i18n/locales/tr.d.ts +680 -0
- package/dist/i18n/locales/tr.js +680 -0
- package/dist/i18n/locales/zh.d.ts +680 -0
- package/dist/i18n/locales/zh.js +680 -0
- package/dist/index.js +830 -812
- package/dist/locales/ar.json +680 -0
- package/dist/locales/de.json +680 -0
- package/dist/locales/el.json +680 -0
- package/dist/locales/en.json +680 -0
- package/dist/locales/es.json +680 -0
- package/dist/locales/fr.json +680 -0
- package/dist/locales/hi.json +680 -0
- package/dist/locales/it.json +680 -0
- package/dist/locales/ja.json +680 -0
- package/dist/locales/nl.json +680 -0
- package/dist/locales/pl.json +680 -0
- package/dist/locales/pt.json +680 -0
- package/dist/locales/ro.json +680 -0
- package/dist/locales/ru.json +680 -0
- package/dist/locales/sq.json +680 -0
- package/dist/locales/sv.json +680 -0
- package/dist/locales/tr.json +680 -0
- package/dist/locales/zh.json +680 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +62 -0
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +358 -0
- package/dist/patterns/calendar/calendar.data.d.ts +122 -0
- package/dist/patterns/calendar/calendar.host.d.ts +10 -0
- package/dist/patterns/calendar/calendar.journey.d.ts +119 -0
- package/dist/patterns/calendar/calendar.model.d.ts +684 -0
- package/dist/patterns/calendar/calendar.preferences.d.ts +74 -0
- package/dist/patterns/calendar/calendar.sheets.d.ts +398 -0
- package/dist/patterns/calendar/calendar.surface.d.ts +77 -0
- package/dist/patterns/calendar/calendar.types.d.ts +413 -0
- package/dist/patterns/calendar/index.d.ts +13 -0
- package/dist/patterns/calendar/index.js +19 -0
- package/dist/patterns/signature-request/index.js +1 -1
- package/package.json +5 -1
- package/dist/_chunks/actions-cell-renderer-DnSLrgQD.js +0 -1945
- package/dist/_chunks/key-value-pair-BubG4fUa.js +0 -144
|
@@ -7,7 +7,7 @@ import { C as B } from "./card-DPmk26CL.js";
|
|
|
7
7
|
import { E as G } from "./empty-state-X0sVPfVo.js";
|
|
8
8
|
import { P as Y } from "./panel-header-D313n_9-.js";
|
|
9
9
|
import { P as J } from "./pdf-viewer-DUIsV9s5.js";
|
|
10
|
-
import { T as O, b as Q, c as X, a as Z } from "./tabs-
|
|
10
|
+
import { T as O, b as Q, c as X, a as Z } from "./tabs-DqKtTIjZ.js";
|
|
11
11
|
import { u as ee } from "./registry-DvAUVLHh.js";
|
|
12
12
|
import { F as ie, a as te } from "./file-Cwe9VC1A.js";
|
|
13
13
|
import { F as se } from "./file-text-5yv6r2ls.js";
|
|
@@ -287,4 +287,4 @@ export {
|
|
|
287
287
|
ue as D,
|
|
288
288
|
de as d
|
|
289
289
|
};
|
|
290
|
-
//# sourceMappingURL=document-preview-
|
|
290
|
+
//# sourceMappingURL=document-preview-CDb-n_W7.js.map
|
|
@@ -8,7 +8,7 @@ import { m as tt, M as Ji, A as Qi } from "./annotation-marker-CsUJGZjQ.js";
|
|
|
8
8
|
import { B as P } from "./button-nJaPh_HC.js";
|
|
9
9
|
import { I as Ze } from "./icon-button-DA2CAGHZ.js";
|
|
10
10
|
import { B as es } from "./button-group-CaxRJsNG.js";
|
|
11
|
-
import { C as ts } from "./combobox-
|
|
11
|
+
import { C as ts } from "./combobox-D7_NLE2Z.js";
|
|
12
12
|
import { I as vn } from "./icon-button-group-VCCod3Hz.js";
|
|
13
13
|
import { T as Ar } from "./text-input-CUvCb6ST.js";
|
|
14
14
|
import { C as Oe } from "./card-DPmk26CL.js";
|
|
@@ -3137,4 +3137,4 @@ export {
|
|
|
3137
3137
|
Nn as t,
|
|
3138
3138
|
Kr as u
|
|
3139
3139
|
};
|
|
3140
|
-
//# sourceMappingURL=face-scheme-
|
|
3140
|
+
//# sourceMappingURL=face-scheme-DA2vjqaM.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useMemo as O, useCallback as
|
|
1
|
+
import { useMemo as O, useCallback as S, useState as _, cloneElement as X } from "react";
|
|
2
2
|
import { u as J } from "./use-controllable-state-BiY4xTzM.js";
|
|
3
3
|
import { jsxs as I, jsx as r, Fragment as Q } from "react/jsx-runtime";
|
|
4
4
|
import { useTranslation as P } from "react-i18next";
|
|
5
5
|
import { B as W } from "./button-nJaPh_HC.js";
|
|
6
|
-
import { I as
|
|
7
|
-
import { C as
|
|
8
|
-
import { P as
|
|
6
|
+
import { I as U } from "./icon-button-DA2CAGHZ.js";
|
|
7
|
+
import { C as j } from "./checkbox-BuZ1u__2.js";
|
|
8
|
+
import { P as M } from "./popover-Cqcjx-Ny.js";
|
|
9
9
|
import { S as Y } from "./separator-CYU_bGFn.js";
|
|
10
10
|
import { S as Z } from "./settings-d25ju_6L.js";
|
|
11
11
|
import { G as ee } from "./grip-vertical-onSb1JXO.js";
|
|
@@ -13,154 +13,134 @@ import { B as H } from "./badge-sTusUqZD.js";
|
|
|
13
13
|
import { L as te } from "./link-CPb_pZPr.js";
|
|
14
14
|
import { T as ne } from "./transaction-chip-DJCstquX.js";
|
|
15
15
|
import { H as re } from "./hash-CSQ9SChR.js";
|
|
16
|
-
import { C as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { C as se } from "./calendar-days-BGWklvE-.js";
|
|
17
|
+
import { H as ae } from "./hourglass-BEAzW1wE.js";
|
|
18
|
+
import { c as $ } from "./createLucideIcon-DhHxpK9K.js";
|
|
19
|
+
import { U as ie } from "./user-B12p7bVF.js";
|
|
19
20
|
/**
|
|
20
21
|
* @license lucide-react v1.22.0 - ISC
|
|
21
22
|
*
|
|
22
23
|
* This source code is licensed under the ISC license.
|
|
23
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
25
|
*/
|
|
25
|
-
const
|
|
26
|
-
["path", { d: "M5 22h14", key: "ehvnwv" }],
|
|
27
|
-
["path", { d: "M5 2h14", key: "pdyrp9" }],
|
|
28
|
-
[
|
|
29
|
-
"path",
|
|
30
|
-
{
|
|
31
|
-
d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",
|
|
32
|
-
key: "1d314k"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
[
|
|
36
|
-
"path",
|
|
37
|
-
{ d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2", key: "1vvvr6" }
|
|
38
|
-
]
|
|
39
|
-
], oe = U("hourglass", ie);
|
|
40
|
-
/**
|
|
41
|
-
* @license lucide-react v1.22.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/
|
|
46
|
-
const le = [
|
|
26
|
+
const oe = [
|
|
47
27
|
["path", { d: "M16 3h5v5", key: "1806ms" }],
|
|
48
28
|
["path", { d: "m21 3-6.75 6.75", key: "pv0uzu" }],
|
|
49
29
|
["circle", { cx: "10", cy: "14", r: "6", key: "1qwbdc" }]
|
|
50
|
-
],
|
|
30
|
+
], le = $("mars", oe);
|
|
51
31
|
/**
|
|
52
32
|
* @license lucide-react v1.22.0 - ISC
|
|
53
33
|
*
|
|
54
34
|
* This source code is licensed under the ISC license.
|
|
55
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
36
|
*/
|
|
57
|
-
const
|
|
37
|
+
const ce = [
|
|
58
38
|
["path", { d: "M12 15v7", key: "t2xh3l" }],
|
|
59
39
|
["path", { d: "M9 19h6", key: "456am0" }],
|
|
60
40
|
["circle", { cx: "12", cy: "9", r: "6", key: "1nw4tq" }]
|
|
61
|
-
],
|
|
41
|
+
], de = $("venus", ce);
|
|
62
42
|
function G(e) {
|
|
63
43
|
return e.flatMap((d) => d.fields.map((t) => t.id));
|
|
64
44
|
}
|
|
65
45
|
function ze(e, d) {
|
|
66
|
-
const t = d ?? G(e), m = new Map(t.map((
|
|
67
|
-
return e.map((
|
|
68
|
-
section:
|
|
69
|
-
fields:
|
|
70
|
-
(
|
|
46
|
+
const t = d ?? G(e), m = new Map(t.map((a, x) => [a, x]));
|
|
47
|
+
return e.map((a) => ({
|
|
48
|
+
section: a,
|
|
49
|
+
fields: a.fields.filter((x) => m.has(x.id)).sort(
|
|
50
|
+
(x, w) => m.get(x.id) - m.get(w.id)
|
|
71
51
|
)
|
|
72
52
|
}));
|
|
73
53
|
}
|
|
74
54
|
function Pe(e, { value: d, defaultValue: t, onChange: m } = {}) {
|
|
75
|
-
const
|
|
55
|
+
const a = O(
|
|
76
56
|
() => G(e),
|
|
77
57
|
[e]
|
|
78
|
-
), [
|
|
58
|
+
), [x, w] = J({
|
|
79
59
|
value: d,
|
|
80
|
-
defaultValue: t ??
|
|
60
|
+
defaultValue: t ?? a,
|
|
81
61
|
onChange: m
|
|
82
|
-
}), i =
|
|
83
|
-
const
|
|
84
|
-
for (const
|
|
85
|
-
for (const g of
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
}, [e]), u =
|
|
89
|
-
(
|
|
90
|
-
|
|
62
|
+
}), i = x ?? t ?? a, y = O(() => {
|
|
63
|
+
const f = /* @__PURE__ */ new Map();
|
|
64
|
+
for (const p of e)
|
|
65
|
+
for (const g of p.fields)
|
|
66
|
+
f.set(g.id, { field: g, sectionId: p.id });
|
|
67
|
+
return f;
|
|
68
|
+
}, [e]), u = S(
|
|
69
|
+
(f) => {
|
|
70
|
+
w(f.filter((p) => y.has(p)));
|
|
91
71
|
},
|
|
92
|
-
[
|
|
93
|
-
),
|
|
94
|
-
(
|
|
72
|
+
[w, y]
|
|
73
|
+
), T = S(
|
|
74
|
+
(f) => {
|
|
95
75
|
u(
|
|
96
|
-
i.includes(
|
|
76
|
+
i.includes(f) ? i.filter((p) => p !== f) : [...i, f]
|
|
97
77
|
);
|
|
98
78
|
},
|
|
99
79
|
[i, u]
|
|
100
|
-
),
|
|
101
|
-
(
|
|
102
|
-
var
|
|
103
|
-
const g = ((
|
|
104
|
-
if (
|
|
80
|
+
), B = S(
|
|
81
|
+
(f, p) => {
|
|
82
|
+
var D;
|
|
83
|
+
const g = ((D = e.find((o) => o.id === f)) == null ? void 0 : D.fields.map((o) => o.id)) ?? [], C = new Set(g);
|
|
84
|
+
if (p) {
|
|
105
85
|
const o = g.filter((l) => !i.includes(l));
|
|
106
86
|
u([...i, ...o]);
|
|
107
87
|
} else
|
|
108
|
-
u(i.filter((o) => !
|
|
88
|
+
u(i.filter((o) => !C.has(o)));
|
|
109
89
|
},
|
|
110
90
|
[e, i, u]
|
|
111
|
-
), N =
|
|
112
|
-
(
|
|
113
|
-
var A, n,
|
|
114
|
-
if (
|
|
115
|
-
const g = (A =
|
|
116
|
-
if (!g || g !==
|
|
117
|
-
const
|
|
118
|
-
((
|
|
119
|
-
), o = i.filter((c) =>
|
|
91
|
+
), N = S(
|
|
92
|
+
(f, p) => {
|
|
93
|
+
var A, n, V;
|
|
94
|
+
if (f === p) return;
|
|
95
|
+
const g = (A = y.get(f)) == null ? void 0 : A.sectionId, C = (n = y.get(p)) == null ? void 0 : n.sectionId;
|
|
96
|
+
if (!g || g !== C) return;
|
|
97
|
+
const D = new Set(
|
|
98
|
+
((V = e.find((c) => c.id === g)) == null ? void 0 : V.fields.map((c) => c.id)) ?? []
|
|
99
|
+
), o = i.filter((c) => D.has(c)), l = o.indexOf(f), v = o.indexOf(p);
|
|
120
100
|
if (l < 0 || v < 0) return;
|
|
121
101
|
const [b] = o.splice(l, 1);
|
|
122
102
|
o.splice(v, 0, b);
|
|
123
103
|
let h = 0;
|
|
124
|
-
const
|
|
125
|
-
(c) =>
|
|
104
|
+
const L = i.map(
|
|
105
|
+
(c) => D.has(c) ? o[h++] : c
|
|
126
106
|
);
|
|
127
|
-
u(
|
|
107
|
+
u(L);
|
|
128
108
|
},
|
|
129
|
-
[
|
|
130
|
-
),
|
|
131
|
-
u(t ??
|
|
132
|
-
}, [t,
|
|
109
|
+
[y, e, i, u]
|
|
110
|
+
), E = S(() => {
|
|
111
|
+
u(t ?? a);
|
|
112
|
+
}, [t, a, u]);
|
|
133
113
|
return {
|
|
134
114
|
visible: i,
|
|
135
|
-
catalogueIds:
|
|
136
|
-
fieldById:
|
|
115
|
+
catalogueIds: a,
|
|
116
|
+
fieldById: y,
|
|
137
117
|
setOrder: u,
|
|
138
|
-
toggleField:
|
|
139
|
-
toggleSection:
|
|
118
|
+
toggleField: T,
|
|
119
|
+
toggleSection: B,
|
|
140
120
|
moveFieldOnto: N,
|
|
141
|
-
reset:
|
|
121
|
+
reset: E
|
|
142
122
|
};
|
|
143
123
|
}
|
|
144
|
-
function
|
|
124
|
+
function Be({
|
|
145
125
|
sections: e,
|
|
146
126
|
visible: d,
|
|
147
127
|
onToggleField: t,
|
|
148
128
|
onToggleSection: m,
|
|
149
|
-
onMoveFieldOnto:
|
|
150
|
-
onReset:
|
|
151
|
-
label:
|
|
129
|
+
onMoveFieldOnto: a,
|
|
130
|
+
onReset: x,
|
|
131
|
+
label: w
|
|
152
132
|
}) {
|
|
153
|
-
const { t: i } = P(),
|
|
133
|
+
const { t: i } = P(), y = O(() => new Set(d), [d]), [u, T] = _(null), [B, N] = _(null), [E, f] = _(""), { sectionOfField: p, labelOfField: g } = O(() => {
|
|
154
134
|
const l = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
155
135
|
for (const b of e)
|
|
156
136
|
for (const h of b.fields)
|
|
157
137
|
l.set(h.id, b.id), v.set(h.id, h.label);
|
|
158
138
|
return { sectionOfField: l, labelOfField: v };
|
|
159
|
-
}, [e]),
|
|
160
|
-
|
|
161
|
-
}, []), o =
|
|
139
|
+
}, [e]), C = u ? p.get(u) : void 0, D = S(() => {
|
|
140
|
+
T(null), N(null);
|
|
141
|
+
}, []), o = S(
|
|
162
142
|
(l, v, b) => {
|
|
163
|
-
|
|
143
|
+
f(
|
|
164
144
|
i("fieldPicker.moved", {
|
|
165
145
|
field: g.get(l) ?? "",
|
|
166
146
|
position: v + 1,
|
|
@@ -171,37 +151,37 @@ function Le({
|
|
|
171
151
|
},
|
|
172
152
|
[i, g]
|
|
173
153
|
);
|
|
174
|
-
return /* @__PURE__ */ I(
|
|
175
|
-
/* @__PURE__ */ r(
|
|
176
|
-
|
|
154
|
+
return /* @__PURE__ */ I(M.Root, { children: [
|
|
155
|
+
/* @__PURE__ */ r(M.Trigger, { asChild: !0, children: /* @__PURE__ */ r(
|
|
156
|
+
U,
|
|
177
157
|
{
|
|
178
158
|
size: "sm",
|
|
179
159
|
intent: "outline",
|
|
180
160
|
icon: /* @__PURE__ */ r(Z, { "aria-hidden": "true" }),
|
|
181
|
-
"aria-label":
|
|
161
|
+
"aria-label": w ?? i("fieldPicker.trigger", { defaultValue: "Customize fields" }),
|
|
182
162
|
className: "ds:shrink-0"
|
|
183
163
|
}
|
|
184
164
|
) }),
|
|
185
|
-
/* @__PURE__ */ I(
|
|
186
|
-
/* @__PURE__ */ r(
|
|
165
|
+
/* @__PURE__ */ I(M.Content, { align: "end", size: "sm", children: [
|
|
166
|
+
/* @__PURE__ */ r(M.Heading, { children: i("fieldPicker.title", { defaultValue: "Customize fields" }) }),
|
|
187
167
|
/* @__PURE__ */ I("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:mt-[var(--spacing-xs)]", children: [
|
|
188
168
|
e.map((l) => {
|
|
189
169
|
const v = l.fields.map((n) => n.id), b = v.filter(
|
|
190
|
-
(n) =>
|
|
170
|
+
(n) => y.has(n)
|
|
191
171
|
).length, h = d.filter(
|
|
192
172
|
(n) => v.includes(n)
|
|
193
|
-
),
|
|
173
|
+
), L = b === 0 ? !1 : b === v.length ? !0 : "indeterminate", A = !!l.heading;
|
|
194
174
|
return /* @__PURE__ */ I(
|
|
195
175
|
"div",
|
|
196
176
|
{
|
|
197
177
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
198
178
|
children: [
|
|
199
179
|
A ? /* @__PURE__ */ r(
|
|
200
|
-
|
|
180
|
+
j,
|
|
201
181
|
{
|
|
202
182
|
size: "sm",
|
|
203
183
|
label: l.heading,
|
|
204
|
-
checked:
|
|
184
|
+
checked: L,
|
|
205
185
|
onCheckedChange: (n) => m(l.id, n === !0)
|
|
206
186
|
}
|
|
207
187
|
) : null,
|
|
@@ -213,27 +193,27 @@ function Le({
|
|
|
213
193
|
A ? "ds:ps-[var(--spacing-md)]" : "ds:ps-0"
|
|
214
194
|
].join(" "),
|
|
215
195
|
children: l.fields.map((n) => {
|
|
216
|
-
const
|
|
196
|
+
const V = y.has(n.id), c = h.indexOf(n.id), k = h.length, q = u === n.id, K = B === n.id && u !== null && u !== n.id && C === l.id;
|
|
217
197
|
return /* @__PURE__ */ I(
|
|
218
198
|
"li",
|
|
219
199
|
{
|
|
220
|
-
...
|
|
200
|
+
...V ? {
|
|
221
201
|
draggable: !0,
|
|
222
|
-
onDragStart: (
|
|
223
|
-
|
|
202
|
+
onDragStart: (s) => {
|
|
203
|
+
T(n.id), s.dataTransfer.effectAllowed = "move", s.dataTransfer.setData("text/plain", n.id);
|
|
224
204
|
},
|
|
225
|
-
onDragOver: (
|
|
226
|
-
u === null ||
|
|
205
|
+
onDragOver: (s) => {
|
|
206
|
+
u === null || C !== l.id || (s.preventDefault(), s.dataTransfer.dropEffect = "move", N(n.id));
|
|
227
207
|
},
|
|
228
208
|
onDragLeave: () => N(
|
|
229
|
-
(
|
|
209
|
+
(s) => s === n.id ? null : s
|
|
230
210
|
),
|
|
231
|
-
onDrop: (
|
|
232
|
-
|
|
233
|
-
const F =
|
|
234
|
-
F && F !== n.id &&
|
|
211
|
+
onDrop: (s) => {
|
|
212
|
+
s.preventDefault();
|
|
213
|
+
const F = s.dataTransfer.getData("text/plain");
|
|
214
|
+
F && F !== n.id && p.get(F) === l.id && (a(F, n.id), o(F, c, k)), D();
|
|
235
215
|
},
|
|
236
|
-
onDragEnd:
|
|
216
|
+
onDragEnd: D
|
|
237
217
|
} : {},
|
|
238
218
|
className: [
|
|
239
219
|
"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-2xs)] ds:py-[var(--spacing-2xs)] ds:transition-colors ds:motion-reduce:transition-none",
|
|
@@ -242,16 +222,16 @@ function Le({
|
|
|
242
222
|
].filter(Boolean).join(" "),
|
|
243
223
|
children: [
|
|
244
224
|
/* @__PURE__ */ r(
|
|
245
|
-
|
|
225
|
+
j,
|
|
246
226
|
{
|
|
247
227
|
size: "sm",
|
|
248
228
|
label: n.label,
|
|
249
|
-
checked:
|
|
229
|
+
checked: V,
|
|
250
230
|
onCheckedChange: () => t(n.id)
|
|
251
231
|
}
|
|
252
232
|
),
|
|
253
|
-
|
|
254
|
-
|
|
233
|
+
V ? /* @__PURE__ */ r(
|
|
234
|
+
U,
|
|
255
235
|
{
|
|
256
236
|
size: "sm",
|
|
257
237
|
intent: "ghost",
|
|
@@ -262,26 +242,26 @@ function Le({
|
|
|
262
242
|
}),
|
|
263
243
|
"aria-keyshortcuts": "Alt+ArrowUp Alt+ArrowDown Alt+Home Alt+End",
|
|
264
244
|
className: "ds:shrink-0 ds:cursor-grab ds:active:cursor-grabbing",
|
|
265
|
-
onKeyDown: (
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
245
|
+
onKeyDown: (s) => {
|
|
246
|
+
if (s.altKey) {
|
|
247
|
+
if (s.key === "ArrowUp") {
|
|
268
248
|
if (c <= 0) return;
|
|
269
|
-
|
|
249
|
+
s.preventDefault(), a(
|
|
270
250
|
n.id,
|
|
271
251
|
h[c - 1]
|
|
272
252
|
), o(n.id, c - 1, k);
|
|
273
|
-
} else if (
|
|
253
|
+
} else if (s.key === "ArrowDown") {
|
|
274
254
|
if (c >= k - 1) return;
|
|
275
|
-
|
|
255
|
+
s.preventDefault(), a(
|
|
276
256
|
n.id,
|
|
277
257
|
h[c + 1]
|
|
278
258
|
), o(n.id, c + 1, k);
|
|
279
|
-
} else if (
|
|
259
|
+
} else if (s.key === "Home") {
|
|
280
260
|
if (c <= 0) return;
|
|
281
|
-
|
|
282
|
-
} else if (
|
|
261
|
+
s.preventDefault(), a(n.id, h[0]), o(n.id, 0, k);
|
|
262
|
+
} else if (s.key === "End") {
|
|
283
263
|
if (c >= k - 1) return;
|
|
284
|
-
|
|
264
|
+
s.preventDefault(), a(
|
|
285
265
|
n.id,
|
|
286
266
|
h[k - 1]
|
|
287
267
|
), o(n.id, k - 1, k);
|
|
@@ -303,13 +283,13 @@ function Le({
|
|
|
303
283
|
);
|
|
304
284
|
}),
|
|
305
285
|
/* @__PURE__ */ r(Y, { orientation: "horizontal" }),
|
|
306
|
-
/* @__PURE__ */ r(W, { type: "button", size: "sm", intent: "ghost", onClick:
|
|
286
|
+
/* @__PURE__ */ r(W, { type: "button", size: "sm", intent: "ghost", onClick: x, children: i("fieldPicker.reset", { defaultValue: "Reset to defaults" }) })
|
|
307
287
|
] }),
|
|
308
|
-
/* @__PURE__ */ r("span", { role: "status", className: "ds:sr-only", children:
|
|
288
|
+
/* @__PURE__ */ r("span", { role: "status", className: "ds:sr-only", children: E })
|
|
309
289
|
] })
|
|
310
290
|
] });
|
|
311
291
|
}
|
|
312
|
-
const R = "ds:text-[color:var(--foreground)]",
|
|
292
|
+
const R = "ds:text-[color:var(--foreground)]", ue = {
|
|
313
293
|
m: "Male",
|
|
314
294
|
f: "Female",
|
|
315
295
|
x: "Other"
|
|
@@ -331,20 +311,20 @@ function z({
|
|
|
331
311
|
}
|
|
332
312
|
);
|
|
333
313
|
}
|
|
334
|
-
function
|
|
314
|
+
function me({ code: e }) {
|
|
335
315
|
const { t: d } = P(), t = e.toLowerCase(), m = d(`patientField.sex.${t}`, {
|
|
336
|
-
defaultValue:
|
|
316
|
+
defaultValue: ue[t] ?? e
|
|
337
317
|
});
|
|
338
|
-
return t === "f" ? /* @__PURE__ */ r(H, { variant: "accentSoft", leading: /* @__PURE__ */ r(
|
|
318
|
+
return t === "f" ? /* @__PURE__ */ r(H, { variant: "accentSoft", leading: /* @__PURE__ */ r(de, {}), children: m }) : t === "m" ? /* @__PURE__ */ r(H, { variant: "info", leading: /* @__PURE__ */ r(le, {}), children: m }) : /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(ie, {}), children: m });
|
|
339
319
|
}
|
|
340
320
|
function fe({ years: e }) {
|
|
341
321
|
const { t: d } = P();
|
|
342
|
-
return /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(
|
|
322
|
+
return /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(ae, {}), children: d("patientField.age", {
|
|
343
323
|
count: e,
|
|
344
324
|
defaultValue: "{{count}} years old"
|
|
345
325
|
}) });
|
|
346
326
|
}
|
|
347
|
-
function
|
|
327
|
+
function Ee({ field: e }) {
|
|
348
328
|
const { i18n: d } = P();
|
|
349
329
|
if (e.kind === "email" || e.kind === "phone") {
|
|
350
330
|
const t = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
|
|
@@ -359,18 +339,18 @@ function _e({ field: e }) {
|
|
|
359
339
|
return null;
|
|
360
340
|
switch (e.kind) {
|
|
361
341
|
case "sex":
|
|
362
|
-
return /* @__PURE__ */ r(
|
|
342
|
+
return /* @__PURE__ */ r(me, { code: String(e.editValue ?? "") });
|
|
363
343
|
case "age": {
|
|
364
344
|
const t = typeof e.editValue == "number" ? e.editValue : Number(e.editValue);
|
|
365
345
|
return Number.isFinite(t) ? /* @__PURE__ */ r(fe, { years: t }) : null;
|
|
366
346
|
}
|
|
367
347
|
case "dob": {
|
|
368
|
-
const t = e.editValue, m = t instanceof Date ? t : new Date(String(t ?? "")),
|
|
348
|
+
const t = e.editValue, m = t instanceof Date ? t : new Date(String(t ?? "")), a = Number.isNaN(m.getTime()) ? String(t ?? "") : new Intl.DateTimeFormat(d.language, {
|
|
369
349
|
day: "numeric",
|
|
370
350
|
month: "short",
|
|
371
351
|
year: "numeric"
|
|
372
352
|
}).format(m);
|
|
373
|
-
return
|
|
353
|
+
return a ? /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(se, {}), children: a }) : null;
|
|
374
354
|
}
|
|
375
355
|
case "fiscalCode": {
|
|
376
356
|
const t = e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
|
|
@@ -394,11 +374,11 @@ function _e({ field: e }) {
|
|
|
394
374
|
}
|
|
395
375
|
export {
|
|
396
376
|
fe as A,
|
|
397
|
-
|
|
377
|
+
Be as F,
|
|
398
378
|
z as N,
|
|
399
|
-
|
|
400
|
-
|
|
379
|
+
me as S,
|
|
380
|
+
Ee as a,
|
|
401
381
|
ze as r,
|
|
402
382
|
Pe as u
|
|
403
383
|
};
|
|
404
|
-
//# sourceMappingURL=field-value-
|
|
384
|
+
//# sourceMappingURL=field-value-D-vkX9uL.js.map
|