tntd 2.8.45 → 2.8.47

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 (569) hide show
  1. package/es/_util/context.js +1 -1
  2. package/es/_util/defaultRenderEmpty.js +1 -1
  3. package/es/_util/hooks/useFlexGapSupport.js +4 -4
  4. package/es/_util/hooks/useForceUpdate.js +4 -4
  5. package/es/_util/hooks/useScrollLock.js +4 -4
  6. package/es/_util/responsiveObserve.js +1 -1
  7. package/es/_util/styleChecker.js +1 -1
  8. package/es/actions/index.js +1 -1
  9. package/es/alert/alert.js +147 -0
  10. package/es/alert/alert.js.map +1 -0
  11. package/es/alert/alert.less +128 -0
  12. package/es/anchor/anchor.js +5 -5
  13. package/es/array-input/index.js +9 -9
  14. package/es/cascader/cascader.js +84 -0
  15. package/es/cascader/cascader.js.map +1 -0
  16. package/es/cascader/cascader.less +16 -0
  17. package/es/check-card/group.js +8 -8
  18. package/es/check-card/index.js +6 -6
  19. package/es/checkbox/check.png +0 -0
  20. package/es/checkbox/checkbox-group.js +1 -1
  21. package/es/checkbox/checkbox.js +100 -0
  22. package/es/checkbox/checkbox.js.map +1 -0
  23. package/es/checkbox/checkbox.less +69 -0
  24. package/es/color-picker/ColorPicker.js +6 -6
  25. package/es/color-picker/index.js +1 -1
  26. package/es/columns/index.js +1 -1
  27. package/es/config-provider/config-provider.js +1 -1
  28. package/es/date-picker/DatePicker.js +163 -0
  29. package/es/date-picker/DatePicker.js.map +1 -0
  30. package/es/date-picker/index.less +294 -0
  31. package/es/descriptions/descriptions.js +5 -5
  32. package/es/development-login/LoginModal.js +6 -6
  33. package/es/development-login/index.js +4 -4
  34. package/es/drawer/drawer.js +2 -2
  35. package/es/ellipsis/Svg/CopySVG.js +1 -1
  36. package/es/ellipsis/Svg/TickSVG.js +1 -1
  37. package/es/ellipsis/index.js +5 -5
  38. package/es/empty/empty.js +2 -2
  39. package/es/empty/empty.stories.js +2 -2
  40. package/es/exception/exception.js +1 -1
  41. package/es/form/form.js +2 -2
  42. package/es/grid-v4/col.js +2 -2
  43. package/es/grid-v4/hooks/useBreakpoint.js +1 -1
  44. package/es/grid-v4/index.js +1 -1
  45. package/es/grid-v4/row.js +6 -6
  46. package/es/handle/index.js +1 -1
  47. package/es/handle-icon/index.js +8 -8
  48. package/es/icon/IconFont.js +1 -1
  49. package/es/icon/components/Icon.js +9 -9
  50. package/es/icon/components/index.js +1 -1
  51. package/es/icon/components/utils.js +3 -3
  52. package/es/icon/index.js +7 -7
  53. package/es/icon/twoTonePrimaryColor.js +1 -1
  54. package/es/icon/utils.js +1 -1
  55. package/es/img/Contain.js +1 -1
  56. package/es/img/Cover.js +5 -5
  57. package/es/img/index.js +5 -5
  58. package/es/index.js +1 -1
  59. package/es/input/input.js +2 -2
  60. package/es/input-number/index.js +1 -1
  61. package/es/input-number/inputNumber.js +89 -0
  62. package/es/input-number/inputNumber.js.map +1 -0
  63. package/es/input-number/inputNumber.less +12 -0
  64. package/es/label/index.js +2 -2
  65. package/es/loading-button/index.js +5 -5
  66. package/es/locale/default.js +1 -1
  67. package/es/locale/en_US.js +1 -1
  68. package/es/locale/zh_CN.js +1 -1
  69. package/es/modal/index.less +52 -0
  70. package/es/modal/modal.js +6 -4
  71. package/es/modal/modal.js.map +1 -1
  72. package/es/modal/style/modal.less +16 -0
  73. package/es/notification/assets/index.js +1 -1
  74. package/es/notification/index.js +1 -1
  75. package/es/notification/notification.js +1 -1
  76. package/es/page/Box.js +1 -1
  77. package/es/page/index.js +7 -7
  78. package/es/page-container/index.js +1 -1
  79. package/es/page-loading/index.js +1 -1
  80. package/es/popconfirm/index.less +32 -0
  81. package/es/popconfirm/popconfirm.js +96 -0
  82. package/es/popconfirm/popconfirm.js.map +1 -0
  83. package/es/popover/index.less +57 -0
  84. package/es/popover/popover.js +90 -0
  85. package/es/popover/popover.js.map +1 -0
  86. package/es/preview-text/index.js +7 -7
  87. package/es/progress/progress.js +179 -0
  88. package/es/progress/progress.js.map +1 -0
  89. package/es/progress/progress.less +82 -0
  90. package/es/query-form/Field/Checkbox.js +1 -1
  91. package/es/query-form/Field/Composition/FieldPopover.js +466 -0
  92. package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
  93. package/es/query-form/Field/Composition/FieldPopover.less +41 -0
  94. package/es/query-form/Field/Composition/Select.js +260 -0
  95. package/es/query-form/Field/Composition/Select.js.map +1 -0
  96. package/es/query-form/Field/Composition/SelectInput.js +112 -0
  97. package/es/query-form/Field/Composition/SelectInput.js.map +1 -0
  98. package/es/query-form/Field/Composition/ValueTag.js +241 -0
  99. package/es/query-form/Field/Composition/ValueTag.js.map +1 -0
  100. package/es/query-form/Field/Composition/index.js +448 -0
  101. package/es/query-form/Field/Composition/index.js.map +1 -0
  102. package/es/query-form/Field/Composition/index.less +167 -0
  103. package/es/query-form/Field/Composition/utils.js +173 -0
  104. package/es/query-form/Field/Composition/utils.js.map +1 -0
  105. package/es/query-form/Field/Select.js +6 -6
  106. package/es/query-form/Field/SelectInput.js +6 -6
  107. package/es/query-form/Field/fieldsMap.js +1 -1
  108. package/es/query-form/Field/index.js +10 -10
  109. package/es/query-form/createActions.js +1 -1
  110. package/es/query-form/index.js +10 -10
  111. package/es/query-form/useForm.js +1 -1
  112. package/es/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  113. package/es/query-form-backup/Field/Composition/index.less +114 -0
  114. package/es/query-form-backup/index.less +90 -0
  115. package/es/query-form-v2/index.less +133 -0
  116. package/es/query-list-scene/List.js +13 -13
  117. package/es/query-list-scene/QueryForm.js +10 -10
  118. package/es/query-list-scene/QueryListScene.js +10 -10
  119. package/es/query-list-scene/Title.js +1 -1
  120. package/es/query-list-scene/Toolbar.js +2 -2
  121. package/es/query-list-scene/createActions.js +1 -1
  122. package/es/query-list-scene/index.js +1 -1
  123. package/es/query-list-scene/useActions.js +1 -1
  124. package/es/radio/index.js +1 -1
  125. package/es/radio/radio-group.js +1 -1
  126. package/es/radio/radio.js +110 -0
  127. package/es/radio/radio.js.map +1 -0
  128. package/es/radio/radio.less +43 -0
  129. package/es/render-empty/render-empty.js +1 -1
  130. package/es/scroll-bar/Bar.js +5 -5
  131. package/es/scroll-bar/Context.js +1 -1
  132. package/es/scroll-bar/ScrollBar.js +1 -1
  133. package/es/scroll-bar/Thumb.js +5 -5
  134. package/es/scroll-bar/index.js +1 -1
  135. package/es/scroll-bar/util.js +1 -1
  136. package/es/segmented/index.js +2 -2
  137. package/es/select/select.js +2 -2
  138. package/es/spin/spin.js +79 -0
  139. package/es/spin/spin.js.map +1 -0
  140. package/es/spin/spin.less +9 -0
  141. package/es/steps/assets/background_left.svg +12 -0
  142. package/es/steps/assets/background_right.svg +12 -0
  143. package/es/steps/assets/horizontal_line.svg +3 -0
  144. package/es/steps/assets/vertical_line.svg +3 -0
  145. package/es/steps/stepStyle/icon.less +51 -0
  146. package/es/steps/stepStyle/progress-dot.less +10 -0
  147. package/es/steps/stepStyle/variables.less +8 -0
  148. package/es/steps/stepStyle/vertical.less +41 -0
  149. package/es/steps/steps.js +2 -2
  150. package/es/svg-components/index.js +1 -1
  151. package/es/switch/index.less +45 -0
  152. package/es/switch/switch.js +1 -1
  153. package/es/table/hooks/use-column-setting.js +4 -4
  154. package/es/table/hooks/use-expand-fixed.js +6 -6
  155. package/es/table/resizableTable/index.js +6 -6
  156. package/es/table/table-hoc.js +1 -1
  157. package/es/table/table.js +9 -9
  158. package/es/table/table.stories.js +2 -2
  159. package/es/table/total-shower.js +1 -1
  160. package/es/table/utils.js +1 -1
  161. package/es/table-container/index.js +1 -1
  162. package/es/tabs/tabs.less +125 -0
  163. package/es/tabs-container/index.js +1 -1
  164. package/es/tag/tag.js +2 -2
  165. package/es/time-picker/TimePicker.js +90 -0
  166. package/es/time-picker/TimePicker.js.map +1 -0
  167. package/es/time-picker/index.less +38 -0
  168. package/es/title/index.js +1 -1
  169. package/es/tntd-action/Action.js +218 -0
  170. package/es/tntd-action/Action.js.map +1 -0
  171. package/es/tntd-action/index.less +61 -0
  172. package/es/tntd-cascader/AntdCascader/component/context.js +1 -1
  173. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  174. package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  175. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  176. package/es/tntd-cascader/AntdCascader/config/utils.js +2 -2
  177. package/es/tntd-cascader/AntdCascader/index.js +7 -7
  178. package/es/tntd-cascader/index.js +1 -1
  179. package/es/tntd-cascader/rc-cascader/Cascader.js +8 -8
  180. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  181. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
  182. package/es/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
  183. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  184. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  185. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  186. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  187. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  188. package/es/tntd-cascader/rc-cascader/index.js +1 -1
  189. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  190. package/es/tntd-form/ErrorList.js +7 -7
  191. package/es/tntd-form/Form.js +6 -6
  192. package/es/tntd-form/FormItem/ItemHolder.js +6 -6
  193. package/es/tntd-form/FormItem/index.js +8 -8
  194. package/es/tntd-form/FormItemInput.js +1 -1
  195. package/es/tntd-form/FormItemLabel.js +2 -2
  196. package/es/tntd-form/FormList.js +1 -1
  197. package/es/tntd-form/context.js +1 -1
  198. package/es/tntd-form/hooks/useDebounce.js +4 -4
  199. package/es/tntd-form/hooks/useForm.js +5 -5
  200. package/es/tntd-form/hooks/useFormItemStatus.js +1 -1
  201. package/es/tntd-form/hooks/useFrameState.js +5 -5
  202. package/es/tntd-form/index.js +1 -1
  203. package/es/tntd-icon/index.js +1 -1
  204. package/es/tntd-layout/AppList.js +6 -6
  205. package/es/tntd-layout/Application.js +6 -6
  206. package/es/tntd-layout/Avatar.js +2 -2
  207. package/es/tntd-layout/CompatibleLanguage.js +6 -6
  208. package/es/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  209. package/es/tntd-layout/EnterpriseLayout/Language.js +6 -6
  210. package/es/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  211. package/es/tntd-layout/EnterpriseLayout/index.js +1 -1
  212. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  213. package/es/tntd-layout/GlobalNavigation/index.js +9 -9
  214. package/es/tntd-layout/Header.js +2 -2
  215. package/es/tntd-layout/HeaderActions.js +2 -2
  216. package/es/tntd-layout/HeaderNavs.js +6 -6
  217. package/es/tntd-layout/HeaderTabs.js +7 -7
  218. package/es/tntd-layout/Iconfont.js +1 -1
  219. package/es/tntd-layout/Language.js +6 -6
  220. package/es/tntd-layout/Layout.js +6 -6
  221. package/es/tntd-layout/Logo.js +2 -2
  222. package/es/tntd-layout/OrgAppList.js +6 -6
  223. package/es/tntd-layout/SideMenu.js +6 -6
  224. package/es/tntd-layout/Theme.js +6 -6
  225. package/es/tntd-layout/createActions.js +1 -1
  226. package/es/tntd-layout/images/index.js +1 -1
  227. package/es/tntd-layout/index.js +1 -1
  228. package/es/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  229. package/es/tntd-layout/paaslayout/Header.js +2 -2
  230. package/es/tntd-layout/paaslayout/Logo.js +2 -2
  231. package/es/tntd-layout/paaslayout/SideMenu.js +6 -6
  232. package/es/tntd-layout/paaslayout/index.js +6 -6
  233. package/es/tntd-layout/storage.js +1 -1
  234. package/es/tntd-modal/index.js +6 -6
  235. package/es/tntd-rc-select/_util/PurePanel.js +5 -5
  236. package/es/tntd-rc-select/_util/context.js +1 -1
  237. package/es/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  238. package/es/tntd-rc-select/_util/getIcons.js +1 -1
  239. package/es/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  240. package/es/tntd-rc-select/index.js +2 -2
  241. package/es/tntd-reference/AHref/index.js +1 -1
  242. package/es/tntd-reference/ReferenceBatchCheck/index.js +1 -1
  243. package/es/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
  244. package/es/tntd-reference/ReferenceCheck/index.js +1 -1
  245. package/es/tntd-reference/ReferenceDrawer/index.js +5 -5
  246. package/es/tntd-reference/ReferenceInfo/index.js +1 -1
  247. package/es/tntd-reference/index.js +1 -1
  248. package/es/tntd-second-page/index.js +1 -1
  249. package/es/tntd-select/DropDownWrap.js +8 -8
  250. package/es/tntd-select/index.js +10 -9
  251. package/es/tntd-select/index.less +7 -0
  252. package/es/tntd-virtual-tree/index.js +8 -8
  253. package/es/tntd-virtual-tree/utils.js +28 -28
  254. package/es/tntd-virtual-tree-select/index.js +10 -10
  255. package/es/tntd-virtual-tree-select/utils.js +9 -9
  256. package/es/tooltip/tooltip.js +1 -1
  257. package/es/upload/index.js +6 -6
  258. package/es/upload/svg/UploadSVG.js +1 -1
  259. package/es/utils/checkAuth.js +4 -4
  260. package/es/utils/index.js +9 -9
  261. package/es/utils/lang.js +1 -1
  262. package/es/water-mark/index.js +5 -5
  263. package/lib/_util/context.js +3 -3
  264. package/lib/_util/defaultRenderEmpty.js +3 -3
  265. package/lib/_util/hooks/useFlexGapSupport.js +14 -15
  266. package/lib/_util/hooks/useForceUpdate.js +14 -15
  267. package/lib/_util/hooks/useScrollLock.js +14 -15
  268. package/lib/_util/responsiveObserve.js +7 -13
  269. package/lib/_util/styleChecker.js +3 -3
  270. package/lib/actions/index.js +3 -3
  271. package/lib/alert/alert.d.ts +12 -0
  272. package/lib/alert/alert.d.ts.map +1 -0
  273. package/lib/alert/alert.js +147 -0
  274. package/lib/alert/alert.js.map +1 -0
  275. package/lib/alert/alert.less +128 -0
  276. package/lib/anchor/anchor.js +17 -18
  277. package/lib/array-input/index.js +30 -37
  278. package/lib/cascader/cascader.d.ts +10 -0
  279. package/lib/cascader/cascader.d.ts.map +1 -0
  280. package/lib/cascader/cascader.js +84 -0
  281. package/lib/cascader/cascader.js.map +1 -0
  282. package/lib/cascader/cascader.less +16 -0
  283. package/lib/check-card/group.js +23 -24
  284. package/lib/check-card/index.js +24 -31
  285. package/lib/checkbox/check.png +0 -0
  286. package/lib/checkbox/checkbox-group.js +3 -3
  287. package/lib/checkbox/checkbox.d.ts +16 -0
  288. package/lib/checkbox/checkbox.d.ts.map +1 -0
  289. package/lib/checkbox/checkbox.js +100 -0
  290. package/lib/checkbox/checkbox.js.map +1 -0
  291. package/lib/checkbox/checkbox.less +69 -0
  292. package/lib/color-picker/ColorPicker.js +24 -31
  293. package/lib/color-picker/index.js +3 -3
  294. package/lib/columns/index.js +3 -3
  295. package/lib/config-provider/config-provider.js +3 -3
  296. package/lib/date-picker/DatePicker.d.ts +21 -0
  297. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  298. package/lib/date-picker/DatePicker.js +163 -0
  299. package/lib/date-picker/DatePicker.js.map +1 -0
  300. package/lib/date-picker/index.less +294 -0
  301. package/lib/descriptions/descriptions.js +13 -19
  302. package/lib/development-login/LoginModal.js +24 -31
  303. package/lib/development-login/index.js +14 -15
  304. package/lib/drawer/drawer.js +10 -16
  305. package/lib/ellipsis/Svg/CopySVG.js +3 -3
  306. package/lib/ellipsis/Svg/TickSVG.js +3 -3
  307. package/lib/ellipsis/index.js +17 -18
  308. package/lib/empty/empty.js +10 -16
  309. package/lib/empty/empty.stories.js +6 -9
  310. package/lib/exception/exception.js +3 -3
  311. package/lib/form/form.js +10 -16
  312. package/lib/grid-v4/col.js +10 -16
  313. package/lib/grid-v4/hooks/useBreakpoint.js +3 -3
  314. package/lib/grid-v4/index.js +3 -3
  315. package/lib/grid-v4/row.js +24 -31
  316. package/lib/handle/index.js +3 -3
  317. package/lib/handle-icon/index.js +10 -10
  318. package/lib/icon/IconFont.js +3 -3
  319. package/lib/icon/components/Icon.js +44 -70
  320. package/lib/icon/components/index.js +3 -3
  321. package/lib/icon/components/utils.js +10 -18
  322. package/lib/icon/index.js +26 -33
  323. package/lib/icon/twoTonePrimaryColor.js +3 -3
  324. package/lib/icon/utils.js +3 -3
  325. package/lib/img/Contain.js +3 -3
  326. package/lib/img/Cover.js +17 -18
  327. package/lib/img/index.js +17 -18
  328. package/lib/index.js +3 -3
  329. package/lib/input/input.js +10 -16
  330. package/lib/input-number/index.js +3 -3
  331. package/lib/input-number/inputNumber.d.ts +10 -0
  332. package/lib/input-number/inputNumber.d.ts.map +1 -0
  333. package/lib/input-number/inputNumber.js +89 -0
  334. package/lib/input-number/inputNumber.js.map +1 -0
  335. package/lib/input-number/inputNumber.less +12 -0
  336. package/lib/label/index.js +10 -16
  337. package/lib/loading-button/index.js +17 -18
  338. package/lib/locale/default.js +3 -3
  339. package/lib/locale/en_US.js +3 -3
  340. package/lib/locale/zh_CN.js +3 -3
  341. package/lib/modal/index.less +52 -0
  342. package/lib/modal/modal.d.ts +1 -0
  343. package/lib/modal/modal.d.ts.map +1 -1
  344. package/lib/modal/modal.js +8 -6
  345. package/lib/modal/modal.js.map +1 -1
  346. package/lib/modal/style/modal.less +16 -0
  347. package/lib/notification/assets/index.js +3 -3
  348. package/lib/notification/index.js +3 -3
  349. package/lib/notification/notification.js +3 -3
  350. package/lib/page/Box.js +3 -3
  351. package/lib/page/index.js +26 -33
  352. package/lib/page-container/index.js +3 -3
  353. package/lib/page-loading/index.js +3 -3
  354. package/lib/popconfirm/index.less +32 -0
  355. package/lib/popconfirm/popconfirm.d.ts +8 -0
  356. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  357. package/lib/popconfirm/popconfirm.js +96 -0
  358. package/lib/popconfirm/popconfirm.js.map +1 -0
  359. package/lib/popover/index.less +57 -0
  360. package/lib/popover/popover.d.ts +14 -0
  361. package/lib/popover/popover.d.ts.map +1 -0
  362. package/lib/popover/popover.js +90 -0
  363. package/lib/popover/popover.js.map +1 -0
  364. package/lib/preview-text/index.js +9 -9
  365. package/lib/progress/progress.d.ts +12 -0
  366. package/lib/progress/progress.d.ts.map +1 -0
  367. package/lib/progress/progress.js +179 -0
  368. package/lib/progress/progress.js.map +1 -0
  369. package/lib/progress/progress.less +82 -0
  370. package/lib/query-form/Field/Checkbox.js +3 -3
  371. package/lib/query-form/Field/Composition/FieldPopover.d.ts +19 -0
  372. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
  373. package/lib/query-form/Field/Composition/FieldPopover.js +466 -0
  374. package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
  375. package/lib/query-form/Field/Composition/FieldPopover.less +41 -0
  376. package/lib/query-form/Field/Composition/Select.d.ts +4 -0
  377. package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
  378. package/lib/query-form/Field/Composition/Select.js +260 -0
  379. package/lib/query-form/Field/Composition/Select.js.map +1 -0
  380. package/lib/query-form/Field/Composition/SelectInput.d.ts +3 -0
  381. package/lib/query-form/Field/Composition/SelectInput.d.ts.map +1 -0
  382. package/lib/query-form/Field/Composition/SelectInput.js +112 -0
  383. package/lib/query-form/Field/Composition/SelectInput.js.map +1 -0
  384. package/lib/query-form/Field/Composition/ValueTag.d.ts +13 -0
  385. package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -0
  386. package/lib/query-form/Field/Composition/ValueTag.js +241 -0
  387. package/lib/query-form/Field/Composition/ValueTag.js.map +1 -0
  388. package/lib/query-form/Field/Composition/index.d.ts +15 -0
  389. package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
  390. package/lib/query-form/Field/Composition/index.js +448 -0
  391. package/lib/query-form/Field/Composition/index.js.map +1 -0
  392. package/lib/query-form/Field/Composition/index.less +167 -0
  393. package/lib/query-form/Field/Composition/utils.d.ts +21 -0
  394. package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
  395. package/lib/query-form/Field/Composition/utils.js +173 -0
  396. package/lib/query-form/Field/Composition/utils.js.map +1 -0
  397. package/lib/query-form/Field/Select.js +24 -31
  398. package/lib/query-form/Field/SelectInput.js +24 -31
  399. package/lib/query-form/Field/fieldsMap.js +3 -3
  400. package/lib/query-form/Field/index.js +47 -73
  401. package/lib/query-form/createActions.js +3 -3
  402. package/lib/query-form/index.js +44 -70
  403. package/lib/query-form/useForm.js +3 -3
  404. package/lib/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  405. package/lib/query-form-backup/Field/Composition/index.less +114 -0
  406. package/lib/query-form-backup/index.less +90 -0
  407. package/lib/query-form-v2/index.less +133 -0
  408. package/lib/query-list-scene/List.js +41 -61
  409. package/lib/query-list-scene/QueryForm.js +44 -70
  410. package/lib/query-list-scene/QueryListScene.js +44 -70
  411. package/lib/query-list-scene/Title.js +3 -3
  412. package/lib/query-list-scene/Toolbar.js +10 -16
  413. package/lib/query-list-scene/createActions.js +3 -3
  414. package/lib/query-list-scene/index.js +3 -3
  415. package/lib/query-list-scene/useActions.js +3 -3
  416. package/lib/radio/index.js +3 -3
  417. package/lib/radio/radio-group.js +3 -3
  418. package/lib/radio/radio.d.ts +17 -0
  419. package/lib/radio/radio.d.ts.map +1 -0
  420. package/lib/radio/radio.js +110 -0
  421. package/lib/radio/radio.js.map +1 -0
  422. package/lib/radio/radio.less +43 -0
  423. package/lib/render-empty/render-empty.js +3 -3
  424. package/lib/scroll-bar/Bar.js +17 -18
  425. package/lib/scroll-bar/Context.js +3 -3
  426. package/lib/scroll-bar/ScrollBar.js +3 -3
  427. package/lib/scroll-bar/Thumb.js +17 -18
  428. package/lib/scroll-bar/index.js +3 -3
  429. package/lib/scroll-bar/util.js +7 -13
  430. package/lib/segmented/index.js +10 -16
  431. package/lib/select/select.js +10 -16
  432. package/lib/spin/spin.d.ts +9 -0
  433. package/lib/spin/spin.d.ts.map +1 -0
  434. package/lib/spin/spin.js +79 -0
  435. package/lib/spin/spin.js.map +1 -0
  436. package/lib/spin/spin.less +9 -0
  437. package/lib/steps/assets/background_left.svg +12 -0
  438. package/lib/steps/assets/background_right.svg +12 -0
  439. package/lib/steps/assets/horizontal_line.svg +3 -0
  440. package/lib/steps/assets/vertical_line.svg +3 -0
  441. package/lib/steps/stepStyle/icon.less +51 -0
  442. package/lib/steps/stepStyle/progress-dot.less +10 -0
  443. package/lib/steps/stepStyle/variables.less +8 -0
  444. package/lib/steps/stepStyle/vertical.less +41 -0
  445. package/lib/steps/steps.js +10 -16
  446. package/lib/svg-components/index.js +3 -3
  447. package/lib/switch/index.less +45 -0
  448. package/lib/switch/switch.js +3 -3
  449. package/lib/table/hooks/use-column-setting.js +14 -15
  450. package/lib/table/hooks/use-expand-fixed.js +30 -36
  451. package/lib/table/resizableTable/index.js +24 -31
  452. package/lib/table/table-hoc.js +3 -3
  453. package/lib/table/table.js +27 -34
  454. package/lib/table/table.stories.js +10 -16
  455. package/lib/table/total-shower.js +3 -3
  456. package/lib/table/utils.js +3 -3
  457. package/lib/table-container/index.js +3 -3
  458. package/lib/tabs/tabs.less +125 -0
  459. package/lib/tabs-container/index.js +3 -3
  460. package/lib/tag/tag.js +10 -16
  461. package/lib/time-picker/TimePicker.d.ts +9 -0
  462. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  463. package/lib/time-picker/TimePicker.js +90 -0
  464. package/lib/time-picker/TimePicker.js.map +1 -0
  465. package/lib/time-picker/index.less +38 -0
  466. package/lib/title/index.js +3 -3
  467. package/lib/tntd-action/Action.d.ts +6 -0
  468. package/lib/tntd-action/Action.d.ts.map +1 -0
  469. package/lib/tntd-action/Action.js +218 -0
  470. package/lib/tntd-action/Action.js.map +1 -0
  471. package/lib/tntd-action/index.less +61 -0
  472. package/lib/tntd-cascader/AntdCascader/component/context.js +3 -3
  473. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +3 -3
  474. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
  475. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +10 -16
  476. package/lib/tntd-cascader/AntdCascader/config/utils.js +10 -16
  477. package/lib/tntd-cascader/AntdCascader/index.js +26 -33
  478. package/lib/tntd-cascader/index.js +3 -3
  479. package/lib/tntd-cascader/rc-cascader/Cascader.js +23 -24
  480. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +10 -16
  481. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +26 -33
  482. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +30 -37
  483. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +17 -18
  484. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +23 -24
  485. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +16 -17
  486. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
  487. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +23 -30
  488. package/lib/tntd-cascader/rc-cascader/index.js +3 -3
  489. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +6 -6
  490. package/lib/tntd-form/ErrorList.js +26 -33
  491. package/lib/tntd-form/Form.js +24 -31
  492. package/lib/tntd-form/FormItem/ItemHolder.js +24 -31
  493. package/lib/tntd-form/FormItem/index.js +23 -24
  494. package/lib/tntd-form/FormItemInput.js +3 -3
  495. package/lib/tntd-form/FormItemLabel.js +10 -16
  496. package/lib/tntd-form/FormList.js +3 -3
  497. package/lib/tntd-form/context.js +3 -3
  498. package/lib/tntd-form/hooks/useDebounce.js +14 -15
  499. package/lib/tntd-form/hooks/useForm.js +17 -18
  500. package/lib/tntd-form/hooks/useFormItemStatus.js +3 -3
  501. package/lib/tntd-form/hooks/useFrameState.js +17 -18
  502. package/lib/tntd-form/index.js +3 -3
  503. package/lib/tntd-icon/index.js +3 -3
  504. package/lib/tntd-layout/AppList.js +20 -24
  505. package/lib/tntd-layout/Application.js +20 -24
  506. package/lib/tntd-layout/Avatar.js +6 -9
  507. package/lib/tntd-layout/CompatibleLanguage.js +20 -24
  508. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +6 -9
  509. package/lib/tntd-layout/EnterpriseLayout/Language.js +20 -24
  510. package/lib/tntd-layout/EnterpriseLayout/Theme.js +20 -24
  511. package/lib/tntd-layout/EnterpriseLayout/index.js +3 -3
  512. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +20 -24
  513. package/lib/tntd-layout/GlobalNavigation/index.js +26 -30
  514. package/lib/tntd-layout/Header.js +6 -9
  515. package/lib/tntd-layout/HeaderActions.js +6 -9
  516. package/lib/tntd-layout/HeaderNavs.js +20 -24
  517. package/lib/tntd-layout/HeaderTabs.js +27 -37
  518. package/lib/tntd-layout/Iconfont.js +3 -3
  519. package/lib/tntd-layout/Language.js +20 -24
  520. package/lib/tntd-layout/Layout.js +20 -24
  521. package/lib/tntd-layout/Logo.js +6 -9
  522. package/lib/tntd-layout/OrgAppList.js +20 -24
  523. package/lib/tntd-layout/SideMenu.js +20 -24
  524. package/lib/tntd-layout/Theme.js +20 -24
  525. package/lib/tntd-layout/createActions.js +3 -3
  526. package/lib/tntd-layout/images/index.js +3 -3
  527. package/lib/tntd-layout/index.js +3 -3
  528. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +20 -24
  529. package/lib/tntd-layout/paaslayout/Header.js +6 -9
  530. package/lib/tntd-layout/paaslayout/Logo.js +6 -9
  531. package/lib/tntd-layout/paaslayout/SideMenu.js +20 -24
  532. package/lib/tntd-layout/paaslayout/index.js +20 -24
  533. package/lib/tntd-layout/storage.js +3 -3
  534. package/lib/tntd-modal/index.js +24 -31
  535. package/lib/tntd-rc-select/_util/PurePanel.js +17 -18
  536. package/lib/tntd-rc-select/_util/context.js +3 -3
  537. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +3 -3
  538. package/lib/tntd-rc-select/_util/getIcons.js +3 -3
  539. package/lib/tntd-rc-select/_util/useCompactItemContext.js +10 -16
  540. package/lib/tntd-rc-select/index.js +10 -16
  541. package/lib/tntd-reference/AHref/index.js +3 -3
  542. package/lib/tntd-reference/ReferenceBatchCheck/index.js +3 -3
  543. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +17 -18
  544. package/lib/tntd-reference/ReferenceCheck/index.js +3 -3
  545. package/lib/tntd-reference/ReferenceDrawer/index.js +17 -18
  546. package/lib/tntd-reference/ReferenceInfo/index.js +3 -3
  547. package/lib/tntd-reference/index.js +3 -3
  548. package/lib/tntd-second-page/index.js +3 -3
  549. package/lib/tntd-select/DropDownWrap.js +34 -54
  550. package/lib/tntd-select/index.js +40 -57
  551. package/lib/tntd-select/index.less +7 -0
  552. package/lib/tntd-virtual-tree/index.js +23 -24
  553. package/lib/tntd-virtual-tree/utils.js +62 -66
  554. package/lib/tntd-virtual-tree-select/index.js +22 -23
  555. package/lib/tntd-virtual-tree-select/utils.js +20 -21
  556. package/lib/tooltip/tooltip.js +3 -3
  557. package/lib/upload/index.js +41 -45
  558. package/lib/upload/svg/UploadSVG.js +3 -3
  559. package/lib/utils/checkAuth.js +6 -6
  560. package/lib/utils/index.js +20 -21
  561. package/lib/utils/lang.js +3 -3
  562. package/lib/water-mark/index.js +17 -18
  563. package/package.json +2 -2
  564. package/es/array-input/utils.js +0 -414
  565. package/es/array-input/utils.js.map +0 -1
  566. package/lib/array-input/utils.d.ts +0 -2
  567. package/lib/array-input/utils.d.ts.map +0 -1
  568. package/lib/array-input/utils.js +0 -414
  569. package/lib/array-input/utils.js.map +0 -1
