@alfadocs/ui-kit 1.149.0 → 1.150.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/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-D-RNe-_n.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CE-i9j-s.js} +2 -2
- package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
- package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-BO31ZFQp.js} +2 -2
- package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-C9kWtC6m.js} +90 -78
- package/dist/_chunks/appointment-peek-CGJ6kUvM.js +213 -0
- package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-ynFqcw0S.js} +3 -3
- package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-Dx5VDREk.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-DiyJQcmA.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-Dx9_KIWA.js → calendar-appointment-editor-dialog-BfoEpFVx.js} +360 -356
- package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-DO506cJu.js} +4 -4
- package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-CyMTv2y3.js} +7 -7
- package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-X3aXbDTo.js} +2 -2
- package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-C8x8kPb4.js} +10 -10
- package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-Bpemmnpd.js} +4 -4
- package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
- package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-Cd0TBEhL.js} +2 -2
- package/dist/_chunks/{control-room-rail-BQvaYowi.js → control-room-rail-4W1MFY-g.js} +3 -3
- package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-Zws6CHhK.js} +3 -3
- package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
- package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
- package/dist/_chunks/feature-preview-switch-PKeLaFry.js +75 -0
- package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DzOCQBAO.js} +163 -178
- package/dist/_chunks/folder-CH9PJHou.js +36 -0
- package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-B_wMJ82X.js} +2 -2
- package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
- package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-BguRX8VC.js} +374 -341
- package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-BzGnlIjq.js} +2 -2
- package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
- package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-Om_yZvFG.js} +2 -2
- package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-YKnBzmwE.js} +3 -3
- package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-DERfQbp5.js} +5 -5
- package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-BUD0UbmT.js} +3 -3
- package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-DytaHdGw.js} +201 -200
- package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-7Werxl48.js} +126 -139
- package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BF3rakTQ.js} +2 -2
- package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-C1QQGPQf.js} +3 -3
- package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-CzEuCaqv.js} +3 -3
- package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-BMW4t57s.js} +2 -2
- package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CrjD5PYW.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-Kl1M0dtT.js} +3 -3
- package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-kdKbGQE6.js} +3 -3
- package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-CW0frsMv.js} +2 -2
- package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-54AFY6uy.js} +2 -2
- package/dist/_chunks/{rich-text-editor-eGdYDPK2.js → rich-text-editor-DCQEpaIv.js} +1398 -1280
- package/dist/_chunks/{task-editor-4zFL10oM.js → task-editor-CIHQQRtP.js} +219 -210
- package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-Bc_odkQN.js} +2 -2
- package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
- package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-CJBtqzMs.js} +337 -320
- package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
- package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
- package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-B6m47Jie.js} +44 -46
- package/dist/_chunks/{use-appointment-details-read-Bl1DHXQ2.js → use-appointment-details-read-HVHbR0Zl.js} +769 -745
- package/dist/agent-catalog.json +15 -1
- package/dist/appointment-editor-panel/index.js +4 -4
- package/dist/booking-tools-data/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/calendar-action-buttons/index.js +1 -1
- package/dist/components/_shared/appointment-format.d.ts +4 -0
- package/dist/components/_shared/patient-field-row.d.ts +5 -1
- package/dist/components/ai-summary-panel/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +5 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +3 -0
- package/dist/components/appointment-details-panel/index.js +2 -2
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calls-panel/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/communications-panel/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/editable-description/editable-description.d.ts +7 -0
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
- package/dist/components/feature-preview-switch/index.d.ts +2 -0
- package/dist/components/feature-preview-switch/index.js +5 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +20 -0
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +8 -0
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/registry-connection-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +4 -1
- package/dist/components/rich-text-editor/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/text-area/index.js +1 -1
- package/dist/components/text-area/text-area.d.ts +15 -0
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +12 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-legacy.css +51 -4
- package/dist/i18n/locales/ar.d.ts +9 -0
- package/dist/i18n/locales/ar.js +8 -2
- package/dist/i18n/locales/de.d.ts +9 -0
- package/dist/i18n/locales/de.js +8 -2
- package/dist/i18n/locales/el.d.ts +9 -0
- package/dist/i18n/locales/el.js +10 -1
- package/dist/i18n/locales/en.d.ts +9 -0
- package/dist/i18n/locales/en.js +11 -2
- package/dist/i18n/locales/es.d.ts +9 -0
- package/dist/i18n/locales/es.js +10 -1
- package/dist/i18n/locales/fr.d.ts +9 -0
- package/dist/i18n/locales/fr.js +10 -1
- package/dist/i18n/locales/hi.d.ts +9 -0
- package/dist/i18n/locales/hi.js +8 -2
- package/dist/i18n/locales/it.d.ts +19 -10
- package/dist/i18n/locales/it.js +20 -11
- package/dist/i18n/locales/ja.d.ts +9 -0
- package/dist/i18n/locales/ja.js +8 -2
- package/dist/i18n/locales/nl.d.ts +9 -0
- package/dist/i18n/locales/nl.js +8 -2
- package/dist/i18n/locales/pl.d.ts +9 -0
- package/dist/i18n/locales/pl.js +10 -1
- package/dist/i18n/locales/pt.d.ts +9 -0
- package/dist/i18n/locales/pt.js +10 -1
- package/dist/i18n/locales/ro.d.ts +9 -0
- package/dist/i18n/locales/ro.js +10 -1
- package/dist/i18n/locales/ru.d.ts +9 -0
- package/dist/i18n/locales/ru.js +8 -2
- package/dist/i18n/locales/sq.d.ts +9 -0
- package/dist/i18n/locales/sq.js +10 -1
- package/dist/i18n/locales/sv.d.ts +9 -0
- package/dist/i18n/locales/sv.js +8 -2
- package/dist/i18n/locales/tr.d.ts +9 -0
- package/dist/i18n/locales/tr.js +8 -2
- package/dist/i18n/locales/zh.d.ts +9 -0
- package/dist/i18n/locales/zh.js +8 -2
- package/dist/index.js +775 -773
- package/dist/locales/ar.json +10 -1
- package/dist/locales/de.json +10 -1
- package/dist/locales/el.json +10 -1
- package/dist/locales/en.json +11 -2
- package/dist/locales/es.json +10 -1
- package/dist/locales/fr.json +10 -1
- package/dist/locales/hi.json +10 -1
- package/dist/locales/it.json +20 -11
- package/dist/locales/ja.json +10 -1
- package/dist/locales/nl.json +10 -1
- package/dist/locales/pl.json +10 -1
- package/dist/locales/pt.json +10 -1
- package/dist/locales/ro.json +10 -1
- package/dist/locales/ru.json +10 -1
- package/dist/locales/sq.json +10 -1
- package/dist/locales/sv.json +10 -1
- package/dist/locales/tr.json +10 -1
- package/dist/locales/zh.json +10 -1
- package/dist/online-bookings-panel/index.js +2 -2
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +4 -4
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/tokens.css +1 -1
- package/dist/waiting-list-panel/index.js +3 -3
- package/package.json +5 -1
- package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
- package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
- package/dist/_chunks/folder-BghC8_S2.js +0 -20
- package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { jsxs as b, jsx as n, Fragment as be } from "react/jsx-runtime";
|
|
2
|
-
import { useState as K, useRef as E, useEffect as Je, forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
2
|
+
import { useState as K, useRef as E, useEffect as Je, forwardRef as Ft, useId as Ot, useMemo as Fe } from "react";
|
|
3
|
+
import { c as Qe } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Ut } from "react-i18next";
|
|
5
5
|
import { A as C } from "./alert-C4WKViaS.js";
|
|
6
6
|
import { B as Le } from "./button-Dp4j9ygh.js";
|
|
7
7
|
import { I as ze } from "./icon-button-u9VMQn3x.js";
|
|
8
|
-
import { C as
|
|
8
|
+
import { C as Pt } from "./combobox-BYl6mY4c.js";
|
|
9
9
|
import { D as X } from "./dialog-239Geb7Z.js";
|
|
10
|
-
import { D as
|
|
10
|
+
import { D as xt } from "./date-picker-CD-PBzXM.js";
|
|
11
11
|
import { F as B } from "./form-field-CyHfOVKF.js";
|
|
12
|
-
import { I as
|
|
13
|
-
import { P as
|
|
14
|
-
import { P as
|
|
15
|
-
import { R as
|
|
16
|
-
import { R as
|
|
17
|
-
import { S as
|
|
12
|
+
import { I as jt } from "./icon-button-group-DEAx9M5v.js";
|
|
13
|
+
import { P as $t } from "./panel-header-DTc5OFUg.js";
|
|
14
|
+
import { P as Mt } from "./panel-subview-Om_yZvFG.js";
|
|
15
|
+
import { R as Oe } from "./radio-BZQs6_36.js";
|
|
16
|
+
import { R as qt } from "./radio-group-ChIKyeSJ.js";
|
|
17
|
+
import { S as Vt } from "./scroll-area-CY5SLYNw.js";
|
|
18
18
|
import { S as Ge } from "./select-Bw5FvGJ7.js";
|
|
19
19
|
import { S as He } from "./skeleton-tTWJpvAq.js";
|
|
20
|
-
import { S as
|
|
21
|
-
import { T as
|
|
22
|
-
import { T as
|
|
23
|
-
import { T as
|
|
24
|
-
import { u as
|
|
25
|
-
import { u as
|
|
26
|
-
import { c as
|
|
27
|
-
import { E as
|
|
28
|
-
import { P as
|
|
29
|
-
import { b as
|
|
30
|
-
import { isSaveOutcomeUnknownError as Pe, useSaveOutcomeUnknownMessage as
|
|
20
|
+
import { S as _t } from "./switch-DO6uC4HJ.js";
|
|
21
|
+
import { T as Wt } from "./text-area-DbxGkpzE.js";
|
|
22
|
+
import { T as Ue } from "./text-input-B6iAgCr3.js";
|
|
23
|
+
import { T as Kt } from "./time-picker-DDr5vhwQ.js";
|
|
24
|
+
import { u as Lt } from "./registry-DvAUVLHh.js";
|
|
25
|
+
import { u as zt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
26
|
+
import { c as Gt } from "./compose-refs-C0k0tdqF.js";
|
|
27
|
+
import { E as Ht, a as Yt } from "./compact-editor-fields-cP6yh7xv.js";
|
|
28
|
+
import { P as Xt } from "./patient-picker-Dm74jHIk.js";
|
|
29
|
+
import { b as Jt } from "./privacy-mask-CrjD5PYW.js";
|
|
30
|
+
import { isSaveOutcomeUnknownError as Pe, useSaveOutcomeUnknownMessage as Qt } from "../save-outcome/index.js";
|
|
31
31
|
import { g as Ye } from "./get-error-message-DbFUzuja.js";
|
|
32
|
-
import { h as
|
|
33
|
-
import { L as
|
|
34
|
-
import { X as
|
|
35
|
-
import { C as
|
|
36
|
-
import { U as
|
|
37
|
-
import { B as
|
|
38
|
-
import { S as
|
|
39
|
-
import { T as
|
|
40
|
-
import { S as
|
|
41
|
-
import { p as
|
|
42
|
-
import { L as
|
|
43
|
-
import { S as
|
|
44
|
-
const
|
|
32
|
+
import { h as Zt } from "./handled-rejection-C-6Dq0As.js";
|
|
33
|
+
import { L as en } from "./lock-ClAFG1gy.js";
|
|
34
|
+
import { X as tn } from "./x-B5YnXwCz.js";
|
|
35
|
+
import { C as nn } from "./circle-off-DuT9pVy2.js";
|
|
36
|
+
import { U as on } from "./user-B12p7bVF.js";
|
|
37
|
+
import { B as rn } from "./building-2-D33bLCWL.js";
|
|
38
|
+
import { S as an } from "./stethoscope-sZXGC43m.js";
|
|
39
|
+
import { T as ut } from "./trash-2-uumy3fy1.js";
|
|
40
|
+
import { S as pt } from "./square-check-big-dj0o8yA3.js";
|
|
41
|
+
import { p as sn } from "./privacy-mask-text-B8YfzB7L.js";
|
|
42
|
+
import { L as dn } from "./loader-circle-BECIU_8N.js";
|
|
43
|
+
import { S as ln } from "./save-Dn8uje3f.js";
|
|
44
|
+
const cn = {
|
|
45
45
|
id: "task-editor",
|
|
46
46
|
// set_value backs set_fields and set_done; submit backs save; dismiss
|
|
47
47
|
// backs cancel.
|
|
@@ -154,7 +154,7 @@ const dn = {
|
|
|
154
154
|
description: "Sourced from the id prop, or generated. Addresses one editor from the agent. [data-component-id] reaches the footer actions in both variants."
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, N = "none", mt = {
|
|
158
158
|
showError: !1,
|
|
159
159
|
saving: !1,
|
|
160
160
|
saveError: void 0,
|
|
@@ -170,53 +170,53 @@ const dn = {
|
|
|
170
170
|
confirmDeleteOpen: !1,
|
|
171
171
|
accepted: !1
|
|
172
172
|
};
|
|
173
|
-
function
|
|
173
|
+
function un(r) {
|
|
174
174
|
return r.patientId ? "patient" : r.companyId ? "company" : r.operatorId ? "operator" : "nobody";
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Ze(r) {
|
|
177
177
|
return { hours: r.getHours(), minutes: r.getMinutes() };
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function ft(r) {
|
|
180
180
|
const u = r ?? /* @__PURE__ */ new Date();
|
|
181
181
|
return {
|
|
182
182
|
date: u,
|
|
183
|
-
time:
|
|
183
|
+
time: Ze(u),
|
|
184
184
|
note: "",
|
|
185
|
-
operatorId:
|
|
185
|
+
operatorId: N,
|
|
186
186
|
typeId: "",
|
|
187
|
-
assigneeId:
|
|
187
|
+
assigneeId: N,
|
|
188
188
|
about: "nobody",
|
|
189
189
|
patientId: "",
|
|
190
190
|
companyId: ""
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function pn(r) {
|
|
194
194
|
const u = new Date(r.dateIso);
|
|
195
195
|
return {
|
|
196
196
|
date: u,
|
|
197
|
-
time:
|
|
197
|
+
time: Ze(u),
|
|
198
198
|
note: r.note,
|
|
199
199
|
/* `||`, not `??`: a host's '' is unset, like patient and company. */
|
|
200
|
-
operatorId: r.operatorId ||
|
|
200
|
+
operatorId: r.operatorId || N,
|
|
201
201
|
/* A stored type wins. With none, '' falls through to the first entry. */
|
|
202
202
|
typeId: r.typeId ?? "",
|
|
203
203
|
/* `||` too: '' would become a Select option with an empty value. */
|
|
204
|
-
assigneeId: r.assigneeId ||
|
|
205
|
-
about:
|
|
204
|
+
assigneeId: r.assigneeId || N,
|
|
205
|
+
about: un(r),
|
|
206
206
|
patientId: r.patientId ?? "",
|
|
207
207
|
companyId: r.companyId ?? ""
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const mn = [
|
|
211
211
|
["patientId", "patient"],
|
|
212
212
|
["companyId", "company"],
|
|
213
213
|
["operatorId", "operator"]
|
|
214
214
|
];
|
|
215
|
-
function
|
|
215
|
+
function fn({
|
|
216
216
|
mode: r,
|
|
217
217
|
taskId: u,
|
|
218
218
|
initialDate: S,
|
|
219
|
-
active:
|
|
219
|
+
active: F,
|
|
220
220
|
taskTypes: $,
|
|
221
221
|
assignees: x,
|
|
222
222
|
companies: xe,
|
|
@@ -238,21 +238,21 @@ function pn({
|
|
|
238
238
|
unknownOutcomeMessage: ke
|
|
239
239
|
}) {
|
|
240
240
|
var ye;
|
|
241
|
-
const
|
|
242
|
-
Q !==
|
|
243
|
-
const
|
|
244
|
-
() =>
|
|
245
|
-
), [
|
|
246
|
-
se !==
|
|
241
|
+
const T = r === "edit", [$e, Me] = K(0), [Q, Se] = K(F);
|
|
242
|
+
Q !== F && (Se(F), F && Me((e) => e + 1));
|
|
243
|
+
const O = `${r}|${u ?? ""}|${$e}`, [p, ae] = K(
|
|
244
|
+
() => ft(S)
|
|
245
|
+
), [U, fe] = K(mt), [o, De] = K(), g = (e) => fe((s) => ({ ...s, ...e })), ie = (e) => ae((s) => ({ ...s, ...e })), [se, V] = K(O);
|
|
246
|
+
se !== O && (V(O), ae(ft(S)), fe(mt), De(void 0));
|
|
247
247
|
const k = E({
|
|
248
|
-
subject:
|
|
248
|
+
subject: O,
|
|
249
249
|
saving: !1,
|
|
250
250
|
deleting: !1,
|
|
251
251
|
donePending: !1,
|
|
252
252
|
accepted: !1
|
|
253
253
|
});
|
|
254
|
-
k.current.subject !==
|
|
255
|
-
subject:
|
|
254
|
+
k.current.subject !== O && (k.current = {
|
|
255
|
+
subject: O,
|
|
256
256
|
saving: !1,
|
|
257
257
|
deleting: !1,
|
|
258
258
|
donePending: !1,
|
|
@@ -266,7 +266,7 @@ function pn({
|
|
|
266
266
|
Z.current = G;
|
|
267
267
|
const d = !!G, [w, l] = K(0), [a, m] = K(null), he = E(a);
|
|
268
268
|
he.current = a;
|
|
269
|
-
const le =
|
|
269
|
+
const le = F && T && !!u && d && !Ee;
|
|
270
270
|
Je(() => {
|
|
271
271
|
const e = Z.current;
|
|
272
272
|
if (!le || !u || !e) return;
|
|
@@ -282,7 +282,7 @@ function pn({
|
|
|
282
282
|
)
|
|
283
283
|
).then(
|
|
284
284
|
(f) => {
|
|
285
|
-
c.signal.aborted || !I(s) || (ae(
|
|
285
|
+
c.signal.aborted || !I(s) || (ae(pn(f)), g({ done: f.done, confirmedDone: f.done }), De(f), m({ subject: s.subject, status: "ready" }));
|
|
286
286
|
},
|
|
287
287
|
(f) => {
|
|
288
288
|
c.signal.aborted || !I(s) || m({
|
|
@@ -292,11 +292,11 @@ function pn({
|
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
), () => c.abort();
|
|
295
|
-
}, [le,
|
|
296
|
-
const D =
|
|
295
|
+
}, [le, O, w]);
|
|
296
|
+
const D = T ? !u || !d ? "locked" : Ee ? "withheld" : (a == null ? void 0 : a.subject) === O ? a.status : "loading" : "ready", P = () => {
|
|
297
297
|
D === "error" && (m(null), l((e) => e + 1));
|
|
298
|
-
}, ee = p.typeId || (((ye = $[0]) == null ? void 0 : ye.id) ?? ""), qe = p.about === "nobody" || p.about === "patient" && p.patientId !== "" || p.about === "company" && p.companyId !== "" || p.about === "operator" && p.operatorId !==
|
|
299
|
-
($.length === 0 || ee !== "") && !
|
|
298
|
+
}, ee = p.typeId || (((ye = $[0]) == null ? void 0 : ye.id) ?? ""), qe = p.about === "nobody" || p.about === "patient" && p.patientId !== "" || p.about === "company" && p.companyId !== "" || p.about === "operator" && p.operatorId !== N, te = !q && p.note.trim() !== "" && p.date !== void 0 && qe && /* Required whenever the host offers a list. */
|
|
299
|
+
($.length === 0 || ee !== "") && !U.saving && !U.donePending, ce = T ? oe : H, ve = () => {
|
|
300
300
|
const { date: e, time: s } = p;
|
|
301
301
|
return e ? {
|
|
302
302
|
dateIso: new Date(
|
|
@@ -313,18 +313,18 @@ function pn({
|
|
|
313
313
|
longer resolves: a real link must survive a Save that never
|
|
314
314
|
offered to change it. */
|
|
315
315
|
typeId: ee === "" ? void 0 : ee,
|
|
316
|
-
assigneeId: p.assigneeId ===
|
|
316
|
+
assigneeId: p.assigneeId === N ? void 0 : p.assigneeId,
|
|
317
317
|
/* ONE counterpart, decided by `about` alone: the platform refuses a
|
|
318
318
|
task carrying two. Never gated on a list being loaded, or a list
|
|
319
319
|
that empties mid-edit would unlink the task on Save. */
|
|
320
320
|
patientId: p.about === "patient" && p.patientId ? p.patientId : void 0,
|
|
321
321
|
companyId: p.about === "company" && p.companyId ? p.companyId : void 0,
|
|
322
|
-
operatorId: p.about === "operator" && p.operatorId !==
|
|
322
|
+
operatorId: p.about === "operator" && p.operatorId !== N ? p.operatorId : void 0,
|
|
323
323
|
/* The last CONFIRMED value only, never an optimistic or rolled-back
|
|
324
324
|
toggle. */
|
|
325
|
-
done:
|
|
325
|
+
done: U.confirmedDone
|
|
326
326
|
} : void 0;
|
|
327
|
-
}, ge = (e) => Pe(e) ? ke : Ye(e, me), y = (e) =>
|
|
327
|
+
}, ge = (e) => Pe(e) ? ke : Ye(e, me), y = (e) => Zt(new Error(`TaskEditor: ${e}`)), Ce = () => {
|
|
328
328
|
const e = k.current;
|
|
329
329
|
if (D !== "ready") return y(`cannot save while ${D}.`);
|
|
330
330
|
if (!ce) return y("the host gave no save seam.");
|
|
@@ -342,7 +342,7 @@ function pn({
|
|
|
342
342
|
});
|
|
343
343
|
const c = (async () => {
|
|
344
344
|
try {
|
|
345
|
-
if (
|
|
345
|
+
if (T)
|
|
346
346
|
await (oe == null ? void 0 : oe(h, s)), e.accepted = !0, I(e) && (g({ accepted: !0 }), M == null || M({
|
|
347
347
|
...s,
|
|
348
348
|
id: h,
|
|
@@ -363,19 +363,19 @@ function pn({
|
|
|
363
363
|
})();
|
|
364
364
|
return c.catch(() => {
|
|
365
365
|
}), c;
|
|
366
|
-
},
|
|
366
|
+
}, Ne = (e) => {
|
|
367
367
|
const s = k.current;
|
|
368
368
|
if (D !== "ready")
|
|
369
369
|
return y(`cannot change Done while ${D}.`);
|
|
370
|
-
if (!
|
|
370
|
+
if (!T || !u || !re || q)
|
|
371
371
|
return y("the host gave no Done seam.");
|
|
372
372
|
if (s.donePending) return y("a Done change is already pending.");
|
|
373
373
|
if (s.saving || s.deleting)
|
|
374
374
|
return y("a save or delete is in flight.");
|
|
375
375
|
if (s.accepted)
|
|
376
376
|
return y("this task was already saved or deleted.");
|
|
377
|
-
if (e ===
|
|
378
|
-
const h =
|
|
377
|
+
if (e === U.done) return Promise.resolve();
|
|
378
|
+
const h = U.confirmedDone, c = u;
|
|
379
379
|
s.donePending = !0, g({
|
|
380
380
|
done: e,
|
|
381
381
|
donePending: !0,
|
|
@@ -401,10 +401,10 @@ function pn({
|
|
|
401
401
|
})();
|
|
402
402
|
return f.catch(() => {
|
|
403
403
|
}), f;
|
|
404
|
-
},
|
|
404
|
+
}, Te = () => {
|
|
405
405
|
const e = k.current;
|
|
406
406
|
if (D !== "ready") return y(`cannot delete while ${D}.`);
|
|
407
|
-
if (!
|
|
407
|
+
if (!T || !u || !Y || q)
|
|
408
408
|
return y("the host gave no delete seam.");
|
|
409
409
|
if (e.saving || e.accepted || e.deleting)
|
|
410
410
|
return y("the task cannot be deleted now.");
|
|
@@ -436,7 +436,7 @@ function pn({
|
|
|
436
436
|
if (D !== "ready")
|
|
437
437
|
throw new Error(`TaskEditor: cannot set fields while ${D}.`);
|
|
438
438
|
if (q) throw new Error("TaskEditor: the task is read-only.");
|
|
439
|
-
const s =
|
|
439
|
+
const s = mn.filter(([R]) => e[R] !== void 0);
|
|
440
440
|
if (s.length > 1)
|
|
441
441
|
throw new Error(
|
|
442
442
|
"TaskEditor: set at most one of patientId, companyId and operatorId."
|
|
@@ -465,9 +465,9 @@ function pn({
|
|
|
465
465
|
const R = new Date(e.dateIso);
|
|
466
466
|
if (Number.isNaN(R.getTime()))
|
|
467
467
|
throw new Error(`TaskEditor: "${e.dateIso}" is not a date.`);
|
|
468
|
-
c.date = R, c.time =
|
|
468
|
+
c.date = R, c.time = Ze(R);
|
|
469
469
|
}
|
|
470
|
-
e.note !== void 0 && (c.note = e.note), e.typeId !== void 0 && (c.typeId = e.typeId), e.assigneeId !== void 0 && (c.assigneeId = e.assigneeId ??
|
|
470
|
+
e.note !== void 0 && (c.note = e.note), e.typeId !== void 0 && (c.typeId = e.typeId), e.assigneeId !== void 0 && (c.assigneeId = e.assigneeId ?? N), e.about !== void 0 && (c.about = e.about), e.patientId !== void 0 && (c.patientId = e.patientId, c.about = "patient"), e.companyId !== void 0 && (c.companyId = e.companyId, c.about = "company"), e.operatorId !== void 0 && (c.operatorId = e.operatorId, c.about = "operator"), ie(c);
|
|
471
471
|
}, Ae = () => {
|
|
472
472
|
const e = ve();
|
|
473
473
|
return {
|
|
@@ -479,14 +479,14 @@ function pn({
|
|
|
479
479
|
operatorId: (e == null ? void 0 : e.operatorId) ?? null,
|
|
480
480
|
typeId: (e == null ? void 0 : e.typeId) ?? null,
|
|
481
481
|
assigneeId: (e == null ? void 0 : e.assigneeId) ?? null,
|
|
482
|
-
done:
|
|
482
|
+
done: U.confirmedDone,
|
|
483
483
|
hasNote: p.note.trim() !== "",
|
|
484
484
|
noteLength: p.note.trim().length
|
|
485
485
|
};
|
|
486
486
|
};
|
|
487
487
|
return {
|
|
488
488
|
status: D,
|
|
489
|
-
loadError: (a == null ? void 0 : a.subject) ===
|
|
489
|
+
loadError: (a == null ? void 0 : a.subject) === O ? a.message : void 0,
|
|
490
490
|
retry: P,
|
|
491
491
|
fields: p,
|
|
492
492
|
patchFields: ie,
|
|
@@ -495,24 +495,24 @@ function pn({
|
|
|
495
495
|
canSave: te,
|
|
496
496
|
/** What the agent's `canSave` reports: the button's rule plus the
|
|
497
497
|
* status, the seam and a save that has not landed yet. */
|
|
498
|
-
agentCanSave: D === "ready" && !!ce && te && !
|
|
498
|
+
agentCanSave: D === "ready" && !!ce && te && !U.accepted,
|
|
499
499
|
showSave: !q && !!ce,
|
|
500
|
-
showDelete:
|
|
501
|
-
showDone:
|
|
502
|
-
ui:
|
|
500
|
+
showDelete: T && !q && !!Y && !!u,
|
|
501
|
+
showDone: T && !q && !!re,
|
|
502
|
+
ui: U,
|
|
503
503
|
patchUi: g,
|
|
504
504
|
/** True once a save or delete landed in this session. */
|
|
505
505
|
isAccepted: () => k.current.accepted,
|
|
506
506
|
/** A save or delete is in flight: closing now would lose its outcome. */
|
|
507
507
|
isBusy: () => k.current.saving || k.current.deleting,
|
|
508
508
|
submit: Ce,
|
|
509
|
-
setDone:
|
|
510
|
-
remove:
|
|
509
|
+
setDone: Ne,
|
|
510
|
+
remove: Te,
|
|
511
511
|
applyPatch: Re,
|
|
512
512
|
draftState: Ae
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
|
-
const
|
|
515
|
+
const ht = Qe("ds:flex ds:min-h-0 ds:flex-col", {
|
|
516
516
|
variants: {
|
|
517
517
|
/** The panel fills its box; the subview body sits in its scroll area. */
|
|
518
518
|
variant: {
|
|
@@ -524,36 +524,45 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
524
524
|
}
|
|
525
525
|
},
|
|
526
526
|
defaultVariants: { variant: "panel" }
|
|
527
|
-
}),
|
|
528
|
-
|
|
527
|
+
}), vt = Qe("ds:min-w-0 ds:p-[var(--spacing-md)]", {
|
|
528
|
+
variants: {
|
|
529
|
+
/** 'form': sized by the fields. 'notice': fills the body. */
|
|
530
|
+
layout: {
|
|
531
|
+
form: "",
|
|
532
|
+
notice: "ds:flex-1"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
defaultVariants: { layout: "form" }
|
|
536
|
+
}), gt = Qe(
|
|
537
|
+
`ds:m-0 ds:min-w-0 ds:border-0 ds:p-0 ${Yt}`,
|
|
529
538
|
{
|
|
530
539
|
variants: {
|
|
531
540
|
/** 'form': the fields in a column. 'notice': the locked notice. */
|
|
532
541
|
layout: {
|
|
533
542
|
form: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
534
|
-
notice: "
|
|
543
|
+
notice: ""
|
|
535
544
|
}
|
|
536
545
|
},
|
|
537
546
|
defaultVariants: { layout: "form" }
|
|
538
547
|
}
|
|
539
|
-
), i = (r) => `calendarWorkspace.taskEditor.${r}`,
|
|
548
|
+
), i = (r) => `calendarWorkspace.taskEditor.${r}`, hn = (r, u, S) => S.includes(u) ? 1 : 0, we = [], Xe = (r, u) => Array.from(r.querySelectorAll("[data-task-id]")).filter(
|
|
540
549
|
(S) => !u.contains(S)
|
|
541
|
-
),
|
|
550
|
+
), vn = 'button:not([disabled]), a[href], input:not([disabled]), [tabindex]:not([tabindex="-1"])', yt = (r, u) => {
|
|
542
551
|
if (!r) return [];
|
|
543
552
|
const S = Array.from(
|
|
544
553
|
r.querySelectorAll("[data-action]")
|
|
545
554
|
);
|
|
546
555
|
return [
|
|
547
|
-
...S.filter((
|
|
548
|
-
...S.filter((
|
|
549
|
-
...Array.from(r.querySelectorAll(
|
|
556
|
+
...S.filter((F) => u && F.dataset.action === u),
|
|
557
|
+
...S.filter((F) => F.dataset.action === "open-task"),
|
|
558
|
+
...Array.from(r.querySelectorAll(vn))
|
|
550
559
|
];
|
|
551
|
-
},
|
|
560
|
+
}, gn = Ft(
|
|
552
561
|
({
|
|
553
562
|
id: r,
|
|
554
563
|
mode: u,
|
|
555
564
|
taskId: S,
|
|
556
|
-
initialDate:
|
|
565
|
+
initialDate: F,
|
|
557
566
|
variant: $ = "panel",
|
|
558
567
|
open: x = !0,
|
|
559
568
|
onExited: xe,
|
|
@@ -573,20 +582,20 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
573
582
|
onUpdateTask: je,
|
|
574
583
|
onDeleteTask: me,
|
|
575
584
|
onSetTaskDone: ke,
|
|
576
|
-
onCancel:
|
|
585
|
+
onCancel: T,
|
|
577
586
|
onSaved: $e,
|
|
578
587
|
onDeleted: Me,
|
|
579
588
|
readOnly: Q = !1,
|
|
580
589
|
privacy: Se = !1,
|
|
581
|
-
privacyMode:
|
|
590
|
+
privacyMode: O = "notice",
|
|
582
591
|
onPrivacyOff: p,
|
|
583
592
|
className: ae,
|
|
584
|
-
...
|
|
593
|
+
...U
|
|
585
594
|
}, fe) => {
|
|
586
|
-
const { t: o } =
|
|
595
|
+
const { t: o } = Ut("ui"), De = Qt(), g = Ot(), ie = r ?? g, se = u === "edit", V = $ === "subview", k = !V || x, de = Se && se && O === "notice", I = Se && !de, [Z] = K(() => /* @__PURE__ */ new Map()), d = fn({
|
|
587
596
|
mode: u,
|
|
588
597
|
taskId: S,
|
|
589
|
-
initialDate:
|
|
598
|
+
initialDate: F,
|
|
590
599
|
active: k,
|
|
591
600
|
taskTypes: L,
|
|
592
601
|
assignees: ne,
|
|
@@ -609,7 +618,7 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
609
618
|
unknownOutcomeMessage: De
|
|
610
619
|
}), { status: w, fields: l, ui: a, stored: m } = d, he = E(H);
|
|
611
620
|
he.current = H;
|
|
612
|
-
const le = !!H, D =
|
|
621
|
+
const le = !!H, D = Fe(
|
|
613
622
|
() => le ? async (t, v) => {
|
|
614
623
|
const A = await he.current(t, v);
|
|
615
624
|
for (const W of A)
|
|
@@ -619,9 +628,9 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
619
628
|
[le, Z]
|
|
620
629
|
), P = E(d);
|
|
621
630
|
P.current = d;
|
|
622
|
-
const ee = E(
|
|
623
|
-
ee.current =
|
|
624
|
-
const qe =
|
|
631
|
+
const ee = E(T);
|
|
632
|
+
ee.current = T;
|
|
633
|
+
const qe = Fe(
|
|
625
634
|
() => ({
|
|
626
635
|
getStatus: () => P.current.status,
|
|
627
636
|
getDraft: () => P.current.draftState(),
|
|
@@ -638,43 +647,43 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
638
647
|
}),
|
|
639
648
|
[]
|
|
640
649
|
);
|
|
641
|
-
|
|
642
|
-
const te = E(null), ce =
|
|
643
|
-
() =>
|
|
650
|
+
Lt(cn, k ? qe : null, ie);
|
|
651
|
+
const te = E(null), ce = Fe(
|
|
652
|
+
() => Gt(fe, te),
|
|
644
653
|
[fe]
|
|
645
654
|
), ve = E(null), ge = E(null), y = E(!1);
|
|
646
|
-
|
|
655
|
+
V && x && !y.current && (ge.current = typeof document < "u" && document.activeElement instanceof HTMLElement ? document.activeElement : null), y.current = V && x;
|
|
647
656
|
const Ce = E(x);
|
|
648
657
|
Ce.current = x;
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
var
|
|
658
|
+
const Ne = E(S);
|
|
659
|
+
Ne.current = se ? S : void 0, Je(() => {
|
|
660
|
+
var ct;
|
|
652
661
|
const t = te.current, v = t == null ? void 0 : t.parentElement;
|
|
653
|
-
if (!
|
|
654
|
-
const A = ge.current, W = A && v.contains(A) && !t.contains(A) ? A : null,
|
|
662
|
+
if (!V || !x || !t || !v) return;
|
|
663
|
+
const A = ge.current, W = A && v.contains(A) && !t.contains(A) ? A : null, At = Ne.current, Ie = (W == null ? void 0 : W.closest("[data-task-id]")) ?? Xe(v, t).find((Be) => Be.dataset.taskId === At), st = Ie == null ? void 0 : Ie.dataset.taskId, dt = (ct = W == null ? void 0 : W.closest("[data-action]")) == null ? void 0 : ct.dataset.action, lt = Ie ? Xe(v, t).indexOf(Ie) : -1;
|
|
655
664
|
return () => {
|
|
656
665
|
if (Ce.current && t.isConnected) return;
|
|
657
666
|
const Be = document.activeElement;
|
|
658
667
|
if (!v.isConnected || Be && Be !== document.body) return;
|
|
659
|
-
const Ke = Xe(v, t),
|
|
660
|
-
...
|
|
661
|
-
Ke.find((ue) =>
|
|
662
|
-
|
|
668
|
+
const Ke = Xe(v, t), Bt = [
|
|
669
|
+
...yt(
|
|
670
|
+
Ke.find((ue) => st !== void 0 && ue.dataset.taskId === st),
|
|
671
|
+
dt
|
|
663
672
|
),
|
|
664
673
|
/* The row that took its place, or the last row when it was last. */
|
|
665
|
-
...
|
|
674
|
+
...lt >= 0 ? yt(Ke[Math.min(lt, Ke.length - 1)], dt) : [],
|
|
666
675
|
v.querySelector('[data-action="add-task"]'),
|
|
667
676
|
v.querySelector("[data-tasks-panel-region]")
|
|
668
677
|
];
|
|
669
|
-
for (const ue of
|
|
678
|
+
for (const ue of Bt)
|
|
670
679
|
if (!(!ue || t.contains(ue)) && (ue.focus(), document.activeElement === ue))
|
|
671
680
|
return;
|
|
672
681
|
};
|
|
673
|
-
}, [x,
|
|
674
|
-
const
|
|
682
|
+
}, [x, V]);
|
|
683
|
+
const Te = E(null), j = E(!1), Re = (t) => () => {
|
|
675
684
|
j.current = !0, t();
|
|
676
685
|
};
|
|
677
|
-
|
|
686
|
+
zt(() => {
|
|
678
687
|
var A;
|
|
679
688
|
if (!j.current) return;
|
|
680
689
|
const t = te.current, v = document.activeElement;
|
|
@@ -682,32 +691,32 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
682
691
|
j.current = !1;
|
|
683
692
|
return;
|
|
684
693
|
}
|
|
685
|
-
w !== "loading" && (j.current = !1), (A = w === "error" ?
|
|
694
|
+
w !== "loading" && (j.current = !1), (A = w === "error" ? Te.current : t) == null || A.focus({
|
|
686
695
|
preventScroll: !0
|
|
687
696
|
});
|
|
688
697
|
}, [w]);
|
|
689
|
-
const Ae = o(i(se ? "editTitle" : "title")), ye = J.length > 0, e = z.length > 0, s = le || G.length > 0, h =
|
|
698
|
+
const Ae = o(i(se ? "editTitle" : "title")), ye = J.length > 0, e = z.length > 0, s = le || G.length > 0, h = Fe(
|
|
690
699
|
() => J.map((t) => ({ value: t.id, label: t.label })),
|
|
691
700
|
[J]
|
|
692
701
|
), c = (t) => {
|
|
693
702
|
var v;
|
|
694
703
|
return (Y == null ? void 0 : Y(t)) ?? ((v = G.find((A) => A.id === t)) == null ? void 0 : v.name) ?? Z.get(t) ?? (t === (m == null ? void 0 : m.patientId) ? oe : void 0) ?? o("calendarWorkspace.details.patientNotLoaded");
|
|
695
704
|
}, f = (t) => t === (m == null ? void 0 : m.operatorId) && M ? M : o(i("operatorUnresolved"), { id: t }), R = [
|
|
696
|
-
{ value:
|
|
705
|
+
{ value: N, label: o(i("operatorNone")) },
|
|
697
706
|
...z.map((t) => ({ value: t.id, label: t.label })),
|
|
698
707
|
/* An operator the roster no longer lists is still a real link, so it
|
|
699
708
|
stays pickable and survives a Save. */
|
|
700
|
-
...l.operatorId !==
|
|
709
|
+
...l.operatorId !== N && !z.some((t) => t.id === l.operatorId) ? [
|
|
701
710
|
{
|
|
702
711
|
value: l.operatorId,
|
|
703
712
|
label: f(l.operatorId)
|
|
704
713
|
}
|
|
705
714
|
] : []
|
|
706
|
-
],
|
|
715
|
+
], It = L.some((t) => t.custom) && L.some((t) => !t.custom), bt = [
|
|
707
716
|
...L.map((t) => ({
|
|
708
717
|
value: t.id,
|
|
709
718
|
label: t.label,
|
|
710
|
-
group:
|
|
719
|
+
group: It ? o(i(t.custom ? "typeGroupCustom" : "typeGroupStandard")) : void 0
|
|
711
720
|
})),
|
|
712
721
|
/* An id the list no longer resolves is still a real link: offered as
|
|
713
722
|
its own option so Save re-sends it. */
|
|
@@ -717,75 +726,75 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
717
726
|
label: o(i("typeUnresolved"), { id: d.chosenTypeId })
|
|
718
727
|
}
|
|
719
728
|
] : []
|
|
720
|
-
],
|
|
721
|
-
{ value:
|
|
729
|
+
], wt = [
|
|
730
|
+
{ value: N, label: o(i("assigneeNone")) },
|
|
722
731
|
...ne.map((t) => ({ value: t.id, label: t.label })),
|
|
723
|
-
...l.assigneeId !==
|
|
732
|
+
...l.assigneeId !== N && !ne.some((t) => t.id === l.assigneeId) ? [
|
|
724
733
|
{
|
|
725
734
|
value: l.assigneeId,
|
|
726
735
|
label: o(i("assigneeUnresolved"), { id: l.assigneeId })
|
|
727
736
|
}
|
|
728
737
|
] : []
|
|
729
|
-
],
|
|
738
|
+
], _ = l.about === "company" && l.companyId && !J.some((t) => t.id === l.companyId) ? l.companyId : void 0, Et = _ && _ === (m == null ? void 0 : m.companyId) && re ? re : o(i("companyUnresolved"), { id: _ }), et = /* @__PURE__ */ b(C, { variant: "info", announce: "off", icon: /* @__PURE__ */ n(en, { "aria-hidden": "true" }), children: [
|
|
730
739
|
/* @__PURE__ */ n(C.Title, { as: "p", children: o("calendarWorkspace.details.readOnlyTitle") }),
|
|
731
740
|
/* @__PURE__ */ n(C.Description, { children: o(i("readOnlyBody")) })
|
|
732
|
-
] }),
|
|
733
|
-
d.isBusy() ||
|
|
734
|
-
},
|
|
741
|
+
] }), Ve = a.saving || a.deleting, tt = () => {
|
|
742
|
+
d.isBusy() || T();
|
|
743
|
+
}, kt = /* @__PURE__ */ n(
|
|
735
744
|
ze,
|
|
736
745
|
{
|
|
737
746
|
size: "sm",
|
|
738
747
|
intent: "outline",
|
|
739
|
-
icon: /* @__PURE__ */ n(
|
|
748
|
+
icon: /* @__PURE__ */ n(tn, { "aria-hidden": "true" }),
|
|
740
749
|
"aria-label": o(i("cancel")),
|
|
741
750
|
tooltip: o(i("cancel")),
|
|
742
751
|
"data-action": "cancel-task",
|
|
743
|
-
disabled:
|
|
744
|
-
onClick:
|
|
752
|
+
disabled: Ve,
|
|
753
|
+
onClick: tt
|
|
745
754
|
}
|
|
746
|
-
),
|
|
755
|
+
), _e = a.saving || a.accepted, nt = (t) => /* @__PURE__ */ b(be, { children: [
|
|
747
756
|
t && d.showDelete ? /* @__PURE__ */ n(
|
|
748
757
|
ze,
|
|
749
758
|
{
|
|
750
759
|
ref: ve,
|
|
751
760
|
size: "sm",
|
|
752
761
|
intent: "destructiveOutline",
|
|
753
|
-
icon: /* @__PURE__ */ n(
|
|
762
|
+
icon: /* @__PURE__ */ n(ut, { "aria-hidden": "true" }),
|
|
754
763
|
"aria-label": o(i("delete")),
|
|
755
764
|
tooltip: o(i("delete")),
|
|
756
765
|
"data-action": "delete-task",
|
|
757
|
-
disabled:
|
|
766
|
+
disabled: Ve || a.accepted,
|
|
758
767
|
onClick: () => d.patchUi({ confirmDeleteOpen: !0, deleteError: void 0 })
|
|
759
768
|
}
|
|
760
769
|
) : null,
|
|
761
770
|
/* @__PURE__ */ b(
|
|
762
|
-
|
|
771
|
+
jt,
|
|
763
772
|
{
|
|
764
773
|
role: "toolbar",
|
|
765
774
|
"aria-label": o(i("actionsLabel")),
|
|
766
775
|
className: "ds:ms-auto",
|
|
767
776
|
children: [
|
|
768
|
-
|
|
777
|
+
kt,
|
|
769
778
|
t && d.showSave ? /* @__PURE__ */ n(
|
|
770
779
|
ze,
|
|
771
780
|
{
|
|
772
781
|
size: "sm",
|
|
773
782
|
intent: "primary",
|
|
774
783
|
icon: a.saving ? /* @__PURE__ */ n(
|
|
775
|
-
|
|
784
|
+
dn,
|
|
776
785
|
{
|
|
777
786
|
"aria-hidden": "true",
|
|
778
787
|
className: "ds:animate-spin ds:motion-reduce:animate-none"
|
|
779
788
|
}
|
|
780
|
-
) : /* @__PURE__ */ n(
|
|
789
|
+
) : /* @__PURE__ */ n(ln, { "aria-hidden": "true" }),
|
|
781
790
|
"aria-label": o(i("save")),
|
|
782
791
|
tooltip: o(i("save")),
|
|
783
|
-
disabled: !
|
|
784
|
-
"aria-disabled":
|
|
792
|
+
disabled: !_e && !d.canSave,
|
|
793
|
+
"aria-disabled": _e || void 0,
|
|
785
794
|
"aria-busy": a.saving || void 0,
|
|
786
795
|
"data-action": "save-task",
|
|
787
796
|
onClick: () => {
|
|
788
|
-
|
|
797
|
+
_e || d.submit();
|
|
789
798
|
}
|
|
790
799
|
}
|
|
791
800
|
) : null
|
|
@@ -796,7 +805,7 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
796
805
|
/* Out of flow, so it never moves the footer's two ends. */
|
|
797
806
|
/* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: a.saving ? o(i("saving")) : "" })
|
|
798
807
|
) : null
|
|
799
|
-
] }),
|
|
808
|
+
] }), St = /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
800
809
|
/* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: o("common.loading") }),
|
|
801
810
|
/* @__PURE__ */ b(
|
|
802
811
|
"div",
|
|
@@ -830,20 +839,20 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
830
839
|
]
|
|
831
840
|
}
|
|
832
841
|
)
|
|
833
|
-
] }),
|
|
842
|
+
] }), Dt = /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
834
843
|
/* @__PURE__ */ n(C, { variant: "error", children: /* @__PURE__ */ n(C.Description, { children: d.loadError }) }),
|
|
835
844
|
/* @__PURE__ */ n(
|
|
836
845
|
Le,
|
|
837
846
|
{
|
|
838
|
-
ref:
|
|
847
|
+
ref: Te,
|
|
839
848
|
intent: "outline",
|
|
840
849
|
"data-action": "retry-load",
|
|
841
850
|
onClick: Re(d.retry),
|
|
842
851
|
children: o("emptyState.error.cta")
|
|
843
852
|
}
|
|
844
853
|
)
|
|
845
|
-
] }),
|
|
846
|
-
|
|
854
|
+
] }), Ct = /* @__PURE__ */ n("div", { className: vt({ layout: "notice" }), children: /* @__PURE__ */ n("fieldset", { disabled: !0, className: gt({ layout: "notice" }), children: et }) }), Nt = () => l.about !== "patient" ? null : I ? /* @__PURE__ */ n(B, { label: o(i("aboutPatient")), children: /* @__PURE__ */ n(Ue, { value: sn(), disabled: !0, readOnly: !0 }) }) : s ? /* @__PURE__ */ n(B, { label: o(i("aboutPatient")), children: /* @__PURE__ */ n(
|
|
855
|
+
Xt,
|
|
847
856
|
{
|
|
848
857
|
value: l.patientId,
|
|
849
858
|
onValueChange: (t) => d.patchFields({ patientId: t }),
|
|
@@ -853,17 +862,17 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
853
862
|
placeholder: o("calendarWorkspace.editor.patientSearch"),
|
|
854
863
|
disabled: Q
|
|
855
864
|
}
|
|
856
|
-
) }) : l.patientId ? /* @__PURE__ */ n(B, { label: o(i("aboutPatient")), children: /* @__PURE__ */ n(
|
|
857
|
-
Q ?
|
|
865
|
+
) }) : l.patientId ? /* @__PURE__ */ n(B, { label: o(i("aboutPatient")), children: /* @__PURE__ */ n(Ue, { value: c(l.patientId), disabled: !0, readOnly: !0 }) }) : null, Tt = /* @__PURE__ */ b("fieldset", { disabled: Q, className: gt(), children: [
|
|
866
|
+
Q ? et : null,
|
|
858
867
|
/* @__PURE__ */ n(B, { label: o(i("date")), children: /* @__PURE__ */ n(
|
|
859
|
-
|
|
868
|
+
xt,
|
|
860
869
|
{
|
|
861
870
|
value: l.date,
|
|
862
871
|
onChange: (t) => d.patchFields({ date: t })
|
|
863
872
|
}
|
|
864
873
|
) }),
|
|
865
874
|
/* @__PURE__ */ n(B, { label: o(i("time")), children: /* @__PURE__ */ n(
|
|
866
|
-
|
|
875
|
+
Kt,
|
|
867
876
|
{
|
|
868
877
|
value: l.time,
|
|
869
878
|
onChange: (t) => d.patchFields({ time: t })
|
|
@@ -876,7 +885,7 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
876
885
|
required: !0,
|
|
877
886
|
error: a.showError && l.note.trim() === "" ? o(i("noteRequired")) : void 0,
|
|
878
887
|
children: /* @__PURE__ */ n(
|
|
879
|
-
|
|
888
|
+
Wt,
|
|
880
889
|
{
|
|
881
890
|
value: l.note,
|
|
882
891
|
onChange: (t) => {
|
|
@@ -891,7 +900,7 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
891
900
|
L.length > 0 ? /* @__PURE__ */ n(B, { label: o(i("type")), required: !0, children: /* @__PURE__ */ n(
|
|
892
901
|
Ge,
|
|
893
902
|
{
|
|
894
|
-
options:
|
|
903
|
+
options: bt,
|
|
895
904
|
value: d.chosenTypeId,
|
|
896
905
|
onValueChange: (t) => t && d.patchFields({ typeId: t })
|
|
897
906
|
}
|
|
@@ -899,75 +908,75 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
899
908
|
ne.length > 0 ? /* @__PURE__ */ n(B, { label: o(i("assignee")), children: /* @__PURE__ */ n(
|
|
900
909
|
Ge,
|
|
901
910
|
{
|
|
902
|
-
options:
|
|
911
|
+
options: wt,
|
|
903
912
|
value: l.assigneeId,
|
|
904
913
|
onValueChange: (t) => t && d.patchFields({ assigneeId: t })
|
|
905
914
|
}
|
|
906
915
|
) }) : null,
|
|
907
916
|
/* @__PURE__ */ b(
|
|
908
|
-
|
|
917
|
+
qt,
|
|
909
918
|
{
|
|
910
919
|
label: o(i("about")),
|
|
911
920
|
variant: "segmented",
|
|
912
|
-
className:
|
|
921
|
+
className: Ht,
|
|
913
922
|
value: l.about,
|
|
914
923
|
onValueChange: (t) => d.patchFields({ about: t }),
|
|
915
924
|
children: [
|
|
916
925
|
/* @__PURE__ */ n(
|
|
917
|
-
|
|
926
|
+
Oe,
|
|
918
927
|
{
|
|
919
928
|
value: "nobody",
|
|
920
929
|
label: o(i("aboutNobody")),
|
|
921
|
-
icon: /* @__PURE__ */ n(
|
|
930
|
+
icon: /* @__PURE__ */ n(nn, { "aria-hidden": "true" })
|
|
922
931
|
}
|
|
923
932
|
),
|
|
924
933
|
s || l.about === "patient" || m != null && m.patientId ? /* @__PURE__ */ n(
|
|
925
|
-
|
|
934
|
+
Oe,
|
|
926
935
|
{
|
|
927
936
|
value: "patient",
|
|
928
937
|
label: o(i("aboutPatient")),
|
|
929
|
-
icon: /* @__PURE__ */ n(
|
|
938
|
+
icon: /* @__PURE__ */ n(on, { "aria-hidden": "true" })
|
|
930
939
|
}
|
|
931
940
|
) : null,
|
|
932
941
|
ye || l.about === "company" || m != null && m.companyId ? /* @__PURE__ */ n(
|
|
933
|
-
|
|
942
|
+
Oe,
|
|
934
943
|
{
|
|
935
944
|
value: "company",
|
|
936
945
|
label: o(i("aboutCompany")),
|
|
937
|
-
icon: /* @__PURE__ */ n(
|
|
946
|
+
icon: /* @__PURE__ */ n(rn, { "aria-hidden": "true" })
|
|
938
947
|
}
|
|
939
948
|
) : null,
|
|
940
949
|
e || l.about === "operator" || m != null && m.operatorId ? /* @__PURE__ */ n(
|
|
941
|
-
|
|
950
|
+
Oe,
|
|
942
951
|
{
|
|
943
952
|
value: "operator",
|
|
944
953
|
label: o(i("aboutOperator")),
|
|
945
|
-
icon: /* @__PURE__ */ n(
|
|
954
|
+
icon: /* @__PURE__ */ n(an, { "aria-hidden": "true" })
|
|
946
955
|
}
|
|
947
956
|
) : null
|
|
948
957
|
]
|
|
949
958
|
}
|
|
950
959
|
),
|
|
951
|
-
|
|
960
|
+
Nt(),
|
|
952
961
|
l.about === "company" ? /* @__PURE__ */ b(be, { children: [
|
|
953
|
-
|
|
962
|
+
_ ? /* @__PURE__ */ n(B, { label: o(i("companyName")), children: /* @__PURE__ */ n(Ue, { value: Et, disabled: !0, readOnly: !0 }) }) : null,
|
|
954
963
|
ye ? /* @__PURE__ */ n(
|
|
955
964
|
B,
|
|
956
965
|
{
|
|
957
966
|
label: o(
|
|
958
|
-
i(
|
|
967
|
+
i(_ ? "companyReplace" : "companyName")
|
|
959
968
|
),
|
|
960
969
|
children: /* @__PURE__ */ n(
|
|
961
|
-
|
|
970
|
+
Pt,
|
|
962
971
|
{
|
|
963
972
|
options: h,
|
|
964
|
-
value:
|
|
965
|
-
onValueChange: (t) =>
|
|
966
|
-
clearable: !
|
|
967
|
-
filter:
|
|
973
|
+
value: _ ? "" : l.companyId,
|
|
974
|
+
onValueChange: (t) => _ ? t && d.patchFields({ companyId: t }) : d.patchFields({ companyId: t }),
|
|
975
|
+
clearable: !_ && !Q,
|
|
976
|
+
filter: hn,
|
|
968
977
|
placeholder: o(i("companySearch")),
|
|
969
978
|
"aria-label": o(
|
|
970
|
-
i(
|
|
979
|
+
i(_ ? "companyReplace" : "companyName")
|
|
971
980
|
)
|
|
972
981
|
}
|
|
973
982
|
)
|
|
@@ -981,10 +990,10 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
981
990
|
value: l.operatorId,
|
|
982
991
|
onValueChange: (t) => t && d.patchFields({ operatorId: t })
|
|
983
992
|
}
|
|
984
|
-
) }) : l.operatorId !==
|
|
993
|
+
) }) : l.operatorId !== N ? (
|
|
985
994
|
/* No roster to pick from: name the link read-only. */
|
|
986
995
|
/* @__PURE__ */ n(B, { label: o(i("operator")), children: /* @__PURE__ */ n(
|
|
987
|
-
|
|
996
|
+
Ue,
|
|
988
997
|
{
|
|
989
998
|
value: f(l.operatorId),
|
|
990
999
|
disabled: !0,
|
|
@@ -994,11 +1003,11 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
994
1003
|
) : null : null,
|
|
995
1004
|
d.showDone ? /* @__PURE__ */ b(be, { children: [
|
|
996
1005
|
/* @__PURE__ */ n(
|
|
997
|
-
|
|
1006
|
+
_t,
|
|
998
1007
|
{
|
|
999
1008
|
label: o(i("done")),
|
|
1000
1009
|
checked: a.done,
|
|
1001
|
-
disabled:
|
|
1010
|
+
disabled: Ve || a.accepted,
|
|
1002
1011
|
"aria-disabled": a.donePending || void 0,
|
|
1003
1012
|
"aria-busy": a.donePending || void 0,
|
|
1004
1013
|
className: "ds:aria-disabled:cursor-progress",
|
|
@@ -1032,12 +1041,12 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
1032
1041
|
children: /* @__PURE__ */ n(C.Description, { children: a.deleteError })
|
|
1033
1042
|
}
|
|
1034
1043
|
) : null
|
|
1035
|
-
] }), ot = w === "loading" ?
|
|
1036
|
-
|
|
1044
|
+
] }), ot = /* @__PURE__ */ n("div", { className: vt(), children: Tt }), rt = w === "loading" ? St : w === "error" ? Dt : w === "locked" ? Ct : w === "withheld" ? /* @__PURE__ */ n(
|
|
1045
|
+
Jt,
|
|
1037
1046
|
{
|
|
1038
1047
|
onTurnOff: p ? Re(p) : void 0
|
|
1039
1048
|
}
|
|
1040
|
-
) :
|
|
1049
|
+
) : V ? ot : /* @__PURE__ */ n(Vt, { orientation: "vertical", className: "ds:min-h-0 ds:flex-1", children: ot }), We = w === "ready" ? nt(!0) : w === "locked" || w === "withheld" ? nt(!1) : null, Rt = w === "ready" && d.showDelete, at = se ? /* @__PURE__ */ n(
|
|
1041
1050
|
X,
|
|
1042
1051
|
{
|
|
1043
1052
|
scope: "container",
|
|
@@ -1075,7 +1084,7 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
1075
1084
|
Le,
|
|
1076
1085
|
{
|
|
1077
1086
|
intent: "destructive",
|
|
1078
|
-
startIcon: /* @__PURE__ */ n(
|
|
1087
|
+
startIcon: /* @__PURE__ */ n(ut, { "aria-hidden": "true" }),
|
|
1079
1088
|
"aria-disabled": a.deleting || void 0,
|
|
1080
1089
|
"aria-busy": a.deleting || void 0,
|
|
1081
1090
|
onClick: () => {
|
|
@@ -1089,65 +1098,65 @@ const ft = gt("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
1089
1098
|
}
|
|
1090
1099
|
)
|
|
1091
1100
|
}
|
|
1092
|
-
) : null,
|
|
1101
|
+
) : null, it = {
|
|
1093
1102
|
"data-component": "task-editor",
|
|
1094
1103
|
"data-component-id": ie,
|
|
1095
1104
|
"data-variant": $,
|
|
1096
1105
|
"data-status": w
|
|
1097
1106
|
};
|
|
1098
|
-
return
|
|
1107
|
+
return V ? /* @__PURE__ */ b(be, { children: [
|
|
1099
1108
|
/* @__PURE__ */ n(
|
|
1100
|
-
|
|
1109
|
+
Mt,
|
|
1101
1110
|
{
|
|
1102
|
-
...
|
|
1111
|
+
...U,
|
|
1103
1112
|
"data-component-id": ie,
|
|
1104
1113
|
"data-variant": $,
|
|
1105
1114
|
"data-status": w,
|
|
1106
1115
|
ref: ce,
|
|
1107
1116
|
open: x,
|
|
1108
|
-
onBack:
|
|
1117
|
+
onBack: tt,
|
|
1109
1118
|
onExited: xe,
|
|
1110
1119
|
title: Ae,
|
|
1111
|
-
icon: /* @__PURE__ */ n(
|
|
1120
|
+
icon: /* @__PURE__ */ n(pt, { "aria-hidden": "true" }),
|
|
1112
1121
|
backLabel: pe ?? o(i("back")),
|
|
1113
1122
|
footer: We,
|
|
1114
|
-
footerAlign:
|
|
1123
|
+
footerAlign: Rt ? "between" : "end",
|
|
1115
1124
|
className: ae,
|
|
1116
|
-
children: /* @__PURE__ */ n("div", { ...
|
|
1125
|
+
children: /* @__PURE__ */ n("div", { ...it, className: ht({ variant: $ }), children: rt })
|
|
1117
1126
|
}
|
|
1118
1127
|
),
|
|
1119
|
-
|
|
1128
|
+
at
|
|
1120
1129
|
] }) : /* @__PURE__ */ b(be, { children: [
|
|
1121
1130
|
/* @__PURE__ */ b(
|
|
1122
1131
|
"div",
|
|
1123
1132
|
{
|
|
1124
1133
|
tabIndex: -1,
|
|
1125
|
-
...
|
|
1126
|
-
...
|
|
1134
|
+
...U,
|
|
1135
|
+
...it,
|
|
1127
1136
|
ref: ce,
|
|
1128
|
-
className:
|
|
1137
|
+
className: ht({ variant: $, className: ae }),
|
|
1129
1138
|
children: [
|
|
1130
1139
|
/* @__PURE__ */ n(
|
|
1131
|
-
|
|
1140
|
+
$t,
|
|
1132
1141
|
{
|
|
1133
1142
|
title: Ae,
|
|
1134
|
-
icon: /* @__PURE__ */ n(
|
|
1143
|
+
icon: /* @__PURE__ */ n(pt, { "aria-hidden": "true" }),
|
|
1135
1144
|
sticky: !0,
|
|
1136
1145
|
divider: !0
|
|
1137
1146
|
}
|
|
1138
1147
|
),
|
|
1139
|
-
|
|
1148
|
+
rt,
|
|
1140
1149
|
We ? /* @__PURE__ */ n("div", { className: "ds:relative ds:z-[var(--z-sticky)] ds:shrink-0 ds:border-t ds:border-[color:var(--border)] ds:bg-[var(--background)]", children: /* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: We }) }) : null
|
|
1141
1150
|
]
|
|
1142
1151
|
}
|
|
1143
1152
|
),
|
|
1144
|
-
|
|
1153
|
+
at
|
|
1145
1154
|
] });
|
|
1146
1155
|
}
|
|
1147
1156
|
);
|
|
1148
|
-
|
|
1157
|
+
gn.displayName = "TaskEditor";
|
|
1149
1158
|
export {
|
|
1150
|
-
|
|
1151
|
-
|
|
1159
|
+
gn as T,
|
|
1160
|
+
cn as t
|
|
1152
1161
|
};
|
|
1153
|
-
//# sourceMappingURL=task-editor-
|
|
1162
|
+
//# sourceMappingURL=task-editor-CIHQQRtP.js.map
|