@next-bricks/advanced 0.2.18 → 0.4.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.
- package/dist/bricks.json +3 -2
- package/dist/chunks/{1646.98770c7d.js → 1646.76ffff34.js} +2 -2
- package/dist/chunks/{1646.98770c7d.js.map → 1646.76ffff34.js.map} +1 -1
- package/dist/chunks/2001.22032139.js +2 -0
- package/dist/chunks/2001.22032139.js.map +1 -0
- package/dist/chunks/2179.69e8af07.js +2 -0
- package/dist/chunks/{6205.a46caf84.js.map → 2179.69e8af07.js.map} +1 -1
- package/dist/chunks/2658.68af36a5.js +3 -0
- package/dist/chunks/2658.68af36a5.js.map +1 -0
- package/dist/chunks/3458.b5d15172.js +2 -0
- package/dist/chunks/3458.b5d15172.js.map +1 -0
- package/dist/chunks/{3914.b5986212.js → 3914.d7f14c10.js} +2 -2
- package/dist/chunks/{3914.b5986212.js.map → 3914.d7f14c10.js.map} +1 -1
- package/dist/chunks/{4049.fbb7cb4d.js → 4049.049ba54b.js} +2 -2
- package/dist/chunks/{4049.fbb7cb4d.js.map → 4049.049ba54b.js.map} +1 -1
- package/dist/chunks/{4275.ec11a9ef.js → 4275.59268511.js} +2 -2
- package/dist/chunks/{4275.ec11a9ef.js.map → 4275.59268511.js.map} +1 -1
- package/dist/chunks/4540.6f5710be.js +2 -0
- package/dist/chunks/4540.6f5710be.js.map +1 -0
- package/dist/chunks/4553.82506318.js +2 -0
- package/dist/chunks/4553.82506318.js.map +1 -0
- package/dist/chunks/5077.e0967b68.js +3 -0
- package/dist/chunks/5077.e0967b68.js.map +1 -0
- package/dist/chunks/{5202.796c5041.js → 5202.31f6c01a.js} +2 -2
- package/dist/chunks/{5202.796c5041.js.map → 5202.31f6c01a.js.map} +1 -1
- package/dist/chunks/5381.3beebdb0.js +2 -0
- package/dist/chunks/{5381.aa23ca81.js.map → 5381.3beebdb0.js.map} +1 -1
- package/dist/chunks/5636.12dd2cb9.js +2 -0
- package/dist/chunks/5636.12dd2cb9.js.map +1 -0
- package/dist/chunks/{5725.67492eaf.js → 5725.c5e8304f.js} +2 -2
- package/dist/chunks/{5725.67492eaf.js.map → 5725.c5e8304f.js.map} +1 -1
- package/dist/chunks/6205.26d502bf.js +2 -0
- package/dist/chunks/{7164.95f2b97a.js.map → 6205.26d502bf.js.map} +1 -1
- package/dist/chunks/{6473.c289bd63.js → 6473.7245ff97.js} +2 -2
- package/dist/chunks/{6473.c289bd63.js.map → 6473.7245ff97.js.map} +1 -1
- package/dist/chunks/6660.84288c37.js +2 -0
- package/dist/chunks/{6660.34319f30.js.map → 6660.84288c37.js.map} +1 -1
- package/dist/chunks/7164.581bdfb9.js +2 -0
- package/dist/chunks/7164.581bdfb9.js.map +1 -0
- package/dist/chunks/{7672.2e03c84c.js → 7672.4ad98915.js} +2 -2
- package/dist/chunks/{7672.2e03c84c.js.map → 7672.4ad98915.js.map} +1 -1
- package/dist/chunks/{7746.8465a844.js → 7746.db8450a8.js} +2 -2
- package/dist/chunks/{7746.8465a844.js.map → 7746.db8450a8.js.map} +1 -1
- package/dist/chunks/7782.8fe619f8.js +2 -0
- package/dist/chunks/7782.8fe619f8.js.map +1 -0
- package/dist/chunks/8588.7062eb7d.js +2 -0
- package/dist/chunks/8588.7062eb7d.js.map +1 -0
- package/dist/chunks/{8682.96cb67a4.js → 8682.fa753f30.js} +2 -2
- package/dist/chunks/{8682.96cb67a4.js.map → 8682.fa753f30.js.map} +1 -1
- package/dist/chunks/8691.0a98411d.js +2 -0
- package/dist/chunks/8691.0a98411d.js.map +1 -0
- package/dist/chunks/{9431.f9e15525.js → 9431.6d961dcf.js} +2 -2
- package/dist/chunks/{9431.f9e15525.js.map → 9431.6d961dcf.js.map} +1 -1
- package/dist/chunks/eo-cascader.3aecea58.js +2 -0
- package/dist/chunks/{eo-cascader.a33e87cf.js.map → eo-cascader.3aecea58.js.map} +1 -1
- package/dist/chunks/eo-next-table.ca139f6a.js +2 -0
- package/dist/chunks/eo-next-table.ca139f6a.js.map +1 -0
- package/dist/chunks/eo-table.a22495c0.js +2 -0
- package/dist/chunks/{eo-table.be314f2a.js.map → eo-table.a22495c0.js.map} +1 -1
- package/dist/chunks/main.94d29a7e.js +2 -0
- package/dist/chunks/main.94d29a7e.js.map +1 -0
- package/dist/examples.json +2 -2
- package/dist/index.6c05507c.js +2 -0
- package/dist/index.6c05507c.js.map +1 -0
- package/dist/manifest.json +42 -0
- package/dist/types.json +381 -0
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/next-table/Table.d.ts +18 -0
- package/dist-types/next-table/i18n.d.ts +12 -0
- package/dist-types/next-table/index.d.ts +14 -0
- package/dist-types/next-table/index.spec.d.ts +1 -0
- package/dist-types/next-table/interface.d.ts +22 -0
- package/dist-types/next-table/utils.d.ts +6 -0
- package/docs/eo-next-table.md +90 -0
- package/package.json +4 -4
- package/dist/chunks/3458.f240a91c.js +0 -2
- package/dist/chunks/3458.f240a91c.js.map +0 -1
- package/dist/chunks/5381.aa23ca81.js +0 -2
- package/dist/chunks/5768.82c72937.js +0 -3
- package/dist/chunks/5768.82c72937.js.map +0 -1
- package/dist/chunks/6205.a46caf84.js +0 -2
- package/dist/chunks/6660.34319f30.js +0 -2
- package/dist/chunks/6844.e400dbf4.js +0 -3
- package/dist/chunks/6844.e400dbf4.js.map +0 -1
- package/dist/chunks/7164.95f2b97a.js +0 -2
- package/dist/chunks/7782.7375e921.js +0 -2
- package/dist/chunks/7782.7375e921.js.map +0 -1
- package/dist/chunks/8691.f56af4c8.js +0 -2
- package/dist/chunks/8691.f56af4c8.js.map +0 -1
- package/dist/chunks/9079.3c8a7267.js +0 -2
- package/dist/chunks/9079.3c8a7267.js.map +0 -1
- package/dist/chunks/eo-cascader.a33e87cf.js +0 -2
- package/dist/chunks/eo-table.be314f2a.js +0 -2
- package/dist/chunks/main.ad5f18b3.js +0 -2
- package/dist/chunks/main.ad5f18b3.js.map +0 -1
- package/dist/index.bd9850fa.js +0 -2
- package/dist/index.bd9850fa.js.map +0 -1
- /package/dist/chunks/{6844.e400dbf4.js.LICENSE.txt → 2658.68af36a5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5768.82c72937.js.LICENSE.txt → 5077.e0967b68.js.LICENSE.txt} +0 -0
- /package/docs/{eo-table.md → eo-table.md.hidden} +0 -0
package/dist/types.json
CHANGED
|
@@ -1195,5 +1195,386 @@
|
|
|
1195
1195
|
]
|
|
1196
1196
|
}
|
|
1197
1197
|
]
|
|
1198
|
+
},
|
|
1199
|
+
"eo-next-table": {
|
|
1200
|
+
"properties": [
|
|
1201
|
+
{
|
|
1202
|
+
"name": "columns",
|
|
1203
|
+
"annotation": {
|
|
1204
|
+
"type": "array",
|
|
1205
|
+
"elementType": {
|
|
1206
|
+
"type": "reference",
|
|
1207
|
+
"typeName": {
|
|
1208
|
+
"type": "identifier",
|
|
1209
|
+
"name": "Column"
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"name": "dataSource",
|
|
1216
|
+
"annotation": {
|
|
1217
|
+
"type": "reference",
|
|
1218
|
+
"typeName": {
|
|
1219
|
+
"type": "identifier",
|
|
1220
|
+
"name": "DataSource"
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"name": "pagination",
|
|
1226
|
+
"annotation": {
|
|
1227
|
+
"type": "reference",
|
|
1228
|
+
"typeName": {
|
|
1229
|
+
"type": "identifier",
|
|
1230
|
+
"name": "PaginationType"
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
],
|
|
1235
|
+
"events": [
|
|
1236
|
+
{
|
|
1237
|
+
"name": "page.change",
|
|
1238
|
+
"detail": {
|
|
1239
|
+
"annotation": {
|
|
1240
|
+
"type": "typeLiteral",
|
|
1241
|
+
"members": [
|
|
1242
|
+
{
|
|
1243
|
+
"type": "propertySignature",
|
|
1244
|
+
"key": {
|
|
1245
|
+
"type": "identifier",
|
|
1246
|
+
"name": "page"
|
|
1247
|
+
},
|
|
1248
|
+
"annotation": {
|
|
1249
|
+
"type": "keyword",
|
|
1250
|
+
"value": "number"
|
|
1251
|
+
},
|
|
1252
|
+
"computed": false
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"type": "propertySignature",
|
|
1256
|
+
"key": {
|
|
1257
|
+
"type": "identifier",
|
|
1258
|
+
"name": "pageSize"
|
|
1259
|
+
},
|
|
1260
|
+
"annotation": {
|
|
1261
|
+
"type": "keyword",
|
|
1262
|
+
"value": "number"
|
|
1263
|
+
},
|
|
1264
|
+
"computed": false
|
|
1265
|
+
}
|
|
1266
|
+
]
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"name": "page.size.change",
|
|
1272
|
+
"detail": {
|
|
1273
|
+
"annotation": {
|
|
1274
|
+
"type": "typeLiteral",
|
|
1275
|
+
"members": [
|
|
1276
|
+
{
|
|
1277
|
+
"type": "propertySignature",
|
|
1278
|
+
"key": {
|
|
1279
|
+
"type": "identifier",
|
|
1280
|
+
"name": "page"
|
|
1281
|
+
},
|
|
1282
|
+
"annotation": {
|
|
1283
|
+
"type": "keyword",
|
|
1284
|
+
"value": "number"
|
|
1285
|
+
},
|
|
1286
|
+
"computed": false
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"type": "propertySignature",
|
|
1290
|
+
"key": {
|
|
1291
|
+
"type": "identifier",
|
|
1292
|
+
"name": "pageSize"
|
|
1293
|
+
},
|
|
1294
|
+
"annotation": {
|
|
1295
|
+
"type": "keyword",
|
|
1296
|
+
"value": "number"
|
|
1297
|
+
},
|
|
1298
|
+
"computed": false
|
|
1299
|
+
}
|
|
1300
|
+
]
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
],
|
|
1305
|
+
"methods": [],
|
|
1306
|
+
"types": [
|
|
1307
|
+
{
|
|
1308
|
+
"type": "interface",
|
|
1309
|
+
"name": "Column",
|
|
1310
|
+
"body": [
|
|
1311
|
+
{
|
|
1312
|
+
"type": "propertySignature",
|
|
1313
|
+
"key": {
|
|
1314
|
+
"type": "identifier",
|
|
1315
|
+
"name": "headerBrick"
|
|
1316
|
+
},
|
|
1317
|
+
"annotation": {
|
|
1318
|
+
"type": "typeLiteral",
|
|
1319
|
+
"members": [
|
|
1320
|
+
{
|
|
1321
|
+
"type": "propertySignature",
|
|
1322
|
+
"key": {
|
|
1323
|
+
"type": "identifier",
|
|
1324
|
+
"name": "useBrick"
|
|
1325
|
+
},
|
|
1326
|
+
"annotation": {
|
|
1327
|
+
"type": "reference",
|
|
1328
|
+
"typeName": {
|
|
1329
|
+
"type": "identifier",
|
|
1330
|
+
"name": "UseBrickConf"
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
"computed": false
|
|
1334
|
+
}
|
|
1335
|
+
]
|
|
1336
|
+
},
|
|
1337
|
+
"optional": true,
|
|
1338
|
+
"computed": false,
|
|
1339
|
+
"description": "表头自定义展示构件"
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"type": "propertySignature",
|
|
1343
|
+
"key": {
|
|
1344
|
+
"type": "identifier",
|
|
1345
|
+
"name": "useBrick"
|
|
1346
|
+
},
|
|
1347
|
+
"annotation": {
|
|
1348
|
+
"type": "reference",
|
|
1349
|
+
"typeName": {
|
|
1350
|
+
"type": "identifier",
|
|
1351
|
+
"name": "UseBrickConf"
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
"optional": true,
|
|
1355
|
+
"computed": false,
|
|
1356
|
+
"description": "内容自定义展示构件"
|
|
1357
|
+
}
|
|
1358
|
+
],
|
|
1359
|
+
"extends": [
|
|
1360
|
+
{
|
|
1361
|
+
"type": "expressionWithTypeArguments",
|
|
1362
|
+
"expression": {
|
|
1363
|
+
"type": "identifier",
|
|
1364
|
+
"name": "ColumnType"
|
|
1365
|
+
},
|
|
1366
|
+
"typeParameters": {
|
|
1367
|
+
"type": "typeParameterInstantiation",
|
|
1368
|
+
"params": [
|
|
1369
|
+
{
|
|
1370
|
+
"type": "reference",
|
|
1371
|
+
"typeName": {
|
|
1372
|
+
"type": "identifier",
|
|
1373
|
+
"name": "RecordType"
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
]
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"type": "typeAlias",
|
|
1383
|
+
"name": "RecordType",
|
|
1384
|
+
"annotation": {
|
|
1385
|
+
"type": "reference",
|
|
1386
|
+
"typeName": {
|
|
1387
|
+
"type": "identifier",
|
|
1388
|
+
"name": "Record"
|
|
1389
|
+
},
|
|
1390
|
+
"typeParameters": {
|
|
1391
|
+
"type": "typeParameterInstantiation",
|
|
1392
|
+
"params": [
|
|
1393
|
+
{
|
|
1394
|
+
"type": "keyword",
|
|
1395
|
+
"value": "string"
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"type": "keyword",
|
|
1399
|
+
"value": "any"
|
|
1400
|
+
}
|
|
1401
|
+
]
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
"type": "interface",
|
|
1407
|
+
"name": "DataSource",
|
|
1408
|
+
"body": [
|
|
1409
|
+
{
|
|
1410
|
+
"type": "propertySignature",
|
|
1411
|
+
"key": {
|
|
1412
|
+
"type": "identifier",
|
|
1413
|
+
"name": "list"
|
|
1414
|
+
},
|
|
1415
|
+
"annotation": {
|
|
1416
|
+
"type": "array",
|
|
1417
|
+
"elementType": {
|
|
1418
|
+
"type": "reference",
|
|
1419
|
+
"typeName": {
|
|
1420
|
+
"type": "identifier",
|
|
1421
|
+
"name": "RecordType"
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
"optional": true,
|
|
1426
|
+
"computed": false
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
"type": "propertySignature",
|
|
1430
|
+
"key": {
|
|
1431
|
+
"type": "identifier",
|
|
1432
|
+
"name": "total"
|
|
1433
|
+
},
|
|
1434
|
+
"annotation": {
|
|
1435
|
+
"type": "keyword",
|
|
1436
|
+
"value": "number"
|
|
1437
|
+
},
|
|
1438
|
+
"optional": true,
|
|
1439
|
+
"computed": false
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"type": "propertySignature",
|
|
1443
|
+
"key": {
|
|
1444
|
+
"type": "identifier",
|
|
1445
|
+
"name": "page"
|
|
1446
|
+
},
|
|
1447
|
+
"annotation": {
|
|
1448
|
+
"type": "keyword",
|
|
1449
|
+
"value": "number"
|
|
1450
|
+
},
|
|
1451
|
+
"optional": true,
|
|
1452
|
+
"computed": false
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"type": "propertySignature",
|
|
1456
|
+
"key": {
|
|
1457
|
+
"type": "identifier",
|
|
1458
|
+
"name": "pageSize"
|
|
1459
|
+
},
|
|
1460
|
+
"annotation": {
|
|
1461
|
+
"type": "keyword",
|
|
1462
|
+
"value": "number"
|
|
1463
|
+
},
|
|
1464
|
+
"optional": true,
|
|
1465
|
+
"computed": false
|
|
1466
|
+
}
|
|
1467
|
+
]
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
"type": "typeAlias",
|
|
1471
|
+
"name": "PaginationType",
|
|
1472
|
+
"annotation": {
|
|
1473
|
+
"type": "union",
|
|
1474
|
+
"types": [
|
|
1475
|
+
{
|
|
1476
|
+
"type": "jsLiteral",
|
|
1477
|
+
"value": false
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"type": "reference",
|
|
1481
|
+
"typeName": {
|
|
1482
|
+
"type": "identifier",
|
|
1483
|
+
"name": "PaginationConfig"
|
|
1484
|
+
}
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"type": "keyword",
|
|
1488
|
+
"value": "undefined"
|
|
1489
|
+
}
|
|
1490
|
+
]
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"type": "interface",
|
|
1495
|
+
"name": "PaginationConfig",
|
|
1496
|
+
"body": [
|
|
1497
|
+
{
|
|
1498
|
+
"type": "propertySignature",
|
|
1499
|
+
"key": {
|
|
1500
|
+
"type": "identifier",
|
|
1501
|
+
"name": "showTotal"
|
|
1502
|
+
},
|
|
1503
|
+
"annotation": {
|
|
1504
|
+
"type": "keyword",
|
|
1505
|
+
"value": "boolean"
|
|
1506
|
+
},
|
|
1507
|
+
"optional": true,
|
|
1508
|
+
"computed": false
|
|
1509
|
+
}
|
|
1510
|
+
],
|
|
1511
|
+
"extends": [
|
|
1512
|
+
{
|
|
1513
|
+
"type": "expressionWithTypeArguments",
|
|
1514
|
+
"expression": {
|
|
1515
|
+
"type": "identifier",
|
|
1516
|
+
"name": "Pick"
|
|
1517
|
+
},
|
|
1518
|
+
"typeParameters": {
|
|
1519
|
+
"type": "typeParameterInstantiation",
|
|
1520
|
+
"params": [
|
|
1521
|
+
{
|
|
1522
|
+
"type": "reference",
|
|
1523
|
+
"typeName": {
|
|
1524
|
+
"type": "identifier",
|
|
1525
|
+
"name": "TablePaginationConfig"
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"type": "union",
|
|
1530
|
+
"types": [
|
|
1531
|
+
{
|
|
1532
|
+
"type": "jsLiteral",
|
|
1533
|
+
"value": "disabled"
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
"type": "jsLiteral",
|
|
1537
|
+
"value": "hideOnSinglePage"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"type": "jsLiteral",
|
|
1541
|
+
"value": "pageSizeOptions"
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"type": "jsLiteral",
|
|
1545
|
+
"value": "responsive"
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"type": "jsLiteral",
|
|
1549
|
+
"value": "showLessItems"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"type": "jsLiteral",
|
|
1553
|
+
"value": "showQuickJumper"
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"type": "jsLiteral",
|
|
1557
|
+
"value": "showSizeChanger"
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"type": "jsLiteral",
|
|
1561
|
+
"value": "showTitle"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"type": "jsLiteral",
|
|
1565
|
+
"value": "simple"
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"type": "jsLiteral",
|
|
1569
|
+
"value": "size"
|
|
1570
|
+
}
|
|
1571
|
+
]
|
|
1572
|
+
}
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
]
|
|
1577
|
+
}
|
|
1578
|
+
]
|
|
1198
1579
|
}
|
|
1199
1580
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { Column, DataSource, PaginationType } from "./interface.js";
|
|
3
|
+
interface NextTableComponentProps {
|
|
4
|
+
shadowRoot: ShadowRoot | null;
|
|
5
|
+
columns?: Column[];
|
|
6
|
+
dataSource?: DataSource;
|
|
7
|
+
pagination?: PaginationType;
|
|
8
|
+
onPageChange?: (detail: {
|
|
9
|
+
page: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
onPageSizeChange?: (detail: {
|
|
13
|
+
page: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function NextTableComponent(props: NextTableComponentProps): JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
import { Column, DataSource, PaginationType } from "./interface.js";
|
|
5
|
+
/**
|
|
6
|
+
* 大型表格
|
|
7
|
+
*/
|
|
8
|
+
export declare class EoNextTable extends ReactNextElement {
|
|
9
|
+
#private;
|
|
10
|
+
accessor columns: Column[] | undefined;
|
|
11
|
+
accessor dataSource: DataSource | undefined;
|
|
12
|
+
accessor pagination: PaginationType | undefined;
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ColumnType, TablePaginationConfig } from "antd/es/table";
|
|
2
|
+
import type { UseBrickConf } from "@next-core/types";
|
|
3
|
+
export type RecordType = Record<string, any>;
|
|
4
|
+
export interface Column extends ColumnType<RecordType> {
|
|
5
|
+
/** 表头自定义展示构件 */
|
|
6
|
+
headerBrick?: {
|
|
7
|
+
useBrick: UseBrickConf;
|
|
8
|
+
};
|
|
9
|
+
/** 内容自定义展示构件 */
|
|
10
|
+
useBrick?: UseBrickConf;
|
|
11
|
+
}
|
|
12
|
+
export interface DataSource {
|
|
13
|
+
list?: RecordType[];
|
|
14
|
+
total?: number;
|
|
15
|
+
page?: number;
|
|
16
|
+
pageSize?: number;
|
|
17
|
+
}
|
|
18
|
+
interface PaginationConfig extends Pick<TablePaginationConfig, "disabled" | "hideOnSinglePage" | "pageSizeOptions" | "responsive" | "showLessItems" | "showQuickJumper" | "showSizeChanger" | "showTitle" | "simple" | "size"> {
|
|
19
|
+
showTotal?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type PaginationType = false | PaginationConfig | undefined;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
大型表格
|
|
2
|
+
|
|
3
|
+
## Examples
|
|
4
|
+
|
|
5
|
+
### Basic
|
|
6
|
+
|
|
7
|
+
```yaml preview
|
|
8
|
+
- brick: eo-next-table
|
|
9
|
+
events:
|
|
10
|
+
page.change:
|
|
11
|
+
- action: console.log
|
|
12
|
+
page.size.change:
|
|
13
|
+
- action: console.log
|
|
14
|
+
properties:
|
|
15
|
+
pagination:
|
|
16
|
+
pageSizeOptions:
|
|
17
|
+
- 5
|
|
18
|
+
- 10
|
|
19
|
+
- 20
|
|
20
|
+
columns:
|
|
21
|
+
- dataIndex: name
|
|
22
|
+
key: name
|
|
23
|
+
title: Name
|
|
24
|
+
headerBrick:
|
|
25
|
+
useBrick:
|
|
26
|
+
brick: span
|
|
27
|
+
properties:
|
|
28
|
+
style:
|
|
29
|
+
color: red
|
|
30
|
+
textContent: <% DATA.title %>
|
|
31
|
+
useBrick:
|
|
32
|
+
- brick: span
|
|
33
|
+
properties:
|
|
34
|
+
style:
|
|
35
|
+
color: pink
|
|
36
|
+
textContent: <% DATA.cellData %>
|
|
37
|
+
- dataIndex: age
|
|
38
|
+
key: age
|
|
39
|
+
title: Age
|
|
40
|
+
- dataIndex: address
|
|
41
|
+
key: address
|
|
42
|
+
title: Address
|
|
43
|
+
dataSource:
|
|
44
|
+
pageSize: 5
|
|
45
|
+
list:
|
|
46
|
+
- key: 0
|
|
47
|
+
name: Jack
|
|
48
|
+
age: 18
|
|
49
|
+
address: Guangzhou
|
|
50
|
+
- key: 1
|
|
51
|
+
name: Alex
|
|
52
|
+
age: 20
|
|
53
|
+
address: Shanghai
|
|
54
|
+
- key: 2
|
|
55
|
+
name: Lucy
|
|
56
|
+
age: 16
|
|
57
|
+
address: Yunnan
|
|
58
|
+
- key: 3
|
|
59
|
+
name: Sam
|
|
60
|
+
age: 28
|
|
61
|
+
address: Guangzhou
|
|
62
|
+
- key: 4
|
|
63
|
+
name: Bob
|
|
64
|
+
age: 35
|
|
65
|
+
address: Hainan
|
|
66
|
+
- key: 5
|
|
67
|
+
name: Ava
|
|
68
|
+
age: 23
|
|
69
|
+
address: Beijing
|
|
70
|
+
- key: 6
|
|
71
|
+
name: Sophia
|
|
72
|
+
age: 20
|
|
73
|
+
address: Shanghai
|
|
74
|
+
- key: 7
|
|
75
|
+
name: Charlotte
|
|
76
|
+
age: 33
|
|
77
|
+
address: Chongqing
|
|
78
|
+
- key: 8
|
|
79
|
+
name: Mia
|
|
80
|
+
age: 18
|
|
81
|
+
address: Chengdu
|
|
82
|
+
- key: 9
|
|
83
|
+
name: Noah
|
|
84
|
+
age: 38
|
|
85
|
+
address: Hainan
|
|
86
|
+
- key: 10
|
|
87
|
+
name: William
|
|
88
|
+
age: 16
|
|
89
|
+
address: Taiwan
|
|
90
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/advanced",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/basic",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"postpublish": "mv package.json.bak package.json"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@next-core/build-next-bricks": "^1.14.
|
|
38
|
-
"@next-core/test-next": "^1.0.
|
|
37
|
+
"@next-core/build-next-bricks": "^1.14.2",
|
|
38
|
+
"@next-core/test-next": "^1.0.10"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a939268174b36bf2fcb9e27d86f9b15f3773d0ea"
|
|
41
41
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[3458,8691],{3458:(e,t,r)=>{function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(o,a){if("string"==typeof t?o.name===t:t.includes(o.name)){for(var i=[],s=1;s<=r;s++){var c=a[a.length-s];if("MemberExpression"===(null==c?void 0:c.node.type)&&"object"===c.key){var u=c.node;u.computed||"Identifier"!==u.property.type?u.computed&&"Literal"===u.property.type&&"string"==typeof u.property.value?i.push(n?"".concat(o.name,".").concat(u.property.value):u.property.value):e.hasNonStaticUsage=!0:i.push(n?"".concat(o.name,".").concat(u.property.name):u.property.name)}else e.hasNonStaticUsage=!0}i.length===r&&e.usedProperties.add(i.join("."))}}}function o(e,t){return function(r,n,o){if(n.name===e){var a=o[o.length-1],i=o[o.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==a?void 0:a.node.type)&&"object"===a.key&&(a.node.computed?"Literal"===a.node.property.type&&a.node.property.value===t:"Identifier"===a.node.property.type&&a.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var c=s[0];"Literal"===c.type&&"string"==typeof c.value?r.usedArgs.add(c.value):r.hasNonStaticUsage=!0}}}}}r.r(t),r.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>a,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>h,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>m,strictCollectMemberUsage:()=>l,strictCollectMemberUsageInFunction:()=>g,track:()=>d,trackAll:()=>f,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>y,traverseStoryboardFunctions:()=>v,unwrapProvider:()=>c.unwrapProvider});var a=o("APP","getMenu"),i=o("INSTALLED_APPS","has"),s=r(231),c=r(628);function u(e,t,r){var n=new WeakSet,{matchExpressionString:o,visitNotMatchedExpressionString:a,visitNonExpressionString:i,visitObject:u}="string"==typeof r?{matchExpressionString:e=>e.includes(r)}:r;!function e(r){if("string"==typeof r)if((0,s.isEvaluable)(r))if(o(r))try{(0,s.preevaluate)(r,{withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,r)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==a||a(r);else null==i||i(r);else if((0,c.isObject)(r)){if(n.has(r))return;for(var l of(n.add(r),null==u||u(r),Array.isArray(r)?r:Object.values(r)))e(l)}}(e)}function l(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,nonStaticUsage:o,usedProperties:a}=p(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your expression: "').concat(o,'"'));return a}function p(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={usedProperties:new Set,hasNonStaticUsage:!1},a=n(o,t,r);return u(e,((e,t,r)=>{a(e,t),o.hasNonStaticUsage&&(o.nonStaticUsage=r)}),t),o}function d(e,t,r){if(e.includes(t)){var o,a={usedProperties:new Set,hasNonStaticUsage:!1},{expression:i}=(0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(a,r)}});if("SequenceExpression"===i.type&&(o=i.expressions[0])&&"Literal"===o.type&&o.value===t){if(a.usedProperties.size>0)return a.usedProperties;console.warn('You are using "'.concat(t,'" but no `').concat(r,"` usage found in your expression: ").concat(JSON.stringify(e)))}}return!1}function f(e){if(e){var t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(t,["CTX","STATE","FORM_STATE"],1,!0)}}),t.usedProperties.size>0){var r=[...t.usedProperties],o={context:!1,state:!1,formState:!1},a={CTX:"context",STATE:"state",FORM_STATE:"formState"};return r.forEach((e=>{var[t,r]=e.split(".");o[a[t]]||(o[a[t]]=[]),o[a[t]].push(r)})),o}console.warn('You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: '.concat(JSON.stringify(e)))}return!1}function v(e,t){if(Array.isArray(e))for(var r of e)y(r,t)}function y(e,t){try{(0,s.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t}})}catch(t){console.error('Parse storyboard function "'.concat(e.name,'" failed:'),t)}}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,usedProperties:o}=h(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your function: "').concat(e.name,'"'));return o}function h(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={usedProperties:new Set,hasNonStaticUsage:!1};return y(e,n(o,t,r)),o.usedProperties.delete(e.name),o}var S="PERMISSIONS",b="check";function m(e){var t,r=new Set,n=k(r),{customTemplates:o,functions:a}=null!==(t=e.meta)&&void 0!==t?t:{};return u([e.routes,o],n,S),v(a,n),Array.from(r)}function P(e){var t=new Set;return u(e,k(t),S),Array.from(t)}function k(e){return function(t,r){if(t.name===S){var n=r[r.length-1],o=r[r.length-2];if("CallExpression"===(null==o?void 0:o.node.type)&&"callee"===(null==o?void 0:o.key)&&"MemberExpression"===(null==n?void 0:n.node.type)&&"object"===n.key&&(n.node.computed?"Literal"===n.node.property.type&&n.node.property.value===b:"Identifier"===n.node.property.type&&n.node.property.name===b))for(var a of o.node.arguments)"Literal"===a.type&&"string"==typeof a.value&&e.add(a.value)}}}}}]);
|
|
2
|
-
//# sourceMappingURL=3458.f240a91c.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/3458.f240a91c.js","mappings":"mIAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAE9F,IADA,IAAIE,EAAW,GACNC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,IAAIC,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CCpBA,IAAIkG,EAAc,cACdC,EAAQ,QACL,SAASC,EAAkCC,GAChD,IAAIC,EACAC,EAAa,IAAIxC,IACjByC,EAAyBC,EAA8BF,IACvD,gBACFG,EAAe,UACfjB,GAC2C,QAAxCa,EAAmBD,EAAWM,YAAuC,IAArBL,EAA8BA,EAAmB,CAAC,EAGvG,OAFApE,EAA8B,CAACmE,EAAWO,OAAQF,GAAkBF,EAAwBN,GAC5FV,EAA4BC,EAAWe,GAChCjD,MAAMsD,KAAKN,EACpB,CACO,SAASO,EAA2B3E,GACzC,IAAIoE,EAAa,IAAIxC,IAErB,OADA7B,EAA8BC,EAAMsE,EAA8BF,GAAaL,GACxE3C,MAAMsD,KAAKN,EACpB,CACA,SAASE,EAA8BF,GACrC,OAAO,SAAgChG,EAAMC,GAC3C,GAAID,EAAKE,OAASyF,EAAa,CAC7B,IAAIrF,EAAeL,EAAOA,EAAOJ,OAAS,GACtCwB,EAAapB,EAAOA,EAAOJ,OAAS,GACxC,GAAuF,oBAAlFwB,aAA+C,EAASA,EAAWrB,KAAKO,OAA2G,YAA5Ec,aAA+C,EAASA,EAAWb,MAA8G,sBAAxFF,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUgF,EAA4C,eAApCtF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS0F,GACtiB,IAAK,IAAIY,KAAOnF,EAAWrB,KAAKJ,UACb,YAAb4G,EAAIjG,MAA2C,iBAAdiG,EAAI5F,OACvCoF,EAAW/E,IAAIuF,EAAI5F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n var segments = [];\n for (var i = 1; i <= level; i++) {\n var memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n var memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? \"\".concat(node.name, \".\").concat(memberNode.property.name) : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? \"\".concat(node.name, \".\").concat(memberNode.property.value) : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n var memberParent = parent[parent.length - 1];\n var callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n var args = callParent.node.arguments;\n if (args.length > 0) {\n var firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport var collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport var collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n var memo = new WeakSet();\n var {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (var item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(\"Non-static usage of \".concat(objectName, \" is prohibited, check your expression: \\\"\").concat(nonStaticUsage, \"\\\"\"));\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n var beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n var usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n var {\n expression\n } = preevaluate(raw, {\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n var trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(\"You are using \\\"\".concat(trackText, \"\\\" but no `\").concat(variableName, \"` usage found in your expression: \").concat(JSON.stringify(raw)));\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n if (raw) {\n var usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, [\"CTX\", \"STATE\", \"FORM_STATE\"], 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n var usedProperites = [...usage.usedProperties];\n var result = {\n context: false,\n state: false,\n formState: false\n };\n var keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperites.forEach(item => {\n var [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(\"You are using track all but no \\\"CTX\\\" or \\\"STATE\\\" or \\\"FORM_STATE\\\" usage found in your expression: \".concat(JSON.stringify(raw)));\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal) {\n if (Array.isArray(functions)) {\n for (var fn of functions) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard function \\\"\".concat(fn.name, \"\\\" failed:\"), error);\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function strictCollectMemberUsageInFunction(fn, objectName) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var {\n hasNonStaticUsage,\n usedProperties\n } = collectMemberUsageInFunction(fn, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(\"Non-static usage of \".concat(objectName, \" is prohibited, check your function: \\\"\").concat(fn.name, \"\\\"\"));\n }\n return usedProperties;\n}\nexport function collectMemberUsageInFunction(fn, objectName) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level));\n usage.usedProperties.delete(fn.name);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nvar PERMISSIONS = \"PERMISSIONS\";\nvar check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n var collection = new Set();\n var beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n var {\n customTemplates,\n functions\n } = (_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 ? _storyboard$meta : {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions);\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n var collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n var memberParent = parent[parent.length - 1];\n var callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (var arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","concat","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","track","raw","trackText","variableName","trackCtxExp","expression","expressions","size","warn","JSON","stringify","trackAll","usedProperites","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","traverseStoryboardFunction","precookFunction","source","typescript","strictCollectMemberUsageInFunction","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","_storyboard$meta","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[5381],{6660:(e,r,t)=>{t.r(r),t.d(r,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>s,useCurrentApp:()=>_,useCurrentTheme:()=>o,useRecentApps:()=>v,useRouteRender:()=>f});var n,a=t(4795),u=t(8657),i=t(2835),c=function(e){var{useBrick:r,data:t}=e,[n,c]=(0,u.useState)(null),s=(0,u.useRef)(),[l,d]=(0,u.useState)(),o=(0,u.useRef)(0),v=(0,u.useMemo)((()=>{var e;return null===(e=i.__secret_internals.getRenderId)||void 0===e?void 0:e.call(i.__secret_internals)}),[]);(0,u.useEffect)((()=>{function e(){return e=(0,a.Z)((function*(){try{c(yield i.__secret_internals.renderUseBrick(r,t)),d(++o.current)}catch(e){(function(e){var r,t=null===(r=i.__secret_internals.getRenderId)||void 0===r?void 0:r.call(i.__secret_internals);return!e||!t||e===t})(v)&&(console.error("Render useBrick failed:",r,"with data:",t),(0,i.handleHttpError)(e))}})),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[t,r,v]);var _=(0,u.useCallback)((e=>{e?s.current=i.__secret_internals.mountUseBrick(n,e):(i.__secret_internals.unmountUseBrick(n,s.current),s.current=void 0)}),[n]);if(!n)return null;var{tagName:f}=n;if(null===f)return null;var p=f;return u.createElement(p,{key:l,ref:_})},s=function(e){var{useBrick:r,data:t}=e;return Array.isArray(r)?u.createElement(u.Fragment,null,r.map(((e,r)=>u.createElement(c,{key:r,useBrick:e,data:t})))):u.createElement(c,{useBrick:r,data:t})};if(window.dll&&null!==(n=window.BRICK_NEXT_VERSIONS)&&void 0!==n&&null!==(n=n["brick-container"])&&void 0!==n&&n.startsWith("2.")){var{SingleBrickAsComponentFactory:l,BrickAsComponentFactory:d}=window.dll("tYg3");l&&d&&(c=l(u),s=d(u))}function o(){var[e,r]=(0,u.useState)(i.getCurrentTheme);return(0,u.useEffect)((()=>{var e=e=>{r(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function v(){var[e,r]=u.useState((()=>(0,i.getRuntime)().getRecentApps()));return u.useEffect((()=>{var e=e=>{r(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function _(){return v().currentApp}function f(){var[e,r]=u.useState(null);return u.useEffect((()=>{var e=e=>{r(e.detail)};return window.addEventListener("route.render",e),()=>window.removeEventListener("route.render",e)}),[]),e}}}]);
|
|
2
|
-
//# sourceMappingURL=5381.aa23ca81.js.map
|