@mieweb/ui 0.7.1-dev.16 → 0.7.1-dev.18
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/{chunk-QOBNYNKZ.js → chunk-3SRBIXQX.js} +3 -3
- package/dist/{chunk-QOBNYNKZ.js.map → chunk-3SRBIXQX.js.map} +1 -1
- package/dist/{chunk-RGRSJYZF.js → chunk-EGWWTIWS.js} +116 -72
- package/dist/chunk-EGWWTIWS.js.map +1 -0
- package/dist/{chunk-GLRLOJMV.cjs → chunk-OAHORW4N.cjs} +115 -71
- package/dist/chunk-OAHORW4N.cjs.map +1 -0
- package/dist/{chunk-3G2HFPCC.cjs → chunk-VWCMOWGH.cjs} +6 -6
- package/dist/{chunk-3G2HFPCC.cjs.map → chunk-VWCMOWGH.cjs.map} +1 -1
- package/dist/components/DateInput/index.cjs +2 -2
- package/dist/components/DateInput/index.d.cts +3 -1
- package/dist/components/DateInput/index.d.ts +3 -1
- package/dist/components/DateInput/index.js +1 -1
- package/dist/esheet.cjs +5 -5
- package/dist/esheet.js +2 -2
- package/dist/index.cjs +358 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +325 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -6
- package/dist/chunk-GLRLOJMV.cjs.map +0 -1
- package/dist/chunk-RGRSJYZF.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -60,14 +60,14 @@ var chunkU3JU6BI5_cjs = require('./chunk-U3JU6BI5.cjs');
|
|
|
60
60
|
require('./chunk-VBWRH4UW.cjs');
|
|
61
61
|
var chunkI2ECTLON_cjs = require('./chunk-I2ECTLON.cjs');
|
|
62
62
|
var chunkRI56YPED_cjs = require('./chunk-RI56YPED.cjs');
|
|
63
|
-
var
|
|
63
|
+
var chunkVWCMOWGH_cjs = require('./chunk-VWCMOWGH.cjs');
|
|
64
64
|
var chunkWUNWHOLA_cjs = require('./chunk-WUNWHOLA.cjs');
|
|
65
65
|
var chunkWWJIW2IH_cjs = require('./chunk-WWJIW2IH.cjs');
|
|
66
66
|
var chunk5IDYOJHO_cjs = require('./chunk-5IDYOJHO.cjs');
|
|
67
67
|
var chunkAIJAFPGJ_cjs = require('./chunk-AIJAFPGJ.cjs');
|
|
68
68
|
var chunkZBI52NP2_cjs = require('./chunk-ZBI52NP2.cjs');
|
|
69
69
|
var chunkMJWFNV3L_cjs = require('./chunk-MJWFNV3L.cjs');
|
|
70
|
-
var
|
|
70
|
+
var chunkOAHORW4N_cjs = require('./chunk-OAHORW4N.cjs');
|
|
71
71
|
var chunkP2VTQ5AR_cjs = require('./chunk-P2VTQ5AR.cjs');
|
|
72
72
|
var chunk6ECKH4DJ_cjs = require('./chunk-6ECKH4DJ.cjs');
|
|
73
73
|
var chunkPAM5UUBL_cjs = require('./chunk-PAM5UUBL.cjs');
|
|
@@ -7100,8 +7100,8 @@ function ConcernRow({
|
|
|
7100
7100
|
]
|
|
7101
7101
|
}
|
|
7102
7102
|
),
|
|
7103
|
-
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7104
|
-
|
|
7103
|
+
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkVWCMOWGH_cjs.RowActionToolbar, { label: `Actions for ${current.text}`, align: "top", children: visibleActions.map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7104
|
+
chunkVWCMOWGH_cjs.RowIconButton,
|
|
7105
7105
|
{
|
|
7106
7106
|
label: ACTION_META[action].label,
|
|
7107
7107
|
icon: ACTION_META[action].icon,
|
|
@@ -7530,13 +7530,13 @@ function OrderRow({
|
|
|
7530
7530
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7531
7531
|
/* @__PURE__ */ jsxRuntime.jsx(OrderContent, { order }),
|
|
7532
7532
|
interactive && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7533
|
-
|
|
7533
|
+
chunkVWCMOWGH_cjs.RowActionToolbar,
|
|
7534
7534
|
{
|
|
7535
7535
|
label: `Actions for ${order.display}`,
|
|
7536
7536
|
group: "order",
|
|
7537
7537
|
children: [
|
|
7538
7538
|
canEdit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7539
|
-
|
|
7539
|
+
chunkVWCMOWGH_cjs.RowIconButton,
|
|
7540
7540
|
{
|
|
7541
7541
|
label: "Edit",
|
|
7542
7542
|
icon: chunkPAM5UUBL_cjs.Pencil,
|
|
@@ -7604,7 +7604,7 @@ function OrderRow({
|
|
|
7604
7604
|
}
|
|
7605
7605
|
),
|
|
7606
7606
|
controls?.remove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7607
|
-
|
|
7607
|
+
chunkVWCMOWGH_cjs.RowIconButton,
|
|
7608
7608
|
{
|
|
7609
7609
|
label: "Remove",
|
|
7610
7610
|
icon: chunkPAM5UUBL_cjs.Trash2,
|
|
@@ -7772,7 +7772,7 @@ var Assessment = React10__namespace.forwardRef(
|
|
|
7772
7772
|
null
|
|
7773
7773
|
);
|
|
7774
7774
|
const [announcement, setAnnouncement] = chunkYVPC65ZJ_cjs.useLiveAnnouncement();
|
|
7775
|
-
const ambientCodeLookup =
|
|
7775
|
+
const ambientCodeLookup = chunkVWCMOWGH_cjs.useCodeLookupConfig();
|
|
7776
7776
|
const effectiveRenderOrderSearch = renderOrderSearch === false ? void 0 : renderOrderSearch ?? (ambientCodeLookup ? contextOrderSearch(ambientCodeLookup) : void 0);
|
|
7777
7777
|
const concernById = React10__namespace.useMemo(
|
|
7778
7778
|
() => new Map(concerns.map((c) => [c.concernId, c])),
|
|
@@ -8027,7 +8027,7 @@ var Assessment = React10__namespace.forwardRef(
|
|
|
8027
8027
|
assertion.verificationStatus !== "confirmed" && /* @__PURE__ */ jsxRuntime.jsx(chunkYVL3XATO_cjs.Badge, { variant: "warning", size: "sm", children: assertion.verificationStatus }),
|
|
8028
8028
|
/* @__PURE__ */ jsxRuntime.jsx(CodingChips, { coding: assertion.coding }),
|
|
8029
8029
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8030
|
-
|
|
8030
|
+
chunkVWCMOWGH_cjs.RowActionToolbar,
|
|
8031
8031
|
{
|
|
8032
8032
|
label: `Actions for ${assertion.text}`,
|
|
8033
8033
|
align: "top",
|
|
@@ -8037,7 +8037,7 @@ var Assessment = React10__namespace.forwardRef(
|
|
|
8037
8037
|
if (action === "add-order" && !onAddOrder && !onAction)
|
|
8038
8038
|
return null;
|
|
8039
8039
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8040
|
-
|
|
8040
|
+
chunkVWCMOWGH_cjs.RowIconButton,
|
|
8041
8041
|
{
|
|
8042
8042
|
label: meta.label,
|
|
8043
8043
|
icon: meta.icon,
|
|
@@ -9995,6 +9995,50 @@ function LoadingSpinner({ className }) {
|
|
|
9995
9995
|
}
|
|
9996
9996
|
);
|
|
9997
9997
|
}
|
|
9998
|
+
|
|
9999
|
+
// src/components/BusinessHoursEditor/scheduleRules.ts
|
|
10000
|
+
function generateId2() {
|
|
10001
|
+
return Math.random().toString(36).substring(2, 9);
|
|
10002
|
+
}
|
|
10003
|
+
function ruleSignature(slot) {
|
|
10004
|
+
return `${slot.start}\0${slot.end}\0${slot.description ?? ""}`;
|
|
10005
|
+
}
|
|
10006
|
+
function scheduleToRules(schedule) {
|
|
10007
|
+
const rulesBySignature = /* @__PURE__ */ new Map();
|
|
10008
|
+
const orderedRules = [];
|
|
10009
|
+
for (const day of schedule) {
|
|
10010
|
+
for (const slot of day.hours) {
|
|
10011
|
+
const signature = ruleSignature(slot);
|
|
10012
|
+
const candidates = rulesBySignature.get(signature) ?? [];
|
|
10013
|
+
let rule = candidates.find((r) => !r.days.includes(day.day));
|
|
10014
|
+
if (!rule) {
|
|
10015
|
+
rule = {
|
|
10016
|
+
id: `rule-${orderedRules.length}`,
|
|
10017
|
+
days: [],
|
|
10018
|
+
start: slot.start,
|
|
10019
|
+
end: slot.end,
|
|
10020
|
+
description: slot.description
|
|
10021
|
+
};
|
|
10022
|
+
candidates.push(rule);
|
|
10023
|
+
rulesBySignature.set(signature, candidates);
|
|
10024
|
+
orderedRules.push(rule);
|
|
10025
|
+
}
|
|
10026
|
+
rule.days.push(day.day);
|
|
10027
|
+
}
|
|
10028
|
+
}
|
|
10029
|
+
return orderedRules;
|
|
10030
|
+
}
|
|
10031
|
+
function rulesToSchedule(rules) {
|
|
10032
|
+
return Array.from({ length: 7 }, (_, day) => ({
|
|
10033
|
+
day,
|
|
10034
|
+
hours: rules.filter((rule) => rule.days.includes(day)).map((rule, index) => ({
|
|
10035
|
+
id: `slot-${day}-${index}`,
|
|
10036
|
+
start: rule.start,
|
|
10037
|
+
end: rule.end,
|
|
10038
|
+
...rule.description ? { description: rule.description } : {}
|
|
10039
|
+
}))
|
|
10040
|
+
}));
|
|
10041
|
+
}
|
|
9998
10042
|
var DAY_NAMES = {
|
|
9999
10043
|
0: "Sunday",
|
|
10000
10044
|
1: "Monday",
|
|
@@ -10262,6 +10306,63 @@ function DayScheduleRow({
|
|
|
10262
10306
|
}
|
|
10263
10307
|
);
|
|
10264
10308
|
}
|
|
10309
|
+
function GroupedScheduleRows({
|
|
10310
|
+
officeHours,
|
|
10311
|
+
useShortDayNames = false,
|
|
10312
|
+
use24Hour = false
|
|
10313
|
+
}) {
|
|
10314
|
+
const normalized = officeHours.map((dayHours) => ({
|
|
10315
|
+
day: parseDayToNumber(dayHours.day),
|
|
10316
|
+
hours: (dayHours.hours ?? []).map((range) => ({
|
|
10317
|
+
start: range.start ?? "",
|
|
10318
|
+
end: range.end ?? "",
|
|
10319
|
+
...range.description ? { description: range.description } : {}
|
|
10320
|
+
}))
|
|
10321
|
+
}));
|
|
10322
|
+
const rules = scheduleToRules(normalized);
|
|
10323
|
+
const closedDays = normalized.filter((dayHours) => dayHours.hours.length === 0).map((dayHours) => dayHours.day);
|
|
10324
|
+
const dayNames = useShortDayNames ? DAY_NAMES_SHORT : DAY_NAMES;
|
|
10325
|
+
const formatDays = (days) => days.map((day) => dayNames[day]).join(", ");
|
|
10326
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10327
|
+
rules.map((rule) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10328
|
+
"div",
|
|
10329
|
+
{
|
|
10330
|
+
"data-slot": "business-hours-grouped-row",
|
|
10331
|
+
className: chunkS5RVSXDV_cjs.cn(dayRowVariants({ isToday: false })),
|
|
10332
|
+
children: [
|
|
10333
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10334
|
+
"span",
|
|
10335
|
+
{
|
|
10336
|
+
"data-slot": "business-hours-day-name",
|
|
10337
|
+
className: "min-w-[80px] font-medium",
|
|
10338
|
+
children: formatDays(rule.days)
|
|
10339
|
+
}
|
|
10340
|
+
),
|
|
10341
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "business-hours-day-hours", className: "text-end", children: /* @__PURE__ */ jsxRuntime.jsx(TimeRangeDisplay, { range: rule, use24Hour }) })
|
|
10342
|
+
]
|
|
10343
|
+
},
|
|
10344
|
+
rule.id
|
|
10345
|
+
)),
|
|
10346
|
+
closedDays.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10347
|
+
"div",
|
|
10348
|
+
{
|
|
10349
|
+
"data-slot": "business-hours-grouped-row",
|
|
10350
|
+
className: chunkS5RVSXDV_cjs.cn(dayRowVariants({ isToday: false })),
|
|
10351
|
+
children: [
|
|
10352
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10353
|
+
"span",
|
|
10354
|
+
{
|
|
10355
|
+
"data-slot": "business-hours-day-name",
|
|
10356
|
+
className: "min-w-[80px] font-medium",
|
|
10357
|
+
children: formatDays(closedDays)
|
|
10358
|
+
}
|
|
10359
|
+
),
|
|
10360
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "business-hours-day-hours", className: "text-end", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Closed" }) })
|
|
10361
|
+
]
|
|
10362
|
+
}
|
|
10363
|
+
)
|
|
10364
|
+
] });
|
|
10365
|
+
}
|
|
10265
10366
|
function BusinessHours({
|
|
10266
10367
|
schedule,
|
|
10267
10368
|
variant = "default",
|
|
@@ -10270,6 +10371,7 @@ function BusinessHours({
|
|
|
10270
10371
|
highlightToday = true,
|
|
10271
10372
|
useShortDayNames = false,
|
|
10272
10373
|
use24Hour = false,
|
|
10374
|
+
groupDays = false,
|
|
10273
10375
|
showHeader = true,
|
|
10274
10376
|
headerText = "Hours",
|
|
10275
10377
|
className
|
|
@@ -10405,7 +10507,14 @@ function BusinessHours({
|
|
|
10405
10507
|
{
|
|
10406
10508
|
"data-slot": "business-hours-schedule",
|
|
10407
10509
|
className: "space-y-1 divide-y divide-neutral-100 dark:divide-neutral-800",
|
|
10408
|
-
children:
|
|
10510
|
+
children: groupDays ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10511
|
+
GroupedScheduleRows,
|
|
10512
|
+
{
|
|
10513
|
+
officeHours: schedule.officeHours,
|
|
10514
|
+
useShortDayNames,
|
|
10515
|
+
use24Hour
|
|
10516
|
+
}
|
|
10517
|
+
) : schedule.officeHours.map((dayHours, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10409
10518
|
DayScheduleRow,
|
|
10410
10519
|
{
|
|
10411
10520
|
dayHours,
|
|
@@ -10542,9 +10651,6 @@ var DAY_NAMES2 = [
|
|
|
10542
10651
|
"Saturday"
|
|
10543
10652
|
];
|
|
10544
10653
|
var DAY_NAMES_SHORT2 = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
10545
|
-
function generateId2() {
|
|
10546
|
-
return Math.random().toString(36).substring(2, 9);
|
|
10547
|
-
}
|
|
10548
10654
|
function getOrderedDays(weekStartsOn) {
|
|
10549
10655
|
if (weekStartsOn === 1) {
|
|
10550
10656
|
return [1, 2, 3, 4, 5, 6, 0];
|
|
@@ -10560,6 +10666,15 @@ function ensureAllDays(schedule) {
|
|
|
10560
10666
|
return result;
|
|
10561
10667
|
}
|
|
10562
10668
|
function BusinessHoursEditor({
|
|
10669
|
+
variant = "days",
|
|
10670
|
+
...props
|
|
10671
|
+
}) {
|
|
10672
|
+
if (variant === "rules") {
|
|
10673
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BusinessHoursRulesEditor, { ...props });
|
|
10674
|
+
}
|
|
10675
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BusinessHoursDaysEditor, { ...props });
|
|
10676
|
+
}
|
|
10677
|
+
function BusinessHoursDaysEditor({
|
|
10563
10678
|
value,
|
|
10564
10679
|
onChange,
|
|
10565
10680
|
disabled = false,
|
|
@@ -10829,6 +10944,208 @@ function BusinessHoursEditor({
|
|
|
10829
10944
|
}
|
|
10830
10945
|
);
|
|
10831
10946
|
}
|
|
10947
|
+
function normalizeSchedule(schedule) {
|
|
10948
|
+
return JSON.stringify(
|
|
10949
|
+
ensureAllDays(schedule).map((day) => ({
|
|
10950
|
+
day: day.day,
|
|
10951
|
+
hours: day.hours.map((slot) => ({
|
|
10952
|
+
start: slot.start,
|
|
10953
|
+
end: slot.end,
|
|
10954
|
+
description: slot.description ?? ""
|
|
10955
|
+
}))
|
|
10956
|
+
}))
|
|
10957
|
+
);
|
|
10958
|
+
}
|
|
10959
|
+
function BusinessHoursRulesEditor({
|
|
10960
|
+
value,
|
|
10961
|
+
onChange,
|
|
10962
|
+
disabled = false,
|
|
10963
|
+
showDescription = true,
|
|
10964
|
+
use24Hour = false,
|
|
10965
|
+
weekStartsOn = 0,
|
|
10966
|
+
className,
|
|
10967
|
+
addHoursLabel = "Add Hours"
|
|
10968
|
+
}) {
|
|
10969
|
+
const [rules, setRules] = React10__namespace.useState(
|
|
10970
|
+
() => scheduleToRules(value)
|
|
10971
|
+
);
|
|
10972
|
+
const timeFormat = use24Hour ? "24-hour" : "12-hour";
|
|
10973
|
+
const lastScheduleRef = React10__namespace.useRef(normalizeSchedule(value));
|
|
10974
|
+
React10__namespace.useEffect(() => {
|
|
10975
|
+
const incoming = normalizeSchedule(value);
|
|
10976
|
+
if (incoming !== lastScheduleRef.current) {
|
|
10977
|
+
lastScheduleRef.current = incoming;
|
|
10978
|
+
setRules(scheduleToRules(value));
|
|
10979
|
+
}
|
|
10980
|
+
}, [value]);
|
|
10981
|
+
const emit = React10.useCallback(
|
|
10982
|
+
(nextRules) => {
|
|
10983
|
+
setRules(nextRules);
|
|
10984
|
+
const schedule = rulesToSchedule(nextRules);
|
|
10985
|
+
const normalized = normalizeSchedule(schedule);
|
|
10986
|
+
if (normalized !== lastScheduleRef.current) {
|
|
10987
|
+
lastScheduleRef.current = normalized;
|
|
10988
|
+
onChange(schedule);
|
|
10989
|
+
}
|
|
10990
|
+
},
|
|
10991
|
+
[onChange]
|
|
10992
|
+
);
|
|
10993
|
+
const handleAddRule = React10.useCallback(() => {
|
|
10994
|
+
emit([
|
|
10995
|
+
...rules,
|
|
10996
|
+
{ id: generateId2(), days: [], start: "09:00", end: "17:00" }
|
|
10997
|
+
]);
|
|
10998
|
+
}, [emit, rules]);
|
|
10999
|
+
const handleRemoveRule = React10.useCallback(
|
|
11000
|
+
(ruleId) => {
|
|
11001
|
+
emit(rules.filter((rule) => rule.id !== ruleId));
|
|
11002
|
+
},
|
|
11003
|
+
[emit, rules]
|
|
11004
|
+
);
|
|
11005
|
+
const handleToggleDay = React10.useCallback(
|
|
11006
|
+
(ruleId, day) => {
|
|
11007
|
+
emit(
|
|
11008
|
+
rules.map(
|
|
11009
|
+
(rule) => rule.id === ruleId ? {
|
|
11010
|
+
...rule,
|
|
11011
|
+
days: rule.days.includes(day) ? rule.days.filter((d) => d !== day) : [...rule.days, day]
|
|
11012
|
+
} : rule
|
|
11013
|
+
)
|
|
11014
|
+
);
|
|
11015
|
+
},
|
|
11016
|
+
[emit, rules]
|
|
11017
|
+
);
|
|
11018
|
+
const handleRuleChange = React10.useCallback(
|
|
11019
|
+
(ruleId, field, value2) => {
|
|
11020
|
+
emit(
|
|
11021
|
+
rules.map(
|
|
11022
|
+
(rule) => rule.id === ruleId ? { ...rule, [field]: value2 } : rule
|
|
11023
|
+
)
|
|
11024
|
+
);
|
|
11025
|
+
},
|
|
11026
|
+
[emit, rules]
|
|
11027
|
+
);
|
|
11028
|
+
const orderedDays = getOrderedDays(weekStartsOn);
|
|
11029
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11030
|
+
"div",
|
|
11031
|
+
{
|
|
11032
|
+
"data-slot": "business-hours-editor",
|
|
11033
|
+
className: chunkS5RVSXDV_cjs.cn("business-hours-editor space-y-3", className),
|
|
11034
|
+
children: [
|
|
11035
|
+
rules.map((rule) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11036
|
+
"fieldset",
|
|
11037
|
+
{
|
|
11038
|
+
"data-slot": "business-hours-rule",
|
|
11039
|
+
className: "flex flex-wrap items-center gap-2 border-b border-gray-200 pb-3 last:border-0 dark:border-gray-700",
|
|
11040
|
+
children: [
|
|
11041
|
+
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "sr-only", children: "Availability rule" }),
|
|
11042
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11043
|
+
"div",
|
|
11044
|
+
{
|
|
11045
|
+
"data-slot": "business-hours-rule-days",
|
|
11046
|
+
className: "flex shrink-0 gap-1",
|
|
11047
|
+
children: orderedDays.map((day) => {
|
|
11048
|
+
const selected = rule.days.includes(day);
|
|
11049
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11050
|
+
"button",
|
|
11051
|
+
{
|
|
11052
|
+
type: "button",
|
|
11053
|
+
"aria-pressed": selected,
|
|
11054
|
+
"aria-label": DAY_NAMES2[day],
|
|
11055
|
+
disabled,
|
|
11056
|
+
onClick: () => handleToggleDay(rule.id, day),
|
|
11057
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
11058
|
+
"inline-flex h-7 w-9 items-center justify-center rounded-full border text-xs font-medium transition-colors",
|
|
11059
|
+
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
|
|
11060
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
11061
|
+
selected ? "border-primary-800 bg-primary-800 text-white" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
11062
|
+
),
|
|
11063
|
+
children: DAY_NAMES_SHORT2[day]
|
|
11064
|
+
},
|
|
11065
|
+
day
|
|
11066
|
+
);
|
|
11067
|
+
})
|
|
11068
|
+
}
|
|
11069
|
+
),
|
|
11070
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-32 sm:w-36", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11071
|
+
chunkOAHORW4N_cjs.DateInput,
|
|
11072
|
+
{
|
|
11073
|
+
inputType: "time",
|
|
11074
|
+
timeFormat,
|
|
11075
|
+
minuteStep: 15,
|
|
11076
|
+
value: rule.start,
|
|
11077
|
+
onChange: (time) => handleRuleChange(rule.id, "start", time),
|
|
11078
|
+
disabled,
|
|
11079
|
+
size: "sm",
|
|
11080
|
+
className: "text-sm",
|
|
11081
|
+
label: "Start time",
|
|
11082
|
+
hideLabel: true
|
|
11083
|
+
}
|
|
11084
|
+
) }),
|
|
11085
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "business-hours-separator", className: "text-gray-400", children: "\u2013" }),
|
|
11086
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-32 sm:w-36", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11087
|
+
chunkOAHORW4N_cjs.DateInput,
|
|
11088
|
+
{
|
|
11089
|
+
inputType: "time",
|
|
11090
|
+
timeFormat,
|
|
11091
|
+
minuteStep: 15,
|
|
11092
|
+
value: rule.end,
|
|
11093
|
+
onChange: (time) => handleRuleChange(rule.id, "end", time),
|
|
11094
|
+
disabled,
|
|
11095
|
+
size: "sm",
|
|
11096
|
+
className: "text-sm",
|
|
11097
|
+
label: "End time",
|
|
11098
|
+
hideLabel: true
|
|
11099
|
+
}
|
|
11100
|
+
) }),
|
|
11101
|
+
showDescription && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[120px] flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11102
|
+
chunk6ECKH4DJ_cjs.Input,
|
|
11103
|
+
{
|
|
11104
|
+
type: "text",
|
|
11105
|
+
value: rule.description || "",
|
|
11106
|
+
onChange: (e) => handleRuleChange(rule.id, "description", e.target.value),
|
|
11107
|
+
placeholder: "Description (optional)",
|
|
11108
|
+
disabled,
|
|
11109
|
+
className: "text-sm",
|
|
11110
|
+
"aria-label": "Description"
|
|
11111
|
+
}
|
|
11112
|
+
) }),
|
|
11113
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11114
|
+
chunkM26KJKZG_cjs.Button,
|
|
11115
|
+
{
|
|
11116
|
+
type: "button",
|
|
11117
|
+
variant: "ghost",
|
|
11118
|
+
size: "sm",
|
|
11119
|
+
onClick: () => handleRemoveRule(rule.id),
|
|
11120
|
+
disabled,
|
|
11121
|
+
className: "text-red-500 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20",
|
|
11122
|
+
"aria-label": "Remove availability rule",
|
|
11123
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(XIcon, { className: "h-4 w-4" })
|
|
11124
|
+
}
|
|
11125
|
+
)
|
|
11126
|
+
]
|
|
11127
|
+
},
|
|
11128
|
+
rule.id
|
|
11129
|
+
)),
|
|
11130
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11131
|
+
chunkM26KJKZG_cjs.Button,
|
|
11132
|
+
{
|
|
11133
|
+
type: "button",
|
|
11134
|
+
variant: "ghost",
|
|
11135
|
+
size: "sm",
|
|
11136
|
+
onClick: handleAddRule,
|
|
11137
|
+
disabled,
|
|
11138
|
+
className: "text-xs",
|
|
11139
|
+
children: [
|
|
11140
|
+
/* @__PURE__ */ jsxRuntime.jsx(PlusIcon2, { className: "me-1 h-3 w-3" }),
|
|
11141
|
+
addHoursLabel
|
|
11142
|
+
]
|
|
11143
|
+
}
|
|
11144
|
+
)
|
|
11145
|
+
]
|
|
11146
|
+
}
|
|
11147
|
+
);
|
|
11148
|
+
}
|
|
10832
11149
|
function createDefaultSchedule() {
|
|
10833
11150
|
return [
|
|
10834
11151
|
{ day: 0, hours: [] },
|
|
@@ -11034,7 +11351,7 @@ function ConditionEditor({
|
|
|
11034
11351
|
"data-testid": dataTestId
|
|
11035
11352
|
}) {
|
|
11036
11353
|
const prior = concern ? currentAssertion(concern) : void 0;
|
|
11037
|
-
const ambientCodeLookup =
|
|
11354
|
+
const ambientCodeLookup = chunkVWCMOWGH_cjs.useCodeLookupConfig();
|
|
11038
11355
|
const effectiveRenderCodeSearch = renderCodeSearch === false ? void 0 : renderCodeSearch ?? (ambientCodeLookup ? contextConditionCodeSearch(ambientCodeLookup) : void 0);
|
|
11039
11356
|
const [text, setText] = React10__namespace.useState("");
|
|
11040
11357
|
const [coding, setCoding] = React10__namespace.useState([]);
|
|
@@ -26587,7 +26904,7 @@ var defaultOrderTabs = [
|
|
|
26587
26904
|
{ id: "rejected", label: "Rejected", statuses: ["rejected", "cancelled"] }
|
|
26588
26905
|
];
|
|
26589
26906
|
function orderToMedication(order) {
|
|
26590
|
-
const sig = order.detail ?
|
|
26907
|
+
const sig = order.detail ? chunkVWCMOWGH_cjs.parseSig(order.detail) : void 0;
|
|
26591
26908
|
return {
|
|
26592
26909
|
id: order.orderId,
|
|
26593
26910
|
name: order.display,
|
|
@@ -26595,7 +26912,7 @@ function orderToMedication(order) {
|
|
|
26595
26912
|
status: "unreconciled",
|
|
26596
26913
|
indication: order.indication,
|
|
26597
26914
|
pharmacyNotes: order.notes,
|
|
26598
|
-
...
|
|
26915
|
+
...chunkVWCMOWGH_cjs.labelToMedicationFields(order.display),
|
|
26599
26916
|
...sig && {
|
|
26600
26917
|
route: sig.route,
|
|
26601
26918
|
frequency: sig.frequency,
|
|
@@ -26666,7 +26983,7 @@ function BaseOrderEditor({
|
|
|
26666
26983
|
onSave
|
|
26667
26984
|
}) {
|
|
26668
26985
|
const config = TYPE_CONFIG[type];
|
|
26669
|
-
const ambientCodeLookup =
|
|
26986
|
+
const ambientCodeLookup = chunkVWCMOWGH_cjs.useCodeLookupConfig();
|
|
26670
26987
|
const effectiveCodeLookup = codeLookup === false ? void 0 : codeLookup ?? ambientCodeLookup ?? void 0;
|
|
26671
26988
|
const [draft, setDraft] = React10__namespace.useState(
|
|
26672
26989
|
() => order ?? {
|
|
@@ -26865,7 +27182,7 @@ function OrderEditor({
|
|
|
26865
27182
|
display: ""
|
|
26866
27183
|
};
|
|
26867
27184
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26868
|
-
|
|
27185
|
+
chunkVWCMOWGH_cjs.MedicationEditor,
|
|
26869
27186
|
{
|
|
26870
27187
|
open,
|
|
26871
27188
|
medication: order ? orderToMedication(order) : void 0,
|
|
@@ -29518,7 +29835,7 @@ function RelevanceControl({
|
|
|
29518
29835
|
{
|
|
29519
29836
|
role: "toolbar",
|
|
29520
29837
|
"aria-label": `Relevance for ${labelPrefix}`,
|
|
29521
|
-
onKeyDown:
|
|
29838
|
+
onKeyDown: chunkVWCMOWGH_cjs.toolbarKeyNav,
|
|
29522
29839
|
className: "border-border flex shrink-0 items-center overflow-hidden rounded-md border",
|
|
29523
29840
|
children: RELEVANCE_ORDER.map((relevance) => {
|
|
29524
29841
|
const active = value === relevance;
|
|
@@ -42639,7 +42956,7 @@ function WebChartReportViewer({
|
|
|
42639
42956
|
":"
|
|
42640
42957
|
] }),
|
|
42641
42958
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42642
|
-
|
|
42959
|
+
chunkOAHORW4N_cjs.DateInput,
|
|
42643
42960
|
{
|
|
42644
42961
|
size: "sm",
|
|
42645
42962
|
showCalendar: true,
|
|
@@ -42653,7 +42970,7 @@ function WebChartReportViewer({
|
|
|
42653
42970
|
":"
|
|
42654
42971
|
] }),
|
|
42655
42972
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42656
|
-
|
|
42973
|
+
chunkOAHORW4N_cjs.DateInput,
|
|
42657
42974
|
{
|
|
42658
42975
|
size: "sm",
|
|
42659
42976
|
showCalendar: true,
|
|
@@ -42798,7 +43115,7 @@ function ReportTimeRange({
|
|
|
42798
43115
|
),
|
|
42799
43116
|
preset === "custom" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
42800
43117
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42801
|
-
|
|
43118
|
+
chunkOAHORW4N_cjs.DateInput,
|
|
42802
43119
|
{
|
|
42803
43120
|
size: "sm",
|
|
42804
43121
|
showCalendar: true,
|
|
@@ -42809,7 +43126,7 @@ function ReportTimeRange({
|
|
|
42809
43126
|
),
|
|
42810
43127
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "to" }),
|
|
42811
43128
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
42812
|
-
|
|
43129
|
+
chunkOAHORW4N_cjs.DateInput,
|
|
42813
43130
|
{
|
|
42814
43131
|
size: "sm",
|
|
42815
43132
|
showCalendar: true,
|
|
@@ -43961,67 +44278,67 @@ Object.defineProperty(exports, "isApplicable", {
|
|
|
43961
44278
|
});
|
|
43962
44279
|
Object.defineProperty(exports, "ALLERGY_TYPE_LABELS", {
|
|
43963
44280
|
enumerable: true,
|
|
43964
|
-
get: function () { return
|
|
44281
|
+
get: function () { return chunkVWCMOWGH_cjs.ALLERGY_TYPE_LABELS; }
|
|
43965
44282
|
});
|
|
43966
44283
|
Object.defineProperty(exports, "AllergyList", {
|
|
43967
44284
|
enumerable: true,
|
|
43968
|
-
get: function () { return
|
|
44285
|
+
get: function () { return chunkVWCMOWGH_cjs.AllergyList; }
|
|
43969
44286
|
});
|
|
43970
44287
|
Object.defineProperty(exports, "AllergyManager", {
|
|
43971
44288
|
enumerable: true,
|
|
43972
|
-
get: function () { return
|
|
44289
|
+
get: function () { return chunkVWCMOWGH_cjs.AllergyManager; }
|
|
43973
44290
|
});
|
|
43974
44291
|
Object.defineProperty(exports, "CodeLookupProvider", {
|
|
43975
44292
|
enumerable: true,
|
|
43976
|
-
get: function () { return
|
|
44293
|
+
get: function () { return chunkVWCMOWGH_cjs.CodeLookupProvider; }
|
|
43977
44294
|
});
|
|
43978
44295
|
Object.defineProperty(exports, "MEDICATION_STATUS_LABELS", {
|
|
43979
44296
|
enumerable: true,
|
|
43980
|
-
get: function () { return
|
|
44297
|
+
get: function () { return chunkVWCMOWGH_cjs.MEDICATION_STATUS_LABELS; }
|
|
43981
44298
|
});
|
|
43982
44299
|
Object.defineProperty(exports, "MedicationEditor", {
|
|
43983
44300
|
enumerable: true,
|
|
43984
|
-
get: function () { return
|
|
44301
|
+
get: function () { return chunkVWCMOWGH_cjs.MedicationEditor; }
|
|
43985
44302
|
});
|
|
43986
44303
|
Object.defineProperty(exports, "MedicationList", {
|
|
43987
44304
|
enumerable: true,
|
|
43988
|
-
get: function () { return
|
|
44305
|
+
get: function () { return chunkVWCMOWGH_cjs.MedicationList; }
|
|
43989
44306
|
});
|
|
43990
44307
|
Object.defineProperty(exports, "MedicationReconciliation", {
|
|
43991
44308
|
enumerable: true,
|
|
43992
|
-
get: function () { return
|
|
44309
|
+
get: function () { return chunkVWCMOWGH_cjs.MedicationReconciliation; }
|
|
43993
44310
|
});
|
|
43994
44311
|
Object.defineProperty(exports, "RowActionToolbar", {
|
|
43995
44312
|
enumerable: true,
|
|
43996
|
-
get: function () { return
|
|
44313
|
+
get: function () { return chunkVWCMOWGH_cjs.RowActionToolbar; }
|
|
43997
44314
|
});
|
|
43998
44315
|
Object.defineProperty(exports, "RowIconButton", {
|
|
43999
44316
|
enumerable: true,
|
|
44000
|
-
get: function () { return
|
|
44317
|
+
get: function () { return chunkVWCMOWGH_cjs.RowIconButton; }
|
|
44001
44318
|
});
|
|
44002
44319
|
Object.defineProperty(exports, "labelToMedicationFields", {
|
|
44003
44320
|
enumerable: true,
|
|
44004
|
-
get: function () { return
|
|
44321
|
+
get: function () { return chunkVWCMOWGH_cjs.labelToMedicationFields; }
|
|
44005
44322
|
});
|
|
44006
44323
|
Object.defineProperty(exports, "lookupToMedicationFields", {
|
|
44007
44324
|
enumerable: true,
|
|
44008
|
-
get: function () { return
|
|
44325
|
+
get: function () { return chunkVWCMOWGH_cjs.lookupToMedicationFields; }
|
|
44009
44326
|
});
|
|
44010
44327
|
Object.defineProperty(exports, "parseMedicationLabel", {
|
|
44011
44328
|
enumerable: true,
|
|
44012
|
-
get: function () { return
|
|
44329
|
+
get: function () { return chunkVWCMOWGH_cjs.parseMedicationLabel; }
|
|
44013
44330
|
});
|
|
44014
44331
|
Object.defineProperty(exports, "parseSig", {
|
|
44015
44332
|
enumerable: true,
|
|
44016
|
-
get: function () { return
|
|
44333
|
+
get: function () { return chunkVWCMOWGH_cjs.parseSig; }
|
|
44017
44334
|
});
|
|
44018
44335
|
Object.defineProperty(exports, "toolbarKeyNav", {
|
|
44019
44336
|
enumerable: true,
|
|
44020
|
-
get: function () { return
|
|
44337
|
+
get: function () { return chunkVWCMOWGH_cjs.toolbarKeyNav; }
|
|
44021
44338
|
});
|
|
44022
44339
|
Object.defineProperty(exports, "useCodeLookupConfig", {
|
|
44023
44340
|
enumerable: true,
|
|
44024
|
-
get: function () { return
|
|
44341
|
+
get: function () { return chunkVWCMOWGH_cjs.useCodeLookupConfig; }
|
|
44025
44342
|
});
|
|
44026
44343
|
Object.defineProperty(exports, "Textarea", {
|
|
44027
44344
|
enumerable: true,
|
|
@@ -44121,7 +44438,7 @@ Object.defineProperty(exports, "cardVariants", {
|
|
|
44121
44438
|
});
|
|
44122
44439
|
Object.defineProperty(exports, "DateInput", {
|
|
44123
44440
|
enumerable: true,
|
|
44124
|
-
get: function () { return
|
|
44441
|
+
get: function () { return chunkOAHORW4N_cjs.DateInput; }
|
|
44125
44442
|
});
|
|
44126
44443
|
Object.defineProperty(exports, "Modal", {
|
|
44127
44444
|
enumerable: true,
|