amis-core 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/esm/Root.js +1 -1
  2. package/esm/RootRenderer.js +2 -2
  3. package/esm/SchemaRenderer.js +7 -2
  4. package/esm/Scoped.js +3 -3
  5. package/esm/WithRootStore.js +1 -1
  6. package/esm/WithStore.js +20 -9
  7. package/esm/_virtual/index.js +1 -1
  8. package/esm/_virtual/index2.js +1 -1
  9. package/esm/_virtual/react-is.development.js +1 -1
  10. package/esm/_virtual/react-is.production.min.js +1 -1
  11. package/esm/actions/Action.js +1 -1
  12. package/esm/actions/AjaxAction.js +1 -1
  13. package/esm/actions/BreakAction.js +1 -1
  14. package/esm/actions/BroadcastAction.js +1 -1
  15. package/esm/actions/CmptAction.js +1 -1
  16. package/esm/actions/ContinueAction.js +1 -1
  17. package/esm/actions/CopyAction.js +1 -1
  18. package/esm/actions/CustomAction.js +2 -1
  19. package/esm/actions/Decorators.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/LinkAction.js +1 -1
  24. package/esm/actions/LoopAction.js +1 -1
  25. package/esm/actions/PageAction.js +1 -1
  26. package/esm/actions/ParallelAction.js +1 -1
  27. package/esm/actions/SwitchAction.js +1 -1
  28. package/esm/actions/ToastAction.js +1 -1
  29. package/esm/components/LazyComponent.js +1 -1
  30. package/esm/components/Overlay.js +3 -2
  31. package/esm/components/PopOver.js +2 -1
  32. package/esm/env.js +1 -1
  33. package/esm/envOverwrite.js +1 -1
  34. package/esm/factory.js +3 -3
  35. package/esm/index.js +2 -2
  36. package/esm/locale.js +2 -2
  37. package/esm/node_modules/@restart/hooks/esm/useCommittedRef.js +1 -1
  38. package/esm/node_modules/@restart/hooks/esm/useEventCallback.js +1 -1
  39. package/esm/node_modules/dom-helpers/esm/addEventListener.js +1 -1
  40. package/esm/node_modules/dom-helpers/esm/canUseDOM.js +1 -1
  41. package/esm/node_modules/dom-helpers/esm/contains.js +1 -1
  42. package/esm/node_modules/dom-helpers/esm/listen.js +1 -1
  43. package/esm/node_modules/dom-helpers/esm/ownerDocument.js +1 -1
  44. package/esm/node_modules/dom-helpers/esm/removeEventListener.js +1 -1
  45. package/esm/node_modules/object-assign/index.js +1 -1
  46. package/esm/node_modules/prop-types/checkPropTypes.js +1 -1
  47. package/esm/node_modules/prop-types/factoryWithThrowingShims.js +1 -1
  48. package/esm/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  49. package/esm/node_modules/prop-types/index.js +1 -1
  50. package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -1
  51. package/esm/node_modules/prop-types/lib/has.js +1 -1
  52. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -1
  53. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -1
  54. package/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  55. package/esm/node_modules/react-overlays/esm/Portal.js +1 -1
  56. package/esm/node_modules/react-overlays/esm/ownerDocument.js +1 -1
  57. package/esm/node_modules/react-overlays/esm/safeFindDOMNode.js +1 -1
  58. package/esm/node_modules/react-overlays/esm/useRootClose.js +1 -1
  59. package/esm/node_modules/react-overlays/esm/useWaitForDOMRef.js +1 -1
  60. package/esm/node_modules/warning/warning.js +1 -1
  61. package/esm/renderers/Form.d.ts +4 -0
  62. package/esm/renderers/Form.js +10 -4
  63. package/esm/renderers/Item.js +10 -15
  64. package/esm/renderers/Options.d.ts +1 -0
  65. package/esm/renderers/Options.js +12 -34
  66. package/esm/renderers/Placeholder.js +1 -1
  67. package/esm/renderers/builtin.js +1 -1
  68. package/esm/renderers/wrapControl.js +3 -3
  69. package/esm/store/app.js +1 -1
  70. package/esm/store/combo.d.ts +26 -26
  71. package/esm/store/combo.js +1 -1
  72. package/esm/store/crud.js +1 -1
  73. package/esm/store/form.d.ts +11 -11
  74. package/esm/store/form.js +12 -3
  75. package/esm/store/formItem.d.ts +1 -1
  76. package/esm/store/formItem.js +9 -3
  77. package/esm/store/iRenderer.js +1 -1
  78. package/esm/store/index.js +1 -1
  79. package/esm/store/list.js +1 -1
  80. package/esm/store/manager.js +1 -1
  81. package/esm/store/modal.js +1 -1
  82. package/esm/store/node.js +1 -1
  83. package/esm/store/pagination.js +1 -1
  84. package/esm/store/root.js +3 -9
  85. package/esm/store/service.js +1 -1
  86. package/esm/store/table.d.ts +24 -24
  87. package/esm/store/table.js +8 -2
  88. package/esm/store/table2.d.ts +2 -0
  89. package/esm/store/table2.js +9 -2
  90. package/esm/theme.js +1 -1
  91. package/esm/utils/Animation.js +1 -1
  92. package/esm/utils/ColorScale.js +1 -1
  93. package/esm/utils/DataSchema.js +1 -1
  94. package/esm/utils/DataScope.js +1 -1
  95. package/esm/utils/RootClose.js +1 -1
  96. package/esm/utils/SimpleMap.js +1 -1
  97. package/esm/utils/api.js +1 -1
  98. package/esm/utils/attachmentAdpator.js +1 -1
  99. package/esm/utils/autobind.js +1 -1
  100. package/esm/utils/columnsSplit.js +1 -1
  101. package/esm/utils/dataMapping.js +1 -1
  102. package/esm/utils/date.js +1 -1
  103. package/esm/utils/debug.d.ts +3 -0
  104. package/esm/utils/debug.js +27 -5
  105. package/esm/utils/dom.js +1 -1
  106. package/esm/utils/errors.js +1 -1
  107. package/esm/utils/escapeHtml.js +1 -1
  108. package/esm/utils/filter-schema.js +7 -5
  109. package/esm/utils/filter.js +12 -2
  110. package/esm/utils/formatDuration.js +1 -1
  111. package/esm/utils/formula.js +2 -2
  112. package/esm/utils/getVariable.js +1 -1
  113. package/esm/utils/grammar.js +1 -1
  114. package/esm/utils/handleAction.js +1 -1
  115. package/esm/utils/helper.d.ts +10 -0
  116. package/esm/utils/helper.js +20 -2
  117. package/esm/utils/highlight.js +1 -1
  118. package/esm/utils/icon.js +1 -1
  119. package/esm/utils/image.js +1 -1
  120. package/esm/utils/isPureVariable.js +1 -1
  121. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  122. package/esm/utils/keyToPath.js +1 -1
  123. package/esm/utils/makeSorter.js +1 -1
  124. package/esm/utils/normalizeLink.js +1 -1
  125. package/esm/utils/normalizeOptions.js +1 -1
  126. package/esm/utils/object.js +1 -1
  127. package/esm/utils/offset.js +1 -1
  128. package/esm/utils/offsetParent.js +1 -1
  129. package/esm/utils/optionValueCompare.js +9 -4
  130. package/esm/utils/position.js +1 -1
  131. package/esm/utils/prettyBytes.d.ts +1 -1
  132. package/esm/utils/prettyBytes.js +5 -4
  133. package/esm/utils/renderer-event.js +1 -1
  134. package/esm/utils/replaceText.js +1 -1
  135. package/esm/utils/resize-sensor.js +1 -1
  136. package/esm/utils/resolveVariable.js +1 -1
  137. package/esm/utils/resolveVariableAndFilter.js +1 -1
  138. package/esm/utils/scrollPosition.js +1 -1
  139. package/esm/utils/string2regExp.js +1 -1
  140. package/esm/utils/stripNumber.js +2 -2
  141. package/esm/utils/style.js +1 -1
  142. package/esm/utils/toNumber.js +1 -1
  143. package/esm/utils/tokenize.js +1 -1
  144. package/esm/utils/tpl-builtin.js +1 -1
  145. package/esm/utils/tpl-lodash.js +1 -1
  146. package/esm/utils/tpl.js +2 -2
  147. package/esm/utils/uncontrollable.js +1 -1
  148. package/esm/utils/validations.js +9 -1
  149. package/lib/Root.js +1 -1
  150. package/lib/RootRenderer.js +2 -2
  151. package/lib/SchemaRenderer.js +7 -2
  152. package/lib/Scoped.js +2 -2
  153. package/lib/WithRootStore.js +1 -1
  154. package/lib/WithStore.js +20 -9
  155. package/lib/_virtual/index.js +1 -1
  156. package/lib/_virtual/index2.js +1 -1
  157. package/lib/_virtual/react-is.development.js +1 -1
  158. package/lib/_virtual/react-is.production.min.js +1 -1
  159. package/lib/actions/Action.js +1 -1
  160. package/lib/actions/AjaxAction.js +1 -1
  161. package/lib/actions/BreakAction.js +1 -1
  162. package/lib/actions/BroadcastAction.js +1 -1
  163. package/lib/actions/CmptAction.js +1 -1
  164. package/lib/actions/ContinueAction.js +1 -1
  165. package/lib/actions/CopyAction.js +1 -1
  166. package/lib/actions/CustomAction.js +2 -1
  167. package/lib/actions/Decorators.js +1 -1
  168. package/lib/actions/DialogAction.js +1 -1
  169. package/lib/actions/DrawerAction.js +1 -1
  170. package/lib/actions/EmailAction.js +1 -1
  171. package/lib/actions/LinkAction.js +1 -1
  172. package/lib/actions/LoopAction.js +1 -1
  173. package/lib/actions/PageAction.js +1 -1
  174. package/lib/actions/ParallelAction.js +1 -1
  175. package/lib/actions/SwitchAction.js +1 -1
  176. package/lib/actions/ToastAction.js +1 -1
  177. package/lib/components/LazyComponent.js +1 -1
  178. package/lib/components/Overlay.js +3 -2
  179. package/lib/components/PopOver.js +2 -1
  180. package/lib/env.js +1 -1
  181. package/lib/envOverwrite.js +1 -1
  182. package/lib/factory.js +2 -2
  183. package/lib/index.js +2 -1
  184. package/lib/locale.js +2 -2
  185. package/lib/node_modules/@restart/hooks/esm/useCommittedRef.js +1 -1
  186. package/lib/node_modules/@restart/hooks/esm/useEventCallback.js +1 -1
  187. package/lib/node_modules/dom-helpers/esm/addEventListener.js +1 -1
  188. package/lib/node_modules/dom-helpers/esm/canUseDOM.js +1 -1
  189. package/lib/node_modules/dom-helpers/esm/contains.js +1 -1
  190. package/lib/node_modules/dom-helpers/esm/listen.js +1 -1
  191. package/lib/node_modules/dom-helpers/esm/ownerDocument.js +1 -1
  192. package/lib/node_modules/dom-helpers/esm/removeEventListener.js +1 -1
  193. package/lib/node_modules/object-assign/index.js +1 -1
  194. package/lib/node_modules/prop-types/checkPropTypes.js +1 -1
  195. package/lib/node_modules/prop-types/factoryWithThrowingShims.js +1 -1
  196. package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  197. package/lib/node_modules/prop-types/index.js +1 -1
  198. package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -1
  199. package/lib/node_modules/prop-types/lib/has.js +1 -1
  200. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -1
  201. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -1
  202. package/lib/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  203. package/lib/node_modules/react-overlays/esm/Portal.js +1 -1
  204. package/lib/node_modules/react-overlays/esm/ownerDocument.js +1 -1
  205. package/lib/node_modules/react-overlays/esm/safeFindDOMNode.js +1 -1
  206. package/lib/node_modules/react-overlays/esm/useRootClose.js +1 -1
  207. package/lib/node_modules/react-overlays/esm/useWaitForDOMRef.js +1 -1
  208. package/lib/node_modules/warning/warning.js +1 -1
  209. package/lib/renderers/Form.d.ts +4 -0
  210. package/lib/renderers/Form.js +10 -4
  211. package/lib/renderers/Item.js +10 -15
  212. package/lib/renderers/Options.d.ts +1 -0
  213. package/lib/renderers/Options.js +12 -34
  214. package/lib/renderers/Placeholder.js +1 -1
  215. package/lib/renderers/builtin.js +1 -1
  216. package/lib/renderers/wrapControl.js +3 -3
  217. package/lib/store/app.js +1 -1
  218. package/lib/store/combo.d.ts +26 -26
  219. package/lib/store/combo.js +1 -1
  220. package/lib/store/crud.js +1 -1
  221. package/lib/store/form.d.ts +11 -11
  222. package/lib/store/form.js +13 -3
  223. package/lib/store/formItem.d.ts +1 -1
  224. package/lib/store/formItem.js +9 -3
  225. package/lib/store/iRenderer.js +1 -1
  226. package/lib/store/index.js +1 -1
  227. package/lib/store/list.js +1 -1
  228. package/lib/store/manager.js +1 -1
  229. package/lib/store/modal.js +1 -1
  230. package/lib/store/node.js +1 -1
  231. package/lib/store/pagination.js +1 -1
  232. package/lib/store/root.js +2 -8
  233. package/lib/store/service.js +1 -1
  234. package/lib/store/table.d.ts +24 -24
  235. package/lib/store/table.js +8 -2
  236. package/lib/store/table2.d.ts +2 -0
  237. package/lib/store/table2.js +9 -2
  238. package/lib/theme.js +1 -1
  239. package/lib/utils/Animation.js +1 -1
  240. package/lib/utils/ColorScale.js +1 -1
  241. package/lib/utils/DataSchema.js +1 -1
  242. package/lib/utils/DataScope.js +1 -1
  243. package/lib/utils/RootClose.js +1 -1
  244. package/lib/utils/SimpleMap.js +1 -1
  245. package/lib/utils/api.js +1 -1
  246. package/lib/utils/attachmentAdpator.js +1 -1
  247. package/lib/utils/autobind.js +1 -1
  248. package/lib/utils/columnsSplit.js +1 -1
  249. package/lib/utils/dataMapping.js +1 -1
  250. package/lib/utils/date.js +1 -1
  251. package/lib/utils/debug.d.ts +3 -0
  252. package/lib/utils/debug.js +27 -5
  253. package/lib/utils/dom.js +1 -1
  254. package/lib/utils/errors.js +1 -1
  255. package/lib/utils/escapeHtml.js +1 -1
  256. package/lib/utils/filter-schema.js +7 -5
  257. package/lib/utils/filter.js +12 -2
  258. package/lib/utils/formatDuration.js +1 -1
  259. package/lib/utils/formula.js +2 -2
  260. package/lib/utils/getVariable.js +1 -1
  261. package/lib/utils/grammar.js +1 -1
  262. package/lib/utils/handleAction.js +1 -1
  263. package/lib/utils/helper.d.ts +10 -0
  264. package/lib/utils/helper.js +21 -1
  265. package/lib/utils/highlight.js +1 -1
  266. package/lib/utils/icon.js +1 -1
  267. package/lib/utils/image.js +1 -1
  268. package/lib/utils/isPureVariable.js +1 -1
  269. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  270. package/lib/utils/keyToPath.js +1 -1
  271. package/lib/utils/makeSorter.js +1 -1
  272. package/lib/utils/normalizeLink.js +1 -1
  273. package/lib/utils/normalizeOptions.js +1 -1
  274. package/lib/utils/object.js +1 -1
  275. package/lib/utils/offset.js +1 -1
  276. package/lib/utils/offsetParent.js +1 -1
  277. package/lib/utils/optionValueCompare.js +9 -4
  278. package/lib/utils/position.js +1 -1
  279. package/lib/utils/prettyBytes.d.ts +1 -1
  280. package/lib/utils/prettyBytes.js +5 -4
  281. package/lib/utils/renderer-event.js +1 -1
  282. package/lib/utils/replaceText.js +1 -1
  283. package/lib/utils/resize-sensor.js +1 -1
  284. package/lib/utils/resolveVariable.js +1 -1
  285. package/lib/utils/resolveVariableAndFilter.js +1 -1
  286. package/lib/utils/scrollPosition.js +1 -1
  287. package/lib/utils/string2regExp.js +1 -1
  288. package/lib/utils/stripNumber.js +2 -2
  289. package/lib/utils/style.js +1 -1
  290. package/lib/utils/toNumber.js +1 -1
  291. package/lib/utils/tokenize.js +1 -1
  292. package/lib/utils/tpl-builtin.js +1 -1
  293. package/lib/utils/tpl-lodash.js +1 -1
  294. package/lib/utils/tpl.js +2 -2
  295. package/lib/utils/uncontrollable.js +1 -1
  296. package/lib/utils/validations.js +9 -1
  297. package/package.json +15 -15
