@webx-ui/module-inbox 0.1.0 → 0.2.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/LICENSE +21 -0
- package/dist/FormEditorPage.d.ts +1 -1
- package/dist/index.js +1456 -1425
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useAdmin as
|
|
4
|
-
import { useLocales as be, WxLocales as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as ee, useModel as _e, computed as N, unref as e, openBlock as r, createBlock as y, withCtx as a, createVNode as t, mergeModels as Fe, ref as q, watch as ke, isRef as le, createElementVNode as O, createElementBlock as j, Fragment as J, createCommentVNode as P, createTextVNode as w, toDisplayString as h, renderList as ge, createSlots as Qe, onMounted as al, reactive as nl, normalizeClass as Ye } from "vue";
|
|
2
|
+
import { useRoute as We, useRouter as qe } from "vue-router";
|
|
3
|
+
import { useAdmin as ne, useTranslate as X, useErrorText as de, WxRowMenu as we, WxBackButton as Ee, WxDate as Pe, WxListScreen as Je, WxNotes as sl } from "@webx-ui/module-admin";
|
|
4
|
+
import { useLocales as be, WxLocales as ol, WxRichText as Ge, useModal as Ae, WxDialog as Ie, WxFormItem as R, WxSelect as me, WxInput as Y, WxText as K, WxAction as xe, WxButton as Q, WxInputNumber as ye, WxDatePicker as Be, WxTagsInput as il, WxCheckbox as pe, WxSpace as Ce, toast as B, createModal as Ne, WxCard as te, WxEmpty as Se, WxSortableList as Re, WxBadge as Ve, localizedValue as re, confirm as $e, WxSwitch as Xe, WxTable as el, WxAlert as Te, WxSkeleton as Me, WxTabs as He, WxTab as fe, WxActionBar as ul, WxTextarea as rl, WxRadioGroup as dl, WxCheckboxGroup as cl, WxHeading as ll, WxAvatar as pl, WxTooltip as ml, WxIcon as vl, WxListDetail as fl, WxIndicator as je, WxDescriptions as Ke, WxDescriptionsItem as ze, WxFileCard as bl, WxTimeline as hl, WxTimelineItem as yl } from "@webx-ui/core";
|
|
5
|
+
const tl = /* @__PURE__ */ ee({
|
|
6
6
|
__name: "LocalizedRichText",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ Fe({
|
|
8
8
|
placeholder: { default: void 0 },
|
|
9
9
|
minHeight: { default: "160px" }
|
|
10
10
|
}, {
|
|
@@ -12,96 +12,96 @@ const el = /* @__PURE__ */ le({
|
|
|
12
12
|
modelModifiers: {}
|
|
13
13
|
}),
|
|
14
14
|
emits: ["update:modelValue"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
}),
|
|
15
|
+
setup(d) {
|
|
16
|
+
const u = _e(d, "modelValue"), i = d, f = be(), s = N(() => {
|
|
17
|
+
const v = f.active.value;
|
|
18
|
+
return f.list.value.some((T) => T.code === v) ? v : f.list.value[0]?.code ?? "";
|
|
19
|
+
}), m = N({
|
|
20
20
|
get: () => {
|
|
21
|
-
const
|
|
22
|
-
return typeof
|
|
21
|
+
const v = u.value;
|
|
22
|
+
return typeof v == "string" ? s.value === "" || s.value === f.list.value[0]?.code ? v : "" : v[s.value] ?? "";
|
|
23
23
|
},
|
|
24
|
-
set: (
|
|
24
|
+
set: (v) => {
|
|
25
25
|
if (s.value === "") {
|
|
26
|
-
|
|
26
|
+
u.value = v;
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
const l = typeof
|
|
30
|
-
|
|
29
|
+
const l = typeof u.value == "string" ? { [s.value]: u.value } : u.value;
|
|
30
|
+
u.value = { ...l, [s.value]: v };
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
return (
|
|
33
|
+
return (v, l) => e(f).list.value.length > 0 ? (r(), y(e(ol), { key: 0 }, {
|
|
34
34
|
default: a(() => [
|
|
35
|
-
t(e(
|
|
36
|
-
modelValue:
|
|
37
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
38
|
-
placeholder:
|
|
39
|
-
"min-height":
|
|
35
|
+
t(e(Ge), {
|
|
36
|
+
modelValue: m.value,
|
|
37
|
+
"onUpdate:modelValue": l[0] || (l[0] = (T) => m.value = T),
|
|
38
|
+
placeholder: i.placeholder,
|
|
39
|
+
"min-height": i.minHeight
|
|
40
40
|
}, null, 8, ["modelValue", "placeholder", "min-height"])
|
|
41
41
|
]),
|
|
42
42
|
_: 1
|
|
43
|
-
})) : (
|
|
43
|
+
})) : (r(), y(e(Ge), {
|
|
44
44
|
key: 1,
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
47
|
-
placeholder:
|
|
48
|
-
"min-height":
|
|
45
|
+
modelValue: m.value,
|
|
46
|
+
"onUpdate:modelValue": l[1] || (l[1] = (T) => m.value = T),
|
|
47
|
+
placeholder: i.placeholder,
|
|
48
|
+
"min-height": i.minHeight
|
|
49
49
|
}, null, 8, ["modelValue", "placeholder", "min-height"]));
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
function
|
|
53
|
-
const
|
|
52
|
+
function oe(d) {
|
|
53
|
+
const u = `${d.apiPath}/inbox`, i = (s) => s.data, f = () => {
|
|
54
54
|
};
|
|
55
55
|
return {
|
|
56
|
-
forms: () =>
|
|
57
|
-
form: (s) =>
|
|
58
|
-
createForm: (s) =>
|
|
59
|
-
saveForm: (s,
|
|
60
|
-
removeForm: (s) =>
|
|
61
|
-
duplicateForm: (s) =>
|
|
62
|
-
sortForms: (s) =>
|
|
63
|
-
fields: (s) =>
|
|
64
|
-
createField: (s,
|
|
65
|
-
saveField: (s,
|
|
66
|
-
removeField: (s) =>
|
|
67
|
-
sortFields: (s,
|
|
68
|
-
statuses: () =>
|
|
69
|
-
createStatus: (s) =>
|
|
70
|
-
saveStatus: (s,
|
|
71
|
-
removeStatus: (s) =>
|
|
72
|
-
sortStatuses: (s) =>
|
|
73
|
-
recipients: () =>
|
|
74
|
-
submissions: (s,
|
|
75
|
-
...
|
|
76
|
-
data:
|
|
77
|
-
columns:
|
|
78
|
-
counts:
|
|
56
|
+
forms: () => d.http.get(`${u}/forms`).then(i),
|
|
57
|
+
form: (s) => d.http.get(`${u}/forms/${s}`).then(i),
|
|
58
|
+
createForm: (s) => d.http.post(`${u}/forms`, s).then(i),
|
|
59
|
+
saveForm: (s, m) => d.http.put(`${u}/forms/${s}`, m).then(i),
|
|
60
|
+
removeForm: (s) => d.http.delete(`${u}/forms/${s}`).then(f),
|
|
61
|
+
duplicateForm: (s) => d.http.post(`${u}/forms/${s}/duplicate`, {}).then(i),
|
|
62
|
+
sortForms: (s) => d.http.post(`${u}/forms/sorting`, { ids: s }).then(f),
|
|
63
|
+
fields: (s) => d.http.get(`${u}/forms/${s}/fields`).then(i),
|
|
64
|
+
createField: (s, m) => d.http.post(`${u}/forms/${s}/fields`, m).then(i),
|
|
65
|
+
saveField: (s, m) => d.http.put(`${u}/fields/${s}`, m).then(i),
|
|
66
|
+
removeField: (s) => d.http.delete(`${u}/fields/${s}`).then(f),
|
|
67
|
+
sortFields: (s, m) => d.http.post(`${u}/forms/${s}/fields/sorting`, { ids: m }).then(f),
|
|
68
|
+
statuses: () => d.http.get(`${u}/statuses`).then(i),
|
|
69
|
+
createStatus: (s) => d.http.post(`${u}/statuses`, s).then(i),
|
|
70
|
+
saveStatus: (s, m) => d.http.put(`${u}/statuses/${s}`, m).then(i),
|
|
71
|
+
removeStatus: (s) => d.http.delete(`${u}/statuses/${s}`).then(f),
|
|
72
|
+
sortStatuses: (s) => d.http.post(`${u}/statuses/sorting`, { ids: s }).then(f),
|
|
73
|
+
recipients: () => d.http.get(`${u}/recipients`).then(i),
|
|
74
|
+
submissions: (s, m = {}) => d.http.get(`${u}/forms/${s}/submissions`, { query: Oe(m) }).then((v) => ({
|
|
75
|
+
...v.meta,
|
|
76
|
+
data: v.data,
|
|
77
|
+
columns: v.columns,
|
|
78
|
+
counts: v.counts
|
|
79
79
|
})),
|
|
80
|
-
submission: (s,
|
|
81
|
-
createSubmission: (s,
|
|
82
|
-
saveSubmission: (s,
|
|
83
|
-
removeSubmission: (s) =>
|
|
84
|
-
massSubmissions: (s) =>
|
|
85
|
-
exportUrl: (s,
|
|
86
|
-
const
|
|
87
|
-
for (const [
|
|
88
|
-
|
|
89
|
-
const l =
|
|
90
|
-
return `${
|
|
80
|
+
submission: (s, m = {}) => d.http.get(`${u}/submissions/${s}`, { query: Oe(m) }).then(i),
|
|
81
|
+
createSubmission: (s, m) => d.http.post(`${u}/forms/${s}/submissions`, { fields: m }).then(i),
|
|
82
|
+
saveSubmission: (s, m) => d.http.put(`${u}/submissions/${s}`, m).then(i),
|
|
83
|
+
removeSubmission: (s) => d.http.delete(`${u}/submissions/${s}`).then(f),
|
|
84
|
+
massSubmissions: (s) => d.http.post(`${u}/submissions/mass`, s).then(i),
|
|
85
|
+
exportUrl: (s, m = {}) => {
|
|
86
|
+
const v = new URLSearchParams();
|
|
87
|
+
for (const [T, o] of Object.entries(Oe(m)))
|
|
88
|
+
o != null && o !== "" && v.set(T, String(o));
|
|
89
|
+
const l = v.toString();
|
|
90
|
+
return `${u}/forms/${s}/submissions/export${l === "" ? "" : `?${l}`}`;
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function Oe(
|
|
94
|
+
function Oe(d) {
|
|
95
95
|
return {
|
|
96
|
-
view:
|
|
97
|
-
search:
|
|
98
|
-
assignee:
|
|
99
|
-
sort:
|
|
100
|
-
page:
|
|
101
|
-
per_page:
|
|
96
|
+
view: d.view === void 0 || d.view === "" ? void 0 : d.view,
|
|
97
|
+
search: d.search === void 0 || d.search === "" ? void 0 : d.search,
|
|
98
|
+
assignee: d.assignee ?? void 0,
|
|
99
|
+
sort: d.sort ?? void 0,
|
|
100
|
+
page: d.page,
|
|
101
|
+
per_page: d.per_page
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const gl = {
|
|
105
105
|
module: {
|
|
106
106
|
title: "Inbox"
|
|
107
107
|
},
|
|
@@ -149,6 +149,8 @@ const yl = {
|
|
|
149
149
|
"add-admin": "Add an administrator",
|
|
150
150
|
"add-email": "Add an address",
|
|
151
151
|
remove: "Remove",
|
|
152
|
+
"remove-recipient-title": "Remove this recipient?",
|
|
153
|
+
"remove-recipient-text": "They stop being told when something arrives.",
|
|
152
154
|
"email-field": "The field holding the sender’s address",
|
|
153
155
|
"email-field-help": "A reply to the notification then goes to whoever wrote in.",
|
|
154
156
|
"no-email-field": "None",
|
|
@@ -294,15 +296,15 @@ const yl = {
|
|
|
294
296
|
"type-file": "File",
|
|
295
297
|
"type-hidden": "Hidden"
|
|
296
298
|
}
|
|
297
|
-
},
|
|
298
|
-
function
|
|
299
|
+
}, Ze = /* @__PURE__ */ new WeakSet();
|
|
300
|
+
function ie() {
|
|
299
301
|
try {
|
|
300
|
-
const { i18n:
|
|
301
|
-
|
|
302
|
+
const { i18n: d } = ne();
|
|
303
|
+
Ze.has(d) || (d.defaults("webx-inbox", gl), Ze.add(d));
|
|
302
304
|
} catch {
|
|
303
305
|
}
|
|
304
306
|
}
|
|
305
|
-
const
|
|
307
|
+
const xl = [
|
|
306
308
|
"text",
|
|
307
309
|
"email",
|
|
308
310
|
"tel",
|
|
@@ -314,108 +316,108 @@ const gl = [
|
|
|
314
316
|
"date",
|
|
315
317
|
"file",
|
|
316
318
|
"hidden"
|
|
317
|
-
],
|
|
319
|
+
], _l = ["default", "primary", "success", "warning", "info", "danger"], wl = { class: "wx-inbox-field-form" }, kl = { class: "wx-inbox-field-form__row" }, Vl = {
|
|
318
320
|
key: 2,
|
|
319
321
|
class: "wx-inbox-choices"
|
|
320
|
-
},
|
|
322
|
+
}, $l = { class: "wx-inbox-field-form__row" }, Ul = { class: "wx-inbox-field-form__checks" }, Sl = /* @__PURE__ */ ee({
|
|
321
323
|
__name: "FieldDialog",
|
|
322
324
|
props: {
|
|
323
325
|
field: {},
|
|
324
326
|
form: {}
|
|
325
327
|
},
|
|
326
|
-
setup(
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
const l =
|
|
328
|
+
setup(d) {
|
|
329
|
+
const u = d, { resolve: i, dismiss: f, open: s } = Ae(), m = ne(), v = oe(m);
|
|
330
|
+
ie();
|
|
331
|
+
const l = X("webx-inbox"), T = de(), o = q(!1), c = q({}), A = q(""), S = q("text"), W = q({}), U = q({}), F = q({}), p = q({}), b = q(!0), _ = q(!1), C = q(!0), z = q(!1);
|
|
330
332
|
ke(
|
|
331
|
-
() =>
|
|
332
|
-
(
|
|
333
|
-
|
|
333
|
+
() => u.field,
|
|
334
|
+
(H) => {
|
|
335
|
+
A.value = H?.name ?? "", S.value = H?.type ?? "text", W.value = { ...H?.title ?? {} }, U.value = { ...H?.placeholder ?? {} }, F.value = { ...H?.help ?? {} }, p.value = { ...H?.options ?? {} }, b.value = H?.is_enabled ?? !0, _.value = H?.is_required ?? !1, C.value = H?.is_fullsize ?? !0, z.value = H?.in_table ?? !1, c.value = {};
|
|
334
336
|
},
|
|
335
337
|
{ immediate: !0 }
|
|
336
338
|
);
|
|
337
|
-
const
|
|
338
|
-
() =>
|
|
339
|
-
), D =
|
|
340
|
-
() => Array.isArray(
|
|
341
|
-
), L =
|
|
342
|
-
get: () => Array.isArray(
|
|
343
|
-
set: (
|
|
339
|
+
const E = N(
|
|
340
|
+
() => xl.map((H) => ({ value: H, label: l(`fields.type-${H}`) }))
|
|
341
|
+
), D = N(() => ["select", "radio", "checkbox"].includes(S.value)), I = N(
|
|
342
|
+
() => Array.isArray(p.value.choices) ? p.value.choices : []
|
|
343
|
+
), L = N({
|
|
344
|
+
get: () => Array.isArray(p.value.extensions) ? p.value.extensions : [],
|
|
345
|
+
set: (H) => g(
|
|
344
346
|
"extensions",
|
|
345
|
-
|
|
347
|
+
H.map((V) => V.replace(/^\./, ""))
|
|
346
348
|
)
|
|
347
349
|
});
|
|
348
|
-
function
|
|
349
|
-
|
|
350
|
+
function g(H, V) {
|
|
351
|
+
p.value = { ...p.value, [H]: V };
|
|
350
352
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
+
function $() {
|
|
354
|
+
g("choices", [...I.value, { value: "", label: {} }]);
|
|
353
355
|
}
|
|
354
|
-
function
|
|
355
|
-
|
|
356
|
+
function Z(H) {
|
|
357
|
+
g(
|
|
356
358
|
"choices",
|
|
357
|
-
|
|
359
|
+
I.value.filter((V, k) => k !== H)
|
|
358
360
|
);
|
|
359
361
|
}
|
|
360
|
-
function
|
|
361
|
-
|
|
362
|
+
function G(H, V) {
|
|
363
|
+
g(
|
|
362
364
|
"choices",
|
|
363
|
-
|
|
365
|
+
I.value.map((k, ae) => ae === H ? { ...k, ...V } : k)
|
|
364
366
|
);
|
|
365
367
|
}
|
|
366
|
-
function
|
|
367
|
-
return
|
|
368
|
+
function ce(H) {
|
|
369
|
+
return c.value[H]?.[0];
|
|
368
370
|
}
|
|
369
|
-
async function
|
|
370
|
-
|
|
371
|
-
const
|
|
372
|
-
name:
|
|
373
|
-
type:
|
|
374
|
-
title:
|
|
371
|
+
async function Ue() {
|
|
372
|
+
o.value = !0, c.value = {};
|
|
373
|
+
const H = {
|
|
374
|
+
name: A.value.trim() === "" ? null : A.value.trim(),
|
|
375
|
+
type: S.value,
|
|
376
|
+
title: W.value,
|
|
375
377
|
placeholder: U.value,
|
|
376
|
-
help:
|
|
377
|
-
options:
|
|
378
|
-
is_enabled:
|
|
379
|
-
is_required:
|
|
380
|
-
is_fullsize:
|
|
381
|
-
in_table:
|
|
378
|
+
help: F.value,
|
|
379
|
+
options: p.value,
|
|
380
|
+
is_enabled: b.value,
|
|
381
|
+
is_required: _.value,
|
|
382
|
+
is_fullsize: C.value,
|
|
383
|
+
in_table: z.value
|
|
382
384
|
};
|
|
383
385
|
try {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
+
i(
|
|
387
|
+
u.field === null ? await v.createField(u.form.id, H) : await v.saveField(u.field.id, H)
|
|
386
388
|
);
|
|
387
|
-
} catch (
|
|
388
|
-
const
|
|
389
|
-
|
|
389
|
+
} catch (V) {
|
|
390
|
+
const k = V.body;
|
|
391
|
+
k?.errors ? (c.value = k.errors, B.danger(l("panel.failed"))) : B.danger(T(V));
|
|
390
392
|
} finally {
|
|
391
|
-
|
|
393
|
+
o.value = !1;
|
|
392
394
|
}
|
|
393
395
|
}
|
|
394
|
-
return (
|
|
396
|
+
return (H, V) => (r(), y(e(Ie), {
|
|
395
397
|
open: e(s),
|
|
396
|
-
"onUpdate:open":
|
|
397
|
-
title:
|
|
398
|
+
"onUpdate:open": V[21] || (V[21] = (k) => le(s) ? s.value = k : null),
|
|
399
|
+
title: d.field ? e(l)("fields.edit-field") : e(l)("fields.new-field"),
|
|
398
400
|
width: 720
|
|
399
401
|
}, {
|
|
400
402
|
footer: a(() => [
|
|
401
403
|
t(e(Ce), { size: "sm" }, {
|
|
402
404
|
default: a(() => [
|
|
403
|
-
t(e(
|
|
405
|
+
t(e(Q), {
|
|
404
406
|
variant: "outline",
|
|
405
|
-
onClick:
|
|
407
|
+
onClick: V[20] || (V[20] = (k) => e(f)())
|
|
406
408
|
}, {
|
|
407
409
|
default: a(() => [
|
|
408
|
-
|
|
410
|
+
w(h(e(l)("fields.cancel")), 1)
|
|
409
411
|
]),
|
|
410
412
|
_: 1
|
|
411
413
|
}),
|
|
412
|
-
t(e(
|
|
414
|
+
t(e(Q), {
|
|
413
415
|
type: "primary",
|
|
414
|
-
loading:
|
|
415
|
-
onClick:
|
|
416
|
+
loading: o.value,
|
|
417
|
+
onClick: Ue
|
|
416
418
|
}, {
|
|
417
419
|
default: a(() => [
|
|
418
|
-
|
|
420
|
+
w(h(e(l)("fields.save")), 1)
|
|
419
421
|
]),
|
|
420
422
|
_: 1
|
|
421
423
|
}, 8, ["loading"])
|
|
@@ -424,16 +426,16 @@ const gl = [
|
|
|
424
426
|
})
|
|
425
427
|
]),
|
|
426
428
|
default: a(() => [
|
|
427
|
-
|
|
428
|
-
|
|
429
|
+
O("div", wl, [
|
|
430
|
+
O("div", kl, [
|
|
429
431
|
t(e(R), {
|
|
430
432
|
label: e(l)("fields.type")
|
|
431
433
|
}, {
|
|
432
434
|
default: a(() => [
|
|
433
|
-
t(e(
|
|
434
|
-
modelValue:
|
|
435
|
-
"onUpdate:modelValue":
|
|
436
|
-
options:
|
|
435
|
+
t(e(me), {
|
|
436
|
+
modelValue: S.value,
|
|
437
|
+
"onUpdate:modelValue": V[0] || (V[0] = (k) => S.value = k),
|
|
438
|
+
options: E.value
|
|
437
439
|
}, null, 8, ["modelValue", "options"])
|
|
438
440
|
]),
|
|
439
441
|
_: 1
|
|
@@ -441,12 +443,12 @@ const gl = [
|
|
|
441
443
|
t(e(R), {
|
|
442
444
|
label: e(l)("fields.name"),
|
|
443
445
|
help: e(l)("fields.name-help"),
|
|
444
|
-
error:
|
|
446
|
+
error: ce("name")
|
|
445
447
|
}, {
|
|
446
448
|
default: a(() => [
|
|
447
|
-
t(e(
|
|
448
|
-
modelValue:
|
|
449
|
-
"onUpdate:modelValue":
|
|
449
|
+
t(e(Y), {
|
|
450
|
+
modelValue: A.value,
|
|
451
|
+
"onUpdate:modelValue": V[1] || (V[1] = (k) => A.value = k),
|
|
450
452
|
placeholder: "email"
|
|
451
453
|
}, null, 8, ["modelValue"])
|
|
452
454
|
]),
|
|
@@ -455,163 +457,163 @@ const gl = [
|
|
|
455
457
|
]),
|
|
456
458
|
t(e(R), {
|
|
457
459
|
label: e(l)("fields.title"),
|
|
458
|
-
error:
|
|
460
|
+
error: ce("title"),
|
|
459
461
|
required: ""
|
|
460
462
|
}, {
|
|
461
463
|
default: a(() => [
|
|
462
|
-
t(e(
|
|
463
|
-
modelValue:
|
|
464
|
-
"onUpdate:modelValue":
|
|
464
|
+
t(e(Y), {
|
|
465
|
+
modelValue: W.value,
|
|
466
|
+
"onUpdate:modelValue": V[2] || (V[2] = (k) => W.value = k),
|
|
465
467
|
localized: ""
|
|
466
468
|
}, null, 8, ["modelValue"])
|
|
467
469
|
]),
|
|
468
470
|
_: 1
|
|
469
471
|
}, 8, ["label", "error"]),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
+
S.value !== "hidden" ? (r(), j(J, { key: 0 }, [
|
|
473
|
+
S.value !== "consent" ? (r(), y(e(R), {
|
|
472
474
|
key: 0,
|
|
473
475
|
label: e(l)("fields.placeholder")
|
|
474
476
|
}, {
|
|
475
477
|
default: a(() => [
|
|
476
|
-
t(e(
|
|
478
|
+
t(e(Y), {
|
|
477
479
|
modelValue: U.value,
|
|
478
|
-
"onUpdate:modelValue":
|
|
480
|
+
"onUpdate:modelValue": V[3] || (V[3] = (k) => U.value = k),
|
|
479
481
|
localized: ""
|
|
480
482
|
}, null, 8, ["modelValue"])
|
|
481
483
|
]),
|
|
482
484
|
_: 1
|
|
483
|
-
}, 8, ["label"])) :
|
|
485
|
+
}, 8, ["label"])) : P("", !0),
|
|
484
486
|
t(e(R), {
|
|
485
487
|
label: e(l)("fields.help")
|
|
486
488
|
}, {
|
|
487
489
|
default: a(() => [
|
|
488
|
-
t(e(
|
|
489
|
-
modelValue:
|
|
490
|
-
"onUpdate:modelValue":
|
|
490
|
+
t(e(Y), {
|
|
491
|
+
modelValue: F.value,
|
|
492
|
+
"onUpdate:modelValue": V[4] || (V[4] = (k) => F.value = k),
|
|
491
493
|
localized: ""
|
|
492
494
|
}, null, 8, ["modelValue"])
|
|
493
495
|
]),
|
|
494
496
|
_: 1
|
|
495
497
|
}, 8, ["label"])
|
|
496
|
-
], 64)) :
|
|
497
|
-
|
|
498
|
+
], 64)) : P("", !0),
|
|
499
|
+
S.value === "consent" ? (r(), y(e(R), {
|
|
498
500
|
key: 1,
|
|
499
501
|
label: e(l)("fields.consent-text"),
|
|
500
502
|
help: e(l)("fields.consent-text-help")
|
|
501
503
|
}, {
|
|
502
504
|
default: a(() => [
|
|
503
|
-
t(
|
|
504
|
-
"model-value":
|
|
505
|
+
t(tl, {
|
|
506
|
+
"model-value": p.value.text ?? {},
|
|
505
507
|
"min-height": "100px",
|
|
506
|
-
"onUpdate:modelValue":
|
|
508
|
+
"onUpdate:modelValue": V[5] || (V[5] = (k) => g("text", k))
|
|
507
509
|
}, null, 8, ["model-value"])
|
|
508
510
|
]),
|
|
509
511
|
_: 1
|
|
510
|
-
}, 8, ["label", "help"])) :
|
|
511
|
-
D.value ? (
|
|
512
|
-
t(e(
|
|
512
|
+
}, 8, ["label", "help"])) : P("", !0),
|
|
513
|
+
D.value ? (r(), j("div", Vl, [
|
|
514
|
+
t(e(K), {
|
|
513
515
|
size: "sm",
|
|
514
516
|
weight: "medium"
|
|
515
517
|
}, {
|
|
516
518
|
default: a(() => [
|
|
517
|
-
|
|
519
|
+
w(h(e(l)("fields.choices")), 1)
|
|
518
520
|
]),
|
|
519
521
|
_: 1
|
|
520
522
|
}),
|
|
521
|
-
|
|
523
|
+
I.value.length === 0 ? (r(), y(e(K), {
|
|
522
524
|
key: 0,
|
|
523
525
|
size: "sm",
|
|
524
526
|
tone: "placeholder"
|
|
525
527
|
}, {
|
|
526
528
|
default: a(() => [
|
|
527
|
-
|
|
529
|
+
w(h(e(l)("fields.no-choices")), 1)
|
|
528
530
|
]),
|
|
529
531
|
_: 1
|
|
530
|
-
})) :
|
|
531
|
-
(
|
|
532
|
-
key:
|
|
532
|
+
})) : P("", !0),
|
|
533
|
+
(r(!0), j(J, null, ge(I.value, (k, ae) => (r(), j("div", {
|
|
534
|
+
key: ae,
|
|
533
535
|
class: "wx-inbox-choices__row"
|
|
534
536
|
}, [
|
|
535
|
-
t(e(
|
|
536
|
-
"model-value":
|
|
537
|
+
t(e(Y), {
|
|
538
|
+
"model-value": k.value,
|
|
537
539
|
placeholder: e(l)("fields.choice-value"),
|
|
538
|
-
"onUpdate:modelValue": (
|
|
540
|
+
"onUpdate:modelValue": (ve) => G(ae, { value: String(ve) })
|
|
539
541
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
|
|
540
|
-
t(e(
|
|
541
|
-
"model-value":
|
|
542
|
+
t(e(Y), {
|
|
543
|
+
"model-value": k.label,
|
|
542
544
|
localized: "",
|
|
543
545
|
placeholder: e(l)("fields.choice-label"),
|
|
544
|
-
"onUpdate:modelValue": (
|
|
546
|
+
"onUpdate:modelValue": (ve) => G(ae, { label: ve })
|
|
545
547
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
|
|
546
|
-
t(e(
|
|
548
|
+
t(e(xe), {
|
|
547
549
|
icon: "trash",
|
|
548
550
|
title: e(l)("fields.delete"),
|
|
549
|
-
onClick: (
|
|
551
|
+
onClick: (ve) => Z(ae)
|
|
550
552
|
}, null, 8, ["title", "onClick"])
|
|
551
553
|
]))), 128)),
|
|
552
|
-
t(e(
|
|
554
|
+
t(e(Q), {
|
|
553
555
|
variant: "outline",
|
|
554
556
|
size: "sm",
|
|
555
557
|
icon: "plus",
|
|
556
|
-
onClick:
|
|
558
|
+
onClick: $
|
|
557
559
|
}, {
|
|
558
560
|
default: a(() => [
|
|
559
|
-
|
|
561
|
+
w(h(e(l)("fields.add-choice")), 1)
|
|
560
562
|
]),
|
|
561
563
|
_: 1
|
|
562
564
|
})
|
|
563
|
-
])) :
|
|
564
|
-
|
|
565
|
-
|
|
565
|
+
])) : P("", !0),
|
|
566
|
+
O("div", $l, [
|
|
567
|
+
S.value === "textarea" ? (r(), y(e(R), {
|
|
566
568
|
key: 0,
|
|
567
569
|
label: e(l)("fields.rows")
|
|
568
570
|
}, {
|
|
569
571
|
default: a(() => [
|
|
570
|
-
t(e(
|
|
571
|
-
"model-value":
|
|
572
|
+
t(e(ye), {
|
|
573
|
+
"model-value": p.value.rows ?? 5,
|
|
572
574
|
min: 2,
|
|
573
575
|
max: 30,
|
|
574
|
-
"onUpdate:modelValue":
|
|
576
|
+
"onUpdate:modelValue": V[6] || (V[6] = (k) => g("rows", k))
|
|
575
577
|
}, null, 8, ["model-value"])
|
|
576
578
|
]),
|
|
577
579
|
_: 1
|
|
578
|
-
}, 8, ["label"])) :
|
|
579
|
-
["text", "email", "textarea"].includes(
|
|
580
|
+
}, 8, ["label"])) : P("", !0),
|
|
581
|
+
["text", "email", "textarea"].includes(S.value) ? (r(), y(e(R), {
|
|
580
582
|
key: 1,
|
|
581
583
|
label: e(l)("fields.maxlength")
|
|
582
584
|
}, {
|
|
583
585
|
default: a(() => [
|
|
584
|
-
t(e(
|
|
585
|
-
"model-value":
|
|
586
|
+
t(e(ye), {
|
|
587
|
+
"model-value": p.value.maxlength ?? null,
|
|
586
588
|
min: 1,
|
|
587
589
|
max: 2e4,
|
|
588
|
-
"onUpdate:modelValue":
|
|
590
|
+
"onUpdate:modelValue": V[7] || (V[7] = (k) => g("maxlength", k))
|
|
589
591
|
}, null, 8, ["model-value"])
|
|
590
592
|
]),
|
|
591
593
|
_: 1
|
|
592
|
-
}, 8, ["label"])) :
|
|
593
|
-
|
|
594
|
+
}, 8, ["label"])) : P("", !0),
|
|
595
|
+
S.value === "tel" ? (r(), y(e(R), {
|
|
594
596
|
key: 2,
|
|
595
597
|
label: e(l)("fields.pattern"),
|
|
596
598
|
help: e(l)("fields.pattern-help")
|
|
597
599
|
}, {
|
|
598
600
|
default: a(() => [
|
|
599
|
-
t(e(
|
|
600
|
-
"model-value":
|
|
601
|
-
"onUpdate:modelValue":
|
|
601
|
+
t(e(Y), {
|
|
602
|
+
"model-value": p.value.pattern ?? "",
|
|
603
|
+
"onUpdate:modelValue": V[8] || (V[8] = (k) => g("pattern", k))
|
|
602
604
|
}, null, 8, ["model-value"])
|
|
603
605
|
]),
|
|
604
606
|
_: 1
|
|
605
|
-
}, 8, ["label", "help"])) :
|
|
606
|
-
|
|
607
|
+
}, 8, ["label", "help"])) : P("", !0),
|
|
608
|
+
S.value === "date" ? (r(), j(J, { key: 3 }, [
|
|
607
609
|
t(e(R), {
|
|
608
610
|
label: e(l)("fields.earliest")
|
|
609
611
|
}, {
|
|
610
612
|
default: a(() => [
|
|
611
613
|
t(e(Be), {
|
|
612
614
|
clearable: "",
|
|
613
|
-
"model-value":
|
|
614
|
-
"onUpdate:modelValue":
|
|
615
|
+
"model-value": p.value.min ?? null,
|
|
616
|
+
"onUpdate:modelValue": V[9] || (V[9] = (k) => g("min", k))
|
|
615
617
|
}, null, 8, ["model-value"])
|
|
616
618
|
]),
|
|
617
619
|
_: 1
|
|
@@ -622,22 +624,22 @@ const gl = [
|
|
|
622
624
|
default: a(() => [
|
|
623
625
|
t(e(Be), {
|
|
624
626
|
clearable: "",
|
|
625
|
-
"model-value":
|
|
626
|
-
"onUpdate:modelValue":
|
|
627
|
+
"model-value": p.value.max ?? null,
|
|
628
|
+
"onUpdate:modelValue": V[10] || (V[10] = (k) => g("max", k))
|
|
627
629
|
}, null, 8, ["model-value"])
|
|
628
630
|
]),
|
|
629
631
|
_: 1
|
|
630
632
|
}, 8, ["label"])
|
|
631
|
-
], 64)) :
|
|
632
|
-
|
|
633
|
+
], 64)) : P("", !0),
|
|
634
|
+
S.value === "checkbox" ? (r(), j(J, { key: 4 }, [
|
|
633
635
|
t(e(R), {
|
|
634
636
|
label: e(l)("fields.min-choices")
|
|
635
637
|
}, {
|
|
636
638
|
default: a(() => [
|
|
637
|
-
t(e(
|
|
638
|
-
"model-value":
|
|
639
|
+
t(e(ye), {
|
|
640
|
+
"model-value": p.value.min ?? null,
|
|
639
641
|
min: 0,
|
|
640
|
-
"onUpdate:modelValue":
|
|
642
|
+
"onUpdate:modelValue": V[11] || (V[11] = (k) => g("min", k))
|
|
641
643
|
}, null, 8, ["model-value"])
|
|
642
644
|
]),
|
|
643
645
|
_: 1
|
|
@@ -646,68 +648,68 @@ const gl = [
|
|
|
646
648
|
label: e(l)("fields.max-choices")
|
|
647
649
|
}, {
|
|
648
650
|
default: a(() => [
|
|
649
|
-
t(e(
|
|
650
|
-
"model-value":
|
|
651
|
+
t(e(ye), {
|
|
652
|
+
"model-value": p.value.max ?? null,
|
|
651
653
|
min: 0,
|
|
652
|
-
"onUpdate:modelValue":
|
|
654
|
+
"onUpdate:modelValue": V[12] || (V[12] = (k) => g("max", k))
|
|
653
655
|
}, null, 8, ["model-value"])
|
|
654
656
|
]),
|
|
655
657
|
_: 1
|
|
656
658
|
}, 8, ["label"])
|
|
657
|
-
], 64)) :
|
|
658
|
-
|
|
659
|
+
], 64)) : P("", !0),
|
|
660
|
+
S.value === "file" ? (r(), y(e(R), {
|
|
659
661
|
key: 5,
|
|
660
662
|
label: e(l)("fields.max-size")
|
|
661
663
|
}, {
|
|
662
664
|
default: a(() => [
|
|
663
|
-
t(e(
|
|
664
|
-
"model-value":
|
|
665
|
+
t(e(ye), {
|
|
666
|
+
"model-value": p.value.max_size ?? null,
|
|
665
667
|
min: 1,
|
|
666
|
-
"onUpdate:modelValue":
|
|
668
|
+
"onUpdate:modelValue": V[13] || (V[13] = (k) => g("max_size", k))
|
|
667
669
|
}, null, 8, ["model-value"])
|
|
668
670
|
]),
|
|
669
671
|
_: 1
|
|
670
|
-
}, 8, ["label"])) :
|
|
672
|
+
}, 8, ["label"])) : P("", !0)
|
|
671
673
|
]),
|
|
672
|
-
|
|
674
|
+
S.value === "file" ? (r(), j(J, { key: 3 }, [
|
|
673
675
|
t(e(R), {
|
|
674
676
|
label: e(l)("fields.extensions"),
|
|
675
677
|
help: e(l)("fields.extensions-help")
|
|
676
678
|
}, {
|
|
677
679
|
default: a(() => [
|
|
678
|
-
t(e(
|
|
680
|
+
t(e(il), {
|
|
679
681
|
modelValue: L.value,
|
|
680
|
-
"onUpdate:modelValue":
|
|
682
|
+
"onUpdate:modelValue": V[14] || (V[14] = (k) => L.value = k)
|
|
681
683
|
}, null, 8, ["modelValue"])
|
|
682
684
|
]),
|
|
683
685
|
_: 1
|
|
684
686
|
}, 8, ["label", "help"]),
|
|
685
|
-
t(e(
|
|
686
|
-
"model-value": !!
|
|
687
|
+
t(e(pe), {
|
|
688
|
+
"model-value": !!p.value.multiple,
|
|
687
689
|
label: e(l)("fields.multiple"),
|
|
688
|
-
"onUpdate:modelValue":
|
|
690
|
+
"onUpdate:modelValue": V[15] || (V[15] = (k) => g("multiple", k))
|
|
689
691
|
}, null, 8, ["model-value", "label"])
|
|
690
|
-
], 64)) :
|
|
691
|
-
|
|
692
|
-
t(e(
|
|
693
|
-
modelValue:
|
|
694
|
-
"onUpdate:modelValue":
|
|
692
|
+
], 64)) : P("", !0),
|
|
693
|
+
O("div", Ul, [
|
|
694
|
+
t(e(pe), {
|
|
695
|
+
modelValue: b.value,
|
|
696
|
+
"onUpdate:modelValue": V[16] || (V[16] = (k) => b.value = k),
|
|
695
697
|
label: e(l)("fields.is-enabled")
|
|
696
698
|
}, null, 8, ["modelValue", "label"]),
|
|
697
|
-
t(e(
|
|
698
|
-
modelValue:
|
|
699
|
-
"onUpdate:modelValue":
|
|
699
|
+
t(e(pe), {
|
|
700
|
+
modelValue: _.value,
|
|
701
|
+
"onUpdate:modelValue": V[17] || (V[17] = (k) => _.value = k),
|
|
700
702
|
label: e(l)("fields.is-required")
|
|
701
703
|
}, null, 8, ["modelValue", "label"]),
|
|
702
|
-
|
|
704
|
+
S.value !== "hidden" ? (r(), y(e(pe), {
|
|
703
705
|
key: 0,
|
|
704
|
-
modelValue:
|
|
705
|
-
"onUpdate:modelValue":
|
|
706
|
+
modelValue: C.value,
|
|
707
|
+
"onUpdate:modelValue": V[18] || (V[18] = (k) => C.value = k),
|
|
706
708
|
label: e(l)("fields.is-fullsize")
|
|
707
|
-
}, null, 8, ["modelValue", "label"])) :
|
|
708
|
-
t(e(
|
|
709
|
-
modelValue:
|
|
710
|
-
"onUpdate:modelValue":
|
|
709
|
+
}, null, 8, ["modelValue", "label"])) : P("", !0),
|
|
710
|
+
t(e(pe), {
|
|
711
|
+
modelValue: z.value,
|
|
712
|
+
"onUpdate:modelValue": V[19] || (V[19] = (k) => z.value = k),
|
|
711
713
|
label: e(l)("fields.in-table")
|
|
712
714
|
}, null, 8, ["modelValue", "label"])
|
|
713
715
|
])
|
|
@@ -716,14 +718,14 @@ const gl = [
|
|
|
716
718
|
_: 1
|
|
717
719
|
}, 8, ["open", "title"]));
|
|
718
720
|
}
|
|
719
|
-
}),
|
|
720
|
-
const
|
|
721
|
-
for (const [
|
|
722
|
-
|
|
723
|
-
return
|
|
724
|
-
},
|
|
721
|
+
}), se = (d, u) => {
|
|
722
|
+
const i = d.__vccOpts || d;
|
|
723
|
+
for (const [f, s] of u)
|
|
724
|
+
i[f] = s;
|
|
725
|
+
return i;
|
|
726
|
+
}, Cl = /* @__PURE__ */ se(Sl, [["__scopeId", "data-v-cd153059"]]), zl = { class: "wx-inbox-field" }, Tl = { class: "wx-inbox-field__name" }, Fl = /* @__PURE__ */ ee({
|
|
725
727
|
__name: "FieldList",
|
|
726
|
-
props: /* @__PURE__ */
|
|
728
|
+
props: /* @__PURE__ */ Fe({
|
|
727
729
|
form: {},
|
|
728
730
|
canManage: { type: Boolean }
|
|
729
731
|
}, {
|
|
@@ -731,124 +733,124 @@ const gl = [
|
|
|
731
733
|
modelModifiers: {}
|
|
732
734
|
}),
|
|
733
735
|
emits: ["update:modelValue"],
|
|
734
|
-
setup(
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
const
|
|
738
|
-
function
|
|
739
|
-
return re(
|
|
740
|
-
}
|
|
741
|
-
function
|
|
736
|
+
setup(d) {
|
|
737
|
+
const u = d, i = _e(d, "modelValue"), f = ne(), s = oe(f), m = be();
|
|
738
|
+
ie();
|
|
739
|
+
const v = X("webx-inbox"), l = de(), T = Ne(Cl);
|
|
740
|
+
function o(p) {
|
|
741
|
+
return re(p.title, m.active.value, p.key);
|
|
742
|
+
}
|
|
743
|
+
function c(p) {
|
|
742
744
|
return [
|
|
743
|
-
|
|
744
|
-
...
|
|
745
|
-
...
|
|
746
|
-
...
|
|
745
|
+
v(`fields.type-${p.type}`),
|
|
746
|
+
...p.is_required ? [v("fields.is-required")] : [],
|
|
747
|
+
...p.in_table ? [v("fields.in-table")] : [],
|
|
748
|
+
...p.is_fullsize ? [] : [v("fields.is-fullsize")]
|
|
747
749
|
];
|
|
748
750
|
}
|
|
749
|
-
const
|
|
750
|
-
async function
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
}
|
|
754
|
-
async function
|
|
755
|
-
if (await
|
|
756
|
-
title:
|
|
757
|
-
message:
|
|
758
|
-
confirmText:
|
|
759
|
-
cancelText:
|
|
751
|
+
const A = N(() => i.value.length === 0);
|
|
752
|
+
async function S(p) {
|
|
753
|
+
const b = await T({ field: p, form: u.form });
|
|
754
|
+
b && (i.value = p === null ? [...i.value, b] : i.value.map((_) => _.id === b.id ? b : _));
|
|
755
|
+
}
|
|
756
|
+
async function W(p) {
|
|
757
|
+
if (await $e({
|
|
758
|
+
title: v("fields.delete-title", { field: o(p) }),
|
|
759
|
+
message: v("fields.delete-text"),
|
|
760
|
+
confirmText: v("fields.delete"),
|
|
761
|
+
cancelText: v("fields.cancel"),
|
|
760
762
|
tone: "danger"
|
|
761
763
|
}))
|
|
762
764
|
try {
|
|
763
|
-
await s.removeField(
|
|
764
|
-
} catch (
|
|
765
|
-
B.danger(l(
|
|
765
|
+
await s.removeField(p.id), i.value = i.value.filter((_) => _.id !== p.id), B.success(v("panel.deleted"));
|
|
766
|
+
} catch (_) {
|
|
767
|
+
B.danger(l(_));
|
|
766
768
|
}
|
|
767
769
|
}
|
|
768
|
-
function U(
|
|
769
|
-
return
|
|
770
|
-
{ key: "edit", icon: "edit", label:
|
|
771
|
-
|
|
770
|
+
function U(p) {
|
|
771
|
+
return u.canManage ? [
|
|
772
|
+
{ key: "edit", icon: "edit", label: v("fields.edit-field"), run: () => {
|
|
773
|
+
S(p);
|
|
772
774
|
} },
|
|
773
775
|
{
|
|
774
776
|
key: "delete",
|
|
775
777
|
icon: "trash",
|
|
776
|
-
label:
|
|
778
|
+
label: v("fields.delete"),
|
|
777
779
|
danger: !0,
|
|
778
780
|
run: () => {
|
|
779
|
-
|
|
781
|
+
W(p);
|
|
780
782
|
}
|
|
781
783
|
}
|
|
782
784
|
] : [];
|
|
783
785
|
}
|
|
784
|
-
async function
|
|
786
|
+
async function F() {
|
|
785
787
|
try {
|
|
786
788
|
await s.sortFields(
|
|
787
|
-
|
|
788
|
-
|
|
789
|
+
u.form.id,
|
|
790
|
+
i.value.map((p) => p.id)
|
|
789
791
|
);
|
|
790
|
-
} catch (
|
|
791
|
-
B.danger(l(
|
|
792
|
+
} catch (p) {
|
|
793
|
+
B.danger(l(p, v("panel.reorder-failed")));
|
|
792
794
|
}
|
|
793
795
|
}
|
|
794
|
-
return (
|
|
795
|
-
title: e(
|
|
796
|
-
},
|
|
796
|
+
return (p, b) => (r(), y(e(te), {
|
|
797
|
+
title: e(v)("panel.tab-fields")
|
|
798
|
+
}, Qe({
|
|
797
799
|
default: a(() => [
|
|
798
|
-
|
|
800
|
+
A.value ? (r(), y(e(Se), {
|
|
799
801
|
key: 0,
|
|
800
|
-
title: e(
|
|
801
|
-
description: e(
|
|
802
|
-
}, null, 8, ["title", "description"])) : (
|
|
802
|
+
title: e(v)("fields.no-fields"),
|
|
803
|
+
description: e(v)("fields.no-fields-help")
|
|
804
|
+
}, null, 8, ["title", "description"])) : (r(), y(e(Re), {
|
|
803
805
|
key: 1,
|
|
804
|
-
modelValue:
|
|
805
|
-
"onUpdate:modelValue":
|
|
806
|
+
modelValue: i.value,
|
|
807
|
+
"onUpdate:modelValue": b[1] || (b[1] = (_) => i.value = _),
|
|
806
808
|
plain: "",
|
|
807
809
|
"item-key": "id",
|
|
808
|
-
"item-label":
|
|
809
|
-
disabled: !
|
|
810
|
-
"aria-label": e(
|
|
811
|
-
onMove:
|
|
810
|
+
"item-label": o,
|
|
811
|
+
disabled: !d.canManage,
|
|
812
|
+
"aria-label": e(v)("panel.tab-fields"),
|
|
813
|
+
onMove: F
|
|
812
814
|
}, {
|
|
813
|
-
default: a(({ item:
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
t(e(
|
|
815
|
+
default: a(({ item: _ }) => [
|
|
816
|
+
O("div", zl, [
|
|
817
|
+
O("div", Tl, [
|
|
818
|
+
t(e(K), {
|
|
817
819
|
weight: "medium",
|
|
818
820
|
truncate: ""
|
|
819
821
|
}, {
|
|
820
822
|
default: a(() => [
|
|
821
|
-
|
|
823
|
+
w(h(o(_)), 1)
|
|
822
824
|
]),
|
|
823
825
|
_: 2
|
|
824
826
|
}, 1024),
|
|
825
|
-
|
|
827
|
+
_.is_enabled ? P("", !0) : (r(), y(e(Ve), {
|
|
826
828
|
key: 0,
|
|
827
829
|
type: "default"
|
|
828
830
|
}, {
|
|
829
831
|
default: a(() => [
|
|
830
|
-
|
|
832
|
+
w(h(e(v)("panel.off")), 1)
|
|
831
833
|
]),
|
|
832
834
|
_: 1
|
|
833
835
|
}))
|
|
834
836
|
]),
|
|
835
|
-
t(e(
|
|
837
|
+
t(e(K), {
|
|
836
838
|
size: "sm",
|
|
837
839
|
tone: "muted",
|
|
838
840
|
truncate: ""
|
|
839
841
|
}, {
|
|
840
842
|
default: a(() => [
|
|
841
|
-
|
|
842
|
-
|
|
843
|
+
O("code", null, "fields[" + h(_.key) + "]", 1),
|
|
844
|
+
w(" · " + h(c(_).join(" · ")), 1)
|
|
843
845
|
]),
|
|
844
846
|
_: 2
|
|
845
847
|
}, 1024)
|
|
846
848
|
])
|
|
847
849
|
]),
|
|
848
|
-
actions: a(({ item:
|
|
850
|
+
actions: a(({ item: _ }) => [
|
|
849
851
|
t(e(we), {
|
|
850
|
-
actions: U(
|
|
851
|
-
label:
|
|
852
|
+
actions: U(_),
|
|
853
|
+
label: o(_)
|
|
852
854
|
}, null, 8, ["actions", "label"])
|
|
853
855
|
]),
|
|
854
856
|
_: 1
|
|
@@ -856,17 +858,17 @@ const gl = [
|
|
|
856
858
|
]),
|
|
857
859
|
_: 2
|
|
858
860
|
}, [
|
|
859
|
-
|
|
861
|
+
d.canManage ? {
|
|
860
862
|
name: "extra",
|
|
861
863
|
fn: a(() => [
|
|
862
|
-
t(e(
|
|
864
|
+
t(e(Q), {
|
|
863
865
|
type: "primary",
|
|
864
866
|
size: "sm",
|
|
865
867
|
icon: "plus",
|
|
866
|
-
onClick:
|
|
868
|
+
onClick: b[0] || (b[0] = (_) => S(null))
|
|
867
869
|
}, {
|
|
868
870
|
default: a(() => [
|
|
869
|
-
|
|
871
|
+
w(h(e(v)("fields.new-field")), 1)
|
|
870
872
|
]),
|
|
871
873
|
_: 1
|
|
872
874
|
})
|
|
@@ -875,51 +877,51 @@ const gl = [
|
|
|
875
877
|
} : void 0
|
|
876
878
|
]), 1032, ["title"]));
|
|
877
879
|
}
|
|
878
|
-
}),
|
|
879
|
-
function
|
|
880
|
-
return
|
|
881
|
-
get: () =>
|
|
882
|
-
set: (
|
|
883
|
-
const s = { ...
|
|
884
|
-
|
|
880
|
+
}), Wl = /* @__PURE__ */ se(Fl, [["__scopeId", "data-v-3b684f07"]]);
|
|
881
|
+
function ue(d, u, i) {
|
|
882
|
+
return N({
|
|
883
|
+
get: () => d.value[u] ?? i,
|
|
884
|
+
set: (f) => {
|
|
885
|
+
const s = { ...d.value };
|
|
886
|
+
f === "" || f === null || f === void 0 ? delete s[u] : s[u] = f, d.value = s;
|
|
885
887
|
}
|
|
886
888
|
});
|
|
887
889
|
}
|
|
888
|
-
const
|
|
890
|
+
const ql = /* @__PURE__ */ ee({
|
|
889
891
|
__name: "FormAntispam",
|
|
890
892
|
props: {
|
|
891
893
|
modelValue: { required: !0 },
|
|
892
894
|
modelModifiers: {}
|
|
893
895
|
},
|
|
894
896
|
emits: ["update:modelValue"],
|
|
895
|
-
setup(
|
|
896
|
-
const
|
|
897
|
-
{ value: "off", label:
|
|
898
|
-
{ value: "recaptcha", label:
|
|
899
|
-
{ value: "turnstile", label:
|
|
897
|
+
setup(d) {
|
|
898
|
+
const u = _e(d, "modelValue"), i = X("webx-inbox"), f = ue(u, "antispam.honeypot", !0), s = ue(u, "antispam.min_seconds", 3), m = ue(u, "antispam.throttle", 5), v = ue(u, "antispam.captcha", "off"), l = N(() => [
|
|
899
|
+
{ value: "off", label: i("panel.captcha-off") },
|
|
900
|
+
{ value: "recaptcha", label: i("panel.captcha-recaptcha") },
|
|
901
|
+
{ value: "turnstile", label: i("panel.captcha-turnstile") }
|
|
900
902
|
]);
|
|
901
|
-
return (
|
|
903
|
+
return (T, o) => (r(), y(e(te), null, {
|
|
902
904
|
default: a(() => [
|
|
903
905
|
t(e(R), {
|
|
904
|
-
label: e(
|
|
905
|
-
help: e(
|
|
906
|
+
label: e(i)("panel.honeypot"),
|
|
907
|
+
help: e(i)("panel.honeypot-help")
|
|
906
908
|
}, {
|
|
907
909
|
default: a(() => [
|
|
908
|
-
t(e(
|
|
909
|
-
modelValue: e(
|
|
910
|
-
"onUpdate:modelValue":
|
|
910
|
+
t(e(Xe), {
|
|
911
|
+
modelValue: e(f),
|
|
912
|
+
"onUpdate:modelValue": o[0] || (o[0] = (c) => le(f) ? f.value = c : null)
|
|
911
913
|
}, null, 8, ["modelValue"])
|
|
912
914
|
]),
|
|
913
915
|
_: 1
|
|
914
916
|
}, 8, ["label", "help"]),
|
|
915
917
|
t(e(R), {
|
|
916
|
-
label: e(
|
|
917
|
-
help: e(
|
|
918
|
+
label: e(i)("panel.min-seconds"),
|
|
919
|
+
help: e(i)("panel.min-seconds-help")
|
|
918
920
|
}, {
|
|
919
921
|
default: a(() => [
|
|
920
|
-
t(e(
|
|
922
|
+
t(e(ye), {
|
|
921
923
|
modelValue: e(s),
|
|
922
|
-
"onUpdate:modelValue":
|
|
924
|
+
"onUpdate:modelValue": o[1] || (o[1] = (c) => le(s) ? s.value = c : null),
|
|
923
925
|
min: 0,
|
|
924
926
|
max: 120
|
|
925
927
|
}, null, 8, ["modelValue"])
|
|
@@ -927,13 +929,13 @@ const Wl = /* @__PURE__ */ le({
|
|
|
927
929
|
_: 1
|
|
928
930
|
}, 8, ["label", "help"]),
|
|
929
931
|
t(e(R), {
|
|
930
|
-
label: e(
|
|
931
|
-
help: e(
|
|
932
|
+
label: e(i)("panel.throttle"),
|
|
933
|
+
help: e(i)("panel.throttle-help")
|
|
932
934
|
}, {
|
|
933
935
|
default: a(() => [
|
|
934
|
-
t(e(
|
|
935
|
-
modelValue: e(
|
|
936
|
-
"onUpdate:modelValue":
|
|
936
|
+
t(e(ye), {
|
|
937
|
+
modelValue: e(m),
|
|
938
|
+
"onUpdate:modelValue": o[2] || (o[2] = (c) => le(m) ? m.value = c : null),
|
|
937
939
|
min: 0,
|
|
938
940
|
max: 120
|
|
939
941
|
}, null, 8, ["modelValue"])
|
|
@@ -941,13 +943,13 @@ const Wl = /* @__PURE__ */ le({
|
|
|
941
943
|
_: 1
|
|
942
944
|
}, 8, ["label", "help"]),
|
|
943
945
|
t(e(R), {
|
|
944
|
-
label: e(
|
|
945
|
-
help: e(
|
|
946
|
+
label: e(i)("panel.captcha"),
|
|
947
|
+
help: e(i)("panel.captcha-help")
|
|
946
948
|
}, {
|
|
947
949
|
default: a(() => [
|
|
948
|
-
t(e(
|
|
949
|
-
modelValue: e(
|
|
950
|
-
"onUpdate:modelValue":
|
|
950
|
+
t(e(me), {
|
|
951
|
+
modelValue: e(v),
|
|
952
|
+
"onUpdate:modelValue": o[3] || (o[3] = (c) => le(v) ? v.value = c : null),
|
|
951
953
|
options: l.value
|
|
952
954
|
}, null, 8, ["modelValue", "options"])
|
|
953
955
|
]),
|
|
@@ -957,115 +959,115 @@ const Wl = /* @__PURE__ */ le({
|
|
|
957
959
|
_: 1
|
|
958
960
|
}));
|
|
959
961
|
}
|
|
960
|
-
}),
|
|
962
|
+
}), Al = { class: "wx-inbox-embed" }, Il = { class: "wx-inbox-embed__snippet" }, Nl = { class: "wx-inbox-embed__snippet" }, Ml = /* @__PURE__ */ ee({
|
|
961
963
|
__name: "FormEmbed",
|
|
962
964
|
props: {
|
|
963
965
|
form: {},
|
|
964
966
|
slug: {},
|
|
965
967
|
fields: {}
|
|
966
968
|
},
|
|
967
|
-
setup(
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
const
|
|
969
|
+
setup(d) {
|
|
970
|
+
const u = d;
|
|
971
|
+
ie();
|
|
972
|
+
const i = X("webx-inbox"), f = N(() => `<x-webx-form slug="${u.slug}" />`), s = N(
|
|
971
973
|
() => `{{-- resources/views/blocks/contact.blade.php --}}
|
|
972
|
-
<x-webx-form slug="${
|
|
973
|
-
),
|
|
974
|
-
{ key: "key", label:
|
|
975
|
-
{ key: "title", label:
|
|
976
|
-
{ key: "type", label:
|
|
977
|
-
]),
|
|
978
|
-
async function l(
|
|
974
|
+
<x-webx-form slug="${u.slug}" />`
|
|
975
|
+
), m = N(() => [
|
|
976
|
+
{ key: "key", label: i("fields.name") },
|
|
977
|
+
{ key: "title", label: i("fields.title") },
|
|
978
|
+
{ key: "type", label: i("fields.type"), hideBelow: 520 }
|
|
979
|
+
]), v = N(() => u.fields.filter((T) => T.is_enabled));
|
|
980
|
+
async function l(T) {
|
|
979
981
|
try {
|
|
980
|
-
await navigator.clipboard.writeText(
|
|
982
|
+
await navigator.clipboard.writeText(T), B.success(i("panel.copied"));
|
|
981
983
|
} catch {
|
|
982
984
|
}
|
|
983
985
|
}
|
|
984
|
-
return (
|
|
985
|
-
t(e(
|
|
986
|
-
title: e(
|
|
986
|
+
return (T, o) => (r(), j("div", Al, [
|
|
987
|
+
t(e(te), {
|
|
988
|
+
title: e(i)("panel.embed-blade")
|
|
987
989
|
}, {
|
|
988
990
|
default: a(() => [
|
|
989
|
-
t(e(
|
|
991
|
+
t(e(K), {
|
|
990
992
|
size: "sm",
|
|
991
993
|
tone: "muted"
|
|
992
994
|
}, {
|
|
993
995
|
default: a(() => [
|
|
994
|
-
|
|
996
|
+
w(h(e(i)("panel.embed-blade-help")), 1)
|
|
995
997
|
]),
|
|
996
998
|
_: 1
|
|
997
999
|
}),
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
t(e(
|
|
1000
|
+
O("div", Il, [
|
|
1001
|
+
O("code", null, h(f.value), 1),
|
|
1002
|
+
t(e(xe), {
|
|
1001
1003
|
icon: "copy",
|
|
1002
|
-
title: e(
|
|
1003
|
-
onClick:
|
|
1004
|
+
title: e(i)("panel.copy"),
|
|
1005
|
+
onClick: o[0] || (o[0] = (c) => l(f.value))
|
|
1004
1006
|
}, null, 8, ["title"])
|
|
1005
1007
|
])
|
|
1006
1008
|
]),
|
|
1007
1009
|
_: 1
|
|
1008
1010
|
}, 8, ["title"]),
|
|
1009
|
-
t(e(
|
|
1010
|
-
title: e(
|
|
1011
|
+
t(e(te), {
|
|
1012
|
+
title: e(i)("panel.embed-block")
|
|
1011
1013
|
}, {
|
|
1012
1014
|
default: a(() => [
|
|
1013
|
-
t(e(
|
|
1015
|
+
t(e(K), {
|
|
1014
1016
|
size: "sm",
|
|
1015
1017
|
tone: "muted"
|
|
1016
1018
|
}, {
|
|
1017
1019
|
default: a(() => [
|
|
1018
|
-
|
|
1020
|
+
w(h(e(i)("panel.embed-block-help")), 1)
|
|
1019
1021
|
]),
|
|
1020
1022
|
_: 1
|
|
1021
1023
|
}),
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
t(e(
|
|
1024
|
+
O("div", Nl, [
|
|
1025
|
+
O("code", null, h(s.value), 1),
|
|
1026
|
+
t(e(xe), {
|
|
1025
1027
|
icon: "copy",
|
|
1026
|
-
title: e(
|
|
1027
|
-
onClick:
|
|
1028
|
+
title: e(i)("panel.copy"),
|
|
1029
|
+
onClick: o[1] || (o[1] = (c) => l(s.value))
|
|
1028
1030
|
}, null, 8, ["title"])
|
|
1029
1031
|
])
|
|
1030
1032
|
]),
|
|
1031
1033
|
_: 1
|
|
1032
1034
|
}, 8, ["title"]),
|
|
1033
|
-
t(e(
|
|
1034
|
-
title: e(
|
|
1035
|
+
t(e(te), {
|
|
1036
|
+
title: e(i)("panel.embed-names")
|
|
1035
1037
|
}, {
|
|
1036
1038
|
default: a(() => [
|
|
1037
|
-
t(e(
|
|
1039
|
+
t(e(K), {
|
|
1038
1040
|
size: "sm",
|
|
1039
1041
|
tone: "muted"
|
|
1040
1042
|
}, {
|
|
1041
1043
|
default: a(() => [
|
|
1042
|
-
|
|
1044
|
+
w(h(e(i)("panel.embed-names-help")), 1)
|
|
1043
1045
|
]),
|
|
1044
1046
|
_: 1
|
|
1045
1047
|
}),
|
|
1046
|
-
t(e(
|
|
1047
|
-
data:
|
|
1048
|
-
columns:
|
|
1048
|
+
t(e(el), {
|
|
1049
|
+
data: v.value,
|
|
1050
|
+
columns: m.value,
|
|
1049
1051
|
"row-key": "id",
|
|
1050
1052
|
flush: "",
|
|
1051
|
-
"empty-text": e(
|
|
1053
|
+
"empty-text": e(i)("fields.no-fields")
|
|
1052
1054
|
}, {
|
|
1053
|
-
"cell-key": a(({ row:
|
|
1054
|
-
t(e(
|
|
1055
|
+
"cell-key": a(({ row: c }) => [
|
|
1056
|
+
t(e(K), {
|
|
1055
1057
|
mono: "",
|
|
1056
1058
|
size: "sm"
|
|
1057
1059
|
}, {
|
|
1058
1060
|
default: a(() => [
|
|
1059
|
-
|
|
1061
|
+
w("fields[" + h(c.key) + "]", 1)
|
|
1060
1062
|
]),
|
|
1061
1063
|
_: 2
|
|
1062
1064
|
}, 1024)
|
|
1063
1065
|
]),
|
|
1064
|
-
"cell-title": a(({ row:
|
|
1065
|
-
|
|
1066
|
+
"cell-title": a(({ row: c }) => [
|
|
1067
|
+
w(h(Object.values(c.title)[0] ?? c.key), 1)
|
|
1066
1068
|
]),
|
|
1067
|
-
"cell-type": a(({ row:
|
|
1068
|
-
|
|
1069
|
+
"cell-type": a(({ row: c }) => [
|
|
1070
|
+
w(h(e(i)(`fields.type-${c.type}`)), 1)
|
|
1069
1071
|
]),
|
|
1070
1072
|
_: 1
|
|
1071
1073
|
}, 8, ["data", "columns", "empty-text"])
|
|
@@ -1074,9 +1076,9 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1074
1076
|
}, 8, ["title"])
|
|
1075
1077
|
]));
|
|
1076
1078
|
}
|
|
1077
|
-
}),
|
|
1079
|
+
}), Dl = /* @__PURE__ */ se(Ml, [["__scopeId", "data-v-fdabb537"]]), Ll = { class: "wx-inbox-general" }, Ol = /* @__PURE__ */ ee({
|
|
1078
1080
|
__name: "FormGeneral",
|
|
1079
|
-
props: /* @__PURE__ */
|
|
1081
|
+
props: /* @__PURE__ */ Fe({
|
|
1080
1082
|
errors: {}
|
|
1081
1083
|
}, {
|
|
1082
1084
|
settings: { required: !0 },
|
|
@@ -1085,51 +1087,51 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1085
1087
|
optionsModifiers: {}
|
|
1086
1088
|
}),
|
|
1087
1089
|
emits: ["update:settings", "update:options"],
|
|
1088
|
-
setup(
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1090
|
+
setup(d) {
|
|
1091
|
+
const u = _e(
|
|
1092
|
+
d,
|
|
1091
1093
|
"settings"
|
|
1092
|
-
),
|
|
1093
|
-
return (
|
|
1094
|
-
t(e(
|
|
1094
|
+
), i = _e(d, "options"), f = X("webx-inbox"), s = ue(i, "thank-you.heading", {}), m = ue(i, "thank-you.text", {}), v = ue(i, "design.submit-text", {}), l = ue(i, "redirect", "");
|
|
1095
|
+
return (T, o) => (r(), j("div", Ll, [
|
|
1096
|
+
t(e(te), null, {
|
|
1095
1097
|
default: a(() => [
|
|
1096
1098
|
t(e(R), {
|
|
1097
|
-
label: e(
|
|
1098
|
-
error:
|
|
1099
|
+
label: e(f)("panel.title"),
|
|
1100
|
+
error: d.errors.title?.[0],
|
|
1099
1101
|
required: ""
|
|
1100
1102
|
}, {
|
|
1101
1103
|
default: a(() => [
|
|
1102
|
-
t(e(
|
|
1103
|
-
modelValue:
|
|
1104
|
-
"onUpdate:modelValue":
|
|
1104
|
+
t(e(Y), {
|
|
1105
|
+
modelValue: u.value.title,
|
|
1106
|
+
"onUpdate:modelValue": o[0] || (o[0] = (c) => u.value.title = c),
|
|
1105
1107
|
localized: ""
|
|
1106
1108
|
}, null, 8, ["modelValue"])
|
|
1107
1109
|
]),
|
|
1108
1110
|
_: 1
|
|
1109
1111
|
}, 8, ["label", "error"]),
|
|
1110
1112
|
t(e(R), {
|
|
1111
|
-
label: e(
|
|
1112
|
-
help: e(
|
|
1113
|
-
error:
|
|
1113
|
+
label: e(f)("panel.slug"),
|
|
1114
|
+
help: e(f)("panel.slug-help"),
|
|
1115
|
+
error: d.errors.slug?.[0],
|
|
1114
1116
|
required: ""
|
|
1115
1117
|
}, {
|
|
1116
1118
|
default: a(() => [
|
|
1117
|
-
t(e(
|
|
1118
|
-
modelValue:
|
|
1119
|
-
"onUpdate:modelValue":
|
|
1119
|
+
t(e(Y), {
|
|
1120
|
+
modelValue: u.value.slug,
|
|
1121
|
+
"onUpdate:modelValue": o[1] || (o[1] = (c) => u.value.slug = c),
|
|
1120
1122
|
placeholder: "contact"
|
|
1121
1123
|
}, null, 8, ["modelValue"])
|
|
1122
1124
|
]),
|
|
1123
1125
|
_: 1
|
|
1124
1126
|
}, 8, ["label", "help", "error"]),
|
|
1125
1127
|
t(e(R), {
|
|
1126
|
-
label: e(
|
|
1127
|
-
help: e(
|
|
1128
|
+
label: e(f)("panel.is-enabled"),
|
|
1129
|
+
help: e(f)("panel.is-enabled-help")
|
|
1128
1130
|
}, {
|
|
1129
1131
|
default: a(() => [
|
|
1130
|
-
t(e(
|
|
1131
|
-
modelValue:
|
|
1132
|
-
"onUpdate:modelValue":
|
|
1132
|
+
t(e(Xe), {
|
|
1133
|
+
modelValue: u.value.is_enabled,
|
|
1134
|
+
"onUpdate:modelValue": o[2] || (o[2] = (c) => u.value.is_enabled = c)
|
|
1133
1135
|
}, null, 8, ["modelValue"])
|
|
1134
1136
|
]),
|
|
1135
1137
|
_: 1
|
|
@@ -1137,53 +1139,53 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1137
1139
|
]),
|
|
1138
1140
|
_: 1
|
|
1139
1141
|
}),
|
|
1140
|
-
t(e(
|
|
1141
|
-
title: e(
|
|
1142
|
+
t(e(te), {
|
|
1143
|
+
title: e(f)("panel.after-sending")
|
|
1142
1144
|
}, {
|
|
1143
1145
|
default: a(() => [
|
|
1144
1146
|
t(e(R), {
|
|
1145
|
-
label: e(
|
|
1147
|
+
label: e(f)("panel.submit-text")
|
|
1146
1148
|
}, {
|
|
1147
1149
|
default: a(() => [
|
|
1148
|
-
t(e(
|
|
1149
|
-
modelValue: e(
|
|
1150
|
-
"onUpdate:modelValue":
|
|
1150
|
+
t(e(Y), {
|
|
1151
|
+
modelValue: e(v),
|
|
1152
|
+
"onUpdate:modelValue": o[3] || (o[3] = (c) => le(v) ? v.value = c : null),
|
|
1151
1153
|
localized: ""
|
|
1152
1154
|
}, null, 8, ["modelValue"])
|
|
1153
1155
|
]),
|
|
1154
1156
|
_: 1
|
|
1155
1157
|
}, 8, ["label"]),
|
|
1156
1158
|
t(e(R), {
|
|
1157
|
-
label: e(
|
|
1159
|
+
label: e(f)("panel.thank-you-heading")
|
|
1158
1160
|
}, {
|
|
1159
1161
|
default: a(() => [
|
|
1160
|
-
t(e(
|
|
1162
|
+
t(e(Y), {
|
|
1161
1163
|
modelValue: e(s),
|
|
1162
|
-
"onUpdate:modelValue":
|
|
1164
|
+
"onUpdate:modelValue": o[4] || (o[4] = (c) => le(s) ? s.value = c : null),
|
|
1163
1165
|
localized: ""
|
|
1164
1166
|
}, null, 8, ["modelValue"])
|
|
1165
1167
|
]),
|
|
1166
1168
|
_: 1
|
|
1167
1169
|
}, 8, ["label"]),
|
|
1168
1170
|
t(e(R), {
|
|
1169
|
-
label: e(
|
|
1171
|
+
label: e(f)("panel.thank-you-text")
|
|
1170
1172
|
}, {
|
|
1171
1173
|
default: a(() => [
|
|
1172
|
-
t(
|
|
1173
|
-
modelValue: e(
|
|
1174
|
-
"onUpdate:modelValue":
|
|
1174
|
+
t(tl, {
|
|
1175
|
+
modelValue: e(m),
|
|
1176
|
+
"onUpdate:modelValue": o[5] || (o[5] = (c) => le(m) ? m.value = c : null)
|
|
1175
1177
|
}, null, 8, ["modelValue"])
|
|
1176
1178
|
]),
|
|
1177
1179
|
_: 1
|
|
1178
1180
|
}, 8, ["label"]),
|
|
1179
1181
|
t(e(R), {
|
|
1180
|
-
label: e(
|
|
1181
|
-
help: e(
|
|
1182
|
+
label: e(f)("panel.redirect"),
|
|
1183
|
+
help: e(f)("panel.redirect-help")
|
|
1182
1184
|
}, {
|
|
1183
1185
|
default: a(() => [
|
|
1184
|
-
t(e(
|
|
1186
|
+
t(e(Y), {
|
|
1185
1187
|
modelValue: e(l),
|
|
1186
|
-
"onUpdate:modelValue":
|
|
1188
|
+
"onUpdate:modelValue": o[6] || (o[6] = (c) => le(l) ? l.value = c : null),
|
|
1187
1189
|
placeholder: "/thank-you"
|
|
1188
1190
|
}, null, 8, ["modelValue"])
|
|
1189
1191
|
]),
|
|
@@ -1194,9 +1196,9 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1194
1196
|
}, 8, ["title"])
|
|
1195
1197
|
]));
|
|
1196
1198
|
}
|
|
1197
|
-
}),
|
|
1199
|
+
}), Pl = /* @__PURE__ */ se(Ol, [["__scopeId", "data-v-35e56e3d"]]), Bl = { class: "wx-inbox-recipients" }, El = /* @__PURE__ */ ee({
|
|
1198
1200
|
__name: "FormNotifications",
|
|
1199
|
-
props: /* @__PURE__ */
|
|
1201
|
+
props: /* @__PURE__ */ Fe({
|
|
1200
1202
|
fields: {},
|
|
1201
1203
|
errors: {}
|
|
1202
1204
|
}, {
|
|
@@ -1204,108 +1206,116 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1204
1206
|
modelModifiers: {}
|
|
1205
1207
|
}),
|
|
1206
1208
|
emits: ["update:modelValue"],
|
|
1207
|
-
setup(
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1209
|
+
setup(d) {
|
|
1210
|
+
const u = d, i = _e(d, "modelValue"), f = ne(), s = oe(f), m = X("webx-inbox"), v = q([]), l = ue(i, "recipients", []), T = ue(i, "email_field", "");
|
|
1211
|
+
al(async () => {
|
|
1210
1212
|
try {
|
|
1211
|
-
|
|
1213
|
+
v.value = await s.recipients();
|
|
1212
1214
|
} catch {
|
|
1213
1215
|
}
|
|
1214
1216
|
});
|
|
1215
|
-
const
|
|
1216
|
-
() =>
|
|
1217
|
-
),
|
|
1218
|
-
{ value: "", label:
|
|
1219
|
-
...
|
|
1217
|
+
const o = N(
|
|
1218
|
+
() => v.value.map((p) => ({ value: p.id, label: `${p.name} · ${p.email}` }))
|
|
1219
|
+
), c = N(() => [
|
|
1220
|
+
{ value: "", label: m("panel.no-email-field") },
|
|
1221
|
+
...u.fields.filter((p) => p.type === "email").map((p) => ({ value: p.key, label: p.key }))
|
|
1220
1222
|
]);
|
|
1221
|
-
function
|
|
1222
|
-
return "admin_id" in
|
|
1223
|
-
}
|
|
1224
|
-
function
|
|
1225
|
-
l.value = [...l.value,
|
|
1226
|
-
}
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1223
|
+
function A(p) {
|
|
1224
|
+
return "admin_id" in p;
|
|
1225
|
+
}
|
|
1226
|
+
function S(p) {
|
|
1227
|
+
l.value = [...l.value, p];
|
|
1228
|
+
}
|
|
1229
|
+
async function W(p) {
|
|
1230
|
+
const b = l.value[p];
|
|
1231
|
+
b !== void 0 && (A(b) || (b.email ?? "").trim() !== "") && !await $e({
|
|
1232
|
+
title: m("panel.remove-recipient-title"),
|
|
1233
|
+
message: m("panel.remove-recipient-text"),
|
|
1234
|
+
confirmText: m("panel.remove"),
|
|
1235
|
+
cancelText: m("panel.cancel"),
|
|
1236
|
+
tone: "danger"
|
|
1237
|
+
}) || (l.value = l.value.filter((C, z) => z !== p));
|
|
1229
1238
|
}
|
|
1230
|
-
function U(
|
|
1231
|
-
l.value = l.value.map((
|
|
1239
|
+
function U(p, b) {
|
|
1240
|
+
l.value = l.value.map((_, C) => C === p ? { admin_id: b } : _);
|
|
1232
1241
|
}
|
|
1233
|
-
function
|
|
1234
|
-
l.value = l.value.map((
|
|
1242
|
+
function F(p, b) {
|
|
1243
|
+
l.value = l.value.map((_, C) => C === p ? { email: b } : _);
|
|
1235
1244
|
}
|
|
1236
|
-
return (
|
|
1237
|
-
title: e(
|
|
1245
|
+
return (p, b) => (r(), y(e(te), {
|
|
1246
|
+
title: e(m)("panel.recipients")
|
|
1238
1247
|
}, {
|
|
1239
1248
|
default: a(() => [
|
|
1240
|
-
t(e(
|
|
1249
|
+
t(e(K), {
|
|
1241
1250
|
size: "sm",
|
|
1242
1251
|
tone: "muted"
|
|
1243
1252
|
}, {
|
|
1244
1253
|
default: a(() => [
|
|
1245
|
-
|
|
1254
|
+
w(h(e(m)("panel.recipients-help")), 1)
|
|
1246
1255
|
]),
|
|
1247
1256
|
_: 1
|
|
1248
1257
|
}),
|
|
1249
|
-
|
|
1258
|
+
d.errors["options.recipients"] ? (r(), y(e(Te), {
|
|
1250
1259
|
key: 0,
|
|
1251
1260
|
type: "danger",
|
|
1252
1261
|
variant: "soft",
|
|
1253
|
-
description:
|
|
1254
|
-
}, null, 8, ["description"])) :
|
|
1255
|
-
|
|
1256
|
-
e(l).length === 0 ? (
|
|
1262
|
+
description: d.errors["options.recipients"]?.[0]
|
|
1263
|
+
}, null, 8, ["description"])) : P("", !0),
|
|
1264
|
+
O("div", Bl, [
|
|
1265
|
+
e(l).length === 0 ? (r(), y(e(K), {
|
|
1257
1266
|
key: 0,
|
|
1258
1267
|
size: "sm",
|
|
1259
1268
|
tone: "placeholder"
|
|
1260
1269
|
}, {
|
|
1261
1270
|
default: a(() => [
|
|
1262
|
-
|
|
1271
|
+
w(h(e(m)("panel.no-recipients")), 1)
|
|
1263
1272
|
]),
|
|
1264
1273
|
_: 1
|
|
1265
|
-
})) :
|
|
1266
|
-
(
|
|
1267
|
-
key:
|
|
1274
|
+
})) : P("", !0),
|
|
1275
|
+
(r(!0), j(J, null, ge(e(l), (_, C) => (r(), j("div", {
|
|
1276
|
+
key: C,
|
|
1268
1277
|
class: "wx-inbox-recipients__row"
|
|
1269
1278
|
}, [
|
|
1270
|
-
|
|
1279
|
+
A(_) ? (r(), y(e(me), {
|
|
1271
1280
|
key: 0,
|
|
1272
|
-
"model-value":
|
|
1273
|
-
options:
|
|
1274
|
-
"onUpdate:modelValue": (
|
|
1275
|
-
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (
|
|
1281
|
+
"model-value": _.admin_id,
|
|
1282
|
+
options: o.value,
|
|
1283
|
+
"onUpdate:modelValue": (z) => U(C, Number(z))
|
|
1284
|
+
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (r(), y(e(Y), {
|
|
1276
1285
|
key: 1,
|
|
1277
|
-
"model-value":
|
|
1286
|
+
"model-value": _.email,
|
|
1278
1287
|
type: "email",
|
|
1279
1288
|
placeholder: "sales@example.com",
|
|
1280
|
-
"onUpdate:modelValue": (
|
|
1289
|
+
"onUpdate:modelValue": (z) => F(C, String(z))
|
|
1281
1290
|
}, null, 8, ["model-value", "onUpdate:modelValue"])),
|
|
1282
|
-
t(e(
|
|
1291
|
+
t(e(xe), {
|
|
1283
1292
|
icon: "trash",
|
|
1284
|
-
|
|
1285
|
-
|
|
1293
|
+
tone: "danger",
|
|
1294
|
+
title: e(m)("panel.remove"),
|
|
1295
|
+
onClick: (z) => W(C)
|
|
1286
1296
|
}, null, 8, ["title", "onClick"])
|
|
1287
1297
|
]))), 128))
|
|
1288
1298
|
]),
|
|
1289
1299
|
t(e(Ce), { size: "sm" }, {
|
|
1290
1300
|
default: a(() => [
|
|
1291
|
-
t(e(
|
|
1301
|
+
t(e(Q), {
|
|
1292
1302
|
variant: "outline",
|
|
1293
1303
|
icon: "user",
|
|
1294
|
-
disabled:
|
|
1295
|
-
onClick:
|
|
1304
|
+
disabled: o.value.length === 0,
|
|
1305
|
+
onClick: b[0] || (b[0] = (_) => S({ admin_id: Number(o.value[0]?.value) }))
|
|
1296
1306
|
}, {
|
|
1297
1307
|
default: a(() => [
|
|
1298
|
-
|
|
1308
|
+
w(h(e(m)("panel.add-admin")), 1)
|
|
1299
1309
|
]),
|
|
1300
1310
|
_: 1
|
|
1301
1311
|
}, 8, ["disabled"]),
|
|
1302
|
-
t(e(
|
|
1312
|
+
t(e(Q), {
|
|
1303
1313
|
variant: "outline",
|
|
1304
1314
|
icon: "mail",
|
|
1305
|
-
onClick:
|
|
1315
|
+
onClick: b[1] || (b[1] = (_) => S({ email: "" }))
|
|
1306
1316
|
}, {
|
|
1307
1317
|
default: a(() => [
|
|
1308
|
-
|
|
1318
|
+
w(h(e(m)("panel.add-email")), 1)
|
|
1309
1319
|
]),
|
|
1310
1320
|
_: 1
|
|
1311
1321
|
})
|
|
@@ -1313,14 +1323,14 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1313
1323
|
_: 1
|
|
1314
1324
|
}),
|
|
1315
1325
|
t(e(R), {
|
|
1316
|
-
label: e(
|
|
1317
|
-
help: e(
|
|
1326
|
+
label: e(m)("panel.email-field"),
|
|
1327
|
+
help: e(m)("panel.email-field-help")
|
|
1318
1328
|
}, {
|
|
1319
1329
|
default: a(() => [
|
|
1320
|
-
t(e(
|
|
1321
|
-
modelValue: e(
|
|
1322
|
-
"onUpdate:modelValue":
|
|
1323
|
-
options:
|
|
1330
|
+
t(e(me), {
|
|
1331
|
+
modelValue: e(T),
|
|
1332
|
+
"onUpdate:modelValue": b[2] || (b[2] = (_) => le(T) ? T.value = _ : null),
|
|
1333
|
+
options: c.value
|
|
1324
1334
|
}, null, 8, ["modelValue", "options"])
|
|
1325
1335
|
]),
|
|
1326
1336
|
_: 1
|
|
@@ -1329,160 +1339,161 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1329
1339
|
_: 1
|
|
1330
1340
|
}, 8, ["title"]));
|
|
1331
1341
|
}
|
|
1332
|
-
}),
|
|
1333
|
-
class: "wx-inbox-editor",
|
|
1334
|
-
"data-wx-fill": ""
|
|
1335
|
-
}, Hl = { class: "wx-inbox-editor__head" }, Gl = { class: "wx-inbox-editor__id" }, jl = { class: "wx-inbox-editor__title" }, Kl = /* @__PURE__ */ le({
|
|
1342
|
+
}), Rl = /* @__PURE__ */ se(El, [["__scopeId", "data-v-85e244a2"]]), Hl = { class: "wx-inbox-editor" }, Gl = { class: "wx-inbox-editor__head" }, jl = { class: "wx-inbox-editor__id" }, Kl = { class: "wx-inbox-editor__title" }, Zl = /* @__PURE__ */ ee({
|
|
1336
1343
|
__name: "FormEditorPage",
|
|
1337
1344
|
props: {
|
|
1338
1345
|
base: { default: "/inbox" }
|
|
1339
1346
|
},
|
|
1340
|
-
setup(
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1343
|
-
const l =
|
|
1344
|
-
let U =
|
|
1347
|
+
setup(d) {
|
|
1348
|
+
const u = d, i = ne(), f = oe(i), s = We(), m = qe(), v = be();
|
|
1349
|
+
ie();
|
|
1350
|
+
const l = X("webx-inbox"), T = de(), o = q(null), c = q([]), A = q(!0), S = q(!1), W = q({});
|
|
1351
|
+
let U = nl({
|
|
1345
1352
|
slug: "",
|
|
1346
1353
|
title: {},
|
|
1347
1354
|
is_enabled: !0
|
|
1348
1355
|
});
|
|
1349
|
-
const
|
|
1350
|
-
() =>
|
|
1351
|
-
),
|
|
1352
|
-
async function
|
|
1353
|
-
|
|
1356
|
+
const F = q({}), p = N(() => i.can("inbox.manage")), b = N(() => Number(s.params.id)), _ = N(
|
|
1357
|
+
() => o.value === null ? "" : re(U.title, v.active.value, U.slug)
|
|
1358
|
+
), C = N(() => `${u.base}?form=${b.value}`);
|
|
1359
|
+
async function z() {
|
|
1360
|
+
A.value = !0;
|
|
1354
1361
|
try {
|
|
1355
|
-
const D = await
|
|
1356
|
-
|
|
1362
|
+
const D = await f.form(b.value);
|
|
1363
|
+
o.value = D, c.value = D.fields ?? [], U.slug = D.slug, U.title = { ...D.title }, U.is_enabled = D.is_enabled, F.value = { ...D.options };
|
|
1357
1364
|
} catch (D) {
|
|
1358
|
-
B.danger(
|
|
1365
|
+
B.danger(T(D)), m.replace(u.base);
|
|
1359
1366
|
} finally {
|
|
1360
|
-
|
|
1367
|
+
A.value = !1;
|
|
1361
1368
|
}
|
|
1362
1369
|
}
|
|
1363
|
-
ke(
|
|
1364
|
-
|
|
1370
|
+
ke(b, () => {
|
|
1371
|
+
z();
|
|
1365
1372
|
}, { immediate: !0 });
|
|
1366
|
-
async function
|
|
1367
|
-
|
|
1373
|
+
async function E() {
|
|
1374
|
+
S.value = !0, W.value = {};
|
|
1368
1375
|
try {
|
|
1369
|
-
const D = await
|
|
1376
|
+
const D = await f.saveForm(b.value, {
|
|
1370
1377
|
slug: U.slug.trim(),
|
|
1371
1378
|
title: U.title,
|
|
1372
1379
|
is_enabled: U.is_enabled,
|
|
1373
|
-
options:
|
|
1380
|
+
options: F.value
|
|
1374
1381
|
});
|
|
1375
|
-
|
|
1382
|
+
o.value = D, B.success(l("panel.saved"));
|
|
1376
1383
|
} catch (D) {
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1384
|
+
const I = D.body;
|
|
1385
|
+
I?.errors ? (W.value = I.errors, B.danger(l("panel.failed"))) : B.danger(T(D));
|
|
1379
1386
|
} finally {
|
|
1380
|
-
|
|
1387
|
+
S.value = !1;
|
|
1381
1388
|
}
|
|
1382
1389
|
}
|
|
1383
|
-
return (D,
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
+
return (D, I) => (r(), j("div", Hl, [
|
|
1391
|
+
A.value ? (r(), y(e(te), { key: 0 }, {
|
|
1392
|
+
default: a(() => [
|
|
1393
|
+
t(e(Me), {
|
|
1394
|
+
title: "",
|
|
1395
|
+
rows: 8
|
|
1396
|
+
})
|
|
1397
|
+
]),
|
|
1398
|
+
_: 1
|
|
1399
|
+
})) : o.value ? (r(), j(J, { key: 1 }, [
|
|
1400
|
+
O("div", Gl, [
|
|
1390
1401
|
t(e(Ee), {
|
|
1391
|
-
to:
|
|
1402
|
+
to: C.value,
|
|
1392
1403
|
label: e(l)("panel.forms")
|
|
1393
1404
|
}, null, 8, ["to", "label"]),
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
t(e(
|
|
1405
|
+
O("div", jl, [
|
|
1406
|
+
O("h1", Kl, h(_.value), 1),
|
|
1407
|
+
t(e(K), {
|
|
1397
1408
|
size: "sm",
|
|
1398
1409
|
tone: "muted",
|
|
1399
1410
|
mono: ""
|
|
1400
1411
|
}, {
|
|
1401
1412
|
default: a(() => [
|
|
1402
|
-
|
|
1413
|
+
w(h(o.value.slug), 1)
|
|
1403
1414
|
]),
|
|
1404
1415
|
_: 1
|
|
1405
1416
|
})
|
|
1406
1417
|
]),
|
|
1407
|
-
e(U).is_enabled ?
|
|
1418
|
+
e(U).is_enabled ? P("", !0) : (r(), y(e(Ve), {
|
|
1408
1419
|
key: 0,
|
|
1409
1420
|
type: "default"
|
|
1410
1421
|
}, {
|
|
1411
1422
|
default: a(() => [
|
|
1412
|
-
|
|
1423
|
+
w(h(e(l)("panel.off")), 1)
|
|
1413
1424
|
]),
|
|
1414
1425
|
_: 1
|
|
1415
1426
|
}))
|
|
1416
1427
|
]),
|
|
1417
|
-
t(e(
|
|
1428
|
+
t(e(He), {
|
|
1418
1429
|
class: "wx-inbox-editor__tabs",
|
|
1419
1430
|
"keep-alive": ""
|
|
1420
1431
|
}, {
|
|
1421
1432
|
default: a(() => [
|
|
1422
|
-
t(e(
|
|
1433
|
+
t(e(fe), {
|
|
1423
1434
|
value: "general",
|
|
1424
1435
|
label: e(l)("panel.tab-general")
|
|
1425
1436
|
}, {
|
|
1426
1437
|
default: a(() => [
|
|
1427
|
-
t(
|
|
1438
|
+
t(Pl, {
|
|
1428
1439
|
settings: e(U),
|
|
1429
|
-
"onUpdate:settings":
|
|
1430
|
-
options:
|
|
1431
|
-
"onUpdate:options":
|
|
1432
|
-
errors:
|
|
1440
|
+
"onUpdate:settings": I[0] || (I[0] = (L) => le(U) ? U.value = L : U = L),
|
|
1441
|
+
options: F.value,
|
|
1442
|
+
"onUpdate:options": I[1] || (I[1] = (L) => F.value = L),
|
|
1443
|
+
errors: W.value
|
|
1433
1444
|
}, null, 8, ["settings", "options", "errors"])
|
|
1434
1445
|
]),
|
|
1435
1446
|
_: 1
|
|
1436
1447
|
}, 8, ["label"]),
|
|
1437
|
-
t(e(
|
|
1448
|
+
t(e(fe), {
|
|
1438
1449
|
value: "fields",
|
|
1439
1450
|
label: e(l)("panel.tab-fields")
|
|
1440
1451
|
}, {
|
|
1441
1452
|
default: a(() => [
|
|
1442
|
-
t(
|
|
1443
|
-
modelValue:
|
|
1444
|
-
"onUpdate:modelValue":
|
|
1445
|
-
form:
|
|
1446
|
-
"can-manage":
|
|
1453
|
+
t(Wl, {
|
|
1454
|
+
modelValue: c.value,
|
|
1455
|
+
"onUpdate:modelValue": I[2] || (I[2] = (L) => c.value = L),
|
|
1456
|
+
form: o.value,
|
|
1457
|
+
"can-manage": p.value
|
|
1447
1458
|
}, null, 8, ["modelValue", "form", "can-manage"])
|
|
1448
1459
|
]),
|
|
1449
1460
|
_: 1
|
|
1450
1461
|
}, 8, ["label"]),
|
|
1451
|
-
t(e(
|
|
1462
|
+
t(e(fe), {
|
|
1452
1463
|
value: "notifications",
|
|
1453
1464
|
label: e(l)("panel.tab-notifications")
|
|
1454
1465
|
}, {
|
|
1455
1466
|
default: a(() => [
|
|
1456
|
-
t(
|
|
1457
|
-
modelValue:
|
|
1458
|
-
"onUpdate:modelValue":
|
|
1459
|
-
fields:
|
|
1460
|
-
errors:
|
|
1467
|
+
t(Rl, {
|
|
1468
|
+
modelValue: F.value,
|
|
1469
|
+
"onUpdate:modelValue": I[3] || (I[3] = (L) => F.value = L),
|
|
1470
|
+
fields: c.value,
|
|
1471
|
+
errors: W.value
|
|
1461
1472
|
}, null, 8, ["modelValue", "fields", "errors"])
|
|
1462
1473
|
]),
|
|
1463
1474
|
_: 1
|
|
1464
1475
|
}, 8, ["label"]),
|
|
1465
|
-
t(e(
|
|
1476
|
+
t(e(fe), {
|
|
1466
1477
|
value: "antispam",
|
|
1467
1478
|
label: e(l)("panel.tab-antispam")
|
|
1468
1479
|
}, {
|
|
1469
1480
|
default: a(() => [
|
|
1470
|
-
t(
|
|
1471
|
-
modelValue:
|
|
1472
|
-
"onUpdate:modelValue":
|
|
1481
|
+
t(ql, {
|
|
1482
|
+
modelValue: F.value,
|
|
1483
|
+
"onUpdate:modelValue": I[4] || (I[4] = (L) => F.value = L)
|
|
1473
1484
|
}, null, 8, ["modelValue"])
|
|
1474
1485
|
]),
|
|
1475
1486
|
_: 1
|
|
1476
1487
|
}, 8, ["label"]),
|
|
1477
|
-
t(e(
|
|
1488
|
+
t(e(fe), {
|
|
1478
1489
|
value: "embed",
|
|
1479
1490
|
label: e(l)("panel.tab-embed")
|
|
1480
1491
|
}, {
|
|
1481
1492
|
default: a(() => [
|
|
1482
|
-
t(
|
|
1483
|
-
form:
|
|
1493
|
+
t(Dl, {
|
|
1494
|
+
form: o.value,
|
|
1484
1495
|
slug: e(U).slug,
|
|
1485
|
-
fields:
|
|
1496
|
+
fields: c.value
|
|
1486
1497
|
}, null, 8, ["form", "slug", "fields"])
|
|
1487
1498
|
]),
|
|
1488
1499
|
_: 1
|
|
@@ -1490,76 +1501,76 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1490
1501
|
]),
|
|
1491
1502
|
_: 1
|
|
1492
1503
|
}),
|
|
1493
|
-
|
|
1504
|
+
p.value ? (r(), y(e(ul), { key: 0 }, {
|
|
1494
1505
|
default: a(() => [
|
|
1495
|
-
t(e(
|
|
1506
|
+
t(e(Q), {
|
|
1496
1507
|
type: "primary",
|
|
1497
|
-
loading:
|
|
1498
|
-
onClick:
|
|
1508
|
+
loading: S.value,
|
|
1509
|
+
onClick: E
|
|
1499
1510
|
}, {
|
|
1500
1511
|
default: a(() => [
|
|
1501
|
-
|
|
1512
|
+
w(h(e(l)("panel.save")), 1)
|
|
1502
1513
|
]),
|
|
1503
1514
|
_: 1
|
|
1504
1515
|
}, 8, ["loading"])
|
|
1505
1516
|
]),
|
|
1506
1517
|
_: 1
|
|
1507
|
-
})) :
|
|
1508
|
-
], 64)) :
|
|
1518
|
+
})) : P("", !0)
|
|
1519
|
+
], 64)) : P("", !0)
|
|
1509
1520
|
]));
|
|
1510
1521
|
}
|
|
1511
|
-
}),
|
|
1522
|
+
}), Ql = /* @__PURE__ */ se(Zl, [["__scopeId", "data-v-96dfe48b"]]), Yl = { class: "wx-inbox-create" }, Jl = /* @__PURE__ */ ee({
|
|
1512
1523
|
__name: "FormCreateDialog",
|
|
1513
|
-
setup(
|
|
1514
|
-
const { resolve:
|
|
1515
|
-
|
|
1516
|
-
const
|
|
1517
|
-
function
|
|
1518
|
-
return
|
|
1519
|
-
}
|
|
1520
|
-
async function
|
|
1521
|
-
|
|
1524
|
+
setup(d) {
|
|
1525
|
+
const { resolve: u, dismiss: i, open: f } = Ae(), s = ne(), m = oe(s);
|
|
1526
|
+
ie();
|
|
1527
|
+
const v = X("webx-inbox"), l = de(), T = q({}), o = q(""), c = q(!1), A = q({});
|
|
1528
|
+
function S(U) {
|
|
1529
|
+
return A.value[U]?.[0];
|
|
1530
|
+
}
|
|
1531
|
+
async function W() {
|
|
1532
|
+
c.value = !0, A.value = {};
|
|
1522
1533
|
try {
|
|
1523
|
-
|
|
1524
|
-
await
|
|
1525
|
-
title:
|
|
1526
|
-
slug:
|
|
1534
|
+
u(
|
|
1535
|
+
await m.createForm({
|
|
1536
|
+
title: T.value,
|
|
1537
|
+
slug: o.value.trim(),
|
|
1527
1538
|
is_enabled: !0,
|
|
1528
1539
|
options: {}
|
|
1529
1540
|
})
|
|
1530
1541
|
);
|
|
1531
1542
|
} catch (U) {
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1543
|
+
const F = U.body;
|
|
1544
|
+
F?.errors ? (A.value = F.errors, B.danger(v("panel.failed"))) : B.danger(l(U));
|
|
1534
1545
|
} finally {
|
|
1535
|
-
|
|
1546
|
+
c.value = !1;
|
|
1536
1547
|
}
|
|
1537
1548
|
}
|
|
1538
|
-
return (U,
|
|
1539
|
-
open: e(
|
|
1540
|
-
"onUpdate:open":
|
|
1541
|
-
title: e(
|
|
1549
|
+
return (U, F) => (r(), y(e(Ie), {
|
|
1550
|
+
open: e(f),
|
|
1551
|
+
"onUpdate:open": F[3] || (F[3] = (p) => le(f) ? f.value = p : null),
|
|
1552
|
+
title: e(v)("panel.new-form-title"),
|
|
1542
1553
|
width: 520
|
|
1543
1554
|
}, {
|
|
1544
1555
|
footer: a(() => [
|
|
1545
1556
|
t(e(Ce), { size: "sm" }, {
|
|
1546
1557
|
default: a(() => [
|
|
1547
|
-
t(e(
|
|
1558
|
+
t(e(Q), {
|
|
1548
1559
|
variant: "outline",
|
|
1549
|
-
onClick:
|
|
1560
|
+
onClick: F[2] || (F[2] = (p) => e(i)())
|
|
1550
1561
|
}, {
|
|
1551
1562
|
default: a(() => [
|
|
1552
|
-
|
|
1563
|
+
w(h(e(v)("panel.cancel")), 1)
|
|
1553
1564
|
]),
|
|
1554
1565
|
_: 1
|
|
1555
1566
|
}),
|
|
1556
|
-
t(e(
|
|
1567
|
+
t(e(Q), {
|
|
1557
1568
|
type: "primary",
|
|
1558
|
-
loading:
|
|
1559
|
-
onClick:
|
|
1569
|
+
loading: c.value,
|
|
1570
|
+
onClick: W
|
|
1560
1571
|
}, {
|
|
1561
1572
|
default: a(() => [
|
|
1562
|
-
|
|
1573
|
+
w(h(e(v)("panel.save")), 1)
|
|
1563
1574
|
]),
|
|
1564
1575
|
_: 1
|
|
1565
1576
|
}, 8, ["loading"])
|
|
@@ -1568,16 +1579,16 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1568
1579
|
})
|
|
1569
1580
|
]),
|
|
1570
1581
|
default: a(() => [
|
|
1571
|
-
|
|
1582
|
+
O("div", Yl, [
|
|
1572
1583
|
t(e(R), {
|
|
1573
|
-
label: e(
|
|
1574
|
-
error:
|
|
1584
|
+
label: e(v)("panel.title"),
|
|
1585
|
+
error: S("title"),
|
|
1575
1586
|
required: ""
|
|
1576
1587
|
}, {
|
|
1577
1588
|
default: a(() => [
|
|
1578
|
-
t(e(
|
|
1579
|
-
modelValue:
|
|
1580
|
-
"onUpdate:modelValue":
|
|
1589
|
+
t(e(Y), {
|
|
1590
|
+
modelValue: T.value,
|
|
1591
|
+
"onUpdate:modelValue": F[0] || (F[0] = (p) => T.value = p),
|
|
1581
1592
|
localized: "",
|
|
1582
1593
|
autofocus: ""
|
|
1583
1594
|
}, null, 8, ["modelValue"])
|
|
@@ -1585,14 +1596,14 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1585
1596
|
_: 1
|
|
1586
1597
|
}, 8, ["label", "error"]),
|
|
1587
1598
|
t(e(R), {
|
|
1588
|
-
label: e(
|
|
1589
|
-
help: e(
|
|
1590
|
-
error:
|
|
1599
|
+
label: e(v)("panel.slug"),
|
|
1600
|
+
help: e(v)("panel.slug-help"),
|
|
1601
|
+
error: S("slug")
|
|
1591
1602
|
}, {
|
|
1592
1603
|
default: a(() => [
|
|
1593
|
-
t(e(
|
|
1594
|
-
modelValue:
|
|
1595
|
-
"onUpdate:modelValue":
|
|
1604
|
+
t(e(Y), {
|
|
1605
|
+
modelValue: o.value,
|
|
1606
|
+
"onUpdate:modelValue": F[1] || (F[1] = (p) => o.value = p),
|
|
1596
1607
|
placeholder: "contact"
|
|
1597
1608
|
}, null, 8, ["modelValue"])
|
|
1598
1609
|
]),
|
|
@@ -1603,84 +1614,84 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1603
1614
|
_: 1
|
|
1604
1615
|
}, 8, ["open", "title"]));
|
|
1605
1616
|
}
|
|
1606
|
-
}),
|
|
1617
|
+
}), Xl = /* @__PURE__ */ se(Jl, [["__scopeId", "data-v-55fb40d8"]]), et = { class: "wx-inbox-by-hand" }, lt = /* @__PURE__ */ ee({
|
|
1607
1618
|
__name: "SubmissionCreateDialog",
|
|
1608
1619
|
props: {
|
|
1609
1620
|
form: {}
|
|
1610
1621
|
},
|
|
1611
|
-
setup(
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1614
|
-
const
|
|
1615
|
-
function
|
|
1616
|
-
return U.value[`fields.${
|
|
1622
|
+
setup(d) {
|
|
1623
|
+
const u = d, { resolve: i, dismiss: f, open: s } = Ae(), m = ne(), v = oe(m), l = be();
|
|
1624
|
+
ie();
|
|
1625
|
+
const T = X("webx-inbox"), o = de(), c = q([]), A = q(!0), S = q(!1), W = q({}), U = q({}), F = N(() => c.value.filter((I) => I.type !== "file")), p = N(() => c.value.some((I) => I.type === "file"));
|
|
1626
|
+
function b(I) {
|
|
1627
|
+
return U.value[`fields.${I.key}`]?.[0];
|
|
1617
1628
|
}
|
|
1618
|
-
function
|
|
1619
|
-
return re(
|
|
1629
|
+
function _(I) {
|
|
1630
|
+
return re(I.title, l.active.value, I.key);
|
|
1620
1631
|
}
|
|
1621
|
-
function
|
|
1632
|
+
function C(I, L = "") {
|
|
1622
1633
|
return re(
|
|
1623
|
-
|
|
1634
|
+
I,
|
|
1624
1635
|
l.active.value,
|
|
1625
1636
|
L
|
|
1626
1637
|
);
|
|
1627
1638
|
}
|
|
1628
|
-
function
|
|
1629
|
-
return (
|
|
1639
|
+
function z(I) {
|
|
1640
|
+
return (I.options.choices ?? []).map((L) => ({
|
|
1630
1641
|
value: L.value,
|
|
1631
|
-
label:
|
|
1642
|
+
label: C(L.label, L.value)
|
|
1632
1643
|
}));
|
|
1633
1644
|
}
|
|
1634
|
-
async function
|
|
1645
|
+
async function E() {
|
|
1635
1646
|
try {
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1638
|
-
for (const L of
|
|
1639
|
-
|
|
1640
|
-
} catch (
|
|
1641
|
-
B.danger(
|
|
1647
|
+
const I = await v.form(u.form.id);
|
|
1648
|
+
c.value = (I.fields ?? []).filter((L) => L.is_enabled);
|
|
1649
|
+
for (const L of c.value)
|
|
1650
|
+
W.value[L.key] = L.type === "checkbox" ? [] : L.type === "consent" ? !1 : "";
|
|
1651
|
+
} catch (I) {
|
|
1652
|
+
B.danger(o(I));
|
|
1642
1653
|
} finally {
|
|
1643
|
-
|
|
1654
|
+
A.value = !1;
|
|
1644
1655
|
}
|
|
1645
1656
|
}
|
|
1646
|
-
|
|
1657
|
+
E();
|
|
1647
1658
|
async function D() {
|
|
1648
|
-
|
|
1659
|
+
S.value = !0, U.value = {};
|
|
1649
1660
|
try {
|
|
1650
|
-
|
|
1651
|
-
} catch (
|
|
1652
|
-
const L =
|
|
1653
|
-
L?.errors ? (U.value = L.errors, B.danger(
|
|
1661
|
+
i(await v.createSubmission(u.form.id, W.value));
|
|
1662
|
+
} catch (I) {
|
|
1663
|
+
const L = I.body;
|
|
1664
|
+
L?.errors ? (U.value = L.errors, B.danger(T("panel.failed"))) : B.danger(o(I));
|
|
1654
1665
|
} finally {
|
|
1655
|
-
|
|
1666
|
+
S.value = !1;
|
|
1656
1667
|
}
|
|
1657
1668
|
}
|
|
1658
|
-
return (
|
|
1669
|
+
return (I, L) => (r(), y(e(Ie), {
|
|
1659
1670
|
open: e(s),
|
|
1660
|
-
"onUpdate:open": L[1] || (L[1] = (
|
|
1661
|
-
title: e(
|
|
1671
|
+
"onUpdate:open": L[1] || (L[1] = (g) => le(s) ? s.value = g : null),
|
|
1672
|
+
title: e(T)("panel.new-submission-title"),
|
|
1662
1673
|
width: 560
|
|
1663
1674
|
}, {
|
|
1664
1675
|
footer: a(() => [
|
|
1665
1676
|
t(e(Ce), { size: "sm" }, {
|
|
1666
1677
|
default: a(() => [
|
|
1667
|
-
t(e(
|
|
1678
|
+
t(e(Q), {
|
|
1668
1679
|
variant: "outline",
|
|
1669
|
-
onClick: L[0] || (L[0] = (
|
|
1680
|
+
onClick: L[0] || (L[0] = (g) => e(f)())
|
|
1670
1681
|
}, {
|
|
1671
1682
|
default: a(() => [
|
|
1672
|
-
|
|
1683
|
+
w(h(e(T)("panel.cancel")), 1)
|
|
1673
1684
|
]),
|
|
1674
1685
|
_: 1
|
|
1675
1686
|
}),
|
|
1676
|
-
t(e(
|
|
1687
|
+
t(e(Q), {
|
|
1677
1688
|
type: "primary",
|
|
1678
|
-
loading:
|
|
1679
|
-
disabled:
|
|
1689
|
+
loading: S.value,
|
|
1690
|
+
disabled: A.value,
|
|
1680
1691
|
onClick: D
|
|
1681
1692
|
}, {
|
|
1682
1693
|
default: a(() => [
|
|
1683
|
-
|
|
1694
|
+
w(h(e(T)("panel.save")), 1)
|
|
1684
1695
|
]),
|
|
1685
1696
|
_: 1
|
|
1686
1697
|
}, 8, ["loading", "disabled"])
|
|
@@ -1689,89 +1700,89 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1689
1700
|
})
|
|
1690
1701
|
]),
|
|
1691
1702
|
default: a(() => [
|
|
1692
|
-
|
|
1693
|
-
t(e(
|
|
1703
|
+
O("div", et, [
|
|
1704
|
+
t(e(Te), {
|
|
1694
1705
|
type: "info",
|
|
1695
1706
|
closable: !1
|
|
1696
1707
|
}, {
|
|
1697
1708
|
default: a(() => [
|
|
1698
|
-
|
|
1709
|
+
w(h(e(T)("panel.new-submission-help")), 1)
|
|
1699
1710
|
]),
|
|
1700
1711
|
_: 1
|
|
1701
1712
|
}),
|
|
1702
|
-
|
|
1713
|
+
A.value ? (r(), y(e(Me), {
|
|
1703
1714
|
key: 0,
|
|
1704
1715
|
rows: 4
|
|
1705
|
-
})) : (
|
|
1706
|
-
(
|
|
1707
|
-
key:
|
|
1708
|
-
label:
|
|
1709
|
-
help:
|
|
1710
|
-
error:
|
|
1711
|
-
required:
|
|
1716
|
+
})) : (r(), j(J, { key: 1 }, [
|
|
1717
|
+
(r(!0), j(J, null, ge(F.value, (g) => (r(), y(e(R), {
|
|
1718
|
+
key: g.id,
|
|
1719
|
+
label: _(g),
|
|
1720
|
+
help: C(g.help),
|
|
1721
|
+
error: b(g),
|
|
1722
|
+
required: g.is_required
|
|
1712
1723
|
}, {
|
|
1713
1724
|
default: a(() => [
|
|
1714
|
-
|
|
1725
|
+
g.type === "textarea" ? (r(), y(e(rl), {
|
|
1715
1726
|
key: 0,
|
|
1716
|
-
modelValue:
|
|
1717
|
-
"onUpdate:modelValue": (
|
|
1718
|
-
rows:
|
|
1719
|
-
placeholder:
|
|
1720
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "placeholder"])) :
|
|
1727
|
+
modelValue: W.value[g.key],
|
|
1728
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1729
|
+
rows: g.options.rows ?? 4,
|
|
1730
|
+
placeholder: C(g.placeholder)
|
|
1731
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "placeholder"])) : g.type === "select" ? (r(), y(e(me), {
|
|
1721
1732
|
key: 1,
|
|
1722
|
-
modelValue:
|
|
1723
|
-
"onUpdate:modelValue": (
|
|
1724
|
-
options:
|
|
1733
|
+
modelValue: W.value[g.key],
|
|
1734
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1735
|
+
options: z(g),
|
|
1725
1736
|
clearable: "",
|
|
1726
|
-
placeholder:
|
|
1727
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) :
|
|
1737
|
+
placeholder: C(g.placeholder)
|
|
1738
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : g.type === "radio" ? (r(), y(e(dl), {
|
|
1728
1739
|
key: 2,
|
|
1729
|
-
modelValue:
|
|
1730
|
-
"onUpdate:modelValue": (
|
|
1731
|
-
options:
|
|
1732
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) :
|
|
1740
|
+
modelValue: W.value[g.key],
|
|
1741
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1742
|
+
options: z(g)
|
|
1743
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : g.type === "checkbox" ? (r(), y(e(cl), {
|
|
1733
1744
|
key: 3,
|
|
1734
|
-
modelValue:
|
|
1735
|
-
"onUpdate:modelValue": (
|
|
1736
|
-
options:
|
|
1737
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) :
|
|
1745
|
+
modelValue: W.value[g.key],
|
|
1746
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1747
|
+
options: z(g)
|
|
1748
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : g.type === "consent" ? (r(), y(e(pe), {
|
|
1738
1749
|
key: 4,
|
|
1739
|
-
modelValue:
|
|
1740
|
-
"onUpdate:modelValue": (
|
|
1741
|
-
label:
|
|
1742
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) :
|
|
1750
|
+
modelValue: W.value[g.key],
|
|
1751
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1752
|
+
label: C(g.options.text, _(g))
|
|
1753
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) : g.type === "date" ? (r(), y(e(Be), {
|
|
1743
1754
|
key: 5,
|
|
1744
|
-
modelValue:
|
|
1745
|
-
"onUpdate:modelValue": (
|
|
1746
|
-
placeholder:
|
|
1747
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (
|
|
1755
|
+
modelValue: W.value[g.key],
|
|
1756
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1757
|
+
placeholder: C(g.placeholder)
|
|
1758
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (r(), y(e(Y), {
|
|
1748
1759
|
key: 6,
|
|
1749
|
-
modelValue:
|
|
1750
|
-
"onUpdate:modelValue": (
|
|
1751
|
-
type:
|
|
1752
|
-
placeholder:
|
|
1753
|
-
maxlength:
|
|
1760
|
+
modelValue: W.value[g.key],
|
|
1761
|
+
"onUpdate:modelValue": ($) => W.value[g.key] = $,
|
|
1762
|
+
type: g.type === "email" ? "email" : g.type === "tel" ? "tel" : "text",
|
|
1763
|
+
placeholder: C(g.placeholder),
|
|
1764
|
+
maxlength: g.options.maxlength
|
|
1754
1765
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "maxlength"]))
|
|
1755
1766
|
]),
|
|
1756
1767
|
_: 2
|
|
1757
1768
|
}, 1032, ["label", "help", "error", "required"]))), 128)),
|
|
1758
|
-
|
|
1769
|
+
p.value ? (r(), y(e(Te), {
|
|
1759
1770
|
key: 0,
|
|
1760
1771
|
type: "warning",
|
|
1761
1772
|
closable: !1
|
|
1762
1773
|
}, {
|
|
1763
1774
|
default: a(() => [
|
|
1764
|
-
|
|
1775
|
+
w(h(e(T)("panel.no-files-by-hand")), 1)
|
|
1765
1776
|
]),
|
|
1766
1777
|
_: 1
|
|
1767
|
-
})) :
|
|
1778
|
+
})) : P("", !0)
|
|
1768
1779
|
], 64))
|
|
1769
1780
|
])
|
|
1770
1781
|
]),
|
|
1771
1782
|
_: 1
|
|
1772
1783
|
}, 8, ["open", "title"]));
|
|
1773
1784
|
}
|
|
1774
|
-
}),
|
|
1785
|
+
}), tt = /* @__PURE__ */ se(lt, [["__scopeId", "data-v-72006299"]]), at = { class: "wx-submissions__head" }, nt = { class: "wx-submissions__who" }, st = { class: "wx-submissions__mass" }, ot = { class: "wx-submissions__state" }, it = /* @__PURE__ */ ee({
|
|
1775
1786
|
__name: "SubmissionList",
|
|
1776
1787
|
props: {
|
|
1777
1788
|
form: {},
|
|
@@ -1779,53 +1790,53 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1779
1790
|
inline: { type: Boolean, default: !0 }
|
|
1780
1791
|
},
|
|
1781
1792
|
emits: ["back", "changed"],
|
|
1782
|
-
setup(
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1785
|
-
const
|
|
1786
|
-
get: () => typeof
|
|
1787
|
-
set: (
|
|
1793
|
+
setup(d, { emit: u }) {
|
|
1794
|
+
const i = d, f = u, s = ne(), m = oe(s), v = We(), l = qe(), T = be();
|
|
1795
|
+
ie();
|
|
1796
|
+
const o = X("webx-inbox"), c = de(), A = q(null), S = q([]), W = q(!1), U = q([]), F = q(!1), p = N(() => s.can("inbox.update")), b = N(() => s.can("inbox.manage")), _ = Ne(tt), C = N({
|
|
1797
|
+
get: () => typeof v.query.view == "string" && v.query.view !== "" ? v.query.view : "all",
|
|
1798
|
+
set: (n) => {
|
|
1788
1799
|
l.replace({
|
|
1789
|
-
query: { ...
|
|
1800
|
+
query: { ...v.query, view: n === "all" ? void 0 : n, page: void 0 }
|
|
1790
1801
|
});
|
|
1791
1802
|
}
|
|
1792
|
-
}),
|
|
1793
|
-
view:
|
|
1794
|
-
search: typeof
|
|
1795
|
-
assignee: typeof
|
|
1796
|
-
sort: typeof
|
|
1797
|
-
page: Number(
|
|
1798
|
-
})),
|
|
1799
|
-
const
|
|
1800
|
-
{ value: "all", label:
|
|
1801
|
-
{ value: "unread", label:
|
|
1803
|
+
}), z = N(() => ({
|
|
1804
|
+
view: C.value,
|
|
1805
|
+
search: typeof v.query.search == "string" ? v.query.search : "",
|
|
1806
|
+
assignee: typeof v.query.assignee == "string" ? v.query.assignee : null,
|
|
1807
|
+
sort: typeof v.query.sort == "string" ? v.query.sort : null,
|
|
1808
|
+
page: Number(v.query.page ?? 1) || 1
|
|
1809
|
+
})), E = N(() => {
|
|
1810
|
+
const n = A.value?.counts, M = [
|
|
1811
|
+
{ value: "all", label: o("panel.view-all"), badge: n?.all || void 0 },
|
|
1812
|
+
{ value: "unread", label: o("panel.view-unread"), badge: n?.unread || void 0 }
|
|
1802
1813
|
];
|
|
1803
|
-
for (const
|
|
1804
|
-
|
|
1805
|
-
value:
|
|
1806
|
-
label: x
|
|
1807
|
-
badge:
|
|
1814
|
+
for (const x of S.value)
|
|
1815
|
+
M.push({
|
|
1816
|
+
value: x.key,
|
|
1817
|
+
label: g(x),
|
|
1818
|
+
badge: n?.statuses[x.key] || void 0
|
|
1808
1819
|
});
|
|
1809
|
-
return
|
|
1810
|
-
}), D =
|
|
1811
|
-
...(
|
|
1812
|
-
key: `values.${
|
|
1813
|
-
label:
|
|
1820
|
+
return M;
|
|
1821
|
+
}), D = N(() => [
|
|
1822
|
+
...(A.value?.columns ?? []).map((M, x) => ({
|
|
1823
|
+
key: `values.${M.key}`,
|
|
1824
|
+
label: M.label,
|
|
1814
1825
|
sortable: !0,
|
|
1815
1826
|
// The first answer is what the row is recognised by and stays at any width; every one
|
|
1816
1827
|
// after it is worth less than the room it takes, so it goes a step sooner. The steps are
|
|
1817
1828
|
// wide — 640, 960 — because an answer is a sentence and not a number: two of them plus
|
|
1818
1829
|
// the status and the date is already what a 755px pane holds without scrolling sideways,
|
|
1819
1830
|
// which is what the pane beside the forms actually is on a 1280 screen (§11).
|
|
1820
|
-
hideBelow:
|
|
1831
|
+
hideBelow: x === 0 ? void 0 : 320 + x * 320
|
|
1821
1832
|
})),
|
|
1822
1833
|
// A floor rather than a width: the cell holds a badge, sometimes an avatar and sometimes
|
|
1823
1834
|
// a paperclip, and a fixed width that any of them overflows makes the whole table scroll
|
|
1824
1835
|
// sideways by two pixels.
|
|
1825
|
-
{ key: "status", label:
|
|
1836
|
+
{ key: "status", label: o("panel.status"), minWidth: 100 },
|
|
1826
1837
|
{
|
|
1827
1838
|
key: "created_at",
|
|
1828
|
-
label:
|
|
1839
|
+
label: o("panel.received"),
|
|
1829
1840
|
sortable: !0,
|
|
1830
1841
|
width: 150,
|
|
1831
1842
|
// "today at 16:22" is three words the table will break over two lines given half a
|
|
@@ -1836,259 +1847,262 @@ const Wl = /* @__PURE__ */ le({
|
|
|
1836
1847
|
// questions a submission is looked at for, and the other one is who sent it.
|
|
1837
1848
|
},
|
|
1838
1849
|
{ key: "actions", label: "", width: 56, align: "right", hideOnCards: !0 }
|
|
1839
|
-
]),
|
|
1840
|
-
() =>
|
|
1841
|
-
), L =
|
|
1842
|
-
() =>
|
|
1850
|
+
]), I = N(
|
|
1851
|
+
() => z.value.view === "all" && z.value.search === "" && z.value.assignee === null ? o("panel.submissions-empty") : o("panel.submissions-none")
|
|
1852
|
+
), L = N(
|
|
1853
|
+
() => S.value.map((n) => ({ value: n.id, label: g(n) }))
|
|
1843
1854
|
);
|
|
1844
|
-
function
|
|
1845
|
-
return re(
|
|
1855
|
+
function g(n) {
|
|
1856
|
+
return re(n.title, T.active.value, n.key);
|
|
1846
1857
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return re(
|
|
1858
|
+
function $() {
|
|
1859
|
+
return re(i.form.title, T.active.value, i.form.slug);
|
|
1849
1860
|
}
|
|
1850
|
-
async function
|
|
1851
|
-
|
|
1861
|
+
async function Z(n) {
|
|
1862
|
+
W.value = !0;
|
|
1852
1863
|
try {
|
|
1853
|
-
|
|
1854
|
-
view:
|
|
1855
|
-
search:
|
|
1856
|
-
assignee:
|
|
1857
|
-
sort:
|
|
1858
|
-
page:
|
|
1859
|
-
per_page:
|
|
1864
|
+
A.value = await m.submissions(i.form.id, {
|
|
1865
|
+
view: z.value.view,
|
|
1866
|
+
search: n?.search ?? z.value.search,
|
|
1867
|
+
assignee: z.value.assignee,
|
|
1868
|
+
sort: n?.sort ? `${n.sort.order === "desc" ? "-" : ""}${n.sort.key}` : null,
|
|
1869
|
+
page: n?.page ?? z.value.page,
|
|
1870
|
+
per_page: n?.perPage
|
|
1860
1871
|
});
|
|
1861
|
-
} catch (
|
|
1862
|
-
B.danger(
|
|
1872
|
+
} catch (M) {
|
|
1873
|
+
B.danger(c(M));
|
|
1863
1874
|
} finally {
|
|
1864
|
-
|
|
1875
|
+
W.value = !1;
|
|
1865
1876
|
}
|
|
1866
1877
|
}
|
|
1867
|
-
function
|
|
1868
|
-
const
|
|
1869
|
-
...
|
|
1870
|
-
search:
|
|
1871
|
-
sort:
|
|
1872
|
-
page:
|
|
1878
|
+
function G(n) {
|
|
1879
|
+
const M = {
|
|
1880
|
+
...v.query,
|
|
1881
|
+
search: n.search === "" ? void 0 : n.search,
|
|
1882
|
+
sort: n.sort === null ? void 0 : `${n.sort.order === "desc" ? "-" : ""}${n.sort.key}`,
|
|
1883
|
+
page: n.page === 1 ? void 0 : String(n.page)
|
|
1873
1884
|
};
|
|
1874
|
-
l.replace({ query:
|
|
1885
|
+
l.replace({ query: M }), Z(n);
|
|
1875
1886
|
}
|
|
1876
1887
|
ke(
|
|
1877
|
-
() => [
|
|
1888
|
+
() => [i.form.id, C.value, z.value.assignee],
|
|
1878
1889
|
() => {
|
|
1879
|
-
U.value = [],
|
|
1890
|
+
U.value = [], Z();
|
|
1880
1891
|
}
|
|
1881
|
-
),
|
|
1882
|
-
async function
|
|
1892
|
+
), Z(), ce();
|
|
1893
|
+
async function ce() {
|
|
1883
1894
|
try {
|
|
1884
|
-
|
|
1885
|
-
} catch (
|
|
1886
|
-
B.danger(
|
|
1895
|
+
S.value = await m.statuses();
|
|
1896
|
+
} catch (n) {
|
|
1897
|
+
B.danger(c(n));
|
|
1887
1898
|
}
|
|
1888
1899
|
}
|
|
1889
|
-
function
|
|
1890
|
-
l.push({ path: `${
|
|
1900
|
+
function Ue(n) {
|
|
1901
|
+
l.push({ path: `${i.base}/submissions/${n.id}`, query: { ...v.query } });
|
|
1891
1902
|
}
|
|
1892
|
-
function
|
|
1893
|
-
return
|
|
1903
|
+
function H(n) {
|
|
1904
|
+
return p.value ? [
|
|
1894
1905
|
{
|
|
1895
1906
|
key: "read",
|
|
1896
|
-
icon:
|
|
1897
|
-
label:
|
|
1907
|
+
icon: n.is_read ? "eye-off" : "eye",
|
|
1908
|
+
label: n.is_read ? o("panel.mark-unread") : o("panel.mark-read"),
|
|
1898
1909
|
run: () => {
|
|
1899
|
-
|
|
1910
|
+
ae([n.id], n.is_read ? "unread" : "read");
|
|
1900
1911
|
}
|
|
1901
1912
|
},
|
|
1902
1913
|
{
|
|
1903
1914
|
key: "delete",
|
|
1904
1915
|
icon: "trash",
|
|
1905
|
-
label:
|
|
1916
|
+
label: o("panel.delete"),
|
|
1906
1917
|
danger: !0,
|
|
1907
1918
|
run: () => {
|
|
1908
|
-
|
|
1919
|
+
k([n.id]);
|
|
1909
1920
|
}
|
|
1910
1921
|
}
|
|
1911
1922
|
] : [];
|
|
1912
1923
|
}
|
|
1913
|
-
async function
|
|
1914
|
-
typeof
|
|
1915
|
-
U.value.map((
|
|
1924
|
+
async function V(n) {
|
|
1925
|
+
typeof n == "number" && (F.value = !0, await ae(
|
|
1926
|
+
U.value.map((M) => M.id),
|
|
1916
1927
|
"status",
|
|
1917
|
-
|
|
1918
|
-
),
|
|
1919
|
-
}
|
|
1920
|
-
async function
|
|
1921
|
-
await
|
|
1922
|
-
title:
|
|
1923
|
-
message:
|
|
1924
|
-
confirmText:
|
|
1925
|
-
cancelText:
|
|
1928
|
+
n
|
|
1929
|
+
), F.value = !1);
|
|
1930
|
+
}
|
|
1931
|
+
async function k(n) {
|
|
1932
|
+
await $e({
|
|
1933
|
+
title: n.length === 1 ? o("panel.delete-submission-title") : o("panel.delete-selected-title", { count: n.length }),
|
|
1934
|
+
message: o("panel.delete-submission-text"),
|
|
1935
|
+
confirmText: o("panel.delete"),
|
|
1936
|
+
cancelText: o("panel.cancel"),
|
|
1926
1937
|
tone: "danger"
|
|
1927
|
-
}) && await
|
|
1938
|
+
}) && await ae(n, "delete");
|
|
1928
1939
|
}
|
|
1929
|
-
async function
|
|
1930
|
-
if (
|
|
1940
|
+
async function ae(n, M, x) {
|
|
1941
|
+
if (n.length !== 0)
|
|
1931
1942
|
try {
|
|
1932
|
-
await
|
|
1933
|
-
} catch (
|
|
1934
|
-
B.danger(
|
|
1943
|
+
await m.massSubmissions({ ids: n, action: M, status_id: x }), U.value = [], await Z(), f("changed");
|
|
1944
|
+
} catch (he) {
|
|
1945
|
+
B.danger(c(he));
|
|
1935
1946
|
}
|
|
1936
1947
|
}
|
|
1937
|
-
async function
|
|
1938
|
-
const
|
|
1939
|
-
|
|
1948
|
+
async function ve() {
|
|
1949
|
+
const n = await _({ form: i.form });
|
|
1950
|
+
n && (B.success(o("panel.created")), await Z(), f("changed"), l.push({ path: `${i.base}/submissions/${n.id}`, query: { ...v.query } }));
|
|
1940
1951
|
}
|
|
1941
|
-
const
|
|
1942
|
-
() =>
|
|
1943
|
-
view:
|
|
1944
|
-
search:
|
|
1945
|
-
assignee:
|
|
1946
|
-
sort:
|
|
1952
|
+
const De = N(
|
|
1953
|
+
() => m.exportUrl(i.form.id, {
|
|
1954
|
+
view: z.value.view,
|
|
1955
|
+
search: z.value.search,
|
|
1956
|
+
assignee: z.value.assignee,
|
|
1957
|
+
sort: z.value.sort
|
|
1947
1958
|
})
|
|
1948
1959
|
);
|
|
1949
|
-
function
|
|
1950
|
-
l.push(`${
|
|
1960
|
+
function Le() {
|
|
1961
|
+
l.push(`${i.base}/forms/${i.form.id}`);
|
|
1951
1962
|
}
|
|
1952
|
-
return (
|
|
1953
|
-
|
|
1954
|
-
|
|
1963
|
+
return (n, M) => (r(), j("div", {
|
|
1964
|
+
class: Ye(["wx-submissions", { "is-pane": d.inline }])
|
|
1965
|
+
}, [
|
|
1966
|
+
O("div", at, [
|
|
1967
|
+
d.inline ? P("", !0) : (r(), y(e(xe), {
|
|
1955
1968
|
key: 0,
|
|
1969
|
+
class: "wx-submissions__back",
|
|
1956
1970
|
icon: "arrow-left",
|
|
1957
|
-
title: e(
|
|
1958
|
-
onClick:
|
|
1971
|
+
title: e(o)("panel.forms"),
|
|
1972
|
+
onClick: M[0] || (M[0] = (x) => f("back"))
|
|
1959
1973
|
}, null, 8, ["title"])),
|
|
1960
|
-
|
|
1961
|
-
t(e(
|
|
1974
|
+
O("div", nt, [
|
|
1975
|
+
t(e(ll), {
|
|
1962
1976
|
level: 3,
|
|
1963
1977
|
truncate: ""
|
|
1964
1978
|
}, {
|
|
1965
1979
|
default: a(() => [
|
|
1966
|
-
|
|
1980
|
+
w(h($()), 1)
|
|
1967
1981
|
]),
|
|
1968
1982
|
_: 1
|
|
1969
1983
|
}),
|
|
1970
|
-
t(e(
|
|
1984
|
+
t(e(K), {
|
|
1971
1985
|
size: "sm",
|
|
1972
1986
|
tone: "muted",
|
|
1973
1987
|
mono: "",
|
|
1974
1988
|
truncate: ""
|
|
1975
1989
|
}, {
|
|
1976
1990
|
default: a(() => [
|
|
1977
|
-
|
|
1991
|
+
w(h(d.form.slug), 1)
|
|
1978
1992
|
]),
|
|
1979
1993
|
_: 1
|
|
1980
1994
|
})
|
|
1981
1995
|
]),
|
|
1982
|
-
|
|
1996
|
+
p.value ? (r(), y(e(Q), {
|
|
1983
1997
|
key: 1,
|
|
1984
1998
|
variant: "outline",
|
|
1985
1999
|
icon: "plus",
|
|
1986
2000
|
size: "sm",
|
|
1987
|
-
onClick:
|
|
2001
|
+
onClick: ve
|
|
1988
2002
|
}, {
|
|
1989
2003
|
default: a(() => [
|
|
1990
|
-
|
|
2004
|
+
w(h(e(o)("panel.new-submission")), 1)
|
|
1991
2005
|
]),
|
|
1992
2006
|
_: 1
|
|
1993
|
-
})) :
|
|
1994
|
-
t(e(
|
|
2007
|
+
})) : P("", !0),
|
|
2008
|
+
t(e(Q), {
|
|
1995
2009
|
variant: "outline",
|
|
1996
2010
|
icon: "download",
|
|
1997
2011
|
size: "sm",
|
|
1998
|
-
href:
|
|
2012
|
+
href: De.value
|
|
1999
2013
|
}, {
|
|
2000
2014
|
default: a(() => [
|
|
2001
|
-
|
|
2015
|
+
w(h(e(o)("panel.export")), 1)
|
|
2002
2016
|
]),
|
|
2003
2017
|
_: 1
|
|
2004
2018
|
}, 8, ["href"]),
|
|
2005
|
-
|
|
2019
|
+
b.value ? (r(), y(e(Q), {
|
|
2006
2020
|
key: 2,
|
|
2007
2021
|
variant: "outline",
|
|
2008
2022
|
icon: "settings",
|
|
2009
2023
|
size: "sm",
|
|
2010
|
-
onClick:
|
|
2024
|
+
onClick: Le
|
|
2011
2025
|
}, {
|
|
2012
2026
|
default: a(() => [
|
|
2013
|
-
|
|
2027
|
+
w(h(e(o)("panel.settings")), 1)
|
|
2014
2028
|
]),
|
|
2015
2029
|
_: 1
|
|
2016
|
-
})) :
|
|
2030
|
+
})) : P("", !0)
|
|
2017
2031
|
]),
|
|
2018
|
-
t(e(
|
|
2019
|
-
modelValue:
|
|
2020
|
-
"onUpdate:modelValue":
|
|
2032
|
+
t(e(He), {
|
|
2033
|
+
modelValue: C.value,
|
|
2034
|
+
"onUpdate:modelValue": M[3] || (M[3] = (x) => C.value = x),
|
|
2021
2035
|
class: "wx-submissions__views",
|
|
2022
|
-
items:
|
|
2036
|
+
items: E.value,
|
|
2023
2037
|
"collapse-below": 560,
|
|
2024
|
-
"aria-label": e(
|
|
2038
|
+
"aria-label": e(o)("panel.status")
|
|
2025
2039
|
}, {
|
|
2026
2040
|
default: a(() => [
|
|
2027
|
-
t(e(
|
|
2028
|
-
data:
|
|
2041
|
+
t(e(el), {
|
|
2042
|
+
data: A.value,
|
|
2029
2043
|
columns: D.value,
|
|
2030
2044
|
"row-key": "id",
|
|
2031
2045
|
searchable: "",
|
|
2032
2046
|
clickable: "",
|
|
2033
2047
|
hover: "",
|
|
2034
2048
|
flush: "",
|
|
2035
|
-
loading:
|
|
2036
|
-
selectable:
|
|
2037
|
-
"row-class": (
|
|
2038
|
-
"search-placeholder": e(
|
|
2039
|
-
"empty-text":
|
|
2049
|
+
loading: W.value,
|
|
2050
|
+
selectable: p.value,
|
|
2051
|
+
"row-class": (x) => x.is_read ? void 0 : "is-unread",
|
|
2052
|
+
"search-placeholder": e(o)("panel.search-submissions"),
|
|
2053
|
+
"empty-text": I.value,
|
|
2040
2054
|
"cards-below": 640,
|
|
2041
|
-
onRowClick:
|
|
2042
|
-
onStateChange:
|
|
2043
|
-
onSelectionChange:
|
|
2044
|
-
},
|
|
2045
|
-
"cell-status": a(({ row:
|
|
2046
|
-
|
|
2047
|
-
|
|
2055
|
+
onRowClick: Ue,
|
|
2056
|
+
onStateChange: G,
|
|
2057
|
+
onSelectionChange: M[2] || (M[2] = (x, he) => U.value = he)
|
|
2058
|
+
}, Qe({
|
|
2059
|
+
"cell-status": a(({ row: x }) => [
|
|
2060
|
+
O("div", ot, [
|
|
2061
|
+
x.status ? (r(), y(e(Ve), {
|
|
2048
2062
|
key: 0,
|
|
2049
|
-
type:
|
|
2063
|
+
type: x.status.color
|
|
2050
2064
|
}, {
|
|
2051
2065
|
default: a(() => [
|
|
2052
|
-
|
|
2066
|
+
w(h(g(x.status)), 1)
|
|
2053
2067
|
]),
|
|
2054
2068
|
_: 2
|
|
2055
|
-
}, 1032, ["type"])) :
|
|
2056
|
-
|
|
2069
|
+
}, 1032, ["type"])) : P("", !0),
|
|
2070
|
+
x.assignee ? (r(), y(e(pl), {
|
|
2057
2071
|
key: 1,
|
|
2058
|
-
name:
|
|
2059
|
-
title:
|
|
2072
|
+
name: x.assignee.name,
|
|
2073
|
+
title: x.assignee.name,
|
|
2060
2074
|
size: "xs",
|
|
2061
2075
|
tone: "auto"
|
|
2062
|
-
}, null, 8, ["name", "title"])) :
|
|
2063
|
-
|
|
2076
|
+
}, null, 8, ["name", "title"])) : P("", !0),
|
|
2077
|
+
x.files_count > 0 ? (r(), y(e(ml), {
|
|
2064
2078
|
key: 2,
|
|
2065
|
-
content: e(
|
|
2079
|
+
content: e(o)("panel.attachments")
|
|
2066
2080
|
}, {
|
|
2067
2081
|
default: a(() => [
|
|
2068
|
-
t(e(
|
|
2082
|
+
t(e(vl), {
|
|
2069
2083
|
name: "file",
|
|
2070
2084
|
size: "sm"
|
|
2071
2085
|
})
|
|
2072
2086
|
]),
|
|
2073
2087
|
_: 1
|
|
2074
|
-
}, 8, ["content"])) :
|
|
2088
|
+
}, 8, ["content"])) : P("", !0)
|
|
2075
2089
|
])
|
|
2076
2090
|
]),
|
|
2077
|
-
"cell-created_at": a(({ row:
|
|
2091
|
+
"cell-created_at": a(({ row: x }) => [
|
|
2078
2092
|
t(e(Pe), {
|
|
2079
|
-
value:
|
|
2093
|
+
value: x.created_at
|
|
2080
2094
|
}, null, 8, ["value"])
|
|
2081
2095
|
]),
|
|
2082
|
-
"card-actions": a(({ row:
|
|
2096
|
+
"card-actions": a(({ row: x }) => [
|
|
2083
2097
|
t(e(we), {
|
|
2084
|
-
actions:
|
|
2085
|
-
label: String(
|
|
2098
|
+
actions: H(x),
|
|
2099
|
+
label: String(x.id)
|
|
2086
2100
|
}, null, 8, ["actions", "label"])
|
|
2087
2101
|
]),
|
|
2088
|
-
"cell-actions": a(({ row:
|
|
2102
|
+
"cell-actions": a(({ row: x }) => [
|
|
2089
2103
|
t(e(we), {
|
|
2090
|
-
actions:
|
|
2091
|
-
label: String(
|
|
2104
|
+
actions: H(x),
|
|
2105
|
+
label: String(x.id)
|
|
2092
2106
|
}, null, 8, ["actions", "label"])
|
|
2093
2107
|
]),
|
|
2094
2108
|
_: 2
|
|
@@ -2096,34 +2110,34 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2096
2110
|
U.value.length > 0 ? {
|
|
2097
2111
|
name: "actions",
|
|
2098
2112
|
fn: a(() => [
|
|
2099
|
-
|
|
2100
|
-
t(e(
|
|
2113
|
+
O("div", st, [
|
|
2114
|
+
t(e(K), {
|
|
2101
2115
|
size: "sm",
|
|
2102
2116
|
weight: "medium"
|
|
2103
2117
|
}, {
|
|
2104
2118
|
default: a(() => [
|
|
2105
|
-
|
|
2119
|
+
w(h(e(o)("panel.selected", { count: U.value.length })), 1)
|
|
2106
2120
|
]),
|
|
2107
2121
|
_: 1
|
|
2108
2122
|
}),
|
|
2109
|
-
t(e(
|
|
2123
|
+
t(e(me), {
|
|
2110
2124
|
"model-value": null,
|
|
2111
2125
|
options: L.value,
|
|
2112
|
-
placeholder: e(
|
|
2113
|
-
disabled:
|
|
2126
|
+
placeholder: e(o)("panel.move-to"),
|
|
2127
|
+
disabled: F.value,
|
|
2114
2128
|
size: "sm",
|
|
2115
2129
|
style: { width: "180px" },
|
|
2116
|
-
"onUpdate:modelValue":
|
|
2130
|
+
"onUpdate:modelValue": V
|
|
2117
2131
|
}, null, 8, ["options", "placeholder", "disabled"]),
|
|
2118
|
-
t(e(
|
|
2132
|
+
t(e(Q), {
|
|
2119
2133
|
size: "sm",
|
|
2120
2134
|
variant: "outline",
|
|
2121
2135
|
type: "danger",
|
|
2122
2136
|
icon: "trash",
|
|
2123
|
-
onClick:
|
|
2137
|
+
onClick: M[1] || (M[1] = (x) => k(U.value.map((he) => he.id)))
|
|
2124
2138
|
}, {
|
|
2125
2139
|
default: a(() => [
|
|
2126
|
-
|
|
2140
|
+
w(h(e(o)("panel.delete")), 1)
|
|
2127
2141
|
]),
|
|
2128
2142
|
_: 1
|
|
2129
2143
|
})
|
|
@@ -2135,226 +2149,218 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2135
2149
|
]),
|
|
2136
2150
|
_: 1
|
|
2137
2151
|
}, 8, ["modelValue", "items", "aria-label"])
|
|
2138
|
-
]));
|
|
2152
|
+
], 2));
|
|
2139
2153
|
}
|
|
2140
|
-
}), ut = /* @__PURE__ */
|
|
2154
|
+
}), ut = /* @__PURE__ */ se(it, [["__scopeId", "data-v-136f2a85"]]), rt = ["onClick"], dt = { class: "wx-inbox-form__name" }, ct = /* @__PURE__ */ ee({
|
|
2141
2155
|
__name: "InboxPage",
|
|
2142
2156
|
props: {
|
|
2143
2157
|
base: { default: "/inbox" }
|
|
2144
2158
|
},
|
|
2145
|
-
setup(
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
const l =
|
|
2149
|
-
() =>
|
|
2150
|
-
),
|
|
2151
|
-
const
|
|
2152
|
-
return typeof
|
|
2153
|
-
}),
|
|
2154
|
-
function
|
|
2155
|
-
return re(
|
|
2156
|
-
}
|
|
2157
|
-
async function
|
|
2158
|
-
|
|
2159
|
+
setup(d) {
|
|
2160
|
+
const u = d, i = ne(), f = oe(i), s = We(), m = qe(), v = be();
|
|
2161
|
+
ie();
|
|
2162
|
+
const l = X("webx-inbox"), T = de(), o = q([]), c = q(!0), A = q(!1), S = N(() => i.can("inbox.manage")), W = Ne(Xl), U = N(
|
|
2163
|
+
() => i.state.manifest?.modules.find(($) => $.id === "inbox")?.title ?? l("module.title")
|
|
2164
|
+
), F = N(() => {
|
|
2165
|
+
const $ = s.query.form;
|
|
2166
|
+
return typeof $ == "string" && $ !== "" ? Number($) : null;
|
|
2167
|
+
}), p = N(() => o.value.find(($) => $.id === F.value) ?? null);
|
|
2168
|
+
function b($) {
|
|
2169
|
+
return re($.title, v.active.value, $.slug);
|
|
2170
|
+
}
|
|
2171
|
+
async function _() {
|
|
2172
|
+
c.value = !0;
|
|
2159
2173
|
try {
|
|
2160
|
-
|
|
2161
|
-
} catch (
|
|
2162
|
-
B.danger(
|
|
2174
|
+
o.value = await f.forms();
|
|
2175
|
+
} catch ($) {
|
|
2176
|
+
B.danger(T($));
|
|
2163
2177
|
} finally {
|
|
2164
|
-
|
|
2178
|
+
c.value = !1;
|
|
2165
2179
|
}
|
|
2166
2180
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2181
|
+
_(), ke(p, ($) => {
|
|
2182
|
+
$ !== null && (A.value = !0);
|
|
2169
2183
|
});
|
|
2170
|
-
function
|
|
2171
|
-
|
|
2184
|
+
function C($) {
|
|
2185
|
+
m.replace({ query: { ...s.query, form: String($.id) } }), A.value = !0;
|
|
2172
2186
|
}
|
|
2173
|
-
function
|
|
2174
|
-
|
|
2187
|
+
function z($) {
|
|
2188
|
+
m.push(`${u.base}/forms/${$.id}`);
|
|
2175
2189
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return
|
|
2178
|
-
{ key: "settings", icon: "settings", label: l("panel.settings"), run: () =>
|
|
2179
|
-
{ key: "duplicate", icon: "copy", label: l("panel.duplicate"), run: () =>
|
|
2190
|
+
function E($) {
|
|
2191
|
+
return S.value ? [
|
|
2192
|
+
{ key: "settings", icon: "settings", label: l("panel.settings"), run: () => z($) },
|
|
2193
|
+
{ key: "duplicate", icon: "copy", label: l("panel.duplicate"), run: () => I($) },
|
|
2180
2194
|
// A form that has taken submissions is switched off, never deleted (§2.4). The line is
|
|
2181
2195
|
// left out rather than greyed: a menu is a list of what is possible.
|
|
2182
|
-
|
|
2196
|
+
...$.submissions_count === 0 ? [
|
|
2183
2197
|
{
|
|
2184
2198
|
key: "delete",
|
|
2185
2199
|
icon: "trash",
|
|
2186
2200
|
label: l("panel.delete"),
|
|
2187
2201
|
danger: !0,
|
|
2188
|
-
run: () => L(
|
|
2202
|
+
run: () => L($)
|
|
2189
2203
|
}
|
|
2190
2204
|
] : []
|
|
2191
2205
|
] : [];
|
|
2192
2206
|
}
|
|
2193
2207
|
async function D() {
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2208
|
+
const $ = await W({});
|
|
2209
|
+
$ && (await _(), z($));
|
|
2196
2210
|
}
|
|
2197
|
-
async function
|
|
2211
|
+
async function I($) {
|
|
2198
2212
|
try {
|
|
2199
|
-
const
|
|
2200
|
-
B.success(l("panel.duplicated")), await
|
|
2201
|
-
} catch (
|
|
2202
|
-
B.danger(
|
|
2213
|
+
const Z = await f.duplicateForm($.id);
|
|
2214
|
+
B.success(l("panel.duplicated")), await _(), z(Z);
|
|
2215
|
+
} catch (Z) {
|
|
2216
|
+
B.danger(T(Z));
|
|
2203
2217
|
}
|
|
2204
2218
|
}
|
|
2205
|
-
async function L(
|
|
2206
|
-
if (await
|
|
2207
|
-
title: l("panel.delete-form-title", { form:
|
|
2219
|
+
async function L($) {
|
|
2220
|
+
if (await $e({
|
|
2221
|
+
title: l("panel.delete-form-title", { form: b($) }),
|
|
2208
2222
|
message: l("panel.delete-form-text"),
|
|
2209
2223
|
confirmText: l("panel.delete"),
|
|
2210
2224
|
cancelText: l("panel.cancel"),
|
|
2211
2225
|
tone: "danger"
|
|
2212
2226
|
}))
|
|
2213
2227
|
try {
|
|
2214
|
-
if (await
|
|
2215
|
-
const
|
|
2216
|
-
delete
|
|
2228
|
+
if (await f.removeForm($.id), B.success(l("panel.deleted")), F.value === $.id) {
|
|
2229
|
+
const G = { ...s.query };
|
|
2230
|
+
delete G.form, m.replace({ query: G }), A.value = !1;
|
|
2217
2231
|
}
|
|
2218
|
-
await
|
|
2219
|
-
} catch (
|
|
2220
|
-
B.danger(
|
|
2232
|
+
await _();
|
|
2233
|
+
} catch (G) {
|
|
2234
|
+
B.danger(T(G));
|
|
2221
2235
|
}
|
|
2222
2236
|
}
|
|
2223
|
-
async function
|
|
2237
|
+
async function g() {
|
|
2224
2238
|
try {
|
|
2225
|
-
await
|
|
2226
|
-
} catch (
|
|
2227
|
-
B.danger(
|
|
2239
|
+
await f.sortForms(o.value.map(($) => $.id));
|
|
2240
|
+
} catch ($) {
|
|
2241
|
+
B.danger(T($, l("panel.reorder-failed"))), await _();
|
|
2228
2242
|
}
|
|
2229
2243
|
}
|
|
2230
|
-
return (
|
|
2244
|
+
return ($, Z) => (r(), y(e(Je), {
|
|
2231
2245
|
title: U.value,
|
|
2232
2246
|
card: !1,
|
|
2233
2247
|
fill: ""
|
|
2234
2248
|
}, {
|
|
2235
2249
|
actions: a(() => [
|
|
2236
|
-
|
|
2250
|
+
S.value ? (r(), y(e(Q), {
|
|
2237
2251
|
key: 0,
|
|
2238
2252
|
variant: "outline",
|
|
2239
2253
|
icon: "tag",
|
|
2240
|
-
onClick:
|
|
2254
|
+
onClick: Z[0] || (Z[0] = (G) => e(m).push(`${u.base}/statuses`))
|
|
2241
2255
|
}, {
|
|
2242
2256
|
default: a(() => [
|
|
2243
|
-
|
|
2257
|
+
w(h(e(l)("panel.statuses")), 1)
|
|
2244
2258
|
]),
|
|
2245
2259
|
_: 1
|
|
2246
|
-
})) :
|
|
2247
|
-
|
|
2260
|
+
})) : P("", !0),
|
|
2261
|
+
S.value ? (r(), y(e(Q), {
|
|
2248
2262
|
key: 1,
|
|
2249
2263
|
type: "primary",
|
|
2250
2264
|
icon: "plus",
|
|
2251
2265
|
onClick: D
|
|
2252
2266
|
}, {
|
|
2253
2267
|
default: a(() => [
|
|
2254
|
-
|
|
2268
|
+
w(h(e(l)("panel.new-form")), 1)
|
|
2255
2269
|
]),
|
|
2256
2270
|
_: 1
|
|
2257
|
-
})) :
|
|
2271
|
+
})) : P("", !0)
|
|
2258
2272
|
]),
|
|
2259
2273
|
default: a(() => [
|
|
2260
|
-
t(e(
|
|
2274
|
+
t(e(te), {
|
|
2261
2275
|
class: "wx-inbox",
|
|
2262
2276
|
padding: "none"
|
|
2263
2277
|
}, {
|
|
2264
2278
|
default: a(() => [
|
|
2265
|
-
t(e(
|
|
2266
|
-
open:
|
|
2267
|
-
"onUpdate:open":
|
|
2279
|
+
t(e(fl), {
|
|
2280
|
+
open: A.value,
|
|
2281
|
+
"onUpdate:open": Z[2] || (Z[2] = (G) => A.value = G),
|
|
2268
2282
|
class: "wx-inbox__panes",
|
|
2269
2283
|
"list-width": 270,
|
|
2270
2284
|
"detail-min": 420,
|
|
2271
|
-
"detail-label":
|
|
2285
|
+
"detail-label": p.value ? b(p.value) : e(l)("panel.forms")
|
|
2272
2286
|
}, {
|
|
2273
2287
|
list: a(() => [
|
|
2274
|
-
|
|
2288
|
+
c.value ? (r(), y(e(Me), {
|
|
2275
2289
|
key: 0,
|
|
2276
2290
|
class: "wx-inbox__loading",
|
|
2277
2291
|
rows: 5
|
|
2278
|
-
})) :
|
|
2292
|
+
})) : o.value.length === 0 ? (r(), y(e(Se), {
|
|
2279
2293
|
key: 1,
|
|
2280
2294
|
title: e(l)("panel.no-forms"),
|
|
2281
2295
|
description: e(l)("panel.no-forms-help")
|
|
2282
|
-
}, null, 8, ["title", "description"])) : (
|
|
2296
|
+
}, null, 8, ["title", "description"])) : (r(), y(e(Re), {
|
|
2283
2297
|
key: 2,
|
|
2284
|
-
modelValue:
|
|
2285
|
-
"onUpdate:modelValue":
|
|
2298
|
+
modelValue: o.value,
|
|
2299
|
+
"onUpdate:modelValue": Z[1] || (Z[1] = (G) => o.value = G),
|
|
2286
2300
|
class: "wx-inbox__forms",
|
|
2287
2301
|
plain: "",
|
|
2288
2302
|
size: "sm",
|
|
2289
2303
|
"item-key": "id",
|
|
2290
|
-
"item-label":
|
|
2291
|
-
disabled: !
|
|
2304
|
+
"item-label": b,
|
|
2305
|
+
disabled: !S.value,
|
|
2292
2306
|
title: e(l)("panel.forms"),
|
|
2293
|
-
onMove:
|
|
2307
|
+
onMove: g
|
|
2294
2308
|
}, {
|
|
2295
|
-
default: a(({ item:
|
|
2296
|
-
|
|
2309
|
+
default: a(({ item: G }) => [
|
|
2310
|
+
O("button", {
|
|
2297
2311
|
type: "button",
|
|
2298
|
-
class:
|
|
2299
|
-
onClick: (
|
|
2312
|
+
class: Ye(["wx-inbox-form", { "is-current": G.id === F.value }]),
|
|
2313
|
+
onClick: (ce) => C(G)
|
|
2300
2314
|
}, [
|
|
2301
|
-
|
|
2302
|
-
t(e(
|
|
2315
|
+
O("span", dt, [
|
|
2316
|
+
t(e(K), {
|
|
2303
2317
|
truncate: "",
|
|
2304
2318
|
weight: "medium"
|
|
2305
2319
|
}, {
|
|
2306
2320
|
default: a(() => [
|
|
2307
|
-
|
|
2321
|
+
w(h(b(G)), 1)
|
|
2308
2322
|
]),
|
|
2309
2323
|
_: 2
|
|
2310
2324
|
}, 1024),
|
|
2311
|
-
|
|
2325
|
+
G.is_enabled ? P("", !0) : (r(), y(e(Ve), {
|
|
2312
2326
|
key: 0,
|
|
2313
2327
|
type: "default"
|
|
2314
2328
|
}, {
|
|
2315
2329
|
default: a(() => [
|
|
2316
|
-
|
|
2330
|
+
w(h(e(l)("panel.off")), 1)
|
|
2317
2331
|
]),
|
|
2318
2332
|
_: 1
|
|
2319
|
-
}))
|
|
2333
|
+
})),
|
|
2334
|
+
G.unread_count ? (r(), y(e(je), {
|
|
2335
|
+
key: 1,
|
|
2336
|
+
class: "wx-inbox-form__count",
|
|
2337
|
+
type: "primary",
|
|
2338
|
+
value: G.unread_count,
|
|
2339
|
+
label: e(l)("panel.unread")
|
|
2340
|
+
}, null, 8, ["value", "label"])) : G.submissions_count ? (r(), y(e(je), {
|
|
2341
|
+
key: 2,
|
|
2342
|
+
class: "wx-inbox-form__count",
|
|
2343
|
+
type: "neutral",
|
|
2344
|
+
value: G.submissions_count,
|
|
2345
|
+
label: e(l)("panel.submissions")
|
|
2346
|
+
}, null, 8, ["value", "label"])) : P("", !0)
|
|
2320
2347
|
]),
|
|
2321
|
-
t(e(
|
|
2348
|
+
t(e(K), {
|
|
2322
2349
|
size: "sm",
|
|
2323
2350
|
tone: "muted",
|
|
2324
2351
|
truncate: ""
|
|
2325
2352
|
}, {
|
|
2326
2353
|
default: a(() => [
|
|
2327
|
-
|
|
2354
|
+
w(h(G.slug), 1)
|
|
2328
2355
|
]),
|
|
2329
2356
|
_: 2
|
|
2330
2357
|
}, 1024)
|
|
2331
|
-
], 10,
|
|
2332
|
-
j.unread_count ? (u(), h(e(xe), {
|
|
2333
|
-
key: 0,
|
|
2334
|
-
type: "primary",
|
|
2335
|
-
class: "wx-inbox-form__count",
|
|
2336
|
-
title: e(l)("panel.unread")
|
|
2337
|
-
}, {
|
|
2338
|
-
default: a(() => [
|
|
2339
|
-
_(b(j.unread_count), 1)
|
|
2340
|
-
]),
|
|
2341
|
-
_: 2
|
|
2342
|
-
}, 1032, ["title"])) : j.submissions_count ? (u(), h(e(Z), {
|
|
2343
|
-
key: 1,
|
|
2344
|
-
size: "sm",
|
|
2345
|
-
tone: "muted",
|
|
2346
|
-
title: e(l)("panel.submissions")
|
|
2347
|
-
}, {
|
|
2348
|
-
default: a(() => [
|
|
2349
|
-
_(b(j.submissions_count), 1)
|
|
2350
|
-
]),
|
|
2351
|
-
_: 2
|
|
2352
|
-
}, 1032, ["title"])) : O("", !0)
|
|
2358
|
+
], 10, rt)
|
|
2353
2359
|
]),
|
|
2354
|
-
actions: a(({ item:
|
|
2360
|
+
actions: a(({ item: G }) => [
|
|
2355
2361
|
t(e(we), {
|
|
2356
|
-
actions:
|
|
2357
|
-
label:
|
|
2362
|
+
actions: E(G),
|
|
2363
|
+
label: b(G)
|
|
2358
2364
|
}, null, 8, ["actions", "label"])
|
|
2359
2365
|
]),
|
|
2360
2366
|
_: 1
|
|
@@ -2365,15 +2371,15 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2365
2371
|
description: e(l)("panel.choose-form")
|
|
2366
2372
|
}, null, 8, ["description"])
|
|
2367
2373
|
]),
|
|
2368
|
-
detail: a(({ inline:
|
|
2369
|
-
|
|
2370
|
-
key:
|
|
2371
|
-
form:
|
|
2372
|
-
base:
|
|
2373
|
-
inline:
|
|
2374
|
-
onBack:
|
|
2375
|
-
onChanged:
|
|
2376
|
-
}, null, 8, ["form", "base", "inline", "onBack"])) :
|
|
2374
|
+
detail: a(({ inline: G, back: ce }) => [
|
|
2375
|
+
p.value ? (r(), y(ut, {
|
|
2376
|
+
key: p.value.id,
|
|
2377
|
+
form: p.value,
|
|
2378
|
+
base: u.base,
|
|
2379
|
+
inline: G,
|
|
2380
|
+
onBack: ce,
|
|
2381
|
+
onChanged: _
|
|
2382
|
+
}, null, 8, ["form", "base", "inline", "onBack"])) : P("", !0)
|
|
2377
2383
|
]),
|
|
2378
2384
|
_: 1
|
|
2379
2385
|
}, 8, ["open", "detail-label"])
|
|
@@ -2384,74 +2390,74 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2384
2390
|
_: 1
|
|
2385
2391
|
}, 8, ["title"]));
|
|
2386
2392
|
}
|
|
2387
|
-
}), pt = { class: "wx-inbox-status-form" }, mt = { class: "wx-inbox-status-form__checks" }, vt = /* @__PURE__ */
|
|
2393
|
+
}), pt = { class: "wx-inbox-status-form" }, mt = { class: "wx-inbox-status-form__checks" }, vt = /* @__PURE__ */ ee({
|
|
2388
2394
|
__name: "StatusDialog",
|
|
2389
2395
|
props: {
|
|
2390
2396
|
status: {}
|
|
2391
2397
|
},
|
|
2392
|
-
setup(
|
|
2393
|
-
const
|
|
2394
|
-
|
|
2395
|
-
const l =
|
|
2398
|
+
setup(d) {
|
|
2399
|
+
const u = d, { resolve: i, dismiss: f, open: s } = Ae(), m = ne(), v = oe(m);
|
|
2400
|
+
ie();
|
|
2401
|
+
const l = X("webx-inbox"), T = de(), o = q(""), c = q({}), A = q("default"), S = q(!1), W = q(!1), U = q(!1), F = q(!1), p = q({});
|
|
2396
2402
|
ke(
|
|
2397
|
-
() =>
|
|
2398
|
-
(
|
|
2399
|
-
|
|
2403
|
+
() => u.status,
|
|
2404
|
+
(z) => {
|
|
2405
|
+
o.value = z?.key ?? "", c.value = { ...z?.title ?? {} }, A.value = z?.color ?? "default", S.value = z?.is_default ?? !1, W.value = z?.is_spam ?? !1, U.value = z?.is_closed ?? !1, p.value = {};
|
|
2400
2406
|
},
|
|
2401
2407
|
{ immediate: !0 }
|
|
2402
2408
|
);
|
|
2403
|
-
const
|
|
2404
|
-
() =>
|
|
2409
|
+
const b = N(
|
|
2410
|
+
() => _l.map((z) => ({ value: z, label: l(`panel.color-${z}`) }))
|
|
2405
2411
|
);
|
|
2406
|
-
function
|
|
2407
|
-
return
|
|
2412
|
+
function _(z) {
|
|
2413
|
+
return p.value[z]?.[0];
|
|
2408
2414
|
}
|
|
2409
|
-
async function
|
|
2410
|
-
|
|
2411
|
-
const
|
|
2412
|
-
key:
|
|
2413
|
-
title:
|
|
2414
|
-
color:
|
|
2415
|
-
is_default:
|
|
2416
|
-
is_spam:
|
|
2415
|
+
async function C() {
|
|
2416
|
+
F.value = !0, p.value = {};
|
|
2417
|
+
const z = {
|
|
2418
|
+
key: o.value.trim(),
|
|
2419
|
+
title: c.value,
|
|
2420
|
+
color: A.value,
|
|
2421
|
+
is_default: S.value,
|
|
2422
|
+
is_spam: W.value,
|
|
2417
2423
|
is_closed: U.value
|
|
2418
2424
|
};
|
|
2419
2425
|
try {
|
|
2420
|
-
|
|
2421
|
-
|
|
2426
|
+
i(
|
|
2427
|
+
u.status === null ? await v.createStatus(z) : await v.saveStatus(u.status.id, z)
|
|
2422
2428
|
);
|
|
2423
|
-
} catch (
|
|
2424
|
-
const D =
|
|
2425
|
-
D?.errors ? (
|
|
2429
|
+
} catch (E) {
|
|
2430
|
+
const D = E.body;
|
|
2431
|
+
D?.errors ? (p.value = D.errors, B.danger(l("panel.failed"))) : B.danger(T(E));
|
|
2426
2432
|
} finally {
|
|
2427
|
-
|
|
2433
|
+
F.value = !1;
|
|
2428
2434
|
}
|
|
2429
2435
|
}
|
|
2430
|
-
return (
|
|
2436
|
+
return (z, E) => (r(), y(e(Ie), {
|
|
2431
2437
|
open: e(s),
|
|
2432
|
-
"onUpdate:open":
|
|
2433
|
-
title:
|
|
2438
|
+
"onUpdate:open": E[7] || (E[7] = (D) => le(s) ? s.value = D : null),
|
|
2439
|
+
title: d.status ? e(l)("panel.settings") : e(l)("panel.new-status"),
|
|
2434
2440
|
width: 520
|
|
2435
2441
|
}, {
|
|
2436
2442
|
footer: a(() => [
|
|
2437
2443
|
t(e(Ce), { size: "sm" }, {
|
|
2438
2444
|
default: a(() => [
|
|
2439
|
-
t(e(
|
|
2445
|
+
t(e(Q), {
|
|
2440
2446
|
variant: "outline",
|
|
2441
|
-
onClick:
|
|
2447
|
+
onClick: E[6] || (E[6] = (D) => e(f)())
|
|
2442
2448
|
}, {
|
|
2443
2449
|
default: a(() => [
|
|
2444
|
-
|
|
2450
|
+
w(h(e(l)("panel.cancel")), 1)
|
|
2445
2451
|
]),
|
|
2446
2452
|
_: 1
|
|
2447
2453
|
}),
|
|
2448
|
-
t(e(
|
|
2454
|
+
t(e(Q), {
|
|
2449
2455
|
type: "primary",
|
|
2450
|
-
loading:
|
|
2451
|
-
onClick:
|
|
2456
|
+
loading: F.value,
|
|
2457
|
+
onClick: C
|
|
2452
2458
|
}, {
|
|
2453
2459
|
default: a(() => [
|
|
2454
|
-
|
|
2460
|
+
w(h(e(l)("panel.save")), 1)
|
|
2455
2461
|
]),
|
|
2456
2462
|
_: 1
|
|
2457
2463
|
}, 8, ["loading"])
|
|
@@ -2460,16 +2466,16 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2460
2466
|
})
|
|
2461
2467
|
]),
|
|
2462
2468
|
default: a(() => [
|
|
2463
|
-
|
|
2469
|
+
O("div", pt, [
|
|
2464
2470
|
t(e(R), {
|
|
2465
2471
|
label: e(l)("panel.title"),
|
|
2466
|
-
error:
|
|
2472
|
+
error: _("title"),
|
|
2467
2473
|
required: ""
|
|
2468
2474
|
}, {
|
|
2469
2475
|
default: a(() => [
|
|
2470
|
-
t(e(
|
|
2471
|
-
modelValue:
|
|
2472
|
-
"onUpdate:modelValue":
|
|
2476
|
+
t(e(Y), {
|
|
2477
|
+
modelValue: c.value,
|
|
2478
|
+
"onUpdate:modelValue": E[0] || (E[0] = (D) => c.value = D),
|
|
2473
2479
|
localized: ""
|
|
2474
2480
|
}, null, 8, ["modelValue"])
|
|
2475
2481
|
]),
|
|
@@ -2477,13 +2483,13 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2477
2483
|
}, 8, ["label", "error"]),
|
|
2478
2484
|
t(e(R), {
|
|
2479
2485
|
label: e(l)("panel.status-key"),
|
|
2480
|
-
error:
|
|
2486
|
+
error: _("key"),
|
|
2481
2487
|
required: ""
|
|
2482
2488
|
}, {
|
|
2483
2489
|
default: a(() => [
|
|
2484
|
-
t(e(
|
|
2485
|
-
modelValue:
|
|
2486
|
-
"onUpdate:modelValue":
|
|
2490
|
+
t(e(Y), {
|
|
2491
|
+
modelValue: o.value,
|
|
2492
|
+
"onUpdate:modelValue": E[1] || (E[1] = (D) => o.value = D),
|
|
2487
2493
|
placeholder: "in-progress"
|
|
2488
2494
|
}, null, 8, ["modelValue"])
|
|
2489
2495
|
]),
|
|
@@ -2491,32 +2497,32 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2491
2497
|
}, 8, ["label", "error"]),
|
|
2492
2498
|
t(e(R), {
|
|
2493
2499
|
label: e(l)("panel.status-color"),
|
|
2494
|
-
error:
|
|
2500
|
+
error: _("color")
|
|
2495
2501
|
}, {
|
|
2496
2502
|
default: a(() => [
|
|
2497
|
-
t(e(
|
|
2498
|
-
modelValue:
|
|
2499
|
-
"onUpdate:modelValue":
|
|
2500
|
-
options:
|
|
2503
|
+
t(e(me), {
|
|
2504
|
+
modelValue: A.value,
|
|
2505
|
+
"onUpdate:modelValue": E[2] || (E[2] = (D) => A.value = D),
|
|
2506
|
+
options: b.value
|
|
2501
2507
|
}, null, 8, ["modelValue", "options"])
|
|
2502
2508
|
]),
|
|
2503
2509
|
_: 1
|
|
2504
2510
|
}, 8, ["label", "error"]),
|
|
2505
|
-
|
|
2506
|
-
t(e(
|
|
2507
|
-
modelValue:
|
|
2508
|
-
"onUpdate:modelValue":
|
|
2511
|
+
O("div", mt, [
|
|
2512
|
+
t(e(pe), {
|
|
2513
|
+
modelValue: S.value,
|
|
2514
|
+
"onUpdate:modelValue": E[3] || (E[3] = (D) => S.value = D),
|
|
2509
2515
|
label: e(l)("panel.status-default")
|
|
2510
2516
|
}, null, 8, ["modelValue", "label"]),
|
|
2511
|
-
t(e(
|
|
2512
|
-
modelValue:
|
|
2513
|
-
"onUpdate:modelValue":
|
|
2517
|
+
t(e(pe), {
|
|
2518
|
+
modelValue: W.value,
|
|
2519
|
+
"onUpdate:modelValue": E[4] || (E[4] = (D) => W.value = D),
|
|
2514
2520
|
label: e(l)("panel.status-spam")
|
|
2515
2521
|
}, null, 8, ["modelValue", "label"]),
|
|
2516
|
-
t(e(
|
|
2522
|
+
t(e(pe), {
|
|
2517
2523
|
modelValue: U.value,
|
|
2518
|
-
"onUpdate:modelValue":
|
|
2519
|
-
disabled:
|
|
2524
|
+
"onUpdate:modelValue": E[5] || (E[5] = (D) => U.value = D),
|
|
2525
|
+
disabled: W.value,
|
|
2520
2526
|
label: e(l)("panel.status-closed")
|
|
2521
2527
|
}, null, 8, ["modelValue", "disabled", "label"])
|
|
2522
2528
|
])
|
|
@@ -2525,146 +2531,146 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2525
2531
|
_: 1
|
|
2526
2532
|
}, 8, ["open", "title"]));
|
|
2527
2533
|
}
|
|
2528
|
-
}), ft = /* @__PURE__ */
|
|
2534
|
+
}), ft = /* @__PURE__ */ se(vt, [["__scopeId", "data-v-b520b53b"]]), bt = { class: "wx-inbox-statuses" }, ht = { class: "wx-inbox-status" }, yt = /* @__PURE__ */ ee({
|
|
2529
2535
|
__name: "StatusesPage",
|
|
2530
2536
|
props: {
|
|
2531
2537
|
base: { default: "/inbox" }
|
|
2532
2538
|
},
|
|
2533
|
-
setup(
|
|
2534
|
-
const
|
|
2535
|
-
|
|
2536
|
-
const
|
|
2537
|
-
function
|
|
2538
|
-
return re(
|
|
2539
|
-
}
|
|
2540
|
-
async function
|
|
2541
|
-
|
|
2539
|
+
setup(d) {
|
|
2540
|
+
const u = d, i = ne(), f = oe(i), s = be();
|
|
2541
|
+
ie();
|
|
2542
|
+
const m = X("webx-inbox"), v = de(), l = q([]), T = q(!0), o = i.can("inbox.manage"), c = Ne(ft);
|
|
2543
|
+
function A(b) {
|
|
2544
|
+
return re(b.title, s.active.value, b.key);
|
|
2545
|
+
}
|
|
2546
|
+
async function S() {
|
|
2547
|
+
T.value = !0;
|
|
2542
2548
|
try {
|
|
2543
|
-
l.value = await
|
|
2544
|
-
} catch (
|
|
2545
|
-
B.danger(
|
|
2549
|
+
l.value = await f.statuses();
|
|
2550
|
+
} catch (b) {
|
|
2551
|
+
B.danger(v(b));
|
|
2546
2552
|
} finally {
|
|
2547
|
-
|
|
2553
|
+
T.value = !1;
|
|
2548
2554
|
}
|
|
2549
2555
|
}
|
|
2550
|
-
|
|
2551
|
-
async function
|
|
2552
|
-
await
|
|
2556
|
+
S();
|
|
2557
|
+
async function W(b) {
|
|
2558
|
+
await c({ status: b }) && await S();
|
|
2553
2559
|
}
|
|
2554
|
-
async function U(
|
|
2555
|
-
if (await
|
|
2556
|
-
title:
|
|
2557
|
-
message:
|
|
2558
|
-
confirmText:
|
|
2559
|
-
cancelText:
|
|
2560
|
+
async function U(b) {
|
|
2561
|
+
if (await $e({
|
|
2562
|
+
title: m("panel.delete-status-title", { status: A(b) }),
|
|
2563
|
+
message: m("panel.delete-status-text"),
|
|
2564
|
+
confirmText: m("panel.delete"),
|
|
2565
|
+
cancelText: m("panel.cancel"),
|
|
2560
2566
|
tone: "danger"
|
|
2561
2567
|
}))
|
|
2562
2568
|
try {
|
|
2563
|
-
await
|
|
2564
|
-
} catch (
|
|
2565
|
-
B.danger(
|
|
2569
|
+
await f.removeStatus(b.id), B.success(m("panel.deleted")), await S();
|
|
2570
|
+
} catch (C) {
|
|
2571
|
+
B.danger(v(C));
|
|
2566
2572
|
}
|
|
2567
2573
|
}
|
|
2568
|
-
function
|
|
2569
|
-
return
|
|
2570
|
-
{ key: "edit", icon: "edit", label:
|
|
2571
|
-
|
|
2574
|
+
function F(b) {
|
|
2575
|
+
return o ? [
|
|
2576
|
+
{ key: "edit", icon: "edit", label: m("panel.settings"), run: () => {
|
|
2577
|
+
W(b);
|
|
2572
2578
|
} },
|
|
2573
2579
|
// A status with submissions in them cannot go: they would have nothing to be in. The
|
|
2574
2580
|
// line is left out rather than greyed, the way every list of the panel does it.
|
|
2575
|
-
...
|
|
2581
|
+
...b.submissions_count === 0 ? [
|
|
2576
2582
|
{
|
|
2577
2583
|
key: "delete",
|
|
2578
2584
|
icon: "trash",
|
|
2579
|
-
label:
|
|
2585
|
+
label: m("panel.delete"),
|
|
2580
2586
|
danger: !0,
|
|
2581
2587
|
run: () => {
|
|
2582
|
-
U(
|
|
2588
|
+
U(b);
|
|
2583
2589
|
}
|
|
2584
2590
|
}
|
|
2585
2591
|
] : []
|
|
2586
2592
|
] : [];
|
|
2587
2593
|
}
|
|
2588
|
-
async function
|
|
2594
|
+
async function p() {
|
|
2589
2595
|
try {
|
|
2590
|
-
await
|
|
2591
|
-
} catch (
|
|
2592
|
-
B.danger(
|
|
2596
|
+
await f.sortStatuses(l.value.map((b) => b.id));
|
|
2597
|
+
} catch (b) {
|
|
2598
|
+
B.danger(v(b, m("panel.reorder-failed"))), await S();
|
|
2593
2599
|
}
|
|
2594
2600
|
}
|
|
2595
|
-
return (
|
|
2601
|
+
return (b, _) => (r(), j("div", bt, [
|
|
2596
2602
|
t(e(Ee), {
|
|
2597
|
-
to:
|
|
2598
|
-
label: e(
|
|
2603
|
+
to: u.base,
|
|
2604
|
+
label: e(m)("panel.forms")
|
|
2599
2605
|
}, null, 8, ["to", "label"]),
|
|
2600
|
-
t(e(
|
|
2601
|
-
title: e(
|
|
2606
|
+
t(e(Je), {
|
|
2607
|
+
title: e(m)("panel.statuses")
|
|
2602
2608
|
}, {
|
|
2603
2609
|
actions: a(() => [
|
|
2604
|
-
e(
|
|
2610
|
+
e(o) ? (r(), y(e(Q), {
|
|
2605
2611
|
key: 0,
|
|
2606
2612
|
type: "primary",
|
|
2607
2613
|
icon: "plus",
|
|
2608
|
-
onClick:
|
|
2614
|
+
onClick: _[0] || (_[0] = (C) => W(null))
|
|
2609
2615
|
}, {
|
|
2610
2616
|
default: a(() => [
|
|
2611
|
-
|
|
2617
|
+
w(h(e(m)("panel.new-status")), 1)
|
|
2612
2618
|
]),
|
|
2613
2619
|
_: 1
|
|
2614
|
-
})) :
|
|
2620
|
+
})) : P("", !0)
|
|
2615
2621
|
]),
|
|
2616
2622
|
default: a(() => [
|
|
2617
|
-
!
|
|
2623
|
+
!T.value && l.value.length === 0 ? (r(), y(e(Se), {
|
|
2618
2624
|
key: 0,
|
|
2619
|
-
title: e(
|
|
2620
|
-
}, null, 8, ["title"])) : (
|
|
2625
|
+
title: e(m)("panel.no-statuses")
|
|
2626
|
+
}, null, 8, ["title"])) : (r(), y(e(Re), {
|
|
2621
2627
|
key: 1,
|
|
2622
2628
|
modelValue: l.value,
|
|
2623
|
-
"onUpdate:modelValue":
|
|
2629
|
+
"onUpdate:modelValue": _[1] || (_[1] = (C) => l.value = C),
|
|
2624
2630
|
plain: "",
|
|
2625
2631
|
"item-key": "id",
|
|
2626
|
-
"item-label":
|
|
2627
|
-
disabled: !e(
|
|
2628
|
-
"aria-label": e(
|
|
2629
|
-
onMove:
|
|
2632
|
+
"item-label": A,
|
|
2633
|
+
disabled: !e(o),
|
|
2634
|
+
"aria-label": e(m)("panel.statuses"),
|
|
2635
|
+
onMove: p
|
|
2630
2636
|
}, {
|
|
2631
|
-
default: a(({ item:
|
|
2632
|
-
|
|
2633
|
-
t(e(
|
|
2634
|
-
type:
|
|
2637
|
+
default: a(({ item: C }) => [
|
|
2638
|
+
O("div", ht, [
|
|
2639
|
+
t(e(Ve), {
|
|
2640
|
+
type: C.color
|
|
2635
2641
|
}, {
|
|
2636
2642
|
default: a(() => [
|
|
2637
|
-
|
|
2643
|
+
w(h(A(C)), 1)
|
|
2638
2644
|
]),
|
|
2639
2645
|
_: 2
|
|
2640
2646
|
}, 1032, ["type"]),
|
|
2641
|
-
t(e(
|
|
2647
|
+
t(e(K), {
|
|
2642
2648
|
size: "sm",
|
|
2643
2649
|
tone: "muted",
|
|
2644
2650
|
truncate: ""
|
|
2645
2651
|
}, {
|
|
2646
2652
|
default: a(() => [
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
], 64)) :
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
], 64)) :
|
|
2654
|
-
|
|
2655
|
-
], 64)) :
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
], 64)) :
|
|
2653
|
+
O("code", null, h(C.key), 1),
|
|
2654
|
+
C.is_default ? (r(), j(J, { key: 0 }, [
|
|
2655
|
+
w(" · " + h(e(m)("panel.status-default")), 1)
|
|
2656
|
+
], 64)) : P("", !0),
|
|
2657
|
+
C.is_spam ? (r(), j(J, { key: 1 }, [
|
|
2658
|
+
w(" · " + h(e(m)("panel.status-spam")), 1)
|
|
2659
|
+
], 64)) : C.is_closed ? (r(), j(J, { key: 2 }, [
|
|
2660
|
+
w(" · " + h(e(m)("panel.status-closed")), 1)
|
|
2661
|
+
], 64)) : P("", !0),
|
|
2662
|
+
C.submissions_count ? (r(), j(J, { key: 3 }, [
|
|
2663
|
+
w(" · " + h(e(m)("panel.in-use")) + " (" + h(C.submissions_count) + ") ", 1)
|
|
2664
|
+
], 64)) : P("", !0)
|
|
2659
2665
|
]),
|
|
2660
2666
|
_: 2
|
|
2661
2667
|
}, 1024)
|
|
2662
2668
|
])
|
|
2663
2669
|
]),
|
|
2664
|
-
actions: a(({ item:
|
|
2670
|
+
actions: a(({ item: C }) => [
|
|
2665
2671
|
t(e(we), {
|
|
2666
|
-
actions:
|
|
2667
|
-
label:
|
|
2672
|
+
actions: F(C),
|
|
2673
|
+
label: A(C)
|
|
2668
2674
|
}, null, 8, ["actions", "label"])
|
|
2669
2675
|
]),
|
|
2670
2676
|
_: 1
|
|
@@ -2674,80 +2680,80 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2674
2680
|
}, 8, ["title"])
|
|
2675
2681
|
]));
|
|
2676
2682
|
}
|
|
2677
|
-
}), gt = /* @__PURE__ */
|
|
2683
|
+
}), gt = /* @__PURE__ */ se(yt, [["__scopeId", "data-v-8c5d0882"]]), xt = { class: "wx-submission" }, _t = { class: "wx-submission__head" }, wt = { class: "wx-submission__who" }, kt = { class: "wx-submission__tools" }, Vt = {
|
|
2678
2684
|
key: 1,
|
|
2679
2685
|
class: "wx-submission__panes"
|
|
2680
|
-
},
|
|
2686
|
+
}, $t = { class: "wx-submission__main" }, Ut = { class: "wx-submission__value" }, St = { class: "wx-submission__files" }, Ct = { class: "wx-submission__by" }, zt = { class: "wx-submission__fields" }, Tt = ["href"], Ft = {
|
|
2681
2687
|
key: 1,
|
|
2682
2688
|
class: "wx-submission__detail"
|
|
2683
|
-
}, At = { class: "wx-
|
|
2689
|
+
}, Wt = { class: "wx-submission__aside" }, qt = { class: "wx-submission__fields" }, At = { class: "wx-submission__field" }, It = { class: "wx-submission__field" }, Nt = /* @__PURE__ */ ee({
|
|
2684
2690
|
__name: "SubmissionPage",
|
|
2685
2691
|
props: {
|
|
2686
2692
|
base: { default: "/inbox" }
|
|
2687
2693
|
},
|
|
2688
|
-
setup(
|
|
2689
|
-
const
|
|
2690
|
-
|
|
2691
|
-
const l =
|
|
2694
|
+
setup(d) {
|
|
2695
|
+
const u = d, i = ne(), f = oe(i), s = We(), m = qe(), v = be();
|
|
2696
|
+
ie();
|
|
2697
|
+
const l = X("webx-inbox"), T = X("webx-admin"), o = de(), c = q(null), A = q([]), S = q([]), W = q(!0), U = N(() => i.can("inbox.update")), F = N(() => Number(s.params.id)), p = N(() => ({
|
|
2692
2698
|
view: typeof s.query.view == "string" ? s.query.view : void 0,
|
|
2693
2699
|
search: typeof s.query.search == "string" ? s.query.search : void 0,
|
|
2694
2700
|
assignee: typeof s.query.assignee == "string" ? s.query.assignee : void 0
|
|
2695
|
-
})),
|
|
2696
|
-
() =>
|
|
2697
|
-
),
|
|
2698
|
-
() =>
|
|
2701
|
+
})), b = N(() => ({ path: u.base, query: { ...s.query } })), _ = N(
|
|
2702
|
+
() => A.value.map((n) => ({ value: n.id, label: z(n) }))
|
|
2703
|
+
), C = N(
|
|
2704
|
+
() => S.value.map((n) => ({ value: n.id, label: n.name }))
|
|
2699
2705
|
);
|
|
2700
|
-
function
|
|
2701
|
-
return re(
|
|
2702
|
-
}
|
|
2703
|
-
const
|
|
2704
|
-
const
|
|
2705
|
-
return
|
|
2706
|
-
}),
|
|
2707
|
-
if (
|
|
2708
|
-
const
|
|
2709
|
-
return `mailto:${
|
|
2706
|
+
function z(n) {
|
|
2707
|
+
return re(n.title, v.active.value, n.key);
|
|
2708
|
+
}
|
|
2709
|
+
const E = N(() => l("panel.submission", { id: String(F.value) })), D = N(() => {
|
|
2710
|
+
const n = c.value?.form;
|
|
2711
|
+
return n === void 0 ? "" : re(n.title ?? {}, v.active.value, n.slug ?? "");
|
|
2712
|
+
}), I = N(() => (c.value?.values ?? []).find((x) => x.type === "email" && (x.value ?? "") !== "")?.value ?? null), L = N(() => {
|
|
2713
|
+
if (I.value === null) return null;
|
|
2714
|
+
const n = encodeURIComponent(`${D.value} — ${E.value}`);
|
|
2715
|
+
return `mailto:${I.value}?subject=${n}`;
|
|
2710
2716
|
});
|
|
2711
|
-
async function
|
|
2712
|
-
|
|
2717
|
+
async function g() {
|
|
2718
|
+
W.value = !0;
|
|
2713
2719
|
try {
|
|
2714
|
-
|
|
2715
|
-
} catch (
|
|
2716
|
-
B.danger(
|
|
2720
|
+
c.value = await f.submission(F.value, p.value);
|
|
2721
|
+
} catch (n) {
|
|
2722
|
+
B.danger(o(n)), m.replace(b.value);
|
|
2717
2723
|
} finally {
|
|
2718
|
-
|
|
2724
|
+
W.value = !1;
|
|
2719
2725
|
}
|
|
2720
2726
|
}
|
|
2721
|
-
async function
|
|
2727
|
+
async function $() {
|
|
2722
2728
|
try {
|
|
2723
|
-
|
|
2724
|
-
} catch (
|
|
2725
|
-
B.danger(
|
|
2729
|
+
A.value = await f.statuses(), U.value && (S.value = await f.recipients());
|
|
2730
|
+
} catch (n) {
|
|
2731
|
+
B.danger(o(n));
|
|
2726
2732
|
}
|
|
2727
2733
|
}
|
|
2728
|
-
ke(
|
|
2729
|
-
|
|
2730
|
-
}, { immediate: !0 }),
|
|
2731
|
-
async function
|
|
2734
|
+
ke(F, () => {
|
|
2735
|
+
g();
|
|
2736
|
+
}, { immediate: !0 }), $();
|
|
2737
|
+
async function Z(n) {
|
|
2732
2738
|
try {
|
|
2733
|
-
|
|
2734
|
-
} catch (
|
|
2735
|
-
B.danger(
|
|
2739
|
+
c.value = await f.saveSubmission(F.value, n), B.success(l("panel.saved"));
|
|
2740
|
+
} catch (M) {
|
|
2741
|
+
B.danger(o(M)), await g();
|
|
2736
2742
|
}
|
|
2737
2743
|
}
|
|
2738
|
-
function
|
|
2739
|
-
typeof
|
|
2744
|
+
function G(n) {
|
|
2745
|
+
typeof n == "number" && Z({ status_id: n });
|
|
2740
2746
|
}
|
|
2741
|
-
function
|
|
2742
|
-
|
|
2747
|
+
function ce(n) {
|
|
2748
|
+
Z({ assignee_id: typeof n == "number" ? n : null });
|
|
2743
2749
|
}
|
|
2744
|
-
const
|
|
2750
|
+
const Ue = N(() => !U.value || c.value === null ? [] : [
|
|
2745
2751
|
{
|
|
2746
2752
|
key: "unread",
|
|
2747
2753
|
icon: "eye-off",
|
|
2748
2754
|
label: l("panel.mark-unread"),
|
|
2749
2755
|
run: () => {
|
|
2750
|
-
|
|
2756
|
+
H();
|
|
2751
2757
|
}
|
|
2752
2758
|
},
|
|
2753
2759
|
{
|
|
@@ -2756,19 +2762,19 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2756
2762
|
label: l("panel.delete"),
|
|
2757
2763
|
danger: !0,
|
|
2758
2764
|
run: () => {
|
|
2759
|
-
|
|
2765
|
+
V();
|
|
2760
2766
|
}
|
|
2761
2767
|
}
|
|
2762
2768
|
]);
|
|
2763
|
-
async function
|
|
2769
|
+
async function H() {
|
|
2764
2770
|
try {
|
|
2765
|
-
await
|
|
2766
|
-
} catch (
|
|
2767
|
-
B.danger(
|
|
2771
|
+
await f.massSubmissions({ ids: [F.value], action: "unread" }), m.push(b.value);
|
|
2772
|
+
} catch (n) {
|
|
2773
|
+
B.danger(o(n));
|
|
2768
2774
|
}
|
|
2769
2775
|
}
|
|
2770
|
-
async function
|
|
2771
|
-
if (await
|
|
2776
|
+
async function V() {
|
|
2777
|
+
if (await $e({
|
|
2772
2778
|
title: l("panel.delete-submission-title"),
|
|
2773
2779
|
message: l("panel.delete-submission-text"),
|
|
2774
2780
|
confirmText: l("panel.delete"),
|
|
@@ -2776,121 +2782,127 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2776
2782
|
tone: "danger"
|
|
2777
2783
|
}))
|
|
2778
2784
|
try {
|
|
2779
|
-
await
|
|
2780
|
-
} catch (
|
|
2781
|
-
B.danger(
|
|
2785
|
+
await f.removeSubmission(F.value), B.success(l("panel.deleted")), m.push(b.value);
|
|
2786
|
+
} catch (M) {
|
|
2787
|
+
B.danger(o(M));
|
|
2782
2788
|
}
|
|
2783
2789
|
}
|
|
2784
|
-
function k(
|
|
2785
|
-
|
|
2790
|
+
function k(n) {
|
|
2791
|
+
n !== null && m.push({ path: `${u.base}/submissions/${n}`, query: { ...s.query } });
|
|
2786
2792
|
}
|
|
2787
|
-
function
|
|
2788
|
-
const
|
|
2789
|
-
return
|
|
2793
|
+
function ae(n) {
|
|
2794
|
+
const M = A.value.find((x) => x.key === n);
|
|
2795
|
+
return M === void 0 ? n : z(M);
|
|
2790
2796
|
}
|
|
2791
|
-
function
|
|
2792
|
-
switch (
|
|
2797
|
+
function ve(n) {
|
|
2798
|
+
switch (n.type) {
|
|
2793
2799
|
case "created":
|
|
2794
2800
|
return l("panel.event-created");
|
|
2795
2801
|
case "status":
|
|
2796
|
-
return l("panel.event-status", { to:
|
|
2802
|
+
return l("panel.event-status", { to: ae(n.to ?? "") });
|
|
2797
2803
|
case "assignee":
|
|
2798
|
-
return
|
|
2804
|
+
return n.to === null || n.to === "" ? l("panel.event-unassigned") : l("panel.event-assignee", { to: n.to });
|
|
2799
2805
|
case "note":
|
|
2800
2806
|
return l("panel.event-note");
|
|
2801
2807
|
case "notified":
|
|
2802
2808
|
return l("panel.event-notified");
|
|
2803
2809
|
default:
|
|
2804
|
-
return
|
|
2810
|
+
return n.type;
|
|
2805
2811
|
}
|
|
2806
2812
|
}
|
|
2807
|
-
function
|
|
2808
|
-
return `${Math.max(1, Math.round(
|
|
2813
|
+
function De(n) {
|
|
2814
|
+
return `${Math.max(1, Math.round(n / 1024))} KB`;
|
|
2809
2815
|
}
|
|
2810
|
-
const Le =
|
|
2811
|
-
const
|
|
2812
|
-
typeof
|
|
2813
|
-
for (const [
|
|
2814
|
-
|
|
2815
|
-
return typeof
|
|
2816
|
+
const Le = N(() => {
|
|
2817
|
+
const n = c.value?.meta ?? {}, M = [];
|
|
2818
|
+
typeof n.page == "string" && n.page !== "" && M.push({ label: l("panel.meta-page"), value: n.page, link: !0 }), typeof n.referrer == "string" && n.referrer !== "" && M.push({ label: l("panel.meta-referrer"), value: n.referrer, link: !0 });
|
|
2819
|
+
for (const [x, he] of Object.entries(n.utm ?? {}))
|
|
2820
|
+
M.push({ label: x, value: String(he) });
|
|
2821
|
+
return typeof n.locale == "string" && n.locale !== "" && M.push({ label: l("panel.meta-locale"), value: n.locale }), typeof n.ip == "string" && n.ip !== "" && M.push({ label: l("panel.meta-ip"), value: n.ip }), typeof n.user_agent == "string" && n.user_agent !== "" && M.push({ label: l("panel.meta-agent"), value: n.user_agent }), M;
|
|
2816
2822
|
});
|
|
2817
|
-
return (
|
|
2818
|
-
|
|
2819
|
-
t(e(Ee), { to:
|
|
2820
|
-
|
|
2821
|
-
t(e(
|
|
2823
|
+
return (n, M) => (r(), j("div", xt, [
|
|
2824
|
+
O("div", _t, [
|
|
2825
|
+
t(e(Ee), { to: b.value }, null, 8, ["to"]),
|
|
2826
|
+
O("div", wt, [
|
|
2827
|
+
t(e(ll), {
|
|
2822
2828
|
level: 2,
|
|
2823
2829
|
truncate: ""
|
|
2824
2830
|
}, {
|
|
2825
2831
|
default: a(() => [
|
|
2826
|
-
|
|
2832
|
+
w(h(E.value), 1)
|
|
2827
2833
|
]),
|
|
2828
2834
|
_: 1
|
|
2829
2835
|
}),
|
|
2830
|
-
t(e(
|
|
2836
|
+
t(e(K), {
|
|
2831
2837
|
size: "sm",
|
|
2832
2838
|
tone: "muted",
|
|
2833
2839
|
truncate: ""
|
|
2834
2840
|
}, {
|
|
2835
2841
|
default: a(() => [
|
|
2836
|
-
|
|
2842
|
+
w(h(D.value), 1)
|
|
2837
2843
|
]),
|
|
2838
2844
|
_: 1
|
|
2839
2845
|
})
|
|
2840
2846
|
]),
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2847
|
+
O("div", kt, [
|
|
2848
|
+
t(e(xe), {
|
|
2849
|
+
icon: "chevron-left",
|
|
2850
|
+
size: "lg",
|
|
2851
|
+
title: e(l)("panel.previous"),
|
|
2852
|
+
disabled: !c.value?.previous_id,
|
|
2853
|
+
onClick: M[0] || (M[0] = (x) => k(c.value?.previous_id ?? null))
|
|
2854
|
+
}, null, 8, ["title", "disabled"]),
|
|
2855
|
+
t(e(xe), {
|
|
2856
|
+
icon: "chevron-right",
|
|
2857
|
+
size: "lg",
|
|
2858
|
+
title: e(l)("panel.next"),
|
|
2859
|
+
disabled: !c.value?.next_id,
|
|
2860
|
+
onClick: M[1] || (M[1] = (x) => k(c.value?.next_id ?? null))
|
|
2861
|
+
}, null, 8, ["title", "disabled"]),
|
|
2862
|
+
L.value ? (r(), y(e(Q), {
|
|
2863
|
+
key: 0,
|
|
2864
|
+
class: "wx-submission__reply",
|
|
2865
|
+
variant: "outline",
|
|
2866
|
+
icon: "mail",
|
|
2867
|
+
href: L.value
|
|
2868
|
+
}, {
|
|
2869
|
+
default: a(() => [
|
|
2870
|
+
w(h(e(l)("panel.reply")), 1)
|
|
2871
|
+
]),
|
|
2872
|
+
_: 1
|
|
2873
|
+
}, 8, ["href"])) : P("", !0),
|
|
2874
|
+
t(e(we), {
|
|
2875
|
+
actions: Ue.value,
|
|
2876
|
+
size: "lg",
|
|
2877
|
+
label: E.value
|
|
2878
|
+
}, null, 8, ["actions", "label"])
|
|
2879
|
+
])
|
|
2868
2880
|
]),
|
|
2869
|
-
|
|
2881
|
+
W.value ? (r(), y(e(Me), {
|
|
2870
2882
|
key: 0,
|
|
2871
2883
|
rows: 6
|
|
2872
|
-
})) :
|
|
2873
|
-
|
|
2874
|
-
t(e(
|
|
2884
|
+
})) : c.value ? (r(), j("div", Vt, [
|
|
2885
|
+
O("div", $t, [
|
|
2886
|
+
t(e(te), {
|
|
2875
2887
|
title: e(l)("panel.answers")
|
|
2876
2888
|
}, {
|
|
2877
2889
|
default: a(() => [
|
|
2878
|
-
|
|
2890
|
+
c.value.values.length === 0 ? (r(), y(e(Se), {
|
|
2879
2891
|
key: 0,
|
|
2880
2892
|
size: "sm",
|
|
2881
2893
|
description: e(l)("panel.no-answers")
|
|
2882
|
-
}, null, 8, ["description"])) : (
|
|
2894
|
+
}, null, 8, ["description"])) : (r(), y(e(Ke), {
|
|
2883
2895
|
key: 1,
|
|
2884
2896
|
columns: 1,
|
|
2885
2897
|
layout: "vertical"
|
|
2886
2898
|
}, {
|
|
2887
2899
|
default: a(() => [
|
|
2888
|
-
(
|
|
2889
|
-
key:
|
|
2890
|
-
label:
|
|
2900
|
+
(r(!0), j(J, null, ge(c.value.values, (x) => (r(), y(e(ze), {
|
|
2901
|
+
key: x.id,
|
|
2902
|
+
label: x.label ?? x.name
|
|
2891
2903
|
}, {
|
|
2892
2904
|
default: a(() => [
|
|
2893
|
-
|
|
2905
|
+
O("p", Ut, h(x.value || "—"), 1)
|
|
2894
2906
|
]),
|
|
2895
2907
|
_: 2
|
|
2896
2908
|
}, 1032, ["label"]))), 128))
|
|
@@ -2900,264 +2912,283 @@ const Wl = /* @__PURE__ */ le({
|
|
|
2900
2912
|
]),
|
|
2901
2913
|
_: 1
|
|
2902
2914
|
}, 8, ["title"]),
|
|
2903
|
-
|
|
2915
|
+
c.value.files.length > 0 ? (r(), y(e(te), {
|
|
2904
2916
|
key: 0,
|
|
2905
2917
|
title: e(l)("panel.attachments")
|
|
2906
2918
|
}, {
|
|
2907
2919
|
default: a(() => [
|
|
2908
|
-
|
|
2909
|
-
(
|
|
2910
|
-
key:
|
|
2911
|
-
name:
|
|
2912
|
-
type:
|
|
2913
|
-
"download-url":
|
|
2920
|
+
O("div", St, [
|
|
2921
|
+
(r(!0), j(J, null, ge(c.value.files, (x) => (r(), y(e(bl), {
|
|
2922
|
+
key: x.id,
|
|
2923
|
+
name: x.name,
|
|
2924
|
+
type: x.mime ?? void 0,
|
|
2925
|
+
"download-url": x.url,
|
|
2914
2926
|
"download-label": e(l)("panel.download"),
|
|
2915
2927
|
size: "sm"
|
|
2916
2928
|
}, {
|
|
2917
2929
|
meta: a(() => [
|
|
2918
|
-
|
|
2930
|
+
w(h(De(x.size)), 1)
|
|
2919
2931
|
]),
|
|
2920
2932
|
_: 2
|
|
2921
2933
|
}, 1032, ["name", "type", "download-url", "download-label"]))), 128))
|
|
2922
2934
|
])
|
|
2923
2935
|
]),
|
|
2924
2936
|
_: 1
|
|
2925
|
-
}, 8, ["title"])) :
|
|
2926
|
-
t(e(
|
|
2937
|
+
}, 8, ["title"])) : P("", !0),
|
|
2938
|
+
t(e(te), { class: "wx-submission__more" }, {
|
|
2927
2939
|
default: a(() => [
|
|
2928
|
-
t(e(
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2940
|
+
t(e(He), {
|
|
2941
|
+
variant: "pill",
|
|
2942
|
+
"aria-label": E.value
|
|
2943
|
+
}, {
|
|
2944
|
+
default: a(() => [
|
|
2945
|
+
t(e(fe), {
|
|
2946
|
+
value: "notes",
|
|
2947
|
+
label: e(T)("notes.title")
|
|
2948
|
+
}, {
|
|
2949
|
+
default: a(() => [
|
|
2950
|
+
t(e(sl), {
|
|
2951
|
+
id: c.value.id,
|
|
2952
|
+
type: "inbox_submission",
|
|
2953
|
+
title: "",
|
|
2954
|
+
can: U.value,
|
|
2955
|
+
onChange: g
|
|
2956
|
+
}, null, 8, ["id", "can"])
|
|
2957
|
+
]),
|
|
2958
|
+
_: 1
|
|
2959
|
+
}, 8, ["label"]),
|
|
2960
|
+
t(e(fe), {
|
|
2961
|
+
value: "log",
|
|
2962
|
+
label: e(l)("panel.log")
|
|
2963
|
+
}, {
|
|
2964
|
+
default: a(() => [
|
|
2965
|
+
t(e(hl), { size: "sm" }, {
|
|
2966
|
+
default: a(() => [
|
|
2967
|
+
(r(!0), j(J, null, ge(c.value.events, (x) => (r(), y(e(yl), {
|
|
2968
|
+
key: x.id
|
|
2969
|
+
}, {
|
|
2970
|
+
default: a(() => [
|
|
2971
|
+
t(e(K), {
|
|
2972
|
+
size: "sm",
|
|
2973
|
+
as: "p",
|
|
2974
|
+
class: "wx-submission__event"
|
|
2975
|
+
}, {
|
|
2976
|
+
default: a(() => [
|
|
2977
|
+
w(h(ve(x)), 1)
|
|
2978
|
+
]),
|
|
2979
|
+
_: 2
|
|
2980
|
+
}, 1024),
|
|
2981
|
+
O("p", Ct, [
|
|
2982
|
+
t(e(K), {
|
|
2983
|
+
size: "sm",
|
|
2984
|
+
tone: "muted"
|
|
2985
|
+
}, {
|
|
2986
|
+
default: a(() => [
|
|
2987
|
+
w(h(x.author?.name ?? e(l)("panel.system")), 1)
|
|
2988
|
+
]),
|
|
2989
|
+
_: 2
|
|
2990
|
+
}, 1024),
|
|
2991
|
+
t(e(Pe), {
|
|
2992
|
+
value: x.created_at
|
|
2993
|
+
}, null, 8, ["value"])
|
|
2994
|
+
])
|
|
2995
|
+
]),
|
|
2996
|
+
_: 2
|
|
2997
|
+
}, 1024))), 128))
|
|
2998
|
+
]),
|
|
2999
|
+
_: 1
|
|
3000
|
+
})
|
|
3001
|
+
]),
|
|
3002
|
+
_: 1
|
|
3003
|
+
}, 8, ["label"]),
|
|
3004
|
+
t(e(fe), {
|
|
3005
|
+
value: "details",
|
|
3006
|
+
label: e(l)("panel.details")
|
|
3007
|
+
}, {
|
|
3008
|
+
default: a(() => [
|
|
3009
|
+
O("div", zt, [
|
|
3010
|
+
t(e(Ke), {
|
|
3011
|
+
columns: 1,
|
|
3012
|
+
layout: "vertical",
|
|
3013
|
+
size: "sm"
|
|
3014
|
+
}, {
|
|
3015
|
+
default: a(() => [
|
|
3016
|
+
t(e(ze), {
|
|
3017
|
+
label: e(l)("panel.received")
|
|
3018
|
+
}, {
|
|
3019
|
+
default: a(() => [
|
|
3020
|
+
t(e(Pe), {
|
|
3021
|
+
value: c.value.created_at,
|
|
3022
|
+
tone: "default"
|
|
3023
|
+
}, null, 8, ["value"])
|
|
3024
|
+
]),
|
|
3025
|
+
_: 1
|
|
3026
|
+
}, 8, ["label"]),
|
|
3027
|
+
t(e(ze), {
|
|
3028
|
+
label: e(l)("panel.meta-source")
|
|
3029
|
+
}, {
|
|
3030
|
+
default: a(() => [
|
|
3031
|
+
t(e(Ve), {
|
|
3032
|
+
type: c.value.source === "panel" ? "info" : "default"
|
|
3033
|
+
}, {
|
|
3034
|
+
default: a(() => [
|
|
3035
|
+
w(h(c.value.source === "panel" ? e(l)("panel.source-panel") : e(l)("panel.source-web")), 1)
|
|
3036
|
+
]),
|
|
3037
|
+
_: 1
|
|
3038
|
+
}, 8, ["type"])
|
|
3039
|
+
]),
|
|
3040
|
+
_: 1
|
|
3041
|
+
}, 8, ["label"]),
|
|
3042
|
+
(r(!0), j(J, null, ge(Le.value, (x) => (r(), y(e(ze), {
|
|
3043
|
+
key: x.label,
|
|
3044
|
+
label: x.label
|
|
3045
|
+
}, {
|
|
3046
|
+
default: a(() => [
|
|
3047
|
+
x.link ? (r(), j("a", {
|
|
3048
|
+
key: 0,
|
|
3049
|
+
href: x.value,
|
|
3050
|
+
target: "_blank",
|
|
3051
|
+
rel: "noreferrer"
|
|
3052
|
+
}, h(x.value), 9, Tt)) : (r(), j("span", Ft, h(x.value), 1))
|
|
3053
|
+
]),
|
|
3054
|
+
_: 2
|
|
3055
|
+
}, 1032, ["label"]))), 128))
|
|
3056
|
+
]),
|
|
3057
|
+
_: 1
|
|
3058
|
+
}),
|
|
3059
|
+
c.value.notify_error ? (r(), y(e(Te), {
|
|
3060
|
+
key: 0,
|
|
3061
|
+
type: "warning",
|
|
3062
|
+
closable: !1
|
|
3063
|
+
}, {
|
|
3064
|
+
default: a(() => [
|
|
3065
|
+
w(h(e(l)("panel.notify-failed")), 1)
|
|
3066
|
+
]),
|
|
3067
|
+
_: 1
|
|
3068
|
+
})) : c.value.notified_at ? (r(), y(e(K), {
|
|
3069
|
+
key: 1,
|
|
3070
|
+
size: "sm",
|
|
3071
|
+
tone: "muted"
|
|
3072
|
+
}, {
|
|
3073
|
+
default: a(() => [
|
|
3074
|
+
w(h(e(l)("panel.notified")), 1)
|
|
3075
|
+
]),
|
|
3076
|
+
_: 1
|
|
3077
|
+
})) : (r(), y(e(K), {
|
|
3078
|
+
key: 2,
|
|
3079
|
+
size: "sm",
|
|
3080
|
+
tone: "muted"
|
|
3081
|
+
}, {
|
|
3082
|
+
default: a(() => [
|
|
3083
|
+
w(h(e(l)("panel.not-notified")), 1)
|
|
3084
|
+
]),
|
|
3085
|
+
_: 1
|
|
3086
|
+
}))
|
|
3087
|
+
])
|
|
3088
|
+
]),
|
|
3089
|
+
_: 1
|
|
3090
|
+
}, 8, ["label"])
|
|
3091
|
+
]),
|
|
3092
|
+
_: 1
|
|
3093
|
+
}, 8, ["aria-label"])
|
|
2934
3094
|
]),
|
|
2935
3095
|
_: 1
|
|
2936
3096
|
})
|
|
2937
3097
|
]),
|
|
2938
|
-
|
|
2939
|
-
t(e(
|
|
3098
|
+
O("aside", Wt, [
|
|
3099
|
+
t(e(te), null, {
|
|
2940
3100
|
default: a(() => [
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
t(e(
|
|
3101
|
+
O("div", qt, [
|
|
3102
|
+
O("label", At, [
|
|
3103
|
+
t(e(K), {
|
|
2944
3104
|
size: "sm",
|
|
2945
3105
|
tone: "muted"
|
|
2946
3106
|
}, {
|
|
2947
3107
|
default: a(() => [
|
|
2948
|
-
|
|
3108
|
+
w(h(e(l)("panel.status")), 1)
|
|
2949
3109
|
]),
|
|
2950
3110
|
_: 1
|
|
2951
3111
|
}),
|
|
2952
|
-
t(e(
|
|
2953
|
-
"model-value":
|
|
2954
|
-
options:
|
|
2955
|
-
disabled: !
|
|
2956
|
-
"onUpdate:modelValue":
|
|
3112
|
+
t(e(me), {
|
|
3113
|
+
"model-value": c.value.status?.id ?? null,
|
|
3114
|
+
options: _.value,
|
|
3115
|
+
disabled: !U.value,
|
|
3116
|
+
"onUpdate:modelValue": G
|
|
2957
3117
|
}, null, 8, ["model-value", "options", "disabled"])
|
|
2958
3118
|
]),
|
|
2959
|
-
|
|
2960
|
-
t(e(
|
|
3119
|
+
O("label", It, [
|
|
3120
|
+
t(e(K), {
|
|
2961
3121
|
size: "sm",
|
|
2962
3122
|
tone: "muted"
|
|
2963
3123
|
}, {
|
|
2964
3124
|
default: a(() => [
|
|
2965
|
-
|
|
3125
|
+
w(h(e(l)("panel.assignee")), 1)
|
|
2966
3126
|
]),
|
|
2967
3127
|
_: 1
|
|
2968
3128
|
}),
|
|
2969
|
-
t(e(
|
|
2970
|
-
"model-value":
|
|
2971
|
-
options:
|
|
2972
|
-
disabled: !
|
|
3129
|
+
t(e(me), {
|
|
3130
|
+
"model-value": c.value.assignee?.id ?? null,
|
|
3131
|
+
options: C.value,
|
|
3132
|
+
disabled: !U.value,
|
|
2973
3133
|
clearable: "",
|
|
2974
3134
|
placeholder: e(l)("panel.unassigned"),
|
|
2975
|
-
"onUpdate:modelValue":
|
|
3135
|
+
"onUpdate:modelValue": ce
|
|
2976
3136
|
}, null, 8, ["model-value", "options", "disabled", "placeholder"])
|
|
2977
3137
|
])
|
|
2978
3138
|
])
|
|
2979
3139
|
]),
|
|
2980
3140
|
_: 1
|
|
2981
|
-
})
|
|
2982
|
-
t(e(ee), {
|
|
2983
|
-
title: e(l)("panel.details")
|
|
2984
|
-
}, {
|
|
2985
|
-
default: a(() => [
|
|
2986
|
-
P("div", Ft, [
|
|
2987
|
-
t(e(Ge), {
|
|
2988
|
-
columns: 1,
|
|
2989
|
-
layout: "vertical",
|
|
2990
|
-
size: "sm"
|
|
2991
|
-
}, {
|
|
2992
|
-
default: a(() => [
|
|
2993
|
-
t(e(Te), {
|
|
2994
|
-
label: e(l)("panel.received")
|
|
2995
|
-
}, {
|
|
2996
|
-
default: a(() => [
|
|
2997
|
-
t(e(Pe), {
|
|
2998
|
-
value: n.value.created_at,
|
|
2999
|
-
tone: "default"
|
|
3000
|
-
}, null, 8, ["value"])
|
|
3001
|
-
]),
|
|
3002
|
-
_: 1
|
|
3003
|
-
}, 8, ["label"]),
|
|
3004
|
-
t(e(Te), {
|
|
3005
|
-
label: e(l)("panel.meta-source")
|
|
3006
|
-
}, {
|
|
3007
|
-
default: a(() => [
|
|
3008
|
-
t(e(xe), {
|
|
3009
|
-
type: n.value.source === "panel" ? "info" : "default"
|
|
3010
|
-
}, {
|
|
3011
|
-
default: a(() => [
|
|
3012
|
-
_(b(n.value.source === "panel" ? e(l)("panel.source-panel") : e(l)("panel.source-web")), 1)
|
|
3013
|
-
]),
|
|
3014
|
-
_: 1
|
|
3015
|
-
}, 8, ["type"])
|
|
3016
|
-
]),
|
|
3017
|
-
_: 1
|
|
3018
|
-
}, 8, ["label"]),
|
|
3019
|
-
(u(!0), K(X, null, ye(Le.value, (z) => (u(), h(e(Te), {
|
|
3020
|
-
key: z.label,
|
|
3021
|
-
label: z.label
|
|
3022
|
-
}, {
|
|
3023
|
-
default: a(() => [
|
|
3024
|
-
z.link ? (u(), K("a", {
|
|
3025
|
-
key: 0,
|
|
3026
|
-
href: z.value,
|
|
3027
|
-
target: "_blank",
|
|
3028
|
-
rel: "noreferrer"
|
|
3029
|
-
}, b(z.value), 9, Wt)) : (u(), K("span", qt, b(z.value), 1))
|
|
3030
|
-
]),
|
|
3031
|
-
_: 2
|
|
3032
|
-
}, 1032, ["label"]))), 128))
|
|
3033
|
-
]),
|
|
3034
|
-
_: 1
|
|
3035
|
-
}),
|
|
3036
|
-
n.value.notify_error ? (u(), h(e(Fe), {
|
|
3037
|
-
key: 0,
|
|
3038
|
-
type: "warning",
|
|
3039
|
-
closable: !1
|
|
3040
|
-
}, {
|
|
3041
|
-
default: a(() => [
|
|
3042
|
-
_(b(e(l)("panel.notify-failed")), 1)
|
|
3043
|
-
]),
|
|
3044
|
-
_: 1
|
|
3045
|
-
})) : n.value.notified_at ? (u(), h(e(Z), {
|
|
3046
|
-
key: 1,
|
|
3047
|
-
size: "sm",
|
|
3048
|
-
tone: "muted"
|
|
3049
|
-
}, {
|
|
3050
|
-
default: a(() => [
|
|
3051
|
-
_(b(e(l)("panel.notified")), 1)
|
|
3052
|
-
]),
|
|
3053
|
-
_: 1
|
|
3054
|
-
})) : (u(), h(e(Z), {
|
|
3055
|
-
key: 2,
|
|
3056
|
-
size: "sm",
|
|
3057
|
-
tone: "muted"
|
|
3058
|
-
}, {
|
|
3059
|
-
default: a(() => [
|
|
3060
|
-
_(b(e(l)("panel.not-notified")), 1)
|
|
3061
|
-
]),
|
|
3062
|
-
_: 1
|
|
3063
|
-
}))
|
|
3064
|
-
])
|
|
3065
|
-
]),
|
|
3066
|
-
_: 1
|
|
3067
|
-
}, 8, ["title"]),
|
|
3068
|
-
t(e(ee), {
|
|
3069
|
-
title: e(l)("panel.log")
|
|
3070
|
-
}, {
|
|
3071
|
-
default: a(() => [
|
|
3072
|
-
t(e(bl), { size: "sm" }, {
|
|
3073
|
-
default: a(() => [
|
|
3074
|
-
(u(!0), K(X, null, ye(n.value.events, (z) => (u(), h(e(hl), {
|
|
3075
|
-
key: z.id
|
|
3076
|
-
}, {
|
|
3077
|
-
default: a(() => [
|
|
3078
|
-
t(e(Z), {
|
|
3079
|
-
size: "sm",
|
|
3080
|
-
as: "p",
|
|
3081
|
-
class: "wx-submission__event"
|
|
3082
|
-
}, {
|
|
3083
|
-
default: a(() => [
|
|
3084
|
-
_(b(ne(z)), 1)
|
|
3085
|
-
]),
|
|
3086
|
-
_: 2
|
|
3087
|
-
}, 1024),
|
|
3088
|
-
P("p", At, [
|
|
3089
|
-
t(e(Z), {
|
|
3090
|
-
size: "sm",
|
|
3091
|
-
tone: "muted"
|
|
3092
|
-
}, {
|
|
3093
|
-
default: a(() => [
|
|
3094
|
-
_(b(z.author?.name ?? e(l)("panel.system")), 1)
|
|
3095
|
-
]),
|
|
3096
|
-
_: 2
|
|
3097
|
-
}, 1024),
|
|
3098
|
-
t(e(Pe), {
|
|
3099
|
-
value: z.created_at
|
|
3100
|
-
}, null, 8, ["value"])
|
|
3101
|
-
])
|
|
3102
|
-
]),
|
|
3103
|
-
_: 2
|
|
3104
|
-
}, 1024))), 128))
|
|
3105
|
-
]),
|
|
3106
|
-
_: 1
|
|
3107
|
-
})
|
|
3108
|
-
]),
|
|
3109
|
-
_: 1
|
|
3110
|
-
}, 8, ["title"])
|
|
3141
|
+
})
|
|
3111
3142
|
])
|
|
3112
|
-
])) :
|
|
3143
|
+
])) : P("", !0)
|
|
3113
3144
|
]));
|
|
3114
3145
|
}
|
|
3115
|
-
}),
|
|
3116
|
-
function
|
|
3117
|
-
const
|
|
3146
|
+
}), Mt = /* @__PURE__ */ se(Nt, [["__scopeId", "data-v-03ef992c"]]);
|
|
3147
|
+
function Bt(d = {}) {
|
|
3148
|
+
const u = d.path ?? "/inbox";
|
|
3118
3149
|
return {
|
|
3119
3150
|
id: "inbox",
|
|
3120
|
-
path:
|
|
3121
|
-
landing:
|
|
3151
|
+
path: u,
|
|
3152
|
+
landing: d.landing ?? !0,
|
|
3122
3153
|
routes: [
|
|
3123
3154
|
// The section's own path travels as a prop, so a panel that mounted it somewhere else
|
|
3124
3155
|
// still links between its screens correctly.
|
|
3125
|
-
{ path:
|
|
3156
|
+
{ path: u, name: "webx.inbox", component: ct, props: { base: u } },
|
|
3126
3157
|
{
|
|
3127
|
-
path: `${
|
|
3158
|
+
path: `${u}/statuses`,
|
|
3128
3159
|
name: "webx.inbox.statuses",
|
|
3129
3160
|
component: gt,
|
|
3130
|
-
props: { base:
|
|
3161
|
+
props: { base: u }
|
|
3131
3162
|
},
|
|
3132
3163
|
{
|
|
3133
|
-
path: `${
|
|
3164
|
+
path: `${u}/forms/:id(\\d+)`,
|
|
3134
3165
|
name: "webx.inbox.form",
|
|
3135
|
-
component:
|
|
3136
|
-
props: { base:
|
|
3166
|
+
component: Ql,
|
|
3167
|
+
props: { base: u }
|
|
3137
3168
|
},
|
|
3138
3169
|
// A submission has an address of its own, not a dialog over the list (§11): it goes in
|
|
3139
3170
|
// the mail to whoever deals with it, it gets pasted into a chat, an agent links to it.
|
|
3140
3171
|
{
|
|
3141
|
-
path: `${
|
|
3172
|
+
path: `${u}/submissions/:id(\\d+)`,
|
|
3142
3173
|
name: "webx.inbox.submission",
|
|
3143
|
-
component:
|
|
3144
|
-
props: { base:
|
|
3174
|
+
component: Mt,
|
|
3175
|
+
props: { base: u }
|
|
3145
3176
|
}
|
|
3146
3177
|
]
|
|
3147
3178
|
};
|
|
3148
3179
|
}
|
|
3149
3180
|
export {
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3181
|
+
xl as FIELD_TYPES,
|
|
3182
|
+
_l as STATUS_COLORS,
|
|
3183
|
+
Wl as WxInboxFieldList,
|
|
3184
|
+
Ql as WxInboxFormEditor,
|
|
3154
3185
|
ct as WxInboxPage,
|
|
3155
3186
|
gt as WxInboxStatusesPage,
|
|
3156
3187
|
ut as WxInboxSubmissionList,
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3188
|
+
Mt as WxInboxSubmissionPage,
|
|
3189
|
+
oe as createInboxApi,
|
|
3190
|
+
Bt as inbox,
|
|
3191
|
+
gl as inboxMessages,
|
|
3192
|
+
ue as option
|
|
3162
3193
|
};
|
|
3163
3194
|
//# sourceMappingURL=index.js.map
|