appsalutely 0.1.2 → 0.1.4
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/appsalutely.js +383 -0
- package/dist/appsalutely.umd.cjs +2 -0
- package/dist/{components → types/components}/DashboardPage.vue.d.ts +0 -1
- package/dist/{components → types/components}/LoginForm.vue.d.ts +15 -1
- package/dist/{components → types/components}/OTPForm.vue.d.ts +11 -1
- package/dist/types/index.d.ts +9 -0
- package/package.json +20 -23
- package/.editorconfig +0 -9
- package/.prettierrc.json +0 -6
- package/dist/index.css +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -381
- package/dist/index.umd.cjs +0 -1
- package/eslint.config.ts +0 -22
- package/tsconfig.json +0 -23
- package/tsconfig.node.json +0 -10
- package/vite.config.d.ts +0 -3
- package/vite.config.js +0 -25
- package/vite.config.ts +0 -26
- /package/dist/{components → types/components}/AppBase.vue.d.ts +0 -0
- /package/dist/{components → types/components}/FooterSection.vue.d.ts +0 -0
- /package/dist/{components → types/components}/NavDrawerLink.vue.d.ts +0 -0
- /package/dist/{stores → types/stores}/colorMode.d.ts +0 -0
- /package/dist/{stores → types/stores}/footer.d.ts +0 -0
- /package/dist/{stores → types/stores}/notify.d.ts +0 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("html{overflow:auto}html[data-theme=dark]{color-scheme:dark}html[data-theme=light]{color-scheme:light}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { ref as b, watch as C, computed as O, defineComponent as x, useModel as B, useSlots as A, onBeforeMount as E, createBlock as c, openBlock as m, unref as t, withCtx as s, createCommentVNode as w, createVNode as d, createElementBlock as $, renderSlot as h, createElementVNode as g, normalizeClass as z, toDisplayString as P, Fragment as S, renderList as L, normalizeStyle as q, mergeModels as T, withModifiers as U } from "vue";
|
|
3
|
+
import { useRouter as R, RouterView as j } from "vue-router";
|
|
4
|
+
import { VApp as G, VProgressLinear as H, VAppBar as D, VMain as J, VFooter as K, VBtn as V, VNavigationDrawer as Q, VList as X, VSnackbar as Y, VContainer as Z, VBreadcrumbs as ee, VCard as W, VForm as I, VCardText as N, VTextField as F, VListItem as te, VIcon as le, VOtpInput as oe } from "vuetify/components";
|
|
5
|
+
import { defineStore as M } from "pinia";
|
|
6
|
+
const ae = M("colorMode", () => {
|
|
7
|
+
const l = b(localStorage.getItem("colorMode") == "dark" ? "dark" : "light");
|
|
8
|
+
function r() {
|
|
9
|
+
l.value = l.value === "dark" ? "light" : "dark";
|
|
10
|
+
}
|
|
11
|
+
function o(a) {
|
|
12
|
+
localStorage.setItem("colorMode", a), document.documentElement.setAttribute("data-theme", a);
|
|
13
|
+
}
|
|
14
|
+
return C(l, (a) => o(a)), o(l.value), { mode: l, toggle: r };
|
|
15
|
+
}), ne = M("footer", () => {
|
|
16
|
+
const l = b([]), r = O(() => l.value.length > 0 ? l.value[l.value.length - 1] : null);
|
|
17
|
+
function o(n) {
|
|
18
|
+
return n.id || (n.id = (/* @__PURE__ */ new Date()).getTime().toString()), n.timeout === void 0 && (n.timeout = 5e3), l.value.push(n), n.timeout && setTimeout(() => {
|
|
19
|
+
a(n.id);
|
|
20
|
+
}, n.timeout), n.id;
|
|
21
|
+
}
|
|
22
|
+
function a(n) {
|
|
23
|
+
l.value = l.value.filter((f) => f.id !== n);
|
|
24
|
+
}
|
|
25
|
+
return { messages: l, current: r, addMessage: o, removeMessage: a };
|
|
26
|
+
}), re = M("notify", () => {
|
|
27
|
+
const l = b([]), r = b({});
|
|
28
|
+
function o(e) {
|
|
29
|
+
return e.id ? a(e.id) : e.id = (/* @__PURE__ */ new Date()).getTime().toString(), e.timeout === void 0 && (e.timeout = 5e3), l.value.push(e), e.timeout && (r.value[e.id] = setTimeout(() => {
|
|
30
|
+
a(e.id);
|
|
31
|
+
}, e.timeout)), e.id;
|
|
32
|
+
}
|
|
33
|
+
function a(e) {
|
|
34
|
+
l.value = l.value.filter((k) => k.id !== e), r.value[e] && (clearTimeout(r.value[e]), delete r.value[e]);
|
|
35
|
+
}
|
|
36
|
+
function n(e) {
|
|
37
|
+
return o({ text: e, type: "info" });
|
|
38
|
+
}
|
|
39
|
+
function f(e) {
|
|
40
|
+
return o({ text: e, type: "success" });
|
|
41
|
+
}
|
|
42
|
+
function u(e) {
|
|
43
|
+
return o({ text: e, type: "warning" });
|
|
44
|
+
}
|
|
45
|
+
function i(e) {
|
|
46
|
+
return o({ text: e, type: "error" });
|
|
47
|
+
}
|
|
48
|
+
return { messages: l, add: o, remove: a, info: n, success: f, warning: u, error: i };
|
|
49
|
+
}), ue = { class: "d-flex flex-column pa-4 h-100" }, ie = ["textContent"], ge = /* @__PURE__ */ x({
|
|
50
|
+
__name: "AppBase",
|
|
51
|
+
props: {
|
|
52
|
+
drawerOpen: { type: Boolean, default: !1 },
|
|
53
|
+
drawerOpenModifiers: {}
|
|
54
|
+
},
|
|
55
|
+
emits: ["update:drawerOpen"],
|
|
56
|
+
setup(l) {
|
|
57
|
+
const r = ae(), o = B(l, "drawerOpen"), a = b(!1), n = ne(), f = b(!1), u = b(null), i = re(), e = R(), k = A();
|
|
58
|
+
return C(a, (y) => {
|
|
59
|
+
localStorage.setItem("drawerDocked", String(y));
|
|
60
|
+
}), E(() => {
|
|
61
|
+
e.beforeEach(() => {
|
|
62
|
+
u.value = setTimeout(() => {
|
|
63
|
+
f.value = !0;
|
|
64
|
+
}, 300);
|
|
65
|
+
}), e.afterEach(() => {
|
|
66
|
+
u.value && (clearTimeout(u.value), u.value = null), f.value = !1;
|
|
67
|
+
}), a.value = localStorage.getItem("drawerDocked") === "true", o.value = a.value;
|
|
68
|
+
}), (y, v) => (m(), c(t(G), {
|
|
69
|
+
theme: t(r).mode
|
|
70
|
+
}, {
|
|
71
|
+
default: s(() => [
|
|
72
|
+
f.value ? (m(), c(t(H), {
|
|
73
|
+
key: 0,
|
|
74
|
+
indeterminate: "",
|
|
75
|
+
class: "mb-n1",
|
|
76
|
+
style: { "z-index": "100000", opacity: "0.5" },
|
|
77
|
+
height: "1"
|
|
78
|
+
})) : w("", !0),
|
|
79
|
+
d(t(D), { height: "64" }, {
|
|
80
|
+
default: s(() => [
|
|
81
|
+
h(y.$slots, "header")
|
|
82
|
+
]),
|
|
83
|
+
_: 3
|
|
84
|
+
}),
|
|
85
|
+
d(t(J), { class: "bg-surface-light" }, {
|
|
86
|
+
default: s(() => [
|
|
87
|
+
g("div", ue, [
|
|
88
|
+
d(t(j))
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}),
|
|
93
|
+
t(k).footer ? (m(), c(t(D), {
|
|
94
|
+
key: 1,
|
|
95
|
+
height: "40",
|
|
96
|
+
location: "bottom"
|
|
97
|
+
}, {
|
|
98
|
+
default: s(() => [
|
|
99
|
+
d(t(K), { class: "py-0 w-100 d-flex align-center" }, {
|
|
100
|
+
default: s(() => [
|
|
101
|
+
t(n).current ? (m(), $("span", {
|
|
102
|
+
key: 0,
|
|
103
|
+
textContent: P(t(n).current.text),
|
|
104
|
+
class: z([t(n).current.type ? {} : { ["text-" + t(n).current.type]: !0 }, "overflow-hidden text-no-wrap"]),
|
|
105
|
+
style: { "text-overflow": "ellipsis" }
|
|
106
|
+
}, null, 10, ie)) : w("", !0),
|
|
107
|
+
t(n).current && t(n).current.actions ? (m(!0), $(S, { key: 1 }, L(Object.entries(t(n).current.actions), (p, _) => (m(), c(t(V), {
|
|
108
|
+
text: p[0],
|
|
109
|
+
onClick: p[1],
|
|
110
|
+
key: _,
|
|
111
|
+
density: "comfortable",
|
|
112
|
+
variant: "tonal",
|
|
113
|
+
class: "mx-2 px-2 text-none",
|
|
114
|
+
color: t(n).current.type
|
|
115
|
+
}, null, 8, ["text", "onClick", "color"]))), 128)) : w("", !0),
|
|
116
|
+
v[2] || (v[2] = g("div", { class: "me-auto" }, null, -1)),
|
|
117
|
+
h(y.$slots, "footer")
|
|
118
|
+
]),
|
|
119
|
+
_: 3,
|
|
120
|
+
__: [2]
|
|
121
|
+
})
|
|
122
|
+
]),
|
|
123
|
+
_: 3
|
|
124
|
+
})) : w("", !0),
|
|
125
|
+
t(k).drawer ? (m(), c(t(Q), {
|
|
126
|
+
key: 2,
|
|
127
|
+
modelValue: o.value,
|
|
128
|
+
"onUpdate:modelValue": v[1] || (v[1] = (p) => o.value = p),
|
|
129
|
+
width: "250",
|
|
130
|
+
"rail-width": "58",
|
|
131
|
+
rail: a.value,
|
|
132
|
+
mobile: a.value ? !1 : void 0
|
|
133
|
+
}, {
|
|
134
|
+
default: s(() => [
|
|
135
|
+
d(t(X), {
|
|
136
|
+
class: "h-100 d-flex flex-column",
|
|
137
|
+
nav: ""
|
|
138
|
+
}, {
|
|
139
|
+
default: s(() => [
|
|
140
|
+
h(y.$slots, "drawer"),
|
|
141
|
+
v[3] || (v[3] = g("div", { class: "flex-grow-1" }, null, -1)),
|
|
142
|
+
d(t(V), {
|
|
143
|
+
onClick: v[0] || (v[0] = (p) => a.value = !a.value),
|
|
144
|
+
icon: "mdi-pin-outline",
|
|
145
|
+
rounded: "rounded",
|
|
146
|
+
density: "comfortable",
|
|
147
|
+
title: a.value ? "Undock sidebar" : "Dock sidebar",
|
|
148
|
+
class: "ma-1 ms-auto",
|
|
149
|
+
variant: a.value ? "tonal" : "text"
|
|
150
|
+
}, null, 8, ["title", "variant"])
|
|
151
|
+
]),
|
|
152
|
+
_: 3,
|
|
153
|
+
__: [3]
|
|
154
|
+
})
|
|
155
|
+
]),
|
|
156
|
+
_: 3
|
|
157
|
+
}, 8, ["modelValue", "rail", "mobile"])) : w("", !0),
|
|
158
|
+
(m(!0), $(S, null, L(t(i).messages, (p, _) => (m(), c(t(Y), {
|
|
159
|
+
key: _,
|
|
160
|
+
"model-value": !0,
|
|
161
|
+
text: p.text,
|
|
162
|
+
color: p.type,
|
|
163
|
+
location: "bottom end",
|
|
164
|
+
style: q({ bottom: `${_ * 56}px` }),
|
|
165
|
+
timeout: -1
|
|
166
|
+
}, {
|
|
167
|
+
actions: s(() => [
|
|
168
|
+
d(t(V), {
|
|
169
|
+
icon: "mdi-close",
|
|
170
|
+
onClick: (pe) => t(i).remove(p.id)
|
|
171
|
+
}, null, 8, ["onClick"])
|
|
172
|
+
]),
|
|
173
|
+
_: 2
|
|
174
|
+
}, 1032, ["text", "color", "style"]))), 128))
|
|
175
|
+
]),
|
|
176
|
+
_: 3
|
|
177
|
+
}, 8, ["theme"]));
|
|
178
|
+
}
|
|
179
|
+
}), ye = /* @__PURE__ */ x({
|
|
180
|
+
__name: "DashboardPage",
|
|
181
|
+
props: {
|
|
182
|
+
breadcrumbs: {},
|
|
183
|
+
fluid: { type: Boolean, default: !0 }
|
|
184
|
+
},
|
|
185
|
+
setup(l) {
|
|
186
|
+
return (r, o) => (m(), c(t(Z), {
|
|
187
|
+
fluid: r.fluid,
|
|
188
|
+
class: "h-100 d-flex flex-column py-0 h-100"
|
|
189
|
+
}, {
|
|
190
|
+
default: s(() => [
|
|
191
|
+
r.breadcrumbs ? (m(), c(t(ee), {
|
|
192
|
+
key: 0,
|
|
193
|
+
items: r.breadcrumbs,
|
|
194
|
+
density: "comfortable",
|
|
195
|
+
class: "pa-0 flex-wrap"
|
|
196
|
+
}, null, 8, ["items"])) : w("", !0),
|
|
197
|
+
h(r.$slots, "default")
|
|
198
|
+
]),
|
|
199
|
+
_: 3
|
|
200
|
+
}, 8, ["fluid"]));
|
|
201
|
+
}
|
|
202
|
+
}), se = (l, r) => {
|
|
203
|
+
const o = l.__vccOpts || l;
|
|
204
|
+
for (const [a, n] of r)
|
|
205
|
+
o[a] = n;
|
|
206
|
+
return o;
|
|
207
|
+
}, de = {}, me = { class: "h-100 d-flex align-center" };
|
|
208
|
+
function fe(l, r) {
|
|
209
|
+
return m(), $(S, null, [
|
|
210
|
+
r[0] || (r[0] = g("span", {
|
|
211
|
+
class: "border-s mx-3",
|
|
212
|
+
style: { height: "32px" }
|
|
213
|
+
}, null, -1)),
|
|
214
|
+
g("span", me, [
|
|
215
|
+
h(l.$slots, "default")
|
|
216
|
+
])
|
|
217
|
+
], 64);
|
|
218
|
+
}
|
|
219
|
+
const Ve = /* @__PURE__ */ se(de, [["render", fe]]), xe = /* @__PURE__ */ x({
|
|
220
|
+
__name: "LoginForm",
|
|
221
|
+
props: /* @__PURE__ */ T({
|
|
222
|
+
title: { default: "Log in" },
|
|
223
|
+
submitButtonText: { default: "Log in" },
|
|
224
|
+
minWidth: {},
|
|
225
|
+
maxWidth: {},
|
|
226
|
+
loading: { type: Boolean },
|
|
227
|
+
usernameLabel: { default: "Username" },
|
|
228
|
+
passwordLabel: { default: "Password" }
|
|
229
|
+
}, {
|
|
230
|
+
username: { default: "" },
|
|
231
|
+
usernameModifiers: {},
|
|
232
|
+
password: { default: "" },
|
|
233
|
+
passwordModifiers: {}
|
|
234
|
+
}),
|
|
235
|
+
emits: /* @__PURE__ */ T(["submit"], ["update:username", "update:password"]),
|
|
236
|
+
setup(l, { emit: r }) {
|
|
237
|
+
const o = B(l, "username"), a = B(l, "password"), n = r, f = b(!1);
|
|
238
|
+
return (u, i) => (m(), c(t(W), {
|
|
239
|
+
title: u.title,
|
|
240
|
+
"min-width": u.minWidth,
|
|
241
|
+
"max-width": u.maxWidth
|
|
242
|
+
}, {
|
|
243
|
+
default: s(() => [
|
|
244
|
+
d(t(I), {
|
|
245
|
+
onSubmit: i[2] || (i[2] = U((e) => n("submit", o.value, a.value), ["prevent"])),
|
|
246
|
+
modelValue: f.value,
|
|
247
|
+
"onUpdate:modelValue": i[3] || (i[3] = (e) => f.value = e)
|
|
248
|
+
}, {
|
|
249
|
+
default: s(() => [
|
|
250
|
+
d(t(N), { class: "d-flex flex-column" }, {
|
|
251
|
+
default: s(() => [
|
|
252
|
+
d(t(F), {
|
|
253
|
+
modelValue: o.value,
|
|
254
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => o.value = e),
|
|
255
|
+
label: u.usernameLabel,
|
|
256
|
+
rules: [(e) => !!e || "Username is required"],
|
|
257
|
+
"persistent-placeholder": "",
|
|
258
|
+
autofocus: ""
|
|
259
|
+
}, null, 8, ["modelValue", "label", "rules"]),
|
|
260
|
+
d(t(F), {
|
|
261
|
+
modelValue: a.value,
|
|
262
|
+
"onUpdate:modelValue": i[1] || (i[1] = (e) => a.value = e),
|
|
263
|
+
label: u.passwordLabel,
|
|
264
|
+
type: "password",
|
|
265
|
+
rules: [(e) => !!e || "Password is required"],
|
|
266
|
+
"persistent-placeholder": ""
|
|
267
|
+
}, null, 8, ["modelValue", "label", "rules"]),
|
|
268
|
+
d(t(V), {
|
|
269
|
+
disabled: !f.value,
|
|
270
|
+
type: "submit",
|
|
271
|
+
color: "primary",
|
|
272
|
+
variant: "flat",
|
|
273
|
+
text: u.submitButtonText,
|
|
274
|
+
loading: u.loading,
|
|
275
|
+
class: "align-self-center"
|
|
276
|
+
}, null, 8, ["disabled", "text", "loading"]),
|
|
277
|
+
h(u.$slots, "beneath")
|
|
278
|
+
]),
|
|
279
|
+
_: 3
|
|
280
|
+
})
|
|
281
|
+
]),
|
|
282
|
+
_: 3
|
|
283
|
+
}, 8, ["modelValue"])
|
|
284
|
+
]),
|
|
285
|
+
_: 3
|
|
286
|
+
}, 8, ["title", "min-width", "max-width"]));
|
|
287
|
+
}
|
|
288
|
+
}), ce = { class: "text-no-wrap overflow-hidden" }, ke = /* @__PURE__ */ x({
|
|
289
|
+
__name: "NavDrawerLink",
|
|
290
|
+
props: {
|
|
291
|
+
to: {},
|
|
292
|
+
icon: {},
|
|
293
|
+
text: {}
|
|
294
|
+
},
|
|
295
|
+
setup(l) {
|
|
296
|
+
return (r, o) => (m(), c(t(te), {
|
|
297
|
+
role: "option",
|
|
298
|
+
to: r.to,
|
|
299
|
+
slim: ""
|
|
300
|
+
}, {
|
|
301
|
+
prepend: s(() => [
|
|
302
|
+
d(t(le), { icon: r.icon }, null, 8, ["icon"])
|
|
303
|
+
]),
|
|
304
|
+
default: s(() => [
|
|
305
|
+
g("span", ce, P(r.text), 1)
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
}, 8, ["to"]));
|
|
309
|
+
}
|
|
310
|
+
}), _e = /* @__PURE__ */ x({
|
|
311
|
+
__name: "OTPForm",
|
|
312
|
+
props: /* @__PURE__ */ T({
|
|
313
|
+
title: { default: "2FA Verification" },
|
|
314
|
+
subtitle: { default: "Enter the code from your authenticator app" },
|
|
315
|
+
submitButtonText: { default: "Verify" },
|
|
316
|
+
minWidth: {},
|
|
317
|
+
maxWidth: {},
|
|
318
|
+
loading: { type: Boolean },
|
|
319
|
+
length: { default: 6 },
|
|
320
|
+
autosubmit: { type: Boolean, default: !0 }
|
|
321
|
+
}, {
|
|
322
|
+
otp: { default: "" },
|
|
323
|
+
otpModifiers: {}
|
|
324
|
+
}),
|
|
325
|
+
emits: /* @__PURE__ */ T(["submit"], ["update:otp"]),
|
|
326
|
+
setup(l, { emit: r }) {
|
|
327
|
+
const o = B(l, "otp"), a = r, n = l, f = O(() => o.value.length === n.length);
|
|
328
|
+
return C(o, () => {
|
|
329
|
+
n.autosubmit && o.value.length === n.length && a("submit", o.value);
|
|
330
|
+
}), (u, i) => (m(), c(t(W), {
|
|
331
|
+
title: u.title,
|
|
332
|
+
subtitle: u.subtitle,
|
|
333
|
+
"min-width": u.minWidth,
|
|
334
|
+
"max-width": u.maxWidth
|
|
335
|
+
}, {
|
|
336
|
+
default: s(() => [
|
|
337
|
+
d(t(I), {
|
|
338
|
+
onSubmit: i[1] || (i[1] = U((e) => a("submit", o.value), ["prevent"])),
|
|
339
|
+
"model-value": f.value
|
|
340
|
+
}, {
|
|
341
|
+
default: s(() => [
|
|
342
|
+
d(t(N), { class: "d-flex flex-column" }, {
|
|
343
|
+
default: s(() => [
|
|
344
|
+
d(t(oe), {
|
|
345
|
+
modelValue: o.value,
|
|
346
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => o.value = e),
|
|
347
|
+
label: "OTP",
|
|
348
|
+
"persistent-placeholder": "",
|
|
349
|
+
autofocus: "",
|
|
350
|
+
length: u.length
|
|
351
|
+
}, null, 8, ["modelValue", "length"]),
|
|
352
|
+
d(t(V), {
|
|
353
|
+
disabled: !f.value,
|
|
354
|
+
type: "submit",
|
|
355
|
+
color: "primary",
|
|
356
|
+
variant: "flat",
|
|
357
|
+
text: u.submitButtonText,
|
|
358
|
+
loading: u.loading,
|
|
359
|
+
class: "align-self-center"
|
|
360
|
+
}, null, 8, ["disabled", "text", "loading"]),
|
|
361
|
+
h(u.$slots, "beneath")
|
|
362
|
+
]),
|
|
363
|
+
_: 3
|
|
364
|
+
})
|
|
365
|
+
]),
|
|
366
|
+
_: 3
|
|
367
|
+
}, 8, ["model-value"])
|
|
368
|
+
]),
|
|
369
|
+
_: 3
|
|
370
|
+
}, 8, ["title", "subtitle", "min-width", "max-width"]));
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
export {
|
|
374
|
+
ge as AppBase,
|
|
375
|
+
ye as DashboardPage,
|
|
376
|
+
Ve as FooterSection,
|
|
377
|
+
xe as LoginForm,
|
|
378
|
+
ke as NavDrawerLink,
|
|
379
|
+
_e as OTPForm,
|
|
380
|
+
ae as useColorMode,
|
|
381
|
+
ne as useFooter,
|
|
382
|
+
re as useNotify
|
|
383
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("html{overflow:auto}html[data-theme=dark]{color-scheme:dark}html[data-theme=light]{color-scheme:light}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
(function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("vuetify/components"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","vuetify/components","pinia"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.appsalutely={},s.Vue,s.VueRouter,s.VuetifyComponents,s.Pinia))})(this,function(s,e,b,i,w){"use strict";const k=w.defineStore("colorMode",()=>{const r=e.ref(localStorage.getItem("colorMode")=="dark"?"dark":"light");function a(){r.value=r.value==="dark"?"light":"dark"}function l(o){localStorage.setItem("colorMode",o),document.documentElement.setAttribute("data-theme",o)}return e.watch(r,o=>l(o)),l(r.value),{mode:r,toggle:a}}),y=w.defineStore("footer",()=>{const r=e.ref([]),a=e.computed(()=>r.value.length>0?r.value[r.value.length-1]:null);function l(n){return n.id||(n.id=new Date().getTime().toString()),n.timeout===void 0&&(n.timeout=5e3),r.value.push(n),n.timeout&&setTimeout(()=>{o(n.id)},n.timeout),n.id}function o(n){r.value=r.value.filter(f=>f.id!==n)}return{messages:r,current:a,addMessage:l,removeMessage:o}}),g=w.defineStore("notify",()=>{const r=e.ref([]),a=e.ref({});function l(t){return t.id?o(t.id):t.id=new Date().getTime().toString(),t.timeout===void 0&&(t.timeout=5e3),r.value.push(t),t.timeout&&(a.value[t.id]=setTimeout(()=>{o(t.id)},t.timeout)),t.id}function o(t){r.value=r.value.filter(V=>V.id!==t),a.value[t]&&(clearTimeout(a.value[t]),delete a.value[t])}function n(t){return l({text:t,type:"info"})}function f(t){return l({text:t,type:"success"})}function d(t){return l({text:t,type:"warning"})}function u(t){return l({text:t,type:"error"})}return{messages:r,add:l,remove:o,info:n,success:f,warning:d,error:u}}),B={class:"d-flex flex-column pa-4 h-100"},x=["textContent"],C=e.defineComponent({__name:"AppBase",props:{drawerOpen:{type:Boolean,default:!1},drawerOpenModifiers:{}},emits:["update:drawerOpen"],setup(r){const a=k(),l=e.useModel(r,"drawerOpen"),o=e.ref(!1),n=y(),f=e.ref(!1),d=e.ref(null),u=g(),t=b.useRouter(),V=e.useSlots();return e.watch(o,p=>{localStorage.setItem("drawerDocked",String(p))}),e.onBeforeMount(()=>{t.beforeEach(()=>{d.value=setTimeout(()=>{f.value=!0},300)}),t.afterEach(()=>{d.value&&(clearTimeout(d.value),d.value=null),f.value=!1}),o.value=localStorage.getItem("drawerDocked")==="true",l.value=o.value}),(p,m)=>(e.openBlock(),e.createBlock(e.unref(i.VApp),{theme:e.unref(a).mode},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(e.unref(i.VProgressLinear),{key:0,indeterminate:"",class:"mb-n1",style:{"z-index":"100000",opacity:"0.5"},height:"1"})):e.createCommentVNode("",!0),e.createVNode(e.unref(i.VAppBar),{height:"64"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),_:3}),e.createVNode(e.unref(i.VMain),{class:"bg-surface-light"},{default:e.withCtx(()=>[e.createElementVNode("div",B,[e.createVNode(e.unref(b.RouterView))])]),_:1}),e.unref(V).footer?(e.openBlock(),e.createBlock(e.unref(i.VAppBar),{key:1,height:"40",location:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VFooter),{class:"py-0 w-100 d-flex align-center"},{default:e.withCtx(()=>[e.unref(n).current?(e.openBlock(),e.createElementBlock("span",{key:0,textContent:e.toDisplayString(e.unref(n).current.text),class:e.normalizeClass([e.unref(n).current.type?{}:{["text-"+e.unref(n).current.type]:!0},"overflow-hidden text-no-wrap"]),style:{"text-overflow":"ellipsis"}},null,10,x)):e.createCommentVNode("",!0),e.unref(n).current&&e.unref(n).current.actions?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Object.entries(e.unref(n).current.actions),(c,h)=>(e.openBlock(),e.createBlock(e.unref(i.VBtn),{text:c[0],onClick:c[1],key:h,density:"comfortable",variant:"tonal",class:"mx-2 px-2 text-none",color:e.unref(n).current.type},null,8,["text","onClick","color"]))),128)):e.createCommentVNode("",!0),m[2]||(m[2]=e.createElementVNode("div",{class:"me-auto"},null,-1)),e.renderSlot(p.$slots,"footer")]),_:3,__:[2]})]),_:3})):e.createCommentVNode("",!0),e.unref(V).drawer?(e.openBlock(),e.createBlock(e.unref(i.VNavigationDrawer),{key:2,modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=c=>l.value=c),width:"250","rail-width":"58",rail:o.value,mobile:o.value?!1:void 0},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VList),{class:"h-100 d-flex flex-column",nav:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"drawer"),m[3]||(m[3]=e.createElementVNode("div",{class:"flex-grow-1"},null,-1)),e.createVNode(e.unref(i.VBtn),{onClick:m[0]||(m[0]=c=>o.value=!o.value),icon:"mdi-pin-outline",rounded:"rounded",density:"comfortable",title:o.value?"Undock sidebar":"Dock sidebar",class:"ma-1 ms-auto",variant:o.value?"tonal":"text"},null,8,["title","variant"])]),_:3,__:[3]})]),_:3},8,["modelValue","rail","mobile"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u).messages,(c,h)=>(e.openBlock(),e.createBlock(e.unref(i.VSnackbar),{key:h,"model-value":!0,text:c.text,color:c.type,location:"bottom end",style:e.normalizeStyle({bottom:`${h*56}px`}),timeout:-1},{actions:e.withCtx(()=>[e.createVNode(e.unref(i.VBtn),{icon:"mdi-close",onClick:O=>e.unref(u).remove(c.id)},null,8,["onClick"])]),_:2},1032,["text","color","style"]))),128))]),_:3},8,["theme"]))}}),N=e.defineComponent({__name:"DashboardPage",props:{breadcrumbs:{},fluid:{type:Boolean,default:!0}},setup(r){return(a,l)=>(e.openBlock(),e.createBlock(e.unref(i.VContainer),{fluid:a.fluid,class:"h-100 d-flex flex-column py-0 h-100"},{default:e.withCtx(()=>[a.breadcrumbs?(e.openBlock(),e.createBlock(e.unref(i.VBreadcrumbs),{key:0,items:a.breadcrumbs,density:"comfortable",class:"pa-0 flex-wrap"},null,8,["items"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default")]),_:3},8,["fluid"]))}}),S=(r,a)=>{const l=r.__vccOpts||r;for(const[o,n]of a)l[o]=n;return l},M={},T={class:"h-100 d-flex align-center"};function _(r,a){return e.openBlock(),e.createElementBlock(e.Fragment,null,[a[0]||(a[0]=e.createElementVNode("span",{class:"border-s mx-3",style:{height:"32px"}},null,-1)),e.createElementVNode("span",T,[e.renderSlot(r.$slots,"default")])],64)}const $=S(M,[["render",_]]),F=e.defineComponent({__name:"LoginForm",props:e.mergeModels({title:{default:"Log in"},submitButtonText:{default:"Log in"},minWidth:{},maxWidth:{},loading:{type:Boolean},usernameLabel:{default:"Username"},passwordLabel:{default:"Password"}},{username:{default:""},usernameModifiers:{},password:{default:""},passwordModifiers:{}}),emits:e.mergeModels(["submit"],["update:username","update:password"]),setup(r,{emit:a}){const l=e.useModel(r,"username"),o=e.useModel(r,"password"),n=a,f=e.ref(!1);return(d,u)=>(e.openBlock(),e.createBlock(e.unref(i.VCard),{title:d.title,"min-width":d.minWidth,"max-width":d.maxWidth},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VForm),{onSubmit:u[2]||(u[2]=e.withModifiers(t=>n("submit",l.value,o.value),["prevent"])),modelValue:f.value,"onUpdate:modelValue":u[3]||(u[3]=t=>f.value=t)},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VCardText),{class:"d-flex flex-column"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VTextField),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=t=>l.value=t),label:d.usernameLabel,rules:[t=>!!t||"Username is required"],"persistent-placeholder":"",autofocus:""},null,8,["modelValue","label","rules"]),e.createVNode(e.unref(i.VTextField),{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=t=>o.value=t),label:d.passwordLabel,type:"password",rules:[t=>!!t||"Password is required"],"persistent-placeholder":""},null,8,["modelValue","label","rules"]),e.createVNode(e.unref(i.VBtn),{disabled:!f.value,type:"submit",color:"primary",variant:"flat",text:d.submitButtonText,loading:d.loading,class:"align-self-center"},null,8,["disabled","text","loading"]),e.renderSlot(d.$slots,"beneath")]),_:3})]),_:3},8,["modelValue"])]),_:3},8,["title","min-width","max-width"]))}}),L={class:"text-no-wrap overflow-hidden"},E=e.defineComponent({__name:"NavDrawerLink",props:{to:{},icon:{},text:{}},setup(r){return(a,l)=>(e.openBlock(),e.createBlock(e.unref(i.VListItem),{role:"option",to:a.to,slim:""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(i.VIcon),{icon:a.icon},null,8,["icon"])]),default:e.withCtx(()=>[e.createElementVNode("span",L,e.toDisplayString(a.text),1)]),_:1},8,["to"]))}}),D=e.defineComponent({__name:"OTPForm",props:e.mergeModels({title:{default:"2FA Verification"},subtitle:{default:"Enter the code from your authenticator app"},submitButtonText:{default:"Verify"},minWidth:{},maxWidth:{},loading:{type:Boolean},length:{default:6},autosubmit:{type:Boolean,default:!0}},{otp:{default:""},otpModifiers:{}}),emits:e.mergeModels(["submit"],["update:otp"]),setup(r,{emit:a}){const l=e.useModel(r,"otp"),o=a,n=r,f=e.computed(()=>l.value.length===n.length);return e.watch(l,()=>{n.autosubmit&&l.value.length===n.length&&o("submit",l.value)}),(d,u)=>(e.openBlock(),e.createBlock(e.unref(i.VCard),{title:d.title,subtitle:d.subtitle,"min-width":d.minWidth,"max-width":d.maxWidth},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VForm),{onSubmit:u[1]||(u[1]=e.withModifiers(t=>o("submit",l.value),["prevent"])),"model-value":f.value},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VCardText),{class:"d-flex flex-column"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VOtpInput),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=t=>l.value=t),label:"OTP","persistent-placeholder":"",autofocus:"",length:d.length},null,8,["modelValue","length"]),e.createVNode(e.unref(i.VBtn),{disabled:!f.value,type:"submit",color:"primary",variant:"flat",text:d.submitButtonText,loading:d.loading,class:"align-self-center"},null,8,["disabled","text","loading"]),e.renderSlot(d.$slots,"beneath")]),_:3})]),_:3},8,["model-value"])]),_:3},8,["title","subtitle","min-width","max-width"]))}});s.AppBase=C,s.DashboardPage=N,s.FooterSection=$,s.LoginForm=F,s.NavDrawerLink=E,s.OTPForm=D,s.useColorMode=k,s.useFooter=y,s.useNotify=g,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -4,12 +4,18 @@ type __VLS_Props = {
|
|
|
4
4
|
minWidth?: string | number;
|
|
5
5
|
maxWidth?: string | number;
|
|
6
6
|
loading?: boolean;
|
|
7
|
+
usernameLabel?: string;
|
|
8
|
+
passwordLabel?: string;
|
|
7
9
|
};
|
|
8
10
|
type __VLS_PublicProps = __VLS_Props & {
|
|
9
11
|
'username'?: string;
|
|
10
12
|
'password'?: string;
|
|
11
13
|
};
|
|
12
|
-
declare
|
|
14
|
+
declare var __VLS_30: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
beneath?: (props: typeof __VLS_30) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
19
|
submit: (args_0: string, args_1: string) => any;
|
|
14
20
|
"update:username": (value: string) => any;
|
|
15
21
|
"update:password": (value: string) => any;
|
|
@@ -20,5 +26,13 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
20
26
|
}>, {
|
|
21
27
|
title: string;
|
|
22
28
|
submitButtonText: string;
|
|
29
|
+
usernameLabel: string;
|
|
30
|
+
passwordLabel: string;
|
|
23
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
24
33
|
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -11,7 +11,11 @@ type __VLS_Props = {
|
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & {
|
|
12
12
|
'otp'?: string;
|
|
13
13
|
};
|
|
14
|
-
declare
|
|
14
|
+
declare var __VLS_26: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
beneath?: (props: typeof __VLS_26) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
19
|
submit: (args_0: string) => any;
|
|
16
20
|
"update:otp": (value: string) => any;
|
|
17
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
@@ -24,4 +28,10 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
24
28
|
submitButtonText: string;
|
|
25
29
|
autosubmit: boolean;
|
|
26
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
27
32
|
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as AppBase } from './components/AppBase.vue';
|
|
2
|
+
export { default as DashboardPage } from './components/DashboardPage.vue';
|
|
3
|
+
export { default as FooterSection } from './components/FooterSection.vue';
|
|
4
|
+
export { default as LoginForm } from './components/LoginForm.vue';
|
|
5
|
+
export { default as NavDrawerLink } from './components/NavDrawerLink.vue';
|
|
6
|
+
export { default as OTPForm } from './components/OTPForm.vue';
|
|
7
|
+
export { default as useColorMode } from './stores/colorMode';
|
|
8
|
+
export { default as useFooter } from './stores/footer';
|
|
9
|
+
export { default as useNotify } from './stores/notify';
|
package/package.json
CHANGED
|
@@ -1,46 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appsalutely",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.1.2",
|
|
3
|
+
"version": "0.1.4",
|
|
5
4
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"main": "./dist/appsalutely.umd.cjs",
|
|
9
|
+
"module": "./dist/appsalutely.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import": "./dist/
|
|
13
|
-
"require": "./dist/
|
|
14
|
-
}
|
|
15
|
-
"./index.css": "./dist/index.css"
|
|
12
|
+
"import": "./dist/appsalutely.js",
|
|
13
|
+
"require": "./dist/appsalutely.umd.cjs"
|
|
14
|
+
}
|
|
16
15
|
},
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "vite build && vue-tsc",
|
|
19
19
|
"type-check": "vue-tsc --build",
|
|
20
20
|
"lint": "eslint . --fix",
|
|
21
21
|
"format": "prettier --write src/"
|
|
22
22
|
},
|
|
23
|
-
"
|
|
24
|
-
"pinia": "^3.0.
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"pinia": "^3.0.2",
|
|
25
25
|
"vue": "^3.5.13",
|
|
26
26
|
"vue-router": "^4.5.1",
|
|
27
|
-
"vuetify": "^3.8.
|
|
27
|
+
"vuetify": "^3.8.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@vitejs/plugin-vue": "^5.2.4",
|
|
30
|
+
"@types/node": "^22.15.21",
|
|
31
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
33
32
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
34
33
|
"@vue/eslint-config-typescript": "^14.5.0",
|
|
35
34
|
"@vue/tsconfig": "^0.7.0",
|
|
36
|
-
"eslint": "^9.
|
|
37
|
-
"eslint-plugin-vue": "
|
|
35
|
+
"eslint": "^9.27.0",
|
|
36
|
+
"eslint-plugin-vue": "^10.1.0",
|
|
38
37
|
"jiti": "^2.4.2",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"vite": "^6.2.4",
|
|
43
|
-
"vite-plugin-vue-devtools": "^7.7.2",
|
|
38
|
+
"typescript": "~5.8.3",
|
|
39
|
+
"vite": "^6.3.5",
|
|
40
|
+
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
44
41
|
"vue-tsc": "^2.2.8"
|
|
45
42
|
}
|
|
46
43
|
}
|
package/.editorconfig
DELETED
package/.prettierrc.json
DELETED
package/dist/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
html{overflow:auto}html[data-theme=dark]{color-scheme:dark}html[data-theme=light]{color-scheme:light}
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import AppBase from './components/AppBase.vue';
|
|
2
|
-
import DashboardPage from './components/DashboardPage.vue';
|
|
3
|
-
import FooterSection from './components/FooterSection.vue';
|
|
4
|
-
import LoginForm from './components/LoginForm.vue';
|
|
5
|
-
import NavDrawerLink from './components/NavDrawerLink.vue';
|
|
6
|
-
import OTPForm from './components/OTPForm.vue';
|
|
7
|
-
import useColorMode from './stores/colorMode';
|
|
8
|
-
import useFooter from './stores/footer';
|
|
9
|
-
import useNotify from './stores/notify';
|
|
10
|
-
export { AppBase, DashboardPage, FooterSection, LoginForm, NavDrawerLink, OTPForm, useColorMode, useFooter, useNotify, };
|
package/dist/index.js
DELETED
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { ref as v, watch as S, computed as P, defineComponent as k, useModel as B, useSlots as A, onBeforeMount as E, createBlock as f, openBlock as m, unref as t, withCtx as s, createCommentVNode as h, createVNode as d, createElementBlock as w, renderSlot as V, createElementVNode as b, normalizeClass as j, toDisplayString as M, Fragment as T, renderList as F, normalizeStyle as z, mergeModels as C, withModifiers as U } from "vue";
|
|
2
|
-
import { useRouter as q, RouterView as R } from "vue-router";
|
|
3
|
-
import { VApp as G, VProgressLinear as H, VAppBar as O, VMain as J, VFooter as K, VBtn as x, VNavigationDrawer as Q, VList as X, VSnackbar as Y, VContainer as Z, VBreadcrumbs as ee, VCard as W, VForm as I, VCardText as N, VTextField as L, VListItem as te, VIcon as oe, VOtpInput as le } from "vuetify/components";
|
|
4
|
-
import { defineStore as D } from "pinia";
|
|
5
|
-
const ne = D("colorMode", () => {
|
|
6
|
-
const o = v(localStorage.getItem("colorMode") == "dark" ? "dark" : "light");
|
|
7
|
-
function n() {
|
|
8
|
-
o.value = o.value === "dark" ? "light" : "dark";
|
|
9
|
-
}
|
|
10
|
-
function l(r) {
|
|
11
|
-
localStorage.setItem("colorMode", r), document.documentElement.setAttribute("data-theme", r);
|
|
12
|
-
}
|
|
13
|
-
return S(o, (r) => l(r)), l(o.value), { mode: o, toggle: n };
|
|
14
|
-
}), re = D("footer", () => {
|
|
15
|
-
const o = v([]), n = P(() => o.value.length > 0 ? o.value[o.value.length - 1] : null);
|
|
16
|
-
function l(a) {
|
|
17
|
-
return a.id || (a.id = (/* @__PURE__ */ new Date()).getTime().toString()), a.timeout === void 0 && (a.timeout = 5e3), o.value.push(a), a.timeout && setTimeout(() => {
|
|
18
|
-
r(a.id);
|
|
19
|
-
}, a.timeout), a.id;
|
|
20
|
-
}
|
|
21
|
-
function r(a) {
|
|
22
|
-
o.value = o.value.filter((c) => c.id !== a);
|
|
23
|
-
}
|
|
24
|
-
return { messages: o, current: n, addMessage: l, removeMessage: r };
|
|
25
|
-
}), ae = D("notify", () => {
|
|
26
|
-
const o = v([]), n = v({});
|
|
27
|
-
function l(e) {
|
|
28
|
-
return e.id ? r(e.id) : e.id = (/* @__PURE__ */ new Date()).getTime().toString(), e.timeout === void 0 && (e.timeout = 5e3), o.value.push(e), e.timeout && (n.value[e.id] = setTimeout(() => {
|
|
29
|
-
r(e.id);
|
|
30
|
-
}, e.timeout)), e.id;
|
|
31
|
-
}
|
|
32
|
-
function r(e) {
|
|
33
|
-
o.value = o.value.filter((_) => _.id !== e), n.value[e] && (clearTimeout(n.value[e]), delete n.value[e]);
|
|
34
|
-
}
|
|
35
|
-
function a(e) {
|
|
36
|
-
return l({ text: e, type: "info" });
|
|
37
|
-
}
|
|
38
|
-
function c(e) {
|
|
39
|
-
return l({ text: e, type: "success" });
|
|
40
|
-
}
|
|
41
|
-
function u(e) {
|
|
42
|
-
return l({ text: e, type: "warning" });
|
|
43
|
-
}
|
|
44
|
-
function i(e) {
|
|
45
|
-
return l({ text: e, type: "error" });
|
|
46
|
-
}
|
|
47
|
-
return { messages: o, add: l, remove: r, info: a, success: c, warning: u, error: i };
|
|
48
|
-
}), ue = { class: "d-flex flex-column pa-4 h-100" }, ie = ["textContent"], xe = /* @__PURE__ */ k({
|
|
49
|
-
__name: "AppBase",
|
|
50
|
-
props: {
|
|
51
|
-
drawerOpen: { type: Boolean, default: !1 },
|
|
52
|
-
drawerOpenModifiers: {}
|
|
53
|
-
},
|
|
54
|
-
emits: ["update:drawerOpen"],
|
|
55
|
-
setup(o) {
|
|
56
|
-
const n = ne(), l = B(o, "drawerOpen"), r = v(!1), a = re(), c = v(!1), u = v(null), i = ae(), e = q(), _ = A();
|
|
57
|
-
return S(r, (g) => {
|
|
58
|
-
localStorage.setItem("drawerDocked", String(g));
|
|
59
|
-
}), E(() => {
|
|
60
|
-
e.beforeEach(() => {
|
|
61
|
-
u.value = setTimeout(() => {
|
|
62
|
-
c.value = !0;
|
|
63
|
-
}, 300);
|
|
64
|
-
}), e.afterEach(() => {
|
|
65
|
-
u.value && (clearTimeout(u.value), u.value = null), c.value = !1;
|
|
66
|
-
}), r.value = localStorage.getItem("drawerDocked") === "true", l.value = r.value;
|
|
67
|
-
}), (g, y) => (m(), f(t(G), {
|
|
68
|
-
theme: t(n).mode
|
|
69
|
-
}, {
|
|
70
|
-
default: s(() => [
|
|
71
|
-
c.value ? (m(), f(t(H), {
|
|
72
|
-
key: 0,
|
|
73
|
-
indeterminate: "",
|
|
74
|
-
class: "mb-n1",
|
|
75
|
-
style: { "z-index": "100000", opacity: "0.5" },
|
|
76
|
-
height: "1"
|
|
77
|
-
})) : h("", !0),
|
|
78
|
-
d(t(O), { height: "64" }, {
|
|
79
|
-
default: s(() => [
|
|
80
|
-
V(g.$slots, "header")
|
|
81
|
-
]),
|
|
82
|
-
_: 3
|
|
83
|
-
}),
|
|
84
|
-
d(t(J), { class: "bg-surface-light" }, {
|
|
85
|
-
default: s(() => [
|
|
86
|
-
b("div", ue, [
|
|
87
|
-
d(t(R))
|
|
88
|
-
])
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}),
|
|
92
|
-
t(_).footer ? (m(), f(t(O), {
|
|
93
|
-
key: 1,
|
|
94
|
-
height: "40",
|
|
95
|
-
location: "bottom"
|
|
96
|
-
}, {
|
|
97
|
-
default: s(() => [
|
|
98
|
-
d(t(K), { class: "py-0 w-100 d-flex align-center" }, {
|
|
99
|
-
default: s(() => [
|
|
100
|
-
t(a).current ? (m(), w("span", {
|
|
101
|
-
key: 0,
|
|
102
|
-
textContent: M(t(a).current.text),
|
|
103
|
-
class: j([t(a).current.type ? {} : { ["text-" + t(a).current.type]: !0 }, "overflow-hidden text-no-wrap"]),
|
|
104
|
-
style: { "text-overflow": "ellipsis" }
|
|
105
|
-
}, null, 10, ie)) : h("", !0),
|
|
106
|
-
t(a).current && t(a).current.actions ? (m(!0), w(T, { key: 1 }, F(Object.entries(t(a).current.actions), (p, $) => (m(), f(t(x), {
|
|
107
|
-
text: p[0],
|
|
108
|
-
onClick: p[1],
|
|
109
|
-
key: $,
|
|
110
|
-
density: "comfortable",
|
|
111
|
-
variant: "tonal",
|
|
112
|
-
class: "mx-2 px-2 text-none",
|
|
113
|
-
color: t(a).current.type
|
|
114
|
-
}, null, 8, ["text", "onClick", "color"]))), 128)) : h("", !0),
|
|
115
|
-
y[2] || (y[2] = b("div", { class: "me-auto" }, null, -1)),
|
|
116
|
-
V(g.$slots, "footer")
|
|
117
|
-
]),
|
|
118
|
-
_: 3,
|
|
119
|
-
__: [2]
|
|
120
|
-
})
|
|
121
|
-
]),
|
|
122
|
-
_: 3
|
|
123
|
-
})) : h("", !0),
|
|
124
|
-
t(_).drawer ? (m(), f(t(Q), {
|
|
125
|
-
key: 2,
|
|
126
|
-
modelValue: l.value,
|
|
127
|
-
"onUpdate:modelValue": y[1] || (y[1] = (p) => l.value = p),
|
|
128
|
-
width: "250",
|
|
129
|
-
"rail-width": "58",
|
|
130
|
-
rail: r.value,
|
|
131
|
-
mobile: r.value ? !1 : void 0
|
|
132
|
-
}, {
|
|
133
|
-
default: s(() => [
|
|
134
|
-
d(t(X), { class: "h-100 d-flex flex-column" }, {
|
|
135
|
-
default: s(() => [
|
|
136
|
-
V(g.$slots, "drawer"),
|
|
137
|
-
d(t(x), {
|
|
138
|
-
onClick: y[0] || (y[0] = (p) => r.value = !r.value),
|
|
139
|
-
icon: "mdi-pin-outline",
|
|
140
|
-
rounded: "rounded",
|
|
141
|
-
density: "comfortable",
|
|
142
|
-
title: r.value ? "Undock sidebar" : "Dock sidebar",
|
|
143
|
-
class: "my-1 mx-3 ms-auto",
|
|
144
|
-
variant: r.value ? "tonal" : "text"
|
|
145
|
-
}, null, 8, ["title", "variant"])
|
|
146
|
-
]),
|
|
147
|
-
_: 3
|
|
148
|
-
})
|
|
149
|
-
]),
|
|
150
|
-
_: 3
|
|
151
|
-
}, 8, ["modelValue", "rail", "mobile"])) : h("", !0),
|
|
152
|
-
(m(!0), w(T, null, F(t(i).messages, (p, $) => (m(), f(t(Y), {
|
|
153
|
-
key: $,
|
|
154
|
-
"model-value": !0,
|
|
155
|
-
text: p.text,
|
|
156
|
-
color: p.type,
|
|
157
|
-
location: "bottom end",
|
|
158
|
-
style: z({ bottom: `${$ * 56}px` }),
|
|
159
|
-
timeout: -1
|
|
160
|
-
}, {
|
|
161
|
-
actions: s(() => [
|
|
162
|
-
d(t(x), {
|
|
163
|
-
icon: "mdi-close",
|
|
164
|
-
onClick: (be) => t(i).remove(p.id)
|
|
165
|
-
}, null, 8, ["onClick"])
|
|
166
|
-
]),
|
|
167
|
-
_: 2
|
|
168
|
-
}, 1032, ["text", "color", "style"]))), 128))
|
|
169
|
-
]),
|
|
170
|
-
_: 3
|
|
171
|
-
}, 8, ["theme"]));
|
|
172
|
-
}
|
|
173
|
-
}), se = ["textContent"], ke = /* @__PURE__ */ k({
|
|
174
|
-
__name: "DashboardPage",
|
|
175
|
-
props: {
|
|
176
|
-
breadcrumbs: {},
|
|
177
|
-
fluid: { type: Boolean, default: !0 },
|
|
178
|
-
title: {}
|
|
179
|
-
},
|
|
180
|
-
setup(o) {
|
|
181
|
-
return (n, l) => (m(), f(t(Z), {
|
|
182
|
-
fluid: n.fluid,
|
|
183
|
-
class: "h-100 d-flex flex-column py-0 h-100"
|
|
184
|
-
}, {
|
|
185
|
-
default: s(() => [
|
|
186
|
-
n.breadcrumbs ? (m(), f(t(ee), {
|
|
187
|
-
key: 0,
|
|
188
|
-
items: n.breadcrumbs,
|
|
189
|
-
density: "comfortable",
|
|
190
|
-
class: "pa-0"
|
|
191
|
-
}, null, 8, ["items"])) : h("", !0),
|
|
192
|
-
n.title ? (m(), w("h1", {
|
|
193
|
-
key: 1,
|
|
194
|
-
textContent: M(n.title),
|
|
195
|
-
class: "text-h5 font-bold ma-1"
|
|
196
|
-
}, null, 8, se)) : h("", !0),
|
|
197
|
-
V(n.$slots, "default")
|
|
198
|
-
]),
|
|
199
|
-
_: 3
|
|
200
|
-
}, 8, ["fluid"]));
|
|
201
|
-
}
|
|
202
|
-
}), de = (o, n) => {
|
|
203
|
-
const l = o.__vccOpts || o;
|
|
204
|
-
for (const [r, a] of n)
|
|
205
|
-
l[r] = a;
|
|
206
|
-
return l;
|
|
207
|
-
}, me = {}, ce = { class: "h-100 d-flex align-center" };
|
|
208
|
-
function fe(o, n) {
|
|
209
|
-
return m(), w(T, null, [
|
|
210
|
-
n[0] || (n[0] = b("span", {
|
|
211
|
-
class: "border-s mx-3",
|
|
212
|
-
style: { height: "32px" }
|
|
213
|
-
}, null, -1)),
|
|
214
|
-
b("span", ce, [
|
|
215
|
-
V(o.$slots, "default")
|
|
216
|
-
])
|
|
217
|
-
], 64);
|
|
218
|
-
}
|
|
219
|
-
const _e = /* @__PURE__ */ de(me, [["render", fe]]), pe = { class: "d-flex justify-center" }, $e = /* @__PURE__ */ k({
|
|
220
|
-
__name: "LoginForm",
|
|
221
|
-
props: /* @__PURE__ */ C({
|
|
222
|
-
title: { default: "Login" },
|
|
223
|
-
submitButtonText: { default: "Login" },
|
|
224
|
-
minWidth: {},
|
|
225
|
-
maxWidth: {},
|
|
226
|
-
loading: { type: Boolean }
|
|
227
|
-
}, {
|
|
228
|
-
username: { default: "" },
|
|
229
|
-
usernameModifiers: {},
|
|
230
|
-
password: { default: "" },
|
|
231
|
-
passwordModifiers: {}
|
|
232
|
-
}),
|
|
233
|
-
emits: /* @__PURE__ */ C(["submit"], ["update:username", "update:password"]),
|
|
234
|
-
setup(o, { emit: n }) {
|
|
235
|
-
const l = B(o, "username"), r = B(o, "password"), a = n, c = v(!1);
|
|
236
|
-
return (u, i) => (m(), f(t(W), {
|
|
237
|
-
title: u.title,
|
|
238
|
-
"min-width": u.minWidth,
|
|
239
|
-
"max-width": u.maxWidth
|
|
240
|
-
}, {
|
|
241
|
-
default: s(() => [
|
|
242
|
-
d(t(I), {
|
|
243
|
-
onSubmit: i[2] || (i[2] = U((e) => a("submit", l.value, r.value), ["prevent"])),
|
|
244
|
-
modelValue: c.value,
|
|
245
|
-
"onUpdate:modelValue": i[3] || (i[3] = (e) => c.value = e)
|
|
246
|
-
}, {
|
|
247
|
-
default: s(() => [
|
|
248
|
-
d(t(N), null, {
|
|
249
|
-
default: s(() => [
|
|
250
|
-
d(t(L), {
|
|
251
|
-
modelValue: l.value,
|
|
252
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) => l.value = e),
|
|
253
|
-
label: "Username",
|
|
254
|
-
rules: [(e) => !!e || "Username is required"],
|
|
255
|
-
"persistent-placeholder": "",
|
|
256
|
-
autofocus: ""
|
|
257
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
258
|
-
d(t(L), {
|
|
259
|
-
modelValue: r.value,
|
|
260
|
-
"onUpdate:modelValue": i[1] || (i[1] = (e) => r.value = e),
|
|
261
|
-
label: "Password",
|
|
262
|
-
type: "password",
|
|
263
|
-
rules: [(e) => !!e || "Password is required"],
|
|
264
|
-
"persistent-placeholder": ""
|
|
265
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
266
|
-
b("div", pe, [
|
|
267
|
-
d(t(x), {
|
|
268
|
-
disabled: !c.value,
|
|
269
|
-
type: "submit",
|
|
270
|
-
color: "primary",
|
|
271
|
-
variant: "flat",
|
|
272
|
-
text: u.submitButtonText,
|
|
273
|
-
loading: u.loading
|
|
274
|
-
}, null, 8, ["disabled", "text", "loading"])
|
|
275
|
-
])
|
|
276
|
-
]),
|
|
277
|
-
_: 1
|
|
278
|
-
})
|
|
279
|
-
]),
|
|
280
|
-
_: 1
|
|
281
|
-
}, 8, ["modelValue"])
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
}, 8, ["title", "min-width", "max-width"]));
|
|
285
|
-
}
|
|
286
|
-
}), ve = { class: "text-no-wrap overflow-hidden" }, Be = /* @__PURE__ */ k({
|
|
287
|
-
__name: "NavDrawerLink",
|
|
288
|
-
props: {
|
|
289
|
-
to: {},
|
|
290
|
-
icon: {},
|
|
291
|
-
text: {}
|
|
292
|
-
},
|
|
293
|
-
setup(o) {
|
|
294
|
-
return (n, l) => (m(), f(t(te), {
|
|
295
|
-
role: "option",
|
|
296
|
-
to: n.to,
|
|
297
|
-
slim: ""
|
|
298
|
-
}, {
|
|
299
|
-
prepend: s(() => [
|
|
300
|
-
d(t(oe), { icon: n.icon }, null, 8, ["icon"])
|
|
301
|
-
]),
|
|
302
|
-
default: s(() => [
|
|
303
|
-
b("span", ve, M(n.text), 1)
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
}, 8, ["to"]));
|
|
307
|
-
}
|
|
308
|
-
}), he = { class: "d-flex justify-center" }, Ce = /* @__PURE__ */ k({
|
|
309
|
-
__name: "OTPForm",
|
|
310
|
-
props: /* @__PURE__ */ C({
|
|
311
|
-
title: { default: "2FA Verification" },
|
|
312
|
-
subtitle: { default: "Enter the code from your authenticator app" },
|
|
313
|
-
submitButtonText: { default: "Verify" },
|
|
314
|
-
minWidth: {},
|
|
315
|
-
maxWidth: {},
|
|
316
|
-
loading: { type: Boolean },
|
|
317
|
-
length: { default: 6 },
|
|
318
|
-
autosubmit: { type: Boolean, default: !0 }
|
|
319
|
-
}, {
|
|
320
|
-
otp: { default: "" },
|
|
321
|
-
otpModifiers: {}
|
|
322
|
-
}),
|
|
323
|
-
emits: /* @__PURE__ */ C(["submit"], ["update:otp"]),
|
|
324
|
-
setup(o, { emit: n }) {
|
|
325
|
-
const l = B(o, "otp"), r = n, a = o, c = P(() => l.value.length === a.length);
|
|
326
|
-
return S(l, () => {
|
|
327
|
-
a.autosubmit && l.value.length === a.length && r("submit", l.value);
|
|
328
|
-
}), (u, i) => (m(), f(t(W), {
|
|
329
|
-
title: u.title,
|
|
330
|
-
subtitle: u.subtitle,
|
|
331
|
-
"min-width": u.minWidth,
|
|
332
|
-
"max-width": u.maxWidth
|
|
333
|
-
}, {
|
|
334
|
-
default: s(() => [
|
|
335
|
-
d(t(I), {
|
|
336
|
-
onSubmit: i[1] || (i[1] = U((e) => r("submit", l.value), ["prevent"])),
|
|
337
|
-
"model-value": c.value
|
|
338
|
-
}, {
|
|
339
|
-
default: s(() => [
|
|
340
|
-
d(t(N), null, {
|
|
341
|
-
default: s(() => [
|
|
342
|
-
d(t(le), {
|
|
343
|
-
modelValue: l.value,
|
|
344
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) => l.value = e),
|
|
345
|
-
label: "OTP",
|
|
346
|
-
"persistent-placeholder": "",
|
|
347
|
-
autofocus: "",
|
|
348
|
-
length: u.length
|
|
349
|
-
}, null, 8, ["modelValue", "length"]),
|
|
350
|
-
b("div", he, [
|
|
351
|
-
d(t(x), {
|
|
352
|
-
disabled: !c.value,
|
|
353
|
-
type: "submit",
|
|
354
|
-
color: "primary",
|
|
355
|
-
variant: "flat",
|
|
356
|
-
text: u.submitButtonText,
|
|
357
|
-
loading: u.loading
|
|
358
|
-
}, null, 8, ["disabled", "text", "loading"])
|
|
359
|
-
])
|
|
360
|
-
]),
|
|
361
|
-
_: 1
|
|
362
|
-
})
|
|
363
|
-
]),
|
|
364
|
-
_: 1
|
|
365
|
-
}, 8, ["model-value"])
|
|
366
|
-
]),
|
|
367
|
-
_: 1
|
|
368
|
-
}, 8, ["title", "subtitle", "min-width", "max-width"]));
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
export {
|
|
372
|
-
xe as AppBase,
|
|
373
|
-
ke as DashboardPage,
|
|
374
|
-
_e as FooterSection,
|
|
375
|
-
$e as LoginForm,
|
|
376
|
-
Be as NavDrawerLink,
|
|
377
|
-
Ce as OTPForm,
|
|
378
|
-
ne as useColorMode,
|
|
379
|
-
re as useFooter,
|
|
380
|
-
ae as useNotify
|
|
381
|
-
};
|
package/dist/index.umd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("vuetify/components"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","vuetify/components","pinia"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.appsalutely={},s.Vue,s.VueRouter,s.VuetifyComponents,s.Pinia))})(this,function(s,e,y,i,w){"use strict";const k=w.defineStore("colorMode",()=>{const o=e.ref(localStorage.getItem("colorMode")=="dark"?"dark":"light");function l(){o.value=o.value==="dark"?"light":"dark"}function r(n){localStorage.setItem("colorMode",n),document.documentElement.setAttribute("data-theme",n)}return e.watch(o,n=>r(n)),r(o.value),{mode:o,toggle:l}}),b=w.defineStore("footer",()=>{const o=e.ref([]),l=e.computed(()=>o.value.length>0?o.value[o.value.length-1]:null);function r(a){return a.id||(a.id=new Date().getTime().toString()),a.timeout===void 0&&(a.timeout=5e3),o.value.push(a),a.timeout&&setTimeout(()=>{n(a.id)},a.timeout),a.id}function n(a){o.value=o.value.filter(f=>f.id!==a)}return{messages:o,current:l,addMessage:r,removeMessage:n}}),B=w.defineStore("notify",()=>{const o=e.ref([]),l=e.ref({});function r(t){return t.id?n(t.id):t.id=new Date().getTime().toString(),t.timeout===void 0&&(t.timeout=5e3),o.value.push(t),t.timeout&&(l.value[t.id]=setTimeout(()=>{n(t.id)},t.timeout)),t.id}function n(t){o.value=o.value.filter(h=>h.id!==t),l.value[t]&&(clearTimeout(l.value[t]),delete l.value[t])}function a(t){return r({text:t,type:"info"})}function f(t){return r({text:t,type:"success"})}function d(t){return r({text:t,type:"warning"})}function u(t){return r({text:t,type:"error"})}return{messages:o,add:r,remove:n,info:a,success:f,warning:d,error:u}}),g={class:"d-flex flex-column pa-4 h-100"},x=["textContent"],C=e.defineComponent({__name:"AppBase",props:{drawerOpen:{type:Boolean,default:!1},drawerOpenModifiers:{}},emits:["update:drawerOpen"],setup(o){const l=k(),r=e.useModel(o,"drawerOpen"),n=e.ref(!1),a=b(),f=e.ref(!1),d=e.ref(null),u=B(),t=y.useRouter(),h=e.useSlots();return e.watch(n,p=>{localStorage.setItem("drawerDocked",String(p))}),e.onBeforeMount(()=>{t.beforeEach(()=>{d.value=setTimeout(()=>{f.value=!0},300)}),t.afterEach(()=>{d.value&&(clearTimeout(d.value),d.value=null),f.value=!1}),n.value=localStorage.getItem("drawerDocked")==="true",r.value=n.value}),(p,m)=>(e.openBlock(),e.createBlock(e.unref(i.VApp),{theme:e.unref(l).mode},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(e.unref(i.VProgressLinear),{key:0,indeterminate:"",class:"mb-n1",style:{"z-index":"100000",opacity:"0.5"},height:"1"})):e.createCommentVNode("",!0),e.createVNode(e.unref(i.VAppBar),{height:"64"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),_:3}),e.createVNode(e.unref(i.VMain),{class:"bg-surface-light"},{default:e.withCtx(()=>[e.createElementVNode("div",g,[e.createVNode(e.unref(y.RouterView))])]),_:1}),e.unref(h).footer?(e.openBlock(),e.createBlock(e.unref(i.VAppBar),{key:1,height:"40",location:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VFooter),{class:"py-0 w-100 d-flex align-center"},{default:e.withCtx(()=>[e.unref(a).current?(e.openBlock(),e.createElementBlock("span",{key:0,textContent:e.toDisplayString(e.unref(a).current.text),class:e.normalizeClass([e.unref(a).current.type?{}:{["text-"+e.unref(a).current.type]:!0},"overflow-hidden text-no-wrap"]),style:{"text-overflow":"ellipsis"}},null,10,x)):e.createCommentVNode("",!0),e.unref(a).current&&e.unref(a).current.actions?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Object.entries(e.unref(a).current.actions),(c,V)=>(e.openBlock(),e.createBlock(e.unref(i.VBtn),{text:c[0],onClick:c[1],key:V,density:"comfortable",variant:"tonal",class:"mx-2 px-2 text-none",color:e.unref(a).current.type},null,8,["text","onClick","color"]))),128)):e.createCommentVNode("",!0),m[2]||(m[2]=e.createElementVNode("div",{class:"me-auto"},null,-1)),e.renderSlot(p.$slots,"footer")]),_:3,__:[2]})]),_:3})):e.createCommentVNode("",!0),e.unref(h).drawer?(e.openBlock(),e.createBlock(e.unref(i.VNavigationDrawer),{key:2,modelValue:r.value,"onUpdate:modelValue":m[1]||(m[1]=c=>r.value=c),width:"250","rail-width":"58",rail:n.value,mobile:n.value?!1:void 0},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VList),{class:"h-100 d-flex flex-column"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"drawer"),e.createVNode(e.unref(i.VBtn),{onClick:m[0]||(m[0]=c=>n.value=!n.value),icon:"mdi-pin-outline",rounded:"rounded",density:"comfortable",title:n.value?"Undock sidebar":"Dock sidebar",class:"my-1 mx-3 ms-auto",variant:n.value?"tonal":"text"},null,8,["title","variant"])]),_:3})]),_:3},8,["modelValue","rail","mobile"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u).messages,(c,V)=>(e.openBlock(),e.createBlock(e.unref(i.VSnackbar),{key:V,"model-value":!0,text:c.text,color:c.type,location:"bottom end",style:e.normalizeStyle({bottom:`${V*56}px`}),timeout:-1},{actions:e.withCtx(()=>[e.createVNode(e.unref(i.VBtn),{icon:"mdi-close",onClick:W=>e.unref(u).remove(c.id)},null,8,["onClick"])]),_:2},1032,["text","color","style"]))),128))]),_:3},8,["theme"]))}}),N=["textContent"],S=e.defineComponent({__name:"DashboardPage",props:{breadcrumbs:{},fluid:{type:Boolean,default:!0},title:{}},setup(o){return(l,r)=>(e.openBlock(),e.createBlock(e.unref(i.VContainer),{fluid:l.fluid,class:"h-100 d-flex flex-column py-0 h-100"},{default:e.withCtx(()=>[l.breadcrumbs?(e.openBlock(),e.createBlock(e.unref(i.VBreadcrumbs),{key:0,items:l.breadcrumbs,density:"comfortable",class:"pa-0"},null,8,["items"])):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("h1",{key:1,textContent:e.toDisplayString(l.title),class:"text-h5 font-bold ma-1"},null,8,N)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")]),_:3},8,["fluid"]))}}),_=(o,l)=>{const r=o.__vccOpts||o;for(const[n,a]of l)r[n]=a;return r},M={},T={class:"h-100 d-flex align-center"};function $(o,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[l[0]||(l[0]=e.createElementVNode("span",{class:"border-s mx-3",style:{height:"32px"}},null,-1)),e.createElementVNode("span",T,[e.renderSlot(o.$slots,"default")])],64)}const F=_(M,[["render",$]]),E={class:"d-flex justify-center"},D=e.defineComponent({__name:"LoginForm",props:e.mergeModels({title:{default:"Login"},submitButtonText:{default:"Login"},minWidth:{},maxWidth:{},loading:{type:Boolean}},{username:{default:""},usernameModifiers:{},password:{default:""},passwordModifiers:{}}),emits:e.mergeModels(["submit"],["update:username","update:password"]),setup(o,{emit:l}){const r=e.useModel(o,"username"),n=e.useModel(o,"password"),a=l,f=e.ref(!1);return(d,u)=>(e.openBlock(),e.createBlock(e.unref(i.VCard),{title:d.title,"min-width":d.minWidth,"max-width":d.maxWidth},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VForm),{onSubmit:u[2]||(u[2]=e.withModifiers(t=>a("submit",r.value,n.value),["prevent"])),modelValue:f.value,"onUpdate:modelValue":u[3]||(u[3]=t=>f.value=t)},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VCardText),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.VTextField),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=t=>r.value=t),label:"Username",rules:[t=>!!t||"Username is required"],"persistent-placeholder":"",autofocus:""},null,8,["modelValue","rules"]),e.createVNode(e.unref(i.VTextField),{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=t=>n.value=t),label:"Password",type:"password",rules:[t=>!!t||"Password is required"],"persistent-placeholder":""},null,8,["modelValue","rules"]),e.createElementVNode("div",E,[e.createVNode(e.unref(i.VBtn),{disabled:!f.value,type:"submit",color:"primary",variant:"flat",text:d.submitButtonText,loading:d.loading},null,8,["disabled","text","loading"])])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["title","min-width","max-width"]))}}),O={class:"text-no-wrap overflow-hidden"},L=e.defineComponent({__name:"NavDrawerLink",props:{to:{},icon:{},text:{}},setup(o){return(l,r)=>(e.openBlock(),e.createBlock(e.unref(i.VListItem),{role:"option",to:l.to,slim:""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(i.VIcon),{icon:l.icon},null,8,["icon"])]),default:e.withCtx(()=>[e.createElementVNode("span",O,e.toDisplayString(l.text),1)]),_:1},8,["to"]))}}),P={class:"d-flex justify-center"},U=e.defineComponent({__name:"OTPForm",props:e.mergeModels({title:{default:"2FA Verification"},subtitle:{default:"Enter the code from your authenticator app"},submitButtonText:{default:"Verify"},minWidth:{},maxWidth:{},loading:{type:Boolean},length:{default:6},autosubmit:{type:Boolean,default:!0}},{otp:{default:""},otpModifiers:{}}),emits:e.mergeModels(["submit"],["update:otp"]),setup(o,{emit:l}){const r=e.useModel(o,"otp"),n=l,a=o,f=e.computed(()=>r.value.length===a.length);return e.watch(r,()=>{a.autosubmit&&r.value.length===a.length&&n("submit",r.value)}),(d,u)=>(e.openBlock(),e.createBlock(e.unref(i.VCard),{title:d.title,subtitle:d.subtitle,"min-width":d.minWidth,"max-width":d.maxWidth},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VForm),{onSubmit:u[1]||(u[1]=e.withModifiers(t=>n("submit",r.value),["prevent"])),"model-value":f.value},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VCardText),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.VOtpInput),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=t=>r.value=t),label:"OTP","persistent-placeholder":"",autofocus:"",length:d.length},null,8,["modelValue","length"]),e.createElementVNode("div",P,[e.createVNode(e.unref(i.VBtn),{disabled:!f.value,type:"submit",color:"primary",variant:"flat",text:d.submitButtonText,loading:d.loading},null,8,["disabled","text","loading"])])]),_:1})]),_:1},8,["model-value"])]),_:1},8,["title","subtitle","min-width","max-width"]))}});s.AppBase=C,s.DashboardPage=S,s.FooterSection=F,s.LoginForm=D,s.NavDrawerLink=L,s.OTPForm=U,s.useColorMode=k,s.useFooter=b,s.useNotify=B,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
|
package/eslint.config.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { globalIgnores } from 'eslint/config'
|
|
2
|
-
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
3
|
-
import pluginVue from 'eslint-plugin-vue'
|
|
4
|
-
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
|
5
|
-
|
|
6
|
-
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
|
7
|
-
// import { configureVueProject } from '@vue/eslint-config-typescript'
|
|
8
|
-
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
|
|
9
|
-
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
|
10
|
-
|
|
11
|
-
export default defineConfigWithVueTs(
|
|
12
|
-
{
|
|
13
|
-
name: 'app/files-to-lint',
|
|
14
|
-
files: ['**/*.{ts,mts,tsx,vue}'],
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
|
18
|
-
|
|
19
|
-
pluginVue.configs['flat/essential'],
|
|
20
|
-
vueTsConfigs.recommended,
|
|
21
|
-
skipFormatting,
|
|
22
|
-
)
|
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"include": ["src/**/*.ts", "src/**/*.vue"],
|
|
4
|
-
"exclude": ["src/**/__tests__/*"],
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"target": "ES2022",
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"noEmit": false,
|
|
9
|
-
"emitDeclarationOnly": true,
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"resolveJsonModule": true,
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"outDir": "./dist",
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"skipLibCheck": true,
|
|
16
|
-
"strict": true
|
|
17
|
-
},
|
|
18
|
-
"references": [
|
|
19
|
-
{
|
|
20
|
-
"path": "./tsconfig.node.json"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
package/tsconfig.node.json
DELETED
package/vite.config.d.ts
DELETED
package/vite.config.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import Vue from '@vitejs/plugin-vue';
|
|
3
|
-
var config = {
|
|
4
|
-
build: {
|
|
5
|
-
lib: {
|
|
6
|
-
entry: 'src/index.ts',
|
|
7
|
-
name: 'appsalutely',
|
|
8
|
-
fileName: 'index',
|
|
9
|
-
},
|
|
10
|
-
rollupOptions: {
|
|
11
|
-
external: ['vue', 'vue-router', 'pinia', 'vuetify', 'vuetify/components'],
|
|
12
|
-
output: {
|
|
13
|
-
globals: {
|
|
14
|
-
vue: 'Vue',
|
|
15
|
-
'vue-router': 'VueRouter',
|
|
16
|
-
pinia: 'Pinia',
|
|
17
|
-
vuetify: 'Vuetify',
|
|
18
|
-
'vuetify/components': 'VuetifyComponents',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
plugins: [Vue()],
|
|
24
|
-
};
|
|
25
|
-
export default defineConfig(config);
|
package/vite.config.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineConfig, type UserConfig } from 'vite'
|
|
2
|
-
import Vue from '@vitejs/plugin-vue'
|
|
3
|
-
|
|
4
|
-
const config: UserConfig = {
|
|
5
|
-
build: {
|
|
6
|
-
lib: {
|
|
7
|
-
entry: 'src/index.ts',
|
|
8
|
-
name: 'appsalutely',
|
|
9
|
-
fileName: 'index',
|
|
10
|
-
},
|
|
11
|
-
rollupOptions: {
|
|
12
|
-
external: ['vue', 'vue-router', 'pinia', 'vuetify', 'vuetify/components'],
|
|
13
|
-
output: {
|
|
14
|
-
globals: {
|
|
15
|
-
vue: 'Vue',
|
|
16
|
-
'vue-router': 'VueRouter',
|
|
17
|
-
pinia: 'Pinia',
|
|
18
|
-
vuetify: 'Vuetify',
|
|
19
|
-
'vuetify/components': 'VuetifyComponents',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
plugins: [Vue()],
|
|
25
|
-
}
|
|
26
|
-
export default defineConfig(config)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|