orion-design 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/dist/Throne/index.d.ts +18 -0
- package/dist/Throne/index.js +20 -0
- package/dist/Throne/index.js.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/components/Button/Button.vue.d.ts +2 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +27 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Flex/Col.d.ts +4 -4
- package/dist/components/Flex/Item.d.ts +4 -4
- package/dist/components/Flex/Row.d.ts +4 -4
- package/dist/components/Flex/index.d.ts +4 -4
- package/dist/components/Flex/index.js +95 -127
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.d.ts +5 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.js +2 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/Form/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
- package/dist/components/Form/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Form/ButtonGroup/index.js +2 -0
- package/dist/components/Form/ButtonGroup/index.js.map +1 -0
- package/dist/components/Form/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Form/Checkbox/Checkbox.js +2 -0
- package/dist/components/Form/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Form/Checkbox/Checkbox.vue.d.ts +3 -0
- package/dist/components/Form/Checkbox/index.d.ts +1 -0
- package/dist/components/Form/Checkbox/index.js +2 -0
- package/dist/components/Form/Checkbox/index.js.map +1 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.d.ts +14 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +2 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.vue.d.ts +3 -0
- package/dist/components/Form/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/Form/CheckboxGroup/index.js +2 -0
- package/dist/components/Form/CheckboxGroup/index.js.map +1 -0
- package/dist/components/Form/DateInput/DateInput.d.ts +17 -0
- package/dist/components/Form/DateInput/DateInput.js +2 -0
- package/dist/components/Form/DateInput/DateInput.js.map +1 -0
- package/dist/components/Form/DateInput/DateInput.vue.d.ts +3 -0
- package/dist/components/Form/DateInput/index.d.ts +1 -0
- package/dist/components/Form/DateInput/index.js +2 -0
- package/dist/components/Form/DateInput/index.js.map +1 -0
- package/dist/components/Form/FileInput/FileInput.d.ts +10 -0
- package/dist/components/Form/FileInput/FileInput.js +2 -0
- package/dist/components/Form/FileInput/FileInput.js.map +1 -0
- package/dist/components/Form/FileInput/FileInput.vue.d.ts +451 -0
- package/dist/components/Form/FileInput/index.d.ts +1 -0
- package/dist/components/Form/FileInput/index.js +2 -0
- package/dist/components/Form/FileInput/index.js.map +1 -0
- package/dist/components/Form/Form.d.ts +21 -0
- package/dist/components/Form/Form.js +5 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/Form.vue.d.ts +465 -0
- package/dist/components/Form/MultiSelect/MultiSelect.d.ts +15 -0
- package/dist/components/Form/MultiSelect/MultiSelect.js +2 -0
- package/dist/components/Form/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/components/Form/MultiSelect/MultiSelect.vue.d.ts +3 -0
- package/dist/components/Form/MultiSelect/index.d.ts +1 -0
- package/dist/components/Form/MultiSelect/index.js +2 -0
- package/dist/components/Form/MultiSelect/index.js.map +1 -0
- package/dist/components/Form/PasswordInput/PasswordInput.d.ts +13 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js +2 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/components/Form/PasswordInput/PasswordInput.vue.d.ts +3 -0
- package/dist/components/Form/PasswordInput/index.d.ts +1 -0
- package/dist/components/Form/PasswordInput/index.js +2 -0
- package/dist/components/Form/PasswordInput/index.js.map +1 -0
- package/dist/components/Form/RadioGroup/RadioGroup.d.ts +14 -0
- package/dist/components/Form/RadioGroup/RadioGroup.js +2 -0
- package/dist/components/Form/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/Form/RadioGroup/RadioGroup.vue.d.ts +3 -0
- package/dist/components/Form/RadioGroup/index.d.ts +1 -0
- package/dist/components/Form/RadioGroup/index.js +2 -0
- package/dist/components/Form/RadioGroup/index.js.map +1 -0
- package/dist/components/Form/SingleSelect/SingleSelect.d.ts +17 -0
- package/dist/components/Form/SingleSelect/SingleSelect.js +2 -0
- package/dist/components/Form/SingleSelect/SingleSelect.js.map +1 -0
- package/dist/components/Form/SingleSelect/SingleSelect.vue.d.ts +3 -0
- package/dist/components/Form/SingleSelect/index.d.ts +1 -0
- package/dist/components/Form/SingleSelect/index.js +2 -0
- package/dist/components/Form/SingleSelect/index.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.d.ts +13 -0
- package/dist/components/Form/StringInput/StringInput.js +2 -0
- package/dist/components/Form/StringInput/StringInput.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.vue.d.ts +3 -0
- package/dist/components/Form/StringInput/index.d.ts +1 -0
- package/dist/components/Form/StringInput/index.js +2 -0
- package/dist/components/Form/StringInput/index.js.map +1 -0
- package/dist/components/Form/Switch/Switch.d.ts +10 -0
- package/dist/components/Form/Switch/Switch.js +2 -0
- package/dist/components/Form/Switch/Switch.js.map +1 -0
- package/dist/components/Form/Switch/Switch.vue.d.ts +3 -0
- package/dist/components/Form/Switch/index.d.ts +1 -0
- package/dist/components/Form/Switch/index.js +2 -0
- package/dist/components/Form/Switch/index.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.d.ts +14 -0
- package/dist/components/Form/Textarea/Textarea.js +2 -0
- package/dist/components/Form/Textarea/Textarea.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.vue.d.ts +3 -0
- package/dist/components/Form/Textarea/index.d.ts +1 -0
- package/dist/components/Form/Textarea/index.js +2 -0
- package/dist/components/Form/Textarea/index.js.map +1 -0
- package/dist/components/Form/hooks/useForm.d.ts +7 -0
- package/dist/components/Form/hooks/useForm.js +44 -0
- package/dist/components/Form/hooks/useForm.js.map +1 -0
- package/dist/components/Form/index.d.ts +301 -0
- package/dist/components/Form/index.js +660 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Form/utils/index.d.ts +8 -0
- package/dist/components/Form/utils/index.js +26 -0
- package/dist/components/Form/utils/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +1 -14
- package/dist/components/Modal/useModal.d.ts +1 -1
- package/dist/components/Modal/useModal.js +7 -7
- package/dist/components/Modal/useModal.js.map +1 -0
- package/dist/components/Pagetable/Pagetable.d.ts +91 -0
- package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +24 -0
- package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +78 -0
- package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +101 -0
- package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +78 -0
- package/dist/components/Pagetable/columns/PagetableColumnIndex.d.ts +5 -0
- package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +109 -0
- package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +114 -0
- package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +109 -0
- package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +75 -0
- package/dist/components/Pagetable/columns/PagetableColumngroup.d.ts +35 -0
- package/dist/components/Pagetable/hooks/useColumns.d.ts +1 -0
- package/dist/components/Pagetable/hooks/useColumns.js +96 -0
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -0
- package/dist/components/Pagetable/index.d.ts +85 -0
- package/dist/components/Pagetable/index.js +521 -0
- package/dist/components/Pagetable/index.js.map +1 -0
- package/dist/components/Pagetable/interface.d.ts +10 -0
- package/dist/components/Pagetable/interface.js +2 -0
- package/dist/components/Pagetable/interface.js.map +1 -0
- package/dist/components/Pagetable/utils/index.d.ts +15 -0
- package/dist/components/Pagetable/utils/index.js +169 -0
- package/dist/components/Pagetable/utils/index.js.map +1 -0
- package/dist/components/Space/index.d.ts +12 -12
- package/dist/components/_util/arrays.d.ts +5 -0
- package/dist/components/_util/arrays.js +8 -0
- package/dist/components/_util/arrays.js.map +1 -0
- package/dist/components/_util/browser.d.ts +3 -0
- package/dist/components/_util/browser.js +9 -0
- package/dist/components/_util/browser.js.map +1 -0
- package/dist/components/_util/classNames.js +20 -27
- package/dist/components/_util/classNames.js.map +1 -0
- package/dist/components/_util/dom/aria.d.ts +30 -0
- package/dist/components/_util/dom/aria.js +46 -0
- package/dist/components/_util/dom/aria.js.map +1 -0
- package/dist/components/_util/dom/element.d.ts +3 -0
- package/dist/components/_util/dom/element.js +18 -0
- package/dist/components/_util/dom/element.js.map +1 -0
- package/dist/components/_util/dom/event.d.ts +6 -0
- package/dist/components/_util/dom/event.js +10 -0
- package/dist/components/_util/dom/event.js.map +1 -0
- package/dist/components/_util/dom/index.d.ts +6 -0
- package/dist/components/_util/dom/index.js +39 -0
- package/dist/components/_util/dom/index.js.map +1 -0
- package/dist/components/_util/dom/position.d.ts +7 -0
- package/dist/components/_util/dom/position.js +30 -0
- package/dist/components/_util/dom/position.js.map +1 -0
- package/dist/components/_util/dom/scroll.d.ts +11 -0
- package/dist/components/_util/dom/scroll.js +78 -0
- package/dist/components/_util/dom/scroll.js.map +1 -0
- package/dist/components/_util/dom/style.d.ts +9 -0
- package/dist/components/_util/dom/style.js +58 -0
- package/dist/components/_util/dom/style.js.map +1 -0
- package/dist/components/_util/easings.d.ts +1 -0
- package/dist/components/_util/easings.js +8 -0
- package/dist/components/_util/easings.js.map +1 -0
- package/dist/components/_util/error.d.ts +3 -0
- package/dist/components/_util/error.js +22 -0
- package/dist/components/_util/error.js.map +1 -0
- package/dist/components/_util/functions.d.ts +1 -0
- package/dist/components/_util/functions.js +6 -0
- package/dist/components/_util/functions.js.map +1 -0
- package/dist/components/_util/i18n.d.ts +1 -0
- package/dist/components/_util/i18n.js +5 -0
- package/dist/components/_util/i18n.js.map +1 -0
- package/dist/components/_util/index.d.ts +15 -0
- package/dist/components/_util/index.js +140 -0
- package/dist/components/_util/index.js.map +1 -0
- package/dist/components/_util/isValid.js +4 -4
- package/dist/components/_util/isValid.js.map +1 -0
- package/dist/components/_util/objects.d.ts +8 -0
- package/dist/components/_util/objects.js +17 -0
- package/dist/components/_util/objects.js.map +1 -0
- package/dist/components/_util/props-util/index.d.ts +4 -4
- package/dist/components/_util/props-util/index.js +23 -50
- package/dist/components/_util/props-util/index.js.map +1 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +2 -2
- package/dist/components/_util/props-util/initDefaultProps.js +13 -24
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -0
- package/dist/components/_util/raf.d.ts +2 -0
- package/dist/components/_util/raf.js +7 -0
- package/dist/components/_util/raf.js.map +1 -0
- package/dist/components/_util/rand.d.ts +12 -0
- package/dist/components/_util/rand.js +6 -0
- package/dist/components/_util/rand.js.map +1 -0
- package/dist/components/_util/strings.d.ts +6 -0
- package/dist/components/_util/strings.js +11 -0
- package/dist/components/_util/strings.js.map +1 -0
- package/dist/components/_util/throttleByRaf.d.ts +4 -0
- package/dist/components/_util/throttleByRaf.js +16 -0
- package/dist/components/_util/throttleByRaf.js.map +1 -0
- package/dist/components/_util/type.d.ts +5 -1
- package/dist/components/_util/type.js +52 -65
- package/dist/components/_util/type.js.map +1 -0
- package/dist/components/_util/types.d.ts +10 -0
- package/dist/components/_util/types.js +25 -0
- package/dist/components/_util/types.js.map +1 -0
- package/dist/components/_util/typescript.d.ts +12 -0
- package/dist/components/_util/typescript.js +5 -0
- package/dist/components/_util/typescript.js.map +1 -0
- package/dist/components/_util/util.d.ts +1 -1
- package/dist/components/_util/util.js +46 -74
- package/dist/components/_util/util.js.map +1 -0
- package/dist/components/_util/vue/global-node.d.ts +3 -0
- package/dist/components/_util/vue/global-node.js +21 -0
- package/dist/components/_util/vue/global-node.js.map +1 -0
- package/dist/components/_util/vue/icon.d.ts +23 -0
- package/dist/components/_util/vue/icon.js +154 -0
- package/dist/components/_util/vue/icon.js.map +1 -0
- package/dist/components/_util/vue/index.d.ts +9 -0
- package/dist/components/_util/vue/index.js +44 -0
- package/dist/components/_util/vue/index.js.map +1 -0
- package/dist/components/_util/vue/install.d.ts +6 -0
- package/dist/components/_util/vue/install.js +21 -0
- package/dist/components/_util/vue/install.js.map +1 -0
- package/dist/components/_util/vue/props/index.d.ts +3 -0
- package/dist/components/_util/vue/props/index.js +9 -0
- package/dist/components/_util/vue/props/index.js.map +1 -0
- package/dist/components/_util/vue/props/runtime.d.ts +29 -0
- package/dist/components/_util/vue/props/runtime.js +37 -0
- package/dist/components/_util/vue/props/runtime.js.map +1 -0
- package/dist/components/_util/vue/props/types.d.ts +120 -0
- package/dist/components/_util/vue/props/types.js +2 -0
- package/dist/components/_util/vue/props/types.js.map +1 -0
- package/dist/components/_util/vue/props/util.d.ts +8 -0
- package/dist/components/_util/vue/props/util.js +2 -0
- package/dist/components/_util/vue/props/util.js.map +1 -0
- package/dist/components/_util/vue/refs.d.ts +3 -0
- package/dist/components/_util/vue/refs.js +12 -0
- package/dist/components/_util/vue/refs.js.map +1 -0
- package/dist/components/_util/vue/size.d.ts +2 -0
- package/dist/components/_util/vue/size.js +6 -0
- package/dist/components/_util/vue/size.js.map +1 -0
- package/dist/components/_util/vue/typescript.d.ts +5 -0
- package/dist/components/_util/vue/typescript.js +2 -0
- package/dist/components/_util/vue/typescript.js.map +1 -0
- package/dist/components/_util/vue/validator.d.ts +3 -0
- package/dist/components/_util/vue/validator.js +7 -0
- package/dist/components/_util/vue/validator.js.map +1 -0
- package/dist/components/_util/vue/vnode.d.ts +50 -0
- package/dist/components/_util/vue/vnode.js +68 -0
- package/dist/components/_util/vue/vnode.js.map +1 -0
- package/dist/components/_util/vue-types/index.d.ts +3 -3
- package/dist/components/_util/vue-types/index.js +275 -417
- package/dist/components/_util/vue-types/index.js.map +1 -0
- package/dist/components/components.d.ts +4 -0
- package/dist/components/components.js +19 -12
- package/dist/components/components.js.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +26 -24
- package/dist/components/index.js.map +1 -0
- package/dist/components-CutWiB7Q.js +68 -0
- package/dist/components-CutWiB7Q.js.map +1 -0
- package/dist/error/OrionError.js +7 -12
- package/dist/error/OrionError.js.map +1 -0
- package/dist/functions-DzLqXvGt.js +33 -0
- package/dist/functions-DzLqXvGt.js.map +1 -0
- package/dist/index-BbsXWo7C.js +44 -0
- package/dist/index-BbsXWo7C.js.map +1 -0
- package/dist/index-C8JNJPWW.js +8 -0
- package/dist/index-C8JNJPWW.js.map +1 -0
- package/dist/index.css +1 -44
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27 -14
- package/dist/index.js.map +1 -0
- package/dist/print/LodopFuncs.js +48 -111
- package/dist/print/LodopFuncs.js.map +1 -0
- package/dist/print/index.d.ts +2 -2
- package/dist/print/index.js +111 -220
- package/dist/print/index.js.map +1 -0
- package/dist/request/ErrorHandlerChain.js +17 -15
- package/dist/request/ErrorHandlerChain.js.map +1 -0
- package/dist/request/RequestFilterChain.d.ts +1 -1
- package/dist/request/RequestFilterChain.js +16 -14
- package/dist/request/RequestFilterChain.js.map +1 -0
- package/dist/request/ResponseParserChain.d.ts +1 -1
- package/dist/request/ResponseParserChain.js +17 -15
- package/dist/request/ResponseParserChain.js.map +1 -0
- package/dist/request/disivion/DateSerializer.js +25 -46
- package/dist/request/disivion/DateSerializer.js.map +1 -0
- package/dist/request/disivion/DivisionErrorHandler.d.ts +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +30 -52
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -0
- package/dist/request/disivion/DivisionResponseParser.d.ts +2 -2
- package/dist/request/disivion/DivisionResponseParser.js +13 -25
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -0
- package/dist/request/disivion/index.d.ts +3 -3
- package/dist/request/disivion/index.js +230 -480
- package/dist/request/disivion/index.js.map +1 -0
- package/dist/request/error/BizExceptionResponseError.d.ts +2 -2
- package/dist/request/error/BizExceptionResponseError.js +8 -15
- package/dist/request/error/BizExceptionResponseError.js.map +1 -0
- package/dist/request/error/ExceptionResponseError.d.ts +2 -2
- package/dist/request/error/ExceptionResponseError.js +8 -15
- package/dist/request/error/ExceptionResponseError.js.map +1 -0
- package/dist/request/error/ResponseError.d.ts +1 -1
- package/dist/request/error/ResponseError.js +7 -14
- package/dist/request/error/ResponseError.js.map +1 -0
- package/dist/request/error/SessionExceptionResponseError.d.ts +2 -2
- package/dist/request/error/SessionExceptionResponseError.js +8 -15
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -0
- package/dist/request/index.js +11 -17
- package/dist/request/index.js.map +1 -0
- package/dist/style/index.d.ts +0 -3
- package/dist/style/index.js +1 -0
- package/dist/style/index.js.map +1 -0
- package/dist/utils/DateUtil.js +36 -50
- package/dist/utils/DateUtil.js.map +1 -0
- package/dist/utils/NumberUtil.js +9 -8
- package/dist/utils/NumberUtil.js.map +1 -0
- package/dist/utils/cloneDeep.js +5 -1
- package/dist/utils/cloneDeep.js.map +1 -0
- package/dist/utils/delay.js +6 -4
- package/dist/utils/delay.js.map +1 -0
- package/dist/utils/functions.d.ts +1 -0
- package/dist/utils/functions.js +6 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/index.js +15 -9
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/md5.js +120 -245
- package/dist/utils/md5.js.map +1 -0
- package/dist/utils/uuid.js +28 -58
- package/dist/utils/uuid.js.map +1 -0
- package/dist/version/index.d.ts +1 -1
- package/dist/version/index.js +5 -6
- package/dist/version/index.js.map +1 -0
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +5 -3
- package/dist/version/version.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/global.d.ts +6 -0
- package/package.json +53 -63
- package/dist/components-BTX5S_6V.js +0 -128
@@ -1,497 +1,247 @@
|
|
1
|
-
import
|
2
|
-
import { cloneDeep } from
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import { ElLoading } from
|
13
|
-
import
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
return
|
71
|
-
}
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
1
|
+
import $ from "axios";
|
2
|
+
import { cloneDeep as G } from "lodash-es";
|
3
|
+
import "dayjs";
|
4
|
+
import "../../utils/md5.js";
|
5
|
+
import "decimal.js";
|
6
|
+
import K from "../ResponseParserChain.js";
|
7
|
+
import v from "../ErrorHandlerChain.js";
|
8
|
+
import W from "../RequestFilterChain.js";
|
9
|
+
import X from "./DateSerializer.js";
|
10
|
+
import ee from "./DivisionResponseParser.js";
|
11
|
+
import te from "./DivisionErrorHandler.js";
|
12
|
+
import { ElLoading as O } from "element-plus";
|
13
|
+
import re from "../error/ResponseError.js";
|
14
|
+
const T = "3.7.7", oe = T, m = typeof Buffer == "function", E = typeof TextDecoder == "function" ? new TextDecoder() : void 0, R = typeof TextEncoder == "function" ? new TextEncoder() : void 0, ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", p = Array.prototype.slice.call(ne), b = ((e) => {
|
15
|
+
let t = {};
|
16
|
+
return e.forEach((o, r) => t[o] = r), t;
|
17
|
+
})(p), ae = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, s = String.fromCharCode.bind(String), _ = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), P = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), k = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), L = (e) => {
|
18
|
+
let t, o, r, n, a = "";
|
19
|
+
const i = e.length % 3;
|
20
|
+
for (let l = 0; l < e.length; ) {
|
21
|
+
if ((o = e.charCodeAt(l++)) > 255 || (r = e.charCodeAt(l++)) > 255 || (n = e.charCodeAt(l++)) > 255)
|
22
|
+
throw new TypeError("invalid character found");
|
23
|
+
t = o << 16 | r << 8 | n, a += p[t >> 18 & 63] + p[t >> 12 & 63] + p[t >> 6 & 63] + p[t & 63];
|
24
|
+
}
|
25
|
+
return i ? a.slice(0, i - 3) + "===".substring(i) : a;
|
26
|
+
}, U = typeof btoa == "function" ? (e) => btoa(e) : m ? (e) => Buffer.from(e, "binary").toString("base64") : L, A = m ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
27
|
+
let o = [];
|
28
|
+
for (let r = 0, n = e.length; r < n; r += 4096)
|
29
|
+
o.push(s.apply(null, e.subarray(r, r + 4096)));
|
30
|
+
return U(o.join(""));
|
31
|
+
}, g = (e, t = !1) => t ? P(A(e)) : A(e), se = (e) => {
|
32
|
+
if (e.length < 2) {
|
33
|
+
var t = e.charCodeAt(0);
|
34
|
+
return t < 128 ? e : t < 2048 ? s(192 | t >>> 6) + s(128 | t & 63) : s(224 | t >>> 12 & 15) + s(128 | t >>> 6 & 63) + s(128 | t & 63);
|
35
|
+
} else {
|
36
|
+
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
|
37
|
+
return s(240 | t >>> 18 & 7) + s(128 | t >>> 12 & 63) + s(128 | t >>> 6 & 63) + s(128 | t & 63);
|
38
|
+
}
|
39
|
+
}, ie = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, j = (e) => e.replace(ie, se), D = m ? (e) => Buffer.from(e, "utf8").toString("base64") : R ? (e) => A(R.encode(e)) : (e) => U(j(e)), h = (e, t = !1) => t ? P(D(e)) : D(e), S = (e) => h(e, !0), le = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, fe = (e) => {
|
40
|
+
switch (e.length) {
|
41
|
+
case 4:
|
42
|
+
var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), o = t - 65536;
|
43
|
+
return s((o >>> 10) + 55296) + s((o & 1023) + 56320);
|
44
|
+
case 3:
|
45
|
+
return s((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
|
46
|
+
default:
|
47
|
+
return s((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
|
48
|
+
}
|
49
|
+
}, q = (e) => e.replace(le, fe), I = (e) => {
|
50
|
+
if (e = e.replace(/\s+/g, ""), !ae.test(e))
|
51
|
+
throw new TypeError("malformed base64.");
|
52
|
+
e += "==".slice(2 - (e.length & 3));
|
53
|
+
let t, o = "", r, n;
|
54
|
+
for (let a = 0; a < e.length; )
|
55
|
+
t = b[e.charAt(a++)] << 18 | b[e.charAt(a++)] << 12 | (r = b[e.charAt(a++)]) << 6 | (n = b[e.charAt(a++)]), o += r === 64 ? s(t >> 16 & 255) : n === 64 ? s(t >> 16 & 255, t >> 8 & 255) : s(t >> 16 & 255, t >> 8 & 255, t & 255);
|
56
|
+
return o;
|
57
|
+
}, C = typeof atob == "function" ? (e) => atob(k(e)) : m ? (e) => Buffer.from(e, "base64").toString("binary") : I, z = m ? (e) => _(Buffer.from(e, "base64")) : (e) => _(C(e).split("").map((t) => t.charCodeAt(0))), H = (e) => z(Z(e)), ue = m ? (e) => Buffer.from(e, "base64").toString("utf8") : E ? (e) => E.decode(z(e)) : (e) => q(C(e)), Z = (e) => k(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), w = (e) => ue(Z(e)), ce = (e) => {
|
58
|
+
if (typeof e != "string")
|
59
|
+
return !1;
|
60
|
+
const t = e.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
61
|
+
return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t);
|
62
|
+
}, N = (e) => ({
|
63
|
+
value: e,
|
64
|
+
enumerable: !1,
|
65
|
+
writable: !0,
|
66
|
+
configurable: !0
|
67
|
+
}), V = function() {
|
68
|
+
const e = (t, o) => Object.defineProperty(String.prototype, t, N(o));
|
69
|
+
e("fromBase64", function() {
|
70
|
+
return w(this);
|
71
|
+
}), e("toBase64", function(t) {
|
72
|
+
return h(this, t);
|
73
|
+
}), e("toBase64URI", function() {
|
74
|
+
return h(this, !0);
|
75
|
+
}), e("toBase64URL", function() {
|
76
|
+
return h(this, !0);
|
77
|
+
}), e("toUint8Array", function() {
|
78
|
+
return H(this);
|
79
|
+
});
|
80
|
+
}, Y = function() {
|
81
|
+
const e = (t, o) => Object.defineProperty(Uint8Array.prototype, t, N(o));
|
82
|
+
e("toBase64", function(t) {
|
83
|
+
return g(this, t);
|
84
|
+
}), e("toBase64URI", function() {
|
85
|
+
return g(this, !0);
|
86
|
+
}), e("toBase64URL", function() {
|
87
|
+
return g(this, !0);
|
88
|
+
});
|
89
|
+
}, de = () => {
|
90
|
+
V(), Y();
|
91
|
+
}, he = {
|
92
|
+
version: T,
|
93
|
+
VERSION: oe,
|
94
|
+
atob: C,
|
95
|
+
atobPolyfill: I,
|
96
|
+
btoa: U,
|
97
|
+
btoaPolyfill: L,
|
98
|
+
fromBase64: w,
|
99
|
+
toBase64: h,
|
100
|
+
encode: h,
|
101
|
+
encodeURI: S,
|
102
|
+
encodeURL: S,
|
103
|
+
utob: j,
|
104
|
+
btou: q,
|
105
|
+
decode: w,
|
106
|
+
isValid: ce,
|
107
|
+
fromUint8Array: g,
|
108
|
+
toUint8Array: H,
|
109
|
+
extendString: V,
|
110
|
+
extendUint8Array: Y,
|
111
|
+
extendBuiltins: de
|
112
|
+
};
|
113
|
+
let M = () => ({}), J = [new ee()], F = [new te()], Q = [
|
114
|
+
{
|
115
|
+
doFilter: (e, t) => {
|
116
|
+
const o = M();
|
117
|
+
Object.keys(o).forEach(function(r) {
|
118
|
+
e.headers[r] = o[r];
|
119
|
+
}), t.doFilter(e, t);
|
118
120
|
}
|
119
|
-
}
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
* @param {string} src UTF-8 string
|
124
|
-
* @returns {string} UTF-16 string
|
125
|
-
*/
|
126
|
-
const utob = (u) => u.replace(re_utob, cb_utob);
|
127
|
-
//
|
128
|
-
const _encode = _hasBuffer
|
129
|
-
? (s) => Buffer.from(s, 'utf8').toString('base64')
|
130
|
-
: _TE
|
131
|
-
? (s) => _fromUint8Array(_TE.encode(s))
|
132
|
-
: (s) => _btoa(utob(s));
|
133
|
-
/**
|
134
|
-
* converts a UTF-8-encoded string to a Base64 string.
|
135
|
-
* @param {boolean} [urlsafe] if `true` make the result URL-safe
|
136
|
-
* @returns {string} Base64 string
|
137
|
-
*/
|
138
|
-
const encode = (src, urlsafe = false) => urlsafe
|
139
|
-
? _mkUriSafe(_encode(src))
|
140
|
-
: _encode(src);
|
141
|
-
/**
|
142
|
-
* converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
|
143
|
-
* @returns {string} Base64 string
|
144
|
-
*/
|
145
|
-
const encodeURI = (src) => encode(src, true);
|
146
|
-
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
|
147
|
-
// const btou = (src: string) => decodeURIComponent(escape(src));
|
148
|
-
// reverting good old fationed regexp
|
149
|
-
const re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
150
|
-
const cb_btou = (cccc) => {
|
151
|
-
switch (cccc.length) {
|
152
|
-
case 4:
|
153
|
-
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
154
|
-
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
155
|
-
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
156
|
-
| (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;
|
157
|
-
return (_fromCC((offset >>> 10) + 0xD800)
|
158
|
-
+ _fromCC((offset & 0x3FF) + 0xDC00));
|
159
|
-
case 3:
|
160
|
-
return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)
|
161
|
-
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
162
|
-
| (0x3f & cccc.charCodeAt(2)));
|
163
|
-
default:
|
164
|
-
return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)
|
165
|
-
| (0x3f & cccc.charCodeAt(1)));
|
121
|
+
},
|
122
|
+
{
|
123
|
+
doFilter: (e) => {
|
124
|
+
new X("YYYYMMDDHHmmss").serialize(e.data);
|
166
125
|
}
|
167
|
-
};
|
168
|
-
/**
|
169
|
-
* @deprecated should have been internal use only.
|
170
|
-
* @param {string} src UTF-16 string
|
171
|
-
* @returns {string} UTF-8 string
|
172
|
-
*/
|
173
|
-
const btou = (b) => b.replace(re_btou, cb_btou);
|
174
|
-
/**
|
175
|
-
* polyfill version of `atob`
|
176
|
-
*/
|
177
|
-
const atobPolyfill = (asc) => {
|
178
|
-
// console.log('polyfilled');
|
179
|
-
asc = asc.replace(/\s+/g, '');
|
180
|
-
if (!b64re.test(asc))
|
181
|
-
throw new TypeError('malformed base64.');
|
182
|
-
asc += '=='.slice(2 - (asc.length & 3));
|
183
|
-
let u24, bin = '', r1, r2;
|
184
|
-
for (let i = 0; i < asc.length;) {
|
185
|
-
u24 = b64tab[asc.charAt(i++)] << 18
|
186
|
-
| b64tab[asc.charAt(i++)] << 12
|
187
|
-
| (r1 = b64tab[asc.charAt(i++)]) << 6
|
188
|
-
| (r2 = b64tab[asc.charAt(i++)]);
|
189
|
-
bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)
|
190
|
-
: r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)
|
191
|
-
: _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
|
192
|
-
}
|
193
|
-
return bin;
|
194
|
-
};
|
195
|
-
/**
|
196
|
-
* does what `window.atob` of web browsers do.
|
197
|
-
* @param {String} asc Base64-encoded string
|
198
|
-
* @returns {string} binary string
|
199
|
-
*/
|
200
|
-
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
|
201
|
-
: _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')
|
202
|
-
: atobPolyfill;
|
203
|
-
//
|
204
|
-
const _toUint8Array = _hasBuffer
|
205
|
-
? (a) => _U8Afrom(Buffer.from(a, 'base64'))
|
206
|
-
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
207
|
-
/**
|
208
|
-
* converts a Base64 string to a Uint8Array.
|
209
|
-
*/
|
210
|
-
const toUint8Array = (a) => _toUint8Array(_unURI(a));
|
211
|
-
//
|
212
|
-
const _decode = _hasBuffer
|
213
|
-
? (a) => Buffer.from(a, 'base64').toString('utf8')
|
214
|
-
: _TD
|
215
|
-
? (a) => _TD.decode(_toUint8Array(a))
|
216
|
-
: (a) => btou(_atob(a));
|
217
|
-
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
|
218
|
-
/**
|
219
|
-
* converts a Base64 string to a UTF-8 string.
|
220
|
-
* @param {String} src Base64 string. Both normal and URL-safe are supported
|
221
|
-
* @returns {string} UTF-8 string
|
222
|
-
*/
|
223
|
-
const decode = (src) => _decode(_unURI(src));
|
224
|
-
/**
|
225
|
-
* check if a value is a valid Base64 string
|
226
|
-
* @param {String} src a value to check
|
227
|
-
*/
|
228
|
-
const isValid = (src) => {
|
229
|
-
if (typeof src !== 'string')
|
230
|
-
return false;
|
231
|
-
const s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
|
232
|
-
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
|
233
|
-
};
|
234
|
-
//
|
235
|
-
const _noEnum = (v) => {
|
236
|
-
return {
|
237
|
-
value: v, enumerable: false, writable: true, configurable: true
|
238
|
-
};
|
239
|
-
};
|
240
|
-
/**
|
241
|
-
* extend String.prototype with relevant methods
|
242
|
-
*/
|
243
|
-
const extendString = function () {
|
244
|
-
const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
|
245
|
-
_add('fromBase64', function () { return decode(this); });
|
246
|
-
_add('toBase64', function (urlsafe) { return encode(this, urlsafe); });
|
247
|
-
_add('toBase64URI', function () { return encode(this, true); });
|
248
|
-
_add('toBase64URL', function () { return encode(this, true); });
|
249
|
-
_add('toUint8Array', function () { return toUint8Array(this); });
|
250
|
-
};
|
251
|
-
/**
|
252
|
-
* extend Uint8Array.prototype with relevant methods
|
253
|
-
*/
|
254
|
-
const extendUint8Array = function () {
|
255
|
-
const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
|
256
|
-
_add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });
|
257
|
-
_add('toBase64URI', function () { return fromUint8Array(this, true); });
|
258
|
-
_add('toBase64URL', function () { return fromUint8Array(this, true); });
|
259
|
-
};
|
260
|
-
/**
|
261
|
-
* extend Builtin prototypes with relevant methods
|
262
|
-
*/
|
263
|
-
const extendBuiltins = () => {
|
264
|
-
extendString();
|
265
|
-
extendUint8Array();
|
266
|
-
};
|
267
|
-
const gBase64 = {
|
268
|
-
version: version,
|
269
|
-
VERSION: VERSION,
|
270
|
-
atob: _atob,
|
271
|
-
atobPolyfill: atobPolyfill,
|
272
|
-
btoa: _btoa,
|
273
|
-
btoaPolyfill: btoaPolyfill,
|
274
|
-
fromBase64: decode,
|
275
|
-
toBase64: encode,
|
276
|
-
encode: encode,
|
277
|
-
encodeURI: encodeURI,
|
278
|
-
encodeURL: encodeURI,
|
279
|
-
utob: utob,
|
280
|
-
btou: btou,
|
281
|
-
decode: decode,
|
282
|
-
isValid: isValid,
|
283
|
-
fromUint8Array: fromUint8Array,
|
284
|
-
toUint8Array: toUint8Array,
|
285
|
-
extendString: extendString,
|
286
|
-
extendUint8Array: extendUint8Array,
|
287
|
-
extendBuiltins: extendBuiltins
|
288
|
-
};
|
289
|
-
|
290
|
-
//////////////////////////////////// Chain
|
291
|
-
let gRequestHeaders = () => ({});
|
292
|
-
let gResponseParsers = [new DivisionResponseParser()];
|
293
|
-
let gErrorHandlers = [new DivisionErrorHandler()];
|
294
|
-
let gRequestFilters = [{
|
295
|
-
doFilter: (request, chain) => {
|
296
|
-
const headers = gRequestHeaders();
|
297
|
-
Object.keys(headers).forEach(function (key) {
|
298
|
-
request.headers[key] = headers[key];
|
299
|
-
});
|
300
|
-
chain.doFilter(request, chain);
|
301
126
|
}
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
//////////////////////////////////// GLOBAL VARS
|
308
|
-
let BASE_URL = '/';
|
309
|
-
let REQUEST_TIMEOUT = 1000 * 30;
|
310
|
-
//////////////////////////////////// AXIOS
|
311
|
-
const g_AxiosInstance = axios.create();
|
312
|
-
g_AxiosInstance.interceptors.request.use(function (config) {
|
313
|
-
const chain = new RequestFilterChain(gRequestFilters);
|
314
|
-
chain.doFilter(config, chain);
|
315
|
-
return config;
|
127
|
+
], B = "/", x = 1e3 * 30;
|
128
|
+
const y = $.create();
|
129
|
+
y.interceptors.request.use(function(e) {
|
130
|
+
const t = new W(Q);
|
131
|
+
return t.doFilter(e, t), e;
|
316
132
|
});
|
317
|
-
|
133
|
+
y.interceptors.response.use(function(e) {
|
318
134
|
try {
|
319
|
-
const
|
320
|
-
return
|
321
|
-
} catch (
|
322
|
-
throw new
|
323
|
-
cause: e
|
324
|
-
}, response);
|
135
|
+
const t = new K(J);
|
136
|
+
return t.doParse(e, t);
|
137
|
+
} catch (t) {
|
138
|
+
throw new re(t.message, { cause: t }, e);
|
325
139
|
}
|
326
140
|
});
|
327
|
-
function
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
}) {
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
return g_AxiosInstance.request({
|
345
|
-
baseURL: BASE_URL,
|
346
|
-
method: 'POST',
|
347
|
-
timeout: REQUEST_TIMEOUT,
|
348
|
-
withCredentials: true,
|
349
|
-
url,
|
350
|
-
data: newData,
|
351
|
-
responseType: 'json',
|
352
|
-
...options
|
353
|
-
}).then(data => {
|
354
|
-
if (loading) {
|
355
|
-
loading.close();
|
356
|
-
}
|
357
|
-
return data;
|
358
|
-
}).catch(function (error) {
|
359
|
-
if (loading) {
|
360
|
-
loading.close();
|
361
|
-
}
|
362
|
-
const chain = new ErrorHandlerChain(gErrorHandlers);
|
363
|
-
return chain.handle(error, chain);
|
141
|
+
function c(e, t = {}, o = { loading: !0, mask: !1, timeout: x }) {
|
142
|
+
let r = t;
|
143
|
+
t instanceof FormData || (r = G(t));
|
144
|
+
let n;
|
145
|
+
return o.loading === !0 && (n = O.service({ fullscreen: !0, background: "transparent" })), y.request({
|
146
|
+
baseURL: B,
|
147
|
+
method: "POST",
|
148
|
+
timeout: x,
|
149
|
+
withCredentials: !0,
|
150
|
+
url: e,
|
151
|
+
data: r,
|
152
|
+
responseType: "json",
|
153
|
+
...o
|
154
|
+
}).then((a) => (n && n.close(), a)).catch(function(a) {
|
155
|
+
n && n.close();
|
156
|
+
const i = new v(F);
|
157
|
+
return i.handle(a, i);
|
364
158
|
});
|
365
159
|
}
|
366
|
-
function
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
}
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
data,
|
385
|
-
responseType: 'blob',
|
386
|
-
...options
|
387
|
-
}).then(data => {
|
388
|
-
if (loading) {
|
389
|
-
loading.close();
|
390
|
-
}
|
391
|
-
return data;
|
392
|
-
}).then(response => {
|
393
|
-
const contentDisposition = response.headers['content-disposition'];
|
394
|
-
const blob = response.data;
|
395
|
-
const base64FileName = contentDisposition.match(/attachment; filename=\"(.*?)\"/)[1];
|
396
|
-
const decodedFileName = gBase64.decode(base64FileName);
|
397
|
-
// for IE
|
398
|
-
//@ts-ignore
|
399
|
-
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
400
|
-
//@ts-ignore
|
401
|
-
window.navigator.msSaveOrOpenBlob(blob, decodedFileName);
|
402
|
-
} else {
|
403
|
-
const a = document.createElement('a');
|
404
|
-
const url = URL.createObjectURL(blob);
|
405
|
-
a.href = url;
|
406
|
-
a.download = decodedFileName;
|
407
|
-
document.body.appendChild(a);
|
408
|
-
a.click();
|
409
|
-
document.body.removeChild(a);
|
410
|
-
URL.revokeObjectURL(url);
|
411
|
-
}
|
412
|
-
}).catch(function (error) {
|
413
|
-
if (loading) {
|
414
|
-
loading.close();
|
160
|
+
function me(e, t = {}, o = { loading: !0, mask: !1, timeout: x }) {
|
161
|
+
let r;
|
162
|
+
return o.loading === !0 && (r = O.service({ fullscreen: !0, background: "transparent" })), y.request({
|
163
|
+
baseURL: B,
|
164
|
+
method: "POST",
|
165
|
+
timeout: x,
|
166
|
+
withCredentials: !0,
|
167
|
+
url: e,
|
168
|
+
data: t,
|
169
|
+
responseType: "blob",
|
170
|
+
...o
|
171
|
+
}).then((n) => (r && r.close(), n)).then((n) => {
|
172
|
+
const a = n.headers["content-disposition"], i = n.data, l = a.match(/attachment; filename=\"(.*?)\"/)[1], f = he.decode(l);
|
173
|
+
if (window.navigator && window.navigator.msSaveOrOpenBlob)
|
174
|
+
window.navigator.msSaveOrOpenBlob(i, f);
|
175
|
+
else {
|
176
|
+
const d = document.createElement("a"), u = URL.createObjectURL(i);
|
177
|
+
d.href = u, d.download = f, document.body.appendChild(d), d.click(), document.body.removeChild(d), URL.revokeObjectURL(u);
|
415
178
|
}
|
416
|
-
|
417
|
-
|
179
|
+
}).catch(function(n) {
|
180
|
+
r && r.close();
|
181
|
+
const a = new v(F);
|
182
|
+
return a.handle(n, a);
|
418
183
|
});
|
419
184
|
}
|
420
|
-
function
|
421
|
-
const
|
422
|
-
if (
|
423
|
-
const
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
if (
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
if (itemValue[j] instanceof File) {
|
434
|
-
isFile = true;
|
185
|
+
function pe(e, t, o) {
|
186
|
+
const r = new FormData();
|
187
|
+
if (t) {
|
188
|
+
const n = Object.keys(t), a = {};
|
189
|
+
for (let i = 0; i < n.length; i++) {
|
190
|
+
const l = n[i], f = t[l];
|
191
|
+
if (f instanceof File)
|
192
|
+
r.append(l, f);
|
193
|
+
else if (f instanceof Array) {
|
194
|
+
let d = !1;
|
195
|
+
for (let u = 0; u < f.length; u++)
|
196
|
+
if (f[u] instanceof File) {
|
197
|
+
d = !0;
|
435
198
|
break;
|
436
199
|
}
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
normalParams[key] = itemValue;
|
445
|
-
}
|
446
|
-
} else {
|
447
|
-
// formdata.append(key, itemValue);
|
448
|
-
normalParams[key] = itemValue;
|
449
|
-
}
|
200
|
+
if (d)
|
201
|
+
for (let u = 0; u < f.length; u++)
|
202
|
+
r.append(l, f[u]);
|
203
|
+
else
|
204
|
+
a[l] = f;
|
205
|
+
} else
|
206
|
+
a[l] = f;
|
450
207
|
}
|
451
|
-
|
208
|
+
r.append("ibayJson", JSON.stringify(a));
|
452
209
|
}
|
453
|
-
return
|
210
|
+
return c(e, r, o);
|
454
211
|
}
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
if (
|
474
|
-
throw new Error(
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
};
|
490
|
-
|
491
|
-
if (handlers == null) {
|
492
|
-
throw new Error(`handlers should not null!`);
|
493
|
-
}
|
494
|
-
gErrorHandlers = handlers;
|
495
|
-
};
|
496
|
-
|
497
|
-
export { request as default };
|
212
|
+
c.download = me;
|
213
|
+
c.upload = pe;
|
214
|
+
c.setBaseUrl = (e) => {
|
215
|
+
if (!e)
|
216
|
+
throw new Error("pBaseUrl is null!");
|
217
|
+
B = e;
|
218
|
+
};
|
219
|
+
c.setRequestTimeout = (e) => {
|
220
|
+
x = e;
|
221
|
+
};
|
222
|
+
c.setRequestHeaders = (e) => {
|
223
|
+
if (!e)
|
224
|
+
throw new Error("pRequestHeaders is null!");
|
225
|
+
if (!(e instanceof Function))
|
226
|
+
throw new Error("pRequestHeaders is not a function!");
|
227
|
+
M = e;
|
228
|
+
};
|
229
|
+
c.setRequestFilters = (...e) => {
|
230
|
+
if (e == null)
|
231
|
+
throw new Error("filters is null!");
|
232
|
+
Q = e;
|
233
|
+
};
|
234
|
+
c.setResponseParsers = (...e) => {
|
235
|
+
if (e == null)
|
236
|
+
throw new Error("parsers is null!");
|
237
|
+
J = e;
|
238
|
+
};
|
239
|
+
c.setErrorHandlers = (...e) => {
|
240
|
+
if (e == null)
|
241
|
+
throw new Error("handlers should not null!");
|
242
|
+
F = e;
|
243
|
+
};
|
244
|
+
export {
|
245
|
+
c as default
|
246
|
+
};
|
247
|
+
//# sourceMappingURL=index.js.map
|