tntd 3.0.10 → 3.0.11

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 (395) hide show
  1. package/es/array-input/index.js +10 -3
  2. package/es/array-input/index.js.map +1 -1
  3. package/es/index.js +1 -0
  4. package/es/index.js.map +1 -1
  5. package/es/locale/en_US.js +16 -0
  6. package/es/locale/en_US.js.map +1 -1
  7. package/es/locale/zh_CN.js +16 -0
  8. package/es/locale/zh_CN.js.map +1 -1
  9. package/es/prev-locale.js +32 -2
  10. package/es/prev-locale.js.map +1 -1
  11. package/es/query-list-scene/index.less +4 -0
  12. package/es/table/index.js +2 -2
  13. package/es/table/index.js.map +1 -1
  14. package/es/table/resizableTable/index.js +87 -0
  15. package/es/table/resizableTable/index.js.map +1 -0
  16. package/es/table/resizableTable/index.less +36 -0
  17. package/es/table/table-hoc.js +26 -0
  18. package/es/table/table-hoc.js.map +1 -0
  19. package/es/tabs/tabs.less +23 -0
  20. package/es/title/index.less +4 -1
  21. package/es/tntd-reference/AHref/index.js +39 -0
  22. package/es/tntd-reference/AHref/index.js.map +1 -0
  23. package/es/tntd-reference/ReferenceBatchCheck/index.js +153 -0
  24. package/es/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
  25. package/es/tntd-reference/ReferenceBatchCheck/index.less +21 -0
  26. package/es/tntd-reference/ReferenceBatchDrawer/index.js +102 -0
  27. package/es/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
  28. package/es/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
  29. package/es/tntd-reference/ReferenceCheck/index.js +117 -0
  30. package/es/tntd-reference/ReferenceCheck/index.js.map +1 -0
  31. package/es/tntd-reference/ReferenceCheck/index.less +10 -0
  32. package/es/tntd-reference/ReferenceDrawer/index.js +69 -0
  33. package/es/tntd-reference/ReferenceDrawer/index.js.map +1 -0
  34. package/es/tntd-reference/ReferenceDrawer/index.less +0 -0
  35. package/es/tntd-reference/ReferenceInfo/index.js +150 -0
  36. package/es/tntd-reference/ReferenceInfo/index.js.map +1 -0
  37. package/es/tntd-reference/ReferenceInfo/index.less +31 -0
  38. package/es/tntd-reference/index.js +13 -0
  39. package/es/tntd-reference/index.js.map +1 -0
  40. package/es/tntd-virtual-tree/index.js +14 -3
  41. package/es/tntd-virtual-tree/index.js.map +1 -1
  42. package/es/tntd-virtual-tree/index.less +2 -42
  43. package/es/tntd-virtual-tree-select/index.js +95 -21
  44. package/es/tntd-virtual-tree-select/index.js.map +1 -1
  45. package/es/tntd-virtual-tree-select/utils.js +20 -124
  46. package/es/tntd-virtual-tree-select/utils.js.map +1 -1
  47. package/lib/_util/context.js +1 -1
  48. package/lib/_util/defaultRenderEmpty.js +1 -1
  49. package/lib/_util/hooks/useFlexGapSupport.js +4 -4
  50. package/lib/_util/hooks/useForceUpdate.js +4 -4
  51. package/lib/_util/responsiveObserve.js +1 -1
  52. package/lib/_util/styleChecker.js +1 -1
  53. package/lib/actions/index.js +1 -1
  54. package/lib/alert/alert.js +2 -2
  55. package/lib/alert/index.js +1 -1
  56. package/lib/array-input/index.d.ts.map +1 -1
  57. package/lib/array-input/index.js +22 -13
  58. package/lib/array-input/index.js.map +1 -1
  59. package/lib/button/button.js +2 -2
  60. package/lib/cascader/cascader.js +1 -1
  61. package/lib/check-card/group.js +8 -8
  62. package/lib/check-card/index.js +6 -6
  63. package/lib/checkbox/checkbox.js +1 -1
  64. package/lib/color-picker/ColorPicker.js +6 -6
  65. package/lib/color-picker/index.js +1 -1
  66. package/lib/columns/index.js +1 -1
  67. package/lib/config-provider/config-provider.js +1 -1
  68. package/lib/date-picker/DatePicker.js +1 -1
  69. package/lib/descriptions/descriptions.js +5 -5
  70. package/lib/development-login/LoginModal.js +6 -6
  71. package/lib/development-login/index.js +4 -4
  72. package/lib/drawer/drawer.js +2 -2
  73. package/lib/ellipsis/Svg/CopySVG.js +1 -1
  74. package/lib/ellipsis/Svg/TickSVG.js +1 -1
  75. package/lib/ellipsis/index.js +5 -5
  76. package/lib/empty/empty.js +2 -2
  77. package/lib/empty/empty.stories.js +2 -2
  78. package/lib/exception/exception.js +1 -1
  79. package/lib/form/form.js +2 -2
  80. package/lib/grid-v4/col.js +2 -2
  81. package/lib/grid-v4/hooks/useBreakpoint.js +1 -1
  82. package/lib/grid-v4/index.js +1 -1
  83. package/lib/grid-v4/row.js +6 -6
  84. package/lib/handle/index.js +1 -1
  85. package/lib/handle-icon/index.js +11 -11
  86. package/lib/icon/IconFont.js +1 -1
  87. package/lib/icon/components/Icon.js +9 -9
  88. package/lib/icon/components/index.js +1 -1
  89. package/lib/icon/components/utils.js +3 -3
  90. package/lib/icon/index.js +7 -7
  91. package/lib/icon/twoTonePrimaryColor.js +1 -1
  92. package/lib/icon/utils.js +1 -1
  93. package/lib/img/Contain.js +1 -1
  94. package/lib/img/Cover.js +5 -5
  95. package/lib/img/index.js +5 -5
  96. package/lib/index.d.ts +1 -0
  97. package/lib/index.d.ts.map +1 -1
  98. package/lib/index.js +8 -1
  99. package/lib/index.js.map +1 -1
  100. package/lib/input/input.js +2 -2
  101. package/lib/input-number/inputNumber.js +1 -1
  102. package/lib/label/index.js +2 -2
  103. package/lib/loading-button/index.js +5 -5
  104. package/lib/locale/default.d.ts +16 -0
  105. package/lib/locale/default.d.ts.map +1 -1
  106. package/lib/locale/default.js +1 -1
  107. package/lib/locale/en_US.d.ts +16 -0
  108. package/lib/locale/en_US.d.ts.map +1 -1
  109. package/lib/locale/en_US.js +17 -1
  110. package/lib/locale/en_US.js.map +1 -1
  111. package/lib/locale/zh_CN.d.ts +16 -0
  112. package/lib/locale/zh_CN.d.ts.map +1 -1
  113. package/lib/locale/zh_CN.js +17 -1
  114. package/lib/locale/zh_CN.js.map +1 -1
  115. package/lib/modal/modal.js +1 -1
  116. package/lib/notification/assets/index.js +1 -1
  117. package/lib/notification/index.js +1 -1
  118. package/lib/notification/notification.js +1 -1
  119. package/lib/page/Box.js +1 -1
  120. package/lib/page/index.js +7 -7
  121. package/lib/page-container/index.js +1 -1
  122. package/lib/page-loading/index.js +1 -1
  123. package/lib/popconfirm/popconfirm.js +1 -1
  124. package/lib/popover/popover.js +1 -1
  125. package/lib/prev-locale.d.ts +42 -0
  126. package/lib/prev-locale.d.ts.map +1 -1
  127. package/lib/prev-locale.js +32 -2
  128. package/lib/prev-locale.js.map +1 -1
  129. package/lib/preview-text/index.js +7 -7
  130. package/lib/progress/progress.js +2 -2
  131. package/lib/query-form/Field/Checkbox.js +1 -1
  132. package/lib/query-form/Field/Select.js +6 -6
  133. package/lib/query-form/Field/SelectInput.js +6 -6
  134. package/lib/query-form/Field/fieldsMap.js +1 -1
  135. package/lib/query-form/Field/index.js +10 -10
  136. package/lib/query-form/createActions.js +1 -1
  137. package/lib/query-form/index.js +10 -10
  138. package/lib/query-form/useForm.js +1 -1
  139. package/lib/query-list-scene/List.js +13 -13
  140. package/lib/query-list-scene/QueryForm.js +9 -9
  141. package/lib/query-list-scene/QueryListScene.js +10 -10
  142. package/lib/query-list-scene/Title.js +1 -1
  143. package/lib/query-list-scene/Toolbar.js +2 -2
  144. package/lib/query-list-scene/createActions.js +1 -1
  145. package/lib/query-list-scene/index.js +1 -1
  146. package/lib/query-list-scene/index.less +4 -0
  147. package/lib/query-list-scene/useActions.js +1 -1
  148. package/lib/radio/radio.js +1 -1
  149. package/lib/render-empty/render-empty.js +1 -1
  150. package/lib/segmented/index.d.ts +1 -1
  151. package/lib/segmented/index.js +2 -2
  152. package/lib/select/select.js +2 -2
  153. package/lib/spin/spin.js +1 -1
  154. package/lib/steps/steps.js +2 -2
  155. package/lib/svg-components/index.js +1 -1
  156. package/lib/table/hooks/use-column-setting.js +4 -4
  157. package/lib/table/hooks/use-expand-fixed.js +6 -6
  158. package/lib/table/index.d.ts +2 -2
  159. package/lib/table/index.d.ts.map +1 -1
  160. package/lib/table/index.js +7 -7
  161. package/lib/table/index.js.map +1 -1
  162. package/lib/table/resizableTable/index.d.ts +12 -0
  163. package/lib/table/resizableTable/index.d.ts.map +1 -0
  164. package/lib/table/resizableTable/index.js +110 -0
  165. package/lib/table/resizableTable/index.js.map +1 -0
  166. package/lib/table/resizableTable/index.less +36 -0
  167. package/lib/table/table-hoc.d.ts +7 -0
  168. package/lib/table/table-hoc.d.ts.map +1 -0
  169. package/lib/table/table-hoc.js +34 -0
  170. package/lib/table/table-hoc.js.map +1 -0
  171. package/lib/table/table.js +9 -9
  172. package/lib/table/table.stories.d.ts +1 -1
  173. package/lib/table/table.stories.js +2 -2
  174. package/lib/table/total-shower.js +1 -1
  175. package/lib/table/utils.js +1 -1
  176. package/lib/table-container/index.js +1 -1
  177. package/lib/tabs/tabs.js +2 -2
  178. package/lib/tabs/tabs.less +23 -0
  179. package/lib/tabs-container/index.js +1 -1
  180. package/lib/tag/tag.js +2 -2
  181. package/lib/time-picker/TimePicker.js +1 -1
  182. package/lib/time-picker/index.js +1 -1
  183. package/lib/title/index.js +1 -1
  184. package/lib/title/index.less +4 -1
  185. package/lib/tntd-action/Action.js +9 -9
  186. package/lib/tntd-action/index.js +8 -8
  187. package/lib/tntd-cascader/AntdCascader/component/context.js +1 -1
  188. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  189. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  190. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  191. package/lib/tntd-cascader/AntdCascader/config/utils.js +2 -2
  192. package/lib/tntd-cascader/AntdCascader/index.js +7 -7
  193. package/lib/tntd-cascader/index.js +1 -1
  194. package/lib/tntd-cascader/rc-cascader/Cascader.js +8 -8
  195. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  196. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
  197. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
  198. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  199. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  200. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  201. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  202. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  203. package/lib/tntd-cascader/rc-cascader/index.js +1 -1
  204. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  205. package/lib/tntd-form/ErrorList.js +7 -7
  206. package/lib/tntd-form/Form.js +6 -6
  207. package/lib/tntd-form/FormItem/ItemHolder.js +6 -6
  208. package/lib/tntd-form/FormItem/index.js +8 -8
  209. package/lib/tntd-form/FormItemInput.js +1 -1
  210. package/lib/tntd-form/FormItemLabel.js +2 -2
  211. package/lib/tntd-form/FormList.js +1 -1
  212. package/lib/tntd-form/context.js +1 -1
  213. package/lib/tntd-form/hooks/useDebounce.js +4 -4
  214. package/lib/tntd-form/hooks/useForm.js +5 -5
  215. package/lib/tntd-form/hooks/useFormItemStatus.js +1 -1
  216. package/lib/tntd-form/hooks/useFrameState.js +5 -5
  217. package/lib/tntd-form/index.js +1 -1
  218. package/lib/tntd-icon/index.js +1 -1
  219. package/lib/tntd-layout/AppList.js +6 -6
  220. package/lib/tntd-layout/Application.js +6 -6
  221. package/lib/tntd-layout/Avatar.js +2 -2
  222. package/lib/tntd-layout/CompatibleLanguage.js +6 -6
  223. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  224. package/lib/tntd-layout/EnterpriseLayout/Language.js +6 -6
  225. package/lib/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  226. package/lib/tntd-layout/EnterpriseLayout/index.js +1 -1
  227. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  228. package/lib/tntd-layout/GlobalNavigation/index.js +9 -9
  229. package/lib/tntd-layout/Header.js +2 -2
  230. package/lib/tntd-layout/HeaderActions.js +2 -2
  231. package/lib/tntd-layout/HeaderNavs.js +6 -6
  232. package/lib/tntd-layout/HeaderTabs.js +7 -7
  233. package/lib/tntd-layout/Iconfont.js +1 -1
  234. package/lib/tntd-layout/Language.js +6 -6
  235. package/lib/tntd-layout/Layout.js +6 -6
  236. package/lib/tntd-layout/Logo.js +2 -2
  237. package/lib/tntd-layout/OrgAppList.js +6 -6
  238. package/lib/tntd-layout/SideMenu.js +6 -6
  239. package/lib/tntd-layout/Theme.js +6 -6
  240. package/lib/tntd-layout/createActions.js +1 -1
  241. package/lib/tntd-layout/images/index.js +1 -1
  242. package/lib/tntd-layout/index.js +1 -1
  243. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  244. package/lib/tntd-layout/paaslayout/Header.js +2 -2
  245. package/lib/tntd-layout/paaslayout/Logo.js +2 -2
  246. package/lib/tntd-layout/paaslayout/SideMenu.js +6 -6
  247. package/lib/tntd-layout/paaslayout/index.js +6 -6
  248. package/lib/tntd-layout/storage.js +1 -1
  249. package/lib/tntd-modal/index.js +6 -6
  250. package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
  251. package/lib/tntd-rc-select/_util/context.js +1 -1
  252. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  253. package/lib/tntd-rc-select/_util/getIcons.js +1 -1
  254. package/lib/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  255. package/lib/tntd-rc-select/index.js +2 -2
  256. package/lib/{query-form-v3/Field/Composition/Select.d.ts → tntd-reference/AHref/index.d.ts} +1 -1
  257. package/lib/tntd-reference/AHref/index.d.ts.map +1 -0
  258. package/lib/tntd-reference/AHref/index.js +44 -0
  259. package/lib/tntd-reference/AHref/index.js.map +1 -0
  260. package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts +3 -0
  261. package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts.map +1 -0
  262. package/lib/tntd-reference/ReferenceBatchCheck/index.js +165 -0
  263. package/lib/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
  264. package/lib/tntd-reference/ReferenceBatchCheck/index.less +21 -0
  265. package/lib/{query-form-v3/Field/Select.d.ts → tntd-reference/ReferenceBatchDrawer/index.d.ts} +1 -1
  266. package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts.map +1 -0
  267. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +126 -0
  268. package/lib/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
  269. package/lib/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
  270. package/lib/tntd-reference/ReferenceCheck/index.d.ts +3 -0
  271. package/lib/tntd-reference/ReferenceCheck/index.d.ts.map +1 -0
  272. package/lib/tntd-reference/ReferenceCheck/index.js +126 -0
  273. package/lib/tntd-reference/ReferenceCheck/index.js.map +1 -0
  274. package/lib/tntd-reference/ReferenceCheck/index.less +10 -0
  275. package/lib/{query-form-v3/Field/SelectInput.d.ts → tntd-reference/ReferenceDrawer/index.d.ts} +1 -1
  276. package/lib/tntd-reference/ReferenceDrawer/index.d.ts.map +1 -0
  277. package/lib/tntd-reference/ReferenceDrawer/index.js +93 -0
  278. package/lib/tntd-reference/ReferenceDrawer/index.js.map +1 -0
  279. package/lib/tntd-reference/ReferenceDrawer/index.less +0 -0
  280. package/lib/tntd-reference/ReferenceInfo/index.d.ts +4 -0
  281. package/lib/tntd-reference/ReferenceInfo/index.d.ts.map +1 -0
  282. package/lib/tntd-reference/ReferenceInfo/index.js +164 -0
  283. package/lib/tntd-reference/ReferenceInfo/index.js.map +1 -0
  284. package/lib/tntd-reference/ReferenceInfo/index.less +31 -0
  285. package/lib/tntd-reference/index.d.ts +15 -0
  286. package/lib/tntd-reference/index.d.ts.map +1 -0
  287. package/lib/tntd-reference/index.js +20 -0
  288. package/lib/tntd-reference/index.js.map +1 -0
  289. package/lib/tntd-second-page/index.js +1 -1
  290. package/lib/tntd-select/DropDownWrap.js +8 -8
  291. package/lib/tntd-select/index.js +10 -9
  292. package/lib/tntd-virtual-tree/index.d.ts +3 -1
  293. package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
  294. package/lib/tntd-virtual-tree/index.js +23 -12
  295. package/lib/tntd-virtual-tree/index.js.map +1 -1
  296. package/lib/tntd-virtual-tree/index.less +2 -42
  297. package/lib/tntd-virtual-tree/utils.js +28 -28
  298. package/lib/tntd-virtual-tree-select/index.d.ts +12 -4
  299. package/lib/tntd-virtual-tree-select/index.d.ts.map +1 -1
  300. package/lib/tntd-virtual-tree-select/index.js +99 -20
  301. package/lib/tntd-virtual-tree-select/index.js.map +1 -1
  302. package/lib/tntd-virtual-tree-select/utils.d.ts +2 -9
  303. package/lib/tntd-virtual-tree-select/utils.d.ts.map +1 -1
  304. package/lib/tntd-virtual-tree-select/utils.js +28 -147
  305. package/lib/tntd-virtual-tree-select/utils.js.map +1 -1
  306. package/lib/tooltip/tooltip.js +1 -1
  307. package/lib/upload/index.js +1 -1
  308. package/lib/utils/checkAuth.js +4 -4
  309. package/lib/utils/index.js +9 -9
  310. package/lib/utils/lang.js +3 -3
  311. package/lib/water-mark/index.js +5 -5
  312. package/package.json +4 -2
  313. package/es/query-form-v3/Field/Checkbox.js +0 -23
  314. package/es/query-form-v3/Field/Checkbox.js.map +0 -1
  315. package/es/query-form-v3/Field/Composition/FieldPopover.js +0 -330
  316. package/es/query-form-v3/Field/Composition/FieldPopover.js.map +0 -1
  317. package/es/query-form-v3/Field/Composition/FieldPopover.less +0 -35
  318. package/es/query-form-v3/Field/Composition/Select.js +0 -107
  319. package/es/query-form-v3/Field/Composition/Select.js.map +0 -1
  320. package/es/query-form-v3/Field/Composition/index.js +0 -208
  321. package/es/query-form-v3/Field/Composition/index.js.map +0 -1
  322. package/es/query-form-v3/Field/Composition/index.less +0 -118
  323. package/es/query-form-v3/Field/Composition/utils.js +0 -132
  324. package/es/query-form-v3/Field/Composition/utils.js.map +0 -1
  325. package/es/query-form-v3/Field/Select.js +0 -59
  326. package/es/query-form-v3/Field/Select.js.map +0 -1
  327. package/es/query-form-v3/Field/SelectInput.js +0 -87
  328. package/es/query-form-v3/Field/SelectInput.js.map +0 -1
  329. package/es/query-form-v3/Field/fieldsMap.js +0 -28
  330. package/es/query-form-v3/Field/fieldsMap.js.map +0 -1
  331. package/es/query-form-v3/Field/index.js +0 -117
  332. package/es/query-form-v3/Field/index.js.map +0 -1
  333. package/es/query-form-v3/createActions.js +0 -47
  334. package/es/query-form-v3/createActions.js.map +0 -1
  335. package/es/query-form-v3/index.js +0 -175
  336. package/es/query-form-v3/index.js.map +0 -1
  337. package/es/query-form-v3/index.less +0 -91
  338. package/es/query-form-v3/useForm.js +0 -6
  339. package/es/query-form-v3/useForm.js.map +0 -1
  340. package/es/tntd-virtual-tree-select/VirtualTree.js +0 -125
  341. package/es/tntd-virtual-tree-select/VirtualTree.js.map +0 -1
  342. package/es/tntd-virtual-tree-select/tree.less +0 -29
  343. package/lib/query-form-v3/Field/Checkbox.d.ts +0 -8
  344. package/lib/query-form-v3/Field/Checkbox.d.ts.map +0 -1
  345. package/lib/query-form-v3/Field/Checkbox.js +0 -28
  346. package/lib/query-form-v3/Field/Checkbox.js.map +0 -1
  347. package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts +0 -19
  348. package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts.map +0 -1
  349. package/lib/query-form-v3/Field/Composition/FieldPopover.js +0 -370
  350. package/lib/query-form-v3/Field/Composition/FieldPopover.js.map +0 -1
  351. package/lib/query-form-v3/Field/Composition/FieldPopover.less +0 -35
  352. package/lib/query-form-v3/Field/Composition/Select.d.ts.map +0 -1
  353. package/lib/query-form-v3/Field/Composition/Select.js +0 -131
  354. package/lib/query-form-v3/Field/Composition/Select.js.map +0 -1
  355. package/lib/query-form-v3/Field/Composition/index.d.ts +0 -10
  356. package/lib/query-form-v3/Field/Composition/index.d.ts.map +0 -1
  357. package/lib/query-form-v3/Field/Composition/index.js +0 -255
  358. package/lib/query-form-v3/Field/Composition/index.js.map +0 -1
  359. package/lib/query-form-v3/Field/Composition/index.less +0 -118
  360. package/lib/query-form-v3/Field/Composition/utils.d.ts +0 -22
  361. package/lib/query-form-v3/Field/Composition/utils.d.ts.map +0 -1
  362. package/lib/query-form-v3/Field/Composition/utils.js +0 -147
  363. package/lib/query-form-v3/Field/Composition/utils.js.map +0 -1
  364. package/lib/query-form-v3/Field/Select.d.ts.map +0 -1
  365. package/lib/query-form-v3/Field/Select.js +0 -80
  366. package/lib/query-form-v3/Field/Select.js.map +0 -1
  367. package/lib/query-form-v3/Field/SelectInput.d.ts.map +0 -1
  368. package/lib/query-form-v3/Field/SelectInput.js +0 -100
  369. package/lib/query-form-v3/Field/SelectInput.js.map +0 -1
  370. package/lib/query-form-v3/Field/fieldsMap.d.ts +0 -27
  371. package/lib/query-form-v3/Field/fieldsMap.d.ts.map +0 -1
  372. package/lib/query-form-v3/Field/fieldsMap.js +0 -35
  373. package/lib/query-form-v3/Field/fieldsMap.js.map +0 -1
  374. package/lib/query-form-v3/Field/index.d.ts +0 -14
  375. package/lib/query-form-v3/Field/index.d.ts.map +0 -1
  376. package/lib/query-form-v3/Field/index.js +0 -147
  377. package/lib/query-form-v3/Field/index.js.map +0 -1
  378. package/lib/query-form-v3/createActions.d.ts +0 -14
  379. package/lib/query-form-v3/createActions.d.ts.map +0 -1
  380. package/lib/query-form-v3/createActions.js +0 -54
  381. package/lib/query-form-v3/createActions.js.map +0 -1
  382. package/lib/query-form-v3/index.d.ts +0 -27
  383. package/lib/query-form-v3/index.d.ts.map +0 -1
  384. package/lib/query-form-v3/index.js +0 -206
  385. package/lib/query-form-v3/index.js.map +0 -1
  386. package/lib/query-form-v3/index.less +0 -91
  387. package/lib/query-form-v3/useForm.d.ts +0 -13
  388. package/lib/query-form-v3/useForm.d.ts.map +0 -1
  389. package/lib/query-form-v3/useForm.js +0 -13
  390. package/lib/query-form-v3/useForm.js.map +0 -1
  391. package/lib/tntd-virtual-tree-select/VirtualTree.d.ts +0 -13
  392. package/lib/tntd-virtual-tree-select/VirtualTree.d.ts.map +0 -1
  393. package/lib/tntd-virtual-tree-select/VirtualTree.js +0 -155
  394. package/lib/tntd-virtual-tree-select/VirtualTree.js.map +0 -1
  395. package/lib/tntd-virtual-tree-select/tree.less +0 -29
