@ryuzaki13/react-foundation-lib 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{formatters-ByJmJx4k.js → formatters-DPMcERgh.js} +3 -3
- package/dist/chunks/{formatters-ByJmJx4k.js.map → formatters-DPMcERgh.js.map} +1 -1
- package/dist/chunks/{odata-service-DNcNP2RM.js → odata-service-CEfjPsY9.js} +22 -19
- package/dist/chunks/odata-service-CEfjPsY9.js.map +1 -0
- package/dist/chunks/{validate-ChUa-TYM.js → validate-Ddyzk756.js} +2 -2
- package/dist/chunks/{validate-ChUa-TYM.js.map → validate-Ddyzk756.js.map} +1 -1
- package/dist/error-report/index.js +1 -1
- package/dist/excel/index.js +2 -2
- package/dist/formatters/index.js +3 -3
- package/dist/hooks/index.js +128 -104
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useFloatingListbox.d.ts +5 -1
- package/dist/hooks/useFloatingListbox.d.ts.map +1 -1
- package/dist/odata-service/filterDefinitions.d.ts.map +1 -1
- package/dist/odata-service/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/odata-service-DNcNP2RM.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as e } from "../chunks/array-BBSjoTRy.js";
|
|
2
|
-
import { qt as t } from "../chunks/formatters-
|
|
2
|
+
import { qt as t } from "../chunks/formatters-DPMcERgh.js";
|
|
3
3
|
import { uuidv4 as n } from "../crypto/index.js";
|
|
4
4
|
import { v as r } from "../chunks/dateUtils-D9dpdTl7.js";
|
|
5
5
|
import { createIndexedDbQueryStorage as i } from "../query-client/index.js";
|
package/dist/excel/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as e, l as t, s as n, u as r } from "../chunks/odata-service-
|
|
1
|
+
import { c as e, l as t, s as n, u as r } from "../chunks/odata-service-CEfjPsY9.js";
|
|
2
2
|
import { E as i, M as a, N as o } from "../chunks/dateUtils-D9dpdTl7.js";
|
|
3
|
-
import { t as s, u as c } from "../chunks/validate-
|
|
3
|
+
import { t as s, u as c } from "../chunks/validate-Ddyzk756.js";
|
|
4
4
|
import l from "write-excel-file/browser";
|
|
5
5
|
//#region src/excel/excel.ts
|
|
6
6
|
var u = {
|
package/dist/formatters/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, b as t, g as n, v as r, x as i, y as a } from "../chunks/array-BBSjoTRy.js";
|
|
2
|
-
import { $ as o, A as s, At as c, B as l, Bt as u, C as d, Ct as f, D as p, Dt as m, E as h, Et as g, F as _, Ft as v, G as y, Gt as b, H as x, Ht as S, I as C, It as w, J as T, Jt as E, K as D, Kt as O, L as k, Lt as A, M as j, Mt as M, N, Nt as P, O as F, Ot as I, P as L, Pt as R, Q as z, R as B, Rt as V, S as H, St as U, T as W, Tt as G, U as K, Ut as q, V as J, Vt as Y, W as X, Wt as Z, X as Q, Xt as $, Y as ee, Yt as te, Z as ne, _ as re, _t as ie, a as ae, at as oe, b as se, bt as ce, c as le, ct as ue, d as de, dt as fe, et as pe, f as me, ft as he, g as ge, gt as _e, h as ve, ht as ye, i as be, it as xe, j as Se, jt as Ce, k as we, kt as Te, l as Ee, lt as De, m as Oe, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as Pe, pt as Fe, q as Ie, qt as Le, r as Re, rt as ze, s as Be, st as Ve, t as He, tt as Ue, u as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et, zt as tt } from "../chunks/formatters-
|
|
3
|
-
import { At as nt, Ft as rt, Mt as it, Nt as at, Pt as ot, jt as st } from "../chunks/odata-service-
|
|
2
|
+
import { $ as o, A as s, At as c, B as l, Bt as u, C as d, Ct as f, D as p, Dt as m, E as h, Et as g, F as _, Ft as v, G as y, Gt as b, H as x, Ht as S, I as C, It as w, J as T, Jt as E, K as D, Kt as O, L as k, Lt as A, M as j, Mt as M, N, Nt as P, O as F, Ot as I, P as L, Pt as R, Q as z, R as B, Rt as V, S as H, St as U, T as W, Tt as G, U as K, Ut as q, V as J, Vt as Y, W as X, Wt as Z, X as Q, Xt as $, Y as ee, Yt as te, Z as ne, _ as re, _t as ie, a as ae, at as oe, b as se, bt as ce, c as le, ct as ue, d as de, dt as fe, et as pe, f as me, ft as he, g as ge, gt as _e, h as ve, ht as ye, i as be, it as xe, j as Se, jt as Ce, k as we, kt as Te, l as Ee, lt as De, m as Oe, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as Pe, pt as Fe, q as Ie, qt as Le, r as Re, rt as ze, s as Be, st as Ve, t as He, tt as Ue, u as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et, zt as tt } from "../chunks/formatters-DPMcERgh.js";
|
|
3
|
+
import { At as nt, Ft as rt, Mt as it, Nt as at, Pt as ot, jt as st } from "../chunks/odata-service-CEfjPsY9.js";
|
|
4
4
|
import { A as ct, B as lt, C as ut, D as dt, E as ft, F as pt, H as mt, I as ht, L as gt, M as _t, N as vt, O as yt, P as bt, R as xt, S as St, T as Ct, U as wt, V as Tt, W as Et, _ as Dt, a as Ot, b as kt, c as At, d as jt, f as Mt, g as Nt, h as Pt, i as Ft, j as It, k as Lt, l as Rt, m as zt, n as Bt, o as Vt, p as Ht, r as Ut, s as Wt, u as Gt, v as Kt, w as qt, x as Jt, y as Yt, z as Xt } from "../chunks/dateUtils-D9dpdTl7.js";
|
|
5
|
-
import { a as Zt, c as Qt, d as $t, f as en, i as tn, l as nn, n as rn, o as an, p as on, r as sn, s as cn, t as ln, u as un } from "../chunks/validate-
|
|
5
|
+
import { a as Zt, c as Qt, d as $t, f as en, i as tn, l as nn, n as rn, o as an, p as on, r as sn, s as cn, t as ln, u as un } from "../chunks/validate-Ddyzk756.js";
|
|
6
6
|
export { ct as DATE_FORMAT_DEFAULTS, It as DATE_FORMAT_STYLE_PRESET_NAMES, Tt as DATE_PATTERN_DATE_TOKENS, mt as DATE_PATTERN_TIME_TOKENS, wt as DATE_PATTERN_TOKENS, Et as DATE_PATTERN_TOKEN_RE, _t as DEFAULT_DATE_PRESET_NAMES, Qt as DEFAULT_NUMBER_PRESET_NAMES, Ae as DEFAULT_VALUE_STATES, nn as NUMBER_FORMAT_DEFAULTS, Re as VALUE_STATE_COLOR_TOKENS, M as addCalendarDays, P as addCalendarMonths, R as addCalendarYears, _ as clearFormatCache, S as clearPhone, Ze as cloneDate, h as cloneFormatterPipelinePlanStep, p as cloneFormatterPipelinePlanStepToNode, F as cloneFormattersPipelineConfig, we as cloneNormalizeLeadingZerosConfig, s as cloneResolveValueStateConfig, Se as cloneRowBasedOverrideConfig, j as cloneTypedValueFormatConfig, Je as collectFormattersPipelineDependencyIds, W as collectRuntimeFieldDependencyIds, de as compileFormattersPipelineExecutor, be as compileFormattersPipelineRuntime, ae as compileFormattersPipelineRuntimeFields, re as computeShortHash, U as countCalendarDaysInDateRange, v as createCalendarDate, Ve as createEducationDateTime, ve as createFixedResolver, cn as createRowBasedFormatterContext, tn as createRowBasedFormatterRegistry, Pe as createThresholdResolver, Ke as findResolverByCanonicalKey, Bt as formatDate, Ut as formatDateAsAbapDate, Ft as formatDateAsAbapDatetime, Ot as formatDateAsAbapMonth, Vt as formatDateAsAbapYear, Wt as formatDateAsDate, At as formatDateAsDateLong, Rt as formatDateAsDateMedium, Gt as formatDateAsDateShort, jt as formatDateAsDateTime, Mt as formatDateAsDatetimeLong, Ht as formatDateAsDatetimeMedium, zt as formatDateAsDatetimeShort, Pt as formatDateAsMonthLong, Nt as formatDateAsMonthShort, Dt as formatDateAsODataDate, Kt as formatDateAsODataDatetime, Yt as formatDateAsODataTime, kt as formatDateAsTime, Jt as formatDateAsTimeLong, St as formatDateAsTimeMedium, ut as formatDateAsTimeSeconds, qt as formatDateAsTimeShort, Ct as formatDateRange, ue as formatEducationDateKey, De as formatEducationTimeKey, Z as formatFullName, C as formatNumber, k as formatNumberAsCurrency, B as formatNumberAsCurrencyOrEmpty, et as formatNumberAsDecimal, l as formatNumberAsDecimal2, J as formatNumberAsDecimal2OrEmpty, x as formatNumberAsDecimal3, K as formatNumberAsDecimal3OrEmpty, X as formatNumberAsDecimalOrEmpty, y as formatNumberAsInteger, D as formatNumberAsIntegerOrEmpty, Ie as formatNumberAsPercent, T as formatNumberAsPercentOrEmpty, ee as formatNumberAsPrice, Q as formatNumberAsPriceOrEmpty, ne as formatNumberAsTonnage, z as formatNumberAsTonnageOrEmpty, q as formatPhone, Me as formatPipelineDisplayValue, b as formatShortName, me as formatTypedCellValue, Te as getCalendarPeriod, Ge as getCurrentEducationWeekKey, vt as getDatePreset, bt as getDatePresetNames, fe as getEducationWeekDays, he as getEducationWeekRange, Fe as getEducationWeekStartDate, ke as getEducationYear, ye as getEducationYearRange, w as getEndOfDay, le as getFormattersPipelineDefinitionById, Ee as getFormattersPipelineDefinitions, un as getNumberPreset, $t as getNumberPresetNames, Zt as getRowBasedFormatterById, an as getRowBasedFormatterList, A as getStartOfDay, V as getStartOfMonth, tt as getStartOfWeek, u as getStartOfYear, Qe as getValueStateResolver, se as getValueStateResolverIds, c as isCalendarPeriodWithinDateBounds, _e as isCurrentEducationWeek, pt as isDateFormatPrecision, ht as isDateFormatStyle, Ce as isDateInsideCalendarPeriod, f as isDateRangeTuple, ie as isEducationDateInCurrentYear, nt as isPositiveValue, Y as isSameCalendarDay, Ye as isValidDate, pe as isZeroValue, G as normalizeDateRange, Ue as normalizeDateRangeReferenceDate, qe as normalizeEducationWeekKey, We as normalizeFormattersPipelineConfig, N as normalizeLeadingZeros, L as normalizeLeadingZerosStrict, n as normalizeRequiredText, e as normalizeText, r as normalizeTextSpaces, a as normalizeTextToLower, t as normalizeTextWithFallback, g as orderDates, ot as parseAbapBoolean, rt as parseBoolean, ft as parseDate, dt as parseDateByFormat, yt as parseDateByPattern, Lt as parseDateValue, $e as parseEducationDateKey, st as parseNumber, gt as registerDatePreset, ge as registerFixedResolver, en as registerNumberPreset, Xe as registerResolver, Oe as registerThresholdResolver, Be as rekeyFormattersPipelineConfig, m as requireDateRange, xt as resetDatePresets, on as resetNumberPresets, H as resetValueStateResolvers, Xt as resolveDateFormatName, lt as resolveDateFormatPreset, I as resolveDateRangePair, ce as resolveEducationWeekKey, je as resolveMonthAgoRange, ze as resolveMonthStartToTodayRange, xe as resolveMonthStartToYesterdayRange, oe as resolveTodayRange, d as resolveValueState, He as resolveValueStateClassName, Ne as resolveYesterdayRange, $ as startsWithIgnoringZeros, te as stripInnerSpaces, E as stripLeadingZeros, O as toAbapBoolean, it as toFiniteNumber, at as toPositiveInteger, i as toSafeString, o as truncateNumber, Le as truncateText, ln as validateFormattersPipelineConfig, rn as validateFormattersPipelineGraph, sn as validateFormattersPipelinePlan };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLazyComponent as e, findFirstEnabledIndex as t, findLastEnabledIndex as n, findNextEnabledIndex as r, handleKeyboardActivation as i } from "../utils/index.js";
|
|
2
|
-
import { useCallback as a, useEffect as o,
|
|
3
|
-
import { KeyboardSensor as
|
|
4
|
-
import { sortableKeyboardCoordinates as
|
|
5
|
-
import { autoUpdate as
|
|
6
|
-
import { useLocation as
|
|
2
|
+
import { useCallback as a, useEffect as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
3
|
+
import { KeyboardSensor as d, PointerSensor as f, useSensor as p, useSensors as m } from "@dnd-kit/core";
|
|
4
|
+
import { sortableKeyboardCoordinates as h } from "@dnd-kit/sortable";
|
|
5
|
+
import { autoPlacement as g, autoUpdate as _, flip as v, offset as ee, shift as te, size as ne, useDismiss as re, useFloating as y, useInteractions as ie, useRole as ae } from "@floating-ui/react";
|
|
6
|
+
import { useLocation as b, useNavigate as x, useSearch as S } from "@tanstack/react-router";
|
|
7
7
|
//#region src/hooks/useBlockBrowserZoom.ts
|
|
8
|
-
function
|
|
8
|
+
function C(e) {
|
|
9
9
|
o(() => {
|
|
10
10
|
if (!e) return;
|
|
11
11
|
let t = (e) => {
|
|
@@ -16,8 +16,8 @@ function D(e) {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/hooks/useDebounce.ts
|
|
19
|
-
function
|
|
20
|
-
let [n, r] =
|
|
19
|
+
function w(e, t) {
|
|
20
|
+
let [n, r] = u(e);
|
|
21
21
|
return o(() => {
|
|
22
22
|
let n = setTimeout(() => {
|
|
23
23
|
r(e);
|
|
@@ -27,12 +27,12 @@ function O(e, t) {
|
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/hooks/useDebounceCallback.ts
|
|
30
|
-
function
|
|
31
|
-
let r =
|
|
30
|
+
function T(e, t, n) {
|
|
31
|
+
let r = l(e);
|
|
32
32
|
o(() => {
|
|
33
33
|
r.current = e;
|
|
34
34
|
}, [e]);
|
|
35
|
-
let i =
|
|
35
|
+
let i = l(null), s = l(null), c = a(() => {
|
|
36
36
|
i.current &&= (clearTimeout(i.current), null), s.current = null;
|
|
37
37
|
}, []), u = a(() => {
|
|
38
38
|
let e = s.current;
|
|
@@ -43,47 +43,60 @@ function k(e, t, n) {
|
|
|
43
43
|
}, t);
|
|
44
44
|
}, [t, u]);
|
|
45
45
|
return o(() => () => {
|
|
46
|
-
n?.flushOnUnmount ? u() :
|
|
46
|
+
n?.flushOnUnmount ? u() : c();
|
|
47
47
|
}, [
|
|
48
|
-
|
|
48
|
+
c,
|
|
49
49
|
u,
|
|
50
50
|
n?.flushOnUnmount
|
|
51
51
|
]), {
|
|
52
52
|
call: d,
|
|
53
53
|
flush: u,
|
|
54
|
-
cancel:
|
|
54
|
+
cancel: c
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/hooks/useDndSortableSensors.ts
|
|
59
|
-
function
|
|
60
|
-
return p(f
|
|
59
|
+
function E(e = 6) {
|
|
60
|
+
return m(p(f, { activationConstraint: { distance: typeof e == "number" ? e : e.activationDistance ?? 6 } }), p(d, { coordinateGetter: h }));
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/hooks/useFloatingListbox.ts
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
var D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = [
|
|
65
|
+
"bottom-start",
|
|
66
|
+
"bottom-end",
|
|
67
|
+
"top-start",
|
|
68
|
+
"top-end",
|
|
69
|
+
"left-start",
|
|
70
|
+
"left-end",
|
|
71
|
+
"right-start",
|
|
72
|
+
"right-end"
|
|
73
|
+
];
|
|
74
|
+
function A({ options: e, selectedIndex: a, open: c, onOpenChange: d, getOptionDisabled: f, onSelect: p, disabled: m, placement: h = "bottom-start", placementStrategy: b = "flip", closeOnSelect: x = !0, focusFloatingOnOpen: S = !0, allowOpenWithoutOptions: C = !1, restoreFocusOnClose: w = !0, resolveFloatingSize: T }) {
|
|
75
|
+
let E = l([]), [A, j] = u(!1), M = c ?? A, N = d ?? j, [P, F] = u(a >= 0 ? a : t(e, f)), [I] = u(() => ({})), L = (n) => e.length === 0 ? -1 : n >= 0 && n < e.length && !f?.(e[n]) ? n : a >= 0 && a < e.length && !f?.(e[a]) ? a : t(e, f), R = L(P), oe = b === "auto" ? g({
|
|
76
|
+
allowedPlacements: k,
|
|
77
|
+
crossAxis: !1,
|
|
78
|
+
padding: 8
|
|
79
|
+
}) : v({ padding: 8 }), { refs: z, floatingStyles: B, context: V, update: H } = y({
|
|
80
|
+
open: M,
|
|
81
|
+
onOpenChange: N,
|
|
82
|
+
placement: h,
|
|
70
83
|
transform: !1,
|
|
71
84
|
strategy: "fixed",
|
|
72
85
|
middleware: [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
ee(4),
|
|
87
|
+
oe,
|
|
88
|
+
te({ padding: 8 }),
|
|
89
|
+
ne({
|
|
77
90
|
padding: 8,
|
|
78
91
|
apply({ availableWidth: e, availableHeight: t, rects: n, elements: r }) {
|
|
79
|
-
let i = r.floating.ownerDocument.documentElement, a = r.floating.style, o = O?.({
|
|
92
|
+
let i = r.floating.ownerDocument.documentElement, a = r.floating.style, o = O.get(I)?.({
|
|
80
93
|
availableWidth: e,
|
|
81
94
|
availableHeight: t,
|
|
82
95
|
viewportWidth: i.clientWidth,
|
|
83
96
|
viewportHeight: i.clientHeight,
|
|
84
97
|
referenceWidth: n.reference.width,
|
|
85
98
|
referenceHeight: n.reference.height
|
|
86
|
-
}), s =
|
|
99
|
+
}), s = D.get(r.floating);
|
|
87
100
|
for (let e of s?.customProperties ?? []) a.removeProperty(e);
|
|
88
101
|
for (let [e, t] of s?.standardProperties ?? []) a[e] = t;
|
|
89
102
|
a.minWidth = `${n.reference.width}px`, a.maxHeight = `${Math.max(t, 120)}px`;
|
|
@@ -99,148 +112,159 @@ function M({ options: e, selectedIndex: a, open: s, onOpenChange: u, getOptionDi
|
|
|
99
112
|
l.set(n, a[n]), a[n] = t;
|
|
100
113
|
}
|
|
101
114
|
}
|
|
102
|
-
|
|
115
|
+
D.set(r.floating, {
|
|
103
116
|
customProperties: c,
|
|
104
117
|
standardProperties: l
|
|
105
118
|
});
|
|
106
119
|
}
|
|
107
120
|
})
|
|
108
121
|
],
|
|
109
|
-
whileElementsMounted:
|
|
110
|
-
}),
|
|
122
|
+
whileElementsMounted: _
|
|
123
|
+
}), U = T !== void 0;
|
|
124
|
+
s(() => (T ? O.set(I, T) : O.delete(I), () => {
|
|
125
|
+
O.delete(I);
|
|
126
|
+
}), [I, T]), s(() => {
|
|
127
|
+
!M || !U || H();
|
|
128
|
+
}, [
|
|
129
|
+
U,
|
|
130
|
+
e.length,
|
|
131
|
+
M,
|
|
132
|
+
H
|
|
133
|
+
]);
|
|
134
|
+
let { getFloatingProps: W } = ie([re(V), ae(V, { role: "listbox" })]), G = C || e.length > 0;
|
|
111
135
|
o(() => {
|
|
112
|
-
!
|
|
113
|
-
}, [R,
|
|
114
|
-
!
|
|
136
|
+
!M || R < 0 || E.current[R]?.scrollIntoView({ block: "nearest" });
|
|
137
|
+
}, [R, M]), o(() => {
|
|
138
|
+
!M || !S || requestAnimationFrame(() => {
|
|
115
139
|
z.floating.current?.focus();
|
|
116
140
|
});
|
|
117
141
|
}, [
|
|
118
|
-
|
|
119
|
-
|
|
142
|
+
S,
|
|
143
|
+
M,
|
|
120
144
|
z
|
|
121
145
|
]);
|
|
122
|
-
let
|
|
123
|
-
if (
|
|
146
|
+
let K = () => {
|
|
147
|
+
if (N(!1), w) {
|
|
124
148
|
let e = z.domReference.current;
|
|
125
149
|
e instanceof HTMLElement && e.focus();
|
|
126
150
|
}
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
if (
|
|
133
|
-
|
|
151
|
+
}, q = (t) => {
|
|
152
|
+
m || !G || (e.length > 0 && F(L(t)), N(!0));
|
|
153
|
+
}, J = () => {
|
|
154
|
+
q(a >= 0 ? a : t(e, f));
|
|
155
|
+
}, se = () => {
|
|
156
|
+
if (M) {
|
|
157
|
+
K();
|
|
134
158
|
return;
|
|
135
159
|
}
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
},
|
|
160
|
+
J();
|
|
161
|
+
}, Y = (e) => {
|
|
162
|
+
f?.(e) || (p?.(e), x && K());
|
|
163
|
+
}, X = () => {
|
|
140
164
|
if (R < 0) return;
|
|
141
165
|
let t = e[R];
|
|
142
|
-
t !== void 0 &&
|
|
143
|
-
}, X = () => {
|
|
144
|
-
I(t(e, d));
|
|
166
|
+
t !== void 0 && Y(t);
|
|
145
167
|
}, Z = () => {
|
|
146
|
-
|
|
147
|
-
}, Q = (
|
|
148
|
-
|
|
168
|
+
F(t(e, f));
|
|
169
|
+
}, Q = () => {
|
|
170
|
+
F(n(e, f));
|
|
171
|
+
}, ce = (i) => {
|
|
172
|
+
if (!m) {
|
|
149
173
|
if (i.key === "ArrowDown") {
|
|
150
|
-
if (i.preventDefault(), !
|
|
151
|
-
|
|
174
|
+
if (i.preventDefault(), !M) {
|
|
175
|
+
q(a >= 0 ? a : t(e, f));
|
|
152
176
|
return;
|
|
153
177
|
}
|
|
154
|
-
|
|
178
|
+
F((t) => r(e, L(t), 1, f));
|
|
155
179
|
return;
|
|
156
180
|
}
|
|
157
181
|
if (i.key === "ArrowUp") {
|
|
158
|
-
if (i.preventDefault(), !
|
|
159
|
-
|
|
182
|
+
if (i.preventDefault(), !M) {
|
|
183
|
+
q(a >= 0 ? a : n(e, f));
|
|
160
184
|
return;
|
|
161
185
|
}
|
|
162
|
-
|
|
186
|
+
F((t) => r(e, L(t), -1, f));
|
|
163
187
|
return;
|
|
164
188
|
}
|
|
165
|
-
if (i.key === "Home" &&
|
|
166
|
-
i.preventDefault(),
|
|
189
|
+
if (i.key === "Home" && M) {
|
|
190
|
+
i.preventDefault(), Z();
|
|
167
191
|
return;
|
|
168
192
|
}
|
|
169
|
-
if (i.key === "End" &&
|
|
170
|
-
i.preventDefault(),
|
|
193
|
+
if (i.key === "End" && M) {
|
|
194
|
+
i.preventDefault(), Q();
|
|
171
195
|
return;
|
|
172
196
|
}
|
|
173
|
-
if (i.key === "Escape" &&
|
|
174
|
-
i.preventDefault(),
|
|
197
|
+
if (i.key === "Escape" && M) {
|
|
198
|
+
i.preventDefault(), K();
|
|
175
199
|
return;
|
|
176
200
|
}
|
|
177
|
-
i.key === "Tab" &&
|
|
201
|
+
i.key === "Tab" && M && K();
|
|
178
202
|
}
|
|
179
|
-
},
|
|
203
|
+
}, le = (t) => {
|
|
180
204
|
if (t.target !== t.currentTarget) {
|
|
181
|
-
t.key === "Escape" && (t.preventDefault(),
|
|
205
|
+
t.key === "Escape" && (t.preventDefault(), K());
|
|
182
206
|
return;
|
|
183
207
|
}
|
|
184
208
|
if (t.key === "ArrowDown") {
|
|
185
|
-
t.preventDefault(),
|
|
209
|
+
t.preventDefault(), F((t) => r(e, L(t), 1, f));
|
|
186
210
|
return;
|
|
187
211
|
}
|
|
188
212
|
if (t.key === "ArrowUp") {
|
|
189
|
-
t.preventDefault(),
|
|
213
|
+
t.preventDefault(), F((t) => r(e, L(t), -1, f));
|
|
190
214
|
return;
|
|
191
215
|
}
|
|
192
216
|
if (t.key === "Home") {
|
|
193
|
-
t.preventDefault(),
|
|
217
|
+
t.preventDefault(), Z();
|
|
194
218
|
return;
|
|
195
219
|
}
|
|
196
220
|
if (t.key === "End") {
|
|
197
|
-
t.preventDefault(),
|
|
221
|
+
t.preventDefault(), Q();
|
|
198
222
|
return;
|
|
199
223
|
}
|
|
200
|
-
if (!i(t,
|
|
224
|
+
if (!i(t, X)) {
|
|
201
225
|
if (t.key === "Escape") {
|
|
202
|
-
t.preventDefault(),
|
|
226
|
+
t.preventDefault(), K();
|
|
203
227
|
return;
|
|
204
228
|
}
|
|
205
|
-
t.key === "Tab" &&
|
|
229
|
+
t.key === "Tab" && K();
|
|
206
230
|
}
|
|
207
231
|
}, $ = (e, t) => `${e}-option-${t}`;
|
|
208
232
|
return {
|
|
209
|
-
open:
|
|
210
|
-
setOpen:
|
|
233
|
+
open: M,
|
|
234
|
+
setOpen: N,
|
|
211
235
|
activeIndex: R,
|
|
212
236
|
refs: z,
|
|
213
237
|
context: V,
|
|
214
238
|
floatingStyles: B,
|
|
215
|
-
getFloatingProps:
|
|
239
|
+
getFloatingProps: W,
|
|
216
240
|
setReference: z.setReference,
|
|
217
241
|
setFloating: z.setFloating,
|
|
218
242
|
setOptionRef: (e, t) => {
|
|
219
|
-
|
|
243
|
+
E.current[e] = t;
|
|
220
244
|
},
|
|
221
|
-
close:
|
|
222
|
-
openList:
|
|
223
|
-
openWithIndex:
|
|
224
|
-
toggleOpen:
|
|
225
|
-
selectOption:
|
|
226
|
-
selectActiveOption:
|
|
227
|
-
handleReferenceKeyDown:
|
|
228
|
-
handleFloatingKeyDown:
|
|
245
|
+
close: K,
|
|
246
|
+
openList: J,
|
|
247
|
+
openWithIndex: q,
|
|
248
|
+
toggleOpen: se,
|
|
249
|
+
selectOption: Y,
|
|
250
|
+
selectActiveOption: X,
|
|
251
|
+
handleReferenceKeyDown: ce,
|
|
252
|
+
handleFloatingKeyDown: le,
|
|
229
253
|
getOptionId: $,
|
|
230
254
|
getActiveOptionId: (e) => R >= 0 ? $(e, R) : void 0
|
|
231
255
|
};
|
|
232
256
|
}
|
|
233
257
|
//#endregion
|
|
234
258
|
//#region src/hooks/useLazyComponent.ts
|
|
235
|
-
var
|
|
259
|
+
var j = (t, n, r) => c(() => e(t, n, r), [
|
|
236
260
|
r,
|
|
237
261
|
t,
|
|
238
262
|
n
|
|
239
263
|
]);
|
|
240
264
|
//#endregion
|
|
241
265
|
//#region src/hooks/useReferenceTrace.ts
|
|
242
|
-
function
|
|
243
|
-
let n =
|
|
266
|
+
function M(e, t) {
|
|
267
|
+
let n = l(t);
|
|
244
268
|
o(() => {
|
|
245
269
|
if (!__DEV__) return;
|
|
246
270
|
let r = !Object.is(n.current, t);
|
|
@@ -253,8 +277,8 @@ function P(e, t) {
|
|
|
253
277
|
}
|
|
254
278
|
//#endregion
|
|
255
279
|
//#region src/hooks/useSearchLink.ts
|
|
256
|
-
function
|
|
257
|
-
let e =
|
|
280
|
+
function N() {
|
|
281
|
+
let e = b();
|
|
258
282
|
return { buildLink: (t) => {
|
|
259
283
|
let n = new URLSearchParams(e.searchStr);
|
|
260
284
|
t ||= [];
|
|
@@ -268,8 +292,8 @@ function F() {
|
|
|
268
292
|
}
|
|
269
293
|
//#endregion
|
|
270
294
|
//#region src/hooks/useSearchParams.ts
|
|
271
|
-
function
|
|
272
|
-
let t =
|
|
295
|
+
function P(e) {
|
|
296
|
+
let t = S({ strict: !1 }), n = x();
|
|
273
297
|
return {
|
|
274
298
|
params: t,
|
|
275
299
|
setParams: (e) => n({
|
|
@@ -280,27 +304,27 @@ function I(e) {
|
|
|
280
304
|
}),
|
|
281
305
|
replace: !0
|
|
282
306
|
}),
|
|
283
|
-
filteredParams:
|
|
307
|
+
filteredParams: c(() => e ? Object.fromEntries(Object.entries(t).filter(([t]) => e.includes(t))) : t, [t, e])
|
|
284
308
|
};
|
|
285
309
|
}
|
|
286
310
|
//#endregion
|
|
287
311
|
//#region src/hooks/useThrottledCallback.ts
|
|
288
|
-
function
|
|
289
|
-
let r =
|
|
312
|
+
function F(e, t, n) {
|
|
313
|
+
let r = l(e);
|
|
290
314
|
o(() => {
|
|
291
315
|
r.current = e;
|
|
292
316
|
}, [e]);
|
|
293
|
-
let i =
|
|
317
|
+
let i = l(null), s = l(null), c = l(0), u = a(() => {
|
|
294
318
|
i.current &&= (clearTimeout(i.current), null), s.current = null;
|
|
295
319
|
}, []), d = a(() => {
|
|
296
320
|
let e = s.current;
|
|
297
|
-
e !== null && (s.current = null, i.current &&= (clearTimeout(i.current), null),
|
|
321
|
+
e !== null && (s.current = null, i.current &&= (clearTimeout(i.current), null), c.current = Date.now(), r.current(e));
|
|
298
322
|
}, []), f = a((e) => {
|
|
299
323
|
s.current = e;
|
|
300
|
-
let n = Date.now(), a = n -
|
|
324
|
+
let n = Date.now(), a = n - c.current;
|
|
301
325
|
if (a >= t) {
|
|
302
326
|
let e = s.current;
|
|
303
|
-
s.current = null, i.current &&= (clearTimeout(i.current), null),
|
|
327
|
+
s.current = null, i.current &&= (clearTimeout(i.current), null), c.current = n, e !== null && r.current(e);
|
|
304
328
|
return;
|
|
305
329
|
}
|
|
306
330
|
if (!i.current) {
|
|
@@ -323,6 +347,6 @@ function L(e, t, n) {
|
|
|
323
347
|
};
|
|
324
348
|
}
|
|
325
349
|
//#endregion
|
|
326
|
-
export {
|
|
350
|
+
export { C as useBlockBrowserZoom, w as useDebounce, T as useDebouncedCallback, E as useDndSortableSensors, A as useFloatingListbox, j as useLazyComponent, M as useReferenceTrace, N as useSearchLink, P as useSearchParams, F as useThrottledCallback };
|
|
327
351
|
|
|
328
352
|
//# sourceMappingURL=index.js.map
|