@dxtmisha/functional 1.11.6 → 1.11.8
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 +79 -0
- package/ai-description.txt +5 -0
- package/ai-doc.ru.txt +34 -0
- package/ai-doc.txt +34 -0
- package/ai-types.txt +629 -452
- package/dist/classes/design/DesignAbstract.d.ts +61 -0
- package/dist/classes/design/DesignAsyncAbstract.d.ts +28 -0
- package/dist/classes/design/DesignChanged.d.ts +42 -0
- package/dist/classes/design/DesignComp.d.ts +4 -0
- package/dist/classes/design/DesignComponents.d.ts +81 -0
- package/dist/classes/design/DesignConstructorAbstract.d.ts +150 -0
- package/dist/classes/ref/DatetimeRef.d.ts +123 -0
- package/dist/classes/ref/EffectScopeGlobal.d.ts +22 -0
- package/dist/classes/ref/EventRef.d.ts +22 -0
- package/dist/classes/ref/GeoFlagRef.d.ts +51 -0
- package/dist/classes/ref/GeoIntlRef.d.ts +213 -0
- package/dist/classes/ref/GeoRef.d.ts +58 -0
- package/dist/classes/ref/ListDataRef.d.ts +359 -0
- package/dist/classes/ref/RouterItemRef.d.ts +61 -0
- package/dist/classes/ref/ScrollbarWidthRef.d.ts +22 -0
- package/dist/composables/ref/useApiAsyncRef.d.ts +18 -0
- package/dist/composables/ref/useApiDelete.d.ts +20 -0
- package/dist/composables/ref/useApiGet.d.ts +20 -0
- package/dist/composables/ref/useApiManagementAsyncRef.d.ts +49 -0
- package/dist/composables/ref/useApiManagementRef.d.ts +155 -0
- package/dist/composables/ref/useApiPost.d.ts +20 -0
- package/dist/composables/ref/useApiPut.d.ts +20 -0
- package/dist/composables/ref/useApiRef.d.ts +106 -0
- package/dist/composables/ref/useApiRequest.d.ts +28 -0
- package/dist/composables/ref/useBroadcastValueRef.d.ts +11 -0
- package/dist/composables/ref/useCookieRef.d.ts +11 -0
- package/dist/composables/ref/useFormattersRef.d.ts +21 -0
- package/dist/composables/ref/useGeoIntlRef.d.ts +7 -0
- package/dist/composables/ref/useHashRef.d.ts +9 -0
- package/dist/composables/ref/useLazyItemByMarginRef.d.ts +22 -0
- package/dist/composables/ref/useLazyRef.d.ts +42 -0
- package/dist/composables/ref/useLoadingRef.d.ts +7 -0
- package/dist/composables/ref/useMeta.d.ts +223 -0
- package/dist/composables/ref/useRouterList.d.ts +28 -0
- package/dist/composables/ref/useSearchRef.d.ts +36 -0
- package/dist/composables/ref/useSearchValueRef.d.ts +19 -0
- package/dist/composables/ref/useSessionRef.d.ts +9 -0
- package/dist/composables/ref/useStorageRef.d.ts +10 -0
- package/dist/composables/ref/useTranslateRef.d.ts +40 -0
- package/dist/flags.d.ts +1 -0
- package/dist/functions/basic.d.ts +1 -0
- package/dist/functions/computedAsync.d.ts +13 -0
- package/dist/functions/computedByLanguage.d.ts +15 -0
- package/dist/functions/computedEternity.d.ts +15 -0
- package/dist/functions/dxtFunctionalPlugin.d.ts +61 -0
- package/dist/functions/executeUse.d.ts +216 -0
- package/dist/functions/getInject.d.ts +7 -0
- package/dist/functions/getOptions.d.ts +10 -0
- package/dist/functions/ref/getBindRef.d.ts +13 -0
- package/dist/functions/ref/getRef.d.ts +8 -0
- package/dist/functions/ref/render.d.ts +13 -0
- package/dist/functions/ref/setRef.d.ts +9 -0
- package/dist/functions/ref/toRefItem.d.ts +9 -0
- package/dist/functions/render/getBind.d.ts +14 -0
- package/dist/functions/render/getClassName.d.ts +8 -0
- package/dist/functions/render/getIndexForRender.d.ts +10 -0
- package/dist/functions/toBind.d.ts +10 -0
- package/dist/functions/toBinds.d.ts +9 -0
- package/dist/library.d.ts +62 -2803
- package/dist/library.js +105 -71
- package/dist/types/apiTypes.d.ts +66 -0
- package/dist/types/constructorTypes.d.ts +126 -0
- package/dist/types/listTypes.d.ts +63 -0
- package/dist/types/refTypes.d.ts +36 -0
- package/dist/types/searchTypes.d.ts +6 -0
- package/package.json +9 -5
package/dist/library.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Api as e, ApiMethodItem as t, BroadcastMessage as n, Cookie as r, DataS
|
|
|
2
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.
|
|
5
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/typeof.js
|
|
6
6
|
function L(e) {
|
|
7
7
|
"@babel/helpers - typeof";
|
|
8
8
|
return L = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -12,7 +12,7 @@ function L(e) {
|
|
|
12
12
|
}, L(e);
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
//#region \0@oxc-project+runtime@0.
|
|
15
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/toPrimitive.js
|
|
16
16
|
function be(e, t) {
|
|
17
17
|
if (L(e) != "object" || !e) return e;
|
|
18
18
|
var n = e[Symbol.toPrimitive];
|
|
@@ -24,13 +24,13 @@ function be(e, t) {
|
|
|
24
24
|
return (t === "string" ? String : Number)(e);
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region \0@oxc-project+runtime@0.
|
|
27
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/toPropertyKey.js
|
|
28
28
|
function xe(e) {
|
|
29
29
|
var t = be(e, "string");
|
|
30
30
|
return L(t) == "symbol" ? t : t + "";
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region \0@oxc-project+runtime@0.
|
|
33
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/defineProperty.js
|
|
34
34
|
function R(e, t, n) {
|
|
35
35
|
return (t = xe(t)) in e ? Object.defineProperty(e, t, {
|
|
36
36
|
value: n,
|
|
@@ -910,6 +910,8 @@ function Ke(e, t, n, r, i, a, o, s) {
|
|
|
910
910
|
loadingDelete: S == null ? void 0 : S.loading,
|
|
911
911
|
isSearch: v == null ? void 0 : v.isSearch,
|
|
912
912
|
search: v == null ? void 0 : v.search,
|
|
913
|
+
init: C.init,
|
|
914
|
+
initSsr: C.initSsr,
|
|
913
915
|
reset: C.reset,
|
|
914
916
|
abort: C.abort,
|
|
915
917
|
sendPost: async (e) => await (y == null ? void 0 : y.send(e)),
|
|
@@ -918,10 +920,16 @@ function Ke(e, t, n, r, i, a, o, s) {
|
|
|
918
920
|
};
|
|
919
921
|
}
|
|
920
922
|
//#endregion
|
|
923
|
+
//#region src/composables/ref/useApiManagementAsyncRef.ts
|
|
924
|
+
function qe(e, t, n, r, i, a, o, s) {
|
|
925
|
+
let c = Ke(e, t, n, r, i, a, o, s);
|
|
926
|
+
return c.initSsr(), c;
|
|
927
|
+
}
|
|
928
|
+
//#endregion
|
|
921
929
|
//#region src/composables/ref/useBroadcastValueRef.ts
|
|
922
|
-
var
|
|
923
|
-
function
|
|
924
|
-
let r = `broadcast--${e}`, i =
|
|
930
|
+
var Je = () => v.get("__ui:broadcast-value-ref__", () => ({}));
|
|
931
|
+
function Ye(e, t) {
|
|
932
|
+
let r = `broadcast--${e}`, i = Je();
|
|
925
933
|
if (r in i) return i[r];
|
|
926
934
|
let a = P(b(t));
|
|
927
935
|
if (E()) {
|
|
@@ -936,11 +944,11 @@ function Je(e, t) {
|
|
|
936
944
|
}
|
|
937
945
|
//#endregion
|
|
938
946
|
//#region src/composables/ref/useCookieRef.ts
|
|
939
|
-
var
|
|
940
|
-
function
|
|
941
|
-
let i =
|
|
947
|
+
var Xe = () => v.get("__ui:cookie-ref__", () => ({}));
|
|
948
|
+
function Ze(e, t, n) {
|
|
949
|
+
let i = Xe();
|
|
942
950
|
if (e in i) return i[e];
|
|
943
|
-
let a = new r(e), o =
|
|
951
|
+
let a = new r(e), o = Ye(`__cookie:${e}`, a.get(t, n));
|
|
944
952
|
return U.run(() => {
|
|
945
953
|
I(o, (e) => {
|
|
946
954
|
a.set(e, n);
|
|
@@ -949,14 +957,14 @@ function Xe(e, t, n) {
|
|
|
949
957
|
}
|
|
950
958
|
//#endregion
|
|
951
959
|
//#region src/composables/ref/useGeoIntlRef.ts
|
|
952
|
-
function
|
|
960
|
+
function Qe() {
|
|
953
961
|
return new Pe();
|
|
954
962
|
}
|
|
955
963
|
//#endregion
|
|
956
964
|
//#region src/composables/ref/useHashRef.ts
|
|
957
|
-
var
|
|
958
|
-
function
|
|
959
|
-
let n =
|
|
965
|
+
var $e = () => v.get("__ui:hash-ref__", () => ({}));
|
|
966
|
+
function et(e, t) {
|
|
967
|
+
let n = $e();
|
|
960
968
|
if (e in n) return n[e];
|
|
961
969
|
let r = F(f.get(e, t));
|
|
962
970
|
return E() && (U.run(() => {
|
|
@@ -967,7 +975,7 @@ function $e(e, t) {
|
|
|
967
975
|
}
|
|
968
976
|
//#endregion
|
|
969
977
|
//#region src/composables/ref/useLazyRef.ts
|
|
970
|
-
var
|
|
978
|
+
var tt = (e = { rootMargin: "128px 0px" }) => {
|
|
971
979
|
let t = {}, n = E() && "IntersectionObserver" in window ? new IntersectionObserver((e) => {
|
|
972
980
|
e.forEach((e) => {
|
|
973
981
|
let n = w(e.target);
|
|
@@ -1011,16 +1019,16 @@ var et = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1011
1019
|
removeLazyItem: r,
|
|
1012
1020
|
disconnectLazy: () => n == null ? void 0 : n.disconnect()
|
|
1013
1021
|
};
|
|
1014
|
-
},
|
|
1015
|
-
let t =
|
|
1022
|
+
}, nt = () => v.get("__ui:lazy-item-by-margin-ref__", () => []), rt = (e) => {
|
|
1023
|
+
let t = nt(), n = t.find((t) => t.rootMargin === e);
|
|
1016
1024
|
if (n) return n.item;
|
|
1017
|
-
let r =
|
|
1025
|
+
let r = tt({ rootMargin: e });
|
|
1018
1026
|
return t.push({
|
|
1019
1027
|
rootMargin: e,
|
|
1020
1028
|
item: r
|
|
1021
1029
|
}), r;
|
|
1022
|
-
},
|
|
1023
|
-
let n =
|
|
1030
|
+
}, it = (e, t) => {
|
|
1031
|
+
let n = rt(t);
|
|
1024
1032
|
return {
|
|
1025
1033
|
lazyItemStatus: n.addLazyItem(e),
|
|
1026
1034
|
get lazyItem() {
|
|
@@ -1030,7 +1038,7 @@ var et = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1030
1038
|
};
|
|
1031
1039
|
//#endregion
|
|
1032
1040
|
//#region src/composables/ref/useLoadingRef.ts
|
|
1033
|
-
function
|
|
1041
|
+
function at() {
|
|
1034
1042
|
let e = F(m.is());
|
|
1035
1043
|
return E() && m.registrationEvent(({ detail: t }) => {
|
|
1036
1044
|
e.value = t.loading;
|
|
@@ -1040,9 +1048,9 @@ function it() {
|
|
|
1040
1048
|
//#region src/functions/executeUse.ts
|
|
1041
1049
|
var Q = /* @__PURE__ */ function(e) {
|
|
1042
1050
|
return e.global = "global", e.provide = "provide", e.local = "local", e;
|
|
1043
|
-
}({}),
|
|
1051
|
+
}({}), ot = 1, st = re(1e5, 999999), ct = () => `__execute_use${st}::${ot++}`, lt = () => v.get("__ui:execute-use-global__", () => []);
|
|
1044
1052
|
function $(e, t = Q.provide) {
|
|
1045
|
-
let n =
|
|
1053
|
+
let n = ct(), r, i = (t) => {
|
|
1046
1054
|
let n = Object.freeze(e(...t));
|
|
1047
1055
|
return {
|
|
1048
1056
|
...n,
|
|
@@ -1064,41 +1072,56 @@ function $(e, t = Q.provide) {
|
|
|
1064
1072
|
}, s = (...e) => t === Q.provide ? de(n, void 0) || a(e) : (r || U.run(() => {
|
|
1065
1073
|
r = o(e);
|
|
1066
1074
|
}), r);
|
|
1067
|
-
return t === Q.global &&
|
|
1075
|
+
return t === Q.global && lt().push(s), s;
|
|
1068
1076
|
}
|
|
1069
|
-
function
|
|
1077
|
+
function ut(e) {
|
|
1070
1078
|
return $(e, Q.global);
|
|
1071
1079
|
}
|
|
1072
|
-
function
|
|
1080
|
+
function dt(e) {
|
|
1073
1081
|
return $(e, Q.provide);
|
|
1074
1082
|
}
|
|
1075
|
-
function
|
|
1083
|
+
function ft(e) {
|
|
1076
1084
|
return $(e, Q.local);
|
|
1077
1085
|
}
|
|
1078
|
-
function
|
|
1079
|
-
|
|
1086
|
+
function pt() {
|
|
1087
|
+
lt().forEach((e) => e());
|
|
1080
1088
|
}
|
|
1081
1089
|
//#endregion
|
|
1082
1090
|
//#region src/composables/ref/useMeta.ts
|
|
1083
|
-
var
|
|
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())
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1091
|
+
var mt = ft(() => {
|
|
1092
|
+
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()), l = () => e.html(), u = (e) => {
|
|
1093
|
+
t.value = e, x();
|
|
1094
|
+
}, d = (e) => {
|
|
1095
|
+
n.value = e, x();
|
|
1096
|
+
}, f = (e) => {
|
|
1097
|
+
r.value = e, x();
|
|
1098
|
+
}, p = (e) => {
|
|
1099
|
+
i.value = e, x();
|
|
1100
|
+
}, m = (e) => {
|
|
1101
|
+
a.value = e, x();
|
|
1102
|
+
}, g = (e) => {
|
|
1103
|
+
o.value = e, x();
|
|
1104
|
+
}, _ = (e) => {
|
|
1105
|
+
s.value = e, x();
|
|
1106
|
+
}, v = (e) => {
|
|
1107
|
+
c.value = e, x();
|
|
1108
|
+
}, y = () => {
|
|
1109
|
+
t.value = e.getTitle(), n.value = e.getKeywords(), r.value = e.getDescription(), i.value = e.getImage(), a.value = e.getCanonical(), o.value = e.getRobots(), s.value = e.getAuthor(), c.value = e.getSiteName();
|
|
1110
|
+
}, b = () => {
|
|
1111
|
+
e.setTitle(t.value), e.setKeywords(n.value), e.setDescription(r.value), e.setImage(i.value), e.setCanonical(a.value), e.setRobots(o.value), e.setAuthor(s.value), e.setSiteName(c.value);
|
|
1112
|
+
}, x = () => {
|
|
1113
|
+
E() || b();
|
|
1114
|
+
};
|
|
1115
|
+
return I([
|
|
1116
|
+
t,
|
|
1117
|
+
n,
|
|
1118
|
+
r,
|
|
1119
|
+
i,
|
|
1120
|
+
a,
|
|
1121
|
+
o,
|
|
1122
|
+
s,
|
|
1123
|
+
c
|
|
1124
|
+
], () => b()), {
|
|
1102
1125
|
meta: e,
|
|
1103
1126
|
title: t,
|
|
1104
1127
|
keyword: n,
|
|
@@ -1108,10 +1131,21 @@ var pt = dt(() => {
|
|
|
1108
1131
|
canonical: a,
|
|
1109
1132
|
robots: o,
|
|
1110
1133
|
siteName: c,
|
|
1111
|
-
getHtmlMeta:
|
|
1134
|
+
getHtmlMeta: l,
|
|
1135
|
+
sync: y,
|
|
1136
|
+
update: b,
|
|
1137
|
+
updateSsr: x,
|
|
1138
|
+
setTitle: u,
|
|
1139
|
+
setKeywords: d,
|
|
1140
|
+
setDescription: f,
|
|
1141
|
+
setAuthor: _,
|
|
1142
|
+
setImage: p,
|
|
1143
|
+
setCanonical: m,
|
|
1144
|
+
setRobots: g,
|
|
1145
|
+
setSiteName: v,
|
|
1112
1146
|
setSuffix: (t) => e.setSuffix(t)
|
|
1113
1147
|
};
|
|
1114
|
-
}),
|
|
1148
|
+
}), ht = () => mt(), gt = (e, t, n = !0) => {
|
|
1115
1149
|
var r;
|
|
1116
1150
|
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) => {
|
|
1117
1151
|
var n;
|
|
@@ -1136,9 +1170,9 @@ var pt = dt(() => {
|
|
|
1136
1170
|
s((t = e.value) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
1137
1171
|
}
|
|
1138
1172
|
};
|
|
1139
|
-
},
|
|
1140
|
-
function
|
|
1141
|
-
let n =
|
|
1173
|
+
}, _t = () => v.get("__ui:session-ref__", () => ({}));
|
|
1174
|
+
function vt(e, t) {
|
|
1175
|
+
let n = _t();
|
|
1142
1176
|
if (e in n) return n[e];
|
|
1143
1177
|
let r = new i(e, !0), a = P(r.get(t));
|
|
1144
1178
|
return U.run(() => {
|
|
@@ -1147,9 +1181,9 @@ function _t(e, t) {
|
|
|
1147
1181
|
}
|
|
1148
1182
|
//#endregion
|
|
1149
1183
|
//#region src/composables/ref/useStorageRef.ts
|
|
1150
|
-
var
|
|
1151
|
-
function
|
|
1152
|
-
let r =
|
|
1184
|
+
var yt = () => v.get("__ui:storage-ref__", () => ({}));
|
|
1185
|
+
function bt(e, t, n) {
|
|
1186
|
+
let r = yt();
|
|
1153
1187
|
if (e in r) return r[e];
|
|
1154
1188
|
let a = new i(e), o = P(a.get(t, n));
|
|
1155
1189
|
return U.run(() => {
|
|
@@ -1160,7 +1194,7 @@ function yt(e, t, n) {
|
|
|
1160
1194
|
}
|
|
1161
1195
|
//#endregion
|
|
1162
1196
|
//#region src/composables/ref/useTranslateRef.ts
|
|
1163
|
-
function
|
|
1197
|
+
function xt(e, t = y.getItem()) {
|
|
1164
1198
|
let n = F(t.getListSync(e, !0)), r = async () => {
|
|
1165
1199
|
n.value = { ...await t.getList(e) };
|
|
1166
1200
|
};
|
|
@@ -1173,10 +1207,10 @@ function bt(e, t = y.getItem()) {
|
|
|
1173
1207
|
}
|
|
1174
1208
|
return n;
|
|
1175
1209
|
}
|
|
1176
|
-
var
|
|
1210
|
+
var St = (e) => xt(e);
|
|
1177
1211
|
//#endregion
|
|
1178
1212
|
//#region src/functions/computedAsync.ts
|
|
1179
|
-
function
|
|
1213
|
+
function Ct(e, t, n, r) {
|
|
1180
1214
|
let i = F(b(t)), a = !0, o = async () => {
|
|
1181
1215
|
let t = await x(e);
|
|
1182
1216
|
t !== n && (i.value = t);
|
|
@@ -1187,7 +1221,7 @@ function St(e, t, n, r) {
|
|
|
1187
1221
|
}
|
|
1188
1222
|
//#endregion
|
|
1189
1223
|
//#region src/functions/computedByLanguage.ts
|
|
1190
|
-
function
|
|
1224
|
+
function wt(e, t = () => void 0, n, r) {
|
|
1191
1225
|
return M(() => {
|
|
1192
1226
|
if (G.get().value && (n === void 0 || n())) {
|
|
1193
1227
|
let t = e();
|
|
@@ -1198,7 +1232,7 @@ function Ct(e, t = () => void 0, n, r) {
|
|
|
1198
1232
|
}
|
|
1199
1233
|
//#endregion
|
|
1200
1234
|
//#region src/functions/computedEternity.ts
|
|
1201
|
-
function
|
|
1235
|
+
function Tt(e, t) {
|
|
1202
1236
|
return oe((n, r) => {
|
|
1203
1237
|
let i = F(b(t)), a = !1, o = async () => {
|
|
1204
1238
|
i.value = await x(e), r();
|
|
@@ -1219,17 +1253,17 @@ function wt(e, t) {
|
|
|
1219
1253
|
}
|
|
1220
1254
|
//#endregion
|
|
1221
1255
|
//#region src/functions/dxtFunctionalPlugin.ts
|
|
1222
|
-
var
|
|
1223
|
-
if (n.api && e.setConfig(n.api), n.translate && y.setConfig(n.translate), n.icons && p.setConfig(n.icons), n.metaSuffix &&
|
|
1256
|
+
var Et = { install(t, n = {}) {
|
|
1257
|
+
if (n.api && e.setConfig(n.api), n.translate && y.setConfig(n.translate), n.icons && p.setConfig(n.icons), n.metaSuffix && ht().setSuffix(n.metaSuffix), n.router) q.set(n.router);
|
|
1224
1258
|
else {
|
|
1225
1259
|
let e = t.config.globalProperties.$router;
|
|
1226
1260
|
e && q.set(e);
|
|
1227
1261
|
}
|
|
1228
|
-
n.errorCauses && o.addList(n.errorCauses),
|
|
1262
|
+
n.errorCauses && o.addList(n.errorCauses), pt();
|
|
1229
1263
|
} };
|
|
1230
1264
|
//#endregion
|
|
1231
1265
|
//#region src/functions/getInject.ts
|
|
1232
|
-
function
|
|
1266
|
+
function Dt(e) {
|
|
1233
1267
|
if (ue()) {
|
|
1234
1268
|
let t = de(e);
|
|
1235
1269
|
if (t) return t;
|
|
@@ -1237,19 +1271,19 @@ function Et(e) {
|
|
|
1237
1271
|
}
|
|
1238
1272
|
//#endregion
|
|
1239
1273
|
//#region src/functions/render/getBind.ts
|
|
1240
|
-
function
|
|
1274
|
+
function Ot(e, t = {}, n = "value", r = !1) {
|
|
1241
1275
|
let i = typeof t == "string", a = i ? t : n, o = i ? {} : t;
|
|
1242
1276
|
return e ? e && O(e) && (a in e || r) ? B(o, e) : B(o, { [a]: e }) : i ? {} : { ...o };
|
|
1243
1277
|
}
|
|
1244
1278
|
//#endregion
|
|
1245
1279
|
//#region src/functions/ref/getBindRef.ts
|
|
1246
|
-
function
|
|
1247
|
-
return M(() =>
|
|
1280
|
+
function kt(e, t = {}, n = "value") {
|
|
1281
|
+
return M(() => Ot(z(e), z(t), n));
|
|
1248
1282
|
}
|
|
1249
1283
|
//#endregion
|
|
1250
1284
|
//#region src/functions/ref/setRef.ts
|
|
1251
|
-
function
|
|
1285
|
+
function At(e, t) {
|
|
1252
1286
|
e.value !== t && (e.value = t);
|
|
1253
1287
|
}
|
|
1254
1288
|
//#endregion
|
|
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,
|
|
1289
|
+
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, Ct as computedAsync, wt as computedByLanguage, Tt as computedEternity, Et as dxtFunctionalPlugin, $ as executeUse, ut as executeUseGlobal, pt as executeUseGlobalInit, ft as executeUseLocal, dt as executeUseProvide, Ot as getBind, kt as getBindRef, Te as getClassName, Ee as getIndexForRender, Dt as getInject, J as getOptions, z as getRef, De as render, Le as setApiRefGlobalConditions, At as setRef, St as t, B as toBind, Oe as toBinds, H as toRefItem, Re as useApiAsyncRef, ze as useApiDelete, Be as useApiGet, qe as useApiManagementAsyncRef, Ke as useApiManagementRef, Ve as useApiPost, He as useApiPut, X as useApiRef, Z as useApiRequest, Ye as useBroadcastValueRef, Ze as useCookieRef, Ue as useFormattersRef, Qe as useGeoIntlRef, et as useHashRef, it as useLazyItemByMarginRef, tt as useLazyRef, at as useLoadingRef, ht as useMeta, gt as useRouterList, Ge as useSearchRef, We as useSearchValueRef, vt as useSessionRef, bt as useStorageRef, xt as useTranslateRef };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ApiData, ApiDataValidation, ApiDefaultValue, ApiFetch, ApiMethodItem, SearchColumns, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
2
|
+
import { RefOrNormal, RefType } from './refTypes';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
/** Options for api requests/ Опции для запросов api */
|
|
5
|
+
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
6
|
+
/**
|
|
7
|
+
* Base type for API management values, either a single value or an array.
|
|
8
|
+
*
|
|
9
|
+
* Базовый тип для значений управления API: одиночное значение или массив.
|
|
10
|
+
*/
|
|
11
|
+
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the main GET request in API management.
|
|
14
|
+
*
|
|
15
|
+
* Конфигурация для основного GET-запроса в управлении API.
|
|
16
|
+
*/
|
|
17
|
+
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
18
|
+
/** API endpoint path / Путь к API */
|
|
19
|
+
path?: RefOrNormal<string | undefined>;
|
|
20
|
+
/** Additional request options / Дополнительные опции запроса */
|
|
21
|
+
options?: ApiOptions;
|
|
22
|
+
/** Enable reactive updates when path or options change / Включить реактивные обновления при изменении пути или опций */
|
|
23
|
+
reactivity?: boolean;
|
|
24
|
+
/** Condition to trigger the request / Условие выполнения запроса */
|
|
25
|
+
conditions?: RefType<boolean>;
|
|
26
|
+
/** Custom transformation for the fetched data / Пользовательская трансформация полученных данных */
|
|
27
|
+
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
28
|
+
/** Function to validate response data contract / Функция для проверки контракта данных ответа */
|
|
29
|
+
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
30
|
+
/** Validation function or class constructor for data / Функция валидации или конструктор класса для данных */
|
|
31
|
+
typeData?: ((data: Return) => boolean) | any;
|
|
32
|
+
/** Whether to clear data when the component is unmounted / Удалять ли данные при размонтировании компонента */
|
|
33
|
+
unmounted?: boolean;
|
|
34
|
+
/** Function to provide skeleton data during loading / Функция, предоставляющая данные-заглушки во время загрузки */
|
|
35
|
+
skeleton?: () => Return;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Configuration for client-side search across API data.
|
|
39
|
+
*
|
|
40
|
+
* Конфигурация для клиентского поиска по данным API.
|
|
41
|
+
*/
|
|
42
|
+
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
43
|
+
/** List of columns to search through / Список столбцов для поиска */
|
|
44
|
+
columns: K;
|
|
45
|
+
/** Reactive search query / Реактивная строка поиска */
|
|
46
|
+
value?: Ref<string>;
|
|
47
|
+
/** Additional search algorithm options / Дополнительные опции алгоритма поиска */
|
|
48
|
+
options?: SearchOptions;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Configuration for mutation requests (POST, PUT, DELETE).
|
|
52
|
+
*
|
|
53
|
+
* Конфигурация для запросов мутации (POST, PUT, DELETE).
|
|
54
|
+
*/
|
|
55
|
+
export type ApiManagementRequest<T, Return extends ApiData<T> = ApiData<T>> = {
|
|
56
|
+
/** Target API endpoint path / Целевой путь к API */
|
|
57
|
+
path?: RefOrNormal<string | undefined>;
|
|
58
|
+
/** Action to perform after a successful request / Действие после успешного выполнения запроса */
|
|
59
|
+
action?: (data: Return | undefined) => Promise<void> | void;
|
|
60
|
+
/** Transformation before sending data / Трансформация перед отправкой данных */
|
|
61
|
+
transformation?: (data: T) => Return;
|
|
62
|
+
/** Whether to wrap the payload in a 'data' property / Обертывать ли полезную нагрузку в свойство 'data' */
|
|
63
|
+
toData?: boolean;
|
|
64
|
+
/** Additional mutation request options / Дополнительные опции запроса мутации */
|
|
65
|
+
options?: ApiOptions;
|
|
66
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Ref, PropType, ComputedRef } from 'vue';
|
|
2
|
+
import { Undefined } from '@dxtmisha/functional-basic';
|
|
3
|
+
import { RefOrNormal, RefType } from './refTypes';
|
|
4
|
+
/** Generic record type for constructor items/ Дженерик тип записи для элементов конструктора */
|
|
5
|
+
export type ConstrItem = Record<string, any>;
|
|
6
|
+
/** Constructor value wrapper with optional value property/ Обертка значения конструктора с опциональным свойством value */
|
|
7
|
+
export type ConstrValue<T = any> = {
|
|
8
|
+
/** Optional value of type T/ Опциональное значение типа T */
|
|
9
|
+
value?: T;
|
|
10
|
+
};
|
|
11
|
+
/** Generic record type for constructor components/ Дженерик тип записи для компонентов конструктора */
|
|
12
|
+
export type ConstrComponent = Record<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor component modification type with reactive or normal values/
|
|
15
|
+
* Тип модификации компонента конструктора с реактивными или обычными значениями
|
|
16
|
+
*/
|
|
17
|
+
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | {
|
|
18
|
+
[K in keyof P]?: RefOrNormal<P[K]>;
|
|
19
|
+
};
|
|
20
|
+
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
|
|
21
|
+
elementHtml?: ComputedRef<E | undefined>;
|
|
22
|
+
};
|
|
23
|
+
/** Utility type to convert union types to intersection types/ Утилитарный тип для преобразования объединенных типов в пересеченные */
|
|
24
|
+
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
25
|
+
/** Extract emit item type from constructor item/ Извлечение типа элемента emit из элемента конструктора */
|
|
26
|
+
export type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
27
|
+
/**
|
|
28
|
+
* Constructor emit type with proper event handler signatures/
|
|
29
|
+
* Тип emit конструктора с правильными сигнатурами обработчиков событий
|
|
30
|
+
*/
|
|
31
|
+
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{
|
|
32
|
+
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
33
|
+
}>>;
|
|
34
|
+
/** Object type for CSS class names with boolean values/ Тип объекта для CSS классов с булевыми значениями */
|
|
35
|
+
export type ConstrClassObject = Record<string, boolean | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* Constructor class type supporting strings, arrays, and objects/
|
|
38
|
+
* Тип класса конструктора, поддерживающий строки, массивы и объекты
|
|
39
|
+
*/
|
|
40
|
+
export type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
41
|
+
/** Record type for mapping class names to class definitions/ Тип записи для сопоставления имен классов с определениями классов */
|
|
42
|
+
export type ConstrClassList = Record<string, ConstrClass>;
|
|
43
|
+
/** Constructor classes with required main class and additional class list/ Классы конструктора с обязательным основным классом и дополнительным списком классов */
|
|
44
|
+
export type ConstrClasses = {
|
|
45
|
+
main: ConstrClass;
|
|
46
|
+
} & ConstrClassList;
|
|
47
|
+
/** Constructor style item type for individual style properties/ Тип элемента стиля конструктора для отдельных свойств стиля */
|
|
48
|
+
export type ConstrStylesItem = string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Constructor styles type supporting objects and arrays of style definitions/
|
|
51
|
+
* Тип стилей конструктора, поддерживающий объекты и массивы определений стилей
|
|
52
|
+
*/
|
|
53
|
+
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
54
|
+
/**
|
|
55
|
+
* Constructor options interface for component configuration/
|
|
56
|
+
* Интерфейс опций конструктора для конфигурации компонента
|
|
57
|
+
*/
|
|
58
|
+
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
59
|
+
/** Optional components configuration/ Опциональная конфигурация компонентов */
|
|
60
|
+
components?: COMP;
|
|
61
|
+
/** Optional component modifications/ Опциональные модификации компонента */
|
|
62
|
+
compMod?: ConstrComponentMod<P>;
|
|
63
|
+
/** Optional emit handlers/ Опциональные обработчики emit */
|
|
64
|
+
emits?: ConstrEmit<EMITS>;
|
|
65
|
+
/** Optional reactive classes/ Опциональные реактивные классы */
|
|
66
|
+
classes?: RefType<ConstrClasses>;
|
|
67
|
+
/** Optional reactive styles/ Опциональные реактивные стили */
|
|
68
|
+
styles?: RefType<ConstrStyles>;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Constructor setup interface for component initialization/
|
|
72
|
+
* Интерфейс настройки конструктора для инициализации компонента
|
|
73
|
+
*/
|
|
74
|
+
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
75
|
+
/** Component name/ Имя компонента */
|
|
76
|
+
name: string;
|
|
77
|
+
/** Reactive element reference/ Реактивная ссылка на элемент */
|
|
78
|
+
element: Ref<E | undefined>;
|
|
79
|
+
/** Reactive classes/ Реактивные классы */
|
|
80
|
+
classes: RefType<CLASSES>;
|
|
81
|
+
/** Reactive styles/ Реактивные стили */
|
|
82
|
+
styles: RefType<ConstrStyles>;
|
|
83
|
+
} & SETUP;
|
|
84
|
+
/** Constructor registration configuration/ Конфигурация регистрации конструктора */
|
|
85
|
+
export type ConstrRegistration = {
|
|
86
|
+
/** Optional flag for registration/ Опциональный флаг для регистрации */
|
|
87
|
+
flag?: boolean;
|
|
88
|
+
/** Optional translation map/ Опциональная карта переводов */
|
|
89
|
+
translate?: Record<string, string>;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Constructor bind type for component binding with class and style support/
|
|
93
|
+
* Тип привязки конструктора для привязки компонента с поддержкой классов и стилей
|
|
94
|
+
*/
|
|
95
|
+
export type ConstrBind<T> = T & Record<string, any> & {
|
|
96
|
+
/** Optional key/ Опциональный ключ */
|
|
97
|
+
key?: string;
|
|
98
|
+
/** Optional CSS classes/ Опциональные CSS классы */
|
|
99
|
+
class?: ConstrClass;
|
|
100
|
+
/** Optional styles/ Опциональные стили */
|
|
101
|
+
style?: ConstrStyles;
|
|
102
|
+
};
|
|
103
|
+
/** Constructor prop item options for Vue prop definitions/ Опции элемента prop конструктора для определений Vue prop */
|
|
104
|
+
export type ConstrPropItemOptions<T = any> = {
|
|
105
|
+
/** Vue prop type/ Тип Vue prop */
|
|
106
|
+
type?: PropType<T>;
|
|
107
|
+
/** Required flag/ Флаг обязательности */
|
|
108
|
+
required?: boolean;
|
|
109
|
+
/** Default value/ Значение по умолчанию */
|
|
110
|
+
default?: any;
|
|
111
|
+
/** Custom validator function/ Пользовательская функция валидации */
|
|
112
|
+
validator?(value: any, props: any): boolean;
|
|
113
|
+
};
|
|
114
|
+
/** Constructor prop item type with options or direct PropType/ Тип элемента prop конструктора с опциями или прямым PropType */
|
|
115
|
+
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
116
|
+
/** Constructor props type for component prop definitions/ Тип props конструктора для определений props компонента */
|
|
117
|
+
export type ConstrProps<P = Record<string, any>> = {
|
|
118
|
+
[K in keyof P]: ConstrPropItem<P[K]>;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Props for link handling/ Пропсы для обработки ссылок
|
|
122
|
+
*/
|
|
123
|
+
export type ConstrHrefProps = {
|
|
124
|
+
/** Hyperlink reference/ Гиперссылка */
|
|
125
|
+
href?: string;
|
|
126
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
2
|
+
import { ConstrBind } from './constructorTypes';
|
|
3
|
+
/** Type of list item/ Тип элемента списка */
|
|
4
|
+
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
5
|
+
/** Basic data structure for list item/ Базовая структура данных для элемента списка */
|
|
6
|
+
export type ListDataBasic = {
|
|
7
|
+
/** Optional display label/ Опциональная отображаемая метка */
|
|
8
|
+
label?: NumberOrString;
|
|
9
|
+
/** Any value associated with the item/ Любое значение, связанное с элементом */
|
|
10
|
+
value?: any;
|
|
11
|
+
/** Search text for filtering/ Текст поиска для фильтрации */
|
|
12
|
+
search?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Extended list item with type and index/ Расширенный элемент списка с типом и индексом */
|
|
15
|
+
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
16
|
+
/** Parent item identifier/ Идентификатор родительского элемента */
|
|
17
|
+
parent?: string;
|
|
18
|
+
/** Type of list item/ Тип элемента списка */
|
|
19
|
+
type: ListType;
|
|
20
|
+
/** Unique item identifier/ Уникальный идентификатор элемента */
|
|
21
|
+
index: string;
|
|
22
|
+
}>;
|
|
23
|
+
/** Array of list data items/ Массив элементов данных списка */
|
|
24
|
+
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
25
|
+
/**
|
|
26
|
+
* List or record structure for list data/
|
|
27
|
+
* Структура списка или записи для данных списка
|
|
28
|
+
*/
|
|
29
|
+
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
30
|
+
/**
|
|
31
|
+
* Extended list item with additional state properties/
|
|
32
|
+
* Расширенный элемент списка с дополнительными свойствами состояния
|
|
33
|
+
*/
|
|
34
|
+
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
35
|
+
/** Whether the item has focus/ Имеет ли элемент фокус */
|
|
36
|
+
focus: boolean;
|
|
37
|
+
/** Highlighted text portion/ Выделенная часть текста */
|
|
38
|
+
highlight?: string;
|
|
39
|
+
/** Whether the item is selected/ Выбран ли элемент */
|
|
40
|
+
selected: boolean;
|
|
41
|
+
/** Whether the item is disabled/ Отключен ли элемент */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Array of extended list items with state/
|
|
46
|
+
* Массив расширенных элементов списка с состоянием
|
|
47
|
+
*/
|
|
48
|
+
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
49
|
+
/** Input item for list creation/ Входной элемент для создания списка */
|
|
50
|
+
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
51
|
+
/**
|
|
52
|
+
* Various input formats for list creation/
|
|
53
|
+
* Различные форматы входных данных для создания списка
|
|
54
|
+
*/
|
|
55
|
+
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
56
|
+
/** Single selected item identifier/ Идентификатор одного выбранного элемента */
|
|
57
|
+
export type ListSelectedItem = NumberOrStringOrBoolean;
|
|
58
|
+
/** Single or multiple selected items/ Один или несколько выбранных элементов */
|
|
59
|
+
export type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
60
|
+
/** Name of selected list item/ Название выбранного элемента списка */
|
|
61
|
+
export type ListName = string | number | undefined;
|
|
62
|
+
/** Array of list item names/ Массив названий выбранных элементов списка */
|
|
63
|
+
export type ListNames = ListName[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComputedRef, Ref, VNode, VNodeArrayChildren } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Union type for Vue reactive references (computed or ref)/
|
|
4
|
+
* Объединенный тип для Vue реактивных ссылок (computed или ref)
|
|
5
|
+
*/
|
|
6
|
+
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
7
|
+
/**
|
|
8
|
+
* Union type for Vue reactive references that can be undefined/
|
|
9
|
+
* Объединенный тип для Vue реактивных ссылок, которые могут быть undefined
|
|
10
|
+
*/
|
|
11
|
+
export type RefUndefined<T> = RefType<T | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Union type that can be either a Vue reactive reference or a normal value/
|
|
14
|
+
* Объединенный тип, который может быть либо Vue реактивной ссылкой, либо обычным значением
|
|
15
|
+
*/
|
|
16
|
+
export type RefOrNormal<T> = RefType<T> | T;
|
|
17
|
+
/**
|
|
18
|
+
* Union type for Vue raw children content
|
|
19
|
+
* (strings, numbers, booleans, VNodes, arrays, functions)/
|
|
20
|
+
* Объединенный тип для Vue сырого содержимого дочерних элементов
|
|
21
|
+
* (строки, числа, булевы, VNode, массивы, функции)
|
|
22
|
+
*/
|
|
23
|
+
export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
24
|
+
/**
|
|
25
|
+
* Type for Vue raw slots with optional stability flag/
|
|
26
|
+
* Тип для Vue сырых слотов с опциональным флагом стабильности
|
|
27
|
+
*/
|
|
28
|
+
export type RawSlots = {
|
|
29
|
+
/** Slot name mapping to unknown content/ Маппинг имени слота к неизвестному содержимому */
|
|
30
|
+
[name: string]: unknown;
|
|
31
|
+
/**
|
|
32
|
+
* Optional stability flag for performance optimization/
|
|
33
|
+
* Опциональный флаг стабильности для оптимизации производительности
|
|
34
|
+
*/
|
|
35
|
+
$stable?: boolean;
|
|
36
|
+
};
|