@next-bricks/visual-builder 1.33.8 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/bricks.json +8 -6
  2. package/dist/chunks/{114.fdfd0dd9.js → 114.c25646f6.js} +2 -2
  3. package/dist/chunks/{114.fdfd0dd9.js.map → 114.c25646f6.js.map} +1 -1
  4. package/dist/chunks/{2252.25422902.js → 2252.fdcd5468.js} +3 -3
  5. package/dist/chunks/{2252.25422902.js.map → 2252.fdcd5468.js.map} +1 -1
  6. package/dist/chunks/{2980.0e831600.js → 2980.86aa3c5b.js} +2 -2
  7. package/dist/chunks/{2980.0e831600.js.map → 2980.86aa3c5b.js.map} +1 -1
  8. package/dist/chunks/{4837.cd50030b.js → 4837.bc21d4bb.js} +2 -2
  9. package/dist/chunks/{7218.9e675e7d.js.map → 4837.bc21d4bb.js.map} +1 -1
  10. package/dist/chunks/5399.be09f124.js +2 -0
  11. package/dist/chunks/5399.be09f124.js.map +1 -0
  12. package/dist/chunks/{5814.8ed8f39d.js → 5814.7b571c77.js} +3 -3
  13. package/dist/chunks/{5814.8ed8f39d.js.map → 5814.7b571c77.js.map} +1 -1
  14. package/dist/chunks/6773.9ed5373b.js +2 -0
  15. package/dist/chunks/6773.9ed5373b.js.map +1 -0
  16. package/dist/chunks/718.4da7e7c3.js +3 -0
  17. package/dist/chunks/718.4da7e7c3.js.map +1 -0
  18. package/dist/chunks/{7218.9e675e7d.js → 7218.163468a5.js} +2 -2
  19. package/dist/chunks/{4837.cd50030b.js.map → 7218.163468a5.js.map} +1 -1
  20. package/dist/chunks/{7733.dfa9b454.js → 7733.4fc7b710.js} +2 -2
  21. package/dist/chunks/{7733.dfa9b454.js.map → 7733.4fc7b710.js.map} +1 -1
  22. package/dist/chunks/8144.c19b5f90.js +3 -0
  23. package/dist/chunks/{7150.0e64cf9e.js.LICENSE.txt → 8144.c19b5f90.js.LICENSE.txt} +2 -0
  24. package/dist/chunks/8144.c19b5f90.js.map +1 -0
  25. package/dist/chunks/8989.74e3337d.js +2 -0
  26. package/dist/chunks/{8989.0d8b22ea.js.map → 8989.74e3337d.js.map} +1 -1
  27. package/dist/chunks/{9027.58391f17.js → 9027.ae3dd6a1.js} +2 -2
  28. package/dist/chunks/{9027.58391f17.js.map → 9027.ae3dd6a1.js.map} +1 -1
  29. package/dist/chunks/{9080.b97eaf67.js → 9080.fe043f12.js} +2 -2
  30. package/dist/chunks/{9080.b97eaf67.js.map → 9080.fe043f12.js.map} +1 -1
  31. package/dist/chunks/batch-update-raw-data-generated-view.d729bc1b.js +3 -0
  32. package/dist/chunks/batch-update-raw-data-generated-view.d729bc1b.js.LICENSE.txt +1 -0
  33. package/dist/chunks/batch-update-raw-data-generated-view.d729bc1b.js.map +1 -0
  34. package/dist/chunks/{chat-preview.bb6cd3b4.js → chat-preview.0ee9b1ac.js} +3 -3
  35. package/dist/chunks/{chat-preview.bb6cd3b4.js.map → chat-preview.0ee9b1ac.js.map} +1 -1
  36. package/dist/chunks/{check-editor-by-name.2c85abd3.js → check-editor-by-name.66abd437.js} +2 -2
  37. package/dist/chunks/{check-editor-by-name.2c85abd3.js.map → check-editor-by-name.66abd437.js.map} +1 -1
  38. package/dist/chunks/{contract-select.5302ec7e.js → contract-select.39759636.js} +3 -3
  39. package/dist/chunks/{contract-select.5302ec7e.js.map → contract-select.39759636.js.map} +1 -1
  40. package/dist/chunks/inject-preview-agent.b12c08c4.js.map +1 -1
  41. package/dist/chunks/main.8bd04251.js +2 -0
  42. package/dist/chunks/main.8bd04251.js.map +1 -0
  43. package/dist/chunks/{pre-generated-container.182db37b.js → pre-generated-container.fd7db719.js} +2 -2
  44. package/dist/chunks/{pre-generated-container.182db37b.js.map → pre-generated-container.fd7db719.js.map} +1 -1
  45. package/dist/chunks/pre-generated-preview.f09452bf.js +3 -0
  46. package/dist/chunks/pre-generated-preview.f09452bf.js.map +1 -0
  47. package/dist/chunks/{property-editor.6f5b4896.js → property-editor.079839d6.js} +2 -2
  48. package/dist/chunks/{property-editor.6f5b4896.js.map → property-editor.079839d6.js.map} +1 -1
  49. package/dist/chunks/raw-data-preview.a9da1ecb.js +3 -0
  50. package/dist/chunks/raw-data-preview.a9da1ecb.js.LICENSE.txt +5 -0
  51. package/dist/chunks/raw-data-preview.a9da1ecb.js.map +1 -0
  52. package/dist/chunks/{workbench-action-list.a319ba8f.js → workbench-action-list.19d9ee9d.js} +2 -2
  53. package/dist/chunks/{workbench-action-list.a319ba8f.js.map → workbench-action-list.19d9ee9d.js.map} +1 -1
  54. package/dist/chunks/{workbench-history-action.e20b5e26.js → workbench-history-action.976d14c0.js} +3 -3
  55. package/dist/chunks/{workbench-history-action.e20b5e26.js.map → workbench-history-action.976d14c0.js.map} +1 -1
  56. package/dist/index.cabccf48.js +2 -0
  57. package/dist/index.cabccf48.js.map +1 -0
  58. package/dist/manifest.json +71 -20
  59. package/dist/types.json +418 -0
  60. package/dist-types/bootstrap.d.ts +2 -0
  61. package/dist-types/data-providers/batch-update-raw-data-generated-view.d.ts +9 -0
  62. package/dist-types/data-providers/batch-update-raw-data-generated-view.spec.d.ts +1 -0
  63. package/dist-types/raw-data-preview/convert.d.ts +3 -0
  64. package/dist-types/raw-data-preview/index.d.ts +53 -0
  65. package/dist-types/raw-data-preview/index.spec.d.ts +1 -0
  66. package/dist-types/raw-data-preview/raw-data-interfaces.d.ts +74 -0
  67. package/package.json +2 -2
  68. package/dist/chunks/1370.f1c0b4dc.js +0 -2
  69. package/dist/chunks/1370.f1c0b4dc.js.map +0 -1
  70. package/dist/chunks/5399.96998a74.js +0 -2
  71. package/dist/chunks/5399.96998a74.js.map +0 -1
  72. package/dist/chunks/6773.7837da8c.js +0 -2
  73. package/dist/chunks/6773.7837da8c.js.map +0 -1
  74. package/dist/chunks/7150.0e64cf9e.js +0 -3
  75. package/dist/chunks/7150.0e64cf9e.js.map +0 -1
  76. package/dist/chunks/7426.4f61da8a.js +0 -3
  77. package/dist/chunks/7426.4f61da8a.js.map +0 -1
  78. package/dist/chunks/8989.0d8b22ea.js +0 -2
  79. package/dist/chunks/main.07bd0560.js +0 -2
  80. package/dist/chunks/main.07bd0560.js.map +0 -1
  81. package/dist/chunks/pre-generated-preview.9fe5a3d8.js +0 -3
  82. package/dist/chunks/pre-generated-preview.9fe5a3d8.js.map +0 -1
  83. package/dist/index.b98e786d.js +0 -2
  84. package/dist/index.b98e786d.js.map +0 -1
  85. /package/dist/chunks/{2252.25422902.js.LICENSE.txt → 2252.fdcd5468.js.LICENSE.txt} +0 -0
  86. /package/dist/chunks/{5814.8ed8f39d.js.LICENSE.txt → 5814.7b571c77.js.LICENSE.txt} +0 -0
  87. /package/dist/chunks/{7426.4f61da8a.js.LICENSE.txt → 718.4da7e7c3.js.LICENSE.txt} +0 -0
  88. /package/dist/chunks/{chat-preview.bb6cd3b4.js.LICENSE.txt → chat-preview.0ee9b1ac.js.LICENSE.txt} +0 -0
  89. /package/dist/chunks/{contract-select.5302ec7e.js.LICENSE.txt → contract-select.39759636.js.LICENSE.txt} +0 -0
  90. /package/dist/chunks/{pre-generated-preview.9fe5a3d8.js.LICENSE.txt → pre-generated-preview.f09452bf.js.LICENSE.txt} +0 -0
  91. /package/dist/chunks/{workbench-history-action.e20b5e26.js.LICENSE.txt → workbench-history-action.976d14c0.js.LICENSE.txt} +0 -0
