amis-core 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/esm/Root.js +1 -1
  2. package/esm/RootRenderer.js +8 -8
  3. package/esm/SchemaRenderer.js +16 -12
  4. package/esm/Scoped.js +3 -1
  5. package/esm/StatusScoped.js +1 -1
  6. package/esm/WithRootStore.js +1 -1
  7. package/esm/WithStore.js +9 -8
  8. package/esm/actions/Action.js +1 -1
  9. package/esm/actions/AjaxAction.js +2 -2
  10. package/esm/actions/BreakAction.js +1 -1
  11. package/esm/actions/BroadcastAction.js +1 -1
  12. package/esm/actions/CmptAction.js +1 -1
  13. package/esm/actions/ContinueAction.js +1 -1
  14. package/esm/actions/CopyAction.js +1 -1
  15. package/esm/actions/CustomAction.js +3 -1
  16. package/esm/actions/DialogAction.js +1 -1
  17. package/esm/actions/DrawerAction.js +1 -1
  18. package/esm/actions/EmailAction.js +1 -1
  19. package/esm/actions/LinkAction.js +1 -1
  20. package/esm/actions/LoopAction.js +1 -1
  21. package/esm/actions/PageAction.js +1 -1
  22. package/esm/actions/ParallelAction.js +1 -1
  23. package/esm/actions/StatusAction.js +1 -1
  24. package/esm/actions/SwitchAction.js +1 -1
  25. package/esm/actions/ToastAction.js +1 -1
  26. package/esm/components/CustomStyle.d.ts +4 -6
  27. package/esm/components/CustomStyle.js +29 -5
  28. package/esm/components/LazyComponent.d.ts +1 -2
  29. package/esm/components/LazyComponent.js +12 -8
  30. package/esm/components/Overlay.js +3 -1
  31. package/esm/components/PopOver.d.ts +12 -12
  32. package/esm/components/PopOver.js +3 -1
  33. package/esm/env.d.ts +2 -2
  34. package/esm/env.js +1 -1
  35. package/esm/envOverwrite.js +1 -1
  36. package/esm/factory.d.ts +7 -7
  37. package/esm/factory.js +1 -1
  38. package/esm/index.d.ts +1 -0
  39. package/esm/index.js +5 -5
  40. package/esm/locale.d.ts +1 -1
  41. package/esm/locale.js +3 -3
  42. package/esm/polyfills.js +1 -1
  43. package/esm/renderers/Form.d.ts +1 -1
  44. package/esm/renderers/Form.js +10 -8
  45. package/esm/renderers/Item.d.ts +24 -56
  46. package/esm/renderers/Item.js +25 -31
  47. package/esm/renderers/Options.js +14 -12
  48. package/esm/renderers/Placeholder.js +1 -1
  49. package/esm/renderers/builtin.js +1 -1
  50. package/esm/renderers/register.js +1 -1
  51. package/esm/renderers/wrapControl.js +70 -80
  52. package/esm/store/app.js +3 -1
  53. package/esm/store/combo.d.ts +384 -0
  54. package/esm/store/combo.js +1 -1
  55. package/esm/store/crud.js +31 -25
  56. package/esm/store/form.d.ts +160 -0
  57. package/esm/store/form.js +15 -13
  58. package/esm/store/formItem.d.ts +4 -0
  59. package/esm/store/formItem.js +42 -26
  60. package/esm/store/iRenderer.js +3 -1
  61. package/esm/store/index.js +1 -1
  62. package/esm/store/list.js +1 -1
  63. package/esm/store/manager.js +1 -1
  64. package/esm/store/modal.js +1 -1
  65. package/esm/store/node.js +1 -1
  66. package/esm/store/pagination.js +1 -1
  67. package/esm/store/root.d.ts +1 -1
  68. package/esm/store/root.js +12 -5
  69. package/esm/store/service.js +38 -33
  70. package/esm/store/status.js +1 -1
  71. package/esm/store/table.d.ts +760 -21
  72. package/esm/store/table.js +155 -55
  73. package/esm/store/table2.js +11 -8
  74. package/esm/theme.d.ts +18 -31
  75. package/esm/theme.js +1 -1
  76. package/esm/utils/Animation.js +1 -1
  77. package/esm/utils/ColorScale.js +1 -1
  78. package/esm/utils/DataSchema.js +1 -1
  79. package/esm/utils/DataScope.js +1 -1
  80. package/esm/utils/RootClose.js +1 -1
  81. package/esm/utils/SimpleMap.js +1 -1
  82. package/esm/utils/api.d.ts +3 -3
  83. package/esm/utils/api.js +2 -2
  84. package/esm/utils/arraySlice.js +1 -1
  85. package/esm/utils/attachmentAdpator.js +1 -1
  86. package/esm/utils/autobind.js +1 -1
  87. package/esm/utils/columnsSplit.js +1 -1
  88. package/esm/utils/dataMapping.js +1 -1
  89. package/esm/utils/date.js +1 -1
  90. package/esm/utils/debug.d.ts +1 -0
  91. package/esm/utils/debug.js +24 -2
  92. package/esm/utils/decodeEntity.js +1 -1
  93. package/esm/utils/dom.js +1 -1
  94. package/esm/utils/errors.js +1 -1
  95. package/esm/utils/escapeHtml.js +1 -1
  96. package/esm/utils/filter-schema.js +1 -1
  97. package/esm/utils/filter.js +1 -1
  98. package/esm/utils/formatDuration.js +1 -1
  99. package/esm/utils/formula.js +1 -1
  100. package/esm/utils/getVariable.js +1 -1
  101. package/esm/utils/grammar.js +1 -1
  102. package/esm/utils/handleAction.js +1 -1
  103. package/esm/utils/helper.d.ts +13 -1
  104. package/esm/utils/helper.js +99 -5
  105. package/esm/utils/highlight.js +1 -1
  106. package/esm/utils/icon.js +1 -1
  107. package/esm/utils/image.js +1 -1
  108. package/esm/utils/isPureVariable.js +1 -1
  109. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  110. package/esm/utils/keyToPath.d.ts +1 -1
  111. package/esm/utils/keyToPath.js +2 -1
  112. package/esm/utils/makeSorter.js +1 -1
  113. package/esm/utils/math.js +1 -1
  114. package/esm/utils/memoryParse.js +1 -1
  115. package/esm/utils/normalizeLink.js +1 -1
  116. package/esm/utils/normalizeOptions.js +1 -1
  117. package/esm/utils/object.js +1 -1
  118. package/esm/utils/offset.js +1 -1
  119. package/esm/utils/offsetParent.js +1 -1
  120. package/esm/utils/optionValueCompare.js +1 -1
  121. package/esm/utils/position.js +1 -1
  122. package/esm/utils/prettyBytes.js +1 -1
  123. package/esm/utils/renderer-event.js +2 -2
  124. package/esm/utils/replaceText.js +1 -1
  125. package/esm/utils/resize-sensor.d.ts +3 -1
  126. package/esm/utils/resize-sensor.js +34 -22
  127. package/esm/utils/resolveCondition.js +1 -1
  128. package/esm/utils/resolveVariable.js +1 -1
  129. package/esm/utils/resolveVariableAndFilter.js +1 -1
  130. package/esm/utils/resolveVariableAndFilterForAsync.js +1 -1
  131. package/esm/utils/scrollPosition.js +1 -1
  132. package/esm/utils/string2regExp.js +1 -1
  133. package/esm/utils/stripNumber.js +1 -1
  134. package/esm/utils/style-helper.d.ts +22 -14
  135. package/esm/utils/style-helper.js +181 -120
  136. package/esm/utils/style.js +1 -1
  137. package/esm/utils/toNumber.js +1 -1
  138. package/esm/utils/tokenize.js +1 -1
  139. package/esm/utils/tpl-builtin.js +1 -1
  140. package/esm/utils/tpl-lodash.js +1 -1
  141. package/esm/utils/tpl.js +1 -1
  142. package/esm/utils/uncontrollable.js +1 -1
  143. package/esm/utils/validations.js +1 -1
  144. package/lib/Root.js +1 -1
  145. package/lib/RootRenderer.js +8 -8
  146. package/lib/SchemaRenderer.js +16 -12
  147. package/lib/Scoped.js +3 -1
  148. package/lib/StatusScoped.js +1 -1
  149. package/lib/WithRootStore.js +1 -1
  150. package/lib/WithStore.js +9 -8
  151. package/lib/actions/Action.js +1 -1
  152. package/lib/actions/AjaxAction.js +2 -2
  153. package/lib/actions/BreakAction.js +1 -1
  154. package/lib/actions/BroadcastAction.js +1 -1
  155. package/lib/actions/CmptAction.js +1 -1
  156. package/lib/actions/ContinueAction.js +1 -1
  157. package/lib/actions/CopyAction.js +1 -1
  158. package/lib/actions/CustomAction.js +3 -1
  159. package/lib/actions/DialogAction.js +1 -1
  160. package/lib/actions/DrawerAction.js +1 -1
  161. package/lib/actions/EmailAction.js +1 -1
  162. package/lib/actions/LinkAction.js +1 -1
  163. package/lib/actions/LoopAction.js +1 -1
  164. package/lib/actions/PageAction.js +1 -1
  165. package/lib/actions/ParallelAction.js +1 -1
  166. package/lib/actions/StatusAction.js +1 -1
  167. package/lib/actions/SwitchAction.js +1 -1
  168. package/lib/actions/ToastAction.js +1 -1
  169. package/lib/components/CustomStyle.d.ts +4 -6
  170. package/lib/components/CustomStyle.js +28 -4
  171. package/lib/components/LazyComponent.d.ts +1 -2
  172. package/lib/components/LazyComponent.js +12 -9
  173. package/lib/components/Overlay.js +3 -1
  174. package/lib/components/PopOver.d.ts +12 -12
  175. package/lib/components/PopOver.js +3 -1
  176. package/lib/env.d.ts +2 -2
  177. package/lib/env.js +1 -1
  178. package/lib/envOverwrite.js +1 -1
  179. package/lib/factory.d.ts +7 -7
  180. package/lib/factory.js +1 -1
  181. package/lib/index.d.ts +1 -0
  182. package/lib/index.js +11 -3
  183. package/lib/locale.d.ts +1 -1
  184. package/lib/locale.js +3 -3
  185. package/lib/polyfills.js +1 -1
  186. package/lib/renderers/Form.d.ts +1 -1
  187. package/lib/renderers/Form.js +10 -8
  188. package/lib/renderers/Item.d.ts +24 -56
  189. package/lib/renderers/Item.js +26 -31
  190. package/lib/renderers/Options.js +14 -12
  191. package/lib/renderers/Placeholder.js +1 -1
  192. package/lib/renderers/builtin.js +1 -1
  193. package/lib/renderers/register.js +1 -1
  194. package/lib/renderers/wrapControl.js +70 -79
  195. package/lib/store/app.js +3 -1
  196. package/lib/store/combo.d.ts +384 -0
  197. package/lib/store/combo.js +1 -1
  198. package/lib/store/crud.js +31 -25
  199. package/lib/store/form.d.ts +160 -0
  200. package/lib/store/form.js +15 -13
  201. package/lib/store/formItem.d.ts +4 -0
  202. package/lib/store/formItem.js +41 -25
  203. package/lib/store/iRenderer.js +3 -1
  204. package/lib/store/index.js +1 -1
  205. package/lib/store/list.js +1 -1
  206. package/lib/store/manager.js +1 -1
  207. package/lib/store/modal.js +1 -1
  208. package/lib/store/node.js +1 -1
  209. package/lib/store/pagination.js +1 -1
  210. package/lib/store/root.d.ts +1 -1
  211. package/lib/store/root.js +11 -4
  212. package/lib/store/service.js +38 -33
  213. package/lib/store/status.js +1 -1
  214. package/lib/store/table.d.ts +760 -21
  215. package/lib/store/table.js +155 -55
  216. package/lib/store/table2.js +11 -8
  217. package/lib/theme.d.ts +18 -31
  218. package/lib/theme.js +1 -1
  219. package/lib/utils/Animation.js +1 -1
  220. package/lib/utils/ColorScale.js +1 -1
  221. package/lib/utils/DataSchema.js +1 -1
  222. package/lib/utils/DataScope.js +1 -1
  223. package/lib/utils/RootClose.js +1 -1
  224. package/lib/utils/SimpleMap.js +1 -1
  225. package/lib/utils/api.d.ts +3 -3
  226. package/lib/utils/api.js +2 -2
  227. package/lib/utils/arraySlice.js +1 -1
  228. package/lib/utils/attachmentAdpator.js +1 -1
  229. package/lib/utils/autobind.js +1 -1
  230. package/lib/utils/columnsSplit.js +1 -1
  231. package/lib/utils/dataMapping.js +1 -1
  232. package/lib/utils/date.js +1 -1
  233. package/lib/utils/debug.d.ts +1 -0
  234. package/lib/utils/debug.js +24 -1
  235. package/lib/utils/decodeEntity.js +1 -1
  236. package/lib/utils/dom.js +1 -1
  237. package/lib/utils/errors.js +1 -1
  238. package/lib/utils/escapeHtml.js +1 -1
  239. package/lib/utils/filter-schema.js +1 -1
  240. package/lib/utils/filter.js +1 -1
  241. package/lib/utils/formatDuration.js +1 -1
  242. package/lib/utils/formula.js +1 -1
  243. package/lib/utils/getVariable.js +1 -1
  244. package/lib/utils/grammar.js +1 -1
  245. package/lib/utils/handleAction.js +1 -1
  246. package/lib/utils/helper.d.ts +13 -1
  247. package/lib/utils/helper.js +101 -4
  248. package/lib/utils/highlight.js +1 -1
  249. package/lib/utils/icon.js +1 -1
  250. package/lib/utils/image.js +1 -1
  251. package/lib/utils/isPureVariable.js +1 -1
  252. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  253. package/lib/utils/keyToPath.d.ts +1 -1
  254. package/lib/utils/keyToPath.js +2 -1
  255. package/lib/utils/makeSorter.js +1 -1
  256. package/lib/utils/math.js +1 -1
  257. package/lib/utils/memoryParse.js +1 -1
  258. package/lib/utils/normalizeLink.js +1 -1
  259. package/lib/utils/normalizeOptions.js +1 -1
  260. package/lib/utils/object.js +1 -1
  261. package/lib/utils/offset.js +1 -1
  262. package/lib/utils/offsetParent.js +1 -1
  263. package/lib/utils/optionValueCompare.js +1 -1
  264. package/lib/utils/position.js +1 -1
  265. package/lib/utils/prettyBytes.js +1 -1
  266. package/lib/utils/renderer-event.js +2 -2
  267. package/lib/utils/replaceText.js +1 -1
  268. package/lib/utils/resize-sensor.d.ts +3 -1
  269. package/lib/utils/resize-sensor.js +34 -22
  270. package/lib/utils/resolveCondition.js +1 -1
  271. package/lib/utils/resolveVariable.js +1 -1
  272. package/lib/utils/resolveVariableAndFilter.js +1 -1
  273. package/lib/utils/resolveVariableAndFilterForAsync.js +1 -1
  274. package/lib/utils/scrollPosition.js +1 -1
  275. package/lib/utils/string2regExp.js +1 -1
  276. package/lib/utils/stripNumber.js +1 -1
  277. package/lib/utils/style-helper.d.ts +22 -14
  278. package/lib/utils/style-helper.js +188 -120
  279. package/lib/utils/style.js +1 -1
  280. package/lib/utils/toNumber.js +1 -1
  281. package/lib/utils/tokenize.js +1 -1
  282. package/lib/utils/tpl-builtin.js +1 -1
  283. package/lib/utils/tpl-lodash.js +1 -1
  284. package/lib/utils/tpl.js +1 -1
  285. package/lib/utils/uncontrollable.js +1 -1
  286. package/lib/utils/validations.js +1 -1
  287. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -47,6 +47,7 @@ var Column = types
