@next-bricks/presentational 1.13.5 → 1.13.7
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 +15 -15
- package/dist/chunks/{3171.f590784a.js → 3171.7eec4d0e.js} +2 -2
- package/dist/chunks/{5552.cb20f8c5.js.map → 3171.7eec4d0e.js.map} +1 -1
- package/dist/chunks/4765.7caab1b7.js +2 -0
- package/dist/chunks/4765.7caab1b7.js.map +1 -0
- package/dist/chunks/4837.dc61e345.js.map +1 -1
- package/dist/chunks/{5552.cb20f8c5.js → 5552.b5b305ad.js} +2 -2
- package/dist/chunks/{3171.f590784a.js.map → 5552.b5b305ad.js.map} +1 -1
- package/dist/chunks/7082.a9acf3cf.js +2 -0
- package/dist/chunks/7082.a9acf3cf.js.map +1 -0
- package/dist/chunks/7146.ab0a875a.js +2 -0
- package/dist/chunks/7146.ab0a875a.js.map +1 -0
- package/dist/chunks/7218.0fbf3fe9.js.map +1 -1
- package/dist/chunks/{8097.f48a66dc.js → 8097.104151cc.js} +2 -2
- package/dist/chunks/{8097.f48a66dc.js.map → 8097.104151cc.js.map} +1 -1
- package/dist/chunks/9140.52496c3b.js +3 -0
- package/dist/chunks/9140.52496c3b.js.map +1 -0
- package/dist/chunks/eo-card-item.07eca103.js +3 -0
- package/dist/chunks/{eo-card-item.22045fe8.js.map → eo-card-item.07eca103.js.map} +1 -1
- package/dist/chunks/{eo-code-display.c96366aa.js → eo-code-display.a2f437a1.js} +2 -2
- package/dist/chunks/{eo-code-display.c96366aa.js.map → eo-code-display.a2f437a1.js.map} +1 -1
- package/dist/chunks/eo-descriptions.f0e348c5.js +3 -0
- package/dist/chunks/eo-descriptions.f0e348c5.js.map +1 -0
- package/dist/chunks/{eo-humanize-time.0bca81b4.js → eo-humanize-time.e72be368.js} +2 -2
- package/dist/chunks/{eo-humanize-time.0bca81b4.js.map → eo-humanize-time.e72be368.js.map} +1 -1
- package/dist/chunks/{eo-info-card-item.3d8f762f.js → eo-info-card-item.67c26e5b.js} +3 -3
- package/dist/chunks/{eo-info-card-item.3d8f762f.js.map → eo-info-card-item.67c26e5b.js.map} +1 -1
- package/dist/chunks/{eo-loading-step.a646bbfd.js → eo-loading-step.c669c966.js} +3 -3
- package/dist/chunks/{eo-loading-step.a646bbfd.js.map → eo-loading-step.c669c966.js.map} +1 -1
- package/dist/chunks/{eo-pagination.3cc8c286.js → eo-pagination.beb1a80d.js} +3 -3
- package/dist/chunks/{eo-pagination.3cc8c286.js.map → eo-pagination.beb1a80d.js.map} +1 -1
- package/dist/chunks/main.4fc66c9b.js +2 -0
- package/dist/chunks/main.4fc66c9b.js.map +1 -0
- package/dist/examples.json +9 -9
- package/dist/index.bb8f8737.js +2 -0
- package/dist/index.bb8f8737.js.map +1 -0
- package/dist/manifest.json +148 -143
- package/dist/types.json +199 -183
- package/dist-types/descriptions/index.d.ts +3 -0
- package/docs/eo-descriptions.md +25 -0
- package/package.json +2 -2
- package/dist/chunks/3933.64cbd609.js +0 -2
- package/dist/chunks/3933.64cbd609.js.map +0 -1
- package/dist/chunks/6314.f0e17bd7.js +0 -2
- package/dist/chunks/6314.f0e17bd7.js.map +0 -1
- package/dist/chunks/7082.ff332c51.js +0 -2
- package/dist/chunks/7082.ff332c51.js.map +0 -1
- package/dist/chunks/9140.a5160608.js +0 -3
- package/dist/chunks/9140.a5160608.js.map +0 -1
- package/dist/chunks/eo-card-item.22045fe8.js +0 -3
- package/dist/chunks/eo-descriptions.ef1ece9b.js +0 -3
- package/dist/chunks/eo-descriptions.ef1ece9b.js.map +0 -1
- package/dist/chunks/main.f3cf3a33.js +0 -2
- package/dist/chunks/main.f3cf3a33.js.map +0 -1
- package/dist/index.9ec9a507.js +0 -2
- package/dist/index.9ec9a507.js.map +0 -1
- /package/dist/chunks/{9140.a5160608.js.LICENSE.txt → 9140.52496c3b.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-card-item.22045fe8.js.LICENSE.txt → eo-card-item.07eca103.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-descriptions.ef1ece9b.js.LICENSE.txt → eo-descriptions.f0e348c5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-info-card-item.3d8f762f.js.LICENSE.txt → eo-info-card-item.67c26e5b.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-loading-step.a646bbfd.js.LICENSE.txt → eo-loading-step.c669c966.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-pagination.3cc8c286.js.LICENSE.txt → eo-pagination.beb1a80d.js.LICENSE.txt} +0 -0
package/dist/types.json
CHANGED
|
@@ -93,6 +93,22 @@
|
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "themeVariant",
|
|
99
|
+
"annotation": {
|
|
100
|
+
"type": "union",
|
|
101
|
+
"types": [
|
|
102
|
+
{
|
|
103
|
+
"type": "jsLiteral",
|
|
104
|
+
"value": "default"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "jsLiteral",
|
|
108
|
+
"value": "elevo"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
96
112
|
}
|
|
97
113
|
],
|
|
98
114
|
"events": [],
|
|
@@ -1018,115 +1034,6 @@
|
|
|
1018
1034
|
}
|
|
1019
1035
|
]
|
|
1020
1036
|
},
|
|
1021
|
-
"eo-loading-step": {
|
|
1022
|
-
"properties": [
|
|
1023
|
-
{
|
|
1024
|
-
"name": "visible",
|
|
1025
|
-
"annotation": {
|
|
1026
|
-
"type": "keyword",
|
|
1027
|
-
"value": "boolean"
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
"name": "width",
|
|
1032
|
-
"annotation": {
|
|
1033
|
-
"type": "keyword",
|
|
1034
|
-
"value": "string"
|
|
1035
|
-
}
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
"name": "stepTitle",
|
|
1039
|
-
"annotation": {
|
|
1040
|
-
"type": "keyword",
|
|
1041
|
-
"value": "string"
|
|
1042
|
-
}
|
|
1043
|
-
},
|
|
1044
|
-
{
|
|
1045
|
-
"name": "stepList",
|
|
1046
|
-
"annotation": {
|
|
1047
|
-
"type": "array",
|
|
1048
|
-
"elementType": {
|
|
1049
|
-
"type": "reference",
|
|
1050
|
-
"typeName": {
|
|
1051
|
-
"type": "identifier",
|
|
1052
|
-
"name": "StepItem"
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
"name": "curStep",
|
|
1059
|
-
"annotation": {
|
|
1060
|
-
"type": "keyword",
|
|
1061
|
-
"value": "string"
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
],
|
|
1065
|
-
"events": [
|
|
1066
|
-
{
|
|
1067
|
-
"name": "open",
|
|
1068
|
-
"detail": {
|
|
1069
|
-
"annotation": {
|
|
1070
|
-
"type": "keyword",
|
|
1071
|
-
"value": "void"
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
"name": "close",
|
|
1077
|
-
"detail": {
|
|
1078
|
-
"annotation": {
|
|
1079
|
-
"type": "keyword",
|
|
1080
|
-
"value": "void"
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
],
|
|
1085
|
-
"methods": [
|
|
1086
|
-
{
|
|
1087
|
-
"name": "open",
|
|
1088
|
-
"params": [],
|
|
1089
|
-
"returns": {}
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
"name": "close",
|
|
1093
|
-
"params": [],
|
|
1094
|
-
"returns": {}
|
|
1095
|
-
}
|
|
1096
|
-
],
|
|
1097
|
-
"types": [
|
|
1098
|
-
{
|
|
1099
|
-
"type": "interface",
|
|
1100
|
-
"name": "StepItem",
|
|
1101
|
-
"body": [
|
|
1102
|
-
{
|
|
1103
|
-
"type": "propertySignature",
|
|
1104
|
-
"key": {
|
|
1105
|
-
"type": "identifier",
|
|
1106
|
-
"name": "title"
|
|
1107
|
-
},
|
|
1108
|
-
"annotation": {
|
|
1109
|
-
"type": "keyword",
|
|
1110
|
-
"value": "string"
|
|
1111
|
-
},
|
|
1112
|
-
"computed": false
|
|
1113
|
-
},
|
|
1114
|
-
{
|
|
1115
|
-
"type": "propertySignature",
|
|
1116
|
-
"key": {
|
|
1117
|
-
"type": "identifier",
|
|
1118
|
-
"name": "key"
|
|
1119
|
-
},
|
|
1120
|
-
"annotation": {
|
|
1121
|
-
"type": "keyword",
|
|
1122
|
-
"value": "string"
|
|
1123
|
-
},
|
|
1124
|
-
"computed": false
|
|
1125
|
-
}
|
|
1126
|
-
]
|
|
1127
|
-
}
|
|
1128
|
-
]
|
|
1129
|
-
},
|
|
1130
1037
|
"eo-statistics-card": {
|
|
1131
1038
|
"properties": [
|
|
1132
1039
|
{
|
|
@@ -1480,76 +1387,114 @@
|
|
|
1480
1387
|
}
|
|
1481
1388
|
]
|
|
1482
1389
|
},
|
|
1483
|
-
"eo-
|
|
1390
|
+
"eo-loading-step": {
|
|
1484
1391
|
"properties": [
|
|
1485
1392
|
{
|
|
1486
|
-
"name": "
|
|
1393
|
+
"name": "visible",
|
|
1487
1394
|
"annotation": {
|
|
1488
1395
|
"type": "keyword",
|
|
1489
|
-
"value": "
|
|
1396
|
+
"value": "boolean"
|
|
1490
1397
|
}
|
|
1491
1398
|
},
|
|
1492
1399
|
{
|
|
1493
|
-
"name": "
|
|
1400
|
+
"name": "width",
|
|
1494
1401
|
"annotation": {
|
|
1495
|
-
"type": "
|
|
1496
|
-
"
|
|
1497
|
-
"type": "reference",
|
|
1498
|
-
"typeName": {
|
|
1499
|
-
"type": "identifier",
|
|
1500
|
-
"name": "CSSProperties"
|
|
1501
|
-
}
|
|
1502
|
-
},
|
|
1503
|
-
"indexType": {
|
|
1504
|
-
"type": "jsLiteral",
|
|
1505
|
-
"value": "width"
|
|
1506
|
-
}
|
|
1402
|
+
"type": "keyword",
|
|
1403
|
+
"value": "string"
|
|
1507
1404
|
}
|
|
1508
1405
|
},
|
|
1509
1406
|
{
|
|
1510
|
-
"name": "
|
|
1407
|
+
"name": "stepTitle",
|
|
1511
1408
|
"annotation": {
|
|
1512
|
-
"type": "
|
|
1513
|
-
"
|
|
1514
|
-
"type": "reference",
|
|
1515
|
-
"typeName": {
|
|
1516
|
-
"type": "identifier",
|
|
1517
|
-
"name": "CSSProperties"
|
|
1518
|
-
}
|
|
1519
|
-
},
|
|
1520
|
-
"indexType": {
|
|
1521
|
-
"type": "jsLiteral",
|
|
1522
|
-
"value": "fontSize"
|
|
1523
|
-
}
|
|
1409
|
+
"type": "keyword",
|
|
1410
|
+
"value": "string"
|
|
1524
1411
|
}
|
|
1525
1412
|
},
|
|
1526
1413
|
{
|
|
1527
|
-
"name": "
|
|
1414
|
+
"name": "stepList",
|
|
1528
1415
|
"annotation": {
|
|
1529
|
-
"type": "
|
|
1530
|
-
"
|
|
1416
|
+
"type": "array",
|
|
1417
|
+
"elementType": {
|
|
1531
1418
|
"type": "reference",
|
|
1532
1419
|
"typeName": {
|
|
1533
1420
|
"type": "identifier",
|
|
1534
|
-
"name": "
|
|
1421
|
+
"name": "StepItem"
|
|
1535
1422
|
}
|
|
1536
|
-
},
|
|
1537
|
-
"indexType": {
|
|
1538
|
-
"type": "jsLiteral",
|
|
1539
|
-
"value": "color"
|
|
1540
1423
|
}
|
|
1541
1424
|
}
|
|
1542
1425
|
},
|
|
1543
1426
|
{
|
|
1544
|
-
"name": "
|
|
1427
|
+
"name": "curStep",
|
|
1545
1428
|
"annotation": {
|
|
1546
1429
|
"type": "keyword",
|
|
1547
|
-
"value": "
|
|
1430
|
+
"value": "string"
|
|
1548
1431
|
}
|
|
1549
1432
|
}
|
|
1550
1433
|
],
|
|
1551
|
-
"events": [
|
|
1552
|
-
|
|
1434
|
+
"events": [
|
|
1435
|
+
{
|
|
1436
|
+
"name": "open",
|
|
1437
|
+
"detail": {
|
|
1438
|
+
"annotation": {
|
|
1439
|
+
"type": "keyword",
|
|
1440
|
+
"value": "void"
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"name": "close",
|
|
1446
|
+
"detail": {
|
|
1447
|
+
"annotation": {
|
|
1448
|
+
"type": "keyword",
|
|
1449
|
+
"value": "void"
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
],
|
|
1454
|
+
"methods": [
|
|
1455
|
+
{
|
|
1456
|
+
"name": "open",
|
|
1457
|
+
"params": [],
|
|
1458
|
+
"returns": {}
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"name": "close",
|
|
1462
|
+
"params": [],
|
|
1463
|
+
"returns": {}
|
|
1464
|
+
}
|
|
1465
|
+
],
|
|
1466
|
+
"types": [
|
|
1467
|
+
{
|
|
1468
|
+
"type": "interface",
|
|
1469
|
+
"name": "StepItem",
|
|
1470
|
+
"body": [
|
|
1471
|
+
{
|
|
1472
|
+
"type": "propertySignature",
|
|
1473
|
+
"key": {
|
|
1474
|
+
"type": "identifier",
|
|
1475
|
+
"name": "title"
|
|
1476
|
+
},
|
|
1477
|
+
"annotation": {
|
|
1478
|
+
"type": "keyword",
|
|
1479
|
+
"value": "string"
|
|
1480
|
+
},
|
|
1481
|
+
"computed": false
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"type": "propertySignature",
|
|
1485
|
+
"key": {
|
|
1486
|
+
"type": "identifier",
|
|
1487
|
+
"name": "key"
|
|
1488
|
+
},
|
|
1489
|
+
"annotation": {
|
|
1490
|
+
"type": "keyword",
|
|
1491
|
+
"value": "string"
|
|
1492
|
+
},
|
|
1493
|
+
"computed": false
|
|
1494
|
+
}
|
|
1495
|
+
]
|
|
1496
|
+
}
|
|
1497
|
+
]
|
|
1553
1498
|
},
|
|
1554
1499
|
"eo-current-time": {
|
|
1555
1500
|
"properties": [
|
|
@@ -1574,63 +1519,72 @@
|
|
|
1574
1519
|
"events": [],
|
|
1575
1520
|
"methods": []
|
|
1576
1521
|
},
|
|
1577
|
-
"eo-
|
|
1522
|
+
"eo-carousel-text": {
|
|
1578
1523
|
"properties": [
|
|
1579
1524
|
{
|
|
1580
|
-
"name": "
|
|
1525
|
+
"name": "text",
|
|
1581
1526
|
"annotation": {
|
|
1582
1527
|
"type": "keyword",
|
|
1583
1528
|
"value": "string"
|
|
1584
1529
|
}
|
|
1585
1530
|
},
|
|
1586
1531
|
{
|
|
1587
|
-
"name": "
|
|
1532
|
+
"name": "containerWidth",
|
|
1588
1533
|
"annotation": {
|
|
1589
|
-
"type": "
|
|
1590
|
-
"
|
|
1534
|
+
"type": "indexedAccess",
|
|
1535
|
+
"objectType": {
|
|
1536
|
+
"type": "reference",
|
|
1537
|
+
"typeName": {
|
|
1538
|
+
"type": "identifier",
|
|
1539
|
+
"name": "CSSProperties"
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
"indexType": {
|
|
1543
|
+
"type": "jsLiteral",
|
|
1544
|
+
"value": "width"
|
|
1545
|
+
}
|
|
1591
1546
|
}
|
|
1592
1547
|
},
|
|
1593
1548
|
{
|
|
1594
|
-
"name": "
|
|
1549
|
+
"name": "fontSize",
|
|
1595
1550
|
"annotation": {
|
|
1596
|
-
"type": "
|
|
1597
|
-
"
|
|
1551
|
+
"type": "indexedAccess",
|
|
1552
|
+
"objectType": {
|
|
1553
|
+
"type": "reference",
|
|
1554
|
+
"typeName": {
|
|
1555
|
+
"type": "identifier",
|
|
1556
|
+
"name": "CSSProperties"
|
|
1557
|
+
}
|
|
1558
|
+
},
|
|
1559
|
+
"indexType": {
|
|
1560
|
+
"type": "jsLiteral",
|
|
1561
|
+
"value": "fontSize"
|
|
1562
|
+
}
|
|
1598
1563
|
}
|
|
1599
1564
|
},
|
|
1600
1565
|
{
|
|
1601
|
-
"name": "
|
|
1566
|
+
"name": "fontColor",
|
|
1602
1567
|
"annotation": {
|
|
1603
|
-
"type": "
|
|
1604
|
-
"
|
|
1568
|
+
"type": "indexedAccess",
|
|
1569
|
+
"objectType": {
|
|
1570
|
+
"type": "reference",
|
|
1571
|
+
"typeName": {
|
|
1572
|
+
"type": "identifier",
|
|
1573
|
+
"name": "CSSProperties"
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
"indexType": {
|
|
1577
|
+
"type": "jsLiteral",
|
|
1578
|
+
"value": "color"
|
|
1579
|
+
}
|
|
1605
1580
|
}
|
|
1606
1581
|
},
|
|
1607
1582
|
{
|
|
1608
|
-
"name": "
|
|
1583
|
+
"name": "speed",
|
|
1609
1584
|
"annotation": {
|
|
1610
1585
|
"type": "keyword",
|
|
1611
1586
|
"value": "number"
|
|
1612
1587
|
}
|
|
1613
|
-
},
|
|
1614
|
-
{
|
|
1615
|
-
"name": "showCopyButton",
|
|
1616
|
-
"annotation": {
|
|
1617
|
-
"type": "keyword",
|
|
1618
|
-
"value": "boolean"
|
|
1619
|
-
}
|
|
1620
|
-
},
|
|
1621
|
-
{
|
|
1622
|
-
"name": "showExportButton",
|
|
1623
|
-
"annotation": {
|
|
1624
|
-
"type": "keyword",
|
|
1625
|
-
"value": "boolean"
|
|
1626
|
-
}
|
|
1627
|
-
},
|
|
1628
|
-
{
|
|
1629
|
-
"name": "exportFileName",
|
|
1630
|
-
"annotation": {
|
|
1631
|
-
"type": "keyword",
|
|
1632
|
-
"value": "string"
|
|
1633
|
-
}
|
|
1634
1588
|
}
|
|
1635
1589
|
],
|
|
1636
1590
|
"events": [],
|
|
@@ -1746,6 +1700,68 @@
|
|
|
1746
1700
|
}
|
|
1747
1701
|
]
|
|
1748
1702
|
},
|
|
1703
|
+
"eo-code-display": {
|
|
1704
|
+
"properties": [
|
|
1705
|
+
{
|
|
1706
|
+
"name": "value",
|
|
1707
|
+
"annotation": {
|
|
1708
|
+
"type": "keyword",
|
|
1709
|
+
"value": "string"
|
|
1710
|
+
}
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
"name": "language",
|
|
1714
|
+
"annotation": {
|
|
1715
|
+
"type": "keyword",
|
|
1716
|
+
"value": "string"
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"name": "hideLineNumber",
|
|
1721
|
+
"annotation": {
|
|
1722
|
+
"type": "keyword",
|
|
1723
|
+
"value": "boolean"
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "maxLines",
|
|
1728
|
+
"annotation": {
|
|
1729
|
+
"type": "keyword",
|
|
1730
|
+
"value": "number"
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"name": "minLines",
|
|
1735
|
+
"annotation": {
|
|
1736
|
+
"type": "keyword",
|
|
1737
|
+
"value": "number"
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"name": "showCopyButton",
|
|
1742
|
+
"annotation": {
|
|
1743
|
+
"type": "keyword",
|
|
1744
|
+
"value": "boolean"
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"name": "showExportButton",
|
|
1749
|
+
"annotation": {
|
|
1750
|
+
"type": "keyword",
|
|
1751
|
+
"value": "boolean"
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"name": "exportFileName",
|
|
1756
|
+
"annotation": {
|
|
1757
|
+
"type": "keyword",
|
|
1758
|
+
"value": "string"
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
],
|
|
1762
|
+
"events": [],
|
|
1763
|
+
"methods": []
|
|
1764
|
+
},
|
|
1749
1765
|
"eo-pagination": {
|
|
1750
1766
|
"properties": [
|
|
1751
1767
|
{
|
|
@@ -20,6 +20,7 @@ export interface DescriptionsProps {
|
|
|
20
20
|
bordered?: boolean;
|
|
21
21
|
hideGroups?: string[] | string;
|
|
22
22
|
dataSource?: Record<string, unknown>;
|
|
23
|
+
themeVariant?: "default" | "elevo";
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* 通用描述列表构件
|
|
@@ -62,6 +63,8 @@ declare class Descriptions extends ReactNextElement {
|
|
|
62
63
|
* 数据源
|
|
63
64
|
*/
|
|
64
65
|
accessor dataSource: Record<string, unknown> | undefined;
|
|
66
|
+
/** 主题变体 */
|
|
67
|
+
accessor themeVariant: "default" | "elevo" | undefined;
|
|
65
68
|
render(): React.JSX.Element;
|
|
66
69
|
}
|
|
67
70
|
export declare function DescriptionsComponent(props: DescriptionsProps): React.JSX.Element;
|
package/docs/eo-descriptions.md
CHANGED
|
@@ -300,3 +300,28 @@
|
|
|
300
300
|
properties:
|
|
301
301
|
textContent: "<% DATA.text %>"
|
|
302
302
|
```
|
|
303
|
+
|
|
304
|
+
### Theme variant Elevo
|
|
305
|
+
|
|
306
|
+
```yaml preview
|
|
307
|
+
# Use this container to emulate background
|
|
308
|
+
brick: ai-portal.home-container
|
|
309
|
+
properties:
|
|
310
|
+
style:
|
|
311
|
+
padding: 2em
|
|
312
|
+
backgroundColor: "#d8d8d8"
|
|
313
|
+
children:
|
|
314
|
+
- brick: eo-descriptions
|
|
315
|
+
properties:
|
|
316
|
+
themeVariant: elevo
|
|
317
|
+
column: 1
|
|
318
|
+
list:
|
|
319
|
+
- label: 姓名
|
|
320
|
+
text: Tom
|
|
321
|
+
- label: 年龄
|
|
322
|
+
text: 18
|
|
323
|
+
- label: 身高
|
|
324
|
+
text: 180cm
|
|
325
|
+
- label: 爱好
|
|
326
|
+
text: 篮球
|
|
327
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/presentational",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.7",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/presentational",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@next-bricks/containers": "*",
|
|
45
45
|
"@next-bricks/icons": "*"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "7bd7b5838ad2cdc02c5f48c671eb37c2aef706b5"
|
|
48
48
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_presentational=globalThis.webpackChunk_next_bricks_presentational||[]).push([[3933,6314],{13933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>u,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>l,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(71321),c=o(56548);function l(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:l}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==l||l(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function u(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return l(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){var t;const o=new Set,n=k(o),{customTemplates:r,functions:s}=null!==(t=e.meta)&&void 0!==t?t:{};return l([e.routes,r],n,m),h(s,n,{matchSource:e=>e.includes(m)}),Array.from(o)}function P(e){const t=new Set;return l(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&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,sBAAxFF,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMY,KAAOvF,EAAWpB,KAAKJ,UACf,YAAb+G,EAAIpG,MAA2C,iBAAdoG,EAAI/F,OACvCuF,EAAWnF,IAAI2F,EAAI/F,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 let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let 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 const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${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 const memberParent = parent[parent.length - 1];\n const 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 const args = callParent.node.arguments;\n if (args.length > 0) {\n const 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 const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const 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 const memo = new WeakSet();\n const {\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 cache: true,\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 (const 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 let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const 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\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let 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 \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [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: ${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, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\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 matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const 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 const memberParent = parent[parent.length - 1];\n const 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 (const 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","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","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","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";(globalThis.webpackChunk_next_bricks_presentational=globalThis.webpackChunk_next_bricks_presentational||[]).push([[3933,6314],{13933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>u,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>l,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(71321),c=o(56548);function l(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:l}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==l||l(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function u(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return l(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){var t;const o=new Set,n=k(o),{customTemplates:r,functions:s}=null!==(t=e.meta)&&void 0!==t?t:{};return l([e.routes,r],n,m),h(s,n,{matchSource:e=>e.includes(m)}),Array.from(o)}function P(e){const t=new Set;return l(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
|
|
2
|
-
//# sourceMappingURL=6314.f0e17bd7.js.map
|
|
@@ -1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AAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMY,KAAOvF,EAAWpB,KAAKJ,UACf,YAAb+G,EAAIpG,MAA2C,iBAAdoG,EAAI/F,OACvCuF,EAAWnF,IAAI2F,EAAI/F,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 let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let 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 const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${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 const memberParent = parent[parent.length - 1];\n const 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 const args = callParent.node.arguments;\n if (args.length > 0) {\n const 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 const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const 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 const memo = new WeakSet();\n const {\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 cache: true,\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 (const 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 let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const 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\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let 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 \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [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: ${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, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n var _storyboard$meta;\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\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 matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const 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 const memberParent = parent[parent.length - 1];\n const 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 (const 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","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","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","_storyboard$meta","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
|