vue-data-ui 2.3.28 → 2.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/{Arrow-C6lQ94rK.cjs → Arrow-B8z06v67.cjs} +1 -1
- package/dist/{Arrow-BPoxM_Tq.js → Arrow-Bh7WeO_g.js} +1 -1
- package/dist/{BaseIcon-Op8_v5x7.js → BaseIcon-BG_bJS3R.js} +1 -1
- package/dist/{BaseIcon-BK5xYOzV.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
- package/dist/{DataTable-bEXuvNn5.js → DataTable-CsPidn0_.js} +23 -20
- package/dist/DataTable-Doh_4M84.cjs +1 -0
- package/dist/{Legend-BNfS77GS.cjs → Legend-B20rRwGi.cjs} +1 -1
- package/dist/{Legend-DwludSgp.js → Legend-CkQ_zypV.js} +1 -1
- package/dist/{Shape-COYAxpcP.js → Shape-B4gGeBLI.js} +1 -1
- package/dist/{Shape-CcWWIf-s.cjs → Shape-B8O8_E6l.cjs} +1 -1
- package/dist/{Slicer-DGkm-5p-.cjs → Slicer-BXveU40S.cjs} +1 -1
- package/dist/{Slicer-Cv-2s_-r.js → Slicer-DaEfxscP.js} +1 -1
- package/dist/{Title-DQz9dO4d.cjs → Title-BU6E8Xld.cjs} +1 -1
- package/dist/{Title-CtWGLaoz.js → Title-eBTH8iGJ.js} +1 -1
- package/dist/{Tooltip-D6BUVHr1.js → Tooltip-B11OahTD.js} +1 -1
- package/dist/{Tooltip-DQgBkgFk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
- package/dist/{index-BhCM2QF1.js → index-BlXzlBwZ.js} +443 -364
- package/dist/index-hKWfT7Wa.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +65 -0
- package/dist/types/vue-data-ui.d.ts +65 -0
- package/dist/{useNestedProp-CH3PVhvc.js → useNestedProp-BoNl5H_z.js} +1 -1
- package/dist/{useNestedProp-C2H2jmU6.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
- package/dist/{usePrinter-B75HLwzw.js → usePrinter-CZ8F5Cth.js} +1 -1
- package/dist/{usePrinter-DTF28E03.cjs → usePrinter-DoYKBzst.cjs} +1 -1
- package/dist/{vue-data-ui-DdhV5Pth.js → vue-data-ui-BOqzG_nZ.js} +57 -57
- package/dist/{vue-data-ui-cqeqQWwY.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +6 -6
- package/dist/{vue-ui-3d-bar-gi0fEJUl.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
- package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
- package/dist/{vue-ui-accordion-CVrj6roI.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSZdj7wA.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
- package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CFSWDX3d.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
- package/dist/{vue-ui-annotator-DqZU11ky.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
- package/dist/{vue-ui-annotator-u5YbenPl.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C3xswSm3.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dph2PhZC.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
- package/dist/{vue-ui-carousel-table-0S6lSZnt.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-eY08SE2G.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
- package/dist/{vue-ui-chestnut-BikYCrjQ.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
- package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
- package/dist/{vue-ui-cursor-OFgeAFSo.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
- package/dist/{vue-ui-cursor-DUA57VkZ.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BTG0m9YL.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DA4M1Z0-.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
- package/dist/{vue-ui-digits-55Zmunkv.js → vue-ui-digits-CmSFSs5S.js} +2 -2
- package/dist/{vue-ui-digits-COxRiMVI.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
- package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
- package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
- package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
- package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
- package/dist/{vue-ui-dumbbell-BSFT-Bce.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BtEXt5Ox.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
- package/dist/{vue-ui-flow-BPEGOFRZ.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
- package/dist/{vue-ui-flow-BBoXBTkC.js → vue-ui-flow-wq0aqc5r.js} +98 -93
- package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
- package/dist/{vue-ui-galaxy-ZFEufIyy.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
- package/dist/{vue-ui-gauge-CfZ9XJW_.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-BqZp_V5m.js → vue-ui-gauge-CIN265dN.js} +158 -149
- package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
- package/dist/{vue-ui-gizmo-DitbWAJp.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
- package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
- package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
- package/dist/{vue-ui-kpi-BWuzEkyY.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
- package/dist/{vue-ui-kpi-B2Bo26hh.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwAWiK3k.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
- package/dist/{vue-ui-mini-loader-C_Nb-qVd.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
- package/dist/{vue-ui-molecule-CSbXNrvu.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
- package/dist/{vue-ui-molecule-BD2UW2lJ.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
- package/dist/{vue-ui-mood-radar-CbMab8pJ.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
- package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-SDaiotgC.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
- package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
- package/dist/{vue-ui-onion-BamHJBdP.js → vue-ui-onion-B_khL0Kv.js} +230 -196
- package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1R4CyBdQ.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
- package/dist/{vue-ui-quadrant-CKCLhAS7.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
- package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
- package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
- package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
- package/dist/{vue-ui-radar-BY-y8Mal.js → vue-ui-radar-B2vAPYa7.js} +237 -214
- package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
- package/dist/{vue-ui-rating-DGEgzOaB.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bq1SsByA.js → vue-ui-rating-xGz4av68.js} +9 -9
- package/dist/{vue-ui-relation-circle-BPzLP6U6.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
- package/dist/{vue-ui-relation-circle-pdZ79G9r.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
- package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
- package/dist/{vue-ui-rings-C5ce6pEf.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
- package/dist/{vue-ui-scatter-CMetujXJ.js → vue-ui-scatter-CHONk8k0.js} +437 -381
- package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
- package/dist/{vue-ui-screenshot-BqzljUT3.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
- package/dist/{vue-ui-screenshot--2aeIH_x.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
- package/dist/{vue-ui-skeleton-_VMQ594N.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
- package/dist/{vue-ui-skeleton-B5Z4craS.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
- package/dist/{vue-ui-smiley-CL-bubXk.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cty3e_yE.js → vue-ui-smiley-DXVcosKR.js} +2 -2
- package/dist/{vue-ui-spark-trend-DT1fMqf_.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-pgdWTEqG.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
- package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
- package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
- package/dist/{vue-ui-sparkgauge-DdzlyDsm.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dx2gFX6H.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
- package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-Bg_fJsT5.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
- package/dist/{vue-ui-sparkline-WMI-RgkW.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BWl_B6LX.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
- package/dist/{vue-ui-sparkstackbar-Skcshn6g.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-MMGRG9eS.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
- package/dist/{vue-ui-stackbar-NZFO3R77.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CJmCgC_a.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
- package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
- package/dist/{vue-ui-table-jJ3daLHe.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
- package/dist/{vue-ui-table-B-vHHlRw.js → vue-ui-table-DtwEoIzI.js} +9 -9
- package/dist/{vue-ui-table-heatmap-YCyFyq8J.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BfzDb2H7.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
- package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
- package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
- package/dist/{vue-ui-thermometer-CdtG1AoI.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
- package/dist/{vue-ui-timer-Cb95XSdn.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
- package/dist/{vue-ui-timer-DBqMb9iX.js → vue-ui-timer-RA9yfgBk.js} +8 -8
- package/dist/{vue-ui-tiremarks-CHKETcHr.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
- package/dist/{vue-ui-tiremarks-BqXfvQ4t.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxKunHfW.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
- package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
- package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
- package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
- package/dist/{vue-ui-wheel-kMVi976p.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
- package/dist/{vue-ui-wheel-4HKXl04I.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
- package/dist/{vue-ui-word-cloud-CrC3iKGd.js → vue-ui-word-cloud-DBxVNlJ3.js} +7 -7
- package/dist/{vue-ui-word-cloud-WgbYJhMF.cjs → vue-ui-word-cloud-Dmcelg3z.cjs} +1 -1
- package/dist/{vue-ui-xy-BN_H7q0X.js → vue-ui-xy-BIbvJSh2.js} +367 -288
- package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
- package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DAY9Ylzs.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
- package/package.json +1 -1
- package/dist/DataTable-B4_9ynlY.cjs +0 -1
- package/dist/index-Y23HeR26.cjs +0 -4
- package/dist/vue-ui-3d-bar-BB6yidY7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CrTadT86.cjs +0 -1
- package/dist/vue-ui-chestnut-C3XOHDgw.cjs +0 -6
- package/dist/vue-ui-donut-CG3VWjnG.js +0 -751
- package/dist/vue-ui-donut-JA9hlLlV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CA8sDbwX.js +0 -805
- package/dist/vue-ui-donut-evolution-_E0xUI9Y.cjs +0 -1
- package/dist/vue-ui-galaxy-DPrJum3L.cjs +0 -1
- package/dist/vue-ui-gizmo-CrSaW32p.cjs +0 -1
- package/dist/vue-ui-heatmap-CTRjjhmd.cjs +0 -1
- package/dist/vue-ui-heatmap-zV0pg2Q5.js +0 -606
- package/dist/vue-ui-mood-radar-zpxdsZ4u.cjs +0 -1
- package/dist/vue-ui-nested-donuts-07UI_VlW.cjs +0 -16
- package/dist/vue-ui-onion-DiychUul.cjs +0 -1
- package/dist/vue-ui-quadrant-DxLYb8Mk.cjs +0 -1
- package/dist/vue-ui-quick-chart-CAXuRSdm.js +0 -1318
- package/dist/vue-ui-quick-chart-DgCRM6WA.cjs +0 -13
- package/dist/vue-ui-radar-iETP_3US.cjs +0 -1
- package/dist/vue-ui-rings-DdpKT3DJ.cjs +0 -1
- package/dist/vue-ui-scatter-Dsc6RABP.cjs +0 -1
- package/dist/vue-ui-sparkbar-BVQPOz2O.js +0 -257
- package/dist/vue-ui-sparkbar-kfA-BPVJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B5xstgQG.cjs +0 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +0 -15
- package/dist/vue-ui-strip-plot-Db_dqjd9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-4Qbmxxsy.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DZt-bo2D.js +0 -420
- package/dist/vue-ui-thermometer-HXWDU2wD.cjs +0 -1
- package/dist/vue-ui-treemap-CW9JmJ2d.cjs +0 -1
- package/dist/vue-ui-vertical-bar-83AMwsHD.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DRLwZjIz.js +0 -745
- package/dist/vue-ui-waffle-BRuDxyDU.js +0 -650
- package/dist/vue-ui-waffle-BwUbvdOE.cjs +0 -1
- package/dist/vue-ui-xy-BXfP5pz5.cjs +0 -3
- package/dist/vue-ui-xy-canvas-NrhVgFsv.cjs +0 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import p from "./html2canvas.esm-d2sM-0Wm.js";
|
|
2
2
|
import { E as _ } from "./jspdf.es.min-C660YX78.js";
|
|
3
|
-
import {
|
|
3
|
+
import { v, u as w, y as A, z as M } from "./index-BlXzlBwZ.js";
|
|
4
4
|
import { openBlock as d, createElementBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, normalizeClass as y, createCommentVNode as a, withDirectives as f, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G, createStaticVNode as N, pushScopeId as m, popScopeId as T } from "vue";
|
|
5
5
|
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const D = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./html2canvas.esm-BA_v9SIU.cjs"),b=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./html2canvas.esm-BA_v9SIU.cjs"),b=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-hKWfT7Wa.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
|
|
2
2
|
<defs>
|
|
3
3
|
<marker
|
|
4
4
|
id="${e.id}"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-hKWfT7Wa.cjs"),J=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-BU6E8Xld.cjs"),K=require("./usePrinter-DoYKBzst.cjs"),he=require("./Tooltip-Oicp_EIo.cjs"),pe=require("./DataTable-Doh_4M84.cjs"),fe=require("./vue-ui-skeleton-j-IOiy5w.cjs"),ge=require("./Slicer-BXveU40S.cjs"),me=require("./vue-ui-accordion-CTYvdLLH.cjs"),Q=require("./useNestedProp-Cggpoz7e.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],be=["xmlns","viewBox"],we={key:0},Ce=["id"],$e=["stop-color"],Ne=["stop-color"],_e=["stop-color"],Be=["id"],Se=["stop-color"],Ve=["stop-color"],Ee=["stop-color"],ze={key:0},Te=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Le=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","font-size","fill","font-weight"],Pe={key:2},Ie=["transform","text-anchor","font-size","fill","font-weight"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},Ue=["cx","cy","r","fill"],De=["cx","cy","r","fill"],qe={key:1},We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],He=["x","y","height","width","fill","rx"],je=["x","y","height","width","fill","rx","stroke","stroke-width"],Xe=["x","y","height","width","fill","onMouseover"],Ye={key:3,class:"vue-data-ui-watermark"},Je=["innerHTML"],Ke={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:Z}){const h=f,{vue_ui_candlestick:ee}=i.useConfig(),m=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(i.createUid()),te=e.ref(null),_=e.ref(!1),B=e.ref(""),S=e.ref(void 0),T=e.ref(0),F=e.ref(0),k=e.ref(null),A=e.ref(null),L=e.ref(null),R=e.ref(null),t=e.computed(()=>{const o=Q.useNestedProp({userConfig:h.config,defaultConfig:ee});return o.theme?{...Q.useNestedProp({userConfig:i.themes.vue_ui_candlestick[o.theme]||h.config,defaultConfig:o})}:o}),n=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),b=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(h.dataset)&&i.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const o=J.throttle(()=>{const{width:u,height:l}=J.useResponsive({chart:k.value,title:t.value.style.title.text?A.value:null,slicer:R.value,legend:L.value});n.value.width=u,n.value.height=l,n.value.xAxisFontSize=i.translateSize({relator:Math.min(u,l),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),n.value.yAxisFontSize=i.translateSize({relator:Math.min(u,l),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(o),b.value.observe(k.value.parentNode)}}),e.onBeforeUnmount(()=>{b.value&&b.value.disconnect()});const{isPrinting:P,isImaging:I,generatePdf:O,generateImage:M}=K.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:o,right:u,bottom:l,left:a}=t.value.style.layout.padding;return{top:o,right:n.value.width-u,left:a,bottom:n.value.height-l,width:n.value.width-a-u,height:n.value.height-o-l}}),V=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:V.value}),U=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),E=e.computed(()=>(h.dataset.forEach((o,u)=>{[null,void 0].includes(o[0])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:u}),[null,void 0].includes(o[1])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:u}),[null,void 0].includes(o[2])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:u}),[null,void 0].includes(o[3])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:u}),[null,void 0].includes(o[4])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:u}),[null,void 0].includes(o[5])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:u})}),U.value.map(o=>({period:o[0],open:o[1],high:o[2],low:o[3],last:o[4],volume:o[5]})))),r=e.computed(()=>s.value.width/U.value.length),D=e.computed(()=>({max:Math.max(...E.value.map(o=>o.high)),min:0})),g=e.computed(()=>i.calculateNiceScale(D.value.min,D.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function w(o,u){return{...o,x:s.value.left+u*r.value+r.value/2,y:s.value.top+(1-o/g.value.max)*s.value.height,value:o}}const c=e.computed(()=>E.value.map((o,u)=>{const l=w(o.open,u),a=w(o.high,u),v=w(o.low,u),$=w(o.last,u),N=o.last>o.open;return{period:o.period,open:l,high:a,low:v,last:$,volume:o.volume,isBullish:N}}));function le(o){return o/g.value.max}const oe=e.computed(()=>g.value.ticks.map(o=>({y:s.value.bottom-s.value.height*le(o),value:o}))),ae=e.computed(()=>E.value.map(o=>o.period)),z=e.ref(null);function ue(o,u){S.value=o,z.value={datapoint:u,seriesIndex:o,series:c.value,config:t.value};const l=t.value.style.tooltip.customFormat;if(i.isFunction(l)&&i.functionReturnsString(()=>l({seriesIndex:o,datapoint:u,series:c.value,config:t.value})))B.value=l({seriesIndex:o,datapoint:u,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:$,high:N,low:H,last:j,volume:X,isBullish:Y}=c.value[o],{period:Ze,open:re,high:ne,low:de,last:ce,volume:ve}=t.value.translations;a+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
|
|
2
2
|
fill="${t.value.style.layout.candle.gradient.show?Y?`url(#bullish_gradient_${y.value})`:`url(#bearish_gradient_${y.value})`:Y?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${v}</div>`,a+=`${ve} : <b>${isNaN(X)?"-":Number(X.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${re}: <b>${t.value.style.tooltip.prefix} ${isNaN($.value)?"-":Number($.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(N.value)?"-":Number(N.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${de}: <b>${t.value.style.tooltip.prefix} ${isNaN(H.value)?"-":Number(H.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(j.value)?"-":Number(j.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+="</div>",B.value=`<div style="text-align:right">${a}</div>`}_.value=!0}function ie(){d.value={start:0,end:V.value},F.value+=1}function q(){e.nextTick(()=>{const o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],u=c.value.map(v=>[v.period,v.open.value,v.high.value,v.low.value,v.last.value,v.volume]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([o]).concat(u),a=i.createCsvContent(l);i.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-candlestick"})})}const C=e.computed(()=>{const o=c.value.map(a=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?a.isBullish?`url(#bullish_gradient_${y.value}`:`url(#bearish_gradient_${y.value})`:a.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${a.period}`,`${t.value.table.td.prefix} ${isNaN(a.open.value)?"-":Number(a.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.high.value)?"-":Number(a.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.low.value)?"-":Number(a.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.last.value)?"-":Number(a.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(a.volume)?"-":a.volume.toLocaleString()}`]),u={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:l,body:o,config:u,colNames:l}}),x=e.ref(!1);function se(o){x.value=o,T.value+=1}function W(){p.value.showTable=!p.value.showTable}function G(){p.value.showTooltip=!p.value.showTooltip}return Z({generatePdf:O,generateCsv:q,generateImage:M,toggleTable:W,toggleTooltip:G}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:k,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${y.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ye._sfc_main,{config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref_key:"details",ref:te,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(I),isPrinting:e.unref(P),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:se,onGeneratePdf:e.unref(O),onGenerateCsv:q,onGenerateImage:e.unref(M),onToggleTable:W,onToggleTooltip:G},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[c.value.length>0?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,$e),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,_e)],8,Ce),e.createElementVNode("linearGradient",{id:`bullish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Se),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ee)],8,Be)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Te),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=g.value.min&&l.value<=g.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Le)):e.createCommentVNode("",!0),l.value>=g.value.min&&l.value<=g.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:l.y+n.value.yAxisFontSize/3,"font-size":n.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(i.canShowValue)(l.value)?l.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,Re)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*a+r.value/2}, ${s.value.bottom+n.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":n.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(l),9,Ie)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:l.open.x,x2:l.open.x,y1:l.high.y,y2:l.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Oe),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("circle",{cx:l.high.x,cy:l.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Ue),e.createElementVNode("circle",{cx:l.low.x,cy:l.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,De)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("line",{x1:l.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:l.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:l.high.y,y2:l.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,We),e.createElementVNode("line",{x1:l.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:l.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:l.low.y,y2:l.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Ge)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:l.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:l.isBullish?l.last.y:l.open.y,height:Math.abs(l.last.y-l.open.y)<=0?1e-4:Math.abs(l.last.y-l.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,He))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:l.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:l.isBullish?l.last.y:l.open.y,height:Math.abs(l.last.y-l.open.y)<=0?1e-4:Math.abs(l.last.y-l.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:l.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${y.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${y.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,je))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+a*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:S.value===a?`${t.value.style.layout.selector.color}${e.unref(i.opacity)[t.value.style.layout.selector.opacity]}`:"transparent",onMouseover:v=>ue(a,l),onMouseleave:u[0]||(u[0]=v=>{S.value=void 0,_.value=!1})},null,40,Xe))),256))])])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:4,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&m.value?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartSlicer",ref:R},[(e.openBlock(),e.createBlock(ge.Slicer,{key:`slicer_${F.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[d.value.start]?f.dataset[d.value.start][0]:f.dataset[0][0],labelRight:f.dataset[d.value.end-1]?f.dataset[d.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:V.value,min:0,valueStart:d.value.start,valueEnd:d.value.end,start:d.value.start,"onUpdate:start":u[1]||(u[1]=l=>d.value.start=l),end:d.value.end,"onUpdate:end":u[2]||(u[2]=l=>d.value.end=l),onReset:ie},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:L},[e.renderSlot(o.$slots,"legend",{legend:c.value},void 0,!0)],512),e.createVNode(he._sfc_main,{show:p.value.showTooltip&&_.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:k.value,content:B.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),m.value?(e.openBlock(),e.createBlock(me.default,{key:6,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(pe.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[3]||(u[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Je)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,xe))}},Qe=ke._export_sfc(Ke,[["__scopeId","data-v-6b386f48"]]);exports.default=Qe;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as h, ref as v, onMounted as Ae, onBeforeUnmount as Fe, openBlock as s, createElementBlock as u, normalizeClass as ce, normalizeStyle as H, createVNode as Y, createCommentVNode as y, createBlock as M, unref as p, createSlots as Le, withCtx as b, renderSlot as x, normalizeProps as F, guardReactiveProps as L, createElementVNode as n, Fragment as N, renderList as S, toDisplayString as R, createTextVNode as Re, nextTick as Ve } from "vue";
|
|
2
|
-
import { u as Ie, c as Be, t as Oe, o as Pe, e as C,
|
|
2
|
+
import { u as Ie, c as Be, t as Oe, o as Pe, e as C, A as Me, X as Ue, s as U, B as Ee, v as We, w as De, x as Ge, q as Xe, r as je, C as he } from "./index-BlXzlBwZ.js";
|
|
3
3
|
import { t as He, u as Ye } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as qe } from "./Title-
|
|
5
|
-
import { u as Je, U as Ke } from "./usePrinter-
|
|
6
|
-
import { _ as Qe } from "./Tooltip-
|
|
7
|
-
import { D as Ze } from "./DataTable-
|
|
8
|
-
import et from "./vue-ui-skeleton-
|
|
9
|
-
import { S as tt } from "./Slicer-
|
|
10
|
-
import lt from "./vue-ui-accordion-
|
|
11
|
-
import { u as pe } from "./useNestedProp-
|
|
4
|
+
import { _ as qe } from "./Title-eBTH8iGJ.js";
|
|
5
|
+
import { u as Je, U as Ke } from "./usePrinter-CZ8F5Cth.js";
|
|
6
|
+
import { _ as Qe } from "./Tooltip-B11OahTD.js";
|
|
7
|
+
import { D as Ze } from "./DataTable-CsPidn0_.js";
|
|
8
|
+
import et from "./vue-ui-skeleton-CJ2R5R6u.js";
|
|
9
|
+
import { S as tt } from "./Slicer-DaEfxscP.js";
|
|
10
|
+
import lt from "./vue-ui-accordion-wHRG3nXl.js";
|
|
11
|
+
import { u as pe } from "./useNestedProp-BoNl5H_z.js";
|
|
12
12
|
import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const at = ["id"], st = ["xmlns", "viewBox"], ut = { key: 0 }, it = ["id"], nt = ["stop-color"], rt = ["stop-color"], dt = ["stop-color"], vt = ["id"], yt = ["stop-color"], ct = ["stop-color"], ht = ["stop-color"], pt = { key: 0 }, gt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bt = { key: 1 }, xt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "font-size", "fill", "font-weight"], kt = { key: 2 }, wt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = { key: 0 }, Ct = ["cx", "cy", "r", "fill"], Nt = ["cx", "cy", "r", "fill"], St = { key: 1 }, zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], At = ["x", "y", "height", "width", "fill", "rx"], Ft = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Lt = ["x", "y", "height", "width", "fill", "onMouseover"], Rt = {
|
|
14
14
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Y23HeR26.cjs"),te=require("./useNestedProp-C2H2jmU6.cjs"),D=require("./usePrinter-DTF28E03.cjs"),oe=require("./vue-ui-skeleton-B5Z4craS.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],le=["height"],re=["data-cell","height"],ie={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(c,{expose:G}){const l=c,{vue_ui_carousel_table:j}=u.useConfig(),A=e.ref(u.createUid()),z=e.ref(!1),m=e.ref(!!l.dataset);e.onMounted(()=>{u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),m.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),m.value=!1))});const t=e.computed(()=>te.useNestedProp({userConfig:l.config,defaultConfig:j})),{isPrinting:I,isImaging:P,generatePdf:X,generateImage:F}=D.usePrinter({elementId:`carousel-table_${A.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),N=e.ref(null),h=e.ref(null),g=e.ref(null),b=e.ref(0),B=e.ref(0),$=e.ref(!1),y=e.ref(null),v=e.ref(null),k=e.ref(0);function R(){y.value&&(v.value={elements:y.value.getElementsByTagName("tr"),heights:Array.from(y.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(R);const J=e.computed(()=>!v.value||!v.value.heights.length?0:Math.max(...v.value.heights)+b.value+B.value),K=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),Q=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*K.value+b.value+B.value),w=e.ref(0),C=e.ref(null),T=e.ref(0),p=e.ref(!1),O=e.ref(0);e.onMounted(()=>{h.value&&(b.value=h.value.getBoundingClientRect().height),g.value&&(B.value=g.value.getBoundingClientRect().height),s.value.showAnimation&&v.value&&V()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(y.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function W(o){z.value=o,O.value+=1}function V(){!C.value&&!p.value&&(C.value=requestAnimationFrame(L))}function Y(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function L(o){if(p.value)return;T.value||(T.value=o),o-T.value>=t.value.animation.speedMs&&(w.value+=v.value.heights[k.value],(Y()||k.value>=v.value.heights.length)&&(w.value=0,k.value=-1),k.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),T.value=o),C.value=requestAnimationFrame(L)}function f(){p.value=!0,cancelAnimationFrame(C.value),C.value=null}e.onBeforeUnmount(f);function x(){!p.value||!s.value.showAnimation||(p.value=!1,T.value=0,V())}function Z(){t.value.animation.pauseOnHover&&f()}const S=e.ref(null);function _(){f(),clearTimeout(S.value)}function M(){clearTimeout(S.value),S.value=setTimeout(x,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,x()):(s.value.showAnimation=!1,f())});const ee=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{$.value=a.contentRect.width<ee.value}),b.value=h.value?h.value.getBoundingClientRect().height:0,B.value=g.value?g.value.getBoundingClientRect().height:0,k.value=0,R()});i.value&&o.observe(i.value)});function q(){X()}function H(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?x():f()}function U(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return G({pauseAnimation:f,resumeAnimation:x,toggleAnimation:H,generateCsv:U,generatePdf:q,generateImage:F}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:N},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${A.value}`,style:e.normalizeStyle({height:e.unref(I)||e.unref(P)?"auto":`${Math.max(Q.value,J.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":$.value,"is-playing":!p.value}),onMouseenter:n[0]||(n[0]=a=>Z()),onMouseleave:n[1]||(n[1]=a=>x()),onTouchstart:n[2]||(n[2]=a=>_()),onTouchend:n[3]||(n[3]=a=>M()),onTouchcancel:n[4]||(n[4]=a=>M())},[m.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse"})},[e.createElementVNode("caption",{ref_key:"caption",ref:h,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:$.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${b.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:g,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:$.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,le)],4),c.dataset.body&&c.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:y,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.dataset.body,(a,r)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":c.dataset.head[E]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:t.value.tbody.tr.td.style.backgroundColor+e.unref(u.opacity)[r%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100],paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:E})),void 0,!0)],12,re))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ne),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(I),isImaging:e.unref(P),uid:A.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:N.value,titles:{...t.value.userOptions.buttonTitles},zIndex:3,noOffset:"",onGeneratePdf:q,onGenerateCsv:U,onGenerateImage:e.unref(F),onToggleAnimation:H,onToggleFullscreen:W},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},ue=ae._export_sfc(ie,[["__scopeId","data-v-f722c10b"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-hKWfT7Wa.cjs"),te=require("./useNestedProp-Cggpoz7e.cjs"),D=require("./usePrinter-DoYKBzst.cjs"),oe=require("./vue-ui-skeleton-j-IOiy5w.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],le=["height"],re=["data-cell","height"],ie={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(c,{expose:G}){const l=c,{vue_ui_carousel_table:j}=u.useConfig(),A=e.ref(u.createUid()),z=e.ref(!1),m=e.ref(!!l.dataset);e.onMounted(()=>{u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),m.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),m.value=!1))});const t=e.computed(()=>te.useNestedProp({userConfig:l.config,defaultConfig:j})),{isPrinting:I,isImaging:P,generatePdf:X,generateImage:F}=D.usePrinter({elementId:`carousel-table_${A.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),N=e.ref(null),h=e.ref(null),g=e.ref(null),b=e.ref(0),B=e.ref(0),$=e.ref(!1),y=e.ref(null),v=e.ref(null),k=e.ref(0);function R(){y.value&&(v.value={elements:y.value.getElementsByTagName("tr"),heights:Array.from(y.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(R);const J=e.computed(()=>!v.value||!v.value.heights.length?0:Math.max(...v.value.heights)+b.value+B.value),K=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),Q=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*K.value+b.value+B.value),w=e.ref(0),C=e.ref(null),T=e.ref(0),p=e.ref(!1),O=e.ref(0);e.onMounted(()=>{h.value&&(b.value=h.value.getBoundingClientRect().height),g.value&&(B.value=g.value.getBoundingClientRect().height),s.value.showAnimation&&v.value&&V()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(y.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function W(o){z.value=o,O.value+=1}function V(){!C.value&&!p.value&&(C.value=requestAnimationFrame(L))}function Y(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function L(o){if(p.value)return;T.value||(T.value=o),o-T.value>=t.value.animation.speedMs&&(w.value+=v.value.heights[k.value],(Y()||k.value>=v.value.heights.length)&&(w.value=0,k.value=-1),k.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),T.value=o),C.value=requestAnimationFrame(L)}function f(){p.value=!0,cancelAnimationFrame(C.value),C.value=null}e.onBeforeUnmount(f);function x(){!p.value||!s.value.showAnimation||(p.value=!1,T.value=0,V())}function Z(){t.value.animation.pauseOnHover&&f()}const S=e.ref(null);function _(){f(),clearTimeout(S.value)}function M(){clearTimeout(S.value),S.value=setTimeout(x,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,x()):(s.value.showAnimation=!1,f())});const ee=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{$.value=a.contentRect.width<ee.value}),b.value=h.value?h.value.getBoundingClientRect().height:0,B.value=g.value?g.value.getBoundingClientRect().height:0,k.value=0,R()});i.value&&o.observe(i.value)});function q(){X()}function H(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?x():f()}function U(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return G({pauseAnimation:f,resumeAnimation:x,toggleAnimation:H,generateCsv:U,generatePdf:q,generateImage:F}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:N},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${A.value}`,style:e.normalizeStyle({height:e.unref(I)||e.unref(P)?"auto":`${Math.max(Q.value,J.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":$.value,"is-playing":!p.value}),onMouseenter:n[0]||(n[0]=a=>Z()),onMouseleave:n[1]||(n[1]=a=>x()),onTouchstart:n[2]||(n[2]=a=>_()),onTouchend:n[3]||(n[3]=a=>M()),onTouchcancel:n[4]||(n[4]=a=>M())},[m.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse"})},[e.createElementVNode("caption",{ref_key:"caption",ref:h,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:$.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${b.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:g,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:$.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,le)],4),c.dataset.body&&c.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:y,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.dataset.body,(a,r)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":c.dataset.head[E]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:t.value.tbody.tr.td.style.backgroundColor+e.unref(u.opacity)[r%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100],paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:E})),void 0,!0)],12,re))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ne),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(I),isImaging:e.unref(P),uid:A.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:N.value,titles:{...t.value.userOptions.buttonTitles},zIndex:3,noOffset:"",onGeneratePdf:q,onGenerateCsv:U,onGenerateImage:e.unref(F),onToggleAnimation:H,onToggleFullscreen:W},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},ue=ae._export_sfc(ie,[["__scopeId","data-v-f722c10b"]]);exports.default=ue;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as o, onMounted as F, computed as B, onBeforeUnmount as ie, watch as ye, openBlock as u, createElementBlock as r, createElementVNode as z, normalizeStyle as d, unref as b, normalizeClass as Ce, createTextVNode as U, toDisplayString as V, renderSlot as p, Fragment as G, renderList as M, normalizeProps as q, guardReactiveProps as D, createCommentVNode as E, createBlock as se, createSlots as $e, withCtx as O, nextTick as Te } from "vue";
|
|
2
|
-
import { u as Ae, c as xe, o as X, e as j,
|
|
3
|
-
import { u as Fe } from "./useNestedProp-
|
|
4
|
-
import { u as Be, U as Oe } from "./usePrinter-
|
|
5
|
-
import Pe from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Ae, c as xe, o as X, e as j, v as ke, q as we, r as Ie } from "./index-BlXzlBwZ.js";
|
|
3
|
+
import { u as Fe } from "./useNestedProp-BoNl5H_z.js";
|
|
4
|
+
import { u as Be, U as Oe } from "./usePrinter-CZ8F5Cth.js";
|
|
5
|
+
import Pe from "./vue-ui-skeleton-CJ2R5R6u.js";
|
|
6
6
|
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
8
8
|
__name: "vue-ui-carousel-table",
|