@redi.run/redi-components 0.0.51 → 0.0.53
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/index.d.ts +11 -10
- package/dist/redi-components.css +1 -1
- package/dist/redi-components.js +256 -251
- package/dist/redi-components.umd.cjs +29 -29
- package/package.json +1 -1
package/dist/redi-components.js
CHANGED
|
@@ -1851,10 +1851,10 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1851
1851
|
var n = L.InflateRaw, i = new n(), a = i._processChunk(e.slice(e.l), i._finishFlushFlag);
|
|
1852
1852
|
return e.l += i.bytesRead, a;
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
return L ? L.deflateRawSync(e) :
|
|
1854
|
+
function R(e) {
|
|
1855
|
+
return L ? L.deflateRawSync(e) : Qh(e);
|
|
1856
1856
|
}
|
|
1857
|
-
var
|
|
1857
|
+
var Ih = [
|
|
1858
1858
|
16,
|
|
1859
1859
|
17,
|
|
1860
1860
|
18,
|
|
@@ -1936,14 +1936,14 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1936
1936
|
16385,
|
|
1937
1937
|
24577
|
|
1938
1938
|
];
|
|
1939
|
-
function
|
|
1939
|
+
function zh(e) {
|
|
1940
1940
|
var t = (e << 1 | e << 11) & 139536 | (e << 5 | e << 15) & 558144;
|
|
1941
1941
|
return (t >> 16 | t >> 8 | t) & 255;
|
|
1942
1942
|
}
|
|
1943
|
-
for (var
|
|
1943
|
+
for (var H = typeof Uint8Array < "u", U = H ? new Uint8Array(256) : [], W = 0; W < 256; ++W) U[W] = zh(W);
|
|
1944
1944
|
function Bh(e, t) {
|
|
1945
|
-
var n =
|
|
1946
|
-
return t <= 8 ? n >>> 8 - t : (n = n << 8 |
|
|
1945
|
+
var n = U[e & 255];
|
|
1946
|
+
return t <= 8 ? n >>> 8 - t : (n = n << 8 | U[e >> 8 & 255], t <= 16 ? n >>> 16 - t : (n = n << 8 | U[e >> 16 & 255], n >>> 24 - t));
|
|
1947
1947
|
}
|
|
1948
1948
|
function Vh(e, t) {
|
|
1949
1949
|
var n = t & 7, i = t >>> 3;
|
|
@@ -1961,31 +1961,31 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1961
1961
|
var n = t & 7, i = t >>> 3;
|
|
1962
1962
|
return (e[i] | (n <= 3 ? 0 : e[i + 1] << 8)) >>> n & 31;
|
|
1963
1963
|
}
|
|
1964
|
-
function
|
|
1964
|
+
function G(e, t) {
|
|
1965
1965
|
var n = t & 7, i = t >>> 3;
|
|
1966
1966
|
return (e[i] | (n <= 1 ? 0 : e[i + 1] << 8)) >>> n & 127;
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function Gh(e, t, n) {
|
|
1969
1969
|
var i = t & 7, a = t >>> 3, o = (1 << n) - 1, s = e[a] >>> i;
|
|
1970
1970
|
return n < 8 - i || (s |= e[a + 1] << 8 - i, n < 16 - i) || (s |= e[a + 2] << 16 - i, n < 24 - i) || (s |= e[a + 3] << 24 - i), s & o;
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1972
|
+
function Kh(e, t, n) {
|
|
1973
1973
|
var i = t & 7, a = t >>> 3;
|
|
1974
1974
|
return i <= 5 ? e[a] |= (n & 7) << i : (e[a] |= n << i & 255, e[a + 1] = (n & 7) >> 8 - i), t + 3;
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function qh(e, t, n) {
|
|
1977
1977
|
var i = t & 7, a = t >>> 3;
|
|
1978
1978
|
return n = (n & 1) << i, e[a] |= n, t + 1;
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function K(e, t, n) {
|
|
1981
1981
|
var i = t & 7, a = t >>> 3;
|
|
1982
1982
|
return n <<= i, e[a] |= n & 255, n >>>= 8, e[a + 1] = n, t + 8;
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1984
|
+
function Jh(e, t, n) {
|
|
1985
1985
|
var i = t & 7, a = t >>> 3;
|
|
1986
1986
|
return n <<= i, e[a] |= n & 255, n >>>= 8, e[a + 1] = n & 255, e[a + 2] = n >>> 8, t + 16;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1988
|
+
function Yh(e, t) {
|
|
1989
1989
|
var n = e.length, i = 2 * n > t ? 2 * n : t + 5, a = 0;
|
|
1990
1990
|
if (n >= t) return e;
|
|
1991
1991
|
if (has_buf) {
|
|
@@ -1993,7 +1993,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1993
1993
|
if (e.copy) e.copy(o);
|
|
1994
1994
|
else for (; a < e.length; ++a) o[a] = e[a];
|
|
1995
1995
|
return o;
|
|
1996
|
-
} else if (
|
|
1996
|
+
} else if (H) {
|
|
1997
1997
|
var s = new Uint8Array(i);
|
|
1998
1998
|
if (s.set) s.set(e);
|
|
1999
1999
|
else for (; a < n; ++a) s[a] = e[a];
|
|
@@ -2001,16 +2001,16 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
return e.length = i, e;
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function q(e) {
|
|
2005
2005
|
for (var t = Array(e), n = 0; n < e; ++n) t[n] = 0;
|
|
2006
2006
|
return t;
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2009
|
-
var i = 1, a = 0, o = 0, s = 0, c = 0, l = e.length, u =
|
|
2008
|
+
function Xh(e, t, n) {
|
|
2009
|
+
var i = 1, a = 0, o = 0, s = 0, c = 0, l = e.length, u = H ? new Uint16Array(32) : q(32);
|
|
2010
2010
|
for (o = 0; o < 32; ++o) u[o] = 0;
|
|
2011
2011
|
for (o = l; o < n; ++o) e[o] = 0;
|
|
2012
2012
|
l = e.length;
|
|
2013
|
-
var d =
|
|
2013
|
+
var d = H ? new Uint16Array(l) : q(l);
|
|
2014
2014
|
for (o = 0; o < l; ++o) u[a = e[o]]++, i < a && (i = a), d[o] = 0;
|
|
2015
2015
|
for (u[0] = 0, o = 1; o <= i; ++o) u[o + 16] = c = c + u[o - 1] << 1;
|
|
2016
2016
|
for (o = 0; o < l; ++o) c = e[o], c != 0 && (d[o] = u[c + 16]++);
|
|
@@ -2018,25 +2018,25 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2018
2018
|
for (o = 0; o < l; ++o) if (f = e[o], f != 0) for (c = Bh(d[o], i) >> i - f, s = (1 << i + 4 - f) - 1; s >= 0; --s) t[c | s << f] = f & 15 | o << 4;
|
|
2019
2019
|
return i;
|
|
2020
2020
|
}
|
|
2021
|
-
var J =
|
|
2022
|
-
if (!
|
|
2023
|
-
for (var
|
|
2024
|
-
for (
|
|
2021
|
+
var J = H ? new Uint16Array(512) : q(512), Zh = H ? new Uint16Array(32) : q(32);
|
|
2022
|
+
if (!H) {
|
|
2023
|
+
for (var Y = 0; Y < 512; ++Y) J[Y] = 0;
|
|
2024
|
+
for (Y = 0; Y < 32; ++Y) Zh[Y] = 0;
|
|
2025
2025
|
}
|
|
2026
2026
|
(function() {
|
|
2027
2027
|
for (var e = [], t = 0; t < 32; t++) e.push(5);
|
|
2028
|
-
|
|
2028
|
+
Xh(e, Zh, 32);
|
|
2029
2029
|
var n = [];
|
|
2030
2030
|
for (t = 0; t <= 143; t++) n.push(8);
|
|
2031
2031
|
for (; t <= 255; t++) n.push(9);
|
|
2032
2032
|
for (; t <= 279; t++) n.push(7);
|
|
2033
2033
|
for (; t <= 287; t++) n.push(8);
|
|
2034
|
-
|
|
2034
|
+
Xh(n, J, 288);
|
|
2035
2035
|
})();
|
|
2036
|
-
var
|
|
2037
|
-
for (var e =
|
|
2036
|
+
var X = /* @__PURE__ */ (function() {
|
|
2037
|
+
for (var e = H ? new Uint8Array(32768) : [], t = 0, n = 0; t < V.length - 1; ++t) for (; n < V[t + 1]; ++n) e[n] = t;
|
|
2038
2038
|
for (; n < 32768; ++n) e[n] = 29;
|
|
2039
|
-
var i =
|
|
2039
|
+
var i = H ? new Uint8Array(259) : [];
|
|
2040
2040
|
for (t = 0, n = 0; t < z.length - 1; ++t) for (; n < z[t + 1]; ++n) i[n] = t;
|
|
2041
2041
|
function a(e, t) {
|
|
2042
2042
|
for (var n = 0; n < e.length;) {
|
|
@@ -2046,30 +2046,30 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2046
2046
|
return t.l;
|
|
2047
2047
|
}
|
|
2048
2048
|
function o(t, n) {
|
|
2049
|
-
for (var a = 0, o = 0, s =
|
|
2049
|
+
for (var a = 0, o = 0, s = H ? new Uint16Array(32768) : []; o < t.length;) {
|
|
2050
2050
|
var c = Math.min(65535, t.length - o);
|
|
2051
2051
|
if (c < 10) {
|
|
2052
|
-
for (a =
|
|
2052
|
+
for (a = Kh(n, a, +(o + c == t.length)), a & 7 && (a += 8 - (a & 7)), n.l = a / 8 | 0, n.write_shift(2, c), n.write_shift(2, ~c & 65535); c-- > 0;) n[n.l++] = t[o++];
|
|
2053
2053
|
a = n.l * 8;
|
|
2054
2054
|
continue;
|
|
2055
2055
|
}
|
|
2056
|
-
a =
|
|
2056
|
+
a = Kh(n, a, +(o + c == t.length) + 2);
|
|
2057
2057
|
for (var l = 0; c-- > 0;) {
|
|
2058
2058
|
var u = t[o];
|
|
2059
2059
|
l = (l << 5 ^ u) & 32767;
|
|
2060
2060
|
var d = -1, f = 0;
|
|
2061
2061
|
if ((d = s[l]) && (d |= o & -32768, d > o && (d -= 32768), d < o)) for (; t[d + f] == t[o + f] && f < 250;) ++f;
|
|
2062
2062
|
if (f > 2) {
|
|
2063
|
-
u = i[f], u <= 22 ? a =
|
|
2063
|
+
u = i[f], u <= 22 ? a = K(n, a, U[u + 1] >> 1) - 1 : (K(n, a, 3), a += 5, K(n, a, U[u - 23] >> 5), a += 3);
|
|
2064
2064
|
var p = u < 8 ? 0 : u - 4 >> 2;
|
|
2065
|
-
p > 0 && (
|
|
2065
|
+
p > 0 && (Jh(n, a, f - z[u]), a += p), u = e[o - d], a = K(n, a, U[u] >> 3), a -= 3;
|
|
2066
2066
|
var m = u < 4 ? 0 : u - 2 >> 1;
|
|
2067
|
-
m > 0 && (
|
|
2067
|
+
m > 0 && (Jh(n, a, o - d - V[u]), a += m);
|
|
2068
2068
|
for (var h = 0; h < f; ++h) s[l] = o & 32767, l = (l << 5 ^ t[o]) & 32767, ++o;
|
|
2069
2069
|
c -= f - 1;
|
|
2070
|
-
} else u <= 143 ? u += 48 : a =
|
|
2070
|
+
} else u <= 143 ? u += 48 : a = qh(n, a, 1), a = K(n, a, U[u]), s[l] = o & 32767, ++o;
|
|
2071
2071
|
}
|
|
2072
|
-
a =
|
|
2072
|
+
a = K(n, a, 0) - 1;
|
|
2073
2073
|
}
|
|
2074
2074
|
return n.l = (a + 7) / 8 | 0, n.l;
|
|
2075
2075
|
}
|
|
@@ -2077,19 +2077,19 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2077
2077
|
return e.length < 8 ? a(e, t) : o(e, t);
|
|
2078
2078
|
};
|
|
2079
2079
|
})();
|
|
2080
|
-
function
|
|
2081
|
-
var t = new_buf(50 + Math.floor(e.length * 1.1)), n =
|
|
2080
|
+
function Qh(e) {
|
|
2081
|
+
var t = new_buf(50 + Math.floor(e.length * 1.1)), n = X(e, t);
|
|
2082
2082
|
return t.slice(0, n);
|
|
2083
2083
|
}
|
|
2084
|
-
var
|
|
2085
|
-
function
|
|
2084
|
+
var Z = H ? new Uint16Array(32768) : q(32768), $h = H ? new Uint16Array(32768) : q(32768), eg = H ? new Uint16Array(128) : q(128), tg = 1, ng = 1;
|
|
2085
|
+
function Q(e, t) {
|
|
2086
2086
|
var n = Wh(e, t) + 257;
|
|
2087
2087
|
t += 5;
|
|
2088
2088
|
var i = Wh(e, t) + 1;
|
|
2089
2089
|
t += 5;
|
|
2090
2090
|
var a = Uh(e, t) + 4;
|
|
2091
2091
|
t += 4;
|
|
2092
|
-
for (var o = 0, s =
|
|
2092
|
+
for (var o = 0, s = H ? new Uint8Array(19) : q(19), c = [
|
|
2093
2093
|
0,
|
|
2094
2094
|
0,
|
|
2095
2095
|
0,
|
|
@@ -2109,17 +2109,17 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2109
2109
|
0,
|
|
2110
2110
|
0,
|
|
2111
2111
|
0
|
|
2112
|
-
], l = 1, u =
|
|
2112
|
+
], l = 1, u = H ? new Uint8Array(8) : q(8), d = H ? new Uint8Array(8) : q(8), f = s.length, p = 0; p < a; ++p) s[Ih[p]] = o = Hh(e, t), l < o && (l = o), u[o]++, t += 3;
|
|
2113
2113
|
var m = 0;
|
|
2114
2114
|
for (u[0] = 0, p = 1; p <= l; ++p) d[p] = m = m + u[p - 1] << 1;
|
|
2115
2115
|
for (p = 0; p < f; ++p) (m = s[p]) != 0 && (c[p] = d[m]++);
|
|
2116
2116
|
var h = 0;
|
|
2117
2117
|
for (p = 0; p < f; ++p) if (h = s[p], h != 0) {
|
|
2118
|
-
m =
|
|
2118
|
+
m = U[c[p]] >> 8 - h;
|
|
2119
2119
|
for (var g = (1 << 7 - h) - 1; g >= 0; --g) eg[m | g << h] = h & 7 | p << 3;
|
|
2120
2120
|
}
|
|
2121
2121
|
var _ = [];
|
|
2122
|
-
for (l = 1; _.length < n + i;) switch (m = eg[
|
|
2122
|
+
for (l = 1; _.length < n + i;) switch (m = eg[G(e, t)], t += m & 7, m >>>= 3) {
|
|
2123
2123
|
case 16:
|
|
2124
2124
|
for (o = 3 + Vh(e, t), t += 2, m = _[_.length - 1]; o-- > 0;) _.push(m);
|
|
2125
2125
|
break;
|
|
@@ -2127,7 +2127,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2127
2127
|
for (o = 3 + Hh(e, t), t += 3; o-- > 0;) _.push(0);
|
|
2128
2128
|
break;
|
|
2129
2129
|
case 18:
|
|
2130
|
-
for (o = 11 +
|
|
2130
|
+
for (o = 11 + G(e, t), t += 7; o-- > 0;) _.push(0);
|
|
2131
2131
|
break;
|
|
2132
2132
|
default:
|
|
2133
2133
|
_.push(m), l < m && (l = m);
|
|
@@ -2136,21 +2136,21 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2136
2136
|
var v = _.slice(0, n), y = _.slice(n);
|
|
2137
2137
|
for (p = n; p < 286; ++p) v[p] = 0;
|
|
2138
2138
|
for (p = i; p < 30; ++p) y[p] = 0;
|
|
2139
|
-
return
|
|
2139
|
+
return tg = Xh(v, Z, 286), ng = Xh(y, $h, 30), t;
|
|
2140
2140
|
}
|
|
2141
2141
|
function rg(e, t) {
|
|
2142
2142
|
if (e[0] == 3 && !(e[1] & 3)) return [new_raw_buf(t), 2];
|
|
2143
2143
|
for (var n = 0, i = 0, a = new_unsafe_buf(t || 1 << 18), o = 0, s = a.length >>> 0, c = 0, l = 0; !(i & 1);) {
|
|
2144
|
-
if (i = Hh(e, n), n += 3, i >>> 1) i >> 1 == 1 ? (c = 9, l = 5) : (n =
|
|
2144
|
+
if (i = Hh(e, n), n += 3, i >>> 1) i >> 1 == 1 ? (c = 9, l = 5) : (n = Q(e, n), c = tg, l = ng);
|
|
2145
2145
|
else {
|
|
2146
2146
|
n & 7 && (n += 8 - (n & 7));
|
|
2147
2147
|
var u = e[n >>> 3] | e[(n >>> 3) + 1] << 8;
|
|
2148
|
-
if (n += 32, u > 0) for (!t && s < o + u && (a =
|
|
2148
|
+
if (n += 32, u > 0) for (!t && s < o + u && (a = Yh(a, o + u), s = a.length); u-- > 0;) a[o++] = e[n >>> 3], n += 8;
|
|
2149
2149
|
continue;
|
|
2150
2150
|
}
|
|
2151
2151
|
for (;;) {
|
|
2152
|
-
!t && s < o + 32767 && (a =
|
|
2153
|
-
var d =
|
|
2152
|
+
!t && s < o + 32767 && (a = Yh(a, o + 32767), s = a.length);
|
|
2153
|
+
var d = Gh(e, n, c), f = i >>> 1 == 1 ? J[d] : Z[d];
|
|
2154
2154
|
if (n += f & 15, f >>>= 4, !(f >>> 8 & 255)) a[o++] = f;
|
|
2155
2155
|
else if (f == 256) break;
|
|
2156
2156
|
else {
|
|
@@ -2158,9 +2158,9 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2158
2158
|
var p = f < 8 ? 0 : f - 4 >> 2;
|
|
2159
2159
|
p > 5 && (p = 0);
|
|
2160
2160
|
var m = o + z[f];
|
|
2161
|
-
p > 0 && (m +=
|
|
2161
|
+
p > 0 && (m += Gh(e, n, p), n += p), d = Gh(e, n, l), f = i >>> 1 == 1 ? Zh[d] : $h[d], n += f & 15, f >>>= 4;
|
|
2162
2162
|
var h = f < 4 ? 0 : f - 2 >> 1, g = V[f];
|
|
2163
|
-
for (h > 0 && (g +=
|
|
2163
|
+
for (h > 0 && (g += Gh(e, n, h), n += h), !t && s < m && (a = Yh(a, m + 100), s = a.length); o < m;) a[o] = a[o - g], ++o;
|
|
2164
2164
|
}
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
@@ -2227,7 +2227,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2227
2227
|
for (d = 0; d < h.length; ++d) b.write_shift(1, h.charCodeAt(d) & 127);
|
|
2228
2228
|
b = b.slice(0, b.l), _[p] = CRC32.buf(g.content, 0);
|
|
2229
2229
|
var x = g.content;
|
|
2230
|
-
c == 8 && (x =
|
|
2230
|
+
c == 8 && (x = R(x)), s = new_buf(30), s.write_shift(4, 67324752), s.write_shift(2, 20), s.write_shift(2, l), s.write_shift(2, c), g.mt ? a(s, g.mt) : s.write_shift(4, 0), s.write_shift(-4, l & 8 ? 0 : _[p]), s.write_shift(4, l & 8 ? 0 : x.length), s.write_shift(4, l & 8 ? 0 : g.content.length), s.write_shift(2, b.length), s.write_shift(2, 0), f += s.length, i.push(s), f += b.length, i.push(b), f += x.length, i.push(x), l & 8 && (s = new_buf(12), s.write_shift(-4, _[p]), s.write_shift(4, x.length), s.write_shift(4, g.content.length), f += s.l, i.push(s)), s = new_buf(46), s.write_shift(4, 33639248), s.write_shift(2, 0), s.write_shift(2, 20), s.write_shift(2, l), s.write_shift(2, c), s.write_shift(4, 0), s.write_shift(-4, _[p]), s.write_shift(4, x.length), s.write_shift(4, g.content.length), s.write_shift(2, b.length), s.write_shift(2, 0), s.write_shift(2, 0), s.write_shift(2, 0), s.write_shift(2, 0), s.write_shift(4, 0), s.write_shift(4, y), v += s.l, o.push(s), v += b.length, o.push(b), ++p;
|
|
2231
2231
|
}
|
|
2232
2232
|
return s = new_buf(22), s.write_shift(4, 101010256), s.write_shift(2, 0), s.write_shift(2, 0), s.write_shift(2, p), s.write_shift(2, p), s.write_shift(4, v), s.write_shift(4, f), s.write_shift(2, 0), bconcat([
|
|
2233
2233
|
bconcat(i),
|
|
@@ -2398,7 +2398,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2398
2398
|
prep_blob,
|
|
2399
2399
|
bconcat,
|
|
2400
2400
|
use_zlib: Dh,
|
|
2401
|
-
_deflateRaw:
|
|
2401
|
+
_deflateRaw: Qh,
|
|
2402
2402
|
_inflateRaw: ig,
|
|
2403
2403
|
consts: N
|
|
2404
2404
|
}, e;
|
|
@@ -13176,22 +13176,22 @@ const useAdvancedTable = (e) => {
|
|
|
13176
13176
|
x,
|
|
13177
13177
|
C,
|
|
13178
13178
|
n
|
|
13179
|
-
]), Fh = useRef(!0),
|
|
13179
|
+
]), Fh = useRef(!0), R = useRef(C), Ih = useRef(x), Lh = useRef(F.page), z = useRef(F.pageSize), Rh = useRef(Mh);
|
|
13180
13180
|
useEffect(() => {
|
|
13181
13181
|
if (_) {
|
|
13182
|
-
let e = !1, t = JSON.stringify(C) !== JSON.stringify(
|
|
13182
|
+
let e = !1, t = JSON.stringify(C) !== JSON.stringify(R.current);
|
|
13183
13183
|
if (Fh.current) e = !0, Fh.current = !1;
|
|
13184
13184
|
else if (Mh !== Rh.current) e = !0, Rh.current = Mh;
|
|
13185
13185
|
else if (F.page !== Lh.current || F.pageSize !== z.current) e = !0;
|
|
13186
|
-
else if (JSON.stringify(x) !== JSON.stringify(
|
|
13186
|
+
else if (JSON.stringify(x) !== JSON.stringify(Ih.current)) e = !0;
|
|
13187
13187
|
else if (t) {
|
|
13188
|
-
let t = Object.keys(
|
|
13189
|
-
for (let t of a) if (JSON.stringify(
|
|
13188
|
+
let t = Object.keys(R.current), i = Object.keys(C), a = Array.from(new Set([...t, ...i]));
|
|
13189
|
+
for (let t of a) if (JSON.stringify(R.current[t]) !== JSON.stringify(C[t]) && n.find((e) => e.id === t)?.shouldBeRefetch === !0) {
|
|
13190
13190
|
e = !0;
|
|
13191
13191
|
break;
|
|
13192
13192
|
}
|
|
13193
13193
|
}
|
|
13194
|
-
Lh.current = F.page, z.current = F.pageSize,
|
|
13194
|
+
Lh.current = F.page, z.current = F.pageSize, Ih.current = x, R.current = C, e && Ph();
|
|
13195
13195
|
}
|
|
13196
13196
|
}, [
|
|
13197
13197
|
Ph,
|
|
@@ -13251,7 +13251,7 @@ const useAdvancedTable = (e) => {
|
|
|
13251
13251
|
x,
|
|
13252
13252
|
n,
|
|
13253
13253
|
_
|
|
13254
|
-
]),
|
|
13254
|
+
]), zh = useMemo(() => {
|
|
13255
13255
|
if (_) return V;
|
|
13256
13256
|
let e = (F.page - 1) * F.pageSize, t = e + F.pageSize;
|
|
13257
13257
|
return V.slice(e, t);
|
|
@@ -13308,7 +13308,7 @@ const useAdvancedTable = (e) => {
|
|
|
13308
13308
|
n,
|
|
13309
13309
|
_
|
|
13310
13310
|
]);
|
|
13311
|
-
let
|
|
13311
|
+
let H = useCallback((e) => {
|
|
13312
13312
|
S((t) => t?.column === e ? t.direction === "asc" ? {
|
|
13313
13313
|
column: e,
|
|
13314
13314
|
direction: "desc"
|
|
@@ -13316,7 +13316,7 @@ const useAdvancedTable = (e) => {
|
|
|
13316
13316
|
column: e,
|
|
13317
13317
|
direction: "asc"
|
|
13318
13318
|
});
|
|
13319
|
-
}, []),
|
|
13319
|
+
}, []), U = useCallback((e, t, n = "text") => {
|
|
13320
13320
|
w((i) => ({
|
|
13321
13321
|
...i,
|
|
13322
13322
|
[e]: {
|
|
@@ -13328,7 +13328,7 @@ const useAdvancedTable = (e) => {
|
|
|
13328
13328
|
...e,
|
|
13329
13329
|
page: 1
|
|
13330
13330
|
}));
|
|
13331
|
-
}, []),
|
|
13331
|
+
}, []), W = useCallback((e) => {
|
|
13332
13332
|
w((t) => {
|
|
13333
13333
|
let n = { ...t };
|
|
13334
13334
|
return delete n[e], n;
|
|
@@ -13350,14 +13350,14 @@ const useAdvancedTable = (e) => {
|
|
|
13350
13350
|
E(e);
|
|
13351
13351
|
}, []), Wh = useCallback((e) => {
|
|
13352
13352
|
O((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
13353
|
-
}, []),
|
|
13353
|
+
}, []), G = useCallback((e) => {
|
|
13354
13354
|
A((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
13355
|
-
}, []),
|
|
13355
|
+
}, []), Gh = useCallback((e) => {
|
|
13356
13356
|
M((t) => {
|
|
13357
13357
|
let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
13358
13358
|
return y?.(n), n;
|
|
13359
13359
|
});
|
|
13360
|
-
}, [y]),
|
|
13360
|
+
}, [y]), Kh = useCallback((e) => {
|
|
13361
13361
|
M((t) => {
|
|
13362
13362
|
let n = e.map((e) => typeof v == "function" ? v(e) : e[v]), i = n.every((e) => t.includes(e)), a;
|
|
13363
13363
|
if (i) a = t.filter((e) => !n.includes(e));
|
|
@@ -13367,26 +13367,26 @@ const useAdvancedTable = (e) => {
|
|
|
13367
13367
|
}
|
|
13368
13368
|
return y?.(a), a;
|
|
13369
13369
|
});
|
|
13370
|
-
}, [v, y]),
|
|
13370
|
+
}, [v, y]), qh = useCallback((e, t) => {
|
|
13371
13371
|
P((n) => ({
|
|
13372
13372
|
...n,
|
|
13373
13373
|
[e]: Math.max(50, t)
|
|
13374
13374
|
}));
|
|
13375
|
-
}, []),
|
|
13375
|
+
}, []), K = useMemo(() => {
|
|
13376
13376
|
let e = new Map(n.map((e) => [e.id, e])), t = T.map((t) => e.get(t)).filter(Boolean), i = new Set(t.map((e) => e.id)), a = n.filter((e) => !i.has(e.id));
|
|
13377
13377
|
return [...t, ...a].filter((e) => !D.includes(e.id));
|
|
13378
13378
|
}, [
|
|
13379
13379
|
T,
|
|
13380
13380
|
n,
|
|
13381
13381
|
D
|
|
13382
|
-
]),
|
|
13382
|
+
]), Jh = useCallback(() => {
|
|
13383
13383
|
Nh((e) => e + 1);
|
|
13384
13384
|
}, []);
|
|
13385
13385
|
return {
|
|
13386
13386
|
state: {
|
|
13387
13387
|
data: t,
|
|
13388
13388
|
filteredData: B,
|
|
13389
|
-
paginatedData:
|
|
13389
|
+
paginatedData: zh,
|
|
13390
13390
|
sortConfig: x,
|
|
13391
13391
|
filters: C,
|
|
13392
13392
|
pagination: F,
|
|
@@ -13397,25 +13397,25 @@ const useAdvancedTable = (e) => {
|
|
|
13397
13397
|
columnWidths: N,
|
|
13398
13398
|
loading: Ah
|
|
13399
13399
|
},
|
|
13400
|
-
orderedColumns:
|
|
13400
|
+
orderedColumns: K,
|
|
13401
13401
|
pageSizeOptions: f,
|
|
13402
|
-
handleSort:
|
|
13403
|
-
handleFilter:
|
|
13404
|
-
clearFilter:
|
|
13402
|
+
handleSort: H,
|
|
13403
|
+
handleFilter: U,
|
|
13404
|
+
clearFilter: W,
|
|
13405
13405
|
clearAllFilters: Bh,
|
|
13406
13406
|
handlePageChange: Vh,
|
|
13407
13407
|
handlePageSizeChange: Hh,
|
|
13408
13408
|
handleColumnReorder: Uh,
|
|
13409
13409
|
handleToggleColumn: Wh,
|
|
13410
|
-
handleTogglePin:
|
|
13411
|
-
handleRowSelect:
|
|
13412
|
-
handleSelectAll:
|
|
13413
|
-
handleColumnResize:
|
|
13410
|
+
handleTogglePin: G,
|
|
13411
|
+
handleRowSelect: Gh,
|
|
13412
|
+
handleSelectAll: Kh,
|
|
13413
|
+
handleColumnResize: qh,
|
|
13414
13414
|
allColumns: n,
|
|
13415
|
-
refresh:
|
|
13415
|
+
refresh: Jh
|
|
13416
13416
|
};
|
|
13417
13417
|
};
|
|
13418
|
-
var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilters:
|
|
13418
|
+
var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilters: a = {}, defaultPageSize: u = 10, pageSizeOptions: h = [
|
|
13419
13419
|
10,
|
|
13420
13420
|
25,
|
|
13421
13421
|
50,
|
|
@@ -13424,7 +13424,7 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13424
13424
|
300,
|
|
13425
13425
|
400,
|
|
13426
13426
|
500
|
|
13427
|
-
], enableSorting:
|
|
13427
|
+
], enableSorting: C = !0, enableFiltering: w = !0, enablePagination: T = !0, enableExport: E = !0, initialConfig: D, onConfigChange: O, className: k = "", labels: A = {
|
|
13428
13428
|
configuration: "Configuración",
|
|
13429
13429
|
columnVisibility: "Columnas visibles",
|
|
13430
13430
|
pagination: {
|
|
@@ -13437,38 +13437,38 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13437
13437
|
},
|
|
13438
13438
|
clearAllFilters: "Limpiar todos los filtros",
|
|
13439
13439
|
noData: "No hay datos disponibles"
|
|
13440
|
-
}, enableColumnReordering:
|
|
13441
|
-
let [
|
|
13440
|
+
}, enableColumnReordering: j = !0, enableColumnPinning: M = !1, enableColumnResizing: N = !1, enableRowSelection: P = !1, stickyActionsColumn: F = !1, rowKey: I = "id", onRowSelectionChange: L, renderActions: Dh, actionsColumnLabel: Oh, loading: kh = !1, fetchData: Ah, onRefresh: jh, onPaginationChange: Mh, onFiltersChange: Nh, syncFiltersWithUrl: Ph = !1, enableColumnConfig: Fh = !0 }) => {
|
|
13441
|
+
let [R, Ih] = useState(null), [Lh, z] = useState(null), [Rh, B] = useState(!1), [V, zh] = useState(null), H = useRef(null), [U, W] = useState(t), { state: Bh, orderedColumns: Vh, handleSort: Hh, handleFilter: Uh, clearAllFilters: Wh, handlePageChange: G, handlePageSizeChange: Gh, handleColumnReorder: Kh, handleToggleColumn: qh, handleTogglePin: K, handleRowSelect: Jh, handleSelectAll: Yh, handleColumnResize: q, refresh: Xh } = useAdvancedTable({
|
|
13442
13442
|
data: e,
|
|
13443
|
-
columns:
|
|
13443
|
+
columns: U,
|
|
13444
13444
|
defaultSort: n,
|
|
13445
|
-
defaultFilters:
|
|
13446
|
-
defaultPageSize:
|
|
13447
|
-
pageSizeOptions:
|
|
13448
|
-
initialConfig:
|
|
13449
|
-
onConfigChange:
|
|
13450
|
-
fetchData:
|
|
13451
|
-
onPaginationChange:
|
|
13452
|
-
onFiltersChange:
|
|
13453
|
-
rowKey:
|
|
13454
|
-
onRowSelectionChange:
|
|
13455
|
-
syncFiltersWithUrl:
|
|
13456
|
-
}), { paginatedData:
|
|
13457
|
-
useEffect(() =>
|
|
13445
|
+
defaultFilters: a,
|
|
13446
|
+
defaultPageSize: u,
|
|
13447
|
+
pageSizeOptions: h,
|
|
13448
|
+
initialConfig: D,
|
|
13449
|
+
onConfigChange: O,
|
|
13450
|
+
fetchData: Ah,
|
|
13451
|
+
onPaginationChange: Mh,
|
|
13452
|
+
onFiltersChange: Nh,
|
|
13453
|
+
rowKey: I,
|
|
13454
|
+
onRowSelectionChange: L,
|
|
13455
|
+
syncFiltersWithUrl: Ph
|
|
13456
|
+
}), { paginatedData: J, sortConfig: Zh, filters: Y, pagination: X, hiddenColumns: Qh, pinnedColumns: Z, selectedRows: $h, columnWidths: eg, loading: tg } = Bh, ng = kh || tg;
|
|
13457
|
+
useEffect(() => W(t), [t]);
|
|
13458
13458
|
let Q = useMemo(() => {
|
|
13459
|
-
let e = [...
|
|
13460
|
-
return
|
|
13459
|
+
let e = [...Vh], t = e.filter((e) => e.isAction), n = [...e.filter((e) => !e.isAction), ...t];
|
|
13460
|
+
return P && n.unshift({
|
|
13461
13461
|
id: "selection-synthetic",
|
|
13462
13462
|
label: "",
|
|
13463
|
-
accessor: (e) => e[
|
|
13463
|
+
accessor: (e) => e[I],
|
|
13464
13464
|
width: 50,
|
|
13465
13465
|
minWidth: 50,
|
|
13466
13466
|
render: ({ row: e }) => {
|
|
13467
|
-
let t = e[
|
|
13467
|
+
let t = e[I];
|
|
13468
13468
|
return /* @__PURE__ */ jsx("input", {
|
|
13469
13469
|
type: "checkbox",
|
|
13470
13470
|
className: "w-4 h-4 accent-redi-primary cursor-pointer",
|
|
13471
|
-
checked:
|
|
13471
|
+
checked: $h.includes(t),
|
|
13472
13472
|
onChange: (e) => {
|
|
13473
13473
|
e.stopPropagation(), Jh(t);
|
|
13474
13474
|
},
|
|
@@ -13479,11 +13479,11 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13479
13479
|
filterable: !1,
|
|
13480
13480
|
sortable: !1,
|
|
13481
13481
|
draggable: !1
|
|
13482
|
-
}),
|
|
13482
|
+
}), Dh && n.push({
|
|
13483
13483
|
id: "actions-synthetic",
|
|
13484
|
-
label:
|
|
13485
|
-
accessor: (e) => e[
|
|
13486
|
-
render: ({ row: e, column: t, index: n }) =>
|
|
13484
|
+
label: Oh || "",
|
|
13485
|
+
accessor: (e) => e[I],
|
|
13486
|
+
render: ({ row: e, column: t, index: n }) => Dh({
|
|
13487
13487
|
row: e,
|
|
13488
13488
|
index: n,
|
|
13489
13489
|
column: t
|
|
@@ -13495,61 +13495,61 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13495
13495
|
draggable: !1
|
|
13496
13496
|
}), n;
|
|
13497
13497
|
}, [
|
|
13498
|
-
|
|
13499
|
-
L,
|
|
13498
|
+
Vh,
|
|
13500
13499
|
Dh,
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13500
|
+
Oh,
|
|
13501
|
+
P,
|
|
13502
|
+
$h,
|
|
13503
|
+
I,
|
|
13504
13504
|
Jh
|
|
13505
|
-
]),
|
|
13505
|
+
]), rg = useRef(null);
|
|
13506
13506
|
useEffect(() => {
|
|
13507
13507
|
let e = (e) => {
|
|
13508
|
-
if (!
|
|
13509
|
-
let { columnId: t, startX: n, startWidth: i } =
|
|
13510
|
-
|
|
13508
|
+
if (!rg.current) return;
|
|
13509
|
+
let { columnId: t, startX: n, startWidth: i } = rg.current, a = e.clientX - n;
|
|
13510
|
+
q(t, i + a);
|
|
13511
13511
|
}, t = () => {
|
|
13512
|
-
|
|
13512
|
+
rg.current = null, document.body.style.cursor = "default", document.body.style.userSelect = "auto";
|
|
13513
13513
|
};
|
|
13514
|
-
if (
|
|
13514
|
+
if (N) return document.addEventListener("mousemove", e), document.addEventListener("mouseup", t), () => {
|
|
13515
13515
|
document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
|
|
13516
13516
|
};
|
|
13517
|
-
}, [
|
|
13518
|
-
let
|
|
13519
|
-
e.preventDefault(), e.stopPropagation(),
|
|
13517
|
+
}, [N, q]);
|
|
13518
|
+
let ig = (e, t, n) => {
|
|
13519
|
+
e.preventDefault(), e.stopPropagation(), rg.current = {
|
|
13520
13520
|
columnId: t,
|
|
13521
13521
|
startX: e.clientX,
|
|
13522
13522
|
startWidth: n
|
|
13523
13523
|
}, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
13524
|
-
},
|
|
13525
|
-
|
|
13526
|
-
}, ig = (e, t) => {
|
|
13527
|
-
e.preventDefault(), e.dataTransfer.dropEffect = "move", R(t);
|
|
13528
|
-
}, ag = () => {
|
|
13529
|
-
R(null);
|
|
13524
|
+
}, ag = (e, t) => {
|
|
13525
|
+
Ih(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/html", "");
|
|
13530
13526
|
}, og = (e, t) => {
|
|
13531
|
-
|
|
13532
|
-
|
|
13527
|
+
e.preventDefault(), e.dataTransfer.dropEffect = "move", z(t);
|
|
13528
|
+
}, sg = () => {
|
|
13529
|
+
z(null);
|
|
13530
|
+
}, cg = (e, t) => {
|
|
13531
|
+
if (e.preventDefault(), R === null) return;
|
|
13532
|
+
let n = Q[R].id, i = Q[t].id;
|
|
13533
13533
|
if (n === i) {
|
|
13534
|
-
|
|
13534
|
+
Ih(null), z(null);
|
|
13535
13535
|
return;
|
|
13536
13536
|
}
|
|
13537
|
-
let a = e.currentTarget.getBoundingClientRect(), o = e.clientX - a.left > a.width / 2, s = [...
|
|
13538
|
-
c === -1 || l === -1 || (s.splice(c, 1), l = s.indexOf(i), o ? s.splice(l + 1, 0, n) : s.splice(l, 0, n),
|
|
13539
|
-
},
|
|
13540
|
-
|
|
13541
|
-
},
|
|
13542
|
-
if (!
|
|
13537
|
+
let a = e.currentTarget.getBoundingClientRect(), o = e.clientX - a.left > a.width / 2, s = [...Bh.columnOrder], c = s.indexOf(n), l = s.indexOf(i);
|
|
13538
|
+
c === -1 || l === -1 || (s.splice(c, 1), l = s.indexOf(i), o ? s.splice(l + 1, 0, n) : s.splice(l, 0, n), Kh(s), Ih(null), z(null));
|
|
13539
|
+
}, lg = () => {
|
|
13540
|
+
Ih(null), z(null);
|
|
13541
|
+
}, ug = () => {
|
|
13542
|
+
if (!E) return;
|
|
13543
13543
|
let e = Q.filter((e) => !e.isAction);
|
|
13544
|
-
exportToExcel(
|
|
13545
|
-
},
|
|
13546
|
-
|
|
13547
|
-
},
|
|
13548
|
-
let n =
|
|
13544
|
+
exportToExcel(Bh.filteredData, e, "table-data.xlsx");
|
|
13545
|
+
}, dg = (e) => {
|
|
13546
|
+
zh(V === e ? null : e);
|
|
13547
|
+
}, fg = useCallback((t) => {
|
|
13548
|
+
let n = U.find((e) => e.id === t);
|
|
13549
13549
|
if (!n) return [];
|
|
13550
|
-
let i = e.filter((e) => Object.entries(
|
|
13550
|
+
let i = e.filter((e) => Object.entries(Y).every(([n, i]) => {
|
|
13551
13551
|
if (n === t || !i.value) return !0;
|
|
13552
|
-
let a =
|
|
13552
|
+
let a = U.find((e) => e.id === n);
|
|
13553
13553
|
if (!a) return !0;
|
|
13554
13554
|
let o = typeof a.accessor == "function" ? a.accessor(e) : e[a.accessor], s = String(o || "").toLowerCase(), c = !0;
|
|
13555
13555
|
return i.type === "text" && (c = s.includes(String(i.value).toLowerCase())), i.type === "select" && (c = s === String(i.value).toLowerCase()), i.type === "multiselect" && Array.isArray(i.value) && (c = i.value.some((e) => s === String(e).toLowerCase())), c;
|
|
@@ -13581,10 +13581,14 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13581
13581
|
...e,
|
|
13582
13582
|
group: void 0
|
|
13583
13583
|
})) : [...s, ...c];
|
|
13584
|
-
},
|
|
13584
|
+
}, [
|
|
13585
|
+
e,
|
|
13586
|
+
Y,
|
|
13587
|
+
U
|
|
13588
|
+
]), pg = Object.values(Y).some((e) => e.type === "text" && e.value || e.type === "select" && e.value || e.type === "multiselect" && Array.isArray(e.value) && e.value.length > 0), mg = useMemo(() => {
|
|
13585
13589
|
let e = [];
|
|
13586
|
-
return Object.entries(
|
|
13587
|
-
let i =
|
|
13590
|
+
return Object.entries(Y).forEach(([t, n]) => {
|
|
13591
|
+
let i = U.find((e) => e.id === t);
|
|
13588
13592
|
i && (n.type === "text" && n.value ? e.push({
|
|
13589
13593
|
columnId: t,
|
|
13590
13594
|
columnLabel: i.label,
|
|
@@ -13599,25 +13603,25 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13599
13603
|
});
|
|
13600
13604
|
}));
|
|
13601
13605
|
}), e;
|
|
13602
|
-
}, [
|
|
13603
|
-
let n =
|
|
13604
|
-
if (n.type === "text")
|
|
13606
|
+
}, [Y, U]), hg = (e, t) => {
|
|
13607
|
+
let n = Y[e];
|
|
13608
|
+
if (n.type === "text") Uh(e, "", "text");
|
|
13605
13609
|
else if (n.type === "multiselect" && Array.isArray(n.value)) {
|
|
13606
13610
|
let i = n.value.filter((e) => e !== t);
|
|
13607
|
-
|
|
13611
|
+
Uh(e, i, "multiselect");
|
|
13608
13612
|
}
|
|
13609
13613
|
};
|
|
13610
13614
|
useEffect(() => {
|
|
13611
13615
|
let e = (e) => {
|
|
13612
|
-
|
|
13616
|
+
H.current && !H.current.contains(e.target) && B(!1);
|
|
13613
13617
|
};
|
|
13614
|
-
return
|
|
13618
|
+
return Rh && document.addEventListener("mousedown", e), () => {
|
|
13615
13619
|
document.removeEventListener("mousedown", e);
|
|
13616
13620
|
};
|
|
13617
|
-
}, [
|
|
13618
|
-
let
|
|
13619
|
-
Xh(),
|
|
13620
|
-
},
|
|
13621
|
+
}, [Rh]);
|
|
13622
|
+
let gg = Math.ceil(X.total / X.pageSize), _g = (e) => eg[e.id] ? eg[e.id] : e.width ? e.width : e.isAction ? 100 : 150 + (e.filterable ? 50 : 0), vg = () => {
|
|
13623
|
+
Xh(), jh?.();
|
|
13624
|
+
}, yg = ({ columnLabel: e, value: t, onRemove: n }) => /* @__PURE__ */ jsxs("div", {
|
|
13621
13625
|
className: "inline-flex items-center gap-1 bg-blue-100 text-blue-800 font-medium px-4 py-1 rounded-full border border-blue-300 hover:bg-blue-200 transition-colors",
|
|
13622
13626
|
children: [
|
|
13623
13627
|
/* @__PURE__ */ jsxs("span", {
|
|
@@ -13637,40 +13641,41 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13637
13641
|
]
|
|
13638
13642
|
});
|
|
13639
13643
|
return /* @__PURE__ */ jsxs("div", {
|
|
13640
|
-
className: `w-full bg-redi-background border border-solid border-gray-500 rounded-xl overflow-hidden font-family-base shadow ${
|
|
13644
|
+
className: `w-full bg-redi-background border border-solid border-gray-500 rounded-xl overflow-hidden font-family-base shadow ${k}`,
|
|
13641
13645
|
children: [
|
|
13642
13646
|
/* @__PURE__ */ jsxs("div", {
|
|
13643
|
-
className: "flex items-center justify-between p-
|
|
13647
|
+
className: "flex items-center justify-between p-2 bg-transparent border-b border-solid border-gray-400",
|
|
13644
13648
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
13645
13649
|
className: "flex items-center gap-2",
|
|
13646
13650
|
children: [
|
|
13647
|
-
(
|
|
13651
|
+
(Ah || jh) && /* @__PURE__ */ jsx(Button_default, {
|
|
13648
13652
|
level: "secondary",
|
|
13649
|
-
onClick:
|
|
13650
|
-
loading:
|
|
13653
|
+
onClick: vg,
|
|
13654
|
+
loading: ng,
|
|
13651
13655
|
children: /* @__PURE__ */ jsx(RefreshIcon, { size: 18 })
|
|
13652
13656
|
}),
|
|
13653
|
-
/* @__PURE__ */ jsxs("div", {
|
|
13657
|
+
Fh && /* @__PURE__ */ jsxs("div", {
|
|
13654
13658
|
className: "relative",
|
|
13655
13659
|
children: [/* @__PURE__ */ jsxs(Button_default, {
|
|
13656
13660
|
level: "secondary",
|
|
13657
|
-
onClick: () =>
|
|
13661
|
+
onClick: () => B(!Rh),
|
|
13662
|
+
className: "p-1 px-2",
|
|
13658
13663
|
children: [/* @__PURE__ */ jsx(EyeIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
13659
13664
|
className: "hidden md:block",
|
|
13660
|
-
children:
|
|
13665
|
+
children: A.configuration
|
|
13661
13666
|
})]
|
|
13662
|
-
}),
|
|
13667
|
+
}), Rh && /* @__PURE__ */ jsx("div", {
|
|
13663
13668
|
className: "absolute top-full left-0 bg-white border border-solid border-gray-300 rounded-md shadow-lg z-1000 mt-2 min-w-2xs max-w-xs opacity-100 visible p-4",
|
|
13664
|
-
ref:
|
|
13669
|
+
ref: H,
|
|
13665
13670
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13666
13671
|
className: "mb-4 last:mb-0",
|
|
13667
13672
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13668
13673
|
className: "text-sm font-semibold text-redi-text mb-2 uppercase",
|
|
13669
|
-
children:
|
|
13674
|
+
children: A.columnVisibility
|
|
13670
13675
|
}), /* @__PURE__ */ jsx("div", {
|
|
13671
13676
|
className: "flex flex-col gap-2",
|
|
13672
|
-
children:
|
|
13673
|
-
let t = !
|
|
13677
|
+
children: U.filter((e) => !e.isAction).map((e) => {
|
|
13678
|
+
let t = !Qh.includes(e.id);
|
|
13674
13679
|
return /* @__PURE__ */ jsxs("div", {
|
|
13675
13680
|
className: "flex items-center justify-between gap-2 hover:bg-gray-50 p-1 rounded",
|
|
13676
13681
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -13679,7 +13684,7 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13679
13684
|
type: "checkbox",
|
|
13680
13685
|
className: "w-4 h-4 accent-redi-primary cursor-pointer",
|
|
13681
13686
|
checked: t,
|
|
13682
|
-
onChange: () =>
|
|
13687
|
+
onChange: () => qh(e.id),
|
|
13683
13688
|
id: `col-visibility-${e.id}`
|
|
13684
13689
|
}), /* @__PURE__ */ jsx("label", {
|
|
13685
13690
|
htmlFor: `col-visibility-${e.id}`,
|
|
@@ -13689,10 +13694,10 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13689
13694
|
}), t && /* @__PURE__ */ jsxs("div", {
|
|
13690
13695
|
className: "flex items-center gap-1",
|
|
13691
13696
|
children: [
|
|
13692
|
-
|
|
13697
|
+
M && /* @__PURE__ */ jsx(Button_default, {
|
|
13693
13698
|
level: "icon",
|
|
13694
13699
|
onClick: (t) => {
|
|
13695
|
-
t.stopPropagation(),
|
|
13700
|
+
t.stopPropagation(), K(e.id);
|
|
13696
13701
|
},
|
|
13697
13702
|
"aria-label": Z.includes(e.id) ? "Unpin column" : "Pin column",
|
|
13698
13703
|
className: "p-1 hover:bg-gray-200 rounded-full",
|
|
@@ -13708,11 +13713,11 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13708
13713
|
level: "icon",
|
|
13709
13714
|
onClick: (t) => {
|
|
13710
13715
|
t.stopPropagation();
|
|
13711
|
-
let n =
|
|
13716
|
+
let n = U.map((t) => t.id === e.id ? {
|
|
13712
13717
|
...t,
|
|
13713
13718
|
draggable: !t.draggable
|
|
13714
13719
|
} : t);
|
|
13715
|
-
|
|
13720
|
+
W(n);
|
|
13716
13721
|
},
|
|
13717
13722
|
"aria-label": e.draggable ? "Disable drag" : "Enable drag",
|
|
13718
13723
|
className: "p-1 hover:bg-gray-200 rounded-full",
|
|
@@ -13726,11 +13731,11 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13726
13731
|
level: "icon",
|
|
13727
13732
|
onClick: (t) => {
|
|
13728
13733
|
t.stopPropagation();
|
|
13729
|
-
let n =
|
|
13734
|
+
let n = U.map((t) => t.id === e.id ? {
|
|
13730
13735
|
...t,
|
|
13731
13736
|
filterable: !t.filterable
|
|
13732
13737
|
} : t);
|
|
13733
|
-
|
|
13738
|
+
W(n);
|
|
13734
13739
|
},
|
|
13735
13740
|
"aria-label": e.filterable ? "Disable filter" : "Enable filter",
|
|
13736
13741
|
className: "p-1 hover:bg-gray-200 rounded-full",
|
|
@@ -13750,26 +13755,26 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13750
13755
|
})
|
|
13751
13756
|
})]
|
|
13752
13757
|
}),
|
|
13753
|
-
|
|
13758
|
+
w && pg && /* @__PURE__ */ jsx(Button_default, {
|
|
13754
13759
|
level: "icon",
|
|
13755
|
-
onClick:
|
|
13756
|
-
label:
|
|
13760
|
+
onClick: Wh,
|
|
13761
|
+
label: A.clearAllFilters,
|
|
13757
13762
|
children: /* @__PURE__ */ jsx(CloseIcon, { color: "white" })
|
|
13758
13763
|
}),
|
|
13759
|
-
|
|
13764
|
+
mg.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
13760
13765
|
className: "flex items-center gap-2 flex-wrap ml-2",
|
|
13761
|
-
children:
|
|
13766
|
+
children: mg.map((e, t) => /* @__PURE__ */ jsx(yg, {
|
|
13762
13767
|
columnLabel: e.columnLabel,
|
|
13763
13768
|
value: e.displayValue,
|
|
13764
|
-
onRemove: () =>
|
|
13769
|
+
onRemove: () => hg(e.columnId, e.value)
|
|
13765
13770
|
}, `${e.columnId}-${e.value}-${t}`))
|
|
13766
13771
|
})
|
|
13767
13772
|
]
|
|
13768
13773
|
}), /* @__PURE__ */ jsx("div", {
|
|
13769
13774
|
className: "flex items-center gap-2",
|
|
13770
|
-
children:
|
|
13775
|
+
children: E && /* @__PURE__ */ jsx(Button_default, {
|
|
13771
13776
|
level: "secondary",
|
|
13772
|
-
onClick:
|
|
13777
|
+
onClick: ug,
|
|
13773
13778
|
children: /* @__PURE__ */ jsx(DownloadIcon, { size: 18 })
|
|
13774
13779
|
})
|
|
13775
13780
|
})]
|
|
@@ -13780,8 +13785,8 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13780
13785
|
className: "w-full border-separate border-spacing-0 table-auto text-sm relative",
|
|
13781
13786
|
"aria-label": "Data Table",
|
|
13782
13787
|
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: Q.map((e, t) => {
|
|
13783
|
-
let n =
|
|
13784
|
-
if (i) for (let e = 0; e < t; e++) Z.includes(Q[e].id) && (a +=
|
|
13788
|
+
let n = _g(e), i = Z.includes(e.id), a = 0;
|
|
13789
|
+
if (i) for (let e = 0; e < t; e++) Z.includes(Q[e].id) && (a += _g(Q[e]));
|
|
13785
13790
|
let o = {
|
|
13786
13791
|
width: n,
|
|
13787
13792
|
minWidth: n,
|
|
@@ -13795,23 +13800,23 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13795
13800
|
};
|
|
13796
13801
|
return /* @__PURE__ */ jsx("th", {
|
|
13797
13802
|
className: `bg-gray-50 border-b border-solid border-gray-200 text-left font-semibold text-redi-text p-0 sticky top-0 z-10 select-none hover:bg-gray-200
|
|
13798
|
-
${
|
|
13799
|
-
${
|
|
13800
|
-
${
|
|
13803
|
+
${R === t ? "opacity-50 bg-gray-300" : ""}
|
|
13804
|
+
${Lh === t ? "bg-redi-primary-bg border-l border-solid border-redi-primary" : ""}
|
|
13805
|
+
${Lh === t ? "bg-redi-primary-bg border-l border-solid border-redi-primary" : ""}
|
|
13801
13806
|
${i ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)]" : ""}
|
|
13802
13807
|
`,
|
|
13803
13808
|
style: o,
|
|
13804
|
-
draggable: !e.isAction &&
|
|
13805
|
-
onDragStart: (n) => !e.isAction &&
|
|
13806
|
-
onDragOver: (n) => !e.isAction &&
|
|
13807
|
-
onDragLeave:
|
|
13808
|
-
onDrop: (n) => !e.isAction &&
|
|
13809
|
-
onDragEnd:
|
|
13810
|
-
"aria-sort":
|
|
13809
|
+
draggable: !e.isAction && j && (e.draggable ?? !1),
|
|
13810
|
+
onDragStart: (n) => !e.isAction && j && (e.draggable ?? !1) && ag(n, t),
|
|
13811
|
+
onDragOver: (n) => !e.isAction && j && og(n, t),
|
|
13812
|
+
onDragLeave: sg,
|
|
13813
|
+
onDrop: (n) => !e.isAction && j && cg(n, t),
|
|
13814
|
+
onDragEnd: lg,
|
|
13815
|
+
"aria-sort": Zh?.column === e.id ? Zh.direction === "asc" ? "ascending" : "descending" : "none",
|
|
13811
13816
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13812
|
-
className: "flex items-center py-
|
|
13817
|
+
className: "flex items-center py-2 px-3 gap-2 min-h-10",
|
|
13813
13818
|
children: [
|
|
13814
|
-
!e.isAction &&
|
|
13819
|
+
!e.isAction && j && (e.draggable ?? !1) && /* @__PURE__ */ jsx("div", {
|
|
13815
13820
|
className: "text-gray-600 cursor-grab opacity-70 hover:opacity-100 text-base",
|
|
13816
13821
|
"aria-hidden": "true",
|
|
13817
13822
|
children: "⋮⋮"
|
|
@@ -13819,29 +13824,29 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13819
13824
|
e.id === "selection-synthetic" && /* @__PURE__ */ jsx("input", {
|
|
13820
13825
|
type: "checkbox",
|
|
13821
13826
|
className: "w-4 h-4 accent-redi-primary cursor-pointer mr-2",
|
|
13822
|
-
checked:
|
|
13823
|
-
let t = typeof
|
|
13824
|
-
return
|
|
13827
|
+
checked: J.length > 0 && J.every((e) => {
|
|
13828
|
+
let t = typeof I == "function" ? I(e) : e[I];
|
|
13829
|
+
return $h.includes(t);
|
|
13825
13830
|
}),
|
|
13826
13831
|
onChange: (e) => {
|
|
13827
|
-
e.stopPropagation(),
|
|
13832
|
+
e.stopPropagation(), Yh(J);
|
|
13828
13833
|
}
|
|
13829
13834
|
}),
|
|
13830
13835
|
/* @__PURE__ */ jsxs("div", {
|
|
13831
13836
|
className: "flex flex-1 items-center gap-2",
|
|
13832
13837
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
13833
|
-
className:
|
|
13838
|
+
className: C ? "cursor-pointer py-1 px-1.5 rounded-sm flex items-center gap-1.5 text-sm font-semibold text-redi-text uppercase hover:bg-redi-background hover:text-redi-link-text" : "",
|
|
13834
13839
|
onClick: (t) => {
|
|
13835
|
-
t.stopPropagation(), e.sortable &&
|
|
13840
|
+
t.stopPropagation(), e.sortable && Hh(e.id);
|
|
13836
13841
|
},
|
|
13837
13842
|
role: "button",
|
|
13838
13843
|
tabIndex: 0,
|
|
13839
13844
|
onKeyDown: (t) => {
|
|
13840
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.sortable &&
|
|
13845
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.sortable && Hh(e.id));
|
|
13841
13846
|
},
|
|
13842
|
-
children: [e.label, e.sortable &&
|
|
13847
|
+
children: [e.label, e.sortable && Zh?.column === e.id && /* @__PURE__ */ jsx("span", {
|
|
13843
13848
|
className: "font-bold text-redi-link-text text-base",
|
|
13844
|
-
children:
|
|
13849
|
+
children: Zh.direction === "asc" ? " ↑" : " ↓"
|
|
13845
13850
|
})]
|
|
13846
13851
|
}), /* @__PURE__ */ jsx("div", {
|
|
13847
13852
|
className: "flex items-center gap-1",
|
|
@@ -13850,35 +13855,35 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13850
13855
|
children: [/* @__PURE__ */ jsx(Button_default, {
|
|
13851
13856
|
level: "icon",
|
|
13852
13857
|
onClick: (t) => {
|
|
13853
|
-
t.stopPropagation(),
|
|
13858
|
+
t.stopPropagation(), dg(e.id);
|
|
13854
13859
|
},
|
|
13855
13860
|
"aria-label": `Filter by ${e.label}`,
|
|
13856
13861
|
children: /* @__PURE__ */ jsx(FilterIcon, { size: 16 })
|
|
13857
|
-
}),
|
|
13862
|
+
}), V === e.id && /* @__PURE__ */ jsx(AdvancedFilter_default, {
|
|
13858
13863
|
columnId: e.id,
|
|
13859
13864
|
label: e.label,
|
|
13860
|
-
options:
|
|
13861
|
-
textValue:
|
|
13862
|
-
selectedValues:
|
|
13863
|
-
onTextChange: (t) =>
|
|
13864
|
-
onSelectionChange: (t) =>
|
|
13865
|
-
onClose: () =>
|
|
13865
|
+
options: fg(e.id),
|
|
13866
|
+
textValue: Y[e.id]?.type === "text" ? String(Y[e.id].value || "") : "",
|
|
13867
|
+
selectedValues: Y[e.id]?.value ? Array.isArray(Y[e.id].value) ? Y[e.id].value : [String(Y[e.id].value)] : [],
|
|
13868
|
+
onTextChange: (t) => Uh(e.id, t, "text"),
|
|
13869
|
+
onSelectionChange: (t) => Uh(e.id, t, "multiselect"),
|
|
13870
|
+
onClose: () => zh(null)
|
|
13866
13871
|
})]
|
|
13867
13872
|
})
|
|
13868
13873
|
})]
|
|
13869
13874
|
}),
|
|
13870
|
-
|
|
13875
|
+
N && !e.isAction && e.id !== "selection-synthetic" && /* @__PURE__ */ jsx("div", {
|
|
13871
13876
|
className: "absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-redi-primary z-20",
|
|
13872
|
-
onMouseDown: (t) =>
|
|
13877
|
+
onMouseDown: (t) => ig(t, e.id, n)
|
|
13873
13878
|
})
|
|
13874
13879
|
]
|
|
13875
13880
|
})
|
|
13876
13881
|
}, e.id);
|
|
13877
|
-
}) }) }), /* @__PURE__ */ jsx("tbody", { children:
|
|
13882
|
+
}) }) }), /* @__PURE__ */ jsx("tbody", { children: kh ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ jsx("tr", {
|
|
13878
13883
|
className: "border-b border-solid border-gray-100",
|
|
13879
13884
|
children: Q.map((e, t) => {
|
|
13880
|
-
let n =
|
|
13881
|
-
if (i) for (let e = 0; e < t; e++) Z.includes(Q[e].id) && (a +=
|
|
13885
|
+
let n = _g(e), i = Z.includes(e.id), a = 0;
|
|
13886
|
+
if (i) for (let e = 0; e < t; e++) Z.includes(Q[e].id) && (a += _g(Q[e]));
|
|
13882
13887
|
let o = {
|
|
13883
13888
|
width: n,
|
|
13884
13889
|
minWidth: n,
|
|
@@ -13891,17 +13896,17 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13891
13896
|
} : {}
|
|
13892
13897
|
};
|
|
13893
13898
|
return /* @__PURE__ */ jsx("td", {
|
|
13894
|
-
className: `py-
|
|
13899
|
+
className: `py-2 px-3 ${e.isAction ? "bg-white border-l border-gray-200" : ""} ${i ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)]" : ""}`,
|
|
13895
13900
|
style: o,
|
|
13896
13901
|
children: /* @__PURE__ */ jsx("div", { className: "h-4 bg-gray-200 rounded animate-pulse w-3/4" })
|
|
13897
13902
|
}, `skeleton-cell-${t}`);
|
|
13898
13903
|
})
|
|
13899
|
-
}, `skeleton-${t}`)) :
|
|
13904
|
+
}, `skeleton-${t}`)) : J.length > 0 ? J.map((e, t) => /* @__PURE__ */ jsx("tr", {
|
|
13900
13905
|
className: "even:bg-gray-50 hover:bg-gray-100 border-b border-solid border-b-gray-100 odd:bg-white",
|
|
13901
13906
|
children: Q.map((n, i) => {
|
|
13902
|
-
let a = typeof n.accessor == "function" ? n.accessor(e) : e[n.accessor], o = n.isAction, s =
|
|
13903
|
-
if (c) for (let e = 0; e < i; e++) Z.includes(Q[e].id) && (u +=
|
|
13904
|
-
let f = `py-
|
|
13907
|
+
let a = typeof n.accessor == "function" ? n.accessor(e) : e[n.accessor], o = n.isAction, s = _g(n), c = Z.includes(n.id), l = o && F, u = 0;
|
|
13908
|
+
if (c) for (let e = 0; e < i; e++) Z.includes(Q[e].id) && (u += _g(Q[e]));
|
|
13909
|
+
let f = `py-2 px-3 text-redi-text font-normal leading-6 align-middle border-r border-solid border-r-gray-300 static table-cell last:border-r-0 first:font-medium
|
|
13905
13910
|
${o ? "border-l border-gray-300" : ""}
|
|
13906
13911
|
${c ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)]" : ""}
|
|
13907
13912
|
`, p = {
|
|
@@ -13956,81 +13961,81 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: n, defaultFilte
|
|
|
13956
13961
|
})
|
|
13957
13962
|
}), /* @__PURE__ */ jsx("span", {
|
|
13958
13963
|
className: "text-sm font-medium",
|
|
13959
|
-
children:
|
|
13964
|
+
children: A.noData
|
|
13960
13965
|
})]
|
|
13961
13966
|
})
|
|
13962
13967
|
}) }) })]
|
|
13963
13968
|
})
|
|
13964
13969
|
}),
|
|
13965
|
-
|
|
13970
|
+
T && /* @__PURE__ */ jsxs("div", {
|
|
13966
13971
|
className: "flex items-center justify-between py-4 px-6 bg-white border-t-gray-300 border-solid border-t gap-4",
|
|
13967
13972
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13968
13973
|
className: "text-redi-text text-base font-medium shrink-0",
|
|
13969
13974
|
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
13970
|
-
|
|
13975
|
+
A.pagination?.showingItems,
|
|
13971
13976
|
" ",
|
|
13972
|
-
(
|
|
13977
|
+
(X.page - 1) * X.pageSize + 1,
|
|
13973
13978
|
" ",
|
|
13974
|
-
|
|
13979
|
+
A.pagination?.to,
|
|
13975
13980
|
" ",
|
|
13976
|
-
Math.min(
|
|
13981
|
+
Math.min(X.page * X.pageSize, X.total),
|
|
13977
13982
|
" ",
|
|
13978
|
-
|
|
13983
|
+
A.pagination?.of,
|
|
13979
13984
|
" ",
|
|
13980
|
-
|
|
13985
|
+
X.total,
|
|
13981
13986
|
" ",
|
|
13982
|
-
|
|
13987
|
+
A.pagination?.items
|
|
13983
13988
|
] })
|
|
13984
13989
|
}), /* @__PURE__ */ jsxs("div", {
|
|
13985
13990
|
className: "flex items-center gap-5",
|
|
13986
13991
|
children: [/* @__PURE__ */ jsxs("label", {
|
|
13987
13992
|
className: "flex items-center gap-3 text-sm font-semibold text-redi-text",
|
|
13988
13993
|
children: [
|
|
13989
|
-
|
|
13994
|
+
A.pagination?.showPerPage,
|
|
13990
13995
|
/* @__PURE__ */ jsx("select", {
|
|
13991
|
-
value:
|
|
13992
|
-
onChange: (e) =>
|
|
13996
|
+
value: X.pageSize,
|
|
13997
|
+
onChange: (e) => Gh(Number(e.target.value)),
|
|
13993
13998
|
className: "py-1.5 px-2.5 border border-solid border-gray-300 rounded-md bg-white text-redi-text focus:outline-none focus:ring-2 focus:ring-redi-primary",
|
|
13994
|
-
children:
|
|
13999
|
+
children: h.map((e) => /* @__PURE__ */ jsx("option", {
|
|
13995
14000
|
value: e,
|
|
13996
14001
|
children: e
|
|
13997
14002
|
}, e))
|
|
13998
14003
|
}),
|
|
13999
|
-
|
|
14004
|
+
A.pagination?.perPageItems
|
|
14000
14005
|
]
|
|
14001
14006
|
}), /* @__PURE__ */ jsxs("div", {
|
|
14002
14007
|
className: "flex gap-1 items-center",
|
|
14003
14008
|
children: [
|
|
14004
14009
|
/* @__PURE__ */ jsx(Button_default, {
|
|
14005
14010
|
level: "icon",
|
|
14006
|
-
onClick: () =>
|
|
14007
|
-
disabled:
|
|
14011
|
+
onClick: () => G(1),
|
|
14012
|
+
disabled: X.page === 1,
|
|
14008
14013
|
children: "<<"
|
|
14009
14014
|
}),
|
|
14010
14015
|
/* @__PURE__ */ jsx(Button_default, {
|
|
14011
14016
|
level: "icon",
|
|
14012
|
-
onClick: () =>
|
|
14013
|
-
disabled:
|
|
14017
|
+
onClick: () => G(X.page - 1),
|
|
14018
|
+
disabled: X.page === 1,
|
|
14014
14019
|
children: "<"
|
|
14015
14020
|
}),
|
|
14016
|
-
Array.from({ length: Math.min(3,
|
|
14021
|
+
Array.from({ length: Math.min(3, gg) }, (e, t) => {
|
|
14017
14022
|
let n;
|
|
14018
|
-
return n =
|
|
14019
|
-
level:
|
|
14020
|
-
onClick: () =>
|
|
14023
|
+
return n = gg <= 3 || X.page <= 2 ? t + 1 : X.page > gg - 2 ? gg - 2 + t : X.page - 1 + t, /* @__PURE__ */ jsx(Button_default, {
|
|
14024
|
+
level: X.page === n ? "primary" : "secondary",
|
|
14025
|
+
onClick: () => G(n),
|
|
14021
14026
|
children: n
|
|
14022
14027
|
}, n);
|
|
14023
14028
|
}),
|
|
14024
14029
|
/* @__PURE__ */ jsx(Button_default, {
|
|
14025
14030
|
level: "icon",
|
|
14026
|
-
onClick: () =>
|
|
14027
|
-
disabled:
|
|
14031
|
+
onClick: () => G(X.page + 1),
|
|
14032
|
+
disabled: X.page === gg,
|
|
14028
14033
|
children: ">"
|
|
14029
14034
|
}),
|
|
14030
14035
|
/* @__PURE__ */ jsx(Button_default, {
|
|
14031
14036
|
level: "icon",
|
|
14032
|
-
onClick: () =>
|
|
14033
|
-
disabled:
|
|
14037
|
+
onClick: () => G(gg),
|
|
14038
|
+
disabled: X.page === gg,
|
|
14034
14039
|
children: ">>"
|
|
14035
14040
|
})
|
|
14036
14041
|
]
|