dts-universal-report-module 1.0.15 → 1.0.16
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.esm.js +131 -125
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1561,7 +1561,7 @@ function kd(e) {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
let zd = 0;
|
|
1563
1563
|
function Ed(e) {
|
|
1564
|
-
e
|
|
1564
|
+
e !== null && e.__urm_row_id__ === void 0 && Object.defineProperty(e, "__urm_row_id__", {
|
|
1565
1565
|
value: zd++,
|
|
1566
1566
|
writable: !1,
|
|
1567
1567
|
enumerable: !1,
|
|
@@ -1589,9 +1589,11 @@ function Id(e = {}) {
|
|
|
1589
1589
|
enabled: !1,
|
|
1590
1590
|
levels: [],
|
|
1591
1591
|
collapsedGroups: []
|
|
1592
|
-
}), [Mt, cr] = V(""), [
|
|
1592
|
+
}), [Mt, cr] = V(""), [Ne, xt] = V(/* @__PURE__ */ new Set()), [Gt, kt] = V(
|
|
1593
1593
|
null
|
|
1594
|
-
), [
|
|
1594
|
+
), [rt, zt] = V(1), [qt, yt] = V(15), [Et, Ze] = V(!1), [yn, Hr] = V(!1), [Ur, Sr] = V(!1), [It, dr] = V(null), [Yr, Jt] = V(!1), [Gr, bn] = V(
|
|
1595
|
+
null
|
|
1596
|
+
), [dt, wr] = V(null), qr = it(null), Pe = fe(() => a ? jc(a.permissions, Ft) : "owner", [a]), Cr = Hc(Pe), vn = fe(() => !(a != null && a.uploadedData) || !(a != null && a.schema) ? { totalRows: 0, totalColumns: 0 } : od(a.uploadedData, a.schema), [a == null ? void 0 : a.uploadedData, a == null ? void 0 : a.schema]), Tt = L(() => {
|
|
1595
1597
|
a && (qr.current = ld(a));
|
|
1596
1598
|
}, [a]), j = L((z, $) => {
|
|
1597
1599
|
m(
|
|
@@ -1769,7 +1771,7 @@ function Id(e = {}) {
|
|
|
1769
1771
|
groupedData: Jr = [],
|
|
1770
1772
|
metrics: Kr = { totalRows: 0, searchedRows: 0, isGrouped: !1 },
|
|
1771
1773
|
isGrouped: wn = !1,
|
|
1772
|
-
paginationEngine:
|
|
1774
|
+
paginationEngine: Me
|
|
1773
1775
|
} = Wt || {}, ne = ((Mi = Wt.viewEngine) == null ? void 0 : Mi.activeView) || ut, Ot = ((Wi = Wt.viewEngine) == null ? void 0 : Wi.isDirty) || !1;
|
|
1774
1776
|
ke(() => {
|
|
1775
1777
|
if (!(!ne || !a) && !a.columnOrder) {
|
|
@@ -1779,7 +1781,7 @@ function Id(e = {}) {
|
|
|
1779
1781
|
});
|
|
1780
1782
|
}
|
|
1781
1783
|
}, [a == null ? void 0 : a.activeViewId]);
|
|
1782
|
-
const
|
|
1784
|
+
const We = fe(() => !(a != null && a.schema) || !ne ? null : $c(
|
|
1783
1785
|
a.filters || [],
|
|
1784
1786
|
a.sortStack || [],
|
|
1785
1787
|
a.schema,
|
|
@@ -1797,7 +1799,7 @@ function Id(e = {}) {
|
|
|
1797
1799
|
a == null ? void 0 : a.columnWidths,
|
|
1798
1800
|
a == null ? void 0 : a.grouping,
|
|
1799
1801
|
ne
|
|
1800
|
-
]), zr = fe(() => !ne || !
|
|
1802
|
+
]), zr = fe(() => !ne || !We || !Ot ? [] : Rc(We, ne.snapshot), [ne, We, Ot]), Ee = L((z, $, M) => {
|
|
1801
1803
|
const A = {
|
|
1802
1804
|
id: `report-${Date.now()}`,
|
|
1803
1805
|
name: z,
|
|
@@ -1847,7 +1849,7 @@ function Id(e = {}) {
|
|
|
1847
1849
|
(z) => {
|
|
1848
1850
|
if (!a)
|
|
1849
1851
|
return;
|
|
1850
|
-
if (!Lt("edit_sorting",
|
|
1852
|
+
if (!Lt("edit_sorting", Pe)) {
|
|
1851
1853
|
g(Vt("edit_sorting"), "error");
|
|
1852
1854
|
return;
|
|
1853
1855
|
}
|
|
@@ -1885,7 +1887,7 @@ function Id(e = {}) {
|
|
|
1885
1887
|
});
|
|
1886
1888
|
}
|
|
1887
1889
|
},
|
|
1888
|
-
[a,
|
|
1890
|
+
[a, Pe, j]
|
|
1889
1891
|
), Xt = L(
|
|
1890
1892
|
(z) => {
|
|
1891
1893
|
if (a)
|
|
@@ -1975,7 +1977,7 @@ function Id(e = {}) {
|
|
|
1975
1977
|
var M;
|
|
1976
1978
|
if (!a)
|
|
1977
1979
|
return;
|
|
1978
|
-
if (!Lt("edit_filters",
|
|
1980
|
+
if (!Lt("edit_filters", Pe)) {
|
|
1979
1981
|
g(Vt("edit_filters"), "error");
|
|
1980
1982
|
return;
|
|
1981
1983
|
}
|
|
@@ -1998,12 +2000,12 @@ function Id(e = {}) {
|
|
|
1998
2000
|
Dt(q);
|
|
1999
2001
|
}
|
|
2000
2002
|
},
|
|
2001
|
-
[a,
|
|
2003
|
+
[a, Pe, j, Tt, Dt, ze]
|
|
2002
2004
|
), Ir = L(
|
|
2003
2005
|
(z, $) => {
|
|
2004
2006
|
if (!a)
|
|
2005
2007
|
return;
|
|
2006
|
-
if (!Lt("edit_filters",
|
|
2008
|
+
if (!Lt("edit_filters", Pe)) {
|
|
2007
2009
|
g(Vt("edit_filters"), "error");
|
|
2008
2010
|
return;
|
|
2009
2011
|
}
|
|
@@ -2012,12 +2014,12 @@ function Id(e = {}) {
|
|
|
2012
2014
|
filters: A
|
|
2013
2015
|
});
|
|
2014
2016
|
},
|
|
2015
|
-
[a,
|
|
2017
|
+
[a, Pe, j, ze]
|
|
2016
2018
|
), Tr = L(
|
|
2017
2019
|
(z) => {
|
|
2018
2020
|
if (!a)
|
|
2019
2021
|
return;
|
|
2020
|
-
if (!Lt("edit_filters",
|
|
2022
|
+
if (!Lt("edit_filters", Pe)) {
|
|
2021
2023
|
g(Vt("edit_filters"), "error");
|
|
2022
2024
|
return;
|
|
2023
2025
|
}
|
|
@@ -2026,11 +2028,11 @@ function Id(e = {}) {
|
|
|
2026
2028
|
filters: M.length > 0 ? M : void 0
|
|
2027
2029
|
});
|
|
2028
2030
|
},
|
|
2029
|
-
[a,
|
|
2031
|
+
[a, Pe, j, ze]
|
|
2030
2032
|
), pr = L(() => {
|
|
2031
2033
|
if (!a)
|
|
2032
2034
|
return;
|
|
2033
|
-
if (!Lt("edit_filters",
|
|
2035
|
+
if (!Lt("edit_filters", Pe)) {
|
|
2034
2036
|
g(Vt("edit_filters"), "error");
|
|
2035
2037
|
return;
|
|
2036
2038
|
}
|
|
@@ -2038,11 +2040,11 @@ function Id(e = {}) {
|
|
|
2038
2040
|
ze("filters", "filter_cleared", z, null), j(a.id, {
|
|
2039
2041
|
filters: void 0
|
|
2040
2042
|
});
|
|
2041
|
-
}, [a,
|
|
2043
|
+
}, [a, Pe, j, ze]), Zr = L(
|
|
2042
2044
|
(z) => {
|
|
2043
2045
|
if (!a)
|
|
2044
2046
|
return;
|
|
2045
|
-
if (!Lt("edit_filters",
|
|
2047
|
+
if (!Lt("edit_filters", Pe)) {
|
|
2046
2048
|
g(Vt("edit_filters"), "error");
|
|
2047
2049
|
return;
|
|
2048
2050
|
}
|
|
@@ -2051,7 +2053,7 @@ function Id(e = {}) {
|
|
|
2051
2053
|
filters: z.length > 0 ? z : void 0
|
|
2052
2054
|
});
|
|
2053
2055
|
},
|
|
2054
|
-
[a,
|
|
2056
|
+
[a, Pe, j, ze]
|
|
2055
2057
|
), tt = L(
|
|
2056
2058
|
(z) => {
|
|
2057
2059
|
var q;
|
|
@@ -2075,7 +2077,7 @@ function Id(e = {}) {
|
|
|
2075
2077
|
), Nt = L(
|
|
2076
2078
|
(z, $, M) => {
|
|
2077
2079
|
var $r;
|
|
2078
|
-
if (!(a != null && a.schema) || !
|
|
2080
|
+
if (!(a != null && a.schema) || !We)
|
|
2079
2081
|
return;
|
|
2080
2082
|
const A = a.views ?? [], q = A.filter((On) => !On.isDeleted).length, G = (($r = h.views) == null ? void 0 : $r.maxViews) ?? 10;
|
|
2081
2083
|
if (q >= G) {
|
|
@@ -2096,36 +2098,36 @@ function Id(e = {}) {
|
|
|
2096
2098
|
createdBy: Ft,
|
|
2097
2099
|
createdAt: Date.now(),
|
|
2098
2100
|
updatedAt: Date.now(),
|
|
2099
|
-
snapshot: { ...
|
|
2101
|
+
snapshot: { ...We }
|
|
2100
2102
|
}, Ce = M ? A.map((On) => ({ ...On, isDefault: !1 })) : A;
|
|
2101
2103
|
j(a.id, {
|
|
2102
2104
|
views: [...Ce, se],
|
|
2103
2105
|
activeViewId: se.id
|
|
2104
2106
|
}), g(`"${z}" view created`, "success");
|
|
2105
2107
|
},
|
|
2106
|
-
[a,
|
|
2108
|
+
[a, We, j]
|
|
2107
2109
|
), Qt = L(() => {
|
|
2108
2110
|
var $;
|
|
2109
|
-
if (!ne || !
|
|
2111
|
+
if (!ne || !We || ne.isDefault || !a)
|
|
2110
2112
|
return;
|
|
2111
2113
|
const z = ($ = a.views) == null ? void 0 : $.map(
|
|
2112
|
-
(M) => M.id === ne.id ? { ...M, snapshot: { ...
|
|
2114
|
+
(M) => M.id === ne.id ? { ...M, snapshot: { ...We } } : M
|
|
2113
2115
|
);
|
|
2114
2116
|
j(a.id, {
|
|
2115
2117
|
views: z
|
|
2116
2118
|
}), g(`"${ne.name}" view updated`, "success");
|
|
2117
|
-
}, [ne,
|
|
2119
|
+
}, [ne, We, a, j]), mr = L(
|
|
2118
2120
|
(z) => {
|
|
2119
2121
|
var A;
|
|
2120
|
-
if (!ne || !
|
|
2122
|
+
if (!ne || !We || !a)
|
|
2121
2123
|
return;
|
|
2122
|
-
const $ = z ??
|
|
2124
|
+
const $ = z ?? We.columnWidths, M = (A = a.views) == null ? void 0 : A.map(
|
|
2123
2125
|
(q) => q.id === ne.id ? {
|
|
2124
2126
|
...q,
|
|
2125
2127
|
snapshot: {
|
|
2126
2128
|
...q.snapshot,
|
|
2127
|
-
columnVisibility:
|
|
2128
|
-
columnOrder:
|
|
2129
|
+
columnVisibility: We.columnVisibility,
|
|
2130
|
+
columnOrder: We.columnOrder,
|
|
2129
2131
|
columnWidths: $
|
|
2130
2132
|
},
|
|
2131
2133
|
updatedAt: Date.now()
|
|
@@ -2136,18 +2138,18 @@ function Id(e = {}) {
|
|
|
2136
2138
|
columnWidths: $
|
|
2137
2139
|
}), g(`Column configuration saved to "${ne.name}"`, "success");
|
|
2138
2140
|
},
|
|
2139
|
-
[ne,
|
|
2141
|
+
[ne, We, a, j]
|
|
2140
2142
|
), kn = L(
|
|
2141
2143
|
(z) => {
|
|
2142
2144
|
var G, se;
|
|
2143
|
-
if (!
|
|
2145
|
+
if (!We || !a || !ne)
|
|
2144
2146
|
return;
|
|
2145
|
-
const $ = z ??
|
|
2147
|
+
const $ = z ?? We.columnWidths, M = {
|
|
2146
2148
|
...ne,
|
|
2147
2149
|
snapshot: {
|
|
2148
2150
|
...ne.snapshot,
|
|
2149
|
-
columnVisibility:
|
|
2150
|
-
columnOrder:
|
|
2151
|
+
columnVisibility: We.columnVisibility,
|
|
2152
|
+
columnOrder: We.columnOrder,
|
|
2151
2153
|
columnWidths: $
|
|
2152
2154
|
},
|
|
2153
2155
|
updatedAt: Date.now()
|
|
@@ -2156,8 +2158,8 @@ function Id(e = {}) {
|
|
|
2156
2158
|
...Ce,
|
|
2157
2159
|
snapshot: {
|
|
2158
2160
|
...Ce.snapshot,
|
|
2159
|
-
columnVisibility:
|
|
2160
|
-
columnOrder:
|
|
2161
|
+
columnVisibility: We.columnVisibility,
|
|
2162
|
+
columnOrder: We.columnOrder,
|
|
2161
2163
|
columnWidths: $
|
|
2162
2164
|
},
|
|
2163
2165
|
updatedAt: Date.now()
|
|
@@ -2173,7 +2175,7 @@ function Id(e = {}) {
|
|
|
2173
2175
|
"success"
|
|
2174
2176
|
);
|
|
2175
2177
|
},
|
|
2176
|
-
[
|
|
2178
|
+
[We, a, ne, j]
|
|
2177
2179
|
), zn = L(() => {
|
|
2178
2180
|
ee(!0);
|
|
2179
2181
|
}, []), fr = L(() => {
|
|
@@ -2319,26 +2321,26 @@ function Id(e = {}) {
|
|
|
2319
2321
|
[a, h, j]
|
|
2320
2322
|
);
|
|
2321
2323
|
ke(() => {
|
|
2322
|
-
|
|
2324
|
+
Me != null && Me.resetPage ? Me.resetPage() : zt(1);
|
|
2323
2325
|
}, [a == null ? void 0 : a.filters, Mt, a == null ? void 0 : a.activeViewId]), ke(() => {
|
|
2324
|
-
|
|
2325
|
-
}, [
|
|
2326
|
+
Me && Me.currentPage !== rt && zt(Me.currentPage);
|
|
2327
|
+
}, [Me == null ? void 0 : Me.currentPage]);
|
|
2326
2328
|
const Ve = L(
|
|
2327
2329
|
(z) => {
|
|
2328
|
-
|
|
2330
|
+
Me != null && Me.goToPage && Me.goToPage(z), zt(z);
|
|
2329
2331
|
},
|
|
2330
|
-
[
|
|
2332
|
+
[Me]
|
|
2331
2333
|
), _t = L(
|
|
2332
2334
|
(z) => {
|
|
2333
2335
|
const $ = (rt - 1) * qt, M = Math.floor($ / z) + 1;
|
|
2334
|
-
yt(z), zt(M);
|
|
2336
|
+
yt(z), zt(M), Me == null || Me.goToPage(M);
|
|
2335
2337
|
},
|
|
2336
|
-
[rt, qt]
|
|
2338
|
+
[rt, qt, Me]
|
|
2337
2339
|
), vt = L(
|
|
2338
2340
|
(z, $) => {
|
|
2339
2341
|
if (!a)
|
|
2340
2342
|
return;
|
|
2341
|
-
if (!Lt("edit_columns",
|
|
2343
|
+
if (!Lt("edit_columns", Pe)) {
|
|
2342
2344
|
g(Vt("edit_columns"), "error");
|
|
2343
2345
|
return;
|
|
2344
2346
|
}
|
|
@@ -2350,11 +2352,11 @@ function Id(e = {}) {
|
|
|
2350
2352
|
columnVisibility: A
|
|
2351
2353
|
});
|
|
2352
2354
|
},
|
|
2353
|
-
[a, ne,
|
|
2355
|
+
[a, ne, Pe, j]
|
|
2354
2356
|
), er = L(
|
|
2355
2357
|
(z) => {
|
|
2356
2358
|
if (a) {
|
|
2357
|
-
if (!Lt("edit_columns",
|
|
2359
|
+
if (!Lt("edit_columns", Pe)) {
|
|
2358
2360
|
g(Vt("edit_columns"), "error");
|
|
2359
2361
|
return;
|
|
2360
2362
|
}
|
|
@@ -2363,12 +2365,12 @@ function Id(e = {}) {
|
|
|
2363
2365
|
});
|
|
2364
2366
|
}
|
|
2365
2367
|
},
|
|
2366
|
-
[a,
|
|
2368
|
+
[a, Pe, j]
|
|
2367
2369
|
), Tn = L(
|
|
2368
2370
|
(z, $) => {
|
|
2369
2371
|
if (!a)
|
|
2370
2372
|
return;
|
|
2371
|
-
if (!Lt("edit_columns",
|
|
2373
|
+
if (!Lt("edit_columns", Pe)) {
|
|
2372
2374
|
g(Vt("edit_columns"), "error");
|
|
2373
2375
|
return;
|
|
2374
2376
|
}
|
|
@@ -2380,7 +2382,7 @@ function Id(e = {}) {
|
|
|
2380
2382
|
columnWidths: A
|
|
2381
2383
|
});
|
|
2382
2384
|
},
|
|
2383
|
-
[a, ne,
|
|
2385
|
+
[a, ne, Pe, j]
|
|
2384
2386
|
), hr = L(
|
|
2385
2387
|
(z) => {
|
|
2386
2388
|
if (!a)
|
|
@@ -2449,29 +2451,22 @@ function Id(e = {}) {
|
|
|
2449
2451
|
xt((M) => {
|
|
2450
2452
|
const A = new Set(M);
|
|
2451
2453
|
if ($ !== void 0) {
|
|
2452
|
-
const q = Array.from(A).find(
|
|
2453
|
-
(G) => (G == null ? void 0 : G.__urm_row_id__) === $
|
|
2454
|
-
);
|
|
2454
|
+
const q = Array.from(A).find((G) => (G == null ? void 0 : G.__urm_row_id__) === $);
|
|
2455
2455
|
q !== void 0 ? A.delete(q) : A.add(z);
|
|
2456
2456
|
} else {
|
|
2457
|
-
const q = JSON.stringify(z), G = Array.from(A).find(
|
|
2458
|
-
(se) => JSON.stringify(se) === q
|
|
2459
|
-
);
|
|
2457
|
+
const q = JSON.stringify(z), G = Array.from(A).find((se) => JSON.stringify(se) === q);
|
|
2460
2458
|
G !== void 0 ? A.delete(G) : A.add(z);
|
|
2461
2459
|
}
|
|
2462
2460
|
return A;
|
|
2463
2461
|
});
|
|
2464
|
-
}, []), Fo = L(
|
|
2465
|
-
(
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
},
|
|
2473
|
-
[]
|
|
2474
|
-
), Js = L(
|
|
2462
|
+
}, []), Fo = L((z, $) => {
|
|
2463
|
+
xt((M) => {
|
|
2464
|
+
const A = new Set(M);
|
|
2465
|
+
for (const q of $)
|
|
2466
|
+
z ? A.add(q) : A.delete(q);
|
|
2467
|
+
return A;
|
|
2468
|
+
});
|
|
2469
|
+
}, []), Js = L(
|
|
2475
2470
|
(z, $, M) => {
|
|
2476
2471
|
xt((A) => {
|
|
2477
2472
|
const q = new Set(A), G = Math.min(z, $), se = Math.max(z, $);
|
|
@@ -2526,14 +2521,14 @@ function Id(e = {}) {
|
|
|
2526
2521
|
if (j(a.id, {
|
|
2527
2522
|
showFavoritesOnly: $
|
|
2528
2523
|
}), $) {
|
|
2529
|
-
if (kt(new Set(
|
|
2524
|
+
if (kt(new Set(Ne)), Ne.size > 0) {
|
|
2530
2525
|
const M = new Set(
|
|
2531
2526
|
z.map((q) => {
|
|
2532
2527
|
var G, se;
|
|
2533
2528
|
return (se = (G = a.uploadedData) == null ? void 0 : G[q]) == null ? void 0 : se.__urm_row_id__;
|
|
2534
2529
|
}).filter((q) => q !== void 0)
|
|
2535
2530
|
), A = new Set(
|
|
2536
|
-
Array.from(
|
|
2531
|
+
Array.from(Ne).filter(
|
|
2537
2532
|
(q) => (q == null ? void 0 : q.__urm_row_id__) !== void 0 && M.has(q.__urm_row_id__)
|
|
2538
2533
|
)
|
|
2539
2534
|
);
|
|
@@ -2546,7 +2541,7 @@ function Id(e = {}) {
|
|
|
2546
2541
|
} else {
|
|
2547
2542
|
if (Gt !== null) {
|
|
2548
2543
|
const M = new Set(
|
|
2549
|
-
Array.from(
|
|
2544
|
+
Array.from(Ne).map((se) => se == null ? void 0 : se.__urm_row_id__).filter(Boolean)
|
|
2550
2545
|
), A = new Set(
|
|
2551
2546
|
Array.from(Gt).map((se) => se == null ? void 0 : se.__urm_row_id__).filter(Boolean)
|
|
2552
2547
|
), q = new Set(
|
|
@@ -2561,17 +2556,17 @@ function Id(e = {}) {
|
|
|
2561
2556
|
return;
|
|
2562
2557
|
const $r = q.has(Ce), On = M.has(Ce);
|
|
2563
2558
|
$r && !On || G.add(se);
|
|
2564
|
-
}), Array.from(
|
|
2559
|
+
}), Array.from(Ne).forEach((se) => {
|
|
2565
2560
|
const Ce = se == null ? void 0 : se.__urm_row_id__;
|
|
2566
2561
|
Ce !== void 0 && (A.has(Ce) || G.add(se));
|
|
2567
2562
|
}), xt(G), kt(null);
|
|
2568
2563
|
}
|
|
2569
2564
|
g("Showing all data", "info");
|
|
2570
2565
|
}
|
|
2571
|
-
}, [a, j,
|
|
2566
|
+
}, [a, j, Ne, Gt]), tl = L(
|
|
2572
2567
|
(z) => {
|
|
2573
2568
|
if (a) {
|
|
2574
|
-
if (!Lt("edit_columns",
|
|
2569
|
+
if (!Lt("edit_columns", Pe)) {
|
|
2575
2570
|
g(Vt("edit_columns"), "error");
|
|
2576
2571
|
return;
|
|
2577
2572
|
}
|
|
@@ -2607,7 +2602,7 @@ function Id(e = {}) {
|
|
|
2607
2602
|
[
|
|
2608
2603
|
a,
|
|
2609
2604
|
ne,
|
|
2610
|
-
|
|
2605
|
+
Pe,
|
|
2611
2606
|
j,
|
|
2612
2607
|
Tt,
|
|
2613
2608
|
Dt,
|
|
@@ -2714,9 +2709,9 @@ function Id(e = {}) {
|
|
|
2714
2709
|
pe(!1), X(null);
|
|
2715
2710
|
}, []), ll = L(
|
|
2716
2711
|
(z) => {
|
|
2717
|
-
!(a != null && a.schema) ||
|
|
2712
|
+
!(a != null && a.schema) || Ne.size === 0 || (ce(!0), setTimeout(() => {
|
|
2718
2713
|
try {
|
|
2719
|
-
const $ = Array.from(
|
|
2714
|
+
const $ = Array.from(Ne), M = fo(
|
|
2720
2715
|
$,
|
|
2721
2716
|
a.schema,
|
|
2722
2717
|
a.filters ?? [],
|
|
@@ -2742,7 +2737,7 @@ function Id(e = {}) {
|
|
|
2742
2737
|
}
|
|
2743
2738
|
}, 500));
|
|
2744
2739
|
},
|
|
2745
|
-
[a, ne,
|
|
2740
|
+
[a, ne, Ne, Jr]
|
|
2746
2741
|
), cl = L(
|
|
2747
2742
|
(z, $) => {
|
|
2748
2743
|
if (a)
|
|
@@ -2826,18 +2821,21 @@ function Id(e = {}) {
|
|
|
2826
2821
|
}
|
|
2827
2822
|
}
|
|
2828
2823
|
}, [a == null ? void 0 : a.schemaLocked, a == null ? void 0 : a.schema, a == null ? void 0 : a.id]);
|
|
2829
|
-
const fl = L(
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2824
|
+
const fl = L(
|
|
2825
|
+
(z) => {
|
|
2826
|
+
var A;
|
|
2827
|
+
const $ = (a == null ? void 0 : a.filters) ?? [], M = ((A = h.filter) == null ? void 0 : A.maxConditions) ?? 3;
|
|
2828
|
+
if ($.length >= M) {
|
|
2829
|
+
g(
|
|
2830
|
+
`Filter limit reached — maximum ${M} filters allowed. Remove an existing filter before adding a new one.`,
|
|
2831
|
+
"warning"
|
|
2832
|
+
);
|
|
2833
|
+
return;
|
|
2834
|
+
}
|
|
2835
|
+
de(z), Z(!0);
|
|
2836
|
+
},
|
|
2837
|
+
[a, h, g]
|
|
2838
|
+
), hl = L(() => {
|
|
2841
2839
|
Z(!1), de(void 0);
|
|
2842
2840
|
}, []), gl = (Pi = a == null ? void 0 : a.views) == null ? void 0 : Pi.find((z) => z.id === J), xl = (Ni = a == null ? void 0 : a.views) == null ? void 0 : Ni.find((z) => z.id === ue);
|
|
2843
2841
|
return {
|
|
@@ -2868,7 +2866,7 @@ function Id(e = {}) {
|
|
|
2868
2866
|
// View state
|
|
2869
2867
|
activeView: ne,
|
|
2870
2868
|
isDirty: Ot,
|
|
2871
|
-
currentTableState:
|
|
2869
|
+
currentTableState: We,
|
|
2872
2870
|
viewChanges: zr,
|
|
2873
2871
|
// Filters
|
|
2874
2872
|
filters: a == null ? void 0 : a.filters,
|
|
@@ -2947,7 +2945,7 @@ function Id(e = {}) {
|
|
|
2947
2945
|
handleToggleSearchFavourite: ot,
|
|
2948
2946
|
handleDeleteSearchHistory: xe,
|
|
2949
2947
|
// Selection
|
|
2950
|
-
selectedRowIds:
|
|
2948
|
+
selectedRowIds: Ne,
|
|
2951
2949
|
handleToggleRowSelection: tr,
|
|
2952
2950
|
handleToggleAllRows: Fo,
|
|
2953
2951
|
handleRangeSelection: Js,
|
|
@@ -2965,7 +2963,7 @@ function Id(e = {}) {
|
|
|
2965
2963
|
// Pagination
|
|
2966
2964
|
currentPage: rt,
|
|
2967
2965
|
pageSize: qt,
|
|
2968
|
-
paginationEngine:
|
|
2966
|
+
paginationEngine: Me,
|
|
2969
2967
|
handlePageChange: Ve,
|
|
2970
2968
|
handlePageSizeChange: _t,
|
|
2971
2969
|
// Export
|
|
@@ -2995,7 +2993,7 @@ function Id(e = {}) {
|
|
|
2995
2993
|
handleClearActivePreset: dl,
|
|
2996
2994
|
handleDeletePresetById: pl,
|
|
2997
2995
|
// Permissions
|
|
2998
|
-
userRole:
|
|
2996
|
+
userRole: Pe,
|
|
2999
2997
|
isViewerRole: Cr,
|
|
3000
2998
|
currentUserId: Ft,
|
|
3001
2999
|
// Performance
|
|
@@ -5669,10 +5667,10 @@ function up(e, t) {
|
|
|
5669
5667
|
});
|
|
5670
5668
|
}
|
|
5671
5669
|
const pp = 0.2, mp = 0.14, fp = 0.12;
|
|
5672
|
-
function
|
|
5670
|
+
function Le(...e) {
|
|
5673
5671
|
return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${pp})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${mp})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${fp})`].join(",");
|
|
5674
5672
|
}
|
|
5675
|
-
const hp = ["none",
|
|
5673
|
+
const hp = ["none", Le(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), Le(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), Le(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), Le(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), Le(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), Le(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), Le(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), Le(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), Le(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), Le(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), Le(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), Le(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), Le(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), Le(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), Le(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), Le(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), Le(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), Le(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), Le(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), Le(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), Le(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), Le(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), Le(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), Le(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], gp = {
|
|
5676
5674
|
// This is the most common easing curve.
|
|
5677
5675
|
easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
5678
5676
|
// Objects enter the screen at full velocity from off-screen and
|
|
@@ -9893,8 +9891,10 @@ function om({
|
|
|
9893
9891
|
const $a = [10, 15, 25, 50, 100];
|
|
9894
9892
|
function im(e, t) {
|
|
9895
9893
|
const n = e.trim();
|
|
9896
|
-
if (n === "")
|
|
9897
|
-
|
|
9894
|
+
if (n === "")
|
|
9895
|
+
return "Page number is required";
|
|
9896
|
+
if (!/^-?\d+$/.test(n))
|
|
9897
|
+
return "Must be a number";
|
|
9898
9898
|
const o = parseInt(n, 10);
|
|
9899
9899
|
return o < 1 ? "Page number must be at least 1" : o > t ? "Entered page number is out of range" : null;
|
|
9900
9900
|
}
|
|
@@ -9920,6 +9920,7 @@ function am({
|
|
|
9920
9920
|
const U = parseInt(m.trim(), 10);
|
|
9921
9921
|
f(null), O(!1), U !== e && i(U);
|
|
9922
9922
|
}, [m, u, e, i]), S = L(
|
|
9923
|
+
// eslint-disable-next-line no-undef
|
|
9923
9924
|
(N) => {
|
|
9924
9925
|
var U;
|
|
9925
9926
|
N.key === "Enter" ? (N.preventDefault(), k()) : N.key === "Escape" && (h(String(e)), f(null), O(!1), (U = v.current) == null || U.blur());
|
|
@@ -11683,7 +11684,7 @@ function vm({
|
|
|
11683
11684
|
onPageChange: Mt,
|
|
11684
11685
|
onPageSizeChange: cr,
|
|
11685
11686
|
// Layer 11: Permissions
|
|
11686
|
-
isReadOnly:
|
|
11687
|
+
isReadOnly: Ne = !1,
|
|
11687
11688
|
userRole: xt,
|
|
11688
11689
|
reportName: Gt,
|
|
11689
11690
|
onEditRow: kt,
|
|
@@ -11700,7 +11701,7 @@ function vm({
|
|
|
11700
11701
|
onToggleFavoritesFilter: Sr
|
|
11701
11702
|
}) {
|
|
11702
11703
|
var Kn;
|
|
11703
|
-
const [It, dr] = V(null), [Yr, Jt] = V(0), [Gr, bn] = V(0), [dt, wr] = V(null),
|
|
11704
|
+
const [It, dr] = V(null), [Yr, Jt] = V(0), [Gr, bn] = V(0), [dt, wr] = V(null), Pe = ((Kn = Vr().dates) == null ? void 0 : Kn.displayFormat) ?? null, [Cr, vn] = V(null), [Tt, j] = V(null), [Dt, ze] = V(null), [ut, ur] = V(!1), [Sn, Wt] = V(!1), [kr, Kt] = V(null), [Jr, Kr] = V(""), [wn, Me] = V(!1), [ne, Ot] = V(null), [We, zr] = V(null), [Ee, bt] = V(null), [Er, Pt] = V(null), [nt, Xr] = V("list"), [Xt, $t] = V(!1), [Zt, Cn] = V(() => !lm("toolbar_search"));
|
|
11704
11705
|
it(null);
|
|
11705
11706
|
const Ir = it(null), Tr = it(null), pr = L(() => {
|
|
11706
11707
|
cm("toolbar_search"), Cn(!1);
|
|
@@ -11949,7 +11950,7 @@ function vm({
|
|
|
11949
11950
|
borderColor: "divider",
|
|
11950
11951
|
minWidth: h[xe.name] ? `${h[xe.name]}px` : `${xe.type === "date" ? Math.max(cn, 180) : cn}px`
|
|
11951
11952
|
},
|
|
11952
|
-
children: bm(xe, _[xe.name], xm(xe, tt),
|
|
11953
|
+
children: bm(xe, _[xe.name], xm(xe, tt), Pe)
|
|
11953
11954
|
},
|
|
11954
11955
|
xe.name
|
|
11955
11956
|
)),
|
|
@@ -12095,7 +12096,7 @@ function vm({
|
|
|
12095
12096
|
gap: 1
|
|
12096
12097
|
},
|
|
12097
12098
|
children: [
|
|
12098
|
-
|
|
12099
|
+
Ne && /* @__PURE__ */ r(sm, {}),
|
|
12099
12100
|
pe && le && F && ce && /* @__PURE__ */ r(
|
|
12100
12101
|
Re,
|
|
12101
12102
|
{
|
|
@@ -12138,7 +12139,7 @@ function vm({
|
|
|
12138
12139
|
onAddToHistory: le,
|
|
12139
12140
|
onToggleFavourite: F,
|
|
12140
12141
|
onDeleteHistory: ce,
|
|
12141
|
-
disabled:
|
|
12142
|
+
disabled: Ne
|
|
12142
12143
|
}
|
|
12143
12144
|
) })
|
|
12144
12145
|
}
|
|
@@ -12164,7 +12165,7 @@ function vm({
|
|
|
12164
12165
|
{
|
|
12165
12166
|
onClick: Sr,
|
|
12166
12167
|
size: "small",
|
|
12167
|
-
disabled:
|
|
12168
|
+
disabled: Ne,
|
|
12168
12169
|
sx: {
|
|
12169
12170
|
position: "relative",
|
|
12170
12171
|
color: Et ? "warning.main" : "text.secondary",
|
|
@@ -12242,10 +12243,10 @@ function vm({
|
|
|
12242
12243
|
onRestoreView: K,
|
|
12243
12244
|
onPermanentDelete: Z,
|
|
12244
12245
|
isAdmin: oe,
|
|
12245
|
-
isReadOnly:
|
|
12246
|
+
isReadOnly: Ne
|
|
12246
12247
|
}
|
|
12247
12248
|
),
|
|
12248
|
-
!
|
|
12249
|
+
!Ne && k && /* @__PURE__ */ r(Re, { title: "Sort", children: /* @__PURE__ */ d(
|
|
12249
12250
|
re,
|
|
12250
12251
|
{
|
|
12251
12252
|
onClick: k,
|
|
@@ -12290,7 +12291,7 @@ function vm({
|
|
|
12290
12291
|
]
|
|
12291
12292
|
}
|
|
12292
12293
|
) }),
|
|
12293
|
-
!
|
|
12294
|
+
!Ne && v && /* @__PURE__ */ r(Re, { title: "Filter", children: /* @__PURE__ */ d(
|
|
12294
12295
|
re,
|
|
12295
12296
|
{
|
|
12296
12297
|
onClick: v,
|
|
@@ -12335,7 +12336,7 @@ function vm({
|
|
|
12335
12336
|
]
|
|
12336
12337
|
}
|
|
12337
12338
|
) }),
|
|
12338
|
-
!
|
|
12339
|
+
!Ne && W && /* @__PURE__ */ r(Re, { title: "Columns", children: /* @__PURE__ */ d(
|
|
12339
12340
|
re,
|
|
12340
12341
|
{
|
|
12341
12342
|
onClick: W,
|
|
@@ -12471,7 +12472,7 @@ function vm({
|
|
|
12471
12472
|
]
|
|
12472
12473
|
}
|
|
12473
12474
|
),
|
|
12474
|
-
!
|
|
12475
|
+
!Ne && H && /* @__PURE__ */ d(
|
|
12475
12476
|
ye,
|
|
12476
12477
|
{
|
|
12477
12478
|
dense: !0,
|
|
@@ -12548,7 +12549,7 @@ function vm({
|
|
|
12548
12549
|
grouping: b,
|
|
12549
12550
|
selectedRowIds: he,
|
|
12550
12551
|
resolvedFavoritesSet: yt,
|
|
12551
|
-
isReadOnly:
|
|
12552
|
+
isReadOnly: Ne,
|
|
12552
12553
|
isGrouped: !!Or,
|
|
12553
12554
|
sortStack: n,
|
|
12554
12555
|
onSort: f,
|
|
@@ -12560,7 +12561,7 @@ function vm({
|
|
|
12560
12561
|
ze(_), ur(!0);
|
|
12561
12562
|
},
|
|
12562
12563
|
onEditRow: (_, Q) => {
|
|
12563
|
-
Ot(_), zr(Q),
|
|
12564
|
+
Ot(_), zr(Q), Me(!0);
|
|
12564
12565
|
},
|
|
12565
12566
|
onDuplicateRow: (_, Q) => rt == null ? void 0 : rt(_, Q),
|
|
12566
12567
|
onDeleteRow: (_, Q) => {
|
|
@@ -12633,7 +12634,7 @@ function vm({
|
|
|
12633
12634
|
sortRule: n.find((Se) => Se.column === _.name),
|
|
12634
12635
|
hasFilters: o.some((Se) => Se.column === _.name),
|
|
12635
12636
|
isInSortStack: n.some((Se) => Se.column === _.name),
|
|
12636
|
-
isReadOnly:
|
|
12637
|
+
isReadOnly: Ne,
|
|
12637
12638
|
hasModifications: rn,
|
|
12638
12639
|
width: h[_.name],
|
|
12639
12640
|
onColumnClick: fr,
|
|
@@ -12805,7 +12806,7 @@ function vm({
|
|
|
12805
12806
|
{
|
|
12806
12807
|
dense: !0,
|
|
12807
12808
|
onClick: () => {
|
|
12808
|
-
Ee && (Ot(Ee.row), zr(Ee.rowIndex),
|
|
12809
|
+
Ee && (Ot(Ee.row), zr(Ee.rowIndex), Me(!0)), bt(null);
|
|
12809
12810
|
},
|
|
12810
12811
|
sx: { py: 1, px: 2, gap: 1.5 },
|
|
12811
12812
|
children: [
|
|
@@ -12870,10 +12871,10 @@ function vm({
|
|
|
12870
12871
|
{
|
|
12871
12872
|
open: wn,
|
|
12872
12873
|
onClose: () => {
|
|
12873
|
-
|
|
12874
|
+
Me(!1), Ot(null), zr(null);
|
|
12874
12875
|
},
|
|
12875
12876
|
onSave: (_) => {
|
|
12876
|
-
|
|
12877
|
+
We !== null && (kt == null || kt(We, _));
|
|
12877
12878
|
},
|
|
12878
12879
|
row: ne,
|
|
12879
12880
|
schema: e,
|
|
@@ -20631,7 +20632,7 @@ function Gs({ reportEngine: e }) {
|
|
|
20631
20632
|
setShowManageColumns: vr,
|
|
20632
20633
|
handleUpdateColumnVisibility: Mt,
|
|
20633
20634
|
handleUpdateColumnOrder: cr,
|
|
20634
|
-
handleUpdateColumnWidth:
|
|
20635
|
+
handleUpdateColumnWidth: Ne,
|
|
20635
20636
|
handleResetColumnLayout: xt,
|
|
20636
20637
|
// Grouping
|
|
20637
20638
|
showGroupPanel: Gt,
|
|
@@ -20659,7 +20660,7 @@ function Gs({ reportEngine: e }) {
|
|
|
20659
20660
|
handlePageChange: wr,
|
|
20660
20661
|
handlePageSizeChange: qr,
|
|
20661
20662
|
// Export
|
|
20662
|
-
isExporting:
|
|
20663
|
+
isExporting: Pe,
|
|
20663
20664
|
showExportModal: Cr,
|
|
20664
20665
|
setShowExportModal: vn,
|
|
20665
20666
|
showDirtyExportWarning: Tt,
|
|
@@ -20677,10 +20678,10 @@ function Gs({ reportEngine: e }) {
|
|
|
20677
20678
|
setShowCreatePreset: Jr,
|
|
20678
20679
|
showManagePresets: Kr,
|
|
20679
20680
|
setShowManagePresets: wn,
|
|
20680
|
-
activePreset:
|
|
20681
|
+
activePreset: Me,
|
|
20681
20682
|
handleCreatePreset: ne,
|
|
20682
20683
|
handleClearActivePreset: Ot,
|
|
20683
|
-
handleOpenPresetById:
|
|
20684
|
+
handleOpenPresetById: We,
|
|
20684
20685
|
handleDeletePresetById: zr,
|
|
20685
20686
|
// Permissions
|
|
20686
20687
|
isViewerRole: Ee,
|
|
@@ -20735,7 +20736,10 @@ function Gs({ reportEngine: e }) {
|
|
|
20735
20736
|
if (me === -1)
|
|
20736
20737
|
return;
|
|
20737
20738
|
const Ve = t.uploadedData.filter((vt, er) => er !== me), _t = (t.favoriteRowIndices || []).filter((vt) => vt !== me).map((vt) => vt > me ? vt - 1 : vt);
|
|
20738
|
-
$t(t.id, {
|
|
20739
|
+
$t(t.id, {
|
|
20740
|
+
uploadedData: Ve,
|
|
20741
|
+
favoriteRowIndices: _t
|
|
20742
|
+
}), Jt(ge);
|
|
20739
20743
|
},
|
|
20740
20744
|
[t, $t, Jt]
|
|
20741
20745
|
), zn = L(
|
|
@@ -20825,7 +20829,7 @@ function Gs({ reportEngine: e }) {
|
|
|
20825
20829
|
views: t.views,
|
|
20826
20830
|
activeViewId: t.activeViewId,
|
|
20827
20831
|
isDirty: s,
|
|
20828
|
-
isExporting:
|
|
20832
|
+
isExporting: Pe,
|
|
20829
20833
|
columnVisibility: t.columnVisibility || (l == null ? void 0 : l.snapshot.columnVisibility),
|
|
20830
20834
|
columnOrder: t.columnOrder || (l == null ? void 0 : l.snapshot.columnOrder),
|
|
20831
20835
|
columnWidths: t.columnWidths || (l == null ? void 0 : l.snapshot.columnWidths),
|
|
@@ -20847,14 +20851,14 @@ function Gs({ reportEngine: e }) {
|
|
|
20847
20851
|
onPermanentDelete: X,
|
|
20848
20852
|
onExport: j,
|
|
20849
20853
|
onOpenColumns: () => vr(!0),
|
|
20850
|
-
onUpdateColumnWidth:
|
|
20854
|
+
onUpdateColumnWidth: Ne,
|
|
20851
20855
|
onUpdateColumnOrder: cr,
|
|
20852
20856
|
onUpdateColumnVisibility: Mt,
|
|
20853
20857
|
onClearFiltersForColumn: E,
|
|
20854
20858
|
onResetLayout: xt,
|
|
20855
20859
|
onOpenGroup: () => kt(!0),
|
|
20856
20860
|
onGroupByColumn: (ge) => {
|
|
20857
|
-
rt({ enabled: !0, column: ge,
|
|
20861
|
+
rt({ enabled: !0, levels: [{ column: ge }], collapsedGroups: [] });
|
|
20858
20862
|
},
|
|
20859
20863
|
onToggleGroupCollapse: zt,
|
|
20860
20864
|
onOpenAuditHistory: () => kr(!0),
|
|
@@ -20968,7 +20972,9 @@ function Gs({ reportEngine: e }) {
|
|
|
20968
20972
|
),
|
|
20969
20973
|
W && u && (() => {
|
|
20970
20974
|
var Ve;
|
|
20971
|
-
const ge = (t.views ?? []).filter(
|
|
20975
|
+
const ge = (t.views ?? []).filter(
|
|
20976
|
+
(_t) => !_t.isDeleted
|
|
20977
|
+
).length, me = ((Ve = fr.views) == null ? void 0 : Ve.maxViews) ?? 10;
|
|
20972
20978
|
return /* @__PURE__ */ r(
|
|
20973
20979
|
Pa,
|
|
20974
20980
|
{
|
|
@@ -21015,7 +21021,7 @@ function Gs({ reportEngine: e }) {
|
|
|
21015
21021
|
activeViewId: t.activeViewId,
|
|
21016
21022
|
onUpdateColumnVisibility: Mt,
|
|
21017
21023
|
onUpdateColumnOrder: cr,
|
|
21018
|
-
onUpdateColumnWidth:
|
|
21024
|
+
onUpdateColumnWidth: Ne,
|
|
21019
21025
|
onResetLayout: xt,
|
|
21020
21026
|
onSelectView: (ge) => {
|
|
21021
21027
|
Y(ge);
|
|
@@ -21061,12 +21067,12 @@ function Gs({ reportEngine: e }) {
|
|
|
21061
21067
|
{
|
|
21062
21068
|
presets: t.presets || [],
|
|
21063
21069
|
reportId: t.id,
|
|
21064
|
-
onOpenPreset:
|
|
21070
|
+
onOpenPreset: We,
|
|
21065
21071
|
onDeletePreset: zr,
|
|
21066
21072
|
onClose: () => wn(!1)
|
|
21067
21073
|
}
|
|
21068
21074
|
),
|
|
21069
|
-
|
|
21075
|
+
Me && /* @__PURE__ */ r(p, { sx: { mt: 2 }, children: /* @__PURE__ */ r(Pm, { presetName: Me.name, onClear: Ot }) }),
|
|
21070
21076
|
Cr && /* @__PURE__ */ r(
|
|
21071
21077
|
Mn,
|
|
21072
21078
|
{
|