@@ -39,6 +39,26 @@
39
39
  "description": "",
40
40
  "insider": true
41
41
  },
42
+ {
43
+ "name": "visual-builder.workbench-action-list",
44
+ "properties": [
45
+ {
46
+ "name": "appId",
47
+ "type": "string"
48
+ },
49
+ {
50
+ "name": "menu",
51
+ "attribute": false,
52
+ "type": "SidebarMenu"
53
+ }
54
+ ],
55
+ "events": [],
56
+ "slots": [],
57
+ "methods": [],
58
+ "parts": [],
59
+ "description": "",
60
+ "insider": true
61
+ },
42
62
  {
43
63
  "name": "visual-builder.workbench-sidebar",
44
64
  "properties": [
@@ -206,26 +226,6 @@
206
226
  "description": "",
207
227
  "insider": true
208
228
  },
209
- {
210
- "name": "visual-builder.workbench-action-list",
211
- "properties": [
212
- {
213
- "name": "appId",
214
- "type": "string"
215
- },
216
- {
217
- "name": "menu",
218
- "attribute": false,
219
- "type": "SidebarMenu"
220
- }
221
- ],
222
- "events": [],
223
- "slots": [],
224
- "methods": [],
225
- "parts": [],
226
- "description": "",
227
- "insider": true
228
- },
229
229
  {
230
230
  "name": "visual-builder.workbench-history-action",
231
231
  "properties": [
@@ -680,9 +680,60 @@
680
680
  ],
681
681
  "parts": [],
682
682
  "description": "构件 `visual-builder.property-editor`"
683
+ },
684
+ {
685
+ "name": "visual-builder.raw-data-preview",
686
+ "properties": [
687
+ {
688
+ "name": "previewUrl",
689
+ "type": "string"
690
+ },
691
+ {
692
+ "name": "generations",
693
+ "attribute": false,
694
+ "type": "AttributeGeneration[]"
695
+ },
696
+ {
697
+ "name": "busy",
698
+ "type": "boolean"
699
+ },
700
+ {
701
+ "name": "category",
702
+ "description": "",
703
+ "default": "\"value\"",
704
+ "type": "PreviewCategory"
705
+ },
706
+ {
707
+ "name": "theme",
708
+ "type": "string"
709
+ },
710
+ {
711
+ "name": "uiVersion",
712
+ "type": "string"
713
+ },
714
+ {
715
+ "name": "app",
716
+ "type": "MicroApp"
717
+ }
718
+ ],
719
+ "events": [
720
+ {
721
+ "name": "comment",
722
+ "detail": {
723
+ "type": "CommentDetail"
724
+ }
725
+ }
726
+ ],
727
+ "slots": [],
728
+ "methods": [],
729
+ "parts": [],
730
+ "description": "构件 `visual-builder.raw-data-preview`"
683
731
  }
684
732
  ],
