tntd 2.8.22 → 2.8.24

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 (408) hide show
  1. package/CHANGELOG.json +1034 -0
  2. package/CHANGELOG.md +605 -0
  3. package/es/alert/alert.js +71 -0
  4. package/es/alert/alert.js.map +1 -0
  5. package/es/alert/alert.less +128 -0
  6. package/es/cascader/cascader.js +30 -0
  7. package/es/cascader/cascader.js.map +1 -0
  8. package/es/cascader/cascader.less +16 -0
  9. package/es/checkbox/check.png +0 -0
  10. package/es/checkbox/checkbox.js +48 -0
  11. package/es/checkbox/checkbox.js.map +1 -0
  12. package/es/checkbox/checkbox.less +69 -0
  13. package/es/date-picker/DatePicker.js +101 -0
  14. package/es/date-picker/DatePicker.js.map +1 -0
  15. package/es/date-picker/index.less +294 -0
  16. package/es/input-number/inputNumber.js +34 -0
  17. package/es/input-number/inputNumber.js.map +1 -0
  18. package/es/input-number/inputNumber.less +12 -0
  19. package/es/modal/index.less +36 -0
  20. package/es/popconfirm/index.less +32 -0
  21. package/es/popconfirm/popconfirm.js +43 -0
  22. package/es/popconfirm/popconfirm.js.map +1 -0
  23. package/es/popover/index.less +57 -0
  24. package/es/popover/popover.js +34 -0
  25. package/es/popover/popover.js.map +1 -0
  26. package/es/progress/progress.js +132 -0
  27. package/es/progress/progress.js.map +1 -0
  28. package/es/progress/progress.less +82 -0
  29. package/es/query-form/Field/Composition/FieldPopover.js +304 -0
  30. package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
  31. package/es/query-form/Field/Composition/Select.js +122 -0
  32. package/es/query-form/Field/Composition/Select.js.map +1 -0
  33. package/es/query-form/Field/Composition/ValueTag.js +124 -0
  34. package/es/query-form/Field/Composition/ValueTag.js.map +1 -0
  35. package/es/query-form/Field/Composition/index.js +233 -0
  36. package/es/query-form/Field/Composition/index.js.map +1 -0
  37. package/es/query-form/Field/Composition/utils.js +154 -0
  38. package/es/query-form/Field/Composition/utils.js.map +1 -0
  39. package/es/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  40. package/es/query-form-backup/Field/Composition/index.less +114 -0
  41. package/es/query-form-backup/index.less +90 -0
  42. package/es/radio/radio.js +57 -0
  43. package/es/radio/radio.js.map +1 -0
  44. package/es/radio/radio.less +43 -0
  45. package/es/scroll-bar/Bar.js +56 -0
  46. package/es/scroll-bar/Bar.js.map +1 -0
  47. package/es/scroll-bar/Context.js +6 -0
  48. package/es/scroll-bar/Context.js.map +1 -0
  49. package/es/scroll-bar/ScrollBar.js +86 -0
  50. package/es/scroll-bar/ScrollBar.js.map +1 -0
  51. package/es/scroll-bar/Thumb.js +105 -0
  52. package/es/scroll-bar/Thumb.js.map +1 -0
  53. package/es/scroll-bar/index.js +3 -0
  54. package/es/scroll-bar/index.js.map +1 -0
  55. package/es/scroll-bar/util.js +31 -0
  56. package/es/scroll-bar/util.js.map +1 -0
  57. package/es/spin/spin.js +36 -0
  58. package/es/spin/spin.js.map +1 -0
  59. package/es/spin/spin.less +9 -0
  60. package/es/steps/assets/background_left.svg +12 -0
  61. package/es/steps/assets/background_right.svg +12 -0
  62. package/es/steps/assets/horizontal_line.svg +3 -0
  63. package/es/steps/assets/vertical_line.svg +3 -0
  64. package/es/steps/stepStyle/icon.less +51 -0
  65. package/es/steps/stepStyle/progress-dot.less +10 -0
  66. package/es/steps/stepStyle/variables.less +8 -0
  67. package/es/steps/stepStyle/vertical.less +41 -0
  68. package/es/switch/index.less +45 -0
  69. package/es/table/resizableTable/index.less +1 -1
  70. package/es/tabs/tabs.less +125 -0
  71. package/es/time-picker/TimePicker.js +36 -0
  72. package/es/time-picker/TimePicker.js.map +1 -0
  73. package/es/time-picker/index.less +38 -0
  74. package/es/tntd-action/Action.js +117 -0
  75. package/es/tntd-action/Action.js.map +1 -0
  76. package/es/tntd-action/index.less +61 -0
  77. package/es/tntd-rc-select/style/index.less +27 -19
  78. package/es/tntd-select/index.less +7 -0
  79. package/es/tntd-virtual-tree/index.js +21 -14
  80. package/es/tntd-virtual-tree/index.js.map +1 -1
  81. package/es/tntd-virtual-tree/index.less +10 -7
  82. package/es/tntd-virtual-tree-select/index.js +2 -2
  83. package/es/tntd-virtual-tree-select/index.js.map +1 -1
  84. package/es/tntd-virtual-tree-select/index.less +0 -17
  85. package/es/tntd-virtual-tree-select/utils.js +2 -2
  86. package/es/tntd-virtual-tree-select/utils.js.map +1 -1
  87. package/es/upload/index.js +26 -30
  88. package/es/upload/index.js.map +1 -1
  89. package/es/upload/upload.less +5 -12
  90. package/lib/_util/context.js +1 -1
  91. package/lib/_util/defaultRenderEmpty.js +1 -1
  92. package/lib/_util/hooks/useFlexGapSupport.js +4 -4
  93. package/lib/_util/hooks/useForceUpdate.js +4 -4
  94. package/lib/_util/responsiveObserve.js +1 -1
  95. package/lib/_util/styleChecker.js +1 -1
  96. package/lib/actions/index.js +1 -1
  97. package/lib/alert/alert.d.ts +12 -0
  98. package/lib/alert/alert.d.ts.map +1 -0
  99. package/lib/alert/alert.js +93 -0
  100. package/lib/alert/alert.js.map +1 -0
  101. package/lib/alert/alert.less +128 -0
  102. package/lib/array-input/index.js +9 -9
  103. package/lib/cascader/cascader.d.ts +10 -0
  104. package/lib/cascader/cascader.d.ts.map +1 -0
  105. package/lib/cascader/cascader.js +49 -0
  106. package/lib/cascader/cascader.js.map +1 -0
  107. package/lib/cascader/cascader.less +16 -0
  108. package/lib/check-card/group.js +8 -8
  109. package/lib/check-card/index.js +6 -6
  110. package/lib/checkbox/check.png +0 -0
  111. package/lib/checkbox/checkbox-group.js +1 -1
  112. package/lib/checkbox/checkbox.d.ts +16 -0
  113. package/lib/checkbox/checkbox.d.ts.map +1 -0
  114. package/lib/checkbox/checkbox.js +65 -0
  115. package/lib/checkbox/checkbox.js.map +1 -0
  116. package/lib/checkbox/checkbox.less +69 -0
  117. package/lib/color-picker/ColorPicker.js +6 -6
  118. package/lib/color-picker/index.js +1 -1
  119. package/lib/columns/index.js +1 -1
  120. package/lib/config-provider/config-provider.js +1 -1
  121. package/lib/date-picker/DatePicker.d.ts +21 -0
  122. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  123. package/lib/date-picker/DatePicker.js +128 -0
  124. package/lib/date-picker/DatePicker.js.map +1 -0
  125. package/lib/date-picker/index.less +294 -0
  126. package/lib/descriptions/descriptions.js +5 -5
  127. package/lib/development-login/LoginModal.js +6 -6
  128. package/lib/development-login/index.js +4 -4
  129. package/lib/drawer/drawer.js +2 -2
  130. package/lib/ellipsis/Svg/CopySVG.js +1 -1
  131. package/lib/ellipsis/Svg/TickSVG.js +1 -1
  132. package/lib/ellipsis/index.js +5 -5
  133. package/lib/empty/empty.js +2 -2
  134. package/lib/empty/empty.stories.js +2 -2
  135. package/lib/exception/exception.js +1 -1
  136. package/lib/form/form.js +2 -2
  137. package/lib/grid-v4/col.js +2 -2
  138. package/lib/grid-v4/hooks/useBreakpoint.js +1 -1
  139. package/lib/grid-v4/index.js +1 -1
  140. package/lib/grid-v4/row.js +6 -6
  141. package/lib/handle/index.js +1 -1
  142. package/lib/handle-icon/index.js +11 -11
  143. package/lib/icon/IconFont.js +1 -1
  144. package/lib/icon/components/Icon.js +9 -9
  145. package/lib/icon/components/index.js +1 -1
  146. package/lib/icon/components/utils.js +3 -3
  147. package/lib/icon/index.js +7 -7
  148. package/lib/icon/twoTonePrimaryColor.js +1 -1
  149. package/lib/icon/utils.js +1 -1
  150. package/lib/img/Contain.js +1 -1
  151. package/lib/img/Cover.js +5 -5
  152. package/lib/img/index.js +5 -5
  153. package/lib/index.js +1 -1
  154. package/lib/input/input.js +2 -2
  155. package/lib/input-number/index.js +1 -1
  156. package/lib/input-number/inputNumber.d.ts +10 -0
  157. package/lib/input-number/inputNumber.d.ts.map +1 -0
  158. package/lib/input-number/inputNumber.js +54 -0
  159. package/lib/input-number/inputNumber.js.map +1 -0
  160. package/lib/input-number/inputNumber.less +12 -0
  161. package/lib/label/index.js +2 -2
  162. package/lib/loading-button/index.js +5 -5
  163. package/lib/locale/default.js +1 -1
  164. package/lib/locale/en_US.js +1 -1
  165. package/lib/locale/zh_CN.js +1 -1
  166. package/lib/modal/index.less +36 -0
  167. package/lib/modal/modal.js +1 -1
  168. package/lib/notification/assets/index.js +1 -1
  169. package/lib/notification/index.js +1 -1
  170. package/lib/notification/notification.js +1 -1
  171. package/lib/page/Box.js +1 -1
  172. package/lib/page/index.js +7 -7
  173. package/lib/page-container/index.js +1 -1
  174. package/lib/page-loading/index.js +1 -1
  175. package/lib/popconfirm/index.less +32 -0
  176. package/lib/popconfirm/popconfirm.d.ts +8 -0
  177. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  178. package/lib/popconfirm/popconfirm.js +61 -0
  179. package/lib/popconfirm/popconfirm.js.map +1 -0
  180. package/lib/popover/index.less +57 -0
  181. package/lib/popover/popover.d.ts +14 -0
  182. package/lib/popover/popover.d.ts.map +1 -0
  183. package/lib/popover/popover.js +55 -0
  184. package/lib/popover/popover.js.map +1 -0
  185. package/lib/preview-text/index.js +7 -7
  186. package/lib/progress/progress.d.ts +12 -0
  187. package/lib/progress/progress.d.ts.map +1 -0
  188. package/lib/progress/progress.js +148 -0
  189. package/lib/progress/progress.js.map +1 -0
  190. package/lib/progress/progress.less +82 -0
  191. package/lib/query-form/Field/Checkbox.js +1 -1
  192. package/lib/query-form/Field/Composition/FieldPopover.d.ts +19 -0
  193. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
  194. package/lib/query-form/Field/Composition/FieldPopover.js +338 -0
  195. package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
  196. package/lib/query-form/Field/Composition/Select.d.ts +4 -0
  197. package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
  198. package/lib/query-form/Field/Composition/Select.js +146 -0
  199. package/lib/query-form/Field/Composition/Select.js.map +1 -0
  200. package/lib/query-form/Field/Composition/ValueTag.d.ts +12 -0
  201. package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -0
  202. package/lib/query-form/Field/Composition/ValueTag.js +153 -0
  203. package/lib/query-form/Field/Composition/ValueTag.js.map +1 -0
  204. package/lib/query-form/Field/Composition/index.d.ts +12 -0
  205. package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
  206. package/lib/query-form/Field/Composition/index.js +277 -0
  207. package/lib/query-form/Field/Composition/index.js.map +1 -0
  208. package/lib/query-form/Field/Composition/utils.d.ts +22 -0
  209. package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
  210. package/lib/query-form/Field/Composition/utils.js +168 -0
  211. package/lib/query-form/Field/Composition/utils.js.map +1 -0
  212. package/lib/query-form/Field/Select.js +6 -6
  213. package/lib/query-form/Field/SelectInput.js +6 -6
  214. package/lib/query-form/Field/fieldsMap.js +1 -1
  215. package/lib/query-form/Field/index.js +10 -10
  216. package/lib/query-form/createActions.js +1 -1
  217. package/lib/query-form/index.js +10 -10
  218. package/lib/query-form/useForm.js +1 -1
  219. package/lib/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  220. package/lib/query-form-backup/Field/Composition/index.less +114 -0
  221. package/lib/query-form-backup/index.less +90 -0
  222. package/lib/query-list-scene/List.js +13 -13
  223. package/lib/query-list-scene/QueryForm.js +10 -10
  224. package/lib/query-list-scene/QueryListScene.js +10 -10
  225. package/lib/query-list-scene/Title.js +1 -1
  226. package/lib/query-list-scene/Toolbar.js +2 -2
  227. package/lib/query-list-scene/createActions.js +1 -1
  228. package/lib/query-list-scene/index.js +1 -1
  229. package/lib/query-list-scene/useActions.js +1 -1
  230. package/lib/radio/index.js +1 -1
  231. package/lib/radio/radio-group.js +1 -1
  232. package/lib/radio/radio.d.ts +17 -0
  233. package/lib/radio/radio.d.ts.map +1 -0
  234. package/lib/radio/radio.js +75 -0
  235. package/lib/radio/radio.js.map +1 -0
  236. package/lib/radio/radio.less +43 -0
  237. package/lib/render-empty/render-empty.js +1 -1
  238. package/lib/scroll-bar/Bar.d.ts +4 -0
  239. package/lib/scroll-bar/Bar.d.ts.map +1 -0
  240. package/lib/scroll-bar/Bar.js +91 -0
  241. package/lib/scroll-bar/Bar.js.map +1 -0
  242. package/lib/scroll-bar/Context.d.ts +7 -0
  243. package/lib/scroll-bar/Context.d.ts.map +1 -0
  244. package/lib/scroll-bar/Context.js +13 -0
  245. package/lib/scroll-bar/Context.js.map +1 -0
  246. package/lib/scroll-bar/ScrollBar.d.ts +4 -0
  247. package/lib/scroll-bar/ScrollBar.d.ts.map +1 -0
  248. package/lib/scroll-bar/ScrollBar.js +97 -0
  249. package/lib/scroll-bar/ScrollBar.js.map +1 -0
  250. package/lib/scroll-bar/Thumb.d.ts +3 -0
  251. package/lib/scroll-bar/Thumb.d.ts.map +1 -0
  252. package/lib/scroll-bar/Thumb.js +125 -0
  253. package/lib/scroll-bar/Thumb.js.map +1 -0
  254. package/lib/scroll-bar/index.d.ts +3 -0
  255. package/lib/scroll-bar/index.d.ts.map +1 -0
  256. package/lib/scroll-bar/index.js +10 -0
  257. package/lib/scroll-bar/index.js.map +1 -0
  258. package/lib/scroll-bar/util.d.ts +40 -0
  259. package/lib/scroll-bar/util.d.ts.map +1 -0
  260. package/lib/scroll-bar/util.js +39 -0
  261. package/lib/scroll-bar/util.js.map +1 -0
  262. package/lib/segmented/index.js +2 -2
  263. package/lib/select/select.js +2 -2
  264. package/lib/spin/spin.d.ts +9 -0
  265. package/lib/spin/spin.d.ts.map +1 -0
  266. package/lib/spin/spin.js +44 -0
  267. package/lib/spin/spin.js.map +1 -0
  268. package/lib/spin/spin.less +9 -0
  269. package/lib/steps/assets/background_left.svg +12 -0
  270. package/lib/steps/assets/background_right.svg +12 -0
  271. package/lib/steps/assets/horizontal_line.svg +3 -0
  272. package/lib/steps/assets/vertical_line.svg +3 -0
  273. package/lib/steps/stepStyle/icon.less +51 -0
  274. package/lib/steps/stepStyle/progress-dot.less +10 -0
  275. package/lib/steps/stepStyle/variables.less +8 -0
  276. package/lib/steps/stepStyle/vertical.less +41 -0
  277. package/lib/steps/steps.js +2 -2
  278. package/lib/svg-components/index.js +1 -1
  279. package/lib/switch/index.less +45 -0
  280. package/lib/switch/switch.js +1 -1
  281. package/lib/table/hooks/use-column-setting.js +4 -4
  282. package/lib/table/hooks/use-expand-fixed.js +6 -6
  283. package/lib/table/resizableTable/index.js +6 -6
  284. package/lib/table/resizableTable/index.less +1 -1
  285. package/lib/table/table-hoc.js +1 -1
  286. package/lib/table/table.js +9 -9
  287. package/lib/table/table.stories.js +2 -2
  288. package/lib/table/total-shower.js +1 -1
  289. package/lib/table/utils.js +1 -1
  290. package/lib/table-container/index.js +1 -1
  291. package/lib/tabs/tabs.less +125 -0
  292. package/lib/tabs-container/index.js +1 -1
  293. package/lib/tag/tag.js +2 -2
  294. package/lib/time-picker/TimePicker.d.ts +9 -0
  295. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  296. package/lib/time-picker/TimePicker.js +55 -0
  297. package/lib/time-picker/TimePicker.js.map +1 -0
  298. package/lib/time-picker/index.less +38 -0
  299. package/lib/title/index.js +1 -1
  300. package/lib/tntd-action/Action.d.ts +6 -0
  301. package/lib/tntd-action/Action.d.ts.map +1 -0
  302. package/lib/tntd-action/Action.js +141 -0
  303. package/lib/tntd-action/Action.js.map +1 -0
  304. package/lib/tntd-action/index.less +61 -0
  305. package/lib/tntd-cascader/AntdCascader/component/context.js +1 -1
  306. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  307. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  308. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  309. package/lib/tntd-cascader/AntdCascader/config/utils.js +2 -2
  310. package/lib/tntd-cascader/AntdCascader/index.js +7 -7
  311. package/lib/tntd-cascader/index.js +1 -1
  312. package/lib/tntd-cascader/rc-cascader/Cascader.js +8 -8
  313. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  314. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
  315. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
  316. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  317. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  318. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  319. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  320. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  321. package/lib/tntd-cascader/rc-cascader/index.js +1 -1
  322. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  323. package/lib/tntd-form/ErrorList.js +7 -7
  324. package/lib/tntd-form/Form.js +6 -6
  325. package/lib/tntd-form/FormItem/ItemHolder.js +6 -6
  326. package/lib/tntd-form/FormItem/index.js +8 -8
  327. package/lib/tntd-form/FormItemInput.js +1 -1
  328. package/lib/tntd-form/FormItemLabel.js +2 -2
  329. package/lib/tntd-form/FormList.js +1 -1
  330. package/lib/tntd-form/context.js +1 -1
  331. package/lib/tntd-form/hooks/useDebounce.js +4 -4
  332. package/lib/tntd-form/hooks/useForm.js +5 -5
  333. package/lib/tntd-form/hooks/useFormItemStatus.js +1 -1
  334. package/lib/tntd-form/hooks/useFrameState.js +5 -5
  335. package/lib/tntd-form/index.js +1 -1
  336. package/lib/tntd-icon/index.js +1 -1
  337. package/lib/tntd-layout/AppList.js +6 -6
  338. package/lib/tntd-layout/Application.js +6 -6
  339. package/lib/tntd-layout/Avatar.js +2 -2
  340. package/lib/tntd-layout/CompatibleLanguage.js +6 -6
  341. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  342. package/lib/tntd-layout/EnterpriseLayout/Language.js +6 -6
  343. package/lib/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  344. package/lib/tntd-layout/EnterpriseLayout/index.js +1 -1
  345. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  346. package/lib/tntd-layout/GlobalNavigation/index.js +9 -9
  347. package/lib/tntd-layout/Header.js +2 -2
  348. package/lib/tntd-layout/HeaderActions.js +2 -2
  349. package/lib/tntd-layout/HeaderNavs.js +6 -6
  350. package/lib/tntd-layout/HeaderTabs.js +7 -7
  351. package/lib/tntd-layout/Iconfont.js +1 -1
  352. package/lib/tntd-layout/Language.js +6 -6
  353. package/lib/tntd-layout/Layout.js +6 -6
  354. package/lib/tntd-layout/Logo.js +2 -2
  355. package/lib/tntd-layout/OrgAppList.js +6 -6
  356. package/lib/tntd-layout/SideMenu.js +6 -6
  357. package/lib/tntd-layout/Theme.js +6 -6
  358. package/lib/tntd-layout/createActions.js +1 -1
  359. package/lib/tntd-layout/images/index.js +1 -1
  360. package/lib/tntd-layout/index.js +1 -1
  361. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  362. package/lib/tntd-layout/paaslayout/Header.js +2 -2
  363. package/lib/tntd-layout/paaslayout/Logo.js +2 -2
  364. package/lib/tntd-layout/paaslayout/SideMenu.js +6 -6
  365. package/lib/tntd-layout/paaslayout/index.js +6 -6
  366. package/lib/tntd-layout/storage.js +1 -1
  367. package/lib/tntd-modal/index.js +6 -6
  368. package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
  369. package/lib/tntd-rc-select/_util/context.js +1 -1
  370. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  371. package/lib/tntd-rc-select/_util/getIcons.js +1 -1
  372. package/lib/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  373. package/lib/tntd-rc-select/index.js +2 -2
  374. package/lib/tntd-rc-select/style/index.less +27 -19
  375. package/lib/tntd-reference/AHref/index.js +1 -1
  376. package/lib/tntd-reference/ReferenceBatchCheck/index.js +1 -1
  377. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
  378. package/lib/tntd-reference/ReferenceCheck/index.js +1 -1
  379. package/lib/tntd-reference/ReferenceDrawer/index.js +5 -5
  380. package/lib/tntd-reference/ReferenceInfo/index.js +1 -1
  381. package/lib/tntd-reference/index.js +1 -1
  382. package/lib/tntd-second-page/index.js +1 -1
  383. package/lib/tntd-select/DropDownWrap.js +8 -8
  384. package/lib/tntd-select/index.js +10 -9
  385. package/lib/tntd-select/index.less +7 -0
  386. package/lib/tntd-virtual-tree/index.d.ts +1 -1
  387. package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
  388. package/lib/tntd-virtual-tree/index.js +31 -22
  389. package/lib/tntd-virtual-tree/index.js.map +1 -1
  390. package/lib/tntd-virtual-tree/index.less +10 -7
  391. package/lib/tntd-virtual-tree/utils.js +28 -28
  392. package/lib/tntd-virtual-tree-select/index.d.ts +1 -1
  393. package/lib/tntd-virtual-tree-select/index.js +12 -13
  394. package/lib/tntd-virtual-tree-select/index.js.map +1 -1
  395. package/lib/tntd-virtual-tree-select/index.less +0 -17
  396. package/lib/tntd-virtual-tree-select/utils.js +11 -11
  397. package/lib/tntd-virtual-tree-select/utils.js.map +1 -1
  398. package/lib/tooltip/tooltip.js +1 -1
  399. package/lib/upload/index.d.ts.map +1 -1
  400. package/lib/upload/index.js +32 -35
  401. package/lib/upload/index.js.map +1 -1
  402. package/lib/upload/svg/UploadSVG.js +1 -1
  403. package/lib/upload/upload.less +5 -12
  404. package/lib/utils/checkAuth.js +4 -4
  405. package/lib/utils/index.js +9 -9
  406. package/lib/utils/lang.js +1 -1
  407. package/lib/water-mark/index.js +5 -5
  408. package/package.json +2 -2
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {};
7
+ exports["default"] = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _configProvider = require("antd/lib/config-provider");
10
+ var _progress = _interopRequireDefault(require("antd/lib/progress"));
11
+ var _classnames = _interopRequireDefault(require("classnames"));
12
+ var _ellipsis = _interopRequireDefault(require("../ellipsis"));
13
+ var _icon = _interopRequireDefault(require("../icon"));
14
+ require("./progress.less");
15
+ var _tooltip = require("antd/lib/tooltip");
16
+ Object.keys(_tooltip).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
+ if (key in exports && exports[key] === _tooltip[key]) return;
20
+ Object.defineProperty(exports, key, {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _tooltip[key];
24
+ }
25
+ });
26
+ });
27
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
28
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
29
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
30
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
31
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
+ var iconMap = {
33
+ line: {
34
+ success: 'check-circle',
35
+ exception: 'close-circle'
36
+ },
37
+ circle: {
38
+ success: 'check',
39
+ exception: 'close'
40
+ }
41
+ };
42
+ var ifPercentBottom = function ifPercentBottom(type, percentPosition) {
43
+ return type === 'line' && percentPosition === 'bottom';
44
+ };
45
+ var percentTransform = function percentTransform(percent) {
46
+ return percent >= 100 ? 100 : percent <= 0 ? 0 : percent;
47
+ };
48
+ var themeStrokeColor = function themeStrokeColor(status, strokeColor, percent) {
49
+ return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100 ? 'var(--blue-5)' : '';
50
+ };
51
+ var Progress = function Progress(props) {
52
+ var className = props.className,
53
+ _props$type = props.type,
54
+ type = _props$type === void 0 ? 'line' : _props$type,
55
+ _props$percentPositio = props.percentPosition,
56
+ percentPosition = _props$percentPositio === void 0 ? 'right' : _props$percentPositio,
57
+ _props$percent = props.percent,
58
+ percent = _props$percent === void 0 ? 0 : _props$percent,
59
+ format = props.format,
60
+ size = props.size,
61
+ label = props.label,
62
+ _props$width = props.width,
63
+ width = _props$width === void 0 ? 132 : _props$width,
64
+ status = props.status,
65
+ halfCircle = props.halfCircle,
66
+ _props$gapDegree = props.gapDegree,
67
+ gapDegree = _props$gapDegree === void 0 ? props.halfCircle ? 135 : props.gapDegree : _props$gapDegree,
68
+ strokeColor = props.strokeColor,
69
+ _props$strokeWidth = props.strokeWidth,
70
+ strokeWidth = _props$strokeWidth === void 0 ? 7 : _props$strokeWidth;
71
+ var _percent = percentTransform(percent);
72
+ var _strokeColor = themeStrokeColor(status, strokeColor, _percent);
73
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
74
+ var getPrefixCls = _ref.getPrefixCls;
75
+ var prefixCls = getPrefixCls('progress');
76
+ var CusLabelOrPercent = function CusLabelOrPercent(props) {
77
+ var type = props.type,
78
+ theme = props.theme;
79
+ var labelPercentClassName = (0, _classnames["default"])("".concat(prefixCls, "-percent-bottom"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-percent-bottom-").concat(size), size === 'small'), "".concat(prefixCls, "-percent-bottom-").concat(type), type === 'line'));
80
+ var showIcon = function showIcon(status) {
81
+ return _react["default"].createElement(_icon["default"], {
82
+ type: "".concat(iconMap[type][status]),
83
+ theme: theme,
84
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(labelPercentClassName, " ").concat(labelPercentClassName, "-").concat(status || 'success'), type === 'line'))
85
+ });
86
+ };
87
+ var showPercent = _react["default"].createElement("div", {
88
+ className: labelPercentClassName
89
+ }, format ? format === null || format === void 0 ? void 0 : format(_percent) : _percent + '%');
90
+ var displayContent;
91
+ if (status === 'success' || status === 'exception') {
92
+ displayContent = showIcon(status);
93
+ } else if (status === 'normal' || status === 'active') {
94
+ displayContent = showPercent;
95
+ } else {
96
+ // 如果状态为空
97
+ displayContent = _percent === 100 ? showIcon('success') : showPercent;
98
+ }
99
+ return displayContent;
100
+ };
101
+ var CusCircleAndDashboardFormat = function CusCircleAndDashboardFormat(props) {
102
+ var widthNum = props.widthNum;
103
+ return _react["default"].createElement("div", {
104
+ className: "".concat(prefixCls, "-cus-format")
105
+ }, !!label && _react["default"].createElement(_ellipsis["default"], {
106
+ className: "".concat(prefixCls, "-cus-format-label"),
107
+ title: label,
108
+ widthLimit: widthNum <= 64 ? widthNum : 'calc(100% - 50px)',
109
+ placement: widthNum <= 64 ? 'bottom' : 'top'
110
+ }), _react["default"].createElement(CusLabelOrPercent, {
111
+ type: "circle",
112
+ theme: "outlined"
113
+ }));
114
+ };
115
+ //line
116
+ var LineProgress = function LineProgress() {
117
+ return _react["default"].createElement(_progress["default"], Object.assign({
118
+ strokeColor: _strokeColor
119
+ }, props, {
120
+ className: (0, _classnames["default"])('tnt-progress', className, _defineProperty({}, "".concat(prefixCls, "-percent-bottom"), percentPosition === 'bottom'))
121
+ }));
122
+ };
123
+ //circle,dashboard (额外新增label和半圆选项)
124
+ var CircleAndDashboardProgress = function CircleAndDashboardProgress() {
125
+ var widthNum = Number(String(width).split('px').shift());
126
+ return _react["default"].createElement(_progress["default"], Object.assign({
127
+ gapDegree: gapDegree,
128
+ strokeColor: _strokeColor,
129
+ strokeWidth: strokeWidth
130
+ }, props, {
131
+ type: halfCircle ? 'dashboard' : type,
132
+ className: (0, _classnames["default"])('tnt-progress', "".concat(prefixCls, "-circle-progress"), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-small-circle"), widthNum <= 64 && label), "".concat(prefixCls, "-large-circle"), widthNum > 64 && label), "".concat(prefixCls, "-small-half-circle"), halfCircle && widthNum <= 64 && label), "".concat(prefixCls, "-large-half-circle"), halfCircle && widthNum > 64 && label)),
133
+ format: function format() {
134
+ return _react["default"].createElement(CusCircleAndDashboardFormat, {
135
+ widthNum: widthNum
136
+ });
137
+ }
138
+ }));
139
+ };
140
+ var progressMap = {
141
+ line: _react["default"].createElement(LineProgress, null),
142
+ circle: _react["default"].createElement(CircleAndDashboardProgress, null),
143
+ dashboard: _react["default"].createElement(CircleAndDashboardProgress, null)
144
+ };
145
+ return progressMap[type];
146
+ });
147
+ };
148
+ var _default = exports["default"] = Progress;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAGzB,6DAAwD;AACxD,gEAA2C;AAC3C,4DAAmC;AACnC,2DAAkC;AAClC,mDAA0B;AAC1B,2BAAwB;AACxB,kDAA+B;AAO/B,MAAM,OAAO,GAAG;IACd,IAAI,EAAE;QACJ,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,cAAc;KAC1B;IACD,MAAM,EAAE;QACN,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,OAAO;KACnB;CACF,CAAA;AACD,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,eAAuB,EAAE,EAAE;IAChE,OAAO,IAAI,KAAK,MAAM,IAAI,eAAe,KAAK,QAAQ,CAAA;AACxD,CAAC,CAAA;AACD,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;IAC3C,OAAO,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;AAC1D,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,MAAe,EAAE,WAA6B,EAAE,OAAgB,EAAE,EAAE;IAC5F,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,WAAW,IAAI,CAAC,WAAW,IAAI,OAAO,KAAK,GAAG;QACtF,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,EAAE,CA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,CAAC,CAAA;QAED,MAAM,WAAW,GAAG;YAClB,IAAI,EAAE,8BAAC,YAAY,OAAG;YACtB,MAAM,EAAE,8BAAC,0BAA0B,OAAG;YACtC,SAAS,EAAE,8BAAC,0BAA0B,OAAG;SAC1C,CAAA;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,CAAA;IAC1B,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,QAAQ,CAAA","sourcesContent":["import React from 'react'\nimport type { ProgressProps } from 'antd/lib/progress'\nimport type { ThemeType } from 'antd/lib/icon'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdProgress from 'antd/lib/progress'\nimport classNames from 'classnames'\nimport Ellipsis from '../ellipsis'\nimport Icon from '../icon'\nimport './progress.less'\nexport * from 'antd/lib/tooltip'\n\ninterface ExtendsProgress {\n percentPosition?: 'bottom' | 'right'\n label?: React.ReactNode\n halfCircle?: boolean\n}\nconst iconMap = {\n line: {\n success: 'check-circle',\n exception: 'close-circle',\n },\n circle: {\n success: 'check',\n exception: 'close',\n },\n}\nconst ifPercentBottom = (type: string, percentPosition: string) => {\n return type === 'line' && percentPosition === 'bottom'\n}\nconst percentTransform = (percent: number) => {\n return percent >= 100 ? 100 : percent <= 0 ? 0 : percent\n}\n\nconst themeStrokeColor = (status?: string, strokeColor?: string | object, percent?: number) => {\n return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100\n ? 'var(--blue-5)'\n : ''\n}\n\nconst Progress: React.FC<ProgressProps & ExtendsProgress> = (props) => {\n const {\n className,\n type = 'line',\n percentPosition = 'right',\n percent = 0,\n format,\n size,\n label,\n width = 132,\n status,\n halfCircle,\n gapDegree = props.halfCircle ? 135 : props.gapDegree,\n strokeColor,\n strokeWidth = 7,\n } = props\n const _percent = percentTransform(percent)\n const _strokeColor = themeStrokeColor(status, strokeColor, _percent)\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('progress')\n\n const CusLabelOrPercent = (props: { type: 'line' | 'circle'; theme?: ThemeType }) => {\n const { type, theme } = props\n const labelPercentClassName = classNames(`${prefixCls}-percent-bottom`, {\n [`${prefixCls}-percent-bottom-${size}`]: size === 'small',\n [`${prefixCls}-percent-bottom-${type}`]: type === 'line',\n })\n\n const showIcon = (status: 'success' | 'exception') => (\n <Icon\n type={`${iconMap[type][status]}`}\n theme={theme}\n className={classNames({\n [`${labelPercentClassName} ${labelPercentClassName}-${status || 'success'}`]:\n type === 'line',\n })}\n />\n )\n const showPercent = (\n <div className={labelPercentClassName}>\n {format ? format?.(_percent) : _percent + '%'}\n </div>\n )\n\n let displayContent\n if (status === 'success' || status === 'exception') {\n displayContent = showIcon(status)\n } else if (status === 'normal' || status === 'active') {\n displayContent = showPercent\n } else {\n // 如果状态为空\n displayContent = _percent === 100 ? showIcon('success') : showPercent\n }\n return displayContent\n }\n\n const CusCircleAndDashboardFormat = (props: { widthNum: number }) => {\n const { widthNum } = props\n return (\n <div className={`${prefixCls}-cus-format`}>\n {!!label && (\n <Ellipsis\n className={`${prefixCls}-cus-format-label`}\n title={label}\n widthLimit={widthNum <= 64 ? widthNum : 'calc(100% - 50px)'}\n placement={widthNum <= 64 ? 'bottom' : 'top'}\n />\n )}\n <CusLabelOrPercent type=\"circle\" theme=\"outlined\" />\n </div>\n )\n }\n\n //line\n const LineProgress: React.FC = () => (\n <AntdProgress\n strokeColor={_strokeColor}\n {...props}\n className={classNames('tnt-progress', className, {\n [`${prefixCls}-percent-bottom`]: percentPosition === 'bottom',\n })}\n />\n )\n\n //circle,dashboard (额外新增label和半圆选项)\n const CircleAndDashboardProgress: React.FC = () => {\n const widthNum = Number(String(width).split('px').shift())\n return (\n <AntdProgress\n gapDegree={gapDegree}\n strokeColor={_strokeColor}\n strokeWidth={strokeWidth}\n {...props}\n type={halfCircle ? 'dashboard' : type}\n className={classNames('tnt-progress', `${prefixCls}-circle-progress`, className, {\n [`${prefixCls}-small-circle`]: widthNum <= 64 && label,\n [`${prefixCls}-large-circle`]: widthNum > 64 && label,\n [`${prefixCls}-small-half-circle`]: halfCircle && widthNum <= 64 && label,\n [`${prefixCls}-large-half-circle`]: halfCircle && widthNum > 64 && label,\n })}\n format={() => <CusCircleAndDashboardFormat widthNum={widthNum} />}\n />\n )\n }\n\n const progressMap = {\n line: <LineProgress />,\n circle: <CircleAndDashboardProgress />,\n dashboard: <CircleAndDashboardProgress />,\n }\n return progressMap[type]\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Progress\n"]}
@@ -0,0 +1,82 @@
1
+ @import '../style/themes/index.less';
2
+ @import '../style/mixins/index';
3
+ @progress-prefix-cls: ~'@{ant-prefix}-progress';
4
+ .tnt-progress.@{progress-prefix-cls} {
5
+ .ant-progress-text{
6
+ // font-family: PingFang SC;
7
+ font-weight: 500;
8
+ }
9
+ .ant-progress-cus-format-label{
10
+ .ant-progress-cus-format-label{
11
+ padding-bottom: 4px;
12
+ }
13
+ }
14
+ &-percent-bottom{
15
+ .ant-progress-outer{
16
+ padding-right: 0;
17
+ }
18
+ .ant-progress-text{
19
+ width: 100%;
20
+ display: block;
21
+ text-align: right;
22
+ margin-left: 0;
23
+ }
24
+ }
25
+ &-circle-progress{
26
+ .@{progress-prefix-cls}-cus-format{
27
+ height: 100%;
28
+ display: flex;
29
+ flex-direction: column;
30
+ justify-content: center;
31
+ align-items: center;
32
+ }
33
+ }
34
+ &-small-circle{
35
+ .ant-progress-text{
36
+ height: 100%;
37
+ }
38
+ .ant-progress-inner{
39
+ overflow:visible;
40
+ }
41
+ .tntd-ellipsis{
42
+ position: absolute;
43
+ bottom: -1.8em;
44
+ font-size: 0.75em;
45
+ // margin-bottom: 2px;
46
+ // color: #8B919E;
47
+ color:tint(@text-color, 50%);
48
+ font-family: Inter;
49
+ font-weight: 500;
50
+ text-align: center;
51
+ }
52
+ }
53
+ &-large-circle{
54
+ .ant-progress-text{
55
+ height: 100%;
56
+ }
57
+ .tntd-ellipsis{
58
+ font-size: 0.55em;
59
+ // margin-bottom: 2px;
60
+ color:tint(@text-color, 50%);
61
+ font-family: Inter;
62
+ font-weight: 500;
63
+ text-align: center;
64
+ }
65
+ }
66
+ &-small-half-circle{
67
+ .ant-progress-text{
68
+ height: 40%;
69
+ }
70
+ .tntd-ellipsis{
71
+ bottom: -1.5em;
72
+ }
73
+ }
74
+ &-large-half-circle{
75
+ .ant-progress-inner{
76
+ .ant-progress-text{
77
+ top: 42%
78
+ }
79
+ }
80
+ }
81
+ }
82
+
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _checkbox = _interopRequireDefault(require("../../checkbox"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  var __rest = void 0 && (void 0).__rest || function (s, e) {
11
11
  var t = {};
12
12
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -0,0 +1,19 @@
1
+ declare var _default: React.ForwardRefExoticComponent<Pick<{
2
+ [x: string]: any;
3
+ visible: any;
4
+ setVisible: any;
5
+ searchText: any;
6
+ children: any;
7
+ value: any;
8
+ regex: any;
9
+ fieldItems: any;
10
+ propItem: any;
11
+ setFieldItem: any;
12
+ onChange: any;
13
+ form: any;
14
+ locale: any;
15
+ clsPrefix: any;
16
+ }, string | number> & React.RefAttributes<any>>;
17
+ export default _default;
18
+ import React from "react";
19
+ //# sourceMappingURL=FieldPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldPopover.d.ts","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/FieldPopover.js"],"names":[],"mappings":""}
@@ -0,0 +1,338 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _find2 = _interopRequireDefault(require("lodash/find"));
9
+ var _filter2 = _interopRequireDefault(require("lodash/filter"));
10
+ var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _empty = require("../../../empty");
13
+ var _popover = _interopRequireDefault(require("../../../popover"));
14
+ var _ellipsis = _interopRequireDefault(require("../../../ellipsis"));
15
+ var _Select = _interopRequireDefault(require("./Select"));
16
+ var _utils = require("./utils");
17
+ var _fieldsMap = _interopRequireDefault(require("../fieldsMap"));
18
+ require("./FieldPopover.less");
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
23
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
24
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
25
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
26
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
27
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
28
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
29
+ var t = {};
30
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
31
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
32
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ var FieldPopover = function FieldPopover(_a, ref) {
37
+ var visible = _a.visible,
38
+ setVisible = _a.setVisible,
39
+ searchText = _a.searchText,
40
+ children = _a.children,
41
+ value = _a.value,
42
+ regex = _a.regex,
43
+ fieldItems = _a.fieldItems,
44
+ propItem = _a.propItem,
45
+ setFieldItem = _a.setFieldItem,
46
+ onChange = _a.onChange,
47
+ form = _a.form,
48
+ locale = _a.locale,
49
+ clsPrefix = _a.clsPrefix,
50
+ props = __rest(_a, ["visible", "setVisible", "searchText", "children", "value", "regex", "fieldItems", "propItem", "setFieldItem", "onChange", "form", "locale", "clsPrefix"]);
51
+ var _useState = (0, _react.useState)(undefined),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ searchTarget = _useState2[0],
54
+ setSearchTarget = _useState2[1];
55
+ var _useState3 = (0, _react.useState)(false),
56
+ _useState4 = _slicedToArray(_useState3, 2),
57
+ popoverContent = _useState4[0],
58
+ setPopoverContent = _useState4[1];
59
+ var onPropsClick = function onPropsClick(props) {
60
+ var _ref = props || {},
61
+ _ref$type = _ref.type,
62
+ type = _ref$type === void 0 ? 'input' : _ref$type,
63
+ component = _ref.component;
64
+ var copyValue = (0, _cloneDeep2["default"])(value);
65
+ if (!(copyValue === null || copyValue === void 0 ? void 0 : copyValue.find(function (v) {
66
+ return v.key === props.name;
67
+ }))) {
68
+ copyValue.push({
69
+ key: props.name,
70
+ value: type === 'array' ? [] : undefined,
71
+ closable: true
72
+ });
73
+ }
74
+ setFieldItem(props);
75
+ if ((0, _utils.isInput)(type) && !component) {
76
+ var target = copyValue.find(function (v) {
77
+ return v.key === props.name;
78
+ });
79
+ onChange(target, true);
80
+ close();
81
+ return;
82
+ }
83
+ setVisible(true);
84
+ setPopoverContent(true);
85
+ onChange(copyValue);
86
+ };
87
+ (0, _react.useImperativeHandle)(ref, function () {
88
+ return {
89
+ onPropsClick: onPropsClick
90
+ };
91
+ });
92
+ var onSelectChange = function onSelectChange(v, isMultiple) {
93
+ var _a, _b, _c, _d;
94
+ var propObj = (v === null || v === void 0 ? void 0 : v.propItem) || propItem || {};
95
+ var fieldProps = propObj.props; // 直接搜索拿v.xx的值
96
+ var copyValue = (0, _cloneDeep2["default"])(value || []);
97
+ var index;
98
+ if (v === null || v === void 0 ? void 0 : v.propItem) {
99
+ // 模糊搜索
100
+ var _index = copyValue.findIndex(function (vv) {
101
+ var _a;
102
+ return vv.key === ((_a = v.propItem) === null || _a === void 0 ? void 0 : _a.name);
103
+ });
104
+ if (_index > -1) {
105
+ index = _index;
106
+ } else {
107
+ copyValue.push({
108
+ key: (_a = v.propItem) === null || _a === void 0 ? void 0 : _a.name,
109
+ value: isMultiple ? [] : ''
110
+ });
111
+ index = copyValue.length - 1;
112
+ }
113
+ setFieldItem(v.propItem);
114
+ } else {
115
+ // 选择值
116
+ index = copyValue.findIndex(function (v) {
117
+ return v.key === (propItem === null || propItem === void 0 ? void 0 : propItem.name);
118
+ });
119
+ }
120
+ if (isMultiple) {
121
+ if (!((_c = (_b = copyValue[index]) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length)) {
122
+ copyValue[index].value = [v === null || v === void 0 ? void 0 : v.value];
123
+ } else {
124
+ if (((_d = copyValue[index].value) === null || _d === void 0 ? void 0 : _d.indexOf(v.value)) > -1) {
125
+ copyValue[index].value = copyValue[index].value.filter(function (val) {
126
+ return val !== v.value;
127
+ });
128
+ } else {
129
+ copyValue[index].value.push(v.value);
130
+ }
131
+ }
132
+ // 如果是模糊搜索-展开多选项
133
+ if (v === null || v === void 0 ? void 0 : v.propItem) {
134
+ setFieldItem(v === null || v === void 0 ? void 0 : v.propItem);
135
+ setVisible(true);
136
+ setPopoverContent(true);
137
+ }
138
+ } else {
139
+ copyValue[index].value = v === null || v === void 0 ? void 0 : v.value;
140
+ close();
141
+ }
142
+ copyValue[index].closable = true;
143
+ onChange(copyValue, false, true);
144
+ (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) && fieldProps.onChange(copyValue[index].value);
145
+ };
146
+ var onFieldChange = function onFieldChange() {
147
+ var _a;
148
+ var _ref2 = propItem || {},
149
+ type = _ref2.type,
150
+ component = _ref2.component,
151
+ fieldProps = _ref2.props;
152
+ var copyValue = (0, _cloneDeep2["default"])(value);
153
+ var index = copyValue.findIndex(function (v) {
154
+ return v.key === (propItem === null || propItem === void 0 ? void 0 : propItem.name);
155
+ });
156
+ copyValue[index].value = arguments.length <= 0 ? undefined : arguments[0];
157
+ if (['date', 'checkbox'].includes(type) || type === 'dateRange' && ((_a = arguments.length <= 1 ? undefined : arguments[1]) === null || _a === void 0 ? void 0 : _a[1])) {
158
+ close();
159
+ }
160
+ copyValue[index].closable = true;
161
+ onChange(copyValue, false, (arguments.length <= 0 ? undefined : arguments[0]) !== undefined, type !== 'selectInput');
162
+ (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) && fieldProps.onChange(copyValue[index].value);
163
+ };
164
+ var close = function close() {
165
+ setVisible(false);
166
+ setTimeout(function () {
167
+ setFieldItem();
168
+ setPopoverContent(false);
169
+ }, 1);
170
+ };
171
+ var handleVisibleChange = function handleVisibleChange() {
172
+ if (!visible && !regex.test(searchText)) {
173
+ setVisible(true);
174
+ } else {
175
+ close();
176
+ }
177
+ };
178
+ (0, _react.useEffect)(function () {
179
+ var bool1 = false,
180
+ bool2 = false;
181
+ if (searchText && !propItem) {
182
+ fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.forEach(function (v) {
183
+ var _ref3 = v.props || {},
184
+ name = _ref3.name,
185
+ propsTitle = _ref3.propsTitle,
186
+ title = _ref3.title,
187
+ type = _ref3.type,
188
+ props = _ref3.props;
189
+ var _propsTitle = propsTitle || title || name;
190
+ if ((_propsTitle === null || _propsTitle === void 0 ? void 0 : _propsTitle.indexOf(searchText)) > -1) {
191
+ bool1 = true;
192
+ }
193
+ var sOptions = type !== 'select' ? [] : (props === null || props === void 0 ? void 0 : props.options) || [];
194
+ var fieldNames = props === null || props === void 0 ? void 0 : props.fieldNames;
195
+ var target = sOptions === null || sOptions === void 0 ? void 0 : sOptions.find(function (item) {
196
+ var labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
197
+ var label = item instanceof Object ? item[labelKey] : item + '';
198
+ return (_react["default"].isValidElement(label) ? (0, _utils.formatLabel)(label) : label).indexOf(searchText) > -1;
199
+ });
200
+ if (target) {
201
+ bool2 = true;
202
+ }
203
+ });
204
+ setSearchTarget(!bool2 && !bool1 ? null : {
205
+ propsTitle: bool1,
206
+ propsValue: bool2
207
+ });
208
+ } else {
209
+ setSearchTarget(undefined);
210
+ }
211
+ }, [fieldItems, searchText, propItem]);
212
+ var renderFirstOptions = function renderFirstOptions() {
213
+ var firstItems = searchText ? (0, _filter2["default"])(fieldItems, function (v) {
214
+ var _ref4 = v.props || {},
215
+ name = _ref4.name,
216
+ propsTitle = _ref4.propsTitle,
217
+ title = _ref4.title;
218
+ var _propsTitle = propsTitle || title || name;
219
+ return (_propsTitle === null || _propsTitle === void 0 ? void 0 : _propsTitle.indexOf(searchText)) > -1;
220
+ }) : fieldItems;
221
+ var secondItems = searchText ? (0, _filter2["default"])(fieldItems, function (v) {
222
+ var _ref5 = v.props || {},
223
+ type = _ref5.type,
224
+ props = _ref5.props;
225
+ var _ref6 = props || {},
226
+ options = _ref6.options,
227
+ loadData = _ref6.loadData,
228
+ fieldNames = _ref6.fieldNames;
229
+ return type === 'select' && !loadData && !!(0, _find2["default"])(options, function (item) {
230
+ var labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
231
+ var label = item instanceof Object ? item[labelKey] : item + '';
232
+ var isReactDom = _react["default"].isValidElement(label);
233
+ var _label = isReactDom ? (0, _utils.formatLabel)(label) : label;
234
+ return (_label === null || _label === void 0 ? void 0 : _label.indexOf(searchText)) > -1;
235
+ });
236
+ }) : [];
237
+ return _react["default"].createElement("div", null, firstItems.length > 0 && _react["default"].createElement(_react["default"].Fragment, null, (!searchText || (searchTarget === null || searchTarget === void 0 ? void 0 : searchTarget.propsTitle)) && _react["default"].createElement("label", null, locale.propTitle), _react["default"].createElement("ul", {
238
+ className: "ant-select-dropdown-menu"
239
+ }, firstItems.map(function (v) {
240
+ var _ref7 = v.props || {},
241
+ name = _ref7.name,
242
+ propsTitle = _ref7.propsTitle,
243
+ title = _ref7.title,
244
+ type = _ref7.type,
245
+ props = _ref7.props;
246
+ var _propsTitle = propsTitle || title || name;
247
+ return _react["default"].createElement("li", {
248
+ className: "ant-select-dropdown-menu-item",
249
+ key: name,
250
+ value: name,
251
+ onMouseDown: function onMouseDown(e) {
252
+ return e.preventDefault();
253
+ },
254
+ onClick: function onClick() {
255
+ onPropsClick(v.props);
256
+ }
257
+ }, _react["default"].createElement(_ellipsis["default"], {
258
+ widthLimit: 220,
259
+ title: searchText ? _react["default"].createElement("span", {
260
+ dangerouslySetInnerHTML: {
261
+ __html: (0, _utils.highlightSubstring)(_propsTitle, searchText)
262
+ }
263
+ }) : _propsTitle
264
+ }));
265
+ }))), secondItems.length > 0 && _react["default"].createElement("div", null, (searchTarget === null || searchTarget === void 0 ? void 0 : searchTarget.propsValue) && _react["default"].createElement("label", null, locale.propValue), fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.map(function (v) {
266
+ var _ref8 = v.props || {},
267
+ name = _ref8.name,
268
+ type = _ref8.type,
269
+ props = _ref8.props;
270
+ var target = value === null || value === void 0 ? void 0 : value.find(function (v) {
271
+ return v.key === name;
272
+ });
273
+ if (type === 'select') {
274
+ return _react["default"].createElement(_Select["default"], Object.assign({
275
+ key: name
276
+ }, props, {
277
+ searchText: searchText,
278
+ propItem: v.props,
279
+ onChange: onSelectChange,
280
+ value: target === null || target === void 0 ? void 0 : target.value
281
+ }));
282
+ }
283
+ return;
284
+ })), !firstItems.length && !secondItems.length && _react["default"].createElement(_empty.Empty, {
285
+ size: "mini"
286
+ }));
287
+ };
288
+ var renderSecondOptions = function renderSecondOptions() {
289
+ var _a;
290
+ var _ref9 = propItem || {},
291
+ name = _ref9.name,
292
+ propsTitle = _ref9.propsTitle,
293
+ title = _ref9.title,
294
+ type = _ref9.type,
295
+ className = _ref9.className,
296
+ component = _ref9.component,
297
+ fieldProps = _ref9.props;
298
+ var target = value === null || value === void 0 ? void 0 : value.find(function (v) {
299
+ return v.key === name;
300
+ });
301
+ var Field = component || _fieldsMap["default"][type] || function () {
302
+ return null;
303
+ };
304
+ return _react["default"].createElement("div", {
305
+ onClick: function onClick(e) {
306
+ return e.stopPropagation();
307
+ },
308
+ className: className
309
+ }, _react["default"].createElement("label", null, propsTitle || title || name), type === 'select' ? _react["default"].createElement(_Select["default"], Object.assign({}, fieldProps, {
310
+ searchText: searchText,
311
+ propItem: propItem,
312
+ onChange: onSelectChange,
313
+ value: target === null || target === void 0 ? void 0 : target.value
314
+ })) : _react["default"].createElement("div", {
315
+ className: "".concat(clsPrefix, "-field-popover-content"),
316
+ onClick: function onClick(e) {
317
+ return e.stopPropagation();
318
+ }
319
+ }, _react["default"].createElement(Field, Object.assign({
320
+ form: form,
321
+ value: target === null || target === void 0 ? void 0 : target.value
322
+ }, fieldProps, {
323
+ style: Object.assign(Object.assign({}, fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style), {
324
+ width: ((_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style) === null || _a === void 0 ? void 0 : _a.width) || '250px'
325
+ }),
326
+ close: close,
327
+ onChange: onFieldChange
328
+ }))));
329
+ };
330
+ return _react["default"].createElement(_popover["default"], Object.assign({
331
+ trigger: "click",
332
+ visible: visible,
333
+ overlayClassName: "".concat(clsPrefix, "-field-popover"),
334
+ content: !popoverContent ? renderFirstOptions() : renderSecondOptions(),
335
+ onVisibleChange: handleVisibleChange
336
+ }, props), children);
337
+ };
338
+ var _default = exports["default"] = (0, _react.forwardRef)(FieldPopover);