@ztocwst/rc-pro-materials 0.2.1 → 0.2.3-4.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 (301) hide show
  1. package/README.md +17 -17
  2. package/build/index.js +8 -8
  3. package/build/lowcode/assets-daily.json +11 -11
  4. package/build/lowcode/assets-dev.json +8 -8
  5. package/build/lowcode/assets-prod.json +11 -11
  6. package/build/lowcode/designer.html +2 -2
  7. package/build/lowcode/index.html +2 -2
  8. package/build/lowcode/index.js +1 -1
  9. package/build/lowcode/meta.js +1 -1
  10. package/build/lowcode/preview.css +1 -1
  11. package/build/lowcode/preview.js +4 -5
  12. package/build/lowcode/render/default/view.css +1 -2
  13. package/build/lowcode/render/default/view.js +9 -58
  14. package/build/lowcode/view.css +1 -2
  15. package/build/lowcode/view.js +10 -59
  16. package/dist/SCM_Comps.css +2 -2
  17. package/dist/SCM_Comps.js +22 -53
  18. package/dist/SCM_Comps.js.map +1 -1
  19. package/es/components/z-Ellipsis/ellipsis.d.ts +4 -4
  20. package/es/components/z-Ellipsis/index.d.ts +3 -3
  21. package/es/components/z-agg-block/index.d.ts +3 -3
  22. package/es/components/z-agg-block/index.less +134 -134
  23. package/es/components/z-agg-block/z-agg-block.d.ts +27 -27
  24. package/es/components/z-agg-block/z-agg-block.js +1 -1
  25. package/es/components/z-auth/auth.d.ts +9 -9
  26. package/es/components/z-auth/index.d.ts +3 -3
  27. package/es/components/z-box/box.d.ts +20 -20
  28. package/es/components/z-box/index.d.ts +3 -3
  29. package/es/components/z-box/index.less +4 -4
  30. package/es/components/z-button/index.d.ts +3 -3
  31. package/es/components/z-button/z-button.d.ts +4 -4
  32. package/es/components/z-config-provider/configProvider.d.ts +4 -4
  33. package/es/components/z-config-provider/configProvider.js +45 -4
  34. package/es/components/z-config-provider/index.d.ts +3 -3
  35. package/es/components/z-data-table/data-table.d.ts +9 -0
  36. package/es/components/z-data-table/data-table.js +24 -0
  37. package/es/components/z-data-table/index.d.ts +3 -0
  38. package/es/components/z-data-table/index.js +2 -0
  39. package/es/components/z-div/div.d.ts +6 -6
  40. package/es/components/z-div/index.d.ts +2 -2
  41. package/es/components/z-editTable/editTable.d.ts +11 -11
  42. package/es/components/z-editTable/editTable.js +3 -4
  43. package/es/components/z-editTable/index.d.ts +2 -2
  44. package/es/components/z-form/index.d.ts +3 -3
  45. package/es/components/z-form/z-form.d.ts +10 -10
  46. package/es/components/z-form/z-form.js +1 -1
  47. package/es/components/z-list/index.d.ts +3 -3
  48. package/es/components/z-list/list.d.ts +17 -17
  49. package/es/components/z-list/list.js +3 -3
  50. package/es/components/z-operation-records/index.d.ts +3 -3
  51. package/es/components/z-operation-records/operationRecords.d.ts +4 -4
  52. package/es/components/z-pointer-block/index.d.ts +3 -3
  53. package/es/components/z-pointer-block/index.less +15 -15
  54. package/es/components/z-pointer-block/z-pointer-block.d.ts +16 -16
  55. package/es/components/z-preview/index.d.ts +3 -3
  56. package/es/components/z-preview/preview.d.ts +4 -4
  57. package/es/components/z-pro-provider/index.d.ts +3 -3
  58. package/es/components/z-pro-provider/z-pro-provider.d.ts +6 -6
  59. package/es/components/z-ranking-list/index.d.ts +2 -2
  60. package/es/components/z-ranking-list/index.less +49 -49
  61. package/es/components/z-ranking-list/z-ranking-list.d.ts +14 -14
  62. package/es/components/z-ranking-list/z-ranking-list.js +2 -3
  63. package/es/components/z-simple-bar/index.d.ts +3 -3
  64. package/es/components/z-simple-bar/index.less +9 -9
  65. package/es/components/z-simple-bar/z-simple-bar.d.ts +27 -27
  66. package/es/components/z-singleFactory/index.d.ts +2 -2
  67. package/es/components/z-singleFactory/zSingerFactory.d.ts +2 -3
  68. package/es/components/z-slick/index.d.ts +3 -0
  69. package/es/components/z-slick/index.js +2 -0
  70. package/es/components/z-slick/slick.d.ts +47 -0
  71. package/es/components/z-slick/slick.js +35 -0
  72. package/es/components/z-statistic/index.d.ts +3 -3
  73. package/es/components/z-statistic/index.less +22 -22
  74. package/es/components/z-statistic/z-statistic.d.ts +13 -13
  75. package/es/components/z-table/index.d.ts +3 -3
  76. package/es/components/z-table/table.d.ts +8 -8
  77. package/es/components/z-table/table.js +1 -1
  78. package/es/components/z-templates-data-common/components/chart-renderer/index.d.ts +12 -14
  79. package/es/components/z-templates-data-common/components/chart-renderer/index.js +33 -13
  80. package/es/components/z-templates-data-common/data-common.d.ts +20 -105
  81. package/es/components/z-templates-data-common/data-common.helper.d.ts +2 -61
  82. package/es/components/z-templates-data-common/data-common.helper.js +2 -336
  83. package/es/components/z-templates-data-common/data-common.js +81 -62
  84. package/es/components/z-templates-data-common/index.d.ts +3 -3
  85. package/es/components/z-tpl/index.d.ts +3 -3
  86. package/es/components/z-tpl/tpl.d.ts +23 -23
  87. package/es/components/z-tpl/tpl.js +3 -3
  88. package/es/components/z-warehouse/index.d.ts +2 -2
  89. package/es/components/z-warehouse/zWarehouse.d.ts +2 -3
  90. package/es/components/z-watermark/index.d.ts +3 -0
  91. package/es/components/z-watermark/index.js +2 -0
  92. package/es/components/z-watermark/zWatermark.d.ts +3 -0
  93. package/es/components/z-watermark/zWatermark.js +4 -0
  94. package/es/index.d.ts +44 -38
  95. package/es/index.js +4 -0
  96. package/es/index.scss +1 -1
  97. package/es/style.js +2 -6
  98. package/es/utils/hoc.d.ts +6 -6
  99. package/es/utils/hoc.js +3 -3
  100. package/es/utils/index.d.ts +13 -13
  101. package/es/utils/index.js +5 -1
  102. package/es/utils/props/button.d.ts +13 -13
  103. package/es/utils/props/common.d.ts +7 -1
  104. package/es/utils/props/common.js +17 -0
  105. package/es/utils/props/editTable.d.ts +3 -3
  106. package/es/utils/props/editTable.js +21 -14
  107. package/es/utils/props/form.d.ts +36 -0
  108. package/es/utils/props/form.js +33 -14
  109. package/es/utils/props/listTpl.d.ts +29 -29
  110. package/es/utils/props/microModal.d.ts +7 -7
  111. package/es/utils/props/microModal.js +0 -1
  112. package/es/utils/props/microSwitch.d.ts +1 -1
  113. package/es/utils/props/microSwitch.js +4 -3
  114. package/es/utils/props/modalSelect.d.ts +6 -6
  115. package/es/utils/props/operationRecords.d.ts +2 -2
  116. package/es/utils/props/operationRecords.js +4 -4
  117. package/es/utils/props/preview.d.ts +2 -2
  118. package/es/utils/props/preview.js +4 -4
  119. package/es/utils/props/tpl.d.ts +173 -162
  120. package/es/utils/props/warehouseAndFactory.d.ts +1 -1
  121. package/es/utils/rcProRequest.d.ts +3 -3
  122. package/es/utils/rcProRequest.js +3 -3
  123. package/es/variables.scss +3 -3
  124. package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -4
  125. package/lib/components/z-Ellipsis/ellipsis.js +3 -4
  126. package/lib/components/z-Ellipsis/index.d.ts +3 -3
  127. package/lib/components/z-Ellipsis/index.js +1 -2
  128. package/lib/components/z-agg-block/index.d.ts +3 -3
  129. package/lib/components/z-agg-block/index.js +1 -2
  130. package/lib/components/z-agg-block/index.less +134 -134
  131. package/lib/components/z-agg-block/z-agg-block.d.ts +27 -27
  132. package/lib/components/z-agg-block/z-agg-block.js +2 -3
  133. package/lib/components/z-auth/auth.d.ts +9 -9
  134. package/lib/components/z-auth/auth.js +1 -2
  135. package/lib/components/z-auth/index.d.ts +3 -3
  136. package/lib/components/z-auth/index.js +1 -2
  137. package/lib/components/z-box/box.d.ts +20 -20
  138. package/lib/components/z-box/box.js +1 -2
  139. package/lib/components/z-box/index.d.ts +3 -3
  140. package/lib/components/z-box/index.js +1 -2
  141. package/lib/components/z-box/index.less +4 -4
  142. package/lib/components/z-button/index.d.ts +3 -3
  143. package/lib/components/z-button/index.js +1 -2
  144. package/lib/components/z-button/z-button.d.ts +4 -4
  145. package/lib/components/z-button/z-button.js +4 -4
  146. package/lib/components/z-config-provider/configProvider.d.ts +4 -4
  147. package/lib/components/z-config-provider/configProvider.js +47 -7
  148. package/lib/components/z-config-provider/index.d.ts +3 -3
  149. package/lib/components/z-config-provider/index.js +1 -2
  150. package/lib/components/z-data-table/data-table.d.ts +9 -0
  151. package/lib/components/z-data-table/data-table.js +27 -0
  152. package/lib/components/z-data-table/index.d.ts +3 -0
  153. package/lib/components/z-data-table/index.js +7 -0
  154. package/lib/components/z-div/div.d.ts +6 -6
  155. package/lib/components/z-div/div.js +1 -2
  156. package/lib/components/z-div/index.d.ts +2 -2
  157. package/lib/components/z-div/index.js +1 -2
  158. package/lib/components/z-editTable/editTable.d.ts +11 -11
  159. package/lib/components/z-editTable/editTable.js +7 -9
  160. package/lib/components/z-editTable/index.d.ts +2 -2
  161. package/lib/components/z-editTable/index.js +1 -2
  162. package/lib/components/z-form/index.d.ts +3 -3
  163. package/lib/components/z-form/index.js +1 -2
  164. package/lib/components/z-form/z-form.d.ts +10 -10
  165. package/lib/components/z-form/z-form.js +5 -6
  166. package/lib/components/z-list/index.d.ts +3 -3
  167. package/lib/components/z-list/index.js +1 -2
  168. package/lib/components/z-list/list.d.ts +17 -17
  169. package/lib/components/z-list/list.js +7 -8
  170. package/lib/components/z-operation-records/index.d.ts +3 -3
  171. package/lib/components/z-operation-records/index.js +1 -2
  172. package/lib/components/z-operation-records/operationRecords.d.ts +4 -4
  173. package/lib/components/z-operation-records/operationRecords.js +3 -4
  174. package/lib/components/z-pointer-block/index.d.ts +3 -3
  175. package/lib/components/z-pointer-block/index.js +1 -2
  176. package/lib/components/z-pointer-block/index.less +15 -15
  177. package/lib/components/z-pointer-block/z-pointer-block.d.ts +16 -16
  178. package/lib/components/z-pointer-block/z-pointer-block.js +1 -2
  179. package/lib/components/z-preview/index.d.ts +3 -3
  180. package/lib/components/z-preview/index.js +1 -2
  181. package/lib/components/z-preview/preview.d.ts +4 -4
  182. package/lib/components/z-preview/preview.js +3 -4
  183. package/lib/components/z-pro-provider/index.d.ts +3 -3
  184. package/lib/components/z-pro-provider/index.js +1 -2
  185. package/lib/components/z-pro-provider/z-pro-provider.d.ts +6 -6
  186. package/lib/components/z-pro-provider/z-pro-provider.js +3 -4
  187. package/lib/components/z-ranking-list/index.d.ts +2 -2
  188. package/lib/components/z-ranking-list/index.js +1 -2
  189. package/lib/components/z-ranking-list/index.less +49 -49
  190. package/lib/components/z-ranking-list/z-ranking-list.d.ts +14 -14
  191. package/lib/components/z-ranking-list/z-ranking-list.js +5 -7
  192. package/lib/components/z-simple-bar/index.d.ts +3 -3
  193. package/lib/components/z-simple-bar/index.js +1 -2
  194. package/lib/components/z-simple-bar/index.less +9 -9
  195. package/lib/components/z-simple-bar/z-simple-bar.d.ts +27 -27
  196. package/lib/components/z-simple-bar/z-simple-bar.js +1 -2
  197. package/lib/components/z-singleFactory/index.d.ts +2 -2
  198. package/lib/components/z-singleFactory/index.js +1 -2
  199. package/lib/components/z-singleFactory/zSingerFactory.d.ts +2 -3
  200. package/lib/components/z-singleFactory/zSingerFactory.js +3 -4
  201. package/lib/components/z-slick/index.d.ts +3 -0
  202. package/lib/components/z-slick/index.js +7 -0
  203. package/lib/components/z-slick/slick.d.ts +47 -0
  204. package/lib/components/z-slick/slick.js +39 -0
  205. package/lib/components/z-statistic/index.d.ts +3 -3
  206. package/lib/components/z-statistic/index.js +1 -2
  207. package/lib/components/z-statistic/index.less +22 -22
  208. package/lib/components/z-statistic/z-statistic.d.ts +13 -13
  209. package/lib/components/z-statistic/z-statistic.js +1 -2
  210. package/lib/components/z-table/index.d.ts +3 -3
  211. package/lib/components/z-table/index.js +1 -2
  212. package/lib/components/z-table/table.d.ts +8 -8
  213. package/lib/components/z-table/table.js +5 -6
  214. package/lib/components/z-templates-data-common/components/chart-renderer/index.d.ts +12 -14
  215. package/lib/components/z-templates-data-common/components/chart-renderer/index.js +36 -17
  216. package/lib/components/z-templates-data-common/data-common.d.ts +20 -105
  217. package/lib/components/z-templates-data-common/data-common.helper.d.ts +2 -61
  218. package/lib/components/z-templates-data-common/data-common.helper.js +3 -351
  219. package/lib/components/z-templates-data-common/data-common.js +85 -66
  220. package/lib/components/z-templates-data-common/index.d.ts +3 -3
  221. package/lib/components/z-templates-data-common/index.js +1 -2
  222. package/lib/components/z-tpl/index.d.ts +3 -3
  223. package/lib/components/z-tpl/index.js +1 -2
  224. package/lib/components/z-tpl/tpl.d.ts +23 -23
  225. package/lib/components/z-tpl/tpl.js +7 -8
  226. package/lib/components/z-warehouse/index.d.ts +2 -2
  227. package/lib/components/z-warehouse/index.js +1 -2
  228. package/lib/components/z-warehouse/zWarehouse.d.ts +2 -3
  229. package/lib/components/z-warehouse/zWarehouse.js +3 -4
  230. package/lib/components/z-watermark/index.d.ts +3 -0
  231. package/lib/components/z-watermark/index.js +7 -0
  232. package/lib/components/z-watermark/zWatermark.d.ts +3 -0
  233. package/lib/components/z-watermark/zWatermark.js +8 -0
  234. package/lib/index.d.ts +44 -38
  235. package/lib/index.js +8 -2
  236. package/lib/index.scss +1 -1
  237. package/lib/style.js +1 -3
  238. package/lib/utils/hoc.d.ts +6 -6
  239. package/lib/utils/hoc.js +3 -3
  240. package/lib/utils/index.d.ts +13 -13
  241. package/lib/utils/index.js +7 -4
  242. package/lib/utils/props/button.d.ts +13 -13
  243. package/lib/utils/props/button.js +2 -3
  244. package/lib/utils/props/common.d.ts +7 -1
  245. package/lib/utils/props/common.js +19 -3
  246. package/lib/utils/props/editTable.d.ts +3 -3
  247. package/lib/utils/props/editTable.js +23 -17
  248. package/lib/utils/props/form.d.ts +36 -0
  249. package/lib/utils/props/form.js +35 -17
  250. package/lib/utils/props/listTpl.d.ts +29 -29
  251. package/lib/utils/props/listTpl.js +2 -3
  252. package/lib/utils/props/microModal.d.ts +7 -7
  253. package/lib/utils/props/microModal.js +1 -3
  254. package/lib/utils/props/microSwitch.d.ts +1 -1
  255. package/lib/utils/props/microSwitch.js +5 -4
  256. package/lib/utils/props/modalSelect.d.ts +6 -6
  257. package/lib/utils/props/modalSelect.js +2 -4
  258. package/lib/utils/props/operationRecords.d.ts +2 -2
  259. package/lib/utils/props/operationRecords.js +6 -7
  260. package/lib/utils/props/preview.d.ts +2 -2
  261. package/lib/utils/props/preview.js +6 -7
  262. package/lib/utils/props/tpl.d.ts +173 -162
  263. package/lib/utils/props/tpl.js +3 -5
  264. package/lib/utils/props/warehouseAndFactory.d.ts +1 -1
  265. package/lib/utils/props/warehouseAndFactory.js +2 -3
  266. package/lib/utils/rcProRequest.d.ts +3 -3
  267. package/lib/utils/rcProRequest.js +3 -4
  268. package/lib/variables.scss +3 -3
  269. package/package.json +5 -5
  270. package/es/components/z-templates-data-common/components/custom-renderer/index.d.ts +0 -13
  271. package/es/components/z-templates-data-common/components/custom-renderer/index.js +0 -172
  272. package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +0 -39
  273. package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.js +0 -1
  274. package/es/components/z-templates-data-common/components/dim-target/index.d.ts +0 -16
  275. package/es/components/z-templates-data-common/components/dim-target/index.js +0 -430
  276. package/es/components/z-templates-data-common/components/dim-target/index.less +0 -49
  277. package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +0 -8
  278. package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +0 -26
  279. package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +0 -16
  280. package/es/components/z-templates-data-common/components/link-renderer/index.js +0 -320
  281. package/es/components/z-templates-data-common/components/link-renderer/index.less +0 -33
  282. package/es/components/z-templates-data-common/components/table-renderer/index.d.ts +0 -6
  283. package/es/components/z-templates-data-common/components/table-renderer/index.js +0 -481
  284. package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +0 -64
  285. package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +0 -220
  286. package/lib/components/z-templates-data-common/components/custom-renderer/index.d.ts +0 -13
  287. package/lib/components/z-templates-data-common/components/custom-renderer/index.js +0 -178
  288. package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +0 -39
  289. package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.js +0 -3
  290. package/lib/components/z-templates-data-common/components/dim-target/index.d.ts +0 -16
  291. package/lib/components/z-templates-data-common/components/dim-target/index.js +0 -438
  292. package/lib/components/z-templates-data-common/components/dim-target/index.less +0 -49
  293. package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +0 -8
  294. package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +0 -30
  295. package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +0 -16
  296. package/lib/components/z-templates-data-common/components/link-renderer/index.js +0 -326
  297. package/lib/components/z-templates-data-common/components/link-renderer/index.less +0 -33
  298. package/lib/components/z-templates-data-common/components/table-renderer/index.d.ts +0 -6
  299. package/lib/components/z-templates-data-common/components/table-renderer/index.js +0 -487
  300. package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +0 -64
  301. package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +0 -229
