@steedos-widgets/amis-object 6.3.7 → 6.3.8

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/meta.js CHANGED
@@ -28,7 +28,34 @@
28
28
  return t;
29
29
  };
30
30
  return __assign.apply(this, arguments);
31
- };
31
+ };
32
+
33
+ function __read(o, n) {
34
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
35
+ if (!m) return o;
36
+ var i = m.call(o), r, ar = [], e;
37
+ try {
38
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
39
+ }
40
+ catch (error) { e = { error: error }; }
41
+ finally {
42
+ try {
43
+ if (r && !r.done && (m = i["return"])) m.call(i);
44
+ }
45
+ finally { if (e) throw e.error; }
46
+ }
47
+ return ar;
48
+ }
49
+
50
+ function __spreadArray(to, from, pack) {
51
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
52
+ if (ar || !(i in from)) {
53
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
54
+ ar[i] = from[i];
55
+ }
56
+ }
57
+ return to.concat(ar || Array.prototype.slice.call(from));
58
+ }
32
59
 
33
60
  /*
34
61
  * @Author: baozhoutao@steedos.com
@@ -37,7 +64,7 @@
37
64
  * @LastEditTime: 2024-04-25 10:29:07
38
65
  * @Description:
39
66
  */
40
- var config$y = {
67
+ var config$A = {
41
68
  componentType: 'amisSchema',
42
69
  group: "华炎魔方",
43
70
  componentName: "AmisObjectForm",
@@ -126,33 +153,33 @@
126
153
  icon: "fa-fw fa fa-list-alt"
127
154
  }
128
155
  };
