@oneclick.dev/cms-core-modules 0.0.53 → 0.0.54

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 (126) hide show
  1. package/dist/CalendarDate-CRT2Viyt.mjs +830 -0
  2. package/dist/CalendarDate-CWtpXgpD.js +1 -0
  3. package/dist/Components-D9yIIosM.mjs +623 -0
  4. package/dist/Components-DXbx0RLV.js +1 -0
  5. package/dist/ContentEditor-DRJFQKCv.mjs +34915 -0
  6. package/dist/ContentEditor-DzTi8fSZ.js +290 -0
  7. package/dist/Create-BP8TX6rj.js +1 -0
  8. package/dist/Create-Bwf1RXdG.mjs +1248 -0
  9. package/dist/DateFormatter-BbcSwTs4.js +1 -0
  10. package/dist/DateFormatter-CbO0PVUK.mjs +99 -0
  11. package/dist/Detail-B-PnkcXD.mjs +3473 -0
  12. package/dist/Detail-BVlGSjOq.mjs +380 -0
  13. package/dist/Detail-C4E1T87K.mjs +26 -0
  14. package/dist/Detail-CNfTDUE5.js +1 -0
  15. package/dist/Detail-Cd5CBVN0.js +1 -0
  16. package/dist/Detail-CpfOQChd.mjs +585 -0
  17. package/dist/Detail-CwagT6gQ.mjs +650 -0
  18. package/dist/Detail-DUo6qKqO.js +1 -0
  19. package/dist/Detail-Dd_OkpcN.js +1 -0
  20. package/dist/Detail-mvSGbnFU.js +1 -0
  21. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +1 -0
  22. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +55 -0
  23. package/dist/Entries-DcpPvlYj.js +1 -0
  24. package/dist/Entries-QLMtTYLX.mjs +713 -0
  25. package/dist/Find-BPR0uU-Z.mjs +229 -0
  26. package/dist/Find-BidEQJxT.js +1 -0
  27. package/dist/GlobalStyling-CMzPRd18.js +17 -0
  28. package/dist/GlobalStyling-DoLHUJeV.mjs +988 -0
  29. package/dist/Overview-BDlBCUI_.js +1 -0
  30. package/dist/Overview-BH3NwvNX.mjs +26 -0
  31. package/dist/Overview-BLsZMHNW.mjs +178 -0
  32. package/dist/Overview-BNMZ9MUK.js +1 -0
  33. package/dist/Overview-BbvfH1u-.js +1 -0
  34. package/dist/Overview-CDN88OSM.mjs +190 -0
  35. package/dist/Overview-CEPodGCn.mjs +311 -0
  36. package/dist/Overview-CvquDPhB.js +1 -0
  37. package/dist/Overview-D54pjmI6.mjs +633 -0
  38. package/dist/Overview-D67UjG6n.mjs +947 -0
  39. package/dist/Overview-KT2Mgfh5.js +1 -0
  40. package/dist/Overview-T-lsy3UZ.js +1 -0
  41. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +1 -0
  42. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +392 -0
  43. package/dist/TableView-CpO53xcX.js +111 -0
  44. package/dist/TableView-D9J5rUls.mjs +72921 -0
  45. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +1 -0
  46. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs +40 -0
  47. package/dist/View-DlHBZbFu.js +1 -0
  48. package/dist/View-Dv5QMrSn.mjs +25 -0
  49. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  50. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  51. package/dist/agenda-B49oKGeh.mjs +706 -0
  52. package/dist/agenda-DipQ5IWP.js +1 -0
  53. package/dist/availability-C7q9tq6l.js +1 -0
  54. package/dist/availability-DeCkqiu8.mjs +613 -0
  55. package/dist/cms-core-modules.css +1 -1
  56. package/dist/countries-BTPvmrsb.mjs +4 -0
  57. package/dist/countries-CgZ081No.js +1 -0
  58. package/dist/exceptions-D3b18TiY.mjs +647 -0
  59. package/dist/exceptions-DJ9zWX3k.js +1 -0
  60. package/dist/floating-ui.dom-C82nbomj.js +1 -0
  61. package/dist/floating-ui.dom-ouSgPqty.mjs +1133 -0
  62. package/dist/google-CvtuJwgk.mjs +4 -0
  63. package/dist/google-D4N3gb01.js +1 -0
  64. package/dist/index--jjEzba7.mjs +24 -0
  65. package/dist/index-9HVlmvK3.js +1 -0
  66. package/dist/index-BEGU8Kme.mjs +12 -0
  67. package/dist/index-Bwi1mtkq.mjs +24 -0
  68. package/dist/index-BzuHN-r8.mjs +24 -0
  69. package/dist/index-CImCyE3L.mjs +24 -0
  70. package/dist/index-CKPshlZ8-BQiiP6r_.mjs +1264 -0
  71. package/dist/index-CKPshlZ8-CIz1tDwX.js +1 -0
  72. package/dist/index-CQiY-oTN.mjs +24 -0
  73. package/dist/index-CSxYBeVA.js +1 -0
  74. package/dist/index-CkiNvRzs.js +1 -0
  75. package/dist/index-Co4ON2Di.js +1 -0
  76. package/dist/index-CwqrAU-H.js +1 -0
  77. package/dist/index-Cz-baGax.js +1 -0
  78. package/dist/index-D2a6wEPh.js +1 -0
  79. package/dist/index-DFQGVHTs.js +1 -0
  80. package/dist/index-DI6mydpm.mjs +138 -0
  81. package/dist/index-DMoyoaks.mjs +22 -0
  82. package/dist/index-DT1wWnUk.mjs +24 -0
  83. package/dist/index-DUeFrD-B.js +1 -0
  84. package/dist/index-DsnoK4ia.mjs +579 -0
  85. package/dist/index-R2oUDsjx.js +1 -0
  86. package/dist/index-RLz1QPrf.mjs +203 -0
  87. package/dist/index-UtjLbLw-.js +1 -0
  88. package/dist/index-_mG-aU3Z.mjs +87 -0
  89. package/dist/index-_sQDF1pH.js +1 -0
  90. package/dist/index-ijdf0d9-.js +1 -0
  91. package/dist/index-klI238nT.mjs +24 -0
  92. package/dist/index.cjs.js +1 -330
  93. package/dist/index.mjs +287 -69051
  94. package/dist/interpolation-BNUjI7LH.js +1 -0
  95. package/dist/interpolation-BpGXqOz8.mjs +59 -0
  96. package/dist/payment-kTjsV0Jj.js +1 -0
  97. package/dist/payment-zpCM0LD-.mjs +981 -0
  98. package/dist/regular-C4_3YXqx.mjs +602 -0
  99. package/dist/regular-DFwPEbZO.js +1 -0
  100. package/dist/regular-slots-4ooEpICB.mjs +67 -0
  101. package/dist/regular-slots-BAVGbomI.js +1 -0
  102. package/dist/resources-MpQkSstv.mjs +563 -0
  103. package/dist/resources-iM28T3dD.js +1 -0
  104. package/dist/src/appointments/index.d.ts +4 -28
  105. package/dist/src/appointments/routes.d.ts +3 -9
  106. package/dist/src/content-manager/index.d.ts +5 -147
  107. package/dist/src/content-manager/routes.d.ts +4 -128
  108. package/dist/src/custom/index.d.ts +2 -2
  109. package/dist/src/custom/routes.d.ts +1 -1
  110. package/dist/src/mail-templates/index.d.ts +2 -30
  111. package/dist/src/mail-templates/routes.d.ts +1 -11
  112. package/dist/src/product-collections/index.d.ts +2 -30
  113. package/dist/src/product-collections/routes.d.ts +1 -11
  114. package/dist/src/products/index.d.ts +2 -30
  115. package/dist/src/products/routes.d.ts +1 -11
  116. package/dist/src/promo-codes/index.d.ts +2 -30
  117. package/dist/src/promo-codes/routes.d.ts +1 -11
  118. package/dist/src/shipping-options/index.d.ts +2 -30
  119. package/dist/src/shipping-options/routes.d.ts +1 -11
  120. package/dist/src/table/index.d.ts +2 -70
  121. package/dist/src/table/routes.d.ts +1 -51
  122. package/dist/utils-BVKy9S2J.mjs +29 -0
  123. package/dist/utils-D6CaKJbp.js +2 -0
  124. package/dist/vee-validate-zod-BPQyEfpF.js +1 -0
  125. package/dist/vee-validate-zod-IXkfh-6Q.mjs +4402 -0
  126. package/package.json +3 -3
