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