47
47
  rawIndex: 0,
48
48
  width: 0,
49
49
  minWidth: 0,
50
+ realWidth: 0,
50
51
  breakpoint: types.optional(types.frozen(), undefined),
51
52
  pristine: types.optional(types.frozen(), undefined),
52
53
  remark: types.optional(types.frozen(), undefined),
@@ -70,11 +71,14 @@ var Column = types
70
71
  var table = getParent(self, 2);
71
72
  table.persistSaveToggledColumns();
72
73
  },
73
- setWidth: function (value, minWidth) {
74
+ setMinWidth: function (value) {
75
+ self.minWidth = value;
76
+ },
77
+ setWidth: function (value) {
74
78
  self.width = value;
75
- if (typeof minWidth === 'number') {
76
- self.minWidth = minWidth;
77
- }
79
+ },
80
+ setRealWidth: function (value) {
81
+ self.realWidth = value;
78
82
  }
79
83
  }); });
80
84
  var Row = types
@@ -88,12 +92,15 @@ var Row = types
88
92
  rowSpans: types.frozen({}),
89
93
  index: types.number,
90
94
  newIndex: types.number,
95
+ nth: 0,
91
96
  path: '',
92
97
  expandable: false,
93
98
  checkdisable: false,
94
99
  isHover: false,
