amis-core 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/esm/Root.js +1 -1
  2. package/esm/RootRenderer.js +8 -8
  3. package/esm/SchemaRenderer.js +16 -12
  4. package/esm/Scoped.js +3 -1
  5. package/esm/StatusScoped.js +1 -1
  6. package/esm/WithRootStore.js +1 -1
  7. package/esm/WithStore.js +9 -8
  8. package/esm/actions/Action.js +1 -1
  9. package/esm/actions/AjaxAction.js +2 -2
  10. package/esm/actions/BreakAction.js +1 -1
  11. package/esm/actions/BroadcastAction.js +1 -1
  12. package/esm/actions/CmptAction.js +1 -1
  13. package/esm/actions/ContinueAction.js +1 -1
  14. package/esm/actions/CopyAction.js +1 -1
  15. package/esm/actions/CustomAction.js +3 -1
  16. package/esm/actions/DialogAction.js +1 -1
  17. package/esm/actions/DrawerAction.js +1 -1
  18. package/esm/actions/EmailAction.js +1 -1
  19. package/esm/actions/LinkAction.js +1 -1
  20. package/esm/actions/LoopAction.js +1 -1
  21. package/esm/actions/PageAction.js +1 -1
  22. package/esm/actions/ParallelAction.js +1 -1
  23. package/esm/actions/StatusAction.js +1 -1
  24. package/esm/actions/SwitchAction.js +1 -1
  25. package/esm/actions/ToastAction.js +1 -1
  26. package/esm/components/CustomStyle.d.ts +4 -6
  27. package/esm/components/CustomStyle.js +29 -5
  28. package/esm/components/LazyComponent.d.ts +1 -2
  29. package/esm/components/LazyComponent.js +12 -8
  30. package/esm/components/Overlay.js +3 -1
  31. package/esm/components/PopOver.d.ts +12 -12
  32. package/esm/components/PopOver.js +3 -1
  33. package/esm/env.d.ts +2 -2
  34. package/esm/env.js +1 -1
  35. package/esm/envOverwrite.js +1 -1
  36. package/esm/factory.d.ts +7 -7
  37. package/esm/factory.js +1 -1
  38. package/esm/index.d.ts +1 -0
  39. package/esm/index.js +5 -5
  40. package/esm/locale.d.ts +1 -1
  41. package/esm/locale.js +3 -3
  42. package/esm/polyfills.js +1 -1
  43. package/esm/renderers/Form.d.ts +1 -1
  44. package/esm/renderers/Form.js +10 -8
  45. package/esm/renderers/Item.d.ts +24 -56
  46. package/esm/renderers/Item.js +25 -31
  47. package/esm/renderers/Options.js +14 -12
  48. package/esm/renderers/Placeholder.js +1 -1
  49. package/esm/renderers/builtin.js +1 -1
  50. package/esm/renderers/register.js +1 -1
  51. package/esm/renderers/wrapControl.js +70 -80
  52. package/esm/store/app.js +3 -1
  53. package/esm/store/combo.d.ts +384 -0
  54. package/esm/store/combo.js +1 -1
  55. package/esm/store/crud.js +31 -25
  56. package/esm/store/form.d.ts +160 -0
  57. package/esm/store/form.js +15 -13
  58. package/esm/store/formItem.d.ts +4 -0
  59. package/esm/store/formItem.js +42 -26
  60. package/esm/store/iRenderer.js +3 -1
  61. package/esm/store/index.js +1 -1
  62. package/esm/store/list.js +1 -1
  63. package/esm/store/manager.js +1 -1
  64. package/esm/store/modal.js +1 -1
  65. package/esm/store/node.js +1 -1
  66. package/esm/store/pagination.js +1 -1
  67. package/esm/store/root.d.ts +1 -1
  68. package/esm/store/root.js +12 -5
  69. package/esm/store/service.js +38 -33
  70. package/esm/store/status.js +1 -1
  71. package/esm/store/table.d.ts +760 -21
  72. package/esm/store/table.js +155 -55
  73. package/esm/store/table2.js +11 -8
  74. package/esm/theme.d.ts +18 -31
  75. package/esm/theme.js +1 -1
  76. package/esm/utils/Animation.js +1 -1
  77. package/esm/utils/ColorScale.js +1 -1
  78. package/esm/utils/DataSchema.js +1 -1
  79. package/esm/utils/DataScope.js +1 -1
  80. package/esm/utils/RootClose.js +1 -1
  81. package/esm/utils/SimpleMap.js +1 -1
  82. package/esm/utils/api.d.ts +3 -3
  83. package/esm/utils/api.js +2 -2
  84. package/esm/utils/arraySlice.js +1 -1
  85. package/esm/utils/attachmentAdpator.js +1 -1
  86. package/esm/utils/autobind.js +1 -1
  87. package/esm/utils/columnsSplit.js +1 -1
  88. package/esm/utils/dataMapping.js +1 -1
  89. package/esm/utils/date.js +1 -1
  90. package/esm/utils/debug.d.ts +1 -0
  91. package/esm/utils/debug.js +24 -2
  92. package/esm/utils/decodeEntity.js +1 -1
  93. package/esm/utils/dom.js +1 -1
  94. package/esm/utils/errors.js +1 -1
  95. package/esm/utils/escapeHtml.js +1 -1
  96. package/esm/utils/filter-schema.js +1 -1
  97. package/esm/utils/filter.js +1 -1
  98. package/esm/utils/formatDuration.js +1 -1
  99. package/esm/utils/formula.js +1 -1
  100. package/esm/utils/getVariable.js +1 -1
  101. package/esm/utils/grammar.js +1 -1
  102. package/esm/utils/handleAction.js +1 -1
  103. package/esm/utils/helper.d.ts +13 -1
  104. package/esm/utils/helper.js +99 -5
  105. package/esm/utils/highlight.js +1 -1
  106. package/esm/utils/icon.js +1 -1
  107. package/esm/utils/image.js +1 -1
  108. package/esm/utils/isPureVariable.js +1 -1
  109. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  110. package/esm/utils/keyToPath.d.ts +1 -1
  111. package/esm/utils/keyToPath.js +2 -1
  112. package/esm/utils/makeSorter.js +1 -1
  113. package/esm/utils/math.js +1 -1
  114. package/esm/utils/memoryParse.js +1 -1
  115. package/esm/utils/normalizeLink.js +1 -1
  116. package/esm/utils/normalizeOptions.js +1 -1
  117. package/esm/utils/object.js +1 -1
  118. package/esm/utils/offset.js +1 -1
  119. package/esm/utils/offsetParent.js +1 -1
  120. package/esm/utils/optionValueCompare.js +1 -1
  121. package/esm/utils/position.js +1 -1
  122. package/esm/utils/prettyBytes.js +1 -1
  123. package/esm/utils/renderer-event.js +2 -2
  124. package/esm/utils/replaceText.js +1 -1
  125. package/esm/utils/resize-sensor.d.ts +3 -1
  126. package/esm/utils/resize-sensor.js +34 -22
  127. package/esm/utils/resolveCondition.js +1 -1
  128. package/esm/utils/resolveVariable.js +1 -1
  129. package/esm/utils/resolveVariableAndFilter.js +1 -1
  130. package/esm/utils/resolveVariableAndFilterForAsync.js +1 -1
  131. package/esm/utils/scrollPosition.js +1 -1
  132. package/esm/utils/string2regExp.js +1 -1
  133. package/esm/utils/stripNumber.js +1 -1
  134. package/esm/utils/style-helper.d.ts +22 -14
  135. package/esm/utils/style-helper.js +181 -120
  136. package/esm/utils/style.js +1 -1
  137. package/esm/utils/toNumber.js +1 -1
  138. package/esm/utils/tokenize.js +1 -1
  139. package/esm/utils/tpl-builtin.js +1 -1
  140. package/esm/utils/tpl-lodash.js +1 -1
  141. package/esm/utils/tpl.js +1 -1
  142. package/esm/utils/uncontrollable.js +1 -1
  143. package/esm/utils/validations.js +1 -1
  144. package/lib/Root.js +1 -1
  145. package/lib/RootRenderer.js +8 -8
  146. package/lib/SchemaRenderer.js +16 -12
  147. package/lib/Scoped.js +3 -1
  148. package/lib/StatusScoped.js +1 -1
  149. package/lib/WithRootStore.js +1 -1
  150. package/lib/WithStore.js +9 -8
  151. package/lib/actions/Action.js +1 -1
  152. package/lib/actions/AjaxAction.js +2 -2
  153. package/lib/actions/BreakAction.js +1 -1
  154. package/lib/actions/BroadcastAction.js +1 -1
  155. package/lib/actions/CmptAction.js +1 -1
  156. package/lib/actions/ContinueAction.js +1 -1
  157. package/lib/actions/CopyAction.js +1 -1
  158. package/lib/actions/CustomAction.js +3 -1
  159. package/lib/actions/DialogAction.js +1 -1
  160. package/lib/actions/DrawerAction.js +1 -1
  161. package/lib/actions/EmailAction.js +1 -1
  162. package/lib/actions/LinkAction.js +1 -1
  163. package/lib/actions/LoopAction.js +1 -1
  164. package/lib/actions/PageAction.js +1 -1
  165. package/lib/actions/ParallelAction.js +1 -1
  166. package/lib/actions/StatusAction.js +1 -1
  167. package/lib/actions/SwitchAction.js +1 -1
  168. package/lib/actions/ToastAction.js +1 -1
  169. package/lib/components/CustomStyle.d.ts +4 -6
  170. package/lib/components/CustomStyle.js +28 -4
  171. package/lib/components/LazyComponent.d.ts +1 -2
  172. package/lib/components/LazyComponent.js +12 -9
  173. package/lib/components/Overlay.js +3 -1
  174. package/lib/components/PopOver.d.ts +12 -12
  175. package/lib/components/PopOver.js +3 -1
  176. package/lib/env.d.ts +2 -2
  177. package/lib/env.js +1 -1
  178. package/lib/envOverwrite.js +1 -1
  179. package/lib/factory.d.ts +7 -7
  180. package/lib/factory.js +1 -1
  181. package/lib/index.d.ts +1 -0
  182. package/lib/index.js +11 -3
  183. package/lib/locale.d.ts +1 -1
  184. package/lib/locale.js +3 -3
  185. package/lib/polyfills.js +1 -1
  186. package/lib/renderers/Form.d.ts +1 -1
  187. package/lib/renderers/Form.js +10 -8
  188. package/lib/renderers/Item.d.ts +24 -56
  189. package/lib/renderers/Item.js +26 -31
  190. package/lib/renderers/Options.js +14 -12
  191. package/lib/renderers/Placeholder.js +1 -1
  192. package/lib/renderers/builtin.js +1 -1
  193. package/lib/renderers/register.js +1 -1
  194. package/lib/renderers/wrapControl.js +70 -79
  195. package/lib/store/app.js +3 -1
  196. package/lib/store/combo.d.ts +384 -0
  197. package/lib/store/combo.js +1 -1
  198. package/lib/store/crud.js +31 -25
  199. package/lib/store/form.d.ts +160 -0
  200. package/lib/store/form.js +15 -13
  201. package/lib/store/formItem.d.ts +4 -0
  202. package/lib/store/formItem.js +41 -25
  203. package/lib/store/iRenderer.js +3 -1
  204. package/lib/store/index.js +1 -1
  205. package/lib/store/list.js +1 -1
  206. package/lib/store/manager.js +1 -1
  207. package/lib/store/modal.js +1 -1
  208. package/lib/store/node.js +1 -1
  209. package/lib/store/pagination.js +1 -1
  210. package/lib/store/root.d.ts +1 -1
  211. package/lib/store/root.js +11 -4
  212. package/lib/store/service.js +38 -33
  213. package/lib/store/status.js +1 -1
  214. package/lib/store/table.d.ts +760 -21
  215. package/lib/store/table.js +155 -55
  216. package/lib/store/table2.js +11 -8
  217. package/lib/theme.d.ts +18 -31
  218. package/lib/theme.js +1 -1
  219. package/lib/utils/Animation.js +1 -1
  220. package/lib/utils/ColorScale.js +1 -1
  221. package/lib/utils/DataSchema.js +1 -1
  222. package/lib/utils/DataScope.js +1 -1
  223. package/lib/utils/RootClose.js +1 -1
  224. package/lib/utils/SimpleMap.js +1 -1
  225. package/lib/utils/api.d.ts +3 -3
  226. package/lib/utils/api.js +2 -2
  227. package/lib/utils/arraySlice.js +1 -1
  228. package/lib/utils/attachmentAdpator.js +1 -1
  229. package/lib/utils/autobind.js +1 -1
  230. package/lib/utils/columnsSplit.js +1 -1
  231. package/lib/utils/dataMapping.js +1 -1
  232. package/lib/utils/date.js +1 -1
  233. package/lib/utils/debug.d.ts +1 -0
  234. package/lib/utils/debug.js +24 -1
  235. package/lib/utils/decodeEntity.js +1 -1
  236. package/lib/utils/dom.js +1 -1
  237. package/lib/utils/errors.js +1 -1
  238. package/lib/utils/escapeHtml.js +1 -1
  239. package/lib/utils/filter-schema.js +1 -1
  240. package/lib/utils/filter.js +1 -1
  241. package/lib/utils/formatDuration.js +1 -1
  242. package/lib/utils/formula.js +1 -1
  243. package/lib/utils/getVariable.js +1 -1
  244. package/lib/utils/grammar.js +1 -1
  245. package/lib/utils/handleAction.js +1 -1
  246. package/lib/utils/helper.d.ts +13 -1
  247. package/lib/utils/helper.js +101 -4
  248. package/lib/utils/highlight.js +1 -1
  249. package/lib/utils/icon.js +1 -1
  250. package/lib/utils/image.js +1 -1
  251. package/lib/utils/isPureVariable.js +1 -1
  252. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  253. package/lib/utils/keyToPath.d.ts +1 -1
  254. package/lib/utils/keyToPath.js +2 -1
  255. package/lib/utils/makeSorter.js +1 -1
  256. package/lib/utils/math.js +1 -1
  257. package/lib/utils/memoryParse.js +1 -1
  258. package/lib/utils/normalizeLink.js +1 -1
  259. package/lib/utils/normalizeOptions.js +1 -1
  260. package/lib/utils/object.js +1 -1
  261. package/lib/utils/offset.js +1 -1
  262. package/lib/utils/offsetParent.js +1 -1
  263. package/lib/utils/optionValueCompare.js +1 -1
  264. package/lib/utils/position.js +1 -1
  265. package/lib/utils/prettyBytes.js +1 -1
  266. package/lib/utils/renderer-event.js +2 -2
  267. package/lib/utils/replaceText.js +1 -1
  268. package/lib/utils/resize-sensor.d.ts +3 -1
  269. package/lib/utils/resize-sensor.js +34 -22
  270. package/lib/utils/resolveCondition.js +1 -1
  271. package/lib/utils/resolveVariable.js +1 -1
  272. package/lib/utils/resolveVariableAndFilter.js +1 -1
  273. package/lib/utils/resolveVariableAndFilterForAsync.js +1 -1
  274. package/lib/utils/scrollPosition.js +1 -1
  275. package/lib/utils/string2regExp.js +1 -1
  276. package/lib/utils/stripNumber.js +1 -1
  277. package/lib/utils/style-helper.d.ts +22 -14
  278. package/lib/utils/style-helper.js +188 -120
  279. package/lib/utils/style.js +1 -1
  280. package/lib/utils/toNumber.js +1 -1
  281. package/lib/utils/tokenize.js +1 -1
  282. package/lib/utils/tpl-builtin.js +1 -1
  283. package/lib/utils/tpl-lodash.js +1 -1
  284. package/lib/utils/tpl.js +1 -1
  285. package/lib/utils/uncontrollable.js +1 -1
  286. package/lib/utils/validations.js +1 -1
  287. package/package.json +5 -5
