tntd 3.0.28-beta.1 → 3.0.29-beta.1

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 (331) hide show
  1. package/es/prev-locale.js +1 -1
  2. package/es/prev-locale.js.map +1 -1
  3. package/es/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  4. package/es/query-form-backup/Field/Composition/index.less +114 -0
  5. package/es/query-form-backup/index.less +90 -0
  6. package/es/table/table.js +3 -1
  7. package/es/table/table.js.map +1 -1
  8. package/es/upload/index.js +190 -3
  9. package/es/upload/index.js.map +1 -1
  10. package/es/upload/upload.less +5 -12
  11. package/lib/_util/context.js +1 -1
  12. package/lib/_util/defaultRenderEmpty.js +1 -1
  13. package/lib/_util/hooks/useFlexGapSupport.js +4 -4
  14. package/lib/_util/hooks/useForceUpdate.js +4 -4
  15. package/lib/_util/responsiveObserve.js +1 -1
  16. package/lib/_util/styleChecker.js +1 -1
  17. package/lib/actions/index.js +1 -1
  18. package/lib/alert/alert.js +2 -2
  19. package/lib/alert/index.js +1 -1
  20. package/lib/array-input/index.js +9 -9
  21. package/lib/button/button.js +2 -2
  22. package/lib/cascader/cascader.js +1 -1
  23. package/lib/check-card/group.js +8 -8
  24. package/lib/check-card/index.js +6 -6
  25. package/lib/checkbox/checkbox.js +1 -1
  26. package/lib/color-picker/ColorPicker.js +6 -6
  27. package/lib/color-picker/index.js +1 -1
  28. package/lib/columns/index.js +1 -1
  29. package/lib/config-provider/config-provider.js +1 -1
  30. package/lib/date-picker/DatePicker.js +1 -1
  31. package/lib/descriptions/descriptions.js +5 -5
  32. package/lib/development-login/LoginModal.js +6 -6
  33. package/lib/development-login/index.js +4 -4
  34. package/lib/drawer/drawer.js +2 -2
  35. package/lib/ellipsis/Svg/CopySVG.js +1 -1
  36. package/lib/ellipsis/Svg/TickSVG.js +1 -1
  37. package/lib/ellipsis/index.js +5 -5
  38. package/lib/empty/empty.js +2 -2
  39. package/lib/empty/empty.stories.js +2 -2
  40. package/lib/exception/exception.js +1 -1
  41. package/lib/form/form.js +2 -2
  42. package/lib/grid-v4/col.js +2 -2
  43. package/lib/grid-v4/hooks/useBreakpoint.js +1 -1
  44. package/lib/grid-v4/index.js +1 -1
  45. package/lib/grid-v4/row.js +6 -6
  46. package/lib/handle/index.js +1 -1
  47. package/lib/handle-icon/index.js +11 -11
  48. package/lib/icon/IconFont.js +1 -1
  49. package/lib/icon/components/Icon.js +9 -9
  50. package/lib/icon/components/index.js +1 -1
  51. package/lib/icon/components/utils.js +3 -3
  52. package/lib/icon/index.js +7 -7
  53. package/lib/icon/twoTonePrimaryColor.js +1 -1
  54. package/lib/icon/utils.js +1 -1
  55. package/lib/img/Contain.js +1 -1
  56. package/lib/img/Cover.js +5 -5
  57. package/lib/img/index.js +5 -5
  58. package/lib/index.js +1 -1
  59. package/lib/input/input.js +2 -2
  60. package/lib/input-number/inputNumber.js +1 -1
  61. package/lib/label/index.js +2 -2
  62. package/lib/loading-button/index.js +5 -5
  63. package/lib/locale/default.js +1 -1
  64. package/lib/locale/en_US.js +1 -1
  65. package/lib/locale/zh_CN.js +1 -1
  66. package/lib/modal/modal.js +1 -1
  67. package/lib/notification/assets/index.js +1 -1
  68. package/lib/notification/index.js +1 -1
  69. package/lib/notification/notification.js +1 -1
  70. package/lib/page/Box.js +1 -1
  71. package/lib/page/index.js +7 -7
  72. package/lib/page-container/index.js +1 -1
  73. package/lib/page-loading/index.js +1 -1
  74. package/lib/popconfirm/popconfirm.js +1 -1
  75. package/lib/popover/popover.js +1 -1
  76. package/lib/prev-locale.d.ts +1 -1
  77. package/lib/prev-locale.d.ts.map +1 -1
  78. package/lib/prev-locale.js +1 -1
  79. package/lib/prev-locale.js.map +1 -1
  80. package/lib/preview-text/index.js +7 -7
  81. package/lib/progress/progress.js +2 -2
  82. package/lib/query-form/Field/Checkbox.js +1 -1
  83. package/lib/query-form/Field/Composition/FieldPopover.js +5 -5
  84. package/lib/query-form/Field/Composition/Select.js +6 -6
  85. package/lib/query-form/Field/Composition/ValueTag.js +5 -5
  86. package/lib/query-form/Field/Composition/index.js +9 -9
  87. package/lib/query-form/Field/Composition/utils.js +1 -1
  88. package/lib/query-form/Field/Select.js +6 -6
  89. package/lib/query-form/Field/SelectInput.js +6 -6
  90. package/lib/query-form/Field/fieldsMap.js +1 -1
  91. package/lib/query-form/Field/index.js +10 -10
  92. package/lib/query-form/createActions.js +1 -1
  93. package/lib/query-form/index.js +6 -6
  94. package/lib/query-form/useForm.js +1 -1
  95. package/lib/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  96. package/lib/query-form-backup/Field/Composition/index.less +114 -0
  97. package/lib/query-form-backup/index.less +90 -0
  98. package/lib/query-form-v2/Field/Checkbox.d.ts +8 -0
  99. package/lib/query-form-v2/Field/Checkbox.d.ts.map +1 -0
  100. package/lib/query-form-v2/Field/Checkbox.js +28 -0
  101. package/lib/query-form-v2/Field/Checkbox.js.map +1 -0
  102. package/lib/query-form-v2/Field/Select.d.ts +4 -0
  103. package/lib/query-form-v2/Field/Select.d.ts.map +1 -0
  104. package/lib/query-form-v2/Field/Select.js +80 -0
  105. package/lib/query-form-v2/Field/Select.js.map +1 -0
  106. package/lib/query-form-v2/Field/SelectInput.d.ts +4 -0
  107. package/lib/query-form-v2/Field/SelectInput.d.ts.map +1 -0
  108. package/lib/query-form-v2/Field/SelectInput.js +88 -0
  109. package/lib/query-form-v2/Field/SelectInput.js.map +1 -0
  110. package/lib/query-form-v2/Field/fieldsMap.d.ts +24 -0
  111. package/lib/query-form-v2/Field/fieldsMap.d.ts.map +1 -0
  112. package/lib/query-form-v2/Field/fieldsMap.js +35 -0
  113. package/lib/query-form-v2/Field/fieldsMap.js.map +1 -0
  114. package/lib/query-form-v2/Field/index.d.ts +14 -0
  115. package/lib/query-form-v2/Field/index.d.ts.map +1 -0
  116. package/lib/query-form-v2/Field/index.js +146 -0
  117. package/lib/query-form-v2/Field/index.js.map +1 -0
  118. package/lib/query-form-v2/createActions.d.ts +14 -0
  119. package/lib/query-form-v2/createActions.d.ts.map +1 -0
  120. package/lib/query-form-v2/createActions.js +54 -0
  121. package/lib/query-form-v2/createActions.js.map +1 -0
  122. package/lib/query-form-v2/index.d.ts +39 -0
  123. package/lib/query-form-v2/index.d.ts.map +1 -0
  124. package/lib/query-form-v2/index.js +391 -0
  125. package/lib/query-form-v2/index.js.map +1 -0
  126. package/lib/query-form-v2/useForm.d.ts +13 -0
  127. package/lib/query-form-v2/useForm.d.ts.map +1 -0
  128. package/lib/query-form-v2/useForm.js +13 -0
  129. package/lib/query-form-v2/useForm.js.map +1 -0
  130. package/lib/query-form-v3/Field/Checkbox.d.ts +8 -0
  131. package/lib/query-form-v3/Field/Checkbox.d.ts.map +1 -0
  132. package/lib/query-form-v3/Field/Checkbox.js +28 -0
  133. package/lib/query-form-v3/Field/Checkbox.js.map +1 -0
  134. package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts +19 -0
  135. package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts.map +1 -0
  136. package/lib/query-form-v3/Field/Composition/FieldPopover.js +381 -0
  137. package/lib/query-form-v3/Field/Composition/FieldPopover.js.map +1 -0
  138. package/lib/query-form-v3/Field/Composition/FieldPopover.less +35 -0
  139. package/lib/query-form-v3/Field/Composition/Select.d.ts +4 -0
  140. package/lib/query-form-v3/Field/Composition/Select.d.ts.map +1 -0
  141. package/lib/query-form-v3/Field/Composition/Select.js +131 -0
  142. package/lib/query-form-v3/Field/Composition/Select.js.map +1 -0
  143. package/lib/query-form-v3/Field/Composition/index.d.ts +10 -0
  144. package/lib/query-form-v3/Field/Composition/index.d.ts.map +1 -0
  145. package/lib/query-form-v3/Field/Composition/index.js +255 -0
  146. package/lib/query-form-v3/Field/Composition/index.js.map +1 -0
  147. package/lib/query-form-v3/Field/Composition/index.less +118 -0
  148. package/lib/query-form-v3/Field/Composition/utils.d.ts +22 -0
  149. package/lib/query-form-v3/Field/Composition/utils.d.ts.map +1 -0
  150. package/lib/query-form-v3/Field/Composition/utils.js +147 -0
  151. package/lib/query-form-v3/Field/Composition/utils.js.map +1 -0
  152. package/lib/query-form-v3/Field/Select.d.ts +4 -0
  153. package/lib/query-form-v3/Field/Select.d.ts.map +1 -0
  154. package/lib/query-form-v3/Field/Select.js +80 -0
  155. package/lib/query-form-v3/Field/Select.js.map +1 -0
  156. package/lib/query-form-v3/Field/SelectInput.d.ts +4 -0
  157. package/lib/query-form-v3/Field/SelectInput.d.ts.map +1 -0
  158. package/lib/query-form-v3/Field/SelectInput.js +100 -0
  159. package/lib/query-form-v3/Field/SelectInput.js.map +1 -0
  160. package/lib/query-form-v3/Field/fieldsMap.d.ts +27 -0
  161. package/lib/query-form-v3/Field/fieldsMap.d.ts.map +1 -0
  162. package/lib/query-form-v3/Field/fieldsMap.js +35 -0
  163. package/lib/query-form-v3/Field/fieldsMap.js.map +1 -0
  164. package/lib/query-form-v3/Field/index.d.ts +14 -0
  165. package/lib/query-form-v3/Field/index.d.ts.map +1 -0
  166. package/lib/query-form-v3/Field/index.js +147 -0
  167. package/lib/query-form-v3/Field/index.js.map +1 -0
  168. package/lib/query-form-v3/createActions.d.ts +14 -0
  169. package/lib/query-form-v3/createActions.d.ts.map +1 -0
  170. package/lib/query-form-v3/createActions.js +54 -0
  171. package/lib/query-form-v3/createActions.js.map +1 -0
  172. package/lib/query-form-v3/index.d.ts +27 -0
  173. package/lib/query-form-v3/index.d.ts.map +1 -0
  174. package/lib/query-form-v3/index.js +206 -0
  175. package/lib/query-form-v3/index.js.map +1 -0
  176. package/lib/query-form-v3/index.less +91 -0
  177. package/lib/query-form-v3/useForm.d.ts +13 -0
  178. package/lib/query-form-v3/useForm.d.ts.map +1 -0
  179. package/lib/query-form-v3/useForm.js +13 -0
  180. package/lib/query-form-v3/useForm.js.map +1 -0
  181. package/lib/query-list-scene/List.js +13 -13
  182. package/lib/query-list-scene/QueryForm.js +9 -9
  183. package/lib/query-list-scene/QueryListScene.js +10 -10
  184. package/lib/query-list-scene/Title.js +1 -1
  185. package/lib/query-list-scene/Toolbar.js +2 -2
  186. package/lib/query-list-scene/createActions.js +1 -1
  187. package/lib/query-list-scene/index.js +1 -1
  188. package/lib/query-list-scene/useActions.js +1 -1
  189. package/lib/radio/radio.js +1 -1
  190. package/lib/render-empty/render-empty.js +1 -1
  191. package/lib/scroll-bar/Bar.js +5 -5
  192. package/lib/scroll-bar/Context.js +1 -1
  193. package/lib/scroll-bar/ScrollBar.js +1 -1
  194. package/lib/scroll-bar/Thumb.js +5 -5
  195. package/lib/scroll-bar/index.js +1 -1
  196. package/lib/scroll-bar/util.js +1 -1
  197. package/lib/segmented/index.js +2 -2
  198. package/lib/select/select.js +2 -2
  199. package/lib/spin/spin.js +1 -1
  200. package/lib/steps/steps.js +2 -2
  201. package/lib/svg-components/index.js +1 -1
  202. package/lib/table/hooks/use-column-setting.js +4 -4
  203. package/lib/table/hooks/use-expand-fixed.js +6 -6
  204. package/lib/table/resizableTable/index.js +6 -6
  205. package/lib/table/table-hoc.js +1 -1
  206. package/lib/table/table.d.ts.map +1 -1
  207. package/lib/table/table.js +11 -9
  208. package/lib/table/table.js.map +1 -1
  209. package/lib/table/table.stories.js +2 -2
  210. package/lib/table/total-shower.js +1 -1
  211. package/lib/table/utils.js +1 -1
  212. package/lib/table-container/index.js +1 -1
  213. package/lib/tabs/tabs.js +2 -2
  214. package/lib/tabs-container/index.js +1 -1
  215. package/lib/tag/tag.js +2 -2
  216. package/lib/time-picker/TimePicker.js +1 -1
  217. package/lib/time-picker/index.js +1 -1
  218. package/lib/title/index.js +1 -1
  219. package/lib/tntd-action/Action.js +9 -9
  220. package/lib/tntd-action/index.js +8 -8
  221. package/lib/tntd-cascader/AntdCascader/component/context.js +1 -1
  222. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  223. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  224. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  225. package/lib/tntd-cascader/AntdCascader/config/utils.js +2 -2
  226. package/lib/tntd-cascader/AntdCascader/index.js +7 -7
  227. package/lib/tntd-cascader/index.js +1 -1
  228. package/lib/tntd-cascader/rc-cascader/Cascader.js +8 -8
  229. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  230. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
  231. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
  232. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  233. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  234. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  235. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  236. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  237. package/lib/tntd-cascader/rc-cascader/index.js +1 -1
  238. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  239. package/lib/tntd-form/ErrorList.js +7 -7
  240. package/lib/tntd-form/Form.js +6 -6
  241. package/lib/tntd-form/FormItem/ItemHolder.js +6 -6
  242. package/lib/tntd-form/FormItem/index.js +8 -8
  243. package/lib/tntd-form/FormItemInput.js +1 -1
  244. package/lib/tntd-form/FormItemLabel.js +2 -2
  245. package/lib/tntd-form/FormList.js +1 -1
  246. package/lib/tntd-form/context.js +1 -1
  247. package/lib/tntd-form/hooks/useDebounce.js +4 -4
  248. package/lib/tntd-form/hooks/useForm.js +5 -5
  249. package/lib/tntd-form/hooks/useFormItemStatus.js +1 -1
  250. package/lib/tntd-form/hooks/useFrameState.js +5 -5
  251. package/lib/tntd-form/index.js +1 -1
  252. package/lib/tntd-icon/index.js +1 -1
  253. package/lib/tntd-layout/AppList.js +6 -6
  254. package/lib/tntd-layout/Application.js +6 -6
  255. package/lib/tntd-layout/Avatar.js +2 -2
  256. package/lib/tntd-layout/CompatibleLanguage.js +6 -6
  257. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  258. package/lib/tntd-layout/EnterpriseLayout/Language.js +6 -6
  259. package/lib/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  260. package/lib/tntd-layout/EnterpriseLayout/index.js +1 -1
  261. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  262. package/lib/tntd-layout/GlobalNavigation/index.js +9 -9
  263. package/lib/tntd-layout/Header.js +2 -2
  264. package/lib/tntd-layout/HeaderActions.js +2 -2
  265. package/lib/tntd-layout/HeaderNavs.js +6 -6
  266. package/lib/tntd-layout/HeaderTabs.js +7 -7
  267. package/lib/tntd-layout/Iconfont.js +1 -1
  268. package/lib/tntd-layout/Language.js +6 -6
  269. package/lib/tntd-layout/Layout.js +6 -6
  270. package/lib/tntd-layout/Logo.js +2 -2
  271. package/lib/tntd-layout/OrgAppList.js +6 -6
  272. package/lib/tntd-layout/SideMenu.js +6 -6
  273. package/lib/tntd-layout/Theme.js +6 -6
  274. package/lib/tntd-layout/createActions.js +1 -1
  275. package/lib/tntd-layout/images/index.js +1 -1
  276. package/lib/tntd-layout/index.js +1 -1
  277. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  278. package/lib/tntd-layout/paaslayout/Header.js +2 -2
  279. package/lib/tntd-layout/paaslayout/Logo.js +2 -2
  280. package/lib/tntd-layout/paaslayout/SideMenu.js +6 -6
  281. package/lib/tntd-layout/paaslayout/index.js +6 -6
  282. package/lib/tntd-layout/storage.js +1 -1
  283. package/lib/tntd-modal/index.js +6 -6
  284. package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
  285. package/lib/tntd-rc-select/_util/context.js +1 -1
  286. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  287. package/lib/tntd-rc-select/_util/getIcons.js +1 -1
  288. package/lib/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  289. package/lib/tntd-rc-select/index.js +2 -2
  290. package/lib/tntd-reference/AHref/index.js +1 -1
  291. package/lib/tntd-reference/ReferenceBatchCheck/index.js +1 -1
  292. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
  293. package/lib/tntd-reference/ReferenceCheck/index.js +1 -1
  294. package/lib/tntd-reference/ReferenceDrawer/index.js +5 -5
  295. package/lib/tntd-reference/ReferenceInfo/index.js +1 -1
  296. package/lib/tntd-reference/index.js +1 -1
  297. package/lib/tntd-second-page/index.js +1 -1
  298. package/lib/tntd-select/DropDownWrap.js +8 -8
  299. package/lib/tntd-select/index.js +10 -9
  300. package/lib/tntd-virtual-tree/index.js +8 -8
  301. package/lib/tntd-virtual-tree/utils.js +28 -28
  302. package/lib/tntd-virtual-tree-select/index.js +10 -10
  303. package/lib/tntd-virtual-tree-select/utils.js +9 -9
  304. package/lib/tooltip/tooltip.js +1 -1
  305. package/lib/upload/index.d.ts +1 -0
  306. package/lib/upload/index.d.ts.map +1 -1
  307. package/lib/upload/index.js +207 -4
  308. package/lib/upload/index.js.map +1 -1
  309. package/lib/upload/svg/UploadSVG.js +1 -1
  310. package/lib/upload/upload.less +5 -12
  311. package/lib/utils/checkAuth.js +4 -4
  312. package/lib/utils/index.js +9 -9
  313. package/lib/utils/lang.js +3 -3
  314. package/lib/water-mark/index.js +5 -5
  315. package/package.json +2 -2
  316. package/CHANGELOG.json +0 -1034
  317. package/CHANGELOG.md +0 -605
  318. package/es/checkbox/checkbox-group.js +0 -5
  319. package/es/checkbox/checkbox-group.js.map +0 -1
  320. package/es/radio/radio-group.js +0 -5
  321. package/es/radio/radio-group.js.map +0 -1
  322. package/es/steps/stepStyle/small.less +0 -5
  323. package/lib/checkbox/checkbox-group.d.ts +0 -8
  324. package/lib/checkbox/checkbox-group.d.ts.map +0 -1
  325. package/lib/checkbox/checkbox-group.js +0 -12
  326. package/lib/checkbox/checkbox-group.js.map +0 -1
  327. package/lib/radio/radio-group.d.ts +0 -8
  328. package/lib/radio/radio-group.d.ts.map +0 -1
  329. package/lib/radio/radio-group.js +0 -12
  330. package/lib/radio/radio-group.js.map +0 -1
  331. package/lib/steps/stepStyle/small.less +0 -5
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _createActions = _interopRequireDefault(require("./createActions"));
11
+ var _Field = _interopRequireDefault(require("./Field"));
12
+ var _Composition = _interopRequireDefault(require("./Field/Composition"));
13
+ var _useForm = _interopRequireDefault(require("./useForm"));
14
+ var _button = _interopRequireDefault(require("../button"));
15
+ var _form = _interopRequireDefault(require("../form"));
16
+ var _prevLocale = require("../prev-locale");
17
+ require("./index.less");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
23
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
25
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
26
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
27
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
28
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
29
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
30
+ var clsPrefix = 'tnt-queryform';
31
+ function QueryForm(_ref) {
32
+ var form = _ref.form,
33
+ _ref$className = _ref.className,
34
+ className = _ref$className === void 0 ? '' : _ref$className,
35
+ _initialValues = _ref.initialValues,
36
+ language = _ref.language,
37
+ onSearch = _ref.onSearch,
38
+ onReset = _ref.onReset,
39
+ onChange = _ref.onChange,
40
+ renderActions = _ref.renderActions,
41
+ extraActions = _ref.extraActions,
42
+ children = _ref.children,
43
+ _ref$showSearch = _ref.showSearch,
44
+ showSearch = _ref$showSearch === void 0 ? false : _ref$showSearch,
45
+ _ref$showReset = _ref.showReset,
46
+ showReset = _ref$showReset === void 0 ? false : _ref$showReset,
47
+ _ref$showFieldCount = _ref.showFieldCount,
48
+ showFieldCount = _ref$showFieldCount === void 0 ? 3 : _ref$showFieldCount,
49
+ _ref$minGroupCount = _ref.minGroupCount,
50
+ minGroupCount = _ref$minGroupCount === void 0 ? 3 : _ref$minGroupCount;
51
+ var _useState = (0, _react.useState)(_initialValues || {}),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ initialValues = _useState2[0],
54
+ setInitialValues = _useState2[1];
55
+ var formRef = (0, _react.useRef)(form || (0, _createActions["default"])());
56
+ (0, _react.useEffect)(function () {
57
+ var _search = function _search() {
58
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
59
+ onSearch(Object.assign(Object.assign({}, formRef.current.getValues()), params));
60
+ };
61
+ formRef.current.setData('initialValues', initialValues);
62
+ formRef.current.setData('values', initialValues);
63
+ formRef.current.on('search', _search);
64
+ return function () {
65
+ formRef.current.off('search', _search);
66
+ };
67
+ }, []);
68
+ var _getText = function _getText(key) {
69
+ return (0, _prevLocale.getText)(key, language || (0, _prevLocale.getLanguage)());
70
+ };
71
+ var _onSearch = function _onSearch() {
72
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(formRef.current.getValues());
73
+ };
74
+ var _onReset = function _onReset() {
75
+ formRef.current.setValues(Object.assign({}, initialValues));
76
+ onReset === null || onReset === void 0 ? void 0 : onReset(initialValues);
77
+ setInitialValues(Object.assign({}, initialValues));
78
+ };
79
+ var _onFieldChange = function _onFieldChange(name, value) {
80
+ var values = formRef.current.getValues();
81
+ var newValues = Object.assign(Object.assign({}, values), _defineProperty({}, name, value));
82
+ var changedInfo = {
83
+ name: name,
84
+ value: value,
85
+ preValue: values === null || values === void 0 ? void 0 : values[name]
86
+ };
87
+ formRef.current.setData('values', newValues);
88
+ for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
89
+ rest[_key - 2] = arguments[_key];
90
+ }
91
+ onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
92
+ };
93
+ var _onCompositionFieldChange = function _onCompositionFieldChange(value, deleteKeys, needSearch) {
94
+ var _a;
95
+ var values = formRef.current.getValues();
96
+ var newValues = Object.assign(Object.assign({}, values), value);
97
+ if (deleteKeys === null || deleteKeys === void 0 ? void 0 : deleteKeys.length) {
98
+ deleteKeys === null || deleteKeys === void 0 ? void 0 : deleteKeys.forEach(function (key) {
99
+ if (values === null || values === void 0 ? void 0 : values[key]) {
100
+ delete newValues[key];
101
+ }
102
+ });
103
+ }
104
+ formRef.current.setData('values', newValues);
105
+ if (onChange) {
106
+ (_a = Object.keys(values)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {
107
+ if (JSON.stringify(value[key]) !== JSON.stringify(values[key] || '')) {
108
+ var changedInfo = {
109
+ name: key,
110
+ value: value[key],
111
+ preValue: values === null || values === void 0 ? void 0 : values[key]
112
+ };
113
+ onChange(newValues, changedInfo);
114
+ }
115
+ });
116
+ if (needSearch) {
117
+ formRef.current.emit('search', newValues);
118
+ }
119
+ }
120
+ };
121
+ var _useMemo = (0, _react.useMemo)(function () {
122
+ var _a;
123
+ var groupFields = [];
124
+ var outFields = [];
125
+ var otherFields = [];
126
+ var rightChildren = [];
127
+ var compositionInitValues = {};
128
+ _react["default"].Children.map(children, function (child) {
129
+ var _a, _b;
130
+ if (child) {
131
+ if (((_a = child.props) === null || _a === void 0 ? void 0 : _a.align) === 'right') {
132
+ rightChildren.push(child);
133
+ return;
134
+ } else if (((_b = child.props) === null || _b === void 0 ? void 0 : _b.isGroup) === false) {
135
+ outFields.push(child);
136
+ } else {
137
+ groupFields.push(child);
138
+ }
139
+ otherFields.push(child);
140
+ }
141
+ });
142
+ if (groupFields.length <= minGroupCount) {
143
+ groupFields = [];
144
+ outFields = otherFields;
145
+ } else {
146
+ // 初始值
147
+ for (var i = 0; i < groupFields.length; i++) {
148
+ var name = (_a = groupFields[i].props) === null || _a === void 0 ? void 0 : _a.name;
149
+ if (initialValues[name] !== undefined) {
150
+ compositionInitValues[name] = initialValues[name];
151
+ }
152
+ }
153
+ }
154
+ return [groupFields, outFields, rightChildren, compositionInitValues];
155
+ }, [children, minGroupCount, initialValues]),
156
+ _useMemo2 = _slicedToArray(_useMemo, 4),
157
+ groupFields = _useMemo2[0],
158
+ outFields = _useMemo2[1],
159
+ rightChildren = _useMemo2[2],
160
+ compositionInitValues = _useMemo2[3];
161
+ var isGroupMode = groupFields.length > 0;
162
+ var hasOutField = outFields.length > 0;
163
+ var showExtra = rightChildren.length > 0 || extraActions;
164
+ return _react["default"].createElement("div", {
165
+ className: (0, _classnames["default"])(clsPrefix, _defineProperty({}, className, className))
166
+ }, _react["default"].createElement(_form["default"], {
167
+ layout: "inline"
168
+ }, _react["default"].createElement("div", {
169
+ className: "".concat(clsPrefix, "-top")
170
+ }, _react["default"].createElement("div", {
171
+ className: "".concat(clsPrefix, "-top-body")
172
+ }, hasOutField ? outFields.map(function (child, i) {
173
+ var _a;
174
+ return _react["default"].cloneElement(child, {
175
+ form: formRef.current,
176
+ initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[(_a = child.props) === null || _a === void 0 ? void 0 : _a.name],
177
+ onChange: _onFieldChange,
178
+ key: i
179
+ });
180
+ }) : isGroupMode ? _react["default"].createElement(_Composition["default"], {
181
+ clsPrefix: clsPrefix,
182
+ fieldItems: groupFields,
183
+ initialValues: compositionInitValues,
184
+ onChange: _onCompositionFieldChange,
185
+ form: formRef.current
186
+ }) : null, renderActions ? renderActions() : _react["default"].createElement(_react["default"].Fragment, null, showSearch && _react["default"].createElement(_button["default"], {
187
+ type: "primary",
188
+ onClick: _onSearch
189
+ }, _getText('search')), showReset && _react["default"].createElement(_button["default"], {
190
+ onClick: _onReset
191
+ }, _getText('reset')))), showExtra && _react["default"].createElement("div", {
192
+ className: "".concat(clsPrefix, "-extra")
193
+ }, rightChildren, extraActions)), isGroupMode && hasOutField && _react["default"].createElement("div", {
194
+ className: "".concat(clsPrefix, "-bottom")
195
+ }, _react["default"].createElement(_Composition["default"], {
196
+ clsPrefix: clsPrefix,
197
+ fieldItems: groupFields,
198
+ initialValues: compositionInitValues,
199
+ onChange: _onCompositionFieldChange,
200
+ form: formRef.current
201
+ }))));
202
+ }
203
+ QueryForm.Field = _Field["default"];
204
+ QueryForm.useForm = _useForm["default"];
205
+ QueryForm.createForm = _createActions["default"];
206
+ var _default = exports["default"] = QueryForm;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/query-form-v3/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmE;AACnE,4DAA2B;AAC3B,oEAA2C;AAC3C,oDAA2B;AAC3B,sEAA6C;AAC7C,wDAA+B;AAC/B,uDAA8B;AAC9B,mDAA0B;AAC1B,gDAAqD;AAErD,wBAAqB;AAErB,MAAM,SAAS,GAAG,eAAe,CAAA;AAEjC,SAAS,SAAS,CAAC,EACjB,IAAI,EACJ,SAAS,GAAG,EAAE,EACd,aAAa,EAAE,cAAc,EAC7B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,cAAc,GAAG,CAAC,EAClB,aAAa,GAAG,CAAC,EAAE,SAAS;EAC7B;IACC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAC,cAAc,IAAI,EAAE,CAAC,C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AAG,uBAAa,CAAA;AAEpC,kBAAe,SAAS,CAAA","sourcesContent":["import React, { useMemo, useRef, useEffect, useState } from 'react'\nimport cn from 'classnames'\nimport createActions from './createActions'\nimport Field from './Field'\nimport Composition from './Field/Composition'\nimport useForm from './useForm'\nimport Button from '../button'\nimport Form from '../form'\nimport { getLanguage, getText } from '../prev-locale'\n\nimport './index.less'\n\nconst clsPrefix = 'tnt-queryform'\n\nfunction QueryForm({\n form,\n className = '',\n initialValues: _initialValues,\n language,\n onSearch,\n onReset,\n onChange,\n renderActions,\n extraActions,\n children,\n showSearch = false,\n showReset = false,\n showFieldCount = 3,\n minGroupCount = 3, // 最小聚合个数\n}) {\n const [initialValues, setInitialValues] = useState(_initialValues || {})\n const formRef = useRef(form || createActions())\n\n useEffect(() => {\n const _search = (params = {}) => {\n onSearch({\n ...formRef.current.getValues(),\n ...params,\n })\n }\n formRef.current.setData('initialValues', initialValues)\n formRef.current.setData('values', initialValues)\n formRef.current.on('search', _search)\n return () => {\n formRef.current.off('search', _search)\n }\n }, [])\n\n const _getText = (key) => {\n return getText(key, language || getLanguage())\n }\n const _onSearch = () => {\n onSearch?.(formRef.current.getValues())\n }\n\n const _onReset = () => {\n formRef.current.setValues({ ...initialValues })\n onReset?.(initialValues)\n setInitialValues({ ...initialValues })\n }\n\n const _onFieldChange = (name, value, ...rest) => {\n const values = formRef.current.getValues()\n const newValues = {\n ...values,\n [name]: value,\n }\n const changedInfo = { name, value, preValue: values?.[name] }\n formRef.current.setData('values', newValues)\n onChange && onChange(newValues, changedInfo, ...rest)\n }\n\n const _onCompositionFieldChange = (value, deleteKeys, needSearch) => {\n const values = formRef.current.getValues()\n const newValues = {\n ...values,\n ...value,\n }\n if (deleteKeys?.length) {\n deleteKeys?.forEach((key) => {\n if (values?.[key]) {\n delete newValues[key]\n }\n })\n }\n formRef.current.setData('values', newValues)\n if (onChange) {\n Object.keys(values)?.forEach((key) => {\n if (JSON.stringify(value[key]) !== JSON.stringify(values[key] || '')) {\n const changedInfo = { name: key, value: value[key], preValue: values?.[key] }\n onChange(newValues, changedInfo)\n }\n })\n if(needSearch) {\n formRef.current.emit('search', newValues)\n }\n }\n }\n\n const [groupFields, outFields, rightChildren, compositionInitValues] = useMemo(() => {\n let groupFields = []\n let outFields = []\n let otherFields = []\n const rightChildren = []\n const compositionInitValues = {}\n React.Children.map(children, (child) => {\n if (child) {\n if (child.props?.align === 'right') {\n rightChildren.push(child)\n return\n } else if (child.props?.isGroup === false) {\n outFields.push(child)\n } else {\n groupFields.push(child)\n }\n otherFields.push(child)\n }\n })\n if (groupFields.length <= minGroupCount) {\n groupFields = []\n outFields = otherFields\n } else {\n // 初始值\n for (let i = 0; i < groupFields.length; i++) {\n const name = groupFields[i].props?.name\n if (initialValues[name] !== undefined) {\n compositionInitValues[name] = initialValues[name]\n }\n }\n }\n return [groupFields, outFields, rightChildren, compositionInitValues]\n }, [children, minGroupCount, initialValues])\n\n const isGroupMode = groupFields.length > 0\n const hasOutField = outFields.length > 0\n const showExtra = rightChildren.length > 0 || extraActions\n\n return (\n <div className={cn(clsPrefix, { [className]: className })}>\n <Form layout=\"inline\">\n <div className={`${clsPrefix}-top`}>\n <div className={`${clsPrefix}-top-body`}>\n {hasOutField ? (\n outFields.map((child, i) =>\n React.cloneElement(child, {\n form: formRef.current,\n initialValue: initialValues?.[child.props?.name],\n onChange: _onFieldChange,\n key: i,\n })\n )\n ) : isGroupMode ? (\n <Composition\n clsPrefix={clsPrefix}\n fieldItems={groupFields}\n initialValues={compositionInitValues}\n onChange={_onCompositionFieldChange}\n form={formRef.current}\n />\n ) : null}\n\n {renderActions ? (\n renderActions()\n ) : (\n <>\n {showSearch && (\n <Button type=\"primary\" onClick={_onSearch}>\n {_getText('search')}\n </Button>\n )}\n {showReset && <Button onClick={_onReset}>{_getText('reset')}</Button>}\n </>\n )}\n </div>\n {showExtra && (\n <div className={`${clsPrefix}-extra`}>\n {rightChildren}\n {extraActions}\n </div>\n )}\n </div>\n {isGroupMode && hasOutField && (\n <div className={`${clsPrefix}-bottom`}>\n <Composition\n clsPrefix={clsPrefix}\n fieldItems={groupFields}\n initialValues={compositionInitValues}\n onChange={_onCompositionFieldChange}\n form={formRef.current}\n />\n </div>\n )}\n </Form>\n </div>\n )\n}\n\nQueryForm.Field = Field\nQueryForm.useForm = useForm\nQueryForm.createForm = createActions\n\nexport default QueryForm\n"]}
@@ -0,0 +1,91 @@
1
+ .tnt-queryform {
2
+ &-top {
3
+ display: flex;
4
+ flex: 1;
5
+ &-body {
6
+ flex: 1;
7
+ .ant-btn {
8
+ margin-right: 10px;
9
+ }
10
+ }
11
+ }
12
+
13
+ &-extra {
14
+ & > * {
15
+ margin-left: 10px;
16
+ }
17
+ }
18
+
19
+ .ant-form {
20
+ // margin-bottom: @margin-sm;
21
+ &.ant-form-inline {
22
+ flex-wrap: unset;
23
+ position: relative;
24
+ }
25
+
26
+ &.ant-form-inline .ant-form-item {
27
+ margin-right: 10px;
28
+ margin-bottom: @margin-sm;
29
+ display: inline-block;
30
+ }
31
+
32
+ .ant-form-item-control {
33
+ // min-width: 160px;
34
+ line-height: unset;
35
+ .ant-calendar-picker-input {
36
+ padding: 0 @padding-sm;
37
+ }
38
+ .ant-form-item-children {
39
+ & > .ant-input,
40
+ & > .ant-input-affix-wrapper {
41
+ width: 160px;
42
+ // width: 200px;
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ &-drawer {
49
+ margin-top: @margin-xxl;
50
+ &.large-size {
51
+ margin-top: 60px;
52
+ }
53
+
54
+ &.ant-drawer.ant-drawer-open {
55
+ .ant-drawer-mask {
56
+ opacity: 0;
57
+ background: unset;
58
+ }
59
+ }
60
+ .ant-drawer-body {
61
+ .ant-form-item {
62
+ display: block;
63
+ margin-right: 0;
64
+ margin-bottom: @margin-md;
65
+ width: 100%;
66
+ }
67
+ .ant-form-item-label {
68
+ display: block;
69
+ text-align: left;
70
+ line-height: 22px;
71
+ margin-bottom: 10px;
72
+ }
73
+ .ant-form-item-control-wrapper,
74
+ .ant-form-item-control,
75
+ .ant-calendar-picker,
76
+ .ant-input {
77
+ min-width: 100%;
78
+ width: 100%;
79
+ }
80
+
81
+ & > .ant-btn {
82
+ display: block;
83
+ width: 100%;
84
+ margin-bottom: 10px;
85
+ &.ant-btn-primary {
86
+ margin-top: @margin-md;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,13 @@
1
+ export default function useForm(): {
2
+ setData(key: any, value: any): void;
3
+ getData(key: any): void;
4
+ setValues(values: any): void;
5
+ getValues(): {};
6
+ resetValues(): void;
7
+ setValue(name: any, value: any): void;
8
+ getValue(name: any): any;
9
+ on: (eventName: any, callback: any) => void;
10
+ emit: (...args: any[]) => void;
11
+ off: (...args: any[]) => void;
12
+ }[];
13
+ //# sourceMappingURL=useForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../src/query-form-v3/useForm.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;IAIC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = useForm;
7
+ var _react = require("react");
8
+ var _createActions = _interopRequireDefault(require("./createActions"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function useForm() {
11
+ var form = (0, _react.useRef)((0, _createActions["default"])());
12
+ return [form.current];
13
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForm.js","sourceRoot":"","sources":["../../src/query-form-v3/useForm.js"],"names":[],"mappings":";;;;;AAAA,iCAA8B;AAC9B,oEAA2C;AAE3C,SAAwB,OAAO;IAC7B,MAAM,IAAI,GAAG,IAAA,cAAM,EAAC,IAAA,uBAAa,GAAE,CAAC,CAAA;IAEpC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AACvB,CAAC;AAJD,0BAIC","sourcesContent":["import { useRef } from 'react'\nimport createActions from './createActions'\n\nexport default function useForm() {\n const form = useRef(createActions())\n\n return [form.current]\n}\n"]}
@@ -20,19 +20,19 @@ var _spin = _interopRequireDefault(require("../spin"));
20
20
  var _table = _interopRequireDefault(require("../table"));
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
24
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
25
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
26
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
27
27
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
28
28
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
29
29
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
31
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
31
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
32
32
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
33
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
34
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
35
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
36
36
  var __rest = void 0 && (void 0).__rest || function (s, e) {
37
37
  var t = {};
38
38
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -341,7 +341,7 @@ var QueryList = exports["default"] = /*#__PURE__*/function (_React$PureComponent
341
341
  this.fetchData(this.formData)["finally"](function () {
342
342
  // 轮询
343
343
  if (qlsProps.interval && !_this2.isUnmounted) {
344
- var doIntervalQuery = function doIntervalQuery(ms) {
344
+ var _doIntervalQuery = function doIntervalQuery(ms) {
345
345
  // 组件unmounted后,不执行轮训逻辑
346
346
  if (!_this2.isUnmounted) {
347
347
  _this2.timmer = setTimeout(function () {
@@ -351,15 +351,15 @@ var QueryList = exports["default"] = /*#__PURE__*/function (_React$PureComponent
351
351
  isInterval: true,
352
352
  showLoading: false
353
353
  }).then(function () {
354
- doIntervalQuery(ms);
354
+ _doIntervalQuery(ms);
355
355
  });
356
356
  } else {
357
- doIntervalQuery(ms);
357
+ _doIntervalQuery(ms);
358
358
  }
359
359
  }, ms);
360
360
  }
361
361
  };
362
- doIntervalQuery(qlsProps.interval);
362
+ _doIntervalQuery(qlsProps.interval);
363
363
  }
364
364
  });
365
365
  }
@@ -9,19 +9,19 @@ var _classnames = _interopRequireDefault(require("classnames"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _queryForm = _interopRequireDefault(require("../query-form"));
11
11
  var _Field = _interopRequireDefault(require("../query-form/Field"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
18
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
19
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
20
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
22
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
23
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
25
  var __rest = void 0 && (void 0).__rest || function (s, e) {
26
26
  var t = {};
27
27
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -10,20 +10,20 @@ var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _Title = _interopRequireDefault(require("./Title"));
11
11
  var _Toolbar = _interopRequireDefault(require("./Toolbar"));
12
12
  var _createActions = _interopRequireDefault(require("./createActions"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
17
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
20
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
21
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
22
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
21
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
22
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
23
23
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
25
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
26
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
27
27
  var QueryListScene = exports["default"] = /*#__PURE__*/function (_React$Component) {
28
28
  function QueryListScene(props) {
29
29
  var _this;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  /**
10
10
  * @file Title
11
11
  * @author zhangyou
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _classnames = _interopRequireDefault(require("classnames"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
12
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
14
  var __rest = void 0 && (void 0).__rest || function (s, e) {
@@ -7,7 +7,7 @@ exports["default"] = void 0;
7
7
  var _set2 = _interopRequireDefault(require("lodash/set"));
8
8
  var _get2 = _interopRequireDefault(require("lodash/get"));
9
9
  var _eventemitter = _interopRequireDefault(require("eventemitter3"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
11
  var _default = exports["default"] = function _default() {
12
12
  var eventEmitter = new _eventemitter["default"]();
13
13
  var data = {
@@ -13,7 +13,7 @@ var _createActions = _interopRequireDefault(require("./createActions"));
13
13
  var _useActions = _interopRequireDefault(require("./useActions"));
14
14
  var _Field = _interopRequireDefault(require("../query-form/Field"));
15
15
  require("./index.less");
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
17
17
  var QueryForm = exports.QueryForm = _QueryForm["default"];
18
18
  var QueryList = exports.QueryList = _List["default"];
19
19
  var createActions = exports.createActions = _createActions["default"];
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = useActions;
7
7
  var _react = require("react");
8
8
  var _createActions = _interopRequireDefault(require("./createActions"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  function useActions() {
11
11
  var actions = (0, _react.useRef)((0, _createActions["default"])());
12
12
  return actions.current;
@@ -23,7 +23,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
23
23
  var _react = _interopRequireWildcard(require("react"));
24
24
  var _connect = require("../connect");
25
25
  var _previewText = require("../preview-text");
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
27
27
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
28
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
29
29
  var __rest = void 0 && (void 0).__rest || function (s, e) {
@@ -7,7 +7,7 @@ exports.renderEmpty = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _configProvider = require("../config-provider");
9
9
  var _empty = require("../empty");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
11
  var renderEmpty = exports.renderEmpty = function renderEmpty(componentName) {
12
12
  return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
13
13
  switch (componentName) {