685
733
  "providers": [
734
+ {
735
+ "name": "visual-builder.batch-update-raw-data-generated-view"
736
+ },
686
737
  {
687
738
  "name": "visual-builder.check-editor-by-name"
688
739
  },
package/dist/types.json CHANGED
@@ -102,6 +102,127 @@
102
102
  "events": [],
103
103
  "methods": []
104
104
  },
105
+ "visual-builder.batch-update-raw-data-generated-view": {
106
+ "type": "provider",
107
+ "params": [
108
+ {
109
+ "name": "generations",
110
+ "annotation": {
111
+ "type": "array",
112
+ "elementType": {
113
+ "type": "reference",
114
+ "typeName": {
115
+ "type": "identifier",
116
+ "name": "GeneratedView"
117
+ }
118
+ }
119
+ }
120
+ }
121
+ ],
122
+ "returns": {
123
+ "annotation": {
124
+ "type": "reference",
125
+ "typeName": {
126
+ "type": "identifier",
127
+ "name": "Promise"
128
+ },
129
+ "typeParameters": {
130
+ "type": "typeParameterInstantiation",
131
+ "params": [
132
+ {
133
+ "type": "keyword",
134
+ "value": "unknown"
135
+ }
136
+ ]
137
+ }
138
+ }
139
+ },
140
+ "types": [
141
+ {
142
+ "type": "interface",
143
+ "name": "GeneratedView",
144
+ "body": [
145
+ {
146
+ "type": "propertySignature",
147
+ "key": {
148
+ "type": "identifier",
149
+ "name": "attrInstanceId"
150
+ },
151
+ "annotation": {
152
+ "type": "keyword",
153
+ "value": "string"
154
+ },
155
+ "computed": false
156
+ },
157
+ {
158
+ "type": "propertySignature",
159
+ "key": {
160
+ "type": "identifier",
161
+ "name": "input"
162
+ },
163
+ "annotation": {
164
+ "type": "keyword",
165
+ "value": "string"
166
+ },
167
+ "computed": false
168
+ },
169
+ {
170
+ "type": "propertySignature",
171
+ "key": {
172
+ "type": "identifier",
173
+ "name": "output"
174
+ },
175
+ "annotation": {
176
+ "type": "keyword",
177
+ "value": "string"
178
+ },
179
+ "computed": false
180
+ },
181
+ {
182
+ "type": "propertySignature",
183
+ "key": {
184
+ "type": "identifier",
185
+ "name": "list"
186
+ },
187
+ "annotation": {
188
+ "type": "array",
189
+ "elementType": {
190
+ "type": "keyword",
191
+ "value": "unknown"
192
+ }
193
+ },
194
+ "computed": false
195
+ },
196
+ {
197
+ "type": "propertySignature",
198
+ "key": {
199
+ "type": "identifier",
200
+ "name": "defaultVisualWeight"
201
+ },
202
+ "annotation": {
203
+ "type": "keyword",
204
+ "value": "number"
205
+ },
206
+ "optional": true,
207
+ "computed": false
208
+ },
209
+ {
210
+ "type": "propertySignature",
211
+ "key": {
212
+ "type": "identifier",
213
+ "name": "systemPromptVersion"
214
+ },
215
+ "annotation": {
216
+ "type": "keyword",
217
+ "value": "string"
218
+ },
219
+ "optional": true,
220
+ "computed": false
221
+ }
222
+ ]
223
+ }
224
+ ]
225
+ },
105
226
  "visual-builder.check-editor-by-name": {
106
227
  "type": "provider",
107
228
  "params": [
@@ -1493,6 +1614,303 @@
1493
1614
  }
1494
1615
  ]