@@ -204,7 +204,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
204
204
  getSubStore: () => any;
205
205
  reset: (keepErrors?: boolean) => void;
206
206
  resetValidationStatus: (tag?: string | undefined) => void;
207
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
207
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
208
208
  closeDialog: (result?: any) => void;
209
209
  changeTmpValue: (value: any) => void;
210
210
  changeEmitedValue: (value: any) => void;
@@ -614,7 +614,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
614
614
  getSubStore: () => any;
615
615
  reset: (keepErrors?: boolean) => void;
616
616
  resetValidationStatus: (tag?: string | undefined) => void;
617
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
617
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
618
618
  closeDialog: (result?: any) => void;
619
619
  changeTmpValue: (value: any) => void;
620
620
  changeEmitedValue: (value: any) => void;
@@ -1032,7 +1032,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
1032
1032
  getSubStore: () => any;
1033
1033
  reset: (keepErrors?: boolean) => void;
1034
1034
  resetValidationStatus: (tag?: string | undefined) => void;
1035
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
1035
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
1036
1036
  closeDialog: (result?: any) => void;
1037
1037
  changeTmpValue: (value: any) => void;
1038
1038
  changeEmitedValue: (value: any) => void;
@@ -1442,7 +1442,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
1442
1442
  getSubStore: () => any;
