@dxtmisha/functional 1.11.1 → 1.11.6
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/library.d.ts +38 -7
- package/dist/library.js +271 -244
- package/package.json +1 -1
package/dist/library.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ import { GeoItemFull } from '@dxtmisha/functional-basic';
|
|
|
31
31
|
import { IconsConfig } from '@dxtmisha/functional-basic';
|
|
32
32
|
import { ItemList } from '@dxtmisha/functional-basic';
|
|
33
33
|
import { ItemValue } from '@dxtmisha/functional-basic';
|
|
34
|
-
import { Meta } from '@dxtmisha/functional-basic';
|
|
35
34
|
import { MetaRobots } from '@dxtmisha/functional-basic';
|
|
35
|
+
import { MetaStatic } from '@dxtmisha/functional-basic';
|
|
36
36
|
import { NumberOrString } from '@dxtmisha/functional-basic';
|
|
37
37
|
import { NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
38
38
|
import { NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
@@ -132,11 +132,12 @@ declare type BroadcastValueItem<T> = T | string | undefined;
|
|
|
132
132
|
* Создаёт вычисляемое свойство, которое может обрабатывать асинхронные геттеры.
|
|
133
133
|
* @param getter Asynchronous function, synchronous function, or direct value to compute the result/
|
|
134
134
|
* Асинхронная функция, синхронная функция или прямое значение для вычисления результата
|
|
135
|
+
* @param initialState initial value of result/ начальное значение результата
|
|
135
136
|
* @param ignore values to be ignored/ значения для исключения из обработки
|
|
136
137
|
* @param debugOptions Used for debugging reactive computations. Supported by Vue.js library/
|
|
137
138
|
* Используется для отладки реактивных вычислений. Поддерживается библиотекой Vue.js
|
|
138
139
|
*/
|
|
139
|
-
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
140
|
+
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, initialState?: (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
140
141
|
|
|
141
142
|
/**
|
|
142
143
|
* Метод `computedByLanguage` предоставляет возможность создания реактивного свойства `computed`,
|
|
@@ -164,8 +165,9 @@ export declare function computedByLanguage<T, R extends (T | undefined) = T | un
|
|
|
164
165
|
*
|
|
165
166
|
* @param getter A function that returns the value to be computed/
|
|
166
167
|
* Функция, которая возвращает вычисляемое значение
|
|
168
|
+
* @param initialState initial value of result/ начальное значение результата
|
|
167
169
|
*/
|
|
168
|
-
export declare function computedEternity<T>(getter: () => Promise<T> | T): Ref<T, T>;
|
|
170
|
+
export declare function computedEternity<T>(getter: () => Promise<T> | T, initialState?: (() => T) | T): Ref<T, T>;
|
|
169
171
|
|
|
170
172
|
/**
|
|
171
173
|
* Constructor bind type for component binding with class and style support/
|
|
@@ -1478,6 +1480,14 @@ export declare function getClassName<T extends ItemList>(props?: T): string | un
|
|
|
1478
1480
|
*/
|
|
1479
1481
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
1480
1482
|
|
|
1483
|
+
/**
|
|
1484
|
+
* Get injected value by name.
|
|
1485
|
+
*
|
|
1486
|
+
* Получение внедренного значения по имени.
|
|
1487
|
+
* @param name Key name / Имя ключа
|
|
1488
|
+
*/
|
|
1489
|
+
export declare function getInject<T>(name: string): T | undefined;
|
|
1490
|
+
|
|
1481
1491
|
/**
|
|
1482
1492
|
* Get request options.
|
|
1483
1493
|
*
|
|
@@ -2136,6 +2146,21 @@ export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
|
2136
2146
|
/** Utility type to convert union types to intersection types/ Утилитарный тип для преобразования объединенных типов в пересеченные */
|
|
2137
2147
|
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
2138
2148
|
|
|
2149
|
+
/**
|
|
2150
|
+
* Executes a request and immediately initializes it asynchronously.
|
|
2151
|
+
*
|
|
2152
|
+
* Выполняет запрос и сразу инициализирует его асинхронно.
|
|
2153
|
+
* @param path path to request / путь к запросу
|
|
2154
|
+
* @param options data for the request / данные для запроса
|
|
2155
|
+
* @param reactivity should reactivity be enabled / включить ли reactivity
|
|
2156
|
+
* @param conditions conditions for executing the request / условия выполнения запроса
|
|
2157
|
+
* @param transformation transforms the received request / преобразовывает полученный запрос
|
|
2158
|
+
* @param validateResponseContract function to validate response data contract / функция для проверки контракта данных ответа
|
|
2159
|
+
* @param unmounted delete data from the cache / удалить ли данные из кеша
|
|
2160
|
+
* @param apiInstance Api instance / Экземпляр Api
|
|
2161
|
+
*/
|
|
2162
|
+
export declare function useApiAsyncRef<R, T = R>(path?: RefOrNormal<string | undefined>, options?: ApiOptions, reactivity?: boolean, conditions?: RefType<boolean>, transformation?: (data: T, isResponseContractValid?: ApiDataValidation) => ApiData<R>, validateResponseContract?: (data: T) => ApiDataValidation, unmounted?: boolean, apiInstance?: ApiInstance): UseApiRef<R>;
|
|
2163
|
+
|
|
2139
2164
|
/**
|
|
2140
2165
|
* Use API delete request.
|
|
2141
2166
|
*
|
|
@@ -2396,6 +2421,12 @@ export declare interface UseApiRef<R> {
|
|
|
2396
2421
|
* Ручная инициализация
|
|
2397
2422
|
*/
|
|
2398
2423
|
init(): void;
|
|
2424
|
+
/**
|
|
2425
|
+
* SSR initialization
|
|
2426
|
+
*
|
|
2427
|
+
* Инициализация SSR
|
|
2428
|
+
*/
|
|
2429
|
+
initSsr(): void;
|
|
2399
2430
|
/**
|
|
2400
2431
|
* Default reset.
|
|
2401
2432
|
*
|
|
@@ -2578,7 +2609,7 @@ export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
|
2578
2609
|
* Использует паттерн singleton - все компоненты используют одно состояние мета-тегов.
|
|
2579
2610
|
*/
|
|
2580
2611
|
export declare const useMeta: () => Readonly<{
|
|
2581
|
-
meta:
|
|
2612
|
+
meta: typeof MetaStatic;
|
|
2582
2613
|
/** Reactive page title (without suffix) / Реактивный заголовок страницы (без суффикса) */
|
|
2583
2614
|
title: Ref<string, string>;
|
|
2584
2615
|
/** Reactive keywords meta tag / Реактивный мета-тег keywords */
|
|
@@ -2607,10 +2638,10 @@ export declare const useMeta: () => Readonly<{
|
|
|
2607
2638
|
* Устанавливает суффикс для заголовка страницы.
|
|
2608
2639
|
* @param suffix Suffix to set / Суффикс для установки
|
|
2609
2640
|
*/
|
|
2610
|
-
setSuffix: (suffix: string) =>
|
|
2641
|
+
setSuffix: (suffix: string) => typeof MetaStatic;
|
|
2611
2642
|
} & {
|
|
2612
2643
|
init(): Readonly<{
|
|
2613
|
-
meta:
|
|
2644
|
+
meta: typeof MetaStatic;
|
|
2614
2645
|
/** Reactive page title (without suffix) / Реактивный заголовок страницы (без суффикса) */
|
|
2615
2646
|
title: Ref<string, string>;
|
|
2616
2647
|
/** Reactive keywords meta tag / Реактивный мета-тег keywords */
|
|
@@ -2639,7 +2670,7 @@ export declare const useMeta: () => Readonly<{
|
|
|
2639
2670
|
* Устанавливает суффикс для заголовка страницы.
|
|
2640
2671
|
* @param suffix Suffix to set / Суффикс для установки
|
|
2641
2672
|
*/
|
|
2642
|
-
setSuffix: (suffix: string) =>
|
|
2673
|
+
setSuffix: (suffix: string) => typeof MetaStatic;
|
|
2643
2674
|
}>;
|
|
2644
2675
|
destroyExecute?(): void;
|
|
2645
2676
|
}>;
|
package/dist/library.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { Api as e, ApiMethodItem as t, BroadcastMessage as n, Cookie as r, DataStorage as i, Datetime as a, ErrorCenter as o, EventItem as s, Formatters as c, Geo as l, GeoFlag as u, GeoIntl as d, Hash as f, Icons as p, Loading as m,
|
|
2
|
-
import { computed as M, customRef as oe, effectScope as se, getCurrentInstance as ce, h as le,
|
|
1
|
+
import { Api as e, ApiMethodItem as t, BroadcastMessage as n, Cookie as r, DataStorage as i, Datetime as a, ErrorCenter as o, EventItem as s, Formatters as c, Geo as l, GeoFlag as u, GeoIntl as d, Hash as f, Icons as p, Loading as m, MetaStatic as h, ScrollbarWidth as g, SearchList as _, ServerStorage as v, Translate as y, executeFunction as b, executePromise as x, forEach as S, getColumn as C, getElementId as w, getExp as T, isApiSuccess as ee, isArray as te, isDomRuntime as E, isFunction as ne, isObject as D, isObjectNotArray as O, isSelected as k, isString as A, random as re, toArray as j, toCamelCase as ie, toDate as ae } from "@dxtmisha/functional-basic";
|
|
2
|
+
import { computed as M, customRef as oe, effectScope as se, getCurrentInstance as ce, h as le, hasInjectionContext as ue, inject as de, isRef as N, onServerPrefetch as fe, onUnmounted as pe, provide as me, ref as P, shallowRef as F, toRefs as he, triggerRef as ge, useAttrs as _e, useSlots as ve, watch as I, watchEffect as ye } from "vue";
|
|
3
3
|
export * from "@dxtmisha/functional-basic";
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region \0@oxc-project+runtime@0.
|
|
6
|
-
function
|
|
5
|
+
//#region \0@oxc-project+runtime@0.126.0/helpers/typeof.js
|
|
6
|
+
function L(e) {
|
|
7
7
|
"@babel/helpers - typeof";
|
|
8
|
-
return
|
|
8
|
+
return L = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
9
9
|
return typeof e;
|
|
10
10
|
} : function(e) {
|
|
11
11
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
12
|
-
},
|
|
12
|
+
}, L(e);
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
//#region \0@oxc-project+runtime@0.
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
15
|
+
//#region \0@oxc-project+runtime@0.126.0/helpers/toPrimitive.js
|
|
16
|
+
function be(e, t) {
|
|
17
|
+
if (L(e) != "object" || !e) return e;
|
|
18
18
|
var n = e[Symbol.toPrimitive];
|
|
19
19
|
if (n !== void 0) {
|
|
20
20
|
var r = n.call(e, t || "default");
|
|
21
|
-
if (
|
|
21
|
+
if (L(r) != "object") return r;
|
|
22
22
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
23
23
|
}
|
|
24
24
|
return (t === "string" ? String : Number)(e);
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region \0@oxc-project+runtime@0.
|
|
28
|
-
function
|
|
29
|
-
var t =
|
|
30
|
-
return
|
|
27
|
+
//#region \0@oxc-project+runtime@0.126.0/helpers/toPropertyKey.js
|
|
28
|
+
function xe(e) {
|
|
29
|
+
var t = be(e, "string");
|
|
30
|
+
return L(t) == "symbol" ? t : t + "";
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region \0@oxc-project+runtime@0.
|
|
34
|
-
function
|
|
35
|
-
return (t =
|
|
33
|
+
//#region \0@oxc-project+runtime@0.126.0/helpers/defineProperty.js
|
|
34
|
+
function R(e, t, n) {
|
|
35
|
+
return (t = xe(t)) in e ? Object.defineProperty(e, t, {
|
|
36
36
|
value: n,
|
|
37
37
|
enumerable: !0,
|
|
38
38
|
configurable: !0,
|
|
@@ -41,9 +41,9 @@ function z(e, t, n) {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/classes/design/DesignChanged.ts
|
|
44
|
-
var
|
|
44
|
+
var Se = class {
|
|
45
45
|
constructor(e, t = Object.keys(e)) {
|
|
46
|
-
|
|
46
|
+
R(this, "cache", {}), this.props = e, this.watch = t;
|
|
47
47
|
}
|
|
48
48
|
is(e) {
|
|
49
49
|
return te(e) ? !!e.find((e) => this.isDifferent(e)) : this.isDifferent(e);
|
|
@@ -62,9 +62,9 @@ var ye = class {
|
|
|
62
62
|
var t, n;
|
|
63
63
|
return ((t = this.cache) == null ? void 0 : t[e]) !== ((n = this.props) == null ? void 0 : n[e]);
|
|
64
64
|
}
|
|
65
|
-
},
|
|
65
|
+
}, Ce = class {
|
|
66
66
|
constructor(e, t, n) {
|
|
67
|
-
|
|
67
|
+
R(this, "event", {}), R(this, "changed", void 0), this.props = e, this.callback = t, this.changed = new Se(e, n);
|
|
68
68
|
}
|
|
69
69
|
make(e) {
|
|
70
70
|
return this.makeCallback(e), this;
|
|
@@ -81,7 +81,7 @@ var ye = class {
|
|
|
81
81
|
makeCallbackItem() {
|
|
82
82
|
this.callback && this.callback(this.event);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, we = class extends Ce {
|
|
85
85
|
make(e) {
|
|
86
86
|
return this.makeCallback(e).then(), this;
|
|
87
87
|
}
|
|
@@ -91,32 +91,32 @@ var ye = class {
|
|
|
91
91
|
};
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/functions/ref/getRef.ts
|
|
94
|
-
function
|
|
94
|
+
function z(e) {
|
|
95
95
|
return N(e) ? e.value : e;
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/functions/render/getClassName.ts
|
|
99
|
-
function
|
|
99
|
+
function Te(e) {
|
|
100
100
|
return e && "class" in e && typeof e.class == "string" ? e.class : void 0;
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region src/functions/render/getIndexForRender.ts
|
|
104
|
-
function
|
|
105
|
-
let r = t == null ? void 0 : t.id, i = t == null ? void 0 : t.index, a =
|
|
104
|
+
function Ee(e, t, n) {
|
|
105
|
+
let r = t == null ? void 0 : t.id, i = t == null ? void 0 : t.index, a = Te(t), o = "";
|
|
106
106
|
if (A(e) && (o += e), n && (o += `.${n}`), i && A(i) && (o += `.${i}`), a && (o += `.${a}`), r && (o += `.${r}`), o !== "") return o;
|
|
107
107
|
}
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/functions/ref/render.ts
|
|
110
|
-
function
|
|
110
|
+
function De(e, t, n, r) {
|
|
111
111
|
let i = t, a = t && "key" in t;
|
|
112
112
|
return (!t || !a) && (i = {
|
|
113
113
|
...t,
|
|
114
|
-
key:
|
|
114
|
+
key: Ee(e, t, r)
|
|
115
115
|
}), le(e, i, n);
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/functions/toBind.ts
|
|
119
|
-
function
|
|
119
|
+
function B(e, t) {
|
|
120
120
|
let n = e == null ? void 0 : e.class, r = t == null ? void 0 : t.class, i = e == null ? void 0 : e.style, a = t == null ? void 0 : t.style, o = {
|
|
121
121
|
...e,
|
|
122
122
|
...t
|
|
@@ -125,17 +125,17 @@ function H(e, t) {
|
|
|
125
125
|
}
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/functions/toBinds.ts
|
|
128
|
-
function
|
|
128
|
+
function Oe(...e) {
|
|
129
129
|
let t = {};
|
|
130
130
|
return e.forEach((e) => {
|
|
131
|
-
e && (t =
|
|
131
|
+
e && (t = B(t, e));
|
|
132
132
|
}), t;
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/classes/design/DesignComponents.ts
|
|
136
|
-
var
|
|
136
|
+
var V = class {
|
|
137
137
|
constructor(e = {}, t) {
|
|
138
|
-
|
|
138
|
+
R(this, "caching", {}), this.components = e, this.modification = t;
|
|
139
139
|
}
|
|
140
140
|
is(e) {
|
|
141
141
|
return e in this.components;
|
|
@@ -148,7 +148,7 @@ var U = class {
|
|
|
148
148
|
if (e) {
|
|
149
149
|
e in this.caching || (this.caching[e] = M(() => this.computeModification(e)));
|
|
150
150
|
let n = this.caching[e];
|
|
151
|
-
if (n) return t ?
|
|
151
|
+
if (n) return t ? Oe(n.value, t) : n.value;
|
|
152
152
|
}
|
|
153
153
|
return t;
|
|
154
154
|
}
|
|
@@ -159,7 +159,7 @@ var U = class {
|
|
|
159
159
|
renderOne(e, t, n, r) {
|
|
160
160
|
if (this.is(e)) {
|
|
161
161
|
let i = r == null ? e : r;
|
|
162
|
-
return
|
|
162
|
+
return De(this.get(e), this.getModification(i, t), n, i);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
renderAdd(e, t, n, r, i) {
|
|
@@ -167,18 +167,18 @@ var U = class {
|
|
|
167
167
|
}
|
|
168
168
|
computeModification(e) {
|
|
169
169
|
var t;
|
|
170
|
-
let n =
|
|
170
|
+
let n = z((t = this.modification) == null ? void 0 : t[e]);
|
|
171
171
|
if (n && O(n)) {
|
|
172
172
|
let e = {};
|
|
173
173
|
return S(n, (t, n) => {
|
|
174
|
-
e[n] =
|
|
174
|
+
e[n] = z(t);
|
|
175
175
|
}), e;
|
|
176
176
|
}
|
|
177
177
|
return {};
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, ke = class extends V {}, Ae = class {
|
|
180
180
|
constructor(e, t, n) {
|
|
181
|
-
|
|
181
|
+
R(this, "name", void 0), R(this, "element", P()), R(this, "refs", void 0), R(this, "components", void 0), R(this, "emits", void 0), R(this, "classes", void 0), R(this, "classesSub", void 0), R(this, "styles", void 0), R(this, "stylesSub", void 0), R(this, "attrs", void 0), R(this, "slots", void 0), R(this, "dataExpose", void 0), this.props = t, this.options = n, this.name = this.initName(e), this.refs = this.props ? he(this.props) : {}, this.components = new V(n == null ? void 0 : n.components, n == null ? void 0 : n.compMod), this.emits = n == null ? void 0 : n.emits, this.classes = M(() => this.updateClasses()), this.styles = M(() => this.updateStyles()), this.attrs = _e(), this.slots = ve();
|
|
182
182
|
}
|
|
183
183
|
init() {
|
|
184
184
|
return this.classesSub = M(() => this.initClasses()), this.stylesSub = M(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
|
|
@@ -263,18 +263,18 @@ var U = class {
|
|
|
263
263
|
};
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/functions/ref/toRefItem.ts
|
|
266
|
-
function
|
|
266
|
+
function H(e) {
|
|
267
267
|
return N(e) ? e : P(e);
|
|
268
268
|
}
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/classes/ref/DatetimeRef.ts
|
|
271
|
-
var
|
|
271
|
+
var je = class {
|
|
272
272
|
constructor(e, t = "date", n = l.getLocation()) {
|
|
273
|
-
|
|
273
|
+
R(this, "item", void 0), R(this, "type", void 0), R(this, "code", void 0), R(this, "date", void 0), R(this, "datetime", void 0), R(this, "year", P(2e3)), R(this, "month", P(1)), R(this, "day", P(1)), R(this, "hour", P(1)), R(this, "minute", P(1)), R(this, "second", P(1)), this.item = H(e), this.type = H(t), this.code = H(n), this.date = P(ae(this.item.value)), this.datetime = new a(this.date.value, this.type.value, this.code.value), I(this.item, (e) => {
|
|
274
274
|
this.date.value = ae(e);
|
|
275
275
|
}), I(this.type, (e) => this.datetime.setType(e)), I(this.code, (e) => this.datetime.setCode(e)), I(this.date, (e) => {
|
|
276
276
|
this.datetime.setDate(e), this.updateDate();
|
|
277
|
-
}), this.datetime.setWatch(() =>
|
|
277
|
+
}), this.datetime.setWatch(() => ge(this.date)), this.updateDate();
|
|
278
278
|
}
|
|
279
279
|
getItem() {
|
|
280
280
|
return this.item;
|
|
@@ -321,21 +321,21 @@ var De = class {
|
|
|
321
321
|
updateDate() {
|
|
322
322
|
return this.year.value = this.datetime.getYear(), this.month.value = this.datetime.getMonth(), this.day.value = this.datetime.getDay(), this.hour.value = this.datetime.getHour(), this.minute.value = this.datetime.getMinute(), this.second.value = this.datetime.getSecond(), this;
|
|
323
323
|
}
|
|
324
|
-
},
|
|
324
|
+
}, U = class {
|
|
325
325
|
static run(e) {
|
|
326
326
|
return this.getScope().run(e);
|
|
327
327
|
}
|
|
328
328
|
static getScope() {
|
|
329
329
|
return v.get("__ui:effect-scope-global__", () => se(!0));
|
|
330
330
|
}
|
|
331
|
-
},
|
|
331
|
+
}, Me = class extends s {
|
|
332
332
|
constructor(e, t, n = ["click"], r, i, a) {
|
|
333
|
-
let o =
|
|
333
|
+
let o = H(e), s = H(t);
|
|
334
334
|
super(o.value, n, r, i, a), s.value && this.setElementControl(s.value), I(o, (e) => this.setElement(e)), I(s, (e) => this.setElementControl(e));
|
|
335
335
|
}
|
|
336
|
-
},
|
|
336
|
+
}, Ne = class {
|
|
337
337
|
constructor(e = l.getLocation()) {
|
|
338
|
-
|
|
338
|
+
R(this, "code", void 0), R(this, "flag", void 0), this.code = H(e), this.flag = new u(this.code.value), I(this.code, (e) => this.flag.setCode(e));
|
|
339
339
|
}
|
|
340
340
|
getCode() {
|
|
341
341
|
return this.code;
|
|
@@ -355,7 +355,7 @@ var De = class {
|
|
|
355
355
|
getNational(e) {
|
|
356
356
|
return M(() => this.flag.getNational(e));
|
|
357
357
|
}
|
|
358
|
-
},
|
|
358
|
+
}, W, G = class {
|
|
359
359
|
static get() {
|
|
360
360
|
return v.get("__ui:geo-ref__", () => F(l.getItem()));
|
|
361
361
|
}
|
|
@@ -375,85 +375,85 @@ var De = class {
|
|
|
375
375
|
l.set(e, !0), this.get().value = l.getItem();
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
|
-
|
|
378
|
+
W = G, R(G, "country", M(() => W.get().value.country)), R(G, "language", M(() => W.get().value.language)), R(G, "standard", M(() => W.get().value.standard)), R(G, "firstDay", M(() => W.get().value.firstDay));
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region src/classes/ref/GeoIntlRef.ts
|
|
381
|
-
var
|
|
381
|
+
var Pe = class {
|
|
382
382
|
constructor(e) {
|
|
383
|
-
|
|
383
|
+
R(this, "location", void 0), R(this, "intl", void 0), this.location = H(e), this.intl = M(() => {
|
|
384
384
|
var e;
|
|
385
|
-
return new d((e = this.location.value) == null ?
|
|
385
|
+
return new d((e = this.location.value) == null ? G.getLanguage().value : e);
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
display(e, t) {
|
|
389
|
-
return M(() => this.intl.value.display(
|
|
389
|
+
return M(() => this.intl.value.display(z(e), t));
|
|
390
390
|
}
|
|
391
391
|
languageName(e, t) {
|
|
392
|
-
return M(() => this.intl.value.languageName(
|
|
392
|
+
return M(() => this.intl.value.languageName(z(e), t));
|
|
393
393
|
}
|
|
394
394
|
countryName(e, t) {
|
|
395
|
-
return M(() => this.intl.value.countryName(
|
|
395
|
+
return M(() => this.intl.value.countryName(z(e), t));
|
|
396
396
|
}
|
|
397
397
|
number(e, t) {
|
|
398
|
-
return M(() => this.intl.value.number(
|
|
398
|
+
return M(() => this.intl.value.number(z(e), t));
|
|
399
399
|
}
|
|
400
400
|
decimal() {
|
|
401
401
|
return M(() => this.intl.value.decimal());
|
|
402
402
|
}
|
|
403
403
|
currency(e, t, n = !1) {
|
|
404
|
-
return M(() => this.intl.value.currency(
|
|
404
|
+
return M(() => this.intl.value.currency(z(e), z(t), n));
|
|
405
405
|
}
|
|
406
406
|
currencySymbol(e, t = "symbol") {
|
|
407
|
-
return M(() => this.intl.value.currencySymbol(
|
|
407
|
+
return M(() => this.intl.value.currencySymbol(z(e), t));
|
|
408
408
|
}
|
|
409
409
|
unit(e, t) {
|
|
410
|
-
return M(() => this.intl.value.unit(
|
|
410
|
+
return M(() => this.intl.value.unit(z(e), t));
|
|
411
411
|
}
|
|
412
412
|
sizeFile(e, t = "byte") {
|
|
413
|
-
return M(() => this.intl.value.sizeFile(
|
|
413
|
+
return M(() => this.intl.value.sizeFile(z(e), t));
|
|
414
414
|
}
|
|
415
415
|
percent(e, t) {
|
|
416
|
-
return M(() => this.intl.value.percent(
|
|
416
|
+
return M(() => this.intl.value.percent(z(e), t));
|
|
417
417
|
}
|
|
418
418
|
percentBy100(e, t) {
|
|
419
|
-
return M(() => this.intl.value.percentBy100(
|
|
419
|
+
return M(() => this.intl.value.percentBy100(z(e), t));
|
|
420
420
|
}
|
|
421
421
|
plural(e, t, n, r) {
|
|
422
|
-
return M(() => this.intl.value.plural(
|
|
422
|
+
return M(() => this.intl.value.plural(z(e), t, n, r));
|
|
423
423
|
}
|
|
424
424
|
date(e, t, n, r) {
|
|
425
|
-
return M(() => this.intl.value.date(
|
|
425
|
+
return M(() => this.intl.value.date(z(e), t, n, r));
|
|
426
426
|
}
|
|
427
427
|
relative(e, t, n) {
|
|
428
|
-
return M(() => this.intl.value.relative(
|
|
428
|
+
return M(() => this.intl.value.relative(z(e), t, n));
|
|
429
429
|
}
|
|
430
430
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
431
|
-
return M(() => this.intl.value.relativeLimit(
|
|
431
|
+
return M(() => this.intl.value.relativeLimit(z(e), t, n, r, i, a, o));
|
|
432
432
|
}
|
|
433
433
|
relativeByValue(e, t, n) {
|
|
434
|
-
return M(() => this.intl.value.relativeByValue(
|
|
434
|
+
return M(() => this.intl.value.relativeByValue(z(e), t, n));
|
|
435
435
|
}
|
|
436
436
|
month(e, t) {
|
|
437
|
-
return M(() => this.intl.value.month(
|
|
437
|
+
return M(() => this.intl.value.month(z(e), t));
|
|
438
438
|
}
|
|
439
439
|
months(e) {
|
|
440
440
|
return M(() => this.intl.value.months(e));
|
|
441
441
|
}
|
|
442
442
|
weekday(e, t) {
|
|
443
|
-
return M(() => this.intl.value.weekday(
|
|
443
|
+
return M(() => this.intl.value.weekday(z(e), t));
|
|
444
444
|
}
|
|
445
445
|
weekdays(e) {
|
|
446
446
|
return M(() => this.intl.value.weekdays(e));
|
|
447
447
|
}
|
|
448
448
|
time(e) {
|
|
449
|
-
return M(() => this.intl.value.time(
|
|
449
|
+
return M(() => this.intl.value.time(z(e)));
|
|
450
450
|
}
|
|
451
451
|
sort(e, t = (e, t) => [e, t]) {
|
|
452
|
-
return M(() => this.intl.value.sort([...
|
|
452
|
+
return M(() => this.intl.value.sort([...z(e)], t));
|
|
453
453
|
}
|
|
454
|
-
},
|
|
454
|
+
}, Fe = class e {
|
|
455
455
|
constructor(e, t, n, r, i, a, o, s, c, l = 0, u = 9999999, d) {
|
|
456
|
-
|
|
456
|
+
R(this, "subList", {}), R(this, "data", M(() => S(z(this.list) || [], (e, t) => this.initItem(t, e)))), R(this, "liteData", M(() => {
|
|
457
457
|
if (this.isLite()) {
|
|
458
458
|
let e = [];
|
|
459
459
|
for (let t of this.data.value) {
|
|
@@ -470,7 +470,7 @@ var Ae = class {
|
|
|
470
470
|
return e;
|
|
471
471
|
}
|
|
472
472
|
return this.data.value;
|
|
473
|
-
})),
|
|
473
|
+
})), R(this, "fullData", M(() => {
|
|
474
474
|
let e = this.getFocus(), t = this.getHighlight(), n = this.getSelected();
|
|
475
475
|
return S(this.data.value, (r) => {
|
|
476
476
|
var i, a;
|
|
@@ -484,7 +484,7 @@ var Ae = class {
|
|
|
484
484
|
disabled: (a = r.disabled) == null ? !o && r.type === "item" && this.isSelectedMax.value : a
|
|
485
485
|
};
|
|
486
486
|
});
|
|
487
|
-
})),
|
|
487
|
+
})), R(this, "map", M(() => {
|
|
488
488
|
let e = [];
|
|
489
489
|
return this.data.value.forEach((t) => {
|
|
490
490
|
switch (t.type) {
|
|
@@ -497,7 +497,7 @@ var Ae = class {
|
|
|
497
497
|
break;
|
|
498
498
|
}
|
|
499
499
|
}), e;
|
|
500
|
-
})),
|
|
500
|
+
})), R(this, "mapItems", M(() => this.map.value.filter((e) => e.type === "item"))), R(this, "items", M(() => this.map.value.filter((e) => e.type === "item" || e.type === "group" || e.type === "menu"))), R(this, "highlightFirstItem", M(() => {
|
|
501
501
|
let e = this.getHighlight();
|
|
502
502
|
if (e && e.length >= this.getHighlightLengthStart()) {
|
|
503
503
|
let t = T(e, "i");
|
|
@@ -507,22 +507,22 @@ var Ae = class {
|
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
return -1;
|
|
510
|
-
})),
|
|
510
|
+
})), R(this, "isSelected", M(() => {
|
|
511
511
|
let e = this.getSelected();
|
|
512
512
|
return !!e && this.mapItems.value.findIndex((t) => k(t.index, e)) !== -1;
|
|
513
|
-
})),
|
|
514
|
-
let e = Number(
|
|
513
|
+
})), R(this, "isSelectedMin", M(() => {
|
|
514
|
+
let e = Number(z(this.min) || 0);
|
|
515
515
|
return e > 0 ? this.selectedListInGroup.value.length >= e : !1;
|
|
516
|
-
})),
|
|
517
|
-
let e = Number(
|
|
516
|
+
})), R(this, "isSelectedMax", M(() => {
|
|
517
|
+
let e = Number(z(this.max) || 9999999);
|
|
518
518
|
return e > 0 ? this.selectedListInGroup.value.length >= e : !1;
|
|
519
|
-
})),
|
|
519
|
+
})), R(this, "selectedList", M(() => {
|
|
520
520
|
let e = this.getSelected();
|
|
521
521
|
return e && this.isSelected.value ? this.mapItems.value.filter((t) => k(t.index, e)) : [];
|
|
522
|
-
})),
|
|
522
|
+
})), R(this, "selectedListInGroup", M(() => {
|
|
523
523
|
let e = this.getSelected();
|
|
524
524
|
return e && this.isSelected.value ? this.data.value.filter((t) => k(t.index, e)) : [];
|
|
525
|
-
})),
|
|
525
|
+
})), R(this, "selectedNames", M(() => C(this.selectedList.value, "label"))), R(this, "selectedValues", M(() => C(this.selectedList.value, "value"))), this.list = e, this.focus = t, this.highlight = n, this.highlightLengthStart = r, this.filterMode = i, this.selected = a, this.keyValue = o, this.keyLabel = s, this.lite = c, this.min = l, this.max = u, this.parent = d, N(e) && I(e, () => {
|
|
526
526
|
this.subList = {};
|
|
527
527
|
});
|
|
528
528
|
}
|
|
@@ -656,9 +656,9 @@ var Ae = class {
|
|
|
656
656
|
value: e
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
},
|
|
659
|
+
}, K = "__ui:router-item-ref__", q = class {
|
|
660
660
|
static get() {
|
|
661
|
-
return v.get(
|
|
661
|
+
return v.get(K);
|
|
662
662
|
}
|
|
663
663
|
static getLink(e, t, n) {
|
|
664
664
|
var r;
|
|
@@ -680,7 +680,7 @@ var Ae = class {
|
|
|
680
680
|
t && t.push(e).then();
|
|
681
681
|
}
|
|
682
682
|
static set(e) {
|
|
683
|
-
v.set(
|
|
683
|
+
v.set(K, () => e);
|
|
684
684
|
}
|
|
685
685
|
static setOneTime(e) {
|
|
686
686
|
this.get() || this.set(e);
|
|
@@ -688,96 +688,72 @@ var Ae = class {
|
|
|
688
688
|
static rawToHref(e) {
|
|
689
689
|
return O(e) && "name" in e && A(e == null ? void 0 : e.name) ? this.getHref(e.name) : {};
|
|
690
690
|
}
|
|
691
|
-
},
|
|
691
|
+
}, Ie = class {
|
|
692
692
|
constructor() {
|
|
693
|
-
|
|
693
|
+
R(this, "item", P()), R(this, "width", P(0)), R(this, "is", M(() => this.item.value !== void 0)), E() && (g.is().then((e) => {
|
|
694
694
|
this.item.value = e;
|
|
695
695
|
}), g.get().then((e) => {
|
|
696
696
|
this.width.value = e;
|
|
697
697
|
}));
|
|
698
698
|
}
|
|
699
|
-
},
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
path: B(n),
|
|
712
|
-
method: r,
|
|
713
|
-
request: e,
|
|
714
|
-
toData: o,
|
|
715
|
-
...u.value
|
|
716
|
-
}), t && (a && (t = a(t)), i)) {
|
|
717
|
-
let e = i(t);
|
|
718
|
-
e instanceof Promise && await e;
|
|
719
|
-
}
|
|
720
|
-
} catch (e) {
|
|
721
|
-
t = void 0;
|
|
722
|
-
}
|
|
723
|
-
return l.value = !1, t;
|
|
699
|
+
}, J = (e) => typeof e == "string" ? { method: e } : e || {}, Y;
|
|
700
|
+
function X(t, n, r = !0, i, a, o, s = !0, c = e.getItem()) {
|
|
701
|
+
let l = P(), u = H(J(n)), d = P(!1), f = P(!1), p = P(), m, h = !0, g, _ = () => {
|
|
702
|
+
let e = z(t);
|
|
703
|
+
return !!((!i || i.value) && e);
|
|
704
|
+
}, v = () => ({
|
|
705
|
+
path: z(t),
|
|
706
|
+
...u.value
|
|
707
|
+
}), y = () => {
|
|
708
|
+
if (E() && _()) {
|
|
709
|
+
let e = c.getResponse().emulatorAsync(v());
|
|
710
|
+
e && (l.value = e);
|
|
724
711
|
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
//#endregion
|
|
728
|
-
//#region src/composables/ref/useApiDelete.ts
|
|
729
|
-
function Pe(e, n, r, i = !0, a, o) {
|
|
730
|
-
return X(e, t.delete, n, r, i, a, o);
|
|
731
|
-
}
|
|
732
|
-
//#endregion
|
|
733
|
-
//#region src/composables/ref/useApiGet.ts
|
|
734
|
-
function Fe(e, n, r, i = !0, a, o) {
|
|
735
|
-
return X(e, t.get, n, r, i, a, o);
|
|
736
|
-
}
|
|
737
|
-
//#endregion
|
|
738
|
-
//#region src/composables/ref/useApiRef.ts
|
|
739
|
-
var Z;
|
|
740
|
-
function Ie(t, n, r = !0, i, a, o, s = !0, c = e.getItem()) {
|
|
741
|
-
let l = P(), u = W(Y(n)), d = P(!1), f = P(!1), p = P(), m, h = !0, g, _ = async () => {
|
|
742
|
-
if (h) return;
|
|
743
|
-
m && m.abort(), m = u.value.controller || new AbortController();
|
|
744
|
-
let e = B(t);
|
|
745
|
-
if ((!i || i.value) && e) {
|
|
712
|
+
}, b = async () => {
|
|
713
|
+
if (!h) if (m && m.abort(), m = u.value.controller || new AbortController(), _()) {
|
|
746
714
|
d.value = !0, f.value = !0;
|
|
747
715
|
try {
|
|
748
|
-
let
|
|
749
|
-
path: e,
|
|
716
|
+
let e = await c.request({
|
|
750
717
|
controller: m,
|
|
751
|
-
...
|
|
718
|
+
...v()
|
|
752
719
|
});
|
|
753
|
-
|
|
720
|
+
e && (p.value = o == null ? void 0 : o(e), a ? l.value = a(e, p.value) : l.value = e);
|
|
754
721
|
} catch (e) {
|
|
755
722
|
l.value = void 0;
|
|
756
723
|
}
|
|
757
724
|
d.value = !1;
|
|
758
725
|
} else l.value !== void 0 && (l.value = void 0);
|
|
759
|
-
},
|
|
726
|
+
}, x = () => {
|
|
760
727
|
g == null || g(), l.value = void 0, h = !0;
|
|
761
|
-
},
|
|
762
|
-
|
|
763
|
-
|
|
728
|
+
}, S = () => {
|
|
729
|
+
if (h) {
|
|
730
|
+
if (h = !1, !E()) return;
|
|
731
|
+
y(), l.value === void 0 && b().then(), s ? w() : U.run(() => w());
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
s && ce() && pe(() => x());
|
|
735
|
+
let C = () => {
|
|
736
|
+
E() || fe(async () => {
|
|
737
|
+
h = !1, await b();
|
|
738
|
+
});
|
|
739
|
+
}, w = () => {
|
|
764
740
|
let e = [];
|
|
765
|
-
r && e.push(u), N(t) && e.push(t), i && e.push(i),
|
|
766
|
-
d.value || await
|
|
741
|
+
r && e.push(u), N(t) && e.push(t), i && e.push(i), Y && e.push(Y), e.length > 0 && (g = I(e, async () => {
|
|
742
|
+
d.value || await b();
|
|
767
743
|
}));
|
|
768
|
-
},
|
|
744
|
+
}, T = M(() => (S(), l.value)), ee = M(() => Array.isArray(l.value) ? l.value.length : +!!l.value), te = M(() => l.value === void 0);
|
|
769
745
|
return {
|
|
770
|
-
data:
|
|
746
|
+
data: T,
|
|
771
747
|
get item() {
|
|
772
|
-
return
|
|
748
|
+
return S(), l;
|
|
773
749
|
},
|
|
774
750
|
isResponseContractValid: M(() => {
|
|
775
751
|
var e;
|
|
776
752
|
return ((e = p.value) == null ? void 0 : e.status) === "success";
|
|
777
753
|
}),
|
|
778
754
|
responseValidationResult: M(() => p.value),
|
|
779
|
-
length:
|
|
780
|
-
starting:
|
|
755
|
+
length: ee,
|
|
756
|
+
starting: te,
|
|
781
757
|
loading: d,
|
|
782
758
|
reading: f,
|
|
783
759
|
isStarting() {
|
|
@@ -792,28 +768,72 @@ function Ie(t, n, r = !0, i, a, o, s = !0, c = e.getItem()) {
|
|
|
792
768
|
getItem() {
|
|
793
769
|
return l.value;
|
|
794
770
|
},
|
|
795
|
-
init:
|
|
796
|
-
|
|
797
|
-
|
|
771
|
+
init: S,
|
|
772
|
+
initSsr: C,
|
|
773
|
+
reset: b,
|
|
774
|
+
stop: x,
|
|
798
775
|
abort: () => m == null ? void 0 : m.abort()
|
|
799
776
|
};
|
|
800
777
|
}
|
|
801
778
|
var Le = (e) => {
|
|
802
|
-
|
|
779
|
+
Y || (Y = e);
|
|
803
780
|
};
|
|
804
781
|
//#endregion
|
|
782
|
+
//#region src/composables/ref/useApiAsyncRef.ts
|
|
783
|
+
function Re(t, n, r = !0, i, a, o, s = !0, c = e.getItem()) {
|
|
784
|
+
let l = X(t, n, r, i, a, o, s, c);
|
|
785
|
+
return l.initSsr(), l;
|
|
786
|
+
}
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region src/composables/ref/useApiRequest.ts
|
|
789
|
+
function Z(n, r = t.post, i, a, o = !0, s, c = e.getItem()) {
|
|
790
|
+
let l = P(!1), u = H(J(s));
|
|
791
|
+
return {
|
|
792
|
+
loading: l,
|
|
793
|
+
async send(e) {
|
|
794
|
+
l.value = !0;
|
|
795
|
+
let t;
|
|
796
|
+
try {
|
|
797
|
+
if (t = await c.request({
|
|
798
|
+
path: z(n),
|
|
799
|
+
method: r,
|
|
800
|
+
request: e,
|
|
801
|
+
toData: o,
|
|
802
|
+
...u.value
|
|
803
|
+
}), t && (a && (t = a(t)), i)) {
|
|
804
|
+
let e = i(t);
|
|
805
|
+
e instanceof Promise && await e;
|
|
806
|
+
}
|
|
807
|
+
} catch (e) {
|
|
808
|
+
t = void 0;
|
|
809
|
+
}
|
|
810
|
+
return l.value = !1, t;
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
//#endregion
|
|
815
|
+
//#region src/composables/ref/useApiDelete.ts
|
|
816
|
+
function ze(e, n, r, i = !0, a, o) {
|
|
817
|
+
return Z(e, t.delete, n, r, i, a, o);
|
|
818
|
+
}
|
|
819
|
+
//#endregion
|
|
820
|
+
//#region src/composables/ref/useApiGet.ts
|
|
821
|
+
function Be(e, n, r, i = !0, a, o) {
|
|
822
|
+
return Z(e, t.get, n, r, i, a, o);
|
|
823
|
+
}
|
|
824
|
+
//#endregion
|
|
805
825
|
//#region src/composables/ref/useApiPost.ts
|
|
806
|
-
function
|
|
807
|
-
return
|
|
826
|
+
function Ve(e, n, r, i = !0, a, o) {
|
|
827
|
+
return Z(e, t.post, n, r, i, a, o);
|
|
808
828
|
}
|
|
809
829
|
//#endregion
|
|
810
830
|
//#region src/composables/ref/useApiPut.ts
|
|
811
|
-
function
|
|
812
|
-
return
|
|
831
|
+
function He(e, n, r, i = !0, a, o) {
|
|
832
|
+
return Z(e, t.put, n, r, i, a, o);
|
|
813
833
|
}
|
|
814
834
|
//#endregion
|
|
815
835
|
//#region src/composables/ref/useFormattersRef.ts
|
|
816
|
-
function
|
|
836
|
+
function Ue(e, t) {
|
|
817
837
|
let n = new c(t);
|
|
818
838
|
return {
|
|
819
839
|
listFormat: M(() => n.setList(e.value).to()),
|
|
@@ -822,7 +842,7 @@ function Be(e, t) {
|
|
|
822
842
|
}
|
|
823
843
|
//#endregion
|
|
824
844
|
//#region src/composables/ref/useSearchValueRef.ts
|
|
825
|
-
function
|
|
845
|
+
function We(e, t) {
|
|
826
846
|
let n = t == null ? P("") : t, r = P(n.value), i = P(!1), a;
|
|
827
847
|
return I(n, (t, o, s) => {
|
|
828
848
|
let c = e.getOptions().getDelay();
|
|
@@ -839,8 +859,8 @@ function Ve(e, t) {
|
|
|
839
859
|
}
|
|
840
860
|
//#endregion
|
|
841
861
|
//#region src/composables/ref/useSearchRef.ts
|
|
842
|
-
function
|
|
843
|
-
let i = new _(void 0, t, void 0, r), { search: a, searchDelay: o, loading: s } =
|
|
862
|
+
function Ge(e, t, n, r) {
|
|
863
|
+
let i = new _(void 0, t, void 0, r), { search: a, searchDelay: o, loading: s } = We(i, n), c = () => z(b(e)) || [], l = M(() => i.setValue(o.value).getItem().isSearch()), u = M(() => i.setList(c()).setValue(o.value).to());
|
|
844
864
|
return {
|
|
845
865
|
isSearch: l,
|
|
846
866
|
search: a,
|
|
@@ -851,9 +871,9 @@ function He(e, t, n, r) {
|
|
|
851
871
|
}
|
|
852
872
|
//#endregion
|
|
853
873
|
//#region src/composables/ref/useApiManagementRef.ts
|
|
854
|
-
function
|
|
855
|
-
let { path: c, options: l, reactivity: u, conditions: d, transformation: f, validateResponseContract: p, typeData: m, unmounted: h, skeleton: g } = e, _, v, y, b, S, C =
|
|
856
|
-
if (t && (_ =
|
|
874
|
+
function Ke(e, t, n, r, i, a, o, s) {
|
|
875
|
+
let { path: c, options: l, reactivity: u, conditions: d, transformation: f, validateResponseContract: p, typeData: m, unmounted: h, skeleton: g } = e, _, v, y, b, S, C = X(c, l, u, d, f, p, h, s), w = M(() => m === void 0 ? !0 : C.isStarting() ? !1 : ne(m) ? m(C.data.value) : C.data.value instanceof m), T = M(() => C.isStarting() && g ? g() : C.data.value);
|
|
876
|
+
if (t && (_ = Ue(T, t)), n && (v = Ge(M(() => {
|
|
857
877
|
var e;
|
|
858
878
|
let t = (e = _ == null ? void 0 : _.listFormat.value) == null ? C.data.value : e;
|
|
859
879
|
if (Array.isArray(t)) return t;
|
|
@@ -863,7 +883,7 @@ function Ue(e, t, n, r, i, a, o, s) {
|
|
|
863
883
|
}, t = (t) => async (n) => {
|
|
864
884
|
ne(t) && await x(t(n)), e(n);
|
|
865
885
|
};
|
|
866
|
-
r && (y =
|
|
886
|
+
r && (y = Ve(r.path, t(r.action), r.transformation, r.toData, r.options, s)), i && (b = He(i.path, t(i.action), i.transformation, i.toData, i.options, s)), a && (S = ze(a.path, t(a.action), a.transformation, a.toData, a.options, s));
|
|
867
887
|
}
|
|
868
888
|
return {
|
|
869
889
|
isValid: w,
|
|
@@ -899,16 +919,16 @@ function Ue(e, t, n, r, i, a, o, s) {
|
|
|
899
919
|
}
|
|
900
920
|
//#endregion
|
|
901
921
|
//#region src/composables/ref/useBroadcastValueRef.ts
|
|
902
|
-
var
|
|
903
|
-
function
|
|
904
|
-
let r = `broadcast--${e}`, i =
|
|
922
|
+
var qe = () => v.get("__ui:broadcast-value-ref__", () => ({}));
|
|
923
|
+
function Je(e, t) {
|
|
924
|
+
let r = `broadcast--${e}`, i = qe();
|
|
905
925
|
if (r in i) return i[r];
|
|
906
926
|
let a = P(b(t));
|
|
907
927
|
if (E()) {
|
|
908
928
|
let e = new n(r, (e) => {
|
|
909
929
|
a.value !== e.data.message && (a.value = e.data.message);
|
|
910
930
|
});
|
|
911
|
-
|
|
931
|
+
U.run(() => {
|
|
912
932
|
I(a, (t) => e.post({ message: t }));
|
|
913
933
|
});
|
|
914
934
|
}
|
|
@@ -916,12 +936,12 @@ function Ge(e, t) {
|
|
|
916
936
|
}
|
|
917
937
|
//#endregion
|
|
918
938
|
//#region src/composables/ref/useCookieRef.ts
|
|
919
|
-
var
|
|
920
|
-
function
|
|
921
|
-
let i =
|
|
939
|
+
var Ye = () => v.get("__ui:cookie-ref__", () => ({}));
|
|
940
|
+
function Xe(e, t, n) {
|
|
941
|
+
let i = Ye();
|
|
922
942
|
if (e in i) return i[e];
|
|
923
|
-
let a = new r(e), o =
|
|
924
|
-
return
|
|
943
|
+
let a = new r(e), o = Je(`__cookie:${e}`, a.get(t, n));
|
|
944
|
+
return U.run(() => {
|
|
925
945
|
I(o, (e) => {
|
|
926
946
|
a.set(e, n);
|
|
927
947
|
});
|
|
@@ -929,17 +949,17 @@ function qe(e, t, n) {
|
|
|
929
949
|
}
|
|
930
950
|
//#endregion
|
|
931
951
|
//#region src/composables/ref/useGeoIntlRef.ts
|
|
932
|
-
function
|
|
933
|
-
return new
|
|
952
|
+
function Ze() {
|
|
953
|
+
return new Pe();
|
|
934
954
|
}
|
|
935
955
|
//#endregion
|
|
936
956
|
//#region src/composables/ref/useHashRef.ts
|
|
937
|
-
var
|
|
938
|
-
function
|
|
939
|
-
let n =
|
|
957
|
+
var Qe = () => v.get("__ui:hash-ref__", () => ({}));
|
|
958
|
+
function $e(e, t) {
|
|
959
|
+
let n = Qe();
|
|
940
960
|
if (e in n) return n[e];
|
|
941
961
|
let r = F(f.get(e, t));
|
|
942
|
-
return E() && (
|
|
962
|
+
return E() && (U.run(() => {
|
|
943
963
|
I(r, (t) => f.set(e, t));
|
|
944
964
|
}), f.addWatch(e, (e) => {
|
|
945
965
|
r.value = e;
|
|
@@ -947,7 +967,7 @@ function Xe(e, t) {
|
|
|
947
967
|
}
|
|
948
968
|
//#endregion
|
|
949
969
|
//#region src/composables/ref/useLazyRef.ts
|
|
950
|
-
var
|
|
970
|
+
var et = (e = { rootMargin: "128px 0px" }) => {
|
|
951
971
|
let t = {}, n = E() && "IntersectionObserver" in window ? new IntersectionObserver((e) => {
|
|
952
972
|
e.forEach((e) => {
|
|
953
973
|
let n = w(e.target);
|
|
@@ -991,16 +1011,16 @@ var Ze = (e = { rootMargin: "128px 0px" }) => {
|
|
|
991
1011
|
removeLazyItem: r,
|
|
992
1012
|
disconnectLazy: () => n == null ? void 0 : n.disconnect()
|
|
993
1013
|
};
|
|
994
|
-
},
|
|
995
|
-
let t =
|
|
1014
|
+
}, tt = () => v.get("__ui:lazy-item-by-margin-ref__", () => []), nt = (e) => {
|
|
1015
|
+
let t = tt(), n = t.find((t) => t.rootMargin === e);
|
|
996
1016
|
if (n) return n.item;
|
|
997
|
-
let r =
|
|
1017
|
+
let r = et({ rootMargin: e });
|
|
998
1018
|
return t.push({
|
|
999
1019
|
rootMargin: e,
|
|
1000
1020
|
item: r
|
|
1001
1021
|
}), r;
|
|
1002
|
-
},
|
|
1003
|
-
let n =
|
|
1022
|
+
}, rt = (e, t) => {
|
|
1023
|
+
let n = nt(t);
|
|
1004
1024
|
return {
|
|
1005
1025
|
lazyItemStatus: n.addLazyItem(e),
|
|
1006
1026
|
get lazyItem() {
|
|
@@ -1010,7 +1030,7 @@ var Ze = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1010
1030
|
};
|
|
1011
1031
|
//#endregion
|
|
1012
1032
|
//#region src/composables/ref/useLoadingRef.ts
|
|
1013
|
-
function
|
|
1033
|
+
function it() {
|
|
1014
1034
|
let e = F(m.is());
|
|
1015
1035
|
return E() && m.registrationEvent(({ detail: t }) => {
|
|
1016
1036
|
e.value = t.loading;
|
|
@@ -1020,9 +1040,9 @@ function tt() {
|
|
|
1020
1040
|
//#region src/functions/executeUse.ts
|
|
1021
1041
|
var Q = /* @__PURE__ */ function(e) {
|
|
1022
1042
|
return e.global = "global", e.provide = "provide", e.local = "local", e;
|
|
1023
|
-
}({}),
|
|
1043
|
+
}({}), at = 1, ot = re(1e5, 999999), st = () => `__execute_use${ot}::${at++}`, ct = () => v.get("__ui:execute-use-global__", () => []);
|
|
1024
1044
|
function $(e, t = Q.provide) {
|
|
1025
|
-
let n =
|
|
1045
|
+
let n = st(), r, i = (t) => {
|
|
1026
1046
|
let n = Object.freeze(e(...t));
|
|
1027
1047
|
return {
|
|
1028
1048
|
...n,
|
|
@@ -1032,7 +1052,7 @@ function $(e, t = Q.provide) {
|
|
|
1032
1052
|
};
|
|
1033
1053
|
}, a = (e) => {
|
|
1034
1054
|
let t = Object.freeze(i(e));
|
|
1035
|
-
return
|
|
1055
|
+
return me(n, t), t;
|
|
1036
1056
|
}, o = (e) => {
|
|
1037
1057
|
let t = i(e);
|
|
1038
1058
|
return Object.freeze({
|
|
@@ -1041,28 +1061,27 @@ function $(e, t = Q.provide) {
|
|
|
1041
1061
|
r = void 0;
|
|
1042
1062
|
}
|
|
1043
1063
|
});
|
|
1044
|
-
}, s = (...e) => t === Q.provide ?
|
|
1064
|
+
}, s = (...e) => t === Q.provide ? de(n, void 0) || a(e) : (r || U.run(() => {
|
|
1045
1065
|
r = o(e);
|
|
1046
|
-
})
|
|
1047
|
-
return t === Q.global &&
|
|
1066
|
+
}), r);
|
|
1067
|
+
return t === Q.global && ct().push(s), s;
|
|
1048
1068
|
}
|
|
1049
|
-
function
|
|
1069
|
+
function lt(e) {
|
|
1050
1070
|
return $(e, Q.global);
|
|
1051
1071
|
}
|
|
1052
|
-
function
|
|
1072
|
+
function ut(e) {
|
|
1053
1073
|
return $(e, Q.provide);
|
|
1054
1074
|
}
|
|
1055
|
-
function
|
|
1075
|
+
function dt(e) {
|
|
1056
1076
|
return $(e, Q.local);
|
|
1057
1077
|
}
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1060
|
-
e.forEach((e) => e()), e.length = 0;
|
|
1078
|
+
function ft() {
|
|
1079
|
+
ct().forEach((e) => e());
|
|
1061
1080
|
}
|
|
1062
1081
|
//#endregion
|
|
1063
1082
|
//#region src/composables/ref/useMeta.ts
|
|
1064
|
-
var
|
|
1065
|
-
let e =
|
|
1083
|
+
var pt = dt(() => {
|
|
1084
|
+
let e = h, t = P(e.getTitle()), n = P(e.getKeywords()), r = P(e.getDescription()), i = P(e.getImage()), a = P(e.getCanonical()), o = P(e.getRobots()), s = P(e.getAuthor()), c = P(e.getSiteName());
|
|
1066
1085
|
return I(t, () => {
|
|
1067
1086
|
e.setTitle(t.value);
|
|
1068
1087
|
}), I(n, () => {
|
|
@@ -1092,13 +1111,13 @@ var ut = ct(() => {
|
|
|
1092
1111
|
getHtmlMeta: () => e.html(),
|
|
1093
1112
|
setSuffix: (t) => e.setSuffix(t)
|
|
1094
1113
|
};
|
|
1095
|
-
}),
|
|
1114
|
+
}), mt = () => pt(), ht = (e, t, n = !0) => {
|
|
1096
1115
|
var r;
|
|
1097
1116
|
let i = N(t) ? t : P(t || ((r = e.value) == null || (r = r[0]) == null ? void 0 : r.value) || ""), a = () => o(i.value), o = (t) => {
|
|
1098
1117
|
var n;
|
|
1099
1118
|
return (n = e.value) == null ? void 0 : n.find((e) => e.value === t);
|
|
1100
1119
|
}, s = (e) => {
|
|
1101
|
-
e && e !== i.value && o(e) && (i.value = e,
|
|
1120
|
+
e && e !== i.value && o(e) && (i.value = e, q.push({ name: e }));
|
|
1102
1121
|
};
|
|
1103
1122
|
return {
|
|
1104
1123
|
item: M(() => a()),
|
|
@@ -1117,23 +1136,23 @@ var ut = ct(() => {
|
|
|
1117
1136
|
s((t = e.value) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
1118
1137
|
}
|
|
1119
1138
|
};
|
|
1120
|
-
},
|
|
1121
|
-
function
|
|
1122
|
-
let n =
|
|
1139
|
+
}, gt = () => v.get("__ui:session-ref__", () => ({}));
|
|
1140
|
+
function _t(e, t) {
|
|
1141
|
+
let n = gt();
|
|
1123
1142
|
if (e in n) return n[e];
|
|
1124
1143
|
let r = new i(e, !0), a = P(r.get(t));
|
|
1125
|
-
return
|
|
1144
|
+
return U.run(() => {
|
|
1126
1145
|
I(a, (e) => r.set(e));
|
|
1127
1146
|
}), n[e] = a, a;
|
|
1128
1147
|
}
|
|
1129
1148
|
//#endregion
|
|
1130
1149
|
//#region src/composables/ref/useStorageRef.ts
|
|
1131
|
-
var
|
|
1132
|
-
function
|
|
1133
|
-
let r =
|
|
1150
|
+
var vt = () => v.get("__ui:storage-ref__", () => ({}));
|
|
1151
|
+
function yt(e, t, n) {
|
|
1152
|
+
let r = vt();
|
|
1134
1153
|
if (e in r) return r[e];
|
|
1135
1154
|
let a = new i(e), o = P(a.get(t, n));
|
|
1136
|
-
return
|
|
1155
|
+
return U.run(() => {
|
|
1137
1156
|
I(o, (e) => a.set(e));
|
|
1138
1157
|
}), E() && window.addEventListener("storage", () => {
|
|
1139
1158
|
a.update(), o.value = a.get();
|
|
@@ -1141,12 +1160,12 @@ function gt(e, t, n) {
|
|
|
1141
1160
|
}
|
|
1142
1161
|
//#endregion
|
|
1143
1162
|
//#region src/composables/ref/useTranslateRef.ts
|
|
1144
|
-
function
|
|
1163
|
+
function bt(e, t = y.getItem()) {
|
|
1145
1164
|
let n = F(t.getListSync(e, !0)), r = async () => {
|
|
1146
1165
|
n.value = { ...await t.getList(e) };
|
|
1147
1166
|
};
|
|
1148
1167
|
if (E()) {
|
|
1149
|
-
I(
|
|
1168
|
+
I(G.getLanguage(), r);
|
|
1150
1169
|
for (let e in n.value) if (n.value[e] === e || n.value[e] === " ") {
|
|
1151
1170
|
r().then();
|
|
1152
1171
|
break;
|
|
@@ -1154,23 +1173,23 @@ function _t(e, t = y.getItem()) {
|
|
|
1154
1173
|
}
|
|
1155
1174
|
return n;
|
|
1156
1175
|
}
|
|
1157
|
-
var
|
|
1176
|
+
var xt = (e) => bt(e);
|
|
1158
1177
|
//#endregion
|
|
1159
1178
|
//#region src/functions/computedAsync.ts
|
|
1160
|
-
function
|
|
1161
|
-
let
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1179
|
+
function St(e, t, n, r) {
|
|
1180
|
+
let i = F(b(t)), a = !0, o = async () => {
|
|
1181
|
+
let t = await x(e);
|
|
1182
|
+
t !== n && (i.value = t);
|
|
1183
|
+
}, s = () => {
|
|
1184
|
+
a && (a = !1, E() ? ye(o) : o().then());
|
|
1166
1185
|
};
|
|
1167
|
-
return M(() => (
|
|
1186
|
+
return M(() => (s(), i.value), r);
|
|
1168
1187
|
}
|
|
1169
1188
|
//#endregion
|
|
1170
1189
|
//#region src/functions/computedByLanguage.ts
|
|
1171
|
-
function
|
|
1190
|
+
function Ct(e, t = () => void 0, n, r) {
|
|
1172
1191
|
return M(() => {
|
|
1173
|
-
if (
|
|
1192
|
+
if (G.get().value && (n === void 0 || n())) {
|
|
1174
1193
|
let t = e();
|
|
1175
1194
|
if (t !== void 0) return t;
|
|
1176
1195
|
}
|
|
@@ -1179,18 +1198,18 @@ function bt(e, t = () => void 0, n, r) {
|
|
|
1179
1198
|
}
|
|
1180
1199
|
//#endregion
|
|
1181
1200
|
//#region src/functions/computedEternity.ts
|
|
1182
|
-
function
|
|
1183
|
-
return oe((
|
|
1184
|
-
let
|
|
1185
|
-
|
|
1186
|
-
},
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}));
|
|
1201
|
+
function wt(e, t) {
|
|
1202
|
+
return oe((n, r) => {
|
|
1203
|
+
let i = F(b(t)), a = !1, o = async () => {
|
|
1204
|
+
i.value = await x(e), r();
|
|
1205
|
+
}, s = () => {
|
|
1206
|
+
a || (a = !0, E() ? U.run(() => {
|
|
1207
|
+
ye(async () => await o());
|
|
1208
|
+
}) : o().then());
|
|
1190
1209
|
};
|
|
1191
1210
|
return {
|
|
1192
1211
|
get() {
|
|
1193
|
-
return
|
|
1212
|
+
return s(), n(), i.value;
|
|
1194
1213
|
},
|
|
1195
1214
|
set(e) {
|
|
1196
1215
|
console.warn("computedEternity: value is read-only.");
|
|
@@ -1200,29 +1219,37 @@ function xt(e) {
|
|
|
1200
1219
|
}
|
|
1201
1220
|
//#endregion
|
|
1202
1221
|
//#region src/functions/dxtFunctionalPlugin.ts
|
|
1203
|
-
var
|
|
1204
|
-
if (n.api && e.setConfig(n.api), n.translate && y.setConfig(n.translate), n.icons && p.setConfig(n.icons), n.metaSuffix &&
|
|
1222
|
+
var Tt = { install(t, n = {}) {
|
|
1223
|
+
if (n.api && e.setConfig(n.api), n.translate && y.setConfig(n.translate), n.icons && p.setConfig(n.icons), n.metaSuffix && mt().setSuffix(n.metaSuffix), n.router) q.set(n.router);
|
|
1205
1224
|
else {
|
|
1206
1225
|
let e = t.config.globalProperties.$router;
|
|
1207
|
-
e &&
|
|
1226
|
+
e && q.set(e);
|
|
1208
1227
|
}
|
|
1209
|
-
n.errorCauses && o.addList(n.errorCauses),
|
|
1228
|
+
n.errorCauses && o.addList(n.errorCauses), ft();
|
|
1210
1229
|
} };
|
|
1211
1230
|
//#endregion
|
|
1231
|
+
//#region src/functions/getInject.ts
|
|
1232
|
+
function Et(e) {
|
|
1233
|
+
if (ue()) {
|
|
1234
|
+
let t = de(e);
|
|
1235
|
+
if (t) return t;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
//#endregion
|
|
1212
1239
|
//#region src/functions/render/getBind.ts
|
|
1213
|
-
function
|
|
1240
|
+
function Dt(e, t = {}, n = "value", r = !1) {
|
|
1214
1241
|
let i = typeof t == "string", a = i ? t : n, o = i ? {} : t;
|
|
1215
|
-
return e ? e && O(e) && (a in e || r) ?
|
|
1242
|
+
return e ? e && O(e) && (a in e || r) ? B(o, e) : B(o, { [a]: e }) : i ? {} : { ...o };
|
|
1216
1243
|
}
|
|
1217
1244
|
//#endregion
|
|
1218
1245
|
//#region src/functions/ref/getBindRef.ts
|
|
1219
|
-
function
|
|
1220
|
-
return M(() =>
|
|
1246
|
+
function Ot(e, t = {}, n = "value") {
|
|
1247
|
+
return M(() => Dt(z(e), z(t), n));
|
|
1221
1248
|
}
|
|
1222
1249
|
//#endregion
|
|
1223
1250
|
//#region src/functions/ref/setRef.ts
|
|
1224
|
-
function
|
|
1251
|
+
function kt(e, t) {
|
|
1225
1252
|
e.value !== t && (e.value = t);
|
|
1226
1253
|
}
|
|
1227
1254
|
//#endregion
|
|
1228
|
-
export {
|
|
1255
|
+
export { je as DatetimeRef, Ce as DesignAbstract, we as DesignAsyncAbstract, Se as DesignChanged, ke as DesignComp, V as DesignComponents, Ae as DesignConstructorAbstract, U as EffectScopeGlobal, Me as EventRef, Q as ExecuteUseType, Ne as GeoFlagRef, Pe as GeoIntlRef, G as GeoRef, Fe as ListDataRef, q as RouterItemRef, Ie as ScrollbarWidthRef, St as computedAsync, Ct as computedByLanguage, wt as computedEternity, Tt as dxtFunctionalPlugin, $ as executeUse, lt as executeUseGlobal, ft as executeUseGlobalInit, dt as executeUseLocal, ut as executeUseProvide, Dt as getBind, Ot as getBindRef, Te as getClassName, Ee as getIndexForRender, Et as getInject, J as getOptions, z as getRef, De as render, Le as setApiRefGlobalConditions, kt as setRef, xt as t, B as toBind, Oe as toBinds, H as toRefItem, Re as useApiAsyncRef, ze as useApiDelete, Be as useApiGet, Ke as useApiManagementRef, Ve as useApiPost, He as useApiPut, X as useApiRef, Z as useApiRequest, Je as useBroadcastValueRef, Xe as useCookieRef, Ue as useFormattersRef, Ze as useGeoIntlRef, $e as useHashRef, rt as useLazyItemByMarginRef, et as useLazyRef, it as useLoadingRef, mt as useMeta, ht as useRouterList, Ge as useSearchRef, We as useSearchValueRef, _t as useSessionRef, yt as useStorageRef, bt as useTranslateRef };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.11.
|
|
4
|
+
"version": "1.11.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A comprehensive library of utilities, base classes, and Vue 3 composables for reactive web development. Extends @dxtmisha/functional-basic with Composition API.",
|
|
7
7
|
"keywords": [
|