@next-bricks/advanced 0.7.1 → 0.9.0

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.
Files changed (70) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/1303.f9a141a9.js +2 -0
  3. package/dist/chunks/1303.f9a141a9.js.map +1 -0
  4. package/dist/chunks/{2108.68af1eee.js → 2108.0d33f648.js} +2 -2
  5. package/dist/chunks/{2108.68af1eee.js.map → 2108.0d33f648.js.map} +1 -1
  6. package/dist/chunks/5163.cbfe1feb.js +2 -0
  7. package/dist/chunks/5163.cbfe1feb.js.map +1 -0
  8. package/dist/chunks/5381.7f5fc929.js +2 -0
  9. package/dist/chunks/5381.7f5fc929.js.map +1 -0
  10. package/dist/chunks/5491.da516674.js +2 -0
  11. package/dist/chunks/5491.da516674.js.map +1 -0
  12. package/dist/chunks/5636.90726873.js +2 -0
  13. package/dist/chunks/{5636.12dd2cb9.js.map → 5636.90726873.js.map} +1 -1
  14. package/dist/chunks/6653.215bb757.js +2 -0
  15. package/dist/chunks/6653.215bb757.js.map +1 -0
  16. package/dist/chunks/6660.af1b959a.js +2 -0
  17. package/dist/chunks/6660.af1b959a.js.map +1 -0
  18. package/dist/chunks/6805.82916868.js +2 -0
  19. package/dist/chunks/6805.82916868.js.map +1 -0
  20. package/dist/chunks/7067.9d9578ca.js +2 -0
  21. package/dist/chunks/7067.9d9578ca.js.map +1 -0
  22. package/dist/chunks/7089.b4f733fa.js +2 -0
  23. package/dist/chunks/7089.b4f733fa.js.map +1 -0
  24. package/dist/chunks/{8498.c282e08e.js → 8498.000d98f7.js} +2 -2
  25. package/dist/chunks/8498.000d98f7.js.map +1 -0
  26. package/dist/chunks/9703.b224693b.js +2 -0
  27. package/dist/chunks/9703.b224693b.js.map +1 -0
  28. package/dist/chunks/eo-next-table.cbb9ed2e.js +2 -0
  29. package/dist/chunks/eo-next-table.cbb9ed2e.js.map +1 -0
  30. package/dist/chunks/eo-table.ad5ebc15.js +2 -0
  31. package/dist/chunks/{eo-table.8d1c324b.js.map → eo-table.ad5ebc15.js.map} +1 -1
  32. package/dist/chunks/main.64df5122.js +2 -0
  33. package/dist/chunks/main.64df5122.js.map +1 -0
  34. package/dist/examples.json +1 -1
  35. package/dist/index.9e96a07d.js +2 -0
  36. package/dist/index.9e96a07d.js.map +1 -0
  37. package/dist/manifest.json +68 -0
  38. package/dist/types.json +476 -2
  39. package/dist-types/next-table/Row.d.ts +9 -0
  40. package/dist-types/next-table/Table.d.ts +18 -2
  41. package/dist-types/next-table/index.d.ts +38 -1
  42. package/dist-types/next-table/interface.d.ts +23 -3
  43. package/dist-types/next-table/utils.d.ts +16 -0
  44. package/docs/eo-next-table.md +516 -0
  45. package/package.json +2 -2
  46. package/dist/chunks/3914.d7f14c10.js +0 -2
  47. package/dist/chunks/3914.d7f14c10.js.map +0 -1
  48. package/dist/chunks/5202.31f6c01a.js +0 -2
  49. package/dist/chunks/5202.31f6c01a.js.map +0 -1
  50. package/dist/chunks/5381.3beebdb0.js +0 -2
  51. package/dist/chunks/5381.3beebdb0.js.map +0 -1
  52. package/dist/chunks/5636.12dd2cb9.js +0 -2
  53. package/dist/chunks/6653.20094386.js +0 -2
  54. package/dist/chunks/6653.20094386.js.map +0 -1
  55. package/dist/chunks/6660.84288c37.js +0 -2
  56. package/dist/chunks/6660.84288c37.js.map +0 -1
  57. package/dist/chunks/7782.8fe619f8.js +0 -2
  58. package/dist/chunks/7782.8fe619f8.js.map +0 -1
  59. package/dist/chunks/7882.7705394d.js +0 -2
  60. package/dist/chunks/7882.7705394d.js.map +0 -1
  61. package/dist/chunks/8498.c282e08e.js.map +0 -1
  62. package/dist/chunks/9703.27cd3d59.js +0 -2
  63. package/dist/chunks/9703.27cd3d59.js.map +0 -1
  64. package/dist/chunks/eo-next-table.2c09f81e.js +0 -2
  65. package/dist/chunks/eo-next-table.2c09f81e.js.map +0 -1
  66. package/dist/chunks/eo-table.8d1c324b.js +0 -2
  67. package/dist/chunks/main.331abc39.js +0 -2
  68. package/dist/chunks/main.331abc39.js.map +0 -1
  69. package/dist/index.6fcbf59c.js +0 -2
  70. package/dist/index.6fcbf59c.js.map +0 -1
