@wisemen/wise-crm-web 2.0.0-alpha.8 → 3.0.0-alpha.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/README.md +244 -0
- package/dist/ActivityList.vue_vue_type_script_setup_true_lang-CropNbOA.js +163 -0
- package/dist/BusinessDetailView-D3rC_KVS.js +207 -0
- package/dist/CrmDetailHeaderBadge.vue_vue_type_script_setup_true_lang-kIUc1Vkb.js +1008 -0
- package/dist/DealCommunicationTabView-JzuvTskR.js +240 -0
- package/dist/DealDetailView-wkFJCZc5.js +561 -0
- package/dist/IndividualDetailView-BtYagyLA.js +205 -0
- package/dist/{index-B3Abn7vf.js → index-BddOTAwb.js} +15822 -14980
- package/dist/index.d.ts +630 -164
- package/dist/index.js +23 -23
- package/dist/style.css +1 -1
- package/dist/testing.d.ts +685 -17
- package/dist/testing.js +6 -2
- package/dist/uuid.util-DUuuAgdg.js +3269 -0
- package/package.json +23 -20
- package/dist/BusinessDetailView-D8a2-c6x.js +0 -27
- package/dist/CrmDetailView.vue_vue_type_script_setup_true_lang-CnNcFNCP.js +0 -90
- package/dist/DealCommunicationTabView-j9epVy2E.js +0 -199
- package/dist/DealDetailView-C0osyh38.js +0 -1378
- package/dist/IndividualDetailView-kde5VlBp.js +0 -27
- package/dist/uuid.util-CaePLXHv.js +0 -6216
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { defineComponent as y, openBlock as t, createElementBlock as u, createBlock as r, resolveDynamicComponent as h, unref as e, createElementVNode as n, toDisplayString as p, createVNode as _, withCtx as c, createCommentVNode as f, Fragment as b, renderList as v, normalizeClass as k, computed as D } from "vue";
|
|
2
|
+
import { useRouteParams as I } from "@vueuse/router";
|
|
3
|
+
import { useOffsetInfiniteQuery as U } from "@wisemen/vue-core-api-utils";
|
|
4
|
+
import { M as C, u as z, _ as $, T as E, e as M, W as q, F as w, f as B, g as T, m as F, h as L, A as N } from "./index-BddOTAwb.js";
|
|
5
|
+
import { UIIconButton as S, UIEmptyState as V, UIBadge as j } from "@wisemen/vue-core-design-system";
|
|
6
|
+
import { AnimatePresence as H, Motion as Q } from "motion-v";
|
|
7
|
+
import { AccordionRoot as P, AccordionItem as W, AccordionHeader as O, AccordionTrigger as R, AccordionContent as G } from "reka-ui";
|
|
8
|
+
import { useI18n as J } from "vue-i18n";
|
|
9
|
+
function K(i) {
|
|
10
|
+
return U("mailIndex", {
|
|
11
|
+
params: {
|
|
12
|
+
queryParams: i.params
|
|
13
|
+
},
|
|
14
|
+
queryFn: (a) => C.getAll({
|
|
15
|
+
filters: i.params.filters.value,
|
|
16
|
+
pagination: a
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const X = { class: "group flex w-fit max-w-full items-center gap-xs rounded-md border border-secondary bg-primary py-xxs pr-xxs pl-sm" }, Y = { class: "truncate text-xs font-medium text-secondary" }, Z = /* @__PURE__ */ y({
|
|
21
|
+
__name: "DealExternalAttachment",
|
|
22
|
+
props: {
|
|
23
|
+
attachment: {}
|
|
24
|
+
},
|
|
25
|
+
setup(i) {
|
|
26
|
+
const a = i, d = z();
|
|
27
|
+
async function m(o) {
|
|
28
|
+
if (o.downloadUrl !== null) {
|
|
29
|
+
w.download(
|
|
30
|
+
o.downloadUrl,
|
|
31
|
+
o.name
|
|
32
|
+
);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const s = await B.download(o.uuid);
|
|
36
|
+
if (s.isErr()) {
|
|
37
|
+
d.show(s.error);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
w.downloadBlob(s.value, o.name);
|
|
41
|
+
}
|
|
42
|
+
return (o, s) => (t(), u("div", X, [
|
|
43
|
+
a.attachment.downloadUrl !== null && a.attachment.mimeType.startsWith("image/") ? (t(), r($, {
|
|
44
|
+
key: 0,
|
|
45
|
+
"is-zoom-enabled": !0,
|
|
46
|
+
alt: a.attachment.name,
|
|
47
|
+
src: a.attachment.downloadUrl,
|
|
48
|
+
blurhash: a.attachment.blurHash ?? null,
|
|
49
|
+
class: "size-5 shrink-0 rounded-xs",
|
|
50
|
+
fit: "cover"
|
|
51
|
+
}, null, 8, ["alt", "src", "blurhash"])) : (t(), r(h(e(E)), {
|
|
52
|
+
key: 1,
|
|
53
|
+
"aria-hidden": !0,
|
|
54
|
+
class: "size-3.5 shrink-0 text-fg-quaternary"
|
|
55
|
+
})),
|
|
56
|
+
n("p", Y, p(a.attachment.name), 1),
|
|
57
|
+
_(M, null, {
|
|
58
|
+
default: c(() => [
|
|
59
|
+
_(e(S), {
|
|
60
|
+
icon: e(q),
|
|
61
|
+
label: "Download",
|
|
62
|
+
variant: "tertiary",
|
|
63
|
+
size: "xs",
|
|
64
|
+
class: "shrink-0",
|
|
65
|
+
onClick: s[0] || (s[0] = (A) => m(i.attachment))
|
|
66
|
+
}, null, 8, ["icon"])
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})
|
|
70
|
+
]));
|
|
71
|
+
}
|
|
72
|
+
}), ee = { class: "px-xl pb-xl" }, te = { class: "rounded-xl border border-secondary bg-primary px-md pt-xl pb-md" }, ae = { class: "flex items-center gap-md px-lg pb-md" }, se = { class: "text-sm font-semibold text-primary" }, ne = {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: "inline-flex h-5.5 min-w-5.5 items-center justify-center rounded-sm bg-brand-50 px-sm text-xs font-medium text-brand-700 tabular-nums"
|
|
75
|
+
}, le = { class: "relative" }, re = { class: "sr-only" }, oe = { class: "flex min-w-0 flex-1 flex-col" }, ie = { class: "truncate text-sm font-semibold text-primary" }, ce = { class: "truncate text-xs text-tertiary" }, ue = { class: "flex flex-col gap-lg px-lg pt-md pb-xl" }, de = {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "flex flex-wrap gap-md"
|
|
78
|
+
}, me = ["innerHTML"], pe = /* @__PURE__ */ y({
|
|
79
|
+
__name: "DealCommunicationMailList",
|
|
80
|
+
props: {
|
|
81
|
+
mails: {}
|
|
82
|
+
},
|
|
83
|
+
setup(i) {
|
|
84
|
+
const a = i, d = J();
|
|
85
|
+
function m(s) {
|
|
86
|
+
return L().toDateTime(s.createdAt);
|
|
87
|
+
}
|
|
88
|
+
function o(s) {
|
|
89
|
+
return s.to.join(", ");
|
|
90
|
+
}
|
|
91
|
+
return (s, A) => (t(), u("div", ee, [
|
|
92
|
+
n("div", te, [
|
|
93
|
+
n("div", ae, [
|
|
94
|
+
(t(), r(h(e(T)), { class: "size-4 shrink-0 text-fg-quaternary" })),
|
|
95
|
+
n("p", se, p(e(d).t("wise_crm.deal.communication.mail_list.title")), 1),
|
|
96
|
+
a.mails.length > 0 ? (t(), u("span", ne, p(a.mails.length), 1)) : f("", !0)
|
|
97
|
+
]),
|
|
98
|
+
a.mails.length === 0 ? (t(), r(e(V), {
|
|
99
|
+
key: 0,
|
|
100
|
+
icon: e(T),
|
|
101
|
+
title: e(d).t("wise_crm.deal.communication.mail_list.no_communication_sent"),
|
|
102
|
+
description: e(d).t("wise_crm.deal.communication.mail_list.create_quote_instruction"),
|
|
103
|
+
class: "h-120"
|
|
104
|
+
}, null, 8, ["icon", "title", "description"])) : f("", !0),
|
|
105
|
+
a.mails.length > 0 ? (t(), r(e(P), {
|
|
106
|
+
key: 1,
|
|
107
|
+
collapsible: !0,
|
|
108
|
+
type: "multiple",
|
|
109
|
+
class: "flex flex-col gap-xxs"
|
|
110
|
+
}, {
|
|
111
|
+
default: c(() => [
|
|
112
|
+
(t(!0), u(b, null, v(a.mails, (l) => (t(), r(e(W), {
|
|
113
|
+
key: l.uuid,
|
|
114
|
+
value: l.uuid
|
|
115
|
+
}, {
|
|
116
|
+
default: c(({ open: x }) => [
|
|
117
|
+
_(e(O), null, {
|
|
118
|
+
default: c(() => [
|
|
119
|
+
n("div", le, [
|
|
120
|
+
_(e(R), { class: "peer absolute inset-0 rounded-lg ring-brand-500 duration-200 outline-none focus-visible:ring-2" }, {
|
|
121
|
+
default: c(() => [
|
|
122
|
+
n("span", re, p(l.subject), 1)
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, 1024),
|
|
126
|
+
n("div", {
|
|
127
|
+
class: k([{ "bg-secondary": x }, "pointer-events-none flex items-center gap-lg rounded-lg px-lg py-md transition-colors duration-100 peer-hover:bg-secondary"])
|
|
128
|
+
}, [
|
|
129
|
+
n("div", oe, [
|
|
130
|
+
n("p", ie, p(l.subject), 1),
|
|
131
|
+
n("p", ce, p(o(l)) + " · " + p(m(l)), 1)
|
|
132
|
+
]),
|
|
133
|
+
l.mailTemplateDisplayName !== null ? (t(), r(e(j), {
|
|
134
|
+
key: 0,
|
|
135
|
+
label: l.mailTemplateDisplayName,
|
|
136
|
+
"class-config": {
|
|
137
|
+
root: "shrink-0"
|
|
138
|
+
},
|
|
139
|
+
variant: "outline",
|
|
140
|
+
color: "gray",
|
|
141
|
+
size: "sm"
|
|
142
|
+
}, null, 8, ["label"])) : f("", !0),
|
|
143
|
+
(t(), r(h(e(F)), {
|
|
144
|
+
class: k([{
|
|
145
|
+
"-rotate-180": x
|
|
146
|
+
}, "size-4 shrink-0 text-fg-quaternary duration-300"])
|
|
147
|
+
}, null, 8, ["class"]))
|
|
148
|
+
], 2)
|
|
149
|
+
])
|
|
150
|
+
]),
|
|
151
|
+
_: 2
|
|
152
|
+
}, 1024),
|
|
153
|
+
_(e(H), { initial: !1 }, {
|
|
154
|
+
default: c(() => [
|
|
155
|
+
x ? (t(), r(e(G), {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: "overflow-clip"
|
|
158
|
+
}, {
|
|
159
|
+
default: c(() => [
|
|
160
|
+
_(e(Q), {
|
|
161
|
+
initial: {
|
|
162
|
+
opacity: 0,
|
|
163
|
+
height: 0,
|
|
164
|
+
y: -10
|
|
165
|
+
},
|
|
166
|
+
animate: {
|
|
167
|
+
opacity: 1,
|
|
168
|
+
height: "auto",
|
|
169
|
+
filter: "blur(0px)",
|
|
170
|
+
y: 0
|
|
171
|
+
},
|
|
172
|
+
exit: {
|
|
173
|
+
opacity: 0,
|
|
174
|
+
height: 0,
|
|
175
|
+
filter: "blur(5px)",
|
|
176
|
+
y: -10
|
|
177
|
+
},
|
|
178
|
+
transition: {
|
|
179
|
+
bounce: 0,
|
|
180
|
+
duration: 0.4,
|
|
181
|
+
type: "spring"
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
default: c(() => [
|
|
185
|
+
n("div", ue, [
|
|
186
|
+
l.attachments.length > 0 ? (t(), u("div", de, [
|
|
187
|
+
(t(!0), u(b, null, v(l.attachments, (g) => (t(), r(Z, {
|
|
188
|
+
key: g.uuid,
|
|
189
|
+
attachment: g
|
|
190
|
+
}, null, 8, ["attachment"]))), 128))
|
|
191
|
+
])) : f("", !0),
|
|
192
|
+
n("div", {
|
|
193
|
+
class: "prose prose-sm max-w-full",
|
|
194
|
+
innerHTML: l.text
|
|
195
|
+
}, null, 8, me)
|
|
196
|
+
])
|
|
197
|
+
]),
|
|
198
|
+
_: 2
|
|
199
|
+
}, 1024)
|
|
200
|
+
]),
|
|
201
|
+
_: 2
|
|
202
|
+
}, 1024)) : f("", !0)
|
|
203
|
+
]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, 1024)
|
|
206
|
+
]),
|
|
207
|
+
_: 2
|
|
208
|
+
}, 1032, ["value"]))), 128))
|
|
209
|
+
]),
|
|
210
|
+
_: 1
|
|
211
|
+
})) : f("", !0)
|
|
212
|
+
])
|
|
213
|
+
]));
|
|
214
|
+
}
|
|
215
|
+
}), fe = {
|
|
216
|
+
key: 0,
|
|
217
|
+
class: "px-xl pb-xl"
|
|
218
|
+
}, we = /* @__PURE__ */ y({
|
|
219
|
+
__name: "DealCommunicationTabView",
|
|
220
|
+
setup(i) {
|
|
221
|
+
const a = I("dealUuid"), d = D(() => ({
|
|
222
|
+
dealUuid: a.value
|
|
223
|
+
})), m = K({
|
|
224
|
+
params: {
|
|
225
|
+
filters: d
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
return (o, s) => (t(), u("div", null, [
|
|
229
|
+
e(m).isLoading.value ? (t(), u("div", fe, [
|
|
230
|
+
_(N, { class: "h-150 w-full" })
|
|
231
|
+
])) : e(m).result.value.isOk() ? (t(), r(pe, {
|
|
232
|
+
key: 1,
|
|
233
|
+
mails: e(m).result.value.getValue().data
|
|
234
|
+
}, null, 8, ["mails"])) : f("", !0)
|
|
235
|
+
]));
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
export {
|
|
239
|
+
we as default
|
|
240
|
+
};
|