amis-core 3.2.0 → 3.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.d.ts +1 -1
  3. package/esm/RootRenderer.js +3 -3
  4. package/esm/SchemaRenderer.js +5 -2
  5. package/esm/Scoped.d.ts +4 -1
  6. package/esm/Scoped.js +8 -5
  7. package/esm/StatusScoped.js +1 -1
  8. package/esm/WithRootStore.js +1 -1
  9. package/esm/WithStore.js +1 -1
  10. package/esm/actions/Action.d.ts +1 -0
  11. package/esm/actions/Action.js +62 -37
  12. package/esm/actions/AjaxAction.d.ts +6 -8
  13. package/esm/actions/AjaxAction.js +20 -18
  14. package/esm/actions/BreakAction.js +1 -1
  15. package/esm/actions/BroadcastAction.js +1 -1
  16. package/esm/actions/CmptAction.d.ts +1 -2
  17. package/esm/actions/CmptAction.js +46 -31
  18. package/esm/actions/ContinueAction.js +1 -1
  19. package/esm/actions/CopyAction.js +1 -1
  20. package/esm/actions/CustomAction.js +2 -2
  21. package/esm/actions/DialogAction.js +5 -6
  22. package/esm/actions/DrawerAction.js +4 -4
  23. package/esm/actions/EmailAction.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/StatusAction.d.ts +15 -0
  29. package/esm/actions/StatusAction.js +49 -0
  30. package/esm/actions/SwitchAction.js +1 -1
  31. package/esm/actions/ToastAction.js +1 -1
  32. package/esm/actions/index.d.ts +1 -0
  33. package/esm/components/CustomStyle.js +1 -1
  34. package/esm/components/LazyComponent.js +1 -1
  35. package/esm/components/Overlay.js +2 -2
  36. package/esm/components/PopOver.js +2 -2
  37. package/esm/env.js +1 -1
  38. package/esm/envOverwrite.js +1 -1
  39. package/esm/factory.js +2 -2
  40. package/esm/index.d.ts +2 -1
  41. package/esm/index.js +13 -13
  42. package/esm/locale.js +1 -1
  43. package/esm/polyfills.js +1 -1
  44. package/esm/renderers/Form.d.ts +6 -6
  45. package/esm/renderers/Form.js +168 -124
  46. package/esm/renderers/Item.d.ts +42 -66
  47. package/esm/renderers/Item.js +11 -41
  48. package/esm/renderers/Options.js +1 -2
  49. package/esm/renderers/Placeholder.js +1 -1
  50. package/esm/renderers/builtin.js +1 -1
  51. package/esm/renderers/register.js +1 -1
  52. package/esm/renderers/wrapControl.js +101 -47
  53. package/esm/store/app.js +8 -4
  54. package/esm/store/combo.d.ts +444 -1912
  55. package/esm/store/combo.js +9 -2
  56. package/esm/store/crud.d.ts +1 -0
  57. package/esm/store/crud.js +11 -5
  58. package/esm/store/form.d.ts +132 -892
  59. package/esm/store/form.js +83 -81
  60. package/esm/store/formItem.d.ts +5 -2
  61. package/esm/store/formItem.js +13 -2
  62. package/esm/store/iRenderer.js +2 -2
  63. package/esm/store/index.js +1 -1
  64. package/esm/store/list.js +1 -1
  65. package/esm/store/manager.js +1 -1
  66. package/esm/store/modal.js +1 -1
  67. package/esm/store/node.js +1 -1
  68. package/esm/store/pagination.js +1 -1
  69. package/esm/store/root.js +2 -2
  70. package/esm/store/service.js +4 -4
  71. package/esm/store/status.js +1 -1
  72. package/esm/store/table.d.ts +503 -2040
  73. package/esm/store/table.js +79 -55
  74. package/esm/store/table2.d.ts +49 -0
  75. package/esm/store/table2.js +37 -4
  76. package/esm/theme.js +1 -1
  77. package/esm/types.d.ts +17 -3
  78. package/esm/utils/Animation.js +1 -1
  79. package/esm/utils/ColorScale.js +1 -1
  80. package/esm/utils/DataSchema.js +1 -1
  81. package/esm/utils/DataScope.js +1 -1
  82. package/esm/utils/RootClose.js +1 -1
  83. package/esm/utils/SimpleMap.js +1 -1
  84. package/esm/utils/api.d.ts +2 -2
  85. package/esm/utils/api.js +113 -81
  86. package/esm/utils/arraySlice.js +1 -1
  87. package/esm/utils/attachmentAdpator.js +1 -1
  88. package/esm/utils/autobind.js +1 -1
  89. package/esm/utils/columnsSplit.js +1 -1
  90. package/esm/utils/dataMapping.js +4 -2
  91. package/esm/utils/date.js +1 -1
  92. package/esm/utils/debug.d.ts +2 -0
  93. package/esm/utils/debug.js +34 -7
  94. package/esm/utils/decodeEntity.js +1 -1
  95. package/esm/utils/dom.js +1 -1
  96. package/esm/utils/errors.js +1 -1
  97. package/esm/utils/escapeHtml.js +1 -1
  98. package/esm/utils/filter-schema.js +1 -1
  99. package/esm/utils/filter.js +1 -1
  100. package/esm/utils/formatDuration.js +1 -1
  101. package/esm/utils/formula.d.ts +0 -1
  102. package/esm/utils/formula.js +6 -9
  103. package/esm/utils/getVariable.js +1 -1
  104. package/esm/utils/grammar.js +1 -1
  105. package/esm/utils/handleAction.js +1 -1
  106. package/esm/utils/helper.d.ts +11 -1
  107. package/esm/utils/helper.js +14 -2
  108. package/esm/utils/highlight.js +1 -1
  109. package/esm/utils/icon.d.ts +4 -2
  110. package/esm/utils/icon.js +3 -2
  111. package/esm/utils/image.js +1 -1
  112. package/esm/utils/index.d.ts +1 -0
  113. package/esm/utils/isPureVariable.js +1 -1
  114. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  115. package/esm/utils/keyToPath.js +1 -1
  116. package/esm/utils/makeSorter.js +1 -1
  117. package/esm/utils/math.d.ts +3 -0
  118. package/esm/utils/math.js +52 -0
  119. package/esm/utils/memoryParse.js +1 -1
  120. package/esm/utils/normalizeLink.js +1 -1
  121. package/esm/utils/normalizeOptions.js +1 -1
  122. package/esm/utils/object.d.ts +7 -0
  123. package/esm/utils/object.js +13 -2
  124. package/esm/utils/offset.js +1 -1
  125. package/esm/utils/offsetParent.js +1 -1
  126. package/esm/utils/optionValueCompare.js +2 -2
  127. package/esm/utils/position.js +1 -1
  128. package/esm/utils/prettyBytes.js +1 -1
  129. package/esm/utils/renderer-event.d.ts +1 -1
  130. package/esm/utils/renderer-event.js +14 -6
  131. package/esm/utils/replaceText.js +1 -1
  132. package/esm/utils/resize-sensor.js +1 -1
  133. package/esm/utils/resolveCondition.js +1 -1
  134. package/esm/utils/resolveVariable.js +1 -1
  135. package/esm/utils/resolveVariableAndFilter.js +1 -1
  136. package/esm/utils/resolveVariableAndFilterForAsync.js +1 -1
  137. package/esm/utils/scrollPosition.js +1 -1
  138. package/esm/utils/string2regExp.js +1 -1
  139. package/esm/utils/stripNumber.js +1 -1
  140. package/esm/utils/style-helper.js +1 -1
  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 +1 -1
  147. package/esm/utils/uncontrollable.js +1 -1
  148. package/esm/utils/validations.js +1 -1
  149. package/lib/Root.js +10 -7
  150. package/lib/RootRenderer.d.ts +1 -1
  151. package/lib/RootRenderer.js +11 -8
  152. package/lib/SchemaRenderer.js +12 -6
  153. package/lib/Scoped.d.ts +4 -1
  154. package/lib/Scoped.js +18 -13
  155. package/lib/StatusScoped.js +5 -2
  156. package/lib/WithRootStore.js +5 -2
  157. package/lib/WithStore.js +5 -2
  158. package/lib/actions/Action.d.ts +1 -0
  159. package/lib/actions/Action.js +62 -37
  160. package/lib/actions/AjaxAction.d.ts +6 -8
  161. package/lib/actions/AjaxAction.js +20 -18
  162. package/lib/actions/BreakAction.js +1 -1
  163. package/lib/actions/BroadcastAction.js +1 -1
  164. package/lib/actions/CmptAction.d.ts +1 -2
  165. package/lib/actions/CmptAction.js +46 -31
  166. package/lib/actions/ContinueAction.js +1 -1
  167. package/lib/actions/CopyAction.js +1 -1
  168. package/lib/actions/CustomAction.js +8 -5
  169. package/lib/actions/DialogAction.js +5 -6
  170. package/lib/actions/DrawerAction.js +4 -4
  171. package/lib/actions/EmailAction.js +1 -1
  172. package/lib/actions/LinkAction.js +1 -1
  173. package/lib/actions/LoopAction.js +1 -1
  174. package/lib/actions/PageAction.js +1 -1
  175. package/lib/actions/ParallelAction.js +1 -1
  176. package/lib/actions/StatusAction.d.ts +15 -0
  177. package/lib/actions/StatusAction.js +53 -0
  178. package/lib/actions/SwitchAction.js +1 -1
  179. package/lib/actions/ToastAction.js +1 -1
  180. package/lib/actions/index.d.ts +1 -0
  181. package/lib/components/CustomStyle.js +1 -1
  182. package/lib/components/LazyComponent.js +12 -14
  183. package/lib/components/Overlay.js +14 -14
  184. package/lib/components/PopOver.js +11 -10
  185. package/lib/env.js +4 -1
  186. package/lib/envOverwrite.js +1 -1
  187. package/lib/factory.js +11 -9
  188. package/lib/index.d.ts +2 -1
  189. package/lib/index.js +21 -19
  190. package/lib/locale.js +6 -3
  191. package/lib/polyfills.js +1 -1
  192. package/lib/renderers/Form.d.ts +6 -6
  193. package/lib/renderers/Form.js +180 -131
  194. package/lib/renderers/Item.d.ts +42 -66
  195. package/lib/renderers/Item.js +51 -75
  196. package/lib/renderers/Options.js +10 -5
  197. package/lib/renderers/Placeholder.js +1 -1
  198. package/lib/renderers/builtin.js +1 -1
  199. package/lib/renderers/register.js +1 -1
  200. package/lib/renderers/wrapControl.js +104 -47
  201. package/lib/store/app.js +14 -7
  202. package/lib/store/combo.d.ts +444 -1912
  203. package/lib/store/combo.js +9 -2
  204. package/lib/store/crud.d.ts +1 -0
  205. package/lib/store/crud.js +11 -5
  206. package/lib/store/form.d.ts +132 -892
  207. package/lib/store/form.js +81 -79
  208. package/lib/store/formItem.d.ts +5 -2
  209. package/lib/store/formItem.js +13 -2
  210. package/lib/store/iRenderer.js +8 -5
  211. package/lib/store/index.js +1 -1
  212. package/lib/store/list.js +1 -1
  213. package/lib/store/manager.js +1 -1
  214. package/lib/store/modal.js +1 -1
  215. package/lib/store/node.js +1 -1
  216. package/lib/store/pagination.js +1 -1
  217. package/lib/store/root.js +8 -5
  218. package/lib/store/service.js +4 -4
  219. package/lib/store/status.js +1 -1
  220. package/lib/store/table.d.ts +503 -2040
  221. package/lib/store/table.js +79 -55
  222. package/lib/store/table2.d.ts +49 -0
  223. package/lib/store/table2.js +36 -3
  224. package/lib/theme.js +6 -3
  225. package/lib/types.d.ts +17 -3
  226. package/lib/utils/Animation.js +1 -1
  227. package/lib/utils/ColorScale.js +1 -1
  228. package/lib/utils/DataSchema.js +1 -1
  229. package/lib/utils/DataScope.js +1 -1
  230. package/lib/utils/RootClose.js +1 -1
  231. package/lib/utils/SimpleMap.js +1 -1
  232. package/lib/utils/api.d.ts +2 -2
  233. package/lib/utils/api.js +113 -81
  234. package/lib/utils/arraySlice.js +1 -1
  235. package/lib/utils/attachmentAdpator.js +1 -1
  236. package/lib/utils/autobind.js +1 -1
  237. package/lib/utils/columnsSplit.js +8 -6
  238. package/lib/utils/dataMapping.js +4 -2
  239. package/lib/utils/date.js +1 -1
  240. package/lib/utils/debug.d.ts +2 -0
  241. package/lib/utils/debug.js +61 -33
  242. package/lib/utils/decodeEntity.js +1 -1
  243. package/lib/utils/dom.js +7 -5
  244. package/lib/utils/errors.js +1 -1
  245. package/lib/utils/escapeHtml.js +1 -1
  246. package/lib/utils/filter-schema.js +1 -1
  247. package/lib/utils/filter.js +1 -1
  248. package/lib/utils/formatDuration.js +1 -1
  249. package/lib/utils/formula.d.ts +0 -1
  250. package/lib/utils/formula.js +6 -10
  251. package/lib/utils/getVariable.js +1 -1
  252. package/lib/utils/grammar.js +1 -1
  253. package/lib/utils/handleAction.js +1 -1
  254. package/lib/utils/helper.d.ts +11 -1
  255. package/lib/utils/helper.js +14 -1
  256. package/lib/utils/highlight.js +8 -9
  257. package/lib/utils/icon.d.ts +4 -2
  258. package/lib/utils/icon.js +12 -10
  259. package/lib/utils/image.js +1 -1
  260. package/lib/utils/index.d.ts +1 -0
  261. package/lib/utils/isPureVariable.js +1 -1
  262. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  263. package/lib/utils/keyToPath.js +1 -1
  264. package/lib/utils/makeSorter.js +1 -1
  265. package/lib/utils/math.d.ts +3 -0
  266. package/lib/utils/math.js +58 -0
  267. package/lib/utils/memoryParse.js +1 -1
  268. package/lib/utils/normalizeLink.js +1 -1
  269. package/lib/utils/normalizeOptions.js +1 -1
  270. package/lib/utils/object.d.ts +7 -0
  271. package/lib/utils/object.js +13 -1
  272. package/lib/utils/offset.js +1 -1
  273. package/lib/utils/offsetParent.js +1 -1
  274. package/lib/utils/optionValueCompare.js +7 -3
  275. package/lib/utils/position.js +1 -1
  276. package/lib/utils/prettyBytes.js +1 -1
  277. package/lib/utils/renderer-event.d.ts +1 -1
  278. package/lib/utils/renderer-event.js +13 -5
  279. package/lib/utils/replaceText.js +1 -1
  280. package/lib/utils/resize-sensor.js +1 -1
  281. package/lib/utils/resolveCondition.js +1 -1
  282. package/lib/utils/resolveVariable.js +1 -1
  283. package/lib/utils/resolveVariableAndFilter.js +1 -1
  284. package/lib/utils/resolveVariableAndFilterForAsync.js +1 -1
  285. package/lib/utils/scrollPosition.js +1 -1
  286. package/lib/utils/string2regExp.js +1 -1
  287. package/lib/utils/stripNumber.js +1 -1
  288. package/lib/utils/style-helper.js +1 -1
  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 +1 -1
  295. package/lib/utils/uncontrollable.js +1 -1
  296. package/lib/utils/validations.js +1 -1
  297. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -36,6 +36,9 @@ var difference__default = /*#__PURE__*/_interopDefaultLegacy(difference);