@@ -457,12 +457,28 @@
457
457
  "attribute": false,
458
458
  "type": "DataSource"
459
459
  },
460
+ {
461
+ "name": "frontSearch",
462
+ "description": "是否前端搜索",
463
+ "type": "boolean"
464
+ },
460
465
  {
461
466
  "name": "pagination",
462
467
  "description": "分页配置",
463
468
  "attribute": false,
464
469
  "type": "PaginationType"
465
470
  },
471
+ {
472
+ "name": "multiSort",
473
+ "description": "是否支持多列排序,前端搜索时需设置 column.sortPriority 优先级",
474
+ "type": "boolean"
475
+ },
476
+ {
477
+ "name": "sort",
478
+ "description": "排序信息",
479
+ "attribute": false,
480
+ "type": "Sort | Sort[]"
481
+ },
466
482
  {
467
483
  "name": "rowSelection",
468
484
  "description": "表格行可选择配置",
@@ -493,11 +509,47 @@
493
509
  "attribute": false,
494
510
  "type": "(string | number)[]"
495
511
  },
512
+ {
513
+ "name": "childrenColumnName",
514
+ "description": "树形结构的列名",
515
+ "default": "\"children\"",
516
+ "type": "string"
517
+ },
518
+ {
519
+ "name": "rowDraggable",
520
+ "description": "表格行拖拽配置",
521
+ "type": "boolean"
522
+ },
496
523
  {
497
524
  "name": "searchFields",
498
525
  "description": "进行前端搜索的字段,支持嵌套的写法。不配置的时候默认为对所有 column.dataIndex 进行前端搜索",
499
526
  "attribute": false,
500
527
  "type": "(string | string[])[]"
528
+ },
529
+ {
530
+ "name": "size",
531
+ "description": "表格大小",
532
+ "default": "\"large\"",
533
+ "type": "TableProps<RecordType>[\"size\"]"
534
+ },
535
+ {
536
+ "name": "showHeader",
537
+ "description": "是否显示表头",
538
+ "default": "true",
539
+ "type": "boolean"
540
+ },
541
+ {
542
+ "name": "scrollConfig",
543
+ "description": "滚动配置",
544
+ "default": "{ x: true }",
545
+ "attribute": false,
546
+ "type": "TableProps<RecordType>[\"scroll\"]"
547
+ },
548
+ {
549
+ "name": "optimizedColumns",
550
+ "description": "优化渲染的列(输入对应的 column.key)",
551
+ "attribute": false,
552
+ "type": "(string | number)[]"
501
553
  }
502
554
  ],
503
555
  "events": [
@@ -517,6 +569,14 @@
517
569
  "type": "{\n page: number;\n pageSize: number;\n }"
518
570
  }
519
571
  },
572
+ {
573
+ "name": "sort.change",
574
+ "description": "排序变化的回调",
575
+ "detail": {
576
+ "description": "当前排序的信息",
577
+ "type": "Sort | Sort[] | undefined"
578
+ }
579
+ },
520
580
  {
521
581
  "name": "row.select",
522
582
  "description": "行选中项发生变化时的回调",
@@ -540,6 +600,14 @@
540
600
  "description": "所有展开行的 key",
541
601
  "type": "(string | number)[]"
542
602
  }
