@zat-design/sisyphus-react 3.9.8-beta.3 → 3.9.8-beta.5
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.
- package/es/ProEditTable/utils/diffOriginal.d.ts +1 -1
- package/es/ProEditTable/utils/diffOriginal.js +21 -22
- package/es/ProForm/components/combination/Group/index.js +7 -2
- package/es/ProForm/components/combination/Group/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/Group/utils.d.ts +6 -1
- package/es/ProForm/components/combination/Group/utils.js +28 -6
- package/es/ProForm/components/render/Render.js +12 -8
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +4 -2
- package/es/ProForm/components/render/propsType.d.ts +1 -1
- package/es/ProForm/index.js +5 -2
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/utils/diffOriginal.js +9 -2
- package/es/ProForm/utils/valueType.d.ts +1 -3
- package/es/ProForm/utils/valueType.js +33 -3
- package/lib/ProEditTable/utils/diffOriginal.d.ts +1 -1
- package/lib/ProEditTable/utils/diffOriginal.js +21 -22
- package/lib/ProForm/components/combination/Group/index.js +7 -2
- package/lib/ProForm/components/combination/Group/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/utils.d.ts +6 -1
- package/lib/ProForm/components/combination/Group/utils.js +28 -6
- package/lib/ProForm/components/render/Render.js +12 -8
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +4 -2
- package/lib/ProForm/components/render/propsType.d.ts +1 -1
- package/lib/ProForm/index.js +5 -2
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/utils/diffOriginal.js +9 -2
- package/lib/ProForm/utils/valueType.d.ts +1 -3
- package/lib/ProForm/utils/valueType.js +33 -3
- package/package.json +1 -1
- package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +0 -241
- package/coverage/lcov-report/src/.umi/core/history.ts.html +0 -148
- package/coverage/lcov-report/src/.umi/core/index.html +0 -206
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +0 -109
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +0 -160
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +0 -97
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +0 -26050
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +0 -112
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +0 -116
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +0 -6340
- package/coverage/lcov-report/src/.umi/dumi/index.html +0 -116
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +0 -109
- package/coverage/lcov-report/src/.umi/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +0 -172
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +0 -94
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +0 -196
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +0 -106
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +0 -146
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +0 -88
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +0 -124
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +0 -1246
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +0 -161
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +0 -268
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +0 -778
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +0 -115
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +0 -202
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +0 -97
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +0 -142
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +0 -334
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +0 -146
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +0 -146
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +0 -121
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +0 -298
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +0 -919
- package/coverage/lcov-report/src/.umi/umi.ts.html +0 -268
@@ -128,7 +128,7 @@ var getReactiveProps = exports.getReactiveProps = function getReactiveProps(para
|
|
128
128
|
show = params.show,
|
129
129
|
component = params.component,
|
130
130
|
fieldProps = params.fieldProps,
|
131
|
-
|
131
|
+
desensitization = params.desensitization;
|
132
132
|
var values = namePath ? form.getFieldValue(namePath) : form.getFieldsValue();
|
133
133
|
var _disabled = (0, _lodash.isFunction)(disabled) ? disabled(values, {
|
134
134
|
form: form,
|
@@ -150,17 +150,31 @@ var getReactiveProps = exports.getReactiveProps = function getReactiveProps(para
|
|
150
150
|
index: index,
|
151
151
|
namePath: namePath
|
152
152
|
}) : fieldProps;
|
153
|
+
var _desensitization = (0, _lodash.isFunction)(desensitization) ? desensitization(values, {
|
154
|
+
form: form,
|
155
|
+
index: index,
|
156
|
+
namePath: namePath
|
157
|
+
}) : desensitization;
|
153
158
|
return {
|
154
159
|
disabled: _disabled,
|
155
160
|
show: _show,
|
156
161
|
component: _component,
|
157
|
-
fieldProps: _fieldProps
|
162
|
+
fieldProps: _fieldProps,
|
163
|
+
desensitization: _desensitization
|
158
164
|
};
|
159
165
|
};
|
160
166
|
/** 获取当前字段的转换函数 */
|
161
167
|
var getValueTypeTrans = exports.getValueTypeTrans = function getValueTypeTrans(params) {
|
162
168
|
var _valueTypeMap$valueTy;
|
169
|
+
var desensitizationKey = params.desensitizationKey;
|
163
170
|
var valueType = params.valueType;
|
171
|
+
var desensitization = params.desensitization,
|
172
|
+
disabled = params.disabled;
|
173
|
+
var isDesensit = sessionStorage.getItem(desensitizationKey);
|
174
|
+
// 仅查看模式下进行数据脱敏
|
175
|
+
if ((desensitization === null || desensitization === void 0 ? void 0 : desensitization.length) && disabled && isDesensit === 'ON') {
|
176
|
+
valueType = 'desensitization';
|
177
|
+
}
|
164
178
|
var transform = (_valueTypeMap$valueTy = _valueType.default[valueType]) === null || _valueTypeMap$valueTy === void 0 ? void 0 : _valueTypeMap$valueTy.call(_valueType.default, params);
|
165
179
|
return transform;
|
166
180
|
};
|
@@ -206,7 +220,9 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
|
|
206
220
|
namePath = params.namePath,
|
207
221
|
value = params.value,
|
208
222
|
internalChange = params.onChange,
|
209
|
-
groupProps = params.groupProps
|
223
|
+
groupProps = params.groupProps,
|
224
|
+
formDisabled = params.formDisabled,
|
225
|
+
desensitizationKey = params.desensitizationKey;
|
210
226
|
var timerRef = (0, _react.useRef)([]);
|
211
227
|
return columns === null || columns === void 0 ? void 0 : columns.flatMap(function (column, index) {
|
212
228
|
var type = column.type,
|
@@ -219,7 +235,8 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
|
|
219
235
|
disabled = column.disabled,
|
220
236
|
show = column.show,
|
221
237
|
component = column.component,
|
222
|
-
clearNotShow = column.clearNotShow
|
238
|
+
clearNotShow = column.clearNotShow,
|
239
|
+
desensitization = column.desensitization;
|
223
240
|
var _ref = fieldProps || {},
|
224
241
|
mode = _ref.mode,
|
225
242
|
onChange = _ref.onChange,
|
@@ -260,19 +277,24 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
|
|
260
277
|
show: show,
|
261
278
|
component: component,
|
262
279
|
fieldProps: fieldProps,
|
263
|
-
name: columnName
|
280
|
+
name: columnName,
|
281
|
+
desensitization: desensitization
|
264
282
|
});
|
265
283
|
}, changedCallback, [value, show, fieldProps, _disabled, columnName, type]);
|
266
284
|
if (reactiveProps.show === false) {
|
267
285
|
return [];
|
268
286
|
}
|
287
|
+
var isDisabled = formDisabled || _disabled || reactiveProps.disabled;
|
269
288
|
var transform = getValueTypeTrans({
|
270
289
|
type: type,
|
271
290
|
valueType: valueType,
|
272
291
|
switchValue: switchValue,
|
273
292
|
toISOString: toISOString,
|
274
293
|
toCSTString: toCSTString,
|
275
|
-
mode: mode
|
294
|
+
mode: mode,
|
295
|
+
desensitizationKey: desensitizationKey,
|
296
|
+
disabled: isDisabled,
|
297
|
+
desensitization: reactiveProps.desensitization
|
276
298
|
});
|
277
299
|
var newValue;
|
278
300
|
var handleChange = function handleChange() {
|
@@ -31,7 +31,7 @@ var _excluded = ["labelWidth", "hiddenNames", "trim", "upperCase", "className",
|
|
31
31
|
/* eslint-disable prefer-destructuring */
|
32
32
|
// 这个组件只管渲染, 参数的整理在外部处理
|
33
33
|
var Render = function Render(props) {
|
34
|
-
var
|
34
|
+
var _ref3, _ref4, _ref5, _ref6, _otherProps$names2;
|
35
35
|
var component = props.component,
|
36
36
|
originComponent = props.originComponent,
|
37
37
|
_props$formItemProps = props.formItemProps,
|
@@ -116,7 +116,9 @@ var Render = function Render(props) {
|
|
116
116
|
*/
|
117
117
|
var valueTypeTransform = function valueTypeTransform() {
|
118
118
|
var _ref = otherProps || {},
|
119
|
-
|
119
|
+
desensitizationKey = _ref.desensitizationKey;
|
120
|
+
var _ref2 = otherProps || {},
|
121
|
+
valueType = _ref2.valueType;
|
120
122
|
// SwitchCheckbox默认YN, 兼容已有组件
|
121
123
|
if (type === 'SwitchCheckbox') {
|
122
124
|
valueType = 'switch';
|
@@ -124,7 +126,9 @@ var Render = function Render(props) {
|
|
124
126
|
if (type === 'Input') {
|
125
127
|
valueType = valueType || 'trim';
|
126
128
|
}
|
127
|
-
|
129
|
+
var isDesensit = sessionStorage.getItem(desensitizationKey);
|
130
|
+
// 仅查看模式下进行数据脱敏
|
131
|
+
if ((_desensitization === null || _desensitization === void 0 ? void 0 : _desensitization.length) && _disabled && isDesensit === 'ON') {
|
128
132
|
valueType = 'desensitization';
|
129
133
|
}
|
130
134
|
// 不存在valueType返回空
|
@@ -149,7 +153,7 @@ var Render = function Render(props) {
|
|
149
153
|
* globalControl true时,优先级 全局【formDisabled】> formitem上【column.disabled】 > 组件上【fieldProps.disabled】
|
150
154
|
* globalControl false时,优先级 组件上【fieldProps.disabled】 > formitem上【column.disabled】 > 全局【formDisabled】
|
151
155
|
*/
|
152
|
-
var lastDisabled = globalControl ? (
|
156
|
+
var lastDisabled = globalControl ? (_ref3 = (_ref4 = formDisabled !== null && formDisabled !== void 0 ? formDisabled : _disabled) !== null && _ref4 !== void 0 ? _ref4 : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref3 !== void 0 ? _ref3 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled : (_ref5 = (_ref6 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref6 !== void 0 ? _ref6 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled) !== null && _ref5 !== void 0 ? _ref5 : formDisabled;
|
153
157
|
// ↑↑↑↑↑↑ formItem参数整理 ↑↑↑↑↑↑
|
154
158
|
Object.assign(otherFormItemProps, transforms, {
|
155
159
|
names: otherProps.names
|
@@ -202,8 +206,8 @@ var Render = function Render(props) {
|
|
202
206
|
var functionArgs = function functionArgs(args) {
|
203
207
|
var _otherFormItemProps$n;
|
204
208
|
var _args = (0, _toConsumableArray2.default)(args);
|
205
|
-
var
|
206
|
-
valueType =
|
209
|
+
var _ref7 = otherProps || {},
|
210
|
+
valueType = _ref7.valueType;
|
207
211
|
_args[1] = form.getFieldsValue();
|
208
212
|
_args[2] = {
|
209
213
|
form: form
|
@@ -303,7 +307,7 @@ var Render = function Render(props) {
|
|
303
307
|
* onBlur参数重置 (value, record, { form, index, namePath, option }) => void
|
304
308
|
*/
|
305
309
|
var handleBlur = /*#__PURE__*/function () {
|
306
|
-
var
|
310
|
+
var _ref8 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
307
311
|
var _len3,
|
308
312
|
args,
|
309
313
|
_key3,
|
@@ -330,7 +334,7 @@ var Render = function Render(props) {
|
|
330
334
|
}, _callee);
|
331
335
|
}));
|
332
336
|
return function handleBlur() {
|
333
|
-
return
|
337
|
+
return _ref8.apply(this, arguments);
|
334
338
|
};
|
335
339
|
}();
|
336
340
|
var renderItem = function renderItem() {
|
@@ -18,6 +18,7 @@ interface Props<T = any> {
|
|
18
18
|
requiredOnView?: boolean;
|
19
19
|
required?: boolean | boolean[] | (() => boolean | boolean[]);
|
20
20
|
globalControl?: boolean;
|
21
|
+
desensitizationKey?: string;
|
21
22
|
}
|
22
23
|
declare const RenderFields: React.FC<Props>;
|
23
24
|
export default RenderFields;
|
@@ -34,7 +34,8 @@ var RenderFields = function RenderFields(props) {
|
|
34
34
|
requiredOnView = props.requiredOnView,
|
35
35
|
required = props.required,
|
36
36
|
diffConfig = props.diffConfig,
|
37
|
-
globalControl = props.globalControl
|
37
|
+
globalControl = props.globalControl,
|
38
|
+
desensitizationKey = props.desensitizationKey;
|
38
39
|
// 是否包含隐藏字段
|
39
40
|
var hiddenData = columns.filter(function (item) {
|
40
41
|
return Array.isArray(item.hiddenNames);
|
@@ -197,7 +198,8 @@ var RenderFields = function RenderFields(props) {
|
|
197
198
|
listName: column.listName,
|
198
199
|
globalControl: globalControl,
|
199
200
|
formDisabled: formDisabled,
|
200
|
-
diffConfig: diffConfig
|
201
|
+
diffConfig: diffConfig,
|
202
|
+
desensitizationKey: desensitizationKey
|
201
203
|
};
|
202
204
|
return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
|
203
205
|
value: otherProps,
|
@@ -85,7 +85,7 @@ type FieldProps<T extends ControlProps, Values, TT> = TT extends 'ProForm' ? Tra
|
|
85
85
|
/**
|
86
86
|
* 值转换
|
87
87
|
*/
|
88
|
-
export type ProFormValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime' | 'switch';
|
88
|
+
export type ProFormValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime' | 'switch' | 'desensitization';
|
89
89
|
export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
|
90
90
|
type?: 'Input';
|
91
91
|
fieldProps?: FieldProps<InputProps, Values, T>;
|
package/lib/ProForm/index.js
CHANGED
@@ -26,7 +26,7 @@ var _useFieldProps = require("./utils/useFieldProps");
|
|
26
26
|
var _locale = _interopRequireDefault(require("../locale"));
|
27
27
|
var _useWatch = _interopRequireDefault(require("./utils/useWatch"));
|
28
28
|
var _FormsProvider = _interopRequireWildcard(require("../FormsProvider"));
|
29
|
-
var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize"];
|
29
|
+
var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "desensitizationKey"];
|
30
30
|
var ProForm = function ProForm(props, ref) {
|
31
31
|
var _localStorage, _ref;
|
32
32
|
var _props$mode = props.mode,
|
@@ -70,6 +70,8 @@ var ProForm = function ProForm(props, ref) {
|
|
70
70
|
scrollToError = _props$scrollToError === void 0 ? true : _props$scrollToError,
|
71
71
|
_props$optimize = props.optimize,
|
72
72
|
optimize = _props$optimize === void 0 ? false : _props$optimize,
|
73
|
+
_props$desensitizatio = props.desensitizationKey,
|
74
|
+
desensitizationKey = _props$desensitizatio === void 0 ? 'zat-design-pro-component-desensitization' : _props$desensitizatio,
|
73
75
|
otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
74
76
|
var config = (0, _ProConfigProvider.useProConfig)('ProForm');
|
75
77
|
var _useForm = (0, _useForm3.useForm)(originForm, {
|
@@ -238,7 +240,8 @@ var ProForm = function ProForm(props, ref) {
|
|
238
240
|
clearNotShow: clearNotShow,
|
239
241
|
requiredOnView: requiredOnView,
|
240
242
|
required: required,
|
241
|
-
globalControl: globalControl
|
243
|
+
globalControl: globalControl,
|
244
|
+
desensitizationKey: desensitizationKey
|
242
245
|
}), footerRender()]
|
243
246
|
})), children]
|
244
247
|
}));
|
@@ -46,6 +46,7 @@ export interface ProFormOtherProps {
|
|
46
46
|
formDisabled?: boolean;
|
47
47
|
isDiffChange?: boolean;
|
48
48
|
diffConfig?: DiffConfigProps;
|
49
|
+
desensitizationKey?: string;
|
49
50
|
}
|
50
51
|
export interface DiffConfigProps<Values = any> {
|
51
52
|
/** 比对原始数据源 */
|
@@ -94,6 +95,8 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
|
|
94
95
|
* 1. 开启不过滤names的中间态值
|
95
96
|
*/
|
96
97
|
optimize?: boolean;
|
98
|
+
/** 全局脱敏开关的key、默认 zat-design-pro-component-desensitization */
|
99
|
+
desensitizationKey?: string;
|
97
100
|
}
|
98
101
|
export interface Transform<T = any> {
|
99
102
|
normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
|
@@ -12,9 +12,16 @@ var filterObject = function filterObject(data) {
|
|
12
12
|
if (!(0, _lodash.isObject)(data) || data === null) return data;
|
13
13
|
// ['1', undefined] ['1', ''] 视为相等
|
14
14
|
if (Array.isArray(data)) {
|
15
|
-
|
16
|
-
|
15
|
+
// 数组中全是empty值的话 视为null
|
16
|
+
var isFillNull = true;
|
17
|
+
var arr = data.map(function (item) {
|
18
|
+
if ((0, _utils.isEmpty)(item)) {
|
19
|
+
return null;
|
20
|
+
}
|
21
|
+
isFillNull = false;
|
22
|
+
return item;
|
17
23
|
});
|
24
|
+
return isFillNull ? null : arr;
|
18
25
|
}
|
19
26
|
var resData = {};
|
20
27
|
Object.keys(data).forEach(function (key) {
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.maskStringRangeWithRegex = exports.default = void 0;
|
8
|
+
var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
|
8
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
11
|
var _big = _interopRequireDefault(require("big.js"));
|
@@ -311,13 +312,42 @@ var _default = exports.default = {
|
|
311
312
|
return switchTransform(switchValue);
|
312
313
|
},
|
313
314
|
/** 脱敏 转换 */
|
314
|
-
desensitization: function desensitization(
|
315
|
-
var
|
315
|
+
desensitization: function desensitization(props) {
|
316
|
+
var desensitization = props.desensitization,
|
317
|
+
type = props.type,
|
318
|
+
mode = props.mode,
|
319
|
+
names = props.names;
|
320
|
+
// 判断是否是地址控件,并带地址详情场景
|
321
|
+
if (type === 'ProCascader' && mode === 'address' && (names === null || names === void 0 ? void 0 : names.length) === 4) {
|
322
|
+
return {
|
323
|
+
getValueProps: function getValueProps(value) {
|
324
|
+
try {
|
325
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
326
|
+
var _value = (0, _slicedToArray2.default)(value, 4),
|
327
|
+
province = _value[0],
|
328
|
+
city = _value[1],
|
329
|
+
county = _value[2],
|
330
|
+
address = _value[3];
|
331
|
+
return {
|
332
|
+
value: [province, city, county, maskStringRangeWithRegex(address, desensitization)]
|
333
|
+
};
|
334
|
+
}
|
335
|
+
return {
|
336
|
+
value: value
|
337
|
+
};
|
338
|
+
} catch (error) {
|
339
|
+
return {
|
340
|
+
value: value
|
341
|
+
}; // 如果发生错误,返回原始值
|
342
|
+
}
|
343
|
+
}
|
344
|
+
};
|
345
|
+
}
|
316
346
|
return {
|
317
347
|
getValueProps: function getValueProps(value) {
|
318
348
|
try {
|
319
349
|
return {
|
320
|
-
value: maskStringRangeWithRegex(value,
|
350
|
+
value: maskStringRangeWithRegex(value, desensitization)
|
321
351
|
};
|
322
352
|
} catch (error) {
|
323
353
|
return {
|
package/package.json
CHANGED
@@ -1,241 +0,0 @@
|
|
1
|
-
|
2
|
-
<!doctype html>
|
3
|
-
<html lang="en">
|
4
|
-
|
5
|
-
<head>
|
6
|
-
<title>Code coverage report for src/.umi/core/devScripts.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/core</a> devScripts.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/18</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/15</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/5</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/18</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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
119
|
-
<span class="cline-any cline-neutral"> </span>
|
120
|
-
<span class="cline-any cline-no"> </span>
|
121
|
-
<span class="cline-any cline-neutral"> </span>
|
122
|
-
<span class="cline-any cline-neutral"> </span>
|
123
|
-
<span class="cline-any cline-no"> </span>
|
124
|
-
<span class="cline-any cline-no"> </span>
|
125
|
-
<span class="cline-any cline-no"> </span>
|
126
|
-
<span class="cline-any cline-neutral"> </span>
|
127
|
-
<span class="cline-any cline-neutral"> </span>
|
128
|
-
<span class="cline-any cline-neutral"> </span>
|
129
|
-
<span class="cline-any cline-neutral"> </span>
|
130
|
-
<span class="cline-any cline-no"> </span>
|
131
|
-
<span class="cline-any cline-neutral"> </span>
|
132
|
-
<span class="cline-any cline-neutral"> </span>
|
133
|
-
<span class="cline-any cline-neutral"> </span>
|
134
|
-
<span class="cline-any cline-neutral"> </span>
|
135
|
-
<span class="cline-any cline-no"> </span>
|
136
|
-
<span class="cline-any cline-no"> </span>
|
137
|
-
<span class="cline-any cline-neutral"> </span>
|
138
|
-
<span class="cline-any cline-neutral"> </span>
|
139
|
-
<span class="cline-any cline-neutral"> </span>
|
140
|
-
<span class="cline-any cline-no"> </span>
|
141
|
-
<span class="cline-any cline-no"> </span>
|
142
|
-
<span class="cline-any cline-no"> </span>
|
143
|
-
<span class="cline-any cline-neutral"> </span>
|
144
|
-
<span class="cline-any cline-neutral"> </span>
|
145
|
-
<span class="cline-any cline-no"> </span>
|
146
|
-
<span class="cline-any cline-neutral"> </span>
|
147
|
-
<span class="cline-any cline-no"> </span>
|
148
|
-
<span class="cline-any cline-neutral"> </span>
|
149
|
-
<span class="cline-any cline-no"> </span>
|
150
|
-
<span class="cline-any cline-neutral"> </span>
|
151
|
-
<span class="cline-any cline-neutral"> </span>
|
152
|
-
<span class="cline-any cline-neutral"> </span>
|
153
|
-
<span class="cline-any cline-neutral"> </span>
|
154
|
-
<span class="cline-any cline-no"> </span>
|
155
|
-
<span class="cline-any cline-neutral"> </span>
|
156
|
-
<span class="cline-any cline-no"> </span>
|
157
|
-
<span class="cline-any cline-neutral"> </span>
|
158
|
-
<span class="cline-any cline-neutral"> </span>
|
159
|
-
<span class="cline-any cline-no"> </span>
|
160
|
-
<span class="cline-any cline-neutral"> </span>
|
161
|
-
<span class="cline-any cline-neutral"> </span>
|
162
|
-
<span class="cline-any cline-neutral"> </span>
|
163
|
-
<span class="cline-any cline-neutral"> </span>
|
164
|
-
<span class="cline-any cline-no"> </span>
|
165
|
-
<span class="cline-any cline-neutral"> </span>
|
166
|
-
<span class="cline-any cline-neutral"> </span>
|
167
|
-
<span class="cline-any cline-neutral"> </span>
|
168
|
-
<span class="cline-any cline-neutral"> </span>
|
169
|
-
<span class="cline-any cline-no"> </span>
|
170
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// @ts-nocheck
|
171
|
-
|
172
|
-
<span class="cstat-no" title="statement not covered" >if (window.g_initWebpackHotDevClient) {</span>
|
173
|
-
function <span class="fstat-no" title="function not covered" >tryApplyUpdates(</span>onHotUpdateSuccess?: Function) {
|
174
|
-
// @ts-ignore
|
175
|
-
<span class="cstat-no" title="statement not covered" > if (!module.hot) {</span>
|
176
|
-
<span class="cstat-no" title="statement not covered" > window.location.reload();</span>
|
177
|
-
<span class="cstat-no" title="statement not covered" > return;</span>
|
178
|
-
}
|
179
|
-
|
180
|
-
function <span class="fstat-no" title="function not covered" >isUpdateAvailable(</span>) {
|
181
|
-
// @ts-ignore
|
182
|
-
<span class="cstat-no" title="statement not covered" > return window.g_getMostRecentCompilationHash() !== __webpack_hash__;</span>
|
183
|
-
}
|
184
|
-
|
185
|
-
// TODO: is update available?
|
186
|
-
// @ts-ignore
|
187
|
-
<span class="cstat-no" title="statement not covered" > if (!isUpdateAvailable() || module.hot.status() !== 'idle') {</span>
|
188
|
-
<span class="cstat-no" title="statement not covered" > return;</span>
|
189
|
-
}
|
190
|
-
|
191
|
-
function <span class="fstat-no" title="function not covered" >handleApplyUpdates(</span>err: Error | null, updatedModules: any) {
|
192
|
-
<span class="cstat-no" title="statement not covered" > if (err || !updatedModules || window.g_getHadRuntimeError()) {</span>
|
193
|
-
<span class="cstat-no" title="statement not covered" > window.location.reload();</span>
|
194
|
-
<span class="cstat-no" title="statement not covered" > return;</span>
|
195
|
-
}
|
196
|
-
|
197
|
-
<span class="cstat-no" title="statement not covered" > onHotUpdateSuccess?.();</span>
|
198
|
-
|
199
|
-
<span class="cstat-no" title="statement not covered" > if (isUpdateAvailable()) {</span>
|
200
|
-
// While we were updating, there was a new update! Do it again.
|
201
|
-
<span class="cstat-no" title="statement not covered" > tryApplyUpdates();</span>
|
202
|
-
}
|
203
|
-
}
|
204
|
-
|
205
|
-
// @ts-ignore
|
206
|
-
<span class="cstat-no" title="statement not covered" > module.hot.check(true).then(</span>
|
207
|
-
<span class="fstat-no" title="function not covered" > fu</span>nction (updatedModules: any) {
|
208
|
-
<span class="cstat-no" title="statement not covered" > handleApplyUpdates(null, updatedModules);</span>
|
209
|
-
},
|
210
|
-
<span class="fstat-no" title="function not covered" > fu</span>nction (err: Error) {
|
211
|
-
<span class="cstat-no" title="statement not covered" > handleApplyUpdates(err, null);</span>
|
212
|
-
},
|
213
|
-
);
|
214
|
-
}
|
215
|
-
|
216
|
-
<span class="cstat-no" title="statement not covered" > window.g_initWebpackHotDevClient({</span>
|
217
|
-
tryApplyUpdates,
|
218
|
-
});
|
219
|
-
}
|
220
|
-
|
221
|
-
export const __mfsu = <span class="cstat-no" title="statement not covered" >1;</span>
|
222
|
-
</pre></td></tr></table></pre>
|
223
|
-
|
224
|
-
<div class='push'></div><!-- for sticky footer -->
|
225
|
-
</div><!-- /wrapper -->
|
226
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
227
|
-
Code coverage generated by
|
228
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
229
|
-
at 2024-01-24T02:49:50.075Z
|
230
|
-
</div>
|
231
|
-
<script src="../../../prettify.js"></script>
|
232
|
-
<script>
|
233
|
-
window.onload = function () {
|
234
|
-
prettyPrint();
|
235
|
-
};
|
236
|
-
</script>
|
237
|
-
<script src="../../../sorter.js"></script>
|
238
|
-
<script src="../../../block-navigation.js"></script>
|
239
|
-
</body>
|
240
|
-
</html>
|
241
|
-
|