@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.
Files changed (882) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +16 -0
  3. package/action-menu/index.js +59 -0
  4. package/action-menu/vue.js +38 -0
  5. package/action-sheet/index.js +96 -0
  6. package/action-sheet/vue.js +66 -0
  7. package/alert/index.js +83 -0
  8. package/alert/vue.js +54 -0
  9. package/amount/index.js +306 -0
  10. package/amount/vue.js +208 -0
  11. package/anchor/index.js +192 -0
  12. package/anchor/vue.js +68 -0
  13. package/area/index.js +102 -0
  14. package/area/vue.js +32 -0
  15. package/async-flowchart/index.js +79 -0
  16. package/async-flowchart/vue.js +40 -0
  17. package/autocomplete/index.js +183 -0
  18. package/autocomplete/vue.js +151 -0
  19. package/autonavi-map/index.js +18 -0
  20. package/avatar/index.js +30 -0
  21. package/avatar/vue.js +22 -0
  22. package/badge/index.js +25 -0
  23. package/badge/vue.js +24 -0
  24. package/baidu-map/index.js +18 -0
  25. package/base-select/index.js +1450 -0
  26. package/base-select/vue.js +555 -0
  27. package/breadcrumb/index.js +15 -0
  28. package/breadcrumb/vue.js +22 -0
  29. package/breadcrumb-item/index.js +21 -0
  30. package/breadcrumb-item/vue.js +21 -0
  31. package/bulletin-board/index.js +25 -0
  32. package/bulletin-board/vue.js +30 -0
  33. package/button/index.js +27 -0
  34. package/button/vue.js +37 -0
  35. package/button-group/index.js +38 -0
  36. package/button-group/vue.js +39 -0
  37. package/calendar/index.js +160 -0
  38. package/calendar/vue.js +113 -0
  39. package/calendar-bar/index.js +509 -0
  40. package/calendar-bar/vue.js +161 -0
  41. package/calendar-view/index.js +606 -0
  42. package/calendar-view/vue.js +305 -0
  43. package/card/index.js +99 -0
  44. package/card/vue.js +72 -0
  45. package/card-group/vue.js +19 -0
  46. package/card-template/index.js +31 -0
  47. package/card-template/vue.js +22 -0
  48. package/carousel/index.js +289 -0
  49. package/carousel/vue.js +199 -0
  50. package/carousel-item/index.js +97 -0
  51. package/carousel-item/vue.js +74 -0
  52. package/cascader/index.js +546 -0
  53. package/cascader/vue.js +260 -0
  54. package/cascader-menu/index.js +42 -0
  55. package/cascader-menu/vue.js +26 -0
  56. package/cascader-mobile/index.js +316 -0
  57. package/cascader-mobile/vue.js +109 -0
  58. package/cascader-node/index.js +58 -0
  59. package/cascader-node/vue.js +41 -0
  60. package/cascader-panel/index.js +301 -0
  61. package/cascader-panel/node.js +136 -0
  62. package/cascader-panel/store.js +72 -0
  63. package/cascader-panel/vue.js +157 -0
  64. package/cascader-select/column-index.js +158 -0
  65. package/cascader-select/column.js +123 -0
  66. package/cascader-select/index.js +48 -0
  67. package/cascader-select/usePicker.js +252 -0
  68. package/cascader-select/useTouch.js +65 -0
  69. package/cascader-select/vue.js +64 -0
  70. package/cascader-view/index.js +363 -0
  71. package/cascader-view/vue.js +130 -0
  72. package/cell/vue.js +17 -0
  73. package/chart-bar/index.js +222 -0
  74. package/chart-boxplot/index.js +130 -0
  75. package/chart-candle/index.js +183 -0
  76. package/chart-core/deps/constants.js +131 -0
  77. package/chart-core/deps/numerify.js +244 -0
  78. package/chart-core/deps/utils.js +202 -0
  79. package/chart-core/index.js +473 -0
  80. package/chart-core/modules/animation.js +12 -0
  81. package/chart-core/modules/extend.js +48 -0
  82. package/chart-core/modules/mark.js +11 -0
  83. package/chart-core/vue.js +93 -0
  84. package/chart-funnel/index.js +76 -0
  85. package/chart-gauge/index.js +81 -0
  86. package/chart-graph/index.js +27 -0
  87. package/chart-heatmap/index.js +168 -0
  88. package/chart-line/index.js +166 -0
  89. package/chart-liquidfill/index.js +54 -0
  90. package/chart-map/index.js +118 -0
  91. package/chart-pie/index.js +146 -0
  92. package/chart-radar/index.js +105 -0
  93. package/chart-sankey/index.js +80 -0
  94. package/chart-scatter/index.js +173 -0
  95. package/chart-sunburst/index.js +28 -0
  96. package/chart-tree/index.js +65 -0
  97. package/chart-waterfall/index.js +99 -0
  98. package/chart-wordcloud/index.js +60 -0
  99. package/checkbox/index.js +147 -0
  100. package/checkbox/vue.js +120 -0
  101. package/checkbox-button/index.js +68 -0
  102. package/checkbox-button/vue.js +79 -0
  103. package/checkbox-group/index.js +7 -0
  104. package/checkbox-group/vue.js +29 -0
  105. package/chunk-G2ADBYYC.js +37 -0
  106. package/col/index.js +104 -0
  107. package/col/vue.js +25 -0
  108. package/collapse/index.js +36 -0
  109. package/collapse/vue.js +27 -0
  110. package/collapse-item/index.js +42 -0
  111. package/collapse-item/vue.js +40 -0
  112. package/color-picker/index.js +30 -0
  113. package/color-picker/utils/color.js +377 -0
  114. package/color-picker/utils/hsv-to-rgb.js +59 -0
  115. package/color-picker/vue.js +71 -0
  116. package/color-select-panel/alpha-select/index.js +71 -0
  117. package/color-select-panel/alpha-select/vue.js +43 -0
  118. package/color-select-panel/hue-select/index.js +57 -0
  119. package/color-select-panel/hue-select/vue.js +40 -0
  120. package/color-select-panel/index.js +243 -0
  121. package/color-select-panel/sv-select/index.js +68 -0
  122. package/color-select-panel/sv-select/vue.js +32 -0
  123. package/color-select-panel/utils/color.js +365 -0
  124. package/color-select-panel/utils/getClientXY.js +54 -0
  125. package/color-select-panel/utils/use-drag.js +38 -0
  126. package/color-select-panel/vue.js +63 -0
  127. package/column-list-group/index.js +0 -0
  128. package/column-list-group/vue.js +14 -0
  129. package/column-list-item/index.js +80 -0
  130. package/column-list-item/vue.js +55 -0
  131. package/common/array.js +115 -0
  132. package/common/bigInt.js +315 -0
  133. package/common/browser.js +81 -0
  134. package/common/calendar/calendar.js +97 -0
  135. package/common/dataset/index.js +99 -0
  136. package/common/date.js +354 -0
  137. package/common/decimal.js +155 -0
  138. package/common/deps/ResizeObserver.js +456 -0
  139. package/common/deps/after-leave.js +27 -0
  140. package/common/deps/clickoutside.js +75 -0
  141. package/common/deps/date-util.js +255 -0
  142. package/common/deps/date.js +286 -0
  143. package/common/deps/debounce.js +8 -0
  144. package/common/deps/dom.js +217 -0
  145. package/common/deps/eSpaceCtrl.js +304 -0
  146. package/common/deps/fastdom/async.js +41 -0
  147. package/common/deps/fastdom/index.js +9 -0
  148. package/common/deps/fastdom/sandbox.js +53 -0
  149. package/common/deps/fastdom/singleton.js +88 -0
  150. package/common/deps/fullscreen/apis.js +143 -0
  151. package/common/deps/fullscreen/screenfull.js +165 -0
  152. package/common/deps/infinite-scroll.js +176 -0
  153. package/common/deps/memorize.js +124 -0
  154. package/common/deps/observe-visibility.js +106 -0
  155. package/common/deps/popper.js +613 -0
  156. package/common/deps/popup-manager.js +205 -0
  157. package/common/deps/repeat-click.js +29 -0
  158. package/common/deps/resize-event.js +39 -0
  159. package/common/deps/scroll-into-view.js +29 -0
  160. package/common/deps/scrollbar-width.js +33 -0
  161. package/common/deps/throttle.js +45 -0
  162. package/common/deps/touch-emulator.js +103 -0
  163. package/common/deps/touch.js +37 -0
  164. package/common/deps/tree-model/node.js +475 -0
  165. package/common/deps/tree-model/tree-store.js +312 -0
  166. package/common/deps/tree-model/util.js +24 -0
  167. package/common/deps/upload-ajax.js +81 -0
  168. package/common/deps/useEventListener.js +54 -0
  169. package/common/deps/useInstanceSlots.js +22 -0
  170. package/common/deps/useRect.js +25 -0
  171. package/common/deps/useRelation.js +89 -0
  172. package/common/deps/useTouch.js +68 -0
  173. package/common/deps/useUserAgent.js +16 -0
  174. package/common/deps/useWindowSize.js +23 -0
  175. package/common/deps/vue-emitter.js +34 -0
  176. package/common/deps/vue-popper.js +177 -0
  177. package/common/deps/vue-popup.js +138 -0
  178. package/common/event.js +46 -0
  179. package/common/form/const.js +10 -0
  180. package/common/function.js +28 -0
  181. package/common/global.js +11 -0
  182. package/common/index.js +259 -0
  183. package/common/object.js +227 -0
  184. package/common/prop-util.js +43 -0
  185. package/common/runtime.js +79 -0
  186. package/common/string.js +417 -0
  187. package/common/type.js +66 -0
  188. package/common/validate/index.js +10 -0
  189. package/common/validate/messages.js +65 -0
  190. package/common/validate/rules/enum.js +12 -0
  191. package/common/validate/rules/index.js +18 -0
  192. package/common/validate/rules/pattern.js +20 -0
  193. package/common/validate/rules/range.js +52 -0
  194. package/common/validate/rules/required.js +11 -0
  195. package/common/validate/rules/type.js +100 -0
  196. package/common/validate/rules/whitespace.js +10 -0
  197. package/common/validate/schema.js +290 -0
  198. package/common/validate/util.js +211 -0
  199. package/common/validate/validations/array.js +22 -0
  200. package/common/validate/validations/date.js +31 -0
  201. package/common/validate/validations/enum.js +22 -0
  202. package/common/validate/validations/float.js +22 -0
  203. package/common/validate/validations/index.js +46 -0
  204. package/common/validate/validations/integer.js +22 -0
  205. package/common/validate/validations/method.js +21 -0
  206. package/common/validate/validations/number.js +25 -0
  207. package/common/validate/validations/pattern.js +21 -0
  208. package/common/validate/validations/required.js +11 -0
  209. package/common/validate/validations/string.js +33 -0
  210. package/common/validate/validations/type.js +29 -0
  211. package/company/index.js +41 -0
  212. package/company/vue.js +29 -0
  213. package/container/index.js +100 -0
  214. package/container/vue.js +47 -0
  215. package/country/index.js +40 -0
  216. package/country/vue.js +30 -0
  217. package/crop/index.js +170 -0
  218. package/crop/vue.js +183 -0
  219. package/currency/index.js +127 -0
  220. package/currency/vue.js +46 -0
  221. package/date-panel/index.js +485 -0
  222. package/date-panel/vue.js +221 -0
  223. package/date-picker/index.js +267 -0
  224. package/date-picker/vue.js +123 -0
  225. package/date-picker-mobile/index.js +308 -0
  226. package/date-picker-mobile/vue.js +111 -0
  227. package/date-picker-mobile/year-month.js +53 -0
  228. package/date-range/index.js +443 -0
  229. package/date-range/vue.js +195 -0
  230. package/date-table/index.js +362 -0
  231. package/date-table/vue.js +77 -0
  232. package/dept/index.js +230 -0
  233. package/dept/vue.js +102 -0
  234. package/dialog-box/index.js +283 -0
  235. package/dialog-box/vue.js +184 -0
  236. package/dialog-select/index.js +475 -0
  237. package/dialog-select/vue.js +143 -0
  238. package/divider/index.js +47 -0
  239. package/divider/vue.js +30 -0
  240. package/drawer/index.js +143 -0
  241. package/drawer/vue.js +67 -0
  242. package/drop-roles/index.js +54 -0
  243. package/drop-roles/vue.js +30 -0
  244. package/drop-times/index.js +22 -0
  245. package/drop-times/vue.js +24 -0
  246. package/dropdown/index.js +228 -0
  247. package/dropdown/vue.js +77 -0
  248. package/dropdown-item/index.js +138 -0
  249. package/dropdown-item/mf.js +76 -0
  250. package/dropdown-item/vue.js +116 -0
  251. package/dropdown-menu/index.js +178 -0
  252. package/dropdown-menu/vue.js +66 -0
  253. package/dynamic-scroller/index.js +117 -0
  254. package/dynamic-scroller/vue.js +88 -0
  255. package/dynamic-scroller-item/index.js +147 -0
  256. package/dynamic-scroller-item/vue.js +92 -0
  257. package/espace/index.js +110 -0
  258. package/espace/vue.js +38 -0
  259. package/exception/index.js +5 -0
  260. package/exception/vue.js +17 -0
  261. package/fall-menu/index.js +100 -0
  262. package/fall-menu/vue.js +79 -0
  263. package/file-upload/index.js +2208 -0
  264. package/file-upload/vue.js +339 -0
  265. package/filter/index.js +132 -0
  266. package/filter/tag-group.js +43 -0
  267. package/filter/vue.js +71 -0
  268. package/filter-bar/index.js +9 -0
  269. package/filter-bar/vue.js +16 -0
  270. package/filter-box/index.js +18 -0
  271. package/filter-box/vue.js +22 -0
  272. package/filter-panel/index.js +42 -0
  273. package/filter-panel/vue.js +33 -0
  274. package/float-button/index.js +42 -0
  275. package/float-button/vue.js +101 -0
  276. package/floatbar/index.js +13 -0
  277. package/floatbar/vue.js +14 -0
  278. package/floating-button/index.js +119 -0
  279. package/floating-button/vue.js +53 -0
  280. package/flowchart/index.js +1252 -0
  281. package/flowchart/node.js +61 -0
  282. package/flowchart/vue.js +109 -0
  283. package/fluent-editor/index.js +702 -0
  284. package/fluent-editor/options.js +300 -0
  285. package/fluent-editor/vue.js +192 -0
  286. package/form/index.js +209 -0
  287. package/form/vue.js +104 -0
  288. package/form-item/index.js +403 -0
  289. package/form-item/vue.js +166 -0
  290. package/fullscreen/index.js +113 -0
  291. package/fullscreen/vue.js +65 -0
  292. package/grid/core/index.js +7 -0
  293. package/grid/core/interceptor.js +43 -0
  294. package/grid/core/storeMap.js +23 -0
  295. package/grid/plugins/export.js +141 -0
  296. package/grid/plugins/exportExcel.js +502 -0
  297. package/grid/plugins/header.js +59 -0
  298. package/grid/plugins/resize.js +65 -0
  299. package/grid/static/array/arrayEach.js +16 -0
  300. package/grid/static/array/arrayIndexOf.js +15 -0
  301. package/grid/static/array/eachTree.js +28 -0
  302. package/grid/static/array/every.js +6 -0
  303. package/grid/static/array/filterTree.js +21 -0
  304. package/grid/static/array/find.js +7 -0
  305. package/grid/static/array/findTree.js +35 -0
  306. package/grid/static/array/helperCreateIterateHandle.js +51 -0
  307. package/grid/static/array/helperCreateTreeFunc.js +20 -0
  308. package/grid/static/array/includes.js +7 -0
  309. package/grid/static/array/lastArrayEach.js +10 -0
  310. package/grid/static/array/map.js +24 -0
  311. package/grid/static/array/mapTree.js +29 -0
  312. package/grid/static/array/slice.js +14 -0
  313. package/grid/static/array/sortBy.js +67 -0
  314. package/grid/static/array/sum.js +29 -0
  315. package/grid/static/array/toArray.js +7 -0
  316. package/grid/static/array/toTreeArray.js +22 -0
  317. package/grid/static/base/clear.js +48 -0
  318. package/grid/static/base/clone.js +12 -0
  319. package/grid/static/base/destructuring.js +22 -0
  320. package/grid/static/base/each.js +13 -0
  321. package/grid/static/base/eqNull.js +8 -0
  322. package/grid/static/base/findIndexOf.js +14 -0
  323. package/grid/static/base/get.js +46 -0
  324. package/grid/static/base/has.js +61 -0
  325. package/grid/static/base/hasOwnProp.js +6 -0
  326. package/grid/static/base/helperCreateGetObjects.js +30 -0
  327. package/grid/static/base/helperCreateInInObjectString.js +11 -0
  328. package/grid/static/base/helperCreateInTypeof.js +9 -0
  329. package/grid/static/base/helperCreateIndexOf.js +22 -0
  330. package/grid/static/base/helperCreateiterateIndexOf.js +22 -0
  331. package/grid/static/base/helperDefaultCompare.js +8 -0
  332. package/grid/static/base/helperDeleteProperty.js +12 -0
  333. package/grid/static/base/helperEqualCompare.js +58 -0
  334. package/grid/static/base/helperGetHGSKeys.js +9 -0
  335. package/grid/static/base/indexOf.js +7 -0
  336. package/grid/static/base/isArray.js +7 -0
  337. package/grid/static/base/isBoolean.js +6 -0
  338. package/grid/static/base/isDate.js +7 -0
  339. package/grid/static/base/isEmpty.js +12 -0
  340. package/grid/static/base/isEqual.js +11 -0
  341. package/grid/static/base/isFunction.js +6 -0
  342. package/grid/static/base/isNaN.js +7 -0
  343. package/grid/static/base/isNull.js +6 -0
  344. package/grid/static/base/isNumber.js +6 -0
  345. package/grid/static/base/isObject.js +6 -0
  346. package/grid/static/base/isPlainObject.js +6 -0
  347. package/grid/static/base/isRegExp.js +7 -0
  348. package/grid/static/base/isSet.js +7 -0
  349. package/grid/static/base/isString.js +6 -0
  350. package/grid/static/base/isUndefined.js +6 -0
  351. package/grid/static/base/keys.js +7 -0
  352. package/grid/static/base/lastEach.js +13 -0
  353. package/grid/static/base/remove.js +44 -0
  354. package/grid/static/base/set.js +47 -0
  355. package/grid/static/base/toJSONString.js +6 -0
  356. package/grid/static/base/toStringJSON.js +18 -0
  357. package/grid/static/base/uniqueId.js +7 -0
  358. package/grid/static/browse/browse.js +57 -0
  359. package/grid/static/function/property.js +7 -0
  360. package/grid/static/function/throttle.js +47 -0
  361. package/grid/static/index.js +111 -0
  362. package/grid/static/number/helperCreateToNumber.js +14 -0
  363. package/grid/static/number/toNumber.js +7 -0
  364. package/grid/static/object/assign.js +41 -0
  365. package/grid/static/object/extend.js +7 -0
  366. package/grid/static/object/lastObjectEach.js +12 -0
  367. package/grid/static/object/objectEach.js +15 -0
  368. package/grid/static/object/objectMap.js +24 -0
  369. package/grid/static/object/values.js +17 -0
  370. package/grid/static/static/staticDocument.js +7 -0
  371. package/grid/static/static/staticHGKeyRE.js +6 -0
  372. package/grid/static/static/staticParseInt.js +6 -0
  373. package/grid/static/static/staticStrUndefined.js +6 -0
  374. package/grid/static/static/staticWindow.js +7 -0
  375. package/grid/static/string/template.js +14 -0
  376. package/grid/static/string/toString.js +16 -0
  377. package/grid/utils/column.js +73 -0
  378. package/grid/utils/common.js +136 -0
  379. package/grid/utils/dom.js +224 -0
  380. package/grid/utils/event.js +40 -0
  381. package/grid/utils/index.js +8 -0
  382. package/grid-select/index.js +82 -0
  383. package/grid-select/vue.js +30 -0
  384. package/guide/index.js +185 -0
  385. package/guide/vue.js +38 -0
  386. package/hrapprover/index.js +95 -0
  387. package/hrapprover/vue.js +57 -0
  388. package/image/index.js +135 -0
  389. package/image/vue.js +111 -0
  390. package/image-viewer/index.js +681 -0
  391. package/image-viewer/vue.js +237 -0
  392. package/index-bar/index.js +66 -0
  393. package/index-bar/vue.js +73 -0
  394. package/index-bar-anchor/vue.js +16 -0
  395. package/input/index.js +413 -0
  396. package/input/vue.js +353 -0
  397. package/ip-address/index.js +271 -0
  398. package/ip-address/vue.js +143 -0
  399. package/label/index.js +56 -0
  400. package/label/vue.js +26 -0
  401. package/layout/vue.js +7 -0
  402. package/link/index.js +9 -0
  403. package/link/vue.js +20 -0
  404. package/link-menu/index.js +104 -0
  405. package/link-menu/vue.js +95 -0
  406. package/list/index.js +13 -0
  407. package/list/vue.js +17 -0
  408. package/load-list/index.js +43 -0
  409. package/load-list/vue.js +69 -0
  410. package/loading/index.js +30 -0
  411. package/loading/vue.js +32 -0
  412. package/locales/index.js +82 -0
  413. package/locales/vue.js +28 -0
  414. package/logon-user/index.js +20 -0
  415. package/logon-user/vue.js +19 -0
  416. package/logout/index.js +84 -0
  417. package/logout/vue.js +18 -0
  418. package/mask/index.js +13 -0
  419. package/mask/vue.js +18 -0
  420. package/menu/index.js +140 -0
  421. package/menu/vue.js +99 -0
  422. package/menu-node/index.js +12 -0
  423. package/menu-node/vue.js +42 -0
  424. package/milestone/index.js +123 -0
  425. package/milestone/vue.js +46 -0
  426. package/mind-map/index.js +47 -0
  427. package/mind-map/vue.js +53 -0
  428. package/mini-picker/index.js +165 -0
  429. package/mini-picker/vue.js +122 -0
  430. package/modal/index.js +716 -0
  431. package/modal/vue.js +122 -0
  432. package/month-range/index.js +134 -0
  433. package/month-range/vue.js +88 -0
  434. package/month-table/index.js +194 -0
  435. package/month-table/vue.js +50 -0
  436. package/multi-select/index.js +394 -0
  437. package/multi-select/vue.js +113 -0
  438. package/multi-select-item/index.js +23 -0
  439. package/multi-select-item/vue.js +31 -0
  440. package/nav-menu/index.js +508 -0
  441. package/nav-menu/vue.js +153 -0
  442. package/notify/index.js +69 -0
  443. package/notify/vue.js +63 -0
  444. package/numeric/index.js +397 -0
  445. package/numeric/vue.js +153 -0
  446. package/option/index.js +67 -0
  447. package/option/vue.js +132 -0
  448. package/option-group/index.js +28 -0
  449. package/option-group/vue.js +45 -0
  450. package/package.json +41 -0
  451. package/pager/index.js +409 -0
  452. package/pager/vue.js +155 -0
  453. package/pager-item/index.js +107 -0
  454. package/pager-item/vue.js +44 -0
  455. package/panel/index.js +24 -0
  456. package/panel/vue.js +20 -0
  457. package/picker/index.js +1119 -0
  458. package/picker/mb.js +47 -0
  459. package/picker/timezone.js +1174 -0
  460. package/picker/vue.js +291 -0
  461. package/picker-column/index.js +215 -0
  462. package/picker-column/vue.js +104 -0
  463. package/pop-upload/index.js +174 -0
  464. package/pop-upload/vue.js +165 -0
  465. package/popconfirm/index.js +38 -0
  466. package/popconfirm/vue.js +35 -0
  467. package/popeditor/index.js +709 -0
  468. package/popeditor/vue.js +223 -0
  469. package/popover/index.js +207 -0
  470. package/popover/vue.js +165 -0
  471. package/popup/index.js +101 -0
  472. package/popup/vue.js +69 -0
  473. package/progress/index.js +151 -0
  474. package/progress/vue.js +87 -0
  475. package/pull-refresh/index.js +123 -0
  476. package/pull-refresh/vue.js +76 -0
  477. package/pull-refresh-mobile-first/index.js +243 -0
  478. package/pull-refresh-mobile-first/vue.js +116 -0
  479. package/qr-code/index.js +54 -0
  480. package/qr-code/vue.js +31 -0
  481. package/quarter-panel/index.js +61 -0
  482. package/quarter-panel/vue.js +46 -0
  483. package/query-builder/index.js +9 -0
  484. package/query-builder/vue.js +18 -0
  485. package/radio/index.js +74 -0
  486. package/radio/vue.js +56 -0
  487. package/radio-button/index.js +61 -0
  488. package/radio-button/vue.js +60 -0
  489. package/radio-group/index.js +49 -0
  490. package/radio-group/vue.js +34 -0
  491. package/rate/index.js +223 -0
  492. package/rate/vue.js +131 -0
  493. package/record/index.js +300 -0
  494. package/record/vue.js +61 -0
  495. package/recycle-scroller/index.js +486 -0
  496. package/recycle-scroller/vue.js +141 -0
  497. package/rich-text/clipboard.js +54 -0
  498. package/rich-text/index.js +205 -0
  499. package/rich-text/module/file-upload.js +107 -0
  500. package/rich-text/module/image-drop.js +63 -0
  501. package/rich-text/module/image-upload.js +89 -0
  502. package/rich-text/options.js +141 -0
  503. package/rich-text/table-module.js +383 -0
  504. package/rich-text/vue.js +104 -0
  505. package/rich-text-editor/index.js +234 -0
  506. package/rich-text-editor/vue.js +297 -0
  507. package/river/index.js +371 -0
  508. package/river/river.js +352 -0
  509. package/river/vue.js +77 -0
  510. package/roles/index.js +58 -0
  511. package/roles/vue.js +27 -0
  512. package/row/index.js +18 -0
  513. package/row/vue.js +25 -0
  514. package/scroll-text/index.js +19 -0
  515. package/scroll-text/vue.js +22 -0
  516. package/scrollbar/index.js +99 -0
  517. package/scrollbar/vue-bar.js +42 -0
  518. package/scrollbar/vue.js +35 -0
  519. package/search/index.js +97 -0
  520. package/search/vue.js +99 -0
  521. package/select/index.js +1847 -0
  522. package/select/vue.js +642 -0
  523. package/select-dropdown/index.js +76 -0
  524. package/select-dropdown/vue.js +146 -0
  525. package/select-mobile/index.js +124 -0
  526. package/select-mobile/vue.js +67 -0
  527. package/select-view/index.js +156 -0
  528. package/select-view/vue.js +79 -0
  529. package/selected-box/index.js +220 -0
  530. package/selected-box/vue.js +102 -0
  531. package/signature/index.js +241 -0
  532. package/signature/vue.js +88 -0
  533. package/skeleton/index.js +14 -0
  534. package/skeleton/vue.js +15 -0
  535. package/skeleton-item/vue.js +15 -0
  536. package/slider/index.js +527 -0
  537. package/slider/vue.js +200 -0
  538. package/slider-button/index.js +50 -0
  539. package/slider-button/vue.js +41 -0
  540. package/slider-button-group/index.js +52 -0
  541. package/slider-button-group/slide-button.js +142 -0
  542. package/slider-button-group/vue.js +71 -0
  543. package/split/index.js +135 -0
  544. package/split/vue.js +95 -0
  545. package/standard-list-item/index.js +38 -0
  546. package/standard-list-item/vue.js +24 -0
  547. package/statistic/index.js +32 -0
  548. package/statistic/vue.js +20 -0
  549. package/steps/index.js +61 -0
  550. package/steps/slide-bar.js +129 -0
  551. package/steps/vue.js +35 -0
  552. package/sticky/index.js +89 -0
  553. package/sticky/vue.js +74 -0
  554. package/switch/index.js +36 -0
  555. package/switch/vue.js +42 -0
  556. package/tab-bar/index.js +57 -0
  557. package/tab-bar/vue.js +19 -0
  558. package/tab-dropdown/index.js +12 -0
  559. package/tab-dropdown/vue.js +20 -0
  560. package/tab-item/index.js +22 -0
  561. package/tab-item/vue.js +30 -0
  562. package/tab-item-mf/index.js +0 -0
  563. package/tab-item-mf/vue.js +27 -0
  564. package/tab-nav/index.js +348 -0
  565. package/tab-nav/vue.js +105 -0
  566. package/tabbar/index.js +61 -0
  567. package/tabbar/vue.js +62 -0
  568. package/tabbar-item/index.js +48 -0
  569. package/tabbar-item/vue.js +34 -0
  570. package/table/index.js +77 -0
  571. package/table/vue.js +42 -0
  572. package/tabs/index.js +213 -0
  573. package/tabs/vue.js +116 -0
  574. package/tabs-mf/index.js +286 -0
  575. package/tabs-mf/vue-bar.js +50 -0
  576. package/tabs-mf/vue-nav-item.js +23 -0
  577. package/tabs-mf/vue-nav.js +44 -0
  578. package/tabs-mf/vue-swipe.js +20 -0
  579. package/tabs-mf/vue.js +100 -0
  580. package/tabs-mf/wheel.js +77 -0
  581. package/tag/index.js +20 -0
  582. package/tag/vue.js +24 -0
  583. package/tag-group/index.js +38 -0
  584. package/tag-group/vue.js +36 -0
  585. package/tall-storage/index.js +141 -0
  586. package/tall-storage/vue-storage-box.js +19 -0
  587. package/tall-storage/vue.js +30 -0
  588. package/text-popup/index.js +55 -0
  589. package/text-popup/vue.js +32 -0
  590. package/time/index.js +89 -0
  591. package/time/vue.js +87 -0
  592. package/time-line/index.js +91 -0
  593. package/time-line/vue.js +52 -0
  594. package/time-line-new/index.js +53 -0
  595. package/time-line-new/vue.js +41 -0
  596. package/time-panel/index.js +133 -0
  597. package/time-panel/scrollIntoView.js +25 -0
  598. package/time-panel/vue.js +82 -0
  599. package/time-picker-mobile/index.js +58 -0
  600. package/time-picker-mobile/vue.js +42 -0
  601. package/time-range/index.js +147 -0
  602. package/time-range/vue.js +90 -0
  603. package/time-spinner/index.js +221 -0
  604. package/time-spinner/vue.js +111 -0
  605. package/timeline-item/index.js +92 -0
  606. package/timeline-item/vue.js +55 -0
  607. package/toast/index.js +7 -0
  608. package/toast/vue.js +19 -0
  609. package/toggle-menu/index.js +85 -0
  610. package/toggle-menu/vue.js +86 -0
  611. package/tooltip/index.js +175 -0
  612. package/tooltip/vue.js +123 -0
  613. package/top-box/index.js +48 -0
  614. package/top-box/vue.js +61 -0
  615. package/transfer/index.js +219 -0
  616. package/transfer/vue.js +64 -0
  617. package/transfer-panel/index.js +275 -0
  618. package/transfer-panel/vue.js +152 -0
  619. package/tree/index.js +796 -0
  620. package/tree/vue.js +288 -0
  621. package/tree-menu/index.js +170 -0
  622. package/tree-menu/vue.js +117 -0
  623. package/tree-node/index.js +279 -0
  624. package/tree-node/vue.js +150 -0
  625. package/tree-select/index.js +118 -0
  626. package/tree-select/vue.js +35 -0
  627. package/types/action-menu.type.d.ts +129 -0
  628. package/types/action-sheet.type.d.ts +119 -0
  629. package/types/alert.type.d.ts +134 -0
  630. package/types/amount.type.d.ts +169 -0
  631. package/types/anchor.type.d.ts +91 -0
  632. package/types/area.type.d.ts +135 -0
  633. package/types/async-flowchart.type.d.ts +72 -0
  634. package/types/autocomplete.type.d.ts +204 -0
  635. package/types/autonavi-map.type.d.ts +2 -0
  636. package/types/avatar.type.d.ts +2 -0
  637. package/types/badge.type.d.ts +84 -0
  638. package/types/baidu-map.type.d.ts +2 -0
  639. package/types/breadcrumb-item.type.d.ts +33 -0
  640. package/types/breadcrumb.type.d.ts +59 -0
  641. package/types/bulletin-board.type.d.ts +2 -0
  642. package/types/button-group.type.d.ts +90 -0
  643. package/types/button.type.d.ts +120 -0
  644. package/types/calendar-bar.type.d.ts +2 -0
  645. package/types/calendar.type.d.ts +2 -0
  646. package/types/card-group.type.d.ts +2 -0
  647. package/types/card-template.type.d.ts +2 -0
  648. package/types/card.type.d.ts +2 -0
  649. package/types/carousel-item.type.d.ts +2 -0
  650. package/types/carousel.type.d.ts +2 -0
  651. package/types/cascader-menu.type.d.ts +48 -0
  652. package/types/cascader-mobile.type.d.ts +2 -0
  653. package/types/cascader-node.type.d.ts +56 -0
  654. package/types/cascader-panel.type-8f58e628.d.ts +241 -0
  655. package/types/cascader-panel.type.d.ts +3 -0
  656. package/types/cascader-select.type.d.ts +2 -0
  657. package/types/cascader.type.d.ts +330 -0
  658. package/types/cell.type.d.ts +2 -0
  659. package/types/chart-bar.type.d.ts +2 -0
  660. package/types/chart-boxplot.type.d.ts +2 -0
  661. package/types/chart-candle.type.d.ts +2 -0
  662. package/types/chart-core.type.d.ts +2 -0
  663. package/types/chart-funnel.type.d.ts +2 -0
  664. package/types/chart-gauge.type.d.ts +2 -0
  665. package/types/chart-graph.type.d.ts +2 -0
  666. package/types/chart-heatmap.type.d.ts +2 -0
  667. package/types/chart-line.type.d.ts +2 -0
  668. package/types/chart-liquidfill.type.d.ts +2 -0
  669. package/types/chart-map.type.d.ts +2 -0
  670. package/types/chart-pie.type.d.ts +2 -0
  671. package/types/chart-radar.type.d.ts +2 -0
  672. package/types/chart-sankey.type.d.ts +2 -0
  673. package/types/chart-scatter.type.d.ts +2 -0
  674. package/types/chart-sunburst.type.d.ts +2 -0
  675. package/types/chart-tree.type.d.ts +2 -0
  676. package/types/chart-waterfall.type.d.ts +2 -0
  677. package/types/chart-wordcloud.type.d.ts +2 -0
  678. package/types/checkbox-button.type.d.ts +2 -0
  679. package/types/checkbox-group.type.d.ts +2 -0
  680. package/types/checkbox.type.d.ts +169 -0
  681. package/types/col.type.d.ts +2 -0
  682. package/types/collapse-item.type.d.ts +63 -0
  683. package/types/collapse.type.d.ts +73 -0
  684. package/types/color-picker.type.d.ts +5 -0
  685. package/types/color-select-panel.type.d.ts +27 -0
  686. package/types/column-list-group.type.d.ts +2 -0
  687. package/types/column-list-item.type.d.ts +2 -0
  688. package/types/common.type.d.ts +2 -0
  689. package/types/company.type.d.ts +2 -0
  690. package/types/container.type.d.ts +2 -0
  691. package/types/country.type.d.ts +2 -0
  692. package/types/credit-card-form.type.d.ts +2 -0
  693. package/types/credit-card.type.d.ts +2 -0
  694. package/types/crop.type.d.ts +2 -0
  695. package/types/currency.type.d.ts +2 -0
  696. package/types/date-panel.type.d.ts +2 -0
  697. package/types/date-picker-mobile.type.d.ts +2 -0
  698. package/types/date-picker.type.d.ts +256 -0
  699. package/types/date-range.type.d.ts +2 -0
  700. package/types/date-table.type.d.ts +151 -0
  701. package/types/dept.type.d.ts +2 -0
  702. package/types/detail-page.type.d.ts +2 -0
  703. package/types/dialog-box.type.d.ts +270 -0
  704. package/types/dialog-select.type.d.ts +2 -0
  705. package/types/divider.type.d.ts +94 -0
  706. package/types/drawer.type.d.ts +146 -0
  707. package/types/drop-roles.type.d.ts +2 -0
  708. package/types/drop-times.type.d.ts +2 -0
  709. package/types/dropdown-item.type-c9badbc1.d.ts +336 -0
  710. package/types/dropdown-item.type.d.ts +4 -0
  711. package/types/dropdown-menu.type.d.ts +4 -0
  712. package/types/dropdown.type.d.ts +145 -0
  713. package/types/dynamic-scroller-item.type.d.ts +2 -0
  714. package/types/dynamic-scroller.type.d.ts +2 -0
  715. package/types/espace.type.d.ts +2 -0
  716. package/types/exception.type.d.ts +2 -0
  717. package/types/fall-menu.type.d.ts +96 -0
  718. package/types/file-upload.type.d.ts +3 -0
  719. package/types/filter-bar.type.d.ts +2 -0
  720. package/types/filter-box.type.d.ts +2 -0
  721. package/types/filter-panel.type.d.ts +2 -0
  722. package/types/filter.type.d.ts +2 -0
  723. package/types/float-button.type.d.ts +123 -0
  724. package/types/floatbar.type.d.ts +45 -0
  725. package/types/floating-button.type.d.ts +2 -0
  726. package/types/flowchart.type.d.ts +2 -0
  727. package/types/form-item.type.d.ts +3 -0
  728. package/types/form.type-4e0ec0a1.d.ts +421 -0
  729. package/types/form.type.d.ts +3 -0
  730. package/types/fullscreen.type.d.ts +2 -0
  731. package/types/grid.type.d.ts +2 -0
  732. package/types/guide.type.d.ts +2 -0
  733. package/types/hrapprover.type.d.ts +2 -0
  734. package/types/image-viewer.type.d.ts +2 -0
  735. package/types/image.type.d.ts +184 -0
  736. package/types/index-a975a7a2.d.ts +54 -0
  737. package/types/index-bar-anchor.type.d.ts +2 -0
  738. package/types/index-bar.type.d.ts +2 -0
  739. package/types/input.type.d.ts +330 -0
  740. package/types/ip-address.type.d.ts +156 -0
  741. package/types/label.type.d.ts +81 -0
  742. package/types/layout.type.d.ts +2 -0
  743. package/types/link-menu.type.d.ts +2 -0
  744. package/types/link.type.d.ts +48 -0
  745. package/types/list.type.d.ts +2 -0
  746. package/types/load-list.type.d.ts +58 -0
  747. package/types/loading.type.d.ts +97 -0
  748. package/types/locales.type.d.ts +2 -0
  749. package/types/logon-user.type.d.ts +2 -0
  750. package/types/logout.type.d.ts +2 -0
  751. package/types/milestone.type.d.ts +170 -0
  752. package/types/mind-map.type.d.ts +20 -0
  753. package/types/mini-picker.type.d.ts +2 -0
  754. package/types/modal.type.d.ts +292 -0
  755. package/types/month-range.type.d.ts +2 -0
  756. package/types/month-table.type.d.ts +2 -0
  757. package/types/multi-select.type.d.ts +2 -0
  758. package/types/nav-menu.type.d.ts +125 -0
  759. package/types/notify.type.d.ts +2 -0
  760. package/types/numeric.type.d.ts +312 -0
  761. package/types/option-group.type.d.ts +2 -0
  762. package/types/option.type.d.ts +2 -0
  763. package/types/pager-item.type.d.ts +2 -0
  764. package/types/pager.type.d.ts +180 -0
  765. package/types/panel.type.d.ts +2 -0
  766. package/types/picker-column.type.d.ts +2 -0
  767. package/types/picker.type.d.ts +216 -0
  768. package/types/pop-upload.type.d.ts +2 -0
  769. package/types/popconfirm.type.d.ts +95 -0
  770. package/types/popeditor.type.d.ts +279 -0
  771. package/types/popover.type.d.ts +164 -0
  772. package/types/popup.type.d.ts +2 -0
  773. package/types/progress.type.d.ts +218 -0
  774. package/types/pull-refresh.type.d.ts +2 -0
  775. package/types/query-builder.type.d.ts +2 -0
  776. package/types/radio-button.type.d.ts +90 -0
  777. package/types/radio-group.type.d.ts +71 -0
  778. package/types/radio.type.d.ts +99 -0
  779. package/types/rate.type.d.ts +237 -0
  780. package/types/record.type.d.ts +2 -0
  781. package/types/recycle-scroller.type.d.ts +2 -0
  782. package/types/river.type.d.ts +2 -0
  783. package/types/roles.type.d.ts +2 -0
  784. package/types/row.type.d.ts +2 -0
  785. package/types/scroll-text.type.d.ts +2 -0
  786. package/types/scrollbar.type.d.ts +2 -0
  787. package/types/search.type.d.ts +129 -0
  788. package/types/select-dropdown.type.d.ts +2 -0
  789. package/types/select-mobile.type.d.ts +2 -0
  790. package/types/select-view.type.d.ts +2 -0
  791. package/types/select.type.d.ts +2 -0
  792. package/types/selected-box.type.d.ts +2 -0
  793. package/types/shared.type.d.ts +178 -0
  794. package/types/skeleton-item.type.d.ts +38 -0
  795. package/types/skeleton.type.d.ts +45 -0
  796. package/types/slide-bar.type.d.ts +2 -0
  797. package/types/slider-button-group.type.d.ts +2 -0
  798. package/types/slider-button.type.d.ts +2 -0
  799. package/types/slider.type.d.ts +246 -0
  800. package/types/split.type.d.ts +2 -0
  801. package/types/standard-list-item.type.d.ts +2 -0
  802. package/types/statistic.type.d.ts +52 -0
  803. package/types/steps.type.d.ts +95 -0
  804. package/types/switch.type.d.ts +117 -0
  805. package/types/tab-bar.type.d.ts +43 -0
  806. package/types/tab-dropdown.type.d.ts +2 -0
  807. package/types/tab-item-mf.type.d.ts +2 -0
  808. package/types/tab-item.type.d.ts +70 -0
  809. package/types/tab-nav.type.d.ts +112 -0
  810. package/types/tabbar-item.type.d.ts +2 -0
  811. package/types/tabbar.type.d.ts +2 -0
  812. package/types/table.type.d.ts +2 -0
  813. package/types/tabs-mf.type.d.ts +2 -0
  814. package/types/tabs.type.d.ts +161 -0
  815. package/types/tag-group.type.d.ts +65 -0
  816. package/types/tag.type.d.ts +67 -0
  817. package/types/tall-storage.type.d.ts +2 -0
  818. package/types/text-popup.type.d.ts +2 -0
  819. package/types/time-line.type-9fb16096.d.ts +327 -0
  820. package/types/time-line.type.d.ts +4 -0
  821. package/types/time-panel.type.d.ts +2 -0
  822. package/types/time-picker-mobile.type.d.ts +2 -0
  823. package/types/time-range.type.d.ts +2 -0
  824. package/types/time-spinner.type.d.ts +2 -0
  825. package/types/time.type.d.ts +2 -0
  826. package/types/timeline-item.type.d.ts +4 -0
  827. package/types/toast.type.d.ts +63 -0
  828. package/types/toggle-menu.type.d.ts +2 -0
  829. package/types/tooltip.type.d.ts +185 -0
  830. package/types/top-box.type.d.ts +2 -0
  831. package/types/transfer-panel.type.d.ts +2 -0
  832. package/types/transfer.type.d.ts +186 -0
  833. package/types/tree-menu.type.d.ts +242 -0
  834. package/types/tree-node.type.d.ts +2 -0
  835. package/types/tree.type.d.ts +2 -0
  836. package/types/upload-dragger.type.d.ts +50 -0
  837. package/types/upload-list.type-eaf82b7a.d.ts +1213 -0
  838. package/types/upload-list.type.d.ts +3 -0
  839. package/types/upload.type.d.ts +3 -0
  840. package/types/user-account.type.d.ts +2 -0
  841. package/types/user-contact.type.d.ts +128 -0
  842. package/types/user-head-group.type.d.ts +2 -0
  843. package/types/user-head.type.d.ts +151 -0
  844. package/types/user-link.type.d.ts +2 -0
  845. package/types/user.type.d.ts +2 -0
  846. package/types/watermark.type.d.ts +33 -0
  847. package/types/wheel.type.d.ts +2 -0
  848. package/types/wizard.type.d.ts +96 -0
  849. package/types/year-range.type.d.ts +2 -0
  850. package/types/year-table.type.d.ts +2 -0
  851. package/upload/index.js +405 -0
  852. package/upload/vue.js +81 -0
  853. package/upload-dragger/index.js +72 -0
  854. package/upload-dragger/vue.js +26 -0
  855. package/upload-list/index.js +256 -0
  856. package/upload-list/vue.js +128 -0
  857. package/user/index.js +532 -0
  858. package/user/vue.js +76 -0
  859. package/user-account/index.js +18 -0
  860. package/user-account/vue.js +22 -0
  861. package/user-contact/index.js +57 -0
  862. package/user-contact/vue.js +29 -0
  863. package/user-head/index.js +73 -0
  864. package/user-head/vue.js +39 -0
  865. package/user-head-group/index.js +20 -0
  866. package/user-head-group/vue.js +30 -0
  867. package/user-link/index.js +42 -0
  868. package/user-link/vue.js +42 -0
  869. package/virtual-scroll-box/index.js +294 -0
  870. package/virtual-scroll-box/vue.js +43 -0
  871. package/virtual-tree/index.js +168 -0
  872. package/virtual-tree/vue.js +53 -0
  873. package/watermark/index.js +213 -0
  874. package/watermark/vue.js +27 -0
  875. package/wheel/index.js +165 -0
  876. package/wheel/vue.js +79 -0
  877. package/wizard/index.js +107 -0
  878. package/wizard/vue.js +48 -0
  879. package/year-range/index.js +125 -0
  880. package/year-range/vue.js +88 -0
  881. package/year-table/index.js +185 -0
  882. package/year-table/vue.js +43 -0
