tntd 2.8.30 → 2.8.33

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 (595) 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/responsiveObserve.js +1 -1
  6. package/es/_util/styleChecker.js +1 -1
  7. package/es/actions/index.js +1 -1
  8. package/es/array-input/index.js +9 -9
  9. package/es/check-card/group.js +8 -8
  10. package/es/check-card/index.js +6 -6
  11. package/es/checkbox/checkbox-group.js +1 -1
  12. package/es/color-picker/ColorPicker.js +6 -6
  13. package/es/color-picker/index.js +1 -1
  14. package/es/columns/index.js +1 -1
  15. package/es/config-provider/config-provider.js +1 -1
  16. package/es/descriptions/descriptions.js +5 -5
  17. package/es/descriptions/descriptions.less +2 -2
  18. package/es/development-login/LoginModal.js +6 -6
  19. package/es/development-login/index.js +4 -4
  20. package/es/drawer/drawer.js +2 -2
  21. package/es/ellipsis/Svg/CopySVG.js +1 -1
  22. package/es/ellipsis/Svg/TickSVG.js +1 -1
  23. package/es/ellipsis/index.js +5 -5
  24. package/es/empty/empty.js +2 -2
  25. package/es/empty/empty.stories.js +2 -2
  26. package/es/exception/exception.js +1 -1
  27. package/es/form/form.js +2 -2
  28. package/es/grid-v4/col.js +2 -2
  29. package/es/grid-v4/hooks/useBreakpoint.js +1 -1
  30. package/es/grid-v4/index.js +1 -1
  31. package/es/grid-v4/row.js +6 -6
  32. package/es/handle/index.js +1 -1
  33. package/es/handle-icon/index.js +11 -11
  34. package/es/handle-icon/index.less +6 -0
  35. package/es/icon/IconFont.js +1 -1
  36. package/es/icon/components/Icon.js +9 -9
  37. package/es/icon/components/index.js +1 -1
  38. package/es/icon/components/utils.js +3 -3
  39. package/es/icon/index.js +7 -7
  40. package/es/icon/twoTonePrimaryColor.js +1 -1
  41. package/es/icon/utils.js +1 -1
  42. package/es/img/Contain.js +1 -1
  43. package/es/img/Cover.js +5 -5
  44. package/es/img/index.js +5 -5
  45. package/es/index.js +1 -1
  46. package/es/input/input.js +2 -2
  47. package/es/input-number/index.js +1 -1
  48. package/es/label/index.js +2 -2
  49. package/es/loading-button/index.js +5 -5
  50. package/es/locale/default.js +1 -1
  51. package/es/locale/en_US.js +1 -1
  52. package/es/locale/zh_CN.js +1 -1
  53. package/es/modal/modal.js +1 -1
  54. package/es/notification/assets/index.js +1 -1
  55. package/es/notification/index.js +1 -1
  56. package/es/notification/notification.js +1 -1
  57. package/es/page/Box.js +1 -1
  58. package/es/page/index.js +7 -7
  59. package/es/page-container/index.js +1 -1
  60. package/es/page-loading/index.js +1 -1
  61. package/es/preview-text/index.js +7 -7
  62. package/es/query-form/Field/Checkbox.js +1 -1
  63. package/es/query-form/Field/Select.js +6 -6
  64. package/es/query-form/Field/SelectInput.js +6 -6
  65. package/es/query-form/Field/fieldsMap.js +1 -1
  66. package/es/query-form/Field/index.js +10 -10
  67. package/es/query-form/createActions.js +1 -1
  68. package/es/query-form/index.js +10 -10
  69. package/es/query-form/useForm.js +1 -1
  70. package/es/query-list-scene/List.js +13 -13
  71. package/es/query-list-scene/QueryForm.js +10 -10
  72. package/es/query-list-scene/QueryListScene.js +10 -10
  73. package/es/query-list-scene/Title.js +1 -1
  74. package/es/query-list-scene/Toolbar.js +2 -2
  75. package/es/query-list-scene/createActions.js +1 -1
  76. package/es/query-list-scene/index.js +1 -1
  77. package/es/query-list-scene/useActions.js +1 -1
  78. package/es/radio/index.js +1 -1
  79. package/es/radio/radio-group.js +1 -1
  80. package/es/render-empty/render-empty.js +1 -1
  81. package/es/segmented/index.js +2 -2
  82. package/es/select/select.js +2 -2
  83. package/es/steps/steps.js +2 -2
  84. package/es/svg-components/index.js +1 -1
  85. package/es/switch/switch.js +1 -1
  86. package/es/table/hooks/use-column-setting.js +4 -4
  87. package/es/table/hooks/use-expand-fixed.js +6 -6
  88. package/es/table/resizableTable/index.js +6 -6
  89. package/es/table/table-hoc.js +1 -1
  90. package/es/table/table.js +9 -9
  91. package/es/table/table.stories.js +2 -2
  92. package/es/table/total-shower.js +1 -1
  93. package/es/table/utils.js +1 -1
  94. package/es/table-container/index.js +1 -1
  95. package/es/tabs-container/index.js +1 -1
  96. package/es/tag/tag.js +2 -2
  97. package/es/title/index.js +1 -1
  98. package/es/tntd-cascader/AntdCascader/component/context.js +1 -1
  99. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  100. package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  101. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  102. package/es/tntd-cascader/AntdCascader/config/utils.js +2 -2
  103. package/es/tntd-cascader/AntdCascader/index.js +7 -7
  104. package/es/tntd-cascader/index.js +1 -1
  105. package/es/tntd-cascader/rc-cascader/Cascader.js +13 -11
  106. package/es/tntd-cascader/rc-cascader/Cascader.js.map +1 -1
  107. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  108. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +28 -11
  109. package/es/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
  110. package/es/tntd-cascader/rc-cascader/OptionList/index.js +13 -11
  111. package/es/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
  112. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  113. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  114. package/es/tntd-cascader/rc-cascader/context.js +9 -0
  115. package/es/tntd-cascader/rc-cascader/context.js.map +1 -1
  116. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  117. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  118. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  119. package/es/tntd-cascader/rc-cascader/index.js +1 -1
  120. package/es/tntd-cascader/rc-cascader/index.less +19 -15
  121. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  122. package/es/tntd-form/ErrorList.js +7 -7
  123. package/es/tntd-form/Form.js +6 -6
  124. package/es/tntd-form/FormItem/ItemHolder.js +6 -6
  125. package/es/tntd-form/FormItem/index.js +8 -8
  126. package/es/tntd-form/FormItemInput.js +1 -1
  127. package/es/tntd-form/FormItemLabel.js +2 -2
  128. package/es/tntd-form/FormList.js +1 -1
  129. package/es/tntd-form/context.js +1 -1
  130. package/es/tntd-form/hooks/useDebounce.js +4 -4
  131. package/es/tntd-form/hooks/useForm.js +5 -5
  132. package/es/tntd-form/hooks/useFormItemStatus.js +1 -1
  133. package/es/tntd-form/hooks/useFrameState.js +5 -5
  134. package/es/tntd-form/index.js +1 -1
  135. package/es/tntd-icon/index.js +1 -1
  136. package/es/tntd-layout/AppList.js +6 -6
  137. package/es/tntd-layout/Application.js +6 -6
  138. package/es/tntd-layout/Avatar.js +2 -2
  139. package/es/tntd-layout/CompatibleLanguage.js +6 -6
  140. package/es/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  141. package/es/tntd-layout/EnterpriseLayout/Language.js +6 -6
  142. package/es/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  143. package/es/tntd-layout/EnterpriseLayout/index.js +1 -1
  144. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  145. package/es/tntd-layout/GlobalNavigation/index.js +9 -9
  146. package/es/tntd-layout/Header.js +2 -2
  147. package/es/tntd-layout/HeaderActions.js +2 -2
  148. package/es/tntd-layout/HeaderNavs.js +6 -6
  149. package/es/tntd-layout/HeaderTabs.js +7 -7
  150. package/es/tntd-layout/Iconfont.js +1 -1
  151. package/es/tntd-layout/Language.js +6 -6
  152. package/es/tntd-layout/Layout.js +6 -6
  153. package/es/tntd-layout/Logo.js +2 -2
  154. package/es/tntd-layout/OrgAppList.js +6 -6
  155. package/es/tntd-layout/SideMenu.js +6 -6
  156. package/es/tntd-layout/Theme.js +6 -6
  157. package/es/tntd-layout/createActions.js +1 -1
  158. package/es/tntd-layout/images/index.js +1 -1
  159. package/es/tntd-layout/index.js +1 -1
  160. package/es/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  161. package/es/tntd-layout/paaslayout/Header.js +2 -2
  162. package/es/tntd-layout/paaslayout/Logo.js +2 -2
  163. package/es/tntd-layout/paaslayout/SideMenu.js +6 -6
  164. package/es/tntd-layout/paaslayout/index.js +6 -6
  165. package/es/tntd-layout/storage.js +1 -1
  166. package/es/tntd-modal/index.js +6 -6
  167. package/es/tntd-rc-select/_util/PurePanel.js +5 -5
  168. package/es/tntd-rc-select/_util/context.js +1 -1
  169. package/es/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  170. package/es/tntd-rc-select/_util/getIcons.js +1 -1
  171. package/es/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  172. package/es/tntd-rc-select/index.js +2 -2
  173. package/es/tntd-reference/AHref/index.js +1 -1
  174. package/es/tntd-reference/ReferenceBatchCheck/index.js +1 -1
  175. package/es/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
  176. package/es/tntd-reference/ReferenceCheck/index.js +1 -1
  177. package/es/tntd-reference/ReferenceDrawer/index.js +5 -5
  178. package/es/tntd-reference/ReferenceInfo/index.js +1 -1
  179. package/es/tntd-reference/index.js +1 -1
  180. package/es/tntd-second-page/index.js +1 -1
  181. package/es/tntd-select/DropDownWrap.js +8 -8
  182. package/es/tntd-select/index.js +9 -10
  183. package/es/tntd-virtual-tree/index.js +8 -8
  184. package/es/tntd-virtual-tree/utils.js +28 -28
  185. package/es/tntd-virtual-tree-select/index.js +10 -10
  186. package/es/tntd-virtual-tree-select/utils.js +9 -9
  187. package/es/tooltip/tooltip.js +1 -1
  188. package/es/upload/index.js +6 -6
  189. package/es/upload/svg/UploadSVG.js +1 -1
  190. package/es/utils/checkAuth.js +4 -4
  191. package/es/utils/index.js +9 -9
  192. package/es/utils/lang.js +1 -1
  193. package/es/water-mark/index.js +5 -5
  194. package/lib/_util/context.js +3 -3
  195. package/lib/_util/defaultRenderEmpty.js +3 -3
  196. package/lib/_util/hooks/useFlexGapSupport.js +15 -14
  197. package/lib/_util/hooks/useForceUpdate.js +15 -14
  198. package/lib/_util/responsiveObserve.js +13 -7
  199. package/lib/_util/styleChecker.js +3 -3
  200. package/lib/actions/index.js +3 -3
  201. package/lib/array-input/index.js +37 -30
  202. package/lib/check-card/group.js +24 -23
  203. package/lib/check-card/index.js +31 -24
  204. package/lib/checkbox/checkbox-group.js +3 -3
  205. package/lib/color-picker/ColorPicker.js +31 -24
  206. package/lib/color-picker/index.js +3 -3
  207. package/lib/columns/index.js +3 -3
  208. package/lib/config-provider/config-provider.js +3 -3
  209. package/lib/descriptions/descriptions.js +19 -13
  210. package/lib/descriptions/descriptions.less +2 -2
  211. package/lib/development-login/LoginModal.js +31 -24
  212. package/lib/development-login/index.js +15 -14
  213. package/lib/drawer/drawer.js +16 -10
  214. package/lib/ellipsis/Svg/CopySVG.js +3 -3
  215. package/lib/ellipsis/Svg/TickSVG.js +3 -3
  216. package/lib/ellipsis/index.js +18 -17
  217. package/lib/empty/empty.js +16 -10
  218. package/lib/empty/empty.stories.js +9 -6
  219. package/lib/exception/exception.js +3 -3
  220. package/lib/form/form.js +16 -10
  221. package/lib/grid-v4/col.js +16 -10
  222. package/lib/grid-v4/hooks/useBreakpoint.js +3 -3
  223. package/lib/grid-v4/index.js +3 -3
  224. package/lib/grid-v4/row.js +31 -24
  225. package/lib/handle/index.js +3 -3
  226. package/lib/handle-icon/index.js +13 -13
  227. package/lib/handle-icon/index.less +6 -0
  228. package/lib/icon/IconFont.js +3 -3
  229. package/lib/icon/components/Icon.js +70 -44
  230. package/lib/icon/components/index.js +3 -3
  231. package/lib/icon/components/utils.js +18 -10
  232. package/lib/icon/index.js +33 -26
  233. package/lib/icon/twoTonePrimaryColor.js +3 -3
  234. package/lib/icon/utils.js +3 -3
  235. package/lib/img/Contain.js +3 -3
  236. package/lib/img/Cover.js +18 -17
  237. package/lib/img/index.js +18 -17
  238. package/lib/index.js +3 -3
  239. package/lib/input/input.js +16 -10
  240. package/lib/input-number/index.js +3 -3
  241. package/lib/label/index.js +16 -10
  242. package/lib/loading-button/index.js +18 -17
  243. package/lib/locale/default.js +3 -3
  244. package/lib/locale/en_US.js +3 -3
  245. package/lib/locale/zh_CN.js +3 -3
  246. package/lib/modal/modal.js +3 -3
  247. package/lib/notification/assets/index.js +3 -3
  248. package/lib/notification/index.js +3 -3
  249. package/lib/notification/notification.js +3 -3
  250. package/lib/page/Box.js +3 -3
  251. package/lib/page/index.js +33 -26
  252. package/lib/page-container/index.js +3 -3
  253. package/lib/page-loading/index.js +3 -3
  254. package/lib/preview-text/index.js +9 -9
  255. package/lib/query-form/Field/Checkbox.js +3 -3
  256. package/lib/query-form/Field/Select.js +31 -24
  257. package/lib/query-form/Field/SelectInput.js +31 -24
  258. package/lib/query-form/Field/fieldsMap.js +3 -3
  259. package/lib/query-form/Field/index.js +73 -47
  260. package/lib/query-form/createActions.js +3 -3
  261. package/lib/query-form/index.js +70 -44
  262. package/lib/query-form/useForm.js +3 -3
  263. package/lib/query-list-scene/List.js +61 -41
  264. package/lib/query-list-scene/QueryForm.js +70 -44
  265. package/lib/query-list-scene/QueryListScene.js +70 -44
  266. package/lib/query-list-scene/Title.js +3 -3
  267. package/lib/query-list-scene/Toolbar.js +16 -10
  268. package/lib/query-list-scene/createActions.js +3 -3
  269. package/lib/query-list-scene/index.js +3 -3
  270. package/lib/query-list-scene/useActions.js +3 -3
  271. package/lib/radio/index.js +3 -3
  272. package/lib/radio/radio-group.js +3 -3
  273. package/lib/render-empty/render-empty.js +3 -3
  274. package/lib/segmented/index.js +16 -10
  275. package/lib/select/select.js +16 -10
  276. package/lib/steps/steps.js +16 -10
  277. package/lib/svg-components/index.js +3 -3
  278. package/lib/switch/switch.js +3 -3
  279. package/lib/table/hooks/use-column-setting.js +15 -14
  280. package/lib/table/hooks/use-expand-fixed.js +36 -30
  281. package/lib/table/resizableTable/index.js +31 -24
  282. package/lib/table/table-hoc.js +3 -3
  283. package/lib/table/table.js +34 -27
  284. package/lib/table/table.stories.js +16 -10
  285. package/lib/table/total-shower.js +3 -3
  286. package/lib/table/utils.js +3 -3
  287. package/lib/table-container/index.js +3 -3
  288. package/lib/tabs-container/index.js +3 -3
  289. package/lib/tag/tag.js +16 -10
  290. package/lib/title/index.js +3 -3
  291. package/lib/tntd-cascader/AntdCascader/component/context.js +3 -3
  292. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +3 -3
  293. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
  294. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +16 -10
  295. package/lib/tntd-cascader/AntdCascader/config/utils.js +16 -10
  296. package/lib/tntd-cascader/AntdCascader/index.js +33 -26
  297. package/lib/tntd-cascader/index.js +3 -3
  298. package/lib/tntd-cascader/rc-cascader/Cascader.d.ts +1 -0
  299. package/lib/tntd-cascader/rc-cascader/Cascader.d.ts.map +1 -1
  300. package/lib/tntd-cascader/rc-cascader/Cascader.js +29 -26
  301. package/lib/tntd-cascader/rc-cascader/Cascader.js.map +1 -1
  302. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +16 -10
  303. package/lib/tntd-cascader/rc-cascader/OptionList/Column.d.ts +1 -1
  304. package/lib/tntd-cascader/rc-cascader/OptionList/Column.d.ts.map +1 -1
  305. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +54 -30
  306. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
  307. package/lib/tntd-cascader/rc-cascader/OptionList/index.d.ts.map +1 -1
  308. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +41 -32
  309. package/lib/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
  310. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +18 -17
  311. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +24 -23
  312. package/lib/tntd-cascader/rc-cascader/context.d.ts +1 -0
  313. package/lib/tntd-cascader/rc-cascader/context.d.ts.map +1 -1
  314. package/lib/tntd-cascader/rc-cascader/context.js +9 -0
  315. package/lib/tntd-cascader/rc-cascader/context.js.map +1 -1
  316. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +17 -16
  317. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
  318. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +30 -23
  319. package/lib/tntd-cascader/rc-cascader/index.js +3 -3
  320. package/lib/tntd-cascader/rc-cascader/index.less +19 -15
  321. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +6 -6
  322. package/lib/tntd-form/ErrorList.js +33 -26
  323. package/lib/tntd-form/Form.js +31 -24
  324. package/lib/tntd-form/FormItem/ItemHolder.js +31 -24
  325. package/lib/tntd-form/FormItem/index.js +24 -23
  326. package/lib/tntd-form/FormItemInput.js +3 -3
  327. package/lib/tntd-form/FormItemLabel.js +16 -10
  328. package/lib/tntd-form/FormList.js +3 -3
  329. package/lib/tntd-form/context.js +3 -3
  330. package/lib/tntd-form/hooks/useDebounce.js +15 -14
  331. package/lib/tntd-form/hooks/useForm.js +18 -17
  332. package/lib/tntd-form/hooks/useFormItemStatus.js +3 -3
  333. package/lib/tntd-form/hooks/useFrameState.js +18 -17
  334. package/lib/tntd-form/index.js +3 -3
  335. package/lib/tntd-icon/index.js +3 -3
  336. package/lib/tntd-layout/AppList.js +24 -20
  337. package/lib/tntd-layout/Application.js +24 -20
  338. package/lib/tntd-layout/Avatar.js +9 -6
  339. package/lib/tntd-layout/CompatibleLanguage.js +24 -20
  340. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +9 -6
  341. package/lib/tntd-layout/EnterpriseLayout/Language.js +24 -20
  342. package/lib/tntd-layout/EnterpriseLayout/Theme.js +24 -20
  343. package/lib/tntd-layout/EnterpriseLayout/index.js +3 -3
  344. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +24 -20
  345. package/lib/tntd-layout/GlobalNavigation/index.js +30 -26
  346. package/lib/tntd-layout/Header.js +9 -6
  347. package/lib/tntd-layout/HeaderActions.js +9 -6
  348. package/lib/tntd-layout/HeaderNavs.js +24 -20
  349. package/lib/tntd-layout/HeaderTabs.js +37 -27
  350. package/lib/tntd-layout/Iconfont.js +3 -3
  351. package/lib/tntd-layout/Language.js +24 -20
  352. package/lib/tntd-layout/Layout.js +24 -20
  353. package/lib/tntd-layout/Logo.js +9 -6
  354. package/lib/tntd-layout/OrgAppList.js +24 -20
  355. package/lib/tntd-layout/SideMenu.js +24 -20
  356. package/lib/tntd-layout/Theme.js +24 -20
  357. package/lib/tntd-layout/createActions.js +3 -3
  358. package/lib/tntd-layout/images/index.js +3 -3
  359. package/lib/tntd-layout/index.js +3 -3
  360. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +24 -20
  361. package/lib/tntd-layout/paaslayout/Header.js +9 -6
  362. package/lib/tntd-layout/paaslayout/Logo.js +9 -6
  363. package/lib/tntd-layout/paaslayout/SideMenu.js +24 -20
  364. package/lib/tntd-layout/paaslayout/index.js +24 -20
  365. package/lib/tntd-layout/storage.js +3 -3
  366. package/lib/tntd-modal/index.js +31 -24
  367. package/lib/tntd-rc-select/_util/PurePanel.js +18 -17
  368. package/lib/tntd-rc-select/_util/context.js +3 -3
  369. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +3 -3
  370. package/lib/tntd-rc-select/_util/getIcons.js +3 -3
  371. package/lib/tntd-rc-select/_util/useCompactItemContext.js +16 -10
  372. package/lib/tntd-rc-select/index.js +16 -10
  373. package/lib/tntd-reference/AHref/index.js +3 -3
  374. package/lib/tntd-reference/ReferenceBatchCheck/index.js +3 -3
  375. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +18 -17
  376. package/lib/tntd-reference/ReferenceCheck/index.js +3 -3
  377. package/lib/tntd-reference/ReferenceDrawer/index.js +18 -17
  378. package/lib/tntd-reference/ReferenceInfo/index.js +3 -3
  379. package/lib/tntd-reference/index.js +3 -3
  380. package/lib/tntd-second-page/index.js +3 -3
  381. package/lib/tntd-select/DropDownWrap.js +54 -34
  382. package/lib/tntd-select/index.js +57 -40
  383. package/lib/tntd-virtual-tree/index.js +24 -23
  384. package/lib/tntd-virtual-tree/utils.js +66 -62
  385. package/lib/tntd-virtual-tree-select/index.js +23 -22
  386. package/lib/tntd-virtual-tree-select/utils.js +21 -20
  387. package/lib/tooltip/tooltip.js +3 -3
  388. package/lib/upload/index.js +45 -41
  389. package/lib/upload/svg/UploadSVG.js +3 -3
  390. package/lib/utils/checkAuth.js +6 -6
  391. package/lib/utils/index.js +21 -20
  392. package/lib/utils/lang.js +3 -3
  393. package/lib/water-mark/index.js +18 -17
  394. package/package.json +1 -1
  395. package/CHANGELOG.json +0 -1034
  396. package/CHANGELOG.md +0 -605
  397. package/es/alert/alert.js +0 -93
  398. package/es/alert/alert.js.map +0 -1
  399. package/es/alert/alert.less +0 -128
  400. package/es/cascader/cascader.js +0 -49
  401. package/es/cascader/cascader.js.map +0 -1
  402. package/es/cascader/cascader.less +0 -16
  403. package/es/checkbox/check.png +0 -0
  404. package/es/checkbox/checkbox.js +0 -65
  405. package/es/checkbox/checkbox.js.map +0 -1
  406. package/es/checkbox/checkbox.less +0 -69
  407. package/es/date-picker/DatePicker.js +0 -128
  408. package/es/date-picker/DatePicker.js.map +0 -1
  409. package/es/date-picker/index.less +0 -294
  410. package/es/input-number/inputNumber.js +0 -54
  411. package/es/input-number/inputNumber.js.map +0 -1
  412. package/es/input-number/inputNumber.less +0 -12
  413. package/es/modal/index.less +0 -36
  414. package/es/popconfirm/index.less +0 -32
  415. package/es/popconfirm/popconfirm.js +0 -61
  416. package/es/popconfirm/popconfirm.js.map +0 -1
  417. package/es/popover/index.less +0 -57
  418. package/es/popover/popover.js +0 -55
  419. package/es/popover/popover.js.map +0 -1
  420. package/es/progress/progress.js +0 -148
  421. package/es/progress/progress.js.map +0 -1
  422. package/es/progress/progress.less +0 -82
  423. package/es/query-form/Field/Composition/FieldPopover.js +0 -341
  424. package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
  425. package/es/query-form/Field/Composition/FieldPopover.less +0 -35
  426. package/es/query-form/Field/Composition/Select.js +0 -146
  427. package/es/query-form/Field/Composition/Select.js.map +0 -1
  428. package/es/query-form/Field/Composition/ValueTag.js +0 -158
  429. package/es/query-form/Field/Composition/ValueTag.js.map +0 -1
  430. package/es/query-form/Field/Composition/index.js +0 -321
  431. package/es/query-form/Field/Composition/index.js.map +0 -1
  432. package/es/query-form/Field/Composition/index.less +0 -145
  433. package/es/query-form/Field/Composition/utils.js +0 -168
  434. package/es/query-form/Field/Composition/utils.js.map +0 -1
  435. package/es/query-form-v2/index.less +0 -133
  436. package/es/radio/radio.js +0 -75
  437. package/es/radio/radio.js.map +0 -1
  438. package/es/radio/radio.less +0 -43
  439. package/es/scroll-bar/Bar.js +0 -91
  440. package/es/scroll-bar/Bar.js.map +0 -1
  441. package/es/scroll-bar/Context.js +0 -13
  442. package/es/scroll-bar/Context.js.map +0 -1
  443. package/es/scroll-bar/ScrollBar.js +0 -97
  444. package/es/scroll-bar/ScrollBar.js.map +0 -1
  445. package/es/scroll-bar/Thumb.js +0 -125
  446. package/es/scroll-bar/Thumb.js.map +0 -1
  447. package/es/scroll-bar/index.js +0 -10
  448. package/es/scroll-bar/index.js.map +0 -1
  449. package/es/scroll-bar/scrollBar.less +0 -59
  450. package/es/scroll-bar/util.js +0 -39
  451. package/es/scroll-bar/util.js.map +0 -1
  452. package/es/spin/spin.js +0 -44
  453. package/es/spin/spin.js.map +0 -1
  454. package/es/spin/spin.less +0 -9
  455. package/es/steps/assets/background_left.svg +0 -12
  456. package/es/steps/assets/background_right.svg +0 -12
  457. package/es/steps/assets/horizontal_line.svg +0 -3
  458. package/es/steps/assets/vertical_line.svg +0 -3
  459. package/es/steps/stepStyle/icon.less +0 -51
  460. package/es/steps/stepStyle/progress-dot.less +0 -10
  461. package/es/steps/stepStyle/variables.less +0 -8
  462. package/es/steps/stepStyle/vertical.less +0 -41
  463. package/es/switch/index.less +0 -45
  464. package/es/tabs/tabs.less +0 -125
  465. package/es/time-picker/TimePicker.js +0 -55
  466. package/es/time-picker/TimePicker.js.map +0 -1
  467. package/es/time-picker/index.less +0 -38
  468. package/es/tntd-action/Action.js +0 -141
  469. package/es/tntd-action/Action.js.map +0 -1
  470. package/es/tntd-action/index.less +0 -61
  471. package/es/tntd-select/index.less +0 -7
  472. package/lib/alert/alert.d.ts +0 -12
  473. package/lib/alert/alert.d.ts.map +0 -1
  474. package/lib/alert/alert.js +0 -147
  475. package/lib/alert/alert.js.map +0 -1
  476. package/lib/alert/alert.less +0 -128
  477. package/lib/cascader/cascader.d.ts +0 -10
  478. package/lib/cascader/cascader.d.ts.map +0 -1
  479. package/lib/cascader/cascader.js +0 -84
  480. package/lib/cascader/cascader.js.map +0 -1
  481. package/lib/cascader/cascader.less +0 -16
  482. package/lib/checkbox/check.png +0 -0
  483. package/lib/checkbox/checkbox.d.ts +0 -16
  484. package/lib/checkbox/checkbox.d.ts.map +0 -1
  485. package/lib/checkbox/checkbox.js +0 -100
  486. package/lib/checkbox/checkbox.js.map +0 -1
  487. package/lib/checkbox/checkbox.less +0 -69
  488. package/lib/date-picker/DatePicker.d.ts +0 -21
  489. package/lib/date-picker/DatePicker.d.ts.map +0 -1
  490. package/lib/date-picker/DatePicker.js +0 -163
  491. package/lib/date-picker/DatePicker.js.map +0 -1
  492. package/lib/date-picker/index.less +0 -294
  493. package/lib/input-number/inputNumber.d.ts +0 -10
  494. package/lib/input-number/inputNumber.d.ts.map +0 -1
  495. package/lib/input-number/inputNumber.js +0 -89
  496. package/lib/input-number/inputNumber.js.map +0 -1
  497. package/lib/input-number/inputNumber.less +0 -12
  498. package/lib/modal/index.less +0 -36
  499. package/lib/popconfirm/index.less +0 -32
  500. package/lib/popconfirm/popconfirm.d.ts +0 -8
  501. package/lib/popconfirm/popconfirm.d.ts.map +0 -1
  502. package/lib/popconfirm/popconfirm.js +0 -96
  503. package/lib/popconfirm/popconfirm.js.map +0 -1
  504. package/lib/popover/index.less +0 -57
  505. package/lib/popover/popover.d.ts +0 -14
  506. package/lib/popover/popover.d.ts.map +0 -1
  507. package/lib/popover/popover.js +0 -90
  508. package/lib/popover/popover.js.map +0 -1
  509. package/lib/progress/progress.d.ts +0 -12
  510. package/lib/progress/progress.d.ts.map +0 -1
  511. package/lib/progress/progress.js +0 -179
  512. package/lib/progress/progress.js.map +0 -1
  513. package/lib/progress/progress.less +0 -82
  514. package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -19
  515. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
  516. package/lib/query-form/Field/Composition/FieldPopover.js +0 -418
  517. package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
  518. package/lib/query-form/Field/Composition/FieldPopover.less +0 -35
  519. package/lib/query-form/Field/Composition/Select.d.ts +0 -4
  520. package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
  521. package/lib/query-form/Field/Composition/Select.js +0 -242
  522. package/lib/query-form/Field/Composition/Select.js.map +0 -1
  523. package/lib/query-form/Field/Composition/ValueTag.d.ts +0 -13
  524. package/lib/query-form/Field/Composition/ValueTag.d.ts.map +0 -1
  525. package/lib/query-form/Field/Composition/ValueTag.js +0 -235
  526. package/lib/query-form/Field/Composition/ValueTag.js.map +0 -1
  527. package/lib/query-form/Field/Composition/index.d.ts +0 -13
  528. package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
  529. package/lib/query-form/Field/Composition/index.js +0 -425
  530. package/lib/query-form/Field/Composition/index.js.map +0 -1
  531. package/lib/query-form/Field/Composition/index.less +0 -145
  532. package/lib/query-form/Field/Composition/utils.d.ts +0 -21
  533. package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
  534. package/lib/query-form/Field/Composition/utils.js +0 -172
  535. package/lib/query-form/Field/Composition/utils.js.map +0 -1
  536. package/lib/query-form-backup/Field/Composition/FieldPopover.less +0 -35
  537. package/lib/query-form-backup/Field/Composition/index.less +0 -114
  538. package/lib/query-form-backup/index.less +0 -90
  539. package/lib/query-form-v2/index.less +0 -133
  540. package/lib/radio/radio.d.ts +0 -17
  541. package/lib/radio/radio.d.ts.map +0 -1
  542. package/lib/radio/radio.js +0 -110
  543. package/lib/radio/radio.js.map +0 -1
  544. package/lib/radio/radio.less +0 -43
  545. package/lib/scroll-bar/Bar.d.ts +0 -4
  546. package/lib/scroll-bar/Bar.d.ts.map +0 -1
  547. package/lib/scroll-bar/Bar.js +0 -168
  548. package/lib/scroll-bar/Bar.js.map +0 -1
  549. package/lib/scroll-bar/Context.d.ts +0 -7
  550. package/lib/scroll-bar/Context.d.ts.map +0 -1
  551. package/lib/scroll-bar/Context.js +0 -17
  552. package/lib/scroll-bar/Context.js.map +0 -1
  553. package/lib/scroll-bar/ScrollBar.d.ts +0 -4
  554. package/lib/scroll-bar/ScrollBar.d.ts.map +0 -1
  555. package/lib/scroll-bar/ScrollBar.js +0 -132
  556. package/lib/scroll-bar/ScrollBar.js.map +0 -1
  557. package/lib/scroll-bar/Thumb.d.ts +0 -3
  558. package/lib/scroll-bar/Thumb.d.ts.map +0 -1
  559. package/lib/scroll-bar/Thumb.js +0 -202
  560. package/lib/scroll-bar/Thumb.js.map +0 -1
  561. package/lib/scroll-bar/index.d.ts +0 -3
  562. package/lib/scroll-bar/index.d.ts.map +0 -1
  563. package/lib/scroll-bar/index.js +0 -14
  564. package/lib/scroll-bar/index.js.map +0 -1
  565. package/lib/scroll-bar/scrollBar.less +0 -59
  566. package/lib/scroll-bar/util.d.ts +0 -40
  567. package/lib/scroll-bar/util.d.ts.map +0 -1
  568. package/lib/scroll-bar/util.js +0 -66
  569. package/lib/scroll-bar/util.js.map +0 -1
  570. package/lib/spin/spin.d.ts +0 -9
  571. package/lib/spin/spin.d.ts.map +0 -1
  572. package/lib/spin/spin.js +0 -79
  573. package/lib/spin/spin.js.map +0 -1
  574. package/lib/spin/spin.less +0 -9
  575. package/lib/steps/assets/background_left.svg +0 -12
  576. package/lib/steps/assets/background_right.svg +0 -12
  577. package/lib/steps/assets/horizontal_line.svg +0 -3
  578. package/lib/steps/assets/vertical_line.svg +0 -3
  579. package/lib/steps/stepStyle/icon.less +0 -51
  580. package/lib/steps/stepStyle/progress-dot.less +0 -10
  581. package/lib/steps/stepStyle/variables.less +0 -8
  582. package/lib/steps/stepStyle/vertical.less +0 -41
  583. package/lib/switch/index.less +0 -45
  584. package/lib/tabs/tabs.less +0 -125
  585. package/lib/time-picker/TimePicker.d.ts +0 -9
  586. package/lib/time-picker/TimePicker.d.ts.map +0 -1
  587. package/lib/time-picker/TimePicker.js +0 -90
  588. package/lib/time-picker/TimePicker.js.map +0 -1
  589. package/lib/time-picker/index.less +0 -38
  590. package/lib/tntd-action/Action.d.ts +0 -6
  591. package/lib/tntd-action/Action.d.ts.map +0 -1
  592. package/lib/tntd-action/Action.js +0 -218
  593. package/lib/tntd-action/Action.js.map +0 -1
  594. package/lib/tntd-action/index.less +0 -61
  595. package/lib/tntd-select/index.less +0 -7