@@ -0,0 +1,203 @@
1
+ import { isVNode as p } from "vue";
2
+ let b = 1;
3
+ var a = class {
4
+ subscribers;
5
+ toasts;
6
+ dismissedToasts;
7
+ constructor() {
8
+ this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
9
+ }
10
+ subscribe = (t) => (this.subscribers.push(t), () => {
11
+ const s = this.subscribers.indexOf(t);
12
+ this.subscribers.splice(s, 1);
13
+ });
14
+ publish = (t) => {
15
+ this.subscribers.forEach((s) => s(t));
16
+ };
17
+ addToast = (t) => {
18
+ this.publish(t), this.toasts = [...this.toasts, t];
19
+ };
20
+ create = (t) => {
21
+ const { message: s, ...e } = t, n = typeof t.id == "number" || t.id && t.id?.length > 0 ? t.id : b++, c = this.toasts.find((f) => f.id === n), r = t.dismissible === void 0 ? !0 : t.dismissible;
22
+ return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), c ? this.toasts = this.toasts.map((f) => f.id === n ? (this.publish({
23
+ ...f,
24
+ ...t,
25
+ id: n,
26
+ title: s
27
+ }), {
28
+ ...f,
29
+ ...t,
30
+ id: n,
31
+ dismissible: r,
32
+ title: s
33
+ }) : f) : this.addToast({
34
+ title: s,
35
+ ...e,
36
+ dismissible: r,
37
+ id: n
38
+ }), n;
39
+ };
40
+ dismiss = (t) => (t ? (this.dismissedToasts.add(t), requestAnimationFrame(() => this.subscribers.forEach((s) => s({
41
+ id: t,
42
+ dismiss: !0
43
+ })))) : this.toasts.forEach((s) => {
44
+ this.subscribers.forEach((e) => e({
45
+ id: s.id,
46
+ dismiss: !0
47
+ }));
48
+ }), t);
49
+ message = (t, s) => this.create({
50
+ ...s,
51
+ message: t,
52
+ type: "default"
53
+ });
54
+ error = (t, s) => this.create({
55
+ ...s,
56
+ type: "error",
57
+ message: t
58
+ });
59
+ success = (t, s) => this.create({
60
+ ...s,
61
+ type: "success",
62
+ message: t
63
+ });
64
+ info = (t, s) => this.create({
65
+ ...s,
66
+ type: "info",
67
+ message: t
68
+ });
69
+ warning = (t, s) => this.create({
70
+ ...s,
71
+ type: "warning",
72
+ message: t
73
+ });
74
+ loading = (t, s) => this.create({
75
+ ...s,
76
+ type: "loading",
77
+ message: t
78
+ });
79
+ promise = (t, s) => {
80
+ if (!s) return;
81
+ let e;
82
+ s.loading !== void 0 && (e = this.create({
83
+ ...s,
84
+ promise: t,
85
+ type: "loading",
86
+ message: s.loading,
87
+ description: typeof s.description != "function" ? s.description : void 0
88
+ }));
89
+ const n = Promise.resolve(t instanceof Function ? t() : t);
90
+ let c = e !== void 0, r;
91
+ const f = n.then(async (i) => {
92
+ if (r = ["resolve", i], p(i))
93
+ c = !1, this.create({
94
+ id: e,
95
+ type: "default",
96
+ message: i
97
+ });
98
+ else if (T(i) && !i.ok) {
99
+ c = !1;
100
+ const o = typeof s.error == "function" ? await s.error(`HTTP error! status: ${i.status}`) : s.error, l = typeof s.description == "function" ? await s.description(`HTTP error! status: ${i.status}`) : s.description, h = typeof o == "object" && !p(o) ? o : {
101
+ message: o || "",
102
+ id: e || ""
103
+ };
104
+ this.create({
105
+ id: e,
106
+ type: "error",
107
+ description: l,
108
+ ...h
109
+ });
110
+ } else if (i instanceof Error) {
111
+ c = !1;
112
+ const o = typeof s.error == "function" ? await s.error(i) : s.error, l = typeof s.description == "function" ? await s.description(i) : s.description, h = typeof o == "object" && !p(o) ? o : {
113
+ message: o || "",
114
+ id: e || ""
115
+ };
116
+ this.create({
117
+ id: e,
118
+ type: "error",
119
+ description: l,
120
+ ...h
121
+ });
122
+ } else if (s.success !== void 0) {
123
+ c = !1;
124
+ const o = typeof s.success == "function" ? await s.success(i) : s.success, l = typeof s.description == "function" ? await s.description(i) : s.description, h = typeof o == "object" && !p(o) ? o : {
125
+ message: o || "",
126
+ id: e || ""
127
+ };
128
+ this.create({
129
+ id: e,
130
+ type: "success",
131
+ description: l,
132
+ ...h
133
+ });
134
+ }
135
+ }).catch(async (i) => {
136
+ if (r = ["reject", i], s.error !== void 0) {
137
+ c = !1;
138
+ const d = typeof s.error == "function" ? await s.error(i) : s.error, o = typeof s.description == "function" ? await s.description(i) : s.description, m = typeof d == "object" && !p(d) ? d : {
139
+ message: d || "",
140
+ id: e || ""
141
+ };
142
+ this.create({
143
+ id: e,
144
+ type: "error",
145
+ description: o,
146
+ ...m
147
+ });
148
+ }
149
+ }).finally(() => {
150
+ c && (this.dismiss(e), e = void 0), s.finally?.();
151
+ }), y = () => new Promise((i, d) => f.then(() => r[0] === "reject" ? d(r[1]) : i(r[1])).catch(d));
152
+ return typeof e != "string" && typeof e != "number" ? { unwrap: y } : Object.assign(e, { unwrap: y });
153
+ };
154
+ custom = (t, s) => {
155
+ const e = s?.id || b++, n = this.toasts.find((r) => r.id === e), c = s?.dismissible === void 0 ? !0 : s.dismissible;
156
+ return this.dismissedToasts.has(e) && this.dismissedToasts.delete(e), n ? this.toasts = this.toasts.map((r) => r.id === e ? (this.publish({
157
+ ...r,
158
+ component: t,
159
+ dismissible: c,
160
+ id: e,
161
+ ...s
162
+ }), {
163
+ ...r,
164
+ component: t,
165
+ dismissible: c,
166
+ id: e,
167
+ ...s
168
+ }) : r) : this.addToast({
169
+ component: t,
170
+ dismissible: c,
171
+ id: e,
172
+ ...s
173
+ }), e;
174
+ };
175
+ getActiveToasts = () => this.toasts.filter((t) => !this.dismissedToasts.has(t.id));
176
+ };
177
+ const u = new a();
178
+ function g(t, s) {
179
+ const e = s?.id || b++;
180
+ return u.create({
181
+ message: t,
182
+ id: e,
183
+ type: "default",
184
+ ...s
185
+ }), e;
186
+ }
187
+ const T = (t) => t && typeof t == "object" && "ok" in t && typeof t.ok == "boolean" && "status" in t && typeof t.status == "number", w = g, E = () => u.toasts, v = () => u.getActiveToasts(), R = Object.assign(w, {
188
+ success: u.success,
189
+ info: u.info,
190
+ warning: u.warning,
191
+ error: u.error,
192
+ custom: u.custom,
193
+ message: u.message,
194
+ promise: u.promise,
195
+ dismiss: u.dismiss,
196
+ loading: u.loading
197
+ }, {
198
+ getHistory: E,
199
+ getToasts: v
200
+ });
201
+ export {
202
+ R as t
203
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("@oneclick.dev/cms-kit"),r={class:"relative flex flex-1 @container"},c=e.defineComponent({__name:"index",props:{config:{type:Object,required:!0},routes:{type:Array,required:!0}},setup(t){const{pageComponent:o}=n.useModuleRoute();return(i,u)=>(e.openBlock(),e.createElementBlock("div",r,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)),{config:t.config},null,8,["config"]))]))}});exports.default=c;
@@ -0,0 +1,87 @@
1
+ import { onMounted as w, nextTick as y, watch as b, getCurrentScope as T, onScopeDispose as F, getCurrentInstance as g, toValue as l } from "vue";
2
+ function S(e) {
3
+ return T() ? (F(e), !0) : !1;
4
+ }
5
+ const v = typeof window < "u" && typeof document < "u";
6
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
7
+ const p = () => {
8
+ };
9
+ function d(e, r) {
10
+ function n(...t) {
11
+ return new Promise((o, i) => {
12
+ Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(o).catch(i);
13
+ });
14
+ }
15
+ return n;
16
+ }
17
+ const x = (e) => e();
18
+ function m(e, r = {}) {
19
+ let n, t, o = p;
20
+ const i = (c) => {
21
+ clearTimeout(c), o(), o = p;
22
+ };
23
+ let a;
24
+ return (c) => {
25
+ const f = l(e), s = l(r.maxWait);
26
+ return n && i(n), f <= 0 || s !== void 0 && s <= 0 ? (t && (i(t), t = void 0), Promise.resolve(c())) : new Promise((u, h) => {
27
+ o = r.rejectOnCancel ? h : u, a = c, s && !t && (t = setTimeout(() => {
28
+ n && i(n), t = void 0, u(a());
29
+ }, s)), n = setTimeout(() => {
30
+ t && i(t), t = void 0, u(c());
31
+ }, f);
32
+ });
33
+ };
34
+ }
35
+ function A(e) {
36
+ return Array.isArray(e) ? e : [e];
37
+ }
38
+ function W(e) {
39
+ return g();
40
+ }
41
+ // @__NO_SIDE_EFFECTS__
42
+ function P(e, r = 200, n = {}) {
43
+ return d(
44
+ m(r, n),
45
+ e
46
+ );
47
+ }
48
+ function C(e, r, n = {}) {
49
+ const {
50
+ eventFilter: t = x,
51
+ ...o
52
+ } = n;
53
+ return b(
54
+ e,
55
+ d(
56
+ t,
57
+ r
58
+ ),
59
+ o
60
+ );
61
+ }
62
+ function j(e, r = !0, n) {
63
+ W() ? w(e, n) : r ? e() : y(e);
64
+ }
65
+ function k(e, r, n = {}) {
66
+ const {
67
+ debounce: t = 0,
68
+ maxWait: o = void 0,
69
+ ...i
70
+ } = n;
71
+ return C(
72
+ e,
73
+ r,
74
+ {
75
+ ...i,
76
+ eventFilter: m(t, { maxWait: o })
77
+ }
78
+ );
79
+ }
80
+ export {
81
+ S as a,
82
+ A as b,
83
+ v as i,
84
+ j as t,
85
+ P as u,
86
+ k as w
87
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js"),v=require("@oneclick.dev/cms-kit"),r=require("lucide-vue-next"),w={key:0,class:"flex items-center justify-center py-20"},S={key:1,class:"space-y-8"},z={class:"flex items-start justify-between"},B={class:"text-2xl font-semibold tracking-tight"},D={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},$={class:"flex items-center justify-between"},T={class:"p-2 rounded-lg bg-violet-100 dark:bg-violet-500/20"},j={class:"mt-3"},A={class:"text-2xl font-bold"},R={class:"flex items-center justify-between"},L={class:"p-2 rounded-lg bg-blue-100 dark:bg-blue-500/20"},P={class:"mt-3"},O={class:"text-2xl font-bold"},U={class:"flex items-center justify-between"},F={class:"p-2 rounded-lg bg-amber-100 dark:bg-amber-500/20"},M={class:"mt-3"},q={class:"text-2xl font-bold"},W={class:"flex items-center justify-between"},H={class:"p-2 rounded-lg bg-emerald-100 dark:bg-emerald-500/20"},I={class:"mt-3"},G={class:"text-2xl font-bold"},K={class:"grid md:grid-cols-3 gap-6"},X={class:"md:col-span-2 space-y-6"},J={class:"flex items-center justify-between"},Q={class:"flex gap-2"},Y={class:"text-xs font-medium text-muted-foreground mb-1"},Z={class:"flex items-center justify-between"},ee={class:"space-y-2"},te={class:"flex-1 min-w-0"},oe={class:"font-medium truncate"},se={class:"text-xs text-muted-foreground"},le={key:0,class:"text-center pt-2"},re={class:"mx-auto w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4"},ae={class:"flex items-center justify-between"},ne={key:0,class:"space-y-3"},ie={class:"flex items-center justify-between"},de={class:"text-xl font-bold text-primary"},ce={class:"flex items-center gap-4 text-sm text-muted-foreground pt-2 border-t"},ue={class:"flex items-center gap-1.5"},me={class:"flex items-center gap-1.5"},pe={key:1,class:"text-center py-4"},fe={class:"space-y-6"},xe={class:"mb-4"},ge={class:"flex items-center justify-between text-sm mb-2"},ve={class:"font-medium"},Ne={class:"h-2 bg-muted rounded-full overflow-hidden"},Ve={class:"space-y-2"},ye={key:1,class:"size-2 rounded-full bg-muted-foreground/40"},_e={key:0,class:"text-xs opacity-60"},he={class:"flex items-center gap-3 p-3 rounded-lg bg-muted/30"},be={class:"flex-1"},Ee={class:"text-xs text-muted-foreground"},Ce={class:"flex items-center gap-3 p-3 rounded-lg bg-muted/30"},ke={class:"flex-1"},we={class:"text-xs text-muted-foreground"},Se={class:"flex items-center gap-3 p-3 rounded-lg bg-muted/30"},ze={class:"flex-1"},Be={class:"text-xs text-muted-foreground"},De=e.defineComponent({__name:"index",setup($e){const{params:n,resolvePath:d}=v.useModuleRoute(),{config:N}=v.useModule(),h=v.useFirebaseIntegration(N.project),V=e.ref(!0),s=e.ref(null),b=async()=>{try{const l=await h.get(N.agendaCollection,n.value.id);s.value=l}catch(l){console.error("Error loading agenda data:",l)}finally{V.value=!1}},p=e.computed(()=>{if(!s.value)return null;const l=s.value.resources||[],t=l.filter(i=>i.isActive),a=s.value.exceptions||[],m=s.value.timeslots||{};let u=0;Object.values(m).forEach(i=>{u+=(i||[]).length});const c=new Date().toISOString().split("T")[0],f=a.filter(i=>i.endDate>=c);return{resources:{total:l.length,active:t.length,inactive:l.length-t.length},weeklySlots:u,exceptions:{total:a.length,active:f.length},capacity:s.value.capacity||"∞",hasPayment:(s.value.pricingOptions||[]).some(i=>i.price>0)}}),E=e.computed(()=>{if(!s.value?.timeslots)return[];const l=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=[];for(let a=1;a<=6;a++)t.push({name:l[a],slots:(s.value.timeslots[a]||[]).length,active:(s.value.timeslots[a]||[]).length>0});return t.push({name:l[0],slots:(s.value.timeslots[0]||[]).length,active:(s.value.timeslots[0]||[]).length>0}),t}),y=e.computed(()=>s.value?.resources?s.value.resources.filter(l=>l.isActive).slice(0,5):[]),C=l=>{const t=s.value?.currency||"USD";return`${{USD:"$",EUR:"€",GBP:"£",CAD:"$"}[t]||t} ${l.toFixed(2)}`},g=e.computed(()=>{if(!s.value)return[];const l=s.value.timeslots||{},t=Object.values(l).some(a=>a&&a.length>0);return[{label:"Service name configured",done:!!s.value.serviceName,link:null},{label:"Time slots configured",done:t,link:`/edit/${n.value.id}/regular-slots`},{label:"Resources added",done:(s.value.resources||[]).length>0,link:`/edit/${n.value.id}/resources`,optional:!0},{label:"Payment configured",done:(s.value.pricingOptions||[]).some(a=>a.price>0),link:`/edit/${n.value.id}/payment`,optional:!0}]}),_=e.computed(()=>g.value.filter(l=>l.done).length);return e.computed(()=>g.value.filter(l=>!l.optional).length),b(),(l,t)=>{const a=e.resolveComponent("Spinner"),m=e.resolveComponent("Button"),u=e.resolveComponent("NuxtLink"),c=e.resolveComponent("Card"),f=e.resolveComponent("CardTitle"),i=e.resolveComponent("CardHeader"),x=e.resolveComponent("CardContent");return e.openBlock(),e.createBlock(k._sfc_main,null,{default:e.withCtx(()=>[V.value?(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(a,{class:"size-8"})])):s.value?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",z,[e.createElementVNode("div",null,[e.createElementVNode("h1",B,e.toDisplayString(s.value.serviceName||"Untitled Service"),1),t[4]||(t[4]=e.createElementVNode("p",{class:"text-muted-foreground mt-1"},"Overview of your appointment service configuration",-1))]),e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/agenda`)},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.Calendar),{class:"size-4 mr-2"}),t[5]||(t[5]=e.createTextVNode(" View Calendar ",-1))]),_:1})]),_:1},8,["to"])]),e.createElementVNode("div",D,[e.createVNode(c,{class:"p-4 hover:shadow-md transition-shadow cursor-pointer group",onClick:t[0]||(t[0]=o=>l.$router.push(e.unref(d)(`/edit/${e.unref(n).id}/resources`)))},{default:e.withCtx(()=>[e.createElementVNode("div",$,[e.createElementVNode("div",T,[e.createVNode(e.unref(r.Users),{class:"size-5 text-violet-600 dark:text-violet-400"})]),e.createVNode(e.unref(r.ArrowRight),{class:"size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]),e.createElementVNode("div",j,[e.createElementVNode("p",A,e.toDisplayString(p.value?.resources.active||0),1),t[6]||(t[6]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"Active Resources",-1))])]),_:1}),e.createVNode(c,{class:"p-4 hover:shadow-md transition-shadow cursor-pointer group",onClick:t[1]||(t[1]=o=>l.$router.push(e.unref(d)(`/edit/${e.unref(n).id}/regular-slots`)))},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createElementVNode("div",L,[e.createVNode(e.unref(r.Clock),{class:"size-5 text-blue-600 dark:text-blue-400"})]),e.createVNode(e.unref(r.ArrowRight),{class:"size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]),e.createElementVNode("div",P,[e.createElementVNode("p",O,e.toDisplayString(p.value?.weeklySlots||0),1),t[7]||(t[7]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"Weekly Time Slots",-1))])]),_:1}),e.createVNode(c,{class:"p-4 hover:shadow-md transition-shadow cursor-pointer group",onClick:t[2]||(t[2]=o=>l.$router.push(e.unref(d)(`/edit/${e.unref(n).id}/exceptions`)))},{default:e.withCtx(()=>[e.createElementVNode("div",U,[e.createElementVNode("div",F,[e.createVNode(e.unref(r.CalendarX),{class:"size-5 text-amber-600 dark:text-amber-400"})]),e.createVNode(e.unref(r.ArrowRight),{class:"size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]),e.createElementVNode("div",M,[e.createElementVNode("p",q,e.toDisplayString(p.value?.exceptions.active||0),1),t[8]||(t[8]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"Active Exceptions",-1))])]),_:1}),e.createVNode(c,{class:"p-4 hover:shadow-md transition-shadow cursor-pointer group",onClick:t[3]||(t[3]=o=>l.$router.push(e.unref(d)(`/edit/${e.unref(n).id}/availability`)))},{default:e.withCtx(()=>[e.createElementVNode("div",W,[e.createElementVNode("div",H,[e.createVNode(e.unref(r.Layers),{class:"size-5 text-emerald-600 dark:text-emerald-400"})]),e.createVNode(e.unref(r.ArrowRight),{class:"size-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]),e.createElementVNode("div",I,[e.createElementVNode("p",G,e.toDisplayString(p.value?.capacity),1),t[9]||(t[9]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"Default Capacity",-1))])]),_:1})]),e.createElementVNode("div",K,[e.createElementVNode("div",X,[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(i,{class:"pb-3"},{default:e.withCtx(()=>[e.createElementVNode("div",J,[e.createVNode(f,{class:"text-base font-medium"},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode("Weekly Schedule",-1)])]),_:1}),e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/regular-slots`)},{default:e.withCtx(()=>[e.createVNode(m,{variant:"ghost",size:"sm",class:"text-xs"},{default:e.withCtx(()=>[t[11]||(t[11]=e.createTextVNode(" Configure ",-1)),e.createVNode(e.unref(r.ArrowRight),{class:"size-3 ml-1"})]),_:1})]),_:1},8,["to"])])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.name,class:"flex-1 text-center"},[e.createElementVNode("div",{class:e.normalizeClass(["py-3 px-2 rounded-lg border-2 transition-all",o.active?"bg-primary/5 border-primary/20 dark:bg-primary/10":"bg-muted/30 border-transparent"])},[e.createElementVNode("p",Y,e.toDisplayString(o.name),1),e.createElementVNode("p",{class:e.normalizeClass(["text-lg font-bold",o.active?"text-primary":"text-muted-foreground/50"])},e.toDisplayString(o.slots),3),t[12]||(t[12]=e.createElementVNode("p",{class:"text-[10px] text-muted-foreground"},"slots",-1))],2)]))),128))])]),_:1})]),_:1}),y.value.length>0?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(()=>[e.createVNode(i,{class:"pb-3"},{default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(f,{class:"text-base font-medium"},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("Resources",-1)])]),_:1}),e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/resources`)},{default:e.withCtx(()=>[e.createVNode(m,{variant:"ghost",size:"sm",class:"text-xs"},{default:e.withCtx(()=>[t[14]||(t[14]=e.createTextVNode(" Manage ",-1)),e.createVNode(e.unref(r.ArrowRight),{class:"size-3 ml-1"})]),_:1})]),_:1},8,["to"])])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,class:"flex items-center gap-3 p-3 rounded-lg bg-muted/30 hover:bg-muted/50 transition-colors"},[e.createElementVNode("div",{class:"size-10 rounded-full flex items-center justify-center text-white font-bold",style:e.normalizeStyle({backgroundColor:o.color||"#6b7280"})},e.toDisplayString(o.avatarLabel||o.name.charAt(0).toUpperCase()),5),e.createElementVNode("div",te,[e.createElementVNode("p",oe,e.toDisplayString(o.name),1),e.createElementVNode("p",se,e.toDisplayString(o.publicLabel||o.description||`Capacity: ${o.capacity||"∞"}`),1)])]))),128)),p.value&&p.value.resources.total>5?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/resources`)},{default:e.withCtx(()=>[e.createVNode(m,{variant:"link",size:"sm",class:"text-xs"},{default:e.withCtx(()=>[e.createTextVNode(" View all "+e.toDisplayString(p.value.resources.total)+" resources ",1)]),_:1})]),_:1},8,["to"])])):e.createCommentVNode("",!0)])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(c,{key:1,class:"border-dashed"},{default:e.withCtx(()=>[e.createVNode(x,{class:"py-8 text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",re,[e.createVNode(e.unref(r.Users),{class:"size-6 text-muted-foreground"})]),t[16]||(t[16]=e.createElementVNode("h3",{class:"font-medium mb-1"},"No resources configured",-1)),t[17]||(t[17]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mb-4"}," Add resources like rooms, equipment, or staff to manage availability ",-1)),e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/resources`)},{default:e.withCtx(()=>[e.createVNode(m,{variant:"outline",size:"sm"},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode(" Add Resources ",-1)])]),_:1})]),_:1},8,["to"])]),_:1})]),_:1})),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(i,{class:"pb-3"},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createVNode(f,{class:"text-base font-medium"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode("Pricing",-1)])]),_:1}),e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/payment`)},{default:e.withCtx(()=>[e.createVNode(m,{variant:"ghost",size:"sm",class:"text-xs"},{default:e.withCtx(()=>[t[19]||(t[19]=e.createTextVNode(" Configure ",-1)),e.createVNode(e.unref(r.ArrowRight),{class:"size-3 ml-1"})]),_:1})]),_:1},8,["to"])])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[(s.value.pricingOptions||[]).some(o=>o.price>0)?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ie,[t[20]||(t[20]=e.createElementVNode("span",{class:"text-sm text-muted-foreground"},"Starting from",-1)),e.createElementVNode("span",de,e.toDisplayString(C(Math.min(...(s.value.pricingOptions||[]).map(o=>o.price).filter(o=>o>0)))),1)]),e.createElementVNode("div",ce,[e.createElementVNode("div",ue,[e.createVNode(e.unref(r.Package),{class:"size-3.5"}),e.createElementVNode("span",null,e.toDisplayString((s.value.pricingOptions||[]).length)+" options",1)]),e.createElementVNode("div",me,[e.createVNode(e.unref(r.CreditCard),{class:"size-3.5"}),e.createElementVNode("span",null,e.toDisplayString(s.value.paymentType==="full"?"Pay upfront":s.value.paymentType==="partial"?"Deposit":"Pay later"),1)])])])):(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(e.unref(r.DollarSign),{class:"size-8 text-muted-foreground/50 mx-auto mb-2"}),t[21]||(t[21]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"No pricing configured",-1))]))]),_:1})]),_:1})]),e.createElementVNode("div",fe,[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(i,{class:"pb-3"},{default:e.withCtx(()=>[e.createVNode(f,{class:"text-base font-medium"},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("Setup Progress",-1)])]),_:1})]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("div",xe,[e.createElementVNode("div",ge,[t[23]||(t[23]=e.createElementVNode("span",{class:"text-muted-foreground"},"Completion",-1)),e.createElementVNode("span",ve,e.toDisplayString(_.value)+"/"+e.toDisplayString(g.value.length),1)]),e.createElementVNode("div",Ne,[e.createElementVNode("div",{class:"h-full bg-primary transition-all duration-500",style:e.normalizeStyle({width:`${_.value/g.value.length*100}%`})},null,4)])]),e.createElementVNode("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.label,class:e.normalizeClass(["flex items-center gap-3 p-2 rounded-lg",o.done?"bg-emerald-50 dark:bg-emerald-500/10":"bg-muted/30"])},[e.createElementVNode("div",{class:e.normalizeClass(["size-5 rounded-full flex items-center justify-center shrink-0",o.done?"bg-emerald-500 text-white":"bg-muted-foreground/20"])},[o.done?(e.openBlock(),e.createBlock(e.unref(r.CheckCircle2),{key:0,class:"size-3"})):(e.openBlock(),e.createElementBlock("div",ye))],2),e.createElementVNode("span",{class:e.normalizeClass(["text-sm flex-1",o.done?"text-emerald-700 dark:text-emerald-400":"text-muted-foreground"])},[e.createTextVNode(e.toDisplayString(o.label)+" ",1),o.optional?(e.openBlock(),e.createElementBlock("span",_e,"(optional)")):e.createCommentVNode("",!0)],2),o.link&&!o.done?(e.openBlock(),e.createBlock(u,{key:0,to:e.unref(d)(o.link)},{default:e.withCtx(()=>[e.createVNode(m,{variant:"ghost",size:"sm",class:"h-6 px-2 text-xs"},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode(" Setup ",-1)])]),_:1})]),_:1},8,["to"])):e.createCommentVNode("",!0)],2))),128))])]),_:1})]),_:1}),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(i,{class:"pb-3"},{default:e.withCtx(()=>[e.createVNode(f,{class:"text-base font-medium"},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("Availability Settings",-1)])]),_:1})]),_:1}),e.createVNode(x,{class:"space-y-3"},{default:e.withCtx(()=>[e.createElementVNode("div",he,[e.createVNode(e.unref(r.Timer),{class:"size-4 text-muted-foreground"}),e.createElementVNode("div",be,[t[26]||(t[26]=e.createElementVNode("p",{class:"text-sm font-medium"},"Lead Time",-1)),e.createElementVNode("p",Ee,e.toDisplayString(s.value.minimumAdvanceNotice?.value||0)+" "+e.toDisplayString(s.value.minimumAdvanceNotice?.unit||"minutes"),1)])]),e.createElementVNode("div",Ce,[e.createVNode(e.unref(r.Eye),{class:"size-4 text-muted-foreground"}),e.createElementVNode("div",ke,[t[27]||(t[27]=e.createElementVNode("p",{class:"text-sm font-medium"},"Visibility",-1)),e.createElementVNode("p",we,e.toDisplayString(s.value.serviceVisibility||60)+" days ahead ",1)])]),e.createElementVNode("div",Se,[e.createVNode(e.unref(r.Layers),{class:"size-4 text-muted-foreground"}),e.createElementVNode("div",ze,[t[28]||(t[28]=e.createElementVNode("p",{class:"text-sm font-medium"},"Default Capacity",-1)),e.createElementVNode("p",Be,e.toDisplayString(s.value.capacity||"∞")+" per slot ",1)])]),e.createVNode(u,{to:e.unref(d)(`/edit/${e.unref(n).id}/availability`),class:"block"},{default:e.withCtx(()=>[e.createVNode(m,{variant:"outline",size:"sm",class:"w-full"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.Settings),{class:"size-4 mr-2"}),t[29]||(t[29]=e.createTextVNode(" Edit Settings ",-1))]),_:1})]),_:1},8,["to"])]),_:1})]),_:1})])])])):e.createCommentVNode("",!0)]),_:1})}}});exports.default=De;
@@ -0,0 +1 @@
1
+ "use strict";const p=require("vue");let b=1;var a=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=t=>(this.subscribers.push(t),()=>{const s=this.subscribers.indexOf(t);this.subscribers.splice(s,1)});publish=t=>{this.subscribers.forEach(s=>s(t))};addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]};create=t=>{const{message:s,...e}=t,n=typeof t.id=="number"||t.id&&t.id?.length>0?t.id:b++,c=this.toasts.find(d=>d.id===n),r=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),c?this.toasts=this.toasts.map(d=>d.id===n?(this.publish({...d,...t,id:n,title:s}),{...d,...t,id:n,dismissible:r,title:s}):d):this.addToast({title:s,...e,dismissible:r,id:n}),n};dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:t,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(e=>e({id:s.id,dismiss:!0}))}),t);message=(t,s)=>this.create({...s,message:t,type:"default"});error=(t,s)=>this.create({...s,type:"error",message:t});success=(t,s)=>this.create({...s,type:"success",message:t});info=(t,s)=>this.create({...s,type:"info",message:t});warning=(t,s)=>this.create({...s,type:"warning",message:t});loading=(t,s)=>this.create({...s,type:"loading",message:t});promise=(t,s)=>{if(!s)return;let e;s.loading!==void 0&&(e=this.create({...s,promise:t,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let c=e!==void 0,r;const d=n.then(async i=>{if(r=["resolve",i],p.isVNode(i))c=!1,this.create({id:e,type:"default",message:i});else if(T(i)&&!i.ok){c=!1;const o=typeof s.error=="function"?await s.error(`HTTP error! status: ${i.status}`):s.error,l=typeof s.description=="function"?await s.description(`HTTP error! status: ${i.status}`):s.description,h=typeof o=="object"&&!p.isVNode(o)?o:{message:o||"",id:e||""};this.create({id:e,type:"error",description:l,...h})}else if(i instanceof Error){c=!1;const o=typeof s.error=="function"?await s.error(i):s.error,l=typeof s.description=="function"?await s.description(i):s.description,h=typeof o=="object"&&!p.isVNode(o)?o:{message:o||"",id:e||""};this.create({id:e,type:"error",description:l,...h})}else if(s.success!==void 0){c=!1;const o=typeof s.success=="function"?await s.success(i):s.success,l=typeof s.description=="function"?await s.description(i):s.description,h=typeof o=="object"&&!p.isVNode(o)?o:{message:o||"",id:e||""};this.create({id:e,type:"success",description:l,...h})}}).catch(async i=>{if(r=["reject",i],s.error!==void 0){c=!1;const f=typeof s.error=="function"?await s.error(i):s.error,o=typeof s.description=="function"?await s.description(i):s.description,m=typeof f=="object"&&!p.isVNode(f)?f:{message:f||"",id:e||""};this.create({id:e,type:"error",description:o,...m})}}).finally(()=>{c&&(this.dismiss(e),e=void 0),s.finally?.()}),y=()=>new Promise((i,f)=>d.then(()=>r[0]==="reject"?f(r[1]):i(r[1])).catch(f));return typeof e!="string"&&typeof e!="number"?{unwrap:y}:Object.assign(e,{unwrap:y})};custom=(t,s)=>{const e=s?.id||b++,n=this.toasts.find(r=>r.id===e),c=s?.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(e)&&this.dismissedToasts.delete(e),n?this.toasts=this.toasts.map(r=>r.id===e?(this.publish({...r,component:t,dismissible:c,id:e,...s}),{...r,component:t,dismissible:c,id:e,...s}):r):this.addToast({component:t,dismissible:c,id:e,...s}),e};getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id))};const u=new a;function g(t,s){const e=s?.id||b++;return u.create({message:t,id:e,type:"default",...s}),e}const T=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",w=g,v=()=>u.toasts,E=()=>u.getActiveToasts(),x=Object.assign(w,{success:u.success,info:u.info,warning:u.warning,error:u.error,custom:u.custom,message:u.message,promise:u.promise,dismiss:u.dismiss,loading:u.loading},{getHistory:v,getToasts:E});exports.toast=x;
@@ -0,0 +1,24 @@
1
+ import { defineComponent as r, createElementBlock as t, openBlock as e, createBlock as c, resolveDynamicComponent as u, unref as i } from "vue";
2
+ import { useModuleRoute as p } from "@oneclick.dev/cms-kit";
3
+ const s = /* @__PURE__ */ r({
4
+ __name: "index",
5
+ props: {
6
+ config: {
7
+ type: Object,
8
+ required: !0
9
+ },
10
+ routes: {
11
+ type: Array,
12
+ required: !0
13
+ }
14
+ },
15
+ setup(o) {
16
+ const { pageComponent: n } = p();
17
+ return (l, m) => (e(), t("div", null, [
18
+ (e(), c(u(i(n)), { config: o.config }, null, 8, ["config"]))
19
+ ]));
20
+ }
21
+ });
22
+ export {
23
+ s as default
24
+ };