rtcpts 0.0.71 → 0.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +91 -91
- package/dist/charts-ChkiYQxb.cjs +1 -0
- package/dist/{charts-fA1hE3y8.js → charts-DKkEg_xR.js} +28 -21
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/components/j-c-more-menu/index.d.ts +17 -1
- package/dist/components/j-c-more-menu/types.d.ts +6 -1
- package/dist/components/j-c-nested-select/NestedMenuItem.d.ts +3 -4
- package/dist/components/j-c-nested-select/index.d.ts +11 -12
- package/dist/components/j-c-nested-select/types.d.ts +79 -0
- package/dist/components/j-ch-line/index.d.ts +10 -0
- package/dist/components/j-ch-line/types.d.ts +7 -0
- package/dist/index.css +1 -1
- package/dist/rtcpt-styles.css +1 -1
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +2891 -2875
- package/dist/svg-raw.d.ts +4 -4
- package/package.json +95 -95
- package/dist/charts-DJRnfFOn.cjs +0 -1
package/dist/svg-raw.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module '*.svg?raw' {
|
|
2
|
-
const content: string;
|
|
3
|
-
export default content;
|
|
4
|
-
}
|
|
1
|
+
declare module '*.svg?raw' {
|
|
2
|
+
const content: string;
|
|
3
|
+
export default content;
|
|
4
|
+
}
|
package/package.json
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rtcpts",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "A Vue 3 component library built with Vite and TypeScript, featuring components integrated with Quasar.",
|
|
5
|
-
"main": "dist/rtcpt.umd.js",
|
|
6
|
-
"module": "dist/rtcpt.es.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"p": "npm publish",
|
|
11
|
-
"build:colors": "node scripts/generate-colors.js",
|
|
12
|
-
"build:svg": "node scripts/generate-custom-svg.js",
|
|
13
|
-
"build:types": "node scripts/generate-global-types.js",
|
|
14
|
-
"build": "vite build",
|
|
15
|
-
"build-all": "npm run build:colors && npm run build:svg && npm run build:types && vite build",
|
|
16
|
-
"dev": "npm run build:colors && npm run build:svg && vite build --watch",
|
|
17
|
-
"yalc:publish": "npm run build-all && npx yalc push",
|
|
18
|
-
"yalc:push": "npm run build-all && npx yalc push",
|
|
19
|
-
"yalc:dev": "node scripts/yalc-dev.js",
|
|
20
|
-
"patch": "npm version patch && npm run p",
|
|
21
|
-
"minor": "npm version minor && npm run p",
|
|
22
|
-
"major": "npm version major && npm run p",
|
|
23
|
-
"test": "vitest run",
|
|
24
|
-
"test:watch": "vitest"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"dist",
|
|
28
|
-
"README.md",
|
|
29
|
-
"LICENSE"
|
|
30
|
-
],
|
|
31
|
-
"exports": {
|
|
32
|
-
".": {
|
|
33
|
-
"types": "./dist/index.d.ts",
|
|
34
|
-
"import": "./dist/rtcpt.es.js",
|
|
35
|
-
"require": "./dist/rtcpt.cjs.js"
|
|
36
|
-
},
|
|
37
|
-
"./resolver": {
|
|
38
|
-
"types": "./dist/resolver.d.ts",
|
|
39
|
-
"import": "./dist/resolver.mjs",
|
|
40
|
-
"require": "./dist/resolver.cjs"
|
|
41
|
-
},
|
|
42
|
-
"./charts": {
|
|
43
|
-
"types": "./dist/charts.d.ts",
|
|
44
|
-
"import": "./dist/charts.es.js",
|
|
45
|
-
"require": "./dist/charts.cjs.js"
|
|
46
|
-
},
|
|
47
|
-
"./rtcpt.css": "./dist/index.css",
|
|
48
|
-
"./rtcpt-styles.css": "./dist/rtcpt-styles.css",
|
|
49
|
-
"./dist/index.css": "./dist/index.css",
|
|
50
|
-
"./dist/rtcpt-styles.css": "./dist/rtcpt-styles.css"
|
|
51
|
-
},
|
|
52
|
-
"peerDependencies": {
|
|
53
|
-
"chart.js": "^4.0.0",
|
|
54
|
-
"quasar": "^2.0.0",
|
|
55
|
-
"vue": "^3.0.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@vitejs/plugin-vue": "^5.2.1",
|
|
59
|
-
"@vitest/coverage-v8": "2.1.9",
|
|
60
|
-
"@vue/test-utils": "^2.4.10",
|
|
61
|
-
"chart.js": "^4.4.7",
|
|
62
|
-
"debug": "^4.4.3",
|
|
63
|
-
"happy-dom": "^20.9.0",
|
|
64
|
-
"prettier": "^2.5.1",
|
|
65
|
-
"quasar": "^2.18.6",
|
|
66
|
-
"resolve": "^1.22.11",
|
|
67
|
-
"sass": "^1.94.2",
|
|
68
|
-
"typescript": "^5.9.3",
|
|
69
|
-
"unplugin-vue-components": "^30.0.0",
|
|
70
|
-
"vite": "^6.0.7",
|
|
71
|
-
"vite-plugin-dts": "^4.5.4",
|
|
72
|
-
"vitest": "^2",
|
|
73
|
-
"vue": "^3.5.25"
|
|
74
|
-
},
|
|
75
|
-
"keywords": [
|
|
76
|
-
"vue",
|
|
77
|
-
"quasar",
|
|
78
|
-
"component-library",
|
|
79
|
-
"typescript"
|
|
80
|
-
],
|
|
81
|
-
"author": "dirk.he@redteamobile.com",
|
|
82
|
-
"license": "MIT",
|
|
83
|
-
"repository": {
|
|
84
|
-
"type": "git",
|
|
85
|
-
"url": "http://gitlab.redtea.io/redteamobile/ngiot-frontend-cpt.git",
|
|
86
|
-
"directory": "."
|
|
87
|
-
},
|
|
88
|
-
"homepage": "http://gitlab.redtea.io/redteamobile/ngiot-frontend-cpt",
|
|
89
|
-
"bugs": {
|
|
90
|
-
"url": "http://gitlab.redtea.io/redteamobile/ngiot-frontend-cpt/-/issues"
|
|
91
|
-
},
|
|
92
|
-
"dependencies": {
|
|
93
|
-
"@floating-ui/dom": "^1.7.6"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "rtcpts",
|
|
3
|
+
"version": "0.0.73",
|
|
4
|
+
"description": "A Vue 3 component library built with Vite and TypeScript, featuring components integrated with Quasar.",
|
|
5
|
+
"main": "dist/rtcpt.umd.js",
|
|
6
|
+
"module": "dist/rtcpt.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"p": "npm publish",
|
|
11
|
+
"build:colors": "node scripts/generate-colors.js",
|
|
12
|
+
"build:svg": "node scripts/generate-custom-svg.js",
|
|
13
|
+
"build:types": "node scripts/generate-global-types.js",
|
|
14
|
+
"build": "vite build",
|
|
15
|
+
"build-all": "npm run build:colors && npm run build:svg && npm run build:types && vite build",
|
|
16
|
+
"dev": "npm run build:colors && npm run build:svg && vite build --watch",
|
|
17
|
+
"yalc:publish": "npm run build-all && npx yalc push",
|
|
18
|
+
"yalc:push": "npm run build-all && npx yalc push",
|
|
19
|
+
"yalc:dev": "node scripts/yalc-dev.js",
|
|
20
|
+
"patch": "npm version patch && npm run p",
|
|
21
|
+
"minor": "npm version minor && npm run p",
|
|
22
|
+
"major": "npm version major && npm run p",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"test:watch": "vitest"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/rtcpt.es.js",
|
|
35
|
+
"require": "./dist/rtcpt.cjs.js"
|
|
36
|
+
},
|
|
37
|
+
"./resolver": {
|
|
38
|
+
"types": "./dist/resolver.d.ts",
|
|
39
|
+
"import": "./dist/resolver.mjs",
|
|
40
|
+
"require": "./dist/resolver.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./charts": {
|
|
43
|
+
"types": "./dist/charts.d.ts",
|
|
44
|
+
"import": "./dist/charts.es.js",
|
|
45
|
+
"require": "./dist/charts.cjs.js"
|
|
46
|
+
},
|
|
47
|
+
"./rtcpt.css": "./dist/index.css",
|
|
48
|
+
"./rtcpt-styles.css": "./dist/rtcpt-styles.css",
|
|
49
|
+
"./dist/index.css": "./dist/index.css",
|
|
50
|
+
"./dist/rtcpt-styles.css": "./dist/rtcpt-styles.css"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"chart.js": "^4.0.0",
|
|
54
|
+
"quasar": "^2.0.0",
|
|
55
|
+
"vue": "^3.0.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
59
|
+
"@vitest/coverage-v8": "2.1.9",
|
|
60
|
+
"@vue/test-utils": "^2.4.10",
|
|
61
|
+
"chart.js": "^4.4.7",
|
|
62
|
+
"debug": "^4.4.3",
|
|
63
|
+
"happy-dom": "^20.9.0",
|
|
64
|
+
"prettier": "^2.5.1",
|
|
65
|
+
"quasar": "^2.18.6",
|
|
66
|
+
"resolve": "^1.22.11",
|
|
67
|
+
"sass": "^1.94.2",
|
|
68
|
+
"typescript": "^5.9.3",
|
|
69
|
+
"unplugin-vue-components": "^30.0.0",
|
|
70
|
+
"vite": "^6.0.7",
|
|
71
|
+
"vite-plugin-dts": "^4.5.4",
|
|
72
|
+
"vitest": "^2",
|
|
73
|
+
"vue": "^3.5.25"
|
|
74
|
+
},
|
|
75
|
+
"keywords": [
|
|
76
|
+
"vue",
|
|
77
|
+
"quasar",
|
|
78
|
+
"component-library",
|
|
79
|
+
"typescript"
|
|
80
|
+
],
|
|
81
|
+
"author": "dirk.he@redteamobile.com",
|
|
82
|
+
"license": "MIT",
|
|
83
|
+
"repository": {
|
|
84
|
+
"type": "git",
|
|
85
|
+
"url": "http://gitlab.redtea.io/redteamobile/ngiot-frontend-cpt.git",
|
|
86
|
+
"directory": "."
|
|
87
|
+
},
|
|
88
|
+
"homepage": "http://gitlab.redtea.io/redteamobile/ngiot-frontend-cpt",
|
|
89
|
+
"bugs": {
|
|
90
|
+
"url": "http://gitlab.redtea.io/redteamobile/ngiot-frontend-cpt/-/issues"
|
|
91
|
+
},
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"@floating-ui/dom": "^1.7.6"
|
|
94
|
+
}
|
|
95
|
+
}
|
package/dist/charts-DJRnfFOn.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),g=require("chart.js/auto"),y=(e,i)=>{const n=e.__vccOpts||e;for(const[o,s]of i)n[o]=s;return n};function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function h(e,i){if(!i)return{...e};const n={...e};for(const o of Object.keys(i)){const s=i[o],u=e[o];if(s!==void 0){if(s===null){n[o]=null;continue}k(u)&&k(s)?n[o]=h(u,s):n[o]=s}}return n}const $=a.defineComponent({name:"JChBar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var c;o&&o.destroy();const d=(c=i.value)==null?void 0:c.getContext("2d");if(!d)return;const t={labels:e.labels,datasets:e.datasets.map(r=>({...r,type:"bar",borderWidth:r.borderWidth??0,borderRadius:r.borderRadius??4,maxBarThickness:r.maxBarThickness??34,backgroundColor:r.backgroundColor||"#3A416F"}))},l={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},scales:{y:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799"}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10}}}};o=new g.Chart(d,{type:"bar",data:t,options:h(l,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{f()},{deep:!0}),{barChartCanvas:i,chartContainer:n}}}),O={ref:"chartContainer",style:{position:"relative"}};function S(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",O,[a.createElementVNode("div",null,[a.createElementVNode("canvas",{ref:"barChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])],512)}const w=y($,[["render",S],["__scopeId","data-v-e2691574"]]),_=a.defineComponent({name:"JChBarLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var t;n&&n.destroy();const s=(t=i.value)==null?void 0:t.getContext("2d");if(!s)return;const u=e.datasets.map(l=>{let c={};const r=l.type==="line"?"line":"bar";return l.type==="line"?c={type:"line",tension:.4,pointRadius:0,borderWidth:3,fill:!1,backgroundColor:"transparent",maxBarThickness:void 0}:l.type==="bar"&&(c={type:"bar",borderWidth:0,borderRadius:4,borderSkipped:!1,fill:void 0,maxBarThickness:34,backgroundColor:l.backgroundColor}),{type:r,...l,...c}}),f={labels:e.labels,datasets:u},d={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:l=>`${l.dataset.label||""}: ${l.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(l,c)=>{const r=e.labels[c];return r&&r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{data:f,options:h(d,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{mixedChartCanvas:i}}});function A(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"mixedChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const E=y(_,[["render",A]]),q=a.defineComponent({name:"JChBubble",props:{labels:{type:Array,default:()=>[],required:!1},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,backgroundColor:t.backgroundColor||"rgba(54, 162, 235, 0.6)"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!0,color:"#f5f6fa"},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(t,l)=>{const c=e.labels[l];return c?typeof c=="string"&&c.length>13?`${c.slice(0,13)}...`:c:t}}}}};n=new g.Chart(s,{type:"bubble",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{bubbleChartCanvas:i}}});function T(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"bubbleChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const B=y(q,[["render",T]]),H=a.defineComponent({name:"JChLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300},unitName:{type:String,default:""}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,tension:.4,pointRadius:2,borderWidth:3,fill:!1,backgroundColor:"transparent",type:"line"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"line",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue} ${e.unitName}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1,dash:[5,5]},grid:{display:!1,drawOnChartArea:!1,drawTicks:!1},ticks:{display:!0,color:"#969799",padding:20,font:{size:10,family:"Open Sans",style:"normal"},callback:(t,l,c)=>{const r=e.labels[l];return r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{type:"line",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets],()=>{o()},{deep:!0}),{lineChartCanvas:i}}}),j={ref:"chartContainer"};function z(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",j,[a.createElementVNode("canvas",{ref:"lineChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const N=y(H,[["render",z],["__scopeId","data-v-1a079ae0"]]),W=a.defineComponent({name:"JChPieDoughnut",props:{type:{type:String,required:!0,validator:e=>["pie","doughnut"].includes(e)},labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var r;o&&o.destroy();const d=(r=i.value)==null?void 0:r.getContext("2d");if(!d)return;const t=e.type,l={labels:e.labels,datasets:e.datasets.map(b=>({...b,type:t,borderWidth:b.borderWidth??2}))},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},interaction:{intersect:!0,mode:"index"}};o=new g.Chart(d,{type:t,data:l,options:h(c,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.type],()=>{f()},{deep:!0}),{chartCanvas:i,chartContainer:n}}}),R={ref:"chartContainer",style:{position:"relative"}};function V(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",R,[a.createElementVNode("canvas",{ref:"chartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const L=y(W,[["render",V]]),P=a.defineComponent({name:"JChRadar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,type:"radar",fill:t.fill??!0,backgroundColor:t.backgroundColor||"rgba(58,65,111,0.2)",borderColor:t.borderColor||"rgba(58,65,111,1)",borderWidth:t.borderWidth??2}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{r:{beginAtZero:!0,angleLines:{color:"#f5f6fa"},grid:{color:"#f5f6fa"},pointLabels:{color:"#969799",font:{size:11,family:"Open Sans"}},ticks:{display:!1}}}};n=new g.Chart(s,{type:"radar",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{radarChartCanvas:i}}});function D(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"radarChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const I=y(P,[["render",D]]);exports._export_sfc=y;exports.index=w;exports.index$1=E;exports.index$2=B;exports.index$3=N;exports.index$4=L;exports.index$5=I;
|