@@ -1,414 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(o) {
4
- "@babel/helpers - typeof";
5
-
6
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
- return typeof o;
8
- } : function (o) {
9
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
- }, _typeof(o);
11
- }
12
- Object.defineProperty(exports, "__esModule", {
13
- value: true
14
- });
15
- exports.validateRules = validateRules;
16
- var _isObject2 = _interopRequireDefault(require("lodash/isObject"));
17
- var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
18
- var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
19
- function _interopRequireDefault(obj) {
20
- return obj && obj.__esModule ? obj : {
21
- "default": obj
22
- };
23
- }
24
- function _regeneratorRuntime() {
25
- "use strict";
26
-
27
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
28
- _regeneratorRuntime = function _regeneratorRuntime() {
29
- return e;
30
- };
31
- var t,
32
- e = {},
33
- r = Object.prototype,
34
- n = r.hasOwnProperty,
35
- o = Object.defineProperty || function (t, e, r) {
36
- t[e] = r.value;
37
- },
38
- i = "function" == typeof Symbol ? Symbol : {},
39
- a = i.iterator || "@@iterator",
40
- c = i.asyncIterator || "@@asyncIterator",
41
- u = i.toStringTag || "@@toStringTag";
42
- function define(t, e, r) {
43
- return Object.defineProperty(t, e, {
44
- value: r,
45
- enumerable: !0,
46
- configurable: !0,
47
- writable: !0
48
- }), t[e];
49
- }
50
- try {
51
- define({}, "");
52
- } catch (t) {
53
- define = function define(t, e, r) {
54
- return t[e] = r;
55
- };
56
- }
57
- function wrap(t, e, r, n) {
58
- var i = e && e.prototype instanceof Generator ? e : Generator,
59
- a = Object.create(i.prototype),
60
- c = new Context(n || []);
61
- return o(a, "_invoke", {
62
- value: makeInvokeMethod(t, r, c)
63
- }), a;
64
- }
65
- function tryCatch(t, e, r) {
66
- try {
67
- return {
68
- type: "normal",
69
- arg: t.call(e, r)
70
- };
71
- } catch (t) {
72
- return {
73
- type: "throw",
74
- arg: t
75
- };
76
- }
77
- }
78
- e.wrap = wrap;
79
- var h = "suspendedStart",
80
- l = "suspendedYield",
81
- f = "executing",
82
- s = "completed",
83
- y = {};
84
- function Generator() {}
85
- function GeneratorFunction() {}
86
- function GeneratorFunctionPrototype() {}
87
- var p = {};
88
- define(p, a, function () {
89
- return this;
90
- });
91
- var d = Object.getPrototypeOf,
92
- v = d && d(d(values([])));
93
- v && v !== r && n.call(v, a) && (p = v);
94
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
95
- function defineIteratorMethods(t) {
96
- ["next", "throw", "return"].forEach(function (e) {
97
- define(t, e, function (t) {
98
- return this._invoke(e, t);
99
- });
100
- });
101
- }
102
- function AsyncIterator(t, e) {
103
- function invoke(r, o, i, a) {
104
- var c = tryCatch(t[r], t, o);
105
- if ("throw" !== c.type) {
106
- var u = c.arg,
107
- h = u.value;
108
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
109
- invoke("next", t, i, a);
110
- }, function (t) {
111
- invoke("throw", t, i, a);
112
- }) : e.resolve(h).then(function (t) {
113
- u.value = t, i(u);
114
- }, function (t) {
115
- return invoke("throw", t, i, a);
116
- });
117
- }
118
- a(c.arg);
119
- }
120
- var r;
121
- o(this, "_invoke", {
122
- value: function value(t, n) {
123
- function callInvokeWithMethodAndArg() {
124
- return new e(function (e, r) {
125
- invoke(t, n, e, r);
126
- });
127
- }
128
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
129
- }
130
- });
131
- }
132
- function makeInvokeMethod(e, r, n) {
133
- var o = h;
134
- return function (i, a) {
135
- if (o === f) throw Error("Generator is already running");
136
- if (o === s) {
137
- if ("throw" === i) throw a;
138
- return {
139
- value: t,
140
- done: !0
141
- };
142
- }
143
- for (n.method = i, n.arg = a;;) {
144
- var c = n.delegate;
145
- if (c) {
146
- var u = maybeInvokeDelegate(c, n);
147
- if (u) {
148
- if (u === y) continue;
149
- return u;
150
- }
151
- }
152
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
153
- if (o === h) throw o = s, n.arg;
154
- n.dispatchException(n.arg);
155
- } else "return" === n.method && n.abrupt("return", n.arg);
156
- o = f;
157
- var p = tryCatch(e, r, n);
158
- if ("normal" === p.type) {
159
- if (o = n.done ? s : l, p.arg === y) continue;
160
- return {
161
- value: p.arg,
162
- done: n.done
163
- };
164
- }
165
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
166
- }
167
- };
168
- }
169
- function maybeInvokeDelegate(e, r) {
170
- var n = r.method,
171
- o = e.iterator[n];
172
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
173
- var i = tryCatch(o, e.iterator, r.arg);
174
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
175
- var a = i.arg;
176
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
177
- }
178
- function pushTryEntry(t) {
179
- var e = {
180
- tryLoc: t[0]
181
- };
182
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
183
- }
184
- function resetTryEntry(t) {
185
- var e = t.completion || {};
186
- e.type = "normal", delete e.arg, t.completion = e;
187
- }
188
- function Context(t) {
189
- this.tryEntries = [{
190
- tryLoc: "root"
191
- }], t.forEach(pushTryEntry, this), this.reset(!0);
192
- }
193
- function values(e) {
194
- if (e || "" === e) {
195
- var r = e[a];
196
- if (r) return r.call(e);
197
- if ("function" == typeof e.next) return e;
198
- if (!isNaN(e.length)) {
199
- var o = -1,
200
- i = function next() {
201
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
202
- return next.value = t, next.done = !0, next;
203
- };
204
- return i.next = i;
205
- }
206
- }
207
- throw new TypeError(_typeof(e) + " is not iterable");
208
- }
209
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
210
- value: GeneratorFunctionPrototype,
211
- configurable: !0
212
- }), o(GeneratorFunctionPrototype, "constructor", {
213
- value: GeneratorFunction,
214
- configurable: !0
215
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
216
- var e = "function" == typeof t && t.constructor;
217
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
218
- }, e.mark = function (t) {
219
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
220
- }, e.awrap = function (t) {
221
- return {
222
- __await: t
223
- };
224
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
225
- return this;
226
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
227
- void 0 === i && (i = Promise);
228
- var a = new AsyncIterator(wrap(t, r, n, o), i);
229
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
230
- return t.done ? t.value : a.next();
231
- });
232
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
233
- return this;
234
- }), define(g, "toString", function () {
235
- return "[object Generator]";
236
- }), e.keys = function (t) {
237
- var e = Object(t),
238
- r = [];
239
- for (var n in e) r.push(n);
240
- return r.reverse(), function next() {
241
- for (; r.length;) {
242
- var t = r.pop();
243
- if (t in e) return next.value = t, next.done = !1, next;
244
- }
245
- return next.done = !0, next;
246
- };
247
- }, e.values = values, Context.prototype = {
248
- constructor: Context,
249
- reset: function reset(e) {
250
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
251
- },
252
- stop: function stop() {
253
- this.done = !0;
254
- var t = this.tryEntries[0].completion;
255
- if ("throw" === t.type) throw t.arg;
256
- return this.rval;
257
- },
258
- dispatchException: function dispatchException(e) {
259
- if (this.done) throw e;
260
- var r = this;
261
- function handle(n, o) {
262
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
263
- }
264
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
265
- var i = this.tryEntries[o],
266
- a = i.completion;
267
- if ("root" === i.tryLoc) return handle("end");
268
- if (i.tryLoc <= this.prev) {
269
- var c = n.call(i, "catchLoc"),
270
- u = n.call(i, "finallyLoc");
271
- if (c && u) {
272
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
273
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
274
- } else if (c) {
275
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
276
- } else {
277
- if (!u) throw Error("try statement without catch or finally");
278
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
279
- }
280
- }
281
- }
282
- },
283
- abrupt: function abrupt(t, e) {
284
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
285
- var o = this.tryEntries[r];
286
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
287
- var i = o;
288
- break;
289
- }
290
- }
291
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
292
- var a = i ? i.completion : {};
293
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
294
- },
295
- complete: function complete(t, e) {
296
- if ("throw" === t.type) throw t.arg;
297
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
298
- },
299
- finish: function finish(t) {
300
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
301
- var r = this.tryEntries[e];
302
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
303
- }
304
- },
305
- "catch": function _catch(t) {
306
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
307
- var r = this.tryEntries[e];
308
- if (r.tryLoc === t) {
309
- var n = r.completion;
310
- if ("throw" === n.type) {
311
- var o = n.arg;
312
- resetTryEntry(r);
313
- }
314
- return o;
315
- }
316
- }
317
- throw Error("illegal catch attempt");
318
- },
319
- delegateYield: function delegateYield(e, r, n) {
320
- return this.delegate = {
321
- iterator: values(e),
322
- resultName: r,
323
- nextLoc: n
324
- }, "next" === this.method && (this.arg = t), y;
325
- }
326
- }, e;
327
- }
328
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
329
- try {
330
- var info = gen[key](arg);
331
- var value = info.value;
332
- } catch (error) {
333
- reject(error);
334
- return;
335
- }
336
- if (info.done) {
337
- resolve(value);
338
- } else {
339
- Promise.resolve(value).then(_next, _throw);
340
- }
341
- }
342
- function _asyncToGenerator(fn) {
343
- return function () {
344
- var self = this,
345
- args = arguments;
346
- return new Promise(function (resolve, reject) {
347
- var gen = fn.apply(self, args);
348
- function _next(value) {
349
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
350
- }
351
- function _throw(err) {
352
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
353
- }
354
- _next(undefined);
355
- });
356
- };
357
- }
358
- function validateRules(rules, value) {
359
- return new Promise( /*#__PURE__*/function () {
360
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
361
- var i, rule, meg;
362
- return _regeneratorRuntime().wrap(function _callee$(_context) {
363
- while (1) switch (_context.prev = _context.next) {
364
- case 0:
365
- i = 0;
366
- case 1:
367
- if (!(i < rules.length)) {
368
- _context.next = 17;
369
- break;
370
- }
371
- rule = rules[i];
372
- if (!((0, _isObject2["default"])(rule) && rule.required)) {
373
- _context.next = 8;
374
- break;
375
- }
376
- if (!((0, _isNil2["default"])(value) || value === '')) {
377
- _context.next = 6;
378
- break;
379
- }
380
- return _context.abrupt("return", resolve(rule.message));
381
- case 6:
382
- _context.next = 14;
383
- break;
384
- case 8:
385
- if (!(0, _isFunction2["default"])(rule)) {
386
- _context.next = 14;
387
- break;
388
- }
389
- _context.next = 11;
390
- return rule(value);
391
- case 11:
392
- meg = _context.sent;
393
- if (!meg) {
394
- _context.next = 14;
395
- break;
396
- }
397
- return _context.abrupt("return", resolve(meg));
398
- case 14:
399
- i++;
400
- _context.next = 1;
401
- break;
402
- case 17:
403
- resolve(false);
404
- case 18:
405
- case "end":
406
- return _context.stop();
407
- }
408
- }, _callee);
409
- }));
410
- return function (_x) {
411
- return _ref.apply(this, arguments);
412
- };
413
- }());
414
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/array-input/utils.js"],"names":[],"mappings":";;;AAAA,mCAAoD;AAEpD,SAAgB,aAAa,CAAC,KAAK,EAAE,KAAK;IACxC,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YACrB,IAAI,IAAA,iBAAQ,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACnC,IAAI,IAAA,cAAK,EAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;oBAChC,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;iBAC7B;aACF;iBAAM,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC,EAAE;gBAC3B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,CAAA;gBAC7B,IAAI,GAAG,EAAE;oBACP,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;iBACpB;aACF;SACF;QACD,OAAO,CAAC,KAAK,CAAC,CAAA;IAChB,CAAC,CAAC,CAAA;AACJ,CAAC;AAjBD,sCAiBC","sourcesContent":["import { isFunction, isNil, isObject } from 'lodash'\n\nexport function validateRules(rules, value) {\n return new Promise(async (resolve) => {\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i]\n if (isObject(rule) && rule.required) {\n if (isNil(value) || value === '') {\n return resolve(rule.message)\n }\n } else if (isFunction(rule)) {\n const meg = await rule(value)\n if (meg) {\n return resolve(meg)\n }\n }\n }\n resolve(false)\n })\n}\n"]}