@@ -1,22 +1,22 @@
1
- .statistic-wrap {
2
- display: flex;
3
- flex-direction: row;
4
-
5
- .statistic-title-suffix {
6
- margin-left: 4px;
7
- }
8
-
9
- .statistic-left {
10
- flex: 1;
11
- }
12
-
13
- .statistic-right {
14
- text-align: right;
15
- }
16
-
17
- .statistic-right-title-extra {
18
- margin-bottom: 4px;
19
- font-size: 14px;
20
- min-height: 22px;
21
- }
22
- }
1
+ .statistic-wrap {
2
+ display: flex;
3
+ flex-direction: row;
4
+
5
+ .statistic-title-suffix {
6
+ margin-left: 4px;
7
+ }
8
+
9
+ .statistic-left {
10
+ flex: 1;
11
+ }
12
+
13
+ .statistic-right {
14
+ text-align: right;
15
+ }
16
+
17
+ .statistic-right-title-extra {
18
+ margin-bottom: 4px;
19
+ font-size: 14px;
20
+ min-height: 22px;
21
+ }
22
+ }
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import { StatisticProps } from 'antd';
3
- import './index.less';
4
- export interface TypeZStatisticProps extends StatisticProps {
5
- /** 标题后缀 */
6
- titleSuffix?: string | React.ReactNode;
7
- /** 标题附加内容 */
8
- titleExtra?: string | React.ReactNode;
9
- /** 值附加内容 */
10
- valueExtra?: string | React.ReactNode;
11
- }
12
- declare const ZStatistic: (props: TypeZStatisticProps) => import("react").JSX.Element;
13
- export default ZStatistic;
1
+ /// <reference types="react" />
2
+ import { StatisticProps } from 'antd';
3
+ import './index.less';
4
+ export interface TypeZStatisticProps extends StatisticProps {
5
+ /** 标题后缀 */
6
+ titleSuffix?: string | React.ReactNode;
7
+ /** 标题附加内容 */
8
+ titleExtra?: string | React.ReactNode;
9
+ /** 值附加内容 */
10
+ valueExtra?: string | React.ReactNode;
11
+ }
12
+ declare const ZStatistic: (props: TypeZStatisticProps) => JSX.Element;
13
+ export default ZStatistic;
@@ -1,3 +1,3 @@
1
- import ZTable from './table';
2
- export type { ProTableProps } from '@ztocwst/rc-pro';
3
- export default ZTable;
1
+ import ZTable from './table';
2
+ export type { ProTableProps } from '@ztocwst/rc-pro';
3
+ export default ZTable;
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
2
- import type { ProTableProps } from '@ztocwst/rc-pro';
3
- export default class ZTableContainer extends React.Component<ProTableProps, any> {
4
- tableRef: any;
5
- constructor(props: any);
6
- getTableRef: () => any;
7
- render(): React.JSX.Element;
8
- }
1
+ import * as React from 'react';
2
+ import type { ProTableProps } from '@ztocwst/rc-pro';
3
+ export default class ZTableContainer extends React.Component<ProTableProps, any> {
4
+ tableRef: any;
5
+ constructor(props: any);
6
+ getTableRef: () => any;
7
+ render(): JSX.Element;
8
+ }
@@ -13,7 +13,6 @@ var ZTable = /*#__PURE__*/React.forwardRef(function (props, ref) {
13
13
  } : {}));
