@dxtmisha/functional 1.12.1 → 1.13.1
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.12.3] - 2026-05-25
|
|
6
|
+
|
|
7
|
+
### Changed / Improved
|
|
8
|
+
- **Build System**: Configured `ui-priority: 200` inside `package.json` to ensure prioritized dependency order sorting during workspace build actions.
|
|
9
|
+
- **Maintenance**: Version bumped to `1.12.3` for consistency.
|
|
10
|
+
|
|
11
|
+
## [1.12.2] - 2026-05-25
|
|
12
|
+
|
|
13
|
+
### Changed / Improved
|
|
14
|
+
- **Tests**: Configured vitest runner execution environment via the `--no-webstorage` flag inside `package.json` to avoid persistent localStorage/sessionStorage warning outputs.
|
|
15
|
+
|
|
5
16
|
## [1.12.1] - 2026-05-21
|
|
6
17
|
|
|
7
18
|
### Fixed
|
package/dist/library.js
CHANGED
|
@@ -335,25 +335,22 @@ var Oe = class {
|
|
|
335
335
|
}
|
|
336
336
|
}, Ae = class {
|
|
337
337
|
constructor(e = u.getLocation()) {
|
|
338
|
-
H(this, "
|
|
338
|
+
H(this, "flag", void 0), this.flag = I(() => new d(U(e)));
|
|
339
339
|
}
|
|
340
340
|
getCode() {
|
|
341
|
-
return this.
|
|
341
|
+
return this.flag.value.getCode();
|
|
342
342
|
}
|
|
343
|
-
get(e = this.
|
|
344
|
-
return I(() => this.flag.get(U(e)));
|
|
343
|
+
get(e = this.getCode()) {
|
|
344
|
+
return I(() => this.flag.value.get(U(e)));
|
|
345
345
|
}
|
|
346
|
-
getFlag(e = this.
|
|
347
|
-
return I(() =>
|
|
348
|
-
var t;
|
|
349
|
-
return (t = this.flag.get(U(e))) == null ? void 0 : t.icon;
|
|
350
|
-
});
|
|
346
|
+
getFlag(e = this.getCode()) {
|
|
347
|
+
return I(() => this.flag.value.getFlag(U(e)));
|
|
351
348
|
}
|
|
352
349
|
getList(e) {
|
|
353
|
-
return I(() => this.flag.getList(U(e)));
|
|
350
|
+
return I(() => this.flag.value.getList(U(e)));
|
|
354
351
|
}
|
|
355
352
|
getNational(e) {
|
|
356
|
-
return I(() => this.flag.getNational(U(e)));
|
|
353
|
+
return I(() => this.flag.value.getNational(U(e)));
|
|
357
354
|
}
|
|
358
355
|
}, J, Y = class {
|
|
359
356
|
static get() {
|
|
@@ -1325,20 +1322,25 @@ function kt(e) {
|
|
|
1325
1322
|
}
|
|
1326
1323
|
}
|
|
1327
1324
|
//#endregion
|
|
1325
|
+
//#region src/functions/ref/executeFunctionRef.ts
|
|
1326
|
+
function At(e) {
|
|
1327
|
+
return U(x(e));
|
|
1328
|
+
}
|
|
1329
|
+
//#endregion
|
|
1328
1330
|
//#region src/functions/render/getBind.ts
|
|
1329
|
-
function
|
|
1331
|
+
function jt(e, t = {}, n = "value", r = !1) {
|
|
1330
1332
|
let i = typeof t == "string", a = i ? t : n, o = i ? {} : t;
|
|
1331
1333
|
return e ? e && M(e) && (a in e || r) ? W(o, e) : W(o, { [a]: e }) : i ? {} : { ...o };
|
|
1332
1334
|
}
|
|
1333
1335
|
//#endregion
|
|
1334
1336
|
//#region src/functions/ref/getBindRef.ts
|
|
1335
|
-
function
|
|
1336
|
-
return I(() =>
|
|
1337
|
+
function Mt(e, t = {}, n = "value") {
|
|
1338
|
+
return I(() => jt(U(e), U(t), n));
|
|
1337
1339
|
}
|
|
1338
1340
|
//#endregion
|
|
1339
1341
|
//#region src/functions/ref/setRef.ts
|
|
1340
|
-
function
|
|
1342
|
+
function Nt(e, t) {
|
|
1341
1343
|
e.value !== t && (e.value = t);
|
|
1342
1344
|
}
|
|
1343
1345
|
//#endregion
|
|
1344
|
-
export { Oe as DatetimeRef, be as DesignAbstract, xe as DesignAsyncAbstract, ye as DesignChanged, Ee as DesignComp, G as DesignComponents, De as DesignConstructorAbstract, q as EffectScopeGlobal, ke as EventRef, st as ExecuteUseType, Ae as GeoFlagRef, je as GeoIntlRef, Y as GeoRef, Me as ListDataRef, X as RouterItemRef, Pe as ScrollbarWidthRef, Tt as computedAsync, Et as computedByLanguage, Dt as computedEternity, Ot as dxtFunctionalPlugin, $ as executeUse, ft as executeUseGlobal, ht as executeUseGlobalInit, mt as executeUseLocal, pt as executeUseProvide, Fe as getApiErrorRef,
|
|
1346
|
+
export { Oe as DatetimeRef, be as DesignAbstract, xe as DesignAsyncAbstract, ye as DesignChanged, Ee as DesignComp, G as DesignComponents, De as DesignConstructorAbstract, q as EffectScopeGlobal, ke as EventRef, st as ExecuteUseType, Ae as GeoFlagRef, je as GeoIntlRef, Y as GeoRef, Me as ListDataRef, X as RouterItemRef, Pe as ScrollbarWidthRef, Tt as computedAsync, Et as computedByLanguage, Dt as computedEternity, Ot as dxtFunctionalPlugin, At as executeFunctionRef, $ as executeUse, ft as executeUseGlobal, ht as executeUseGlobalInit, mt as executeUseLocal, pt as executeUseProvide, Fe as getApiErrorRef, jt as getBind, Mt as getBindRef, Se as getClassName, Ce as getIndexForRender, kt as getInject, Ie as getOptions, U as getRef, we as render, Re as setApiRefGlobalConditions, Nt as setRef, wt as t, W as toBind, Te as toBinds, K as toRefItem, ze as useApiAsyncRef, Be as useApiDelete, Ve as useApiGet, Je as useApiManagementAsyncRef, qe as useApiManagementRef, He as useApiPost, Ue as useApiPut, Le as useApiRef, Q as useApiRequest, Xe as useBroadcastValueRef, Qe as useCookieRef, We as useFormattersRef, $e as useGeoIntlRef, tt as useHashRef, at as useLazyItemByMarginRef, nt as useLazyRef, ot as useLoadingRef, _t as useMeta, vt as useRouterList, Ke as useSearchRef, Ge as useSearchValueRef, bt as useSessionRef, St as useStorageRef, Ct as useTranslateRef };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComputedRef
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
2
|
import { GeoFlag, GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
3
3
|
import { RefOrNormal } from '../../types/refTypes';
|
|
4
4
|
/**
|
|
@@ -7,45 +7,52 @@ import { RefOrNormal } from '../../types/refTypes';
|
|
|
7
7
|
* Класс для работы с Флагами.
|
|
8
8
|
*/
|
|
9
9
|
export declare class GeoFlagRef {
|
|
10
|
-
|
|
11
|
-
protected flag: GeoFlag
|
|
10
|
+
/** Instance for working with flags / Экземпляр для работы с флагами */
|
|
11
|
+
protected flag: ComputedRef<GeoFlag>;
|
|
12
12
|
/**
|
|
13
|
-
* Constructor
|
|
14
|
-
*
|
|
13
|
+
* Constructor.
|
|
14
|
+
*
|
|
15
|
+
* Конструктор.
|
|
16
|
+
* @param code country and language code / код страны и языка
|
|
15
17
|
*/
|
|
16
|
-
constructor(code?: RefOrNormal<string>);
|
|
18
|
+
constructor(code?: RefOrNormal<string | undefined>);
|
|
17
19
|
/**
|
|
18
|
-
*
|
|
20
|
+
* Getting the country code.
|
|
19
21
|
*
|
|
20
|
-
* Получение
|
|
22
|
+
* Получение кода страны.
|
|
23
|
+
* @returns country code / код страны
|
|
21
24
|
*/
|
|
22
|
-
getCode():
|
|
25
|
+
getCode(): string;
|
|
23
26
|
/**
|
|
24
27
|
* Returns information about the country and its flag.
|
|
25
28
|
*
|
|
26
29
|
* Возвращает информацию о стране и её флаге.
|
|
27
|
-
* @param code country code/ код страны
|
|
30
|
+
* @param code country code / код страны
|
|
31
|
+
* @returns reactive object with country information / реактивный объект с информацией о стране
|
|
28
32
|
*/
|
|
29
33
|
get(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
30
34
|
/**
|
|
31
35
|
* Getting a link to the flag.
|
|
32
36
|
*
|
|
33
37
|
* Получение ссылки на флаг.
|
|
34
|
-
* @param code country code/ код страны
|
|
38
|
+
* @param code country code / код страны
|
|
39
|
+
* @returns reactive link to the flag / реактивная ссылка на флаг
|
|
35
40
|
*/
|
|
36
41
|
getFlag(code?: RefOrNormal<string>): ComputedRef<string | undefined>;
|
|
37
42
|
/**
|
|
38
43
|
* Getting a list of countries by an array of codes.
|
|
39
44
|
*
|
|
40
45
|
* Получение списка стран по массиву с кодами.
|
|
41
|
-
* @param codes country
|
|
46
|
+
* @param codes list of country codes / список кодов стран
|
|
47
|
+
* @returns reactive list of country flag items / реактивный список элементов флагов стран
|
|
42
48
|
*/
|
|
43
49
|
getList(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
44
50
|
/**
|
|
45
51
|
* Getting a list of countries by an array of codes in national language.
|
|
46
52
|
*
|
|
47
|
-
* Получение списка стран по массиву с кодами на
|
|
48
|
-
* @param codes country
|
|
53
|
+
* Получение списка стран по массиву с кодами на национальном языке.
|
|
54
|
+
* @param codes list of country codes / список кодов стран
|
|
55
|
+
* @returns reactive list of country flag items in national language / реактивный список элементов флагов стран на национальном языке
|
|
49
56
|
*/
|
|
50
57
|
getNational(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
51
58
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefOrNormalOrFunction } from '../../types/refTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Executes a function if the provided argument is a function, and unwraps the resulting Vue Ref if it is reactive.
|
|
4
|
+
* If the argument is a Vue Ref or a primitive value, it unwraps or returns it directly.
|
|
5
|
+
*
|
|
6
|
+
* Выполняет функцию, если переданный аргумент является функцией, и распаковывает полученный Vue Ref, если он реактивный.
|
|
7
|
+
* Если аргумент является Vue Ref или простым значением, распаковывает или возвращает его напрямую.
|
|
8
|
+
* @param data reactive reference, plain value, or a function returning them / реактивная ссылка, обычное значение или функция, возвращающая их
|
|
9
|
+
* @returns the resolved and unwrapped value / разрешенное и распакованное значение
|
|
10
|
+
*/
|
|
11
|
+
export declare function executeFunctionRef<T>(data: RefOrNormalOrFunction<T>): T;
|
package/dist/src/library.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export * from './functions/dxtFunctionalPlugin';
|
|
|
45
45
|
export * from './functions/executeUse';
|
|
46
46
|
export * from './functions/getInject';
|
|
47
47
|
export * from './functions/getOptions';
|
|
48
|
+
export * from './functions/ref/executeFunctionRef';
|
|
48
49
|
export * from './functions/ref/getApiErrorRef';
|
|
49
50
|
export * from './functions/ref/getBindRef';
|
|
50
51
|
export * from './functions/ref/getRef';
|
|
@@ -14,6 +14,13 @@ export type RefUndefined<T> = RefType<T | undefined>;
|
|
|
14
14
|
* Объединенный тип, который может быть либо Vue реактивной ссылкой, либо обычным значением
|
|
15
15
|
*/
|
|
16
16
|
export type RefOrNormal<T> = RefType<T> | T;
|
|
17
|
+
/**
|
|
18
|
+
* Union type that can be either a Vue reactive reference or a normal value or
|
|
19
|
+
* a function that returns a Vue reactive reference or a normal value/
|
|
20
|
+
* Объединенный тип, который может быть либо Vue реактивной ссылкой, либо обычным
|
|
21
|
+
* значением, либо функцией, которая возвращает Vue реактивную ссылку или обычное значение
|
|
22
|
+
*/
|
|
23
|
+
export type RefOrNormalOrFunction<T> = RefOrNormal<T> | (() => RefOrNormal<T>);
|
|
17
24
|
/**
|
|
18
25
|
* Union type for Vue raw children content
|
|
19
26
|
* (strings, numbers, booleans, VNodes, arrays, functions)/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.13.1",
|
|
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": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dev": "vite",
|
|
39
39
|
"build": "vue-tsc -b && vite build",
|
|
40
40
|
"preview": "vite preview",
|
|
41
|
-
"test": "vitest",
|
|
41
|
+
"test": "NODE_OPTIONS=\"--no-webstorage\" vitest",
|
|
42
42
|
"library": "dxt-library",
|
|
43
43
|
"types": "dxt-types",
|
|
44
44
|
"prepublishOnly": "npm run library && npm run build",
|
|
@@ -77,5 +77,6 @@
|
|
|
77
77
|
"vue": "*"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {},
|
|
80
|
-
"sideEffects": false
|
|
80
|
+
"sideEffects": false,
|
|
81
|
+
"ui-priority": 200
|
|
81
82
|
}
|