@wisemen/wise-crm-web 0.2.0 → 0.2.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/README.md +1037 -0
- package/dist/BusinessDetailSidebarProvider-BQMRbGHQ.js +2083 -0
- package/dist/{BusinessDetailView-DvhFfuGg.js → BusinessDetailView-BxGxWOme.js} +5 -5
- package/dist/{CrmDetailHeaderCard-e5332OkQ.js → CrmDetailHeaderCard-CCNJpMAK.js} +68 -67
- package/dist/{CrmDetailView-C-lsAhtD.js → CrmDetailView-ozCpuaX2.js} +14 -14
- package/dist/{DealCommunicationTabView-e7NkRy9r.js → DealCommunicationTabView-Df5EeolN.js} +2 -2
- package/dist/{DealDetailView-BDCbOBoo.js → DealDetailView-DdWHqaBr.js} +163 -163
- package/dist/{DealExternalAttachment-D1PznE3V.js → DealExternalAttachment-qHdh4yMI.js} +1 -1
- package/dist/{DealSendMailDialog-DVE2iYQC.js → DealSendMailDialog-BaYcWZP-.js} +65 -69
- package/dist/Error-BArv9rNb.js +12650 -0
- package/dist/IndividualDetailSidebarProvider-BXZH951l.js +608 -0
- package/dist/{IndividualDetailView-B7dX3hZ8.js → IndividualDetailView-DfYS31-e.js} +5 -5
- package/dist/LinkBrokenIcon-CTlqmapl.js +17 -0
- package/dist/api/mutations/deal/dealCreate.mutation.d.ts +1 -1
- package/dist/api/mutations/deal/dealUpdate.mutation.d.ts +3 -3
- package/dist/api/mutations/mail-template/mailTemplateUpdate.mutation.d.ts +1 -1
- package/dist/client/apiErrorCode.gen.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +20 -17
- package/dist/client/types.gen.d.ts +1057 -1376
- package/dist/client/zod.gen.d.ts +15453 -17750
- package/dist/{client-BP13IBbl.js → client-pCaNxE3C.js} +748 -1047
- package/dist/components/app/dialog/AppConfirmDialog.vue.d.ts +2 -2
- package/dist/components/crm-detail/CrmDetailHeaderCard.vue.d.ts +2 -0
- package/dist/components/crm-detail/CrmDetailSidebarAccordionContactPersonInfo.vue.d.ts +2 -2
- package/dist/components/crm-detail/CrmDetailSidebarAccordionGenericContactPersonInfo.vue.d.ts +2 -2
- package/dist/components/notes/NoteList.vue.d.ts +2 -2
- package/dist/deal/components/DealSendMailForm.vue.d.ts +2 -2
- package/dist/deal/components/DealSendMailFormFooter.vue.d.ts +1 -1
- package/dist/deal/components/DealSettingsDialogMailTemplateForm.vue.d.ts +2 -2
- package/dist/deal/components/DealSettingsDialogMailTemplateFormFields.vue.d.ts +2 -2
- package/dist/dialogs/contact-create/ContactCreateDialog.vue.d.ts +1 -1
- package/dist/dialogs/contact-create/components/ContactCreateDialogBusinessContactPersonSearch.vue.d.ts +2 -2
- package/dist/dialogs/contact-create/components/ContactCreateDialogBusinessGeneralInfo.vue.d.ts +2 -2
- package/dist/dialogs/contact-create/components/ContactCreateDialogFooter.vue.d.ts +2 -2
- package/dist/dialogs/contact-create/components/ContactCreateDialogFormSection.vue.d.ts +2 -2
- package/dist/dialogs/note/CrmDetailSidebarNotesView.vue.d.ts +2 -2
- package/dist/icons/LinkBrokenIcon.vue.d.ts +3 -0
- package/dist/icons/icon.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +448 -453
- package/dist/models/brand-colors/brandColor.model.d.ts +14 -0
- package/dist/models/brand-colors/brandColor.transformer.d.ts +5 -0
- package/dist/models/conent-locale/contentLocaleEnum.model.d.ts +3 -3
- package/dist/models/deal/create/dealCreateForm.model.d.ts +2 -2
- package/dist/models/deal/detail/dealDetail.model.d.ts +2 -2
- package/dist/models/deal/index/dealIndex.model.d.ts +2 -2
- package/dist/models/deal/update/dealUpdateForm.model.d.ts +2 -2
- package/dist/models/mail-template/detail/mailTemplateDetail.model.d.ts +2 -2
- package/dist/models/mail-template/update/mailTemplateUpdateForm.model.d.ts +3 -3
- package/dist/models/phone-number/phoneNumberForm.model.d.ts +3 -0
- package/dist/models/tenant-config/tenantConfig.model.d.ts +3 -0
- package/dist/plugins/i18n.plugin.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/testing/factories/business.factory.d.ts +2 -1
- package/dist/testing.js +23 -2
- package/package.json +2 -1
- package/dist/BusinessDetailSidebarProvider-D11bjWFa.js +0 -2081
- package/dist/BusinessDetailSidebarProvider-DYY-Uzvx.js +0 -2081
- package/dist/BusinessDetailSidebarProvider-ZYGQoNHh.js +0 -2081
- package/dist/BusinessDetailView-BOCy7G-w.js +0 -24
- package/dist/BusinessDetailView-WaATSNQS.js +0 -24
- package/dist/CrmDetailHeaderCard-C-JNdi7s.js +0 -2515
- package/dist/CrmDetailHeaderCard-qkNK-2wR.js +0 -2515
- package/dist/CrmDetailView-C6Xm1Lp6.js +0 -65
- package/dist/CrmDetailView-DQehs8Fb.js +0 -65
- package/dist/DealDetailView-BfkDNvK4.js +0 -1021
- package/dist/DealDetailView-Cs5TDhih.js +0 -1021
- package/dist/DealSendMailDialog-D5Voyhhc.js +0 -1556
- package/dist/DealSendMailDialog-OAn6xjLq.js +0 -1556
- package/dist/Error-5vt6UD4m.js +0 -3708
- package/dist/Error-B4TwHEhb.js +0 -3706
- package/dist/Error-BPxDpKcI.js +0 -3706
- package/dist/IndividualDetailSidebarProvider-CvZQdjzp.js +0 -606
- package/dist/IndividualDetailSidebarProvider-DBITt-9W.js +0 -606
- package/dist/IndividualDetailSidebarProvider-vIu7Hv8O.js +0 -606
- package/dist/IndividualDetailView-B1vbJXGc.js +0 -24
- package/dist/IndividualDetailView-BKEs0XS5.js +0 -24
- /package/dist/{LinkExternalIcon-B9Qg55Oa.js → LinkExternalIcon-LOVtSqBT.js} +0 -0
- /package/dist/{LinkIcon-DCW5zjbQ.js → LinkIcon-DqBbVrvs.js} +0 -0
- /package/dist/{LocationPinIcon-DBc-wt2e.js → LocationPinIcon-Cp-wRgk2.js} +0 -0
- /package/dist/{MailIcon-Do4a7S2W.js → MailIcon-CnTrB1k3.js} +0 -0
- /package/dist/{MobilePhoneIcon-DSXyKwjd.js → MobilePhoneIcon-B747hmpS.js} +0 -0
- /package/dist/{NumberedListIcon-DUaSJSYu.js → NumberedListIcon-amJxDaaD.js} +0 -0
- /package/dist/{PhoneIcon-C8Cv1IiW.js → PhoneIcon-94MYVL85.js} +0 -0
- /package/dist/{RefreshIcon-CKZgHIZU.js → RefreshIcon-DRe3coBc.js} +0 -0
- /package/dist/{SendIcon-B-sQkQ3W.js → SendIcon-MYItp1xI.js} +0 -0
- /package/dist/{SettingsIcon-DzP-IQS5.js → SettingsIcon-C0qTAv0w.js} +0 -0
- /package/dist/{StarOutlineIcon-c0VfXRdQ.js → StarOutlineIcon-CiFLgepk.js} +0 -0
- /package/dist/{StarYellowIcon-CH0CnlSU.js → StarYellowIcon-C0v_XGwI.js} +0 -0
- /package/dist/{ThreeDotsIcon-C6PCFq5J.js → ThreeDotsIcon-lujOTU3G.js} +0 -0
- /package/dist/{TimeLineMarkerIcon-6B6SbwTN.js → TimeLineMarkerIcon-C4LfErbc.js} +0 -0
- /package/dist/{TrashIcon-BTPSVviz.js → TrashIcon-v4L9SEK_.js} +0 -0
- /package/dist/{UploadCloudIcon-1aMW5OJq.js → UploadCloudIcon-j1-1Rvqb.js} +0 -0
- /package/dist/{UserCircleIcon-D-19dc-2.js → UserCircleIcon-BjUt_2C4.js} +0 -0
- /package/dist/{UserIcon-D1H8TGlg.js → UserIcon-Cb2jFKLr.js} +0 -0
- /package/dist/{VerticalDotsIcon-DmPza4Jd.js → VerticalDotsIcon-Y3m6tlQ2.js} +0 -0
- /package/dist/{WalletIcon-BlI3D3v-.js → WalletIcon-pPsKbzmh.js} +0 -0
|
@@ -1,1556 +0,0 @@
|
|
|
1
|
-
import { B as AppForm_default, F as useOffsetInfiniteQuery, G as AppDialogActionPrimary_default, K as AppDialogActionCancel_default, L as AppDialogHeader_default, U as AppDialogContainer_default, W as AppDialogActions_default, Y as createI18nKeyMap, p as AppUnstyledButton_default, q as useApiErrorToast, rt as StringUtil, z as toFormField } from "./Error-B4TwHEhb.js";
|
|
2
|
-
import { a as AppGroup_default, l as He, s as ZonedDateTimeTransformer, t as AppSkeletonLoader_default, u as ze } from "./AppSkeletonLoader-BAhoOmFD.js";
|
|
3
|
-
import { C as unlinkContactPersonFromDealV1, D as updateDealContactPersonV1, G as viewDealIndexV1, O as updateDealV1, U as viewDealContactPersonDetailV1, W as viewDealDetailV1, _ as makeDealContactPersonPrimaryV1, dt as ClientType, f as linkContactPersonToDealV1, ft as ContentLocale, h as listBoardColumnsV1, i as createFileV1, j as updateMailTemplateV1, m as listBoardColumnTransitionsV1, nt as viewMailTemplateDetailV1, ot as viewUserIndexV1, r as createDealV1, rt as viewMailTemplateIndexV1, t as confirmFileUploadV1, tt as viewMailTemplateDetailByKeyV1, x as transitionDealColumnV1 } from "./client-BP13IBbl.js";
|
|
4
|
-
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BSi1g3Lh.js";
|
|
5
|
-
import { a as RevealOnHoverOrFocus_default, i as FileUtil, n as DealCommunicationMailListSectionContainer_default, o as FileReferenceTransformer, r as MailService, t as DealExternalAttachment_default } from "./DealExternalAttachment-D1PznE3V.js";
|
|
6
|
-
import z$1, { z } from "zod";
|
|
7
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
8
|
-
import { useI18n } from "vue-i18n";
|
|
9
|
-
import { FileUploadStatus, PaginationParamsBuilder, VcButton, VcDialog, VcDialogCloseButton, VcDialogContent, VcDialogDescription, VcDialogTitle, VcFileUploadDropzone, VcFileUploadItem, VcFileUploadItemRemove, VcFileUploadItemReplace, VcFileUploadRoot, VcFileUploadTrigger, VcFormField, VcFormFieldLabel, VcIcon, VcIconButton, VcKeyboardShortcut, VcSpinner, VcTextField, VcTooltipArrow, VcTooltipContent, VcTooltipInnerContent, VcTooltipPortal, VcTooltipRoot, VcTooltipTrigger, useDialog, useToast } from "@wisemen/vue-core-components";
|
|
10
|
-
import { useElementSize } from "@vueuse/core";
|
|
11
|
-
import { useForm } from "formango";
|
|
12
|
-
import { AnimatePresence, Motion, MotionConfig, motion } from "motion-v";
|
|
13
|
-
import { ListboxContent, ListboxItem, ListboxRoot, Primitive, TagsInputClear, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText, TagsInputRoot } from "reka-ui";
|
|
14
|
-
import Link from "@tiptap/extension-link";
|
|
15
|
-
import { StarterKit } from "@tiptap/starter-kit";
|
|
16
|
-
import { EditorContent, useEditor } from "@tiptap/vue-3";
|
|
17
|
-
var AppTagsInputField_default = /* @__PURE__ */ defineComponent({
|
|
18
|
-
__name: "AppTagsInputField",
|
|
19
|
-
props: /* @__PURE__ */ mergeModels({
|
|
20
|
-
isDisabled: { type: Boolean },
|
|
21
|
-
isRequired: { type: Boolean },
|
|
22
|
-
isTouched: { type: Boolean },
|
|
23
|
-
errorMessage: {},
|
|
24
|
-
label: {},
|
|
25
|
-
placeholder: {}
|
|
26
|
-
}, {
|
|
27
|
-
modelValue: { required: !0 },
|
|
28
|
-
modelModifiers: {}
|
|
29
|
-
}),
|
|
30
|
-
emits: /* @__PURE__ */ mergeModels(["blur"], ["update:modelValue"]),
|
|
31
|
-
setup(i, { emit: N }) {
|
|
32
|
-
let P = i, I = N, R = useModel(i, "modelValue"), B = useId();
|
|
33
|
-
return (i, N) => (openBlock(), createBlock(unref(VcFormField), {
|
|
34
|
-
"is-touched": P.isTouched,
|
|
35
|
-
hint: null,
|
|
36
|
-
label: P.label,
|
|
37
|
-
"input-id": unref(B),
|
|
38
|
-
"error-message": P.errorMessage,
|
|
39
|
-
"is-required": P.isRequired,
|
|
40
|
-
for: `tags-input-${unref(B)}`,
|
|
41
|
-
class: "!mt-0 w-full"
|
|
42
|
-
}, {
|
|
43
|
-
label: withCtx(() => [renderSlot(i.$slots, "label")]),
|
|
44
|
-
default: withCtx(() => [createVNode(unref(TagsInputRoot), {
|
|
45
|
-
id: `tags-input-${P.placeholder}`,
|
|
46
|
-
modelValue: R.value,
|
|
47
|
-
"onUpdate:modelValue": N[1] ||= (i) => R.value = i,
|
|
48
|
-
"add-on-blur": !0,
|
|
49
|
-
"add-on-paste": !0,
|
|
50
|
-
delimiter: ";",
|
|
51
|
-
class: "gap-sm border-secondary bg-primary px-sm py-xxs flex max-h-50 min-h-10 w-full flex-wrap items-center overflow-y-auto rounded-md border"
|
|
52
|
-
}, {
|
|
53
|
-
default: withCtx(() => [
|
|
54
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(R.value, (i) => (openBlock(), createBlock(unref(TagsInputItem), {
|
|
55
|
-
key: i,
|
|
56
|
-
value: i,
|
|
57
|
-
class: "gap-xs border-primary px-xs text-secondary my-[0.18rem] flex items-center justify-center rounded-sm border text-xs aria-[current=true]:bg-brand-500"
|
|
58
|
-
}, {
|
|
59
|
-
default: withCtx(() => [createVNode(unref(TagsInputItemText), { class: "pl-sm text-xs" }), createVNode(unref(TagsInputItemDelete), { class: "group p-xs rounded-full bg-transparent" }, {
|
|
60
|
-
default: withCtx(() => [createVNode(unref(VcIcon), {
|
|
61
|
-
icon: "close",
|
|
62
|
-
class: "size-3 duration-200 group-hover:scale-110"
|
|
63
|
-
})]),
|
|
64
|
-
_: 1
|
|
65
|
-
})]),
|
|
66
|
-
_: 1
|
|
67
|
-
}, 8, ["value"]))), 128)),
|
|
68
|
-
createVNode(unref(TagsInputClear)),
|
|
69
|
-
createVNode(unref(TagsInputInput), {
|
|
70
|
-
placeholder: P.placeholder,
|
|
71
|
-
class: "px-sm h-8 flex-1 rounded-full bg-transparent text-sm placeholder:text-placeholder focus:outline-none",
|
|
72
|
-
onBlur: N[0] ||= (i) => I("blur")
|
|
73
|
-
}, null, 8, ["placeholder"])
|
|
74
|
-
]),
|
|
75
|
-
_: 1
|
|
76
|
-
}, 8, ["id", "modelValue"])]),
|
|
77
|
-
_: 3
|
|
78
|
-
}, 8, [
|
|
79
|
-
"is-touched",
|
|
80
|
-
"label",
|
|
81
|
-
"input-id",
|
|
82
|
-
"error-message",
|
|
83
|
-
"is-required",
|
|
84
|
-
"for"
|
|
85
|
-
]));
|
|
86
|
-
}
|
|
87
|
-
}), _sfc_main = {}, _hoisted_1$12 = { class: "flex size-full items-center justify-center" };
|
|
88
|
-
function _sfc_render(i, N) {
|
|
89
|
-
return openBlock(), createElementBlock("div", _hoisted_1$12, [renderSlot(i.$slots, "default")]);
|
|
90
|
-
}
|
|
91
|
-
var CenterContent_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]), AnimateHeight_default = /* @__PURE__ */ defineComponent({
|
|
92
|
-
__name: "AnimateHeight",
|
|
93
|
-
setup(i) {
|
|
94
|
-
let N = ref(null), { height: P } = useElementSize(N), I = ref(!1);
|
|
95
|
-
return onMounted(() => {
|
|
96
|
-
setTimeout(() => {
|
|
97
|
-
I.value = !0;
|
|
98
|
-
}, 50);
|
|
99
|
-
}), (i, R) => (openBlock(), createBlock(unref(Motion), {
|
|
100
|
-
animate: { height: unref(P) },
|
|
101
|
-
transition: {
|
|
102
|
-
bounce: 0,
|
|
103
|
-
duration: I.value ? .3 : 0,
|
|
104
|
-
type: "spring"
|
|
105
|
-
},
|
|
106
|
-
tabindex: "-1",
|
|
107
|
-
class: "relative overflow-clip"
|
|
108
|
-
}, {
|
|
109
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
110
|
-
ref_key: "el",
|
|
111
|
-
ref: N
|
|
112
|
-
}, [renderSlot(i.$slots, "default")], 512)]),
|
|
113
|
-
_: 3
|
|
114
|
-
}, 8, ["animate", "transition"]));
|
|
115
|
-
}
|
|
116
|
-
}), BoardColumnTransformer = class {
|
|
117
|
-
static fromDto(i) {
|
|
118
|
-
return {
|
|
119
|
-
uuid: i.uuid,
|
|
120
|
-
color: i.color,
|
|
121
|
-
config: {
|
|
122
|
-
maxDaysInColumnBeforeHighlight: i.config.maxDaysInColumnBeforeHighlight,
|
|
123
|
-
onlyShowLeadInColumn: i.config.onlyShowLeadInColumn
|
|
124
|
-
},
|
|
125
|
-
displayName: i.displayName,
|
|
126
|
-
position: i.position
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
}, BoardColumnTransitionTransformer = class {
|
|
130
|
-
static fromDto(i) {
|
|
131
|
-
return {
|
|
132
|
-
uuid: i.uuid,
|
|
133
|
-
toColumnUuid: i.toColumnUuid,
|
|
134
|
-
toColumnColor: i.toColumnColor,
|
|
135
|
-
toColumnDisplayName: i.toColumnDisplayName,
|
|
136
|
-
toColumnKey: i.toColumnKey,
|
|
137
|
-
triggers: i.triggers.map((i) => ({
|
|
138
|
-
uuid: i.uuid,
|
|
139
|
-
config: i.config,
|
|
140
|
-
triggerType: i.triggerType
|
|
141
|
-
}))
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}, BoardService = class {
|
|
145
|
-
static async getAllColumns() {
|
|
146
|
-
return (await listBoardColumnsV1()).data.items.map(BoardColumnTransformer.fromDto);
|
|
147
|
-
}
|
|
148
|
-
static async getTransitions(i, N) {
|
|
149
|
-
return (await listBoardColumnTransitionsV1({
|
|
150
|
-
query: { triggerTypes: N },
|
|
151
|
-
path: { boardColumnUuid: i }
|
|
152
|
-
})).data.items.map(BoardColumnTransitionTransformer.fromDto);
|
|
153
|
-
}
|
|
154
|
-
}, UserIndexTransformer = class {
|
|
155
|
-
static fromDto(i) {
|
|
156
|
-
return {
|
|
157
|
-
uuid: i.uuid,
|
|
158
|
-
email: i.email,
|
|
159
|
-
firstName: i.firstName,
|
|
160
|
-
lastName: i.lastName,
|
|
161
|
-
roles: i.roles.map((i) => ({
|
|
162
|
-
uuid: i.uuid,
|
|
163
|
-
name: i.name
|
|
164
|
-
}))
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}, UserService = class {
|
|
168
|
-
static async getAll(i) {
|
|
169
|
-
let N = await viewUserIndexV1({ query: i });
|
|
170
|
-
return {
|
|
171
|
-
data: N.data.items.map(UserIndexTransformer.fromDto),
|
|
172
|
-
meta: N.data.meta
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
function useUserIndexQuery(i) {
|
|
177
|
-
return useOffsetInfiniteQuery({
|
|
178
|
-
queryFn: (N) => UserService.getAll({
|
|
179
|
-
pagination: N,
|
|
180
|
-
search: i.params.search?.value
|
|
181
|
-
}),
|
|
182
|
-
queryKey: { userIndex: { params: i.params } }
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
var _hoisted_1$11 = {
|
|
186
|
-
key: 0,
|
|
187
|
-
class: "text-secondary max-w-xs text-center text-xs"
|
|
188
|
-
}, ButtonTooltip_default = /* @__PURE__ */ defineComponent({
|
|
189
|
-
__name: "ButtonTooltip",
|
|
190
|
-
props: {
|
|
191
|
-
isDisabled: {
|
|
192
|
-
type: Boolean,
|
|
193
|
-
default: !1
|
|
194
|
-
},
|
|
195
|
-
keyboardKeys: { default: null },
|
|
196
|
-
label: { default: null },
|
|
197
|
-
side: { default: null }
|
|
198
|
-
},
|
|
199
|
-
setup(i) {
|
|
200
|
-
let N = i;
|
|
201
|
-
return (i, P) => (openBlock(), createBlock(unref(VcTooltipRoot), {
|
|
202
|
-
"delay-duration": 400,
|
|
203
|
-
"is-popover-arrow-hidden": !0,
|
|
204
|
-
"disable-hoverable-content": !0,
|
|
205
|
-
"popover-side": N.side ?? void 0,
|
|
206
|
-
"is-disabled": N.isDisabled
|
|
207
|
-
}, {
|
|
208
|
-
default: withCtx(() => [createVNode(unref(VcTooltipTrigger), null, {
|
|
209
|
-
default: withCtx(() => [renderSlot(i.$slots, "default")]),
|
|
210
|
-
_: 3
|
|
211
|
-
}), createVNode(unref(VcTooltipPortal), null, {
|
|
212
|
-
default: withCtx(() => [createVNode(unref(VcTooltipContent), null, {
|
|
213
|
-
default: withCtx(() => [createVNode(unref(Motion), {
|
|
214
|
-
initial: {
|
|
215
|
-
opacity: 0,
|
|
216
|
-
filter: "blur(2px)"
|
|
217
|
-
},
|
|
218
|
-
animate: {
|
|
219
|
-
opacity: 1,
|
|
220
|
-
filter: "blur(0)"
|
|
221
|
-
},
|
|
222
|
-
exit: {
|
|
223
|
-
opacity: 0,
|
|
224
|
-
filter: "blur(2px)"
|
|
225
|
-
},
|
|
226
|
-
transition: { duration: .2 }
|
|
227
|
-
}, {
|
|
228
|
-
default: withCtx(() => [createVNode(unref(VcTooltipInnerContent), null, {
|
|
229
|
-
default: withCtx(() => [createVNode(AppGroup_default, {
|
|
230
|
-
gap: "sm",
|
|
231
|
-
class: "p-xs"
|
|
232
|
-
}, {
|
|
233
|
-
default: withCtx(() => [N.label === null ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_1$11, toDisplayString(N.label), 1)), N.keyboardKeys === null ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(VcKeyboardShortcut), {
|
|
234
|
-
key: 1,
|
|
235
|
-
"keyboard-keys": N.keyboardKeys
|
|
236
|
-
}, null, 8, ["keyboard-keys"]))]),
|
|
237
|
-
_: 1
|
|
238
|
-
})]),
|
|
239
|
-
_: 1
|
|
240
|
-
}), createVNode(unref(VcTooltipArrow))]),
|
|
241
|
-
_: 1
|
|
242
|
-
})]),
|
|
243
|
-
_: 1
|
|
244
|
-
})]),
|
|
245
|
-
_: 1
|
|
246
|
-
})]),
|
|
247
|
-
_: 3
|
|
248
|
-
}, 8, ["popover-side", "is-disabled"]));
|
|
249
|
-
}
|
|
250
|
-
}), TruncateText_default = /* @__PURE__ */ defineComponent({
|
|
251
|
-
inheritAttrs: !1,
|
|
252
|
-
__name: "TruncateText",
|
|
253
|
-
props: {
|
|
254
|
-
as: { default: "span" },
|
|
255
|
-
label: {}
|
|
256
|
-
},
|
|
257
|
-
setup(i) {
|
|
258
|
-
let N = i, P = useAttrs(), I = useTemplateRef("primitiveRef"), R = ref(!1), B = null;
|
|
259
|
-
function V(i) {
|
|
260
|
-
R.value = i.scrollWidth > i.clientWidth;
|
|
261
|
-
}
|
|
262
|
-
return onMounted(() => {
|
|
263
|
-
let i = I.value?.$el ?? null;
|
|
264
|
-
i !== null && (V(i), B = new ResizeObserver(() => {
|
|
265
|
-
V(i);
|
|
266
|
-
}), B.observe(i));
|
|
267
|
-
}), onBeforeUnmount(() => {
|
|
268
|
-
B?.disconnect();
|
|
269
|
-
}), (i, B) => (openBlock(), createBlock(ButtonTooltip_default, {
|
|
270
|
-
"is-disabled": !R.value,
|
|
271
|
-
label: N.label
|
|
272
|
-
}, {
|
|
273
|
-
default: withCtx(() => [createVNode(unref(Primitive), mergeProps({
|
|
274
|
-
ref_key: "primitiveRef",
|
|
275
|
-
ref: I,
|
|
276
|
-
as: N.as,
|
|
277
|
-
class: "max-w-full truncate"
|
|
278
|
-
}, unref(P)), {
|
|
279
|
-
default: withCtx(() => [createTextVNode(toDisplayString(N.label), 1)]),
|
|
280
|
-
_: 1
|
|
281
|
-
}, 16, ["as"])]),
|
|
282
|
-
_: 1
|
|
283
|
-
}, 8, ["is-disabled", "label"]));
|
|
284
|
-
}
|
|
285
|
-
}), DealContactPersonTransformer = class {
|
|
286
|
-
static fromDto(i) {
|
|
287
|
-
return {
|
|
288
|
-
contactPersonUuid: i.contactPersonUuid,
|
|
289
|
-
dealUuid: i.dealUuid,
|
|
290
|
-
isPrimary: i.isPrimary,
|
|
291
|
-
email: i.email,
|
|
292
|
-
firstName: i.firstName,
|
|
293
|
-
lastName: i.lastName,
|
|
294
|
-
mobilePhone: i.mobilePhone,
|
|
295
|
-
phone: i.phone
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
}, DealContactPersonUpdateTransformer = class {
|
|
299
|
-
static toDto(i) {
|
|
300
|
-
return {
|
|
301
|
-
email: StringUtil.trimOrNull(i.email),
|
|
302
|
-
firstName: i.firstName,
|
|
303
|
-
lastName: i.lastName,
|
|
304
|
-
mobilePhone: i.mobilePhone,
|
|
305
|
-
phone: i.phone
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
}, DealCreateTransformer = class {
|
|
309
|
-
static toDto(i) {
|
|
310
|
-
return {
|
|
311
|
-
clientId: {
|
|
312
|
-
uuid: i.clientId.uuid,
|
|
313
|
-
type: i.clientId.type
|
|
314
|
-
},
|
|
315
|
-
dealOwnerUuid: null,
|
|
316
|
-
name: i.name,
|
|
317
|
-
dealLanguage: i.dealLanguage,
|
|
318
|
-
dealSource: i.dealSource
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
}, NameUtil = class {
|
|
322
|
-
static toFullName(i) {
|
|
323
|
-
return `${i.firstName} ${i.lastName}`;
|
|
324
|
-
}
|
|
325
|
-
}, DealDetailTransformer = class {
|
|
326
|
-
static fromDto(i) {
|
|
327
|
-
return {
|
|
328
|
-
uuid: i.uuid,
|
|
329
|
-
createdAt: ZonedDateTimeTransformer.fromDto(i.createdAt),
|
|
330
|
-
updatedAt: i.updatedAt,
|
|
331
|
-
name: i.name,
|
|
332
|
-
boardColumn: {
|
|
333
|
-
uuid: i.boardColumn.uuid,
|
|
334
|
-
color: i.boardColumn.color,
|
|
335
|
-
displayName: i.boardColumn.displayName
|
|
336
|
-
},
|
|
337
|
-
client: i.client,
|
|
338
|
-
contactPersons: i.contactPersons.map((i) => ({
|
|
339
|
-
uuid: i.uuid,
|
|
340
|
-
isPrimary: i.isPrimary,
|
|
341
|
-
email: i.email,
|
|
342
|
-
firstName: i.firstName,
|
|
343
|
-
lastName: i.lastName,
|
|
344
|
-
mobilePhone: i.mobilePhone,
|
|
345
|
-
phone: i.phone
|
|
346
|
-
})),
|
|
347
|
-
createdBy: {
|
|
348
|
-
uuid: i.createdBy.uuid,
|
|
349
|
-
name: NameUtil.toFullName({
|
|
350
|
-
firstName: i.createdBy.firstName ?? "",
|
|
351
|
-
lastName: i.createdBy.lastName ?? ""
|
|
352
|
-
})
|
|
353
|
-
},
|
|
354
|
-
dealLanguage: i.dealLanguage,
|
|
355
|
-
dealSource: i.dealSource,
|
|
356
|
-
owner: i.owner ? {
|
|
357
|
-
uuid: i.owner.uuid,
|
|
358
|
-
name: NameUtil.toFullName({
|
|
359
|
-
firstName: i.owner.firstName ?? "",
|
|
360
|
-
lastName: i.owner.lastName ?? ""
|
|
361
|
-
})
|
|
362
|
-
} : null
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
}, DealIndexTransformer = class {
|
|
366
|
-
static fromDto(i) {
|
|
367
|
-
return {
|
|
368
|
-
uuid: i.uuid,
|
|
369
|
-
createdAt: ZonedDateTimeTransformer.fromDto(i.createdAt),
|
|
370
|
-
name: i.name,
|
|
371
|
-
boardColumn: i.boardColumn,
|
|
372
|
-
client: i.client,
|
|
373
|
-
createdBy: {
|
|
374
|
-
uuid: i.createdBy.uuid,
|
|
375
|
-
name: NameUtil.toFullName({
|
|
376
|
-
firstName: i.createdBy.firstName ?? "",
|
|
377
|
-
lastName: i.createdBy.lastName ?? ""
|
|
378
|
-
})
|
|
379
|
-
},
|
|
380
|
-
dealLanguage: i.dealLanguage,
|
|
381
|
-
dealSource: i.dealSource,
|
|
382
|
-
owner: i.owner ? {
|
|
383
|
-
uuid: i.owner.uuid,
|
|
384
|
-
name: NameUtil.toFullName({
|
|
385
|
-
firstName: i.owner.firstName ?? "",
|
|
386
|
-
lastName: i.owner.lastName ?? ""
|
|
387
|
-
})
|
|
388
|
-
} : null
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
}, DealIndexQueryParamsTransformer = class {
|
|
392
|
-
static toDto(i) {
|
|
393
|
-
return {
|
|
394
|
-
filter: {
|
|
395
|
-
boardColumnUuids: i.filters.boardColumnUuid,
|
|
396
|
-
dealOwnerUuids: i.filters.dealOwnerUuids
|
|
397
|
-
},
|
|
398
|
-
pagination: i.pagination
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
}, DealUpdateTransformer = class {
|
|
402
|
-
static toDto(i) {
|
|
403
|
-
return {
|
|
404
|
-
dealOwnerUuid: i.dealOwner?.uuid ?? void 0,
|
|
405
|
-
name: i?.name ?? void 0,
|
|
406
|
-
dealLanguage: i?.dealLanguage ?? void 0,
|
|
407
|
-
dealSource: i?.dealSource ?? void 0
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
}, DealService = class {
|
|
411
|
-
static async create(i) {
|
|
412
|
-
return (await createDealV1({ body: DealCreateTransformer.toDto(i) })).data.uuid;
|
|
413
|
-
}
|
|
414
|
-
static async createContactPerson() {}
|
|
415
|
-
static async getAll(i) {
|
|
416
|
-
let N = await viewDealIndexV1({ query: DealIndexQueryParamsTransformer.toDto(i) });
|
|
417
|
-
return {
|
|
418
|
-
data: N.data.items.map(DealIndexTransformer.fromDto),
|
|
419
|
-
meta: N.data.meta
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
static async getBySearchTerm(i) {
|
|
423
|
-
let N = await viewDealIndexV1({ query: new PaginationParamsBuilder().withLimit(5).withSearch(i).build() });
|
|
424
|
-
return {
|
|
425
|
-
data: N.data.items.map(DealIndexTransformer.fromDto),
|
|
426
|
-
meta: N.data.meta
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
static async getByUuid(i) {
|
|
430
|
-
let N = await viewDealDetailV1({ path: { dealUuid: i } });
|
|
431
|
-
return DealDetailTransformer.fromDto(N.data);
|
|
432
|
-
}
|
|
433
|
-
static async getContactPerson(i, N) {
|
|
434
|
-
let P = await viewDealContactPersonDetailV1({ path: {
|
|
435
|
-
contactPersonUuid: N,
|
|
436
|
-
dealUuid: i
|
|
437
|
-
} });
|
|
438
|
-
return DealContactPersonTransformer.fromDto(P.data);
|
|
439
|
-
}
|
|
440
|
-
static async linkContactPerson(i, N, P) {
|
|
441
|
-
await linkContactPersonToDealV1({
|
|
442
|
-
body: {
|
|
443
|
-
contactPersonUuid: N,
|
|
444
|
-
email: StringUtil.trimOrNull(P.email),
|
|
445
|
-
mobilePhone: P.mobilePhone,
|
|
446
|
-
phone: P.phone
|
|
447
|
-
},
|
|
448
|
-
path: { dealUuid: i }
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
static async setPrimaryContactPerson(i, N) {
|
|
452
|
-
await makeDealContactPersonPrimaryV1({ path: {
|
|
453
|
-
contactPersonUuid: N,
|
|
454
|
-
dealUuid: i
|
|
455
|
-
} });
|
|
456
|
-
}
|
|
457
|
-
static async transition(i, N) {
|
|
458
|
-
await transitionDealColumnV1({
|
|
459
|
-
body: { boardColumnUuid: N },
|
|
460
|
-
path: { dealUuid: i }
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
static async unlinkContactPerson(i, N) {
|
|
464
|
-
await unlinkContactPersonFromDealV1({
|
|
465
|
-
body: { contactPersonUuid: N },
|
|
466
|
-
path: { dealUuid: i }
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
static async update(i, N) {
|
|
470
|
-
await updateDealV1({
|
|
471
|
-
body: DealUpdateTransformer.toDto(N),
|
|
472
|
-
path: { dealUuid: i }
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
static async updateContactPerson(i, N, P) {
|
|
476
|
-
await updateDealContactPersonV1({
|
|
477
|
-
body: DealContactPersonUpdateTransformer.toDto(P),
|
|
478
|
-
path: {
|
|
479
|
-
contactPersonUuid: N,
|
|
480
|
-
dealUuid: i
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
z.enum(ContentLocale);
|
|
486
|
-
var ContentLocaleUtil = class {
|
|
487
|
-
static i18nKeys = createI18nKeyMap({
|
|
488
|
-
"de-DE": "wise_crm.language.de",
|
|
489
|
-
"en-US": "wise_crm.language.en",
|
|
490
|
-
"fr-BE": "wise_crm.language.fr",
|
|
491
|
-
"nl-BE": "wise_crm.language.nl"
|
|
492
|
-
});
|
|
493
|
-
static getI18nKey(i) {
|
|
494
|
-
return this.i18nKeys.get(i);
|
|
495
|
-
}
|
|
496
|
-
}, DealSourceUtil = class {
|
|
497
|
-
static i18nKeys = createI18nKeyMap({
|
|
498
|
-
mail: "wise_crm.enum.source.mail",
|
|
499
|
-
phone: "wise_crm.enum.source.phone",
|
|
500
|
-
tender: "wise_crm.enum.source.tender",
|
|
501
|
-
website: "wise_crm.enum.source.website"
|
|
502
|
-
});
|
|
503
|
-
static getI18nKey(i) {
|
|
504
|
-
return this.i18nKeys.get(i);
|
|
505
|
-
}
|
|
506
|
-
}, MailTemplateDetailTransformer = class {
|
|
507
|
-
static fromDto(i) {
|
|
508
|
-
return {
|
|
509
|
-
uuid: i.uuid,
|
|
510
|
-
createdAt: ZonedDateTimeTransformer.fromDto(i.createdAt),
|
|
511
|
-
updatedAt: ZonedDateTimeTransformer.fromDto(i.updatedAt),
|
|
512
|
-
defaultBCC: i.defaultBCC,
|
|
513
|
-
defaultCC: i.defaultCC,
|
|
514
|
-
displayName: i.displayName,
|
|
515
|
-
key: i.key,
|
|
516
|
-
locales: i.locales.map((i) => ({
|
|
517
|
-
uuid: i.uuid,
|
|
518
|
-
createdAt: ZonedDateTimeTransformer.fromDto(i.createdAt),
|
|
519
|
-
updatedAt: ZonedDateTimeTransformer.fromDto(i.updatedAt),
|
|
520
|
-
attachments: i.attachments.map(FileReferenceTransformer.fromDto),
|
|
521
|
-
language: i.language,
|
|
522
|
-
message: i.message,
|
|
523
|
-
subject: i.subject
|
|
524
|
-
}))
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
}, MailTemplateIndexTransformer = class {
|
|
528
|
-
static fromDto(i) {
|
|
529
|
-
return {
|
|
530
|
-
uuid: i.uuid,
|
|
531
|
-
createdAt: ZonedDateTimeTransformer.fromDto(i.createdAt),
|
|
532
|
-
updatedAt: ZonedDateTimeTransformer.fromDto(i.updatedAt),
|
|
533
|
-
name: i.name
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
}, MailTemplateIndexQueryParamsTransformer = class {
|
|
537
|
-
static toDto(i) {
|
|
538
|
-
return { pagination: i.pagination };
|
|
539
|
-
}
|
|
540
|
-
}, MailTemplateUpdateTransformer = class {
|
|
541
|
-
static toDto(i) {
|
|
542
|
-
return {
|
|
543
|
-
defaultBCC: i.defaultBCC,
|
|
544
|
-
defaultCC: i.defaultCC,
|
|
545
|
-
locales: i.locales.map((i) => ({
|
|
546
|
-
attachments: i.attachments.map((i) => i.uuid),
|
|
547
|
-
language: i.language,
|
|
548
|
-
message: i.message,
|
|
549
|
-
replyTo: i.replyTo,
|
|
550
|
-
subject: i.subject
|
|
551
|
-
}))
|
|
552
|
-
};
|
|
553
|
-
}
|
|
554
|
-
}, MailTemplateService = class {
|
|
555
|
-
static async getAll(i) {
|
|
556
|
-
let N = await viewMailTemplateIndexV1({ query: MailTemplateIndexQueryParamsTransformer.toDto(i) });
|
|
557
|
-
return {
|
|
558
|
-
data: N.data.items.map(MailTemplateIndexTransformer.fromDto),
|
|
559
|
-
meta: N.data.meta
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
static async getByKey(i) {
|
|
563
|
-
let N = await viewMailTemplateDetailByKeyV1({ path: { mailTemplateKey: i } });
|
|
564
|
-
return MailTemplateDetailTransformer.fromDto(N.data);
|
|
565
|
-
}
|
|
566
|
-
static async getByUuid(i) {
|
|
567
|
-
let N = await viewMailTemplateDetailV1({ path: { mailTemplateUuid: i } });
|
|
568
|
-
return MailTemplateDetailTransformer.fromDto(N.data);
|
|
569
|
-
}
|
|
570
|
-
static async update(i, N) {
|
|
571
|
-
await updateMailTemplateV1({
|
|
572
|
-
body: MailTemplateUpdateTransformer.toDto(N),
|
|
573
|
-
path: { mailTemplateUuid: i }
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
};
|
|
577
|
-
function useMailTemplateDetailQuery(i) {
|
|
578
|
-
return He({
|
|
579
|
-
queryFn: () => MailTemplateService.getByUuid(i.value),
|
|
580
|
-
queryKey: { mailTemplateDetail: { mailTemplateUuid: i } }
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
function useMailTemplateDetailByKeyQuery(i) {
|
|
584
|
-
return He({
|
|
585
|
-
queryFn: () => MailTemplateService.getByKey(i.value),
|
|
586
|
-
queryKey: { mailTemplateDetailByKey: { mailTemplateKey: i } }
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
var _hoisted_1$10 = { class: "p-xl w-96 max-w-full" }, AppRichTextFieldLinkDialog_default = /* @__PURE__ */ defineComponent({
|
|
590
|
-
__name: "AppRichTextFieldLinkDialog",
|
|
591
|
-
emits: ["close", "confirm"],
|
|
592
|
-
setup(N, { emit: B }) {
|
|
593
|
-
let H = B, U = useI18n(), W = useForm({
|
|
594
|
-
schema: z.object({ url: z.string().url() }),
|
|
595
|
-
onSubmit: (i) => {
|
|
596
|
-
H("confirm", i.url);
|
|
597
|
-
}
|
|
598
|
-
}), G = W.register("url");
|
|
599
|
-
function J() {
|
|
600
|
-
H("close");
|
|
601
|
-
}
|
|
602
|
-
return (N, B) => (openBlock(), createBlock(unref(VcDialog), { onClose: J }, {
|
|
603
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$10, [createVNode(AppDialogHeader_default, {
|
|
604
|
-
title: unref(U).t("rich_text.link_dialog.title"),
|
|
605
|
-
icon: "link"
|
|
606
|
-
}, {
|
|
607
|
-
"closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
|
|
608
|
-
_: 1
|
|
609
|
-
}, 8, ["title"]), createVNode(AppForm_default, { form: unref(W) }, {
|
|
610
|
-
default: withCtx(() => [createVNode(unref(VcTextField), mergeProps({ label: unref(U).t("rich_text.link_dialog.url") }, unref(toFormField)(unref(G))), null, 16, ["label"]), createVNode(AppDialogActions_default, null, {
|
|
611
|
-
default: withCtx(() => [createVNode(AppDialogActionCancel_default, { label: unref(U).t("shared.cancel") }, null, 8, ["label"]), createVNode(AppDialogActionPrimary_default, {
|
|
612
|
-
label: unref(U).t("shared.confirm"),
|
|
613
|
-
onClick: B[0] ||= (i) => unref(W).submit()
|
|
614
|
-
}, null, 8, ["label"])]),
|
|
615
|
-
_: 1
|
|
616
|
-
})]),
|
|
617
|
-
_: 1
|
|
618
|
-
}, 8, ["form"])])]),
|
|
619
|
-
_: 1
|
|
620
|
-
}));
|
|
621
|
-
}
|
|
622
|
-
}), _hoisted_1$9 = ["id"], _hoisted_2$5 = { class: "p-sm h-full" }, AppRichTextField_default = /* @__PURE__ */ defineComponent({
|
|
623
|
-
__name: "AppRichTextField",
|
|
624
|
-
props: /* @__PURE__ */ mergeModels({
|
|
625
|
-
isDisabled: {
|
|
626
|
-
type: Boolean,
|
|
627
|
-
default: !1
|
|
628
|
-
},
|
|
629
|
-
isRequired: {
|
|
630
|
-
type: Boolean,
|
|
631
|
-
default: !1
|
|
632
|
-
},
|
|
633
|
-
isTouched: {
|
|
634
|
-
type: Boolean,
|
|
635
|
-
default: !1
|
|
636
|
-
},
|
|
637
|
-
errorMessage: { default: null },
|
|
638
|
-
errors: {},
|
|
639
|
-
label: {}
|
|
640
|
-
}, {
|
|
641
|
-
modelValue: { required: !0 },
|
|
642
|
-
modelModifiers: {}
|
|
643
|
-
}),
|
|
644
|
-
emits: /* @__PURE__ */ mergeModels(["blur"], ["update:modelValue"]),
|
|
645
|
-
setup(i, { emit: N }) {
|
|
646
|
-
let P = i, I = N, R = useModel(i, "modelValue"), B = useId(), V = useEditor({
|
|
647
|
-
content: R.value,
|
|
648
|
-
editorProps: { attributes: { class: "bg-primary text-primary p-2xl prose prose-sm w-full max-w-none text-secondary outline-none focus-visible:ring-2 ring-offset-1 ring-fg-brand-secondary rounded-sm min-h-[15rem] h-full" } },
|
|
649
|
-
extensions: [StarterKit, Link.configure({ defaultProtocol: "https" })],
|
|
650
|
-
onBlur() {
|
|
651
|
-
I("blur");
|
|
652
|
-
},
|
|
653
|
-
onUpdate({ editor: i }) {
|
|
654
|
-
R.value = i.getHTML();
|
|
655
|
-
}
|
|
656
|
-
}), H = useDialog(AppRichTextFieldLinkDialog_default), W = computed(() => [
|
|
657
|
-
{
|
|
658
|
-
id: "bold",
|
|
659
|
-
icon: "bold",
|
|
660
|
-
onClick: () => void V.value?.chain().focus().toggleBold().run()
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
id: "italic",
|
|
664
|
-
icon: "italic",
|
|
665
|
-
onClick: () => void V.value?.chain().focus().toggleItalic().run()
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
id: "heading",
|
|
669
|
-
isActiveOptions: { level: 1 },
|
|
670
|
-
icon: "h1Icon",
|
|
671
|
-
onClick: () => void V.value?.chain().focus().toggleHeading({ level: 1 }).run()
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
id: "heading",
|
|
675
|
-
isActiveOptions: { level: 2 },
|
|
676
|
-
icon: "h2Icon",
|
|
677
|
-
onClick: () => void V.value?.chain().focus().toggleHeading({ level: 2 }).run()
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
id: "heading",
|
|
681
|
-
isActiveOptions: { level: 3 },
|
|
682
|
-
icon: "h3Icon",
|
|
683
|
-
onClick: () => void V.value?.chain().focus().toggleHeading({ level: 3 }).run()
|
|
684
|
-
},
|
|
685
|
-
{
|
|
686
|
-
id: "link",
|
|
687
|
-
icon: "link",
|
|
688
|
-
onClick: () => {
|
|
689
|
-
H.open({ onConfirm: (i) => {
|
|
690
|
-
V.value?.chain().focus().extendMarkRange("link").setLink({ href: i }).run(), H.close();
|
|
691
|
-
} });
|
|
692
|
-
}
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
id: "bulletList",
|
|
696
|
-
icon: "bulletList",
|
|
697
|
-
onClick: () => void V.value?.chain().focus().toggleBulletList().run()
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
id: "orderedList",
|
|
701
|
-
icon: "numberedList",
|
|
702
|
-
onClick: () => void V.value?.chain().focus().toggleOrderedList().run()
|
|
703
|
-
}
|
|
704
|
-
]);
|
|
705
|
-
return watch(R, (i) => {
|
|
706
|
-
i !== V.value?.getHTML() && ((i === null || i === "") && V.value?.commands.clearContent(), V.value?.commands.setContent(i || ""));
|
|
707
|
-
}), (i, N) => (openBlock(), createBlock(unref(VcFormField), {
|
|
708
|
-
for: unref(B),
|
|
709
|
-
"is-touched": P.isTouched,
|
|
710
|
-
"error-message": P.errorMessage,
|
|
711
|
-
hint: null,
|
|
712
|
-
label: P.label,
|
|
713
|
-
"is-required": P.isRequired,
|
|
714
|
-
class: "h-full"
|
|
715
|
-
}, {
|
|
716
|
-
label: withCtx(() => [renderSlot(i.$slots, "label")]),
|
|
717
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
718
|
-
id: unref(B),
|
|
719
|
-
class: normalizeClass([{
|
|
720
|
-
"border-error-subtle": P.errorMessage !== null && P.isTouched,
|
|
721
|
-
"border-secondary": !(P.errorMessage !== null && P.isTouched)
|
|
722
|
-
}, "bg-primary flex flex-col overflow-hidden rounded-lg border"])
|
|
723
|
-
}, [createVNode(unref(ListboxRoot), { orientation: "horizontal" }, {
|
|
724
|
-
default: withCtx(() => [createVNode(unref(ListboxContent), { class: "gap-sm p-sm border-secondary flex border-b" }, {
|
|
725
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(W.value, (i, N) => (openBlock(), createBlock(unref(ListboxItem), {
|
|
726
|
-
key: N,
|
|
727
|
-
value: N,
|
|
728
|
-
class: normalizeClass([{
|
|
729
|
-
"bg-tertiary text-primary": unref(V)?.isActive(i.id, i.isActiveOptions),
|
|
730
|
-
"text-quaternary": !unref(V)?.isActive(i.id, i.isActiveOptions)
|
|
731
|
-
}, "rounded-md"]),
|
|
732
|
-
"as-child": !0
|
|
733
|
-
}, {
|
|
734
|
-
default: withCtx(() => [createVNode(AppUnstyledButton_default, { onClick: () => i.onClick() }, {
|
|
735
|
-
default: withCtx(() => [createVNode(unref(VcIcon), {
|
|
736
|
-
icon: i.icon,
|
|
737
|
-
class: "text-primary size-8"
|
|
738
|
-
}, null, 8, ["icon"])]),
|
|
739
|
-
_: 2
|
|
740
|
-
}, 1032, ["onClick"])]),
|
|
741
|
-
_: 2
|
|
742
|
-
}, 1032, ["value", "class"]))), 128))]),
|
|
743
|
-
_: 1
|
|
744
|
-
})]),
|
|
745
|
-
_: 1
|
|
746
|
-
}), createElementVNode("div", _hoisted_2$5, [createVNode(unref(EditorContent), {
|
|
747
|
-
modelValue: R.value,
|
|
748
|
-
"onUpdate:modelValue": N[0] ||= (i) => R.value = i,
|
|
749
|
-
editor: unref(V),
|
|
750
|
-
class: "h-full"
|
|
751
|
-
}, null, 8, ["modelValue", "editor"])])], 10, _hoisted_1$9)]),
|
|
752
|
-
_: 3
|
|
753
|
-
}, 8, [
|
|
754
|
-
"for",
|
|
755
|
-
"is-touched",
|
|
756
|
-
"error-message",
|
|
757
|
-
"label",
|
|
758
|
-
"is-required"
|
|
759
|
-
]));
|
|
760
|
-
}
|
|
761
|
-
}), FileUploadService = class {
|
|
762
|
-
static async confirmUpload(i, N) {
|
|
763
|
-
await confirmFileUploadV1({
|
|
764
|
-
body: { blurHash: N },
|
|
765
|
-
path: { file: i }
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
static async getFileInfo(i, N) {
|
|
769
|
-
let P = await createFileV1({ body: {
|
|
770
|
-
name: i,
|
|
771
|
-
mimeType: N
|
|
772
|
-
} });
|
|
773
|
-
return {
|
|
774
|
-
uuid: P.data.uuid,
|
|
775
|
-
uploadUrl: P.data.uploadUrl
|
|
776
|
-
};
|
|
777
|
-
}
|
|
778
|
-
}, _hoisted_1$8 = { class: "text-brand-secondary text-sm font-medium" }, FormFileUploadDropzoneOverlay_default = /* @__PURE__ */ defineComponent({
|
|
779
|
-
__name: "FormFileUploadDropzoneOverlay",
|
|
780
|
-
props: {
|
|
781
|
-
isHoveringOverDropzone: { type: Boolean },
|
|
782
|
-
isHoveringOverPage: { type: Boolean }
|
|
783
|
-
},
|
|
784
|
-
setup(i) {
|
|
785
|
-
let N = i, P = useI18n();
|
|
786
|
-
return (i, I) => (openBlock(), createBlock(unref(AnimatePresence), null, {
|
|
787
|
-
default: withCtx(() => [N.isHoveringOverPage ? (openBlock(), createBlock(unref(Motion), {
|
|
788
|
-
key: 0,
|
|
789
|
-
class: normalizeClass([{ "animate-pulse": !N.isHoveringOverDropzone }, "border-brand-500/50 pointer-events-none absolute inset-0 z-10 overflow-hidden rounded-xl border-[1.5px] border-dashed"]),
|
|
790
|
-
initial: { opacity: 0 },
|
|
791
|
-
animate: { opacity: 1 },
|
|
792
|
-
exit: { opacity: 0 }
|
|
793
|
-
}, {
|
|
794
|
-
default: withCtx(() => [createVNode(unref(AnimatePresence), null, {
|
|
795
|
-
default: withCtx(() => [N.isHoveringOverDropzone ? (openBlock(), createBlock(unref(Motion), {
|
|
796
|
-
key: 0,
|
|
797
|
-
initial: {
|
|
798
|
-
opacity: 0,
|
|
799
|
-
scale: 1.01
|
|
800
|
-
},
|
|
801
|
-
animate: {
|
|
802
|
-
opacity: 1,
|
|
803
|
-
scale: 1
|
|
804
|
-
},
|
|
805
|
-
exit: {
|
|
806
|
-
opacity: 0,
|
|
807
|
-
scale: 1.01
|
|
808
|
-
},
|
|
809
|
-
class: "bg-brand-primary/90 absolute inset-0"
|
|
810
|
-
}, {
|
|
811
|
-
default: withCtx(() => [createVNode(CenterContent_default, null, {
|
|
812
|
-
default: withCtx(() => [createElementVNode("p", _hoisted_1$8, toDisplayString(unref(P).t("component.file_upload.dropzone.drop_files")), 1)]),
|
|
813
|
-
_: 1
|
|
814
|
-
})]),
|
|
815
|
-
_: 1
|
|
816
|
-
})) : createCommentVNode("", !0)]),
|
|
817
|
-
_: 1
|
|
818
|
-
})]),
|
|
819
|
-
_: 1
|
|
820
|
-
}, 8, ["class"])) : createCommentVNode("", !0)]),
|
|
821
|
-
_: 1
|
|
822
|
-
}));
|
|
823
|
-
}
|
|
824
|
-
}), _hoisted_1$7 = {
|
|
825
|
-
width: "100%",
|
|
826
|
-
height: "100%",
|
|
827
|
-
viewBox: "0 0 12 12",
|
|
828
|
-
fill: "none",
|
|
829
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
830
|
-
"aria-hidden": "true"
|
|
831
|
-
}, FormFileUploadSuccessCheckmark_default = /* @__PURE__ */ defineComponent({
|
|
832
|
-
__name: "FormFileUploadSuccessCheckmark",
|
|
833
|
-
setup(i) {
|
|
834
|
-
let N = {
|
|
835
|
-
hidden: {
|
|
836
|
-
opacity: 0,
|
|
837
|
-
pathLength: 0
|
|
838
|
-
},
|
|
839
|
-
visible: {
|
|
840
|
-
opacity: 1,
|
|
841
|
-
pathLength: 1,
|
|
842
|
-
transition: {
|
|
843
|
-
opacity: { duration: .01 },
|
|
844
|
-
pathLength: {
|
|
845
|
-
bounce: 0,
|
|
846
|
-
duration: .5,
|
|
847
|
-
type: "spring"
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
return (i, P) => (openBlock(), createElementBlock("svg", _hoisted_1$7, [createVNode(unref(motion).path, {
|
|
853
|
-
variants: N,
|
|
854
|
-
tabindex: "-1",
|
|
855
|
-
initial: "hidden",
|
|
856
|
-
d: "M2 6L4.5 8.5L10 3",
|
|
857
|
-
stroke: "currentColor",
|
|
858
|
-
"stroke-width": "1.5",
|
|
859
|
-
"stroke-linecap": "round",
|
|
860
|
-
"stroke-linejoin": "round",
|
|
861
|
-
animate: "visible",
|
|
862
|
-
exit: "hidden"
|
|
863
|
-
})]));
|
|
864
|
-
}
|
|
865
|
-
}), FormFileUploadItemRight_default = /* @__PURE__ */ defineComponent({
|
|
866
|
-
__name: "FormFileUploadItemRight",
|
|
867
|
-
props: {
|
|
868
|
-
isMultiple: { type: Boolean },
|
|
869
|
-
item: {}
|
|
870
|
-
},
|
|
871
|
-
setup(i) {
|
|
872
|
-
let N = i, P = ref(!1);
|
|
873
|
-
function I(i) {
|
|
874
|
-
i.url !== null && FileUtil.download(i.url, i.name);
|
|
875
|
-
}
|
|
876
|
-
return watch(() => N.item.status, (i) => {
|
|
877
|
-
i === FileUploadStatus.SUCCESS && (P.value = !0, setTimeout(() => {
|
|
878
|
-
P.value = !1;
|
|
879
|
-
}, 2e3));
|
|
880
|
-
}), (i, R) => (openBlock(), createBlock(unref(AnimatePresence), { mode: "popLayout" }, {
|
|
881
|
-
default: withCtx(() => [P.value ? (openBlock(), createBlock(unref(Motion), {
|
|
882
|
-
key: 0,
|
|
883
|
-
variants: {
|
|
884
|
-
hidden: {
|
|
885
|
-
opacity: 0,
|
|
886
|
-
scale: .95
|
|
887
|
-
},
|
|
888
|
-
visible: {
|
|
889
|
-
opacity: 1,
|
|
890
|
-
scale: 1
|
|
891
|
-
}
|
|
892
|
-
},
|
|
893
|
-
initial: "hidden",
|
|
894
|
-
animate: "visible",
|
|
895
|
-
exit: "hidden",
|
|
896
|
-
class: "flex size-8 items-center justify-center"
|
|
897
|
-
}, {
|
|
898
|
-
default: withCtx(() => [createVNode(FormFileUploadSuccessCheckmark_default, { class: "text-disabled size-4" })]),
|
|
899
|
-
_: 1
|
|
900
|
-
})) : N.item.status === unref(FileUploadStatus).SUCCESS ? (openBlock(), createBlock(unref(Motion), {
|
|
901
|
-
key: 1,
|
|
902
|
-
initial: {
|
|
903
|
-
opacity: 0,
|
|
904
|
-
scale: .95
|
|
905
|
-
},
|
|
906
|
-
animate: {
|
|
907
|
-
opacity: 1,
|
|
908
|
-
scale: 1
|
|
909
|
-
}
|
|
910
|
-
}, {
|
|
911
|
-
default: withCtx(() => [createVNode(RevealOnHoverOrFocus_default, null, {
|
|
912
|
-
default: withCtx(() => [createVNode(AppGroup_default, { gap: "none" }, {
|
|
913
|
-
default: withCtx(() => [
|
|
914
|
-
createVNode(ButtonTooltip_default, { label: "Replace" }, {
|
|
915
|
-
default: withCtx(() => [createVNode(unref(VcFileUploadItemReplace), null, {
|
|
916
|
-
default: withCtx(() => [createVNode(unref(VcIconButton), {
|
|
917
|
-
"class-config": { root: "hover:!bg-tertiary" },
|
|
918
|
-
icon: "refresh",
|
|
919
|
-
label: "Replace",
|
|
920
|
-
variant: "tertiary"
|
|
921
|
-
})]),
|
|
922
|
-
_: 1
|
|
923
|
-
})]),
|
|
924
|
-
_: 1
|
|
925
|
-
}),
|
|
926
|
-
createVNode(ButtonTooltip_default, { label: "Download" }, {
|
|
927
|
-
default: withCtx(() => [N.item.url === null ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(VcIconButton), {
|
|
928
|
-
key: 0,
|
|
929
|
-
"class-config": { root: "hover:!bg-tertiary" },
|
|
930
|
-
icon: "downloadCloud",
|
|
931
|
-
label: "Download",
|
|
932
|
-
variant: "tertiary",
|
|
933
|
-
onClick: R[0] ||= (i) => I(N.item)
|
|
934
|
-
}))]),
|
|
935
|
-
_: 1
|
|
936
|
-
}),
|
|
937
|
-
createVNode(ButtonTooltip_default, { label: "Remove" }, {
|
|
938
|
-
default: withCtx(() => [createVNode(unref(VcFileUploadItemRemove), null, {
|
|
939
|
-
default: withCtx(() => [createVNode(unref(VcIconButton), {
|
|
940
|
-
icon: "trash",
|
|
941
|
-
label: "Remove",
|
|
942
|
-
variant: "destructive-tertiary"
|
|
943
|
-
})]),
|
|
944
|
-
_: 1
|
|
945
|
-
})]),
|
|
946
|
-
_: 1
|
|
947
|
-
})
|
|
948
|
-
]),
|
|
949
|
-
_: 1
|
|
950
|
-
})]),
|
|
951
|
-
_: 1
|
|
952
|
-
})]),
|
|
953
|
-
_: 1
|
|
954
|
-
})) : N.item.status === unref(FileUploadStatus).PENDING || N.item.status === unref(FileUploadStatus).UPLOADING ? (openBlock(), createBlock(unref(Motion), {
|
|
955
|
-
key: 2,
|
|
956
|
-
initial: { opacity: 0 },
|
|
957
|
-
animate: { opacity: 1 },
|
|
958
|
-
exit: {
|
|
959
|
-
opacity: 0,
|
|
960
|
-
scale: .95
|
|
961
|
-
},
|
|
962
|
-
class: "flex size-8 items-center justify-center"
|
|
963
|
-
}, {
|
|
964
|
-
default: withCtx(() => [createVNode(unref(VcSpinner), { class: "text-tertiary size-4" })]),
|
|
965
|
-
_: 1
|
|
966
|
-
})) : createCommentVNode("", !0)]),
|
|
967
|
-
_: 1
|
|
968
|
-
}));
|
|
969
|
-
}
|
|
970
|
-
}), q = /* @__PURE__ */ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".split(""), x = (i) => {
|
|
971
|
-
let N = 0;
|
|
972
|
-
for (let P = 0; P < i.length; P++) {
|
|
973
|
-
let I = i[P], R = q.indexOf(I);
|
|
974
|
-
N = N * 83 + R;
|
|
975
|
-
}
|
|
976
|
-
return N;
|
|
977
|
-
}, f = (i) => {
|
|
978
|
-
let N = i / 255;
|
|
979
|
-
return N <= .04045 ? N / 12.92 : ((N + .055) / 1.055) ** 2.4;
|
|
980
|
-
}, h$1 = (i) => {
|
|
981
|
-
let N = Math.max(0, Math.min(1, i));
|
|
982
|
-
return N <= .0031308 ? Math.trunc(N * 12.92 * 255 + .5) : Math.trunc((1.055 * N ** .4166666666666667 - .055) * 255 + .5);
|
|
983
|
-
}, F = (i) => i < 0 ? -1 : 1, M = (i, N) => F(i) * Math.abs(i) ** +N, d = class extends Error {
|
|
984
|
-
constructor(i) {
|
|
985
|
-
super(i), this.name = "ValidationError", this.message = i;
|
|
986
|
-
}
|
|
987
|
-
}, C = (i) => {
|
|
988
|
-
if (!i || i.length < 6) throw new d("The blurhash string must be at least 6 characters");
|
|
989
|
-
let N = x(i[0]), P = Math.floor(N / 9) + 1, I = N % 9 + 1;
|
|
990
|
-
if (i.length !== 4 + 2 * I * P) throw new d(`blurhash length mismatch: length is ${i.length} but it should be ${4 + 2 * I * P}`);
|
|
991
|
-
}, z$2 = (i) => {
|
|
992
|
-
let N = i >> 16, P = i >> 8 & 255, I = i & 255;
|
|
993
|
-
return [
|
|
994
|
-
f(N),
|
|
995
|
-
f(P),
|
|
996
|
-
f(I)
|
|
997
|
-
];
|
|
998
|
-
}, L = (i, N) => {
|
|
999
|
-
let P = Math.floor(i / 361), I = Math.floor(i / 19) % 19, R = i % 19;
|
|
1000
|
-
return [
|
|
1001
|
-
M((P - 9) / 9, 2) * N,
|
|
1002
|
-
M((I - 9) / 9, 2) * N,
|
|
1003
|
-
M((R - 9) / 9, 2) * N
|
|
1004
|
-
];
|
|
1005
|
-
}, j = (i, N, P, I) => {
|
|
1006
|
-
C(i), I |= 1;
|
|
1007
|
-
let R = x(i[0]), B = Math.floor(R / 9) + 1, V = R % 9 + 1, H = (x(i[1]) + 1) / 166, U = Array(V * B);
|
|
1008
|
-
for (let N = 0; N < U.length; N++) N === 0 ? U[N] = z$2(x(i.substring(2, 6))) : U[N] = L(x(i.substring(4 + N * 2, 6 + N * 2)), H * I);
|
|
1009
|
-
let W = N * 4, G = new Uint8ClampedArray(W * P);
|
|
1010
|
-
for (let i = 0; i < P; i++) for (let I = 0; I < N; I++) {
|
|
1011
|
-
let R = 0, H = 0, K = 0;
|
|
1012
|
-
for (let W = 0; W < B; W++) for (let B = 0; B < V; B++) {
|
|
1013
|
-
let G = Math.cos(Math.PI * I * B / N) * Math.cos(Math.PI * i * W / P), J = U[B + W * V];
|
|
1014
|
-
R += J[0] * G, H += J[1] * G, K += J[2] * G;
|
|
1015
|
-
}
|
|
1016
|
-
let J = h$1(R), Y = h$1(H), X = h$1(K);
|
|
1017
|
-
G[4 * I + 0 + i * W] = J, G[4 * I + 1 + i * W] = Y, G[4 * I + 2 + i * W] = X, G[4 * I + 3 + i * W] = 255;
|
|
1018
|
-
}
|
|
1019
|
-
return G;
|
|
1020
|
-
}, ImageBlurhash_default = /* @__PURE__ */ defineComponent({
|
|
1021
|
-
__name: "ImageBlurhash",
|
|
1022
|
-
props: { blurhash: {} },
|
|
1023
|
-
setup(i) {
|
|
1024
|
-
let N = i, P = ref(null);
|
|
1025
|
-
function I(i, N) {
|
|
1026
|
-
let { height: P, width: I } = N, R = j(i, I, P), B = N.getContext("2d"), V = B.createImageData(I, P);
|
|
1027
|
-
V.data.set(R), B.putImageData(V, 0, 0);
|
|
1028
|
-
}
|
|
1029
|
-
function R() {
|
|
1030
|
-
P.value !== null && I(N.blurhash, P.value);
|
|
1031
|
-
}
|
|
1032
|
-
return onMounted(() => {
|
|
1033
|
-
R();
|
|
1034
|
-
}), (i, N) => (openBlock(), createElementBlock("canvas", {
|
|
1035
|
-
ref_key: "canvasRef",
|
|
1036
|
-
ref: P,
|
|
1037
|
-
width: "100%",
|
|
1038
|
-
height: "100%"
|
|
1039
|
-
}, null, 512));
|
|
1040
|
-
}
|
|
1041
|
-
}), _hoisted_1$6 = { class: "sr-only" }, _hoisted_2$4 = { class: "p-lg absolute top-0 left-0 z-1 flex w-full justify-end" }, _hoisted_3$4 = ["src", "alt"], ImageDialog_default = /* @__PURE__ */ defineComponent({
|
|
1042
|
-
__name: "ImageDialog",
|
|
1043
|
-
props: {
|
|
1044
|
-
imageId: {},
|
|
1045
|
-
fit: {},
|
|
1046
|
-
imageAlt: {},
|
|
1047
|
-
imageUrl: {}
|
|
1048
|
-
},
|
|
1049
|
-
setup(i) {
|
|
1050
|
-
let N = i;
|
|
1051
|
-
return (i, P) => (openBlock(), createBlock(unref(VcDialog), {
|
|
1052
|
-
"is-close-button-hidden": !0,
|
|
1053
|
-
size: "xl"
|
|
1054
|
-
}, {
|
|
1055
|
-
default: withCtx(() => [
|
|
1056
|
-
createVNode(unref(VcDialogTitle), null, {
|
|
1057
|
-
default: withCtx(() => [...P[0] ||= [createElementVNode("h1", { class: "sr-only" }, " Image ", -1)]]),
|
|
1058
|
-
_: 1
|
|
1059
|
-
}),
|
|
1060
|
-
createVNode(unref(VcDialogDescription), null, {
|
|
1061
|
-
default: withCtx(() => [createElementVNode("p", _hoisted_1$6, toDisplayString(N.imageAlt), 1)]),
|
|
1062
|
-
_: 1
|
|
1063
|
-
}),
|
|
1064
|
-
createElementVNode("div", _hoisted_2$4, [createVNode(unref(VcDialogCloseButton), null, {
|
|
1065
|
-
default: withCtx(() => [createVNode(unref(VcIconButton), {
|
|
1066
|
-
"class-config": { root: "bg-primary/50 backdrop-blur-md text-primary border-none shadow-none" },
|
|
1067
|
-
icon: "close",
|
|
1068
|
-
label: "close",
|
|
1069
|
-
variant: "primary"
|
|
1070
|
-
})]),
|
|
1071
|
-
_: 1
|
|
1072
|
-
})]),
|
|
1073
|
-
createElementVNode("img", {
|
|
1074
|
-
src: N.imageUrl,
|
|
1075
|
-
alt: N.imageAlt,
|
|
1076
|
-
exit: { opacity: 1 },
|
|
1077
|
-
class: "size-full object-contain"
|
|
1078
|
-
}, null, 8, _hoisted_3$4)
|
|
1079
|
-
]),
|
|
1080
|
-
_: 1
|
|
1081
|
-
}));
|
|
1082
|
-
}
|
|
1083
|
-
}), _hoisted_1$5 = { class: "relative isolate overflow-hidden" }, _hoisted_2$3 = ["disabled"], _hoisted_3$3 = { class: "sr-only" }, _hoisted_4$2 = ["src", "alt"], Image_default = /* @__PURE__ */ defineComponent({
|
|
1084
|
-
__name: "Image",
|
|
1085
|
-
props: {
|
|
1086
|
-
isZoomEnabled: {
|
|
1087
|
-
type: Boolean,
|
|
1088
|
-
default: !1
|
|
1089
|
-
},
|
|
1090
|
-
alt: {},
|
|
1091
|
-
blurhash: { default: null },
|
|
1092
|
-
fit: {},
|
|
1093
|
-
src: {}
|
|
1094
|
-
},
|
|
1095
|
-
setup(i) {
|
|
1096
|
-
let N = i, P = useId(), I = useDialog(ImageDialog_default), R = ref(!0);
|
|
1097
|
-
function B() {
|
|
1098
|
-
R.value = !1;
|
|
1099
|
-
}
|
|
1100
|
-
function V() {
|
|
1101
|
-
I.open({
|
|
1102
|
-
imageId: P,
|
|
1103
|
-
fit: N.fit,
|
|
1104
|
-
imageAlt: N.alt,
|
|
1105
|
-
imageUrl: N.src
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
return (i, P) => (openBlock(), createElementBlock("div", _hoisted_1$5, [createVNode(unref(AnimatePresence), { initial: !1 }, {
|
|
1109
|
-
default: withCtx(() => [R.value ? (openBlock(), createBlock(unref(Motion), {
|
|
1110
|
-
key: 0,
|
|
1111
|
-
exit: { opacity: 0 },
|
|
1112
|
-
transition: { duration: .2 },
|
|
1113
|
-
class: "absolute inset-0 z-1"
|
|
1114
|
-
}, {
|
|
1115
|
-
default: withCtx(() => [N.blurhash === null ? createCommentVNode("", !0) : (openBlock(), createBlock(ImageBlurhash_default, {
|
|
1116
|
-
key: 0,
|
|
1117
|
-
blurhash: N.blurhash
|
|
1118
|
-
}, null, 8, ["blurhash"]))]),
|
|
1119
|
-
_: 1
|
|
1120
|
-
})) : createCommentVNode("", !0), createElementVNode("button", mergeProps(unref(I).triggerProps.value, {
|
|
1121
|
-
class: [{ "pointer-events-none": !N.isZoomEnabled }, "block size-full cursor-pointer outline-none"],
|
|
1122
|
-
disabled: !N.isZoomEnabled,
|
|
1123
|
-
variant: "unstyled",
|
|
1124
|
-
type: "button",
|
|
1125
|
-
onClick: V
|
|
1126
|
-
}), [createElementVNode("span", _hoisted_3$3, " Zoom image " + toDisplayString(N.alt), 1), createElementVNode("img", {
|
|
1127
|
-
src: N.src,
|
|
1128
|
-
alt: N.alt,
|
|
1129
|
-
class: normalizeClass([{
|
|
1130
|
-
"object-cover": N.fit === "cover",
|
|
1131
|
-
"object-contain": N.fit === "contain"
|
|
1132
|
-
}, "size-full"]),
|
|
1133
|
-
onLoad: B
|
|
1134
|
-
}, null, 42, _hoisted_4$2)], 16, _hoisted_2$3)]),
|
|
1135
|
-
_: 1
|
|
1136
|
-
})]));
|
|
1137
|
-
}
|
|
1138
|
-
}), _hoisted_1$4 = { class: "group bg-secondary px-lg py-md max-w-full overflow-hidden rounded-xl" }, _hoisted_2$2 = {
|
|
1139
|
-
key: 1,
|
|
1140
|
-
"aria-hidden": !0,
|
|
1141
|
-
class: "flex size-8 items-center justify-center"
|
|
1142
|
-
}, _hoisted_3$2 = { class: "relative" }, _hoisted_4$1 = { class: "text-primary-on-brand absolute bottom-0.5 left-1/2 z-89 -translate-x-1/2 text-[0.625rem] font-medium" }, _hoisted_5$1 = { class: "flex items-center justify-between overflow-hidden" }, _hoisted_6 = { class: "flex flex-col overflow-hidden" }, _hoisted_7 = { class: "text-tertiary text-xs" }, _hoisted_8 = { class: "bg-quaternary h-0.75 w-28 shrink-0 rounded-full" }, FormFileUploadItem_default = /* @__PURE__ */ defineComponent({
|
|
1143
|
-
__name: "FormFileUploadItem",
|
|
1144
|
-
props: {
|
|
1145
|
-
isMultiple: { type: Boolean },
|
|
1146
|
-
item: {}
|
|
1147
|
-
},
|
|
1148
|
-
setup(i) {
|
|
1149
|
-
let N = i;
|
|
1150
|
-
return (i, P) => (openBlock(), createBlock(unref(VcFileUploadItem), { item: N.item }, {
|
|
1151
|
-
default: withCtx(() => [createElementVNode("li", _hoisted_1$4, [createVNode(AppGroup_default, { justify: "between" }, {
|
|
1152
|
-
default: withCtx(() => [createVNode(AppGroup_default, {
|
|
1153
|
-
gap: "lg",
|
|
1154
|
-
class: "overflow-hidden"
|
|
1155
|
-
}, {
|
|
1156
|
-
default: withCtx(() => [N.item.url !== null && N.item.mimeType.startsWith("image/") ? (openBlock(), createBlock(Image_default, {
|
|
1157
|
-
key: 0,
|
|
1158
|
-
"is-zoom-enabled": !0,
|
|
1159
|
-
alt: N.item.name,
|
|
1160
|
-
src: N.item.url,
|
|
1161
|
-
blurhash: N.item.status === unref(FileUploadStatus).SUCCESS ? N.item.blurHash : null,
|
|
1162
|
-
class: "size-8 shrink-0 rounded-md",
|
|
1163
|
-
fit: "cover"
|
|
1164
|
-
}, null, 8, [
|
|
1165
|
-
"alt",
|
|
1166
|
-
"src",
|
|
1167
|
-
"blurhash"
|
|
1168
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_2$2, [createElementVNode("div", _hoisted_3$2, [createVNode(unref(VcIcon), {
|
|
1169
|
-
icon: "file",
|
|
1170
|
-
class: "text-brand-500 size-8"
|
|
1171
|
-
}), createElementVNode("div", _hoisted_4$1, toDisplayString(unref(FileUtil).mimeTypeToExtension(N.item.mimeType)), 1)])])), createElementVNode("div", _hoisted_5$1, [createElementVNode("div", _hoisted_6, [createVNode(TruncateText_default, {
|
|
1172
|
-
label: N.item.name,
|
|
1173
|
-
class: "text-primary truncate text-sm"
|
|
1174
|
-
}, null, 8, ["label"]), createVNode(AppGroup_default, null, {
|
|
1175
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_7, toDisplayString(N.item.mimeType), 1), createVNode(unref(AnimatePresence), { initial: !1 }, {
|
|
1176
|
-
default: withCtx(() => [N.item.status === unref(FileUploadStatus).UPLOADING || N.item.status === unref(FileUploadStatus).PENDING ? (openBlock(), createBlock(unref(Motion), {
|
|
1177
|
-
key: 0,
|
|
1178
|
-
exit: { opacity: 0 },
|
|
1179
|
-
"as-child": !0
|
|
1180
|
-
}, {
|
|
1181
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_8, [createVNode(unref(Motion), {
|
|
1182
|
-
animate: { width: N.item.status === unref(FileUploadStatus).UPLOADING ? `${N.item.progress}%` : "0%" },
|
|
1183
|
-
initial: { width: "0%" },
|
|
1184
|
-
class: "bg-brand-solid h-full rounded-full"
|
|
1185
|
-
}, null, 8, ["animate"])])]),
|
|
1186
|
-
_: 1
|
|
1187
|
-
})) : createCommentVNode("", !0)]),
|
|
1188
|
-
_: 1
|
|
1189
|
-
})]),
|
|
1190
|
-
_: 1
|
|
1191
|
-
})])])]),
|
|
1192
|
-
_: 1
|
|
1193
|
-
}), createVNode(FormFileUploadItemRight_default, {
|
|
1194
|
-
"is-multiple": N.isMultiple,
|
|
1195
|
-
item: N.item
|
|
1196
|
-
}, null, 8, ["is-multiple", "item"])]),
|
|
1197
|
-
_: 1
|
|
1198
|
-
})])]),
|
|
1199
|
-
_: 1
|
|
1200
|
-
}, 8, ["item"]));
|
|
1201
|
-
}
|
|
1202
|
-
});
|
|
1203
|
-
const fileReferenceFormSchema = z.object({
|
|
1204
|
-
uuid: z.string(),
|
|
1205
|
-
name: z.string(),
|
|
1206
|
-
blurHash: z.string().nullable(),
|
|
1207
|
-
mimeType: z.string(),
|
|
1208
|
-
order: z.number(),
|
|
1209
|
-
url: z.string().nullable()
|
|
1210
|
-
});
|
|
1211
|
-
function useDealDetailQuery(i) {
|
|
1212
|
-
return He({
|
|
1213
|
-
queryFn: () => DealService.getByUuid(i.value),
|
|
1214
|
-
queryKey: { dealDetail: { dealUuid: i } }
|
|
1215
|
-
});
|
|
1216
|
-
}
|
|
1217
|
-
function useMailCreateMutation() {
|
|
1218
|
-
return ze({
|
|
1219
|
-
queryFn: async ({ body: i, params: N }) => {
|
|
1220
|
-
await MailService.create(i, N.externalAttachments);
|
|
1221
|
-
},
|
|
1222
|
-
queryKeysToInvalidate: {
|
|
1223
|
-
dealDetail: { dealUuid: (i) => i.dealUuid },
|
|
1224
|
-
mailIndex: {}
|
|
1225
|
-
}
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
1228
|
-
var _hoisted_1$3 = { class: "w-full overflow-hidden" }, _hoisted_2$1 = { class: "gap-md flex flex-col justify-start" }, _hoisted_3$1 = { class: "relative" }, _hoisted_4 = { class: "overflow-hidden" }, _hoisted_5 = { class: "gap-sm py-md flex overflow-x-auto" }, DealSendMailFormAttachmentField_default = /* @__PURE__ */ defineComponent({
|
|
1229
|
-
__name: "DealSendMailFormAttachmentField",
|
|
1230
|
-
props: /* @__PURE__ */ mergeModels({
|
|
1231
|
-
id: { default: null },
|
|
1232
|
-
isRequired: {
|
|
1233
|
-
type: Boolean,
|
|
1234
|
-
default: !1
|
|
1235
|
-
},
|
|
1236
|
-
isTouched: {
|
|
1237
|
-
type: Boolean,
|
|
1238
|
-
default: !1
|
|
1239
|
-
},
|
|
1240
|
-
accept: {},
|
|
1241
|
-
errorMessage: { default: null },
|
|
1242
|
-
externalAttachments: { default: () => [] },
|
|
1243
|
-
hint: { default: null },
|
|
1244
|
-
label: { default: null }
|
|
1245
|
-
}, {
|
|
1246
|
-
modelValue: { required: !0 },
|
|
1247
|
-
modelModifiers: {}
|
|
1248
|
-
}),
|
|
1249
|
-
emits: ["update:modelValue"],
|
|
1250
|
-
setup(i) {
|
|
1251
|
-
let N = i, P = useModel(i, "modelValue"), I = useToast(), R = useI18n(), B = useId(), V = computed(() => Array.isArray(P.value));
|
|
1252
|
-
function H(i) {
|
|
1253
|
-
I.error({
|
|
1254
|
-
title: V.value ? R.t("component.file_upload.error.multiple_files_rejected") : R.t("component.file_upload.error.single_file_rejected"),
|
|
1255
|
-
description: i.map((i) => i.name).join(", ")
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
return (i, I) => (openBlock(), createElementBlock("div", _hoisted_1$3, [createVNode(unref(VcFileUploadRoot), {
|
|
1259
|
-
modelValue: P.value,
|
|
1260
|
-
"onUpdate:modelValue": I[0] ||= (i) => P.value = i,
|
|
1261
|
-
accept: N.accept,
|
|
1262
|
-
"get-file-info": unref(FileUploadService).getFileInfo,
|
|
1263
|
-
"confirm-upload": unref(FileUploadService).confirmUpload,
|
|
1264
|
-
onFilesRejected: H
|
|
1265
|
-
}, {
|
|
1266
|
-
default: withCtx(({ items: i }) => [createVNode(unref(MotionConfig), { transition: {
|
|
1267
|
-
duration: .3,
|
|
1268
|
-
type: "spring",
|
|
1269
|
-
bounce: 0
|
|
1270
|
-
} }, {
|
|
1271
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_2$1, [createVNode(unref(VcFileUploadTrigger), null, {
|
|
1272
|
-
default: withCtx(() => [createVNode(unref(VcButton), {
|
|
1273
|
-
class: "w-fit",
|
|
1274
|
-
"icon-left": "attachment",
|
|
1275
|
-
variant: "secondary"
|
|
1276
|
-
}, {
|
|
1277
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(R).t("wise_crm.deal.send_mail.attachment_field.add_attachment")), 1)]),
|
|
1278
|
-
_: 1
|
|
1279
|
-
})]),
|
|
1280
|
-
_: 1
|
|
1281
|
-
}), i.length > 0 || N.externalAttachments.length > 0 ? (openBlock(), createBlock(unref(VcFileUploadDropzone), { key: 0 }, {
|
|
1282
|
-
default: withCtx(({ isHoveringOverPage: P, isHoveringOverDropzone: I }) => [createVNode(unref(VcFormField), {
|
|
1283
|
-
for: unref(B),
|
|
1284
|
-
hint: N.hint,
|
|
1285
|
-
"error-message": N.errorMessage,
|
|
1286
|
-
"is-required": N.isRequired,
|
|
1287
|
-
"is-touched": N.isTouched,
|
|
1288
|
-
label: unref(R).t("wise_crm.deal.send_mail.attachment_field.mail_attachments_label")
|
|
1289
|
-
}, {
|
|
1290
|
-
label: withCtx(() => [createVNode(unref(VcFormFieldLabel), { class: "sr-only" })]),
|
|
1291
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_3$1, [createVNode(FormFileUploadDropzoneOverlay_default, {
|
|
1292
|
-
"is-hovering-over-page": P,
|
|
1293
|
-
"is-hovering-over-dropzone": I
|
|
1294
|
-
}, null, 8, ["is-hovering-over-page", "is-hovering-over-dropzone"]), createVNode(AnimateHeight_default, null, {
|
|
1295
|
-
default: withCtx(() => [createVNode(unref(AnimatePresence), {
|
|
1296
|
-
initial: !1,
|
|
1297
|
-
mode: "popLayout"
|
|
1298
|
-
}, {
|
|
1299
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_4, [createElementVNode("ul", _hoisted_5, [(openBlock(!0), createElementBlock(Fragment, null, renderList(N.externalAttachments, (i) => (openBlock(), createBlock(DealExternalAttachment_default, {
|
|
1300
|
-
key: i.uuid,
|
|
1301
|
-
attachment: i
|
|
1302
|
-
}, null, 8, ["attachment"]))), 128)), (openBlock(!0), createElementBlock(Fragment, null, renderList(i, (i) => (openBlock(), createElementBlock("div", {
|
|
1303
|
-
key: i.key,
|
|
1304
|
-
class: "w-90"
|
|
1305
|
-
}, [createVNode(FormFileUploadItem_default, {
|
|
1306
|
-
item: i,
|
|
1307
|
-
"is-multiple": V.value
|
|
1308
|
-
}, null, 8, ["item", "is-multiple"])]))), 128))])])]),
|
|
1309
|
-
_: 2
|
|
1310
|
-
}, 1024)]),
|
|
1311
|
-
_: 2
|
|
1312
|
-
}, 1024)])]),
|
|
1313
|
-
_: 2
|
|
1314
|
-
}, 1032, [
|
|
1315
|
-
"for",
|
|
1316
|
-
"hint",
|
|
1317
|
-
"error-message",
|
|
1318
|
-
"is-required",
|
|
1319
|
-
"is-touched",
|
|
1320
|
-
"label"
|
|
1321
|
-
])]),
|
|
1322
|
-
_: 2
|
|
1323
|
-
}, 1024)) : createCommentVNode("", !0)])]),
|
|
1324
|
-
_: 2
|
|
1325
|
-
}, 1024)]),
|
|
1326
|
-
_: 1
|
|
1327
|
-
}, 8, [
|
|
1328
|
-
"modelValue",
|
|
1329
|
-
"accept",
|
|
1330
|
-
"get-file-info",
|
|
1331
|
-
"confirm-upload"
|
|
1332
|
-
])]));
|
|
1333
|
-
}
|
|
1334
|
-
}), _hoisted_1$2 = { class: "gap-md text-tertiary flex items-center" }, _hoisted_2 = {
|
|
1335
|
-
key: 0,
|
|
1336
|
-
class: "gap-xs flex items-center"
|
|
1337
|
-
}, _hoisted_3 = { class: "text-xs" }, DealSendMailFormFooter_default = /* @__PURE__ */ defineComponent({
|
|
1338
|
-
__name: "DealSendMailFormFooter",
|
|
1339
|
-
props: {
|
|
1340
|
-
isGeneratingPdf: {
|
|
1341
|
-
type: Boolean,
|
|
1342
|
-
default: !1
|
|
1343
|
-
},
|
|
1344
|
-
isSubmitting: {
|
|
1345
|
-
type: Boolean,
|
|
1346
|
-
default: !1
|
|
1347
|
-
}
|
|
1348
|
-
},
|
|
1349
|
-
emits: ["cancel"],
|
|
1350
|
-
setup(i, { emit: N }) {
|
|
1351
|
-
let P = i, I = N, R = useI18n();
|
|
1352
|
-
function V() {
|
|
1353
|
-
I("cancel");
|
|
1354
|
-
}
|
|
1355
|
-
return (N, I) => (openBlock(), createBlock(AppDialogContainer_default, { class: "pt-lg gap-md border-secondary flex justify-between border-t" }, {
|
|
1356
|
-
default: withCtx(() => [createVNode(unref(VcButton), {
|
|
1357
|
-
variant: "secondary",
|
|
1358
|
-
size: "lg",
|
|
1359
|
-
onClick: V
|
|
1360
|
-
}, {
|
|
1361
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(R).t("wise_crm.form.cancel")), 1)]),
|
|
1362
|
-
_: 1
|
|
1363
|
-
}), createElementVNode("div", _hoisted_1$2, [i.isGeneratingPdf ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(VcSpinner), { class: "size-3" }), createElementVNode("span", _hoisted_3, toDisplayString(unref(R).t("wise_crm.deal.send_mail.pdf_generating")), 1)])) : createCommentVNode("", !0), createVNode(unref(VcButton), {
|
|
1364
|
-
"is-loading": P.isSubmitting,
|
|
1365
|
-
"is-disabled": i.isGeneratingPdf,
|
|
1366
|
-
size: "lg",
|
|
1367
|
-
type: "submit"
|
|
1368
|
-
}, {
|
|
1369
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(R).t("wise_crm.form.send")), 1)]),
|
|
1370
|
-
_: 1
|
|
1371
|
-
}, 8, ["is-loading", "is-disabled"])])]),
|
|
1372
|
-
_: 1
|
|
1373
|
-
}));
|
|
1374
|
-
}
|
|
1375
|
-
});
|
|
1376
|
-
const mailTemplateUuidSchema = z$1.uuid().brand("MailTemplateUuid"), mailCreateFormSchema = z$1.object({
|
|
1377
|
-
clientId: z$1.object({
|
|
1378
|
-
uuid: z$1.uuid(),
|
|
1379
|
-
type: z$1.enum(ClientType)
|
|
1380
|
-
}),
|
|
1381
|
-
dealUuid: z$1.uuid(),
|
|
1382
|
-
mailTemplateUuid: mailTemplateUuidSchema,
|
|
1383
|
-
attachments: fileReferenceFormSchema.array(),
|
|
1384
|
-
bcc: z$1.array(z$1.email()).nullable(),
|
|
1385
|
-
cc: z$1.array(z$1.email()).nullable(),
|
|
1386
|
-
from: z$1.email().nullable(),
|
|
1387
|
-
replyTo: z$1.email().nullable(),
|
|
1388
|
-
subject: z$1.string().min(1),
|
|
1389
|
-
text: z$1.string().min(1),
|
|
1390
|
-
to: z$1.array(z$1.email()).min(1)
|
|
1391
|
-
});
|
|
1392
|
-
var _hoisted_1$1 = { class: "flex-1 overflow-y-auto" }, DealSendMailForm_default = /* @__PURE__ */ defineComponent({
|
|
1393
|
-
__name: "DealSendMailForm",
|
|
1394
|
-
props: {
|
|
1395
|
-
dealUuid: {},
|
|
1396
|
-
isGeneratingPdf: { type: Boolean },
|
|
1397
|
-
client: {},
|
|
1398
|
-
dealLanguage: {},
|
|
1399
|
-
defaultSenderEmails: {},
|
|
1400
|
-
externalAttachments: { default: () => [] },
|
|
1401
|
-
template: {}
|
|
1402
|
-
},
|
|
1403
|
-
emits: ["close"],
|
|
1404
|
-
setup(N, { emit: P }) {
|
|
1405
|
-
let I = N, R = P, B = useI18n(), V = useApiErrorToast(), H = useMailCreateMutation(), U = computed(() => I.template.locales.findIndex((i) => i.language === I.dealLanguage)), G = useForm({
|
|
1406
|
-
initialState: {
|
|
1407
|
-
clientId: {
|
|
1408
|
-
uuid: I.client.uuid,
|
|
1409
|
-
type: I.client.type
|
|
1410
|
-
},
|
|
1411
|
-
dealUuid: I.dealUuid,
|
|
1412
|
-
mailTemplateUuid: I.template.uuid,
|
|
1413
|
-
attachments: [...I.template.locales[U.value]?.attachments.map(FileReferenceTransformer.toForm) ?? []],
|
|
1414
|
-
bcc: I.template.defaultBCC,
|
|
1415
|
-
cc: I.template.defaultCC,
|
|
1416
|
-
from: null,
|
|
1417
|
-
replyTo: null,
|
|
1418
|
-
subject: I.template.locales[U.value]?.subject ?? null,
|
|
1419
|
-
text: I.template.locales[U.value]?.message ?? null,
|
|
1420
|
-
to: I.defaultSenderEmails ?? []
|
|
1421
|
-
},
|
|
1422
|
-
schema: mailCreateFormSchema,
|
|
1423
|
-
onSubmit: async (i) => {
|
|
1424
|
-
try {
|
|
1425
|
-
await H.execute({
|
|
1426
|
-
body: i,
|
|
1427
|
-
params: {
|
|
1428
|
-
dealUuid: I.dealUuid,
|
|
1429
|
-
externalAttachments: I.externalAttachments
|
|
1430
|
-
}
|
|
1431
|
-
}), $();
|
|
1432
|
-
} catch (i) {
|
|
1433
|
-
V.show(i);
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
});
|
|
1437
|
-
G.register("bcc"), G.register("cc"), G.register("replyTo"), G.register("from"), G.register("dealUuid", I.dealUuid), G.register("clientId", I.client);
|
|
1438
|
-
let Y = G.register("subject"), X = G.register("to"), Z = G.register("attachments", []), Q = G.register("text");
|
|
1439
|
-
function $() {
|
|
1440
|
-
R("close");
|
|
1441
|
-
}
|
|
1442
|
-
return (N, P) => (openBlock(), createBlock(AppForm_default, {
|
|
1443
|
-
form: unref(G),
|
|
1444
|
-
class: "flex h-full flex-col"
|
|
1445
|
-
}, {
|
|
1446
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [
|
|
1447
|
-
createVNode(DealCommunicationMailListSectionContainer_default, { class: "pr-6xl" }, {
|
|
1448
|
-
default: withCtx(() => [createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(Y)), {
|
|
1449
|
-
"class-config": {
|
|
1450
|
-
input: "text-xl",
|
|
1451
|
-
root: "border-none shadow-none text-md"
|
|
1452
|
-
},
|
|
1453
|
-
placeholder: unref(B).t("wise_crm.deal.send_mail_form.subject_placeholder")
|
|
1454
|
-
}), null, 16, ["placeholder"])]),
|
|
1455
|
-
_: 1
|
|
1456
|
-
}),
|
|
1457
|
-
createVNode(DealCommunicationMailListSectionContainer_default, null, {
|
|
1458
|
-
default: withCtx(() => [createVNode(AppGroup_default, null, {
|
|
1459
|
-
default: withCtx(() => [createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(X)), {
|
|
1460
|
-
label: unref(B).t("wise_crm.deal.send_mail_form.to_label"),
|
|
1461
|
-
placeholder: unref(B).t("wise_crm.deal.send_mail_form.email_placeholder")
|
|
1462
|
-
}), {
|
|
1463
|
-
label: withCtx(() => [createVNode(unref(VcFormFieldLabel), { class: "sr-only" })]),
|
|
1464
|
-
_: 1
|
|
1465
|
-
}, 16, ["label", "placeholder"])]),
|
|
1466
|
-
_: 1
|
|
1467
|
-
})]),
|
|
1468
|
-
_: 1
|
|
1469
|
-
}),
|
|
1470
|
-
createVNode(DealCommunicationMailListSectionContainer_default, null, {
|
|
1471
|
-
default: withCtx(() => [createVNode(DealSendMailFormAttachmentField_default, mergeProps({ "external-attachments": I.externalAttachments }, unref(toFormField)(unref(Z)), { accept: ["application/pdf", "image/*"] }), null, 16, ["external-attachments"])]),
|
|
1472
|
-
_: 1
|
|
1473
|
-
}),
|
|
1474
|
-
createVNode(DealCommunicationMailListSectionContainer_default, { class: "flex-1 border-b-0" }, {
|
|
1475
|
-
default: withCtx(() => [createVNode(AppRichTextField_default, mergeProps(unref(toFormField)(unref(Q)), { label: unref(B).t("wise_crm.deal.send_mail_form.message_label") }), {
|
|
1476
|
-
label: withCtx(() => [createVNode(unref(VcFormFieldLabel), { class: "sr-only" })]),
|
|
1477
|
-
_: 1
|
|
1478
|
-
}, 16, ["label"])]),
|
|
1479
|
-
_: 1
|
|
1480
|
-
})
|
|
1481
|
-
]), createVNode(DealSendMailFormFooter_default, {
|
|
1482
|
-
"is-generating-pdf": I.isGeneratingPdf,
|
|
1483
|
-
"is-submitting": unref(G).isSubmitting.value,
|
|
1484
|
-
onCancel: $
|
|
1485
|
-
}, null, 8, ["is-generating-pdf", "is-submitting"])]),
|
|
1486
|
-
_: 1
|
|
1487
|
-
}, 8, ["form"]));
|
|
1488
|
-
}
|
|
1489
|
-
}), _hoisted_1 = {
|
|
1490
|
-
key: 0,
|
|
1491
|
-
class: "p-xl"
|
|
1492
|
-
}, DealSendMailDialog_default = /* @__PURE__ */ defineComponent({
|
|
1493
|
-
__name: "DealSendMailDialog",
|
|
1494
|
-
props: {
|
|
1495
|
-
dealUuid: {},
|
|
1496
|
-
client: {},
|
|
1497
|
-
defaultSenderEmails: {},
|
|
1498
|
-
externalAttachments: { default: () => [] },
|
|
1499
|
-
generatePdfFile: {},
|
|
1500
|
-
templateKey: {}
|
|
1501
|
-
},
|
|
1502
|
-
emits: ["close"],
|
|
1503
|
-
setup(i, { emit: N }) {
|
|
1504
|
-
let P = i, I = N, R = useApiErrorToast(), B = ref(P.generatePdfFile !== void 0), V = ref(null), H = computed(() => V.value === null ? P.externalAttachments : [...P.externalAttachments, V.value]), U = useDealDetailQuery(computed(() => P.dealUuid)), G = computed(() => U.data.value?.dealLanguage ?? ContentLocale.NL_BE), K = useMailTemplateDetailByKeyQuery(computed(() => P.templateKey));
|
|
1505
|
-
function Y() {
|
|
1506
|
-
I("close");
|
|
1507
|
-
}
|
|
1508
|
-
async function X() {
|
|
1509
|
-
if (P.generatePdfFile !== void 0) try {
|
|
1510
|
-
V.value = await P.generatePdfFile;
|
|
1511
|
-
} catch (i) {
|
|
1512
|
-
R.show(i);
|
|
1513
|
-
} finally {
|
|
1514
|
-
B.value = !1;
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
return onMounted(async () => {
|
|
1518
|
-
await X();
|
|
1519
|
-
}), (i, N) => (openBlock(), createBlock(unref(VcDialog), {
|
|
1520
|
-
"class-config": { closeButton: { root: "bg-primary" } },
|
|
1521
|
-
class: "h-200 max-h-[90vh] w-280 max-w-[90vw]",
|
|
1522
|
-
onClose: Y
|
|
1523
|
-
}, {
|
|
1524
|
-
default: withCtx(() => [createVNode(unref(VcDialogContent), { class: "h-full w-full border" }, {
|
|
1525
|
-
default: withCtx(() => [unref(K).isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(AppGroup_default, {
|
|
1526
|
-
direction: "col",
|
|
1527
|
-
class: "h-full"
|
|
1528
|
-
}, {
|
|
1529
|
-
default: withCtx(() => [createVNode(AppSkeletonLoader_default, { class: "h-40 w-full" }), createVNode(AppSkeletonLoader_default, { class: "mt-xl w-full flex-1" })]),
|
|
1530
|
-
_: 1
|
|
1531
|
-
})])) : unref(K).data.value !== null && unref(U).data.value !== null ? (openBlock(), createBlock(DealSendMailForm_default, {
|
|
1532
|
-
key: 1,
|
|
1533
|
-
"default-sender-emails": unref(U).data.value.contactPersons.map((i) => i.email).filter((i) => i !== null),
|
|
1534
|
-
"deal-language": G.value,
|
|
1535
|
-
template: unref(K).data.value,
|
|
1536
|
-
client: P.client,
|
|
1537
|
-
"deal-uuid": P.dealUuid,
|
|
1538
|
-
"external-attachments": H.value,
|
|
1539
|
-
"is-generating-pdf": B.value,
|
|
1540
|
-
onClose: Y
|
|
1541
|
-
}, null, 8, [
|
|
1542
|
-
"default-sender-emails",
|
|
1543
|
-
"deal-language",
|
|
1544
|
-
"template",
|
|
1545
|
-
"client",
|
|
1546
|
-
"deal-uuid",
|
|
1547
|
-
"external-attachments",
|
|
1548
|
-
"is-generating-pdf"
|
|
1549
|
-
])) : createCommentVNode("", !0)]),
|
|
1550
|
-
_: 1
|
|
1551
|
-
})]),
|
|
1552
|
-
_: 1
|
|
1553
|
-
}));
|
|
1554
|
-
}
|
|
1555
|
-
});
|
|
1556
|
-
export { AnimateHeight_default as _, FormFileUploadDropzoneOverlay_default as a, useMailTemplateDetailQuery as c, ContentLocaleUtil as d, DealService as f, BoardService as g, useUserIndexQuery as h, FormFileUploadItem_default as i, MailTemplateService as l, ButtonTooltip_default as m, useDealDetailQuery as n, FileUploadService as o, TruncateText_default as p, fileReferenceFormSchema as r, AppRichTextField_default as s, DealSendMailDialog_default as t, DealSourceUtil as u, CenterContent_default as v, AppTagsInputField_default as y };
|