ztxkui 3.0.4 → 3.0.6-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DemoCom/BasicDemo.js +9 -2
- package/dist/DemoCom/TableDemo.js +19 -6
- package/dist/components/InputNumber/input-number.js +2 -2
- package/dist/components/Table/table-enhance-cell.js +9 -1
- package/dist/components/business/Common/UserPassword/index.d.ts +1 -0
- package/dist/components/business/Common/UserPassword/index.js +24 -5
- package/dist/hooks/useFormatter.d.ts +5 -0
- package/dist/hooks/useFormatter.js +42 -1
- package/package.json +93 -93
|
@@ -2,6 +2,7 @@ import InputNumber from 'components/InputNumber';
|
|
|
2
2
|
import Tag from 'components/Tag';
|
|
3
3
|
import Input from 'components/Input';
|
|
4
4
|
import { FormList, RangePicker, Button } from '../index';
|
|
5
|
+
import { InputNumber as AntInputNumber } from 'antd';
|
|
5
6
|
import GridList from 'components/business/NewList';
|
|
6
7
|
import { useState } from 'react';
|
|
7
8
|
import './style.scss';
|
|
@@ -53,9 +54,15 @@ function BasicDemo() {
|
|
|
53
54
|
]), rangeValue = _b[0], setRangeValue = _b[1];
|
|
54
55
|
return (React.createElement(React.Fragment, null,
|
|
55
56
|
React.createElement(InputNumber, { value: value, onChange: function (value) {
|
|
56
|
-
console.log(value);
|
|
57
|
+
console.log(value, 1);
|
|
57
58
|
setValue(value);
|
|
58
|
-
},
|
|
59
|
+
}, precision: 4, formatterType: "currency", style: { width: '300px' } }),
|
|
60
|
+
React.createElement(AntInputNumber, { value: value, onChange: function (value) {
|
|
61
|
+
console.log(value, 1);
|
|
62
|
+
setValue(value);
|
|
63
|
+
}, formatter: function (value) {
|
|
64
|
+
return ("$ " + value).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
65
|
+
}, parser: function (value) { return value.replace(/\$\s?|(,*)/g, ''); }, style: { width: '300px' } }),
|
|
59
66
|
React.createElement("div", null,
|
|
60
67
|
React.createElement(Tag, null, "\u4F60\u597D"),
|
|
61
68
|
React.createElement(Tag, { type: "normal" }, "\u4F60\u597D"),
|
|
@@ -435,14 +435,15 @@ var list1 = [
|
|
|
435
435
|
var TableDemo = function () {
|
|
436
436
|
var _a = useGetTableRecords(), records = _a.records, setRecords = _a.setRecords;
|
|
437
437
|
var _b = useGetSelectList(), list = _b.list, loading = _b.loading, setLoading = _b.setLoading;
|
|
438
|
+
var _c = useState(false), btnLoading = _c[0], setBtnLoading = _c[1];
|
|
438
439
|
// 表格数据引用
|
|
439
440
|
var recordsRef = useRef([]);
|
|
440
441
|
// 初始化渲染,针对配置了editable、editableConfig的列配置
|
|
441
|
-
var
|
|
442
|
+
var _d = useState(false), firstRender = _d[0], setFirstRender = _d[1];
|
|
442
443
|
// 新增删除行改变
|
|
443
|
-
var
|
|
444
|
+
var _e = useState(false), lengthChange = _e[0], setLengthChange = _e[1];
|
|
444
445
|
// 表格行拖拽改变
|
|
445
|
-
var
|
|
446
|
+
var _f = useState(false), moveChange = _f[0], setMoveChange = _f[1];
|
|
446
447
|
useEffect(function () {
|
|
447
448
|
setFirstRender(true);
|
|
448
449
|
}, []);
|
|
@@ -580,12 +581,21 @@ var TableDemo = function () {
|
|
|
580
581
|
return "\u7B2C" + (index + 1) + "\u884C\uFF0C\u8D85\u51FA\u6700\u5927\u503C\uFF0C\u5DF2\u4FEE\u6539\u6210\u6700\u5927\u503C";
|
|
581
582
|
},
|
|
582
583
|
maxHandle: function (record) {
|
|
583
|
-
return
|
|
584
|
+
return 10000;
|
|
584
585
|
},
|
|
585
586
|
lowMinTip: function (record, index) {
|
|
586
587
|
return "\u7B2C" + (index + 1) + "\u884C\uFF0C\u4F4E\u4E8E\u6700\u5C0F\u503C\uFF0C\u5DF2\u4FEE\u6539\u6210\u6700\u5C0F\u503C";
|
|
587
588
|
},
|
|
588
589
|
precision: 3,
|
|
590
|
+
formatterType: 'currency',
|
|
591
|
+
onBlur: function () {
|
|
592
|
+
setBtnLoading(false);
|
|
593
|
+
console.log('失去焦点了');
|
|
594
|
+
},
|
|
595
|
+
onFocus: function () {
|
|
596
|
+
setBtnLoading(true);
|
|
597
|
+
console.log('获得焦点了');
|
|
598
|
+
},
|
|
589
599
|
},
|
|
590
600
|
},
|
|
591
601
|
{
|
|
@@ -714,7 +724,7 @@ var TableDemo = function () {
|
|
|
714
724
|
},
|
|
715
725
|
];
|
|
716
726
|
// 本地偏好设置相关
|
|
717
|
-
var
|
|
727
|
+
var _g = useState(getStorage('test-table') || []), tableLayout = _g[0], setTableLayout = _g[1];
|
|
718
728
|
var onDynamicChange = useCallback(function (tableLayout) {
|
|
719
729
|
// 剔除调一些可能不可序列化的字段,只保留关键数据
|
|
720
730
|
var newTableLayout = tableLayout.map(function (item) { return ({
|
|
@@ -789,7 +799,10 @@ var TableDemo = function () {
|
|
|
789
799
|
// 表格行拖拽
|
|
790
800
|
onMoveRow: onMoveRowHandle }),
|
|
791
801
|
React.createElement("div", null,
|
|
792
|
-
React.createElement("button", { onClick: function () { return console.log(records); } }, "\u83B7\u53D6\u6570\u636E")
|
|
802
|
+
React.createElement("button", { onClick: function () { return console.log(records); } }, "\u83B7\u53D6\u6570\u636E"),
|
|
803
|
+
React.createElement(Button, { loading: btnLoading, onClick: function () {
|
|
804
|
+
console.log(111);
|
|
805
|
+
} }, "\u70B9\u51FB")),
|
|
793
806
|
React.createElement(Empty, null)));
|
|
794
807
|
};
|
|
795
808
|
function getStorage(key) {
|
|
@@ -23,11 +23,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import React, { useRef } from 'react';
|
|
24
24
|
import { InputNumber as AntInputNumber } from 'antd';
|
|
25
25
|
import { message } from '../../index';
|
|
26
|
-
import
|
|
26
|
+
import { getFormatter, } from '../../hooks/useFormatter';
|
|
27
27
|
function InputNumber(props) {
|
|
28
28
|
var formatterType = props.formatterType, currencySymbol = props.currencySymbol, formatter = props.formatter, parser = props.parser, precision = props.precision, max = props.max, min = props.min, onChange = props.onChange, onBlur = props.onBlur, onPressEnter = props.onPressEnter, onOverRange = props.onOverRange, overMaxTip = props.overMaxTip, lowMinTip = props.lowMinTip, restProps = __rest(props, ["formatterType", "currencySymbol", "formatter", "parser", "precision", "max", "min", "onChange", "onBlur", "onPressEnter", "onOverRange", "overMaxTip", "lowMinTip"]);
|
|
29
29
|
var selfValue = useRef();
|
|
30
|
-
var _a =
|
|
30
|
+
var _a = getFormatter(formatterType, currencySymbol), _formatter = _a.formatter, _parser = _a.parser, _precision = _a.precision;
|
|
31
31
|
var onChangeHandle = function (value) {
|
|
32
32
|
selfValue.current = value;
|
|
33
33
|
onChange && onChange(value);
|
|
@@ -180,7 +180,15 @@ var TableEnhanceCell = memo(function (_a) {
|
|
|
180
180
|
}
|
|
181
181
|
else if (type === 'inputNumber') {
|
|
182
182
|
return (React.createElement(Form.Item, { className: "zt-table__enhance-cell", name: dataIndex },
|
|
183
|
-
React.createElement(InputNumber, __assign({ autoComplete: "new-password", maxLength: 50 }, inputNumMaxMin, editableProps, inputNumberRangeTip, { disabled: disabledResult, onPressEnter: function () {
|
|
183
|
+
React.createElement(InputNumber, __assign({ autoComplete: "new-password", maxLength: 50 }, inputNumMaxMin, editableProps, inputNumberRangeTip, { disabled: disabledResult, onPressEnter: function (e) {
|
|
184
|
+
editableProps.onPressEnter && editableProps.onPressEnter(e);
|
|
185
|
+
save({ maxResult: maxResult, minResult: minResult });
|
|
186
|
+
}, onBlur: function (e) {
|
|
187
|
+
editableProps.onBlur && editableProps.onBlur(e);
|
|
188
|
+
save({ maxResult: maxResult, minResult: minResult });
|
|
189
|
+
}, onFocus: function (e) {
|
|
190
|
+
editableProps.onFocus(e);
|
|
191
|
+
} }))));
|
|
184
192
|
}
|
|
185
193
|
else if (type === 'textArea') {
|
|
186
194
|
return (React.createElement(Form.Item, { className: "zt-table__enhance-cell", name: dataIndex },
|
|
@@ -45,14 +45,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
import React, { useCallback, useState } from 'react';
|
|
48
|
+
import React, { useCallback, useState, useMemo } from 'react';
|
|
49
49
|
import { Container, Form, SearchContainer, Input, message, Modal, Button, } from '../../../../index';
|
|
50
50
|
import { validate, commonMessage } from 'ztxkutils/dist/validate';
|
|
51
51
|
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
52
52
|
var Making = function (_a) {
|
|
53
|
-
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle;
|
|
53
|
+
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle, empSource = _a.empSource;
|
|
54
54
|
var form = Form.useForm()[0];
|
|
55
55
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
56
|
+
var isOutSource = useMemo(function () {
|
|
57
|
+
if (empSource && empSource + '' === '2') {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}, [empSource]);
|
|
56
62
|
/**提交验证 */
|
|
57
63
|
var vallidateFn = useCallback(function (callback) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
64
|
var err_1, errorFields;
|
|
@@ -84,10 +90,15 @@ var Making = function (_a) {
|
|
|
84
90
|
setLoading(true);
|
|
85
91
|
var params = form.getFieldsValue();
|
|
86
92
|
var submitParams = {
|
|
93
|
+
empSource: empSource,
|
|
87
94
|
oldPassword: encryptionHandle(params === null || params === void 0 ? void 0 : params.oldPassword),
|
|
88
95
|
newPassword: encryptionHandle(params === null || params === void 0 ? void 0 : params.newPassword),
|
|
89
96
|
newPassword1: encryptionHandle(params === null || params === void 0 ? void 0 : params.newPassword1),
|
|
90
97
|
};
|
|
98
|
+
// 外部用户 不需要旧密码
|
|
99
|
+
if (isOutSource) {
|
|
100
|
+
Reflect.deleteProperty(submitParams, 'oldPassword');
|
|
101
|
+
}
|
|
91
102
|
request(setUserPasswordOption
|
|
92
103
|
? __assign(__assign({}, setUserPasswordOption), { data: __assign(__assign({}, setUserPasswordOption.data), submitParams) }) : {
|
|
93
104
|
url: '/api/zmdms-user/update-password',
|
|
@@ -111,7 +122,15 @@ var Making = function (_a) {
|
|
|
111
122
|
setLoading(false);
|
|
112
123
|
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '密码修改失败!');
|
|
113
124
|
});
|
|
114
|
-
}, [
|
|
125
|
+
}, [
|
|
126
|
+
form,
|
|
127
|
+
encryptionHandle,
|
|
128
|
+
request,
|
|
129
|
+
setUserPasswordOption,
|
|
130
|
+
setUserPassword,
|
|
131
|
+
empSource,
|
|
132
|
+
isOutSource,
|
|
133
|
+
]);
|
|
115
134
|
var onSaveHandle = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
116
135
|
return __generator(this, function (_a) {
|
|
117
136
|
vallidateFn(function () {
|
|
@@ -128,9 +147,9 @@ var Making = function (_a) {
|
|
|
128
147
|
React.createElement(Form, { name: "user-password-making", form: form },
|
|
129
148
|
React.createElement(SearchContainer, { dark: true },
|
|
130
149
|
React.createElement(SearchLeft, null,
|
|
131
|
-
React.createElement("div", { style: { width: '100%' } },
|
|
150
|
+
isOutSource ? null : (React.createElement("div", { style: { width: '100%' } },
|
|
132
151
|
React.createElement(Item, { name: "oldPassword", label: "\u539F\u5BC6\u7801", rules: [{ required: true, message: '请输入原密码' }] },
|
|
133
|
-
React.createElement(Input, { autoComplete: "new-password"
|
|
152
|
+
React.createElement(Input.Password, { autoComplete: "new-password" })))),
|
|
134
153
|
React.createElement("div", { style: { width: '100%', display: 'flex' } },
|
|
135
154
|
React.createElement(Item, { name: "newPassword", label: "\u65B0\u5BC6\u7801", rules: [
|
|
136
155
|
{ required: true, message: '请输入新密码' },
|
|
@@ -16,4 +16,9 @@ declare function useFormatter(formatterType: IFormatterType | undefined, currenc
|
|
|
16
16
|
parser: IParserFuc;
|
|
17
17
|
precision: number;
|
|
18
18
|
};
|
|
19
|
+
export declare function getFormatter(formatterType: IFormatterType | undefined, currencySymbol?: ICurrencySymbol): {
|
|
20
|
+
formatter: IFormatterFuc;
|
|
21
|
+
parser: IParserFuc;
|
|
22
|
+
precision: number;
|
|
23
|
+
};
|
|
19
24
|
export default useFormatter;
|
|
@@ -20,7 +20,7 @@ function useFormatter(formatterType, currencySymbol) {
|
|
|
20
20
|
// /\$\s?|(,*)/g
|
|
21
21
|
return value
|
|
22
22
|
? // eslint-disable-next-line no-eval
|
|
23
|
-
value.replace(eval("
|
|
23
|
+
value.replace(eval("/${currencySymbol}\\s?|(,*)/g"), '')
|
|
24
24
|
: Number(value);
|
|
25
25
|
};
|
|
26
26
|
setFormatter(function () {
|
|
@@ -64,4 +64,45 @@ function useFormatter(formatterType, currencySymbol) {
|
|
|
64
64
|
precision: precision,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
+
export function getFormatter(formatterType, currencySymbol) {
|
|
68
|
+
if (currencySymbol === void 0) { currencySymbol = '$'; }
|
|
69
|
+
if (formatterType === 'currency') {
|
|
70
|
+
var formatterFn = function (value) {
|
|
71
|
+
return ("" + value).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
72
|
+
};
|
|
73
|
+
var parserFn = function (value) { return value.replace(/(,*)/g, ''); };
|
|
74
|
+
return {
|
|
75
|
+
formatter: formatterFn,
|
|
76
|
+
parser: parserFn,
|
|
77
|
+
precision: MONEY_PRECISION,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (formatterType === 'percent') {
|
|
81
|
+
var formatterFn = function (value) { return value + "%"; };
|
|
82
|
+
var parserFn = function (value) {
|
|
83
|
+
return value ? value.replace('%', '') : Number(value);
|
|
84
|
+
};
|
|
85
|
+
return {
|
|
86
|
+
formatter: formatterFn,
|
|
87
|
+
parser: parserFn,
|
|
88
|
+
precision: QUANTITY_PRECISION,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (formatterType === 'thousands') {
|
|
92
|
+
var formatterFn = function (value) { return value + "\u2030"; };
|
|
93
|
+
var parserFn = function (value) {
|
|
94
|
+
return value ? value.replace('‰', '') : Number(value);
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
formatter: formatterFn,
|
|
98
|
+
parser: parserFn,
|
|
99
|
+
precision: QUANTITY_PRECISION,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
formatter: undefined,
|
|
104
|
+
parser: undefined,
|
|
105
|
+
precision: undefined,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
67
108
|
export default useFormatter;
|
package/package.json
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ztxkui",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "React components library",
|
|
6
|
-
"author": "zt-front-end",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"files": [
|
|
12
|
-
"dist"
|
|
13
|
-
],
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"antd": "^4.16.8",
|
|
16
|
-
"axios": "^0.21.1",
|
|
17
|
-
"classnames": "^2.2.6",
|
|
18
|
-
"dayjs": "^1.10.4",
|
|
19
|
-
"immutability-helper": "^3.1.1",
|
|
20
|
-
"number-precision": "^1.5.0",
|
|
21
|
-
"react-dnd": "^14.0.2",
|
|
22
|
-
"react-dnd-html5-backend": "^14.0.0",
|
|
23
|
-
"react-to-print": "^2.14.7",
|
|
24
|
-
"ztxkutils": "^2.6.2"
|
|
25
|
-
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"analyze": "source-map-explorer 'dist/static/js/*.js'",
|
|
28
|
-
"lint": "eslint --ext js,ts,tsx src",
|
|
29
|
-
"clean": "rimraf ./dist",
|
|
30
|
-
"start": "react-scripts start",
|
|
31
|
-
"build": "react-scripts build",
|
|
32
|
-
"build-lib": "npm run clean & npm run build-ts & npm run build-css",
|
|
33
|
-
"test": "react-scripts test",
|
|
34
|
-
"eject": "react-scripts eject",
|
|
35
|
-
"build-ts": "tsc -p tsconfig.build.json",
|
|
36
|
-
"build-css": "sass ./src/styles/index.scss ./dist/index.css",
|
|
37
|
-
"storybook": "start-storybook -p 6006 -s public",
|
|
38
|
-
"build-storybook": "build-storybook -s public",
|
|
39
|
-
"prepublish": "npm run build-lib"
|
|
40
|
-
},
|
|
41
|
-
"browserslist": {
|
|
42
|
-
"production": [
|
|
43
|
-
">0.2%",
|
|
44
|
-
"not dead",
|
|
45
|
-
"not op_mini all"
|
|
46
|
-
],
|
|
47
|
-
"development": [
|
|
48
|
-
"last 1 chrome version",
|
|
49
|
-
"last 1 firefox version",
|
|
50
|
-
"last 1 safari version"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@storybook/addon-actions": "^6.1.20",
|
|
55
|
-
"@storybook/addon-essentials": "^6.1.20",
|
|
56
|
-
"@storybook/addon-links": "^6.1.20",
|
|
57
|
-
"@storybook/node-logger": "^6.1.20",
|
|
58
|
-
"@storybook/preset-create-react-app": "^3.1.6",
|
|
59
|
-
"@storybook/react": "^6.1.20",
|
|
60
|
-
"@testing-library/jest-dom": "^5.11.4",
|
|
61
|
-
"@testing-library/react": "^11.1.0",
|
|
62
|
-
"@testing-library/user-event": "^12.1.10",
|
|
63
|
-
"@types/classnames": "^2.2.11",
|
|
64
|
-
"@types/jest": "^26.0.15",
|
|
65
|
-
"@types/lodash": "^4.14.172",
|
|
66
|
-
"@types/node": "^12.0.0",
|
|
67
|
-
"@types/react": "^17.0.0",
|
|
68
|
-
"@types/react-dom": "^17.0.0",
|
|
69
|
-
"@types/react-router-dom": "^5.1.8",
|
|
70
|
-
"eslint-config-prettier": "^8.0.0",
|
|
71
|
-
"eslint-plugin-prettier": "^3.3.1",
|
|
72
|
-
"html2canvas": "^1.4.1",
|
|
73
|
-
"js-base64": "^3.6.1",
|
|
74
|
-
"jspdf": "^2.5.1",
|
|
75
|
-
"prettier": "^2.2.1",
|
|
76
|
-
"react": "^17.0.1",
|
|
77
|
-
"react-dom": "^17.0.1",
|
|
78
|
-
"react-router-dom": "^5.3.0",
|
|
79
|
-
"react-scripts": "4.0.3",
|
|
80
|
-
"rimraf": "^3.0.2",
|
|
81
|
-
"sass": "^1.32.8",
|
|
82
|
-
"source-map-explorer": "^2.5.2",
|
|
83
|
-
"typescript": "^4.1.2",
|
|
84
|
-
"web-vitals": "^1.0.1"
|
|
85
|
-
},
|
|
86
|
-
"peerDependencies": {
|
|
87
|
-
"axios": ">=0.21.1",
|
|
88
|
-
"js-base64": ">=3.6.0",
|
|
89
|
-
"lodash": ">=4.17.21",
|
|
90
|
-
"react": ">=16.9.0",
|
|
91
|
-
"react-dom": ">=16.9.0",
|
|
92
|
-
"ztxkutils": ">=2.1.1"
|
|
93
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ztxkui",
|
|
3
|
+
"version": "3.0.6-1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "React components library",
|
|
6
|
+
"author": "zt-front-end",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"antd": "^4.16.8",
|
|
16
|
+
"axios": "^0.21.1",
|
|
17
|
+
"classnames": "^2.2.6",
|
|
18
|
+
"dayjs": "^1.10.4",
|
|
19
|
+
"immutability-helper": "^3.1.1",
|
|
20
|
+
"number-precision": "^1.5.0",
|
|
21
|
+
"react-dnd": "^14.0.2",
|
|
22
|
+
"react-dnd-html5-backend": "^14.0.0",
|
|
23
|
+
"react-to-print": "^2.14.7",
|
|
24
|
+
"ztxkutils": "^2.6.2"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"analyze": "source-map-explorer 'dist/static/js/*.js'",
|
|
28
|
+
"lint": "eslint --ext js,ts,tsx src",
|
|
29
|
+
"clean": "rimraf ./dist",
|
|
30
|
+
"start": "react-scripts start",
|
|
31
|
+
"build": "react-scripts build",
|
|
32
|
+
"build-lib": "npm run clean & npm run build-ts & npm run build-css",
|
|
33
|
+
"test": "react-scripts test",
|
|
34
|
+
"eject": "react-scripts eject",
|
|
35
|
+
"build-ts": "tsc -p tsconfig.build.json",
|
|
36
|
+
"build-css": "sass ./src/styles/index.scss ./dist/index.css",
|
|
37
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
38
|
+
"build-storybook": "build-storybook -s public",
|
|
39
|
+
"prepublish": "npm run build-lib"
|
|
40
|
+
},
|
|
41
|
+
"browserslist": {
|
|
42
|
+
"production": [
|
|
43
|
+
">0.2%",
|
|
44
|
+
"not dead",
|
|
45
|
+
"not op_mini all"
|
|
46
|
+
],
|
|
47
|
+
"development": [
|
|
48
|
+
"last 1 chrome version",
|
|
49
|
+
"last 1 firefox version",
|
|
50
|
+
"last 1 safari version"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@storybook/addon-actions": "^6.1.20",
|
|
55
|
+
"@storybook/addon-essentials": "^6.1.20",
|
|
56
|
+
"@storybook/addon-links": "^6.1.20",
|
|
57
|
+
"@storybook/node-logger": "^6.1.20",
|
|
58
|
+
"@storybook/preset-create-react-app": "^3.1.6",
|
|
59
|
+
"@storybook/react": "^6.1.20",
|
|
60
|
+
"@testing-library/jest-dom": "^5.11.4",
|
|
61
|
+
"@testing-library/react": "^11.1.0",
|
|
62
|
+
"@testing-library/user-event": "^12.1.10",
|
|
63
|
+
"@types/classnames": "^2.2.11",
|
|
64
|
+
"@types/jest": "^26.0.15",
|
|
65
|
+
"@types/lodash": "^4.14.172",
|
|
66
|
+
"@types/node": "^12.0.0",
|
|
67
|
+
"@types/react": "^17.0.0",
|
|
68
|
+
"@types/react-dom": "^17.0.0",
|
|
69
|
+
"@types/react-router-dom": "^5.1.8",
|
|
70
|
+
"eslint-config-prettier": "^8.0.0",
|
|
71
|
+
"eslint-plugin-prettier": "^3.3.1",
|
|
72
|
+
"html2canvas": "^1.4.1",
|
|
73
|
+
"js-base64": "^3.6.1",
|
|
74
|
+
"jspdf": "^2.5.1",
|
|
75
|
+
"prettier": "^2.2.1",
|
|
76
|
+
"react": "^17.0.1",
|
|
77
|
+
"react-dom": "^17.0.1",
|
|
78
|
+
"react-router-dom": "^5.3.0",
|
|
79
|
+
"react-scripts": "4.0.3",
|
|
80
|
+
"rimraf": "^3.0.2",
|
|
81
|
+
"sass": "^1.32.8",
|
|
82
|
+
"source-map-explorer": "^2.5.2",
|
|
83
|
+
"typescript": "^4.1.2",
|
|
84
|
+
"web-vitals": "^1.0.1"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"axios": ">=0.21.1",
|
|
88
|
+
"js-base64": ">=3.6.0",
|
|
89
|
+
"lodash": ">=4.17.21",
|
|
90
|
+
"react": ">=16.9.0",
|
|
91
|
+
"react-dom": ">=16.9.0",
|
|
92
|
+
"ztxkutils": ">=2.1.1"
|
|
93
|
+
}
|
|
94
94
|
}
|