hisonvue 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +248 -0
- package/dist/HAccordion-CPtgQUK0.js +1 -0
- package/dist/HAccordion-ll-4cIAw.mjs +262 -0
- package/dist/HBaggie-D6omQoFh.js +1 -0
- package/dist/HBaggie-D_7mEiuV.mjs +283 -0
- package/dist/HBanner-DmcMOFqS.mjs +420 -0
- package/dist/HBanner-Io4SdGGs.js +1 -0
- package/dist/HButton-DAVuDmOQ.js +1 -0
- package/dist/HButton-DAriO81x.mjs +256 -0
- package/dist/HCalendar-DKwGatUk.js +2 -0
- package/dist/HCalendar-w18iIB90.mjs +3387 -0
- package/dist/HCaption-6CbSqRA7.js +1 -0
- package/dist/HCaption-DwsXHDNK.mjs +275 -0
- package/dist/HChart-C86JXUyW.js +1 -0
- package/dist/HChart-CcArHFr0.mjs +179 -0
- package/dist/HDrawer-DG1O42iF.mjs +439 -0
- package/dist/HDrawer-U5VC_okK.js +1 -0
- package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
- package/dist/HDropdown-D4RAGmjE.js +1 -0
- package/dist/HFileset-BGuP9O4l.mjs +578 -0
- package/dist/HFileset-CuPR6Hwf.js +2 -0
- package/dist/HGap-BPAdnOQz.js +1 -0
- package/dist/HGap-DzGrfWVt.mjs +233 -0
- package/dist/HGrid-BiIhVCv_.mjs +345 -0
- package/dist/HGrid-C3EV_pgM.js +1 -0
- package/dist/HImagebox-D_DKeCrO.mjs +654 -0
- package/dist/HImagebox-t_UdFjQO.js +2 -0
- package/dist/HInput-BEyJqYkD.mjs +1103 -0
- package/dist/HInput-DMGLY473.js +1 -0
- package/dist/HInputGroup-D37WTYoI.mjs +281 -0
- package/dist/HInputGroup-Dcfr23sZ.js +1 -0
- package/dist/HLabel-B2FOqSiS.mjs +369 -0
- package/dist/HLabel-Dm48mSwn.js +1 -0
- package/dist/HLayout-BbCEm_aO.mjs +196 -0
- package/dist/HLayout-C1e4BZ_K.js +1 -0
- package/dist/HList-CAeYb-hz.mjs +419 -0
- package/dist/HList-eNXmMf27.js +1 -0
- package/dist/HModal-BDBEEpKm.mjs +778 -0
- package/dist/HModal-GODLq3wH.js +1 -0
- package/dist/HNote-CWnUjt3_.mjs +934 -0
- package/dist/HNote-D_Xwu9oL.js +1 -0
- package/dist/HPagination-Db_L9wv-.js +1 -0
- package/dist/HPagination-e5e2a5GS.mjs +496 -0
- package/dist/HParagraph-BRuSeOMU.js +1 -0
- package/dist/HParagraph-DYuB-qjY.mjs +463 -0
- package/dist/HPopup-Brp1FVpm.mjs +431 -0
- package/dist/HPopup-ChkoI3xm.js +1 -0
- package/dist/HSpinner-DDtU9PL_.js +1 -0
- package/dist/HSpinner-DOq2k5kT.mjs +281 -0
- package/dist/HTable-DGFnzD4u.js +1 -0
- package/dist/HTable-GCDP5O_J.mjs +620 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/ar.es-CKau4tBl.js +5 -0
- package/dist/ar.es-XxSuE68c.mjs +57 -0
- package/dist/bg.es-BJ7fu6yy.mjs +57 -0
- package/dist/bg.es-Melqx1M5.js +5 -0
- package/dist/bn.es-CYlBkxc5.mjs +57 -0
- package/dist/bn.es-ClbAZ4WP.js +5 -0
- package/dist/bs.es-KjOcbE96.js +5 -0
- package/dist/bs.es-yMnaKmdi.mjs +57 -0
- package/dist/ca.es-BaGTENcW.js +5 -0
- package/dist/ca.es-DIhlxmQc.mjs +67 -0
- package/dist/cs.es-BN8oxRXQ.mjs +57 -0
- package/dist/cs.es-ChOlHqBr.js +5 -0
- package/dist/da.es-DJB5lAli.mjs +57 -0
- package/dist/da.es-DOFXbf8-.js +5 -0
- package/dist/de.es-DwE82Kaw.js +5 -0
- package/dist/de.es-glb8GeJh.mjs +57 -0
- package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
- package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
- package/dist/el.es-CNrCgzYI.js +5 -0
- package/dist/el.es-_bBZf22h.mjs +76 -0
- package/dist/en.es-CV9nmQGr.mjs +57 -0
- package/dist/en.es-CgL601qd.js +5 -0
- package/dist/es.es-CZjcWK54.mjs +57 -0
- package/dist/es.es-IdFGKY7Q.js +5 -0
- package/dist/et.es-BygWmV3P.js +5 -0
- package/dist/et.es-CjvQAzNF.mjs +57 -0
- package/dist/fa.es-DW_0SmsT.js +5 -0
- package/dist/fa.es-DykeFwDA.mjs +57 -0
- package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
- package/dist/fi.es-pgfJlZ8i.js +5 -0
- package/dist/fr.es-CNKVhFfO.mjs +57 -0
- package/dist/fr.es-OENguFuM.js +5 -0
- package/dist/he.es-bixEnAeH.js +5 -0
- package/dist/he.es-nF4GFhjH.mjs +57 -0
- package/dist/hisonvue.cjs.js +1 -0
- package/dist/hisonvue.css +1 -0
- package/dist/hisonvue.d.ts +19934 -0
- package/dist/hisonvue.es.js +114 -0
- package/dist/hr.es-CkRAP94O.js +5 -0
- package/dist/hr.es-QFfz660j.mjs +57 -0
- package/dist/hu.es-Ck2rE01V.mjs +57 -0
- package/dist/hu.es-DG6HeiQJ.js +5 -0
- package/dist/id.es-D4tPi6wP.js +5 -0
- package/dist/id.es-Je7FEUJ5.mjs +57 -0
- package/dist/index-BmKMHsSZ.js +153 -0
- package/dist/index-DUh7pai4.mjs +19976 -0
- package/dist/is.es-CDFqLYCV.js +5 -0
- package/dist/is.es-bzprHvXI.mjs +57 -0
- package/dist/it.es-BHgrw_C6.js +5 -0
- package/dist/it.es-CJtfqmNS.mjs +57 -0
- package/dist/ja.es-BaiGjqZ6.mjs +57 -0
- package/dist/ja.es-D-lxWwyb.js +5 -0
- package/dist/ka.es-CnnB6q4A.js +5 -0
- package/dist/ka.es-x9QJo_dl.mjs +57 -0
- package/dist/ko.es-6c447eTS.mjs +57 -0
- package/dist/ko.es-b18aaB3V.js +5 -0
- package/dist/lt.es-2twYdvmJ.mjs +57 -0
- package/dist/lt.es-BY9UQ6wZ.js +5 -0
- package/dist/mn.es-BLQRG1uu.mjs +57 -0
- package/dist/mn.es-YFS7gSdf.js +5 -0
- package/dist/nl.es-BEx-4hnj.js +5 -0
- package/dist/nl.es-bB1qWR_S.mjs +57 -0
- package/dist/no.es-BQnRWlWR.js +5 -0
- package/dist/no.es-CWDVXpTf.mjs +57 -0
- package/dist/pl.es-CKCsZ_02.js +5 -0
- package/dist/pl.es-Dzct23w9.mjs +57 -0
- package/dist/pt-br.es-BeBuiitI.mjs +57 -0
- package/dist/pt-br.es-oH7qh6Fd.js +5 -0
- package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
- package/dist/pt-pt.es-DLk5I0ej.js +5 -0
- package/dist/ro.es-DfMVJ30M.mjs +57 -0
- package/dist/ro.es-DgTen1Dh.js +5 -0
- package/dist/ru.es-Bv9UvrBe.mjs +67 -0
- package/dist/ru.es-jGIQfREl.js +5 -0
- package/dist/scrollManager-BGnq4wyt.mjs +14 -0
- package/dist/scrollManager-CEEWQwoK.js +1 -0
- package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
- package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
- package/dist/sk.es-CUOTpLuL.mjs +57 -0
- package/dist/sk.es-D2bhVb26.js +5 -0
- package/dist/sl.es-DeIGgZbR.mjs +57 -0
- package/dist/sl.es-TV8Uraa1.js +5 -0
- package/dist/sq.es-CQJJrZHv.mjs +67 -0
- package/dist/sq.es-Cc65zxbr.js +5 -0
- package/dist/sr.es-CKS0AkiW.mjs +57 -0
- package/dist/sr.es-D5VNA_GW.js +5 -0
- package/dist/sv.es-ChHQRrAe.mjs +57 -0
- package/dist/sv.es-dBeK_DZs.js +5 -0
- package/dist/tr.es-B3v90gVv.mjs +57 -0
- package/dist/tr.es-BUz4S13G.js +5 -0
- package/dist/uk.es-B8uaeLcK.js +5 -0
- package/dist/uk.es-CiR4NnbN.mjs +67 -0
- package/dist/vi.es-2OFMtbQI.js +5 -0
- package/dist/vi.es-DFDi5l7p.mjs +67 -0
- package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
- package/dist/zh-cn.es-fDHCbCIg.js +5 -0
- package/dist/zh-hk.es-COzeh5F8.js +5 -0
- package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
- package/nuxt/module.mjs +39 -0
- package/nuxt/plugin.mjs +21 -0
- package/package.json +53 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BmKMHsSZ.js"),V=require("./_plugin-vue_export-helper-BHFhmbuH.js"),z={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},text:{type:String,required:!1},level:{type:Number,default:3,validator:t=>Number.isFinite(t)&&t>=1&&t<=6},fontBold:{type:Boolean,default:!0},fontItalic:{type:Boolean,default:!1},fontThruline:{type:Boolean,default:!1},fontUnderline:{type:Boolean,default:!1},textAlign:{type:String,default:null,validator:t=>t==null||o.TEXT_ALIGN_VALUES.includes(t)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:t=>o.BACKGROUND_TYPE_VALUES.includes(t)}},O=e.defineComponent({name:"HCaption",props:z,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(t,{emit:a}){const A=e.ref(null),u=e.ref(null),i=t.id?t.id:o.getUUID(),C=`hcaption:${i}`,s=o.useDevice(),k=e.useSlots(),c=e.ref(t.visible),d=e.ref(t.title||""),f=e.ref(t.textAlign??o.TextAlign.left),L=e.computed(()=>({textAlign:f.value})),v=e.ref(t.level??3),$=e.computed(()=>`h${Math.min(6,Math.max(1,Number(v.value||3)))}`),m=e.ref(t.fontBold),p=e.ref(t.fontItalic),g=e.ref(t.fontThruline),h=e.ref(t.fontUnderline),y=e.ref(t.border??!1),T=e.ref(t.backgroundType??o.BackgroundType.empty),N=e.computed(()=>c.value?"":"hison-display-none"),x=e.computed(()=>y.value?"hison-border":""),F=e.computed(()=>{switch(T.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),q=e.computed(()=>m.value?"hison-font-bold-important":null),E=e.computed(()=>p.value?"hison-font-italic":null),H=e.computed(()=>g.value?"hison-font-thruline":null),R=e.computed(()=>h.value?"hison-font-underline":null),S=e.computed(()=>k.default?k.default():[]),M=e.computed(()=>S.value.length>0&&S.value.every(n=>n.type===e.Text)),b=e.computed(()=>!!k.default&&!M.value),r=e.ref(t.text||"");e.onMounted(()=>{if(M.value){const n=S.value.map(l=>String(l.children??"")).join("");r.value=n}});const B=e.ref([]),w=()=>{B.value=o.extractResponsiveClasses(o.toClassString(t.class)||"",s.value),o.addComponentNameToClass(B.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(B.value,"color","primary")},D=n=>{a("click",n,u.value)},U=()=>{o.hisonCloser.component.captionList[i]&&o.hisonCloser.component.captionList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The caption ID is at risk of being duplicated. ${i}`),o.registerReloadable(C,()=>{I(),e.nextTick(U)}),w(),u.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"caption",isVisible:()=>c.value,setVisible:n=>{c.value=n},getTitle:()=>d.value,setTitle:n=>{d.value=n},getText:()=>b.value?"":r.value,setText:n=>{b.value||(r.value=n)},getLevel:()=>v.value,setLevel:n=>{const l=Math.min(6,Math.max(1,Number(n)));v.value=l},getTextAlign:()=>f.value,setTextAlign:n=>{(n===o.TextAlign.left||n===o.TextAlign.center||n===o.TextAlign.right)&&(f.value=n)},isFontBold:()=>m.value,setFontBold:n=>{m.value=n},isFontItalic:()=>p.value,setFontItalic:n=>{p.value=n},isFontThruline:()=>g.value,setFontThruline:n=>{g.value=n},isFontUnderline:()=>h.value,setFontUnderline:n=>{h.value=n},isBorder:()=>y.value,setBorder:n=>{y.value=n},getBackgroundType:()=>T.value,setBackgroundType:n=>{T.value=n},reload:()=>o.reloadHisonComponent(C)},o.hisonCloser.component.captionList[i]=u.value,a("mounted",u.value)},I=()=>{o.unregisterReloadable(C),delete o.hisonCloser.component.captionList[i]};return e.onMounted(U),e.onBeforeUnmount(I),e.watch(s,()=>{w(),a("responsive-change",s.value)}),e.watch(()=>t.visible,n=>{n!==c.value&&(c.value=!!n)}),e.watch(()=>t.title,n=>{const l=n??"";l!==d.value&&(d.value=l)}),e.watch(()=>t.text,n=>{if(!b.value){const l=n??"";l!==r.value&&(r.value=l)}}),e.watch(()=>t.level,n=>{const l=Math.min(6,Math.max(1,Number(n??3)));l!==v.value&&(v.value=l)}),e.watch(()=>t.textAlign,n=>{(n==="left"||n==="center"||n==="right")&&n!==f.value&&(f.value=n)}),e.watch(()=>t.fontBold,n=>{const l=!!n;l!==m.value&&(m.value=l)}),e.watch(()=>t.fontItalic,n=>{const l=!!n;l!==p.value&&(p.value=l)}),e.watch(()=>t.fontThruline,n=>{const l=!!n;l!==g.value&&(g.value=l)}),e.watch(()=>t.fontUnderline,n=>{const l=!!n;l!==h.value&&(h.value=l)}),e.watch(()=>t.border,n=>{const l=!!n;l!==y.value&&(y.value=l)}),e.watch(()=>t.backgroundType,n=>{n&&n!==T.value&&(T.value=n)}),e.watch(()=>t.class,()=>w()),{captionRef:A,captionMethods:e.computed(()=>e.unref(u)),props:t,visibleClass:N,fontBoldClass:q,fontItalicClass:E,fontThrulineClass:H,fontUnderlineClass:R,borderClass:x,backgroundTypeClass:F,textAlignStyle:L,renderTag:$,hasElementSlot:b,internalText:r,responsiveClassList:B,onClick:D,title:d}}});function j(t,a,A,u,i,C){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-wrapper",...t.responsiveClassList,t.visibleClass])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.renderTag),{ref:"captionRef",class:e.normalizeClass(["hison-caption",t.fontBoldClass,t.fontItalicClass,t.fontThrulineClass,t.fontUnderlineClass,t.borderClass,t.backgroundTypeClass]),style:e.normalizeStyle([t.textAlignStyle,t.props.style]),title:t.title||void 0,onClick:t.onClick,onMousedown:a[0]||(a[0]=s=>t.$emit("mousedown",s,t.captionMethods)),onMouseup:a[1]||(a[1]=s=>t.$emit("mouseup",s,t.captionMethods)),onMouseover:a[2]||(a[2]=s=>t.$emit("mouseover",s,t.captionMethods)),onMouseout:a[3]||(a[3]=s=>t.$emit("mouseout",s,t.captionMethods))},{default:e.withCtx(()=>[t.hasElementSlot?e.renderSlot(t.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.internalText),1)],64))]),_:3},40,["class","style","title","onClick"]))],2)}const P=V._export_sfc(O,[["render",j]]);exports.default=P;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { defineComponent as J, ref as l, useSlots as Q, computed as o, Text as W, onMounted as R, onBeforeUnmount as Z, watch as a, unref as _, nextTick as ee, createElementBlock as x, openBlock as $, normalizeClass as D, createBlock as te, resolveDynamicComponent as ne, normalizeStyle as le, withCtx as oe, renderSlot as ae, Fragment as se, createTextVNode as ie, toDisplayString as ue } from "vue";
|
|
2
|
+
import { B as re, f as M, T as de, g as ce, u as ve, w as A, e as fe, t as me, b as H, h as C, r as ge, c as ye, d as he } from "./index-DUh7pai4.mjs";
|
|
3
|
+
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const Te = {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for the caption.
|
|
7
|
+
* - Access methods via `hison.component.getCaption(id)`
|
|
8
|
+
* - Duplicate `id` will throw at mount time
|
|
9
|
+
*/
|
|
10
|
+
id: { type: String, required: !1 },
|
|
11
|
+
/**
|
|
12
|
+
* Custom class applied to the caption wrapper (string / array / object).
|
|
13
|
+
* - Works with responsive classes like `hison-col-*`, `hison-size-*`, `hison-color-*`, `hison-pos-*`
|
|
14
|
+
*/
|
|
15
|
+
class: {
|
|
16
|
+
type: [String, Array, Object],
|
|
17
|
+
required: !1
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* Inline style for the caption element (string, object, or an array of objects).
|
|
21
|
+
* - Keep styles minimal; prefer class-based styling
|
|
22
|
+
*/
|
|
23
|
+
style: {
|
|
24
|
+
type: [String, Object, Array],
|
|
25
|
+
required: !1
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Controls visibility of the caption.
|
|
29
|
+
* - Boolean only. Use `:visible="false"`
|
|
30
|
+
*/
|
|
31
|
+
visible: { type: Boolean, default: !0 },
|
|
32
|
+
/**
|
|
33
|
+
* Tooltip text shown on hover (maps to `title` attribute).
|
|
34
|
+
*/
|
|
35
|
+
title: { type: String, required: !1 },
|
|
36
|
+
/**
|
|
37
|
+
* Text content of the caption (alternative to slot).
|
|
38
|
+
* - If default slot is pure text nodes, it is absorbed and treated as `text`
|
|
39
|
+
*/
|
|
40
|
+
text: { type: String, required: !1 },
|
|
41
|
+
/**
|
|
42
|
+
* Heading level: 1~6 (rendered as <h1>~<h6>).
|
|
43
|
+
* - Default: 3
|
|
44
|
+
*/
|
|
45
|
+
level: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 3,
|
|
48
|
+
validator: (e) => Number.isFinite(e) && e >= 1 && e <= 6
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Bold font style toggle.
|
|
52
|
+
* - Boolean only
|
|
53
|
+
* - Adds `hison-font-bold-important` class when enabled
|
|
54
|
+
*/
|
|
55
|
+
fontBold: { type: Boolean, default: !0 },
|
|
56
|
+
/**
|
|
57
|
+
* Italic font style toggle.
|
|
58
|
+
* - Boolean only
|
|
59
|
+
* - Adds `hison-font-italic` class when enabled
|
|
60
|
+
*/
|
|
61
|
+
fontItalic: { type: Boolean, default: !1 },
|
|
62
|
+
/**
|
|
63
|
+
* Strikethrough font style toggle.
|
|
64
|
+
* - Boolean only
|
|
65
|
+
* - Adds `hison-font-thruline` class when enabled
|
|
66
|
+
*/
|
|
67
|
+
fontThruline: { type: Boolean, default: !1 },
|
|
68
|
+
/**
|
|
69
|
+
* Underline font style toggle.
|
|
70
|
+
* - Boolean only
|
|
71
|
+
* - Adds `hison-font-underline` class when enabled
|
|
72
|
+
*/
|
|
73
|
+
fontUnderline: { type: Boolean, default: !1 },
|
|
74
|
+
/**
|
|
75
|
+
* Text alignment of the caption.
|
|
76
|
+
* - 'left' | 'center' | 'right'
|
|
77
|
+
*/
|
|
78
|
+
textAlign: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: null,
|
|
81
|
+
validator: (e) => e == null || de.includes(e)
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Whether to show border (rendered as subtle box-shadow).
|
|
85
|
+
* - Default: false (no border)
|
|
86
|
+
*/
|
|
87
|
+
border: { type: Boolean, default: !1 },
|
|
88
|
+
/**
|
|
89
|
+
* Background type.
|
|
90
|
+
* - 'filled' | 'empty' | 'transparent'
|
|
91
|
+
* - Default: 'empty'
|
|
92
|
+
*/
|
|
93
|
+
backgroundType: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: M.empty,
|
|
96
|
+
validator: (e) => re.includes(e)
|
|
97
|
+
}
|
|
98
|
+
}, be = J({
|
|
99
|
+
name: "HCaption",
|
|
100
|
+
props: Te,
|
|
101
|
+
inheritAttrs: !1,
|
|
102
|
+
emits: ["mounted", "responsive-change", "click", "mousedown", "mouseup", "mouseover", "mouseout"],
|
|
103
|
+
setup(e, { emit: s }) {
|
|
104
|
+
const F = l(null), r = l(null), u = e.id ? e.id : ce(), B = `hcaption:${u}`, i = ve(), U = Q(), c = l(e.visible), v = l(e.title || ""), f = l(e.textAlign ?? A.left), q = o(() => ({ textAlign: f.value })), m = l(e.level ?? 3), V = o(() => `h${Math.min(6, Math.max(1, Number(m.value || 3)))}`), g = l(e.fontBold), y = l(e.fontItalic), h = l(e.fontThruline), p = l(e.fontUnderline), T = l(e.border ?? !1), b = l(e.backgroundType ?? M.empty), z = o(() => c.value ? "" : "hison-display-none"), O = o(() => T.value ? "hison-border" : ""), j = o(() => {
|
|
105
|
+
switch (b.value) {
|
|
106
|
+
case M.empty:
|
|
107
|
+
return "hison-bg-empty";
|
|
108
|
+
case M.transparent:
|
|
109
|
+
return "hison-bg-transparent";
|
|
110
|
+
default:
|
|
111
|
+
return "hison-bg-filled";
|
|
112
|
+
}
|
|
113
|
+
}), G = o(() => g.value ? "hison-font-bold-important" : null), P = o(() => y.value ? "hison-font-italic" : null), K = o(() => h.value ? "hison-font-thruline" : null), X = o(() => p.value ? "hison-font-underline" : null), I = o(() => U.default ? U.default() : []), N = o(() => I.value.length > 0 && I.value.every((t) => t.type === W)), k = o(() => !!U.default && !N.value), d = l(e.text || "");
|
|
114
|
+
R(() => {
|
|
115
|
+
if (N.value) {
|
|
116
|
+
const t = I.value.map((n) => String(n.children ?? "")).join("");
|
|
117
|
+
d.value = t;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const S = l([]), L = () => {
|
|
121
|
+
S.value = fe(me(e.class) || "", i.value), H(S.value, "size", C.componentStyle.size), H(S.value, "color", "primary");
|
|
122
|
+
}, Y = (t) => {
|
|
123
|
+
s("click", t, r.value);
|
|
124
|
+
}, w = () => {
|
|
125
|
+
C.component.captionList[u] && C.component.captionList[u].isHisonvueComponent && console.warn(`[Hisonvue] The caption ID is at risk of being duplicated. ${u}`), ge(B, () => {
|
|
126
|
+
E(), ee(w);
|
|
127
|
+
}), L(), r.value = {
|
|
128
|
+
isHisonvueComponent: !0,
|
|
129
|
+
getId: () => u,
|
|
130
|
+
getType: () => "caption",
|
|
131
|
+
isVisible: () => c.value,
|
|
132
|
+
setVisible: (t) => {
|
|
133
|
+
c.value = t;
|
|
134
|
+
},
|
|
135
|
+
getTitle: () => v.value,
|
|
136
|
+
setTitle: (t) => {
|
|
137
|
+
v.value = t;
|
|
138
|
+
},
|
|
139
|
+
getText: () => k.value ? "" : d.value,
|
|
140
|
+
setText: (t) => {
|
|
141
|
+
k.value || (d.value = t);
|
|
142
|
+
},
|
|
143
|
+
getLevel: () => m.value,
|
|
144
|
+
setLevel: (t) => {
|
|
145
|
+
const n = Math.min(6, Math.max(1, Number(t)));
|
|
146
|
+
m.value = n;
|
|
147
|
+
},
|
|
148
|
+
getTextAlign: () => f.value,
|
|
149
|
+
setTextAlign: (t) => {
|
|
150
|
+
(t === A.left || t === A.center || t === A.right) && (f.value = t);
|
|
151
|
+
},
|
|
152
|
+
isFontBold: () => g.value,
|
|
153
|
+
setFontBold: (t) => {
|
|
154
|
+
g.value = t;
|
|
155
|
+
},
|
|
156
|
+
isFontItalic: () => y.value,
|
|
157
|
+
setFontItalic: (t) => {
|
|
158
|
+
y.value = t;
|
|
159
|
+
},
|
|
160
|
+
isFontThruline: () => h.value,
|
|
161
|
+
setFontThruline: (t) => {
|
|
162
|
+
h.value = t;
|
|
163
|
+
},
|
|
164
|
+
isFontUnderline: () => p.value,
|
|
165
|
+
setFontUnderline: (t) => {
|
|
166
|
+
p.value = t;
|
|
167
|
+
},
|
|
168
|
+
isBorder: () => T.value,
|
|
169
|
+
setBorder: (t) => {
|
|
170
|
+
T.value = t;
|
|
171
|
+
},
|
|
172
|
+
getBackgroundType: () => b.value,
|
|
173
|
+
setBackgroundType: (t) => {
|
|
174
|
+
b.value = t;
|
|
175
|
+
},
|
|
176
|
+
reload: () => ye(B)
|
|
177
|
+
}, C.component.captionList[u] = r.value, s("mounted", r.value);
|
|
178
|
+
}, E = () => {
|
|
179
|
+
he(B), delete C.component.captionList[u];
|
|
180
|
+
};
|
|
181
|
+
return R(w), Z(E), a(i, () => {
|
|
182
|
+
L(), s("responsive-change", i.value);
|
|
183
|
+
}), a(() => e.visible, (t) => {
|
|
184
|
+
t !== c.value && (c.value = !!t);
|
|
185
|
+
}), a(() => e.title, (t) => {
|
|
186
|
+
const n = t ?? "";
|
|
187
|
+
n !== v.value && (v.value = n);
|
|
188
|
+
}), a(() => e.text, (t) => {
|
|
189
|
+
if (!k.value) {
|
|
190
|
+
const n = t ?? "";
|
|
191
|
+
n !== d.value && (d.value = n);
|
|
192
|
+
}
|
|
193
|
+
}), a(() => e.level, (t) => {
|
|
194
|
+
const n = Math.min(6, Math.max(1, Number(t ?? 3)));
|
|
195
|
+
n !== m.value && (m.value = n);
|
|
196
|
+
}), a(() => e.textAlign, (t) => {
|
|
197
|
+
(t === "left" || t === "center" || t === "right") && t !== f.value && (f.value = t);
|
|
198
|
+
}), a(() => e.fontBold, (t) => {
|
|
199
|
+
const n = !!t;
|
|
200
|
+
n !== g.value && (g.value = n);
|
|
201
|
+
}), a(() => e.fontItalic, (t) => {
|
|
202
|
+
const n = !!t;
|
|
203
|
+
n !== y.value && (y.value = n);
|
|
204
|
+
}), a(() => e.fontThruline, (t) => {
|
|
205
|
+
const n = !!t;
|
|
206
|
+
n !== h.value && (h.value = n);
|
|
207
|
+
}), a(() => e.fontUnderline, (t) => {
|
|
208
|
+
const n = !!t;
|
|
209
|
+
n !== p.value && (p.value = n);
|
|
210
|
+
}), a(() => e.border, (t) => {
|
|
211
|
+
const n = !!t;
|
|
212
|
+
n !== T.value && (T.value = n);
|
|
213
|
+
}), a(() => e.backgroundType, (t) => {
|
|
214
|
+
t && t !== b.value && (b.value = t);
|
|
215
|
+
}), a(() => e.class, () => L()), {
|
|
216
|
+
captionRef: F,
|
|
217
|
+
captionMethods: o(() => _(r)),
|
|
218
|
+
props: e,
|
|
219
|
+
visibleClass: z,
|
|
220
|
+
fontBoldClass: G,
|
|
221
|
+
fontItalicClass: P,
|
|
222
|
+
fontThrulineClass: K,
|
|
223
|
+
fontUnderlineClass: X,
|
|
224
|
+
borderClass: O,
|
|
225
|
+
backgroundTypeClass: j,
|
|
226
|
+
textAlignStyle: q,
|
|
227
|
+
renderTag: V,
|
|
228
|
+
hasElementSlot: k,
|
|
229
|
+
internalText: d,
|
|
230
|
+
responsiveClassList: S,
|
|
231
|
+
onClick: Y,
|
|
232
|
+
title: v
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
function Ce(e, s, F, r, u, B) {
|
|
237
|
+
return $(), x("div", {
|
|
238
|
+
class: D([
|
|
239
|
+
"hison-wrapper",
|
|
240
|
+
...e.responsiveClassList,
|
|
241
|
+
e.visibleClass
|
|
242
|
+
])
|
|
243
|
+
}, [
|
|
244
|
+
($(), te(ne(e.renderTag), {
|
|
245
|
+
ref: "captionRef",
|
|
246
|
+
class: D([
|
|
247
|
+
"hison-caption",
|
|
248
|
+
e.fontBoldClass,
|
|
249
|
+
e.fontItalicClass,
|
|
250
|
+
e.fontThrulineClass,
|
|
251
|
+
e.fontUnderlineClass,
|
|
252
|
+
e.borderClass,
|
|
253
|
+
e.backgroundTypeClass
|
|
254
|
+
]),
|
|
255
|
+
style: le([e.textAlignStyle, e.props.style]),
|
|
256
|
+
title: e.title || void 0,
|
|
257
|
+
onClick: e.onClick,
|
|
258
|
+
onMousedown: s[0] || (s[0] = (i) => e.$emit("mousedown", i, e.captionMethods)),
|
|
259
|
+
onMouseup: s[1] || (s[1] = (i) => e.$emit("mouseup", i, e.captionMethods)),
|
|
260
|
+
onMouseover: s[2] || (s[2] = (i) => e.$emit("mouseover", i, e.captionMethods)),
|
|
261
|
+
onMouseout: s[3] || (s[3] = (i) => e.$emit("mouseout", i, e.captionMethods))
|
|
262
|
+
}, {
|
|
263
|
+
default: oe(() => [
|
|
264
|
+
e.hasElementSlot ? ae(e.$slots, "default", { key: 0 }) : ($(), x(se, { key: 1 }, [
|
|
265
|
+
ie(ue(e.internalText), 1)
|
|
266
|
+
], 64))
|
|
267
|
+
]),
|
|
268
|
+
_: 3
|
|
269
|
+
}, 40, ["class", "style", "title", "onClick"]))
|
|
270
|
+
], 2);
|
|
271
|
+
}
|
|
272
|
+
const Ae = /* @__PURE__ */ pe(be, [["render", Ce]]);
|
|
273
|
+
export {
|
|
274
|
+
Ae as default
|
|
275
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),s=require("./index-BmKMHsSZ.js"),D=require("./_plugin-vue_export-helper-BHFhmbuH.js"),B={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},type:{type:String,required:!0},modelValue:{type:Object,required:!0},options:{type:Object,required:!1},visible:{type:Boolean,default:!0},loadDelay:{type:Number,default:500}},F=t.defineComponent({name:"HChart",props:B,emits:["update:modelValue","mounted","responsive-change"],setup(n,{emit:g,attrs:A}){const r=n.id||s.getUUID(),v=`hchart:${r}`,h=t.ref(null),o=t.ref(null),m=t.ref(n.visible),S=t.computed(()=>m.value?"":"hison-display-none"),b=s.useDevice(),c=t.ref([]),u=t.ref(!1),f=t.ref(n.loadDelay??500);let i=null,y=!0,l=!1;const w=()=>{c.value=s.extractResponsiveClasses(s.toClassString(n.class)||"",b.value),s.getIndexSpecificClassNameFromClassList(c.value,"col")===-1&&c.value.push("hison-col-12"),s.addComponentNameToClass(c.value,"size",s.hisonCloser.componentStyle.size),s.addComponentNameToClass(c.value,"color","primary")},d=e=>{if(Array.isArray(e))return e.map(a=>typeof a=="string"?s.getRGBAFromColorText(a)||a:typeof a=="object"&&a!==null?d(a):a);if(typeof e=="object"&&e!==null){const a={};for(const[p,C]of Object.entries(e))if(typeof C=="string"&&/color/i.test(p)){const L=s.getRGBAFromColorText(C);a[p]=L||C}else a[p]=d(C);return a}return e};function R(e){return!e||typeof e!="object"||!Array.isArray(e.datasets)?{datasets:[]}:{...e,datasets:e.datasets.filter(a=>!!a)}}function T(e){return!e||typeof e!="object"?{}:e}function q(){if(!y||l)return;if(!h.value){console.warn("[mountChart] canvasRef.value is null");return}w(),o.value=t.markRaw(new s.Chart(h.value,{type:n.type,data:R(d(t.toRaw(n.modelValue))),options:T(d(t.toRaw(n.options)))}));const e=o.value;e.isHisonvueComponent=!0,e.getId=()=>r,e.getType=()=>"chart",e.isVisible=()=>m.value,e.setVisible=a=>{m.value=a},e.getLoadDelay=()=>f.value,e.setLoadDelay=a=>{f.value=a},e.reload=()=>s.reloadHisonComponent(v),s.hisonCloser.component.chartList[r]&&s.hisonCloser.component.chartList[r].isHisonvueComponent&&console.warn(`[Hisonvue] The chart ID is at risk of being duplicated. ${r}`),s.hisonCloser.component.chartList[r]=e,g("mounted",s.hisonCloser.component.chartList[r])}const j=async()=>{var a;l=!0,i!==null&&(clearTimeout(i),i=null);const e=o.value;if(e)try{try{(a=e.stop)==null||a.call(e)}catch{}e.destroy()}catch{}finally{o.value=null}delete s.hisonCloser.component.chartList[r],u.value=!0,await t.nextTick()},k=async()=>{u.value&&(!y||l||(u.value=!1,await t.nextTick(),i=window.setTimeout(()=>{!y||l||requestAnimationFrame(()=>{requestAnimationFrame(()=>{q()})})},f.value)))};return s.registerReloadable(v,async()=>{await j(),await k()}),t.onMounted(async()=>{u.value=!1,await t.nextTick(),i=window.setTimeout(()=>{!y||l||requestAnimationFrame(()=>{requestAnimationFrame(()=>{q()})})},f.value)}),t.onBeforeUnmount(async()=>{y=!1,i!==null&&(clearTimeout(i),i=null),await j(),s.unregisterReloadable(v)}),t.watch(b,()=>{var e;l||(w(),(e=o.value)==null||e.resize(),g("responsive-change",b.value))}),t.watch(()=>n.modelValue,e=>{u.value||l||!o.value||!e||typeof e!="object"||!Array.isArray(e.datasets)||(o.value.data=R(d(t.toRaw(e))),o.value.update("none"))},{deep:!0}),t.watch(()=>n.options,e=>{u.value||l||!o.value||!e||typeof e!="object"||(o.value.options=T(d(t.toRaw(e))),o.value.update("none"))},{deep:!0}),t.watch(()=>n.visible,e=>{e!==m.value&&(m.value=!!e)}),t.watch(()=>n.loadDelay,e=>{const a=Number(e);Number.isFinite(a)&&a>=0&&a!==f.value&&(f.value=a)}),t.watch(()=>n.class,()=>w()),t.watch(()=>n.type,()=>{l||s.reloadHisonComponent(v)}),{canvasRef:h,props:n,attrs:A,visibleClass:S,responsiveClassList:c,isPending:u}}});function H(n,g,A,r,v,h){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-chart","hison-wrapper",...n.responsiveClassList,n.visibleClass]),style:t.normalizeStyle(n.props.style)},[n.isPending?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("canvas",t.mergeProps({key:0,ref:"canvasRef"},n.attrs),null,16))],6)}const I=D._export_sfc(F,[["render",H]]);exports.default=I;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { defineComponent as B, ref as d, computed as P, onMounted as U, nextTick as L, onBeforeUnmount as _, watch as i, toRaw as g, markRaw as x, createElementBlock as I, openBlock as k, normalizeStyle as V, normalizeClass as E, createCommentVNode as G, mergeProps as M } from "vue";
|
|
2
|
+
import { g as J, u as K, r as Q, d as W, c as F, e as X, t as Y, a as Z, b as H, h as v, p as N, C as ee } from "./index-DUh7pai4.mjs";
|
|
3
|
+
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const ae = {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for the chart instance.
|
|
7
|
+
* - Use `hison.component.getChart(id)` to access chart methods at runtime.
|
|
8
|
+
* - ⚠️ Duplicate `id` values will throw at mount time.
|
|
9
|
+
*/
|
|
10
|
+
id: { type: String, required: !1 },
|
|
11
|
+
/**
|
|
12
|
+
* Custom class applied to the chart container.
|
|
13
|
+
* - Accepts string / array / object. Works with `hison-col-*`, `hison-size-*`, etc.
|
|
14
|
+
*/
|
|
15
|
+
class: {
|
|
16
|
+
type: [String, Array, Object],
|
|
17
|
+
required: !1
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* Inline style applied to the chart container.
|
|
21
|
+
* - Accepts string / object / array of objects (Vue style binding forms)
|
|
22
|
+
*/
|
|
23
|
+
style: {
|
|
24
|
+
type: [String, Object, Array],
|
|
25
|
+
required: !1
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* The chart type to render.
|
|
29
|
+
* - Examples: `'line'`, `'bar'`, `'doughnut'`, `'pie'`, `'radar'`, etc.
|
|
30
|
+
* - Uses Chart.js `ChartType` internally
|
|
31
|
+
* - This is a required prop.
|
|
32
|
+
*/
|
|
33
|
+
type: { type: String, required: !0 },
|
|
34
|
+
/**
|
|
35
|
+
* The data object used to render the chart.
|
|
36
|
+
* - Follows the Chart.js `ChartData` structure
|
|
37
|
+
* - Supports `v-model`.
|
|
38
|
+
*/
|
|
39
|
+
modelValue: { type: Object, required: !0 },
|
|
40
|
+
/**
|
|
41
|
+
* Optional configuration for the chart.
|
|
42
|
+
* - Follows the Chart.js `ChartOptions` structure
|
|
43
|
+
*/
|
|
44
|
+
options: { type: Object, required: !1 },
|
|
45
|
+
/**
|
|
46
|
+
* Controls the visibility of the chart.
|
|
47
|
+
*/
|
|
48
|
+
visible: { type: Boolean, default: !0 },
|
|
49
|
+
/**
|
|
50
|
+
* Delay (ms) before recreating the chart on reload.
|
|
51
|
+
*/
|
|
52
|
+
loadDelay: { type: Number, default: 500 }
|
|
53
|
+
}, se = B({
|
|
54
|
+
name: "HChart",
|
|
55
|
+
props: ae,
|
|
56
|
+
emits: ["update:modelValue", "mounted", "responsive-change"],
|
|
57
|
+
setup(a, { emit: A, attrs: q }) {
|
|
58
|
+
const n = a.id || J(), m = `hchart:${n}`, h = d(null), s = d(null), y = d(a.visible), O = P(() => y.value ? "" : "hison-display-none"), w = K(), u = d([]), l = d(!1), c = d(a.loadDelay ?? 500);
|
|
59
|
+
let o = null, p = !0, r = !1;
|
|
60
|
+
const j = () => {
|
|
61
|
+
u.value = X(Y(a.class) || "", w.value), Z(u.value, "col") === -1 && u.value.push("hison-col-12"), H(u.value, "size", v.componentStyle.size), H(u.value, "color", "primary");
|
|
62
|
+
}, f = (e) => {
|
|
63
|
+
if (Array.isArray(e))
|
|
64
|
+
return e.map((t) => typeof t == "string" ? N(t) || t : typeof t == "object" && t !== null ? f(t) : t);
|
|
65
|
+
if (typeof e == "object" && e !== null) {
|
|
66
|
+
const t = {};
|
|
67
|
+
for (const [C, b] of Object.entries(e))
|
|
68
|
+
if (typeof b == "string" && /color/i.test(C)) {
|
|
69
|
+
const z = N(b);
|
|
70
|
+
t[C] = z || b;
|
|
71
|
+
} else
|
|
72
|
+
t[C] = f(b);
|
|
73
|
+
return t;
|
|
74
|
+
}
|
|
75
|
+
return e;
|
|
76
|
+
};
|
|
77
|
+
function D(e) {
|
|
78
|
+
return !e || typeof e != "object" || !Array.isArray(e.datasets) ? { datasets: [] } : {
|
|
79
|
+
...e,
|
|
80
|
+
datasets: e.datasets.filter((t) => !!t)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function R(e) {
|
|
84
|
+
return !e || typeof e != "object" ? {} : e;
|
|
85
|
+
}
|
|
86
|
+
function S() {
|
|
87
|
+
if (!p || r) return;
|
|
88
|
+
if (!h.value) {
|
|
89
|
+
console.warn("[mountChart] canvasRef.value is null");
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
j(), s.value = x(new ee(h.value, {
|
|
93
|
+
type: a.type,
|
|
94
|
+
data: D(f(g(a.modelValue))),
|
|
95
|
+
options: R(f(g(a.options)))
|
|
96
|
+
}));
|
|
97
|
+
const e = s.value;
|
|
98
|
+
e.isHisonvueComponent = !0, e.getId = () => n, e.getType = () => "chart", e.isVisible = () => y.value, e.setVisible = (t) => {
|
|
99
|
+
y.value = t;
|
|
100
|
+
}, e.getLoadDelay = () => c.value, e.setLoadDelay = (t) => {
|
|
101
|
+
c.value = t;
|
|
102
|
+
}, e.reload = () => F(m), v.component.chartList[n] && v.component.chartList[n].isHisonvueComponent && console.warn(`[Hisonvue] The chart ID is at risk of being duplicated. ${n}`), v.component.chartList[n] = e, A("mounted", v.component.chartList[n]);
|
|
103
|
+
}
|
|
104
|
+
const T = async () => {
|
|
105
|
+
var t;
|
|
106
|
+
r = !0, o !== null && (clearTimeout(o), o = null);
|
|
107
|
+
const e = s.value;
|
|
108
|
+
if (e)
|
|
109
|
+
try {
|
|
110
|
+
try {
|
|
111
|
+
(t = e.stop) == null || t.call(e);
|
|
112
|
+
} catch {
|
|
113
|
+
}
|
|
114
|
+
e.destroy();
|
|
115
|
+
} catch {
|
|
116
|
+
} finally {
|
|
117
|
+
s.value = null;
|
|
118
|
+
}
|
|
119
|
+
delete v.component.chartList[n], l.value = !0, await L();
|
|
120
|
+
}, $ = async () => {
|
|
121
|
+
l.value && (!p || r || (l.value = !1, await L(), o = window.setTimeout(() => {
|
|
122
|
+
!p || r || requestAnimationFrame(() => {
|
|
123
|
+
requestAnimationFrame(() => {
|
|
124
|
+
S();
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}, c.value)));
|
|
128
|
+
};
|
|
129
|
+
return Q(m, async () => {
|
|
130
|
+
await T(), await $();
|
|
131
|
+
}), U(async () => {
|
|
132
|
+
l.value = !1, await L(), o = window.setTimeout(() => {
|
|
133
|
+
!p || r || requestAnimationFrame(() => {
|
|
134
|
+
requestAnimationFrame(() => {
|
|
135
|
+
S();
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}, c.value);
|
|
139
|
+
}), _(async () => {
|
|
140
|
+
p = !1, o !== null && (clearTimeout(o), o = null), await T(), W(m);
|
|
141
|
+
}), i(w, () => {
|
|
142
|
+
var e;
|
|
143
|
+
r || (j(), (e = s.value) == null || e.resize(), A("responsive-change", w.value));
|
|
144
|
+
}), i(() => a.modelValue, (e) => {
|
|
145
|
+
l.value || r || !s.value || !e || typeof e != "object" || !Array.isArray(e.datasets) || (s.value.data = D(f(g(e))), s.value.update("none"));
|
|
146
|
+
}, { deep: !0 }), i(() => a.options, (e) => {
|
|
147
|
+
l.value || r || !s.value || !e || typeof e != "object" || (s.value.options = R(f(g(e))), s.value.update("none"));
|
|
148
|
+
}, { deep: !0 }), i(() => a.visible, (e) => {
|
|
149
|
+
e !== y.value && (y.value = !!e);
|
|
150
|
+
}), i(() => a.loadDelay, (e) => {
|
|
151
|
+
const t = Number(e);
|
|
152
|
+
Number.isFinite(t) && t >= 0 && t !== c.value && (c.value = t);
|
|
153
|
+
}), i(() => a.class, () => j()), i(() => a.type, () => {
|
|
154
|
+
r || F(m);
|
|
155
|
+
}), {
|
|
156
|
+
canvasRef: h,
|
|
157
|
+
props: a,
|
|
158
|
+
attrs: q,
|
|
159
|
+
visibleClass: O,
|
|
160
|
+
responsiveClassList: u,
|
|
161
|
+
isPending: l
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
function ne(a, A, q, n, m, h) {
|
|
166
|
+
return k(), I("div", {
|
|
167
|
+
class: E(["hison-chart", "hison-wrapper", ...a.responsiveClassList, a.visibleClass]),
|
|
168
|
+
style: V(a.props.style)
|
|
169
|
+
}, [
|
|
170
|
+
a.isPending ? G("", !0) : (k(), I("canvas", M({
|
|
171
|
+
key: 0,
|
|
172
|
+
ref: "canvasRef"
|
|
173
|
+
}, a.attrs), null, 16))
|
|
174
|
+
], 6);
|
|
175
|
+
}
|
|
176
|
+
const ie = /* @__PURE__ */ te(se, [["render", ne]]);
|
|
177
|
+
export {
|
|
178
|
+
ie as default
|
|
179
|
+
};
|