@nutui/nutui-react-taro 3.0.19-cpp.22-2 → 3.0.19-cpp.22-4

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 (143) hide show
  1. package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
  2. package/dist/cjs/hooks/use-ref-state.js +3 -3
  3. package/dist/cjs/hooks/use-touch.js +2 -1
  4. package/dist/cjs/packages/address/utils.js +3 -3
  5. package/dist/cjs/packages/avatarcropper/avatarcropper.js +28 -16
  6. package/dist/cjs/packages/badge/badge.js +7 -4
  7. package/dist/cjs/packages/barrage/barrage.js +24 -14
  8. package/dist/cjs/packages/calendar/style/calendar.scss +32 -1
  9. package/dist/cjs/packages/calendar/style/style.css +21 -1
  10. package/dist/cjs/packages/calendar/style/style.harmony.css +21 -1
  11. package/dist/cjs/packages/calendar/style-jmapp/calendar.scss +32 -1
  12. package/dist/cjs/packages/calendar/style-jmapp/style.css +21 -1
  13. package/dist/cjs/packages/calendar/style-jrkf/calendar.scss +32 -1
  14. package/dist/cjs/packages/calendar/style-jrkf/style.css +21 -1
  15. package/dist/cjs/packages/calendar/utils.js +8 -8
  16. package/dist/cjs/packages/calendarcard/icon.js +9 -15
  17. package/dist/cjs/packages/calendarcard/style/calendarcard.scss +13 -0
  18. package/dist/cjs/packages/calendarcard/style/style.css +8 -0
  19. package/dist/cjs/packages/calendarcard/style/style.harmony.css +8 -0
  20. package/dist/cjs/packages/calendarcard/style-jmapp/calendarcard.scss +13 -0
  21. package/dist/cjs/packages/calendarcard/style-jmapp/style.css +8 -0
  22. package/dist/cjs/packages/calendarcard/style-jrkf/calendarcard.scss +13 -0
  23. package/dist/cjs/packages/calendarcard/style-jrkf/style.css +8 -0
  24. package/dist/cjs/packages/calendarcard/utils.js +6 -6
  25. package/dist/cjs/packages/cascader/cascader.js +21 -12
  26. package/dist/cjs/packages/cascader/utils.js +3 -3
  27. package/dist/cjs/packages/collapseitem/collapseitem.js +7 -4
  28. package/dist/cjs/packages/configprovider/configprovider.js +7 -7
  29. package/dist/cjs/packages/configprovider/index.js +6 -6
  30. package/dist/cjs/packages/countdown/countdown.js +2 -1
  31. package/dist/cjs/packages/datepicker/utils.js +9 -9
  32. package/dist/cjs/packages/dialog/content.js +3 -3
  33. package/dist/cjs/packages/dialog/dialog.js +11 -8
  34. package/dist/cjs/packages/drag/drag.js +7 -4
  35. package/dist/cjs/packages/elevator/elevator.js +10 -7
  36. package/dist/cjs/packages/ellipsis/ellipsis.js +30 -17
  37. package/dist/cjs/packages/form/index.js +2 -0
  38. package/dist/cjs/packages/form/useform.js +57 -50
  39. package/dist/cjs/packages/infiniteloading/infiniteloading.js +14 -8
  40. package/dist/cjs/packages/inputnumber/inputnumber.js +28 -16
  41. package/dist/cjs/packages/lottie/types.js +2 -0
  42. package/dist/cjs/packages/menuitem/menuitem.js +22 -24
  43. package/dist/cjs/packages/noticebar/noticebar.js +70 -74
  44. package/dist/cjs/packages/notify/notify.js +4 -4
  45. package/dist/cjs/packages/nutui.react.build.js +105 -105
  46. package/dist/cjs/packages/nutui.react.js +105 -105
  47. package/dist/cjs/packages/overlay/overlay.js +3 -3
  48. package/dist/cjs/packages/pickerview/pickerroller.js +7 -4
  49. package/dist/cjs/packages/pickerview/pickerview.js +2 -1
  50. package/dist/cjs/packages/pickerview/utils.js +3 -3
  51. package/dist/cjs/packages/popover/popover.js +77 -75
  52. package/dist/cjs/packages/popup/popup.js +14 -8
  53. package/dist/cjs/packages/price/price.js +6 -4
  54. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +56 -52
  55. package/dist/cjs/packages/radio/index.js +2 -0
  56. package/dist/cjs/packages/range/range.js +28 -16
  57. package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
  58. package/dist/cjs/packages/sticky/sticky.js +7 -4
  59. package/dist/cjs/packages/swipe/swipe.js +14 -8
  60. package/dist/cjs/packages/swiper/index.js +1 -0
  61. package/dist/cjs/packages/switch/switch.js +7 -4
  62. package/dist/cjs/packages/toast/toast.js +4 -4
  63. package/dist/cjs/packages/uploader/uploader.js +51 -38
  64. package/dist/cjs/packages/virtuallist/utils.js +6 -6
  65. package/dist/cjs/packages/watermark/watermark.js +8 -4
  66. package/dist/cjs/types/spec/address/base.js +2 -0
  67. package/dist/cjs/types/spec/price/base.d.ts +1 -0
  68. package/dist/cjs/utils/date.js +5 -5
  69. package/dist/cjs/utils/event-mocker.js +18 -10
  70. package/dist/cjs/utils/get-rect.js +4 -4
  71. package/dist/cjs/utils/get-scroll-parent.js +3 -3
  72. package/dist/cjs/utils/merge-props.js +3 -3
  73. package/dist/cjs/utils/merge.js +6 -6
  74. package/dist/cjs/utils/raf.js +3 -3
  75. package/dist/cjs/utils/render.js +9 -5
  76. package/dist/cjs/utils/rubberband.js +3 -3
  77. package/dist/cjs/utils/should-render-price-raw.d.ts +1 -0
  78. package/dist/cjs/utils/should-render-price-raw.js +17 -6
  79. package/dist/cjs/utils/taro/get-rect.js +24 -14
  80. package/dist/cjs/utils/taro/get-system-info.js +4 -4
  81. package/dist/cjs/utils/taro/platform.js +5 -5
  82. package/dist/es/hooks/use-touch.js +1 -1
  83. package/dist/es/packages/avatarcropper/avatarcropper.js +28 -16
  84. package/dist/es/packages/badge/badge.js +7 -4
  85. package/dist/es/packages/barrage/barrage.js +24 -14
  86. package/dist/es/packages/calendar/style/calendar.scss +32 -1
  87. package/dist/es/packages/calendar/style/style.css +21 -1
  88. package/dist/es/packages/calendar/style/style.harmony.css +21 -1
  89. package/dist/es/packages/calendar/style-jmapp/calendar.scss +32 -1
  90. package/dist/es/packages/calendar/style-jmapp/style.css +21 -1
  91. package/dist/es/packages/calendar/style-jrkf/calendar.scss +32 -1
  92. package/dist/es/packages/calendar/style-jrkf/style.css +21 -1
  93. package/dist/es/packages/calendarcard/icon.js +5 -11
  94. package/dist/es/packages/calendarcard/style/calendarcard.scss +13 -0
  95. package/dist/es/packages/calendarcard/style/style.css +8 -0
  96. package/dist/es/packages/calendarcard/style/style.harmony.css +8 -0
  97. package/dist/es/packages/calendarcard/style-jmapp/calendarcard.scss +13 -0
  98. package/dist/es/packages/calendarcard/style-jmapp/style.css +8 -0
  99. package/dist/es/packages/calendarcard/style-jrkf/calendarcard.scss +13 -0
  100. package/dist/es/packages/calendarcard/style-jrkf/style.css +8 -0
  101. package/dist/es/packages/cascader/cascader.js +21 -12
  102. package/dist/es/packages/collapseitem/collapseitem.js +7 -4
  103. package/dist/es/packages/countdown/countdown.js +2 -1
  104. package/dist/es/packages/dialog/dialog.js +7 -4
  105. package/dist/es/packages/drag/drag.js +7 -4
  106. package/dist/es/packages/elevator/elevator.js +7 -4
  107. package/dist/es/packages/ellipsis/ellipsis.js +30 -17
  108. package/dist/es/packages/form/index.js +1 -0
  109. package/dist/es/packages/form/useform.js +53 -46
  110. package/dist/es/packages/infiniteloading/infiniteloading.js +14 -8
  111. package/dist/es/packages/inputnumber/inputnumber.js +28 -16
  112. package/dist/es/packages/lottie/types.js +1 -1
  113. package/dist/es/packages/menuitem/menuitem.js +22 -24
  114. package/dist/es/packages/noticebar/noticebar.js +70 -74
  115. package/dist/es/packages/pickerview/pickerroller.js +7 -4
  116. package/dist/es/packages/pickerview/pickerview.js +2 -1
  117. package/dist/es/packages/popover/popover.js +77 -75
  118. package/dist/es/packages/popup/popup.js +14 -8
  119. package/dist/es/packages/price/price.js +7 -5
  120. package/dist/es/packages/pulltorefresh/pulltorefresh.js +56 -52
  121. package/dist/es/packages/radio/index.js +1 -0
  122. package/dist/es/packages/range/range.js +28 -16
  123. package/dist/es/packages/sticky/sticky.js +7 -4
  124. package/dist/es/packages/swipe/swipe.js +14 -8
  125. package/dist/es/packages/swiper/index.js +1 -0
  126. package/dist/es/packages/switch/switch.js +7 -4
  127. package/dist/es/packages/uploader/uploader.js +51 -38
  128. package/dist/es/packages/watermark/watermark.js +8 -4
  129. package/dist/es/types/spec/address/base.js +1 -1
  130. package/dist/es/types/spec/price/base.d.ts +1 -0
  131. package/dist/es/utils/event-mocker.js +12 -4
  132. package/dist/es/utils/render.js +6 -2
  133. package/dist/es/utils/should-render-price-raw.d.ts +1 -0
  134. package/dist/es/utils/should-render-price-raw.js +6 -3
  135. package/dist/es/utils/taro/get-rect.js +20 -10
  136. package/dist/nutui.react.umd.js +871 -663
  137. package/dist/style-jmapp.css +1 -1
  138. package/dist/style-jmapp.scss +41 -41
  139. package/dist/style-jrkf.css +1 -1
  140. package/dist/style-jrkf.scss +24 -24
  141. package/dist/style.css +1 -1
  142. package/dist/style.scss +31 -31
  143. package/package.json +1 -1
