@ztocwst/rc-pro-materials 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) 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 +2 -2
  5. package/build/lowcode/assets-prod.json +11 -11
  6. package/build/lowcode/index.js +1 -1
  7. package/build/lowcode/meta.js +1 -1
  8. package/build/lowcode/preview.js +5 -5
  9. package/build/lowcode/render/default/view.css +2 -1
  10. package/build/lowcode/render/default/view.js +51 -8
  11. package/build/lowcode/view.css +2 -1
  12. package/build/lowcode/view.js +52 -9
  13. package/dist/SCM_Comps.js +53 -10
  14. package/dist/SCM_Comps.js.map +1 -1
  15. package/es/components/z-Ellipsis/ellipsis.d.ts +4 -4
  16. package/es/components/z-Ellipsis/index.d.ts +3 -3
  17. package/es/components/z-agg-block/index.d.ts +3 -3
  18. package/es/components/z-agg-block/index.less +134 -134
  19. package/es/components/z-agg-block/z-agg-block.d.ts +27 -27
  20. package/es/components/z-auth/auth.d.ts +9 -9
  21. package/es/components/z-auth/index.d.ts +3 -3
  22. package/es/components/z-box/box.d.ts +20 -20
  23. package/es/components/z-box/index.d.ts +3 -3
  24. package/es/components/z-box/index.less +4 -4
  25. package/es/components/z-button/index.d.ts +3 -3
  26. package/es/components/z-button/z-button.d.ts +4 -4
  27. package/es/components/z-config-provider/configProvider.d.ts +4 -4
  28. package/es/components/z-config-provider/configProvider.js +11 -11
  29. package/es/components/z-config-provider/index.d.ts +3 -3
  30. package/es/components/z-div/div.d.ts +6 -6
  31. package/es/components/z-div/index.d.ts +2 -2
  32. package/es/components/z-editTable/editTable.d.ts +11 -11
  33. package/es/components/z-editTable/editTable.js +2 -2
  34. package/es/components/z-editTable/index.d.ts +2 -2
  35. package/es/components/z-form/index.d.ts +3 -3
  36. package/es/components/z-form/z-form.d.ts +10 -10
  37. package/es/components/z-list/index.d.ts +3 -3
  38. package/es/components/z-list/list.d.ts +17 -17
  39. package/es/components/z-list/list.js +2 -2
  40. package/es/components/z-operation-records/index.d.ts +3 -3
  41. package/es/components/z-operation-records/operationRecords.d.ts +4 -4
  42. package/es/components/z-pointer-block/index.d.ts +3 -3
  43. package/es/components/z-pointer-block/index.less +15 -15
  44. package/es/components/z-pointer-block/z-pointer-block.d.ts +16 -16
  45. package/es/components/z-preview/index.d.ts +3 -3
  46. package/es/components/z-preview/preview.d.ts +4 -4
  47. package/es/components/z-pro-provider/index.d.ts +3 -3
  48. package/es/components/z-pro-provider/z-pro-provider.d.ts +6 -6
  49. package/es/components/z-ranking-list/index.d.ts +2 -2
  50. package/es/components/z-ranking-list/index.less +49 -49
  51. package/es/components/z-ranking-list/z-ranking-list.d.ts +14 -14
  52. package/es/components/z-ranking-list/z-ranking-list.js +2 -2
  53. package/es/components/z-simple-bar/index.d.ts +3 -3
  54. package/es/components/z-simple-bar/index.less +9 -9
  55. package/es/components/z-simple-bar/z-simple-bar.d.ts +27 -27
  56. package/es/components/z-singleFactory/index.d.ts +2 -2
  57. package/es/components/z-singleFactory/zSingerFactory.d.ts +3 -3
  58. package/es/components/z-statistic/index.d.ts +3 -3
  59. package/es/components/z-statistic/index.less +22 -22
  60. package/es/components/z-statistic/z-statistic.d.ts +13 -13
  61. package/es/components/z-table/index.d.ts +3 -3
  62. package/es/components/z-table/table.d.ts +8 -8
  63. package/es/components/z-templates-data-common/components/chart-renderer/index.d.ts +14 -14
  64. package/es/components/z-templates-data-common/components/custom-renderer/index.d.ts +13 -13
  65. package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +39 -39
  66. package/es/components/z-templates-data-common/components/dim-target/index.d.ts +16 -16
  67. package/es/components/z-templates-data-common/components/dim-target/index.less +49 -49
  68. package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +8 -8
  69. package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +6 -6
  70. package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +16 -16
  71. package/es/components/z-templates-data-common/components/link-renderer/index.less +33 -33
  72. package/es/components/z-templates-data-common/components/table-renderer/index.d.ts +6 -6
  73. package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +64 -64
  74. package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +10 -10
  75. package/es/components/z-templates-data-common/data-common.d.ts +105 -105
  76. package/es/components/z-templates-data-common/data-common.helper.d.ts +61 -61
  77. package/es/components/z-templates-data-common/data-common.helper.js +21 -21
  78. package/es/components/z-templates-data-common/index.d.ts +3 -3
  79. package/es/components/z-tpl/index.d.ts +3 -3
  80. package/es/components/z-tpl/tpl.d.ts +23 -23
  81. package/es/components/z-tpl/tpl.js +2 -2
  82. package/es/components/z-warehouse/index.d.ts +2 -2
  83. package/es/components/z-warehouse/zWarehouse.d.ts +3 -3
  84. package/es/index.d.ts +38 -38
  85. package/es/index.scss +1 -1
  86. package/es/utils/hoc.d.ts +6 -6
  87. package/es/utils/hoc.js +3 -3
  88. package/es/utils/index.d.ts +13 -13
  89. package/es/utils/props/button.d.ts +13 -13
  90. package/es/utils/props/common.d.ts +7 -7
  91. package/es/utils/props/common.js +4 -4
  92. package/es/utils/props/editTable.d.ts +3 -3
  93. package/es/utils/props/form.js +22 -7
  94. package/es/utils/props/listTpl.d.ts +29 -29
  95. package/es/utils/props/microModal.d.ts +7 -7
  96. package/es/utils/props/microSwitch.d.ts +1 -1
  97. package/es/utils/props/modalSelect.d.ts +6 -6
  98. package/es/utils/props/operationRecords.d.ts +2 -2
  99. package/es/utils/props/preview.d.ts +2 -2
  100. package/es/utils/props/tpl.d.ts +162 -162
  101. package/es/utils/props/warehouseAndFactory.d.ts +1 -1
  102. package/es/utils/rcProRequest.d.ts +3 -3
  103. package/es/variables.scss +3 -3
  104. package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -4
  105. package/lib/components/z-Ellipsis/index.d.ts +3 -3
  106. package/lib/components/z-agg-block/index.d.ts +3 -3
  107. package/lib/components/z-agg-block/index.less +134 -134
  108. package/lib/components/z-agg-block/z-agg-block.d.ts +27 -27
  109. package/lib/components/z-auth/auth.d.ts +9 -9
  110. package/lib/components/z-auth/index.d.ts +3 -3
  111. package/lib/components/z-box/box.d.ts +20 -20
  112. package/lib/components/z-box/index.d.ts +3 -3
  113. package/lib/components/z-box/index.less +4 -4
  114. package/lib/components/z-button/index.d.ts +3 -3
  115. package/lib/components/z-button/z-button.d.ts +4 -4
  116. package/lib/components/z-config-provider/configProvider.d.ts +4 -4
  117. package/lib/components/z-config-provider/configProvider.js +11 -11
  118. package/lib/components/z-config-provider/index.d.ts +3 -3
  119. package/lib/components/z-div/div.d.ts +6 -6
  120. package/lib/components/z-div/index.d.ts +2 -2
  121. package/lib/components/z-editTable/editTable.d.ts +11 -11
  122. package/lib/components/z-editTable/editTable.js +2 -2
  123. package/lib/components/z-editTable/index.d.ts +2 -2
  124. package/lib/components/z-form/index.d.ts +3 -3
  125. package/lib/components/z-form/z-form.d.ts +10 -10
  126. package/lib/components/z-list/index.d.ts +3 -3
  127. package/lib/components/z-list/list.d.ts +17 -17
  128. package/lib/components/z-list/list.js +2 -2
  129. package/lib/components/z-operation-records/index.d.ts +3 -3
  130. package/lib/components/z-operation-records/operationRecords.d.ts +4 -4
  131. package/lib/components/z-pointer-block/index.d.ts +3 -3
  132. package/lib/components/z-pointer-block/index.less +15 -15
  133. package/lib/components/z-pointer-block/z-pointer-block.d.ts +16 -16
  134. package/lib/components/z-preview/index.d.ts +3 -3
  135. package/lib/components/z-preview/preview.d.ts +4 -4
  136. package/lib/components/z-pro-provider/index.d.ts +3 -3
  137. package/lib/components/z-pro-provider/z-pro-provider.d.ts +6 -6
  138. package/lib/components/z-ranking-list/index.d.ts +2 -2
  139. package/lib/components/z-ranking-list/index.less +49 -49
  140. package/lib/components/z-ranking-list/z-ranking-list.d.ts +14 -14
  141. package/lib/components/z-ranking-list/z-ranking-list.js +2 -2
  142. package/lib/components/z-simple-bar/index.d.ts +3 -3
  143. package/lib/components/z-simple-bar/index.less +9 -9
  144. package/lib/components/z-simple-bar/z-simple-bar.d.ts +27 -27
  145. package/lib/components/z-singleFactory/index.d.ts +2 -2
  146. package/lib/components/z-singleFactory/zSingerFactory.d.ts +3 -3
  147. package/lib/components/z-statistic/index.d.ts +3 -3
  148. package/lib/components/z-statistic/index.less +22 -22
  149. package/lib/components/z-statistic/z-statistic.d.ts +13 -13
  150. package/lib/components/z-table/index.d.ts +3 -3
  151. package/lib/components/z-table/table.d.ts +8 -8
  152. package/lib/components/z-templates-data-common/components/chart-renderer/index.d.ts +14 -14
  153. package/lib/components/z-templates-data-common/components/custom-renderer/index.d.ts +13 -13
  154. package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +39 -39
  155. package/lib/components/z-templates-data-common/components/dim-target/index.d.ts +16 -16
  156. package/lib/components/z-templates-data-common/components/dim-target/index.less +49 -49
  157. package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +8 -8
  158. package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +6 -6
  159. package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +16 -16
  160. package/lib/components/z-templates-data-common/components/link-renderer/index.less +33 -33
  161. package/lib/components/z-templates-data-common/components/table-renderer/index.d.ts +6 -6
  162. package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +64 -64
  163. package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +10 -10
  164. package/lib/components/z-templates-data-common/data-common.d.ts +105 -105
  165. package/lib/components/z-templates-data-common/data-common.helper.d.ts +61 -61
  166. package/lib/components/z-templates-data-common/data-common.helper.js +21 -21
  167. package/lib/components/z-templates-data-common/index.d.ts +3 -3
  168. package/lib/components/z-tpl/index.d.ts +3 -3
  169. package/lib/components/z-tpl/tpl.d.ts +23 -23
  170. package/lib/components/z-tpl/tpl.js +2 -2
  171. package/lib/components/z-warehouse/index.d.ts +2 -2
  172. package/lib/components/z-warehouse/zWarehouse.d.ts +3 -3
  173. package/lib/index.d.ts +38 -38
  174. package/lib/index.scss +1 -1
  175. package/lib/utils/hoc.d.ts +6 -6
  176. package/lib/utils/hoc.js +3 -3
  177. package/lib/utils/index.d.ts +13 -13
  178. package/lib/utils/props/button.d.ts +13 -13
  179. package/lib/utils/props/common.d.ts +7 -7
  180. package/lib/utils/props/common.js +4 -4
  181. package/lib/utils/props/editTable.d.ts +3 -3
  182. package/lib/utils/props/form.js +22 -7
  183. package/lib/utils/props/listTpl.d.ts +29 -29
  184. package/lib/utils/props/microModal.d.ts +7 -7
  185. package/lib/utils/props/microSwitch.d.ts +1 -1
  186. package/lib/utils/props/modalSelect.d.ts +6 -6
  187. package/lib/utils/props/operationRecords.d.ts +2 -2
  188. package/lib/utils/props/preview.d.ts +2 -2
  189. package/lib/utils/props/tpl.d.ts +162 -162
  190. package/lib/utils/props/warehouseAndFactory.d.ts +1 -1
  191. package/lib/utils/rcProRequest.d.ts +3 -3
  192. package/lib/variables.scss +3 -3
  193. package/package.json +3 -3
  194. package/es/utils/props/form.d.ts +0 -35
  195. package/lib/utils/props/form.d.ts +0 -35