36
36
  var omit__default = /*#__PURE__*/_interopDefaultLegacy(omit);
37
37
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
38
 
39
+ var __react_jsx__ = require('react');
40
+ var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
41
+ (__react_jsx__["default"] || __react_jsx__).Fragment;
39
42
  var RENDERER_TRANSMISSION_OMIT_PROPS = [
40
43
  'type',
41
44
  'name',
@@ -51,6 +54,8 @@ var RENDERER_TRANSMISSION_OMIT_PROPS = [
51
54
  'hiddenOn',
52
55
  'disabled',
53
56
  'disabledOn',
57
+ 'static',
58
+ 'staticOn',
54
59
  'component',
55
60
  'detectField',
56
61
  'defaultValue',
@@ -64,7 +69,8 @@ var RENDERER_TRANSMISSION_OMIT_PROPS = [
64
69
  'inputOnly',
65
70
  'label',
66
71
  'renderLabel',
67
- 'trackExpression'
72
+ 'trackExpression',
73
+ 'editorSetting'
68
74
  ];
69
75
  var componentCache = new SimpleMap.SimpleMap();
70
76
  var SchemaRenderer = /** @class */ (function (_super) {
@@ -251,7 +257,7 @@ var SchemaRenderer = /** @class */ (function (_super) {
251
257
  defaultActiveKey_1 = schema.activeKey, propKey_1 = schema.key, restSchema_1 = tslib.__rest(schema, ["data", "value", "activeKey", "key"]);
252
258
  return rest.invisible
253
259
  ? null
254
- : React__default["default"].createElement(schema.component, tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, rest), restSchema_1), exprProps), {
260
+ : _J$X_(schema.component, tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, rest), restSchema_1), exprProps), {
255
261
  // value: defaultValue, // 备注: 此处并没有将value传递给渲染器
256
262
  defaultData: defaultData_1, defaultValue: defaultValue_1, defaultActiveKey: defaultActiveKey_1, propKey: propKey_1, $path: $path, $schema: schema, ref: isSFC ? undefined : this.refFn, forwardedRef: isSFC ? this.refFn : undefined, render: this.renderChild, rootStore: rootStore, statusStore: statusStore, dispatchEvent: this.dispatchEvent }));
257
263
  }