95
100
  children: types.optional(types.array(types.late(function () { return Row; })), []),
96
- depth: types.number // 当前children位于第几层,便于使用getParent获取最顶层TableStore
101
+ depth: types.number,
102
+ appeared: true,
103
+ lazyRender: false
97
104
  })
98
105
  .views(function (self) { return ({
99
106
  get checked() {
@@ -188,6 +195,11 @@ var Row = types
188
195
  return false;
189
196
  }
190
197
  return true;
198
+ },
199
+ get indentStyle() {
200
+ return {
201
+ paddingLeft: "calc(".concat(self.depth - 1, " * var(--Table-tree-indent))")
202
+ };
191
203
  }
192
204
  }); })
193
205
  .actions(function (self) { return ({
@@ -239,6 +251,9 @@ var Row = types
239
251
  index++;
240
252
  }
241
253
  }
254
+ },
255
+ markAppeared: function (value) {
256
+ value && (self.appeared = !!value);
242
257
  }
243
258
  }); });
244
259
  var TableStore = iRendererStore
@@ -251,6 +266,8 @@ var TableStore = iRendererStore
251
266
  primaryField: 'id',
252
267
  orderBy: '',
253
268
  orderDir: types.optional(types.union(types.literal('asc'), types.literal('desc'), types.literal('')), 'asc'),
