bkui-vue 2.0.1-beta.11 → 2.0.1-beta.111
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 +15 -0
- package/dist/index.cjs.js +142 -168
- package/dist/index.esm.js +29125 -32074
- package/dist/index.umd.js +142 -168
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +1 -0
- package/lib/affix/index.d.ts +111 -57
- package/lib/affix/index.js +24 -24
- package/lib/alert/alert.d.ts +5 -12
- package/lib/alert/alert.variable.css +1 -0
- package/lib/alert/index.d.ts +131 -93
- package/lib/alert/index.js +25 -25
- package/lib/animate-number/index.d.ts +96 -33
- package/lib/animate-number/index.js +7 -8
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/backtop.variable.css +1 -0
- package/lib/backtop/index.d.ts +118 -70
- package/lib/backtop/index.js +16 -17
- package/lib/badge/badge.variable.css +1 -0
- package/lib/badge/index.d.ts +152 -119
- package/lib/badge/index.js +20 -20
- package/lib/breadcrumb/breadcrumb.variable.css +1 -0
- package/lib/breadcrumb/index.d.ts +119 -67
- package/lib/breadcrumb/index.js +17 -17
- package/lib/button/button.css +188 -144
- package/lib/button/button.d.ts +10 -10
- package/lib/button/button.less +74 -71
- package/lib/button/button.variable.css +189 -144
- package/lib/button/index.d.ts +160 -124
- package/lib/button/index.js +26 -26
- package/lib/card/card.variable.css +1 -0
- package/lib/card/index.d.ts +157 -128
- package/lib/card/index.js +22 -20
- package/lib/cascader/cascader-panel.d.ts +6 -1
- package/lib/cascader/cascader.css +4 -0
- package/lib/cascader/cascader.d.ts +8 -4
- package/lib/cascader/cascader.less +5 -0
- package/lib/cascader/cascader.variable.css +5 -0
- package/lib/cascader/index.d.ts +355 -393
- package/lib/cascader/index.js +377 -308
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +0 -16
- package/lib/checkbox/checkbox.css +8 -0
- package/lib/checkbox/checkbox.d.ts +40 -8
- package/lib/checkbox/checkbox.less +12 -0
- package/lib/checkbox/checkbox.variable.css +9 -0
- package/lib/checkbox/index.d.ts +194 -127
- package/lib/checkbox/index.js +65 -52
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.variable.css +1 -0
- package/lib/code-diff/index.d.ts +82 -65
- package/lib/code-diff/index.js +446 -389
- package/lib/collapse/collapse-panel.d.ts +5 -5
- package/lib/collapse/collapse.variable.css +1 -0
- package/lib/collapse/index.d.ts +180 -161
- package/lib/collapse/index.js +31 -30
- package/lib/collapse/props.d.ts +2 -2
- package/lib/collapse/utils.d.ts +2 -2
- package/lib/collapse-transition/collapse-transition.variable.css +1 -0
- package/lib/collapse-transition/index.d.ts +94 -19
- package/lib/collapse-transition/index.js +3 -4
- package/lib/color-picker/color-picker.d.ts +17 -1
- package/lib/color-picker/color-picker.variable.css +1 -0
- package/lib/color-picker/index.d.ts +168 -124
- package/lib/color-picker/index.js +93 -88
- package/lib/components.d.ts +30 -32
- package/lib/components.js +29 -31
- package/lib/config-provider/config-provider.variable.css +1 -0
- package/lib/config-provider/index.d.ts +228 -161
- package/lib/config-provider/index.js +17 -17
- package/lib/container/container.d.ts +1 -1
- package/lib/container/container.variable.css +1 -0
- package/lib/container/index.d.ts +85 -74
- package/lib/container/index.js +32 -35
- package/lib/date-picker/base/date-table.d.ts +1 -1
- package/lib/date-picker/base/month-table.d.ts +1 -1
- package/lib/date-picker/base/picker-dropdown.d.ts +2 -2
- package/lib/date-picker/base/time-spinner.d.ts +3 -3
- package/lib/date-picker/base/year-table.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +7 -15
- package/lib/date-picker/date-picker.variable.css +1 -0
- package/lib/date-picker/index.d.ts +356 -399
- package/lib/date-picker/index.js +343 -297
- package/lib/date-picker/interface.d.ts +9 -9
- package/lib/date-picker/panel/date-range.d.ts +6 -6
- package/lib/date-picker/panel/date.d.ts +2 -2
- package/lib/date-picker/panel/time-range.d.ts +3 -12
- package/lib/date-picker/panel/time.d.ts +3 -12
- package/lib/date-picker/props.d.ts +1 -5
- package/lib/date-picker/time-picker.d.ts +7 -14
- package/lib/date-picker/utils.d.ts +1 -1
- package/lib/dialog/dialog.d.ts +47 -31
- package/lib/dialog/dialog.variable.css +1 -0
- package/lib/dialog/index.d.ts +309 -305
- package/lib/dialog/index.js +252 -249
- package/lib/dialog/props.d.ts +20 -13
- package/lib/directives/index.d.ts +4 -3
- package/lib/directives/index.js +219 -197
- package/lib/directives/tooltips.d.ts +1 -1
- package/lib/dist.index.js +2 -4
- package/lib/divider/divider.d.ts +5 -5
- package/lib/divider/divider.variable.css +1 -0
- package/lib/divider/index.d.ts +116 -62
- package/lib/divider/index.js +4 -5
- package/lib/divider/props.d.ts +2 -2
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown-menu.d.ts +1 -1
- package/lib/dropdown/dropdown.d.ts +7 -7
- package/lib/dropdown/dropdown.variable.css +1 -0
- package/lib/dropdown/index.d.ts +144 -102
- package/lib/dropdown/index.js +32 -32
- package/lib/exception/exception.d.ts +9 -9
- package/lib/exception/exception.variable.css +1 -0
- package/lib/exception/index.d.ts +107 -46
- package/lib/exception/index.js +31 -31
- package/lib/exception/typings/index.d.ts +1 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +1 -0
- package/lib/fixed-navbar/index.d.ts +113 -59
- package/lib/fixed-navbar/index.js +4 -5
- package/lib/form/form-item.d.ts +7 -19
- package/lib/form/form.d.ts +3 -3
- package/lib/form/form.variable.css +1 -0
- package/lib/form/index.d.ts +139 -94
- package/lib/form/index.js +44 -42
- package/lib/form/type.d.ts +2 -2
- package/lib/icon/angle-double-down-line.js +17 -17
- package/lib/icon/angle-double-left-line.js +17 -17
- package/lib/icon/angle-double-left.js +17 -17
- package/lib/icon/angle-double-right-line.js +17 -17
- package/lib/icon/angle-double-right.js +17 -17
- package/lib/icon/angle-double-up-line.js +17 -17
- package/lib/icon/angle-down-fill.js +17 -17
- package/lib/icon/angle-down-line.js +17 -17
- package/lib/icon/angle-down.js +17 -17
- package/lib/icon/angle-left.js +17 -17
- package/lib/icon/angle-right.js +17 -17
- package/lib/icon/angle-up-fill.js +17 -17
- package/lib/icon/angle-up.js +17 -17
- package/lib/icon/archive-fill.js +17 -17
- package/lib/icon/arrows-left.js +17 -17
- package/lib/icon/arrows-right.js +17 -17
- package/lib/icon/assistant.js +17 -17
- package/lib/icon/audio-fill.js +17 -17
- package/lib/icon/bk.js +17 -17
- package/lib/icon/circle.js +17 -17
- package/lib/icon/close-line.js +17 -17
- package/lib/icon/close.js +17 -17
- package/lib/icon/code.js +17 -17
- package/lib/icon/cog-shape.js +17 -17
- package/lib/icon/collapse-left.js +17 -17
- package/lib/icon/copy-shape.js +17 -17
- package/lib/icon/copy.js +17 -17
- package/lib/icon/data-shape.js +17 -17
- package/lib/icon/del.js +17 -17
- package/lib/icon/doc-fill.js +17 -17
- package/lib/icon/done.js +17 -17
- package/lib/icon/down-shape.js +17 -17
- package/lib/icon/down-small.js +17 -17
- package/lib/icon/edit-line.js +17 -17
- package/lib/icon/ellipsis.js +17 -17
- package/lib/icon/enlarge-line.js +17 -17
- package/lib/icon/error.js +17 -17
- package/lib/icon/excel-fill.js +17 -17
- package/lib/icon/exclamation-circle-shape.js +17 -17
- package/lib/icon/eye.js +17 -17
- package/lib/icon/filliscreen-line.js +17 -17
- package/lib/icon/fix-line.js +17 -17
- package/lib/icon/fix-shape.js +17 -17
- package/lib/icon/folder-open.js +17 -17
- package/lib/icon/folder-shape-open.js +17 -17
- package/lib/icon/folder-shape.js +17 -17
- package/lib/icon/folder.js +17 -17
- package/lib/icon/funnel.js +17 -17
- package/lib/icon/grag-fill.js +17 -17
- package/lib/icon/help-document-fill.js +17 -17
- package/lib/icon/help-fill.js +17 -17
- package/lib/icon/help.js +17 -17
- package/lib/icon/image-fill.js +17 -17
- package/lib/icon/img-error.js +17 -17
- package/lib/icon/img-placehoulder.js +17 -17
- package/lib/icon/index.d.ts +11 -11
- package/lib/icon/index.js +11 -11
- package/lib/icon/info-line.js +17 -17
- package/lib/icon/info.js +17 -17
- package/lib/icon/left-shape.js +17 -17
- package/lib/icon/left-turn-line.js +17 -17
- package/lib/icon/loading.js +17 -17
- package/lib/icon/narrow-line.js +17 -17
- package/lib/icon/original.js +17 -17
- package/lib/icon/pdf-fill.js +17 -17
- package/lib/icon/play-shape.js +17 -17
- package/lib/icon/plus.js +17 -17
- package/lib/icon/ppt-fill.js +17 -17
- package/lib/icon/qq.js +17 -17
- package/lib/icon/right-shape.js +17 -17
- package/lib/icon/right-turn-line.js +17 -17
- package/lib/icon/search.js +17 -17
- package/lib/icon/share.js +17 -17
- package/lib/icon/spinner.js +17 -17
- package/lib/icon/success.js +17 -17
- package/lib/icon/switcher-loading.js +17 -17
- package/lib/icon/text-all.js +17 -17
- package/lib/icon/text-file.js +17 -17
- package/lib/icon/text-fill.js +17 -17
- package/lib/icon/transfer.js +17 -17
- package/lib/icon/tree-application-shape.js +17 -17
- package/lib/icon/unfull-screen.js +17 -17
- package/lib/icon/unvisible.js +17 -17
- package/lib/icon/up-shape.js +17 -17
- package/lib/icon/upload.js +17 -17
- package/lib/icon/video-fill.js +17 -17
- package/lib/icon/warn.js +17 -17
- package/lib/icon/weixin-pro.js +17 -17
- package/lib/icon/weixin.js +17 -17
- package/lib/image/image-viewer.d.ts +1 -1
- package/lib/image/image-viewer.variable.css +1 -0
- package/lib/image/image.variable.css +1 -0
- package/lib/image/index.d.ts +149 -113
- package/lib/image/index.js +46 -48
- package/lib/index.d.ts +9 -3
- package/lib/index.js +5 -29
- package/lib/info-box/index.js +250 -250
- package/lib/info-box/info-box.d.ts +15 -15
- package/lib/info-box/info-box.variable.css +1 -0
- package/lib/input/index.d.ts +299 -332
- package/lib/input/index.js +110 -561
- package/lib/input/input.css +23 -1
- package/lib/input/input.d.ts +15 -15
- package/lib/input/input.less +30 -1
- package/lib/input/input.variable.css +24 -1
- package/lib/link/index.d.ts +127 -78
- package/lib/link/index.js +5 -5
- package/lib/link/link.d.ts +5 -5
- package/lib/link/link.variable.css +1 -0
- package/lib/loading/index.d.ts +162 -135
- package/lib/loading/index.js +43 -40
- package/lib/loading/loading.d.ts +9 -9
- package/lib/loading/loading.variable.css +1 -0
- package/lib/locale/index.d.ts +1 -1
- package/lib/menu/index.d.ts +131 -51
- package/lib/menu/index.js +46 -27
- package/lib/menu/menu-group.d.ts +9 -0
- package/lib/menu/menu-item.d.ts +9 -0
- package/lib/menu/menu.css +29 -17
- package/lib/menu/menu.less +33 -18
- package/lib/menu/menu.variable.css +30 -17
- package/lib/menu/submenu.d.ts +1 -0
- package/lib/menu/submenu.variable.css +1 -0
- package/lib/menu/utils.d.ts +3 -3
- package/lib/message/index.js +43 -42
- package/lib/message/message.css +2 -1
- package/lib/message/message.less +3 -2
- package/lib/message/message.variable.css +3 -1
- package/lib/message/messageConstructor.d.ts +21 -21
- package/lib/modal/index.d.ts +214 -159
- package/lib/modal/index.js +68 -47
- package/lib/modal/modal.d.ts +24 -8
- package/lib/modal/modal.variable.css +1 -0
- package/lib/modal/props.mixin.d.ts +10 -3
- package/lib/navigation/index.d.ts +188 -152
- package/lib/navigation/index.js +27 -29
- package/lib/navigation/navigation.d.ts +1 -1
- package/lib/navigation/navigation.variable.css +1 -0
- package/lib/notify/index.js +25 -24
- package/lib/notify/notify.variable.css +1 -0
- package/lib/notify/notifyConstructor.d.ts +5 -5
- package/lib/overflow-title/components/overflow-title.d.ts +45 -16
- package/lib/overflow-title/index.d.ts +298 -328
- package/lib/overflow-title/index.js +85 -28
- package/lib/overflow-title/overflow-title.css +3 -0
- package/lib/overflow-title/overflow-title.less +4 -0
- package/lib/overflow-title/overflow-title.variable.css +3 -0
- package/lib/overflow-title/props.d.ts +36 -21
- package/lib/pagination/index.d.ts +198 -203
- package/lib/pagination/index.js +128 -68
- package/lib/pagination/pagination.css +8 -8
- package/lib/pagination/pagination.d.ts +0 -13
- package/lib/pagination/pagination.less +14 -13
- package/lib/pagination/pagination.variable.css +9 -8
- package/lib/pagination/type.d.ts +1 -1
- package/lib/pagination/use-limit.d.ts +1 -1
- package/lib/pagination/use-total.d.ts +1 -1
- package/lib/plugin-popover/index.js +328 -442
- package/lib/pop-confirm/index.d.ts +162 -148
- package/lib/pop-confirm/index.js +40 -35
- package/lib/pop-confirm/pop-confirm.css +3 -1
- package/lib/pop-confirm/pop-confirm.d.ts +10 -20
- package/lib/pop-confirm/pop-confirm.less +3 -1
- package/lib/pop-confirm/pop-confirm.variable.css +4 -1
- package/lib/pop-confirm/props.d.ts +8 -11
- package/lib/popover/const.d.ts +3 -3
- package/lib/popover/content.d.ts +6 -3
- package/lib/popover/index.d.ts +411 -380
- package/lib/popover/index.js +328 -442
- package/lib/popover/plugin-popover.d.ts +1 -1
- package/lib/popover/popover.d.ts +51 -8
- package/lib/popover/popover.variable.css +1 -0
- package/lib/popover/props.d.ts +28 -4
- package/lib/popover/use-floating.d.ts +2 -2
- package/lib/popover/use-popover-init.d.ts +2 -1
- package/lib/popover/utils.d.ts +2 -0
- package/lib/popover2/index.d.ts +83 -8
- package/lib/popover2/index.js +2 -2
- package/lib/preset.d.ts +0 -1
- package/lib/preset.js +0 -1
- package/lib/process/index.d.ts +137 -93
- package/lib/process/index.js +229 -229
- package/lib/process/process.variable.css +1 -0
- package/lib/progress/index.d.ts +192 -183
- package/lib/progress/index.js +31 -33
- package/lib/progress/progress.d.ts +9 -9
- package/lib/progress/progress.variable.css +1 -0
- package/lib/radio/index.d.ts +155 -106
- package/lib/radio/index.js +76 -63
- package/lib/radio/radio-button.d.ts +7 -7
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.variable.css +1 -0
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.d.ts +112 -55
- package/lib/rate/index.js +28 -27
- package/lib/rate/rate.variable.css +1 -0
- package/lib/resize-layout/index.d.ts +204 -157
- package/lib/resize-layout/index.js +54 -34
- package/lib/resize-layout/resize-layout.d.ts +18 -7
- package/lib/resize-layout/resize-layout.variable.css +1 -0
- package/lib/scrollbar/css/scrollbar.css +109 -0
- package/lib/scrollbar/css/scrollbar.less +139 -0
- package/lib/scrollbar/{scrollbar.variable.css → css/scrollbar.variable.css} +96 -61
- package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
- package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
- package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
- package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
- package/lib/scrollbar/handlers/touch.d.ts +4 -0
- package/lib/scrollbar/helper/class-names.d.ts +21 -0
- package/lib/scrollbar/helper/css.d.ts +3 -0
- package/lib/scrollbar/helper/dom.d.ts +4 -0
- package/lib/scrollbar/helper/event-manager.d.ts +20 -0
- package/lib/scrollbar/helper/util.d.ts +11 -0
- package/lib/scrollbar/index.d.ts +133 -13
- package/lib/scrollbar/index.js +1380 -18482
- package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
- package/lib/scrollbar/update-geometry.d.ts +8 -0
- package/lib/search-select/index.d.ts +946 -701
- package/lib/search-select/index.js +644 -486
- package/lib/search-select/input.d.ts +20 -8
- package/lib/search-select/menu.d.ts +13 -1
- package/lib/search-select/search-select.css +45 -47
- package/lib/search-select/search-select.d.ts +207 -160
- package/lib/search-select/search-select.less +41 -41
- package/lib/search-select/search-select.variable.css +46 -47
- package/lib/search-select/selected.d.ts +209 -127
- package/lib/search-select/utils.d.ts +6 -6
- package/lib/select/common.d.ts +4 -4
- package/lib/select/index.d.ts +1457 -1384
- package/lib/select/index.js +603 -477
- package/lib/select/option.d.ts +6 -6
- package/lib/select/select.css +9 -4
- package/lib/select/select.d.ts +285 -148
- package/lib/select/select.less +11 -4
- package/lib/select/select.variable.css +10 -4
- package/lib/select/selectTagInput.d.ts +9 -8
- package/lib/select/type.d.ts +10 -11
- package/lib/shared/frame-throttle.d.ts +15 -0
- package/lib/shared/index.d.ts +2 -1
- package/lib/shared/index.js +166 -101
- package/lib/shared/popover.d.ts +3 -3
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/vue-types.d.ts +50 -50
- package/lib/shared/z-index-manager.d.ts +6 -6
- package/lib/sideslider/index.d.ts +220 -182
- package/lib/sideslider/index.js +239 -237
- package/lib/sideslider/sideslider.css +7 -8
- package/lib/sideslider/sideslider.d.ts +24 -8
- package/lib/sideslider/sideslider.less +7 -8
- package/lib/sideslider/sideslider.variable.css +8 -8
- package/lib/slider/index.d.ts +210 -214
- package/lib/slider/index.js +246 -249
- package/lib/slider/slider.variable.css +1 -0
- package/lib/steps/index.d.ts +155 -131
- package/lib/steps/index.js +234 -234
- package/lib/steps/steps.d.ts +8 -18
- package/lib/steps/steps.variable.css +1 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/mixins/animate.variable.css +1 -0
- package/lib/styles/mixins/popper.variable.css +1 -0
- package/lib/styles/mixins/scroll.variable.css +1 -0
- package/lib/styles/reset.variable.css +1 -0
- package/lib/styles/themes/themes.less +1 -0
- package/lib/swiper/index.d.ts +127 -81
- package/lib/swiper/index.js +23 -23
- package/lib/swiper/swiper.variable.css +1 -0
- package/lib/switcher/index.d.ts +179 -157
- package/lib/switcher/index.js +24 -22
- package/lib/switcher/switcher.d.ts +9 -9
- package/lib/switcher/switcher.variable.css +1 -0
- package/lib/tab/index.d.ts +220 -258
- package/lib/tab/index.js +79 -69
- package/lib/tab/props.d.ts +27 -52
- package/lib/tab/tab-nav.d.ts +26 -66
- package/lib/tab/tab-panel.d.ts +27 -5
- package/lib/tab/tab.css +64 -0
- package/lib/tab/tab.d.ts +10 -54
- package/lib/tab/tab.less +91 -4
- package/lib/tab/tab.variable.css +65 -0
- package/lib/table/components/ghost-body.d.ts +2 -0
- package/lib/table/components/table-cell.d.ts +22 -0
- package/lib/table/components/table-column.d.ts +24 -127
- package/lib/table/const.d.ts +23 -10
- package/lib/table/events.d.ts +16 -112
- package/lib/table/hooks/use-cell.d.ts +20 -0
- package/lib/table/hooks/use-checkbox-tooltip.d.ts +11 -0
- package/lib/table/hooks/use-column-resize.d.ts +7 -0
- package/lib/table/hooks/use-column-template.d.ts +5 -0
- package/lib/table/hooks/use-columns.d.ts +69 -0
- package/lib/table/{plugins → hooks}/use-draggable.d.ts +2 -2
- package/lib/table/hooks/use-fixed-column.d.ts +10 -0
- package/lib/table/hooks/use-head.d.ts +16 -0
- package/lib/table/hooks/use-layout.d.ts +25 -0
- package/lib/table/hooks/use-pagination.d.ts +16 -0
- package/lib/table/hooks/use-render.d.ts +21 -0
- package/lib/table/hooks/use-rows.d.ts +30 -0
- package/lib/table/hooks/use-settings.d.ts +138 -0
- package/lib/table/{plugins → hooks}/use-shift-key.d.ts +4 -2
- package/lib/table/index.d.ts +412 -1029
- package/lib/table/index.js +4698 -20825
- package/lib/table/plugins/head-filter.css +5 -0
- package/lib/table/plugins/head-filter.d.ts +2 -1
- package/lib/table/plugins/head-filter.less +4 -0
- package/lib/table/plugins/head-filter.variable.css +6 -0
- package/lib/table/plugins/head-sort.variable.css +1 -0
- package/lib/table/plugins/settings.css +11 -1
- package/lib/table/plugins/settings.less +12 -1
- package/lib/table/plugins/settings.variable.css +12 -1
- package/lib/table/props.d.ts +127 -62
- package/lib/table/table.css +503 -302
- package/lib/table/table.d.ts +51 -185
- package/lib/table/table.less +244 -112
- package/lib/table/table.variable.css +504 -302
- package/lib/table/utils.d.ts +44 -21
- package/lib/table-column/index.d.ts +156 -369
- package/lib/table-column/index.js +143 -62
- package/lib/tag/index.d.ts +147 -100
- package/lib/tag/index.js +21 -22
- package/lib/tag/tag.css +1 -1
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag/tag.less +1 -1
- package/lib/tag/tag.variable.css +2 -1
- package/lib/tag-input/common.d.ts +2 -2
- package/lib/tag-input/index.d.ts +595 -712
- package/lib/tag-input/index.js +150 -17391
- package/lib/tag-input/tag-input.css +12 -9
- package/lib/tag-input/tag-input.d.ts +60 -24
- package/lib/tag-input/tag-input.less +13 -9
- package/lib/tag-input/tag-input.variable.css +13 -9
- package/lib/tag-input/tag-props.d.ts +25 -2
- package/lib/time-picker/index.d.ts +391 -455
- package/lib/time-picker/time-picker.variable.css +1 -0
- package/lib/timeline/index.d.ts +131 -64
- package/lib/timeline/index.js +8 -8
- package/lib/timeline/timeline.variable.css +1 -0
- package/lib/transfer/const.d.ts +2 -2
- package/lib/transfer/index.d.ts +206 -191
- package/lib/transfer/index.js +3 -5
- package/lib/transfer/transfer.variable.css +1 -0
- package/lib/tree/constant.d.ts +22 -20
- package/lib/tree/index.d.ts +329 -357
- package/lib/tree/index.js +176 -17389
- package/lib/tree/props.d.ts +18 -11
- package/lib/tree/tree.css +103 -69
- package/lib/tree/tree.d.ts +16 -10
- package/lib/tree/tree.variable.css +104 -69
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-node-action.d.ts +10 -9
- package/lib/tree/use-node-async.d.ts +2 -1
- package/lib/tree/use-node-attribute.d.ts +42 -34
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +8 -5
- package/lib/tree/util.d.ts +21 -21
- package/lib/upload/index.d.ts +294 -286
- package/lib/upload/index.js +398 -316
- package/lib/upload/props.d.ts +11 -2
- package/lib/upload/upload-list.d.ts +11 -1
- package/lib/upload/upload-trigger.d.ts +11 -1
- package/lib/upload/upload.d.ts +25 -4
- package/lib/upload/upload.type.d.ts +12 -6
- package/lib/upload/upload.variable.css +1 -0
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +247 -373
- package/lib/virtual-render/index.js +223 -162
- package/lib/virtual-render/props.d.ts +2 -9
- package/lib/virtual-render/use-fix-top.d.ts +1 -1
- package/lib/virtual-render/use-scrollbar.d.ts +4 -17
- package/lib/virtual-render/v-virtual-render.d.ts +7 -1
- package/lib/virtual-render/virtual-render.css +96 -70
- package/lib/virtual-render/virtual-render.d.ts +7 -23
- package/lib/virtual-render/virtual-render.less +2 -11
- package/lib/virtual-render/virtual-render.variable.css +96 -69
- package/lib/volar.components.d.ts +2 -0
- package/package.json +17 -55
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/index.d.ts +0 -241
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
- package/lib/scrollbar/scrollbar.css +0 -75
- package/lib/scrollbar/scrollbar.less +0 -94
- package/lib/table/plugins/col-group.d.ts +0 -38
- package/lib/table/plugins/settings.d.ts +0 -16
- package/lib/table/plugins/use-active-columns.d.ts +0 -16
- package/lib/table/plugins/use-column-resize.d.ts +0 -35
- package/lib/table/plugins/use-column-template.d.ts +0 -7
- package/lib/table/plugins/use-fixed-column.d.ts +0 -27
- package/lib/table/plugins/use-head-cell.d.ts +0 -7
- package/lib/table/plugins/use-pagination.d.ts +0 -23
- package/lib/table/use-attributes.d.ts +0 -62
- package/lib/table/use-column.d.ts +0 -275
- package/lib/table/use-common.d.ts +0 -1679
- package/lib/table/use-render.d.ts +0 -11
- /package/lib/table/{plugins → components}/body-empty.d.ts +0 -0
- /package/lib/table/{plugins → hooks}/use-observer-resize.d.ts +0 -0
- /package/lib/table/{plugins → hooks}/use-scroll-loading.d.ts +0 -0
package/lib/code-diff/index.js
CHANGED
@@ -18,7 +18,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ fr
|
|
18
18
|
|
19
19
|
var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
20
20
|
// Module
|
21
|
-
___CSS_LOADER_EXPORT___.push([module.id, `:host,:root{--d2h-bg-color:#fff;--d2h-border-color:#ddd;--d2h-dim-color:rgba(0,0,0,.3);--d2h-line-border-color:#eee;--d2h-file-header-bg-color:#f7f7f7;--d2h-file-header-border-color:#d8d8d8;--d2h-empty-placeholder-bg-color:#f1f1f1;--d2h-empty-placeholder-border-color:#e1e1e1;--d2h-selected-color:#c8e1ff;--d2h-ins-bg-color:#dfd;--d2h-ins-border-color:#b4e2b4;--d2h-ins-highlight-bg-color:#97f295;--d2h-ins-label-color:#399839;--d2h-del-bg-color:#fee8e9;--d2h-del-border-color:#e9aeae;--d2h-del-highlight-bg-color:#ffb6ba;--d2h-del-label-color:#c33;--d2h-change-del-color:#fdf2d0;--d2h-change-ins-color:#ded;--d2h-info-bg-color:#f8fafd;--d2h-info-border-color:#d5e4f2;--d2h-change-label-color:#d0b44c;--d2h-moved-label-color:#3572b0;--d2h-dark-color:#e6edf3;--d2h-dark-bg-color:#0d1117;--d2h-dark-border-color:#30363d;--d2h-dark-dim-color:#6e7681;--d2h-dark-line-border-color:#21262d;--d2h-dark-file-header-bg-color:#161b22;--d2h-dark-file-header-border-color:#30363d;--d2h-dark-empty-placeholder-bg-color:hsla(215,8%,47%,.1);--d2h-dark-empty-placeholder-border-color:#30363d;--d2h-dark-selected-color:rgba(56,139,253,.1);--d2h-dark-ins-bg-color:rgba(46,160,67,.15);--d2h-dark-ins-border-color:rgba(46,160,67,.4);--d2h-dark-ins-highlight-bg-color:rgba(46,160,67,.4);--d2h-dark-ins-label-color:#3fb950;--d2h-dark-del-bg-color:rgba(248,81,73,.1);--d2h-dark-del-border-color:rgba(248,81,73,.4);--d2h-dark-del-highlight-bg-color:rgba(248,81,73,.4);--d2h-dark-del-label-color:#f85149;--d2h-dark-change-del-color:rgba(210,153,34,.2);--d2h-dark-change-ins-color:rgba(46,160,67,.25);--d2h-dark-info-bg-color:rgba(56,139,253,.1);--d2h-dark-info-border-color:rgba(56,139,253,.4);--d2h-dark-change-label-color:#d29922;--d2h-dark-moved-label-color:#3572b0}.d2h-wrapper{text-align:left}.d2h-file-header{background-color:#f7f7f7;background-color:var(--d2h-file-header-bg-color);border-bottom:1px solid #d8d8d8;border-bottom:1px solid var(--d2h-file-header-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;height:35px;padding:5px 10px}.d2h-file-header.d2h-sticky-header{position:sticky;top:0;z-index:1}.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin-left:auto}.d2h-lines-added{border:1px solid #b4e2b4;border:1px solid var(--d2h-ins-border-color);border-radius:5px 0 0 5px;color:#399839;color:var(--d2h-ins-label-color);padding:2px;text-align:right;vertical-align:middle}.d2h-lines-deleted{border:1px solid #e9aeae;border:1px solid var(--d2h-del-border-color);border-radius:0 5px 5px 0;color:#c33;color:var(--d2h-del-label-color);margin-left:1px;padding:2px;text-align:left;vertical-align:middle}.d2h-file-name-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:15px;width:100%}.d2h-file-name{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.d2h-file-wrapper{border:1px solid #ddd;border:1px solid var(--d2h-border-color);border-radius:3px;margin-bottom:1em}.d2h-file-collapse{-webkit-box-pack:end;-ms-flex-pack:end;cursor:pointer;display:none;font-size:12px;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #ddd;border:1px solid var(--d2h-border-color);border-radius:3px;padding:4px 8px}.d2h-file-collapse.d2h-selected{background-color:#c8e1ff;background-color:var(--d2h-selected-color)}.d2h-file-collapse-input{margin:0 4px 0 0}.d2h-diff-table{border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px;width:100%}.d2h-files-diff{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.d2h-file-diff{overflow-y:hidden}.d2h-file-diff.d2h-d-none,.d2h-files-diff.d2h-d-none{display:none}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%}.d2h-code-line{padding:0 8em;width:calc(100% - 16em)}.d2h-code-line,.d2h-code-side-line{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.d2h-code-side-line{padding:0 4.5em;width:calc(100% - 9em)}.d2h-code-line-ctn{background:none;display:inline-block;padding:0;word-wrap:normal;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle;white-space:pre;width:100%}.d2h-code-line del,.d2h-code-side-line del{background-color:#ffb6ba;background-color:var(--d2h-del-highlight-bg-color)}.d2h-code-line del,.d2h-code-line ins,.d2h-code-side-line del,.d2h-code-side-line ins{border-radius:.2em;display:inline-block;margin-top:-1px;-webkit-text-decoration:none;text-decoration:none}.d2h-code-line ins,.d2h-code-side-line ins{background-color:#97f295;background-color:var(--d2h-ins-highlight-bg-color);text-align:left}.d2h-code-line-prefix{background:none;display:inline;padding:0;word-wrap:normal;white-space:pre}.line-num1{float:left}.line-num1,.line-num2{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:0 .5em;text-overflow:ellipsis;width:3.5em}.line-num2{float:right}.d2h-code-linenumber{background-color:#fff;background-color:var(--d2h-bg-color);border:solid #eee;border:solid var(--d2h-line-border-color);border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);color:var(--d2h-dim-color);cursor:pointer;display:inline-block;position:absolute;text-align:right;width:7.5em}.d2h-code-linenumber:after{content:"\\200b"}.d2h-code-side-linenumber{background-color:#fff;background-color:var(--d2h-bg-color);border:solid #eee;border:solid var(--d2h-line-border-color);border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);color:var(--d2h-dim-color);cursor:pointer;display:inline-block;overflow:hidden;padding:0 .5em;position:absolute;text-align:right;text-overflow:ellipsis;width:4em}.d2h-code-side-linenumber:after{content:"\\200b"}.d2h-code-side-emptyplaceholder,.d2h-emptyplaceholder{background-color:#f1f1f1;background-color:var(--d2h-empty-placeholder-bg-color);border-color:#e1e1e1;border-color:var(--d2h-empty-placeholder-border-color)}.d2h-code-line-prefix,.d2h-code-linenumber,.d2h-code-side-linenumber,.d2h-emptyplaceholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.d2h-code-linenumber,.d2h-code-side-linenumber{direction:rtl}.d2h-del{background-color:#fee8e9;background-color:var(--d2h-del-bg-color);border-color:#e9aeae;border-color:var(--d2h-del-border-color)}.d2h-ins{background-color:#dfd;background-color:var(--d2h-ins-bg-color);border-color:#b4e2b4;border-color:var(--d2h-ins-border-color)}.d2h-info{background-color:#f8fafd;background-color:var(--d2h-info-bg-color);border-color:#d5e4f2;border-color:var(--d2h-info-border-color);color:rgba(0,0,0,.3);color:var(--d2h-dim-color)}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0;background-color:var(--d2h-change-del-color)}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded;background-color:var(--d2h-change-ins-color)}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{-webkit-text-decoration:none;text-decoration:none}.d2h-file-list-wrapper a,.d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-moved-label-color)}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;margin:0;padding:0}.d2h-file-list>li{border-bottom:1px solid #ddd;border-bottom:1px solid var(--d2h-border-color);margin:0;padding:5px 10px}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{cursor:pointer;display:none;font-size:10px}.d2h-icon{margin-right:10px;vertical-align:middle;fill:currentColor}.d2h-deleted{color:#c33;color:var(--d2h-del-label-color)}.d2h-added{color:#399839;color:var(--d2h-ins-label-color)}.d2h-changed{color:#d0b44c;color:var(--d2h-change-label-color)}.d2h-moved{color:#3572b0;color:var(--d2h-moved-label-color)}.d2h-tag{background-color:#fff;background-color:var(--d2h-bg-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px}.d2h-deleted-tag{border:1px solid #c33;border:1px solid var(--d2h-del-label-color)}.d2h-added-tag{border:1px solid #399839;border:1px solid var(--d2h-ins-label-color)}.d2h-changed-tag{border:1px solid #d0b44c;border:1px solid var(--d2h-change-label-color)}.d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-moved-label-color)}.d2h-dark-color-scheme{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);color:#e6edf3;color:var(--d2h-dark-color)}.d2h-dark-color-scheme .d2h-file-header{background-color:#161b22;background-color:var(--d2h-dark-file-header-bg-color);border-bottom:#30363d;border-bottom:var(--d2h-dark-file-header-border-color)}.d2h-dark-color-scheme .d2h-lines-added{border:1px solid rgba(46,160,67,.4);border:1px solid var(--d2h-dark-ins-border-color);color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-lines-deleted{border:1px solid rgba(248,81,73,.4);border:1px solid var(--d2h-dark-del-border-color);color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-code-line del,.d2h-dark-color-scheme .d2h-code-side-line del{background-color:rgba(248,81,73,.4);background-color:var(--d2h-dark-del-highlight-bg-color)}.d2h-dark-color-scheme .d2h-code-line ins,.d2h-dark-color-scheme .d2h-code-side-line ins{background-color:rgba(46,160,67,.4);background-color:var(--d2h-dark-ins-highlight-bg-color)}.d2h-dark-color-scheme .d2h-diff-tbody{border-color:#30363d;border-color:var(--d2h-dark-border-color)}.d2h-dark-color-scheme .d2h-code-side-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder,.d2h-dark-color-scheme .d2h-files-diff .d2h-emptyplaceholder{background-color:hsla(215,8%,47%,.1);background-color:var(--d2h-dark-empty-placeholder-bg-color);border-color:#30363d;border-color:var(--d2h-dark-empty-placeholder-border-color)}.d2h-dark-color-scheme .d2h-code-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-del{background-color:rgba(248,81,73,.1);background-color:var(--d2h-dark-del-bg-color);border-color:rgba(248,81,73,.4);border-color:var(--d2h-dark-del-border-color)}.d2h-dark-color-scheme .d2h-ins{background-color:rgba(46,160,67,.15);background-color:var(--d2h-dark-ins-bg-color);border-color:rgba(46,160,67,.4);border-color:var(--d2h-dark-ins-border-color)}.d2h-dark-color-scheme .d2h-info{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-info-bg-color);border-color:rgba(56,139,253,.4);border-color:var(--d2h-dark-info-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-file-diff .d2h-del.d2h-change{background-color:rgba(210,153,34,.2);background-color:var(--d2h-dark-change-del-color)}.d2h-dark-color-scheme .d2h-file-diff .d2h-ins.d2h-change{background-color:rgba(46,160,67,.25);background-color:var(--d2h-dark-change-ins-color)}.d2h-dark-color-scheme .d2h-file-wrapper{border:1px solid #30363d;border:1px solid var(--d2h-dark-border-color)}.d2h-dark-color-scheme .d2h-file-collapse{border:1px solid #0d1117;border:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-file-collapse.d2h-selected{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-selected-color)}.d2h-dark-color-scheme .d2h-file-list-wrapper a,.d2h-dark-color-scheme .d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-dark-color-scheme .d2h-file-list>li{border-bottom:1px solid #0d1117;border-bottom:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted{color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-added{color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-changed{color:#d29922;color:var(--d2h-dark-change-label-color)}.d2h-dark-color-scheme .d2h-moved{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-dark-color-scheme .d2h-tag{background-color:#0d1117;background-color:var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted-tag{border:1px solid #f85149;border:1px solid var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-added-tag{border:1px solid #3fb950;border:1px solid var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-changed-tag{border:1px solid #d29922;border:1px solid var(--d2h-dark-change-label-color)}.d2h-dark-color-scheme .d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-dark-moved-label-color)}@media (prefers-color-scheme:dark){.d2h-auto-color-scheme{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);color:#e6edf3;color:var(--d2h-dark-color)}.d2h-auto-color-scheme .d2h-file-header{background-color:#161b22;background-color:var(--d2h-dark-file-header-bg-color);border-bottom:#30363d;border-bottom:var(--d2h-dark-file-header-border-color)}.d2h-auto-color-scheme .d2h-lines-added{border:1px solid rgba(46,160,67,.4);border:1px solid var(--d2h-dark-ins-border-color);color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-lines-deleted{border:1px solid rgba(248,81,73,.4);border:1px solid var(--d2h-dark-del-border-color);color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-code-line del,.d2h-auto-color-scheme .d2h-code-side-line del{background-color:rgba(248,81,73,.4);background-color:var(--d2h-dark-del-highlight-bg-color)}.d2h-auto-color-scheme .d2h-code-line ins,.d2h-auto-color-scheme .d2h-code-side-line ins{background-color:rgba(46,160,67,.4);background-color:var(--d2h-dark-ins-highlight-bg-color)}.d2h-auto-color-scheme .d2h-diff-tbody{border-color:#30363d;border-color:var(--d2h-dark-border-color)}.d2h-auto-color-scheme .d2h-code-side-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder,.d2h-auto-color-scheme .d2h-files-diff .d2h-emptyplaceholder{background-color:hsla(215,8%,47%,.1);background-color:var(--d2h-dark-empty-placeholder-bg-color);border-color:#30363d;border-color:var(--d2h-dark-empty-placeholder-border-color)}.d2h-auto-color-scheme .d2h-code-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-del{background-color:rgba(248,81,73,.1);background-color:var(--d2h-dark-del-bg-color);border-color:rgba(248,81,73,.4);border-color:var(--d2h-dark-del-border-color)}.d2h-auto-color-scheme .d2h-ins{background-color:rgba(46,160,67,.15);background-color:var(--d2h-dark-ins-bg-color);border-color:rgba(46,160,67,.4);border-color:var(--d2h-dark-ins-border-color)}.d2h-auto-color-scheme .d2h-info{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-info-bg-color);border-color:rgba(56,139,253,.4);border-color:var(--d2h-dark-info-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-file-diff .d2h-del.d2h-change{background-color:rgba(210,153,34,.2);background-color:var(--d2h-dark-change-del-color)}.d2h-auto-color-scheme .d2h-file-diff .d2h-ins.d2h-change{background-color:rgba(46,160,67,.25);background-color:var(--d2h-dark-change-ins-color)}.d2h-auto-color-scheme .d2h-file-wrapper{border:1px solid #30363d;border:1px solid var(--d2h-dark-border-color)}.d2h-auto-color-scheme .d2h-file-collapse{border:1px solid #0d1117;border:1px solid var(--d2h-dark-bg-color)}.d2h-auto-color-scheme .d2h-file-collapse.d2h-selected{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-selected-color)}.d2h-auto-color-scheme .d2h-file-list-wrapper a,.d2h-auto-color-scheme .d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-auto-color-scheme .d2h-file-list>li{border-bottom:1px solid #0d1117;border-bottom:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted{color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-added{color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-changed{color:#d29922;color:var(--d2h-dark-change-label-color)}.d2h-auto-color-scheme .d2h-moved{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-auto-color-scheme .d2h-tag{background-color:#0d1117;background-color:var(--d2h-dark-bg-color)}.d2h-auto-color-scheme .d2h-deleted-tag{border:1px solid #f85149;border:1px solid var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-added-tag{border:1px solid #3fb950;border:1px solid var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-changed-tag{border:1px solid #d29922;border:1px solid var(--d2h-dark-change-label-color)}.d2h-auto-color-scheme .d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-dark-moved-label-color)}}`, ""]);
|
21
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.d2h-wrapper{text-align:left}.d2h-file-header{background-color:#f7f7f7;border-bottom:1px solid #d8d8d8;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;height:35px;padding:5px 10px}.d2h-file-header.d2h-sticky-header{position:sticky;top:0;z-index:1}.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin-left:auto}.d2h-lines-added{border:1px solid #b4e2b4;border-radius:5px 0 0 5px;color:#399839;padding:2px;text-align:right;vertical-align:middle}.d2h-lines-deleted{border:1px solid #e9aeae;border-radius:0 5px 5px 0;color:#c33;margin-left:1px;padding:2px;text-align:left;vertical-align:middle}.d2h-file-name-wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;width:100%}.d2h-file-name{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-file-collapse{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #ddd;border-radius:3px;cursor:pointer;display:none;font-size:12px;justify-content:flex-end;padding:4px 8px}.d2h-file-collapse.d2h-selected{background-color:#c8e1ff}.d2h-file-collapse-input{margin:0 4px 0 0}.d2h-diff-table{border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px;width:100%}.d2h-files-diff{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.d2h-file-diff{overflow-y:hidden}.d2h-file-diff.d2h-d-none,.d2h-files-diff.d2h-d-none{display:none}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%}.d2h-code-line{padding:0 8em;width:calc(100% - 16em)}.d2h-code-line,.d2h-code-side-line{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.d2h-code-side-line{padding:0 4.5em;width:calc(100% - 9em)}.d2h-code-line-ctn{word-wrap:normal;background:none;display:inline-block;padding:0;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle;white-space:pre;width:100%}.d2h-code-line del,.d2h-code-side-line del{background-color:#ffb6ba;border-radius:.2em;display:inline-block;margin-top:-1px;text-decoration:none}.d2h-code-line ins,.d2h-code-side-line ins{background-color:#97f295;border-radius:.2em;display:inline-block;margin-top:-1px;text-align:left;text-decoration:none}.d2h-code-line-prefix{word-wrap:normal;background:none;display:inline;padding:0;white-space:pre}.line-num1{float:left}.line-num1,.line-num2{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:0 .5em;text-overflow:ellipsis;width:3.5em}.line-num2{float:right}.d2h-code-linenumber{background-color:#fff;border:solid #eee;border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);cursor:pointer;display:inline-block;position:absolute;text-align:right;width:7.5em}.d2h-code-linenumber:after{content:"\\200b"}.d2h-code-side-linenumber{background-color:#fff;border:solid #eee;border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);cursor:pointer;display:inline-block;overflow:hidden;padding:0 .5em;position:absolute;text-align:right;text-overflow:ellipsis;width:4em}.d2h-code-side-linenumber:after{content:"\\200b"}.d2h-code-side-emptyplaceholder,.d2h-emptyplaceholder{background-color:#f1f1f1;border-color:#e1e1e1}.d2h-code-line-prefix,.d2h-code-linenumber,.d2h-code-side-linenumber,.d2h-emptyplaceholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.d2h-code-linenumber,.d2h-code-side-linenumber{direction:rtl}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;border-color:#d5e4f2;color:rgba(0,0,0,.3)}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{color:#3572b0;text-decoration:none}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;margin:0;padding:0}.d2h-file-list>li{border-bottom:1px solid #ddd;margin:0;padding:5px 10px}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{cursor:pointer;display:none;font-size:10px}.d2h-icon{fill:currentColor;margin-right:10px;vertical-align:middle}.d2h-deleted{color:#c33}.d2h-added{color:#399839}.d2h-changed{color:#d0b44c}.d2h-moved{color:#3572b0}.d2h-tag{background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px}.d2h-deleted-tag{border:1px solid #c33}.d2h-added-tag{border:1px solid #399839}.d2h-changed-tag{border:1px solid #d0b44c}.d2h-moved-tag{border:1px solid #3572b0}`, ""]);
|
22
22
|
// Exports
|
23
23
|
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (___CSS_LOADER_EXPORT___)));
|
24
24
|
|
@@ -1008,31 +1008,31 @@ function _arrayWithHoles(arr) {
|
|
1008
1008
|
if (Array.isArray(arr)) return arr;
|
1009
1009
|
}
|
1010
1010
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
1011
|
-
function _iterableToArrayLimit(
|
1012
|
-
var
|
1013
|
-
if (null !=
|
1014
|
-
var
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1011
|
+
function _iterableToArrayLimit(arr, i) {
|
1012
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
1013
|
+
if (null != _i) {
|
1014
|
+
var _s,
|
1015
|
+
_e,
|
1016
|
+
_x,
|
1017
|
+
_r,
|
1018
|
+
_arr = [],
|
1019
|
+
_n = !0,
|
1020
|
+
_d = !1;
|
1021
1021
|
try {
|
1022
|
-
if (
|
1023
|
-
if (Object(
|
1024
|
-
|
1025
|
-
} else for (; !(
|
1026
|
-
} catch (
|
1027
|
-
|
1022
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
1023
|
+
if (Object(_i) !== _i) return;
|
1024
|
+
_n = !1;
|
1025
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
1026
|
+
} catch (err) {
|
1027
|
+
_d = !0, _e = err;
|
1028
1028
|
} finally {
|
1029
1029
|
try {
|
1030
|
-
if (!
|
1030
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
1031
1031
|
} finally {
|
1032
|
-
if (
|
1032
|
+
if (_d) throw _e;
|
1033
1033
|
}
|
1034
1034
|
}
|
1035
|
-
return
|
1035
|
+
return _arr;
|
1036
1036
|
}
|
1037
1037
|
}
|
1038
1038
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
@@ -1067,6 +1067,14 @@ function _slicedToArray(arr, i) {
|
|
1067
1067
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1068
1068
|
var external_vue_y = x => () => x
|
1069
1069
|
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
1070
|
+
;// CONCATENATED MODULE: external "vue-types"
|
1071
|
+
var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1072
|
+
var external_vue_types_y = x => () => x
|
1073
|
+
const external_vue_types_namespaceObject = external_vue_types_x({ ["number"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.number, ["string"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.string });
|
1074
|
+
;// CONCATENATED MODULE: external "../config-provider"
|
1075
|
+
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1076
|
+
var config_provider_y = x => () => x
|
1077
|
+
const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
1070
1078
|
;// CONCATENATED MODULE: ../../packages/code-diff/node_modules/diff/lib/index.mjs
|
1071
1079
|
function Diff() {}
|
1072
1080
|
Diff.prototype = {
|
@@ -2629,28 +2637,22 @@ var LineType;
|
|
2629
2637
|
LineType["DELETE"] = "delete";
|
2630
2638
|
LineType["CONTEXT"] = "context";
|
2631
2639
|
})(LineType || (LineType = {}));
|
2632
|
-
|
2640
|
+
var OutputFormatType = {
|
2633
2641
|
LINE_BY_LINE: 'line-by-line',
|
2634
2642
|
SIDE_BY_SIDE: 'side-by-side',
|
2635
2643
|
};
|
2636
|
-
|
2644
|
+
var LineMatchingType = {
|
2637
2645
|
LINES: 'lines',
|
2638
2646
|
WORDS: 'words',
|
2639
2647
|
NONE: 'none',
|
2640
2648
|
};
|
2641
|
-
|
2649
|
+
var DiffStyleType = {
|
2642
2650
|
WORD: 'word',
|
2643
2651
|
CHAR: 'char',
|
2644
2652
|
};
|
2645
|
-
var ColorSchemeType;
|
2646
|
-
(function (ColorSchemeType) {
|
2647
|
-
ColorSchemeType["AUTO"] = "auto";
|
2648
|
-
ColorSchemeType["DARK"] = "dark";
|
2649
|
-
ColorSchemeType["LIGHT"] = "light";
|
2650
|
-
})(ColorSchemeType || (ColorSchemeType = {}));
|
2651
2653
|
//# sourceMappingURL=types.js.map
|
2652
2654
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/utils.js
|
2653
|
-
|
2655
|
+
var specials = [
|
2654
2656
|
'-',
|
2655
2657
|
'[',
|
2656
2658
|
']',
|
@@ -2668,7 +2670,7 @@ const specials = [
|
|
2668
2670
|
'$',
|
2669
2671
|
'|',
|
2670
2672
|
];
|
2671
|
-
|
2673
|
+
var regex = RegExp('[' + specials.join('\\') + ']', 'g');
|
2672
2674
|
function escapeForRegExp(str) {
|
2673
2675
|
return str.replace(regex, '\\$&');
|
2674
2676
|
}
|
@@ -2676,8 +2678,8 @@ function unifyPath(path) {
|
|
2676
2678
|
return path ? path.replace(/\\/g, '/') : path;
|
2677
2679
|
}
|
2678
2680
|
function hashCode(text) {
|
2679
|
-
|
2680
|
-
|
2681
|
+
var i, chr, len;
|
2682
|
+
var hash = 0;
|
2681
2683
|
for (i = 0, len = text.length; i < len; i++) {
|
2682
2684
|
chr = text.charCodeAt(i);
|
2683
2685
|
hash = (hash << 5) - hash + chr;
|
@@ -2687,24 +2689,33 @@ function hashCode(text) {
|
|
2687
2689
|
}
|
2688
2690
|
//# sourceMappingURL=utils.js.map
|
2689
2691
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/diff-parser.js
|
2692
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
2693
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
2694
|
+
if (ar || !(i in from)) {
|
2695
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
2696
|
+
ar[i] = from[i];
|
2697
|
+
}
|
2698
|
+
}
|
2699
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
2700
|
+
};
|
2690
2701
|
|
2691
2702
|
|
2692
2703
|
function getExtension(filename, language) {
|
2693
|
-
|
2704
|
+
var filenameParts = filename.split('.');
|
2694
2705
|
return filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : language;
|
2695
2706
|
}
|
2696
2707
|
function startsWithAny(str, prefixes) {
|
2697
|
-
return prefixes.reduce((startsWith, prefix)
|
2708
|
+
return prefixes.reduce(function (startsWith, prefix) { return startsWith || str.startsWith(prefix); }, false);
|
2698
2709
|
}
|
2699
|
-
|
2710
|
+
var baseDiffFilenamePrefixes = ['a/', 'b/', 'i/', 'w/', 'c/', 'o/'];
|
2700
2711
|
function getFilename(line, linePrefix, extraPrefix) {
|
2701
|
-
|
2702
|
-
|
2703
|
-
? new RegExp(
|
2712
|
+
var prefixes = extraPrefix !== undefined ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes, true), [extraPrefix], false) : baseDiffFilenamePrefixes;
|
2713
|
+
var FilenameRegExp = linePrefix
|
2714
|
+
? new RegExp("^".concat(escapeForRegExp(linePrefix), " \"?(.+?)\"?$"))
|
2704
2715
|
: new RegExp('^"?(.+?)"?$');
|
2705
|
-
|
2706
|
-
|
2707
|
-
|
2716
|
+
var _a = FilenameRegExp.exec(line) || [], _b = _a[1], filename = _b === void 0 ? '' : _b;
|
2717
|
+
var matchingPrefix = prefixes.find(function (p) { return filename.indexOf(p) === 0; });
|
2718
|
+
var fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename;
|
2708
2719
|
return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, '');
|
2709
2720
|
}
|
2710
2721
|
function getSrcFilename(line, srcPrefix) {
|
@@ -2713,36 +2724,37 @@ function getSrcFilename(line, srcPrefix) {
|
|
2713
2724
|
function getDstFilename(line, dstPrefix) {
|
2714
2725
|
return getFilename(line, '+++', dstPrefix);
|
2715
2726
|
}
|
2716
|
-
function parse(diffInput, config
|
2717
|
-
|
2718
|
-
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
2722
|
-
|
2723
|
-
|
2724
|
-
|
2725
|
-
|
2726
|
-
|
2727
|
-
|
2728
|
-
|
2729
|
-
|
2730
|
-
|
2731
|
-
|
2732
|
-
|
2733
|
-
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
|
2744
|
-
|
2745
|
-
|
2727
|
+
function parse(diffInput, config) {
|
2728
|
+
if (config === void 0) { config = {}; }
|
2729
|
+
var files = [];
|
2730
|
+
var currentFile = null;
|
2731
|
+
var currentBlock = null;
|
2732
|
+
var oldLine = null;
|
2733
|
+
var oldLine2 = null;
|
2734
|
+
var newLine = null;
|
2735
|
+
var possibleOldName = null;
|
2736
|
+
var possibleNewName = null;
|
2737
|
+
var oldFileNameHeader = '--- ';
|
2738
|
+
var newFileNameHeader = '+++ ';
|
2739
|
+
var hunkHeaderPrefix = '@@';
|
2740
|
+
var oldMode = /^old mode (\d{6})/;
|
2741
|
+
var newMode = /^new mode (\d{6})/;
|
2742
|
+
var deletedFileMode = /^deleted file mode (\d{6})/;
|
2743
|
+
var newFileMode = /^new file mode (\d{6})/;
|
2744
|
+
var copyFrom = /^copy from "?(.+)"?/;
|
2745
|
+
var copyTo = /^copy to "?(.+)"?/;
|
2746
|
+
var renameFrom = /^rename from "?(.+)"?/;
|
2747
|
+
var renameTo = /^rename to "?(.+)"?/;
|
2748
|
+
var similarityIndex = /^similarity index (\d+)%/;
|
2749
|
+
var dissimilarityIndex = /^dissimilarity index (\d+)%/;
|
2750
|
+
var index = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/;
|
2751
|
+
var binaryFiles = /^Binary files (.*) and (.*) differ/;
|
2752
|
+
var binaryDiff = /^GIT binary patch/;
|
2753
|
+
var combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/;
|
2754
|
+
var combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/;
|
2755
|
+
var combinedNewFile = /^new file mode (\d{6})/;
|
2756
|
+
var combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/;
|
2757
|
+
var diffLines = diffInput
|
2746
2758
|
.replace(/\/g, '')
|
2747
2759
|
.replace(/\r\n?/g, '\n')
|
2748
2760
|
.split('\n');
|
@@ -2779,7 +2791,7 @@ function parse(diffInput, config = {}) {
|
|
2779
2791
|
}
|
2780
2792
|
function startBlock(line) {
|
2781
2793
|
saveBlock();
|
2782
|
-
|
2794
|
+
var values;
|
2783
2795
|
if (currentFile !== null) {
|
2784
2796
|
if ((values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line))) {
|
2785
2797
|
currentFile.isCombined = false;
|
@@ -2812,11 +2824,11 @@ function parse(diffInput, config = {}) {
|
|
2812
2824
|
function createLine(line) {
|
2813
2825
|
if (currentFile === null || currentBlock === null || oldLine === null || newLine === null)
|
2814
2826
|
return;
|
2815
|
-
|
2827
|
+
var currentLine = {
|
2816
2828
|
content: line,
|
2817
2829
|
};
|
2818
|
-
|
2819
|
-
|
2830
|
+
var addedPrefixes = currentFile.isCombined ? ['+ ', ' +', '++'] : ['+'];
|
2831
|
+
var deletedPrefixes = currentFile.isCombined ? ['- ', ' -', '--'] : ['-'];
|
2820
2832
|
if (startsWithAny(line, addedPrefixes)) {
|
2821
2833
|
currentFile.addedLines++;
|
2822
2834
|
currentLine.type = LineType.INSERT;
|
@@ -2837,7 +2849,7 @@ function parse(diffInput, config = {}) {
|
|
2837
2849
|
currentBlock.lines.push(currentLine);
|
2838
2850
|
}
|
2839
2851
|
function existHunkHeader(line, lineIdx) {
|
2840
|
-
|
2852
|
+
var idx = lineIdx;
|
2841
2853
|
while (idx < diffLines.length - 3) {
|
2842
2854
|
if (line.startsWith('diff')) {
|
2843
2855
|
return false;
|
@@ -2851,17 +2863,17 @@ function parse(diffInput, config = {}) {
|
|
2851
2863
|
}
|
2852
2864
|
return false;
|
2853
2865
|
}
|
2854
|
-
diffLines.forEach((line, lineIndex)
|
2866
|
+
diffLines.forEach(function (line, lineIndex) {
|
2855
2867
|
if (!line || line.startsWith('*')) {
|
2856
2868
|
return;
|
2857
2869
|
}
|
2858
|
-
|
2859
|
-
|
2860
|
-
|
2861
|
-
|
2870
|
+
var values;
|
2871
|
+
var prevLine = diffLines[lineIndex - 1];
|
2872
|
+
var nxtLine = diffLines[lineIndex + 1];
|
2873
|
+
var afterNxtLine = diffLines[lineIndex + 2];
|
2862
2874
|
if (line.startsWith('diff --git') || line.startsWith('diff --combined')) {
|
2863
2875
|
startFile();
|
2864
|
-
|
2876
|
+
var gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/;
|
2865
2877
|
if ((values = gitDiffStart.exec(line))) {
|
2866
2878
|
possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
|
2867
2879
|
possibleNewName = getFilename(values[2], undefined, config.srcPrefix);
|
@@ -2874,7 +2886,7 @@ function parse(diffInput, config = {}) {
|
|
2874
2886
|
}
|
2875
2887
|
if (line.startsWith('Binary files') && !(currentFile === null || currentFile === void 0 ? void 0 : currentFile.isGitDiff)) {
|
2876
2888
|
startFile();
|
2877
|
-
|
2889
|
+
var unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/;
|
2878
2890
|
if ((values = unixDiffBinaryStart.exec(line))) {
|
2879
2891
|
possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
|
2880
2892
|
possibleNewName = getFilename(values[2], undefined, config.srcPrefix);
|
@@ -2905,7 +2917,7 @@ function parse(diffInput, config = {}) {
|
|
2905
2917
|
currentFile.deletedLines = 0;
|
2906
2918
|
currentFile.blocks = [];
|
2907
2919
|
currentBlock = null;
|
2908
|
-
|
2920
|
+
var message = typeof config.diffTooBigMessage === 'function'
|
2909
2921
|
? config.diffTooBigMessage(files.length)
|
2910
2922
|
: 'Diff too big to be displayed';
|
2911
2923
|
startBlock(message);
|
@@ -2940,7 +2952,7 @@ function parse(diffInput, config = {}) {
|
|
2940
2952
|
createLine(line);
|
2941
2953
|
return;
|
2942
2954
|
}
|
2943
|
-
|
2955
|
+
var doesNotExistHunkHeader = !existHunkHeader(line, lineIndex);
|
2944
2956
|
if (currentFile === null) {
|
2945
2957
|
throw new Error('Where is my file !!!');
|
2946
2958
|
}
|
@@ -4596,12 +4608,12 @@ function levenshtein(a, b) {
|
|
4596
4608
|
if (b.length === 0) {
|
4597
4609
|
return a.length;
|
4598
4610
|
}
|
4599
|
-
|
4600
|
-
|
4611
|
+
var matrix = [];
|
4612
|
+
var i;
|
4601
4613
|
for (i = 0; i <= b.length; i++) {
|
4602
4614
|
matrix[i] = [i];
|
4603
4615
|
}
|
4604
|
-
|
4616
|
+
var j;
|
4605
4617
|
for (j = 0; j <= a.length; j++) {
|
4606
4618
|
matrix[0][j] = j;
|
4607
4619
|
}
|
@@ -4618,21 +4630,22 @@ function levenshtein(a, b) {
|
|
4618
4630
|
return matrix[b.length][a.length];
|
4619
4631
|
}
|
4620
4632
|
function newDistanceFn(str) {
|
4621
|
-
return (x, y)
|
4622
|
-
|
4623
|
-
|
4624
|
-
|
4633
|
+
return function (x, y) {
|
4634
|
+
var xValue = str(x).trim();
|
4635
|
+
var yValue = str(y).trim();
|
4636
|
+
var lev = levenshtein(xValue, yValue);
|
4625
4637
|
return lev / (xValue.length + yValue.length);
|
4626
4638
|
};
|
4627
4639
|
}
|
4628
4640
|
function newMatcherFn(distance) {
|
4629
|
-
function findBestMatch(a, b, cache
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4634
|
-
|
4635
|
-
|
4641
|
+
function findBestMatch(a, b, cache) {
|
4642
|
+
if (cache === void 0) { cache = new Map(); }
|
4643
|
+
var bestMatchDist = Infinity;
|
4644
|
+
var bestMatch;
|
4645
|
+
for (var i = 0; i < a.length; ++i) {
|
4646
|
+
for (var j = 0; j < b.length; ++j) {
|
4647
|
+
var cacheKey = JSON.stringify([a[i], b[j]]);
|
4648
|
+
var md = void 0;
|
4636
4649
|
if (!(cache.has(cacheKey) && (md = cache.get(cacheKey)))) {
|
4637
4650
|
md = distance(a[i], b[j]);
|
4638
4651
|
cache.set(cacheKey, md);
|
@@ -4645,23 +4658,25 @@ function newMatcherFn(distance) {
|
|
4645
4658
|
}
|
4646
4659
|
return bestMatch;
|
4647
4660
|
}
|
4648
|
-
function group(a, b, level
|
4649
|
-
|
4661
|
+
function group(a, b, level, cache) {
|
4662
|
+
if (level === void 0) { level = 0; }
|
4663
|
+
if (cache === void 0) { cache = new Map(); }
|
4664
|
+
var bm = findBestMatch(a, b, cache);
|
4650
4665
|
if (!bm || a.length + b.length < 3) {
|
4651
4666
|
return [[a, b]];
|
4652
4667
|
}
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4668
|
+
var a1 = a.slice(0, bm.indexA);
|
4669
|
+
var b1 = b.slice(0, bm.indexB);
|
4670
|
+
var aMatch = [a[bm.indexA]];
|
4671
|
+
var bMatch = [b[bm.indexB]];
|
4672
|
+
var tailA = bm.indexA + 1;
|
4673
|
+
var tailB = bm.indexB + 1;
|
4674
|
+
var a2 = a.slice(tailA);
|
4675
|
+
var b2 = b.slice(tailB);
|
4676
|
+
var group1 = group(a1, b1, level + 1, cache);
|
4677
|
+
var groupMatch = group(aMatch, bMatch, level + 1, cache);
|
4678
|
+
var group2 = group(a2, b2, level + 1, cache);
|
4679
|
+
var result = groupMatch;
|
4665
4680
|
if (bm.indexA > 0 || bm.indexB > 0) {
|
4666
4681
|
result = group1.concat(result);
|
4667
4682
|
}
|
@@ -4674,11 +4689,22 @@ function newMatcherFn(distance) {
|
|
4674
4689
|
}
|
4675
4690
|
//# sourceMappingURL=rematch.js.map
|
4676
4691
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/render-utils.js
|
4692
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
4693
|
+
__assign = Object.assign || function(t) {
|
4694
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4695
|
+
s = arguments[i];
|
4696
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4697
|
+
t[p] = s[p];
|
4698
|
+
}
|
4699
|
+
return t;
|
4700
|
+
};
|
4701
|
+
return __assign.apply(this, arguments);
|
4702
|
+
};
|
4677
4703
|
|
4678
4704
|
|
4679
4705
|
|
4680
4706
|
|
4681
|
-
|
4707
|
+
var CSSLineClass = {
|
4682
4708
|
INSERTS: 'd2h-ins',
|
4683
4709
|
DELETES: 'd2h-del',
|
4684
4710
|
CONTEXT: 'd2h-cntx',
|
@@ -4686,16 +4712,15 @@ const CSSLineClass = {
|
|
4686
4712
|
INSERT_CHANGES: 'd2h-ins d2h-change',
|
4687
4713
|
DELETE_CHANGES: 'd2h-del d2h-change',
|
4688
4714
|
};
|
4689
|
-
|
4715
|
+
var defaultRenderConfig = {
|
4690
4716
|
matching: LineMatchingType.NONE,
|
4691
4717
|
matchWordsThreshold: 0.25,
|
4692
4718
|
maxLineLengthHighlight: 10000,
|
4693
4719
|
diffStyle: DiffStyleType.WORD,
|
4694
|
-
colorScheme: ColorSchemeType.LIGHT,
|
4695
4720
|
};
|
4696
|
-
|
4697
|
-
|
4698
|
-
|
4721
|
+
var separator = '/';
|
4722
|
+
var distance = newDistanceFn(function (change) { return change.value; });
|
4723
|
+
var matcher = newMatcherFn(distance);
|
4699
4724
|
function isDevNullName(name) {
|
4700
4725
|
return name.indexOf('dev/null') !== -1;
|
4701
4726
|
}
|
@@ -4715,17 +4740,6 @@ function toCSSClass(lineType) {
|
|
4715
4740
|
return CSSLineClass.DELETES;
|
4716
4741
|
}
|
4717
4742
|
}
|
4718
|
-
function colorSchemeToCss(colorScheme) {
|
4719
|
-
switch (colorScheme) {
|
4720
|
-
case ColorSchemeType.DARK:
|
4721
|
-
return 'd2h-dark-color-scheme';
|
4722
|
-
case ColorSchemeType.AUTO:
|
4723
|
-
return 'd2h-auto-color-scheme';
|
4724
|
-
case ColorSchemeType.LIGHT:
|
4725
|
-
default:
|
4726
|
-
return 'd2h-light-color-scheme';
|
4727
|
-
}
|
4728
|
-
}
|
4729
4743
|
function prefixLength(isCombined) {
|
4730
4744
|
return isCombined ? 2 : 1;
|
4731
4745
|
}
|
@@ -4739,26 +4753,27 @@ function escapeForHtml(str) {
|
|
4739
4753
|
.replace(/'/g, ''')
|
4740
4754
|
.replace(/\//g, '/');
|
4741
4755
|
}
|
4742
|
-
function deconstructLine(line, isCombined, escape
|
4743
|
-
|
4756
|
+
function deconstructLine(line, isCombined, escape) {
|
4757
|
+
if (escape === void 0) { escape = true; }
|
4758
|
+
var indexToSplit = prefixLength(isCombined);
|
4744
4759
|
return {
|
4745
4760
|
prefix: line.substring(0, indexToSplit),
|
4746
4761
|
content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit),
|
4747
4762
|
};
|
4748
4763
|
}
|
4749
4764
|
function filenameDiff(file) {
|
4750
|
-
|
4751
|
-
|
4765
|
+
var oldFilename = unifyPath(file.oldName);
|
4766
|
+
var newFilename = unifyPath(file.newName);
|
4752
4767
|
if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) {
|
4753
|
-
|
4754
|
-
|
4755
|
-
|
4756
|
-
|
4757
|
-
|
4758
|
-
|
4759
|
-
|
4760
|
-
|
4761
|
-
|
4768
|
+
var prefixPaths = [];
|
4769
|
+
var suffixPaths = [];
|
4770
|
+
var oldFilenameParts = oldFilename.split(separator);
|
4771
|
+
var newFilenameParts = newFilename.split(separator);
|
4772
|
+
var oldFilenamePartsSize = oldFilenameParts.length;
|
4773
|
+
var newFilenamePartsSize = newFilenameParts.length;
|
4774
|
+
var i = 0;
|
4775
|
+
var j = oldFilenamePartsSize - 1;
|
4776
|
+
var k = newFilenamePartsSize - 1;
|
4762
4777
|
while (i < j && i < k) {
|
4763
4778
|
if (oldFilenameParts[i] === newFilenameParts[i]) {
|
4764
4779
|
prefixPaths.push(newFilenameParts[i]);
|
@@ -4778,10 +4793,10 @@ function filenameDiff(file) {
|
|
4778
4793
|
break;
|
4779
4794
|
}
|
4780
4795
|
}
|
4781
|
-
|
4782
|
-
|
4783
|
-
|
4784
|
-
|
4796
|
+
var finalPrefix = prefixPaths.join(separator);
|
4797
|
+
var finalSuffix = suffixPaths.join(separator);
|
4798
|
+
var oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator);
|
4799
|
+
var newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator);
|
4785
4800
|
if (finalPrefix.length && finalSuffix.length) {
|
4786
4801
|
return (finalPrefix + separator + '{' + oldRemainingPath + ' → ' + newRemainingPath + '}' + separator + finalSuffix);
|
4787
4802
|
}
|
@@ -4801,10 +4816,10 @@ function filenameDiff(file) {
|
|
4801
4816
|
}
|
4802
4817
|
}
|
4803
4818
|
function getHtmlId(file) {
|
4804
|
-
return
|
4819
|
+
return "d2h-".concat(hashCode(filenameDiff(file)).toString().slice(-6));
|
4805
4820
|
}
|
4806
4821
|
function getFileIcon(file) {
|
4807
|
-
|
4822
|
+
var templateName = 'file-changed';
|
4808
4823
|
if (file.isRename) {
|
4809
4824
|
templateName = 'file-renamed';
|
4810
4825
|
}
|
@@ -4822,10 +4837,11 @@ function getFileIcon(file) {
|
|
4822
4837
|
}
|
4823
4838
|
return templateName;
|
4824
4839
|
}
|
4825
|
-
function diffHighlight(diffLine1, diffLine2, isCombined, config
|
4826
|
-
|
4827
|
-
|
4828
|
-
|
4840
|
+
function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
4841
|
+
if (config === void 0) { config = {}; }
|
4842
|
+
var _a = __assign(__assign({}, defaultRenderConfig), config), matching = _a.matching, maxLineLengthHighlight = _a.maxLineLengthHighlight, matchWordsThreshold = _a.matchWordsThreshold, diffStyle = _a.diffStyle;
|
4843
|
+
var line1 = deconstructLine(diffLine1, isCombined, false);
|
4844
|
+
var line2 = deconstructLine(diffLine2, isCombined, false);
|
4829
4845
|
if (line1.content.length > maxLineLengthHighlight || line2.content.length > maxLineLengthHighlight) {
|
4830
4846
|
return {
|
4831
4847
|
oldLine: {
|
@@ -4838,17 +4854,17 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) {
|
|
4838
4854
|
},
|
4839
4855
|
};
|
4840
4856
|
}
|
4841
|
-
|
4857
|
+
var diff = diffStyle === 'char'
|
4842
4858
|
? lib_diffChars(line1.content, line2.content)
|
4843
4859
|
: lib_diffWordsWithSpace(line1.content, line2.content);
|
4844
|
-
|
4860
|
+
var changedWords = [];
|
4845
4861
|
if (diffStyle === 'word' && matching === 'words') {
|
4846
|
-
|
4847
|
-
|
4848
|
-
|
4849
|
-
chunks.forEach(chunk
|
4862
|
+
var removed = diff.filter(function (element) { return element.removed; });
|
4863
|
+
var added = diff.filter(function (element) { return element.added; });
|
4864
|
+
var chunks = matcher(added, removed);
|
4865
|
+
chunks.forEach(function (chunk) {
|
4850
4866
|
if (chunk[0].length === 1 && chunk[1].length === 1) {
|
4851
|
-
|
4867
|
+
var dist = distance(chunk[0][0], chunk[1][0]);
|
4852
4868
|
if (dist < matchWordsThreshold) {
|
4853
4869
|
changedWords.push(chunk[0][0]);
|
4854
4870
|
changedWords.push(chunk[1][0]);
|
@@ -4856,13 +4872,13 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) {
|
|
4856
4872
|
}
|
4857
4873
|
});
|
4858
4874
|
}
|
4859
|
-
|
4860
|
-
|
4861
|
-
|
4862
|
-
|
4875
|
+
var highlightedLine = diff.reduce(function (highlightedLine, part) {
|
4876
|
+
var elemType = part.added ? 'ins' : part.removed ? 'del' : null;
|
4877
|
+
var addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : '';
|
4878
|
+
var escapedValue = escapeForHtml(part.value);
|
4863
4879
|
return elemType !== null
|
4864
|
-
?
|
4865
|
-
:
|
4880
|
+
? "".concat(highlightedLine, "<").concat(elemType).concat(addClass, ">").concat(escapedValue, "</").concat(elemType, ">")
|
4881
|
+
: "".concat(highlightedLine).concat(escapedValue);
|
4866
4882
|
}, '');
|
4867
4883
|
return {
|
4868
4884
|
oldLine: {
|
@@ -4878,19 +4894,12 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) {
|
|
4878
4894
|
//# sourceMappingURL=render-utils.js.map
|
4879
4895
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/file-list-renderer.js
|
4880
4896
|
|
4881
|
-
|
4882
|
-
|
4883
|
-
|
4884
|
-
|
4885
|
-
|
4886
|
-
|
4887
|
-
constructor(hoganUtils, config = {}) {
|
4888
|
-
this.hoganUtils = hoganUtils;
|
4889
|
-
this.config = Object.assign(Object.assign({}, defaultFileListRendererConfig), config);
|
4890
|
-
}
|
4891
|
-
render(diffFiles) {
|
4892
|
-
const files = diffFiles
|
4893
|
-
.map(file => this.hoganUtils.render(baseTemplatesPath, 'line', {
|
4897
|
+
var baseTemplatesPath = 'file-summary';
|
4898
|
+
var iconsBaseTemplatesPath = 'icon';
|
4899
|
+
function render(diffFiles, hoganUtils) {
|
4900
|
+
var files = diffFiles
|
4901
|
+
.map(function (file) {
|
4902
|
+
return hoganUtils.render(baseTemplatesPath, 'line', {
|
4894
4903
|
fileHtmlId: getHtmlId(file),
|
4895
4904
|
oldName: file.oldName,
|
4896
4905
|
newName: file.newName,
|
@@ -4898,56 +4907,65 @@ class FileListRenderer {
|
|
4898
4907
|
deletedLines: '-' + file.deletedLines,
|
4899
4908
|
addedLines: '+' + file.addedLines,
|
4900
4909
|
}, {
|
4901
|
-
fileIcon:
|
4902
|
-
}))
|
4903
|
-
.join('\n');
|
4904
|
-
return this.hoganUtils.render(baseTemplatesPath, 'wrapper', {
|
4905
|
-
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
4906
|
-
filesNumber: diffFiles.length,
|
4907
|
-
files: files,
|
4910
|
+
fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)),
|
4908
4911
|
});
|
4909
|
-
}
|
4912
|
+
})
|
4913
|
+
.join('\n');
|
4914
|
+
return hoganUtils.render(baseTemplatesPath, 'wrapper', {
|
4915
|
+
filesNumber: diffFiles.length,
|
4916
|
+
files: files,
|
4917
|
+
});
|
4910
4918
|
}
|
4911
4919
|
//# sourceMappingURL=file-list-renderer.js.map
|
4912
4920
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/line-by-line-renderer.js
|
4921
|
+
var line_by_line_renderer_assign = (undefined && undefined.__assign) || function () {
|
4922
|
+
line_by_line_renderer_assign = Object.assign || function(t) {
|
4923
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4924
|
+
s = arguments[i];
|
4925
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4926
|
+
t[p] = s[p];
|
4927
|
+
}
|
4928
|
+
return t;
|
4929
|
+
};
|
4930
|
+
return line_by_line_renderer_assign.apply(this, arguments);
|
4931
|
+
};
|
4913
4932
|
|
4914
4933
|
|
4915
4934
|
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
4921
|
-
|
4922
|
-
|
4935
|
+
var defaultLineByLineRendererConfig = line_by_line_renderer_assign(line_by_line_renderer_assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 });
|
4936
|
+
var genericTemplatesPath = 'generic';
|
4937
|
+
var line_by_line_renderer_baseTemplatesPath = 'line-by-line';
|
4938
|
+
var line_by_line_renderer_iconsBaseTemplatesPath = 'icon';
|
4939
|
+
var tagsBaseTemplatesPath = 'tag';
|
4940
|
+
var LineByLineRenderer = (function () {
|
4941
|
+
function LineByLineRenderer(hoganUtils, config) {
|
4942
|
+
if (config === void 0) { config = {}; }
|
4923
4943
|
this.hoganUtils = hoganUtils;
|
4924
|
-
this.config =
|
4944
|
+
this.config = line_by_line_renderer_assign(line_by_line_renderer_assign({}, defaultLineByLineRendererConfig), config);
|
4925
4945
|
}
|
4926
|
-
render(diffFiles) {
|
4927
|
-
|
4928
|
-
|
4929
|
-
|
4946
|
+
LineByLineRenderer.prototype.render = function (diffFiles) {
|
4947
|
+
var _this = this;
|
4948
|
+
var diffsHtml = diffFiles
|
4949
|
+
.map(function (file) {
|
4950
|
+
var diffs;
|
4930
4951
|
if (file.blocks.length) {
|
4931
|
-
diffs =
|
4952
|
+
diffs = _this.generateFileHtml(file);
|
4932
4953
|
}
|
4933
4954
|
else {
|
4934
|
-
diffs =
|
4955
|
+
diffs = _this.generateEmptyDiff();
|
4935
4956
|
}
|
4936
|
-
return
|
4957
|
+
return _this.makeFileDiffHtml(file, diffs);
|
4937
4958
|
})
|
4938
4959
|
.join('\n');
|
4939
|
-
return this.hoganUtils.render(genericTemplatesPath, 'wrapper', {
|
4940
|
-
|
4941
|
-
|
4942
|
-
});
|
4943
|
-
}
|
4944
|
-
makeFileDiffHtml(file, diffs) {
|
4960
|
+
return this.hoganUtils.render(genericTemplatesPath, 'wrapper', { content: diffsHtml });
|
4961
|
+
};
|
4962
|
+
LineByLineRenderer.prototype.makeFileDiffHtml = function (file, diffs) {
|
4945
4963
|
if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0)
|
4946
4964
|
return '';
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
4950
|
-
|
4965
|
+
var fileDiffTemplate = this.hoganUtils.template(line_by_line_renderer_baseTemplatesPath, 'file-diff');
|
4966
|
+
var filePathTemplate = this.hoganUtils.template(genericTemplatesPath, 'file-path');
|
4967
|
+
var fileIconTemplate = this.hoganUtils.template(line_by_line_renderer_iconsBaseTemplatesPath, 'file');
|
4968
|
+
var fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file));
|
4951
4969
|
return fileDiffTemplate.render({
|
4952
4970
|
file: file,
|
4953
4971
|
fileHtmlId: getHtmlId(file),
|
@@ -4959,35 +4977,38 @@ class LineByLineRenderer {
|
|
4959
4977
|
fileTag: fileTagTemplate,
|
4960
4978
|
}),
|
4961
4979
|
});
|
4962
|
-
}
|
4963
|
-
generateEmptyDiff() {
|
4980
|
+
};
|
4981
|
+
LineByLineRenderer.prototype.generateEmptyDiff = function () {
|
4964
4982
|
return this.hoganUtils.render(genericTemplatesPath, 'empty-diff', {
|
4965
4983
|
contentClass: 'd2h-code-line',
|
4966
4984
|
CSSLineClass: CSSLineClass,
|
4967
4985
|
});
|
4968
|
-
}
|
4969
|
-
generateFileHtml(file) {
|
4970
|
-
|
4986
|
+
};
|
4987
|
+
LineByLineRenderer.prototype.generateFileHtml = function (file) {
|
4988
|
+
var _this = this;
|
4989
|
+
var matcher = newMatcherFn(newDistanceFn(function (e) { return deconstructLine(e.content, file.isCombined).content; }));
|
4971
4990
|
return file.blocks
|
4972
|
-
.map(block
|
4973
|
-
|
4991
|
+
.map(function (block) {
|
4992
|
+
var lines = _this.hoganUtils.render(genericTemplatesPath, 'block-header', {
|
4974
4993
|
CSSLineClass: CSSLineClass,
|
4975
4994
|
blockHeader: file.isTooBig ? block.header : escapeForHtml(block.header),
|
4976
4995
|
lineClass: 'd2h-code-linenumber',
|
4977
4996
|
contentClass: 'd2h-code-line',
|
4978
4997
|
});
|
4979
|
-
|
4998
|
+
_this.applyLineGroupping(block).forEach(function (_a) {
|
4999
|
+
var contextLines = _a[0], oldLines = _a[1], newLines = _a[2];
|
4980
5000
|
if (oldLines.length && newLines.length && !contextLines.length) {
|
4981
|
-
|
4982
|
-
|
5001
|
+
_this.applyRematchMatching(oldLines, newLines, matcher).map(function (_a) {
|
5002
|
+
var oldLines = _a[0], newLines = _a[1];
|
5003
|
+
var _b = _this.processChangedLines(file, file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
4983
5004
|
lines += left;
|
4984
5005
|
lines += right;
|
4985
5006
|
});
|
4986
5007
|
}
|
4987
5008
|
else if (contextLines.length) {
|
4988
|
-
contextLines.forEach(line
|
4989
|
-
|
4990
|
-
lines +=
|
5009
|
+
contextLines.forEach(function (line) {
|
5010
|
+
var _a = deconstructLine(line.content, file.isCombined), prefix = _a.prefix, content = _a.content;
|
5011
|
+
lines += _this.generateSingleLineHtml(file, {
|
4991
5012
|
type: CSSLineClass.CONTEXT,
|
4992
5013
|
prefix: prefix,
|
4993
5014
|
content: content,
|
@@ -4997,7 +5018,7 @@ class LineByLineRenderer {
|
|
4997
5018
|
});
|
4998
5019
|
}
|
4999
5020
|
else if (oldLines.length || newLines.length) {
|
5000
|
-
|
5021
|
+
var _b = _this.processChangedLines(file, file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
5001
5022
|
lines += left;
|
5002
5023
|
lines += right;
|
5003
5024
|
}
|
@@ -5008,13 +5029,13 @@ class LineByLineRenderer {
|
|
5008
5029
|
return lines;
|
5009
5030
|
})
|
5010
5031
|
.join('\n');
|
5011
|
-
}
|
5012
|
-
applyLineGroupping(block) {
|
5013
|
-
|
5014
|
-
|
5015
|
-
|
5016
|
-
for (
|
5017
|
-
|
5032
|
+
};
|
5033
|
+
LineByLineRenderer.prototype.applyLineGroupping = function (block) {
|
5034
|
+
var blockLinesGroups = [];
|
5035
|
+
var oldLines = [];
|
5036
|
+
var newLines = [];
|
5037
|
+
for (var i = 0; i < block.lines.length; i++) {
|
5038
|
+
var diffLine = block.lines[i];
|
5018
5039
|
if ((diffLine.type !== LineType.INSERT && newLines.length) ||
|
5019
5040
|
(diffLine.type === LineType.CONTEXT && oldLines.length > 0)) {
|
5020
5041
|
blockLinesGroups.push([[], oldLines, newLines]);
|
@@ -5040,59 +5061,59 @@ class LineByLineRenderer {
|
|
5040
5061
|
newLines = [];
|
5041
5062
|
}
|
5042
5063
|
return blockLinesGroups;
|
5043
|
-
}
|
5044
|
-
applyRematchMatching(oldLines, newLines, matcher) {
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5064
|
+
};
|
5065
|
+
LineByLineRenderer.prototype.applyRematchMatching = function (oldLines, newLines, matcher) {
|
5066
|
+
var comparisons = oldLines.length * newLines.length;
|
5067
|
+
var maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(function (elem) { return elem.content.length; })));
|
5068
|
+
var doMatching = comparisons < this.config.matchingMaxComparisons &&
|
5048
5069
|
maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison &&
|
5049
5070
|
(this.config.matching === 'lines' || this.config.matching === 'words');
|
5050
5071
|
return doMatching ? matcher(oldLines, newLines) : [[oldLines, newLines]];
|
5051
|
-
}
|
5052
|
-
processChangedLines(file, isCombined, oldLines, newLines) {
|
5053
|
-
|
5072
|
+
};
|
5073
|
+
LineByLineRenderer.prototype.processChangedLines = function (file, isCombined, oldLines, newLines) {
|
5074
|
+
var fileHtml = {
|
5054
5075
|
right: '',
|
5055
5076
|
left: '',
|
5056
5077
|
};
|
5057
|
-
|
5058
|
-
for (
|
5059
|
-
|
5060
|
-
|
5061
|
-
|
5078
|
+
var maxLinesNumber = Math.max(oldLines.length, newLines.length);
|
5079
|
+
for (var i = 0; i < maxLinesNumber; i++) {
|
5080
|
+
var oldLine = oldLines[i];
|
5081
|
+
var newLine = newLines[i];
|
5082
|
+
var diff = oldLine !== undefined && newLine !== undefined
|
5062
5083
|
? diffHighlight(oldLine.content, newLine.content, isCombined, this.config)
|
5063
5084
|
: undefined;
|
5064
|
-
|
5065
|
-
?
|
5085
|
+
var preparedOldLine = oldLine !== undefined && oldLine.oldNumber !== undefined
|
5086
|
+
? line_by_line_renderer_assign(line_by_line_renderer_assign({}, (diff !== undefined
|
5066
5087
|
? {
|
5067
5088
|
prefix: diff.oldLine.prefix,
|
5068
5089
|
content: diff.oldLine.content,
|
5069
5090
|
type: CSSLineClass.DELETE_CHANGES,
|
5070
5091
|
}
|
5071
|
-
:
|
5072
|
-
|
5073
|
-
?
|
5092
|
+
: line_by_line_renderer_assign(line_by_line_renderer_assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) }))), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : undefined;
|
5093
|
+
var preparedNewLine = newLine !== undefined && newLine.newNumber !== undefined
|
5094
|
+
? line_by_line_renderer_assign(line_by_line_renderer_assign({}, (diff !== undefined
|
5074
5095
|
? {
|
5075
5096
|
prefix: diff.newLine.prefix,
|
5076
5097
|
content: diff.newLine.content,
|
5077
5098
|
type: CSSLineClass.INSERT_CHANGES,
|
5078
5099
|
}
|
5079
|
-
:
|
5080
|
-
|
5100
|
+
: line_by_line_renderer_assign(line_by_line_renderer_assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) }))), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : undefined;
|
5101
|
+
var _a = this.generateLineHtml(file, preparedOldLine, preparedNewLine), left = _a.left, right = _a.right;
|
5081
5102
|
fileHtml.left += left;
|
5082
5103
|
fileHtml.right += right;
|
5083
5104
|
}
|
5084
5105
|
return fileHtml;
|
5085
|
-
}
|
5086
|
-
generateLineHtml(file, oldLine, newLine) {
|
5106
|
+
};
|
5107
|
+
LineByLineRenderer.prototype.generateLineHtml = function (file, oldLine, newLine) {
|
5087
5108
|
return {
|
5088
5109
|
left: this.generateSingleLineHtml(file, oldLine),
|
5089
5110
|
right: this.generateSingleLineHtml(file, newLine),
|
5090
5111
|
};
|
5091
|
-
}
|
5092
|
-
generateSingleLineHtml(file, line) {
|
5112
|
+
};
|
5113
|
+
LineByLineRenderer.prototype.generateSingleLineHtml = function (file, line) {
|
5093
5114
|
if (line === undefined)
|
5094
5115
|
return '';
|
5095
|
-
|
5116
|
+
var lineNumberHtml = this.hoganUtils.render(line_by_line_renderer_baseTemplatesPath, 'numbers', {
|
5096
5117
|
oldNumber: line.oldNumber || '',
|
5097
5118
|
newNumber: line.newNumber || '',
|
5098
5119
|
});
|
@@ -5103,51 +5124,63 @@ class LineByLineRenderer {
|
|
5103
5124
|
prefix: line.prefix === ' ' ? ' ' : line.prefix,
|
5104
5125
|
content: line.content,
|
5105
5126
|
lineNumber: lineNumberHtml,
|
5106
|
-
line,
|
5107
|
-
file,
|
5127
|
+
line: line,
|
5128
|
+
file: file,
|
5108
5129
|
});
|
5109
|
-
}
|
5110
|
-
|
5130
|
+
};
|
5131
|
+
return LineByLineRenderer;
|
5132
|
+
}());
|
5133
|
+
/* harmony default export */ const line_by_line_renderer = (LineByLineRenderer);
|
5111
5134
|
//# sourceMappingURL=line-by-line-renderer.js.map
|
5112
5135
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/side-by-side-renderer.js
|
5136
|
+
var side_by_side_renderer_assign = (undefined && undefined.__assign) || function () {
|
5137
|
+
side_by_side_renderer_assign = Object.assign || function(t) {
|
5138
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5139
|
+
s = arguments[i];
|
5140
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5141
|
+
t[p] = s[p];
|
5142
|
+
}
|
5143
|
+
return t;
|
5144
|
+
};
|
5145
|
+
return side_by_side_renderer_assign.apply(this, arguments);
|
5146
|
+
};
|
5113
5147
|
|
5114
5148
|
|
5115
5149
|
|
5116
|
-
|
5117
|
-
|
5118
|
-
|
5119
|
-
|
5120
|
-
|
5121
|
-
|
5122
|
-
|
5150
|
+
var defaultSideBySideRendererConfig = side_by_side_renderer_assign(side_by_side_renderer_assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 });
|
5151
|
+
var side_by_side_renderer_genericTemplatesPath = 'generic';
|
5152
|
+
var side_by_side_renderer_baseTemplatesPath = 'side-by-side';
|
5153
|
+
var side_by_side_renderer_iconsBaseTemplatesPath = 'icon';
|
5154
|
+
var side_by_side_renderer_tagsBaseTemplatesPath = 'tag';
|
5155
|
+
var SideBySideRenderer = (function () {
|
5156
|
+
function SideBySideRenderer(hoganUtils, config) {
|
5157
|
+
if (config === void 0) { config = {}; }
|
5123
5158
|
this.hoganUtils = hoganUtils;
|
5124
|
-
this.config =
|
5159
|
+
this.config = side_by_side_renderer_assign(side_by_side_renderer_assign({}, defaultSideBySideRendererConfig), config);
|
5125
5160
|
}
|
5126
|
-
render(diffFiles) {
|
5127
|
-
|
5128
|
-
|
5129
|
-
|
5161
|
+
SideBySideRenderer.prototype.render = function (diffFiles) {
|
5162
|
+
var _this = this;
|
5163
|
+
var diffsHtml = diffFiles
|
5164
|
+
.map(function (file) {
|
5165
|
+
var diffs;
|
5130
5166
|
if (file.blocks.length) {
|
5131
|
-
diffs =
|
5167
|
+
diffs = _this.generateFileHtml(file);
|
5132
5168
|
}
|
5133
5169
|
else {
|
5134
|
-
diffs =
|
5170
|
+
diffs = _this.generateEmptyDiff();
|
5135
5171
|
}
|
5136
|
-
return
|
5172
|
+
return _this.makeFileDiffHtml(file, diffs);
|
5137
5173
|
})
|
5138
5174
|
.join('\n');
|
5139
|
-
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'wrapper', {
|
5140
|
-
|
5141
|
-
|
5142
|
-
});
|
5143
|
-
}
|
5144
|
-
makeFileDiffHtml(file, diffs) {
|
5175
|
+
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'wrapper', { content: diffsHtml });
|
5176
|
+
};
|
5177
|
+
SideBySideRenderer.prototype.makeFileDiffHtml = function (file, diffs) {
|
5145
5178
|
if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0)
|
5146
5179
|
return '';
|
5147
|
-
|
5148
|
-
|
5149
|
-
|
5150
|
-
|
5180
|
+
var fileDiffTemplate = this.hoganUtils.template(side_by_side_renderer_baseTemplatesPath, 'file-diff');
|
5181
|
+
var filePathTemplate = this.hoganUtils.template(side_by_side_renderer_genericTemplatesPath, 'file-path');
|
5182
|
+
var fileIconTemplate = this.hoganUtils.template(side_by_side_renderer_iconsBaseTemplatesPath, 'file');
|
5183
|
+
var fileTagTemplate = this.hoganUtils.template(side_by_side_renderer_tagsBaseTemplatesPath, getFileIcon(file));
|
5151
5184
|
return fileDiffTemplate.render({
|
5152
5185
|
file: file,
|
5153
5186
|
fileHtmlId: getHtmlId(file),
|
@@ -5159,8 +5192,8 @@ class SideBySideRenderer {
|
|
5159
5192
|
fileTag: fileTagTemplate,
|
5160
5193
|
}),
|
5161
5194
|
});
|
5162
|
-
}
|
5163
|
-
generateEmptyDiff() {
|
5195
|
+
};
|
5196
|
+
SideBySideRenderer.prototype.generateEmptyDiff = function () {
|
5164
5197
|
return {
|
5165
5198
|
right: '',
|
5166
5199
|
left: this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'empty-diff', {
|
@@ -5168,27 +5201,30 @@ class SideBySideRenderer {
|
|
5168
5201
|
CSSLineClass: CSSLineClass,
|
5169
5202
|
}),
|
5170
5203
|
};
|
5171
|
-
}
|
5172
|
-
generateFileHtml(file) {
|
5173
|
-
|
5204
|
+
};
|
5205
|
+
SideBySideRenderer.prototype.generateFileHtml = function (file) {
|
5206
|
+
var _this = this;
|
5207
|
+
var matcher = newMatcherFn(newDistanceFn(function (e) { return deconstructLine(e.content, file.isCombined).content; }));
|
5174
5208
|
return file.blocks
|
5175
|
-
.map(block
|
5176
|
-
|
5177
|
-
left:
|
5178
|
-
right:
|
5209
|
+
.map(function (block) {
|
5210
|
+
var fileHtml = {
|
5211
|
+
left: _this.makeHeaderHtml(block.header, file),
|
5212
|
+
right: _this.makeHeaderHtml(''),
|
5179
5213
|
};
|
5180
|
-
|
5214
|
+
_this.applyLineGroupping(block).forEach(function (_a) {
|
5215
|
+
var contextLines = _a[0], oldLines = _a[1], newLines = _a[2];
|
5181
5216
|
if (oldLines.length && newLines.length && !contextLines.length) {
|
5182
|
-
|
5183
|
-
|
5217
|
+
_this.applyRematchMatching(oldLines, newLines, matcher).map(function (_a) {
|
5218
|
+
var oldLines = _a[0], newLines = _a[1];
|
5219
|
+
var _b = _this.processChangedLines(file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
5184
5220
|
fileHtml.left += left;
|
5185
5221
|
fileHtml.right += right;
|
5186
5222
|
});
|
5187
5223
|
}
|
5188
5224
|
else if (contextLines.length) {
|
5189
|
-
contextLines.forEach(line
|
5190
|
-
|
5191
|
-
|
5225
|
+
contextLines.forEach(function (line) {
|
5226
|
+
var _a = deconstructLine(line.content, file.isCombined), prefix = _a.prefix, content = _a.content;
|
5227
|
+
var _b = _this.generateLineHtml({
|
5192
5228
|
type: CSSLineClass.CONTEXT,
|
5193
5229
|
prefix: prefix,
|
5194
5230
|
content: content,
|
@@ -5198,13 +5234,13 @@ class SideBySideRenderer {
|
|
5198
5234
|
prefix: prefix,
|
5199
5235
|
content: content,
|
5200
5236
|
number: line.newNumber,
|
5201
|
-
});
|
5237
|
+
}), left = _b.left, right = _b.right;
|
5202
5238
|
fileHtml.left += left;
|
5203
5239
|
fileHtml.right += right;
|
5204
5240
|
});
|
5205
5241
|
}
|
5206
5242
|
else if (oldLines.length || newLines.length) {
|
5207
|
-
|
5243
|
+
var _b = _this.processChangedLines(file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
5208
5244
|
fileHtml.left += left;
|
5209
5245
|
fileHtml.right += right;
|
5210
5246
|
}
|
@@ -5214,16 +5250,16 @@ class SideBySideRenderer {
|
|
5214
5250
|
});
|
5215
5251
|
return fileHtml;
|
5216
5252
|
})
|
5217
|
-
.reduce((accomulated, html)
|
5253
|
+
.reduce(function (accomulated, html) {
|
5218
5254
|
return { left: accomulated.left + html.left, right: accomulated.right + html.right };
|
5219
5255
|
}, { left: '', right: '' });
|
5220
|
-
}
|
5221
|
-
applyLineGroupping(block) {
|
5222
|
-
|
5223
|
-
|
5224
|
-
|
5225
|
-
for (
|
5226
|
-
|
5256
|
+
};
|
5257
|
+
SideBySideRenderer.prototype.applyLineGroupping = function (block) {
|
5258
|
+
var blockLinesGroups = [];
|
5259
|
+
var oldLines = [];
|
5260
|
+
var newLines = [];
|
5261
|
+
for (var i = 0; i < block.lines.length; i++) {
|
5262
|
+
var diffLine = block.lines[i];
|
5227
5263
|
if ((diffLine.type !== LineType.INSERT && newLines.length) ||
|
5228
5264
|
(diffLine.type === LineType.CONTEXT && oldLines.length > 0)) {
|
5229
5265
|
blockLinesGroups.push([[], oldLines, newLines]);
|
@@ -5249,84 +5285,86 @@ class SideBySideRenderer {
|
|
5249
5285
|
newLines = [];
|
5250
5286
|
}
|
5251
5287
|
return blockLinesGroups;
|
5252
|
-
}
|
5253
|
-
applyRematchMatching(oldLines, newLines, matcher) {
|
5254
|
-
|
5255
|
-
|
5256
|
-
|
5288
|
+
};
|
5289
|
+
SideBySideRenderer.prototype.applyRematchMatching = function (oldLines, newLines, matcher) {
|
5290
|
+
var comparisons = oldLines.length * newLines.length;
|
5291
|
+
var maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(function (elem) { return elem.content.length; })));
|
5292
|
+
var doMatching = comparisons < this.config.matchingMaxComparisons &&
|
5257
5293
|
maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison &&
|
5258
5294
|
(this.config.matching === 'lines' || this.config.matching === 'words');
|
5259
5295
|
return doMatching ? matcher(oldLines, newLines) : [[oldLines, newLines]];
|
5260
|
-
}
|
5261
|
-
makeHeaderHtml(blockHeader, file) {
|
5296
|
+
};
|
5297
|
+
SideBySideRenderer.prototype.makeHeaderHtml = function (blockHeader, file) {
|
5262
5298
|
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'block-header', {
|
5263
5299
|
CSSLineClass: CSSLineClass,
|
5264
5300
|
blockHeader: (file === null || file === void 0 ? void 0 : file.isTooBig) ? blockHeader : escapeForHtml(blockHeader),
|
5265
5301
|
lineClass: 'd2h-code-side-linenumber',
|
5266
5302
|
contentClass: 'd2h-code-side-line',
|
5267
5303
|
});
|
5268
|
-
}
|
5269
|
-
processChangedLines(isCombined, oldLines, newLines) {
|
5270
|
-
|
5304
|
+
};
|
5305
|
+
SideBySideRenderer.prototype.processChangedLines = function (isCombined, oldLines, newLines) {
|
5306
|
+
var fileHtml = {
|
5271
5307
|
right: '',
|
5272
5308
|
left: '',
|
5273
5309
|
};
|
5274
|
-
|
5275
|
-
for (
|
5276
|
-
|
5277
|
-
|
5278
|
-
|
5310
|
+
var maxLinesNumber = Math.max(oldLines.length, newLines.length);
|
5311
|
+
for (var i = 0; i < maxLinesNumber; i++) {
|
5312
|
+
var oldLine = oldLines[i];
|
5313
|
+
var newLine = newLines[i];
|
5314
|
+
var diff = oldLine !== undefined && newLine !== undefined
|
5279
5315
|
? diffHighlight(oldLine.content, newLine.content, isCombined, this.config)
|
5280
5316
|
: undefined;
|
5281
|
-
|
5282
|
-
?
|
5317
|
+
var preparedOldLine = oldLine !== undefined && oldLine.oldNumber !== undefined
|
5318
|
+
? side_by_side_renderer_assign(side_by_side_renderer_assign({}, (diff !== undefined
|
5283
5319
|
? {
|
5284
5320
|
prefix: diff.oldLine.prefix,
|
5285
5321
|
content: diff.oldLine.content,
|
5286
5322
|
type: CSSLineClass.DELETE_CHANGES,
|
5287
5323
|
}
|
5288
|
-
:
|
5289
|
-
|
5290
|
-
?
|
5324
|
+
: side_by_side_renderer_assign(side_by_side_renderer_assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) }))), { number: oldLine.oldNumber }) : undefined;
|
5325
|
+
var preparedNewLine = newLine !== undefined && newLine.newNumber !== undefined
|
5326
|
+
? side_by_side_renderer_assign(side_by_side_renderer_assign({}, (diff !== undefined
|
5291
5327
|
? {
|
5292
5328
|
prefix: diff.newLine.prefix,
|
5293
5329
|
content: diff.newLine.content,
|
5294
5330
|
type: CSSLineClass.INSERT_CHANGES,
|
5295
5331
|
}
|
5296
|
-
:
|
5297
|
-
|
5332
|
+
: side_by_side_renderer_assign(side_by_side_renderer_assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) }))), { number: newLine.newNumber }) : undefined;
|
5333
|
+
var _a = this.generateLineHtml(preparedOldLine, preparedNewLine), left = _a.left, right = _a.right;
|
5298
5334
|
fileHtml.left += left;
|
5299
5335
|
fileHtml.right += right;
|
5300
5336
|
}
|
5301
5337
|
return fileHtml;
|
5302
|
-
}
|
5303
|
-
generateLineHtml(oldLine, newLine) {
|
5338
|
+
};
|
5339
|
+
SideBySideRenderer.prototype.generateLineHtml = function (oldLine, newLine) {
|
5304
5340
|
return {
|
5305
5341
|
left: this.generateSingleHtml(oldLine),
|
5306
5342
|
right: this.generateSingleHtml(newLine),
|
5307
5343
|
};
|
5308
|
-
}
|
5309
|
-
generateSingleHtml(line) {
|
5310
|
-
|
5311
|
-
|
5344
|
+
};
|
5345
|
+
SideBySideRenderer.prototype.generateSingleHtml = function (line) {
|
5346
|
+
var lineClass = 'd2h-code-side-linenumber';
|
5347
|
+
var contentClass = 'd2h-code-side-line';
|
5312
5348
|
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'line', {
|
5313
|
-
type: (line === null || line === void 0 ? void 0 : line.type) ||
|
5314
|
-
lineClass: line !== undefined ? lineClass :
|
5315
|
-
contentClass: line !== undefined ? contentClass :
|
5349
|
+
type: (line === null || line === void 0 ? void 0 : line.type) || "".concat(CSSLineClass.CONTEXT, " d2h-emptyplaceholder"),
|
5350
|
+
lineClass: line !== undefined ? lineClass : "".concat(lineClass, " d2h-code-side-emptyplaceholder"),
|
5351
|
+
contentClass: line !== undefined ? contentClass : "".concat(contentClass, " d2h-code-side-emptyplaceholder"),
|
5316
5352
|
prefix: (line === null || line === void 0 ? void 0 : line.prefix) === ' ' ? ' ' : line === null || line === void 0 ? void 0 : line.prefix,
|
5317
5353
|
content: line === null || line === void 0 ? void 0 : line.content,
|
5318
5354
|
lineNumber: line === null || line === void 0 ? void 0 : line.number,
|
5319
5355
|
});
|
5320
|
-
}
|
5321
|
-
|
5356
|
+
};
|
5357
|
+
return SideBySideRenderer;
|
5358
|
+
}());
|
5359
|
+
/* harmony default export */ const side_by_side_renderer = (SideBySideRenderer);
|
5322
5360
|
//# sourceMappingURL=side-by-side-renderer.js.map
|
5323
5361
|
// EXTERNAL MODULE: ../../node_modules/hogan.js/lib/hogan.js
|
5324
5362
|
var hogan = __webpack_require__(112);
|
5325
5363
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/diff2html-templates.js
|
5326
5364
|
|
5327
|
-
|
5365
|
+
var defaultTemplates = {};
|
5328
5366
|
defaultTemplates["file-summary-line"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<li class=\"d2h-file-list-line\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-name-wrapper\">"); t.b("\n" + i); t.b(t.rp("<fileIcon0", c, p, " ")); t.b(" <a href=\"#"); t.b(t.v(t.f("fileHtmlId", c, p, 0))); t.b("\" class=\"d2h-file-name\">"); t.b(t.v(t.f("fileName", c, p, 0))); t.b("</a>"); t.b("\n" + i); t.b(" <span class=\"d2h-file-stats\">"); t.b("\n" + i); t.b(" <span class=\"d2h-lines-added\">"); t.b(t.v(t.f("addedLines", c, p, 0))); t.b("</span>"); t.b("\n" + i); t.b(" <span class=\"d2h-lines-deleted\">"); t.b(t.v(t.f("deletedLines", c, p, 0))); t.b("</span>"); t.b("\n" + i); t.b(" </span>"); t.b("\n" + i); t.b(" </span>"); t.b("\n" + i); t.b("</li>"); return t.fl(); }, partials: { "<fileIcon0": { name: "fileIcon", partials: {}, subs: {} } }, subs: {} });
|
5329
|
-
defaultTemplates["file-summary-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-file-list-wrapper
|
5367
|
+
defaultTemplates["file-summary-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-file-list-wrapper\">"); t.b("\n" + i); t.b(" <div class=\"d2h-file-list-header\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-list-title\">Files changed ("); t.b(t.v(t.f("filesNumber", c, p, 0))); t.b(")</span>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-hide\">hide</a>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-show\">show</a>"); t.b("\n" + i); t.b(" </div>"); t.b("\n" + i); t.b(" <ol class=\"d2h-file-list\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("files", c, p, 0))); t.b("\n" + i); t.b(" </ol>"); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5330
5368
|
defaultTemplates["generic-block-header"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<tr>"); t.b("\n" + i); t.b(" <td class=\""); t.b(t.v(t.f("lineClass", c, p, 0))); t.b(" "); t.b(t.v(t.d("CSSLineClass.INFO", c, p, 0))); t.b("\"></td>"); t.b("\n" + i); t.b(" <td class=\""); t.b(t.v(t.d("CSSLineClass.INFO", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" <div class=\""); t.b(t.v(t.f("contentClass", c, p, 0))); t.b("\">"); if (t.s(t.f("blockHeader", c, p, 1), c, p, 0, 156, 173, "{{ }}")) {
|
5331
5369
|
t.rs(c, p, function (c, p, t) { t.b(t.t(t.f("blockHeader", c, p, 0))); });
|
5332
5370
|
c.pop();
|
@@ -5348,7 +5386,7 @@ defaultTemplates["generic-line"] = new hogan.Template({ code: function (c, p, i)
|
|
5348
5386
|
t.b(" <span class=\"d2h-code-line-ctn\"><br></span>");
|
5349
5387
|
t.b("\n" + i);
|
5350
5388
|
} ; t.b(" </div>"); t.b("\n" + i); t.b(" </td>"); t.b("\n" + i); t.b("</tr>"); return t.fl(); }, partials: {}, subs: {} });
|
5351
|
-
defaultTemplates["generic-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-wrapper
|
5389
|
+
defaultTemplates["generic-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-wrapper\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("content", c, p, 0))); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5352
5390
|
defaultTemplates["icon-file-added"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-added\" height=\"16\" title=\"added\" version=\"1.1\" viewBox=\"0 0 14 16\""); t.b("\n" + i); t.b(" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
5353
5391
|
defaultTemplates["icon-file-changed"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-changed\" height=\"16\" title=\"modified\" version=\"1.1\""); t.b("\n" + i); t.b(" viewBox=\"0 0 14 16\" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
5354
5392
|
defaultTemplates["icon-file-deleted"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-deleted\" height=\"16\" title=\"removed\" version=\"1.1\""); t.b("\n" + i); t.b(" viewBox=\"0 0 14 16\" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
@@ -5363,69 +5401,88 @@ defaultTemplates["tag-file-deleted"] = new hogan.Template({ code: function (c, p
|
|
5363
5401
|
defaultTemplates["tag-file-renamed"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<span class=\"d2h-tag d2h-moved d2h-moved-tag\">RENAMED</span>"); return t.fl(); }, partials: {}, subs: {} });
|
5364
5402
|
//# sourceMappingURL=diff2html-templates.js.map
|
5365
5403
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/hoganjs-utils.js
|
5404
|
+
var hoganjs_utils_assign = (undefined && undefined.__assign) || function () {
|
5405
|
+
hoganjs_utils_assign = Object.assign || function(t) {
|
5406
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5407
|
+
s = arguments[i];
|
5408
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5409
|
+
t[p] = s[p];
|
5410
|
+
}
|
5411
|
+
return t;
|
5412
|
+
};
|
5413
|
+
return hoganjs_utils_assign.apply(this, arguments);
|
5414
|
+
};
|
5366
5415
|
|
5367
5416
|
|
5368
|
-
|
5369
|
-
|
5370
|
-
|
5371
|
-
|
5372
|
-
|
5417
|
+
var HoganJsUtils = (function () {
|
5418
|
+
function HoganJsUtils(_a) {
|
5419
|
+
var _b = _a.compiledTemplates, compiledTemplates = _b === void 0 ? {} : _b, _c = _a.rawTemplates, rawTemplates = _c === void 0 ? {} : _c;
|
5420
|
+
var compiledRawTemplates = Object.entries(rawTemplates).reduce(function (previousTemplates, _a) {
|
5421
|
+
var _b;
|
5422
|
+
var name = _a[0], templateString = _a[1];
|
5423
|
+
var compiledTemplate = hogan.compile(templateString, { asString: false });
|
5424
|
+
return hoganjs_utils_assign(hoganjs_utils_assign({}, previousTemplates), (_b = {}, _b[name] = compiledTemplate, _b));
|
5373
5425
|
}, {});
|
5374
|
-
this.preCompiledTemplates =
|
5426
|
+
this.preCompiledTemplates = hoganjs_utils_assign(hoganjs_utils_assign(hoganjs_utils_assign({}, defaultTemplates), compiledTemplates), compiledRawTemplates);
|
5375
5427
|
}
|
5376
|
-
|
5428
|
+
HoganJsUtils.compile = function (templateString) {
|
5377
5429
|
return hogan.compile(templateString, { asString: false });
|
5378
|
-
}
|
5379
|
-
render(namespace, view, params, partials, indent) {
|
5380
|
-
|
5430
|
+
};
|
5431
|
+
HoganJsUtils.prototype.render = function (namespace, view, params, partials, indent) {
|
5432
|
+
var templateKey = this.templateKey(namespace, view);
|
5381
5433
|
try {
|
5382
|
-
|
5434
|
+
var template = this.preCompiledTemplates[templateKey];
|
5383
5435
|
return template.render(params, partials, indent);
|
5384
5436
|
}
|
5385
5437
|
catch (e) {
|
5386
|
-
throw new Error(
|
5438
|
+
throw new Error("Could not find template to render '".concat(templateKey, "'"));
|
5387
5439
|
}
|
5388
|
-
}
|
5389
|
-
template(namespace, view) {
|
5440
|
+
};
|
5441
|
+
HoganJsUtils.prototype.template = function (namespace, view) {
|
5390
5442
|
return this.preCompiledTemplates[this.templateKey(namespace, view)];
|
5391
|
-
}
|
5392
|
-
templateKey(namespace, view) {
|
5393
|
-
return
|
5394
|
-
}
|
5395
|
-
|
5443
|
+
};
|
5444
|
+
HoganJsUtils.prototype.templateKey = function (namespace, view) {
|
5445
|
+
return "".concat(namespace, "-").concat(view);
|
5446
|
+
};
|
5447
|
+
return HoganJsUtils;
|
5448
|
+
}());
|
5449
|
+
/* harmony default export */ const hoganjs_utils = (HoganJsUtils);
|
5396
5450
|
//# sourceMappingURL=hoganjs-utils.js.map
|
5397
5451
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/diff2html.js
|
5452
|
+
var diff2html_assign = (undefined && undefined.__assign) || function () {
|
5453
|
+
diff2html_assign = Object.assign || function(t) {
|
5454
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5455
|
+
s = arguments[i];
|
5456
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5457
|
+
t[p] = s[p];
|
5458
|
+
}
|
5459
|
+
return t;
|
5460
|
+
};
|
5461
|
+
return diff2html_assign.apply(this, arguments);
|
5462
|
+
};
|
5398
5463
|
|
5399
5464
|
|
5400
5465
|
|
5401
5466
|
|
5402
5467
|
|
5403
5468
|
|
5404
|
-
|
5405
|
-
function diff2html_parse(diffInput, configuration
|
5406
|
-
|
5469
|
+
var defaultDiff2HtmlConfig = diff2html_assign(diff2html_assign(diff2html_assign({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true });
|
5470
|
+
function diff2html_parse(diffInput, configuration) {
|
5471
|
+
if (configuration === void 0) { configuration = {}; }
|
5472
|
+
return DiffParser.parse(diffInput, diff2html_assign(diff2html_assign({}, defaultDiff2HtmlConfig), configuration));
|
5407
5473
|
}
|
5408
|
-
function html(diffInput, configuration
|
5409
|
-
|
5410
|
-
|
5411
|
-
|
5412
|
-
|
5413
|
-
|
5414
|
-
|
5415
|
-
|
5416
|
-
|
5417
|
-
: new LineByLineRenderer(hoganUtils, config).render(diffJson);
|
5474
|
+
function html(diffInput, configuration) {
|
5475
|
+
if (configuration === void 0) { configuration = {}; }
|
5476
|
+
var config = diff2html_assign(diff2html_assign({}, defaultDiff2HtmlConfig), configuration);
|
5477
|
+
var diffJson = typeof diffInput === 'string' ? parse(diffInput, config) : diffInput;
|
5478
|
+
var hoganUtils = new hoganjs_utils(config);
|
5479
|
+
var fileList = config.drawFileList ? render(diffJson, hoganUtils) : '';
|
5480
|
+
var diffOutput = config.outputFormat === 'side-by-side'
|
5481
|
+
? new side_by_side_renderer(hoganUtils, config).render(diffJson)
|
5482
|
+
: new line_by_line_renderer(hoganUtils, config).render(diffJson);
|
5418
5483
|
return fileList + diffOutput;
|
5419
5484
|
}
|
5420
5485
|
//# sourceMappingURL=diff2html.js.map
|
5421
|
-
;// CONCATENATED MODULE: external "vue-types"
|
5422
|
-
var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
5423
|
-
var external_vue_types_y = x => () => x
|
5424
|
-
const external_vue_types_namespaceObject = external_vue_types_x({ ["number"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.number, ["string"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.string });
|
5425
|
-
;// CONCATENATED MODULE: external "../config-provider"
|
5426
|
-
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
5427
|
-
var config_provider_y = x => () => x
|
5428
|
-
const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
5429
5486
|
// EXTERNAL MODULE: ../../node_modules/diff2html/bundles/css/diff2html.min.css
|
5430
5487
|
var diff2html_min = __webpack_require__(9003);
|
5431
5488
|
;// CONCATENATED MODULE: ../../packages/code-diff/src/code-diff.tsx
|