14
14
  });
15
15
  var ZTableContainer = /*#__PURE__*/function (_React$Component) {
16
- _inheritsLoose(ZTableContainer, _React$Component);
17
16
  function ZTableContainer(props) {
18
17
  var _this;
19
18
  _this = _React$Component.call(this, props) || this;
@@ -24,6 +23,7 @@ var ZTableContainer = /*#__PURE__*/function (_React$Component) {
24
23
  _this.tableRef = /*#__PURE__*/React.createRef();
25
24
  return _this;
26
25
  }
26
+ _inheritsLoose(ZTableContainer, _React$Component);
27
27
  var _proto = ZTableContainer.prototype;
28
28
  _proto.render = function render() {
29
29
  return /*#__PURE__*/React.createElement(ZTable, _extends({}, this.props, {
@@ -1,14 +1,12 @@
1
- import React from 'react';
2
- import type { TypeZTemplatesDataCommonProps } from '../../data-common';
3
- import type { linkParamsType } from '../link-renderer';
4
- export interface ChartRendererProps {
5
- chartSetting?: Pick<TypeZTemplatesDataCommonProps, 'chartSetting'>;
6
- chartRenderRef?: React.Ref<{
7
- onLink: (v: linkParamsType) => void;
8
- queryChart: (v: Record<string, any>, d: string | undefined) => void;
9
- }>;
10
- /** 确认 */
11
- onConfirm?: () => void;
12
- }
13
- declare const ChartRenderer: ({ chartRenderRef, chartSetting, onConfirm }: ChartRendererProps) => JSX.Element | Pick<TypeZTemplatesDataCommonProps, "chartSetting">;
14
- export default ChartRenderer;
1
+ import React from 'react';
2
+ import type { DataTableInstance, DataTableProps } from '@ztocwst/rc-pro';
3
+ import type { tabsSettingProps } from '../../data-common';
4
+ export interface ChartRendererProps {
5
+ chartSetting?: DataTableProps | DataTableProps[] | React.ReactNode;
6
+ tabsSetting?: tabsSettingProps;
7
+ chartRenderRef?: React.Ref<DataTableInstance>;
8
+ /** 确认 */
9
+ onConfirm?: () => void;
10
+ }
11
+ declare const ChartRenderer: ({ chartRenderRef, tabsSetting, chartSetting, onConfirm }: ChartRendererProps) => any;
12
+ export default ChartRenderer;
@@ -1,15 +1,20 @@
1
1
  import _Tabs from "antd/es/tabs";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
4
+ import { TableRender, CustomRender } from '@ztocwst/rc-pro';
5
+ import { getType } from '@ztocwst/rc-pro/es/components/DataTable/DataTable.helper';
4
6
  import { separator } from "../../data-common.helper";
5
- import TableRenderer from "../table-renderer";
6
- import CustomRenderer from "../custom-renderer";
7
7
  var ChartRenderer = function ChartRenderer(_ref) {
8
8
  var chartRenderRef = _ref.chartRenderRef,
9
+ tabsSetting = _ref.tabsSetting,
9
10
  chartSetting = _ref.chartSetting,
10
11
  onConfirm = _ref.onConfirm;
11
- var isObject = Object.prototype.toString.call(chartSetting) === '[object Object]';
12
+ var isObject = getType(chartSetting) === 'object';
12
13
  var isArray = Array.isArray(chartSetting);
14
+ var _ref2 = tabsSetting || {},
15
+ extraProps = _ref2.extraProps,
16
+ onTabClick = _ref2.onTabClick;
17
+ var tabsProps = _extends({}, getType(extraProps) === 'function' ? extraProps === null || extraProps === void 0 ? void 0 : extraProps() : extraProps);
13
18
  var _chartRef = useRef({});
14
19
  var _useState = useState(),
15
20
  activeKey = _useState[0],
@@ -30,6 +35,9 @@ var ChartRenderer = function ChartRenderer(_ref) {
30
35
  (_chartRef$current$act3 = _chartRef.current[activeKey]) === null || _chartRef$current$act3 === void 0 ? void 0 : (_chartRef$current$act4 = _chartRef$current$act3.queryChart) === null || _chartRef$current$act4 === void 0 ? void 0 : _chartRef$current$act4.call(_chartRef$current$act3, values);
31
36
  }
32
37
  };
38
+ var getCurrentKey = function getCurrentKey() {
39
+ return activeKey;
40
+ };
33
41
  useEffect(function () {
34
42
  if (isObject && ! /*#__PURE__*/React.isValidElement(chartSetting)) {
35
43
  setActiveKey(chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.dataSetName);
@@ -50,12 +58,13 @@ var ChartRenderer = function ChartRenderer(_ref) {
50
58
  useImperativeHandle(chartRenderRef, function () {
51
59
  return {
52
60
  onLink: onLink,
53
- queryChart: queryChart
61
+ queryChart: queryChart,
62
+ getCurrentKey: getCurrentKey
54
63
  };
55
64
  });
56
65
 
57
66
  // react子节点
58
- if ( /*#__PURE__*/React.isValidElement(chartSetting)) {
67
+ if (/*#__PURE__*/React.isValidElement(chartSetting)) {
59
68
  return chartSetting;
60
69
  }
61
70
 
@@ -68,8 +77,16 @@ var ChartRenderer = function ChartRenderer(_ref) {
68
77
 
69
78
  // 普通列表json对象
70
79
  if (isObject) {
71
- return /*#__PURE__*/React.createElement(TableRenderer, _extends({}, chartSetting, {
72
- activeKey: activeKey,
80
+ return chartSetting !== null && chartSetting !== void 0 && chartSetting.custom ? /*#__PURE__*/React.createElement(CustomRender, _extends({}, chartSetting, {
81
+ currentKey: activeKey,
82
+ separator: separator,
83
+ chartRef: function chartRef(ref) {
84
+ _chartRef.current[chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.dataSetName] = ref;
85
+ },
86
+ onConfirm: onConfirm
87
+ })) : /*#__PURE__*/React.createElement(TableRender, _extends({}, chartSetting, {
88
+ currentKey: activeKey,
89
+ separator: separator,
73
90
  chartRef: function chartRef(ref) {
74
91
  _chartRef.current[chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.dataSetName] = ref;
75
92
  },
@@ -81,21 +98,24 @@ var ChartRenderer = function ChartRenderer(_ref) {
81
98
  if (isArray && !chartSetting.every(function (e) {
82
99
  return /*#__PURE__*/React.isValidElement(e);
83
100
  })) {
84
- return /*#__PURE__*/React.createElement(_Tabs, {
101
+ return /*#__PURE__*/React.createElement(_Tabs, _extends({}, tabsProps, {
85
102
  activeKey: activeKey,
103
+ onTabClick: onTabClick,
86
104
  onChange: handleTabsChange
87
- }, chartSetting.map(function (e, i) {
105
+ }), chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.map(function (e, i) {
88
106
  return /*#__PURE__*/React.createElement(_Tabs.TabPane, {
89
107
  tab: "" + ((e === null || e === void 0 ? void 0 : e.title) || ''),
90
108
  key: "" + (e === null || e === void 0 ? void 0 : e.dataSetName) + separator + i.toString()
91
- }, e !== null && e !== void 0 && e.custom ? /*#__PURE__*/React.createElement(CustomRenderer, _extends({}, e, {
92
- activeKey: activeKey,
109
+ }, e !== null && e !== void 0 && e.custom ? /*#__PURE__*/React.createElement(CustomRender, _extends({}, e, {
110
+ currentKey: activeKey,
111
+ separator: separator,
93
112
  chartRef: function chartRef(ref) {
94
113
  _chartRef.current["" + (e === null || e === void 0 ? void 0 : e.dataSetName) + separator + i] = ref;
95
114
  },
96
115
  onConfirm: onConfirm
97
- })) : /*#__PURE__*/React.createElement(TableRenderer, _extends({}, e, {
98
- activeKey: activeKey,
116
+ })) : /*#__PURE__*/React.createElement(TableRender, _extends({}, e, {
117
+ currentKey: activeKey,
118
+ separator: separator,
99
119
  chartRef: function chartRef(ref) {
100
120
  _chartRef.current["" + (e === null || e === void 0 ? void 0 : e.dataSetName) + separator + i] = ref;
101
121
  },
@@ -1,105 +1,20 @@
1
- import React from 'react';
2
- import type { ProFormRenderProps } from '@ztocwst/rc-pro';
3
- /** 指标配置 */
4
- export interface TypeTargetProps {
5
- /** 指标名称 */
6
- name: string;
7
- /** 是否默认选中 */
8
- checked: boolean;
9
- /** 别名 */
10
- alias: string;
11
- /** 英文名 */
12
- enName: string;
13
- /** 是否过滤 */
14
- isFilter: boolean;
15
- /** 是否可选 */
16
- optional: boolean;
17
- /** 小数位 精确度 */
18
- precision: number;
19
- /** 是否展示百分号 */
20
- percent: boolean;
21
- /** 是否允许排序 */
22
- sorted: boolean;
23
- /** 宽度 */
24
- width: number;
25
- /** 是否合计 */
26
- amounted: boolean;
27
- /** 指标描述 */
28
- description?: string;
29
- /** 下转二级页 */
30
- link?: string;
31
- /** 查询绑定关系 */
32
- queryBind?: string;
33
- /** 依赖 */
34
- dependencies?: string[];
35
- }
36
- /** 表格相关配置 */
37
- export interface TypeChartSettingProps {
38
- /** 二级页标题 */
39
- chartTitle?: string;
40
- /** 标题 */
41
- title?: string;
42
- /** 维度配置 */
43
- dimJson?: {
44
- /** 维度标题 */
45
- title: string;
46
- /** 维度项配置 */
47
- data: Array<Omit<TypeTargetProps, 'amounted' | 'enName' | 'isFilter'>>;
48
- };
49
- /** 指标配置 */
50
- indexJson: {
51
- title: string;
52
- /** 指标项配置 */
53
- data: TypeTargetProps[];
54
- };
55
- dataSetName: string;
56
- /** 自动请求 */
57
- autoLoad: boolean;
58
- /** 刷新时间 */
59
- refreshRate?: number;
60
- /** 记住勾选 */
61
- remember?: boolean;
62
- /** 导出 */
63
- exporter?: boolean;
64
- /** 导出配置 */
65
- exportConfig?: {
66
- name: string;
67
- code: string;
68
- menuId: string;
69
- };
70
- /** 条件格式设置 */
71
- expressions?: any[] | [];
72
- linkPageTitle?: string;
73
- /** 下钻二级页设置 */
74
- linkPage?: TypeChartSettingProps[];
75
- /** 数据源参数"键"" 和 查询参数"值" 和 上一级维度(dim)"值" 关系绑定 */
76
- queryBind?: Array<{
77
- sourceQueryKey: string;
78
- currentQueryKey: string;
79
- parentDimKey: string;
80
- }>;
81
- /** chartRef */
82
- chartRef?: React.Ref<{
83
- queryChart: (v: Record<string, any>, d: string | undefined) => void;
84
- }>;
85
- /** 确认 */
86
- onConfirm?: () => void;
87
- /** 查询参数转换 */
88
- formatter?: (v: Record<string, any>) => Record<string, any>;
89
- }
90
- export interface TypeZTemplatesDataCommonProps {
91
- /** 查询表单配置 */
92
- querySetting: ProFormRenderProps;
93
- /** 内容区配置 */
94
- chartSetting: TypeChartSettingProps | Array<TypeChartSettingProps & {
95
- custom: boolean;
96
- child: (p: any) => React.ReactNode;
97
- title: string;
98
- }> | React.ReactNode;
99
- _unsafe_MixedSetter_chartSetting_select?: any;
100
- }
101
- export default class ZTemplatesDataCommonContainer extends React.Component<TypeZTemplatesDataCommonProps, any> {
102
- chartRef: any;
103
- constructor(props: any);
104
- render(): JSX.Element;
105
- }
1
+ import React from 'react';
2
+ import type { ProFormRenderProps, DataTableProps } from '@ztocwst/rc-pro';
3
+ export interface tabsSettingProps {
4
+ onTabClick?: () => void;
5
+ extraProps?: () => Record<string, any> | Record<string, any>;
6
+ }
7
+ export interface TypeZTemplatesDataCommonProps {
8
+ /** 查询表单配置 */
9
+ querySetting: ProFormRenderProps;
10
+ /** 页签配置 */
11
+ tabsSetting?: tabsSettingProps;
12
+ /** 内容区配置 */
13
+ chartSetting: DataTableProps | DataTableProps[] | React.ReactNode;
14
+ _unsafe_MixedSetter_chartSetting_select?: any;
15
+ }
16
+ export default class ZTemplatesDataCommonContainer extends React.Component<TypeZTemplatesDataCommonProps, any> {
17
+ chartRef: any;
18
+ constructor(props: any);
19
+ render(): JSX.Element;
20
+ }
@@ -1,61 +1,2 @@
1
- /// <reference types="react" />
2
- /** table config */
3
- export declare const tableConfigDefault: {
4
- manual: boolean;
5
- toolBars: boolean;
6
- hideDefRowSelection: boolean;
7
- columns: any[];
8
- };
9
- /** 字符串拼接分割符 */
10
- export declare const separator = "***";
11
- /** 时间单位 */
12
- export declare const timeUnit: number;
13
- /** 介于 前闭后开 */
14
- export declare const BETWEEN = "<=,<";
15
- /** 数据类型 */
16
- export type valueType = number | string | null | undefined;
17
- /**
18
- * 计算宽
19
- * @param length
20
- * @param width
21
- */
22
- export declare const computeWidth: (length: number, width?: number) => number;
23
- /**
24
- * 获取最大宽
25
- * @param strArr
26
- */
27
- export declare const getMaxWidth: (strArr: any[]) => number;
28
- /**
29
- * 处理 QueryParams 去除空字符串
30
- */
31
- export declare const handleQueryParams: (query: Record<string, any>) => {
32
- [x: string]: any;
33
- };
34
- /**
35
- * 处理数据千分位
36
- */
37
- export declare const handleThousand: (value: valueType) => valueType;
38
- /**
39
- * 保留几位小数点
40
- */
41
- export declare const handleDecimal: (value: valueType, decimal?: number) => string;
42
- /**
43
- * 百分比转化
44
- */
45
- export declare const handlePercent: (value: valueType, decimal?: number, unit?: number) => string;
46
- /**
47
- * link外链处理
48
- */
49
- export declare const handleLink: (value: valueType, onLink?: () => void) => import("react").JSX.Element;
50
- /**
51
- * 条件格式设置
52
- * @param value 处理前的值
53
- * @param handledValue 被处理后的值 可能会是link标签
54
- */
55
- export declare const handleCondition: (value: valueType, handledValue: any, conditions: any[]) => any;
56
- /** 获取维度指标 */
57
- export declare const getDimTarget: (rcProContext: any, params: any) => Promise<any>;
58
- /** 获取报表数据 */
59
- export declare const getReportData: (rcProContext: any, params: any) => Promise<any>;
60
- /** 记住勾选 */
61
- export declare const saveDimTarget: (rcProContext: any, params: any) => Promise<any>;
1
+ /** 字符串分割符 */
2
+ export declare const separator = "***";