1443
1443
  reset: (keepErrors?: boolean) => void;
1444
1444
  resetValidationStatus: (tag?: string | undefined) => void;
1445
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
1445
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
1446
1446
  closeDialog: (result?: any) => void;
1447
1447
  changeTmpValue: (value: any) => void;
1448
1448
  changeEmitedValue: (value: any) => void;
@@ -1861,7 +1861,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
1861
1861
  getSubStore: () => any;
1862
1862
  reset: (keepErrors?: boolean) => void;
1863
1863
  resetValidationStatus: (tag?: string | undefined) => void;
1864
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
1864
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
1865
1865
  closeDialog: (result?: any) => void;
1866
1866
  changeTmpValue: (value: any) => void;
1867
1867
  changeEmitedValue: (value: any) => void;
@@ -2271,7 +2271,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
2271
2271
  getSubStore: () => any;
2272
2272
  reset: (keepErrors?: boolean) => void;
2273
2273
  resetValidationStatus: (tag?: string | undefined) => void;
2274
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
2274
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
2275
2275
  closeDialog: (result?: any) => void;
2276
2276
  changeTmpValue: (value: any) => void;
2277
2277
  changeEmitedValue: (value: any) => void;
@@ -2685,7 +2685,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
2685
2685
  getSubStore: () => any;