269
+ loading: false,
270
+ canAccessSuperData: false,
254
271
  draggable: false,
255
272
  dragging: false,
256
273
  selectable: false,
@@ -269,7 +286,9 @@ var TableStore = iRendererStore
269
286
  keepItemSelectionOnPageChange: false,
270
287
  // 导出 Excel 按钮的 loading 状态
271
288
  exportExcelLoading: false,
272
- searchFormExpanded: false // 用来控制搜索框是否展开了,那个自动根据 searchable 生成的表单 autoGenerateFilter
289
+ searchFormExpanded: false,
290
+ lazyRenderAfter: 100,
291
+ tableLayout: 'auto'
273
292
  })
274
293
  .views(function (self) {
275
294
  function getColumnsExceptBuiltinTypes() {
@@ -305,7 +324,7 @@ var TableStore = iRendererStore
305
324
  : item.type === '__dragme'
306
325
  ? self.dragging
307
326
  : item.type === '__expandme'
308
- ? (getFootableColumns().length || self.isNested) && !self.dragging
327
+ ? getFootableColumns().length && !self.dragging
309
328
  : (item.toggled || !item.toggable) &&
310
329
  (!self.footable ||
311
330
  !item.breakpoint ||
@@ -505,8 +524,11 @@ var TableStore = iRendererStore
505
524
  get unSelectedRows() {
506
525
  return getUnSelectedRows();
507
526
  },
527
+ get falttenedRows() {
528
+ return flattenTree(self.rows);
529
+ },
508
530
  get checkableRows() {
509
- return flattenTree(self.rows).filter(function (item) { return item.checkable; });
531
+ return this.falttenedRows.filter(function (item) { return item.checkable; });
510
532
  },
511
533
  get expandableRows() {
512
534
  return self.rows.filter(function (item) { return item.expandable; });
@@ -559,7 +581,7 @@ var TableStore = iRendererStore
559
581
  return list;
560
582
  },
561
583
  get columnWidthReady() {
562
- return getFilteredColumns().every(function (column) { return column.width; });
584
+ return getFilteredColumns().every(function (column) { return column.realWidth; });
563
585
  },
564
586
  getStickyStyles: function (column, columns) {
565
587
  var stickyClassName = '';
@@ -577,20 +599,24 @@ var TableStore = iRendererStore
577
599
  })) {
578
600
  stickyClassName += ' is-sticky-last-left';
579
601
  }
580
- var left = 0;
602
+ var left = [];
581
603
  while (index >= 0) {
582
604
  var col = columns[index];
583
605
  if ((col && col.fixed === 'left') ||
584
606
  autoFixLeftColumns.includes(col.type)) {
585
- left += col.width;
607
+ left.push("var(--Table-column-".concat(col.index, "-width)"));
586
608
  }
587
609
  index--;
588
610
  }
589
- style.left = left;
611
+ style.left = left.length
612
+ ? left.length === 1
613
+ ? left[0]
614
+ : "calc(".concat(left.join(' + '), ")")
615
+ : 0;
590
616
  }
591
617
  else if (column.fixed === 'right') {
592
618
  stickyClassName = 'is-sticky is-sticky-right';
593
- var right = 0;
619
+ var right = [];
594
620
  var index = columns.indexOf(column) + 1;
595
621
  if (columns.slice(0, index - 1).every(function (col) { return col.fixed !== 'right'; })) {
596
622
  stickyClassName += ' is-sticky-first-right';
@@ -599,13 +625,28 @@ var TableStore = iRendererStore
599
625
  while (index < len) {
600
626
  var col = columns[index];
601
627
  if (col && col.fixed === 'right') {
602
- right += col.width;
628
+ right.push("var(--Table-column-".concat(col.index, "-width)"));
603
629
  }
604
630
  index++;
605
631
  }
606
- style.right = right;
632
+ style.right = right.length
633
+ ? right.length === 1
634
+ ? right[0]
635
+ : "calc(".concat(right.join(' + '), ")")
636
+ : 0;
607
637
  }
608
638
  return [style, stickyClassName];
639
+ },
640
+ get items() {
641
+ return self.rows.concat();
642
+ },
643
+ buildStyles: function (style) {
644
+ style = __assign({}, style);
645
+ getFilteredColumns().forEach(function (column) {
646
+ style["--Table-column-".concat(column.index, "-width")] =
647
+ column.realWidth + 'px';
648
+ });
649
+ return style;
609
650
  }
610
651
  };
