amis-ui 6.13.0-beta.7 → 6.13.0-beta.8

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 (1042) hide show
  1. package/package.json +3 -3
  2. package/scss/components/form/_excel.scss +110 -4
  3. package/esm/components/404.d.ts +0 -53
  4. package/esm/components/404.js +0 -35
  5. package/esm/components/Alert.d.ts +0 -615
  6. package/esm/components/Alert.js +0 -266
  7. package/esm/components/Alert2.d.ts +0 -117
  8. package/esm/components/Alert2.js +0 -58
  9. package/esm/components/AlphabetIndexer.d.ts +0 -11
  10. package/esm/components/AlphabetIndexer.js +0 -48
  11. package/esm/components/AnchorNav.d.ts +0 -162
  12. package/esm/components/AnchorNav.js +0 -153
  13. package/esm/components/AnchorNavSection.d.ts +0 -2
  14. package/esm/components/AnchorNavSection.js +0 -7
  15. package/esm/components/ArrayInput.d.ts +0 -617
  16. package/esm/components/ArrayInput.js +0 -147
  17. package/esm/components/AsideNav.d.ts +0 -142
  18. package/esm/components/AsideNav.js +0 -133
  19. package/esm/components/AssociatedSelection.d.ts +0 -564
  20. package/esm/components/AssociatedSelection.js +0 -103
  21. package/esm/components/AutoSizer.d.ts +0 -2
  22. package/esm/components/AutoSizer.js +0 -8
  23. package/esm/components/Avatar.d.ts +0 -374
  24. package/esm/components/Avatar.js +0 -126
  25. package/esm/components/Badge.d.ts +0 -118
  26. package/esm/components/Badge.js +0 -154
  27. package/esm/components/BaiduMapPicker.d.ts +0 -100
  28. package/esm/components/BaiduMapPicker.js +0 -366
  29. package/esm/components/BarCode.d.ts +0 -56
  30. package/esm/components/BarCode.js +0 -42
  31. package/esm/components/Breadcrumb.d.ts +0 -115
  32. package/esm/components/Breadcrumb.js +0 -160
  33. package/esm/components/Button.d.ts +0 -147
  34. package/esm/components/Button.js +0 -63
  35. package/esm/components/CalendarMobile.d.ts +0 -431
  36. package/esm/components/CalendarMobile.js +0 -538
  37. package/esm/components/Card.d.ts +0 -444
  38. package/esm/components/Card.js +0 -88
  39. package/esm/components/Cascader.d.ts +0 -108
  40. package/esm/components/Cascader.js +0 -515
  41. package/esm/components/ChainedDropdownSelection.d.ts +0 -561
  42. package/esm/components/ChainedDropdownSelection.js +0 -104
  43. package/esm/components/ChainedSelection.d.ts +0 -554
  44. package/esm/components/ChainedSelection.js +0 -184
  45. package/esm/components/Checkbox.d.ts +0 -110
  46. package/esm/components/Checkbox.js +0 -87
  47. package/esm/components/CityArea.d.ts +0 -299
  48. package/esm/components/CityArea.js +0 -190
  49. package/esm/components/CityDB.d.ts +0 -13
  50. package/esm/components/CityDB.js +0 -3942
  51. package/esm/components/CodeMirror.d.ts +0 -29
  52. package/esm/components/CodeMirror.js +0 -140
  53. package/esm/components/Collapse.d.ts +0 -447
  54. package/esm/components/Collapse.js +0 -184
  55. package/esm/components/CollapseGroup.d.ts +0 -219
  56. package/esm/components/CollapseGroup.js +0 -117
  57. package/esm/components/ColorPicker.d.ts +0 -530
  58. package/esm/components/ColorPicker.js +0 -260
  59. package/esm/components/Combo.d.ts +0 -354
  60. package/esm/components/Combo.js +0 -212
  61. package/esm/components/ConditionBuilder.d.ts +0 -2
  62. package/esm/components/ConditionBuilder.js +0 -7
  63. package/esm/components/ConfirmBox.d.ts +0 -322
  64. package/esm/components/ConfirmBox.js +0 -129
  65. package/esm/components/ContextMenu.d.ts +0 -115
  66. package/esm/components/ContextMenu.js +0 -305
  67. package/esm/components/DatePicker.d.ts +0 -638
  68. package/esm/components/DatePicker.js +0 -717
  69. package/esm/components/DateRangePicker.d.ts +0 -1046
  70. package/esm/components/DateRangePicker.js +0 -1389
  71. package/esm/components/DiffEditor.d.ts +0 -21
  72. package/esm/components/DiffEditor.js +0 -119
  73. package/esm/components/DndContainer.d.ts +0 -205
  74. package/esm/components/DndContainer.js +0 -25
  75. package/esm/components/Drawer.d.ts +0 -158
  76. package/esm/components/Drawer.js +0 -269
  77. package/esm/components/DropDownSelection.d.ts +0 -557
  78. package/esm/components/DropDownSelection.js +0 -78
  79. package/esm/components/DropdownContextMenus.d.ts +0 -84
  80. package/esm/components/DropdownContextMenus.js +0 -93
  81. package/esm/components/Editor.d.ts +0 -681
  82. package/esm/components/Editor.js +0 -238
  83. package/esm/components/Form.d.ts +0 -31
  84. package/esm/components/Form.js +0 -84
  85. package/esm/components/FormField.d.ts +0 -287
  86. package/esm/components/FormField.js +0 -78
  87. package/esm/components/FormulaPicker.d.ts +0 -2
  88. package/esm/components/FormulaPicker.js +0 -7
  89. package/esm/components/GaodeMapPicker.d.ts +0 -89
  90. package/esm/components/GaodeMapPicker.js +0 -204
  91. package/esm/components/GridNav.d.ts +0 -53
  92. package/esm/components/GridNav.js +0 -125
  93. package/esm/components/GridNavItem.d.ts +0 -2
  94. package/esm/components/GridNavItem.js +0 -7
  95. package/esm/components/GroupedSelection.d.ts +0 -543
  96. package/esm/components/GroupedSelection.js +0 -138
  97. package/esm/components/HeadCellDropDown.d.ts +0 -2
  98. package/esm/components/HeadCellDropDown.js +0 -7
  99. package/esm/components/HorizontalScroll.d.ts +0 -75
  100. package/esm/components/HorizontalScroll.js +0 -271
  101. package/esm/components/Html.d.ts +0 -82
  102. package/esm/components/Html.js +0 -52
  103. package/esm/components/Icon.d.ts +0 -2
  104. package/esm/components/Icon.js +0 -7
  105. package/esm/components/ImageGallery.d.ts +0 -465
  106. package/esm/components/ImageGallery.js +0 -396
  107. package/esm/components/Input.d.ts +0 -18
  108. package/esm/components/Input.js +0 -75
  109. package/esm/components/InputBox.d.ts +0 -100
  110. package/esm/components/InputBox.js +0 -98
  111. package/esm/components/InputBoxWithSuggestion.d.ts +0 -272
  112. package/esm/components/InputBoxWithSuggestion.js +0 -69
  113. package/esm/components/InputJSONSchema.d.ts +0 -2
  114. package/esm/components/InputJSONSchema.js +0 -7
  115. package/esm/components/InputTable.d.ts +0 -317
  116. package/esm/components/InputTable.js +0 -176
  117. package/esm/components/JSONSchemaEditor.d.ts +0 -2
  118. package/esm/components/JSONSchemaEditor.js +0 -7
  119. package/esm/components/Layout.d.ts +0 -74
  120. package/esm/components/Layout.js +0 -60
  121. package/esm/components/Link.d.ts +0 -60
  122. package/esm/components/Link.js +0 -44
  123. package/esm/components/ListGroup.d.ts +0 -77
  124. package/esm/components/ListGroup.js +0 -31
  125. package/esm/components/ListMenu.d.ts +0 -568
  126. package/esm/components/ListMenu.js +0 -62
  127. package/esm/components/LocationPicker.d.ts +0 -467
  128. package/esm/components/LocationPicker.js +0 -208
  129. package/esm/components/Markdown.d.ts +0 -25
  130. package/esm/components/Markdown.js +0 -70
  131. package/esm/components/Menu.d.ts +0 -2
  132. package/esm/components/Menu.js +0 -7
  133. package/esm/components/MobileDevTool.d.ts +0 -12
  134. package/esm/components/MobileDevTool.js +0 -312
  135. package/esm/components/Modal.d.ts +0 -1316
  136. package/esm/components/Modal.js +0 -261
  137. package/esm/components/ModalManager.d.ts +0 -17
  138. package/esm/components/ModalManager.js +0 -42
  139. package/esm/components/MonthRangePicker.d.ts +0 -744
  140. package/esm/components/MultilineText.d.ts +0 -454
  141. package/esm/components/MultilineText.js +0 -90
  142. package/esm/components/NumberInput.d.ts +0 -201
  143. package/esm/components/NumberInput.js +0 -274
  144. package/esm/components/OverflowTpl.d.ts +0 -61
  145. package/esm/components/OverflowTpl.js +0 -101
  146. package/esm/components/Pagination.d.ts +0 -812
  147. package/esm/components/Pagination.js +0 -375
  148. package/esm/components/PdfViewer.d.ts +0 -49
  149. package/esm/components/PdfViewer.js +0 -83
  150. package/esm/components/Picker.d.ts +0 -277
  151. package/esm/components/Picker.js +0 -73
  152. package/esm/components/PickerColumn.d.ts +0 -62
  153. package/esm/components/PickerColumn.js +0 -276
  154. package/esm/components/PickerContainer.d.ts +0 -291
  155. package/esm/components/PickerContainer.js +0 -157
  156. package/esm/components/PopOverContainer.d.ts +0 -59
  157. package/esm/components/PopOverContainer.js +0 -149
  158. package/esm/components/PopUp.d.ts +0 -573
  159. package/esm/components/PopUp.js +0 -85
  160. package/esm/components/Progress.d.ts +0 -311
  161. package/esm/components/Progress.js +0 -136
  162. package/esm/components/PullRefresh.d.ts +0 -79
  163. package/esm/components/PullRefresh.js +0 -172
  164. package/esm/components/Radios.d.ts +0 -170
  165. package/esm/components/Radios.js +0 -122
  166. package/esm/components/Range.d.ts +0 -131
  167. package/esm/components/Range.js +0 -517
  168. package/esm/components/Rating.d.ts +0 -227
  169. package/esm/components/Rating.js +0 -341
  170. package/esm/components/ResultBox.d.ts +0 -532
  171. package/esm/components/ResultBox.js +0 -215
  172. package/esm/components/ResultList.d.ts +0 -554
  173. package/esm/components/ResultList.js +0 -254
  174. package/esm/components/ResultTableList.d.ts +0 -786
  175. package/esm/components/ResultTableList.js +0 -152
  176. package/esm/components/ResultTreeList.d.ts +0 -425
  177. package/esm/components/ResultTreeList.js +0 -239
  178. package/esm/components/RichText.d.ts +0 -48
  179. package/esm/components/RichText.js +0 -271
  180. package/esm/components/SearchBox.d.ts +0 -625
  181. package/esm/components/SearchBox.js +0 -299
  182. package/esm/components/Select.d.ts +0 -6498
  183. package/esm/components/Select.js +0 -843
  184. package/esm/components/SelectMobile.d.ts +0 -38
  185. package/esm/components/SelectMobile.js +0 -370
  186. package/esm/components/Selection.d.ts +0 -598
  187. package/esm/components/Selection.js +0 -166
  188. package/esm/components/Shape.d.ts +0 -58
  189. package/esm/components/Shape.js +0 -429
  190. package/esm/components/Signature.d.ts +0 -279
  191. package/esm/components/Signature.js +0 -291
  192. package/esm/components/Slider.d.ts +0 -56
  193. package/esm/components/Slider.js +0 -140
  194. package/esm/components/SparkLine.d.ts +0 -397
  195. package/esm/components/SparkLine.js +0 -62
  196. package/esm/components/Spinner.d.ts +0 -266
  197. package/esm/components/Spinner.js +0 -202
  198. package/esm/components/Steps.d.ts +0 -117
  199. package/esm/components/Steps.js +0 -76
  200. package/esm/components/Switch.d.ts +0 -105
  201. package/esm/components/Switch.js +0 -73
  202. package/esm/components/Tab.d.ts +0 -2
  203. package/esm/components/Tab.js +0 -7
  204. package/esm/components/Table.d.ts +0 -2
  205. package/esm/components/Table.js +0 -7
  206. package/esm/components/TableSelection.d.ts +0 -791
  207. package/esm/components/TableSelection.js +0 -169
  208. package/esm/components/Tabs.d.ts +0 -670
  209. package/esm/components/Tabs.js +0 -607
  210. package/esm/components/TabsTransfer.d.ts +0 -423
  211. package/esm/components/TabsTransfer.js +0 -219
  212. package/esm/components/TabsTransferPicker.d.ts +0 -267
  213. package/esm/components/TabsTransferPicker.js +0 -81
  214. package/esm/components/Tag.d.ts +0 -307
  215. package/esm/components/Tag.js +0 -137
  216. package/esm/components/Textarea.d.ts +0 -564
  217. package/esm/components/Textarea.js +0 -147
  218. package/esm/components/Timeline.d.ts +0 -56
  219. package/esm/components/Timeline.js +0 -60
  220. package/esm/components/TimelineItem.d.ts +0 -1292
  221. package/esm/components/TimelineItem.js +0 -101
  222. package/esm/components/Tinymce.d.ts +0 -66
  223. package/esm/components/Tinymce.js +0 -632
  224. package/esm/components/TitleBar.d.ts +0 -123
  225. package/esm/components/TitleBar.js +0 -48
  226. package/esm/components/Toast.d.ts +0 -591
  227. package/esm/components/Toast.js +0 -247
  228. package/esm/components/Tooltip.d.ts +0 -65
  229. package/esm/components/Tooltip.js +0 -36
  230. package/esm/components/TooltipWrapper.d.ts +0 -217
  231. package/esm/components/TooltipWrapper.js +0 -181
  232. package/esm/components/Transfer.d.ts +0 -1844
  233. package/esm/components/Transfer.js +0 -481
  234. package/esm/components/TransferDropDown.d.ts +0 -634
  235. package/esm/components/TransferDropDown.js +0 -98
  236. package/esm/components/TransferPicker.d.ts +0 -275
  237. package/esm/components/TransferPicker.js +0 -98
  238. package/esm/components/TransferSearch.d.ts +0 -283
  239. package/esm/components/TransferSearch.js +0 -100
  240. package/esm/components/Tree.d.ts +0 -1991
  241. package/esm/components/Tree.js +0 -1179
  242. package/esm/components/TreeSelection.d.ts +0 -601
  243. package/esm/components/TreeSelection.js +0 -201
  244. package/esm/components/UserSelect.d.ts +0 -541
  245. package/esm/components/UserSelect.js +0 -674
  246. package/esm/components/UserTabSelect.d.ts +0 -315
  247. package/esm/components/UserTabSelect.js +0 -227
  248. package/esm/components/VerificationCode.d.ts +0 -116
  249. package/esm/components/VerificationCode.js +0 -172
  250. package/esm/components/VirtualList.d.ts +0 -2
  251. package/esm/components/VirtualList.js +0 -7
  252. package/esm/components/WithRemoteConfig.d.ts +0 -383
  253. package/esm/components/WithRemoteConfig.js +0 -302
  254. package/esm/components/WithStore.d.ts +0 -72
  255. package/esm/components/WithStore.js +0 -48
  256. package/esm/components/calendar/Calendar.d.ts +0 -83
  257. package/esm/components/calendar/Calendar.js +0 -529
  258. package/esm/components/calendar/CalendarContainer.d.ts +0 -10
  259. package/esm/components/calendar/CalendarContainer.js +0 -27
  260. package/esm/components/calendar/DaysView.d.ts +0 -184
  261. package/esm/components/calendar/DaysView.js +0 -527
  262. package/esm/components/calendar/MonthsView.d.ts +0 -133
  263. package/esm/components/calendar/MonthsView.js +0 -175
  264. package/esm/components/calendar/QuartersView.d.ts +0 -102
  265. package/esm/components/calendar/QuartersView.js +0 -125
  266. package/esm/components/calendar/TimeView.d.ts +0 -183
  267. package/esm/components/calendar/TimeView.js +0 -559
  268. package/esm/components/calendar/YearsView.d.ts +0 -102
  269. package/esm/components/calendar/YearsView.js +0 -122
  270. package/esm/components/condition-builder/Expression.d.ts +0 -292
  271. package/esm/components/condition-builder/Expression.js +0 -121
  272. package/esm/components/condition-builder/Field.d.ts +0 -272
  273. package/esm/components/condition-builder/Field.js +0 -32
  274. package/esm/components/condition-builder/Formula.d.ts +0 -261
  275. package/esm/components/condition-builder/Func.d.ts +0 -273
  276. package/esm/components/condition-builder/Func.js +0 -75
  277. package/esm/components/condition-builder/Group.d.ts +0 -310
  278. package/esm/components/condition-builder/Group.js +0 -191
  279. package/esm/components/condition-builder/GroupOrItem.d.ts +0 -87
  280. package/esm/components/condition-builder/GroupOrItem.js +0 -105
  281. package/esm/components/condition-builder/InputSwitch.d.ts +0 -47
  282. package/esm/components/condition-builder/InputSwitch.js +0 -28
  283. package/esm/components/condition-builder/Item.d.ts +0 -287
  284. package/esm/components/condition-builder/Item.js +0 -232
  285. package/esm/components/condition-builder/Value.d.ts +0 -272
  286. package/esm/components/condition-builder/Value.js +0 -108
  287. package/esm/components/condition-builder/config.d.ts +0 -36
  288. package/esm/components/condition-builder/config.js +0 -120
  289. package/esm/components/condition-builder/index.d.ts +0 -319
  290. package/esm/components/condition-builder/index.js +0 -228
  291. package/esm/components/condition-builder/types.d.ts +0 -115
  292. package/esm/components/formula/CodeEditor.d.ts +0 -92
  293. package/esm/components/formula/CodeEditor.js +0 -99
  294. package/esm/components/formula/Editor.d.ts +0 -516
  295. package/esm/components/formula/Editor.js +0 -430
  296. package/esm/components/formula/FuncList.d.ts +0 -46
  297. package/esm/components/formula/FuncList.js +0 -63
  298. package/esm/components/formula/Input.d.ts +0 -292
  299. package/esm/components/formula/Input.js +0 -122
  300. package/esm/components/formula/Picker.d.ts +0 -492
  301. package/esm/components/formula/Picker.js +0 -454
  302. package/esm/components/formula/VariableList.d.ts +0 -58
  303. package/esm/components/formula/VariableList.js +0 -182
  304. package/esm/components/formula/plugin.d.ts +0 -51
  305. package/esm/components/formula/plugin.js +0 -372
  306. package/esm/components/icons.d.ts +0 -61
  307. package/esm/components/icons.js +0 -456
  308. package/esm/components/index.d.ts +0 -136
  309. package/esm/components/json-schema/Array.d.ts +0 -3
  310. package/esm/components/json-schema/Array.js +0 -129
  311. package/esm/components/json-schema/Item.d.ts +0 -5
  312. package/esm/components/json-schema/Item.js +0 -63
  313. package/esm/components/json-schema/Object.d.ts +0 -5
  314. package/esm/components/json-schema/Object.js +0 -265
  315. package/esm/components/json-schema/index.d.ts +0 -272
  316. package/esm/components/json-schema/index.js +0 -29
  317. package/esm/components/menu/MenuContext.d.ts +0 -83
  318. package/esm/components/menu/MenuContext.js +0 -25
  319. package/esm/components/menu/MenuItem.d.ts +0 -81
  320. package/esm/components/menu/MenuItem.js +0 -112
  321. package/esm/components/menu/PanelMenu.d.ts +0 -46
  322. package/esm/components/menu/PanelMenu.js +0 -68
  323. package/esm/components/menu/SubMenu.d.ts +0 -84
  324. package/esm/components/menu/SubMenu.js +0 -137
  325. package/esm/components/menu/index.d.ts +0 -381
  326. package/esm/components/menu/index.js +0 -369
  327. package/esm/components/schema-editor/Array.d.ts +0 -11
  328. package/esm/components/schema-editor/Array.js +0 -84
  329. package/esm/components/schema-editor/Common.d.ts +0 -61
  330. package/esm/components/schema-editor/Common.js +0 -161
  331. package/esm/components/schema-editor/Item.d.ts +0 -8
  332. package/esm/components/schema-editor/Item.js +0 -24
  333. package/esm/components/schema-editor/Object.d.ts +0 -51
  334. package/esm/components/schema-editor/Object.js +0 -294
  335. package/esm/components/schema-editor/SchemaVariableList.d.ts +0 -186
  336. package/esm/components/schema-editor/SchemaVariableList.js +0 -74
  337. package/esm/components/schema-editor/SchemaVariableListPicker.d.ts +0 -179
  338. package/esm/components/schema-editor/SchemaVariableListPicker.js +0 -34
  339. package/esm/components/schema-editor/index.d.ts +0 -797
  340. package/esm/components/schema-editor/index.js +0 -122
  341. package/esm/components/table/Cell.d.ts +0 -36
  342. package/esm/components/table/Cell.js +0 -43
  343. package/esm/components/table/ColGroup.d.ts +0 -24
  344. package/esm/components/table/ColGroup.js +0 -58
  345. package/esm/components/table/Head.d.ts +0 -45
  346. package/esm/components/table/Head.js +0 -150
  347. package/esm/components/table/HeadCellDropDown.d.ts +0 -289
  348. package/esm/components/table/HeadCellDropDown.js +0 -55
  349. package/esm/components/table/HeadCellFilter.d.ts +0 -414
  350. package/esm/components/table/HeadCellFilter.js +0 -131
  351. package/esm/components/table/HeadCellSelect.d.ts +0 -357
  352. package/esm/components/table/HeadCellSelect.js +0 -52
  353. package/esm/components/table/HeadCellSort.d.ts +0 -278
  354. package/esm/components/table/HeadCellSort.js +0 -88
  355. package/esm/components/table/ItemActionsWrapper.d.ts +0 -10
  356. package/esm/components/table/ItemActionsWrapper.js +0 -29
  357. package/esm/components/table/Row.d.ts +0 -56
  358. package/esm/components/table/Row.js +0 -224
  359. package/esm/components/table/SummaryRow.d.ts +0 -28
  360. package/esm/components/table/SummaryRow.js +0 -73
  361. package/esm/components/table/index.d.ts +0 -852
  362. package/esm/components/table/index.js +0 -1067
  363. package/esm/components/table/util.d.ts +0 -56
  364. package/esm/components/table/util.js +0 -263
  365. package/esm/components/virtual-list/AutoSizer.d.ts +0 -19
  366. package/esm/components/virtual-list/AutoSizer.js +0 -49
  367. package/esm/components/virtual-list/SizeAndPositionManager.d.ts +0 -70
  368. package/esm/components/virtual-list/SizeAndPositionManager.js +0 -216
  369. package/esm/components/virtual-list/constants.d.ts +0 -34
  370. package/esm/components/virtual-list/constants.js +0 -45
  371. package/esm/components/virtual-list/index.d.ts +0 -99
  372. package/esm/components/virtual-list/index.js +0 -288
  373. package/esm/components/withBadge.d.ts +0 -2
  374. package/esm/components/withBadge.js +0 -7
  375. package/esm/hooks/index.d.ts +0 -8
  376. package/esm/hooks/use-click-away.d.ts +0 -12
  377. package/esm/hooks/use-click-away.js +0 -55
  378. package/esm/hooks/use-on-screen.d.ts +0 -2
  379. package/esm/hooks/use-on-screen.js +0 -28
  380. package/esm/hooks/use-set-state.d.ts +0 -2
  381. package/esm/hooks/use-set-state.js +0 -19
  382. package/esm/hooks/use-sub-form.d.ts +0 -4
  383. package/esm/hooks/use-sub-form.js +0 -39
  384. package/esm/hooks/use-touch.d.ts +0 -16
  385. package/esm/hooks/use-touch.js +0 -77
  386. package/esm/hooks/use-update-effect.d.ts +0 -3
  387. package/esm/hooks/use-update-effect.js +0 -21
  388. package/esm/hooks/use-validation-resolver.d.ts +0 -7
  389. package/esm/hooks/use-validation-resolver.js +0 -115
  390. package/esm/icons/alert-danger.svg.js +0 -22
  391. package/esm/icons/alert-info.svg.js +0 -22
  392. package/esm/icons/alert-success.svg.js +0 -22
  393. package/esm/icons/alert-warning.svg.js +0 -22
  394. package/esm/icons/arrow-double-left.svg.js +0 -24
  395. package/esm/icons/arrow-double-right.svg.js +0 -24
  396. package/esm/icons/back.svg.js +0 -21
  397. package/esm/icons/calendar.svg.js +0 -31
  398. package/esm/icons/caret.svg.js +0 -21
  399. package/esm/icons/check.svg.js +0 -21
  400. package/esm/icons/clock.svg.js +0 -29
  401. package/esm/icons/close-small.svg.js +0 -24
  402. package/esm/icons/close.svg.js +0 -21
  403. package/esm/icons/cloud-upload.svg.js +0 -22
  404. package/esm/icons/column-filter.svg.js +0 -22
  405. package/esm/icons/columns.svg.js +0 -21
  406. package/esm/icons/compress-alt.svg.js +0 -21
  407. package/esm/icons/copy.svg.js +0 -26
  408. package/esm/icons/date.svg.js +0 -26
  409. package/esm/icons/department.svg.js +0 -52
  410. package/esm/icons/desk-empty.svg.js +0 -73
  411. package/esm/icons/dot.svg.js +0 -36
  412. package/esm/icons/down-arrow-bold.svg.js +0 -22
  413. package/esm/icons/down.svg.js +0 -23
  414. package/esm/icons/download.svg.js +0 -24
  415. package/esm/icons/drag-bar.svg.js +0 -53
  416. package/esm/icons/drag.svg.js +0 -22
  417. package/esm/icons/edit.svg.js +0 -21
  418. package/esm/icons/ellipsis-v.svg.js +0 -21
  419. package/esm/icons/enter.svg.js +0 -20
  420. package/esm/icons/exchange.svg.js +0 -21
  421. package/esm/icons/expand-alt.svg.js +0 -21
  422. package/esm/icons/fail.svg.js +0 -31
  423. package/esm/icons/file.svg.js +0 -22
  424. package/esm/icons/filter.svg.js +0 -21
  425. package/esm/icons/folder.svg.js +0 -24
  426. package/esm/icons/fullscreen.svg.js +0 -21
  427. package/esm/icons/function.svg.js +0 -21
  428. package/esm/icons/home.svg.js +0 -21
  429. package/esm/icons/if.svg.js +0 -21
  430. package/esm/icons/image.svg.js +0 -20
  431. package/esm/icons/info-circle.svg.js +0 -21
  432. package/esm/icons/info.svg.js +0 -27
  433. package/esm/icons/input-clear.svg.js +0 -20
  434. package/esm/icons/invisible.svg.js +0 -22
  435. package/esm/icons/left-arrow.svg.js +0 -23
  436. package/esm/icons/loading-outline.svg.js +0 -21
  437. package/esm/icons/location.svg.js +0 -20
  438. package/esm/icons/menu.svg.js +0 -20
  439. package/esm/icons/minus.svg.js +0 -21
  440. package/esm/icons/move.svg.js +0 -22
  441. package/esm/icons/mute.svg.js +0 -21
  442. package/esm/icons/new-edit.svg.js +0 -22
  443. package/esm/icons/pause.svg.js +0 -21
  444. package/esm/icons/pencil.svg.js +0 -21
  445. package/esm/icons/play.svg.js +0 -20
  446. package/esm/icons/plus-cicle.svg.js +0 -20
  447. package/esm/icons/plus-fine.svg.js +0 -21
  448. package/esm/icons/plus.svg.js +0 -21
  449. package/esm/icons/post.svg.js +0 -48
  450. package/esm/icons/question-mark.svg.js +0 -26
  451. package/esm/icons/question.svg.js +0 -21
  452. package/esm/icons/redo.svg.js +0 -21
  453. package/esm/icons/refresh.svg.js +0 -21
  454. package/esm/icons/reload.svg.js +0 -21
  455. package/esm/icons/remove.svg.js +0 -21
  456. package/esm/icons/retry.svg.js +0 -24
  457. package/esm/icons/right-arrow-bold.svg.js +0 -21
  458. package/esm/icons/right-arrow.svg.js +0 -23
  459. package/esm/icons/right-double-arrow.svg.js +0 -22
  460. package/esm/icons/role.svg.js +0 -43
  461. package/esm/icons/rotate-left.svg.js +0 -22
  462. package/esm/icons/rotate-right.svg.js +0 -22
  463. package/esm/icons/rotate-screen.svg.js +0 -21
  464. package/esm/icons/scale-origin.svg.js +0 -24
  465. package/esm/icons/schedule.svg.js +0 -24
  466. package/esm/icons/search.svg.js +0 -21
  467. package/esm/icons/setting.svg.js +0 -21
  468. package/esm/icons/slider-handle-icon.svg.js +0 -22
  469. package/esm/icons/sort-asc.svg.js +0 -21
  470. package/esm/icons/sort-default.svg.js +0 -21
  471. package/esm/icons/sort-desc.svg.js +0 -21
  472. package/esm/icons/star.svg.js +0 -21
  473. package/esm/icons/status-close.svg.js +0 -23
  474. package/esm/icons/steps-finsh.svg.js +0 -22
  475. package/esm/icons/sub-plus.svg.js +0 -20
  476. package/esm/icons/success.svg.js +0 -29
  477. package/esm/icons/transparent.svg.js +0 -38
  478. package/esm/icons/trash.svg.js +0 -22
  479. package/esm/icons/tree-down.svg.js +0 -21
  480. package/esm/icons/undo-normal.svg.js +0 -25
  481. package/esm/icons/undo.svg.js +0 -21
  482. package/esm/icons/unfullscreen.svg.js +0 -21
  483. package/esm/icons/upload.svg.js +0 -21
  484. package/esm/icons/user-remove.svg.js +0 -33
  485. package/esm/icons/view.svg.js +0 -22
  486. package/esm/icons/volume.svg.js +0 -24
  487. package/esm/icons/warning-mark.svg.js +0 -22
  488. package/esm/icons/warning.svg.js +0 -21
  489. package/esm/icons/window-restore.svg.js +0 -21
  490. package/esm/icons/zoom-in.svg.js +0 -21
  491. package/esm/icons/zoom-out.svg.js +0 -21
  492. package/esm/index.d.ts +0 -15
  493. package/esm/index.js +0 -154
  494. package/esm/locale/de-DE.d.ts +0 -1
  495. package/esm/locale/de-DE.js +0 -419
  496. package/esm/locale/en-US.d.ts +0 -1
  497. package/esm/locale/en-US.js +0 -425
  498. package/esm/locale/zh-CN.d.ts +0 -1
  499. package/esm/locale/zh-CN.js +0 -434
  500. package/esm/themes/ang.d.ts +0 -3
  501. package/esm/themes/ang.js +0 -15
  502. package/esm/themes/antd.d.ts +0 -1
  503. package/esm/themes/antd.js +0 -42
  504. package/esm/themes/cxd.d.ts +0 -3
  505. package/esm/themes/cxd.js +0 -455
  506. package/esm/themes/dark.d.ts +0 -3
  507. package/esm/themes/dark.js +0 -23
  508. package/esm/themes/default.d.ts +0 -4
  509. package/esm/utils/index.d.ts +0 -2
  510. package/esm/utils/smoothSignature.d.ts +0 -86
  511. package/esm/utils/vectorComputed.d.ts +0 -20
  512. package/esm/utils/vectorComputed.js +0 -75
  513. package/esm/withRemoteConfig.d.ts +0 -2
  514. package/esm/withRemoteConfig.js +0 -7
  515. package/esm/withStore.d.ts +0 -2
  516. package/esm/withStore.js +0 -7
  517. package/lib/components/404.d.ts +0 -53
  518. package/lib/components/404.js +0 -43
  519. package/lib/components/Alert.d.ts +0 -615
  520. package/lib/components/Alert.js +0 -279
  521. package/lib/components/Alert2.d.ts +0 -117
  522. package/lib/components/Alert2.js +0 -66
  523. package/lib/components/AlphabetIndexer.d.ts +0 -11
  524. package/lib/components/AlphabetIndexer.js +0 -59
  525. package/lib/components/AnchorNav.d.ts +0 -162
  526. package/lib/components/AnchorNav.js +0 -162
  527. package/lib/components/AnchorNavSection.d.ts +0 -2
  528. package/lib/components/AnchorNavSection.js +0 -14
  529. package/lib/components/ArrayInput.d.ts +0 -617
  530. package/lib/components/ArrayInput.js +0 -160
  531. package/lib/components/AsideNav.d.ts +0 -142
  532. package/lib/components/AsideNav.js +0 -140
  533. package/lib/components/AssociatedSelection.d.ts +0 -564
  534. package/lib/components/AssociatedSelection.js +0 -106
  535. package/lib/components/AutoSizer.d.ts +0 -2
  536. package/lib/components/AutoSizer.js +0 -15
  537. package/lib/components/Avatar.d.ts +0 -374
  538. package/lib/components/Avatar.js +0 -154
  539. package/lib/components/Badge.d.ts +0 -118
  540. package/lib/components/Badge.js +0 -165
  541. package/lib/components/BaiduMapPicker.d.ts +0 -100
  542. package/lib/components/BaiduMapPicker.js +0 -379
  543. package/lib/components/BarCode.d.ts +0 -56
  544. package/lib/components/BarCode.js +0 -52
  545. package/lib/components/Breadcrumb.d.ts +0 -115
  546. package/lib/components/Breadcrumb.js +0 -170
  547. package/lib/components/Button.d.ts +0 -147
  548. package/lib/components/Button.js +0 -71
  549. package/lib/components/CalendarMobile.d.ts +0 -431
  550. package/lib/components/CalendarMobile.js +0 -546
  551. package/lib/components/Card.d.ts +0 -444
  552. package/lib/components/Card.js +0 -100
  553. package/lib/components/Cascader.d.ts +0 -108
  554. package/lib/components/Cascader.js +0 -527
  555. package/lib/components/ChainedDropdownSelection.d.ts +0 -561
  556. package/lib/components/ChainedDropdownSelection.js +0 -116
  557. package/lib/components/ChainedSelection.d.ts +0 -554
  558. package/lib/components/ChainedSelection.js +0 -197
  559. package/lib/components/Checkbox.d.ts +0 -110
  560. package/lib/components/Checkbox.js +0 -95
  561. package/lib/components/CityArea.d.ts +0 -299
  562. package/lib/components/CityArea.js +0 -197
  563. package/lib/components/CityDB.d.ts +0 -13
  564. package/lib/components/CityDB.js +0 -3949
  565. package/lib/components/CodeMirror.d.ts +0 -29
  566. package/lib/components/CodeMirror.js +0 -152
  567. package/lib/components/Collapse.d.ts +0 -447
  568. package/lib/components/Collapse.js +0 -192
  569. package/lib/components/CollapseGroup.d.ts +0 -219
  570. package/lib/components/CollapseGroup.js +0 -124
  571. package/lib/components/ColorPicker.d.ts +0 -530
  572. package/lib/components/ColorPicker.js +0 -267
  573. package/lib/components/Combo.d.ts +0 -354
  574. package/lib/components/Combo.js +0 -165
  575. package/lib/components/ConditionBuilder.d.ts +0 -2
  576. package/lib/components/ConditionBuilder.js +0 -14
  577. package/lib/components/ConfirmBox.d.ts +0 -322
  578. package/lib/components/ConfirmBox.js +0 -141
  579. package/lib/components/ContextMenu.d.ts +0 -115
  580. package/lib/components/ContextMenu.js +0 -322
  581. package/lib/components/DatePicker.d.ts +0 -638
  582. package/lib/components/DatePicker.js +0 -725
  583. package/lib/components/DateRangePicker.d.ts +0 -1046
  584. package/lib/components/DateRangePicker.js +0 -1401
  585. package/lib/components/DiffEditor.d.ts +0 -21
  586. package/lib/components/DiffEditor.js +0 -130
  587. package/lib/components/DndContainer.d.ts +0 -205
  588. package/lib/components/DndContainer.js +0 -32
  589. package/lib/components/Drawer.d.ts +0 -158
  590. package/lib/components/Drawer.js +0 -279
  591. package/lib/components/DropDownSelection.d.ts +0 -557
  592. package/lib/components/DropDownSelection.js +0 -85
  593. package/lib/components/DropdownContextMenus.d.ts +0 -84
  594. package/lib/components/DropdownContextMenus.js +0 -101
  595. package/lib/components/Editor.d.ts +0 -681
  596. package/lib/components/Editor.js +0 -246
  597. package/lib/components/Form.d.ts +0 -31
  598. package/lib/components/Form.js +0 -97
  599. package/lib/components/FormField.d.ts +0 -287
  600. package/lib/components/FormField.js +0 -90
  601. package/lib/components/FormulaPicker.d.ts +0 -2
  602. package/lib/components/FormulaPicker.js +0 -14
  603. package/lib/components/GaodeMapPicker.d.ts +0 -89
  604. package/lib/components/GaodeMapPicker.js +0 -217
  605. package/lib/components/GridNav.d.ts +0 -53
  606. package/lib/components/GridNav.js +0 -133
  607. package/lib/components/GridNavItem.d.ts +0 -2
  608. package/lib/components/GridNavItem.js +0 -14
  609. package/lib/components/GroupedSelection.d.ts +0 -543
  610. package/lib/components/GroupedSelection.js +0 -150
  611. package/lib/components/HeadCellDropDown.d.ts +0 -2
  612. package/lib/components/HeadCellDropDown.js +0 -14
  613. package/lib/components/HorizontalScroll.d.ts +0 -75
  614. package/lib/components/HorizontalScroll.js +0 -283
  615. package/lib/components/Html.d.ts +0 -82
  616. package/lib/components/Html.js +0 -59
  617. package/lib/components/Icon.d.ts +0 -2
  618. package/lib/components/Icon.js +0 -14
  619. package/lib/components/ImageGallery.d.ts +0 -465
  620. package/lib/components/ImageGallery.js +0 -409
  621. package/lib/components/Input.d.ts +0 -18
  622. package/lib/components/Input.js +0 -86
  623. package/lib/components/InputBox.d.ts +0 -100
  624. package/lib/components/InputBox.js +0 -110
  625. package/lib/components/InputBoxWithSuggestion.d.ts +0 -272
  626. package/lib/components/InputBoxWithSuggestion.js +0 -81
  627. package/lib/components/InputJSONSchema.d.ts +0 -2
  628. package/lib/components/InputJSONSchema.js +0 -14
  629. package/lib/components/InputTable.d.ts +0 -317
  630. package/lib/components/InputTable.js +0 -189
  631. package/lib/components/JSONSchemaEditor.d.ts +0 -2
  632. package/lib/components/JSONSchemaEditor.js +0 -14
  633. package/lib/components/Layout.d.ts +0 -74
  634. package/lib/components/Layout.js +0 -56
  635. package/lib/components/Link.d.ts +0 -60
  636. package/lib/components/Link.js +0 -56
  637. package/lib/components/ListGroup.d.ts +0 -77
  638. package/lib/components/ListGroup.js +0 -43
  639. package/lib/components/ListMenu.d.ts +0 -568
  640. package/lib/components/ListMenu.js +0 -74
  641. package/lib/components/LocationPicker.d.ts +0 -467
  642. package/lib/components/LocationPicker.js +0 -220
  643. package/lib/components/Markdown.d.ts +0 -25
  644. package/lib/components/Markdown.js +0 -83
  645. package/lib/components/Menu.d.ts +0 -2
  646. package/lib/components/Menu.js +0 -14
  647. package/lib/components/MobileDevTool.d.ts +0 -12
  648. package/lib/components/MobileDevTool.js +0 -325
  649. package/lib/components/Modal.d.ts +0 -1316
  650. package/lib/components/Modal.js +0 -272
  651. package/lib/components/ModalManager.d.ts +0 -17
  652. package/lib/components/ModalManager.js +0 -53
  653. package/lib/components/MonthRangePicker.d.ts +0 -744
  654. package/lib/components/MultilineText.d.ts +0 -454
  655. package/lib/components/MultilineText.js +0 -102
  656. package/lib/components/NumberInput.d.ts +0 -201
  657. package/lib/components/NumberInput.js +0 -289
  658. package/lib/components/OverflowTpl.d.ts +0 -61
  659. package/lib/components/OverflowTpl.js +0 -109
  660. package/lib/components/Pagination.d.ts +0 -812
  661. package/lib/components/Pagination.js +0 -388
  662. package/lib/components/PdfViewer.d.ts +0 -49
  663. package/lib/components/PdfViewer.js +0 -89
  664. package/lib/components/Picker.d.ts +0 -277
  665. package/lib/components/Picker.js +0 -80
  666. package/lib/components/PickerColumn.d.ts +0 -62
  667. package/lib/components/PickerColumn.js +0 -288
  668. package/lib/components/PickerContainer.d.ts +0 -291
  669. package/lib/components/PickerContainer.js +0 -169
  670. package/lib/components/PopOverContainer.d.ts +0 -59
  671. package/lib/components/PopOverContainer.js +0 -162
  672. package/lib/components/PopUp.d.ts +0 -573
  673. package/lib/components/PopUp.js +0 -94
  674. package/lib/components/Progress.d.ts +0 -311
  675. package/lib/components/Progress.js +0 -148
  676. package/lib/components/PullRefresh.d.ts +0 -79
  677. package/lib/components/PullRefresh.js +0 -178
  678. package/lib/components/Radios.d.ts +0 -170
  679. package/lib/components/Radios.js +0 -119
  680. package/lib/components/Range.d.ts +0 -131
  681. package/lib/components/Range.js +0 -528
  682. package/lib/components/Rating.d.ts +0 -227
  683. package/lib/components/Rating.js +0 -349
  684. package/lib/components/ResultBox.d.ts +0 -532
  685. package/lib/components/ResultBox.js +0 -230
  686. package/lib/components/ResultList.d.ts +0 -554
  687. package/lib/components/ResultList.js +0 -268
  688. package/lib/components/ResultTableList.d.ts +0 -786
  689. package/lib/components/ResultTableList.js +0 -161
  690. package/lib/components/ResultTreeList.d.ts +0 -425
  691. package/lib/components/ResultTreeList.js +0 -254
  692. package/lib/components/RichText.d.ts +0 -48
  693. package/lib/components/RichText.js +0 -283
  694. package/lib/components/SearchBox.d.ts +0 -625
  695. package/lib/components/SearchBox.js +0 -315
  696. package/lib/components/Select.d.ts +0 -6498
  697. package/lib/components/Select.js +0 -861
  698. package/lib/components/SelectMobile.d.ts +0 -38
  699. package/lib/components/SelectMobile.js +0 -382
  700. package/lib/components/Selection.d.ts +0 -598
  701. package/lib/components/Selection.js +0 -176
  702. package/lib/components/Shape.d.ts +0 -58
  703. package/lib/components/Shape.js +0 -434
  704. package/lib/components/Signature.d.ts +0 -279
  705. package/lib/components/Signature.js +0 -295
  706. package/lib/components/Slider.d.ts +0 -56
  707. package/lib/components/Slider.js +0 -146
  708. package/lib/components/SparkLine.d.ts +0 -397
  709. package/lib/components/SparkLine.js +0 -74
  710. package/lib/components/Spinner.d.ts +0 -266
  711. package/lib/components/Spinner.js +0 -210
  712. package/lib/components/Steps.d.ts +0 -117
  713. package/lib/components/Steps.js +0 -84
  714. package/lib/components/Switch.d.ts +0 -105
  715. package/lib/components/Switch.js +0 -80
  716. package/lib/components/Tab.d.ts +0 -2
  717. package/lib/components/Tab.js +0 -14
  718. package/lib/components/Table.d.ts +0 -2
  719. package/lib/components/Table.js +0 -14
  720. package/lib/components/TableSelection.d.ts +0 -791
  721. package/lib/components/TableSelection.js +0 -183
  722. package/lib/components/Tabs.d.ts +0 -670
  723. package/lib/components/Tabs.js +0 -618
  724. package/lib/components/TabsTransfer.d.ts +0 -423
  725. package/lib/components/TabsTransfer.js +0 -232
  726. package/lib/components/TabsTransferPicker.d.ts +0 -267
  727. package/lib/components/TabsTransferPicker.js +0 -93
  728. package/lib/components/Tag.d.ts +0 -307
  729. package/lib/components/Tag.js +0 -146
  730. package/lib/components/Textarea.d.ts +0 -564
  731. package/lib/components/Textarea.js +0 -160
  732. package/lib/components/Timeline.d.ts +0 -56
  733. package/lib/components/Timeline.js +0 -68
  734. package/lib/components/TimelineItem.d.ts +0 -1292
  735. package/lib/components/TimelineItem.js +0 -118
  736. package/lib/components/Tinymce.d.ts +0 -66
  737. package/lib/components/Tinymce.js +0 -648
  738. package/lib/components/TitleBar.d.ts +0 -123
  739. package/lib/components/TitleBar.js +0 -51
  740. package/lib/components/Toast.d.ts +0 -591
  741. package/lib/components/Toast.js +0 -258
  742. package/lib/components/Tooltip.d.ts +0 -65
  743. package/lib/components/Tooltip.js +0 -43
  744. package/lib/components/TooltipWrapper.d.ts +0 -217
  745. package/lib/components/TooltipWrapper.js +0 -188
  746. package/lib/components/Transfer.d.ts +0 -1844
  747. package/lib/components/Transfer.js +0 -498
  748. package/lib/components/TransferDropDown.d.ts +0 -634
  749. package/lib/components/TransferDropDown.js +0 -106
  750. package/lib/components/TransferPicker.d.ts +0 -275
  751. package/lib/components/TransferPicker.js +0 -110
  752. package/lib/components/TransferSearch.d.ts +0 -283
  753. package/lib/components/TransferSearch.js +0 -113
  754. package/lib/components/Tree.d.ts +0 -1991
  755. package/lib/components/Tree.js +0 -1173
  756. package/lib/components/TreeSelection.d.ts +0 -601
  757. package/lib/components/TreeSelection.js +0 -209
  758. package/lib/components/UserSelect.d.ts +0 -541
  759. package/lib/components/UserSelect.js +0 -685
  760. package/lib/components/UserTabSelect.d.ts +0 -315
  761. package/lib/components/UserTabSelect.js +0 -235
  762. package/lib/components/VerificationCode.d.ts +0 -116
  763. package/lib/components/VerificationCode.js +0 -191
  764. package/lib/components/VirtualList.d.ts +0 -2
  765. package/lib/components/VirtualList.js +0 -14
  766. package/lib/components/WithRemoteConfig.d.ts +0 -383
  767. package/lib/components/WithRemoteConfig.js +0 -316
  768. package/lib/components/WithStore.d.ts +0 -72
  769. package/lib/components/WithStore.js +0 -61
  770. package/lib/components/calendar/Calendar.d.ts +0 -83
  771. package/lib/components/calendar/Calendar.js +0 -542
  772. package/lib/components/calendar/CalendarContainer.d.ts +0 -10
  773. package/lib/components/calendar/CalendarContainer.js +0 -38
  774. package/lib/components/calendar/DaysView.d.ts +0 -184
  775. package/lib/components/calendar/DaysView.js +0 -546
  776. package/lib/components/calendar/MonthsView.d.ts +0 -133
  777. package/lib/components/calendar/MonthsView.js +0 -188
  778. package/lib/components/calendar/QuartersView.d.ts +0 -102
  779. package/lib/components/calendar/QuartersView.js +0 -138
  780. package/lib/components/calendar/TimeView.d.ts +0 -183
  781. package/lib/components/calendar/TimeView.js +0 -574
  782. package/lib/components/calendar/YearsView.d.ts +0 -102
  783. package/lib/components/calendar/YearsView.js +0 -135
  784. package/lib/components/condition-builder/Expression.d.ts +0 -292
  785. package/lib/components/condition-builder/Expression.js +0 -133
  786. package/lib/components/condition-builder/Field.d.ts +0 -272
  787. package/lib/components/condition-builder/Field.js +0 -44
  788. package/lib/components/condition-builder/Formula.d.ts +0 -261
  789. package/lib/components/condition-builder/Func.d.ts +0 -273
  790. package/lib/components/condition-builder/Func.js +0 -87
  791. package/lib/components/condition-builder/Group.d.ts +0 -310
  792. package/lib/components/condition-builder/Group.js +0 -203
  793. package/lib/components/condition-builder/GroupOrItem.d.ts +0 -87
  794. package/lib/components/condition-builder/GroupOrItem.js +0 -117
  795. package/lib/components/condition-builder/InputSwitch.d.ts +0 -47
  796. package/lib/components/condition-builder/InputSwitch.js +0 -36
  797. package/lib/components/condition-builder/Item.d.ts +0 -287
  798. package/lib/components/condition-builder/Item.js +0 -244
  799. package/lib/components/condition-builder/Value.d.ts +0 -272
  800. package/lib/components/condition-builder/Value.js +0 -121
  801. package/lib/components/condition-builder/config.d.ts +0 -36
  802. package/lib/components/condition-builder/config.js +0 -125
  803. package/lib/components/condition-builder/index.d.ts +0 -319
  804. package/lib/components/condition-builder/index.js +0 -240
  805. package/lib/components/condition-builder/types.d.ts +0 -115
  806. package/lib/components/formula/CodeEditor.d.ts +0 -92
  807. package/lib/components/formula/CodeEditor.js +0 -110
  808. package/lib/components/formula/Editor.d.ts +0 -516
  809. package/lib/components/formula/Editor.js +0 -444
  810. package/lib/components/formula/FuncList.d.ts +0 -46
  811. package/lib/components/formula/FuncList.js +0 -75
  812. package/lib/components/formula/Input.d.ts +0 -292
  813. package/lib/components/formula/Input.js +0 -134
  814. package/lib/components/formula/Picker.d.ts +0 -492
  815. package/lib/components/formula/Picker.js +0 -467
  816. package/lib/components/formula/VariableList.d.ts +0 -58
  817. package/lib/components/formula/VariableList.js +0 -193
  818. package/lib/components/formula/plugin.d.ts +0 -51
  819. package/lib/components/formula/plugin.js +0 -381
  820. package/lib/components/icons.d.ts +0 -61
  821. package/lib/components/icons.js +0 -484
  822. package/lib/components/index.d.ts +0 -136
  823. package/lib/components/json-schema/Array.d.ts +0 -3
  824. package/lib/components/json-schema/Array.js +0 -140
  825. package/lib/components/json-schema/Item.d.ts +0 -5
  826. package/lib/components/json-schema/Item.js +0 -75
  827. package/lib/components/json-schema/Object.d.ts +0 -5
  828. package/lib/components/json-schema/Object.js +0 -278
  829. package/lib/components/json-schema/index.d.ts +0 -272
  830. package/lib/components/json-schema/index.js +0 -40
  831. package/lib/components/menu/MenuContext.d.ts +0 -83
  832. package/lib/components/menu/MenuContext.js +0 -29
  833. package/lib/components/menu/MenuItem.d.ts +0 -81
  834. package/lib/components/menu/MenuItem.js +0 -120
  835. package/lib/components/menu/PanelMenu.d.ts +0 -46
  836. package/lib/components/menu/PanelMenu.js +0 -74
  837. package/lib/components/menu/SubMenu.d.ts +0 -84
  838. package/lib/components/menu/SubMenu.js +0 -145
  839. package/lib/components/menu/index.d.ts +0 -381
  840. package/lib/components/menu/index.js +0 -379
  841. package/lib/components/schema-editor/Array.d.ts +0 -11
  842. package/lib/components/schema-editor/Array.js +0 -95
  843. package/lib/components/schema-editor/Common.d.ts +0 -61
  844. package/lib/components/schema-editor/Common.js +0 -174
  845. package/lib/components/schema-editor/Item.d.ts +0 -8
  846. package/lib/components/schema-editor/Item.js +0 -35
  847. package/lib/components/schema-editor/Object.d.ts +0 -51
  848. package/lib/components/schema-editor/Object.js +0 -305
  849. package/lib/components/schema-editor/SchemaVariableList.d.ts +0 -186
  850. package/lib/components/schema-editor/SchemaVariableList.js +0 -86
  851. package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +0 -179
  852. package/lib/components/schema-editor/SchemaVariableListPicker.js +0 -46
  853. package/lib/components/schema-editor/index.d.ts +0 -797
  854. package/lib/components/schema-editor/index.js +0 -131
  855. package/lib/components/table/Cell.d.ts +0 -36
  856. package/lib/components/table/Cell.js +0 -50
  857. package/lib/components/table/ColGroup.d.ts +0 -24
  858. package/lib/components/table/ColGroup.js +0 -69
  859. package/lib/components/table/Head.d.ts +0 -45
  860. package/lib/components/table/Head.js +0 -157
  861. package/lib/components/table/HeadCellDropDown.d.ts +0 -289
  862. package/lib/components/table/HeadCellDropDown.js +0 -63
  863. package/lib/components/table/HeadCellFilter.d.ts +0 -414
  864. package/lib/components/table/HeadCellFilter.js +0 -140
  865. package/lib/components/table/HeadCellSelect.d.ts +0 -357
  866. package/lib/components/table/HeadCellSelect.js +0 -60
  867. package/lib/components/table/HeadCellSort.d.ts +0 -278
  868. package/lib/components/table/HeadCellSort.js +0 -96
  869. package/lib/components/table/ItemActionsWrapper.d.ts +0 -10
  870. package/lib/components/table/ItemActionsWrapper.js +0 -40
  871. package/lib/components/table/Row.d.ts +0 -56
  872. package/lib/components/table/Row.js +0 -231
  873. package/lib/components/table/SummaryRow.d.ts +0 -28
  874. package/lib/components/table/SummaryRow.js +0 -81
  875. package/lib/components/table/index.d.ts +0 -852
  876. package/lib/components/table/index.js +0 -1081
  877. package/lib/components/table/util.d.ts +0 -56
  878. package/lib/components/table/util.js +0 -285
  879. package/lib/components/virtual-list/AutoSizer.d.ts +0 -19
  880. package/lib/components/virtual-list/AutoSizer.js +0 -76
  881. package/lib/components/virtual-list/SizeAndPositionManager.d.ts +0 -70
  882. package/lib/components/virtual-list/SizeAndPositionManager.js +0 -220
  883. package/lib/components/virtual-list/constants.d.ts +0 -34
  884. package/lib/components/virtual-list/constants.js +0 -53
  885. package/lib/components/virtual-list/index.d.ts +0 -99
  886. package/lib/components/virtual-list/index.js +0 -317
  887. package/lib/components/withBadge.d.ts +0 -2
  888. package/lib/components/withBadge.js +0 -14
  889. package/lib/helper.css +0 -47744
  890. package/lib/hooks/index.d.ts +0 -8
  891. package/lib/hooks/use-click-away.d.ts +0 -12
  892. package/lib/hooks/use-click-away.js +0 -59
  893. package/lib/hooks/use-on-screen.d.ts +0 -2
  894. package/lib/hooks/use-on-screen.js +0 -32
  895. package/lib/hooks/use-set-state.d.ts +0 -2
  896. package/lib/hooks/use-set-state.js +0 -27
  897. package/lib/hooks/use-sub-form.d.ts +0 -4
  898. package/lib/hooks/use-sub-form.js +0 -48
  899. package/lib/hooks/use-touch.d.ts +0 -16
  900. package/lib/hooks/use-touch.js +0 -81
  901. package/lib/hooks/use-update-effect.d.ts +0 -3
  902. package/lib/hooks/use-update-effect.js +0 -25
  903. package/lib/hooks/use-validation-resolver.d.ts +0 -7
  904. package/lib/hooks/use-validation-resolver.js +0 -125
  905. package/lib/icons/alert-danger.svg.js +0 -29
  906. package/lib/icons/alert-info.svg.js +0 -29
  907. package/lib/icons/alert-success.svg.js +0 -29
  908. package/lib/icons/alert-warning.svg.js +0 -29
  909. package/lib/icons/arrow-double-left.svg.js +0 -31
  910. package/lib/icons/arrow-double-right.svg.js +0 -31
  911. package/lib/icons/back.svg.js +0 -28
  912. package/lib/icons/calendar.svg.js +0 -38
  913. package/lib/icons/caret.svg.js +0 -28
  914. package/lib/icons/check.svg.js +0 -28
  915. package/lib/icons/clock.svg.js +0 -36
  916. package/lib/icons/close-small.svg.js +0 -31
  917. package/lib/icons/close.svg.js +0 -28
  918. package/lib/icons/cloud-upload.svg.js +0 -29
  919. package/lib/icons/column-filter.svg.js +0 -29
  920. package/lib/icons/columns.svg.js +0 -28
  921. package/lib/icons/compress-alt.svg.js +0 -28
  922. package/lib/icons/copy.svg.js +0 -33
  923. package/lib/icons/date.svg.js +0 -33
  924. package/lib/icons/department.svg.js +0 -59
  925. package/lib/icons/desk-empty.svg.js +0 -80
  926. package/lib/icons/dot.svg.js +0 -43
  927. package/lib/icons/down-arrow-bold.svg.js +0 -29
  928. package/lib/icons/down.svg.js +0 -30
  929. package/lib/icons/download.svg.js +0 -31
  930. package/lib/icons/drag-bar.svg.js +0 -60
  931. package/lib/icons/drag.svg.js +0 -29
  932. package/lib/icons/edit.svg.js +0 -28
  933. package/lib/icons/ellipsis-v.svg.js +0 -28
  934. package/lib/icons/enter.svg.js +0 -27
  935. package/lib/icons/exchange.svg.js +0 -28
  936. package/lib/icons/expand-alt.svg.js +0 -28
  937. package/lib/icons/fail.svg.js +0 -38
  938. package/lib/icons/file.svg.js +0 -29
  939. package/lib/icons/filter.svg.js +0 -28
  940. package/lib/icons/folder.svg.js +0 -31
  941. package/lib/icons/fullscreen.svg.js +0 -28
  942. package/lib/icons/function.svg.js +0 -28
  943. package/lib/icons/home.svg.js +0 -28
  944. package/lib/icons/if.svg.js +0 -28
  945. package/lib/icons/image.svg.js +0 -27
  946. package/lib/icons/info-circle.svg.js +0 -28
  947. package/lib/icons/info.svg.js +0 -34
  948. package/lib/icons/input-clear.svg.js +0 -27
  949. package/lib/icons/invisible.svg.js +0 -29
  950. package/lib/icons/left-arrow.svg.js +0 -30
  951. package/lib/icons/loading-outline.svg.js +0 -28
  952. package/lib/icons/location.svg.js +0 -27
  953. package/lib/icons/menu.svg.js +0 -27
  954. package/lib/icons/minus.svg.js +0 -28
  955. package/lib/icons/move.svg.js +0 -29
  956. package/lib/icons/mute.svg.js +0 -28
  957. package/lib/icons/new-edit.svg.js +0 -29
  958. package/lib/icons/pause.svg.js +0 -28
  959. package/lib/icons/pencil.svg.js +0 -28
  960. package/lib/icons/play.svg.js +0 -27
  961. package/lib/icons/plus-cicle.svg.js +0 -27
  962. package/lib/icons/plus-fine.svg.js +0 -28
  963. package/lib/icons/plus.svg.js +0 -28
  964. package/lib/icons/post.svg.js +0 -55
  965. package/lib/icons/question-mark.svg.js +0 -33
  966. package/lib/icons/question.svg.js +0 -28
  967. package/lib/icons/redo.svg.js +0 -28
  968. package/lib/icons/refresh.svg.js +0 -28
  969. package/lib/icons/reload.svg.js +0 -28
  970. package/lib/icons/remove.svg.js +0 -28
  971. package/lib/icons/retry.svg.js +0 -31
  972. package/lib/icons/right-arrow-bold.svg.js +0 -28
  973. package/lib/icons/right-arrow.svg.js +0 -30
  974. package/lib/icons/right-double-arrow.svg.js +0 -29
  975. package/lib/icons/role.svg.js +0 -50
  976. package/lib/icons/rotate-left.svg.js +0 -29
  977. package/lib/icons/rotate-right.svg.js +0 -29
  978. package/lib/icons/rotate-screen.svg.js +0 -28
  979. package/lib/icons/scale-origin.svg.js +0 -31
  980. package/lib/icons/schedule.svg.js +0 -31
  981. package/lib/icons/search.svg.js +0 -28
  982. package/lib/icons/setting.svg.js +0 -28
  983. package/lib/icons/slider-handle-icon.svg.js +0 -29
  984. package/lib/icons/sort-asc.svg.js +0 -28
  985. package/lib/icons/sort-default.svg.js +0 -28
  986. package/lib/icons/sort-desc.svg.js +0 -28
  987. package/lib/icons/star.svg.js +0 -28
  988. package/lib/icons/status-close.svg.js +0 -30
  989. package/lib/icons/steps-finsh.svg.js +0 -29
  990. package/lib/icons/sub-plus.svg.js +0 -27
  991. package/lib/icons/success.svg.js +0 -36
  992. package/lib/icons/transparent.svg.js +0 -45
  993. package/lib/icons/trash.svg.js +0 -29
  994. package/lib/icons/tree-down.svg.js +0 -28
  995. package/lib/icons/undo-normal.svg.js +0 -32
  996. package/lib/icons/undo.svg.js +0 -28
  997. package/lib/icons/unfullscreen.svg.js +0 -28
  998. package/lib/icons/upload.svg.js +0 -28
  999. package/lib/icons/user-remove.svg.js +0 -40
  1000. package/lib/icons/view.svg.js +0 -29
  1001. package/lib/icons/volume.svg.js +0 -31
  1002. package/lib/icons/warning-mark.svg.js +0 -29
  1003. package/lib/icons/warning.svg.js +0 -28
  1004. package/lib/icons/window-restore.svg.js +0 -28
  1005. package/lib/icons/zoom-in.svg.js +0 -28
  1006. package/lib/icons/zoom-out.svg.js +0 -28
  1007. package/lib/index.d.ts +0 -15
  1008. package/lib/index.js +0 -344
  1009. package/lib/locale/de-DE.d.ts +0 -1
  1010. package/lib/locale/de-DE.js +0 -421
  1011. package/lib/locale/en-US.d.ts +0 -1
  1012. package/lib/locale/en-US.js +0 -427
  1013. package/lib/locale/zh-CN.d.ts +0 -1
  1014. package/lib/locale/zh-CN.js +0 -436
  1015. package/lib/scss/helper.scss.js +0 -12
  1016. package/lib/scss/themes/ang.scss.js +0 -12
  1017. package/lib/scss/themes/antd.scss.js +0 -12
  1018. package/lib/scss/themes/cxd.scss.js +0 -12
  1019. package/lib/scss/themes/dark.scss.js +0 -12
  1020. package/lib/scss/themes/default.scss.js +0 -12
  1021. package/lib/themes/ang.css +0 -46140
  1022. package/lib/themes/ang.d.ts +0 -3
  1023. package/lib/themes/ang.js +0 -20
  1024. package/lib/themes/antd.css +0 -46127
  1025. package/lib/themes/antd.d.ts +0 -1
  1026. package/lib/themes/antd.js +0 -44
  1027. package/lib/themes/cxd.css +0 -46116
  1028. package/lib/themes/cxd.d.ts +0 -3
  1029. package/lib/themes/cxd.js +0 -459
  1030. package/lib/themes/dark.css +0 -46147
  1031. package/lib/themes/dark.d.ts +0 -3
  1032. package/lib/themes/dark.js +0 -28
  1033. package/lib/themes/default.css +0 -46116
  1034. package/lib/themes/default.d.ts +0 -4
  1035. package/lib/utils/index.d.ts +0 -2
  1036. package/lib/utils/smoothSignature.d.ts +0 -86
  1037. package/lib/utils/vectorComputed.d.ts +0 -20
  1038. package/lib/utils/vectorComputed.js +0 -84
  1039. package/lib/withRemoteConfig.d.ts +0 -2
  1040. package/lib/withRemoteConfig.js +0 -14
  1041. package/lib/withStore.d.ts +0 -2
  1042. package/lib/withStore.js +0 -14