2686
2686
  reset: (keepErrors?: boolean) => void;
2687
2687
  resetValidationStatus: (tag?: string | undefined) => void;
2688
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
2688
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
2689
2689
  closeDialog: (result?: any) => void;
2690
2690
  changeTmpValue: (value: any) => void;
2691
2691
  changeEmitedValue: (value: any) => void;
@@ -3095,7 +3095,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
3095
3095
  getSubStore: () => any;
3096
3096
  reset: (keepErrors?: boolean) => void;
3097
3097
  resetValidationStatus: (tag?: string | undefined) => void;
3098
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
3098
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
3099
3099
  closeDialog: (result?: any) => void;
3100
3100
  changeTmpValue: (value: any) => void;
3101
3101
  changeEmitedValue: (value: any) => void;
@@ -3509,7 +3509,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
3509
3509
  getSubStore: () => any;
3510
3510
  reset: (keepErrors?: boolean) => void;
3511
3511
  resetValidationStatus: (tag?: string | undefined) => void;
3512
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
3512
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
3513
3513
  closeDialog: (result?: any) => void;
3514
3514
  changeTmpValue: (value: any) => void;
3515
3515
  changeEmitedValue: (value: any) => void;
@@ -3919,7 +3919,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
3919
3919
  getSubStore: () => any;
