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,123 @@
1
+ import React from 'react';
2
+ export const disconnectedImage = React.createElement("svg", {
3
+ viewBox: '0 0 400 400',
4
+ xmlns: 'http://www.w3.org/2000/svg',
5
+ xmlnsXlink: 'http://www.w3.org/1999/xlink'
6
+ }, React.createElement("title", null, '@\u53CD\u9988/\u5F02\u5E38/\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38'), React.createElement("defs", null, React.createElement("linearGradient", {
7
+ x1: '50%',
8
+ y1: '-116.862%',
9
+ x2: '50%',
10
+ y2: '90.764%',
11
+ id: 'error-block-image-disconnected-c'
12
+ }, React.createElement("stop", {
13
+ stopColor: '#72A7FD',
14
+ stopOpacity: 0.207,
15
+ offset: '0%'
16
+ }), React.createElement("stop", {
17
+ stopColor: '#72A7FD',
18
+ stopOpacity: 0.115,
19
+ offset: '80.072%'
20
+ }), React.createElement("stop", {
21
+ stopColor: '#72A7FD',
22
+ stopOpacity: 0,
23
+ offset: '100%'
24
+ })), React.createElement("circle", {
25
+ id: 'error-block-image-disconnected-d',
26
+ cx: 22.309,
27
+ cy: 22.309,
28
+ r: 22.309
29
+ }), React.createElement("path", {
30
+ id: 'error-block-image-disconnected-a',
31
+ d: 'M0 0h400v400H0z'
32
+ })), React.createElement("g", {
33
+ fill: 'none',
34
+ fillRule: 'evenodd'
35
+ }, React.createElement("mask", {
36
+ id: 'error-block-image-disconnected-b',
37
+ fill: '#fff'
38
+ }, React.createElement("use", {
39
+ xlinkHref: '#error-block-image-disconnected-a'
40
+ })), React.createElement("g", {
41
+ mask: 'url(#error-block-image-disconnected-b)',
42
+ fill: 'url(#error-block-image-disconnected-c)'
43
+ }, React.createElement("path", {
44
+ d: 'M151.686 45.58c38.869-.623 77.391 34.03 103.046 70.573 17.416-21.644 34.253-32.465 50.51-32.465 26.666 0 56.701 28.548 90.105 85.643 3.539 6.05-7.164 14.87-32.107 26.462l-82.643 2.741c-14.686 11.745-62.45 1.252-138.305 2.467-55.58.89-91.518-2.468-107.816-10.074-23.505-3.07-33.154-7.983-28.946-14.74C59.313 89.813 108.03 46.278 151.686 45.58Zm186.195 99.06-.127.003-.126.01a2.32 2.32 0 0 0-.465.103l-.032.01-.031.01a2.364 2.364 0 0 0-.181.071 2.52 2.52 0 0 0-.116.054l-.133.067-.042.024-.036.02a2.946 2.946 0 0 0-.133.08l-.048.03a3.052 3.052 0 0 0-.126.087l-.047.033a3.274 3.274 0 0 0-.128.097c-.01.008-.02.017-.031.024a4.906 4.906 0 0 0-.31.27l-.036.032a6.654 6.654 0 0 0-.46.484l-.045.05c-3.344 3.91-5.755 14.083-5.755 17.908 0 4.547 3.409 8.275 7.74 8.625l.108.008v7.608c0 .779.502 1.41 1.121 1.41.62 0 1.121-.632 1.121-1.41v-7.762c3.838-.802 6.727-4.293 6.727-8.48 0-4.778-3.765-19.467-8.409-19.467Zm-200-10-.127.003-.126.01a2.32 2.32 0 0 0-.368.073l-.049.014-.048.016-.032.01-.031.01a2.364 2.364 0 0 0-.181.071l-.058.026-.058.028-.133.067-.042.024-.036.02-.066.039-.067.041-.048.03a3.052 3.052 0 0 0-.126.087l-.047.033a3.274 3.274 0 0 0-.128.097c-.01.008-.02.017-.031.024l-.156.13-.154.14-.036.032a6.654 6.654 0 0 0-.46.484l-.045.05c-3.344 3.91-5.755 14.083-5.755 17.908 0 4.547 3.409 8.275 7.74 8.625l.054.004.054.004v7.608c0 .779.502 1.41 1.121 1.41.58 0 1.058-.556 1.115-1.266l.006-.144v-7.762c3.838-.802 6.727-4.293 6.727-8.48 0-4.778-3.765-19.467-8.409-19.467Zm-28.029-12.373-.107.002-.106.006a2.978 2.978 0 0 0-.551.095 3.444 3.444 0 0 0-.323.104 3.962 3.962 0 0 0-.61.297c-.076.045-.15.092-.226.141-4.964 3.312-8.728 18.445-8.728 23.77 0 5.434 3.922 9.935 9.04 10.726l.28.04v9.236c0 .886.532 1.614 1.21 1.692l.121.007.122-.007c.638-.074 1.147-.723 1.204-1.538l.006-.155v-9.235c5.254-.668 9.32-5.234 9.32-10.767 0-5.993-4.77-24.414-10.652-24.414Z'
45
+ })), React.createElement("g", {
46
+ mask: 'url(#error-block-image-disconnected-b)'
47
+ }, React.createElement("g", {
48
+ transform: 'translate(85.858 150.644)'
49
+ }, React.createElement("path", {
50
+ d: 'M116.26 28.467c1.352 0 2.703.018 4.054.054 3.923.385 10.188 4.248 9.267 11.061-.878 6.496-5.836 9.089-8.962 9.529a130.762 130.762 0 0 0-4.36-.072c-28.567 0-60.654 10.149-96.22 30.676l-2.227 1.297c-.744.437-1.49.878-2.236 1.323-4.878 2.911-11.193 1.316-14.103-3.562C-1.438 73.894.157 67.58 5.035 64.67 45.34 40.62 82.4 28.467 116.26 28.467Zm22 11.63c1.03-5.942 6.376-8.618 11.084-8.08C172.14 36.91 194.83 46.86 217.37 61.794c4.735 3.138 6.03 9.52 2.893 14.255-3.138 4.736-9.52 6.031-14.256 2.893-20.111-13.325-40.075-22.165-59.935-26.584a9.974 9.974 0 0 0-.325-.088c-3.987-1.015-8.602-5.738-7.487-12.175ZM116.26 77.418c22.777 0 45.4 7.057 67.73 20.988 4.82 3.007 6.289 9.351 3.282 14.17-3.007 4.82-9.351 6.29-14.17 3.283-19.194-11.974-38.095-17.87-56.842-17.87s-37.648 5.896-56.842 17.87c-4.82 3.007-11.164 1.537-14.17-3.282-3.007-4.82-1.538-11.164 3.282-14.171 22.33-13.931 44.953-20.988 67.73-20.988ZM117.974 124.67c9.85 0 17.303 1.69 25.687 5.082l.82.337 2.9 1.231 3.008 1.252.77.305.107.04c5.326 1.976 8.042 7.895 6.066 13.221-1.976 5.326-7.895 8.042-13.221 6.067l-.713-.27-.726-.285-.763-.31-1.263-.527-2.944-1.26-1.125-.473c-6.393-2.648-11.433-3.838-18.603-3.838-8.223 0-16.532 2.126-25.028 6.475-5.056 2.588-11.254.587-13.842-4.47-2.589-5.056-.588-11.253 4.47-13.842 11.313-5.791 22.814-8.735 34.4-8.735ZM118.235 197.047c7.15 0 13.77-.897 19.841-2.721 5.44-1.635 8.526-7.37 6.892-12.81-1.635-5.44-7.37-8.526-12.81-6.892-4.072 1.224-8.707 1.851-13.923 1.851-4.36 0-8.79-1.045-13.373-3.21l-.626-.301c-5.095-2.512-11.262-.418-13.773 4.678-2.512 5.095-.418 11.261 4.678 13.773 7.559 3.727 15.288 5.632 23.094 5.632Z',
51
+ fill: '#377EFF',
52
+ fillRule: 'nonzero'
53
+ }), React.createElement("path", {
54
+ d: 'M198.35 62.413c2.755-4.967 9.016-6.76 13.984-4.004 13.068 7.25 19.124 18.535 17.615 30.952-1.157 9.515-6.83 18.757-14.096 24.352-13.364 10.29-34.915 9.401-49.363-1.91-4.472-3.502-5.26-9.967-1.758-14.44 3.436-4.388 9.724-5.229 14.185-1.952l.255.194c7.283 5.702 18.475 6.164 24.13 1.809 3.072-2.366 5.766-6.754 6.226-10.536.467-3.844-1.21-7.07-6.796-10.267l-.378-.213c-4.967-2.756-6.76-9.017-4.004-13.985ZM61.35 103.092c-2.84-4.92-9.13-6.607-14.05-3.768-20.662 11.922-21.772 35.751-6.018 51.69 13.752 13.914 33.192 13.447 50.507 1.158 4.633-3.288 5.723-9.708 2.436-14.34-3.288-4.633-9.709-5.724-14.341-2.436-9.763 6.928-18.07 7.128-23.97 1.158-6.761-6.84-6.498-14.501 1.35-19.225l.317-.187c4.92-2.84 6.608-9.13 3.769-14.05ZM129.103 135.702c1.688-5.424 7.454-8.453 12.878-6.764 14.776 4.599 23.437 13.727 25.259 25.58 1.316 8.561-1.228 17.533-5.58 24.052-3.132 4.688-7.388 8.287-12.504 11.112-3.03 1.673-5.75 2.811-9.37 4.066l-1.4.477c-5.387 1.806-11.217-1.097-13.022-6.484-1.805-5.386 1.098-11.216 6.484-13.02l1.09-.374c6.032-2.112 9.602-4.19 11.613-7.201 1.693-2.535 2.818-6.502 2.356-9.503-.564-3.673-3.432-6.696-11.04-9.063-5.424-1.689-8.452-7.454-6.764-12.878Z',
55
+ fill: '#377EFF',
56
+ fillRule: 'nonzero'
57
+ }), React.createElement("path", {
58
+ d: 'M148.072 181.58c3.718-7.98 4.172-14.9 1.36-20.76-2.81-5.86-6.236-9.096-10.275-9.707',
59
+ stroke: '#FFF',
60
+ strokeWidth: 0.571,
61
+ strokeLinecap: 'round'
62
+ }), React.createElement("ellipse", {
63
+ fill: '#7EACFF',
64
+ transform: 'rotate(10 147 41.933)',
65
+ cx: 147,
66
+ cy: 41.933,
67
+ rx: 9.143,
68
+ ry: 10.286
69
+ }), React.createElement("path", {
70
+ d: 'M210.422 107.472c3.718-7.98 4.172-14.9 1.36-20.76-2.81-5.86-6.668-9.883-11.572-12.067M51.604 131.769c-3.15-6.8-3.537-12.694-1.161-17.685 2.376-4.99 5.57-8.136 9.583-9.438',
71
+ stroke: '#003CFF',
72
+ strokeWidth: 0.75,
73
+ strokeLinecap: 'round',
74
+ strokeLinejoin: 'round'
75
+ }), React.createElement("path", {
76
+ d: 'M21.53 64.408c4.946-3.389 9.817-6.026 14.612-7.912',
77
+ stroke: '#FFF',
78
+ strokeWidth: 0.75,
79
+ strokeLinecap: 'round',
80
+ strokeLinejoin: 'round'
81
+ }), React.createElement("path", {
82
+ d: 'm113.243 15.444 9.588 8.314M144.31 9.405l-5.775 11.3m18.389-1.246-11.907 4.643M127.64 5.66l2.77 14.255',
83
+ stroke: '#4486FE',
84
+ strokeWidth: 0.75,
85
+ strokeLinecap: 'round',
86
+ strokeLinejoin: 'round'
87
+ }))), React.createElement("g", {
88
+ mask: 'url(#error-block-image-disconnected-b)'
89
+ }, React.createElement("g", {
90
+ transform: 'translate(275.143 302.571)'
91
+ }, React.createElement("mask", {
92
+ id: 'error-block-image-disconnected-e',
93
+ fill: '#fff'
94
+ }, React.createElement("use", {
95
+ xlinkHref: '#error-block-image-disconnected-d'
96
+ })), React.createElement("use", {
97
+ fill: '#FBBE47',
98
+ fillRule: 'nonzero',
99
+ xlinkHref: '#error-block-image-disconnected-d'
100
+ }), React.createElement("circle", {
101
+ fill: '#FFCD6B',
102
+ fillRule: 'nonzero',
103
+ mask: 'url(#error-block-image-disconnected-e)',
104
+ cx: 16.457,
105
+ cy: 17.92,
106
+ r: 22.309
107
+ }), React.createElement("circle", {
108
+ fill: '#FFF',
109
+ fillRule: 'nonzero',
110
+ mask: 'url(#error-block-image-disconnected-e)',
111
+ cx: 14.263,
112
+ cy: 12.069,
113
+ r: 2.194
114
+ }))), React.createElement("g", {
115
+ mask: 'url(#error-block-image-disconnected-b)',
116
+ fill: '#FBBE47',
117
+ fillRule: 'nonzero'
118
+ }, React.createElement("circle", {
119
+ cx: 12,
120
+ cy: 12,
121
+ r: 12,
122
+ transform: 'translate(84 297.714)'
123
+ }))));
@@ -0,0 +1 @@
1
+ export declare const emptyImage: JSX.Element;
@@ -0,0 +1,119 @@
1
+ import React from 'react';
2
+ export const emptyImage = React.createElement("svg", {
3
+ viewBox: '0 0 400 400',
4
+ xmlns: 'http://www.w3.org/2000/svg',
5
+ xmlnsXlink: 'http://www.w3.org/1999/xlink'
6
+ }, React.createElement("defs", null, React.createElement("linearGradient", {
7
+ x1: '50%',
8
+ y1: '-116.862%',
9
+ x2: '50%',
10
+ y2: '90.764%',
11
+ id: 'error-block-image-empty-a'
12
+ }, React.createElement("stop", {
13
+ stopColor: '#72A7FD',
14
+ stopOpacity: 0.207,
15
+ offset: '0%'
16
+ }), React.createElement("stop", {
17
+ stopColor: '#72A7FD',
18
+ stopOpacity: 0.115,
19
+ offset: '80.072%'
20
+ }), React.createElement("stop", {
21
+ stopColor: '#72A7FD',
22
+ stopOpacity: 0,
23
+ offset: '100%'
24
+ })), React.createElement("path", {
25
+ 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',
26
+ id: 'error-block-image-empty-b'
27
+ })), React.createElement("g", {
28
+ fill: 'none',
29
+ fillRule: 'evenodd'
30
+ }, React.createElement("path", {
31
+ 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',
32
+ transform: 'translate(18.286 50.286)',
33
+ fill: 'url(#error-block-image-empty-a)'
34
+ }), React.createElement("g", {
35
+ transform: 'translate(108.571 189.886)'
36
+ }, React.createElement("mask", {
37
+ id: 'error-block-image-empty-c',
38
+ fill: '#fff'
39
+ }, React.createElement("use", {
40
+ xlinkHref: '#error-block-image-empty-b'
41
+ })), React.createElement("use", {
42
+ fill: '#377EFF',
43
+ xlinkHref: '#error-block-image-empty-b'
44
+ }), React.createElement("path", {
45
+ 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',
46
+ fill: '#003CFF',
47
+ fillRule: 'nonzero',
48
+ mask: 'url(#error-block-image-empty-c)'
49
+ })), React.createElement("path", {
50
+ 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',
51
+ fill: '#5D96FE'
52
+ }), React.createElement("path", {
53
+ 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',
54
+ stroke: '#FFF',
55
+ strokeWidth: 0.75,
56
+ strokeLinecap: 'round',
57
+ strokeLinejoin: 'round'
58
+ }), React.createElement("path", {
59
+ 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',
60
+ fill: '#FFCD6B',
61
+ fillRule: 'nonzero'
62
+ }), React.createElement("g", {
63
+ transform: 'translate(283.429 177.143)',
64
+ fillRule: 'nonzero'
65
+ }, React.createElement("path", {
66
+ 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',
67
+ fill: '#FFCD6B'
68
+ }), React.createElement("path", {
69
+ 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',
70
+ fill: '#FFCD6B'
71
+ }), React.createElement("circle", {
72
+ fill: '#FFB400',
73
+ cx: 26.4,
74
+ cy: 56.869,
75
+ r: 1.45
76
+ }), React.createElement("circle", {
77
+ fill: '#FFB400',
78
+ cx: 39.453,
79
+ cy: 58.319,
80
+ r: 1
81
+ }), React.createElement("circle", {
82
+ fill: '#FFB400',
83
+ cx: 17.698,
84
+ cy: 63.637,
85
+ r: 2.417
86
+ }), React.createElement("circle", {
87
+ fill: '#FFB400',
88
+ cx: 38.002,
89
+ cy: 51.068,
90
+ r: 2.417
91
+ }), React.createElement("circle", {
92
+ fill: '#FFB400',
93
+ cx: 18.665,
94
+ cy: 17.228,
95
+ r: 2.417
96
+ }), React.createElement("circle", {
97
+ fill: '#FFB400',
98
+ cx: 32.201,
99
+ cy: 13.36,
100
+ r: 2.417
101
+ }), React.createElement("circle", {
102
+ fill: '#FFB400',
103
+ cx: 26.83,
104
+ cy: 20.666,
105
+ r: 1.45
106
+ }), React.createElement("circle", {
107
+ fill: '#FFB400',
108
+ cx: 38.969,
109
+ cy: 31.731,
110
+ r: 2.417
111
+ }), React.createElement("circle", {
112
+ fill: '#FFB400',
113
+ cx: 25.433,
114
+ cy: 29.797,
115
+ r: 1.45
116
+ }), React.createElement("path", {
117
+ 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',
118
+ fill: '#FBBE47'
119
+ }))));
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export declare const imageRecord: Record<'default' | 'disconnected' | 'empty' | 'busy', ReactElement>;
@@ -0,0 +1,10 @@
1
+ import { defaultImage } from './default';
2
+ import { disconnectedImage } from './disconnected';
3
+ import { emptyImage } from './empty';
4
+ import { busyImage } from './busy';
5
+ export const imageRecord = {
6
+ 'default': defaultImage,
7
+ 'disconnected': disconnectedImage,
8
+ 'empty': emptyImage,
9
+ 'busy': busyImage
10
+ };
@@ -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;
@@ -92,6 +92,7 @@ const FormItemLayout = props => {
92
92
  }),
