@para-ui/core 2.2.7-beta → 2.2.9

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 (348) hide show
  1. package/AutoBox/index.d.ts +34 -34
  2. package/AutoBox/index.js +15 -203
  3. package/AutoTips/index.d.ts +27 -27
  4. package/AutoTips/index.js +15 -84
  5. package/Breadcrumbs/index.d.ts +39 -39
  6. package/Breadcrumbs/index.js +15 -227
  7. package/Button/SplitButton.d.ts +61 -62
  8. package/Button/index.d.ts +56 -71
  9. package/Button/index.js +14 -348
  10. package/Button/lang/en_US.d.ts +4 -4
  11. package/Button/lang/index.d.ts +9 -9
  12. package/Button/lang/zh_CN.d.ts +4 -4
  13. package/ButtonGroup/index.d.ts +33 -33
  14. package/ButtonGroup/index.js +14 -128
  15. package/Carousel/index.d.ts +30 -30
  16. package/Carousel/index.js +15 -74
  17. package/Cascader/index.d.ts +52 -52
  18. package/Cascader/index.js +15 -166
  19. package/Cascader/lang/en_US.d.ts +4 -4
  20. package/Cascader/lang/index.d.ts +9 -9
  21. package/Cascader/lang/zh_CN.d.ts +4 -4
  22. package/Checkbox/index.d.ts +40 -40
  23. package/Checkbox/index.js +14 -105
  24. package/CheckboxGroup/index.d.ts +46 -46
  25. package/CheckboxGroup/index.js +14 -138
  26. package/Collapse/collapsePanel.d.ts +30 -30
  27. package/Collapse/index.d.ts +57 -57
  28. package/Collapse/index.js +15 -171
  29. package/Collapse/motion.d.ts +5 -5
  30. package/Collapse/util.d.ts +11 -11
  31. package/CollapseBox/index.d.ts +27 -27
  32. package/CollapseBox/index.js +15 -164
  33. package/CollapseBox/util.d.ts +5 -5
  34. package/ColorPicker/index.d.ts +4 -4
  35. package/ColorPicker/index.js +1 -4
  36. package/ComboSelect/WithTabsCombo/index.d.ts +11 -11
  37. package/ComboSelect/WithTabsCombo/interface.d.ts +141 -141
  38. package/ComboSelect/index.d.ts +11 -11
  39. package/ComboSelect/index.js +14 -1803
  40. package/ComboSelect/interface.d.ts +143 -140
  41. package/ComboSelect/lang/en_US.d.ts +8 -8
  42. package/ComboSelect/lang/index.d.ts +17 -17
  43. package/ComboSelect/lang/zh_CN.d.ts +8 -8
  44. package/ComboSelect/utils.d.ts +12 -12
  45. package/Container/index.d.ts +77 -77
  46. package/Container/index.js +15 -239
  47. package/DatePicker/PickerButton.d.ts +3 -3
  48. package/DatePicker/PickerTag.d.ts +3 -3
  49. package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -4
  50. package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -11
  51. package/DatePicker/generatePicker/index.d.ts +77 -77
  52. package/DatePicker/index.d.ts +18 -18
  53. package/DatePicker/index.js +14 -733
  54. package/DatePicker/lang/en_US.d.ts +3 -3
  55. package/DatePicker/lang/index.d.ts +7 -7
  56. package/DatePicker/lang/zh_CN.d.ts +3 -3
  57. package/DatePicker/util.d.ts +20 -20
  58. package/Desktop/index.d.ts +55 -57
  59. package/Desktop/index.js +14 -853
  60. package/Drawer/index.d.ts +11 -11
  61. package/Drawer/index.js +14 -186
  62. package/Drawer/interface.d.ts +83 -83
  63. package/Drawer/lang/en_US.d.ts +5 -5
  64. package/Drawer/lang/index.d.ts +11 -11
  65. package/Drawer/lang/zh_CN.d.ts +5 -5
  66. package/Empty/images/index.d.ts +2 -3
  67. package/Empty/index.d.ts +30 -30
  68. package/Empty/index.js +14 -644
  69. package/Empty/lang/en_US.d.ts +6 -6
  70. package/Empty/lang/index.d.ts +13 -13
  71. package/Empty/lang/zh_CN.d.ts +6 -6
  72. package/Form/index.d.ts +181 -181
  73. package/Form/index.js +14 -384
  74. package/FormItem/compoments/defaultCompoments/index.d.ts +19 -19
  75. package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -8
  76. package/FormItem/compoments/formFile/index.d.ts +38 -38
  77. package/FormItem/compoments/formRadioGroup/index.d.ts +8 -8
  78. package/FormItem/compoments/formSelect/index.d.ts +18 -18
  79. package/FormItem/errorTips.d.ts +12 -12
  80. package/FormItem/index.d.ts +152 -152
  81. package/FormItem/index.js +14 -81
  82. package/FormItem/itemType.d.ts +42 -42
  83. package/FormItem/validateFunction.d.ts +15 -15
  84. package/FunctionModal/dialog.d.ts +58 -58
  85. package/FunctionModal/index.d.ts +8 -8
  86. package/FunctionModal/index.js +14 -39
  87. package/FunctionModal/modalContext.d.ts +14 -15
  88. package/GlobalContext/componentsProps.d.ts +19 -19
  89. package/GlobalContext/confirmLocale.d.ts +7 -7
  90. package/GlobalContext/index.d.ts +28 -28
  91. package/GlobalContext/index.js +16 -41
  92. package/GlobalContext/intl.d.ts +34 -34
  93. package/GlobalContext/useFormatMessage.d.ts +3 -3
  94. package/Help/index.d.ts +20 -18
  95. package/Help/index.js +15 -39
  96. package/HelperText/index.d.ts +19 -19
  97. package/HelperText/index.js +15 -29
  98. package/Hooks/useGlobalProps.d.ts +1 -1
  99. package/InputLang/index.d.ts +49 -49
  100. package/InputLang/index.js +14 -270
  101. package/InputNumber/index.d.ts +74 -74
  102. package/InputNumber/index.js +14 -308
  103. package/Label/index.d.ts +35 -35
  104. package/Label/index.js +14 -81
  105. package/Loading/index.d.ts +17 -17
  106. package/Loading/index.js +15 -47
  107. package/Menu/footerExpansion.d.ts +9 -9
  108. package/Menu/index.d.ts +10 -10
  109. package/Menu/index.js +14 -1232
  110. package/Menu/interface.d.ts +139 -139
  111. package/Menu/logo.d.ts +9 -9
  112. package/Menu/verticalMenuList.d.ts +14 -14
  113. package/Message/index.d.ts +73 -73
  114. package/Message/index.js +15 -222
  115. package/Modal/Confirm/index.d.ts +66 -65
  116. package/Modal/index.d.ts +61 -90
  117. package/Modal/index.js +14 -443
  118. package/Modal/lang/en_US.d.ts +5 -5
  119. package/Modal/lang/index.d.ts +11 -11
  120. package/Modal/lang/zh_CN.d.ts +5 -5
  121. package/MultiBox/index.d.ts +54 -54
  122. package/MultiBox/index.js +14 -231
  123. package/Notification/index.d.ts +52 -52
  124. package/Notification/index.js +15 -266
  125. package/OperateBtn/index.d.ts +59 -59
  126. package/OperateBtn/index.js +14 -260
  127. package/OperateBtn/lang/en_US.d.ts +4 -4
  128. package/OperateBtn/lang/index.d.ts +9 -9
  129. package/OperateBtn/lang/zh_CN.d.ts +4 -4
  130. package/PageHeader/horizontalMeun.d.ts +9 -9
  131. package/PageHeader/horizontalMeunRight.d.ts +9 -9
  132. package/PageHeader/index.d.ts +10 -10
  133. package/PageHeader/index.js +14 -1171
  134. package/PageHeader/interface.d.ts +167 -167
  135. package/Pagination/index.d.ts +33 -33
  136. package/Pagination/index.js +14 -469
  137. package/Pagination/lang/en_US.d.ts +8 -8
  138. package/Pagination/lang/index.d.ts +17 -17
  139. package/Pagination/lang/zh_CN.d.ts +8 -8
  140. package/ParauiProvider/index.d.ts +12 -8
  141. package/ParauiProvider/index.js +15 -53
  142. package/PopConfirm/index.d.ts +56 -58
  143. package/PopConfirm/index.js +14 -189
  144. package/PopConfirm/lang/en_US.d.ts +5 -5
  145. package/PopConfirm/lang/index.d.ts +11 -11
  146. package/PopConfirm/lang/zh_CN.d.ts +5 -5
  147. package/Popover/index.d.ts +14 -14
  148. package/Popover/index.js +15 -66
  149. package/Popper/index.d.ts +13 -0
  150. package/Popper/index.js +16 -0
  151. package/Progress/Line.d.ts +47 -47
  152. package/Progress/Steps.d.ts +17 -17
  153. package/Progress/index.d.ts +81 -81
  154. package/Progress/index.js +20 -358
  155. package/Progress/utils.d.ts +6 -6
  156. package/Querying/images/index.d.ts +2 -3
  157. package/Querying/index.d.ts +26 -26
  158. package/Querying/index.js +14 -762
  159. package/Querying/lang/en_US.d.ts +4 -4
  160. package/Querying/lang/index.d.ts +9 -9
  161. package/Querying/lang/zh_CN.d.ts +4 -4
  162. package/README.md +518 -0
  163. package/Radio/index.d.ts +38 -38
  164. package/Radio/index.js +14 -94
  165. package/RadioGroup/index.d.ts +47 -47
  166. package/RadioGroup/index.js +14 -128
  167. package/Search/index.d.ts +56 -56
  168. package/Search/index.js +14 -220
  169. package/Select/index.d.ts +86 -86
  170. package/Select/index.js +14 -1288
  171. package/Select/lang/en_US.d.ts +5 -5
  172. package/Select/lang/index.d.ts +11 -11
  173. package/Select/lang/zh_CN.d.ts +5 -5
  174. package/SelectInput/index.d.ts +11 -11
  175. package/SelectInput/index.js +14 -51
  176. package/SingleBox/index.d.ts +42 -42
  177. package/SingleBox/index.js +14 -194
  178. package/Slider/index.d.ts +14 -14
  179. package/Slider/index.js +15 -125
  180. package/Slider/interface.d.ts +102 -102
  181. package/Split/index.d.ts +7 -7
  182. package/Split/index.js +15 -134
  183. package/Stepper/icons.d.ts +5 -5
  184. package/Stepper/index.d.ts +39 -49
  185. package/Stepper/index.js +15 -99
  186. package/Switch/index.d.ts +78 -78
  187. package/Switch/index.js +14 -73
  188. package/Table/index.d.ts +10 -10
  189. package/Table/index.js +14 -2725
  190. package/Table/interface.d.ts +202 -202
  191. package/Table/lang/en_US.d.ts +6 -6
  192. package/Table/lang/index.d.ts +13 -13
  193. package/Table/lang/zh_CN.d.ts +6 -6
  194. package/Table/tableBody.d.ts +9 -9
  195. package/Table/tableBodyElement/index.d.ts +15 -15
  196. package/Table/tableBodyInterface.d.ts +67 -67
  197. package/Table/tableContainer/index.d.ts +16 -16
  198. package/Table/tableElement/index.d.ts +17 -17
  199. package/Table/tableHead.d.ts +9 -9
  200. package/Table/tableHeadElement/index.d.ts +15 -15
  201. package/Table/tableHeadInterface.d.ts +30 -26
  202. package/Table/tablePagination.d.ts +9 -9
  203. package/Table/tablePaginationInterFace.d.ts +24 -24
  204. package/Table/tdElement/index.d.ts +15 -15
  205. package/Table/thElement/index.d.ts +15 -15
  206. package/Table/trElement/index.d.ts +15 -15
  207. package/Table/util.d.ts +16 -16
  208. package/Tabs/index.d.ts +48 -69
  209. package/Tabs/index.js +14 -218
  210. package/Tag/TagGroup.d.ts +66 -66
  211. package/Tag/index.d.ts +34 -34
  212. package/Tag/index.js +14 -286
  213. package/Test/index.d.ts +2 -3
  214. package/Test/index.js +16 -9
  215. package/TextField/index.d.ts +93 -93
  216. package/TextField/index.js +14 -686
  217. package/TimePicker/index.d.ts +22 -22
  218. package/TimePicker/index.js +14 -77
  219. package/TimePicker/locale/en_US.d.ts +3 -3
  220. package/TimePicker/locale/zh_CN.d.ts +3 -3
  221. package/TimePicker/style/index.d.ts +1 -1
  222. package/Timeline/index.d.ts +22 -31
  223. package/Timeline/index.js +15 -150
  224. package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
  225. package/ToggleButton/index.d.ts +49 -49
  226. package/ToggleButton/index.js +14 -200
  227. package/Tooltip/index.d.ts +14 -11
  228. package/Tooltip/index.js +15 -335
  229. package/Transfer/index.d.ts +17 -18
  230. package/Transfer/index.js +14 -343
  231. package/Transfer/lang/en_US.d.ts +6 -6
  232. package/Transfer/lang/index.d.ts +13 -13
  233. package/Transfer/lang/zh_CN.d.ts +6 -6
  234. package/Tree/OperateBar/index.d.ts +13 -13
  235. package/Tree/Tree.d.ts +4 -4
  236. package/Tree/index.d.ts +5 -5
  237. package/Tree/index.js +14 -35
  238. package/Tree/interface.d.ts +207 -209
  239. package/Tree/lang/en_US.d.ts +8 -8
  240. package/Tree/lang/index.d.ts +17 -17
  241. package/Tree/lang/zh_CN.d.ts +8 -8
  242. package/Tree/utils/tools.d.ts +26 -26
  243. package/Tree/utils/treeUtil.d.ts +15 -15
  244. package/Upload/Dragger/index.d.ts +10 -10
  245. package/Upload/ErroTip/index.d.ts +13 -13
  246. package/Upload/ImageUpload/index.d.ts +14 -14
  247. package/Upload/ImgCrop/EasyCrop.d.ts +17 -17
  248. package/Upload/ImgCrop/constants.d.ts +7 -7
  249. package/Upload/ImgCrop/index.d.ts +6 -6
  250. package/Upload/ImgCrop/interface.d.ts +24 -24
  251. package/Upload/UploadList/index.d.ts +5 -5
  252. package/Upload/index.d.ts +15 -15
  253. package/Upload/index.js +14 -1542
  254. package/Upload/interface.d.ts +134 -134
  255. package/Upload/lang/en_US.d.ts +12 -12
  256. package/Upload/lang/index.d.ts +25 -25
  257. package/Upload/lang/zh_CN.d.ts +12 -12
  258. package/cdn/AutoBox/index.js +29 -0
  259. package/cdn/AutoTips/index.js +40 -0
  260. package/cdn/Breadcrumbs/index.js +53 -0
  261. package/cdn/Button/index.js +79 -0
  262. package/cdn/ButtonGroup/index.js +79 -0
  263. package/cdn/Carousel/index.js +6 -0
  264. package/cdn/Cascader/index.js +42 -0
  265. package/cdn/Checkbox/index.js +53 -0
  266. package/cdn/CheckboxGroup/index.js +53 -0
  267. package/cdn/Collapse/index.js +27 -0
  268. package/cdn/CollapseBox/index.js +1 -0
  269. package/cdn/ColorPicker/index.js +1 -0
  270. package/cdn/ComboSelect/index.js +438 -0
  271. package/cdn/Container/index.js +1 -0
  272. package/cdn/DatePicker/index.js +185 -0
  273. package/cdn/Desktop/index.js +24 -0
  274. package/cdn/Drawer/index.js +84 -0
  275. package/cdn/Empty/index.js +1 -0
  276. package/cdn/Form/index.js +477 -0
  277. package/cdn/FormItem/index.js +477 -0
  278. package/cdn/FunctionModal/index.js +144 -0
  279. package/cdn/GlobalContext/index.js +1 -0
  280. package/cdn/Help/index.js +53 -0
  281. package/cdn/HelperText/index.js +1 -0
  282. package/cdn/InputLang/index.js +144 -0
  283. package/cdn/InputNumber/index.js +118 -0
  284. package/cdn/Label/index.js +53 -0
  285. package/cdn/Loading/index.js +14 -0
  286. package/cdn/Menu/index.js +40 -0
  287. package/cdn/Message/index.js +53 -0
  288. package/cdn/Modal/index.js +144 -0
  289. package/cdn/MultiBox/index.js +131 -0
  290. package/cdn/Notification/index.js +66 -0
  291. package/cdn/OperateBtn/index.js +92 -0
  292. package/cdn/PageHeader/index.js +92 -0
  293. package/cdn/Pagination/index.js +214 -0
  294. package/cdn/ParauiProvider/index.js +9 -0
  295. package/cdn/PopConfirm/index.js +131 -0
  296. package/cdn/Popover/index.js +16 -0
  297. package/cdn/Popper/index.js +26 -0
  298. package/cdn/Progress/index.js +58 -0
  299. package/cdn/Querying/index.js +1 -0
  300. package/cdn/Radio/index.js +53 -0
  301. package/cdn/RadioGroup/index.js +53 -0
  302. package/cdn/Search/index.js +144 -0
  303. package/cdn/Select/index.js +131 -0
  304. package/cdn/SelectInput/index.js +131 -0
  305. package/cdn/SingleBox/index.js +131 -0
  306. package/cdn/Slider/index.js +16 -0
  307. package/cdn/Split/index.js +1 -0
  308. package/cdn/Stepper/index.js +154 -0
  309. package/cdn/Switch/index.js +71 -0
  310. package/cdn/Table/index.js +292 -0
  311. package/cdn/Tabs/index.js +165 -0
  312. package/cdn/Tag/index.js +27 -0
  313. package/cdn/Test/index.js +1 -0
  314. package/cdn/TextField/index.js +105 -0
  315. package/cdn/TimePicker/index.js +185 -0
  316. package/cdn/Timeline/index.js +16 -0
  317. package/cdn/ToggleButton/index.js +79 -0
  318. package/cdn/Tooltip/index.js +40 -0
  319. package/cdn/Transfer/index.js +170 -0
  320. package/cdn/Tree/index.js +170 -0
  321. package/cdn/Upload/index.js +252 -0
  322. package/index.d.ts +128 -128
  323. package/index.js +19 -160
  324. package/package.json +21 -54
  325. package/style.css +72 -0
  326. package/Dropdown/index.d.ts +0 -25
  327. package/Dropdown/index.js +0 -67
  328. package/Tabs/lang/en_US.d.ts +0 -4
  329. package/Tabs/lang/index.d.ts +0 -9
  330. package/Tabs/lang/zh_CN.d.ts +0 -4
  331. package/Timeline/TimelineItem.d.ts +0 -23
  332. package/Tooltip/interface.d.ts +0 -21
  333. package/Tooltip/utils.d.ts +0 -22
  334. package/_verture/defineProperty-0590dc61.js +0 -16
  335. package/_verture/index-2c0ecd8d.js +0 -778
  336. package/_verture/index-342379c6.js +0 -391
  337. package/_verture/index-a369ca3f.js +0 -4
  338. package/_verture/index-e2881a53.js +0 -16
  339. package/_verture/index-ee85b1cd.js +0 -1555
  340. package/_verture/intl-336570e4.js +0 -65
  341. package/_verture/modalContext-e7cc8067.js +0 -228
  342. package/_verture/slicedToArray-d7722f4b.js +0 -62
  343. package/_verture/style-inject.es-300983ab.js +0 -28
  344. package/_verture/toConsumableArray-f8047a75.js +0 -19
  345. package/_verture/tslib.es6-55ed4bd2.js +0 -38
  346. package/_verture/typeof-498dd2b1.js +0 -11
  347. package/_verture/useFormatMessage-ac9d6acf.js +0 -20
  348. package/_verture/useGlobalProps-af9a2af6.js +0 -12
