amis-core 6.11.0-beta.0 → 6.11.0-beta.2

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 (332) hide show
  1. package/esm/Root.d.ts +3 -0
  2. package/esm/Root.js +1 -1
  3. package/esm/RootRenderer.js +14 -8
  4. package/esm/SchemaRenderer.d.ts +2 -13
  5. package/esm/SchemaRenderer.js +36 -72
  6. package/esm/Scoped.js +1 -1
  7. package/esm/StatusScoped.js +1 -1
  8. package/esm/StyleManager.js +1 -1
  9. package/esm/WithRootStore.d.ts +1 -1
  10. package/esm/WithRootStore.js +1 -1
  11. package/esm/WithStore.js +1 -1
  12. package/esm/actions/Action.js +1 -1
  13. package/esm/actions/AjaxAction.js +1 -1
  14. package/esm/actions/BreakAction.js +1 -1
  15. package/esm/actions/BroadcastAction.js +1 -1
  16. package/esm/actions/CmptAction.js +6 -2
  17. package/esm/actions/ContinueAction.js +1 -1
  18. package/esm/actions/CopyAction.js +1 -1
  19. package/esm/actions/CustomAction.js +1 -1
  20. package/esm/actions/DialogAction.js +1 -1
  21. package/esm/actions/DrawerAction.js +1 -1
  22. package/esm/actions/EmailAction.js +1 -1
  23. package/esm/actions/EventAction.js +1 -1
  24. package/esm/actions/LinkAction.js +1 -1
  25. package/esm/actions/LoopAction.js +1 -1
  26. package/esm/actions/PageAction.js +1 -1
  27. package/esm/actions/ParallelAction.js +1 -1
  28. package/esm/actions/PrintAction.js +1 -1
  29. package/esm/actions/StatusAction.js +1 -1
  30. package/esm/actions/SwitchAction.js +1 -1
  31. package/esm/actions/ToastAction.js +1 -1
  32. package/esm/actions/WaitAction.js +1 -1
  33. package/esm/components/Animations.d.ts +8 -0
  34. package/esm/components/Animations.js +158 -0
  35. package/esm/components/CustomStyle.js +1 -1
  36. package/esm/components/ErrorBoundary.js +1 -1
  37. package/esm/components/LazyComponent.d.ts +1 -1
  38. package/esm/components/LazyComponent.js +1 -1
  39. package/esm/components/Overlay.js +1 -1
  40. package/esm/components/PopOver.d.ts +1 -1
  41. package/esm/components/PopOver.js +1 -1
  42. package/esm/env.d.ts +1 -1
  43. package/esm/env.js +1 -1
  44. package/esm/envOverwrite.js +1 -1
  45. package/esm/factory.d.ts +1 -0
  46. package/esm/factory.js +1 -1
  47. package/esm/globalVar.d.ts +173 -0
  48. package/esm/globalVar.js +122 -0
  49. package/esm/globalVarClientHandler.d.ts +1 -0
  50. package/esm/globalVarClientHandler.js +65 -0
  51. package/esm/globalVarDefaultValueHandler.d.ts +1 -0
  52. package/esm/globalVarDefaultValueHandler.js +28 -0
  53. package/esm/index.d.ts +3 -0
  54. package/esm/index.js +8 -5
  55. package/esm/locale.d.ts +1 -1
  56. package/esm/locale.js +1 -1
  57. package/esm/polyfills.js +1 -1
  58. package/esm/renderers/Form.d.ts +3 -1
  59. package/esm/renderers/Form.js +39 -24
  60. package/esm/renderers/Item.d.ts +11 -17
  61. package/esm/renderers/Item.js +17 -2
  62. package/esm/renderers/Options.js +1 -1
  63. package/esm/renderers/Placeholder.js +1 -1
  64. package/esm/renderers/builtin.js +1 -1
  65. package/esm/renderers/register.js +1 -1
  66. package/esm/renderers/wrapControl.d.ts +1 -1
  67. package/esm/renderers/wrapControl.js +1 -1
  68. package/esm/store/app.js +1 -1
  69. package/esm/store/combo.js +1 -1
  70. package/esm/store/crud.d.ts +8 -0
  71. package/esm/store/crud.js +24 -17
  72. package/esm/store/form.js +14 -5
  73. package/esm/store/formItem.js +1 -1
  74. package/esm/store/iRenderer.js +1 -1
  75. package/esm/store/index.js +1 -1
  76. package/esm/store/list.d.ts +14 -1
  77. package/esm/store/list.js +45 -17
  78. package/esm/store/manager.js +1 -1
  79. package/esm/store/modal.js +1 -1
  80. package/esm/store/node.js +1 -1
  81. package/esm/store/pagination.js +1 -1
  82. package/esm/store/root.d.ts +14 -0
  83. package/esm/store/root.js +483 -12
  84. package/esm/store/service.js +1 -1
  85. package/esm/store/status.js +1 -1
  86. package/esm/store/table.d.ts +16 -2
  87. package/esm/store/table.js +83 -26
  88. package/esm/store/table2.js +1 -1
  89. package/esm/theme.d.ts +1 -1
  90. package/esm/theme.js +1 -1
  91. package/esm/types.d.ts +3 -2
  92. package/esm/utils/Animation.js +1 -1
  93. package/esm/utils/ColorScale.js +1 -1
  94. package/esm/utils/DataSchema.js +1 -1
  95. package/esm/utils/DataScope.js +1 -1
  96. package/esm/utils/RootClose.js +1 -1
  97. package/esm/utils/SimpleMap.js +1 -1
  98. package/esm/utils/animations.d.ts +4 -0
  99. package/esm/utils/animations.js +1 -1
  100. package/esm/utils/api.d.ts +1 -0
  101. package/esm/utils/api.js +18 -6
  102. package/esm/utils/arraySlice.js +1 -1
  103. package/esm/utils/attachmentAdpator.js +1 -1
  104. package/esm/utils/autobind.js +1 -1
  105. package/esm/utils/browser.js +1 -1
  106. package/esm/utils/columnsSplit.js +1 -1
  107. package/esm/utils/concatData.js +1 -1
  108. package/esm/utils/dataMapping.js +1 -1
  109. package/esm/utils/date.js +1 -1
  110. package/esm/utils/debug.js +1 -1
  111. package/esm/utils/decodeEntity.js +1 -1
  112. package/esm/utils/dom.js +1 -1
  113. package/esm/utils/errors.js +1 -1
  114. package/esm/utils/escapeHtml.js +1 -1
  115. package/esm/utils/filter-schema.js +1 -1
  116. package/esm/utils/filter.js +1 -1
  117. package/esm/utils/formatDuration.js +1 -1
  118. package/esm/utils/formula.js +1 -1
  119. package/esm/utils/getVariable.js +1 -1
  120. package/esm/utils/grammar.js +1 -1
  121. package/esm/utils/handleAction.js +1 -1
  122. package/esm/utils/helper.d.ts +5 -0
  123. package/esm/utils/helper.js +6 -2
  124. package/esm/utils/highlight.js +1 -1
  125. package/esm/utils/icon.js +1 -1
  126. package/esm/utils/image.js +1 -1
  127. package/esm/utils/isPureVariable.js +1 -1
  128. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  129. package/esm/utils/keyToPath.js +1 -1
  130. package/esm/utils/labelToString.js +1 -1
  131. package/esm/utils/loopTooMuch.js +1 -1
  132. package/esm/utils/makeSorter.js +1 -1
  133. package/esm/utils/math.js +1 -1
  134. package/esm/utils/memoryParse.js +1 -1
  135. package/esm/utils/normalizeLink.js +1 -1
  136. package/esm/utils/normalizeOptions.js +1 -1
  137. package/esm/utils/object.js +1 -1
  138. package/esm/utils/offset.js +1 -1
  139. package/esm/utils/offsetParent.js +1 -1
  140. package/esm/utils/optionValueCompare.js +1 -1
  141. package/esm/utils/position.js +1 -1
  142. package/esm/utils/prettyBytes.js +1 -1
  143. package/esm/utils/printElement.js +1 -1
  144. package/esm/utils/renderer-event.js +1 -1
  145. package/esm/utils/replaceText.js +1 -1
  146. package/esm/utils/resize-sensor.js +1 -1
  147. package/esm/utils/resolveCondition.js +1 -1
  148. package/esm/utils/resolveVariable.js +1 -1
  149. package/esm/utils/resolveVariableAndFilter.js +1 -1
  150. package/esm/utils/resolveVariableAndFilterForAsync.js +1 -1
  151. package/esm/utils/scrollPosition.js +1 -1
  152. package/esm/utils/string2regExp.js +1 -1
  153. package/esm/utils/stripNumber.js +1 -1
  154. package/esm/utils/style-helper.js +1 -1
  155. package/esm/utils/style.js +1 -1
  156. package/esm/utils/toNumber.js +1 -1
  157. package/esm/utils/tokenize.js +1 -1
  158. package/esm/utils/tpl-builtin.js +1 -1
  159. package/esm/utils/tpl-lodash.js +1 -1
  160. package/esm/utils/tpl.js +1 -1
  161. package/esm/utils/uncontrollable.js +1 -1
  162. package/esm/utils/validateId.js +1 -1
  163. package/esm/utils/validations.js +1 -1
  164. package/esm/utils/visitedCache.js +1 -1
  165. package/lib/Root.d.ts +3 -0
  166. package/lib/Root.js +1 -1
  167. package/lib/RootRenderer.d.ts +1 -1
  168. package/lib/RootRenderer.js +13 -7
  169. package/lib/SchemaRenderer.d.ts +2 -13
  170. package/lib/SchemaRenderer.js +35 -71
  171. package/lib/Scoped.js +1 -1
  172. package/lib/StatusScoped.js +1 -1
  173. package/lib/StyleManager.js +1 -1
  174. package/lib/WithRootStore.d.ts +1 -1
  175. package/lib/WithRootStore.js +1 -1
  176. package/lib/WithStore.js +1 -1
  177. package/lib/actions/Action.js +1 -1
  178. package/lib/actions/AjaxAction.js +1 -1
  179. package/lib/actions/BreakAction.js +1 -1
  180. package/lib/actions/BroadcastAction.js +1 -1
  181. package/lib/actions/CmptAction.js +6 -2
  182. package/lib/actions/ContinueAction.js +1 -1
  183. package/lib/actions/CopyAction.js +1 -1
  184. package/lib/actions/CustomAction.js +1 -1
  185. package/lib/actions/DialogAction.js +1 -1
  186. package/lib/actions/DrawerAction.js +1 -1
  187. package/lib/actions/EmailAction.js +1 -1
  188. package/lib/actions/EventAction.js +1 -1
  189. package/lib/actions/LinkAction.js +1 -1
  190. package/lib/actions/LoopAction.js +1 -1
  191. package/lib/actions/PageAction.js +1 -1
  192. package/lib/actions/ParallelAction.js +1 -1
  193. package/lib/actions/PrintAction.js +1 -1
  194. package/lib/actions/StatusAction.js +1 -1
  195. package/lib/actions/SwitchAction.js +1 -1
  196. package/lib/actions/ToastAction.js +1 -1
  197. package/lib/actions/WaitAction.js +1 -1
  198. package/lib/components/Animations.d.ts +8 -0
  199. package/lib/components/Animations.js +172 -0
  200. package/lib/components/CustomStyle.js +1 -1
  201. package/lib/components/ErrorBoundary.js +1 -1
  202. package/lib/components/LazyComponent.d.ts +1 -1
  203. package/lib/components/LazyComponent.js +1 -1
  204. package/lib/components/Overlay.js +1 -1
  205. package/lib/components/PopOver.d.ts +1 -1
  206. package/lib/components/PopOver.js +1 -1
  207. package/lib/env.d.ts +1 -1
  208. package/lib/env.js +1 -1
  209. package/lib/envOverwrite.js +1 -1
  210. package/lib/factory.d.ts +1 -0
  211. package/lib/factory.js +1 -1
  212. package/lib/globalVar.d.ts +173 -0
  213. package/lib/globalVar.js +130 -0
  214. package/lib/globalVarClientHandler.d.ts +1 -0
  215. package/lib/globalVarClientHandler.js +67 -0
  216. package/lib/globalVarDefaultValueHandler.d.ts +1 -0
  217. package/lib/globalVarDefaultValueHandler.js +30 -0
  218. package/lib/index.d.ts +3 -0
  219. package/lib/index.js +13 -4
  220. package/lib/locale.d.ts +1 -1
  221. package/lib/locale.js +1 -1
  222. package/lib/polyfills.js +1 -1
  223. package/lib/renderers/Form.d.ts +3 -1
  224. package/lib/renderers/Form.js +37 -21
  225. package/lib/renderers/Item.d.ts +11 -17
  226. package/lib/renderers/Item.js +17 -2
  227. package/lib/renderers/Options.js +1 -1
  228. package/lib/renderers/Placeholder.js +1 -1
  229. package/lib/renderers/builtin.js +1 -1
  230. package/lib/renderers/register.js +1 -1
  231. package/lib/renderers/wrapControl.d.ts +1 -1
  232. package/lib/renderers/wrapControl.js +1 -1
  233. package/lib/store/app.js +1 -1
  234. package/lib/store/combo.d.ts +24 -25
  235. package/lib/store/combo.js +1 -1
  236. package/lib/store/crud.d.ts +8 -0
  237. package/lib/store/crud.js +23 -16
  238. package/lib/store/form.d.ts +10 -11
  239. package/lib/store/form.js +14 -5
  240. package/lib/store/formItem.js +1 -1
  241. package/lib/store/iRenderer.js +1 -1
  242. package/lib/store/index.js +1 -1
  243. package/lib/store/list.d.ts +14 -1
  244. package/lib/store/list.js +44 -16
  245. package/lib/store/manager.js +1 -1
  246. package/lib/store/modal.js +1 -1
  247. package/lib/store/node.js +1 -1
  248. package/lib/store/pagination.js +1 -1
  249. package/lib/store/root.d.ts +13 -0
  250. package/lib/store/root.js +487 -11
  251. package/lib/store/service.js +1 -1
  252. package/lib/store/status.js +1 -1
  253. package/lib/store/table.d.ts +36 -23
  254. package/lib/store/table.js +82 -25
  255. package/lib/store/table2.js +1 -1
  256. package/lib/theme.d.ts +1 -1
  257. package/lib/theme.js +1 -1
  258. package/lib/types.d.ts +3 -2
  259. package/lib/utils/Animation.js +1 -1
  260. package/lib/utils/ColorScale.js +1 -1
  261. package/lib/utils/DataSchema.js +1 -1
  262. package/lib/utils/DataScope.js +1 -1
  263. package/lib/utils/RootClose.js +1 -1
  264. package/lib/utils/SimpleMap.js +1 -1
  265. package/lib/utils/animations.d.ts +4 -0
  266. package/lib/utils/animations.js +1 -1
  267. package/lib/utils/api.d.ts +1 -0
  268. package/lib/utils/api.js +18 -5
  269. package/lib/utils/arraySlice.js +1 -1
  270. package/lib/utils/attachmentAdpator.js +1 -1
  271. package/lib/utils/autobind.js +1 -1
  272. package/lib/utils/browser.js +1 -1
  273. package/lib/utils/columnsSplit.js +1 -1
  274. package/lib/utils/concatData.js +1 -1
  275. package/lib/utils/dataMapping.js +1 -1
  276. package/lib/utils/date.js +1 -1
  277. package/lib/utils/debug.js +1 -1
  278. package/lib/utils/decodeEntity.js +1 -1
  279. package/lib/utils/dom.js +1 -1
  280. package/lib/utils/errors.js +1 -1
  281. package/lib/utils/escapeHtml.js +1 -1
  282. package/lib/utils/filter-schema.js +1 -1
  283. package/lib/utils/filter.js +1 -1
  284. package/lib/utils/formatDuration.js +1 -1
  285. package/lib/utils/formula.js +1 -1
  286. package/lib/utils/getVariable.js +1 -1
  287. package/lib/utils/grammar.js +1 -1
  288. package/lib/utils/handleAction.js +1 -1
  289. package/lib/utils/helper.d.ts +5 -0
  290. package/lib/utils/helper.js +6 -2
  291. package/lib/utils/highlight.js +1 -1
  292. package/lib/utils/icon.js +1 -1
  293. package/lib/utils/image.js +1 -1
  294. package/lib/utils/isPureVariable.js +1 -1
  295. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  296. package/lib/utils/keyToPath.js +1 -1
  297. package/lib/utils/labelToString.js +1 -1
  298. package/lib/utils/loopTooMuch.js +1 -1
  299. package/lib/utils/makeSorter.js +1 -1
  300. package/lib/utils/math.js +1 -1
  301. package/lib/utils/memoryParse.js +1 -1
  302. package/lib/utils/normalizeLink.js +1 -1
  303. package/lib/utils/normalizeOptions.js +1 -1
  304. package/lib/utils/object.js +1 -1
  305. package/lib/utils/offset.js +1 -1
  306. package/lib/utils/offsetParent.js +1 -1
  307. package/lib/utils/optionValueCompare.js +1 -1
  308. package/lib/utils/position.js +1 -1
  309. package/lib/utils/prettyBytes.js +1 -1
  310. package/lib/utils/printElement.js +1 -1
  311. package/lib/utils/renderer-event.js +1 -1
  312. package/lib/utils/replaceText.js +1 -1
  313. package/lib/utils/resize-sensor.js +1 -1
  314. package/lib/utils/resolveCondition.js +1 -1
  315. package/lib/utils/resolveVariable.js +1 -1
  316. package/lib/utils/resolveVariableAndFilter.js +1 -1
  317. package/lib/utils/resolveVariableAndFilterForAsync.js +1 -1
  318. package/lib/utils/scrollPosition.js +1 -1
  319. package/lib/utils/string2regExp.js +1 -1
  320. package/lib/utils/stripNumber.js +1 -1
  321. package/lib/utils/style-helper.js +1 -1
  322. package/lib/utils/style.js +1 -1
  323. package/lib/utils/toNumber.js +1 -1
  324. package/lib/utils/tokenize.js +1 -1
  325. package/lib/utils/tpl-builtin.js +1 -1
  326. package/lib/utils/tpl-lodash.js +1 -1
  327. package/lib/utils/tpl.js +1 -1
  328. package/lib/utils/uncontrollable.js +1 -1
  329. package/lib/utils/validateId.js +1 -1
  330. package/lib/utils/validations.js +1 -1
  331. package/lib/utils/visitedCache.js +1 -1
  332. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="lodash" />
