@webx-ui/module-inbox 0.9.1 → 0.11.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.
@@ -1,5 +1,5 @@
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 D, 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 Me, WxAutocomplete as lt, useModal as De, WxDialog as He, WxAlert as Ne, WxSkeleton as at, WxFormItem as L, WxTextarea as st, WxSelect as we, WxRadioGroup as nt, WxCheckboxGroup as ot, WxCheckbox as ne, 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 vt, WxSortableList as ft } from "@webx-ui/core";
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 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 = {
@@ -29,6 +29,8 @@ const At = {
29
29
  reorder: "Reorder",
30
30
  "new-form-title": "New form",
31
31
  title: "Title",
32
+ description: "Description",
33
+ "description-help": "A line under the title of the form on the site and in a dialog. Empty — nothing is shown.",
32
34
  slug: "Address",
33
35
  "slug-help": "What the form is called on the site and where it posts.",
34
36
  "is-enabled": "Active",
@@ -46,6 +48,7 @@ const At = {
46
48
  "redirect-help": "A page of the site opens in the language the form was sent in, or in the main one when it has no translation. Nowhere — the thank-you takes the form’s place.",
47
49
  recipients: "Who is written to",
48
50
  "recipients-help": "Nobody here means nobody is told. The submission is kept either way.",
51
+ "mail-route": "Letters leave through",
49
52
  "no-recipients": "Nobody yet.",
50
53
  "add-admin": "Add an administrator",
51
54
  "add-email": "Add an address",
@@ -185,6 +188,7 @@ const At = {
185
188
  "notify-recipient-queued": "waiting",
186
189
  "notify-recipient-delivered": "sent",
187
190
  "notify-recipient-failed": "failed",
191
+ "notify-recipient-trapped": "test transport",
188
192
  "event-notify-queued": "The notification was queued",
189
193
  "event-notify-failed": "The notification to :to failed",
190
194
  "event-value": "Answer “:field” corrected: “:from” → “:to”"
@@ -266,10 +270,10 @@ function he() {
266
270
  }
267
271
  }
268
272
  function Ct() {
269
- const a = Qe(bt, null), s = ie();
273
+ const a = Qe(bt, null), n = ie();
270
274
  return (c) => {
271
275
  const b = a?.state.locale;
272
- return (b === void 0 ? void 0 : c.title[b]) || pe(c.title, s.active.value, c.key);
276
+ return (b === void 0 ? void 0 : c.title[b]) || pe(c.title, n.active.value, c.key);
273
277
  };
274
278
  }
275
279
  const Nt = { class: "wx-inbox-form-field" }, Ut = {
@@ -294,19 +298,19 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
294
298
  }),
295
299
  emits: ["update:modelValue"],
296
300
  setup(a) {
297
- const s = a, c = Fe(a, "modelValue");
301
+ const n = a, c = Fe(a, "modelValue");
298
302
  he();
299
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("");
300
304
  function q(V) {
301
- const f = new Map(l.value);
302
- for (const T of V) T.slug && f.set(T.slug, T);
303
- l.value = f;
305
+ const v = new Map(l.value);
306
+ for (const T of V) T.slug && v.set(T.slug, T);
307
+ l.value = v;
304
308
  }
305
309
  async function x(V) {
306
310
  if (!(V === "" || l.value.has(V) || g.value.has(V)))
307
311
  try {
308
- const f = await B.search(V);
309
- q(f), f.some((T) => T.slug === V) || (g.value = /* @__PURE__ */ new Set([...g.value, V]));
312
+ const v = await B.search(V);
313
+ q(v), v.some((T) => T.slug === V) || (g.value = /* @__PURE__ */ new Set([...g.value, V]));
310
314
  } catch {
311
315
  }
312
316
  }
@@ -316,15 +320,15 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
316
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(
317
321
  () => S.value.filter((V) => V.slug && V.slug !== t.value).map((V) => ({
318
322
  value: V.title,
319
- description: [V.slug, V.visible ? null : w("relations.field-off")].filter((f) => typeof f == "string" && f !== "").join(" · "),
323
+ description: [V.slug, V.visible ? null : w("relations.field-off")].filter((v) => typeof v == "string" && v !== "").join(" · "),
320
324
  id: V.slug
321
325
  }))
322
326
  );
323
327
  async function y(V) {
324
328
  N.value = !0;
325
329
  try {
326
- const f = await B.search(V);
327
- S.value = f, q(f);
330
+ const v = await B.search(V);
331
+ S.value = v, q(v);
328
332
  } catch {
329
333
  S.value = [];
330
334
  } finally {
@@ -342,12 +346,12 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
342
346
  function P() {
343
347
  c.value = null;
344
348
  }
345
- const X = A(() => s.placeholder ?? w("relations.field-search"));
346
- return (V, f) => (m(), D("div", Nt, [
347
- t.value !== "" ? (m(), D("div", Ut, [
349
+ const X = A(() => n.placeholder ?? w("relations.field-search"));
350
+ return (V, v) => (m(), M("div", Nt, [
351
+ t.value !== "" ? (m(), M("div", Ut, [
348
352
  G("span", Wt, [
349
353
  G("span", Ft, I(p.value?.title ?? t.value), 1),
350
- p.value ? (m(), D("span", It, I(t.value), 1)) : W("", !0)
354
+ p.value ? (m(), M("span", It, I(t.value), 1)) : W("", !0)
351
355
  ]),
352
356
  H.value ? (m(), _(e(xe), {
353
357
  key: 0,
@@ -358,18 +362,18 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
358
362
  ]),
359
363
  _: 1
360
364
  })) : W("", !0),
361
- s.disabled ? W("", !0) : (m(), _(e(Me), {
365
+ n.disabled ? W("", !0) : (m(), _(e(De), {
362
366
  key: 1,
363
367
  type: "remove",
364
368
  size: "sm",
365
369
  title: e(w)("relations.field-remove"),
366
370
  onClick: P
367
371
  }, null, 8, ["title"]))
368
- ])) : (m(), D("p", Et, I(s.emptyText ?? e(w)("relations.field-empty")), 1)),
372
+ ])) : (m(), M("p", Et, I(n.emptyText ?? e(w)("relations.field-empty")), 1)),
369
373
  G("div", qt, [
370
374
  u(e(lt), {
371
375
  modelValue: C.value,
372
- "onUpdate:modelValue": f[0] || (f[0] = (T) => C.value = T),
376
+ "onUpdate:modelValue": v[0] || (v[0] = (T) => C.value = T),
373
377
  options: k.value,
374
378
  remote: "",
375
379
  teleport: "",
@@ -378,7 +382,7 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
378
382
  "empty-text": e(w)("relations.field-nothing"),
379
383
  placeholder: X.value,
380
384
  "aria-label": X.value,
381
- disabled: s.disabled,
385
+ disabled: n.disabled,
382
386
  onSearch: y,
383
387
  onOpen: $,
384
388
  onSelect: E
@@ -386,46 +390,46 @@ const Nt = { class: "wx-inbox-form-field" }, Ut = {
386
390
  ])
387
391
  ]));
388
392
  }
389
- }), ve = (a, s) => {
393
+ }), fe = (a, n) => {
390
394
  const c = a.__vccOpts || a;
391
- for (const [b, w] of s)
395
+ for (const [b, w] of n)
392
396
  c[b] = w;
393
397
  return c;
394
- }, Rt = /* @__PURE__ */ ve(zt, [["__scopeId", "data-v-91f60441"]]);
398
+ }, Rt = /* @__PURE__ */ fe(zt, [["__scopeId", "data-v-91f60441"]]);
395
399
  function rl(a = {}) {
396
- const s = a.path ?? "/inbox";
400
+ const n = a.path ?? "/inbox";
397
401
  return {
398
402
  id: "inbox",
399
- path: s,
403
+ path: n,
400
404
  landing: a.landing ?? !0,
401
405
  routes: [
402
406
  // The section's own path travels as a prop, so a panel that mounted it somewhere else
403
407
  // still links between its screens correctly.
404
408
  {
405
- path: s,
409
+ path: n,
406
410
  name: "webx.inbox",
407
- component: () => import("./InboxPage-DsYFI3g9.js"),
408
- props: { base: s }
411
+ component: () => import("./InboxPage-iMQ0pjrR.js"),
412
+ props: { base: n }
409
413
  },
410
414
  {
411
- path: `${s}/statuses`,
415
+ path: `${n}/statuses`,
412
416
  name: "webx.inbox.statuses",
413
- component: () => import("./StatusesPage-DIrk5z13.js"),
414
- props: { base: s }
417
+ component: () => import("./StatusesPage-arNMRLzM.js"),
418
+ props: { base: n }
415
419
  },
416
420
  {
417
- path: `${s}/forms/:id(\\d+)`,
421
+ path: `${n}/forms/:id(\\d+)`,
418
422
  name: "webx.inbox.form",
419
- component: () => import("./FormEditorPage-C3ULFulJ.js"),
420
- props: { base: s }
423
+ component: () => import("./FormEditorPage-B2Q0gTp3.js"),
424
+ props: { base: n }
421
425
  },
422
426
  // A submission has an address of its own, not a dialog over the list (§11): it goes in
423
427
  // the mail to whoever deals with it, it gets pasted into a chat, an agent links to it.
424
428
  {
425
- path: `${s}/submissions/:id(\\d+)`,
429
+ path: `${n}/submissions/:id(\\d+)`,
426
430
  name: "webx.inbox.submission",
427
- component: () => import("./SubmissionPage-BUd7Gd7d.js"),
428
- props: { base: s }
431
+ component: () => import("./SubmissionPage-BDI8xL0N.js"),
432
+ props: { base: n }
429
433
  }
430
434
  ],
431
435
  // A form of the Inbox as a field of any screen or block — the contact block's form — chosen
@@ -437,35 +441,35 @@ function rl(a = {}) {
437
441
  }
438
442
  const ye = /* @__PURE__ */ new WeakMap();
439
443
  function Te(a) {
440
- const s = `${a.apiPath}/inbox`, c = (t) => t.data, b = () => {
444
+ const n = `${a.apiPath}/inbox`, c = (t) => t.data, b = () => {
441
445
  }, w = (t) => (ye.delete(a.http), t);
442
446
  function B() {
443
447
  const t = ye.get(a.http);
444
448
  if (t !== void 0)
445
449
  return t.then((g) => [...g]);
446
- const l = a.http.get(`${s}/statuses`).then(c);
450
+ const l = a.http.get(`${n}/statuses`).then(c);
447
451
  return ye.set(a.http, l), l.catch(() => ye.delete(a.http)), l.then((g) => [...g]);
448
452
  }
449
453
  return {
450
- forms: () => a.http.get(`${s}/forms`).then(c),
451
- form: (t) => a.http.get(`${s}/forms/${t}`).then(c),
452
- createForm: (t) => a.http.post(`${s}/forms`, t).then(c),
453
- saveForm: (t, l) => a.http.put(`${s}/forms/${t}`, l).then(c),
454
- removeForm: (t) => a.http.delete(`${s}/forms/${t}`).then(b),
455
- duplicateForm: (t) => a.http.post(`${s}/forms/${t}/duplicate`, {}).then(c),
456
- sortForms: (t) => a.http.post(`${s}/forms/sorting`, { ids: t }).then(b),
457
- fields: (t) => a.http.get(`${s}/forms/${t}/fields`).then(c),
458
- createField: (t, l) => a.http.post(`${s}/forms/${t}/fields`, l).then(c),
459
- saveField: (t, l) => a.http.put(`${s}/fields/${t}`, l).then(c),
460
- removeField: (t) => a.http.delete(`${s}/fields/${t}`).then(b),
461
- sortFields: (t, l) => a.http.post(`${s}/forms/${t}/fields/sorting`, { ids: l }).then(b),
454
+ forms: () => a.http.get(`${n}/forms`).then(c),
455
+ form: (t) => a.http.get(`${n}/forms/${t}`).then(c),
456
+ createForm: (t) => a.http.post(`${n}/forms`, t).then(c),
457
+ saveForm: (t, l) => a.http.put(`${n}/forms/${t}`, l).then(c),
458
+ removeForm: (t) => a.http.delete(`${n}/forms/${t}`).then(b),
459
+ duplicateForm: (t) => a.http.post(`${n}/forms/${t}/duplicate`, {}).then(c),
460
+ sortForms: (t) => a.http.post(`${n}/forms/sorting`, { ids: t }).then(b),
461
+ fields: (t) => a.http.get(`${n}/forms/${t}/fields`).then(c),
462
+ createField: (t, l) => a.http.post(`${n}/forms/${t}/fields`, l).then(c),
463
+ saveField: (t, l) => a.http.put(`${n}/fields/${t}`, l).then(c),
464
+ removeField: (t) => a.http.delete(`${n}/fields/${t}`).then(b),
465
+ sortFields: (t, l) => a.http.post(`${n}/forms/${t}/fields/sorting`, { ids: l }).then(b),
462
466
  statuses: B,
463
- createStatus: (t) => a.http.post(`${s}/statuses`, t).then(c).then(w),
464
- saveStatus: (t, l) => a.http.put(`${s}/statuses/${t}`, l).then(c).then(w),
465
- removeStatus: (t) => a.http.delete(`${s}/statuses/${t}`).then(b).then(w),
466
- sortStatuses: (t) => a.http.post(`${s}/statuses/sorting`, { ids: t }).then(b).then(w),
467
- recipients: () => a.http.get(`${s}/recipients`).then(c),
468
- submissions: (t, l = {}) => a.http.get(`${s}/forms/${t}/submissions`, { query: Ce(l) }).then((g) => ({
467
+ createStatus: (t) => a.http.post(`${n}/statuses`, t).then(c).then(w),
468
+ saveStatus: (t, l) => a.http.put(`${n}/statuses/${t}`, l).then(c).then(w),
469
+ removeStatus: (t) => a.http.delete(`${n}/statuses/${t}`).then(b).then(w),
470
+ sortStatuses: (t) => a.http.post(`${n}/statuses/sorting`, { ids: t }).then(b).then(w),
471
+ recipients: () => a.http.get(`${n}/recipients`).then(c),
472
+ submissions: (t, l = {}) => a.http.get(`${n}/forms/${t}/submissions`, { query: Ce(l) }).then((g) => ({
469
473
  ...g.meta,
470
474
  data: g.data,
471
475
  columns: g.columns,
@@ -473,18 +477,18 @@ function Te(a) {
473
477
  // Optional on the wire: a server from before placements answers without them.
474
478
  placements: g.placements ?? []
475
479
  })),
476
- submission: (t, l = {}) => a.http.get(`${s}/submissions/${t}`, { query: Ce(l) }).then(c),
477
- createSubmission: (t, l) => a.http.post(`${s}/forms/${t}/submissions`, { fields: l }).then(c),
478
- saveSubmission: (t, l) => a.http.put(`${s}/submissions/${t}`, l).then(c),
479
- removeSubmission: (t) => a.http.delete(`${s}/submissions/${t}`).then(b),
480
- notifySubmission: (t) => a.http.post(`${s}/submissions/${t}/notify`).then(c),
481
- massSubmissions: (t) => a.http.post(`${s}/submissions/mass`, t).then(c),
480
+ submission: (t, l = {}) => a.http.get(`${n}/submissions/${t}`, { query: Ce(l) }).then(c),
481
+ createSubmission: (t, l) => a.http.post(`${n}/forms/${t}/submissions`, { fields: l }).then(c),
482
+ saveSubmission: (t, l) => a.http.put(`${n}/submissions/${t}`, l).then(c),
483
+ removeSubmission: (t) => a.http.delete(`${n}/submissions/${t}`).then(b),
484
+ notifySubmission: (t) => a.http.post(`${n}/submissions/${t}/notify`).then(c),
485
+ massSubmissions: (t) => a.http.post(`${n}/submissions/mass`, t).then(c),
482
486
  exportUrl: (t, l = {}) => {
483
487
  const g = new URLSearchParams();
484
488
  for (const [N, C] of Object.entries(Ce(l)))
485
489
  C != null && C !== "" && g.set(N, String(C));
486
490
  const S = g.toString();
487
- return `${s}/forms/${t}/submissions/export${S === "" ? "" : `?${S}`}`;
491
+ return `${n}/forms/${t}/submissions/export${S === "" ? "" : `?${S}`}`;
488
492
  }
489
493
  };
490
494
  }
@@ -499,12 +503,12 @@ function Ce(a) {
499
503
  per_page: a.per_page
500
504
  };
501
505
  }
502
- function ul(a, s, c) {
506
+ function ul(a, n, c) {
503
507
  return A({
504
- get: () => a.value[s] ?? c,
508
+ get: () => a.value[n] ?? c,
505
509
  set: (b) => {
506
510
  const w = { ...a.value };
507
- b === "" || b === null || b === void 0 ? delete w[s] : w[s] = b, a.value = w;
511
+ b === "" || b === null || b === void 0 ? delete w[n] : w[n] = b, a.value = w;
508
512
  }
509
513
  });
510
514
  }
@@ -514,36 +518,36 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
514
518
  form: {}
515
519
  },
516
520
  setup(a) {
517
- const s = a, { resolve: c, dismiss: b, open: w } = De(), B = re(), t = Te(B), l = ie();
521
+ const n = a, { resolve: c, dismiss: b, open: w } = Me(), B = re(), t = Te(B), l = ie();
518
522
  he();
519
- const g = le("webx-inbox"), S = Ve(), N = U([]), C = U(!0), q = U(!1), x = U({}), p = U({}), H = A(() => N.value.filter((f) => f.type !== "file")), k = A(() => N.value.some((f) => f.type === "file"));
520
- function y(f) {
521
- return p.value[`fields.${f.key}`]?.[0];
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((v) => v.type !== "file")), k = A(() => N.value.some((v) => v.type === "file"));
524
+ function y(v) {
525
+ return p.value[`fields.${v.key}`]?.[0];
522
526
  }
523
- function $(f) {
524
- return pe(f.title, l.active.value, f.key);
527
+ function $(v) {
528
+ return pe(v.title, l.active.value, v.key);
525
529
  }
526
- function E(f, T = "") {
530
+ function E(v, T = "") {
527
531
  return pe(
528
- f,
532
+ v,
529
533
  l.active.value,
530
534
  T
531
535
  );
532
536
  }
533
- function P(f) {
534
- return (f.options.choices ?? []).map((T) => ({
537
+ function P(v) {
538
+ return (v.options.choices ?? []).map((T) => ({
535
539
  value: T.value,
536
540
  label: E(T.label, T.value)
537
541
  }));
538
542
  }
539
543
  async function X() {
540
544
  try {
541
- const f = await t.form(s.form.id);
542
- N.value = (f.fields ?? []).filter((T) => T.is_enabled);
545
+ const v = await t.form(n.form.id);
546
+ N.value = (v.fields ?? []).filter((T) => T.is_enabled);
543
547
  for (const T of N.value)
544
548
  x.value[T.key] = T.type === "checkbox" ? [] : T.type === "consent" ? !1 : "";
545
- } catch (f) {
546
- j.danger(S(f));
549
+ } catch (v) {
550
+ j.danger(S(v));
547
551
  } finally {
548
552
  C.value = !1;
549
553
  }
@@ -552,15 +556,15 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
552
556
  async function V() {
553
557
  q.value = !0, p.value = {};
554
558
  try {
555
- c(await t.createSubmission(s.form.id, x.value));
556
- } catch (f) {
557
- const T = f.body;
558
- T?.errors ? (p.value = T.errors, j.danger(g("panel.failed"))) : j.danger(S(f));
559
+ c(await t.createSubmission(n.form.id, x.value));
560
+ } catch (v) {
561
+ const T = v.body;
562
+ T?.errors ? (p.value = T.errors, j.danger(g("panel.failed"))) : j.danger(S(v));
559
563
  } finally {
560
564
  q.value = !1;
561
565
  }
562
566
  }
563
- return (f, T) => (m(), _(e(He), {
567
+ return (v, T) => (m(), _(e(He), {
564
568
  open: e(w),
565
569
  "onUpdate:open": T[1] || (T[1] = (i) => Pe(w) ? w.value = i : null),
566
570
  title: e(g)("panel.new-submission-title"),
@@ -607,8 +611,8 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
607
611
  C.value ? (m(), _(e(at), {
608
612
  key: 0,
609
613
  rows: 4
610
- })) : (m(), D(Z, { key: 1 }, [
611
- (m(!0), D(Z, null, Oe(H.value, (i) => (m(), _(e(L), {
614
+ })) : (m(), M(Z, { key: 1 }, [
615
+ (m(!0), M(Z, null, Oe(H.value, (i) => (m(), _(e(L), {
612
616
  key: i.id,
613
617
  label: $(i),
614
618
  help: E(i.help),
@@ -616,7 +620,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
616
620
  required: i.is_required
617
621
  }, {
618
622
  default: d(() => [
619
- i.type === "textarea" ? (m(), _(e(st), {
623
+ i.type === "textarea" ? (m(), _(e(nt), {
620
624
  key: 0,
621
625
  modelValue: x.value[i.key],
622
626
  "onUpdate:modelValue": (R) => x.value[i.key] = R,
@@ -629,7 +633,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
629
633
  options: P(i),
630
634
  clearable: "",
631
635
  placeholder: E(i.placeholder)
632
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : i.type === "radio" ? (m(), _(e(nt), {
636
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : i.type === "radio" ? (m(), _(e(st), {
633
637
  key: 2,
634
638
  modelValue: x.value[i.key],
635
639
  "onUpdate:modelValue": (R) => x.value[i.key] = R,
@@ -639,7 +643,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
639
643
  modelValue: x.value[i.key],
640
644
  "onUpdate:modelValue": (R) => x.value[i.key] = R,
641
645
  options: P(i)
642
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : i.type === "consent" ? (m(), _(e(ne), {
646
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : i.type === "consent" ? (m(), _(e(se), {
643
647
  key: 4,
644
648
  modelValue: x.value[i.key],
645
649
  "onUpdate:modelValue": (R) => x.value[i.key] = R,
@@ -676,17 +680,17 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
676
680
  _: 1
677
681
  }, 8, ["open", "title"]));
678
682
  }
679
- }), Ot = /* @__PURE__ */ ve(Pt, [["__scopeId", "data-v-72006299"]]), Lt = { class: "wx-submissions__mass" }, Mt = { class: "wx-submissions__state" }, Dt = 640, Ht = /* @__PURE__ */ oe({
683
+ }), Ot = /* @__PURE__ */ fe(Pt, [["__scopeId", "data-v-72006299"]]), Lt = { class: "wx-submissions__mass" }, Dt = { class: "wx-submissions__state" }, Mt = 640, Ht = /* @__PURE__ */ oe({
680
684
  __name: "SubmissionList",
681
685
  props: {
682
686
  form: {},
683
687
  base: { default: "/inbox" }
684
688
  },
685
689
  emits: ["changed"],
686
- setup(a, { expose: s, emit: c }) {
690
+ setup(a, { expose: n, emit: c }) {
687
691
  const b = a, w = c, B = re(), t = Te(B), l = $t(), g = St(), S = ie();
688
692
  he();
689
- const N = et("root"), C = it(N), q = A(() => C.value > 0 && C.value < Dt), 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")), f = Ge(Ot), T = A({
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")), v = Ge(Ot), T = A({
690
694
  get: () => typeof l.query.view == "string" && l.query.view !== "" ? l.query.view : "all",
691
695
  set: (o) => {
692
696
  g.replace({
@@ -704,7 +708,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
704
708
  () => (y.value?.placements ?? []).map(
705
709
  (o) => o === null ? { value: "none", label: p("panel.placement-none") } : { value: o, label: o }
706
710
  )
707
- ), fe = A(
711
+ ), ve = A(
708
712
  () => R.value.length > 1 || i.value.placement !== null
709
713
  ), ue = A(() => {
710
714
  const o = i.value.placement;
@@ -744,7 +748,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
744
748
  const h = y.value?.columns?.[F];
745
749
  return h ? o.values[h.key] ?? "" : "";
746
750
  }
747
- const M = A(() => {
751
+ const D = A(() => {
748
752
  const o = y.value?.columns ?? [];
749
753
  return q.value ? [{ key: "card", label: "" }] : [
750
754
  ...o.map((F, h) => ({
@@ -784,7 +788,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
784
788
  function ae() {
785
789
  return pe(b.form.title, S.active.value, b.form.slug);
786
790
  }
787
- async function se(o) {
791
+ async function ne(o) {
788
792
  E.value = !0;
789
793
  try {
790
794
  y.value = await t.submissions(b.form.id, {
@@ -802,17 +806,17 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
802
806
  E.value = !1;
803
807
  }
804
808
  }
805
- function v(o) {
809
+ function f(o) {
806
810
  const F = {
807
811
  ...l.query,
808
812
  search: o.search === "" ? void 0 : o.search,
809
813
  sort: o.sort === null ? void 0 : `${o.sort.order === "desc" ? "-" : ""}${o.sort.key}`,
810
814
  page: o.page === 1 ? void 0 : String(o.page)
811
815
  };
812
- g.replace({ query: F }), se(o);
816
+ g.replace({ query: F }), ne(o);
813
817
  }
814
818
  ge([() => b.form.id, T, () => i.value.assignee, () => i.value.placement], () => {
815
- P.value = [], se();
819
+ P.value = [], ne();
816
820
  }), r();
817
821
  async function r() {
818
822
  try {
@@ -821,7 +825,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
821
825
  j.danger(k(o));
822
826
  }
823
827
  }
824
- function n(o) {
828
+ function s(o) {
825
829
  g.push({ path: `${b.base}/submissions/${o.id}`, query: { ...l.query } });
826
830
  }
827
831
  function O(o) {
@@ -864,14 +868,14 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
864
868
  async function Ae(o, F, h) {
865
869
  if (o.length !== 0)
866
870
  try {
867
- await t.massSubmissions({ ids: o, action: F, status_id: h }), P.value = [], await se(), w("changed");
871
+ await t.massSubmissions({ ids: o, action: F, status_id: h }), P.value = [], await ne(), w("changed");
868
872
  } catch (ce) {
869
873
  j.danger(k(ce));
870
874
  }
871
875
  }
872
876
  async function je() {
873
- const o = await f({ form: b.form });
874
- o && (j.success(p("panel.created")), await se(), w("changed"), g.push({ path: `${b.base}/submissions/${o.id}`, query: { ...l.query } }));
877
+ const o = await v({ form: b.form });
878
+ o && (j.success(p("panel.created")), await ne(), w("changed"), g.push({ path: `${b.base}/submissions/${o.id}`, query: { ...l.query } }));
875
879
  }
876
880
  const Ke = A(
877
881
  () => t.exportUrl(b.form.id, {
@@ -884,7 +888,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
884
888
  ), Ze = A(() => [
885
889
  { key: "export", label: p("panel.export"), icon: "download", href: Ke.value }
886
890
  ]);
887
- return s({ create: je }), (o, F) => (m(), D("div", {
891
+ return n({ create: je }), (o, F) => (m(), M("div", {
888
892
  ref_key: "root",
889
893
  ref: N,
890
894
  class: "wx-submissions"
@@ -907,7 +911,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
907
911
  default: d(() => [
908
912
  u(e(ut), {
909
913
  data: y.value,
910
- columns: M.value,
914
+ columns: D.value,
911
915
  "row-key": "id",
912
916
  searchable: "",
913
917
  clickable: "",
@@ -923,12 +927,12 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
923
927
  "empty-text": $e.value,
924
928
  "cards-below": x.value,
925
929
  "filters-count": ue.value.length,
926
- onRowClick: n,
927
- onStateChange: v,
930
+ onRowClick: s,
931
+ onStateChange: f,
928
932
  onSelectionChange: F[1] || (F[1] = (h, ce) => P.value = ce)
929
933
  }, Le({
930
934
  "cell-status": d(({ row: h }) => [
931
- G("div", Mt, [
935
+ G("div", Dt, [
932
936
  h.status ? (m(), _(e(xe), {
933
937
  key: 0,
934
938
  type: h.status.color
@@ -1055,7 +1059,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1055
1059
  ]),
1056
1060
  key: "0"
1057
1061
  } : void 0,
1058
- fe.value ? {
1062
+ ve.value ? {
1059
1063
  name: "filters",
1060
1064
  fn: d(() => [
1061
1065
  u(e(L), {
@@ -1089,7 +1093,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1089
1093
  }, 8, ["modelValue", "items", "aria-label"])
1090
1094
  ], 512));
1091
1095
  }
1092
- }), dl = /* @__PURE__ */ ve(Ht, [["__scopeId", "data-v-f6cb49f1"]]), Xt = /* @__PURE__ */ oe({
1096
+ }), dl = /* @__PURE__ */ fe(Ht, [["__scopeId", "data-v-f6cb49f1"]]), Xt = /* @__PURE__ */ oe({
1093
1097
  __name: "LocalizedRichText",
1094
1098
  props: /* @__PURE__ */ Ie({
1095
1099
  placeholder: { default: void 0 },
@@ -1100,21 +1104,21 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1100
1104
  }),
1101
1105
  emits: ["update:modelValue"],
1102
1106
  setup(a) {
1103
- const s = Fe(a, "modelValue"), c = a, b = ie(), w = kt(), B = _t(() => !0), t = le("webx-admin"), l = A(() => {
1107
+ const n = Fe(a, "modelValue"), c = a, b = ie(), w = kt(), B = _t(() => !0), t = le("webx-admin"), l = A(() => {
1104
1108
  const S = b.active.value;
1105
1109
  return b.list.value.some((C) => C.code === S) ? S : b.list.value[0]?.code ?? "";
1106
1110
  }), g = A({
1107
1111
  get: () => {
1108
- const S = s.value;
1112
+ const S = n.value;
1109
1113
  return typeof S == "string" ? l.value === "" || l.value === b.list.value[0]?.code ? S : "" : S[l.value] ?? "";
1110
1114
  },
1111
1115
  set: (S) => {
1112
1116
  if (l.value === "") {
1113
- s.value = S;
1117
+ n.value = S;
1114
1118
  return;
1115
1119
  }
1116
- const N = typeof s.value == "string" ? { [l.value]: s.value } : s.value;
1117
- s.value = { ...N, [l.value]: S };
1120
+ const N = typeof n.value == "string" ? { [l.value]: n.value } : n.value;
1121
+ n.value = { ...N, [l.value]: S };
1118
1122
  }
1119
1123
  });
1120
1124
  return (S, N) => e(b).list.value.length > 0 ? (m(), _(e(mt), { key: 0 }, {
@@ -1166,79 +1170,79 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1166
1170
  taken: { default: () => [] }
1167
1171
  },
1168
1172
  setup(a) {
1169
- const s = a, { resolve: c, dismiss: b, open: w } = De(), B = re(), t = Te(B);
1173
+ const n = a, { resolve: c, dismiss: b, open: w } = Me(), B = re(), t = Te(B);
1170
1174
  he();
1171
- 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), f = U(!1);
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), v = U(!1);
1172
1176
  ge(
1173
- () => s.field,
1174
- (v) => {
1175
- q.value = v?.name ?? "", x.value = v?.type ?? "text", p.value = { ...v?.title ?? {} }, H.value = { ...v?.placeholder ?? {} }, k.value = { ...v?.help ?? {} }, y.value = { ...v?.options ?? {} }, P.value = v?.is_enabled ?? !0, X.value = v?.is_required ?? !1, V.value = v?.is_fullsize ?? !0, f.value = v?.in_table ?? !1, $.value = v !== null, C.value = {};
1177
+ () => n.field,
1178
+ (f) => {
1179
+ 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 = {};
1176
1180
  },
1177
1181
  { immediate: !0 }
1178
1182
  );
1179
- function T(v) {
1180
- const r = v ?? {}, n = r[E.active.value];
1181
- if (typeof n == "string" && n.trim() !== "") return [n, E.active.value];
1183
+ function T(f) {
1184
+ const r = f ?? {}, s = r[E.active.value];
1185
+ if (typeof s == "string" && s.trim() !== "") return [s, E.active.value];
1182
1186
  const O = Object.entries(r).find(
1183
1187
  ([, Y]) => typeof Y == "string" && Y.trim() !== ""
1184
1188
  );
1185
1189
  return O === void 0 ? ["", E.active.value] : [O[1], O[0]];
1186
1190
  }
1187
- function i([v, r]) {
1188
- let n = Tt(v, "_", r).slice(0, 60).replace(/_+$/, "");
1189
- if (n === "") return "";
1190
- /^[a-z]/.test(n) || (n = `field_${n}`);
1191
- let O = n;
1192
- for (let Y = 2; s.taken.includes(O); Y++) O = `${n}_${Y}`;
1191
+ function i([f, r]) {
1192
+ let s = Tt(f, "_", r).slice(0, 60).replace(/_+$/, "");
1193
+ if (s === "") return "";
1194
+ /^[a-z]/.test(s) || (s = `field_${s}`);
1195
+ let O = s;
1196
+ for (let Y = 2; n.taken.includes(O); Y++) O = `${s}_${Y}`;
1193
1197
  return O;
1194
1198
  }
1195
1199
  ge(
1196
1200
  () => T(p.value),
1197
- (v) => {
1198
- $.value || (q.value = i(v));
1201
+ (f) => {
1202
+ $.value || (q.value = i(f));
1199
1203
  }
1200
1204
  );
1201
- function R(v) {
1202
- q.value = v, $.value = v.trim() !== "", $.value || (q.value = i(T(p.value)));
1205
+ function R(f) {
1206
+ q.value = f, $.value = f.trim() !== "", $.value || (q.value = i(T(p.value)));
1203
1207
  }
1204
- const fe = A(() => {
1205
- const v = s.field?.name ?? "", r = q.value.trim();
1206
- return v !== "" && r !== "" && r !== v ? v : null;
1208
+ const ve = A(() => {
1209
+ const f = n.field?.name ?? "", r = q.value.trim();
1210
+ return f !== "" && r !== "" && r !== f ? f : null;
1207
1211
  }), ue = A(
1208
- () => Gt.map((v) => ({ value: v, label: l(`fields.type-${v}`) }))
1212
+ () => Gt.map((f) => ({ value: f, label: l(`fields.type-${f}`) }))
1209
1213
  ), be = A(() => ["select", "radio", "checkbox"].includes(x.value)), Q = A(
1210
1214
  () => Array.isArray(y.value.choices) ? y.value.choices : []
1211
1215
  ), de = A({
1212
1216
  get: () => Array.isArray(y.value.extensions) ? y.value.extensions : [],
1213
- set: (v) => M(
1217
+ set: (f) => D(
1214
1218
  "extensions",
1215
- v.map((r) => r.replace(/^\./, ""))
1219
+ f.map((r) => r.replace(/^\./, ""))
1216
1220
  )
1217
1221
  });
1218
- function M(v, r) {
1219
- y.value = { ...y.value, [v]: r };
1222
+ function D(f, r) {
1223
+ y.value = { ...y.value, [f]: r };
1220
1224
  }
1221
1225
  function $e() {
1222
- M("choices", [...Q.value, { value: "", label: {} }]);
1226
+ D("choices", [...Q.value, { value: "", label: {} }]);
1223
1227
  }
1224
- function Se(v) {
1225
- M(
1228
+ function Se(f) {
1229
+ D(
1226
1230
  "choices",
1227
- Q.value.filter((r, n) => n !== v)
1231
+ Q.value.filter((r, s) => s !== f)
1228
1232
  );
1229
1233
  }
1230
- function J(v, r) {
1231
- M(
1234
+ function J(f, r) {
1235
+ D(
1232
1236
  "choices",
1233
- Q.value.map((n, O) => O === v ? { ...n, ...r } : n)
1237
+ Q.value.map((s, O) => O === f ? { ...s, ...r } : s)
1234
1238
  );
1235
1239
  }
1236
- function ae(v) {
1237
- return C.value[v]?.[0];
1240
+ function ae(f) {
1241
+ return C.value[f]?.[0];
1238
1242
  }
1239
- async function se() {
1243
+ async function ne() {
1240
1244
  N.value = !0, C.value = {};
1241
- const v = {
1245
+ const f = {
1242
1246
  name: q.value.trim() === "" ? null : q.value.trim(),
1243
1247
  type: x.value,
1244
1248
  title: p.value,
@@ -1248,22 +1252,22 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1248
1252
  is_enabled: P.value,
1249
1253
  is_required: X.value,
1250
1254
  is_fullsize: V.value,
1251
- in_table: f.value
1255
+ in_table: v.value
1252
1256
  };
1253
1257
  try {
1254
1258
  c(
1255
- s.field === null ? await t.createField(s.form.id, v) : await t.saveField(s.field.id, v)
1259
+ n.field === null ? await t.createField(n.form.id, f) : await t.saveField(n.field.id, f)
1256
1260
  );
1257
1261
  } catch (r) {
1258
- const n = r.body;
1259
- n?.errors ? (C.value = n.errors, j.danger(l("panel.failed"))) : j.danger(S(r));
1262
+ const s = r.body;
1263
+ s?.errors ? (C.value = s.errors, j.danger(l("panel.failed"))) : j.danger(S(r));
1260
1264
  } finally {
1261
1265
  N.value = !1;
1262
1266
  }
1263
1267
  }
1264
- return (v, r) => (m(), _(e(He), {
1268
+ return (f, r) => (m(), _(e(He), {
1265
1269
  open: e(w),
1266
- "onUpdate:open": r[21] || (r[21] = (n) => Pe(w) ? w.value = n : null),
1270
+ "onUpdate:open": r[21] || (r[21] = (s) => Pe(w) ? w.value = s : null),
1267
1271
  title: a.field ? e(l)("fields.edit-field") : e(l)("fields.new-field"),
1268
1272
  width: 720
1269
1273
  }, {
@@ -1272,7 +1276,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1272
1276
  default: d(() => [
1273
1277
  u(e(te), {
1274
1278
  variant: "outline",
1275
- onClick: r[20] || (r[20] = (n) => e(b)())
1279
+ onClick: r[20] || (r[20] = (s) => e(b)())
1276
1280
  }, {
1277
1281
  default: d(() => [
1278
1282
  z(I(e(l)("fields.cancel")), 1)
@@ -1282,7 +1286,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1282
1286
  u(e(te), {
1283
1287
  type: "primary",
1284
1288
  loading: N.value,
1285
- onClick: se
1289
+ onClick: ne
1286
1290
  }, {
1287
1291
  default: d(() => [
1288
1292
  z(I(e(l)("fields.save")), 1)
@@ -1301,7 +1305,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1301
1305
  default: d(() => [
1302
1306
  u(e(we), {
1303
1307
  modelValue: x.value,
1304
- "onUpdate:modelValue": r[0] || (r[0] = (n) => x.value = n),
1308
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => x.value = s),
1305
1309
  options: ue.value
1306
1310
  }, null, 8, ["modelValue", "options"])
1307
1311
  ]),
@@ -1315,13 +1319,13 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1315
1319
  default: d(() => [
1316
1320
  u(e(K), {
1317
1321
  modelValue: p.value,
1318
- "onUpdate:modelValue": r[1] || (r[1] = (n) => p.value = n),
1322
+ "onUpdate:modelValue": r[1] || (r[1] = (s) => p.value = s),
1319
1323
  localized: ""
1320
1324
  }, null, 8, ["modelValue"])
1321
1325
  ]),
1322
1326
  _: 1
1323
1327
  }, 8, ["label", "error"]),
1324
- x.value !== "hidden" ? (m(), D(Z, { key: 0 }, [
1328
+ x.value !== "hidden" ? (m(), M(Z, { key: 0 }, [
1325
1329
  x.value !== "consent" ? (m(), _(e(L), {
1326
1330
  key: 0,
1327
1331
  label: e(l)("fields.placeholder")
@@ -1329,7 +1333,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1329
1333
  default: d(() => [
1330
1334
  u(e(K), {
1331
1335
  modelValue: H.value,
1332
- "onUpdate:modelValue": r[2] || (r[2] = (n) => H.value = n),
1336
+ "onUpdate:modelValue": r[2] || (r[2] = (s) => H.value = s),
1333
1337
  localized: ""
1334
1338
  }, null, 8, ["modelValue"])
1335
1339
  ]),
@@ -1341,7 +1345,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1341
1345
  default: d(() => [
1342
1346
  u(e(K), {
1343
1347
  modelValue: k.value,
1344
- "onUpdate:modelValue": r[3] || (r[3] = (n) => k.value = n),
1348
+ "onUpdate:modelValue": r[3] || (r[3] = (s) => k.value = s),
1345
1349
  localized: ""
1346
1350
  }, null, 8, ["modelValue"])
1347
1351
  ]),
@@ -1357,12 +1361,12 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1357
1361
  u(Xt, {
1358
1362
  "model-value": y.value.text ?? {},
1359
1363
  "min-height": "100px",
1360
- "onUpdate:modelValue": r[4] || (r[4] = (n) => M("text", n))
1364
+ "onUpdate:modelValue": r[4] || (r[4] = (s) => D("text", s))
1361
1365
  }, null, 8, ["model-value"])
1362
1366
  ]),
1363
1367
  _: 1
1364
1368
  }, 8, ["label", "help"])) : W("", !0),
1365
- be.value ? (m(), D("div", jt, [
1369
+ be.value ? (m(), M("div", jt, [
1366
1370
  u(e(ee), {
1367
1371
  size: "sm",
1368
1372
  weight: "medium"
@@ -1382,22 +1386,22 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1382
1386
  ]),
1383
1387
  _: 1
1384
1388
  })) : W("", !0),
1385
- (m(!0), D(Z, null, Oe(Q.value, (n, O) => (m(), D("div", {
1389
+ (m(!0), M(Z, null, Oe(Q.value, (s, O) => (m(), M("div", {
1386
1390
  key: O,
1387
1391
  class: "wx-inbox-choices__row"
1388
1392
  }, [
1389
1393
  u(e(K), {
1390
- "model-value": n.value,
1394
+ "model-value": s.value,
1391
1395
  placeholder: e(l)("fields.choice-value"),
1392
1396
  "onUpdate:modelValue": (Y) => J(O, { value: String(Y) })
1393
1397
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
1394
1398
  u(e(K), {
1395
- "model-value": n.label,
1399
+ "model-value": s.label,
1396
1400
  localized: "",
1397
1401
  placeholder: e(l)("fields.choice-label"),
1398
1402
  "onUpdate:modelValue": (Y) => J(O, { label: Y })
1399
1403
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
1400
- u(e(Me), tt({
1404
+ u(e(De), tt({
1401
1405
  icon: "trash",
1402
1406
  tone: "danger",
1403
1407
  title: e(l)("fields.delete")
@@ -1439,7 +1443,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1439
1443
  "model-value": y.value.rows ?? 5,
1440
1444
  min: 2,
1441
1445
  max: 30,
1442
- "onUpdate:modelValue": r[5] || (r[5] = (n) => M("rows", n))
1446
+ "onUpdate:modelValue": r[5] || (r[5] = (s) => D("rows", s))
1443
1447
  }, null, 8, ["model-value"])
1444
1448
  ]),
1445
1449
  _: 1
@@ -1453,7 +1457,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1453
1457
  "model-value": y.value.maxlength ?? null,
1454
1458
  min: 1,
1455
1459
  max: 2e4,
1456
- "onUpdate:modelValue": r[6] || (r[6] = (n) => M("maxlength", n))
1460
+ "onUpdate:modelValue": r[6] || (r[6] = (s) => D("maxlength", s))
1457
1461
  }, null, 8, ["model-value"])
1458
1462
  ]),
1459
1463
  _: 1
@@ -1466,12 +1470,12 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1466
1470
  default: d(() => [
1467
1471
  u(e(K), {
1468
1472
  "model-value": y.value.pattern ?? "",
1469
- "onUpdate:modelValue": r[7] || (r[7] = (n) => M("pattern", n))
1473
+ "onUpdate:modelValue": r[7] || (r[7] = (s) => D("pattern", s))
1470
1474
  }, null, 8, ["model-value"])
1471
1475
  ]),
1472
1476
  _: 1
1473
1477
  }, 8, ["label", "help"])) : W("", !0),
1474
- x.value === "date" ? (m(), D(Z, { key: 3 }, [
1478
+ x.value === "date" ? (m(), M(Z, { key: 3 }, [
1475
1479
  u(e(L), {
1476
1480
  label: e(l)("fields.earliest")
1477
1481
  }, {
@@ -1479,7 +1483,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1479
1483
  u(e(Ue), {
1480
1484
  clearable: "",
1481
1485
  "model-value": y.value.min ?? null,
1482
- "onUpdate:modelValue": r[8] || (r[8] = (n) => M("min", n))
1486
+ "onUpdate:modelValue": r[8] || (r[8] = (s) => D("min", s))
1483
1487
  }, null, 8, ["model-value"])
1484
1488
  ]),
1485
1489
  _: 1
@@ -1491,13 +1495,13 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1491
1495
  u(e(Ue), {
1492
1496
  clearable: "",
1493
1497
  "model-value": y.value.max ?? null,
1494
- "onUpdate:modelValue": r[9] || (r[9] = (n) => M("max", n))
1498
+ "onUpdate:modelValue": r[9] || (r[9] = (s) => D("max", s))
1495
1499
  }, null, 8, ["model-value"])
1496
1500
  ]),
1497
1501
  _: 1
1498
1502
  }, 8, ["label"])
1499
1503
  ], 64)) : W("", !0),
1500
- x.value === "checkbox" ? (m(), D(Z, { key: 4 }, [
1504
+ x.value === "checkbox" ? (m(), M(Z, { key: 4 }, [
1501
1505
  u(e(L), {
1502
1506
  label: e(l)("fields.min-choices")
1503
1507
  }, {
@@ -1505,7 +1509,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1505
1509
  u(e(me), {
1506
1510
  "model-value": y.value.min ?? null,
1507
1511
  min: 0,
1508
- "onUpdate:modelValue": r[10] || (r[10] = (n) => M("min", n))
1512
+ "onUpdate:modelValue": r[10] || (r[10] = (s) => D("min", s))
1509
1513
  }, null, 8, ["model-value"])
1510
1514
  ]),
1511
1515
  _: 1
@@ -1517,7 +1521,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1517
1521
  u(e(me), {
1518
1522
  "model-value": y.value.max ?? null,
1519
1523
  min: 0,
1520
- "onUpdate:modelValue": r[11] || (r[11] = (n) => M("max", n))
1524
+ "onUpdate:modelValue": r[11] || (r[11] = (s) => D("max", s))
1521
1525
  }, null, 8, ["model-value"])
1522
1526
  ]),
1523
1527
  _: 1
@@ -1531,13 +1535,13 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1531
1535
  u(e(me), {
1532
1536
  "model-value": y.value.max_size ?? null,
1533
1537
  min: 1,
1534
- "onUpdate:modelValue": r[12] || (r[12] = (n) => M("max_size", n))
1538
+ "onUpdate:modelValue": r[12] || (r[12] = (s) => D("max_size", s))
1535
1539
  }, null, 8, ["model-value"])
1536
1540
  ]),
1537
1541
  _: 1
1538
1542
  }, 8, ["label"])) : W("", !0)
1539
1543
  ]),
1540
- x.value === "file" ? (m(), D(Z, { key: 3 }, [
1544
+ x.value === "file" ? (m(), M(Z, { key: 3 }, [
1541
1545
  u(e(L), {
1542
1546
  label: e(l)("fields.extensions"),
1543
1547
  help: e(l)("fields.extensions-help")
@@ -1545,37 +1549,37 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1545
1549
  default: d(() => [
1546
1550
  u(e(pt), {
1547
1551
  modelValue: de.value,
1548
- "onUpdate:modelValue": r[13] || (r[13] = (n) => de.value = n)
1552
+ "onUpdate:modelValue": r[13] || (r[13] = (s) => de.value = s)
1549
1553
  }, null, 8, ["modelValue"])
1550
1554
  ]),
1551
1555
  _: 1
1552
1556
  }, 8, ["label", "help"]),
1553
- u(e(ne), {
1557
+ u(e(se), {
1554
1558
  "model-value": !!y.value.multiple,
1555
1559
  label: e(l)("fields.multiple"),
1556
- "onUpdate:modelValue": r[14] || (r[14] = (n) => M("multiple", n))
1560
+ "onUpdate:modelValue": r[14] || (r[14] = (s) => D("multiple", s))
1557
1561
  }, null, 8, ["model-value", "label"])
1558
1562
  ], 64)) : W("", !0),
1559
1563
  G("div", Zt, [
1560
- u(e(ne), {
1564
+ u(e(se), {
1561
1565
  modelValue: P.value,
1562
- "onUpdate:modelValue": r[15] || (r[15] = (n) => P.value = n),
1566
+ "onUpdate:modelValue": r[15] || (r[15] = (s) => P.value = s),
1563
1567
  label: e(l)("fields.is-enabled")
1564
1568
  }, null, 8, ["modelValue", "label"]),
1565
- u(e(ne), {
1569
+ u(e(se), {
1566
1570
  modelValue: X.value,
1567
- "onUpdate:modelValue": r[16] || (r[16] = (n) => X.value = n),
1571
+ "onUpdate:modelValue": r[16] || (r[16] = (s) => X.value = s),
1568
1572
  label: e(l)("fields.is-required")
1569
1573
  }, null, 8, ["modelValue", "label"]),
1570
- x.value !== "hidden" ? (m(), _(e(ne), {
1574
+ x.value !== "hidden" ? (m(), _(e(se), {
1571
1575
  key: 0,
1572
1576
  modelValue: V.value,
1573
- "onUpdate:modelValue": r[17] || (r[17] = (n) => V.value = n),
1577
+ "onUpdate:modelValue": r[17] || (r[17] = (s) => V.value = s),
1574
1578
  label: e(l)("fields.is-fullsize")
1575
1579
  }, null, 8, ["modelValue", "label"])) : W("", !0),
1576
- u(e(ne), {
1577
- modelValue: f.value,
1578
- "onUpdate:modelValue": r[18] || (r[18] = (n) => f.value = n),
1580
+ u(e(se), {
1581
+ modelValue: v.value,
1582
+ "onUpdate:modelValue": r[18] || (r[18] = (s) => v.value = s),
1579
1583
  label: e(l)("fields.in-table")
1580
1584
  }, null, 8, ["modelValue", "label"])
1581
1585
  ]),
@@ -1599,16 +1603,16 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1599
1603
  u(e(K), {
1600
1604
  "model-value": q.value,
1601
1605
  placeholder: "phone",
1602
- "onUpdate:modelValue": r[19] || (r[19] = (n) => R(String(n ?? "")))
1606
+ "onUpdate:modelValue": r[19] || (r[19] = (s) => R(String(s ?? "")))
1603
1607
  }, null, 8, ["model-value"])
1604
1608
  ]),
1605
1609
  _: 1
1606
1610
  }, 8, ["label", "help", "error"]),
1607
- fe.value ? (m(), _(e(Ne), {
1611
+ ve.value ? (m(), _(e(Ne), {
1608
1612
  key: 0,
1609
1613
  type: "warning",
1610
1614
  variant: "soft",
1611
- description: e(l)("fields.name-renamed", { old: fe.value, new: q.value.trim() })
1615
+ description: e(l)("fields.name-renamed", { old: ve.value, new: q.value.trim() })
1612
1616
  }, null, 8, ["description"])) : W("", !0)
1613
1617
  ])
1614
1618
  ])
@@ -1616,7 +1620,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1616
1620
  _: 1
1617
1621
  }, 8, ["open", "title"]));
1618
1622
  }
1619
- }), el = /* @__PURE__ */ ve(Jt, [["__scopeId", "data-v-8b202bc1"]]), tl = { class: "wx-inbox-field" }, ll = { class: "wx-inbox-field__name" }, al = /* @__PURE__ */ oe({
1623
+ }), el = /* @__PURE__ */ fe(Jt, [["__scopeId", "data-v-8b202bc1"]]), tl = { class: "wx-inbox-field" }, ll = { class: "wx-inbox-field__name" }, al = /* @__PURE__ */ oe({
1620
1624
  __name: "FieldList",
1621
1625
  props: /* @__PURE__ */ Ie({
1622
1626
  form: {},
@@ -1627,7 +1631,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1627
1631
  }),
1628
1632
  emits: ["update:modelValue"],
1629
1633
  setup(a) {
1630
- const s = a, c = Fe(a, "modelValue"), b = re(), w = Te(b), B = ie();
1634
+ const n = a, c = Fe(a, "modelValue"), b = re(), w = Te(b), B = ie();
1631
1635
  he();
1632
1636
  const t = le("webx-inbox"), l = Ve(), g = Ge(el);
1633
1637
  function S(k) {
@@ -1643,7 +1647,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1643
1647
  }
1644
1648
  const C = A(() => c.value.length === 0);
1645
1649
  async function q(k) {
1646
- const y = c.value.filter((E) => E.id !== k?.id).map((E) => E.key), $ = await g({ field: k, form: s.form, taken: y });
1650
+ const y = c.value.filter((E) => E.id !== k?.id).map((E) => E.key), $ = await g({ field: k, form: n.form, taken: y });
1647
1651
  $ && (c.value = k === null ? [...c.value, $] : c.value.map((E) => E.id === $.id ? $ : E));
1648
1652
  }
1649
1653
  async function x(k) {
@@ -1661,7 +1665,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1661
1665
  }
1662
1666
  }
1663
1667
  function p(k) {
1664
- return s.canManage ? [
1668
+ return n.canManage ? [
1665
1669
  { key: "edit", icon: "edit", label: t("fields.edit"), run: () => {
1666
1670
  q(k);
1667
1671
  } },
@@ -1679,7 +1683,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1679
1683
  async function H() {
1680
1684
  try {
1681
1685
  await w.sortFields(
1682
- s.form.id,
1686
+ n.form.id,
1683
1687
  c.value.map((k) => k.id)
1684
1688
  );
1685
1689
  } catch (k) {
@@ -1690,11 +1694,11 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1690
1694
  title: e(t)("panel.tab-fields")
1691
1695
  }, Le({
1692
1696
  default: d(() => [
1693
- C.value ? (m(), _(e(vt), {
1697
+ C.value ? (m(), _(e(ft), {
1694
1698
  key: 0,
1695
1699
  title: e(t)("fields.no-fields"),
1696
1700
  description: e(t)("fields.no-fields-help")
1697
- }, null, 8, ["title", "description"])) : (m(), _(e(ft), {
1701
+ }, null, 8, ["title", "description"])) : (m(), _(e(vt), {
1698
1702
  key: 1,
1699
1703
  modelValue: c.value,
1700
1704
  "onUpdate:modelValue": y[1] || (y[1] = ($) => c.value = $),
@@ -1734,7 +1738,7 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1734
1738
  truncate: ""
1735
1739
  }, {
1736
1740
  default: d(() => [
1737
- $.name ? (m(), D(Z, { key: 0 }, [
1741
+ $.name ? (m(), M(Z, { key: 0 }, [
1738
1742
  G("code", null, I($.name), 1),
1739
1743
  y[2] || (y[2] = z(" · ", -1))
1740
1744
  ], 64)) : W("", !0),
@@ -1776,12 +1780,12 @@ const Bt = { class: "wx-inbox-by-hand" }, Pt = /* @__PURE__ */ oe({
1776
1780
  } : void 0
1777
1781
  ]), 1032, ["title"]));
1778
1782
  }
1779
- }), ml = /* @__PURE__ */ ve(al, [["__scopeId", "data-v-5d9f662e"]]), pl = _e(() => import("./InboxPage-DsYFI3g9.js")), hl = _e(() => import("./FormEditorPage-C3ULFulJ.js")), vl = _e(() => import("./StatusesPage-DIrk5z13.js")), fl = _e(() => import("./SubmissionPage-BUd7Gd7d.js"));
1783
+ }), ml = /* @__PURE__ */ fe(al, [["__scopeId", "data-v-5d9f662e"]]), pl = _e(() => import("./InboxPage-iMQ0pjrR.js")), hl = _e(() => import("./FormEditorPage-B2Q0gTp3.js")), fl = _e(() => import("./StatusesPage-arNMRLzM.js")), vl = _e(() => import("./SubmissionPage-BDI8xL0N.js"));
1780
1784
  export {
1781
1785
  ml as F,
1782
1786
  dl as S,
1783
1787
  hl as W,
1784
- ve as _,
1788
+ fe as _,
1785
1789
  Xt as a,
1786
1790
  cl as b,
1787
1791
  Te as c,
@@ -1789,11 +1793,11 @@ export {
1789
1793
  Gt as e,
1790
1794
  Rt as f,
1791
1795
  pl as g,
1792
- vl as h,
1793
- fl as i,
1796
+ fl as h,
1797
+ vl as i,
1794
1798
  rl as j,
1795
1799
  At as k,
1796
1800
  ul as o,
1797
1801
  he as u
1798
1802
  };
1799
- //# sourceMappingURL=index-CZWksX_k.js.map
1803
+ //# sourceMappingURL=index-gLN73Ici.js.map