@zat-design/sisyphus-react 3.9.8-beta.1 → 3.9.8-beta.3

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 (62) hide show
  1. package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
  2. package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
  3. package/coverage/lcov-report/src/.umi/core/index.html +206 -0
  4. package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
  5. package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
  6. package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
  7. package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
  8. package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
  9. package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
  10. package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
  11. package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
  12. package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
  13. package/coverage/lcov-report/src/.umi/index.html +116 -0
  14. package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
  15. package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
  16. package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
  17. package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
  18. package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
  19. package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
  20. package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
  21. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
  22. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
  23. package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
  24. package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
  25. package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
  26. package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
  27. package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
  28. package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
  29. package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
  30. package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
  31. package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
  32. package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
  33. package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
  34. package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
  35. package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
  36. package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
  37. package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
  38. package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
  39. package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
  40. package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
  41. package/es/ProForm/components/render/Render.js +12 -4
  42. package/es/ProForm/components/render/RenderFields.js +4 -2
  43. package/es/ProForm/components/render/propsType.d.ts +2 -0
  44. package/es/ProForm/utils/useShouldUpdate.js +25 -5
  45. package/es/ProForm/utils/valueType.d.ts +10 -0
  46. package/es/ProForm/utils/valueType.js +69 -33
  47. package/es/ProTable/components/FormatColumn/index.js +1 -0
  48. package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
  49. package/es/ProTable/components/RenderColumn/index.js +10 -2
  50. package/es/ProTable/propsType.d.ts +2 -0
  51. package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
  52. package/lib/ProForm/components/render/Render.js +12 -4
  53. package/lib/ProForm/components/render/RenderFields.js +4 -2
  54. package/lib/ProForm/components/render/propsType.d.ts +2 -0
  55. package/lib/ProForm/utils/useShouldUpdate.js +25 -5
  56. package/lib/ProForm/utils/valueType.d.ts +10 -0
  57. package/lib/ProForm/utils/valueType.js +70 -34
  58. package/lib/ProTable/components/FormatColumn/index.js +1 -0
  59. package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
  60. package/lib/ProTable/components/RenderColumn/index.js +10 -2
  61. package/lib/ProTable/propsType.d.ts +2 -0
  62. package/package.json +1 -1
