@inzombieland/nuxt-common 1.19.19 → 1.19.20
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/module.d.mts +2 -2
- package/dist/module.json +3 -3
- package/dist/module.mjs +3 -3
- package/dist/runtime/SidebarProvider.d.vue.ts +14 -0
- package/dist/runtime/SidebarProvider.vue +91 -102
- package/dist/runtime/SidebarProvider.vue.d.ts +14 -0
- package/dist/runtime/api/index.d.ts +7 -7
- package/dist/runtime/api/{index.mjs → index.js} +1 -1
- package/dist/runtime/api/user-actions.d.ts +1 -1
- package/dist/runtime/api/user-actions.js +2 -0
- package/dist/runtime/composables/index.d.ts +1 -1
- package/dist/runtime/composables/index.js +1 -0
- package/dist/runtime/composables/use-api-fetch.d.ts +1 -1
- package/dist/runtime/composables/{use-api-fetch.mjs → use-api-fetch.js} +1 -1
- package/dist/runtime/composables/use-layer-manager.d.ts +1 -1
- package/dist/runtime/composables/{use-layer-manager.mjs → use-layer-manager.js} +1 -1
- package/dist/runtime/composables/use-user-actions.d.ts +4 -4
- package/dist/runtime/composables/{use-user-actions.mjs → use-user-actions.js} +1 -1
- package/dist/runtime/middleware/{auth.mjs → auth.js} +1 -1
- package/dist/runtime/middleware/{guest.mjs → guest.js} +1 -1
- package/dist/runtime/middleware/index.d.ts +3 -3
- package/dist/runtime/middleware/index.js +4 -0
- package/dist/runtime/middleware/{locale.global.mjs → locale.global.js} +1 -1
- package/dist/runtime/packages/core/AppProvider.d.vue.ts +14 -0
- package/dist/runtime/packages/core/AppProvider.vue +13 -16
- package/dist/runtime/packages/core/AppProvider.vue.d.ts +14 -0
- package/dist/runtime/packages/core/api-client.d.ts +1 -1
- package/dist/runtime/packages/core/{api-client.mjs → api-client.js} +3 -3
- package/dist/runtime/packages/core/comet-client.d.ts +1 -1
- package/dist/runtime/packages/core/{comet-client.mjs → comet-client.js} +4 -4
- package/dist/runtime/packages/core/composables/index.d.ts +10 -10
- package/dist/runtime/packages/core/composables/index.js +10 -0
- package/dist/runtime/packages/core/composables/use-active-sessions.d.ts +1 -1
- package/dist/runtime/packages/core/composables/{use-active-sessions.mjs → use-active-sessions.js} +1 -1
- package/dist/runtime/packages/core/composables/use-app-locale.d.ts +1 -1
- package/dist/runtime/packages/core/composables/{use-subscribe.mjs → use-subscribe.js} +1 -1
- package/dist/runtime/packages/core/composables/use-theme-mode.d.ts +1 -1
- package/dist/runtime/packages/core/composables/use-user.d.ts +1 -1
- package/dist/runtime/packages/core/composables/use-visitor.d.ts +1 -1
- package/dist/runtime/packages/core/{define-vue-plugins.mjs → define-vue-plugins.js} +1 -1
- package/dist/runtime/packages/core/get-user.d.ts +1 -1
- package/dist/runtime/packages/core/{get-user.mjs → get-user.js} +3 -3
- package/dist/runtime/packages/core/get-visitor.d.ts +1 -1
- package/dist/runtime/packages/core/{get-visitor.mjs → get-visitor.js} +2 -2
- package/dist/runtime/packages/core/helpers/composables.d.ts +4 -4
- package/dist/runtime/packages/core/helpers/composables.js +4 -0
- package/dist/runtime/packages/core/helpers/{device-helper.mjs → device-helper.js} +1 -1
- package/dist/runtime/packages/core/helpers/index.d.ts +5 -5
- package/dist/runtime/packages/core/helpers/{index.mjs → index.js} +5 -5
- package/dist/runtime/packages/core/index.d.ts +18 -18
- package/dist/runtime/packages/core/{index.mjs → index.js} +11 -11
- package/dist/runtime/packages/core/{init-application.mjs → init-application.js} +3 -3
- package/dist/runtime/packages/core/plugins/index.d.ts +2 -2
- package/dist/runtime/packages/core/plugins/index.js +2 -0
- package/dist/runtime/packages/core/plugins/{sanitize-url.mjs → sanitize-url.js} +1 -1
- package/dist/runtime/packages/core/refresh-token.d.ts +1 -1
- package/dist/runtime/packages/core/{refresh-token.mjs → refresh-token.js} +2 -2
- package/dist/runtime/packages/core/user-actions.d.ts +1 -1
- package/dist/runtime/packages/core/{user-actions.mjs → user-actions.js} +3 -3
- package/dist/runtime/packages/layer-manager/LayerComponent.d.vue.ts +6 -0
- package/dist/runtime/packages/layer-manager/LayerComponent.vue +23 -28
- package/dist/runtime/packages/layer-manager/LayerComponent.vue.d.ts +6 -0
- package/dist/runtime/packages/layer-manager/LayersProvider.d.vue.ts +10 -0
- package/dist/runtime/packages/layer-manager/LayersProvider.vue +142 -164
- package/dist/runtime/packages/layer-manager/LayersProvider.vue.d.ts +10 -0
- package/dist/runtime/packages/layer-manager/index.d.ts +1 -1
- package/dist/runtime/packages/layer-manager/use-layer-actions.d.ts +1 -1
- package/dist/runtime/{plugin.mjs → plugin.js} +4 -4
- package/dist/runtime/plugins/{device.mjs → device.js} +1 -1
- package/dist/types.d.mts +2 -7
- package/package.json +24 -17
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -8
- package/dist/runtime/api/user-actions.mjs +0 -2
- package/dist/runtime/composables/index.mjs +0 -1
- package/dist/runtime/middleware/index.mjs +0 -4
- package/dist/runtime/packages/core/composables/index.mjs +0 -10
- package/dist/runtime/packages/core/helpers/composables.mjs +0 -4
- package/dist/runtime/packages/core/plugins/index.mjs +0 -2
- package/dist/types.d.ts +0 -8
- /package/dist/runtime/api/account/{account.get.mjs → account.get.js} +0 -0
- /package/dist/runtime/api/account/{authcheck.get.mjs → authcheck.get.js} +0 -0
- /package/dist/runtime/api/account/{default-handler.mjs → default-handler.js} +0 -0
- /package/dist/runtime/api/account/{middleware.mjs → middleware.js} +0 -0
- /package/dist/runtime/api/account/{token.get.mjs → token.get.js} +0 -0
- /package/dist/runtime/composables/{use-toggle-sidebar.mjs → use-toggle-sidebar.js} +0 -0
- /package/dist/runtime/packages/core/{bus.mjs → bus.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-api-actions.mjs → use-api-actions.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-app-locale.mjs → use-app-locale.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-cookies.mjs → use-cookies.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-theme-mode.mjs → use-theme-mode.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-user.mjs → use-user.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-validators.mjs → use-validators.js} +0 -0
- /package/dist/runtime/packages/core/composables/{use-visitor.mjs → use-visitor.js} +0 -0
- /package/dist/runtime/packages/core/helpers/{api-helper.mjs → api-helper.js} +0 -0
- /package/dist/runtime/packages/core/helpers/{current-device.mjs → current-device.js} +0 -0
- /package/dist/runtime/packages/core/helpers/{phone-helper.mjs → phone-helper.js} +0 -0
- /package/dist/runtime/packages/core/helpers/{string-helper.mjs → string-helper.js} +0 -0
- /package/dist/runtime/packages/core/plugins/{sanitize-html.mjs → sanitize-html.js} +0 -0
- /package/dist/runtime/packages/core/thirdparty/sanitize-url/{index.mjs → index.js} +0 -0
- /package/dist/runtime/packages/core/{types.mjs → types.js} +0 -0
- /package/dist/runtime/packages/layer-manager/{index.mjs → index.js} +0 -0
- /package/dist/runtime/packages/layer-manager/{types.mjs → types.js} +0 -0
- /package/dist/runtime/packages/layer-manager/{use-layer-actions.mjs → use-layer-actions.js} +0 -0
- /package/dist/runtime/server/middleware/{basic-auth.mjs → basic-auth.js} +0 -0
- /package/dist/runtime/thirdparty/helpers/{index.mjs → index.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineSanitizeHtmlPlugin, defineSanitizeUrlPlugin } from "./plugins/index.
|
|
1
|
+
import { defineSanitizeHtmlPlugin, defineSanitizeUrlPlugin } from "./plugins/index.js";
|
|
2
2
|
export function defineVuePlugins(app) {
|
|
3
3
|
defineSanitizeHtmlPlugin(app);
|
|
4
4
|
defineSanitizeUrlPlugin(app);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Fetch, FetchConfig, GetUserResponse } from "./types";
|
|
1
|
+
import type { Fetch, FetchConfig, GetUserResponse } from "./types.js";
|
|
2
2
|
export declare const createApiGetUser: (fetch: Fetch, config: FetchConfig) => () => Promise<GetUserResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocalStorage } from "@vueuse/core";
|
|
2
|
-
import { flush, getSecretKey, getToken, setUser } from "./api-client.
|
|
3
|
-
import { useApiActions, useUser } from "./composables/index.
|
|
4
|
-
import { createSingletonAsync, once } from "./helpers/index.
|
|
2
|
+
import { flush, getSecretKey, getToken, setUser } from "./api-client.js";
|
|
3
|
+
import { useApiActions, useUser } from "./composables/index.js";
|
|
4
|
+
import { createSingletonAsync, once } from "./helpers/index.js";
|
|
5
5
|
async function getUserRequest(fetch, config) {
|
|
6
6
|
const token = getToken();
|
|
7
7
|
const user = useUser();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { FetchConfig } from "./types";
|
|
1
|
+
import type { FetchConfig } from "./types.js";
|
|
2
2
|
export declare const createApiGetVisitorIdentifier: (config: FetchConfig) => () => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hashComponents, load } from "@fingerprintjs/fingerprintjs";
|
|
2
|
-
import { useVisitor } from "./composables/index.
|
|
3
|
-
import { createSingletonAsync, once } from "./helpers/index.
|
|
2
|
+
import { useVisitor } from "./composables/index.js";
|
|
3
|
+
import { createSingletonAsync, once } from "./helpers/index.js";
|
|
4
4
|
const setVisitor = (newVisitor) => {
|
|
5
5
|
const visitor = useVisitor();
|
|
6
6
|
visitor.value = !visitor.value ? newVisitor : { ...visitor.value, ...newVisitor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useApiHelper } from "./api-helper";
|
|
2
|
-
export { useDevice } from "./device-helper";
|
|
3
|
-
export { usePhoneHelper } from "./phone-helper";
|
|
4
|
-
export { useStringHelper } from "./string-helper";
|
|
1
|
+
export { useApiHelper } from "./api-helper.js";
|
|
2
|
+
export { useDevice } from "./device-helper.js";
|
|
3
|
+
export { usePhoneHelper } from "./phone-helper.js";
|
|
4
|
+
export { useStringHelper } from "./string-helper.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { device as currentDevice } from "./current-device.
|
|
1
|
+
import { device as currentDevice } from "./current-device.js";
|
|
2
2
|
export const deviceHelper = () => {
|
|
3
3
|
const device = currentDevice;
|
|
4
4
|
const isMobileApp = import.meta.env.VITE_IS_MOBILE_APP === "true" || import.meta.env.VITE_IS_MOBILE_APP === true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { apiHelper } from "./api-helper";
|
|
2
|
-
export { deviceHelper, type Device } from "./device-helper";
|
|
3
|
-
export { phoneHelper } from "./phone-helper";
|
|
4
|
-
export { stringHelper } from "./string-helper";
|
|
5
|
-
export * from "./composables";
|
|
1
|
+
export { apiHelper } from "./api-helper.js";
|
|
2
|
+
export { deviceHelper, type Device } from "./device-helper.js";
|
|
3
|
+
export { phoneHelper } from "./phone-helper.js";
|
|
4
|
+
export { stringHelper } from "./string-helper.js";
|
|
5
|
+
export * from "./composables.js";
|
|
6
6
|
export declare function once<T extends (...args: any[]) => any>(fn: T): T;
|
|
7
7
|
export declare function createSingletonAsync<T, Args extends unknown[]>(fn: (...args: Args) => Promise<T>): (...args: Args) => Promise<T>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { apiHelper } from "./api-helper.
|
|
2
|
-
export { deviceHelper } from "./device-helper.
|
|
3
|
-
export { phoneHelper } from "./phone-helper.
|
|
4
|
-
export { stringHelper } from "./string-helper.
|
|
5
|
-
export * from "./composables.
|
|
1
|
+
export { apiHelper } from "./api-helper.js";
|
|
2
|
+
export { deviceHelper } from "./device-helper.js";
|
|
3
|
+
export { phoneHelper } from "./phone-helper.js";
|
|
4
|
+
export { stringHelper } from "./string-helper.js";
|
|
5
|
+
export * from "./composables.js";
|
|
6
6
|
export function once(fn) {
|
|
7
7
|
let executed = false;
|
|
8
8
|
let result;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
import type { Fetch, FetchConfig } from "./types";
|
|
3
|
-
export { defineVuePlugins } from "./define-vue-plugins";
|
|
4
|
-
export { default as AppProvider, useBus } from "./AppProvider.vue";
|
|
5
|
-
export * from "./composables";
|
|
6
|
-
export * from "./types";
|
|
2
|
+
import type { Fetch, FetchConfig } from "./types.js";
|
|
3
|
+
export { defineVuePlugins } from "./define-vue-plugins.js";
|
|
4
|
+
export { default as AppProvider, useBus } from "./AppProvider.vue.js";
|
|
5
|
+
export * from "./composables/index.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
7
|
export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
8
8
|
fetch: Fetch;
|
|
9
|
-
getUser: () => Promise<import("./types").GetUserResponse>;
|
|
9
|
+
getUser: () => Promise<import("./types.js").GetUserResponse>;
|
|
10
10
|
useApiFetch: () => Fetch;
|
|
11
11
|
userActions: {
|
|
12
|
-
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
12
|
+
signIn: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse | {
|
|
13
13
|
key: string;
|
|
14
14
|
}>;
|
|
15
15
|
signInByCodeSendCode: (body: Record<string, any>) => Promise<{
|
|
16
16
|
key: string;
|
|
17
17
|
}>;
|
|
18
|
-
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
19
|
-
getToken: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
18
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse>;
|
|
19
|
+
getToken: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse>;
|
|
20
20
|
signUp: (body: Record<string, any>) => Promise<{
|
|
21
21
|
key: string;
|
|
22
22
|
}>;
|
|
@@ -91,7 +91,7 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
91
91
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
92
92
|
deleteAvatar: () => Promise<void>;
|
|
93
93
|
fetchActiveSessions: () => Promise<{
|
|
94
|
-
sessions: import("./types").ActiveSession[];
|
|
94
|
+
sessions: import("./types.js").ActiveSession[];
|
|
95
95
|
}>;
|
|
96
96
|
logoutActiveSession: (body: {
|
|
97
97
|
sessionId: string;
|
|
@@ -108,14 +108,14 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
export declare const useUserActions: () => Ref<{
|
|
111
|
-
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
111
|
+
signIn: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse | {
|
|
112
112
|
key: string;
|
|
113
113
|
}>;
|
|
114
114
|
signInByCodeSendCode: (body: Record<string, any>) => Promise<{
|
|
115
115
|
key: string;
|
|
116
116
|
}>;
|
|
117
|
-
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
118
|
-
getToken: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
117
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse>;
|
|
118
|
+
getToken: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse>;
|
|
119
119
|
signUp: (body: Record<string, any>) => Promise<{
|
|
120
120
|
key: string;
|
|
121
121
|
}>;
|
|
@@ -190,7 +190,7 @@ export declare const useUserActions: () => Ref<{
|
|
|
190
190
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
191
191
|
deleteAvatar: () => Promise<void>;
|
|
192
192
|
fetchActiveSessions: () => Promise<{
|
|
193
|
-
sessions: import("./types").ActiveSession[];
|
|
193
|
+
sessions: import("./types.js").ActiveSession[];
|
|
194
194
|
}>;
|
|
195
195
|
logoutActiveSession: (body: {
|
|
196
196
|
sessionId: string;
|
|
@@ -205,14 +205,14 @@ export declare const useUserActions: () => Ref<{
|
|
|
205
205
|
code: string;
|
|
206
206
|
}) => Promise<void>;
|
|
207
207
|
}, {
|
|
208
|
-
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
208
|
+
signIn: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse | {
|
|
209
209
|
key: string;
|
|
210
210
|
}>;
|
|
211
211
|
signInByCodeSendCode: (body: Record<string, any>) => Promise<{
|
|
212
212
|
key: string;
|
|
213
213
|
}>;
|
|
214
|
-
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
215
|
-
getToken: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
214
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse>;
|
|
215
|
+
getToken: (body: Record<string, any>) => Promise<import("./types.js").GetUserResponse>;
|
|
216
216
|
signUp: (body: Record<string, any>) => Promise<{
|
|
217
217
|
key: string;
|
|
218
218
|
}>;
|
|
@@ -287,7 +287,7 @@ export declare const useUserActions: () => Ref<{
|
|
|
287
287
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
288
288
|
deleteAvatar: () => Promise<void>;
|
|
289
289
|
fetchActiveSessions: () => Promise<{
|
|
290
|
-
sessions: import("./types").ActiveSession[];
|
|
290
|
+
sessions: import("./types.js").ActiveSession[];
|
|
291
291
|
}>;
|
|
292
292
|
logoutActiveSession: (body: {
|
|
293
293
|
sessionId: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useLocalStorage } from "@vueuse/core";
|
|
2
2
|
import { ref } from "vue";
|
|
3
|
-
import { createApiFetch } from "./api-client.
|
|
3
|
+
import { createApiFetch } from "./api-client.js";
|
|
4
4
|
import { useBus } from "./AppProvider.vue";
|
|
5
|
-
import { newCometClient } from "./comet-client.
|
|
6
|
-
import { useApiActions } from "./composables/index.
|
|
7
|
-
import { createApiGetUser } from "./get-user.
|
|
8
|
-
import { createApiGetVisitorIdentifier } from "./get-visitor.
|
|
9
|
-
import { createInitApplication } from "./init-application.
|
|
10
|
-
import { createApiRefreshToken } from "./refresh-token.
|
|
11
|
-
import { createApiUserActions } from "./user-actions.
|
|
12
|
-
export { defineVuePlugins } from "./define-vue-plugins.
|
|
5
|
+
import { newCometClient } from "./comet-client.js";
|
|
6
|
+
import { useApiActions } from "./composables/index.js";
|
|
7
|
+
import { createApiGetUser } from "./get-user.js";
|
|
8
|
+
import { createApiGetVisitorIdentifier } from "./get-visitor.js";
|
|
9
|
+
import { createInitApplication } from "./init-application.js";
|
|
10
|
+
import { createApiRefreshToken } from "./refresh-token.js";
|
|
11
|
+
import { createApiUserActions } from "./user-actions.js";
|
|
12
|
+
export { defineVuePlugins } from "./define-vue-plugins.js";
|
|
13
13
|
export { default as AppProvider, useBus } from "./AppProvider.vue";
|
|
14
|
-
export * from "./composables/index.
|
|
15
|
-
export * from "./types.
|
|
14
|
+
export * from "./composables/index.js";
|
|
15
|
+
export * from "./types.js";
|
|
16
16
|
const apiActions = useApiActions();
|
|
17
17
|
let userActions;
|
|
18
18
|
export function initApiFetch($fetch, config) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { watch } from "vue";
|
|
2
2
|
import { useI18n } from "vue-i18n";
|
|
3
3
|
import { useRouter } from "vue-router";
|
|
4
|
-
import { useActiveSessions, useCookies, useSubscribe, useUser } from "./composables/index.
|
|
5
|
-
import { once } from "./helpers/index.
|
|
6
|
-
import { useAppLocale, useThemeMode, useUserActions, useVisitor } from "./index.
|
|
4
|
+
import { useActiveSessions, useCookies, useSubscribe, useUser } from "./composables/index.js";
|
|
5
|
+
import { once } from "./helpers/index.js";
|
|
6
|
+
import { useAppLocale, useThemeMode, useUserActions, useVisitor } from "./index.js";
|
|
7
7
|
function initApplication() {
|
|
8
8
|
const router = useRouter();
|
|
9
9
|
const user = useUser();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./sanitize-html";
|
|
2
|
-
export * from "./sanitize-url";
|
|
1
|
+
export * from "./sanitize-html.js";
|
|
2
|
+
export * from "./sanitize-url.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sanitizeUrl } from "../thirdparty/sanitize-url/index.
|
|
1
|
+
import { sanitizeUrl } from "../thirdparty/sanitize-url/index.js";
|
|
2
2
|
export function defineSanitizeUrlPlugin(app) {
|
|
3
3
|
app.directive("sanitize-url", (el, binding) => {
|
|
4
4
|
if (binding.value !== binding.oldValue) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Fetch, FetchConfig } from "./types";
|
|
1
|
+
import type { Fetch, FetchConfig } from "./types.js";
|
|
2
2
|
export declare const createApiRefreshToken: (fetch: Fetch, config: FetchConfig) => () => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { flush, setToken } from "./api-client.
|
|
2
|
-
import { createSingletonAsync, once } from "./helpers/index.
|
|
1
|
+
import { flush, setToken } from "./api-client.js";
|
|
2
|
+
import { createSingletonAsync, once } from "./helpers/index.js";
|
|
3
3
|
async function refreshTokenRequest(fetch, config) {
|
|
4
4
|
setToken(null);
|
|
5
5
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActiveSession, Fetch, FetchConfig, GetUserResponse } from "./types";
|
|
1
|
+
import type { ActiveSession, Fetch, FetchConfig, GetUserResponse } from "./types.js";
|
|
2
2
|
export type UserActions = ReturnType<typeof createApiUserActions>;
|
|
3
3
|
export declare const createApiUserActions: (fetch: Fetch, config: FetchConfig, getUser: () => Promise<GetUserResponse>) => {
|
|
4
4
|
signIn: (body: Record<string, any>) => Promise<GetUserResponse | {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { flush, setSecretKey, setToken, updateUser } from "./api-client.
|
|
2
|
-
import { useUser } from "./composables/index.
|
|
3
|
-
import { once } from "./helpers/index.
|
|
1
|
+
import { flush, setSecretKey, setToken, updateUser } from "./api-client.js";
|
|
2
|
+
import { useUser } from "./composables/index.js";
|
|
3
|
+
import { once } from "./helpers/index.js";
|
|
4
4
|
export const createApiUserActions = once(
|
|
5
5
|
(fetch, config, getUser) => {
|
|
6
6
|
return {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ActiveLayer } from "./types.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layer: ActiveLayer;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { onMounted, ref, resolveComponent } from "vue"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const emit = defineEmits(["closeLayer", "closeAllLayers"])
|
|
7
|
-
const layerRef = ref
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const closeAllLayers = () => emit("closeAllLayers")
|
|
11
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onMounted, ref, resolveComponent } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
layer: { type: Object, required: true }
|
|
5
|
+
});
|
|
6
|
+
const emit = defineEmits(["closeLayer", "closeAllLayers"]);
|
|
7
|
+
const layerRef = ref(null);
|
|
8
|
+
const closeLayer = () => emit("closeLayer", props.layer.layerId);
|
|
9
|
+
const closeAllLayers = () => emit("closeAllLayers");
|
|
12
10
|
onMounted(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const component = resolveComponent(props.layer.component)
|
|
11
|
+
props.layer.closeLayer = () => closeLayer();
|
|
12
|
+
setTimeout(() => {
|
|
13
|
+
layerRef.value?.classList.add("open");
|
|
14
|
+
const layoutElement = document.querySelector("#layout");
|
|
15
|
+
if (layoutElement) {
|
|
16
|
+
layoutElement.classList.remove("layer-hide");
|
|
17
|
+
layoutElement.classList.add("layer-open");
|
|
18
|
+
document.documentElement.style.overflow = "hidden auto";
|
|
19
|
+
document.body.style.overflow = "hidden auto";
|
|
20
|
+
}
|
|
21
|
+
}, 50);
|
|
22
|
+
});
|
|
23
|
+
const component = resolveComponent(props.layer.component);
|
|
29
24
|
if (typeof component === "string") {
|
|
30
|
-
|
|
25
|
+
closeLayer();
|
|
31
26
|
}
|
|
32
27
|
</script>
|
|
33
28
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ActiveLayer } from "./types.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layer: ActiveLayer;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActiveLayer } from "./types.js";
|
|
2
|
+
export declare const useLayerManager: () => {
|
|
3
|
+
open: (layerName: string, params?: {
|
|
4
|
+
[p: string]: any;
|
|
5
|
+
}) => void | undefined;
|
|
6
|
+
getLayer: (layerName: string) => ActiveLayer | undefined;
|
|
7
|
+
closeAllLayers: () => void | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export default _default;
|