@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,65 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { isObject } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemLabel, itemContent, SAAS_DEFAULT_COLORS } from "../chart-core/deps/constants";
|
|
4
|
+
const getTreeLegend = (args) => {
|
|
5
|
+
const { dimension, rows } = args;
|
|
6
|
+
const result = rows.map((row) => row[dimension]);
|
|
7
|
+
return { data: result };
|
|
8
|
+
};
|
|
9
|
+
const getTreeTooltip = (args) => {
|
|
10
|
+
const { tooltipFormatter } = args;
|
|
11
|
+
return {
|
|
12
|
+
trigger: "item",
|
|
13
|
+
triggerOn: "mousemove",
|
|
14
|
+
formatter(item) {
|
|
15
|
+
if (tooltipFormatter) {
|
|
16
|
+
return tooltipFormatter.apply(null, arguments);
|
|
17
|
+
}
|
|
18
|
+
let template = [];
|
|
19
|
+
const { treeAncestors, value } = item;
|
|
20
|
+
let names = [];
|
|
21
|
+
treeAncestors.forEach((ancestor, idx) => {
|
|
22
|
+
idx && names.push(ancestor.name);
|
|
23
|
+
});
|
|
24
|
+
template.push(`${itemLabel(names.join("."))}`);
|
|
25
|
+
template.push(`${itemContent(value)}`);
|
|
26
|
+
return template.join("");
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const getTreeSeries = (args) => {
|
|
31
|
+
const { dimension, metrics, rows, seriesMap } = args;
|
|
32
|
+
const series = [];
|
|
33
|
+
rows.forEach((row) => {
|
|
34
|
+
const seriesItem = seriesMap[row[dimension]];
|
|
35
|
+
const label = { position: "right", fontSize: 12, color: "#191919" };
|
|
36
|
+
const itemStyle = { color: SAAS_DEFAULT_COLORS[0] };
|
|
37
|
+
const lineStyle = { color: "rgba(25 ,25 ,25 , 0.10)" };
|
|
38
|
+
const symbolSize = 16;
|
|
39
|
+
const result = { type: "tree", name: row[dimension], data: row[metrics], itemStyle, label, lineStyle, symbolSize };
|
|
40
|
+
if (seriesItem) {
|
|
41
|
+
Object.keys(seriesItem).forEach((key) => {
|
|
42
|
+
if (!isObject(result[key])) {
|
|
43
|
+
result[key] = seriesItem[key];
|
|
44
|
+
} else {
|
|
45
|
+
Object.assign(result[key], seriesItem[key]);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
series.push(result);
|
|
50
|
+
});
|
|
51
|
+
return series;
|
|
52
|
+
};
|
|
53
|
+
const tree = (columns, rows, settings, extra) => {
|
|
54
|
+
const { dimension = columns[0], metrics = columns[1], seriesMap = {} } = settings;
|
|
55
|
+
const { legendVisible, tooltipFormatter, tooltipVisible } = extra;
|
|
56
|
+
const seriesParam = { dimension, metrics, rows, seriesMap };
|
|
57
|
+
const series = getTreeSeries(seriesParam);
|
|
58
|
+
const legendParam = { dimension, rows };
|
|
59
|
+
const legend = legendVisible && rows.length > 1 && getTreeLegend(legendParam);
|
|
60
|
+
const tooltip = tooltipVisible && getTreeTooltip({ tooltipFormatter });
|
|
61
|
+
return { series, legend, tooltip };
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
tree
|
|
65
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../chunk-G2ADBYYC.js";
|
|
5
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
|
+
import { itemLabel, itemContent, SAAS_DEFAULT_COLORS } from "../chart-core/deps/constants";
|
|
8
|
+
const getWaterfallTooltip = (dataType, digit) => {
|
|
9
|
+
let trigger = "axis";
|
|
10
|
+
let axisPointer = { type: "shadow", z: 1, shadowStyle: { color: "#f5f5f5" } };
|
|
11
|
+
let formatter = function(items) {
|
|
12
|
+
const item = items[1];
|
|
13
|
+
return [
|
|
14
|
+
`${itemContent(item.name)}<br/>${itemLabel(item.seriesName)}`,
|
|
15
|
+
`${itemContent(getFormated(item.value, dataType, digit))}`
|
|
16
|
+
].join("");
|
|
17
|
+
};
|
|
18
|
+
return { trigger, axisPointer, formatter };
|
|
19
|
+
};
|
|
20
|
+
const getWaterfallXAxis = (args) => {
|
|
21
|
+
const { axisVisible, dimension, labelMap, remainName, remainStatus, rows, totalName, xAxisName } = args;
|
|
22
|
+
let xAxisData = [totalName].concat(rows.map((row) => row[dimension]));
|
|
23
|
+
remainStatus === "have-remain" && (xAxisData = xAxisData.concat([remainName]));
|
|
24
|
+
let name = labelMap && labelMap[xAxisName] || xAxisName;
|
|
25
|
+
const xAxis = { type: "category", name, splitLine: { show: false }, data: xAxisData, show: axisVisible };
|
|
26
|
+
const axisLine = { show: true, lineStyle: { color: "#191919", opacity: 0.1, width: 2 } };
|
|
27
|
+
return __spreadProps(__spreadValues({}, xAxis), {
|
|
28
|
+
axisLine
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const getWaterfallYAxis = (args) => {
|
|
32
|
+
const { axisVisible, dataType, digit, labelMap, yAxisName } = args;
|
|
33
|
+
let name = !isNull(labelMap[yAxisName]) ? labelMap[yAxisName] : yAxisName;
|
|
34
|
+
let formatter = function(val) {
|
|
35
|
+
return getFormated(val, dataType, digit);
|
|
36
|
+
};
|
|
37
|
+
return { type: "value", name, axisTick: { show: false }, axisLabel: { formatter }, show: axisVisible };
|
|
38
|
+
};
|
|
39
|
+
const getWaterfallSeries = (args) => {
|
|
40
|
+
const { dataSum, dataType, digit, metrics, remainStatus, rows, t, totalNum } = args;
|
|
41
|
+
const seriesBase = { type: "bar", stack: t("ui.chart.summation") };
|
|
42
|
+
let { dataSumTemp = dataSum, totalNumTemp = totalNum, assistData, mainData } = {};
|
|
43
|
+
const rowData = rows.map((row) => row[metrics]);
|
|
44
|
+
if (remainStatus === "have-remain") {
|
|
45
|
+
assistData = [0].concat(rows.map((row) => totalNumTemp -= row[metrics])).concat([0]);
|
|
46
|
+
mainData = [totalNum].concat(rowData).concat([totalNum - dataSum]);
|
|
47
|
+
} else {
|
|
48
|
+
assistData = [0].concat(rows.map((row) => dataSumTemp -= row[metrics]));
|
|
49
|
+
mainData = [dataSum].concat(rowData);
|
|
50
|
+
}
|
|
51
|
+
const series = [];
|
|
52
|
+
let seriesAdv = {
|
|
53
|
+
name: t("ui.chart.auxiliary"),
|
|
54
|
+
itemStyle: { opacity: 0 },
|
|
55
|
+
emphasis: { itemStyle: { opacity: 0 } },
|
|
56
|
+
data: assistData
|
|
57
|
+
};
|
|
58
|
+
series.push(Object.assign(seriesAdv, seriesBase));
|
|
59
|
+
let formatter = function(item) {
|
|
60
|
+
return getFormated(item.value, dataType, digit);
|
|
61
|
+
};
|
|
62
|
+
seriesAdv = {
|
|
63
|
+
name: t("ui.chart.value"),
|
|
64
|
+
label: { show: true, position: "top", formatter },
|
|
65
|
+
data: mainData
|
|
66
|
+
};
|
|
67
|
+
series.push(
|
|
68
|
+
Object.assign(seriesAdv, __spreadProps(__spreadValues({}, seriesBase), {
|
|
69
|
+
itemStyle: { borderRadius: [4, 4, 0, 0] },
|
|
70
|
+
color: SAAS_DEFAULT_COLORS[0]
|
|
71
|
+
}))
|
|
72
|
+
);
|
|
73
|
+
return series;
|
|
74
|
+
};
|
|
75
|
+
const getWaterfallRemainStatus = (dataSum, totalNum) => !totalNum ? "not-total" : totalNum <= dataSum ? "none-remain" : "have-remain";
|
|
76
|
+
const waterfall = (columns, rows, settings, extra) => {
|
|
77
|
+
const { tooltipVisible, t } = extra;
|
|
78
|
+
const { axisVisible = true, dataType = "normal", dimension = columns[0] } = settings;
|
|
79
|
+
const { remainName = t("ui.chart.other"), totalName = t("ui.chart.total") } = settings;
|
|
80
|
+
const { totalNum, xAxisName = dimension, digit = 2, labelMap = {} } = settings;
|
|
81
|
+
let metricsTemp = columns.slice();
|
|
82
|
+
metricsTemp.splice(metricsTemp.indexOf(dimension), 1);
|
|
83
|
+
const { metrics = metricsTemp[0], yAxisName = metrics } = {};
|
|
84
|
+
const tooltip = tooltipVisible && getWaterfallTooltip(dataType, digit);
|
|
85
|
+
const dataSum = parseFloat(rows.reduce((pre, cur) => pre + Number(cur[metrics]), 0).toFixed(digit));
|
|
86
|
+
const remainStatus = getWaterfallRemainStatus(dataSum, totalNum);
|
|
87
|
+
const xAxisParams = { dimension, rows, remainStatus, totalName };
|
|
88
|
+
Object.assign(xAxisParams, { remainName, xAxisName, labelMap, axisVisible });
|
|
89
|
+
const xAxis = getWaterfallXAxis(xAxisParams);
|
|
90
|
+
const yAxisParams = { dataType, yAxisName, axisVisible, digit, labelMap };
|
|
91
|
+
const yAxis = getWaterfallYAxis(yAxisParams);
|
|
92
|
+
const seriesParams = { dataType, rows, dimension, metrics };
|
|
93
|
+
Object.assign(seriesParams, { totalNum, remainStatus, dataSum, digit, t });
|
|
94
|
+
const series = getWaterfallSeries(seriesParams);
|
|
95
|
+
return { series, tooltip, xAxis, yAxis };
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
waterfall
|
|
99
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { random } from "../common/string";
|
|
3
|
+
import { itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
|
+
const isArr = Array.isArray;
|
|
5
|
+
const getSeries = (args) => {
|
|
6
|
+
const { color, dimension, metrics, rows, shape, sizeMax, sizeMin } = args;
|
|
7
|
+
let normalColor;
|
|
8
|
+
if (!isArr(color) && !!color) {
|
|
9
|
+
normalColor = color;
|
|
10
|
+
} else {
|
|
11
|
+
normalColor = () => {
|
|
12
|
+
const rgb = [Math.round(random() * 160), Math.round(random() * 160), Math.round(random() * 160)].join(",");
|
|
13
|
+
return "rgb(" + rgb + ")";
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
let textStyle = { normal: { color: normalColor }, color: normalColor };
|
|
17
|
+
const baseType = { type: "wordCloud", textStyle, shape, sizeRange: [sizeMin, sizeMax] };
|
|
18
|
+
const len = isArr(color) ? color.length : 0;
|
|
19
|
+
baseType.data = rows.slice().map((row, i) => {
|
|
20
|
+
const text = { name: row[dimension], value: row[metrics] };
|
|
21
|
+
if (len > 0) {
|
|
22
|
+
let wordColor = color[i % len];
|
|
23
|
+
text.textStyle = {
|
|
24
|
+
normal: {
|
|
25
|
+
color: wordColor
|
|
26
|
+
},
|
|
27
|
+
color: wordColor
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return text;
|
|
31
|
+
});
|
|
32
|
+
Object.assign(baseType, { rotationRange: [0, 0], gridSize: 10 });
|
|
33
|
+
return [baseType];
|
|
34
|
+
};
|
|
35
|
+
const getTooltip = (args) => {
|
|
36
|
+
const { tooltipFormatter } = args;
|
|
37
|
+
function formatter(params) {
|
|
38
|
+
const { data } = params;
|
|
39
|
+
const { name, value } = data;
|
|
40
|
+
if (tooltipFormatter) {
|
|
41
|
+
return tooltipFormatter.apply(null, params);
|
|
42
|
+
}
|
|
43
|
+
return `${itemLabel(name)}${itemContent(value)}`;
|
|
44
|
+
}
|
|
45
|
+
return { show: true, formatter };
|
|
46
|
+
};
|
|
47
|
+
const shapeSquare = (theta) => Math.min(1 / Math.abs(Math.cos(theta)), 1 / Math.abs(Math.sin(theta)));
|
|
48
|
+
const wordcloud = (columns, rows, settings, extra) => {
|
|
49
|
+
const { dimension = columns[0], metrics = columns[1], color = "" } = settings;
|
|
50
|
+
const { sizeMax = 60, sizeMin = 12, shape } = settings;
|
|
51
|
+
const { tooltipVisible, tooltipFormatter, color: colors } = extra;
|
|
52
|
+
const seriesParams = { dimension, metrics, rows, sizeMax, sizeMin };
|
|
53
|
+
Object.assign(seriesParams, { color: color || colors, shape: shape || shapeSquare });
|
|
54
|
+
const series = getSeries(seriesParams);
|
|
55
|
+
const tooltip = tooltipVisible && getTooltip({ tooltipFormatter });
|
|
56
|
+
return { series, tooltip };
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
wordcloud
|
|
60
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { isNull } from "../common/type";
|
|
3
|
+
const addToStore = ({ state, props }) => () => {
|
|
4
|
+
if (Array.isArray(state.model) && !state.model.includes(props.label)) {
|
|
5
|
+
state.model.push(props.label);
|
|
6
|
+
} else {
|
|
7
|
+
state.model = props.trueLabel || true;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const removeFromStore = ({ state, props }) => () => {
|
|
11
|
+
if (Array.isArray(state.model)) {
|
|
12
|
+
const index = state.model.indexOf(props.label);
|
|
13
|
+
index !== -1 && state.model.splice(index, 1);
|
|
14
|
+
} else {
|
|
15
|
+
state.model = props.falseLabel !== void 0 && props.falseLabel;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const handleChange = ({
|
|
19
|
+
state,
|
|
20
|
+
props,
|
|
21
|
+
emit,
|
|
22
|
+
nextTick,
|
|
23
|
+
dispatch,
|
|
24
|
+
constants
|
|
25
|
+
}) => (event) => {
|
|
26
|
+
if (state.isLimitExceeded) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let moduleValue;
|
|
30
|
+
const { trueLabel, falseLabel } = props;
|
|
31
|
+
if (event.target.checked) {
|
|
32
|
+
moduleValue = trueLabel === void 0 ? true : trueLabel;
|
|
33
|
+
} else {
|
|
34
|
+
moduleValue = falseLabel === void 0 ? false : falseLabel;
|
|
35
|
+
}
|
|
36
|
+
emit("change", moduleValue, event);
|
|
37
|
+
nextTick(() => {
|
|
38
|
+
state.isGroup && dispatch(constants.CHECKBOX_GROUP, "change", [state.checkboxGroup.modelValue]);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const computedGetModelGet = ({ state, props }) => () => {
|
|
42
|
+
const model = state.isGroup ? state.store : props.modelValue !== void 0 ? props.modelValue : state.selfModel;
|
|
43
|
+
return isNull(model) ? state.isGroup ? [] : "" : model;
|
|
44
|
+
};
|
|
45
|
+
const computedGetModelSet = ({
|
|
46
|
+
state,
|
|
47
|
+
dispatch,
|
|
48
|
+
emit,
|
|
49
|
+
constants
|
|
50
|
+
}) => (value) => {
|
|
51
|
+
if (state.isGroup) {
|
|
52
|
+
state.isLimitExceeded = false;
|
|
53
|
+
state.checkboxGroup.min !== void 0 && value.length < state.checkboxGroup.min && (state.isLimitExceeded = true);
|
|
54
|
+
state.checkboxGroup.max !== void 0 && value.length > state.checkboxGroup.max && (state.isLimitExceeded = true);
|
|
55
|
+
state.isLimitExceeded === false && dispatch(constants.CHECKBOX_GROUP, "update:modelValue", [value]);
|
|
56
|
+
} else {
|
|
57
|
+
emit("update:modelValue", value);
|
|
58
|
+
state.selfModel = value;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const computedIsChecked = ({ state, props }) => () => {
|
|
62
|
+
if (typeof state.model === "boolean") {
|
|
63
|
+
return state.model;
|
|
64
|
+
} else if (Array.isArray(state.model)) {
|
|
65
|
+
return state.model.includes(props.label);
|
|
66
|
+
} else if (!isNull(state.model)) {
|
|
67
|
+
return state.model === props.trueLabel;
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
};
|
|
71
|
+
const computedIsGroup = ({ state, parent, constants }) => () => {
|
|
72
|
+
let parentObj = parent.$parent;
|
|
73
|
+
while (parentObj) {
|
|
74
|
+
if (parentObj.$options.componentName !== constants.CHECKBOX_GROUP) {
|
|
75
|
+
parentObj = parentObj.$parent;
|
|
76
|
+
} else {
|
|
77
|
+
state.checkboxGroup = parentObj;
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
};
|
|
83
|
+
const computedStore = ({ state, props }) => () => state.checkboxGroup ? state.checkboxGroup.modelValue : props.modelValue;
|
|
84
|
+
const computedIsLimitDisabled = (state) => () => {
|
|
85
|
+
const { max, min } = state.checkboxGroup;
|
|
86
|
+
return !!(max || min) && state.model.length >= max && !state.isChecked || state.model.length <= min && state.isChecked;
|
|
87
|
+
};
|
|
88
|
+
const computedIsDisabled = ({ state, props }) => () => (state.isGroup ? state.checkboxGroup.disabled || state.checkboxGroup.displayOnly || props.disabled || props.displayOnly || state.isLimitDisabled : props.disabled) || state.formDisabled;
|
|
89
|
+
const computedFormItemSize = (props) => () => (props.formItem || {}).formItemSize;
|
|
90
|
+
const computedCheckboxSize = ({ state, props, formItemSize }) => () => {
|
|
91
|
+
const tempCheckboxSize = props.size || formItemSize.value;
|
|
92
|
+
return state.isGroup ? state.checkboxGroup.state.checkboxGroupSize || tempCheckboxSize : tempCheckboxSize;
|
|
93
|
+
};
|
|
94
|
+
const mounted = ({ props, emit, api, parent }) => () => {
|
|
95
|
+
props.checked && api.addToStore();
|
|
96
|
+
props.indeterminate && parent.$el.setAttribute("aria-controls", props.controls);
|
|
97
|
+
emit("complete", true);
|
|
98
|
+
};
|
|
99
|
+
const toggleEvent = ({
|
|
100
|
+
parent,
|
|
101
|
+
props,
|
|
102
|
+
type
|
|
103
|
+
}) => {
|
|
104
|
+
const inputEl = parent.$el;
|
|
105
|
+
for (let ev in props.events) {
|
|
106
|
+
inputEl[type + "EventListener"](ev, props.events[ev]);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const computedIsDisplayOnly = ({ state, props }) => () => props.displayOnly || state.formDisplayOnly;
|
|
110
|
+
const computedIsGroupDisplayOnly = ({ state }) => () => state.isGroup && (state.checkboxGroup.displayOnly || state.formDisplayOnly);
|
|
111
|
+
const computedDisplayLabel = ({ state, props, t }) => () => {
|
|
112
|
+
state.showLabel = true;
|
|
113
|
+
if (props.trueLabel !== void 0 && props.falseLabel !== void 0) {
|
|
114
|
+
return props.modelValue;
|
|
115
|
+
} else {
|
|
116
|
+
return props.modelValue ? t("yes") : t("no");
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const computedIsShowText = ({ props }) => () => !isNull(props.text) || !isNull(props.label);
|
|
120
|
+
const computedShowText = ({ props }) => () => {
|
|
121
|
+
if (props.text || !isNull(props.text)) {
|
|
122
|
+
return props.text;
|
|
123
|
+
} else {
|
|
124
|
+
return props.label;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
export {
|
|
128
|
+
addToStore,
|
|
129
|
+
computedCheckboxSize,
|
|
130
|
+
computedDisplayLabel,
|
|
131
|
+
computedFormItemSize,
|
|
132
|
+
computedGetModelGet,
|
|
133
|
+
computedGetModelSet,
|
|
134
|
+
computedIsChecked,
|
|
135
|
+
computedIsDisabled,
|
|
136
|
+
computedIsDisplayOnly,
|
|
137
|
+
computedIsGroup,
|
|
138
|
+
computedIsGroupDisplayOnly,
|
|
139
|
+
computedIsLimitDisabled,
|
|
140
|
+
computedIsShowText,
|
|
141
|
+
computedShowText,
|
|
142
|
+
computedStore,
|
|
143
|
+
handleChange,
|
|
144
|
+
mounted,
|
|
145
|
+
removeFromStore,
|
|
146
|
+
toggleEvent
|
|
147
|
+
};
|
package/checkbox/vue.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import {
|
|
3
|
+
addToStore,
|
|
4
|
+
removeFromStore,
|
|
5
|
+
handleChange,
|
|
6
|
+
computedGetModelGet,
|
|
7
|
+
computedGetModelSet,
|
|
8
|
+
computedIsChecked,
|
|
9
|
+
computedIsGroup,
|
|
10
|
+
computedStore,
|
|
11
|
+
computedIsLimitDisabled,
|
|
12
|
+
computedIsDisabled,
|
|
13
|
+
computedIsDisplayOnly,
|
|
14
|
+
computedIsGroupDisplayOnly,
|
|
15
|
+
computedFormItemSize,
|
|
16
|
+
computedCheckboxSize,
|
|
17
|
+
computedDisplayLabel,
|
|
18
|
+
mounted,
|
|
19
|
+
toggleEvent,
|
|
20
|
+
computedIsShowText,
|
|
21
|
+
computedShowText
|
|
22
|
+
} from "./index";
|
|
23
|
+
const api = ["state", "handleChange", "computedStore"];
|
|
24
|
+
const initState = ({ reactive, computed, parent, api: api2, inject, props }) => {
|
|
25
|
+
const state = reactive({
|
|
26
|
+
size: computed(() => props.size || inject("size", null) || (parent.tinyForm || {}).size),
|
|
27
|
+
vertical: inject("vertical", null),
|
|
28
|
+
iconPosition: props.iconPosition || inject("iconPosition", "center"),
|
|
29
|
+
focus: false,
|
|
30
|
+
selfModel: false,
|
|
31
|
+
showLabel: false,
|
|
32
|
+
isLimitExceeded: false,
|
|
33
|
+
checkboxGroup: null,
|
|
34
|
+
store: computed(() => api2.computedStore()),
|
|
35
|
+
isGroup: computed(() => api2.computedIsGroup()),
|
|
36
|
+
isChecked: computed(() => api2.computedIsChecked()),
|
|
37
|
+
isDisabled: computed(() => api2.computedIsDisabled()),
|
|
38
|
+
checkboxSize: computed(() => api2.computedCheckboxSize()),
|
|
39
|
+
isLimitDisabled: computed(() => api2.computedIsLimitDisabled()),
|
|
40
|
+
formDisabled: computed(() => (parent.tinyForm || {}).disabled),
|
|
41
|
+
formDisplayOnly: computed(() => (parent.tinyForm || {}).displayOnly),
|
|
42
|
+
isDisplayOnly: computed(() => api2.computedIsDisplayOnly()),
|
|
43
|
+
isGroupDisplayOnly: computed(() => api2.computedIsGroupDisplayOnly()),
|
|
44
|
+
displayLabel: computed(() => api2.computedDisplayLabel()),
|
|
45
|
+
inputDisabled: computed(() => state.isDisabled || state.isDisplayOnly || state.isGroupDisplayOnly),
|
|
46
|
+
model: computed({
|
|
47
|
+
get: () => api2.computedGetModelGet(),
|
|
48
|
+
set: (value) => api2.computedGetModelSet(value)
|
|
49
|
+
}),
|
|
50
|
+
showText: computed(() => api2.computedShowText()),
|
|
51
|
+
isShowText: computed(() => api2.computedIsShowText()),
|
|
52
|
+
shape: inject("shape", null) || props.shape
|
|
53
|
+
});
|
|
54
|
+
return state;
|
|
55
|
+
};
|
|
56
|
+
const initApi = ({
|
|
57
|
+
api: api2,
|
|
58
|
+
state,
|
|
59
|
+
dispatch,
|
|
60
|
+
props,
|
|
61
|
+
parent,
|
|
62
|
+
constants,
|
|
63
|
+
formItemSize,
|
|
64
|
+
emit,
|
|
65
|
+
nextTick,
|
|
66
|
+
t,
|
|
67
|
+
vm
|
|
68
|
+
}) => {
|
|
69
|
+
Object.assign(api2, {
|
|
70
|
+
state,
|
|
71
|
+
addToStore: addToStore({ state, props }),
|
|
72
|
+
removeFromStore: removeFromStore({ state, props }),
|
|
73
|
+
computedStore: computedStore({ state, props }),
|
|
74
|
+
computedFormItemSize: computedFormItemSize(props),
|
|
75
|
+
computedIsChecked: computedIsChecked({ state, props }),
|
|
76
|
+
computedIsLimitDisabled: computedIsLimitDisabled(state),
|
|
77
|
+
computedIsDisabled: computedIsDisabled({ state, props }),
|
|
78
|
+
computedIsDisplayOnly: computedIsDisplayOnly({ state, props }),
|
|
79
|
+
computedIsGroupDisplayOnly: computedIsGroupDisplayOnly({ state }),
|
|
80
|
+
computedGetModelGet: computedGetModelGet({ state, props }),
|
|
81
|
+
computedIsGroup: computedIsGroup({ state, parent, constants }),
|
|
82
|
+
computedCheckboxSize: computedCheckboxSize({ state, props, formItemSize }),
|
|
83
|
+
computedGetModelSet: computedGetModelSet({ state, dispatch, emit, constants }),
|
|
84
|
+
mounted: mounted({ emit, props, api: api2, parent }),
|
|
85
|
+
handleChange: handleChange({ state, props, emit, nextTick, dispatch, constants }),
|
|
86
|
+
computedDisplayLabel: computedDisplayLabel({ state, props, t }),
|
|
87
|
+
computedIsShowText: computedIsShowText({ props }),
|
|
88
|
+
computedShowText: computedShowText({ props })
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch, inject }, { vm, parent, emit, constants, nextTick, dispatch, t }) => {
|
|
92
|
+
const api2 = { dispatch };
|
|
93
|
+
const formItemSize = computed(() => api2.computedFormItemSize());
|
|
94
|
+
const state = initState({ reactive, computed, parent, api: api2, inject, props });
|
|
95
|
+
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
96
|
+
initApi({ api: api2, state, dispatch, props, parent, constants, formItemSize, emit, nextTick, t, vm });
|
|
97
|
+
watch(
|
|
98
|
+
() => props.modelValue,
|
|
99
|
+
(value) => props.validateEvent && api2.dispatch(constants.FORM_ITEM, constants.FORM_CHANGE, value)
|
|
100
|
+
);
|
|
101
|
+
watch(
|
|
102
|
+
() => props.checked,
|
|
103
|
+
(value) => {
|
|
104
|
+
value ? api2.addToStore() : api2.removeFromStore();
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
onBeforeUnmount(() => {
|
|
108
|
+
toggleEvent({ parent, props, type: "remove" });
|
|
109
|
+
});
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
dispatch("Tooltip", "tooltip-update");
|
|
112
|
+
toggleEvent({ parent, props, type: "add" });
|
|
113
|
+
api2.mounted();
|
|
114
|
+
});
|
|
115
|
+
return api2;
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
api,
|
|
119
|
+
renderless
|
|
120
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
const handleChange = ({ state, props, emit, nextTick, dispatch, constants }) => (event) => {
|
|
3
|
+
if (state.isLimitExceeded) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
let value;
|
|
7
|
+
if (event.target.checked) {
|
|
8
|
+
value = props.trueLabel === void 0 ? true : props.trueLabel;
|
|
9
|
+
} else {
|
|
10
|
+
value = props.falseLabel === void 0 ? false : props.falseLabel;
|
|
11
|
+
}
|
|
12
|
+
emit("change", value, event);
|
|
13
|
+
nextTick(() => {
|
|
14
|
+
if (state.checkboxGroup) {
|
|
15
|
+
dispatch(constants.CHECKBOX_GROUP, "change", [state.checkboxGroup.modelValue]);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const computedGetModelGet = ({ state, props }) => () => state.checkboxGroup ? state.store : props.modelValue !== void 0 ? props.modelValue : state.selfModel;
|
|
20
|
+
const computedGetModelSet = ({ state, props, emit, dispatch, constants }) => (value) => {
|
|
21
|
+
if (state.checkboxGroup) {
|
|
22
|
+
state.isLimitExceeded = false;
|
|
23
|
+
state.checkboxGroup.min !== void 0 && value.length < state.checkboxGroup.min && (state.isLimitExceeded = true);
|
|
24
|
+
state.checkboxGroup.max !== void 0 && value.length > state.checkboxGroup.max && (state.isLimitExceeded = true);
|
|
25
|
+
state.isLimitExceeded === false && dispatch(constants.CHECKBOX_GROUP, "update:modelValue", [value]);
|
|
26
|
+
} else if (props.modelValue !== void 0) {
|
|
27
|
+
emit("update:modelValue", value);
|
|
28
|
+
} else {
|
|
29
|
+
state.selfModel = value;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const computedCheckboxGroup = ({ parent, constants }) => () => {
|
|
33
|
+
let parentObj = parent.$parent;
|
|
34
|
+
while (parentObj) {
|
|
35
|
+
if (parentObj.$options.componentName !== constants.CHECKBOX_GROUP) {
|
|
36
|
+
parentObj = parentObj.$parent;
|
|
37
|
+
} else {
|
|
38
|
+
return parentObj;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
};
|
|
43
|
+
const computedIsDisabled = ({ state, props }) => () => state.checkboxGroup ? state.checkboxGroup.disabled || props.disabled || state.isLimitDisabled : props.disabled;
|
|
44
|
+
const computedActiveStyle = (state) => () => ({
|
|
45
|
+
backgroundColor: state.checkboxGroup.fill || "",
|
|
46
|
+
borderColor: state.checkboxGroup.fill || "",
|
|
47
|
+
color: state.checkboxGroup.textColor || "",
|
|
48
|
+
"box-shadow": "-1px 0 0 0 " + state.checkboxGroup.fill
|
|
49
|
+
});
|
|
50
|
+
const computedFormItemSize = (props) => () => (props.formItem || {}).formItemSize;
|
|
51
|
+
const computedSize = ({ state, formItemSize }) => () => state.checkboxGroup && state.checkboxGroup.state.checkboxGroupSize || formItemSize.value;
|
|
52
|
+
const toggleEvent = ({ parent, props, type }) => {
|
|
53
|
+
const inputEl = parent.$el.querySelector("input");
|
|
54
|
+
Object.keys(props.events).forEach((ev) => {
|
|
55
|
+
inputEl[type + "EventListener"](ev, props.events[ev]);
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
computedActiveStyle,
|
|
60
|
+
computedCheckboxGroup,
|
|
61
|
+
computedFormItemSize,
|
|
62
|
+
computedGetModelGet,
|
|
63
|
+
computedGetModelSet,
|
|
64
|
+
computedIsDisabled,
|
|
65
|
+
computedSize,
|
|
66
|
+
handleChange,
|
|
67
|
+
toggleEvent
|
|
68
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import {
|
|
3
|
+
handleChange,
|
|
4
|
+
computedGetModelGet,
|
|
5
|
+
computedGetModelSet,
|
|
6
|
+
computedCheckboxGroup,
|
|
7
|
+
computedActiveStyle,
|
|
8
|
+
computedFormItemSize,
|
|
9
|
+
computedSize,
|
|
10
|
+
computedIsDisabled,
|
|
11
|
+
toggleEvent
|
|
12
|
+
} from "./index";
|
|
13
|
+
import {
|
|
14
|
+
addToStore,
|
|
15
|
+
computedIsChecked,
|
|
16
|
+
computedStore,
|
|
17
|
+
computedIsLimitDisabled,
|
|
18
|
+
computedIsShowText,
|
|
19
|
+
computedShowText
|
|
20
|
+
} from "../checkbox";
|
|
21
|
+
const api = ["state", "handleChange"];
|
|
22
|
+
const initState = ({ reactive, computed, api: api2 }) => {
|
|
23
|
+
const state = reactive({
|
|
24
|
+
focus: false,
|
|
25
|
+
selfModel: false,
|
|
26
|
+
isLimitExceeded: false,
|
|
27
|
+
model: computed({
|
|
28
|
+
get: () => api2.computedGetModelGet(),
|
|
29
|
+
set: (value) => api2.computedGetModelSet(value)
|
|
30
|
+
}),
|
|
31
|
+
size: computed(() => api2.computedSize()),
|
|
32
|
+
store: computed(() => api2.computedStore()),
|
|
33
|
+
isChecked: computed(() => api2.computedIsChecked()),
|
|
34
|
+
isDisabled: computed(() => api2.computedIsDisabled()),
|
|
35
|
+
activeStyle: computed(() => api2.computedActiveStyle()),
|
|
36
|
+
checkboxGroup: computed(() => api2.computedCheckboxGroup()),
|
|
37
|
+
isLimitDisabled: computed(() => api2.computedIsLimitDisabled()),
|
|
38
|
+
showText: computed(() => api2.computedShowText()),
|
|
39
|
+
isShowText: computed(() => api2.computedIsShowText())
|
|
40
|
+
});
|
|
41
|
+
return state;
|
|
42
|
+
};
|
|
43
|
+
const initApi = ({ api: api2, state, props, formItemSize, parent, constants, emit, nextTick, dispatch }) => {
|
|
44
|
+
Object.assign(api2, {
|
|
45
|
+
state,
|
|
46
|
+
addToStore: addToStore({ state, props }),
|
|
47
|
+
computedStore: computedStore({ state, props }),
|
|
48
|
+
computedActiveStyle: computedActiveStyle(state),
|
|
49
|
+
computedFormItemSize: computedFormItemSize(props),
|
|
50
|
+
computedSize: computedSize({ state, formItemSize }),
|
|
51
|
+
computedIsChecked: computedIsChecked({ state, props }),
|
|
52
|
+
computedIsLimitDisabled: computedIsLimitDisabled(state),
|
|
53
|
+
computedIsDisabled: computedIsDisabled({ state, props }),
|
|
54
|
+
computedGetModelGet: computedGetModelGet({ state, props }),
|
|
55
|
+
computedCheckboxGroup: computedCheckboxGroup({ parent, constants }),
|
|
56
|
+
handleChange: handleChange({ state, props, emit, nextTick, dispatch, constants }),
|
|
57
|
+
computedGetModelSet: computedGetModelSet({ state, props, emit, dispatch, constants }),
|
|
58
|
+
computedIsShowText: computedIsShowText({ props }),
|
|
59
|
+
computedShowText: computedShowText({ props })
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive }, { parent, emit, dispatch, constants, nextTick }) => {
|
|
63
|
+
const api2 = {};
|
|
64
|
+
const formItemSize = computed(() => api2.computedFormItemSize());
|
|
65
|
+
const state = initState({ reactive, computed, api: api2 });
|
|
66
|
+
initApi({ api: api2, state, props, formItemSize, parent, constants, emit, nextTick, dispatch });
|
|
67
|
+
onBeforeUnmount(() => {
|
|
68
|
+
toggleEvent({ parent, props, type: "remove" });
|
|
69
|
+
});
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
toggleEvent({ parent, props, type: "add" });
|
|
72
|
+
props.checked && api2.addToStore();
|
|
73
|
+
});
|
|
74
|
+
return api2;
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
api,
|
|
78
|
+
renderless
|
|
79
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
const computedFormItemSize = (props) => () => (props.formItem || {}).formItemSize;
|
|
3
|
+
const computedCheckboxGroupSize = ({ props, formItemSize }) => () => props.size || formItemSize.value;
|
|
4
|
+
export {
|
|
5
|
+
computedCheckboxGroupSize,
|
|
6
|
+
computedFormItemSize
|
|
7
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { computedFormItemSize, computedCheckboxGroupSize } from "./index";
|
|
3
|
+
const api = ["state"];
|
|
4
|
+
const renderless = (props, { computed, reactive, watch, provide }, { dispatch, constants }) => {
|
|
5
|
+
const api2 = {
|
|
6
|
+
computedFormItemSize: computedFormItemSize(props)
|
|
7
|
+
};
|
|
8
|
+
const formItemSize = computed(() => api2.computedFormItemSize());
|
|
9
|
+
const state = reactive({
|
|
10
|
+
checkboxGroupSize: computed(() => api2.computedCheckboxGroupSize())
|
|
11
|
+
});
|
|
12
|
+
Object.assign(api2, {
|
|
13
|
+
state,
|
|
14
|
+
computedCheckboxGroupSize: computedCheckboxGroupSize({ props, formItemSize })
|
|
15
|
+
});
|
|
16
|
+
watch(
|
|
17
|
+
() => props.modelValue,
|
|
18
|
+
(value) => dispatch(constants.FORM_ITEM, constants.FORM_CHANGE, [value])
|
|
19
|
+
);
|
|
20
|
+
provide("size", props.size);
|
|
21
|
+
provide("vertical", props.vertical);
|
|
22
|
+
provide("iconPosition", props.iconPosition);
|
|
23
|
+
provide("shape", props.shape);
|
|
24
|
+
return api2;
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
api,
|
|
28
|
+
renderless
|
|
29
|
+
};
|