@@ -0,0 +1,268 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for src/.umi/umi.ts</title>
7
+ <meta charset="utf-8" />
8
+ <link rel="stylesheet" href="../../prettify.css" />
9
+ <link rel="stylesheet" href="../../base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <style type='text/css'>
13
+ .coverage-summary .sorter {
14
+ background-image: url(../../sort-arrow-sprite.png);
15
+ }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class='wrapper'>
21
+ <div class='pad1'>
22
+ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/.umi</a> umi.ts</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">0% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>0/14</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">0% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>0/7</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">0% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>0/4</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">0% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>0/13</span>
50
+ </div>
51
+
52
+
53
+ </div>
54
+ <p class="quiet">
55
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input oninput="onInput()" type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line low'></div>
65
+ <pre><table class="coverage">
66
+ <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
67
+ <a name='L2'></a><a href='#L2'>2</a>
68
+ <a name='L3'></a><a href='#L3'>3</a>
69
+ <a name='L4'></a><a href='#L4'>4</a>
70
+ <a name='L5'></a><a href='#L5'>5</a>
71
+ <a name='L6'></a><a href='#L6'>6</a>
72
+ <a name='L7'></a><a href='#L7'>7</a>
73
+ <a name='L8'></a><a href='#L8'>8</a>
74
+ <a name='L9'></a><a href='#L9'>9</a>
75
+ <a name='L10'></a><a href='#L10'>10</a>
76
+ <a name='L11'></a><a href='#L11'>11</a>
77
+ <a name='L12'></a><a href='#L12'>12</a>
78
+ <a name='L13'></a><a href='#L13'>13</a>
79
+ <a name='L14'></a><a href='#L14'>14</a>
80
+ <a name='L15'></a><a href='#L15'>15</a>
81
+ <a name='L16'></a><a href='#L16'>16</a>
82
+ <a name='L17'></a><a href='#L17'>17</a>
83
+ <a name='L18'></a><a href='#L18'>18</a>
84
+ <a name='L19'></a><a href='#L19'>19</a>
85
+ <a name='L20'></a><a href='#L20'>20</a>
86
+ <a name='L21'></a><a href='#L21'>21</a>
87
+ <a name='L22'></a><a href='#L22'>22</a>
88
+ <a name='L23'></a><a href='#L23'>23</a>
89
+ <a name='L24'></a><a href='#L24'>24</a>
90
+ <a name='L25'></a><a href='#L25'>25</a>
91
+ <a name='L26'></a><a href='#L26'>26</a>
92
+ <a name='L27'></a><a href='#L27'>27</a>
93
+ <a name='L28'></a><a href='#L28'>28</a>
94
+ <a name='L29'></a><a href='#L29'>29</a>
95
+ <a name='L30'></a><a href='#L30'>30</a>
96
+ <a name='L31'></a><a href='#L31'>31</a>
97
+ <a name='L32'></a><a href='#L32'>32</a>
98
+ <a name='L33'></a><a href='#L33'>33</a>
99
+ <a name='L34'></a><a href='#L34'>34</a>
100
+ <a name='L35'></a><a href='#L35'>35</a>
101
+ <a name='L36'></a><a href='#L36'>36</a>
102
+ <a name='L37'></a><a href='#L37'>37</a>
103
+ <a name='L38'></a><a href='#L38'>38</a>
104
+ <a name='L39'></a><a href='#L39'>39</a>
105
+ <a name='L40'></a><a href='#L40'>40</a>
106
+ <a name='L41'></a><a href='#L41'>41</a>
107
+ <a name='L42'></a><a href='#L42'>42</a>
108
+ <a name='L43'></a><a href='#L43'>43</a>
109
+ <a name='L44'></a><a href='#L44'>44</a>
110
+ <a name='L45'></a><a href='#L45'>45</a>
111
+ <a name='L46'></a><a href='#L46'>46</a>
112
+ <a name='L47'></a><a href='#L47'>47</a>
113
+ <a name='L48'></a><a href='#L48'>48</a>
114
+ <a name='L49'></a><a href='#L49'>49</a>
115
+ <a name='L50'></a><a href='#L50'>50</a>
116
+ <a name='L51'></a><a href='#L51'>51</a>
117
+ <a name='L52'></a><a href='#L52'>52</a>
118
+ <a name='L53'></a><a href='#L53'>53</a>
119
+ <a name='L54'></a><a href='#L54'>54</a>
120
+ <a name='L55'></a><a href='#L55'>55</a>
121
+ <a name='L56'></a><a href='#L56'>56</a>
122
+ <a name='L57'></a><a href='#L57'>57</a>
123
+ <a name='L58'></a><a href='#L58'>58</a>
124
+ <a name='L59'></a><a href='#L59'>59</a>
125
+ <a name='L60'></a><a href='#L60'>60</a>
126
+ <a name='L61'></a><a href='#L61'>61</a>
127
+ <a name='L62'></a><a href='#L62'>62</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
128
+ <span class="cline-any cline-neutral">&nbsp;</span>
129
+ <span class="cline-any cline-neutral">&nbsp;</span>
130
+ <span class="cline-any cline-neutral">&nbsp;</span>
131
+ <span class="cline-any cline-neutral">&nbsp;</span>
132
+ <span class="cline-any cline-neutral">&nbsp;</span>
133
+ <span class="cline-any cline-neutral">&nbsp;</span>
134
+ <span class="cline-any cline-neutral">&nbsp;</span>
135
+ <span class="cline-any cline-neutral">&nbsp;</span>
136
+ <span class="cline-any cline-neutral">&nbsp;</span>
137
+ <span class="cline-any cline-neutral">&nbsp;</span>
138
+ <span class="cline-any cline-neutral">&nbsp;</span>
139
+ <span class="cline-any cline-neutral">&nbsp;</span>
140
+ <span class="cline-any cline-no">&nbsp;</span>
141
+ <span class="cline-any cline-neutral">&nbsp;</span>
142
+ <span class="cline-any cline-no">&nbsp;</span>
143
+ <span class="cline-any cline-neutral">&nbsp;</span>
144
+ <span class="cline-any cline-neutral">&nbsp;</span>
145
+ <span class="cline-any cline-neutral">&nbsp;</span>
146
+ <span class="cline-any cline-no">&nbsp;</span>
147
+ <span class="cline-any cline-neutral">&nbsp;</span>
148
+ <span class="cline-any cline-neutral">&nbsp;</span>
149
+ <span class="cline-any cline-neutral">&nbsp;</span>
150
+ <span class="cline-any cline-neutral">&nbsp;</span>
151
+ <span class="cline-any cline-neutral">&nbsp;</span>
152
+ <span class="cline-any cline-neutral">&nbsp;</span>
153
+ <span class="cline-any cline-neutral">&nbsp;</span>
154
+ <span class="cline-any cline-neutral">&nbsp;</span>
155
+ <span class="cline-any cline-neutral">&nbsp;</span>
156
+ <span class="cline-any cline-neutral">&nbsp;</span>
157
+ <span class="cline-any cline-neutral">&nbsp;</span>
158
+ <span class="cline-any cline-neutral">&nbsp;</span>
159
+ <span class="cline-any cline-no">&nbsp;</span>
160
+ <span class="cline-any cline-neutral">&nbsp;</span>
161
+ <span class="cline-any cline-neutral">&nbsp;</span>
162
+ <span class="cline-any cline-neutral">&nbsp;</span>
163
+ <span class="cline-any cline-neutral">&nbsp;</span>
164
+ <span class="cline-any cline-no">&nbsp;</span>
165
+ <span class="cline-any cline-neutral">&nbsp;</span>
166
+ <span class="cline-any cline-neutral">&nbsp;</span>
167
+ <span class="cline-any cline-neutral">&nbsp;</span>
168
+ <span class="cline-any cline-no">&nbsp;</span>
169
+ <span class="cline-any cline-neutral">&nbsp;</span>
170
+ <span class="cline-any cline-neutral">&nbsp;</span>
171
+ <span class="cline-any cline-neutral">&nbsp;</span>
172
+ <span class="cline-any cline-neutral">&nbsp;</span>
173
+ <span class="cline-any cline-neutral">&nbsp;</span>
174
+ <span class="cline-any cline-neutral">&nbsp;</span>
175
+ <span class="cline-any cline-no">&nbsp;</span>
176
+ <span class="cline-any cline-neutral">&nbsp;</span>
177
+ <span class="cline-any cline-no">&nbsp;</span>
178
+ <span class="cline-any cline-no">&nbsp;</span>
179
+ <span class="cline-any cline-no">&nbsp;</span>
180
+ <span class="cline-any cline-no">&nbsp;</span>
181
+ <span class="cline-any cline-no">&nbsp;</span>
182
+ <span class="cline-any cline-neutral">&nbsp;</span>
183
+ <span class="cline-any cline-neutral">&nbsp;</span>
184
+ <span class="cline-any cline-no">&nbsp;</span>
185
+ <span class="cline-any cline-neutral">&nbsp;</span>
186
+ <span class="cline-any cline-neutral">&nbsp;</span>
187
+ <span class="cline-any cline-neutral">&nbsp;</span>
188
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// @ts-nocheck
189
+ import './core/polyfill';
190
+ import '@@/core/devScripts';
191
+ import { plugin } from './core/plugin';
192
+ import './core/pluginRegister';
193
+ import { createHistory } from './core/history';
194
+ import { ApplyPluginsType } from '/Users/zakj/Desktop/pro/za-material-warehouse/node_modules/@umijs/runtime';
195
+ import { renderClient } from '/Users/zakj/Desktop/pro/za-material-warehouse/node_modules/@umijs/renderer-react/dist/index.js';
196
+ import { getRoutes } from './core/routes';
197
+ &nbsp;
198
+ &nbsp;
199
+ import '../global.less';
200
+ import { _onCreate } from './plugin-locale/locale';
201
+ <span class="cstat-no" title="statement not covered" >_onCreate();</span>
202
+ &nbsp;
203
+ const getClientRender = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(a</span>rgs: { hot?: boolean; routes?: any[] } = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; <span class="cstat-no" title="statement not covered" >plugin.applyPlugins({</span></span>
204
+ key: 'render',
205
+ type: ApplyPluginsType.compose,
206
+ initialValue: <span class="fstat-no" title="function not covered" >()</span> =&gt; {
207
+ const opts = <span class="cstat-no" title="statement not covered" >plugin.applyPlugins({</span>
208
+ key: 'modifyClientRenderOpts',
209
+ type: ApplyPluginsType.modify,
210
+ initialValue: {
211
+ routes: args.routes || getRoutes(),
212
+ plugin,
213
+ history: createHistory(args.hot),
214
+ isServer: process.env.__IS_SERVER,
215
+ dynamicImport: true,
216
+ rootElement: 'root',
217
+ defaultTitle: `sisyphus(3.4.3-beta.6)`,
218
+ },
219
+ });
220
+ <span class="cstat-no" title="statement not covered" > return renderClient(opts);</span>
221
+ },
222
+ args,
223
+ });
224
+ &nbsp;
225
+ const clientRender = <span class="cstat-no" title="statement not covered" >getClientRender();</span>
226
+ export default clientRender();
227
+ &nbsp;
228
+ &nbsp;
229
+ <span class="cstat-no" title="statement not covered" > window.g_umi = {</span>
230
+ version: '3.5.41',
231
+ };
232
+
233
+ &nbsp;
234
+ // hot module replacement
235
+ // @ts-ignore
236
+ <span class="cstat-no" title="statement not covered" >if (module.hot) {</span>
237
+ // @ts-ignore
238
+ <span class="cstat-no" title="statement not covered" > module.hot.accept('./core/routes', <span class="fstat-no" title="function not covered" >()</span> =&gt; {</span>
239
+ const ret = <span class="cstat-no" title="statement not covered" >require('./core/routes');</span>
240
+ <span class="cstat-no" title="statement not covered" > if (ret.then) {</span>
241
+ <span class="cstat-no" title="statement not covered" > ret.then(<span class="fstat-no" title="function not covered" >({</span> getRoutes }) =&gt; {</span>
242
+ <span class="cstat-no" title="statement not covered" > getClientRender({ hot: true, routes: getRoutes() })();</span>
243
+ });
244
+ } else {
245
+ <span class="cstat-no" title="statement not covered" > getClientRender({ hot: true, routes: ret.getRoutes() })();</span>
246
+ }
247
+ });
248
+ }
249
+ &nbsp;</pre></td></tr></table></pre>
250
+
251
+ <div class='push'></div><!-- for sticky footer -->
252
+ </div><!-- /wrapper -->
253
+ <div class='footer quiet pad2 space-top1 center small'>
254
+ Code coverage generated by
255
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
256
+ at 2024-01-24T02:49:50.075Z
257
+ </div>
258
+ <script src="../../prettify.js"></script>
259
+ <script>
260
+ window.onload = function () {
261
+ prettyPrint();
262
+ };
263
+ </script>
264
+ <script src="../../sorter.js"></script>
265
+ <script src="../../block-navigation.js"></script>
266
+ </body>
267
+ </html>
268
+
@@ -98,7 +98,7 @@ var RenderToolbar = function RenderToolbar(config) {
98
98
  case 7:
99
99
  result = _context.sent;
100
100
  case 8:
101
- if (result && type !== 'custom') {
101
+ if (result !== false && type !== 'custom') {
102
102
  actions[type](_objectSpread(_objectSpread({}, config), {}, {
103
103
  index: index,
104
104
  record: record,
@@ -51,7 +51,8 @@ var Render = function Render(props) {
51
51
  confirm = props.confirm,
52
52
  globalControl = props.globalControl,
53
53
  diffConfig = props.diffConfig,
54
- viewRender = props.viewRender;
54
+ viewRender = props.viewRender,
55
+ desensitization = props.desensitization;
55
56
  var colProps = props.colProps;
56
57
  // 剔除一些不是FormItem的属性, 防止控制台报warning
57
58
  var labelWidth = formItemProps.labelWidth,
@@ -75,7 +76,8 @@ var Render = function Render(props) {
75
76
  fieldProps: fieldProps,
76
77
  component: component,
77
78
  originComponent: originComponent,
78
- type: type
79
+ type: type,
80
+ desensitization: desensitization
79
81
  }),
80
82
  shouldUpdate = _useShouldUpdate.shouldUpdate,
81
83
  _show = _useShouldUpdate.show,
@@ -83,7 +85,8 @@ var Render = function Render(props) {
83
85
  _rules = _useShouldUpdate.rules,
84
86
  _required = _useShouldUpdate.required,
85
87
  _fieldProps = _useShouldUpdate.fieldProps,
86
- AutoComponent = _useShouldUpdate.component;
88
+ AutoComponent = _useShouldUpdate.component,
89
+ _desensitization = _useShouldUpdate.desensitization;
87
90
  otherFormItemProps.shouldUpdate = shouldUpdate;
88
91
  var namesStr = useMemo(function () {
89
92
  var _otherProps$names;
@@ -121,11 +124,16 @@ var Render = function Render(props) {
121
124
  if (type === 'Input') {
122
125
  valueType = valueType || 'trim';
123
126
  }
127
+ if (_desensitization === null || _desensitization === void 0 ? void 0 : _desensitization.length) {
128
+ valueType = 'desensitization';
129
+ }
124
130
  // 不存在valueType返回空
125
131
  if (!valueType) {
126
132
  return {};
127
133
  }
128
- var params = _objectSpread(_objectSpread({}, otherProps), otherFormItemProps);
134
+ var params = _objectSpread(_objectSpread(_objectSpread({}, otherProps), otherFormItemProps), {}, {
135
+ desensitization: _desensitization
136
+ });
129
137
  return isFunction(valueTypeMap[valueType]) ? valueTypeMap[valueType](params) : {};
130
138
  };
131
139
  /**
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["show", "type", "viewRender", "viewType", "valueType", "formItemProps", "colProps", "formItemChildProps", "fieldProps", "equalWith", "onDiff", "clearNotShow", "required", "confirm"];
3
+ var _excluded = ["show", "type", "viewRender", "viewType", "valueType", "formItemProps", "colProps", "formItemChildProps", "fieldProps", "equalWith", "onDiff", "clearNotShow", "required", "confirm", "desensitization"];
4
4
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
5
5
  import React from 'react';
6
6
  import { isBoolean, isFunction, union, isString } from 'lodash';
@@ -74,6 +74,7 @@ var RenderFields = function RenderFields(props) {
74
74
  clearNotShow = _column$clearNotShow === void 0 ? outerClearNotShow : _column$clearNotShow,
75
75
  columnRequired = column.required,
76
76
  confirm = column.confirm,
77
+ desensitization = column.desensitization,
77
78
  otherFormItemProps = _objectWithoutProperties(column, _excluded);
78
79
  var component = column.component;
79
80
  var _isView = typeof column.isView === 'boolean' ? column.isView : isView;
@@ -212,7 +213,8 @@ var RenderFields = function RenderFields(props) {
212
213
  equalWith: onDiff || equalWith,
213
214
  requiredOnView: requiredOnView,
214
215
  globalControl: globalControl,
215
- viewRender: viewRender
216
+ viewRender: viewRender,
217
+ desensitization: desensitization
216
218
  })
217
219
  }, "".concat(_formItemProps.name || _formItemProps.label).concat(index));
218
220
  });
@@ -229,6 +229,8 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
229
229
  confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps | void | Promise<boolean | ModalFuncProps | void>>;
230
230
  /** 防抖模式 */
231
231
  debounceWait?: number;
232
+ /** 脱敏数据位置下标 */
233
+ desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
232
234
  }
233
235
  export type ProColumnProps<T = any> = ProFormColumnProps<T> & ColumnPropsMap<T, 'ProForm'>;
234
236
  /**
@@ -21,7 +21,8 @@ var useShouldUpdate = function useShouldUpdate(props) {
21
21
  fieldProps = props.fieldProps,
22
22
  component = props.component,
23
23
  originComponent = props.originComponent,
24
- type = props.type;
24
+ type = props.type,
25
+ desensitization = props.desensitization;
25
26
  var _shouldUpdate = formItemProps.shouldUpdate,
26
27
  name = formItemProps.name,
27
28
  clearNotShow = formItemProps.clearNotShow,
@@ -38,13 +39,14 @@ var useShouldUpdate = function useShouldUpdate(props) {
38
39
  var fieldPropsRef = useRef();
39
40
  var originComponentRef = useRef();
40
41
  var dependNamesRef = useRef();
42
+ var desensitizationRef = useRef();
41
43
  var newComponent = originComponent || component; // 解决component默认赋值污染问题,需要使用originComponent
42
44
  var _useState = useState({}),
43
45
  _useState2 = _slicedToArray(_useState, 2),
44
46
  reRender = _useState2[1];
45
47
  var values = {};
46
48
  // 不是动态函数直接返回
47
- if (!(dependNames === null || dependNames === void 0 ? void 0 : dependNames.length) && !isFunction(show) && !isFunction(disabled) && !isFunction(required) && !isFunction(rules) && !isFunction(fieldProps) && !isFunction(originComponent)) {
49
+ if (!(dependNames === null || dependNames === void 0 ? void 0 : dependNames.length) && !isFunction(show) && !isFunction(disabled) && !isFunction(required) && !isFunction(rules) && !isFunction(fieldProps) && !isFunction(originComponent) && !isFunction(desensitization)) {
48
50
  return {
49
51
  shouldUpdate: _shouldUpdate,
50
52
  show: show,
@@ -52,7 +54,8 @@ var useShouldUpdate = function useShouldUpdate(props) {
52
54
  required: required,
53
55
  rules: rules,
54
56
  fieldProps: fieldProps,
55
- component: newComponent
57
+ component: newComponent,
58
+ desensitization: desensitization
56
59
  };
57
60
  }
58
61
  if (namePath) {
@@ -70,6 +73,15 @@ var useShouldUpdate = function useShouldUpdate(props) {
70
73
  } else {
71
74
  showRef.current = show;
72
75
  }
76
+ if (isFunction(desensitization)) {
77
+ desensitizationRef.current = desensitization(values, {
78
+ form: form,
79
+ index: index,
80
+ namePath: namePath
81
+ });
82
+ } else {
83
+ desensitizationRef.current = desensitization;
84
+ }
73
85
  if (isFunction(disabled)) {
74
86
  // RangePicker返回数组时,特殊处理
75
87
  if (['Group', 'RangePicker', 'ProCascader'].includes(type) && Array.isArray(disabled(values, {
@@ -176,6 +188,11 @@ var useShouldUpdate = function useShouldUpdate(props) {
176
188
  index: index,
177
189
  namePath: namePath
178
190
  }) : fieldProps;
191
+ var _desensitization = isFunction(desensitization) ? desensitization(_currentValues, {
192
+ form: form,
193
+ index: index,
194
+ namePath: namePath
195
+ }) : desensitization;
179
196
  // 清值防抖 多次刷新时以最后一次为准
180
197
  if (clearNotShow !== false && (name || names) && !isDeleteLine(form, namePath)) {
181
198
  // 当show为其他变为false的时候记录一次需要清值
@@ -201,13 +218,15 @@ var useShouldUpdate = function useShouldUpdate(props) {
201
218
  }
202
219
  var equalRes = isEqualWith(rulesRef.current, _rules, customEqualForFun);
203
220
  var proEqualRes = isEqualWith(fieldPropsRef.current, _fieldProps, customEqualForFun);
204
- if (_show !== showRef.current || _disabled !== disabledRef.current || _required !== requiredRef.current || !equalRes || !proEqualRes || (_fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.transformResponse) // 防止fieldProps变更时,transformResponse根据fieldProps新值无法触发更新
221
+ var desensitizationRes = isEqualWith(desensitizationRef.current, _desensitization);
222
+ if (_show !== showRef.current || _disabled !== disabledRef.current || _required !== requiredRef.current || !equalRes || !proEqualRes || !desensitizationRes || (_fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.transformResponse) // 防止fieldProps变更时,transformResponse根据fieldProps新值无法触发更新
205
223
  ) {
206
224
  showRef.current = _show;
207
225
  disabledRef.current = _disabled;
208
226
  requiredRef.current = _required;
209
227
  rulesRef.current = _rules;
210
228
  fieldPropsRef.current = _fieldProps;
229
+ desensitizationRef.current = _desensitization;
211
230
  reRender({});
212
231
  return false;
213
232
  }
@@ -224,7 +243,8 @@ var useShouldUpdate = function useShouldUpdate(props) {
224
243
  rules: rulesRef.current,
225
244
  required: requiredRef.current,
226
245
  component: originComponentRef.current,
227
- fieldProps: fieldPropsRef.current
246
+ fieldProps: fieldPropsRef.current,
247
+ desensitization: desensitizationRef.current
228
248
  };
229
249
  };
230
250
  export default useShouldUpdate;
@@ -1,3 +1,5 @@
1
+ /** 脱敏处理函数 */
2
+ export declare const maskStringRangeWithRegex: (input: string, range: [number, number]) => string;
1
3
  declare const _default: {
2
4
  /** 年月日 */
3
5
  date: ({ type, toISOString, toCSTString, mode }: {
@@ -64,5 +66,13 @@ declare const _default: {
64
66
  value: any;
65
67
  };
66
68
  };
69
+ /** 脱敏 转换 */
70
+ desensitization: ({ desensitization }: {
71
+ desensitization: any;
72
+ }) => {
73
+ getValueProps: (value: any) => {
74
+ value: any;
75
+ };
76
+ };
67
77
  };
68
78
  export default _default;
@@ -1,3 +1,4 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
1
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
3
  import Big from 'big.js';
3
4
  import { isEqual } from 'lodash';
@@ -188,13 +189,31 @@ var dateTransform = function dateTransform(_ref2) {
188
189
  }
189
190
  return result;
190
191
  };
192
+ /** 脱敏处理函数 */
193
+ export var maskStringRangeWithRegex = function maskStringRangeWithRegex(input, range) {
194
+ var _ref3 = range || [],
195
+ _ref4 = _slicedToArray(_ref3, 2),
196
+ start = _ref4[0],
197
+ end = _ref4[1];
198
+ if (start < 0) {
199
+ throw new Error('脱敏数据: start index cannot be negative');
200
+ }
201
+ var adjustedEnd = Math.min(end, input.length - 1);
202
+ if (start >= input.length) {
203
+ return '';
204
+ }
205
+ var regexPattern = "^(.{".concat(start, "})(.{").concat(adjustedEnd - start + 1, "})(.*)$");
206
+ var regex = new RegExp(regexPattern);
207
+ var maskedValue = input.replace(regex, "$1".concat('*'.repeat(adjustedEnd - start + 1), "$3"));
208
+ return maskedValue;
209
+ };
191
210
  export default {
192
211
  /** 年月日 */
193
- date: function date(_ref3) {
194
- var type = _ref3.type,
195
- toISOString = _ref3.toISOString,
196
- toCSTString = _ref3.toCSTString,
197
- mode = _ref3.mode;
212
+ date: function date(_ref5) {
213
+ var type = _ref5.type,
214
+ toISOString = _ref5.toISOString,
215
+ toCSTString = _ref5.toCSTString,
216
+ mode = _ref5.mode;
198
217
  return dateTransform({
199
218
  type: type,
200
219
  _valueType: 'date',
@@ -204,11 +223,11 @@ export default {
204
223
  });
205
224
  },
206
225
  /** 年月日 时分秒 */
207
- dateTime: function dateTime(_ref4) {
208
- var type = _ref4.type,
209
- toISOString = _ref4.toISOString,
210
- toCSTString = _ref4.toCSTString,
211
- mode = _ref4.mode;
226
+ dateTime: function dateTime(_ref6) {
227
+ var type = _ref6.type,
228
+ toISOString = _ref6.toISOString,
229
+ toCSTString = _ref6.toCSTString,
230
+ mode = _ref6.mode;
212
231
  return dateTransform({
213
232
  type: type,
214
233
  _valueType: 'dateTime',
@@ -218,11 +237,11 @@ export default {
218
237
  });
219
238
  },
220
239
  /** 年月日 00:00:00 */
221
- dateStartTime: function dateStartTime(_ref5) {
222
- var type = _ref5.type,
223
- toISOString = _ref5.toISOString,
224
- toCSTString = _ref5.toCSTString,
225
- mode = _ref5.mode;
240
+ dateStartTime: function dateStartTime(_ref7) {
241
+ var type = _ref7.type,
242
+ toISOString = _ref7.toISOString,
243
+ toCSTString = _ref7.toCSTString,
244
+ mode = _ref7.mode;
226
245
  return dateTransform({
227
246
  type: type,
228
247
  _valueType: 'dateStartTime',
@@ -232,11 +251,11 @@ export default {
232
251
  });
233
252
  },
234
253
  /** 年月日 23:59:59 */
235
- dateEndTime: function dateEndTime(_ref6) {
236
- var type = _ref6.type,
237
- toISOString = _ref6.toISOString,
238
- toCSTString = _ref6.toCSTString,
239
- mode = _ref6.mode;
254
+ dateEndTime: function dateEndTime(_ref8) {
255
+ var type = _ref8.type,
256
+ toISOString = _ref8.toISOString,
257
+ toCSTString = _ref8.toCSTString,
258
+ mode = _ref8.mode;
240
259
  return dateTransform({
241
260
  type: type,
242
261
  _valueType: 'dateEndTime',
@@ -246,11 +265,11 @@ export default {
246
265
  });
247
266
  },
248
267
  /** 年月日 00:00:00 ~ 年月日 23:59:59 */
249
- dateStartEndTime: function dateStartEndTime(_ref7) {
250
- var type = _ref7.type,
251
- toISOString = _ref7.toISOString,
252
- toCSTString = _ref7.toCSTString,
253
- mode = _ref7.mode;
268
+ dateStartEndTime: function dateStartEndTime(_ref9) {
269
+ var type = _ref9.type,
270
+ toISOString = _ref9.toISOString,
271
+ toCSTString = _ref9.toCSTString,
272
+ mode = _ref9.mode;
254
273
  return dateTransform({
255
274
  type: type,
256
275
  _valueType: 'dateStartEndTime',
@@ -260,9 +279,9 @@ export default {
260
279
  });
261
280
  },
262
281
  /** 百分比 */
263
- percentage: function percentage(_ref8) {
264
- var type = _ref8.type,
265
- valueType = _ref8.valueType;
282
+ percentage: function percentage(_ref10) {
283
+ var type = _ref10.type,
284
+ valueType = _ref10.valueType;
266
285
  return transformRatio({
267
286
  type: type,
268
287
  valueType: valueType,
@@ -270,9 +289,9 @@ export default {
270
289
  });
271
290
  },
272
291
  /** 千分比 */
273
- permillage: function permillage(_ref9) {
274
- var type = _ref9.type,
275
- valueType = _ref9.valueType;
292
+ permillage: function permillage(_ref11) {
293
+ var type = _ref11.type,
294
+ valueType = _ref11.valueType;
276
295
  return transformRatio({
277
296
  type: type,
278
297
  valueType: valueType,
@@ -280,8 +299,25 @@ export default {
280
299
  });
281
300
  },
282
301
  /** 开关 YN转换 */
283
- switch: function _switch(_ref10) {
284
- var switchValue = _ref10.switchValue;
302
+ switch: function _switch(_ref12) {
303
+ var switchValue = _ref12.switchValue;
285
304
  return switchTransform(switchValue);
305
+ },
306
+ /** 脱敏 转换 */
307
+ desensitization: function desensitization(_ref13) {
308
+ var _desensitization = _ref13.desensitization;
309
+ return {
310
+ getValueProps: function getValueProps(value) {
311
+ try {
312
+ return {
313
+ value: maskStringRangeWithRegex(value, _desensitization)
314
+ };
315
+ } catch (error) {
316
+ return {
317
+ value: value
318
+ }; // 如果发生错误,返回原始值
319
+ }
320
+ }
321
+ };
286
322
  }
287
323
  };
@@ -78,6 +78,7 @@ export var formatColumn = function formatColumn(_ref2) {
78
78
  minWidth = column.minWidth,
79
79
  onDiff = column.onDiff,
80
80
  otherProps = _objectWithoutProperties(column, _excluded);
81
+ otherProps.scroll = scroll;
81
82
  // 仅在 {x: 'max-content', y: 300 } 且 column无指定 width minWidth 情况下 才开启 minWidth的自动计算
82
83
  var isMaxContentOverFlow = isObject(scroll) ? (scroll === null || scroll === void 0 ? void 0 : scroll.x) === 'max-content' && Reflect.ownKeys(scroll).includes('y') : false;
83
84
  calcMinWidth({
@@ -15,6 +15,8 @@ interface Props {
15
15
  isChanged?: boolean;
16
16
  /** 新增单元格字段 */
17
17
  isAddCell?: boolean;
18
+ /** 表格透传下来的scroll配置 */
19
+ scroll?: any;
18
20
  }
19
21
  declare const RenderColumn: FC<Props>;
20
22
  export default RenderColumn;