antd-mobile 5.6.0 → 5.7.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 (197) hide show
  1. package/2x/cjs/components/calendar/calendar.d.ts +4 -3
  2. package/2x/cjs/components/calendar/calendar.js +67 -56
  3. package/2x/cjs/components/calendar/convert.d.ts +2 -0
  4. package/2x/cjs/components/calendar/convert.js +22 -0
  5. package/2x/cjs/components/collapse/collapse.js +7 -0
  6. package/2x/cjs/components/empty/empty-icon.d.ts +3 -0
  7. package/2x/cjs/components/empty/empty-icon.js +37 -0
  8. package/2x/cjs/components/empty/empty.js +27 -15
  9. package/2x/cjs/components/error-block/error-block.css +1 -0
  10. package/2x/cjs/components/error-block/error-block.js +3 -8
  11. package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
  12. package/2x/cjs/components/error-block/images/busy.js +102 -0
  13. package/2x/cjs/components/error-block/images/default.d.ts +1 -0
  14. package/2x/cjs/components/error-block/images/default.js +178 -0
  15. package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
  16. package/2x/cjs/components/error-block/images/disconnected.js +135 -0
  17. package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
  18. package/2x/cjs/components/error-block/images/empty.js +131 -0
  19. package/2x/cjs/components/error-block/images/index.d.ts +2 -0
  20. package/2x/cjs/components/error-block/images/index.js +22 -0
  21. package/2x/cjs/components/form/form-item.d.ts +1 -1
  22. package/2x/cjs/components/form/form-item.js +4 -1
  23. package/2x/cjs/components/image-viewer/methods.d.ts +1 -4
  24. package/2x/cjs/components/image-viewer/methods.js +7 -58
  25. package/2x/cjs/components/picker/picker.js +6 -9
  26. package/2x/cjs/components/picker-view/columns-extend.d.ts +3 -0
  27. package/2x/cjs/components/picker-view/columns-extend.js +45 -0
  28. package/2x/cjs/components/picker-view/picker-view.d.ts +1 -0
  29. package/2x/cjs/components/picker-view/picker-view.js +14 -16
  30. package/2x/cjs/components/popover/popover.css +1 -0
  31. package/2x/cjs/components/result/result.d.ts +2 -2
  32. package/2x/cjs/components/virtual-input/virtual-input.js +25 -14
  33. package/2x/cjs/utils/render-imperatively.js +17 -7
  34. package/2x/cjs/utils/with-cache.d.ts +1 -0
  35. package/2x/cjs/utils/with-cache.js +17 -0
  36. package/2x/es/components/calendar/calendar.d.ts +4 -3
  37. package/2x/es/components/calendar/calendar.js +67 -58
  38. package/2x/es/components/calendar/convert.d.ts +2 -0
  39. package/2x/es/components/calendar/convert.js +15 -0
  40. package/2x/es/components/collapse/collapse.js +7 -0
  41. package/2x/es/components/empty/empty-icon.d.ts +3 -0
  42. package/2x/es/components/empty/empty-icon.js +24 -0
  43. package/2x/es/components/empty/empty.js +27 -14
  44. package/2x/es/components/error-block/error-block.css +1 -0
  45. package/2x/es/components/error-block/error-block.js +2 -6
  46. package/2x/es/components/error-block/images/busy.d.ts +1 -0
  47. package/2x/es/components/error-block/images/busy.js +90 -0
  48. package/2x/es/components/error-block/images/default.d.ts +1 -0
  49. package/2x/es/components/error-block/images/default.js +166 -0
  50. package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
  51. package/2x/es/components/error-block/images/disconnected.js +123 -0
  52. package/2x/es/components/error-block/images/empty.d.ts +1 -0
  53. package/2x/es/components/error-block/images/empty.js +119 -0
  54. package/2x/es/components/error-block/images/index.d.ts +2 -0
  55. package/2x/es/components/error-block/images/index.js +10 -0
  56. package/2x/es/components/form/form-item.d.ts +1 -1
  57. package/2x/es/components/form/form-item.js +4 -1
  58. package/2x/es/components/image-viewer/methods.d.ts +1 -4
  59. package/2x/es/components/image-viewer/methods.js +6 -50
  60. package/2x/es/components/picker/picker.js +6 -8
  61. package/2x/es/components/picker-view/columns-extend.d.ts +3 -0
  62. package/2x/es/components/picker-view/columns-extend.js +34 -0
  63. package/2x/es/components/picker-view/picker-view.d.ts +1 -0
  64. package/2x/es/components/picker-view/picker-view.js +14 -15
  65. package/2x/es/components/popover/popover.css +1 -0
  66. package/2x/es/components/result/result.d.ts +2 -2
  67. package/2x/es/components/virtual-input/virtual-input.js +23 -14
  68. package/2x/es/utils/render-imperatively.js +16 -8
  69. package/2x/es/utils/with-cache.d.ts +1 -0
  70. package/2x/es/utils/with-cache.js +10 -0
  71. package/2x/package.json +1 -1
  72. package/cjs/components/calendar/calendar.d.ts +4 -3
  73. package/cjs/components/calendar/calendar.js +67 -56
  74. package/cjs/components/calendar/convert.d.ts +2 -0
  75. package/cjs/components/calendar/convert.js +22 -0
  76. package/cjs/components/collapse/collapse.js +7 -0
  77. package/cjs/components/empty/empty-icon.d.ts +3 -0
  78. package/cjs/components/empty/empty-icon.js +37 -0
  79. package/cjs/components/empty/empty.js +27 -15
  80. package/cjs/components/error-block/error-block.css +1 -0
  81. package/cjs/components/error-block/error-block.js +3 -8
  82. package/cjs/components/error-block/images/busy.d.ts +1 -0
  83. package/cjs/components/error-block/images/busy.js +102 -0
  84. package/cjs/components/error-block/images/default.d.ts +1 -0
  85. package/cjs/components/error-block/images/default.js +178 -0
  86. package/cjs/components/error-block/images/disconnected.d.ts +1 -0
  87. package/cjs/components/error-block/images/disconnected.js +135 -0
  88. package/cjs/components/error-block/images/empty.d.ts +1 -0
  89. package/cjs/components/error-block/images/empty.js +131 -0
  90. package/cjs/components/error-block/images/index.d.ts +2 -0
  91. package/cjs/components/error-block/images/index.js +22 -0
  92. package/cjs/components/form/form-item.d.ts +1 -1
  93. package/cjs/components/form/form-item.js +4 -1
  94. package/cjs/components/image-viewer/methods.d.ts +1 -4
  95. package/cjs/components/image-viewer/methods.js +7 -58
  96. package/cjs/components/picker/picker.js +6 -9
  97. package/cjs/components/picker-view/columns-extend.d.ts +3 -0
  98. package/cjs/components/picker-view/columns-extend.js +45 -0
  99. package/cjs/components/picker-view/picker-view.d.ts +1 -0
  100. package/cjs/components/picker-view/picker-view.js +14 -16
  101. package/cjs/components/popover/popover.css +1 -0
  102. package/cjs/components/result/result.d.ts +2 -2
  103. package/cjs/components/virtual-input/virtual-input.js +25 -14
  104. package/cjs/utils/render-imperatively.js +17 -7
  105. package/cjs/utils/with-cache.d.ts +1 -0
  106. package/cjs/utils/with-cache.js +17 -0
  107. package/es/components/calendar/calendar.d.ts +4 -3
  108. package/es/components/calendar/calendar.js +67 -58
  109. package/es/components/calendar/convert.d.ts +2 -0
  110. package/es/components/calendar/convert.js +15 -0
  111. package/es/components/collapse/collapse.js +7 -0
  112. package/es/components/empty/empty-icon.d.ts +3 -0
  113. package/es/components/empty/empty-icon.js +24 -0
  114. package/es/components/empty/empty.js +27 -14
  115. package/es/components/error-block/error-block.css +1 -0
  116. package/es/components/error-block/error-block.js +2 -6
  117. package/es/components/error-block/images/busy.d.ts +1 -0
  118. package/es/components/error-block/images/busy.js +90 -0
  119. package/es/components/error-block/images/default.d.ts +1 -0
  120. package/es/components/error-block/images/default.js +166 -0
  121. package/es/components/error-block/images/disconnected.d.ts +1 -0
  122. package/es/components/error-block/images/disconnected.js +123 -0
  123. package/es/components/error-block/images/empty.d.ts +1 -0
  124. package/es/components/error-block/images/empty.js +119 -0
  125. package/es/components/error-block/images/index.d.ts +2 -0
  126. package/es/components/error-block/images/index.js +10 -0
  127. package/es/components/form/form-item.d.ts +1 -1
  128. package/es/components/form/form-item.js +4 -1
  129. package/es/components/image-viewer/methods.d.ts +1 -4
  130. package/es/components/image-viewer/methods.js +6 -50
  131. package/es/components/picker/picker.js +6 -8
  132. package/es/components/picker-view/columns-extend.d.ts +3 -0
  133. package/es/components/picker-view/columns-extend.js +34 -0
  134. package/es/components/picker-view/picker-view.d.ts +1 -0
  135. package/es/components/picker-view/picker-view.js +14 -15
  136. package/es/components/popover/popover.css +1 -0
  137. package/es/components/result/result.d.ts +2 -2
  138. package/es/components/virtual-input/virtual-input.js +23 -14
  139. package/es/utils/render-imperatively.js +16 -8
  140. package/es/utils/with-cache.d.ts +1 -0
  141. package/es/utils/with-cache.js +10 -0
  142. package/package.json +1 -1
  143. package/umd/antd-mobile.js +1 -1
  144. package/2x/assets/busy.svg +0 -42
  145. package/2x/assets/default.svg +0 -53
  146. package/2x/assets/disconnected.svg +0 -60
  147. package/2x/assets/empty-icon.svg +0 -18
  148. package/2x/assets/empty.svg +0 -52
  149. package/2x/cjs/assets/busy.svg +0 -42
  150. package/2x/cjs/assets/default.svg +0 -53
  151. package/2x/cjs/assets/disconnected.svg +0 -60
  152. package/2x/cjs/assets/empty-icon.svg +0 -18
  153. package/2x/cjs/assets/empty.svg +0 -52
  154. package/2x/cjs/components/error-block/error.d.ts +0 -1
  155. package/2x/cjs/components/error-block/error.js +0 -24
  156. package/2x/cjs/components/picker-view/use-columns.d.ts +0 -2
  157. package/2x/cjs/components/picker-view/use-columns.js +0 -18
  158. package/2x/cjs/components/picker-view/use-picker-value-extend.d.ts +0 -2
  159. package/2x/cjs/components/picker-view/use-picker-value-extend.js +0 -37
  160. package/2x/es/assets/busy.svg +0 -42
  161. package/2x/es/assets/default.svg +0 -53
  162. package/2x/es/assets/disconnected.svg +0 -60
  163. package/2x/es/assets/empty-icon.svg +0 -18
  164. package/2x/es/assets/empty.svg +0 -52
  165. package/2x/es/components/error-block/error.d.ts +0 -1
  166. package/2x/es/components/error-block/error.js +0 -10
  167. package/2x/es/components/picker-view/use-columns.d.ts +0 -2
  168. package/2x/es/components/picker-view/use-columns.js +0 -10
  169. package/2x/es/components/picker-view/use-picker-value-extend.d.ts +0 -2
  170. package/2x/es/components/picker-view/use-picker-value-extend.js +0 -26
  171. package/assets/busy.svg +0 -42
  172. package/assets/default.svg +0 -53
  173. package/assets/disconnected.svg +0 -60
  174. package/assets/empty-icon.svg +0 -18
  175. package/assets/empty.svg +0 -52
  176. package/cjs/assets/busy.svg +0 -42
  177. package/cjs/assets/default.svg +0 -53
  178. package/cjs/assets/disconnected.svg +0 -60
  179. package/cjs/assets/empty-icon.svg +0 -18
  180. package/cjs/assets/empty.svg +0 -52
  181. package/cjs/components/error-block/error.d.ts +0 -1
  182. package/cjs/components/error-block/error.js +0 -24
  183. package/cjs/components/picker-view/use-columns.d.ts +0 -2
  184. package/cjs/components/picker-view/use-columns.js +0 -18
  185. package/cjs/components/picker-view/use-picker-value-extend.d.ts +0 -2
  186. package/cjs/components/picker-view/use-picker-value-extend.js +0 -37
  187. package/es/assets/busy.svg +0 -42
  188. package/es/assets/default.svg +0 -53
  189. package/es/assets/disconnected.svg +0 -60
  190. package/es/assets/empty-icon.svg +0 -18
  191. package/es/assets/empty.svg +0 -52
  192. package/es/components/error-block/error.d.ts +0 -1
  193. package/es/components/error-block/error.js +0 -10
  194. package/es/components/picker-view/use-columns.d.ts +0 -2
  195. package/es/components/picker-view/use-columns.js +0 -10
  196. package/es/components/picker-view/use-picker-value-extend.d.ts +0 -2
  197. package/es/components/picker-view/use-picker-value-extend.js +0 -26
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.emptyImage = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const emptyImage = _react.default.createElement("svg", {
13
+ viewBox: '0 0 400 400',
14
+ xmlns: 'http://www.w3.org/2000/svg',
15
+ xmlnsXlink: 'http://www.w3.org/1999/xlink'
16
+ }, _react.default.createElement("defs", null, _react.default.createElement("linearGradient", {
17
+ x1: '50%',
18
+ y1: '-116.862%',
19
+ x2: '50%',
20
+ y2: '90.764%',
21
+ id: 'error-block-image-empty-a'
22
+ }, _react.default.createElement("stop", {
23
+ stopColor: '#72A7FD',
24
+ stopOpacity: 0.207,
25
+ offset: '0%'
26
+ }), _react.default.createElement("stop", {
27
+ stopColor: '#72A7FD',
28
+ stopOpacity: 0.115,
29
+ offset: '80.072%'
30
+ }), _react.default.createElement("stop", {
31
+ stopColor: '#72A7FD',
32
+ stopOpacity: 0,
33
+ offset: '100%'
34
+ })), _react.default.createElement("path", {
35
+ d: 'M146.183 18.461c31.705 23.336 33.349 71.85 4.93 96.614-.252.22 6.172 5.602 13.577 11.414l.686.537.69.54.695.54.348.27.698.54a341.27 341.27 0 0 0 8.806 6.596c1.114.802 4.643-.853 10.587-4.965l-.532 12.218a1.2 1.2 0 0 1-.481.91l-10.868 8.111c-1.405 1.048-3.32 1.185-4.854.072l-35.578-25.834c-33.414 17.333-79.913 15-109.804-7-33.444-24.616-33.444-75.95 0-100.563 33.443-24.615 87.657-24.615 121.1 0Zm-60.469 7.653C51.63 26.114 24 44.534 24 67.257S51.63 108.4 85.714 108.4s61.715-18.42 61.715-41.143c0-22.722-27.63-41.143-61.715-41.143Z',
36
+ id: 'error-block-image-empty-b'
37
+ })), _react.default.createElement("g", {
38
+ fill: 'none',
39
+ fillRule: 'evenodd'
40
+ }, _react.default.createElement("path", {
41
+ d: 'M157.964 244.661H0L3.806 100.13a4.572 4.572 0 0 1 4.353-4.446l.217-.006h45.588V68.2a4.572 4.572 0 0 1 4.356-4.567l.216-.005h65.498l2.554-58.689a4.571 4.571 0 0 1 4.779-4.367l.214.015 87.79 8.222a4.572 4.572 0 0 1 4.126 4.133l.015.212 3.146 69.652L301.634 64.9a4.571 4.571 0 0 1 5.628 4.231l.005.215v43.955l56.162.001v130.264h-56.163v.001h-82.383v-.004h-66.919v1.098ZM89.503 160.03h-9.968v8.436h9.968v-8.436Zm0-14.507h-9.968v8.435h9.968v-8.435Zm197.985-5.15h-9.967v8.432h9.967v-8.431Zm-197.985-8.806h-9.968v8.436h9.968v-8.436Zm197.985-5.153h-9.967v8.432h9.967v-8.432Zm0-14.503h-9.967v8.432h9.967v-8.432Zm-84.643-.777h-30.8v8.436h30.8v-8.436Zm84.643-13.186h-9.967v8.436h9.967v-8.436Zm-84.643-3.29h-30.8v8.436h30.8v-8.436Zm0-15.912h-30.8v8.436h30.8v-8.436Z',
42
+ transform: 'translate(18.286 50.286)',
43
+ fill: 'url(#error-block-image-empty-a)'
44
+ }), _react.default.createElement("g", {
45
+ transform: 'translate(108.571 189.886)'
46
+ }, _react.default.createElement("mask", {
47
+ id: 'error-block-image-empty-c',
48
+ fill: '#fff'
49
+ }, _react.default.createElement("use", {
50
+ xlinkHref: '#error-block-image-empty-b'
51
+ })), _react.default.createElement("use", {
52
+ fill: '#377EFF',
53
+ xlinkHref: '#error-block-image-empty-b'
54
+ }), _react.default.createElement("path", {
55
+ d: 'M131.429 134.686a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285ZM128 133.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm21.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-9.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm12-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM120 128.971a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm16-1.142.125.006a1.143 1.143 0 1 1-.125-.006Zm11.429 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-22.857 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm17.143-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285ZM136 125.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-13.143 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm4.572-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm18.857-2.286a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-16-1.143.124.007a1.143 1.143 0 1 1-.124-.007Zm11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm36.572 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-37.143 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm13.715-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm9.714-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm18.286-3.428a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-11.429 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-28 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm17.715-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm17.143-4.571a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.428 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-5.143 1.142a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-8-1.142a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm-9.143 0a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm30.286-3.429a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM124 109.543a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.715-4.572a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-22.858-1.142a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm-11.428-3.429a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM124 99.257a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM49.143 55.829a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-9.143-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm21.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM52 52.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm12-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-19.429-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm16-1.143.124.007a1.143 1.143 0 1 1-.124-.007Zm11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm17.143-1.142a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.429-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-13.143 1.143a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm4.572-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM64 44.4a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-16-1.143.125.007a1.143 1.143 0 1 1-.125-.007Zm11.429 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.858 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm36.572 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM30.286 44.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM44 43.257a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm9.714-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM72 38.686a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.429 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-28 1.143a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm5.715-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM56 37.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM60.57 32.97a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM44 34.114a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-8-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-9.143 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm30.286-3.428a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-15.429 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.715 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714-4.572a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-22.857-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-11.429-3.428a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM41.714 20.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Z',
56
+ fill: '#003CFF',
57
+ fillRule: 'nonzero',
58
+ mask: 'url(#error-block-image-empty-c)'
59
+ })), _react.default.createElement("path", {
60
+ d: 'M295.213 319.24c.744.546.745 1.433.002 1.98l-11.806 8.81c-1.069.799-3.326.474-4.853-.609l-35.622-25.241c-33.375 17.037-79.545 14.615-109.28-7.271-33.443-24.615-33.443-64.521 0-89.133 33.443-24.616 87.657-24.616 121.1 0 31.706 23.336 33.35 60.42 4.931 85.185-.543.473 35.528 26.278 35.528 26.278ZM148.06 220.015c-25.44 17.853-25.44 46.8 0 64.652 25.44 17.85 66.689 17.85 92.129 0 25.436-17.853 25.436-46.799 0-64.652-25.44-17.853-66.688-17.853-92.129 0Z',
61
+ fill: '#5D96FE'
62
+ }), _react.default.createElement("path", {
63
+ d: 'M123.514 233.021c2.185-5.241 5.67-9.735 10.453-13.482M264.967 271.54c-2.185 5.24-5.67 9.734-10.453 13.481',
64
+ stroke: '#FFF',
65
+ strokeWidth: 0.75,
66
+ strokeLinecap: 'round',
67
+ strokeLinejoin: 'round'
68
+ }), _react.default.createElement("path", {
69
+ d: 'M81.143 252.571c7.574 0 13.714 23.88 13.714 31.649 0 6.97-4.942 12.755-11.429 13.871v11.672c0 1.235-.767 2.237-1.713 2.237-.904 0-1.644-.912-1.71-2.07l-.005-.167v-11.526c-7.04-.595-12.571-6.644-12.571-14.017 0-7.024 5.02-27.222 11.581-31.027l.096-.053c.027-.016.055-.03.082-.045l.067-.035.066-.033.1-.05.094-.041a3.34 3.34 0 0 1 .224-.093l.11-.042.097-.032c.038-.013.077-.025.115-.036l.053-.016.053-.014a3.351 3.351 0 0 1 .23-.055l.085-.016a3.95 3.95 0 0 1 .441-.054l.11-.005.11-.002Z',
70
+ fill: '#FFCD6B',
71
+ fillRule: 'nonzero'
72
+ }), _react.default.createElement("g", {
73
+ transform: 'translate(283.429 177.143)',
74
+ fillRule: 'nonzero'
75
+ }, _react.default.createElement("path", {
76
+ d: 'M22.475.847c12.34 0 22.345 37.935 22.345 50.276 0 11.395-8.53 20.798-19.552 22.172v19.019c0 1.932-1.25 3.5-2.792 3.5-1.49 0-2.707-1.46-2.79-3.301l-.004-.2-.001-19.018C8.659 71.92.13 62.518.13 51.123.13 40.071 8.154 8.49 18.694 2.015l.054-.031a5.94 5.94 0 0 1 .214-.128l.088-.048c.213-.12.427-.228.642-.326l.135-.06.18-.075.135-.053a5.796 5.796 0 0 1 .464-.16 4.44 4.44 0 0 1 .33-.092l.124-.03a7.122 7.122 0 0 1 .31-.065l.018-.003a6.305 6.305 0 0 1 .756-.088l.165-.007.166-.002Z',
77
+ fill: '#FFCD6B'
78
+ }), _react.default.createElement("path", {
79
+ d: 'M22.475.847c12.34 0 22.345 37.935 22.345 50.276 0 11.395-8.53 20.798-19.552 22.172v19.019c0 1.932-1.25 3.5-2.792 3.5-1.543 0-2.794-1.566-2.794-3.5V73.295C8.659 71.921.13 62.518.13 51.123.13 38.783 10.134.847 22.475.847Z',
80
+ fill: '#FFCD6B'
81
+ }), _react.default.createElement("circle", {
82
+ fill: '#FFB400',
83
+ cx: 26.4,
84
+ cy: 56.869,
85
+ r: 1.45
86
+ }), _react.default.createElement("circle", {
87
+ fill: '#FFB400',
88
+ cx: 39.453,
89
+ cy: 58.319,
90
+ r: 1
91
+ }), _react.default.createElement("circle", {
92
+ fill: '#FFB400',
93
+ cx: 17.698,
94
+ cy: 63.637,
95
+ r: 2.417
96
+ }), _react.default.createElement("circle", {
97
+ fill: '#FFB400',
98
+ cx: 38.002,
99
+ cy: 51.068,
100
+ r: 2.417
101
+ }), _react.default.createElement("circle", {
102
+ fill: '#FFB400',
103
+ cx: 18.665,
104
+ cy: 17.228,
105
+ r: 2.417
106
+ }), _react.default.createElement("circle", {
107
+ fill: '#FFB400',
108
+ cx: 32.201,
109
+ cy: 13.36,
110
+ r: 2.417
111
+ }), _react.default.createElement("circle", {
112
+ fill: '#FFB400',
113
+ cx: 26.83,
114
+ cy: 20.666,
115
+ r: 1.45
116
+ }), _react.default.createElement("circle", {
117
+ fill: '#FFB400',
118
+ cx: 38.969,
119
+ cy: 31.731,
120
+ r: 2.417
121
+ }), _react.default.createElement("circle", {
122
+ fill: '#FFB400',
123
+ cx: 25.433,
124
+ cy: 29.797,
125
+ r: 1.45
126
+ }), _react.default.createElement("path", {
127
+ d: 'M34.197 53.033c0 9.825-6.934 18.017-16.172 19.987a22.44 22.44 0 0 0 4.45.448c12.34 0 22.344-10.004 22.344-22.345C44.82 38.783 34.815.847 22.475.847c8.947 14.03 11.722 40.891 11.722 52.186Z',
128
+ fill: '#FBBE47'
129
+ }))));
130
+
131
+ exports.emptyImage = emptyImage;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export declare const imageRecord: Record<'default' | 'disconnected' | 'empty' | 'busy', ReactElement>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.imageRecord = void 0;
7
+
8
+ var _default = require("./default");
9
+
10
+ var _disconnected = require("./disconnected");
11
+
12
+ var _empty = require("./empty");
13
+
14
+ var _busy = require("./busy");
15
+
16
+ const imageRecord = {
17
+ 'default': _default.defaultImage,
18
+ 'disconnected': _disconnected.disconnectedImage,
19
+ 'empty': _empty.emptyImage,
20
+ 'busy': _busy.busyImage
21
+ };
22
+ exports.imageRecord = imageRecord;
@@ -7,7 +7,7 @@ import type { FormLayout } from './index';
7
7
  declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
