@next-bricks/data-view 0.15.4 → 0.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/bricks.json +5 -5
  2. package/dist/chunks/1874.00bcad23.js +2 -0
  3. package/dist/chunks/1874.00bcad23.js.map +1 -0
  4. package/dist/chunks/3914.b5986e17.js +2 -0
  5. package/dist/chunks/3914.b5986e17.js.map +1 -0
  6. package/dist/chunks/5151.1c92f05d.js +2 -0
  7. package/dist/chunks/5151.1c92f05d.js.map +1 -0
  8. package/dist/chunks/5202.ff1675ae.js +2 -0
  9. package/dist/chunks/5202.ff1675ae.js.map +1 -0
  10. package/dist/chunks/5381.8b6c0779.js +2 -0
  11. package/dist/chunks/5381.8b6c0779.js.map +1 -0
  12. package/dist/chunks/{6252.a408a0a3.js → 6252.d2312cb8.js} +2 -2
  13. package/dist/chunks/{6252.a408a0a3.js.map → 6252.d2312cb8.js.map} +1 -1
  14. package/dist/chunks/{6301.97e18ad8.js → 6301.60377e21.js} +2 -2
  15. package/dist/chunks/{6301.97e18ad8.js.map → 6301.60377e21.js.map} +1 -1
  16. package/dist/chunks/6653.1db188e5.js +2 -0
  17. package/dist/chunks/6653.1db188e5.js.map +1 -0
  18. package/dist/chunks/6660.a41a9b36.js +2 -0
  19. package/dist/chunks/6660.a41a9b36.js.map +1 -0
  20. package/dist/chunks/7782.ffdd10bd.js +2 -0
  21. package/dist/chunks/7782.ffdd10bd.js.map +1 -0
  22. package/dist/chunks/8498.8821e938.js +2 -0
  23. package/dist/chunks/8498.8821e938.js.map +1 -0
  24. package/dist/chunks/{complex-search.e46ab236.js → complex-search.1de3f6f5.js} +2 -2
  25. package/dist/chunks/{complex-search.e46ab236.js.map → complex-search.1de3f6f5.js.map} +1 -1
  26. package/dist/chunks/main.da0429e1.js +2 -0
  27. package/dist/chunks/main.da0429e1.js.map +1 -0
  28. package/dist/chunks/{modern-style-treemap.6dd5618b.js → modern-style-treemap.2efd3239.js} +3 -3
  29. package/dist/chunks/{modern-style-treemap.6dd5618b.js.map → modern-style-treemap.2efd3239.js.map} +1 -1
  30. package/dist/index.7971429f.js +2 -0
  31. package/dist/index.7971429f.js.map +1 -0
  32. package/dist/manifest.json +69 -69
  33. package/dist/types.json +199 -199
  34. package/package.json +3 -3
  35. package/dist/chunks/3494.2ac2c572.js +0 -2
  36. package/dist/chunks/3494.2ac2c572.js.map +0 -1
  37. package/dist/chunks/3914.738b0862.js +0 -2
  38. package/dist/chunks/3914.738b0862.js.map +0 -1
  39. package/dist/chunks/4454.2eeedfb4.js +0 -2
  40. package/dist/chunks/4454.2eeedfb4.js.map +0 -1
  41. package/dist/chunks/5151.ce644081.js +0 -2
  42. package/dist/chunks/5151.ce644081.js.map +0 -1
  43. package/dist/chunks/5202.3225e09f.js +0 -2
  44. package/dist/chunks/5202.3225e09f.js.map +0 -1
  45. package/dist/chunks/7782.cc445401.js +0 -2
  46. package/dist/chunks/7782.cc445401.js.map +0 -1
  47. package/dist/chunks/7822.aee914cb.js +0 -2
  48. package/dist/chunks/7822.aee914cb.js.map +0 -1
  49. package/dist/chunks/873.1d7a2495.js +0 -2
  50. package/dist/chunks/873.1d7a2495.js.map +0 -1
  51. package/dist/chunks/main.5699c5c3.js +0 -2
  52. package/dist/chunks/main.5699c5c3.js.map +0 -1
  53. package/dist/index.d0d9fc84.js +0 -2
  54. package/dist/index.d0d9fc84.js.map +0 -1
  55. /package/dist/chunks/{modern-style-treemap.6dd5618b.js.LICENSE.txt → modern-style-treemap.2efd3239.js.LICENSE.txt} +0 -0
