vue-data-ui 3.25.5 → 3.25.6
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/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-ta2JoIjx.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-DETHvNhl.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-Dh3_EsHb.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DhwySwgn.js} +380 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
- package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
- package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
- package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-C_inEafb.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-Bs2mBur5.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-CbOSJmRu.js} +2 -2
- package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
- package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
- package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
- package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
- package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
- package/dist/vue-ui-gauge-DLDULH26.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-DXIHhp-G.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-DqsVJkmO.js} +470 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-Dd1qfUiu.js} +376 -376
- package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
- package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +407 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BZq517pL.js} +4 -4
- package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
- package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
- package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
- package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
- package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
- package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
- package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
- package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
- package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
- package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
- package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
- package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-D0_KsB-y.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-1Z2zginj.js} +153 -153
- package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
- package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
- package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
- package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
- package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-BOBHo7-L.js} +524 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { Pt as t, Wt as n, X as r, i, nt as a, t as o } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as s, t as c } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as l } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { t as u } from "./useNestedProp-Chvyfpl-.js";
|
|
6
|
+
import { t as d } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
7
|
+
import { t as f } from "./DefGrad-DVBqDjhO.js";
|
|
8
|
+
import { Fragment as p, computed as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, normalizeClass as b, normalizeStyle as x, onMounted as S, openBlock as C, ref as w, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useSlots as k, watch as A, withCtx as j, withKeys as M } from "vue";
|
|
9
|
+
//#region src/atoms/BaseSmilingUnit.vue
|
|
10
|
+
var N = ["xmlns", "stroke"], P = ["stroke"], F = [
|
|
11
|
+
"xmlns",
|
|
12
|
+
"viewBox",
|
|
13
|
+
"stroke"
|
|
14
|
+
], I = ["viewBox", "stroke"], L = /*#__PURE__*/ d({
|
|
15
|
+
__name: "BaseSmilingUnit",
|
|
16
|
+
props: {
|
|
17
|
+
config: { type: Object },
|
|
18
|
+
unit: { type: Number },
|
|
19
|
+
currentRating: { type: Number },
|
|
20
|
+
getActiveColor: { type: Function },
|
|
21
|
+
calcShapeFill: { type: Function },
|
|
22
|
+
isReadonly: { type: Boolean },
|
|
23
|
+
hasBreakdown: { type: Boolean },
|
|
24
|
+
hoveredValue: { type: Number },
|
|
25
|
+
isCursorPointer: { type: Boolean }
|
|
26
|
+
},
|
|
27
|
+
emits: [
|
|
28
|
+
"rate",
|
|
29
|
+
"mouseenter",
|
|
30
|
+
"mouseleave"
|
|
31
|
+
],
|
|
32
|
+
setup(e, { emit: t }) {
|
|
33
|
+
let r = e, i = t;
|
|
34
|
+
return (t, a) => (C(), g("div", {
|
|
35
|
+
tabindex: "0",
|
|
36
|
+
class: b({ "vue-ui-smiley-rated": !e.config.readonly && e.currentRating === e.unit }),
|
|
37
|
+
style: x({
|
|
38
|
+
cursor: e.config.readonly ? "default" : r.isCursorPointer ? "pointer" : "default",
|
|
39
|
+
height: e.config.style.itemSize + "px",
|
|
40
|
+
aspectRatio: "1/1",
|
|
41
|
+
position: "relative"
|
|
42
|
+
}),
|
|
43
|
+
onMouseenter: a[0] ||= (e) => i("mouseenter"),
|
|
44
|
+
onMouseleave: a[1] ||= (e) => i("mouseleave"),
|
|
45
|
+
onClick: a[2] ||= (t) => i("rate", e.unit),
|
|
46
|
+
onKeyup: a[3] ||= M((t) => i("rate", e.unit), ["enter"])
|
|
47
|
+
}, [
|
|
48
|
+
e.config.style.tooltip.show && e.hasBreakdown && e.isReadonly ? (C(), g("div", {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "vue-ui-rating-tooltip",
|
|
51
|
+
style: x({
|
|
52
|
+
border: `1px solid ${e.config.style.tooltip.borderColor}`,
|
|
53
|
+
position: "absolute",
|
|
54
|
+
top: `${e.config.style.tooltip.offsetY - 48}px`,
|
|
55
|
+
left: "50%",
|
|
56
|
+
transform: "translateX(-50%)",
|
|
57
|
+
width: "fit-content",
|
|
58
|
+
textAlign: "center",
|
|
59
|
+
background: e.config.style.tooltip.backgroundColor,
|
|
60
|
+
display: e.hoveredValue === e.unit - 1 ? "block" : "none",
|
|
61
|
+
padding: "2px 12px",
|
|
62
|
+
borderRadius: e.config.style.tooltip.borderRadius + "px",
|
|
63
|
+
boxShadow: e.config.style.tooltip.boxShadow
|
|
64
|
+
})
|
|
65
|
+
}, [_("div", { style: x({
|
|
66
|
+
width: "100%",
|
|
67
|
+
display: "flex",
|
|
68
|
+
flexDirection: "row",
|
|
69
|
+
gap: "6px",
|
|
70
|
+
position: "relative",
|
|
71
|
+
textAlign: "center",
|
|
72
|
+
color: e.config.style.tooltip.color
|
|
73
|
+
}) }, [
|
|
74
|
+
_("span", { style: x(`font-size:${e.config.style.tooltip.fontSize}px`) }, D(e.unit) + ":", 5),
|
|
75
|
+
_("span", { style: x(`font-weight:${e.config.style.tooltip.bold ? "bold" : "normal"};font-size:${e.config.style.tooltip.fontSize}px`) }, [E(t.$slots, "rating", {}, void 0, !0)], 4),
|
|
76
|
+
_("div", { style: x(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${e.config.style.tooltip.borderColor}`) }, " ▼ ", 4)
|
|
77
|
+
], 4)], 4)) : h("", !0),
|
|
78
|
+
e.config.style.icons.filled ? (C(), g("svg", {
|
|
79
|
+
key: 1,
|
|
80
|
+
xmlns: O(o),
|
|
81
|
+
style: {
|
|
82
|
+
transition: "all 0.1s ease-in-out",
|
|
83
|
+
position: "absolute",
|
|
84
|
+
top: "0",
|
|
85
|
+
left: "0"
|
|
86
|
+
},
|
|
87
|
+
height: "100%",
|
|
88
|
+
viewBox: "0 0 24 24",
|
|
89
|
+
"stroke-width": "1.5",
|
|
90
|
+
stroke: e.getActiveColor(e.unit - 1),
|
|
91
|
+
fill: "none",
|
|
92
|
+
"stroke-linecap": "round",
|
|
93
|
+
"stroke-linejoin": "round"
|
|
94
|
+
}, [_("defs", null, [y(f, {
|
|
95
|
+
t: "radial",
|
|
96
|
+
id: `vueUiSmiley${e.unit - 1}`,
|
|
97
|
+
stops: [[
|
|
98
|
+
"0%",
|
|
99
|
+
O(n)(e.config.style.colors.active[e.unit - 1], .05),
|
|
100
|
+
1
|
|
101
|
+
], [
|
|
102
|
+
"100%",
|
|
103
|
+
e.config.style.colors.active[e.unit - 1],
|
|
104
|
+
1
|
|
105
|
+
]]
|
|
106
|
+
}, null, 8, ["id", "stops"])]), E(t.$slots, "path-icon-filled", {}, void 0, !0)], 8, N)) : (C(), g("svg", {
|
|
107
|
+
key: 2,
|
|
108
|
+
style: {
|
|
109
|
+
position: "absolute",
|
|
110
|
+
top: "0",
|
|
111
|
+
left: "0",
|
|
112
|
+
transition: "all 0.1s ease-in-out"
|
|
113
|
+
},
|
|
114
|
+
height: "100%",
|
|
115
|
+
viewBox: "0 0 24 24",
|
|
116
|
+
"stroke-width": "1.5",
|
|
117
|
+
stroke: e.getActiveColor(e.unit - 1),
|
|
118
|
+
fill: "none",
|
|
119
|
+
"stroke-linecap": "round",
|
|
120
|
+
"stroke-linejoin": "round"
|
|
121
|
+
}, [E(t.$slots, "path-icon", {}, void 0, !0)], 8, P)),
|
|
122
|
+
e.config.style.icons.filled && e.isReadonly ? (C(), g("svg", {
|
|
123
|
+
key: 3,
|
|
124
|
+
xmlns: O(o),
|
|
125
|
+
style: {
|
|
126
|
+
transition: "all 0.1s ease-in-out",
|
|
127
|
+
position: "absolute",
|
|
128
|
+
top: "0",
|
|
129
|
+
left: "0"
|
|
130
|
+
},
|
|
131
|
+
height: "100%",
|
|
132
|
+
viewBox: `0 0 ${e.calcShapeFill(e.unit - 1)} 24`,
|
|
133
|
+
"stroke-width": "1.5",
|
|
134
|
+
stroke: e.config.style.colors.activeReadonly[e.unit - 1],
|
|
135
|
+
fill: "none",
|
|
136
|
+
"stroke-linecap": "round",
|
|
137
|
+
"stroke-linejoin": "round"
|
|
138
|
+
}, [_("defs", null, [y(f, {
|
|
139
|
+
t: "radial",
|
|
140
|
+
id: `vueUiSmiley${e.unit - 1}`,
|
|
141
|
+
stops: [[
|
|
142
|
+
"0%",
|
|
143
|
+
O(n)(e.config.style.colors.activeReadonly[e.unit - 1], .05),
|
|
144
|
+
1
|
|
145
|
+
], [
|
|
146
|
+
"100%",
|
|
147
|
+
e.config.style.colors.activeReadonly[e.unit - 1],
|
|
148
|
+
1
|
|
149
|
+
]]
|
|
150
|
+
}, null, 8, ["id", "stops"])]), E(t.$slots, "path-icon-filled-readonly", {}, void 0, !0)], 8, F)) : h("", !0),
|
|
151
|
+
!e.config.style.icons.filled && e.isReadonly ? (C(), g("svg", {
|
|
152
|
+
key: 4,
|
|
153
|
+
style: {
|
|
154
|
+
position: "absolute",
|
|
155
|
+
top: "0",
|
|
156
|
+
left: "0",
|
|
157
|
+
transition: "all 0.1s ease-in-out"
|
|
158
|
+
},
|
|
159
|
+
height: "100%",
|
|
160
|
+
viewBox: `0 0 ${e.calcShapeFill(e.unit - 1)} 24`,
|
|
161
|
+
"stroke-width": "1.5",
|
|
162
|
+
stroke: e.config.style.colors.activeReadonly[e.unit - 1],
|
|
163
|
+
fill: "none",
|
|
164
|
+
"stroke-linecap": "round",
|
|
165
|
+
"stroke-linejoin": "round"
|
|
166
|
+
}, [E(t.$slots, "path-icon-readonly", {}, void 0, !0)], 8, I)) : h("", !0)
|
|
167
|
+
], 38));
|
|
168
|
+
}
|
|
169
|
+
}, [["__scopeId", "data-v-9734e83c"]]), R = /* @__PURE__ */ e({ default: () => W }), z = {
|
|
170
|
+
key: 0,
|
|
171
|
+
class: "vue-ui-rating-title",
|
|
172
|
+
style: { width: "100%" }
|
|
173
|
+
}, B = ["d", "fill"], V = ["d"], H = ["d", "fill"], U = ["d"], W = {
|
|
174
|
+
__name: "vue-ui-smiley",
|
|
175
|
+
props: {
|
|
176
|
+
config: {
|
|
177
|
+
type: Object,
|
|
178
|
+
default() {
|
|
179
|
+
return {};
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
dataset: {
|
|
183
|
+
type: Object,
|
|
184
|
+
default() {
|
|
185
|
+
return {};
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
emits: ["rate"],
|
|
190
|
+
setup(e, { expose: n, emit: o }) {
|
|
191
|
+
let { vue_ui_smiley: d } = l(), f = e, b = k(), E = o, O = w(null), M = w(W()), N = m(() => M.value.style.rating), P = m(() => M.value.style), F = m(() => M.value.debug);
|
|
192
|
+
S(() => {
|
|
193
|
+
b["chart-background"] && F.value && console.warn("VueUiSmiley does not support the #chart-background slot.");
|
|
194
|
+
});
|
|
195
|
+
function I() {
|
|
196
|
+
(!Object.hasOwn(f.dataset, "rating") || t(f.dataset)) && a({
|
|
197
|
+
componentName: "VueUiSmiley",
|
|
198
|
+
type: "datasetAttribute",
|
|
199
|
+
property: "rating",
|
|
200
|
+
debug: F.value
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
S(I), s({
|
|
204
|
+
config: () => M.value,
|
|
205
|
+
dataset: () => [],
|
|
206
|
+
component: "VueUiSmiley",
|
|
207
|
+
rules: [c.noHint]
|
|
208
|
+
});
|
|
209
|
+
let R = m(() => M.value.useCursorPointer);
|
|
210
|
+
function W() {
|
|
211
|
+
return u({
|
|
212
|
+
userConfig: f.config,
|
|
213
|
+
defaultConfig: d
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
A(() => f.config, (e) => {
|
|
217
|
+
M.value = W(), J.value = M.value.readonly, I();
|
|
218
|
+
}, { deep: !0 });
|
|
219
|
+
let G = m(() => {
|
|
220
|
+
let e = f.dataset.rating;
|
|
221
|
+
return e && typeof e == "object" && !Array.isArray(e) ? X(e) : e ?? null;
|
|
222
|
+
}), K = m(() => typeof f.dataset.rating == "object" && !Array.isArray(f.dataset.rating)), q = w(G.value);
|
|
223
|
+
A(G, (e) => {
|
|
224
|
+
q.value = e;
|
|
225
|
+
});
|
|
226
|
+
let J = w(M.value.readonly), Y = [
|
|
227
|
+
{
|
|
228
|
+
key: "smiley_0",
|
|
229
|
+
pathIconFilled: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-5 9.86a4.5 4.5 0 00-3.214 1.35 1 1 0 101.428 1.4 2.5 2.5 0 013.572 0 1 1 0 001.428-1.4A4.5 4.5 0 0012 13.2zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z",
|
|
230
|
+
pathIcon: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15.25a3.5 3.5 0 015 0",
|
|
231
|
+
pathIconFilledReadonly: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-5 9.86a4.5 4.5 0 00-3.214 1.35 1 1 0 101.428 1.4 2.5 2.5 0 013.572 0 1 1 0 001.428-1.4A4.5 4.5 0 0012 13.2zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z",
|
|
232
|
+
pathIconReadonly: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15.25a3.5 3.5 0 015 0"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
key: "smiley_1",
|
|
236
|
+
pathIconFilled: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 14H9l-.117.007a1 1 0 000 1.986L9 16h6l.117-.007a1 1 0 000-1.986L15 14zm-5.99-5-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z",
|
|
237
|
+
pathIcon: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9 15h6",
|
|
238
|
+
pathIconFilledReadonly: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 14H9l-.117.007a1 1 0 000 1.986L9 16h6l.117-.007a1 1 0 000-1.986L15 14zm-5.99-5-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z",
|
|
239
|
+
pathIconReadonly: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9 15h6"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
key: "smiley_2",
|
|
243
|
+
pathIconFilled: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z",
|
|
244
|
+
pathIcon: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01",
|
|
245
|
+
pathIconFilledReadonly: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z",
|
|
246
|
+
pathIconReadonly: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
key: "smiley_3",
|
|
250
|
+
pathIconFilled: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-1.8 10.946a1 1 0 00-1.414.014 2.5 2.5 0 01-3.572 0 1 1 0 00-1.428 1.4 4.5 4.5 0 006.428 0 1 1 0 00-.014-1.414zM9.01 9l-.127.007A1 1 0 009 11l.127-.007A1 1 0 009.01 9zm6 0-.127.007A1 1 0 0015 11l.127-.007A1 1 0 0015.01 9z",
|
|
251
|
+
pathIcon: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15a3.5 3.5 0 005 0",
|
|
252
|
+
pathIconFilledReadonly: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-1.8 10.946a1 1 0 00-1.414.014 2.5 2.5 0 01-3.572 0 1 1 0 00-1.428 1.4 4.5 4.5 0 006.428 0 1 1 0 00-.014-1.414zM9.01 9l-.127.007A1 1 0 009 11l.127-.007A1 1 0 009.01 9zm6 0-.127.007A1 1 0 0015 11l.127-.007A1 1 0 0015.01 9z",
|
|
253
|
+
pathIconReadonly: "M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15a3.5 3.5 0 005 0"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
key: "smiley_4",
|
|
257
|
+
pathIconFilled: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 13H9a1 1 0 00-1 1v.05a3.975 3.975 0 003.777 3.97l.227.005a4.026 4.026 0 003.99-3.79l.006-.206A1 1 0 0015 13zm-5.99-5-.127.007A1 1 0 009 10l.127-.007A1 1 0 009.01 8zm6 0-.127.007A1 1 0 0015 10l.127-.007A1 1 0 0015.01 8z",
|
|
258
|
+
pathIcon: "M3 12a9 9 0 1018 0A9 9 0 103 12M9 9h.01M15 9h.01M8 13a4 4 0 108 0H8",
|
|
259
|
+
pathIconFilledReadonly: "M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 13H9a1 1 0 00-1 1v.05a3.975 3.975 0 003.777 3.97l.227.005a4.026 4.026 0 003.99-3.79l.006-.206A1 1 0 0015 13zm-5.99-5-.127.007A1 1 0 009 10l.127-.007A1 1 0 009.01 8zm6 0-.127.007A1 1 0 0015 10l.127-.007A1 1 0 0015.01 8z",
|
|
260
|
+
pathIconReadonly: "M3 12a9 9 0 1018 0A9 9 0 103 12M9 9h.01M15 9h.01M8 13a4 4 0 108 0H8"
|
|
261
|
+
}
|
|
262
|
+
];
|
|
263
|
+
function X(e) {
|
|
264
|
+
if (e == null) return null;
|
|
265
|
+
let t = 0, n = 0;
|
|
266
|
+
for (let r in e) {
|
|
267
|
+
let i = Number(r), a = e[r];
|
|
268
|
+
Number.isFinite(i) && (t += i * a, n += a);
|
|
269
|
+
}
|
|
270
|
+
return n === 0 ? 0 : t / n;
|
|
271
|
+
}
|
|
272
|
+
function Z(e) {
|
|
273
|
+
let t = q.value - e;
|
|
274
|
+
switch (!0) {
|
|
275
|
+
case t < 0: return 0;
|
|
276
|
+
case t > 1: return 24;
|
|
277
|
+
default: return t * 24;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function Q(e) {
|
|
281
|
+
return M.value.readonly ? P.value.colors.inactive[e] : q.value === e + 1 || O.value !== null && O.value === e ? P.value.icons.useGradient && P.value.icons.filled ? `url(#vueUiSmiley${e})` : P.value.colors.active[e] : P.value.colors.inactive[e];
|
|
282
|
+
}
|
|
283
|
+
let $ = m(() => ({ value: e, tooltip: t = !1 }) => i(t ? P.value.tooltip.formatter : N.value.formatter, e, r({
|
|
284
|
+
v: e,
|
|
285
|
+
r: t ? P.value.tooltip.roundingValue : N.value.roundingValue
|
|
286
|
+
}), M.value));
|
|
287
|
+
function ee(e) {
|
|
288
|
+
J.value || (q.value = e, E("rate", e));
|
|
289
|
+
}
|
|
290
|
+
function te() {
|
|
291
|
+
return q.value;
|
|
292
|
+
}
|
|
293
|
+
function ne(e = !0) {
|
|
294
|
+
J.value = e;
|
|
295
|
+
}
|
|
296
|
+
return n({
|
|
297
|
+
getData: te,
|
|
298
|
+
toggleReadonly: ne
|
|
299
|
+
}), (e, t) => (C(), g("div", {
|
|
300
|
+
class: "vue-data-ui-component vue-ui-smiley",
|
|
301
|
+
style: x(`background:${P.value.backgroundColor};font-family:${P.value.fontFamily};width:100%;`),
|
|
302
|
+
onMouseleave: t[1] ||= (e) => O.value = void 0
|
|
303
|
+
}, [
|
|
304
|
+
P.value.title.text ? (C(), g("div", z, [_("div", { style: x(`color:${P.value.title.color};font-weight:${P.value.title.bold ? "bold" : "normal"};text-align:${P.value.title.textAlign};margin-bottom:${P.value.title.offsetY}px;font-size:${P.value.title.fontSize}px`) }, D(P.value.title.text), 5), P.value.title.subtitle.text ? (C(), g("div", {
|
|
305
|
+
key: 0,
|
|
306
|
+
style: x(`color:${P.value.title.subtitle.color};font-size:${P.value.title.subtitle.fontSize}px;text-align:${P.value.title.textAlign};margin-bottom:${P.value.title.subtitle.offsetY}px;font-weight:${P.value.title.subtitle.bold ? "bold" : "normal"}`)
|
|
307
|
+
}, D(P.value.title.subtitle.text), 5)) : h("", !0)])) : h("", !0),
|
|
308
|
+
N.value.show && N.value.position === "top" ? (C(), g("div", {
|
|
309
|
+
key: 1,
|
|
310
|
+
style: x(`width:100%;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold ? "bold" : "normal"};margin-left:${N.value.offsetX}px`)
|
|
311
|
+
}, D($.value({ value: q.value })), 5)) : h("", !0),
|
|
312
|
+
_("div", {
|
|
313
|
+
class: "vue-ui-smiley-wrapper",
|
|
314
|
+
style: x(`overflow:visible;height:${P.value.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)
|
|
315
|
+
}, [
|
|
316
|
+
N.value.show && N.value.position === "left" ? (C(), g("div", {
|
|
317
|
+
key: 0,
|
|
318
|
+
style: x(`width:fit-content;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold ? "bold" : "normal"};padding-right:${N.value.offsetX}px`)
|
|
319
|
+
}, D($.value({ value: q.value })), 5)) : h("", !0),
|
|
320
|
+
(C(), g(p, null, T(Y, (e, n) => y(L, {
|
|
321
|
+
key: e.key,
|
|
322
|
+
config: M.value,
|
|
323
|
+
unit: n + 1,
|
|
324
|
+
currentRating: q.value,
|
|
325
|
+
isReadonly: J.value,
|
|
326
|
+
hasBreakdown: K.value,
|
|
327
|
+
hoveredValue: O.value,
|
|
328
|
+
getActiveColor: Q,
|
|
329
|
+
calcShapeFill: Z,
|
|
330
|
+
isCursorPointer: R.value,
|
|
331
|
+
onMouseenter: (e) => O.value = n,
|
|
332
|
+
onMouseleave: t[0] ||= (e) => O.value = null,
|
|
333
|
+
onRate: (e) => ee(n + 1)
|
|
334
|
+
}, {
|
|
335
|
+
rating: j(() => [v(D($.value({
|
|
336
|
+
value: f.dataset.rating[String(n + 1)],
|
|
337
|
+
tooltip: !0
|
|
338
|
+
})), 1)]),
|
|
339
|
+
"path-icon-filled": j(() => [_("path", {
|
|
340
|
+
d: e.pathIconFilled,
|
|
341
|
+
"stroke-width": "0",
|
|
342
|
+
fill: Q(n)
|
|
343
|
+
}, null, 8, B)]),
|
|
344
|
+
"path-icon": j(() => [_("path", { d: e.pathIcon }, null, 8, V)]),
|
|
345
|
+
"path-icon-filled-readonly": j(() => [_("path", {
|
|
346
|
+
d: e.pathIconFilledReadonly,
|
|
347
|
+
"stroke-width": "0",
|
|
348
|
+
fill: P.value.icons.useGradient ? `url(#vueUiSmiley${n})` : P.value.colors.activeReadonly[n]
|
|
349
|
+
}, null, 8, H)]),
|
|
350
|
+
"path-icon-readonly": j(() => [_("path", { d: e.pathIconReadonly }, null, 8, U)]),
|
|
351
|
+
_: 2
|
|
352
|
+
}, 1032, [
|
|
353
|
+
"config",
|
|
354
|
+
"unit",
|
|
355
|
+
"currentRating",
|
|
356
|
+
"isReadonly",
|
|
357
|
+
"hasBreakdown",
|
|
358
|
+
"hoveredValue",
|
|
359
|
+
"isCursorPointer",
|
|
360
|
+
"onMouseenter",
|
|
361
|
+
"onRate"
|
|
362
|
+
])), 64)),
|
|
363
|
+
N.value.show && N.value.position === "right" ? (C(), g("div", {
|
|
364
|
+
key: 1,
|
|
365
|
+
style: x(`width:fit-content;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold ? "bold" : "normal"};padding-left:${N.value.offsetX}px`)
|
|
366
|
+
}, D($.value({ value: q.value })), 5)) : h("", !0)
|
|
367
|
+
], 4),
|
|
368
|
+
N.value.show && N.value.position === "bottom" ? (C(), g("div", {
|
|
369
|
+
key: 2,
|
|
370
|
+
style: x(`width:100%;text-align:center;margin-top:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold ? "bold" : "normal"};margin-left:${N.value.offsetX}px`)
|
|
371
|
+
}, D($.value({ value: q.value })), 5)) : h("", !0)
|
|
372
|
+
], 36));
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
//#endregion
|
|
376
|
+
export { R as n, W as t };
|