1495
1616
  },
1617
+ "visual-builder.raw-data-preview": {
1618
+ "properties": [
1619
+ {
1620
+ "name": "previewUrl",
1621
+ "annotation": {
1622
+ "type": "keyword",
1623
+ "value": "string"
1624
+ }
1625
+ },
1626
+ {
1627
+ "name": "generations",
1628
+ "annotation": {
1629
+ "type": "array",
1630
+ "elementType": {
1631
+ "type": "reference",
1632
+ "typeName": {
1633
+ "type": "identifier",
1634
+ "name": "AttributeGeneration"
1635
+ }
1636
+ }
1637
+ }
1638
+ },
1639
+ {
1640
+ "name": "busy",
1641
+ "annotation": {
1642
+ "type": "keyword",
1643
+ "value": "boolean"
1644
+ }
1645
+ },
1646
+ {
1647
+ "name": "category",
1648
+ "annotation": {
1649
+ "type": "reference",
1650
+ "typeName": {
1651
+ "type": "identifier",
1652
+ "name": "PreviewCategory"
1653
+ }
1654
+ }
1655
+ },
1656
+ {
1657
+ "name": "theme",
1658
+ "annotation": {
1659
+ "type": "keyword",
1660
+ "value": "string"
1661
+ }
1662
+ },
1663
+ {
1664
+ "name": "uiVersion",
1665
+ "annotation": {
1666
+ "type": "keyword",
1667
+ "value": "string"
1668
+ }
1669
+ },
1670
+ {
1671
+ "name": "app",
1672
+ "annotation": {
1673
+ "type": "reference",
1674
+ "typeName": {
1675
+ "type": "identifier",
1676
+ "name": "MicroApp"
1677
+ }
1678
+ }
1679
+ }
1680
+ ],
1681
+ "events": [
1682
+ {
1683
+ "name": "comment",
1684
+ "detail": {
1685
+ "annotation": {
1686
+ "type": "reference",
1687
+ "typeName": {
1688
+ "type": "identifier",
1689
+ "name": "CommentDetail"
1690
+ }
1691
+ }
1692
+ }
1693
+ }
1694
+ ],
1695
+ "methods": [],
1696
+ "types": [
1697
+ {
1698
+ "type": "interface",
1699
+ "name": "AttributeGeneration",
1700
+ "body": [
1701
+ {
1702
+ "type": "propertySignature",
1703
+ "key": {
1704
+ "type": "identifier",
1705
+ "name": "generationId"
1706
+ },
1707
+ "annotation": {
1708
+ "type": "keyword",
1709
+ "value": "string"
1710
+ },
1711
+ "optional": true,
1712
+ "computed": false
1713
+ },
1714
+ {
1715
+ "type": "propertySignature",
1716
+ "key": {
1717
+ "type": "identifier",
1718
+ "name": "objectId"
1719
+ },
1720
+ "annotation": {
1721
+ "type": "keyword",
1722
+ "value": "string"
1723
+ },
1724
+ "computed": false
1725
+ },
1726
+ {
1727
+ "type": "propertySignature",
1728
+ "key": {
1729
+ "type": "identifier",
1730
+ "name": "objectName"
1731
+ },
1732
+ "annotation": {
1733
+ "type": "keyword",
1734
+ "value": "string"
1735
+ },
1736
+ "computed": false
1737
+ },
1738
+ {
1739
+ "type": "propertySignature",
1740
+ "key": {
1741
+ "type": "identifier",
1742
+ "name": "propertyId"
1743
+ },
1744
+ "annotation": {
1745
+ "type": "keyword",
1746
+ "value": "string"
1747
+ },
1748
+ "computed": false
1749
+ },
1750
+ {
1751
+ "type": "propertySignature",
1752
+ "key": {
1753
+ "type": "identifier",
1754
+ "name": "propertyName"
1755
+ },
1756
+ "annotation": {
1757
+ "type": "keyword",
1758
+ "value": "string"
1759
+ },
1760
+ "computed": false
1761
+ },
1762
+ {
1763
+ "type": "propertySignature",
1764
+ "key": {
1765
+ "type": "identifier",
1766
+ "name": "propertyInstanceId"
1767
+ },
1768
+ "annotation": {
1769
+ "type": "keyword",
1770
+ "value": "string"
1771
+ },
1772
+ "optional": true,
1773
+ "computed": false
1774
+ },
1775
+ {
1776
+ "type": "propertySignature",
1777
+ "key": {
1778
+ "type": "identifier",
1779
+ "name": "comment"
1780
+ },
1781
+ "annotation": {
1782
+ "type": "keyword",
1783
+ "value": "string"
1784
+ },
1785
+ "optional": true,
1786
+ "computed": false
1787
+ },
1788
+ {
1789
+ "type": "propertySignature",
1790
+ "key": {
1791
+ "type": "identifier",
1792
+ "name": "candidates"
1793
+ },
1794
+ "annotation": {
1795
+ "type": "union",
1796
+ "types": [
1797
+ {
1798
+ "type": "array",
1799
+ "elementType": {
1800
+ "type": "reference",
1801
+ "typeName": {
1802
+ "type": "identifier",
1803
+ "name": "VisualConfig"
1804
+ }
1805
+ }
1806
+ },
1807
+ {
1808
+ "type": "keyword",
1809
+ "value": "null"
1810
+ }
1811
+ ]
1812
+ },
1813
+ "computed": false
1814
+ },
1815
+ {
1816
+ "type": "propertySignature",
1817
+ "key": {
1818
+ "type": "identifier",
1819
+ "name": "mockData"
1820
+ },
1821
+ "annotation": {
1822
+ "type": "array",
1823
+ "elementType": {
1824
+ "type": "reference",
1825
+ "typeName": {
1826
+ "type": "identifier",
1827
+ "name": "Record"
1828
+ },
1829
+ "typeParameters": {
1830
+ "type": "typeParameterInstantiation",
1831
+ "params": [
1832
+ {
1833
+ "type": "keyword",
1834
+ "value": "string"
1835
+ },
1836
+ {
1837
+ "type": "keyword",
1838
+ "value": "unknown"
1839
+ }
1840
+ ]
1841
+ }
1842
+ }
1843
+ },
1844
+ "computed": false
1845
+ }
1846
+ ]
1847
+ },
1848
+ {
1849
+ "type": "typeAlias",
1850
+ "name": "PreviewCategory",
1851
+ "annotation": {
1852
+ "type": "union",
1853
+ "types": [
1854
+ {
1855
+ "type": "jsLiteral",
1856
+ "value": "detail-item"
1857
+ },
1858
+ {
1859
+ "type": "jsLiteral",
1860
+ "value": "form-item"
1861
+ },
1862
+ {
1863
+ "type": "jsLiteral",
1864
+ "value": "table-column"
1865
+ },
1866
+ {
1867
+ "type": "jsLiteral",
1868
+ "value": "card-item"
1869
+ },
1870
+ {
1871
+ "type": "jsLiteral",
1872
+ "value": "metric-item"
1873
+ },
1874
+ {
1875
+ "type": "jsLiteral",
1876
+ "value": "value"
1877
+ }
1878
+ ]
1879
+ }
1880
+ },
1881
+ {
1882
+ "type": "interface",
1883
+ "name": "CommentDetail",
1884
+ "body": [
1885
+ {
1886
+ "type": "propertySignature",
1887
+ "key": {
1888
+ "type": "identifier",
1889
+ "name": "comment"
1890
+ },
1891
+ "annotation": {
1892
+ "type": "keyword",
1893
+ "value": "string"
1894
+ },
1895
+ "computed": false
1896
+ },
1897
+ {
1898
+ "type": "propertySignature",
1899
+ "key": {
1900
+ "type": "identifier",
1901
+ "name": "propertyInstanceId"
1902
+ },
1903
+ "annotation": {
1904
+ "type": "keyword",
1905
+ "value": "string"
1906
+ },
1907
+ "optional": true,
1908
+ "computed": false
1909
+ }
1910
+ ]
1911
+ }
1912
+ ]
1913
+ },
1496
1914
  "visual-builder.inject-chat-preview-agent": {
1497
1915
  "type": "provider",
1498
1916
  "params": [],
@@ -18,4 +18,6 @@ import "./property-editor/index.js";
18
18
  import "./data-providers/check-editor-by-name.js";
19
19
  import "./data-providers/get-data-dependency.js";
20
20
  import "./data-providers/get-dependency-tree.js";
21
+ import "./raw-data-preview/index.js";
21
22
  import "./data-providers/parse-path.js";
23
+ import "./data-providers/batch-update-raw-data-generated-view.js";
@@ -0,0 +1,9 @@
1
+ export interface GeneratedView {
2
+ attrInstanceId: string;
3
+ input: string;
4
+ output: string;
5
+ list: unknown[];
6
+ defaultVisualWeight?: number;
7
+ systemPromptVersion?: string;
8
+ }
9
+ export declare function batchUpdateRawDataGeneratedView(generations: GeneratedView[]): Promise<unknown>;
@@ -0,0 +1,3 @@
1
+ import type { BrickConf } from "@next-core/types";
2
+ import type { VisualConfig } from "./raw-data-interfaces";
3
+ export declare function convertToStoryboard(config: VisualConfig, attr: string): BrickConf | null;
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import { ReactNextElement } from "@next-core/react-element";
3
+ import "@next-core/theme";
4
+ import type { MicroApp } from "@next-core/types";
5
+ import type { VisualConfig } from "./raw-data-interfaces";
6
+ export interface RawPreviewProps {
7
+ previewUrl?: string;
8
+ generations?: AttributeGeneration[];
9
+ busy?: boolean;
10
+ category?: PreviewCategory;
11
+ theme?: string;
12
+ uiVersion?: string;
13
+ app?: MicroApp;
14
+ }
15
+ export interface AttributeGeneration {
16
+ generationId?: string;
17
+ objectId: string;
18
+ objectName: string;
19
+ propertyId: string;
20
+ propertyName: string;
21
+ propertyInstanceId?: string;
22
+ comment?: string;
23
+ candidates: VisualConfig[] | null;
24
+ mockData: Record<string, unknown>[];
25
+ }
26
+ export interface CommentDetail {
27
+ comment: string;
28
+ propertyInstanceId?: string;
29
+ }
30
+ export type PreviewCategory = "detail-item" | "form-item" | "table-column" | "card-item" | "metric-item" | "value";
31
+ /**
32
+ * 构件 `visual-builder.raw-data-preview`
33
+ *
34
+ * @internal
35
+ */
36
+ export declare class RawDataPreview extends ReactNextElement {
37
+ #private;
38
+ accessor previewUrl: string | undefined;
39
+ accessor generations: AttributeGeneration[] | undefined;
40
+ accessor busy: boolean | undefined;
41
+ /**
42
+ * @default "value"
43
+ */
44
+ accessor category: PreviewCategory | undefined;
45
+ accessor theme: string | undefined;
46
+ accessor uiVersion: string | undefined;
47
+ accessor app: MicroApp | undefined;
48
+ render(): React.JSX.Element;
49
+ }
50
+ export interface RawDataPreviewComponentProps extends RawPreviewProps {
51
+ onComment: (detail: CommentDetail) => void;
52
+ }
53
+ export declare function RawDataPreviewComponent({ previewUrl, generations, busy, category, theme, uiVersion, app, onComment, }: RawDataPreviewComponentProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ import "./";
@@ -0,0 +1,74 @@
1
+ export interface VisualConfig {
2
+ /** 视觉重量,整型,默认为 0,取值范围 [-1, 2] */
3
+ visualWeight: number;
4
+ /** 显示形式,默认为 text */
5
+ display: "text" | "tag" | "link" | "icon" | "file";
6
+ /** 原始数据类型 */
7
+ type: "integer" | "float" | "string" | "boolean" | "enum" | "enum-list" | "struct" | "struct-list" | "date" | "date-time";
8
+ /** 样式设置 */
9
+ style?: VisualStyle;
10
+ /** 根据区间设置不同的样式 */
11
+ ranges?: VisualRange[];
12
+ /** 格式化设置 */
13
+ formatter?: VisualFormatter;
14
+ icon?: string;
15
+ /** 最多显示的列表项数量,当结构体列表数据降级显示时使用 */
16
+ maxItems?: number;
17
+ /** 尽显示列表类数据的数量 */
18
+ countOnly?: number;
19
+ /** 当结构体或结构体列表数据降级显示时,仅显示该字段值 */
20
+ field?: string;
21
+ }
22
+ export interface VisualStyle {
23
+ /**
24
+ * 尺寸
25
+ *
26
+ * @default "medium"
27
+ */
28
+ size?: "small" | "medium" | "large" | "x-large";
29
+ /**
30
+ * 字重
31
+ *
32
+ * @default "normal"
33
+ */
34
+ fontWeight?: "normal" | "bold";
35
+ /** 内容颜色使用预设的 CSS 变量 */
36
+ color?: "var(--text-color-default)" | "var(--text-color-secondary)" | "var(--text-color-disabled)" | "var(--color-brand)";
37
+ /** 标签变种形式:默认、边框、背景色 */
38
+ variant?: "default" | "outline" | "background";
39
+ /** 背景颜色使用预设的 CSS 变量 */
40
+ background?: VisualBackground;
41
+ /** 背景颜色表 */
42
+ palette?: Record<string, VisualBackground>;
43
+ }
44
+ export type VisualBackground = "blue" | "cyan" | "geekblue" | "grayblue" | "gray" | "green" | "orange" | "purple" | "red" | "yellow" | "teal";
45
+ export interface VisualRange {
46
+ start?: number;
47
+ end?: number;
48
+ style?: VisualStyle;
49
+ }
50
+ export type VisualFormatter = DateTimeFormatter | CostTimeFormatter | NumberFormatter | FileFormatter;
51
+ export interface DateTimeFormatter {
52
+ type: "date-time" | "date" | "time";
53
+ format?: "full" | "default" | "accurate" | "relative" | "future" | "auto" | string;
54
+ }
55
+ export interface CostTimeFormatter {
56
+ type: "cost-time";
57
+ }
58
+ export interface NumberFormatter {
59
+ type: "number";
60
+ format: "decimal" | "currency" | "percent" | "unit";
61
+ /**
62
+ * 货币名,例如 CNY / USD 等
63
+ */
64
+ currency?: string;
65
+ unit?: string;
66
+ /** 保留的小数位数 */
67
+ decimals?: number;
68
+ thousandsSeparator?: boolean;
69
+ }
70
+ export interface FileFormatter {
71
+ type: "file";
72
+ /** 文件类型,例如 markdown / js / css / php 等 */
73
+ fileType: string;
74
+ }