Skip to content

Commit aa96c9c

Browse files
committed
VueUiCursor added new component
1 parent 60040e6 commit aa96c9c

File tree

10 files changed

+347
-13
lines changed

10 files changed

+347
-13
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
![GitHub issues](https://img.shields.io/github/issues/graphieros/vue-data-ui)
1414
![NPM](https://img.shields.io/npm/l/vue-data-ui)
1515
![npm](https://img.shields.io/npm/dt/vue-data-ui)
16-
![Static Badge](https://img.shields.io/badge/components-45-green)
16+
![Static Badge](https://img.shields.io/badge/components-46-green)
1717

1818
[Interactive documentation](https://vue-data-ui.graphieros.com/)
1919

@@ -76,7 +76,8 @@ Available components:
7676

7777
- [VueUiAccordion](https://vue-data-ui.graphieros.com/docs#vue-ui-accordion)
7878
- [VueUiAnnotator](https://vue-data-ui.graphieros.com/docs#vue-ui-annotator)
79-
- [VueUiDashboard](https://vue-data-ui.graphieros.com/docs#vue-ui-dashboard)
79+
- [VueUiAnnotator](https://vue-data-ui.graphieros.com/docs#vue-ui-annotator)
80+
- [VueUiCursor](https://vue-data-ui.graphieros.com/docs#vue-ui-cursor)
8081
- [VueUiDigits](https://vue-data-ui.graphieros.com/docs#vue-ui-digits)
8182
- [VueUiIcon](https://vue-data-ui.graphieros.com/docs#vue-ui-icon)
8283
- [VueUiKpi](https://vue-data-ui.graphieros.com/docs#vue-ui-kpi)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "2.1.10",
4+
"version": "2.1.11",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/App.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import TreemapTest from "./components/vue-ui-treemap.vue";
6060
import TableHeatmapTest from "./components/vue-ui-table-heatmap.vue";
6161
import AccordionTest from "./components/vue-ui-accordion.vue";
6262
import QuickTest from "./components/vue-ui-quick-chart.vue";
63+
import TestCursor from "./components/vue-ui-cursor.vue";
6364
6465
const dataset = ref([
6566
{
@@ -3333,12 +3334,18 @@ const quickConfig = ref({
33333334
xyPeriodLabelsRotation: -20
33343335
})
33353336
3337+
const cursorConfig = ref({
3338+
3339+
})
3340+
33363341
</script>
33373342

33383343
<template>
33393344

3345+
<VueDataUi component="VueUiCursor" :config="cursorConfig"/>
3346+
33403347
<div style="padding-left: 48px; padding-right: 48px; width: 100%; max-width: 80%;margin: 0 auto">
3341-
<div style="padding-top: 48px; padding-bottom: 48px;font-weight: bold; line-height: 20px; display: flex; flex-direction:row; gap:24px; align-items:center">
3348+
<div id="haha" style="padding-top: 48px; padding-bottom: 48px;font-weight: bold; line-height: 20px; display: flex; flex-direction:row; gap:24px; align-items:center">
33423349
<img src="../../vue-data-ui-logo.png" height="100px"/>
33433350
<!-- <BaseIcon name="chartRelationCircle" :size="118" :strokeWidth="0.8" stroke="#5A5A5A"/> -->
33443351
<div>
@@ -3469,6 +3476,7 @@ const quickConfig = ref({
34693476
<BaseIcon name="lambda" stroke="#42d392" />
34703477
<BaseIcon name="people" stroke="#42d392" />
34713478
<BaseIcon name="copy" stroke="#42d392" />
3479+
<BaseIcon name="cursor" stroke="#42d392" />
34723480
</div>
34733481
</template>
34743482
</Box>

src/atoms/BaseIcon.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ const icons = computed(() => {
139139
lambda: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" fill="none" d="M 2 5 C 2 2 4 2 4 2 C 10 2 10 18 18 18 M 10 10 L 2 18" stroke-linecap="round" stroke-linejoin="round"/>`,
140140
people: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth / 2}" fill="none" d="M 5 1 A 1 1 0 0 0 5 9 A 1 1 0 0 0 5 1 M 15 1 A 1 1 0 0 0 15 9 A 1 1 0 0 0 15 1 M 5 11 A 1 1 0 0 0 5 19 A 1 1 0 0 0 5 11 M 15 11 A 1 1 0 0 0 15 19 A 1 1 0 0 0 15 11 M 3 4 L 3 4 M 7 4 L 7 4 M 3 6 C 4 7 6 7 7 6 M 13 4 L 13 4 M 17 4 L 17 4 M 13 6 C 14 7 16 7 17 6 M 3 14 L 3 14 M 7 14 L 7 14 M 3 16 C 4 17 6 17 7 16 M 13 14 L 13 14 M 17 14 L 17 14 M 13 16 C 14 17 16 17 17 16" stroke-linecap="round" stroke-linejoin="round"/>`,
141141
copy: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" fill="none" d="M 18 16 C 18 17 17 18 16 18 L 8 18 C 7 18 6 17 6 16 L 6 8 C 6 7 7 6 8 6 L 16 6 C 17 6 18 7 18 8 L 18 16 M 6 14 L 4 14 C 3 14 2 13 2 12 L 2 4 C 2 3 3 2 4 2 L 12 2 C 13 2 14 3 14 4 L 14 6" stroke-linecap="round" stroke-linejoin="round"/>`,
142-
accordion: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" stroke-linejoin="round" d="M 2 2 L 18 2 L 16 4 L 18 6 L 16 8 L 18 10 L 16 12 L 18 14 L 16 16 L 18 18 L 2 18 L 4 16 L 2 14 L 4 12 L 2 10 L 4 8 L 2 6 L 4 4 L 2 2"/><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 2 L 18 2 L 16 4 L 4 4 Z" /><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 6 L 18 6 L 16 8 L 4 8 Z" /><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 10 L 18 10 L 16 12 L 4 12 Z" /><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 14 L 18 14 L 16 16 L 4 16 Z" />`
142+
accordion: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" stroke-linejoin="round" d="M 2 2 L 18 2 L 16 4 L 18 6 L 16 8 L 18 10 L 16 12 L 18 14 L 16 16 L 18 18 L 2 18 L 4 16 L 2 14 L 4 12 L 2 10 L 4 8 L 2 6 L 4 4 L 2 2"/><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 2 L 18 2 L 16 4 L 4 4 Z" /><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 6 L 18 6 L 16 8 L 4 8 Z" /><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 10 L 18 10 L 16 12 L 4 12 Z" /><path stroke="none" fill="${props.stroke}" style="opacity:0.3" stroke-linecap="round" stroke-linejoin="round" d="M 2 14 L 18 14 L 16 16 L 4 16 Z" />`,
143+
cursor: `<path stroke="${props.stroke}" stroke-width="${props.strokeWidth}" fill="none" stroke-linecap="round" stroke-linejoin="round" d="M 6 10 A 1 1 0 0 0 14 10 A 1 1 0 0 0 6 10 M 1 10 L 6 10 M 14 10 L 19 10 M 10 1 L 10 6 M 10 14 L 10 19 M 10 8 L 10 12 M 8 10 L 12 10" />`
143144
}
144145
})
145146

src/components/vue-data-ui.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import VueUiXy from "./vue-ui-xy.vue";
4646
import VueUiTableHeatmap from "./vue-ui-table-heatmap.vue";
4747
import VueUiAccordion from "./vue-ui-accordion.vue";
4848
import VueUiQuickChart from "./vue-ui-quick-chart.vue";
49+
import VueUiCursor from "./vue-ui-cursor.vue";
4950
5051
const props = defineProps({
5152
component: { type: String },
@@ -54,7 +55,7 @@ const props = defineProps({
5455
})
5556
5657
const isError = computed(() => {
57-
return !["VueUi3dBar", "VueUiAgePyramid", "VueUiAnnotator", "VueUiCandlestick", "VueUiChestnut", "VueUiDashboard", "VueUiDigits", "VueUiDonutEvolution", "VueUiDonut", "VueUiGauge", "VueUiGalaxy", "VueUiHeatmap", "VueUiKpi", "VueUiMiniLoader", "VueUiMolecule", "VueUiMoodRadar", "VueUiNestedDonuts", "VueUiOnion", "VueUiQuadrant", "VueUiRadar", "VueUiRating", "VueUiRelationCircle", "VueUiRings", "VueUiScatter", "VueUiScreenshot", "VueUiSkeleton", "VueUiSmiley", "VueUiSparkbar", "VueUiSparkgauge", "VueUiSparkHistogram", "VueUiSparkline", "VueUiSparkStackbar", "VueUiTableSparkline", "VueUiTable", "VueUiThermometer", "VueUiTiremarks", "VueUiVerticalBar", "VueUiWaffle", "VueUiWheel", "VueUiXy", "VueUiTreemap", "VueUiTableHeatmap", "VueUiAccordion", "VueUiQuickChart"].includes(props.component)
58+
return !["VueUi3dBar", "VueUiAgePyramid", "VueUiAnnotator", "VueUiCandlestick", "VueUiChestnut", "VueUiDashboard", "VueUiDigits", "VueUiDonutEvolution", "VueUiDonut", "VueUiGauge", "VueUiGalaxy", "VueUiHeatmap", "VueUiKpi", "VueUiMiniLoader", "VueUiMolecule", "VueUiMoodRadar", "VueUiNestedDonuts", "VueUiOnion", "VueUiQuadrant", "VueUiRadar", "VueUiRating", "VueUiRelationCircle", "VueUiRings", "VueUiScatter", "VueUiScreenshot", "VueUiSkeleton", "VueUiSmiley", "VueUiSparkbar", "VueUiSparkgauge", "VueUiSparkHistogram", "VueUiSparkline", "VueUiSparkStackbar", "VueUiTableSparkline", "VueUiTable", "VueUiThermometer", "VueUiTiremarks", "VueUiVerticalBar", "VueUiWaffle", "VueUiWheel", "VueUiXy", "VueUiTreemap", "VueUiTableHeatmap", "VueUiAccordion", "VueUiQuickChart", "VueUiCursor"].includes(props.component)
5859
});
5960
6061
const vue_ui_3d_bar = ref(null);
@@ -100,6 +101,7 @@ const vue_ui_wheel = ref(null);
100101
const vue_ui_xy = ref(null);
101102
const vue_ui_table_heatmap = ref(null);
102103
const vue_ui_quick_chart = ref(null);
104+
const vue_ui_cursor = ref(null);
103105
104106
const emit = defineEmits([
105107
'selectLegend',
@@ -131,7 +133,7 @@ const recalculateHeight = ref(() => null);
131133
132134
onMounted(() => {
133135
if (isError.value) {
134-
throw new Error(`\n\nVue Data UI exception:\nThe provided component "${props.component}" does not exist. Check the spelling.\n\nAvailable components:\n\n. VueUi3dBar\n. VueUiAccordion\n. VueUiAgePyramid\n. VueUiAnnotator\n. VueUiCandlestick\n. VueUiChestnut\n. VueUiDashboard\n. VueUiDigits\n. VueUiDonutEvolution\n. VueUiDonut\n. VueUiGauge\n. VueUiHeatmap\n. VueUiMiniLoadar\n. VueUiKpi\n. VueUiMolecule\n. VueUiMoodRadar\n. VueUiNestedDonuts\n. VueUiOnion\n. VueUiQuadrant\n. VueUiQuickChart\n. VueUiRadar\n. VueUiRating\n. VueUiRelationCircle\n. VueUiRings\n. VueUiScatter\n. VueUiScreenshot\n. VueUiSkeleton\n. VueUiSmiley\n. VueUiSparkbar\n. VueUiSparkgauge\n. VueUiSparkHistogram\n. VueUiSparkline\n. VueUiSparkStackbar\n. VueUiTableHeatmap\n. VueUiTableSparkline\n. VueUiTable\n. VueUiThermometer\n. VueUiTiremarks\n. VueUiVerticalBar\n. VueUiWaffle\n. VueUiWheel\n. VueUiXy\n\n`)
136+
throw new Error(`\n\nVue Data UI exception:\nThe provided component "${props.component}" does not exist. Check the spelling.\n\nAvailable components:\n\n. VueUi3dBar\n. VueUiAccordion\n. VueUiAgePyramid\n. VueUiAnnotator\n. VueUiCandlestick\n. VueUiChestnut\n. VueUiCursor\n. VueUiDashboard\n. VueUiDigits\n. VueUiDonutEvolution\n. VueUiDonut\n. VueUiGauge\n. VueUiHeatmap\n. VueUiMiniLoadar\n. VueUiKpi\n. VueUiMolecule\n. VueUiMoodRadar\n. VueUiNestedDonuts\n. VueUiOnion\n. VueUiQuadrant\n. VueUiQuickChart\n. VueUiRadar\n. VueUiRating\n. VueUiRelationCircle\n. VueUiRings\n. VueUiScatter\n. VueUiScreenshot\n. VueUiSkeleton\n. VueUiSmiley\n. VueUiSparkbar\n. VueUiSparkgauge\n. VueUiSparkHistogram\n. VueUiSparkline\n. VueUiSparkStackbar\n. VueUiTableHeatmap\n. VueUiTableSparkline\n. VueUiTable\n. VueUiThermometer\n. VueUiTiremarks\n. VueUiVerticalBar\n. VueUiWaffle\n. VueUiWheel\n. VueUiXy\n\n`)
135137
}
136138
137139
if(vue_ui_quick_chart.value) {
@@ -357,6 +359,12 @@ defineExpose({
357359
The provided component "{{ component }}" does not exist
358360
</div>
359361

362+
<VueUiCursor
363+
v-if="component === 'VueUiCursor'"
364+
:config="config"
365+
ref="vue_ui_cursor"
366+
/>
367+
360368
<VueUiQuickChart
361369
v-if="component === 'VueUiQuickChart'"
362370
:config="config"

0 commit comments

Comments
 (0)