@@ -1,61 +1,61 @@
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
+ /// <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>;
@@ -31,10 +31,10 @@ exports.timeUnit = timeUnit;
31
31
  var BETWEEN = '<=,<';
32
32
  /** 数据类型 */
33
33
  exports.BETWEEN = BETWEEN;
34
- /**
35
- * 计算宽
36
- * @param length
37
- * @param width
34
+ /**
35
+ * 计算宽
36
+ * @param length
37
+ * @param width
38
38
  */
39
39
  var computeWidth = function computeWidth(length, width) {
40
40
  if (width === void 0) {
@@ -43,9 +43,9 @@ var computeWidth = function computeWidth(length, width) {
43
43
  return length * width;
44
44
  };
45
45
 
46
- /**
47
- * 获取最大宽
48
- * @param strArr
46
+ /**
47
+ * 获取最大宽
48
+ * @param strArr
49
49
  */
50
50
  exports.computeWidth = computeWidth;
51
51
  var getMaxWidth = function getMaxWidth(strArr) {
@@ -58,8 +58,8 @@ var getMaxWidth = function getMaxWidth(strArr) {
58
58
  return computeWidth(length, 14);
59
59
  };
60
60
 
61
- /**
62
- * 处理 QueryParams 去除空字符串
61
+ /**
62
+ * 处理 QueryParams 去除空字符串
63
63
  */
64
64
  exports.getMaxWidth = getMaxWidth;
65
65
  var handleQueryParams = function handleQueryParams(query) {
@@ -72,8 +72,8 @@ var handleQueryParams = function handleQueryParams(query) {
72
72
  return queryParams;
73
73
  };
74
74
 
75
- /**
76
- * 处理数据千分位
75
+ /**
76
+ * 处理数据千分位
77
77
  */
78
78
  exports.handleQueryParams = handleQueryParams;
79
79
  var handleThousand = function handleThousand(value) {
@@ -92,8 +92,8 @@ var handleThousand = function handleThousand(value) {
92
92
  }
93
93
  };
94
94
 
95
- /**
96
- * 保留几位小数点
95
+ /**
96
+ * 保留几位小数点
97
97
  */
98
98
  exports.handleThousand = handleThousand;
99
99
  var handleDecimal = function handleDecimal(value, decimal) {
@@ -104,8 +104,8 @@ var handleDecimal = function handleDecimal(value, decimal) {
104
104
  return Number(value).toFixed(decimal);
105
105
  };
106
106
 
107
- /**
108
- * 百分比转化
107
+ /**
108
+ * 百分比转化
109
109
  */
110
110
  exports.handleDecimal = handleDecimal;
111
111
  var handlePercent = function handlePercent(value, decimal, unit) {
@@ -119,8 +119,8 @@ var handlePercent = function handlePercent(value, decimal, unit) {
119
119
  return (Number(value) * unit).toFixed(decimal) + "%";
120
120
  };
121
121
 
122
- /**
123
- * link外链处理
122
+ /**
123
+ * link外链处理
124
124
  */
125
125
  exports.handlePercent = handlePercent;
126
126
  var handleLink = function handleLink(value, onLink) {
@@ -131,10 +131,10 @@ var handleLink = function handleLink(value, onLink) {
131
131
  }, value);
132
132
  };
133
133
 
134
- /**
135
- * 条件格式设置
136
- * @param value 处理前的值
137
- * @param handledValue 被处理后的值 可能会是link标签
134
+ /**
135
+ * 条件格式设置
136
+ * @param value 处理前的值
137
+ * @param handledValue 被处理后的值 可能会是link标签
138
138
  */
139
139
  exports.handleLink = handleLink;
140
140
  var handleCondition = function handleCondition(value, handledValue, conditions) {
@@ -1,3 +1,3 @@
1
- import ZTemplatesDataCommon from './data-common';
2
- export type { TypeZTemplatesDataCommonProps } from './data-common';
3
- export default ZTemplatesDataCommon;
1
+ import ZTemplatesDataCommon from './data-common';
2
+ export type { TypeZTemplatesDataCommonProps } from './data-common';
3
+ export default ZTemplatesDataCommon;
@@ -1,3 +1,3 @@
1
- import ZTpl from './tpl';
2
- export type { RcBasicTpl } from '@ztocwst/rc-pro';
3
- export default ZTpl;
1
+ import ZTpl from './tpl';
2
+ export type { RcBasicTpl } from '@ztocwst/rc-pro';
3
+ export default ZTpl;
@@ -1,23 +1,23 @@
1
- /**
2
- * 模板列表
3
- */
4
- import * as React from 'react';
5
- import type { RcPageProps } from '@ztocwst/rc-pro';
6
- export default class ZTplListContainer extends React.Component<RcPageProps, any> {
7
- pageRef: any;
8
- listRef: any;
9
- tableRef: any;
10
- listFormRef: any;
11
- listFormCurrentRef: any;
12
- billFormRef: any;
13
- billFormCurrentRef: any;
14
- constructor(props: any);
15
- getPageRef: () => any;
16
- getListRef: () => any;
17
- getTableRef: () => any;
18
- getListFormRef: () => any;
19
- getBillFormRef: () => any;
20
- getListFormCurrentRef: () => any;
21
- getBillFormCurrentRef: () => any;
22
- render(): React.JSX.Element;
23
- }
1
+ /**
2
+ * 模板列表
3
+ */
4
+ import * as React from 'react';
5
+ import type { RcPageProps } from '@ztocwst/rc-pro';
6
+ export default class ZTplListContainer extends React.Component<RcPageProps, any> {
7
+ pageRef: any;
8
+ listRef: any;
9
+ tableRef: any;
10
+ listFormRef: any;
11
+ listFormCurrentRef: any;
12
+ billFormRef: any;
13
+ billFormCurrentRef: any;
14
+ constructor(props: any);
15
+ getPageRef: () => any;
16
+ getListRef: () => any;
17
+ getTableRef: () => any;
18
+ getListFormRef: () => any;
19
+ getBillFormRef: () => any;
20
+ getListFormCurrentRef: () => any;
21
+ getBillFormCurrentRef: () => any;
22
+ render(): React.JSX.Element;
23
+ }
@@ -10,8 +10,8 @@ var _rcPro = require("@ztocwst/rc-pro");
10
10
  var _utils = require("../../utils");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- /**
14
- * 模板列表
13
+ /**
14
+ * 模板列表
15
15
  */
16
16
 
17
17
  var ZTpl = function ZTpl(props) {
@@ -1,2 +1,2 @@
1
- import ZWarehouse from './zWarehouse';
2
- export default ZWarehouse;
1
+ import ZWarehouse from './zWarehouse';
2
+ export default ZWarehouse;
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
2
- declare const ZWarehouse: (props: any) => React.JSX.Element;
3
- export default ZWarehouse;
1
+ import * as React from 'react';
2
+ declare const ZWarehouse: (props: any) => React.JSX.Element;
3
+ export default ZWarehouse;
package/lib/index.d.ts CHANGED
@@ -1,38 +1,38 @@
1
- export type { ProButtonProps } from '@ztocwst/rc-pro/es/components/ProButton';
2
- export { default as ZButton } from './components/z-button';
3
- export type { ProFormRenderProps } from '@ztocwst/rc-pro';
4
- export { default as ZForm } from './components/z-form';
5
- export type { ProEllipsisProps } from '@ztocwst/rc-pro';
6
- export { default as ZEllipsis } from './components/z-Ellipsis';
7
- export type { ProTableProps } from '@ztocwst/rc-pro';
8
- export { default as ZTable } from './components/z-table';
9
- export type { ProPreviewProps } from '@ztocwst/rc-pro';
10
- export { default as ZPreview } from './components/z-preview';
11
- export type { RcListItem } from '@ztocwst/rc-pro';
12
- export { default as ZList } from './components/z-list';
13
- export type { RcPageProps } from '@ztocwst/rc-pro';
14
- export { default as ZTpl } from './components/z-tpl';
15
- export type { RcConfigConsumerProps } from '@ztocwst/rc-pro';
16
- export { default as ZConfigProvider } from './components/z-config-provider';
17
- export type { TypeZBoxProps } from './components/z-box';
18
- export { default as ZBox } from './components/z-box';
19
- export { default as ZDiv } from './components/z-div';
20
- export type { TypeZStatisticProps } from './components/z-statistic';
21
- export { default as ZStatistic } from './components/z-statistic';
22
- export type { TypeZSimpleBarProps } from './components/z-simple-bar';
23
- export { default as ZSimpleBar } from './components/z-simple-bar';
24
- export { default as ZRankingList } from './components/z-ranking-list';
25
- export { default as ZWarehouse } from './components/z-warehouse';
26
- export { default as ZSingleFactory } from './components/z-singleFactory';
27
- export { default as ZRcEditTable } from './components/z-editTable';
28
- export { default as ZAuth } from './components/z-auth';
29
- export type { TypeAuthProps } from './components/z-auth';
30
- export { default as ZProProvider } from './components/z-pro-provider';
31
- export type { TypeZProProviderProps } from './components/z-pro-provider';
32
- export { default as ZOperationRecords } from './components/z-operation-records';
33
- export { default as ZPointerBlock } from './components/z-pointer-block';
34
- export type { TypeZPointerBlockProps } from './components/z-pointer-block';
35
- export { default as ZAggBlock } from './components/z-agg-block';
36
- export type { TypeAggBlockProps } from './components/z-agg-block';
37
- export { default as ZTemplatesDataCommon } from './components/z-templates-data-common';
38
- export type { TypeZTemplatesDataCommonProps } from './components/z-templates-data-common';
1
+ export type { ProButtonProps } from '@ztocwst/rc-pro/es/components/ProButton';
2
+ export { default as ZButton } from './components/z-button';
3
+ export type { ProFormRenderProps } from '@ztocwst/rc-pro';
4
+ export { default as ZForm } from './components/z-form';
5
+ export type { ProEllipsisProps } from '@ztocwst/rc-pro';
6
+ export { default as ZEllipsis } from './components/z-Ellipsis';
7
+ export type { ProTableProps } from '@ztocwst/rc-pro';
8
+ export { default as ZTable } from './components/z-table';
9
+ export type { ProPreviewProps } from '@ztocwst/rc-pro';
10
+ export { default as ZPreview } from './components/z-preview';
11
+ export type { RcListItem } from '@ztocwst/rc-pro';
12
+ export { default as ZList } from './components/z-list';
13
+ export type { RcPageProps } from '@ztocwst/rc-pro';
14
+ export { default as ZTpl } from './components/z-tpl';
15
+ export type { RcConfigConsumerProps } from '@ztocwst/rc-pro';
16
+ export { default as ZConfigProvider } from './components/z-config-provider';
17
+ export type { TypeZBoxProps } from './components/z-box';
18
+ export { default as ZBox } from './components/z-box';
19
+ export { default as ZDiv } from './components/z-div';
20
+ export type { TypeZStatisticProps } from './components/z-statistic';
21
+ export { default as ZStatistic } from './components/z-statistic';
22
+ export type { TypeZSimpleBarProps } from './components/z-simple-bar';
23
+ export { default as ZSimpleBar } from './components/z-simple-bar';
24
+ export { default as ZRankingList } from './components/z-ranking-list';
25
+ export { default as ZWarehouse } from './components/z-warehouse';
26
+ export { default as ZSingleFactory } from './components/z-singleFactory';
27
+ export { default as ZRcEditTable } from './components/z-editTable';
28
+ export { default as ZAuth } from './components/z-auth';
29
+ export type { TypeAuthProps } from './components/z-auth';
30
+ export { default as ZProProvider } from './components/z-pro-provider';
31
+ export type { TypeZProProviderProps } from './components/z-pro-provider';
32
+ export { default as ZOperationRecords } from './components/z-operation-records';
33
+ export { default as ZPointerBlock } from './components/z-pointer-block';
34
+ export type { TypeZPointerBlockProps } from './components/z-pointer-block';
35
+ export { default as ZAggBlock } from './components/z-agg-block';
36
+ export type { TypeAggBlockProps } from './components/z-agg-block';
37
+ export { default as ZTemplatesDataCommon } from './components/z-templates-data-common';
38
+ export type { TypeZTemplatesDataCommonProps } from './components/z-templates-data-common';
package/lib/index.scss CHANGED
@@ -1 +1 @@
1
- // @import './components/rc-button/index.scss';
1
+ // @import './components/rc-button/index.scss';
@@ -1,6 +1,6 @@
1
- import { ComponentType } from 'react';
2
- /**
3
- * 简单包装,不做任何处理
4
- * 部分组件ref比较特殊,包一层会解决这个问题
5
- */
6
- export declare function withWrap(Comp: ComponentType<any>): import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
1
+ import { ComponentType } from 'react';
2
+ /**
3
+ * 简单包装,不做任何处理
4
+ * 部分组件ref比较特殊,包一层会解决这个问题
5
+ */
6
+ export declare function withWrap(Comp: ComponentType<any>): import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
package/lib/utils/hoc.js CHANGED
@@ -5,9 +5,9 @@ exports.__esModule = true;
5
5
  exports.withWrap = withWrap;
6
6
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
7
  var _react = require("react");
8
- /**
9
- * 简单包装,不做任何处理
10
- * 部分组件ref比较特殊,包一层会解决这个问题
8
+ /**
9
+ * 简单包装,不做任何处理
10
+ * 部分组件ref比较特殊,包一层会解决这个问题
11
11
  */
12
12
  function withWrap(Comp) {
13
13
  return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
@@ -1,13 +1,13 @@
1
- import { processButtonProps } from './props/button';
2
- import { processFormProps } from './props/form';
3
- import { processListTplProps } from './props/listTpl';
4
- import { processTplProps } from './props/tpl';
5
- import { processMicroSwitchProps } from './props/microSwitch';
6
- import { processMicroModalProps } from './props/microModal';
7
- import { processWarehouseAndFactoryProps } from './props/warehouseAndFactory';
8
- import { processEditTableProps } from './props/editTable';
9
- import { processPreviewProps } from './props/preview';
10
- import { processModalSelectProps, processModalSelectTablePropsColumns } from './props/modalSelect';
11
- import { processOperationRecordsProps } from './props/operationRecords';
12
- declare const processJsonOrFunctionProps: (props: any) => any;
13
- export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps, };
1
+ import { processButtonProps } from './props/button';
2
+ import { processFormProps } from './props/form';
3
+ import { processListTplProps } from './props/listTpl';
4
+ import { processTplProps } from './props/tpl';
5
+ import { processMicroSwitchProps } from './props/microSwitch';
6
+ import { processMicroModalProps } from './props/microModal';
7
+ import { processWarehouseAndFactoryProps } from './props/warehouseAndFactory';
8
+ import { processEditTableProps } from './props/editTable';
9
+ import { processPreviewProps } from './props/preview';
10
+ import { processModalSelectProps, processModalSelectTablePropsColumns } from './props/modalSelect';
11
+ import { processOperationRecordsProps } from './props/operationRecords';
12
+ declare const processJsonOrFunctionProps: (props: any) => any;
13
+ export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps, };
@@ -1,13 +1,13 @@
1
- import { ProButtonItemsProps, ProButtonProps } from '@ztocwst/rc-pro';
2
- export declare const processButtonProps: (props: ProButtonProps & {
3
- linkButton?: boolean;
4
- }, extra?: {
5
- tableRef?: any;
6
- }) => {
7
- items: any[];
8
- type?: string;
9
- spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
10
- size?: import("antd/lib/button").ButtonSize;
11
- onClick?: (item: ProButtonItemsProps) => void | Promise<any>;
12
- onSuccess?: (item: ProButtonItemsProps, data?: any) => void;
13
- };
1
+ import { ProButtonItemsProps, ProButtonProps } from '@ztocwst/rc-pro';
2
+ export declare const processButtonProps: (props: ProButtonProps & {
3
+ linkButton?: boolean;
4
+ }, extra?: {
5
+ tableRef?: any;
6
+ }) => {
7
+ items: any[];
8
+ type?: string;
9
+ spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
10
+ size?: import("antd/lib/button").ButtonSize;
11
+ onClick?: (item: ProButtonItemsProps) => void | Promise<any>;
12
+ onSuccess?: (item: ProButtonItemsProps, data?: any) => void;
13
+ };
@@ -1,7 +1,7 @@
1
- export declare const processRequestConfig: (props: any) => any;
2
- /**
3
- * 根据对象是否为空判断返回值
4
- * @param obj
5
- * @returns undefined | obj
6
- */
7
- export declare const processEmptyObject: (obj?: any) => any;
1
+ export declare const processRequestConfig: (props: any) => any;
2
+ /**
3
+ * 根据对象是否为空判断返回值
4
+ * @param obj
5
+ * @returns undefined | obj
6
+ */
7
+ export declare const processEmptyObject: (obj?: any) => any;
@@ -18,10 +18,10 @@ var processRequestConfig = function processRequestConfig(props) {
18
18
  } : {});
19
19
  };
20
20
 
21
- /**
22
- * 根据对象是否为空判断返回值
23
- * @param obj
24
- * @returns undefined | obj
21
+ /**
22
+ * 根据对象是否为空判断返回值
23
+ * @param obj
24
+ * @returns undefined | obj
25
25
  */
26
26
  exports.processRequestConfig = processRequestConfig;
27
27
  var processEmptyObject = function processEmptyObject(obj) {
@@ -1,3 +1,3 @@
1
- export declare const processEditTableProps: (props: any, extra?: {
2
- proEditableFormRef?: any;
3
- }) => any;
1
+ export declare const processEditTableProps: (props: any, extra?: {
2
+ proEditableFormRef?: any;
3
+ }) => any;
@@ -15,8 +15,8 @@ var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required",
15
15
  _excluded4 = ["fieldProps"],
16
16
  _excluded5 = ["requestOptions"],
17
17
  _excluded6 = ["columns", "switchGroup"];
18
- /**
19
- * 处理表单默认值
18
+ /**
19
+ * 处理表单默认值
20
20
  */
21
21
  var requestOptionsCheck = function requestOptionsCheck(func, data) {
22
22
  return typeof func === 'function' ? func(data) : true;
@@ -65,10 +65,10 @@ var processInitialValue = function processInitialValue(e) {
65
65
  dependencyName = '';
66
66
  }
67
67
  var childRest = processInitialValue(child);
68
- var fieldProps = childRest.fieldProps,
68
+ var childFieldProps = childRest.fieldProps,
69
69
  childItemRest = (0, _objectWithoutPropertiesLoose2["default"])(childRest, _excluded4);
70
- var requestOptions = fieldProps.requestOptions,
71
- childRestFieldProps = (0, _objectWithoutPropertiesLoose2["default"])(fieldProps, _excluded5);
70
+ var requestOptions = childFieldProps.requestOptions,
71
+ childRestFieldProps = (0, _objectWithoutPropertiesLoose2["default"])(childFieldProps, _excluded5);
72
72
  return (0, _extends2["default"])({}, childItemRest, {
73
73
  fieldProps: (0, _extends2["default"])({}, childRestFieldProps, (childRest === null || childRest === void 0 ? void 0 : childRest.valueType) === 'asyncSelect' &&
74
74
  // 接口请求前置校验, 通过请求 asyncSelect 接口
@@ -119,7 +119,7 @@ var processInitialValue = function processInitialValue(e) {
119
119
  });
120
120
  };
121
121
  var processFormProps = function processFormProps(props) {
122
- var _ref3;
122
+ var _ref3, _config$columns, _config$columns$filte, _Object$keys;
123
123
  var columns = props.columns,
124
124
  submitter = props.submitter,
125
125
  labelColWidth = props.labelColWidth,
@@ -136,7 +136,7 @@ var processFormProps = function processFormProps(props) {
136
136
  formRef = props.formRef,
137
137
  currentRef = props.currentRef,
138
138
  restProps = props.restProps;
139
- return (0, _modalSelect.processModalSelectProps)((0, _extends2["default"])({
139
+ var config = (0, _modalSelect.processModalSelectProps)((0, _extends2["default"])({
140
140
  // columns只支持两级group嵌套
141
141
  columns: (_ref3 = columns || []) === null || _ref3 === void 0 ? void 0 : _ref3.filter(function (e) {
142
142
  return !!e;
@@ -183,5 +183,20 @@ var processFormProps = function processFormProps(props) {
183
183
  span: span,
184
184
  layoutType: layoutType
185
185
  }, restProps ? (0, _lib.processJsonOrFunctionProps)(restProps) : {}));
186
+ var resetFields = config === null || config === void 0 ? void 0 : (_config$columns = config.columns) === null || _config$columns === void 0 ? void 0 : (_config$columns$filte = _config$columns.filter(function (e) {
187
+ return !(e !== null && e !== void 0 && e.initialValue);
188
+ })) === null || _config$columns$filte === void 0 ? void 0 : _config$columns$filte.reduce(function (prev, next) {
189
+ var _next$dataIndex;
190
+ // eslint-disable-next-line no-param-reassign
191
+ prev[(_next$dataIndex = next === null || next === void 0 ? void 0 : next.dataIndex) !== null && _next$dataIndex !== void 0 ? _next$dataIndex : ''] = undefined;
192
+ return prev;
193
+ }, {});
194
+
195
+ // 每次变更重置
196
+ if ((_Object$keys = Object.keys(resetFields)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
197
+ var _formRef$current;
198
+ (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldsValue(resetFields);
199
+ }
200
+ return config;
186
201
  };
187
202
  exports.processFormProps = processFormProps;
@@ -1,29 +1,29 @@
1
- import { RcListItem } from '@ztocwst/rc-pro';
2
- export declare const processListTplProps: (props: RcListItem, extra?: {
3
- listRef?: any;
4
- tableRef?: any;
5
- listFormRef?: any;
6
- listFormCurrentRef?: any;
7
- }) => {
8
- requestConfig: any;
9
- type?: "list";
10
- listRef: any;
11
- onListBtnChange?: (type: "add" | "copy" | "edit" | "preview" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>;
12
- renderWithDefaultDom?: (dom: JSX.Element[], onChange?: (type: "add" | "copy" | "edit" | "preview" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => JSX.Element;
13
- render?: (onChange?: (type: "add" | "copy" | "edit" | "preview" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => React.ReactNode;
14
- key?: string;
15
- name?: any;
16
- form: any;
17
- actions: {
18
- items: any[];
19
- type?: string;
20
- spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
21
- size?: import("antd/lib/button").ButtonSize;
22
- onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
23
- onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
24
- };
25
- grid: {
26
- config: any;
27
- ref: any;
28
- };
29
- };
1
+ import { RcListItem } from '@ztocwst/rc-pro';
2
+ export declare const processListTplProps: (props: RcListItem, extra?: {
3
+ listRef?: any;
4
+ tableRef?: any;
5
+ listFormRef?: any;
6
+ listFormCurrentRef?: any;
7
+ }) => {
8
+ requestConfig: any;
9
+ type?: "list";
10
+ listRef: any;
11
+ onListBtnChange?: (type: "add" | "copy" | "edit" | "preview" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>;
12
+ renderWithDefaultDom?: (dom: JSX.Element[], onChange?: (type: "add" | "copy" | "edit" | "preview" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => JSX.Element;
13
+ render?: (onChange?: (type: "add" | "copy" | "edit" | "preview" | "back", record?: Record<string, unknown>, key?: string) => void | Promise<void>) => React.ReactNode;
14
+ key?: string;
15
+ name?: any;
16
+ form: any;
17
+ actions: {
18
+ items: any[];
19
+ type?: string;
20
+ spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
21
+ size?: import("antd/lib/button").ButtonSize;
22
+ onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
23
+ onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
24
+ };
25
+ grid: {
26
+ config: any;
27
+ ref: any;
28
+ };
29
+ };