3920
3920
  reset: (keepErrors?: boolean) => void;
3921
3921
  resetValidationStatus: (tag?: string | undefined) => void;
3922
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
3922
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
3923
3923
  closeDialog: (result?: any) => void;
3924
3924
  changeTmpValue: (value: any) => void;
3925
3925
  changeEmitedValue: (value: any) => void;
@@ -4234,7 +4234,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
4234
4234
  setCanAccessSuperData: (value?: boolean) => void;
4235
4235
  deleteValueByName: (name: string) => void;
4236
4236
  getLocalPersistData: () => void;
4237
- setLocalPersistData: () => void;
4237
+ setLocalPersistData: (keys?: string[]) => void;
4238
4238
  clearLocalPersistData: () => void;
4239
4239
  setPersistData: (value?: string) => void;
4240
4240
  clear: (cb?: ((data: any) => void) | undefined) => void;
package/esm/store/form.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -7,6 +7,7 @@ import { __generator, __assign } from 'tslib';
7
7
  import { types, flow, isAlive, getEnv } from 'mobx-state-tree';
8
8
  import debouce from 'lodash/debounce';
9
9
  import toPairs from 'lodash/toPairs';
10
+ import pick from 'lodash/pick';
10
11
  import { ServiceStore } from './service.js';
11
12
  import { ServerError } from '../utils/errors.js';
12
13
  import { isEmpty, difference, mapObject } from '../utils/helper.js';
@@ -583,8 +584,16 @@ var FormStore = ServiceStore.named('FormStore')
583
584
  if (value === void 0) { value = ''; }
584
585
  self.persistData = value;
585
586
  }
