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