@oneclick.dev/cms-core-modules 0.0.83 → 0.0.85

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.
Files changed (67) hide show
  1. package/dist/{ContentEditor-CxKirDdL.mjs → ContentEditor-C5ydvk8b.mjs} +7067 -5886
  2. package/dist/{ContentEditor-CRFkD4tE.js → ContentEditor-DiveHwSJ.js} +43 -43
  3. package/dist/{Create-CsqVYhPO.mjs → Create-6uT9HWar.mjs} +35 -35
  4. package/dist/{Create-ip0MnS0o.js → Create-DuZ5nZrX.js} +1 -1
  5. package/dist/{DateFormatter-CvOfaUnU.mjs → DateFormatter-2B0R-DY4.mjs} +204 -400
  6. package/dist/DateFormatter-DbtOLV0L.js +1 -0
  7. package/dist/{Detail-RMXFuSRQ.js → Detail-BZ-iE9vf.js} +1 -1
  8. package/dist/{Detail-B4b_FLDa.mjs → Detail-C1Blq61w.mjs} +90 -90
  9. package/dist/{Detail-BayNaAg9.js → Detail-C8wQiDcv.js} +1 -1
  10. package/dist/{Detail-CbLk1v37.mjs → Detail-CJVMJDP7.mjs} +17 -17
  11. package/dist/{Detail-CnK-qbhE.js → Detail-CPqug27l.js} +1 -1
  12. package/dist/Detail-CjuhjPby.js +1 -0
  13. package/dist/{Detail-U0mgLKt6.mjs → Detail-CtItxMX4.mjs} +62 -63
  14. package/dist/{Detail-CVgWHbMC.mjs → Detail-Dnpnmy4-.mjs} +158 -158
  15. package/dist/{Entries-D7MHylQE.mjs → Entries-BkOPae4R.mjs} +49 -49
  16. package/dist/Entries-CcEW98F5.js +1 -0
  17. package/dist/{Find-XPcJxeRH.mjs → Find-Bd1uLqSa.mjs} +55 -55
  18. package/dist/Find-D4Qa45qC.js +1 -0
  19. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs} +1 -1
  20. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-StaNp-3y.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js} +1 -1
  21. package/dist/{Overview-CwCAeBnX.js → Overview-CA8wh_BI.js} +1 -1
  22. package/dist/{Overview-CgViRnNc.mjs → Overview-D4MFwRI_.mjs} +67 -68
  23. package/dist/{Overview-B2bFNGhH.js → Overview-Da0XexiT.js} +1 -1
  24. package/dist/Overview-DeQQ0FY3.js +1 -0
  25. package/dist/{Overview--XpvBbqz.mjs → Overview-DoOASlNz.mjs} +1 -3
  26. package/dist/{Overview-Cczt_dcE.mjs → Overview-gJSvftdE.mjs} +34 -34
  27. package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs} +0 -1
  28. package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js} +1 -1
  29. package/dist/{SeoHealth-ZpvB7CS2.mjs → SeoHealth-Bc5chnaa.mjs} +14 -14
  30. package/dist/{SeoHealth-DFZ0LLBH.js → SeoHealth-BkpJ1F2Y.js} +1 -1
  31. package/dist/TableView-Ei_w_-bn.mjs +5745 -0
  32. package/dist/TableView-klOTPJKZ.js +4 -0
  33. package/dist/View-BaFlMcM6.js +1 -0
  34. package/dist/View-C4MBWRlA.mjs +28 -0
  35. package/dist/{agenda-Cl3s_FIE.mjs → agenda-C5grvzSa.mjs} +166 -169
  36. package/dist/agenda-DXMwVWpN.js +1 -0
  37. package/dist/{availability-B-tRp8hB.mjs → availability-C1NqOFsQ.mjs} +81 -81
  38. package/dist/{availability-BiBbzEIM.js → availability-D_wnfLsH.js} +1 -1
  39. package/dist/cms-core-modules.css +1 -1
  40. package/dist/{exceptions-DQPSFSj7.mjs → exceptions-BIwMhYa4.mjs} +1 -1
  41. package/dist/{exceptions-BA3PsW4n.js → exceptions-Cn7zooEu.js} +1 -1
  42. package/dist/{index-CBC9dWZ9.js → index-C9pSS15N.js} +2 -2
  43. package/dist/{index-YOOlBEZB.mjs → index-MwjeLHPP.mjs} +3 -3
  44. package/dist/index.cjs.js +1 -1
  45. package/dist/index.mjs +23 -23
  46. package/dist/{orders-DZzdsHOW.mjs → orders-DhQ2EFXS.mjs} +157 -157
  47. package/dist/orders-V1pch_ih.js +1 -0
  48. package/dist/server-handlers.cjs.js +1 -1
  49. package/dist/server-handlers.mjs +142 -147
  50. package/package.json +2 -2
  51. package/dist/DateFormatter-ls6HfWpS.js +0 -1
  52. package/dist/Detail-BcboL7NF.js +0 -1
  53. package/dist/Entries-BPkZ7Jg5.js +0 -1
  54. package/dist/Find-Ds6OvuH6.js +0 -1
  55. package/dist/Overview-B-8TLLjh.js +0 -1
  56. package/dist/TableView-BUPPcHUW.mjs +0 -89505
  57. package/dist/TableView-CksiPsTL.js +0 -586
  58. package/dist/View-DDXN0tKD.mjs +0 -25
  59. package/dist/View-DfzaVOzS.js +0 -1
  60. package/dist/agenda-rlFma_wn.js +0 -1
  61. package/dist/floating-ui.dom-B9WYoHj2.js +0 -1
  62. package/dist/floating-ui.dom-fpIfhXTZ.mjs +0 -1291
  63. package/dist/index-DYpruS-A-Cw57iwdY.mjs +0 -4210
  64. package/dist/index-DYpruS-A-DwDXo9Tq.js +0 -88
  65. package/dist/index-YMaY4uuk-BgpTtr73.js +0 -1
  66. package/dist/index-YMaY4uuk-C_xV5K9Z.mjs +0 -1300
  67. package/dist/orders-tP4WdF5q.js +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, inject as Q, ref as R, resolveComponent as a, openBlock as d, createBlock as O, withCtx as s, createVNode as n, createElementVNode as o, createTextVNode as v, isRef as N, unref as e, createElementBlock as b, toDisplayString as _, createCommentVNode as f, watch as ee, Fragment as X, renderList as H, normalizeClass as te, computed as oe, onMounted as ne, provide as se } from "vue";