@@ -914,53 +914,6 @@
914
914
  "parts": [],
915
915
  "description": ""
916
916
  },
917
- {
918
- "name": "data-view.grid-background",
919
- "properties": [
920
- {
921
- "name": "color",
922
- "description": "",
923
- "default": "\"#235F90\"",
924
- "attribute": false,
925
- "type": "React.CSSProperties[\"color\"]"
926
- },
927
- {
928
- "name": "maskStyle",
929
- "description": "",
930
- "attribute": false,
931
- "type": "React.CSSProperties"
932
- },
933
- {
934
- "name": "particleColor",
935
- "description": "",
936
- "default": "{\n startColor: \"#477AFFFF\",\n endColor: \"#5F83FF00\",\n }",
937
- "attribute": false,
938
- "type": "ParticleColor"
939
- }
940
- ],
941
- "events": [],
942
- "slots": [],
943
- "methods": [],
944
- "parts": [],
945
- "description": ""
946
- },
947
- {
948
- "name": "data-view.gear-background",
949
- "properties": [
950
- {
951
- "name": "color",
952
- "description": "",
953
- "default": "\"#3366FF\"",
954
- "attribute": false,
955
- "type": "React.CSSProperties[\"color\"]"
956
- }
957
- ],
958
- "events": [],
959
- "slots": [],
960
- "methods": [],
961
- "parts": [],
962
- "description": ""
963
- },
964
917
  {
965
918
  "name": "data-view.radar-chart",
966
919
  "properties": [
@@ -1137,28 +1090,6 @@
1137
1090
  "methods": [],
1138
1091
  "parts": []
1139
1092
  },
1140
- {
1141
- "name": "data-view.top-title-bar",
1142
- "properties": [
1143
- {
1144
- "name": "text",
1145
- "description": "标题文本",
1146
- "default": "-",
1147
- "type": "string"
1148
- },
1149
- {
1150
- "name": "type",
1151
- "description": "标题类型",
1152
- "default": "normal",
1153
- "type": "TitleBarType"
1154
- }
1155
- ],
1156
- "events": [],
1157
- "slots": [],
1158
- "methods": [],
1159
- "parts": [],
1160
- "description": "大屏标题栏三种样式构件"
1161
- },
1162
1093
  {
1163
1094
  "name": "data-view.lights-component-title",
1164
1095
  "properties": [
@@ -1227,6 +1158,75 @@
1227
1158
  "methods": [],
1228
1159
  "parts": [],
1229
1160
  "description": "大屏框架构件-网格纹"
1161
+ },
1162
+ {
1163
+ "name": "data-view.grid-background",
1164
+ "properties": [
1165
+ {
1166
+ "name": "color",
1167
+ "description": "",
1168
+ "default": "\"#235F90\"",
1169
+ "attribute": false,
1170
+ "type": "React.CSSProperties[\"color\"]"
1171
+ },
1172
+ {
1173
+ "name": "maskStyle",
1174
+ "description": "",
1175
+ "attribute": false,
1176
+ "type": "React.CSSProperties"
1177
+ },
1178
+ {
1179
+ "name": "particleColor",
1180
+ "description": "",
1181
+ "default": "{\n startColor: \"#477AFFFF\",\n endColor: \"#5F83FF00\",\n }",
1182
+ "attribute": false,
1183
+ "type": "ParticleColor"
1184
+ }
1185
+ ],
1186
+ "events": [],
1187
+ "slots": [],
1188
+ "methods": [],
1189
+ "parts": [],
1190
+ "description": ""
1191
+ },
1192
+ {
1193
+ "name": "data-view.top-title-bar",
1194
+ "properties": [
1195
+ {
1196
+ "name": "text",
1197
+ "description": "标题文本",
1198
+ "default": "-",
1199
+ "type": "string"
1200
+ },
1201
+ {
1202
+ "name": "type",
1203
+ "description": "标题类型",
1204
+ "default": "normal",
1205
+ "type": "TitleBarType"
1206
+ }
1207
+ ],
1208
+ "events": [],
1209
+ "slots": [],
1210
+ "methods": [],
1211
+ "parts": [],
1212
+ "description": "大屏标题栏三种样式构件"
1213
+ },
1214
+ {
1215
+ "name": "data-view.gear-background",
1216
+ "properties": [
1217
+ {
1218
+ "name": "color",
1219
+ "description": "",
1220
+ "default": "\"#3366FF\"",
1221
+ "attribute": false,
1222
+ "type": "React.CSSProperties[\"color\"]"
1223
+ }
1224
+ ],
1225
+ "events": [],
1226
+ "slots": [],
1227
+ "methods": [],
1228
+ "parts": [],
1229
+ "description": ""
1230
1230
  }
1231
1231
  ],
1232
1232
  "providers": []
package/dist/types.json CHANGED
@@ -1348,159 +1348,6 @@
1348
1348
  "events": [],
1349
1349
  "methods": []
1350
1350
  },