@@ -1,418 +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["default"] = void 0;
16
- var _find2 = _interopRequireDefault(require("lodash/find"));
17
- var _filter2 = _interopRequireDefault(require("lodash/filter"));
18
- var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
19
- var _react = _interopRequireWildcard(require("react"));
20
- var _empty = require("../../../empty");
21
- var _popover = _interopRequireDefault(require("../../../popover"));
22
- var _ellipsis = _interopRequireDefault(require("../../../ellipsis"));
23
- var _Select = _interopRequireDefault(require("./Select"));
24
- var _utils = require("./utils");
25
- var _fieldsMap = _interopRequireDefault(require("../fieldsMap"));
26
- require("./FieldPopover.less");
27
- function _getRequireWildcardCache(e) {
28
- if ("function" != typeof WeakMap) return null;
29
- var r = new WeakMap(),
30
- t = new WeakMap();
31
- return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
32
- return e ? t : r;
33
- })(e);
34
- }
35
- function _interopRequireWildcard(e, r) {
36
- if (!r && e && e.__esModule) return e;
37
- if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
38
- "default": e
39
- };
40
- var t = _getRequireWildcardCache(r);
41
- if (t && t.has(e)) return t.get(e);
42
- var n = {
43
- __proto__: null
44
- },
45
- a = Object.defineProperty && Object.getOwnPropertyDescriptor;
46
- for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
47
- var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
48
- i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
49
- }
50
- return n["default"] = e, t && t.set(e, n), n;
51
- }
52
- function _interopRequireDefault(e) {
53
- return e && e.__esModule ? e : {
54
- "default": e
55
- };
56
- }
57
- function _slicedToArray(r, e) {
58
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
59
- }
60
- function _nonIterableRest() {
61
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
- }
63
- function _unsupportedIterableToArray(r, a) {
64
- if (r) {
65
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
66
- var t = {}.toString.call(r).slice(8, -1);
67
- 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;
68
- }
69
- }
70
- function _arrayLikeToArray(r, a) {
71
- (null == a || a > r.length) && (a = r.length);
72
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
73
- return n;
74
- }
75
- function _iterableToArrayLimit(r, l) {
76
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
77
- if (null != t) {
78
- var e,
79
- n,
80
- i,
81
- u,
82
- a = [],
83
- f = !0,
84
- o = !1;
85
- try {
86
- if (i = (t = t.call(r)).next, 0 === l) {
87
- if (Object(t) !== t) return;
88
- f = !1;
89
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
90
- } catch (r) {
91
- o = !0, n = r;
92
- } finally {
93
- try {
94
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
95
- } finally {
96
- if (o) throw n;
97
- }
98
- }
99
- return a;
100
- }
101
- }
102
- function _arrayWithHoles(r) {
103
- if (Array.isArray(r)) return r;
104
- }
105
- var __rest = void 0 && (void 0).__rest || function (s, e) {
106
- var t = {};
107
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
108
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
109
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
110
- }
111
- return t;
112
- };
113
- var FieldPopover = function FieldPopover(_a, ref) {
114
- var visible = _a.visible,
115
- setVisible = _a.setVisible,
116
- searchText = _a.searchText,
117
- children = _a.children,
118
- value = _a.value,
119
- regex = _a.regex,
120
- fieldItems = _a.fieldItems,
121
- propItem = _a.propItem,
122
- setFieldItem = _a.setFieldItem,
123
- onChange = _a.onChange,
124
- form = _a.form,
125
- locale = _a.locale,
126
- clsPrefix = _a.clsPrefix,
127
- props = __rest(_a, ["visible", "setVisible", "searchText", "children", "value", "regex", "fieldItems", "propItem", "setFieldItem", "onChange", "form", "locale", "clsPrefix"]);
128
- var _useState = (0, _react.useState)(undefined),
129
- _useState2 = _slicedToArray(_useState, 2),
130
- searchTarget = _useState2[0],
131
- setSearchTarget = _useState2[1];
132
- var _useState3 = (0, _react.useState)(false),
133
- _useState4 = _slicedToArray(_useState3, 2),
134
- popoverContent = _useState4[0],
135
- setPopoverContent = _useState4[1];
136
- var onPropsClick = function onPropsClick(props) {
137
- var _ref = props || {},
138
- _ref$type = _ref.type,
139
- type = _ref$type === void 0 ? 'input' : _ref$type,
140
- component = _ref.component;
141
- var copyValue = (0, _cloneDeep2["default"])(value);
142
- if (!(copyValue === null || copyValue === void 0 ? void 0 : copyValue.find(function (v) {
143
- return v.key === props.name;
144
- }))) {
145
- copyValue.push({
146
- key: props.name,
147
- value: type === 'array' ? [] : undefined
148
- });
149
- }
150
- setFieldItem(props);
151
- if ((0, _utils.isInput)(type) && !component) {
152
- var target = copyValue.find(function (v) {
153
- return v.key === props.name;
154
- });
155
- onChange(target, true);
156
- close();
157
- return;
158
- }
159
- setVisible(true);
160
- setPopoverContent(true);
161
- onChange(copyValue);
162
- };
163
- (0, _react.useImperativeHandle)(ref, function () {
164
- return {
165
- onPropsClick: onPropsClick
166
- };
167
- });
168
- var onSelectChange = function onSelectChange(v, isMultiple) {
169
- var _a, _b, _c, _d;
170
- var propObj = (v === null || v === void 0 ? void 0 : v.propItem) || propItem || {};
171
- var fieldProps = propObj.props; // 直接搜索拿v.xx的值
172
- var copyValue = (0, _cloneDeep2["default"])(value || []);
173
- var index;
174
- if (v === null || v === void 0 ? void 0 : v.propItem) {
175
- // 模糊搜索
176
- var _index = copyValue.findIndex(function (vv) {
177
- var _a;
178
- return vv.key === ((_a = v.propItem) === null || _a === void 0 ? void 0 : _a.name);
179
- });
180
- if (_index > -1) {
181
- index = _index;
182
- } else {
183
- copyValue.push({
184
- key: (_a = v.propItem) === null || _a === void 0 ? void 0 : _a.name,
185
- value: isMultiple ? [] : ''
186
- });
187
- index = copyValue.length - 1;
188
- }
189
- setFieldItem(v.propItem);
190
- } else {
191
- // 选择值
192
- index = copyValue.findIndex(function (v) {
193
- return v.key === (propItem === null || propItem === void 0 ? void 0 : propItem.name);
194
- });
195
- }
196
- if (isMultiple) {
197
- if (!((_c = (_b = copyValue[index]) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length)) {
198
- copyValue[index].value = [v === null || v === void 0 ? void 0 : v.value];
199
- } else {
200
- if (((_d = copyValue[index].value) === null || _d === void 0 ? void 0 : _d.indexOf(v.value)) > -1) {
201
- copyValue[index].value = copyValue[index].value.filter(function (val) {
202
- return val !== v.value;
203
- });
204
- } else {
205
- copyValue[index].value.push(v.value);
206
- }
207
- }
208
- // 如果是模糊搜索-展开多选项
209
- if (v === null || v === void 0 ? void 0 : v.propItem) {
210
- setFieldItem(v === null || v === void 0 ? void 0 : v.propItem);
211
- setVisible(true);
212
- setPopoverContent(true);
213
- }
214
- } else {
215
- copyValue[index].value = v === null || v === void 0 ? void 0 : v.value;
216
- close();
217
- }
218
- onChange(copyValue, false, true);
219
- (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) && fieldProps.onChange(copyValue[index].value);
220
- };
221
- var onFieldChange = function onFieldChange() {
222
- var _a;
223
- var _ref2 = propItem || {},
224
- _ref2$type = _ref2.type,
225
- type = _ref2$type === void 0 ? 'input' : _ref2$type,
226
- component = _ref2.component,
227
- fieldProps = _ref2.props;
228
- var copyValue = (0, _cloneDeep2["default"])(value);
229
- var index = copyValue.findIndex(function (v) {
230
- return v.key === (propItem === null || propItem === void 0 ? void 0 : propItem.name);
231
- });
232
- copyValue[index].value = arguments.length <= 0 ? undefined : arguments[0];
233
- if (['date', 'checkbox'].includes(type) || type === 'dateRange' && ((_a = arguments.length <= 1 ? undefined : arguments[1]) === null || _a === void 0 ? void 0 : _a[1])) {
234
- close();
235
- }
236
- onChange(copyValue, false, (arguments.length <= 0 ? undefined : arguments[0]) !== undefined, type !== 'selectInput');
237
- (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) && fieldProps.onChange(copyValue[index].value);
238
- };
239
- var close = function close() {
240
- setVisible(false);
241
- setTimeout(function () {
242
- setFieldItem();
243
- setPopoverContent(false);
244
- }, 1);
245
- };
246
- var handleVisibleChange = function handleVisibleChange() {
247
- if (!visible && !regex.test(searchText)) {
248
- setVisible(true);
249
- } else {
250
- close();
251
- }
252
- };
253
- (0, _react.useEffect)(function () {
254
- var bool1 = false,
255
- bool2 = false;
256
- if (searchText && !propItem) {
257
- fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.forEach(function (v) {
258
- var _ref3 = v.props || {},
259
- name = _ref3.name,
260
- propsTitle = _ref3.propsTitle,
261
- title = _ref3.title,
262
- _ref3$type = _ref3.type,
263
- type = _ref3$type === void 0 ? 'input' : _ref3$type,
264
- props = _ref3.props;
265
- var _propsTitle = propsTitle || title || name;
266
- if ((_propsTitle === null || _propsTitle === void 0 ? void 0 : _propsTitle.indexOf(searchText)) > -1) {
267
- bool1 = true;
268
- }
269
- var sOptions = type !== 'select' ? [] : (props === null || props === void 0 ? void 0 : props.options) || [];
270
- var fieldNames = props === null || props === void 0 ? void 0 : props.fieldNames;
271
- var target = sOptions === null || sOptions === void 0 ? void 0 : sOptions.find(function (item) {
272
- var labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
273
- var label = item instanceof Object ? item[labelKey] : item + '';
274
- return (_react["default"].isValidElement(label) ? (0, _utils.formatLabel)(label) : label).indexOf(searchText) > -1;
275
- });
276
- if (target) {
277
- bool2 = true;
278
- }
279
- });
280
- setSearchTarget(!bool2 && !bool1 ? null : {
281
- propsTitle: bool1,
282
- propsValue: bool2
283
- });
284
- } else {
285
- setSearchTarget(undefined);
286
- }
287
- }, [fieldItems, searchText, propItem]);
288
- var renderFirstOptions = function renderFirstOptions() {
289
- var firstItems = searchText ? (0, _filter2["default"])(fieldItems, function (v) {
290
- var _ref4 = v.props || {},
291
- name = _ref4.name,
292
- propsTitle = _ref4.propsTitle,
293
- title = _ref4.title;
294
- var _propsTitle = propsTitle || title || name;
295
- return (_propsTitle === null || _propsTitle === void 0 ? void 0 : _propsTitle.indexOf(searchText)) > -1;
296
- }) : fieldItems;
297
- var secondItems = searchText ? (0, _filter2["default"])(fieldItems, function (v) {
298
- var _ref5 = v.props || {},
299
- _ref5$type = _ref5.type,
300
- type = _ref5$type === void 0 ? 'input' : _ref5$type,
301
- props = _ref5.props;
302
- var _ref6 = props || {},
303
- options = _ref6.options,
304
- loadData = _ref6.loadData,
305
- fieldNames = _ref6.fieldNames;
306
- return type === 'select' && !loadData && !!(0, _find2["default"])(options, function (item) {
307
- var labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
308
- var label = item instanceof Object ? item[labelKey] : item + '';
309
- var isReactDom = _react["default"].isValidElement(label);
310
- var _label = isReactDom ? (0, _utils.formatLabel)(label) : label;
311
- return (_label === null || _label === void 0 ? void 0 : _label.indexOf(searchText)) > -1;
312
- });
313
- }) : [];
314
- 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", {
315
- className: "ant-select-dropdown-menu"
316
- }, firstItems.map(function (v) {
317
- var _ref7 = v.props || {},
318
- name = _ref7.name,
319
- propsTitle = _ref7.propsTitle,
320
- title = _ref7.title,
321
- type = _ref7.type,
322
- props = _ref7.props;
323
- var _propsTitle = propsTitle || title || name;
324
- return _react["default"].createElement("li", {
325
- className: "ant-select-dropdown-menu-item",
326
- key: name,
327
- value: name,
328
- onMouseDown: function onMouseDown(e) {
329
- return e.preventDefault();
330
- },
331
- onClick: function onClick() {
332
- onPropsClick(v.props);
333
- }
334
- }, _react["default"].createElement(_ellipsis["default"], {
335
- widthLimit: 220,
336
- title: searchText ? _react["default"].createElement("span", {
337
- dangerouslySetInnerHTML: {
338
- __html: (0, _utils.highlightSubstring)(_propsTitle, searchText)
339
- }
340
- }) : _propsTitle
341
- }));
342
- }))), 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) {
343
- var _ref8 = v.props || {},
344
- name = _ref8.name,
345
- _ref8$type = _ref8.type,
346
- type = _ref8$type === void 0 ? 'input' : _ref8$type,
347
- props = _ref8.props;
348
- var target = value === null || value === void 0 ? void 0 : value.find(function (v) {
349
- return v.key === name;
350
- });
351
- if (type === 'select') {
352
- return _react["default"].createElement(_Select["default"], Object.assign({
353
- key: name
354
- }, props, {
355
- searchText: searchText,
356
- propItem: v.props,
357
- onChange: onSelectChange,
358
- value: target === null || target === void 0 ? void 0 : target.value
359
- }));
360
- }
361
- return;
362
- })), !firstItems.length && !secondItems.length && _react["default"].createElement(_empty.Empty, {
363
- size: "mini"
364
- }));
365
- };
366
- var renderSecondOptions = function renderSecondOptions() {
367
- var _a;
368
- var _ref9 = propItem || {},
369
- name = _ref9.name,
370
- propsTitle = _ref9.propsTitle,
371
- title = _ref9.title,
372
- _ref9$type = _ref9.type,
373
- type = _ref9$type === void 0 ? 'input' : _ref9$type,
374
- className = _ref9.className,
375
- component = _ref9.component,
376
- fieldProps = _ref9.props;
377
- var target = value === null || value === void 0 ? void 0 : value.find(function (v) {
378
- return v.key === name;
379
- });
380
- var Field = component || _fieldsMap["default"][type] || function () {
381
- return null;
382
- };
383
- return _react["default"].createElement("div", {
384
- onClick: function onClick(e) {
385
- return e.stopPropagation();
386
- },
387
- className: className
388
- }, _react["default"].createElement("label", null, propsTitle || title || name), type === 'select' ? _react["default"].createElement(_Select["default"], Object.assign({}, fieldProps, {
389
- searchText: searchText,
390
- propItem: propItem,
391
- onChange: onSelectChange,
392
- value: target === null || target === void 0 ? void 0 : target.value
393
- })) : _react["default"].createElement("div", {
394
- className: "".concat(clsPrefix, "-field-popover-content"),
395
- onClick: function onClick(e) {
396
- return e.stopPropagation();
397
- }
398
- }, _react["default"].createElement(Field, Object.assign({
399
- form: form,
400
- value: target === null || target === void 0 ? void 0 : target.value
401
- }, fieldProps, {
402
- style: Object.assign(Object.assign({}, fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style), {
403
- width: ((_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style) === null || _a === void 0 ? void 0 : _a.width) || '250px'
404
- }),
405
- close: close,
406
- onChange: onFieldChange,
407
- name: name
408
- }))));
409
- };
410
- return _react["default"].createElement(_popover["default"], Object.assign({
411
- trigger: "click",
412
- visible: visible,
413
- overlayClassName: "".concat(clsPrefix, "-field-popover"),
414
- content: !popoverContent ? renderFirstOptions() : renderSecondOptions(),
415
- onVisibleChange: handleVisibleChange
416
- }, props), children);
417
- };
418
- var _default = exports["default"] = (0, _react.forwardRef)(FieldPopover);
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldPopover.js","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/FieldPopover.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,mCAAgD;AAChD,0CAAsC;AACtC,+DAAsC;AACtC,iEAAwC;AACxC,sDAAgC;AAChC,mCAAkE;AAClE,6DAAoC;AACpC,+BAA4B;AAE5B,MAAM,YAAY,GAAG,CACnB,EAeC,EACD,GAAG,EACH,EAAE;QAjBF,EACE,OAAO,EACP,UAAU,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,EACL,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,SAAS,OAEV,EADI,KAAK,cAdV,0JAeC,CADS;IAIV,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAA;IAC3D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,G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K,kCACA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KACpB,KAAK,EAAE,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,0CAAE,KAAK,KAAI,OAAO,KAE5C,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,IAAI,IACV,CACE,CACP,CACG,CACP,CAAA;IACH,CAAC,CAAA;IAED,OAAO,CACL,8BAAC,iBAAO,kBACN,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,GAAG,SAAS,gBAAgB,EAC9C,OAAO,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE,EACvE,eAAe,EAAE,mBAAmB,IAChC,KAAK,GAER,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CAAA;AACD,kBAAe,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAA","sourcesContent":["import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react'\nimport { cloneDeep, filter, find } from 'lodash'\nimport { Empty } from '../../../empty'\nimport Popover from '../../../popover'\nimport Ellipsis from '../../../ellipsis'\nimport SelectOpt from './Select'\nimport { highlightSubstring, formatLabel, isInput } from './utils'\nimport fieldsMap from '../fieldsMap'\nimport './FieldPopover.less'\n\nconst FieldPopover = (\n {\n visible,\n setVisible,\n searchText,\n children,\n value,\n regex,\n fieldItems,\n propItem,\n setFieldItem,\n onChange,\n form,\n locale,\n clsPrefix,\n ...props\n },\n ref\n) => {\n const [searchTarget, setSearchTarget] = useState(undefined)\n const [popoverContent, setPopoverContent] = useState(false)\n\n const onPropsClick = (props) => {\n const { type = 'input', component } = props || {}\n const copyValue = cloneDeep(value)\n if (!copyValue?.find((v) => v.key === props.name)) {\n copyValue.push({\n key: props.name,\n value: type === 'array' ? [] : undefined,\n })\n }\n setFieldItem(props)\n if (isInput(type) && !component) {\n const target = copyValue.find((v) => v.key === props.name)\n onChange(target, true)\n close()\n return\n }\n setVisible(true)\n setPopoverContent(true)\n onChange(copyValue)\n }\n\n useImperativeHandle(ref, () => ({\n onPropsClick,\n }))\n\n const onSelectChange = (v, isMultiple) => {\n const propObj = v?.propItem || propItem || {}\n const { props: fieldProps } = propObj // 直接搜索拿v.xx的值\n const copyValue = cloneDeep(value || [])\n let index\n if (v?.propItem) {\n // 模糊搜索\n const _index = copyValue.findIndex((vv) => vv.key === v.propItem?.name)\n if (_index > -1) {\n index = _index\n } else {\n copyValue.push({\n key: v.propItem?.name,\n value: isMultiple ? [] : '',\n })\n index = copyValue.length - 1\n }\n setFieldItem(v.propItem)\n } else {\n // 选择值\n index = copyValue.findIndex((v) => v.key === propItem?.name)\n }\n\n if (isMultiple) {\n if (!copyValue[index]?.value?.length) {\n copyValue[index].value = [v?.value]\n } else {\n if (copyValue[index].value?.indexOf(v.value) > -1) {\n copyValue[index].value = copyValue[index].value.filter((val) => val !== v.value)\n } else {\n copyValue[index].value.push(v.value)\n }\n }\n // 如果是模糊搜索-展开多选项\n if (v?.propItem) {\n setFieldItem(v?.propItem)\n setVisible(true)\n setPopoverContent(true)\n }\n } else {\n copyValue[index].value = v?.value\n close()\n }\n onChange(copyValue, false, true)\n fieldProps?.onChange && fieldProps.onChange(copyValue[index].value)\n }\n\n const onFieldChange = (...args) => {\n const { type = 'input', component, props: fieldProps } = propItem || {}\n const copyValue = cloneDeep(value)\n const index = copyValue.findIndex((v) => v.key === propItem?.name)\n copyValue[index].value = args[0]\n if (['date', 'checkbox'].includes(type) || (type === 'dateRange' && args[1]?.[1])) {\n close()\n }\n onChange(copyValue, false, args[0] !== undefined, type !== 'selectInput')\n fieldProps?.onChange && fieldProps.onChange(copyValue[index].value)\n }\n\n const close = () => {\n setVisible(false)\n setTimeout(() => {\n setFieldItem()\n setPopoverContent(false)\n }, 1)\n }\n const handleVisibleChange = () => {\n if (!visible && !regex.test(searchText)) {\n setVisible(true)\n } else {\n close()\n }\n }\n\n useEffect(() => {\n let bool1 = false,\n bool2 = false\n\n if (searchText && !propItem) {\n fieldItems?.forEach((v) => {\n const { name, propsTitle, title, type = 'input', props } = v.props || {}\n const _propsTitle = propsTitle || title || name\n if (_propsTitle?.indexOf(searchText) > -1) {\n bool1 = true\n }\n const sOptions = type !== 'select' ? [] : props?.options || []\n const fieldNames = props?.fieldNames\n const target = sOptions?.find((item) => {\n const labelKey = fieldNames?.label || 'label'\n const label = item instanceof Object ? item[labelKey] : item + ''\n return (React.isValidElement(label) ? formatLabel(label) : label).indexOf(searchText) > -1\n })\n if (target) {\n bool2 = true\n }\n })\n setSearchTarget(!bool2 && !bool1 ? null : { propsTitle: bool1, propsValue: bool2 })\n } else {\n setSearchTarget(undefined)\n }\n }, [fieldItems, searchText, propItem])\n\n const renderFirstOptions = () => {\n const firstItems = searchText\n ? filter(fieldItems, (v) => {\n const { name, propsTitle, title } = v.props || {}\n const _propsTitle = propsTitle || title || name\n return _propsTitle?.indexOf(searchText) > -1\n })\n : fieldItems\n const secondItems = searchText\n ? filter(fieldItems, (v) => {\n const { type = 'input', props } = v.props || {}\n const { options, loadData, fieldNames } = props || {}\n return (\n type === 'select' &&\n !loadData &&\n !!find(options, (item) => {\n const labelKey = fieldNames?.label || 'label'\n const label = item instanceof Object ? item[labelKey] : item + ''\n const isReactDom = React.isValidElement(label)\n const _label = isReactDom ? formatLabel(label) : label\n return _label?.indexOf(searchText) > -1\n })\n )\n })\n : []\n return (\n <div>\n {firstItems.length > 0 && (\n <>\n {(!searchText || searchTarget?.propsTitle) && <label>{locale.propTitle}</label>}\n <ul className=\"ant-select-dropdown-menu\">\n {firstItems.map((v) => {\n const { name, propsTitle, title, type, props } = v.props || {}\n const _propsTitle = propsTitle || title || name\n return (\n <li\n className=\"ant-select-dropdown-menu-item\"\n key={name}\n value={name}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => {\n onPropsClick(v.props)\n }}\n >\n <Ellipsis\n widthLimit={220}\n title={\n searchText ? (\n <span\n dangerouslySetInnerHTML={{\n __html: highlightSubstring(_propsTitle, searchText),\n }}\n />\n ) : (\n _propsTitle\n )\n }\n />\n </li>\n )\n })}\n </ul>\n </>\n )}\n\n {/* 可以对下拉框值筛选 */}\n {secondItems.length > 0 && (\n <div>\n {searchTarget?.propsValue && <label>{locale.propValue}</label>}\n {fieldItems?.map((v) => {\n const { name, type = 'input', props } = v.props || {}\n const target = value?.find((v) => v.key === name)\n if (type === 'select') {\n return (\n <SelectOpt\n key={name}\n {...props}\n searchText={searchText}\n propItem={v.props}\n onChange={onSelectChange}\n value={target?.value}\n />\n )\n }\n return\n })}\n </div>\n )}\n {!firstItems.length && !secondItems.length && <Empty size=\"mini\" />}\n </div>\n )\n }\n\n const renderSecondOptions = () => {\n const {\n name,\n propsTitle,\n title,\n type = 'input',\n className,\n component,\n props: fieldProps,\n } = propItem || {}\n const target = value?.find((v) => v.key === name)\n const Field = component || fieldsMap[type] || (() => null)\n return (\n <div onClick={(e) => e.stopPropagation()} className={className}>\n <label>{propsTitle || title || name}</label>\n {type === 'select' ? (\n <SelectOpt\n {...fieldProps}\n searchText={searchText}\n propItem={propItem}\n onChange={onSelectChange}\n value={target?.value}\n />\n ) : (\n <div\n className={`${clsPrefix}-field-popover-content`}\n onClick={(e) => e.stopPropagation()}\n >\n <Field\n form={form}\n value={target?.value}\n {...fieldProps}\n style={{\n ...fieldProps?.style,\n width: fieldProps?.style?.width || '250px',\n }}\n close={close}\n onChange={onFieldChange}\n name={name}\n />\n </div>\n )}\n </div>\n )\n }\n\n return (\n <Popover\n trigger=\"click\"\n visible={visible}\n overlayClassName={`${clsPrefix}-field-popover`}\n content={!popoverContent ? renderFirstOptions() : renderSecondOptions()}\n onVisibleChange={handleVisibleChange}\n {...props}\n >\n {children}\n </Popover>\n )\n}\nexport default forwardRef(FieldPopover)\n"]}
@@ -1,35 +0,0 @@
1
- .tnt-queryform-field-popover {
2
- min-width: 280px;
3
- .ant-popover-inner-content {
4
- padding: @padding-sm 0;
5
- }
6
- // .ant-calendar-picker {
7
- // margin: @margin-xxs 0;
8
- // }
9
- label {
10
- color: tint(@text-color, 50%);
11
- margin-bottom: @margin-xs;
12
- display: block;
13
- padding: 0 @padding-sm;
14
- }
15
- .ant-select-dropdown-menu {
16
- &-item {
17
- padding: @padding-xxs @padding-sm;
18
- &:hover {
19
- background-color: @bg-color-quaternary;
20
- }
21
- }
22
- }
23
- &-content {
24
- padding: @padding-xxs @padding-sm;
25
- }
26
- .ant-select-selected-icon {
27
- position: absolute;
28
- right: @margin-base;
29
- top: @margin-xs;
30
- color: @blue-6;
31
- }
32
- .tnt-highlight {
33
- color: @blue-6;
34
- }
35
- }
@@ -1,4 +0,0 @@
1
- declare function _default(props: any): React.JSX.Element;
2
- export default _default;
3
- import React from "react";
4
- //# sourceMappingURL=Select.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/Select.js"],"names":[],"mappings":"AAOe,yDAqHd"}