603
+ },
604
+ {
605
+ "name": "row.drag",
606
+ "description": "表格行拖拽结束发生的事件",
607
+ "detail": {
608
+ "description": "重新排序的行数据、拖拽的行数据、放下位置的行数据",
609
+ "type": "{\n list: RecordType[];\n active: RecordType;\n over: RecordType;\n }"
610
+ }
543
611
  }
544
612
  ],
545
613
  "slots": [],
package/dist/types.json CHANGED
@@ -1228,6 +1228,13 @@
1228
1228
  }
1229
1229
  }
1230
1230
  },
1231
+ {
1232
+ "name": "frontSearch",
1233
+ "annotation": {
1234
+ "type": "keyword",
1235
+ "value": "boolean"
1236
+ }
1237
+ },
1231
1238
  {
1232
1239
  "name": "pagination",
1233
1240
  "annotation": {
@@ -1238,6 +1245,38 @@
1238
1245
  }
1239
1246
  }
1240
1247
  },
1248
+ {
1249
+ "name": "multiSort",
1250
+ "annotation": {
1251
+ "type": "keyword",
1252
+ "value": "boolean"
1253
+ }
1254
+ },
1255
+ {
1256
+ "name": "sort",
1257
+ "annotation": {
1258
+ "type": "union",
1259
+ "types": [
1260
+ {
1261
+ "type": "reference",
1262
+ "typeName": {
1263
+ "type": "identifier",
1264
+ "name": "Sort"
1265
+ }
1266
+ },
1267
+ {
1268
+ "type": "array",
1269
+ "elementType": {
1270
+ "type": "reference",
1271
+ "typeName": {
1272
+ "type": "identifier",
1273
+ "name": "Sort"
1274
+ }
1275
+ }
1276
+ }
1277
+ ]
1278
+ }
1279
+ },
1241
1280
  {
1242
1281
  "name": "rowSelection",
1243
1282
  "annotation": {
@@ -1324,6 +1363,20 @@
1324
1363
  }
1325
1364
  }
1326
1365
  },
1366
+ {
1367
+ "name": "childrenColumnName",
1368
+ "annotation": {
1369
+ "type": "keyword",
1370
+ "value": "string"
1371
+ }
1372
+ },
1373
+ {
1374
+ "name": "rowDraggable",
1375
+ "annotation": {
1376
+ "type": "keyword",
1377
+ "value": "boolean"
1378
+ }
1379
+ },
1327
1380
  {
1328
1381
  "name": "searchFields",
1329
1382
  "annotation": {
@@ -1348,6 +1401,93 @@
1348
1401
  }
1349
1402
  }
1350
1403
  }
1404
+ },
1405
+ {
1406
+ "name": "size",
1407
+ "annotation": {
1408
+ "type": "indexedAccess",
1409
+ "objectType": {
1410
+ "type": "reference",
1411
+ "typeName": {
1412
+ "type": "identifier",
1413
+ "name": "TableProps"
1414
+ },
1415
+ "typeParameters": {
1416
+ "type": "typeParameterInstantiation",
1417
+ "params": [
1418
+ {
1419
+ "type": "reference",
1420
+ "typeName": {
1421
+ "type": "identifier",
1422
+ "name": "RecordType"
1423
+ }
1424
+ }
1425
+ ]
1426
+ }
1427
+ },
1428
+ "indexType": {
1429
+ "type": "jsLiteral",
1430
+ "value": "size"
1431
+ }
1432
+ }
1433
+ },
1434
+ {
1435
+ "name": "showHeader",
1436
+ "annotation": {
1437
+ "type": "keyword",
1438
+ "value": "boolean"
1439
+ }
1440
+ },
1441
+ {
1442
+ "name": "scrollConfig",
1443
+ "annotation": {
1444
+ "type": "indexedAccess",
1445
+ "objectType": {
1446
+ "type": "reference",
1447
+ "typeName": {
1448
+ "type": "identifier",
1449
+ "name": "TableProps"
1450
+ },
1451
+ "typeParameters": {
1452
+ "type": "typeParameterInstantiation",
1453
+ "params": [
1454
+ {
1455
+ "type": "reference",
1456
+ "typeName": {
1457
+ "type": "identifier",
1458
+ "name": "RecordType"
1459
+ }
1460
+ }
1461
+ ]
1462
+ }
1463
+ },
1464
+ "indexType": {
1465
+ "type": "jsLiteral",
1466
+ "value": "scroll"
1467
+ }
1468
+ }
1469
+ },
1470
+ {
1471
+ "name": "optimizedColumns",
1472
+ "annotation": {
1473
+ "type": "array",
1474
+ "elementType": {
1475
+ "type": "parenthesizedType",
1476
+ "annotation": {
1477
+ "type": "union",
1478
+ "types": [
1479
+ {
1480
+ "type": "keyword",
1481
+ "value": "string"
1482
+ },
1483
+ {
1484
+ "type": "keyword",
1485
+ "value": "number"
1486
+ }
1487
+ ]
1488
+ }
1489
+ }
1490
+ }
1351
1491
  }
