x-essential-lib 0.10.39 → 0.10.41

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 CHANGED
@@ -1,9 +1,8 @@
1
- import { n as EventType, t as Emitter } from "./vendor.dqdzrw43.js";
1
+ import { n as EventType, t as Emitter } from "./vendor.g0828r92.js";
2
2
  import { Ref } from "vue";
3
3
  import { AxiosInstance } from "axios";
4
-
5
4
  //#region src/composables/color.d.ts
6
- declare function useColor(): {
5
+ export declare function useColor(): {
7
6
  primaryColor: import("vue").ComputedRef<string>;
8
7
  secondaryColor: import("vue").ComputedRef<string>;
9
8
  backgroundColor0: import("vue").ComputedRef<"#2e2e2e" | "#bdbdbd">;
@@ -19,7 +18,7 @@ interface Options {
19
18
  baseUrl: string;
20
19
  onError: OnError;
21
20
  }
22
- declare function createAxios(options: Options): AxiosInstance;
21
+ export declare function createAxios(options: Options): AxiosInstance;
23
22
  //#endregion
24
23
  //#region src/utils/dialog.d.ts
25
24
  interface ButtonOptions {
@@ -33,7 +32,7 @@ interface ConfirmParams {
33
32
  cancel?: ButtonOptions;
34
33
  ok?: ButtonOptions;
35
34
  }
36
- declare function openConfirmDlg(params: ConfirmParams): Promise<boolean | undefined>;
35
+ export declare function openConfirmDlg(params: ConfirmParams): Promise<boolean | undefined>;
37
36
  interface NumberParams {
38
37
  title: string;
39
38
  subtitle?: string;
@@ -43,7 +42,7 @@ interface NumberParams {
43
42
  max?: number;
44
43
  step?: number;
45
44
  }
46
- declare function openNumberDlg(params: NumberParams): Promise<number | undefined>;
45
+ export declare function openNumberDlg(params: NumberParams): Promise<number | undefined>;
47
46
  interface PromptParams {
48
47
  title: string;
49
48
  subtitle?: string;
@@ -55,25 +54,25 @@ interface PromptParams {
55
54
  cancel?: ButtonOptions;
56
55
  ok?: ButtonOptions;
57
56
  }
58
- declare function openPromptDlg(params: PromptParams): Promise<string | undefined>;
59
- declare function openWaitDlg(text?: string): void;
60
- declare function closeWaitDlg(): void;
57
+ export declare function openPromptDlg(params: PromptParams): Promise<string | undefined>;
58
+ export declare function openWaitDlg(text?: string): void;
59
+ export declare function closeWaitDlg(): void;
61
60
  //#endregion
62
61
  //#region src/utils/message.d.ts
63
- declare function messageError(text: string, timeout?: number): void;
64
- declare function messageInfo(text: string, timeout?: number): void;
65
- declare function messageSuccess(text: string, timeout?: number): void;
66
- declare function messageWarning(text: string, timeout?: number): void;
62
+ export declare function messageError(text: string, timeout?: number): void;
63
+ export declare function messageInfo(text: string, timeout?: number): void;
64
+ export declare function messageSuccess(text: string, timeout?: number): void;
65
+ export declare function messageWarning(text: string, timeout?: number): void;
67
66
  //#endregion
68
67
  //#region src/utils/misc.d.ts
69
- declare const globalObjects: {
68
+ export declare const globalObjects: {
70
69
  router: any;
71
70
  i18n: any;
72
71
  };
73
- declare const eventBus: Emitter<Record<EventType, unknown>>;
74
- declare function waitMs(ms: number): Promise<void>;
75
- declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
76
- declare function appAppear(name: string, diff: number): void;
72
+ export declare const eventBus: Emitter<Record<EventType, unknown>>;
73
+ export declare function waitMs(ms: number): Promise<void>;
74
+ export declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
75
+ export declare function appAppear(name: string, diff: number): void;
77
76
  //#endregion
78
77
  //#region src/utils/permission.d.ts
79
78
  type InstanceTree = {
@@ -83,54 +82,54 @@ type PermissionObject = {
83
82
  includes: InstanceTree;
84
83
  excludes: InstanceTree;
85
84
  };
86
- type PermissionObjects = {
85
+ export type PermissionObjects = {
87
86
  [key: string]: PermissionObject;
88
87
  };
89
- declare function toPermissionObjects(permissions: {
88
+ export declare function toPermissionObjects(permissions: {
90
89
  [key: string]: string;
91
90
  }): PermissionObjects;
92
- declare function isExist(instanceTree: InstanceTree | undefined, instance: string): boolean;
93
- declare function verifyPermission(permissionObjects: PermissionObjects, permission: string, instance: string): boolean;
91
+ export declare function isExist(instanceTree: InstanceTree | undefined, instance: string): boolean;
92
+ export declare function verifyPermission(permissionObjects: PermissionObjects, permission: string, instance: string): boolean;
94
93
  //#endregion
95
94
  //#region src/utils/provideInject.d.ts
96
- declare function provideDark(dark: Ref<boolean>): void;
97
- declare function injectDark(): Ref<boolean>;
98
- declare function provideLocale(locale: Ref<string>): void;
99
- declare function injectLocale(): Ref<string>;
100
- declare function providePermissionObjects(permissionObjects: Ref<PermissionObjects>): void;
101
- declare function injectPermissionObjects(): Ref<PermissionObjects>;
102
- declare function provideViews(views: Ref<string[]>): void;
103
- declare function injectViews(): Ref<string[]>;
95
+ export declare function provideDark(dark: Ref<boolean>): void;
96
+ export declare function injectDark(): Ref<boolean>;
97
+ export declare function provideLocale(locale: Ref<string>): void;
98
+ export declare function injectLocale(): Ref<string>;
99
+ export declare function providePermissionObjects(permissionObjects: Ref<PermissionObjects>): void;
100
+ export declare function injectPermissionObjects(): Ref<PermissionObjects>;
101
+ export declare function provideViews(views: Ref<string[]>): void;
102
+ export declare function injectViews(): Ref<string[]>;
104
103
  //#endregion
105
104
  //#region src/utils/router.d.ts
106
- interface RouteMeta {
105
+ export interface RouteMeta {
107
106
  app: 'x-app-mf' | 'x-compute-mf' | 'x-create-mf' | 'x-data-mf' | 'x-ecosystem-mf' | 'x-main-mf' | 'x-mine-mf' | 'x-org-mf' | 'x-passport-mf' | 'x-resource-mf';
108
107
  path: string;
109
108
  back?: string;
110
109
  level: number;
111
110
  requireAuth: boolean;
112
111
  }
113
- declare function matchRouteMeta(path: string): RouteMeta | undefined;
114
- declare const routeTransName: import("vue").Ref<string, string>;
115
- declare function onBeforeEnter(toPath: string, fromPath: string, lastAppPath: string): void;
112
+ export declare function matchRouteMeta(path: string): RouteMeta | undefined;
113
+ export declare const routeTransName: import("vue").Ref<string, string>;
114
+ export declare function onBeforeEnter(toPath: string, fromPath: string, lastAppPath: string): void;
116
115
  //#endregion
117
116
  //#region src/utils/type.d.ts
118
- declare const types: readonly ["string", "number", "boolean", "array", "object", "any"];
119
- type Type = (typeof types)[number];
120
- declare function getTypeColor(type: Type): string;
121
- declare function getTypeDefault(type: Type): any;
117
+ export declare const types: readonly ["string", "number", "boolean", "array", "object", "any"];
118
+ export type Type = (typeof types)[number];
119
+ export declare function getTypeColor(type: Type): string;
120
+ export declare function getTypeDefault(type: Type): any;
122
121
  //#endregion
123
122
  //#region src/utils/viewMgr.d.ts
124
- declare function isEmpty(views: Ref<string[]>): boolean;
125
- declare function lastView(views: Ref<string[]>): string | undefined;
126
- declare function hasView(views: Ref<string[]>, name: string): boolean;
127
- declare function addView(views: Ref<string[]>, name: string): void;
128
- declare function delView(views: Ref<string[]>, name: string): void;
129
- declare function popView(views: Ref<string[]>): void;
130
- declare function clearViews(views: Ref<string[]>): void;
123
+ export declare function isEmpty(views: Ref<string[]>): boolean;
124
+ export declare function lastView(views: Ref<string[]>): string | undefined;
125
+ export declare function hasView(views: Ref<string[]>, name: string): boolean;
126
+ export declare function addView(views: Ref<string[]>, name: string): void;
127
+ export declare function delView(views: Ref<string[]>, name: string): void;
128
+ export declare function popView(views: Ref<string[]>): void;
129
+ export declare function clearViews(views: Ref<string[]>): void;
131
130
  //#endregion
132
131
  //#region src/composables/globalStates.d.ts
133
- interface GlobalStates {
132
+ export interface GlobalStates {
134
133
  darkRaw: Ref<boolean | undefined>;
135
134
  dark: Ref<boolean>;
136
135
  locale: Ref<string>;
@@ -143,23 +142,23 @@ interface GlobalStates {
143
142
  lastAppPath: Ref<string>;
144
143
  views: Ref<string[]>;
145
144
  }
146
- declare function useGlobalStates(globalStates: GlobalStates, base?: boolean): void;
145
+ export declare function useGlobalStates(globalStates: GlobalStates, base?: boolean): void;
147
146
  //#endregion
148
147
  //#region src/composables/microApp.d.ts
149
- declare function useMicroApp(globalStates: GlobalStates, customBack?: (m: RouteMeta) => void): void;
148
+ export declare function useMicroApp(globalStates: GlobalStates, customBack?: (m: RouteMeta) => void): void;
150
149
  //#endregion
151
150
  //#region src/composables/pageRoute.d.ts
152
- declare function usePageRoute(onRouteChange?: () => Promise<void>): {
151
+ export declare function usePageRoute(onRouteChange?: () => Promise<void>): {
153
152
  syncOrg: () => Promise<boolean>;
154
153
  };
155
154
  //#endregion
156
155
  //#region src/composables/permission.d.ts
157
- declare function usePermission(): {
156
+ export declare function usePermission(): {
158
157
  verifyPermission: (permission: string, instance?: string) => boolean;
159
158
  };
160
159
  //#endregion
161
160
  //#region src/composables/system.d.ts
162
- declare function useSystem(): {
161
+ export declare function useSystem(): {
163
162
  sysBarAvail: import("vue").ComputedRef<boolean>;
164
163
  compactWidth: import("vue").ComputedRef<string>;
165
164
  isCurvedScreen: import("vue").ComputedRef<boolean>;
@@ -169,12 +168,12 @@ declare function useSystem(): {
169
168
  };
170
169
  //#endregion
171
170
  //#region src/composables/viewStack.d.ts
172
- declare function useViewStack(name: string, hook?: (params: unknown) => void): {
173
- open: import("vue").WritableComputedRef<boolean, boolean>;
171
+ export declare function useViewStack(name: string, openHook?: (params: any) => Promise<void>, closeHook?: () => Promise<void>): {
172
+ open: import("vue").Ref<boolean, boolean>;
174
173
  };
175
174
  //#endregion
176
175
  //#region src/i18n/index.d.ts
177
- declare function loadLocaleMessageEssential(locale: string): Promise<{
176
+ export declare function loadLocaleMessageEssential(locale: string): Promise<{
178
177
  $vuetify: {
179
178
  badge: string;
180
179
  open: string;
@@ -396,4 +395,4 @@ declare const _default: {
396
395
  install: (app: import("vue").App) => void;
397
396
  };
398
397
  //#endregion
399
- export { GlobalStates, PermissionObjects, RouteMeta, Type, addView, appAppear, clearViews, closeWaitDlg, createAxios, _default as default, delView, eventBus, getTypeColor, getTypeDefault, globalObjects, hasView, injectDark, injectLocale, injectPermissionObjects, injectViews, isEmpty, isExist, lastView, loadLocaleMessageEssential, matchRouteMeta, messageError, messageInfo, messageSuccess, messageWarning, onBeforeEnter, openConfirmDlg, openNumberDlg, openPromptDlg, openWaitDlg, popView, provideDark, provideLocale, providePermissionObjects, provideViews, routeTransName, toPermissionObjects, types, useColor, useGlobalStates, useMicroApp, usePageRoute, usePermission, useSystem, useViewStack, verifyPermission, waitMs, waitUtil };
398
+ export { _default as default };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){try{document.getElementById(`x-essential-lib`)?.remove();const e = document.createElement(`style`);e.setAttribute(`id`, `x-essential-lib`);const t = document.createTextNode(`.fade-leave-active[data-v-x-essential-lib-c3545c8d]{transition:opacity .5s}.fade-leave-to[data-v-x-essential-lib-c3545c8d]{opacity:0}.x-cont[data-v-x-essential-lib-c3545c8d]{justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.lds-spinner[data-v-x-essential-lib-c3545c8d]{color:official;width:40px;height:40px;display:inline-block;position:relative}.lds-spinner div[data-v-x-essential-lib-c3545c8d]{transform-origin:20px 20px;animation:1.2s linear infinite lds-spinner-x-essential-lib-c3545c8d}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:after{content:" ";background:#9e9e9e;border-radius:5%;width:2px;height:6px;display:block;position:absolute;top:3px;left:18px}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:first-child{animation-delay:-1.1s;transform:rotate(0)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(2){animation-delay:-1s;transform:rotate(30deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(3){animation-delay:-.9s;transform:rotate(60deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(4){animation-delay:-.8s;transform:rotate(90deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(5){animation-delay:-.7s;transform:rotate(120deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(6){animation-delay:-.6s;transform:rotate(150deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(7){animation-delay:-.5s;transform:rotate(180deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(8){animation-delay:-.4s;transform:rotate(210deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(9){animation-delay:-.3s;transform:rotate(240deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(10){animation-delay:-.2s;transform:rotate(270deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(11){animation-delay:-.1s;transform:rotate(300deg)}.lds-spinner div[data-v-x-essential-lib-c3545c8d]:nth-child(12){animation-delay:0s;transform:rotate(330deg)}@keyframes lds-spinner-x-essential-lib-c3545c8d{0%{opacity:1}to{opacity:0}}.x-item[data-v-x-essential-lib-cfcda9d9]{width:600px}@media (width<=600px){.x-item[data-v-x-essential-lib-cfcda9d9]{width:calc(100vw - 16px)}}.x-cont[data-v-x-essential-lib-b973907d]{z-index:9999;position:fixed;bottom:50px;left:50%;transform:translate(-50%)}`);e.appendChild(t);document.head.appendChild(e);}catch(e){console.error('rolldown-plugin-inject-css', e);}})()
2
- import { a as api, i as mitt_default, o as usePreferredDark, r as toLower } from "./vendor.dqdzrw43.js";
2
+ import { a as api, i as mitt_default, o as usePreferredDark, r as toLower } from "./vendor.g0828r92.js";
3
3
  import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isRef, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, resolveComponent, toDisplayString, unref, useTemplateRef, watch, watchEffect, withCtx, withKeys, withModifiers } from "vue";
4
4
  import { useI18n } from "vue-i18n";
5
5
  import { useDisplay, useTheme } from "vuetify";
@@ -465,10 +465,11 @@ function onBeforeEnter(toPath, fromPath, lastAppPath) {
465
465
  if (!fromRouteMeta) return;
466
466
  const sameApp = toRouteMeta.app === fromRouteMeta.app;
467
467
  const diff = toRouteMeta.level - fromRouteMeta.level;
468
- if (sameApp) if (diff > 0) routeTransName.value = "inner-left";
469
- else if (diff < 0) routeTransName.value = "inner-right";
470
- else routeTransName.value = "";
471
- else {
468
+ if (sameApp) {
469
+ if (diff > 0) routeTransName.value = "inner-left";
470
+ else if (diff < 0) routeTransName.value = "inner-right";
471
+ else routeTransName.value = "";
472
+ } else {
472
473
  routeTransName.value = "";
473
474
  appAppear(toRouteMeta.app, diff);
474
475
  }
@@ -767,9 +768,10 @@ function useSystem() {
767
768
 
768
769
  //#endregion
769
770
  //#region src/composables/viewStack.ts
770
- function useViewStack(name, hook) {
771
+ function useViewStack(name, openHook, closeHook) {
771
772
  const views = injectViews();
772
- const open = computed({
773
+ const open = ref(false);
774
+ const view = computed({
773
775
  get() {
774
776
  return hasView(views, name);
775
777
  },
@@ -778,16 +780,26 @@ function useViewStack(name, hook) {
778
780
  else delView(views, name);
779
781
  }
780
782
  });
781
- const onOpen = (params) => {
782
- hook?.(params);
783
- open.value = true;
784
- };
783
+ async function onOpen(params) {
784
+ try {
785
+ await openHook?.(params);
786
+ } finally {
787
+ open.value = true;
788
+ }
789
+ }
785
790
  onMounted(() => {
786
791
  eventBus.on(name, onOpen);
787
792
  });
788
793
  onBeforeUnmount(() => {
789
794
  eventBus.off(name, onOpen);
790
795
  });
796
+ watch(open, (val) => {
797
+ view.value = val;
798
+ });
799
+ watch(view, async (val) => {
800
+ if (!val) closeHook?.();
801
+ open.value = val;
802
+ });
791
803
  return { open };
792
804
  }
793
805
 
@@ -1,6 +1,6 @@
1
1
  import { Fragment, computed, defineComponent, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isRef, onBeforeMount, onBeforeUnmount, onMounted, provide, ref, shallowRef, toValue, unref, watch, watchEffect } from "vue";
2
2
 
3
- //#region node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.38_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
3
+ //#region node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
4
4
  const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
5
5
  /**
6
6
  * On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
@@ -60,7 +60,7 @@ function watchImmediate(source, cb, options) {
60
60
  }
61
61
 
62
62
  //#endregion
63
- //#region node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.38_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
63
+ //#region node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
64
64
  const defaultWindow = isClient ? window : void 0;
65
65
  const defaultDocument = isClient ? window.document : void 0;
66
66
  const defaultNavigator = isClient ? window.navigator : void 0;
@@ -149,7 +149,8 @@ function useMediaQuery(query, options = {}) {
149
149
  watchEffect(() => {
150
150
  if (ssrSupport.value) {
151
151
  ssrSupport.value = !isSupported.value;
152
- matches.value = toValue(query).split(",").some((queryString) => {
152
+ const queryStrings = toValue(query).split(",");
153
+ matches.value = queryStrings.some((queryString) => {
153
154
  const not = queryString.includes("not all");
154
155
  const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
155
156
  const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
@@ -329,50 +330,6 @@ var root = freeGlobal || freeSelf || Function("return this")();
329
330
  /** Built-in value references. */
330
331
  var Symbol$1 = root.Symbol;
331
332
 
332
- //#endregion
333
- //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js
334
- /**
335
- * A specialized version of `_.map` for arrays without support for iteratee
336
- * shorthands.
337
- *
338
- * @private
339
- * @param {Array} [array] The array to iterate over.
340
- * @param {Function} iteratee The function invoked per iteration.
341
- * @returns {Array} Returns the new mapped array.
342
- */
343
- function arrayMap(array, iteratee) {
344
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
345
- while (++index < length) result[index] = iteratee(array[index], index, array);
346
- return result;
347
- }
348
-
349
- //#endregion
350
- //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.js
351
- /**
352
- * Checks if `value` is classified as an `Array` object.
353
- *
354
- * @static
355
- * @memberOf _
356
- * @since 0.1.0
357
- * @category Lang
358
- * @param {*} value The value to check.
359
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
360
- * @example
361
- *
362
- * _.isArray([1, 2, 3]);
363
- * // => true
364
- *
365
- * _.isArray(document.body.children);
366
- * // => false
367
- *
368
- * _.isArray('abc');
369
- * // => false
370
- *
371
- * _.isArray(_.noop);
372
- * // => false
373
- */
374
- var isArray = Array.isArray;
375
-
376
333
  //#endregion
377
334
  //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js
378
335
  /** Used for built-in method references. */
@@ -401,8 +358,10 @@ function getRawTag(value) {
401
358
  var unmasked = true;
402
359
  } catch (e) {}
403
360
  var result = nativeObjectToString$1.call(value);
404
- if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
405
- else delete value[symToStringTag$1];
361
+ if (unmasked) {
362
+ if (isOwn) value[symToStringTag$1] = tag;
363
+ else delete value[symToStringTag$1];
364
+ }
406
365
  return result;
407
366
  }
408
367
 
@@ -428,7 +387,8 @@ function objectToString(value) {
428
387
  //#endregion
429
388
  //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js
430
389
  /** `Object#toString` result references. */
431
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
390
+ var nullTag = "[object Null]";
391
+ var undefinedTag = "[object Undefined]";
432
392
  /** Built-in value references. */
433
393
  var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
434
394
  /**
@@ -498,12 +458,57 @@ function isSymbol(value) {
498
458
  return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
499
459
  }
500
460
 
461
+ //#endregion
462
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js
463
+ /**
464
+ * A specialized version of `_.map` for arrays without support for iteratee
465
+ * shorthands.
466
+ *
467
+ * @private
468
+ * @param {Array} [array] The array to iterate over.
469
+ * @param {Function} iteratee The function invoked per iteration.
470
+ * @returns {Array} Returns the new mapped array.
471
+ */
472
+ function arrayMap(array, iteratee) {
473
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
474
+ while (++index < length) result[index] = iteratee(array[index], index, array);
475
+ return result;
476
+ }
477
+
478
+ //#endregion
479
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.js
480
+ /**
481
+ * Checks if `value` is classified as an `Array` object.
482
+ *
483
+ * @static
484
+ * @memberOf _
485
+ * @since 0.1.0
486
+ * @category Lang
487
+ * @param {*} value The value to check.
488
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
489
+ * @example
490
+ *
491
+ * _.isArray([1, 2, 3]);
492
+ * // => true
493
+ *
494
+ * _.isArray(document.body.children);
495
+ * // => false
496
+ *
497
+ * _.isArray('abc');
498
+ * // => false
499
+ *
500
+ * _.isArray(_.noop);
501
+ * // => false
502
+ */
503
+ var isArray = Array.isArray;
504
+
501
505
  //#endregion
502
506
  //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js
503
507
  /** Used as references for various `Number` constants. */
504
- var INFINITY = Infinity;
508
+ var INFINITY = 1 / 0;
505
509
  /** Used to convert symbols to primitives and strings. */
506
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
510
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0;
511
+ var symbolToString = symbolProto ? symbolProto.toString : void 0;
507
512
  /**
508
513
  * The base implementation of `_.toString` which doesn't convert nullish
509
514
  * values to empty strings.
@@ -576,12 +581,12 @@ function toLower(value) {
576
581
 
577
582
  //#endregion
578
583
  //#region node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/index.d.ts
579
- var EventType = [
584
+ var [EventType] = [
580
585
  60,
581
586
  () => [],
582
587
  []
583
588
  ];
584
- var Handler = [
589
+ var [Handler] = [
585
590
  61,
586
591
  (T) => [T],
587
592
  [
@@ -590,7 +595,7 @@ var Handler = [
590
595
  ""
591
596
  ]
592
597
  ];
593
- var WildcardHandler = [
598
+ var [WildcardHandler] = [
594
599
  62,
595
600
  (T) => [
596
601
  Record,
@@ -608,7 +613,7 @@ var WildcardHandler = [
608
613
  ""
609
614
  ]
610
615
  ];
611
- var EventHandlerList = [
616
+ var [EventHandlerList] = [
612
617
  63,
613
618
  (T) => [
614
619
  T,
@@ -622,7 +627,7 @@ var EventHandlerList = [
622
627
  ""
623
628
  ]
624
629
  ];
625
- var WildCardEventHandlerList = [
630
+ var [WildCardEventHandlerList] = [
626
631
  64,
627
632
  (T) => [
628
633
  Record,
@@ -638,7 +643,7 @@ var WildCardEventHandlerList = [
638
643
  ""
639
644
  ]
640
645
  ];
641
- var EventHandlerMap = [
646
+ var [EventHandlerMap] = [
642
647
  65,
643
648
  (Events) => [
644
649
  EventType,
@@ -664,7 +669,7 @@ var EventHandlerMap = [
664
669
  ""
665
670
  ]
666
671
  ];
667
- var Emitter = [
672
+ var [Emitter] = [
668
673
  66,
669
674
  (Key, Events) => [
670
675
  EventType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.39",
3
+ "version": "0.10.41",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -24,35 +24,35 @@
24
24
  "prepare": "husky"
25
25
  },
26
26
  "dependencies": {
27
- "x-error-lib": "^0.6.4"
27
+ "x-error-lib": "^0.6.5"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/js-cookie": "^3.0.6",
31
31
  "@types/lodash-es": "^4.17.12",
32
32
  "@types/node": "^26.0.0",
33
- "@vueuse/core": "^14.3.0",
33
+ "@vueuse/core": "^14.4.0",
34
34
  "husky": "^9.1.7",
35
35
  "js-cookie": "^3.0.8",
36
- "lint-staged": "^17.0.7",
36
+ "lint-staged": "^17.5.1",
37
37
  "lodash-es": "^4.18.1",
38
38
  "mitt": "^3.0.1",
39
- "oxfmt": "^0.55.0",
40
- "oxlint": "^1.70.0",
41
- "picomatch": "^4.0.5",
42
- "rolldown": "^1.1.2",
43
- "sass": "^1.101.0",
44
- "tsdown": "^0.22.3",
39
+ "oxfmt": "^0.67.0",
40
+ "oxlint": "^1.82.0",
41
+ "picomatch": "^4.0.7",
42
+ "rolldown": "^1.2.8",
43
+ "sass": "^1.104.0",
44
+ "tsdown": "^0.23.0",
45
45
  "typescript": "^6.0.3",
46
- "vite": "^8.0.16",
47
- "x-config-lib": "^0.1.5",
48
- "x-config-oxfmt": "^0.1.5",
49
- "x-config-oxlint": "^0.1.6"
46
+ "vite": "^8.3.0",
47
+ "x-config-lib": "^0.1.6",
48
+ "x-config-oxfmt": "^0.1.6",
49
+ "x-config-oxlint": "^0.1.7"
50
50
  },
51
51
  "peerDependencies": {
52
- "axios": "^1.18.0",
53
- "vue": "^3.5.38",
54
- "vue-i18n": "^11.4.6",
55
- "vue-router": "^5.1.0",
56
- "vuetify": "^4.1.2"
52
+ "axios": "^1.20.0",
53
+ "vue": "^3.5.42",
54
+ "vue-i18n": "^11.4.10",
55
+ "vue-router": "^5.3.1",
56
+ "vuetify": "^4.2.1"
57
57
  }
58
58
  }