@ahoo-wang/fetcher-viewer 3.15.1 → 3.15.2
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.es.js +51 -47
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/table/ViewTable.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1758,7 +1758,7 @@ function useActiveViewState(n) {
|
|
|
1758
1758
|
}, r[9] = t7) : t7 = r[9];
|
|
1759
1759
|
let V = t7, t8;
|
|
1760
1760
|
r[10] === Symbol.for("react.memo_cache_sentinel") ? (t8 = (e) => {
|
|
1761
|
-
k(e.map(_temp2$
|
|
1761
|
+
k(e.map(_temp2$4));
|
|
1762
1762
|
}, r[10] = t8) : t8 = r[10];
|
|
1763
1763
|
let H = t8, t9;
|
|
1764
1764
|
r[11] === Symbol.for("react.memo_cache_sentinel") ? (t9 = (e) => {
|
|
@@ -1795,10 +1795,10 @@ function _temp3$2(e) {
|
|
|
1795
1795
|
return { ...e };
|
|
1796
1796
|
}
|
|
1797
1797
|
__name(_temp3$2, "_temp3");
|
|
1798
|
-
function _temp2$
|
|
1798
|
+
function _temp2$4(e) {
|
|
1799
1799
|
return { ...e };
|
|
1800
1800
|
}
|
|
1801
|
-
__name(_temp2$
|
|
1801
|
+
__name(_temp2$4, "_temp2");
|
|
1802
1802
|
function _temp$6(e) {
|
|
1803
1803
|
return { ...e };
|
|
1804
1804
|
}
|
|
@@ -2220,7 +2220,7 @@ function TableSettingPanel(n) {
|
|
|
2220
2220
|
r[0] === o ? (t0 = r[1], _ = r[2]) : (t0 = () => {
|
|
2221
2221
|
g(o);
|
|
2222
2222
|
}, _ = [o], r[0] = o, r[1] = t0, r[2] = _), te(t0, _);
|
|
2223
|
-
let v = p.map(_temp$5), b = v.filter(_temp2$
|
|
2223
|
+
let v = p.map(_temp$5), b = v.filter(_temp2$3), x = v.filter(_temp3$1), C = v.filter(_temp4), handleVisibilityChange = (e, n) => {
|
|
2224
2224
|
let r = v.map((r, i) => i === e ? {
|
|
2225
2225
|
...r,
|
|
2226
2226
|
hidden: n
|
|
@@ -2319,10 +2319,10 @@ function _temp3$1(e) {
|
|
|
2319
2319
|
return !e.hidden && !e.fixed;
|
|
2320
2320
|
}
|
|
2321
2321
|
__name(_temp3$1, "_temp3");
|
|
2322
|
-
function _temp2$
|
|
2322
|
+
function _temp2$3(e) {
|
|
2323
2323
|
return e.fixed;
|
|
2324
2324
|
}
|
|
2325
|
-
__name(_temp2$
|
|
2325
|
+
__name(_temp2$3, "_temp2");
|
|
2326
2326
|
function _temp$5(e, n) {
|
|
2327
2327
|
return {
|
|
2328
2328
|
...e,
|
|
@@ -2360,26 +2360,26 @@ String.prototype.format = function(...e) {
|
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region src/table/ViewTable.tsx
|
|
2362
2362
|
function ViewTable(n) {
|
|
2363
|
-
let r = e(
|
|
2363
|
+
let r = e(38), { ref: i, fields: a, columns: o, onColumnsChange: s, actionColumn: c, tableSize: u, dataSource: f, enableRowSelection: p, onSortChanged: g, onSelectChange: _, onClickPrimaryKey: v, viewTableSetting: b, loading: x, attributes: C } = n, { selectedRowKeys: w, setSelectedRowKeys: T, reset: E, clearSelectedRowKeys: k } = useViewTableState(), j;
|
|
2364
2364
|
if (r[0] !== c || r[1] !== o || r[2] !== a || r[3] !== v || r[4] !== s || r[5] !== n.actionColumn || r[6] !== b) {
|
|
2365
|
-
let
|
|
2366
|
-
if (
|
|
2367
|
-
let
|
|
2365
|
+
let e = new Map(a.map(_temp$4));
|
|
2366
|
+
if (j = o.map((n) => {
|
|
2367
|
+
let r = e.get(n.name);
|
|
2368
2368
|
return {
|
|
2369
|
-
key:
|
|
2370
|
-
title:
|
|
2371
|
-
dataIndex:
|
|
2372
|
-
fixed:
|
|
2373
|
-
sorter:
|
|
2374
|
-
defaultSortOrder:
|
|
2375
|
-
width:
|
|
2376
|
-
hidden:
|
|
2377
|
-
render: (e,
|
|
2378
|
-
if (
|
|
2379
|
-
if (
|
|
2369
|
+
key: n.key,
|
|
2370
|
+
title: r?.label || "UNKNOWN",
|
|
2371
|
+
dataIndex: n.name.split("."),
|
|
2372
|
+
fixed: r?.primaryKey || n?.fixed ? "start" : "",
|
|
2373
|
+
sorter: r?.sorter,
|
|
2374
|
+
defaultSortOrder: n.sortOrder,
|
|
2375
|
+
width: n.width,
|
|
2376
|
+
hidden: n.hidden,
|
|
2377
|
+
render: (e, n, i) => {
|
|
2378
|
+
if (r?.render) return r.render(e, n, i);
|
|
2379
|
+
if (r?.primaryKey) return /* @__PURE__ */ W(PrimaryKeyCell, {
|
|
2380
2380
|
data: {
|
|
2381
2381
|
value: e,
|
|
2382
|
-
record:
|
|
2382
|
+
record: n,
|
|
2383
2383
|
index: i
|
|
2384
2384
|
},
|
|
2385
2385
|
attributes: {
|
|
@@ -2387,21 +2387,21 @@ function ViewTable(n) {
|
|
|
2387
2387
|
v?.(e, n);
|
|
2388
2388
|
},
|
|
2389
2389
|
copyable: !0,
|
|
2390
|
-
...
|
|
2390
|
+
...r.attributes
|
|
2391
2391
|
}
|
|
2392
2392
|
});
|
|
2393
|
-
let a = typedCellRender(
|
|
2394
|
-
return a ? a(e,
|
|
2393
|
+
let a = typedCellRender(r?.type || "text", r?.attributes || {});
|
|
2394
|
+
return a ? a(e, n, i) : /* @__PURE__ */ W(TextCell, { data: {
|
|
2395
2395
|
value: String(e),
|
|
2396
|
-
record:
|
|
2396
|
+
record: n,
|
|
2397
2397
|
index: i
|
|
2398
2398
|
} });
|
|
2399
2399
|
},
|
|
2400
|
-
...
|
|
2400
|
+
...r?.attributes || {}
|
|
2401
2401
|
};
|
|
2402
|
-
}
|
|
2403
|
-
let e = c.dataIndex || a.find(
|
|
2404
|
-
r[
|
|
2402
|
+
}), c) {
|
|
2403
|
+
let e = c.dataIndex || a.find(_temp2$2)?.name || "id", t0;
|
|
2404
|
+
r[8] !== c.title || r[9] !== o || r[10] !== a || r[11] !== s || r[12] !== b ? (t0 = () => {
|
|
2405
2405
|
if (b) {
|
|
2406
2406
|
let e = /* @__PURE__ */ W(TableSettingPanel, {
|
|
2407
2407
|
fields: a,
|
|
@@ -2420,46 +2420,46 @@ function ViewTable(n) {
|
|
|
2420
2420
|
});
|
|
2421
2421
|
}
|
|
2422
2422
|
return c.title;
|
|
2423
|
-
}, r[
|
|
2424
|
-
let
|
|
2425
|
-
r[
|
|
2423
|
+
}, r[8] = c.title, r[9] = o, r[10] = a, r[11] = s, r[12] = b, r[13] = t0) : t0 = r[13];
|
|
2424
|
+
let t1;
|
|
2425
|
+
r[14] !== o.length || r[15] !== n.actionColumn ? (t1 = (e, r) => /* @__PURE__ */ W(ActionsCell, { data: {
|
|
2426
2426
|
value: n.actionColumn.actions(r),
|
|
2427
2427
|
record: r,
|
|
2428
2428
|
index: o.length + 1
|
|
2429
|
-
} }), r[
|
|
2429
|
+
} }), r[14] = o.length, r[15] = n.actionColumn, r[16] = t1) : t1 = r[16], j.push({
|
|
2430
2430
|
key: "action",
|
|
2431
|
-
title:
|
|
2431
|
+
title: t0,
|
|
2432
2432
|
dataIndex: e,
|
|
2433
2433
|
fixed: "end",
|
|
2434
2434
|
width: "200px",
|
|
2435
|
-
render:
|
|
2435
|
+
render: t1
|
|
2436
2436
|
});
|
|
2437
2437
|
}
|
|
2438
2438
|
r[0] = c, r[1] = o, r[2] = a, r[3] = v, r[4] = s, r[5] = n.actionColumn, r[6] = b, r[7] = j;
|
|
2439
2439
|
} else j = r[7];
|
|
2440
2440
|
let N;
|
|
2441
|
-
r[
|
|
2441
|
+
r[17] !== p || r[18] !== _ || r[19] !== w || r[20] !== T ? (N = p ? {
|
|
2442
2442
|
selectedRowKeys: w,
|
|
2443
2443
|
fixed: !0,
|
|
2444
2444
|
onChange: (e, n) => {
|
|
2445
2445
|
T(e), _?.(n);
|
|
2446
2446
|
}
|
|
2447
|
-
} : void 0, r[
|
|
2447
|
+
} : void 0, r[17] = p, r[18] = _, r[19] = w, r[20] = T, r[21] = N) : N = r[21];
|
|
2448
2448
|
let P = N, t1;
|
|
2449
|
-
r[
|
|
2449
|
+
r[22] !== k || r[23] !== E ? (t1 = () => ({
|
|
2450
2450
|
clearSelectedRowKeys: k,
|
|
2451
2451
|
reset: E
|
|
2452
|
-
}), r[
|
|
2452
|
+
}), r[22] = k, r[23] = E, r[24] = t1) : t1 = r[24], re(i, t1);
|
|
2453
2453
|
let F;
|
|
2454
|
-
r[
|
|
2454
|
+
r[25] === f ? F = r[26] : (F = mapToTableRecord(f), r[25] = f, r[26] = F);
|
|
2455
2455
|
let I;
|
|
2456
|
-
r[
|
|
2456
|
+
r[27] === Symbol.for("react.memo_cache_sentinel") ? (I = { x: "max-content" }, r[27] = I) : I = r[27];
|
|
2457
2457
|
let R = u || "middle", t5;
|
|
2458
|
-
r[
|
|
2458
|
+
r[28] === g ? t5 = r[29] : (t5 = (e, n, r, i) => {
|
|
2459
2459
|
i.action === "sort" && g && g(Array.isArray(r) ? r : [r]);
|
|
2460
|
-
}, r[
|
|
2460
|
+
}, r[28] = g, r[29] = t5);
|
|
2461
2461
|
let z;
|
|
2462
|
-
return r[
|
|
2462
|
+
return r[30] !== C || r[31] !== x || r[32] !== P || r[33] !== F || r[34] !== R || r[35] !== t5 || r[36] !== j ? (z = /* @__PURE__ */ W(L, {
|
|
2463
2463
|
loading: x,
|
|
2464
2464
|
dataSource: F,
|
|
2465
2465
|
rowSelection: P,
|
|
@@ -2468,11 +2468,15 @@ function ViewTable(n) {
|
|
|
2468
2468
|
scroll: I,
|
|
2469
2469
|
size: R,
|
|
2470
2470
|
onChange: t5
|
|
2471
|
-
}), r[
|
|
2471
|
+
}), r[30] = C, r[31] = x, r[32] = P, r[33] = F, r[34] = R, r[35] = t5, r[36] = j, r[37] = z) : z = r[37], z;
|
|
2472
2472
|
}
|
|
2473
|
-
function
|
|
2473
|
+
function _temp2$2(e) {
|
|
2474
2474
|
return e.primaryKey;
|
|
2475
2475
|
}
|
|
2476
|
+
__name(_temp2$2, "_temp2");
|
|
2477
|
+
function _temp$4(e) {
|
|
2478
|
+
return [e.name, e];
|
|
2479
|
+
}
|
|
2476
2480
|
__name(_temp$4, "_temp");
|
|
2477
2481
|
//#endregion
|
|
2478
2482
|
//#region src/table/hooks/useViewTableState.ts
|