1352
1492
  ],
1353
1493
  "events": [
@@ -1419,6 +1559,37 @@
1419
1559
  }
1420
1560
  }
1421
1561
  },
1562
+ {
1563
+ "name": "sort.change",
1564
+ "detail": {
1565
+ "annotation": {
1566
+ "type": "union",
1567
+ "types": [
1568
+ {
1569
+ "type": "reference",
1570
+ "typeName": {
1571
+ "type": "identifier",
1572
+ "name": "Sort"
1573
+ }
1574
+ },
1575
+ {
1576
+ "type": "array",
1577
+ "elementType": {
1578
+ "type": "reference",
1579
+ "typeName": {
1580
+ "type": "identifier",
1581
+ "name": "Sort"
1582
+ }
1583
+ }
1584
+ },
1585
+ {
1586
+ "type": "keyword",
1587
+ "value": "undefined"
1588
+ }
1589
+ ]
1590
+ }
1591
+ }
1592
+ },
1422
1593
  {
1423
1594
  "name": "row.select",
1424
1595
  "detail": {
@@ -1562,6 +1733,64 @@
1562
1733
  }
1563
1734
  }
1564
1735
  }
1736
+ },
1737
+ {
1738
+ "name": "row.drag",
1739
+ "detail": {
1740
+ "annotation": {
1741
+ "type": "typeLiteral",
1742
+ "members": [
1743
+ {
1744
+ "type": "propertySignature",
1745
+ "key": {
1746
+ "type": "identifier",
1747
+ "name": "list"
1748
+ },
1749
+ "annotation": {
1750
+ "type": "array",
1751
+ "elementType": {
1752
+ "type": "reference",
1753
+ "typeName": {
1754
+ "type": "identifier",
1755
+ "name": "RecordType"
1756
+ }
1757
+ }
1758
+ },
1759
+ "computed": false
1760
+ },
1761
+ {
1762
+ "type": "propertySignature",
1763
+ "key": {
1764
+ "type": "identifier",
1765
+ "name": "active"
1766
+ },
1767
+ "annotation": {
1768
+ "type": "reference",
1769
+ "typeName": {
1770
+ "type": "identifier",
1771
+ "name": "RecordType"
1772
+ }
1773
+ },
1774
+ "computed": false
1775
+ },
1776
+ {
1777
+ "type": "propertySignature",
1778
+ "key": {
1779
+ "type": "identifier",
1780
+ "name": "over"
1781
+ },
1782
+ "annotation": {
1783
+ "type": "reference",
1784
+ "typeName": {
1785
+ "type": "identifier",
1786
+ "name": "RecordType"
1787
+ }
1788
+ },
1789
+ "computed": false
1790
+ }
1791
+ ]
1792
+ }
1793
+ }
1565
1794
  }
1566
1795
  ],
