@eka-care/medassist-widget 0.1.86-1 → 0.1.86-2
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/medassist-widget-CardList-BR2hjo_A.js +222 -1
- package/dist/medassist-widget-DoctorCard-BdLitZW0.js +460 -1
- package/dist/medassist-widget-FocusCarousel-BsLIZftX.js +90 -1
- package/dist/medassist-widget-MediaCard-DRUToQV3.js +85 -1
- package/dist/medassist-widget-MultiSelect-BnExX-Ty.js +414 -1
- package/dist/medassist-widget-VoiceAgentScreen-BK0p37RC.js +380 -3
- package/dist/medassist-widget-check-BaHLRs-2.js +5 -1
- package/dist/medassist-widget-chevron-right-CKYbGWbY.js +7 -1
- package/dist/medassist-widget-html2canvas.esm-CphxV6YW.js +4833 -3
- package/dist/medassist-widget-map-pin-Bx-5lPdC.js +14 -1
- package/dist/medassist-widget.js +12990 -15
- package/package.json +1 -1
|
@@ -1 +1,222 @@
|
|
|
1
|
-
import{c
|
|
1
|
+
import { c, u as e, k as M, t as b, p as w, r as C, v as z, B as x, s as S, d as $, A as j } from "./medassist-widget.js";
|
|
2
|
+
import { C as A } from "./medassist-widget-check-BaHLRs-2.js";
|
|
3
|
+
import { M as v } from "./medassist-widget-map-pin-Bx-5lPdC.js";
|
|
4
|
+
import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-BsLIZftX.js";
|
|
5
|
+
const H = [
|
|
6
|
+
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
7
|
+
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
8
|
+
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
9
|
+
[
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",
|
|
13
|
+
key: "secmi2"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
17
|
+
], N = c("building-2", H);
|
|
18
|
+
const B = [
|
|
19
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
20
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
21
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
22
|
+
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
23
|
+
], V = c("calendar", B);
|
|
24
|
+
const q = [
|
|
25
|
+
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
|
|
26
|
+
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
|
|
27
|
+
], D = c("dollar-sign", q);
|
|
28
|
+
const L = [
|
|
29
|
+
["path", { d: "M4 10h12", key: "1y6xl8" }],
|
|
30
|
+
["path", { d: "M4 14h9", key: "1loblj" }],
|
|
31
|
+
[
|
|
32
|
+
"path",
|
|
33
|
+
{
|
|
34
|
+
d: "M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",
|
|
35
|
+
key: "1j6lzo"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
], R = c("euro", L);
|
|
39
|
+
const T = [
|
|
40
|
+
["path", { d: "M6 3h12", key: "ggurg9" }],
|
|
41
|
+
["path", { d: "M6 8h12", key: "6g4wlu" }],
|
|
42
|
+
["path", { d: "m6 13 8.5 8", key: "u1kupk" }],
|
|
43
|
+
["path", { d: "M6 13h3", key: "wdp6ag" }],
|
|
44
|
+
["path", { d: "M9 13c6.667 0 6.667-10 0-10", key: "1nkvk2" }]
|
|
45
|
+
], F = c("indian-rupee", T);
|
|
46
|
+
const P = [
|
|
47
|
+
[
|
|
48
|
+
"path",
|
|
49
|
+
{
|
|
50
|
+
d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",
|
|
51
|
+
key: "169xi5"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
55
|
+
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
56
|
+
], E = c("map", P);
|
|
57
|
+
const G = [
|
|
58
|
+
[
|
|
59
|
+
"path",
|
|
60
|
+
{
|
|
61
|
+
d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",
|
|
62
|
+
key: "qn84l0"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
["path", { d: "M13 5v2", key: "dyzc3o" }],
|
|
66
|
+
["path", { d: "M13 17v2", key: "1ont0d" }],
|
|
67
|
+
["path", { d: "M13 11v2", key: "1wjjxi" }]
|
|
68
|
+
], O = c("ticket", G), Z = {
|
|
69
|
+
voucher: O,
|
|
70
|
+
pharmacy: N,
|
|
71
|
+
hospital: N,
|
|
72
|
+
map: E,
|
|
73
|
+
location_pin: v,
|
|
74
|
+
"location pin": v,
|
|
75
|
+
check: A,
|
|
76
|
+
calendar: V,
|
|
77
|
+
rupee: F,
|
|
78
|
+
dollar: D,
|
|
79
|
+
euro: R
|
|
80
|
+
};
|
|
81
|
+
function y({
|
|
82
|
+
name: t,
|
|
83
|
+
className: d,
|
|
84
|
+
size: l = 16
|
|
85
|
+
}) {
|
|
86
|
+
const r = t?.trim().toLowerCase().replace(/\s+/g, "_");
|
|
87
|
+
if (!r) return null;
|
|
88
|
+
const i = Z[r];
|
|
89
|
+
if (i)
|
|
90
|
+
return /* @__PURE__ */ e(i, { className: d, size: l, "aria-hidden": !0 });
|
|
91
|
+
}
|
|
92
|
+
function _({
|
|
93
|
+
card: t,
|
|
94
|
+
onSelect: d,
|
|
95
|
+
disabled: l = !1
|
|
96
|
+
}) {
|
|
97
|
+
const {
|
|
98
|
+
title: r,
|
|
99
|
+
tags: i,
|
|
100
|
+
icon: p,
|
|
101
|
+
img: m,
|
|
102
|
+
description: h,
|
|
103
|
+
banner_text: u,
|
|
104
|
+
items: n,
|
|
105
|
+
primary_cta: o,
|
|
106
|
+
secondary_cta: s
|
|
107
|
+
} = t, k = (a) => {
|
|
108
|
+
if (!l && (a.link && window.open(a.link, "_blank", "noopener,noreferrer"), a.text || a.title)) {
|
|
109
|
+
let f = !1;
|
|
110
|
+
t?.primary_cta?.tool_result && (f = !0), d?.({ message: a.text || a.title, selectedCard: t?.title, selectedComponent: t, selected_id: t.card_id, ...f ? { tool_result: t.primary_cta?.tool_result } : {} });
|
|
111
|
+
}
|
|
112
|
+
}, g = !!m;
|
|
113
|
+
return /* @__PURE__ */ e(S, { className: "w-full h-full flex flex-col overflow-hidden rounded-xl border border-black-200 dark:border-white-200 bg-elicitationBg text-card-foreground shadow-none", children: [
|
|
114
|
+
/* @__PURE__ */ e(M, { className: `flex flex-row items-center justify-between gap-3 p-3 ${g ? "bg-primary/[20%]" : ""}`, children: [
|
|
115
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
116
|
+
r ? /* @__PURE__ */ e(b, { className: "text-base font-bold leading-tight tracking-tight truncate", children: r }) : null,
|
|
117
|
+
i ? /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-muted-foreground truncate", children: i }) : null
|
|
118
|
+
] }),
|
|
119
|
+
g ? /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(
|
|
120
|
+
"img",
|
|
121
|
+
{
|
|
122
|
+
src: m,
|
|
123
|
+
alt: r ?? "profile",
|
|
124
|
+
className: "h-16 w-16 rounded-full object-cover border-2 border-background"
|
|
125
|
+
}
|
|
126
|
+
) }) : p ? /* @__PURE__ */ e("div", { className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ e(y, { name: p, size: 24, className: "text-primary" }) }) : null
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ e(w, { className: "flex-1 space-y-3 pt-3 overflow-hidden", children: [
|
|
129
|
+
h ? /* @__PURE__ */ e("div", { className: "text-sm text-foreground leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words", children: /* @__PURE__ */ e(C, { children: h }) }) : null,
|
|
130
|
+
u ? /* @__PURE__ */ e("div", { className: "rounded-full px-4 py-2 text-center text-sm font-semibold bg-primary/15 text-primary truncate", children: u }) : null,
|
|
131
|
+
n?.length ? /* @__PURE__ */ e("div", { className: "flex flex-col gap-y-1", children: n.map((a, f) => /* @__PURE__ */ e(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: "flex items-center gap-1.5 text-xs text-foreground min-w-0",
|
|
135
|
+
children: [
|
|
136
|
+
a.icon ? /* @__PURE__ */ e(
|
|
137
|
+
y,
|
|
138
|
+
{
|
|
139
|
+
name: a.icon,
|
|
140
|
+
size: 12,
|
|
141
|
+
className: "shrink-0 text-muted-foreground"
|
|
142
|
+
}
|
|
143
|
+
) : null,
|
|
144
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: a.text })
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
f
|
|
148
|
+
)) }) : null
|
|
149
|
+
] }),
|
|
150
|
+
o?.title || s?.title ? /* @__PURE__ */ e(z, { className: "flex justify-center flex-wrap gap-2 pt-0", children: [
|
|
151
|
+
o && /* @__PURE__ */ e(
|
|
152
|
+
x,
|
|
153
|
+
{
|
|
154
|
+
type: "button",
|
|
155
|
+
variant: "default",
|
|
156
|
+
size: "sm",
|
|
157
|
+
className: `gap-1.5 truncate ${s ? "" : "w-full"}`,
|
|
158
|
+
disabled: l,
|
|
159
|
+
onClick: () => k(o),
|
|
160
|
+
children: [
|
|
161
|
+
o.icon ? /* @__PURE__ */ e(y, { name: o.icon, size: 14, className: "shrink-0" }) : null,
|
|
162
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: o.title })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
s && /* @__PURE__ */ e(
|
|
167
|
+
x,
|
|
168
|
+
{
|
|
169
|
+
type: "button",
|
|
170
|
+
variant: "outline",
|
|
171
|
+
size: "sm",
|
|
172
|
+
className: "gap-1.5 truncate",
|
|
173
|
+
disabled: l,
|
|
174
|
+
onClick: () => k(s),
|
|
175
|
+
children: [
|
|
176
|
+
s.icon ? /* @__PURE__ */ e(y, { name: s.icon, size: 14, className: "shrink-0" }) : null,
|
|
177
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: s.title })
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
] }) : null
|
|
182
|
+
] });
|
|
183
|
+
}
|
|
184
|
+
function W({
|
|
185
|
+
cards: t,
|
|
186
|
+
onSelect: d,
|
|
187
|
+
disabled: l = !1,
|
|
188
|
+
className: r,
|
|
189
|
+
orientation: i = "vertical"
|
|
190
|
+
}) {
|
|
191
|
+
const [p, m] = $(!1), h = j(!1);
|
|
192
|
+
if (!t?.length)
|
|
193
|
+
return /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground py-2", children: "No options available." });
|
|
194
|
+
const u = async (n) => {
|
|
195
|
+
h.current || (h.current = !0, m(!0), await d?.(n));
|
|
196
|
+
};
|
|
197
|
+
return i !== "horizontal" ? /* @__PURE__ */ e("div", { className: r ?? "flex flex-col gap-3 mt-3", children: t.map((n, o) => /* @__PURE__ */ e(
|
|
198
|
+
_,
|
|
199
|
+
{
|
|
200
|
+
card: n,
|
|
201
|
+
onSelect: u,
|
|
202
|
+
disabled: l || p
|
|
203
|
+
},
|
|
204
|
+
n.card_id || o
|
|
205
|
+
)) }) : /* @__PURE__ */ e(
|
|
206
|
+
I,
|
|
207
|
+
{
|
|
208
|
+
count: t.length,
|
|
209
|
+
renderItem: (n) => /* @__PURE__ */ e(
|
|
210
|
+
_,
|
|
211
|
+
{
|
|
212
|
+
card: t[n],
|
|
213
|
+
onSelect: u,
|
|
214
|
+
disabled: l || p
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
export {
|
|
221
|
+
W as CardList
|
|
222
|
+
};
|