package/esm/Root.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -28,7 +28,7 @@ var RootRenderer = /** @class */ (function (_super) {
28
28
  storeType: RootStore.name,
29
29
  parentId: ''
30
30
  });
31
- _this.store.setContext(props.context);
31
+ _this.store.updateContext(props.context);
32
32
  _this.store.initData(props.data);
33
33
  _this.store.updateLocation(props.location, (_a = _this.props.env) === null || _a === void 0 ? void 0 : _a.parseLocation);
34
34
  // 将数据里面的函数批量的绑定到 this 上
@@ -54,7 +54,7 @@ var RootRenderer = /** @class */ (function (_super) {
54
54
  this.store.updateLocation(props.location);
55
55
  }
56
56
  if (props.context !== prevProps.context) {
57
- this.store.setContext(props.context);
57
+ this.store.updateContext(props.context);
58
58
  }
59
59
  };
60
60
  RootRenderer.prototype.componentDidCatch = function (error, errorInfo) {
@@ -127,9 +127,9 @@ var RootRenderer = /** @class */ (function (_super) {
127
127
  else if (action.actionType === 'toast') {
128
128
  (_b = (_a = action.toast) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.forEach(function (item) {
129
129
  env.notify(item.level || 'info', item.body
130
- ? render('body', item.body, __assign(__assign({}, _this.props), { data: ctx }))
130
+ ? render('body', item.body, __assign(__assign({}, _this.props), { data: ctx, context: store.context }))
131
131
  : '', __assign(__assign(__assign({}, action.toast), item), { title: item.title
132
- ? render('title', item.title, __assign(__assign({}, _this.props), { data: ctx }))
132
+ ? render('title', item.title, __assign(__assign({}, _this.props), { data: ctx, context: store.context }))
133
133
  : null, mobileUI: mobileUI }));
134
134
  });
135
135
  }
@@ -296,13 +296,13 @@ var RootRenderer = /** @class */ (function (_super) {
296
296
  var _a = this.props, render = _a.render, rest = __rest(_a, ["render"]);
297
297
  var store = this.store;
298
298
  return render('dialog', __assign(__assign({}, (store.action &&
299
- store.action.dialog)), { type: 'dialog' }), __assign(__assign({}, rest), { key: 'dialog', topStore: this.store, data: store.dialogData, onConfirm: this.handleDialogConfirm, onClose: this.handleDialogClose, show: store.dialogOpen, onAction: this.handleAction }));
299
+ store.action.dialog)), { type: 'dialog' }), __assign(__assign({}, rest), { key: 'dialog', topStore: this.store, data: store.dialogData, context: store.context, onConfirm: this.handleDialogConfirm, onClose: this.handleDialogClose, show: store.dialogOpen, onAction: this.handleAction }));
300
300
  };
301
301
  RootRenderer.prototype.renderDrawer = function () {
302
302
  var _a = this.props, render = _a.render, rest = __rest(_a, ["render"]);
303
303
  var store = this.store;
304
304
  return render('drawer', __assign(__assign({}, (store.action &&
305
- store.action.drawer)), { type: 'drawer' }), __assign(__assign({}, rest), { key: 'drawer', topStore: this.store, data: store.drawerData, onConfirm: this.handleDrawerConfirm, onClose: this.handleDrawerClose, show: store.drawerOpen, onAction: this.handleAction }));
305
+ store.action.drawer)), { type: 'drawer' }), __assign(__assign({}, rest), { key: 'drawer', topStore: this.store, data: store.drawerData, context: store.context, onConfirm: this.handleDrawerConfirm, onClose: this.handleDrawerClose, show: store.drawerOpen, onAction: this.handleAction }));
306
306
  };