1567
1796
  "methods": [
@@ -1643,6 +1872,120 @@
1643
1872
  "optional": true,
1644
1873
  "computed": false,
1645
1874
  "description": "内容自定义展示构件"
1875
+ },
1876
+ {
1877
+ "type": "propertySignature",
1878
+ "key": {
1879
+ "type": "identifier",
1880
+ "name": "cellColSpanKey"
1881
+ },
1882
+ "annotation": {
1883
+ "type": "keyword",
1884
+ "value": "string"
1885
+ },
1886
+ "optional": true,
1887
+ "computed": false,
1888
+ "description": "记录表格列合并的值的 key"
1889
+ },
1890
+ {
1891
+ "type": "propertySignature",
1892
+ "key": {
1893
+ "type": "identifier",
1894
+ "name": "cellRowSpanKey"
1895
+ },
1896
+ "annotation": {
1897
+ "type": "keyword",
1898
+ "value": "string"
1899
+ },
1900
+ "optional": true,
1901
+ "computed": false,
1902
+ "description": "记录表格行合并的值的 key"
1903
+ },
1904
+ {
1905
+ "type": "propertySignature",
1906
+ "key": {
1907
+ "type": "identifier",
1908
+ "name": "sortable"
1909
+ },
1910
+ "annotation": {
1911
+ "type": "keyword",
1912
+ "value": "boolean"
1913
+ },
1914
+ "optional": true,
1915
+ "computed": false,
1916
+ "description": "是否可排序"
1917
+ },
1918
+ {
1919
+ "type": "propertySignature",
1920
+ "key": {
1921
+ "type": "identifier",
1922
+ "name": "sortPriority"
1923
+ },
1924
+ "annotation": {
1925
+ "type": "keyword",
1926
+ "value": "number"
1927
+ },
1928
+ "optional": true,
1929
+ "computed": false,
1930
+ "description": "前端搜索时,多列排序优先级,数字越大优先级越高"
1931
+ },
1932
+ {
1933
+ "type": "propertySignature",
1934
+ "key": {
1935
+ "type": "identifier",
1936
+ "name": "verticalAlign"
1937
+ },
1938
+ "annotation": {
1939
+ "type": "indexedAccess",
1940
+ "objectType": {
1941
+ "type": "reference",
1942
+ "typeName": {
1943
+ "type": "identifier",
1944
+ "name": "CSSProperties"
1945
+ }
1946
+ },
1947
+ "indexType": {
1948
+ "type": "jsLiteral",
1949
+ "value": "verticalAlign"
1950
+ }
1951
+ },
1952
+ "optional": true,
1953
+ "computed": false,
1954
+ "description": "垂直对齐方式"
1955
+ },
1956
+ {
1957
+ "type": "propertySignature",
1958
+ "key": {
1959
+ "type": "identifier",
1960
+ "name": "cellStyle"
1961
+ },
1962
+ "annotation": {
1963
+ "type": "reference",
1964
+ "typeName": {
1965
+ "type": "identifier",
1966
+ "name": "CSSProperties"
1967
+ }
1968
+ },
1969
+ "optional": true,
1970
+ "computed": false,
1971
+ "description": "单元格样式"
1972
+ },
1973
+ {
1974
+ "type": "propertySignature",
1975
+ "key": {
1976
+ "type": "identifier",
1977
+ "name": "headerStyle"
1978
+ },
1979
+ "annotation": {
1980
+ "type": "reference",
1981
+ "typeName": {
1982
+ "type": "identifier",
1983
+ "name": "CSSProperties"
1984
+ }
1985
+ },
1986
+ "optional": true,
1987
+ "computed": false,
1988
+ "description": "头部单元格样式"
1646
1989
  }
1647
1990
  ],
