ai.touchui-vue 1.31.3 → 1.32.0
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/README.md +21 -21
- package/lib/ai.touchui-vue.common.js +1416 -1401
- package/lib/cascader.js +15 -3
- package/lib/chat.js +5 -5
- package/lib/collapse.js +1 -2
- package/lib/color.js +5 -5
- package/lib/date-picker.js +1 -2
- package/lib/date-range.js +16 -15
- package/lib/export.js +3 -3
- package/lib/index.js +1 -1
- package/lib/locale/format.js +10 -10
- package/lib/menu-icon.js +295 -295
- package/lib/mixins/migrating.js +20 -20
- package/lib/mixins/transition.js +14 -14
- package/lib/org.js +1 -2
- package/lib/page.js +1 -2
- package/lib/range.js +3 -3
- package/lib/scroll.js +8 -4
- package/lib/static/{net-mix.dc6e414.svg → net-mix.293a4b6.svg} +7 -7
- package/lib/tab.js +5 -5
- package/lib/table.js +22 -22
- package/lib/theme/css/theme/B-Design.css +1 -1
- package/lib/theme/css/theme/aiplan.css +1 -1
- package/lib/theme/css/theme/aiplangd.css +1 -1
- package/lib/theme/css/theme/chbn.css +1 -1
- package/lib/theme/css/theme/default.css +1 -1
- package/lib/theme/css/theme/dt.css +1 -1
- package/lib/theme/css/theme/ecloud.css +1 -1
- package/lib/theme/css/theme/hongkong.css +1 -1
- package/lib/theme/css/theme/narrow.css +1 -1
- package/lib/theme/css/theme/sdpf.css +1 -1
- package/lib/theme/css/theme/upc.css +1 -1
- package/lib/theme/css/theme/website.css +1 -1
- package/lib/theme/css/theme/zj.css +1 -1
- package/lib/utils/clickoutside.js +11 -11
- package/lib/utils/dom.js +13 -13
- package/lib/utils/filetransfer.js +4 -4
- package/lib/utils/jsencrypt/JSEncrypt.js +77 -77
- package/lib/utils/jsencrypt/JSEncryptRSAKey.js +115 -115
- package/lib/utils/jsencrypt/jselib/asn1js/asn1.js +4 -4
- package/lib/utils/jsencrypt/jselib/jsrsasign/asn1-1.0.js +734 -734
- package/lib/utils/jsencrypt/jselib/jsrsasign/yahoo.js +22 -22
- package/lib/utils/jsencrypt.js +260 -260
- package/lib/utils/md5.js +3 -3
- package/lib/utils/mime.js +2 -2
- package/lib/utils/ratio.js +53 -54
- package/lib/utils/sign.js +12 -12
- package/lib/utils/util.js +3 -3
- package/lib/utils/validate.js +11 -11
- package/package.json +159 -159
- package/packages/.DS_Store +0 -0
- package/packages/affix/index.js +8 -8
- package/packages/affix/src/affix.vue +139 -139
- package/packages/align/index.js +8 -8
- package/packages/align/src/directive.js +29 -29
- package/packages/animation/index.js +8 -8
- package/packages/animation/src/animation.vue +68 -68
- package/packages/article/.DS_Store +0 -0
- package/packages/article/index.js +8 -8
- package/packages/article/src/article.vue +23 -23
- package/packages/box/index.js +8 -8
- package/packages/box/src/box.vue +170 -170
- package/packages/button/index.js +8 -8
- package/packages/button/src/button.vue +162 -162
- package/packages/calendar/index.js +8 -8
- package/packages/calendar/src/calendar.vue +1142 -1142
- package/packages/card/index.js +10 -10
- package/packages/card/src/card-item.vue +92 -92
- package/packages/card/src/card.vue +175 -175
- package/packages/card-item/index.js +8 -8
- package/packages/cascader/index.js +8 -8
- package/packages/cascader/src/cascader.vue +818 -814
- package/packages/center-scroll/index.js +8 -8
- package/packages/center-scroll/src/center-scroll.vue +147 -147
- package/packages/chat/.DS_Store +0 -0
- package/packages/chat/index.js +12 -12
- package/packages/chat/src/.DS_Store +0 -0
- package/packages/chat/src/chat.vue +116 -116
- package/packages/checkbox/index.js +8 -8
- package/packages/checkbox/src/checkbox.vue +262 -262
- package/packages/checkboxes/index.js +8 -8
- package/packages/checkboxes/src/checkboxes.vue +97 -97
- package/packages/collapse/index.js +10 -10
- package/packages/collapse/src/collapse-item.vue +188 -188
- package/packages/collapse/src/collapse.vue +100 -100
- package/packages/color/index.js +8 -8
- package/packages/color/src/directive.js +42 -42
- package/packages/countdown/index.js +8 -8
- package/packages/countdown/src/countdown.vue +128 -128
- package/packages/date-picker/.DS_Store +0 -0
- package/packages/date-picker/index.js +8 -8
- package/packages/date-picker/src/date-picker.vue +438 -438
- package/packages/date-picker/src/picker.vue +342 -342
- package/packages/date-range/index.js +8 -8
- package/packages/date-range/src/date-range.vue +384 -384
- package/packages/dialog/index.js +8 -8
- package/packages/dialog/src/dialog.vue +313 -313
- package/packages/dis/.DS_Store +0 -0
- package/packages/dis/index.js +8 -8
- package/packages/dis/src/directive.js +42 -42
- package/packages/ellipsis/index.js +8 -8
- package/packages/ellipsis/src/ellipsis.vue +306 -306
- package/packages/emote/.DS_Store +0 -0
- package/packages/emote/index.js +8 -8
- package/packages/emote/src/emote.vue +38 -38
- package/packages/export/index.js +8 -8
- package/packages/export/src/ajax.js +73 -73
- package/packages/export/src/export.vue +289 -289
- package/packages/filter/.DS_Store +0 -0
- package/packages/filter/index.js +8 -8
- package/packages/filter/src/.DS_Store +0 -0
- package/packages/filter/src/filter.vue +245 -245
- package/packages/fix/index.js +8 -8
- package/packages/fix/src/fix.vue +221 -221
- package/packages/float/.DS_Store +0 -0
- package/packages/float/index.js +16 -16
- package/packages/float/src/directive.js +20 -20
- package/packages/float/src/main.vue +642 -642
- package/packages/float/src/trigger.vue +31 -31
- package/packages/flow/.DS_Store +0 -0
- package/packages/flow/index.js +8 -8
- package/packages/flow/src/flow.vue +234 -234
- package/packages/flow/src/flowItem.vue +61 -61
- package/packages/flow/src/flowLine.vue +168 -168
- package/packages/form/index.js +10 -10
- package/packages/form/src/form-item.vue +96 -96
- package/packages/form/src/form.vue +184 -184
- package/packages/grid/index.js +10 -10
- package/packages/grid/src/grid-item.vue +65 -65
- package/packages/grid/src/grid.vue +190 -190
- package/packages/grid-item/index.js +8 -8
- package/packages/guider/.DS_Store +0 -0
- package/packages/guider/index.js +8 -8
- package/packages/guider/src/guider.vue +168 -168
- package/packages/header/index.js +8 -8
- package/packages/header/src/header.vue +110 -110
- package/packages/hide/index.js +8 -8
- package/packages/hide/src/directive.js +57 -57
- package/packages/icon/index.js +8 -8
- package/packages/icon/src/icon.vue +79 -79
- package/packages/import/index.js +8 -8
- package/packages/import/src/import.vue +279 -279
- package/packages/input/index.js +8 -8
- package/packages/input/src/calcTextareaHeight.js +104 -104
- package/packages/input/src/input.vue +653 -653
- package/packages/ip/.DS_Store +0 -0
- package/packages/ip/index.js +8 -8
- package/packages/ip/src/ip.vue +143 -143
- package/packages/line/index.js +8 -8
- package/packages/line/src/line.vue +29 -29
- package/packages/loading/index.js +8 -8
- package/packages/loading/src/loading.js +58 -58
- package/packages/longtap/index.js +8 -8
- package/packages/longtap/src/longtap.js +95 -95
- package/packages/menu-icon/index.js +8 -8
- package/packages/menu-icon/src/menu-icon.vue +206 -206
- package/packages/message/index.js +8 -8
- package/packages/message/src/message.vue +9 -9
- package/packages/msg/index.js +8 -8
- package/packages/msg/src/msg.vue +227 -227
- package/packages/org/.DS_Store +0 -0
- package/packages/org/index.js +8 -8
- package/packages/org/src/org.vue +113 -113
- package/packages/org/src/orgItem.vue +63 -63
- package/packages/padding/index.js +8 -8
- package/packages/padding/src/padding.vue +105 -105
- package/packages/page/.DS_Store +0 -0
- package/packages/page/index.js +8 -8
- package/packages/page/src/.DS_Store +0 -0
- package/packages/page/src/page.vue +297 -297
- package/packages/param/index.js +8 -8
- package/packages/param/src/param.vue +226 -226
- package/packages/pic/.DS_Store +0 -0
- package/packages/pic/index.js +8 -8
- package/packages/pic/src/pic-viewer.vue +331 -331
- package/packages/pic/src/pic.vue +144 -144
- package/packages/popup/index.js +12 -12
- package/packages/popup/src/popup-group.vue +47 -47
- package/packages/popup/src/popup-item.vue +163 -163
- package/packages/popup/src/popup.vue +350 -350
- package/packages/progress/index.js +8 -8
- package/packages/progress/src/progress.vue +306 -306
- package/packages/range/index.js +8 -8
- package/packages/range/src/range.vue +612 -612
- package/packages/rate/.DS_Store +0 -0
- package/packages/rate/index.js +8 -8
- package/packages/rate/src/rate.vue +129 -129
- package/packages/reverser/.DS_Store +0 -0
- package/packages/reverser/index.js +8 -8
- package/packages/reverser/src/.DS_Store +0 -0
- package/packages/reverser/src/reverser.vue +49 -49
- package/packages/scroll/index.js +12 -12
- package/packages/scroll/src/scroll-point.vue +24 -24
- package/packages/scroll/src/scroll-sticky.vue +60 -60
- package/packages/scroll/src/scroll.vue +385 -381
- package/packages/segment/.DS_Store +0 -0
- package/packages/segment/index.js +8 -8
- package/packages/segment/src/segment.vue +618 -618
- package/packages/select/index.js +8 -8
- package/packages/select/src/select.vue +1445 -1445
- package/packages/size/index.js +8 -8
- package/packages/size/src/directive.js +33 -33
- package/packages/skeleton/index.js +8 -8
- package/packages/skeleton/src/skeleton.vue +179 -179
- package/packages/slide/.DS_Store +0 -0
- package/packages/slide/index.js +8 -8
- package/packages/slide/src/slide.vue +147 -147
- package/packages/space/index.js +8 -8
- package/packages/space/src/space.vue +53 -53
- package/packages/step/index.js +8 -8
- package/packages/step/src/step.vue +122 -122
- package/packages/submit/index.js +8 -8
- package/packages/submit/src/submit.vue +103 -103
- package/packages/switch/index.js +9 -9
- package/packages/switch/src/component.vue +131 -131
- package/packages/tab/.DS_Store +0 -0
- package/packages/tab/index.js +10 -10
- package/packages/tab/src/tab-item.vue +85 -85
- package/packages/tab/src/tab.vue +599 -599
- package/packages/table/.DS_Store +0 -0
- package/packages/table/index.js +8 -8
- package/packages/table/src/table-body.vue +301 -301
- package/packages/table/src/table-config.vue +139 -139
- package/packages/table/src/table-head.vue +242 -242
- package/packages/table/src/table.vue +1458 -1458
- package/packages/tag/index.js +8 -8
- package/packages/tag/src/tag.vue +129 -129
- package/packages/theme/lib/css/theme/B-Design.css +1 -1
- package/packages/theme/lib/css/theme/aiplan.css +1 -1
- package/packages/theme/lib/css/theme/aiplangd.css +1 -1
- package/packages/theme/lib/css/theme/chbn.css +1 -1
- package/packages/theme/lib/css/theme/default.css +1 -1
- package/packages/theme/lib/css/theme/dt.css +1 -1
- package/packages/theme/lib/css/theme/ecloud.css +1 -1
- package/packages/theme/lib/css/theme/hongkong.css +1 -1
- package/packages/theme/lib/css/theme/narrow.css +1 -1
- package/packages/theme/lib/css/theme/sdpf.css +1 -1
- package/packages/theme/lib/css/theme/upc.css +1 -1
- package/packages/theme/lib/css/theme/website.css +1 -1
- package/packages/theme/lib/css/theme/zj.css +1 -1
- package/packages/theme/package.json +33 -33
- package/packages/theme/src/.DS_Store +0 -0
- package/packages/theme/src/global/mixin.less +416 -416
- package/packages/theme/src/global/reset.less +27 -27
- package/packages/theme/src/img/.DS_Store +0 -0
- package/packages/theme/src/img/emote/.DS_Store +0 -0
- package/packages/theme/src/less/.DS_Store +0 -0
- package/packages/theme/src/less/component/affix.less +8 -8
- package/packages/theme/src/less/component/article-dark.less +6 -6
- package/packages/theme/src/less/component/article.less +39 -39
- package/packages/theme/src/less/component/box-dark.less +85 -85
- package/packages/theme/src/less/component/box.less +272 -272
- package/packages/theme/src/less/component/calendar-dark.less +111 -111
- package/packages/theme/src/less/component/calendar.less +282 -282
- package/packages/theme/src/less/component/card-dark.less +17 -17
- package/packages/theme/src/less/component/card.less +89 -89
- package/packages/theme/src/less/component/chat-dark.less +47 -47
- package/packages/theme/src/less/component/chat.less +71 -71
- package/packages/theme/src/less/component/code-dark.less +41 -41
- package/packages/theme/src/less/component/code.less +33 -33
- package/packages/theme/src/less/component/cover.less +4 -4
- package/packages/theme/src/less/component/dialog-dark.less +54 -54
- package/packages/theme/src/less/component/dialog.less +75 -75
- package/packages/theme/src/less/component/filter-dark.less +31 -31
- package/packages/theme/src/less/component/filter.less +97 -97
- package/packages/theme/src/less/component/float-dark.less +26 -26
- package/packages/theme/src/less/component/float.less +61 -61
- package/packages/theme/src/less/component/form-dark.less +45 -45
- package/packages/theme/src/less/component/form.less +322 -322
- package/packages/theme/src/less/component/gantt-dark.less +44 -44
- package/packages/theme/src/less/component/gantt.less +52 -52
- package/packages/theme/src/less/component/guider-dark.less +6 -6
- package/packages/theme/src/less/component/guider.less +15 -15
- package/packages/theme/src/less/component/header-dark.less +41 -41
- package/packages/theme/src/less/component/header.less +121 -121
- package/packages/theme/src/less/component/keyboard-dark.less +15 -15
- package/packages/theme/src/less/component/keyboard.less +21 -21
- package/packages/theme/src/less/component/line-dark.less +20 -20
- package/packages/theme/src/less/component/line.less +21 -21
- package/packages/theme/src/less/component/msg-dark.less +42 -42
- package/packages/theme/src/less/component/msg.less +102 -102
- package/packages/theme/src/less/component/page-dark.less +26 -26
- package/packages/theme/src/less/component/page.less +26 -26
- package/packages/theme/src/less/component/param-dark.less +31 -31
- package/packages/theme/src/less/component/param.less +136 -136
- package/packages/theme/src/less/component/popup-dark.less +20 -20
- package/packages/theme/src/less/component/popup.less +85 -85
- package/packages/theme/src/less/component/print.less +121 -121
- package/packages/theme/src/less/component/scroll-dark.less +19 -19
- package/packages/theme/src/less/component/scroll.less +47 -47
- package/packages/theme/src/less/component/skeleton-dark.less +29 -29
- package/packages/theme/src/less/component/skeleton.less +78 -78
- package/packages/theme/src/less/component/slide.less +70 -70
- package/packages/theme/src/less/component/space.less +2 -2
- package/packages/theme/src/less/component/step-dark.less +165 -165
- package/packages/theme/src/less/component/step.less +147 -147
- package/packages/theme/src/less/component/submit.less +40 -40
- package/packages/theme/src/less/component/tab-dark.less +221 -221
- package/packages/theme/src/less/component/tab.less +469 -462
- package/packages/theme/src/less/component/table-dark.less +196 -196
- package/packages/theme/src/less/component/table.less +435 -435
- package/packages/theme/src/less/component/timeline-dark.less +13 -13
- package/packages/theme/src/less/component/timeline.less +114 -114
- package/packages/theme/src/less/component/tip-dark.less +76 -76
- package/packages/theme/src/less/component/tip.less +139 -139
- package/packages/theme/src/less/component/tooltip-dark.less +105 -105
- package/packages/theme/src/less/component/tooltip.less +159 -159
- package/packages/theme/src/less/component/tree-dark.less +56 -56
- package/packages/theme/src/less/component/tree.less +148 -148
- package/packages/theme/src/less/element/align.less +32 -32
- package/packages/theme/src/less/element/animation.less +5 -5
- package/packages/theme/src/less/element/button-dark.less +29 -29
- package/packages/theme/src/less/element/button.less +65 -65
- package/packages/theme/src/less/element/center-scroll-dark.less +3 -3
- package/packages/theme/src/less/element/center-scroll.less +6 -6
- package/packages/theme/src/less/element/checkbox-dark.less +68 -68
- package/packages/theme/src/less/element/checkbox.less +73 -73
- package/packages/theme/src/less/element/color-dark.less +15 -15
- package/packages/theme/src/less/element/color.less +33 -33
- package/packages/theme/src/less/element/dis.less +9 -9
- package/packages/theme/src/less/element/ellipsis.less +35 -35
- package/packages/theme/src/less/element/emote.less +5 -5
- package/packages/theme/src/less/element/font-dark.less +9 -9
- package/packages/theme/src/less/element/font.less +8 -8
- package/packages/theme/src/less/element/hide-dark.less +114 -114
- package/packages/theme/src/less/element/hide.less +114 -114
- package/packages/theme/src/less/element/icon.less +297 -297
- package/packages/theme/src/less/element/input-dark.less +205 -205
- package/packages/theme/src/less/element/input.less +405 -405
- package/packages/theme/src/less/element/menu-icon.less +1 -1
- package/packages/theme/src/less/element/pic.less +18 -18
- package/packages/theme/src/less/element/progress-dark.less +37 -37
- package/packages/theme/src/less/element/progress.less +82 -82
- package/packages/theme/src/less/element/radio-dark.less +18 -18
- package/packages/theme/src/less/element/radio.less +11 -11
- package/packages/theme/src/less/element/range-dark.less +24 -24
- package/packages/theme/src/less/element/range.less +56 -56
- package/packages/theme/src/less/element/rate.less +17 -17
- package/packages/theme/src/less/element/segment-dark.less +119 -119
- package/packages/theme/src/less/element/segment.less +197 -197
- package/packages/theme/src/less/element/select-dark.less +167 -167
- package/packages/theme/src/less/element/select.less +431 -431
- package/packages/theme/src/less/element/size.less +10 -10
- package/packages/theme/src/less/element/switch-dark.less +7 -7
- package/packages/theme/src/less/element/switch.less +37 -37
- package/packages/theme/src/less/element/tag-dark.less +115 -115
- package/packages/theme/src/less/element/tag.less +159 -159
- package/packages/theme/src/less/element/upload-dark.less +26 -26
- package/packages/theme/src/less/element/upload.less +64 -64
- package/packages/theme/src/less/layout/fix.less +2 -2
- package/packages/theme/src/less/layout/flow.less +47 -47
- package/packages/theme/src/less/layout/grid-dark.less +28 -28
- package/packages/theme/src/less/layout/grid.less +172 -172
- package/packages/theme/src/less/layout/org-dark.less +2 -2
- package/packages/theme/src/less/layout/org.less +72 -72
- package/packages/theme/src/less/layout/padding.less +1 -1
- package/packages/theme/src/less/layout/reverser.less +8 -8
- package/packages/theme/src/less/theme/.DS_Store +0 -0
- package/packages/theme/src/less/theme/B-Design.less +159 -159
- package/packages/theme/src/less/theme/aiplan.less +159 -159
- package/packages/theme/src/less/theme/aiplangd.less +159 -159
- package/packages/theme/src/less/theme/chbn.less +159 -159
- package/packages/theme/src/less/theme/default.less +160 -160
- package/packages/theme/src/less/theme/dt.less +159 -159
- package/packages/theme/src/less/theme/ecloud.less +159 -159
- package/packages/theme/src/less/theme/hongkong.less +159 -159
- package/packages/theme/src/less/theme/narrow.less +160 -160
- package/packages/theme/src/less/theme/sdpf.less +160 -160
- package/packages/theme/src/less/theme/upc.less +159 -159
- package/packages/theme/src/less/theme/website.less +159 -159
- package/packages/theme/src/less/theme/zj.less +159 -159
- package/packages/timeline/index.js +8 -8
- package/packages/timeline/src/timeline.vue +84 -84
- package/packages/tip/index.js +8 -8
- package/packages/tip/src/tip.vue +226 -226
- package/packages/tooltip/.DS_Store +0 -0
- package/packages/tooltip/index.js +8 -8
- package/packages/tooltip/src/directive.js +180 -180
- package/packages/tooltip/src/tooltip.vue +467 -467
- package/packages/transfer/index.js +8 -8
- package/packages/transfer/src/transfer.vue +293 -293
- package/packages/tree/.DS_Store +0 -0
- package/packages/tree/index.js +8 -8
- package/packages/tree/src/tree.vue +518 -518
- package/packages/tree/src/treeItem.vue +443 -443
- package/packages/upload/.DS_Store +0 -0
- package/packages/upload/index.js +8 -8
- package/packages/upload/src/upload.vue +860 -860
- package/src/.DS_Store +0 -0
- package/src/index.js +207 -207
- package/src/locale/format.js +46 -46
- package/src/locale/index.js +48 -48
- package/src/locale/lang/en.js +207 -207
- package/src/locale/lang/zh-CN.js +207 -207
- package/src/mixins/blur.js +9 -9
- package/src/mixins/emitter.js +33 -33
- package/src/mixins/focus.js +9 -9
- package/src/mixins/locale.js +9 -9
- package/src/mixins/migrating.js +54 -54
- package/src/mixins/tip.js +10 -10
- package/src/mixins/transition.js +130 -130
- package/src/msg/index.js +107 -107
- package/src/svg/.DS_Store +0 -0
- package/src/svg/menu/.DS_Store +0 -0
- package/src/svg/menu/main/abnormal-mix.svg +5 -5
- package/src/svg/menu/main/abnormal.svg +5 -5
- package/src/svg/menu/main/accountManager-mix.svg +5 -5
- package/src/svg/menu/main/accountManager.svg +5 -5
- package/src/svg/menu/main/agreement-mix.svg +7 -7
- package/src/svg/menu/main/agreement.svg +7 -7
- package/src/svg/menu/main/ai-mix.svg +5 -5
- package/src/svg/menu/main/archives-mix.svg +6 -6
- package/src/svg/menu/main/arrearsReport-mix.svg +17 -17
- package/src/svg/menu/main/arrearsReport.svg +17 -17
- package/src/svg/menu/main/bill-mix.svg +13 -13
- package/src/svg/menu/main/bill.svg +13 -13
- package/src/svg/menu/main/box-mix.svg +5 -5
- package/src/svg/menu/main/broadband-mix.svg +4 -4
- package/src/svg/menu/main/broadband.svg +4 -4
- package/src/svg/menu/main/card-mix.svg +5 -5
- package/src/svg/menu/main/card.svg +5 -5
- package/src/svg/menu/main/cash-mix.svg +5 -5
- package/src/svg/menu/main/cash.svg +5 -5
- package/src/svg/menu/main/cloud-mix.svg +4 -4
- package/src/svg/menu/main/cloud.svg +4 -4
- package/src/svg/menu/main/clue-mix.svg +10 -10
- package/src/svg/menu/main/clue.svg +10 -10
- package/src/svg/menu/main/commonUse-mix.svg +4 -4
- package/src/svg/menu/main/commonUse.svg +4 -4
- package/src/svg/menu/main/construction-mix.svg +7 -7
- package/src/svg/menu/main/construction.svg +7 -7
- package/src/svg/menu/main/contract-mix.svg +8 -8
- package/src/svg/menu/main/contract.svg +8 -8
- package/src/svg/menu/main/credit-mix.svg +5 -5
- package/src/svg/menu/main/credit.svg +5 -5
- package/src/svg/menu/main/data-mix.svg +5 -5
- package/src/svg/menu/main/data.svg +5 -5
- package/src/svg/menu/main/date-mix.svg +7 -7
- package/src/svg/menu/main/deposit-mix.svg +4 -4
- package/src/svg/menu/main/device-mix.svg +4 -4
- package/src/svg/menu/main/device.svg +4 -4
- package/src/svg/menu/main/discrepancy-mix.svg +5 -5
- package/src/svg/menu/main/door-mix.svg +6 -6
- package/src/svg/menu/main/fault-mix.svg +12 -12
- package/src/svg/menu/main/fault.svg +16 -16
- package/src/svg/menu/main/finance-mix.svg +11 -11
- package/src/svg/menu/main/finance.svg +13 -13
- package/src/svg/menu/main/flow-mix.svg +4 -4
- package/src/svg/menu/main/flow.svg +4 -4
- package/src/svg/menu/main/folder-mix.svg +4 -4
- package/src/svg/menu/main/folder.svg +4 -4
- package/src/svg/menu/main/friendly-mix.svg +5 -5
- package/src/svg/menu/main/fusion-mix.svg +5 -5
- package/src/svg/menu/main/fusion.svg +5 -5
- package/src/svg/menu/main/gift-mix.svg +8 -8
- package/src/svg/menu/main/gift.svg +8 -8
- package/src/svg/menu/main/gps-mix.svg +6 -6
- package/src/svg/menu/main/gps.svg +6 -6
- package/src/svg/menu/main/grid-mix.svg +7 -7
- package/src/svg/menu/main/grid.svg +7 -7
- package/src/svg/menu/main/group-mix.svg +4 -4
- package/src/svg/menu/main/group.svg +4 -4
- package/src/svg/menu/main/home-mix.svg +5 -5
- package/src/svg/menu/main/home.svg +8 -8
- package/src/svg/menu/main/ict-mix.svg +4 -4
- package/src/svg/menu/main/industry-mix.svg +5 -5
- package/src/svg/menu/main/industry.svg +5 -5
- package/src/svg/menu/main/info-mix.svg +9 -9
- package/src/svg/menu/main/info.svg +9 -9
- package/src/svg/menu/main/integral-mix.svg +5 -5
- package/src/svg/menu/main/integral.svg +5 -5
- package/src/svg/menu/main/internet-mix.svg +5 -5
- package/src/svg/menu/main/internet.svg +5 -5
- package/src/svg/menu/main/inventory-mix.svg +5 -5
- package/src/svg/menu/main/invoice-mix.svg +6 -6
- package/src/svg/menu/main/invoice.svg +14 -14
- package/src/svg/menu/main/iot-mix.svg +5 -5
- package/src/svg/menu/main/iot.svg +5 -5
- package/src/svg/menu/main/label-mix.svg +4 -4
- package/src/svg/menu/main/label.svg +4 -4
- package/src/svg/menu/main/love-mix.svg +6 -6
- package/src/svg/menu/main/love.svg +13 -13
- package/src/svg/menu/main/m1-mix.svg +4 -4
- package/src/svg/menu/main/m1.svg +4 -4
- package/src/svg/menu/main/m2-mix.svg +12 -12
- package/src/svg/menu/main/m2.svg +11 -11
- package/src/svg/menu/main/m3-mix.svg +6 -6
- package/src/svg/menu/main/m3.svg +7 -7
- package/src/svg/menu/main/m4-mix.svg +5 -5
- package/src/svg/menu/main/m4.svg +7 -7
- package/src/svg/menu/main/m5-mix.svg +8 -8
- package/src/svg/menu/main/m5.svg +10 -10
- package/src/svg/menu/main/mail-mix.svg +5 -5
- package/src/svg/menu/main/manual-mix.svg +11 -11
- package/src/svg/menu/main/manual.svg +11 -11
- package/src/svg/menu/main/market-mix.svg +4 -4
- package/src/svg/menu/main/market.svg +4 -4
- package/src/svg/menu/main/member-mix.svg +6 -6
- package/src/svg/menu/main/member.svg +6 -6
- package/src/svg/menu/main/menu-mix.svg +4 -4
- package/src/svg/menu/main/menu.svg +4 -4
- package/src/svg/menu/main/message-mix.svg +11 -11
- package/src/svg/menu/main/message.svg +11 -11
- package/src/svg/menu/main/namelist-mix.svg +4 -4
- package/src/svg/menu/main/namelist.svg +4 -4
- package/src/svg/menu/main/net-mix.svg +7 -7
- package/src/svg/menu/main/niche-mix.svg +12 -12
- package/src/svg/menu/main/niche.svg +12 -12
- package/src/svg/menu/main/notice-mix.svg +4 -4
- package/src/svg/menu/main/notice.svg +4 -4
- package/src/svg/menu/main/number-mix.svg +6 -6
- package/src/svg/menu/main/operations-mix.svg +4 -4
- package/src/svg/menu/main/operations.svg +4 -4
- package/src/svg/menu/main/order-mix.svg +8 -8
- package/src/svg/menu/main/order.svg +8 -8
- package/src/svg/menu/main/person-mix.svg +6 -6
- package/src/svg/menu/main/person.svg +6 -6
- package/src/svg/menu/main/phone-mix.svg +4 -4
- package/src/svg/menu/main/phone.svg +4 -4
- package/src/svg/menu/main/phoneBill-mix.svg +6 -6
- package/src/svg/menu/main/phoneBill.svg +6 -6
- package/src/svg/menu/main/preferential-mix.svg +5 -5
- package/src/svg/menu/main/preferential.svg +5 -5
- package/src/svg/menu/main/print-mix.svg +5 -5
- package/src/svg/menu/main/problem-mix.svg +4 -4
- package/src/svg/menu/main/problem.svg +4 -4
- package/src/svg/menu/main/process-mix.svg +4 -4
- package/src/svg/menu/main/process.svg +4 -4
- package/src/svg/menu/main/product-mix.svg +5 -5
- package/src/svg/menu/main/product.svg +6 -6
- package/src/svg/menu/main/qrCode-mix.svg +8 -8
- package/src/svg/menu/main/qrCode.svg +8 -8
- package/src/svg/menu/main/refuelingBag-mix-mix.svg +4 -4
- package/src/svg/menu/main/refuelingBag-mix.svg +4 -4
- package/src/svg/menu/main/reportForm-mix.svg +8 -8
- package/src/svg/menu/main/reportForm.svg +8 -8
- package/src/svg/menu/main/risk-mix.svg +16 -16
- package/src/svg/menu/main/risk.svg +17 -17
- package/src/svg/menu/main/robot-mix.svg +9 -9
- package/src/svg/menu/main/robot.svg +9 -9
- package/src/svg/menu/main/satisfaction-mix.svg +4 -4
- package/src/svg/menu/main/satisfaction.svg +4 -4
- package/src/svg/menu/main/scratchCard-mix.svg +4 -4
- package/src/svg/menu/main/sim-mix.svg +4 -4
- package/src/svg/menu/main/sim.svg +4 -4
- package/src/svg/menu/main/staging-mix.svg +4 -4
- package/src/svg/menu/main/staging.svg +4 -4
- package/src/svg/menu/main/survey-mix.svg +5 -5
- package/src/svg/menu/main/survey.svg +5 -5
- package/src/svg/menu/main/tasks-mix.svg +8 -8
- package/src/svg/menu/main/tasks.svg +8 -8
- package/src/svg/menu/main/telephone-mix.svg +4 -4
- package/src/svg/menu/main/topUp-mix.svg +5 -5
- package/src/svg/menu/main/trajectory-mix.svg +11 -11
- package/src/svg/menu/main/trajectory.svg +23 -23
- package/src/svg/menu/main/transmit-mix.svg +5 -5
- package/src/svg/menu/main/tv-mix.svg +6 -6
- package/src/svg/menu/main/unlock-mix.svg +4 -4
- package/src/svg/menu/main/unlock.svg +4 -4
- package/src/svg/menu/main/view-mix.svg +5 -5
- package/src/svg/menu/main/view.svg +5 -5
- package/src/svg/menu/main/visits-mix.svg +19 -19
- package/src/svg/menu/main/visits.svg +19 -19
- package/src/svg/menu/main/voice-mix.svg +4 -4
- package/src/svg/menu/main/voice.svg +4 -4
- package/src/svg/menu/main/wiki-mix.svg +4 -4
- package/src/svg/menu/main/wiki.svg +4 -4
- package/src/svg/menu/main/workOrder-mix.svg +6 -6
- package/src/svg/menu/main/workOrder.svg +14 -14
- package/src/svg/menu/patch/Mo-space.svg +2 -2
- package/src/svg/menu/patch/Mo.svg +3 -3
- package/src/svg/menu/patch/add-space.svg +3 -3
- package/src/svg/menu/patch/add.svg +3 -3
- package/src/svg/menu/patch/address-space.svg +3 -3
- package/src/svg/menu/patch/address.svg +3 -3
- package/src/svg/menu/patch/approve-space.svg +3 -3
- package/src/svg/menu/patch/approve.svg +4 -4
- package/src/svg/menu/patch/avoid-space.svg +3 -3
- package/src/svg/menu/patch/avoid.svg +3 -3
- package/src/svg/menu/patch/batch-space.svg +3 -3
- package/src/svg/menu/patch/batch.svg +5 -5
- package/src/svg/menu/patch/broadband-space.svg +3 -3
- package/src/svg/menu/patch/broadband.svg +4 -4
- package/src/svg/menu/patch/cancellation-space.svg +3 -3
- package/src/svg/menu/patch/cancellation.svg +3 -3
- package/src/svg/menu/patch/center-space.svg +3 -3
- package/src/svg/menu/patch/center.svg +5 -5
- package/src/svg/menu/patch/change-space.svg +3 -3
- package/src/svg/menu/patch/change.svg +4 -4
- package/src/svg/menu/patch/click-space.svg +3 -3
- package/src/svg/menu/patch/click.svg +4 -4
- package/src/svg/menu/patch/close-1-space.svg +3 -3
- package/src/svg/menu/patch/close-1.svg +3 -3
- package/src/svg/menu/patch/close-space.svg +2 -2
- package/src/svg/menu/patch/close.svg +3 -3
- package/src/svg/menu/patch/collect-space.svg +3 -3
- package/src/svg/menu/patch/collect.svg +3 -3
- package/src/svg/menu/patch/comment-space.svg +3 -3
- package/src/svg/menu/patch/comment.svg +3 -3
- package/src/svg/menu/patch/confirm-space.svg +3 -3
- package/src/svg/menu/patch/confirm.svg +3 -3
- package/src/svg/menu/patch/contract-space.svg +3 -3
- package/src/svg/menu/patch/contract.svg +3 -3
- package/src/svg/menu/patch/credit-space.svg +3 -3
- package/src/svg/menu/patch/credit.svg +5 -5
- package/src/svg/menu/patch/dataMonitoring-space.svg +3 -3
- package/src/svg/menu/patch/dataMonitoring.svg +3 -3
- package/src/svg/menu/patch/dedicatedCircuit-space.svg +3 -3
- package/src/svg/menu/patch/dedicatedCircuit.svg +3 -3
- package/src/svg/menu/patch/detail-space.svg +3 -3
- package/src/svg/menu/patch/detail.svg +3 -3
- package/src/svg/menu/patch/disassemb-space.svg +3 -3
- package/src/svg/menu/patch/disassemb.svg +3 -3
- package/src/svg/menu/patch/earnestMoney-space.svg +3 -3
- package/src/svg/menu/patch/earnestMoney.svg +3 -3
- package/src/svg/menu/patch/empower-space.svg +3 -3
- package/src/svg/menu/patch/empower.svg +3 -3
- package/src/svg/menu/patch/entrust-space.svg +3 -3
- package/src/svg/menu/patch/entrust.svg +3 -3
- package/src/svg/menu/patch/expedite-space.svg +4 -4
- package/src/svg/menu/patch/expedite.svg +4 -4
- package/src/svg/menu/patch/flow-space.svg +3 -3
- package/src/svg/menu/patch/flow.svg +3 -3
- package/src/svg/menu/patch/folder-space.svg +3 -3
- package/src/svg/menu/patch/folder.svg +3 -3
- package/src/svg/menu/patch/forbidden-space.svg +3 -3
- package/src/svg/menu/patch/forbidden.svg +3 -3
- package/src/svg/menu/patch/forward-space.svg +3 -3
- package/src/svg/menu/patch/forward.svg +3 -3
- package/src/svg/menu/patch/fusion-space.svg +3 -3
- package/src/svg/menu/patch/fusion.svg +6 -6
- package/src/svg/menu/patch/history-space.svg +3 -3
- package/src/svg/menu/patch/history.svg +3 -3
- package/src/svg/menu/patch/information-space.svg +3 -3
- package/src/svg/menu/patch/information.svg +3 -3
- package/src/svg/menu/patch/insert-space.svg +3 -3
- package/src/svg/menu/patch/insert.svg +3 -3
- package/src/svg/menu/patch/letv-space.svg +3 -3
- package/src/svg/menu/patch/letv.svg +3 -3
- package/src/svg/menu/patch/link-space.svg +3 -3
- package/src/svg/menu/patch/link.svg +3 -3
- package/src/svg/menu/patch/location-space.svg +3 -3
- package/src/svg/menu/patch/location.svg +3 -3
- package/src/svg/menu/patch/message-space.svg +3 -3
- package/src/svg/menu/patch/message.svg +4 -4
- package/src/svg/menu/patch/minus-space.svg +3 -3
- package/src/svg/menu/patch/minus.svg +3 -3
- package/src/svg/menu/patch/mms-space.svg +3 -3
- package/src/svg/menu/patch/mms.svg +3 -3
- package/src/svg/menu/patch/monitor-space.svg +3 -3
- package/src/svg/menu/patch/monitor.svg +3 -3
- package/src/svg/menu/patch/move-space.svg +3 -3
- package/src/svg/menu/patch/move.svg +3 -3
- package/src/svg/menu/patch/negative-space.svg +2 -2
- package/src/svg/menu/patch/negative.svg +3 -3
- package/src/svg/menu/patch/net-space.svg +2 -2
- package/src/svg/menu/patch/net.svg +3 -3
- package/src/svg/menu/patch/news-space.svg +3 -3
- package/src/svg/menu/patch/news.svg +3 -3
- package/src/svg/menu/patch/notice-space.svg +4 -4
- package/src/svg/menu/patch/notice.svg +5 -5
- package/src/svg/menu/patch/officialBusiness-space.svg +3 -3
- package/src/svg/menu/patch/officialBusiness.svg +4 -4
- package/src/svg/menu/patch/pay-space.svg +3 -3
- package/src/svg/menu/patch/pay.svg +3 -3
- package/src/svg/menu/patch/phone-space.svg +3 -3
- package/src/svg/menu/patch/phone.svg +5 -5
- package/src/svg/menu/patch/print-space.svg +3 -3
- package/src/svg/menu/patch/print.svg +5 -5
- package/src/svg/menu/patch/product-space.svg +3 -3
- package/src/svg/menu/patch/product.svg +5 -5
- package/src/svg/menu/patch/reservation-space.svg +3 -3
- package/src/svg/menu/patch/reservation.svg +3 -3
- package/src/svg/menu/patch/sale-space.svg +3 -3
- package/src/svg/menu/patch/sale.svg +5 -5
- package/src/svg/menu/patch/search-space.svg +3 -3
- package/src/svg/menu/patch/search.svg +3 -3
- package/src/svg/menu/patch/secure-space.svg +3 -3
- package/src/svg/menu/patch/secure.svg +5 -5
- package/src/svg/menu/patch/setup-space.svg +3 -3
- package/src/svg/menu/patch/setup.svg +3 -3
- package/src/svg/menu/patch/shift-space.svg +3 -3
- package/src/svg/menu/patch/shift.svg +3 -3
- package/src/svg/menu/patch/situation-space.svg +3 -3
- package/src/svg/menu/patch/situation.svg +3 -3
- package/src/svg/menu/patch/special-space.svg +3 -3
- package/src/svg/menu/patch/special.svg +3 -3
- package/src/svg/menu/patch/tabulation-space.svg +3 -3
- package/src/svg/menu/patch/tabulation.svg +8 -8
- package/src/svg/menu/patch/track-space.svg +3 -3
- package/src/svg/menu/patch/track.svg +5 -5
- package/src/svg/menu/patch/transaction-space.svg +3 -3
- package/src/svg/menu/patch/transaction.svg +6 -6
- package/src/svg/menu/patch/user-space.svg +3 -3
- package/src/svg/menu/patch/user.svg +3 -3
- package/src/svg/menu/patch/visualize-space.svg +3 -3
- package/src/svg/menu/patch/visualize.svg +4 -4
- package/src/svg/menu/patch/vnet-space.svg +3 -3
- package/src/svg/menu/patch/vnet.svg +3 -3
- package/src/tip/tip.js +160 -160
- package/src/utils/after-leave.js +27 -27
- package/src/utils/ajax.js +59 -59
- package/src/utils/array.js +24 -24
- package/src/utils/clickoutside.js +105 -105
- package/src/utils/compare.js +16 -16
- package/src/utils/date.js +55 -55
- package/src/utils/disabledArea.js +18 -18
- package/src/utils/dom.js +301 -301
- package/src/utils/filetransfer.js +287 -287
- package/src/utils/isModified.js +20 -20
- package/src/utils/jsencrypt/JSEncrypt.js +192 -192
- package/src/utils/jsencrypt/JSEncryptRSAKey.js +320 -320
- package/src/utils/jsencrypt/index.js +3 -3
- package/src/utils/jsencrypt/jselib/asn1js/asn1.d.ts +51 -51
- package/src/utils/jsencrypt/jselib/asn1js/asn1.js +565 -565
- package/src/utils/jsencrypt/jselib/asn1js/base64.d.ts +5 -5
- package/src/utils/jsencrypt/jselib/asn1js/base64.js +88 -88
- package/src/utils/jsencrypt/jselib/asn1js/hex.d.ts +3 -3
- package/src/utils/jsencrypt/jselib/asn1js/hex.js +64 -64
- package/src/utils/jsencrypt/jselib/asn1js/int10.d.ts +9 -9
- package/src/utils/jsencrypt/jselib/asn1js/int10.js +87 -87
- package/src/utils/jsencrypt/jselib/asn1js/oids.d.ts +9778 -9778
- package/src/utils/jsencrypt/jselib/asn1js/oids.js +1962 -1962
- package/src/utils/jsencrypt/jselib/jsbn/base64.d.ts +3 -3
- package/src/utils/jsencrypt/jselib/jsbn/base64.js +76 -76
- package/src/utils/jsencrypt/jselib/jsbn/jsbn.d.ts +98 -98
- package/src/utils/jsencrypt/jselib/jsbn/jsbn.js +1754 -1754
- package/src/utils/jsencrypt/jselib/jsbn/prng4.d.ts +10 -10
- package/src/utils/jsencrypt/jselib/jsbn/prng4.js +46 -46
- package/src/utils/jsencrypt/jselib/jsbn/rng.d.ts +3 -3
- package/src/utils/jsencrypt/jselib/jsbn/rng.js +78 -78
- package/src/utils/jsencrypt/jselib/jsbn/rsa.d.ts +23 -23
- package/src/utils/jsencrypt/jselib/jsbn/rsa.js +373 -373
- package/src/utils/jsencrypt/jselib/jsbn/util.d.ts +7 -7
- package/src/utils/jsencrypt/jselib/jsbn/util.js +58 -58
- package/src/utils/jsencrypt/jselib/jsrsasign/asn1-1.0.js +1593 -1593
- package/src/utils/jsencrypt/jselib/jsrsasign/yahoo.js +63 -63
- package/src/utils/jsencrypt/util.js +58 -58
- package/src/utils/jsencrypt.js +263 -263
- package/src/utils/md5.js +203 -203
- package/src/utils/merge.js +15 -15
- package/src/utils/mime.js +75 -75
- package/src/utils/print.js +39 -39
- package/src/utils/ratio.js +230 -230
- package/src/utils/respo.js +9 -9
- package/src/utils/shared.js +7 -7
- package/src/utils/sign.js +185 -185
- package/src/utils/string.js +13 -13
- package/src/utils/theme.js +91 -91
- package/src/utils/types.js +40 -40
- package/src/utils/util.js +286 -286
- package/src/utils/uuid.js +12 -12
- package/src/utils/validate.js +373 -373
|
@@ -26,10 +26,10 @@ var seed = 0;
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* 判断vnode的子节点的popperElm是否包含targets里的元素对象 xiedx 2021/05/11
|
|
31
|
-
* @param children
|
|
32
|
-
* @param targets
|
|
29
|
+
/**
|
|
30
|
+
* 判断vnode的子节点的popperElm是否包含targets里的元素对象 xiedx 2021/05/11
|
|
31
|
+
* @param children
|
|
32
|
+
* @param targets
|
|
33
33
|
*/
|
|
34
34
|
function childrenPopperContains(children, targets) {
|
|
35
35
|
if (children && children.length) {
|
|
@@ -71,13 +71,13 @@ function createDocumentHandler(el, binding, vnode) {
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
* v-clickoutside
|
|
76
|
-
* @desc 点击元素外面才会触发的事件
|
|
77
|
-
* @example
|
|
78
|
-
* ```vue
|
|
79
|
-
* <div v-element-clickoutside="handleClose">
|
|
80
|
-
* ```
|
|
74
|
+
/**
|
|
75
|
+
* v-clickoutside
|
|
76
|
+
* @desc 点击元素外面才会触发的事件
|
|
77
|
+
* @example
|
|
78
|
+
* ```vue
|
|
79
|
+
* <div v-element-clickoutside="handleClose">
|
|
80
|
+
* ```
|
|
81
81
|
*/
|
|
82
82
|
exports.default = {
|
|
83
83
|
bind: function bind(el, binding, vnode) {
|
package/lib/utils/dom.js
CHANGED
|
@@ -233,10 +233,10 @@ function getEventPath(evt) {
|
|
|
233
233
|
return [target].concat(getParents(target), window);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
/**
|
|
237
|
-
* 兼容获取document element的dataset
|
|
238
|
-
* @param {DocumentElement} ele
|
|
239
|
-
* @returns
|
|
236
|
+
/**
|
|
237
|
+
* 兼容获取document element的dataset
|
|
238
|
+
* @param {DocumentElement} ele
|
|
239
|
+
* @returns
|
|
240
240
|
*/
|
|
241
241
|
function getDataSet(ele) {
|
|
242
242
|
if (!ele) return;
|
|
@@ -276,15 +276,15 @@ function __replaceReg__(str) {
|
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
/**
|
|
280
|
-
* 根据名称查找 Vue 组件
|
|
281
|
-
*
|
|
282
|
-
* 此函数尝试从给定的 DOM 节点开始,向上遍历 DOM 树,以查找具有指定名称的 Vue 组件
|
|
283
|
-
* 它主要用于在复杂的 DOM 结构中定位特定的 Vue 组件实例
|
|
284
|
-
*
|
|
285
|
-
* @param {HTMLElement} dom - 开始查找的 DOM 节点必须是 Vue 组件的关联 DOM 节点
|
|
286
|
-
* @param {string} targetName - 目标 Vue 组件的名称
|
|
287
|
-
* @returns {Object|null} - 返回找到的 Vue 组件实例,如果没有找到则返回 null
|
|
279
|
+
/**
|
|
280
|
+
* 根据名称查找 Vue 组件
|
|
281
|
+
*
|
|
282
|
+
* 此函数尝试从给定的 DOM 节点开始,向上遍历 DOM 树,以查找具有指定名称的 Vue 组件
|
|
283
|
+
* 它主要用于在复杂的 DOM 结构中定位特定的 Vue 组件实例
|
|
284
|
+
*
|
|
285
|
+
* @param {HTMLElement} dom - 开始查找的 DOM 节点必须是 Vue 组件的关联 DOM 节点
|
|
286
|
+
* @param {string} targetName - 目标 Vue 组件的名称
|
|
287
|
+
* @returns {Object|null} - 返回找到的 Vue 组件实例,如果没有找到则返回 null
|
|
288
288
|
*/
|
|
289
289
|
function queryVm(dom, targetName) {
|
|
290
290
|
// 基础检查,确保传入的是 DOM 节点
|
|
@@ -15,10 +15,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
var TIME_OUT = 3 * 60 * 1000;
|
|
16
16
|
var UNITS = ['Byte', 'KB', 'MB', 'GB', 'TB'];
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* new FileTransfer(settings);
|
|
20
|
-
* settings {url:'xx', fileObject: HTML file Object}
|
|
21
|
-
* file {guid:'xx', name:'xx', fileObject:obj}
|
|
18
|
+
/**
|
|
19
|
+
* new FileTransfer(settings);
|
|
20
|
+
* settings {url:'xx', fileObject: HTML file Object}
|
|
21
|
+
* file {guid:'xx', name:'xx', fileObject:obj}
|
|
22
22
|
**/
|
|
23
23
|
if (typeof Object.assign !== 'function') {
|
|
24
24
|
(function () {
|
|
@@ -10,14 +10,14 @@ var _JSEncryptRSAKey = require('./JSEncryptRSAKey');
|
|
|
10
10
|
var _a;
|
|
11
11
|
|
|
12
12
|
var version = typeof process !== 'undefined' ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version : undefined;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
|
|
16
|
-
* possible parameters are:
|
|
17
|
-
* - default_key_size {number} default: 1024 the key size in bit
|
|
18
|
-
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
|
|
19
|
-
* - log {boolean} default: false whether log warn/error or not
|
|
20
|
-
* @constructor
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
|
|
16
|
+
* possible parameters are:
|
|
17
|
+
* - default_key_size {number} default: 1024 the key size in bit
|
|
18
|
+
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
|
|
19
|
+
* - log {boolean} default: false whether log warn/error or not
|
|
20
|
+
* @constructor
|
|
21
21
|
*/
|
|
22
22
|
var JSEncrypt = /** @class */function () {
|
|
23
23
|
function JSEncrypt(options) {
|
|
@@ -31,12 +31,12 @@ var JSEncrypt = /** @class */function () {
|
|
|
31
31
|
// The private and public key.
|
|
32
32
|
this.key = null;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Method to set the rsa key parameter (one method is enough to set both the public
|
|
36
|
-
* and the private key, since the private key contains the public key paramenters)
|
|
37
|
-
* Log a warning if logs are enabled
|
|
38
|
-
* @param {Object|string} key the pem encoded string or an object (with or without header/footer)
|
|
39
|
-
* @public
|
|
34
|
+
/**
|
|
35
|
+
* Method to set the rsa key parameter (one method is enough to set both the public
|
|
36
|
+
* and the private key, since the private key contains the public key paramenters)
|
|
37
|
+
* Log a warning if logs are enabled
|
|
38
|
+
* @param {Object|string} key the pem encoded string or an object (with or without header/footer)
|
|
39
|
+
* @public
|
|
40
40
|
*/
|
|
41
41
|
JSEncrypt.prototype.setKey = function (key) {
|
|
42
42
|
if (this.log && this.key) {
|
|
@@ -44,31 +44,31 @@ var JSEncrypt = /** @class */function () {
|
|
|
44
44
|
}
|
|
45
45
|
this.key = new _JSEncryptRSAKey.JSEncryptRSAKey(key);
|
|
46
46
|
};
|
|
47
|
-
/**
|
|
48
|
-
* Proxy method for setKey, for api compatibility
|
|
49
|
-
* @see setKey
|
|
50
|
-
* @public
|
|
47
|
+
/**
|
|
48
|
+
* Proxy method for setKey, for api compatibility
|
|
49
|
+
* @see setKey
|
|
50
|
+
* @public
|
|
51
51
|
*/
|
|
52
52
|
JSEncrypt.prototype.setPrivateKey = function (privkey) {
|
|
53
53
|
// Create the key.
|
|
54
54
|
this.setKey(privkey);
|
|
55
55
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Proxy method for setKey, for api compatibility
|
|
58
|
-
* @see setKey
|
|
59
|
-
* @public
|
|
56
|
+
/**
|
|
57
|
+
* Proxy method for setKey, for api compatibility
|
|
58
|
+
* @see setKey
|
|
59
|
+
* @public
|
|
60
60
|
*/
|
|
61
61
|
JSEncrypt.prototype.setPublicKey = function (pubkey) {
|
|
62
62
|
// Sets the public key.
|
|
63
63
|
this.setKey(pubkey);
|
|
64
64
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Proxy method for RSAKey object's decrypt, decrypt the string using the private
|
|
67
|
-
* components of the rsa key object. Note that if the object was not set will be created
|
|
68
|
-
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
69
|
-
* @param {string} str base64 encoded crypted string to decrypt
|
|
70
|
-
* @return {string} the decrypted string
|
|
71
|
-
* @public
|
|
65
|
+
/**
|
|
66
|
+
* Proxy method for RSAKey object's decrypt, decrypt the string using the private
|
|
67
|
+
* components of the rsa key object. Note that if the object was not set will be created
|
|
68
|
+
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
69
|
+
* @param {string} str base64 encoded crypted string to decrypt
|
|
70
|
+
* @return {string} the decrypted string
|
|
71
|
+
* @public
|
|
72
72
|
*/
|
|
73
73
|
JSEncrypt.prototype.decrypt = function (str) {
|
|
74
74
|
// Return the decrypted string.
|
|
@@ -78,13 +78,13 @@ var JSEncrypt = /** @class */function () {
|
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
/**
|
|
82
|
-
* Proxy method for RSAKey object's encrypt, encrypt the string using the public
|
|
83
|
-
* components of the rsa key object. Note that if the object was not set will be created
|
|
84
|
-
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
85
|
-
* @param {string} str the string to encrypt
|
|
86
|
-
* @return {string} the encrypted string encoded in base64
|
|
87
|
-
* @public
|
|
81
|
+
/**
|
|
82
|
+
* Proxy method for RSAKey object's encrypt, encrypt the string using the public
|
|
83
|
+
* components of the rsa key object. Note that if the object was not set will be created
|
|
84
|
+
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
85
|
+
* @param {string} str the string to encrypt
|
|
86
|
+
* @return {string} the encrypted string encoded in base64
|
|
87
|
+
* @public
|
|
88
88
|
*/
|
|
89
89
|
JSEncrypt.prototype.encrypt = function (str) {
|
|
90
90
|
// Return the encrypted string.
|
|
@@ -94,13 +94,13 @@ var JSEncrypt = /** @class */function () {
|
|
|
94
94
|
return false;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Proxy method for RSAKey object's sign.
|
|
99
|
-
* @param {string} str the string to sign
|
|
100
|
-
* @param {function} digestMethod hash method
|
|
101
|
-
* @param {string} digestName the name of the hash algorithm
|
|
102
|
-
* @return {string} the signature encoded in base64
|
|
103
|
-
* @public
|
|
97
|
+
/**
|
|
98
|
+
* Proxy method for RSAKey object's sign.
|
|
99
|
+
* @param {string} str the string to sign
|
|
100
|
+
* @param {function} digestMethod hash method
|
|
101
|
+
* @param {string} digestName the name of the hash algorithm
|
|
102
|
+
* @return {string} the signature encoded in base64
|
|
103
|
+
* @public
|
|
104
104
|
*/
|
|
105
105
|
JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {
|
|
106
106
|
// return the RSA signature of 'str' in 'hex' format.
|
|
@@ -110,13 +110,13 @@ var JSEncrypt = /** @class */function () {
|
|
|
110
110
|
return false;
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
/**
|
|
114
|
-
* Proxy method for RSAKey object's verify.
|
|
115
|
-
* @param {string} str the string to verify
|
|
116
|
-
* @param {string} signature the signature encoded in base64 to compare the string to
|
|
117
|
-
* @param {function} digestMethod hash method
|
|
118
|
-
* @return {boolean} whether the data and signature match
|
|
119
|
-
* @public
|
|
113
|
+
/**
|
|
114
|
+
* Proxy method for RSAKey object's verify.
|
|
115
|
+
* @param {string} str the string to verify
|
|
116
|
+
* @param {string} signature the signature encoded in base64 to compare the string to
|
|
117
|
+
* @param {function} digestMethod hash method
|
|
118
|
+
* @return {boolean} whether the data and signature match
|
|
119
|
+
* @public
|
|
120
120
|
*/
|
|
121
121
|
JSEncrypt.prototype.verify = function (str, signature, digestMethod) {
|
|
122
122
|
// Return the decrypted 'digest' of the signature.
|
|
@@ -126,13 +126,13 @@ var JSEncrypt = /** @class */function () {
|
|
|
126
126
|
return false;
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
/**
|
|
130
|
-
* Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
|
|
131
|
-
* will be created and returned
|
|
132
|
-
* @param {callback} [cb] the callback to be called if we want the key to be generated
|
|
133
|
-
* in an async fashion
|
|
134
|
-
* @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
|
|
135
|
-
* @public
|
|
129
|
+
/**
|
|
130
|
+
* Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
|
|
131
|
+
* will be created and returned
|
|
132
|
+
* @param {callback} [cb] the callback to be called if we want the key to be generated
|
|
133
|
+
* in an async fashion
|
|
134
|
+
* @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
|
|
135
|
+
* @public
|
|
136
136
|
*/
|
|
137
137
|
JSEncrypt.prototype.getKey = function (cb) {
|
|
138
138
|
// Only create new if it does not exist.
|
|
@@ -148,41 +148,41 @@ var JSEncrypt = /** @class */function () {
|
|
|
148
148
|
}
|
|
149
149
|
return this.key;
|
|
150
150
|
};
|
|
151
|
-
/**
|
|
152
|
-
* Returns the pem encoded representation of the private key
|
|
153
|
-
* If the key doesn't exists a new key will be created
|
|
154
|
-
* @returns {string} pem encoded representation of the private key WITH header and footer
|
|
155
|
-
* @public
|
|
151
|
+
/**
|
|
152
|
+
* Returns the pem encoded representation of the private key
|
|
153
|
+
* If the key doesn't exists a new key will be created
|
|
154
|
+
* @returns {string} pem encoded representation of the private key WITH header and footer
|
|
155
|
+
* @public
|
|
156
156
|
*/
|
|
157
157
|
JSEncrypt.prototype.getPrivateKey = function () {
|
|
158
158
|
// Return the private representation of this key.
|
|
159
159
|
return this.getKey().getPrivateKey();
|
|
160
160
|
};
|
|
161
|
-
/**
|
|
162
|
-
* Returns the pem encoded representation of the private key
|
|
163
|
-
* If the key doesn't exists a new key will be created
|
|
164
|
-
* @returns {string} pem encoded representation of the private key WITHOUT header and footer
|
|
165
|
-
* @public
|
|
161
|
+
/**
|
|
162
|
+
* Returns the pem encoded representation of the private key
|
|
163
|
+
* If the key doesn't exists a new key will be created
|
|
164
|
+
* @returns {string} pem encoded representation of the private key WITHOUT header and footer
|
|
165
|
+
* @public
|
|
166
166
|
*/
|
|
167
167
|
JSEncrypt.prototype.getPrivateKeyB64 = function () {
|
|
168
168
|
// Return the private representation of this key.
|
|
169
169
|
return this.getKey().getPrivateBaseKeyB64();
|
|
170
170
|
};
|
|
171
|
-
/**
|
|
172
|
-
* Returns the pem encoded representation of the public key
|
|
173
|
-
* If the key doesn't exists a new key will be created
|
|
174
|
-
* @returns {string} pem encoded representation of the public key WITH header and footer
|
|
175
|
-
* @public
|
|
171
|
+
/**
|
|
172
|
+
* Returns the pem encoded representation of the public key
|
|
173
|
+
* If the key doesn't exists a new key will be created
|
|
174
|
+
* @returns {string} pem encoded representation of the public key WITH header and footer
|
|
175
|
+
* @public
|
|
176
176
|
*/
|
|
177
177
|
JSEncrypt.prototype.getPublicKey = function () {
|
|
178
178
|
// Return the private representation of this key.
|
|
179
179
|
return this.getKey().getPublicKey();
|
|
180
180
|
};
|
|
181
|
-
/**
|
|
182
|
-
* Returns the pem encoded representation of the public key
|
|
183
|
-
* If the key doesn't exists a new key will be created
|
|
184
|
-
* @returns {string} pem encoded representation of the public key WITHOUT header and footer
|
|
185
|
-
* @public
|
|
181
|
+
/**
|
|
182
|
+
* Returns the pem encoded representation of the public key
|
|
183
|
+
* If the key doesn't exists a new key will be created
|
|
184
|
+
* @returns {string} pem encoded representation of the public key WITHOUT header and footer
|
|
185
|
+
* @public
|
|
186
186
|
*/
|
|
187
187
|
JSEncrypt.prototype.getPublicKeyB64 = function () {
|
|
188
188
|
// Return the private representation of this key.
|
|
@@ -40,12 +40,12 @@ var __extends = undefined && undefined.__extends || function () {
|
|
|
40
40
|
};
|
|
41
41
|
}();
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.
|
|
45
|
-
* This object is just a decorator for parsing the key parameter
|
|
46
|
-
* @param {string|Object} key - The key in string format, or an object containing
|
|
47
|
-
* the parameters needed to build a RSAKey object.
|
|
48
|
-
* @constructor
|
|
43
|
+
/**
|
|
44
|
+
* Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.
|
|
45
|
+
* This object is just a decorator for parsing the key parameter
|
|
46
|
+
* @param {string|Object} key - The key in string format, or an object containing
|
|
47
|
+
* the parameters needed to build a RSAKey object.
|
|
48
|
+
* @constructor
|
|
49
49
|
*/
|
|
50
50
|
var JSEncryptRSAKey = /** @class */function (_super) {
|
|
51
51
|
__extends(JSEncryptRSAKey, _super);
|
|
@@ -65,33 +65,33 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
65
65
|
}
|
|
66
66
|
return _this;
|
|
67
67
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Method to parse a pem encoded string containing both a public or private key.
|
|
70
|
-
* The method will translate the pem encoded string in a der encoded string and
|
|
71
|
-
* will parse private key and public key parameters. This method accepts public key
|
|
72
|
-
* in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).
|
|
73
|
-
*
|
|
74
|
-
* @todo Check how many rsa formats use the same format of pkcs #1.
|
|
75
|
-
*
|
|
76
|
-
* The format is defined as:
|
|
77
|
-
* PublicKeyInfo ::= SEQUENCE {
|
|
78
|
-
* algorithm AlgorithmIdentifier,
|
|
79
|
-
* PublicKey BIT STRING
|
|
80
|
-
* }
|
|
81
|
-
* Where AlgorithmIdentifier is:
|
|
82
|
-
* AlgorithmIdentifier ::= SEQUENCE {
|
|
83
|
-
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
|
|
84
|
-
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
|
|
85
|
-
* }
|
|
86
|
-
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
|
|
87
|
-
* RSAPublicKey ::= SEQUENCE {
|
|
88
|
-
* modulus INTEGER, -- n
|
|
89
|
-
* publicExponent INTEGER -- e
|
|
90
|
-
* }
|
|
91
|
-
* it's possible to examine the structure of the keys obtained from openssl using
|
|
92
|
-
* an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/
|
|
93
|
-
* @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer
|
|
94
|
-
* @private
|
|
68
|
+
/**
|
|
69
|
+
* Method to parse a pem encoded string containing both a public or private key.
|
|
70
|
+
* The method will translate the pem encoded string in a der encoded string and
|
|
71
|
+
* will parse private key and public key parameters. This method accepts public key
|
|
72
|
+
* in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).
|
|
73
|
+
*
|
|
74
|
+
* @todo Check how many rsa formats use the same format of pkcs #1.
|
|
75
|
+
*
|
|
76
|
+
* The format is defined as:
|
|
77
|
+
* PublicKeyInfo ::= SEQUENCE {
|
|
78
|
+
* algorithm AlgorithmIdentifier,
|
|
79
|
+
* PublicKey BIT STRING
|
|
80
|
+
* }
|
|
81
|
+
* Where AlgorithmIdentifier is:
|
|
82
|
+
* AlgorithmIdentifier ::= SEQUENCE {
|
|
83
|
+
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
|
|
84
|
+
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
|
|
85
|
+
* }
|
|
86
|
+
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
|
|
87
|
+
* RSAPublicKey ::= SEQUENCE {
|
|
88
|
+
* modulus INTEGER, -- n
|
|
89
|
+
* publicExponent INTEGER -- e
|
|
90
|
+
* }
|
|
91
|
+
* it's possible to examine the structure of the keys obtained from openssl using
|
|
92
|
+
* an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/
|
|
93
|
+
* @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer
|
|
94
|
+
* @private
|
|
95
95
|
*/
|
|
96
96
|
JSEncryptRSAKey.prototype.parseKey = function (pem) {
|
|
97
97
|
try {
|
|
@@ -146,23 +146,23 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
146
146
|
return false;
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
/**
|
|
150
|
-
* Translate rsa parameters in a hex encoded string representing the rsa key.
|
|
151
|
-
*
|
|
152
|
-
* The translation follow the ASN.1 notation :
|
|
153
|
-
* RSAPrivateKey ::= SEQUENCE {
|
|
154
|
-
* version Version,
|
|
155
|
-
* modulus INTEGER, -- n
|
|
156
|
-
* publicExponent INTEGER, -- e
|
|
157
|
-
* privateExponent INTEGER, -- d
|
|
158
|
-
* prime1 INTEGER, -- p
|
|
159
|
-
* prime2 INTEGER, -- q
|
|
160
|
-
* exponent1 INTEGER, -- d mod (p1)
|
|
161
|
-
* exponent2 INTEGER, -- d mod (q-1)
|
|
162
|
-
* coefficient INTEGER, -- (inverse of q) mod p
|
|
163
|
-
* }
|
|
164
|
-
* @returns {string} DER Encoded String representing the rsa private key
|
|
165
|
-
* @private
|
|
149
|
+
/**
|
|
150
|
+
* Translate rsa parameters in a hex encoded string representing the rsa key.
|
|
151
|
+
*
|
|
152
|
+
* The translation follow the ASN.1 notation :
|
|
153
|
+
* RSAPrivateKey ::= SEQUENCE {
|
|
154
|
+
* version Version,
|
|
155
|
+
* modulus INTEGER, -- n
|
|
156
|
+
* publicExponent INTEGER, -- e
|
|
157
|
+
* privateExponent INTEGER, -- d
|
|
158
|
+
* prime1 INTEGER, -- p
|
|
159
|
+
* prime2 INTEGER, -- q
|
|
160
|
+
* exponent1 INTEGER, -- d mod (p1)
|
|
161
|
+
* exponent2 INTEGER, -- d mod (q-1)
|
|
162
|
+
* coefficient INTEGER, -- (inverse of q) mod p
|
|
163
|
+
* }
|
|
164
|
+
* @returns {string} DER Encoded String representing the rsa private key
|
|
165
|
+
* @private
|
|
166
166
|
*/
|
|
167
167
|
JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {
|
|
168
168
|
var options = {
|
|
@@ -171,33 +171,33 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
171
171
|
var seq = new _asn2.KJUR.asn1.DERSequence(options);
|
|
172
172
|
return seq.getEncodedHex();
|
|
173
173
|
};
|
|
174
|
-
/**
|
|
175
|
-
* base64 (pem) encoded version of the DER encoded representation
|
|
176
|
-
* @returns {string} pem encoded representation without header and footer
|
|
177
|
-
* @public
|
|
174
|
+
/**
|
|
175
|
+
* base64 (pem) encoded version of the DER encoded representation
|
|
176
|
+
* @returns {string} pem encoded representation without header and footer
|
|
177
|
+
* @public
|
|
178
178
|
*/
|
|
179
179
|
JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {
|
|
180
180
|
return (0, _base.hex2b64)(this.getPrivateBaseKey());
|
|
181
181
|
};
|
|
182
|
-
/**
|
|
183
|
-
* Translate rsa parameters in a hex encoded string representing the rsa public key.
|
|
184
|
-
* The representation follow the ASN.1 notation :
|
|
185
|
-
* PublicKeyInfo ::= SEQUENCE {
|
|
186
|
-
* algorithm AlgorithmIdentifier,
|
|
187
|
-
* PublicKey BIT STRING
|
|
188
|
-
* }
|
|
189
|
-
* Where AlgorithmIdentifier is:
|
|
190
|
-
* AlgorithmIdentifier ::= SEQUENCE {
|
|
191
|
-
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
|
|
192
|
-
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
|
|
193
|
-
* }
|
|
194
|
-
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
|
|
195
|
-
* RSAPublicKey ::= SEQUENCE {
|
|
196
|
-
* modulus INTEGER, -- n
|
|
197
|
-
* publicExponent INTEGER -- e
|
|
198
|
-
* }
|
|
199
|
-
* @returns {string} DER Encoded String representing the rsa public key
|
|
200
|
-
* @private
|
|
182
|
+
/**
|
|
183
|
+
* Translate rsa parameters in a hex encoded string representing the rsa public key.
|
|
184
|
+
* The representation follow the ASN.1 notation :
|
|
185
|
+
* PublicKeyInfo ::= SEQUENCE {
|
|
186
|
+
* algorithm AlgorithmIdentifier,
|
|
187
|
+
* PublicKey BIT STRING
|
|
188
|
+
* }
|
|
189
|
+
* Where AlgorithmIdentifier is:
|
|
190
|
+
* AlgorithmIdentifier ::= SEQUENCE {
|
|
191
|
+
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
|
|
192
|
+
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
|
|
193
|
+
* }
|
|
194
|
+
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
|
|
195
|
+
* RSAPublicKey ::= SEQUENCE {
|
|
196
|
+
* modulus INTEGER, -- n
|
|
197
|
+
* publicExponent INTEGER -- e
|
|
198
|
+
* }
|
|
199
|
+
* @returns {string} DER Encoded String representing the rsa public key
|
|
200
|
+
* @private
|
|
201
201
|
*/
|
|
202
202
|
JSEncryptRSAKey.prototype.getPublicBaseKey = function () {
|
|
203
203
|
var first_sequence = new _asn2.KJUR.asn1.DERSequence({
|
|
@@ -214,21 +214,21 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
214
214
|
});
|
|
215
215
|
return seq.getEncodedHex();
|
|
216
216
|
};
|
|
217
|
-
/**
|
|
218
|
-
* base64 (pem) encoded version of the DER encoded representation
|
|
219
|
-
* @returns {string} pem encoded representation without header and footer
|
|
220
|
-
* @public
|
|
217
|
+
/**
|
|
218
|
+
* base64 (pem) encoded version of the DER encoded representation
|
|
219
|
+
* @returns {string} pem encoded representation without header and footer
|
|
220
|
+
* @public
|
|
221
221
|
*/
|
|
222
222
|
JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {
|
|
223
223
|
return (0, _base.hex2b64)(this.getPublicBaseKey());
|
|
224
224
|
};
|
|
225
|
-
/**
|
|
226
|
-
* wrap the string in block of width chars. The default value for rsa keys is 64
|
|
227
|
-
* characters.
|
|
228
|
-
* @param {string} str the pem encoded string without header and footer
|
|
229
|
-
* @param {Number} [width=64] - the length the string has to be wrapped at
|
|
230
|
-
* @returns {string}
|
|
231
|
-
* @private
|
|
225
|
+
/**
|
|
226
|
+
* wrap the string in block of width chars. The default value for rsa keys is 64
|
|
227
|
+
* characters.
|
|
228
|
+
* @param {string} str the pem encoded string without header and footer
|
|
229
|
+
* @param {Number} [width=64] - the length the string has to be wrapped at
|
|
230
|
+
* @returns {string}
|
|
231
|
+
* @private
|
|
232
232
|
*/
|
|
233
233
|
JSEncryptRSAKey.wordwrap = function (str, width) {
|
|
234
234
|
width = width || 64;
|
|
@@ -238,10 +238,10 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
238
238
|
var regex = '(.{1,' + width + '})( +|$\n?)|(.{1,' + width + '})';
|
|
239
239
|
return str.match(RegExp(regex, 'g')).join('\n');
|
|
240
240
|
};
|
|
241
|
-
/**
|
|
242
|
-
* Retrieve the pem encoded private key
|
|
243
|
-
* @returns {string} the pem encoded private key with header/footer
|
|
244
|
-
* @public
|
|
241
|
+
/**
|
|
242
|
+
* Retrieve the pem encoded private key
|
|
243
|
+
* @returns {string} the pem encoded private key with header/footer
|
|
244
|
+
* @public
|
|
245
245
|
*/
|
|
246
246
|
JSEncryptRSAKey.prototype.getPrivateKey = function () {
|
|
247
247
|
var key = '-----BEGIN RSA PRIVATE KEY-----\n';
|
|
@@ -249,10 +249,10 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
249
249
|
key += '-----END RSA PRIVATE KEY-----';
|
|
250
250
|
return key;
|
|
251
251
|
};
|
|
252
|
-
/**
|
|
253
|
-
* Retrieve the pem encoded public key
|
|
254
|
-
* @returns {string} the pem encoded public key with header/footer
|
|
255
|
-
* @public
|
|
252
|
+
/**
|
|
253
|
+
* Retrieve the pem encoded public key
|
|
254
|
+
* @returns {string} the pem encoded public key with header/footer
|
|
255
|
+
* @public
|
|
256
256
|
*/
|
|
257
257
|
JSEncryptRSAKey.prototype.getPublicKey = function () {
|
|
258
258
|
var key = '-----BEGIN PUBLIC KEY-----\n';
|
|
@@ -260,39 +260,39 @@ var JSEncryptRSAKey = /** @class */function (_super) {
|
|
|
260
260
|
key += '-----END PUBLIC KEY-----';
|
|
261
261
|
return key;
|
|
262
262
|
};
|
|
263
|
-
/**
|
|
264
|
-
* Check if the object contains the necessary parameters to populate the rsa modulus
|
|
265
|
-
* and public exponent parameters.
|
|
266
|
-
* @param {Object} [obj={}] - An object that may contain the two public key
|
|
267
|
-
* parameters
|
|
268
|
-
* @returns {boolean} true if the object contains both the modulus and the public exponent
|
|
269
|
-
* properties (n and e)
|
|
270
|
-
* @todo check for types of n and e. N should be a parseable bigInt object, E should
|
|
271
|
-
* be a parseable integer number
|
|
272
|
-
* @private
|
|
263
|
+
/**
|
|
264
|
+
* Check if the object contains the necessary parameters to populate the rsa modulus
|
|
265
|
+
* and public exponent parameters.
|
|
266
|
+
* @param {Object} [obj={}] - An object that may contain the two public key
|
|
267
|
+
* parameters
|
|
268
|
+
* @returns {boolean} true if the object contains both the modulus and the public exponent
|
|
269
|
+
* properties (n and e)
|
|
270
|
+
* @todo check for types of n and e. N should be a parseable bigInt object, E should
|
|
271
|
+
* be a parseable integer number
|
|
272
|
+
* @private
|
|
273
273
|
*/
|
|
274
274
|
JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {
|
|
275
275
|
obj = obj || {};
|
|
276
276
|
return obj.hasOwnProperty('n') && obj.hasOwnProperty('e');
|
|
277
277
|
};
|
|
278
|
-
/**
|
|
279
|
-
* Check if the object contains ALL the parameters of an RSA key.
|
|
280
|
-
* @param {Object} [obj={}] - An object that may contain nine rsa key
|
|
281
|
-
* parameters
|
|
282
|
-
* @returns {boolean} true if the object contains all the parameters needed
|
|
283
|
-
* @todo check for types of the parameters all the parameters but the public exponent
|
|
284
|
-
* should be parseable bigint objects, the public exponent should be a parseable integer number
|
|
285
|
-
* @private
|
|
278
|
+
/**
|
|
279
|
+
* Check if the object contains ALL the parameters of an RSA key.
|
|
280
|
+
* @param {Object} [obj={}] - An object that may contain nine rsa key
|
|
281
|
+
* parameters
|
|
282
|
+
* @returns {boolean} true if the object contains all the parameters needed
|
|
283
|
+
* @todo check for types of the parameters all the parameters but the public exponent
|
|
284
|
+
* should be parseable bigint objects, the public exponent should be a parseable integer number
|
|
285
|
+
* @private
|
|
286
286
|
*/
|
|
287
287
|
JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {
|
|
288
288
|
obj = obj || {};
|
|
289
289
|
return obj.hasOwnProperty('n') && obj.hasOwnProperty('e') && obj.hasOwnProperty('d') && obj.hasOwnProperty('p') && obj.hasOwnProperty('q') && obj.hasOwnProperty('dmp1') && obj.hasOwnProperty('dmq1') && obj.hasOwnProperty('coeff');
|
|
290
290
|
};
|
|
291
|
-
/**
|
|
292
|
-
* Parse the properties of obj in the current rsa object. Obj should AT LEAST
|
|
293
|
-
* include the modulus and public exponent (n, e) parameters.
|
|
294
|
-
* @param {Object} obj - the object containing rsa parameters
|
|
295
|
-
* @private
|
|
291
|
+
/**
|
|
292
|
+
* Parse the properties of obj in the current rsa object. Obj should AT LEAST
|
|
293
|
+
* include the modulus and public exponent (n, e) parameters.
|
|
294
|
+
* @param {Object} obj - the object containing rsa parameters
|
|
295
|
+
* @private
|
|
296
296
|
*/
|
|
297
297
|
JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {
|
|
298
298
|
this.n = obj.n;
|
|
@@ -459,10 +459,10 @@ var ASN1 = /** @class */function () {
|
|
|
459
459
|
}
|
|
460
460
|
return buf;
|
|
461
461
|
};
|
|
462
|
-
/**
|
|
463
|
-
* Retrieve the hexadecimal value (as a string) of the current ASN.1 element
|
|
464
|
-
* @returns {string}
|
|
465
|
-
* @public
|
|
462
|
+
/**
|
|
463
|
+
* Retrieve the hexadecimal value (as a string) of the current ASN.1 element
|
|
464
|
+
* @returns {string}
|
|
465
|
+
* @public
|
|
466
466
|
*/
|
|
467
467
|
ASN1.prototype.getHexStringValue = function () {
|
|
468
468
|
var hexString = this.toHexString();
|