93
93
  disabled: disabled,
94
94
  onClick: props.onClick,
95
+ clickable: props.clickable,
95
96
  arrow: arrow
96
97
  }, React.createElement("div", {
97
98
  className: classNames(`${classPrefix}-child`, `${classPrefix}-child-position-${childElementPosition}`)
@@ -127,9 +128,10 @@ export const FormItem = props => {
127
128
  onClick,
128
129
  shouldUpdate,
129
130
  dependencies,
131
+ clickable,
130
132
  arrow
131
133
  } = props,
132
- fieldProps = __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"]);
134
+ fieldProps = __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"]);
133
135
 
134
136
  const {
135
137
  validateTrigger: contextValidateTrigger
@@ -201,6 +203,7 @@ export const FormItem = props => {
201
203
  hidden: hidden,
202
204
  layout: layout,
203
205
  childElementPosition: childElementPosition,
206
+ clickable: clickable,
204
207
  arrow: arrow
205
208
  }, React.createElement(NoStyleItemContext.Provider, {
206
209
  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;
@@ -1,5 +1,4 @@
1
- import React, { createRef, forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
- import { renderToBody } from '../../utils/render-to-body';
1
+ import React from 'react';
3
2
  import { ImageViewer, MultiImageViewer } from './image-viewer';
4
3
  import { renderImperatively } from '../../utils/render-imperatively';
5
4
  const handlerSet = new Set();
@@ -18,54 +17,14 @@ export function showImageViewer(props) {
18
17
  }
19
18
  export function showMultiImageViewer(props) {
20
19
  clearImageViewer();
21
- const Wrapper = forwardRef((_, ref) => {
22
- const [visible, setVisible] = useState(false);
23
- const closedRef = useRef(false);
24
- useEffect(() => {
25
- if (!closedRef.current) {
26
- setVisible(true);
27
- } else {
28
- handleAfterClose();
29
- }
30
- }, []);
31
-
32
- function handleClose() {
33
- var _a;
34
-
35
- closedRef.current = true;
36
- (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
37
- setVisible(false);
38
- }
39
-
40
- useImperativeHandle(ref, () => ({
41
- close: handleClose
42
- }));
43
-
44
- function handleAfterClose() {
20
+ const handler = renderImperatively(React.createElement(MultiImageViewer, Object.assign({}, props, {
21
+ afterClose: () => {
45
22
  var _a;
46
23
 
47
- (_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
48
- unmount();
49
24
  handlerSet.delete(handler);
25
+ (_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
50
26
  }
51
-
52
- return React.createElement(MultiImageViewer, Object.assign({}, props, {
53
- visible: visible,
54
- onClose: handleClose,
55
- afterClose: handleAfterClose
56
- }));
57
- });
58
- const ref = createRef();
59
- const unmount = renderToBody(React.createElement(Wrapper, {
60
- ref: ref
61
- }));
62
- const handler = {
63
- close: () => {
64
- var _a;
65
-
66
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
67
- }
68
- };
27
+ })));
69
28
  handlerSet.add(handler);
70
29
  return handler;
71
30
  }
@@ -74,7 +33,4 @@ export function clearImageViewer() {
74
33
  handler.close();
75
34
  });
76
35
  handlerSet.clear();
77
- }
78
- export const getH = () => {
79
- console.log(handlerSet);
80
- };
36
+ }
@@ -4,9 +4,8 @@ import { mergeProps } from '../../utils/with-default-props';
4
4
  import { withNativeProps } from '../../utils/native-props';
5
5
  import { usePropsValue } from '../../utils/use-props-value';
6
6
  import PickerView from '../picker-view';
7
- import { useColumns } from '../picker-view/use-columns';
7
+ import { generateColumnsExtend, useColumnsExtend } from '../picker-view/columns-extend';
8
8
  import { useConfig } from '../config-provider';
9
- import { usePickerValueExtend } from '../picker-view/use-picker-value-extend';
10
9
  import { useMemoizedFn } from 'ahooks';
11
10
  import SafeArea from '../safe-area';
12
11
  const classPrefix = `adm-picker`;
@@ -28,12 +27,11 @@ export const Picker = memo(p => {
28
27
  onChange: val => {
29
28
  var _a;
30
29
 
31
- (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, val, generateValueExtend(val));
30
+ const extend = generateColumnsExtend(props.columns, val);
31
+ (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
32
32
  }
33
- })); // TODO: columns generated twice in Picker and PickerView, which can be improved
34
-
35
- const columns = useColumns(props.columns, value);
36
- const generateValueExtend = usePickerValueExtend(columns);
33
+ }));
34
+ const extend = useColumnsExtend(props.columns, value);
37
35
  const [innerValue, setInnerValue] = useState(value);
38
36
  useEffect(() => {
39
37
  if (innerValue !== value) {
@@ -104,6 +102,6 @@ export const Picker = memo(p => {
104
102
  }, pickerElement, React.createElement(SafeArea, {
105
103
  position: 'bottom'
106
104
  }));
107
- return React.createElement(React.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, generateValueExtend(value).items));
105
+ return React.createElement(React.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, extend.items));
108
106
  });
109
107
  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,34 @@
1
+ import { useMemo } from 'react';
2
+ import { withCache } from '../../utils/with-cache';
3
+ export function generateColumnsExtend(rawColumns, val) {
4
+ const columns = withCache(() => {
5
+ const c = typeof rawColumns === 'function' ? rawColumns(val) : rawColumns;
6
+ return c.map(column => column.map(item => typeof item === 'string' ? {
7
+ label: item,
8
+ value: item
9
+ } : item));
10
+ });
11
+ const items = withCache(() => {
12
+ return val.map((v, index) => {
13
+ var _a;
14
+
15
+ const column = columns()[index];
16
+ if (!column) return null;
17
+ return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
18
+ });
19
+ });
20
+ const extend = {
21
+ get columns() {
22
+ return columns();
23
+ },
24
+
25
+ get items() {
26
+ return items();
27
+ }
28
+
29
+ };
30
+ return extend;
31
+ }
32
+ export function useColumnsExtend(rawColumns, value) {
33
+ return useMemo(() => generateColumnsExtend(rawColumns, value), [rawColumns, value]);
34
+ }
@@ -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 = {
@@ -1,9 +1,8 @@
1
1
  import React, { memo, useCallback, useEffect, useState } from 'react';
2
2
  import { mergeProps } from '../../utils/with-default-props';
3
3
  import { Wheel } from './wheel';
4
- import { useColumns } from './use-columns';
4
+ import { useColumnsExtend } from './columns-extend';
5
5
  import { withNativeProps } from '../../utils/native-props';
6
- import { usePickerValueExtend } from './use-picker-value-extend';
7
6
  import { useDebounceEffect } from 'ahooks';
8
7
  const classPrefix = `adm-picker-view`;
9
8
  const defaultProps = {
@@ -11,17 +10,7 @@ const defaultProps = {
11
10
  };
12
11
  export const PickerView = memo(p => {
13
12
  const props = mergeProps(defaultProps, p);
14
- const [innerValue, setInnerValue] = useState(props.value === undefined ? props.defaultValue : props.value);
15
- useDebounceEffect(() => {
16
- var _a;
17
-
18
- if (props.value === innerValue) return;
19
- (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerValue, generateValueExtend(innerValue));
20
- }, [innerValue], {
21
- wait: 0,
22
- leading: false,
23
- trailing: true
24
- }); // Sync `value` to `innerValue`
13
+ const [innerValue, setInnerValue] = useState(props.value === undefined ? props.defaultValue : props.value); // Sync `value` to `innerValue`
25
14
 
26
15
  useEffect(() => {
27
16
  if (props.value === undefined) return; // Uncontrolled mode
@@ -40,8 +29,18 @@ export const PickerView = memo(p => {
40
29
  window.clearTimeout(timeout);
41
30
  };
42
31
  }, [props.value, innerValue]);
43
- const columns = useColumns(props.columns, innerValue);
44
- const generateValueExtend = usePickerValueExtend(columns);
32
+ const extend = useColumnsExtend(props.columns, innerValue);
33
+ const columns = extend.columns;
34
+ useDebounceEffect(() => {
35
+ var _a;
36
+
37
+ if (props.value === innerValue) return;
38
+ (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerValue, extend);
39
+ }, [innerValue], {
40
+ wait: 0,
41
+ leading: false,
42
+ trailing: true
43
+ });
45
44
  const handleSelect = useCallback((val, index) => {
46
45
  setInnerValue(prev => {
47
46
  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>;
@@ -64,6 +64,28 @@ export const VirtualInput = forwardRef((p, ref) => {
64
64
  (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
65
65
  }
66
66
 
67
+ const keyboard = props.keyboard;
68
+ const keyboardElement = keyboard && React.cloneElement(keyboard, {
69
+ onInput: v => {
70
+ var _a, _b;
71
+
72
+ setValue(value + v);
73
+ (_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
74
+ },
75
+ onDelete: () => {
76
+ var _a, _b;
77
+
78
+ setValue(value.slice(0, -1));
79
+ (_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
80
+ },
81
+ visible: hasFocus,
82
+ onClose: () => {
83
+ var _a, _b, _c;
84
+
85
+ (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
86
+ (_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
87
+ }
88
+ });
67
89
  return withNativeProps(props, React.createElement("div", {
68
90
  ref: rootRef,
69
91
  className: classNames(classPrefix, {
@@ -91,18 +113,5 @@ export const VirtualInput = forwardRef((p, ref) => {
91
113
  }
92
114
  }, React.createElement(CloseCircleFill, null)), !value && React.createElement("div", {
93
115
  className: `${classPrefix}-placeholder`
94
- }, props.placeholder), props.keyboard && React.cloneElement(props.keyboard, {
95
- onInput: v => {
96
- setValue(value + v);
97
- },
98
- onDelete: () => {
99
- setValue(value.slice(0, -1));
100
- },
101
- visible: hasFocus,
102
- onClose: () => {
103
- var _a;
104
-
105
- (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
106
- }
107
- })));
116
+ }, props.placeholder), keyboardElement));
108
117
  });
@@ -1,9 +1,7 @@
1
- import React, { useEffect, useRef, useState } from 'react';
1
+ import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
2
2
  import { renderToBody } from './render-to-body';
3
3
  export function renderImperatively(element) {
4
- let close = () => {};
5
-
6
- const Wrapper = () => {
4
+ const Wrapper = React.forwardRef((_, ref) => {
7
5
  const [visible, setVisible] = useState(false);
8
6
  const closedRef = useRef(false);
9
7
  useEffect(() => {
@@ -22,8 +20,6 @@ export function renderImperatively(element) {
22
20
  (_b = (_a = element.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
23
21
  }
24
22
 
25
- close = onClose;
26
-
27
23
  function afterClose() {
28
24
  var _a, _b;
29
25
 
@@ -31,14 +27,26 @@ export function renderImperatively(element) {
31
27
  (_b = (_a = element.props).afterClose) === null || _b === void 0 ? void 0 : _b.call(_a);
32
28
  }
33
29
 
30
+ useImperativeHandle(ref, () => ({
31
+ close: onClose
32
+ }));
34
33
  return React.cloneElement(element, Object.assign(Object.assign({}, element.props), {
35
34
  visible,
36
35
  onClose,
37
36
  afterClose
38
37
  }));
39
- };
38
+ });
39
+ const wrapperRef = React.createRef();
40
+ const unmount = renderToBody(React.createElement(Wrapper, {
41
+ ref: wrapperRef
42
+ }));
43
+
44
+ function close() {
45
+ var _a;
46
+
47
+ (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
48
+ }
40
49
 
41
- const unmount = renderToBody(React.createElement(Wrapper, null));
42
50
  return {
43
51
  close
44
52
  };