@@ -1,270 +1,14 @@
1
- import { _ as _toConsumableArray } from '../_verture/toConsumableArray-f8047a75.js';
2
- import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
4
- import { useState, useEffect, useMemo } from 'react';
5
- import { TextField } from '../TextField/index.js';
6
- import HelperText from '../HelperText/index.js';
7
- import { MultiBox } from '../MultiBox/index.js';
8
- import { Popover } from '../Popover/index.js';
9
- import Application from '@para-ui/icons/Application';
10
- import { GetLanguage, ArrayToObject } from '@paraview/lib';
11
- import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
12
- import '../_verture/typeof-498dd2b1.js';
13
- import '../_verture/tslib.es6-55ed4bd2.js';
14
- import '../Label/index.js';
15
- import '../Help/index.js';
16
- import '../Tooltip/index.js';
17
- import 'rc-tooltip';
18
- import 'rc-tooltip/lib/placements';
19
- import 'clsx';
20
- import '@para-ui/icons/Help';
21
- import '@para-ui/icons/PreviewClose';
22
- import '@para-ui/icons/PreviewOpen';
23
- import '@para-ui/icons/CloseCircle';
24
- import '../AutoTips/index.js';
25
- import '../Loading/index.js';
26
- import '@para-ui/icons/LoadingF';
27
- import '../_verture/useGlobalProps-af9a2af6.js';
28
- import '@para-ui/core/GlobalContext';
29
- import '../Dropdown/index.js';
30
- import 'rc-dropdown';
31
- import '@para-ui/icons/Plus';
32
- import '@para-ui/icons/Delete';
33
-
34
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-input-lang {\n display: inline-block;\n width: 100%;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-input-lang .paraui-text-field > .text-field-content > .text-field-content-after {\n cursor: pointer;\n}\n.paraui-input-lang .paraui-text-field > .text-field-content > .text-field-content-after .lang-list-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-input-lang .paraui-text-field > .paraui-helper-text {\n display: none;\n}\n\n.paraui-input-lang-popover > .paraui-popover-content > .paraui-popover-inner {\n padding: 12px;\n width: 300px;\n line-height: 0;\n}\n.paraui-input-lang-popover > .paraui-popover-content > .paraui-popover-inner .paraui-multi-box {\n padding-bottom: 0;\n}";
35
- styleInject(css_248z);
36
-
37
- var InputLang = function InputLang(props) {
38
- var _props$className = props.className,
39
- className = _props$className === void 0 ? '' : _props$className,
40
- style = props.style,
41
- _props$label = props.label,
42
- label = _props$label === void 0 ? '' : _props$label,
43
- labelTooltip = props.labelTooltip,
44
- _props$size = props.size,
45
- size = _props$size === void 0 ? 'large' : _props$size,
46
- _props$placeholder = props.placeholder,
47
- placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
48
- _props$placeholderKey = props.placeholderKey,
49
- placeholderKey = _props$placeholderKey === void 0 ? '' : _props$placeholderKey,
50
- _props$placeholderVal = props.placeholderValue,
51
- placeholderValue = _props$placeholderVal === void 0 ? '' : _props$placeholderVal,
52
- _props$error = props.error,
53
- error = _props$error === void 0 ? false : _props$error,
54
- _props$helperText = props.helperText,
55
- helperText = _props$helperText === void 0 ? '' : _props$helperText,
56
- _props$required = props.required,
57
- required = _props$required === void 0 ? false : _props$required,
58
- popoverClassName = props.popoverClassName,
59
- value = props.value,
60
- onChange = props.onChange,
61
- _props$langList = props.langList,
62
- langList = _props$langList === void 0 ? ['zh', 'en'] : _props$langList,
63
- _props$disabled = props.disabled,
64
- disabled = _props$disabled === void 0 ? false : _props$disabled;
65
-
66
- var _useState = useState(false),
67
- _useState2 = _slicedToArray(_useState, 2),
68
- open = _useState2[0],
69
- setOpen = _useState2[1]; // 打开弹窗
70
-
71
-
72
- var _useState3 = useState(GetLanguage() || 'zh'),
73
- _useState4 = _slicedToArray(_useState3, 1),
74
- lang = _useState4[0]; // 当前语言
75
-
76
-
77
- var _useState5 = useState({}),
78
- _useState6 = _slicedToArray(_useState5, 2),
79
- valueCom = _useState6[0],
80
- setValueCom = _useState6[1];
81
-
82
- var _useState7 = useState([]),
83
- _useState8 = _slicedToArray(_useState7, 2),
84
- valueListLang = _useState8[0],
85
- setValueListLang = _useState8[1];
86
-
87
- useEffect(function () {
88
- if (props.defaultValue !== undefined) {
89
- handValue(props.defaultValue);
90
- }
91
- }, []);
92
- useEffect(function () {
93
- if (value !== undefined) {
94
- handValue(value);
95
- }
96
- }, [value]);
97
- /**
98
- * 处理值
99
- */
100
-
101
- var handValue = function handValue(val) {
102
- var valueHand = Object.assign({}, val);
103
- if (valueHand[lang] === undefined) valueHand[lang] = '';
104
- var keyArr = Object.keys(valueHand);
105
- var arr = [];
106
-
107
- for (var i = 0, l = keyArr.length; i < l; i++) {
108
- var key = keyArr[i];
109
- var _val = valueHand[key];
110
- if (key !== lang) arr.push({
111
- label: key,
112
- value: _val
113
- });
114
- }
115
-
116
- setValueListLang(arr);
117
- setValueCom(valueHand);
118
- };
119
- /**
120
- * 改变当前语言
121
- * @param event
122
- */
123
-
124
-
125
- var changeValue = function changeValue(event) {
126
- valueCom[lang] = event.target.value;
127
- var val = Object.assign({}, valueCom);
128
- if (props.value === undefined) setValueCom(val);
129
- onChange && onChange(val);
130
- };
131
- /**
132
- * 改变弹窗语言值
133
- * @param val
134
- */
135
-
136
-
137
- var changeListLang = function changeListLang(val) {
138
- setValueListLang(_toConsumableArray(val));
139
- };
140
- /** 模糊搜索 */
141
-
142
-
143
- var fetchSuggestionsKey = function fetchSuggestionsKey(val, cb) {
144
- var arr = [];
145
- var jsonMapping = ArrayToObject('label', valueListLang);
146
-
147
- for (var i = 0, l = langList.length; i < l; i++) {
148
- var item = langList[i];
149
- if (!jsonMapping[item] && item !== lang) arr.push({
150
- label: item,
151
- value: item
152
- });
153
- }
154
-
155
- cb(arr);
156
- };
157
- /** 点击国际化图标 */
158
-
159
-
160
- var clickAfter = function clickAfter() {
161
- setOpen(true);
162
- };
163
- /** 关闭弹窗 */
164
-
165
-
166
- var handleClose = function handleClose(bol) {
167
- if (bol) return;
168
- setOpen(false); // 向外抛值
169
-
170
- var json = {};
171
- json[lang] = valueCom[lang];
172
-
173
- for (var i = 0, l = valueListLang.length; i < l; i++) {
174
- var item = valueListLang[i];
175
- if (item.label) json[item.label] = item.value || '';
176
- }
177
-
178
- if (props.value === undefined) setValueCom(Object.assign({}, json));
179
- onChange && onChange(Object.assign({}, json));
180
- };
181
- /** 当前语言 */
182
-
183
-
184
- var AddonBeforeMemo = useMemo(function () {
185
- return jsx("div", {
186
- children: lang
187
- });
188
- }, [lang]);
189
- /** 加载更多语言 */
190
-
191
- var AddonAfterMemo = useMemo(function () {
192
- return jsx("div", Object.assign({
193
- className: "lang-list-icon"
194
- }, {
195
- children: jsx(Application, {})
196
- }));
197
- }, []);
198
- /** 处理弹出框className */
199
-
200
- var popoverHandClass = function popoverHandClass() {
201
- var str = 'paraui-input-lang-popover';
202
- if (popoverClassName) str += ' ' + popoverClassName;
203
- return str;
204
- };
205
- /** 弹窗列表内容 */
206
-
207
-
208
- var langListPopoverContent = function langListPopoverContent() {
209
- return jsx("div", Object.assign({
210
- className: "input-lang-list"
211
- }, {
212
- children: jsx(MultiBox, {
213
- size: size,
214
- disabled: disabled,
215
- value: valueListLang,
216
- onChange: changeListLang,
217
- fetchSuggestionsKey: fetchSuggestionsKey,
218
- placeholderKey: placeholderKey,
219
- placeholderValue: placeholderValue
220
- })
221
- }));
222
- };
223
- /**
224
- * 处理class
225
- * @return {string}
226
- */
227
-
228
-
229
- var handClass = function handClass() {
230
- var str = 'paraui-input-lang input-lang';
231
- if (size) str += ' input-lang-' + size;
232
- if (error) str += ' paraui-input-lang-error';
233
- if (className) str += ' ' + className;
234
- return str;
235
- };
236
-
237
- return jsxs("div", Object.assign({
238
- className: handClass(),
239
- style: style
240
- }, {
241
- children: [jsx(Popover, Object.assign({
242
- placement: "bottom-end",
243
- visible: open,
244
- content: langListPopoverContent(),
245
- onVisibleChange: handleClose,
246
- overlayClassName: popoverHandClass()
247
- }, {
248
- children: jsx(TextField, {
249
- size: size,
250
- error: error,
251
- disabled: disabled,
252
- required: required,
253
- label: label,
254
- labelTooltip: labelTooltip,
255
- placeholder: placeholder,
256
- value: valueCom[lang],
257
- addonAfter: AddonAfterMemo,
258
- addonBefore: AddonBeforeMemo,
259
- onClickAddonAfter: clickAfter,
260
- onChange: changeValue
261
- })
262
- })), jsx(HelperText, {
263
- className: "paraui-lang-error-text",
264
- error: error,
265
- helperText: helperText
266
- })]
267
- }));
268
- };
269
-
270
- export { InputLang, InputLang as default };
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help"),require("@paraview/lib"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/LoadingF"),require("@para-ui/core/GlobalContext"),require("@para-ui/icons/Plus"),require("@para-ui/icons/Delete"),require("@para-ui/icons/Application")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","clsx","@para-ui/icons/Help","@paraview/lib","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/CloseCircle","@para-ui/icons/LoadingF","@para-ui/core/GlobalContext","@para-ui/icons/Plus","@para-ui/icons/Delete","@para-ui/icons/Application"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help"),require("@paraview/lib"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/LoadingF"),require("@para-ui/core/GlobalContext"),require("@para-ui/icons/Plus"),require("@para-ui/icons/Delete"),require("@para-ui/icons/Application")):e.ParaUI=t(e.react,e["@material-ui/core"],e.clsx,e["@para-ui/icons/Help"],e["@paraview/lib"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/CloseCircle"],e["@para-ui/icons/LoadingF"],e["@para-ui/core/GlobalContext"],e["@para-ui/icons/Plus"],e["@para-ui/icons/Delete"],e["@para-ui/icons/Application"])}(self,(function(e,t,i,n,o,r,a,l,c,u,s,d,p){return function(){var f={2565:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-auto-tips{max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips>.auto-tips-content{display:inline;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips-tooltip>div{max-height:calc(100vh - 25px);overflow:auto}",""]),e.exports=t},7381:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),e.exports=t},9916:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-helper-text{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:12px;font-weight:400;padding-left:12px;line-height:20px;color:rgba(46,55,67,.7)}.paraui-helper-text.paraui-helper-text-error{color:#eb6054}",""]),e.exports=t},3603:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-input-lang{display:inline-block;width:100%;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-input-lang>.paraui-text-field>.text-field-content>.text-field-content-after{cursor:pointer}.paraui-input-lang>.paraui-text-field>.text-field-content>.text-field-content-after .lang-list-icon{display:flex;align-items:center;justify-content:center}.paraui-input-lang-popover>.paraui-popover-paper{margin-top:8px}.paraui-input-lang-popover>.paraui-popover-paper>.input-lang-list{padding:12px;width:300px;line-height:0}.paraui-input-lang-popover>.paraui-popover-paper>.input-lang-list .paraui-multi-box{padding-bottom:0}",""]),e.exports=t},4928:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),e.exports=t},5714:function(e,t,i){(t=i(3645)(!1)).push([e.id,"@keyframes rotateLoading{0%{transformOrigin:50% 50%}100%{transform:rotate(360deg)}}.paraui-loading{position:absolute;left:0;top:0;width:100%;height:100%}.paraui-loading .paraui-loading-mask{position:absolute;width:100%;height:100%;background-color:#fff;z-index:1}.paraui-loading .paraui-loading-box{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:2}.paraui-loading .paraui-loading-box>svg{transition:all .3s ease-in-out;animation:rotateLoading 1s infinite linear;font-size:20px}",""]),e.exports=t},7843:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-multi-box{display:inline-block;width:100%;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-multi-box>.multi-box-content{line-height:0}.paraui-multi-box>.multi-box-content>.multi-box-content-item{padding-bottom:15px;display:flex}.paraui-multi-box>.multi-box-content>.multi-box-content-item>.multi-box-content-item-input{width:calc(100% - 30px);display:flex}.paraui-multi-box>.multi-box-content>.multi-box-content-item>.multi-box-content-item-input>.text-field{width:calc(50% - 10px)}.paraui-multi-box>.multi-box-content>.multi-box-content-item>.multi-box-content-item-input>.text-field>.paraui-helper-text{display:none}.paraui-multi-box>.multi-box-content>.multi-box-content-item>.multi-box-content-item-input>span{display:flex;align-items:center;justify-content:center;width:20px}.paraui-multi-box>.multi-box-content>.multi-box-content-item>.single-box-content-item-svg{display:flex;align-items:center;justify-content:center;width:30px;cursor:pointer}.paraui-multi-box>.multi-box-add{text-align:center;border:1px dashed;border-color:rgba(171,176,185,.4);display:flex;align-items:center;justify-content:center;border-radius:4px;cursor:pointer;background-color:#fff}.paraui-multi-box>.multi-box-add>svg{font-size:24px}.paraui-multi-box>.multi-box-add:hover{border-color:#3666d6;color:#3666d6}.paraui-multi-box.multi-box-small>.multi-box-add{height:28px}.paraui-multi-box.multi-box-medium>.multi-box-add{height:32px}.paraui-multi-box.multi-box-large>.multi-box-add{height:36px}.paraui-multi-box.multi-box-disabled>.multi-box-content>.multi-box-content-item>.single-box-content-item-svg{cursor:not-allowed}.paraui-multi-box.multi-box-disabled>.multi-box-content>.multi-box-content-item>.single-box-content-item-svg>svg{color:rgba(46,55,67,.7)}.paraui-multi-box.multi-box-disabled>.multi-box-add{border-color:rgba(171,176,185,.4);cursor:not-allowed;background-color:rgba(171,176,185,.12);color:rgba(46,55,67,.7)}.paraui-multi-box.multi-box-disabled>.multi-box-add>svg{color:rgba(46,55,67,.7)}.paraui-multi-box.multi-box-disabled>.multi-box-add:hover{border-color:rgba(171,176,185,.4);color:rgba(46,55,67,.7)}",""]),e.exports=t},5845:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-popover-paper{box-shadow:0px 2px 8px 0px rgba(171,176,185,.4)}",""]),e.exports=t},3637:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-text-field{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;display:inline-block;width:100%}.paraui-text-field>.text-field-content{border:1px solid;border-radius:4px;border-color:rgba(171,176,185,.4);display:flex;width:100%;position:relative;background-color:#fff}.paraui-text-field>.text-field-content:hover{border-color:#3666d6}.paraui-text-field>.text-field-content>.text-field-content-before{color:#2e3743;padding:0 12px;border-right:1px solid rgba(171,176,185,.4);background-color:rgba(171,176,185,.12);border-bottom-left-radius:4px;border-top-left-radius:4px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-before svg{font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within{position:relative;display:flex;flex-grow:1}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon svg{color:rgba(46,55,67,.7);font-size:16px}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon:hover svg{color:rgba(54,102,214,.8)}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer;color:rgba(46,55,67,.7);position:relative;z-index:1}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon.right-icon-password:hover svg{color:rgba(54,102,214,.8)}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon svg{color:rgba(46,55,67,.7);font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within>.length-limit{display:flex;height:100%;align-items:center;margin-right:12px;color:rgba(46,55,67,.7)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input{width:100%;line-height:0;position:relative}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-outer-spin-button,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-inner-spin-button{-webkit-appearance:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input[type=number]{-moz-appearance:textfield}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{width:100%;height:100%}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{width:100% !important;padding:12px;resize:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{font-size:14px;color:#2e3743;border:0;border-radius:4px;background:rgba(0,0,0,0)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-clear,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-clear{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-reveal,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-reveal{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input:disabled,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea:disabled{background-color:rgba(0,0,0,0)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{width:100%;position:absolute;left:0;top:0;height:100%;padding:0 12px;color:rgba(46,55,67,.4);cursor:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder>.text-field-required{margin-left:2px;color:#eb6054}.paraui-text-field>.text-field-content>.text-field-content-after{color:#2e3743;padding:0 12px;border-left:1px solid rgba(171,176,185,.4);background-color:rgba(171,176,185,.12);border-bottom-right-radius:4px;border-top-right-radius:4px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-after svg{font-size:20px}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.clean-up-icon{display:none}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{position:absolute;height:22px;bottom:0;border-radius:4px;width:calc(100% - 12px);background:#fff;justify-content:flex-end;padding-bottom:8px;margin-right:0}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{padding-top:12px;line-height:1;height:calc(100% - 24px)}.paraui-text-field.text-field-disabled>.text-field-content{background-color:rgba(171,176,185,.12)}.paraui-text-field.text-field-disabled>.text-field-content:hover{border-color:rgba(171,176,185,.4)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-before{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-after{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-disabled.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-error>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-error>.text-field-content:hover{border-color:#eb6054}.paraui-text-field.text-field-limit>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-limit>.text-field-content:hover{border-color:#eb6054 !important}.paraui-text-field.text-field-limit-length>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{padding-bottom:25px}.paraui-text-field.text-field-focus>.text-field-content{border-color:#3666d6}.paraui-text-field.text-field-small>.text-field-content{height:28px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-before{line-height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:6px 12px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:26px}.paraui-text-field.text-field-small>.text-field-content .text-field-content-after{line-height:26px}.paraui-text-field.text-field-medium>.text-field-content{height:32px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-before{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:8px 12px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content .text-field-content-after{line-height:30px}.paraui-text-field.text-field-large>.text-field-content{height:36px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-before{line-height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:10px 12px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:34px}.paraui-text-field.text-field-large>.text-field-content .text-field-content-after{line-height:34px}.paraui-text-field.text-field-resize>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{resize:both}.paraui-text-field-select.paraui-tooltip>div{max-width:none;padding:0;background-color:#fff;box-shadow:0px 2px 8px 0px rgba(171,176,185,.4);border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-text-field-select.paraui-tooltip>div>span{color:#fff}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content{max-height:300px;overflow:auto}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item{display:flex;cursor:pointer;color:#2e3743;padding:0 12px}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item:hover{background-color:rgba(171,176,185,.12);color:#3666d6}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item.text-field-select-content-item-keydown{background-color:rgba(171,176,185,.12);color:#3666d6}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content.text-field-select-content-loading{height:100px;position:relative;overflow:hidden}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-small>div .text-field-select-content>.text-field-select-content-item{line-height:28px}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-medium>div .text-field-select-content>.text-field-select-content-item{line-height:32px}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-large>div .text-field-select-content>.text-field-select-content-item{line-height:36px}.paraui-text-field-select.paraui-text-field-select-data.paraui-tooltip{padding:8px 0}",""]),e.exports=t},9929:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-tooltip>div{padding-left:12px;padding-right:12px;font-size:14px;font-weight:400;color:#fff;background-color:rgba(46,55,67,.7)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}",""]),e.exports=t},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var o=(a=n,l=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(c," */")),r=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[i].concat(r).concat([o]).join("\n")}var a,l,c;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);n&&o[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),t.push(c))}},t}},7418:function(e){"use strict";
2
+ /*
3
+ object-assign
4
+ (c) Sindre Sorhus
5
+ @license MIT
6
+ */var t=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var a,l,c=o(e),u=1;u<arguments.length;u++){for(var s in a=Object(arguments[u]))i.call(a,s)&&(c[s]=a[s]);if(t){l=t(a);for(var d=0;d<l.length;d++)n.call(a,l[d])&&(c[l[d]]=a[l[d]])}}return c}},5251:function(e,t,i){"use strict";
7
+ /** @license React v17.0.2
8
+ * react-jsx-runtime.production.min.js
9
+ *
10
+ * Copyright (c) Facebook, Inc. and its affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */i(7418);var n=i(8156),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,i){var n,r={},u=null,s=null;for(n in void 0!==i&&(u=""+i),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)l.call(t,n)&&!c.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:o,type:e,key:u,ref:s,props:r,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,i){"use strict";e.exports=i(5251)},9271:function(e,t,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2113:function(e,t,i){var n=i(3379),o=i(7381);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3936:function(e,t,i){var n=i(3379),o=i(9916);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},7712:function(e,t,i){var n=i(3379),o=i(3603);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},9663:function(e,t,i){var n=i(3379),o=i(4928);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3492:function(e,t,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},5415:function(e,t,i){var n=i(3379),o=i(7843);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},8939:function(e,t,i){var n=i(3379),o=i(5845);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},6202:function(e,t,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2310:function(e,t,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3379:function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),a=[];function l(e){for(var t=-1,i=0;i<a.length;i++)if(a[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],o=0;o<e.length;o++){var r=e[o],c=t.base?r[0]+t.base:r[0],u=i[c]||0,s="".concat(c," ").concat(u);i[c]=u+1;var d=l(s),p={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:s,updater:b(p,t),references:1}),n.push(s)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,d=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function p(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var r=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function f(e,t,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var x=null,h=0;function b(e,t){var i,n,o;if(t.singleton){var r=h++;i=x||(x=u(t)),n=p.bind(null,i,r,!1),o=p.bind(null,i,r,!0)}else i=u(t),n=f.bind(null,i,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var i=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=l(i[n]);a[o].references--}for(var r=c(e,t),u=0;u<i.length;u++){var s=l(i[u]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}i=r}}}},7839:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(7371),a=(i(9271),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.children,i=e.arrow,l=void 0!==i&&i,c=e.placement,u=void 0===c?"bottom-start":c,s=e.tips,d=void 0===s?"":s,p=e.className,f=void 0===p?"":p,x=e.beyondText,h=void 0===x||x,b=e.interactive,v=void 0===b||b,g=e.style,m=(0,o.useRef)(),y=(0,o.useState)(""),w=y[0],j=y[1];(0,o.useEffect)((function(){j(d)}),[d]);var S;return(0,n.jsx)("div",a({ref:m,className:(S="paraui-auto-tips",f&&(S+=" "+f),S),onMouseOver:function(){var e="";m.current&&m.current.scrollWidth>m.current.offsetWidth&&(e=d||(h?m.current.innerText:t)),j(e)},style:g},{children:(0,n.jsx)(r.default,a({arrow:l,title:w,placement:u,interactive:v,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,n.jsx)("div",a({className:"auto-tips-content"},{children:t}))}))}))}},3566:function(e,t,i){"use strict";var n=i(5893),o=i(7371),r=i(8076),a=i.n(r),l=i(5744),c=i.n(l),u=(i(2113),function(){return u=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)}),s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t=e.title,i=void 0===t?"":t,r=e.children,l=e.arrow,d=void 0===l||l,p=e.interactive,f=void 0===p||p,x=e.className,h=e.placement,b=void 0===h?"top-start":h,v=s(e,["title","children","arrow","interactive","className","placement"]);return(0,n.jsx)(o.default,u({title:i,arrow:d,interactive:f,placement:b},v,{children:(0,n.jsx)("span",u({className:c()("paraui-help",x)},{children:r||(0,n.jsx)(a(),{})}))}))}},4254:function(e,t,i){"use strict";var n=i(5893),o=(i(3936),function(){return o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)});t.default=function(e){var t,i=e.className,r=e.style,a=e.error,l=void 0!==a&&a,c=e.helperText;return(0,n.jsx)("p",o({className:(t="paraui-helper-text",i&&(t+=" "+i),l&&(t+=" paraui-helper-text-error"),t),style:r},{children:c}))}},6010:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(8156),o=i.n(n),r=i(5395),a=i.n(r),l=function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function c(e,t){var i=o().useContext(a()).componentsProps,n=i&&i[t];return l(l({},n),e)}},8767:function(e,t,i){"use strict";var n=i(5893),o=i(3566),r=(i(9663),function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,a=e.label,l=e.labelSign,c=e.required,u=void 0!==c&&c,s=e.tooltip,d=e.tooltipType,p=void 0===d?"icon":d,f=e.placement,x=e.arrow,h=e.tooltipIcon,b=function(){var e="paraui-label";return p&&(e+=" paraui-label-"+p),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,n.jsxs)(n.Fragment,{children:["icon"===p&&(0,n.jsxs)("label",r({className:b(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:a}),u&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),l&&(0,n.jsx)("span",{children:l}),s&&(0,n.jsx)(o.default,r({title:s,placement:f,arrow:x},{children:h}))]})),"line"===p&&(0,n.jsx)(o.default,r({title:s||"",placement:f,arrow:x},{children:(0,n.jsxs)("label",r({className:b(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:a}),u&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),l&&(0,n.jsx)("span",{children:l})]}))}))]})}},7502:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(2788),a=i.n(r),l=(i(3492),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,r=e.opacity,c=void 0===r?.7:r,u=(0,o.useRef)(null);(0,o.useEffect)((function(){u&&u.current&&u.current.parentNode&&(u.current.parentNode.style.position||(u.current.parentNode.style.position="relative"))}),[]);var s;return(0,n.jsxs)("div",l({className:(s="paraui-loading",t&&(s+=" "+t),s),style:i,ref:u},{children:[(0,n.jsx)("div",l({className:"paraui-loading-box"},{children:(0,n.jsx)(a(),{})})),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7853:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(7320),a=i(8767),l=i(4254),c=i(1632),u=i.n(c),s=i(4104),d=i.n(s),p=(i(5415),function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)}),f=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};t.default=function(e){var t=e.className,i=e.style,c=e.size,s=void 0===c?"large":c,x=e.placeholderKey,h=void 0===x?"":x,b=e.placeholderValue,v=void 0===b?"":b,g=e.label,m=void 0===g?"":g,y=e.labelTooltip,w=e.labelSign,j=e.disabled,S=void 0!==j&&j,O=e.required,C=void 0!==O&&O,N=e.error,k=void 0!==N&&N,P=e.helperText,M=void 0===P?"":P,q=e.value,E=e.replaceFields,_=e.onChange,z=e.fetchSuggestionsKey,F=e.fetchSuggestionsValue,T=(0,o.useState)([]),H=T[0],L=T[1],I=(0,o.useState)({key:"label",value:"value"}),A=I[0],B=I[1];(0,o.useEffect)((function(){void 0!==e.defaultValue&&L(f([],e.defaultValue,!0))}),[]),(0,o.useEffect)((function(){void 0!==q&&L(f([],q,!0))}),[q]),(0,o.useEffect)((function(){if(E){var e=p(p({},A),E);B(e)}}),[E]);var D,K=function(t){return function(){S||(H.splice(t,1),void 0===e.value&&L(f([],H,!0)),_&&_(H))}},R=function(t,i){return function(n){H[i][t]=n.target.value,void 0===e.value&&L(f([],H,!0)),_&&_(H)}},U=function(e){return function(t,i){"key"===e?z&&z(t,i):F&&F(t,i)}},Y=function(t,i){return function(n){H[i][t]=n,"object"==typeof n&&null!==n&&(H[i][t]=n.value),void 0===e.value&&L(f([],H,!0)),_&&_(H)}};return(0,n.jsxs)("div",p({className:(D="paraui-multi-box multi-box",t&&(D+=" "+t),s&&(D+=" multi-box-"+s),k&&(D+=" multi-box-error"),S&&(D+=" multi-box-disabled"),D),style:i},{children:[function(){if(!m&&!w)return null;var e;return(0,n.jsx)(a.default,p({label:m,required:C,labelSign:w},y,{className:(e="multi-box-label",y&&y.className&&(e+=" "+y.className),e)}))}(),(0,n.jsx)("div",p({className:"multi-box-content"},{children:H.map((function(e,t){return(0,n.jsxs)("div",p({className:"multi-box-content-item"},{children:[(0,n.jsxs)("div",p({className:"multi-box-content-item-input"},{children:[(0,n.jsx)(r.default,{size:s,disabled:S,placeholder:h,value:e[A.key||""],onChange:R(A.key||"",t),fetchSuggestions:z?U("key"):void 0,onSelect:Y(A.key||"",t)}),(0,n.jsx)("span",{children:":"}),(0,n.jsx)(r.default,{size:s,disabled:S,placeholder:v,value:e[A.value||""],onChange:R(A.value||"",t),fetchSuggestions:F?U("value"):void 0,onSelect:Y(A.value||"",t)})]})),(0,n.jsx)("span",p({className:"single-box-content-item-svg"},{children:(0,n.jsx)(d(),{onClick:K(t)})}))]}),t)}))})),(0,n.jsx)("div",p({className:"multi-box-add",onClick:function(){S||(H.push({}),void 0===e.value&&L(f([],H,!0)),_&&_(H))}},{children:(0,n.jsx)(u(),{})})),(0,n.jsx)(l.default,{className:"multi-box-error-text",error:k,helperText:M})]}))}},7083:function(e,t,i){"use strict";var n=i(5893),o=i(670),r=(i(8939),function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)}),a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t,i=e.className,l=e.children,c=e.classes,u=e.style,s=a(e,["className","children","classes","style"]);return(0,n.jsx)(o.Popover,r({style:r({zIndex:1300},u),className:(t="paraui-popover",i&&(t+=" "+i),t),classes:{paper:c?"paraui-popover-paper ".concat(c):"paraui-popover-paper"}},s,{children:l}))}},7320:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(8767),a=i(8543),l=i(5428),c=i.n(l),u=i(9979),s=i.n(u),d=i(6788),p=i.n(d),f=i(7839),x=i(7502),h=i(7371),b=i(4254),v=i(6010),g=(i(6202),function(){return g=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)}),m=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},y=function(e){return"number"==typeof e&&!isNaN(e)};t.default=function(e){var t=(0,v.Z)(e,"TextField"),i=t.className,l=t.style,u=t.size,d=void 0===u?"large":u,w=t.labelMode,j=void 0===w?"outside":w,S=t.placeholder,O=void 0===S?"":S,C=t.label,N=void 0===C?"":C,k=t.labelTooltip,P=t.disabled,M=void 0!==P&&P,q=t.multiline,E=void 0!==q&&q,_=t.required,z=void 0!==_&&_,F=t.labelSign,T=t.rows,H=void 0===T?2:T,L=t.error,I=void 0!==L&&L,A=t.helperText,B=void 0===A?"":A,D=t.addonBefore,K=void 0===D?"":D,R=t.addonAfter,U=void 0===R?"":R,Y=(t.defaultValue,t.value),V=t.autoFocus,J=void 0!==V&&V,W=t.type,Q=void 0===W?"text":W,G=t.onClickIcon,Z=t.rightIcon,$=t.showRightIcon,X=void 0===$||$,ee=t.allowClear,te=void 0!==ee&&ee,ie=t.limitLength,ne=t.fetchSuggestions,oe=t.selectPopoverClass,re=t.renderSelectItem,ae=t.showSelectName,le=void 0===ae?"value":ae,ce=t.resize,ue=void 0===ce||ce,se=t.onBlur,de=t.onFocus,pe=t.onChange,fe=t.onKeydown,xe=t.onKeyUp,he=t.onEnter,be=t.onClickAddonBefore,ve=t.onClickAddonAfter,ge=t.onSelect,me=t.onClear,ye=m(t,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","allowClear","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),we=(0,o.useState)("text-field-select-content-"+(0,a.UUID)())[0],je=(0,o.useState)(!0),Se=je[0],Oe=je[1],Ce=(0,o.useState)(""),Ne=Ce[0],ke=Ce[1],Pe=(0,o.useState)(!1),Me=Pe[0],qe=Pe[1],Ee=(0,o.useState)("text"),_e=Ee[0],ze=Ee[1],Fe=(0,o.useState)(!1),Te=Fe[0],He=Fe[1],Le=(0,o.useState)(!1),Ie=Le[0],Ae=Le[1],Be=(0,o.useState)([]),De=Be[0],Ke=Be[1],Re=(0,o.useRef)(null),Ue=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&ke(e.defaultValue)}),[]),(0,o.useEffect)((function(){Q!==_e&&ze(Q)}),[Q]),(0,o.useEffect)((function(){void 0!==Y&&ke(Y)}),[Y]),(0,o.useEffect)((function(){Oe(""===Ne||void 0===Ne)}),[Ne]),(0,o.useEffect)((function(){ne&&He(Me)}),[Me,ne]),(0,o.useEffect)((function(){return Te?window.addEventListener("keydown",Ge):window.removeEventListener("keydown",Ge),function(){window.removeEventListener("keydown",Ge)}}),[Te]),(0,o.useEffect)((function(){if(!Me&&Ne){var t=Ve(Ne);if(t!==Ne){var i={};i.target=Re.current,i.target.value=t,void 0===e.value&&ke(t),e.onChange&&e.onChange(i)}}}),[Ne,Me]);var Ye,Ve=function(t){var i=t;return y(e.limitLength)&&t.toString().length>Number(e.limitLength)&&(i=i.toString().substr(0,e.limitLength)),i},Je=function(){M||(Oe(!1),(Re&&Re.current).focus())},We=function(e){var t=e.selectDom,i=e.keyCode,n=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===i&&(o="previousSibling",r=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(r)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Qe(n,t))},Qe=function(e,t){var i=t.clientHeight,n=e.offsetTop+e.clientHeight-i;t.scrollTop=n>0?n:0},Ge=function(e){var t=document.querySelector("."+we),i=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;at(JSON.parse(o))(e),(Re&&Re.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&We({selectDom:t,keyCode:e.keyCode,currentDom:i}),38===e.keyCode&&We({selectDom:t,keyCode:e.keyCode,currentDom:i})},Ze=function(e){qe(!1),""===e.target.value&&Oe(!0),se&&se(e)},$e=function(e){ne&&(Ae(!0),ne(e,(function(e){Ke(e||[]),Ae(!1)})))},Xe=function(e){qe(!0),de&&de(e),$e(e.target.value)},et=function(t){var i=t.target.value;i&&Oe(!1),void 0===e.value&&ke(i),pe&&pe(t),$e(t.target.value)},tt=function(e){13===e.keyCode&&he&&he(e),fe&&fe(e)},it=function(e){xe&&xe(e)},nt=function(e){"password"===Q&&("text"===_e&&ze("password"),"password"===_e&&ze("text")),G&&G(e)},ot=function(){return void 0===e.value?Ne:Y},rt=function(){He(!1)},at=function(e){return function(t){ge&&ge(e)}},lt=(0,o.useMemo)((function(){return(0,n.jsx)(n.Fragment,{children:y(ie)&&(0,n.jsx)("span",g({className:"length-limit"},{children:(Ne?Ne.toString().length:0)+"/"+ie}))})}),[ie,Ne]),ct=(0,o.useMemo)((function(){var e=Z||("password"===Q?"password"===_e?(0,n.jsx)(c(),{}):(0,n.jsx)(s(),{}):null);return(0,n.jsx)(n.Fragment,{children:X&&e&&(0,n.jsx)("span",g({className:"password"===Q?"right-icon right-icon-password":"right-icon",onClick:nt},{children:e}))})}),[X,Z,Q,_e,G]),ut=function(){var t=Re.current;t.value="",void 0===e.value&&ke(""),pe&&pe({target:t}),$e(""),me&&me()},st=function(){if(ot()&&!M&&te)return(0,n.jsx)("span",g({className:"clean-up-icon",onClick:ut},{children:(0,n.jsx)(p(),{})}))},dt=(0,o.useMemo)((function(){return(0,n.jsxs)("div",g({className:"text-field-content-within",ref:Ue},{children:[(0,n.jsxs)("div",g({className:"text-field-content-within-input"},{children:[E?(0,n.jsx)("textarea",g({ref:Re,rows:H,value:ot(),onBlur:Ze,onFocus:Xe,onChange:et,onKeyDown:tt,onKeyUp:it,disabled:M},ye)):(0,n.jsx)("input",g({ref:Re,type:_e,value:ot(),onBlur:Ze,onFocus:Xe,onChange:et,onKeyDown:tt,onKeyUp:it,disabled:M},ye)),Se&&!Me&&(0,n.jsx)("span",g({className:"text-field-label-placeholder",onClick:Je},{children:"outside"===j?O:(0,n.jsxs)(n.Fragment,{children:[N||O,z&&(0,n.jsx)("span",g({className:"text-field-required"},{children:"*"})),F&&(0,n.jsx)("span",{children:F})]})}))]})),st(),lt,ct]}))}),[Se,Me,J,_e,Ne,lt,ct,j,O,N,M,E,H,ye,pe,ne,G,te,me]),pt=(0,o.useMemo)((function(){var e,t=function(e){return"object"==typeof e&&null!==e?e[le]:e};return(0,n.jsxs)("div",g({className:(e="text-field-select-content",Ie&&(e+=" text-field-select-content-loading"),we&&(e+=" "+we),e),style:{width:(Ue&&Ue.current?Ue.current.offsetWidth:0)+"px"}},{children:[De&&De.map((function(e,i){return(0,n.jsx)("div",g({className:"text-field-select-content-item",onMouseDown:at(e),"data-val":JSON.stringify(e)},{children:re?re(e):(0,n.jsx)(f.default,{children:t(e)})}),i)})),Ie&&(0,n.jsx)(x.default,{})]}))}),[Ue,Te,De,re,le,ge,Ie,we]),ft=(0,o.useMemo)((function(){return(0,n.jsx)(h.default,g({open:Te,title:pt,onClose:rt,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",classes:{popper:(e="paraui-text-field-select paraui-scrollbar-small",d&&(e+=" paraui-text-field-select-"+d),oe&&(e+=" "+oe),De.length>0&&(e+=" paraui-text-field-select-data"),e)}},{children:dt}));var e}),[Se,Me,J,_e,Ne,lt,ct,j,O,N,M,E,H,ye,pe,ne,ge,Ue,Te,oe,d,G,De,te,me]),xt=(0,o.useMemo)((function(){var e,t=Boolean(z||F||N);if("outside"===j&&t){return(0,n.jsx)(r.default,g({label:N,required:z,labelSign:F},k,{className:(e="text-field-label",k&&k.className&&(e+=" "+k.className),e)}))}return null}),[j,N,F,z,k]);return(0,n.jsxs)("div",g({className:(Ye="paraui-text-field",Ye+=" text-field",d&&!E&&(Ye+=" text-field-"+d),i&&(Ye+=" "+i),I&&(Ye+=" text-field-error"),Me&&(Ye+=" text-field-focus"),M&&(Ye+=" text-field-disabled"),E&&(Ye+=" text-field-multiline"),y(e.limitLength)&&(Ye+=" text-field-limit-length"),y(e.limitLength)&&Ne&&Ne.toString().length>Number(e.limitLength)&&(Ye+=" text-field-limit"),ue&&(Ye+=" text-field-resize"),ot()&&(Ye+=" text-field-value"),te&&(Ye+=" text-field-allow-clear"),Ye),style:l},{children:[xt,(0,n.jsxs)("div",g({className:"text-field-content"},{children:[K&&(0,n.jsx)("div",g({className:"text-field-content-before",onClick:function(e){be&&be(e)}},{children:K})),ne?ft:dt,U&&(0,n.jsx)("div",g({className:"text-field-content-after",onClick:function(e){ve&&ve(e)}},{children:U}))]})),(0,n.jsx)(b.default,{className:"text-field-error-text",error:I,helperText:B})]}))}},7371:function(e,t,i){"use strict";var n=i(5893),o=i(670),r=i(5744),a=i.n(r),l=(i(2310),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)}),c=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t,i=e.placement,r=void 0===i?"top-start":i,u=e.className,s=e.arrow,d=void 0===s||s,p=e.PopperProps,f=e.boundariesElement,x=void 0===f?"scrollParent":f,h=c(e,["placement","className","arrow","PopperProps","boundariesElement"]),b=l(l({},e.classes),{popper:a()("paraui-tooltip",u,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==r?void 0:r.includes("left"))||(null==r?void 0:r.includes("right")),"paraui-tooltip-top-bottom":(null==r?void 0:r.includes("top"))||(null==r?void 0:r.includes("bottom"))})});return(0,n.jsx)(o.Tooltip,l({},h,{enterTouchDelay:0,arrow:d,placement:r,classes:b,PopperProps:l(l({},p),{modifiers:{preventOverflow:{boundariesElement:x}}})}))}},670:function(e){"use strict";e.exports=t},5395:function(e){"use strict";e.exports=u},2426:function(e){"use strict";e.exports=p},6788:function(e){"use strict";e.exports=l},4104:function(e){"use strict";e.exports=d},8076:function(e){"use strict";e.exports=n},2788:function(e){"use strict";e.exports=c},1632:function(e){"use strict";e.exports=s},5428:function(e){"use strict";e.exports=r},9979:function(e){"use strict";e.exports=a},8543:function(e){"use strict";e.exports=o},5744:function(e){"use strict";e.exports=i},8156:function(t){"use strict";t.exports=e}},x={};function h(e){var t=x[e];if(void 0!==t)return t.exports;var i=x[e]={id:e,exports:{}};return f[e](i,i.exports,h),i.exports}h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var i in t)h.o(t,i)&&!h.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},h.nc=void 0;var b={};return function(){"use strict";h.r(b),h.d(b,{InputLang:function(){return s}});var e=h(5893),t=h(8156),i=h(7320),n=h(7853),o=h(7083),r=h(2426),a=h.n(r),l=h(8543),c=(h(7712),function(){return c=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)}),u=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},s=function(r){var s=r.className,d=void 0===s?"":s,p=r.style,f=r.label,x=void 0===f?"":f,h=r.labelTooltip,b=r.size,v=void 0===b?"large":b,g=r.placeholder,m=void 0===g?"":g,y=r.placeholderKey,w=void 0===y?"":y,j=r.placeholderValue,S=void 0===j?"":j,O=r.error,C=void 0!==O&&O,N=r.helperText,k=void 0===N?"":N,P=r.required,M=void 0!==P&&P,q=r.popoverClassName,E=r.value,_=r.onChange,z=r.langList,F=void 0===z?["zh","en"]:z,T=r.disabled,H=void 0!==T&&T,L=(0,t.useState)(!1),I=L[0],A=L[1],B=(0,t.useState)(null),D=B[0],K=B[1],R=(0,t.useState)("input-lang-"+(0,l.UUID)())[0],U=(0,t.useState)((0,l.GetLanguage)()||"zh")[0],Y=(0,t.useState)({}),V=Y[0],J=Y[1],W=(0,t.useState)([]),Q=W[0],G=W[1];(0,t.useEffect)((function(){void 0!==r.defaultValue&&$(r.defaultValue)}),[]),(0,t.useEffect)((function(){void 0!==E&&$(E)}),[E]);var Z,$=function(e){var t=c({},e);void 0===t[U]&&(t[U]="");for(var i=Object.keys(t),n=[],o=0,r=i.length;o<r;o++){var a=i[o],l=t[a];a!==U&&n.push({label:a,value:l})}G(n),J(t)},X=function(e){G(u([],e,!0))},ee=function(e,t){for(var i=[],n=(0,l.ArrayToObject)("label",Q),o=0,r=F.length;o<r;o++){var a=F[o];n[a]||a===U||i.push({label:a,value:a})}t(i)},te=function(){K(null),A(!1);var e={};e[U]=V[U];for(var t=0,i=Q.length;t<i;t++){var n=Q[t];n.label&&(e[n.label]=n.value||"")}void 0===r.value&&J(c({},e)),_&&_(c({},e))},ie=(0,t.useMemo)((function(){return(0,e.jsx)("div",{children:U})}),[U]),ne=(0,t.useMemo)((function(){return(0,e.jsx)("div",c({className:"lang-list-icon"},{children:(0,e.jsx)(a(),{})}))}),[]),oe=(0,t.useMemo)((function(){return(0,e.jsx)(o.default,c({open:I,anchorEl:D,onClose:te,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:(t="paraui-input-lang-popover",q&&(t+=" "+q),t)},{children:(0,e.jsx)("div",c({className:"input-lang-list"},{children:(0,e.jsx)(n.default,{size:v,disabled:H,value:Q,onChange:X,fetchSuggestionsKey:ee,placeholderKey:w,placeholderValue:S})}))}));var t}),[I,q,Q,w,S,U,F,v,H]);return(0,e.jsxs)("div",c({className:(Z="paraui-input-lang input-lang",Z+=" "+R,v&&(Z+=" input-lang-"+v),d&&(Z+=" "+d),Z),style:p},{children:[(0,e.jsx)(i.default,{size:v,error:C,disabled:H,required:M,helperText:k,label:x,labelTooltip:h,placeholder:m,value:V[U],addonAfter:ne,addonBefore:ie,onClickAddonAfter:function(){var e=document.querySelector("."+R+" .text-field-content-after");K(e),A(!0)},onChange:function(e){V[U]=e.target.value;var t=c({},V);void 0===r.value&&J(t),_&&_(t)}}),oe]}))};b.default=s}(),b}()}));
@@ -1,74 +1,74 @@
1
- /**
2
- * @author linhd
3
- * @date 2021/8/11 13:53
4
- * @description 数字输入框
5
- */
6
- import React, { FunctionComponent, ReactNode } from 'react';
7
- import { LabelTooltipProps } from "../Label";
8
- import './index.scss';
9
- export interface InputNumberProps {
10
- /** 样式class */
11
- className?: string;
12
- /** style */
13
- style?: React.CSSProperties;
14
- /** 大小 */
15
- size?: 'small' | 'medium' | 'large';
16
- /** 间隔 */
17
- step?: number;
18
- /** 最大值 */
19
- max?: number;
20
- /** 最小值 */
21
- min?: number;
22
- /** 标题 */
23
- label?: ReactNode;
24
- /** 标题在外,还是在内 */
25
- labelMode?: 'outside' | 'inside';
26
- /** 标题提示 */
27
- labelSign?: ReactNode;
28
- /** 帮组提示信息 */
29
- labelTooltip?: LabelTooltipProps;
30
- /** 提示语 */
31
- placeholder?: ReactNode;
32
- /** 按钮模式 左右/上下/无 */
33
- btnMode?: 'lr' | 'tb' | 'none';
34
- /** 是否禁用 */
35
- disabled?: boolean;
36
- /** 禁用加 */
37
- disabledAdd?: boolean;
38
- /** 禁用减 */
39
- disabledReduce?: boolean;
40
- /** 是否必填 */
41
- required?: boolean;
42
- /** 是否显示错误 */
43
- error?: boolean;
44
- /** 错误提示 */
45
- helperText?: ReactNode;
46
- /** 是否启用键盘快捷行为 */
47
- keyboard?: boolean;
48
- /** 是否自动获取焦点 */
49
- autoFocus?: boolean;
50
- /** 只读 */
51
- readOnly?: boolean;
52
- /** 指定输入框展示值的格式 */
53
- formatter?: (value: number | string, info: {
54
- userTyping: boolean;
55
- input: string;
56
- }) => string;
57
- /** 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用 */
58
- parser?: (displayValue: string) => number;
59
- /** 默认值 不受控 */
60
- defaultValue?: number | null;
61
- /** 默认值 受控 */
62
- value?: number | null;
63
- /** 改变事件 number / null */
64
- onChange?: (value: any) => void;
65
- /** 回车事件 */
66
- onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
67
- /** 失去焦点 */
68
- onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
69
- /** 得到焦点 */
70
- onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
71
- [name: string]: any;
72
- }
73
- export declare const InputNumber: FunctionComponent<InputNumberProps>;
74
- export default InputNumber;
1
+ /**
2
+ * @author linhd
3
+ * @date 2021/8/11 13:53
4
+ * @description 数字输入框
5
+ */
6
+ import React, { FunctionComponent, ReactNode } from 'react';
7
+ import { LabelTooltipProps } from "../Label";
8
+ import './index.scss';
9
+ export interface InputNumberProps {
10
+ /** 样式class */
11
+ className?: string;
12
+ /** style */
13
+ style?: React.CSSProperties;
14
+ /** 大小 */
15
+ size?: 'small' | 'medium' | 'large';
16
+ /** 间隔 */
17
+ step?: number;
18
+ /** 最大值 */
19
+ max?: number;
20
+ /** 最小值 */
21
+ min?: number;
22
+ /** 标题 */
23
+ label?: ReactNode;
24
+ /** 标题在外,还是在内 */
25
+ labelMode?: 'outside' | 'inside';
26
+ /** 标题提示 */
27
+ labelSign?: ReactNode;
28
+ /** 帮组提示信息 */
29
+ labelTooltip?: LabelTooltipProps;
30
+ /** 提示语 */
31
+ placeholder?: ReactNode;
32
+ /** 按钮模式 左右/上下/无 */
33
+ btnMode?: 'lr' | 'tb' | 'none';
34
+ /** 是否禁用 */
35
+ disabled?: boolean;
36
+ /** 禁用加 */
37
+ disabledAdd?: boolean;
38
+ /** 禁用减 */
39
+ disabledReduce?: boolean;
40
+ /** 是否必填 */
41
+ required?: boolean;
42
+ /** 是否显示错误 */
43
+ error?: boolean;
44
+ /** 错误提示 */
45
+ helperText?: ReactNode;
46
+ /** 是否启用键盘快捷行为 */
47
+ keyboard?: boolean;
48
+ /** 是否自动获取焦点 */
49
+ autoFocus?: boolean;
50
+ /** 只读 */
51
+ readOnly?: boolean;
52
+ /** 指定输入框展示值的格式 */
53
+ formatter?: (value: number | string, info: {
54
+ userTyping: boolean;
55
+ input: string;
56
+ }) => string;
57
+ /** 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用 */
58
+ parser?: (displayValue: string) => number;
59
+ /** 默认值 不受控 */
60
+ defaultValue?: number | null;
61
+ /** 默认值 受控 */
62
+ value?: number | null;
63
+ /** 改变事件 number / null */
64
+ onChange?: (value: any) => void;
65
+ /** 回车事件 */
66
+ onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
67
+ /** 失去焦点 */
68
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
69
+ /** 得到焦点 */
70
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
71
+ [name: string]: any;
72
+ }
73
+ export declare const InputNumber: FunctionComponent<InputNumberProps>;
74
+ export default InputNumber;