1351
- "data-view.grid-background": {
1352
- "properties": [
1353
- {
1354
- "name": "color",
1355
- "annotation": {
1356
- "type": "indexedAccess",
1357
- "objectType": {
1358
- "type": "reference",
1359
- "typeName": {
1360
- "type": "qualifiedName",
1361
- "left": {
1362
- "type": "identifier",
1363
- "name": "React"
1364
- },
1365
- "right": {
1366
- "type": "identifier",
1367
- "name": "CSSProperties"
1368
- }
1369
- }
1370
- },
1371
- "indexType": {
1372
- "type": "jsLiteral",
1373
- "value": "color"
1374
- }
1375
- }
1376
- },
1377
- {
1378
- "name": "maskStyle",
1379
- "annotation": {
1380
- "type": "reference",
1381
- "typeName": {
1382
- "type": "qualifiedName",
1383
- "left": {
1384
- "type": "identifier",
1385
- "name": "React"
1386
- },
1387
- "right": {
1388
- "type": "identifier",
1389
- "name": "CSSProperties"
1390
- }
1391
- }
1392
- }
1393
- },
1394
- {
1395
- "name": "particleColor",
1396
- "annotation": {
1397
- "type": "reference",
1398
- "typeName": {
1399
- "type": "identifier",
1400
- "name": "ParticleColor"
1401
- }
1402
- }
1403
- }
1404
- ],
1405
- "events": [],
1406
- "methods": [],
1407
- "types": [
1408
- {
1409
- "type": "interface",
1410
- "name": "ParticleColor",
1411
- "body": [
1412
- {
1413
- "type": "propertySignature",
1414
- "key": {
1415
- "type": "identifier",
1416
- "name": "startColor"
1417
- },
1418
- "annotation": {
1419
- "type": "indexedAccess",
1420
- "objectType": {
1421
- "type": "reference",
1422
- "typeName": {
1423
- "type": "qualifiedName",
1424
- "left": {
1425
- "type": "identifier",
1426
- "name": "React"
1427
- },
1428
- "right": {
1429
- "type": "identifier",
1430
- "name": "CSSProperties"
1431
- }
1432
- }
1433
- },
1434
- "indexType": {
1435
- "type": "jsLiteral",
1436
- "value": "color"
1437
- }
1438
- },
1439
- "computed": false
1440
- },
1441
- {
1442
- "type": "propertySignature",
1443
- "key": {
1444
- "type": "identifier",
1445
- "name": "endColor"
1446
- },
1447
- "annotation": {
1448
- "type": "indexedAccess",
1449
- "objectType": {
1450
- "type": "reference",
1451
- "typeName": {
1452
- "type": "qualifiedName",
1453
- "left": {
1454
- "type": "identifier",
1455
- "name": "React"
1456
- },
1457
- "right": {
1458
- "type": "identifier",
1459
- "name": "CSSProperties"
1460
- }
1461
- }
1462
- },
1463
- "indexType": {
1464
- "type": "jsLiteral",
1465
- "value": "color"
1466
- }
1467
- },
1468
- "computed": false
1469
- }
1470
- ]
1471
- }
1472
- ]
1473
- },
1474
- "data-view.gear-background": {
1475
- "properties": [
1476
- {
1477
- "name": "color",
1478
- "annotation": {
1479
- "type": "indexedAccess",
1480
- "objectType": {
1481
- "type": "reference",
1482
- "typeName": {
1483
- "type": "qualifiedName",
1484
- "left": {
1485
- "type": "identifier",
1486
- "name": "React"
1487
- },
1488
- "right": {
1489
- "type": "identifier",
1490
- "name": "CSSProperties"
1491
- }
1492
- }
1493
- },
1494
- "indexType": {
1495
- "type": "jsLiteral",
1496
- "value": "color"
1497
- }
1498
- }
1499
- }
1500
- ],
1501
- "events": [],
1502
- "methods": []
1503
- },
1504
1351
  "data-view.title-text": {
1505
1352
  "properties": [
1506
1353
  {
@@ -1692,52 +1539,6 @@
1692
1539
  }
1693
1540
  ]
1694
1541
  },