@@ -0,0 +1,76 @@
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 getFunnelTooltip = (dataType, digit) => {
6
+ function formatter(item) {
7
+ let tpl = [];
8
+ tpl.push(itemPoint(item.color));
9
+ tpl.push(`${itemLabel(item.name)}${itemContent(getFormated(item.data.realValue, dataType, digit))}`);
10
+ return tpl.join("");
11
+ }
12
+ return { trigger: "item", formatter };
13
+ };
14
+ const getFunnelLegend = (args) => {
15
+ const { data, legendName } = args;
16
+ function formatter(name) {
17
+ return isNull(legendName[name]) ? name : legendName[name];
18
+ }
19
+ return { data, formatter };
20
+ };
21
+ const getFunnelSeries = (args) => {
22
+ const { ascending, dimension, itemStyle, label, labelLine, metrics, rows, sequence, useDefaultOrder } = args;
23
+ let { series = { type: "funnel" }, falseFunnel = false } = {};
24
+ series.minSize = 8;
25
+ let innerRows = rows.sort((a, b) => sequence.indexOf(a[dimension]) - sequence.indexOf(b[dimension]));
26
+ innerRows.some((row, index) => index && row[metrics] > innerRows[index - 1][metrics] && (falseFunnel = true));
27
+ const step = 100 / innerRows.length;
28
+ if (falseFunnel && !useDefaultOrder) {
29
+ const handler = (row, index) => ({ name: row[dimension], value: (index + 1) * step, realValue: row[metrics] });
30
+ series.data = innerRows.slice().reverse().map(handler);
31
+ } else {
32
+ series.data = innerRows.map((row) => ({ name: row[dimension], value: row[metrics], realValue: row[metrics] }));
33
+ }
34
+ let total = 0;
35
+ rows.forEach((row) => {
36
+ total += row[metrics];
37
+ });
38
+ series.label = {
39
+ position: "inside",
40
+ color: "#fff",
41
+ formatter(item) {
42
+ let { value } = item;
43
+ return `${Number(value / total).toFixed(2) * 100}%`;
44
+ }
45
+ };
46
+ ascending && (series.sort = "ascending");
47
+ label && (series.label = label);
48
+ labelLine && (series.labelLine = labelLine);
49
+ itemStyle && (series.itemStyle = itemStyle);
50
+ return series;
51
+ };
52
+ const funnel = (outerColumns, outerRows, settings, extra) => {
53
+ const { columns = outerColumns.slice(), rows = outerRows.slice() } = {};
54
+ const { dataType = "normal", dimension = columns[0], sequence = rows.map((row) => row[dimension]) } = settings;
55
+ const { digit = 2, ascending, label, labelLine, legendName = {}, itemStyle, filterZero, useDefaultOrder } = settings;
56
+ const { tooltipVisible, legendVisible } = extra;
57
+ let metrics;
58
+ if (settings.metrics) {
59
+ metrics = settings.metrics;
60
+ } else {
61
+ let temp = columns.slice();
62
+ temp.splice(columns.indexOf(dimension), 1);
63
+ metrics = temp[0];
64
+ }
65
+ let innerRows = rows.sort((a, b) => sequence.indexOf(a[dimension]) - sequence.indexOf(b[dimension]));
66
+ filterZero && (innerRows = innerRows.filter((row) => row[metrics]));
67
+ const tooltip = tooltipVisible && getFunnelTooltip(dataType, digit);
68
+ const legend = legendVisible && getFunnelLegend({ data: innerRows.map((row) => row[dimension]), legendName });
69
+ const seriesParam = { dimension, metrics, rows: innerRows, sequence, ascending };
70
+ Object.assign(seriesParam, { label, labelLine, itemStyle, filterZero, useDefaultOrder });
71
+ const series = getFunnelSeries(seriesParam);
72
+ return { tooltip, legend, series };
73
+ };
74
+ export {
75
+ funnel
76
+ };
@@ -0,0 +1,81 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ import { getFormated, isObject } from "../chart-core/deps/utils";
3
+ import { isNull } from "../common/type";
4
+ import { itemLabel, itemContent } from "../chart-core/deps/constants";
5
+ const getTooltip = (args) => {
6
+ const { dataType, digit, tooltipFormatter } = args;
7
+ return {
8
+ formatter(options) {
9
+ if (tooltipFormatter) {
10
+ return tooltipFormatter.apply(null, arguments);
11
+ }
12
+ const tpl = [];
13
+ const { seriesName, data } = options;
14
+ const { value, name } = data;
15
+ tpl.push(`${itemLabel(seriesName)}`);
16
+ tpl.push(`${itemContent(getFormated(value, dataType[seriesName], digit))} ${name}`);
17
+ return tpl.join("");
18
+ }
19
+ };
20
+ };
21
+ const getPoint = () => ({
22
+ show: false,
23
+ width: 10,
24
+ length: 10,
25
+ icon: "path://M511.999488 819.413462 72.8374 204.586538 951.1626 204.586538Z",
26
+ offsetCenter: [0, "-106%"],
27
+ itemStyle: { color: "auto" }
28
+ });
29
+ function getSeries(args) {
30
+ const { dataName, dataType, digit, dimension, labelMap, metrics, rows, seriesMap } = args;
31
+ const series = rows.map((row) => {
32
+ const label = row[dimension];
33
+ const seriesItem = seriesMap[label];
34
+ const formatter2 = function(value) {
35
+ return getFormated(value, dataType[label], digit);
36
+ };
37
+ const result = {
38
+ type: "gauge",
39
+ name: !isNull(labelMap[label]) ? labelMap[label] : label,
40
+ data: [{ name: dataName[label] || "", value: row[metrics] }],
41
+ detail: {
42
+ fontSize: 60,
43
+ color: "#191919",
44
+ offsetCenter: [0, 0],
45
+ valueAnimation: true,
46
+ formatter: !dataType ? "{value}" : (value) => {
47
+ const res = getFormated(value, dataType[label], digit);
48
+ return dataType[label] === "percent" ? res.split("%")[0] + "{percent|%}" : res;
49
+ },
50
+ rich: { percent: { fontSize: 12, color: "#4e4e4e", padding: [0, 0, -20, 0] } }
51
+ },
52
+ axisLabel: { formatter: formatter2 },
53
+ itemStyle: { color: "#6D8FF0" },
54
+ pointer: getPoint(),
55
+ axisLine: { roundCap: true, lineStyle: { width: 8, color: [[1, "rgba(25,25,25,0.1)"]] } },
56
+ progress: { show: true, roundCap: true, width: 8, color: "#6D8FF0" },
57
+ axisTick: { show: false },
58
+ splitLine: { length: 8, distance: 0, lineStyle: { width: 1, color: "rgba(25,25,25,0.1)" } },
59
+ title: { offsetCenter: [0, "25%"], color: "#191919", fontSize: 14 }
60
+ };
61
+ if (seriesItem) {
62
+ Object.keys(seriesItem).forEach(
63
+ (key) => isObject(result[key]) ? Object.assign(result[key], seriesItem[key]) : result[key] = seriesItem[key]
64
+ );
65
+ }
66
+ return result;
67
+ });
68
+ return series;
69
+ }
70
+ const gauge = (columns, rows, settings, extra) => {
71
+ const { dataName = {}, dataType = {}, digit = 2, labelMap = {} } = settings;
72
+ const { dimension = columns[0], metrics = columns[1], seriesMap = {} } = settings;
73
+ const { tooltipFormatter, tooltipVisible } = extra;
74
+ const tooltip = tooltipVisible && getTooltip({ tooltipFormatter, dataType });
75
+ const seriesParams = { rows, dimension, metrics, digit, dataType, labelMap, seriesMap, dataName };
76
+ const series = getSeries(seriesParams);
77
+ return { tooltip, series };
78
+ };
79
+ export {
80
+ gauge
81
+ };
@@ -0,0 +1,27 @@
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, dataType } = item;
8
+ color && tpl.push(itemPoint(color));
9
+ tpl.push(itemLabel(`${name}`, !value));
10
+ if (dataType === "node") {
11
+ value && tpl.push(`${itemContent(value)}<br />`);
12
+ }
13
+ return tpl.join("");
14
+ }
15
+ });
16
+ const getGraphSeries = () => [
17
+ { type: "graph", label: { textBorderWidth: 1, color: "#fff", textBorderColor: "inherit" } }
18
+ ];
19
+ const graph = (columns, rows, settings, extra) => {
20
+ const { tooltipVisible } = extra;
21
+ const tooltip = tooltipVisible && getTooltip({});
22
+ const series = getGraphSeries();
23
+ return { tooltip, series };
24
+ };
25
+ export {
26
+ graph
27
+ };
@@ -0,0 +1,168 @@
1
+ import {
2
+ __spreadValues
3
+ } from "../chunk-G2ADBYYC.js";
4
+ import { getFormated, getBmap, getAmap, getMapJSON } from "../chart-core/deps/utils";
5
+ import { HEAT_MAP_COLOR, HEAT_DEFAULT_COLOR, itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
6
+ const getAxisList = (rows, label) => {
7
+ const result = [];
8
+ rows.forEach((row) => !result.includes(row[label]) && result.push(row[label]));
9
+ return result;
10
+ };
11
+ const getData = (args) => {
12
+ const { extraMetrics, innerXAxisList, innerYAxisList, metrics, rows, type, xDim, yDim } = args;
13
+ let result = null;
14
+ if (type !== "cartesian") {
15
+ result = rows.map((row) => ({ value: [row[xDim], row[yDim], metrics ? row[metrics] : 1] }));
16
+ } else {
17
+ result = rows.map((row) => {
18
+ let { xIndex, yIndex, value, extra } = {};
19
+ yIndex = innerYAxisList.indexOf(row[yDim]);
20
+ xIndex = innerXAxisList.indexOf(row[xDim]);
21
+ extra = extraMetrics.map((m) => row[m] || "-");
22
+ value = metrics ? row[metrics] : 1;
23
+ return { value: [xIndex, yIndex, value].concat(extra) };
24
+ });
25
+ }
26
+ return result;
27
+ };
28
+ let getAxis = (list, name, type) => ({
29
+ data: list,
30
+ name,
31
+ nameLocation: "end",
32
+ type: "category",
33
+ splitArea: { show: false },
34
+ splitLine: { show: true, lineStyle: { color: "#6d8ff0" } },
35
+ axisLabel: { show: true, color: "#4E4E4E" },
36
+ offset: type === "y" ? 25 : 5,
37
+ zlevel: 1
38
+ });
39
+ const getVisualMap = (args) => {
40
+ const { innerMin: min, innerMax: max, type, heatColor, series, visualMapConfig } = args;
41
+ let { extra } = {};
42
+ if (type === "map") {
43
+ extra = {};
44
+ !series[0].data.length && (extra.show = false);
45
+ } else if (type === "bmap" || type === "amap") {
46
+ extra = { show: false };
47
+ } else {
48
+ extra = { dimension: 2 };
49
+ }
50
+ const visualMapColor = visualMapConfig && visualMapConfig.color;
51
+ const defaultColor = type === "map" || type === "bmap" || type === "amap" ? HEAT_MAP_COLOR : visualMapColor || HEAT_DEFAULT_COLOR;
52
+ let result = Object.assign(extra, {
53
+ min,
54
+ max,
55
+ calculable: true,
56
+ left: "right",
57
+ bottom: "center",
58
+ orient: "vertical",
59
+ align: "left",
60
+ borderColor: "#6D8FF0",
61
+ inverse: true
62
+ });
63
+ if (type !== "cartesian" || !visualMapColor) {
64
+ Object.assign(result, {
65
+ inRange: { color: heatColor || defaultColor }
66
+ });
67
+ }
68
+ return Object.assign(result, visualMapConfig);
69
+ };
70
+ const getSeries = (args) => [{ type: "heatmap", data: args.chartData, label: { show: true, color: "#191919" } }];
71
+ const getTooltip = (args) => {
72
+ const { dataType, innerXAxisList, innerYAxisList, digit, extraMetrics, metrics } = args;
73
+ function formatter({ color, data }) {
74
+ let { value: dataVal } = data;
75
+ let [xDim, yDim, value, ...extraData] = dataVal;
76
+ const tplt = [itemContent(`${innerXAxisList[xDim]} ~ ${innerYAxisList[yDim]}<br>`)];
77
+ extraMetrics.forEach((m, index) => tplt.push(`${m}: ${extraData[index]}<br>`));
78
+ tplt.push(`${itemPoint(color)}${itemLabel(metrics)}${itemContent(getFormated(value, dataType, digit))}<br>`);
79
+ return tplt.join("");
80
+ }
81
+ return { trigger: "item", formatter };
82
+ };
83
+ const fixParam = ({ type, rows, dimension, metrics, extraMetrics, chartData, innerXAxisList, innerYAxisList }) => {
84
+ let chartDataParams;
85
+ if (type !== "cartesian") {
86
+ chartDataParams = { rows, xDim: dimension[0], yDim: dimension[1] };
87
+ Object.assign(chartDataParams, { metrics, type, extraMetrics });
88
+ chartData = getData(chartDataParams);
89
+ } else {
90
+ let flag = !innerXAxisList || !innerXAxisList.length;
91
+ flag && (innerXAxisList = getAxisList(rows, dimension[0]));
92
+ flag = !innerYAxisList || !innerYAxisList.length;
93
+ flag && (innerYAxisList = getAxisList(rows, dimension[1]));
94
+ chartDataParams = { xDim: dimension[0], yDim: dimension[1], rows };
95
+ Object.assign(chartDataParams, { innerXAxisList, innerYAxisList, metrics, type, extraMetrics });
96
+ chartData = getData(chartDataParams);
97
+ }
98
+ return { chartData, innerXAxisList, innerYAxisList };
99
+ };
100
+ const getResult = (args) => {
101
+ let { type, options, pointSize, blurSize, res, key, v, url, bmap, mapOrigin, geo, beforeRegisterMap } = args;
102
+ let { echarts, specialAreas, position, positionJsonLink, beforeRegisterMapOnce } = args;
103
+ let { mapURLProfix, amap, tooltip, xAxis, yAxis } = args;
104
+ if (type === "bmap") {
105
+ Object.assign(options.series[0], { coordinateSystem: "bmap", pointSize, blurSize });
106
+ res = getBmap({ key, version: v, url }).then(() => __spreadValues({ bmap }, options));
107
+ } else if (type === "map") {
108
+ options.series[0].coordinateSystem = "geo";
109
+ let jsonStr = JSON.stringify(mapOrigin);
110
+ if (jsonStr) {
111
+ const geoAttr = __spreadValues({ map: jsonStr }, geo);
112
+ beforeRegisterMap && (jsonStr = beforeRegisterMap(mapOrigin));
113
+ echarts.registerMap(jsonStr, { geoJSON: mapOrigin }, specialAreas);
114
+ res = new Promise((resolve) => resolve(__spreadValues({ geo: geoAttr }, options)));
115
+ } else {
116
+ let params = { position, positionJsonLink, beforeRegisterMapOnce, mapURLProfix };
117
+ res = getMapJSON(params).then((json) => {
118
+ const geoAttr = __spreadValues({ map: position }, geo);
119
+ beforeRegisterMap && (json = beforeRegisterMap(json));
120
+ echarts.registerMap(position, { geoJSON: json }, specialAreas);
121
+ return __spreadValues({ geo: geoAttr }, options);
122
+ });
123
+ }
124
+ } else if (type === "amap") {
125
+ Object.assign(options.series[0], { coordinateSystem: "amap", pointSize, blurSize });
126
+ res = getAmap(key, v).then(() => __spreadValues({ amap }, options));
127
+ } else {
128
+ res = __spreadValues({ tooltip, xAxis, yAxis }, options);
129
+ }
130
+ return res;
131
+ };
132
+ const heatmap = (columns, rows, settings, extra, extend) => {
133
+ const { type = "cartesian" } = settings;
134
+ const { dimension = [columns[0], columns[1]] } = settings;
135
+ const { dataType = "normal", min, max, digit, bmap, amap, geo, key, v = "2.0", url } = settings;
136
+ const { position, mapOrigin, positionJsonLink, beforeRegisterMap, pointSize = 10, blurSize = 5 } = settings;
137
+ const { heatColor, yAxisName, xAxisName, beforeRegisterMapOnce, specialAreas = {} } = settings;
138
+ const { metrics = columns[2], mapURLProfix = "https://unpkg.com/echarts@3.6.2/map/json/" } = settings;
139
+ const { tooltipVisible, echartsLib: echarts } = extra;
140
+ const visualMapConfig = extend && extend.visualMap;
141
+ let { xAxisList: innerXAxisList, yAxisList: innerYAxisList } = settings;
142
+ let { chartData = [], extraMetrics = [], mainColumn = dimension.concat([metrics]) } = {};
143
+ columns.forEach((column) => !~mainColumn.indexOf(column) && extraMetrics.push(column));
144
+ let ret = fixParam({ type, rows, dimension, metrics, extraMetrics, chartData, innerXAxisList, innerYAxisList });
145
+ chartData = ret.chartData;
146
+ innerXAxisList = ret.innerXAxisList;
147
+ innerYAxisList = ret.innerYAxisList;
148
+ let metricsList = metrics ? rows.map((row) => row[metrics]) : [0, 5];
149
+ !metricsList.length && (metricsList = [0]);
150
+ const innerMin = min || Math.min.apply(null, metricsList);
151
+ const innerMax = max || Math.max.apply(null, metricsList);
152
+ const xAxis = getAxis(innerXAxisList, xAxisName, "x");
153
+ const yAxis = getAxis(innerYAxisList, yAxisName, "y");
154
+ const series = getSeries({ chartData });
155
+ const visualMap = getVisualMap({ innerMin, innerMax, type, heatColor, series, visualMapConfig });
156
+ const tooltipParams = { dataType, innerXAxisList, innerYAxisList, digit, extraMetrics, metrics };
157
+ const tooltip = tooltipVisible && getTooltip(tooltipParams);
158
+ const options = { visualMap, series, grid: { left: 25, right: 80, width: "auto", height: "auto" } };
159
+ let res;
160
+ let args = { type, options, pointSize, blurSize, res, key, v, url, bmap, mapOrigin, geo, beforeRegisterMap };
161
+ Object.assign(args, { echarts, specialAreas, position, positionJsonLink, beforeRegisterMapOnce });
162
+ Object.assign(args, { mapURLProfix, amap, tooltip, xAxis, yAxis });
163
+ res = getResult(args);
164
+ return res;
165
+ };
166
+ export {
167
+ heatmap
168
+ };
@@ -0,0 +1,166 @@
1
+ import {
2
+ __spreadValues
3
+ } from "../chunk-G2ADBYYC.js";
4
+ import { getFormated, getStackMap, getLegend, hexToRgb, set } from "../chart-core/deps/utils";
5
+ import { isNull } from "../common/type";
6
+ import { itemPoint, itemLabel, itemContent, SAAS_DEFAULT_COLORS } from "../chart-core/deps/constants";
7
+ const getLineXAxis = (args) => {
8
+ const { xAxisType, dimension, rows, xAxisName, axisVisible } = args;
9
+ return dimension.map((item, idx) => ({
10
+ nameLocation: "middle",
11
+ type: xAxisType,
12
+ name: xAxisName[idx] || "",
13
+ nameGap: 22,
14
+ show: axisVisible,
15
+ data: rows.map((row) => row[item]),
16
+ axisTick: { show: true, lineStyle: { color: "#191919", opacity: 0.1, width: 2 }, alignWithLabel: true },
17
+ axisLine: { show: true, lineStyle: { color: "#191919", opacity: 0.1, width: 2 } },
18
+ axisPointer: { show: true, type: "line", lineStyle: { color: "#191919", opacity: 0.3, type: "solid" } }
19
+ }));
20
+ };
21
+ const getAreaSeries = ({ color, seriesItem }) => {
22
+ const colorStops = [
23
+ { offset: 0, color: `rgba(${hexToRgb(color)}, 0.5)` },
24
+ { offset: 1, color: `rgba(${hexToRgb(color)}, 0.1)` }
25
+ ];
26
+ seriesItem.areaStyle = { color: { type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops } };
27
+ };
28
+ const setSingLineSeries = ({ defaultSeriesItem, seriesItem }) => {
29
+ defaultSeriesItem.showSymbol = true;
30
+ set(defaultSeriesItem, "emphasis.itemStyle.color", SAAS_DEFAULT_COLORS[0]);
31
+ seriesItem.label = __spreadValues({ show: true }, seriesItem.label);
32
+ seriesItem.itemStyle = __spreadValues({ color: "transparent" }, seriesItem.itemStyle);
33
+ seriesItem.lineStyle = __spreadValues({ color: SAAS_DEFAULT_COLORS[0] }, seriesItem.lineStyle);
34
+ seriesItem.animation = seriesItem.animation || false;
35
+ };
36
+ const getLineSeries = (args) => {
37
+ const { areaStyle, axisSite, area, dimension, itemStyle, label } = args;
38
+ const { labelMap, lineStyle, metrics, nullAddZero, rows, stack, color, smooth } = args;
39
+ const dataTempObj = {};
40
+ const stackMapData = stack && getStackMap(stack);
41
+ let series = [];
42
+ metrics.forEach((item) => dataTempObj[item] = []);
43
+ rows.forEach((row) => {
44
+ metrics.forEach((item) => {
45
+ let value = null;
46
+ if (!isNull(row[item])) {
47
+ value = row[item];
48
+ } else if (nullAddZero) {
49
+ value = 0;
50
+ }
51
+ dataTempObj[item].push([row[dimension[0]], value]);
52
+ });
53
+ });
54
+ metrics.forEach((item, i) => {
55
+ let name = !isNull(labelMap[item]) ? labelMap[item] : item;
56
+ const isSmooth = !(smooth === false);
57
+ let seriesItem = { smooth: isSmooth, name, type: "line", data: dataTempObj[item] };
58
+ const emphasis = { itemStyle: { borderColor: "#fff", borderWidth: 2 } };
59
+ let defaultSeriesItem = { symbol: "circle", symbolSize: 8, showSymbol: false, emphasis };
60
+ area && getAreaSeries({ color: color[i], seriesItem });
61
+ metrics.length === 1 && !isSmooth && setSingLineSeries({ defaultSeriesItem, seriesItem });
62
+ seriesItem = Object.assign(defaultSeriesItem, seriesItem);
63
+ axisSite.right && (seriesItem.yAxisIndex = ~axisSite.right.indexOf(item) ? 1 : 0);
64
+ stack && stackMapData[item] && (seriesItem.stack = stackMapData[item]);
65
+ label && (seriesItem.label = label);
66
+ itemStyle && (seriesItem.itemStyle = itemStyle);
67
+ lineStyle && (seriesItem.lineStyle = lineStyle);
68
+ areaStyle && (seriesItem.areaStyle = areaStyle);
69
+ series.push(seriesItem);
70
+ });
71
+ return series;
72
+ };
73
+ const getLineYAxis = (args) => {
74
+ const { yAxisType, yAxisName, scale, axisVisible, max, min, digit } = args;
75
+ const yAxisBase = {
76
+ type: "value",
77
+ show: axisVisible,
78
+ axisTick: {
79
+ show: false
80
+ }
81
+ };
82
+ let yAxis = [];
83
+ for (let k = 0; k < 2; k++) {
84
+ if (yAxisType[k]) {
85
+ yAxis[k] = Object.assign({}, yAxisBase, {
86
+ axisLabel: {
87
+ formatter(val) {
88
+ return getFormated(val, yAxisType[k], digit);
89
+ }
90
+ }
91
+ });
92
+ } else {
93
+ yAxis[k] = Object.assign({}, yAxisBase);
94
+ }
95
+ yAxis[k].name = yAxisName[k] || "";
96
+ yAxis[k].scale = scale[k] || false;
97
+ yAxis[k].min = min[k] || null;
98
+ yAxis[k].max = max[k] || null;
99
+ }
100
+ return yAxis;
101
+ };
102
+ const getLineTooltip = (args) => {
103
+ const { axisSite, yAxisType, digit, labelMap, tooltipFormatter } = args;
104
+ const rightItemsArr = axisSite.right || [];
105
+ const rightListArr = labelMap ? rightItemsArr.map((item) => labelMap[item] === void 0 ? item : labelMap[item]) : rightItemsArr;
106
+ return {
107
+ formatter(items) {
108
+ if (tooltipFormatter) {
109
+ return tooltipFormatter.apply(null, arguments);
110
+ }
111
+ let template = [];
112
+ const { name, axisValueLabel } = items[0];
113
+ const title = name || axisValueLabel;
114
+ template.push(`${title}<br>`);
115
+ items.forEach(({ seriesName, data, color }) => {
116
+ if (color === "transparent" && items.length === 1) {
117
+ color = SAAS_DEFAULT_COLORS[0];
118
+ }
119
+ let showData = null;
120
+ const type = ~rightListArr.indexOf(seriesName) ? yAxisType[1] : yAxisType[0];
121
+ const itemData = Array.isArray(data) ? data[1] : data;
122
+ showData = getFormated(itemData, type, digit);
123
+ template.push(itemPoint(color));
124
+ template.push(`${itemLabel(seriesName)}${itemContent(showData)}`);
125
+ template.push("<br>");
126
+ });
127
+ return template.join("");
128
+ },
129
+ trigger: "axis"
130
+ };
131
+ };
132
+ const line = (columns, rows, settings, extra) => {
133
+ rows = Array.isArray(rows) ? rows : [];
134
+ columns = Array.isArray(columns) ? columns : [];
135
+ const { axisSite = {}, yAxisType = ["normal", "normal"], xAxisType = "category", yAxisName = [] } = settings;
136
+ const { dimension = [columns[0]], xAxisName = [], axisVisible = true, area, stack } = settings;
137
+ const { scale = [false, false], min = [null, null], max = [null, null], nullAddZero = false, digit = 2 } = settings;
138
+ const { legendName = {}, labelMap = {}, label, itemStyle, lineStyle, areaStyle, smooth } = settings;
139
+ const { tooltipVisible, legendVisible, tooltipFormatter, color } = extra;
140
+ let metrics = columns.slice();
141
+ if (axisSite.right && axisSite.left) {
142
+ metrics = axisSite.left.concat(axisSite.right);
143
+ } else if (settings.metrics) {
144
+ metrics = settings.metrics;
145
+ } else if (axisSite.left && !axisSite.right) {
146
+ metrics = axisSite.left;
147
+ } else {
148
+ metrics.splice(columns.indexOf(dimension[0]), 1);
149
+ }
150
+ let legendItemStyle;
151
+ if (metrics.length === 1) {
152
+ legendItemStyle = { itemStyle: { color: SAAS_DEFAULT_COLORS[0] } };
153
+ }
154
+ const legend = legendVisible && getLegend({ legendName, metrics, labelMap, legendItemStyle });
155
+ const tooltip = tooltipVisible && getLineTooltip({ axisSite, digit, labelMap, tooltipFormatter, xAxisType, yAxisType });
156
+ const xAxis = getLineXAxis({ axisVisible, dimension, xAxisName, xAxisType, rows });
157
+ const yAxis = getLineYAxis({ axisVisible, digit, max, min, scale, yAxisType, yAxisName });
158
+ const seriesParam = { areaStyle, area, axisSite, dimension, itemStyle, lineStyle };
159
+ Object.assign(seriesParam, { label, labelMap, metrics, nullAddZero, rows, xAxisType, stack, color, smooth });
160
+ const series = getLineSeries(seriesParam);
161
+ let options = { legend, xAxis, series, yAxis, tooltip };
162
+ return options;
163
+ };
164
+ export {
165
+ line
166
+ };
@@ -0,0 +1,54 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ import { getFormated, isObject } from "../chart-core/deps/utils";
3
+ import { itemLabel, itemContent } from "../chart-core/deps/constants";
4
+ const isArr = Array.isArray;
5
+ const getTooltip = (args) => {
6
+ const { tooltipFormatter, dataType, digit } = args;
7
+ function formatter(options) {
8
+ const { seriesName, value } = options;
9
+ if (!tooltipFormatter) {
10
+ return [`${itemLabel(seriesName)}`, itemContent(getFormated(value, dataType, digit))].join("");
11
+ }
12
+ return tooltipFormatter.apply(null, arguments);
13
+ }
14
+ return { show: true, formatter };
15
+ };
16
+ const getSeries = (args) => {
17
+ const { dimension, metrics, rows, seriesMap, wave } = args;
18
+ let itemWave = wave;
19
+ let len = isArr(seriesMap) ? seriesMap.length : 0;
20
+ return rows.slice().map((item, index) => {
21
+ let { data = [], result = { type: "liquidFill" }, name = item[dimension] } = {};
22
+ let { val = Number(item[metrics]), itemMap = {} } = {};
23
+ if (isArr(seriesMap)) {
24
+ itemMap = seriesMap[index] ? seriesMap[index] : seriesMap[len - 1];
25
+ } else if (isObject(seriesMap[name])) {
26
+ itemMap = seriesMap[name];
27
+ }
28
+ if (isArr(wave) && isArr(wave[0])) {
29
+ itemWave = !isArr(wave[index]) ? wave[wave.length - 1] : wave[index];
30
+ }
31
+ data.push({ value: val });
32
+ if (itemWave.length && itemWave) {
33
+ data = data.concat(itemWave.map((val2) => ({ value: val2 })));
34
+ }
35
+ result.itemStyle = { shadowBlur: 0 };
36
+ result.label = { color: "#6D8FF0" };
37
+ result.backgroundStyle = { color: "#F4F3F9" };
38
+ result.outline = { itemStyle: { borderColor: "#6D8FF0", shadowBlur: 0 } };
39
+ !itemMap.color && (result.itemStyle = Object.assign(result.itemStyle, { color: "#6D8FF0" }));
40
+ result = Object.assign(result, { data, name }, itemMap);
41
+ return result;
42
+ });
43
+ };
44
+ const liquidfill = (columns, rows, settings, extra) => {
45
+ const { dimension = columns[0], metrics = columns[1] } = settings;
46
+ const { seriesMap = {}, dataType = "percent", digit = 2, wave = [] } = settings;
47
+ const { tooltipVisible, tooltipFormatter } = extra;
48
+ const tooltip = tooltipVisible && getTooltip({ tooltipFormatter, dataType, digit });
49
+ const series = getSeries({ rows, columns, dimension, metrics, seriesMap, wave });
50
+ return { tooltip, series };
51
+ };
52
+ export {
53
+ liquidfill
54
+ };