@dxtmisha/functional 1.13.7 → 1.14.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 +9 -0
- package/ai-description.md +11 -13
- package/ai-types.md +28 -210
- package/dist/library.js +181 -159
- package/dist/src/classes/ref/GeoFlagRef.d.ts +24 -0
- package/dist/src/composables/ref/useQueryRef.d.ts +9 -0
- package/dist/src/library.d.ts +1 -0
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Api as e, ApiError as t, ApiMethodItem as n, BroadcastMessage as r, Cookie as i, DataStorage as a, Datetime as o, ErrorCenter as s, EventItem as c, Formatters as l, Geo as u, GeoFlag as d, GeoIntl as f, Hash as p, Icons as m, Loading as h, MetaStatic as g,
|
|
2
|
-
import { computed as I, customRef as
|
|
1
|
+
import { Api as e, ApiError as t, ApiMethodItem as n, BroadcastMessage as r, Cookie as i, DataStorage as a, Datetime as o, ErrorCenter as s, EventItem as c, Formatters as l, Geo as u, GeoFlag as d, GeoIntl as f, Hash as p, Icons as m, Loading as h, MetaStatic as g, Query as _, ScrollbarWidth as v, SearchList as y, ServerStorage as b, Translate as x, executeFunction as S, executePromise as C, forEach as w, getColumn as T, getElementId as E, getExp as D, isApiSuccess as O, isArray as ee, isDomRuntime as k, isFunction as A, isObject as j, isObjectNotArray as M, isSelected as N, isString as P, random as te, toArray as F, toCamelCase as ne, toDate as re } from "@dxtmisha/functional-basic";
|
|
2
|
+
import { computed as I, customRef as ie, effectScope as ae, getCurrentInstance as oe, h as se, hasInjectionContext as ce, inject as le, isRef as L, onServerPrefetch as ue, onUnmounted as de, provide as fe, ref as R, shallowRef as z, toRefs as pe, triggerRef as me, useAttrs as he, useSlots as ge, watch as B, watchEffect as _e } from "vue";
|
|
3
3
|
export * from "@dxtmisha/functional-basic";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region \0@oxc-project+runtime@0.130.0/helpers/typeof.js
|
|
@@ -13,7 +13,7 @@ function V(e) {
|
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region \0@oxc-project+runtime@0.130.0/helpers/toPrimitive.js
|
|
16
|
-
function
|
|
16
|
+
function ve(e, t) {
|
|
17
17
|
if (V(e) != "object" || !e) return e;
|
|
18
18
|
var n = e[Symbol.toPrimitive];
|
|
19
19
|
if (n !== void 0) {
|
|
@@ -25,14 +25,14 @@ function _e(e, t) {
|
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region \0@oxc-project+runtime@0.130.0/helpers/toPropertyKey.js
|
|
28
|
-
function
|
|
29
|
-
var t =
|
|
28
|
+
function ye(e) {
|
|
29
|
+
var t = ve(e, "string");
|
|
30
30
|
return V(t) == "symbol" ? t : t + "";
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region \0@oxc-project+runtime@0.130.0/helpers/defineProperty.js
|
|
34
34
|
function H(e, t, n) {
|
|
35
|
-
return (t =
|
|
35
|
+
return (t = ye(t)) in e ? Object.defineProperty(e, t, {
|
|
36
36
|
value: n,
|
|
37
37
|
enumerable: !0,
|
|
38
38
|
configurable: !0,
|
|
@@ -41,12 +41,12 @@ function H(e, t, n) {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/classes/design/DesignChanged.ts
|
|
44
|
-
var
|
|
44
|
+
var be = class {
|
|
45
45
|
constructor(e, t = Object.keys(e)) {
|
|
46
46
|
H(this, "props", void 0), H(this, "watch", void 0), H(this, "cache", {}), this.props = e, this.watch = t;
|
|
47
47
|
}
|
|
48
48
|
is(e) {
|
|
49
|
-
return
|
|
49
|
+
return ee(e) ? !!e.find((e) => this.isDifferent(e)) : this.isDifferent(e);
|
|
50
50
|
}
|
|
51
51
|
isChanged() {
|
|
52
52
|
let e = this.props;
|
|
@@ -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
|
+
}, xe = class {
|
|
66
66
|
constructor(e, t, n) {
|
|
67
|
-
H(this, "props", void 0), H(this, "callback", void 0), H(this, "event", {}), H(this, "changed", void 0), this.props = e, this.callback = t, this.changed = new
|
|
67
|
+
H(this, "props", void 0), H(this, "callback", void 0), H(this, "event", {}), H(this, "changed", void 0), this.props = e, this.callback = t, this.changed = new be(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
|
+
}, Se = class extends xe {
|
|
85
85
|
make(e) {
|
|
86
86
|
return this.makeCallback(e).then(), this;
|
|
87
87
|
}
|
|
@@ -96,23 +96,23 @@ function U(e) {
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/functions/render/getClassName.ts
|
|
99
|
-
function
|
|
99
|
+
function Ce(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 we(e, t, n) {
|
|
105
|
+
let r = t == null ? void 0 : t.id, i = t == null ? void 0 : t.index, a = Ce(t), o = "";
|
|
106
106
|
if (P(e) && (o += e), n && (o += `.${n}`), i && P(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 Te(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:
|
|
115
|
-
}),
|
|
114
|
+
key: we(e, t, r)
|
|
115
|
+
}), se(e, i, n);
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/functions/toBind.ts
|
|
@@ -125,7 +125,7 @@ function W(e, t) {
|
|
|
125
125
|
}
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/functions/toBinds.ts
|
|
128
|
-
function
|
|
128
|
+
function Ee(...e) {
|
|
129
129
|
let t = {};
|
|
130
130
|
return e.forEach((e) => {
|
|
131
131
|
e && (t = W(t, e));
|
|
@@ -148,7 +148,7 @@ var G = class {
|
|
|
148
148
|
if (e) {
|
|
149
149
|
e in this.caching || (this.caching[e] = I(() => this.computeModification(e)));
|
|
150
150
|
let n = this.caching[e];
|
|
151
|
-
if (n) return t ?
|
|
151
|
+
if (n) return t ? Ee(n.value, t) : n.value;
|
|
152
152
|
}
|
|
153
153
|
return t;
|
|
154
154
|
}
|
|
@@ -159,7 +159,7 @@ var G = 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 Te(this.get(e), this.getModification(i, t), n, i);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
renderAdd(e, t, n, r, i) {
|
|
@@ -170,15 +170,15 @@ var G = class {
|
|
|
170
170
|
let n = U((t = this.modification) == null ? void 0 : t[e]);
|
|
171
171
|
if (n && M(n)) {
|
|
172
172
|
let e = {};
|
|
173
|
-
return
|
|
173
|
+
return w(n, (t, n) => {
|
|
174
174
|
e[n] = U(t);
|
|
175
175
|
}), e;
|
|
176
176
|
}
|
|
177
177
|
return {};
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, De = class extends G {}, Oe = class {
|
|
180
180
|
constructor(e, t, n) {
|
|
181
|
-
H(this, "props", void 0), H(this, "options", void 0), H(this, "name", void 0), H(this, "element", R()), H(this, "refs", void 0), H(this, "components", void 0), H(this, "emits", void 0), H(this, "classes", void 0), H(this, "classesSub", void 0), H(this, "styles", void 0), H(this, "stylesSub", void 0), H(this, "attrs", void 0), H(this, "slots", void 0), H(this, "dataExpose", void 0), this.props = t, this.options = n, this.name = this.initName(e), this.refs = this.props ?
|
|
181
|
+
H(this, "props", void 0), H(this, "options", void 0), H(this, "name", void 0), H(this, "element", R()), H(this, "refs", void 0), H(this, "components", void 0), H(this, "emits", void 0), H(this, "classes", void 0), H(this, "classesSub", void 0), H(this, "styles", void 0), H(this, "stylesSub", void 0), H(this, "attrs", void 0), H(this, "slots", void 0), H(this, "dataExpose", void 0), this.props = t, this.options = n, this.name = this.initName(e), this.refs = this.props ? pe(this.props) : {}, this.components = new G(n == null ? void 0 : n.components, n == null ? void 0 : n.compMod), this.emits = n == null ? void 0 : n.emits, this.classes = I(() => this.updateClasses()), this.styles = I(() => this.updateStyles()), this.attrs = he(), this.slots = ge();
|
|
182
182
|
}
|
|
183
183
|
init() {
|
|
184
184
|
return this.classesSub = I(() => this.initClasses()), this.stylesSub = I(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
|
|
@@ -226,14 +226,14 @@ var G = class {
|
|
|
226
226
|
toClassName(e) {
|
|
227
227
|
if (j(e)) {
|
|
228
228
|
let t = {};
|
|
229
|
-
return
|
|
229
|
+
return w(e, (e, n) => {
|
|
230
230
|
n.match(/\?\?/) ? t[n.replace(/\?\?/, this.getName())] = e : n.match(/\?/) ? t[n.replace(/\?/, this.getDesign())] = e : t[n] = e;
|
|
231
231
|
}), t;
|
|
232
232
|
}
|
|
233
233
|
return {};
|
|
234
234
|
}
|
|
235
235
|
initName(e) {
|
|
236
|
-
return
|
|
236
|
+
return w(e.split(".", 2), (e) => ne(e));
|
|
237
237
|
}
|
|
238
238
|
updateClasses() {
|
|
239
239
|
var e, t, n;
|
|
@@ -268,13 +268,13 @@ function K(e) {
|
|
|
268
268
|
}
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/classes/ref/DatetimeRef.ts
|
|
271
|
-
var
|
|
271
|
+
var ke = class {
|
|
272
272
|
constructor(e, t = "date", n = u.getLocation()) {
|
|
273
|
-
H(this, "item", void 0), H(this, "type", void 0), H(this, "code", void 0), H(this, "date", void 0), H(this, "datetime", void 0), H(this, "year", R(2e3)), H(this, "month", R(1)), H(this, "day", R(1)), H(this, "hour", R(1)), H(this, "minute", R(1)), H(this, "second", R(1)), this.item = K(e), this.type = K(t), this.code = K(n), this.date = R(
|
|
274
|
-
this.date.value =
|
|
273
|
+
H(this, "item", void 0), H(this, "type", void 0), H(this, "code", void 0), H(this, "date", void 0), H(this, "datetime", void 0), H(this, "year", R(2e3)), H(this, "month", R(1)), H(this, "day", R(1)), H(this, "hour", R(1)), H(this, "minute", R(1)), H(this, "second", R(1)), this.item = K(e), this.type = K(t), this.code = K(n), this.date = R(re(this.item.value)), this.datetime = new o(this.date.value, this.type.value, this.code.value), B(this.item, (e) => {
|
|
274
|
+
this.date.value = re(e);
|
|
275
275
|
}), B(this.type, (e) => this.datetime.setType(e)), B(this.code, (e) => this.datetime.setCode(e)), B(this.date, (e) => {
|
|
276
276
|
this.datetime.setDate(e), this.updateDate();
|
|
277
|
-
}), this.datetime.setWatch(() =>
|
|
277
|
+
}), this.datetime.setWatch(() => me(this.date)), this.updateDate();
|
|
278
278
|
}
|
|
279
279
|
getItem() {
|
|
280
280
|
return this.item;
|
|
@@ -326,14 +326,14 @@ var Oe = class {
|
|
|
326
326
|
return this.getScope().run(e);
|
|
327
327
|
}
|
|
328
328
|
static getScope() {
|
|
329
|
-
return
|
|
329
|
+
return b.get("__ui:effect-scope-global__", () => ae(!0));
|
|
330
330
|
}
|
|
331
|
-
},
|
|
331
|
+
}, Ae = class extends c {
|
|
332
332
|
constructor(e, t, n = ["click"], r, i, a) {
|
|
333
333
|
let o = K(e), s = K(t);
|
|
334
334
|
super(o.value, n, r, i, a), s.value && this.setElementControl(s.value), B(o, (e) => this.setElement(e)), B(s, (e) => this.setElementControl(e));
|
|
335
335
|
}
|
|
336
|
-
},
|
|
336
|
+
}, je = class {
|
|
337
337
|
constructor(e = u.getLocation()) {
|
|
338
338
|
H(this, "flag", void 0), this.flag = I(() => new d(U(e)));
|
|
339
339
|
}
|
|
@@ -343,39 +343,48 @@ var Oe = class {
|
|
|
343
343
|
get(e = this.getCode()) {
|
|
344
344
|
return I(() => this.flag.value.get(U(e)));
|
|
345
345
|
}
|
|
346
|
+
getLanguage(e = this.getCode()) {
|
|
347
|
+
return I(() => this.flag.value.getLanguage(U(e)));
|
|
348
|
+
}
|
|
346
349
|
getFlag(e = this.getCode()) {
|
|
347
350
|
return I(() => this.flag.value.getFlag(U(e)));
|
|
348
351
|
}
|
|
349
352
|
getList(e) {
|
|
350
353
|
return I(() => this.flag.value.getList(U(e)));
|
|
351
354
|
}
|
|
355
|
+
getListLanguage(e) {
|
|
356
|
+
return I(() => this.flag.value.getListLanguage(U(e)));
|
|
357
|
+
}
|
|
352
358
|
getNational(e) {
|
|
353
359
|
return I(() => this.flag.value.getNational(U(e)));
|
|
354
360
|
}
|
|
361
|
+
getNationalLanguage(e) {
|
|
362
|
+
return I(() => this.flag.value.getNationalLanguage(U(e)));
|
|
363
|
+
}
|
|
355
364
|
}, J = class {
|
|
356
365
|
static get() {
|
|
357
|
-
return
|
|
366
|
+
return b.get("__ui:geo-ref__", () => z(u.getItem()));
|
|
358
367
|
}
|
|
359
368
|
static getCountry() {
|
|
360
|
-
return
|
|
369
|
+
return b.get("__ui:geo-ref-country__", () => I(() => this.get().value.country));
|
|
361
370
|
}
|
|
362
371
|
static getLanguage() {
|
|
363
|
-
return
|
|
372
|
+
return b.get("__ui:geo-ref-language__", () => I(() => this.get().value.language));
|
|
364
373
|
}
|
|
365
374
|
static getStandard() {
|
|
366
|
-
return
|
|
375
|
+
return b.get("__ui:geo-ref-standard__", () => I(() => this.get().value.standard));
|
|
367
376
|
}
|
|
368
377
|
static getFirstDay() {
|
|
369
|
-
return
|
|
378
|
+
return b.get("__ui:geo-ref-first-day__", () => I(() => this.get().value.firstDay));
|
|
370
379
|
}
|
|
371
380
|
static getLocation() {
|
|
372
|
-
return
|
|
381
|
+
return b.get("__ui:geo-ref-location__", () => I(() => this.get().value.location));
|
|
373
382
|
}
|
|
374
383
|
static getLocationCountry() {
|
|
375
|
-
return
|
|
384
|
+
return b.get("__ui:geo-ref-location-country__", () => I(() => this.get().value.locationCountry));
|
|
376
385
|
}
|
|
377
386
|
static getLocationLanguage() {
|
|
378
|
-
return
|
|
387
|
+
return b.get("__ui:geo-ref-location-language__", () => I(() => this.get().value.locationLanguage));
|
|
379
388
|
}
|
|
380
389
|
static set(e) {
|
|
381
390
|
u.set(e, !0), this.get().value = u.getItem();
|
|
@@ -383,7 +392,7 @@ var Oe = class {
|
|
|
383
392
|
static setValueDefault(e) {
|
|
384
393
|
u.setValueDefault(e), this.get().value = u.getItem();
|
|
385
394
|
}
|
|
386
|
-
},
|
|
395
|
+
}, Me = class {
|
|
387
396
|
constructor(e) {
|
|
388
397
|
H(this, "location", void 0), H(this, "intl", void 0), this.location = K(e), this.intl = I(() => {
|
|
389
398
|
var e;
|
|
@@ -456,9 +465,9 @@ var Oe = class {
|
|
|
456
465
|
sort(e, t = (e, t) => [e, t]) {
|
|
457
466
|
return I(() => this.intl.value.sort([...U(e)], t));
|
|
458
467
|
}
|
|
459
|
-
},
|
|
468
|
+
}, Ne = class e {
|
|
460
469
|
constructor(e, t, n, r, i, a, o, s, c, l = 0, u = 9999999, d) {
|
|
461
|
-
H(this, "list", void 0), H(this, "focus", void 0), H(this, "highlight", void 0), H(this, "highlightLengthStart", void 0), H(this, "filterMode", void 0), H(this, "selected", void 0), H(this, "keyValue", void 0), H(this, "keyLabel", void 0), H(this, "lite", void 0), H(this, "min", void 0), H(this, "max", void 0), H(this, "parent", void 0), H(this, "subList", {}), H(this, "data", I(() =>
|
|
470
|
+
H(this, "list", void 0), H(this, "focus", void 0), H(this, "highlight", void 0), H(this, "highlightLengthStart", void 0), H(this, "filterMode", void 0), H(this, "selected", void 0), H(this, "keyValue", void 0), H(this, "keyLabel", void 0), H(this, "lite", void 0), H(this, "min", void 0), H(this, "max", void 0), H(this, "parent", void 0), H(this, "subList", {}), H(this, "data", I(() => w(U(this.list) || [], (e, t) => this.initItem(t, e)))), H(this, "liteData", I(() => {
|
|
462
471
|
if (this.isLite()) {
|
|
463
472
|
let e = [];
|
|
464
473
|
for (let t of this.data.value) {
|
|
@@ -477,7 +486,7 @@ var Oe = class {
|
|
|
477
486
|
return this.data.value;
|
|
478
487
|
})), H(this, "fullData", I(() => {
|
|
479
488
|
let e = this.getFocus(), t = this.getHighlight(), n = this.getSelected();
|
|
480
|
-
return
|
|
489
|
+
return w(this.data.value, (r) => {
|
|
481
490
|
var i, a;
|
|
482
491
|
let o = N(r.index, n);
|
|
483
492
|
return {
|
|
@@ -505,7 +514,7 @@ var Oe = class {
|
|
|
505
514
|
})), H(this, "mapItems", I(() => this.map.value.filter((e) => e.type === "item"))), H(this, "items", I(() => this.map.value.filter((e) => e.type === "item" || e.type === "group" || e.type === "menu"))), H(this, "highlightFirstItem", I(() => {
|
|
506
515
|
let e = this.getHighlight();
|
|
507
516
|
if (e && e.length >= this.getHighlightLengthStart()) {
|
|
508
|
-
let t =
|
|
517
|
+
let t = D(e, "i");
|
|
509
518
|
if (t) return this.map.value.findIndex((e) => {
|
|
510
519
|
var n, r, i;
|
|
511
520
|
return ((n = e.label) == null ? void 0 : n.toString().match(t)) || ((r = e.index) == null ? void 0 : r.toString().match(t)) || ((i = e.search) == null ? void 0 : i.toString().match(t));
|
|
@@ -527,7 +536,7 @@ var Oe = class {
|
|
|
527
536
|
})), H(this, "selectedListInGroup", I(() => {
|
|
528
537
|
let e = this.getSelected();
|
|
529
538
|
return e && this.isSelected.value ? this.data.value.filter((t) => N(t.index, e)) : [];
|
|
530
|
-
})), H(this, "selectedNames", I(() =>
|
|
539
|
+
})), H(this, "selectedNames", I(() => T(this.selectedList.value, "label"))), H(this, "selectedValues", I(() => T(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, L(e) && B(e, () => {
|
|
531
540
|
this.subList = {};
|
|
532
541
|
});
|
|
533
542
|
}
|
|
@@ -664,9 +673,9 @@ var Oe = class {
|
|
|
664
673
|
value: e
|
|
665
674
|
};
|
|
666
675
|
}
|
|
667
|
-
},
|
|
676
|
+
}, Pe = "__ui:router-item-ref__", Y = class {
|
|
668
677
|
static get() {
|
|
669
|
-
return
|
|
678
|
+
return b.get(Pe);
|
|
670
679
|
}
|
|
671
680
|
static getLink(e, t, n) {
|
|
672
681
|
var r;
|
|
@@ -688,7 +697,7 @@ var Oe = class {
|
|
|
688
697
|
t && t.push(e).then();
|
|
689
698
|
}
|
|
690
699
|
static set(e) {
|
|
691
|
-
|
|
700
|
+
b.set(Pe, () => e);
|
|
692
701
|
}
|
|
693
702
|
static setOneTime(e) {
|
|
694
703
|
this.get() || this.set(e);
|
|
@@ -696,26 +705,26 @@ var Oe = class {
|
|
|
696
705
|
static rawToHref(e) {
|
|
697
706
|
return M(e) && "name" in e && P(e == null ? void 0 : e.name) ? this.getHref(e.name) : {};
|
|
698
707
|
}
|
|
699
|
-
},
|
|
708
|
+
}, Fe = class {
|
|
700
709
|
constructor() {
|
|
701
|
-
H(this, "item", R()), H(this, "width", R(0)), H(this, "is", I(() => this.item.value !== void 0)), k() && (
|
|
710
|
+
H(this, "item", R()), H(this, "width", R(0)), H(this, "is", I(() => this.item.value !== void 0)), k() && (v.is().then((e) => {
|
|
702
711
|
this.item.value = e;
|
|
703
|
-
}),
|
|
712
|
+
}), v.get().then((e) => {
|
|
704
713
|
this.width.value = e;
|
|
705
714
|
}));
|
|
706
715
|
}
|
|
707
716
|
};
|
|
708
717
|
//#endregion
|
|
709
718
|
//#region src/functions/ref/getApiErrorRef.ts
|
|
710
|
-
function
|
|
719
|
+
function Ie(e) {
|
|
711
720
|
return I(() => {
|
|
712
|
-
if (!(!e.value ||
|
|
721
|
+
if (!(!e.value || O(e.value) || !M(e.value))) return e.value.errorObject;
|
|
713
722
|
});
|
|
714
723
|
}
|
|
715
724
|
//#endregion
|
|
716
725
|
//#region src/functions/getOptions.ts
|
|
717
726
|
var X = (e) => typeof e == "string" ? { method: e } : e || {}, Z;
|
|
718
|
-
function
|
|
727
|
+
function Le(n, r, i = !0, a, o, s, c, l = !0, u = e.getItem()) {
|
|
719
728
|
let d = R(), f = K(X(r)), p = R(!1), m = R(!1), h = R(), g, _ = !0, v, y = () => {
|
|
720
729
|
let e = U(n);
|
|
721
730
|
return !!((!a || a.value) && e);
|
|
@@ -753,9 +762,9 @@ function Ie(n, r, i = !0, a, o, s, c, l = !0, u = e.getItem()) {
|
|
|
753
762
|
x(), d.value === void 0 && S().then(), l ? E() : q.run(() => E());
|
|
754
763
|
}
|
|
755
764
|
};
|
|
756
|
-
l &&
|
|
765
|
+
l && oe() && de(() => C());
|
|
757
766
|
let T = () => {
|
|
758
|
-
k() ||
|
|
767
|
+
k() || ue(async () => {
|
|
759
768
|
_ = !1, await S();
|
|
760
769
|
});
|
|
761
770
|
}, E = () => {
|
|
@@ -763,7 +772,7 @@ function Ie(n, r, i = !0, a, o, s, c, l = !0, u = e.getItem()) {
|
|
|
763
772
|
i && e.push(f), L(n) && e.push(n), a && e.push(a), Z && e.push(Z), e.length > 0 && (v = B(e, async () => {
|
|
764
773
|
p.value || await S();
|
|
765
774
|
}));
|
|
766
|
-
}, D = I(() => (w(), d.value)), O =
|
|
775
|
+
}, D = I(() => (w(), d.value)), O = Ie(d), ee = I(() => Array.isArray(d.value) ? d.value.length : +!!d.value), A = I(() => d.value === void 0);
|
|
767
776
|
return {
|
|
768
777
|
data: D,
|
|
769
778
|
get item() {
|
|
@@ -775,8 +784,8 @@ function Ie(n, r, i = !0, a, o, s, c, l = !0, u = e.getItem()) {
|
|
|
775
784
|
return ((e = h.value) == null ? void 0 : e.status) === "success";
|
|
776
785
|
}),
|
|
777
786
|
responseValidationResult: I(() => h.value),
|
|
778
|
-
length:
|
|
779
|
-
starting:
|
|
787
|
+
length: ee,
|
|
788
|
+
starting: A,
|
|
780
789
|
loading: p,
|
|
781
790
|
reading: m,
|
|
782
791
|
isStarting() {
|
|
@@ -798,13 +807,13 @@ function Ie(n, r, i = !0, a, o, s, c, l = !0, u = e.getItem()) {
|
|
|
798
807
|
abort: () => g == null ? void 0 : g.abort()
|
|
799
808
|
};
|
|
800
809
|
}
|
|
801
|
-
var
|
|
810
|
+
var Re = (e) => {
|
|
802
811
|
Z || (Z = e);
|
|
803
812
|
};
|
|
804
813
|
//#endregion
|
|
805
814
|
//#region src/composables/ref/useApiAsyncRef.ts
|
|
806
|
-
function
|
|
807
|
-
let u =
|
|
815
|
+
function ze(t, n, r = !0, i, a, o, s, c = !0, l = e.getItem()) {
|
|
816
|
+
let u = Le(t, n, r, i, a, o, s, c, l);
|
|
808
817
|
return u.initSsr(), u;
|
|
809
818
|
}
|
|
810
819
|
//#endregion
|
|
@@ -818,7 +827,7 @@ function Q({ path: r, method: i = n.post, action: a, transformation: o, validate
|
|
|
818
827
|
try {
|
|
819
828
|
if (e && s) {
|
|
820
829
|
let t = s(e);
|
|
821
|
-
if (t && !
|
|
830
|
+
if (t && !O(t)) return t;
|
|
822
831
|
}
|
|
823
832
|
if (p.value = !0, t = await f.request({
|
|
824
833
|
path: U(r),
|
|
@@ -827,11 +836,11 @@ function Q({ path: r, method: i = n.post, action: a, transformation: o, validate
|
|
|
827
836
|
toData: u,
|
|
828
837
|
...m.value
|
|
829
838
|
}), t) {
|
|
830
|
-
if (c &&
|
|
839
|
+
if (c && O(t)) {
|
|
831
840
|
let e = c(t);
|
|
832
|
-
e && !
|
|
841
|
+
e && !O(e) && (t = e);
|
|
833
842
|
}
|
|
834
|
-
if (o &&
|
|
843
|
+
if (o && O(t) && (t = o(t)), a) {
|
|
835
844
|
let e = a(t);
|
|
836
845
|
e instanceof Promise && await e;
|
|
837
846
|
}
|
|
@@ -845,7 +854,7 @@ function Q({ path: r, method: i = n.post, action: a, transformation: o, validate
|
|
|
845
854
|
}
|
|
846
855
|
//#endregion
|
|
847
856
|
//#region src/composables/ref/useApiDelete.ts
|
|
848
|
-
function
|
|
857
|
+
function Be(e) {
|
|
849
858
|
return Q({
|
|
850
859
|
...e,
|
|
851
860
|
method: n.delete
|
|
@@ -853,7 +862,7 @@ function ze(e) {
|
|
|
853
862
|
}
|
|
854
863
|
//#endregion
|
|
855
864
|
//#region src/composables/ref/useApiGet.ts
|
|
856
|
-
function
|
|
865
|
+
function Ve(e) {
|
|
857
866
|
return Q({
|
|
858
867
|
...e,
|
|
859
868
|
method: n.get
|
|
@@ -861,7 +870,7 @@ function Be(e) {
|
|
|
861
870
|
}
|
|
862
871
|
//#endregion
|
|
863
872
|
//#region src/composables/ref/useApiPost.ts
|
|
864
|
-
function
|
|
873
|
+
function He(e) {
|
|
865
874
|
return Q({
|
|
866
875
|
...e,
|
|
867
876
|
method: n.post
|
|
@@ -869,7 +878,7 @@ function Ve(e) {
|
|
|
869
878
|
}
|
|
870
879
|
//#endregion
|
|
871
880
|
//#region src/composables/ref/useApiPut.ts
|
|
872
|
-
function
|
|
881
|
+
function Ue(e) {
|
|
873
882
|
return Q({
|
|
874
883
|
...e,
|
|
875
884
|
method: n.put
|
|
@@ -877,7 +886,7 @@ function He(e) {
|
|
|
877
886
|
}
|
|
878
887
|
//#endregion
|
|
879
888
|
//#region src/composables/ref/useFormattersRef.ts
|
|
880
|
-
function
|
|
889
|
+
function We(e, t) {
|
|
881
890
|
let n = new l(t);
|
|
882
891
|
return {
|
|
883
892
|
listFormat: I(() => n.setList(e.value).to()),
|
|
@@ -886,7 +895,7 @@ function Ue(e, t) {
|
|
|
886
895
|
}
|
|
887
896
|
//#endregion
|
|
888
897
|
//#region src/composables/ref/useSearchValueRef.ts
|
|
889
|
-
function
|
|
898
|
+
function Ge(e, t) {
|
|
890
899
|
let n = t == null ? R("") : t, r = R(n.value), i = R(!1), a;
|
|
891
900
|
return B(n, (t, o, s) => {
|
|
892
901
|
let c = e.getOptions().getDelay();
|
|
@@ -903,8 +912,8 @@ function We(e, t) {
|
|
|
903
912
|
}
|
|
904
913
|
//#endregion
|
|
905
914
|
//#region src/composables/ref/useSearchRef.ts
|
|
906
|
-
function
|
|
907
|
-
let i = new
|
|
915
|
+
function Ke(e, t, n, r) {
|
|
916
|
+
let i = new y(void 0, t, void 0, r), { search: a, searchDelay: o, loading: s } = Ge(i, n), c = () => U(S(e)) || [], l = I(() => i.setValue(o.value).getItem().isSearch()), u = I(() => i.setList(c()).setValue(o.value).to());
|
|
908
917
|
return {
|
|
909
918
|
isSearch: l,
|
|
910
919
|
search: a,
|
|
@@ -915,33 +924,33 @@ function Ge(e, t, n, r) {
|
|
|
915
924
|
}
|
|
916
925
|
//#endregion
|
|
917
926
|
//#region src/composables/ref/useApiManagementRef.ts
|
|
918
|
-
function
|
|
919
|
-
let { path: c, options: l, reactivity: u, conditions: d, transformation: f, validateResponseContract: p, errorContract: m, typeData: h, unmounted: g, skeleton: _ } = e, v, y, b, x,
|
|
920
|
-
if (t && (v =
|
|
927
|
+
function qe(e, t, n, r, i, a, o, s) {
|
|
928
|
+
let { path: c, options: l, reactivity: u, conditions: d, transformation: f, validateResponseContract: p, errorContract: m, typeData: h, unmounted: g, skeleton: _ } = e, v, y, b, x, S, w = Le(c, l, u, d, f, p, m, g, s), T = I(() => h === void 0 ? !0 : w.isStarting() ? !1 : A(h) ? h(w.data.value) : w.data.value instanceof h), E = I(() => w.isStarting() && _ ? _() : w.data.value);
|
|
929
|
+
if (t && (v = We(E, t)), n && (y = Ke(I(() => {
|
|
921
930
|
var e;
|
|
922
931
|
let t = (e = v == null ? void 0 : v.listFormat.value) == null ? w.data.value : e;
|
|
923
932
|
if (Array.isArray(t)) return t;
|
|
924
933
|
}), n.columns, n.value, n.options)), r || i || a) {
|
|
925
934
|
let e = (e) => {
|
|
926
|
-
o == null || o(),
|
|
935
|
+
o == null || o(), O(e) && w.reset().then();
|
|
927
936
|
}, t = (t) => async (n) => {
|
|
928
|
-
A(t) && await
|
|
937
|
+
A(t) && await C(t(n)), e(n);
|
|
929
938
|
};
|
|
930
|
-
r && (b =
|
|
939
|
+
r && (b = He({
|
|
931
940
|
...r,
|
|
932
941
|
action: t(r.action),
|
|
933
942
|
apiInstance: s
|
|
934
|
-
})), i && (x =
|
|
943
|
+
})), i && (x = Ue({
|
|
935
944
|
...i,
|
|
936
945
|
action: t(i.action),
|
|
937
946
|
apiInstance: s
|
|
938
|
-
})), a && (
|
|
947
|
+
})), a && (S = Be({
|
|
939
948
|
...a,
|
|
940
949
|
action: t(a.action),
|
|
941
950
|
apiInstance: s
|
|
942
951
|
}));
|
|
943
952
|
}
|
|
944
|
-
let
|
|
953
|
+
let D = I(() => {
|
|
945
954
|
if (T.value) {
|
|
946
955
|
if (y && Array.isArray(w.data.value)) return y.listSearch.value;
|
|
947
956
|
if (v) return v.listFormat.value;
|
|
@@ -952,7 +961,7 @@ function Ke(e, t, n, r, i, a, o, s) {
|
|
|
952
961
|
isValid: T,
|
|
953
962
|
isResponseContractValid: w.isResponseContractValid,
|
|
954
963
|
responseValidationResult: w.responseValidationResult,
|
|
955
|
-
list:
|
|
964
|
+
list: D,
|
|
956
965
|
get data() {
|
|
957
966
|
return w.data;
|
|
958
967
|
},
|
|
@@ -967,7 +976,7 @@ function Ke(e, t, n, r, i, a, o, s) {
|
|
|
967
976
|
loadingSearch: y == null ? void 0 : y.loading,
|
|
968
977
|
loadingPost: b == null ? void 0 : b.loading,
|
|
969
978
|
loadingPut: x == null ? void 0 : x.loading,
|
|
970
|
-
loadingDelete:
|
|
979
|
+
loadingDelete: S == null ? void 0 : S.loading,
|
|
971
980
|
isSearch: y == null ? void 0 : y.isSearch,
|
|
972
981
|
search: y == null ? void 0 : y.search,
|
|
973
982
|
init: w.init,
|
|
@@ -976,22 +985,22 @@ function Ke(e, t, n, r, i, a, o, s) {
|
|
|
976
985
|
abort: w.abort,
|
|
977
986
|
sendPost: async (e) => await (b == null ? void 0 : b.send(e)),
|
|
978
987
|
sendPut: async (e) => await (x == null ? void 0 : x.send(e)),
|
|
979
|
-
sendDelete: async (e) => await (
|
|
988
|
+
sendDelete: async (e) => await (S == null ? void 0 : S.send(e))
|
|
980
989
|
};
|
|
981
990
|
}
|
|
982
991
|
//#endregion
|
|
983
992
|
//#region src/composables/ref/useApiManagementAsyncRef.ts
|
|
984
|
-
function
|
|
985
|
-
let c =
|
|
993
|
+
function Je(e, t, n, r, i, a, o, s) {
|
|
994
|
+
let c = qe(e, t, n, r, i, a, o, s);
|
|
986
995
|
return c.initSsr(), c;
|
|
987
996
|
}
|
|
988
997
|
//#endregion
|
|
989
998
|
//#region src/composables/ref/useBroadcastValueRef.ts
|
|
990
|
-
var
|
|
991
|
-
function
|
|
992
|
-
let n = `broadcast--${e}`, i =
|
|
999
|
+
var Ye = () => b.get("__ui:broadcast-value-ref__", () => ({}));
|
|
1000
|
+
function Xe(e, t) {
|
|
1001
|
+
let n = `broadcast--${e}`, i = Ye();
|
|
993
1002
|
if (n in i) return i[n];
|
|
994
|
-
let a = R(
|
|
1003
|
+
let a = R(S(t));
|
|
995
1004
|
if (k()) {
|
|
996
1005
|
let e = new r(n, (e) => {
|
|
997
1006
|
a.value !== e.data.message && (a.value = e.data.message);
|
|
@@ -1004,11 +1013,11 @@ function Ye(e, t) {
|
|
|
1004
1013
|
}
|
|
1005
1014
|
//#endregion
|
|
1006
1015
|
//#region src/composables/ref/useCookieRef.ts
|
|
1007
|
-
var
|
|
1008
|
-
function
|
|
1009
|
-
let r =
|
|
1016
|
+
var Ze = () => b.get("__ui:cookie-ref__", () => ({}));
|
|
1017
|
+
function Qe(e, t, n) {
|
|
1018
|
+
let r = Ze();
|
|
1010
1019
|
if (e in r) return r[e];
|
|
1011
|
-
let a = new i(e), o =
|
|
1020
|
+
let a = new i(e), o = Xe(`__cookie:${e}`, a.get(t, n));
|
|
1012
1021
|
return q.run(() => {
|
|
1013
1022
|
B(o, (e) => {
|
|
1014
1023
|
a.set(e, n);
|
|
@@ -1017,14 +1026,14 @@ function Ze(e, t, n) {
|
|
|
1017
1026
|
}
|
|
1018
1027
|
//#endregion
|
|
1019
1028
|
//#region src/composables/ref/useGeoIntlRef.ts
|
|
1020
|
-
function
|
|
1021
|
-
return new
|
|
1029
|
+
function $e() {
|
|
1030
|
+
return new Me();
|
|
1022
1031
|
}
|
|
1023
1032
|
//#endregion
|
|
1024
1033
|
//#region src/composables/ref/useHashRef.ts
|
|
1025
|
-
var
|
|
1026
|
-
function
|
|
1027
|
-
let n =
|
|
1034
|
+
var et = () => b.get("__ui:hash-ref__", () => ({}));
|
|
1035
|
+
function tt(e, t) {
|
|
1036
|
+
let n = et();
|
|
1028
1037
|
if (e in n) return n[e];
|
|
1029
1038
|
let r = z(p.get(e, t));
|
|
1030
1039
|
return k() && (q.run(() => {
|
|
@@ -1035,10 +1044,10 @@ function et(e, t) {
|
|
|
1035
1044
|
}
|
|
1036
1045
|
//#endregion
|
|
1037
1046
|
//#region src/composables/ref/useLazyRef.ts
|
|
1038
|
-
var
|
|
1047
|
+
var nt = (e = { rootMargin: "128px 0px" }) => {
|
|
1039
1048
|
let t = {}, n = k() && "IntersectionObserver" in window ? new IntersectionObserver((e) => {
|
|
1040
1049
|
e.forEach((e) => {
|
|
1041
|
-
let n =
|
|
1050
|
+
let n = E(e.target);
|
|
1042
1051
|
if (n in t) {
|
|
1043
1052
|
let r = t[n];
|
|
1044
1053
|
r.status.value = e.isIntersecting, r.ratio.value = e.intersectionRatio, r.entry.value = e;
|
|
@@ -1046,7 +1055,7 @@ var tt = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1046
1055
|
});
|
|
1047
1056
|
}, e) : void 0, r = (e) => {
|
|
1048
1057
|
if (e) {
|
|
1049
|
-
let i =
|
|
1058
|
+
let i = E(e);
|
|
1050
1059
|
if (i in t) {
|
|
1051
1060
|
var r;
|
|
1052
1061
|
n == null || n.unobserve(e), (r = t[i]) == null || r.stopWatch(), delete t[i];
|
|
@@ -1056,7 +1065,7 @@ var tt = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1056
1065
|
return {
|
|
1057
1066
|
intersectionObserver: n,
|
|
1058
1067
|
getItem(e) {
|
|
1059
|
-
return t[
|
|
1068
|
+
return t[E(e)];
|
|
1060
1069
|
},
|
|
1061
1070
|
addLazyItem(e) {
|
|
1062
1071
|
let i = z(!n);
|
|
@@ -1064,7 +1073,7 @@ var tt = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1064
1073
|
let a;
|
|
1065
1074
|
a = B(e, (o, s) => {
|
|
1066
1075
|
if (s && r(s), e.value) {
|
|
1067
|
-
let r =
|
|
1076
|
+
let r = E(e.value);
|
|
1068
1077
|
t[r] = {
|
|
1069
1078
|
status: i,
|
|
1070
1079
|
ratio: z(0),
|
|
@@ -1079,16 +1088,16 @@ var tt = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1079
1088
|
removeLazyItem: r,
|
|
1080
1089
|
disconnectLazy: () => n == null ? void 0 : n.disconnect()
|
|
1081
1090
|
};
|
|
1082
|
-
},
|
|
1083
|
-
let t =
|
|
1091
|
+
}, rt = () => b.get("__ui:lazy-item-by-margin-ref__", () => []), it = (e) => {
|
|
1092
|
+
let t = rt(), n = t.find((t) => t.rootMargin === e);
|
|
1084
1093
|
if (n) return n.item;
|
|
1085
|
-
let r =
|
|
1094
|
+
let r = nt({ rootMargin: e });
|
|
1086
1095
|
return t.push({
|
|
1087
1096
|
rootMargin: e,
|
|
1088
1097
|
item: r
|
|
1089
1098
|
}), r;
|
|
1090
|
-
},
|
|
1091
|
-
let n =
|
|
1099
|
+
}, at = (e, t) => {
|
|
1100
|
+
let n = it(t);
|
|
1092
1101
|
return {
|
|
1093
1102
|
lazyItemStatus: n.addLazyItem(e),
|
|
1094
1103
|
get lazyItem() {
|
|
@@ -1098,7 +1107,7 @@ var tt = (e = { rootMargin: "128px 0px" }) => {
|
|
|
1098
1107
|
};
|
|
1099
1108
|
//#endregion
|
|
1100
1109
|
//#region src/composables/ref/useLoadingRef.ts
|
|
1101
|
-
function
|
|
1110
|
+
function ot() {
|
|
1102
1111
|
let e = z(h.is());
|
|
1103
1112
|
return k() && h.registrationEvent(({ detail: t }) => {
|
|
1104
1113
|
e.value = t.loading;
|
|
@@ -1106,11 +1115,11 @@ function at() {
|
|
|
1106
1115
|
}
|
|
1107
1116
|
//#endregion
|
|
1108
1117
|
//#region src/functions/executeUse.ts
|
|
1109
|
-
var
|
|
1118
|
+
var st = /* @__PURE__ */ function(e) {
|
|
1110
1119
|
return e.global = "global", e.provide = "provide", e.local = "local", e;
|
|
1111
|
-
}({}),
|
|
1120
|
+
}({}), ct = 1, lt = te(1e5, 999999), ut = () => `__execute_use${lt}::${ct++}`, dt = () => b.get("__ui:execute-use-global__", () => []);
|
|
1112
1121
|
function $(e, t = "provide") {
|
|
1113
|
-
let n =
|
|
1122
|
+
let n = ut(), r, i = (t) => {
|
|
1114
1123
|
let n = Object.freeze(e(...t));
|
|
1115
1124
|
return {
|
|
1116
1125
|
...n,
|
|
@@ -1120,7 +1129,7 @@ function $(e, t = "provide") {
|
|
|
1120
1129
|
};
|
|
1121
1130
|
}, a = (e) => {
|
|
1122
1131
|
let t = Object.freeze(i(e));
|
|
1123
|
-
return
|
|
1132
|
+
return fe(n, t), t;
|
|
1124
1133
|
}, o = (e) => {
|
|
1125
1134
|
let t = i(e);
|
|
1126
1135
|
return Object.freeze({
|
|
@@ -1129,26 +1138,26 @@ function $(e, t = "provide") {
|
|
|
1129
1138
|
r = void 0;
|
|
1130
1139
|
}
|
|
1131
1140
|
});
|
|
1132
|
-
}, s = (...e) => t === "provide" ?
|
|
1141
|
+
}, s = (...e) => t === "provide" ? le(n, void 0) || a(e) : (r || q.run(() => {
|
|
1133
1142
|
r = o(e);
|
|
1134
1143
|
}), r);
|
|
1135
|
-
return t === "global" &&
|
|
1144
|
+
return t === "global" && dt().push(s), s;
|
|
1136
1145
|
}
|
|
1137
|
-
function
|
|
1146
|
+
function ft(e) {
|
|
1138
1147
|
return $(e, "global");
|
|
1139
1148
|
}
|
|
1140
|
-
function
|
|
1149
|
+
function pt(e) {
|
|
1141
1150
|
return $(e, "provide");
|
|
1142
1151
|
}
|
|
1143
|
-
function
|
|
1152
|
+
function mt(e) {
|
|
1144
1153
|
return $(e, "local");
|
|
1145
1154
|
}
|
|
1146
|
-
function
|
|
1147
|
-
|
|
1155
|
+
function ht() {
|
|
1156
|
+
dt().forEach((e) => e());
|
|
1148
1157
|
}
|
|
1149
1158
|
//#endregion
|
|
1150
1159
|
//#region src/composables/ref/useMeta.ts
|
|
1151
|
-
var
|
|
1160
|
+
var gt = mt(() => {
|
|
1152
1161
|
let e = g, t = R(e.getTitle()), n = R(e.getKeywords()), r = R(e.getDescription()), i = R(e.getImage()), a = R(e.getCanonical()), o = R(e.getRobots()), s = R(e.getAuthor()), c = R(e.getSiteName()), l = () => e.html(), u = (e) => {
|
|
1153
1162
|
t.value = e, x();
|
|
1154
1163
|
}, d = (e) => {
|
|
@@ -1205,7 +1214,20 @@ var ht = pt(() => {
|
|
|
1205
1214
|
setSiteName: v,
|
|
1206
1215
|
setSuffix: (t) => e.setSuffix(t)
|
|
1207
1216
|
};
|
|
1208
|
-
}),
|
|
1217
|
+
}), _t = () => gt(), vt = () => b.get("__ui:query-ref__", () => ({}));
|
|
1218
|
+
function yt(e, t) {
|
|
1219
|
+
let n = vt();
|
|
1220
|
+
if (e in n) return n[e];
|
|
1221
|
+
let r = z(_.get(e, t));
|
|
1222
|
+
return k() && (q.run(() => {
|
|
1223
|
+
B(r, (t) => _.set(e, t));
|
|
1224
|
+
}), _.addWatch(e, (e) => {
|
|
1225
|
+
r.value = e;
|
|
1226
|
+
})), n[e] = r, r;
|
|
1227
|
+
}
|
|
1228
|
+
//#endregion
|
|
1229
|
+
//#region src/composables/ref/useRouterList.ts
|
|
1230
|
+
var bt = (e, t, n = !0) => {
|
|
1209
1231
|
var r;
|
|
1210
1232
|
let i = L(t) ? t : R(t || ((r = e.value) == null || (r = r[0]) == null ? void 0 : r.value) || ""), a = () => o(i.value), o = (t) => {
|
|
1211
1233
|
var n;
|
|
@@ -1220,7 +1242,7 @@ var ht = pt(() => {
|
|
|
1220
1242
|
var e;
|
|
1221
1243
|
return ((e = a()) == null ? void 0 : e.label) || "";
|
|
1222
1244
|
}),
|
|
1223
|
-
list: I(() => e.value ?
|
|
1245
|
+
list: I(() => e.value ? w(e.value, (e) => n && !("to" in e) ? {
|
|
1224
1246
|
...e,
|
|
1225
1247
|
to: { name: e.value }
|
|
1226
1248
|
} : e) : []),
|
|
@@ -1230,9 +1252,9 @@ var ht = pt(() => {
|
|
|
1230
1252
|
s((t = e.value) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
1231
1253
|
}
|
|
1232
1254
|
};
|
|
1233
|
-
},
|
|
1234
|
-
function
|
|
1235
|
-
let n =
|
|
1255
|
+
}, xt = () => b.get("__ui:session-ref__", () => ({}));
|
|
1256
|
+
function St(e, t) {
|
|
1257
|
+
let n = xt();
|
|
1236
1258
|
if (e in n) return n[e];
|
|
1237
1259
|
let r = new a(e, !0), i = R(r.get(t));
|
|
1238
1260
|
return q.run(() => {
|
|
@@ -1241,9 +1263,9 @@ function yt(e, t) {
|
|
|
1241
1263
|
}
|
|
1242
1264
|
//#endregion
|
|
1243
1265
|
//#region src/composables/ref/useStorageRef.ts
|
|
1244
|
-
var
|
|
1245
|
-
function
|
|
1246
|
-
let r =
|
|
1266
|
+
var Ct = () => b.get("__ui:storage-ref__", () => ({}));
|
|
1267
|
+
function wt(e, t, n) {
|
|
1268
|
+
let r = Ct();
|
|
1247
1269
|
if (e in r) return r[e];
|
|
1248
1270
|
let i = new a(e), o = R(i.get(t, n));
|
|
1249
1271
|
return q.run(() => {
|
|
@@ -1254,7 +1276,7 @@ function xt(e, t, n) {
|
|
|
1254
1276
|
}
|
|
1255
1277
|
//#endregion
|
|
1256
1278
|
//#region src/composables/ref/useTranslateRef.ts
|
|
1257
|
-
function
|
|
1279
|
+
function Tt(e, t = x.getItem()) {
|
|
1258
1280
|
let n = z(t.getListSync(e, !0)), r = async () => {
|
|
1259
1281
|
n.value = { ...await t.getList(e) };
|
|
1260
1282
|
};
|
|
@@ -1267,38 +1289,38 @@ function St(e, t = b.getItem()) {
|
|
|
1267
1289
|
}
|
|
1268
1290
|
return n;
|
|
1269
1291
|
}
|
|
1270
|
-
var
|
|
1292
|
+
var Et = (e) => Tt(e);
|
|
1271
1293
|
//#endregion
|
|
1272
1294
|
//#region src/functions/computedAsync.ts
|
|
1273
|
-
function
|
|
1274
|
-
let i = z(
|
|
1275
|
-
let t = await
|
|
1295
|
+
function Dt(e, t, n, r) {
|
|
1296
|
+
let i = z(S(t)), a = !0, o = async () => {
|
|
1297
|
+
let t = await C(e);
|
|
1276
1298
|
t !== n && (i.value = t);
|
|
1277
1299
|
}, s = () => {
|
|
1278
|
-
a && (a = !1, k() ?
|
|
1300
|
+
a && (a = !1, k() ? _e(o) : o().then());
|
|
1279
1301
|
};
|
|
1280
1302
|
return I(() => (s(), i.value), r);
|
|
1281
1303
|
}
|
|
1282
1304
|
//#endregion
|
|
1283
1305
|
//#region src/functions/computedByLanguage.ts
|
|
1284
|
-
function
|
|
1306
|
+
function Ot(e, t = () => void 0, n, r) {
|
|
1285
1307
|
return I(() => {
|
|
1286
1308
|
if (J.get().value && (n === void 0 || n())) {
|
|
1287
1309
|
let t = e();
|
|
1288
1310
|
if (t !== void 0) return t;
|
|
1289
1311
|
}
|
|
1290
|
-
return
|
|
1312
|
+
return S(t);
|
|
1291
1313
|
}, r);
|
|
1292
1314
|
}
|
|
1293
1315
|
//#endregion
|
|
1294
1316
|
//#region src/functions/computedEternity.ts
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1297
|
-
let i = z(
|
|
1298
|
-
i.value = await
|
|
1317
|
+
function kt(e, t) {
|
|
1318
|
+
return ie((n, r) => {
|
|
1319
|
+
let i = z(S(t)), a = !1, o = async () => {
|
|
1320
|
+
i.value = await C(e), r();
|
|
1299
1321
|
}, s = () => {
|
|
1300
1322
|
a || (a = !0, k() ? q.run(() => {
|
|
1301
|
-
|
|
1323
|
+
_e(async () => await o());
|
|
1302
1324
|
}) : o().then());
|
|
1303
1325
|
};
|
|
1304
1326
|
return {
|
|
@@ -1313,42 +1335,42 @@ function Et(e, t) {
|
|
|
1313
1335
|
}
|
|
1314
1336
|
//#endregion
|
|
1315
1337
|
//#region src/functions/dxtFunctionalPlugin.ts
|
|
1316
|
-
var
|
|
1317
|
-
if (n.api && e.setConfig(n.api), n.translate &&
|
|
1338
|
+
var At = { install(t, n = {}) {
|
|
1339
|
+
if (n.api && e.setConfig(n.api), n.translate && x.setConfig(n.translate), n.location && J.setValueDefault(n.location), n.icons && m.setConfig(n.icons), n.metaSuffix && _t().setSuffix(n.metaSuffix), n.router) Y.set(n.router);
|
|
1318
1340
|
else {
|
|
1319
1341
|
let e = t.config.globalProperties.$router;
|
|
1320
1342
|
e && Y.set(e);
|
|
1321
1343
|
}
|
|
1322
|
-
n.errorCauses && s.addList(n.errorCauses), n.errorHandlers && s.addHandlerList(n.errorHandlers),
|
|
1344
|
+
n.errorCauses && s.addList(n.errorCauses), n.errorHandlers && s.addHandlerList(n.errorHandlers), ht();
|
|
1323
1345
|
} };
|
|
1324
1346
|
//#endregion
|
|
1325
1347
|
//#region src/functions/getInject.ts
|
|
1326
|
-
function
|
|
1327
|
-
if (
|
|
1328
|
-
let t =
|
|
1348
|
+
function jt(e) {
|
|
1349
|
+
if (ce()) {
|
|
1350
|
+
let t = le(e);
|
|
1329
1351
|
if (t) return t;
|
|
1330
1352
|
}
|
|
1331
1353
|
}
|
|
1332
1354
|
//#endregion
|
|
1333
1355
|
//#region src/functions/ref/executeFunctionRef.ts
|
|
1334
|
-
function
|
|
1335
|
-
return U(
|
|
1356
|
+
function Mt(e) {
|
|
1357
|
+
return U(S(e));
|
|
1336
1358
|
}
|
|
1337
1359
|
//#endregion
|
|
1338
1360
|
//#region src/functions/render/getBind.ts
|
|
1339
|
-
function
|
|
1361
|
+
function Nt(e, t = {}, n = "value", r = !1) {
|
|
1340
1362
|
let i = typeof t == "string", a = i ? t : n, o = i ? {} : t;
|
|
1341
1363
|
return e ? e && M(e) && (a in e || r) ? W(o, e) : W(o, { [a]: e }) : i ? {} : { ...o };
|
|
1342
1364
|
}
|
|
1343
1365
|
//#endregion
|
|
1344
1366
|
//#region src/functions/ref/getBindRef.ts
|
|
1345
|
-
function
|
|
1346
|
-
return I(() =>
|
|
1367
|
+
function Pt(e, t = {}, n = "value") {
|
|
1368
|
+
return I(() => Nt(U(e), U(t), n));
|
|
1347
1369
|
}
|
|
1348
1370
|
//#endregion
|
|
1349
1371
|
//#region src/functions/ref/setRef.ts
|
|
1350
|
-
function
|
|
1372
|
+
function Ft(e, t) {
|
|
1351
1373
|
e.value !== t && (e.value = t);
|
|
1352
1374
|
}
|
|
1353
1375
|
//#endregion
|
|
1354
|
-
export {
|
|
1376
|
+
export { ke as DatetimeRef, xe as DesignAbstract, Se as DesignAsyncAbstract, be as DesignChanged, De as DesignComp, G as DesignComponents, Oe as DesignConstructorAbstract, q as EffectScopeGlobal, Ae as EventRef, st as ExecuteUseType, je as GeoFlagRef, Me as GeoIntlRef, J as GeoRef, Ne as ListDataRef, Y as RouterItemRef, Fe as ScrollbarWidthRef, Dt as computedAsync, Ot as computedByLanguage, kt as computedEternity, At as dxtFunctionalPlugin, Mt as executeFunctionRef, $ as executeUse, ft as executeUseGlobal, ht as executeUseGlobalInit, mt as executeUseLocal, pt as executeUseProvide, Ie as getApiErrorRef, Nt as getBind, Pt as getBindRef, Ce as getClassName, we as getIndexForRender, jt as getInject, X as getOptions, U as getRef, Te as render, Re as setApiRefGlobalConditions, Ft as setRef, Et as t, W as toBind, Ee 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, yt as useQueryRef, bt as useRouterList, Ke as useSearchRef, Ge as useSearchValueRef, St as useSessionRef, wt as useStorageRef, Tt as useTranslateRef };
|