bt-core-app 2.2.45 → 2.2.46
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/components/BT-Auth-Loader.vue.d.ts +2 -0
- package/dist/components/BT-Auth-Loader.vue.mjs +28 -0
- package/dist/components/BT-Auth-Loader.vue2.mjs +4 -0
- package/dist/components/BT-Nav-Sidebar.vue.mjs +22 -21
- package/dist/components.mjs +36 -34
- package/dist/composables/auth-actions.d.ts +9 -0
- package/dist/composables/auth-actions.mjs +30 -0
- package/dist/composables/auth.d.ts +0 -1
- package/dist/composables/auth.mjs +151 -154
- package/dist/composables.mjs +240 -238
- package/dist/index-components.d.ts +2 -1
- package/dist/index-composables.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as a, computed as l, openBlock as i, createBlock as s, unref as o, withCtx as u, createVNode as m } from "vue";
|
|
2
|
+
import { useAuthActions as c } from "../composables/auth-actions.mjs";
|
|
3
|
+
import { VOverlay as p } from "../bt-core/core/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs";
|
|
4
|
+
import { VProgressCircular as d } from "../bt-core/core/node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.mjs";
|
|
5
|
+
const y = /* @__PURE__ */ a({
|
|
6
|
+
__name: "BT-Auth-Loader",
|
|
7
|
+
setup(f) {
|
|
8
|
+
const { actionLoadingMsg: r } = c(), e = l(() => r.value != null);
|
|
9
|
+
return (_, t) => (i(), s(o(p), {
|
|
10
|
+
modelValue: e.value,
|
|
11
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value = n),
|
|
12
|
+
class: "align-center justify-center text-center overlay",
|
|
13
|
+
persistent: ""
|
|
14
|
+
}, {
|
|
15
|
+
default: u(() => [
|
|
16
|
+
m(o(d), {
|
|
17
|
+
color: "primary",
|
|
18
|
+
indeterminate: "",
|
|
19
|
+
size: "64"
|
|
20
|
+
})
|
|
21
|
+
]),
|
|
22
|
+
_: 1
|
|
23
|
+
}, 8, ["modelValue"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
y as default
|
|
28
|
+
};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { defineComponent as _, openBlock as r, createBlock as n, unref as e, withCtx as t, renderSlot as d, createVNode as l, createCommentVNode as N, createTextVNode as $, toDisplayString as S, createElementBlock as u, Fragment as c, renderList as V, mergeProps as C } from "vue";
|
|
2
2
|
import { useCosmetics as b } from "../composables/cosmetics.mjs";
|
|
3
3
|
import { useAuth as L } from "../composables/auth.mjs";
|
|
4
|
+
import { useAuthActions as A } from "../composables/auth-actions.mjs";
|
|
4
5
|
import { useMenu as B } from "../composables/menu.mjs";
|
|
5
6
|
import { VNavigationDrawer as g } from "../bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.mjs";
|
|
6
7
|
import { VListGroup as z } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListGroup.mjs";
|
|
7
8
|
import { VList as f } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VList.mjs";
|
|
8
9
|
import { VListItem as s } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs";
|
|
9
|
-
import { VAvatar as
|
|
10
|
-
import { VImg as
|
|
10
|
+
import { VAvatar as D } from "../bt-core/core/node_modules/vuetify/lib/components/VAvatar/VAvatar.mjs";
|
|
11
|
+
import { VImg as h } from "../bt-core/core/node_modules/vuetify/lib/components/VImg/VImg.mjs";
|
|
11
12
|
import { VRow as G } from "../bt-core/core/node_modules/vuetify/lib/components/VGrid/VRow.mjs";
|
|
12
13
|
import { VBtn as M } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
|
|
13
14
|
import { VIcon as P } from "../bt-core/core/node_modules/vuetify/lib/components/VIcon/VIcon.mjs";
|
|
14
|
-
const
|
|
15
|
+
const Y = /* @__PURE__ */ _({
|
|
15
16
|
__name: "BT-Nav-Sidebar",
|
|
16
17
|
props: {
|
|
17
18
|
iconSrc: {},
|
|
18
19
|
title: {}
|
|
19
20
|
},
|
|
20
21
|
setup(T) {
|
|
21
|
-
const { state: m, toggleDrawerStick: k } = b(), { isLoggedIn: y, logoutAsync: v } =
|
|
22
|
-
return (
|
|
22
|
+
const { state: m, toggleDrawerStick: k } = b(), { isLoggedIn: y } = L(), { logoutAsync: v } = A(), w = B();
|
|
23
|
+
return (a, p) => (r(), n(e(g), {
|
|
23
24
|
"disabled-resize-watcher": "",
|
|
24
25
|
"expand-on-hover": "",
|
|
25
26
|
rail: !e(m).drawerStick,
|
|
@@ -28,7 +29,7 @@ const W = /* @__PURE__ */ _({
|
|
|
28
29
|
"onUpdate:modelValue": p[1] || (p[1] = (o) => e(m).drawer = o)
|
|
29
30
|
}, {
|
|
30
31
|
append: t(() => [
|
|
31
|
-
d(
|
|
32
|
+
d(a.$slots, "bottom-list", {}, () => [
|
|
32
33
|
e(y) ? (r(), n(e(f), {
|
|
33
34
|
key: 0,
|
|
34
35
|
class: "ma-0 pa-0"
|
|
@@ -47,17 +48,17 @@ const W = /* @__PURE__ */ _({
|
|
|
47
48
|
])
|
|
48
49
|
]),
|
|
49
50
|
default: t(() => [
|
|
50
|
-
d(
|
|
51
|
+
d(a.$slots, "default", {}, () => [
|
|
51
52
|
l(e(f), { class: "pt-1" }, {
|
|
52
53
|
default: t(() => [
|
|
53
54
|
l(e(s), {
|
|
54
55
|
nav: "",
|
|
55
|
-
title:
|
|
56
|
+
title: a.title
|
|
56
57
|
}, {
|
|
57
58
|
prepend: t(() => [
|
|
58
|
-
l(e(
|
|
59
|
+
l(e(D), { size: "36" }, {
|
|
59
60
|
default: t(() => [
|
|
60
|
-
l(e(
|
|
61
|
+
l(e(h), { src: a.iconSrc }, null, 8, ["src"])
|
|
61
62
|
]),
|
|
62
63
|
_: 1
|
|
63
64
|
})
|
|
@@ -88,11 +89,11 @@ const W = /* @__PURE__ */ _({
|
|
|
88
89
|
]),
|
|
89
90
|
_: 1
|
|
90
91
|
}, 8, ["title"]),
|
|
91
|
-
d(
|
|
92
|
+
d(a.$slots, "top-list")
|
|
92
93
|
]),
|
|
93
94
|
_: 3
|
|
94
95
|
}),
|
|
95
|
-
d(
|
|
96
|
+
d(a.$slots, "middle-list", {}, () => [
|
|
96
97
|
e(y) ? (r(), n(e(f), {
|
|
97
98
|
key: 0,
|
|
98
99
|
nav: ""
|
|
@@ -102,21 +103,21 @@ const W = /* @__PURE__ */ _({
|
|
|
102
103
|
o.isGroup ? (r(), n(e(z), {
|
|
103
104
|
key: `${o.displayName}a`
|
|
104
105
|
}, {
|
|
105
|
-
activator: t(({ props:
|
|
106
|
-
l(e(s), C({ ref_for: !0 },
|
|
106
|
+
activator: t(({ props: i }) => [
|
|
107
|
+
l(e(s), C({ ref_for: !0 }, i, {
|
|
107
108
|
color: "primary",
|
|
108
109
|
"prepend-icon": o.icon,
|
|
109
110
|
title: o.displayName
|
|
110
111
|
}), null, 16, ["prepend-icon", "title"])
|
|
111
112
|
]),
|
|
112
113
|
default: t(() => [
|
|
113
|
-
(r(!0), u(c, null, V(o.items, (
|
|
114
|
-
key:
|
|
114
|
+
(r(!0), u(c, null, V(o.items, (i) => (r(), n(e(s), {
|
|
115
|
+
key: i.displayName,
|
|
115
116
|
color: "primary",
|
|
116
|
-
"prepend-icon":
|
|
117
|
-
title:
|
|
118
|
-
value:
|
|
119
|
-
to: { name:
|
|
117
|
+
"prepend-icon": i.icon,
|
|
118
|
+
title: i.displayName,
|
|
119
|
+
value: i.displayName,
|
|
120
|
+
to: { name: i.routeName }
|
|
120
121
|
}, null, 8, ["prepend-icon", "title", "value", "to"]))), 128))
|
|
121
122
|
]),
|
|
122
123
|
_: 2
|
|
@@ -140,5 +141,5 @@ const W = /* @__PURE__ */ _({
|
|
|
140
141
|
}
|
|
141
142
|
});
|
|
142
143
|
export {
|
|
143
|
-
|
|
144
|
+
Y as default
|
|
144
145
|
};
|
package/dist/components.mjs
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
import { default as r } from "./components/BT-Assistant-Menu.vue.mjs";
|
|
2
|
-
import { default as t } from "./components/BT-
|
|
3
|
-
import { default as l } from "./components/BT-
|
|
4
|
-
import { default as u } from "./components/BT-
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as B } from "./components/BT-
|
|
7
|
-
import { default as x } from "./components/BT-Dialog-
|
|
8
|
-
import { default as S } from "./components/BT-Dialog-
|
|
9
|
-
import { default as c } from "./components/BT-Dialog-
|
|
10
|
-
import { default as F } from "./components/BT-
|
|
11
|
-
import { default as C } from "./components/BT-
|
|
12
|
-
import { default as
|
|
2
|
+
import { default as t } from "./components/BT-Auth-Loader.vue.mjs";
|
|
3
|
+
import { default as l } from "./components/BT-Banner.vue.mjs";
|
|
4
|
+
import { default as u } from "./components/BT-Blade-Steps.vue.mjs";
|
|
5
|
+
import { default as s } from "./components/BT-Cron-Span.vue.mjs";
|
|
6
|
+
import { default as B } from "./components/BT-Date-Select.vue.mjs";
|
|
7
|
+
import { default as x } from "./components/BT-Dialog-Confirm.vue.mjs";
|
|
8
|
+
import { default as S } from "./components/BT-Dialog-Select.vue.mjs";
|
|
9
|
+
import { default as c } from "./components/BT-Dialog-Number.vue.mjs";
|
|
10
|
+
import { default as F } from "./components/BT-Dialog-Date.vue.mjs";
|
|
11
|
+
import { default as C } from "./components/BT-Demo-Profile-Select.vue.mjs";
|
|
12
|
+
import { default as h } from "./components/BT-Color-Picker-Menu.vue.mjs";
|
|
13
|
+
import { default as A } from "./components/BT-Firebase-Notification.vue.mjs";
|
|
13
14
|
import { default as N } from "./components/BT-Form.vue.mjs";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
15
|
+
import { default as q } from "./components/BT-Form-Builder.vue.mjs";
|
|
16
|
+
import { default as j } from "./components/BT-Form-Field.vue.mjs";
|
|
17
|
+
import { default as w } from "./components/BT-Square-Check.vue.mjs";
|
|
18
|
+
import { default as z } from "./components/BT-Select-Simple.vue.mjs";
|
|
19
|
+
import { default as G } from "./components/BT-Field-Select-Simple.vue.mjs";
|
|
20
|
+
import { default as I } from "./components/BT-Tour.vue.mjs";
|
|
20
21
|
export {
|
|
21
22
|
r as BTAssistantMenu,
|
|
22
|
-
t as
|
|
23
|
-
l as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
t as BTAuthLoader,
|
|
24
|
+
l as BTBanner,
|
|
25
|
+
u as BTBladeSteps,
|
|
26
|
+
h as BTColorPickerMenu,
|
|
27
|
+
s as BTCronSpan,
|
|
28
|
+
B as BTDateSelect,
|
|
29
|
+
C as BTDemoProfileSelect,
|
|
30
|
+
x as BTDialogConfirm,
|
|
31
|
+
F as BTDialogDate,
|
|
32
|
+
c as BTDialogNumber,
|
|
33
|
+
S as BTDialogSelect,
|
|
34
|
+
G as BTFieldSelectSimple,
|
|
35
|
+
A as BTFirebaseNotification,
|
|
34
36
|
N as BTForm,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
q as BTFormBuilder,
|
|
38
|
+
j as BTFormField,
|
|
39
|
+
z as BTSelectSimple,
|
|
40
|
+
w as BTSquareCheck,
|
|
41
|
+
I as BTTour
|
|
40
42
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface BTAuthActions {
|
|
4
|
+
actionLoadingMsg: ShallowRef<string | undefined>;
|
|
5
|
+
actionErrorMsg: ShallowRef<string | undefined>;
|
|
6
|
+
authenticateAsync: () => Promise<void>;
|
|
7
|
+
logoutAsync: (navPathRedirect?: string) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useAuthActions(): BTAuthActions;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useRoute as p, useRouter as m } from "vue-router";
|
|
2
|
+
import { useActions as h } from "./actions.mjs";
|
|
3
|
+
import { useAuth as d } from "./auth.mjs";
|
|
4
|
+
import { useFirebase as A } from "./firebase.mjs";
|
|
5
|
+
import { isNullOrEmpty as L } from "./helpers.mjs";
|
|
6
|
+
let t;
|
|
7
|
+
function O() {
|
|
8
|
+
t ?? (t = h());
|
|
9
|
+
const { credentials: s, logout: u, setAuth: a } = d(), { register: c, unregister: g } = A(), e = p(), i = m();
|
|
10
|
+
async function l() {
|
|
11
|
+
var r;
|
|
12
|
+
t.persistLoading("Authenticating");
|
|
13
|
+
const o = (r = e.query) == null ? void 0 : r.code;
|
|
14
|
+
o != null && a(o), s.value.userLoginID != null && await c();
|
|
15
|
+
const n = e.query.redirect_path;
|
|
16
|
+
t.releaseLoading(), L(n) ? i.push({ name: "home" }) : window.location.href = n;
|
|
17
|
+
}
|
|
18
|
+
async function f(o) {
|
|
19
|
+
t.persistLoading("Logging Out"), await g(), u(), t.releaseLoading(), o != null && e.path != o && i.push({ path: o });
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
actionErrorMsg: t.actionErrorMsg,
|
|
23
|
+
actionLoadingMsg: t.actionLoadingMsg,
|
|
24
|
+
authenticateAsync: l,
|
|
25
|
+
logoutAsync: f
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
O as useAuthActions
|
|
30
|
+
};
|
|
@@ -83,7 +83,6 @@ export interface BTAuth {
|
|
|
83
83
|
isLoggedIn: ComputedRef<boolean>;
|
|
84
84
|
login: (redirectPath?: string, query?: any) => void;
|
|
85
85
|
logout: (navNameRedirect?: string) => void;
|
|
86
|
-
logoutAsync: (navNameRedirect?: string) => Promise<void>;
|
|
87
86
|
refreshTokenExpired: () => boolean;
|
|
88
87
|
resetAuthState: () => void;
|
|
89
88
|
setAuth: (jwtToken?: string) => void;
|