129
- var AmisObjectForm = __assign(__assign({}, config$y), { snippets: [
156
+ var AmisObjectForm = __assign(__assign({}, config$A), { snippets: [
130
157
  {
131
- title: config$y.title,
158
+ title: config$A.title,
132
159
  screenshot: "",
133
160
  schema: {
134
- componentName: config$y.componentName,
135
- props: config$y.preview
161
+ componentName: config$A.componentName,
162
+ props: config$A.preview
136
163
  }
137
164
  }
138
165
  ], amis: {
139
166
  render: {
140
- type: config$y.amis.name,
167
+ type: config$A.amis.name,
141
168
  usage: "renderer",
142
169
  weight: 1,
143
170
  framework: "react"
144
171
  },
145
172
  plugin: {
146
- rendererName: config$y.amis.name,
173
+ rendererName: config$A.amis.name,
147
174
  $schema: '/schemas/UnkownSchema.json',
148
- name: config$y.title,
149
- description: config$y.title,
150
- tags: [config$y.group],
175
+ name: config$A.title,
176
+ description: config$A.title,
177
+ tags: [config$A.group],
151
178
  order: -9999,
152
- icon: config$y.amis.icon,
179
+ icon: config$A.amis.icon,
153
180
  scaffold: {
154
- type: config$y.amis.name,
155
- label: config$y.title,
181
+ type: config$A.amis.name,
182
+ label: config$A.title,
156
183
  objectApiName: "${objectName}",
157
184
  recordId: "${recordId}",
158
185
  "mode": "edit",
@@ -160,7 +187,7 @@
160
187
  className: ""
161
188
  },
162
189
  previewSchema: {
163
- type: config$y.amis.name,
190
+ type: config$A.amis.name,
164
191
  objectApiName: 'space_users'
165
192
  },
166
193
  panelTitle: "设置",
@@ -647,7 +674,7 @@
647
674
  * @LastEditTime: 2023-10-20 13:24:39
648
675
  * @Description:
649
676
  */
650
- var config$x = {
677
+ var config$z = {
651
678
  componentType: 'amisSchema',
652
679
  group: "华炎魔方",
653
680
  componentName: "AmisObjectListView",
@@ -694,40 +721,40 @@
694
721
  icon: "fa-fw fa fa-list-alt"
695
722
  }
696
723
  };
697
- var AmisObjectListview = __assign(__assign({}, config$x), { snippets: [
724
+ var AmisObjectListview = __assign(__assign({}, config$z), { snippets: [
698
725
  {
699
- title: config$x.title,
726
+ title: config$z.title,
700
727
  screenshot: "",
701
728
  schema: {
702
- componentName: config$x.componentName,
703
- props: config$x.preview
729
+ componentName: config$z.componentName,
730
+ props: config$z.preview
704
731
  }
705
732
  }
706
733
  ], amis: {
707
734
  render: {
708
- type: config$x.amis.name,
735
+ type: config$z.amis.name,
709
736
  usage: "renderer",
710
737
  weight: 1,
711
738
  framework: "react"
712
739
  },
713
740
  plugin: {
714
- rendererName: config$x.amis.name,
741
+ rendererName: config$z.amis.name,
715
742
  $schema: '/schemas/UnkownSchema.json',
716
- name: config$x.title,
717
- description: config$x.description,
718
- tags: [config$x.group],
743
+ name: config$z.title,
744
+ description: config$z.description,
745
+ tags: [config$z.group],
719
746
  order: -9999,
720
- icon: config$x.amis.icon,
747
+ icon: config$z.amis.icon,
721
748
  scaffold: {
722
- type: config$x.amis.name,
723
- label: config$x.title,
749
+ type: config$z.amis.name,
750
+ label: config$z.title,
724
751
  objectApiName: "${objectName}",
725
752
  listName: "all",
726
753
  showHeader: true,
727
754
  // className: "sm:border sm:rounded sm:border-gray-300 mb-4"
728
755
  },
729
756
  previewSchema: {
730
- type: config$x.amis.name,
757
+ type: config$z.amis.name,
731
758
  objectApiName: 'space_users',
732
759
  listName: "all",
733
760
  showHeader: true,
@@ -869,7 +896,7 @@
869
896
  }
870
897
  } });
871
898
 
872
- var config$w = {
899
+ var config$y = {
873
900
  componentType: 'amisSchema',
874
901
  group: "华炎魔方",
875
902
  componentName: "AmisObjectCalendar",
@@ -925,38 +952,38 @@
925
952
  icon: "fa-fw fa fa-list-alt"
926
953
  }
927
954
  };
928
- var AmisObjectCalendar = __assign(__assign({}, config$w), { snippets: [
955
+ var AmisObjectCalendar = __assign(__assign({}, config$y), { snippets: [
929
956
  {
930
- title: config$w.title,
957
+ title: config$y.title,
931
958
  screenshot: "",
932
959
  schema: {
933
- componentName: config$w.componentName,
934
- props: config$w.preview
960
+ componentName: config$y.componentName,
961
+ props: config$y.preview
935
962
  }
936
963
  }
937
964
  ], amis: {
938
965
  render: {
939
- type: config$w.amis.name,
966
+ type: config$y.amis.name,
940
967
  usage: "renderer",
941
968
  weight: 1,
942
969
  framework: "react"
943
970
  },
944
971
  plugin: {
945
- rendererName: config$w.amis.name,
972
+ rendererName: config$y.amis.name,
946
973
  $schema: '/schemas/UnkownSchema.json',
947
- name: config$w.title,
948
- description: config$w.title,
949
- tags: [config$w.group],
974
+ name: config$y.title,
975
+ description: config$y.title,
976
+ tags: [config$y.group],
950
977
  order: -9999,
951
- icon: config$w.amis.icon,
978
+ icon: config$y.amis.icon,
952
979
  scaffold: {
953
- type: config$w.amis.name,
954
- label: config$w.title,
980
+ type: config$y.amis.name,
981
+ label: config$y.title,
955
982
  objectApiName: "${objectName}",
956
983
  currentView: "timeGridWeek"
957
984
  },
958
985
  previewSchema: {
959
- type: config$w.amis.name,
986
+ type: config$y.amis.name,
960
987
  objectApiName: 'events',
961
988
  currentView: "timeGridWeek"
962
989
  },
@@ -1028,7 +1055,7 @@
1028
1055
  * @LastEditTime: 2023-11-27 15:19:03
1029
1056
  * @Description:
1030
1057
  */
1031
- var config$v = {
1058
+ var config$x = {
1032
1059
  componentType: 'amisSchema',
1033
1060
  group: "华炎魔方",
1034
1061
  componentName: "AmisObjectTable",
@@ -1094,39 +1121,39 @@
1094
1121
  icon: "fa-fw fa fa-list-alt"
1095
1122
  }
1096
1123
  };
1097
- var AmisObjectTable = __assign(__assign({}, config$v), { snippets: [
1124
+ var AmisObjectTable = __assign(__assign({}, config$x), { snippets: [
1098
1125
  {
1099
- title: config$v.title,
1126
+ title: config$x.title,
1100
1127
  screenshot: "",
1101
1128
  schema: {
1102
- componentName: config$v.componentName,
1103
- props: config$v.preview
1129
+ componentName: config$x.componentName,
1130
+ props: config$x.preview
1104
1131
  }
1105
1132
  }
1106
1133
  ], amis: {
1107
1134
  render: {
1108
- type: config$v.amis.name,
1135
+ type: config$x.amis.name,
1109
1136
  usage: "renderer",
1110
1137
  weight: 1,
1111
1138
  framework: "react"
1112
1139
  },
1113
1140
  plugin: {
1114
- rendererName: config$v.amis.name,
1141
+ rendererName: config$x.amis.name,
1115
1142
  $schema: '/schemas/UnkownSchema.json',
1116
- name: config$v.title,
1117
- description: config$v.title,
1118
- tags: [config$v.group],
1143
+ name: config$x.title,
1144
+ description: config$x.title,
1145
+ tags: [config$x.group],
1119
1146
  order: -9999,
1120
- icon: config$v.amis.icon,
1147
+ icon: config$x.amis.icon,
1121
1148
  scaffold: {
1122
- type: config$v.amis.name,
1123
- label: config$v.title,
1149
+ type: config$x.amis.name,
1150
+ label: config$x.title,
1124
1151
  objectApiName: "${objectName}",
1125
1152
  fields: ["name"],
1126
1153
  // className: "sm:border sm:rounded sm:border-gray-300"
1127
1154
  },
1128
1155
  previewSchema: {
1129
- type: config$v.amis.name,
1156
+ type: config$x.amis.name,
1130
1157
  objectApiName: 'space_users',
1131
1158
  fields: ["name"]
1132
1159
  },
@@ -1423,7 +1450,7 @@
1423
1450
  * @LastEditTime: 2023-03-06 14:31:08
1424
1451
  * @Description:
1425
1452
  */
1426
- var config$u = {
1453
+ var config$w = {
1427
1454
  componentType: 'amisSchema',
1428
1455
  group: "华炎魔方",
1429
1456
  componentName: "AmisRecordDetailHeader",
@@ -1460,38 +1487,38 @@
1460
1487
  icon: "fa-fw fa fa-list-alt"
1461
1488
  }
1462
1489
  };
1463
- var AmisRecordDetailHeader = __assign(__assign({}, config$u), { snippets: [
1490
+ var AmisRecordDetailHeader = __assign(__assign({}, config$w), { snippets: [
1464
1491
  {
1465
- title: config$u.title,
1492
+ title: config$w.title,
1466
1493
  screenshot: "",
1467
1494
  schema: {
1468
- componentName: config$u.componentName,
1469
- props: config$u.preview
1495
+ componentName: config$w.componentName,
1496
+ props: config$w.preview
1470
1497
  }
1471
1498
  }
1472
1499
  ], amis: {
1473
1500
  render: {
1474
- type: config$u.amis.name,
1501
+ type: config$w.amis.name,
1475
1502
  usage: "renderer",
1476
1503
  weight: 1,
1477
1504
  framework: "react"
1478
1505
  },
1479
1506
  plugin: {
1480
- rendererName: config$u.amis.name,
1507
+ rendererName: config$w.amis.name,
1481
1508
  $schema: '/schemas/UnkownSchema.json',
1482
- name: config$u.title,
1483
- description: config$u.description,
1484
- tags: [config$u.group],
1509
+ name: config$w.title,
1510
+ description: config$w.description,
1511
+ tags: [config$w.group],
1485
1512
  order: -9999,
1486
- icon: config$u.amis.icon,
1513
+ icon: config$w.amis.icon,
1487
1514
  scaffold: {
1488
- type: config$u.amis.name,
1489
- label: config$u.title,
1515
+ type: config$w.amis.name,
1516
+ label: config$w.title,
1490
1517
  objectApiName: "${objectName}",
1491
1518
  recordId: "${recordId}"
1492
1519
  },
1493
1520
  previewSchema: {
1494
- type: config$u.amis.name,
1521
+ type: config$w.amis.name,
1495
1522
  objectApiName: 'space_users'
1496
1523
  },
1497
1524
  panelTitle: "设置",
@@ -1534,7 +1561,7 @@
1534
1561
  * @LastEditTime: 2023-04-12 23:29:24
1535
1562
  * @Description:
1536
1563
  */
1537
- var config$t = {
1564
+ var config$v = {
1538
1565
  componentType: 'amisSchema',
1539
1566
  group: "华炎魔方",
1540
1567
  componentName: "AmisRecordDetail",
@@ -1570,34 +1597,34 @@
1570
1597
  icon: "fa-fw fa fa-list-alt"
1571
1598
  }
1572
1599
  };
1573
- var AmisRecordDetail = __assign(__assign({}, config$t), { snippets: [
1600
+ var AmisRecordDetail = __assign(__assign({}, config$v), { snippets: [
1574
1601
  {
1575
- title: config$t.title,
1602
+ title: config$v.title,
1576
1603
  screenshot: "",
1577
1604
  schema: {
1578
- componentName: config$t.componentName,
1579
- props: config$t.preview
1605
+ componentName: config$v.componentName,
1606
+ props: config$v.preview
1580
1607
  }
1581
1608
  }
1582
1609
  ], amis: {
1583
1610
  render: {
1584
- type: config$t.amis.name,
1611
+ type: config$v.amis.name,
1585
1612
  usage: "renderer",
1586
1613
  weight: 1,
1587
1614
  framework: "react"
1588
1615
  },
1589
1616
  plugin__disable: {
1590
- rendererName: config$t.amis.name,
1617
+ rendererName: config$v.amis.name,
1591
1618
  $schema: '/schemas/UnkownSchema.json',
1592
- name: config$t.title,
1593
- description: config$t.title,
1594
- tags: [config$t.group],
1619
+ name: config$v.title,
1620
+ description: config$v.title,
1621
+ tags: [config$v.group],
1595
1622
  order: -9999,
1596
- icon: config$t.amis.icon,
1623
+ icon: config$v.amis.icon,
1597
1624
  scaffold: {
1598
- type: config$t.amis.name,
1625
+ type: config$v.amis.name,
1599
1626
  body: [],
1600
- label: config$t.title,
1627
+ label: config$v.title,
1601
1628
  objectApiName: "${objectName}",
1602
1629
  recordId: "${recordId}"
1603
1630
  },
@@ -1608,7 +1635,7 @@
1608
1635
  }
1609
1636
  ],
1610
1637
  previewSchema: {
1611
- type: config$t.amis.name,
1638
+ type: config$v.amis.name,
1612
1639
  objectApiName: 'space_users'
1613
1640
  },
1614
1641
  panelTitle: "设置",
@@ -1638,7 +1665,7 @@
1638
1665
  }
1639
1666
  } });
1640
1667
 
1641
- var config$s = {
1668
+ var config$u = {
1642
1669
  componentType: 'amisSchema',
1643
1670
  group: "华炎魔方",
1644
1671
  componentName: "AmisRecordService",
@@ -1674,34 +1701,34 @@
1674
1701
  icon: "fa-fw fa fa-list-alt"
1675
1702
  }
1676
1703
  };
1677
- var AmisRecordService = __assign(__assign({}, config$s), { snippets: [
1704
+ var AmisRecordService = __assign(__assign({}, config$u), { snippets: [
1678
1705
  {
1679
- title: config$s.title,
1706
+ title: config$u.title,
1680
1707
  screenshot: "",
1681
1708
  schema: {
1682
- componentName: config$s.componentName,
1683
- props: config$s.preview
1709
+ componentName: config$u.componentName,
1710
+ props: config$u.preview
1684
1711
  }
1685
1712
  }
1686
1713
  ], amis: {
1687
1714
  render: {
1688
- type: config$s.amis.name,
1715
+ type: config$u.amis.name,
1689
1716
  usage: "renderer",
1690
1717
  weight: 1,
1691
1718
  framework: "react"
1692
1719
  },
1693
1720
  plugin: {
1694
- rendererName: config$s.amis.name,
1721
+ rendererName: config$u.amis.name,
1695
1722
  $schema: '/schemas/UnkownSchema.json',
1696
- name: config$s.title,
1697
- description: config$s.title,
1698
- tags: [config$s.group],
1723
+ name: config$u.title,
1724
+ description: config$u.title,
1725
+ tags: [config$u.group],
1699
1726
  order: -9999,
1700
- icon: config$s.amis.icon,
1727
+ icon: config$u.amis.icon,
1701
1728
  scaffold: {
1702
- type: config$s.amis.name,
1729
+ type: config$u.amis.name,
1703
1730
  body: [],
1704
- label: config$s.title,
1731
+ label: config$u.title,
1705
1732
  objectApiName: "${objectName}",
1706
1733
  recordId: "${recordId}"
1707
1734
  },
@@ -1712,7 +1739,7 @@
1712
1739
  }
1713
1740
  ],
1714
1741
  previewSchema: {
1715
- type: config$s.amis.name,
1742
+ type: config$u.amis.name,
1716
1743
  objectApiName: 'space_users'
1717
1744
  },
1718
1745
  panelTitle: "设置",
@@ -1750,7 +1777,7 @@
1750
1777
  }
1751
1778
  } });
1752
1779
 
1753
- var config$r = {
1780
+ var config$t = {
1754
1781
  componentType: 'amisSchema',
1755
1782
  group: "华炎魔方-界面",
1756
1783
  componentName: "AmisSelectUser",
@@ -1796,37 +1823,37 @@
1796
1823
  icon: "fa-fw fa fa-list-alt"
1797
1824
  }
1798
1825
  };
1799
- var AmisSelectUser = __assign(__assign({}, config$r), { snippets: [
1826
+ var AmisSelectUser = __assign(__assign({}, config$t), { snippets: [
1800
1827
  {
1801
- title: config$r.title,
1828
+ title: config$t.title,
1802
1829
  screenshot: "",
1803
1830
  schema: {
1804
- componentName: config$r.componentName,
1805
- props: config$r.preview
1831
+ componentName: config$t.componentName,
1832
+ props: config$t.preview
1806
1833
  }
1807
1834
  }
1808
1835
  ], amis: {
1809
1836
  render: {
1810
- type: config$r.amis.name,
1837
+ type: config$t.amis.name,
1811
1838
  usage: "renderer",
1812
1839
  weight: 1,
1813
1840
  framework: "react"
1814
1841
  },
1815
1842
  plugin_disabled: {
1816
- rendererName: config$r.amis.name,
1843
+ rendererName: config$t.amis.name,
1817
1844
  $schema: '/schemas/UnkownSchema.json',
1818
- name: config$r.title,
1819
- description: config$r.title,
1820
- tags: [config$r.group],
1845
+ name: config$t.title,
1846
+ description: config$t.title,
1847
+ tags: [config$t.group],
1821
1848
  order: -9999,
1822
- icon: config$r.amis.icon,
1849
+ icon: config$t.amis.icon,
1823
1850
  scaffold: {
1824
- type: config$r.amis.name,
1825
- label: config$r.title,
1851
+ type: config$t.amis.name,
1852
+ label: config$t.title,
1826
1853
  name: ""
1827
1854
  },
1828
1855
  previewSchema: {
1829
- type: config$r.amis.name,
1856
+ type: config$t.amis.name,
1830
1857
  },
1831
1858
  panelTitle: "设置",
1832
1859
  panelControls: [
@@ -1857,7 +1884,7 @@
1857
1884
  * @LastEditTime: 2024-02-08 11:00:44
1858
1885
  * @Description:
1859
1886
  */
1860
- var config$q = {
1887
+ var config$s = {
1861
1888
  componentType: 'amisSchema',
1862
1889
  group: "华炎魔方",
1863
1890
  componentName: "AmisRecordDetailRelatedList",
@@ -1909,38 +1936,38 @@
1909
1936
  icon: "fa-fw fa fa-list-alt"
1910
1937
  }
1911
1938
  };
1912
- var AmisRecordDetailRelatedList = __assign(__assign({}, config$q), { snippets: [
1939
+ var AmisRecordDetailRelatedList = __assign(__assign({}, config$s), { snippets: [
1913
1940
  {
1914
- title: config$q.title,
1941
+ title: config$s.title,
1915
1942
  screenshot: "",
1916
1943
  schema: {
1917
- componentName: config$q.componentName,
1918
- props: config$q.preview
1944
+ componentName: config$s.componentName,
1945
+ props: config$s.preview
1919
1946
  }
1920
1947
  }
1921
1948
  ], amis: {
1922
1949
  render: {
1923
- type: config$q.amis.name,
1950
+ type: config$s.amis.name,
1924
1951
  usage: "renderer",
1925
1952
  weight: 1,
1926
1953
  framework: "react"
1927
1954
  },
1928
1955
  plugin: {
1929
- rendererName: config$q.amis.name,
1956
+ rendererName: config$s.amis.name,
1930
1957
  $schema: '/schemas/UnkownSchema.json',
1931
- name: config$q.title,
1932
- description: config$q.description,
1933
- tags: [config$q.group],
1958
+ name: config$s.title,
1959
+ description: config$s.description,
1960
+ tags: [config$s.group],
1934
1961
  order: -9999,
1935
- icon: config$q.amis.icon,
1962
+ icon: config$s.amis.icon,
1936
1963
  scaffold: {
1937
- type: config$q.amis.name,
1938
- label: config$q.title,
1964
+ type: config$s.amis.name,
1965
+ label: config$s.title,
1939
1966
  objectApiName: "${objectName}",
1940
1967
  recordId: "${recordId}"
1941
1968
  },
1942
1969
  previewSchema: {
1943
- type: config$q.amis.name,
1970
+ type: config$s.amis.name,
1944
1971
  objectApiName: "accounts"
1945
1972
  },
1946
1973
  panelTitle: "设置",
@@ -2100,7 +2127,7 @@
2100
2127
  * @LastEditTime: 2022-12-01 16:08:49
2101
2128
  * @Description:
2102
2129
  */
2103
- var config$p = {
2130
+ var config$r = {
2104
2131
  componentType: 'amisSchema',
2105
2132
  group: "华炎魔方",
2106
2133
  componentName: "AmisRecordDetailRelatedLists",
@@ -2137,38 +2164,38 @@
2137
2164
  icon: "fa-fw fa fa-list-alt"
2138
2165
  }
2139
2166
  };
2140
- var AmisRecordDetailRelatedLists = __assign(__assign({}, config$p), { snippets: [
2167
+ var AmisRecordDetailRelatedLists = __assign(__assign({}, config$r), { snippets: [
2141
2168
  {
2142
- title: config$p.title,
2169
+ title: config$r.title,
2143
2170
  screenshot: "",
2144
2171
  schema: {
2145
- componentName: config$p.componentName,
2146
- props: config$p.preview
2172
+ componentName: config$r.componentName,
2173
+ props: config$r.preview
2147
2174
  }
2148
2175
  }
2149
2176
  ], amis: {
2150
2177
  render: {
2151
- type: config$p.amis.name,
2178
+ type: config$r.amis.name,
2152
2179
  usage: "renderer",
2153
2180
  weight: 1,
2154
2181
  framework: "react"
2155
2182
  },
2156
2183
  plugin: {
2157
- rendererName: config$p.amis.name,
2184
+ rendererName: config$r.amis.name,
2158
2185
  $schema: '/schemas/UnkownSchema.json',
2159
- name: config$p.title,
2160
- description: config$p.description,
2161
- tags: [config$p.group],
2186
+ name: config$r.title,
2187
+ description: config$r.description,
2188
+ tags: [config$r.group],
2162
2189
  order: -9999,
2163
- icon: config$p.amis.icon,
2190
+ icon: config$r.amis.icon,
2164
2191
  scaffold: {
2165
- type: config$p.amis.name,
2166
- label: config$p.title,
2192
+ type: config$r.amis.name,
2193
+ label: config$r.title,
2167
2194
  objectApiName: "${objectName}",
2168
2195
  recordId: "${recordId}",
2169
2196
  },
2170
2197
  previewSchema: {
2171
- type: config$p.amis.name,
2198
+ type: config$r.amis.name,
2172
2199
  objectApiName: "accounts",
2173
2200
  },
2174
2201
  panelTitle: "设置",
@@ -2205,7 +2232,7 @@
2205
2232
  * @LastEditTime: 2022-09-02 09:04:33
2206
2233
  * @Description:
2207
2234
  */
2208
- var config$o = {
2235
+ var config$q = {
2209
2236
  componentType: 'amisSchema',
2210
2237
  group: "华炎魔方",
2211
2238
  componentName: "AmisProvider",
@@ -2230,33 +2257,33 @@
2230
2257
  icon: "fa-fw fa fa-list-alt"
2231
2258
  }
2232
2259
  };
2233
- var AmisProvider = __assign(__assign({}, config$o), { snippets: [
2260
+ var AmisProvider = __assign(__assign({}, config$q), { snippets: [
2234
2261
  {
2235
- title: config$o.title,
2262
+ title: config$q.title,
2236
2263
  screenshot: "",
2237
2264
  schema: {
2238
- componentName: config$o.componentName,
2239
- props: config$o.preview
2265
+ componentName: config$q.componentName,
2266
+ props: config$q.preview
2240
2267
  }
2241
2268
  }
2242
2269
  ], amis: {
2243
2270
  render: {
2244
- type: config$o.amis.name,
2271
+ type: config$q.amis.name,
2245
2272
  usage: "renderer",
2246
2273
  weight: 1,
2247
2274
  framework: "react"
2248
2275
  },
2249
2276
  plugin_disabled: {
2250
- rendererName: config$o.amis.name,
2277
+ rendererName: config$q.amis.name,
2251
2278
  $schema: '/schemas/UnkownSchema.json',
2252
- name: config$o.title,
2253
- description: config$o.title,
2254
- tags: [config$o.group],
2279
+ name: config$q.title,
2280
+ description: config$q.title,
2281
+ tags: [config$q.group],
2255
2282
  order: -9999,
2256
- icon: config$o.amis.icon,
2283
+ icon: config$q.amis.icon,
2257
2284
  scaffold: {
2258
- type: config$o.amis.name,
2259
- label: config$o.title,
2285
+ type: config$q.amis.name,
2286
+ label: config$q.title,
2260
2287
  body: [], // 容器类字段
2261
2288
  },
2262
2289
  // 容器类组件必需字段
@@ -2267,7 +2294,7 @@
2267
2294
  },
2268
2295
  ],
2269
2296
  previewSchema: {
2270
- type: config$o.amis.name,
2297
+ type: config$q.amis.name,
2271
2298
  },
2272
2299
  panelTitle: "设置",
2273
2300
  panelControls: []
@@ -2281,7 +2308,7 @@
2281
2308
  * @LastEditTime: 2022-12-26 11:26:17
2282
2309
  * @Description:
2283
2310
  */
2284
- var config$n = {
2311
+ var config$p = {
2285
2312
  // componentType: 'amisSchema',
2286
2313
  group: "华炎魔方",
2287
2314
  componentName: "AmisObjectFieldLookup",
@@ -2305,18 +2332,18 @@
2305
2332
  icon: "fa-fw fa fa-list-alt"
2306
2333
  }
2307
2334
  };
2308
- var AmisObjectFieldLookup = __assign(__assign({}, config$n), { snippets: [
2335
+ var AmisObjectFieldLookup = __assign(__assign({}, config$p), { snippets: [
2309
2336
  {
2310
- title: config$n.title,
2337
+ title: config$p.title,
2311
2338
  screenshot: "",
2312
2339
  schema: {
2313
- componentName: config$n.componentName,
2314
- props: config$n.preview
2340
+ componentName: config$p.componentName,
2341
+ props: config$p.preview
2315
2342
  }
2316
2343
  }
2317
2344
  ], amis: {
2318
2345
  render: {
2319
- type: config$n.amis.name,
2346
+ type: config$p.amis.name,
2320
2347
  usage: "formitem",
2321
2348
  weight: 1,
2322
2349
  framework: "react"
@@ -2352,7 +2379,7 @@
2352
2379
  * @LastEditTime: 2023-02-04 12:04:41
2353
2380
  * @Description:
2354
2381
  */
2355
- var config$m = {
2382
+ var config$o = {
2356
2383
  // componentType: 'amisSchema',
2357
2384
  group: "华炎魔方",
2358
2385
  componentName: "AmisObjectButton",
@@ -2376,18 +2403,18 @@
2376
2403
  icon: "fa-fw fa fa-list-alt"
2377
2404
  }
2378
2405
  };
2379
- var AmisObjectButton = __assign(__assign({}, config$m), { snippets: [
2406
+ var AmisObjectButton = __assign(__assign({}, config$o), { snippets: [
2380
2407
  {
2381
- title: config$m.title,
2408
+ title: config$o.title,
2382
2409
  screenshot: "",
2383
2410
  schema: {
2384
- componentName: config$m.componentName,
2385
- props: config$m.preview
2411
+ componentName: config$o.componentName,
2412
+ props: config$o.preview
2386
2413
  }
2387
2414
  }
2388
2415
  ], amis: {
2389
2416
  render: {
2390
- type: config$m.amis.name,
2417
+ type: config$o.amis.name,
2391
2418
  usage: "renderer",
2392
2419
  weight: 1,
2393
2420
  framework: "react"
@@ -2423,7 +2450,7 @@
2423
2450
  * @LastEditTime: 2022-11-14 10:09:25
2424
2451
  * @Description:
2425
2452
  */
2426
- var config$l = {
2453
+ var config$n = {
2427
2454
  // componentType: 'amisSchema',
2428
2455
  group: "华炎魔方",
2429
2456
  componentName: "SteedosDropdownButton",
@@ -2447,18 +2474,18 @@
2447
2474
  icon: "fa-fw fa fa-list-alt"
2448
2475
  }
2449
2476
  };
2450
- var SteedosDropdownButton = __assign(__assign({}, config$l), { snippets: [
2477
+ var SteedosDropdownButton = __assign(__assign({}, config$n), { snippets: [
2451
2478
  {
2452
- title: config$l.title,
2479
+ title: config$n.title,
2453
2480
  screenshot: "",
2454
2481
  schema: {
2455
- componentName: config$l.componentName,
2456
- props: config$l.preview
2482
+ componentName: config$n.componentName,
2483
+ props: config$n.preview
2457
2484
  }
2458
2485
  }
2459
2486
  ], amis: {
2460
2487
  render: {
2461
- type: config$l.amis.name,
2488
+ type: config$n.amis.name,
2462
2489
  usage: "renderer",
2463
2490
  weight: 1,
2464
2491
  framework: "react"
@@ -2494,7 +2521,7 @@
2494
2521
  * @LastEditTime: 2022-12-13 12:04:13
2495
2522
  * @Description:
2496
2523
  */
2497
- var config$k = {
2524
+ var config$m = {
2498
2525
  componentType: 'amisSchema',
2499
2526
  group: "华炎魔方",
2500
2527
  componentName: "AmisAppLauncher",
@@ -2518,39 +2545,39 @@
2518
2545
  icon: "fa-fw fa fa-list-alt"
2519
2546
  }
2520
2547
  };
2521
- var AmisAppLauncher = __assign(__assign({}, config$k), { snippets: [
2548
+ var AmisAppLauncher = __assign(__assign({}, config$m), { snippets: [
2522
2549
  {
2523
- title: config$k.title,
2550
+ title: config$m.title,
2524
2551
  screenshot: "",
2525
2552
  schema: {
2526
- componentName: config$k.componentName,
2527
- props: config$k.preview
2553
+ componentName: config$m.componentName,
2554
+ props: config$m.preview
2528
2555
  }
2529
2556
  }
2530
2557
  ], amis: {
2531
2558
  render: {
2532
- type: config$k.amis.name,
2559
+ type: config$m.amis.name,
2533
2560
  usage: "renderer",
2534
2561
  weight: 1,
2535
2562
  framework: "react"
2536
2563
  },
2537
2564
  plugin_disabled: {
2538
- rendererName: config$k.amis.name,
2565
+ rendererName: config$m.amis.name,
2539
2566
  $schema: '/schemas/UnkownSchema.json',
2540
- name: config$k.title,
2541
- description: config$k.title,
2542
- tags: [config$k.group],
2567
+ name: config$m.title,
2568
+ description: config$m.title,
2569
+ tags: [config$m.group],
2543
2570
  order: -9999,
2544
- icon: config$k.amis.icon,
2571
+ icon: config$m.amis.icon,
2545
2572
  scaffold: {
2546
- type: config$k.amis.name,
2547
- label: config$k.title,
2573
+ type: config$m.amis.name,
2574
+ label: config$m.title,
2548
2575
  name: 'board',
2549
2576
  columns: 1,
2550
2577
  vertical: false
2551
2578
  },
2552
2579
  previewSchema: {
2553
- type: config$k.amis.name,
2580
+ type: config$m.amis.name,
2554
2581
  },
2555
2582
  panelTitle: "设置",
2556
2583
  panelControls: []
@@ -2564,7 +2591,7 @@
2564
2591
  * @LastEditTime: 2022-12-13 12:08:37
2565
2592
  * @Description:
2566
2593
  */
2567
- var config$j = {
2594
+ var config$l = {
2568
2595
  componentType: 'amisSchema',
2569
2596
  group: "华炎魔方",
2570
2597
  componentName: "AmisLogo",
@@ -2588,39 +2615,39 @@
2588
2615
  icon: "fa-fw fa fa-list-alt"
2589
2616
  }
2590
2617
  };
2591
- var AmisLogo = __assign(__assign({}, config$j), { snippets: [
2618
+ var AmisLogo = __assign(__assign({}, config$l), { snippets: [
2592
2619
  {
2593
- title: config$j.title,
2620
+ title: config$l.title,
2594
2621
  screenshot: "",
2595
2622
  schema: {
2596
- componentName: config$j.componentName,
2597
- props: config$j.preview
2623
+ componentName: config$l.componentName,
2624
+ props: config$l.preview
2598
2625
  }
2599
2626
  }
2600
2627
  ], amis: {
2601
2628
  render: {
2602
- type: config$j.amis.name,
2629
+ type: config$l.amis.name,
2603
2630
  usage: "renderer",
2604
2631
  weight: 1,
2605
2632
  framework: "react"
2606
2633
  },
2607
2634
  plugin_disabled: {
2608
- rendererName: config$j.amis.name,
2635
+ rendererName: config$l.amis.name,
2609
2636
  $schema: '/schemas/UnkownSchema.json',
2610
- name: config$j.title,
2611
- description: config$j.title,
2612
- tags: [config$j.group],
2637
+ name: config$l.title,
2638
+ description: config$l.title,
2639
+ tags: [config$l.group],
2613
2640
  order: -9999,
2614
- icon: config$j.amis.icon,
2641
+ icon: config$l.amis.icon,
2615
2642
  scaffold: {
2616
- type: config$j.amis.name,
2617
- label: config$j.title,
2643
+ type: config$l.amis.name,
2644
+ label: config$l.title,
2618
2645
  name: 'board',
2619
2646
  columns: 1,
2620
2647
  vertical: false
2621
2648
  },
2622
2649
  previewSchema: {
2623
- type: config$j.amis.name,
2650
+ type: config$l.amis.name,
2624
2651
  },
2625
2652
  panelTitle: "设置",
2626
2653
  panelControls: []
@@ -2634,7 +2661,7 @@
2634
2661
  * @LastEditTime: 2022-12-16 14:17:37
2635
2662
  * @Description:
2636
2663
  */
2637
- var config$i = {
2664
+ var config$k = {
2638
2665
  componentType: 'amisSchema',
2639
2666
  group: "华炎魔方",
2640
2667
  componentName: "AmisAppMenu",
@@ -2665,39 +2692,39 @@
2665
2692
  icon: "fa-fw fa fa-list-alt"
2666
2693
  }
2667
2694
  };
2668
- var AmisAppMenu = __assign(__assign({}, config$i), { snippets: [
2695
+ var AmisAppMenu = __assign(__assign({}, config$k), { snippets: [
2669
2696
  {
2670
- title: config$i.title,
2697
+ title: config$k.title,
2671
2698
  screenshot: "",
2672
2699
  schema: {
2673
- componentName: config$i.componentName,
2674
- props: config$i.preview
2700
+ componentName: config$k.componentName,
2701
+ props: config$k.preview
2675
2702
  }
2676
2703
  }
2677
2704
  ], amis: {
2678
2705
  render: {
2679
- type: config$i.amis.name,
2706
+ type: config$k.amis.name,
2680
2707
  usage: "renderer",
2681
2708
  weight: 1,
2682
2709
  framework: "react"
2683
2710
  },
2684
2711
  plugin_disabled: {
2685
- rendererName: config$i.amis.name,
2712
+ rendererName: config$k.amis.name,
2686
2713
  $schema: '/schemas/UnkownSchema.json',
2687
- name: config$i.title,
2688
- description: config$i.title,
2689
- tags: [config$i.group],
2714
+ name: config$k.title,
2715
+ description: config$k.title,
2716
+ tags: [config$k.group],
2690
2717
  order: -9999,
2691
- icon: config$i.amis.icon,
2718
+ icon: config$k.amis.icon,
2692
2719
  scaffold: {
2693
- type: config$i.amis.name,
2694
- label: config$i.title,
2720
+ type: config$k.amis.name,
2721
+ label: config$k.title,
2695
2722
  columns: 1,
2696
2723
  vertical: false,
2697
2724
  showIcon: true
2698
2725
  },
2699
2726
  previewSchema: {
2700
- type: config$i.amis.name,
2727
+ type: config$k.amis.name,
2701
2728
  },
2702
2729
  panelTitle: "设置",
2703
2730
  panelControls: [
@@ -2722,7 +2749,7 @@
2722
2749
  * @LastEditTime: 2022-12-14 13:38:52
2723
2750
  * @Description:
2724
2751
  */
2725
- var config$h = {
2752
+ var config$j = {
2726
2753
  componentType: 'amisSchema',
2727
2754
  group: "华炎魔方",
2728
2755
  componentName: "AmisGlobalHeaderToolbar",
@@ -2747,38 +2774,38 @@
2747
2774
  icon: "fa-fw fa fa-list-alt"
2748
2775
  }
2749
2776
  };
2750
- var AmisGlobalHeaderToolbar = __assign(__assign({}, config$h), { snippets: [
2777
+ var AmisGlobalHeaderToolbar = __assign(__assign({}, config$j), { snippets: [
2751
2778
  {
2752
- title: config$h.title,
2779
+ title: config$j.title,
2753
2780
  screenshot: "",
2754
2781
  schema: {
2755
- componentName: config$h.componentName,
2756
- props: config$h.preview
2782
+ componentName: config$j.componentName,
2783
+ props: config$j.preview
2757
2784
  }
2758
2785
  }
2759
2786
  ], amis: {
2760
2787
  render: {
2761
- type: config$h.amis.name,
2788
+ type: config$j.amis.name,
2762
2789
  usage: "renderer",
2763
2790
  weight: 1,
2764
2791
  framework: "react"
2765
2792
  },
2766
2793
  plugin_disabled: {
2767
- rendererName: config$h.amis.name,
2794
+ rendererName: config$j.amis.name,
2768
2795
  $schema: '/schemas/UnkownSchema.json',
2769
- name: config$h.title,
2770
- description: config$h.title,
2771
- tags: [config$h.group],
2796
+ name: config$j.title,
2797
+ description: config$j.title,
2798
+ tags: [config$j.group],
2772
2799
  order: -9999,
2773
- icon: config$h.amis.icon,
2800
+ icon: config$j.amis.icon,
2774
2801
  scaffold: {
2775
- type: config$h.amis.name,
2776
- label: config$h.title,
2802
+ type: config$j.amis.name,
2803
+ label: config$j.title,
2777
2804
  columns: 1,
2778
2805
  vertical: false
2779
2806
  },
2780
2807
  previewSchema: {
2781
- type: config$h.amis.name,
2808
+ type: config$j.amis.name,
2782
2809
  },
2783
2810
  panelTitle: "设置",
2784
2811
  panelControls: []
@@ -2792,7 +2819,7 @@
2792
2819
  * @LastEditTime: 2023-03-09 19:01:32
2793
2820
  * @Description:
2794
2821
  */
2795
- var config$g = {
2822
+ var config$i = {
2796
2823
  // componentType: 'amisSchema',
2797
2824
  group: "华炎魔方-原子组件",
2798
2825
  componentName: "SteedosIcon",
@@ -2816,39 +2843,39 @@
2816
2843
  icon: "fa-fw fa fa-list-alt"
2817
2844
  }
2818
2845
  };
2819
- var SteedosIcon = __assign(__assign({}, config$g), { snippets: [
2846
+ var SteedosIcon = __assign(__assign({}, config$i), { snippets: [
2820
2847
  {
2821
- title: config$g.title,
2848
+ title: config$i.title,
2822
2849
  screenshot: "",
2823
2850
  schema: {
2824
- componentName: config$g.componentName,
2825
- props: config$g.preview
2851
+ componentName: config$i.componentName,
2852
+ props: config$i.preview
2826
2853
  }
2827
2854
  }
2828
2855
  ], amis: {
2829
2856
  render: {
2830
- type: config$g.amis.name,
2857
+ type: config$i.amis.name,
2831
2858
  usage: "renderer",
2832
2859
  weight: 1,
2833
2860
  framework: "react"
2834
2861
  },
2835
2862
  plugin: {
2836
- rendererName: config$g.amis.name,
2863
+ rendererName: config$i.amis.name,
2837
2864
  $schema: '/schemas/UnkownSchema.json',
2838
- name: config$g.title,
2839
- description: config$g.title,
2840
- tags: [config$g.group],
2865
+ name: config$i.title,
2866
+ description: config$i.title,
2867
+ tags: [config$i.group],
2841
2868
  order: -9999,
2842
- icon: config$g.amis.icon,
2869
+ icon: config$i.amis.icon,
2843
2870
  scaffold: {
2844
- type: config$g.amis.name,
2871
+ type: config$i.amis.name,
2845
2872
  category: 'standard',
2846
2873
  name: 'account',
2847
2874
  colorVariant: 'default',
2848
2875
  size: 'medium'
2849
2876
  },
2850
2877
  previewSchema: {
2851
- type: config$g.amis.name,
2878
+ type: config$i.amis.name,
2852
2879
  },
2853
2880
  panelTitle: "设置",
2854
2881
  panelControls: [
@@ -2943,7 +2970,7 @@
2943
2970
  * @LastEditTime: 2022-12-16 11:11:32
2944
2971
  * @Description:
2945
2972
  */
2946
- var config$f = {
2973
+ var config$h = {
2947
2974
  // componentType: 'amisSchema',
2948
2975
  group: "华炎魔方",
2949
2976
  componentName: "SteedosDropdown",
@@ -2967,32 +2994,32 @@
2967
2994
  icon: "fa-fw fa fa-list-alt"
2968
2995
  }
2969
2996
  };
2970
- var SteedosDropdown = __assign(__assign({}, config$f), { snippets: [
2997
+ var SteedosDropdown = __assign(__assign({}, config$h), { snippets: [
2971
2998
  {
2972
- title: config$f.title,
2999
+ title: config$h.title,
2973
3000
  screenshot: "",
2974
3001
  schema: {
2975
- componentName: config$f.componentName,
2976
- props: config$f.preview
3002
+ componentName: config$h.componentName,
3003
+ props: config$h.preview
2977
3004
  }
2978
3005
  }
2979
3006
  ], amis: {
2980
3007
  render: {
2981
- type: config$f.amis.name,
3008
+ type: config$h.amis.name,
2982
3009
  usage: "renderer",
2983
3010
  weight: 1,
2984
3011
  framework: "react"
2985
3012
  },
2986
3013
  plugin_disabled: {
2987
- rendererName: config$f.amis.name,
3014
+ rendererName: config$h.amis.name,
2988
3015
  $schema: '/schemas/UnkownSchema.json',
2989
- name: config$f.title,
2990
- description: config$f.title,
2991
- tags: [config$f.group],
3016
+ name: config$h.title,
3017
+ description: config$h.title,
3018
+ tags: [config$h.group],
2992
3019
  order: -9999,
2993
- icon: config$f.amis.icon,
3020
+ icon: config$h.amis.icon,
2994
3021
  scaffold: {
2995
- type: config$f.amis.name,
3022
+ type: config$h.amis.name,
2996
3023
  placement: 'bottomLeft',
2997
3024
  trigger: ['click'],
2998
3025
  body: [],
@@ -3009,7 +3036,7 @@
3009
3036
  },
3010
3037
  ],
3011
3038
  previewSchema: {
3012
- type: config$f.amis.name,
3039
+ type: config$h.amis.name,
3013
3040
  },
3014
3041
  panelTitle: "设置",
3015
3042
  panelControls: [
@@ -3057,7 +3084,7 @@
3057
3084
  * @LastEditTime: 2022-12-16 11:10:51
3058
3085
  * @Description:
3059
3086
  */
3060
- var config$e = {
3087
+ var config$g = {
3061
3088
  // componentType: 'amisSchema',
3062
3089
  group: "华炎魔方",
3063
3090
  componentName: "FromNow",
@@ -3081,18 +3108,18 @@
3081
3108
  icon: "fa-fw fa fa-list-alt"
3082
3109
  }
3083
3110
  };
3084
- var FromNow = __assign(__assign({}, config$e), { snippets: [
3111
+ var FromNow = __assign(__assign({}, config$g), { snippets: [
3085
3112
  {
3086
- title: config$e.title,
3113
+ title: config$g.title,
3087
3114
  screenshot: "",
3088
3115
  schema: {
3089
- componentName: config$e.componentName,
3090
- props: config$e.preview
3116
+ componentName: config$g.componentName,
3117
+ props: config$g.preview
3091
3118
  }
3092
3119
  }
3093
3120
  ], amis: {
3094
3121
  render: {
3095
- type: config$e.amis.name,
3122
+ type: config$g.amis.name,
3096
3123
  usage: "renderer",
3097
3124
  weight: 1,
3098
3125
  framework: "react"
@@ -3130,7 +3157,7 @@
3130
3157
  * @LastEditTime: 2022-12-16 14:17:37
3131
3158
  * @Description:
3132
3159
  */
3133
- var config$d = {
3160
+ var config$f = {
3134
3161
  componentType: 'amisSchema',
3135
3162
  group: "华炎魔方",
3136
3163
  componentName: "AmisGlobalHeader",
@@ -3161,39 +3188,39 @@
3161
3188
  icon: "fa-fw fa fa-list-alt"
3162
3189
  }
3163
3190
  };
3164
- var AmisGlobalHeader = __assign(__assign({}, config$d), { snippets: [
3191
+ var AmisGlobalHeader = __assign(__assign({}, config$f), { snippets: [
3165
3192
  {
3166
- title: config$d.title,
3193
+ title: config$f.title,
3167
3194
  screenshot: "",
3168
3195
  schema: {
3169
- componentName: config$d.componentName,
3170
- props: config$d.preview
3196
+ componentName: config$f.componentName,
3197
+ props: config$f.preview
3171
3198
  }
3172
3199
  }
3173
3200
  ], amis: {
3174
3201
  render: {
3175
- type: config$d.amis.name,
3202
+ type: config$f.amis.name,
3176
3203
  usage: "renderer",
3177
3204
  weight: 1,
3178
3205
  framework: "react"
3179
3206
  },
3180
3207
  plugin_disabled: {
3181
- rendererName: config$d.amis.name,
3208
+ rendererName: config$f.amis.name,
3182
3209
  $schema: '/schemas/UnkownSchema.json',
3183
- name: config$d.title,
3184
- description: config$d.title,
3185
- tags: [config$d.group],
3210
+ name: config$f.title,
3211
+ description: config$f.title,
3212
+ tags: [config$f.group],
3186
3213
  order: -9999,
3187
- icon: config$d.amis.icon,
3214
+ icon: config$f.amis.icon,
3188
3215
  scaffold: {
3189
- type: config$d.amis.name,
3190
- label: config$d.title,
3216
+ type: config$f.amis.name,
3217
+ label: config$f.title,
3191
3218
  columns: 1,
3192
3219
  vertical: false,
3193
3220
  showIcon: true
3194
3221
  },
3195
3222
  previewSchema: {
3196
- type: config$d.amis.name,
3223
+ type: config$f.amis.name,
3197
3224
  },
3198
3225
  panelTitle: "设置",
3199
3226
  panelControls: []
@@ -3207,7 +3234,7 @@
3207
3234
  * @LastEditTime: 2022-12-16 14:17:37
3208
3235
  * @Description:
3209
3236
  */
3210
- var config$c = {
3237
+ var config$e = {
3211
3238
  componentType: 'amisSchema',
3212
3239
  group: "华炎魔方",
3213
3240
  componentName: "AmisGlobalFooter",
@@ -3238,36 +3265,36 @@
3238
3265
  icon: "fa-fw fa fa-list-alt"
3239
3266
  }
3240
3267
  };
3241
- var AmisGlobalFooter = __assign(__assign({}, config$c), { snippets: [
3268
+ var AmisGlobalFooter = __assign(__assign({}, config$e), { snippets: [
3242
3269
  {
3243
- title: config$c.title,
3270
+ title: config$e.title,
3244
3271
  screenshot: "",
3245
3272
  schema: {
3246
- componentName: config$c.componentName,
3247
- props: config$c.preview
3273
+ componentName: config$e.componentName,
3274
+ props: config$e.preview
3248
3275
  }
3249
3276
  }
3250
3277
  ], amis: {
3251
3278
  render: {
3252
- type: config$c.amis.name,
3279
+ type: config$e.amis.name,
3253
3280
  usage: "renderer",
3254
3281
  weight: 1,
3255
3282
  framework: "react"
3256
3283
  },
3257
3284
  plugin_disabled: {
3258
- rendererName: config$c.amis.name,
3285
+ rendererName: config$e.amis.name,
3259
3286
  $schema: '/schemas/UnkownSchema.json',
3260
- name: config$c.title,
3261
- description: config$c.title,
3262
- tags: [config$c.group],
3287
+ name: config$e.title,
3288
+ description: config$e.title,
3289
+ tags: [config$e.group],
3263
3290
  order: -9999,
3264
- icon: config$c.amis.icon,
3291
+ icon: config$e.amis.icon,
3265
3292
  scaffold: {
3266
- type: config$c.amis.name,
3267
- label: config$c.title
3293
+ type: config$e.amis.name,
3294
+ label: config$e.title
3268
3295
  },
3269
3296
  previewSchema: {
3270
- type: config$c.amis.name,
3297
+ type: config$e.amis.name,
3271
3298
  },
3272
3299
  panelTitle: "设置",
3273
3300
  panelControls: []
@@ -3281,7 +3308,7 @@
3281
3308
  * @LastEditTime: 2022-12-16 10:15:58
3282
3309
  * @Description:
3283
3310
  */
3284
- var config$b = {
3311
+ var config$d = {
3285
3312
  group: "华炎魔方",
3286
3313
  componentName: "SteedosLoading",
3287
3314
  title: "加载中",
@@ -3304,18 +3331,18 @@
3304
3331
  icon: "fa-fw fa fa-list-alt"
3305
3332
  }
3306
3333
  };
3307
- var SteedosLoading = __assign(__assign({}, config$b), { snippets: [
3334
+ var SteedosLoading = __assign(__assign({}, config$d), { snippets: [
3308
3335
  {
3309
- title: config$b.title,
3336
+ title: config$d.title,
3310
3337
  screenshot: "",
3311
3338
  schema: {
3312
- componentName: config$b.componentName,
3313
- props: config$b.preview
3339
+ componentName: config$d.componentName,
3340
+ props: config$d.preview
3314
3341
  }
3315
3342
  }
3316
3343
  ], amis: {
3317
3344
  render: {
3318
- type: config$b.amis.name,
3345
+ type: config$d.amis.name,
3319
3346
  usage: "renderer",
3320
3347
  weight: 1,
3321
3348
  framework: "react"
@@ -3329,7 +3356,7 @@
3329
3356
  * @LastEditTime: 2023-04-07 18:31:37
3330
3357
  * @Description:
3331
3358
  */
3332
- var config$a = {
3359
+ var config$c = {
3333
3360
  // componentType: 'amisSchema',
3334
3361
  group: "华炎魔方-原子组件",
3335
3362
  componentName: "SteedosBadge",
@@ -3353,32 +3380,32 @@
3353
3380
  icon: "fa-fw fa fa-list-alt"
3354
3381
  }
3355
3382
  };
3356
- var SteedosBadge = __assign(__assign({}, config$a), { snippets: [
3383
+ var SteedosBadge = __assign(__assign({}, config$c), { snippets: [
3357
3384
  {
3358
- title: config$a.title,
3385
+ title: config$c.title,
3359
3386
  screenshot: "",
3360
3387
  schema: {
3361
- componentName: config$a.componentName,
3362
- props: config$a.preview
3388
+ componentName: config$c.componentName,
3389
+ props: config$c.preview
3363
3390
  }
3364
3391
  }
3365
3392
  ], amis: {
3366
3393
  render: {
3367
- type: config$a.amis.name,
3394
+ type: config$c.amis.name,
3368
3395
  usage: "renderer",
3369
3396
  weight: 1,
3370
3397
  framework: "react"
3371
3398
  },
3372
3399
  plugin: {
3373
- rendererName: config$a.amis.name,
3400
+ rendererName: config$c.amis.name,
3374
3401
  $schema: '/schemas/UnkownSchema.json',
3375
- name: config$a.title,
3376
- description: config$a.title,
3377
- tags: [config$a.group],
3402
+ name: config$c.title,
3403
+ description: config$c.title,
3404
+ tags: [config$c.group],
3378
3405
  order: -9999,
3379
- icon: config$a.amis.icon,
3406
+ icon: config$c.amis.icon,
3380
3407
  scaffold: {
3381
- type: config$a.amis.name,
3408
+ type: config$c.amis.name,
3382
3409
  count: 100,
3383
3410
  body: [], // 容器类字段
3384
3411
  },
@@ -3389,7 +3416,7 @@
3389
3416
  }
3390
3417
  ],
3391
3418
  previewSchema: {
3392
- type: config$a.amis.name,
3419
+ type: config$c.amis.name,
3393
3420
  },
3394
3421
  panelTitle: "设置",
3395
3422
  panelControls: [
@@ -3465,7 +3492,7 @@
3465
3492
  * @LastEditTime: 2023-03-09 19:00:03
3466
3493
  * @Description:
3467
3494
  */
3468
- var config$9 = {
3495
+ var config$b = {
3469
3496
  // componentType: 'amisSchema',
3470
3497
  group: "华炎魔方-原子组件",
3471
3498
  componentName: "SteedosBadgeRibbon",
@@ -3489,32 +3516,32 @@
3489
3516
  icon: "fa-fw fa fa-list-alt"
3490
3517
  }
3491
3518
  };
3492
- var SteedosBadgeRibbon = __assign(__assign({}, config$9), { snippets: [
3519
+ var SteedosBadgeRibbon = __assign(__assign({}, config$b), { snippets: [
3493
3520
  {
3494
- title: config$9.title,
3521
+ title: config$b.title,
3495
3522
  screenshot: "",
3496
3523
  schema: {
3497
- componentName: config$9.componentName,
3498
- props: config$9.preview
3524
+ componentName: config$b.componentName,
3525
+ props: config$b.preview
3499
3526
  }
3500
3527
  }
3501
3528
  ], amis: {
3502
3529
  render: {
3503
- type: config$9.amis.name,
3530
+ type: config$b.amis.name,
3504
3531
  usage: "renderer",
3505
3532
  weight: 1,
3506
3533
  framework: "react"
3507
3534
  },
3508
3535
  plugin: {
3509
- rendererName: config$9.amis.name,
3536
+ rendererName: config$b.amis.name,
3510
3537
  $schema: '/schemas/UnkownSchema.json',
3511
- name: config$9.title,
3512
- description: config$9.title,
3513
- tags: [config$9.group],
3538
+ name: config$b.title,
3539
+ description: config$b.title,
3540
+ tags: [config$b.group],
3514
3541
  order: -9999,
3515
- icon: config$9.amis.icon,
3542
+ icon: config$b.amis.icon,
3516
3543
  scaffold: {
3517
- type: config$9.amis.name,
3544
+ type: config$b.amis.name,
3518
3545
  body: [], // 容器类字段
3519
3546
  },
3520
3547
  regions: [
@@ -3524,7 +3551,7 @@
3524
3551
  }
3525
3552
  ],
3526
3553
  previewSchema: {
3527
- type: config$9.amis.name,
3554
+ type: config$b.amis.name,
3528
3555
  },
3529
3556
  panelTitle: "设置",
3530
3557
  panelControls: [
@@ -3555,10 +3582,10 @@
3555
3582
  * @Author: baozhoutao@steedos.com
3556
3583
  * @Date: 2022-10-11 09:39:38
3557
3584
  * @LastEditors: baozhoutao@steedos.com
3558
- * @LastEditTime: 2023-06-30 14:41:35
3585
+ * @LastEditTime: 2024-08-28 14:43:01
3559
3586
  * @Description:
3560
3587
  */
3561
- var config$8 = {
3588
+ var config$a = {
3562
3589
  componentType: 'amisSchema',
3563
3590
  group: "华炎魔方-原子组件",
3564
3591
  componentName: "AmisSteedosField",
@@ -3582,32 +3609,32 @@
3582
3609
  icon: "fa-fw fa fa-list-alt"
3583
3610
  }
3584
3611
  };
3585
- var AmisSteedosField = __assign(__assign({}, config$8), { snippets: [
3612
+ var AmisSteedosField = __assign(__assign({}, config$a), { snippets: [
3586
3613
  {
3587
- title: config$8.title,
3614
+ title: config$a.title,
3588
3615
  screenshot: "",
3589
3616
  schema: {
3590
- componentName: config$8.componentName,
3591
- props: config$8.preview
3617
+ componentName: config$a.componentName,
3618
+ props: config$a.preview
3592
3619
  }
3593
3620
  }
3594
3621
  ], amis: {
3595
3622
  render: {
3596
- type: config$8.amis.name,
3623
+ type: config$a.amis.name,
3597
3624
  usage: "renderer",
3598
3625
  weight: 1,
3599
3626
  framework: "react"
3600
3627
  },
3601
3628
  plugin: {
3602
- rendererName: config$8.amis.name,
3629
+ rendererName: config$a.amis.name,
3603
3630
  $schema: '/schemas/UnkownSchema.json',
3604
- name: config$8.title,
3605
- description: config$8.title,
3606
- tags: [config$8.group],
3631
+ name: config$a.title,
3632
+ description: config$a.title,
3633
+ tags: [config$a.group],
3607
3634
  order: -9999,
3608
- icon: config$8.amis.icon,
3635
+ icon: config$a.amis.icon,
3609
3636
  scaffold: {
3610
- type: config$8.amis.name,
3637
+ type: config$a.amis.name,
3611
3638
  config: {
3612
3639
  "type": "text",
3613
3640
  "label": "字段1",
@@ -3615,7 +3642,7 @@
3615
3642
  }
3616
3643
  },
3617
3644
  previewSchema: {
3618
- type: config$8.amis.name,
3645
+ type: config$a.amis.name,
3619
3646
  config: {
3620
3647
  "type": "text",
3621
3648
  "label": "字段1",
@@ -3625,20 +3652,931 @@
3625
3652
  panelTitle: "设置",
3626
3653
  panelControls: [
3627
3654
  {
3628
- type: "editor",
3629
- name: "config",
3630
- label: "字段定义",
3631
- language: "json",
3632
- pipeOut: function (value) {
3633
- try {
3634
- return value ? JSON.parse(value) : null;
3635
- }
3636
- catch (e) {
3637
- }
3638
- return value;
3639
- }
3640
- }
3641
- ]
3655
+ "type": "tabs",
3656
+ tabsMode: 'line',
3657
+ className: 'editor-prop-config-tabs',
3658
+ linksClassName: 'editor-prop-config-tabs-links',
3659
+ contentClassName: 'no-border editor-prop-config-tabs-cont',
3660
+ "tabs": [
3661
+ {
3662
+ "title": "通用",
3663
+ "className": 'ae-formItemControl-body',
3664
+ "body": [
3665
+ {
3666
+ "type": "input-text",
3667
+ "name": "config.object",
3668
+ "value": "${objectName}",
3669
+ "disabled": true,
3670
+ "label": "对象",
3671
+ "required": true
3672
+ },
3673
+ {
3674
+ "name": "config.type",
3675
+ "label": "字段类型",
3676
+ "required": true,
3677
+ "type": "select",
3678
+ "joinValues": false,
3679
+ "options": [
3680
+ {
3681
+ "label": "文本",
3682
+ "value": "text"
3683
+ },
3684
+ {
3685
+ "label": "长文本",
3686
+ "value": "textarea"
3687
+ },
3688
+ {
3689
+ "label": "富文本",
3690
+ "value": "html"
3691
+ },
3692
+ {
3693
+ "label": "代码",
3694
+ "value": "code"
3695
+ },
3696
+ {
3697
+ "label": "Markdown",
3698
+ "value": "markdown"
3699
+ },
3700
+ {
3701
+ "label": "选择框",
3702
+ "value": "select"
3703
+ },
3704
+ {
3705
+ "label": "颜色",
3706
+ "value": "color"
3707
+ },
3708
+ {
3709
+ "label": "复选框",
3710
+ "value": "boolean"
3711
+ },
3712
+ {
3713
+ "label": "开关",
3714
+ "value": "toggle"
3715
+ },
3716
+ {
3717
+ "label": "日期",
3718
+ "value": "date"
3719
+ },
3720
+ {
3721
+ "label": "日期时间",
3722
+ "value": "datetime"
3723
+ },
3724
+ {
3725
+ "label": "时间",
3726
+ "value": "time"
3727
+ },
3728
+ {
3729
+ "label": "数值",
3730
+ "value": "number"
3731
+ },
3732
+ {
3733
+ "label": "金额",
3734
+ "value": "currency"
3735
+ },
3736
+ {
3737
+ "label": "百分比",
3738
+ "value": "percent"
3739
+ },
3740
+ {
3741
+ "label": "密码",
3742
+ "value": "password"
3743
+ },
3744
+ {
3745
+ "label": "相关表关系",
3746
+ "value": "lookup"
3747
+ },
3748
+ {
3749
+ "label": "主/子表关系",
3750
+ "value": "master_detail"
3751
+ },
3752
+ {
3753
+ "label": "自动编号",
3754
+ "value": "autonumber"
3755
+ },
3756
+ {
3757
+ "label": "网址",
3758
+ "value": "url"
3759
+ },
3760
+ {
3761
+ "label": "邮件地址",
3762
+ "value": "email"
3763
+ },
3764
+ {
3765
+ "label": "地理位置",
3766
+ "value": "location"
3767
+ },
3768
+ {
3769
+ "label": "图片",
3770
+ "value": "image"
3771
+ },
3772
+ {
3773
+ "label": "附件",
3774
+ "value": "file"
3775
+ },
3776
+ {
3777
+ "label": "公式",
3778
+ "value": "formula"
3779
+ },
3780
+ {
3781
+ "label": "累计汇总",
3782
+ "value": "summary"
3783
+ }
3784
+ ],
3785
+ "extractValue": true,
3786
+ "clearable": true,
3787
+ "labelField": "label",
3788
+ "valueField": "value",
3789
+ "labelClassName": "text-left",
3790
+ "clearValueOnHidden": true,
3791
+ "disabledOn": "${config.is_system == true}",
3792
+ "searchable": true
3793
+ },
3794
+ {
3795
+ "name": "config.label",
3796
+ "label": "显示名称",
3797
+ "labelRemark": "",
3798
+ "description": "",
3799
+ "required": true,
3800
+ "type": "input-text",
3801
+ "labelClassName": "text-left",
3802
+ "clearValueOnHidden": true
3803
+ },
3804
+ {
3805
+ "name": "config.name",
3806
+ "label": "API 名称",
3807
+ "labelRemark": "API 名称只能包含小写字母、数字,必须以字母开头,不能以下划线字符结尾或包含两个连续的下划线字符",
3808
+ "description": "",
3809
+ "required": true,
3810
+ "type": "input-text",
3811
+ "clearValueOnHidden": true,
3812
+ "disabledOn": "${config.is_system == true}"
3813
+ },
3814
+ {
3815
+ "name": "config.autonumber_enable_modify",
3816
+ "label": "允许修改编号",
3817
+ "required": false,
3818
+ "type": "checkbox",
3819
+ "tpl": null,
3820
+ "visibleOn": "config.type === 'autonumber' ? true: false",
3821
+ "clearValueOnHidden": true
3822
+ },
3823
+ {
3824
+ "name": "config.rows",
3825
+ "label": "多行文本行数",
3826
+ "labelRemark": "",
3827
+ "description": "",
3828
+ "requiredOn": "config.type === 'textarea' ? true: false",
3829
+ "type": "input-number",
3830
+ "precision": 0,
3831
+ "visibleOn": "config.type === 'textarea' ? true: false",
3832
+ "clearValueOnHidden": true
3833
+ },
3834
+ {
3835
+ "name": "config.language",
3836
+ "label": "语言",
3837
+ "requiredOn": "['code'].indexOf(config.type) > -1 ? true: false",
3838
+ "type": "select",
3839
+ "joinValues": false,
3840
+ "options": [
3841
+ {
3842
+ "label": "bat",
3843
+ "value": "bat"
3844
+ },
3845
+ {
3846
+ "label": "c",
3847
+ "value": "c"
3848
+ },
3849
+ {
3850
+ "label": "coffeescript",
3851
+ "value": "coffeescript"
3852
+ },
3853
+ {
3854
+ "label": "cpp",
3855
+ "value": "cpp"
3856
+ },
3857
+ {
3858
+ "label": "csharp",
3859
+ "value": "csharp"
3860
+ },
3861
+ {
3862
+ "label": "css",
3863
+ "value": "css"
3864
+ },
3865
+ {
3866
+ "label": "dockerfile",
3867
+ "value": "dockerfile"
3868
+ },
3869
+ {
3870
+ "label": "fsharp",
3871
+ "value": "fsharp"
3872
+ },
3873
+ {
3874
+ "label": "go",
3875
+ "value": "go"
3876
+ },
3877
+ {
3878
+ "label": "handlebars",
3879
+ "value": "handlebars"
3880
+ },
3881
+ {
3882
+ "label": "html",
3883
+ "value": "html"
3884
+ },
3885
+ {
3886
+ "label": "ini",
3887
+ "value": "ini"
3888
+ },
3889
+ {
3890
+ "label": "java",
3891
+ "value": "java"
3892
+ },
3893
+ {
3894
+ "label": "javascript",
3895
+ "value": "javascript"
3896
+ },
3897
+ {
3898
+ "label": "json",
3899
+ "value": "json"
3900
+ },
3901
+ {
3902
+ "label": "less",
3903
+ "value": "less"
3904
+ },
3905
+ {
3906
+ "label": "lua",
3907
+ "value": "lua"
3908
+ },
3909
+ {
3910
+ "label": "markdown",
3911
+ "value": "markdown"
3912
+ },
3913
+ {
3914
+ "label": "msdax",
3915
+ "value": "msdax"
3916
+ },
3917
+ {
3918
+ "label": "objective-c",
3919
+ "value": "objective-c"
3920
+ },
3921
+ {
3922
+ "label": "php",
3923
+ "value": "php"
3924
+ },
3925
+ {
3926
+ "label": "plaintext",
3927
+ "value": "plaintext"
3928
+ },
3929
+ {
3930
+ "label": "postiats",
3931
+ "value": "postiats"
3932
+ },
3933
+ {
3934
+ "label": "powershell",
3935
+ "value": "powershell"
3936
+ },
3937
+ {
3938
+ "label": "pug",
3939
+ "value": "pug"
3940
+ },
3941
+ {
3942
+ "label": "python",
3943
+ "value": "python"
3944
+ },
3945
+ {
3946
+ "label": "r",
3947
+ "value": "r"
3948
+ },
3949
+ {
3950
+ "label": "razor",
3951
+ "value": "razor"
3952
+ },
3953
+ {
3954
+ "label": "ruby",
3955
+ "value": "ruby"
3956
+ },
3957
+ {
3958
+ "label": "sb",
3959
+ "value": "sb"
3960
+ },
3961
+ {
3962
+ "label": "scss",
3963
+ "value": "scss"
3964
+ },
3965
+ {
3966
+ "label": "shell",
3967
+ "value": "shell"
3968
+ },
3969
+ {
3970
+ "label": "sol",
3971
+ "value": "sol"
3972
+ },
3973
+ {
3974
+ "label": "sql",
3975
+ "value": "sql"
3976
+ },
3977
+ {
3978
+ "label": "swift",
3979
+ "value": "swift"
3980
+ },
3981
+ {
3982
+ "label": "typescript",
3983
+ "value": "typescript"
3984
+ },
3985
+ {
3986
+ "label": "vb",
3987
+ "value": "vb"
3988
+ },
3989
+ {
3990
+ "label": "xml",
3991
+ "value": "xml"
3992
+ },
3993
+ {
3994
+ "label": "yaml",
3995
+ "value": "yaml"
3996
+ }
3997
+ ],
3998
+ "extractValue": true,
3999
+ "clearable": true,
4000
+ "labelField": "label",
4001
+ "valueField": "value",
4002
+ "visibleOn": "['code'].indexOf(config.type) > -1 ? true: false",
4003
+ "clearValueOnHidden": true,
4004
+ "disabledOn": "${config.is_system == true}"
4005
+ },
4006
+ {
4007
+ "name": "config.multiple",
4008
+ "label": "多选",
4009
+ "labelRemark": "单选<==>多选 相互切换,请自行重新提交已有记录或在数据库中统一修改此字段的保存格式。",
4010
+ "type": "checkbox",
4011
+ "visibleOn": "['select', 'lookup', 'image','file'].indexOf(config.type) > -1 ? true: false",
4012
+ "clearValueOnHidden": true,
4013
+ "disabledOn": "${config.is_system == true}"
4014
+ },
4015
+ {
4016
+ "name": "config.data_type",
4017
+ "label": "数据类型",
4018
+ "labelRemark": "字段类型为公式时,必须填写此字段。",
4019
+ "requiredOn": "['formula'].indexOf(config.type) > -1 ? true: false",
4020
+ "type": "select",
4021
+ "joinValues": false,
4022
+ "extractValue": true,
4023
+ "clearable": true,
4024
+ "disabledOn": "${config.is_system == true}",
4025
+ "searchable": true,
4026
+ "source": {
4027
+ "method": "post",
4028
+ "url": "${context.rootUrl}/graphql?depend_on_type=${config.type}",
4029
+ "data": {
4030
+ "query": "{objects(filters: [\"_id\", \"=\", \"-1\"]){_id}}"
4031
+ },
4032
+ "headers": {
4033
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4034
+ },
4035
+ "sendOn": "this.config.type",
4036
+ "adaptor": "\n if (context.config.type === \"select\") {\n payload.data.options = [\n {\n \"label\": \"\u5E03\u5C14\",\n \"value\": \"boolean\"\n },\n {\n \"label\": \"\u6570\u503C\",\n \"value\": \"number\"\n },\n {\n \"label\": \"\u6587\u672C\",\n \"value\": \"text\"\n }\n ]\n }else {\n payload.data.options = [\n {\n \"label\": \"\u5E03\u5C14\",\n \"value\": \"boolean\"\n },\n {\n \"label\": \"\u6570\u503C\",\n \"value\": \"number\"\n },\n {\n \"label\": \"\u91D1\u989D\",\n \"value\": \"currency\"\n },\n {\n \"label\": \"\u767E\u5206\u6BD4\",\n \"value\": \"percent\"\n },\n {\n \"label\": \"\u6587\u672C\",\n \"value\": \"text\"\n },\n {\n \"label\": \"\u65E5\u671F\",\n \"value\": \"date\"\n },\n {\n \"label\": \"\u65E5\u671F\u65F6\u95F4\",\n \"value\": \"datetime\"\n }\n ]\n }\n return payload;\n "
4037
+ },
4038
+ "visibleOn": "['formula','select'].indexOf(config.type) > -1 ? true: false",
4039
+ "clearValueOnHidden": true
4040
+ },
4041
+ {
4042
+ "type": "input-table",
4043
+ "name": "config.options",
4044
+ "label": "选择项",
4045
+ "labelRemark": "选择项的每个选项显示名及选项值不能为空,背景颜色请设置为ffffff这种格式的16进制数值。",
4046
+ "requiredOn": "config.type === 'select' ? true: false",
4047
+ "visibleOn": "config.type === 'select' ? true: false",
4048
+ "clearValueOnHidden": true,
4049
+ "showIndex": true,
4050
+ "addable": true,
4051
+ "removable": true,
4052
+ "columnsTogglable": false,
4053
+ "needConfirm": false,
4054
+ "footerAddBtn": {
4055
+ "visibleOn": "${!config.is_system}"
4056
+ },
4057
+ "columns": [
4058
+ {
4059
+ "type": "input-text",
4060
+ "name": "label",
4061
+ "label": "显示名",
4062
+ "required": true,
4063
+ "disabledOn": "${config.is_system == true}",
4064
+ "width": 100
4065
+ },
4066
+ {
4067
+ "type": "input-text",
4068
+ "name": "value",
4069
+ "label": "选项值",
4070
+ "required": true,
4071
+ "disabledOn": "${config.is_system == true}",
4072
+ "width": 100
4073
+ },
4074
+ {
4075
+ "type": "input-color",
4076
+ "name": "color",
4077
+ "label": "背景颜色",
4078
+ "disabledOn": "${config.is_system == true}",
4079
+ "width": 70
4080
+ },
4081
+ {
4082
+ "type": "textarea",
4083
+ "name": "description",
4084
+ "label": "描述",
4085
+ "disabledOn": "${config.is_system == true}",
4086
+ "width": 100
4087
+ },
4088
+ {
4089
+ "type": "operation",
4090
+ "label": "操作",
4091
+ "visibleOn": "${!config.is_system}",
4092
+ "width": 70,
4093
+ "fixed": "right"
4094
+ }
4095
+ ]
4096
+ },
4097
+ {
4098
+ "name": "config.precision",
4099
+ "label": "数字位数",
4100
+ "labelRemark": "小数点左边的数字位数",
4101
+ "requiredOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
4102
+ "type": "input-number",
4103
+ "precision": 0,
4104
+ "visibleOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
4105
+ "clearValueOnHidden": true,
4106
+ "value": 18,
4107
+ "disabledOn": "${config.is_system == true}"
4108
+ },
4109
+ {
4110
+ "name": "config.scale",
4111
+ "label": "小数位数",
4112
+ "labelRemark": "If the field type is a Percent, this indicates the number of decimal places the field will display, for example, two decimal places will display as 10.20%.",
4113
+ "requiredOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
4114
+ "type": "input-number",
4115
+ "min": 0,
4116
+ "precision": 0,
4117
+ "visibleOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
4118
+ "labelClassName": "text-left",
4119
+ "clearValueOnHidden": true,
4120
+ "value": 2,
4121
+ "disabledOn": "${config.is_system == true}"
4122
+ },
4123
+ {
4124
+ "name": "config.formula",
4125
+ "label": "公式",
4126
+ "labelRemark": "字段类型为自动编号或公式时,必须填写此字段。",
4127
+ "description": "",
4128
+ "requiredOn": "['autonumber', 'formula'].indexOf(config.type) > -1 ? true: false",
4129
+ "type": "textarea",
4130
+ "visibleOn": "['autonumber', 'formula'].indexOf(config.type) > -1 ? true: false",
4131
+ "clearValueOnHidden": true,
4132
+ "disabledOn": "${config.is_system == true}"
4133
+ },
4134
+ {
4135
+ "name": "config.show_as_qr",
4136
+ "label": "显示为二维码",
4137
+ "required": false,
4138
+ "type": "checkbox",
4139
+ "tpl": null,
4140
+ "visibleOn": "config.type === 'url' ? true: false",
4141
+ "clearValueOnHidden": true,
4142
+ "disabledOn": "${config.is_system == true}"
4143
+ },
4144
+ {
4145
+ "name": "config.coordinatesType",
4146
+ "label": "坐标类型",
4147
+ "required": false,
4148
+ "type": "input-text",
4149
+ "visibleOn": "['location'].indexOf(config.type) > -1 ? true: false",
4150
+ "clearValueOnHidden": true,
4151
+ "disabledOn": "${config.is_system == true}",
4152
+ "value": "bd09"
4153
+ },
4154
+ {
4155
+ "name": "config.formula_blank_value",
4156
+ "label": "空白字段处理",
4157
+ "labelRemark": "如果您的公式引用了任何数字和货币字段,请指定当这些字段值为空时如何处理公式输出。",
4158
+ "description": "",
4159
+ "requiredOn": "['formula'].indexOf(config.type) > -1 ? true: false",
4160
+ "type": "select",
4161
+ "joinValues": false,
4162
+ "options": [
4163
+ {
4164
+ "label": "将空白字段视为零",
4165
+ "value": "zeroes"
4166
+ },
4167
+ {
4168
+ "label": "将空白字段视为空白",
4169
+ "value": "blanks"
4170
+ }
4171
+ ],
4172
+ "extractValue": true,
4173
+ "clearable": true,
4174
+ "labelField": "label",
4175
+ "valueField": "value",
4176
+ "visibleOn": "['formula'].indexOf(config.type) > -1 ? true: false",
4177
+ "labelClassName": "text-left",
4178
+ "clearValueOnHidden": true,
4179
+ "fieldName": "config.formula_blank_value",
4180
+ "disabledOn": "${config.is_system == true}"
4181
+ },
4182
+ {
4183
+ "name": "config.reference_to",
4184
+ "label": "引用对象",
4185
+ "requiredOn": "['lookup','master_detail'].indexOf(config.type) > -1 ? true: false",
4186
+ "type": "select",
4187
+ "joinValues": false,
4188
+ "extractValue": true,
4189
+ "clearable": true,
4190
+ "disabledOn": "${config.is_system == true}",
4191
+ "searchable": true,
4192
+ "source": {
4193
+ "method": "post",
4194
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}",
4195
+ "data": {
4196
+ "orderBy": "${orderBy}",
4197
+ "orderDir": "${orderDir}",
4198
+ "pageNo": "${page}",
4199
+ "pageSize": "${perPage}",
4200
+ "queryFields": "_id space label:label value:name",
4201
+ "query": "{options:objects(filters: {__filters}, top: {__top}, sort: \"{__sort}\"){_id space label:label value:name},count:objects__count(filters:{__filters})}",
4202
+ "$term": "$term",
4203
+ "$value": "$config.reference_to",
4204
+ "$": "$$"
4205
+ },
4206
+ "headers": {
4207
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4208
+ },
4209
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
4210
+ "requestAdaptor": "\n var filters = [];\n var top = 200;\n if(api.data.$term){\n filters = [[\"label\", \"contains\", api.data.$term]];\n }\n // else if(api.data.$value){\n // filters = [[\"_id\", \"=\", api.data.$value]];\n // }\n\n var fieldFilters = undefined;\n var currentAmis = (window.amisRequire && window.amisRequire('amis')) || Amis;\n //递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析\n function traverseNestedArray(arr) {\n for (let i = 0; i < arr.length; i++) {\n if (Array.isArray(arr[i])) {\n // 如果当前元素是数组,则递归调用自身继续遍历\n traverseNestedArray(arr[i]);\n } else {\n // 如果当前元素不是数组,则处理该元素\n // 下面正则用于匹配amis公式${}\n if(/\\$\\{([^}]*)\\}/.test(arr[i])) {\n try{\n arr[i] = currentAmis.evaluate(arr[i], api.context);\n }catch(ex){\n console.error(\"运行lookup过滤公式时出现错误:\",ex);\n }\n }\n }\n }\n }\n if(fieldFilters && fieldFilters.length){\n traverseNestedArray(fieldFilters);\n filters.push(fieldFilters);\n }\n\n if(false && false){\n if(filters.length > 0){\n filters = [ [\"user_accepted\", \"=\", true], \"and\", filters ]\n }else{\n filters = [[\"user_accepted\", \"=\", true]];\n }\n }\n\n const inFilterForm = undefined;\n\n const listviewFiltersFunction = undefined;\n\n if(listviewFiltersFunction && !inFilterForm){\n const _filters0 = listviewFiltersFunction(filters, api.data.$);\n if(_filters0 && _filters0.length){\n filters.push(_filters0);\n }\n }\n \n const filtersFunction = undefined;\n\n if(filtersFunction && !inFilterForm){\n const _filters = filtersFunction(filters, api.data.$);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n var sort = \"\";\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', top).replace('{__sort}', sort.trim());\n\n var defaultValue = api.data.$value;\n var optionsFiltersOp = \"=\";\n var optionsFilters = [[\"name\", optionsFiltersOp, []]];\n if (defaultValue && !api.data.$term) { \n const defaultValueOptionsQueryData = {\"orderBy\":\"${orderBy}\",\"orderDir\":\"${orderDir}\",\"pageNo\":\"${page}\",\"pageSize\":\"${perPage}\",\"queryFields\":\"_id space label:label value:name\",\"query\":\"{defaultValueOptions:objects(filters:{__options_filters}){_id space label:label value:name}}\"};\n const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,\"\").replace(/}$/,\"\");\n // 字段值单独请求,没值的时候在请求中返回空\n optionsFilters = [[\"name\", optionsFiltersOp, defaultValue]];\n if(filters.length > 0){\n optionsFilters = [filters, optionsFilters];\n }\n if(defaultValueOptionsQuery){\n api.data.query = \"{\"+api.data.query.replace(/^{/,\"\").replace(/}$/,\"\")+\",\"+defaultValueOptionsQuery+\"}\";\n } \n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n "
4211
+ },
4212
+ "menuTpl": "<div>${label}(${value})</div>",
4213
+ "visibleOn": "['lookup', 'master_detail'].indexOf(config.type) > -1 ? true: false",
4214
+ "clearValueOnHidden": true
4215
+ },
4216
+ {
4217
+ "name": "config.summary_object",
4218
+ "label": "要汇总的对象",
4219
+ "labelRemark": "字段类型为累计汇总时,必须填写此字段。",
4220
+ "description": "",
4221
+ "requiredOn": "config.type === 'summary' ? true: false",
4222
+ "type": "select",
4223
+ "joinValues": false,
4224
+ "extractValue": true,
4225
+ "clearable": true,
4226
+ "disabledOn": "${config.is_system == true}",
4227
+ "searchable": true,
4228
+ "source": {
4229
+ "method": "get",
4230
+ "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${config.object}/detailLists/options?depend_on_object=${config.object}",
4231
+ "headers": {
4232
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4233
+ },
4234
+ "adaptor": "",
4235
+ "sendOn": "this.config.object",
4236
+ "requestAdaptor": ""
4237
+ },
4238
+ "visibleOn": "config.type === 'summary' ? true: false",
4239
+ "clearValueOnHidden": true,
4240
+ "autoComplete": {
4241
+ "method": "get",
4242
+ "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${config.object}/detailLists/options?depend_on_object=${config.object}",
4243
+ "headers": {
4244
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4245
+ },
4246
+ "adaptor": "",
4247
+ "sendOn": "this.config.object",
4248
+ "requestAdaptor": ""
4249
+ }
4250
+ },
4251
+ {
4252
+ "name": "config.summary_type",
4253
+ "label": "汇总类型",
4254
+ "labelRemark": "字段类型为累计汇总时,必须填写此字段。",
4255
+ "requiredOn": "config.type === 'summary' ? true: false",
4256
+ "type": "select",
4257
+ "joinValues": false,
4258
+ "options": [
4259
+ {
4260
+ "label": "COUNT",
4261
+ "value": "count"
4262
+ },
4263
+ {
4264
+ "label": "SUM",
4265
+ "value": "sum"
4266
+ },
4267
+ {
4268
+ "label": "MIN",
4269
+ "value": "min"
4270
+ },
4271
+ {
4272
+ "label": "MAX",
4273
+ "value": "max"
4274
+ },
4275
+ {
4276
+ "label": "AVG",
4277
+ "value": "avg"
4278
+ }
4279
+ ],
4280
+ "extractValue": true,
4281
+ "clearable": true,
4282
+ "labelField": "label",
4283
+ "valueField": "value",
4284
+ "visibleOn": "config.type === 'summary' ? true: false",
4285
+ "clearValueOnHidden": true,
4286
+ "disabledOn": "${config.is_system == true}"
4287
+ },
4288
+ {
4289
+ "name": "config.summary_field",
4290
+ "label": "汇总字段",
4291
+ "labelRemark": "字段类型为累计汇总且汇总类型不是COUNT时,必须填写此字段,只支持聚合数值、金额、日期、日期时间类型的字段。",
4292
+ "description": "",
4293
+ "requiredOn": "config.type === 'summary' && config.summary_type !== 'count' ? true: false",
4294
+ "type": "select",
4295
+ "joinValues": false,
4296
+ "extractValue": true,
4297
+ "clearable": true,
4298
+ "disabledOn": "${config.is_system == true}",
4299
+ "searchable": true,
4300
+ "source": {
4301
+ "method": "post",
4302
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}&depend_on_summary_object=${config.summary_object}&depend_on_summary_type=${config.summary_type}",
4303
+ "data": {
4304
+ "orderBy": "${orderBy}",
4305
+ "orderDir": "${orderDir}",
4306
+ "pageNo": "${page}",
4307
+ "pageSize": "${perPage}",
4308
+ "queryFields": "_id space label:label value:name",
4309
+ "query": "{options:object_fields(filters: {__filters}, top: {__top}, sort: \"{__sort}\"){_id space label:label value:name},count:object_fields__count(filters:{__filters})}",
4310
+ "$term": "$term",
4311
+ "$value": "$config.summary_field",
4312
+ "summary_object": "$config.summary_object",
4313
+ "summary_type": "$config.summary_type",
4314
+ "$": "$$"
4315
+ },
4316
+ "headers": {
4317
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4318
+ },
4319
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
4320
+ "sendOn": "this.config.summary_object && this.config.summary_type",
4321
+ "requestAdaptor": "\n var filters = [];\n var top = 200;\n if(api.data.$term){\n filters = [[\"label\", \"contains\", api.data.$term]];\n }\n // else if(api.data.$value){\n // filters = [[\"_id\", \"=\", api.data.$value]];\n // }\n\n var fieldFilters = undefined;\n var currentAmis = (window.amisRequire && window.amisRequire('amis')) || Amis;\n //递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析\n function traverseNestedArray(arr) {\n for (let i = 0; i < arr.length; i++) {\n if (Array.isArray(arr[i])) {\n // 如果当前元素是数组,则递归调用自身继续遍历\n traverseNestedArray(arr[i]);\n } else {\n // 如果当前元素不是数组,则处理该元素\n // 下面正则用于匹配amis公式${}\n if(/\\$\\{([^}]*)\\}/.test(arr[i])) {\n try{\n arr[i] = currentAmis.evaluate(arr[i], api.context);\n }catch(ex){\n console.error(\"运行lookup过滤公式时出现错误:\",ex);\n }\n }\n }\n }\n }\n if(fieldFilters && fieldFilters.length){\n traverseNestedArray(fieldFilters);\n filters.push(fieldFilters);\n }\n\n if(false && false){\n if(filters.length > 0){\n filters = [ [\"user_accepted\", \"=\", true], \"and\", filters ]\n }else{\n filters = [[\"user_accepted\", \"=\", true]];\n }\n }\n\n const inFilterForm = undefined;\n\n const listviewFiltersFunction = undefined;\n\n if(listviewFiltersFunction && !inFilterForm){\n const _filters0 = listviewFiltersFunction(filters, api.data.$);\n if(_filters0 && _filters0.length){\n filters.push(_filters0);\n }\n }\n \n const filtersFunction = undefined;\n\n if(filtersFunction && !inFilterForm){\n const _filters = filtersFunction(filters, api.data.$);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n var sort = \"sort_no asc\";\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', top).replace('{__sort}', sort.trim());\n\n var defaultValue = api.data.$value;\n var optionsFiltersOp = \"=\";\n var optionsFilters = [[\"name\", optionsFiltersOp, []]];\n if (defaultValue && !api.data.$term) { \n const defaultValueOptionsQueryData = {\"orderBy\":\"${orderBy}\",\"orderDir\":\"${orderDir}\",\"pageNo\":\"${page}\",\"pageSize\":\"${perPage}\",\"queryFields\":\"_id space label:label value:name\",\"query\":\"{defaultValueOptions:object_fields(filters:{__options_filters}){_id space label:label value:name}}\"};\n const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,\"\").replace(/}$/,\"\");\n // 字段值单独请求,没值的时候在请求中返回空\n optionsFilters = [[\"name\", optionsFiltersOp, defaultValue]];\n if(filters.length > 0){\n optionsFilters = [filters, optionsFilters];\n }\n if(defaultValueOptionsQuery){\n api.data.query = \"{\"+api.data.query.replace(/^{/,\"\").replace(/}$/,\"\")+\",\"+defaultValueOptionsQuery+\"}\";\n } \n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n "
4322
+ },
4323
+ "visibleOn": "config.type === 'summary' && config.summary_object && config.summary_type && config.summary_type !== 'count'",
4324
+ "clearValueOnHidden": true,
4325
+ "autoComplete": {
4326
+ "method": "get",
4327
+ "url": "${context.rootUrl}/service/api/@${config.summary_object}/uiSchema?summary_object=${config.summary_object}&summary_type=${config.summary_type}&term=${term}",
4328
+ "data": {
4329
+ "summary_type": "${config.summary_type}"
4330
+ },
4331
+ "headers": {
4332
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4333
+ },
4334
+ "sendOn": "!!this.config.summary_object && !!this.config.summary_type",
4335
+ "adaptor": "debugger;const summary_type = api.body.summary_type;\nconst term = api.query.term;\nlet fields = payload.fields;\nlet options = [];\nif (fields) {\n if (summary_type && summary_type !== \"count\") {\n if (summary_type === \"sum\" || summary_type === \"avg\") {\n /*sum/avg类型可以汇总数值、金额、百分比字段*/\n _.forEach(fields, (value, key) => {\n let fieldType = value.type;\n if ([\"formula\", \"summary\"].indexOf(fieldType) > -1) {\n /*要聚合的字段为公式或汇总字段时,按其字段数据类型判断是否支持聚合*/\n fieldType = value.data_type;\n }\n if ([\"number\", \"currency\", \"percent\"].indexOf(fieldType) > -1) {\n options.push({ label: value.label, value: value.name });\n }\n })\n }\n else {\n /*min、max类型可以汇总数值、金额、百分比、日期、日期时间字段*/\n _.forEach(fields, (value, key) => {\n let fieldType = value.type;\n if ([\"formula\", \"summary\"].indexOf(fieldType) > -1) {\n /*要聚合的字段为公式或汇总字段时,按其字段数据类型判断是否支持聚合*/\n fieldType = value.data_type;\n }\n if ([\"number\", \"currency\", \"percent\", \"date\", \"datetime\"].indexOf(fieldType) > -1) {\n options.push({ label: value.label, value: value.name });\n }\n })\n }\n }\n if (term) {\n options = _.filter(options, (item) => {\n return item.label.toLowerCase().indexOf(term.toLowerCase()) > -1;\n })\n }\n}\npayload = {\n data: { options: options },\n msg: \"\",\n status: 0\n}\nreturn payload;"
4336
+ }
4337
+ },
4338
+ //汇总过滤条件暂时无法直接使用组件,因为数据格式不一致
4339
+ {
4340
+ "name": "config.description",
4341
+ "label": "描述",
4342
+ "required": false,
4343
+ "type": "textarea",
4344
+ "tpl": "<%=(data.config.description || \"\").split(\"\\n\").join('<br>')%>",
4345
+ "clearValueOnHidden": true
4346
+ },
4347
+ {
4348
+ "name": "config.deleted_lookup_record_behavior",
4349
+ "label": "如果相关表记录被删除怎么办?",
4350
+ "required": true,
4351
+ "type": "select",
4352
+ "joinValues": false,
4353
+ "options": [
4354
+ {
4355
+ "label": "清除此字段的值。 如果您将此字段设为必填,您不能选择此选项。",
4356
+ "value": "clear"
4357
+ },
4358
+ {
4359
+ "label": "不允许删除"作为相关表关系的一部分的相关表记录"。",
4360
+ "value": "retain"
4361
+ }
4362
+ ],
4363
+ "extractValue": true,
4364
+ "clearable": true,
4365
+ "labelField": "label",
4366
+ "valueField": "value",
4367
+ "visibleOn": " 'lookup' === config.type ? true: false ",
4368
+ "clearValueOnHidden": true,
4369
+ "disabledOn": "${config.required==true}",
4370
+ "value": "${IFS(true===config.required, \"retain\", !config.required && !config.deleted_lookup_record_behavior, \"clear\", config.deleted_lookup_record_behavior)}"
4371
+ },
4372
+ {
4373
+ "name": "config.write_requires_master_read",
4374
+ "label": "当用户对主表记录有读取权限时对子表记录可以增删改",
4375
+ "labelRemark": "设置主记录上创建、编辑或删除子记录所需的最低访问级别。此字段仅适用于·主表/子表·字段类型。勾选表示允许具有'读取'访问权限的用户创建、编辑或删除子记录。反之表示允许具有'读取/写入'访问权限的用户创建、编辑或删除子记录的权限。",
4376
+ "type": "checkbox",
4377
+ "visibleOn": "config.type === 'master_detail' ? true: false",
4378
+ "clearValueOnHidden": true,
4379
+ "disabledOn": "${config.is_system == true}"
4380
+ }
4381
+ ]
4382
+ },
4383
+ {
4384
+ "title": "表单",
4385
+ "className": 'ae-formItemControl-body',
4386
+ "body": [
4387
+ {
4388
+ "name": "config.required",
4389
+ "label": "必填",
4390
+ "required": false,
4391
+ "type": "checkbox",
4392
+ "tpl": null,
4393
+ "visibleOn": "['autonumber','summary','formula'].indexOf(config.type) > -1 ? false: true",
4394
+ "clearValueOnHidden": true,
4395
+ "fieldName": "config.required"
4396
+ },
4397
+ {
4398
+ "name": "config.is_wide",
4399
+ "label": "宽字段",
4400
+ "required": false,
4401
+ "type": "checkbox",
4402
+ "tpl": null,
4403
+ "labelClassName": "text-left",
4404
+ "clearValueOnHidden": true,
4405
+ "fieldName": "config.is_wide"
4406
+ },
4407
+ {
4408
+ "name": "config.readonly",
4409
+ "label": "只读",
4410
+ "labelRemark": "只读字段不显示在表单上,数据不会提交到服务端。",
4411
+ "required": false,
4412
+ "type": "checkbox",
4413
+ "tpl": null,
4414
+ "clearValueOnHidden": true,
4415
+ "fieldName": "config.readonly"
4416
+ },
4417
+ {
4418
+ "name": "config.static",
4419
+ "label": "静态",
4420
+ "labelRemark": "静态字段在表单上显示,用户不可编辑,可动态赋值。",
4421
+ "required": false,
4422
+ "type": "checkbox",
4423
+ "tpl": null,
4424
+ "clearValueOnHidden": true,
4425
+ "fieldName": "config.static"
4426
+ },
4427
+ {
4428
+ "name": "config.inlineHelpText",
4429
+ "label": "提示文本",
4430
+ "required": false,
4431
+ "type": "textarea",
4432
+ "tpl": "<%=(data.config.inlineHelpText || \"\").split(\"\\n\").join('<br>')%>",
4433
+ "className": "col-span-2 m-0 steedos-textarea-edit ",
4434
+ "labelClassName": "text-left",
4435
+ "clearValueOnHidden": true,
4436
+ "fieldName": "config.inlineHelpText"
4437
+ },
4438
+ {
4439
+ "name": "config.enable_enhanced_lookup",
4440
+ "label": "弹出选择",
4441
+ "labelRemark": "被其他字段引用时,使用弹出框选择记录。",
4442
+ "required": false,
4443
+ "type": "checkbox",
4444
+ "tpl": null,
4445
+ "visibleOn": "['lookup'].indexOf(config.type) > -1 ? true: false",
4446
+ "clearValueOnHidden": true
4447
+ },
4448
+ {
4449
+ "name": "conig.create",
4450
+ "label": "弹出选择时允许新建",
4451
+ "required": false,
4452
+ "type": "checkbox",
4453
+ "tpl": null,
4454
+ "visibleOn": "['lookup'].indexOf(config.type) > -1 ? true: false",
4455
+ "clearValueOnHidden": true,
4456
+ "fieldName": "conig.create",
4457
+ "disabledOn": "${config.is_system == true}"
4458
+ },
4459
+ {
4460
+ "name": "config.depend_on",
4461
+ "label": "依赖字段",
4462
+ "labelRemark": "依赖字段的变化会触发当前字段重算",
4463
+ "description": "",
4464
+ "required": false,
4465
+ "type": "select",
4466
+ "joinValues": false,
4467
+ "extractValue": true,
4468
+ "clearable": true,
4469
+ "disabledOn": "${config.is_system == true}",
4470
+ "visibleOn": "['lookup', 'master_detail'].indexOf(config.type) > -1 ? true: false",
4471
+ "searchable": true,
4472
+ "multiple": true,
4473
+ "source": {
4474
+ "method": "post",
4475
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}",
4476
+ "data": {
4477
+ "query": "{options:object_fields(filters: [\"object\",\"=\",\"${config.object}\"], top: 200, sort: \"created desc\"){_id space label:label value:name},count:object_fields__count(filters:[\"object\",\"=\",\"${config.object}\"])}",
4478
+ "$value": "$config.depend_on",
4479
+ "$": "$$"
4480
+ },
4481
+ "sendOn": "this.config.object",
4482
+ "trackExpression": "${config.object}",
4483
+ "headers": {
4484
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4485
+ },
4486
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
4487
+ },
4488
+ "clearValueOnHidden": true
4489
+ },
4490
+ {
4491
+ "name": "config.enable_thousands",
4492
+ "label": "显示千分符",
4493
+ "required": false,
4494
+ "type": "checkbox",
4495
+ "tpl": null,
4496
+ "visibleOn": "['number','currency','percent'].indexOf(config.type) > -1 ? true: false",
4497
+ "clearValueOnHidden": true,
4498
+ "fieldName": "config.enable_thousands"
4499
+ }
4500
+ //filters
4501
+ //自动填充
4502
+ ]
4503
+ },
4504
+ {
4505
+ "title": "高级",
4506
+ "className": 'ae-formItemControl-body',
4507
+ "body": [
4508
+ {
4509
+ "name": "config.unique",
4510
+ "label": "创建唯一索引",
4511
+ "labelRemark": "默认每天凌晨执行一次创建,已有的索引不重复创建。",
4512
+ "required": false,
4513
+ "type": "checkbox",
4514
+ "tpl": null,
4515
+ "clearValueOnHidden": true
4516
+ },
4517
+ {
4518
+ "name": "config.filterable",
4519
+ "label": "列表页过滤器默认字段",
4520
+ "required": false,
4521
+ "type": "checkbox",
4522
+ "tpl": null,
4523
+ "clearValueOnHidden": true
4524
+ },
4525
+ {
4526
+ "name": "config.index",
4527
+ "label": "创建索引",
4528
+ "labelRemark": "默认每天凌晨执行一次创建,已有的索引不重复创建。",
4529
+ "required": false,
4530
+ "type": "checkbox",
4531
+ "tpl": null,
4532
+ "clearValueOnHidden": true
4533
+ },
4534
+ {
4535
+ "name": "config.is_name",
4536
+ "label": "名称字段",
4537
+ "required": false,
4538
+ "type": "checkbox",
4539
+ "tpl": null,
4540
+ "visibleOn": "${ARRAYSOME(['text', 'textarea', 'autonumber', 'date', 'datetime', 'time', 'formula', 'lookup', 'master_detail'], item => item === config.type) && !config.multiple}",
4541
+ "clearValueOnHidden": true,
4542
+ "disabledOn": "${config.is_system == true}"
4543
+ },
4544
+ {
4545
+ "name": "config.reference_to_field",
4546
+ "label": "外键字段",
4547
+ "labelRemark": "关联的对象保存到当前对象字段的值;例如:A对象关联B对象后,当A1记录关联了B1记录,默认会存B1记录的_id存到A1记录中。如果修改了外键字段后,会将“外键字段”替换_id存储到A1记录中。",
4548
+ "description": "默认为主键,默认值是_id",
4549
+ "required": false,
4550
+ "type": "select",
4551
+ "joinValues": false,
4552
+ "extractValue": true,
4553
+ "clearable": true,
4554
+ "disabledOn": "${config.is_system == true}",
4555
+ "visibleOn": "['lookup', 'master_detail'].indexOf(config.type) > -1 ? true: false",
4556
+ "searchable": true,
4557
+ "multiple": false,
4558
+ "source": {
4559
+ "method": "post",
4560
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}",
4561
+ "data": {
4562
+ "query": "{options:object_fields(filters: [\"object\",\"=\",\"${config.reference_to}\"], top: 200, sort: \"created desc\"){_id space label:label value:name},count:object_fields__count(filters:[\"object\",\"=\",\"${config.reference_to}\"])}",
4563
+ "$value": "$config.reference_to_field",
4564
+ "$": "$$"
4565
+ },
4566
+ "sendOn": "this.config.reference_to",
4567
+ "trackExpression": "${config.reference_to}",
4568
+ "headers": {
4569
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4570
+ },
4571
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
4572
+ },
4573
+ "clearValueOnHidden": true
4574
+ }
4575
+ ]
4576
+ }
4577
+ ]
4578
+ }
4579
+ ]
3642
4580
  }
3643
4581
  } });
3644
4582
 
@@ -3649,7 +4587,7 @@
3649
4587
  * @LastEditTime: 2023-01-14 16:51:23
3650
4588
  * @Description:
3651
4589
  */
3652
- var config$7 = {
4590
+ var config$9 = {
3653
4591
  componentType: 'amisSchema',
3654
4592
  group: "华炎魔方",
3655
4593
  componentName: "AmisSelectFlow",
@@ -3673,18 +4611,18 @@
3673
4611
  icon: "fa-fw fa fa-list-alt"
3674
4612
  }
3675
4613
  };
3676
- var AmisSelectFlow = __assign(__assign({}, config$7), { snippets: [
4614
+ var AmisSelectFlow = __assign(__assign({}, config$9), { snippets: [
3677
4615
  {
3678
- title: config$7.title,
4616
+ title: config$9.title,
3679
4617
  screenshot: "",
3680
4618
  schema: {
3681
- componentName: config$7.componentName,
3682
- props: config$7.preview
4619
+ componentName: config$9.componentName,
4620
+ props: config$9.preview
3683
4621
  }
3684
4622
  }
3685
4623
  ], amis: {
3686
4624
  render: {
3687
- type: config$7.amis.name,
4625
+ type: config$9.amis.name,
3688
4626
  usage: "renderer",
3689
4627
  weight: 1,
3690
4628
  framework: "react"
@@ -3722,7 +4660,7 @@
3722
4660
  * @LastEditTime: 2023-02-09 16:48:59
3723
4661
  * @Description:
3724
4662
  */
3725
- var config$6 = {
4663
+ var config$8 = {
3726
4664
  componentType: 'amisSchema',
3727
4665
  group: "华炎魔方",
3728
4666
  componentName: "AmisInstanceDetail",
@@ -3746,18 +4684,18 @@
3746
4684
  icon: "fa-fw fa fa-list-alt"
3747
4685
  }
3748
4686
  };
3749
- var AmisInstanceDetail = __assign(__assign({}, config$6), { snippets: [
4687
+ var AmisInstanceDetail = __assign(__assign({}, config$8), { snippets: [
3750
4688
  {
3751
- title: config$6.title,
4689
+ title: config$8.title,
3752
4690
  screenshot: "",
3753
4691
  schema: {
3754
- componentName: config$6.componentName,
3755
- props: config$6.preview
4692
+ componentName: config$8.componentName,
4693
+ props: config$8.preview
3756
4694
  }
3757
4695
  }
3758
4696
  ], amis: {
3759
4697
  render: {
3760
- type: config$6.amis.name,
4698
+ type: config$8.amis.name,
3761
4699
  usage: "renderer",
3762
4700
  weight: 1,
3763
4701
  framework: "react"
@@ -3793,7 +4731,7 @@
3793
4731
  * @LastEditTime: 2022-12-08 10:37:45
3794
4732
  * @Description:
3795
4733
  */
3796
- var config$5 = {
4734
+ var config$7 = {
3797
4735
  componentType: 'amisSchema',
3798
4736
  group: "华炎魔方",
3799
4737
  componentName: "PageListView",
@@ -3817,18 +4755,18 @@
3817
4755
  icon: "fa-fw fa fa-list-alt"
3818
4756
  }
3819
4757
  };
3820
- var PageListViewMeta = __assign(__assign({}, config$5), { snippets: [
4758
+ var PageListViewMeta = __assign(__assign({}, config$7), { snippets: [
3821
4759
  {
3822
- title: config$5.title,
4760
+ title: config$7.title,
3823
4761
  screenshot: "",
3824
4762
  schema: {
3825
- componentName: config$5.componentName,
3826
- props: config$5.preview
4763
+ componentName: config$7.componentName,
4764
+ props: config$7.preview
3827
4765
  }
3828
4766
  }
3829
4767
  ], amis: {
3830
4768
  render: {
3831
- type: config$5.amis.name,
4769
+ type: config$7.amis.name,
3832
4770
  usage: "renderer",
3833
4771
  weight: 1,
3834
4772
  framework: "react"
@@ -3842,7 +4780,7 @@
3842
4780
  * @LastEditTime: 2022-12-08 10:37:45
3843
4781
  * @Description:
3844
4782
  */
3845
- var config$4 = {
4783
+ var config$6 = {
3846
4784
  componentType: 'amisSchema',
3847
4785
  group: "华炎魔方",
3848
4786
  componentName: "PageRecordDetail",
@@ -3866,18 +4804,18 @@
3866
4804
  icon: "fa-fw fa fa-list-alt"
3867
4805
  }
3868
4806
  };
3869
- var PageRecordDetailMeta = __assign(__assign({}, config$4), { snippets: [
4807
+ var PageRecordDetailMeta = __assign(__assign({}, config$6), { snippets: [
3870
4808
  {
3871
- title: config$4.title,
4809
+ title: config$6.title,
3872
4810
  screenshot: "",
3873
4811
  schema: {
3874
- componentName: config$4.componentName,
3875
- props: config$4.preview
4812
+ componentName: config$6.componentName,
4813
+ props: config$6.preview
3876
4814
  }
3877
4815
  }
3878
4816
  ], amis: {
3879
4817
  render: {
3880
- type: config$4.amis.name,
4818
+ type: config$6.amis.name,
3881
4819
  usage: "renderer",
3882
4820
  weight: 1,
3883
4821
  framework: "react"
@@ -3891,7 +4829,7 @@
3891
4829
  * @LastEditTime: 2023-04-12 14:35:40
3892
4830
  * @Description:
3893
4831
  */
3894
- var config$3 = {
4832
+ var config$5 = {
3895
4833
  // componentType: 'amisSchema',
3896
4834
  group: "华炎魔方-原子组件",
3897
4835
  componentName: "SteedosSkeleton",
@@ -3915,32 +4853,32 @@
3915
4853
  icon: "fa-fw fa fa-list-alt"
3916
4854
  }
3917
4855
  };
3918
- var SteedosSkeleton = __assign(__assign({}, config$3), { snippets: [
4856
+ var SteedosSkeleton = __assign(__assign({}, config$5), { snippets: [
3919
4857
  {
3920
- title: config$3.title,
4858
+ title: config$5.title,
3921
4859
  screenshot: "",
3922
4860
  schema: {
3923
- componentName: config$3.componentName,
3924
- props: config$3.preview
4861
+ componentName: config$5.componentName,
4862
+ props: config$5.preview
3925
4863
  }
3926
4864
  }
3927
4865
  ], amis: {
3928
4866
  render: {
3929
- type: config$3.amis.name,
4867
+ type: config$5.amis.name,
3930
4868
  usage: "renderer",
3931
4869
  weight: 1,
3932
4870
  framework: "react"
3933
4871
  },
3934
4872
  plugin_disable: {
3935
- rendererName: config$3.amis.name,
4873
+ rendererName: config$5.amis.name,
3936
4874
  $schema: '/schemas/UnkownSchema.json',
3937
- name: config$3.title,
3938
- description: config$3.title,
3939
- tags: [config$3.group],
4875
+ name: config$5.title,
4876
+ description: config$5.title,
4877
+ tags: [config$5.group],
3940
4878
  order: -9999,
3941
- icon: config$3.amis.icon,
4879
+ icon: config$5.amis.icon,
3942
4880
  scaffold: {
3943
- type: config$3.amis.name,
4881
+ type: config$5.amis.name,
3944
4882
  count: 100,
3945
4883
  body: [], // 容器类字段
3946
4884
  },
@@ -3951,7 +4889,7 @@
3951
4889
  }
3952
4890
  ],
3953
4891
  previewSchema: {
3954
- type: config$3.amis.name,
4892
+ type: config$5.amis.name,
3955
4893
  config: {
3956
4894
  "active": true,
3957
4895
  "loading": true
@@ -3984,7 +4922,7 @@
3984
4922
  * @LastEditTime: 2023-04-12 15:06:00
3985
4923
  * @Description:
3986
4924
  */
3987
- var config$2 = {
4925
+ var config$4 = {
3988
4926
  componentType: 'amisSchema',
3989
4927
  group: "华炎魔方",
3990
4928
  componentName: "PageObject",
@@ -4008,18 +4946,18 @@
4008
4946
  icon: "fa-fw fa fa-list-alt"
4009
4947
  }
4010
4948
  };
4011
- var PageObject = __assign(__assign({}, config$2), { snippets: [
4949
+ var PageObject = __assign(__assign({}, config$4), { snippets: [
4012
4950
  {
4013
- title: config$2.title,
4951
+ title: config$4.title,
4014
4952
  screenshot: "",
4015
4953
  schema: {
4016
- componentName: config$2.componentName,
4017
- props: config$2.preview
4954
+ componentName: config$4.componentName,
4955
+ props: config$4.preview
4018
4956
  }
4019
4957
  }
4020
4958
  ], amis: {
4021
4959
  render: {
4022
- type: config$2.amis.name,
4960
+ type: config$4.amis.name,
4023
4961
  usage: "renderer",
4024
4962
  weight: 1,
4025
4963
  framework: "react"
@@ -4032,7 +4970,7 @@
4032
4970
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
4033
4971
  * @LastEditTime: 2023-12-14 14:51:35
4034
4972
  */
4035
- var config$1 = {
4973
+ var config$3 = {
4036
4974
  componentType: 'amisSchema',
4037
4975
  group: "华炎魔方",
4038
4976
  componentName: "AmisInputTable",
@@ -4109,34 +5047,34 @@
4109
5047
  icon: "fa-fw fa fa-list-alt"
4110
5048
  }
4111
5049
  };
4112
- var AmisInputTable = __assign(__assign({}, config$1), { snippets: [
5050
+ var AmisInputTable = __assign(__assign({}, config$3), { snippets: [
4113
5051
  {
4114
- title: config$1.title,
5052
+ title: config$3.title,
4115
5053
  screenshot: "",
4116
5054
  schema: {
4117
- componentName: config$1.componentName,
4118
- props: config$1.preview
5055
+ componentName: config$3.componentName,
5056
+ props: config$3.preview
4119
5057
  }
4120
5058
  }
4121
5059
  ], amis: {
4122
5060
  render: {
4123
- type: config$1.amis.name,
5061
+ type: config$3.amis.name,
4124
5062
  usage: "renderer",
4125
5063
  weight: 1,
4126
5064
  framework: "react"
4127
5065
  },
4128
5066
  plugin: {
4129
5067
  // plugin_disabled: {
4130
- rendererName: config$1.amis.name,
5068
+ rendererName: config$3.amis.name,
4131
5069
  $schema: '/schemas/UnkownSchema.json',
4132
- name: config$1.title,
4133
- description: config$1.description,
4134
- tags: [config$1.group],
5070
+ name: config$3.title,
5071
+ description: config$3.description,
5072
+ tags: [config$3.group],
4135
5073
  order: -9999,
4136
- icon: config$1.amis.icon,
5074
+ icon: config$3.amis.icon,
4137
5075
  scaffold: {
4138
- type: config$1.amis.name,
4139
- label: config$1.title,
5076
+ type: config$3.amis.name,
5077
+ label: config$3.title,
4140
5078
  fields: [
4141
5079
  {
4142
5080
  "name": "a",
@@ -4167,7 +5105,7 @@
4167
5105
  enableDialog: true
4168
5106
  },
4169
5107
  previewSchema: {
4170
- type: config$1.amis.name,
5108
+ type: config$3.amis.name,
4171
5109
  fields: [
4172
5110
  {
4173
5111
  "name": "a",
@@ -4342,7 +5280,7 @@
4342
5280
  * @LastEditTime: 2024-01-13 11:40:21
4343
5281
  * @Description:
4344
5282
  */
4345
- var config = {
5283
+ var config$2 = {
4346
5284
  componentType: 'amisSchema',
4347
5285
  group: "华炎魔方",
4348
5286
  componentName: "AmisRecordDetailMini",
@@ -4378,34 +5316,34 @@
4378
5316
  icon: "fa-fw fa fa-list-alt"
4379
5317
  }
4380
5318
  };
4381
- var AmisRecordDetailMini = __assign(__assign({}, config), { snippets: [
5319
+ var AmisRecordDetailMini = __assign(__assign({}, config$2), { snippets: [
4382
5320
  {
4383
- title: config.title,
5321
+ title: config$2.title,
4384
5322
  screenshot: "",
4385
5323
  schema: {
4386
- componentName: config.componentName,
4387
- props: config.preview
5324
+ componentName: config$2.componentName,
5325
+ props: config$2.preview
4388
5326
  }
4389
5327
  }
4390
5328
  ], amis: {
4391
5329
  render: {
4392
- type: config.amis.name,
5330
+ type: config$2.amis.name,
4393
5331
  usage: "renderer",
4394
5332
  weight: 1,
4395
5333
  framework: "react"
4396
5334
  },
4397
5335
  plugin__disable: {
4398
- rendererName: config.amis.name,
5336
+ rendererName: config$2.amis.name,
4399
5337
  $schema: '/schemas/UnkownSchema.json',
4400
- name: config.title,
4401
- description: config.title,
4402
- tags: [config.group],
5338
+ name: config$2.title,
5339
+ description: config$2.title,
5340
+ tags: [config$2.group],
4403
5341
  order: -9999,
4404
- icon: config.amis.icon,
5342
+ icon: config$2.amis.icon,
4405
5343
  scaffold: {
4406
- type: config.amis.name,
5344
+ type: config$2.amis.name,
4407
5345
  body: [],
4408
- label: config.title,
5346
+ label: config$2.title,
4409
5347
  objectApiName: "${objectName}",
4410
5348
  recordId: "${recordId}"
4411
5349
  },
@@ -4416,7 +5354,7 @@
4416
5354
  }
4417
5355
  ],
4418
5356
  previewSchema: {
4419
- type: config.amis.name,
5357
+ type: config$2.amis.name,
4420
5358
  objectApiName: 'space_users'
4421
5359
  },
4422
5360
  panelTitle: "设置",
@@ -4446,14 +5384,1229 @@
4446
5384
  }
4447
5385
  } });
4448
5386
 
5387
+ // 通用元数据配置生成器
5388
+ var createMetaConfig = function (name, title, icon) {
5389
+ var metaConfig = {
5390
+ componentType: 'amisSchema',
5391
+ group: "字段",
5392
+ componentName: "SteedosField".concat(name),
5393
+ title: title,
5394
+ docUrl: "",
5395
+ screenshot: "",
5396
+ npm: {
5397
+ package: "@steedos-widgets/amis-object",
5398
+ version: "{{version}}",
5399
+ exportName: "SteedosField".concat(name),
5400
+ main: "",
5401
+ destructuring: true,
5402
+ subName: ""
5403
+ },
5404
+ preview: {},
5405
+ targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
5406
+ engines: ["amis"],
5407
+ amis: {
5408
+ name: "sfield-".concat(name.toLowerCase()),
5409
+ icon: icon
5410
+ }
5411
+ };
5412
+ return __assign(__assign({}, metaConfig), { snippets: [
5413
+ {
5414
+ title: metaConfig.title,
5415
+ screenshot: "",
5416
+ schema: {
5417
+ componentName: metaConfig.componentName,
5418
+ props: metaConfig.preview
5419
+ }
5420
+ }
5421
+ ], amis: {
5422
+ render: {
5423
+ type: metaConfig.amis.name,
5424
+ usage: "renderer",
5425
+ weight: 1,
5426
+ framework: "react"
5427
+ },
5428
+ plugin: {
5429
+ rendererName: metaConfig.amis.name,
5430
+ $schema: '/schemas/UnkownSchema.json',
5431
+ name: metaConfig.title,
5432
+ isBaseComponent: true,
5433
+ description: metaConfig.title,
5434
+ tags: [metaConfig.group],
5435
+ order: -9999,
5436
+ icon: metaConfig.amis.icon,
5437
+ scaffold: {
5438
+ type: metaConfig.amis.name,
5439
+ config: {
5440
+ "type": name.toLowerCase(),
5441
+ "label": title,
5442
+ "amis": {}
5443
+ }
5444
+ },
5445
+ previewSchema: {
5446
+ type: metaConfig.amis.name,
5447
+ config: {
5448
+ "type": name.toLowerCase(),
5449
+ "label": title,
5450
+ "amis": {}
5451
+ }
5452
+ },
5453
+ panelTitle: "设置",
5454
+ panelControls: [
5455
+ {
5456
+ "type": "tabs",
5457
+ tabsMode: 'line',
5458
+ className: 'editor-prop-config-tabs',
5459
+ linksClassName: 'editor-prop-config-tabs-links',
5460
+ contentClassName: 'no-border editor-prop-config-tabs-cont',
5461
+ "tabs": [
5462
+ {
5463
+ "title": "通用",
5464
+ "className": 'ae-formItemControl-body',
5465
+ "body": [
5466
+ {
5467
+ "type": "input-text",
5468
+ "name": "config.object",
5469
+ "value": "${objectName}",
5470
+ "disabled": true,
5471
+ "label": "对象",
5472
+ "required": true
5473
+ },
5474
+ {
5475
+ "name": "config.type",
5476
+ "label": "字段类型",
5477
+ "required": true,
5478
+ "type": "select",
5479
+ "joinValues": false,
5480
+ "options": [
5481
+ {
5482
+ "label": "文本",
5483
+ "value": "text"
5484
+ },
5485
+ {
5486
+ "label": "长文本",
5487
+ "value": "textarea"
5488
+ },
5489
+ {
5490
+ "label": "富文本",
5491
+ "value": "html"
5492
+ },
5493
+ {
5494
+ "label": "代码",
5495
+ "value": "code"
5496
+ },
5497
+ {
5498
+ "label": "Markdown",
5499
+ "value": "markdown"
5500
+ },
5501
+ {
5502
+ "label": "选择框",
5503
+ "value": "select"
5504
+ },
5505
+ {
5506
+ "label": "颜色",
5507
+ "value": "color"
5508
+ },
5509
+ {
5510
+ "label": "复选框",
5511
+ "value": "boolean"
5512
+ },
5513
+ {
5514
+ "label": "开关",
5515
+ "value": "toggle"
5516
+ },
5517
+ {
5518
+ "label": "日期",
5519
+ "value": "date"
5520
+ },
5521
+ {
5522
+ "label": "日期时间",
5523
+ "value": "datetime"
5524
+ },
5525
+ {
5526
+ "label": "时间",
5527
+ "value": "time"
5528
+ },
5529
+ {
5530
+ "label": "数值",
5531
+ "value": "number"
5532
+ },
5533
+ {
5534
+ "label": "金额",
5535
+ "value": "currency"
5536
+ },
5537
+ {
5538
+ "label": "百分比",
5539
+ "value": "percent"
5540
+ },
5541
+ {
5542
+ "label": "密码",
5543
+ "value": "password"
5544
+ },
5545
+ {
5546
+ "label": "相关表关系",
5547
+ "value": "lookup"
5548
+ },
5549
+ {
5550
+ "label": "主/子表关系",
5551
+ "value": "master_detail"
5552
+ },
5553
+ {
5554
+ "label": "自动编号",
5555
+ "value": "autonumber"
5556
+ },
5557
+ {
5558
+ "label": "网址",
5559
+ "value": "url"
5560
+ },
5561
+ {
5562
+ "label": "邮件地址",
5563
+ "value": "email"
5564
+ },
5565
+ {
5566
+ "label": "地理位置",
5567
+ "value": "location"
5568
+ },
5569
+ {
5570
+ "label": "图片",
5571
+ "value": "image"
5572
+ },
5573
+ {
5574
+ "label": "附件",
5575
+ "value": "file"
5576
+ },
5577
+ {
5578
+ "label": "公式",
5579
+ "value": "formula"
5580
+ },
5581
+ {
5582
+ "label": "累计汇总",
5583
+ "value": "summary"
5584
+ }
5585
+ ],
5586
+ "extractValue": true,
5587
+ "clearable": true,
5588
+ "labelField": "label",
5589
+ "valueField": "value",
5590
+ "labelClassName": "text-left",
5591
+ "clearValueOnHidden": true,
5592
+ "disabledOn": "${config.is_system == true}",
5593
+ "searchable": true
5594
+ },
5595
+ {
5596
+ "name": "config.label",
5597
+ "label": "显示名称",
5598
+ "labelRemark": "",
5599
+ "description": "",
5600
+ "required": true,
5601
+ "type": "input-text",
5602
+ "labelClassName": "text-left",
5603
+ "clearValueOnHidden": true
5604
+ },
5605
+ {
5606
+ "name": "config.name",
5607
+ "label": "API 名称",
5608
+ "labelRemark": "API 名称只能包含小写字母、数字,必须以字母开头,不能以下划线字符结尾或包含两个连续的下划线字符",
5609
+ "description": "",
5610
+ "required": true,
5611
+ "type": "input-text",
5612
+ "clearValueOnHidden": true,
5613
+ "disabledOn": "${config.is_system == true}"
5614
+ },
5615
+ {
5616
+ "name": "config.autonumber_enable_modify",
5617
+ "label": "允许修改编号",
5618
+ "required": false,
5619
+ "type": "checkbox",
5620
+ "tpl": null,
5621
+ "visibleOn": "config.type === 'autonumber' ? true: false",
5622
+ "clearValueOnHidden": true
5623
+ },
5624
+ {
5625
+ "name": "config.rows",
5626
+ "label": "多行文本行数",
5627
+ "labelRemark": "",
5628
+ "description": "",
5629
+ "requiredOn": "config.type === 'textarea' ? true: false",
5630
+ "type": "input-number",
5631
+ "precision": 0,
5632
+ "visibleOn": "config.type === 'textarea' ? true: false",
5633
+ "clearValueOnHidden": true
5634
+ },
5635
+ {
5636
+ "name": "config.language",
5637
+ "label": "语言",
5638
+ "requiredOn": "['code'].indexOf(config.type) > -1 ? true: false",
5639
+ "type": "select",
5640
+ "joinValues": false,
5641
+ "options": [
5642
+ {
5643
+ "label": "bat",
5644
+ "value": "bat"
5645
+ },
5646
+ {
5647
+ "label": "c",
5648
+ "value": "c"
5649
+ },
5650
+ {
5651
+ "label": "coffeescript",
5652
+ "value": "coffeescript"
5653
+ },
5654
+ {
5655
+ "label": "cpp",
5656
+ "value": "cpp"
5657
+ },
5658
+ {
5659
+ "label": "csharp",
5660
+ "value": "csharp"
5661
+ },
5662
+ {
5663
+ "label": "css",
5664
+ "value": "css"
5665
+ },
5666
+ {
5667
+ "label": "dockerfile",
5668
+ "value": "dockerfile"
5669
+ },
5670
+ {
5671
+ "label": "fsharp",
5672
+ "value": "fsharp"
5673
+ },
5674
+ {
5675
+ "label": "go",
5676
+ "value": "go"
5677
+ },
5678
+ {
5679
+ "label": "handlebars",
5680
+ "value": "handlebars"
5681
+ },
5682
+ {
5683
+ "label": "html",
5684
+ "value": "html"
5685
+ },
5686
+ {
5687
+ "label": "ini",
5688
+ "value": "ini"
5689
+ },
5690
+ {
5691
+ "label": "java",
5692
+ "value": "java"
5693
+ },
5694
+ {
5695
+ "label": "javascript",
5696
+ "value": "javascript"
5697
+ },
5698
+ {
5699
+ "label": "json",
5700
+ "value": "json"
5701
+ },
5702
+ {
5703
+ "label": "less",
5704
+ "value": "less"
5705
+ },
5706
+ {
5707
+ "label": "lua",
5708
+ "value": "lua"
5709
+ },
5710
+ {
5711
+ "label": "markdown",
5712
+ "value": "markdown"
5713
+ },
5714
+ {
5715
+ "label": "msdax",
5716
+ "value": "msdax"
5717
+ },
5718
+ {
5719
+ "label": "objective-c",
5720
+ "value": "objective-c"
5721
+ },
5722
+ {
5723
+ "label": "php",
5724
+ "value": "php"
5725
+ },
5726
+ {
5727
+ "label": "plaintext",
5728
+ "value": "plaintext"
5729
+ },
5730
+ {
5731
+ "label": "postiats",
5732
+ "value": "postiats"
5733
+ },
5734
+ {
5735
+ "label": "powershell",
5736
+ "value": "powershell"
5737
+ },
5738
+ {
5739
+ "label": "pug",
5740
+ "value": "pug"
5741
+ },
5742
+ {
5743
+ "label": "python",
5744
+ "value": "python"
5745
+ },
5746
+ {
5747
+ "label": "r",
5748
+ "value": "r"
5749
+ },
5750
+ {
5751
+ "label": "razor",
5752
+ "value": "razor"
5753
+ },
5754
+ {
5755
+ "label": "ruby",
5756
+ "value": "ruby"
5757
+ },
5758
+ {
5759
+ "label": "sb",
5760
+ "value": "sb"
5761
+ },
5762
+ {
5763
+ "label": "scss",
5764
+ "value": "scss"
5765
+ },
5766
+ {
5767
+ "label": "shell",
5768
+ "value": "shell"
5769
+ },
5770
+ {
5771
+ "label": "sol",
5772
+ "value": "sol"
5773
+ },
5774
+ {
5775
+ "label": "sql",
5776
+ "value": "sql"
5777
+ },
5778
+ {
5779
+ "label": "swift",
5780
+ "value": "swift"
5781
+ },
5782
+ {
5783
+ "label": "typescript",
5784
+ "value": "typescript"
5785
+ },
5786
+ {
5787
+ "label": "vb",
5788
+ "value": "vb"
5789
+ },
5790
+ {
5791
+ "label": "xml",
5792
+ "value": "xml"
5793
+ },
5794
+ {
5795
+ "label": "yaml",
5796
+ "value": "yaml"
5797
+ }
5798
+ ],
5799
+ "extractValue": true,
5800
+ "clearable": true,
5801
+ "labelField": "label",
5802
+ "valueField": "value",
5803
+ "visibleOn": "['code'].indexOf(config.type) > -1 ? true: false",
5804
+ "clearValueOnHidden": true,
5805
+ "disabledOn": "${config.is_system == true}"
5806
+ },
5807
+ {
5808
+ "name": "config.multiple",
5809
+ "label": "多选",
5810
+ "labelRemark": "单选<==>多选 相互切换,请自行重新提交已有记录或在数据库中统一修改此字段的保存格式。",
5811
+ "type": "checkbox",
5812
+ "visibleOn": "['select', 'lookup', 'image','file'].indexOf(config.type) > -1 ? true: false",
5813
+ "clearValueOnHidden": true,
5814
+ "disabledOn": "${config.is_system == true}"
5815
+ },
5816
+ {
5817
+ "name": "config.data_type",
5818
+ "label": "数据类型",
5819
+ "labelRemark": "字段类型为公式时,必须填写此字段。",
5820
+ "requiredOn": "['formula'].indexOf(config.type) > -1 ? true: false",
5821
+ "type": "select",
5822
+ "joinValues": false,
5823
+ "extractValue": true,
5824
+ "clearable": true,
5825
+ "disabledOn": "${config.is_system == true}",
5826
+ "searchable": true,
5827
+ "source": {
5828
+ "method": "post",
5829
+ "url": "${context.rootUrl}/graphql?depend_on_type=${config.type}",
5830
+ "data": {
5831
+ "query": "{objects(filters: [\"_id\", \"=\", \"-1\"]){_id}}"
5832
+ },
5833
+ "headers": {
5834
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
5835
+ },
5836
+ "sendOn": "this.config.type",
5837
+ "adaptor": "\n if (context.config.type === \"select\") {\n payload.data.options = [\n {\n \"label\": \"\u5E03\u5C14\",\n \"value\": \"boolean\"\n },\n {\n \"label\": \"\u6570\u503C\",\n \"value\": \"number\"\n },\n {\n \"label\": \"\u6587\u672C\",\n \"value\": \"text\"\n }\n ]\n }else {\n payload.data.options = [\n {\n \"label\": \"\u5E03\u5C14\",\n \"value\": \"boolean\"\n },\n {\n \"label\": \"\u6570\u503C\",\n \"value\": \"number\"\n },\n {\n \"label\": \"\u91D1\u989D\",\n \"value\": \"currency\"\n },\n {\n \"label\": \"\u767E\u5206\u6BD4\",\n \"value\": \"percent\"\n },\n {\n \"label\": \"\u6587\u672C\",\n \"value\": \"text\"\n },\n {\n \"label\": \"\u65E5\u671F\",\n \"value\": \"date\"\n },\n {\n \"label\": \"\u65E5\u671F\u65F6\u95F4\",\n \"value\": \"datetime\"\n }\n ]\n }\n return payload;\n "
5838
+ },
5839
+ "visibleOn": "['formula','select'].indexOf(config.type) > -1 ? true: false",
5840
+ "clearValueOnHidden": true
5841
+ },
5842
+ {
5843
+ "type": "input-table",
5844
+ "name": "config.options",
5845
+ "label": "选择项",
5846
+ "labelRemark": "选择项的每个选项显示名及选项值不能为空,背景颜色请设置为ffffff这种格式的16进制数值。",
5847
+ "requiredOn": "config.type === 'select' ? true: false",
5848
+ "visibleOn": "config.type === 'select' ? true: false",
5849
+ "clearValueOnHidden": true,
5850
+ "showIndex": true,
5851
+ "addable": true,
5852
+ "removable": true,
5853
+ "columnsTogglable": false,
5854
+ "needConfirm": false,
5855
+ "footerAddBtn": {
5856
+ "visibleOn": "${!config.is_system}"
5857
+ },
5858
+ "columns": [
5859
+ {
5860
+ "type": "input-text",
5861
+ "name": "label",
5862
+ "label": "显示名",
5863
+ "required": true,
5864
+ "disabledOn": "${config.is_system == true}",
5865
+ "width": 100
5866
+ },
5867
+ {
5868
+ "type": "input-text",
5869
+ "name": "value",
5870
+ "label": "选项值",
5871
+ "required": true,
5872
+ "disabledOn": "${config.is_system == true}",
5873
+ "width": 100
5874
+ },
5875
+ {
5876
+ "type": "input-color",
5877
+ "name": "color",
5878
+ "label": "背景颜色",
5879
+ "disabledOn": "${config.is_system == true}",
5880
+ "width": 70
5881
+ },
5882
+ {
5883
+ "type": "textarea",
5884
+ "name": "description",
5885
+ "label": "描述",
5886
+ "disabledOn": "${config.is_system == true}",
5887
+ "width": 100
5888
+ },
5889
+ {
5890
+ "type": "operation",
5891
+ "label": "操作",
5892
+ "visibleOn": "${!config.is_system}",
5893
+ "width": 70,
5894
+ "fixed": "right"
5895
+ }
5896
+ ]
5897
+ },
5898
+ {
5899
+ "name": "config.precision",
5900
+ "label": "数字位数",
5901
+ "labelRemark": "小数点左边的数字位数",
5902
+ "requiredOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
5903
+ "type": "input-number",
5904
+ "precision": 0,
5905
+ "visibleOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
5906
+ "clearValueOnHidden": true,
5907
+ "value": 18,
5908
+ "disabledOn": "${config.is_system == true}"
5909
+ },
5910
+ {
5911
+ "name": "config.scale",
5912
+ "label": "小数位数",
5913
+ "labelRemark": "If the field type is a Percent, this indicates the number of decimal places the field will display, for example, two decimal places will display as 10.20%.",
5914
+ "requiredOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
5915
+ "type": "input-number",
5916
+ "min": 0,
5917
+ "precision": 0,
5918
+ "visibleOn": " (function(){ if(['number', 'currency', 'percent', 'summary'].indexOf(config.type) > -1){ return true; } else{ if(['formula'].indexOf(config.type) > -1 && ['number', 'currency', 'percent'].indexOf(config.data_type) > -1){ return true; } else{ return false; } } })() ",
5919
+ "labelClassName": "text-left",
5920
+ "clearValueOnHidden": true,
5921
+ "value": 2,
5922
+ "disabledOn": "${config.is_system == true}"
5923
+ },
5924
+ {
5925
+ "name": "config.formula",
5926
+ "label": "公式",
5927
+ "labelRemark": "字段类型为自动编号或公式时,必须填写此字段。",
5928
+ "description": "",
5929
+ "requiredOn": "['autonumber', 'formula'].indexOf(config.type) > -1 ? true: false",
5930
+ "type": "textarea",
5931
+ "visibleOn": "['autonumber', 'formula'].indexOf(config.type) > -1 ? true: false",
5932
+ "clearValueOnHidden": true,
5933
+ "disabledOn": "${config.is_system == true}"
5934
+ },
5935
+ {
5936
+ "name": "config.show_as_qr",
5937
+ "label": "显示为二维码",
5938
+ "required": false,
5939
+ "type": "checkbox",
5940
+ "tpl": null,
5941
+ "visibleOn": "config.type === 'url' ? true: false",
5942
+ "clearValueOnHidden": true,
5943
+ "disabledOn": "${config.is_system == true}"
5944
+ },
5945
+ {
5946
+ "name": "config.coordinatesType",
5947
+ "label": "坐标类型",
5948
+ "required": false,
5949
+ "type": "input-text",
5950
+ "visibleOn": "['location'].indexOf(config.type) > -1 ? true: false",
5951
+ "clearValueOnHidden": true,
5952
+ "disabledOn": "${config.is_system == true}",
5953
+ "value": "bd09"
5954
+ },
5955
+ {
5956
+ "name": "config.formula_blank_value",
5957
+ "label": "空白字段处理",
5958
+ "labelRemark": "如果您的公式引用了任何数字和货币字段,请指定当这些字段值为空时如何处理公式输出。",
5959
+ "description": "",
5960
+ "requiredOn": "['formula'].indexOf(config.type) > -1 ? true: false",
5961
+ "type": "select",
5962
+ "joinValues": false,
5963
+ "options": [
5964
+ {
5965
+ "label": "将空白字段视为零",
5966
+ "value": "zeroes"
5967
+ },
5968
+ {
5969
+ "label": "将空白字段视为空白",
5970
+ "value": "blanks"
5971
+ }
5972
+ ],
5973
+ "extractValue": true,
5974
+ "clearable": true,
5975
+ "labelField": "label",
5976
+ "valueField": "value",
5977
+ "visibleOn": "['formula'].indexOf(config.type) > -1 ? true: false",
5978
+ "labelClassName": "text-left",
5979
+ "clearValueOnHidden": true,
5980
+ "fieldName": "config.formula_blank_value",
5981
+ "disabledOn": "${config.is_system == true}"
5982
+ },
5983
+ {
5984
+ "name": "config.reference_to",
5985
+ "label": "引用对象",
5986
+ "requiredOn": "['lookup','master_detail'].indexOf(config.type) > -1 ? true: false",
5987
+ "type": "select",
5988
+ "joinValues": false,
5989
+ "extractValue": true,
5990
+ "clearable": true,
5991
+ "disabledOn": "${config.is_system == true}",
5992
+ "searchable": true,
5993
+ "source": {
5994
+ "method": "post",
5995
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}",
5996
+ "data": {
5997
+ "orderBy": "${orderBy}",
5998
+ "orderDir": "${orderDir}",
5999
+ "pageNo": "${page}",
6000
+ "pageSize": "${perPage}",
6001
+ "queryFields": "_id space label:label value:name",
6002
+ "query": "{options:objects(filters: {__filters}, top: {__top}, sort: \"{__sort}\"){_id space label:label value:name},count:objects__count(filters:{__filters})}",
6003
+ "$term": "$term",
6004
+ "$value": "$config.reference_to",
6005
+ "$": "$$"
6006
+ },
6007
+ "headers": {
6008
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6009
+ },
6010
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
6011
+ "requestAdaptor": "\n var filters = [];\n var top = 200;\n if(api.data.$term){\n filters = [[\"label\", \"contains\", api.data.$term]];\n }\n // else if(api.data.$value){\n // filters = [[\"_id\", \"=\", api.data.$value]];\n // }\n\n var fieldFilters = undefined;\n var currentAmis = (window.amisRequire && window.amisRequire('amis')) || Amis;\n //递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析\n function traverseNestedArray(arr) {\n for (let i = 0; i < arr.length; i++) {\n if (Array.isArray(arr[i])) {\n // 如果当前元素是数组,则递归调用自身继续遍历\n traverseNestedArray(arr[i]);\n } else {\n // 如果当前元素不是数组,则处理该元素\n // 下面正则用于匹配amis公式${}\n if(/\\$\\{([^}]*)\\}/.test(arr[i])) {\n try{\n arr[i] = currentAmis.evaluate(arr[i], api.context);\n }catch(ex){\n console.error(\"运行lookup过滤公式时出现错误:\",ex);\n }\n }\n }\n }\n }\n if(fieldFilters && fieldFilters.length){\n traverseNestedArray(fieldFilters);\n filters.push(fieldFilters);\n }\n\n if(false && false){\n if(filters.length > 0){\n filters = [ [\"user_accepted\", \"=\", true], \"and\", filters ]\n }else{\n filters = [[\"user_accepted\", \"=\", true]];\n }\n }\n\n const inFilterForm = undefined;\n\n const listviewFiltersFunction = undefined;\n\n if(listviewFiltersFunction && !inFilterForm){\n const _filters0 = listviewFiltersFunction(filters, api.data.$);\n if(_filters0 && _filters0.length){\n filters.push(_filters0);\n }\n }\n \n const filtersFunction = undefined;\n\n if(filtersFunction && !inFilterForm){\n const _filters = filtersFunction(filters, api.data.$);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n var sort = \"\";\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', top).replace('{__sort}', sort.trim());\n\n var defaultValue = api.data.$value;\n var optionsFiltersOp = \"=\";\n var optionsFilters = [[\"name\", optionsFiltersOp, []]];\n if (defaultValue && !api.data.$term) { \n const defaultValueOptionsQueryData = {\"orderBy\":\"${orderBy}\",\"orderDir\":\"${orderDir}\",\"pageNo\":\"${page}\",\"pageSize\":\"${perPage}\",\"queryFields\":\"_id space label:label value:name\",\"query\":\"{defaultValueOptions:objects(filters:{__options_filters}){_id space label:label value:name}}\"};\n const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,\"\").replace(/}$/,\"\");\n // 字段值单独请求,没值的时候在请求中返回空\n optionsFilters = [[\"name\", optionsFiltersOp, defaultValue]];\n if(filters.length > 0){\n optionsFilters = [filters, optionsFilters];\n }\n if(defaultValueOptionsQuery){\n api.data.query = \"{\"+api.data.query.replace(/^{/,\"\").replace(/}$/,\"\")+\",\"+defaultValueOptionsQuery+\"}\";\n } \n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n "
6012
+ },
6013
+ "menuTpl": "<div>${label}(${value})</div>",
6014
+ "visibleOn": "['lookup', 'master_detail'].indexOf(config.type) > -1 ? true: false",
6015
+ "clearValueOnHidden": true
6016
+ },
6017
+ {
6018
+ "name": "config.summary_object",
6019
+ "label": "要汇总的对象",
6020
+ "labelRemark": "字段类型为累计汇总时,必须填写此字段。",
6021
+ "description": "",
6022
+ "requiredOn": "config.type === 'summary' ? true: false",
6023
+ "type": "select",
6024
+ "joinValues": false,
6025
+ "extractValue": true,
6026
+ "clearable": true,
6027
+ "disabledOn": "${config.is_system == true}",
6028
+ "searchable": true,
6029
+ "source": {
6030
+ "method": "get",
6031
+ "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${config.object}/detailLists/options?depend_on_object=${config.object}",
6032
+ "headers": {
6033
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6034
+ },
6035
+ "adaptor": "",
6036
+ "sendOn": "this.config.object",
6037
+ "requestAdaptor": ""
6038
+ },
6039
+ "visibleOn": "config.type === 'summary' ? true: false",
6040
+ "clearValueOnHidden": true,
6041
+ "autoComplete": {
6042
+ "method": "get",
6043
+ "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${config.object}/detailLists/options?depend_on_object=${config.object}",
6044
+ "headers": {
6045
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6046
+ },
6047
+ "adaptor": "",
6048
+ "sendOn": "this.config.object",
6049
+ "requestAdaptor": ""
6050
+ }
6051
+ },
6052
+ {
6053
+ "name": "config.summary_type",
6054
+ "label": "汇总类型",
6055
+ "labelRemark": "字段类型为累计汇总时,必须填写此字段。",
6056
+ "requiredOn": "config.type === 'summary' ? true: false",
6057
+ "type": "select",
6058
+ "joinValues": false,
6059
+ "options": [
6060
+ {
6061
+ "label": "COUNT",
6062
+ "value": "count"
6063
+ },
6064
+ {
6065
+ "label": "SUM",
6066
+ "value": "sum"
6067
+ },
6068
+ {
6069
+ "label": "MIN",
6070
+ "value": "min"
6071
+ },
6072
+ {
6073
+ "label": "MAX",
6074
+ "value": "max"
6075
+ },
6076
+ {
6077
+ "label": "AVG",
6078
+ "value": "avg"
6079
+ }
6080
+ ],
6081
+ "extractValue": true,
6082
+ "clearable": true,
6083
+ "labelField": "label",
6084
+ "valueField": "value",
6085
+ "visibleOn": "config.type === 'summary' ? true: false",
6086
+ "clearValueOnHidden": true,
6087
+ "disabledOn": "${config.is_system == true}"
6088
+ },
6089
+ {
6090
+ "name": "config.summary_field",
6091
+ "label": "汇总字段",
6092
+ "labelRemark": "字段类型为累计汇总且汇总类型不是COUNT时,必须填写此字段,只支持聚合数值、金额、日期、日期时间类型的字段。",
6093
+ "description": "",
6094
+ "requiredOn": "config.type === 'summary' && config.summary_type !== 'count' ? true: false",
6095
+ "type": "select",
6096
+ "joinValues": false,
6097
+ "extractValue": true,
6098
+ "clearable": true,
6099
+ "disabledOn": "${config.is_system == true}",
6100
+ "searchable": true,
6101
+ "source": {
6102
+ "method": "post",
6103
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}&depend_on_summary_object=${config.summary_object}&depend_on_summary_type=${config.summary_type}",
6104
+ "data": {
6105
+ "orderBy": "${orderBy}",
6106
+ "orderDir": "${orderDir}",
6107
+ "pageNo": "${page}",
6108
+ "pageSize": "${perPage}",
6109
+ "queryFields": "_id space label:label value:name",
6110
+ "query": "{options:object_fields(filters: {__filters}, top: {__top}, sort: \"{__sort}\"){_id space label:label value:name},count:object_fields__count(filters:{__filters})}",
6111
+ "$term": "$term",
6112
+ "$value": "$config.summary_field",
6113
+ "summary_object": "$config.summary_object",
6114
+ "summary_type": "$config.summary_type",
6115
+ "$": "$$"
6116
+ },
6117
+ "headers": {
6118
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6119
+ },
6120
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
6121
+ "sendOn": "this.config.summary_object && this.config.summary_type",
6122
+ "requestAdaptor": "\n var filters = [];\n var top = 200;\n if(api.data.$term){\n filters = [[\"label\", \"contains\", api.data.$term]];\n }\n // else if(api.data.$value){\n // filters = [[\"_id\", \"=\", api.data.$value]];\n // }\n\n var fieldFilters = undefined;\n var currentAmis = (window.amisRequire && window.amisRequire('amis')) || Amis;\n //递归fieldFilters数组,检查每一个元素,判断若是公式,就仅把它解析\n function traverseNestedArray(arr) {\n for (let i = 0; i < arr.length; i++) {\n if (Array.isArray(arr[i])) {\n // 如果当前元素是数组,则递归调用自身继续遍历\n traverseNestedArray(arr[i]);\n } else {\n // 如果当前元素不是数组,则处理该元素\n // 下面正则用于匹配amis公式${}\n if(/\\$\\{([^}]*)\\}/.test(arr[i])) {\n try{\n arr[i] = currentAmis.evaluate(arr[i], api.context);\n }catch(ex){\n console.error(\"运行lookup过滤公式时出现错误:\",ex);\n }\n }\n }\n }\n }\n if(fieldFilters && fieldFilters.length){\n traverseNestedArray(fieldFilters);\n filters.push(fieldFilters);\n }\n\n if(false && false){\n if(filters.length > 0){\n filters = [ [\"user_accepted\", \"=\", true], \"and\", filters ]\n }else{\n filters = [[\"user_accepted\", \"=\", true]];\n }\n }\n\n const inFilterForm = undefined;\n\n const listviewFiltersFunction = undefined;\n\n if(listviewFiltersFunction && !inFilterForm){\n const _filters0 = listviewFiltersFunction(filters, api.data.$);\n if(_filters0 && _filters0.length){\n filters.push(_filters0);\n }\n }\n \n const filtersFunction = undefined;\n\n if(filtersFunction && !inFilterForm){\n const _filters = filtersFunction(filters, api.data.$);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n var sort = \"sort_no asc\";\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', top).replace('{__sort}', sort.trim());\n\n var defaultValue = api.data.$value;\n var optionsFiltersOp = \"=\";\n var optionsFilters = [[\"name\", optionsFiltersOp, []]];\n if (defaultValue && !api.data.$term) { \n const defaultValueOptionsQueryData = {\"orderBy\":\"${orderBy}\",\"orderDir\":\"${orderDir}\",\"pageNo\":\"${page}\",\"pageSize\":\"${perPage}\",\"queryFields\":\"_id space label:label value:name\",\"query\":\"{defaultValueOptions:object_fields(filters:{__options_filters}){_id space label:label value:name}}\"};\n const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,\"\").replace(/}$/,\"\");\n // 字段值单独请求,没值的时候在请求中返回空\n optionsFilters = [[\"name\", optionsFiltersOp, defaultValue]];\n if(filters.length > 0){\n optionsFilters = [filters, optionsFilters];\n }\n if(defaultValueOptionsQuery){\n api.data.query = \"{\"+api.data.query.replace(/^{/,\"\").replace(/}$/,\"\")+\",\"+defaultValueOptionsQuery+\"}\";\n } \n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n "
6123
+ },
6124
+ "visibleOn": "config.type === 'summary' && config.summary_object && config.summary_type && config.summary_type !== 'count'",
6125
+ "clearValueOnHidden": true,
6126
+ "autoComplete": {
6127
+ "method": "get",
6128
+ "url": "${context.rootUrl}/service/api/@${config.summary_object}/uiSchema?summary_object=${config.summary_object}&summary_type=${config.summary_type}&term=${term}",
6129
+ "data": {
6130
+ "summary_type": "${config.summary_type}"
6131
+ },
6132
+ "headers": {
6133
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6134
+ },
6135
+ "sendOn": "!!this.config.summary_object && !!this.config.summary_type",
6136
+ "adaptor": "debugger;const summary_type = api.body.summary_type;\nconst term = api.query.term;\nlet fields = payload.fields;\nlet options = [];\nif (fields) {\n if (summary_type && summary_type !== \"count\") {\n if (summary_type === \"sum\" || summary_type === \"avg\") {\n /*sum/avg类型可以汇总数值、金额、百分比字段*/\n _.forEach(fields, (value, key) => {\n let fieldType = value.type;\n if ([\"formula\", \"summary\"].indexOf(fieldType) > -1) {\n /*要聚合的字段为公式或汇总字段时,按其字段数据类型判断是否支持聚合*/\n fieldType = value.data_type;\n }\n if ([\"number\", \"currency\", \"percent\"].indexOf(fieldType) > -1) {\n options.push({ label: value.label, value: value.name });\n }\n })\n }\n else {\n /*min、max类型可以汇总数值、金额、百分比、日期、日期时间字段*/\n _.forEach(fields, (value, key) => {\n let fieldType = value.type;\n if ([\"formula\", \"summary\"].indexOf(fieldType) > -1) {\n /*要聚合的字段为公式或汇总字段时,按其字段数据类型判断是否支持聚合*/\n fieldType = value.data_type;\n }\n if ([\"number\", \"currency\", \"percent\", \"date\", \"datetime\"].indexOf(fieldType) > -1) {\n options.push({ label: value.label, value: value.name });\n }\n })\n }\n }\n if (term) {\n options = _.filter(options, (item) => {\n return item.label.toLowerCase().indexOf(term.toLowerCase()) > -1;\n })\n }\n}\npayload = {\n data: { options: options },\n msg: \"\",\n status: 0\n}\nreturn payload;"
6137
+ }
6138
+ },
6139
+ //汇总过滤条件暂时无法直接使用组件,因为数据格式不一致
6140
+ {
6141
+ "name": "config.description",
6142
+ "label": "描述",
6143
+ "required": false,
6144
+ "type": "textarea",
6145
+ "tpl": "<%=(data.config.description || \"\").split(\"\\n\").join('<br>')%>",
6146
+ "clearValueOnHidden": true
6147
+ },
6148
+ {
6149
+ "name": "config.deleted_lookup_record_behavior",
6150
+ "label": "如果相关表记录被删除怎么办?",
6151
+ "required": true,
6152
+ "type": "select",
6153
+ "joinValues": false,
6154
+ "options": [
6155
+ {
6156
+ "label": "清除此字段的值。 如果您将此字段设为必填,您不能选择此选项。",
6157
+ "value": "clear"
6158
+ },
6159
+ {
6160
+ "label": "不允许删除"作为相关表关系的一部分的相关表记录"。",
6161
+ "value": "retain"
6162
+ }
6163
+ ],
6164
+ "extractValue": true,
6165
+ "clearable": true,
6166
+ "labelField": "label",
6167
+ "valueField": "value",
6168
+ "visibleOn": " 'lookup' === config.type ? true: false ",
6169
+ "clearValueOnHidden": true,
6170
+ "disabledOn": "${config.required==true}",
6171
+ "value": "${IFS(true===config.required, \"retain\", !config.required && !config.deleted_lookup_record_behavior, \"clear\", config.deleted_lookup_record_behavior)}"
6172
+ },
6173
+ {
6174
+ "name": "config.write_requires_master_read",
6175
+ "label": "当用户对主表记录有读取权限时对子表记录可以增删改",
6176
+ "labelRemark": "设置主记录上创建、编辑或删除子记录所需的最低访问级别。此字段仅适用于·主表/子表·字段类型。勾选表示允许具有'读取'访问权限的用户创建、编辑或删除子记录。反之表示允许具有'读取/写入'访问权限的用户创建、编辑或删除子记录的权限。",
6177
+ "type": "checkbox",
6178
+ "visibleOn": "config.type === 'master_detail' ? true: false",
6179
+ "clearValueOnHidden": true,
6180
+ "disabledOn": "${config.is_system == true}"
6181
+ }
6182
+ ]
6183
+ },
6184
+ {
6185
+ "title": "表单",
6186
+ "className": 'ae-formItemControl-body',
6187
+ "body": [
6188
+ {
6189
+ "name": "config.required",
6190
+ "label": "必填",
6191
+ "required": false,
6192
+ "type": "checkbox",
6193
+ "tpl": null,
6194
+ "visibleOn": "['autonumber','summary','formula'].indexOf(config.type) > -1 ? false: true",
6195
+ "clearValueOnHidden": true,
6196
+ "fieldName": "config.required"
6197
+ },
6198
+ {
6199
+ "name": "config.is_wide",
6200
+ "label": "宽字段",
6201
+ "required": false,
6202
+ "type": "checkbox",
6203
+ "tpl": null,
6204
+ "labelClassName": "text-left",
6205
+ "clearValueOnHidden": true,
6206
+ "fieldName": "config.is_wide"
6207
+ },
6208
+ {
6209
+ "name": "config.readonly",
6210
+ "label": "只读",
6211
+ "labelRemark": "只读字段不显示在表单上,数据不会提交到服务端。",
6212
+ "required": false,
6213
+ "type": "checkbox",
6214
+ "tpl": null,
6215
+ "clearValueOnHidden": true,
6216
+ "fieldName": "config.readonly"
6217
+ },
6218
+ {
6219
+ "name": "config.static",
6220
+ "label": "静态",
6221
+ "labelRemark": "静态字段在表单上显示,用户不可编辑,可动态赋值。",
6222
+ "required": false,
6223
+ "type": "checkbox",
6224
+ "tpl": null,
6225
+ "clearValueOnHidden": true,
6226
+ "fieldName": "config.static"
6227
+ },
6228
+ {
6229
+ "name": "config.inlineHelpText",
6230
+ "label": "提示文本",
6231
+ "required": false,
6232
+ "type": "textarea",
6233
+ "tpl": "<%=(data.config.inlineHelpText || \"\").split(\"\\n\").join('<br>')%>",
6234
+ "className": "col-span-2 m-0 steedos-textarea-edit ",
6235
+ "labelClassName": "text-left",
6236
+ "clearValueOnHidden": true,
6237
+ "fieldName": "config.inlineHelpText"
6238
+ },
6239
+ {
6240
+ "name": "config.enable_enhanced_lookup",
6241
+ "label": "弹出选择",
6242
+ "labelRemark": "被其他字段引用时,使用弹出框选择记录。",
6243
+ "required": false,
6244
+ "type": "checkbox",
6245
+ "tpl": null,
6246
+ "visibleOn": "['lookup'].indexOf(config.type) > -1 ? true: false",
6247
+ "clearValueOnHidden": true
6248
+ },
6249
+ {
6250
+ "name": "conig.create",
6251
+ "label": "弹出选择时允许新建",
6252
+ "required": false,
6253
+ "type": "checkbox",
6254
+ "tpl": null,
6255
+ "visibleOn": "['lookup'].indexOf(config.type) > -1 ? true: false",
6256
+ "clearValueOnHidden": true,
6257
+ "fieldName": "conig.create",
6258
+ "disabledOn": "${config.is_system == true}"
6259
+ },
6260
+ {
6261
+ "name": "config.depend_on",
6262
+ "label": "依赖字段",
6263
+ "labelRemark": "依赖字段的变化会触发当前字段重算",
6264
+ "description": "",
6265
+ "required": false,
6266
+ "type": "select",
6267
+ "joinValues": false,
6268
+ "extractValue": true,
6269
+ "clearable": true,
6270
+ "disabledOn": "${config.is_system == true}",
6271
+ "visibleOn": "['lookup', 'master_detail'].indexOf(config.type) > -1 ? true: false",
6272
+ "searchable": true,
6273
+ "multiple": true,
6274
+ "source": {
6275
+ "method": "post",
6276
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}",
6277
+ "data": {
6278
+ "query": "{options:object_fields(filters: [\"object\",\"=\",\"${config.object}\"], top: 200, sort: \"created desc\"){_id space label:label value:name},count:object_fields__count(filters:[\"object\",\"=\",\"${config.object}\"])}",
6279
+ "$value": "$config.depend_on",
6280
+ "$": "$$"
6281
+ },
6282
+ "sendOn": "this.config.object",
6283
+ "trackExpression": "${config.object}",
6284
+ "headers": {
6285
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6286
+ },
6287
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
6288
+ },
6289
+ "clearValueOnHidden": true
6290
+ },
6291
+ {
6292
+ "name": "config.enable_thousands",
6293
+ "label": "显示千分符",
6294
+ "required": false,
6295
+ "type": "checkbox",
6296
+ "tpl": null,
6297
+ "visibleOn": "['number','currency','percent'].indexOf(config.type) > -1 ? true: false",
6298
+ "clearValueOnHidden": true,
6299
+ "fieldName": "config.enable_thousands"
6300
+ }
6301
+ //filters
6302
+ //自动填充
6303
+ ]
6304
+ },
6305
+ {
6306
+ "title": "高级",
6307
+ "className": 'ae-formItemControl-body',
6308
+ "body": [
6309
+ {
6310
+ "name": "config.unique",
6311
+ "label": "创建唯一索引",
6312
+ "labelRemark": "默认每天凌晨执行一次创建,已有的索引不重复创建。",
6313
+ "required": false,
6314
+ "type": "checkbox",
6315
+ "tpl": null,
6316
+ "clearValueOnHidden": true
6317
+ },
6318
+ {
6319
+ "name": "config.filterable",
6320
+ "label": "列表页过滤器默认字段",
6321
+ "required": false,
6322
+ "type": "checkbox",
6323
+ "tpl": null,
6324
+ "clearValueOnHidden": true
6325
+ },
6326
+ {
6327
+ "name": "config.index",
6328
+ "label": "创建索引",
6329
+ "labelRemark": "默认每天凌晨执行一次创建,已有的索引不重复创建。",
6330
+ "required": false,
6331
+ "type": "checkbox",
6332
+ "tpl": null,
6333
+ "clearValueOnHidden": true
6334
+ },
6335
+ {
6336
+ "name": "config.is_name",
6337
+ "label": "名称字段",
6338
+ "required": false,
6339
+ "type": "checkbox",
6340
+ "tpl": null,
6341
+ "visibleOn": "${ARRAYSOME(['text', 'textarea', 'autonumber', 'date', 'datetime', 'time', 'formula', 'lookup', 'master_detail'], item => item === config.type) && !config.multiple}",
6342
+ "clearValueOnHidden": true,
6343
+ "disabledOn": "${config.is_system == true}"
6344
+ },
6345
+ {
6346
+ "name": "config.reference_to_field",
6347
+ "label": "外键字段",
6348
+ "labelRemark": "关联的对象保存到当前对象字段的值;例如:A对象关联B对象后,当A1记录关联了B1记录,默认会存B1记录的_id存到A1记录中。如果修改了外键字段后,会将“外键字段”替换_id存储到A1记录中。",
6349
+ "description": "默认为主键,默认值是_id",
6350
+ "required": false,
6351
+ "type": "select",
6352
+ "joinValues": false,
6353
+ "extractValue": true,
6354
+ "clearable": true,
6355
+ "disabledOn": "${config.is_system == true}",
6356
+ "visibleOn": "['lookup', 'master_detail'].indexOf(config.type) > -1 ? true: false",
6357
+ "searchable": true,
6358
+ "multiple": false,
6359
+ "source": {
6360
+ "method": "post",
6361
+ "url": "${context.rootUrl}/graphql?reload=${additionalFilters|join}",
6362
+ "data": {
6363
+ "query": "{options:object_fields(filters: [\"object\",\"=\",\"${config.reference_to}\"], top: 200, sort: \"created desc\"){_id space label:label value:name},count:object_fields__count(filters:[\"object\",\"=\",\"${config.reference_to}\"])}",
6364
+ "$value": "$config.reference_to_field",
6365
+ "$": "$$"
6366
+ },
6367
+ "sendOn": "this.config.reference_to",
6368
+ "trackExpression": "${config.reference_to}",
6369
+ "headers": {
6370
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
6371
+ },
6372
+ "adaptor": "\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a[\"value\"]=== b[\"value\"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n ",
6373
+ },
6374
+ "clearValueOnHidden": true
6375
+ }
6376
+ ]
6377
+ }
6378
+ ]
6379
+ }
6380
+ ]
6381
+ }
6382
+ } });
6383
+ };
6384
+ // 针对每个字段类型生成函数和元数据
6385
+ var fieldTypes = [
6386
+ { name: "Text", type: "text", title: "文本", icon: "fa-fw fa fa-list-alt" },
6387
+ { name: "Textarea", type: "textarea", title: "长文本", icon: "fa-fw fa fa-list-alt" },
6388
+ { name: "Html", type: "html", title: "富文本", icon: "fa-fw fa fa-code" },
6389
+ { name: "Lookup", type: "lookup", title: "相关表关系", icon: "fa-fw fa fa-search" },
6390
+ { name: "MasterDetail", type: "master_detail", title: "主/子表关系", icon: "fa-fw fa fa-link" },
6391
+ { name: "Select", type: "select", title: "选择", icon: "fa-fw fa fa-list" },
6392
+ { name: "Boolean", type: "boolean", title: "布尔", icon: "fa-fw fa fa-check" },
6393
+ { name: "Date", type: "date", title: "日期", icon: "fa-fw fa fa-calendar" },
6394
+ { name: "Datetime", type: "datetime", title: "日期时间", icon: "fa-fw fa fa-clock" },
6395
+ { name: "Time", type: "time", title: "时间", icon: "fa-fw fa fa-clock" },
6396
+ { name: "Number", type: "number", title: "数字", icon: "fa-fw fa fa-calculator" },
6397
+ { name: "Currency", type: "currency", title: "货币", icon: "fa-fw fa fa-jpy" },
6398
+ { name: "Percent", type: "percent", title: "百分比", icon: "fa-fw fa fa-percent" },
6399
+ { name: "Image", type: "image", title: "图片", icon: "fa-fw fa fa-image" },
6400
+ { name: "File", type: "file", title: "文件", icon: "fa-fw fa fa-file" },
6401
+ { name: "Code", type: "code", title: "代码", icon: "fa-fw fa fa-code" },
6402
+ { name: "Markdown", type: "markdown", title: "Markdown", icon: "fa-fw fa fa-markdown" },
6403
+ { name: "Color", type: "color", title: "颜色", icon: "fa-fw fa fa-palette" },
6404
+ { name: "Toggle", type: "toggle", title: "切换", icon: "fa-fw fa fa-toggle-on" },
6405
+ { name: "Password", type: "password", title: "密码", icon: "fa-fw fa fa-key" },
6406
+ { name: "Autonumber", type: "autonumber", title: "自动编号", icon: "fa-fw fa fa-hashtag" },
6407
+ { name: "Url", type: "url", title: "URL", icon: "fa-fw fa fa-link" },
6408
+ { name: "Email", type: "email", title: "电子邮件", icon: "fa-fw fa fa-envelope" },
6409
+ { name: "Location", type: "location", title: "位置", icon: "fa-fw fa fa-map-marker" },
6410
+ { name: "Formula", type: "formula", title: "公式", icon: "fa-fw fa fa-subscript" },
6411
+ { name: "Summary", type: "summary", title: "累计汇总", icon: "fa-fw fa fa-superscript" }
6412
+ ];
6413
+ var fieldMetas = [];
6414
+ fieldTypes.forEach(function (_a) {
6415
+ var name = _a.name; _a.type; var title = _a.title, icon = _a.icon;
6416
+ fieldMetas.push(createMetaConfig(name, title, icon));
6417
+ });
6418
+
4449
6419
  /*
4450
6420
  * @Author: baozhoutao@steedos.com
4451
- * @Date: 2022-08-31 16:32:35
6421
+ * @Date: 2022-10-11 09:39:38
6422
+ * @LastEditors: baozhoutao@steedos.com
6423
+ * @LastEditTime: 2024-09-05 15:53:41
6424
+ * @Description:
6425
+ */
6426
+ var config$1 = {
6427
+ // componentType: 'amisSchema',
6428
+ group: "字段",
6429
+ componentName: "SteedosFieldSet",
6430
+ title: "分组",
6431
+ docUrl: "",
6432
+ screenshot: "",
6433
+ npm: {
6434
+ package: "@steedos-widgets/amis-object",
6435
+ version: "{{version}}",
6436
+ exportName: "SteedosFieldSet",
6437
+ main: "",
6438
+ destructuring: true,
6439
+ subName: ""
6440
+ },
6441
+ preview: {},
6442
+ targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
6443
+ engines: ["amis"],
6444
+ // settings for amis.
6445
+ amis: {
6446
+ name: 'steedos-field-group',
6447
+ icon: "fa-fw fa fa-object-group"
6448
+ }
6449
+ };
6450
+ var AmisSteedosFieldGroup = __assign(__assign({}, config$1), { snippets: [
6451
+ {
6452
+ title: config$1.title,
6453
+ screenshot: "",
6454
+ schema: {
6455
+ componentName: config$1.componentName,
6456
+ props: config$1.preview
6457
+ }
6458
+ }
6459
+ ], amis: {
6460
+ render: {
6461
+ type: config$1.amis.name,
6462
+ usage: "renderer",
6463
+ weight: 1,
6464
+ framework: "react"
6465
+ },
6466
+ plugin: {
6467
+ rendererName: config$1.amis.name,
6468
+ $schema: '/schemas/UnkownSchema.json',
6469
+ name: config$1.title,
6470
+ description: config$1.title,
6471
+ tags: [config$1.group],
6472
+ isBaseComponent: true,
6473
+ order: -10000,
6474
+ icon: config$1.amis.icon,
6475
+ filterProps: function (props, node) {
6476
+ props.collapsed = false;
6477
+ return props;
6478
+ }.toString(),
6479
+ scaffold: {
6480
+ title: '分组',
6481
+ collapsable: true,
6482
+ type: 'steedos-field-group',
6483
+ body: [{ type: 'sfield-text', amis: {} }], // 容器类字段
6484
+ },
6485
+ // 容器类组件必需字段
6486
+ regions: [
6487
+ {
6488
+ key: 'body',
6489
+ label: '内容区',
6490
+ renderMethod: 'renderBody',
6491
+ insertPosition: 'inner',
6492
+ },
6493
+ ],
6494
+ previewSchema: {
6495
+ type: config$1.amis.name,
6496
+ },
6497
+ panelTitle: "设置",
6498
+ panelControls: [
6499
+ {
6500
+ type: 'text',
6501
+ name: 'title',
6502
+ label: '标题'
6503
+ },
6504
+ {
6505
+ type: 'switch',
6506
+ name: 'collapsed',
6507
+ label: '默认是否折叠'
6508
+ },
6509
+ {
6510
+ type: 'input-formula',
6511
+ name: 'visible_on',
6512
+ label: '显示条件'
6513
+ }
6514
+ ]
6515
+ }
6516
+ } });
6517
+
6518
+ /*
6519
+ * @Author: baozhoutao@steedos.com
6520
+ * @Date: 2022-10-11 09:39:38
4452
6521
  * @LastEditors: baozhoutao@steedos.com
4453
- * @LastEditTime: 2024-01-13 11:40:38
6522
+ * @LastEditTime: 2024-09-05 15:22:09
4454
6523
  * @Description:
4455
6524
  */
4456
- var components = [
6525
+ var config = {
6526
+ // componentType: 'amisSchema',
6527
+ group: "华炎魔方-对象",
6528
+ componentName: "SteedosObject",
6529
+ title: "对象",
6530
+ docUrl: "",
6531
+ screenshot: "",
6532
+ npm: {
6533
+ package: "@steedos-widgets/amis-object",
6534
+ version: "{{version}}",
6535
+ exportName: "SteedosObject",
6536
+ main: "",
6537
+ destructuring: true,
6538
+ subName: ""
6539
+ },
6540
+ preview: {},
6541
+ targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
6542
+ engines: ["amis"],
6543
+ // settings for amis.
6544
+ amis: {
6545
+ name: 'steedos-object',
6546
+ icon: "fa-fw fa fa-list-alt"
6547
+ }
6548
+ };
6549
+ var AmisSteedosObject = __assign(__assign({}, config), { snippets: [
6550
+ {
6551
+ title: config.title,
6552
+ screenshot: "",
6553
+ schema: {
6554
+ componentName: config.componentName,
6555
+ props: config.preview
6556
+ }
6557
+ }
6558
+ ], amis: {
6559
+ render: {
6560
+ type: config.amis.name,
6561
+ usage: "renderer",
6562
+ weight: 1,
6563
+ framework: "react"
6564
+ },
6565
+ plugin: {
6566
+ rendererName: config.amis.name,
6567
+ $schema: '/schemas/UnkownSchema.json',
6568
+ name: config.title,
6569
+ description: config.title,
6570
+ tags: [config.group],
6571
+ isBaseComponent: true,
6572
+ order: -10000,
6573
+ icon: config.amis.icon,
6574
+ scaffold: {
6575
+ type: 'steedos-object',
6576
+ body: [], // 容器类字段
6577
+ },
6578
+ // 容器类组件必需字段
6579
+ regions: [
6580
+ {
6581
+ key: 'body',
6582
+ label: '内容区'
6583
+ },
6584
+ ],
6585
+ previewSchema: {
6586
+ type: config.amis.name,
6587
+ },
6588
+ panelTitle: "设置",
6589
+ panelControls: [
6590
+ {
6591
+ type: 'text',
6592
+ name: 'name',
6593
+ label: '对象名'
6594
+ },
6595
+ {
6596
+ type: 'text',
6597
+ name: 'label',
6598
+ label: '显示名称'
6599
+ },
6600
+ {
6601
+ type: 'textarea',
6602
+ name: 'description',
6603
+ label: '描述'
6604
+ }
6605
+ ]
6606
+ }
6607
+ } });
6608
+
6609
+ var components = __spreadArray(__spreadArray([
4457
6610
  AmisRecordDetailHeader,
4458
6611
  AmisObjectForm,
4459
6612
  AmisObjectListview,
@@ -4489,7 +6642,10 @@
4489
6642
  PageObject,
4490
6643
  AmisInputTable,
4491
6644
  AmisRecordDetailMini
4492
- ];
6645
+ ], __read(fieldMetas), false), [
6646
+ AmisSteedosFieldGroup,
6647
+ AmisSteedosObject
6648
+ ], false);
4493
6649
  var componentList = [
4494
6650
  {
4495
6651
  title: "华炎魔方",