@@ -1,1401 +0,0 @@
1
- /**
2
- * amis-ui v6.13.0-beta.7
3
- * Copyright 2018-2025 fex
4
- */
5
-
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- var tslib = require('tslib');
11
- var React = require('react');
12
- var ReactDOM = require('react-dom');
13
- var moment = require('moment');
14
- var omit = require('lodash/omit');
15
- var kebabCase = require('lodash/kebabCase');
16
- var amisCore = require('amis-core');
17
- var icons = require('./icons.js');
18
- var Calendar = require('./calendar/Calendar.js');
19
- var PopUp = require('./PopUp.js');
20
- var CalendarMobile = require('./CalendarMobile.js');
21
- var Input = require('./Input.js');
22
- var Button = require('./Button.js');
23
-
24
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
25
-
26
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
27
- var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
28
- var omit__default = /*#__PURE__*/_interopDefaultLegacy(omit);
29
- var kebabCase__default = /*#__PURE__*/_interopDefaultLegacy(kebabCase);
30
-
31
- var __react_jsx__ = require('react');
32
- var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
33
- (__react_jsx__["default"] || __react_jsx__).Fragment;
34
- var availableShortcuts = {
35
- 'today': {
36
- label: 'Date.today',
37
- startDate: function (now) {
38
- return now.startOf('day');
39
- },
40
- endDate: function (now) {
41
- return now;
42
- }
43
- },
44
- 'yesterday': {
45
- label: 'Date.yesterday',
46
- startDate: function (now) {
47
- return now.add(-1, 'days').startOf('day');
48
- },
49
- endDate: function (now) {
50
- return now.add(-1, 'days').endOf('day');
51
- }
52
- },
53
- 'tomorrow': {
54
- label: 'Date.tomorrow',
55
- startDate: function (now) {
56
- return now.add(1, 'days').startOf('day');
57
- },
58
- endDate: function (now) {
59
- return now.add(1, 'days').endOf('day');
60
- }
61
- },
62
- // 兼容一下错误的用法
63
- '1daysago': {
64
- label: 'DateRange.1daysago',
65
- startDate: function (now) {
66
- return now.add(-1, 'days');
67
- },
68
- endDate: function (now) {
69
- return now;
70
- }
71
- },
72
- '1dayago': {
73
- label: 'DateRange.1daysago',
74
- startDate: function (now) {
75
- return now.add(-1, 'days');
76
- },
77
- endDate: function (now) {
78
- return now;
79
- }
80
- },
81
- '7daysago': {
82
- label: 'DateRange.7daysago',
83
- startDate: function (now) {
84
- return now.add(-7, 'days').startOf('day');
85
- },
86
- endDate: function (now) {
87
- return now.add(-1, 'days').endOf('day');
88
- }
89
- },
90
- '30daysago': {
91
- label: 'DateRange.30daysago',
92
- startDate: function (now) {
93
- return now.add(-30, 'days').startOf('day');
94
- },
95
- endDate: function (now) {
96
- return now.add(-1, 'days').endOf('day');
97
- }
98
- },
99
- '90daysago': {
100
- label: 'DateRange.90daysago',
101
- startDate: function (now) {
102
- return now.add(-90, 'days').startOf('day');
103
- },
104
- endDate: function (now) {
105
- return now.add(-1, 'days').endOf('day');
106
- }
107
- },
108
- 'prevweek': {
109
- label: 'DateRange.lastWeek',
110
- startDate: function (now) {
111
- return now.startOf('week').add(-1, 'weeks');
112
- },
113
- endDate: function (now) {
114
- return now.startOf('week').add(-1, 'days').endOf('day');
115
- }
116
- },
117
- 'thisweek': {
118
- label: 'DateRange.thisWeek',
119
- startDate: function (now) {
120
- return now.startOf('week');
121
- },
122
- endDate: function (now) {
123
- return now.endOf('week');
124
- }
125
- },
126
- 'thismonth': {
127
- label: 'DateRange.thisMonth',
128
- startDate: function (now) {
129
- return now.startOf('month');
130
- },
131
- endDate: function (now) {
132
- return now.endOf('month');
133
- }
134
- },
135
- 'thisquarter': {
136
- label: 'DateRange.thisQuarter',
137
- startDate: function (now) {
138
- return now.startOf('quarter');
139
- },
140
- endDate: function (now) {
141
- return now.endOf('quarter');
142
- }
143
- },
144
- 'prevmonth': {
145
- label: 'DateRange.lastMonth',
146
- startDate: function (now) {
147
- return now.startOf('month').add(-1, 'month');
148
- },
149
- endDate: function (now) {
150
- return now.startOf('month').add(-1, 'day').endOf('day');
151
- }
152
- },
153
- 'prevquarter': {
154
- label: 'DateRange.lastQuarter',
155
- startDate: function (now) {
156
- return now.startOf('quarter').add(-1, 'quarter');
157
- },
158
- endDate: function (now) {
159
- return now.startOf('quarter').add(-1, 'day').endOf('day');
160
- }
161
- },
162
- 'thisyear': {
163
- label: 'DateRange.thisYear',
164
- startDate: function (now) {
165
- return now.startOf('year');
166
- },
167
- endDate: function (now) {
168
- return now.endOf('year');
169
- }
170
- },
171
- // 兼容一下之前的用法 'lastYear'
172
- 'prevyear': {
173
- label: 'DateRange.lastYear',
174
- startDate: function (now) {
175
- return now.startOf('year').add(-1, 'year');
176
- },
177
- endDate: function (now) {
178
- return now.endOf('year').add(-1, 'year').endOf('day');
179
- }
180
- },
181
- 'lastYear': {
182
- label: 'DateRange.lastYear',
183
- startDate: function (now) {
184
- return now.startOf('year').add(-1, 'year');
185
- },
186
- endDate: function (now) {
187
- return now.endOf('year').add(-1, 'year').endOf('day');
188
- }
189
- }
190
- };
191
- var advancedRanges = [
192
- {
193
- regexp: /^(\d+)hoursago$/,
194
- resolve: function (__, _, hours) {
195
- return {
196
- label: __('DateRange.hoursago', { hours: hours }),
197
- startDate: function (now) {
198
- return now.add(-hours, 'hours').startOf('hour');
199
- },
200
- endDate: function (now) {
201
- return now.add(-1, 'hours').endOf('hours');
202
- }
203
- };
204
- }
205
- },
206
- {
207
- regexp: /^(\d+)hourslater$/,
208
- resolve: function (__, _, hours) {
209
- return {
210
- label: __('DateRange.hourslater', { hours: hours }),
211
- startDate: function (now) {
212
- return now.startOf('hour');
213
- },
214
- endDate: function (now) {
215
- return now.add(hours, 'hours').endOf('hour');
216
- }
217
- };
218
- }
219
- },
220
- {
221
- regexp: /^(\d+)daysago$/,
222
- resolve: function (__, _, days) {
223
- return {
224
- label: __('DateRange.daysago', { days: days }),
225
- startDate: function (now) {
226
- return now.add(-days, 'days').startOf('day');
227
- },
228
- endDate: function (now) {
229
- return now.add(-1, 'days').endOf('day');
230
- }
231
- };
232
- }
233
- },
234
- {
235
- regexp: /^(\d+)dayslater$/,
236
- resolve: function (__, _, days) {
237
- return {
238
- label: __('DateRange.dayslater', { days: days }),
239
- startDate: function (now) {
240
- return now.startOf('day');
241
- },
242
- endDate: function (now) {
243
- return now.add(days, 'days').endOf('day');
244
- }
245
- };
246
- }
247
- },
248
- {
249
- regexp: /^(\d+)weeksago$/,
250
- resolve: function (__, _, weeks) {
251
- return {
252
- label: __('DateRange.weeksago', { weeks: weeks }),
253
- startDate: function (now) {
254
- return now.startOf('week').add(-weeks, 'weeks');
255
- },
256
- endDate: function (now) {
257
- return now.startOf('week').add(-1, 'days').endOf('day');
258
- }
259
- };
260
- }
261
- },
262
- {
263
- regexp: /^(\d+)weekslater$/,
264
- resolve: function (__, _, weeks) {
265
- return {
266
- label: __('DateRange.weekslater', { weeks: weeks }),
267
- startDate: function (now) {
268
- return now.startOf('week');
269
- },
270
- endDate: function (now) {
271
- return now.startOf('week').add(weeks, 'weeks').endOf('day');
272
- }
273
- };
274
- }
275
- },
276
- {
277
- regexp: /^(\d+)monthsago$/,
278
- resolve: function (__, _, months) {
279
- return {
280
- label: __('DateRange.monthsago', { months: months }),
281
- startDate: function (now) {
282
- return now.startOf('months').add(-months, 'months');
283
- },
284
- endDate: function (now) {
285
- return now.startOf('month').add(-1, 'days').endOf('day');
286
- }
287
- };
288
- }
289
- },
290
- {
291
- regexp: /^(\d+)monthslater$/,
292
- resolve: function (__, _, months) {
293
- return {
294
- label: __('DateRange.monthslater', { months: months }),
295
- startDate: function (now) {
296
- return now.startOf('month');
297
- },
298
- endDate: function (now) {
299
- return now.startOf('month').add(months, 'months').endOf('day');
300
- }
301
- };
302
- }
303
- },
304
- {
305
- regexp: /^(\d+)quartersago$/,
306
- resolve: function (__, _, quarters) {
307
- return {
308
- label: __('DateRange.quartersago', { quarters: quarters }),
309
- startDate: function (now) {
310
- return now.startOf('quarters').add(-quarters, 'quarters');
311
- },
312
- endDate: function (now) {
313
- return now.startOf('quarter').add(-1, 'days').endOf('day');
314
- }
315
- };
316
- }
317
- },
318
- {
319
- regexp: /^(\d+)quarterslater$/,
320
- resolve: function (__, _, quarters) {
321
- return {
322
- label: __('DateRange.quarterslater', { quarters: quarters }),
323
- startDate: function (now) {
324
- return now.startOf('quarter');
325
- },
326
- endDate: function (now) {
327
- return now.startOf('quarter').add(quarters, 'quarters').endOf('day');
328
- }
329
- };
330
- }
331
- },
332
- {
333
- regexp: /^(\d+)yearsago$/,
334
- resolve: function (__, _, years) {
335
- return {
336
- label: __('DateRange.yearsago', { years: years }),
337
- startDate: function (now) {
338
- return now.startOf('years').add(-years, 'years');
339
- },
340
- endDate: function (now) {
341
- return now.startOf('year').add(-1, 'days').endOf('day');
342
- }
343
- };
344
- }
345
- },
346
- {
347
- regexp: /^(\d+)yearslater$/,
348
- resolve: function (__, _, years) {
349
- return {
350
- label: __('DateRange.yearslater', { years: years }),
351
- startDate: function (now) {
352
- return now.startOf('year');
353
- },
354
- endDate: function (now) {
355
- return now.startOf('year').add(years, 'years').endOf('day');
356
- }
357
- };
358
- }
359
- }
360
- ];
361
- var dateFormats = {
362
- Y: { format: 'YYYY' },
363
- Q: { format: 'YYYY [Q]Q' },
364
- M: { format: 'YYYY-MM' },
365
- D: { format: 'YYYY-MM-DD' }
366
- };
367
- var timeFormats = {
368
- h: { format: 'HH' },
369
- H: { format: 'HH' },
370
- m: { format: 'mm' },
371
- s: { format: 'ss' },
372
- S: { format: 'ss' }
373
- };
374
- var DateRangePicker = /** @class */ (function (_super) {
375
- tslib.__extends(DateRangePicker, _super);
376
- function DateRangePicker(props) {
377
- var _this = _super.call(this, props) || this;
378
- // 是否是第一次点击,如果是第一次点击就可以点任意地址
379
- _this.isFirstClick = true;
380
- _this.nextMonth = moment__default["default"]().add(1, 'months').startOf('day');
381
- _this.currentMonth = moment__default["default"]().startOf('day');
382
- _this.startInputRef = React__default["default"].createRef();
383
- _this.endInputRef = React__default["default"].createRef();
384
- _this.separatorRef = React__default["default"].createRef();
385
- _this.calendarRef = React__default["default"].createRef();
386
- _this.open = _this.open.bind(_this);
387
- _this.openStart = _this.openStart.bind(_this);
388
- _this.openEnd = _this.openEnd.bind(_this);
389
- _this.close = _this.close.bind(_this);
390
- _this.startInputChange = _this.startInputChange.bind(_this);
391
- _this.endInputChange = _this.endInputChange.bind(_this);
392
- _this.handleDateChange = _this.handleDateChange.bind(_this);
393
- _this.handleStartDateChange = _this.handleStartDateChange.bind(_this);
394
- _this.handelEndDateChange = _this.handelEndDateChange.bind(_this);
395
- _this.handleTimeStartChange = _this.handleTimeStartChange.bind(_this);
396
- _this.handleTimeEndChange = _this.handleTimeEndChange.bind(_this);
397
- _this.handleFocus = _this.handleFocus.bind(_this);
398
- _this.handleBlur = _this.handleBlur.bind(_this);
399
- _this.checkStartIsValidDate = _this.checkStartIsValidDate.bind(_this);
400
- _this.checkEndIsValidDate = _this.checkEndIsValidDate.bind(_this);
401
- _this.confirm = _this.confirm.bind(_this);
402
- _this.clearValue = _this.clearValue.bind(_this);
403
- _this.dom = React__default["default"].createRef();
404
- _this.handleClick = _this.handleClick.bind(_this);
405
- _this.handleKeyPress = _this.handleKeyPress.bind(_this);
406
- _this.handlePopOverClick = _this.handlePopOverClick.bind(_this);
407
- _this.renderDay = _this.renderDay.bind(_this);
408
- _this.renderMonth = _this.renderMonth.bind(_this);
409
- _this.renderQuarter = _this.renderQuarter.bind(_this);
410
- _this.renderYear = _this.renderYear.bind(_this);
411
- _this.handleMobileChange = _this.handleMobileChange.bind(_this);
412
- _this.handleOutClick = _this.handleOutClick.bind(_this);
413
- var _a = _this.props, format = _a.format, valueFormat = _a.valueFormat, joinValues = _a.joinValues, delimiter = _a.delimiter, value = _a.value, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, dateFormat = _a.dateFormat, timeFormat = _a.timeFormat, data = _a.data, utc = _a.utc;
414
- var _b = DateRangePicker.unFormatValue(value, valueFormat || format, joinValues, delimiter, data, utc), startDate = _b.startDate, endDate = _b.endDate;
415
- var curDateFormat = dateFormat !== null && dateFormat !== void 0 ? dateFormat : '';
416
- var curTimeFormat = timeFormat !== null && timeFormat !== void 0 ? timeFormat : '';
417
- var curTimeFormatArr = [];
418
- !dateFormat &&
419
- Object.keys(dateFormats).forEach(function (item) {
420
- var _a;
421
- if ((_a = (displayFormat || inputFormat)) === null || _a === void 0 ? void 0 : _a.includes(item)) {
422
- curDateFormat = dateFormats[item].format;
423
- }
424
- });
425
- !timeFormat &&
426
- Object.keys(timeFormats).forEach(function (item) {
427
- var _a;
428
- if ((_a = (displayFormat || inputFormat)) === null || _a === void 0 ? void 0 : _a.includes(item)) {
429
- curTimeFormatArr.push(timeFormats[item].format);
430
- }
431
- });
432
- curTimeFormat = curTimeFormatArr.length
433
- ? curTimeFormatArr.join(':')
434
- : curTimeFormat;
435
- _this.state = {
436
- isOpened: false,
437
- isFocused: false,
438
- editState: 'start',
439
- startDate: startDate,
440
- endDate: endDate,
441
- oldStartDate: startDate,
442
- oldEndDate: endDate,
443
- startInputValue: startDate === null || startDate === void 0 ? void 0 : startDate.format(displayFormat || inputFormat),
444
- endInputValue: endDate === null || endDate === void 0 ? void 0 : endDate.format(displayFormat || inputFormat),
445
- endDateOpenedFirst: false,
446
- curDateFormat: curDateFormat,
447
- curTimeFormat: curTimeFormat
448
- };
449
- return _this;
450
- }
451
- DateRangePicker.formatValue = function (newValue, valueFormat, joinValues, delimiter, utc) {
452
- var _a, _b;
453
- if (utc === void 0) { utc = false; }
454
- newValue = [
455
- (_a = (utc ? moment__default["default"].utc(newValue.startDate) : newValue.startDate)) === null || _a === void 0 ? void 0 : _a.format(valueFormat),
456
- (_b = (utc ? moment__default["default"].utc(newValue.endDate) : newValue.endDate)) === null || _b === void 0 ? void 0 : _b.format(valueFormat)
457
- ];
458
- if (joinValues) {
459
- newValue = newValue.join(delimiter);
460
- }
461
- return newValue;
462
- };
463
- /* 将日期时间转化为momemnt格式,如果输入的内容不合法则返回undefined */
464
- DateRangePicker.unFormatValue = function (value, format, joinValues, delimiter, data, utc) {
465
- if (!value) {
466
- return {
467
- startDate: undefined,
468
- endDate: undefined
469
- };
470
- }
471
- if (joinValues && typeof value === 'string') {
472
- value = value.split(delimiter);
473
- }
474
- var startDate = amisCore.filterDate(value === null || value === void 0 ? void 0 : value[0], data, format, utc);
475
- var endDate = amisCore.filterDate(value === null || value === void 0 ? void 0 : value[1], data, format, utc);
476
- /**
477
- * 不合法的value输入都丢弃
478
- * 注意undefined被moment认为是合法的输入,moment会转化为now,所以需要结合在一起判断
479
- * @reference https://github.com/moment/moment/issues/1639
480
- */
481
- return {
482
- startDate: value[0] && startDate.isValid() ? startDate : undefined,
483
- endDate: value[1] && endDate.isValid() ? endDate : undefined
484
- };
485
- };
486
- DateRangePicker.prototype.componentDidMount = function () {
487
- var _a, _b;
488
- document.body.addEventListener('click', this.handleOutClick, true);
489
- (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onRef) === null || _b === void 0 ? void 0 : _b.call(_a, this);
490
- };
491
- DateRangePicker.prototype.componentWillUnmount = function () {
492
- document.body.removeEventListener('click', this.handleOutClick, true);
493
- };
494
- DateRangePicker.prototype.handleOutClick = function (e) {
495
- if (!e.target ||
496
- !this.dom.current ||
497
- this.dom.current.contains(e.target) ||
498
- !this.calendarRef.current ||
499
- this.calendarRef.current.contains(e.target)) {
500
- return;
501
- }
502
- if (this.state.isOpened) {
503
- e.preventDefault();
504
- this.close();
505
- }
506
- };
507
- DateRangePicker.prototype.componentDidUpdate = function (prevProps) {
508
- var props = this.props;
509
- var value = props.value, format = props.format, valueFormat = props.valueFormat, joinValues = props.joinValues, inputFormat = props.inputFormat, displayFormat = props.displayFormat, dateFormat = props.dateFormat, timeFormat = props.timeFormat, delimiter = props.delimiter, data = props.data, utc = props.utc;
510
- if (prevProps.displayFormat != displayFormat ||
511
- prevProps.inputFormat != inputFormat) {
512
- var curDateFormat_1 = dateFormat !== null && dateFormat !== void 0 ? dateFormat : '';
513
- var curTimeFormat = timeFormat !== null && timeFormat !== void 0 ? timeFormat : '';
514
- var curTimeFormatArr_1 = [];
515
- !dateFormat &&
516
- Object.keys(dateFormats).forEach(function (item) {
517
- var _a;
518
- if ((_a = (displayFormat || inputFormat)) === null || _a === void 0 ? void 0 : _a.includes(item)) {
519
- curDateFormat_1 = dateFormats[item].format;
520
- }
521
- });
522
- !timeFormat &&
523
- Object.keys(timeFormats).forEach(function (item) {
524
- var _a;
525
- if ((_a = (displayFormat || inputFormat)) === null || _a === void 0 ? void 0 : _a.includes(item)) {
526
- curTimeFormatArr_1.push(timeFormats[item].format);
527
- }
528
- });
529
- this.setState({
530
- curDateFormat: curDateFormat_1,
531
- curTimeFormat: curTimeFormatArr_1.length
532
- ? curTimeFormatArr_1.join(':')
533
- : curTimeFormat
534
- });
535
- }
536
- if (prevProps.value !== value) {
537
- var _a = DateRangePicker.unFormatValue(value, valueFormat || format, joinValues, delimiter, data, utc), startDate = _a.startDate, endDate = _a.endDate;
538
- this.setState({
539
- startDate: startDate,
540
- endDate: endDate,
541
- startInputValue: startDate && (startDate === null || startDate === void 0 ? void 0 : startDate.isValid())
542
- ? startDate === null || startDate === void 0 ? void 0 : startDate.format(displayFormat || inputFormat)
543
- : '',
544
- endInputValue: endDate && (endDate === null || endDate === void 0 ? void 0 : endDate.isValid())
545
- ? endDate === null || endDate === void 0 ? void 0 : endDate.format(displayFormat || inputFormat)
546
- : ''
547
- });
548
- }
549
- };
550
- DateRangePicker.prototype.focus = function () {
551
- if (!this.dom.current || this.props.disabled) {
552
- return;
553
- }
554
- this.dom.current.focus();
555
- };
556
- DateRangePicker.prototype.blur = function () {
557
- if (!this.dom.current || this.props.disabled) {
558
- return;
559
- }
560
- this.dom.current.blur();
561
- };
562
- DateRangePicker.prototype.handleFocus = function (e) {
563
- this.setState({
564
- isFocused: true
565
- });
566
- var onFocus = this.props.onFocus;
567
- onFocus && onFocus(e);
568
- };
569
- DateRangePicker.prototype.handleBlur = function (e) {
570
- this.setState({
571
- isFocused: false
572
- });
573
- var onBlur = this.props.onBlur;
574
- onBlur && onBlur(e);
575
- };
576
- DateRangePicker.prototype.open = function () {
577
- if (this.props.disabled) {
578
- return;
579
- }
580
- this.setState({
581
- isOpened: true
582
- });
583
- };
584
- DateRangePicker.prototype.openStart = function () {
585
- if (this.props.disabled) {
586
- return;
587
- }
588
- this.setState({
589
- isOpened: true,
590
- editState: 'start'
591
- });
592
- };
593
- DateRangePicker.prototype.openEnd = function () {
594
- if (this.props.disabled) {
595
- return;
596
- }
597
- this.setState({
598
- isOpened: true,
599
- editState: 'end',
600
- endDateOpenedFirst: true
601
- });
602
- };
603
- DateRangePicker.prototype.close = function (isConfirm) {
604
- if (isConfirm === void 0) { isConfirm = false; }
605
- if (!isConfirm) {
606
- /** 未点击确认关闭时,将日期恢复至未做任何选择的状态 */
607
- var _a = this.props, value = _a.value, format = _a.format, valueFormat = _a.valueFormat, joinValues = _a.joinValues, delimiter = _a.delimiter, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, data = _a.data, utc = _a.utc;
608
- var _b = DateRangePicker.unFormatValue(value, valueFormat || format, joinValues, delimiter, data, utc), startDate = _b.startDate, endDate = _b.endDate;
609
- this.setState({
610
- startDate: startDate,
611
- endDate: endDate,
612
- oldStartDate: startDate,
613
- oldEndDate: endDate,
614
- startInputValue: startDate && moment__default["default"](startDate).isValid()
615
- ? startDate.format(displayFormat || inputFormat)
616
- : '',
617
- endInputValue: endDate && moment__default["default"](endDate).isValid()
618
- ? endDate.format(displayFormat || inputFormat)
619
- : ''
620
- });
621
- }
622
- else {
623
- this.setState({
624
- oldStartDate: this.state.startDate,
625
- oldEndDate: this.state.endDate
626
- });
627
- }
628
- this.setState({
629
- isOpened: false,
630
- editState: undefined,
631
- endDateOpenedFirst: false
632
- }, this.blur);
633
- };
634
- DateRangePicker.prototype.handleClick = function () {
635
- this.state.isOpened ? this.close() : this.open();
636
- };
637
- DateRangePicker.prototype.handlePopOverClick = function (e) {
638
- e.stopPropagation();
639
- e.preventDefault();
640
- };
641
- DateRangePicker.prototype.handleKeyPress = function (e) {
642
- if (e.key === ' ') {
643
- this.handleClick();
644
- e.preventDefault();
645
- }
646
- };
647
- DateRangePicker.prototype.confirm = function () {
648
- var _a = this.props, format = _a.format, valueFormat = _a.valueFormat, joinValues = _a.joinValues, delimiter = _a.delimiter, utc = _a.utc;
649
- var _b = this.state, startDate = _b.startDate, endDate = _b.endDate;
650
- if (!startDate && !endDate) {
651
- return;
652
- }
653
- else if (endDate && (startDate === null || startDate === void 0 ? void 0 : startDate.isAfter(this.state.endDate))) {
654
- return;
655
- }
656
- this.props.onChange(DateRangePicker.formatValue({ startDate: startDate, endDate: endDate }, valueFormat || format, joinValues, delimiter, utc));
657
- if (startDate && !endDate) {
658
- this.setState({ editState: 'end', endDateOpenedFirst: false });
659
- }
660
- else {
661
- this.close(true);
662
- }
663
- };
664
- DateRangePicker.prototype.filterDate = function (date, options) {
665
- if (options === void 0) { options = { type: 'start' }; }
666
- var _a = options || {
667
- type: 'start'
668
- }, type = _a.type, originValue = _a.originValue, timeFormat = _a.timeFormat, subControlViewMode = _a.subControlViewMode, autoInitDefaultValue = _a.autoInitDefaultValue;
669
- var value = date.clone();
670
- var _b = this.props, transform = _b.transform, data = _b.data;
671
- var _c = this.state, startDate = _c.startDate, endDate = _c.endDate;
672
- /** 此时为点选后的值初始化设置,不应该被内部转化逻辑和transformFn限制 */
673
- if (autoInitDefaultValue === true) {
674
- var now_1 = moment__default["default"]();
675
- /** 如果已经设置了结束时间且当前时间已经超出了结束时间,则开始时间不能超过结束时间 */
676
- if (!startDate && endDate && type === 'start' && now_1.isAfter(endDate)) {
677
- value = endDate.clone();
678
- return value;
679
- }
680
- var timePart_1 = {
681
- date: value.get('date'),
682
- hour: value.get('hour'),
683
- minute: value.get('minute'),
684
- second: value.get('second'),
685
- millisecond: value.get('millisecond')
686
- };
687
- Object.keys(timePart_1).forEach(function (unit) {
688
- /** 首次选择时间,日期使用当前时间; 将未设置过的时间字段设置为当前值 */
689
- if ((unit === 'date' && subControlViewMode === 'time') ||
690
- (unit !== 'date' && timePart_1[unit] === 0)) {
691
- timePart_1[unit] = now_1.get(unit);
692
- }
693
- });
694
- value.set(timePart_1);
695
- return value;
696
- }
697
- /** 日期时间选择器组件支持用户选择时间,如果用户手动选择了时间,则不需要走默认处理 */
698
- if (subControlViewMode && subControlViewMode === 'time') {
699
- return value;
700
- }
701
- var transformFn = transform && typeof transform === 'string'
702
- ? amisCore.str2function(transform, 'value', 'config', 'props', 'data', 'moment')
703
- : transform;
704
- // 没有初始值
705
- if (!originValue) {
706
- value = value[type === 'start' ? 'startOf' : 'endOf']('day');
707
- }
708
- else if (typeof timeFormat === 'string' && /ss/.test(timeFormat)) {
709
- value = value[type === 'start' ? 'startOf' : 'endOf']('second');
710
- }
711
- else if (typeof timeFormat === 'string' && /mm/.test(timeFormat)) {
712
- value = value[type === 'start' ? 'startOf' : 'endOf']('minute');
713
- }
714
- else if (typeof timeFormat === 'string' && /HH/i.test(timeFormat)) {
715
- value = value[type === 'start' ? 'startOf' : 'endOf']('hour');
716
- }
717
- else if (typeof timeFormat === 'string' && /Q/i.test(timeFormat)) {
718
- value = value[type === 'start' ? 'startOf' : 'endOf']('quarter');
719
- }
720
- else {
721
- value = value[type === 'start' ? 'startOf' : 'endOf']('day');
722
- }
723
- if (typeof transformFn === 'function') {
724
- value = transformFn(value, { type: type, originValue: originValue, timeFormat: timeFormat }, this.props, data, moment__default["default"]);
725
- }
726
- return value;
727
- };
728
- DateRangePicker.prototype.handleDateChange = function (newValue, viewMode, status) {
729
- var embed = this.props.embed;
730
- var editState = embed
731
- ? this.state.editState || status
732
- : this.state.editState;
733
- if (editState === 'start') {
734
- this.handleStartDateChange(newValue);
735
- }
736
- else if (editState === 'end') {
737
- this.handelEndDateChange(newValue);
738
- }
739
- };
740
- /**
741
- * @param {Moment} newValue 当前选择的日期时间值
742
- * @param {ViewMode=} subControlViewMode 子选择控件的类型,可选参数('time'),用于区分datetime选择器的触发控件
743
- */
744
- DateRangePicker.prototype.handleStartDateChange = function (newValue, subControlViewMode) {
745
- var _a = this.props, minDate = _a.minDate, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, type = _a.type; _a.value;
746
- var _b = this.state, startDate = _b.startDate; _b.oldStartDate; var endDateOpenedFirst = _b.endDateOpenedFirst, timeFormat = _b.curTimeFormat;
747
- if (minDate && newValue.isBefore(minDate)) {
748
- newValue = minDate;
749
- }
750
- var date = this.filterDate(newValue, {
751
- type: 'start',
752
- originValue: startDate || minDate,
753
- timeFormat: timeFormat,
754
- subControlViewMode: subControlViewMode,
755
- autoInitDefaultValue: !!timeFormat && newValue && !startDate
756
- });
757
- var newState = {
758
- startDate: date,
759
- startInputValue: date.format(displayFormat || inputFormat)
760
- };
761
- // 这些没有时间的选择点第一次后第二次就是选结束时间
762
- if (!endDateOpenedFirst &&
763
- (type === 'input-date-range' ||
764
- type === 'input-year-range' ||
765
- type === 'input-quarter-range' ||
766
- type === 'input-month-range')) {
767
- newState.editState = 'end';
768
- }
769
- this.setState(newState);
770
- };
771
- /**
772
- * @param {Moment} newValue 当前选择的日期时间值
773
- * @param {string=} subControlViewMode 子选择控件的类型的类型,可选参数('time'),用于区分datetime选择器的触发控件
774
- */
775
- DateRangePicker.prototype.handelEndDateChange = function (newValue, subControlViewMode) {
776
- var _this = this;
777
- var _a = this.props, embed = _a.embed, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, type = _a.type; _a.value;
778
- var _b = this.state; _b.startDate; var endDate = _b.endDate; _b.oldEndDate; var endDateOpenedFirst = _b.endDateOpenedFirst, timeFormat = _b.curTimeFormat;
779
- newValue = this.getEndDateByDuration(newValue);
780
- var editState = endDateOpenedFirst ? 'start' : 'end';
781
- var date = this.filterDate(newValue, {
782
- type: 'end',
783
- originValue: endDate,
784
- timeFormat: timeFormat,
785
- subControlViewMode: subControlViewMode,
786
- autoInitDefaultValue: !!timeFormat && newValue && !endDate
787
- });
788
- this.setState({
789
- endDate: date,
790
- endInputValue: date.format(displayFormat || inputFormat)
791
- }, function () {
792
- embed && _this.confirm();
793
- });
794
- if (type !== 'input-datetime-range') {
795
- this.setState({ editState: editState });
796
- }
797
- };
798
- // 手动控制输入时间
799
- DateRangePicker.prototype.startInputChange = function (e) {
800
- var _a = this.props, onChange = _a.onChange, displayFormat = _a.displayFormat, inputFormat = _a.inputFormat; _a.utc;
801
- var value = e.currentTarget.value;
802
- this.setState({ startInputValue: value });
803
- if (value === '') {
804
- onChange('');
805
- }
806
- else {
807
- var newDate = this.getStartDateByDuration(moment__default["default"](value, displayFormat || inputFormat));
808
- this.setState({ startDate: newDate });
809
- }
810
- };
811
- DateRangePicker.prototype.endInputChange = function (e) {
812
- var _a = this.props, onChange = _a.onChange, displayFormat = _a.displayFormat, inputFormat = _a.inputFormat; _a.utc;
813
- var value = e.currentTarget.value;
814
- this.setState({ endInputValue: value });
815
- if (value === '') {
816
- onChange('');
817
- }
818
- else {
819
- var newDate = this.getEndDateByDuration(moment__default["default"](value, displayFormat || inputFormat));
820
- this.setState({ endDate: newDate });
821
- }
822
- };
823
- // 根据 duration 修复结束时间
824
- DateRangePicker.prototype.getEndDateByDuration = function (newValue) {
825
- var _a = this.props, minDuration = _a.minDuration, maxDuration = _a.maxDuration, type = _a.type, maxDate = _a.maxDate;
826
- var _b = this.state, startDate = _b.startDate; _b.endDate; _b.editState;
827
- if (!startDate) {
828
- return newValue;
829
- }
830
- // 时间范围必须统一成同一天,不然会不一致
831
- if (type === 'input-time-range' && startDate) {
832
- newValue.set({
833
- year: startDate.year(),
834
- month: startDate.month(),
835
- date: startDate.date()
836
- });
837
- }
838
- if (minDuration && newValue.isBefore(startDate.clone().add(minDuration))) {
839
- newValue = startDate.clone().add(minDuration);
840
- }
841
- if (maxDuration && newValue.isAfter(startDate.clone().add(maxDuration))) {
842
- newValue = startDate.clone().add(maxDuration);
843
- }
844
- if (maxDate && newValue && newValue.isAfter(maxDate, 'second')) {
845
- newValue = maxDate;
846
- }
847
- return newValue;
848
- };
849
- // 根据 duration 修复起始时间
850
- DateRangePicker.prototype.getStartDateByDuration = function (newValue) {
851
- var _a = this.props, minDuration = _a.minDuration, maxDuration = _a.maxDuration, type = _a.type;
852
- var _b = this.state, endDate = _b.endDate; _b.editState;
853
- if (!endDate) {
854
- return newValue;
855
- }
856
- // 时间范围必须统一成同一天,不然会不一致
857
- if (type === 'input-time-range' && endDate) {
858
- newValue.set({
859
- year: endDate.year(),
860
- month: endDate.month(),
861
- date: endDate.date()
862
- });
863
- }
864
- if (minDuration &&
865
- newValue.isBefore(endDate.clone().subtract(minDuration))) {
866
- newValue = endDate.clone().subtract(minDuration);
867
- }
868
- if (maxDuration &&
869
- newValue.isAfter(endDate.clone().subtract(maxDuration))) {
870
- newValue = endDate.clone().subtract(maxDuration);
871
- }
872
- return newValue;
873
- };
874
- // 主要用于处理时间的情况
875
- DateRangePicker.prototype.handleTimeStartChange = function (newValue) {
876
- var _this = this;
877
- var _a = this.props, embed = _a.embed, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat; _a.minDuration; _a.maxDuration; var minDate = _a.minDate;
878
- var _b = this.state; _b.startDate; var endDate = _b.endDate;
879
- // 时间范围必须统一成同一天,不然会不一致
880
- if (endDate) {
881
- newValue.set({
882
- year: endDate.year(),
883
- month: endDate.month(),
884
- date: endDate.date()
885
- });
886
- }
887
- if (minDate && newValue && newValue.isBefore(minDate, 'second')) {
888
- newValue = minDate;
889
- }
890
- this.setState({
891
- startDate: newValue,
892
- startInputValue: newValue.format(displayFormat || inputFormat)
893
- }, function () {
894
- embed && _this.confirm();
895
- });
896
- };
897
- DateRangePicker.prototype.handleTimeEndChange = function (newValue) {
898
- var _this = this;
899
- var _a = this.props, embed = _a.embed, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, minDuration = _a.minDuration, maxDuration = _a.maxDuration, maxDate = _a.maxDate;
900
- var _b = this.state, startDate = _b.startDate; _b.endDate;
901
- if (startDate) {
902
- newValue.set({
903
- year: startDate.year(),
904
- month: startDate.month(),
905
- date: startDate.date()
906
- });
907
- }
908
- if (maxDate && newValue && newValue.isAfter(maxDate, 'second')) {
909
- newValue = maxDate;
910
- }
911
- if (startDate &&
912
- minDuration &&
913
- newValue.isBefore(startDate.clone().add(minDuration))) {
914
- newValue = startDate.clone().add(minDuration);
915
- }
916
- if (startDate &&
917
- maxDuration &&
918
- newValue.isAfter(startDate.clone().add(maxDuration))) {
919
- newValue = startDate.clone().add(maxDuration);
920
- }
921
- this.setState({
922
- endDate: newValue,
923
- endInputValue: newValue.format(displayFormat || inputFormat)
924
- }, function () {
925
- embed && _this.confirm();
926
- });
927
- };
928
- DateRangePicker.prototype.handleMobileChange = function (data, callback) {
929
- this.setState({
930
- startDate: data.startDate,
931
- endDate: data.endDate
932
- }, callback);
933
- };
934
- DateRangePicker.prototype.selectShortcut = function (shortcut) {
935
- var _a = this.props, closeOnSelect = _a.closeOnSelect, minDateRaw = _a.minDateRaw, maxDateRaw = _a.maxDateRaw, format = _a.format, valueFormat = _a.valueFormat, data = _a.data, mobileUI = _a.mobileUI;
936
- var now = moment__default["default"]();
937
- /** minDate和maxDate要实时计算,因为用户可能设置为${NOW()},暂时不考虑毫秒级的时间差 */
938
- var minDate = minDateRaw
939
- ? amisCore.filterDate(minDateRaw, data, valueFormat || format)
940
- : undefined;
941
- var maxDate = maxDateRaw
942
- ? amisCore.filterDate(maxDateRaw, data, valueFormat || format)
943
- : undefined;
944
- var startDate = shortcut.startDate(now.clone());
945
- var endDate = shortcut.endDate(now.clone());
946
- this.setState({
947
- startDate: minDate && (minDate === null || minDate === void 0 ? void 0 : minDate.isValid())
948
- ? moment__default["default"].max(startDate, minDate)
949
- : startDate,
950
- endDate: maxDate && (maxDate === null || maxDate === void 0 ? void 0 : maxDate.isValid()) ? moment__default["default"].min(maxDate, endDate) : endDate
951
- }, closeOnSelect && !mobileUI ? this.confirm : amisCore.noop);
952
- };
953
- DateRangePicker.prototype.renderShortcuts = function (shortcuts) {
954
- var _this = this;
955
- if (!shortcuts) {
956
- return null;
957
- }
958
- var _a = this.props, ns = _a.classPrefix, format = _a.format, valueFormat = _a.valueFormat, data = _a.data, __ = _a.translate, testIdBuilder = _a.testIdBuilder;
959
- var shortcutArr;
960
- if (typeof shortcuts === 'string') {
961
- shortcutArr = shortcuts.split(',');
962
- }
963
- else {
964
- shortcutArr = shortcuts;
965
- }
966
- var TIDBuilder = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('shortcut');
967
- return (_J$X_("ul", { className: "".concat(ns, "DateRangePicker-rangers") }, shortcutArr.map(function (item, index) {
968
- if (!item) {
969
- return null;
970
- }
971
- var shortcut = {};
972
- if (typeof item === 'string') {
973
- if (availableShortcuts[item]) {
974
- shortcut = availableShortcuts[item];
975
- shortcut.key = item;
976
- }
977
- else {
978
- // 通过正则尝试匹配
979
- for (var i = 0, len = advancedRanges.length; i < len; i++) {
980
- var value = advancedRanges[i];
981
- var m = value.regexp.exec(item);
982
- if (m) {
983
- shortcut = value.resolve.apply(item, tslib.__spreadArray([__], tslib.__read(m), false));
984
- shortcut.key = item;
985
- }
986
- }
987
- }
988
- }
989
- else if (item.startDate &&
990
- item.endDate) {
991
- var shortcutRaw_1 = tslib.__assign({}, item);
992
- shortcut = tslib.__assign(tslib.__assign({}, item), { startDate: function () {
993
- var startDate = amisCore.isExpression(shortcutRaw_1.startDate)
994
- ? moment__default["default"](amisCore.FormulaExec['formula'](shortcutRaw_1.startDate, data), valueFormat || format)
995
- : typeof shortcutRaw_1.startDate === 'string'
996
- ? moment__default["default"](shortcutRaw_1.startDate, valueFormat || format)
997
- : shortcutRaw_1.startDate;
998
- return startDate &&
999
- moment__default["default"].isMoment(startDate) &&
1000
- startDate.isValid()
1001
- ? startDate
1002
- : item.startDate;
1003
- }, endDate: function () {
1004
- var endDate = amisCore.isExpression(shortcutRaw_1.endDate)
1005
- ? moment__default["default"](amisCore.FormulaExec['formula'](shortcutRaw_1.endDate, data), valueFormat || format)
1006
- : typeof shortcutRaw_1.endDate === 'string'
1007
- ? moment__default["default"](shortcutRaw_1.endDate, valueFormat || format)
1008
- : shortcutRaw_1.endDate;
1009
- return endDate && moment__default["default"].isMoment(endDate) && endDate.isValid()
1010
- ? endDate
1011
- : item.endDate;
1012
- } });
1013
- }
1014
- if (Object.keys(shortcut).length) {
1015
- return (_J$X_("li", { className: "".concat(ns, "DateRangePicker-ranger"), onClick: function () { return _this.selectShortcut(shortcut); }, key: index },
1016
- _J$X_("a", tslib.__assign({}, TIDBuilder === null || TIDBuilder === void 0 ? void 0 : TIDBuilder.getChild(shortcut.key).getTestId()), __(shortcut.label))));
1017
- }
1018
- else {
1019
- return null;
1020
- }
1021
- })));
1022
- };
1023
- DateRangePicker.prototype.clearValue = function (e) {
1024
- e.preventDefault();
1025
- e.stopPropagation();
1026
- var onChange = this.props.onChange;
1027
- this.setState({ startInputValue: '', endInputValue: '' });
1028
- onChange('');
1029
- };
1030
- // 清空
1031
- DateRangePicker.prototype.clear = function () {
1032
- var onChange = this.props.onChange;
1033
- this.setState({ startInputValue: '', endInputValue: '' });
1034
- onChange('');
1035
- };
1036
- // 重置
1037
- DateRangePicker.prototype.reset = function (resetValue) {
1038
- var _a = this.props, onChange = _a.onChange, format = _a.format, valueFormat = _a.valueFormat, joinValues = _a.joinValues, delimiter = _a.delimiter, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, data = _a.data, utc = _a.utc;
1039
- var tmpResetValue = resetValue !== null && resetValue !== void 0 ? resetValue : this.props.resetValue;
1040
- var _b = DateRangePicker.unFormatValue(tmpResetValue, valueFormat || format, joinValues, delimiter, data, utc), startDate = _b.startDate, endDate = _b.endDate;
1041
- onChange === null || onChange === void 0 ? void 0 : onChange(tmpResetValue);
1042
- this.setState({
1043
- startInputValue: startDate === null || startDate === void 0 ? void 0 : startDate.format(displayFormat || inputFormat),
1044
- endInputValue: endDate === null || endDate === void 0 ? void 0 : endDate.format(displayFormat || inputFormat)
1045
- });
1046
- };
1047
- DateRangePicker.prototype.checkStartIsValidDate = function (currentDate) {
1048
- var _a = this.state, endDate = _a.endDate; _a.startDate;
1049
- var _b = this.props, minDate = _b.minDate, maxDate = _b.maxDate, minDuration = _b.minDuration, maxDuration = _b.maxDuration, viewMode = _b.viewMode;
1050
- var precision = viewMode === 'time' ? 'hours' : viewMode || 'day';
1051
- maxDate =
1052
- maxDate && endDate
1053
- ? maxDate.isBefore(endDate)
1054
- ? maxDate
1055
- : endDate
1056
- : maxDate || endDate;
1057
- if (minDate && currentDate.isBefore(minDate, precision)) {
1058
- return false;
1059
- }
1060
- else if (maxDate && currentDate.isAfter(maxDate, precision)) {
1061
- return false;
1062
- }
1063
- else if (
1064
- // 如果配置了 minDuration 那么 EndDate - minDuration 之后的天数也不能选
1065
- endDate &&
1066
- minDuration &&
1067
- currentDate.isAfter(endDate.clone().subtract(minDuration))) {
1068
- return false;
1069
- }
1070
- else if (endDate &&
1071
- maxDuration &&
1072
- currentDate.isBefore(endDate.clone().subtract(maxDuration))) {
1073
- return false;
1074
- }
1075
- return true;
1076
- };
1077
- DateRangePicker.prototype.checkEndIsValidDate = function (currentDate) {
1078
- var startDate = this.state.startDate;
1079
- var _a = this.props, minDate = _a.minDate, maxDate = _a.maxDate, minDuration = _a.minDuration, maxDuration = _a.maxDuration, viewMode = _a.viewMode;
1080
- var precision = viewMode === 'time' ? 'hours' : viewMode || 'day';
1081
- minDate =
1082
- minDate && startDate
1083
- ? minDate.isAfter(startDate)
1084
- ? minDate
1085
- : startDate
1086
- : minDate || startDate;
1087
- // 在 dateTimeRange 的场景下,如果选择了开始时间的时间点不为 0,比如 2020-10-1 10:10,这时 currentDate 传入的当天值是 2020-10-1 00:00,这个值在起始时间后面,导致没法再选这一天了,所以在这时需要先通过将时间都转成 00 再比较
1088
- if (minDate &&
1089
- currentDate
1090
- .startOf('day')
1091
- .isBefore(minDate.clone().startOf('day'), precision)) {
1092
- return false;
1093
- }
1094
- else if (maxDate && currentDate.isAfter(maxDate, precision)) {
1095
- return false;
1096
- }
1097
- else if (startDate &&
1098
- minDuration &&
1099
- currentDate.isBefore(startDate.clone().add(minDuration))) {
1100
- return false;
1101
- }
1102
- else if (startDate &&
1103
- maxDuration &&
1104
- currentDate.isAfter(startDate.clone().add(maxDuration))) {
1105
- return false;
1106
- }
1107
- return true;
1108
- };
1109
- DateRangePicker.prototype.renderDay = function (props, currentDate) {
1110
- var _a;
1111
- var _b = this.state, startDate = _b.startDate, endDate = _b.endDate;
1112
- var testIdBuilder = this.props.testIdBuilder;
1113
- if (startDate &&
1114
- endDate &&
1115
- currentDate.isBetween(startDate, endDate, 'day', '[]')) {
1116
- props.className += ' rdtBetween';
1117
- }
1118
- // 如果已经选择了开始时间和结束时间,那么中间的时间都不应该高亮
1119
- if (startDate && endDate && props.className.includes('rdtActive')) {
1120
- props.className = props.className.replace('rdtActive', '');
1121
- }
1122
- if (startDate && currentDate.isSame(startDate, 'day')) {
1123
- props.className += ' rdtActive rdtStart';
1124
- }
1125
- if (endDate && currentDate.isSame(endDate, 'day')) {
1126
- props.className += ' rdtActive rdtEnd';
1127
- }
1128
- var _c = this.getDisabledElementProps(currentDate, 'day'), className = _c.className, others = tslib.__rest(_c, ["className"]);
1129
- props.className += className;
1130
- return (_J$X_("td", tslib.__assign({}, omit__default["default"](props, ['todayActiveStyle']), others),
1131
- _J$X_("span", tslib.__assign({}, (_a = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key)) === null || _a === void 0 ? void 0 : _a.getTestId()), currentDate.date())));
1132
- };
1133
- DateRangePicker.prototype.renderMonth = function (props, month, year, date) {
1134
- var currentDate = props.viewDate.year(year).month(month);
1135
- var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
1136
- var _b = this.props, __ = _b.translate, testIdBuilder = _b.testIdBuilder;
1137
- var monthStr = currentDate.format(__('MMM'));
1138
- var strLength = 3;
1139
- // Because some months are up to 5 characters long, we want to
1140
- // use a fixed string length for consistency
1141
- var monthStrFixedLength = monthStr.substring(0, strLength);
1142
- if (startDate &&
1143
- endDate &&
1144
- currentDate.isBetween(startDate, endDate, 'month', '[]')) {
1145
- props.className += ' rdtBetween';
1146
- }
1147
- // 如果已经选择了开始时间和结束时间,那么中间的时间都不应该高亮
1148
- if (startDate && endDate && props.className.includes('rdtActive')) {
1149
- props.className = props.className.replace('rdtActive', '');
1150
- }
1151
- if (startDate && currentDate.isSame(startDate, 'month')) {
1152
- props.className += ' rdtActive rdtStart';
1153
- }
1154
- if (endDate && currentDate.isSame(endDate, 'month')) {
1155
- props.className += ' rdtActive rdtEnd';
1156
- }
1157
- var _c = this.getDisabledElementProps(currentDate, 'month'), className = _c.className, others = tslib.__rest(_c, ["className"]);
1158
- props.className += className;
1159
- return (_J$X_("td", tslib.__assign({}, omit__default["default"](props, 'viewDate'), others),
1160
- _J$X_("span", tslib.__assign({}, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key).getTestId()), monthStrFixedLength)));
1161
- };
1162
- DateRangePicker.prototype.renderQuarter = function (props, quarter, year) {
1163
- var currentDate = moment__default["default"]().year(year).quarter(quarter);
1164
- var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
1165
- var testIdBuilder = this.props.testIdBuilder;
1166
- if (startDate &&
1167
- endDate &&
1168
- currentDate.isBetween(startDate, endDate, 'quarter', '[]')) {
1169
- props.className += ' rdtBetween';
1170
- }
1171
- // 如果已经选择了开始时间和结束时间,那么中间的时间都不应该高亮
1172
- if (startDate && endDate && props.className.includes('rdtActive')) {
1173
- props.className = props.className.replace('rdtActive', '');
1174
- }
1175
- if (startDate && currentDate.isSame(startDate, 'quarter')) {
1176
- props.className += ' rdtActive rdtStart';
1177
- }
1178
- if (endDate && currentDate.isSame(endDate, 'quarter')) {
1179
- props.className += ' rdtActive rdtEnd';
1180
- }
1181
- var _b = this.getDisabledElementProps(currentDate, 'quarter'), className = _b.className, others = tslib.__rest(_b, ["className"]);
1182
- props.className += className;
1183
- return (_J$X_("td", tslib.__assign({}, props, others),
1184
- _J$X_("span", tslib.__assign({}, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key).getTestId()),
1185
- "Q",
1186
- quarter)));
1187
- };
1188
- DateRangePicker.prototype.renderYear = function (props, year) {
1189
- var currentDate = moment__default["default"]().year(year);
1190
- var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
1191
- var testIdBuilder = this.props.testIdBuilder;
1192
- if (startDate &&
1193
- endDate &&
1194
- currentDate.isBetween(startDate, endDate, 'year', '[]')) {
1195
- props.className += ' rdtBetween';
1196
- }
1197
- // 如果已经选择了开始时间和结束时间,那么中间的时间都不应该高亮
1198
- if (startDate && endDate && props.className.includes('rdtActive')) {
1199
- props.className = props.className.replace('rdtActive', '');
1200
- }
1201
- if (startDate && currentDate.isSame(startDate, 'year')) {
1202
- props.className += ' rdtActive rdtStart';
1203
- }
1204
- if (endDate && currentDate.isSame(endDate, 'year')) {
1205
- props.className += ' rdtActive rdtEnd';
1206
- }
1207
- var _b = this.getDisabledElementProps(currentDate, 'year'), className = _b.className, others = tslib.__rest(_b, ["className"]);
1208
- props.className += className;
1209
- return (_J$X_("td", tslib.__assign({}, props, others),
1210
- _J$X_("span", tslib.__assign({}, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key).getTestId()), year)));
1211
- };
1212
- DateRangePicker.prototype.renderCalendar = function () {
1213
- var _this = this;
1214
- var _a = this.props, ns = _a.classPrefix, cx = _a.classnames, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, ranges = _a.ranges, shortcuts = _a.shortcuts, locale = _a.locale, embed = _a.embed, type = _a.type, _b = _a.viewMode, viewMode = _b === void 0 ? 'days' : _b, label = _a.label, mobileUI = _a.mobileUI, testIdBuilder = _a.testIdBuilder;
1215
- var __ = this.props.translate;
1216
- var _c = this.state, startDate = _c.startDate, endDate = _c.endDate, editState = _c.editState, curDateFormat = _c.curDateFormat, curTimeFormat = _c.curTimeFormat;
1217
- var isDateTimeRange = type === 'input-datetime-range';
1218
- var isDateRange = type === 'input-date-range';
1219
- // timeRange需要单独选择范围
1220
- var isTimeRange = isDateTimeRange || viewMode === 'time';
1221
- var isConfirmBtnDisbaled = (isTimeRange && editState === 'start' && !startDate) ||
1222
- (isTimeRange && editState === 'end' && !endDate) ||
1223
- (startDate && (endDate === null || endDate === void 0 ? void 0 : endDate.isBefore(this.state.startDate))) ||
1224
- /** 日期范围选择之后会立即切换面板,所以开始/结束日期任意一个不合法就不允许更新数据 */
1225
- (isDateRange &&
1226
- (!startDate ||
1227
- !endDate ||
1228
- !(startDate === null || startDate === void 0 ? void 0 : startDate.isValid()) ||
1229
- !(endDate === null || endDate === void 0 ? void 0 : endDate.isValid())));
1230
- return (_J$X_("div", { className: cx("".concat(ns, "DateRangePicker-wrap"), { 'is-mobile': mobileUI }), ref: this.calendarRef },
1231
- mobileUI && !embed ? (_J$X_("div", { className: cx('PickerColumns-header') },
1232
- _J$X_(Button["default"], { className: "PickerColumns-cancel", level: "link", onClick: function () { return _this.close(false); } }, __('cancel')),
1233
- label && typeof label === 'string'
1234
- ? label
1235
- : __('Calendar.datepicker'),
1236
- _J$X_(Button["default"], { className: "PickerColumns-confirm", level: "link", disabled: isConfirmBtnDisbaled || !startDate || !endDate, onClick: this.confirm }, __('confirm')))) : null,
1237
- this.renderShortcuts(ranges || shortcuts),
1238
- _J$X_("div", { className: cx("".concat(ns, "DateRangePicker-picker-wrap"), {
1239
- 'is-vertical': embed
1240
- }) },
1241
- (!isTimeRange ||
1242
- (editState === 'start' && !embed) ||
1243
- (mobileUI && isTimeRange)) && (_J$X_(Calendar["default"], { className: "".concat(ns, "DateRangePicker-start"), value: startDate,
1244
- // 区分的原因是 time-range 左侧就只能选起始时间,而其它都能在左侧同时同时选择起始和结束
1245
- // TODO: 后续得把 time-range 代码拆分出来
1246
- onChange: isDateTimeRange
1247
- ? this.handleStartDateChange
1248
- : viewMode === 'time'
1249
- ? this.handleTimeStartChange
1250
- : this.handleDateChange, requiredConfirm: false, dateFormat: curDateFormat, displayForamt: displayFormat || inputFormat, timeFormat: curTimeFormat, isValidDate: this.checkStartIsValidDate, viewMode: viewMode, input: false, onClose: this.close, renderDay: this.renderDay, renderMonth: this.renderMonth, renderQuarter: this.renderQuarter, renderYear: this.renderYear, locale: locale, timeRangeHeader: "\u5F00\u59CB\u65F6\u95F4", embed: embed, status: "start", testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('calendar-start') })),
1251
- (!isTimeRange ||
1252
- (editState === 'end' && !embed) ||
1253
- (mobileUI && isTimeRange)) && (_J$X_(Calendar["default"], { className: "".concat(ns, "DateRangePicker-end"), value: endDate, onChange: isDateTimeRange
1254
- ? this.handelEndDateChange
1255
- : viewMode === 'time'
1256
- ? this.handleTimeEndChange
1257
- : this.handleDateChange, requiredConfirm: false, dateFormat: curDateFormat, displayForamt: displayFormat || inputFormat, timeFormat: curTimeFormat, viewDate: isDateTimeRange ? this.currentMonth : this.nextMonth,
1258
- // isEndDate
1259
- isValidDate: this.checkEndIsValidDate, viewMode: viewMode, input: false, onClose: this.close, renderDay: this.renderDay, renderMonth: this.renderMonth, renderQuarter: this.renderQuarter, renderYear: this.renderYear, locale: locale, timeRangeHeader: "\u7ED3\u675F\u65F6\u95F4", embed: embed, status: "end", testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('calendar-end') }))),
1260
- embed || mobileUI ? null : (_J$X_("div", { key: "button", className: "".concat(ns, "DateRangePicker-actions") },
1261
- _J$X_(Button["default"], { size: "sm", onClick: function () { return _this.close(); } }, __('cancel')),
1262
- _J$X_(Button["default"], { level: "primary", size: "sm", className: cx('m-l-sm'), disabled: isConfirmBtnDisbaled, onClick: this.confirm }, __('confirm'))))));
1263
- };
1264
- DateRangePicker.prototype.getDisabledElementProps = function (currentDate, granularity) {
1265
- var _a = this.state; _a.endDateOpenedFirst; var endDate = _a.endDate, startDate = _a.startDate, editState = _a.editState;
1266
- var afterEndDate = editState === 'start' &&
1267
- endDate &&
1268
- currentDate.isAfter(endDate, granularity);
1269
- var beforeStartDate = editState === 'end' &&
1270
- startDate &&
1271
- !currentDate.isSameOrAfter(startDate, granularity);
1272
- if (afterEndDate || beforeStartDate) {
1273
- return {
1274
- className: ' is-disabled',
1275
- onClick: undefined
1276
- };
1277
- }
1278
- return {
1279
- className: ''
1280
- };
1281
- };
1282
- /** 获取宽度类型变量的值 */
1283
- DateRangePicker.prototype.getValidWidthValue = function (element, propsName) {
1284
- if (!element || !propsName) {
1285
- return 0;
1286
- }
1287
- var propsValue = parseInt(amisCore.getComputedStyle(element, kebabCase__default["default"](propsName)), 10);
1288
- return isNaN(propsValue) ? 0 : propsValue;
1289
- };
1290
- DateRangePicker.prototype.renderActiveCursor = function () {
1291
- var _a, _b, _c, _d;
1292
- var cx = this.props.classnames;
1293
- var _e = this.state, editState = _e.editState, isFocused = _e.isFocused;
1294
- var cursorWidth = 0;
1295
- var cursorLeft = 0;
1296
- var parentNode = (_a = this === null || this === void 0 ? void 0 : this.dom) === null || _a === void 0 ? void 0 : _a.current;
1297
- var startInputNode = (_b = this === null || this === void 0 ? void 0 : this.startInputRef) === null || _b === void 0 ? void 0 : _b.current;
1298
- var endInputNode = (_c = this === null || this === void 0 ? void 0 : this.endInputRef) === null || _c === void 0 ? void 0 : _c.current;
1299
- var separatorNode = (_d = this === null || this === void 0 ? void 0 : this.separatorRef) === null || _d === void 0 ? void 0 : _d.current;
1300
- if (parentNode && startInputNode && endInputNode && separatorNode) {
1301
- if (editState === 'start') {
1302
- var paddingWidth = this.getValidWidthValue(parentNode, 'paddingLeft');
1303
- cursorLeft = paddingWidth;
1304
- cursorWidth = startInputNode.offsetWidth;
1305
- }
1306
- else if (editState === 'end') {
1307
- var separatorWidth = separatorNode.offsetWidth +
1308
- this.getValidWidthValue(parentNode, 'paddingLeft') +
1309
- this.getValidWidthValue(parentNode, 'marginLeft') +
1310
- this.getValidWidthValue(parentNode, 'paddingRight') +
1311
- this.getValidWidthValue(parentNode, 'marginRight');
1312
- cursorLeft = startInputNode.offsetWidth + separatorWidth;
1313
- cursorWidth = endInputNode.offsetWidth;
1314
- }
1315
- else {
1316
- cursorWidth = 0;
1317
- }
1318
- }
1319
- return (_J$X_("div", { className: cx('DateRangePicker-activeCursor', { isFocused: isFocused }), style: {
1320
- position: 'absolute',
1321
- left: cursorLeft,
1322
- width: cursorWidth
1323
- } }));
1324
- };
1325
- DateRangePicker.prototype.getDefaultDate = function () {
1326
- var _a;
1327
- var _b = this.props, value = _b.value, data = _b.data, valueFormat = _b.valueFormat, format = _b.format, delimiter = _b.delimiter;
1328
- if (value) {
1329
- var startDate = amisCore.filterDate(Array.isArray(value)
1330
- ? value[0] || value[1]
1331
- : (_a = String(value).split(delimiter)) === null || _a === void 0 ? void 0 : _a[0], data, valueFormat || format);
1332
- return startDate;
1333
- }
1334
- return undefined;
1335
- };
1336
- DateRangePicker.prototype.render = function () {
1337
- var _a;
1338
- var _this = this;
1339
- var _b = this.props, className = _b.className, popoverClassName = _b.popoverClassName, ns = _b.classPrefix, cx = _b.classnames, value = _b.value, startPlaceholder = _b.startPlaceholder, endPlaceholder = _b.endPlaceholder, popOverContainer = _b.popOverContainer, popOverContainerSelector = _b.popOverContainerSelector, inputFormat = _b.inputFormat, displayFormat = _b.displayFormat; _b.joinValues; _b.delimiter; var clearable = _b.clearable, inputForbid = _b.inputForbid, disabled = _b.disabled, embed = _b.embed, overlayPlacement = _b.overlayPlacement, borderMode = _b.borderMode, mobileUI = _b.mobileUI; _b.timeFormat; var minDate = _b.minDate, maxDate = _b.maxDate, minDuration = _b.minDuration, maxDuration = _b.maxDuration; _b.dateFormat; var _c = _b.viewMode, viewMode = _c === void 0 ? 'days' : _c, ranges = _b.ranges, shortcuts = _b.shortcuts, label = _b.label, animation = _b.animation, testIdBuilder = _b.testIdBuilder, locale = _b.locale;
1340
- var useCalendarMobile = mobileUI && ['days', 'months', 'quarters'].indexOf(viewMode) > -1;
1341
- var _d = this.state, isOpened = _d.isOpened, isFocused = _d.isFocused, startDate = _d.startDate, endDate = _d.endDate, curDateFormat = _d.curDateFormat, curTimeFormat = _d.curTimeFormat;
1342
- var __ = this.props.translate;
1343
- var calendarMobile = (_J$X_(CalendarMobile["default"], { popOverContainer: popOverContainer, timeFormat: curTimeFormat, displayForamt: displayFormat || inputFormat, defaultDate: this.getDefaultDate(), startDate: startDate, endDate: endDate, minDate: minDate, maxDate: maxDate, minDuration: minDuration, maxDuration: maxDuration, dateFormat: curDateFormat, embed: embed, viewMode: viewMode, close: this.close, confirm: this.confirm, onChange: this.handleMobileChange, footerExtra: this.renderShortcuts(ranges || shortcuts), locale: locale, showViewMode: viewMode === 'quarters' || viewMode === 'months' ? 'years' : 'months' }));
1344
- if (embed) {
1345
- return (_J$X_("div", { className: cx("".concat(ns, "DateRangeCalendar"), {
1346
- 'is-mobile': mobileUI
1347
- }, {
1348
- 'is-disabled': disabled
1349
- }, className) }, useCalendarMobile ? calendarMobile : this.renderCalendar()));
1350
- }
1351
- var CalendarMobileTitle = (_J$X_("div", { className: "".concat(ns, "CalendarMobile-title") }, label && typeof label === 'string' ? label : __('Calendar.datepicker')));
1352
- /** 是否启用游标动画 */
1353
- var useAnimation = animation !== false;
1354
- return (_J$X_("div", { tabIndex: 0, onKeyPress: this.handleKeyPress, onFocus: this.handleFocus, onBlur: this.handleBlur, className: cx("".concat(ns, "DateRangePicker"), (_a = {
1355
- 'is-disabled': disabled,
1356
- 'is-focused': isFocused
1357
- },
1358
- _a["".concat(ns, "DateRangePicker--border").concat(amisCore.ucFirst(borderMode))] = borderMode,
1359
- _a['is-mobile'] = mobileUI,
1360
- _a), className), ref: this.dom },
1361
- _J$X_(Input["default"], { className: cx('DateRangePicker-input', {
1362
- isActive: !useAnimation && this.state.editState === 'start' && isOpened
1363
- }), onChange: this.startInputChange, onClick: this.openStart, ref: this.startInputRef, placeholder: __(startPlaceholder), autoComplete: "off", value: this.state.startInputValue || '', disabled: disabled, readOnly: mobileUI || inputForbid, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('start') }),
1364
- _J$X_("span", { className: cx('DateRangePicker-input-separator'), ref: this.separatorRef },
1365
- _J$X_("span", { className: cx('DateRangePicker-input-separator-line') })),
1366
- _J$X_(Input["default"], { className: cx('DateRangePicker-input', {
1367
- isActive: !useAnimation && this.state.editState === 'end' && isOpened
1368
- }), onChange: this.endInputChange, onClick: this.openEnd, ref: this.endInputRef, placeholder: __(endPlaceholder), autoComplete: "off", value: this.state.endInputValue || '', disabled: disabled, readOnly: mobileUI || inputForbid, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('end') }),
1369
- useAnimation ? this.renderActiveCursor() : null,
1370
- clearable && !disabled && value ? (_J$X_("a", { className: "".concat(ns, "DateRangePicker-clear"), onClick: this.clearValue },
1371
- _J$X_(icons.Icon, { icon: "input-clear", className: "icon" }))) : null,
1372
- _J$X_("a", { className: cx("DateRangePicker-toggler") },
1373
- _J$X_(icons.Icon, { icon: viewMode === 'time' ? 'clock' : 'date', className: "icon", iconContent: viewMode === 'time'
1374
- ? 'DatePicker-toggler-clock'
1375
- : 'DatePicker-toggler-date' })),
1376
- isOpened ? (mobileUI ? (_J$X_(PopUp["default"], { isShow: isOpened, container: popOverContainer, className: cx("".concat(ns, "CalendarMobile-pop"), "".concat(ns, "CalendarMobile-pop--").concat(viewMode)), onHide: this.close, header: CalendarMobileTitle, showClose: false }, useCalendarMobile ? calendarMobile : this.renderCalendar())) : (_J$X_(amisCore.Overlay, { target: function () { return _this.dom.current; }, onHide: this.close, container: popOverContainer || (function () { return ReactDOM.findDOMNode(_this); }), containerSelector: popOverContainerSelector, rootClose: false, placement: overlayPlacement, show: true },
1377
- _J$X_(amisCore.PopOver, { classPrefix: ns, className: cx("".concat(ns, "DateRangePicker-popover"), popoverClassName), onHide: this.close, onClick: this.handlePopOverClick }, this.renderCalendar())))) : null));
1378
- };
1379
- DateRangePicker.defaultProps = {
1380
- startPlaceholder: 'Calendar.startPick',
1381
- endPlaceholder: 'Calendar.endPick',
1382
- format: 'X',
1383
- inputFormat: 'YYYY-MM-DD',
1384
- joinValues: true,
1385
- clearable: true,
1386
- delimiter: ',',
1387
- ranges: '',
1388
- shortcuts: 'yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter',
1389
- resetValue: '',
1390
- closeOnSelect: true,
1391
- overlayPlacement: 'auto',
1392
- endDateOpenedFirst: false
1393
- };
1394
- return DateRangePicker;
1395
- }(React__default["default"].Component));
1396
- var DateRangePicker$1 = amisCore.themeable(amisCore.localeable(DateRangePicker));
1397
-
1398
- exports.DateRangePicker = DateRangePicker;
1399
- exports.advancedRanges = advancedRanges;
1400
- exports.availableShortcuts = availableShortcuts;
1401
- exports["default"] = DateRangePicker$1;