@eka-care/medassist-widget 0.1.88 → 0.1.89-dev.1
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 → medassist-widget-CardList-CVIEpN-E.js}
RENAMED
|
@@ -2,7 +2,7 @@ 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
|
|
|
2
2
|
import { C as A } from "./medassist-widget-check-BaHLRs-2.js";
|
|
3
3
|
import { M as v } from "./medassist-widget-map-pin-Bx-5lPdC.js";
|
|
4
4
|
import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-BsLIZftX.js";
|
|
5
|
-
const
|
|
5
|
+
const B = [
|
|
6
6
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
7
7
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
8
8
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -14,13 +14,13 @@ const H = [
|
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
17
|
-
], N = c("building-2",
|
|
18
|
-
const
|
|
17
|
+
], N = c("building-2", B);
|
|
18
|
+
const H = [
|
|
19
19
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
20
20
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
21
21
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
22
22
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
23
|
-
], V = c("calendar",
|
|
23
|
+
], V = c("calendar", H);
|
|
24
24
|
const q = [
|
|
25
25
|
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
|
|
26
26
|
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
|
|
@@ -79,87 +79,87 @@ const G = [
|
|
|
79
79
|
euro: R
|
|
80
80
|
};
|
|
81
81
|
function y({
|
|
82
|
-
name:
|
|
82
|
+
name: a,
|
|
83
83
|
className: d,
|
|
84
|
-
size:
|
|
84
|
+
size: r = 16
|
|
85
85
|
}) {
|
|
86
|
-
const
|
|
87
|
-
if (!
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
return /* @__PURE__ */ e(
|
|
86
|
+
const l = a?.trim().toLowerCase().replace(/\s+/g, "_");
|
|
87
|
+
if (!l) return null;
|
|
88
|
+
const o = Z[l];
|
|
89
|
+
if (o)
|
|
90
|
+
return /* @__PURE__ */ e(o, { className: d, size: r, "aria-hidden": !0 });
|
|
91
91
|
}
|
|
92
92
|
function _({
|
|
93
|
-
card:
|
|
93
|
+
card: a,
|
|
94
94
|
onSelect: d,
|
|
95
|
-
disabled:
|
|
95
|
+
disabled: r = !1
|
|
96
96
|
}) {
|
|
97
97
|
const {
|
|
98
|
-
title:
|
|
99
|
-
tags:
|
|
98
|
+
title: l,
|
|
99
|
+
tags: o,
|
|
100
100
|
icon: p,
|
|
101
101
|
img: m,
|
|
102
102
|
description: h,
|
|
103
|
-
banner_text:
|
|
104
|
-
items:
|
|
105
|
-
primary_cta:
|
|
103
|
+
banner_text: i,
|
|
104
|
+
items: u,
|
|
105
|
+
primary_cta: t,
|
|
106
106
|
secondary_cta: s
|
|
107
|
-
} =
|
|
108
|
-
if (!
|
|
107
|
+
} = a, k = (n) => {
|
|
108
|
+
if (!r && (n.link && window.open(n.link, "_blank", "noopener,noreferrer"), n.text || n.title)) {
|
|
109
109
|
let f = !1;
|
|
110
|
-
|
|
110
|
+
a?.primary_cta?.tool_result && (f = !0), d?.({ message: n.text || n.title, selectedCard: a?.title, selectedComponent: a, selected_id: a.card_id, ...f ? { tool_result: a.primary_cta?.tool_result } : {} });
|
|
111
111
|
}
|
|
112
112
|
}, g = !!m;
|
|
113
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
114
|
/* @__PURE__ */ e(M, { className: `flex flex-row items-center justify-between gap-3 p-3 ${g ? "bg-primary/[20%]" : ""}`, children: [
|
|
115
115
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
l ? /* @__PURE__ */ e(b, { className: "text-base font-bold leading-tight tracking-tight truncate", children: l }) : null,
|
|
117
|
+
o ? /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-muted-foreground truncate", children: o }) : null
|
|
118
118
|
] }),
|
|
119
119
|
g ? /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(
|
|
120
120
|
"img",
|
|
121
121
|
{
|
|
122
122
|
src: m,
|
|
123
|
-
alt:
|
|
123
|
+
alt: l ?? "profile",
|
|
124
124
|
className: "h-16 w-16 rounded-full object-cover border-2 border-background"
|
|
125
125
|
}
|
|
126
126
|
) }) : p ? /* @__PURE__ */ e("div", { className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ e(y, { name: p, size: 24, className: "text-primary" }) }) : null
|
|
127
127
|
] }),
|
|
128
128
|
/* @__PURE__ */ e(w, { className: "flex-1 space-y-3 pt-3 overflow-hidden", children: [
|
|
129
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
|
-
|
|
131
|
-
|
|
130
|
+
i ? /* @__PURE__ */ e("div", { className: "rounded-full px-4 py-2 text-center text-sm font-semibold bg-primary/15 text-primary truncate", children: i }) : null,
|
|
131
|
+
u?.length ? /* @__PURE__ */ e("div", { className: "flex flex-col gap-y-1", children: u.map((n, f) => /* @__PURE__ */ e(
|
|
132
132
|
"div",
|
|
133
133
|
{
|
|
134
134
|
className: "flex items-center gap-1.5 text-xs text-foreground min-w-0",
|
|
135
135
|
children: [
|
|
136
|
-
|
|
136
|
+
n.icon ? /* @__PURE__ */ e(
|
|
137
137
|
y,
|
|
138
138
|
{
|
|
139
|
-
name:
|
|
139
|
+
name: n.icon,
|
|
140
140
|
size: 12,
|
|
141
141
|
className: "shrink-0 text-muted-foreground"
|
|
142
142
|
}
|
|
143
143
|
) : null,
|
|
144
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
144
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: n.text })
|
|
145
145
|
]
|
|
146
146
|
},
|
|
147
147
|
f
|
|
148
148
|
)) }) : null
|
|
149
149
|
] }),
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
t?.title || s?.title ? /* @__PURE__ */ e(z, { className: "flex justify-center flex-wrap gap-2 pt-0", children: [
|
|
151
|
+
t && /* @__PURE__ */ e(
|
|
152
152
|
x,
|
|
153
153
|
{
|
|
154
154
|
type: "button",
|
|
155
155
|
variant: "default",
|
|
156
156
|
size: "sm",
|
|
157
157
|
className: `gap-1.5 truncate ${s ? "" : "w-full"}`,
|
|
158
|
-
disabled:
|
|
159
|
-
onClick: () => k(
|
|
158
|
+
disabled: r,
|
|
159
|
+
onClick: () => k(t),
|
|
160
160
|
children: [
|
|
161
|
-
|
|
162
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
161
|
+
t.icon ? /* @__PURE__ */ e(y, { name: t.icon, size: 14, className: "shrink-0" }) : null,
|
|
162
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: t.title })
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
165
|
),
|
|
@@ -170,7 +170,7 @@ function _({
|
|
|
170
170
|
variant: "outline",
|
|
171
171
|
size: "sm",
|
|
172
172
|
className: "gap-1.5 truncate",
|
|
173
|
-
disabled:
|
|
173
|
+
disabled: r,
|
|
174
174
|
onClick: () => k(s),
|
|
175
175
|
children: [
|
|
176
176
|
s.icon ? /* @__PURE__ */ e(y, { name: s.icon, size: 14, className: "shrink-0" }) : null,
|
|
@@ -182,36 +182,36 @@ function _({
|
|
|
182
182
|
] });
|
|
183
183
|
}
|
|
184
184
|
function W({
|
|
185
|
-
cards:
|
|
185
|
+
cards: a,
|
|
186
186
|
onSelect: d,
|
|
187
|
-
disabled:
|
|
188
|
-
className:
|
|
189
|
-
orientation:
|
|
187
|
+
disabled: r = !1,
|
|
188
|
+
className: l,
|
|
189
|
+
orientation: o = "vertical"
|
|
190
190
|
}) {
|
|
191
|
-
const [p, m] = $(!1), h = j(!1);
|
|
192
|
-
if (!
|
|
191
|
+
const [p, m] = $(!1), h = j(!1), i = (a ?? []).filter((t) => !!t?.card_id);
|
|
192
|
+
if (!i.length)
|
|
193
193
|
return /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground py-2", children: "No options available." });
|
|
194
|
-
const u = async (
|
|
195
|
-
h.current || (h.current = !0, m(!0), await d?.(
|
|
194
|
+
const u = async (t) => {
|
|
195
|
+
h.current || (h.current = !0, m(!0), await d?.(t));
|
|
196
196
|
};
|
|
197
|
-
return
|
|
197
|
+
return o !== "horizontal" ? /* @__PURE__ */ e("div", { className: l ?? "flex flex-col gap-3 mt-3", children: i.map((t) => /* @__PURE__ */ e(
|
|
198
198
|
_,
|
|
199
199
|
{
|
|
200
|
-
card:
|
|
200
|
+
card: t,
|
|
201
201
|
onSelect: u,
|
|
202
|
-
disabled:
|
|
202
|
+
disabled: r || p
|
|
203
203
|
},
|
|
204
|
-
|
|
204
|
+
t.card_id
|
|
205
205
|
)) }) : /* @__PURE__ */ e(
|
|
206
206
|
I,
|
|
207
207
|
{
|
|
208
|
-
count:
|
|
209
|
-
renderItem: (
|
|
208
|
+
count: i.length,
|
|
209
|
+
renderItem: (t) => /* @__PURE__ */ e(
|
|
210
210
|
_,
|
|
211
211
|
{
|
|
212
|
-
card: t
|
|
212
|
+
card: i[t],
|
|
213
213
|
onSelect: u,
|
|
214
|
-
disabled:
|
|
214
|
+
disabled: r || p
|
|
215
215
|
}
|
|
216
216
|
)
|
|
217
217
|
}
|
package/dist/{medassist-widget-MediaCard-DRUToQV3.js → medassist-widget-MediaCard-DpQAFyNd.js}
RENAMED
|
@@ -13,13 +13,13 @@ const b = [
|
|
|
13
13
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
14
14
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
15
15
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
16
|
-
],
|
|
16
|
+
], y = m("download", b);
|
|
17
17
|
function i(a) {
|
|
18
18
|
return a.toLowerCase().endsWith(".pdf");
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function v(a) {
|
|
21
21
|
const n = document?.createElement("a");
|
|
22
|
-
n.href = a, n.download = a.split("/").pop() ?? "download.pdf", n.target = "_blank", n.click(), document?.body?.removeChild(n);
|
|
22
|
+
n.href = a, n.download = a.split("/").pop() ?? "download.pdf", n.target = "_blank", document?.body?.appendChild(n), n.click(), document?.body?.removeChild(n);
|
|
23
23
|
}
|
|
24
24
|
async function N(a) {
|
|
25
25
|
if (!a.current) return;
|
|
@@ -32,7 +32,7 @@ async function k(a) {
|
|
|
32
32
|
t.href = o.toDataURL("image/png"), t.download = `screenshot-${Date.now()}.png`, t.click();
|
|
33
33
|
}
|
|
34
34
|
function _({ card: a }) {
|
|
35
|
-
const { title: n, description: o, tags_text: t, banner_text: l, action:
|
|
35
|
+
const { title: n, description: o, tags_text: t, banner_text: l, action: r, link: c } = a, s = u(null), d = c && !i(c);
|
|
36
36
|
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: [
|
|
37
37
|
/* @__PURE__ */ e(
|
|
38
38
|
h,
|
|
@@ -49,7 +49,7 @@ function _({ card: a }) {
|
|
|
49
49
|
d && /* @__PURE__ */ e("div", { className: "shrink-0 h-24 w-24 rounded-lg overflow-hidden border border-border", children: /* @__PURE__ */ e(
|
|
50
50
|
"img",
|
|
51
51
|
{
|
|
52
|
-
src:
|
|
52
|
+
src: c,
|
|
53
53
|
alt: n ?? "media",
|
|
54
54
|
className: "h-full w-full object-cover"
|
|
55
55
|
}
|
|
@@ -62,7 +62,7 @@ function _({ card: a }) {
|
|
|
62
62
|
] })
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
|
|
65
|
+
r && /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ e(
|
|
66
66
|
g,
|
|
67
67
|
{
|
|
68
68
|
type: "button",
|
|
@@ -70,11 +70,11 @@ function _({ card: a }) {
|
|
|
70
70
|
size: "sm",
|
|
71
71
|
className: "rounded-md px-5 gap-1.5",
|
|
72
72
|
onClick: () => {
|
|
73
|
-
|
|
73
|
+
r === "screenshot" ? k(s) : r === "download" && (c && i(c) ? v(c) : N(s));
|
|
74
74
|
},
|
|
75
75
|
children: [
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
r === "screenshot" ? /* @__PURE__ */ e(w, { className: "h-4 w-4" }) : /* @__PURE__ */ e(y, { className: "h-4 w-4" }),
|
|
77
|
+
r === "screenshot" ? "Screenshot" : "Download"
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
) })
|