orion-design 0.1.0 → 0.1.2
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/components/Flex/Col.d.ts +25 -0
- package/dist/components/Flex/Item.d.ts +25 -0
- package/dist/components/Flex/Row.d.ts +25 -0
- package/dist/components/Flex/index.d.ts +10 -0
- package/dist/components/Flex/index.js +151 -0
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/Space/index.d.ts +76 -0
- package/dist/components/_util/classNames.d.ts +2 -0
- package/dist/components/_util/classNames.js +31 -0
- package/dist/components/_util/isValid.d.ts +2 -0
- package/dist/components/_util/isValid.js +5 -0
- package/dist/components/_util/props-util/index.d.ts +6 -0
- package/dist/components/_util/props-util/index.js +53 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +6 -0
- package/dist/components/_util/props-util/initDefaultProps.js +25 -0
- package/dist/components/_util/type.d.ts +62 -0
- package/dist/components/_util/type.js +66 -0
- package/dist/components/_util/util.d.ts +18 -0
- package/dist/components/_util/util.js +83 -0
- package/dist/components/_util/vue-types/index.d.ts +12 -0
- package/dist/components/_util/vue-types/index.js +473 -0
- package/dist/components/components.d.ts +4 -0
- package/dist/components/components.js +10 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +23 -0
- package/dist/components-O4L3qYfM.js +61 -0
- package/dist/error/OrionError.js +9 -7
- package/dist/index.css +44 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +12 -3
- package/dist/print/LodopFuncs.js +109 -140
- package/dist/print/index.js +204 -199
- package/dist/request/ErrorHandlerChain.js +13 -13
- package/dist/request/RequestFilterChain.js +13 -13
- package/dist/request/ResponseParserChain.js +13 -13
- package/dist/request/disivion/DateSerializer.js +44 -53
- package/dist/request/disivion/DivisionErrorHandler.js +42 -42
- package/dist/request/disivion/DivisionResponseParser.js +22 -18
- package/dist/request/disivion/index.d.ts +21 -1
- package/dist/request/disivion/index.js +493 -24
- package/dist/request/error/BizExceptionResponseError.js +10 -10
- package/dist/request/error/ExceptionResponseError.js +10 -10
- package/dist/request/error/ResponseError.js +11 -9
- package/dist/request/error/SessionExceptionResponseError.js +10 -10
- package/dist/request/index.d.ts +3 -0
- package/dist/request/index.js +9 -20
- package/dist/style/index.d.ts +3 -0
- package/dist/style/index.js +1 -0
- package/dist/utils/DateUtil.js +47 -52
- package/dist/utils/NumberUtil.js +5 -5
- package/dist/utils/cloneDeep.js +1 -2255
- package/dist/utils/delay.js +1 -1
- package/dist/utils/index.js +3 -4
- package/dist/utils/md5.js +218 -272
- package/dist/version/index.d.ts +2 -0
- package/dist/version/index.js +6 -0
- package/dist/version/version.d.ts +2 -0
- package/dist/version/version.js +3 -0
- package/global.d.ts +9 -0
- package/package.json +28 -10
- package/dist/_commonjsHelpers-BFTU3MAI.js +0 -7
- package/dist/bignumber-upqAL281.js +0 -2907
- package/dist/dayjs.min-CYqA_arp.js +0 -12
- package/dist/request/disivion/request.d.ts +0 -21
- package/dist/request/disivion/request.js +0 -19345
- package/dist/request/postByOpenNewWindow.d.ts +0 -1
- package/dist/request/postByOpenNewWindow.js +0 -41
@@ -1,17 +1,17 @@
|
|
1
1
|
import ResponseError from './ResponseError.js';
|
2
2
|
|
3
3
|
class BizExceptionResponseError extends ResponseError {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
this.name = 'BizExceptionResponseError';
|
11
|
-
// CustomData
|
12
|
-
this.response = response;
|
13
|
-
this.reponseData = reponseData;
|
4
|
+
constructor(message, cause, response, reponseData) {
|
5
|
+
super(message, cause, response);
|
6
|
+
// Maintains proper stack trace for where our error was thrown (only available on V8)
|
7
|
+
if (Error.captureStackTrace) {
|
8
|
+
Error.captureStackTrace(this, BizExceptionResponseError);
|
14
9
|
}
|
10
|
+
this.name = 'BizExceptionResponseError';
|
11
|
+
// CustomData
|
12
|
+
this.response = response;
|
13
|
+
this.reponseData = reponseData;
|
14
|
+
}
|
15
15
|
}
|
16
16
|
|
17
17
|
export { BizExceptionResponseError as default };
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import ResponseError from './ResponseError.js';
|
2
2
|
|
3
3
|
class ExceptionResponseError extends ResponseError {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
this.name = 'ExceptionResponseError';
|
11
|
-
// CustomData
|
12
|
-
this.response = response;
|
13
|
-
this.reponseData = reponseData;
|
4
|
+
constructor(message, cause, response, reponseData) {
|
5
|
+
super(message, cause, response);
|
6
|
+
// Maintains proper stack trace for where our error was thrown (only available on V8)
|
7
|
+
if (Error.captureStackTrace) {
|
8
|
+
Error.captureStackTrace(this, ExceptionResponseError);
|
14
9
|
}
|
10
|
+
this.name = 'ExceptionResponseError';
|
11
|
+
// CustomData
|
12
|
+
this.response = response;
|
13
|
+
this.reponseData = reponseData;
|
14
|
+
}
|
15
15
|
}
|
16
16
|
|
17
17
|
export { ExceptionResponseError as default };
|
@@ -1,14 +1,16 @@
|
|
1
1
|
class ResponseError extends Error {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
// CustomData
|
10
|
-
this.response = reponse;
|
2
|
+
constructor(message, options, reponse) {
|
3
|
+
super(message, {
|
4
|
+
cause: options.cause
|
5
|
+
});
|
6
|
+
// Maintains proper stack trace for where our error was thrown (only available on V8)
|
7
|
+
if (Error.captureStackTrace) {
|
8
|
+
Error.captureStackTrace(this, ResponseError);
|
11
9
|
}
|
10
|
+
this.name = 'ResponseError';
|
11
|
+
// CustomData
|
12
|
+
this.response = reponse;
|
13
|
+
}
|
12
14
|
}
|
13
15
|
|
14
16
|
export { ResponseError as default };
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import ResponseError from './ResponseError.js';
|
2
2
|
|
3
3
|
class SessionExceptionResponseError extends ResponseError {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
this.name = 'SessionExceptionResponseError';
|
11
|
-
// CustomData
|
12
|
-
this.response = response;
|
13
|
-
this.reponseData = reponseData;
|
4
|
+
constructor(message, cause, response, reponseData) {
|
5
|
+
super(message, cause, response);
|
6
|
+
// Maintains proper stack trace for where our error was thrown (only available on V8)
|
7
|
+
if (Error.captureStackTrace) {
|
8
|
+
Error.captureStackTrace(this, SessionExceptionResponseError);
|
14
9
|
}
|
10
|
+
this.name = 'SessionExceptionResponseError';
|
11
|
+
// CustomData
|
12
|
+
this.response = response;
|
13
|
+
this.reponseData = reponseData;
|
14
|
+
}
|
15
15
|
}
|
16
16
|
|
17
17
|
export { SessionExceptionResponseError as default };
|
package/dist/request/index.d.ts
CHANGED
@@ -1 +1,4 @@
|
|
1
1
|
export { default as divisionRequest } from './disivion';
|
2
|
+
export { default as BizExceptionResponseError } from './error/BizExceptionResponseError';
|
3
|
+
export { default as SessionExceptionResponseError } from './error/SessionExceptionResponseError';
|
4
|
+
export { default as ExceptionResponseError } from './error/ExceptionResponseError';
|
package/dist/request/index.js
CHANGED
@@ -1,20 +1,12 @@
|
|
1
|
-
export { default as divisionRequest } from './disivion/
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import '
|
6
|
-
import '
|
7
|
-
import '
|
8
|
-
import 'url';
|
9
|
-
import 'fs';
|
10
|
-
import 'assert';
|
11
|
-
import 'tty';
|
12
|
-
import 'os';
|
13
|
-
import 'zlib';
|
14
|
-
import 'events';
|
15
|
-
import '../dayjs.min-CYqA_arp.js';
|
1
|
+
export { default as divisionRequest } from './disivion/index.js';
|
2
|
+
export { default as BizExceptionResponseError } from './error/BizExceptionResponseError.js';
|
3
|
+
export { default as SessionExceptionResponseError } from './error/SessionExceptionResponseError.js';
|
4
|
+
export { default as ExceptionResponseError } from './error/ExceptionResponseError.js';
|
5
|
+
import 'axios';
|
6
|
+
import 'lodash-es';
|
7
|
+
import 'dayjs';
|
16
8
|
import '../utils/md5.js';
|
17
|
-
import '
|
9
|
+
import 'decimal.js';
|
18
10
|
import './ResponseParserChain.js';
|
19
11
|
import './ErrorHandlerChain.js';
|
20
12
|
import './RequestFilterChain.js';
|
@@ -22,7 +14,4 @@ import './disivion/DateSerializer.js';
|
|
22
14
|
import './disivion/DivisionResponseParser.js';
|
23
15
|
import './disivion/DivisionErrorHandler.js';
|
24
16
|
import './error/ResponseError.js';
|
25
|
-
import '
|
26
|
-
import './error/BizExceptionResponseError.js';
|
27
|
-
import './error/SessionExceptionResponseError.js';
|
28
|
-
import '../utils/cloneDeep.js';
|
17
|
+
import 'element-plus';
|
@@ -0,0 +1 @@
|
|
1
|
+
|
package/dist/utils/DateUtil.js
CHANGED
@@ -1,58 +1,53 @@
|
|
1
|
-
import
|
1
|
+
import dayjs from 'dayjs';
|
2
2
|
import OrionError from '../error/OrionError.js';
|
3
|
-
import '../_commonjsHelpers-BFTU3MAI.js';
|
4
3
|
|
5
4
|
const DateUtil = {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
else {
|
53
|
-
throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`);
|
54
|
-
}
|
55
|
-
},
|
5
|
+
format(p1, p2, p3) {
|
6
|
+
if (p1 instanceof Date && typeof p2 === 'string') {
|
7
|
+
const value = p1;
|
8
|
+
const format = p2;
|
9
|
+
if (!value) {
|
10
|
+
throw new OrionError('value is null.');
|
11
|
+
}
|
12
|
+
if (!format) {
|
13
|
+
throw new OrionError('format is null.');
|
14
|
+
}
|
15
|
+
return dayjs(value).format(format);
|
16
|
+
} else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {
|
17
|
+
const value = p1;
|
18
|
+
const sourceFormat = p2;
|
19
|
+
const targetFormat = p3;
|
20
|
+
if (!value || !sourceFormat || !targetFormat) {
|
21
|
+
throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`);
|
22
|
+
}
|
23
|
+
if (dayjs(value, sourceFormat, true).isValid()) {
|
24
|
+
return dayjs(value, sourceFormat).format(targetFormat);
|
25
|
+
} else {
|
26
|
+
throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`);
|
27
|
+
}
|
28
|
+
} else {
|
29
|
+
throw new OrionError(`入参数量[${arguments.length}]不正确。`);
|
30
|
+
}
|
31
|
+
},
|
32
|
+
stringToDate(value, format) {
|
33
|
+
if (!value) {
|
34
|
+
throw new OrionError('value is null.');
|
35
|
+
}
|
36
|
+
if (!format) {
|
37
|
+
throw new OrionError('format is null.');
|
38
|
+
}
|
39
|
+
if (typeof value !== 'string') {
|
40
|
+
throw new OrionError('value is not a string.');
|
41
|
+
}
|
42
|
+
if (typeof format !== 'string') {
|
43
|
+
throw new OrionError('format is not a string.');
|
44
|
+
}
|
45
|
+
if (dayjs(value, format, true).isValid()) {
|
46
|
+
return dayjs(value, format).toDate();
|
47
|
+
} else {
|
48
|
+
throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`);
|
49
|
+
}
|
50
|
+
}
|
56
51
|
};
|
57
52
|
|
58
53
|
export { DateUtil as default };
|
package/dist/utils/NumberUtil.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import Decimal from 'decimal.js';
|
2
2
|
|
3
3
|
const NumberUtil = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
round: (value, how) => {
|
5
|
+
const dec = new Decimal(value);
|
6
|
+
return Number(dec.toFixed(how, 4));
|
7
|
+
}
|
8
8
|
};
|
9
9
|
|
10
10
|
export { NumberUtil as default };
|