@ditojs/admin 3.2.5 → 3.2.6

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.
@@ -2729,8 +2729,8 @@ var Ta = /*#__PURE__*/ X({
2729
2729
  r && (r.style.width = getComputedStyle(n).width);
2730
2730
  let i = n.getBoundingClientRect(), a = i.left + window.scrollX, o = i.top + window.scrollY, s = i.width, c = i.height, l = t.offsetWidth, u = t.offsetHeight, [d, f] = this.popupPlacement.split("-") || [];
2731
2731
  if (this.keepInView) {
2732
- let e = window.innerWidth, t = window.innerHeight;
2733
- d === "top" ? o < u && (d = "bottom") : d === "bottom" ? t - o - c < u && (d = "top") : d === "left" ? a < l && (d = "right") : d === "right" && e - a - s < l && (d = "left"), f === "top" ? t - o < u && (f = "bottom") : f === "bottom" ? o + c < u && (f = "top") : f === "left" ? e - a < l && (f = "right") : f === "right" && a + s < l && (f = "left");
2732
+ let e = window.innerWidth, t = window.innerHeight, n = o, r = t - o - c, i = a, p = e - a - s, m = (e, t, n) => e < n && t > e;
2733
+ d === "top" ? m(n, r, u) && (d = "bottom") : d === "bottom" ? m(r, n, u) && (d = "top") : d === "left" ? m(i, p, l) && (d = "right") : d === "right" && m(p, i, l) && (d = "left"), f === "top" ? m(t - o, o + c, u) && (f = "bottom") : f === "bottom" ? m(o + c, t - o, u) && (f = "top") : f === "left" ? m(e - a, a + s, l) && (f = "right") : f === "right" && m(a + s, e - a, l) && (f = "left");
2734
2734
  }
2735
2735
  let p = 0, m = 0;
2736
2736
  switch (d) {
@@ -4602,7 +4602,7 @@ function Lo(e, t, n, r, i, a) {
4602
4602
  options: e.focusTrapOptions
4603
4603
  }, {
4604
4604
  default: k(() => [u("form", {
4605
- class: "dito-scroll-parent",
4605
+ class: "dito-dialog__form dito-scroll-parent",
4606
4606
  onSubmit: t[0] ||= j((...t) => e.submit && e.submit(...t), ["prevent"]),
4607
4607
  onKeydown: t[1] ||= me((...t) => e.onEnter && e.onEnter(...t), ["enter"])
4608
4608
  }, [A(u("button", null, null, 512), [[O, !1]]), f(s, {
@@ -7206,11 +7206,12 @@ var tc = /*#__PURE__*/ X(Y.component("DitoPanels", {
7206
7206
  class: "dito-buttons"
7207
7207
  }, rc = {
7208
7208
  key: 0,
7209
- class: "dito-container"
7209
+ class: "dito-container dito-buttons__container"
7210
7210
  };
7211
7211
  function ic(e, n, r, i, a, o) {
7212
7212
  let u = T("DitoContainer"), d = T("DitoVnode");
7213
7213
  return e.buttonSchemas || e.hasSlotContent(e.$slots.default) ? (S(), l("div", nc, [(S(!0), l(t, null, C(e.buttonSchemas, (n, r) => (S(), l(t, null, [e.shouldRenderSchema(n) ? (S(), s(u, {
7214
+ class: "dito-buttons__container",
7214
7215
  key: r,
7215
7216
  schema: n,
7216
7217
  dataPath: r,
@@ -7707,6 +7708,9 @@ var xc = Y.component("DitoRouterView", bc), Sc = {
7707
7708
  };
7708
7709
  },
7709
7710
  computed: {
7711
+ isInsideForm() {
7712
+ return !this.isForm && !!this.formComponent;
7713
+ },
7710
7714
  resourceComponent() {
7711
7715
  return this;
7712
7716
  },
@@ -7809,7 +7813,8 @@ var xc = Y.component("DitoRouterView", bc), Sc = {
7809
7813
  if (e) {
7810
7814
  if (t) {
7811
7815
  let { data: e } = t;
7812
- if (e?.type === "FilterValidation" && this.onFilterErrors?.(e.errors) || this.isUnauthorizedError(t)) return !0;
7816
+ if (e?.type === "FilterValidation" && this.onFilterErrors?.(e.errors)) return !0;
7817
+ if (this.isUnauthorizedError(t) && this.isInsideForm) return this.addUnauthorizedError(), !0;
7813
7818
  }
7814
7819
  } else this.isForm && this.isDirty || this.setData(t.data), this.emitSchemaEvent("load");
7815
7820
  });
@@ -7820,6 +7825,10 @@ var xc = Y.component("DitoRouterView", bc), Sc = {
7820
7825
  isUnauthorizedError(e) {
7821
7826
  return e?.status === 401;
7822
7827
  },
7828
+ addUnauthorizedError() {
7829
+ let e = "You don't have permission to load this data.";
7830
+ this.errors?.includes(e) || this.addError(e);
7831
+ },
7823
7832
  async handleRequest({ method: e, resource: t = this.getResource({ method: e }), query: n, data: r }, i) {
7824
7833
  let a = {
7825
7834
  updateRoot: !0,
@@ -8111,7 +8120,7 @@ var Dc = /*#__PURE__*/ X(Y.component("DitoForm", {
8111
8120
  flush: "post",
8112
8121
  handler(e, t) {
8113
8122
  let n = this.meta?.param;
8114
- n && this.providesData && t.matched[0].path === e.matched[0].path && t.params[n] !== "create" && e.params[n] !== t.params[n] && this.loadData(!0);
8123
+ n && this.providesData && t.params[n] !== "create" && e.params[n] !== t.params[n] && this.loadData(!0);
8115
8124
  }
8116
8125
  },
8117
8126
  sourceItem: {
@@ -8518,7 +8527,8 @@ function Qc(e, n, r, i, a, o) {
8518
8527
  active: t.active,
8519
8528
  draggable: e.childrenDraggable,
8520
8529
  label: e.getItemLabel(e.childrenSchema, t.data, { index: n }),
8521
- level: e.level + 1
8530
+ level: e.level + 1,
8531
+ onDelete: (t) => e.deleteChild(n)
8522
8532
  }, null, 8, [
8523
8533
  "schema",
8524
8534
  "dataPath",
@@ -8528,7 +8538,8 @@ function Qc(e, n, r, i, a, o) {
8528
8538
  "active",
8529
8539
  "draggable",
8530
8540
  "label",
8531
- "level"
8541
+ "level",
8542
+ "onDelete"
8532
8543
  ]))), 128))]),
8533
8544
  _: 1
8534
8545
  }, 8, [
@@ -8540,7 +8551,7 @@ function Qc(e, n, r, i, a, o) {
8540
8551
  }
8541
8552
  var $c = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
8542
8553
  mixins: [As, Hc],
8543
- emits: ["update:data"],
8554
+ emits: ["update:data", "delete"],
8544
8555
  inject: ["container"],
8545
8556
  props: {
8546
8557
  schema: {
@@ -8693,7 +8704,31 @@ var $c = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
8693
8704
  onEdit() {
8694
8705
  this.editPath(this.path);
8695
8706
  },
8696
- onDelete() {},
8707
+ onDelete() {
8708
+ this.$emit("delete");
8709
+ },
8710
+ deleteChild(e) {
8711
+ let { childrenSchema: t, container: n } = this, r = this.childrenList[e], i = this.getItemLabel(t, r, {
8712
+ index: e,
8713
+ extended: !0
8714
+ });
8715
+ window.confirm(`Do you really want to ${this.verbs.delete} ${i}?`) && (this.isEditingChildFrom(e) && this.$router.push({
8716
+ path: n.path,
8717
+ query: this.$route.query
8718
+ }), this.childrenList = this.childrenList.toSpliced(e, 1), this.onChange(), this.notify({
8719
+ type: "info",
8720
+ title: "Successfully Removed",
8721
+ text: [`${i} was ${this.verbs.deleted}.`, n.transientNote]
8722
+ }));
8723
+ },
8724
+ isEditingChildFrom(e) {
8725
+ let t = this.childrenSchema.path;
8726
+ if (!t) return !1;
8727
+ let n = `${this.path}/${t}/`, { editPath: r } = this.container;
8728
+ if (!r.startsWith(n)) return !1;
8729
+ let [i] = r.slice(n.length).split("/");
8730
+ return Number(i) >= e;
8731
+ },
8697
8732
  onChange() {
8698
8733
  this.container.onChange();
8699
8734
  },
@@ -9264,7 +9299,7 @@ var Pl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
9264
9299
  set(e) {
9265
9300
  let t = (e) => {
9266
9301
  if (!this.relate) return e;
9267
- let t = this.getOptionForValue(e);
9302
+ let t = this.getOptionForValue(e) ?? this.getRelatedObject(e);
9268
9303
  return this.shouldSetTemporaryId(t) && rn(t, "id"), t;
9269
9304
  };
9270
9305
  this.value = this.multiple && F(e) ? e.map(t) : t(e);
@@ -9406,6 +9441,9 @@ var Pl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
9406
9441
  }, { optionValue: n, groupBy: r } = this;
9407
9442
  return n ? t(this.activeOptions, e, r) ?? (this.areOptionsFiltered ? t(this.options, e, r) : void 0) : e;
9408
9443
  },
9444
+ getRelatedObject(e) {
9445
+ return M(this.value).find((t) => this.getValueForOption(t) === e);
9446
+ },
9409
9447
  getValueForOption(e) {
9410
9448
  if (this.shouldSetTemporaryId(e)) return ae(e);
9411
9449
  let { optionValue: t } = this;
@@ -9497,7 +9535,7 @@ var Wl = /*#__PURE__*/ X(Q.register("code", {
9497
9535
  default: !1
9498
9536
  }),
9499
9537
  style() {
9500
- return { height: this.height || `calc(${this.lines}em * var(--line-height))` };
9538
+ return this.height ? { height: this.height } : { "--lines": this.lines };
9501
9539
  }
9502
9540
  },
9503
9541
  mounted() {
@@ -12112,8 +12150,8 @@ var kd = Q.register("markup", {
12112
12150
  0
12113
12151
  ];
12114
12152
  }
12115
- }), Md = /*#__PURE__*/ X(kd, [["render", Od]]), Nd = { class: "dito-multiselect" }, Pd = { class: "dito-multiselect__inner" };
12116
- function Fd(e, t, n, r, i, a) {
12153
+ }), Md = /*#__PURE__*/ X(kd, [["render", Od]]), Nd = { class: "dito-multiselect" }, Pd = { class: "dito-multiselect__inner" }, Fd = ["title"], Id = ["onKeydown", "onMousedown"];
12154
+ function Ld(e, t, n, r, i, a) {
12117
12155
  let o = T("DitoAffixes"), d = T("VueMultiselect"), p = T("DitoEditButtons");
12118
12156
  return S(), l("div", Nd, [u("div", Pd, [
12119
12157
  f(o, {
@@ -12132,7 +12170,7 @@ function Fd(e, t, n, r, i, a) {
12132
12170
  id: e.componentPath,
12133
12171
  ref: "element",
12134
12172
  modelValue: e.selectedOptions,
12135
- "onUpdate:modelValue": t[0] ||= (t) => e.selectedOptions = t,
12173
+ "onUpdate:modelValue": t[1] ||= (t) => e.selectedOptions = t,
12136
12174
  "aria-label": e.label,
12137
12175
  class: e.multiselectClasses,
12138
12176
  showLabels: !1,
@@ -12156,7 +12194,19 @@ function Fd(e, t, n, r, i, a) {
12156
12194
  onClose: e.onClose,
12157
12195
  onTag: e.onAddTag,
12158
12196
  onSearchChange: e.onSearchChange
12159
- }), null, 16, [
12197
+ }), {
12198
+ tag: k(({ option: n, remove: r }) => [u("span", {
12199
+ class: b(["multiselect__tag dito-multiselect__tag", { "dito-multiselect__tag--unavailable": e.isUnavailableOption(n) }]),
12200
+ title: e.isUnavailableOption(n) ? "Not among the options" : null,
12201
+ onMousedown: t[0] ||= j(() => {}, ["prevent"])
12202
+ }, [u("span", null, D(e.getLabelForOption(n)), 1), u("i", {
12203
+ class: "multiselect__tag-icon",
12204
+ tabindex: "1",
12205
+ onKeydown: me(j((e) => r(n), ["prevent"]), ["enter"]),
12206
+ onMousedown: j((e) => r(n), ["prevent"])
12207
+ }, null, 40, Id)], 42, Fd)]),
12208
+ _: 1
12209
+ }, 16, [
12160
12210
  "id",
12161
12211
  "modelValue",
12162
12212
  "aria-label",
@@ -12218,7 +12268,7 @@ function Fd(e, t, n, r, i, a) {
12218
12268
  "editPath"
12219
12269
  ])) : c("", !0)]);
12220
12270
  }
12221
- var Id = /*#__PURE__*/ X(Q.register("multiselect", {
12271
+ var Rd = /*#__PURE__*/ X(Q.register("multiselect", {
12222
12272
  mixins: [Fl],
12223
12273
  components: {
12224
12274
  DitoAffixes: Z,
@@ -12235,7 +12285,10 @@ var Id = /*#__PURE__*/ X(Q.register("multiselect", {
12235
12285
  computed: {
12236
12286
  selectedOptions: {
12237
12287
  get() {
12238
- return this.multiple ? (this.selectedValue || []).map((e) => this.getOptionForValue(e) || this.addTagOption(e)).filter(Boolean) : this.selectedOption;
12288
+ return this.multiple ? this.hasOptions && F(this.value) ? this.value.map((e) => {
12289
+ let t = this.relate ? this.getValueForOption(e) : e;
12290
+ return this.getOptionForValue(t) || this.addTagOption(t) || this.getFallbackOption(e);
12291
+ }) : [] : this.selectedOption;
12239
12292
  },
12240
12293
  set(e) {
12241
12294
  this.selectedValue = this.multiple ? (e || []).map((e) => this.getValueForOption(e)) : this.getValueForOption(e), this.onChange();
@@ -12289,6 +12342,16 @@ var Id = /*#__PURE__*/ X(Q.register("multiselect", {
12289
12342
  return this.options.push(r), r;
12290
12343
  }
12291
12344
  },
12345
+ isUnavailableOption(e) {
12346
+ return this.optionValue ? !this.getOptionForValue(this.getValueForOption(e)) : !this.options.includes(e);
12347
+ },
12348
+ getFallbackOption(e) {
12349
+ let { optionValue: t, optionLabel: n } = this;
12350
+ return L(e) || !R(t) ? e : {
12351
+ [t]: e,
12352
+ ...R(n) && { [n]: `${e}` }
12353
+ };
12354
+ },
12292
12355
  focusElement() {
12293
12356
  this.$refs.element.activate();
12294
12357
  },
@@ -12327,7 +12390,7 @@ var Id = /*#__PURE__*/ X(Q.register("multiselect", {
12327
12390
  }
12328
12391
  }
12329
12392
  }
12330
- }), [["render", Fd]]), Ld = {
12393
+ }), [["render", Ld]]), zd = {
12331
12394
  getTypeValidations(e, t) {
12332
12395
  let n = e.type === "integer", r = (n) => _r(n, {
12333
12396
  type: Number,
@@ -12393,7 +12456,7 @@ var Id = /*#__PURE__*/ X(Q.register("multiselect", {
12393
12456
  };
12394
12457
  //#endregion
12395
12458
  //#region src/types/DitoTypeNumber.vue?vue&type=template&lang.js
12396
- function Rd(e, t, n, r, i, a) {
12459
+ function Bd(e, t, n, r, i, a) {
12397
12460
  let o = T("DitoAffixes"), c = T("DitoInput");
12398
12461
  return S(), s(c, y({
12399
12462
  class: "dito-number",
@@ -12444,8 +12507,8 @@ function Rd(e, t, n, r, i, a) {
12444
12507
  "step"
12445
12508
  ]);
12446
12509
  }
12447
- var zd = /*#__PURE__*/ X(Q.register(["number", "integer"], {
12448
- mixins: [Ld],
12510
+ var Vd = /*#__PURE__*/ X(Q.register(["number", "integer"], {
12511
+ mixins: [zd],
12449
12512
  components: {
12450
12513
  DitoInput: Oa,
12451
12514
  DitoAffixes: Z
@@ -12455,17 +12518,17 @@ var zd = /*#__PURE__*/ X(Q.register(["number", "integer"], {
12455
12518
  computed: { isInteger() {
12456
12519
  return this.type === "integer";
12457
12520
  } }
12458
- }), [["render", Rd]]), Bd = ["id"], Vd = {
12521
+ }), [["render", Bd]]), Hd = ["id"], Ud = {
12459
12522
  key: 0,
12460
12523
  class: "dito-object-content"
12461
- }, Hd = ["innerHTML"], Ud = ["innerHTML"];
12462
- function Wd(e, t, n, r, i, a) {
12524
+ }, Wd = ["innerHTML"], Gd = ["innerHTML"];
12525
+ function Kd(e, t, n, r, i, a) {
12463
12526
  let o = T("DitoSchemaInlined"), u = T("DitoEditButtons");
12464
12527
  return e.isReady ? (S(), l("div", {
12465
12528
  key: 0,
12466
12529
  class: "dito-object",
12467
12530
  id: e.componentPath
12468
- }, [e.objectData ? (S(), l("div", Vd, [e.isInlined ? (S(), s(o, {
12531
+ }, [e.objectData ? (S(), l("div", Ud, [e.isInlined ? (S(), s(o, {
12469
12532
  key: 0,
12470
12533
  label: e.objectLabel,
12471
12534
  schema: e.getItemFormSchema(e.schema, e.objectData, e.context),
@@ -12499,10 +12562,10 @@ function Wd(e, t, n, r, i, a) {
12499
12562
  }, null, 8, ["dataPath", "data"])) : e.render ? (S(), l("span", {
12500
12563
  key: 2,
12501
12564
  innerHTML: e.render(e.getContext())
12502
- }, null, 8, Hd)) : (S(), l("span", {
12565
+ }, null, 8, Wd)) : (S(), l("span", {
12503
12566
  key: 3,
12504
12567
  innerHTML: e.getItemLabel(e.schema, e.objectData)
12505
- }, null, 8, Ud))])) : c("", !0), f(u, {
12568
+ }, null, 8, Gd))])) : c("", !0), f(u, {
12506
12569
  buttons: e.buttonSchemas,
12507
12570
  schema: e.schema,
12508
12571
  dataPath: e.dataPath,
@@ -12531,9 +12594,9 @@ function Wd(e, t, n, r, i, a) {
12531
12594
  "editable",
12532
12595
  "editPath",
12533
12596
  "deletable"
12534
- ])], 8, Bd)) : c("", !0);
12597
+ ])], 8, Hd)) : c("", !0);
12535
12598
  }
12536
- var Gd = /*#__PURE__*/ X(Q.register("object", {
12599
+ var qd = /*#__PURE__*/ X(Q.register("object", {
12537
12600
  mixins: [su],
12538
12601
  getSourceType(e) {
12539
12602
  return e;
@@ -12547,7 +12610,7 @@ var Gd = /*#__PURE__*/ X(Q.register("object", {
12547
12610
  async processSchema(e, t, n, r, i, a = !1, o = !1, s = null) {
12548
12611
  await Promise.all([fi(t), su.processSchema(e, t, n, r, i, a, o, s)]);
12549
12612
  }
12550
- }), [["render", Wd]]), Kd = Q.register("panel", {
12613
+ }), [["render", Kd]]), Jd = Q.register("panel", {
12551
12614
  defaultNested: !1,
12552
12615
  generateLabel: !1,
12553
12616
  omitSpacing: !0,
@@ -12560,22 +12623,22 @@ var Gd = /*#__PURE__*/ X(Q.register("object", {
12560
12623
  render() {
12561
12624
  return null;
12562
12625
  }
12563
- }), qd = [
12626
+ }), Yd = [
12564
12627
  "id",
12565
12628
  "value",
12566
12629
  "max"
12567
12630
  ];
12568
- function Jd(e, t, n, r, i, a) {
12631
+ function Xd(e, t, n, r, i, a) {
12569
12632
  return S(), l("progress", y({
12570
12633
  class: "dito-progress",
12571
12634
  id: e.componentPath,
12572
12635
  ref: "element",
12573
12636
  value: e.progressValue,
12574
12637
  max: e.progressMax
12575
- }, e.attributes), null, 16, qd);
12638
+ }, e.attributes), null, 16, Yd);
12576
12639
  }
12577
- var Yd = /*#__PURE__*/ X(Q.register("progress", {
12578
- mixins: [Ld],
12640
+ var Zd = /*#__PURE__*/ X(Q.register("progress", {
12641
+ mixins: [zd],
12579
12642
  computed: {
12580
12643
  progressValue() {
12581
12644
  let { value: e, range: t, step: n } = this;
@@ -12586,8 +12649,8 @@ var Yd = /*#__PURE__*/ X(Q.register("progress", {
12586
12649
  return e ? e[1] - e[0] : null;
12587
12650
  }
12588
12651
  }
12589
- }), [["render", Jd]]), Xd = ["id", "aria-label"], Zd = ["value"];
12590
- function Qd(e, n, r, i, a, o) {
12652
+ }), [["render", Xd]]), Qd = ["id", "aria-label"], $d = ["value"];
12653
+ function ef(e, n, r, i, a, o) {
12591
12654
  return S(), l("ul", {
12592
12655
  class: b(["dito-radio-buttons", `dito-layout--${e.schema.layout || "vertical"}`]),
12593
12656
  id: e.componentPath,
@@ -12600,16 +12663,16 @@ function Qd(e, n, r, i, a, o) {
12600
12663
  "onUpdate:modelValue": n[0] ||= (t) => e.selectedValue = t,
12601
12664
  type: "radio",
12602
12665
  value: e.getValueForOption(t)
12603
- }, { ref_for: !0 }, e.attributes), null, 16, Zd), [[ue, e.selectedValue]]), d(D(e.getLabelForOption(t)), 1)])]))), 256))], 10, Xd);
12666
+ }, { ref_for: !0 }, e.attributes), null, 16, $d), [[ue, e.selectedValue]]), d(D(e.getLabelForOption(t)), 1)])]))), 256))], 10, Qd);
12604
12667
  }
12605
- var $d = /*#__PURE__*/ X(Q.register("radio", {
12668
+ var tf = /*#__PURE__*/ X(Q.register("radio", {
12606
12669
  mixins: [Fl],
12607
12670
  nativeField: !0,
12608
12671
  defaultWidth: "auto"
12609
- }), [["render", Qd]]);
12672
+ }), [["render", ef]]);
12610
12673
  //#endregion
12611
12674
  //#region src/types/DitoTypeSection.vue?vue&type=template&lang.js
12612
- function ef(e, t, n, r, i, a) {
12675
+ function nf(e, t, n, r, i, a) {
12613
12676
  let o = T("DitoSchemaInlined");
12614
12677
  return S(), l("div", { class: b(["dito-section", { "dito-section--labelled": e.hasLabel }]) }, [f(o, {
12615
12678
  class: "dito-section__schema",
@@ -12640,7 +12703,7 @@ function ef(e, t, n, r, i, a) {
12640
12703
  "labelNode"
12641
12704
  ])], 2);
12642
12705
  }
12643
- var tf = /*#__PURE__*/ X(Q.register("section", {
12706
+ var rf = /*#__PURE__*/ X(Q.register("section", {
12644
12707
  mixins: [_o],
12645
12708
  defaultValue: ({ schema: e }) => e.nested ? {} : void 0,
12646
12709
  ignoreMissingValue: ({ schema: e }) => !e.nested && !("default" in e),
@@ -12676,10 +12739,10 @@ var tf = /*#__PURE__*/ X(Q.register("section", {
12676
12739
  async processSchema(e, t, n, r, i) {
12677
12740
  await hi(e, t, r, i);
12678
12741
  }
12679
- }), [["render", ef]]), nf = { class: "dito-select" }, rf = { class: "dito-select__inner" }, af = ["id"], of = ["label"], sf = ["value"], cf = ["value"], lf = ["value"];
12680
- function uf(e, n, r, i, a, o) {
12742
+ }), [["render", nf]]), af = { class: "dito-select" }, of = { class: "dito-select__inner" }, sf = ["id"], cf = ["label"], lf = ["value"], uf = ["value"], df = ["value"];
12743
+ function ff(e, n, r, i, a, o) {
12681
12744
  let d = T("DitoAffixes"), p = T("DitoEditButtons");
12682
- return S(), l("div", nf, [u("div", rf, [
12745
+ return S(), l("div", af, [u("div", of, [
12683
12746
  f(d, {
12684
12747
  items: e.schema.prefix,
12685
12748
  position: "prefix",
@@ -12702,13 +12765,13 @@ function uf(e, n, r, i, a, o) {
12702
12765
  }), [e.populate ? (S(!0), l(t, { key: 0 }, C(e.options, (n) => (S(), l(t, null, [e.groupBy ? (S(), l("optgroup", {
12703
12766
  key: 0,
12704
12767
  label: n[e.groupByLabel]
12705
- }, [(S(!0), l(t, null, C(n[e.groupByOptions], (t) => (S(), l("option", { value: e.getValueForOption(t) }, D(e.getLabelForOption(t)), 9, sf))), 256))], 8, of)) : (S(), l("option", {
12768
+ }, [(S(!0), l(t, null, C(n[e.groupByOptions], (t) => (S(), l("option", { value: e.getValueForOption(t) }, D(e.getLabelForOption(t)), 9, lf))), 256))], 8, cf)) : (S(), l("option", {
12706
12769
  key: 1,
12707
12770
  value: e.getValueForOption(n)
12708
- }, D(e.getLabelForOption(n)), 9, cf))], 64))), 256)) : e.selectedOption ? (S(), l("option", {
12771
+ }, D(e.getLabelForOption(n)), 9, uf))], 64))), 256)) : e.selectedOption ? (S(), l("option", {
12709
12772
  key: 1,
12710
12773
  value: e.selectedValue
12711
- }, D(e.getLabelForOption(e.selectedOption)), 9, lf)) : c("", !0)], 16, af), [[de, e.selectedValue]]),
12774
+ }, D(e.getLabelForOption(e.selectedOption)), 9, df)) : c("", !0)], 16, sf), [[de, e.selectedValue]]),
12712
12775
  f(d, {
12713
12776
  items: e.schema.suffix,
12714
12777
  position: "suffix",
@@ -12747,22 +12810,22 @@ function uf(e, n, r, i, a, o) {
12747
12810
  "editPath"
12748
12811
  ])) : c("", !0)]);
12749
12812
  }
12750
- var df = /*#__PURE__*/ X(Q.register("select", {
12813
+ var pf = /*#__PURE__*/ X(Q.register("select", {
12751
12814
  mixins: [Fl],
12752
12815
  components: { DitoAffixes: Z },
12753
12816
  nativeField: !0,
12754
12817
  data() {
12755
12818
  return { populate: !0 };
12756
12819
  }
12757
- }), [["render", uf]]), ff = { class: "dito-slider" }, pf = [
12820
+ }), [["render", ff]]), mf = { class: "dito-slider" }, hf = [
12758
12821
  "id",
12759
12822
  "min",
12760
12823
  "max",
12761
12824
  "step"
12762
12825
  ];
12763
- function mf(e, t, n, r, i, a) {
12826
+ function gf(e, t, n, r, i, a) {
12764
12827
  let o = T("DitoInput");
12765
- return S(), l("div", ff, [A(u("input", y({
12828
+ return S(), l("div", mf, [A(u("input", y({
12766
12829
  class: "dito-range",
12767
12830
  id: e.componentPath,
12768
12831
  ref: "element",
@@ -12772,7 +12835,7 @@ function mf(e, t, n, r, i, a) {
12772
12835
  min: e.min,
12773
12836
  max: e.max,
12774
12837
  step: e.stepValue
12775
- }), null, 16, pf), [[fe, e.inputValue]]), e.input ? (S(), s(o, y({
12838
+ }), null, 16, hf), [[fe, e.inputValue]]), e.input ? (S(), s(o, y({
12776
12839
  key: 0,
12777
12840
  class: "dito-number",
12778
12841
  modelValue: e.inputValue,
@@ -12789,28 +12852,28 @@ function mf(e, t, n, r, i, a) {
12789
12852
  "step"
12790
12853
  ])) : c("", !0)]);
12791
12854
  }
12792
- var hf = /*#__PURE__*/ X(Q.register("slider", {
12793
- mixins: [Ld],
12855
+ var _f = /*#__PURE__*/ X(Q.register("slider", {
12856
+ mixins: [zd],
12794
12857
  components: { DitoInput: Oa },
12795
12858
  nativeField: !0,
12796
12859
  computed: { input: q("input", {
12797
12860
  type: Boolean,
12798
12861
  default: !0
12799
12862
  }) }
12800
- }), [["render", mf]]);
12863
+ }), [["render", gf]]);
12801
12864
  //#endregion
12802
12865
  //#region src/types/DitoTypeSpacer.vue?vue&type=template&lang.js
12803
- function gf(e, t, n, r, i, a) {
12866
+ function vf(e, t, n, r, i, a) {
12804
12867
  return null;
12805
12868
  }
12806
- var _f = /*#__PURE__*/ X(Q.register("spacer", {
12869
+ var yf = /*#__PURE__*/ X(Q.register("spacer", {
12807
12870
  defaultValue: () => void 0,
12808
12871
  excludeValue: !0,
12809
12872
  generateLabel: !1
12810
- }), [["render", gf]]);
12873
+ }), [["render", vf]]);
12811
12874
  //#endregion
12812
12875
  //#region src/types/DitoTypeSwitch.vue?vue&type=template&lang.js
12813
- function vf(e, t, n, r, i, a) {
12876
+ function bf(e, t, n, r, i, a) {
12814
12877
  let o = T("DitoSwitch");
12815
12878
  return S(), s(o, y({
12816
12879
  class: "dito-switch",
@@ -12825,14 +12888,14 @@ function vf(e, t, n, r, i, a) {
12825
12888
  "labels"
12826
12889
  ]);
12827
12890
  }
12828
- var yf = /*#__PURE__*/ X(Q.register("switch", {
12891
+ var xf = /*#__PURE__*/ X(Q.register("switch", {
12829
12892
  defaultValue: !1,
12830
12893
  defaultWidth: "auto",
12831
12894
  components: { DitoSwitch: so },
12832
12895
  computed: { labels() {
12833
12896
  return this.schema.labels;
12834
12897
  } }
12835
- }), [["render", vf]]), bf = {
12898
+ }), [["render", bf]]), Sf = {
12836
12899
  computed: { trim: q("trim", {
12837
12900
  type: Boolean,
12838
12901
  default: !1
@@ -12844,7 +12907,7 @@ var yf = /*#__PURE__*/ X(Q.register("switch", {
12844
12907
  };
12845
12908
  //#endregion
12846
12909
  //#region src/types/DitoTypeText.vue?vue&type=template&lang.js
12847
- function xf(e, t, n, r, i, a) {
12910
+ function Cf(e, t, n, r, i, a) {
12848
12911
  let o = T("DitoAffixes"), c = T("DitoInput");
12849
12912
  return S(), s(c, y({
12850
12913
  class: "dito-text",
@@ -12891,7 +12954,7 @@ function xf(e, t, n, r, i, a) {
12891
12954
  }
12892
12955
  //#endregion
12893
12956
  //#region src/types/DitoTypeText.vue
12894
- var Sf = "****************", Cf = /*#__PURE__*/ X(Q.register([
12957
+ var wf = "****************", Tf = /*#__PURE__*/ X(Q.register([
12895
12958
  "text",
12896
12959
  "email",
12897
12960
  "url",
@@ -12901,7 +12964,7 @@ var Sf = "****************", Cf = /*#__PURE__*/ X(Q.register([
12901
12964
  "password",
12902
12965
  "creditcard"
12903
12966
  ], {
12904
- mixins: [bf],
12967
+ mixins: [Sf],
12905
12968
  components: {
12906
12969
  DitoInput: Oa,
12907
12970
  DitoAffixes: Z
@@ -12930,15 +12993,15 @@ var Sf = "****************", Cf = /*#__PURE__*/ X(Q.register([
12930
12993
  },
12931
12994
  inputValue: {
12932
12995
  get() {
12933
- return this.type === "password" && this.value === void 0 && !this.focused ? Sf : this.value;
12996
+ return this.type === "password" && this.value === void 0 && !this.focused ? wf : this.value;
12934
12997
  },
12935
12998
  set(e) {
12936
12999
  this.value = e;
12937
13000
  }
12938
13001
  }
12939
13002
  }
12940
- }), [["render", xf]]), wf = ["id", "rows"];
12941
- function Tf(e, t, n, r, i, a) {
13003
+ }), [["render", Cf]]), Ef = ["id", "rows"];
13004
+ function Df(e, t, n, r, i, a) {
12942
13005
  return A((S(), l("textarea", y({
12943
13006
  class: "dito-textarea dito-input",
12944
13007
  id: e.componentPath,
@@ -12947,10 +13010,10 @@ function Tf(e, t, n, r, i, a) {
12947
13010
  }, e.attributes, {
12948
13011
  rows: e.lines,
12949
13012
  class: { "dito-textarea--resizable": e.resizable }
12950
- }), null, 16, wf)), [[fe, e.value]]);
13013
+ }), null, 16, Ef)), [[fe, e.value]]);
12951
13014
  }
12952
- var Ef = /*#__PURE__*/ X(Q.register("textarea", {
12953
- mixins: [bf],
13015
+ var Of = /*#__PURE__*/ X(Q.register("textarea", {
13016
+ mixins: [Sf],
12954
13017
  nativeField: !0,
12955
13018
  textField: !0,
12956
13019
  computed: {
@@ -12962,17 +13025,18 @@ var Ef = /*#__PURE__*/ X(Q.register("textarea", {
12962
13025
  default: !1
12963
13026
  })
12964
13027
  }
12965
- }), [["render", Tf]]), Df = { class: "dito-tree-list" }, Of = { class: "dito-tree-panel" }, kf = {
12966
- key: 0,
13028
+ }), [["render", Df]]), kf = { class: "dito-tree-list" }, Af = { class: "dito-tree-panel" }, jf = {
13029
+ key: 1,
12967
13030
  class: "dito-tree-form-container"
12968
13031
  };
12969
- function Af(e, t, n, r, i, a) {
13032
+ function Mf(e, t, n, r, i, a) {
12970
13033
  let o = T("DitoScopes"), d = T("DitoTreeItem"), p = T("DitoRouterView");
12971
- return S(), l("div", Df, [e.scopes ? (S(), s(o, {
13034
+ return S(), l("div", kf, [e.scopes ? (S(), s(o, {
12972
13035
  key: 0,
12973
13036
  query: e.query,
12974
13037
  scopes: e.scopes
12975
- }, null, 8, ["query", "scopes"])) : c("", !0), u("div", Of, [f(d, {
13038
+ }, null, 8, ["query", "scopes"])) : c("", !0), u("div", Af, [e.treeData ? (S(), s(d, {
13039
+ key: 0,
12976
13040
  schema: e.treeSchema,
12977
13041
  dataPath: e.treeDataPath,
12978
13042
  data: e.treeData,
@@ -12984,9 +13048,9 @@ function Af(e, t, n, r, i, a) {
12984
13048
  "dataPath",
12985
13049
  "data",
12986
13050
  "draggable"
12987
- ]), e.editPath && e.hasEditableForms ? (S(), l("div", kf, [f(p, { routeLevel: e.routeComponent.routeLevel + 1 }, null, 8, ["routeLevel"])])) : c("", !0)])]);
13051
+ ])) : c("", !0), e.editPath && e.hasEditableForms ? (S(), l("div", jf, [f(p, { routeLevel: e.routeComponent.routeLevel + 1 }, null, 8, ["routeLevel"])])) : c("", !0)])]);
12988
13052
  }
12989
- var jf = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
13053
+ var Nf = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
12990
13054
  mixins: [su],
12991
13055
  provide() {
12992
13056
  return { container: this };
@@ -13039,7 +13103,7 @@ var jf = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
13039
13103
  }
13040
13104
  }) : null);
13041
13105
  }
13042
- }), [["render", Af]]), Mf = [
13106
+ }), [["render", Mf]]), Pf = [
13043
13107
  "",
13044
13108
  "k",
13045
13109
  "M",
@@ -13050,41 +13114,41 @@ var jf = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
13050
13114
  "Z",
13051
13115
  "Y"
13052
13116
  ];
13053
- function Nf(e, { base: t = 10 } = {}) {
13054
- let n = Ff(t), r = Math.abs(e), i = Math.min(r >= 1 ? Math.floor(Math.log(r) / Math.log(n)) : 0, Mf.length - 1), a = If(r, n, i);
13055
- a >= n && i < Mf.length - 1 && (a = If(r, n, ++i));
13056
- let o = Mf[i], s = o ? t === 10 ? `${o}B` : `${o.toUpperCase()}iB` : "B";
13117
+ function Ff(e, { base: t = 10 } = {}) {
13118
+ let n = Lf(t), r = Math.abs(e), i = Math.min(r >= 1 ? Math.floor(Math.log(r) / Math.log(n)) : 0, Pf.length - 1), a = Rf(r, n, i);
13119
+ a >= n && i < Pf.length - 1 && (a = Rf(r, n, ++i));
13120
+ let o = Pf[i], s = o ? t === 10 ? `${o}B` : `${o.toUpperCase()}iB` : "B";
13057
13121
  return `${e < 0 ? "-" : ""}${a} ${s}`;
13058
13122
  }
13059
- function Pf(e, { base: t = 10 } = {}) {
13123
+ function If(e, { base: t = 10 } = {}) {
13060
13124
  let [, n, r] = String(e).match(/^([\d.,]*)\s*(\D*)$/) || [], i = parseFloat(n?.replace(",", "."));
13061
13125
  if (!isFinite(i)) throw Error(`Can't interpret file size: ${e}`);
13062
- let a = Ff(/^[kmgtpezy]ib?$/i.test(r) ? 2 : t), o = r.replace(/^bits?$/, "b").match(/^([KMGTPEZY]?)b$/);
13126
+ let a = Lf(/^[kmgtpezy]ib?$/i.test(r) ? 2 : t), o = r.replace(/^bits?$/, "b").match(/^([KMGTPEZY]?)b$/);
13063
13127
  if (o) {
13064
- let e = Mf.indexOf(o[1].replace("K", "k"));
13128
+ let e = Pf.indexOf(o[1].replace("K", "k"));
13065
13129
  return Math.round(i * a ** e / 8);
13066
13130
  }
13067
- let s = Mf.findIndex((e) => e.toLowerCase() === r.toLowerCase().replace(/^(bytes?|b)$/, "").replace(/^(\w)(i?b|i)$/, "$1"));
13131
+ let s = Pf.findIndex((e) => e.toLowerCase() === r.toLowerCase().replace(/^(bytes?|b)$/, "").replace(/^(\w)(i?b|i)$/, "$1"));
13068
13132
  if (s >= 0) return Math.round(i * a ** s);
13069
13133
  throw Error(`Invalid file size unit: ${r}`);
13070
13134
  }
13071
- function Ff(e) {
13135
+ function Lf(e) {
13072
13136
  return e === 10 ? 1e3 : 1024;
13073
13137
  }
13074
- function If(e, t, n) {
13138
+ function Rf(e, t, n) {
13075
13139
  let r = n > 0 ? 100 : 1;
13076
13140
  return Math.round(e / t ** n * r) / r;
13077
13141
  }
13078
13142
  //#endregion
13079
13143
  //#region src/types/DitoTypeUpload.vue?vue&type=template&lang.js
13080
- var Lf = { class: "dito-upload" }, Rf = { class: "dito-table dito-table--separators dito-table--background" }, zf = ["innerHTML"], Bf = { key: 1 }, Vf = [
13144
+ var zf = { class: "dito-upload" }, Bf = { class: "dito-table dito-table--separators dito-table--background" }, Vf = ["innerHTML"], Hf = { key: 1 }, Uf = [
13081
13145
  "download",
13082
13146
  "href",
13083
13147
  "onClick"
13084
- ], Hf = { key: 2 }, Uf = { class: "dito-upload__size" }, Wf = { class: "dito-upload__status" }, Gf = { class: "dito-table__buttons" }, Kf = { class: "dito-buttons dito-buttons--round" }, qf = ["title"], Jf = ["onClick"], Yf = { key: 0 }, Xf = { colspan: 4 }, Zf = { class: "dito-upload-footer" }, Qf = ["value"], $f = { class: "dito-buttons dito-buttons--round" }, ep = ["title"];
13085
- function tp(e, n, r, i, a, o) {
13148
+ ], Wf = { key: 2 }, Gf = { class: "dito-upload__size" }, Kf = { class: "dito-upload__status" }, qf = { class: "dito-table__buttons" }, Jf = { class: "dito-buttons dito-buttons--round" }, Yf = ["title"], Xf = ["onClick"], Zf = { key: 0 }, Qf = { colspan: 4 }, $f = { class: "dito-upload-footer" }, ep = ["value"], tp = { class: "dito-buttons dito-buttons--round" }, np = ["title"];
13149
+ function rp(e, n, r, i, a, o) {
13086
13150
  let s = T("VueUpload"), p = T("DitoUploadFile"), m = T("DitoDraggable");
13087
- return S(), l("div", Lf, [f(s, {
13151
+ return S(), l("div", zf, [f(s, {
13088
13152
  class: "dito-upload__input",
13089
13153
  ref: "upload",
13090
13154
  modelValue: e.uploads,
@@ -13114,7 +13178,7 @@ function tp(e, n, r, i, a, o) {
13114
13178
  "drop",
13115
13179
  "onInputFilter",
13116
13180
  "onInputFile"
13117
- ]), u("table", Rf, [
13181
+ ]), u("table", Bf, [
13118
13182
  n[5] ||= u("thead", { class: "dito-table-head" }, [u("tr", null, [
13119
13183
  u("th", { scope: "col" }, [u("span", null, "File")]),
13120
13184
  u("th", { scope: "col" }, [u("span", null, "Size")]),
@@ -13132,7 +13196,7 @@ function tp(e, n, r, i, a, o) {
13132
13196
  e.render ? (S(), l("td", {
13133
13197
  key: 0,
13134
13198
  innerHTML: e.renderFile(r, i)
13135
- }, null, 8, zf)) : e.downloadUrls[i] ? (S(), l("td", Bf, [u("a", {
13199
+ }, null, 8, Vf)) : e.downloadUrls[i] ? (S(), l("td", Hf, [u("a", {
13136
13200
  download: r.name,
13137
13201
  href: e.downloadUrls[i],
13138
13202
  target: "_blank",
@@ -13145,7 +13209,7 @@ function tp(e, n, r, i, a, o) {
13145
13209
  "file",
13146
13210
  "thumbnail",
13147
13211
  "thumbnailUrl"
13148
- ])], 8, Vf)])) : (S(), l("td", Hf, [f(p, {
13212
+ ])], 8, Uf)])) : (S(), l("td", Wf, [f(p, {
13149
13213
  file: r,
13150
13214
  thumbnail: e.thumbnails,
13151
13215
  thumbnailUrl: e.thumbnailUrls[i]
@@ -13154,15 +13218,15 @@ function tp(e, n, r, i, a, o) {
13154
13218
  "thumbnail",
13155
13219
  "thumbnailUrl"
13156
13220
  ])])),
13157
- u("td", Uf, D(e.formatFileSize(r.size)), 1),
13158
- u("td", Wf, [r.upload ? (S(), l(t, { key: 0 }, [r.upload.error ? (S(), l(t, { key: 0 }, [d("Error: " + D(r.upload.error), 1)], 64)) : r.upload.active ? (S(), l(t, { key: 1 }, [d("Uploading...")], 64)) : r.upload.success ? (S(), l(t, { key: 2 }, [d("Uploaded")], 64)) : c("", !0)], 64)) : (S(), l(t, { key: 1 }, [d("Stored")], 64))]),
13159
- u("td", Gf, [u("div", Kf, [
13221
+ u("td", Gf, D(e.formatFileSize(r.size)), 1),
13222
+ u("td", Kf, [r.upload ? (S(), l(t, { key: 0 }, [r.upload.error ? (S(), l(t, { key: 0 }, [d("Error: " + D(r.upload.error), 1)], 64)) : r.upload.active ? (S(), l(t, { key: 1 }, [d("Uploading...")], 64)) : r.upload.success ? (S(), l(t, { key: 2 }, [d("Uploaded")], 64)) : c("", !0)], 64)) : (S(), l(t, { key: 1 }, [d("Stored")], 64))]),
13223
+ u("td", qf, [u("div", Jf, [
13160
13224
  e.multiple ? c("", !0) : (S(), l("button", {
13161
13225
  key: 0,
13162
13226
  class: "dito-button dito-button--upload",
13163
13227
  title: e.uploadTitle,
13164
13228
  onClick: n[1] ||= (...t) => e.onClickUpload && e.onClickUpload(...t)
13165
- }, null, 8, qf)),
13229
+ }, null, 8, Yf)),
13166
13230
  e.draggable ? (S(), l("a", y({
13167
13231
  key: 1,
13168
13232
  class: "dito-button"
@@ -13171,7 +13235,7 @@ function tp(e, n, r, i, a, o) {
13171
13235
  key: 2,
13172
13236
  class: "dito-button",
13173
13237
  type: "button"
13174
- }, { ref_for: !0 }, e.getButtonAttributes(e.verbs.delete), { onClick: (t) => e.deleteFile(r, i) }), null, 16, Jf)) : c("", !0)
13238
+ }, { ref_for: !0 }, e.getButtonAttributes(e.verbs.delete), { onClick: (t) => e.deleteFile(r, i) }), null, 16, Xf)) : c("", !0)
13175
13239
  ])])
13176
13240
  ]))), 128)) : c("", !0)]),
13177
13241
  _: 1
@@ -13180,12 +13244,12 @@ function tp(e, n, r, i, a, o) {
13180
13244
  "options",
13181
13245
  "draggable"
13182
13246
  ]),
13183
- e.multiple || e.isUploadActive || !e.hasFiles ? (S(), l("tfoot", Yf, [u("tr", null, [u("td", Xf, [u("div", Zf, [e.isUploadActive ? (S(), l("progress", {
13247
+ e.multiple || e.isUploadActive || !e.hasFiles ? (S(), l("tfoot", Zf, [u("tr", null, [u("td", Qf, [u("div", $f, [e.isUploadActive ? (S(), l("progress", {
13184
13248
  key: 0,
13185
13249
  class: "dito-progress",
13186
13250
  value: e.uploadProgress,
13187
13251
  max: "100"
13188
- }, null, 8, Qf)) : c("", !0), u("div", $f, [e.isUploadActive ? (S(), l("button", {
13252
+ }, null, 8, ep)) : c("", !0), u("div", tp, [e.isUploadActive ? (S(), l("button", {
13189
13253
  key: 0,
13190
13254
  class: "dito-button",
13191
13255
  type: "button",
@@ -13195,12 +13259,12 @@ function tp(e, n, r, i, a, o) {
13195
13259
  class: "dito-button dito-button--upload",
13196
13260
  title: e.uploadTitle,
13197
13261
  onClick: n[4] ||= (...t) => e.onClickUpload && e.onClickUpload(...t)
13198
- }, null, 8, ep)) : c("", !0)])])])])])) : c("", !0)
13262
+ }, null, 8, np)) : c("", !0)])])])])])) : c("", !0)
13199
13263
  ])]);
13200
13264
  }
13201
13265
  //#endregion
13202
13266
  //#region src/types/DitoTypeUpload.vue
13203
- var np = Q.register("upload", {
13267
+ var ip = Q.register("upload", {
13204
13268
  mixins: [Hc],
13205
13269
  components: { VueUpload: zt },
13206
13270
  data() {
@@ -13214,7 +13278,7 @@ var np = Q.register("upload", {
13214
13278
  return this.multiple ? "Upload Files" : "Upload File";
13215
13279
  },
13216
13280
  files() {
13217
- return rp(this.value);
13281
+ return ap(this.value);
13218
13282
  },
13219
13283
  downloadUrls() {
13220
13284
  return this.files.map((e, t) => this.getDownloadUrl(e, t));
@@ -13241,7 +13305,7 @@ var np = Q.register("upload", {
13241
13305
  maxSize: q("maxSize", {
13242
13306
  type: [String, Number],
13243
13307
  get(e) {
13244
- return e ? Pf(e) : void 0;
13308
+ return e ? If(e) : void 0;
13245
13309
  }
13246
13310
  }),
13247
13311
  draggable: q("draggable", {
@@ -13297,7 +13361,7 @@ var np = Q.register("upload", {
13297
13361
  });
13298
13362
  } },
13299
13363
  methods: {
13300
- formatFileSize: Nf,
13364
+ formatFileSize: Ff,
13301
13365
  getFileContext(e, t) {
13302
13366
  return this.multiple ? new G(this, {
13303
13367
  value: e,
@@ -13370,7 +13434,7 @@ var np = Q.register("upload", {
13370
13434
  extension: `Unsupported file-type: ${e.name}`,
13371
13435
  network: "Network error encountered during upload",
13372
13436
  server: "Server error occurred during upload",
13373
- size: `File is too large: ${Nf(e.size)}`,
13437
+ size: `File is too large: ${Ff(e.size)}`,
13374
13438
  timeout: "Timeout occurred during upload"
13375
13439
  }[n] || `Unknown File Upload Error: '${n}'`;
13376
13440
  this.notify({
@@ -13402,14 +13466,14 @@ var np = Q.register("upload", {
13402
13466
  }
13403
13467
  },
13404
13468
  processValue({ schema: e, value: t }) {
13405
- let n = rp(t).map(({ upload: e, ...t }) => !e || e.success ? t : null).filter((e) => e);
13469
+ let n = ap(t).map(({ upload: e, ...t }) => !e || e.success ? t : null).filter((e) => e);
13406
13470
  return e.multiple ? n : n[0] || null;
13407
13471
  }
13408
13472
  });
13409
- function rp(e) {
13473
+ function ap(e) {
13410
13474
  return e ? M(e) : [];
13411
13475
  }
13412
- var ip = /*#__PURE__*/ X(np, [["render", tp]]), ap = /* @__PURE__ */ Vt({
13476
+ var op = /*#__PURE__*/ X(ip, [["render", rp]]), sp = /* @__PURE__ */ Vt({
13413
13477
  DitoDitoTypeComponent: () => Ql,
13414
13478
  DitoTypeButton: () => Al,
13415
13479
  DitoTypeCheckbox: () => Pl,
@@ -13421,38 +13485,38 @@ var ip = /*#__PURE__*/ X(np, [["render", tp]]), ap = /* @__PURE__ */ Vt({
13421
13485
  DitoTypeLabel: () => Mu,
13422
13486
  DitoTypeList: () => Au,
13423
13487
  DitoTypeMarkup: () => Md,
13424
- DitoTypeMultiselect: () => Id,
13425
- DitoTypeNumber: () => zd,
13426
- DitoTypeObject: () => Gd,
13427
- DitoTypePanel: () => Kd,
13428
- DitoTypeProgress: () => Yd,
13429
- DitoTypeRadio: () => $d,
13430
- DitoTypeSection: () => tf,
13431
- DitoTypeSelect: () => df,
13432
- DitoTypeSlider: () => hf,
13433
- DitoTypeSpacer: () => _f,
13434
- DitoTypeSwitch: () => yf,
13435
- DitoTypeText: () => Cf,
13436
- DitoTypeTextarea: () => Ef,
13437
- DitoTypeTreeList: () => jf,
13438
- DitoTypeUpload: () => ip
13439
- }), op = {
13488
+ DitoTypeMultiselect: () => Rd,
13489
+ DitoTypeNumber: () => Vd,
13490
+ DitoTypeObject: () => qd,
13491
+ DitoTypePanel: () => Jd,
13492
+ DitoTypeProgress: () => Zd,
13493
+ DitoTypeRadio: () => tf,
13494
+ DitoTypeSection: () => rf,
13495
+ DitoTypeSelect: () => pf,
13496
+ DitoTypeSlider: () => _f,
13497
+ DitoTypeSpacer: () => yf,
13498
+ DitoTypeSwitch: () => xf,
13499
+ DitoTypeText: () => Tf,
13500
+ DitoTypeTextarea: () => Of,
13501
+ DitoTypeTreeList: () => Nf,
13502
+ DitoTypeUpload: () => op
13503
+ }), cp = {
13440
13504
  mounted(e, t) {
13441
- sp(e, t.value, t.arg);
13505
+ lp(e, t.value, t.arg);
13442
13506
  },
13443
13507
  unmounted(e, t) {
13444
- cp(e, t.value, t.arg);
13508
+ up(e, t.value, t.arg);
13445
13509
  }
13446
13510
  };
13447
- function sp(e, t, n) {
13448
- dp.getObserver(n).observe(e, t);
13511
+ function lp(e, t, n) {
13512
+ pp.getObserver(n).observe(e, t);
13449
13513
  }
13450
- function cp(e, t, n) {
13451
- dp.getObserver(n).unobserve(e, t);
13514
+ function up(e, t, n) {
13515
+ pp.getObserver(n).unobserve(e, t);
13452
13516
  }
13453
- var lp = typeof ResizeObserver < "u", up = {}, dp = class e {
13517
+ var dp = typeof ResizeObserver < "u", fp = {}, pp = class e {
13454
13518
  constructor(e, t) {
13455
- this.key = e, this.options = t, this.observer = lp ? new ResizeObserver((e) => this.handle(e)) : null, this.handlersByNode = /* @__PURE__ */ new WeakMap(), this.nodeCount = 0;
13519
+ this.key = e, this.options = t, this.observer = dp ? new ResizeObserver((e) => this.handle(e)) : null, this.handlersByNode = /* @__PURE__ */ new WeakMap(), this.nodeCount = 0;
13456
13520
  }
13457
13521
  observe(e, t) {
13458
13522
  let n = this.handlersByNode.get(e);
@@ -13460,7 +13524,7 @@ var lp = typeof ResizeObserver < "u", up = {}, dp = class e {
13460
13524
  }
13461
13525
  unobserve(e, t) {
13462
13526
  let n = this.handlersByNode.get(e);
13463
- n?.delete(t) && n.size === 0 && (this.handlersByNode.delete(e), this.observer?.unobserve(e), --this.nodeCount === 0 && delete up[this.key]);
13527
+ n?.delete(t) && n.size === 0 && (this.handlersByNode.delete(e), this.observer?.unobserve(e), --this.nodeCount === 0 && delete fp[this.key]);
13464
13528
  }
13465
13529
  handle(e) {
13466
13530
  for (let t of e) {
@@ -13479,14 +13543,14 @@ var lp = typeof ResizeObserver < "u", up = {}, dp = class e {
13479
13543
  }
13480
13544
  static getObserver({ box: t = "content-box" } = {}) {
13481
13545
  let n = { box: t }, r = JSON.stringify(n);
13482
- return up[r] ||= new e(r, n), up[r];
13546
+ return fp[r] ||= new e(r, n), fp[r];
13483
13547
  }
13484
- }, fp = class extends Error {
13548
+ }, mp = class extends Error {
13485
13549
  constructor(e) {
13486
13550
  super(`Request failed with status code: ${e.status} (${e.statusText})`), this.response = e;
13487
13551
  }
13488
13552
  };
13489
- async function pp(e, { url: t, method: n = "get", query: r = null, headers: i = null, data: a = null, signal: o = null, timeout: s = e.timeout ?? null }) {
13553
+ async function hp(e, { url: t, method: n = "get", query: r = null, headers: i = null, data: a = null, signal: o = null, timeout: s = e.timeout ?? null }) {
13490
13554
  let c = e.isApiUrl(t), l = [o, s && AbortSignal.timeout(s)];
13491
13555
  o = AbortSignal.any(l.filter(Boolean));
13492
13556
  let u = await fetch(e.getApiUrl({
@@ -13502,23 +13566,23 @@ async function pp(e, { url: t, method: n = "get", query: r = null, headers: i =
13502
13566
  credentials: c && e.cors?.credentials ? "include" : "same-origin",
13503
13567
  signal: o
13504
13568
  });
13505
- if (u.headers.get("Content-Type")?.includes("application/json") && (u.data = await u.json()), !u.ok) throw new fp(u);
13569
+ if (u.headers.get("Content-Type")?.includes("application/json") && (u.data = await u.json()), !u.ok) throw new mp(u);
13506
13570
  return u;
13507
13571
  }
13508
- function mp(e, t) {
13572
+ function gp(e, t) {
13509
13573
  return !Me(t) || t.startsWith(e.url);
13510
13574
  }
13511
- function hp(e, { url: t, query: n }) {
13512
- !t.startsWith(e.url) && !Me(t) && (t = gp(e.url, t));
13575
+ function _p(e, { url: t, query: n }) {
13576
+ !t.startsWith(e.url) && !Me(t) && (t = vp(e.url, t));
13513
13577
  let r = au(n);
13514
13578
  return r ? `${t}${t.includes("?") ? "&" : "?"}${r}` : t;
13515
13579
  }
13516
- function gp(e, t) {
13580
+ function vp(e, t) {
13517
13581
  return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}`;
13518
13582
  }
13519
13583
  //#endregion
13520
13584
  //#region src/verbs.js
13521
- var _p = [
13585
+ var yp = [
13522
13586
  "create",
13523
13587
  "created",
13524
13588
  "save",
@@ -13543,9 +13607,9 @@ var _p = [
13543
13607
  "dragged",
13544
13608
  "login",
13545
13609
  "logged in"
13546
- ].reduce((e, t) => (e[t] = t, e), {}), vp = class {
13610
+ ].reduce((e, t) => (e[t] = t, e), {}), bp = class {
13547
13611
  constructor(e, { dito: t = {}, api: n, views: r = {}, ...i } = {}) {
13548
- this.el = e, this.api = n = ye({ base: "/" }, t.api, n), this.options = i, n.locale ||= "en-US", n.formats = ye({}, we, n.formats), n.request ||= (e) => pp(n, e), n.getApiUrl ||= (e) => hp(n, e), n.isApiUrl ||= (e) => mp(n, e), n.normalizePath ||= n.normalizePaths ? je : (e) => e, n.denormalizePath ||= n.normalizePaths ? be : (e) => e, n.defaults ||= {};
13612
+ this.el = e, this.api = n = ye({ base: "/" }, t.api, n), this.options = i, n.locale ||= "en-US", n.formats = ye({}, we, n.formats), n.request ||= (e) => hp(n, e), n.getApiUrl ||= (e) => _p(n, e), n.isApiUrl ||= (e) => gp(n, e), n.normalizePath ||= n.normalizePaths ? je : (e) => e, n.denormalizePath ||= n.normalizePaths ? be : (e) => e, n.defaults ||= {};
13549
13613
  let a = J(n.users, { type: "collection" }) || {};
13550
13614
  a.login = J(a.login || "login", {
13551
13615
  method: "post",
@@ -13584,11 +13648,11 @@ var _p = [
13584
13648
  DitoRoot: Go,
13585
13649
  VueNotifications: ve,
13586
13650
  ...El,
13587
- ...ap
13651
+ ...sp
13588
13652
  },
13589
13653
  provide: {
13590
13654
  api: n,
13591
- $verbs: () => _p,
13655
+ $verbs: () => yp,
13592
13656
  $views: () => {},
13593
13657
  $isPopulated: () => !0,
13594
13658
  $parentComponent: () => null,
@@ -13613,7 +13677,7 @@ var _p = [
13613
13677
  s.config.errorHandler = console.error, s.use(ve, {
13614
13678
  componentName: "VueNotifications",
13615
13679
  name: "notify"
13616
- }), s.directive("resize", op), s.use(ge({
13680
+ }), s.directive("resize", cp), s.use(ge({
13617
13681
  routes: [{
13618
13682
  name: "catch-all",
13619
13683
  path: "/:_(.*)",
@@ -13629,4 +13693,4 @@ var _p = [
13629
13693
  }
13630
13694
  };
13631
13695
  //#endregion
13632
- export { vp as default };
13696
+ export { bp as default };