vue-data-ui 3.12.0 → 3.13.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/README.md +41 -0
- package/dist/BaseLegendToggle-B4-hdikk.js +46 -0
- package/dist/{Legend-DN5UJOBH.js → Legend-DUESGUtH.js} +13 -12
- package/dist/{PackageVersion-DwFCG_4i.js → PackageVersion-BUiZH7T6.js} +1 -1
- package/dist/{PenAndPaper-Cs8cXbUN.js → PenAndPaper-D7T0cXZC.js} +98 -94
- package/dist/{Slicer-vNwWYm9Z.js → Slicer-52xjYM7P.js} +77 -76
- package/dist/{SlicerPreview-Cp_DTOrF.js → SlicerPreview-CX3vw034.js} +74 -68
- package/dist/{Title-ByPv-v1s.js → Title-B2qhu8Lw.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-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.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/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +16 -0
- package/dist/{useNestedProp-xXVO6hRJ.js → useNestedProp-DBDAPWcu.js} +51 -33
- package/dist/{vue-data-ui-Dhjv9TRp.js → vue-data-ui-D1E4251H.js} +67 -67
- package/dist/vue-data-ui.js +69 -69
- package/dist/{vue-ui-3d-bar-BLcN_EjD.js → vue-ui-3d-bar-CgVGpnCt.js} +3 -3
- package/dist/{vue-ui-accordion-o8C2BQic.js → vue-ui-accordion-C_mCy0GO.js} +1 -1
- package/dist/{vue-ui-age-pyramid-DUf25Oq0.js → vue-ui-age-pyramid-BhjTT3DC.js} +3 -3
- package/dist/{vue-ui-annotator-C9cFW-2n.js → vue-ui-annotator-CKgbFmUs.js} +2 -2
- package/dist/{vue-ui-bullet-mTlwuwv4.js → vue-ui-bullet-BnWagfaA.js} +4 -4
- package/dist/{vue-ui-bump-jsdnq1wB.js → vue-ui-bump-foFhlwgZ.js} +3 -3
- package/dist/{vue-ui-candlestick-6ZwxovG4.js → vue-ui-candlestick-Dwkufbjr.js} +479 -479
- package/dist/{vue-ui-carousel-table-Bhg7DQzs.js → vue-ui-carousel-table-ChdrJL5m.js} +2 -2
- package/dist/{vue-ui-chestnut-Bdt8bNiE.js → vue-ui-chestnut-Bwksaice.js} +2 -2
- package/dist/{vue-ui-chord-Cqe_PoEK.js → vue-ui-chord-DkZoA24X.js} +4 -4
- package/dist/{vue-ui-circle-pack-jfLNMjCR.js → vue-ui-circle-pack-CJsFhaDz.js} +3 -3
- package/dist/{vue-ui-cursor-BrBnQC-n.js → vue-ui-cursor-mqVe7Y-a.js} +2 -2
- package/dist/{vue-ui-dag-BTxcPP4S.js → vue-ui-dag-WnGENAa3.js} +3 -3
- package/dist/{vue-ui-dashboard-CVhP3O3z.js → vue-ui-dashboard-By8oB-nX.js} +65 -65
- package/dist/{vue-ui-digits-C_VT43rS.js → vue-ui-digits-Bx-satCl.js} +1 -1
- package/dist/{vue-ui-donut-D9dzEdiK.js → vue-ui-donut-D5nqwNxn.js} +621 -605
- package/dist/vue-ui-donut-evolution-CCdXzG-K.js +1257 -0
- package/dist/{vue-ui-dumbbell-TGeh3uXt.js → vue-ui-dumbbell-u4NWq7EA.js} +4 -4
- package/dist/{vue-ui-flow-BH4aX3P3.js → vue-ui-flow-Cli9mh5R.js} +4 -4
- package/dist/{vue-ui-funnel-FssZCfNf.js → vue-ui-funnel-x_oyMv-g.js} +3 -3
- package/dist/{vue-ui-galaxy-BgSt7wlG.js → vue-ui-galaxy-KU8sE9yj.js} +293 -277
- package/dist/{vue-ui-gauge-Cp65pnqa.js → vue-ui-gauge-DOCwekQw.js} +3 -3
- package/dist/{vue-ui-geo-CdYQrQYT.js → vue-ui-geo-BSm_rlXS.js} +3 -3
- package/dist/{vue-ui-gizmo-DSViZTi4.js → vue-ui-gizmo-7srxIV-o.js} +2 -2
- package/dist/{vue-ui-heatmap-BuPLHM2z.js → vue-ui-heatmap-O--_H-gU.js} +316 -316
- package/dist/{vue-ui-history-plot-CLPO1_OJ.js → vue-ui-history-plot-DALdrNCs.js} +465 -449
- package/dist/{vue-ui-horizontal-bar-t588FWIk.js → vue-ui-horizontal-bar-DCdgJsYP.js} +561 -543
- package/dist/{vue-ui-kpi-ukaoY0am.js → vue-ui-kpi-BSrmWF6e.js} +2 -2
- package/dist/{vue-ui-mini-loader-CEfxU4dT.js → vue-ui-mini-loader-CjNAgIP7.js} +1 -1
- package/dist/{vue-ui-molecule-4_74UPUc.js → vue-ui-molecule-BOaaDa_f.js} +2 -2
- package/dist/{vue-ui-mood-radar-B_apmNbr.js → vue-ui-mood-radar-oFwautms.js} +4 -4
- package/dist/{vue-ui-nested-donuts-DkkYw1Wk.js → vue-ui-nested-donuts-DTpIOMky.js} +492 -473
- package/dist/{vue-ui-onion-C4Oyq1XJ.js → vue-ui-onion-BSHdcu3D.js} +275 -259
- package/dist/{vue-ui-parallel-coordinate-plot-BuWnO-HE.js → vue-ui-parallel-coordinate-plot-DCBvtKH5.js} +332 -316
- package/dist/{vue-ui-quadrant-C4TxnJ8H.js → vue-ui-quadrant-CBTQAM5C.js} +610 -594
- package/dist/{vue-ui-quick-chart-BccMdTES.js → vue-ui-quick-chart-D8d9mCp5.js} +759 -741
- package/dist/{vue-ui-radar-Bsz6rmbA.js → vue-ui-radar-fyynw3kX.js} +306 -290
- package/dist/{vue-ui-rating-A8MUSqQc.js → vue-ui-rating-CoeJ4nzT.js} +1 -1
- package/dist/{vue-ui-relation-circle-DUKQt5mL.js → vue-ui-relation-circle-CHLL7fWj.js} +3 -3
- package/dist/{vue-ui-ridgeline-RmOD7WWI.js → vue-ui-ridgeline-BescV_9j.js} +423 -407
- package/dist/{vue-ui-rings-BBR3fIJ1.js → vue-ui-rings-BLzeGlw1.js} +306 -290
- package/dist/{vue-ui-scatter-CKMckzzd.js → vue-ui-scatter-Lkdahppt.js} +500 -484
- package/dist/{vue-ui-skeleton-B0pIyaOR.js → vue-ui-skeleton-DN0ow_rk.js} +2 -2
- package/dist/{vue-ui-smiley-BH40_Lrp.js → vue-ui-smiley-BjeNTXgB.js} +1 -1
- package/dist/{vue-ui-spark-trend-hjNNuP2j.js → vue-ui-spark-trend-ByQy54yB.js} +2 -2
- package/dist/{vue-ui-sparkbar-D0i2wXsl.js → vue-ui-sparkbar-ZdaJfCgv.js} +2 -2
- package/dist/{vue-ui-sparkgauge-Hl3iiKUD.js → vue-ui-sparkgauge-C-XRI2le.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-KW5GtW_9.js → vue-ui-sparkhistogram-C0NBzDcp.js} +2 -2
- package/dist/{vue-ui-sparkline-QD0INjPz.js → vue-ui-sparkline-C7ZDbt2b.js} +223 -223
- package/dist/{vue-ui-sparkstackbar-CavKyUkq.js → vue-ui-sparkstackbar-CKaAwbIG.js} +181 -167
- package/dist/{vue-ui-stackbar-b_rqGnFu.js → vue-ui-stackbar-ByubXFXF.js} +575 -554
- package/dist/{vue-ui-stackline-BfSJT6-0.js → vue-ui-stackline-CMlqSvYs.js} +792 -771
- package/dist/{vue-ui-strip-plot-BQap9AU8.js → vue-ui-strip-plot-WAZfJJd5.js} +3 -3
- package/dist/{vue-ui-table-BMYutYII.js → vue-ui-table-CfXnjcKM.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BF2_yEn9.js → vue-ui-table-heatmap-DBpu7fd2.js} +1 -1
- package/dist/{vue-ui-table-sparkline-DsKXADpd.js → vue-ui-table-sparkline-BrJnSxMg.js} +6 -6
- package/dist/{vue-ui-thermometer-BopbobFk.js → vue-ui-thermometer-1AQdrnVB.js} +3 -3
- package/dist/{vue-ui-timer-DRN43IzI.js → vue-ui-timer-B8nLTytW.js} +3 -3
- package/dist/{vue-ui-tiremarks-D62iARRA.js → vue-ui-tiremarks-Ba584V8X.js} +3 -3
- package/dist/vue-ui-treemap-hqPz1RVy.js +1617 -0
- package/dist/vue-ui-waffle-Bi8zpeBL.js +1171 -0
- package/dist/{vue-ui-wheel-Dxv8OaNe.js → vue-ui-wheel-B7x9Ykpj.js} +3 -3
- package/dist/{vue-ui-word-cloud-BgOR6C-H.js → vue-ui-word-cloud-KobAg3dS.js} +3 -3
- package/dist/{vue-ui-world-GbQu1IhG.js → vue-ui-world-De0_sYDb.js} +311 -295
- package/dist/{vue-ui-xy-CS4iFgKN.js → vue-ui-xy-c_ghrhFh.js} +1274 -1259
- package/dist/{vue-ui-xy-canvas-P4SVXYJ2.js → vue-ui-xy-canvas-CdDD57ea.js} +430 -406
- package/package.json +1 -1
- package/dist/vue-ui-donut-evolution-DuJuvXit.js +0 -1241
- package/dist/vue-ui-treemap-CWsF6ba4.js +0 -1600
- package/dist/vue-ui-waffle-CflkAizD.js +0 -1103
package/README.md
CHANGED
|
@@ -271,6 +271,47 @@ It is recommended to set the show legend config attribute to false, to hide the
|
|
|
271
271
|
</VueUiDonut>
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
+
## Legend toggle
|
|
275
|
+
|
|
276
|
+
An opt-in config option displays a toggle button to hide/show all series, when the number of series > 2.
|
|
277
|
+
This attribute can be found in the `legend.selectAllToggle` config section:
|
|
278
|
+
|
|
279
|
+
```js
|
|
280
|
+
legend: {
|
|
281
|
+
selectAllToggle: {
|
|
282
|
+
show: false,
|
|
283
|
+
backgroundColor: '#E1E5E8',
|
|
284
|
+
color: '#2D353C'
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
This legend toggle option is available for the following components:
|
|
290
|
+
|
|
291
|
+
- VueUiDonut
|
|
292
|
+
- VueUiDonutEvolution
|
|
293
|
+
- VueUiGalaxy
|
|
294
|
+
- VueUiHistoryPlot
|
|
295
|
+
- VueUiHorizontalBar
|
|
296
|
+
- VueUiNestedDonuts
|
|
297
|
+
- VueUiOnion
|
|
298
|
+
- VueUiParallelCoordinatePlot
|
|
299
|
+
- VueUiQuadrant
|
|
300
|
+
- VueUiQuickChart
|
|
301
|
+
- VueUiRadar
|
|
302
|
+
- VueUiRidgeline
|
|
303
|
+
- VueUiRings
|
|
304
|
+
- VueUiRings
|
|
305
|
+
- VueUiScatter
|
|
306
|
+
- VueUiSparkStackbar
|
|
307
|
+
- VueUiStackbar
|
|
308
|
+
- VueUiStackline
|
|
309
|
+
- VueUiTreemap
|
|
310
|
+
- VueUiWaffle
|
|
311
|
+
- VueUiWorld
|
|
312
|
+
- VueUiXy
|
|
313
|
+
- VueUiXyCanvas
|
|
314
|
+
|
|
274
315
|
## Tooltip #tooltip-before & #tooltip-after slots
|
|
275
316
|
|
|
276
317
|
Customize tooltip contents with #tooltip-before and #tooltip-after slots, to include an image, another chart or any other rich content into your tooltips.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createElementBlock as l, openBlock as r, createElementVNode as a, normalizeStyle as d, withKeys as s, createVNode as g } from "vue";
|
|
2
|
+
import c from "./BaseIcon-BwSqZoOr.js";
|
|
3
|
+
import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const u = {
|
|
5
|
+
class: "vue-ui-legend-toggle-wrapper",
|
|
6
|
+
"data-dom-to-png-ignore": ""
|
|
7
|
+
}, f = {
|
|
8
|
+
__name: "BaseLegendToggle",
|
|
9
|
+
props: {
|
|
10
|
+
backgroundColor: { type: String, default: "#CCCCCC" },
|
|
11
|
+
color: { type: String, default: "#2D353C" },
|
|
12
|
+
fontSize: { type: Number, default: 14 },
|
|
13
|
+
checked: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
emits: ["toggle"],
|
|
16
|
+
setup(e, { emit: n }) {
|
|
17
|
+
const o = n;
|
|
18
|
+
return (k, t) => (r(), l("div", u, [
|
|
19
|
+
a("div", {
|
|
20
|
+
class: "vue-ui-legend-toggle",
|
|
21
|
+
role: "button",
|
|
22
|
+
tabindex: "0",
|
|
23
|
+
onClick: t[0] || (t[0] = (i) => o("toggle")),
|
|
24
|
+
onKeydown: t[1] || (t[1] = s((i) => o("toggle"), ["enter"])),
|
|
25
|
+
style: d({
|
|
26
|
+
position: "relative",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
backgroundColor: e.backgroundColor,
|
|
31
|
+
padding: e.fontSize / 4 + "px"
|
|
32
|
+
})
|
|
33
|
+
}, [
|
|
34
|
+
g(c, {
|
|
35
|
+
name: e.checked ? "minus" : "check",
|
|
36
|
+
stroke: e.color,
|
|
37
|
+
size: e.fontSize * 0.6,
|
|
38
|
+
"stroke-width": e.fontSize / 4
|
|
39
|
+
}, null, 8, ["name", "stroke", "size", "stroke-width"])
|
|
40
|
+
], 36)
|
|
41
|
+
]));
|
|
42
|
+
}
|
|
43
|
+
}, v = /* @__PURE__ */ m(f, [["__scopeId", "data-v-f7a735b9"]]);
|
|
44
|
+
export {
|
|
45
|
+
v as B
|
|
46
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createElementBlock as n, openBlock as a, normalizeStyle as d, renderSlot as r, Fragment as
|
|
1
|
+
import { createElementBlock as n, openBlock as a, normalizeStyle as d, renderSlot as r, Fragment as f, renderList as m, normalizeClass as g, createCommentVNode as p, createVNode as h, mergeProps as k, unref as v } from "vue";
|
|
2
2
|
import { E as y } from "./lib-CVHM9FhP.js";
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
3
|
+
import { _ as b } from "./Shape-PzdCMGsP.js";
|
|
4
|
+
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const S = ["id"], $ = ["onClick", "viewBox"], B = {
|
|
6
6
|
__name: "Legend",
|
|
7
7
|
props: {
|
|
@@ -27,10 +27,10 @@ const S = ["id"], $ = ["onClick", "viewBox"], B = {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
emits: ["clickMarker"],
|
|
30
|
-
setup(t, { emit:
|
|
31
|
-
const
|
|
32
|
-
function
|
|
33
|
-
|
|
30
|
+
setup(t, { emit: s }) {
|
|
31
|
+
const c = s;
|
|
32
|
+
function u(o, l) {
|
|
33
|
+
c("clickMarker", { legend: o, i: l });
|
|
34
34
|
}
|
|
35
35
|
return (o, l) => (a(), n("div", {
|
|
36
36
|
id: t.id,
|
|
@@ -45,19 +45,20 @@ const S = ["id"], $ = ["onClick", "viewBox"], B = {
|
|
|
45
45
|
})
|
|
46
46
|
}, [
|
|
47
47
|
r(o.$slots, "legendTitle", { titleSet: t.legendSet }, void 0, !0),
|
|
48
|
-
(
|
|
48
|
+
r(o.$slots, "legendToggle", {}, void 0, !0),
|
|
49
|
+
(a(!0), n(f, null, m(t.legendSet, (e, i) => (a(), n("div", {
|
|
49
50
|
key: `legend_${i}`,
|
|
50
51
|
class: g({ "vue-data-ui-legend-item": !0, active: t.clickable })
|
|
51
52
|
}, [
|
|
52
53
|
e.shape ? (a(), n("svg", {
|
|
53
54
|
key: 0,
|
|
54
|
-
onClick: (C) =>
|
|
55
|
+
onClick: (C) => u(e, i),
|
|
55
56
|
height: "1em",
|
|
56
57
|
width: "1em",
|
|
57
58
|
viewBox: e.shape && e.shape === "star" ? "-10 -10 80 80" : "0 0 60 60",
|
|
58
59
|
style: d(`overflow: visible; opacity:${e.opacity}`)
|
|
59
60
|
}, [
|
|
60
|
-
h(
|
|
61
|
+
h(b, {
|
|
61
62
|
stroke: "none",
|
|
62
63
|
shape: e.shape,
|
|
63
64
|
radius: 30,
|
|
@@ -79,7 +80,7 @@ const S = ["id"], $ = ["onClick", "viewBox"], B = {
|
|
|
79
80
|
], 2))), 128))
|
|
80
81
|
], 12, S));
|
|
81
82
|
}
|
|
82
|
-
},
|
|
83
|
+
}, I = /* @__PURE__ */ x(B, [["__scopeId", "data-v-b4d6e4f6"]]);
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
I as default
|
|
85
86
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as e, openBlock as t, toDisplayString as o, unref as r } from "vue";
|
|
2
|
-
const n = "3.
|
|
2
|
+
const n = "3.13.0", a = { "aria-hidden": "true" }, p = {
|
|
3
3
|
__name: "PackageVersion",
|
|
4
4
|
setup(s) {
|
|
5
5
|
return (c, i) => (t(), e("desc", a, "Composed with Vue Data UI " + o(r(n)), 1));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as i, computed as he, watch as te, nextTick as Ae, onMounted as
|
|
1
|
+
import { ref as i, computed as he, watch as te, nextTick as Ae, onMounted as Pe, onBeforeUnmount as Fe, createElementBlock as se, createCommentVNode as Ie, openBlock as re, normalizeStyle as k, createElementVNode as B, withDirectives as be, renderSlot as T, createVNode as P, withCtx as Qe, normalizeProps as U, guardReactiveProps as K, normalizeClass as ne, toDisplayString as Ve, unref as Ue, vModelText as we } from "vue";
|
|
2
2
|
import X from "./BaseIcon-BwSqZoOr.js";
|
|
3
|
-
import { C as
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
3
|
+
import { C as Ke } from "./ColorPicker-CeEDMD2O.js";
|
|
4
|
+
import { c as ye, q as Xe, d as Ye, X as Y } from "./lib-CVHM9FhP.js";
|
|
5
|
+
const qe = {
|
|
6
6
|
class: "vue-ui-pen-and-paper-action",
|
|
7
7
|
style: { padding: "0 !important" }
|
|
8
|
-
},
|
|
8
|
+
}, Ge = ["disabled"], je = {
|
|
9
9
|
__name: "PenAndPaper",
|
|
10
10
|
props: {
|
|
11
11
|
svgRef: {
|
|
@@ -30,28 +30,28 @@ const Ye = {
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
emits: ["close"],
|
|
33
|
-
setup(
|
|
34
|
-
const l =
|
|
33
|
+
setup(g, { emit: xe }) {
|
|
34
|
+
const l = g, ke = xe, w = i([]), x = i([]), E = i(l.color), N = i(2), C = i(!1), q = i(""), s = i(null), y = i(null), d = i(null), F = i(null);
|
|
35
35
|
i(null);
|
|
36
|
-
const ae = i(`arrow-${
|
|
36
|
+
const ae = i(`arrow-${ye()}`), ue = i(`arrow-def-${ye()}`), G = i(!1), p = i(null), le = i({ x: 0, y: 0 }), I = i([""]), Q = i({ row: 0, col: 0 }), D = i(16), V = i(!1), ie = ["arrow", "text", "line", "draw"], z = i(0), f = he(() => ie[z.value]), Ce = {
|
|
37
37
|
arrow: "plotArrow",
|
|
38
38
|
text: "text",
|
|
39
39
|
line: "plotLine",
|
|
40
40
|
draw: "annotator"
|
|
41
|
-
},
|
|
42
|
-
function
|
|
41
|
+
}, Le = i("url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAABg2lDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSIVh2YQcchQnSyIijhKFYtgobQVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6OSk6CIl/i8ptIjx4Lgf7+497t4BQrPKNKtnAtB020wn4lIuvyqFXhGGiAhCiMnMMpKZxSx8x9c9Any9i/Es/3N/jgG1YDEgIBHPMcO0iTeIZzZtg/M+scjKskp8Tjxu0gWJH7muePzGueSywDNFM5ueJxaJpVIXK13MyqZGPE0cVTWd8oWcxyrnLc5atc7a9+QvDBf0lQzXaY4ggSUkkYIEBXVUUIWNGK06KRbStB/38Q+7/hS5FHJVwMixgBo0yK4f/A9+d2sVpya9pHAc6H1xnI9RILQLtBqO833sOK0TIPgMXOkdf60JzH6S3uho0SNgcBu4uO5oyh5wuQMMPRmyKbtSkKZQLALvZ/RNeSByC/Sveb2193H6AGSpq+Ub4OAQGCtR9rrPu/u6e/v3TLu/H5C7crM1WjgWAAAABmJLR0QAqwB5AHWF+8OUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5gwUExIUagzGcQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAABfSURBVBjTldAxDoNQDIPhL0+q1L33P1AvAhN7xfK6WAgoLfSfrNiykpQtE+7RLzx2vgF9D3o8lWDmn1QVVMP0LZQGmNtqp1/cmou0XHdG/+sYeGZwFBqPCub8rkcvvAGvsi1VYarR8wAAAABJRU5ErkJggg==') 5 5, auto");
|
|
42
|
+
function Ee() {
|
|
43
43
|
z.value + 1 >= ie.length ? z.value = 0 : z.value += 1;
|
|
44
44
|
}
|
|
45
45
|
function H(t) {
|
|
46
|
-
if (!s.value ||
|
|
46
|
+
if (!s.value || f.value !== "text" || G.value) return;
|
|
47
47
|
const { x: e, y: a } = S(t);
|
|
48
48
|
le.value = { x: e, y: a }, I.value = [""], Q.value = { row: 0, col: 0 }, V.value = !1;
|
|
49
49
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
50
50
|
n.setAttribute("x", e), n.setAttribute("y", a), n.setAttribute("fill", E.value), n.setAttribute("font-size", D.value * l.scale), n.setAttribute("font-family", "sans-serif"), n.setAttribute("class", "vue-data-ui-doodle"), n.setAttribute("dominant-baseline", "hanging"), n.setAttribute("pointer-events", "all");
|
|
51
51
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
52
|
-
o.setAttribute("x", e), o.setAttribute("dy", "0"), o.textContent = "", n.appendChild(o), n.style.pointerEvents = "none", n.style.userSelect = "none", s.value.appendChild(n), p.value = n, G.value = !0, window.addEventListener("keydown",
|
|
52
|
+
o.setAttribute("x", e), o.setAttribute("dy", "0"), o.textContent = "", n.appendChild(o), n.style.pointerEvents = "none", n.style.userSelect = "none", s.value.appendChild(n), p.value = n, G.value = !0, window.addEventListener("keydown", ve), window.addEventListener("mousedown", fe, !0), ce(), de();
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ve(t) {
|
|
55
55
|
if (!G.value) return;
|
|
56
56
|
let { row: e, col: a } = Q.value, n = I.value.slice(), o = !1;
|
|
57
57
|
if (t.key === "Enter") {
|
|
@@ -81,9 +81,9 @@ const Ye = {
|
|
|
81
81
|
oe(!0);
|
|
82
82
|
return;
|
|
83
83
|
} else t.key === "Tab" && t.preventDefault();
|
|
84
|
-
o && (I.value = n, Q.value = { row: e, col: a }, n.some((u) => u.length > 0) && !V.value && p.value && (w.value.push(p.value),
|
|
84
|
+
o && (I.value = n, Q.value = { row: e, col: a }, n.some((u) => u.length > 0) && !V.value && p.value && (w.value.push(p.value), x.value = [], V.value = !0), ce(), de());
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ce() {
|
|
87
87
|
const t = p.value, { x: e } = le.value;
|
|
88
88
|
for (; t.firstChild; ) t.removeChild(t.firstChild);
|
|
89
89
|
I.value.forEach((a, n) => {
|
|
@@ -95,7 +95,7 @@ const Ye = {
|
|
|
95
95
|
function O() {
|
|
96
96
|
W.value !== null && (clearInterval(W.value), W.value = null);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Re(t) {
|
|
99
99
|
O();
|
|
100
100
|
let e = !0;
|
|
101
101
|
t.style.opacity = "1", W.value = setInterval(() => {
|
|
@@ -106,7 +106,7 @@ const Ye = {
|
|
|
106
106
|
e = !e, t.style.opacity = e ? "1" : "0";
|
|
107
107
|
}, 500);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function de() {
|
|
110
110
|
const t = s.value?.querySelector(".vue-data-ui-svg-caret");
|
|
111
111
|
t && s.value && s.value.removeChild(t);
|
|
112
112
|
const e = p.value;
|
|
@@ -120,16 +120,16 @@ const Ye = {
|
|
|
120
120
|
const A = c.getBBox();
|
|
121
121
|
s.value.removeChild(c);
|
|
122
122
|
const b = n + o * u * 1.2, $ = a + A.width, h = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
123
|
-
h.setAttribute("x", $), h.setAttribute("y", b), h.setAttribute("rx", 1), h.setAttribute("width", 2), h.setAttribute("height", u), h.setAttribute("fill", E.value), h.setAttribute("class", "vue-data-ui-svg-caret"), s.value.appendChild(h),
|
|
123
|
+
h.setAttribute("x", $), h.setAttribute("y", b), h.setAttribute("rx", 1), h.setAttribute("width", 2), h.setAttribute("height", u), h.setAttribute("fill", E.value), h.setAttribute("class", "vue-data-ui-svg-caret"), s.value.appendChild(h), Re(h);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function fe(t) {
|
|
126
126
|
if (p.value && !p.value.contains(t.target)) {
|
|
127
127
|
const e = p.value.children;
|
|
128
128
|
e.length === 1 && (e[0].textContent === "" || e[0].textContent === "") && p.value.remove(), oe(!1);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
function oe(t = !1) {
|
|
132
|
-
window.removeEventListener("keydown",
|
|
132
|
+
window.removeEventListener("keydown", ve), window.removeEventListener("mousedown", fe, !0), O();
|
|
133
133
|
const e = s.value?.querySelector(".vue-data-ui-svg-caret");
|
|
134
134
|
e && s.value && s.value.removeChild(e);
|
|
135
135
|
const a = p.value?.children;
|
|
@@ -140,8 +140,8 @@ const Ye = {
|
|
|
140
140
|
}
|
|
141
141
|
(t || n) && p.value && s.value && s.value.contains(p.value) && s.value.removeChild(p.value), G.value = !1, p.value = null, I.value = [""], Q.value = { row: 0, col: 0 }, V.value = !1;
|
|
142
142
|
}
|
|
143
|
-
const R = he(() =>
|
|
144
|
-
function
|
|
143
|
+
const R = he(() => Xe(l.color, 0.6));
|
|
144
|
+
function ge() {
|
|
145
145
|
if (!s.value) return;
|
|
146
146
|
const t = s.value.querySelector(".vue-data-ui-mask");
|
|
147
147
|
if (t && s.value.removeChild(t), l.active) {
|
|
@@ -157,14 +157,14 @@ const Ye = {
|
|
|
157
157
|
const v = e.getScreenCTM()?.inverse();
|
|
158
158
|
return v ? a.matrixTransform(v) : { x: 0, y: 0 };
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Se(t) {
|
|
161
161
|
const e = t.trim().split(/\s+/);
|
|
162
162
|
if (e.length < 4)
|
|
163
163
|
return t;
|
|
164
164
|
const a = e.slice(1).map(Number);
|
|
165
165
|
if (a.length % 2 !== 0)
|
|
166
166
|
return t;
|
|
167
|
-
const n =
|
|
167
|
+
const n = $e(a), o = [`M ${n[0]} ${n[1]}`];
|
|
168
168
|
for (let v = 2; v < n.length - 2; v += 2) {
|
|
169
169
|
const m = n[v - 2], c = n[v - 1], A = n[v], b = n[v + 1], $ = (m + A) / 2, h = (c + b) / 2;
|
|
170
170
|
o.push(`Q ${m} ${c} ${$} ${h}`);
|
|
@@ -172,7 +172,7 @@ const Ye = {
|
|
|
172
172
|
const r = n[n.length - 2], u = n[n.length - 1];
|
|
173
173
|
return o.push(`L ${r} ${u}`), o.join(" ");
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function $e(t, e = 1) {
|
|
176
176
|
const a = [...t];
|
|
177
177
|
for (let n = 2; n < t.length - 2; n += 2) {
|
|
178
178
|
const o = t[n], r = t[n + 1], u = t[n - 2], v = t[n - 1], m = t[n + 2], c = t[n + 3];
|
|
@@ -180,7 +180,7 @@ const Ye = {
|
|
|
180
180
|
}
|
|
181
181
|
return a;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Be(t) {
|
|
184
184
|
const e = t.trim().split(/\s+/);
|
|
185
185
|
let a = "", n = "", o = null, r = null;
|
|
186
186
|
for (let u = 0; u < e.length; u += 1) {
|
|
@@ -206,17 +206,17 @@ const Ye = {
|
|
|
206
206
|
return a;
|
|
207
207
|
}
|
|
208
208
|
function j(t) {
|
|
209
|
-
if (t.cancelable && t.preventDefault(),
|
|
209
|
+
if (t.cancelable && t.preventDefault(), f.value !== "draw" || !l.active || !s.value) return;
|
|
210
210
|
C.value = !0;
|
|
211
211
|
const { x: e, y: a } = S(t);
|
|
212
|
-
F.value = { x: e, y: a }, q.value = `M ${e} ${a}`,
|
|
212
|
+
F.value = { x: e, y: a }, q.value = `M ${e} ${a}`, y.value = document.createElementNS(Y, "path"), y.value.setAttribute("stroke", E.value), y.value.setAttribute("stroke-width", N.value * l.scale), y.value.setAttribute("fill", "none"), y.value.setAttribute("stroke-linecap", "round"), y.value.setAttribute("stroke-linejoin", "round"), y.value.setAttribute("class", "vue-data-ui-doodle"), s.value.appendChild(y.value);
|
|
213
213
|
}
|
|
214
214
|
function J(t) {
|
|
215
|
-
if (t.cancelable && t.preventDefault(), !C.value || !s.value || !
|
|
215
|
+
if (t.cancelable && t.preventDefault(), !C.value || !s.value || !y.value) return;
|
|
216
216
|
const { x: e, y: a } = S(t);
|
|
217
|
-
q.value += ` ${e} ${a}`,
|
|
217
|
+
q.value += ` ${e} ${a}`, y.value.setAttribute("d", q.value);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function Ne() {
|
|
220
220
|
const t = l.svgRef;
|
|
221
221
|
if (!t) return;
|
|
222
222
|
let e = t.querySelector(`defs#${ue.value}`);
|
|
@@ -227,66 +227,66 @@ const Ye = {
|
|
|
227
227
|
o.setAttribute("d", `M 0 0 L ${a} ${a / 2} L 0 ${a} z`), o.setAttribute("fill", "context-stroke"), o.setAttribute("stroke", "none"), n.appendChild(o), e.appendChild(n);
|
|
228
228
|
}
|
|
229
229
|
function Z(t) {
|
|
230
|
-
if (t.cancelable && t.preventDefault(), !["line", "arrow"].includes(
|
|
231
|
-
|
|
230
|
+
if (t.cancelable && t.preventDefault(), !["line", "arrow"].includes(f.value) || !l.active || !s.value) return;
|
|
231
|
+
f.value === "arrow" && Ne(), C.value = !0;
|
|
232
232
|
const { x: e, y: a } = S(t);
|
|
233
|
-
F.value = { x: e, y: a }, d.value = document.createElementNS(Y, "line"), d.value.setAttribute("stroke", E.value), d.value.setAttribute("stroke-width", N.value * l.scale), d.value.setAttribute("stroke-linecap", "round"), d.value.setAttribute("class", "vue-data-ui-doodle"), d.value.setAttribute("x1", e), d.value.setAttribute("y1", a), d.value.setAttribute("x2", e), d.value.setAttribute("y2", a),
|
|
233
|
+
F.value = { x: e, y: a }, d.value = document.createElementNS(Y, "line"), d.value.setAttribute("stroke", E.value), d.value.setAttribute("stroke-width", N.value * l.scale), d.value.setAttribute("stroke-linecap", "round"), d.value.setAttribute("class", "vue-data-ui-doodle"), d.value.setAttribute("x1", e), d.value.setAttribute("y1", a), d.value.setAttribute("x2", e), d.value.setAttribute("y2", a), f.value === "arrow" && d.value.setAttribute("marker-end", `url(#${ae.value})`), s.value.appendChild(d.value);
|
|
234
234
|
}
|
|
235
235
|
function _(t) {
|
|
236
|
-
if (t.cancelable && t.preventDefault(), !["line", "arrow"].includes(
|
|
236
|
+
if (t.cancelable && t.preventDefault(), !["line", "arrow"].includes(f.value) || !C.value || !s.value || !d.value) return;
|
|
237
237
|
const { x: e, y: a } = S(t);
|
|
238
238
|
d.value.setAttribute("x2", e), d.value.setAttribute("y2", a);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function M(t) {
|
|
241
241
|
if (C.value && s.value && d.value) {
|
|
242
242
|
const { x: e, y: a } = S(t);
|
|
243
|
-
d.value.setAttribute("x2", e), d.value.setAttribute("y2", a), w.value.push(d.value),
|
|
243
|
+
d.value.setAttribute("x2", e), d.value.setAttribute("y2", a), w.value.push(d.value), x.value = [], d.value = "";
|
|
244
244
|
}
|
|
245
245
|
C.value = !1;
|
|
246
246
|
}
|
|
247
247
|
function L(t) {
|
|
248
|
-
if (C.value && s.value &&
|
|
248
|
+
if (C.value && s.value && y.value) {
|
|
249
249
|
const { x: e, y: a } = S(t);
|
|
250
250
|
if (F.value && F.value.x === e && F.value.y === a) {
|
|
251
251
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
252
252
|
n.setAttribute("cx", e), n.setAttribute("cy", a), n.setAttribute("r", N.value * l.scale / 2), n.setAttribute("fill", E.value), n.setAttribute("class", "vue-data-ui-doodle"), s.value.appendChild(n), w.value.push(n);
|
|
253
253
|
} else {
|
|
254
|
-
const n =
|
|
255
|
-
n.setAttribute("d",
|
|
254
|
+
const n = y.value;
|
|
255
|
+
n.setAttribute("d", Be(Se(q.value))), w.value.push(n);
|
|
256
256
|
}
|
|
257
|
-
|
|
257
|
+
x.value = [], y.value = "";
|
|
258
258
|
}
|
|
259
259
|
C.value = !1;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function De() {
|
|
262
262
|
if (w.value.length > 0) {
|
|
263
263
|
const t = w.value.pop();
|
|
264
|
-
|
|
264
|
+
x.value.push(t), t === p.value ? oe(!0) : s.value && s.value.contains(t) && s.value.removeChild(t);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
if (
|
|
269
|
-
const t =
|
|
267
|
+
function Me() {
|
|
268
|
+
if (x.value.length > 0) {
|
|
269
|
+
const t = x.value.pop();
|
|
270
270
|
w.value.push(t), s.value && s.value.appendChild(t);
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
function Te() {
|
|
274
|
-
s.value && (s.value.innerHTML = ""), w.value = [],
|
|
274
|
+
s.value && (s.value.innerHTML = ""), w.value = [], x.value = [], V.value = !1, ge();
|
|
275
275
|
}
|
|
276
|
-
te(
|
|
277
|
-
l.active && (ee(),
|
|
276
|
+
te(f, (t) => {
|
|
277
|
+
l.active && (ee(), pe(), me());
|
|
278
278
|
});
|
|
279
|
-
function
|
|
280
|
-
!l.svgRef || !l.active || (
|
|
279
|
+
function pe() {
|
|
280
|
+
!l.svgRef || !l.active || (f.value === "draw" ? (l.svgRef.addEventListener("mousedown", j), l.svgRef.addEventListener("mousemove", J), l.svgRef.addEventListener("mouseup", L), l.svgRef.addEventListener("mouseleave", L), l.svgRef.addEventListener("touchstart", j, { passive: !1 }), l.svgRef.addEventListener("touchmove", J, { passive: !1 }), l.svgRef.addEventListener("touchend", L), l.svgRef.addEventListener("touchcancel", L)) : ["line", "arrow"].includes(f.value) ? (l.svgRef.addEventListener("mousedown", Z), l.svgRef.addEventListener("mousemove", _), l.svgRef.addEventListener("mouseup", M), l.svgRef.addEventListener("touchstart", Z, { passive: !1 }), l.svgRef.addEventListener("touchmove", _, { passive: !1 }), l.svgRef.addEventListener("touchend", M), l.svgRef.addEventListener("touchcancel", M)) : f.value === "text" && (l.svgRef.addEventListener("mousedown", H), l.svgRef.addEventListener("touchstart", H, { passive: !1 })), s.value && (s.value.style.pointerEvents = "auto"));
|
|
281
281
|
}
|
|
282
282
|
function ee() {
|
|
283
|
-
l.svgRef && (l.svgRef.removeEventListener("mousedown", j), l.svgRef.removeEventListener("mousemove", J), l.svgRef.removeEventListener("mouseup", L), l.svgRef.removeEventListener("mouseleave", L), l.svgRef.removeEventListener("touchstart", j), l.svgRef.removeEventListener("touchmove", J), l.svgRef.removeEventListener("touchend", L), l.svgRef.removeEventListener("touchcancel", L), l.svgRef.removeEventListener("mousedown", Z), l.svgRef.removeEventListener("mousemove", _), l.svgRef.removeEventListener("mouseup",
|
|
283
|
+
l.svgRef && (l.svgRef.removeEventListener("mousedown", j), l.svgRef.removeEventListener("mousemove", J), l.svgRef.removeEventListener("mouseup", L), l.svgRef.removeEventListener("mouseleave", L), l.svgRef.removeEventListener("touchstart", j), l.svgRef.removeEventListener("touchmove", J), l.svgRef.removeEventListener("touchend", L), l.svgRef.removeEventListener("touchcancel", L), l.svgRef.removeEventListener("mousedown", Z), l.svgRef.removeEventListener("mousemove", _), l.svgRef.removeEventListener("mouseup", M), l.svgRef.removeEventListener("touchstart", Z), l.svgRef.removeEventListener("touchmove", _), l.svgRef.removeEventListener("touchend", M), l.svgRef.removeEventListener("touchcancel", M), l.svgRef.removeEventListener("mousedown", H), l.svgRef.removeEventListener("touchstart", H), s.value && (s.value.style.pointerEvents = "none"));
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
t ?
|
|
285
|
+
te(() => l.active, (t) => {
|
|
286
|
+
t ? pe() : ee();
|
|
287
287
|
}), te(() => l.active, () => {
|
|
288
288
|
Ae(() => {
|
|
289
|
-
|
|
289
|
+
ge();
|
|
290
290
|
});
|
|
291
291
|
}), te(
|
|
292
292
|
() => l.active,
|
|
@@ -294,58 +294,62 @@ const Ye = {
|
|
|
294
294
|
l.svgRef && (t ? l.svgRef.style.touchAction = "none" : l.svgRef.style.touchAction = "");
|
|
295
295
|
},
|
|
296
296
|
{ immediate: !0 }
|
|
297
|
-
)
|
|
297
|
+
);
|
|
298
|
+
function me() {
|
|
299
|
+
s.value && (f.value === "text" ? s.value.style.cursor = "text" : ["line", "arrow"].includes(f.value) ? s.value.style.cursor = "crosshair" : s.value.style.cursor = Le.value);
|
|
300
|
+
}
|
|
301
|
+
return Pe(() => {
|
|
298
302
|
Ae(() => {
|
|
299
|
-
l.svgRef && (s.value = document.createElementNS("http://www.w3.org/2000/svg", "g"), s.value.setAttribute("class", "vue-data-ui-doodles"),
|
|
303
|
+
l.svgRef && (s.value = document.createElementNS("http://www.w3.org/2000/svg", "g"), s.value.setAttribute("class", "vue-data-ui-doodles"), l.svgRef.appendChild(s.value), me(), ee());
|
|
300
304
|
});
|
|
301
|
-
}),
|
|
305
|
+
}), Fe(() => {
|
|
302
306
|
O(), s.value && l.svgRef && (s.value.remove(), ee());
|
|
303
|
-
}), (t, e) =>
|
|
307
|
+
}), (t, e) => g.active ? (re(), se("div", {
|
|
304
308
|
key: 0,
|
|
305
309
|
"data-dom-to-png-ignore": "",
|
|
306
310
|
class: "vue-ui-pen-and-paper-actions",
|
|
307
|
-
style: k({ backgroundColor:
|
|
311
|
+
style: k({ backgroundColor: g.backgroundColor })
|
|
308
312
|
}, [
|
|
309
313
|
B("button", {
|
|
310
314
|
class: "vue-ui-pen-and-paper-action",
|
|
311
315
|
onClick: e[0] || (e[0] = (a) => ke("close")),
|
|
312
316
|
style: k({
|
|
313
|
-
backgroundColor:
|
|
317
|
+
backgroundColor: g.backgroundColor,
|
|
314
318
|
border: `1px solid ${R.value}`
|
|
315
319
|
})
|
|
316
320
|
}, [
|
|
317
|
-
|
|
321
|
+
T(t.$slots, "annotator-action-close", {}, () => [
|
|
318
322
|
P(X, {
|
|
319
323
|
name: "close",
|
|
320
|
-
stroke:
|
|
324
|
+
stroke: g.color
|
|
321
325
|
}, null, 8, ["stroke"])
|
|
322
326
|
])
|
|
323
327
|
], 4),
|
|
324
|
-
B("button",
|
|
325
|
-
P(
|
|
328
|
+
B("button", qe, [
|
|
329
|
+
P(Ke, {
|
|
326
330
|
value: E.value,
|
|
327
331
|
"onUpdate:value": e[1] || (e[1] = (a) => E.value = a),
|
|
328
|
-
backgroundColor:
|
|
332
|
+
backgroundColor: g.backgroundColor,
|
|
329
333
|
buttonBorderColor: R.value
|
|
330
334
|
}, {
|
|
331
|
-
"annotator-action-color":
|
|
332
|
-
|
|
335
|
+
"annotator-action-color": Qe(({ color: a }) => [
|
|
336
|
+
T(t.$slots, "annotator-action-color", U(K({ color: a })))
|
|
333
337
|
]),
|
|
334
338
|
_: 3
|
|
335
339
|
}, 8, ["value", "backgroundColor", "buttonBorderColor"])
|
|
336
340
|
]),
|
|
337
341
|
B("button", {
|
|
338
|
-
class: ne(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-active":
|
|
339
|
-
onClick: e[2] || (e[2] = (a) =>
|
|
342
|
+
class: ne(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-active": f.value === "text" }]),
|
|
343
|
+
onClick: e[2] || (e[2] = (a) => Ee()),
|
|
340
344
|
style: k({
|
|
341
|
-
backgroundColor:
|
|
345
|
+
backgroundColor: g.backgroundColor,
|
|
342
346
|
border: `1px solid ${R.value}`
|
|
343
347
|
})
|
|
344
348
|
}, [
|
|
345
|
-
|
|
349
|
+
T(t.$slots, "annotator-action-draw", U(K({ mode: f.value })), () => [
|
|
346
350
|
P(X, {
|
|
347
|
-
name: Ce[
|
|
348
|
-
stroke:
|
|
351
|
+
name: Ce[f.value],
|
|
352
|
+
stroke: g.color
|
|
349
353
|
}, null, 8, ["name", "stroke"])
|
|
350
354
|
]),
|
|
351
355
|
B("div", {
|
|
@@ -358,8 +362,8 @@ const Ye = {
|
|
|
358
362
|
fontSize: "12px",
|
|
359
363
|
fontVariantNumeric: "tabular-nums"
|
|
360
364
|
})
|
|
361
|
-
},
|
|
362
|
-
v:
|
|
365
|
+
}, Ve(Ue(Ye)({
|
|
366
|
+
v: f.value === "text" ? D.value : N.value,
|
|
363
367
|
s: "px",
|
|
364
368
|
r: 1
|
|
365
369
|
})), 5)
|
|
@@ -367,32 +371,32 @@ const Ye = {
|
|
|
367
371
|
B("button", {
|
|
368
372
|
class: ne(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !w.value.length }]),
|
|
369
373
|
disabled: !w.value.length,
|
|
370
|
-
onClick:
|
|
374
|
+
onClick: De,
|
|
371
375
|
style: k({
|
|
372
|
-
backgroundColor:
|
|
376
|
+
backgroundColor: g.backgroundColor,
|
|
373
377
|
border: `1px solid ${R.value}`,
|
|
374
378
|
marginTop: "20px"
|
|
375
379
|
})
|
|
376
380
|
}, [
|
|
377
|
-
|
|
381
|
+
T(t.$slots, "annotator-action-undo", U(K({ disabled: !w.value.length })), () => [
|
|
378
382
|
P(X, {
|
|
379
383
|
name: "refresh",
|
|
380
|
-
stroke:
|
|
384
|
+
stroke: g.color
|
|
381
385
|
}, null, 8, ["stroke"])
|
|
382
386
|
])
|
|
383
|
-
], 14,
|
|
387
|
+
], 14, Ge),
|
|
384
388
|
B("button", {
|
|
385
|
-
class: ne(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !
|
|
386
|
-
onClick:
|
|
389
|
+
class: ne(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !x.value.length }]),
|
|
390
|
+
onClick: Me,
|
|
387
391
|
style: k({
|
|
388
|
-
backgroundColor:
|
|
392
|
+
backgroundColor: g.backgroundColor,
|
|
389
393
|
border: `1px solid ${R.value}`
|
|
390
394
|
})
|
|
391
395
|
}, [
|
|
392
|
-
|
|
396
|
+
T(t.$slots, "annotator-action-redo", U(K({ disabled: !x.value.length })), () => [
|
|
393
397
|
P(X, {
|
|
394
398
|
name: "refresh",
|
|
395
|
-
stroke:
|
|
399
|
+
stroke: g.color,
|
|
396
400
|
style: { transform: "scaleX(-1)" }
|
|
397
401
|
}, null, 8, ["stroke"])
|
|
398
402
|
])
|
|
@@ -401,18 +405,18 @@ const Ye = {
|
|
|
401
405
|
class: ne(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !w.value.length }]),
|
|
402
406
|
onClick: Te,
|
|
403
407
|
style: k({
|
|
404
|
-
backgroundColor:
|
|
408
|
+
backgroundColor: g.backgroundColor,
|
|
405
409
|
border: `1px solid ${R.value}`
|
|
406
410
|
})
|
|
407
411
|
}, [
|
|
408
|
-
|
|
412
|
+
T(t.$slots, "annotator-action-delete", U(K({ disabled: !w.value.length })), () => [
|
|
409
413
|
P(X, {
|
|
410
414
|
name: "trash",
|
|
411
|
-
stroke:
|
|
415
|
+
stroke: g.color
|
|
412
416
|
}, null, 8, ["stroke"])
|
|
413
417
|
])
|
|
414
418
|
], 6),
|
|
415
|
-
|
|
419
|
+
f.value === "text" ? be((re(), se("input", {
|
|
416
420
|
key: 0,
|
|
417
421
|
ref: "range",
|
|
418
422
|
type: "range",
|
|
@@ -421,7 +425,7 @@ const Ye = {
|
|
|
421
425
|
max: 48,
|
|
422
426
|
step: 0.1,
|
|
423
427
|
"onUpdate:modelValue": e[3] || (e[3] = (a) => D.value = a),
|
|
424
|
-
style: k({ accentColor:
|
|
428
|
+
style: k({ accentColor: g.color })
|
|
425
429
|
}, null, 4)), [
|
|
426
430
|
[we, D.value]
|
|
427
431
|
]) : be((re(), se("input", {
|
|
@@ -433,13 +437,13 @@ const Ye = {
|
|
|
433
437
|
max: 12,
|
|
434
438
|
step: 0.1,
|
|
435
439
|
"onUpdate:modelValue": e[4] || (e[4] = (a) => N.value = a),
|
|
436
|
-
style: k({ accentColor:
|
|
440
|
+
style: k({ accentColor: g.color })
|
|
437
441
|
}, null, 4)), [
|
|
438
442
|
[we, N.value]
|
|
439
443
|
])
|
|
440
|
-
], 4)) :
|
|
444
|
+
], 4)) : Ie("", !0);
|
|
441
445
|
}
|
|
442
446
|
};
|
|
443
447
|
export {
|
|
444
|
-
|
|
448
|
+
je as default
|
|
445
449
|
};
|