@@ -259,7 +265,7 @@ var SchemaRenderer = /** @class */ (function (_super) {
259
265
  return null;
260
266
  }
261
267
  else if (!this.renderer) {
262
- return rest.invisible ? null : (React__default["default"].createElement(LazyComponent["default"], tslib.__assign({}, rest, exprProps, { getComponent: function () { return tslib.__awaiter(_this, void 0, void 0, function () {
268
+ return rest.invisible ? null : (_J$X_(LazyComponent["default"], tslib.__assign({}, rest, exprProps, { getComponent: function () { return tslib.__awaiter(_this, void 0, void 0, function () {
263
269
  var result;
264
270
  return tslib.__generator(this, function (_a) {
265
271
  switch (_a.label) {
@@ -332,8 +338,8 @@ var SchemaRenderer = /** @class */ (function (_super) {
332
338
  finally { if (e_1) throw e_1.error; }
333
339
  }
334
340
  }
335
- var component = isClassComponent ? (React__default["default"].createElement(Component, tslib.__assign({}, props, { ref: this.childRef }))) : (React__default["default"].createElement(Component, tslib.__assign({}, props)));
336
- return this.props.env.enableAMISDebug ? (React__default["default"].createElement(debug.DebugWrapper, { renderer: renderer }, component)) : (component);
341
+ var component = isClassComponent ? (_J$X_(Component, tslib.__assign({}, props, { ref: this.childRef }))) : (_J$X_(Component, tslib.__assign({}, props)));
342
+ return this.props.env.enableAMISDebug ? (_J$X_(debug.DebugWrapper, { renderer: renderer }, component)) : (component);
337
343
  };
338
344
  SchemaRenderer.displayName = 'Renderer';
339
345
  SchemaRenderer.contextType = Scoped.ScopedContext;
package/lib/Scoped.d.ts CHANGED
@@ -22,6 +22,8 @@ export interface ScopedComponentType extends React.Component<RendererProps> {
22
22
  setData?: (value?: object, replace?: boolean, index?: number) => void;
23
23
  }
24
24
  export interface IScopedContext {
25
+ rendererType?: string;
26
+ component?: ScopedComponentType;
25
27
  parent?: AliasIScopedContext;
26
28
  children?: AliasIScopedContext[];
27
29
  registerComponent: (component: ScopedComponentType) => void;
@@ -33,13 +35,14 @@ export interface IScopedContext {
33
35
  send: (target: string, ctx: RendererData) => void;
34
36
  close: (target: string) => void;
35
37
  closeById: (target: string) => void;
38
+ getComponentsByRefPath: (session: string, path: string) => ScopedComponentType[];
36
39
  }
37
40
  type AliasIScopedContext = IScopedContext;
38
41
  export declare const ScopedContext: React.Context<IScopedContext>;
39
42
  export declare function HocScoped<T extends {
40
43
  $path?: string;
41
44
  env: RendererEnv;
42
- }>(ComposedComponent: React.ComponentType<T>): React.ComponentType<T & {
45
+ }>(ComposedComponent: React.ComponentType<T>, rendererType?: string): React.ComponentType<T & {
43
46
  scopeRef?: (ref: any) => void;
44
47
  }> & {
45
48
  ComposedComponent: React.ComponentType<T>;
package/lib/Scoped.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -22,24 +22,27 @@ require('./utils/filter.js');
22
22
  var helper = require('./utils/helper.js');
23
23
  require('./utils/api.js');
24
24
  require('./utils/ColorScale.js');
25
- require('lodash/chunk');
25
+ require('./utils/columnsSplit.js');
26
26
  require('./utils/DataSchema.js');
27
27
  require('./utils/DataScope.js');
28
28
  require('./utils/debug.js');
29
- require('react-dom');
29
+ require('./utils/dom.js');
30
30
  require('./utils/errors.js');
31
31
  var tpl = require('./utils/tpl.js');
32
32
  require('classnames');
33
33
  require('lodash/isObject');
34
34
  require('lodash/isString');
35
35
  require('lodash/isBoolean');
36
- require('lodash');
36
+ require('./utils/highlight.js');
37
+ require('./utils/icon.js');
37
38
  require('./utils/image.js');
39
+ require('lodash/isEqual');
38
40
  require('./actions/Action.js');
39
41
  require('lodash/debounce');
40
42
  require('lodash/cloneDeep');
41
43
  require('./utils/resize-sensor.js');
42
44
  require('react-overlays/useRootClose');
45
+ require('react-dom');
43
46
  require('./utils/SimpleMap.js');
44
47
  require('lodash/mapValues');
45
48
  require('lodash/camelCase');
@@ -56,10 +59,9 @@ var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
56
59
  var values__default = /*#__PURE__*/_interopDefaultLegacy(values);
57
60
  var hoistNonReactStatic__default = /*#__PURE__*/_interopDefaultLegacy(hoistNonReactStatic);
58
61
 
59
- /**
60
- * @file 用来创建一个域,在这个域里面会把里面的运行时实例注册进来,方便组件之间的通信。
61
- * @author fex
62
- */
62
+ var __react_jsx__ = require('react');
63
+ var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
64
+ (__react_jsx__["default"] || __react_jsx__).Fragment;
63
65
  /**
64
66
  * target 里面可能包含 ?xxx=xxx,这种情况下,需要把 ?xxx=xxx 保留下来,然后对前面的部分进行 filter
65
67
  * 因为后面会对 query 部分做不一样的处理。会保留原始的值。而不是会转成字符串。
@@ -76,13 +78,16 @@ function filterTarget(target, data) {
76
78
  }
77
79
  var rootScopedContext = createScopedTools('');
78
80
  var ScopedContext = React__default["default"].createContext(rootScopedContext);
79
- function createScopedTools(path, parent, env) {
81
+ function createScopedTools(path, parent, env, rendererType) {
80
82
  var components = [];
81
83
  var self = {
84
+ rendererType: rendererType,
85
+ component: undefined,
82
86
  parent: parent,
83
87
  registerComponent: function (component) {
84
88
  // 不要把自己注册在自己的 Scoped 上,自己的 Scoped 是给子节点们注册的。
85
89
  if (component.props.$path === path && parent) {
90
+ self.component = component;
86
91
  return parent.registerComponent(component);
87
92
  }
88
93
  if (!~components.indexOf(component)) {
@@ -346,12 +351,12 @@ function closeDialog(component) {
346
351
  .forEach(closeDialog);
347
352
  component.props.onClose && component.props.onClose();
348
353
  }
349
- function HocScoped(ComposedComponent) {
354
+ function HocScoped(ComposedComponent, rendererType) {
350
355
  var ScopedComponent = /** @class */ (function (_super) {
351
356
  tslib.__extends(ScopedComponent, _super);
352
357
  function ScopedComponent(props, context) {
353
358
  var _this = _super.call(this, props) || this;
354
- _this.scoped = createScopedTools(_this.props.$path, context, _this.props.env);
359
+ _this.scoped = createScopedTools(_this.props.$path, context, _this.props.env, rendererType);
355
360
  var scopeRef = props.scopeRef;
356
361
  scopeRef && scopeRef(_this.scoped);
357
362
  return _this;
@@ -372,8 +377,8 @@ function HocScoped(ComposedComponent) {
372
377
  };
373
378
  ScopedComponent.prototype.render = function () {
374
379
  var _a = this.props; _a.scopeRef; var rest = tslib.__rest(_a, ["scopeRef"]);
375
- return (React__default["default"].createElement(ScopedContext.Provider, { value: this.scoped },
376
- React__default["default"].createElement(ComposedComponent, tslib.__assign({}, rest /* todo */, { ref: this.childRef }))));
380
+ return (_J$X_(ScopedContext.Provider, { value: this.scoped },
381
+ _J$X_(ComposedComponent, tslib.__assign({}, rest /* todo */, { ref: this.childRef }))));
377
382
  };
378
383
  ScopedComponent.displayName = "Scoped(".concat(ComposedComponent.displayName || ComposedComponent.name, ")");
379
384
  ScopedComponent.contextType = ScopedContext;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -18,6 +18,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
18
18
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
19
  var hoistNonReactStatic__default = /*#__PURE__*/_interopDefaultLegacy(hoistNonReactStatic);
20
20
 
21
+ var __react_jsx__ = require('react');
22
+ var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
23
+ (__react_jsx__["default"] || __react_jsx__).Fragment;
21
24
  function StatusScoped(ComposedComponent) {
22
25
  var _a;
23
26
  var result = hoistNonReactStatic__default["default"]((_a = /** @class */ (function (_super) {
@@ -50,7 +53,7 @@ function StatusScoped(ComposedComponent) {
50
53
  var refConfig = ((_a = ComposedComponent.prototype) === null || _a === void 0 ? void 0 : _a.isReactComponent)
51
54
  ? { ref: this.childRef }
52
55
  : { forwardedRef: this.childRef };
53
- return (React__default["default"].createElement(ComposedComponent, tslib.__assign({}, this.props, injectedProps, refConfig)));
56
+ return (_J$X_(ComposedComponent, tslib.__assign({}, this.props, injectedProps, refConfig)));
54
57
  };
55
58
  return class_1;
56
59
  }(React__default["default"].Component)),
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -16,6 +16,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
16
16
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
17
  var hoistNonReactStatic__default = /*#__PURE__*/_interopDefaultLegacy(hoistNonReactStatic);
18
18
 
19
+ var __react_jsx__ = require('react');
20
+ var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
21
+ (__react_jsx__["default"] || __react_jsx__).Fragment;
19
22
  var RootStoreContext = React__default["default"].createContext(undefined);
20
23
  function withRootStore(ComposedComponent) {
21
24
  var _a;
@@ -37,7 +40,7 @@ function withRootStore(ComposedComponent) {
37
40
  var injectedProps = {
38
41
  rootStore: rootStore
39
42
  };
40
- return (React__default["default"].createElement(ComposedComponent, tslib.__assign({}, this.props, injectedProps, { ref: this.refFn })));
43
+ return (_J$X_(ComposedComponent, tslib.__assign({}, this.props, injectedProps, { ref: this.refFn })));
41
44
  };
42
45
  return class_1;
43
46
  }(React__default["default"].Component)),
package/lib/WithStore.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -28,6 +28,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
28
28
  var hoistNonReactStatic__default = /*#__PURE__*/_interopDefaultLegacy(hoistNonReactStatic);
29
29
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
30
 
31
+ var __react_jsx__ = require('react');
32
+ var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
33
+ (__react_jsx__["default"] || __react_jsx__).Fragment;
31
34
  function HocStoreFactory(renderer) {
32
35
  return function (Component) {
33
36
  var StoreFactory = /** @class */ (function (_super) {
@@ -182,7 +185,7 @@ function HocStoreFactory(renderer) {
182
185
  if (this.state.hidden || this.state.visible === false) {
183
186
  return null;
184
187
  }
185
- return (React__default["default"].createElement(Component, tslib.__assign({}, rest /* todo */, this.state, { ref: this.refFn, data: this.store.data, dataUpdatedAt: this.store.updatedAt, store: this.store, scope: this.store.data, render: this.renderChild })));
188
+ return (_J$X_(Component, tslib.__assign({}, rest /* todo */, this.state, { ref: this.refFn, data: this.store.data, dataUpdatedAt: this.store.updatedAt, store: this.store, scope: this.store.data, render: this.renderChild })));
186
189
  };
187
190
  StoreFactory.displayName = "WithStore(".concat(Component.displayName || Component.name, ")");
188
191
  StoreFactory.ComposedComponent = Component;
@@ -25,6 +25,7 @@ export interface ListenerAction {
25
25
  stopPropagation?: boolean;
26
26
  expression?: string | ConditionGroupValue;
27
27
  execOn?: string;
28
+ [propName: string]: any;
28
29
  }
29
30
  export interface ILogicAction extends ListenerAction {
30
31
  children?: ListenerAction[];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -125,11 +125,20 @@ var runActions = function (actions, renderer, event) { return tslib.__awaiter(vo
125
125
  // 如果存在指定组件ID,说明是组件专有动作
126
126
  if (!actionInstrance &&
127
127
  (actionConfig.componentId || actionConfig.componentName)) {
128
- actionInstrance = getActionByType('component');
128
+ actionInstrance = [
129
+ 'static',
130
+ 'nonstatic',
131
+ 'show',
132
+ 'visibility',
133
+ 'hidden',
134
+ 'enabled',
135
+ 'disabled',
136
+ 'usability'
137
+ ].includes(actionConfig.actionType)
138
+ ? getActionByType('status')
139
+ : getActionByType('component');
129
140
  }
130
- else if (actionConfig.actionType === 'url' ||
131
- actionConfig.actionType === 'link' ||
132
- actionConfig.actionType === 'jump') {
141
+ else if (['url', 'link', 'jump'].includes(actionConfig.actionType)) {
133
142
  // 打开页面动作
134
143
  actionInstrance = getActionByType('openlink');
135
144
  }
@@ -166,14 +175,16 @@ var runActions = function (actions, renderer, event) { return tslib.__awaiter(vo
166
175
  }); };
167
176
  // 执行动作,与原有动作处理打通
168
177
  var runAction = function (actionInstrance, actionConfig, renderer, event) { return tslib.__awaiter(void 0, void 0, void 0, function () {
169
- var additional, mergeData, expression, isStop, preventDefault, key, args, afterMappingData, actionData, data, stopped, actionResult, stopPropagation;
170
- var _a, _b, _c;
171
- return tslib.__generator(this, function (_d) {
172
- switch (_d.label) {
178
+ var additional, action, mergeData, expression, isStop, preventDefault, key, api, args, afterMappingData, actionData, data, stopped, actionResult, stopPropagation;
179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
180
+ return tslib.__generator(this, function (_u) {
181
+ switch (_u.label) {
173
182
  case 0:
174
183
  additional = {
175
184
  event: event
176
185
  };
186
+ action = tslib.__assign({}, actionConfig);
187
+ action.args = tslib.__assign({}, actionConfig.args);
177
188
  // __rendererData默认为renderer.props.data,兼容表单项值变化时的data读取
178
189
  if (!event.data.__rendererData) {
179
190
  additional = {
@@ -184,29 +195,47 @@ var runAction = function (actionInstrance, actionConfig, renderer, event) { retu
184
195
  mergeData = object.createObject(object.createObject(renderer.props.data.__super
185
196
  ? object.createObject(renderer.props.data.__super, additional)
186
197
  : additional, renderer.props.data), event.data);
187
- expression = (_a = actionConfig.expression) !== null && _a !== void 0 ? _a : actionConfig.execOn;
198
+ expression = (_a = action.expression) !== null && _a !== void 0 ? _a : action.execOn;
188
199
  isStop = false;
189
200
  if (!expression) return [3 /*break*/, 2];
190
201
  return [4 /*yield*/, tpl.evalExpressionWithConditionBuilder(expression, mergeData, true)];
191
202
  case 1:
192
- isStop = !(_d.sent());
193
- _d.label = 2;
203
+ isStop = !(_u.sent());
204
+ _u.label = 2;
194
205
  case 2:
195
206
  if (isStop) {
196
207
  return [2 /*return*/];
197
208
  }
198
209
  preventDefault = false;
199
- if (!actionConfig.preventDefault) return [3 /*break*/, 4];
200
- return [4 /*yield*/, tpl.evalExpressionWithConditionBuilder(actionConfig.preventDefault, mergeData, false)];
210
+ if (!action.preventDefault) return [3 /*break*/, 4];
211
+ return [4 /*yield*/, tpl.evalExpressionWithConditionBuilder(action.preventDefault, mergeData, false)];
201
212
  case 3:
202
- preventDefault = _d.sent();
203
- _d.label = 4;
213
+ preventDefault = _u.sent();
214
+ _u.label = 4;
204
215
  case 4:
205
216
  key = {
206
- componentId: dataMapping.dataMapping(actionConfig.componentId, mergeData),
207
- componentName: dataMapping.dataMapping(actionConfig.componentName, mergeData)
217
+ componentId: dataMapping.dataMapping(action.componentId, mergeData),
218
+ componentName: dataMapping.dataMapping(action.componentName, mergeData)
208
219
  };
209
- args = dataMapping.dataMapping(actionConfig.args, mergeData, function (key) {
220
+ // 兼容args包裹的用法
221
+ if (action.actionType === 'dialog') {
222
+ action.dialog = tslib.__assign({}, ((_b = action.dialog) !== null && _b !== void 0 ? _b : (_c = action.args) === null || _c === void 0 ? void 0 : _c.dialog));
223
+ (_d = action.args) === null || _d === void 0 ? true : delete _d.dialog;
224
+ }
225
+ else if (action.actionType === 'drawer') {
226
+ action.drawer = tslib.__assign({}, ((_e = action.drawer) !== null && _e !== void 0 ? _e : (_f = action.args) === null || _f === void 0 ? void 0 : _f.drawer));
227
+ (_g = action.args) === null || _g === void 0 ? true : delete _g.drawer;
228
+ }
229
+ else if (action.actionType === 'ajax') {
230
+ api = (_h = action.api) !== null && _h !== void 0 ? _h : (_j = action.args) === null || _j === void 0 ? void 0 : _j.api;
231
+ action.api = typeof api === 'string' ? api : tslib.__assign({}, api);
232
+ action.options = tslib.__assign({}, ((_k = action.options) !== null && _k !== void 0 ? _k : (_l = action.args) === null || _l === void 0 ? void 0 : _l.options));
233
+ action.messages = tslib.__assign({}, ((_m = action.messages) !== null && _m !== void 0 ? _m : (_o = action.args) === null || _o === void 0 ? void 0 : _o.messages));
234
+ (_p = action.args) === null || _p === void 0 ? true : delete _p.api;
235
+ (_q = action.args) === null || _q === void 0 ? true : delete _q.options;
236
+ (_r = action.args) === null || _r === void 0 ? true : delete _r.messages;
237
+ }
238
+ args = dataMapping.dataMapping(action.args, mergeData, function (key) {
210
239
  return [
211
240
  'adaptor',
212
241
  'responseAdaptor',
@@ -215,34 +244,30 @@ var runAction = function (actionInstrance, actionConfig, renderer, event) { retu
215
244
  'condition'
216
245
  ].includes(key);
217
246
  });
218
- afterMappingData = dataMapping.dataMapping(actionConfig.data, mergeData);
247
+ afterMappingData = dataMapping.dataMapping(action.data, mergeData);
219
248
  actionData = args && Object.keys(args).length
220
- ? omit__default["default"](tslib.__assign(tslib.__assign({}, args), (afterMappingData !== null && afterMappingData !== void 0 ? afterMappingData : {})), getOmitActionProp(actionConfig.actionType))
249
+ ? omit__default["default"](tslib.__assign(tslib.__assign({}, args), (afterMappingData !== null && afterMappingData !== void 0 ? afterMappingData : {})), getOmitActionProp(action.actionType))
221
250
  : afterMappingData;
222
- data = args && !Object.keys(args).length && actionConfig.data === undefined // 兼容历史
223
- ? {}
224
- : actionData !== undefined
225
- ? actionData
226
- : event.data;
227
- (_b = console.group) === null || _b === void 0 ? void 0 : _b.call(console, "run action ".concat(actionConfig.actionType));
228
- console.debug("[".concat(actionConfig.actionType, "] action args, data"), args, data);
251
+ data = actionData !== undefined ? actionData : mergeData;
252
+ (_s = console.group) === null || _s === void 0 ? void 0 : _s.call(console, "run action ".concat(action.actionType));
253
+ console.debug("[".concat(action.actionType, "] action args, data"), args, data);
229
254
  stopped = false;
230
- return [4 /*yield*/, actionInstrance.run(tslib.__assign(tslib.__assign(tslib.__assign({}, actionConfig), { args: args, data: data }), key), renderer, event, mergeData)];
255
+ return [4 /*yield*/, actionInstrance.run(tslib.__assign(tslib.__assign(tslib.__assign({}, action), { args: args, data: action.actionType === 'reload' ? actionData : data }), key), renderer, event, mergeData)];
231
256
  case 5:
232
- actionResult = _d.sent();
257
+ actionResult = _u.sent();
233
258
  // 二次确认弹窗如果取消,则终止后续动作
234
- if ((actionConfig === null || actionConfig === void 0 ? void 0 : actionConfig.actionType) === 'confirmDialog' && !actionResult) {
259
+ if ((action === null || action === void 0 ? void 0 : action.actionType) === 'confirmDialog' && !actionResult) {
235
260
  stopped = true;
236
261
  }
237
262
  stopPropagation = false;
238
- if (!actionConfig.stopPropagation) return [3 /*break*/, 7];
239
- return [4 /*yield*/, tpl.evalExpressionWithConditionBuilder(actionConfig.stopPropagation, mergeData, false)];
263
+ if (!action.stopPropagation) return [3 /*break*/, 7];
264
+ return [4 /*yield*/, tpl.evalExpressionWithConditionBuilder(action.stopPropagation, mergeData, false)];
240
265
  case 6:
241
- stopPropagation = _d.sent();
242
- _d.label = 7;
266
+ stopPropagation = _u.sent();
267
+ _u.label = 7;
243
268
  case 7:
244
- console.debug("[".concat(actionConfig.actionType, "] action end event"), event);
245
- (_c = console.groupEnd) === null || _c === void 0 ? void 0 : _c.call(console);
269
+ console.debug("[".concat(action.actionType, "] action end event"), event);
270
+ (_t = console.groupEnd) === null || _t === void 0 ? void 0 : _t.call(console);
246
271
  // 阻止原有动作执行
247
272
  preventDefault && event.preventDefault();
248
273
  // 阻止后续动作执行
@@ -3,15 +3,13 @@ import { RendererEvent } from '../utils/renderer-event';
3
3
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
4
4
  export interface IAjaxAction extends ListenerAction {
5
5
  action: 'ajax';
6
- args: {
7
- api: Api;
8
- messages?: {
9
- success: string;
10
- failed: string;
11
- };
12
- options?: Record<string, any>;
13
- [propName: string]: any;
6
+ api: Api;
7
+ messages?: {
8
+ success: string;
9
+ failed: string;
14
10
  };
11
+ options?: Record<string, any>;
12
+ [propName: string]: any;
15
13
  }
16
14
  /**
17
15
  * 发送请求动作
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -27,39 +27,41 @@ var AjaxAction = /** @class */ (function () {
27
27
  this.fetcherType = fetcherType;
28
28
  }
29
29
  AjaxAction.prototype.run = function (action, renderer, event) {
30
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
30
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
31
31
  return tslib.__awaiter(this, void 0, void 0, function () {
32
- var env, result, responseData, msg, e_1, result;
33
- var _1;
34
- return tslib.__generator(this, function (_2) {
35
- switch (_2.label) {
32
+ var env, silent, messages, result, responseData, msg, e_1, result;
33
+ var _o;
34
+ return tslib.__generator(this, function (_p) {
35
+ switch (_p.label) {
36
36
  case 0:
37
37
  if (!((_a = renderer.props.env) === null || _a === void 0 ? void 0 : _a.fetcher)) {
38
38
  throw new Error('env.fetcher is required!');
39
39
  }
40
40
  if (this.fetcherType === 'download' && action.actionType === 'download') {
41
- if ((_b = action.args) === null || _b === void 0 ? void 0 : _b.api) {
42
- action.args.api.responseType = 'blob';
41
+ if (action.api) {
42
+ action.api.responseType = 'blob';
43
43
  }
44
44
  }
45
45
  env = event.context.env;
46
- _2.label = 1;
46
+ silent = (_b = action === null || action === void 0 ? void 0 : action.options) === null || _b === void 0 ? void 0 : _b.silent;
47
+ messages = (_c = action === null || action === void 0 ? void 0 : action.api) === null || _c === void 0 ? void 0 : _c.messages;
48
+ _p.label = 1;
47
49
  case 1:
48
- _2.trys.push([1, 3, , 4]);
49
- return [4 /*yield*/, env.fetcher((_c = action.args) === null || _c === void 0 ? void 0 : _c.api, (_d = action.data) !== null && _d !== void 0 ? _d : {}, (_f = (_e = action.args) === null || _e === void 0 ? void 0 : _e.options) !== null && _f !== void 0 ? _f : {})];
50
+ _p.trys.push([1, 3, , 4]);
51
+ return [4 /*yield*/, env.fetcher(action === null || action === void 0 ? void 0 : action.api, (_d = action.data) !== null && _d !== void 0 ? _d : {}, (_e = action === null || action === void 0 ? void 0 : action.options) !== null && _e !== void 0 ? _e : {})];
50
52
  case 2:
51
- result = _2.sent();
53
+ result = _p.sent();
52
54
  responseData = !helper.isEmpty(result.data) || result.ok
53
55
  ? api.normalizeApiResponseData(result.data)
54
56
  : null;
55
57
  // 记录请求返回的数据
56
- event.setData(object.createObject(event.data, tslib.__assign(tslib.__assign({}, responseData), (_1 = { responseData: responseData }, _1[action.outputVar || 'responseResult'] = tslib.__assign(tslib.__assign({}, responseData), { responseData: responseData, responseStatus: result.status, responseMsg: result.msg }), _1))));
57
- if (!((_h = (_g = action.args) === null || _g === void 0 ? void 0 : _g.options) === null || _h === void 0 ? void 0 : _h.silent)) {
58
+ event.setData(object.createObject(event.data, tslib.__assign(tslib.__assign({}, responseData), (_o = { responseData: responseData }, _o[action.outputVar || 'responseResult'] = tslib.__assign(tslib.__assign({}, responseData), { responseData: responseData, responseStatus: result.status, responseMsg: result.msg }), _o))));
59
+ if (!silent) {
58
60
  if (!result.ok) {
59
- throw new errors.ServerError((_q = (_m = (_l = (_k = (_j = action.args) === null || _j === void 0 ? void 0 : _j.api) === null || _k === void 0 ? void 0 : _k.messages) === null || _l === void 0 ? void 0 : _l.failed) !== null && _m !== void 0 ? _m : (_p = (_o = action.args) === null || _o === void 0 ? void 0 : _o.messages) === null || _p === void 0 ? void 0 : _p.failed) !== null && _q !== void 0 ? _q : result.msg, result);
61
+ throw new errors.ServerError((_h = (_f = messages === null || messages === void 0 ? void 0 : messages.failed) !== null && _f !== void 0 ? _f : (_g = action.messages) === null || _g === void 0 ? void 0 : _g.failed) !== null && _h !== void 0 ? _h : result.msg, result);
60
62
  }
61
63
  else {
62
- msg = (_y = (_x = (_u = (_t = (_s = (_r = action.args) === null || _r === void 0 ? void 0 : _r.api) === null || _s === void 0 ? void 0 : _s.messages) === null || _t === void 0 ? void 0 : _t.success) !== null && _u !== void 0 ? _u : (_w = (_v = action.args) === null || _v === void 0 ? void 0 : _v.messages) === null || _w === void 0 ? void 0 : _w.success) !== null && _x !== void 0 ? _x : result.msg) !== null && _y !== void 0 ? _y : result.defaultMsg;
64
+ msg = (_m = (_l = (_j = messages === null || messages === void 0 ? void 0 : messages.success) !== null && _j !== void 0 ? _j : (_k = action.messages) === null || _k === void 0 ? void 0 : _k.success) !== null && _l !== void 0 ? _l : result.msg) !== null && _m !== void 0 ? _m : result.defaultMsg;
63
65
  msg &&
64
66
  env.notify('success', msg, result.msgTimeout !== undefined
65
67
  ? {
@@ -71,8 +73,8 @@ var AjaxAction = /** @class */ (function () {
71
73
  }
72
74
  return [2 /*return*/, result.data];
73
75
  case 3:
74
- e_1 = _2.sent();
75
- if (!((_0 = (_z = action.args) === null || _z === void 0 ? void 0 : _z.options) === null || _0 === void 0 ? void 0 : _0.silent)) {
76
+ e_1 = _p.sent();
77
+ if (!silent) {
76
78
  if (e_1.type === 'ServerError') {
77
79
  result = e_1.response;
78
80
  env.notify('error', e_1.message, result.msgTimeout !== undefined
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.2.0
2
+ * amis-core v3.3.0
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,9 +1,8 @@
1
1
  import { RendererEvent } from '../utils/renderer-event';
2
2
  import { RendererAction, ListenerAction, ListenerContext } from './Action';
3
3
  export interface ICmptAction extends ListenerAction {
4
- actionType: 'setValue' | 'static' | 'nonstatic' | 'show' | 'visibility' | 'hidden' | 'enabled' | 'disabled' | 'usability' | 'reload';
4
+ actionType: string;
5
5
  args: {
6
- /** actionType为setValue时,目标变量的path */
7
6
  path?: string;
8
7
  value?: string | {
9
8
  [key: string]: string;