@alfadocs/ui-kit 1.104.0 → 1.106.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-credits-exhausted-notice-CwZnSACy.js → ai-credits-exhausted-notice-Lws3113e.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-VNh3W57L.js → ai-permission-notice-BkgcGmu8.js} +2 -2
- package/dist/_chunks/{alert-9kEwDza3.js → alert-C4WKViaS.js} +59 -50
- package/dist/_chunks/{anamnesis-summary-rows-B9HqOGd7.js → anamnesis-summary-rows-QhbDdY7b.js} +4 -4
- package/dist/_chunks/{audio-recorder-BOm2FgEu.js → audio-recorder-BlDozxdU.js} +2 -2
- package/dist/_chunks/{auth-form-parts-B3GWChvG.js → auth-form-parts-DVHfqnp6.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DGFm2jfP.js → balance-badge-cell-wJ6cTD_h.js} +3 -3
- package/dist/_chunks/{calendar-appointment-editor-dialog-DqyATSh3.js → calendar-appointment-editor-dialog-D8DblVjW.js} +8 -8
- package/dist/_chunks/{care-plan-card-YWKV8Kjq.js → care-plan-card-DMjlYlFc.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-CApivtMW.js → care-plan-entry-card-3hguBW45.js} +2 -2
- package/dist/_chunks/{contact-profile-card-uExd3pKC.js → contact-profile-card-CAL66GaH.js} +120 -111
- package/dist/_chunks/{data-table-C5uN4ato.js → data-table-zXBxFYpJ.js} +761 -715
- package/dist/_chunks/{date-range-picker-B_j4VQlV.js → date-range-picker-DCADIR8o.js} +2 -2
- package/dist/_chunks/{date-time-picker-cwsWiB4q.js → date-time-picker-CT2bC7-A.js} +2 -2
- package/dist/_chunks/{document-preview-U8H6tnDJ.js → document-preview-BalyZqnn.js} +2 -2
- package/dist/_chunks/{document-scanner-Bf3VUp00.js → document-scanner-5p-Uu8dy.js} +2 -2
- package/dist/_chunks/{entity-summary-BKfR4Vws.js → entity-summary-BbqqYqF1.js} +2 -2
- package/dist/_chunks/{error-summary-mGxIyDAY.js → error-summary-DxNhwf_G.js} +2 -2
- package/dist/_chunks/{face-scheme-DdVLQ5dP.js → face-scheme-e2M2HJGz.js} +2 -2
- package/dist/_chunks/{file-manager-CnGBVX_q.js → file-manager-BDKe59sg.js} +2 -2
- package/dist/_chunks/{forgot-password-form-CeTb5p-x.js → forgot-password-form-vfCO2-Tt.js} +4 -4
- package/dist/_chunks/{freemium-paywall-CM0zQSDE.js → freemium-paywall-BDeq9QWR.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CXcDKQqC.js → gestational-age-calculator-AnaH00nk.js} +2 -2
- package/dist/_chunks/{hcg-doubling-BJFR3onB.js → hcg-doubling-DdyUt4gz.js} +2 -2
- package/dist/_chunks/{heatmap-Cz0Krieg.js → heatmap-D4qqpCEj.js} +1550 -1547
- package/dist/_chunks/{help-me-write-templates-ra5a__Yy.js → help-me-write-templates-YmceSxf5.js} +3 -3
- package/dist/_chunks/info-tip-C-MPkShR.js +266 -0
- package/dist/_chunks/{kit-extensions-C4o_tFN4.js → kit-extensions-BOnTM4Yf.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-BRek9kz7.js → link-cell-renderer-C8vfCOEp.js} +2 -2
- package/dist/_chunks/{login-dev-card-D5BV5j1i.js → login-dev-card-Cz1Clugq.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-BsctSegT.js → marketplace-app-shell-C-4QF6mp.js} +2 -2
- package/dist/_chunks/{notes-panel-BjTpaz8d.js → notes-panel-SlzUL8in.js} +4 -4
- package/dist/_chunks/{notice-group-DkYzKyAZ.js → notice-group-B-trhof8.js} +3 -3
- package/dist/_chunks/{patient-details-BXM3dRKb.js → patient-details-wMgTFtpp.js} +2 -2
- package/dist/_chunks/{patient-field-row--dCDO5oB.js → patient-field-row-Bhm2Ig1P.js} +2 -2
- package/dist/_chunks/{patient-summary-card-DB7fv-Tr.js → patient-summary-card-DMdPPG3n.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-BPF0c-5D.js → payment-automation-upsell-u5EuFyCY.js} +2 -2
- package/dist/_chunks/{payment-form-PBuh8PIa.js → payment-form-C-s1x-bU.js} +2 -2
- package/dist/_chunks/{pdf-viewer-DlceXkfW.js → pdf-viewer-BnBKdx0y.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-BAvGdQmt.js → practice-profile-hero-Bb4YyxHA.js} +31 -29
- package/dist/_chunks/{practice-results-ChBP9x2r.js → practice-results-BXz01sti.js} +485 -445
- package/dist/_chunks/{pregnancy-dating-D0Kf9s7s.js → pregnancy-dating-D6dLkMpl.js} +2 -2
- package/dist/_chunks/{progress-notice-DiHWZ8Ms.js → progress-notice-F7ao70ZP.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BQ95uFCd.js → radiograph-panel.agent-0ngF2sGS.js} +2 -2
- package/dist/_chunks/{registration-form-JzzTomhd.js → registration-form-CEJRUS9G.js} +3 -3
- package/dist/_chunks/{reserved.agent-BxD0gnbt.js → reserved.agent-C-C9cvO5.js} +2 -2
- package/dist/_chunks/{reset-password-form-DDdGEoIL.js → reset-password-form-B0acanDD.js} +4 -4
- package/dist/_chunks/{reviews-panel-jPYgYvxG.js → reviews-panel-CtrwZOUS.js} +215 -205
- package/dist/_chunks/{rich-text-editor-F04przIt.js → rich-text-editor-C3nANKZt.js} +2 -2
- package/dist/_chunks/{send-registration-link-form-DHCQpA4C.js → send-registration-link-form-Nn0jf65G.js} +3 -3
- package/dist/_chunks/{sign-document-B5qZhthO.js → sign-document-CQZVzfpk.js} +2 -2
- package/dist/_chunks/{signature-request-DB6kePIm.js → signature-request-DtLph5Z4.js} +3 -3
- package/dist/_chunks/{switch-D--x7n6h.js → switch-DO6uC4HJ.js} +40 -36
- package/dist/_chunks/{task-editor-BiPGFXtB.js → task-editor-CmXcj6cC.js} +4 -4
- package/dist/_chunks/{tasks-panel-iVeuu9a8.js → tasks-panel-CFo5uIHx.js} +3 -3
- package/dist/_chunks/{theme-toggle-jZRbAidE.js → theme-toggle-Czq3K9jB.js} +2 -2
- package/dist/_chunks/{time-picker-DSt-ns5F.js → time-picker-DDr5vhwQ.js} +344 -332
- package/dist/_chunks/{tooth-scheme-Bd7xECuj.js → tooth-scheme-C-ALCHaV.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-CmqGGYCy.js → use-appointment-details-read-VI26Z-pc.js} +3 -3
- package/dist/_chunks/{voice-control-panel-BGJjUwnY.js → voice-control-panel-B0TUZAiP.js} +3 -3
- package/dist/_chunks/{warning-stack-3S7e2q07.js → warning-stack-Dx7cpj10.js} +2 -2
- package/dist/_chunks/week-availability-CsTiwtYj.js +318 -0
- package/dist/_chunks/weekly-hours-editor-BsVsgeOc.js +252 -0
- package/dist/_chunks/{workflow-map-B1jf6QaB.js → workflow-map-DWk-rZse.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-B_52rH7O.js → workflow-webhook-action-DILFqAVd.js} +2 -2
- package/dist/ag-grid.css +5 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/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/contact-profile-card/contact-profile-card.d.ts +8 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts +6 -0
- package/dist/components/data-table/header-min-width.d.ts +21 -0
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-summary/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/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/heatmap/heatmap.d.ts +5 -0
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/info-tip/info-tip.d.ts +10 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notice-group/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-table/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +7 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +13 -0
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/progress-notice/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts +13 -0
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/week-availability/index.d.ts +3 -0
- package/dist/components/week-availability/index.js +10 -0
- package/dist/components/week-availability/week-availability.d.ts +68 -0
- package/dist/components/weekly-hours-editor/index.d.ts +3 -0
- package/dist/components/weekly-hours-editor/index.js +9 -0
- package/dist/components/weekly-hours-editor/weekly-hours-editor.d.ts +42 -0
- package/dist/components/workflow/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/i18n/locales/ar.d.ts +34 -0
- package/dist/i18n/locales/ar.js +34 -0
- package/dist/i18n/locales/de.d.ts +34 -0
- package/dist/i18n/locales/de.js +34 -0
- package/dist/i18n/locales/el.d.ts +34 -0
- package/dist/i18n/locales/el.js +34 -0
- package/dist/i18n/locales/en.d.ts +34 -0
- package/dist/i18n/locales/en.js +34 -0
- package/dist/i18n/locales/es.d.ts +34 -0
- package/dist/i18n/locales/es.js +34 -0
- package/dist/i18n/locales/fr.d.ts +34 -0
- package/dist/i18n/locales/fr.js +34 -0
- package/dist/i18n/locales/hi.d.ts +34 -0
- package/dist/i18n/locales/hi.js +34 -0
- package/dist/i18n/locales/it.d.ts +34 -0
- package/dist/i18n/locales/it.js +34 -0
- package/dist/i18n/locales/ja.d.ts +34 -0
- package/dist/i18n/locales/ja.js +34 -0
- package/dist/i18n/locales/nl.d.ts +34 -0
- package/dist/i18n/locales/nl.js +34 -0
- package/dist/i18n/locales/pl.d.ts +34 -0
- package/dist/i18n/locales/pl.js +34 -0
- package/dist/i18n/locales/pt.d.ts +34 -0
- package/dist/i18n/locales/pt.js +34 -0
- package/dist/i18n/locales/ro.d.ts +34 -0
- package/dist/i18n/locales/ro.js +34 -0
- package/dist/i18n/locales/ru.d.ts +34 -0
- package/dist/i18n/locales/ru.js +34 -0
- package/dist/i18n/locales/sq.d.ts +34 -0
- package/dist/i18n/locales/sq.js +34 -0
- package/dist/i18n/locales/sv.d.ts +34 -0
- package/dist/i18n/locales/sv.js +34 -0
- package/dist/i18n/locales/tr.d.ts +34 -0
- package/dist/i18n/locales/tr.js +34 -0
- package/dist/i18n/locales/zh.d.ts +34 -0
- package/dist/i18n/locales/zh.js +34 -0
- package/dist/index.js +879 -866
- package/dist/locales/ar.json +34 -0
- package/dist/locales/de.json +34 -0
- package/dist/locales/el.json +34 -0
- package/dist/locales/en.json +34 -0
- package/dist/locales/es.json +34 -0
- package/dist/locales/fr.json +34 -0
- package/dist/locales/hi.json +34 -0
- package/dist/locales/it.json +34 -0
- package/dist/locales/ja.json +34 -0
- package/dist/locales/nl.json +34 -0
- package/dist/locales/pl.json +34 -0
- package/dist/locales/pt.json +34 -0
- package/dist/locales/ro.json +34 -0
- package/dist/locales/ru.json +34 -0
- package/dist/locales/sq.json +34 -0
- package/dist/locales/sv.json +34 -0
- package/dist/locales/tr.json +34 -0
- package/dist/locales/zh.json +34 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +2 -2
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/reset-password-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +3 -1
- package/package.json +9 -1
- package/dist/_chunks/info-tip-1Xsq9GLi.js +0 -230
|
@@ -7,7 +7,7 @@ import { useTranslation as oo } from "react-i18next";
|
|
|
7
7
|
import { u as Go } from "./registry-DvAUVLHh.js";
|
|
8
8
|
import { I as Qo } from "./icon-button-S8_weU3g.js";
|
|
9
9
|
import { D as H } from "./dropdown-menu-CqxBthww.js";
|
|
10
|
-
import { S as Zo } from "./switch-
|
|
10
|
+
import { S as Zo } from "./switch-DO6uC4HJ.js";
|
|
11
11
|
import { o as Ut, K as Xo, a0 as Jo, J as Ue, R as Ye, u as no, U as io, G as en, S as tn, w as Be, X as F, f as le, $ as at, _ as Yt, E as ut, a1 as de, H as zt, z as lt, y as on, l as st, A as ro, L as nn, t as ht, W as ct, s as ao, Y as so, x as rn, V as an, a2 as sn, a3 as $, a4 as U, a5 as cn, Z as dn, C as co, Q as ln, a6 as hn, k as Vt, T as un, O as pn, q as fn, N as mn } from "./tooth-data-DR8Kdnup.js";
|
|
12
12
|
import { S as gn } from "./settings-d25ju_6L.js";
|
|
13
13
|
import { R as vn } from "./rotate-ccw-BBQnIVTr.js";
|
|
@@ -1993,4 +1993,4 @@ export {
|
|
|
1993
1993
|
On as r,
|
|
1994
1994
|
_n as t
|
|
1995
1995
|
};
|
|
1996
|
-
//# sourceMappingURL=tooth-scheme-
|
|
1996
|
+
//# sourceMappingURL=tooth-scheme-C-ALCHaV.js.map
|
|
@@ -7,7 +7,7 @@ import { u as te } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
|
7
7
|
import { c as Zt } from "./compose-refs-C0k0tdqF.js";
|
|
8
8
|
import { h as Ue, g as Qe } from "./handled-rejection-6gqCf5vt.js";
|
|
9
9
|
import { a as en, b as xt } from "./privacy-mask-DbEKI-Jv.js";
|
|
10
|
-
import { A as F } from "./alert-
|
|
10
|
+
import { A as F } from "./alert-C4WKViaS.js";
|
|
11
11
|
import { B as O } from "./button-DohK_Ak_.js";
|
|
12
12
|
import { I as Lt } from "./icon-button-S8_weU3g.js";
|
|
13
13
|
import { B as tn } from "./button-group-CUnNnt8a.js";
|
|
@@ -16,7 +16,7 @@ import { E as zt } from "./editable-description-KU56SP4P.js";
|
|
|
16
16
|
import { N as Xe } from "./note-timeline-BrjHBQfx.js";
|
|
17
17
|
import { P as Ot } from "./panel-header-CbtlTe85.js";
|
|
18
18
|
import { P as Ge } from "./panel-subview-DCyvn-49.js";
|
|
19
|
-
import { P as _t } from "./patient-summary-card-
|
|
19
|
+
import { P as _t } from "./patient-summary-card-DMdPPG3n.js";
|
|
20
20
|
import { S as ne } from "./section-card-D1sV4Voz.js";
|
|
21
21
|
import { C as nn, S as ue } from "./skeleton-tTWJpvAq.js";
|
|
22
22
|
import { T as an } from "./text-area-COMVJ1yE.js";
|
|
@@ -2195,4 +2195,4 @@ export {
|
|
|
2195
2195
|
Kn as s,
|
|
2196
2196
|
_s as u
|
|
2197
2197
|
};
|
|
2198
|
-
//# sourceMappingURL=use-appointment-details-read-
|
|
2198
|
+
//# sourceMappingURL=use-appointment-details-read-VI26Z-pc.js.map
|
|
@@ -3,8 +3,8 @@ import { forwardRef as on, useId as $e, useState as I, useRef as r, useMemo as j
|
|
|
3
3
|
import { c as K } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as sn, Trans as rn } from "react-i18next";
|
|
5
5
|
import { u as an, w as cn } from "./ai-credits-notice-BNFcQoXo.js";
|
|
6
|
-
import { A as ln, a as dn } from "./ai-credits-exhausted-notice-
|
|
7
|
-
import { A as un } from "./ai-permission-notice-
|
|
6
|
+
import { A as ln, a as dn } from "./ai-credits-exhausted-notice-Lws3113e.js";
|
|
7
|
+
import { A as un } from "./ai-permission-notice-BkgcGmu8.js";
|
|
8
8
|
import { A as fn } from "./ai-sparkle-D23NT8Z_.js";
|
|
9
9
|
import { B as pn } from "./badge-BUk4RjTS.js";
|
|
10
10
|
import { B as qe } from "./button-DohK_Ak_.js";
|
|
@@ -1145,4 +1145,4 @@ export {
|
|
|
1145
1145
|
no as V,
|
|
1146
1146
|
Gn as v
|
|
1147
1147
|
};
|
|
1148
|
-
//# sourceMappingURL=voice-control-panel-
|
|
1148
|
+
//# sourceMappingURL=voice-control-panel-B0TUZAiP.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as dn, useId as P, useState as y, useEffect as f, useMemo as
|
|
|
3
3
|
import { c as cn } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as ln } from "react-i18next";
|
|
5
5
|
import { u as un } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
6
|
-
import { A as C } from "./alert-
|
|
6
|
+
import { A as C } from "./alert-C4WKViaS.js";
|
|
7
7
|
import { B as fn } from "./button-DohK_Ak_.js";
|
|
8
8
|
import { I as mn } from "./icon-button-S8_weU3g.js";
|
|
9
9
|
import { X as gn } from "./x-B5YnXwCz.js";
|
|
@@ -270,4 +270,4 @@ Nn.displayName = "WarningStack";
|
|
|
270
270
|
export {
|
|
271
271
|
Nn as W
|
|
272
272
|
};
|
|
273
|
-
//# sourceMappingURL=warning-stack-
|
|
273
|
+
//# sourceMappingURL=warning-stack-Dx7cpj10.js.map
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as sa, useMemo as u } from "react";
|
|
3
|
+
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as ea } from "react-i18next";
|
|
5
|
+
import { f as ta } from "./intl-locale-FWh-Y5_3.js";
|
|
6
|
+
import { i as na } from "./is-development-CLUAnsU7.js";
|
|
7
|
+
import { E as ra } from "./empty-state-DwJ5YNzz.js";
|
|
8
|
+
const $ = 6, S = [1, 2, 3, 4, 5, 6, 7], y = (r, n, e) => Math.min(e, Math.max(n, r));
|
|
9
|
+
function I(r) {
|
|
10
|
+
const n = (r ?? []).filter((a) => Number.isFinite(a.from) && Number.isFinite(a.to)).map((a) => ({ from: y(a.from, 0, 1440), to: y(a.to, 0, 1440) })).filter((a) => a.to > a.from).sort((a, o) => a.from - o.from), e = [];
|
|
11
|
+
for (const a of n) {
|
|
12
|
+
const o = e[e.length - 1];
|
|
13
|
+
o && a.from <= o.to ? o.to = Math.max(o.to, a.to) : e.push({ ...a });
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
function oa(r) {
|
|
18
|
+
if (r.length === 0) return [8, 20];
|
|
19
|
+
let n = Math.floor(Math.min(...r.map((a) => a.from)) / 60), e = Math.ceil(Math.max(...r.map((a) => a.to)) / 60);
|
|
20
|
+
return e - n < 4 && (e = Math.min(24, n + 4), n = Math.max(0, e - 4)), [n, e];
|
|
21
|
+
}
|
|
22
|
+
function ia(r, n) {
|
|
23
|
+
const e = n[0] * 60, a = n[1] * 60, o = y(r.from, e, a), v = y(r.to, e, a);
|
|
24
|
+
return v <= o || a <= e ? null : {
|
|
25
|
+
start: (o - e) / (a - e) * 100,
|
|
26
|
+
size: (v - o) / (a - e) * 100
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function la(r, n, e) {
|
|
30
|
+
const a = [
|
|
31
|
+
...S.slice(n - 1),
|
|
32
|
+
...S.slice(0, n - 1)
|
|
33
|
+
];
|
|
34
|
+
return e ? a.filter(
|
|
35
|
+
(o) => r.some(
|
|
36
|
+
(v) => v.days.some((N) => N.weekday === o && I(N.spans).length)
|
|
37
|
+
)
|
|
38
|
+
) : a;
|
|
39
|
+
}
|
|
40
|
+
const K = [
|
|
41
|
+
"ds:bg-[var(--category-1)]",
|
|
42
|
+
"ds:bg-[var(--category-2)]",
|
|
43
|
+
"ds:bg-[var(--category-3)]",
|
|
44
|
+
"ds:bg-[var(--category-4)]",
|
|
45
|
+
"ds:bg-[var(--category-5)]",
|
|
46
|
+
"ds:bg-[var(--category-6)]"
|
|
47
|
+
], E = "ds:bg-[var(--muted-foreground)]", da = i(
|
|
48
|
+
"ds:@container ds:flex ds:w-full ds:min-w-0 ds:max-w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-[color:var(--foreground)]"
|
|
49
|
+
), ca = i(
|
|
50
|
+
"ds:m-0 ds:flex ds:list-none ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:p-0 type-meta ds:text-[color:var(--muted-foreground)]"
|
|
51
|
+
), ma = i(
|
|
52
|
+
"ds:inline-block ds:size-[var(--spacing-sm)] ds:shrink-0 ds:rounded-[var(--radius-sm)] ds:forced-colors:[forced-color-adjust:none]"
|
|
53
|
+
), pa = i(
|
|
54
|
+
[
|
|
55
|
+
"ds:grid ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-xs)] ds:@[640px]:gap-x-[var(--spacing-sm)]",
|
|
56
|
+
"ds:grid-cols-[repeat(var(--wa-days),minmax(0,1fr))]",
|
|
57
|
+
"ds:@[640px]:grid-cols-[calc(var(--spacing-xl)*4)_repeat(var(--wa-days),minmax(0,1fr))_auto]"
|
|
58
|
+
].join(" ")
|
|
59
|
+
), fa = i(
|
|
60
|
+
[
|
|
61
|
+
"ds:grid ds:gap-x-[var(--spacing-xs)] ds:@[640px]:gap-x-[var(--spacing-sm)]",
|
|
62
|
+
"ds:grid-cols-[repeat(var(--wa-days),minmax(0,1fr))]",
|
|
63
|
+
"ds:@[640px]:grid-cols-[calc(var(--spacing-xl)*4)_repeat(var(--wa-days),minmax(0,1fr))_auto]"
|
|
64
|
+
].join(" ")
|
|
65
|
+
), ua = i(
|
|
66
|
+
"ds:col-span-full ds:min-w-0 ds:text-start ds:font-semibold ds:break-words ds:@[640px]:col-span-1"
|
|
67
|
+
), ga = i(
|
|
68
|
+
"ds:col-span-full ds:flex ds:justify-end ds:gap-[var(--spacing-xs)] ds:@[640px]:col-span-1"
|
|
69
|
+
), va = i(
|
|
70
|
+
[
|
|
71
|
+
"ds:inline-flex ds:min-h-[var(--min-target-size)] ds:max-w-full ds:items-center ds:rounded-[var(--radius-sm)] ds:bg-transparent ds:p-0 ds:text-start ds:font-semibold ds:text-[color:var(--foreground)] ds:underline-offset-2 ds:hover:underline",
|
|
72
|
+
"ds:focus-visible:outline-2 ds:focus-visible:outline-offset-2 ds:focus-visible:outline-[var(--focus-ring)]",
|
|
73
|
+
"ds:forced-colors:focus-visible:outline-[Highlight]"
|
|
74
|
+
].join(" ")
|
|
75
|
+
), ha = i(
|
|
76
|
+
"ds:relative ds:block ds:h-[var(--spacing-md)] ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]"
|
|
77
|
+
), ya = i(
|
|
78
|
+
"ds:absolute ds:inset-y-0 ds:start-[var(--wa-start)] ds:w-[var(--wa-size)] ds:min-w-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:forced-colors:[forced-color-adjust:none]"
|
|
79
|
+
), xa = i(
|
|
80
|
+
"ds:hidden ds:justify-between ds:font-normal ds:text-[color:var(--muted-foreground)] ds:tabular-nums ds:@[640px]:flex"
|
|
81
|
+
), ba = i(
|
|
82
|
+
"ds:m-0 type-meta ds:text-[color:var(--muted-foreground)] ds:@[640px]:hidden"
|
|
83
|
+
);
|
|
84
|
+
function w(r, n) {
|
|
85
|
+
return r.format(new Date(Date.UTC(2024, 0, 1, 0, n)));
|
|
86
|
+
}
|
|
87
|
+
const wa = sa(function({
|
|
88
|
+
rows: n,
|
|
89
|
+
tones: e = [],
|
|
90
|
+
hourRange: a,
|
|
91
|
+
hideEmptyDays: o = !1,
|
|
92
|
+
weekStartsOn: v = 1,
|
|
93
|
+
legend: N = !0,
|
|
94
|
+
onRowSelect: C,
|
|
95
|
+
locale: O,
|
|
96
|
+
className: P,
|
|
97
|
+
..._
|
|
98
|
+
}, Y) {
|
|
99
|
+
const { t: m, i18n: F } = ea("ui"), c = ta(
|
|
100
|
+
O ?? F.resolvedLanguage ?? F.language
|
|
101
|
+
), k = u(
|
|
102
|
+
() => new Intl.DateTimeFormat(c, {
|
|
103
|
+
hour: "numeric",
|
|
104
|
+
minute: "2-digit",
|
|
105
|
+
timeZone: "UTC"
|
|
106
|
+
}),
|
|
107
|
+
[c]
|
|
108
|
+
), G = u(
|
|
109
|
+
() => new Intl.DateTimeFormat(c, { hour: "numeric", timeZone: "UTC" }),
|
|
110
|
+
[c]
|
|
111
|
+
), X = u(
|
|
112
|
+
() => new Intl.DateTimeFormat(c, { weekday: "short", timeZone: "UTC" }),
|
|
113
|
+
[c]
|
|
114
|
+
), L = u(
|
|
115
|
+
() => new Intl.DateTimeFormat(c, { weekday: "long", timeZone: "UTC" }),
|
|
116
|
+
[c]
|
|
117
|
+
), q = u(
|
|
118
|
+
() => new Intl.ListFormat(c, { type: "unit", style: "short" }),
|
|
119
|
+
[c]
|
|
120
|
+
), A = u(() => {
|
|
121
|
+
const s = n.map((p) => {
|
|
122
|
+
const d = /* @__PURE__ */ new Map();
|
|
123
|
+
for (const g of p.days) d.set(g.weekday, g);
|
|
124
|
+
return { row: p, byDay: d };
|
|
125
|
+
}), l = s.flatMap(
|
|
126
|
+
({ row: p }) => p.days.flatMap((d) => I(d.spans))
|
|
127
|
+
);
|
|
128
|
+
return { normalised: s, hasHours: l.length > 0, fit: oa(l) };
|
|
129
|
+
}, [n]), J = u(
|
|
130
|
+
() => new Map(e.map((s, l) => [s.id, l])),
|
|
131
|
+
[e]
|
|
132
|
+
);
|
|
133
|
+
na() && e.length > $ && console.warn(
|
|
134
|
+
`WeekAvailability: ${e.length} tones given; only the first ${$} get a colour.`
|
|
135
|
+
);
|
|
136
|
+
const [h, x] = u(() => {
|
|
137
|
+
const s = a ? [
|
|
138
|
+
y(Math.floor(a[0]), 0, 23),
|
|
139
|
+
y(Math.ceil(a[1]), 1, 24)
|
|
140
|
+
] : A.fit;
|
|
141
|
+
return s[1] > s[0] ? s : [s[0], s[0] + 1];
|
|
142
|
+
}, [a, A.fit]), T = la(n, v, o), D = (s) => w(G, s * 60), Q = (s) => m("weekAvailability.span", {
|
|
143
|
+
from: w(k, s.from),
|
|
144
|
+
to: w(k, s.to)
|
|
145
|
+
}), U = {
|
|
146
|
+
ref: Y,
|
|
147
|
+
"data-component": "week-availability",
|
|
148
|
+
className: [da(), P].filter(Boolean).join(" "),
|
|
149
|
+
..._
|
|
150
|
+
};
|
|
151
|
+
if (n.length === 0 || !A.hasHours || T.length === 0)
|
|
152
|
+
return /* @__PURE__ */ t("div", { ...U, children: /* @__PURE__ */ t(
|
|
153
|
+
ra,
|
|
154
|
+
{
|
|
155
|
+
variant: "no-results",
|
|
156
|
+
size: "sm",
|
|
157
|
+
title: m("weekAvailability.empty.title"),
|
|
158
|
+
description: m("weekAvailability.empty.description")
|
|
159
|
+
}
|
|
160
|
+
) });
|
|
161
|
+
const W = { "--wa-days": T.length }, R = h + Math.round((x - h) / 2), aa = x - h >= 6;
|
|
162
|
+
return /* @__PURE__ */ f("div", { ...U, children: [
|
|
163
|
+
N && e.length > 0 ? /* @__PURE__ */ t(
|
|
164
|
+
"ul",
|
|
165
|
+
{
|
|
166
|
+
"aria-label": m("weekAvailability.legend"),
|
|
167
|
+
"data-week-availability-legend": "",
|
|
168
|
+
className: ca(),
|
|
169
|
+
children: e.map((s, l) => /* @__PURE__ */ f(
|
|
170
|
+
"li",
|
|
171
|
+
{
|
|
172
|
+
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ t(
|
|
175
|
+
"span",
|
|
176
|
+
{
|
|
177
|
+
"aria-hidden": "true",
|
|
178
|
+
"data-tone": s.id,
|
|
179
|
+
className: [ma(), K[l] ?? E].join(
|
|
180
|
+
" "
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
s.label
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
s.id
|
|
188
|
+
))
|
|
189
|
+
}
|
|
190
|
+
) : null,
|
|
191
|
+
/* @__PURE__ */ t("p", { className: ba(), children: m("weekAvailability.range", {
|
|
192
|
+
from: w(k, h * 60),
|
|
193
|
+
to: w(k, x * 60)
|
|
194
|
+
}) }),
|
|
195
|
+
/* @__PURE__ */ f(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
role: "table",
|
|
199
|
+
"aria-label": _["aria-label"],
|
|
200
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ t("div", { role: "rowgroup", children: /* @__PURE__ */ f("div", { role: "row", style: W, className: fa(), children: [
|
|
203
|
+
/* @__PURE__ */ t(
|
|
204
|
+
"span",
|
|
205
|
+
{
|
|
206
|
+
role: "columnheader",
|
|
207
|
+
className: "ds:sr-only ds:@[640px]:not-sr-only",
|
|
208
|
+
children: /* @__PURE__ */ t("span", { className: "ds:sr-only", children: m("weekAvailability.rows") })
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
T.map((s) => {
|
|
212
|
+
const l = new Date(Date.UTC(2024, 0, s));
|
|
213
|
+
return /* @__PURE__ */ f(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
role: "columnheader",
|
|
217
|
+
className: "ds:min-w-0 ds:text-center type-meta ds:font-semibold ds:text-[color:var(--foreground)]",
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ t("span", { className: "ds:sr-only", children: L.format(l) }),
|
|
220
|
+
/* @__PURE__ */ t("span", { "aria-hidden": "true", children: X.format(l) }),
|
|
221
|
+
/* @__PURE__ */ f("span", { "aria-hidden": "true", className: xa(), children: [
|
|
222
|
+
/* @__PURE__ */ t("span", { children: D(h) }),
|
|
223
|
+
aa ? /* @__PURE__ */ t("span", { children: D(R) }) : null,
|
|
224
|
+
/* @__PURE__ */ t("span", { children: D(x) })
|
|
225
|
+
] })
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
s
|
|
229
|
+
);
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: "ds:hidden ds:@[640px]:block" })
|
|
232
|
+
] }) }),
|
|
233
|
+
/* @__PURE__ */ t(
|
|
234
|
+
"div",
|
|
235
|
+
{
|
|
236
|
+
role: "rowgroup",
|
|
237
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
238
|
+
children: A.normalised.map(({ row: s, byDay: l }) => /* @__PURE__ */ f(
|
|
239
|
+
"div",
|
|
240
|
+
{
|
|
241
|
+
role: "row",
|
|
242
|
+
"data-row-id": s.id,
|
|
243
|
+
style: W,
|
|
244
|
+
className: pa(),
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ t("div", { role: "rowheader", className: ua(), children: C ? /* @__PURE__ */ t(
|
|
247
|
+
"button",
|
|
248
|
+
{
|
|
249
|
+
type: "button",
|
|
250
|
+
className: va(),
|
|
251
|
+
onClick: () => C(s.id),
|
|
252
|
+
children: s.label
|
|
253
|
+
}
|
|
254
|
+
) : s.label }),
|
|
255
|
+
T.map((p) => {
|
|
256
|
+
const d = l.get(p), g = I(d == null ? void 0 : d.spans), z = (d == null ? void 0 : d.tone) ?? s.tone, M = z ? J.get(z) : void 0, b = M === void 0 ? void 0 : e[M], V = L.format(new Date(Date.UTC(2024, 0, p))), B = q.format(g.map(Q)), H = g.length === 0 ? m("weekAvailability.cellClosed", { day: V }) : b ? m("weekAvailability.cell", {
|
|
257
|
+
day: V,
|
|
258
|
+
hours: B,
|
|
259
|
+
tone: b.label
|
|
260
|
+
}) : m("weekAvailability.cellNoTone", {
|
|
261
|
+
day: V,
|
|
262
|
+
hours: B
|
|
263
|
+
});
|
|
264
|
+
return /* @__PURE__ */ f(
|
|
265
|
+
"div",
|
|
266
|
+
{
|
|
267
|
+
role: "cell",
|
|
268
|
+
"data-weekday": p,
|
|
269
|
+
"data-tone": g.length > 0 ? b == null ? void 0 : b.id : void 0,
|
|
270
|
+
title: H,
|
|
271
|
+
className: "ds:min-w-0",
|
|
272
|
+
children: [
|
|
273
|
+
/* @__PURE__ */ t("span", { className: "ds:sr-only", children: H }),
|
|
274
|
+
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: ha(), children: g.map((Z) => {
|
|
275
|
+
const j = ia(Z, [h, x]);
|
|
276
|
+
return j ? /* @__PURE__ */ t(
|
|
277
|
+
"span",
|
|
278
|
+
{
|
|
279
|
+
"data-span": "",
|
|
280
|
+
className: [
|
|
281
|
+
ya(),
|
|
282
|
+
M !== void 0 ? K[M] ?? E : E
|
|
283
|
+
].join(" "),
|
|
284
|
+
style: {
|
|
285
|
+
"--wa-start": `${j.start}%`,
|
|
286
|
+
"--wa-size": `${j.size}%`
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
Z.from
|
|
290
|
+
) : null;
|
|
291
|
+
}) })
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
p
|
|
295
|
+
);
|
|
296
|
+
}),
|
|
297
|
+
s.actions ? /* @__PURE__ */ t("div", { role: "cell", className: ga(), children: s.actions }) : /* @__PURE__ */ t("span", { role: "cell", className: "ds:hidden ds:@[640px]:block" })
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
s.id
|
|
301
|
+
))
|
|
302
|
+
}
|
|
303
|
+
)
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
] });
|
|
308
|
+
});
|
|
309
|
+
wa.displayName = "WeekAvailability";
|
|
310
|
+
export {
|
|
311
|
+
$ as W,
|
|
312
|
+
wa as a,
|
|
313
|
+
oa as f,
|
|
314
|
+
I as n,
|
|
315
|
+
ia as s,
|
|
316
|
+
la as v
|
|
317
|
+
};
|
|
318
|
+
//# sourceMappingURL=week-availability-CsTiwtYj.js.map
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { jsxs as g, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Z, useId as J, useMemo as Q, useEffect as ss } from "react";
|
|
3
|
+
import { c as m } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as es } from "react-i18next";
|
|
5
|
+
import { f as rs } from "./intl-locale-FWh-Y5_3.js";
|
|
6
|
+
import { B as b } from "./button-DohK_Ak_.js";
|
|
7
|
+
import { F as os } from "./form-field-context-DtiROUJV.js";
|
|
8
|
+
import { S as as } from "./switch-DO6uC4HJ.js";
|
|
9
|
+
import { T as M } from "./time-picker-DDr5vhwQ.js";
|
|
10
|
+
import { X as ts } from "./x-B5YnXwCz.js";
|
|
11
|
+
import { P as ns } from "./plus-DzMQ_c6b.js";
|
|
12
|
+
import { C as ls } from "./copy-vRpqqHtY.js";
|
|
13
|
+
const O = { from: 540, to: 1080 }, S = [1, 2, 3, 4, 5, 6, 7], T = 1439;
|
|
14
|
+
function V(t) {
|
|
15
|
+
const s = /* @__PURE__ */ new Map();
|
|
16
|
+
t.forEach((a, l) => {
|
|
17
|
+
a.from < a.to || s.set(l, "order");
|
|
18
|
+
});
|
|
19
|
+
const n = t.map((a, l) => ({ ...a, i: l })).filter(({ i: a }) => !s.has(a)).sort((a, l) => a.from - l.from);
|
|
20
|
+
for (let a = 1; a < n.length; a += 1) {
|
|
21
|
+
const l = n[a - 1], u = n[a];
|
|
22
|
+
u.from < l.to && (s.has(u.i) || s.set(u.i, "overlap"), s.has(l.i) || s.set(l.i, "overlap"));
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
function ds(t, s = S) {
|
|
27
|
+
return s.every((n) => V(t[n] ?? []).size === 0);
|
|
28
|
+
}
|
|
29
|
+
function is(t) {
|
|
30
|
+
const s = t[t.length - 1];
|
|
31
|
+
if (!s) return { ...O };
|
|
32
|
+
const n = Math.min(s.to + 60, T - 60), a = Math.min(n + 240, T);
|
|
33
|
+
return n >= s.to && a > n ? { from: n, to: a } : null;
|
|
34
|
+
}
|
|
35
|
+
function R(t) {
|
|
36
|
+
const s = Math.min(T, Math.max(0, Math.round(t)));
|
|
37
|
+
return { hours: Math.floor(s / 60), minutes: s % 60 };
|
|
38
|
+
}
|
|
39
|
+
const j = (t) => t.hours * 60 + t.minutes, cs = m(
|
|
40
|
+
"ds:@container ds:flex ds:w-full ds:min-w-0 ds:max-w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-[color:var(--foreground)]"
|
|
41
|
+
), W = "ds:grid ds:items-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:grid-cols-[minmax(0,1fr)_auto] ds:@[640px]:grid-cols-[calc(var(--spacing-xl)*3)_calc(var(--spacing-xl)*2)_minmax(0,1fr)_auto]", ms = m(
|
|
42
|
+
`${W} ds:hidden ds:@[640px]:grid type-meta ds:font-semibold ds:text-[color:var(--muted-foreground)]`
|
|
43
|
+
), us = m(
|
|
44
|
+
`${W} ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]`
|
|
45
|
+
), ps = m(
|
|
46
|
+
"ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:@[640px]:contents"
|
|
47
|
+
), fs = m("ds:min-w-0 ds:font-semibold ds:break-words"), gs = m(
|
|
48
|
+
"ds:col-span-full ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)] ds:@[640px]:col-span-1"
|
|
49
|
+
), hs = m(
|
|
50
|
+
"ds:grid ds:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)_auto] ds:items-center ds:gap-[var(--spacing-xs)]"
|
|
51
|
+
), ys = m(
|
|
52
|
+
"ds:col-span-full ds:m-0 type-meta ds:text-[color:var(--destructive)]"
|
|
53
|
+
), ws = Z(function({
|
|
54
|
+
value: s,
|
|
55
|
+
onChange: n,
|
|
56
|
+
maxRanges: a = 2,
|
|
57
|
+
minuteStep: l = 15,
|
|
58
|
+
weekdays: u = S,
|
|
59
|
+
hour12: D = !1,
|
|
60
|
+
disabled: p = !1,
|
|
61
|
+
onValidityChange: x,
|
|
62
|
+
locale: z,
|
|
63
|
+
className: B,
|
|
64
|
+
...P
|
|
65
|
+
}, U) {
|
|
66
|
+
const { t: o, i18n: L } = es("ui"), E = J(), $ = rs(
|
|
67
|
+
z ?? L.resolvedLanguage ?? L.language
|
|
68
|
+
), Y = Q(
|
|
69
|
+
() => new Intl.DateTimeFormat($, { weekday: "long", timeZone: "UTC" }),
|
|
70
|
+
[$]
|
|
71
|
+
), G = (e) => Y.format(new Date(Date.UTC(2024, 0, e))), A = ds(s, u);
|
|
72
|
+
ss(() => {
|
|
73
|
+
x == null || x(A);
|
|
74
|
+
}, [A, x]);
|
|
75
|
+
const v = (e, d) => n({ ...s, [e]: d }), q = (e) => e === 0 ? o("weeklyHoursEditor.slotFirst") : e === 1 ? o("weeklyHoursEditor.slotSecond") : o("weeklyHoursEditor.slotN", { n: e + 1 }), K = (e) => {
|
|
76
|
+
const d = (s[e] ?? []).map((h) => ({ ...h })), f = { ...s };
|
|
77
|
+
for (const h of u) f[h] = d.map((i) => ({ ...i }));
|
|
78
|
+
n(f);
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ g(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
ref: U,
|
|
84
|
+
role: "group",
|
|
85
|
+
"data-component": "weekly-hours-editor",
|
|
86
|
+
className: [cs(), B].filter(Boolean).join(" "),
|
|
87
|
+
...P,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ g("div", { "aria-hidden": "true", className: ms(), children: [
|
|
90
|
+
/* @__PURE__ */ r("span", { children: o("weeklyHoursEditor.columnDay") }),
|
|
91
|
+
/* @__PURE__ */ r("span", { children: o("weeklyHoursEditor.columnOpen") }),
|
|
92
|
+
/* @__PURE__ */ g("span", { className: "ds:grid ds:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)_auto] ds:gap-[var(--spacing-xs)]", children: [
|
|
93
|
+
/* @__PURE__ */ r("span", { children: o("weeklyHoursEditor.columnOpens") }),
|
|
94
|
+
/* @__PURE__ */ r("span", {}),
|
|
95
|
+
/* @__PURE__ */ r("span", { children: o("weeklyHoursEditor.columnCloses") }),
|
|
96
|
+
/* @__PURE__ */ r("span", { className: "ds:w-[var(--min-target-size)]" })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ r("span", {})
|
|
99
|
+
] }),
|
|
100
|
+
u.map((e) => {
|
|
101
|
+
const d = s[e] ?? [], f = d.length > 0, h = V(d), i = G(e), H = `${E}-${e}-error`, C = Array.from(new Set(h.values())), N = is(d);
|
|
102
|
+
return /* @__PURE__ */ g(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
role: "group",
|
|
106
|
+
"aria-label": i,
|
|
107
|
+
"data-weekday": e,
|
|
108
|
+
className: us(),
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ g("div", { className: ps(), children: [
|
|
111
|
+
/* @__PURE__ */ r("span", { className: fs(), children: i }),
|
|
112
|
+
/* @__PURE__ */ r(
|
|
113
|
+
as,
|
|
114
|
+
{
|
|
115
|
+
label: o("weeklyHoursEditor.openSwitch", { day: i }),
|
|
116
|
+
hideLabel: !0,
|
|
117
|
+
className: "ds:justify-self-start",
|
|
118
|
+
checked: f,
|
|
119
|
+
disabled: p,
|
|
120
|
+
onCheckedChange: (y) => v(e, y ? [{ ...O }] : [])
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] }),
|
|
124
|
+
f ? /* @__PURE__ */ r("div", { className: gs(), children: d.map((y, c) => {
|
|
125
|
+
const F = h.has(c), _ = q(c), I = (w) => v(
|
|
126
|
+
e,
|
|
127
|
+
d.map((k, X) => X === c ? { ...k, ...w } : k)
|
|
128
|
+
);
|
|
129
|
+
return /* @__PURE__ */ r(
|
|
130
|
+
os.Provider,
|
|
131
|
+
{
|
|
132
|
+
value: {
|
|
133
|
+
id: `${E}-${e}-${c}`,
|
|
134
|
+
helpId: `${E}-${e}-${c}-help`,
|
|
135
|
+
errorId: H,
|
|
136
|
+
describedBy: F ? H : "",
|
|
137
|
+
invalid: F,
|
|
138
|
+
required: !1,
|
|
139
|
+
disabled: p
|
|
140
|
+
},
|
|
141
|
+
children: /* @__PURE__ */ g("div", { className: hs(), "data-range": c, children: [
|
|
142
|
+
/* @__PURE__ */ r(
|
|
143
|
+
M,
|
|
144
|
+
{
|
|
145
|
+
dropdown: !0,
|
|
146
|
+
hour12: D,
|
|
147
|
+
minuteStep: l,
|
|
148
|
+
disabled: p,
|
|
149
|
+
"aria-label": o("weeklyHoursEditor.fieldLabel", {
|
|
150
|
+
day: i,
|
|
151
|
+
slot: _,
|
|
152
|
+
edge: o("weeklyHoursEditor.edgeOpens")
|
|
153
|
+
}),
|
|
154
|
+
value: R(y.from),
|
|
155
|
+
onChange: (w) => I({ from: j(w) })
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ r(
|
|
159
|
+
"span",
|
|
160
|
+
{
|
|
161
|
+
"aria-hidden": "true",
|
|
162
|
+
className: "ds:text-[color:var(--muted-foreground)]",
|
|
163
|
+
children: "–"
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ r(
|
|
167
|
+
M,
|
|
168
|
+
{
|
|
169
|
+
dropdown: !0,
|
|
170
|
+
hour12: D,
|
|
171
|
+
minuteStep: l,
|
|
172
|
+
disabled: p,
|
|
173
|
+
"aria-label": o("weeklyHoursEditor.fieldLabel", {
|
|
174
|
+
day: i,
|
|
175
|
+
slot: _,
|
|
176
|
+
edge: o("weeklyHoursEditor.edgeCloses")
|
|
177
|
+
}),
|
|
178
|
+
value: R(y.to),
|
|
179
|
+
onChange: (w) => I({ to: j(w) })
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ r(
|
|
183
|
+
b,
|
|
184
|
+
{
|
|
185
|
+
intent: "ghost",
|
|
186
|
+
hideLabel: !0,
|
|
187
|
+
disabled: p,
|
|
188
|
+
startIcon: /* @__PURE__ */ r(ts, { "aria-hidden": "true" }),
|
|
189
|
+
onClick: () => v(
|
|
190
|
+
e,
|
|
191
|
+
d.filter((w, k) => k !== c)
|
|
192
|
+
),
|
|
193
|
+
children: o("weeklyHoursEditor.removeRange", {
|
|
194
|
+
slot: _,
|
|
195
|
+
day: i
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
] })
|
|
200
|
+
},
|
|
201
|
+
c
|
|
202
|
+
);
|
|
203
|
+
}) }) : /* @__PURE__ */ r("span", { className: "ds:col-span-full ds:text-[color:var(--muted-foreground)] ds:@[640px]:col-span-1", children: o("weeklyHoursEditor.closed") }),
|
|
204
|
+
/* @__PURE__ */ g("div", { className: "ds:col-span-full ds:flex ds:flex-wrap ds:justify-end ds:gap-[var(--spacing-xs)] ds:@[640px]:col-span-1 ds:@[640px]:col-start-4 ds:@[640px]:row-start-1", children: [
|
|
205
|
+
f && d.length < a ? /* @__PURE__ */ r(
|
|
206
|
+
b,
|
|
207
|
+
{
|
|
208
|
+
intent: "ghost",
|
|
209
|
+
size: "sm",
|
|
210
|
+
disabled: p || N === null,
|
|
211
|
+
startIcon: /* @__PURE__ */ r(ns, { "aria-hidden": "true" }),
|
|
212
|
+
"aria-label": o("weeklyHoursEditor.addRangeFor", { day: i }),
|
|
213
|
+
onClick: () => N && v(e, [...d, N]),
|
|
214
|
+
children: o("weeklyHoursEditor.addRange")
|
|
215
|
+
}
|
|
216
|
+
) : null,
|
|
217
|
+
f ? /* @__PURE__ */ r(
|
|
218
|
+
b,
|
|
219
|
+
{
|
|
220
|
+
intent: "ghost",
|
|
221
|
+
size: "sm",
|
|
222
|
+
disabled: p,
|
|
223
|
+
startIcon: /* @__PURE__ */ r(ls, { "aria-hidden": "true" }),
|
|
224
|
+
"aria-label": o("weeklyHoursEditor.copyToAllFor", {
|
|
225
|
+
day: i
|
|
226
|
+
}),
|
|
227
|
+
onClick: () => K(e),
|
|
228
|
+
children: o("weeklyHoursEditor.copyToAll")
|
|
229
|
+
}
|
|
230
|
+
) : null
|
|
231
|
+
] }),
|
|
232
|
+
C.length > 0 ? /* @__PURE__ */ r("p", { id: H, role: "alert", className: ys(), children: C.map(
|
|
233
|
+
(y) => o(y === "order" ? "weeklyHoursEditor.errorOrder" : "weeklyHoursEditor.errorOverlap")
|
|
234
|
+
).join(" ") }) : null
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
e
|
|
238
|
+
);
|
|
239
|
+
})
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
});
|
|
244
|
+
ws.displayName = "WeeklyHoursEditor";
|
|
245
|
+
export {
|
|
246
|
+
O as W,
|
|
247
|
+
ws as a,
|
|
248
|
+
ds as i,
|
|
249
|
+
is as n,
|
|
250
|
+
V as v
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=weekly-hours-editor-BsVsgeOc.js.map
|
|
@@ -13,7 +13,7 @@ import { T as ae } from "./trash-2-uumy3fy1.js";
|
|
|
13
13
|
import { C as Ne } from "./circle-dashed-CUj6o2cA.js";
|
|
14
14
|
import { C as Ce } from "./circle-j7oZoouK.js";
|
|
15
15
|
import { u as _e } from "./registry-DvAUVLHh.js";
|
|
16
|
-
import { A as V } from "./alert-
|
|
16
|
+
import { A as V } from "./alert-C4WKViaS.js";
|
|
17
17
|
import { B as Se } from "./button-DohK_Ak_.js";
|
|
18
18
|
import { D as N } from "./dropdown-menu-CqxBthww.js";
|
|
19
19
|
import { E } from "./empty-state-DwJ5YNzz.js";
|
|
@@ -1321,4 +1321,4 @@ export {
|
|
|
1321
1321
|
ee as r,
|
|
1322
1322
|
D as w
|
|
1323
1323
|
};
|
|
1324
|
-
//# sourceMappingURL=workflow-map-
|
|
1324
|
+
//# sourceMappingURL=workflow-map-DWk-rZse.js.map
|
package/dist/_chunks/{workflow-webhook-action-B_52rH7O.js → workflow-webhook-action-DILFqAVd.js}
RENAMED
|
@@ -4,7 +4,7 @@ import { useTranslation as Ye } from "react-i18next";
|
|
|
4
4
|
import { c as h } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { C as Ue } from "./code-block-BTsCXVGI.js";
|
|
6
6
|
import { A as k } from "./accordion-Ch3xp0mX.js";
|
|
7
|
-
import { A as U } from "./alert-
|
|
7
|
+
import { A as U } from "./alert-C4WKViaS.js";
|
|
8
8
|
import { B as Kt } from "./badge-BUk4RjTS.js";
|
|
9
9
|
import { B as ue } from "./button-DohK_Ak_.js";
|
|
10
10
|
import { I as $t } from "./icon-button-S8_weU3g.js";
|
|
@@ -809,4 +809,4 @@ export {
|
|
|
809
809
|
Mo as W,
|
|
810
810
|
fo as a
|
|
811
811
|
};
|
|
812
|
-
//# sourceMappingURL=workflow-webhook-action-
|
|
812
|
+
//# sourceMappingURL=workflow-webhook-action-DILFqAVd.js.map
|