586
- var setLocalPersistData = function () {
587
- localStorage.setItem(self.persistKey, JSON.stringify(self.data));
587
+ /**
588
+ * 将表单数据存入本地
589
+ * @param keys 指定只存储某些 key
590
+ */
591
+ var setLocalPersistData = function (keys) {
592
+ var data = self.data;
593
+ if (keys && keys.length) {
594
+ data = pick(data, keys);
595
+ }
596
+ localStorage.setItem(self.persistKey, JSON.stringify(data));
588
597
  };
589
598
  function getLocalPersistData() {
590
599
  var data = localStorage.getItem(self.persistKey);
@@ -121,7 +121,7 @@ export declare const FormItemStore: import("mobx-state-tree").IModelType<{
121
121
  getSubStore: () => any;
122
122
  reset: (keepErrors?: boolean) => void;
123
123
  resetValidationStatus: (tag?: string) => void;
124
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
124
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
125
125
  closeDialog: (result?: any) => void;
126
126
  changeTmpValue: (value: any) => void;
127
127
  changeEmitedValue: (value: any) => void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -20,6 +20,7 @@ import { StoreNode } from './node.js';
20
20
  import { getStoreById } from './manager.js';
21
21
  import { normalizeOptions } from '../utils/normalizeOptions.js';
22
22
  import { optionValueCompare } from '../utils/optionValueCompare.js';
23
+ import { dataMapping } from '../utils/dataMapping.js';
23
24
  import { createObject } from '../utils/object.js';
24
25
 
25
26
  var ErrorDetail = types.model('ErrorDetail', {
@@ -780,9 +781,14 @@ var FormItemStore = StoreNode.named('FormItemStore')
780
781
  self.validated = false;
781
782
  clearError();
782
783
  }
783
- function openDialog(schema, data, callback) {
784
+ function openDialog(schema, ctx, callback) {
785
+ if (schema.data) {
786
+ self.dialogData = dataMapping(schema.data, ctx);
787
+ }
788
+ else {
789
+ self.dialogData = ctx;
790
+ }
784
791
  self.dialogSchema = schema;
785
- self.dialogData = data;
786
792
  self.dialogOpen = true;
787
793
  callback && dialogCallbacks.set(self.dialogData, callback);
788
794
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
package/esm/store/list.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
package/esm/store/node.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
package/esm/store/root.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
6
6
  import { __assign } from 'tslib';
7
7
  import { types } from 'mobx-state-tree';
8
- import { qsparse } from '../utils/helper.js';
8
+ import { parseQuery } from '../utils/helper.js';
9
9
  import { ServiceStore } from './service.js';
10
10
  import { createObject } from '../utils/object.js';
11
11
 
@@ -30,13 +30,7 @@ var RootStore = ServiceStore.named('RootStore')
30
30
  self.runtimeErrorStack = errorStack;
31
31
  },
32
32
  updateLocation: function (location) {
33
- var query = (location && location.query) ||
34
- (location &&
35
- location.search &&
36
- qsparse(location.search.substring(1))) ||
37
- (window.location.search &&
38
- qsparse(window.location.search.substring(1)));
39
- self.query = query;
33
+ self.query = parseQuery(location);
40
34
  },
41
35
  setVisible: function (id, value) {
42
36
  var _a;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -354,7 +354,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
354
354
  clearMessage: () => void;
355
355
  setHasRemoteData: () => void;
356
356
  saveRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
357
- fetchSchema: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>; /** Group单元格包含的首列的索引值,范围[1, columns.length] */
357
+ fetchSchema: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
358
358
  checkRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
359
359
  } & {
360
360
  readonly loading: boolean;
@@ -482,7 +482,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
482
482
  getSubStore: () => any;
483
483
  reset: (keepErrors?: boolean) => void;
484
484
  resetValidationStatus: (tag?: string | undefined) => void;
485
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
485
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
486
486
  closeDialog: (result?: any) => void;
487
487
  changeTmpValue: (value: any) => void;
488
488
  changeEmitedValue: (value: any) => void;
@@ -892,7 +892,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
892
892
  getSubStore: () => any;
893
893
  reset: (keepErrors?: boolean) => void;
894
894
  resetValidationStatus: (tag?: string | undefined) => void;
895
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
895
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
896
896
  closeDialog: (result?: any) => void;
897
897
  changeTmpValue: (value: any) => void;
898
898
  changeEmitedValue: (value: any) => void;
@@ -1306,7 +1306,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
1306
1306
  getSubStore: () => any;
1307
1307
  reset: (keepErrors?: boolean) => void;
1308
1308
  resetValidationStatus: (tag?: string | undefined) => void;
1309
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
1309
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
1310
1310
  closeDialog: (result?: any) => void;
1311
1311
  changeTmpValue: (value: any) => void;
1312
1312
  changeEmitedValue: (value: any) => void;
@@ -1716,7 +1716,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
1716
1716
  getSubStore: () => any;
1717
1717
  reset: (keepErrors?: boolean) => void;
1718
1718
  resetValidationStatus: (tag?: string | undefined) => void;
1719
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
1719
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
1720
1720
  closeDialog: (result?: any) => void;
1721
1721
  changeTmpValue: (value: any) => void;
1722
1722
  changeEmitedValue: (value: any) => void;
@@ -2135,7 +2135,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
2135
2135
  getSubStore: () => any;
2136
2136
  reset: (keepErrors?: boolean) => void;
2137
2137
  resetValidationStatus: (tag?: string | undefined) => void;
2138
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
2138
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
2139
2139
  closeDialog: (result?: any) => void;
2140
2140
  changeTmpValue: (value: any) => void;
2141
2141
  changeEmitedValue: (value: any) => void;
@@ -2545,7 +2545,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
2545
2545
  getSubStore: () => any;
2546
2546
  reset: (keepErrors?: boolean) => void;
2547
2547
  resetValidationStatus: (tag?: string | undefined) => void;
2548
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
2548
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
2549
2549
  closeDialog: (result?: any) => void;
2550
2550
  changeTmpValue: (value: any) => void;
2551
2551
  changeEmitedValue: (value: any) => void;
@@ -2959,7 +2959,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
2959
2959
  getSubStore: () => any;
2960
2960
  reset: (keepErrors?: boolean) => void;
2961
2961
  resetValidationStatus: (tag?: string | undefined) => void;
2962
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
2962
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
2963
2963
  closeDialog: (result?: any) => void;
2964
2964
  changeTmpValue: (value: any) => void;
2965
2965
  changeEmitedValue: (value: any) => void;
@@ -3369,7 +3369,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
3369
3369
  getSubStore: () => any;
3370
3370
  reset: (keepErrors?: boolean) => void;
3371
3371
  resetValidationStatus: (tag?: string | undefined) => void;
3372
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
3372
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
3373
3373
  closeDialog: (result?: any) => void;
3374
3374
  changeTmpValue: (value: any) => void;
3375
3375
  changeEmitedValue: (value: any) => void;
@@ -3783,7 +3783,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
3783
3783
  getSubStore: () => any;
3784
3784
  reset: (keepErrors?: boolean) => void;
3785
3785
  resetValidationStatus: (tag?: string | undefined) => void;
3786
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
3786
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
3787
3787
  closeDialog: (result?: any) => void;
3788
3788
  changeTmpValue: (value: any) => void;
3789
3789
  changeEmitedValue: (value: any) => void;
@@ -4193,7 +4193,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
4193
4193
  getSubStore: () => any;
4194
4194
  reset: (keepErrors?: boolean) => void;
4195
4195
  resetValidationStatus: (tag?: string | undefined) => void;
4196
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
4196
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
4197
4197
  closeDialog: (result?: any) => void;
4198
4198
  changeTmpValue: (value: any) => void;
4199
4199
  changeEmitedValue: (value: any) => void;
@@ -4508,7 +4508,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
4508
4508
  setCanAccessSuperData: (value?: boolean) => void;
4509
4509
  deleteValueByName: (name: string) => void;
4510
4510
  getLocalPersistData: () => void;
4511
- setLocalPersistData: () => void;
4511
+ setLocalPersistData: (keys?: string[] | undefined) => void;
4512
4512
  clearLocalPersistData: () => void;
4513
4513
  setPersistData: (value?: string) => void;
4514
4514
  clear: (cb?: ((data: any) => void) | undefined) => void;
@@ -4595,7 +4595,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
4595
4595
  clearMessage: () => void;
4596
4596
  setHasRemoteData: () => void;
4597
4597
  saveRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
4598
- fetchSchema: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>; /** Group单元格包含的首列的索引值,范围[1, columns.length] */
4598
+ fetchSchema: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
4599
4599
  checkRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
4600
4600
  } & {
4601
4601
  readonly loading: boolean;
@@ -4723,7 +4723,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
4723
4723
  getSubStore: () => any;
4724
4724
  reset: (keepErrors?: boolean) => void;
4725
4725
  resetValidationStatus: (tag?: string | undefined) => void;
4726
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
4726
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
4727
4727
  closeDialog: (result?: any) => void;
4728
4728
  changeTmpValue: (value: any) => void;
4729
4729
  changeEmitedValue: (value: any) => void;
@@ -5133,7 +5133,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
5133
5133
  getSubStore: () => any;
5134
5134
  reset: (keepErrors?: boolean) => void;
5135
5135
  resetValidationStatus: (tag?: string | undefined) => void;
5136
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
5136
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
5137
5137
  closeDialog: (result?: any) => void;
5138
5138
  changeTmpValue: (value: any) => void;
5139
5139
  changeEmitedValue: (value: any) => void;
@@ -5547,7 +5547,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
5547
5547
  getSubStore: () => any;
5548
5548
  reset: (keepErrors?: boolean) => void;
5549
5549
  resetValidationStatus: (tag?: string | undefined) => void;
5550
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
5550
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
5551
5551
  closeDialog: (result?: any) => void;
5552
5552
  changeTmpValue: (value: any) => void;
5553
5553
  changeEmitedValue: (value: any) => void;
@@ -5957,7 +5957,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
5957
5957
  getSubStore: () => any;
5958
5958
  reset: (keepErrors?: boolean) => void;
5959
5959
  resetValidationStatus: (tag?: string | undefined) => void;
5960
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
5960
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
5961
5961
  closeDialog: (result?: any) => void;
5962
5962
  changeTmpValue: (value: any) => void;
5963
5963
  changeEmitedValue: (value: any) => void;
@@ -6376,7 +6376,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
6376
6376
  getSubStore: () => any;
6377
6377
  reset: (keepErrors?: boolean) => void;
6378
6378
  resetValidationStatus: (tag?: string | undefined) => void;
6379
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
6379
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
6380
6380
  closeDialog: (result?: any) => void;
6381
6381
  changeTmpValue: (value: any) => void;
6382
6382
  changeEmitedValue: (value: any) => void;
@@ -6786,7 +6786,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
6786
6786
  getSubStore: () => any;
6787
6787
  reset: (keepErrors?: boolean) => void;
6788
6788
  resetValidationStatus: (tag?: string | undefined) => void;
6789
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
6789
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
6790
6790
  closeDialog: (result?: any) => void;
6791
6791
  changeTmpValue: (value: any) => void;
6792
6792
  changeEmitedValue: (value: any) => void;
@@ -7200,7 +7200,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
7200
7200
  getSubStore: () => any;
7201
7201
  reset: (keepErrors?: boolean) => void;
7202
7202
  resetValidationStatus: (tag?: string | undefined) => void;
7203
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
7203
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
7204
7204
  closeDialog: (result?: any) => void;
7205
7205
  changeTmpValue: (value: any) => void;
7206
7206
  changeEmitedValue: (value: any) => void;
@@ -7610,7 +7610,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
7610
7610
  getSubStore: () => any;
7611
7611
  reset: (keepErrors?: boolean) => void;
7612
7612
  resetValidationStatus: (tag?: string | undefined) => void;
7613
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
7613
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
7614
7614
  closeDialog: (result?: any) => void;
7615
7615
  changeTmpValue: (value: any) => void;
7616
7616
  changeEmitedValue: (value: any) => void;
@@ -8024,7 +8024,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
8024
8024
  getSubStore: () => any;
8025
8025
  reset: (keepErrors?: boolean) => void;
8026
8026
  resetValidationStatus: (tag?: string | undefined) => void;
8027
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
8027
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
8028
8028
  closeDialog: (result?: any) => void;
8029
8029
  changeTmpValue: (value: any) => void;
8030
8030
  changeEmitedValue: (value: any) => void;
@@ -8434,7 +8434,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
8434
8434
  getSubStore: () => any;
8435
8435
  reset: (keepErrors?: boolean) => void;
8436
8436
  resetValidationStatus: (tag?: string | undefined) => void;
8437
- openDialog: (schema: any, data: any, callback?: ((ret?: any) => void) | undefined) => void;
8437
+ openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
8438
8438
  closeDialog: (result?: any) => void;
8439
8439
  changeTmpValue: (value: any) => void;
8440
8440
  changeEmitedValue: (value: any) => void;
@@ -8749,7 +8749,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
8749
8749
  setCanAccessSuperData: (value?: boolean) => void;
8750
8750
  deleteValueByName: (name: string) => void;
8751
8751
  getLocalPersistData: () => void;
8752
- setLocalPersistData: () => void;
8752
+ setLocalPersistData: (keys?: string[] | undefined) => void;
8753
8753
  clearLocalPersistData: () => void;
8754
8754
  setPersistData: (value?: string) => void;
8755
8755
  clear: (cb?: ((data: any) => void) | undefined) => void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -230,7 +230,11 @@ var TableStore = iRendererStore
230
230
  })
231
231
  .views(function (self) {
232
232
  function getColumnsExceptBuiltinTypes() {
233
- return self.columns.filter(function (item) { return !/^__/.test(item.type); });
233
+ return self.columns.filter(function (item) {
234
+ /** 排除掉内置的列和不可见的列 */
235
+ return !/^__/.test(item.type) &&
236
+ isVisible(item.pristine, hasVisibleExpression(item.pristine) ? self.data : {});
237
+ });
234
238
  }
235
239
  function getForms() {
236
240
  return self.formsRef.map(function (item) { return ({
@@ -742,6 +746,8 @@ var TableStore = iRendererStore
742
746
  function initRows(rows, getEntryId, reUseRow) {
743
747
  self.selectedRows.clear();
744
748
  // self.expandedRows.clear();
749
+ /* 避免输入内容为非数组挂掉 */
750
+ rows = !Array.isArray(rows) ? [] : rows;
745
751
  var arr = rows.map(function (item, index) {
746
752
  var _a;
747
753
  if (!isObject(item)) {
@@ -139,6 +139,8 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
139
139
  pageNo: import("mobx-state-tree").IType<number | undefined, number, number>;
140
140
  pageSize: import("mobx-state-tree").IType<number | undefined, number, number>;
141
141
  dragging: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
142
+ keepItemSelectionOnPageChange: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
143
+ maxKeepItemSelectionLength: import("mobx-state-tree").IType<number | undefined, number, number>;
142
144
  }, {
143
145
  readonly parentStore: any;
144
146
  readonly __: any;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -148,7 +148,9 @@ var TableStore2 = ServiceStore.named('TableStore2')
148
148
  query: types.optional(types.frozen(), {}),
149
149
  pageNo: 1,
150
150
  pageSize: 10,
151
- dragging: false
151
+ dragging: false,
152
+ keepItemSelectionOnPageChange: false,
153
+ maxKeepItemSelectionLength: 0
152
154
  })
153
155
  .views(function (self) {
154
156
  function getToggable() {
@@ -270,6 +272,11 @@ var TableStore2 = ServiceStore.named('TableStore2')
270
272
  if (typeof config.orderBy === 'string') {
271
273
  setOrderByInfo(config.orderBy, config.order === 'desc' ? 'desc' : 'asc');
272
274
  }
275
+ config.maxKeepItemSelectionLength !== void 0 &&
276
+ (self.maxKeepItemSelectionLength = config.maxKeepItemSelectionLength);
277
+ config.keepItemSelectionOnPageChange !== void 0 &&
278
+ (self.keepItemSelectionOnPageChange =
279
+ config.keepItemSelectionOnPageChange);
273
280
  if (config.columns && Array.isArray(config.columns)) {
274
281
  self.columns.replace(updateColumns(config.columns));
275
282
  }
package/esm/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
package/esm/utils/api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.2.0
2
+ * amis-core v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5