307
307
  RootRenderer.prototype.render = function () {
308
308
  var _a = this.props, pathPrefix = _a.pathPrefix, schema = _a.schema, render = _a.render, rest = __rest(_a, ["pathPrefix", "schema", "render"]);
@@ -311,7 +311,7 @@ var RootRenderer = /** @class */ (function (_super) {
311
311
  this.renderRuntimeError();
312
312
  }
313
313
  return (React.createElement(React.Fragment, null,
314
- render(pathPrefix, schema, __assign(__assign({}, rest), { topStore: this.store, data: this.store.downStream, onAction: this.handleAction })),
314
+ render(pathPrefix, schema, __assign(__assign({}, rest), { topStore: this.store, data: this.store.downStream, context: store.context, onAction: this.handleAction })),
315
315
  this.renderSpinner(),
316
316
  this.renderError(),
317
317
  this.renderDialog(),
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -57,7 +57,8 @@ var RENDERER_TRANSMISSION_OMIT_PROPS = [
57
57
  'label',
58
58
  'renderLabel',
59
59
  'trackExpression',
60
- 'editorSetting'
60
+ 'editorSetting',
61
+ 'updatePristineAfterStoreDataReInit'
61
62
  ];
62
63
  var componentCache = new SimpleMap();
63
64
  var SchemaRenderer = /** @class */ (function (_super) {
@@ -299,16 +300,14 @@ var SchemaRenderer = /** @class */ (function (_super) {
299
300
  if (renderer.storeType) {
300
301
  exprProps = {};
301
302
  }
302
- // style 支持公式
303
- if (schema.style) {
304
- // schema.style是readonly属性
305
- schema = __assign(__assign({}, schema), { style: buildStyle(schema.style, detectData) });
306
- }
307
303
  var isClassComponent = (_e = Component.prototype) === null || _e === void 0 ? void 0 : _e.isReactComponent;
308
- var $schema = __assign(__assign({}, schema), exprProps);
309
304
  var props = __assign(__assign(__assign(__assign(__assign({}, theme.getRendererConfig(renderer.name)), restSchema), chainEvents(rest, restSchema)), exprProps), {
310
305
  // value: defaultValue, // 备注: 此处并没有将value传递给渲染器
311
- defaultData: (_f = restSchema.defaultData) !== null && _f !== void 0 ? _f : defaultData, defaultValue: (_g = restSchema.defaultValue) !== null && _g !== void 0 ? _g : defaultValue, defaultActiveKey: defaultActiveKey, propKey: propKey, $path: $path, $schema: $schema, ref: this.refFn, render: this.renderChild, rootStore: rootStore, statusStore: statusStore, dispatchEvent: this.dispatchEvent, mobileUI: schema.useMobileUI === false ? false : rest.mobileUI });
306
+ defaultData: (_f = restSchema.defaultData) !== null && _f !== void 0 ? _f : defaultData, defaultValue: (_g = restSchema.defaultValue) !== null && _g !== void 0 ? _g : defaultValue, defaultActiveKey: defaultActiveKey, propKey: propKey, $path: $path, $schema: schema, ref: this.refFn, render: this.renderChild, rootStore: rootStore, statusStore: statusStore, dispatchEvent: this.dispatchEvent, mobileUI: schema.useMobileUI === false ? false : rest.mobileUI });
307
+ // style 支持公式
308
+ if (schema.style) {
309
+ props.style = buildStyle(schema.style, detectData);
310
+ }
312
311
  if (disable !== undefined) {
313
312
  props.disabled = disable;
314
313
  }
@@ -318,7 +317,7 @@ var SchemaRenderer = /** @class */ (function (_super) {
318
317
  // 自动解析变量模式,主要是方便直接引入第三方组件库,无需为了支持变量封装一层
319
318
  if (renderer.autoVar) {
320
319
  try {
321
- for (var _k = __values(Object.keys($schema)), _l = _k.next(); !_l.done; _l = _k.next()) {
320
+ for (var _k = __values(Object.keys(schema)), _l = _k.next(); !_l.done; _l = _k.next()) {
322
321
  var key = _l.value;
323
322
  if (typeof props[key] === 'string') {
324
323
  props[key] = resolveVariableAndFilter(props[key], props.data, '| raw');
@@ -349,12 +348,17 @@ var SchemaRenderer = /** @class */ (function (_super) {
349
348
  var PlaceholderComponent = /** @class */ (function (_super) {
350
349
  __extends(PlaceholderComponent, _super);
351
350
  function PlaceholderComponent() {
352
- return _super !== null && _super.apply(this, arguments) || this;
351
+ var _this = _super !== null && _super.apply(this, arguments) || this;
352
+ _this.childRef = React.createRef();
353
+ return _this;
353
354
  }
355
+ PlaceholderComponent.prototype.getWrappedInstance = function () {
356
+ return this.childRef.current;
357
+ };
354
358
  PlaceholderComponent.prototype.render = function () {
355
359
  var _a = this.props, renderChildren = _a.renderChildren, rest = __rest(_a, ["renderChildren"]);
356
360
  if (typeof renderChildren === 'function') {
357
- return renderChildren(rest);
361
+ return renderChildren(__assign(__assign({}, rest), { ref: this.childRef }));
358
362
  }
359
363
  return null;
360
364
  };
package/esm/Scoped.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -39,6 +39,8 @@ import 'react-overlays/useRootClose';
39
39
  import './utils/SimpleMap.js';
40
40
  import 'lodash/mapValues';
41
41
  import 'lodash/camelCase';
42
+ import 'lodash/map';
43
+ import 'lodash/isEmpty';
42
44
  import 'uncontrollable';
43
45
  import './utils/validations.js';
44
46
  import './utils/resolveCondition.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
package/esm/WithStore.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -108,7 +108,7 @@ function HocStoreFactory(renderer) {
108
108
  (props.data &&
109
109
  prevProps.data &&
110
110
  props.data.__super !== prevProps.data.__super))) {
111
- store.initData(extendObject(props.data, __assign(__assign(__assign({}, (store.hasRemoteData ? store.data : null)), this.formatData(props.defaultData)), this.formatData(props.data))));
111
+ store.initData(extendObject(props.data, __assign(__assign(__assign({}, (store.hasRemoteData ? store.data : null)), this.formatData(props.defaultData)), this.formatData(props.data))), props.updatePristineAfterStoreDataReInit === false);
112
112
  }
113
113
  }
114
114
  else if (shouldSync === true ||
@@ -120,14 +120,14 @@ function HocStoreFactory(renderer) {
120
120
  isSuperDataModified(props.data, prevProps.data, store)))) {
121
121
  if (props.store && props.store.data === props.data) {
122
122
  store.initData(createObject(props.store.data, props.syncSuperStore === false
123
- ? __assign({}, store.data) : syncDataFromSuper(store.data, props.store.data, prevProps.scope, store, props.syncSuperStore === true)));
123
+ ? __assign({}, store.data) : syncDataFromSuper(store.data, props.store.data, prevProps.scope, store, props.syncSuperStore === true)), props.updatePristineAfterStoreDataReInit === false);
124
124
  }
125
125
  else if (props.data && props.data.__super) {
126
126
  store.initData(extendObject(props.data, store.hasRemoteData || store.path === 'page'
127
- ? __assign(__assign({}, store.data), props.data) : undefined));
127
+ ? __assign(__assign({}, store.data), props.data) : syncDataFromSuper(props.data, props.data.__super, prevProps.data.__super, store, false)), props.updatePristineAfterStoreDataReInit === false);
128
128
  }
129
129
  else {
130
- store.initData(createObject(props.scope, props.data));
130
+ store.initData(createObject(props.scope, props.data), props.updatePristineAfterStoreDataReInit === false);
131
131
  }
132
132
  }
133
133
  else if (!props.trackExpression &&
@@ -137,8 +137,9 @@ function HocStoreFactory(renderer) {
137
137
  // 这个用法很少,当 data.__super 值发生变化时,更新 store.data
138
138
  if (!prevProps.data ||
139
139
  isObjectShallowModified(props.data.__super, prevProps.data.__super, false)) {
140
- store.initData(createObject(props.data.__super, __assign(__assign({}, props.data), store.data)), store.storeType === 'FormStore' &&
141
- ((_b = prevProps.store) === null || _b === void 0 ? void 0 : _b.storeType) === 'CRUDStore');
140
+ store.initData(createObject(props.data.__super, __assign(__assign({}, props.data), store.data)), props.updatePristineAfterStoreDataReInit === false ||
141
+ (store.storeType === 'FormStore' &&
142
+ ((_b = prevProps.store) === null || _b === void 0 ? void 0 : _b.storeType) === 'CRUDStore'));
142
143
  }
143
144
  // nextProps.data.__super !== props.data.__super) &&
144
145
  }
@@ -148,7 +149,7 @@ function HocStoreFactory(renderer) {
148
149
  prevProps.data !== props.data) {
149
150
  // 只有父级数据变动的时候才应该进来,
150
151
  // 目前看来这个 case 很少有情况下能进来
151
- store.initData(createObject(props.scope, __assign({}, store.data)));
152
+ store.initData(createObject(props.scope, __assign({}, store.data)), props.updatePristineAfterStoreDataReInit === false);
152
153
  }
153
154
  };
154
155
  StoreFactory.prototype.componentWillUnmount = function () {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -42,7 +42,7 @@ var AjaxAction = /** @class */ (function () {
42
42
  }
43
43
  }
44
44
  env = event.context.env;
45
- silent = (_b = action === null || action === void 0 ? void 0 : action.options) === null || _b === void 0 ? void 0 : _b.silent;
45
+ silent = ((_b = action === null || action === void 0 ? void 0 : action.options) === null || _b === void 0 ? void 0 : _b.silent) || (action === null || action === void 0 ? void 0 : action.api).silent;
46
46
  messages = (_c = action === null || action === void 0 ? void 0 : action.api) === null || _c === void 0 ? void 0 : _c.messages;
47
47
  api = normalizeApi(action.api);
48
48
  // 如果没配置data数据映射,则给一个空对象,避免将当前数据域作为接口请求参数
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -33,6 +33,8 @@ import 'react-overlays/useRootClose';
33
33
  import '../utils/SimpleMap.js';
34
34
  import 'lodash/mapValues';
35
35
  import 'lodash/camelCase';
36
+ import 'lodash/map';
37
+ import 'lodash/isEmpty';
36
38
  import 'uncontrollable';
37
39
  import 'hoist-non-react-statics';
38
40
  import '../utils/validations.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -1,12 +1,10 @@
1
1
  import type { RendererEnv } from '../env';
2
- import type { CustomStyleClassName } from '../utils/style-helper';
2
+ import { type InsertCustomStyle } from '../utils/style-helper';
3
3
  interface CustomStyleProps {
4
4
  config: {
5
- themeCss: any;
6
- classNames: CustomStyleClassName[];
7
- id?: string;
8
- defaultData?: any;
9
- };
5
+ wrapperCustomStyle?: any;
6
+ componentId?: string;
7
+ } & InsertCustomStyle;
10
8
  env: RendererEnv;
11
9
  }
12
10
  export default function (props: CustomStyleProps): null;
@@ -1,17 +1,41 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
6
6
  import { useEffect } from 'react';
7
- import { insertCustomStyle } from '../utils/style-helper.js';
7
+ import { insertCustomStyle, removeCustomStyle, insertEditCustomStyle } from '../utils/style-helper.js';
8
8
 
9
9
  function CustomStyle (props) {
10
- var _a = props.config, themeCss = _a.themeCss, classNames = _a.classNames, id = _a.id, defaultData = _a.defaultData;
10
+ var config = props.config, env = props.env;
11
+ var themeCss = config.themeCss, classNames = config.classNames, id = config.id, defaultData = config.defaultData, wrapperCustomStyle = config.wrapperCustomStyle;
12
+ if (!themeCss && !wrapperCustomStyle) {
13
+ return null;
14
+ }
11
15
  useEffect(function () {
12
16
  var _a;
13
- insertCustomStyle(themeCss, classNames, id, defaultData, (_a = props.env) === null || _a === void 0 ? void 0 : _a.customStyleClassPrefix);
14
- }, [props.config.themeCss]);
17
+ if (themeCss && id) {
18
+ insertCustomStyle(themeCss, classNames, id, defaultData, env === null || env === void 0 ? void 0 : env.customStyleClassPrefix, (_a = env.getModalContainer) === null || _a === void 0 ? void 0 : _a.call(env).ownerDocument);
19
+ }
20
+ return function () {
21
+ var _a;
22
+ if (id) {
23
+ removeCustomStyle('', id, (_a = env.getModalContainer) === null || _a === void 0 ? void 0 : _a.call(env).ownerDocument);
24
+ }
25
+ };
26
+ }, [themeCss, id]);
27
+ useEffect(function () {
28
+ var _a;
29
+ if (wrapperCustomStyle && id) {
30
+ insertEditCustomStyle(wrapperCustomStyle, id, (_a = env.getModalContainer) === null || _a === void 0 ? void 0 : _a.call(env).ownerDocument);
31
+ }
32
+ return function () {
33
+ var _a;
34
+ if (id) {
35
+ removeCustomStyle('wrapperCustomStyle', id, (_a = env.getModalContainer) === null || _a === void 0 ? void 0 : _a.call(env).ownerDocument);
36
+ }
37
+ };
38
+ }, [wrapperCustomStyle, id]);
15
39
  return null;
16
40
  }
17
41
 
@@ -10,7 +10,6 @@ export interface LazyComponentProps {
10
10
  placeholder?: React.ReactNode;
11
11
  unMountOnHidden?: boolean;
12
12
  childProps?: object;
13
- visiblilityProps?: object;
14
13
  [propName: string]: any;
15
14
  }
16
15
  export interface LazyComponentState {
@@ -27,6 +26,6 @@ export default class LazyComponent extends React.Component<LazyComponentProps, L
27
26
  constructor(props: LazyComponentProps);
28
27
  componentDidMount(): void;
29
28
  componentWillUnmount(): void;
30
- handleVisibleChange(visible: boolean): void;
29
+ handleVisibleChange(visible: boolean, entry?: any): void;
31
30
  render(): React.ReactNode;
32
31
  }
@@ -1,11 +1,11 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
6
6
  import { __extends, __rest, __assign } from 'tslib';
7
7
  import React from 'react';
8
- import VisibilitySensor from 'react-visibility-sensor';
8
+ import { InView } from 'react-intersection-observer';
9
9
 
10
10
  /**
11
11
  * @file LazyComponent
@@ -34,7 +34,7 @@ var LazyComponent = /** @class */ (function (_super) {
34
34
  LazyComponent.prototype.componentWillUnmount = function () {
35
35
  this.mounted = false;
36
36
  };
37
- LazyComponent.prototype.handleVisibleChange = function (visible) {
37
+ LazyComponent.prototype.handleVisibleChange = function (visible, entry) {
38
38
  var _this = this;
39
39
  this.setState({
40
40
  visible: visible
@@ -59,16 +59,20 @@ var LazyComponent = /** @class */ (function (_super) {
59
59
  });
60
60
  };
61
61
  LazyComponent.prototype.render = function () {
62
- var _a = this.props, placeholder = _a.placeholder, unMountOnHidden = _a.unMountOnHidden, childProps = _a.childProps, visiblilityProps = _a.visiblilityProps, partialVisibility = _a.partialVisibility, children = _a.children, rest = __rest(_a, ["placeholder", "unMountOnHidden", "childProps", "visiblilityProps", "partialVisibility", "children"]);
62
+ var _a = this.props, placeholder = _a.placeholder, unMountOnHidden = _a.unMountOnHidden, childProps = _a.childProps, partialVisibility = _a.partialVisibility, children = _a.children, rest = __rest(_a, ["placeholder", "unMountOnHidden", "childProps", "partialVisibility", "children"]);
63
63
  var _b = this.state, visible = _b.visible, Component = _b.component;
64
64
  // 需要监听从可见到不可见。
65
65
  if (unMountOnHidden) {
66
- return (React.createElement(VisibilitySensor, __assign({}, visiblilityProps, { partialVisibility: partialVisibility, onChange: this.handleVisibleChange }),
67
- React.createElement("div", { className: "visibility-sensor" }, Component && visible ? (React.createElement(Component, __assign({}, rest, childProps))) : children && visible ? (children) : (placeholder))));
66
+ return (React.createElement(InView, { onChange: this.handleVisibleChange, threshold: partialVisibility ? 0 : 1 }, function (_a) {
67
+ var ref = _a.ref;
68
+ return (React.createElement("div", { ref: ref, className: "visibility-sensor ".concat(visible ? 'in' : '') }, Component && visible ? (React.createElement(Component, __assign({}, rest, childProps))) : children && visible ? (children) : (placeholder)));
69
+ }));
68
70
  }
69
71
  if (!visible) {
70
- return (React.createElement(VisibilitySensor, __assign({}, visiblilityProps, { partialVisibility: partialVisibility, onChange: this.handleVisibleChange }),
71
- React.createElement("div", { className: "visibility-sensor" }, placeholder)));
72
+ return (React.createElement(InView, { onChange: this.handleVisibleChange, threshold: partialVisibility ? 0 : 1 }, function (_a) {
73
+ var ref = _a.ref;
74
+ return (React.createElement("div", { ref: ref, className: "visibility-sensor" }, placeholder));
75
+ }));
72
76
  }
73
77
  else if (Component) {
74
78
  // 只监听不可见到可见,一旦可见了,就销毁检查。
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -35,6 +35,8 @@ import { RootClose } from '../utils/RootClose.js';
35
35
  import '../utils/SimpleMap.js';
36
36
  import 'lodash/mapValues';
37
37
  import 'lodash/camelCase';
38
+ import 'lodash/map';
39
+ import 'lodash/isEmpty';
38
40
  import 'uncontrollable';
39
41
  import 'hoist-non-react-statics';
40
42
  import '../utils/validations.js';
@@ -10,7 +10,7 @@ export interface Offset {
10
10
  x: number;
11
11
  y: number;
12
12
  }
13
- export interface PopOverPorps {
13
+ export interface PopOverProps {
14
14
  className?: string;
15
15
  placement?: string;
16
16
  positionTop?: number;
@@ -30,7 +30,7 @@ interface PopOverState {
30
30
  xOffset: number;
31
31
  yOffset: number;
32
32
  }
33
- export declare class PopOver extends React.PureComponent<PopOverPorps, PopOverState> {
33
+ export declare class PopOver extends React.PureComponent<PopOverProps, PopOverState> {
34
34
  static defaultProps: {
35
35
  className: string;
36
36
  offset: {
@@ -53,31 +53,31 @@ export declare class PopOver extends React.PureComponent<PopOverPorps, PopOverSt
53
53
  render(): React.JSX.Element;
54
54
  }
55
55
  declare const _default: {
56
- new (props: Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps): {
56
+ new (props: Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps): {
57
57
  ref: any;
58
58
  childRef(ref: any): void;
59
59
  getWrappedInstance(): any;
60
60
  render(): React.JSX.Element;
61
61
  context: unknown;
62
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
62
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
63
63
  forceUpdate(callback?: (() => void) | undefined): void;
64
- readonly props: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>;
64
+ readonly props: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>;
65
65
  state: Readonly<{}>;
66
66
  refs: {
67
67
  [key: string]: React.ReactInstance;
68
68
  };
69
69
  componentDidMount?(): void;
70
- shouldComponentUpdate?(nextProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
70
+ shouldComponentUpdate?(nextProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
71
71
  componentWillUnmount?(): void;
72
72
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
73
- getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
74
- componentDidUpdate?(prevProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
73
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
74
+ componentDidUpdate?(prevProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
75
75
  componentWillMount?(): void;
76
76
  UNSAFE_componentWillMount?(): void;
77
- componentWillReceiveProps?(nextProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
78
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
79
- componentWillUpdate?(nextProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
80
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PopOverPorps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
77
+ componentWillReceiveProps?(nextProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, nextContext: any): void;
78
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, nextContext: any): void;
79
+ componentWillUpdate?(nextProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
80
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PopOverProps, keyof import("../theme").ThemeProps> & import("../theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
81
81
  };
82
82
  displayName: string;
83
83
  contextType: React.Context<string>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v3.4.0
2
+ * amis-core v3.4.1
3
3
  * Copyright 2018-2023 fex
4
4
  */
5
5
 
@@ -34,6 +34,8 @@ import 'react-overlays/useRootClose';
34
34
  import '../utils/SimpleMap.js';
35
35
  import 'lodash/mapValues';
36
36
  import 'lodash/camelCase';
37
+ import 'lodash/map';
38
+ import 'lodash/isEmpty';
37
39
  import 'uncontrollable';
38
40
  import 'hoist-non-react-statics';
39
41
  import '../utils/validations.js';
package/esm/env.d.ts CHANGED
@@ -10,7 +10,7 @@ import type { IScopedContext } from './Scoped';
10
10
  import type { RendererEvent } from './utils/renderer-event';
11
11
  import type { ListenerContext } from './actions/Action';
12
12
  import type { ICmptAction } from './actions/CmptAction';
13
- export interface wsObject {
13
+ export interface WsObject {
14
14
  url: string;
15
15
  responseKey?: string;
16
16
  body?: any;
@@ -19,7 +19,7 @@ export interface RendererEnv {
19
19
  session?: string;
20
20
  fetcher: (api: Api, data?: any, options?: object) => Promise<Payload>;
21
21
  isCancel: (val: any) => boolean;
22
- wsFetcher: (ws: wsObject, onMessage: (data: any) => void, onError: (error: any) => void) => void;
22
+ wsFetcher: (ws: WsObject, onMessage: (data: any) => void, onError: (error: any) => void) => void;
23
23
  notify: (type: ToastLevel, msg: any, conf?: ToastConf) => void;
24
24
  jumpTo: (to: string, action?: ActionObject, ctx?: object) => void;
25
25
  alert: (msg: string, title?: string) => void;