x-essential-lib 0.11.14 → 0.11.15
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/index.d.ts +5 -5
- package/dist/index.js +21 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as EventType, t as Emitter } from "./vendor.dyl22a0i.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Ref } from "vue";
|
|
3
3
|
import { VuetifyOptions } from "vuetify";
|
|
4
4
|
import { AxiosInstance } from "axios";
|
|
5
5
|
//#region src/composables/color.d.ts
|
|
@@ -67,14 +67,14 @@ export declare function providePermissionObjects(permissionObjects: Ref<Permissi
|
|
|
67
67
|
export declare function injectPermissionObjects(): Ref<PermissionObjects>;
|
|
68
68
|
export declare function provideViews(views: Ref<string[]>): void;
|
|
69
69
|
export declare function injectViews(): Ref<string[]>;
|
|
70
|
-
interface
|
|
70
|
+
interface Insets {
|
|
71
71
|
top: number;
|
|
72
72
|
bottom: number;
|
|
73
73
|
left: number;
|
|
74
74
|
right: number;
|
|
75
75
|
}
|
|
76
|
-
export declare function
|
|
77
|
-
export declare function
|
|
76
|
+
export declare function provideInsets(insets: Ref<Insets>): void;
|
|
77
|
+
export declare function injectInsets(): Ref<Insets>;
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/logic/router/index.d.ts
|
|
80
80
|
export interface RouteMeta {
|
|
@@ -165,7 +165,7 @@ export interface GlobalStates {
|
|
|
165
165
|
permissionChecksum: Ref<string>;
|
|
166
166
|
lastAppPath: Ref<string>;
|
|
167
167
|
views: Ref<string[]>;
|
|
168
|
-
|
|
168
|
+
insets: Ref<{
|
|
169
169
|
top: number;
|
|
170
170
|
bottom: number;
|
|
171
171
|
left: number;
|
package/dist/index.js
CHANGED
|
@@ -254,11 +254,11 @@ function provideViews(views) {
|
|
|
254
254
|
function injectViews() {
|
|
255
255
|
return inject("essentialViews");
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
provide("
|
|
257
|
+
function provideInsets(insets) {
|
|
258
|
+
provide("essentialInsets", insets);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
return inject("
|
|
260
|
+
function injectInsets() {
|
|
261
|
+
return inject("essentialInsets");
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
//#endregion
|
|
@@ -629,12 +629,12 @@ const baseVuetifyOptions = {
|
|
|
629
629
|
//#region src/composables/globalStates.ts
|
|
630
630
|
function useGlobalStates(globalStates, base) {
|
|
631
631
|
const { t } = useI18n();
|
|
632
|
-
const { darkRaw, dark, locale, activeOrg, activeOrgNameRaw, activeOrgName, privateDomain, permissionObjects, permissionChecksum, lastAppPath, views,
|
|
632
|
+
const { darkRaw, dark, locale, activeOrg, activeOrgNameRaw, activeOrgName, privateDomain, permissionObjects, permissionChecksum, lastAppPath, views, insets } = globalStates;
|
|
633
633
|
provideDark(dark);
|
|
634
634
|
provideLocale(locale);
|
|
635
635
|
providePermissionObjects(permissionObjects);
|
|
636
636
|
provideViews(views);
|
|
637
|
-
|
|
637
|
+
provideInsets(insets);
|
|
638
638
|
const prefDark = usePreferredDark();
|
|
639
639
|
watchEffect(() => {
|
|
640
640
|
let d;
|
|
@@ -670,11 +670,13 @@ function useGlobalStates(globalStates, base) {
|
|
|
670
670
|
function onUpdateLastAppPath(val) {
|
|
671
671
|
lastAppPath.value = val;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
673
|
+
function onUpdateInsets(val) {
|
|
674
|
+
insets.value = {
|
|
675
|
+
top: val.top,
|
|
676
|
+
bottom: val.bottom,
|
|
677
|
+
left: val.left,
|
|
678
|
+
right: val.right
|
|
679
|
+
};
|
|
678
680
|
}
|
|
679
681
|
function onSyncGlobalStates() {
|
|
680
682
|
eventBus.emit("updateDark", dark.value);
|
|
@@ -682,11 +684,11 @@ function useGlobalStates(globalStates, base) {
|
|
|
682
684
|
eventBus.emit("updateActiveOrg", [activeOrg.value, activeOrgNameRaw.value]);
|
|
683
685
|
eventBus.emit("updatePermission", [permissionObjects.value, permissionChecksum.value]);
|
|
684
686
|
eventBus.emit("updateLastAppPath", lastAppPath.value);
|
|
685
|
-
eventBus.emit("
|
|
686
|
-
top:
|
|
687
|
-
bottom:
|
|
688
|
-
left:
|
|
689
|
-
right:
|
|
687
|
+
eventBus.emit("updateInsets", {
|
|
688
|
+
top: insets.value.top,
|
|
689
|
+
bottom: insets.value.bottom,
|
|
690
|
+
left: insets.value.left,
|
|
691
|
+
right: insets.value.right
|
|
690
692
|
});
|
|
691
693
|
}
|
|
692
694
|
onBeforeMount(() => {
|
|
@@ -695,7 +697,7 @@ function useGlobalStates(globalStates, base) {
|
|
|
695
697
|
eventBus.on("updateActiveOrg", onUpdateActiveOrg);
|
|
696
698
|
eventBus.on("updatePermission", onUpdatePermission);
|
|
697
699
|
eventBus.on("updateLastAppPath", onUpdateLastAppPath);
|
|
698
|
-
eventBus.on("
|
|
700
|
+
eventBus.on("updateInsets", onUpdateInsets);
|
|
699
701
|
if (base) eventBus.on("syncGlobalStates", onSyncGlobalStates);
|
|
700
702
|
else eventBus.emit("syncGlobalStates");
|
|
701
703
|
});
|
|
@@ -705,7 +707,7 @@ function useGlobalStates(globalStates, base) {
|
|
|
705
707
|
eventBus.off("updateActiveOrg", onUpdateActiveOrg);
|
|
706
708
|
eventBus.off("updatePermission", onUpdatePermission);
|
|
707
709
|
eventBus.off("updateLastAppPath", onUpdateLastAppPath);
|
|
708
|
-
eventBus.off("
|
|
710
|
+
eventBus.off("updateInsets", onUpdateInsets);
|
|
709
711
|
if (base) eventBus.off("syncGlobalStates", onSyncGlobalStates);
|
|
710
712
|
});
|
|
711
713
|
}
|
|
@@ -1584,4 +1586,4 @@ async function loadLocaleMessageEssential(locale) {
|
|
|
1584
1586
|
var src_default = { install };
|
|
1585
1587
|
|
|
1586
1588
|
//#endregion
|
|
1587
|
-
export { addView, baseVuetifyOptions, clearViews, closeWaitDlg, createAxios, src_default as default, delView, email, eventBus, getErrorMessage, getTypeColor, getTypeDefault, globalObjects, hasView, injectDark, injectLocale, injectPermissionObjects,
|
|
1589
|
+
export { addView, baseVuetifyOptions, clearViews, closeWaitDlg, createAxios, src_default as default, delView, email, eventBus, getErrorMessage, getTypeColor, getTypeDefault, globalObjects, hasView, injectDark, injectInsets, injectLocale, injectPermissionObjects, injectViews, isEmpty, isExist, lastView, length, loadLocaleMessageEssential, matchRouteMeta, maxLength, messageError, messageInfo, messageSuccess, messageWarning, minLength, onBeforeEnter, openConfirmDlg, openNumberDlg, openPromptDlg, openWaitDlg, popView, provideDark, provideInsets, provideLocale, providePermissionObjects, provideViews, required, routeTransName, toPermissionObjects, types, useColor, useGlobalStates, useMicroApp, usePageRoute, usePermission, useSystem, useViewStack, verifyPermission, waitMs, waitUtil };
|