@oneclick.dev/cms-core-modules 0.0.63 → 0.0.65
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.
- package/dist/{Overview-DiBYtvEX.mjs → Overview-BYMrsZjM.mjs} +61 -61
- package/dist/Overview-t0pG5xjA.js +1 -0
- package/dist/{TableView-BqhL_P45.js → TableView-D4wKUDTd.js} +27 -27
- package/dist/{TableView-Dbl8qcUy.mjs → TableView-DNJ2VrSj.mjs} +442 -442
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/Overview-qP1guKjx.js +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as K, ref as D, resolveComponent as i, openBlock as
|
|
1
|
+
import { defineComponent as K, ref as D, resolveComponent as i, openBlock as l, createElementBlock as f, Fragment as V, createElementVNode as p, createVNode as t, createBlock as g, withCtx as n, unref as a, createTextVNode as d, toDisplayString as O, createCommentVNode as M, renderList as Q, normalizeClass as W } from "vue";
|
|
2
2
|
import { useModule as Z, useFirebaseIntegration as ee, useModuleRoute as te, useConfirmation as ne, useModulePermissions as oe, useModuleBreadcrumbs as le } from "@oneclick.dev/cms-kit";
|
|
3
3
|
import { CalendarX as ae, MoreHorizontalIcon as z, Copy as se, ChevronsLeftRightEllipsis as ie, Upload as de, Trash2Icon as re, ImportIcon as ue } from "lucide-vue-next";
|
|
4
|
-
const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "flex gap-2" }, me = { key: 2 },
|
|
4
|
+
const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "flex gap-2" }, me = { key: 2 }, ve = { class: "flex justify-between items-center gap-4 mb-4" }, ge = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex items-center gap-2"
|
|
7
|
-
}, _e = { class: "mr-2" }, ye = ["onClick"], Ce = { class: "flex justify-between items-center mb-2" }, ke = { class: "text-lg font-medium" },
|
|
7
|
+
}, _e = { class: "mr-2" }, ye = ["onClick"], Ce = { class: "flex justify-between items-center mb-2" }, ke = ["onClick"], we = { class: "text-lg font-medium" }, xe = { class: "text-sm text-muted-foreground" }, be = { key: 0 }, Ae = { key: 1 }, Ee = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "flex justify-end mt-8"
|
|
10
|
-
},
|
|
10
|
+
}, Ne = /* @__PURE__ */ K({
|
|
11
11
|
__name: "Overview",
|
|
12
|
-
setup(
|
|
13
|
-
const { config: y } = Z(),
|
|
12
|
+
setup(Me) {
|
|
13
|
+
const { config: y } = Z(), b = ee(y.project), { navigateTo: C } = te(), { confirm: G } = ne(), { hasPermission: _ } = oe();
|
|
14
14
|
le(() => []);
|
|
15
|
-
const
|
|
15
|
+
const A = D(null), m = D(!1), r = D([]), I = D("importAgendasInput"), R = (s) => {
|
|
16
16
|
m.value = !0, r.value = [s];
|
|
17
17
|
}, $ = async () => {
|
|
18
|
-
|
|
18
|
+
A.value = await b.find(y.agendaCollection);
|
|
19
19
|
}, H = async (s) => {
|
|
20
20
|
if (!_("create-agendas")) return;
|
|
21
|
-
const e = await
|
|
21
|
+
const e = await b.get(y.agendaCollection, s);
|
|
22
22
|
if (!e) {
|
|
23
23
|
alert("Agenda not found");
|
|
24
24
|
return;
|
|
@@ -27,11 +27,11 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
27
27
|
if (!u)
|
|
28
28
|
return;
|
|
29
29
|
const c = { ...e, serviceName: u };
|
|
30
|
-
delete c.id, await
|
|
30
|
+
delete c.id, await b.add(y.agendaCollection, c), await $();
|
|
31
31
|
}, J = async (s) => {
|
|
32
|
-
!_("delete-agendas") || !await G("Are you sure you want to delete this agenda? This action cannot be undone.") || (await
|
|
32
|
+
!_("delete-agendas") || !await G("Are you sure you want to delete this agenda? This action cannot be undone.") || (await b.remove(y.agendaCollection, s), await $());
|
|
33
33
|
}, P = async () => {
|
|
34
|
-
let s =
|
|
34
|
+
let s = A.value.filter((c) => r.value.includes(c.id));
|
|
35
35
|
s = s.map((c) => {
|
|
36
36
|
const { id: k, ...w } = c;
|
|
37
37
|
return w;
|
|
@@ -55,18 +55,18 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
for (const w of k)
|
|
58
|
-
await
|
|
58
|
+
await b.add(y.agendaCollection, w);
|
|
59
59
|
e.value = "", await $();
|
|
60
60
|
}, L = (s) => {
|
|
61
61
|
m.value || (_("edit-agendas") ? C(`/edit/${s}`) : C(`/edit/${s}/agenda`));
|
|
62
62
|
};
|
|
63
63
|
return $(), (s, e) => {
|
|
64
|
-
const u = i("Spinner"), c = i("EmptyMedia"), k = i("EmptyTitle"), w = i("EmptyDescription"), U = i("EmptyHeader"),
|
|
65
|
-
return
|
|
64
|
+
const u = i("Spinner"), c = i("EmptyMedia"), k = i("EmptyTitle"), w = i("EmptyDescription"), U = i("EmptyHeader"), v = i("Button"), Y = i("EmptyContent"), X = i("Empty"), N = i("DropdownMenuTrigger"), E = i("DropdownMenuItem"), T = i("DropdownMenuGroup"), h = i("DropdownMenuContent"), j = i("DropdownMenu"), B = i("ButtonGroup"), S = i("Checkbox");
|
|
65
|
+
return l(), f(V, null, [
|
|
66
66
|
p("div", ce, [
|
|
67
|
-
|
|
67
|
+
A.value === null ? (l(), f("div", pe, [
|
|
68
68
|
t(u, { class: "mx-auto" })
|
|
69
|
-
])) :
|
|
69
|
+
])) : A.value.length === 0 ? (l(), g(X, { key: 1 }, {
|
|
70
70
|
default: n(() => [
|
|
71
71
|
t(U, null, {
|
|
72
72
|
default: n(() => [
|
|
@@ -94,8 +94,8 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
94
94
|
t(Y, null, {
|
|
95
95
|
default: n(() => [
|
|
96
96
|
p("div", fe, [
|
|
97
|
-
t(
|
|
98
|
-
onClick: e[0] || (e[0] = (
|
|
97
|
+
t(v, {
|
|
98
|
+
onClick: e[0] || (e[0] = (o) => a(C)("/create"))
|
|
99
99
|
}, {
|
|
100
100
|
default: n(() => [...e[6] || (e[6] = [
|
|
101
101
|
d("Create Agenda", -1)
|
|
@@ -108,14 +108,14 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
108
108
|
})
|
|
109
109
|
]),
|
|
110
110
|
_: 1
|
|
111
|
-
})) : (
|
|
112
|
-
p("div",
|
|
111
|
+
})) : (l(), f("div", me, [
|
|
112
|
+
p("div", ve, [
|
|
113
113
|
e[9] || (e[9] = p("h2", { class: "text-2xl font-bold" }, "Agendas", -1)),
|
|
114
|
-
m.value ? (
|
|
114
|
+
m.value ? (l(), f("div", ge, [
|
|
115
115
|
p("span", _e, O(r.value.length) + " selected", 1),
|
|
116
|
-
t(
|
|
116
|
+
t(v, {
|
|
117
117
|
variant: "outline",
|
|
118
|
-
onClick: e[1] || (e[1] = (
|
|
118
|
+
onClick: e[1] || (e[1] = (o) => {
|
|
119
119
|
m.value = !1, r.value = [];
|
|
120
120
|
})
|
|
121
121
|
}, {
|
|
@@ -124,7 +124,7 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
124
124
|
])]),
|
|
125
125
|
_: 1
|
|
126
126
|
}),
|
|
127
|
-
t(
|
|
127
|
+
t(v, {
|
|
128
128
|
onClick: P,
|
|
129
129
|
disabled: r.value.length === 0
|
|
130
130
|
}, {
|
|
@@ -135,57 +135,57 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
135
135
|
}, 8, ["disabled"])
|
|
136
136
|
])) : M("", !0)
|
|
137
137
|
]),
|
|
138
|
-
(
|
|
139
|
-
key:
|
|
138
|
+
(l(!0), f(V, null, Q(A.value, (o) => (l(), f("button", {
|
|
139
|
+
key: o.id,
|
|
140
140
|
class: W(["block w-full mb-4 p-4 border rounded-md bg-background", { "cursor-pointer hover:bg-accent focus-visible:outline-0 focus:ring-2 ring-ring/50": m.value }]),
|
|
141
|
-
onClick: (
|
|
141
|
+
onClick: (x) => m.value ? r.value.includes(o.id) ? r.value = r.value.filter((q) => q !== o.id) : r.value.push(o.id) : null
|
|
142
142
|
}, [
|
|
143
143
|
p("div", Ce, [
|
|
144
144
|
p("div", {
|
|
145
145
|
class: "flex flex-col items-start",
|
|
146
|
-
onClick: L
|
|
146
|
+
onClick: (x) => L(o.id)
|
|
147
147
|
}, [
|
|
148
|
-
p("h3",
|
|
149
|
-
p("p",
|
|
150
|
-
|
|
148
|
+
p("h3", we, O(o.serviceName), 1),
|
|
149
|
+
p("p", xe, [
|
|
150
|
+
o.type === "regular" ? (l(), f("span", be, "Regular Agenda")) : M("", !0)
|
|
151
151
|
])
|
|
152
|
-
]),
|
|
153
|
-
m.value ? (
|
|
154
|
-
r.value.includes(
|
|
152
|
+
], 8, ke),
|
|
153
|
+
m.value ? (l(), f("div", Ae, [
|
|
154
|
+
r.value.includes(o.id) ? (l(), g(S, {
|
|
155
155
|
key: 0,
|
|
156
156
|
tabindex: "-1",
|
|
157
157
|
defaultValue: !0
|
|
158
|
-
})) : (
|
|
158
|
+
})) : (l(), g(S, {
|
|
159
159
|
key: 1,
|
|
160
160
|
tabindex: "-1",
|
|
161
161
|
defaultValue: !1
|
|
162
162
|
}))
|
|
163
|
-
])) : (
|
|
163
|
+
])) : (l(), g(B, { key: 0 }, {
|
|
164
164
|
default: n(() => [
|
|
165
|
-
a(_)("edit-agendas") ? (
|
|
165
|
+
a(_)("edit-agendas") ? (l(), g(v, {
|
|
166
166
|
key: 0,
|
|
167
167
|
variant: "outline",
|
|
168
|
-
onClick: (
|
|
168
|
+
onClick: (x) => a(C)(`/edit/${o.id}`)
|
|
169
169
|
}, {
|
|
170
170
|
default: n(() => [...e[10] || (e[10] = [
|
|
171
171
|
d(" Edit Agenda ", -1)
|
|
172
172
|
])]),
|
|
173
173
|
_: 1
|
|
174
|
-
}, 8, ["onClick"])) : (
|
|
174
|
+
}, 8, ["onClick"])) : (l(), g(v, {
|
|
175
175
|
key: 1,
|
|
176
176
|
variant: "outline",
|
|
177
|
-
onClick: (
|
|
177
|
+
onClick: (x) => a(C)(`/edit/${o.id}/agenda`)
|
|
178
178
|
}, {
|
|
179
179
|
default: n(() => [...e[11] || (e[11] = [
|
|
180
180
|
d(" View Agenda ", -1)
|
|
181
181
|
])]),
|
|
182
182
|
_: 1
|
|
183
183
|
}, 8, ["onClick"])),
|
|
184
|
-
t(
|
|
184
|
+
t(j, null, {
|
|
185
185
|
default: n(() => [
|
|
186
186
|
t(N, { "as-child": "" }, {
|
|
187
187
|
default: n(() => [
|
|
188
|
-
t(
|
|
188
|
+
t(v, {
|
|
189
189
|
variant: "outline",
|
|
190
190
|
size: "icon",
|
|
191
191
|
"aria-label": "More Options"
|
|
@@ -198,16 +198,16 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
198
198
|
]),
|
|
199
199
|
_: 1
|
|
200
200
|
}),
|
|
201
|
-
t(
|
|
201
|
+
t(h, {
|
|
202
202
|
align: "end",
|
|
203
203
|
class: "w-52"
|
|
204
204
|
}, {
|
|
205
205
|
default: n(() => [
|
|
206
206
|
t(T, null, {
|
|
207
207
|
default: n(() => [
|
|
208
|
-
a(_)("create-agendas") ? (
|
|
208
|
+
a(_)("create-agendas") ? (l(), g(E, {
|
|
209
209
|
key: 0,
|
|
210
|
-
onClick: (
|
|
210
|
+
onClick: (x) => H(o.id)
|
|
211
211
|
}, {
|
|
212
212
|
default: n(() => [
|
|
213
213
|
t(a(se)),
|
|
@@ -215,15 +215,15 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
215
215
|
]),
|
|
216
216
|
_: 1
|
|
217
217
|
}, 8, ["onClick"])) : M("", !0),
|
|
218
|
-
t(
|
|
218
|
+
t(E, null, {
|
|
219
219
|
default: n(() => [
|
|
220
220
|
t(a(ie)),
|
|
221
221
|
e[13] || (e[13] = d(" API Set-up ", -1))
|
|
222
222
|
]),
|
|
223
223
|
_: 1
|
|
224
224
|
}),
|
|
225
|
-
t(
|
|
226
|
-
onClick: (
|
|
225
|
+
t(E, {
|
|
226
|
+
onClick: (x) => R(o.id)
|
|
227
227
|
}, {
|
|
228
228
|
default: n(() => [
|
|
229
229
|
t(a(de)),
|
|
@@ -231,10 +231,10 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
231
231
|
]),
|
|
232
232
|
_: 1
|
|
233
233
|
}, 8, ["onClick"]),
|
|
234
|
-
a(_)("delete-agendas") ? (
|
|
234
|
+
a(_)("delete-agendas") ? (l(), g(E, {
|
|
235
235
|
key: 1,
|
|
236
236
|
variant: "destructive",
|
|
237
|
-
onClick: (
|
|
237
|
+
onClick: (x) => J(o.id)
|
|
238
238
|
}, {
|
|
239
239
|
default: n(() => [
|
|
240
240
|
t(a(re)),
|
|
@@ -256,11 +256,11 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
256
256
|
}, 1024))
|
|
257
257
|
])
|
|
258
258
|
], 10, ye))), 128)),
|
|
259
|
-
a(_)("create-agendas") ? (
|
|
260
|
-
t(
|
|
259
|
+
a(_)("create-agendas") ? (l(), f("div", Ee, [
|
|
260
|
+
t(B, null, {
|
|
261
261
|
default: n(() => [
|
|
262
|
-
t(
|
|
263
|
-
onClick: e[2] || (e[2] = (
|
|
262
|
+
t(v, {
|
|
263
|
+
onClick: e[2] || (e[2] = (o) => a(C)("/create")),
|
|
264
264
|
class: "border-r"
|
|
265
265
|
}, {
|
|
266
266
|
default: n(() => [...e[16] || (e[16] = [
|
|
@@ -268,11 +268,11 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
268
268
|
])]),
|
|
269
269
|
_: 1
|
|
270
270
|
}),
|
|
271
|
-
t(
|
|
271
|
+
t(j, null, {
|
|
272
272
|
default: n(() => [
|
|
273
273
|
t(N, { "as-child": "" }, {
|
|
274
274
|
default: n(() => [
|
|
275
|
-
t(
|
|
275
|
+
t(v, {
|
|
276
276
|
size: "icon",
|
|
277
277
|
"aria-label": "More Options"
|
|
278
278
|
}, {
|
|
@@ -284,15 +284,15 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
284
284
|
]),
|
|
285
285
|
_: 1
|
|
286
286
|
}),
|
|
287
|
-
t(
|
|
287
|
+
t(h, {
|
|
288
288
|
align: "end",
|
|
289
289
|
class: "w-52"
|
|
290
290
|
}, {
|
|
291
291
|
default: n(() => [
|
|
292
292
|
t(T, null, {
|
|
293
293
|
default: n(() => [
|
|
294
|
-
t(
|
|
295
|
-
onClick: e[3] || (e[3] = (
|
|
294
|
+
t(E, {
|
|
295
|
+
onClick: e[3] || (e[3] = (o) => I.value.click())
|
|
296
296
|
}, {
|
|
297
297
|
default: n(() => [
|
|
298
298
|
t(a(ue)),
|
|
@@ -328,5 +328,5 @@ const ce = { class: "container mx-auto p-8" }, pe = { key: 0 }, fe = { class: "f
|
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
export {
|
|
331
|
-
|
|
331
|
+
Ne as default
|
|
332
332
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("@oneclick.dev/cms-kit"),s=require("lucide-vue-next"),G={class:"container mx-auto p-8"},R={key:0},H={class:"flex gap-2"},P={key:2},q={class:"flex justify-between items-center gap-4 mb-4"},F={key:0,class:"flex items-center gap-2"},J={class:"mr-2"},L=["onClick"],U={class:"flex justify-between items-center mb-2"},Y=["onClick"],K={class:"text-lg font-medium"},X={class:"text-sm text-muted-foreground"},Q={key:0},W={key:1},Z={key:0,class:"flex justify-end mt-8"},ee=e.defineComponent({__name:"Overview",setup(te){const{config:u}=v.useModule(),k=v.useFirebaseIntegration(u.project),{navigateTo:p}=v.useModuleRoute(),{confirm:b}=v.useConfirmation(),{hasPermission:c}=v.useModulePermissions();v.useModuleBreadcrumbs(()=>[]);const g=e.ref(null),d=e.ref(!1),a=e.ref([]),V=e.ref("importAgendasInput"),A=n=>{d.value=!0,a.value=[n]},N=async()=>{g.value=await k.find(u.agendaCollection)},M=async n=>{if(!c("create-agendas"))return;const t=await k.get(u.agendaCollection,n);if(!t){alert("Agenda not found");return}const l=prompt("Enter name for duplicated agenda",t.serviceName+" (Copy)");if(!l)return;const r={...t,serviceName:l};delete r.id,await k.add(u.agendaCollection,r),await N()},T=async n=>{!c("delete-agendas")||!await b("Are you sure you want to delete this agenda? This action cannot be undone.")||(await k.remove(u.agendaCollection,n),await N())},$=async()=>{let n=g.value.filter(r=>a.value.includes(r.id));n=n.map(r=>{const{id:m,...f}=r;return f});const t="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(n,null,2)),l=document.createElement("a");l.setAttribute("href",t),l.setAttribute("download","agendas_export.json"),document.body.appendChild(l),l.click(),l.remove(),d.value=!1,a.value=[]},D=async n=>{const t=n.target;if(!t.files||t.files.length===0)return;const r=await t.files[0].text();let m;try{m=JSON.parse(r)}catch{alert("Invalid JSON file");return}if(!Array.isArray(m)){alert("Invalid agendas format");return}for(const f of m)await k.add(u.agendaCollection,f);t.value="",await N()},I=n=>{d.value||(c("edit-agendas")?p(`/edit/${n}`):p(`/edit/${n}/agenda`))};return N(),(n,t)=>{const l=e.resolveComponent("Spinner"),r=e.resolveComponent("EmptyMedia"),m=e.resolveComponent("EmptyTitle"),f=e.resolveComponent("EmptyDescription"),S=e.resolveComponent("EmptyHeader"),i=e.resolveComponent("Button"),j=e.resolveComponent("EmptyContent"),O=e.resolveComponent("Empty"),_=e.resolveComponent("DropdownMenuTrigger"),x=e.resolveComponent("DropdownMenuItem"),w=e.resolveComponent("DropdownMenuGroup"),y=e.resolveComponent("DropdownMenuContent"),B=e.resolveComponent("DropdownMenu"),E=e.resolveComponent("ButtonGroup"),h=e.resolveComponent("Checkbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",G,[g.value===null?(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(l,{class:"mx-auto"})])):g.value.length===0?(e.openBlock(),e.createBlock(O,{key:1},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(r,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.CalendarX),{class:"size-4-6"})]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("No Agendas Yet",-1)])]),_:1}),e.createVNode(f,null,{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" You haven't created any agenda yet. Get started by creating your first agenda. ",-1)])]),_:1})]),_:1}),e.createVNode(j,null,{default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createVNode(i,{onClick:t[0]||(t[0]=o=>e.unref(p)("/create"))},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("Create Agenda",-1)])]),_:1})])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("div",q,[t[9]||(t[9]=e.createElementVNode("h2",{class:"text-2xl font-bold"},"Agendas",-1)),d.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("span",J,e.toDisplayString(a.value.length)+" selected",1),e.createVNode(i,{variant:"outline",onClick:t[1]||(t[1]=o=>{d.value=!1,a.value=[]})},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(i,{onClick:$,disabled:a.value.length===0},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Export ",-1)])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,class:e.normalizeClass(["block w-full mb-4 p-4 border rounded-md bg-background",{"cursor-pointer hover:bg-accent focus-visible:outline-0 focus:ring-2 ring-ring/50":d.value}]),onClick:C=>d.value?a.value.includes(o.id)?a.value=a.value.filter(z=>z!==o.id):a.value.push(o.id):null},[e.createElementVNode("div",U,[e.createElementVNode("div",{class:"flex flex-col items-start",onClick:C=>I(o.id)},[e.createElementVNode("h3",K,e.toDisplayString(o.serviceName),1),e.createElementVNode("p",X,[o.type==="regular"?(e.openBlock(),e.createElementBlock("span",Q,"Regular Agenda")):e.createCommentVNode("",!0)])],8,Y),d.value?(e.openBlock(),e.createElementBlock("div",W,[a.value.includes(o.id)?(e.openBlock(),e.createBlock(h,{key:0,tabindex:"-1",defaultValue:!0})):(e.openBlock(),e.createBlock(h,{key:1,tabindex:"-1",defaultValue:!1}))])):(e.openBlock(),e.createBlock(E,{key:0},{default:e.withCtx(()=>[e.unref(c)("edit-agendas")?(e.openBlock(),e.createBlock(i,{key:0,variant:"outline",onClick:C=>e.unref(p)(`/edit/${o.id}`)},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode(" Edit Agenda ",-1)])]),_:1},8,["onClick"])):(e.openBlock(),e.createBlock(i,{key:1,variant:"outline",onClick:C=>e.unref(p)(`/edit/${o.id}/agenda`)},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode(" View Agenda ",-1)])]),_:1},8,["onClick"])),e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(_,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(i,{variant:"outline",size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(y,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.unref(c)("create-agendas")?(e.openBlock(),e.createBlock(x,{key:0,onClick:C=>M(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Copy)),t[12]||(t[12]=e.createTextVNode(" Duplicate Agenda ",-1))]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(e.unref(s.ChevronsLeftRightEllipsis)),t[13]||(t[13]=e.createTextVNode(" API Set-up ",-1))]),_:1}),e.createVNode(x,{onClick:C=>A(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Upload)),t[14]||(t[14]=e.createTextVNode(" Export Agenda ",-1))]),_:1},8,["onClick"]),e.unref(c)("delete-agendas")?(e.openBlock(),e.createBlock(x,{key:1,variant:"destructive",onClick:C=>T(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Trash2Icon)),t[15]||(t[15]=e.createTextVNode(" Remove Agenda ",-1))]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))])],10,L))),128)),e.unref(c)("create-agendas")?(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(i,{onClick:t[2]||(t[2]=o=>e.unref(p)("/create")),class:"border-r"},{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode("New Agenda",-1)])]),_:1}),e.createVNode(B,null,{default:e.withCtx(()=>[e.createVNode(_,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(i,{size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(y,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(x,{onClick:t[3]||(t[3]=o=>V.value.click())},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ImportIcon)),t[17]||(t[17]=e.createTextVNode(" Import Agendas... ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])):e.createCommentVNode("",!0)]))]),e.createElementVNode("input",{type:"file",ref_key:"importAgendasInput",ref:V,class:"hidden",accept:".json,application/json",onChange:D},null,544)],64)}}});exports.default=ee;
|