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