@zat-design/sisyphus-react 3.7.1-beta.1 → 3.7.1-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.
- package/es/ProForm/components/combination/Group/utils.js +10 -2
- package/es/ProForm/components/render/Render.js +12 -23
- package/es/ProForm/components/render/RenderFields.js +3 -1
- package/es/ProForm/components/render/propsType.d.ts +2 -2
- package/es/ProForm/utils/getDefaultProps.d.ts +1 -0
- package/es/ProForm/utils/getDefaultProps.js +31 -0
- package/es/ProForm/utils/useRules.js +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +10 -2
- package/lib/ProForm/components/render/Render.js +12 -23
- package/lib/ProForm/components/render/RenderFields.js +3 -1
- package/lib/ProForm/components/render/propsType.d.ts +2 -2
- package/lib/ProForm/utils/getDefaultProps.d.ts +1 -0
- package/lib/ProForm/utils/getDefaultProps.js +37 -0
- package/lib/ProForm/utils/useRules.js +1 -1
- 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
|
@@ -188,11 +188,19 @@ export var useTransformColumns = function useTransformColumns(params) {
|
|
|
188
188
|
// 响应式字段改变后的回调
|
|
189
189
|
var changedCallback = function changedCallback(lastDependency, current) {
|
|
190
190
|
// 清值防抖 多次刷新时以最后一次为准
|
|
191
|
-
if (clearNotShow !== false
|
|
191
|
+
if (clearNotShow !== false) {
|
|
192
192
|
if ((current === null || current === void 0 ? void 0 : current.show) === false) {
|
|
193
193
|
clearInterval(timerRef.current[index]);
|
|
194
194
|
timerRef.current[index] = setTimeout(function () {
|
|
195
|
-
|
|
195
|
+
if (names) {
|
|
196
|
+
form.resetFields([columnName]);
|
|
197
|
+
} else {
|
|
198
|
+
var columnValue = form.getFieldValue(name);
|
|
199
|
+
if (columnValue === null || columnValue === void 0 ? void 0 : columnValue.length) {
|
|
200
|
+
columnValue[index] = null;
|
|
201
|
+
form.setFieldValue(columnName, _toConsumableArray(columnValue));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
196
204
|
}, 200);
|
|
197
205
|
} else {
|
|
198
206
|
clearInterval(timerRef.current[index]);
|
|
@@ -441,36 +441,25 @@ var Render = function Render(props) {
|
|
|
441
441
|
children: child
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
return _jsx(_Form.Item, _objectSpread(_objectSpread({}, omit(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
445
445
|
// @ts-ignore
|
|
446
446
|
_internalItemRender: internalItemRender,
|
|
447
447
|
className: _className,
|
|
448
448
|
children: child
|
|
449
449
|
}));
|
|
450
|
-
var formItem = orgFormItem;
|
|
451
|
-
// 当存在shouldUpdate时捕获所有form变更(防止表单onchange设置form值时无法更新的问题)
|
|
452
|
-
if (_otherFormItemProps.shouldUpdate) {
|
|
453
|
-
formItem =
|
|
454
|
-
// 空标签防止气泡不显示
|
|
455
|
-
_jsx(_Fragment, {
|
|
456
|
-
children: _jsx(_Form.Item, {
|
|
457
|
-
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
458
|
-
noStyle: true,
|
|
459
|
-
children: function children() {
|
|
460
|
-
return _jsx(_Form.Item, _objectSpread(_objectSpread({}, omit(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
461
|
-
// @ts-ignore
|
|
462
|
-
_internalItemRender: internalItemRender,
|
|
463
|
-
className: _className,
|
|
464
|
-
children: child
|
|
465
|
-
}));
|
|
466
|
-
}
|
|
467
|
-
})
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
return formItem;
|
|
471
450
|
};
|
|
472
451
|
var FormItem = _jsxs(_Fragment, {
|
|
473
|
-
children: [
|
|
452
|
+
children: [_otherFormItemProps.shouldUpdate ?
|
|
453
|
+
// 空标签防止气泡不显示
|
|
454
|
+
_jsx(_Fragment, {
|
|
455
|
+
children: _jsx(_Form.Item, {
|
|
456
|
+
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
457
|
+
noStyle: true,
|
|
458
|
+
children: function children() {
|
|
459
|
+
return renderItem();
|
|
460
|
+
}
|
|
461
|
+
})
|
|
462
|
+
}) : renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$names2 = otherProps.names) === null || _otherProps$names2 === void 0 ? void 0 : _otherProps$names2.length) ? otherProps.names.map(function (name) {
|
|
474
463
|
return _jsx(_Form.Item, {
|
|
475
464
|
hidden: true,
|
|
476
465
|
name: name,
|
|
@@ -5,6 +5,7 @@ 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';
|
|
7
7
|
import Render from './Render';
|
|
8
|
+
import { getDefaultProps } from '../../utils/getDefaultProps';
|
|
8
9
|
import * as componentMap from '../index';
|
|
9
10
|
import { isSelect } from '../../utils';
|
|
10
11
|
import { FieldProvider } from '../../utils/useFieldProps';
|
|
@@ -76,8 +77,9 @@ var RenderFields = function RenderFields(props) {
|
|
|
76
77
|
otherFormItemProps = _objectWithoutProperties(column, _excluded);
|
|
77
78
|
var component = column.component;
|
|
78
79
|
var _isView = typeof column.isView === 'boolean' ? column.isView : isView;
|
|
80
|
+
var defaultProps = getDefaultProps(column);
|
|
79
81
|
// 允许formItem的属性放在column最外层 并优先级高于 formItemProps 内部参数
|
|
80
|
-
var _formItemProps = _objectSpread(_objectSpread(_objectSpread({}, formItemProps), otherFormItemProps), {}, {
|
|
82
|
+
var _formItemProps = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, defaultProps), formItemProps), otherFormItemProps), {}, {
|
|
81
83
|
required: columnRequired !== null && columnRequired !== void 0 ? columnRequired : required,
|
|
82
84
|
clearNotShow: clearNotShow
|
|
83
85
|
});
|
|
@@ -34,11 +34,11 @@ import { DistributiveOmit } from '../../propsType';
|
|
|
34
34
|
export type ComponentMap = keyof typeof componentMap;
|
|
35
35
|
type ValidateKey = keyof typeof validate;
|
|
36
36
|
type RegExpKey = keyof typeof regExp;
|
|
37
|
-
interface ExtendType {
|
|
37
|
+
interface ExtendType extends Omit<RuleObject, 'type'> {
|
|
38
38
|
type?: ValidateKey | RegExpKey;
|
|
39
39
|
message?: string;
|
|
40
40
|
}
|
|
41
|
-
export type ProRule =
|
|
41
|
+
export type ProRule = ExtendType;
|
|
42
42
|
/**
|
|
43
43
|
* percent 百分比 permillage 千分比 amount 金额
|
|
44
44
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDefaultProps: (props: any) => any;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { get, isEqual } from 'lodash';
|
|
2
|
+
var defaultPropsMap = {
|
|
3
|
+
ProSelect: function ProSelect(props) {
|
|
4
|
+
var fieldProps = props.fieldProps,
|
|
5
|
+
name = props.name,
|
|
6
|
+
namePath = props.namePath;
|
|
7
|
+
var _ref = fieldProps || {},
|
|
8
|
+
filterInList = _ref.filterInList;
|
|
9
|
+
var defaultProps = {};
|
|
10
|
+
// formList场景传入列表过滤时
|
|
11
|
+
if (filterInList && namePath && name) {
|
|
12
|
+
var _listName = namePath.slice(0, -1);
|
|
13
|
+
var _namePath = name.slice(1);
|
|
14
|
+
defaultProps.shouldUpdate = function (preValues, curValues) {
|
|
15
|
+
var preListValue = get(preValues, _listName).map(function (item) {
|
|
16
|
+
return get(item, _namePath);
|
|
17
|
+
});
|
|
18
|
+
var curListValue = get(curValues, _listName).map(function (item) {
|
|
19
|
+
return get(item, _namePath);
|
|
20
|
+
});
|
|
21
|
+
return !isEqual(preListValue, curListValue);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return defaultProps;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export var getDefaultProps = function getDefaultProps(props) {
|
|
28
|
+
var _defaultPropsMap$type;
|
|
29
|
+
var type = props.type;
|
|
30
|
+
return (_defaultPropsMap$type = defaultPropsMap[type]) === null || _defaultPropsMap$type === void 0 ? void 0 : _defaultPropsMap$type.call(defaultPropsMap, props);
|
|
31
|
+
};
|
|
@@ -14,7 +14,7 @@ var useRules = function useRules(props) {
|
|
|
14
14
|
type = props.type;
|
|
15
15
|
var _label = isString(label) ? label : '';
|
|
16
16
|
var requiredRule = Array.isArray(rules) && (rules === null || rules === void 0 ? void 0 : rules.find(function (rule) {
|
|
17
|
-
return
|
|
17
|
+
return rule.required === true;
|
|
18
18
|
}));
|
|
19
19
|
var allRequired = required === true || Array.isArray(required) && required.every(function (item) {
|
|
20
20
|
return item === true;
|
|
@@ -195,11 +195,19 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
|
|
|
195
195
|
// 响应式字段改变后的回调
|
|
196
196
|
var changedCallback = function changedCallback(lastDependency, current) {
|
|
197
197
|
// 清值防抖 多次刷新时以最后一次为准
|
|
198
|
-
if (clearNotShow !== false
|
|
198
|
+
if (clearNotShow !== false) {
|
|
199
199
|
if ((current === null || current === void 0 ? void 0 : current.show) === false) {
|
|
200
200
|
clearInterval(timerRef.current[index]);
|
|
201
201
|
timerRef.current[index] = setTimeout(function () {
|
|
202
|
-
|
|
202
|
+
if (names) {
|
|
203
|
+
form.resetFields([columnName]);
|
|
204
|
+
} else {
|
|
205
|
+
var columnValue = form.getFieldValue(name);
|
|
206
|
+
if (columnValue === null || columnValue === void 0 ? void 0 : columnValue.length) {
|
|
207
|
+
columnValue[index] = null;
|
|
208
|
+
form.setFieldValue(columnName, (0, _toConsumableArray2.default)(columnValue));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
203
211
|
}, 200);
|
|
204
212
|
} else {
|
|
205
213
|
clearInterval(timerRef.current[index]);
|
|
@@ -441,36 +441,25 @@ var Render = function Render(props) {
|
|
|
441
441
|
children: child
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
return (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
445
445
|
// @ts-ignore
|
|
446
446
|
_internalItemRender: internalItemRender,
|
|
447
447
|
className: _className,
|
|
448
448
|
children: child
|
|
449
449
|
}));
|
|
450
|
-
var formItem = orgFormItem;
|
|
451
|
-
// 当存在shouldUpdate时捕获所有form变更(防止表单onchange设置form值时无法更新的问题)
|
|
452
|
-
if (_otherFormItemProps.shouldUpdate) {
|
|
453
|
-
formItem =
|
|
454
|
-
// 空标签防止气泡不显示
|
|
455
|
-
(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
456
|
-
children: (0, _jsxRuntime.jsx)(_antd.Form.Item, {
|
|
457
|
-
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
458
|
-
noStyle: true,
|
|
459
|
-
children: function children() {
|
|
460
|
-
return (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
461
|
-
// @ts-ignore
|
|
462
|
-
_internalItemRender: internalItemRender,
|
|
463
|
-
className: _className,
|
|
464
|
-
children: child
|
|
465
|
-
}));
|
|
466
|
-
}
|
|
467
|
-
})
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
return formItem;
|
|
471
450
|
};
|
|
472
451
|
var FormItem = (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
473
|
-
children: [
|
|
452
|
+
children: [_otherFormItemProps.shouldUpdate ?
|
|
453
|
+
// 空标签防止气泡不显示
|
|
454
|
+
(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
455
|
+
children: (0, _jsxRuntime.jsx)(_antd.Form.Item, {
|
|
456
|
+
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
457
|
+
noStyle: true,
|
|
458
|
+
children: function children() {
|
|
459
|
+
return renderItem();
|
|
460
|
+
}
|
|
461
|
+
})
|
|
462
|
+
}) : renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$names2 = otherProps.names) === null || _otherProps$names2 === void 0 ? void 0 : _otherProps$names2.length) ? otherProps.names.map(function (name) {
|
|
474
463
|
return (0, _jsxRuntime.jsx)(_antd.Form.Item, {
|
|
475
464
|
hidden: true,
|
|
476
465
|
name: name,
|
|
@@ -12,6 +12,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _lodash = require("lodash");
|
|
14
14
|
var _Render = _interopRequireDefault(require("./Render"));
|
|
15
|
+
var _getDefaultProps = require("../../utils/getDefaultProps");
|
|
15
16
|
var componentMap = _interopRequireWildcard(require("../index"));
|
|
16
17
|
var _utils = require("../../utils");
|
|
17
18
|
var _useFieldProps = require("../../utils/useFieldProps");
|
|
@@ -84,8 +85,9 @@ var RenderFields = function RenderFields(props) {
|
|
|
84
85
|
otherFormItemProps = (0, _objectWithoutProperties2.default)(column, _excluded);
|
|
85
86
|
var component = column.component;
|
|
86
87
|
var _isView = typeof column.isView === 'boolean' ? column.isView : isView;
|
|
88
|
+
var defaultProps = (0, _getDefaultProps.getDefaultProps)(column);
|
|
87
89
|
// 允许formItem的属性放在column最外层 并优先级高于 formItemProps 内部参数
|
|
88
|
-
var _formItemProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, formItemProps), otherFormItemProps), {}, {
|
|
90
|
+
var _formItemProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultProps), formItemProps), otherFormItemProps), {}, {
|
|
89
91
|
required: columnRequired !== null && columnRequired !== void 0 ? columnRequired : required,
|
|
90
92
|
clearNotShow: clearNotShow
|
|
91
93
|
});
|
|
@@ -34,11 +34,11 @@ import { DistributiveOmit } from '../../propsType';
|
|
|
34
34
|
export type ComponentMap = keyof typeof componentMap;
|
|
35
35
|
type ValidateKey = keyof typeof validate;
|
|
36
36
|
type RegExpKey = keyof typeof regExp;
|
|
37
|
-
interface ExtendType {
|
|
37
|
+
interface ExtendType extends Omit<RuleObject, 'type'> {
|
|
38
38
|
type?: ValidateKey | RegExpKey;
|
|
39
39
|
message?: string;
|
|
40
40
|
}
|
|
41
|
-
export type ProRule =
|
|
41
|
+
export type ProRule = ExtendType;
|
|
42
42
|
/**
|
|
43
43
|
* percent 百分比 permillage 千分比 amount 金额
|
|
44
44
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDefaultProps: (props: any) => any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultProps = void 0;
|
|
7
|
+
var _lodash = require("lodash");
|
|
8
|
+
var defaultPropsMap = {
|
|
9
|
+
ProSelect: function ProSelect(props) {
|
|
10
|
+
var fieldProps = props.fieldProps,
|
|
11
|
+
name = props.name,
|
|
12
|
+
namePath = props.namePath;
|
|
13
|
+
var _ref = fieldProps || {},
|
|
14
|
+
filterInList = _ref.filterInList;
|
|
15
|
+
var defaultProps = {};
|
|
16
|
+
// formList场景传入列表过滤时
|
|
17
|
+
if (filterInList && namePath && name) {
|
|
18
|
+
var _listName = namePath.slice(0, -1);
|
|
19
|
+
var _namePath = name.slice(1);
|
|
20
|
+
defaultProps.shouldUpdate = function (preValues, curValues) {
|
|
21
|
+
var preListValue = (0, _lodash.get)(preValues, _listName).map(function (item) {
|
|
22
|
+
return (0, _lodash.get)(item, _namePath);
|
|
23
|
+
});
|
|
24
|
+
var curListValue = (0, _lodash.get)(curValues, _listName).map(function (item) {
|
|
25
|
+
return (0, _lodash.get)(item, _namePath);
|
|
26
|
+
});
|
|
27
|
+
return !(0, _lodash.isEqual)(preListValue, curListValue);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return defaultProps;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var getDefaultProps = exports.getDefaultProps = function getDefaultProps(props) {
|
|
34
|
+
var _defaultPropsMap$type;
|
|
35
|
+
var type = props.type;
|
|
36
|
+
return (_defaultPropsMap$type = defaultPropsMap[type]) === null || _defaultPropsMap$type === void 0 ? void 0 : _defaultPropsMap$type.call(defaultPropsMap, props);
|
|
37
|
+
};
|
|
@@ -21,7 +21,7 @@ var useRules = function useRules(props) {
|
|
|
21
21
|
type = props.type;
|
|
22
22
|
var _label = (0, _lodash.isString)(label) ? label : '';
|
|
23
23
|
var requiredRule = Array.isArray(rules) && (rules === null || rules === void 0 ? void 0 : rules.find(function (rule) {
|
|
24
|
-
return
|
|
24
|
+
return rule.required === true;
|
|
25
25
|
}));
|
|
26
26
|
var allRequired = required === true || Array.isArray(required) && required.every(function (item) {
|
|
27
27
|
return item === true;
|
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
|
-
|