@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,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../chunk-G2ADBYYC.js";
|
|
4
|
+
import { getFormated, getMapJSON, getLegend as getLegendMap } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
|
+
const getTooltip = ({ dataType, digit, dataStore, metrics, color, labelMap }) => {
|
|
8
|
+
function formatter(item) {
|
|
9
|
+
let tplt = [];
|
|
10
|
+
if (!item.name) {
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
tplt.push(`${itemLabel(item.name)}<br>`);
|
|
14
|
+
metrics.forEach((label, index) => {
|
|
15
|
+
let title = isNull(labelMap[label]) ? label : labelMap[label];
|
|
16
|
+
tplt.push(`${itemPoint(color[index])}${itemLabel(title)}`);
|
|
17
|
+
if (dataStore[item.name]) {
|
|
18
|
+
tplt.push(itemContent(getFormated(dataStore[item.name][label], dataType[label], digit)));
|
|
19
|
+
} else {
|
|
20
|
+
tplt.push(itemContent("-"));
|
|
21
|
+
}
|
|
22
|
+
tplt.push("<br>");
|
|
23
|
+
});
|
|
24
|
+
return tplt.join("");
|
|
25
|
+
}
|
|
26
|
+
return { formatter };
|
|
27
|
+
};
|
|
28
|
+
const setGeoLabel = (value, target, label) => {
|
|
29
|
+
if (typeof value === "object") {
|
|
30
|
+
target[label] = value;
|
|
31
|
+
} else if (value) {
|
|
32
|
+
target[label] = { show: true };
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const getSeries = (args) => {
|
|
36
|
+
let { position, selectData, dimension, metrics, rows, label, selectedMode, roam, center, aspectScale, zoom } = args;
|
|
37
|
+
const { boundingCoords, labelMap, scaleLimit, mapGrid, itemStyle = { areaColor: "rgba(25,25,25,0.05)" } } = args;
|
|
38
|
+
const { result = [], mapBase = { type: "map", map: position } } = {};
|
|
39
|
+
const { emphasis = { itemStyle: { areaColor: "rgba(25,25,25,0.2)" }, label: { color: "#191919" } } } = {};
|
|
40
|
+
metrics.forEach((itemName) => {
|
|
41
|
+
const name = !isNull(labelMap[itemName]) ? labelMap[itemName] : itemName;
|
|
42
|
+
const data = [];
|
|
43
|
+
const itemResult = __spreadValues({
|
|
44
|
+
name,
|
|
45
|
+
data,
|
|
46
|
+
selectedMode,
|
|
47
|
+
roam,
|
|
48
|
+
center,
|
|
49
|
+
aspectScale,
|
|
50
|
+
boundingCoords,
|
|
51
|
+
zoom,
|
|
52
|
+
scaleLimit
|
|
53
|
+
}, mapBase);
|
|
54
|
+
if (mapGrid) {
|
|
55
|
+
Object.keys(mapGrid).forEach((key) => itemResult[key] = mapGrid[key]);
|
|
56
|
+
}
|
|
57
|
+
setGeoLabel(itemStyle, itemResult, "itemStyle");
|
|
58
|
+
setGeoLabel(label, itemResult, "label");
|
|
59
|
+
rows.forEach((row) => itemResult.data.push({ name: row[dimension], value: row[itemName], selected: selectData }));
|
|
60
|
+
itemResult.emphasis = emphasis;
|
|
61
|
+
itemResult.label = __spreadValues({ color: "#191919" }, itemResult.label);
|
|
62
|
+
result.push(itemResult);
|
|
63
|
+
});
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
const registerMap = (args, mapOrigin, echarts) => {
|
|
67
|
+
const { _once, registerSign, beforeRegisterMap, beforeRegisterMapOnce } = args;
|
|
68
|
+
const { registerSignOnce, position, specialAreas } = args;
|
|
69
|
+
if (!_once[registerSign] && beforeRegisterMap) {
|
|
70
|
+
mapOrigin = beforeRegisterMap(mapOrigin);
|
|
71
|
+
}
|
|
72
|
+
if (!_once[registerSign] && beforeRegisterMapOnce && !_once[registerSignOnce]) {
|
|
73
|
+
_once[registerSignOnce] = true;
|
|
74
|
+
mapOrigin = beforeRegisterMapOnce(mapOrigin);
|
|
75
|
+
}
|
|
76
|
+
if (!_once[registerSign]) {
|
|
77
|
+
_once[registerSign] = true;
|
|
78
|
+
echarts.registerMap(position, mapOrigin, specialAreas);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const map = (columns, rows, settings, extra) => {
|
|
82
|
+
const { position = "", selectData = false, selectedMode, label = true, dataType = {}, digit = 2 } = settings;
|
|
83
|
+
const { dimension = columns[0], roam, center, aspectScale, boundingCoords, zoom } = settings;
|
|
84
|
+
const { scaleLimit, legendName = {}, labelMap = {}, mapGrid, itemStyle, positionJsonLink, emphasis } = settings;
|
|
85
|
+
const { beforeRegisterMap, beforeRegisterMapOnce, mapURLProfix = extra.baseUrl || "", specialAreas = {} } = settings;
|
|
86
|
+
const { mapOrigin } = settings;
|
|
87
|
+
let metrics = columns.slice(0);
|
|
88
|
+
if (!settings.metrics) {
|
|
89
|
+
metrics.splice(columns.indexOf(dimension), 1);
|
|
90
|
+
} else {
|
|
91
|
+
metrics = settings.metrics;
|
|
92
|
+
}
|
|
93
|
+
const { tooltipVisible, legendVisible, color, _once, echartsLib: echarts } = extra;
|
|
94
|
+
const dataStore = {};
|
|
95
|
+
rows.forEach((row) => dataStore[row[dimension]] = row);
|
|
96
|
+
const tooltip = tooltipVisible && getTooltip({ dataType, digit, dataStore, metrics, color, labelMap });
|
|
97
|
+
const legend = legendVisible && getLegendMap({ metrics, legendName, labelMap });
|
|
98
|
+
const seriesParams = { position, selectData, label, itemStyle, dimension, metrics, rows, selectedMode, roam };
|
|
99
|
+
Object.assign(seriesParams, { center, aspectScale, boundingCoords, zoom, labelMap, scaleLimit, mapGrid, emphasis });
|
|
100
|
+
const series = getSeries(seriesParams);
|
|
101
|
+
const registerSign = `MAP_REGISTER_${position}`;
|
|
102
|
+
const registerSignOnce = `ONCE_MAP_REGISTER_${position}`;
|
|
103
|
+
const registerOptions = { _once, beforeRegisterMap, beforeRegisterMapOnce, position };
|
|
104
|
+
Object.assign(registerOptions, { specialAreas, registerSign, registerSignOnce });
|
|
105
|
+
if (mapOrigin) {
|
|
106
|
+
registerMap(registerOptions, mapOrigin, echarts);
|
|
107
|
+
return { series, tooltip, legend };
|
|
108
|
+
} else {
|
|
109
|
+
const param = { position, positionJsonLink, beforeRegisterMapOnce, mapURLProfix };
|
|
110
|
+
return getMapJSON(param).then((json) => {
|
|
111
|
+
registerMap(registerOptions, json, echarts);
|
|
112
|
+
return { series, tooltip, legend };
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
map
|
|
118
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../chunk-G2ADBYYC.js";
|
|
4
|
+
import { getFormated, setArrayValue, cloneDeep } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
|
+
const pieRadius = 100;
|
|
8
|
+
const ringRadius = [90, 100];
|
|
9
|
+
const roseRingRadius = [20, 100];
|
|
10
|
+
const pieOffsetY = "50%";
|
|
11
|
+
const modifySeries = ({ series, limitShowNum, t }) => {
|
|
12
|
+
let firstSerie = series[0];
|
|
13
|
+
if (limitShowNum && limitShowNum < firstSerie.data.length) {
|
|
14
|
+
let firstSerieData = firstSerie.data;
|
|
15
|
+
let remainArr = firstSerieData.slice(limitShowNum, firstSerieData.length);
|
|
16
|
+
let sum = 0;
|
|
17
|
+
remainArr.forEach((item) => sum += item.value);
|
|
18
|
+
firstSerie.data = firstSerieData.slice(0, limitShowNum);
|
|
19
|
+
firstSerie.data.push({ name: t("ui.chart.other"), value: sum });
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const getPieSeries = (args) => {
|
|
23
|
+
const { dataType, digit, dimension, emphasis, innerRows, isRing, itemStyle, label, labelLine } = args;
|
|
24
|
+
const { level, limitShowNum, metrics, offsetY, percentShow, radius, roseType, selectedMode, t } = args;
|
|
25
|
+
let { series = [], levelTemp = {}, rowsTemp = [] } = {};
|
|
26
|
+
if (!level) {
|
|
27
|
+
rowsTemp.push(innerRows);
|
|
28
|
+
} else {
|
|
29
|
+
level.forEach((levelItems, index) => levelItems.forEach((item) => setArrayValue(levelTemp, item, index)));
|
|
30
|
+
innerRows.forEach((row) => {
|
|
31
|
+
let itemLevel = levelTemp[row[dimension]];
|
|
32
|
+
if (itemLevel && itemLevel.length) {
|
|
33
|
+
itemLevel.forEach((levelItem) => setArrayValue(rowsTemp, levelItem, row));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
let serieBase = { type: "pie", selectedMode, emphasis, roseType, center: ["50%", offsetY] };
|
|
38
|
+
let rowsCount = rowsTemp.length;
|
|
39
|
+
let centerWidth = radius / rowsCount;
|
|
40
|
+
rowsTemp.forEach((dataRows, index) => {
|
|
41
|
+
let serie = __spreadValues({ data: [] }, serieBase);
|
|
42
|
+
if (!index) {
|
|
43
|
+
serie.radius = isRing ? radius : centerWidth;
|
|
44
|
+
} else {
|
|
45
|
+
let outerWidth = centerWidth + radius / (2 * rowsCount) * (2 * index - 1);
|
|
46
|
+
let innerWidth = outerWidth + radius / (2 * rowsCount);
|
|
47
|
+
serie.radius = [outerWidth, innerWidth];
|
|
48
|
+
}
|
|
49
|
+
rowsCount > 1 && index === 0 && (serie.label = { position: "inner" });
|
|
50
|
+
serie.label = __spreadValues({ color: "#191919" }, label);
|
|
51
|
+
serie.labelLine = __spreadValues({ smooth: true, lineStyle: { color: "#bbb" } }, labelLine);
|
|
52
|
+
serie.itemStyle = __spreadValues({ borderWidth: 2, borderColor: "#fff" }, itemStyle);
|
|
53
|
+
if (percentShow) {
|
|
54
|
+
let position = rowsCount > 1 && index === 0 ? "inner" : "outside";
|
|
55
|
+
let formatter = function(item) {
|
|
56
|
+
let tplt = [];
|
|
57
|
+
tplt.push(`${item.name}:`);
|
|
58
|
+
tplt.push(getFormated(item.value, dataType, digit));
|
|
59
|
+
tplt.push(`(${item.percent}%)`);
|
|
60
|
+
return tplt.join("");
|
|
61
|
+
};
|
|
62
|
+
serie.label = { normal: { show: true, position, formatter } };
|
|
63
|
+
}
|
|
64
|
+
serie.data = dataRows.map((row) => ({ name: row[dimension], value: row[metrics] }));
|
|
65
|
+
series.push(serie);
|
|
66
|
+
});
|
|
67
|
+
modifySeries({ series, limitShowNum, t });
|
|
68
|
+
return series;
|
|
69
|
+
};
|
|
70
|
+
const getPieLegend = (args) => {
|
|
71
|
+
const { dimension, innerRows, legendLimit, legendName, level, limitShowNum, t } = args;
|
|
72
|
+
let { legend = [], levelTemp = [] } = {};
|
|
73
|
+
if (level) {
|
|
74
|
+
level.forEach((levelItem) => levelItem.forEach((item) => levelTemp.push(item)));
|
|
75
|
+
legend = levelTemp;
|
|
76
|
+
} else if (limitShowNum && limitShowNum < innerRows.length) {
|
|
77
|
+
for (let i = limitShowNum - 1; i >= 0; i--) {
|
|
78
|
+
legend.unshift(innerRows[i][dimension]);
|
|
79
|
+
}
|
|
80
|
+
legend.push(t("ui.chart.other"));
|
|
81
|
+
} else {
|
|
82
|
+
legend = innerRows.map((row) => row[dimension]);
|
|
83
|
+
}
|
|
84
|
+
if (legend.length) {
|
|
85
|
+
let show = legend.length < legendLimit;
|
|
86
|
+
let formatter = function(name) {
|
|
87
|
+
return !isNull(legendName[name]) ? legendName[name] : name;
|
|
88
|
+
};
|
|
89
|
+
return { data: legend, show, formatter };
|
|
90
|
+
} else {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const getPieTooltip = (args) => {
|
|
95
|
+
const { dataType, digit, dimension, innerRows, limitShowNum, metrics, t } = args;
|
|
96
|
+
let { localeOther = t("ui.chart.other"), remainArr, sum = 0 } = {};
|
|
97
|
+
let mapHandler = (row) => {
|
|
98
|
+
sum += row[metrics];
|
|
99
|
+
return { name: row[dimension], value: row[metrics] };
|
|
100
|
+
};
|
|
101
|
+
remainArr = innerRows.map(mapHandler).slice(limitShowNum, innerRows.length);
|
|
102
|
+
let formatter = function(item) {
|
|
103
|
+
let tplt = [itemPoint(item.color)];
|
|
104
|
+
let percent;
|
|
105
|
+
if (!limitShowNum || item.name !== localeOther) {
|
|
106
|
+
tplt.push(itemLabel(item.name));
|
|
107
|
+
tplt.push(itemContent(getFormated(item.value, dataType, digit)));
|
|
108
|
+
tplt.push(itemContent(`(${item.percent}%)`));
|
|
109
|
+
} else {
|
|
110
|
+
tplt.push(localeOther + ":");
|
|
111
|
+
remainArr.forEach(({ name, value }) => {
|
|
112
|
+
percent = getFormated(value / sum, "percent");
|
|
113
|
+
tplt.push(`<br>${itemLabel(name)}`);
|
|
114
|
+
tplt.push(itemContent(getFormated(value, dataType, digit)));
|
|
115
|
+
tplt.push(itemContent(percent));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return tplt.join("");
|
|
119
|
+
};
|
|
120
|
+
return { formatter };
|
|
121
|
+
};
|
|
122
|
+
const pie = (columns, rows, settings, extra, isRing) => {
|
|
123
|
+
const innerRows = cloneDeep(rows);
|
|
124
|
+
const { dataType = "normal", digit = 2, dimension = columns[0], emphasis = { scale: true } } = settings;
|
|
125
|
+
const { itemStyle, label = false, labelLine, legendLimit = 30, legendName = {}, level = false } = settings;
|
|
126
|
+
const { limitShowNum = 0, metrics = columns[1], offsetY = pieOffsetY, percentShow } = settings;
|
|
127
|
+
const { roseType = false, selectedMode = false } = settings;
|
|
128
|
+
const { radius = isRing ? roseType ? roseRingRadius : ringRadius : pieRadius } = settings;
|
|
129
|
+
const { legendVisible, t, tooltipVisible } = extra;
|
|
130
|
+
limitShowNum && innerRows.sort((a, b) => b[metrics] - a[metrics]);
|
|
131
|
+
const seriesParams = { dataType, digit, dimension, emphasis, innerRows, isRing, itemStyle };
|
|
132
|
+
Object.assign(seriesParams, { label, labelLine, legendName, level, limitShowNum, metrics, offsetY });
|
|
133
|
+
Object.assign(seriesParams, { percentShow, radius, roseType, selectedMode, t });
|
|
134
|
+
const series = getPieSeries(seriesParams);
|
|
135
|
+
const legendParams = { dimension, innerRows, legendLimit, legendName, level, limitShowNum, t };
|
|
136
|
+
const legend = legendVisible && getPieLegend(legendParams);
|
|
137
|
+
const pieTooltip = getPieTooltip({ dataType, innerRows, limitShowNum, digit, metrics, dimension, t });
|
|
138
|
+
const tooltip = tooltipVisible && pieTooltip;
|
|
139
|
+
const options = { legend, series, tooltip };
|
|
140
|
+
return options;
|
|
141
|
+
};
|
|
142
|
+
const ring = (columns, rows, settings, extra) => pie(columns, rows, settings, extra, true);
|
|
143
|
+
export {
|
|
144
|
+
pie,
|
|
145
|
+
ring
|
|
146
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
|
+
import { isNull } from "../common/type";
|
|
5
|
+
const getRadarLegend = (rows, dimension, legendName) => {
|
|
6
|
+
let legendData = rows.map((row) => row[dimension]).filter((i) => i);
|
|
7
|
+
function formatter(name) {
|
|
8
|
+
return isNull(legendName[name]) ? name : legendName[name];
|
|
9
|
+
}
|
|
10
|
+
return { data: legendData, formatter };
|
|
11
|
+
};
|
|
12
|
+
const getRadarTooltip = (dataType, radar2, digit) => {
|
|
13
|
+
const { typeTemp = [], nameTemp = [] } = {};
|
|
14
|
+
radar2.indicator.forEach((item, i) => {
|
|
15
|
+
typeTemp[i] = dataType[item.name];
|
|
16
|
+
nameTemp[i] = item.name;
|
|
17
|
+
});
|
|
18
|
+
function formatter(item) {
|
|
19
|
+
const tplt = [];
|
|
20
|
+
tplt.push(itemPoint(item.color));
|
|
21
|
+
tplt.push(`${item.name}<br />`);
|
|
22
|
+
item.data.value.forEach((val, i) => {
|
|
23
|
+
tplt.push(`${itemLabel(nameTemp[i])}`);
|
|
24
|
+
tplt.push(`${itemContent(getFormated(val, typeTemp[i], digit))}<br />`);
|
|
25
|
+
});
|
|
26
|
+
return tplt.join("");
|
|
27
|
+
}
|
|
28
|
+
return { formatter };
|
|
29
|
+
};
|
|
30
|
+
const getRadarSetting = (rows, metrics, labelMap) => {
|
|
31
|
+
const settingBase = {
|
|
32
|
+
indicator: [],
|
|
33
|
+
shape: "circle",
|
|
34
|
+
splitNumber: 5,
|
|
35
|
+
name: { textStyle: { color: "#191919" } },
|
|
36
|
+
splitLine: { lineStyle: { color: "rgba(25,25,25,0.10)" } },
|
|
37
|
+
splitArea: { show: false },
|
|
38
|
+
axisLine: { lineStyle: { color: "rgba(25,25,25,0.10)" } }
|
|
39
|
+
};
|
|
40
|
+
let indicatorTemp = {};
|
|
41
|
+
rows.forEach((items) => {
|
|
42
|
+
metrics.forEach((item) => {
|
|
43
|
+
const key = isNull(labelMap[item]) ? item : labelMap[item];
|
|
44
|
+
if (indicatorTemp[key]) {
|
|
45
|
+
indicatorTemp[key].push(items[item]);
|
|
46
|
+
} else {
|
|
47
|
+
indicatorTemp[key] = [items[item]];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
settingBase.indicator = Object.keys(indicatorTemp).map((key) => ({
|
|
52
|
+
name: key,
|
|
53
|
+
max: Math.max.apply(null, indicatorTemp[key])
|
|
54
|
+
}));
|
|
55
|
+
return settingBase;
|
|
56
|
+
};
|
|
57
|
+
const getRadarSeries = (args) => {
|
|
58
|
+
const { areaStyle, dimension, itemStyle, label, labelMap, lineStyle, metrics, radar: radar2, rows } = args;
|
|
59
|
+
let radarIndexObj = {};
|
|
60
|
+
radar2.indicator.forEach((item, i) => radarIndexObj[item.name] = i);
|
|
61
|
+
const seriesData = rows.map((row) => {
|
|
62
|
+
const serieData = {
|
|
63
|
+
value: [],
|
|
64
|
+
name: row[dimension] || "",
|
|
65
|
+
symbol: "circle",
|
|
66
|
+
symbolSize: 8,
|
|
67
|
+
showSymbol: false,
|
|
68
|
+
emphasis: { itemStyle: { borderColor: "#fff", borderWidth: 2 } }
|
|
69
|
+
};
|
|
70
|
+
Object.keys(row).forEach((key) => {
|
|
71
|
+
if (~metrics.indexOf(key)) {
|
|
72
|
+
let k = isNull(labelMap[key]) ? radarIndexObj[key] : radarIndexObj[labelMap[key]];
|
|
73
|
+
serieData.value[k] = row[key];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return serieData;
|
|
77
|
+
});
|
|
78
|
+
const result = { data: seriesData, name: dimension, type: "radar", areaStyle: { normal: { opacity: 0.3 } } };
|
|
79
|
+
label && (result.label = label);
|
|
80
|
+
itemStyle && (result.itemStyle = itemStyle);
|
|
81
|
+
lineStyle && (result.lineStyle = lineStyle);
|
|
82
|
+
areaStyle && (result.areaStyle = areaStyle);
|
|
83
|
+
return [result];
|
|
84
|
+
};
|
|
85
|
+
const radar = (columns, rows, settings, extra) => {
|
|
86
|
+
const { dataType = {}, legendName = {}, labelMap = {}, dimension = columns[0] } = settings;
|
|
87
|
+
const { digit = 2, label, itemStyle, lineStyle, areaStyle } = settings;
|
|
88
|
+
const { tooltipVisible, legendVisible } = extra;
|
|
89
|
+
let metrics = columns.slice();
|
|
90
|
+
if (!settings.metrics) {
|
|
91
|
+
metrics.splice(columns.indexOf(dimension), 1);
|
|
92
|
+
} else {
|
|
93
|
+
metrics = settings.metrics;
|
|
94
|
+
}
|
|
95
|
+
const legend = legendVisible && getRadarLegend(rows, dimension, legendName);
|
|
96
|
+
const radar2 = getRadarSetting(rows, metrics, labelMap);
|
|
97
|
+
const tooltip = tooltipVisible && getRadarTooltip(dataType, radar2, digit);
|
|
98
|
+
const serieParams = { rows, dimension, metrics, radar: radar2 };
|
|
99
|
+
Object.assign(serieParams, { label, itemStyle, lineStyle, labelMap, areaStyle });
|
|
100
|
+
const series = getRadarSeries(serieParams);
|
|
101
|
+
return { legend, radar: radar2, series, tooltip };
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
radar
|
|
105
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../chunk-G2ADBYYC.js";
|
|
5
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
6
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
7
|
+
import { isNull } from "../common/type";
|
|
8
|
+
const getTooltip = (args) => {
|
|
9
|
+
const { digit, itemDataType, linksDataType } = args;
|
|
10
|
+
const formatter = function(item) {
|
|
11
|
+
const { name, data, value, color } = item;
|
|
12
|
+
const tplt = [];
|
|
13
|
+
color && tplt.push(itemPoint(color));
|
|
14
|
+
tplt.push(itemLabel(`${name}`));
|
|
15
|
+
if (!data || !data.source) {
|
|
16
|
+
tplt.push(`${itemContent(getFormated(value, itemDataType, digit))}<br />`);
|
|
17
|
+
} else {
|
|
18
|
+
tplt.push(`${itemContent(getFormated(value, linksDataType, digit))}<br />`);
|
|
19
|
+
}
|
|
20
|
+
return tplt.join("");
|
|
21
|
+
};
|
|
22
|
+
return { trigger: "item", formatter };
|
|
23
|
+
};
|
|
24
|
+
const getSeries = (args) => {
|
|
25
|
+
const { dimension, itemStyle, label, lineStyle, links, metrics, rows, useDataValue, valueFull } = args;
|
|
26
|
+
const dataMap = {};
|
|
27
|
+
const seriesData = rows.map((row) => {
|
|
28
|
+
dataMap[row[dimension]] = row[metrics];
|
|
29
|
+
return { name: row[dimension], value: row[metrics] };
|
|
30
|
+
});
|
|
31
|
+
let { innerLinks = links, mapHandler = null } = {};
|
|
32
|
+
if (useDataValue) {
|
|
33
|
+
mapHandler = (link) => __spreadProps(__spreadValues({}, link), { value: dataMap[link.target] });
|
|
34
|
+
} else if (!valueFull) {
|
|
35
|
+
mapHandler = (link) => isNull(link.value) ? __spreadProps(__spreadValues({}, link), { value: dataMap[link.target] }) : link;
|
|
36
|
+
}
|
|
37
|
+
if (mapHandler) {
|
|
38
|
+
innerLinks = links.map(mapHandler);
|
|
39
|
+
}
|
|
40
|
+
let result = { type: "sankey", data: seriesData, links: innerLinks, focusNodeAdjacency: "allEdges", nodeWidth: 12 };
|
|
41
|
+
result = Object.assign(result, { itemStyle: { opacity: 0.2 }, lineStyle: { opacity: 0.05 } });
|
|
42
|
+
let total = 0;
|
|
43
|
+
seriesData.forEach((item) => {
|
|
44
|
+
const isExist = innerLinks.some((data) => data.target === item.name);
|
|
45
|
+
if (!isExist) {
|
|
46
|
+
total += item.value;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const defaultLabel = {
|
|
50
|
+
backgroundColor: "transparent",
|
|
51
|
+
lineHeight: 16,
|
|
52
|
+
formatter(item) {
|
|
53
|
+
return `{name|${item.name}}
|
|
54
|
+
{value|${Number(item.value / total).toFixed(2) * 100}%}`;
|
|
55
|
+
},
|
|
56
|
+
rich: { name: { color: "#4e4e4e" }, value: { color: "#818181", padding: [4, 0, 0, 0] } }
|
|
57
|
+
};
|
|
58
|
+
result.label = Object.assign(defaultLabel, label || {});
|
|
59
|
+
result.lineStyle = __spreadValues({
|
|
60
|
+
color: "source",
|
|
61
|
+
opacity: 0.5
|
|
62
|
+
}, lineStyle || {});
|
|
63
|
+
result.itemStyle = __spreadValues({ borderWidth: 0 }, itemStyle);
|
|
64
|
+
return [result];
|
|
65
|
+
};
|
|
66
|
+
const sankey = (columns, rows, settings) => {
|
|
67
|
+
const { dataType = ["normal", "normal"], dimension = columns[0], digit = 2, label } = settings;
|
|
68
|
+
const { links, lineStyle, itemStyle, metrics = columns[1], useDataValue = false, valueFull = false } = settings;
|
|
69
|
+
if (!links) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const { itemDataType = dataType[0], linksDataType = dataType[1] } = {};
|
|
73
|
+
const tooltip = getTooltip({ itemDataType, linksDataType, digit });
|
|
74
|
+
const seriesParams = { rows, dimension, metrics, links, valueFull, useDataValue, label, itemStyle, lineStyle };
|
|
75
|
+
const series = getSeries(seriesParams);
|
|
76
|
+
return { tooltip, series };
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
sankey
|
|
80
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../chunk-G2ADBYYC.js";
|
|
4
|
+
import { getFormated, hexToRgb } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
|
+
import { line } from "../chart-line";
|
|
7
|
+
import { isNull } from "../common/type";
|
|
8
|
+
const getScatterLegend = (dataLabels, legendName) => {
|
|
9
|
+
function formatter(name) {
|
|
10
|
+
return isNull(legendName[name]) ? name : legendName[name];
|
|
11
|
+
}
|
|
12
|
+
return { data: dataLabels, formatter, itemStyle: { borderWidth: 1 } };
|
|
13
|
+
};
|
|
14
|
+
const getTooltipContent = (item, args) => {
|
|
15
|
+
const { labelMap, columns } = args;
|
|
16
|
+
const { dataType, digit } = args;
|
|
17
|
+
const template = [];
|
|
18
|
+
const { color, seriesName, data } = item;
|
|
19
|
+
const { value } = data;
|
|
20
|
+
template.push(`${itemPoint(color)} ${seriesName}<br>`);
|
|
21
|
+
value.forEach((d, i) => {
|
|
22
|
+
const name = labelMap[columns[i]] || columns[i];
|
|
23
|
+
const num = isNaN(d) ? d : getFormated(d, dataType[columns[i]], digit);
|
|
24
|
+
template.push(`${itemLabel(name)}${itemContent(num)}<br>`);
|
|
25
|
+
});
|
|
26
|
+
return template.join("");
|
|
27
|
+
};
|
|
28
|
+
const getScatterTooltip = (args) => {
|
|
29
|
+
const { tooltipTrigger } = args;
|
|
30
|
+
function formatter(item) {
|
|
31
|
+
return Array.isArray(item) ? item.map((i) => getTooltipContent(i, args)).join("") : getTooltipContent(item, args);
|
|
32
|
+
}
|
|
33
|
+
return { trigger: tooltipTrigger, formatter };
|
|
34
|
+
};
|
|
35
|
+
const getScatterXAxis = (args) => {
|
|
36
|
+
const { rows, dataLabels, dimension } = args;
|
|
37
|
+
const { xAxisName, axisVisible, xAxisType } = args;
|
|
38
|
+
const data = [];
|
|
39
|
+
dataLabels.forEach((dataLabel) => {
|
|
40
|
+
const items = rows[dataLabel];
|
|
41
|
+
items.forEach((item) => {
|
|
42
|
+
const name = item[dimension];
|
|
43
|
+
name && !~data.indexOf(name) && data.push(name);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
return [
|
|
47
|
+
{
|
|
48
|
+
type: xAxisType,
|
|
49
|
+
show: axisVisible,
|
|
50
|
+
name: xAxisName,
|
|
51
|
+
data,
|
|
52
|
+
offset: 5,
|
|
53
|
+
axisLabel: { show: true, color: "#4E4E4E" }
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
};
|
|
57
|
+
const getScatterYAxis = (args) => {
|
|
58
|
+
const { axisVisible, dataType, digit, min } = args;
|
|
59
|
+
const { metrics, max, scale, yAxisName } = args;
|
|
60
|
+
function formatter(val) {
|
|
61
|
+
return getFormated(val, dataType[metrics[0]], digit);
|
|
62
|
+
}
|
|
63
|
+
let result = { type: "value", show: axisVisible, scale, min, max };
|
|
64
|
+
Object.assign(result, {
|
|
65
|
+
axisTick: { show: false },
|
|
66
|
+
name: yAxisName,
|
|
67
|
+
offset: 10,
|
|
68
|
+
axisLabel: { show: true, formatter, color: "#4E4E4E" },
|
|
69
|
+
splitLine: { show: true, lineStyle: { color: "rgba(25,25,25,0.10)" } }
|
|
70
|
+
});
|
|
71
|
+
return result;
|
|
72
|
+
};
|
|
73
|
+
const getScatterSeries = (args) => {
|
|
74
|
+
const { columns, cursor, dataLabels, dimension, itemStyle, label, metrics, color } = args;
|
|
75
|
+
const { rows, symbol, symbolRotate, symbolSize, symbolSizeMax, symbolOffset } = args;
|
|
76
|
+
const extraMetrics = columns.filter((column) => !~metrics.indexOf(column) && column !== dimension);
|
|
77
|
+
const numbers = [];
|
|
78
|
+
dataLabels.forEach((dataLabel) => rows[dataLabel].forEach((row) => numbers.push(row[metrics[1]])));
|
|
79
|
+
const { maxNum = Math.max(...numbers), series = [] } = {};
|
|
80
|
+
dataLabels.forEach((dataLabel, index) => {
|
|
81
|
+
const { result = [], itemData = rows[dataLabel] } = {};
|
|
82
|
+
itemData.forEach((item) => {
|
|
83
|
+
const itemResult = { value: [] };
|
|
84
|
+
itemResult.value.push(item[dimension], item[metrics[0]], item[metrics[1]]);
|
|
85
|
+
extraMetrics.forEach((ext) => itemResult.value.push(item[ext]));
|
|
86
|
+
itemResult.symbolSize = symbolSize || item[metrics[1]] / maxNum * symbolSizeMax;
|
|
87
|
+
result.push(itemResult);
|
|
88
|
+
});
|
|
89
|
+
const serie = {
|
|
90
|
+
type: "scatter",
|
|
91
|
+
data: result,
|
|
92
|
+
name: dataLabel,
|
|
93
|
+
label,
|
|
94
|
+
itemStyle: __spreadValues({
|
|
95
|
+
borderWidth: 1,
|
|
96
|
+
borderColor: color[index],
|
|
97
|
+
color: `rgba(${hexToRgb(color[index])}, 0.3)`
|
|
98
|
+
}, itemStyle || {})
|
|
99
|
+
};
|
|
100
|
+
Object.assign(serie, { symbol, symbolRotate, symbolOffset, cursor });
|
|
101
|
+
series.push(serie);
|
|
102
|
+
});
|
|
103
|
+
return series;
|
|
104
|
+
};
|
|
105
|
+
const getSeries = (args) => {
|
|
106
|
+
const { cursor, label, tooltip, itemStyle, symbolSizeMax } = args;
|
|
107
|
+
const { series, color, symbol, symbolSize, symbolRotate, symbolOffset } = args;
|
|
108
|
+
series.forEach((item, index) => {
|
|
109
|
+
const itemBase = { type: "scatter", symbol };
|
|
110
|
+
const numbers = [];
|
|
111
|
+
const data = item.data;
|
|
112
|
+
data.forEach((row) => numbers.push(row[1]));
|
|
113
|
+
const maxNum = Math.max(...numbers);
|
|
114
|
+
item.data = data.map((item2) => ({
|
|
115
|
+
value: item2,
|
|
116
|
+
symbolSize: symbolSize || item2[1] / maxNum * symbolSizeMax
|
|
117
|
+
}));
|
|
118
|
+
Object.assign(itemBase, {
|
|
119
|
+
symbolRotate,
|
|
120
|
+
symbolOffset,
|
|
121
|
+
cursor,
|
|
122
|
+
label,
|
|
123
|
+
tooltip,
|
|
124
|
+
itemStyle: __spreadValues({
|
|
125
|
+
borderWidth: 1,
|
|
126
|
+
borderColor: color[index],
|
|
127
|
+
color: `rgba(${hexToRgb(color[index])}, 0.3)`
|
|
128
|
+
}, itemStyle || {}),
|
|
129
|
+
emphasis: { itemStyle: { borderWidth: 1, borderColor: color[index] } }
|
|
130
|
+
});
|
|
131
|
+
Object.assign(item, itemBase);
|
|
132
|
+
});
|
|
133
|
+
return series;
|
|
134
|
+
};
|
|
135
|
+
const scatter = (columns, rows, settings, extra) => {
|
|
136
|
+
const { dimension = columns[0], metrics = [columns[1], columns[2]], dataType = {} } = settings;
|
|
137
|
+
const { xAxisType = "category", xAxisName, yAxisName, digit = 2, legendName = {} } = settings;
|
|
138
|
+
const { labelMap = {}, tooltipTrigger = "item", axisVisible = true, symbolSizeMax = 50, symbol } = settings;
|
|
139
|
+
const { symbolSize, symbolRotate, symbolOffset, cursor, min, max, scale, label, itemStyle } = settings;
|
|
140
|
+
const { tooltipVisible, legendVisible, color } = extra;
|
|
141
|
+
const tooltip = tooltipVisible && getScatterTooltip({ tooltipTrigger, labelMap, columns, dataType, digit });
|
|
142
|
+
if (Array.isArray(rows)) {
|
|
143
|
+
const lineSettings = __spreadValues(__spreadValues({}, settings), {
|
|
144
|
+
yAxisName: yAxisName ? [yAxisName] : void 0,
|
|
145
|
+
xAxisName: xAxisName ? [xAxisName] : void 0,
|
|
146
|
+
dimension: dimension ? [dimension] : void 0,
|
|
147
|
+
max: max ? [max] : void 0,
|
|
148
|
+
min: min ? [min] : void 0,
|
|
149
|
+
scale: scale ? [scale] : void 0
|
|
150
|
+
});
|
|
151
|
+
const options = line(columns, rows, lineSettings, extra);
|
|
152
|
+
if (!options || !options.series) {
|
|
153
|
+
return {};
|
|
154
|
+
}
|
|
155
|
+
const baseObj = { color, symbol, symbolSize, symbolRotate, symbolOffset, cursor, label, itemStyle, symbolSizeMax };
|
|
156
|
+
options.series = getSeries(__spreadValues({ tooltip, series: options.series }, baseObj));
|
|
157
|
+
options.legend = __spreadValues({ itemStyle: { borderWidth: 1 } }, options.legend || {});
|
|
158
|
+
return options;
|
|
159
|
+
}
|
|
160
|
+
const dataLabels = Object.keys(rows);
|
|
161
|
+
const legend = legendVisible && getScatterLegend(dataLabels, legendName);
|
|
162
|
+
const xAxisParam = { xAxisName, axisVisible, xAxisType, dataLabels, dimension, rows };
|
|
163
|
+
const xAxis = getScatterXAxis(xAxisParam);
|
|
164
|
+
const yAxisParam = { min, max, scale, yAxisName, dataType, metrics, digit, axisVisible };
|
|
165
|
+
const yAxis = getScatterYAxis(yAxisParam);
|
|
166
|
+
const seriesParam = { rows, dataLabels, columns, metrics, dimension, label, itemStyle, symbol };
|
|
167
|
+
Object.assign(seriesParam, { symbolSizeMax, symbolSize, symbolRotate, symbolOffset, cursor, color });
|
|
168
|
+
const series = getScatterSeries(seriesParam);
|
|
169
|
+
return { legend, tooltip, xAxis, yAxis, series };
|
|
170
|
+
};
|
|
171
|
+
export {
|
|
172
|
+
scatter
|
|
173
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
3
|
+
const getTooltip = () => ({
|
|
4
|
+
trigger: "item",
|
|
5
|
+
formatter(item) {
|
|
6
|
+
const tpl = [];
|
|
7
|
+
const { name, value, color } = item;
|
|
8
|
+
if (name) {
|
|
9
|
+
color && tpl.push(itemPoint(color));
|
|
10
|
+
tpl.push(`${itemLabel("label")}${itemContent(name)}`);
|
|
11
|
+
tpl.push("<br>");
|
|
12
|
+
}
|
|
13
|
+
color && tpl.push(itemPoint(color));
|
|
14
|
+
tpl.push(`${itemLabel("sum")}${itemContent(value)}`);
|
|
15
|
+
return tpl.join("");
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const sunburst = (columns, rows, settings, extra) => {
|
|
19
|
+
const defaultItemStyle = { borderWidth: 2 };
|
|
20
|
+
const series = { type: "sunburst", itemStyle: defaultItemStyle };
|
|
21
|
+
const { tooltipVisible } = extra;
|
|
22
|
+
const tooltip = tooltipVisible && getTooltip({});
|
|
23
|
+
let options = { series, tooltip };
|
|
24
|
+
return options;
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
sunburst
|
|
28
|
+
};
|