1
+ import { defineComponent as B, inject as Q, ref as R, resolveComponent as i, openBlock as d, createBlock as O, withCtx as s, createVNode as n, createElementVNode as o, createTextVNode as v, isRef as N, unref as e, createElementBlock as b, toDisplayString as _, createCommentVNode as f, watch as ee, Fragment as X, renderList as H, normalizeClass as te, computed as oe, onMounted as ne, provide as se } from "vue";
2
2
  import { u as W, a as S, t as le, o as ie, p as J, c as q, s as F, b as ae, f as de } from "./vee-validate-zod-CcOwoF6y.mjs";
3
3
  import { r as j } from "./countries-BTPvmrsb.mjs";
4
4
  import { ChevronsUpDown as re, Search as ce, Check as ue, X as pe, Tag as me, ChevronRight as fe, Trash as _e, Loader2 as K } from "lucide-vue-next";
@@ -16,10 +16,10 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
16
16
  }, Se = /* @__PURE__ */ B({
17
17
  __name: "Main",
18
18
  setup(P) {
19
- const x = Q("isLoadingCompleted", R(!1)), { errors: l } = W(), { value: p } = S("title"), { value: i } = S("description"), { value: r } = S("price");
19
+ const x = Q("isLoadingCompleted", R(!1)), { errors: l } = W(), { value: u } = S("title"), { value: a } = S("description"), { value: r } = S("price");
20
20
  return (g, t) => {
21
- const m = a("Label"), h = a("Input"), C = a("Textarea"), I = a("CardContent"), z = a("Card");
22
- return d(), O(z, null, {
21
+ const m = i("Label"), h = i("Input"), C = i("Textarea"), I = i("CardContent"), T = i("Card");
22
+ return d(), O(T, null, {
23
23
  default: s(() => [
24
24
  n(I, { class: "flex flex-col gap-4" }, {
25
25
  default: s(() => [
@@ -38,8 +38,8 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
38
38
  type: "text",
39
39
  id: "title",
40
40
  placeholder: e(x) ? "Fast shipping" : "",
41
- modelValue: e(p),
42
- "onUpdate:modelValue": t[0] || (t[0] = (M) => N(p) ? p.value = M : null)
41
+ modelValue: e(u),
42
+ "onUpdate:modelValue": t[0] || (t[0] = (M) => N(u) ? u.value = M : null)
43
43
  }, null, 8, ["placeholder", "modelValue"]),
44
44
  e(l).title ? (d(), b("p", ye, _(e(l).title), 1)) : f("", !0)
45
45
  ])
@@ -58,8 +58,8 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
58
58
  n(C, {
59
59
  id: "description",
60
60
  placeholder: e(x) ? "Ships next day" : "",
61
- modelValue: e(i),
62
- "onUpdate:modelValue": t[1] || (t[1] = (M) => N(i) ? i.value = M : null)
61
+ modelValue: e(a),
62
+ "onUpdate:modelValue": t[1] || (t[1] = (M) => N(a) ? a.value = M : null)
63
63
  }, null, 8, ["placeholder", "modelValue"]),
64
64
  e(l).description ? (d(), b("p", Oe, _(e(l).description), 1)) : f("", !0)
65
65
  ])
@@ -102,32 +102,32 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
102
102
  __name: "Countries",
103
103
  setup(P) {
104
104
  const { errors: x } = W(), { value: l } = S("countries");
105
- return ee(l, (p) => {
106
- let i = p?.sort((g, t) => !g || !t ? 0 : j.find((m) => m.cca2 === g)?.name.common.localeCompare(j.find((m) => m.cca2 === t)?.name.common)), r = !0;
107
- for (let g = 0; g < p.length; g++)
108
- if (p[g] !== l.value[g]) {
105
+ return ee(l, (u) => {
106
+ let a = u?.sort((g, t) => !g || !t ? 0 : j.find((m) => m.cca2 === g)?.name.common.localeCompare(j.find((m) => m.cca2 === t)?.name.common)), r = !0;
107
+ for (let g = 0; g < u.length; g++)
108
+ if (u[g] !== l.value[g]) {
109
109
  r = !1;
110
110
  break;
111
111
  }
112
- r || (l.value = i);
113
- }), (p, i) => {
114
- const r = a("Label"), g = a("Button"), t = a("ComboboxTrigger"), m = a("ComboboxAnchor"), h = a("ComboboxInput"), C = a("ComboboxEmpty"), I = a("ComboboxItemIndicator"), z = a("ComboboxItem"), M = a("ComboboxGroup"), w = a("ComboboxList"), G = a("Combobox"), D = a("CardContent"), U = a("Card");
115
- return d(), O(U, null, {
112
+ r || (l.value = a);
113
+ }), (u, a) => {
114
+ const r = i("Label"), g = i("Button"), t = i("ComboboxTrigger"), m = i("ComboboxAnchor"), h = i("ComboboxInput"), C = i("ComboboxEmpty"), I = i("ComboboxItemIndicator"), T = i("ComboboxItem"), M = i("ComboboxGroup"), w = i("ComboboxList"), G = i("Combobox"), D = i("CardContent"), z = i("Card");
115
+ return d(), O(z, null, {
116
116
  default: s(() => [
117
117
  n(D, { class: "flex flex-col gap-4" }, {
118
118
  default: s(() => [
119
- i[3] || (i[3] = o("h3", { class: "text-lg font-semibold mb-4" }, "Countries", -1)),
119
+ a[3] || (a[3] = o("h3", { class: "text-lg font-semibold mb-4" }, "Countries", -1)),
120
120
  o("div", Ne, [
121
121
  o("div", Le, [
122
122
  n(r, { class: "text-sm mb-2" }, {
123
- default: s(() => [...i[1] || (i[1] = [
123
+ default: s(() => [...a[1] || (a[1] = [
124
124
  v("For which countries should this option be available?", -1)
125
125
  ])]),
126
126
  _: 1
127
127
  }),
128
128
  n(G, {
129
129
  modelValue: e(l),
130
- "onUpdate:modelValue": i[0] || (i[0] = (y) => N(l) ? l.value = y : null),
130
+ "onUpdate:modelValue": a[0] || (a[0] = (y) => N(l) ? l.value = y : null),
131
131
  multiple: !0
132
132
  }, {
133
133
  default: s(() => [
@@ -163,14 +163,14 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
163
163
  ])
164
164
  ]),
165
165
  n(C, null, {
166
- default: s(() => [...i[2] || (i[2] = [
166
+ default: s(() => [...a[2] || (a[2] = [
167
167
  v(" No countries found. ", -1)
168
168
  ])]),
169
169
  _: 1
170
170
  }),
171
171
  n(M, { class: "max-h-72 overflow-y-scroll" }, {
172
172
  default: s(() => [
173
- (d(!0), b(X, null, H(e(j), (y) => (d(), O(z, {
173
+ (d(!0), b(X, null, H(e(j), (y) => (d(), O(T, {
174
174
  key: y.cca2,
175
175
  value: y.cca2
176
176
  }, {
@@ -244,19 +244,19 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
244
244
  }, ct = /* @__PURE__ */ B({
245
245
  __name: "Condition",
246
246
  setup(P) {
247
- const x = Q("isLoadingCompleted", R(!1)), { errors: l } = W(), { value: p } = S("condition"), { value: i } = S("condition_min"), { value: r } = S("condition_max");
247
+ const x = Q("isLoadingCompleted", R(!1)), { errors: l } = W(), { value: u } = S("condition"), { value: a } = S("condition_min"), { value: r } = S("condition_max");
248
248
  return (g, t) => {
249
- const m = a("RadioGroupItem"), h = a("Label"), C = a("RadioGroup"), I = a("Input"), z = a("CardContent"), M = a("Card");
249
+ const m = i("RadioGroupItem"), h = i("Label"), C = i("RadioGroup"), I = i("Input"), T = i("CardContent"), M = i("Card");
250
250
  return d(), O(M, null, {
251
251
  default: s(() => [
252
- n(z, { class: "flex flex-col gap-4" }, {
252
+ n(T, { class: "flex flex-col gap-4" }, {
253
253
  default: s(() => [
254
254
  t[16] || (t[16] = o("h3", { class: "text-lg font-semibold mb-4" }, "Condition", -1)),
255
255
  t[17] || (t[17] = o("p", null, " Specify when this option should be available ", -1)),
256
256
  n(C, {
257
257
  "default-value": "always",
258
- modelValue: e(p),
259
- "onUpdate:modelValue": t[0] || (t[0] = (w) => N(p) ? p.value = w : null),
258
+ modelValue: e(u),
259
+ "onUpdate:modelValue": t[0] || (t[0] = (w) => N(u) ? u.value = w : null),
260
260
  class: te(["flex flex-col transition-all duration-300", { "opacity-0 pointer-events-none": !e(x) }])
261
261
  }, {
262
262
  default: s(() => [
@@ -299,7 +299,7 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
299
299
  ]),
300
300
  _: 1
301
301
  }, 8, ["modelValue", "class"]),
302
- e(p) === "weight_based" ? (d(), b("div", qe, [
302
+ e(u) === "weight_based" ? (d(), b("div", qe, [
303
303
  o("div", We, [
304
304
  o("div", Xe, [
305
305
  n(h, {
@@ -317,8 +317,8 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
317
317
  id: "condition_min",
318
318
  min: "0",
319
319
  placeholder: "0",
320
- modelValue: e(i),
321
- "onUpdate:modelValue": t[1] || (t[1] = (w) => N(i) ? i.value = w : null),
320
+ modelValue: e(a),
321
+ "onUpdate:modelValue": t[1] || (t[1] = (w) => N(a) ? a.value = w : null),
322
322
  class: "no-spinner pr-10"
323
323
  }, null, 8, ["modelValue"]),
324
324
  t[9] || (t[9] = o("span", { class: "absolute pointer-events-none top-1/2 right-3 -translate-y-1/2 text-sm text-muted-foreground" }, "kg", -1))
@@ -352,7 +352,7 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
352
352
  e(l).condition_max ? (d(), b("p", et, _(e(l).condition_max), 1)) : f("", !0)
353
353
  ])
354
354
  ])
355
- ])) : e(p) === "price_based" ? (d(), b("div", tt, [
355
+ ])) : e(u) === "price_based" ? (d(), b("div", tt, [
356
356
  o("div", ot, [
357
357
  o("div", nt, [
358
358
  n(h, {
@@ -370,8 +370,8 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
370
370
  id: "condition_min",
371
371
  min: "0",
372
372
  placeholder: "0, 00",
373
- modelValue: e(i),
374
- "onUpdate:modelValue": t[3] || (t[3] = (w) => N(i) ? i.value = w : null),
373
+ modelValue: e(a),
374
+ "onUpdate:modelValue": t[3] || (t[3] = (w) => N(a) ? a.value = w : null),
375
375
  class: "no-spinner pl-8"
376
376
  }, null, 8, ["modelValue"]),
377
377
  t[13] || (t[13] = o("span", { class: "absolute pointer-events-none top-1/2 left-3 -translate-y-1/2 text-sm text-muted-foreground" }, "€", -1))
@@ -420,9 +420,9 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
420
420
  }, _t = { class: "ml-auto shrink-0" }, xt = { class: "font-bold" }, vt = /* @__PURE__ */ B({
421
421
  __name: "Example",
422
422
  setup(P) {
423
- const { value: x } = S("title"), { value: l } = S("description"), { value: p } = S("price");
424
- return (i, r) => {
425
- const g = a("CardContent"), t = a("Card");
423
+ const { value: x } = S("title"), { value: l } = S("description"), { value: u } = S("price");
424
+ return (a, r) => {
425
+ const g = i("CardContent"), t = i("Card");
426
426
  return d(), O(t, null, {
427
427
  default: s(() => [
428
428
  n(g, null, {
@@ -439,7 +439,7 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
439
439
  e(l) ? (d(), b("p", ft, _(e(l)), 1)) : f("", !0)
440
440
  ]),
441
441
  o("div", _t, [
442
- o("p", xt, _(e(p) ? "€" + e(p).toFixed(2) : "FREE"), 1)
442
+ o("p", xt, _(e(u) ? "€" + e(u).toFixed(2) : "FREE"), 1)
443
443
  ])
444
444
  ])
445
445
  ]),
@@ -462,26 +462,26 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
462
462
  }
463
463
  },
464
464
  setup(P) {
465
- const x = P, { hasPermission: l, hasAnyPermission: p } = xe(), { params: i, navigateTo: r } = ve(), { confirm: g } = be(), t = ge(x.config.project), m = oe(() => !i.value.optionId || i.value.optionId === "new"), h = R(!1), C = R(!1), I = le(ie({
465
+ const x = P, { hasPermission: l, hasAnyPermission: u } = xe(), { params: a, navigateTo: r } = ve(), { confirm: g } = be(), t = ge(x.config.project), m = oe(() => !a.value.optionId || a.value.optionId === "new"), h = R(!1), C = R(!1), I = le(ie({
466
466
  id: F().optional(),
467
467
  status: F().optional(),
468
468
  title: F().min(1, "Title is required"),
469
469
  description: F().optional(),
470
470
  price: J(
471
- (u) => u === "" ? void 0 : u,
471
+ (p) => p === "" ? void 0 : p,
472
472
  q.number().positive("Must be positive").optional()
473
473
  ),
474
474
  countries: ae(F()).optional(),
475
475
  condition: F(),
476
476
  condition_min: J(
477
- (u) => u === "" ? void 0 : u,
477
+ (p) => p === "" ? void 0 : p,
478
478
  q.number().positive("Must be positive").optional()
479
479
  ),
480
480
  condition_max: J(
481
- (u) => u === "" ? void 0 : u,
481
+ (p) => p === "" ? void 0 : p,
482
482
  q.number().positive("Must be positive").optional()
483
483
  )
484
- })), { handleSubmit: z, errors: M, values: w, setValues: G } = de({
484
+ })), { handleSubmit: T, errors: M, values: w, setValues: G } = de({
485
485
  validationSchema: I,
486
486
  initialValues: {
487
487
  status: "published",
@@ -492,33 +492,32 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
492
492
  he(() => [
493
493
  { text: w.title ?? "New Option" }
494
494
  ]);
495
- const D = z(async (u) => {
495
+ const D = T(async (p) => {
496
496
  C.value = !0;
497
- let c = await U() || [];
497
+ let c = await z() || [];
498
498
  if (m.value) {
499
- let k = JSON.parse(JSON.stringify(u));
499
+ let k = JSON.parse(JSON.stringify(p));
500
500
  k.id = crypto.randomUUID();
501
501
  const V = [...c, k], $ = x.config.shippingOptionsCollection.split(":");
502
502
  await t.update($[0], null, { [$[1]]: V }), r(k.id), E.success("Shipping option created");
503
503
  } else {
504
- let k = JSON.parse(JSON.stringify(u));
505
- const V = c.map((T) => T.id === i.value.optionId ? k : T), $ = x.config.shippingOptionsCollection.split(":");
506
- await t.update($[0], null, { [$[1]]: V }), r(`${i.value.optionId}`), E.success("Shipping option updated");
504
+ let k = JSON.parse(JSON.stringify(p));
505
+ const V = c.map((U) => U.id === a.value.optionId ? k : U), $ = x.config.shippingOptionsCollection.split(":");
506
+ await t.update($[0], null, { [$[1]]: V }), r(`${a.value.optionId}`), E.success("Shipping option updated");
507
507
  }
508
508
  C.value = !1;
509
- }), U = async () => {
509
+ }), z = async () => {
510
510
  if (!x.config.shippingOptionsCollection) return [];
511
- const u = x.config.shippingOptionsCollection.split(":");
512
- return u.length !== 2 ? [] : (await t.get(u[0]))?.[u[1]] || [];
511
+ const p = x.config.shippingOptionsCollection.split(":");
512
+ return p.length !== 2 ? [] : (await t.get(p[0]))?.[p[1]] || [];
513
513
  }, y = async () => {
514
- const c = (await U()).find((k) => k.id === i.value.optionId);
514
+ const c = (await z()).find((k) => k.id === a.value.optionId);
515
515
  G(c), h.value = !0;
516
516
  }, L = async () => {
517
517
  try {
518
- const u = await U();
519
- let c = { ...[...u || []].find((T) => T.id === i.value.optionId) };
520
- console.log(u, i.value.optionId, u.find((T) => T.id === i.value.optionId)), c.id = crypto.randomUUID(), c.status = "published", c.title = c.title + " (copy)";
521
- const V = [...await U() || [], c], $ = x.config.shippingOptionsCollection.split(":");
518
+ let c = { ...[...await z() || []].find((U) => U.id === a.value.optionId) };
519
+ c.id = crypto.randomUUID(), c.status = "published", c.title = c.title + " (copy)";
520
+ const V = [...await z() || [], c], $ = x.config.shippingOptionsCollection.split(":");
522
521
  await t.update($[0], null, { [$[1]]: V }), r(c.id), E.success("Option duplicated");
523
522
  } catch {
524
523
  E.error("Failed to duplicate option");
@@ -526,9 +525,9 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
526
525
  }, A = async () => {
527
526
  if (await g("Are you sure you want to delete this option?"))
528
527
  try {
529
- const c = await U() || [];
530
- if (c.length === 0 || !i.value.optionId) throw new Error("Error loading values");
531
- const k = c.filter(($) => $.id !== i.value.optionId), V = x.config.shippingOptionsCollection.split(":");
528
+ const c = await z() || [];
529
+ if (c.length === 0 || !a.value.optionId) throw new Error("Error loading values");
530
+ const k = c.filter(($) => $.id !== a.value.optionId), V = x.config.shippingOptionsCollection.split(":");
532
531
  await t.update(V[0], null, { [V[1]]: k }), r(""), E.success("Option deleted");
533
532
  } catch {
534
533
  E.error("Failed to delete option");
@@ -536,8 +535,8 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
536
535
  };
537
536
  return ne(() => {
538
537
  m.value ? h.value = !0 : y();
539
- }), se("isLoadingCompleted", h), (u, c) => {
540
- const k = a("Button"), V = a("MenubarTrigger"), $ = a("MenubarMenu"), T = a("MenubarItem"), Y = a("MenubarContent"), Z = a("Menubar");
538
+ }), se("isLoadingCompleted", h), (p, c) => {
539
+ const k = i("Button"), V = i("MenubarTrigger"), $ = i("MenubarMenu"), U = i("MenubarItem"), Y = i("MenubarContent"), Z = i("Menubar");
541
540
  return d(), b("div", bt, [
542
541
  o("div", gt, [
543
542
  o("div", ht, [
@@ -569,7 +568,7 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
569
568
  ]),
570
569
  _: 1
571
570
  })) : f("", !0),
572
- e(p)("edit-collection", "delete-option") ? (d(), O($, { key: 1 }, {
571
+ e(u)("edit-collection", "delete-option") ? (d(), O($, { key: 1 }, {
573
572
  default: s(() => [
574
573
  n(V, null, {
575
574
  default: s(() => [...c[2] || (c[2] = [
@@ -579,7 +578,7 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
579
578
  }),
580
579
  n(Y, null, {
581
580
  default: s(() => [
582
- e(l)("delete-option") ? (d(), O(T, {
581
+ e(l)("delete-option") ? (d(), O(U, {
583
582
  key: 0,
584
583
  variant: "destructive",
585
584
  onClick: A
@@ -610,7 +609,7 @@ const Ce = { class: "flex flex-col gap-4" }, we = { class: "flex flex-col gap-2"
610
609
  n(vt)
611
610
  ])
612
611
  ]),
613
- e(p)("create-option", "edit-option") ? (d(), b("div", $t, [
612
+ e(u)("create-option", "edit-option") ? (d(), b("div", $t, [
614
613
  o("div", Ot, [
615
614
  m.value && e(l)("create-option") ? (d(), O(k, {
616
615
  key: 0,