@next-bricks/advanced 0.5.0 → 0.6.1
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/bricks.json +4 -1
- package/dist/chunks/4553.ebc88a76.js +2 -0
- package/dist/chunks/4553.ebc88a76.js.map +1 -0
- package/dist/chunks/eo-next-table.099c1f2f.js +2 -0
- package/dist/chunks/eo-next-table.099c1f2f.js.map +1 -0
- package/dist/chunks/{main.5495f0c1.js → main.e794c7be.js} +2 -2
- package/dist/chunks/{main.5495f0c1.js.map → main.e794c7be.js.map} +1 -1
- package/dist/examples.json +1 -1
- package/dist/{index.7ba70857.js → index.ab954402.js} +2 -2
- package/dist/{index.7ba70857.js.map → index.ab954402.js.map} +1 -1
- package/dist/manifest.json +20 -0
- package/dist/types.json +216 -0
- package/dist-types/next-table/Table.d.ts +11 -1
- package/dist-types/next-table/i18n.d.ts +3 -1
- package/dist-types/next-table/index.d.ts +10 -2
- package/dist-types/next-table/interface.d.ts +5 -0
- package/dist-types/next-table/utils.d.ts +4 -0
- package/docs/eo-next-table.md +74 -0
- package/package.json +2 -2
- package/dist/chunks/4553.1299aaa6.js +0 -2
- package/dist/chunks/4553.1299aaa6.js.map +0 -1
- package/dist/chunks/eo-next-table.47f842f1.js +0 -2
- package/dist/chunks/eo-next-table.47f842f1.js.map +0 -1
package/dist/types.json
CHANGED
|
@@ -1238,6 +1238,38 @@
|
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
1240
|
},
|
|
1241
|
+
{
|
|
1242
|
+
"name": "rowSelection",
|
|
1243
|
+
"annotation": {
|
|
1244
|
+
"type": "reference",
|
|
1245
|
+
"typeName": {
|
|
1246
|
+
"type": "identifier",
|
|
1247
|
+
"name": "RowSelectionType"
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "selectedRowKeys",
|
|
1253
|
+
"annotation": {
|
|
1254
|
+
"type": "array",
|
|
1255
|
+
"elementType": {
|
|
1256
|
+
"type": "parenthesizedType",
|
|
1257
|
+
"annotation": {
|
|
1258
|
+
"type": "union",
|
|
1259
|
+
"types": [
|
|
1260
|
+
{
|
|
1261
|
+
"type": "keyword",
|
|
1262
|
+
"value": "string"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"type": "keyword",
|
|
1266
|
+
"value": "number"
|
|
1267
|
+
}
|
|
1268
|
+
]
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1241
1273
|
{
|
|
1242
1274
|
"name": "hiddenColumns",
|
|
1243
1275
|
"annotation": {
|
|
@@ -1354,6 +1386,89 @@
|
|
|
1354
1386
|
]
|
|
1355
1387
|
}
|
|
1356
1388
|
}
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"name": "row.select",
|
|
1392
|
+
"detail": {
|
|
1393
|
+
"annotation": {
|
|
1394
|
+
"type": "typeLiteral",
|
|
1395
|
+
"members": [
|
|
1396
|
+
{
|
|
1397
|
+
"type": "propertySignature",
|
|
1398
|
+
"key": {
|
|
1399
|
+
"type": "identifier",
|
|
1400
|
+
"name": "keys"
|
|
1401
|
+
},
|
|
1402
|
+
"annotation": {
|
|
1403
|
+
"type": "array",
|
|
1404
|
+
"elementType": {
|
|
1405
|
+
"type": "parenthesizedType",
|
|
1406
|
+
"annotation": {
|
|
1407
|
+
"type": "union",
|
|
1408
|
+
"types": [
|
|
1409
|
+
{
|
|
1410
|
+
"type": "keyword",
|
|
1411
|
+
"value": "string"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"type": "keyword",
|
|
1415
|
+
"value": "number"
|
|
1416
|
+
}
|
|
1417
|
+
]
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
"computed": false
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"type": "propertySignature",
|
|
1425
|
+
"key": {
|
|
1426
|
+
"type": "identifier",
|
|
1427
|
+
"name": "rows"
|
|
1428
|
+
},
|
|
1429
|
+
"annotation": {
|
|
1430
|
+
"type": "array",
|
|
1431
|
+
"elementType": {
|
|
1432
|
+
"type": "reference",
|
|
1433
|
+
"typeName": {
|
|
1434
|
+
"type": "identifier",
|
|
1435
|
+
"name": "RecordType"
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
"computed": false
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"type": "propertySignature",
|
|
1443
|
+
"key": {
|
|
1444
|
+
"type": "identifier",
|
|
1445
|
+
"name": "info"
|
|
1446
|
+
},
|
|
1447
|
+
"annotation": {
|
|
1448
|
+
"type": "typeLiteral",
|
|
1449
|
+
"members": [
|
|
1450
|
+
{
|
|
1451
|
+
"type": "propertySignature",
|
|
1452
|
+
"key": {
|
|
1453
|
+
"type": "identifier",
|
|
1454
|
+
"name": "type"
|
|
1455
|
+
},
|
|
1456
|
+
"annotation": {
|
|
1457
|
+
"type": "reference",
|
|
1458
|
+
"typeName": {
|
|
1459
|
+
"type": "identifier",
|
|
1460
|
+
"name": "RowSelectMethod"
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
"computed": false
|
|
1464
|
+
}
|
|
1465
|
+
]
|
|
1466
|
+
},
|
|
1467
|
+
"computed": false
|
|
1468
|
+
}
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1357
1472
|
}
|
|
1358
1473
|
],
|
|
1359
1474
|
"methods": [
|
|
@@ -1655,6 +1770,107 @@
|
|
|
1655
1770
|
}
|
|
1656
1771
|
}
|
|
1657
1772
|
]
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"type": "typeAlias",
|
|
1776
|
+
"name": "RowSelectionType",
|
|
1777
|
+
"annotation": {
|
|
1778
|
+
"type": "union",
|
|
1779
|
+
"types": [
|
|
1780
|
+
{
|
|
1781
|
+
"type": "keyword",
|
|
1782
|
+
"value": "boolean"
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"type": "reference",
|
|
1786
|
+
"typeName": {
|
|
1787
|
+
"type": "identifier",
|
|
1788
|
+
"name": "RowSelectionConfig"
|
|
1789
|
+
}
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"type": "keyword",
|
|
1793
|
+
"value": "undefined"
|
|
1794
|
+
}
|
|
1795
|
+
]
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"type": "interface",
|
|
1800
|
+
"name": "RowSelectionConfig",
|
|
1801
|
+
"body": [
|
|
1802
|
+
{
|
|
1803
|
+
"type": "propertySignature",
|
|
1804
|
+
"key": {
|
|
1805
|
+
"type": "identifier",
|
|
1806
|
+
"name": "showSelectInfo"
|
|
1807
|
+
},
|
|
1808
|
+
"annotation": {
|
|
1809
|
+
"type": "keyword",
|
|
1810
|
+
"value": "boolean"
|
|
1811
|
+
},
|
|
1812
|
+
"optional": true,
|
|
1813
|
+
"computed": false
|
|
1814
|
+
}
|
|
1815
|
+
],
|
|
1816
|
+
"extends": [
|
|
1817
|
+
{
|
|
1818
|
+
"type": "expressionWithTypeArguments",
|
|
1819
|
+
"expression": {
|
|
1820
|
+
"type": "identifier",
|
|
1821
|
+
"name": "Pick"
|
|
1822
|
+
},
|
|
1823
|
+
"typeParameters": {
|
|
1824
|
+
"type": "typeParameterInstantiation",
|
|
1825
|
+
"params": [
|
|
1826
|
+
{
|
|
1827
|
+
"type": "reference",
|
|
1828
|
+
"typeName": {
|
|
1829
|
+
"type": "identifier",
|
|
1830
|
+
"name": "TableRowSelection"
|
|
1831
|
+
},
|
|
1832
|
+
"typeParameters": {
|
|
1833
|
+
"type": "typeParameterInstantiation",
|
|
1834
|
+
"params": [
|
|
1835
|
+
{
|
|
1836
|
+
"type": "reference",
|
|
1837
|
+
"typeName": {
|
|
1838
|
+
"type": "identifier",
|
|
1839
|
+
"name": "RecordType"
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
]
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
"type": "union",
|
|
1847
|
+
"types": [
|
|
1848
|
+
{
|
|
1849
|
+
"type": "jsLiteral",
|
|
1850
|
+
"value": "columnWidth"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"type": "jsLiteral",
|
|
1854
|
+
"value": "fixed"
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
"type": "jsLiteral",
|
|
1858
|
+
"value": "hideSelectAll"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"type": "jsLiteral",
|
|
1862
|
+
"value": "preserveSelectedRowKeys"
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
"type": "jsLiteral",
|
|
1866
|
+
"value": "type"
|
|
1867
|
+
}
|
|
1868
|
+
]
|
|
1869
|
+
}
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
]
|
|
1658
1874
|
}
|
|
1659
1875
|
]
|
|
1660
1876
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Column, DataSource, PaginationType } from "./interface.js";
|
|
2
|
+
import { Column, RecordType, DataSource, PaginationType, RowSelectionType } from "./interface.js";
|
|
3
|
+
import { RowSelectMethod } from "antd/es/table/interface.js";
|
|
3
4
|
interface NextTableComponentProps {
|
|
4
5
|
shadowRoot: ShadowRoot | null;
|
|
5
6
|
rowKey?: string;
|
|
6
7
|
columns?: Column[];
|
|
7
8
|
dataSource?: DataSource;
|
|
8
9
|
pagination?: PaginationType;
|
|
10
|
+
rowSelection?: RowSelectionType;
|
|
11
|
+
selectedRowKeys?: (string | number)[];
|
|
9
12
|
hiddenColumns?: (string | number)[];
|
|
10
13
|
searchFields?: (string | string[])[];
|
|
11
14
|
onPageChange?: (detail: {
|
|
@@ -16,6 +19,13 @@ interface NextTableComponentProps {
|
|
|
16
19
|
page: number;
|
|
17
20
|
pageSize: number;
|
|
18
21
|
}) => void;
|
|
22
|
+
onRowSelect?: (detail: {
|
|
23
|
+
keys: (string | number)[];
|
|
24
|
+
rows: RecordType[];
|
|
25
|
+
info: {
|
|
26
|
+
type: RowSelectMethod;
|
|
27
|
+
};
|
|
28
|
+
}) => void;
|
|
19
29
|
}
|
|
20
30
|
export interface NextTableComponentRef {
|
|
21
31
|
search: (params: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" resolution-mode="require"/>
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
|
-
import { Column, DataSource, PaginationType } from "./interface.js";
|
|
4
|
+
import { Column, DataSource, PaginationType, RowSelectionType } from "./interface.js";
|
|
5
5
|
/**
|
|
6
6
|
* 大型表格
|
|
7
7
|
*/
|
|
@@ -22,7 +22,15 @@ export declare class EoNextTable extends ReactNextElement {
|
|
|
22
22
|
/**
|
|
23
23
|
* 分页配置
|
|
24
24
|
*/
|
|
25
|
-
accessor pagination: PaginationType
|
|
25
|
+
accessor pagination: PaginationType;
|
|
26
|
+
/**
|
|
27
|
+
* 表格行可选择配置
|
|
28
|
+
*/
|
|
29
|
+
accessor rowSelection: RowSelectionType;
|
|
30
|
+
/**
|
|
31
|
+
* 选中项的 key
|
|
32
|
+
*/
|
|
33
|
+
accessor selectedRowKeys: (string | number)[] | undefined;
|
|
26
34
|
/**
|
|
27
35
|
* 隐藏的列(输入对应的 column.key)
|
|
28
36
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ColumnType, TablePaginationConfig } from "antd/es/table";
|
|
2
|
+
import type { TableRowSelection } from "antd/es/table/interface.js";
|
|
2
3
|
import type { UseBrickConf } from "@next-core/types";
|
|
3
4
|
export type RecordType = Record<string, any>;
|
|
4
5
|
export interface Column extends ColumnType<RecordType> {
|
|
@@ -19,4 +20,8 @@ interface PaginationConfig extends Pick<TablePaginationConfig, "disabled" | "hid
|
|
|
19
20
|
showTotal?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export type PaginationType = false | PaginationConfig | undefined;
|
|
23
|
+
interface RowSelectionConfig extends Pick<TableRowSelection<RecordType>, "columnWidth" | "fixed" | "hideSelectAll" | "preserveSelectedRowKeys" | "type"> {
|
|
24
|
+
showSelectInfo?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type RowSelectionType = boolean | RowSelectionConfig | undefined;
|
|
22
27
|
export {};
|
|
@@ -4,4 +4,8 @@ export declare const defaultPaginationConfig: {
|
|
|
4
4
|
showSizeChanger: boolean;
|
|
5
5
|
showTotal: boolean;
|
|
6
6
|
};
|
|
7
|
+
export declare const defaultRowSelectionConfig: {
|
|
8
|
+
preserveSelectedRowKeys: boolean;
|
|
9
|
+
showSelectInfo: boolean;
|
|
10
|
+
};
|
|
7
11
|
export declare function getSearchKeywords(value: unknown): string[];
|
package/docs/eo-next-table.md
CHANGED
|
@@ -179,3 +179,77 @@
|
|
|
179
179
|
age: 16
|
|
180
180
|
address: Taiwan
|
|
181
181
|
```
|
|
182
|
+
|
|
183
|
+
### Row Selection
|
|
184
|
+
|
|
185
|
+
```yaml preview
|
|
186
|
+
- brick: eo-next-table
|
|
187
|
+
events:
|
|
188
|
+
row.select:
|
|
189
|
+
- action: console.log
|
|
190
|
+
properties:
|
|
191
|
+
rowSelection: true
|
|
192
|
+
pagination:
|
|
193
|
+
pageSizeOptions:
|
|
194
|
+
- 5
|
|
195
|
+
- 10
|
|
196
|
+
- 20
|
|
197
|
+
columns:
|
|
198
|
+
- dataIndex: name
|
|
199
|
+
key: name
|
|
200
|
+
title: Name
|
|
201
|
+
- dataIndex: age
|
|
202
|
+
key: age
|
|
203
|
+
title: Age
|
|
204
|
+
- dataIndex: address
|
|
205
|
+
key: address
|
|
206
|
+
title: Address
|
|
207
|
+
dataSource:
|
|
208
|
+
pageSize: 5
|
|
209
|
+
page: 1
|
|
210
|
+
list:
|
|
211
|
+
- key: 0
|
|
212
|
+
name: Jack
|
|
213
|
+
age: 18
|
|
214
|
+
address: Guangzhou
|
|
215
|
+
- key: 1
|
|
216
|
+
name: Alex
|
|
217
|
+
age: 20
|
|
218
|
+
address: Shanghai
|
|
219
|
+
- key: 2
|
|
220
|
+
name: Lucy
|
|
221
|
+
age: 16
|
|
222
|
+
address: Yunnan
|
|
223
|
+
- key: 3
|
|
224
|
+
name: Sam
|
|
225
|
+
age: 28
|
|
226
|
+
address: Guangzhou
|
|
227
|
+
- key: 4
|
|
228
|
+
name: Bob
|
|
229
|
+
age: 35
|
|
230
|
+
address: Hainan
|
|
231
|
+
- key: 5
|
|
232
|
+
name: Ava
|
|
233
|
+
age: 23
|
|
234
|
+
address: Beijing
|
|
235
|
+
- key: 6
|
|
236
|
+
name: Sophia
|
|
237
|
+
age: 20
|
|
238
|
+
address: Shanghai
|
|
239
|
+
- key: 7
|
|
240
|
+
name: Charlotte
|
|
241
|
+
age: 33
|
|
242
|
+
address: Chongqing
|
|
243
|
+
- key: 8
|
|
244
|
+
name: Mia
|
|
245
|
+
age: 18
|
|
246
|
+
address: Chengdu
|
|
247
|
+
- key: 9
|
|
248
|
+
name: Noah
|
|
249
|
+
age: 38
|
|
250
|
+
address: Hainan
|
|
251
|
+
- key: 10
|
|
252
|
+
name: William
|
|
253
|
+
age: 16
|
|
254
|
+
address: Taiwan
|
|
255
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/advanced",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/basic",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@next-core/build-next-bricks": "^1.14.2",
|
|
38
38
|
"@next-core/test-next": "^1.0.10"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "2a18694d5ca14e9edd1c9a41522b1098b7729783"
|
|
41
41
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[4553],{4553:(e,t,a)=>{a.r(t);var i=a(3028),s=a(6666),r=a(3395),n=a(1815),l=a(381),o=a(687),h=a(2604),d=a(8657),c=a.n(d),u=a(7320),p=a(1466),g=a(2869),w=a(5178),v=a(104),m=a(7896),Z=a(2159),f=a(6154),b={$eq:w.isEqual,$lt:w.lt,$lte:w.lte,$gt:w.gt,$gte:w.gte,$ne:(e,t)=>!(0,w.isEqual)(e,t),$isEqual:w.isEqual,$notEqual:(e,t)=>!(0,w.isEqual)(e,t),$in:w.includes,$nin:(e,t)=>!(0,w.includes)(e,t),$exists:(e,t)=>e?!(0,w.isUndefined)(t):(0,w.isUndefined)(t)};function y(e,t,a){var{dataIndex:i,mapping:s}=e,r=void 0!==i?(0,w.get)(t,i):a,n=s.find((e=>e.value===r));return n?{borderLeft:"4px solid ".concat(n.leftBorderColor)}:{}}var C=(e,t,a,i)=>{e&&(0,w.forEach)(e,(e=>{var s=(0,w.get)(e,a),r=(0,w.get)(e,t);i.push(r),null!=s&&s.length&&C(s,t,a,i)}))},S=(e,t,a)=>{e&&(0,w.forEach)(e,(e=>{var i=(0,w.get)(e,t);a.push(e),null!=i&&i.length&&S(i,t,a)}))};function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=t&&t.length&&t.forEach((t=>{var a;return null!==(a=t[e])&&void 0!==a&&a.length?x(e,t[e]):(delete t[e],t)})),t}var k=a(2779),_=a.n(k),R=a(8533),E=a(2689),M=a(2238),W=a(8683),K=a(4819),B=a.n(K),P=a(3261),I=a(3691),N=["index","moveRow","className","style"],U=["useBrick","valueSuffix","cellStatus","cellStyle","headerBrick","colSpanKey","rowSpanKey","filterDropdownBrick"],z="DraggableBodyRow",D={lib:"antd",icon:"down",theme:"outlined"},A={lib:"antd",icon:"right",theme:"outlined"},T=(0,p.wrapBrick)("eo-icon"),F=e=>{var{index:t,moveRow:a,className:s,style:r}=e,n=(0,Z.Z)(e,N),l=c().useRef(null),[{isOver:o,dropClassName:h},d]=(0,R.L)({accept:z,collect:e=>{var{index:a}=e.getItem()||{};return a===t?{}:{isOver:e.isOver(),dropClassName:a<t?"dropOverDownward":"dropOverUpward"}},drop:e=>{a(e.index,t)}}),[,u]=(0,E.c)({type:z,item:{type:z,index:t},collect:e=>({isDragging:e.isDragging()})});return d(u(l)),c().createElement("tr",(0,m.Z)({ref:l,className:_()(s,{[h]:o}),style:(0,i.Z)({cursor:"move"},r)},n))};function O(e){if(e.error)throw e.error;var{configProps:t={pagination:!0,sortBy:!1},columns:a,rowKey:s="key",expandIconAsCell:r,expandIconColumnIndex:n,childrenColumnName:l,scroll:o,optimizedColumns:h,onDelete:u,ellipsisInfo:p,showHeader:g}=e,v=(0,d.useMemo)((()=>{var t;return null===(t=e.dataSource)||void 0===t?void 0:t.map(((e,t)=>(0,w.isNil)(e[s])?(0,i.Z)((0,i.Z)({},e),{},{[s]:t}):e))}),[e.dataSource,s]),[b,C]=(0,d.useState)(v),S=(0,d.useRef)(new Map),x=(0,d.useRef)(new Map),k=(0,d.useRef)(new Map),R=(0,d.useRef)(new Map);(0,d.useEffect)((()=>{R.current.clear(),C(v)}),[v]);var E=null!=t&&t.rowSelection?-1:0,K=(0,d.useMemo)((()=>{if(a){x.current.clear(),k.current.clear();var e=a.map(((e,t)=>{var a,{useBrick:o,valueSuffix:h,cellStatus:d,cellStyle:u={},headerBrick:g,colSpanKey:v,rowSpanKey:m,filterDropdownBrick:f}=e,b=(0,Z.Z)(e,U);if(null!=g&&g.useBrick){var C=null==g?void 0:g.useBrick,_=x.current.get(e);_||(_={title:b.title},x.current.set(e,_)),b.title=((e,t)=>function(){return c().createElement(P.ReactUseMultipleBricks,{useBrick:e,data:t})})(C,_)}if(null!=f&&f.useBrick&&(b.filterDropdown=c().createElement(P.ReactUseMultipleBricks,{useBrick:f.useBrick})),o?(o&&((a=k.current.get(o))||(a=new Map,k.current.set(o,a))),b.render=((e,t)=>function(a,i,s){if(e){var r=null==t?void 0:t.get(i);return r||(r={cellData:a,rowData:i,columnIndex:s},null==t||t.set(i,r)),c().createElement(P.ReactUseMultipleBricks,{useBrick:e,data:r})}})(o,a),b.shouldCellUpdate=(e,t)=>!(0,w.isEqual)(e,t)):h&&(b.render=e=>e+h),!r&&t===Number(n)+E){var R=b.render;b.render=function(e,t,a){return c().createElement(c().Fragment,null,!t[l]&&S.current.get(s?t[s]:t),R?R(e,t,a):e)}}if(d||v||m||u){var M=b.render;b.render=(e,t,a)=>({children:M?M(e,t,a):e,props:{colSpan:t[v],rowSpan:t[m],style:(0,i.Z)((0,i.Z)({},d?y(d,t,e):{}),u)}})}return"string"==typeof b.dataIndex&&(b.dataIndex=(0,w.toPath)(b.dataIndex)),"top"===b.verticalAlign&&(b.className?b.className+=" alignTop":b.className="alignTop"),"bottom"===b.verticalAlign&&(b.className?b.className+=" alignBottom":b.className="alignBottom"),p&&(b.className?b.className+=" ellipsisInfoCell":b.className="ellipsisInfoCell"),b}));return e}}),[a,l,r,n,E,s,u,p]),N={body:{row:F}},z=(t,a)=>{var i=b[t],s=B()(b,{$splice:[[t,1],[a,0,i]]});C(s),e.onDrag&&e.onDrag(s)},O=(0,w.pickBy)({expandIconColumnIndex:n,expandIconAsCell:r,expandRowByClick:e.expandRowByClick,expandedRowKeys:e.expandedRowKeys,defaultExpandAllRows:e.defaultExpandAllRows},(e=>!(0,w.isNil)(e))),L=c().createElement(f.Z,(0,m.Z)({className:_()("brickTable",{expandIconCellHidden:!r,customDropTable:e.tableDraggable,tableThTransparent:e.thTransparent,zebraPatternTable:(null==b?void 0:b.length)>=2&&e.zebraPattern}),dataSource:b},e.tableDraggable?{components:N,onRow:(e,t)=>({index:t,moveRow:z})}:{},{columns:K,onChange:e.onChange},e.expandedRowBrick?{expandedRowRender:(t,a)=>{var i,s=R.current.get(t);return s||(s={rowData:t,rowIndex:a},R.current.set(t,s)),c().createElement(P.ReactUseMultipleBricks,{useBrick:null===(i=e.expandedRowBrick)||void 0===i?void 0:i.useBrick,data:s})}}:{},O,{onExpand:(t,a)=>{e.onExpand&&e.onExpand(t,a)},showSorterTooltip:!1,onExpandedRowsChange:t=>{e.onExpandedRowsChange&&e.onExpandedRowsChange(t)},rowKey:s,childrenColumnName:l,rowClassName:(t,a)=>t.invalidRow?"invalidRow":t.disabledRow?"disabledRow":e.zebraPattern&&a%2?"brickTableOddRow":"",expandIcon:t=>{var a,i,n,{record:l,expandable:o,expanded:h,onExpand:d}=t,u=(null===(a=e.expandIcon)||void 0===a?void 0:a.collapsedIcon)||D;o?(h||(u=(null===(n=e.expandIcon)||void 0===n?void 0:n.expandedIcon)||A),i=c().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon",onClick:e=>{d(l,e)}},c().createElement(T,u))):i=c().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon"},c().createElement("span",{style:{visibility:"hidden"}},c().createElement(T,u)));return i?(r||S.current.set(s?l[s]:l,i),i):c().createElement(c().Fragment,null)},scroll:o,showHeader:g},t));e.tableDraggable&&(L=c().createElement(M.W,{backend:W.PD},L));var q=(0,d.useMemo)((()=>(0,I.Df)()),[]);return c().createElement(I.V9,{container:e.shadowRoot,cache:q},L)}a(5254);var L,q,H,$,V,Q,j,J,G,X,Y,ee,te,ae,ie,se,re,ne,le,oe,he,de,ce,ue,pe,ge,we,ve,me,Ze,fe,be,ye,Ce,Se,xe,ke,_e,Re,Ee,Me,We,Ke,Be,Pe,Ie,Ne,Ue,ze,De,Ae,Te,Fe,Oe,Le,qe,He,$e,Ve,Qe,je,Je,Ge,Xe,Ye,et,tt,at,it,st,rt,nt,lt,ot,ht,dt,ct,ut,pt,gt,wt,vt,mt,Zt,ft,bt,yt,Ct,St,xt,kt,_t,Rt,Et,Mt,Wt,Kt,Bt,Pt,It,Nt,Ut,zt,Dt,At,Tt,Ft,Ot,Lt,qt,Ht,$t,Vt,Qt,jt,Jt,Gt,Xt,Yt,ea,ta,aa,ia,sa,ra,na,la,oa,ha,{defineElement:da,property:ca,event:ua,method:pa}=(0,u.createDecorators)();q=da("eo-table",{styleTexts:[g.Z],alias:["advanced.general-table"]}),H=ua({type:"page.update"}),j=ua({type:"filter.update"}),Y=ua({type:"select.update"}),ie=ua({type:"select.row.keys.update"}),le=ua({type:"sort.update",cancelable:!0}),ce=ua({type:"row.expand"}),we=ua({type:"expand.rows.change"}),fe=ua({type:"row.drag"}),Se=ca({type:Boolean}),ke=ca({attribute:!1}),Re=ca(),Me=ca({attribute:!1}),Ke=ca({type:Boolean}),Pe=ca({attribute:!1}),Ne=ca({attribute:!1}),ze=ca(),Ae=ca({attribute:!1}),Fe=ca({attribute:!1}),Le=ca({attribute:!1}),He=ca({attribute:!1}),Ve=ca({attribute:!1}),je=ca({type:Number}),Ge=ca({type:Boolean}),Ye=ca({attribute:!1}),tt=ca({attribute:!1}),it=ca({type:Boolean}),rt=ca({type:Boolean}),lt=ca({attribute:!1}),ht=ca({type:Boolean}),ct=ca({type:Boolean}),pt=ca({attribute:!1}),wt=ca({attribute:!1}),mt=ca({type:Boolean}),ft=ca(),yt=ca({type:Boolean}),St=ca({attribute:!1}),kt=ca({type:Number}),Rt=ca({type:Number}),Mt=ca({attribute:!1}),Kt=ca(),Pt=ca({type:Boolean}),Nt=ca({type:Boolean}),zt=ca({type:Boolean}),At=ca({attribute:!1}),Ft=ca({type:Boolean}),Lt=ca({type:Boolean}),Ht=ca({type:Boolean}),Vt=ca({attribute:!1}),jt=ca(),Gt=ca({attribute:!1}),Yt=ca({type:Boolean}),ta=ca({type:Boolean}),ia=ca({attribute:!1}),ra=pa(),na=pa();var ga=new WeakMap,wa=new WeakMap,va=new WeakMap,ma=new WeakMap,Za=new WeakMap,fa=new WeakMap,ba=new WeakMap,ya=new WeakMap,Ca=new WeakMap,Sa=new WeakMap,xa=new WeakMap,ka=new WeakMap,_a=new WeakMap,Ra=new WeakMap,Ea=new WeakMap,Ma=new WeakMap,Wa=new WeakMap,Ka=new WeakMap,Ba=new WeakMap,Pa=new WeakMap,Ia=new WeakMap,Na=new WeakMap,Ua=new WeakMap,za=new WeakMap,Da=new WeakMap,Aa=new WeakMap,Ta=new WeakMap,Fa=new WeakMap,Oa=new WeakMap,La=new WeakMap,qa=new WeakMap,Ha=new WeakMap,$a=new WeakMap,Va=new WeakMap,Qa=new WeakMap,ja=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,ei=new WeakMap,ti=new WeakMap,ai=new WeakMap,ii=new WeakMap,si=new WeakMap,ri=new WeakMap,ni=new WeakMap,li=new WeakMap,oi=new WeakMap,hi=new WeakMap,di=new WeakMap,ci=new WeakMap,ui=new WeakMap,pi=new WeakMap,gi=new WeakMap,wi=new WeakMap,vi=new WeakMap,mi=new WeakMap,Zi=new WeakMap,fi=new WeakMap,bi=new WeakMap,yi=new WeakMap;class Ci extends p.ReactNextElement{constructor(){super(...arguments),(0,r.Z)(this,Ma,{get:Di,set:zi}),(0,r.Z)(this,Ra,{get:Ui,set:Ni}),(0,r.Z)(this,ka,{get:Ii,set:Pi}),(0,r.Z)(this,Sa,{get:Bi,set:Ki}),(0,r.Z)(this,ya,{get:Wi,set:Mi}),(0,r.Z)(this,fa,{get:Ei,set:Ri}),(0,r.Z)(this,ma,{get:_i,set:ki}),(0,r.Z)(this,wa,{get:xi,set:Si}),(0,r.Z)(this,ga,{writable:!0,value:(la(this),$(this))}),(0,r.Z)(this,va,{writable:!0,value:J(this)}),(0,r.Z)(this,Za,{writable:!0,value:ee(this)}),(0,r.Z)(this,ba,{writable:!0,value:se(this)}),(0,r.Z)(this,Ca,{writable:!0,value:oe(this)}),(0,r.Z)(this,xa,{writable:!0,value:ue(this)}),(0,r.Z)(this,_a,{writable:!0,value:ve(this)}),(0,r.Z)(this,Ea,{writable:!0,value:be(this)}),(0,r.Z)(this,Wa,{writable:!0,value:xe(this,!0)}),(0,r.Z)(this,Ka,{writable:!0,value:_e(this)}),(0,r.Z)(this,Ba,{writable:!0,value:Ee(this)}),(0,r.Z)(this,Pa,{writable:!0,value:We(this)}),(0,r.Z)(this,Ia,{writable:!0,value:Be(this,!1)}),(0,r.Z)(this,Na,{writable:!0,value:Ie(this)}),(0,r.Z)(this,Ua,{writable:!0,value:Ue(this)}),(0,r.Z)(this,za,{writable:!0,value:De(this)}),(0,r.Z)(this,Da,{writable:!0,value:Te(this)}),(0,r.Z)(this,Aa,{writable:!0,value:Oe(this)}),(0,r.Z)(this,Ta,{writable:!0,value:qe(this)}),(0,r.Z)(this,Fa,{writable:!0,value:$e(this)}),(0,r.Z)(this,Oa,{writable:!0,value:Qe(this,!0)}),(0,r.Z)(this,La,{writable:!0,value:Je(this)}),(0,r.Z)(this,qa,{writable:!0,value:Xe(this)}),(0,r.Z)(this,Ha,{writable:!0,value:et(this)}),(0,r.Z)(this,$a,{writable:!0,value:at(this,!1)}),(0,r.Z)(this,Va,{writable:!0,value:st(this)}),(0,r.Z)(this,Qa,{writable:!0,value:nt(this)}),(0,r.Z)(this,ja,{writable:!0,value:ot(this)}),(0,r.Z)(this,Ja,{writable:!0,value:dt(this)}),(0,r.Z)(this,Ga,{writable:!0,value:ut(this)}),(0,s.Z)(this,"_disabledChildrenKeys",[]),(0,r.Z)(this,Xa,{writable:!0,value:gt(this,"children")}),(0,r.Z)(this,Ya,{writable:!0,value:vt(this,!0)}),(0,r.Z)(this,ei,{writable:!0,value:Zt(this)}),(0,r.Z)(this,ti,{writable:!0,value:bt(this,"")}),(0,r.Z)(this,ai,{writable:!0,value:Ct(this)}),(0,r.Z)(this,ii,{writable:!0,value:xt(this)}),(0,r.Z)(this,si,{writable:!0,value:_t(this)}),(0,r.Z)(this,ri,{writable:!0,value:Et(this)}),(0,r.Z)(this,ni,{writable:!0,value:Wt(this,{x:!0})}),(0,r.Z)(this,li,{writable:!0,value:Bt(this,"q")}),(0,r.Z)(this,oi,{writable:!0,value:It(this)}),(0,r.Z)(this,hi,{writable:!0,value:Ut(this)}),(0,r.Z)(this,di,{writable:!0,value:Dt(this)}),(0,r.Z)(this,ci,{writable:!0,value:Tt(this,[])}),(0,r.Z)(this,ui,{writable:!0,value:Ot(this)}),(0,r.Z)(this,pi,{writable:!0,value:qt(this)}),(0,r.Z)(this,gi,{writable:!0,value:$t(this,!0)}),(0,r.Z)(this,wi,{writable:!0,value:Qt(this)}),(0,r.Z)(this,vi,{writable:!0,value:Jt(this)}),(0,r.Z)(this,mi,{writable:!0,value:Xt(this)}),(0,r.Z)(this,Zi,{writable:!0,value:ea(this,!0)}),(0,r.Z)(this,fi,{writable:!0,value:aa(this,!0)}),(0,s.Z)(this,"_originalDataSource",[]),(0,s.Z)(this,"_dataSource",[]),(0,s.Z)(this,"_pureSource",void 0),(0,s.Z)(this,"_columns",void 0),(0,s.Z)(this,"_finalConfigProps",{}),(0,s.Z)(this,"_error",void 0),(0,r.Z)(this,bi,{writable:!0,value:void 0}),(0,s.Z)(this,"_selectUpdateEventName",""),(0,s.Z)(this,"_selectUpdateEventDetailKeys",[]),(0,s.Z)(this,"_selectUpdateEventDetailField",""),(0,s.Z)(this,"_selectUpdateEventDetailExtra",{}),(0,s.Z)(this,"_fields",{page:"page",pageSize:"pageSize",dataSource:"list",total:"total",ascend:"ascend",descend:"descend"}),(0,r.Z)(this,yi,{writable:!0,value:sa(this,[])}),(0,s.Z)(this,"_selected",!1),(0,s.Z)(this,"_selectedRow",void 0),(0,s.Z)(this,"_selectedRows",[]),(0,s.Z)(this,"_allChildren",[]),(0,s.Z)(this,"_isInSelect",!1),(0,s.Z)(this,"_getRowKey",(()=>{var e,t,a,i;return null!==(e=null!==(t=null!==(a=this.rowKey)&&void 0!==a?a:this._fields.rowKey)&&void 0!==t?t:null===(i=this.configProps)||void 0===i?void 0:i.rowKey)&&void 0!==e?e:"key"})),(0,s.Z)(this,"_findParentByChildKeyValue",((e,t,a,i)=>{var s;return a.some((a=>{if(a[t]===e)s=i;else{var r=a[this.childrenColumnName];r&&(s=this._findParentByChildKeyValue(e,t,r,a))}return!!s})),s})),(0,s.Z)(this,"_handleRowSelectChange",((e,t)=>{var a=this._getRowKey(),i=(0,w.keyBy)(t,a);if(this._selected){var s=[...e];if(this._allChildren.forEach((e=>{var t=e[a];s.push(t),i[t]=e})),this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow){var r=new Set(e),n=this._findParentByChildKeyValue(this._selectedRow[a],a,this._dataSource);if(n&&n[this.childrenColumnName].every((e=>r.has(e[a])))){var l=n[a];s.push(l),i[l]=n}}this.selectedRowKeys=(0,w.uniq)(s)}else{var h;this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow&&(h=this._findParentByChildKeyValue(this._selectedRow[a],a,this._dataSource)),this.selectedRowKeys=(0,w.pullAll)(e,(0,w.map)(this._allChildren.concat(h),a))}this._selectedRow=void 0;var d=(0,w.keyBy)(this.extraRows,a);this._selectedRows=this.selectedRowKeys.map((e=>i[e]||d[e]));var c=null,u=(0,w.isEmpty)(this._selectUpdateEventDetailField)?this._selectedRows:(0,w.map)(this._selectedRows,(e=>(0,w.get)(e,this._selectUpdateEventDetailField)));c=(0,w.isEmpty)(this._selectUpdateEventDetailKeys)||(0,w.isEmpty)(u)?u:(0,w.set)({},this._selectUpdateEventDetailKeys,u),(0,w.isEmpty)(c)||(c=(0,w.merge)(c,this._selectUpdateEventDetailExtra)),this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:c})):(0,o.Z)(this,fa).emit(c),(0,o.Z)(this,ya).emit(e)})),(0,s.Z)(this,"_getSelectedRowsWithChildren",(e=>{var t=[];return!(0,w.isEmpty)(e[this.childrenColumnName])&&(0,w.isArray)(e[this.childrenColumnName])&&(0,w.forEach)(e[this.childrenColumnName],(e=>{t.push(e),t.push(...this._getSelectedRowsWithChildren(e))})),t})),(0,s.Z)(this,"_handleOnSelect",((e,t,a)=>{this._selected=t,this._selectedRow=e,this._isInSelect=!0;var i=this._getRowKey(),s=this.selectAllChildren?this._getSelectedRowsWithChildren(e):[];this._allChildren=s,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=t?(0,w.uniq)([...this._disabledChildrenKeys,...(0,w.map)(s,i)]):(0,w.pullAll)(this._disabledChildrenKeys,[...(0,w.map)(s,i)])),this.storeCheckedByUrl&&i&&this._updateUrlChecked([e[i]],t)})),(0,s.Z)(this,"_handleSelectAll",((e,t,a)=>{this._selected=e,this._isInSelect=!0;var i=this._getRowKey();if(this.selectAllChildren){var s=(0,w.map)(this._dataSource,i),r=a.filter((e=>s.includes(e[i]))),n=(0,w.flatten)((0,w.map)(r,(e=>(0,w.map)(this._getSelectedRowsWithChildren(e),(e=>e[i]))))),l=(0,w.flatten)((0,w.map)(r,(e=>(0,w.map)(this._getSelectedRowsWithChildren(e),(e=>e)))));this._allChildren=l,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=e?(0,w.uniq)(this._disabledChildrenKeys.concat(n)):this._disabledChildrenKeys.filter((e=>!n.includes(e))))}this.storeCheckedByUrl&&i&&this._updateUrlChecked((0,w.map)(a,i),e)})),(0,s.Z)(this,"_getCheckedFromUrl",(()=>{var e=(0,v.getHistory)(),t=new URLSearchParams(e.location.search).get("checked");return(0,w.isEmpty)(t)?[]:t.split(",")})),(0,s.Z)(this,"_updateUrlChecked",((e,t)=>{var a=(0,v.getHistory)(),i=this._getCheckedFromUrl();t?i=[...i,...e]:(0,w.pull)(i,...e),this.shouldUpdateUrlParams&&a.pushQuery({checked:i.join(",")},{notify:!1})})),(0,s.Z)(this,"_handleOnChange",((e,t,a)=>{var i=(0,v.getHistory)(),s=new URLSearchParams(i.location.search);if(!(0,w.isEmpty)(e))if(e.pageSize!==this.pageSize)e.current=1,s.set("page","1"),s.set("pageSize",(null==e?void 0:e.pageSize).toString()),(0,o.Z)(this,ma).emit({[this._fields.pageSize]:e.pageSize,[this._fields.page]:1}),this.page=1,this.pageSize=e.pageSize;else if(e.current!==this.page){var r=e.current||1;s.set("page",r.toString()),(0,o.Z)(this,wa).emit({[this._fields.page]:r}),this.page=r}this.filters=t,(0,w.isEmpty)(t)||(0,w.forEach)(t,((e,t)=>{(0,w.isNil)(e)||0===e.length?s.delete(t):s.set(t,e)})),a.order&&(0,w.isNil)(a.order)&&(a.columnKey!==this.sort||this._fields[a.order]!==this.order)&&(a.columnKey&&a.order?(s.set("sort",a.columnKey),s.set("order",this._fields[a.order].toString()),this.sort=a.columnKey,this.order=this._fields[a.order]):(s.delete("sort"),s.delete("order"),this.sort=null,this.order=null),(0,o.Z)(this,Sa).emit({sort:this.sort,order:this.order})),this.frontSearch?(this.shouldUpdateUrlParams&&i.push("?".concat(s),{notify:!1}),this.frontendSearch(e,t,a)):this.shouldUpdateUrlParams&&i.push("?".concat(s),{notify:!!this.shouldRenderWhenUrlParamsUpdate})})),(0,s.Z)(this,"renderSelectInfo",(()=>c().createElement("span",{style:{marginLeft:20}},c().createElement("span",null,"已选择",this.selectedRowKeys.length,"项"),c().createElement("a",{role:"button",style:{marginLeft:"10px"},onClick:()=>{this.selectedRowKeys=[],this._selectedRows=[],this._disabledChildrenKeys=[],this._allChildren=[],this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:[]})):(0,o.Z)(this,fa).emit([])}},"清空")))),(0,s.Z)(this,"_handleOnExpand",((e,t)=>{if(this.expandedRowKeys){var a=this._getRowKey(),i=[(0,w.get)(t,a)],s=(0,w.get)(t,this.childrenColumnName);if(!(0,w.isEmpty)(s)){var r=(0,w.map)((0,w.filter)(s,(e=>(0,w.isEmpty)((0,w.get)(e,this.childrenColumnName)))),a);i.push(...r)}this.expandedRowKeys=e?[...this.expandedRowKeys,...i]:(0,w.pull)(this.expandedRowKeys,...i),this._render()}(0,o.Z)(this,ka).emit({expanded:e,record:t})})),(0,s.Z)(this,"_handleOnExpandedRowsChange",(e=>{(0,o.Z)(this,Ra).emit({expandedRows:e})})),(0,s.Z)(this,"_handleOnDrag",(e=>{(0,o.Z)(this,Ma).emit({data:e})})),(0,s.Z)(this,"_getAllRows",(()=>{var e=[];return S(this._dataSource,this.childrenColumnName,e),e})),(0,s.Z)(this,"_handleDefaultSelectAll",(()=>{this._isInSelect=!0;var e=this._getRowKey();return this._selectedRows=this._getAllRows(),this.selectedRowKeys=(0,w.map)(this._selectedRows,e),this.selectedRowKeys})),(0,s.Z)(this,"_initConfigProps",(()=>{var e,t,a,s={current:this.page,pageSize:this.pageSize,total:(0,o.Z)(this,bi),showSizeChanger:!0,pageSizeOptions:["10","20","50"],showTotal:e=>{var t;return c().createElement(c().Fragment,null,c().createElement("span",{className:"totalText"},"共 ",c().createElement("strong",{className:"total"},e)," 条"),((null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)||this.rowSelection)&&this.showSelectInfo&&0!==this.selectedRowKeys.length&&this.renderSelectInfo())}},r=this._getRowKey();this.rowDisabledConfig&&(a=Array.isArray(this.rowDisabledConfig)?this.rowDisabledConfig:[this.rowDisabledConfig]);var n=(0,i.Z)((0,i.Z)({},r?{selectedRowKeys:this._isInSelect?this.selectedRowKeys:this.storeCheckedByUrl?this._getCheckedFromUrl():this.defaultSelectAll?this._handleDefaultSelectAll():this.selectedRowKeys,onSelect:this._handleOnSelect,onSelectAll:this._handleSelectAll,onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}:{onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}),{},{getCheckboxProps:e=>!(0,w.isEmpty)(this._disabledChildrenKeys)&&this._disabledChildrenKeys.includes((0,w.get)(e,r))?{disabled:!0}:a?{disabled:a.some((t=>{var{field:a,value:i,operator:s}=t,r=b[s];return null==r?void 0:r(i,(0,w.get)(e,a))}))}:{}});this.configProps?(this._finalConfigProps=(0,w.cloneDeep)(this.configProps),!1!==this.configProps.pagination&&(this._finalConfigProps.pagination=(0,i.Z)((0,i.Z)((0,i.Z)({},s),this.pagination),this.configProps.pagination),void 0!==this.configProps.pagination&&null!==this.configProps.pagination||!1!==this.pagination||(this._finalConfigProps.pagination=!1)),this.configProps.size||(this._finalConfigProps.size=this.size)):(this._finalConfigProps={},this._finalConfigProps.pagination=!1!==this.pagination&&s,this._finalConfigProps.size=this.size);var l,h,d=null!==(e=null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)&&void 0!==e?e:this.rowSelection;d?this._finalConfigProps.rowSelection=!0===d?(0,i.Z)((0,i.Z)({},n),{},{type:null!==(l=this.type)&&void 0!==l?l:"checkbox"}):(0,i.Z)((0,i.Z)((0,i.Z)({},n),{},{type:null!==(h=this.type)&&void 0!==h?h:"checkbox"},d),n.selectedRowKeys?{selectedRowKeys:n.selectedRowKeys}:{}):this.type?this._finalConfigProps.rowSelection=(0,i.Z)((0,i.Z)({},n),{},{type:this.type}):this._finalConfigProps.rowSelection=!1,this._columns&&(this._columns=this._columns.map((e=>{if((0,w.isNil)(e.key)&&(e.key=e.dataIndex),e.sorter&&(e.sortOrder=this.sort===e.key&&!(0,w.isNil)(this.order)&&(this._fields.ascend===this.order?"ascend":"descend")),e.filters){var t,a,i=(0,v.getHistory)(),s=null!==(t=new URLSearchParams(i.location.search).get(e.key))&&void 0!==t?t:null===(a=(0,w.get)(this.filters,e.key))||void 0===a?void 0:a.join(",");(0,w.isNil)(s)||(0,w.isEmpty)(s)?(e.filtered=!1,e.filteredValue=[]):(e.filtered=!0,e.filteredValue=s.split(",").map((t=>{var a,i;return null!==(a=null===(i=(0,w.find)(e.filters,(e=>String(e.value)===t)))||void 0===i?void 0:i.value)&&void 0!==a?a:t})))}return e})))}))}set columns(e){this._columns=e,this._render()}get columns(){return this._columns}set dataSource(e){var t,a,i,s,r,n;this._isInSelect=!1,this._originalDataSource=e,this._dataSource=(0,w.cloneDeep)(this._fields.dataSource?(0,w.get)(e,this._fields.dataSource):e),this._pureSource=(0,w.cloneDeep)(this._dataSource),this.stripEmptyExpandableChildren&&x((null===(n=this.configProps)||void 0===n||null===(n=n.expandable)||void 0===n?void 0:n.childrenColumnName)||"children",this._dataSource),(0,l.Z)(this,bi,(0,w.get)(e,this._fields.total)),this.page=null!==(t=null!==(a=(0,w.get)(e,"page"))&&void 0!==a?a:this.page)&&void 0!==t?t:1,this.pageSize=null!==(i=null!==(s=null!==(r=(0,w.get)(e,"page_size"))&&void 0!==r?r:(0,w.get)(e,"pageSize"))&&void 0!==s?s:this.pageSize)&&void 0!==i?i:10,this._render()}get showCard(){return(0,o.Z)(this,Wa)}set showCard(e){(0,l.Z)(this,Wa,e)}get rowSelection(){return(0,o.Z)(this,Ka)}set rowSelection(e){(0,l.Z)(this,Ka,e)}get rowKey(){return(0,o.Z)(this,Ba)}set rowKey(e){(0,l.Z)(this,Ba,e)}get hiddenColumns(){return(0,o.Z)(this,Pa)}set hiddenColumns(e){(0,l.Z)(this,Pa,e)}get showSelectInfo(){return(0,o.Z)(this,Ia)}set showSelectInfo(e){(0,l.Z)(this,Ia,e)}get filters(){return(0,o.Z)(this,Na)}set filters(e){(0,l.Z)(this,Na,e)}get configProps(){return(0,o.Z)(this,Ua)}set configProps(e){(0,l.Z)(this,Ua,e)}get sort(){return(0,o.Z)(this,za)}set sort(e){(0,l.Z)(this,za,e)}get order(){return(0,o.Z)(this,Da)}set order(e){(0,l.Z)(this,Da,e)}get rowDisabledConfig(){return(0,o.Z)(this,Aa)}set rowDisabledConfig(e){(0,l.Z)(this,Aa,e)}get expandedRowBrick(){return(0,o.Z)(this,Ta)}set expandedRowBrick(e){(0,l.Z)(this,Ta,e)}get expandIcon(){return(0,o.Z)(this,Fa)}set expandIcon(e){(0,l.Z)(this,Fa,e)}get expandIconAsCell(){return(0,o.Z)(this,Oa)}set expandIconAsCell(e){(0,l.Z)(this,Oa,e)}get expandIconColumnIndex(){return(0,o.Z)(this,La)}set expandIconColumnIndex(e){(0,l.Z)(this,La,e)}get expandRowByClick(){return(0,o.Z)(this,qa)}set expandRowByClick(e){(0,l.Z)(this,qa,e)}get optimizedColumns(){return(0,o.Z)(this,Ha)}set optimizedColumns(e){(0,l.Z)(this,Ha,e)}get stripEmptyExpandableChildren(){return(0,o.Z)(this,$a)}set stripEmptyExpandableChildren(e){(0,l.Z)(this,$a,e)}get defaultExpandAllRows(){return(0,o.Z)(this,Va)}set defaultExpandAllRows(e){(0,l.Z)(this,Va,e)}get ellipsisInfo(){return(0,o.Z)(this,Qa)}set ellipsisInfo(e){(0,l.Z)(this,Qa,e)}get expandedRowKeys(){return(0,o.Z)(this,ja)}set expandedRowKeys(e){(0,l.Z)(this,ja,e)}get selectAllChildren(){return(0,o.Z)(this,Ja)}set selectAllChildren(e){(0,l.Z)(this,Ja,e)}get defaultSelectAll(){return(0,o.Z)(this,Ga)}set defaultSelectAll(e){(0,l.Z)(this,Ga,e)}get childrenColumnName(){return(0,o.Z)(this,Xa)}set childrenColumnName(e){(0,l.Z)(this,Xa,e)}get sortable(){return(0,o.Z)(this,Ya)}set sortable(e){(0,l.Z)(this,Ya,e)}set fields(e){this._fields=(0,i.Z)((0,i.Z)({},this._fields),e),this._render()}get frontSearch(){return(0,o.Z)(this,ei)}set frontSearch(e){(0,l.Z)(this,ei,e)}get frontSearchQuery(){return(0,o.Z)(this,ti)}set frontSearchQuery(e){(0,l.Z)(this,ti,e)}get exactSearch(){return(0,o.Z)(this,ai)}set exactSearch(e){(0,l.Z)(this,ai,e)}get frontSearchFilterKeys(){return(0,o.Z)(this,ii)}set frontSearchFilterKeys(e){(0,l.Z)(this,ii,e)}get page(){return(0,o.Z)(this,si)}set page(e){(0,l.Z)(this,si,e)}get pageSize(){return(0,o.Z)(this,ri)}set pageSize(e){(0,l.Z)(this,ri,e)}get scrollConfigs(){return(0,o.Z)(this,ni)}set scrollConfigs(e){(0,l.Z)(this,ni,e)}get qField(){return(0,o.Z)(this,li)}set qField(e){(0,l.Z)(this,li,e)}get tableDraggable(){return(0,o.Z)(this,oi)}set tableDraggable(e){(0,l.Z)(this,oi,e)}get zebraPattern(){return(0,o.Z)(this,hi)}set zebraPattern(e){(0,l.Z)(this,hi,e)}get storeCheckedByUrl(){return(0,o.Z)(this,di)}set storeCheckedByUrl(e){(0,l.Z)(this,di,e)}get extraRows(){return(0,o.Z)(this,ci)}set extraRows(e){(0,l.Z)(this,ci,e)}get autoSelectParentWhenAllChildrenSelected(){return(0,o.Z)(this,ui)}set autoSelectParentWhenAllChildrenSelected(e){(0,l.Z)(this,ui,e)}get thTransparent(){return(0,o.Z)(this,pi)}set thTransparent(e){(0,l.Z)(this,pi,e)}get showHeader(){return(0,o.Z)(this,gi)}set showHeader(e){(0,l.Z)(this,gi,e)}get pagination(){return(0,o.Z)(this,wi)}set pagination(e){(0,l.Z)(this,wi,e)}get size(){return(0,o.Z)(this,vi)}set size(e){(0,l.Z)(this,vi,e)}get type(){return(0,o.Z)(this,mi)}set type(e){(0,l.Z)(this,mi,e)}get shouldUpdateUrlParams(){return(0,o.Z)(this,Zi)}set shouldUpdateUrlParams(e){(0,l.Z)(this,Zi,e)}get shouldRenderWhenUrlParamsUpdate(){return(0,o.Z)(this,fi)}set shouldRenderWhenUrlParamsUpdate(e){(0,l.Z)(this,fi,e)}get processedDataSource(){return this._dataSource}get processConfigProps(){return this._finalConfigProps}get processedColumns(){return this.getModifyColumns()}get selectedRowKeys(){return(0,o.Z)(this,yi)}set selectedRowKeys(e){(0,l.Z)(this,yi,e)}filterSourceData(e){var t=this.exactSearch?e.detail.q.trim():e.detail.q.trim().toLowerCase();if(this.shouldUpdateUrlParams){var a=(0,v.getHistory)(),i=new URLSearchParams(a.location.search);i.set("page","1"),t?(i.set(this.qField,t),a.push("?".concat(i),{notify:!this.frontSearch})):(i.delete(this.qField),a.push("?".concat(i),{notify:!this.frontSearch})),this.page=1}this.frontSearchQuery=t}handleFrontendDataChange(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.shouldUpdateUrlParams){var a=(0,v.getHistory)(),i=new URLSearchParams(a.location.search);this.frontSearchQuery=i.get(this.qField)}var s=[];s=this.handleFrontendFilterSource(e,this.frontSearchQuery||"",t);var r=(0,w.isNil)(this.order)?null:this._fields.ascend===this.order?"ascend":"descend";return s=this.handleFrontendSorter(s,{columnKey:this.sort,order:r}),s=this.handleFrontendFilters(s),(0,l.Z)(this,bi,s.length),s}handleFrontendFilterSource(e,t,a,s){if(!t)return e;var r=[];return s||(s=this.frontSearchFilterKeys||a.map((e=>e.dataIndex))),e.forEach((e=>{var n,l=e[this.childrenColumnName];if(l){var o=this.handleFrontendFilterSource(l,t,a,s);if(o.length>0)return void r.push((0,i.Z)((0,i.Z)({},e),{},{[this.childrenColumnName]:o}))}(null===(n=s)||void 0===n?void 0:n.some((a=>{var i=(0,w.get)(e,a);return!(0,w.isNil)(i)&&(this.exactSearch?i===t:JSON.stringify(i).toLowerCase().includes(t))})))&&r.push(e)})),r}handleFrontendSorter(e,t){var a=e||[],{columnKey:i,order:s}=t;if(!i||!s)return e;var r=1;return"descend"===s?r=-1:"ascend"===s&&(r=1),void 0!==r&&(a.sort(((e,t)=>{var a=(0,w.get)(e,i),s=(0,w.get)(t,i);if((0,w.isNil)(a)){if(!(0,w.isNil)(s))return 1}else if((0,w.isNil)(s))return-1;return a==s?0:a>s?r:-r})),a.forEach((e=>{var a=e[this.childrenColumnName];a&&this.handleFrontendSorter(a,t)}))),a}handleFrontendFilters(e){var t=e||[],a=(0,w.map)(this.filters,((e,t)=>({key:t,value:e}))).filter((e=>!(0,w.isNil)(e.value)&&0!==e.value.length));return t.filter((e=>(0,w.every)(a,(t=>{var a,i;return null===(a=null===(i=t.value)||void 0===i?void 0:i.includes((0,w.get)(e,t.key)))||void 0===a||a}))))}frontendSearch(e,t,a){this.sort=(0,w.isNil)(a.order)?null:a.columnKey,this.order=(0,w.isNil)(a.order)?null:this._fields[a.order]}expandAll(){var e=[],t=this._getRowKey();this._dataSource&&C(this._dataSource,t,this.childrenColumnName,e),this.expandedRowKeys=e}getModifyColumns(){var e=this._columns;return this._columns&&this.hiddenColumns&&(e=this._columns.filter((e=>{var t,a;return!(null!==(t=this.hiddenColumns)&&void 0!==t&&t.includes(null!==(a=e.dataIndex)&&void 0!==a?a:e.key))}))),!1===this.sortable&&(e=(0,w.map)(e,(e=>(e.sorter=!1,e)))),e}render(){return this.frontSearch&&(this._dataSource=this.handleFrontendDataChange(this._pureSource,this._columns)),this._initConfigProps(),c().createElement(O,{shadowRoot:this.shadowRoot,dataSource:this._dataSource||[],columns:this.getModifyColumns(),configProps:this._finalConfigProps,error:this._error,onChange:this._handleOnChange,showCard:this.showCard,showHeader:this.showHeader,expandedRowBrick:this.expandedRowBrick,expandIconAsCell:this.expandIconAsCell,expandIconColumnIndex:this.expandIconColumnIndex,expandRowByClick:this.expandRowByClick,defaultExpandAllRows:this.defaultExpandAllRows,onExpand:this._handleOnExpand,onExpandedRowsChange:this._handleOnExpandedRowsChange,expandedRowKeys:this.expandedRowKeys,rowKey:this._getRowKey(),childrenColumnName:this.childrenColumnName,tableDraggable:this.tableDraggable||this.draggable,onDrag:this._handleOnDrag,zebraPattern:this.zebraPattern,expandIcon:this.expandIcon,scroll:this.scrollConfigs,optimizedColumns:this.optimizedColumns,ellipsisInfo:this.ellipsisInfo,thTransparent:this.thTransparent})}_test_only_getOriginalDataSource(){return this._originalDataSource}updateData(e){this._dataSource=e.detail,this._error=null,this._render()}updateError(e){this._error=e.detail,this._render()}set selectUpdateEventName(e){this._selectUpdateEventName=e}set selectUpdateEventDetailKeys(e){this._selectUpdateEventDetailKeys=e}set selectUpdateEventDetailField(e){this._selectUpdateEventDetailField=e}set selectUpdateEventDetailExtra(e){this._selectUpdateEventDetailExtra=e}}function Si(e){Q(this,e)}function xi(){return V(this)}function ki(e){X(this,e)}function _i(){return G(this)}function Ri(e){ae(this,e)}function Ei(){return te(this)}function Mi(e){ne(this,e)}function Wi(){return re(this)}function Ki(e){de(this,e)}function Bi(){return he(this)}function Pi(e){ge(this,e)}function Ii(){return pe(this)}function Ni(e){Ze(this,e)}function Ui(){return me(this)}function zi(e){Ce(this,e)}function Di(){return ye(this)}oa=Ci,({e:[$,V,Q,J,G,X,ee,te,ae,se,re,ne,oe,he,de,ue,pe,ge,ve,me,Ze,be,ye,Ce,xe,_e,Ee,We,Be,Ie,Ue,De,Te,Oe,qe,$e,Qe,Je,Xe,et,at,st,nt,ot,dt,ut,gt,vt,Zt,bt,Ct,xt,_t,Et,Wt,Bt,It,Ut,Dt,Tt,Ot,qt,$t,Qt,Jt,Xt,ea,aa,sa,la],c:[ha,L]}=(0,h.Z)(oa,[[H,1,"pageUpdate",e=>(0,o.Z)(e,ga),(e,t)=>(0,l.Z)(e,ga,t)],[j,1,"filterUpdate",e=>(0,o.Z)(e,va),(e,t)=>(0,l.Z)(e,va,t)],[Y,1,"selectUpdate",e=>(0,o.Z)(e,Za),(e,t)=>(0,l.Z)(e,Za,t)],[ie,1,"selectRowKeysUpdate",e=>(0,o.Z)(e,ba),(e,t)=>(0,l.Z)(e,ba,t)],[le,1,"sortUpdate",e=>(0,o.Z)(e,Ca),(e,t)=>(0,l.Z)(e,Ca,t)],[ce,1,"rowExpand",e=>(0,o.Z)(e,xa),(e,t)=>(0,l.Z)(e,xa,t)],[we,1,"expandRowsChange",e=>(0,o.Z)(e,_a),(e,t)=>(0,l.Z)(e,_a,t)],[fe,1,"rowDrag",e=>(0,o.Z)(e,Ea),(e,t)=>(0,l.Z)(e,Ea,t)],[Se,1,"showCard"],[ke,1,"rowSelection"],[Re,1,"rowKey"],[Me,1,"hiddenColumns"],[Ke,1,"showSelectInfo"],[Pe,1,"filters"],[Ne,1,"configProps"],[ze,1,"sort"],[Ae,1,"order"],[Fe,1,"rowDisabledConfig"],[Le,1,"expandedRowBrick"],[He,1,"expandIcon"],[Ve,1,"expandIconAsCell"],[je,1,"expandIconColumnIndex"],[Ge,1,"expandRowByClick"],[Ye,1,"optimizedColumns"],[tt,1,"stripEmptyExpandableChildren"],[it,1,"defaultExpandAllRows"],[rt,1,"ellipsisInfo"],[lt,1,"expandedRowKeys"],[ht,1,"selectAllChildren"],[ct,1,"defaultSelectAll"],[pt,1,"childrenColumnName"],[wt,1,"sortable"],[mt,1,"frontSearch"],[ft,1,"frontSearchQuery"],[yt,1,"exactSearch"],[St,1,"frontSearchFilterKeys"],[kt,1,"page"],[Rt,1,"pageSize"],[Mt,1,"scrollConfigs"],[Kt,1,"qField"],[Pt,1,"tableDraggable"],[Nt,1,"zebraPattern"],[zt,1,"storeCheckedByUrl"],[At,1,"extraRows"],[Ft,1,"autoSelectParentWhenAllChildrenSelected"],[Lt,1,"thTransparent"],[Ht,1,"showHeader"],[Vt,1,"pagination"],[jt,1,"size"],[Gt,1,"type"],[Yt,1,"shouldUpdateUrlParams"],[ta,1,"shouldRenderWhenUrlParamsUpdate"],[ia,1,"selectedRowKeys"],[ra,2,"filterSourceData"],[na,2,"expandAll"]],[q],0,(e=>bi.has((0,n.Z)(e))))),L();var Ai,Ti,Fi,Oi,Li,qi,Hi,$i,Vi,Qi,ji,Ji,Gi,Xi,Yi,es,ts,as,is,ss,rs,ns,ls,os,hs,ds,cs,us,ps,gs,ws,vs,ms,Zs,fs,bs,ys,Cs,Ss,xs=a(8682),{defineElement:ks,property:_s,event:Rs}=(0,u.createDecorators)(),Es=(0,p.wrapBrick)("eo-icon");Ti=ks("eo-cascader",{alias:["advanced.general-cascader"]}),Fi=_s({attribute:!1}),Li=_s({attribute:!1}),Hi=_s({attribute:!1}),Vi=_s(),ji=_s({type:Boolean}),Gi=_s({type:Boolean}),Yi=_s({type:Boolean}),ts=_s({type:Boolean}),is=_s({attribute:!1}),rs=_s(),ls=_s(),hs=_s(),cs=_s({type:Number}),ps=_s({attribute:!1}),ws=_s({attribute:!1}),ms=Rs({type:"cascader.change"});var Ms=new WeakMap,Ws=new WeakMap,Ks=new WeakMap,Bs=new WeakMap,Ps=new WeakMap,Is=new WeakMap,Ns=new WeakMap,Us=new WeakMap,zs=new WeakMap,Ds=new WeakMap,As=new WeakMap,Ts=new WeakMap,Fs=new WeakMap,Os=new WeakMap,Ls=new WeakMap,qs=new WeakMap,Hs=new WeakMap,$s=new WeakMap;class Vs extends p.ReactNextElement{constructor(){super(...arguments),(0,r.Z)(this,Hs,{get:js,set:Qs}),(0,r.Z)(this,Ms,{writable:!0,value:(ys(this),Oi(this))}),(0,r.Z)(this,Ws,{writable:!0,value:qi(this,{label:"label",value:"value",children:"children"})}),(0,r.Z)(this,Ks,{writable:!0,value:$i(this)}),(0,r.Z)(this,Bs,{writable:!0,value:Qi(this)}),(0,r.Z)(this,Ps,{writable:!0,value:Ji(this)}),(0,r.Z)(this,Is,{writable:!0,value:Xi(this)}),(0,r.Z)(this,Ns,{writable:!0,value:es(this,!0)}),(0,r.Z)(this,Us,{writable:!0,value:as(this,!0)}),(0,r.Z)(this,zs,{writable:!0,value:ss(this)}),(0,r.Z)(this,Ds,{writable:!0,value:ns(this,"click")}),(0,r.Z)(this,As,{writable:!0,value:os(this,"bottomLeft")}),(0,r.Z)(this,Ts,{writable:!0,value:ds(this)}),(0,r.Z)(this,Fs,{writable:!0,value:us(this,50)}),(0,r.Z)(this,Os,{writable:!0,value:gs(this)}),(0,r.Z)(this,Ls,{writable:!0,value:vs(this)}),(0,r.Z)(this,qs,{writable:!0,value:Zs(this)}),(0,r.Z)(this,$s,{writable:!0,value:(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,o.Z)(this,Hs).emit({value:e,selectedOptions:t})}))}})}get options(){return(0,o.Z)(this,Ms)}set options(e){(0,l.Z)(this,Ms,e)}get fieldNames(){return(0,o.Z)(this,Ws)}set fieldNames(e){(0,l.Z)(this,Ws,e)}get value(){return(0,o.Z)(this,Ks)}set value(e){(0,l.Z)(this,Ks,e)}get placeholder(){return(0,o.Z)(this,Bs)}set placeholder(e){(0,l.Z)(this,Bs,e)}get multiple(){return(0,o.Z)(this,Ps)}set multiple(e){(0,l.Z)(this,Ps,e)}get disabled(){return(0,o.Z)(this,Is)}set disabled(e){(0,l.Z)(this,Is,e)}get allowClear(){return(0,o.Z)(this,Ns)}set allowClear(e){(0,l.Z)(this,Ns,e)}get showSearch(){return(0,o.Z)(this,Us)}set showSearch(e){(0,l.Z)(this,Us,e)}get suffixIcon(){return(0,o.Z)(this,zs)}set suffixIcon(e){(0,l.Z)(this,zs,e)}get expandTrigger(){return(0,o.Z)(this,Ds)}set expandTrigger(e){(0,l.Z)(this,Ds,e)}get popupPlacement(){return(0,o.Z)(this,As)}set popupPlacement(e){(0,l.Z)(this,As,e)}get size(){return(0,o.Z)(this,Ts)}set size(e){(0,l.Z)(this,Ts,e)}get limit(){return(0,o.Z)(this,Fs)}set limit(e){(0,l.Z)(this,Fs,e)}get maxTagCount(){return(0,o.Z)(this,Os)}set maxTagCount(e){(0,l.Z)(this,Os,e)}get cascaderStyle(){return(0,o.Z)(this,Ls)}set cascaderStyle(e){(0,l.Z)(this,Ls,e)}render(){return c().createElement(Js,{shadowRoot:this.shadowRoot,options:this.options,fieldNames:this.fieldNames,value:this.value,multiple:this.multiple,placeholder:this.placeholder,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,expandTrigger:this.expandTrigger,suffixIcon:this.suffixIcon,size:this.size,limit:this.limit,popupPlacement:this.popupPlacement,maxTagCount:this.maxTagCount,cascaderStyle:this.cascaderStyle,onChange:(0,o.Z)(this,$s)})}}function Qs(e){bs(this,e)}function js(){return fs(this)}function Js(e){var{shadowRoot:t,options:a,fieldNames:i,value:s,placeholder:r,disabled:n,multiple:l,allowClear:o,showSearch:h,expandTrigger:u,size:p,limit:g,popupPlacement:w,cascaderStyle:v,suffixIcon:m,maxTagCount:Z,onChange:f}=e,b=(0,d.useMemo)((()=>(0,I.Df)()),[]);return c().createElement(I.V9,{container:t,cache:b},c().createElement(xs.Z,{getPopupContainer:e=>e.parentElement,allowClear:o,disabled:n,multiple:l,expandTrigger:u,fieldNames:i,placeholder:r,size:p,showSearch:h&&{limit:g,filter:(e,t)=>{for(var a,s=(null==i?void 0:i.label)||"label",r=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase())),n=function(e){if(!t.some((t=>t[s].toLowerCase().includes(r[e]))))return{v:!1}},l=0;l<r.length;l++)if(a=n(l))return a.v;return!0}},placement:w,style:v,suffixIcon:m&&c().createElement(Es,m),maxTagCount:Z,value:s,options:a,onChange:(e,t)=>null==f?void 0:f(e,t)}))}Cs=Vs,({e:[Oi,qi,$i,Qi,Ji,Xi,es,as,ss,ns,os,ds,us,gs,vs,Zs,fs,bs,ys],c:[Ss,Ai]}=(0,h.Z)(Cs,[[Fi,1,"options"],[Li,1,"fieldNames"],[Hi,1,"value"],[Vi,1,"placeholder"],[ji,1,"multiple"],[Gi,1,"disabled"],[Yi,1,"allowClear"],[ts,1,"showSearch"],[is,1,"suffixIcon"],[rs,1,"expandTrigger"],[ls,1,"popupPlacement"],[hs,1,"size"],[cs,1,"limit"],[ps,1,"maxTagCount"],[ws,1,"cascaderStyle"],[ms,1,"changeEvent",e=>(0,o.Z)(e,qs),(e,t)=>(0,l.Z)(e,qs,t)]],[Ti],0,(e=>$s.has((0,n.Z)(e))))),Ai();var Gs=a(750),Xs=a(8298),Ys=a(1876),er=a(7088),tr=a(2068),ar=function(e){return e.TOTAL="TOTAL",e}({}),ir="bricks/advanced/eo-next-table",sr={showSizeChanger:!0,showTotal:!0};function rr(e){var t=[];if((0,w.isNil)(e));else if(Array.isArray(e))e.map((e=>t.push(rr(e))));else if("[object Object]"===Object.prototype.toString.call(e))for(var a in e)t.push(String(a),rr(e[a]));else t.push(String(e));return t.flat(1/0).filter(Boolean)}(0,er.initializeReactI18n)(ir,{en:{TOTAL:"Total <el>{{ total }}</el> Items"},zh:{TOTAL:"共 <el>{{ total }}</el> 条"}});var nr,lr,or,hr,dr,cr,ur,pr,gr,wr,vr,mr,Zr,fr,br,yr,Cr,Sr,xr,kr,_r,Rr,Er,Mr,Wr,Kr,Br=(0,d.forwardRef)((function(e,t){var a,s,{shadowRoot:r,rowKey:n,columns:l,dataSource:o,pagination:h,hiddenColumns:u,searchFields:p,onPageChange:g,onPageSizeChange:v}=e,{t:m}=(0,er.useTranslation)(ir),Z=(0,d.useMemo)((()=>(0,I.Df)()),[]),b=(0,P.useCurrentTheme)(),[y,C]=(0,d.useState)(null==o?void 0:o.list),[{page:S,pageSize:x},k]=(0,d.useState)({page:null!==(a=null==o?void 0:o.page)&&void 0!==a?a:1,pageSize:null!==(s=null==o?void 0:o.pageSize)&&void 0!==s?s:20});(0,d.useEffect)((()=>{var e,t;C(null==o?void 0:o.list),k({page:null!==(e=null==o?void 0:o.page)&&void 0!==e?e:1,pageSize:null!==(t=null==o?void 0:o.pageSize)&&void 0!==t?t:20})}),[o]);var _=(0,d.useMemo)((()=>{var e=new Set(u);return null==l?void 0:l.filter((t=>!e.has(t.key))).map((e=>(0,i.Z)((0,i.Z)({},e),{},{render(t,a,i){if(e.useBrick){var s={cellData:t,rowData:a,columnIndex:i};return c().createElement(P.ReactUseMultipleBricks,{useBrick:e.useBrick,data:s})}return c().createElement(c().Fragment,null,t)},title(t){var a;if(null!==(a=e.headerBrick)&&void 0!==a&&a.useBrick){var i={title:e.title};return c().createElement(P.ReactUseMultipleBricks,{useBrick:e.headerBrick.useBrick,data:i})}return c().createElement(c().Fragment,null,e.title)}})))}),[l,u]),R=(0,d.useMemo)((()=>{if(!1===h)return!1;var e=(0,i.Z)((0,i.Z)({},sr),h);return(0,i.Z)((0,i.Z)({},e),{},{total:null==o?void 0:o.total,current:S,pageSize:x,showTotal:e.showTotal?e=>c().createElement("span",{className:"pagination-total-text"},c().createElement(tr.Trans,{i18nKey:m(ar.TOTAL),values:{total:e},components:{el:c().createElement("strong",{className:"pagination-total-number"})}})):()=>null})}),[o,h,S,x]);return(0,d.useImperativeHandle)(t,(()=>({search:e=>{var t,a,{q:i}=e,s=(null==i?void 0:i.trim().toLowerCase())||"",r=null==o?void 0:o.list;s&&(r=p?null==o||null===(t=o.list)||void 0===t?void 0:t.filter((e=>p.flatMap((t=>rr((0,w.get)(e,t)))).some((e=>e.toLowerCase().includes(s))))):null==o||null===(a=o.list)||void 0===a?void 0:a.filter((e=>{var t=null==l?void 0:l.flatMap((t=>rr(Array.isArray(t.dataIndex)?(0,w.get)(e,t.dataIndex):e[t.dataIndex])));return null==t?void 0:t.some((e=>e.toLowerCase().includes(s)))}))),C(r),k((e=>{if(1!==e.page){var t,a={page:1,pageSize:null!==(t=e.pageSize)&&void 0!==t?t:20};return null==g||g(a),a}return e}))}}))),c().createElement(Xs.ZP,{theme:{algorithm:"dark-v2"===b?Ys.default.darkAlgorithm:Ys.default.defaultAlgorithm}},c().createElement(I.V9,{container:r,cache:Z},c().createElement(f.Z,{rowKey:n,columns:_,dataSource:y,pagination:R,onChange:(e,t,a,i)=>{"paginate"===i.action&&k((t=>{if(t.pageSize!==e.pageSize){var a,i={page:1,pageSize:null!==(a=e.pageSize)&&void 0!==a?a:20};return null==v||v(i),null==g||g(i),i}if(t.page!==e.current){var s,r,n={page:null!==(s=e.current)&&void 0!==s?s:1,pageSize:null!==(r=e.pageSize)&&void 0!==r?r:20};return null==g||g(n),n}return t}))}})))})),{defineElement:Pr,property:Ir,method:Nr,event:Ur}=(0,u.createDecorators)();lr=Pr("eo-next-table",{styleTexts:[Gs.Z]}),or=Ir(),dr=Ir({attribute:!1}),ur=Ir({attribute:!1}),gr=Ir({attribute:!1}),vr=Ir({attribute:!1}),Zr=Ir({attribute:!1}),br=Nr(),yr=Ur({type:"page.change"}),kr=Ur({type:"page.size.change"});var zr=new WeakMap,Dr=new WeakMap,Ar=new WeakMap,Tr=new WeakMap,Fr=new WeakMap,Or=new WeakMap,Lr=new WeakMap,qr=new WeakMap,Hr=new WeakMap,$r=new WeakMap,Vr=new WeakMap,Qr=new WeakMap,jr=new WeakMap;class Jr extends p.ReactNextElement{constructor(){super(...arguments),(0,r.Z)(this,Qr,{get:en,set:Yr}),(0,r.Z)(this,Hr,{get:Xr,set:Gr}),(0,r.Z)(this,zr,{writable:!0,value:(0,d.createRef)()}),(0,r.Z)(this,Dr,{writable:!0,value:(Mr(this),hr(this,"key"))}),(0,r.Z)(this,Ar,{writable:!0,value:cr(this)}),(0,r.Z)(this,Tr,{writable:!0,value:pr(this)}),(0,r.Z)(this,Fr,{writable:!0,value:wr(this)}),(0,r.Z)(this,Or,{writable:!0,value:mr(this)}),(0,r.Z)(this,Lr,{writable:!0,value:fr(this)}),(0,r.Z)(this,qr,{writable:!0,value:Cr(this)}),(0,r.Z)(this,$r,{writable:!0,value:e=>{(0,o.Z)(this,Hr).emit(e)}}),(0,r.Z)(this,Vr,{writable:!0,value:_r(this)}),(0,r.Z)(this,jr,{writable:!0,value:e=>{(0,o.Z)(this,Qr).emit(e)}})}get rowKey(){return(0,o.Z)(this,Dr)}set rowKey(e){(0,l.Z)(this,Dr,e)}get columns(){return(0,o.Z)(this,Ar)}set columns(e){(0,l.Z)(this,Ar,e)}get dataSource(){return(0,o.Z)(this,Tr)}set dataSource(e){(0,l.Z)(this,Tr,e)}get pagination(){return(0,o.Z)(this,Fr)}set pagination(e){(0,l.Z)(this,Fr,e)}get hiddenColumns(){return(0,o.Z)(this,Or)}set hiddenColumns(e){(0,l.Z)(this,Or,e)}get searchFields(){return(0,o.Z)(this,Lr)}set searchFields(e){(0,l.Z)(this,Lr,e)}search(e){var t;null===(t=(0,o.Z)(this,zr).current)||void 0===t||t.search(e)}render(){return c().createElement(Br,{ref:(0,o.Z)(this,zr),shadowRoot:this.shadowRoot,rowKey:this.rowKey,columns:this.columns,dataSource:this.dataSource,pagination:this.pagination,hiddenColumns:this.hiddenColumns,searchFields:this.searchFields,onPageChange:(0,o.Z)(this,$r),onPageSizeChange:(0,o.Z)(this,jr)})}}function Gr(e){xr(this,e)}function Xr(){return Sr(this)}function Yr(e){Er(this,e)}function en(){return Rr(this)}Wr=Jr,({e:[hr,cr,pr,wr,mr,fr,Cr,Sr,xr,_r,Rr,Er,Mr],c:[Kr,nr]}=(0,h.Z)(Wr,[[or,1,"rowKey"],[dr,1,"columns"],[ur,1,"dataSource"],[gr,1,"pagination"],[vr,1,"hiddenColumns"],[Zr,1,"searchFields"],[br,2,"search"],[yr,1,"pageChangeEvent",e=>(0,o.Z)(e,qr),(e,t)=>(0,l.Z)(e,qr,t)],[kr,1,"pageSizeChangeEvent",e=>(0,o.Z)(e,Vr),(e,t)=>(0,l.Z)(e,Vr,t)]],[lr],0,(e=>jr.has((0,n.Z)(e))))),nr()},750:(e,t,a)=>{a.d(t,{Z:()=>l});var i=a(9601),s=a.n(i),r=a(2609),n=a.n(r)()(s());n.push([e.id,":host{display:block}:host([hidden]){display:none}.pagination-total-text{color:var(--antd-pagination-total-text)}.pagination-total-number{font-weight:var(--font-weight-400);color:var(--antd-pagination-total-strong-text)}",""]);const l=n.toString()},2869:(e,t,a)=>{a.d(t,{Z:()=>l});var i=a(9601),s=a.n(i),r=a(2609),n=a.n(r)()(s());n.push([e.id,".brickTableOddRow{background-color:var(--color-fill-bg-base-4)}.ant-table-small .ant-table-body{margin:0}.ant-table-small .ant-table-thead{background:var(--antd-table-header-bg)}.ant-table-small .ant-table-row{line-height:26px}.ant-table-tbody > tr.invalidRow > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.invalidRow:hover > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.disabledRow > td{background-color:var(--theme-gray-border-color)}.ant-table-tbody > .ant-table-row-selected td{background:var(--antd-table-cell-fixed-body-bg)!important}td.alignTop{vertical-align:top}td.alignBottom{vertical-align:bottom}.expandIconCellHidden .ant-table-row-expand-icon-cell,\n.expandIconCellHidden .ant-table-expand-icon-col{width:1px;min-width:auto}.expandIconCellHidden .ant-table-row-expand-icon-cell > *,\n.expandIconCellHidden .ant-table-expand-icon-col > *{display:none}.expandIconSpan{cursor:pointer;margin-right:9px;color:var(--antd-table-row-expand-icon-color);font-size:11px}.expandIconSpan .anticon{background:var(--antd-table-row-expand-icon-action-bg);border-radius:2px;padding:3px}.tableThTransparent thead.ant-table-thead > tr > th{background:var(--antd-table-header-bg)}.zebraPatternTable .ant-table-tbody tr td{border-bottom:0}.ellipsis{max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.totalText{color:var(--antd-pagination-total-text)}.total{font-weight:normal;color:var(--antd-pagination-total-strong-text)}.ant-table-wrapper .ant-table-thead > tr > th{padding:11px 16px;font-size:12px;line-height:20px;border-bottom:0;font-weight:500;color:var(--antd-table-header-color)}",""]);const l=n.toString()}}]);
|
|
2
|
-
//# sourceMappingURL=4553.1299aaa6.js.map
|