@@ -0,0 +1,39 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
9
+ import React from 'react';
10
+ export default (props => {
11
+ const {
12
+ children,
13
+ href,
14
+ unmountHandle
15
+ } = props,
16
+ rest = __rest(props, ["children", "href", "unmountHandle"]);
17
+ if (window.__isMultiTab__) {
18
+ return React.createElement("a", {
19
+ onClick: evt => {
20
+ evt.preventDefault();
21
+ if (unmountHandle && typeof unmountHandle === 'function') {
22
+ unmountHandle();
23
+ }
24
+ let pathName = href;
25
+ if (href && href.includes('?')) {
26
+ pathName = href === null || href === void 0 ? void 0 : href.split('?')[0];
27
+ }
28
+ if (pathName === window.location.pathname) {
29
+ window.location.href = href;
30
+ } else {
31
+ window.push(href);
32
+ }
33
+ }
34
+ }, children);
35
+ }
36
+ return React.createElement("a", Object.assign({
37
+ href: href
38
+ }, rest), children);
39
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-reference/AHref/index.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,eAAe,CAAC,KAAK,EAAE,EAAE;IACvB,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAlD,qCAA0C,CAAQ,CAAC;IACzD,IAAI,MAAM,CAAC,cAAc,EAAE;QACzB,OAAO,CACL,2BACE,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;gBACf,GAAG,CAAC,cAAc,EAAE,CAAC;gBACrB,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE;oBACxD,aAAa,EAAE,CAAC;iBACjB;gBACD,IAAI,QAAQ,GAAG,IAAI,CAAC;gBACpB,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBAC9B,QAAQ,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;iBAChC;gBACD,IAAI,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE;oBACzC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;iBAC7B;qBAAM;oBACL,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACnB;YACH,CAAC,IAEA,QAAQ,CACP,CACL,CAAC;KACH;IACD,OAAO,CACL,yCAAG,IAAI,EAAE,IAAI,IAAM,IAAI,GACpB,QAAQ,CACP,CACL,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nexport default (props) => {\n const { children, href, unmountHandle, ...rest } = props;\n if (window.__isMultiTab__) {\n return (\n <a\n onClick={(evt) => {\n evt.preventDefault();\n if (unmountHandle && typeof unmountHandle === 'function') {\n unmountHandle();\n }\n let pathName = href;\n if (href && href.includes('?')) {\n pathName = href?.split('?')[0];\n }\n if (pathName === window.location.pathname) {\n window.location.href = href;\n } else {\n window.push(href);\n }\n }}\n >\n {children}\n </a>\n );\n }\n return (\n <a href={href} {...rest}>\n {children}\n </a>\n );\n};\n"]}
@@ -0,0 +1,153 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import Modal from "../../modal";
4
+ import Button from "../../button";
5
+ import Collapse from '../../collapse';
6
+ import message from "../../message";
7
+ import Tag from "../../tag";
8
+ import Tooltip from "../../tooltip";
9
+ import Icon from "../../icon";
10
+ import Alert from '../../alert';
11
+ import ReferenceInfo from '../ReferenceInfo';
12
+ import { getText } from '../../prev-locale';
13
+ import './index.less';
14
+ const {
15
+ Panel
16
+ } = Collapse;
17
+ export default (props => {
18
+ const {
19
+ title = React.createElement(React.Fragment, null, React.createElement(Icon, {
20
+ type: "warning",
21
+ style: {
22
+ marginRight: '4px',
23
+ color: '#EF6555'
24
+ }
25
+ }), getText('onLineFail', props === null || props === void 0 ? void 0 : props.lang)),
26
+ rq,
27
+ checkReferResponse,
28
+ showPagination,
29
+ destroyOnClose = true,
30
+ orgMap = {},
31
+ appList = [],
32
+ value = undefined,
33
+ onChange = () => {},
34
+ cancelText,
35
+ okText,
36
+ emptyType,
37
+ weakMsg = getText('weakMsg', props === null || props === void 0 ? void 0 : props.lang),
38
+ strongMsg = getText('strongMsg', props === null || props === void 0 ? void 0 : props.lang)
39
+ } = props || {};
40
+ const appendModal = (reject, resolve, referenceData = []) => {
41
+ let type = '';
42
+ if (!Array.isArray(referenceData) && (referenceData === null || referenceData === void 0 ? void 0 : referenceData.type)) {
43
+ type = referenceData === null || referenceData === void 0 ? void 0 : referenceData.type;
44
+ referenceData = (referenceData === null || referenceData === void 0 ? void 0 : referenceData.result) || [];
45
+ }
46
+ const modalWrap = document.createElement('div');
47
+ modalWrap.setAttribute('id', 'tddc-reference-online-check-modal');
48
+ const removeModal = () => {
49
+ var _a;
50
+ const tddcModal = document.querySelectorAll('#tddc-reference-online-check-modal');
51
+ if (tddcModal) {
52
+ tddcModal.forEach(ele => {
53
+ var _a;
54
+ return (_a = ele === null || ele === void 0 ? void 0 : ele.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(ele);
55
+ });
56
+ }
57
+ modalWrap && ((_a = modalWrap === null || modalWrap === void 0 ? void 0 : modalWrap.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(modalWrap));
58
+ !type && reject && reject(referenceData);
59
+ if (document.body.getAttribute('style')) {
60
+ document.body.removeAttribute('style');
61
+ }
62
+ };
63
+ removeModal();
64
+ document.body.appendChild(modalWrap);
65
+ // 能进行下一步操作
66
+ const canNextOpera = !!type && !['STRONG'].includes(type);
67
+ ReactDOM.render(React.createElement(Modal, {
68
+ title: title,
69
+ visible: true,
70
+ width: 1000,
71
+ destroyOnClose: destroyOnClose,
72
+ getContainer: modalWrap,
73
+ onCancel: removeModal,
74
+ footer: [React.createElement(Button, {
75
+ key: "back",
76
+ onClick: removeModal
77
+ }, cancelText || getText('cancel', props === null || props === void 0 ? void 0 : props.lang)), canNextOpera && React.createElement(Button, {
78
+ key: "submit",
79
+ type: "primary",
80
+ onClick: () => {
81
+ removeModal();
82
+ resolve(type);
83
+ }
84
+ }, okText || getText('next', props === null || props === void 0 ? void 0 : props.lang))]
85
+ }, React.createElement("div", {
86
+ className: "reference-online-check-modal"
87
+ }, !!type && canNextOpera && React.createElement("div", {
88
+ className: "mb16"
89
+ }, React.createElement(Alert, {
90
+ type: "warning",
91
+ message: weakMsg || (referenceData === null || referenceData === void 0 ? void 0 : referenceData.message) || getText('weakMsg', props === null || props === void 0 ? void 0 : props.lang)
92
+ })), !!type && !canNextOpera && React.createElement("div", {
93
+ className: "mb16"
94
+ }, React.createElement(Alert, {
95
+ type: "error",
96
+ message: strongMsg || (referenceData === null || referenceData === void 0 ? void 0 : referenceData.message) || getText('strongMsg', props === null || props === void 0 ? void 0 : props.lang)
97
+ })), React.createElement(Collapse, {
98
+ defaultActiveKey: value || [0],
99
+ onChange: onChange
100
+ }, referenceData === null || referenceData === void 0 ? void 0 : referenceData.map((d, i) => {
101
+ let headerTxt = d === null || d === void 0 ? void 0 : d.componentName;
102
+ if (d === null || d === void 0 ? void 0 : d.componentCode) {
103
+ headerTxt += `[${d === null || d === void 0 ? void 0 : d.componentCode}]`;
104
+ }
105
+ return React.createElement(Panel, {
106
+ header: React.createElement("div", {
107
+ className: "refer-panel-head"
108
+ }, React.createElement(Tooltip, {
109
+ title: headerTxt,
110
+ placement: "topLeft"
111
+ }, React.createElement("span", null, headerTxt)), (d === null || d === void 0 ? void 0 : d.componentVersion) && React.createElement(Tag, {
112
+ size: "small",
113
+ color: "tnt-purple"
114
+ }, "V", d === null || d === void 0 ? void 0 : d.componentVersion), (d === null || d === void 0 ? void 0 : d.type) === 'STRONG' && React.createElement(Tag, {
115
+ color: "red",
116
+ size: "small"
117
+ }, getText('exist', props === null || props === void 0 ? void 0 : props.lang), (d === null || d === void 0 ? void 0 : d.typeName) || getText('strong', props === null || props === void 0 ? void 0 : props.lang))),
118
+ key: i
119
+ }, React.createElement(ReferenceInfo, {
120
+ emptyType: emptyType,
121
+ from: "ReferenceBatchCheck",
122
+ unmountHandle: removeModal,
123
+ referenceData: (d === null || d === void 0 ? void 0 : d.result) || [],
124
+ orgMap: orgMap,
125
+ appList: appList,
126
+ showPagination: showPagination
127
+ }));
128
+ })))), modalWrap);
129
+ };
130
+ if (rq && typeof rq === 'function') {
131
+ return new Promise((resolve, reject) => {
132
+ return rq().then(res => {
133
+ const {
134
+ success,
135
+ data
136
+ } = res || {};
137
+ if (success) {
138
+ if (Array.isArray(data) && !!(data === null || data === void 0 ? void 0 : data.length)) {
139
+ appendModal(reject, resolve, data);
140
+ } else if (!Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.type) !== 'NO_EXIST') {
141
+ appendModal(reject, resolve, data);
142
+ } else {
143
+ resolve(data);
144
+ }
145
+ } else {
146
+ reject(getText('relationFail', props === null || props === void 0 ? void 0 : props.lang));
147
+ }
148
+ });
149
+ });
150
+ } else {
151
+ message.error(getText('reliableQuery', props === null || props === void 0 ? void 0 : props.lang)); // '请提供一个可靠的查询请求!!!'
152
+ }
153
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-reference/ReferenceBatchCheck/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,MAAM,MAAM,c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AAC;iBAC9C;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAoB;KAC3E;AACH,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Modal from \"../../modal\";\nimport Button from \"../../button\";\nimport Collapse from '../../collapse';\nimport message from \"../../message\";\nimport Tag from \"../../tag\";\nimport Tooltip from \"../../tooltip\";\nimport Icon from \"../../icon\";\nimport Alert from '../../alert';\nimport ReferenceInfo from '../ReferenceInfo';\nimport { getText } from '../../prev-locale';\nimport './index.less';\n\nconst { Panel } = Collapse;\n\nexport default (props) => {\n const {\n title = (\n <>\n <Icon type=\"warning\" style={{ marginRight: '4px', color: '#EF6555' }} />\n {/* 上线校验失败 */}\n {getText('onLineFail', props?.lang)}\n </>\n ),\n rq,\n checkReferResponse,\n showPagination,\n destroyOnClose = true,\n orgMap = {},\n appList = [],\n value = undefined,\n onChange = () => {},\n cancelText,\n okText,\n emptyType,\n weakMsg = getText('weakMsg', props?.lang),\n strongMsg = getText('strongMsg', props?.lang),\n } = props || {};\n\n const appendModal = (reject, resolve, referenceData = []) => {\n let type = '';\n if (!Array.isArray(referenceData) && referenceData?.type) {\n type = referenceData?.type;\n referenceData = referenceData?.result || [];\n }\n const modalWrap = document.createElement('div');\n modalWrap.setAttribute('id', 'tddc-reference-online-check-modal');\n const removeModal = () => {\n const tddcModal = document.querySelectorAll('#tddc-reference-online-check-modal');\n if (tddcModal) {\n tddcModal.forEach((ele) => ele?.parentNode?.removeChild(ele));\n }\n modalWrap && modalWrap?.parentNode?.removeChild(modalWrap);\n !type && reject && reject(referenceData);\n if (document.body.getAttribute('style')) {\n document.body.removeAttribute('style');\n }\n };\n removeModal();\n document.body.appendChild(modalWrap);\n // 能进行下一步操作\n const canNextOpera = !!type && !['STRONG'].includes(type);\n ReactDOM.render(\n <Modal\n title={title}\n visible={true}\n width={1000}\n destroyOnClose={destroyOnClose}\n getContainer={modalWrap}\n onCancel={removeModal}\n footer={[\n <Button key=\"back\" onClick={removeModal}>\n {cancelText || getText('cancel', props?.lang)}\n </Button>,\n canNextOpera && (\n <Button\n key=\"submit\"\n type=\"primary\"\n onClick={() => {\n removeModal();\n resolve(type);\n }}\n >\n {okText || getText('next', props?.lang)}\n </Button>\n ),\n ]}\n >\n <div className=\"reference-online-check-modal\">\n {!!type && canNextOpera && (\n <div className=\"mb16\">\n <Alert\n type=\"warning\"\n message={\n weakMsg || referenceData?.message || getText('weakMsg', props?.lang)\n // '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作'\n }\n />\n </div>\n )}\n {!!type && !canNextOpera && (\n <div className=\"mb16\">\n <Alert\n type=\"error\"\n message={\n strongMsg || referenceData?.message || getText('strongMsg', props?.lang)\n // '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作'\n }\n />\n </div>\n )}\n\n <Collapse defaultActiveKey={value || [0]} onChange={onChange}>\n {referenceData?.map((d, i) => {\n let headerTxt = d?.componentName;\n if (d?.componentCode) {\n headerTxt += `[${d?.componentCode}]`;\n }\n return (\n <Panel\n header={\n <div className=\"refer-panel-head\">\n <Tooltip title={headerTxt} placement=\"topLeft\">\n <span>{headerTxt}</span>\n </Tooltip>\n {d?.componentVersion && (\n <Tag size=\"small\" color=\"tnt-purple\">\n V{d?.componentVersion}\n </Tag>\n )}\n {d?.type === 'STRONG' && (\n <Tag color=\"red\" size=\"small\">\n {getText('exist', props?.lang)}\n {d?.typeName || getText('strong', props?.lang)}\n </Tag>\n )}\n </div>\n }\n key={i}\n >\n <ReferenceInfo\n emptyType={emptyType}\n from=\"ReferenceBatchCheck\"\n unmountHandle={removeModal}\n referenceData={d?.result || []}\n orgMap={orgMap}\n appList={appList}\n showPagination={showPagination}\n />\n </Panel>\n );\n })}\n </Collapse>\n </div>\n </Modal>,\n modalWrap,\n );\n };\n if (rq && typeof rq === 'function') {\n return new Promise((resolve, reject) => {\n return rq().then((res) => {\n const { success, data } = res || {};\n if (success) {\n if (Array.isArray(data) && !!data?.length) {\n appendModal(reject, resolve, data);\n } else if (!Array.isArray(data) && data?.type !== 'NO_EXIST') {\n appendModal(reject, resolve, data);\n } else {\n resolve(data);\n }\n } else {\n reject(getText('relationFail', props?.lang));\n }\n });\n });\n } else {\n message.error(getText('reliableQuery', props?.lang)); // '请提供一个可靠的查询请求!!!'\n }\n};\n"]}
@@ -0,0 +1,21 @@
1
+ .reference-online-check-modal {
2
+ .mb16 {
3
+ margin-bottom: 16px;
4
+ }
5
+ .refer-panel-head {
6
+ display: flex;
7
+ align-items: center;
8
+ width: 100%;
9
+ > span {
10
+ max-width: 90%;
11
+ margin-right: 4px;
12
+ overflow: hidden;
13
+ white-space: nowrap;
14
+ text-overflow: ellipsis;
15
+ }
16
+ }
17
+ .ant-collapse-content-box {
18
+ padding: 16px;
19
+ background-color: @bg-color-quaternary;
20
+ }
21
+ }
@@ -0,0 +1,102 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
9
+ import React, { useEffect, useState } from 'react';
10
+ import Drawer from "../../drawer";
11
+ import Spin from '../../spin';
12
+ import Tooltip from "../../tooltip";
13
+ import message from "../../message";
14
+ import Collapse from "../../collapse";
15
+ import Tag from "../../tag";
16
+ import Empty from "../../empty";
17
+ import ReferenceInfo from '../ReferenceInfo';
18
+ import { getText } from '../../prev-locale';
19
+ const {
20
+ Panel
21
+ } = Collapse;
22
+ export default (props => {
23
+ const {
24
+ fetchReference,
25
+ data = null,
26
+ orgMap = {},
27
+ appList = [],
28
+ title,
29
+ visible,
30
+ onClose,
31
+ value = undefined,
32
+ onChange = () => {},
33
+ emptyType,
34
+ showPagination,
35
+ destroyOnClose = true
36
+ } = props,
37
+ rest = __rest(props, ["fetchReference", "data", "orgMap", "appList", "title", "visible", "onClose", "value", "onChange", "emptyType", "showPagination", "destroyOnClose"]);
38
+ const [referenceData, setReferenceData] = useState(data);
39
+ const [referenceLoad, setReferenceLoad] = useState(!data);
40
+ useEffect(() => {
41
+ if (visible && fetchReference) {
42
+ fetchReference().then(res => {
43
+ if ((res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data)) {
44
+ setReferenceData((res === null || res === void 0 ? void 0 : res.data) || []);
45
+ }
46
+ if (!(res === null || res === void 0 ? void 0 : res.success)) {
47
+ message.error(res.message || getText('referenceFail', props === null || props === void 0 ? void 0 : props.lang)); // '查询引用关系失败'
48
+ }
49
+ }).finally(() => {
50
+ setReferenceLoad(false);
51
+ });
52
+ }
53
+ }, [visible, fetchReference]);
54
+ return React.createElement(Drawer, Object.assign({
55
+ className: "reference-drawer",
56
+ width: 650,
57
+ title: React.createElement(Tooltip, {
58
+ title: title
59
+ }, title || ''),
60
+ onClose: onClose,
61
+ visible: visible,
62
+ destroyOnClose: destroyOnClose
63
+ }, rest), referenceLoad && React.createElement(Spin, {
64
+ className: "globalSpin",
65
+ tip: getText('inQuery', props === null || props === void 0 ? void 0 : props.lang)
66
+ }), !referenceLoad && referenceData.length && React.createElement("div", {
67
+ className: "drawer-reference-body"
68
+ }, React.createElement(Collapse, {
69
+ defaultActiveKey: value || [0],
70
+ onChange: onChange
71
+ }, referenceData === null || referenceData === void 0 ? void 0 : referenceData.map((d, i) => {
72
+ let headerTxt = d === null || d === void 0 ? void 0 : d.componentName;
73
+ if (d === null || d === void 0 ? void 0 : d.componentCode) {
74
+ headerTxt += `[${d === null || d === void 0 ? void 0 : d.componentCode}]`;
75
+ }
76
+ return React.createElement(Panel, {
77
+ header: React.createElement("div", {
78
+ className: "refer-panel-head"
79
+ }, React.createElement(Tooltip, {
80
+ title: headerTxt,
81
+ placement: "topLeft"
82
+ }, React.createElement("span", null, headerTxt)), (d === null || d === void 0 ? void 0 : d.componentVersion) && React.createElement(Tag, {
83
+ color: "green"
84
+ }, "V", d === null || d === void 0 ? void 0 : d.componentVersion)),
85
+ key: i
86
+ }, React.createElement(ReferenceInfo, {
87
+ emptyType: emptyType,
88
+ from: "ReferenceBatchCheck",
89
+ unmountHandle: () => {},
90
+ referenceData: (d === null || d === void 0 ? void 0 : d.result) || [],
91
+ orgMap: orgMap,
92
+ appList: appList,
93
+ showPagination: showPagination
94
+ }));
95
+ }))) || React.createElement(Empty, {
96
+ description: getText('noData', props === null || props === void 0 ? void 0 : props.lang),
97
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
98
+ imageStyle: {
99
+ marginTop: 120
100
+ }
101
+ }));
102
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-reference/ReferenceBatchDrawer/index.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAQ,aAAa,MAAO,kBAAkB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,EAAE,KAAK,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AAG,IAAC,KAAK,EAAC,OAAO;iCAAG,CAAC,aAAD,CAAC;4BAAD,CAAC,CAAE,gBAAgB,CAAO,CACnE,EAER,GAAG,EAAE,CAAC;oBAEN,oBAAC,aAAa,IACZ,SAAS,EAAE,SAAS,EACpB,IAAI,EAAC,qBAAqB,EAC1B,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC,EACvB,aAAa,EAAE,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,MAAM,KAAI,EAAE,EAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,GAC9B,CACI,CACT,CAAC;YACJ,CAAC,CAAC,CACO,CACP,CACP,CAAC,IAAI,CACJ,oBAAC,KAAK,IACJ,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,EAC3C,KAAK,EAAE,KAAK,CAAC,sBAAsB,EACnC,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,GAC9B,CACH,CACM,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport Drawer from \"../../drawer\";\nimport Spin from '../../spin';\nimport Tooltip from \"../../tooltip\";\nimport message from \"../../message\";\nimport Collapse from \"../../collapse\";\nimport Tag from \"../../tag\";\nimport Empty from \"../../empty\";\nimport ReferenceInfo from '../ReferenceInfo';\nimport { getText } from '../../prev-locale';\n\nconst { Panel } = Collapse;\n\nexport default (props) => {\n const {\n fetchReference,\n data = null,\n orgMap = {},\n appList = [],\n title,\n visible,\n onClose,\n value = undefined,\n onChange = () => {},\n emptyType,\n showPagination,\n destroyOnClose = true,\n ...rest\n } = props;\n const [referenceData, setReferenceData] = useState(data);\n const [referenceLoad, setReferenceLoad] = useState(!data);\n useEffect(() => {\n if (visible && fetchReference) {\n fetchReference()\n .then((res) => {\n if (res?.success && res?.data) {\n setReferenceData(res?.data || []);\n }\n if (!res?.success) {\n message.error(res.message || getText('referenceFail', props?.lang)); // '查询引用关系失败'\n }\n })\n .finally(() => {\n setReferenceLoad(false);\n });\n }\n }, [visible, fetchReference]);\n\n return (\n <Drawer\n className=\"reference-drawer\"\n width={650}\n title={<Tooltip title={title}>{title || ''}</Tooltip>}\n onClose={onClose}\n visible={visible}\n destroyOnClose={destroyOnClose}\n {...rest}\n >\n {referenceLoad && <Spin className=\"globalSpin\" tip={getText('inQuery', props?.lang)} />}\n {(!referenceLoad && referenceData.length && (\n <div className=\"drawer-reference-body\">\n <Collapse defaultActiveKey={value || [0]} onChange={onChange}>\n {referenceData?.map((d, i) => {\n let headerTxt = d?.componentName;\n if (d?.componentCode) {\n headerTxt += `[${d?.componentCode}]`;\n }\n return (\n <Panel\n header={\n <div className=\"refer-panel-head\">\n <Tooltip title={headerTxt} placement=\"topLeft\">\n <span>{headerTxt}</span>\n </Tooltip>\n {d?.componentVersion && <Tag color=\"green\">V{d?.componentVersion}</Tag>}\n </div>\n }\n key={i}\n >\n <ReferenceInfo\n emptyType={emptyType}\n from=\"ReferenceBatchCheck\"\n unmountHandle={() => {}}\n referenceData={d?.result || []}\n orgMap={orgMap}\n appList={appList}\n showPagination={showPagination}\n />\n </Panel>\n );\n })}\n </Collapse>\n </div>\n )) || (\n <Empty\n description={getText('noData', props?.lang)}\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n imageStyle={{ marginTop: 120 }}\n />\n )}\n </Drawer>\n );\n};\n"]}
@@ -0,0 +1,117 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import Modal from '../../modal';
4
+ import Button from '../../button';
5
+ import Alert from '../../alert';
6
+ import message from '../../message';
7
+ import ReferenceInfo from '../ReferenceInfo';
8
+ import { getText } from '../../prev-locale';
9
+ import './index.less';
10
+ export default (props => {
11
+ const {
12
+ title = getText('viewReference', props === null || props === void 0 ? void 0 : props.lang),
13
+ rq,
14
+ checkReferResponse,
15
+ orgMap = {},
16
+ appList = [],
17
+ cancelText,
18
+ okText,
19
+ emptyType,
20
+ showPagination,
21
+ destroyOnClose = true,
22
+ weakMsg = getText('weakMsg', props === null || props === void 0 ? void 0 : props.lang),
23
+ //'存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',
24
+ strongMsg = getText('strongMsg', props === null || props === void 0 ? void 0 : props.lang) //'存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',
25
+ } = props || {};
26
+ const appendModal = (resolve, {
27
+ type,
28
+ result: referenceData = []
29
+ }) => {
30
+ const modalWrap = document.createElement('div');
31
+ modalWrap.setAttribute('id', 'tddc-reference-check-modal');
32
+ const removeModal = () => {
33
+ var _a;
34
+ const tddcModal = document.querySelectorAll('#tddc-reference-check-modal');
35
+ if (tddcModal) {
36
+ tddcModal.forEach(ele => {
37
+ var _a;
38
+ return (_a = ele === null || ele === void 0 ? void 0 : ele.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(ele);
39
+ });
40
+ }
41
+ modalWrap && ((_a = modalWrap === null || modalWrap === void 0 ? void 0 : modalWrap.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(modalWrap));
42
+ if (document.body.getAttribute('style')) {
43
+ document.body.removeAttribute('style');
44
+ }
45
+ };
46
+ removeModal();
47
+ // 能进行下一步操作
48
+ const canNextOpera = !!type && !['STRONG'].includes(type);
49
+ document.body.appendChild(modalWrap);
50
+ ReactDOM.render(React.createElement(Modal, {
51
+ title: title,
52
+ visible: true,
53
+ width: 1000,
54
+ destroyOnClose: destroyOnClose,
55
+ getContainer: modalWrap,
56
+ onCancel: removeModal,
57
+ footer: [React.createElement(Button, {
58
+ key: "back",
59
+ onClick: removeModal
60
+ }, cancelText || getText('cancel', props === null || props === void 0 ? void 0 : props.lang)), canNextOpera && React.createElement(Button, {
61
+ key: "submit",
62
+ type: "primary",
63
+ onClick: () => {
64
+ removeModal();
65
+ resolve(type);
66
+ }
67
+ }, okText || getText('next', props === null || props === void 0 ? void 0 : props.lang))]
68
+ }, React.createElement("div", {
69
+ className: "reference-check-modal"
70
+ }, canNextOpera && React.createElement("div", {
71
+ className: "mb16"
72
+ }, React.createElement(Alert, {
73
+ type: "warning",
74
+ message: weakMsg || (referenceData === null || referenceData === void 0 ? void 0 : referenceData.message) || getText('weakMsg', props === null || props === void 0 ? void 0 : props.lang)
75
+ })), !canNextOpera && React.createElement("div", {
76
+ className: "mb16"
77
+ }, React.createElement(Alert, {
78
+ type: "error",
79
+ message: strongMsg || (referenceData === null || referenceData === void 0 ? void 0 : referenceData.message) || getText('strongMsg', props === null || props === void 0 ? void 0 : props.lang)
80
+ })), React.createElement("div", {
81
+ className: "relation-reference-detail"
82
+ }, React.createElement(ReferenceInfo, {
83
+ showPagination: showPagination,
84
+ emptyType: emptyType,
85
+ referenceData: referenceData,
86
+ orgMap: orgMap,
87
+ appList: appList,
88
+ unmountHandle: removeModal
89
+ })))), modalWrap);
90
+ };
91
+ if (rq && typeof rq === 'function') {
92
+ return new Promise((resolve, reject) => {
93
+ return rq().then(res => {
94
+ const {
95
+ success,
96
+ data
97
+ } = res || {};
98
+ if (success) {
99
+ const {
100
+ type
101
+ } = data || {};
102
+ if (type === 'NO_EXIST') {
103
+ resolve(type);
104
+ } else if (type) {
105
+ // if (['WEAK', 'STRONG'].includes(type)) {
106
+ appendModal(resolve, data);
107
+ }
108
+ } else {
109
+ // reject('查询关联关系失败');
110
+ reject(getText('relationFail', props === null || props === void 0 ? void 0 : props.lang));
111
+ }
112
+ });
113
+ });
114
+ } else {
115
+ message.error(getText('reliableQuery', props === null || props === void 0 ? void 0 : props.lang)); // '请提供一个可靠的查询请求!!!'
116
+ }
117
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-reference/ReferenceCheck/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,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vB,OAAO,CAAC,IAAI,CAAC,CAAC;qBACf;yBAAM,IAAI,IAAI,EAAE;wBACf,2CAA2C;wBAC3C,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;qBAC5B;iBACF;qBAAM;oBACL,sBAAsB;oBACtB,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC,CAAC;iBAC9C;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAoB;KAC3E;AACH,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Modal from '../../modal';\nimport Button from '../../button';\nimport Alert from '../../alert';\nimport message from '../../message';\nimport ReferenceInfo from '../ReferenceInfo';\nimport { getText } from '../../prev-locale';\nimport './index.less';\n\nexport default (props) => {\n const {\n title = getText('viewReference', props?.lang),\n rq,\n checkReferResponse,\n orgMap = {},\n appList = [],\n cancelText,\n okText,\n emptyType,\n showPagination,\n destroyOnClose = true,\n weakMsg = getText('weakMsg', props?.lang), //'存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',\n strongMsg = getText('strongMsg', props?.lang), //'存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',\n } = props || {};\n const appendModal = (resolve, { type, result: referenceData = [] }) => {\n const modalWrap = document.createElement('div');\n modalWrap.setAttribute('id', 'tddc-reference-check-modal');\n const removeModal = () => {\n const tddcModal = document.querySelectorAll('#tddc-reference-check-modal');\n if (tddcModal) {\n tddcModal.forEach((ele) => ele?.parentNode?.removeChild(ele));\n }\n modalWrap && modalWrap?.parentNode?.removeChild(modalWrap);\n if (document.body.getAttribute('style')) {\n document.body.removeAttribute('style');\n }\n };\n removeModal();\n\n // 能进行下一步操作\n const canNextOpera = !!type && !['STRONG'].includes(type);\n document.body.appendChild(modalWrap);\n ReactDOM.render(\n <Modal\n title={title}\n visible={true}\n width={1000}\n destroyOnClose={destroyOnClose}\n getContainer={modalWrap}\n onCancel={removeModal}\n footer={[\n <Button key=\"back\" onClick={removeModal}>\n {/* 取消 */}\n {cancelText || getText('cancel', props?.lang)}\n </Button>,\n canNextOpera && (\n <Button\n key=\"submit\"\n type=\"primary\"\n onClick={() => {\n removeModal();\n resolve(type);\n }}\n >\n {/* 下一步 */}\n {okText || getText('next', props?.lang)}\n </Button>\n ),\n ]}\n >\n <div className=\"reference-check-modal\">\n {canNextOpera && (\n <div className=\"mb16\">\n <Alert\n type=\"warning\"\n message={\n weakMsg || referenceData?.message || getText('weakMsg', props?.lang)\n // '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作'\n }\n />\n </div>\n )}\n {!canNextOpera && (\n <div className=\"mb16\">\n <Alert\n type=\"error\"\n message={\n strongMsg || referenceData?.message || getText('strongMsg', props?.lang)\n // '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作'\n }\n />\n </div>\n )}\n <div className=\"relation-reference-detail\">\n <ReferenceInfo\n showPagination={showPagination}\n emptyType={emptyType}\n referenceData={referenceData}\n orgMap={orgMap}\n appList={appList}\n unmountHandle={removeModal}\n />\n </div>\n </div>\n </Modal>,\n modalWrap,\n );\n };\n if (rq && typeof rq === 'function') {\n return new Promise((resolve, reject) => {\n return rq().then((res) => {\n const { success, data } = res || {};\n if (success) {\n const { type } = data || {};\n if (type === 'NO_EXIST') {\n resolve(type);\n } else if (type) {\n // if (['WEAK', 'STRONG'].includes(type)) {\n appendModal(resolve, data);\n }\n } else {\n // reject('查询关联关系失败');\n reject(getText('relationFail', props?.lang));\n }\n });\n });\n } else {\n message.error(getText('reliableQuery', props?.lang)); // '请提供一个可靠的查询请求!!!'\n }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ .reference-check-modal {
2
+ .mb16 {
3
+ margin-bottom: 16px;
4
+ }
5
+ .relation-reference-detail {
6
+ .reference-body .reference-body-item {
7
+ padding: 0;
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,69 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
9
+ import React, { useEffect, useState } from 'react';
10
+ import Drawer from '../../drawer';
11
+ import Spin from "../../spin";
12
+ import Tooltip from "../../tooltip";
13
+ import message from '../../message';
14
+ import ReferenceInfo from '../ReferenceInfo';
15
+ import { getText } from '../../prev-locale';
16
+ import './index.less';
17
+ export default (props => {
18
+ const {
19
+ fetchReference,
20
+ data = null,
21
+ orgMap = {},
22
+ appList = [],
23
+ title,
24
+ visible,
25
+ onClose,
26
+ emptyType,
27
+ showPagination,
28
+ destroyOnClose = true
29
+ } = props,
30
+ rest = __rest(props, ["fetchReference", "data", "orgMap", "appList", "title", "visible", "onClose", "emptyType", "showPagination", "destroyOnClose"]);
31
+ const [referenceData, setReferenceData] = useState(data);
32
+ const [referenceLoad, setReferenceLoad] = useState(!data);
33
+ useEffect(() => {
34
+ if (visible && fetchReference) {
35
+ fetchReference().then(res => {
36
+ if ((res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data)) {
37
+ setReferenceData((res === null || res === void 0 ? void 0 : res.data) || []);
38
+ }
39
+ if (!(res === null || res === void 0 ? void 0 : res.success)) {
40
+ message.error(res.message || getText('referenceFail', props === null || props === void 0 ? void 0 : props.lang)); // '查询引用关系失败'
41
+ }
42
+ }).finally(() => {
43
+ setReferenceLoad(false);
44
+ });
45
+ }
46
+ }, [visible, fetchReference]);
47
+ return React.createElement(Drawer, Object.assign({
48
+ className: "reference-drawer",
49
+ width: 900,
50
+ title: React.createElement(Tooltip, {
51
+ title: title
52
+ }, title || ''),
53
+ onClose: onClose,
54
+ visible: visible,
55
+ destroyOnClose: destroyOnClose
56
+ }, rest), referenceLoad && React.createElement(Spin, {
57
+ className: "globalSpin",
58
+ tip: getText('inQuery', props === null || props === void 0 ? void 0 : props.lang)
59
+ }), !referenceLoad && React.createElement("div", {
60
+ className: "drawer-reference-body"
61
+ }, React.createElement(ReferenceInfo, {
62
+ emptyType: emptyType,
63
+ referenceData: referenceData || [],
64
+ appList: appList || [],
65
+ orgMap: orgMap || {},
66
+ unmountHandle: onClose,
67
+ showPagination: showPagination
68
+ })));
69
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-reference/ReferenceDrawer/index.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB,eAAe,CAAC,KAAK,EAAE,EAAE;IACvB,MAAM,EACJ,cAAc,EACd,IAAI,GAAG,IAAI,EACX,MAAM,GAAG,EAAE,EACX,OAAO,GAAG,EAAE,EACZ,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,EACT,cAAc,EACd,cAAc,GAAG,IAAI,KAEnB,KAAK,EADJ,IA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QAEP,aAAa,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAC,YAAY,EAAC,GAAG,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,GAAS;QAC3F,CAAC,aAAa,IAAI,CACjB,6BAAK,SAAS,EAAC,uBAAuB;YACpC,oBAAC,aAAa,IACZ,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,IAAI,EAAE,EAClC,OAAO,EAAE,OAAO,IAAI,EAAE,EACtB,MAAM,EAAE,MAAM,IAAI,EAAE,EACpB,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,cAAc,GAC9B,CACE,CACP,CACM,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport Drawer from '../../drawer';\nimport Spin from \"../../spin\";\nimport Tooltip from \"../../tooltip\";\nimport message from '../../message';\nimport ReferenceInfo from '../ReferenceInfo';\nimport { getText } from '../../prev-locale';\nimport './index.less';\n\nexport default (props) => {\n const {\n fetchReference,\n data = null,\n orgMap = {},\n appList = [],\n title,\n visible,\n onClose,\n emptyType,\n showPagination,\n destroyOnClose = true,\n ...rest\n } = props;\n const [referenceData, setReferenceData] = useState(data);\n const [referenceLoad, setReferenceLoad] = useState(!data);\n useEffect(() => {\n if (visible && fetchReference) {\n fetchReference()\n .then((res) => {\n if (res?.success && res?.data) {\n setReferenceData(res?.data || []);\n }\n if (!res?.success) {\n message.error(res.message || getText('referenceFail', props?.lang)); // '查询引用关系失败'\n }\n })\n .finally(() => {\n setReferenceLoad(false);\n });\n }\n }, [visible, fetchReference]);\n\n return (\n <Drawer\n className=\"reference-drawer\"\n width={900}\n title={<Tooltip title={title}>{title || ''}</Tooltip>}\n onClose={onClose}\n visible={visible}\n destroyOnClose={destroyOnClose}\n {...rest}\n >\n {referenceLoad && <Spin className=\"globalSpin\" tip={getText('inQuery', props?.lang)}></Spin>}\n {!referenceLoad && (\n <div className=\"drawer-reference-body\">\n <ReferenceInfo\n emptyType={emptyType}\n referenceData={referenceData || []}\n appList={appList || []}\n orgMap={orgMap || {}}\n unmountHandle={onClose}\n showPagination={showPagination}\n />\n </div>\n )}\n </Drawer>\n );\n};"]}
File without changes