611
652
  })
@@ -614,38 +655,54 @@ var TableStore = iRendererStore
614
655
  function setTable(ref) {
615
656
  tableRef = ref;
616
657
  }
658
+ function getTable() {
659
+ return tableRef;
660
+ }
617
661
  function update(config) {
618
- config.primaryField !== void 0 &&
662
+ var _a;
663
+ config.primaryField !== undefined &&
619
664
  (self.primaryField = config.primaryField);
620
- config.selectable !== void 0 && (self.selectable = config.selectable);
621
- config.columnsTogglable !== void 0 &&
665
+ config.selectable !== undefined && (self.selectable = config.selectable);
666
+ config.columnsTogglable !== undefined &&
622
667
  (self.columnsTogglable = config.columnsTogglable);
623
- config.draggable !== void 0 && (self.draggable = config.draggable);
624
- if (typeof config.orderBy === 'string') {
625
- setOrderByInfo(config.orderBy, config.orderDir === 'desc' ? 'desc' : 'asc');
668
+ config.draggable !== undefined && (self.draggable = config.draggable);
669
+ if (typeof config.orderBy === 'string' ||
670
+ typeof config.orderDir === 'string') {
671
+ setOrderByInfo((_a = config.orderBy) !== null && _a !== void 0 ? _a : self.orderBy, config.orderDir !== undefined
672
+ ? config.orderDir === 'desc'
673
+ ? 'desc'
674
+ : 'asc'
675
+ : self.orderDir);
626
676
  }
627
- config.multiple !== void 0 && (self.multiple = config.multiple);
628
- config.footable !== void 0 && (self.footable = config.footable);
629
- config.expandConfig !== void 0 &&
677
+ config.multiple !== undefined && (self.multiple = config.multiple);
678
+ config.footable !== undefined && (self.footable = config.footable);
679
+ config.expandConfig !== undefined &&
630
680
  (self.expandConfig = config.expandConfig);
631
- config.itemCheckableOn !== void 0 &&
681
+ config.itemCheckableOn !== undefined &&
632
682
  (self.itemCheckableOn = config.itemCheckableOn);
633
- config.itemDraggableOn !== void 0 &&
683
+ config.itemDraggableOn !== undefined &&
634
684
  (self.itemDraggableOn = config.itemDraggableOn);
635
- config.hideCheckToggler !== void 0 &&
685
+ config.hideCheckToggler !== undefined &&
636
686
  (self.hideCheckToggler = !!config.hideCheckToggler);
637
- config.combineNum !== void 0 &&
687
+ config.combineNum !== undefined &&
638
688
  (self.combineNum = parseInt(config.combineNum, 10) || 0);
639
- config.combineFromIndex !== void 0 &&
689
+ config.combineFromIndex !== undefined &&
640
690
  (self.combineFromIndex =
641
691
  parseInt(config.combineFromIndex, 10) || 0);
642
- config.maxKeepItemSelectionLength !== void 0 &&
692
+ config.maxKeepItemSelectionLength !== undefined &&
643
693
  (self.maxKeepItemSelectionLength = config.maxKeepItemSelectionLength);
644
- config.keepItemSelectionOnPageChange !== void 0 &&
694
+ config.keepItemSelectionOnPageChange !== undefined &&
645
695
  (self.keepItemSelectionOnPageChange =
646
696
  config.keepItemSelectionOnPageChange);
647
697
  config.exportExcelLoading !== undefined &&
648
698
  (self.exportExcelLoading = config.exportExcelLoading);
699
+ config.loading !== undefined && (self.loading = config.loading);
700
+ config.canAccessSuperData !== undefined &&
701
+ (self.canAccessSuperData = !!config.canAccessSuperData);
702
+ typeof config.lazyRenderAfter === 'number' &&
703
+ (self.lazyRenderAfter = config.lazyRenderAfter);
704
+ typeof config.tableLayout === 'string' &&
705
+ (self.tableLayout = config.tableLayout);
649
706
  if (config.columns && Array.isArray(config.columns)) {
650
707
  var columns = config.columns
651
708
  .filter(function (column) { return column; })
@@ -708,22 +765,41 @@ var TableStore = iRendererStore
708
765
  self.columns.replace(columns);
709
766
  }
710
767
  }
711
- function syncTableWidth() {
768
+ function initTableWidth() {
712
769
  var table = tableRef;
713
770
  if (!table) {
714
771
  return;
715
772
  }
716
773
  var tableWidth = table.parentElement.offsetWidth;
717
774
  var thead = table.querySelector(':scope>thead');
718
- var tbody = table.querySelector(':scope>tbody');
775
+ var tbody = null;
776
+ var htmls = [];
777
+ var isFixed = self.tableLayout === 'fixed';
778
+ var someSettedWidth = self.columns.some(function (column) { return column.pristine.width; });
779
+ var minWidths = {};
780
+ // fixed 模式需要参考 auto 获得列最小宽度
781
+ if (isFixed) {
782
+ tbody = table.querySelector(':scope>tbody');
783
+ htmls.push("<table style=\"table-layout:auto!important;width:0!important;min-width:0!important;\" class=\"".concat(table.className, "\">").concat(thead.outerHTML, "</table>"));
784
+ }
785
+ if (someSettedWidth || isFixed) {
786
+ htmls.push("<table style=\"table-layout:auto!important;min-width:".concat(tableWidth, "px!important;width:").concat(tableWidth, "px!important;\" class=\"").concat(table.className.replace('is-layout-fixed', ''), "\">").concat(thead.outerHTML).concat(tbody ? "<tbody>".concat(tbody.innerHTML, "</tbody>") : '', "</table>"));
787
+ }
788
+ if (!htmls.length) {
789
+ return;
790
+ }
719
791
  var div = document.createElement('div');
720
792
  div.className = 'amis-scope'; // jssdk 里面 css 会在这一层
721
793
  div.style.cssText += "visibility: hidden!important;";
722
- div.innerHTML =
723
- "<table style=\"table-layout:auto!important;width:0!important;min-width:0!important;\" class=\"".concat(table.className, "\">").concat(thead.outerHTML, "</table>") +
724
- "<table style=\"table-layout:auto!important;min-width:".concat(tableWidth, "px!important;width:").concat(tableWidth, "px!important;\" class=\"").concat(table.className.replace('is-layout-fixed', ''), "\">").concat(thead.outerHTML).concat(tbody ? "<tbody>".concat(tbody.innerHTML, "</tbody>") : '', "</table>");
725
- var ths1 = [].slice.call(div.querySelectorAll(':scope>table:first-child>thead>tr>th[data-index]'));
726
- var ths2 = [].slice.call(div.querySelectorAll(':scope>table:last-child>thead>tr>th[data-index]'));
794
+ div.innerHTML = htmls.join('');
795
+ var ths1 = [];
796
+ var ths2 = [];
797
+ if (isFixed) {
798
+ ths1 = [].slice.call(div.querySelectorAll(':scope>table:first-child>thead>tr>th[data-index]'));
799
+ }
800
+ if (someSettedWidth || isFixed) {
801
+ ths2 = [].slice.call(div.querySelectorAll(':scope>table:last-child>thead>tr>th[data-index]'));
802
+ }
727
803
  ths1.forEach(function (th) {
728
804
  th.style.cssText += 'width: 0';
729
805
  });
@@ -734,24 +810,38 @@ var TableStore = iRendererStore
734
810
  ? "width: ".concat(column.pristine.width, "px;")
735
811
  : column.pristine.width
736
812
  ? "width: ".concat(column.pristine.width, ";")
737
- : '');
813
+ : '' // todo 可能需要让修改过列宽的保持相应宽度,目前这样相当于重置了
814
+ );
738
815
  });
