@webx-ui/module-inbox 0.11.3 → 0.11.5
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/{FormEditorPage-DhlICloH.js → FormEditorPage-DC5AjYv6.js} +2 -2
- package/dist/{FormEditorPage-DhlICloH.js.map → FormEditorPage-DC5AjYv6.js.map} +1 -1
- package/dist/{InboxPage-GX_vLaDG.js → InboxPage-D20_MKcX.js} +2 -2
- package/dist/{InboxPage-GX_vLaDG.js.map → InboxPage-D20_MKcX.js.map} +1 -1
- package/dist/{StatusesPage-BOjY4W1p.js → StatusesPage-hBgS8sYt.js} +2 -2
- package/dist/{StatusesPage-BOjY4W1p.js.map → StatusesPage-hBgS8sYt.js.map} +1 -1
- package/dist/{SubmissionPage-DKU21Oox.js → SubmissionPage-3Fhny2qD.js} +2 -2
- package/dist/{SubmissionPage-DKU21Oox.js.map → SubmissionPage-3Fhny2qD.js.map} +1 -1
- package/dist/{index-BpBqmOqV.js → index-C_zPRhNm.js} +87 -83
- package/dist/index-C_zPRhNm.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/index-BpBqmOqV.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject as Qe, defineComponent as oe, useModel as Fe, computed as A, ref as U, watch as ge, openBlock as m, createElementBlock as M, createElementVNode as G, toDisplayString as I, createCommentVNode as W, createBlock as _, unref as e, withCtx as d, createTextVNode as z, createVNode as u, mergeModels as Ie, nextTick as Je, isRef as Pe, Fragment as Z, renderList as Oe, useTemplateRef as et, createSlots as Le, mergeProps as tt, defineAsyncComponent as _e } from "vue";
|
|
2
|
-
import { useLocales as ie, localizedValue as pe, WxBadge as xe, WxAction as De, WxAutocomplete as lt, useModal as Me, WxDialog as He, WxAlert as Ne, WxSkeleton as at, WxFormItem as L, WxTextarea as nt, WxSelect as we, WxRadioGroup as st, WxCheckboxGroup as ot, WxCheckbox as se, WxDatePicker as Ue, WxInput as K, WxSpace as Xe, WxButton as te, toast as j, useElementWidth as it, createModal as Ge, WxTabs as rt, WxTable as ut, WxEntityCard as dt, WxAvatar as qe, WxIcon as ke, WxTooltip as ct, WxText as ee, confirm as Ye, WxLocales as mt, WxRichText as ze, WxInputNumber as me, WxTagsInput as pt, WxCard as ht, WxEmpty as
|
|
2
|
+
import { useLocales as ie, localizedValue as pe, WxBadge as xe, WxAction as De, WxAutocomplete as lt, useModal as Me, WxDialog as He, WxAlert as Ne, WxSkeleton as at, WxFormItem as L, WxTextarea as nt, WxSelect as we, WxRadioGroup as st, WxCheckboxGroup as ot, WxCheckbox as se, WxDatePicker as Ue, WxInput as K, WxSpace as Xe, WxButton as te, toast as j, useElementWidth as it, createModal as Ge, WxTabs as rt, WxTable as ut, WxEntityCard as dt, WxAvatar as qe, WxIcon as ke, WxTooltip as ct, WxText as ee, confirm as Ye, WxLocales as mt, WxRichText as ze, WxInputNumber as me, WxTagsInput as pt, WxCard as ht, WxEmpty as ft, WxSortableList as vt } from "@webx-ui/core";
|
|
3
3
|
import { useAdmin as re, i18nKey as bt, useTranslate as le, createRelationsApi as yt, useErrorText as Ve, rowMenuWidth as gt, WxScreenHead as xt, WxRowMenu as We, WxDate as Re, WxFilterChips as wt, useRichTextLabels as kt, useShortcodesWhen as _t, useRemoveConfirm as Vt, slugify as Tt } from "@webx-ui/module-admin";
|
|
4
4
|
import { useRoute as $t, useRouter as St } from "vue-router";
|
|
5
5
|
const At = {
|
|
@@ -302,15 +302,15 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
|
|
|
302
302
|
he();
|
|
303
303
|
const b = re(), w = le("webx-inbox"), B = yt(b, "inbox-form"), t = A(() => typeof c.value == "string" ? c.value.trim() : ""), l = U(/* @__PURE__ */ new Map()), g = U(/* @__PURE__ */ new Set()), S = U([]), N = U(!1), C = U("");
|
|
304
304
|
function q(V) {
|
|
305
|
-
const
|
|
306
|
-
for (const T of V) T.slug &&
|
|
307
|
-
l.value =
|
|
305
|
+
const v = new Map(l.value);
|
|
306
|
+
for (const T of V) T.slug && v.set(T.slug, T);
|
|
307
|
+
l.value = v;
|
|
308
308
|
}
|
|
309
309
|
async function x(V) {
|
|
310
310
|
if (!(V === "" || l.value.has(V) || g.value.has(V)))
|
|
311
311
|
try {
|
|
312
|
-
const
|
|
313
|
-
q(
|
|
312
|
+
const v = await B.search(V);
|
|
313
|
+
q(v), v.some((T) => T.slug === V) || (g.value = /* @__PURE__ */ new Set([...g.value, V]));
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
@@ -320,15 +320,15 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
|
|
|
320
320
|
const p = A(() => t.value === "" ? null : l.value.get(t.value) ?? null), H = A(() => t.value === "" ? null : p.value === null ? g.value.has(t.value) ? w("relations.field-missing") : null : p.value.visible ? null : w("relations.field-off")), k = A(
|
|
321
321
|
() => S.value.filter((V) => V.slug && V.slug !== t.value).map((V) => ({
|
|
322
322
|
value: V.title,
|
|
323
|
-
description: [V.slug, V.visible ? null : w("relations.field-off")].filter((
|
|
323
|
+
description: [V.slug, V.visible ? null : w("relations.field-off")].filter((v) => typeof v == "string" && v !== "").join(" · "),
|
|
324
324
|
id: V.slug
|
|
325
325
|
}))
|
|
326
326
|
);
|
|
327
327
|
async function y(V) {
|
|
328
328
|
N.value = !0;
|
|
329
329
|
try {
|
|
330
|
-
const
|
|
331
|
-
S.value =
|
|
330
|
+
const v = await B.search(V);
|
|
331
|
+
S.value = v, q(v);
|
|
332
332
|
} catch {
|
|
333
333
|
S.value = [];
|
|
334
334
|
} finally {
|
|
@@ -347,7 +347,7 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
|
|
|
347
347
|
c.value = null;
|
|
348
348
|
}
|
|
349
349
|
const X = A(() => n.placeholder ?? w("relations.field-search"));
|
|
350
|
-
return (V,
|
|
350
|
+
return (V, v) => (m(), M("div", Nt, [
|
|
351
351
|
t.value !== "" ? (m(), M("div", Ut, [
|
|
352
352
|
G("span", Wt, [
|
|
353
353
|
G("span", Ft, I(p.value?.title ?? t.value), 1),
|
|
@@ -373,7 +373,7 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
|
|
|
373
373
|
G("div", qt, [
|
|
374
374
|
u(e(lt), {
|
|
375
375
|
modelValue: C.value,
|
|
376
|
-
"onUpdate:modelValue":
|
|
376
|
+
"onUpdate:modelValue": v[0] || (v[0] = (T) => C.value = T),
|
|
377
377
|
options: k.value,
|
|
378
378
|
remote: "",
|
|
379
379
|
teleport: "",
|
|
@@ -390,12 +390,12 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
|
|
|
390
390
|
])
|
|
391
391
|
]));
|
|
392
392
|
}
|
|
393
|
-
}),
|
|
393
|
+
}), fe = (a, n) => {
|
|
394
394
|
const c = a.__vccOpts || a;
|
|
395
395
|
for (const [b, w] of n)
|
|
396
396
|
c[b] = w;
|
|
397
397
|
return c;
|
|
398
|
-
}, Rt = /* @__PURE__ */
|
|
398
|
+
}, Rt = /* @__PURE__ */ fe(zt, [["__scopeId", "data-v-91f60441"]]);
|
|
399
399
|
function rl(a = {}) {
|
|
400
400
|
const n = a.path ?? "/inbox";
|
|
401
401
|
return {
|
|
@@ -408,19 +408,22 @@ function rl(a = {}) {
|
|
|
408
408
|
{
|
|
409
409
|
path: n,
|
|
410
410
|
name: "webx.inbox",
|
|
411
|
-
|
|
411
|
+
meta: { help: "inbox.index" },
|
|
412
|
+
component: () => import("./InboxPage-D20_MKcX.js"),
|
|
412
413
|
props: { base: n }
|
|
413
414
|
},
|
|
414
415
|
{
|
|
415
416
|
path: `${n}/statuses`,
|
|
416
417
|
name: "webx.inbox.statuses",
|
|
417
|
-
|
|
418
|
+
meta: { help: "inbox.statuses" },
|
|
419
|
+
component: () => import("./StatusesPage-hBgS8sYt.js"),
|
|
418
420
|
props: { base: n }
|
|
419
421
|
},
|
|
420
422
|
{
|
|
421
423
|
path: `${n}/forms/:id(\\d+)`,
|
|
422
424
|
name: "webx.inbox.form",
|
|
423
|
-
|
|
425
|
+
meta: { help: "inbox.form" },
|
|
426
|
+
component: () => import("./FormEditorPage-DC5AjYv6.js"),
|
|
424
427
|
props: { base: n }
|
|
425
428
|
},
|
|
426
429
|
// A submission has an address of its own, not a dialog over the list (§11): it goes in
|
|
@@ -428,7 +431,8 @@ function rl(a = {}) {
|
|
|
428
431
|
{
|
|
429
432
|
path: `${n}/submissions/:id(\\d+)`,
|
|
430
433
|
name: "webx.inbox.submission",
|
|
431
|
-
|
|
434
|
+
meta: { help: "inbox.submission" },
|
|
435
|
+
component: () => import("./SubmissionPage-3Fhny2qD.js"),
|
|
432
436
|
props: { base: n }
|
|
433
437
|
}
|
|
434
438
|
],
|
|
@@ -520,34 +524,34 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
520
524
|
setup(a) {
|
|
521
525
|
const n = a, { resolve: c, dismiss: b, open: w } = Me(), B = re(), t = Te(B), l = ie();
|
|
522
526
|
he();
|
|
523
|
-
const g = le("webx-inbox"), S = Ve(), N = U([]), C = U(!0), q = U(!1), x = U({}), p = U({}), H = A(() => N.value.filter((
|
|
524
|
-
function y(
|
|
525
|
-
return p.value[`fields.${
|
|
527
|
+
const g = le("webx-inbox"), S = Ve(), N = U([]), C = U(!0), q = U(!1), x = U({}), p = U({}), H = A(() => N.value.filter((v) => v.type !== "file")), k = A(() => N.value.some((v) => v.type === "file"));
|
|
528
|
+
function y(v) {
|
|
529
|
+
return p.value[`fields.${v.key}`]?.[0];
|
|
526
530
|
}
|
|
527
|
-
function $(
|
|
528
|
-
return pe(
|
|
531
|
+
function $(v) {
|
|
532
|
+
return pe(v.title, l.active.value, v.key);
|
|
529
533
|
}
|
|
530
|
-
function E(
|
|
534
|
+
function E(v, T = "") {
|
|
531
535
|
return pe(
|
|
532
|
-
|
|
536
|
+
v,
|
|
533
537
|
l.active.value,
|
|
534
538
|
T
|
|
535
539
|
);
|
|
536
540
|
}
|
|
537
|
-
function P(
|
|
538
|
-
return (
|
|
541
|
+
function P(v) {
|
|
542
|
+
return (v.options.choices ?? []).map((T) => ({
|
|
539
543
|
value: T.value,
|
|
540
544
|
label: E(T.label, T.value)
|
|
541
545
|
}));
|
|
542
546
|
}
|
|
543
547
|
async function X() {
|
|
544
548
|
try {
|
|
545
|
-
const
|
|
546
|
-
N.value = (
|
|
549
|
+
const v = await t.form(n.form.id);
|
|
550
|
+
N.value = (v.fields ?? []).filter((T) => T.is_enabled);
|
|
547
551
|
for (const T of N.value)
|
|
548
552
|
x.value[T.key] = T.type === "checkbox" ? [] : T.type === "consent" ? !1 : "";
|
|
549
|
-
} catch (
|
|
550
|
-
j.danger(S(
|
|
553
|
+
} catch (v) {
|
|
554
|
+
j.danger(S(v));
|
|
551
555
|
} finally {
|
|
552
556
|
C.value = !1;
|
|
553
557
|
}
|
|
@@ -557,14 +561,14 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
557
561
|
q.value = !0, p.value = {};
|
|
558
562
|
try {
|
|
559
563
|
c(await t.createSubmission(n.form.id, x.value));
|
|
560
|
-
} catch (
|
|
561
|
-
const T =
|
|
562
|
-
T?.errors ? (p.value = T.errors, j.danger(g("panel.failed"))) : j.danger(S(
|
|
564
|
+
} catch (v) {
|
|
565
|
+
const T = v.body;
|
|
566
|
+
T?.errors ? (p.value = T.errors, j.danger(g("panel.failed"))) : j.danger(S(v));
|
|
563
567
|
} finally {
|
|
564
568
|
q.value = !1;
|
|
565
569
|
}
|
|
566
570
|
}
|
|
567
|
-
return (
|
|
571
|
+
return (v, T) => (m(), _(e(He), {
|
|
568
572
|
open: e(w),
|
|
569
573
|
"onUpdate:open": T[1] || (T[1] = (i) => Pe(w) ? w.value = i : null),
|
|
570
574
|
title: e(g)("panel.new-submission-title"),
|
|
@@ -680,7 +684,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
680
684
|
_: 1
|
|
681
685
|
}, 8, ["open", "title"]));
|
|
682
686
|
}
|
|
683
|
-
}), Ot = /* @__PURE__ */
|
|
687
|
+
}), Ot = /* @__PURE__ */ fe(Pt, [["__scopeId", "data-v-72006299"]]), Lt = { class: "wx-submissions__mass" }, Dt = { class: "wx-submissions__state" }, Mt = 640, Ht = /* @__PURE__ */ oe({
|
|
684
688
|
__name: "SubmissionList",
|
|
685
689
|
props: {
|
|
686
690
|
form: {},
|
|
@@ -690,7 +694,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
690
694
|
setup(a, { expose: n, emit: c }) {
|
|
691
695
|
const b = a, w = c, B = re(), t = Te(B), l = $t(), g = St(), S = ie();
|
|
692
696
|
he();
|
|
693
|
-
const N = et("root"), C = it(N), q = A(() => C.value > 0 && C.value < Mt), x = A(() => q.value ? Number.POSITIVE_INFINITY : 0), p = le("webx-inbox"), H = le("webx-admin"), k = Ve(), y = U(null), $ = U([]), E = U(!1), P = U([]), X = U(!1), V = A(() => B.can("inbox.update")),
|
|
697
|
+
const N = et("root"), C = it(N), q = A(() => C.value > 0 && C.value < Mt), x = A(() => q.value ? Number.POSITIVE_INFINITY : 0), p = le("webx-inbox"), H = le("webx-admin"), k = Ve(), y = U(null), $ = U([]), E = U(!1), P = U([]), X = U(!1), V = A(() => B.can("inbox.update")), v = Ge(Ot), T = A({
|
|
694
698
|
get: () => typeof l.query.view == "string" && l.query.view !== "" ? l.query.view : "all",
|
|
695
699
|
set: (o) => {
|
|
696
700
|
g.replace({
|
|
@@ -708,7 +712,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
708
712
|
() => (y.value?.placements ?? []).map(
|
|
709
713
|
(o) => o === null ? { value: "none", label: p("panel.placement-none") } : { value: o, label: o }
|
|
710
714
|
)
|
|
711
|
-
),
|
|
715
|
+
), ve = A(
|
|
712
716
|
() => R.value.length > 1 || i.value.placement !== null
|
|
713
717
|
), ue = A(() => {
|
|
714
718
|
const o = i.value.placement;
|
|
@@ -806,7 +810,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
806
810
|
E.value = !1;
|
|
807
811
|
}
|
|
808
812
|
}
|
|
809
|
-
function
|
|
813
|
+
function f(o) {
|
|
810
814
|
const F = {
|
|
811
815
|
...l.query,
|
|
812
816
|
search: o.search === "" ? void 0 : o.search,
|
|
@@ -874,7 +878,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
874
878
|
}
|
|
875
879
|
}
|
|
876
880
|
async function je() {
|
|
877
|
-
const o = await
|
|
881
|
+
const o = await v({ form: b.form });
|
|
878
882
|
o && (j.success(p("panel.created")), await ne(), w("changed"), g.push({ path: `${b.base}/submissions/${o.id}`, query: { ...l.query } }));
|
|
879
883
|
}
|
|
880
884
|
const Ke = A(
|
|
@@ -928,7 +932,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
928
932
|
"cards-below": x.value,
|
|
929
933
|
"filters-count": ue.value.length,
|
|
930
934
|
onRowClick: s,
|
|
931
|
-
onStateChange:
|
|
935
|
+
onStateChange: f,
|
|
932
936
|
onSelectionChange: F[1] || (F[1] = (h, ce) => P.value = ce)
|
|
933
937
|
}, Le({
|
|
934
938
|
"cell-status": d(({ row: h }) => [
|
|
@@ -1059,7 +1063,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1059
1063
|
]),
|
|
1060
1064
|
key: "0"
|
|
1061
1065
|
} : void 0,
|
|
1062
|
-
|
|
1066
|
+
ve.value ? {
|
|
1063
1067
|
name: "filters",
|
|
1064
1068
|
fn: d(() => [
|
|
1065
1069
|
u(e(L), {
|
|
@@ -1093,7 +1097,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1093
1097
|
}, 8, ["modelValue", "items", "aria-label"])
|
|
1094
1098
|
], 512));
|
|
1095
1099
|
}
|
|
1096
|
-
}), dl = /* @__PURE__ */
|
|
1100
|
+
}), dl = /* @__PURE__ */ fe(Ht, [["__scopeId", "data-v-c743b9e7"]]), Xt = /* @__PURE__ */ oe({
|
|
1097
1101
|
__name: "LocalizedRichText",
|
|
1098
1102
|
props: /* @__PURE__ */ Ie({
|
|
1099
1103
|
placeholder: { default: void 0 },
|
|
@@ -1172,24 +1176,24 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1172
1176
|
setup(a) {
|
|
1173
1177
|
const n = a, { resolve: c, dismiss: b, open: w } = Me(), B = re(), t = Te(B);
|
|
1174
1178
|
he();
|
|
1175
|
-
const l = le("webx-inbox"), g = Vt(), S = Ve(), N = U(!1), C = U({}), q = U(""), x = U("text"), p = U({}), H = U({}), k = U({}), y = U({}), $ = U(!1), E = ie(), P = U(!0), X = U(!1), V = U(!0),
|
|
1179
|
+
const l = le("webx-inbox"), g = Vt(), S = Ve(), N = U(!1), C = U({}), q = U(""), x = U("text"), p = U({}), H = U({}), k = U({}), y = U({}), $ = U(!1), E = ie(), P = U(!0), X = U(!1), V = U(!0), v = U(!1);
|
|
1176
1180
|
ge(
|
|
1177
1181
|
() => n.field,
|
|
1178
|
-
(
|
|
1179
|
-
q.value =
|
|
1182
|
+
(f) => {
|
|
1183
|
+
q.value = f?.name ?? "", x.value = f?.type ?? "text", p.value = { ...f?.title ?? {} }, H.value = { ...f?.placeholder ?? {} }, k.value = { ...f?.help ?? {} }, y.value = { ...f?.options ?? {} }, P.value = f?.is_enabled ?? !0, X.value = f?.is_required ?? !1, V.value = f?.is_fullsize ?? !0, v.value = f?.in_table ?? !1, $.value = f !== null, C.value = {};
|
|
1180
1184
|
},
|
|
1181
1185
|
{ immediate: !0 }
|
|
1182
1186
|
);
|
|
1183
|
-
function T(
|
|
1184
|
-
const r =
|
|
1187
|
+
function T(f) {
|
|
1188
|
+
const r = f ?? {}, s = r[E.active.value];
|
|
1185
1189
|
if (typeof s == "string" && s.trim() !== "") return [s, E.active.value];
|
|
1186
1190
|
const O = Object.entries(r).find(
|
|
1187
1191
|
([, Y]) => typeof Y == "string" && Y.trim() !== ""
|
|
1188
1192
|
);
|
|
1189
1193
|
return O === void 0 ? ["", E.active.value] : [O[1], O[0]];
|
|
1190
1194
|
}
|
|
1191
|
-
function i([
|
|
1192
|
-
let s = Tt(
|
|
1195
|
+
function i([f, r]) {
|
|
1196
|
+
let s = Tt(f, "_", r).slice(0, 60).replace(/_+$/, "");
|
|
1193
1197
|
if (s === "") return "";
|
|
1194
1198
|
/^[a-z]/.test(s) || (s = `field_${s}`);
|
|
1195
1199
|
let O = s;
|
|
@@ -1198,51 +1202,51 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1198
1202
|
}
|
|
1199
1203
|
ge(
|
|
1200
1204
|
() => T(p.value),
|
|
1201
|
-
(
|
|
1202
|
-
$.value || (q.value = i(
|
|
1205
|
+
(f) => {
|
|
1206
|
+
$.value || (q.value = i(f));
|
|
1203
1207
|
}
|
|
1204
1208
|
);
|
|
1205
|
-
function R(
|
|
1206
|
-
q.value =
|
|
1209
|
+
function R(f) {
|
|
1210
|
+
q.value = f, $.value = f.trim() !== "", $.value || (q.value = i(T(p.value)));
|
|
1207
1211
|
}
|
|
1208
|
-
const
|
|
1209
|
-
const
|
|
1210
|
-
return
|
|
1212
|
+
const ve = A(() => {
|
|
1213
|
+
const f = n.field?.name ?? "", r = q.value.trim();
|
|
1214
|
+
return f !== "" && r !== "" && r !== f ? f : null;
|
|
1211
1215
|
}), ue = A(
|
|
1212
|
-
() => Gt.map((
|
|
1216
|
+
() => Gt.map((f) => ({ value: f, label: l(`fields.type-${f}`) }))
|
|
1213
1217
|
), be = A(() => ["select", "radio", "checkbox"].includes(x.value)), Q = A(
|
|
1214
1218
|
() => Array.isArray(y.value.choices) ? y.value.choices : []
|
|
1215
1219
|
), de = A({
|
|
1216
1220
|
get: () => Array.isArray(y.value.extensions) ? y.value.extensions : [],
|
|
1217
|
-
set: (
|
|
1221
|
+
set: (f) => D(
|
|
1218
1222
|
"extensions",
|
|
1219
|
-
|
|
1223
|
+
f.map((r) => r.replace(/^\./, ""))
|
|
1220
1224
|
)
|
|
1221
1225
|
});
|
|
1222
|
-
function D(
|
|
1223
|
-
y.value = { ...y.value, [
|
|
1226
|
+
function D(f, r) {
|
|
1227
|
+
y.value = { ...y.value, [f]: r };
|
|
1224
1228
|
}
|
|
1225
1229
|
function $e() {
|
|
1226
1230
|
D("choices", [...Q.value, { value: "", label: {} }]);
|
|
1227
1231
|
}
|
|
1228
|
-
function Se(
|
|
1232
|
+
function Se(f) {
|
|
1229
1233
|
D(
|
|
1230
1234
|
"choices",
|
|
1231
|
-
Q.value.filter((r, s) => s !==
|
|
1235
|
+
Q.value.filter((r, s) => s !== f)
|
|
1232
1236
|
);
|
|
1233
1237
|
}
|
|
1234
|
-
function J(
|
|
1238
|
+
function J(f, r) {
|
|
1235
1239
|
D(
|
|
1236
1240
|
"choices",
|
|
1237
|
-
Q.value.map((s, O) => O ===
|
|
1241
|
+
Q.value.map((s, O) => O === f ? { ...s, ...r } : s)
|
|
1238
1242
|
);
|
|
1239
1243
|
}
|
|
1240
|
-
function ae(
|
|
1241
|
-
return C.value[
|
|
1244
|
+
function ae(f) {
|
|
1245
|
+
return C.value[f]?.[0];
|
|
1242
1246
|
}
|
|
1243
1247
|
async function ne() {
|
|
1244
1248
|
N.value = !0, C.value = {};
|
|
1245
|
-
const
|
|
1249
|
+
const f = {
|
|
1246
1250
|
name: q.value.trim() === "" ? null : q.value.trim(),
|
|
1247
1251
|
type: x.value,
|
|
1248
1252
|
title: p.value,
|
|
@@ -1252,11 +1256,11 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1252
1256
|
is_enabled: P.value,
|
|
1253
1257
|
is_required: X.value,
|
|
1254
1258
|
is_fullsize: V.value,
|
|
1255
|
-
in_table:
|
|
1259
|
+
in_table: v.value
|
|
1256
1260
|
};
|
|
1257
1261
|
try {
|
|
1258
1262
|
c(
|
|
1259
|
-
n.field === null ? await t.createField(n.form.id,
|
|
1263
|
+
n.field === null ? await t.createField(n.form.id, f) : await t.saveField(n.field.id, f)
|
|
1260
1264
|
);
|
|
1261
1265
|
} catch (r) {
|
|
1262
1266
|
const s = r.body;
|
|
@@ -1265,7 +1269,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1265
1269
|
N.value = !1;
|
|
1266
1270
|
}
|
|
1267
1271
|
}
|
|
1268
|
-
return (
|
|
1272
|
+
return (f, r) => (m(), _(e(He), {
|
|
1269
1273
|
open: e(w),
|
|
1270
1274
|
"onUpdate:open": r[21] || (r[21] = (s) => Pe(w) ? w.value = s : null),
|
|
1271
1275
|
title: a.field ? e(l)("fields.edit-field") : e(l)("fields.new-field"),
|
|
@@ -1578,8 +1582,8 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1578
1582
|
label: e(l)("fields.is-fullsize")
|
|
1579
1583
|
}, null, 8, ["modelValue", "label"])) : W("", !0),
|
|
1580
1584
|
u(e(se), {
|
|
1581
|
-
modelValue:
|
|
1582
|
-
"onUpdate:modelValue": r[18] || (r[18] = (s) =>
|
|
1585
|
+
modelValue: v.value,
|
|
1586
|
+
"onUpdate:modelValue": r[18] || (r[18] = (s) => v.value = s),
|
|
1583
1587
|
label: e(l)("fields.in-table")
|
|
1584
1588
|
}, null, 8, ["modelValue", "label"])
|
|
1585
1589
|
]),
|
|
@@ -1608,11 +1612,11 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1608
1612
|
]),
|
|
1609
1613
|
_: 1
|
|
1610
1614
|
}, 8, ["label", "help", "error"]),
|
|
1611
|
-
|
|
1615
|
+
ve.value ? (m(), _(e(Ne), {
|
|
1612
1616
|
key: 0,
|
|
1613
1617
|
type: "warning",
|
|
1614
1618
|
variant: "soft",
|
|
1615
|
-
description: e(l)("fields.name-renamed", { old:
|
|
1619
|
+
description: e(l)("fields.name-renamed", { old: ve.value, new: q.value.trim() })
|
|
1616
1620
|
}, null, 8, ["description"])) : W("", !0)
|
|
1617
1621
|
])
|
|
1618
1622
|
])
|
|
@@ -1620,7 +1624,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1620
1624
|
_: 1
|
|
1621
1625
|
}, 8, ["open", "title"]));
|
|
1622
1626
|
}
|
|
1623
|
-
}), el = /* @__PURE__ */
|
|
1627
|
+
}), el = /* @__PURE__ */ fe(Jt, [["__scopeId", "data-v-8b202bc1"]]), tl = { class: "wx-inbox-field" }, ll = { class: "wx-inbox-field__name" }, al = /* @__PURE__ */ oe({
|
|
1624
1628
|
__name: "FieldList",
|
|
1625
1629
|
props: /* @__PURE__ */ Ie({
|
|
1626
1630
|
form: {},
|
|
@@ -1694,11 +1698,11 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1694
1698
|
title: e(t)("panel.tab-fields")
|
|
1695
1699
|
}, Le({
|
|
1696
1700
|
default: d(() => [
|
|
1697
|
-
C.value ? (m(), _(e(
|
|
1701
|
+
C.value ? (m(), _(e(ft), {
|
|
1698
1702
|
key: 0,
|
|
1699
1703
|
title: e(t)("fields.no-fields"),
|
|
1700
1704
|
description: e(t)("fields.no-fields-help")
|
|
1701
|
-
}, null, 8, ["title", "description"])) : (m(), _(e(
|
|
1705
|
+
}, null, 8, ["title", "description"])) : (m(), _(e(vt), {
|
|
1702
1706
|
key: 1,
|
|
1703
1707
|
modelValue: c.value,
|
|
1704
1708
|
"onUpdate:modelValue": y[1] || (y[1] = ($) => c.value = $),
|
|
@@ -1780,12 +1784,12 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
|
|
|
1780
1784
|
} : void 0
|
|
1781
1785
|
]), 1032, ["title"]));
|
|
1782
1786
|
}
|
|
1783
|
-
}), ml = /* @__PURE__ */
|
|
1787
|
+
}), ml = /* @__PURE__ */ fe(al, [["__scopeId", "data-v-5d9f662e"]]), pl = _e(() => import("./InboxPage-D20_MKcX.js")), hl = _e(() => import("./FormEditorPage-DC5AjYv6.js")), fl = _e(() => import("./StatusesPage-hBgS8sYt.js")), vl = _e(() => import("./SubmissionPage-3Fhny2qD.js"));
|
|
1784
1788
|
export {
|
|
1785
1789
|
ml as F,
|
|
1786
1790
|
dl as S,
|
|
1787
1791
|
hl as W,
|
|
1788
|
-
|
|
1792
|
+
fe as _,
|
|
1789
1793
|
Xt as a,
|
|
1790
1794
|
cl as b,
|
|
1791
1795
|
Te as c,
|
|
@@ -1793,11 +1797,11 @@ export {
|
|
|
1793
1797
|
Gt as e,
|
|
1794
1798
|
Rt as f,
|
|
1795
1799
|
pl as g,
|
|
1796
|
-
|
|
1797
|
-
|
|
1800
|
+
fl as h,
|
|
1801
|
+
vl as i,
|
|
1798
1802
|
rl as j,
|
|
1799
1803
|
At as k,
|
|
1800
1804
|
ul as o,
|
|
1801
1805
|
he as u
|
|
1802
1806
|
};
|
|
1803
|
-
//# sourceMappingURL=index-
|
|
1807
|
+
//# sourceMappingURL=index-C_zPRhNm.js.map
|