bt-core-app 2.2.46 → 2.2.48
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-Date-Select.vue.d.ts +1 -0
- package/dist/components/BT-Date-Select.vue.mjs +21 -19
- package/dist/components/BT-Date.vue.d.ts +1 -0
- package/dist/components/BT-Date.vue.mjs +16 -14
- package/dist/components/BT-Field-Date.vue.d.ts +1 -0
- package/dist/components/BT-Field-Date.vue.mjs +17 -15
- package/dist/components/BT-Firebase-Notification.vue.mjs +1 -1
- package/dist/components/BT-Firebase-Notification.vue2.mjs +10 -11
- package/dist/composables/firebase.mjs +21 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ interface FieldProps {
|
|
|
10
10
|
ignoreMinDate?: boolean;
|
|
11
11
|
label?: string;
|
|
12
12
|
modelValue: any;
|
|
13
|
+
startDate?: string;
|
|
13
14
|
useTime?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare const _default: import('vue').DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FieldProps>, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, computed as d, ref as
|
|
1
|
+
import { defineComponent as g, computed as d, ref as D, openBlock as B, createBlock as T, unref as o, withCtx as s, createVNode as p, mergeProps as f } from "vue";
|
|
2
2
|
import N from "../bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs";
|
|
3
3
|
import { useAuth as S } from "../composables/auth.mjs";
|
|
4
4
|
import { useDates as F } from "../composables/dates.mjs";
|
|
@@ -18,47 +18,49 @@ const I = /* @__PURE__ */ g({
|
|
|
18
18
|
ignoreMinDate: { type: Boolean },
|
|
19
19
|
label: {},
|
|
20
20
|
modelValue: {},
|
|
21
|
+
startDate: {},
|
|
21
22
|
useTime: { type: Boolean }
|
|
22
23
|
},
|
|
23
24
|
emits: ["update:modelValue"],
|
|
24
25
|
setup(V, { emit: c }) {
|
|
25
|
-
const v = $(),
|
|
26
|
+
const v = $(), t = V, y = c, { btString: k, tzString: r } = F(), b = S(), a = d({
|
|
26
27
|
get() {
|
|
27
|
-
return
|
|
28
|
+
return t.modelValue == "0001-01-01T00:00:00" && t.ignoreMinDate ? k() : t.modelValue;
|
|
28
29
|
},
|
|
29
30
|
set(e) {
|
|
30
31
|
y("update:modelValue", e == null ? e : `${e.split(".")[0]}Z`);
|
|
31
32
|
}
|
|
32
|
-
}),
|
|
33
|
-
return
|
|
34
|
-
activator:
|
|
35
|
-
|
|
36
|
-
"append-inner-icon": e.canSelectNone &&
|
|
37
|
-
"onClick:appendInner":
|
|
33
|
+
}), u = d(() => t.modelValue ? r(t.modelValue, t.format) : void 0), n = D();
|
|
34
|
+
return t.dateFrom != null ? n.value = t.dateFrom : t.fromNow && (n.value = r()), (e, l) => (B(), T(o(h), { "open-delay": "5" }, {
|
|
35
|
+
activator: s(({ props: i }) => [
|
|
36
|
+
p(o(w), f({
|
|
37
|
+
"append-inner-icon": e.canSelectNone && a.value != null && a.value.length > 0 ? "$close" : void 0,
|
|
38
|
+
"onClick:appendInner": l[0] || (l[0] = (m) => a.value = void 0),
|
|
38
39
|
density: e.density
|
|
39
|
-
},
|
|
40
|
+
}, i, {
|
|
40
41
|
"hide-details": "",
|
|
41
42
|
label: e.label,
|
|
42
43
|
readonly: "",
|
|
43
44
|
variant: e.fieldVariant,
|
|
44
|
-
modelValue:
|
|
45
|
-
"onUpdate:modelValue":
|
|
45
|
+
modelValue: u.value,
|
|
46
|
+
"onUpdate:modelValue": l[1] || (l[1] = (m) => u.value = m)
|
|
46
47
|
}), null, 16, ["append-inner-icon", "density", "label", "variant", "modelValue"])
|
|
47
48
|
]),
|
|
48
|
-
default:
|
|
49
|
-
|
|
49
|
+
default: s(() => [
|
|
50
|
+
p(o(N), f({
|
|
50
51
|
"auto-apply": "",
|
|
51
|
-
dark:
|
|
52
|
+
dark: o(v).global.current.value.dark,
|
|
52
53
|
"enable-time-picker": e.useTime,
|
|
53
54
|
inline: "",
|
|
54
55
|
"is-24": !1,
|
|
56
|
+
startDate: n.value,
|
|
55
57
|
"time-picker-inline": e.useTime,
|
|
56
|
-
timezone:
|
|
58
|
+
timezone: o(b).timeZone.value,
|
|
57
59
|
utc: ""
|
|
58
60
|
}, e.$attrs, {
|
|
59
|
-
modelValue:
|
|
60
|
-
"onUpdate:modelValue":
|
|
61
|
-
}), null, 16, ["dark", "enable-time-picker", "time-picker-inline", "timezone", "modelValue"])
|
|
61
|
+
modelValue: a.value,
|
|
62
|
+
"onUpdate:modelValue": l[2] || (l[2] = (i) => a.value = i)
|
|
63
|
+
}), null, 16, ["dark", "enable-time-picker", "startDate", "time-picker-inline", "timezone", "modelValue"])
|
|
62
64
|
]),
|
|
63
65
|
_: 1
|
|
64
66
|
}));
|
|
@@ -10,6 +10,7 @@ interface FieldProps {
|
|
|
10
10
|
multi?: boolean;
|
|
11
11
|
onSelect?: (item: any) => void;
|
|
12
12
|
range?: boolean;
|
|
13
|
+
startDate?: string;
|
|
13
14
|
useTime?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare const _default: import('vue').DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FieldProps>, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as y, computed as
|
|
2
|
-
import
|
|
3
|
-
import { useDates as
|
|
4
|
-
import { useAuth as
|
|
5
|
-
import { useTheme as
|
|
1
|
+
import { defineComponent as y, computed as n, openBlock as g, createBlock as k, unref as r, mergeProps as B } from "vue";
|
|
2
|
+
import D from "../bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs";
|
|
3
|
+
import { useDates as V } from "../composables/dates.mjs";
|
|
4
|
+
import { useAuth as T } from "../composables/auth.mjs";
|
|
5
|
+
import { useTheme as h } from "vuetify";
|
|
6
6
|
const Z = /* @__PURE__ */ y({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "BT-Date",
|
|
@@ -18,35 +18,37 @@ const Z = /* @__PURE__ */ y({
|
|
|
18
18
|
multi: { type: Boolean, default: !1 },
|
|
19
19
|
onSelect: {},
|
|
20
20
|
range: { type: Boolean, default: !1 },
|
|
21
|
+
startDate: {},
|
|
21
22
|
useTime: { type: Boolean }
|
|
22
23
|
},
|
|
23
24
|
emits: ["update:modelValue"],
|
|
24
25
|
setup(i, { emit: m }) {
|
|
25
|
-
const u =
|
|
26
|
+
const u = h(), t = i, s = m, d = T(), { btString: p, getToday: f } = V(), c = n(() => t.dateFrom ?? (t.fromNow ? f() : void 0)), l = n({
|
|
26
27
|
get() {
|
|
27
28
|
return t.modelValue == "0001-01-01T00:00:00" && t.ignoreMinDate ? p() : t.modelValue;
|
|
28
29
|
},
|
|
29
30
|
set(e) {
|
|
30
|
-
var
|
|
31
|
-
(t.range == !0 || t.multi == !0) && Array.isArray(e) ?
|
|
31
|
+
var a;
|
|
32
|
+
(t.range == !0 || t.multi == !0) && Array.isArray(e) ? a = e.map((o) => `${o.split(".")[0]}Z`) : a = e == null ? e : `${e.split(".")[0]}Z`, s("update:modelValue", a), t.onSelect && t.onSelect(a);
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
|
-
return (e,
|
|
35
|
+
return (e, a) => (g(), k(r(D), B({
|
|
35
36
|
"auto-apply": "",
|
|
36
|
-
dark:
|
|
37
|
+
dark: r(u).global.current.value.dark,
|
|
37
38
|
"enable-time-picker": e.useTime,
|
|
38
39
|
inline: "",
|
|
39
40
|
"is-24": !1,
|
|
40
41
|
"min-date": c.value,
|
|
41
42
|
"multi-dates": e.multi,
|
|
42
43
|
range: e.range,
|
|
44
|
+
startDate: e.startDate,
|
|
43
45
|
"time-picker-inline": e.useTime,
|
|
44
|
-
timezone:
|
|
46
|
+
timezone: r(d).timeZone.value,
|
|
45
47
|
utc: ""
|
|
46
48
|
}, e.$attrs, {
|
|
47
|
-
modelValue:
|
|
48
|
-
"onUpdate:modelValue":
|
|
49
|
-
}), null, 16, ["dark", "enable-time-picker", "min-date", "multi-dates", "range", "time-picker-inline", "timezone", "modelValue"]));
|
|
49
|
+
modelValue: l.value,
|
|
50
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => l.value = o)
|
|
51
|
+
}), null, 16, ["dark", "enable-time-picker", "min-date", "multi-dates", "range", "startDate", "time-picker-inline", "timezone", "modelValue"]));
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
export {
|
|
@@ -17,6 +17,7 @@ interface FieldProps {
|
|
|
17
17
|
required?: boolean;
|
|
18
18
|
rules?: any;
|
|
19
19
|
sm?: string | boolean;
|
|
20
|
+
startDate?: string;
|
|
20
21
|
useTime?: boolean;
|
|
21
22
|
}
|
|
22
23
|
declare const _default: import('vue').DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FieldProps>, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, computed as o, ref as
|
|
1
|
+
import { defineComponent as $, computed as o, ref as f, inject as r, openBlock as c, createBlock as v, unref as t, normalizeClass as q, withCtx as i, createVNode as s, createTextVNode as k, toDisplayString as S, mergeProps as M } from "vue";
|
|
2
2
|
import A from "../bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs";
|
|
3
3
|
import { useAuth as R } from "../composables/auth.mjs";
|
|
4
4
|
import { useDates as U } from "../composables/dates.mjs";
|
|
@@ -32,24 +32,25 @@ const ne = /* @__PURE__ */ $({
|
|
|
32
32
|
required: { type: Boolean },
|
|
33
33
|
rules: {},
|
|
34
34
|
sm: { type: [String, Boolean], default: "6" },
|
|
35
|
+
startDate: {},
|
|
35
36
|
useTime: { type: Boolean }
|
|
36
37
|
},
|
|
37
38
|
emits: ["update:modelValue"],
|
|
38
|
-
setup(T, { emit:
|
|
39
|
-
const
|
|
39
|
+
setup(T, { emit: D }) {
|
|
40
|
+
const I = Z(), e = T, h = D, { btString: C, tzString: V } = U(), L = R(), n = o({
|
|
40
41
|
get() {
|
|
41
|
-
return e.modelValue == "0001-01-01T00:00:00" && e.ignoreMinDate ?
|
|
42
|
+
return e.modelValue == "0001-01-01T00:00:00" && e.ignoreMinDate ? C() : e.modelValue;
|
|
42
43
|
},
|
|
43
44
|
set(l) {
|
|
44
|
-
|
|
45
|
+
h("update:modelValue", l == null ? l : `${l.split(".")[0]}Z`);
|
|
45
46
|
}
|
|
46
|
-
}), u = o(() => e.modelValue ?
|
|
47
|
+
}), u = o(() => e.modelValue ? V(e.modelValue, e.format) : void 0), m = f(), N = r("isEditing", () => f(!1), !0), g = o(() => e.isEditing ?? N.value), d = r("isMobile", () => f(!1), !0), y = r("viewVariant", "list-item"), w = r("editVariant", "outlined"), b = o(() => {
|
|
47
48
|
var l = [
|
|
48
49
|
...e.rules ?? []
|
|
49
50
|
];
|
|
50
51
|
return e.required && l.push(j), l.length > 0 ? l : void 0;
|
|
51
|
-
}), z = o(() => e.isMobile ??
|
|
52
|
-
return e.dateFrom != null ?
|
|
52
|
+
}), z = o(() => e.isMobile ?? d.value ? !1 : e.lg), E = o(() => e.isMobile ?? d.value ? !1 : e.md), F = o(() => e.isMobile ?? d.value ? !1 : e.sm);
|
|
53
|
+
return e.dateFrom != null ? m.value = e.dateFrom : e.fromNow && (m.value = V()), (l, a) => (c(), v(t(P), {
|
|
53
54
|
class: q(l.colClass),
|
|
54
55
|
lg: z.value,
|
|
55
56
|
md: E.value,
|
|
@@ -57,7 +58,7 @@ const ne = /* @__PURE__ */ $({
|
|
|
57
58
|
cols: l.cols
|
|
58
59
|
}, {
|
|
59
60
|
default: i(() => [
|
|
60
|
-
!g.value && t(y) == "list-item" ? (
|
|
61
|
+
!g.value && t(y) == "list-item" ? (c(), v(t(Q), {
|
|
61
62
|
key: 0,
|
|
62
63
|
density: "compact",
|
|
63
64
|
"prepend-icon": l.prependIcon
|
|
@@ -77,15 +78,15 @@ const ne = /* @__PURE__ */ $({
|
|
|
77
78
|
})
|
|
78
79
|
]),
|
|
79
80
|
_: 1
|
|
80
|
-
}, 8, ["prepend-icon"])) : (
|
|
81
|
+
}, 8, ["prepend-icon"])) : (c(), v(t(J), {
|
|
81
82
|
key: 1,
|
|
82
83
|
"open-delay": "5"
|
|
83
84
|
}, {
|
|
84
|
-
activator: i(({ props:
|
|
85
|
+
activator: i(({ props: p }) => [
|
|
85
86
|
s(t(K), M({
|
|
86
87
|
"append-inner-icon": l.canSelectNone && n.value != null && n.value.length > 0 ? "$close" : void 0,
|
|
87
88
|
"onClick:appendInner": a[0] || (a[0] = (B) => n.value = void 0)
|
|
88
|
-
},
|
|
89
|
+
}, p, {
|
|
89
90
|
"hide-details": b.value == null,
|
|
90
91
|
label: l.label,
|
|
91
92
|
readonly: "",
|
|
@@ -98,17 +99,18 @@ const ne = /* @__PURE__ */ $({
|
|
|
98
99
|
default: i(() => [
|
|
99
100
|
s(t(A), M({
|
|
100
101
|
"auto-apply": "",
|
|
101
|
-
dark: t(
|
|
102
|
+
dark: t(I).global.current.value.dark,
|
|
102
103
|
"enable-time-picker": l.useTime,
|
|
103
104
|
inline: "",
|
|
104
105
|
"is-24": !1,
|
|
106
|
+
startDate: m.value,
|
|
105
107
|
"time-picker-inline": l.useTime,
|
|
106
108
|
timezone: t(L).timeZone.value,
|
|
107
109
|
utc: ""
|
|
108
110
|
}, l.$attrs, {
|
|
109
111
|
modelValue: n.value,
|
|
110
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
111
|
-
}), null, 16, ["dark", "enable-time-picker", "time-picker-inline", "timezone", "modelValue"])
|
|
112
|
+
"onUpdate:modelValue": a[2] || (a[2] = (p) => n.value = p)
|
|
113
|
+
}), null, 16, ["dark", "enable-time-picker", "startDate", "time-picker-inline", "timezone", "modelValue"])
|
|
112
114
|
]),
|
|
113
115
|
_: 1
|
|
114
116
|
}))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./BT-Firebase-Notification.vue2.mjs";
|
|
2
2
|
import "./BT-Firebase-Notification.vue3.mjs";
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3494b3ef"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, ref as d, computed as
|
|
1
|
+
import { defineComponent as k, ref as d, computed as m, openBlock as n, createBlock as f, unref as s, withCtx as o, createElementVNode as c, createElementBlock as x, createCommentVNode as a, createTextVNode as p, createVNode as B } from "vue";
|
|
2
2
|
import { useFirebase as V } from "../composables/firebase.mjs";
|
|
3
3
|
import "pinia";
|
|
4
4
|
import "../bt-core/core/node_modules/thenby/thenBy.module.mjs";
|
|
@@ -10,15 +10,15 @@ import "../composables/blade.mjs";
|
|
|
10
10
|
import "../bt-core/core/node_modules/@datasert/cronjs-matcher/dist/index.mjs";
|
|
11
11
|
import "../composables/pwa.mjs";
|
|
12
12
|
import { VBanner as C } from "../bt-core/core/node_modules/vuetify/lib/components/VBanner/VBanner.mjs";
|
|
13
|
-
import { VBtn as
|
|
13
|
+
import { VBtn as v } from "../bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs";
|
|
14
14
|
const _ = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-error text-caption mt-1"
|
|
17
17
|
}, G = /* @__PURE__ */ k({
|
|
18
18
|
__name: "BT-Firebase-Notification",
|
|
19
19
|
setup(E) {
|
|
20
|
-
const { register:
|
|
21
|
-
async function
|
|
20
|
+
const { register: g, permission: i } = V(), { isLoggedIn: w } = h(), r = d(!1), l = d(!1), N = m(() => !(!w.value || l.value || i.value === "granted")), u = m(() => i.value === "denied");
|
|
21
|
+
async function b() {
|
|
22
22
|
if (!("Notification" in window)) {
|
|
23
23
|
alert("This browser does not support desktop notifications.");
|
|
24
24
|
return;
|
|
@@ -26,7 +26,7 @@ const _ = {
|
|
|
26
26
|
r.value = !0;
|
|
27
27
|
try {
|
|
28
28
|
const t = await Notification.requestPermission();
|
|
29
|
-
i.value = t, t === "granted" ? (console.log("Notification permission granted."), await
|
|
29
|
+
i.value = t, t === "granted" ? (console.log("Notification permission granted."), await g()) : console.log("Notification permission denied.");
|
|
30
30
|
} catch (t) {
|
|
31
31
|
console.error("Error requesting notification permission:", t);
|
|
32
32
|
} finally {
|
|
@@ -36,11 +36,10 @@ const _ = {
|
|
|
36
36
|
function y() {
|
|
37
37
|
l.value = !0;
|
|
38
38
|
}
|
|
39
|
-
return (t, e) =>
|
|
39
|
+
return (t, e) => N.value ? (n(), f(s(C), {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "floating-banner elevation-4 rounded-lg mx-auto",
|
|
42
|
-
color: "
|
|
43
|
-
"bg-color": "primary",
|
|
42
|
+
color: "primary",
|
|
44
43
|
icon: "$bell-ring",
|
|
45
44
|
lines: "two"
|
|
46
45
|
}, {
|
|
@@ -50,19 +49,19 @@ const _ = {
|
|
|
50
49
|
u.value ? (n(), x("div", _, " Notifications are blocked in your browser settings. Please enable them manually in your browser address bar. ")) : a("", !0)
|
|
51
50
|
]),
|
|
52
51
|
actions: o(() => [
|
|
53
|
-
u.value ? a("", !0) : (n(),
|
|
52
|
+
u.value ? a("", !0) : (n(), f(s(v), {
|
|
54
53
|
key: 0,
|
|
55
54
|
color: "white",
|
|
56
55
|
variant: "flat",
|
|
57
56
|
loading: r.value,
|
|
58
|
-
onClick:
|
|
57
|
+
onClick: b
|
|
59
58
|
}, {
|
|
60
59
|
default: o(() => e[2] || (e[2] = [
|
|
61
60
|
p(" Turn On ")
|
|
62
61
|
])),
|
|
63
62
|
_: 1
|
|
64
63
|
}, 8, ["loading"])),
|
|
65
|
-
B(s(
|
|
64
|
+
B(s(v), {
|
|
66
65
|
variant: "text",
|
|
67
66
|
color: "white",
|
|
68
67
|
onClick: y
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
import { ref as b } from "vue";
|
|
1
|
+
import { shallowRef as v, ref as b } from "vue";
|
|
2
2
|
import { useActions as w } from "./actions.mjs";
|
|
3
3
|
import { appendUrl as u } from "./helpers.mjs";
|
|
4
4
|
import { useDataUrl as d } from "./urls.mjs";
|
|
5
5
|
import "../bt-core/core/node_modules/firebase/app/dist/esm/index.esm.mjs";
|
|
6
|
-
import { getMessaging as
|
|
6
|
+
import { getMessaging as R, onRegistered as h, onUnregistered as F, onMessage as L, register as M, unregister as k } from "../bt-core/core/node_modules/@firebase/messaging/dist/esm/index.esm.mjs";
|
|
7
7
|
import { getDetailedDeviceType as m } from "./devices.mjs";
|
|
8
8
|
import { initializeApp as D } from "../bt-core/core/node_modules/@firebase/app/dist/esm/index.esm.mjs";
|
|
9
9
|
let t, g;
|
|
10
|
-
function
|
|
10
|
+
function S(e) {
|
|
11
11
|
g = e;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function p() {
|
|
14
|
+
const e = v(void 0);
|
|
15
|
+
return t ?? {
|
|
16
|
+
actionLoadingMsg: e,
|
|
17
|
+
register: () => Promise.resolve(),
|
|
18
|
+
unregister: () => Promise.resolve()
|
|
19
|
+
};
|
|
15
20
|
}
|
|
16
|
-
function
|
|
21
|
+
function q(e) {
|
|
17
22
|
if (t != null)
|
|
18
23
|
return t;
|
|
19
24
|
const { actionLoadingMsg: y, apiPost: l } = w();
|
|
20
25
|
var a = "", n = "";
|
|
21
26
|
(e == null ? void 0 : e.finalRegisterURL) != null ? a = e.finalRegisterURL : a = u(d(), (e == null ? void 0 : e.registerUrl) ?? "FirebaseNotifications/Register"), (e == null ? void 0 : e.finalUnregisterURL) != null ? n = e.finalUnregisterURL : n = u(d(), (e == null ? void 0 : e.unregisterURL) ?? "FirebaseNotifications/Unregister");
|
|
22
|
-
const
|
|
27
|
+
const o = D(e.config), i = R(o), c = b(typeof window < "u" && "Notification" in window ? Notification.permission : "default");
|
|
23
28
|
async function f() {
|
|
24
|
-
if (
|
|
29
|
+
if (c.value === "granted")
|
|
25
30
|
try {
|
|
26
31
|
const r = await navigator.serviceWorker.ready;
|
|
27
|
-
await
|
|
32
|
+
await M(
|
|
28
33
|
i,
|
|
29
34
|
{
|
|
30
35
|
vapidKey: e.vapidPublicKey,
|
|
@@ -42,7 +47,7 @@ function p(e) {
|
|
|
42
47
|
throw console.log("Error calling firebase unregister:", r), r;
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
|
-
return
|
|
50
|
+
return h(i, async (r) => {
|
|
46
51
|
console.log("Firebase Installation ID received:", r);
|
|
47
52
|
try {
|
|
48
53
|
await l({
|
|
@@ -70,19 +75,19 @@ function p(e) {
|
|
|
70
75
|
} catch (s) {
|
|
71
76
|
console.log("firebase backend unregister notification error", s);
|
|
72
77
|
}
|
|
73
|
-
}),
|
|
78
|
+
}), L(i, (r) => {
|
|
74
79
|
g != null && g(r);
|
|
75
80
|
}), t == null && e.initiateImmediately && f(), t ?? (t = {
|
|
76
81
|
actionLoadingMsg: y,
|
|
77
|
-
app:
|
|
82
|
+
app: o,
|
|
78
83
|
messaging: i,
|
|
79
|
-
permission:
|
|
84
|
+
permission: c,
|
|
80
85
|
register: f,
|
|
81
86
|
unregister: U
|
|
82
87
|
}), t;
|
|
83
88
|
}
|
|
84
89
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
q as createFirebase,
|
|
91
|
+
p as useFirebase,
|
|
92
|
+
S as useFirebaseListener
|
|
88
93
|
};
|