739
816
  document.body.appendChild(div);
740
- var minWidths = {};
741
817
  ths1.forEach(function (th) {
742
- minWidths[th.getAttribute('data-index')] = th.clientWidth;
818
+ var index = parseInt(th.getAttribute('data-index'), 10);
819
+ minWidths[index] = th.clientWidth;
820
+ var column = self.columns[index];
821
+ column.setMinWidth(minWidths[index]);
743
822
  });
744
823
  ths2.forEach(function (col) {
745
824
  var index = parseInt(col.getAttribute('data-index'), 10);
746
825
  var column = self.columns[index];
747
- column.setWidth(Math.max(typeof column.pristine.width === 'number'
748
- ? column.pristine.width
749
- : col.clientWidth - 2, minWidths[index]), minWidths[index]);
826
+ if (column.pristine.width || isFixed) {
827
+ column.setWidth(Math.max(typeof column.pristine.width === 'number'
828
+ ? column.pristine.width
829
+ : col.clientWidth, minWidths[index] || 0));
830
+ }
750
831
  });
751
832
  document.body.removeChild(div);
752
833
  }
753
- function invalidTableColumnWidth() {
754
- self.columns.forEach(function (column) { return column.setWidth(0); });
834
+ function syncTableWidth() {
835
+ var table = tableRef;
836
+ if (!table) {
837
+ return;
838
+ }
839
+ var cols = [].slice.call(table.querySelectorAll(':scope>colgroup>col[data-index]'));
840
+ cols.forEach(function (col) {
841
+ var index = parseInt(col.getAttribute('data-index'), 10);
842
+ var column = self.columns[index];
843
+ column.setRealWidth(col.clientWidth);
844
+ });
755
845
  }
756
846
  function combineCell(arr, keys) {
757
847
  if (!keys.length || !arr.length) {
@@ -816,7 +906,7 @@ var TableStore = iRendererStore
816
906
  }
817
907
  return combineCell(arr, keys);
818
908
  }
819
- function initChildren(children, depth, pindex, parentId, path) {
909
+ function initChildren(children, depth, pindex, parentId, path, nThRef) {
820
910
  if (path === void 0) { path = ''; }
821
911
  depth += 1;
822
912
  return children.map(function (item, index) {
@@ -835,12 +925,13 @@ var TableStore = iRendererStore
835
925
  path: "".concat(path).concat(index),
836
926
  depth: depth,
837
927
  index: index,
928
+ nth: nThRef.index++,
838
929
  newIndex: index,
839
930
  pristine: item,
840
931
  data: item,
841
932
  rowSpans: {},
842
933
  children: item && Array.isArray(item.children)
843
- ? initChildren(item.children, depth, index, id, "".concat(path).concat(index, "."))
934
+ ? initChildren(item.children, depth, index, id, "".concat(path).concat(index, "."), nThRef)
844
935
  : [],
845
936
  expandable: !!((item && Array.isArray(item.children) && item.children.length) ||
846
937
  (self.footable && self.footableColumns.length))
@@ -852,6 +943,7 @@ var TableStore = iRendererStore
852
943
  // self.expandedRows.clear();
853
944
  /* 避免输入内容为非数组挂掉 */
854
945
  rows = !Array.isArray(rows) ? [] : rows;
946
+ var nThRef = { index: 0 };
855
947
  var arr = rows.map(function (item, index) {
856
948
  var _a;
857
949
  if (!isObject(item)) {
@@ -866,13 +958,14 @@ var TableStore = iRendererStore
866
958
  key: String("".concat(index, "-1-").concat(index)),
867
959
  depth: 1,
868
960
  index: index,
961
+ nth: nThRef.index++,
869
962
  newIndex: index,
870
963
  pristine: item,
871
964
  path: "".concat(index),
872
965
  data: item,
873
966
  rowSpans: {},
874
967
  children: item && Array.isArray(item.children)
875
- ? initChildren(item.children, 1, index, id, "".concat(index, "."))
968
+ ? initChildren(item.children, 1, index, id, "".concat(index, "."), nThRef)
876
969
  : [],
877
970
  expandable: !!((item && Array.isArray(item.children) && item.children.length) ||
878
971
  (self.footable && self.footableColumns.length))
@@ -883,6 +976,14 @@ var TableStore = iRendererStore
883
976
  }
884
977
  replaceRow(arr, reUseRow);
885
978
  self.isNested = self.rows.some(function (item) { return item.children.length; });
979
+ // 前 20 个直接渲染,后面的按需渲染
980
+ if (self.lazyRenderAfter &&
981
+ self.falttenedRows.length > self.lazyRenderAfter) {
982
+ for (var i = self.lazyRenderAfter, len = self.falttenedRows.length; i < len; i++) {
983
+ self.falttenedRows[i].appeared = false;
984
+ self.falttenedRows[i].lazyRender = true;
985
+ }
986
+ }
886
987
  var expand = self.footable && self.footable.expand;
887
988
  if (expand === 'first' ||
888
989
  (self.expandConfig && self.expandConfig.expand === 'first')) {
@@ -1148,10 +1249,8 @@ var TableStore = iRendererStore
1148
1249
  function persistSaveToggledColumns() {
1149
1250
  var key = getPersistDataKey(self.columnsData);
1150
1251
  localStorage.setItem(key, JSON.stringify({
1151
- // 可显示列index, 原始配置中存在 toggled: false 的列不持久化
1152
- toggledColumnIndex: self.activeToggaleColumns
1153
- .filter(function (item) { var _a; return !(((_a = item.pristine) === null || _a === void 0 ? void 0 : _a.toggled) === false); })
1154
- .map(function (item) { return item.index; }),
1252
+ // 可显示列index
1253
+ toggledColumnIndex: self.activeToggaleColumns.map(function (item) { return item.index; }),
1155
1254
  // 列排序,name,label可能不存在
1156
1255
  columnOrder: self.columnsData.map(function (item) { return item.name || item.label || item.rawIndex; }),
1157
1256
  // 已激活的可查询列
@@ -1205,10 +1304,11 @@ var TableStore = iRendererStore
1205
1304
  }
1206
1305
  return {
1207
1306
  setTable: setTable,
1307
+ getTable: getTable,
1208
1308
  update: update,
1209
1309
  updateColumns: updateColumns,
1310
+ initTableWidth: initTableWidth,
1210
1311
  syncTableWidth: syncTableWidth,
1211
- invalidTableColumnWidth: invalidTableColumnWidth,
1212
1312
  initRows: initRows,
1213
1313
  updateSelected: updateSelected,
1214
1314
  toggleAll: toggleAll,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -507,12 +507,13 @@ var TableStore2 = ServiceStore.named('TableStore2')
507
507
  }
508
508
  if (!json.ok) {
509
509
  self.updateMessage((_d = (_c = (_b = (_a = api === null || api === void 0 ? void 0 : api.messages) === null || _a === void 0 ? void 0 : _a.failed) !== null && _b !== void 0 ? _b : json.msg) !== null && _c !== void 0 ? _c : options.errorMessage) !== null && _d !== void 0 ? _d : self.__('saveFailed'), true);
510
- getEnv(self).notify('error', self.msg, json.msgTimeout !== undefined
511
- ? {
512
- closeButton: true,
513
- timeout: json.msgTimeout
514
- }
515
- : undefined);
510
+ !(api === null || api === void 0 ? void 0 : api.silent) &&
511
+ getEnv(self).notify('error', self.msg, json.msgTimeout !== undefined
512
+ ? {
513
+ closeButton: true,
514
+ timeout: json.msgTimeout
515
+ }
516
+ : undefined);
516
517
  throw new ServerError(self.msg);
517
518
  }
518
519
  else {
@@ -532,7 +533,9 @@ var TableStore2 = ServiceStore.named('TableStore2')
532
533
  if (!isAlive(self) || self.disposed) {
533
534
  return [2 /*return*/];
534
535
  }
535
- e_1.type !== 'ServerError' && getEnv(self).notify('error', e_1.message);
536
+ !(api === null || api === void 0 ? void 0 : api.silent) &&
537
+ e_1.type !== 'ServerError' &&
538
+ getEnv(self).notify('error', e_1.message);
536
539
  throw e_1;
537
540
  case 3: return [2 /*return*/];
538
541
  }
package/esm/theme.d.ts CHANGED
@@ -1,11 +1,6 @@
1
1
  import React from 'react';
2
2
  import hoistNonReactStatic from 'hoist-non-react-statics';
3
- export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean;
4
- interface ClassDictionary {
5
- [id: string]: any;
6
- }
7
- interface ClassArray extends Array<ClassValue> {
8
- }
3
+ export type ClassValue = ClassValue[] | Record<string, any> | string | number | boolean | null | undefined;
9
4
  export type ClassNamesFn = (...classes: ClassValue[]) => string;
10
5
  interface ThemeConfig {
11
6
  classPrefix?: string;
@@ -15,70 +10,62 @@ interface ThemeConfig {
15
10
  components?: {
16
11
  [propName: string]: any;
17
12
  };
18
- [propsName: string]: any;
13
+ [propName: string]: any;
19
14
  }
20
15
  export declare function theme(name: string, config: Partial<ThemeConfig>): void;
21
16
  export declare function makeClassnames(ns?: string): (...classes: ClassValue[]) => string;
22
- export type ThemeInstance = ThemeConfig & {
17
+ export interface ThemeInstance extends ThemeConfig {
23
18
  getRendererConfig: (name?: string) => any;
24
19
  getComponentConfig: (name?: string) => any;
25
20
  classnames: ClassNamesFn;
26
- };
21
+ }
27
22
  export declare function hasTheme(theme: string): boolean;
28
23
  export declare function setDefaultTheme(theme: string): void;
29
24
  export declare function classnames(...classes: ClassValue[]): any;
30
25
  export declare function getClassPrefix(): string | undefined;
31
26
  export declare function getTheme(theme: string): ThemeInstance;
32
27
  export interface ThemeProps {
33
- className?: string;
34
- style?: {
35
- [propName: string]: any;
36
- };
37
- classPrefix: string;
38
28
  classnames: ClassNamesFn;
39
- theme?: string;
40
- mobileUI?: boolean;
41
- }
42
- export interface ThemeOutterProps {
43
- theme?: string;
29
+ classPrefix: string;
44
30
  className?: string;
31
+ theme?: string;
45
32
  mobileUI?: boolean;
46
33
  style?: {
47
34
  [propName: string]: any;
48
35
  };
49
- classPrefix?: string;
50
- classnames?: ClassNamesFn;
36
+ }
37
+ export interface ThemeOuterProps extends Partial<ThemeProps> {
51
38
  }
52
39
  export declare let defaultTheme: string;
53
40
  export declare const ThemeContext: React.Context<string>;
54
41
  export declare function themeable<T extends React.ComponentType<React.ComponentProps<T> & ThemeProps> & {
55
42
  themeKey?: string;
56
43
  }>(ComposedComponent: T): {
57
- new (props: JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps): {
44
+ new (props: JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps): {
58
45
  ref: any;
59
46
  childRef(ref: any): void;
60
47
  getWrappedInstance(): any;
61
48
  render(): React.JSX.Element;
62
49
  context: unknown;
63
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
50
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
64
51
  forceUpdate(callback?: (() => void) | undefined): void;
65
- readonly props: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>;
52
+ readonly props: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>;
66
53
  state: Readonly<{}>;
67
54
  refs: {
68
55
  [key: string]: React.ReactInstance;
69
56
  };
70
57
  componentDidMount?(): void;
71
- shouldComponentUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
58
+ shouldComponentUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
72
59
  componentWillUnmount?(): void;
73
60
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
74
- getSnapshotBeforeUpdate?(prevProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, prevState: Readonly<{}>): any;
75
- componentDidUpdate?(prevProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
61
+ getSnapshotBeforeUpdate?(prevProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, prevState: Readonly<{}>): any;
62
+ componentDidUpdate?(prevProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
76
63
  componentWillMount?(): void;
77
64
  UNSAFE_componentWillMount?(): void;
78
- componentWillReceiveProps?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, nextContext: any): void;
79
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, nextContext: any): void;
80
- componentWillUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
81
- UNSAFE_componentWillUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
65
+ componentWillReceiveProps?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextContext: any): void;
66
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextContext: any): void;
67
+ componentWillUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
68
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
82
69
  };
83
70
  displayName: string;
84
71
  contextType: React.Context<string>;
package/esm/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Api, ApiObject, EventTrack, fetcherResult, Payload } from '../types';
2
- import { fetcherConfig } from '../factory';
2
+ import { FetcherConfig } from '../factory';
3
3
  interface ApiCacheConfig extends ApiObject {
4
4
  cachedPromise: Promise<any>;
5
5
  requestTime: number;
@@ -14,14 +14,14 @@ export declare function str2function(contents: string, ...args: Array<string>):
14
14
  export declare function str2AsyncFunction(contents: string, ...args: Array<string>): Function | null;
15
15
  export declare function callStrFunction(this: any, fn: string | Function, argNames: Array<string>, ...args: Array<any>): any;
16
16
  export declare function responseAdaptor(ret: fetcherResult, api: ApiObject): Payload;
17
- export declare function wrapFetcher(fn: (config: fetcherConfig) => Promise<fetcherResult>, tracker?: (eventTrack: EventTrack, data: any) => void): any;
17
+ export declare function wrapFetcher(fn: (config: FetcherConfig) => Promise<fetcherResult>, tracker?: (eventTrack: EventTrack, data: any) => void): any;
18
18
  export declare function wrapAdaptor(promise: Promise<fetcherResult>, api: ApiObject, context: any): Promise<Payload>;
19
19
  /**
20
20
  * 请求远程 js 文件然后 new Function 执行,用于 schemaApi 支持 JavaScript
21
21
  * @param api
22
22
  * @returns
23
23
  */
24
- export declare function jsFetcher(fetcher: (config: fetcherConfig) => Promise<fetcherResult>, api: ApiObject): Promise<fetcherResult>;
24
+ export declare function jsFetcher(fetcher: (config: FetcherConfig) => Promise<fetcherResult>, api: ApiObject): Promise<fetcherResult>;
25
25
  export declare function jsonpFetcher(api: ApiObject): Promise<fetcherResult>;
26
26
  export declare function isApiOutdatedWithData(prevApi: Api | undefined, nextApi: Api | undefined, prevData: any, nextData: any): nextApi is Api;
27
27
  export declare function isApiOutdated(prevApi: Api | undefined, nextApi: Api | undefined, prevData: any, nextData: any): nextApi is Api;