@opentinyvue/vue-renderless 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +16 -0
- package/action-menu/index.js +59 -0
- package/action-menu/vue.js +38 -0
- package/action-sheet/index.js +96 -0
- package/action-sheet/vue.js +66 -0
- package/alert/index.js +83 -0
- package/alert/vue.js +54 -0
- package/amount/index.js +306 -0
- package/amount/vue.js +208 -0
- package/anchor/index.js +192 -0
- package/anchor/vue.js +68 -0
- package/area/index.js +102 -0
- package/area/vue.js +32 -0
- package/async-flowchart/index.js +79 -0
- package/async-flowchart/vue.js +40 -0
- package/autocomplete/index.js +183 -0
- package/autocomplete/vue.js +151 -0
- package/autonavi-map/index.js +18 -0
- package/avatar/index.js +30 -0
- package/avatar/vue.js +22 -0
- package/badge/index.js +25 -0
- package/badge/vue.js +24 -0
- package/baidu-map/index.js +18 -0
- package/base-select/index.js +1450 -0
- package/base-select/vue.js +555 -0
- package/breadcrumb/index.js +15 -0
- package/breadcrumb/vue.js +22 -0
- package/breadcrumb-item/index.js +21 -0
- package/breadcrumb-item/vue.js +21 -0
- package/bulletin-board/index.js +25 -0
- package/bulletin-board/vue.js +30 -0
- package/button/index.js +27 -0
- package/button/vue.js +37 -0
- package/button-group/index.js +38 -0
- package/button-group/vue.js +39 -0
- package/calendar/index.js +160 -0
- package/calendar/vue.js +113 -0
- package/calendar-bar/index.js +509 -0
- package/calendar-bar/vue.js +161 -0
- package/calendar-view/index.js +606 -0
- package/calendar-view/vue.js +305 -0
- package/card/index.js +99 -0
- package/card/vue.js +72 -0
- package/card-group/vue.js +19 -0
- package/card-template/index.js +31 -0
- package/card-template/vue.js +22 -0
- package/carousel/index.js +289 -0
- package/carousel/vue.js +199 -0
- package/carousel-item/index.js +97 -0
- package/carousel-item/vue.js +74 -0
- package/cascader/index.js +546 -0
- package/cascader/vue.js +260 -0
- package/cascader-menu/index.js +42 -0
- package/cascader-menu/vue.js +26 -0
- package/cascader-mobile/index.js +316 -0
- package/cascader-mobile/vue.js +109 -0
- package/cascader-node/index.js +58 -0
- package/cascader-node/vue.js +41 -0
- package/cascader-panel/index.js +301 -0
- package/cascader-panel/node.js +136 -0
- package/cascader-panel/store.js +72 -0
- package/cascader-panel/vue.js +157 -0
- package/cascader-select/column-index.js +158 -0
- package/cascader-select/column.js +123 -0
- package/cascader-select/index.js +48 -0
- package/cascader-select/usePicker.js +252 -0
- package/cascader-select/useTouch.js +65 -0
- package/cascader-select/vue.js +64 -0
- package/cascader-view/index.js +363 -0
- package/cascader-view/vue.js +130 -0
- package/cell/vue.js +17 -0
- package/chart-bar/index.js +222 -0
- package/chart-boxplot/index.js +130 -0
- package/chart-candle/index.js +183 -0
- package/chart-core/deps/constants.js +131 -0
- package/chart-core/deps/numerify.js +244 -0
- package/chart-core/deps/utils.js +202 -0
- package/chart-core/index.js +473 -0
- package/chart-core/modules/animation.js +12 -0
- package/chart-core/modules/extend.js +48 -0
- package/chart-core/modules/mark.js +11 -0
- package/chart-core/vue.js +93 -0
- package/chart-funnel/index.js +76 -0
- package/chart-gauge/index.js +81 -0
- package/chart-graph/index.js +27 -0
- package/chart-heatmap/index.js +168 -0
- package/chart-line/index.js +166 -0
- package/chart-liquidfill/index.js +54 -0
- package/chart-map/index.js +118 -0
- package/chart-pie/index.js +146 -0
- package/chart-radar/index.js +105 -0
- package/chart-sankey/index.js +80 -0
- package/chart-scatter/index.js +173 -0
- package/chart-sunburst/index.js +28 -0
- package/chart-tree/index.js +65 -0
- package/chart-waterfall/index.js +99 -0
- package/chart-wordcloud/index.js +60 -0
- package/checkbox/index.js +147 -0
- package/checkbox/vue.js +120 -0
- package/checkbox-button/index.js +68 -0
- package/checkbox-button/vue.js +79 -0
- package/checkbox-group/index.js +7 -0
- package/checkbox-group/vue.js +29 -0
- package/chunk-G2ADBYYC.js +37 -0
- package/col/index.js +104 -0
- package/col/vue.js +25 -0
- package/collapse/index.js +36 -0
- package/collapse/vue.js +27 -0
- package/collapse-item/index.js +42 -0
- package/collapse-item/vue.js +40 -0
- package/color-picker/index.js +30 -0
- package/color-picker/utils/color.js +377 -0
- package/color-picker/utils/hsv-to-rgb.js +59 -0
- package/color-picker/vue.js +71 -0
- package/color-select-panel/alpha-select/index.js +71 -0
- package/color-select-panel/alpha-select/vue.js +43 -0
- package/color-select-panel/hue-select/index.js +57 -0
- package/color-select-panel/hue-select/vue.js +40 -0
- package/color-select-panel/index.js +243 -0
- package/color-select-panel/sv-select/index.js +68 -0
- package/color-select-panel/sv-select/vue.js +32 -0
- package/color-select-panel/utils/color.js +365 -0
- package/color-select-panel/utils/getClientXY.js +54 -0
- package/color-select-panel/utils/use-drag.js +38 -0
- package/color-select-panel/vue.js +63 -0
- package/column-list-group/index.js +0 -0
- package/column-list-group/vue.js +14 -0
- package/column-list-item/index.js +80 -0
- package/column-list-item/vue.js +55 -0
- package/common/array.js +115 -0
- package/common/bigInt.js +315 -0
- package/common/browser.js +81 -0
- package/common/calendar/calendar.js +97 -0
- package/common/dataset/index.js +99 -0
- package/common/date.js +354 -0
- package/common/decimal.js +155 -0
- package/common/deps/ResizeObserver.js +456 -0
- package/common/deps/after-leave.js +27 -0
- package/common/deps/clickoutside.js +75 -0
- package/common/deps/date-util.js +255 -0
- package/common/deps/date.js +286 -0
- package/common/deps/debounce.js +8 -0
- package/common/deps/dom.js +217 -0
- package/common/deps/eSpaceCtrl.js +304 -0
- package/common/deps/fastdom/async.js +41 -0
- package/common/deps/fastdom/index.js +9 -0
- package/common/deps/fastdom/sandbox.js +53 -0
- package/common/deps/fastdom/singleton.js +88 -0
- package/common/deps/fullscreen/apis.js +143 -0
- package/common/deps/fullscreen/screenfull.js +165 -0
- package/common/deps/infinite-scroll.js +176 -0
- package/common/deps/memorize.js +124 -0
- package/common/deps/observe-visibility.js +106 -0
- package/common/deps/popper.js +613 -0
- package/common/deps/popup-manager.js +205 -0
- package/common/deps/repeat-click.js +29 -0
- package/common/deps/resize-event.js +39 -0
- package/common/deps/scroll-into-view.js +29 -0
- package/common/deps/scrollbar-width.js +33 -0
- package/common/deps/throttle.js +45 -0
- package/common/deps/touch-emulator.js +103 -0
- package/common/deps/touch.js +37 -0
- package/common/deps/tree-model/node.js +475 -0
- package/common/deps/tree-model/tree-store.js +312 -0
- package/common/deps/tree-model/util.js +24 -0
- package/common/deps/upload-ajax.js +81 -0
- package/common/deps/useEventListener.js +54 -0
- package/common/deps/useInstanceSlots.js +22 -0
- package/common/deps/useRect.js +25 -0
- package/common/deps/useRelation.js +89 -0
- package/common/deps/useTouch.js +68 -0
- package/common/deps/useUserAgent.js +16 -0
- package/common/deps/useWindowSize.js +23 -0
- package/common/deps/vue-emitter.js +34 -0
- package/common/deps/vue-popper.js +177 -0
- package/common/deps/vue-popup.js +138 -0
- package/common/event.js +46 -0
- package/common/form/const.js +10 -0
- package/common/function.js +28 -0
- package/common/global.js +11 -0
- package/common/index.js +259 -0
- package/common/object.js +227 -0
- package/common/prop-util.js +43 -0
- package/common/runtime.js +79 -0
- package/common/string.js +417 -0
- package/common/type.js +66 -0
- package/common/validate/index.js +10 -0
- package/common/validate/messages.js +65 -0
- package/common/validate/rules/enum.js +12 -0
- package/common/validate/rules/index.js +18 -0
- package/common/validate/rules/pattern.js +20 -0
- package/common/validate/rules/range.js +52 -0
- package/common/validate/rules/required.js +11 -0
- package/common/validate/rules/type.js +100 -0
- package/common/validate/rules/whitespace.js +10 -0
- package/common/validate/schema.js +290 -0
- package/common/validate/util.js +211 -0
- package/common/validate/validations/array.js +22 -0
- package/common/validate/validations/date.js +31 -0
- package/common/validate/validations/enum.js +22 -0
- package/common/validate/validations/float.js +22 -0
- package/common/validate/validations/index.js +46 -0
- package/common/validate/validations/integer.js +22 -0
- package/common/validate/validations/method.js +21 -0
- package/common/validate/validations/number.js +25 -0
- package/common/validate/validations/pattern.js +21 -0
- package/common/validate/validations/required.js +11 -0
- package/common/validate/validations/string.js +33 -0
- package/common/validate/validations/type.js +29 -0
- package/company/index.js +41 -0
- package/company/vue.js +29 -0
- package/container/index.js +100 -0
- package/container/vue.js +47 -0
- package/country/index.js +40 -0
- package/country/vue.js +30 -0
- package/crop/index.js +170 -0
- package/crop/vue.js +183 -0
- package/currency/index.js +127 -0
- package/currency/vue.js +46 -0
- package/date-panel/index.js +485 -0
- package/date-panel/vue.js +221 -0
- package/date-picker/index.js +267 -0
- package/date-picker/vue.js +123 -0
- package/date-picker-mobile/index.js +308 -0
- package/date-picker-mobile/vue.js +111 -0
- package/date-picker-mobile/year-month.js +53 -0
- package/date-range/index.js +443 -0
- package/date-range/vue.js +195 -0
- package/date-table/index.js +362 -0
- package/date-table/vue.js +77 -0
- package/dept/index.js +230 -0
- package/dept/vue.js +102 -0
- package/dialog-box/index.js +283 -0
- package/dialog-box/vue.js +184 -0
- package/dialog-select/index.js +475 -0
- package/dialog-select/vue.js +143 -0
- package/divider/index.js +47 -0
- package/divider/vue.js +30 -0
- package/drawer/index.js +143 -0
- package/drawer/vue.js +67 -0
- package/drop-roles/index.js +54 -0
- package/drop-roles/vue.js +30 -0
- package/drop-times/index.js +22 -0
- package/drop-times/vue.js +24 -0
- package/dropdown/index.js +228 -0
- package/dropdown/vue.js +77 -0
- package/dropdown-item/index.js +138 -0
- package/dropdown-item/mf.js +76 -0
- package/dropdown-item/vue.js +116 -0
- package/dropdown-menu/index.js +178 -0
- package/dropdown-menu/vue.js +66 -0
- package/dynamic-scroller/index.js +117 -0
- package/dynamic-scroller/vue.js +88 -0
- package/dynamic-scroller-item/index.js +147 -0
- package/dynamic-scroller-item/vue.js +92 -0
- package/espace/index.js +110 -0
- package/espace/vue.js +38 -0
- package/exception/index.js +5 -0
- package/exception/vue.js +17 -0
- package/fall-menu/index.js +100 -0
- package/fall-menu/vue.js +79 -0
- package/file-upload/index.js +2208 -0
- package/file-upload/vue.js +339 -0
- package/filter/index.js +132 -0
- package/filter/tag-group.js +43 -0
- package/filter/vue.js +71 -0
- package/filter-bar/index.js +9 -0
- package/filter-bar/vue.js +16 -0
- package/filter-box/index.js +18 -0
- package/filter-box/vue.js +22 -0
- package/filter-panel/index.js +42 -0
- package/filter-panel/vue.js +33 -0
- package/float-button/index.js +42 -0
- package/float-button/vue.js +101 -0
- package/floatbar/index.js +13 -0
- package/floatbar/vue.js +14 -0
- package/floating-button/index.js +119 -0
- package/floating-button/vue.js +53 -0
- package/flowchart/index.js +1252 -0
- package/flowchart/node.js +61 -0
- package/flowchart/vue.js +109 -0
- package/fluent-editor/index.js +702 -0
- package/fluent-editor/options.js +300 -0
- package/fluent-editor/vue.js +192 -0
- package/form/index.js +209 -0
- package/form/vue.js +104 -0
- package/form-item/index.js +403 -0
- package/form-item/vue.js +166 -0
- package/fullscreen/index.js +113 -0
- package/fullscreen/vue.js +65 -0
- package/grid/core/index.js +7 -0
- package/grid/core/interceptor.js +43 -0
- package/grid/core/storeMap.js +23 -0
- package/grid/plugins/export.js +141 -0
- package/grid/plugins/exportExcel.js +502 -0
- package/grid/plugins/header.js +59 -0
- package/grid/plugins/resize.js +65 -0
- package/grid/static/array/arrayEach.js +16 -0
- package/grid/static/array/arrayIndexOf.js +15 -0
- package/grid/static/array/eachTree.js +28 -0
- package/grid/static/array/every.js +6 -0
- package/grid/static/array/filterTree.js +21 -0
- package/grid/static/array/find.js +7 -0
- package/grid/static/array/findTree.js +35 -0
- package/grid/static/array/helperCreateIterateHandle.js +51 -0
- package/grid/static/array/helperCreateTreeFunc.js +20 -0
- package/grid/static/array/includes.js +7 -0
- package/grid/static/array/lastArrayEach.js +10 -0
- package/grid/static/array/map.js +24 -0
- package/grid/static/array/mapTree.js +29 -0
- package/grid/static/array/slice.js +14 -0
- package/grid/static/array/sortBy.js +67 -0
- package/grid/static/array/sum.js +29 -0
- package/grid/static/array/toArray.js +7 -0
- package/grid/static/array/toTreeArray.js +22 -0
- package/grid/static/base/clear.js +48 -0
- package/grid/static/base/clone.js +12 -0
- package/grid/static/base/destructuring.js +22 -0
- package/grid/static/base/each.js +13 -0
- package/grid/static/base/eqNull.js +8 -0
- package/grid/static/base/findIndexOf.js +14 -0
- package/grid/static/base/get.js +46 -0
- package/grid/static/base/has.js +61 -0
- package/grid/static/base/hasOwnProp.js +6 -0
- package/grid/static/base/helperCreateGetObjects.js +30 -0
- package/grid/static/base/helperCreateInInObjectString.js +11 -0
- package/grid/static/base/helperCreateInTypeof.js +9 -0
- package/grid/static/base/helperCreateIndexOf.js +22 -0
- package/grid/static/base/helperCreateiterateIndexOf.js +22 -0
- package/grid/static/base/helperDefaultCompare.js +8 -0
- package/grid/static/base/helperDeleteProperty.js +12 -0
- package/grid/static/base/helperEqualCompare.js +58 -0
- package/grid/static/base/helperGetHGSKeys.js +9 -0
- package/grid/static/base/indexOf.js +7 -0
- package/grid/static/base/isArray.js +7 -0
- package/grid/static/base/isBoolean.js +6 -0
- package/grid/static/base/isDate.js +7 -0
- package/grid/static/base/isEmpty.js +12 -0
- package/grid/static/base/isEqual.js +11 -0
- package/grid/static/base/isFunction.js +6 -0
- package/grid/static/base/isNaN.js +7 -0
- package/grid/static/base/isNull.js +6 -0
- package/grid/static/base/isNumber.js +6 -0
- package/grid/static/base/isObject.js +6 -0
- package/grid/static/base/isPlainObject.js +6 -0
- package/grid/static/base/isRegExp.js +7 -0
- package/grid/static/base/isSet.js +7 -0
- package/grid/static/base/isString.js +6 -0
- package/grid/static/base/isUndefined.js +6 -0
- package/grid/static/base/keys.js +7 -0
- package/grid/static/base/lastEach.js +13 -0
- package/grid/static/base/remove.js +44 -0
- package/grid/static/base/set.js +47 -0
- package/grid/static/base/toJSONString.js +6 -0
- package/grid/static/base/toStringJSON.js +18 -0
- package/grid/static/base/uniqueId.js +7 -0
- package/grid/static/browse/browse.js +57 -0
- package/grid/static/function/property.js +7 -0
- package/grid/static/function/throttle.js +47 -0
- package/grid/static/index.js +111 -0
- package/grid/static/number/helperCreateToNumber.js +14 -0
- package/grid/static/number/toNumber.js +7 -0
- package/grid/static/object/assign.js +41 -0
- package/grid/static/object/extend.js +7 -0
- package/grid/static/object/lastObjectEach.js +12 -0
- package/grid/static/object/objectEach.js +15 -0
- package/grid/static/object/objectMap.js +24 -0
- package/grid/static/object/values.js +17 -0
- package/grid/static/static/staticDocument.js +7 -0
- package/grid/static/static/staticHGKeyRE.js +6 -0
- package/grid/static/static/staticParseInt.js +6 -0
- package/grid/static/static/staticStrUndefined.js +6 -0
- package/grid/static/static/staticWindow.js +7 -0
- package/grid/static/string/template.js +14 -0
- package/grid/static/string/toString.js +16 -0
- package/grid/utils/column.js +73 -0
- package/grid/utils/common.js +136 -0
- package/grid/utils/dom.js +224 -0
- package/grid/utils/event.js +40 -0
- package/grid/utils/index.js +8 -0
- package/grid-select/index.js +82 -0
- package/grid-select/vue.js +30 -0
- package/guide/index.js +185 -0
- package/guide/vue.js +38 -0
- package/hrapprover/index.js +95 -0
- package/hrapprover/vue.js +57 -0
- package/image/index.js +135 -0
- package/image/vue.js +111 -0
- package/image-viewer/index.js +681 -0
- package/image-viewer/vue.js +237 -0
- package/index-bar/index.js +66 -0
- package/index-bar/vue.js +73 -0
- package/index-bar-anchor/vue.js +16 -0
- package/input/index.js +413 -0
- package/input/vue.js +353 -0
- package/ip-address/index.js +271 -0
- package/ip-address/vue.js +143 -0
- package/label/index.js +56 -0
- package/label/vue.js +26 -0
- package/layout/vue.js +7 -0
- package/link/index.js +9 -0
- package/link/vue.js +20 -0
- package/link-menu/index.js +104 -0
- package/link-menu/vue.js +95 -0
- package/list/index.js +13 -0
- package/list/vue.js +17 -0
- package/load-list/index.js +43 -0
- package/load-list/vue.js +69 -0
- package/loading/index.js +30 -0
- package/loading/vue.js +32 -0
- package/locales/index.js +82 -0
- package/locales/vue.js +28 -0
- package/logon-user/index.js +20 -0
- package/logon-user/vue.js +19 -0
- package/logout/index.js +84 -0
- package/logout/vue.js +18 -0
- package/mask/index.js +13 -0
- package/mask/vue.js +18 -0
- package/menu/index.js +140 -0
- package/menu/vue.js +99 -0
- package/menu-node/index.js +12 -0
- package/menu-node/vue.js +42 -0
- package/milestone/index.js +123 -0
- package/milestone/vue.js +46 -0
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/mini-picker/index.js +165 -0
- package/mini-picker/vue.js +122 -0
- package/modal/index.js +716 -0
- package/modal/vue.js +122 -0
- package/month-range/index.js +134 -0
- package/month-range/vue.js +88 -0
- package/month-table/index.js +194 -0
- package/month-table/vue.js +50 -0
- package/multi-select/index.js +394 -0
- package/multi-select/vue.js +113 -0
- package/multi-select-item/index.js +23 -0
- package/multi-select-item/vue.js +31 -0
- package/nav-menu/index.js +508 -0
- package/nav-menu/vue.js +153 -0
- package/notify/index.js +69 -0
- package/notify/vue.js +63 -0
- package/numeric/index.js +397 -0
- package/numeric/vue.js +153 -0
- package/option/index.js +67 -0
- package/option/vue.js +132 -0
- package/option-group/index.js +28 -0
- package/option-group/vue.js +45 -0
- package/package.json +41 -0
- package/pager/index.js +409 -0
- package/pager/vue.js +155 -0
- package/pager-item/index.js +107 -0
- package/pager-item/vue.js +44 -0
- package/panel/index.js +24 -0
- package/panel/vue.js +20 -0
- package/picker/index.js +1119 -0
- package/picker/mb.js +47 -0
- package/picker/timezone.js +1174 -0
- package/picker/vue.js +291 -0
- package/picker-column/index.js +215 -0
- package/picker-column/vue.js +104 -0
- package/pop-upload/index.js +174 -0
- package/pop-upload/vue.js +165 -0
- package/popconfirm/index.js +38 -0
- package/popconfirm/vue.js +35 -0
- package/popeditor/index.js +709 -0
- package/popeditor/vue.js +223 -0
- package/popover/index.js +207 -0
- package/popover/vue.js +165 -0
- package/popup/index.js +101 -0
- package/popup/vue.js +69 -0
- package/progress/index.js +151 -0
- package/progress/vue.js +87 -0
- package/pull-refresh/index.js +123 -0
- package/pull-refresh/vue.js +76 -0
- package/pull-refresh-mobile-first/index.js +243 -0
- package/pull-refresh-mobile-first/vue.js +116 -0
- package/qr-code/index.js +54 -0
- package/qr-code/vue.js +31 -0
- package/quarter-panel/index.js +61 -0
- package/quarter-panel/vue.js +46 -0
- package/query-builder/index.js +9 -0
- package/query-builder/vue.js +18 -0
- package/radio/index.js +74 -0
- package/radio/vue.js +56 -0
- package/radio-button/index.js +61 -0
- package/radio-button/vue.js +60 -0
- package/radio-group/index.js +49 -0
- package/radio-group/vue.js +34 -0
- package/rate/index.js +223 -0
- package/rate/vue.js +131 -0
- package/record/index.js +300 -0
- package/record/vue.js +61 -0
- package/recycle-scroller/index.js +486 -0
- package/recycle-scroller/vue.js +141 -0
- package/rich-text/clipboard.js +54 -0
- package/rich-text/index.js +205 -0
- package/rich-text/module/file-upload.js +107 -0
- package/rich-text/module/image-drop.js +63 -0
- package/rich-text/module/image-upload.js +89 -0
- package/rich-text/options.js +141 -0
- package/rich-text/table-module.js +383 -0
- package/rich-text/vue.js +104 -0
- package/rich-text-editor/index.js +234 -0
- package/rich-text-editor/vue.js +297 -0
- package/river/index.js +371 -0
- package/river/river.js +352 -0
- package/river/vue.js +77 -0
- package/roles/index.js +58 -0
- package/roles/vue.js +27 -0
- package/row/index.js +18 -0
- package/row/vue.js +25 -0
- package/scroll-text/index.js +19 -0
- package/scroll-text/vue.js +22 -0
- package/scrollbar/index.js +99 -0
- package/scrollbar/vue-bar.js +42 -0
- package/scrollbar/vue.js +35 -0
- package/search/index.js +97 -0
- package/search/vue.js +99 -0
- package/select/index.js +1847 -0
- package/select/vue.js +642 -0
- package/select-dropdown/index.js +76 -0
- package/select-dropdown/vue.js +146 -0
- package/select-mobile/index.js +124 -0
- package/select-mobile/vue.js +67 -0
- package/select-view/index.js +156 -0
- package/select-view/vue.js +79 -0
- package/selected-box/index.js +220 -0
- package/selected-box/vue.js +102 -0
- package/signature/index.js +241 -0
- package/signature/vue.js +88 -0
- package/skeleton/index.js +14 -0
- package/skeleton/vue.js +15 -0
- package/skeleton-item/vue.js +15 -0
- package/slider/index.js +527 -0
- package/slider/vue.js +200 -0
- package/slider-button/index.js +50 -0
- package/slider-button/vue.js +41 -0
- package/slider-button-group/index.js +52 -0
- package/slider-button-group/slide-button.js +142 -0
- package/slider-button-group/vue.js +71 -0
- package/split/index.js +135 -0
- package/split/vue.js +95 -0
- package/standard-list-item/index.js +38 -0
- package/standard-list-item/vue.js +24 -0
- package/statistic/index.js +32 -0
- package/statistic/vue.js +20 -0
- package/steps/index.js +61 -0
- package/steps/slide-bar.js +129 -0
- package/steps/vue.js +35 -0
- package/sticky/index.js +89 -0
- package/sticky/vue.js +74 -0
- package/switch/index.js +36 -0
- package/switch/vue.js +42 -0
- package/tab-bar/index.js +57 -0
- package/tab-bar/vue.js +19 -0
- package/tab-dropdown/index.js +12 -0
- package/tab-dropdown/vue.js +20 -0
- package/tab-item/index.js +22 -0
- package/tab-item/vue.js +30 -0
- package/tab-item-mf/index.js +0 -0
- package/tab-item-mf/vue.js +27 -0
- package/tab-nav/index.js +348 -0
- package/tab-nav/vue.js +105 -0
- package/tabbar/index.js +61 -0
- package/tabbar/vue.js +62 -0
- package/tabbar-item/index.js +48 -0
- package/tabbar-item/vue.js +34 -0
- package/table/index.js +77 -0
- package/table/vue.js +42 -0
- package/tabs/index.js +213 -0
- package/tabs/vue.js +116 -0
- package/tabs-mf/index.js +286 -0
- package/tabs-mf/vue-bar.js +50 -0
- package/tabs-mf/vue-nav-item.js +23 -0
- package/tabs-mf/vue-nav.js +44 -0
- package/tabs-mf/vue-swipe.js +20 -0
- package/tabs-mf/vue.js +100 -0
- package/tabs-mf/wheel.js +77 -0
- package/tag/index.js +20 -0
- package/tag/vue.js +24 -0
- package/tag-group/index.js +38 -0
- package/tag-group/vue.js +36 -0
- package/tall-storage/index.js +141 -0
- package/tall-storage/vue-storage-box.js +19 -0
- package/tall-storage/vue.js +30 -0
- package/text-popup/index.js +55 -0
- package/text-popup/vue.js +32 -0
- package/time/index.js +89 -0
- package/time/vue.js +87 -0
- package/time-line/index.js +91 -0
- package/time-line/vue.js +52 -0
- package/time-line-new/index.js +53 -0
- package/time-line-new/vue.js +41 -0
- package/time-panel/index.js +133 -0
- package/time-panel/scrollIntoView.js +25 -0
- package/time-panel/vue.js +82 -0
- package/time-picker-mobile/index.js +58 -0
- package/time-picker-mobile/vue.js +42 -0
- package/time-range/index.js +147 -0
- package/time-range/vue.js +90 -0
- package/time-spinner/index.js +221 -0
- package/time-spinner/vue.js +111 -0
- package/timeline-item/index.js +92 -0
- package/timeline-item/vue.js +55 -0
- package/toast/index.js +7 -0
- package/toast/vue.js +19 -0
- package/toggle-menu/index.js +85 -0
- package/toggle-menu/vue.js +86 -0
- package/tooltip/index.js +175 -0
- package/tooltip/vue.js +123 -0
- package/top-box/index.js +48 -0
- package/top-box/vue.js +61 -0
- package/transfer/index.js +219 -0
- package/transfer/vue.js +64 -0
- package/transfer-panel/index.js +275 -0
- package/transfer-panel/vue.js +152 -0
- package/tree/index.js +796 -0
- package/tree/vue.js +288 -0
- package/tree-menu/index.js +170 -0
- package/tree-menu/vue.js +117 -0
- package/tree-node/index.js +279 -0
- package/tree-node/vue.js +150 -0
- package/tree-select/index.js +118 -0
- package/tree-select/vue.js +35 -0
- package/types/action-menu.type.d.ts +129 -0
- package/types/action-sheet.type.d.ts +119 -0
- package/types/alert.type.d.ts +134 -0
- package/types/amount.type.d.ts +169 -0
- package/types/anchor.type.d.ts +91 -0
- package/types/area.type.d.ts +135 -0
- package/types/async-flowchart.type.d.ts +72 -0
- package/types/autocomplete.type.d.ts +204 -0
- package/types/autonavi-map.type.d.ts +2 -0
- package/types/avatar.type.d.ts +2 -0
- package/types/badge.type.d.ts +84 -0
- package/types/baidu-map.type.d.ts +2 -0
- package/types/breadcrumb-item.type.d.ts +33 -0
- package/types/breadcrumb.type.d.ts +59 -0
- package/types/bulletin-board.type.d.ts +2 -0
- package/types/button-group.type.d.ts +90 -0
- package/types/button.type.d.ts +120 -0
- package/types/calendar-bar.type.d.ts +2 -0
- package/types/calendar.type.d.ts +2 -0
- package/types/card-group.type.d.ts +2 -0
- package/types/card-template.type.d.ts +2 -0
- package/types/card.type.d.ts +2 -0
- package/types/carousel-item.type.d.ts +2 -0
- package/types/carousel.type.d.ts +2 -0
- package/types/cascader-menu.type.d.ts +48 -0
- package/types/cascader-mobile.type.d.ts +2 -0
- package/types/cascader-node.type.d.ts +56 -0
- package/types/cascader-panel.type-8f58e628.d.ts +241 -0
- package/types/cascader-panel.type.d.ts +3 -0
- package/types/cascader-select.type.d.ts +2 -0
- package/types/cascader.type.d.ts +330 -0
- package/types/cell.type.d.ts +2 -0
- package/types/chart-bar.type.d.ts +2 -0
- package/types/chart-boxplot.type.d.ts +2 -0
- package/types/chart-candle.type.d.ts +2 -0
- package/types/chart-core.type.d.ts +2 -0
- package/types/chart-funnel.type.d.ts +2 -0
- package/types/chart-gauge.type.d.ts +2 -0
- package/types/chart-graph.type.d.ts +2 -0
- package/types/chart-heatmap.type.d.ts +2 -0
- package/types/chart-line.type.d.ts +2 -0
- package/types/chart-liquidfill.type.d.ts +2 -0
- package/types/chart-map.type.d.ts +2 -0
- package/types/chart-pie.type.d.ts +2 -0
- package/types/chart-radar.type.d.ts +2 -0
- package/types/chart-sankey.type.d.ts +2 -0
- package/types/chart-scatter.type.d.ts +2 -0
- package/types/chart-sunburst.type.d.ts +2 -0
- package/types/chart-tree.type.d.ts +2 -0
- package/types/chart-waterfall.type.d.ts +2 -0
- package/types/chart-wordcloud.type.d.ts +2 -0
- package/types/checkbox-button.type.d.ts +2 -0
- package/types/checkbox-group.type.d.ts +2 -0
- package/types/checkbox.type.d.ts +169 -0
- package/types/col.type.d.ts +2 -0
- package/types/collapse-item.type.d.ts +63 -0
- package/types/collapse.type.d.ts +73 -0
- package/types/color-picker.type.d.ts +5 -0
- package/types/color-select-panel.type.d.ts +27 -0
- package/types/column-list-group.type.d.ts +2 -0
- package/types/column-list-item.type.d.ts +2 -0
- package/types/common.type.d.ts +2 -0
- package/types/company.type.d.ts +2 -0
- package/types/container.type.d.ts +2 -0
- package/types/country.type.d.ts +2 -0
- package/types/credit-card-form.type.d.ts +2 -0
- package/types/credit-card.type.d.ts +2 -0
- package/types/crop.type.d.ts +2 -0
- package/types/currency.type.d.ts +2 -0
- package/types/date-panel.type.d.ts +2 -0
- package/types/date-picker-mobile.type.d.ts +2 -0
- package/types/date-picker.type.d.ts +256 -0
- package/types/date-range.type.d.ts +2 -0
- package/types/date-table.type.d.ts +151 -0
- package/types/dept.type.d.ts +2 -0
- package/types/detail-page.type.d.ts +2 -0
- package/types/dialog-box.type.d.ts +270 -0
- package/types/dialog-select.type.d.ts +2 -0
- package/types/divider.type.d.ts +94 -0
- package/types/drawer.type.d.ts +146 -0
- package/types/drop-roles.type.d.ts +2 -0
- package/types/drop-times.type.d.ts +2 -0
- package/types/dropdown-item.type-c9badbc1.d.ts +336 -0
- package/types/dropdown-item.type.d.ts +4 -0
- package/types/dropdown-menu.type.d.ts +4 -0
- package/types/dropdown.type.d.ts +145 -0
- package/types/dynamic-scroller-item.type.d.ts +2 -0
- package/types/dynamic-scroller.type.d.ts +2 -0
- package/types/espace.type.d.ts +2 -0
- package/types/exception.type.d.ts +2 -0
- package/types/fall-menu.type.d.ts +96 -0
- package/types/file-upload.type.d.ts +3 -0
- package/types/filter-bar.type.d.ts +2 -0
- package/types/filter-box.type.d.ts +2 -0
- package/types/filter-panel.type.d.ts +2 -0
- package/types/filter.type.d.ts +2 -0
- package/types/float-button.type.d.ts +123 -0
- package/types/floatbar.type.d.ts +45 -0
- package/types/floating-button.type.d.ts +2 -0
- package/types/flowchart.type.d.ts +2 -0
- package/types/form-item.type.d.ts +3 -0
- package/types/form.type-4e0ec0a1.d.ts +421 -0
- package/types/form.type.d.ts +3 -0
- package/types/fullscreen.type.d.ts +2 -0
- package/types/grid.type.d.ts +2 -0
- package/types/guide.type.d.ts +2 -0
- package/types/hrapprover.type.d.ts +2 -0
- package/types/image-viewer.type.d.ts +2 -0
- package/types/image.type.d.ts +184 -0
- package/types/index-a975a7a2.d.ts +54 -0
- package/types/index-bar-anchor.type.d.ts +2 -0
- package/types/index-bar.type.d.ts +2 -0
- package/types/input.type.d.ts +330 -0
- package/types/ip-address.type.d.ts +156 -0
- package/types/label.type.d.ts +81 -0
- package/types/layout.type.d.ts +2 -0
- package/types/link-menu.type.d.ts +2 -0
- package/types/link.type.d.ts +48 -0
- package/types/list.type.d.ts +2 -0
- package/types/load-list.type.d.ts +58 -0
- package/types/loading.type.d.ts +97 -0
- package/types/locales.type.d.ts +2 -0
- package/types/logon-user.type.d.ts +2 -0
- package/types/logout.type.d.ts +2 -0
- package/types/milestone.type.d.ts +170 -0
- package/types/mind-map.type.d.ts +20 -0
- package/types/mini-picker.type.d.ts +2 -0
- package/types/modal.type.d.ts +292 -0
- package/types/month-range.type.d.ts +2 -0
- package/types/month-table.type.d.ts +2 -0
- package/types/multi-select.type.d.ts +2 -0
- package/types/nav-menu.type.d.ts +125 -0
- package/types/notify.type.d.ts +2 -0
- package/types/numeric.type.d.ts +312 -0
- package/types/option-group.type.d.ts +2 -0
- package/types/option.type.d.ts +2 -0
- package/types/pager-item.type.d.ts +2 -0
- package/types/pager.type.d.ts +180 -0
- package/types/panel.type.d.ts +2 -0
- package/types/picker-column.type.d.ts +2 -0
- package/types/picker.type.d.ts +216 -0
- package/types/pop-upload.type.d.ts +2 -0
- package/types/popconfirm.type.d.ts +95 -0
- package/types/popeditor.type.d.ts +279 -0
- package/types/popover.type.d.ts +164 -0
- package/types/popup.type.d.ts +2 -0
- package/types/progress.type.d.ts +218 -0
- package/types/pull-refresh.type.d.ts +2 -0
- package/types/query-builder.type.d.ts +2 -0
- package/types/radio-button.type.d.ts +90 -0
- package/types/radio-group.type.d.ts +71 -0
- package/types/radio.type.d.ts +99 -0
- package/types/rate.type.d.ts +237 -0
- package/types/record.type.d.ts +2 -0
- package/types/recycle-scroller.type.d.ts +2 -0
- package/types/river.type.d.ts +2 -0
- package/types/roles.type.d.ts +2 -0
- package/types/row.type.d.ts +2 -0
- package/types/scroll-text.type.d.ts +2 -0
- package/types/scrollbar.type.d.ts +2 -0
- package/types/search.type.d.ts +129 -0
- package/types/select-dropdown.type.d.ts +2 -0
- package/types/select-mobile.type.d.ts +2 -0
- package/types/select-view.type.d.ts +2 -0
- package/types/select.type.d.ts +2 -0
- package/types/selected-box.type.d.ts +2 -0
- package/types/shared.type.d.ts +178 -0
- package/types/skeleton-item.type.d.ts +38 -0
- package/types/skeleton.type.d.ts +45 -0
- package/types/slide-bar.type.d.ts +2 -0
- package/types/slider-button-group.type.d.ts +2 -0
- package/types/slider-button.type.d.ts +2 -0
- package/types/slider.type.d.ts +246 -0
- package/types/split.type.d.ts +2 -0
- package/types/standard-list-item.type.d.ts +2 -0
- package/types/statistic.type.d.ts +52 -0
- package/types/steps.type.d.ts +95 -0
- package/types/switch.type.d.ts +117 -0
- package/types/tab-bar.type.d.ts +43 -0
- package/types/tab-dropdown.type.d.ts +2 -0
- package/types/tab-item-mf.type.d.ts +2 -0
- package/types/tab-item.type.d.ts +70 -0
- package/types/tab-nav.type.d.ts +112 -0
- package/types/tabbar-item.type.d.ts +2 -0
- package/types/tabbar.type.d.ts +2 -0
- package/types/table.type.d.ts +2 -0
- package/types/tabs-mf.type.d.ts +2 -0
- package/types/tabs.type.d.ts +161 -0
- package/types/tag-group.type.d.ts +65 -0
- package/types/tag.type.d.ts +67 -0
- package/types/tall-storage.type.d.ts +2 -0
- package/types/text-popup.type.d.ts +2 -0
- package/types/time-line.type-9fb16096.d.ts +327 -0
- package/types/time-line.type.d.ts +4 -0
- package/types/time-panel.type.d.ts +2 -0
- package/types/time-picker-mobile.type.d.ts +2 -0
- package/types/time-range.type.d.ts +2 -0
- package/types/time-spinner.type.d.ts +2 -0
- package/types/time.type.d.ts +2 -0
- package/types/timeline-item.type.d.ts +4 -0
- package/types/toast.type.d.ts +63 -0
- package/types/toggle-menu.type.d.ts +2 -0
- package/types/tooltip.type.d.ts +185 -0
- package/types/top-box.type.d.ts +2 -0
- package/types/transfer-panel.type.d.ts +2 -0
- package/types/transfer.type.d.ts +186 -0
- package/types/tree-menu.type.d.ts +242 -0
- package/types/tree-node.type.d.ts +2 -0
- package/types/tree.type.d.ts +2 -0
- package/types/upload-dragger.type.d.ts +50 -0
- package/types/upload-list.type-eaf82b7a.d.ts +1213 -0
- package/types/upload-list.type.d.ts +3 -0
- package/types/upload.type.d.ts +3 -0
- package/types/user-account.type.d.ts +2 -0
- package/types/user-contact.type.d.ts +128 -0
- package/types/user-head-group.type.d.ts +2 -0
- package/types/user-head.type.d.ts +151 -0
- package/types/user-link.type.d.ts +2 -0
- package/types/user.type.d.ts +2 -0
- package/types/watermark.type.d.ts +33 -0
- package/types/wheel.type.d.ts +2 -0
- package/types/wizard.type.d.ts +96 -0
- package/types/year-range.type.d.ts +2 -0
- package/types/year-table.type.d.ts +2 -0
- package/upload/index.js +405 -0
- package/upload/vue.js +81 -0
- package/upload-dragger/index.js +72 -0
- package/upload-dragger/vue.js +26 -0
- package/upload-list/index.js +256 -0
- package/upload-list/vue.js +128 -0
- package/user/index.js +532 -0
- package/user/vue.js +76 -0
- package/user-account/index.js +18 -0
- package/user-account/vue.js +22 -0
- package/user-contact/index.js +57 -0
- package/user-contact/vue.js +29 -0
- package/user-head/index.js +73 -0
- package/user-head/vue.js +39 -0
- package/user-head-group/index.js +20 -0
- package/user-head-group/vue.js +30 -0
- package/user-link/index.js +42 -0
- package/user-link/vue.js +42 -0
- package/virtual-scroll-box/index.js +294 -0
- package/virtual-scroll-box/vue.js +43 -0
- package/virtual-tree/index.js +168 -0
- package/virtual-tree/vue.js +53 -0
- package/watermark/index.js +213 -0
- package/watermark/vue.js +27 -0
- package/wheel/index.js +165 -0
- package/wheel/vue.js +79 -0
- package/wizard/index.js +107 -0
- package/wizard/vue.js +48 -0
- package/year-range/index.js +125 -0
- package/year-range/vue.js +88 -0
- package/year-table/index.js +185 -0
- package/year-table/vue.js +43 -0
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import "../../chunk-G2ADBYYC.js";
|
|
2
|
+
import { extend } from "../../common/object";
|
|
3
|
+
import browser from "../../common/browser";
|
|
4
|
+
const isIE = browser.name === "ie";
|
|
5
|
+
const rgbRegExp = /^rgba?\((\d+),\s(\d+),\s(\d+)([\s\S]*)\)$/;
|
|
6
|
+
const hexRegExp = /^#([a-zA-Z0-9]{3}|[a-zA-Z0-9]{6})$/;
|
|
7
|
+
function computeColor(rgbColor) {
|
|
8
|
+
const rgb = rgbRegExp.exec(rgbColor).slice(1, 4);
|
|
9
|
+
return parseInt(rgb[0]).toString(16) + parseInt(rgb[1]).toString(16) + parseInt(rgb[2]).toString(16);
|
|
10
|
+
}
|
|
11
|
+
function getBgc(dom) {
|
|
12
|
+
const getComputedStyle = window.getComputedStyle;
|
|
13
|
+
const backgroundColor = isIE ? dom.currentStyle.backgroundColor : getComputedStyle(dom).backgroundColor;
|
|
14
|
+
if (rgbRegExp.test(backgroundColor)) {
|
|
15
|
+
return computeColor(backgroundColor);
|
|
16
|
+
} else if (hexRegExp.test(backgroundColor)) {
|
|
17
|
+
const bgc = backgroundColor.slice(1);
|
|
18
|
+
if (bgc.length === 3) {
|
|
19
|
+
return bgc.split("").map((s) => s + s).join("");
|
|
20
|
+
}
|
|
21
|
+
return bgc;
|
|
22
|
+
}
|
|
23
|
+
return "ffffff";
|
|
24
|
+
}
|
|
25
|
+
function funcFromCodePoint() {
|
|
26
|
+
let codeUnitArr = [];
|
|
27
|
+
let codeLength = 0;
|
|
28
|
+
let resultStr = "";
|
|
29
|
+
for (let i = 0, length = arguments.length; i !== length; ++i) {
|
|
30
|
+
let cp = Number(arguments[i]);
|
|
31
|
+
if (!(cp < 1114111 && cp >>> 0 === cp)) {
|
|
32
|
+
throw new RangeError("Invalid code point: " + cp);
|
|
33
|
+
}
|
|
34
|
+
if (cp <= 65535) {
|
|
35
|
+
codeLength = codeUnitArr.push(cp);
|
|
36
|
+
} else {
|
|
37
|
+
cp -= 65536;
|
|
38
|
+
codeLength = codeUnitArr.push((cp >> 10) + 55296, cp % 1024 + 56320);
|
|
39
|
+
}
|
|
40
|
+
if (codeLength >= 16383) {
|
|
41
|
+
resultStr += String.fromCharCode.apply(null, codeUnitArr);
|
|
42
|
+
codeUnitArr.length = 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return resultStr + String.fromCharCode.apply(null, codeUnitArr);
|
|
46
|
+
}
|
|
47
|
+
const defaultOptions = {
|
|
48
|
+
plugins: {
|
|
49
|
+
XLSX: null,
|
|
50
|
+
// xlsx 插件
|
|
51
|
+
XLSXX: null,
|
|
52
|
+
// xlsx-style 插件
|
|
53
|
+
FileSaver: null
|
|
54
|
+
// FileSaver 插件
|
|
55
|
+
},
|
|
56
|
+
table: {
|
|
57
|
+
sheetName: "tiny-sheet",
|
|
58
|
+
formatMethod: ({ value, type }) => ({ value, type }),
|
|
59
|
+
styleMethod: ({ style }) => style,
|
|
60
|
+
rowHeightMethod: ({ height }) => height,
|
|
61
|
+
columnWidthMethod: ({ width }) => width,
|
|
62
|
+
mergesMethod: (merges) => merges
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function s2ab(s) {
|
|
66
|
+
const buf = new ArrayBuffer(s.length);
|
|
67
|
+
const view = new Uint8Array(buf);
|
|
68
|
+
for (let i = 0; i !== s.length; i++) {
|
|
69
|
+
view[i] = s.charCodeAt(i) & 255;
|
|
70
|
+
}
|
|
71
|
+
return buf;
|
|
72
|
+
}
|
|
73
|
+
function adjustHeight(hpx) {
|
|
74
|
+
const n = parseInt(hpx / 36);
|
|
75
|
+
return hpx - 10 * n;
|
|
76
|
+
}
|
|
77
|
+
function initHeaderDatas({ datas, headerRowCount, headerTrs }) {
|
|
78
|
+
let maxColSpanCount = [-1, 0];
|
|
79
|
+
for (let i = 0; i < headerRowCount; i++) {
|
|
80
|
+
const childNodes = headerTrs[i].childNodes;
|
|
81
|
+
let colSpanCount = 0;
|
|
82
|
+
for (let j = 0; j < childNodes.length; j++) {
|
|
83
|
+
if (~childNodes[j].className.split(/\s/).indexOf("col__gutter")) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
colSpanCount += childNodes[j].colSpan;
|
|
87
|
+
}
|
|
88
|
+
if (colSpanCount > maxColSpanCount[1]) {
|
|
89
|
+
maxColSpanCount[0] = i;
|
|
90
|
+
maxColSpanCount[1] = colSpanCount;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
for (let i = 0; i < headerRowCount; i++) {
|
|
94
|
+
datas.push([]);
|
|
95
|
+
for (let j = 0; j < maxColSpanCount[1]; j++) {
|
|
96
|
+
datas[i].push("");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function buildHeaderMerges({ datas, headerTrs, rowHeightMethod, ths, ws }) {
|
|
101
|
+
for (let i = 0; i < headerTrs.length; i++) {
|
|
102
|
+
const headerTrRect = headerTrs[i].getBoundingClientRect();
|
|
103
|
+
const childNodes = headerTrs[i].childNodes;
|
|
104
|
+
let rowHeight = Math.round(headerTrRect.height);
|
|
105
|
+
let lastColSpan = 0;
|
|
106
|
+
rowHeight = rowHeightMethod ? rowHeightMethod({ rowIndex: i, height: rowHeight }) : rowHeight;
|
|
107
|
+
ws["!rows"].push({ hpx: adjustHeight(rowHeight) });
|
|
108
|
+
for (let j = 0; j < childNodes.length; j++) {
|
|
109
|
+
if (~childNodes[j].className.split(/\s/).indexOf("col__gutter")) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
ths.push(childNodes[j]);
|
|
113
|
+
const colSpan = childNodes[j].colSpan;
|
|
114
|
+
const rowSpan = childNodes[j].rowSpan;
|
|
115
|
+
const textContent = childNodes[j].textContent;
|
|
116
|
+
if (colSpan > 1) {
|
|
117
|
+
ws["!merges"].push({
|
|
118
|
+
s: { r: i, c: lastColSpan },
|
|
119
|
+
e: { r: i, c: lastColSpan + colSpan - 1 }
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
if (rowSpan > 1) {
|
|
123
|
+
ws["!merges"].push({
|
|
124
|
+
s: { r: i, c: lastColSpan },
|
|
125
|
+
e: { r: i + rowSpan - 1, c: lastColSpan }
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
if (i !== headerTrs.length - 1) {
|
|
129
|
+
datas[i].splice(lastColSpan, 1, textContent);
|
|
130
|
+
}
|
|
131
|
+
lastColSpan += colSpan;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function buildColids({ $table, colids, columnWidthMethod, datas, ths, ws }) {
|
|
136
|
+
const getColWidth = (column, level) => {
|
|
137
|
+
if (column.children) {
|
|
138
|
+
for (let i = 0; i < column.children.length; i++) {
|
|
139
|
+
getColWidth(column.children[i], level + 1);
|
|
140
|
+
}
|
|
141
|
+
} else {
|
|
142
|
+
const colid = column.id;
|
|
143
|
+
for (let i = 0; i < ths.length; i++) {
|
|
144
|
+
if (ths[i].dataset.colid === colid) {
|
|
145
|
+
colids.push(colid);
|
|
146
|
+
const thRect = ths[i].getBoundingClientRect();
|
|
147
|
+
let columnWidth = Math.round(thRect.width);
|
|
148
|
+
columnWidth = columnWidthMethod ? columnWidthMethod({
|
|
149
|
+
columnIndex: colids.length - 1,
|
|
150
|
+
width: columnWidth
|
|
151
|
+
}) : columnWidth;
|
|
152
|
+
ws["!cols"].push({ wch: Math.round(columnWidth / 10) });
|
|
153
|
+
datas[level].splice(
|
|
154
|
+
colids.length - 1,
|
|
155
|
+
1,
|
|
156
|
+
typeof column.title === "string" ? column.title : ths[i].textContent
|
|
157
|
+
);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
const collectColumn = $table.collectColumn;
|
|
164
|
+
for (let i = 0; i < collectColumn.length; i++) {
|
|
165
|
+
getColWidth(collectColumn[i], 0);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function buildHeader({ $table, colids, datas, headerRowCount, headerTrs, opts, ws }) {
|
|
169
|
+
if (headerRowCount === 0) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const rowHeightMethod = opts.table.rowHeightMethod;
|
|
173
|
+
const columnWidthMethod = opts.table.columnWidthMethod;
|
|
174
|
+
const ths = [];
|
|
175
|
+
initHeaderDatas({ datas, headerRowCount, headerTrs });
|
|
176
|
+
buildHeaderMerges({ datas, headerTrs, rowHeightMethod, ths, ws });
|
|
177
|
+
buildColids({ $table, colids, columnWidthMethod, datas, ths, ws });
|
|
178
|
+
}
|
|
179
|
+
function updateRowsDatas({ childNodes, colids, datas, i, offset, rowHeight, rowHeightMethod, ws }) {
|
|
180
|
+
rowHeight = rowHeightMethod ? rowHeightMethod({ rowIndex: i + offset, height: rowHeight }) : rowHeight;
|
|
181
|
+
ws["!rows"].push({ hpx: adjustHeight(rowHeight) });
|
|
182
|
+
datas.push([]);
|
|
183
|
+
for (let j = 0; j < colids.length; j++) {
|
|
184
|
+
let rowTd = null;
|
|
185
|
+
let textContent = "";
|
|
186
|
+
for (let k = 0; k < childNodes.length; k++) {
|
|
187
|
+
if (childNodes[k].dataset.colid === colids[j]) {
|
|
188
|
+
rowTd = childNodes[k];
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (rowTd) {
|
|
193
|
+
textContent = rowTd.textContent;
|
|
194
|
+
rowTd = null;
|
|
195
|
+
}
|
|
196
|
+
datas[offset + i].push(textContent);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function updateMerges({ childNodes, colids, i, offset, ws }) {
|
|
200
|
+
for (let j = 0; j < childNodes.length; j++) {
|
|
201
|
+
const colSpan = childNodes[j].colSpan;
|
|
202
|
+
const rowSpan = childNodes[j].rowSpan;
|
|
203
|
+
const colid = childNodes[j].dataset.colid;
|
|
204
|
+
const sc = colids.indexOf(colid);
|
|
205
|
+
const sr = offset + i;
|
|
206
|
+
if (colSpan > 1 && rowSpan > 1) {
|
|
207
|
+
ws["!merges"].push({
|
|
208
|
+
s: { r: sr, c: sc },
|
|
209
|
+
e: { r: sr + rowSpan - 1, c: sc + colSpan - 1 }
|
|
210
|
+
});
|
|
211
|
+
} else if (colSpan > 1) {
|
|
212
|
+
ws["!merges"].push({
|
|
213
|
+
s: { r: sr, c: sc },
|
|
214
|
+
e: { r: sr, c: sc + colSpan - 1 }
|
|
215
|
+
});
|
|
216
|
+
} else if (rowSpan > 1) {
|
|
217
|
+
ws["!merges"].push({
|
|
218
|
+
s: { r: sr, c: sc },
|
|
219
|
+
e: { r: sr + rowSpan - 1, c: sc }
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function buildBody({ bodyRowCount, bodyTrs, colids, datas, headerRowCount, opts, ws }) {
|
|
225
|
+
if (bodyRowCount === 0) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const rowHeightMethod = opts.table.rowHeightMethod;
|
|
229
|
+
const offset = headerRowCount;
|
|
230
|
+
for (let i = 0; i < bodyTrs.length; i++) {
|
|
231
|
+
const bodyTrRect = bodyTrs[i].getBoundingClientRect();
|
|
232
|
+
const childNodes = bodyTrs[i].childNodes;
|
|
233
|
+
let rowHeight = Math.round(bodyTrRect.height);
|
|
234
|
+
updateRowsDatas({
|
|
235
|
+
colids,
|
|
236
|
+
childNodes,
|
|
237
|
+
i,
|
|
238
|
+
datas,
|
|
239
|
+
rowHeight,
|
|
240
|
+
rowHeightMethod,
|
|
241
|
+
offset,
|
|
242
|
+
ws
|
|
243
|
+
});
|
|
244
|
+
updateMerges({ childNodes, colids, i, offset, ws });
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function genExcelColNames() {
|
|
248
|
+
const excelColNames = [];
|
|
249
|
+
const f = funcFromCodePoint;
|
|
250
|
+
for (let i = -1; i < 26; i++) {
|
|
251
|
+
for (let j = 0; j < 26; j++) {
|
|
252
|
+
excelColNames.push((i === -1 ? "" : f(65 + i)) + f(65 + j));
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return excelColNames;
|
|
256
|
+
}
|
|
257
|
+
function buildRef({ colids, datas, excelColNames, ws }) {
|
|
258
|
+
let fullref = "";
|
|
259
|
+
if (colids.length > 0 && datas.length > 0) {
|
|
260
|
+
fullref = "A1:" + excelColNames[colids.length - 1] + datas.length;
|
|
261
|
+
}
|
|
262
|
+
ws["!fullref"] = fullref;
|
|
263
|
+
ws["!ref"] = fullref;
|
|
264
|
+
}
|
|
265
|
+
function updateCellStyle({
|
|
266
|
+
bodyRowCount,
|
|
267
|
+
bodyTrBgcArr,
|
|
268
|
+
footerTrBgc,
|
|
269
|
+
headerRowCount,
|
|
270
|
+
headerWrapperBgc,
|
|
271
|
+
rowIndex,
|
|
272
|
+
showBorder,
|
|
273
|
+
style
|
|
274
|
+
}) {
|
|
275
|
+
style.font = { name: "Microsoft YaHei", sz: 12, color: { rgb: "000000" } };
|
|
276
|
+
if (rowIndex < headerRowCount) {
|
|
277
|
+
style.fill = { fgColor: { rgb: headerWrapperBgc } };
|
|
278
|
+
style.font.bold = true;
|
|
279
|
+
} else if (rowIndex < headerRowCount + bodyRowCount) {
|
|
280
|
+
style.fill = { fgColor: { rgb: bodyTrBgcArr[rowIndex - headerRowCount] } };
|
|
281
|
+
} else {
|
|
282
|
+
style.fill = { fgColor: { rgb: footerTrBgc } };
|
|
283
|
+
}
|
|
284
|
+
if (showBorder) {
|
|
285
|
+
style.border = {
|
|
286
|
+
top: { style: "thin", color: { rgb: "000000" } },
|
|
287
|
+
bottom: { style: "thin", color: { rgb: "000000" } },
|
|
288
|
+
left: { style: "thin", color: { rgb: "000000" } },
|
|
289
|
+
right: { style: "thin", color: { rgb: "000000" } }
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
style.alignment = { vertical: "center", horizontal: "left", wrapText: false };
|
|
293
|
+
}
|
|
294
|
+
function buildDatas({
|
|
295
|
+
showBorder,
|
|
296
|
+
bodyRowCount,
|
|
297
|
+
bodyTrBgcArr,
|
|
298
|
+
headerRowCount,
|
|
299
|
+
colids,
|
|
300
|
+
datas,
|
|
301
|
+
footerTrBgc,
|
|
302
|
+
headerWrapperBgc,
|
|
303
|
+
excelColNames,
|
|
304
|
+
opts,
|
|
305
|
+
$table,
|
|
306
|
+
ws
|
|
307
|
+
}) {
|
|
308
|
+
if (datas.length === 0) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
const styleMethod = opts.table.styleMethod;
|
|
312
|
+
const formatMethod = opts.table.formatMethod;
|
|
313
|
+
const fullColumn = $table.getTableColumn().fullColumn;
|
|
314
|
+
const isIndexColData = (i, j, indexColIndex2, headerRowCount2, bodyRowCount2) => indexColIndex2 === j && i >= headerRowCount2 && i < headerRowCount2 + bodyRowCount2;
|
|
315
|
+
let indexColIndex;
|
|
316
|
+
for (let i = 0; i < fullColumn.length; i++) {
|
|
317
|
+
if (fullColumn[i].type === "index") {
|
|
318
|
+
indexColIndex = colids.indexOf(fullColumn[i].id);
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
for (let i = 0; i < datas.length; i++) {
|
|
323
|
+
for (let j = 0; j < datas[i].length; j++) {
|
|
324
|
+
let type = isIndexColData(i, j, indexColIndex, headerRowCount, bodyRowCount) ? "n" : "s";
|
|
325
|
+
let value = isIndexColData(i, j, indexColIndex, headerRowCount, bodyRowCount) ? parseInt(datas[i][j]) : datas[i][j].trim();
|
|
326
|
+
let style = {};
|
|
327
|
+
updateCellStyle({
|
|
328
|
+
bodyRowCount,
|
|
329
|
+
bodyTrBgcArr,
|
|
330
|
+
columnIndex: j,
|
|
331
|
+
footerTrBgc,
|
|
332
|
+
headerRowCount,
|
|
333
|
+
headerWrapperBgc,
|
|
334
|
+
rowIndex: i,
|
|
335
|
+
showBorder,
|
|
336
|
+
style
|
|
337
|
+
});
|
|
338
|
+
if (styleMethod) {
|
|
339
|
+
style = styleMethod({ rowIndex: i, columnIndex: j, style });
|
|
340
|
+
}
|
|
341
|
+
if (formatMethod) {
|
|
342
|
+
const ret = formatMethod({ rowIndex: i, columnIndex: j, value, type });
|
|
343
|
+
type = ret.type;
|
|
344
|
+
value = ret.value;
|
|
345
|
+
}
|
|
346
|
+
ws[excelColNames[j] + (i + 1)] = { t: type, v: value, s: style };
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function buildWb({ XLSXX, opts, ws }) {
|
|
351
|
+
ws = ws["!cols"].length === 0 || ws["!rows"].length === 0 ? {} : ws;
|
|
352
|
+
const sheetName = opts.table.sheetName;
|
|
353
|
+
const merges = ws["!merges"];
|
|
354
|
+
if (merges) {
|
|
355
|
+
const mergesMethod = opts.table.mergesMethod;
|
|
356
|
+
ws["!merges"] = mergesMethod ? mergesMethod(merges) : merges;
|
|
357
|
+
}
|
|
358
|
+
const wb = {
|
|
359
|
+
Props: {
|
|
360
|
+
Application: "SheetJS",
|
|
361
|
+
SheetNames: [sheetName],
|
|
362
|
+
Worksheets: 1
|
|
363
|
+
},
|
|
364
|
+
SSF: XLSXX.SSF.get_table(),
|
|
365
|
+
SheetNames: [sheetName],
|
|
366
|
+
Sheets: {
|
|
367
|
+
[sheetName]: ws
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
return wb;
|
|
371
|
+
}
|
|
372
|
+
function computeBodyTrBgcArr(bodyTrs, isStripe) {
|
|
373
|
+
const arr = [];
|
|
374
|
+
for (let i = 0; i < bodyTrs.length; i++) {
|
|
375
|
+
arr.push(isStripe ? getBgc(bodyTrs[i]) : "ffffff");
|
|
376
|
+
}
|
|
377
|
+
return arr;
|
|
378
|
+
}
|
|
379
|
+
function queryDom($table) {
|
|
380
|
+
const headerTrs = $table.$el.querySelectorAll(".tiny-grid__header-wrapper.body__wrapper .tiny-grid-header__row");
|
|
381
|
+
const bodyTrs = $table.$el.querySelectorAll(".tiny-grid__body-wrapper.body__wrapper .tiny-grid-body__row:not(.group)");
|
|
382
|
+
const footerTrs = $table.$el.querySelectorAll(".tiny-grid__footer-wrapper.body__wrapper .tiny-grid-footer__row");
|
|
383
|
+
const headerWrapper = $table.$el.querySelector(".tiny-grid__header-wrapper.body__wrapper");
|
|
384
|
+
return { bodyTrs, footerTrs, headerTrs, headerWrapper };
|
|
385
|
+
}
|
|
386
|
+
function getTableAttr($table, headerWrapper, bodyTrs) {
|
|
387
|
+
const showBorder = ~$table.$el.className.split(/\s/).indexOf("tiny-grid__border");
|
|
388
|
+
const isStripe = ~$table.$el.className.split(/\s/).indexOf("tiny-grid__stripe");
|
|
389
|
+
const headerWrapperBgc = headerWrapper ? getBgc(headerWrapper) : "ffffff";
|
|
390
|
+
const bodyTrBgcArr = computeBodyTrBgcArr(bodyTrs, isStripe);
|
|
391
|
+
const footerTrBgc = "ffffff";
|
|
392
|
+
return { showBorder, headerWrapperBgc, bodyTrBgcArr, footerTrBgc };
|
|
393
|
+
}
|
|
394
|
+
function buildColidsByVisibleColumn({ $table, bodyRowCount, bodyTrs, colids, opts, ws }) {
|
|
395
|
+
if (colids.length > 0 || bodyRowCount === 0) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
const columnWidthMethod = opts.table.columnWidthMethod;
|
|
399
|
+
const tds = [];
|
|
400
|
+
for (let i = 0; i < bodyTrs.length; i++) {
|
|
401
|
+
for (let j = 0; j < bodyTrs[i].childNodes.length; j++) {
|
|
402
|
+
tds.push(bodyTrs[i].childNodes[j]);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
for (let i = 0; i < $table.visibleColumn.length; i++) {
|
|
406
|
+
let colid = $table.visibleColumn[i].id;
|
|
407
|
+
for (let j = 0; j < tds.length; j++) {
|
|
408
|
+
if (tds[j].dataset.colid === colid) {
|
|
409
|
+
colids.push(colid);
|
|
410
|
+
const tdRect = tds[j].getBoundingClientRect();
|
|
411
|
+
const colSpan = tds[j].colSpan;
|
|
412
|
+
let columnWidth = Math.round(tdRect.width / colSpan);
|
|
413
|
+
columnWidth = columnWidthMethod ? columnWidthMethod({
|
|
414
|
+
columnIndex: colids.length - 1,
|
|
415
|
+
width: columnWidth
|
|
416
|
+
}) : columnWidth;
|
|
417
|
+
ws["!cols"].push({ wch: Math.round(columnWidth / 10) });
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
function buildFooter({ bodyRowCount, colids, datas, footerRowCount, footerTrs, headerRowCount, opts, ws }) {
|
|
424
|
+
if (footerRowCount === 0) {
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
const rowHeightMethod = opts.table.rowHeightMethod;
|
|
428
|
+
const offset = headerRowCount + bodyRowCount;
|
|
429
|
+
for (let i = 0; i < footerTrs.length; i++) {
|
|
430
|
+
const footerTrRect = footerTrs[i].getBoundingClientRect();
|
|
431
|
+
const childNodes = footerTrs[i].childNodes;
|
|
432
|
+
let rowHeight = Math.round(footerTrRect.height);
|
|
433
|
+
updateRowsDatas({
|
|
434
|
+
childNodes,
|
|
435
|
+
colids,
|
|
436
|
+
datas,
|
|
437
|
+
i,
|
|
438
|
+
offset,
|
|
439
|
+
rowHeight,
|
|
440
|
+
rowHeightMethod,
|
|
441
|
+
ws
|
|
442
|
+
});
|
|
443
|
+
updateMerges({ childNodes, colids, i, offset, ws });
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
function createExcelFromDom($table, opts) {
|
|
447
|
+
const { XLSXX } = opts.plugins;
|
|
448
|
+
const { bodyTrs, footerTrs, headerTrs, headerWrapper } = queryDom($table);
|
|
449
|
+
const { showBorder, headerWrapperBgc, bodyTrBgcArr, footerTrBgc } = getTableAttr($table, headerWrapper, bodyTrs);
|
|
450
|
+
const headerRowCount = headerTrs.length;
|
|
451
|
+
const bodyRowCount = bodyTrs.length;
|
|
452
|
+
const footerRowCount = footerTrs.length;
|
|
453
|
+
const ws = {};
|
|
454
|
+
const datas = [];
|
|
455
|
+
const colids = [];
|
|
456
|
+
const excelColNames = genExcelColNames();
|
|
457
|
+
ws["!rows"] = [];
|
|
458
|
+
ws["!cols"] = [];
|
|
459
|
+
ws["!merges"] = [];
|
|
460
|
+
buildHeader({ $table, colids, datas, headerRowCount, headerTrs, opts, ws });
|
|
461
|
+
buildColidsByVisibleColumn({ $table, bodyRowCount, bodyTrs, colids, opts, ws });
|
|
462
|
+
buildBody({ bodyRowCount, bodyTrs, colids, datas, headerRowCount, opts, ws });
|
|
463
|
+
buildFooter({ bodyRowCount, colids, datas, footerRowCount, footerTrs, headerRowCount, opts, ws });
|
|
464
|
+
buildRef({ colids, datas, excelColNames, ws });
|
|
465
|
+
buildDatas({
|
|
466
|
+
$table,
|
|
467
|
+
bodyRowCount,
|
|
468
|
+
bodyTrBgcArr,
|
|
469
|
+
colids,
|
|
470
|
+
datas,
|
|
471
|
+
excelColNames,
|
|
472
|
+
footerTrBgc,
|
|
473
|
+
headerRowCount,
|
|
474
|
+
headerWrapperBgc,
|
|
475
|
+
opts,
|
|
476
|
+
showBorder,
|
|
477
|
+
ws
|
|
478
|
+
});
|
|
479
|
+
return buildWb({ XLSXX, opts, ws });
|
|
480
|
+
}
|
|
481
|
+
function exportExcel($table, options) {
|
|
482
|
+
const opts = extend(true, {}, options);
|
|
483
|
+
opts.plugins = opts.plugins || {};
|
|
484
|
+
if (!opts.plugins.XLSX || !opts.plugins.XLSXX || !opts.plugins.FileSaver) {
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
opts.table = opts.table || {};
|
|
488
|
+
opts.table.sheetName = opts.table.sheetName || defaultOptions.table.sheetName;
|
|
489
|
+
opts.table.formatMethod = opts.table.formatMethod || defaultOptions.table.formatMethod;
|
|
490
|
+
opts.table.styleMethod = opts.table.styleMethod || defaultOptions.table.styleMethod;
|
|
491
|
+
opts.table.rowHeightMethod = opts.table.rowHeightMethod || defaultOptions.table.rowHeightMethod;
|
|
492
|
+
opts.table.columnWidthMethod = opts.table.columnWidthMethod || defaultOptions.table.columnWidthMethod;
|
|
493
|
+
opts.table.mergesMethod = opts.table.mergesMethod || defaultOptions.table.mergesMethod;
|
|
494
|
+
const wb = createExcelFromDom($table, opts);
|
|
495
|
+
const { XLSXX, FileSaver } = opts.plugins;
|
|
496
|
+
const wopts = { bookType: "xlsx", bookSST: false, type: "binary" };
|
|
497
|
+
const wbout = XLSXX.write(wb, wopts);
|
|
498
|
+
FileSaver.saveAs(new Blob([s2ab(wbout)], { type: "" }), opts.table.sheetName + ".xlsx");
|
|
499
|
+
}
|
|
500
|
+
export {
|
|
501
|
+
exportExcel
|
|
502
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import "../../chunk-G2ADBYYC.js";
|
|
2
|
+
const columnIsVisible = (children) => Array.isArray(children) && children.length && children.some((column) => column.visible);
|
|
3
|
+
const getAllColumns = (columns) => {
|
|
4
|
+
const result = [];
|
|
5
|
+
columns.forEach((column) => {
|
|
6
|
+
if (column.visible) {
|
|
7
|
+
const children = column.children;
|
|
8
|
+
if (columnIsVisible(children)) {
|
|
9
|
+
result.push(column);
|
|
10
|
+
result.push.apply(result, getAllColumns(children));
|
|
11
|
+
} else {
|
|
12
|
+
result.push(column);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
const convertToRows = (originColumns) => {
|
|
19
|
+
let maxLevel = 1;
|
|
20
|
+
const walkTree = (column, parent) => {
|
|
21
|
+
if (parent) {
|
|
22
|
+
column.level = parent.level + 1;
|
|
23
|
+
if (maxLevel < column.level) {
|
|
24
|
+
maxLevel = column.level;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const children = column.children;
|
|
28
|
+
if (columnIsVisible(children)) {
|
|
29
|
+
let colSpan = 0;
|
|
30
|
+
children.forEach((childColumn) => {
|
|
31
|
+
if (childColumn.visible) {
|
|
32
|
+
walkTree(childColumn, column);
|
|
33
|
+
colSpan += childColumn.colSpan;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
column.colSpan = colSpan;
|
|
37
|
+
} else {
|
|
38
|
+
column.colSpan = 1;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
originColumns.forEach((column) => {
|
|
42
|
+
column.level = 1;
|
|
43
|
+
walkTree(column);
|
|
44
|
+
});
|
|
45
|
+
const allRows = [];
|
|
46
|
+
for (let i = 0; i < maxLevel; i++) {
|
|
47
|
+
allRows.push([]);
|
|
48
|
+
}
|
|
49
|
+
const allColumns = getAllColumns(originColumns);
|
|
50
|
+
allColumns.forEach((column) => {
|
|
51
|
+
column.rowSpan = columnIsVisible(column.children) ? 1 : maxLevel - column.level + 1;
|
|
52
|
+
allRows[column.level - 1].push(column);
|
|
53
|
+
});
|
|
54
|
+
return allRows;
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
convertToRows,
|
|
58
|
+
getAllColumns
|
|
59
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "../../chunk-G2ADBYYC.js";
|
|
2
|
+
import browser from "../../common/browser";
|
|
3
|
+
import { remove } from "../static";
|
|
4
|
+
let resizeTimeout;
|
|
5
|
+
let defaultInterval = 250;
|
|
6
|
+
const eventStore = [];
|
|
7
|
+
let eventHandle;
|
|
8
|
+
const eventListener = () => {
|
|
9
|
+
clearTimeout(resizeTimeout);
|
|
10
|
+
resizeTimeout = setTimeout(eventHandle, defaultInterval);
|
|
11
|
+
};
|
|
12
|
+
eventHandle = () => {
|
|
13
|
+
if (eventStore.length) {
|
|
14
|
+
eventStore.forEach((item) => {
|
|
15
|
+
item.tarList.forEach((el) => {
|
|
16
|
+
const { target, width, heighe } = el;
|
|
17
|
+
const clientWidth = target.clientWidth;
|
|
18
|
+
const clientHeight = target.clientHeight;
|
|
19
|
+
const rWidth = clientWidth && width !== clientWidth;
|
|
20
|
+
const rHeight = clientHeight && heighe !== clientHeight;
|
|
21
|
+
if (rWidth || rHeight) {
|
|
22
|
+
el.width = clientWidth;
|
|
23
|
+
el.heighe = clientHeight;
|
|
24
|
+
requestAnimationFrame(item.callback);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
eventListener();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
class ResizeObserverPolyfill {
|
|
32
|
+
constructor(callback, resizeInterval) {
|
|
33
|
+
this.tarList = [];
|
|
34
|
+
this.callback = callback;
|
|
35
|
+
defaultInterval = resizeInterval;
|
|
36
|
+
}
|
|
37
|
+
observe(targetObj) {
|
|
38
|
+
if (targetObj) {
|
|
39
|
+
if (!this.tarList.includes(targetObj)) {
|
|
40
|
+
this.tarList.push({
|
|
41
|
+
target: targetObj,
|
|
42
|
+
width: targetObj.clientWidth,
|
|
43
|
+
heighe: targetObj.clientHeight
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (!eventStore.length) {
|
|
47
|
+
eventListener();
|
|
48
|
+
}
|
|
49
|
+
if (!eventStore.includes(this)) {
|
|
50
|
+
eventStore.push(this);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
unobserve(target) {
|
|
55
|
+
remove(eventStore, (item) => ~item.tarList.indexOf(target));
|
|
56
|
+
}
|
|
57
|
+
disconnect() {
|
|
58
|
+
remove(eventStore, (item) => item === this);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const Resize = browser.isDoc ? window.ResizeObserver || ResizeObserverPolyfill : ResizeObserverPolyfill;
|
|
62
|
+
var resize_default = Resize;
|
|
63
|
+
export {
|
|
64
|
+
resize_default as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../../../chunk-G2ADBYYC.js";
|
|
2
|
+
const arrayEach = (obj, iterate, context) => {
|
|
3
|
+
if (obj) {
|
|
4
|
+
if (obj.forEach) {
|
|
5
|
+
obj.forEach(iterate, context);
|
|
6
|
+
} else {
|
|
7
|
+
for (let index = 0, len = obj.length; index < len; index++) {
|
|
8
|
+
iterate.call(context, obj[index], index, obj);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var arrayEach_default = arrayEach;
|
|
14
|
+
export {
|
|
15
|
+
arrayEach_default as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "../../../chunk-G2ADBYYC.js";
|
|
2
|
+
const arrayIndexOf = (obj, val) => {
|
|
3
|
+
if (obj.indexOf) {
|
|
4
|
+
return obj.indexOf(val);
|
|
5
|
+
}
|
|
6
|
+
for (let index = 0, len = obj.length; index < len; index++) {
|
|
7
|
+
if (val === obj[index]) {
|
|
8
|
+
return index;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
var arrayIndexOf_default = arrayIndexOf;
|
|
13
|
+
export {
|
|
14
|
+
arrayIndexOf_default as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "../../../chunk-G2ADBYYC.js";
|
|
2
|
+
import helperCreateTreeFunc from "./helperCreateTreeFunc";
|
|
3
|
+
import each from "../base/each";
|
|
4
|
+
const eachTreeItem = ({ parent, obj, iterate, context, path, node, parseChildren, opts }) => {
|
|
5
|
+
each(obj, (item, index) => {
|
|
6
|
+
const paths = path.concat([`${index}`]);
|
|
7
|
+
const nodes = node.concat([item]);
|
|
8
|
+
iterate.call(context, item, index, obj, paths, parent, nodes);
|
|
9
|
+
if (item && parseChildren) {
|
|
10
|
+
paths.push(parseChildren);
|
|
11
|
+
eachTreeItem({
|
|
12
|
+
item,
|
|
13
|
+
obj: item[parseChildren],
|
|
14
|
+
context,
|
|
15
|
+
iterate,
|
|
16
|
+
node: nodes,
|
|
17
|
+
parseChildren,
|
|
18
|
+
path: paths,
|
|
19
|
+
opts
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const eachTree = helperCreateTreeFunc(eachTreeItem);
|
|
25
|
+
var eachTree_default = eachTree;
|
|
26
|
+
export {
|
|
27
|
+
eachTree_default as default
|
|
28
|
+
};
|