2
1
  import { SnapshotIn, IAnyModelType, Instance } from 'mobx-state-tree';
3
2
  import { IFormStore } from './form';
4
3
  export declare enum SELECTED_STATUS {
@@ -225,6 +224,8 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
225
224
  resetDefered(): void;
226
225
  updateData({ children, ...rest }: any): void;
227
226
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
227
+ fullItems: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<any, any, any>>, [undefined]>;
228
+ fullSelectedItems: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<any, any, any>>, [undefined]>;
228
229
  selectedRows: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IModelType<{
229
230
  storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
230
231
  id: import("mobx-state-tree").ISimpleType<string>;
@@ -295,6 +296,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
295
296
  draggable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
296
297
  dragging: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
297
298
  selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
299
+ showIndex: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
298
300
  multiple: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
299
301
  footable: import("mobx-state-tree").IType<any, any, any>;
300
302
  expandConfig: import("mobx-state-tree").IType<any, any, any>;
@@ -665,7 +667,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
665
667
  closeDialog: (confirmed?: any, result?: any) => void;
666
668
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
667
669
  closePopOver: (confirmed?: any, result?: any) => void;
668
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
670
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
669
671
  changeEmitedValue: (value: any) => void;
670
672
  addSubFormItem: (item: {
671
673
  id: string;
@@ -1200,7 +1202,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
1200
1202
  closeDialog: (confirmed?: any, result?: any) => void;
1201
1203
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
1202
1204
  closePopOver: (confirmed?: any, result?: any) => void;
1203
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
1205
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
1204
1206
  changeEmitedValue: (value: any) => void;
1205
1207
  addSubFormItem: (item: {
1206
1208
  id: string;
@@ -1739,7 +1741,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
1739
1741
  closeDialog: (confirmed?: any, result?: any) => void;
1740
1742
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
1741
1743
  closePopOver: (confirmed?: any, result?: any) => void;
1742
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
1744
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
1743
1745
  changeEmitedValue: (value: any) => void;
1744
1746
  addSubFormItem: (item: {
1745
1747
  id: string;
@@ -2274,7 +2276,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
2274
2276
  closeDialog: (confirmed?: any, result?: any) => void;
2275
2277
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
2276
2278
  closePopOver: (confirmed?: any, result?: any) => void;
2277
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
2279
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
2278
2280
  changeEmitedValue: (value: any) => void;
2279
2281
  addSubFormItem: (item: {
2280
2282
  id: string;
@@ -2818,7 +2820,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
2818
2820
  closeDialog: (confirmed?: any, result?: any) => void;
2819
2821
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
2820
2822
  closePopOver: (confirmed?: any, result?: any) => void;
2821
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
2823
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
2822
2824
  changeEmitedValue: (value: any) => void;
2823
2825
  addSubFormItem: (item: {
2824
2826
  id: string;
@@ -3353,7 +3355,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
3353
3355
  closeDialog: (confirmed?: any, result?: any) => void;
3354
3356
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
3355
3357
  closePopOver: (confirmed?: any, result?: any) => void;
3356
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
3358
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
3357
3359
  changeEmitedValue: (value: any) => void;
3358
3360
  addSubFormItem: (item: {
3359
3361
  id: string;
@@ -3892,7 +3894,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
3892
3894
  closeDialog: (confirmed?: any, result?: any) => void;
3893
3895
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
3894
3896
  closePopOver: (confirmed?: any, result?: any) => void;
3895
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
3897
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
3896
3898
  changeEmitedValue: (value: any) => void;
3897
3899
  addSubFormItem: (item: {
3898
3900
  id: string;
@@ -4427,7 +4429,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
4427
4429
  closeDialog: (confirmed?: any, result?: any) => void;
4428
4430
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
4429
4431
  closePopOver: (confirmed?: any, result?: any) => void;
4430
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
4432
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
4431
4433
  changeEmitedValue: (value: any) => void;
4432
4434
  addSubFormItem: (item: {
4433
4435
  id: string;
@@ -4966,7 +4968,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
4966
4968
  closeDialog: (confirmed?: any, result?: any) => void;
4967
4969
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
4968
4970
  closePopOver: (confirmed?: any, result?: any) => void;
4969
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
4971
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
4970
4972
  changeEmitedValue: (value: any) => void;
4971
4973
  addSubFormItem: (item: {
4972
4974
  id: string;
@@ -5501,7 +5503,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
5501
5503
  closeDialog: (confirmed?: any, result?: any) => void;
5502
5504
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
5503
5505
  closePopOver: (confirmed?: any, result?: any) => void;
5504
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
5506
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
5505
5507
  changeEmitedValue: (value: any) => void;
5506
5508
  addSubFormItem: (item: {
5507
5509
  id: string;
@@ -6163,7 +6165,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
6163
6165
  closeDialog: (confirmed?: any, result?: any) => void;
6164
6166
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
6165
6167
  closePopOver: (confirmed?: any, result?: any) => void;
6166
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
6168
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
6167
6169
  changeEmitedValue: (value: any) => void;
6168
6170
  addSubFormItem: (item: {
6169
6171
  id: string;
@@ -6698,7 +6700,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
6698
6700
  closeDialog: (confirmed?: any, result?: any) => void;
6699
6701
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
6700
6702
  closePopOver: (confirmed?: any, result?: any) => void;
6701
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
6703
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
6702
6704
  changeEmitedValue: (value: any) => void;
6703
6705
  addSubFormItem: (item: {
6704
6706
  id: string;
@@ -7237,7 +7239,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
7237
7239
  closeDialog: (confirmed?: any, result?: any) => void;
7238
7240
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
7239
7241
  closePopOver: (confirmed?: any, result?: any) => void;
7240
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
7242
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
7241
7243
  changeEmitedValue: (value: any) => void;
7242
7244
  addSubFormItem: (item: {
7243
7245
  id: string;
@@ -7772,7 +7774,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
7772
7774
  closeDialog: (confirmed?: any, result?: any) => void;
7773
7775
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
7774
7776
  closePopOver: (confirmed?: any, result?: any) => void;
7775
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
7777
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
7776
7778
  changeEmitedValue: (value: any) => void;
7777
7779
  addSubFormItem: (item: {
7778
7780
  id: string;
@@ -8316,7 +8318,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
8316
8318
  closeDialog: (confirmed?: any, result?: any) => void;
8317
8319
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
8318
8320
  closePopOver: (confirmed?: any, result?: any) => void;
8319
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
8321
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
8320
8322
  changeEmitedValue: (value: any) => void;
8321
8323
  addSubFormItem: (item: {
8322
8324
  id: string;
@@ -8851,7 +8853,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
8851
8853
  closeDialog: (confirmed?: any, result?: any) => void;
8852
8854
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
8853
8855
  closePopOver: (confirmed?: any, result?: any) => void;
8854
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
8856
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
8855
8857
  changeEmitedValue: (value: any) => void;
8856
8858
  addSubFormItem: (item: {
8857
8859
  id: string;
@@ -9390,7 +9392,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
9390
9392
  closeDialog: (confirmed?: any, result?: any) => void;
9391
9393
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
9392
9394
  closePopOver: (confirmed?: any, result?: any) => void;
9393
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
9395
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
9394
9396
  changeEmitedValue: (value: any) => void;
9395
9397
  addSubFormItem: (item: {
9396
9398
  id: string;
@@ -9925,7 +9927,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
9925
9927
  closeDialog: (confirmed?: any, result?: any) => void;
9926
9928
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
9927
9929
  closePopOver: (confirmed?: any, result?: any) => void;
9928
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
9930
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
9929
9931
  changeEmitedValue: (value: any) => void;
9930
9932
  addSubFormItem: (item: {
9931
9933
  id: string;
@@ -10464,7 +10466,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
10464
10466
  closeDialog: (confirmed?: any, result?: any) => void;
10465
10467
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
10466
10468
  closePopOver: (confirmed?: any, result?: any) => void;
10467
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
10469
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
10468
10470
  changeEmitedValue: (value: any) => void;
10469
10471
  addSubFormItem: (item: {
10470
10472
  id: string;
@@ -10999,7 +11001,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
10999
11001
  closeDialog: (confirmed?: any, result?: any) => void;
11000
11002
  openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
11001
11003
  closePopOver: (confirmed?: any, result?: any) => void;
11002
- changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
11004
+ changeTmpValue: (value: any, changeReason?: "input" | "formInited" | "defaultValue" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
11003
11005
  changeEmitedValue: (value: any) => void;
11004
11006
  addSubFormItem: (item: {
11005
11007
  id: string;
@@ -12811,7 +12813,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
12811
12813
  /** 已选择item是否达到数量上限 */
12812
12814
  readonly isSelectionThresholdReached: boolean;
12813
12815
  readonly firstToggledColumnIndex: number | null;
12814
- getData: (superData: any) => any;
12816
+ getData(superData: any): any;
12815
12817
  readonly columnGroup: {
12816
12818
  rowSpan: number;
12817
12819
  label: any;
@@ -13234,6 +13236,17 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
13234
13236
  updateData({ children, ...rest }: any): void;
13235
13237
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
13236
13238
  buildStyles(style: any): any;
13239
+ /**
13240
+ * 构建事件的上下文数据
13241
+ * @param buildChain
13242
+ * @returns
13243
+ */
13244
+ readonly eventContext: {
13245
+ selectedItems: any[];
13246
+ selectedIndexes: string[];
13247
+ items: any[];
13248
+ unSelectedItems: any[];
13249
+ };
13237
13250
  } & {
13238
13251
  setTable: (ref: HTMLElement | null) => void;
13239
13252
  getTable: () => HTMLElement | null;
@@ -13243,7 +13256,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
13243
13256
  updateColumns: (columns: Array<SColumn>) => void;
13244
13257
  initTableWidth: () => void;
13245
13258
  syncTableWidth: () => void;
13246
- initRows: (rows: Array<any>, getEntryId?: ((entry: any, index: number) => string) | undefined, reUseRow?: boolean | 'match') => void;
13259
+ initRows: (rows: Array<any>, getEntryId?: ((entry: any, index: number) => string) | undefined, reUseRow?: boolean | 'match', fullItems?: Array<any>, fullSelectedItems?: Array<any>) => void;
13247
13260
  updateSelected: (selected: Array<any>, valueField?: string) => void;
13248
13261
  toggleAll: () => void;
13249
13262
  getSelectedRows: () => ({
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -239,14 +239,9 @@ var Row = mobxStateTree.types
239
239
  }
240
240
  var table = mobxStateTree.getParent(self, self.depth * 2);
241
241
  var parent = mobxStateTree.getParent(self, 2);
242
- return object.createObject(object.extendObject(mobxStateTree.getParent(self, self.depth * 2).data, {
243
- index: self.index,
242
+ return object.createObject(object.extendObject(mobxStateTree.getParent(self, self.depth * 2).data, tslib.__assign({ index: self.index, path: self.path,
244
243
  // todo 以后再支持多层,目前先一层
245
- parent: parent.storeType === Row.name ? parent.data : undefined,
246
- // 只有table时,也可以获取选中行
247
- selectedItems: table.selectedRows.map(function (item) { return item.data; }),
248
- unSelectedItems: table.unSelectedRows.map(function (item) { return item.data; })
249
- }), children
244
+ parent: parent.storeType === Row.name ? parent.data : undefined }, table.eventContext)), children
250
245
  ? tslib.__assign(tslib.__assign({}, self.data), { children: children }) : self.data);
251
246
  },
252
247
  get checkable() {
@@ -296,8 +291,12 @@ var Row = mobxStateTree.types
296
291
  var table = self.table;
297
292
  var row = self;
298
293
  table.toggle(row, checked);
299
- table.toggleAncestors(row);
300
- table.toggleDescendants(row, checked);
294
+ // 多选才需要处理祖先和后代
295
+ // 单选只处理自己就行了
296
+ if (table.multiple) {
297
+ table.toggleAncestors(row);
298
+ table.toggleDescendants(row, checked);
299
+ }
301
300
  },
302
301
  toggleExpanded: function () {
303
302
  mobxStateTree.getParent(self, self.depth * 2).toggleExpanded(self);
@@ -306,8 +305,16 @@ var Row = mobxStateTree.types
306
305
  mobxStateTree.getParent(self, self.depth * 2).setExpanded(self, expanded);
307
306
  },
308
307
  change: function (values, savePristine) {
309
- self.data = helper.immutableExtends(self.data, values);
310
- savePristine && (self.pristine = self.data);
308
+ var data = helper.immutableExtends(self.data, values);
309
+ Object.isExtensible(data) &&
310
+ Object.defineProperty(data, '__pristine', {
311
+ value: savePristine ? data : self.pristine,
312
+ enumerable: false,
313
+ configurable: false,
314
+ writable: false
315
+ });
316
+ self.data = data;
317
+ savePristine && (self.pristine = data);
311
318
  },
312
319
  reset: function () {
313
320
  self.newIndex = self.index;
@@ -369,9 +376,17 @@ var Row = mobxStateTree.types
369
376
  },
370
377
  updateData: function (_a) {
371
378
  var children = _a.children, rest = tslib.__rest(_a, ["children"]);
372
- self.data = tslib.__assign(tslib.__assign({}, self.data), rest);
379
+ var data = tslib.__assign(tslib.__assign({}, self.data), rest);
380
+ Object.isExtensible(data) &&
381
+ Object.defineProperty(data, '__pristine', {
382
+ value: self.data.__pristine || self.pristine,
383
+ enumerable: false,
384
+ configurable: false,
385
+ writable: false
386
+ });
387
+ self.data = data;
373
388
  if (Array.isArray(children)) {
374
- this.replaceChildren(initChildren(children, self.depth, self.index, self.id, self.path));
389
+ this.replaceChildren(initChildren(children, self.depth, self.index, self.id, "".concat(self.path, ".")));
375
390
  }
376
391
  }
377
392
  }); });
@@ -380,6 +395,11 @@ var TableStore = iRenderer.iRendererStore
380
395
  .props({
381
396
  columns: mobxStateTree.types.array(Column),
382
397
  rows: mobxStateTree.types.array(Row),
398
+ // 记录原始列表和原始选中的列表
399
+ // 因为如果是前端分页,上层 crud 或者 input-table 下发到这层的
400
+ // 是某个页区间的数据,这个时候 items 和 selectedItems 会少很多条
401
+ fullItems: mobxStateTree.types.optional(mobxStateTree.types.array(mobxStateTree.types.frozen()), []),
402
+ fullSelectedItems: mobxStateTree.types.optional(mobxStateTree.types.array(mobxStateTree.types.frozen()), []),
383
403
  selectedRows: mobxStateTree.types.array(mobxStateTree.types.reference(Row)),
384
404
  expandedRows: mobxStateTree.types.array(mobxStateTree.types.string),
385
405
  primaryField: 'id',
@@ -390,6 +410,7 @@ var TableStore = iRenderer.iRendererStore
390
410
  draggable: false,
391
411
  dragging: false,
392
412
  selectable: false,
413
+ showIndex: false,
393
414
  multiple: true,
394
415
  footable: mobxStateTree.types.frozen(),
395
416
  expandConfig: mobxStateTree.types.frozen(),
@@ -513,13 +534,6 @@ var TableStore = iRenderer.iRendererStore
513
534
  function getUnSelectedRows() {
514
535
  return helper.flattenTree(self.rows).filter(function (item) { return !item.checked; });
515
536
  }
516
- function getData(superData) {
517
- return object.createObject(superData, {
518
- items: self.rows.map(function (item) { return item.data; }),
519
- selectedItems: self.selectedRows.map(function (item) { return item.data; }),
520
- unSelectedItems: getUnSelectedRows().map(function (item) { return item.data; })
521
- });
522
- }
523
537
  function hasColumnHidden() {
524
538
  return self.columns.findIndex(function (column) { return !column.toggled; }) !== -1;
525
539
  }
@@ -693,7 +707,9 @@ var TableStore = iRenderer.iRendererStore
693
707
  get firstToggledColumnIndex() {
694
708
  return getFirstToggledColumnIndex();
695
709
  },
696
- getData: getData,
710
+ getData: function (superData) {
711
+ return object.createObject(superData, this.eventContext);
712
+ },
697
713
  get columnGroup() {
698
714
  return getColumnGroup();
699
715
  },
@@ -786,6 +802,37 @@ var TableStore = iRenderer.iRendererStore
786
802
  column.realWidth + 'px';
787
803
  });
788
804
  return style;
805
+ },
806
+ /**
807
+ * 构建事件的上下文数据
808
+ * @param buildChain
809
+ * @returns
810
+ */
811
+ get eventContext() {
812
+ var context = {
813
+ selectedItems: self.selectedRows.map(function (item) { return item.data; }),
814
+ selectedIndexes: self.selectedRows.map(function (item) { return item.path; }),
815
+ items: self.rows.map(function (item) { return item.data; }),
816
+ unSelectedItems: this.unSelectedRows.map(function (item) { return item.data; })
817
+ };
818
+ // 如果是前端分页情况,需要根据全量数据计算
819
+ // 如果不是前端分页,数据都没有返回,那种就没办法支持全量数据信息了
820
+ if (self.fullItems.length > self.rows.length) {
821
+ // todo 这里的选择顺序会一直变,这个有影响吗?
822
+ var selectedItems_1 = self.fullSelectedItems
823
+ .filter(function (item) {
824
+ return !self.rows.find(function (row) { return row.pristine === (item.__pristine || item); });
825
+ })
826
+ .concat(context.selectedItems);
827
+ context.selectedItems = selectedItems_1;
828
+ context.items = self.fullItems.concat();
829
+ context.unSelectedItems = self.fullItems.filter(function (item) { return !selectedItems_1.includes(item); });
830
+ context.selectedIndexes = selectedItems_1.map(function (item) {
831
+ var _a;
832
+ return ((_a = helper.findTreeIndex(self.fullItems, function (i) { return (item.__pristine || item) === (i.__pristine || i); })) === null || _a === void 0 ? void 0 : _a.join('.')) || '-1';
833
+ });
834
+ }
835
+ return context;
789
836
  }
790
837
  };
791
838
  })
@@ -844,6 +891,7 @@ var TableStore = iRenderer.iRendererStore
844
891
  (self.lazyRenderAfter = config.lazyRenderAfter);
845
892
  typeof config.tableLayout === 'string' &&
846
893
  (self.tableLayout = config.tableLayout);
894
+ config.showIndex !== undefined && (self.showIndex = config.showIndex);
847
895
  if (config.columns && Array.isArray(config.columns)) {
848
896
  var columns = config.columns
849
897
  .map(function (column) {
@@ -885,6 +933,12 @@ var TableStore = iRenderer.iRendererStore
885
933
  label: '空'
886
934
  });
887
935
  }
936
+ if (self.showIndex) {
937
+ columns.unshift({
938
+ type: '__index',
939
+ width: 50
940
+ });
941
+ }
888
942
  columns.unshift({
889
943
  type: '__expandme',
890
944
  toggable: false,
@@ -1061,7 +1115,7 @@ var TableStore = iRenderer.iRendererStore
1061
1115
  }
1062
1116
  return combineCell(arr, keys);
1063
1117
  }
1064
- function initRows(rows, getEntryId, reUseRow) {
1118
+ function initRows(rows, getEntryId, reUseRow, fullItems, fullSelectedItems) {
1065
1119
  self.selectedRows.clear();
1066
1120
  // self.expandedRows.clear();
1067
1121
  /* 避免输入内容为非数组挂掉 */
@@ -1081,7 +1135,7 @@ var TableStore = iRenderer.iRendererStore
1081
1135
  depth: 1,
1082
1136
  index: index,
1083
1137
  newIndex: index,
1084
- pristine: item,
1138
+ pristine: item.__pristine || item,
1085
1139
  path: "".concat(index),
1086
1140
  data: item,
1087
1141
  rowSpans: {},
@@ -1120,6 +1174,9 @@ var TableStore = iRenderer.iRendererStore
1120
1174
  }
1121
1175
  }
1122
1176
  self.dragging = false;
1177
+ Array.isArray(fullItems) && self.fullItems.replace(fullItems);
1178
+ Array.isArray(fullSelectedItems) &&
1179
+ self.fullSelectedItems.replace(fullSelectedItems);
1123
1180
  }
1124
1181
  // 获取所有层级的子节点id
1125
1182
  function getExpandAllRows(arr) {
@@ -1315,7 +1372,7 @@ var TableStore = iRenderer.iRendererStore
1315
1372
  return;
1316
1373
  }
1317
1374
  var maxLength = self.getSelectionUpperLimit();
1318
- var selectedItems = self.data.selectedItems;
1375
+ var selectedItems = self.selectedRows.map(function (item) { return item.data; });
1319
1376
  self.selectedRows.map(function (item) { return item.setCheckdisable(false); });
1320
1377
  if (maxLength !== Infinity && maxLength <= selectedItems.length) {
1321
1378
  self.unSelectedRows.map(function (item) { return !item.checked && item.setCheckdisable(true); });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
package/lib/theme.d.ts CHANGED
@@ -67,7 +67,7 @@ export declare function themeable<T extends React.ComponentType<React.ComponentP
67
67
  componentWillUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
68
68
  UNSAFE_componentWillUpdate?(nextProps: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
69
69
  };
70
- displayName: any;
70
+ displayName: string;
71
71
  contextType: React.Context<string>;
72
72
  ComposedComponent: React.ComponentType<T>;
73
73
  } & hoistNonReactStatic.NonReactStatics<T, {}> & {
package/lib/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
package/lib/types.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import type { JSONSchema7 } from 'json-schema';
3
3
  import { ListenerAction } from './actions/Action';
4
4
  import { debounceConfig, trackConfig } from './utils/renderer-event';
5
- import type { TestIdBuilder } from './utils/helper';
5
+ import type { TestIdBuilder, ValidateError } from './utils/helper';
6
6
  import { AnimationsProps } from './utils/animations';
7
7
  export interface Option {
8
8
  /**
@@ -281,7 +281,7 @@ export interface Definitions {
281
281
  [propName: string]: SchemaNode;
282
282
  }
283
283
  export interface ActionObject extends ButtonObject {
284
- actionType?: 'submit' | 'copy' | 'reload' | 'ajax' | 'saveAs' | 'dialog' | 'drawer' | 'confirmDialog' | 'jump' | 'link' | 'url' | 'email' | 'close' | 'confirm' | 'add' | 'remove' | 'delete' | 'edit' | 'cancel' | 'next' | 'prev' | 'reset' | 'validate' | 'reset-and-submit' | 'clear' | 'clear-and-submit' | 'toast' | 'goto-step' | 'goto-image' | 'expand' | 'collapse' | 'step-submit' | 'select' | 'selectAll' | 'clearAll' | 'changeTabKey' | 'clearSearch' | 'submitQuickEdit' | 'initDrag' | 'cancelDrag' | 'toggleExpanded' | 'setExpanded';
284
+ actionType?: 'submit' | 'copy' | 'reload' | 'ajax' | 'saveAs' | 'dialog' | 'drawer' | 'confirmDialog' | 'jump' | 'link' | 'url' | 'email' | 'close' | 'confirm' | 'add' | 'remove' | 'delete' | 'edit' | 'cancel' | 'next' | 'prev' | 'reset' | 'validate' | 'reset-and-submit' | 'clear' | 'clear-and-submit' | 'toast' | 'goto-step' | 'goto-image' | 'expand' | 'collapse' | 'step-submit' | 'select' | 'selectAll' | 'clearAll' | 'changeTabKey' | 'clearSearch' | 'submitQuickEdit' | 'initDrag' | 'cancelDrag' | 'toggleExpanded' | 'setExpanded' | 'clearError';
285
285
  api?: BaseApiObject | string;
286
286
  asyncApi?: BaseApiObject | string;
287
287
  payload?: any;
@@ -390,6 +390,7 @@ export type ToastConf = {
390
390
  className?: string;
391
391
  items?: Array<any>;
392
392
  useMobileUI?: boolean;
393
+ validateError?: ValidateError;
393
394
  };
394
395
  export interface OptionProps {
395
396
  className?: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -3,6 +3,8 @@ export interface AnimationsProps {
3
3
  type: string;
4
4
  duration?: number;
5
5
  delay?: number;
6
+ repeat?: boolean;
7
+ inView?: boolean;
6
8
  };
7
9
  attention?: {
8
10
  type: string;
@@ -14,6 +16,8 @@ export interface AnimationsProps {
14
16
  type: string;
15
17
  duration?: number;
16
18
  delay?: number;
19
+ repeat?: boolean;
20
+ outView?: boolean;
17
21
  };
18
22
  }
19
23
  export declare function createAnimationStyle(id: string, animationsConfig: AnimationsProps): void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v6.11.0-beta.0
2
+ * amis-core v6.11.0-beta.2
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -48,6 +48,7 @@ export declare function isApiOutdatedWithData(prevApi: Api | undefined, nextApi:
48
48
  export declare function isApiOutdated(prevApi: Api | undefined, nextApi: Api | undefined, prevData: any, nextData: any): nextApi is Api;
49
49
  export declare function isValidApi(api: string): boolean;
50
50
  export declare function isEffectiveApi(api?: Api, data?: any, initFetch?: boolean, initFetchOn?: string): api is Api;
51
+ export declare function shouldBlockedBySendOnApi(api?: Api, data?: any): boolean;
51
52
  export declare function isSameApi(apiA: ApiObject | ApiCacheConfig, apiB: ApiObject | ApiCacheConfig): boolean;
52
53
  export declare function getApiCache(api: ApiObject): ApiCacheConfig | undefined;
53
54
  export declare function setApiCache(api: ApiObject, promise: Promise<any>): Promise<any>;