8
8
  declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
9
9
  declare type RcFieldProps = Omit<FieldProps, 'children'>;
10
- export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow' | 'description'> & {
10
+ export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'clickable' | 'arrow' | 'description'> & {
11
11
  label?: React.ReactNode;
12
12
  help?: React.ReactNode;
13
13
  hasFeedback?: boolean;
@@ -120,6 +120,7 @@ const FormItemLayout = props => {
120
120
  }),
121
121
  disabled: disabled,
122
122
  onClick: props.onClick,
123
+ clickable: props.clickable,
123
124
  arrow: arrow
124
125
  }, _react.default.createElement("div", {
125
126
  className: (0, _classnames.default)(`${classPrefix}-child`, `${classPrefix}-child-position-${childElementPosition}`)
@@ -155,9 +156,10 @@ const FormItem = props => {
155
156
  onClick,
156
157
  shouldUpdate,
157
158
  dependencies,
159
+ clickable,
158
160
  arrow
159
161
  } = props,
160
- fieldProps = (0, _tslib.__rest)(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
162
+ fieldProps = (0, _tslib.__rest)(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
161
163
 
162
164
  const {
163
165
  validateTrigger: contextValidateTrigger
@@ -232,6 +234,7 @@ const FormItem = props => {
232
234
  hidden: hidden,
233
235
  layout: layout,
234
236
  childElementPosition: childElementPosition,
237
+ clickable: clickable,
235
238
  arrow: arrow
236
239
  }, _react.default.createElement(_context.NoStyleItemContext.Provider, {
237
240
  value: onSubMetaChange
@@ -3,8 +3,5 @@ export declare type ImageViewerShowHandler = {
3
3
  close: () => void;
4
4
  };
5
5
  export declare function showImageViewer(props: Omit<ImageViewerProps, 'visible'>): ImageViewerShowHandler;
6
- export declare function showMultiImageViewer(props: Omit<MultiImageViewerProps, 'visible'>): {
7
- close: () => void;
8
- };
6
+ export declare function showMultiImageViewer(props: Omit<MultiImageViewerProps, 'visible'>): ImageViewerShowHandler;
9
7
  export declare function clearImageViewer(): void;
10
- export declare const getH: () => void;
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.clearImageViewer = clearImageViewer;
7
- exports.getH = void 0;
8
7
  exports.showImageViewer = showImageViewer;
9
8
  exports.showMultiImageViewer = showMultiImageViewer;
10
9
 
11
- var _react = _interopRequireWildcard(require("react"));
12
-
13
- var _renderToBody = require("../../utils/render-to-body");
10
+ var _react = _interopRequireDefault(require("react"));
14
11
 
15
12
  var _imageViewer = require("./image-viewer");
16
13
 
17
14
  var _renderImperatively = require("../../utils/render-imperatively");
18
15
 
19
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
-
21
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
17
 
23
18
  const handlerSet = new Set();
24
19
 
@@ -38,54 +33,14 @@ function showImageViewer(props) {
38
33
 
39
34
  function showMultiImageViewer(props) {
40
35
  clearImageViewer();
41
- const Wrapper = (0, _react.forwardRef)((_, ref) => {
42
- const [visible, setVisible] = (0, _react.useState)(false);
43
- const closedRef = (0, _react.useRef)(false);
44
- (0, _react.useEffect)(() => {
45
- if (!closedRef.current) {
46
- setVisible(true);
47
- } else {
48
- handleAfterClose();
49
- }
50
- }, []);
51
-
52
- function handleClose() {
53
- var _a;
54
-
55
- closedRef.current = true;
56
- (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
57
- setVisible(false);
58
- }
59
-
60
- (0, _react.useImperativeHandle)(ref, () => ({
61
- close: handleClose
62
- }));
63
-
64
- function handleAfterClose() {
36
+ const handler = (0, _renderImperatively.renderImperatively)(_react.default.createElement(_imageViewer.MultiImageViewer, Object.assign({}, props, {
37
+ afterClose: () => {
65
38
  var _a;
66
39
 
67
- (_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
68
- unmount();
69
40
  handlerSet.delete(handler);
41
+ (_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
70
42
  }
71
-
72
- return _react.default.createElement(_imageViewer.MultiImageViewer, Object.assign({}, props, {
73
- visible: visible,
74
- onClose: handleClose,
75
- afterClose: handleAfterClose
76
- }));
77
- });
78
- const ref = (0, _react.createRef)();
79
- const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, {
80
- ref: ref
81
- }));
82
- const handler = {
83
- close: () => {
84
- var _a;
85
-
86
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
87
- }
88
- };
43
+ })));
89
44
  handlerSet.add(handler);
90
45
  return handler;
91
46
  }
@@ -95,10 +50,4 @@ function clearImageViewer() {
95
50
  handler.close();
96
51
  });
97
52
  handlerSet.clear();
98
- }
99
-
100
- const getH = () => {
101
- console.log(handlerSet);
102
- };
103
-
104
- exports.getH = getH;
53
+ }
@@ -17,12 +17,10 @@ var _usePropsValue = require("../../utils/use-props-value");
17
17
 
18
18
  var _pickerView = _interopRequireDefault(require("../picker-view"));
19
19
 
20
- var _useColumns = require("../picker-view/use-columns");
20
+ var _columnsExtend = require("../picker-view/columns-extend");
21
21
 
22
22
  var _configProvider = require("../config-provider");
23
23
 
24
- var _usePickerValueExtend = require("../picker-view/use-picker-value-extend");
25
-
26
24
  var _ahooks = require("ahooks");
27
25
 
28
26
  var _safeArea = _interopRequireDefault(require("../safe-area"));
@@ -52,12 +50,11 @@ const Picker = (0, _react.memo)(p => {
52
50
  onChange: val => {
53
51
  var _a;
54
52
 
55
- (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, val, generateValueExtend(val));
53
+ const extend = (0, _columnsExtend.generateColumnsExtend)(props.columns, val);
54
+ (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
56
55
  }
57
- })); // TODO: columns generated twice in Picker and PickerView, which can be improved
58
-
59
- const columns = (0, _useColumns.useColumns)(props.columns, value);
60
- const generateValueExtend = (0, _usePickerValueExtend.usePickerValueExtend)(columns);
56
+ }));
57
+ const extend = (0, _columnsExtend.useColumnsExtend)(props.columns, value);
61
58
  const [innerValue, setInnerValue] = (0, _react.useState)(value);
62
59
  (0, _react.useEffect)(() => {
63
60
  if (innerValue !== value) {
@@ -130,7 +127,7 @@ const Picker = (0, _react.memo)(p => {
130
127
  position: 'bottom'
131
128
  }));
132
129
 
133
- return _react.default.createElement(_react.default.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, generateValueExtend(value).items));
130
+ return _react.default.createElement(_react.default.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, extend.items));
134
131
  });
135
132
  exports.Picker = Picker;
136
133
  Picker.displayName = 'Picker';
@@ -0,0 +1,3 @@
1
+ import type { PickerViewProps, PickerValue, PickerValueExtend } from './picker-view';
2
+ export declare function generateColumnsExtend(rawColumns: PickerViewProps['columns'], val: PickerValue[]): PickerValueExtend;
3
+ export declare function useColumnsExtend(rawColumns: PickerViewProps['columns'], value: PickerValue[]): PickerValueExtend;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.generateColumnsExtend = generateColumnsExtend;
7
+ exports.useColumnsExtend = useColumnsExtend;
8
+
9
+ var _react = require("react");
10
+
11
+ var _withCache = require("../../utils/with-cache");
12
+
13
+ function generateColumnsExtend(rawColumns, val) {
14
+ const columns = (0, _withCache.withCache)(() => {
15
+ const c = typeof rawColumns === 'function' ? rawColumns(val) : rawColumns;
16
+ return c.map(column => column.map(item => typeof item === 'string' ? {
17
+ label: item,
18
+ value: item
19
+ } : item));
20
+ });
21
+ const items = (0, _withCache.withCache)(() => {
22
+ return val.map((v, index) => {
23
+ var _a;
24
+
25
+ const column = columns()[index];
26
+ if (!column) return null;
27
+ return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
28
+ });
29
+ });
30
+ const extend = {
31
+ get columns() {
32
+ return columns();
33
+ },
34
+
35
+ get items() {
36
+ return items();
37
+ }
38
+
39
+ };
40
+ return extend;
41
+ }
42
+
43
+ function useColumnsExtend(rawColumns, value) {
44
+ return (0, _react.useMemo)(() => generateColumnsExtend(rawColumns, value), [rawColumns, value]);
45
+ }
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type PickerValue = string | null;
4
4
  export declare type PickerValueExtend = {
5
+ columns: PickerColumnItem[][];
5
6
  items: (PickerColumnItem | null)[];
6
7
  };
7
8
  export declare type PickerColumnItem = {
@@ -11,12 +11,10 @@ var _withDefaultProps = require("../../utils/with-default-props");
11
11
 
12
12
  var _wheel = require("./wheel");
13
13
 
14
- var _useColumns = require("./use-columns");
14
+ var _columnsExtend = require("./columns-extend");
15
15
 
16
16
  var _nativeProps = require("../../utils/native-props");
17
17
 
18
- var _usePickerValueExtend = require("./use-picker-value-extend");
19
-
20
18
  var _ahooks = require("ahooks");
21
19
 
22
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -29,17 +27,7 @@ const defaultProps = {
29
27
  };
30
28
  const PickerView = (0, _react.memo)(p => {
31
29
  const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
32
- const [innerValue, setInnerValue] = (0, _react.useState)(props.value === undefined ? props.defaultValue : props.value);
33
- (0, _ahooks.useDebounceEffect)(() => {
34
- var _a;
35
-
36
- if (props.value === innerValue) return;
37
- (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerValue, generateValueExtend(innerValue));
38
- }, [innerValue], {
39
- wait: 0,
40
- leading: false,
41
- trailing: true
42
- }); // Sync `value` to `innerValue`
30
+ const [innerValue, setInnerValue] = (0, _react.useState)(props.value === undefined ? props.defaultValue : props.value); // Sync `value` to `innerValue`
43
31
 
44
32
  (0, _react.useEffect)(() => {
45
33
  if (props.value === undefined) return; // Uncontrolled mode
@@ -58,8 +46,18 @@ const PickerView = (0, _react.memo)(p => {
58
46
  window.clearTimeout(timeout);
59
47
  };
60
48
  }, [props.value, innerValue]);
61
- const columns = (0, _useColumns.useColumns)(props.columns, innerValue);
62
- const generateValueExtend = (0, _usePickerValueExtend.usePickerValueExtend)(columns);
49
+ const extend = (0, _columnsExtend.useColumnsExtend)(props.columns, innerValue);
50
+ const columns = extend.columns;
51
+ (0, _ahooks.useDebounceEffect)(() => {
52
+ var _a;
53
+
54
+ if (props.value === innerValue) return;
55
+ (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerValue, extend);
56
+ }, [innerValue], {
57
+ wait: 0,
58
+ leading: false,
59
+ trailing: true
60
+ });
63
61
  const handleSelect = (0, _react.useCallback)((val, index) => {
64
62
  setInnerValue(prev => {
65
63
  const next = [...prev];
@@ -36,6 +36,7 @@
36
36
  box-shadow: 0 0 30px 0 rgba(51, 51, 51, 0.2);
37
37
  font-size: 15px;
38
38
  min-width: 32px;
39
+ max-width: calc(100vw - 24px);
39
40
  overflow-y: hidden;
40
41
  }
41
42
  .adm-popover-inner-content {
@@ -2,8 +2,8 @@ import { FC, ReactNode } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type ResultProps = {
4
4
  status: 'success' | 'error' | 'info' | 'waiting' | 'warning';
5
- title: string;
6
- description?: string;
5
+ title: ReactNode;
6
+ description?: ReactNode;
7
7
  icon?: ReactNode;
8
8
  } & NativeProps;
9
9
  export declare const Result: FC<ResultProps>;
@@ -84,6 +84,30 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
84
84
  (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
85
85
  }
86
86
 
87
+ const keyboard = props.keyboard;
88
+
89
+ const keyboardElement = keyboard && _react.default.cloneElement(keyboard, {
90
+ onInput: v => {
91
+ var _a, _b;
92
+
93
+ setValue(value + v);
94
+ (_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
95
+ },
96
+ onDelete: () => {
97
+ var _a, _b;
98
+
99
+ setValue(value.slice(0, -1));
100
+ (_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
101
+ },
102
+ visible: hasFocus,
103
+ onClose: () => {
104
+ var _a, _b, _c;
105
+
106
+ (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
107
+ (_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
108
+ }
109
+ });
110
+
87
111
  return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
88
112
  ref: rootRef,
89
113
  className: (0, _classnames.default)(classPrefix, {
@@ -111,19 +135,6 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
111
135
  }
112
136
  }, _react.default.createElement(_antdMobileIcons.CloseCircleFill, null)), !value && _react.default.createElement("div", {
113
137
  className: `${classPrefix}-placeholder`
114
- }, props.placeholder), props.keyboard && _react.default.cloneElement(props.keyboard, {
115
- onInput: v => {
116
- setValue(value + v);
117
- },
118
- onDelete: () => {
119
- setValue(value.slice(0, -1));
120
- },
121
- visible: hasFocus,
122
- onClose: () => {
123
- var _a;
124
-
125
- (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
126
- }
127
- })));
138
+ }, props.placeholder), keyboardElement));
128
139
  });
129
140
  exports.VirtualInput = VirtualInput;
@@ -14,9 +14,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
 
16
16
  function renderImperatively(element) {
17
- let close = () => {};
18
-
19
- const Wrapper = () => {
17
+ const Wrapper = _react.default.forwardRef((_, ref) => {
20
18
  const [visible, setVisible] = (0, _react.useState)(false);
21
19
  const closedRef = (0, _react.useRef)(false);
22
20
  (0, _react.useEffect)(() => {
@@ -35,8 +33,6 @@ function renderImperatively(element) {
35
33
  (_b = (_a = element.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
36
34
  }
37
35
 
38
- close = onClose;
39
-
40
36
  function afterClose() {
41
37
  var _a, _b;
42
38
 
@@ -44,14 +40,28 @@ function renderImperatively(element) {
44
40
  (_b = (_a = element.props).afterClose) === null || _b === void 0 ? void 0 : _b.call(_a);
45
41
  }
46
42
 
43
+ (0, _react.useImperativeHandle)(ref, () => ({
44
+ close: onClose
45
+ }));
47
46
  return _react.default.cloneElement(element, Object.assign(Object.assign({}, element.props), {
48
47
  visible,
49
48
  onClose,
50
49
  afterClose
51
50
  }));
52
- };
51
+ });
52
+
53
+ const wrapperRef = _react.default.createRef();
54
+
55
+ const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, {
56
+ ref: wrapperRef
57
+ }));
58
+
59
+ function close() {
60
+ var _a;
61
+
62
+ (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
63
+ }
53
64
 
54
- const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, null));
55
65
  return {
56
66
  close
57
67
  };
@@ -0,0 +1 @@
1
+ export declare function withCache<T>(generate: () => T): () => T;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.withCache = withCache;
7
+
8
+ function withCache(generate) {
9
+ let cache = null;
10
+ return () => {
11
+ if (cache === null) {
12
+ cache = generate();
13
+ }
14
+
15
+ return cache;
16
+ };
17
+ }
@@ -9,9 +9,10 @@ export declare type CalenderRef = {
9
9
  jumpToToday: () => void;
10
10
  };
11
11
  export declare type CalendarProps = {
12
+ onPageChange?: (year: number, month: number) => void;
12
13
  weekStartsOn?: 'Monday' | 'Sunday';
13
14
  renderLabel?: (date: Date) => string | null | undefined;
14
- onPageChange?: (year: number, month: number) => void;
15
+ allowClear?: boolean;
15
16
  } & ({
16
17
  selectionMode?: undefined;
17
18
  value?: undefined;
@@ -21,12 +22,12 @@ export declare type CalendarProps = {
21
22
  selectionMode: 'single';
22
23
  value?: Date | null;
23
24
  defaultValue?: Date | null;
24
- onChange?: (val: Date) => void;
25
+ onChange?: (val: Date | null) => void;
25
26
  } | {
26
27
  selectionMode: 'range';
27
28
  value?: [Date, Date] | null;
28
29
  defaultValue?: [Date, Date] | null;
29
- onChange?: (val: [Date, Date]) => void;
30
+ onChange?: (val: [Date, Date] | null) => void;
30
31
  }) & NativeProps;
31
32
  export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<CalenderRef>>;
32
33
  export {};