1648
1991
  "extends": [
@@ -1650,7 +1993,7 @@
1650
1993
  "type": "expressionWithTypeArguments",
1651
1994
  "expression": {
1652
1995
  "type": "identifier",
1653
- "name": "ColumnType"
1996
+ "name": "Pick"
1654
1997
  },
1655
1998
  "typeParameters": {
1656
1999
  "type": "typeParameterInstantiation",
@@ -1659,8 +2002,69 @@
1659
2002
  "type": "reference",
1660
2003
  "typeName": {
1661
2004
  "type": "identifier",
1662
- "name": "RecordType"
2005
+ "name": "ColumnType"
2006
+ },
2007
+ "typeParameters": {
2008
+ "type": "typeParameterInstantiation",
2009
+ "params": [
2010
+ {
2011
+ "type": "reference",
2012
+ "typeName": {
2013
+ "type": "identifier",
2014
+ "name": "RecordType"
2015
+ }
2016
+ }
2017
+ ]
1663
2018
  }
2019
+ },
2020
+ {
2021
+ "type": "union",
2022
+ "types": [
2023
+ {
2024
+ "type": "jsLiteral",
2025
+ "value": "align"
2026
+ },
2027
+ {
2028
+ "type": "jsLiteral",
2029
+ "value": "colSpan"
2030
+ },
2031
+ {
2032
+ "type": "jsLiteral",
2033
+ "value": "dataIndex"
2034
+ },
2035
+ {
2036
+ "type": "jsLiteral",
2037
+ "value": "ellipsis"
2038
+ },
2039
+ {
2040
+ "type": "jsLiteral",
2041
+ "value": "fixed"
2042
+ },
2043
+ {
2044
+ "type": "jsLiteral",
2045
+ "value": "key"
2046
+ },
2047
+ {
2048
+ "type": "jsLiteral",
2049
+ "value": "rowScope"
2050
+ },
2051
+ {
2052
+ "type": "jsLiteral",
2053
+ "value": "showSorterTooltip"
2054
+ },
2055
+ {
2056
+ "type": "jsLiteral",
2057
+ "value": "sortDirections"
2058
+ },
2059
+ {
2060
+ "type": "jsLiteral",
2061
+ "value": "title"
2062
+ },
2063
+ {
2064
+ "type": "jsLiteral",
2065
+ "value": "width"
2066
+ }
2067
+ ]
1664
2068
  }
1665
2069
  ]
1666
2070
  }
@@ -1864,6 +2268,50 @@
1864
2268
  }
1865
2269
  ]
1866
2270
  },
2271
+ {
2272
+ "type": "interface",
2273
+ "name": "Sort",
2274
+ "body": [
2275
+ {
2276
+ "type": "propertySignature",
2277
+ "key": {
2278
+ "type": "identifier",
2279
+ "name": "columnKey"
2280
+ },
2281
+ "annotation": {
2282
+ "type": "union",
2283
+ "types": [
2284
+ {
2285
+ "type": "keyword",
2286
+ "value": "string"
2287
+ },
2288
+ {
2289
+ "type": "keyword",
2290
+ "value": "number"
2291
+ }
2292
+ ]
2293
+ },
2294
+ "optional": true,
2295
+ "computed": false
2296
+ },
2297
+ {
2298
+ "type": "propertySignature",
2299
+ "key": {
2300
+ "type": "identifier",
2301
+ "name": "order"
2302
+ },
2303
+ "annotation": {
2304
+ "type": "reference",
2305
+ "typeName": {
2306
+ "type": "identifier",
2307
+ "name": "SortOrder"
2308
+ }
2309
+ },
2310
+ "optional": true,
2311
+ "computed": false
2312
+ }
2313
+ ]
2314
+ },
1867
2315
  {
1868
2316
  "type": "typeAlias",
1869
2317
  "name": "RowSelectionType",
@@ -1904,6 +2352,28 @@
1904
2352
  },
1905
2353
  "optional": true,
1906
2354
  "computed": false
2355
+ },
2356
+ {
2357
+ "type": "propertySignature",
2358
+ "key": {
2359
+ "type": "identifier",
2360
+ "name": "rowDisabled"
2361
+ },
2362
+ "annotation": {
2363
+ "type": "union",
2364
+ "types": [
2365
+ {
2366
+ "type": "keyword",
2367
+ "value": "string"
2368
+ },
2369
+ {
2370
+ "type": "keyword",
2371
+ "value": "boolean"
2372
+ }
2373
+ ]
2374
+ },
2375
+ "optional": true,
2376
+ "computed": false
1907
2377
  }
1908
2378
  ],
1909
2379
  "extends": [
@@ -1957,6 +2427,10 @@
1957
2427
  {
1958
2428
  "type": "jsLiteral",
1959
2429
  "value": "type"
2430
+ },
2431
+ {
2432
+ "type": "jsLiteral",
2433
+ "value": "checkStrictly"
1960
2434
  }
1961
2435
  ]
1962
2436
  }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
3
+ }
4
+ export declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLTableRowElement>>;
5
+ interface DraggableRowProps extends RowProps {
6
+ "data-row-key": string;
7
+ }
8
+ export declare function DraggableRow(props: DraggableRowProps): React.ReactElement;
9
+ export {};