@ea-lab/reactive-json 0.0.30 → 0.0.32
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/HashChangeListener-BjFVN2Z9.js +21283 -0
- package/dist/component/action/HashChangeListener.js +1 -1
- package/dist/component/action/MessageListener.js +1 -1
- package/dist/component/action/Popover.js +1 -1
- package/dist/component/action/ReactOnEvent.js +1 -1
- package/dist/component/action/Redirect.js +1 -1
- package/dist/component/action/Tooltip.js +1 -1
- package/dist/component/action/index.js +1 -1
- package/dist/component/element/form/CheckBoxField.js +2 -3
- package/dist/component/element/form/DateField.js +2 -3
- package/dist/component/element/form/NumberField.js +3 -2
- package/dist/component/element/form/SelectField.js +2 -3
- package/dist/component/element/form/TextAreaField.js +2 -3
- package/dist/component/element/form/TextField.js +2 -3
- package/dist/component/element/form/formElementsCommon.js +1 -1
- package/dist/component/element/form/index.js +8 -9
- package/dist/component/element/html/AccordionItem.js +1 -1
- package/dist/component/element/html/FolderSortableTree.js +1 -1
- package/dist/component/element/html/FormatNumeral.js +1 -1
- package/dist/component/element/html/Html.js +1 -1
- package/dist/component/element/html/LabelFromValue.js +1 -1
- package/dist/component/element/html/Modal.js +1 -1
- package/dist/component/element/html/PreformattedMarkup.js +1 -1
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +1 -1
- package/dist/component/element/html/Tabs.js +1 -1
- package/dist/component/element/html/index.js +1 -1
- package/dist/component/element/index.js +17 -18
- package/dist/component/element/special/BootstrapElement.js +1 -1
- package/dist/component/element/special/Count.js +1 -1
- package/dist/component/element/special/DataFilter.js +1 -1
- package/dist/component/element/special/DelayedActions.js +1 -1
- package/dist/component/element/special/Phantom.js +1 -1
- package/dist/component/element/special/ReactiveJsonSubroot.js +1 -1
- package/dist/component/element/special/Switch.js +2 -2
- package/dist/component/element/special/index.js +1 -1
- package/dist/component/hook/index.js +1 -1
- package/dist/component/hook/usePagination.js +1 -1
- package/dist/component/index.js +40 -41
- package/dist/component/reaction/addData.js +1 -1
- package/dist/component/reaction/fetchData.js +1 -1
- package/dist/component/reaction/index.js +1 -1
- package/dist/component/reaction/moveData.js +1 -1
- package/dist/component/reaction/postMessage.js +1 -1
- package/dist/component/reaction/redirectNow.js +1 -1
- package/dist/component/reaction/removeData.js +1 -1
- package/dist/component/reaction/setClipboardData.js +1 -1
- package/dist/component/reaction/setData.js +1 -1
- package/dist/component/reaction/submitData.js +1 -1
- package/dist/engine/Actions.js +1 -1
- package/dist/engine/ReactiveJsonRoot.js +1 -1
- package/dist/engine/TemplateSystem.js +1 -1
- package/dist/engine/View.js +2 -3
- package/dist/engine/index.js +1 -1
- package/dist/engine/utility/formatString.js +1 -1
- package/dist/main.js +65 -66
- package/dist/usePagination-D5Fkvhsw.js +358 -0
- package/package.json +1 -1
- package/dist/HashChangeListener-B5FvjGPF.js +0 -20151
- package/dist/NumberField-BCFUb50M.js +0 -1129
- package/dist/ThemeProvider-BTKQI5kV.js +0 -88
- package/dist/usePagination-B0yFkBzE.js +0 -276
package/dist/main.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { A as t, J as o, B as s, C as r, j as i, k as n, D as l, l as m, F as p, d, H as u, e as c, L as x, M as v, f,
|
|
2
|
-
import { Hide as
|
|
3
|
-
import { VisuallyHide as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { TemplateContext as Va } from "./engine/TemplateContext.js";
|
|
1
|
+
import { A as t, J as o, B as s, C as r, j as i, k as n, D as l, l as m, F as p, d, H as u, e as c, L as x, M as v, f, N as D, o as C, P as b, g as F, R as T, K as P, q as g, a as h, S as E, h as A, s as V, i as L, b as R, c as S, T as H, Y as M, t as w, O as B, Q as J, U as N, V as k, u as y, m as G, W as I, I as z, v as O, n as j, w as q, p as K, r as Q, x as U, y as W, z as X, E as Y, G as Z, X as _ } from "./HashChangeListener-BjFVN2Z9.js";
|
|
2
|
+
import { Hide as aa } from "./component/action/Hide.js";
|
|
3
|
+
import { VisuallyHide as ta } from "./component/action/VisuallyHide.js";
|
|
4
|
+
import { PageControls as sa } from "./component/element/special/PageControls.js";
|
|
5
|
+
import { u as ia } from "./usePagination-D5Fkvhsw.js";
|
|
6
|
+
import { triggerEvent as la } from "./component/reaction/triggerEvent.js";
|
|
7
|
+
import { mergeComponentCollections as pa } from "./engine/ComponentCollector.js";
|
|
8
|
+
import { EventDispatcherContext as ua } from "./engine/EventDispatcherContext.js";
|
|
9
|
+
import { EventDispatcherProvider as xa, addEventListener as va, removeEventListener as fa } from "./engine/EventDispatcherProvider.js";
|
|
10
|
+
import { GlobalDataContext as Ca } from "./engine/GlobalDataContext.js";
|
|
11
|
+
import { GlobalDataContextProvider as Fa } from "./engine/GlobalDataContextProvider.js";
|
|
12
|
+
import { PaginationContext as Pa } from "./engine/PaginationContext.js";
|
|
13
|
+
import { PaginationProvider as ha } from "./engine/PaginationProvider.js";
|
|
14
|
+
import { TemplateContext as Aa } from "./engine/TemplateContext.js";
|
|
16
15
|
export {
|
|
17
16
|
t as AccordionItem,
|
|
18
17
|
o as ActionDependant,
|
|
@@ -22,62 +21,62 @@ export {
|
|
|
22
21
|
n as DataFilter,
|
|
23
22
|
l as DateField,
|
|
24
23
|
m as DelayedActions,
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
ua as EventDispatcherContext,
|
|
25
|
+
xa as EventDispatcherProvider,
|
|
27
26
|
p as FolderSortableTree,
|
|
28
27
|
d as FormatNumeral,
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
Ca as GlobalDataContext,
|
|
29
|
+
Fa as GlobalDataContextProvider,
|
|
31
30
|
u as HashChangeListener,
|
|
32
|
-
|
|
31
|
+
aa as Hide,
|
|
33
32
|
c as Html,
|
|
34
33
|
x as LabelFromValue,
|
|
35
34
|
v as MessageListener,
|
|
36
35
|
f as Modal,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
36
|
+
D as NumberField,
|
|
37
|
+
sa as PageControls,
|
|
38
|
+
Pa as PaginationContext,
|
|
39
|
+
ha as PaginationProvider,
|
|
40
|
+
C as Phantom,
|
|
41
|
+
b as Popover,
|
|
42
|
+
F as PreformattedMarkup,
|
|
43
|
+
T as ReactOnEvent,
|
|
44
|
+
P as ReactiveJsonRoot,
|
|
45
|
+
g as ReactiveJsonSubroot,
|
|
46
|
+
h as Redirect,
|
|
47
|
+
E as SelectField,
|
|
48
|
+
A as SortableTreeItemCollapseButton,
|
|
49
|
+
V as Switch,
|
|
50
|
+
L as Tabs,
|
|
51
|
+
Aa as TemplateContext,
|
|
52
|
+
R as TextAreaField,
|
|
53
|
+
S as TextField,
|
|
54
|
+
H as Tooltip,
|
|
55
|
+
M as View,
|
|
56
|
+
ta as VisuallyHide,
|
|
57
|
+
w as addData,
|
|
58
|
+
va as addEventListener,
|
|
59
|
+
B as dataLocationToPath,
|
|
60
|
+
J as evaluateAttributes,
|
|
61
|
+
N as evaluateTemplateValue,
|
|
62
|
+
k as evaluateTemplateValueCollection,
|
|
63
|
+
y as fetchData,
|
|
64
|
+
G as getReactionFunctionsToExecute,
|
|
65
|
+
I as isTemplateValue,
|
|
66
|
+
z as isValid,
|
|
67
|
+
pa as mergeComponentCollections,
|
|
68
|
+
O as moveData,
|
|
69
|
+
j as normalizeAttributesForReactJsx,
|
|
70
|
+
q as postMessage,
|
|
71
|
+
K as propsDataLocationToPathAndValue,
|
|
72
|
+
Q as reactionFunctions,
|
|
73
|
+
U as redirectNow,
|
|
74
|
+
W as removeData,
|
|
75
|
+
fa as removeEventListener,
|
|
76
|
+
X as setClipboardData,
|
|
77
|
+
Y as setData,
|
|
78
|
+
Z as submitData,
|
|
79
|
+
la as triggerEvent,
|
|
80
|
+
_ as useEvaluatedAttributes,
|
|
81
|
+
ia as usePagination
|
|
83
82
|
};
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { jsx as l, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { useContext as P, useRef as I, useEffect as K, useCallback as M, useState as T } from "react";
|
|
4
|
+
var on = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function F(n) {
|
|
6
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
7
|
+
}
|
|
8
|
+
var g = { exports: {} };
|
|
9
|
+
/*!
|
|
10
|
+
Copyright (c) 2018 Jed Watson.
|
|
11
|
+
Licensed under the MIT License (MIT), see
|
|
12
|
+
http://jedwatson.github.io/classnames
|
|
13
|
+
*/
|
|
14
|
+
var B;
|
|
15
|
+
function L() {
|
|
16
|
+
return B || (B = 1, function(n) {
|
|
17
|
+
(function() {
|
|
18
|
+
var r = {}.hasOwnProperty;
|
|
19
|
+
function t() {
|
|
20
|
+
for (var e = "", i = 0; i < arguments.length; i++) {
|
|
21
|
+
var u = arguments[i];
|
|
22
|
+
u && (e = o(e, s(u)));
|
|
23
|
+
}
|
|
24
|
+
return e;
|
|
25
|
+
}
|
|
26
|
+
function s(e) {
|
|
27
|
+
if (typeof e == "string" || typeof e == "number")
|
|
28
|
+
return e;
|
|
29
|
+
if (typeof e != "object")
|
|
30
|
+
return "";
|
|
31
|
+
if (Array.isArray(e))
|
|
32
|
+
return t.apply(null, e);
|
|
33
|
+
if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]"))
|
|
34
|
+
return e.toString();
|
|
35
|
+
var i = "";
|
|
36
|
+
for (var u in e)
|
|
37
|
+
r.call(e, u) && e[u] && (i = o(i, u));
|
|
38
|
+
return i;
|
|
39
|
+
}
|
|
40
|
+
function o(e, i) {
|
|
41
|
+
return i ? e ? e + " " + i : e + i : e;
|
|
42
|
+
}
|
|
43
|
+
n.exports ? (t.default = t, n.exports = t) : window.classNames = t;
|
|
44
|
+
})();
|
|
45
|
+
}(g)), g.exports;
|
|
46
|
+
}
|
|
47
|
+
var S = L();
|
|
48
|
+
const C = /* @__PURE__ */ F(S), _ = ["xxl", "xl", "lg", "md", "sm", "xs"], $ = "xs", b = /* @__PURE__ */ p.createContext({
|
|
49
|
+
prefixes: {},
|
|
50
|
+
breakpoints: _,
|
|
51
|
+
minBreakpoint: $
|
|
52
|
+
}), {
|
|
53
|
+
Consumer: an,
|
|
54
|
+
Provider: ln
|
|
55
|
+
} = b;
|
|
56
|
+
function V(n, r) {
|
|
57
|
+
const {
|
|
58
|
+
prefixes: t
|
|
59
|
+
} = P(b);
|
|
60
|
+
return n || t[r] || r;
|
|
61
|
+
}
|
|
62
|
+
function un() {
|
|
63
|
+
const {
|
|
64
|
+
breakpoints: n
|
|
65
|
+
} = P(b);
|
|
66
|
+
return n;
|
|
67
|
+
}
|
|
68
|
+
function cn() {
|
|
69
|
+
const {
|
|
70
|
+
minBreakpoint: n
|
|
71
|
+
} = P(b);
|
|
72
|
+
return n;
|
|
73
|
+
}
|
|
74
|
+
function fn() {
|
|
75
|
+
const {
|
|
76
|
+
dir: n
|
|
77
|
+
} = P(b);
|
|
78
|
+
return n === "rtl";
|
|
79
|
+
}
|
|
80
|
+
function q(n) {
|
|
81
|
+
const r = I(n);
|
|
82
|
+
return K(() => {
|
|
83
|
+
r.current = n;
|
|
84
|
+
}, [n]), r;
|
|
85
|
+
}
|
|
86
|
+
function H(n) {
|
|
87
|
+
const r = q(n);
|
|
88
|
+
return M(function(...t) {
|
|
89
|
+
return r.current && r.current(...t);
|
|
90
|
+
}, [r]);
|
|
91
|
+
}
|
|
92
|
+
const U = ["as", "disabled"];
|
|
93
|
+
function W(n, r) {
|
|
94
|
+
if (n == null) return {};
|
|
95
|
+
var t = {};
|
|
96
|
+
for (var s in n) if ({}.hasOwnProperty.call(n, s)) {
|
|
97
|
+
if (r.indexOf(s) >= 0) continue;
|
|
98
|
+
t[s] = n[s];
|
|
99
|
+
}
|
|
100
|
+
return t;
|
|
101
|
+
}
|
|
102
|
+
function G(n) {
|
|
103
|
+
return !n || n.trim() === "#";
|
|
104
|
+
}
|
|
105
|
+
function N({
|
|
106
|
+
tagName: n,
|
|
107
|
+
disabled: r,
|
|
108
|
+
href: t,
|
|
109
|
+
target: s,
|
|
110
|
+
rel: o,
|
|
111
|
+
role: e,
|
|
112
|
+
onClick: i,
|
|
113
|
+
tabIndex: u = 0,
|
|
114
|
+
type: d
|
|
115
|
+
}) {
|
|
116
|
+
n || (t != null || s != null || o != null ? n = "a" : n = "button");
|
|
117
|
+
const f = {
|
|
118
|
+
tagName: n
|
|
119
|
+
};
|
|
120
|
+
if (n === "button")
|
|
121
|
+
return [{
|
|
122
|
+
type: d || "button",
|
|
123
|
+
disabled: r
|
|
124
|
+
}, f];
|
|
125
|
+
const m = (a) => {
|
|
126
|
+
if ((r || n === "a" && G(t)) && a.preventDefault(), r) {
|
|
127
|
+
a.stopPropagation();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
i == null || i(a);
|
|
131
|
+
}, y = (a) => {
|
|
132
|
+
a.key === " " && (a.preventDefault(), m(a));
|
|
133
|
+
};
|
|
134
|
+
return n === "a" && (t || (t = "#"), r && (t = void 0)), [{
|
|
135
|
+
role: e ?? "button",
|
|
136
|
+
// explicitly undefined so that it overrides the props disabled in a spread
|
|
137
|
+
// e.g. <Tag {...props} {...hookProps} />
|
|
138
|
+
disabled: void 0,
|
|
139
|
+
tabIndex: r ? void 0 : u,
|
|
140
|
+
href: t,
|
|
141
|
+
target: n === "a" ? s : void 0,
|
|
142
|
+
"aria-disabled": r || void 0,
|
|
143
|
+
rel: n === "a" ? o : void 0,
|
|
144
|
+
onClick: m,
|
|
145
|
+
onKeyDown: y
|
|
146
|
+
}, f];
|
|
147
|
+
}
|
|
148
|
+
const J = /* @__PURE__ */ p.forwardRef((n, r) => {
|
|
149
|
+
let {
|
|
150
|
+
as: t,
|
|
151
|
+
disabled: s
|
|
152
|
+
} = n, o = W(n, U);
|
|
153
|
+
const [e, {
|
|
154
|
+
tagName: i
|
|
155
|
+
}] = N(Object.assign({
|
|
156
|
+
tagName: t,
|
|
157
|
+
disabled: s
|
|
158
|
+
}, o));
|
|
159
|
+
return /* @__PURE__ */ l(i, Object.assign({}, o, e, {
|
|
160
|
+
ref: r
|
|
161
|
+
}));
|
|
162
|
+
});
|
|
163
|
+
J.displayName = "Button";
|
|
164
|
+
const Q = ["onKeyDown"];
|
|
165
|
+
function X(n, r) {
|
|
166
|
+
if (n == null) return {};
|
|
167
|
+
var t = {};
|
|
168
|
+
for (var s in n) if ({}.hasOwnProperty.call(n, s)) {
|
|
169
|
+
if (r.indexOf(s) >= 0) continue;
|
|
170
|
+
t[s] = n[s];
|
|
171
|
+
}
|
|
172
|
+
return t;
|
|
173
|
+
}
|
|
174
|
+
function Y(n) {
|
|
175
|
+
return !n || n.trim() === "#";
|
|
176
|
+
}
|
|
177
|
+
const A = /* @__PURE__ */ p.forwardRef((n, r) => {
|
|
178
|
+
let {
|
|
179
|
+
onKeyDown: t
|
|
180
|
+
} = n, s = X(n, Q);
|
|
181
|
+
const [o] = N(Object.assign({
|
|
182
|
+
tagName: "a"
|
|
183
|
+
}, s)), e = H((i) => {
|
|
184
|
+
o.onKeyDown(i), t == null || t(i);
|
|
185
|
+
});
|
|
186
|
+
return Y(s.href) || s.role === "button" ? /* @__PURE__ */ l("a", Object.assign({
|
|
187
|
+
ref: r
|
|
188
|
+
}, s, o, {
|
|
189
|
+
onKeyDown: e
|
|
190
|
+
})) : /* @__PURE__ */ l("a", Object.assign({
|
|
191
|
+
ref: r
|
|
192
|
+
}, s, {
|
|
193
|
+
onKeyDown: t
|
|
194
|
+
}));
|
|
195
|
+
});
|
|
196
|
+
A.displayName = "Anchor";
|
|
197
|
+
const j = /* @__PURE__ */ p.forwardRef(({
|
|
198
|
+
active: n = !1,
|
|
199
|
+
disabled: r = !1,
|
|
200
|
+
className: t,
|
|
201
|
+
style: s,
|
|
202
|
+
activeLabel: o = "(current)",
|
|
203
|
+
children: e,
|
|
204
|
+
linkStyle: i,
|
|
205
|
+
linkClassName: u,
|
|
206
|
+
as: d = A,
|
|
207
|
+
...f
|
|
208
|
+
}, m) => {
|
|
209
|
+
const y = n || r ? "span" : d;
|
|
210
|
+
return /* @__PURE__ */ l("li", {
|
|
211
|
+
ref: m,
|
|
212
|
+
style: s,
|
|
213
|
+
className: C(t, "page-item", {
|
|
214
|
+
active: n,
|
|
215
|
+
disabled: r
|
|
216
|
+
}),
|
|
217
|
+
children: /* @__PURE__ */ O(y, {
|
|
218
|
+
className: C("page-link", u),
|
|
219
|
+
style: i,
|
|
220
|
+
...f,
|
|
221
|
+
children: [e, n && o && /* @__PURE__ */ l("span", {
|
|
222
|
+
className: "visually-hidden",
|
|
223
|
+
children: o
|
|
224
|
+
})]
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
j.displayName = "PageItem";
|
|
229
|
+
function h(n, r, t = n) {
|
|
230
|
+
const s = /* @__PURE__ */ p.forwardRef(({
|
|
231
|
+
children: o,
|
|
232
|
+
...e
|
|
233
|
+
}, i) => /* @__PURE__ */ O(j, {
|
|
234
|
+
...e,
|
|
235
|
+
ref: i,
|
|
236
|
+
children: [/* @__PURE__ */ l("span", {
|
|
237
|
+
"aria-hidden": "true",
|
|
238
|
+
children: o || r
|
|
239
|
+
}), /* @__PURE__ */ l("span", {
|
|
240
|
+
className: "visually-hidden",
|
|
241
|
+
children: t
|
|
242
|
+
})]
|
|
243
|
+
}));
|
|
244
|
+
return s.displayName = n, s;
|
|
245
|
+
}
|
|
246
|
+
const Z = h("First", "«"), z = h("Prev", "‹", "Previous"), nn = h("Ellipsis", "…", "More"), tn = h("Next", "›"), en = h("Last", "»"), D = /* @__PURE__ */ p.forwardRef(({
|
|
247
|
+
bsPrefix: n,
|
|
248
|
+
className: r,
|
|
249
|
+
size: t,
|
|
250
|
+
...s
|
|
251
|
+
}, o) => {
|
|
252
|
+
const e = V(n, "pagination");
|
|
253
|
+
return /* @__PURE__ */ l("ul", {
|
|
254
|
+
ref: o,
|
|
255
|
+
...s,
|
|
256
|
+
className: C(r, e, t && `${e}-${t}`)
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
D.displayName = "Pagination";
|
|
260
|
+
const c = Object.assign(D, {
|
|
261
|
+
First: Z,
|
|
262
|
+
Prev: z,
|
|
263
|
+
Ellipsis: nn,
|
|
264
|
+
Item: j,
|
|
265
|
+
Next: tn,
|
|
266
|
+
Last: en
|
|
267
|
+
}), dn = ({
|
|
268
|
+
dataToPaginate: n = [],
|
|
269
|
+
forcePaginationDisplay: r = !1,
|
|
270
|
+
maxPageButtonsCount: t = 5,
|
|
271
|
+
pageMaxItemCount: s = 10
|
|
272
|
+
}) => {
|
|
273
|
+
const [o, e] = T(0), i = Math.floor(t / 2), u = o * s, d = u + s, f = (a) => Math.ceil(a.length / s);
|
|
274
|
+
return {
|
|
275
|
+
firstShownItemIndex: u,
|
|
276
|
+
getPageCountForContent: f,
|
|
277
|
+
maxShownItemIndexExcluded: d,
|
|
278
|
+
PageControls: () => {
|
|
279
|
+
const a = f(n);
|
|
280
|
+
return !r && a <= 1 ? null : /* @__PURE__ */ O(c, { children: [
|
|
281
|
+
/* @__PURE__ */ l(
|
|
282
|
+
c.First,
|
|
283
|
+
{
|
|
284
|
+
disabled: o <= 0,
|
|
285
|
+
onClick: () => {
|
|
286
|
+
e(0);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
),
|
|
290
|
+
/* @__PURE__ */ l(
|
|
291
|
+
c.Prev,
|
|
292
|
+
{
|
|
293
|
+
disabled: o <= 0,
|
|
294
|
+
onClick: () => {
|
|
295
|
+
e(o - 1);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
Math.min(o - i, a - t) > 0 ? /* @__PURE__ */ l(c.Ellipsis, { disabled: !0 }) : null,
|
|
300
|
+
(() => {
|
|
301
|
+
const k = [];
|
|
302
|
+
let w = Math.min(Math.max(0, a - t), Math.max(0, o - i)), x = t;
|
|
303
|
+
const E = (v, R) => {
|
|
304
|
+
k.push(/* @__PURE__ */ l(
|
|
305
|
+
c.Item,
|
|
306
|
+
{
|
|
307
|
+
active: o === v,
|
|
308
|
+
onClick: () => {
|
|
309
|
+
e(v);
|
|
310
|
+
},
|
|
311
|
+
children: v + 1
|
|
312
|
+
},
|
|
313
|
+
t - R
|
|
314
|
+
));
|
|
315
|
+
};
|
|
316
|
+
for (; x && (E(w, x), ++w, --x, !(w >= a)); )
|
|
317
|
+
;
|
|
318
|
+
return k;
|
|
319
|
+
})(),
|
|
320
|
+
a > Math.max(i, o) + Math.ceil(t / 2) ? /* @__PURE__ */ l(c.Ellipsis, { disabled: !0 }) : null,
|
|
321
|
+
/* @__PURE__ */ l(
|
|
322
|
+
c.Next,
|
|
323
|
+
{
|
|
324
|
+
disabled: o + 1 >= a,
|
|
325
|
+
onClick: () => {
|
|
326
|
+
e(o + 1);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
),
|
|
330
|
+
/* @__PURE__ */ l(
|
|
331
|
+
c.Last,
|
|
332
|
+
{
|
|
333
|
+
disabled: o + 1 >= a,
|
|
334
|
+
onClick: () => {
|
|
335
|
+
e(a - 1);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
)
|
|
339
|
+
] });
|
|
340
|
+
},
|
|
341
|
+
pageMaxItemCount: s,
|
|
342
|
+
sliceVisibleContent: (a) => Array.isArray(a) ? a.slice(u, d) : a
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
export {
|
|
346
|
+
A,
|
|
347
|
+
J as B,
|
|
348
|
+
V as a,
|
|
349
|
+
un as b,
|
|
350
|
+
C as c,
|
|
351
|
+
cn as d,
|
|
352
|
+
on as e,
|
|
353
|
+
N as f,
|
|
354
|
+
F as g,
|
|
355
|
+
H as h,
|
|
356
|
+
fn as i,
|
|
357
|
+
dn as u
|
|
358
|
+
};
|