@@ -174,8 +174,8 @@ export var Cascader = /*#__PURE__*/ forwardRef(function(props, ref) {
174
174
  outerOptions
175
175
  ]);
176
176
  useEffect(function() {
177
- var load = function() {
178
- return _async_to_generator(function() {
177
+ var load = /*#__PURE__*/ function() {
178
+ var _ref = _async_to_generator(function() {
179
179
  var parent, error;
180
180
  return _ts_generator(this, function(_state) {
181
181
  switch(_state.label){
@@ -193,8 +193,8 @@ export var Cascader = /*#__PURE__*/ forwardRef(function(props, ref) {
193
193
  ]);
194
194
  return [
195
195
  4,
196
- innerValue.reduce(function(promise, val, key) {
197
- return _async_to_generator(function() {
196
+ innerValue.reduce(/*#__PURE__*/ function() {
197
+ var _ref = _async_to_generator(function(promise, val, key) {
198
198
  var pane, parent, node;
199
199
  return _ts_generator(this, function(_state) {
200
200
  switch(_state.label){
@@ -234,8 +234,11 @@ export var Cascader = /*#__PURE__*/ forwardRef(function(props, ref) {
234
234
  ];
235
235
  }
236
236
  });
237
- })();
238
- }, Promise.resolve(parent))
237
+ });
238
+ return function(promise, val, key) {
239
+ return _ref.apply(this, arguments);
240
+ };
241
+ }(), Promise.resolve(parent))
239
242
  ];
240
243
  case 2:
241
244
  _state.sent();
@@ -258,14 +261,17 @@ export var Cascader = /*#__PURE__*/ forwardRef(function(props, ref) {
258
261
  ];
259
262
  }
260
263
  });
261
- })();
262
- };
264
+ });
265
+ return function load() {
266
+ return _ref.apply(this, arguments);
267
+ };
268
+ }();
263
269
  if (lazy) load();
264
270
  }, [
265
271
  lazy
266
272
  ]);
267
- var chooseItem = function(pane, levelIndex) {
268
- return _async_to_generator(function() {
273
+ var chooseItem = /*#__PURE__*/ function() {
274
+ var _ref = _async_to_generator(function(pane, levelIndex) {
269
275
  var nextValue, nextPathNodes, _props_onPathChange, asyncOptions;
270
276
  return _ts_generator(this, function(_state) {
271
277
  switch(_state.label){
@@ -319,8 +325,11 @@ export var Cascader = /*#__PURE__*/ forwardRef(function(props, ref) {
319
325
  ];
320
326
  }
321
327
  });
322
- })();
323
- };
328
+ });
329
+ return function chooseItem(pane, levelIndex) {
330
+ return _ref.apply(this, arguments);
331
+ };
332
+ }();
324
333
  var renderCascaderItem = function(item, levelIndex) {
325
334
  var _item_pane;
326
335
  return (_item_pane = item.pane) === null || _item_pane === void 0 ? void 0 : _item_pane.map(function(pane, index) {
@@ -61,8 +61,8 @@ export var CollapseItem = function(props) {
61
61
  var _useState = _sliced_to_array(useState(0), 2), tran = _useState[0], setTran = _useState[1];
62
62
  var _useRefState = _sliced_to_array(useRefState(0), 2), currentHeight = _useRefState[0], setCurrentHeight = _useRefState[1];
63
63
  var _useState1 = _sliced_to_array(useState(0), 2), wrapperHeight = _useState1[0], setWrapperHeight = _useState1[1];
64
- var updateRectHeight = function() {
65
- return _async_to_generator(function() {
64
+ var updateRectHeight = /*#__PURE__*/ function() {
65
+ var _ref = _async_to_generator(function() {
66
66
  var res;
67
67
  return _ts_generator(this, function(_state) {
68
68
  switch(_state.label){
@@ -85,8 +85,11 @@ export var CollapseItem = function(props) {
85
85
  ];
86
86
  }
87
87
  });
88
- })();
89
- };
88
+ });
89
+ return function updateRectHeight() {
90
+ return _ref.apply(this, arguments);
91
+ };
92
+ }();
90
93
  useEffect(function() {
91
94
  nextTick(function() {
92
95
  updateRectHeight();
@@ -68,7 +68,8 @@ var InternalCountDown = function(props, ref) {
68
68
  } else {
69
69
  stateRef.current.handleEndTime = endTime;
70
70
  if (web()) {
71
- stateRef.current.diffTime = Date.now() - getTimeStamp(startTime); // 时间差
71
+ stateRef.current.diffTime = Date.now() - getTimeStamp(startTime) // 时间差
72
+ ;
72
73
  }
73
74
  }
74
75
  if (!stateRef.current.counting) stateRef.current.counting = true;
@@ -68,8 +68,8 @@ export var BaseDialog = function(props) {
68
68
  if (!(beforeCancel === null || beforeCancel === void 0 ? void 0 : beforeCancel())) return;
69
69
  onCancel();
70
70
  };
71
- var handleOk = function(e) {
72
- return _async_to_generator(function() {
71
+ var handleOk = /*#__PURE__*/ function() {
72
+ var _ref = _async_to_generator(function(e) {
73
73
  var e1;
74
74
  return _ts_generator(this, function(_state) {
75
75
  switch(_state.label){
@@ -109,8 +109,11 @@ export var BaseDialog = function(props) {
109
109
  ];
110
110
  }
111
111
  });
112
- })();
113
- };
112
+ });
113
+ return function handleOk(e) {
114
+ return _ref.apply(this, arguments);
115
+ };
116
+ }();
114
117
  var btnClass = hideCancelButton || hideConfirmButton ? "".concat(classPrefix, "-footer-block") : '';
115
118
  var renderCancelOfVertical = function() {
116
119
  return !hideCancelButton && /*#__PURE__*/ React.createElement(View, {
@@ -39,8 +39,8 @@ export var Drag = function(props) {
39
39
  var translateX = useRef(0);
40
40
  var translateY = useRef(0);
41
41
  var middleLine = useRef(0);
42
- var getInfo = function() {
43
- return _async_to_generator(function() {
42
+ var getInfo = /*#__PURE__*/ function() {
43
+ var _ref = _async_to_generator(function() {
44
44
  var el, top, left, bottom, right, _getWindowInfo, screenWidth, windowHeight, _ref, width, height, dragTop, dragLeft;
45
45
  return _ts_generator(this, function(_state) {
46
46
  switch(_state.label){
@@ -72,8 +72,11 @@ export var Drag = function(props) {
72
72
  ];
73
73
  }
74
74
  });
75
- })();
76
- };
75
+ });
76
+ return function getInfo() {
77
+ return _ref.apply(this, arguments);
78
+ };
79
+ }();
77
80
  var touchStart = function(e) {
78
81
  onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart();
79
82
  var touches = e.touches[0];
@@ -93,8 +93,8 @@ export var Elevator = function(props) {
93
93
  }
94
94
  });
95
95
  };
96
- var scrollTo = function(index) {
97
- return _async_to_generator(function() {
96
+ var scrollTo = /*#__PURE__*/ function() {
97
+ var _ref = _async_to_generator(function(index) {
98
98
  var cacheIndex, scrollTop;
99
99
  return _ts_generator(this, function(_state) {
100
100
  switch(_state.label){
@@ -134,8 +134,11 @@ export var Elevator = function(props) {
134
134
  ];
135
135
  }
136
136
  });
137
- })();
138
- };
137
+ });
138
+ return function scrollTo(index) {
139
+ return _ref.apply(this, arguments);
140
+ };
141
+ }();
139
142
  var touchMove = function(e) {
140
143
  var firstTouch = e.touches[0];
141
144
  touchState.current.y2 = firstTouch.pageY;
@@ -90,8 +90,8 @@ export var Ellipsis = function(props) {
90
90
  content
91
91
  ]);
92
92
  // 获取省略号宽度
93
- var getSymbolInfo = function() {
94
- return _async_to_generator(function() {
93
+ var getSymbolInfo = /*#__PURE__*/ function() {
94
+ var _ref = _async_to_generator(function() {
95
95
  var refe;
96
96
  return _ts_generator(this, function(_state) {
97
97
  switch(_state.label){
@@ -108,16 +108,19 @@ export var Ellipsis = function(props) {
108
108
  ];
109
109
  }
110
110
  });
111
- })();
112
- };
111
+ });
112
+ return function getSymbolInfo() {
113
+ return _ref.apply(this, arguments);
114
+ };
115
+ }();
113
116
  var symbolText = function() {
114
117
  if (direction === 'end' || direction === 'middle') {
115
118
  return "".concat(symbol).concat(expandText);
116
119
  }
117
120
  return "".concat(symbol).concat(expandText).concat(symbol);
118
121
  };
119
- var getReference = function() {
120
- return _async_to_generator(function() {
122
+ var getReference = /*#__PURE__*/ function() {
123
+ var _ref = _async_to_generator(function() {
121
124
  var query;
122
125
  return _ts_generator(this, function(_state) {
123
126
  query = createSelectorQuery();
@@ -154,11 +157,14 @@ export var Ellipsis = function(props) {
154
157
  2
155
158
  ];
156
159
  });
157
- })();
158
- };
160
+ });
161
+ return function getReference() {
162
+ return _ref.apply(this, arguments);
163
+ };
164
+ }();
159
165
  // 计算省略号的位置
160
- var calcEllipse = function() {
161
- return _async_to_generator(function() {
166
+ var calcEllipse = /*#__PURE__*/ function() {
167
+ var _ref = _async_to_generator(function() {
162
168
  var refe, rowNum, end, end1, start;
163
169
  return _ts_generator(this, function(_state) {
164
170
  switch(_state.label){
@@ -173,7 +179,8 @@ export var Ellipsis = function(props) {
173
179
  setExceeded(false);
174
180
  setCacled(true);
175
181
  } else {
176
- rowNum = Math.floor(content.length / (originHeight.current / lineH.current - 1)); // 每行的字数
182
+ rowNum = Math.floor(content.length / (originHeight.current / lineH.current - 1)) // 每行的字数
183
+ ;
177
184
  if (direction === 'middle') {
178
185
  end = content.length;
179
186
  ellipsis.current.leading = tailorContent(0, rowNum * (Number(rows) + 0.5), 'end');
@@ -196,11 +203,14 @@ export var Ellipsis = function(props) {
196
203
  ];
197
204
  }
198
205
  });
199
- })();
200
- };
206
+ });
207
+ return function calcEllipse() {
208
+ return _ref.apply(this, arguments);
209
+ };
210
+ }();
201
211
  // 验证省略号
202
- var verifyEllipsis = function() {
203
- return _async_to_generator(function() {
212
+ var verifyEllipsis = /*#__PURE__*/ function() {
213
+ var _ref = _async_to_generator(function() {
204
214
  var refe, _ellipsis_current_leading, _ellipsis_current, _ellipsis_current_leading1, _ellipsis_current1, _ellipsis_current2, _ellipsis_current_tailing, _ellipsis_current3;
205
215
  return _ts_generator(this, function(_state) {
206
216
  switch(_state.label){
@@ -229,8 +239,11 @@ export var Ellipsis = function(props) {
229
239
  ];
230
240
  }
231
241
  });
232
- })();
233
- };
242
+ });
243
+ return function verifyEllipsis() {
244
+ return _ref.apply(this, arguments);
245
+ };
246
+ }();
234
247
  var assignContent = function() {
235
248
  var _ellipsis_current, _ellipsis_current1, _ellipsis_current2, _ellipsis_current3;
236
249
  var newContent = "".concat(((_ellipsis_current = ellipsis.current) === null || _ellipsis_current === void 0 ? void 0 : _ellipsis_current.leading) || '').concat(((_ellipsis_current1 = ellipsis.current) === null || _ellipsis_current1 === void 0 ? void 0 : _ellipsis_current1.leading) ? symbol : '').concat(expandText || '').concat(((_ellipsis_current2 = ellipsis.current) === null || _ellipsis_current2 === void 0 ? void 0 : _ellipsis_current2.tailing) ? symbol : '').concat(((_ellipsis_current3 = ellipsis.current) === null || _ellipsis_current3 === void 0 ? void 0 : _ellipsis_current3.tailing) || '');
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { Form } from "./form";
2
3
  import { FormItem } from "../formitem/formitem";
3
4
  import { useForm, useWatch } from "./useform";
@@ -18,6 +18,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
18
18
  var _this = this;
19
19
  var _this1 = this;
20
20
  _class_call_check(this, FormStore);
21
+ var _this2 = this;
21
22
  // 初始化数据
22
23
  _define_property(this, "initialValues", {});
23
24
  _define_property(this, "updateList", []);
@@ -105,8 +106,8 @@ export var SECRET = 'NUT_FORM_INTERNAL';
105
106
  _define_property(this, "setCallback", function(callback) {
106
107
  _this.callbacks = _object_spread({}, _this.callbacks, callback);
107
108
  });
108
- _define_property(this, "validateEntities", function(entity, errs) {
109
- return _async_to_generator(function() {
109
+ _define_property(this, "validateEntities", /*#__PURE__*/ function() {
110
+ var _ref = _async_to_generator(function(entity, errs) {
110
111
  var _entity_props, name, _entity_props_rules, rules, descriptor, validator, _this_store, param, errors, _errs;
111
112
  return _ts_generator(this, function(_state) {
112
113
  switch(_state.label){
@@ -141,7 +142,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
141
142
  ]);
142
143
  return [
143
144
  4,
144
- validator.validate(_define_property({}, name, (_this_store = this.store) === null || _this_store === void 0 ? void 0 : _this_store[name]))
145
+ validator.validate(_define_property({}, name, (_this_store = _this2.store) === null || _this_store === void 0 ? void 0 : _this_store[name]))
145
146
  ];
146
147
  case 2:
147
148
  _state.sent();
@@ -155,7 +156,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
155
156
  if (errors) {
156
157
  ;
157
158
  (_errs = errs).push.apply(_errs, _to_consumable_array(errors));
158
- this.errors[name] = errors;
159
+ _this2.errors[name] = errors;
159
160
  }
160
161
  return [
161
162
  3,
@@ -163,7 +164,7 @@ export var SECRET = 'NUT_FORM_INTERNAL';
163
164
  ];
164
165
  case 4:
165
166
  if (!errs || errs.length === 0) {
166
- this.errors[name] = [];
167
+ _this2.errors[name] = [];
167
168
  }
168
169
  return [
169
170
  7
@@ -175,21 +176,23 @@ export var SECRET = 'NUT_FORM_INTERNAL';
175
176
  ];
176
177
  }
177
178
  });
178
- }).call(_this);
179
- });
180
- _define_property(this, "validateFields", function(nameList) {
181
- return _async_to_generator(function() {
182
- var _this, filterEntities, errs;
179
+ });
180
+ return function(entity, errs) {
181
+ return _ref.apply(this, arguments);
182
+ };
183
+ }());
184
+ _define_property(this, "validateFields", /*#__PURE__*/ function() {
185
+ var _ref = _async_to_generator(function(nameList) {
186
+ var filterEntities, errs;
183
187
  return _ts_generator(this, function(_state) {
184
188
  switch(_state.label){
185
189
  case 0:
186
- _this = this;
187
190
  filterEntities = [];
188
191
  // this.errors.length = 0
189
192
  if (!nameList || nameList.length === 0) {
190
- filterEntities = this.fieldEntities;
193
+ filterEntities = _this2.fieldEntities;
191
194
  } else {
192
- filterEntities = this.fieldEntities.filter(function(param) {
195
+ filterEntities = _this2.fieldEntities.filter(function(param) {
193
196
  var name = param.props.name;
194
197
  return nameList.includes(name);
195
198
  });
@@ -197,14 +200,14 @@ export var SECRET = 'NUT_FORM_INTERNAL';
197
200
  errs = [];
198
201
  return [
199
202
  4,
200
- Promise.all(filterEntities.map(function(entity) {
201
- return _async_to_generator(function() {
203
+ Promise.all(filterEntities.map(/*#__PURE__*/ function() {
204
+ var _ref = _async_to_generator(function(entity) {
202
205
  return _ts_generator(this, function(_state) {
203
206
  switch(_state.label){
204
207
  case 0:
205
208
  return [
206
209
  4,
207
- this.validateEntities(entity, errs)
210
+ _this2.validateEntities(entity, errs)
208
211
  ];
209
212
  case 1:
210
213
  _state.sent();
@@ -213,8 +216,11 @@ export var SECRET = 'NUT_FORM_INTERNAL';
213
216
  ];
214
217
  }
215
218
  });
216
- }).call(_this);
217
- }))
219
+ });
220
+ return function(entity) {
221
+ return _ref.apply(this, arguments);
222
+ };
223
+ }()))
218
224
  ];
219
225
  case 1:
220
226
  _state.sent();
@@ -224,34 +230,35 @@ export var SECRET = 'NUT_FORM_INTERNAL';
224
230
  ];
225
231
  }
226
232
  });
227
- }).call(_this);
228
- });
229
- _define_property(this, "submit", function() {
230
- return _async_to_generator(function() {
231
- var errors, _this_callbacks_onFinish, _this_callbacks, _this_callbacks_onFinishFailed, _this_callbacks1;
232
- return _ts_generator(this, function(_state) {
233
- switch(_state.label){
234
- case 0:
235
- return [
236
- 4,
237
- this.validateFields()
238
- ];
239
- case 1:
240
- errors = _state.sent();
241
- if (errors.length === 0) {
242
- ;
243
- (_this_callbacks_onFinish = (_this_callbacks = this.callbacks).onFinish) === null || _this_callbacks_onFinish === void 0 ? void 0 : _this_callbacks_onFinish.call(_this_callbacks, this.store);
244
- } else if (errors.length > 0) {
245
- ;
246
- (_this_callbacks_onFinishFailed = (_this_callbacks1 = this.callbacks).onFinishFailed) === null || _this_callbacks_onFinishFailed === void 0 ? void 0 : _this_callbacks_onFinishFailed.call(_this_callbacks1, this.store, errors);
247
- }
248
- return [
249
- 2
250
- ];
251
- }
252
- });
253
- }).call(_this);
254
- });
233
+ });
234
+ return function(nameList) {
235
+ return _ref.apply(this, arguments);
236
+ };
237
+ }());
238
+ _define_property(this, "submit", /*#__PURE__*/ _async_to_generator(function() {
239
+ var errors, _this_callbacks_onFinish, _this_callbacks, _this_callbacks_onFinishFailed, _this_callbacks1;
240
+ return _ts_generator(this, function(_state) {
241
+ switch(_state.label){
242
+ case 0:
243
+ return [
244
+ 4,
245
+ _this2.validateFields()
246
+ ];
247
+ case 1:
248
+ errors = _state.sent();
249
+ if (errors.length === 0) {
250
+ ;
251
+ (_this_callbacks_onFinish = (_this_callbacks = _this2.callbacks).onFinish) === null || _this_callbacks_onFinish === void 0 ? void 0 : _this_callbacks_onFinish.call(_this_callbacks, _this2.store);
252
+ } else if (errors.length > 0) {
253
+ ;
254
+ (_this_callbacks_onFinishFailed = (_this_callbacks1 = _this2.callbacks).onFinishFailed) === null || _this_callbacks_onFinishFailed === void 0 ? void 0 : _this_callbacks_onFinishFailed.call(_this_callbacks1, _this2.store, errors);
255
+ }
256
+ return [
257
+ 2
258
+ ];
259
+ }
260
+ });
261
+ }));
255
262
  _define_property(this, "resetFields", function(namePaths) {
256
263
  if (namePaths && namePaths.length) {
257
264
  namePaths.forEach(function(path) {
@@ -101,8 +101,8 @@ export var InfiniteLoading = function(props) {
101
101
  }
102
102
  onScroll && onScroll(e.target.scrollTop);
103
103
  };
104
- var lower = function() {
105
- return _async_to_generator(function() {
104
+ var lower = /*#__PURE__*/ function() {
105
+ var _ref = _async_to_generator(function() {
106
106
  return _ts_generator(this, function(_state) {
107
107
  switch(_state.label){
108
108
  case 0:
@@ -125,8 +125,11 @@ export var InfiniteLoading = function(props) {
125
125
  ];
126
126
  }
127
127
  });
128
- })();
129
- };
128
+ });
129
+ return function lower() {
130
+ return _ref.apply(this, arguments);
131
+ };
132
+ }();
130
133
  var touchStart = function(event) {
131
134
  if (scrollTop.current === 0 && !isTouching.current && pullRefresh) {
132
135
  y.current = event.touches[0].pageY;
@@ -148,8 +151,8 @@ export var InfiniteLoading = function(props) {
148
151
  isTouching.current = false;
149
152
  }
150
153
  };
151
- var touchEnd = function() {
152
- return _async_to_generator(function() {
154
+ var touchEnd = /*#__PURE__*/ function() {
155
+ var _ref = _async_to_generator(function() {
153
156
  return _ts_generator(this, function(_state) {
154
157
  switch(_state.label){
155
158
  case 0:
@@ -179,8 +182,11 @@ export var InfiniteLoading = function(props) {
179
182
  ];
180
183
  }
181
184
  });
182
- })();
183
- };
185
+ });
186
+ return function touchEnd() {
187
+ return _ref.apply(this, arguments);
188
+ };
189
+ }();
184
190
  return /*#__PURE__*/ React.createElement(ScrollView, _object_spread_props(_object_spread({}, rest), {
185
191
  className: classes,
186
192
  scrollY: true,
@@ -95,8 +95,8 @@ export var InputNumber = function(props) {
95
95
  var stepAmount = parseFloat(stepValue) * symbol;
96
96
  return (currentValue * dig + stepAmount * dig) / dig;
97
97
  };
98
- var update = function(negative, e) {
99
- return _async_to_generator(function() {
98
+ var update = /*#__PURE__*/ function() {
99
+ var _ref = _async_to_generator(function(negative, e) {
100
100
  var shouldOverBoundary, maybeResume, nextValue;
101
101
  return _ts_generator(this, function(_state) {
102
102
  switch(_state.label){
@@ -127,10 +127,13 @@ export var InputNumber = function(props) {
127
127
  ];
128
128
  }
129
129
  });
130
- })();
131
- };
132
- var handleReduce = function(e) {
133
- return _async_to_generator(function() {
130
+ });
131
+ return function update(negative, e) {
132
+ return _ref.apply(this, arguments);
133
+ };
134
+ }();
135
+ var handleReduce = /*#__PURE__*/ function() {
136
+ var _ref = _async_to_generator(function(e) {
134
137
  return _ts_generator(this, function(_state) {
135
138
  switch(_state.label){
136
139
  case 0:
@@ -148,10 +151,13 @@ export var InputNumber = function(props) {
148
151
  ];
149
152
  }
150
153
  });
151
- })();
152
- };
153
- var handlePlus = function(e) {
154
- return _async_to_generator(function() {
154
+ });
155
+ return function handleReduce(e) {
156
+ return _ref.apply(this, arguments);
157
+ };
158
+ }();
159
+ var handlePlus = /*#__PURE__*/ function() {
160
+ var _ref = _async_to_generator(function(e) {
155
161
  return _ts_generator(this, function(_state) {
156
162
  switch(_state.label){
157
163
  case 0:
@@ -169,15 +175,18 @@ export var InputNumber = function(props) {
169
175
  ];
170
176
  }
171
177
  });
172
- })();
173
- };
178
+ });
179
+ return function handlePlus(e) {
180
+ return _ref.apply(this, arguments);
181
+ };
182
+ }();
174
183
  var parseValue = function(text) {
175
184
  if (text === '') return null;
176
185
  if (text === '-') return null;
177
186
  return text;
178
187
  };
179
- var handleInputChange = function(e) {
180
- return _async_to_generator(function() {
188
+ var handleInputChange = /*#__PURE__*/ function() {
189
+ var _ref = _async_to_generator(function(e) {
181
190
  var valueStr, maybeResume;
182
191
  return _ts_generator(this, function(_state) {
183
192
  switch(_state.label){
@@ -206,8 +215,11 @@ export var InputNumber = function(props) {
206
215
  ];
207
216
  }
208
217
  });
209
- })();
210
- };
218
+ });
219
+ return function handleInputChange(e) {
220
+ return _ref.apply(this, arguments);
221
+ };
222
+ }();
211
223
  var handleFocus = function(e) {
212
224
  setFocused(true);
213
225
  setInputValue(shadowValue !== undefined && shadowValue !== null ? bound(Number(shadowValue), Number(min), Number(max)).toString() : '');
@@ -1 +1 @@
1
- export { };
1
+ import React from "react";
@@ -48,30 +48,28 @@ export var MenuItem = /*#__PURE__*/ forwardRef(function(props, ref) {
48
48
  show
49
49
  ]);
50
50
  var getParentOffset = useCallback(function() {
51
- setTimeout(function() {
52
- return _async_to_generator(function() {
53
- var p, rect;
54
- return _ts_generator(this, function(_state) {
55
- switch(_state.label){
56
- case 0:
57
- p = parent.menuRef.current;
58
- return [
59
- 4,
60
- getRectInMultiPlatform(p)
61
- ];
62
- case 1:
63
- rect = _state.sent();
64
- setPosition({
65
- height: rect.height,
66
- top: rect.top
67
- });
68
- return [
69
- 2
70
- ];
71
- }
72
- });
73
- })();
74
- }, 100);
51
+ setTimeout(/*#__PURE__*/ _async_to_generator(function() {
52
+ var p, rect;
53
+ return _ts_generator(this, function(_state) {
54
+ switch(_state.label){
55
+ case 0:
56
+ p = parent.menuRef.current;
57
+ return [
58
+ 4,
59
+ getRectInMultiPlatform(p)
60
+ ];
61
+ case 1:
62
+ rect = _state.sent();
63
+ setPosition({
64
+ height: rect.height,
65
+ top: rect.top
66
+ });
67
+ return [
68
+ 2
69
+ ];
70
+ }
71
+ });
72
+ }), 100);
75
73
  }, [
76
74
  parent.menuRef
77
75
  ]);