1695
- "data-view.top-title-bar": {
1696
- "properties": [
1697
- {
1698
- "name": "text",
1699
- "annotation": {
1700
- "type": "keyword",
1701
- "value": "string"
1702
- }
1703
- },
1704
- {
1705
- "name": "type",
1706
- "annotation": {
1707
- "type": "reference",
1708
- "typeName": {
1709
- "type": "identifier",
1710
- "name": "TitleBarType"
1711
- }
1712
- }
1713
- }
1714
- ],
1715
- "events": [],
1716
- "methods": [],
1717
- "types": [
1718
- {
1719
- "type": "typeAlias",
1720
- "name": "TitleBarType",
1721
- "annotation": {
1722
- "type": "union",
1723
- "types": [
1724
- {
1725
- "type": "jsLiteral",
1726
- "value": "normal"
1727
- },
1728
- {
1729
- "type": "jsLiteral",
1730
- "value": "sample"
1731
- },
1732
- {
1733
- "type": "jsLiteral",
1734
- "value": "square"
1735
- }
1736
- ]
1737
- }
1738
- }
1739
- ]
1740
- },
1741
1542
  "data-view.lights-component-title": {
1742
1543
  "properties": [
1743
1544
  {
@@ -1843,6 +1644,205 @@
1843
1644
  "events": [],
1844
1645
  "methods": []
1845
1646
  },
1647
+ "data-view.grid-background": {
1648
+ "properties": [
1649
+ {
1650
+ "name": "color",
1651
+ "annotation": {
1652
+ "type": "indexedAccess",
1653
+ "objectType": {
1654
+ "type": "reference",
1655
+ "typeName": {
1656
+ "type": "qualifiedName",
1657
+ "left": {
1658
+ "type": "identifier",
1659
+ "name": "React"
1660
+ },
1661
+ "right": {
1662
+ "type": "identifier",
1663
+ "name": "CSSProperties"
1664
+ }
1665
+ }
1666
+ },
1667
+ "indexType": {
1668
+ "type": "jsLiteral",
1669
+ "value": "color"
1670
+ }
1671
+ }
1672
+ },
1673
+ {
1674
+ "name": "maskStyle",
1675
+ "annotation": {
1676
+ "type": "reference",
1677
+ "typeName": {
1678
+ "type": "qualifiedName",
1679
+ "left": {
1680
+ "type": "identifier",
1681
+ "name": "React"
1682
+ },
1683
+ "right": {
1684
+ "type": "identifier",
1685
+ "name": "CSSProperties"
1686
+ }
1687
+ }
1688
+ }
1689
+ },
1690
+ {
1691
+ "name": "particleColor",
1692
+ "annotation": {
1693
+ "type": "reference",
1694
+ "typeName": {
1695
+ "type": "identifier",
1696
+ "name": "ParticleColor"
1697
+ }
1698
+ }
1699
+ }
1700
+ ],
1701
+ "events": [],
1702
+ "methods": [],
1703
+ "types": [
1704
+ {
1705
+ "type": "interface",
1706
+ "name": "ParticleColor",
1707
+ "body": [
1708
+ {
1709
+ "type": "propertySignature",
1710
+ "key": {
1711
+ "type": "identifier",
1712
+ "name": "startColor"
1713
+ },
1714
+ "annotation": {
1715
+ "type": "indexedAccess",
1716
+ "objectType": {
1717
+ "type": "reference",
1718
+ "typeName": {
1719
+ "type": "qualifiedName",
1720
+ "left": {
1721
+ "type": "identifier",
1722
+ "name": "React"
1723
+ },
1724
+ "right": {
1725
+ "type": "identifier",
1726
+ "name": "CSSProperties"
1727
+ }
1728
+ }
1729
+ },
1730
+ "indexType": {
1731
+ "type": "jsLiteral",
1732
+ "value": "color"
1733
+ }
1734
+ },
1735
+ "computed": false
1736
+ },
1737
+ {
1738
+ "type": "propertySignature",
1739
+ "key": {
1740
+ "type": "identifier",
1741
+ "name": "endColor"
1742
+ },
1743
+ "annotation": {
1744
+ "type": "indexedAccess",
1745
+ "objectType": {
1746
+ "type": "reference",
1747
+ "typeName": {
1748
+ "type": "qualifiedName",
1749
+ "left": {
1750
+ "type": "identifier",
1751
+ "name": "React"
1752
+ },
1753
+ "right": {
1754
+ "type": "identifier",
1755
+ "name": "CSSProperties"
1756
+ }
1757
+ }
1758
+ },
1759
+ "indexType": {
1760
+ "type": "jsLiteral",
1761
+ "value": "color"
1762
+ }
1763
+ },
1764
+ "computed": false
1765
+ }
1766
+ ]
1767
+ }
1768
+ ]
1769
+ },
1770
+ "data-view.top-title-bar": {
1771
+ "properties": [
1772
+ {
1773
+ "name": "text",
1774
+ "annotation": {
1775
+ "type": "keyword",
1776
+ "value": "string"
1777
+ }
1778
+ },
1779
+ {
1780
+ "name": "type",
1781
+ "annotation": {
1782
+ "type": "reference",
1783
+ "typeName": {
1784
+ "type": "identifier",
1785
+ "name": "TitleBarType"
1786
+ }
1787
+ }
1788
+ }
1789
+ ],
1790
+ "events": [],
1791
+ "methods": [],
1792
+ "types": [
1793
+ {
1794
+ "type": "typeAlias",
1795
+ "name": "TitleBarType",
1796
+ "annotation": {
1797
+ "type": "union",
1798
+ "types": [
1799
+ {
1800
+ "type": "jsLiteral",
1801
+ "value": "normal"
1802
+ },
1803
+ {
1804
+ "type": "jsLiteral",
1805
+ "value": "sample"
1806
+ },
1807
+ {
1808
+ "type": "jsLiteral",
1809
+ "value": "square"
1810
+ }
1811
+ ]
1812
+ }
1813
+ }
1814
+ ]
1815
+ },
1816
+ "data-view.gear-background": {
1817
+ "properties": [
1818
+ {
1819
+ "name": "color",
1820
+ "annotation": {
1821
+ "type": "indexedAccess",
1822
+ "objectType": {
1823
+ "type": "reference",
1824
+ "typeName": {
1825
+ "type": "qualifiedName",
1826
+ "left": {
1827
+ "type": "identifier",
1828
+ "name": "React"
1829
+ },
1830
+ "right": {
1831
+ "type": "identifier",
1832
+ "name": "CSSProperties"
1833
+ }
1834
+ }
1835
+ },
1836
+ "indexType": {
1837
+ "type": "jsLiteral",
1838
+ "value": "color"
1839
+ }
1840
+ }
1841
+ }
1842
+ ],
1843
+ "events": [],
1844
+ "methods": []
1845
+ },
1846
1846
  "data-view.loading-panel": {
1847
1847
  "properties": [
1848
1848
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/data-view",
3
- "version": "0.15.4",
3
+ "version": "0.15.6",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/data-view",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,10 +34,10 @@
34
34
  "postpublish": "mv package.json.bak package.json"
35
35
  },
36
36
  "devDependencies": {
37
- "@next-core/build-next-bricks": "^1.13.4",
37
+ "@next-core/build-next-bricks": "^1.13.6",
38
38
  "@next-core/test-next": "^1.0.8",
39
39
  "@types/d3-hierarchy": "^3.1.2",
40
40
  "@types/three": "^0.150.1"
41
41
  },
42
- "gitHead": "a5f3b8577a29ba83b8e758222e3ed89356b97df1"
42
+ "gitHead": "c42af21cfa9eb3e5af486aa1b054c2492f8adcd3"
43
43
  }
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[3494,7822,4795],{4795:(e,t,r)=>{function n(e,t,r,n,a,i,u){try{var c=e[i](u),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var u=e.apply(t,r);function c(e){n(u,a,i,c,s,"next",e)}function s(e){n(u,a,i,c,s,"throw",e)}c(void 0)}))}}r.d(t,{Z:()=>a})},7822:(e,t,r)=>{r.r(t),r.d(t,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>s,useCurrentApp:()=>_,useCurrentTheme:()=>d,useRecentApps:()=>v});var n,a=r(4795),i=r(8657),u=r(9906),c=function(e){var{useBrick:t,data:r}=e,[n,c]=(0,i.useState)(null),s=(0,i.useRef)(),[l,o]=(0,i.useState)(),d=(0,i.useRef)(0),v=(0,i.useMemo)((()=>{var e;return null===(e=u.__secret_internals.getRenderId)||void 0===e?void 0:e.call(u.__secret_internals)}),[]);(0,i.useEffect)((()=>{function e(){return e=(0,a.Z)((function*(){try{c(yield u.__secret_internals.renderUseBrick(t,r)),o(++d.current)}catch(e){(function(e){var t,r=null===(t=u.__secret_internals.getRenderId)||void 0===t?void 0:t.call(u.__secret_internals);return!e||!r||e===r})(v)&&(console.error("Render useBrick failed:",t,"with data:",r),(0,u.handleHttpError)(e))}})),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[r,t,v]);var _=(0,i.useCallback)((e=>{e?s.current=u.__secret_internals.mountUseBrick(n,e):(u.__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 i.createElement(p,{key:l,ref:_})},s=function(e){var{useBrick:t,data:r}=e;return Array.isArray(t)?i.createElement(i.Fragment,null,t.map(((e,t)=>i.createElement(c,{key:t,useBrick:e,data:r})))):i.createElement(c,{useBrick:t,data:r})};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:o}=window.dll("tYg3");l&&o&&(c=l(i),s=o(i))}function d(){var[e,t]=(0,i.useState)(u.getCurrentTheme);return(0,i.useEffect)((()=>{var e=e=>{t(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function v(){var[e,t]=i.useState((()=>(0,u.getRuntime)().getRecentApps()));return i.useEffect((()=>{var e=e=>{t(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function _(){return v().currentApp}}}]);
2
- //# sourceMappingURL=3494.2ac2c572.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/3494.2ac2c572.js","mappings":"0IAAA,SAASA,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQC,EAAKC,GACpE,IACE,IAAIC,EAAOP,EAAIK,GAAKC,GAChBE,EAAQD,EAAKC,K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AoB,eAAgBJ,EAAoB,CAChE,GACA,IACIH,CACT,CCZO,SAASQ,IACd,IAAKC,EAAYC,GAAiB,YAAe,KAAM,IAAAC,cAAaC,kBAQpE,OAPA,aAAgB,KACd,IAAIC,EAAWT,IACbM,EAAcN,EAAMC,OAAO,EAG7B,OADAZ,OAAOa,iBAAiB,aAAcO,GAC/B,IAAMpB,OAAOc,oBAAoB,aAAcM,EAAS,GAC9D,IACIJ,CACT,CCIO,SAASK,IACd,OAAON,IAAgBO,UACzB,C","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nvar _window$BRICK_NEXT_VE;\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nvar ReactUseBrick = function ReactUseBrick(_ref) {\n var {\n useBrick,\n data\n } = _ref;\n var [renderResult, setRenderResult] = useState(null);\n var mountResult = useRef();\n var [renderKey, setRenderKey] = useState();\n var IdCounterRef = useRef(0);\n var initialRenderId = useMemo(() => {\n var _secret_internals$ge;\n return (_secret_internals$ge = __secret_internals.getRenderId) === null || _secret_internals$ge === void 0 ? void 0 : _secret_internals$ge.call(__secret_internals);\n }, []);\n useEffect(() => {\n function init() {\n return _init.apply(this, arguments);\n }\n function _init() {\n _init = _asyncToGenerator(function* () {\n try {\n setRenderResult(yield __secret_internals.renderUseBrick(useBrick, data));\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n if (isTheSameRender(initialRenderId)) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n }\n });\n return _init.apply(this, arguments);\n }\n init();\n }, [data, useBrick, initialRenderId]);\n var refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n }, [renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n\n var {\n tagName\n } = renderResult;\n if (tagName === null) {\n return null;\n }\n var WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nfunction isTheSameRender(initialRenderId) {\n var _secret_internals$ge2;\n var newRenderId = (_secret_internals$ge2 = __secret_internals.getRenderId) === null || _secret_internals$ge2 === void 0 ? void 0 : _secret_internals$ge2.call(__secret_internals);\n return !initialRenderId || !newRenderId || initialRenderId === newRenderId;\n}\nvar ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n var {\n useBrick,\n data\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data\n });\n};\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\nif (window.dll && (_window$BRICK_NEXT_VE = window.BRICK_NEXT_VERSIONS) !== null && _window$BRICK_NEXT_VE !== void 0 && (_window$BRICK_NEXT_VE = _window$BRICK_NEXT_VE[\"brick-container\"]) !== null && _window$BRICK_NEXT_VE !== void 0 && _window$BRICK_NEXT_VE.startsWith(\"2.\")) {\n var {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = window.dll(\"tYg3\");\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n var [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n var listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n var [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n var listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined","_window$BRICK_NEXT_VE","ReactUseBrick","_ref","useBrick","data","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","initialRenderId","useMemo","_secret_internals$ge","__secret_internals","getRenderId","call","useEffect","_init","renderUseBrick","current","_secret_internals$ge2","newRenderId","isTheSameRender","console","handleHttpError","init","refCallback","useCallback","element","mountUseBrick","unmountUseBrick","tagName","WebComponent","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","window","dll","BRICK_NEXT_VERSIONS","startsWith","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[3914],{5202:(r,e,t)=>{t.r(e),t.d(e,{HttpAbortError:()=>m,HttpFetchError:()=>d,HttpParseError:()=>v,HttpResponseError:()=>f,createHttpInstance:()=>q,defaultAdapter:()=>x,fetch:()=>s,getUrlWithParams:()=>A,http:()=>_,isHttpAbortError:()=>P});var s=(r,e)=>{var t=new Request(r,Object.assign({credentials:"same-origin"},e));return self.fetch(t)},n=t(5866),a=t(3395),o=t(6666),i=t(687),h=t(6171),c=t(381),u=t(3028),p=t(2159),l=t(4795);class d extends Error{constructor(r){super(r),this.name="HttpFetchError",Error.captureStackTrace&&Error.captureStackTrace(this,d)}}class f extends Error{constructor(r,e){super(r.statusText),(0,o.Z)(this,"response",void 0),(0,o.Z)(this,"responseJson",void 0),this.name="HttpResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,f),this.response=r,this.responseJson=e}}class v extends Error{constructor(r){super(r.statusText),(0,o.Z)(this,"response",void 0),this.name="HttpParseError",Error.captureStackTrace&&Error.captureStackTrace(this,v),this.response=r}}class m extends Error{constructor(r){super(r),this.name="HttpAbortError"}}class E{constructor(){(0,o.Z)(this,"handlers",[])}use(r,e){return this.handlers.push({fulfilled:r,rejected:e}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}forEach(r){this.handlers.forEach((e=>{null!==e&&r(e)}))}}var Z=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache"],y=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache","headers"],b=["body","method"];function g(r){return null==r}var T=document.querySelector("base"),w=T?T.href:location.origin+"/",P=r=>r instanceof DOMException&&20===r.code,k=(r,e)=>({error:r,config:e}),H=function(){var r=(0,l.Z)((function*(r,e,t){return new Promise(function(){var n=(0,l.Z)((function*(n,a){var o;t.url=r;var{responseType:i}=t.options||{};i||(i="json");try{o=yield s(r,e)}catch(r){return void a(k(P(r)?new m(r.toString()):new d(r.toString()),t))}if(o.ok){var h;try{h=yield o[i]()}catch(r){return void a(k(P(r)?new m(r.toString()):new v(o),t))}n({config:t,status:o.status,statusText:o.statusText,headers:o.headers,data:h})}else{var c;try{c=yield o.json()}catch(r){}a(k(new f(o,c),t))}}));return function(r,e){return n.apply(this,arguments)}}())}));return function(e,t,s){return r.apply(this,arguments)}}(),A=(r,e)=>{if(e){var t=new URL(r,w);e instanceof URLSearchParams?e.forEach((function(r,e){t.searchParams.append(e,r)})):Object.entries(e).forEach((r=>{var[e,s]=r;Array.isArray(s)?s.forEach((r=>{t.searchParams.append(e,g(r)?"":r)})):t.searchParams.append(e,g(s)?"":s)}));var{href:s}=t;return s.startsWith(w)?s.substr(w.length):s}return r},S=(r,e)=>{if(void 0!==r){var t=new Headers(e||{}),s="Content-Type",n=r;return t.has(s)||("string"==typeof r?t.set(s,"application/x-www-form-urlencoded"):r instanceof FormData||(t.set(s,"application/json"),n=JSON.stringify(r))),{body:n,headers:t}}return{headers:e}},x=r=>{var{url:e,method:t,data:s}=r;return["DELETE","GET","HEAD"].includes(r.method)?((r,e,t)=>{var s=t.options||{},{params:n,responseType:a,interceptorParams:o,observe:i,noAbortOnRouteChange:h,useCache:c}=s,l=(0,p.Z)(s,Z);return H(A(e,n),(0,u.Z)((0,u.Z)({},l),{},{method:r}),t)})(t,e,r):((r,e,t,s)=>{var n=s.options||{},{params:a,responseType:o,interceptorParams:i,observe:h,noAbortOnRouteChange:c,useCache:l,headers:d}=n,f=(0,p.Z)(n,y);return H(A(e,a),(0,u.Z)((0,u.Z)({},f),{},{method:r},S(t,d)),s)})(t,e,s,r)},C=new WeakMap,j=new WeakSet;class R{constructor(r){var e=this;(0,n.Z)(this,j),(0,o.Z)(this,"interceptors",void 0),(0,a.Z)(this,C,{writable:!0,value:x}),(0,o.Z)(this,"request",function(){var r=(0,l.Z)((function*(r,t,s){var n=t||{},{body:a,method:o}=n,i=(0,p.Z)(n,b);return(0,h.Z)(e,j,O).call(e,{url:r,data:a,method:o||"GET",options:(0,u.Z)((0,u.Z)({},s||{}),i)})}));return function(e,t,s){return r.apply(this,arguments)}}()),(0,o.Z)(this,"simpleRequest",(function(r,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,h.Z)(e,j,O).call(e,{url:t,method:r,options:s})})),(0,o.Z)(this,"requestWithBody",(function(r,t,s){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,h.Z)(e,j,O).call(e,{url:t,method:r,data:s,options:n})})),this.interceptors={request:new E,response:new E},null!=r&&r.adapter&&(0,c.Z)(this,C,r.adapter)}getUrlWithParams(r,e){return A(r,e)}getBodyAndHeaders(r,e){return S(r,e)}get(r,e){return(0,h.Z)(this,j,O).call(this,{url:r,method:"GET",options:e})}delete(r,e){return(0,h.Z)(this,j,O).call(this,{url:r,method:"DELETE",options:e})}head(r,e){return(0,h.Z)(this,j,O).call(this,{url:r,method:"HEAD",options:e})}post(r,e,t){return(0,h.Z)(this,j,O).call(this,{url:r,method:"POST",data:e,options:t})}put(r,e,t){return(0,h.Z)(this,j,O).call(this,{url:r,method:"PUT",data:e,options:t})}patch(r,e,t){return(0,h.Z)(this,j,O).call(this,{url:r,method:"PATCH",data:e,options:t})}}function O(r){var e=[],t=Promise.resolve(r);for(this.interceptors.request.forEach((r=>{e.push(r.fulfilled,r.rejected)})),e.push((r=>(0,i.Z)(this,C).call(this,r)),void 0),this.interceptors.response.forEach((r=>{e.push(r.fulfilled,r.rejected)})),e.push((r=>{var e;return"response"===(null===(e=r.config.options)||void 0===e?void 0:e.observe)?r:r.data}),(r=>Promise.reject(r.error)));e.length;)t=t.then(e.shift(),e.shift());return t}var _=new R;function q(r){_=new R(r)}}}]);
2
- //# sourceMappingURL=3914.738b0862.js.map