vue-data-ui 2.4.16 → 2.4.18
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/{Arrow-D2hqxUFF.cjs → Arrow-Bcr8E3LL.cjs} +1 -1
- package/dist/{Arrow-DjLUfj3I.js → Arrow-DJ_q8Mp-.js} +1 -1
- package/dist/{BaseIcon-Prt1oCQy.cjs → BaseIcon-DUo61uTK.cjs} +1 -1
- package/dist/{BaseIcon-CbpX2G1z.js → BaseIcon-DnSWchyz.js} +6 -4
- package/dist/{DataTable-BBgny7Xn.cjs → DataTable-BNr5UHgv.cjs} +1 -1
- package/dist/{DataTable-Dqxz-Alv.js → DataTable-Dq3jNPBZ.js} +2 -2
- package/dist/{Legend-H7RcvGcF.cjs → Legend-CPUZQjfJ.cjs} +1 -1
- package/dist/{Legend-qZAWBE89.js → Legend-CkcHowoQ.js} +1 -1
- package/dist/{PackageVersion-DkcHjYNR.js → PackageVersion-DIlyVdX8.js} +1 -1
- package/dist/{PackageVersion-D0qCtRhG.cjs → PackageVersion-jHZaGBmK.cjs} +1 -1
- package/dist/PenAndPaper-DZMrk8wy.js +415 -0
- package/dist/PenAndPaper-dZiEH0m2.cjs +1 -0
- package/dist/{Shape-BDC0jxZ3.js → Shape-BKbfblrd.js} +1 -1
- package/dist/{Shape-eSbBghIf.cjs → Shape-Ck4xWZB_.cjs} +1 -1
- package/dist/Slicer-C2JTt4Gx.cjs +1 -0
- package/dist/{Slicer-C_ffaPqq.js → Slicer-CqIGpO6o.js} +91 -89
- package/dist/{Title-BXyUVn4l.cjs → Title-CD9e6mQe.cjs} +1 -1
- package/dist/{Title-CJxJTQnv.js → Title-CXsIzom7.js} +1 -1
- package/dist/{Tooltip-Bj9mOvCn.cjs → Tooltip-DcHF6dqp.cjs} +1 -1
- package/dist/{Tooltip-D3PxH9Yr.js → Tooltip-UUJts0wh.js} +1 -1
- package/dist/{index-ConhUMxI.cjs → index-1cntUuUo.cjs} +1 -1
- package/dist/{index-DtgCF1dT.js → index-Du8vv3oo.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -1
- package/dist/types/vue-data-ui.d.ts +1 -1
- package/dist/{useNestedProp-Bf_wk0w0.cjs → useNestedProp-Bf-uAsYz.cjs} +1 -1
- package/dist/{useNestedProp-BdDhoTT1.js → useNestedProp-DXOznrXc.js} +1 -1
- package/dist/{usePrinter-B47_seIG.cjs → usePrinter-BgfmrF5f.cjs} +1 -1
- package/dist/{usePrinter-NpyT5xn6.js → usePrinter-Dg442RJ0.js} +3 -2
- package/dist/{vue-data-ui-Ddtj4Mek.js → vue-data-ui-DZdNMqD1.js} +58 -58
- package/dist/{vue-data-ui-DB1uyxsy.cjs → vue-data-ui-OivfRME5.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-anfzldet.js → vue-ui-3d-bar-DdJ1cppR.js} +9 -9
- package/dist/{vue-ui-3d-bar-Ds4WyNIk.cjs → vue-ui-3d-bar-HiO1W-dS.cjs} +1 -1
- package/dist/{vue-ui-accordion-EBl2EIy5.cjs → vue-ui-accordion-BJSgJoOq.cjs} +1 -1
- package/dist/{vue-ui-accordion-B3F_RzZJ.js → vue-ui-accordion-CbLBormQ.js} +3 -3
- package/dist/{vue-ui-age-pyramid-LkSWkIF-.js → vue-ui-age-pyramid-BkLgQhJB.js} +10 -10
- package/dist/{vue-ui-age-pyramid-BQDPzBbb.cjs → vue-ui-age-pyramid-C-jv9x5Q.cjs} +1 -1
- package/dist/{vue-ui-annotator-hg0hrQ4M.js → vue-ui-annotator-CuH9kcj1.js} +1 -1
- package/dist/{vue-ui-annotator-BWCLVaJg.cjs → vue-ui-annotator-DboA8hvg.cjs} +1 -1
- package/dist/{vue-ui-bullet-5Ncai2bG.cjs → vue-ui-bullet-0y6Fh0jT.cjs} +1 -1
- package/dist/{vue-ui-bullet-BE4BC3Lm.js → vue-ui-bullet-Bz2EVbNp.js} +8 -8
- package/dist/{vue-ui-candlestick-CmOe5S2a.js → vue-ui-candlestick-44ZvzC6g.js} +11 -11
- package/dist/{vue-ui-candlestick-CsrO2_dW.cjs → vue-ui-candlestick-B9v0uSd-.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-OJ-EZXBN.js → vue-ui-carousel-table-BJSMAKAg.js} +4 -4
- package/dist/{vue-ui-carousel-table-DNFw32Re.cjs → vue-ui-carousel-table-DFn3nefQ.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BIwKV_Me.js → vue-ui-chestnut-3-GlJF3y.js} +8 -8
- package/dist/{vue-ui-chestnut-BD5cEuau.cjs → vue-ui-chestnut-h5fYGyqN.cjs} +1 -1
- package/dist/{vue-ui-cursor-6AnJw5dW.cjs → vue-ui-cursor-CB6Y5Hna.cjs} +1 -1
- package/dist/{vue-ui-cursor-Bs22kPh_.js → vue-ui-cursor-DUcdU0jQ.js} +2 -2
- package/dist/{vue-ui-dashboard-BUHKjLLQ.js → vue-ui-dashboard-B63ZDwnY.js} +2 -2
- package/dist/{vue-ui-dashboard-B1_ZmGck.cjs → vue-ui-dashboard-DKyohtO6.cjs} +1 -1
- package/dist/{vue-ui-digits-ZRwez97T.js → vue-ui-digits-BB2CzENa.js} +2 -2
- package/dist/{vue-ui-digits-C-g6ZMiJ.cjs → vue-ui-digits-BFyJY1ZF.cjs} +1 -1
- package/dist/{vue-ui-donut-BEau-Lsx.cjs → vue-ui-donut-BvEtK4Dg.cjs} +1 -1
- package/dist/{vue-ui-donut-bpO1nC_A.js → vue-ui-donut-bp3n8bhd.js} +11 -11
- package/dist/{vue-ui-donut-evolution-P_70k4ZK.js → vue-ui-donut-evolution-CVzJyTtt.js} +11 -11
- package/dist/{vue-ui-donut-evolution-Bhtrexhs.cjs → vue-ui-donut-evolution-Cfx9RGUr.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BF4kFnaH.js → vue-ui-dumbbell-B6lsMMoC.js} +10 -10
- package/dist/{vue-ui-dumbbell-BIhtFBfx.cjs → vue-ui-dumbbell-rz5GJY6S.cjs} +1 -1
- package/dist/{vue-ui-flow-VejnWAwC.js → vue-ui-flow-4Z8diwlc.js} +9 -9
- package/dist/{vue-ui-flow-aihghAzc.cjs → vue-ui-flow-Baw2nrEk.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BYqLQviQ.js → vue-ui-galaxy-Cosob_sW.js} +11 -11
- package/dist/{vue-ui-galaxy-D9-PvHlW.cjs → vue-ui-galaxy-Cq1ilf4w.cjs} +1 -1
- package/dist/{vue-ui-gauge-DwgxIcWn.js → vue-ui-gauge-CAst0Hbz.js} +7 -7
- package/dist/{vue-ui-gauge-CNeT3j79.cjs → vue-ui-gauge-CIblJCzU.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CI0Noh4J.cjs → vue-ui-gizmo-BtaLUSzF.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CaIENr2y.js → vue-ui-gizmo-C0MePE-n.js} +3 -3
- package/dist/{vue-ui-heatmap-Bi41PsVf.cjs → vue-ui-heatmap-Bvl5jeq0.cjs} +1 -1
- package/dist/{vue-ui-heatmap-T0RZPJNi.js → vue-ui-heatmap-CRqwdJgL.js} +10 -10
- package/dist/{vue-ui-kpi-BjHN5ees.js → vue-ui-kpi-BYVTXzsE.js} +3 -3
- package/dist/{vue-ui-kpi-DzINo7qU.cjs → vue-ui-kpi-uDJfL92r.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-KKMt90P1.cjs → vue-ui-mini-loader-ChBgEsJH.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Dmoycj4D.js → vue-ui-mini-loader-V4AeFcls.js} +2 -2
- package/dist/{vue-ui-molecule-CmqUJWcJ.js → vue-ui-molecule-BIG3xqX4.js} +11 -11
- package/dist/{vue-ui-molecule-BuY9zPWp.cjs → vue-ui-molecule-CTWBo6JZ.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DN6ksCAR.cjs → vue-ui-mood-radar-BjscPZ3t.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Bfxtfqhs.js → vue-ui-mood-radar-DEU3q1rh.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DrWv-fzC.cjs → vue-ui-nested-donuts-CCeMqR2K.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DhuIlTFL.js → vue-ui-nested-donuts-DzkJpv1L.js} +11 -11
- package/dist/{vue-ui-onion-DqbR_fES.js → vue-ui-onion-CG1J6PgK.js} +11 -11
- package/dist/{vue-ui-onion-BUn_3_0m.cjs → vue-ui-onion-p0jbOnJK.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-B5J5Xgsx.js → vue-ui-parallel-coordinate-plot-CPzRnr-9.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-CbiA8q_i.cjs → vue-ui-parallel-coordinate-plot-CfMiFmxS.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D87ZPZhF.js → vue-ui-quadrant-ClCxT2AI.js} +12 -12
- package/dist/{vue-ui-quadrant-Cw_4_8qY.cjs → vue-ui-quadrant-yRD_fDnz.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C82CfpyH.cjs → vue-ui-quick-chart-BRS49Yjq.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-B7cVyLVD.js → vue-ui-quick-chart-C43d4yYf.js} +9 -9
- package/dist/{vue-ui-radar-DBvn8B7b.js → vue-ui-radar-DMdIKlsF.js} +12 -12
- package/dist/{vue-ui-radar-DXS6BRSk.cjs → vue-ui-radar-yGpqXIP9.cjs} +1 -1
- package/dist/{vue-ui-rating-Dk4iTClP.js → vue-ui-rating-CvyAd2pd.js} +2 -2
- package/dist/{vue-ui-rating-DdsDvtQB.cjs → vue-ui-rating-uMQV8jfO.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CTzPZrkc.js → vue-ui-relation-circle-7OsE9dTi.js} +7 -7
- package/dist/{vue-ui-relation-circle-B3A8jwOU.cjs → vue-ui-relation-circle-CfKbE0u5.cjs} +1 -1
- package/dist/{vue-ui-rings-Boi9uLxr.js → vue-ui-rings-DEBWoZGK.js} +11 -11
- package/dist/{vue-ui-rings-Wv-ucypW.cjs → vue-ui-rings-Y-R2u7PA.cjs} +1 -1
- package/dist/{vue-ui-scatter-CM4upQYq.js → vue-ui-scatter-CcV0qPiB.js} +12 -12
- package/dist/{vue-ui-scatter-CWcULri7.cjs → vue-ui-scatter-DC1aciPf.cjs} +1 -1
- package/dist/{vue-ui-screenshot-voR3dKsx.cjs → vue-ui-screenshot-CLG6BeMj.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B-bxd1nI.js → vue-ui-screenshot-OppxahJp.js} +1 -1
- package/dist/{vue-ui-skeleton-9CBMqTVb.cjs → vue-ui-skeleton-B4O4ITgh.cjs} +1 -1
- package/dist/{vue-ui-skeleton-C3iXaL49.js → vue-ui-skeleton-BTBXEZ65.js} +3 -3
- package/dist/{vue-ui-smiley-DZU3yvxd.cjs → vue-ui-smiley-BTawY9fU.cjs} +1 -1
- package/dist/{vue-ui-smiley-BtDsA0Zp.js → vue-ui-smiley-CnHeU-81.js} +2 -2
- package/dist/{vue-ui-spark-trend-a1Y1HAcb.js → vue-ui-spark-trend-Caa5WzAQ.js} +5 -5
- package/dist/{vue-ui-spark-trend-C0z3aQw0.cjs → vue-ui-spark-trend-Chx3weIR.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-n0x0Ojvl.js → vue-ui-sparkbar-CEHqnsfC.js} +4 -4
- package/dist/{vue-ui-sparkbar-B0ODWAT_.cjs → vue-ui-sparkbar-DE4Z0dai.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BwdfA6LO.js → vue-ui-sparkgauge-BQL13REe.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dsdqik7O.cjs → vue-ui-sparkgauge-BhslFPrG.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BSlf36JQ.js → vue-ui-sparkhistogram-BgC2lzPr.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DCi9ehzT.cjs → vue-ui-sparkhistogram-Bh5RiT33.cjs} +1 -1
- package/dist/{vue-ui-sparkline-d8aMNAFt.cjs → vue-ui-sparkline-CEgZJqSj.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DSWvk3uJ.js → vue-ui-sparkline-CvkgpQZg.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-TtMuNP_L.js → vue-ui-sparkstackbar-1VakN_2O.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CPbd9U8E.cjs → vue-ui-sparkstackbar-ZX-Tn_bO.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DeIWk3RT.js → vue-ui-stackbar-bKIvEvN0.js} +12 -12
- package/dist/{vue-ui-stackbar-CYf2GKcg.cjs → vue-ui-stackbar-wlLnS9_Z.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DpAJn4ei.cjs → vue-ui-strip-plot-BowR8Xm7.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CeIaBpsB.js → vue-ui-strip-plot-KAHFdtoc.js} +11 -11
- package/dist/{vue-ui-table-CSaQrbjJ.cjs → vue-ui-table-CAW-Ad5R.cjs} +1 -1
- package/dist/{vue-ui-table-utOV9nTl.js → vue-ui-table-ChRJzySp.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DwHvhXeS.js → vue-ui-table-heatmap--OvflQ2g.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Ccun0wVJ.cjs → vue-ui-table-heatmap-Bf7b-Mhs.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-c9KUfM5n.js → vue-ui-table-sparkline-BbvFooL9.js} +5 -5
- package/dist/{vue-ui-table-sparkline-ByDSoYwt.cjs → vue-ui-table-sparkline-D4438gRF.cjs} +1 -1
- package/dist/{vue-ui-thermometer-D7NdF_tC.js → vue-ui-thermometer-C8Li5-Bb.js} +7 -7
- package/dist/{vue-ui-thermometer-B9QVfoF-.cjs → vue-ui-thermometer-d8zTsmdG.cjs} +1 -1
- package/dist/{vue-ui-timer-BwFyHPOk.js → vue-ui-timer-BxUknIeZ.js} +5 -5
- package/dist/{vue-ui-timer-DRonyxd9.cjs → vue-ui-timer-DGi36RFA.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DlcSqk5B.cjs → vue-ui-tiremarks-C5lbg_NJ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-urcNYqvB.js → vue-ui-tiremarks-D1hPqv8T.js} +7 -7
- package/dist/{vue-ui-treemap-CjSxg60e.cjs → vue-ui-treemap-BEHohiHK.cjs} +1 -1
- package/dist/{vue-ui-treemap-D9FUy74E.js → vue-ui-treemap-CuRdIK-L.js} +11 -11
- package/dist/{vue-ui-vertical-bar-ChHa19St.js → vue-ui-vertical-bar-CqOh6PTa.js} +11 -11
- package/dist/{vue-ui-vertical-bar-ZbdRy4kz.cjs → vue-ui-vertical-bar-q8Owx8-z.cjs} +1 -1
- package/dist/{vue-ui-waffle-BZ2oUPvu.cjs → vue-ui-waffle-C4mx6VrB.cjs} +1 -1
- package/dist/{vue-ui-waffle-DWZglOmM.js → vue-ui-waffle-rUx7nU7Q.js} +11 -11
- package/dist/{vue-ui-wheel-MuAnDxyI.js → vue-ui-wheel-B_DzbH_p.js} +7 -7
- package/dist/{vue-ui-wheel-BcEr-D-s.cjs → vue-ui-wheel-DBm8uJhY.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CrTlolf3.js → vue-ui-word-cloud-C_90yr14.js} +10 -10
- package/dist/{vue-ui-word-cloud-DDSWc8pR.cjs → vue-ui-word-cloud-CeTkWB_2.cjs} +1 -1
- package/dist/{vue-ui-xy-BwVbCW0Q.js → vue-ui-xy-BGH2yf8d.js} +14 -14
- package/dist/{vue-ui-xy-canvas-BtOoGLf9.js → vue-ui-xy-canvas-CR3hnJM1.js} +11 -11
- package/dist/{vue-ui-xy-canvas-DEj9NzP-.cjs → vue-ui-xy-canvas-DKlEMLm_.cjs} +1 -1
- package/dist/{vue-ui-xy-WLdlNN-D.cjs → vue-ui-xy-yM_9kBvW.cjs} +1 -1
- package/package.json +1 -1
- package/dist/PenAndPaper-DyFo40zC.cjs +0 -1
- package/dist/PenAndPaper-M_ZBYgJF.js +0 -347
- package/dist/Slicer-BXIEr9yc.cjs +0 -1
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { computed as O, ref as c, watch as q, withDirectives as A, openBlock as p, createElementBlock as f, createElementVNode as C, normalizeStyle as b, createVNode as P, Fragment as R, renderList as H, createCommentVNode as V, unref as j, onMounted as oe, nextTick as ne, onBeforeUnmount as le, normalizeClass as T, vModelText as re, withModifiers as Q } from "vue";
|
|
2
|
+
import { F as ae, l as se, X as ue } from "./index-Du8vv3oo.js";
|
|
3
|
+
import D from "./BaseIcon-DnSWchyz.js";
|
|
4
|
+
import { v as ce } from "./usePrinter-Dg442RJ0.js";
|
|
5
|
+
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const ie = { style: { height: "100%", width: "100%", position: "relative" } }, de = { class: "icon" }, ve = ["onClick"], pe = { style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -46%)" } }, fe = ["value"], he = {
|
|
7
|
+
__name: "ColorPicker",
|
|
8
|
+
props: {
|
|
9
|
+
value: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "#ffffff"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "50px"
|
|
16
|
+
},
|
|
17
|
+
backgroundColor: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "#FFFFFF"
|
|
20
|
+
},
|
|
21
|
+
buttonBorderColor: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "#FFFFFF"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:value"],
|
|
27
|
+
setup(r, { emit: I }) {
|
|
28
|
+
const h = r, k = O(() => ({
|
|
29
|
+
backgroundColor: h.value,
|
|
30
|
+
width: "100%",
|
|
31
|
+
height: "100%",
|
|
32
|
+
cursor: "pointer"
|
|
33
|
+
})), y = c(null), $ = c(!1), M = () => {
|
|
34
|
+
var u;
|
|
35
|
+
(u = y.value) == null || u.click();
|
|
36
|
+
};
|
|
37
|
+
function S(u) {
|
|
38
|
+
I("update:value", u), $.value = !1;
|
|
39
|
+
}
|
|
40
|
+
function x() {
|
|
41
|
+
$.value = !1;
|
|
42
|
+
}
|
|
43
|
+
function L() {
|
|
44
|
+
$.value && x();
|
|
45
|
+
}
|
|
46
|
+
const X = (u) => {
|
|
47
|
+
const B = u.target.value;
|
|
48
|
+
I("update:value", B);
|
|
49
|
+
}, F = O(() => ae(h.value));
|
|
50
|
+
q(
|
|
51
|
+
() => h.value,
|
|
52
|
+
(u) => {
|
|
53
|
+
y.value.value = u;
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const w = c([
|
|
57
|
+
"#000000",
|
|
58
|
+
"#FFFFFF",
|
|
59
|
+
"#FF5733",
|
|
60
|
+
"#33FF57",
|
|
61
|
+
"#3357FF",
|
|
62
|
+
"#FFC300",
|
|
63
|
+
"#800080",
|
|
64
|
+
"#FF1493",
|
|
65
|
+
"#00CED1"
|
|
66
|
+
]);
|
|
67
|
+
return (u, B) => A((p(), f("div", ie, [
|
|
68
|
+
C("div", {
|
|
69
|
+
onClick: B[0] || (B[0] = (z) => $.value = !$.value),
|
|
70
|
+
style: b(k.value)
|
|
71
|
+
}, [
|
|
72
|
+
C("div", de, [
|
|
73
|
+
P(D, {
|
|
74
|
+
name: "palette",
|
|
75
|
+
stroke: F.value,
|
|
76
|
+
size: 22
|
|
77
|
+
}, null, 8, ["stroke"])
|
|
78
|
+
])
|
|
79
|
+
], 4),
|
|
80
|
+
$.value ? (p(), f("div", {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "vue-ui-color-picker",
|
|
83
|
+
style: b({
|
|
84
|
+
backgroundColor: r.backgroundColor
|
|
85
|
+
})
|
|
86
|
+
}, [
|
|
87
|
+
(p(!0), f(R, null, H(w.value, (z) => (p(), f("div", {
|
|
88
|
+
class: "vue-ui-color-picker-option",
|
|
89
|
+
style: b({
|
|
90
|
+
backgroundColor: z,
|
|
91
|
+
outline: `1px solid ${r.buttonBorderColor}`
|
|
92
|
+
}),
|
|
93
|
+
onClick: () => S(z)
|
|
94
|
+
}, null, 12, ve))), 256)),
|
|
95
|
+
C("div", {
|
|
96
|
+
class: "vue-ui-color-picker-option",
|
|
97
|
+
onClick: M,
|
|
98
|
+
style: b({
|
|
99
|
+
backgroundColor: r.value,
|
|
100
|
+
outline: `1px solid ${r.buttonBorderColor}`
|
|
101
|
+
})
|
|
102
|
+
}, [
|
|
103
|
+
C("div", pe, [
|
|
104
|
+
P(D, {
|
|
105
|
+
name: "colorPicker",
|
|
106
|
+
stroke: F.value,
|
|
107
|
+
size: 22
|
|
108
|
+
}, null, 8, ["stroke"])
|
|
109
|
+
]),
|
|
110
|
+
C("input", {
|
|
111
|
+
ref_key: "colorInput",
|
|
112
|
+
ref: y,
|
|
113
|
+
type: "color",
|
|
114
|
+
value: r.value,
|
|
115
|
+
class: "hidden-input",
|
|
116
|
+
onInput: X
|
|
117
|
+
}, null, 40, fe)
|
|
118
|
+
], 4)
|
|
119
|
+
], 4)) : V("", !0)
|
|
120
|
+
])), [
|
|
121
|
+
[j(ce), L]
|
|
122
|
+
]);
|
|
123
|
+
}
|
|
124
|
+
}, ke = /* @__PURE__ */ G(he, [["__scopeId", "data-v-84e6c062"]]), ge = {
|
|
125
|
+
class: /* @__PURE__ */ T({
|
|
126
|
+
"vue-ui-pen-and-paper-action": !0
|
|
127
|
+
}),
|
|
128
|
+
style: { padding: "0 !important" }
|
|
129
|
+
}, me = ["disabled"], Ce = ["xmlns", "viewBox", "onTouchstart", "onTouchmove"], ye = ["cx", "cy", "r", "fill"], $e = ["d", "stroke", "stroke-width"], be = ["d", "stroke", "stroke-width"], Fe = {
|
|
130
|
+
__name: "PenAndPaper",
|
|
131
|
+
props: {
|
|
132
|
+
parent: {
|
|
133
|
+
type: HTMLElement
|
|
134
|
+
},
|
|
135
|
+
backgroundColor: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: "#FFFFFF"
|
|
138
|
+
},
|
|
139
|
+
color: {
|
|
140
|
+
type: String,
|
|
141
|
+
default: "#2D353C"
|
|
142
|
+
},
|
|
143
|
+
active: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
default: !1
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
emits: ["close"],
|
|
149
|
+
setup(r, { emit: I }) {
|
|
150
|
+
const h = r, k = c([]), y = c([]), $ = c("0 0 0 0"), M = c(h.color), S = c(1), x = O(() => se(h.color, 0.6));
|
|
151
|
+
function L({ width: o, height: t }) {
|
|
152
|
+
$.value = `0 0 ${o} ${t}`;
|
|
153
|
+
}
|
|
154
|
+
const X = c(null);
|
|
155
|
+
oe(() => {
|
|
156
|
+
ne(() => {
|
|
157
|
+
if (h.parent) {
|
|
158
|
+
X.value = new ResizeObserver((e) => {
|
|
159
|
+
for (const n of e) {
|
|
160
|
+
const { width: l, height: a } = n.contentRect;
|
|
161
|
+
L({ width: l, height: a });
|
|
162
|
+
}
|
|
163
|
+
}), X.value.observe(h.parent);
|
|
164
|
+
const { width: o, height: t } = h.parent.getBoundingClientRect();
|
|
165
|
+
L({ width: o, height: t });
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}), le(() => {
|
|
169
|
+
X.value && X.value.disconnect();
|
|
170
|
+
}), q(
|
|
171
|
+
() => h.parent,
|
|
172
|
+
(o) => {
|
|
173
|
+
if (!o) return;
|
|
174
|
+
const { width: t, height: e } = h.parent.getBoundingClientRect();
|
|
175
|
+
L({ width: t, height: e });
|
|
176
|
+
},
|
|
177
|
+
{ immediate: !0 }
|
|
178
|
+
);
|
|
179
|
+
const F = c(!1), w = c(""), u = c(null);
|
|
180
|
+
function B(o) {
|
|
181
|
+
if (!u.value) return;
|
|
182
|
+
F.value = !0;
|
|
183
|
+
const { x: t, y: e } = W(o);
|
|
184
|
+
w.value = `M ${t} ${e}`;
|
|
185
|
+
}
|
|
186
|
+
function z(o) {
|
|
187
|
+
if (!F.value || !u.value) return;
|
|
188
|
+
const { x: t, y: e } = W(o);
|
|
189
|
+
w.value += ` ${t} ${e}`;
|
|
190
|
+
}
|
|
191
|
+
function U(o) {
|
|
192
|
+
const t = o.trim().split(/\s+/);
|
|
193
|
+
if (t.length < 4)
|
|
194
|
+
return o;
|
|
195
|
+
const e = t.slice(1).map(Number);
|
|
196
|
+
if (e.length % 2 !== 0)
|
|
197
|
+
return o;
|
|
198
|
+
const n = J(e), l = [`M ${n[0]} ${n[1]}`];
|
|
199
|
+
for (let i = 2; i < n.length - 2; i += 2) {
|
|
200
|
+
const g = n[i - 2], m = n[i - 1], d = n[i], v = n[i + 1], N = (g + d) / 2, Y = (m + v) / 2;
|
|
201
|
+
l.push(`Q ${g} ${m} ${N} ${Y}`);
|
|
202
|
+
}
|
|
203
|
+
const a = n[n.length - 2], s = n[n.length - 1];
|
|
204
|
+
return l.push(`L ${a} ${s}`), l.join(" ");
|
|
205
|
+
}
|
|
206
|
+
function J(o, t = 1) {
|
|
207
|
+
const e = [...o];
|
|
208
|
+
for (let n = 2; n < o.length - 2; n += 2) {
|
|
209
|
+
const l = o[n], a = o[n + 1], s = o[n - 2], i = o[n - 1], g = o[n + 2], m = o[n + 3];
|
|
210
|
+
e[n] = l + t * ((s + g) / 2 - l), e[n + 1] = a + t * ((i + m) / 2 - a);
|
|
211
|
+
}
|
|
212
|
+
return e;
|
|
213
|
+
}
|
|
214
|
+
function K(o) {
|
|
215
|
+
const t = o.trim().split(/\s+/);
|
|
216
|
+
let e = "", n = "", l = null, a = null;
|
|
217
|
+
for (let s = 0; s < t.length; s += 1) {
|
|
218
|
+
const i = t[s];
|
|
219
|
+
if (isNaN(i)) {
|
|
220
|
+
if (n = i, n === "M" || n === "L")
|
|
221
|
+
l = parseFloat(t[++s]), a = parseFloat(t[++s]), e += `${n}${l} ${a}`;
|
|
222
|
+
else if (n === "Q") {
|
|
223
|
+
const g = parseFloat(t[++s]), m = parseFloat(t[++s]), d = parseFloat(t[++s]), v = parseFloat(t[++s]);
|
|
224
|
+
g === l && m === a ? e += `t${d - l} ${v - a}` : e += `q${g - l} ${m - a} ${d - l} ${v - a}`, l = d, a = v;
|
|
225
|
+
}
|
|
226
|
+
} else {
|
|
227
|
+
const g = parseFloat(i), m = parseFloat(t[++s]);
|
|
228
|
+
if (n === "L") {
|
|
229
|
+
const d = g - l, v = m - a;
|
|
230
|
+
d === 0 ? e += `v${v}` : v === 0 ? e += `h${d}` : e += `l${d} ${v}`, l = g, a = m;
|
|
231
|
+
} else if (n === "Q") {
|
|
232
|
+
const d = g, v = m, N = parseFloat(t[++s]), Y = parseFloat(t[++s]);
|
|
233
|
+
d === l && v === a ? e += `t${N - l} ${Y - a}` : e += `q${d - l} ${v - a} ${N - l} ${Y - a}`, l = N, a = Y;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return e;
|
|
238
|
+
}
|
|
239
|
+
function E() {
|
|
240
|
+
F.value && (k.value.push({
|
|
241
|
+
strokeWidth: S.value,
|
|
242
|
+
path: K(U(w.value)),
|
|
243
|
+
color: M.value
|
|
244
|
+
}), y.value = [], w.value = ""), F.value = !1;
|
|
245
|
+
}
|
|
246
|
+
function W(o) {
|
|
247
|
+
if (!u.value) return { x: 0, y: 0 };
|
|
248
|
+
const t = u.value.getBoundingClientRect();
|
|
249
|
+
let e, n;
|
|
250
|
+
return o.touches && o.touches.length ? (e = o.touches[0].clientX, n = o.touches[0].clientY) : (e = o.clientX, n = o.clientY), {
|
|
251
|
+
x: e - t.left,
|
|
252
|
+
y: n - t.top
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
c(!1);
|
|
256
|
+
function Z() {
|
|
257
|
+
if (k.value.length > 0) {
|
|
258
|
+
const o = k.value.pop();
|
|
259
|
+
y.value.push(o);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function _() {
|
|
263
|
+
if (y.value.length > 0) {
|
|
264
|
+
const o = y.value.pop();
|
|
265
|
+
k.value.push(o);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function ee() {
|
|
269
|
+
k.value = [], y.value = [];
|
|
270
|
+
}
|
|
271
|
+
const te = c(null);
|
|
272
|
+
return (o, t) => (p(), f(R, null, [
|
|
273
|
+
r.active ? (p(), f("div", {
|
|
274
|
+
key: 0,
|
|
275
|
+
"data-html2canvas-ignore": "",
|
|
276
|
+
class: T({
|
|
277
|
+
"vue-ui-pen-and-paper-actions": !0,
|
|
278
|
+
visible: r.active
|
|
279
|
+
})
|
|
280
|
+
}, [
|
|
281
|
+
C("button", {
|
|
282
|
+
class: "vue-ui-pen-and-paper-action",
|
|
283
|
+
style: b({
|
|
284
|
+
backgroundColor: r.backgroundColor,
|
|
285
|
+
border: `1px solid ${x.value}`
|
|
286
|
+
}),
|
|
287
|
+
onClick: t[0] || (t[0] = (e) => I("close"))
|
|
288
|
+
}, [
|
|
289
|
+
P(D, {
|
|
290
|
+
name: "close",
|
|
291
|
+
stroke: r.color
|
|
292
|
+
}, null, 8, ["stroke"])
|
|
293
|
+
], 4),
|
|
294
|
+
C("button", ge, [
|
|
295
|
+
P(ke, {
|
|
296
|
+
value: M.value,
|
|
297
|
+
"onUpdate:value": t[1] || (t[1] = (e) => M.value = e),
|
|
298
|
+
backgroundColor: r.backgroundColor,
|
|
299
|
+
buttonBorderColor: x.value
|
|
300
|
+
}, null, 8, ["value", "backgroundColor", "buttonBorderColor"])
|
|
301
|
+
]),
|
|
302
|
+
C("button", {
|
|
303
|
+
class: T({
|
|
304
|
+
"vue-ui-pen-and-paper-action": !0,
|
|
305
|
+
"vue-ui-pen-and-paper-action-disabled": !k.value.length
|
|
306
|
+
}),
|
|
307
|
+
disabled: !k.value.length,
|
|
308
|
+
style: b({
|
|
309
|
+
backgroundColor: r.backgroundColor,
|
|
310
|
+
border: `1px solid ${x.value}`
|
|
311
|
+
}),
|
|
312
|
+
onClick: Z
|
|
313
|
+
}, [
|
|
314
|
+
P(D, {
|
|
315
|
+
name: "restart",
|
|
316
|
+
stroke: r.color
|
|
317
|
+
}, null, 8, ["stroke"])
|
|
318
|
+
], 14, me),
|
|
319
|
+
C("button", {
|
|
320
|
+
class: T({
|
|
321
|
+
"vue-ui-pen-and-paper-action": !0,
|
|
322
|
+
"vue-ui-pen-and-paper-action-disabled": !y.value.length
|
|
323
|
+
}),
|
|
324
|
+
style: b({
|
|
325
|
+
backgroundColor: r.backgroundColor,
|
|
326
|
+
border: `1px solid ${x.value}`
|
|
327
|
+
}),
|
|
328
|
+
onClick: _
|
|
329
|
+
}, [
|
|
330
|
+
P(D, {
|
|
331
|
+
name: "restart",
|
|
332
|
+
stroke: r.color,
|
|
333
|
+
style: { transform: "scaleX(-1)" }
|
|
334
|
+
}, null, 8, ["stroke"])
|
|
335
|
+
], 6),
|
|
336
|
+
C("button", {
|
|
337
|
+
class: T([{
|
|
338
|
+
"vue-ui-pen-and-paper-action": !0,
|
|
339
|
+
"vue-ui-pen-and-paper-action-disabled": !k.value.length
|
|
340
|
+
}, "vue-ui-pen-and-paper-action"]),
|
|
341
|
+
style: b({
|
|
342
|
+
backgroundColor: r.backgroundColor,
|
|
343
|
+
border: `1px solid ${x.value}`
|
|
344
|
+
}),
|
|
345
|
+
onClick: ee
|
|
346
|
+
}, [
|
|
347
|
+
P(D, {
|
|
348
|
+
name: "trash",
|
|
349
|
+
stroke: r.color
|
|
350
|
+
}, null, 8, ["stroke"])
|
|
351
|
+
], 6),
|
|
352
|
+
A(C("input", {
|
|
353
|
+
ref_key: "range",
|
|
354
|
+
ref: te,
|
|
355
|
+
type: "range",
|
|
356
|
+
class: "vertical-range",
|
|
357
|
+
min: 0.5,
|
|
358
|
+
max: 12,
|
|
359
|
+
step: 0.1,
|
|
360
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => S.value = e),
|
|
361
|
+
style: b({
|
|
362
|
+
accentColor: r.color
|
|
363
|
+
})
|
|
364
|
+
}, null, 4), [
|
|
365
|
+
[re, S.value]
|
|
366
|
+
])
|
|
367
|
+
], 2)) : V("", !0),
|
|
368
|
+
(p(), f("svg", {
|
|
369
|
+
ref_key: "svgElement",
|
|
370
|
+
ref: u,
|
|
371
|
+
xmlns: j(ue),
|
|
372
|
+
viewBox: $.value,
|
|
373
|
+
class: T({
|
|
374
|
+
"vue-ui-pen-and-paper": !0,
|
|
375
|
+
inactive: !r.active
|
|
376
|
+
}),
|
|
377
|
+
onMousedown: B,
|
|
378
|
+
onMousemove: z,
|
|
379
|
+
onMouseup: E,
|
|
380
|
+
onMouseleave: E,
|
|
381
|
+
onTouchstart: Q(B, ["prevent"]),
|
|
382
|
+
onTouchmove: Q(z, ["prevent"]),
|
|
383
|
+
onTouchend: E
|
|
384
|
+
}, [
|
|
385
|
+
(p(!0), f(R, null, H(k.value, (e) => (p(), f(R, { key: e }, [
|
|
386
|
+
e.path.replace("M", "").split(" ").length === 2 ? (p(), f("circle", {
|
|
387
|
+
key: 0,
|
|
388
|
+
cx: e.path.replace("M", "").split(" ")[0],
|
|
389
|
+
cy: e.path.replace("M", "").split(" ")[1],
|
|
390
|
+
r: e.strokeWidth / 2,
|
|
391
|
+
fill: e.color
|
|
392
|
+
}, null, 8, ye)) : (p(), f("path", {
|
|
393
|
+
key: 1,
|
|
394
|
+
class: "vue-ui-pen-and-paper-path",
|
|
395
|
+
d: e.path,
|
|
396
|
+
stroke: e.color,
|
|
397
|
+
"stroke-width": e.strokeWidth,
|
|
398
|
+
fill: "none"
|
|
399
|
+
}, null, 8, $e))
|
|
400
|
+
], 64))), 128)),
|
|
401
|
+
F.value ? (p(), f("path", {
|
|
402
|
+
key: 0,
|
|
403
|
+
class: "vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",
|
|
404
|
+
d: U(w.value),
|
|
405
|
+
stroke: M.value,
|
|
406
|
+
"stroke-width": S.value * 1.1,
|
|
407
|
+
fill: "none"
|
|
408
|
+
}, null, 8, be)) : V("", !0)
|
|
409
|
+
], 42, Ce))
|
|
410
|
+
], 64));
|
|
411
|
+
}
|
|
412
|
+
}, Se = /* @__PURE__ */ G(Fe, [["__scopeId", "data-v-a932b1ac"]]);
|
|
413
|
+
export {
|
|
414
|
+
Se as P
|
|
415
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),M=require("./index-1cntUuUo.cjs"),E=require("./BaseIcon-DUo61uTK.cjs"),U=require("./usePrinter-BgfmrF5f.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W={style:{height:"100%",width:"100%",position:"relative"}},A={class:"icon"},H=["onClick"],Q={style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -46%)"}},_=["value"],j={__name:"ColorPicker",props:{value:{type:String,default:"#ffffff"},size:{type:String,default:"50px"},backgroundColor:{type:String,default:"#FFFFFF"},buttonBorderColor:{type:String,default:"#FFFFFF"}},emits:["update:value"],setup(a,{emit:P}){const p=a,f=e.computed(()=>({backgroundColor:p.value,width:"100%",height:"100%",cursor:"pointer"})),h=e.ref(null),g=e.ref(!1),b=()=>{var u;(u=h.value)==null||u.click()};function B(u){P("update:value",u),g.value=!1}function y(){g.value=!1}function N(){g.value&&y()}const x=u=>{const $=u.target.value;P("update:value",$)},C=e.computed(()=>M.adaptColorToBackground(p.value));e.watch(()=>p.value,u=>{h.value.value=u});const F=e.ref(["#000000","#FFFFFF","#FF5733","#33FF57","#3357FF","#FFC300","#800080","#FF1493","#00CED1"]);return(u,$)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("div",{onClick:$[0]||($[0]=w=>g.value=!g.value),style:e.normalizeStyle(f.value)},[e.createElementVNode("div",A,[e.createVNode(E.default,{name:"palette",stroke:C.value,size:22},null,8,["stroke"])])],4),g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-color-picker",style:e.normalizeStyle({backgroundColor:a.backgroundColor})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,w=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-color-picker-option",style:e.normalizeStyle({backgroundColor:w,outline:`1px solid ${a.buttonBorderColor}`}),onClick:()=>B(w)},null,12,H))),256)),e.createElementVNode("div",{class:"vue-ui-color-picker-option",onClick:b,style:e.normalizeStyle({backgroundColor:a.value,outline:`1px solid ${a.buttonBorderColor}`})},[e.createElementVNode("div",Q,[e.createVNode(E.default,{name:"colorPicker",stroke:C.value,size:22},null,8,["stroke"])]),e.createElementVNode("input",{ref_key:"colorInput",ref:h,type:"color",value:a.value,class:"hidden-input",onInput:x},null,40,_)],4)],4)):e.createCommentVNode("",!0)])),[[e.unref(U.vClickOutside),N]])}},G=L._export_sfc(j,[["__scopeId","data-v-84e6c062"]]),J={class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},K=["disabled"],Z=["xmlns","viewBox","onTouchstart","onTouchmove"],ee=["cx","cy","r","fill"],te=["d","stroke","stroke-width"],oe=["d","stroke","stroke-width"],ne={__name:"PenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup(a,{emit:P}){const p=a,f=e.ref([]),h=e.ref([]),g=e.ref("0 0 0 0"),b=e.ref(p.color),B=e.ref(1),y=e.computed(()=>M.lightenHexColor(p.color,.6));function N({width:n,height:o}){g.value=`0 0 ${n} ${o}`}const x=e.ref(null);e.onMounted(()=>{e.nextTick(()=>{if(p.parent){x.value=new ResizeObserver(t=>{for(const l of t){const{width:r,height:c}=l.contentRect;N({width:r,height:c})}}),x.value.observe(p.parent);const{width:n,height:o}=p.parent.getBoundingClientRect();N({width:n,height:o})}})}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()}),e.watch(()=>p.parent,n=>{if(!n)return;const{width:o,height:t}=p.parent.getBoundingClientRect();N({width:o,height:t})},{immediate:!0});const C=e.ref(!1),F=e.ref(""),u=e.ref(null);function $(n){if(!u.value)return;C.value=!0;const{x:o,y:t}=D(n);F.value=`M ${o} ${t}`}function w(n){if(!C.value||!u.value)return;const{x:o,y:t}=D(n);F.value+=` ${o} ${t}`}function X(n){const o=n.trim().split(/\s+/);if(o.length<4)return n;const t=o.slice(1).map(Number);if(t.length%2!==0)return n;const l=T(t),r=[`M ${l[0]} ${l[1]}`];for(let i=2;i<l.length-2;i+=2){const k=l[i-2],m=l[i-1],d=l[i],v=l[i+1],V=(k+d)/2,z=(m+v)/2;r.push(`Q ${k} ${m} ${V} ${z}`)}const c=l[l.length-2],s=l[l.length-1];return r.push(`L ${c} ${s}`),r.join(" ")}function T(n,o=1){const t=[...n];for(let l=2;l<n.length-2;l+=2){const r=n[l],c=n[l+1],s=n[l-2],i=n[l-1],k=n[l+2],m=n[l+3];t[l]=r+o*((s+k)/2-r),t[l+1]=c+o*((i+m)/2-c)}return t}function Y(n){const o=n.trim().split(/\s+/);let t="",l="",r=null,c=null;for(let s=0;s<o.length;s+=1){const i=o[s];if(isNaN(i)){if(l=i,l==="M"||l==="L")r=parseFloat(o[++s]),c=parseFloat(o[++s]),t+=`${l}${r} ${c}`;else if(l==="Q"){const k=parseFloat(o[++s]),m=parseFloat(o[++s]),d=parseFloat(o[++s]),v=parseFloat(o[++s]);k===r&&m===c?t+=`t${d-r} ${v-c}`:t+=`q${k-r} ${m-c} ${d-r} ${v-c}`,r=d,c=v}}else{const k=parseFloat(i),m=parseFloat(o[++s]);if(l==="L"){const d=k-r,v=m-c;d===0?t+=`v${v}`:v===0?t+=`h${d}`:t+=`l${d} ${v}`,r=k,c=m}else if(l==="Q"){const d=k,v=m,V=parseFloat(o[++s]),z=parseFloat(o[++s]);d===r&&v===c?t+=`t${V-r} ${z-c}`:t+=`q${d-r} ${v-c} ${V-r} ${z-c}`,r=V,c=z}}}return t}function S(){C.value&&(f.value.push({strokeWidth:B.value,path:Y(X(F.value)),color:b.value}),h.value=[],F.value=""),C.value=!1}function D(n){if(!u.value)return{x:0,y:0};const o=u.value.getBoundingClientRect();let t,l;return n.touches&&n.touches.length?(t=n.touches[0].clientX,l=n.touches[0].clientY):(t=n.clientX,l=n.clientY),{x:t-o.left,y:l-o.top}}e.ref(!1);function q(){if(f.value.length>0){const n=f.value.pop();h.value.push(n)}}function I(){if(h.value.length>0){const n=h.value.pop();f.value.push(n)}}function R(){f.value=[],h.value=[]}const O=e.ref(null);return(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.active?(e.openBlock(),e.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:e.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:a.active})},[e.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${y.value}`}),onClick:o[0]||(o[0]=t=>P("close"))},[e.createVNode(E.default,{name:"close",stroke:a.color},null,8,["stroke"])],4),e.createElementVNode("button",J,[e.createVNode(G,{value:b.value,"onUpdate:value":o[1]||(o[1]=t=>b.value=t),backgroundColor:a.backgroundColor,buttonBorderColor:y.value},null,8,["value","backgroundColor","buttonBorderColor"])]),e.createElementVNode("button",{class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!f.value.length}),disabled:!f.value.length,style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${y.value}`}),onClick:q},[e.createVNode(E.default,{name:"restart",stroke:a.color},null,8,["stroke"])],14,K),e.createElementVNode("button",{class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!h.value.length}),style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${y.value}`}),onClick:I},[e.createVNode(E.default,{name:"restart",stroke:a.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),e.createElementVNode("button",{class:e.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!f.value.length},"vue-ui-pen-and-paper-action"]),style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${y.value}`}),onClick:R},[e.createVNode(E.default,{name:"trash",stroke:a.color},null,8,["stroke"])],6),e.withDirectives(e.createElementVNode("input",{ref_key:"range",ref:O,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":o[2]||(o[2]=t=>B.value=t),style:e.normalizeStyle({accentColor:a.color})},null,4),[[e.vModelText,B.value]])],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgElement",ref:u,xmlns:e.unref(M.XMLNS),viewBox:g.value,class:e.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!a.active}),onMousedown:$,onMousemove:w,onMouseup:S,onMouseleave:S,onTouchstart:e.withModifiers($,["prevent"]),onTouchmove:e.withModifiers(w,["prevent"]),onTouchend:S},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t},[t.path.replace("M","").split(" ").length===2?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:t.path.replace("M","").split(" ")[0],cy:t.path.replace("M","").split(" ")[1],r:t.strokeWidth/2,fill:t.color},null,8,ee)):(e.openBlock(),e.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:t.path,stroke:t.color,"stroke-width":t.strokeWidth,fill:"none"},null,8,te))],64))),128)),C.value?(e.openBlock(),e.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:X(F.value),stroke:b.value,"stroke-width":B.value*1.1,fill:"none"},null,8,oe)):e.createCommentVNode("",!0)],42,Z))],64))}},le=L._export_sfc(ne,[["__scopeId","data-v-a932b1ac"]]);exports.PenAndPaper=le;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as u, openBlock as l, createElementBlock as i, createCommentVNode as a } from "vue";
|
|
2
|
-
import { V as p, O as f } from "./index-
|
|
2
|
+
import { V as p, O as f } from "./index-Du8vv3oo.js";
|
|
3
3
|
const y = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], c = ["d", "fill", "stroke", "stroke-width"], g = ["points", "fill", "stroke", "stroke-width"], $ = {
|
|
4
4
|
__name: "Shape",
|
|
5
5
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),a=require("./index-1cntUuUo.cjs"),c=["cx","cy","r","fill","stroke","stroke-width"],m=["d","fill","stroke","stroke-width"],v=["points","fill","stroke","stroke-width"],p={__name:"Shape",props:{color:String,isSelected:{type:Boolean,default:!1},limit:{type:Number,default:3},plot:Object,radius:Number,shape:String,stroke:String,strokeWidth:Number,zoom:{type:Number,default:1.3}},emits:["mouseover","mouseout","click"],setup(n,{emit:r}){const t=n;function d(u){return{circle:{points:1,rotation:0},line:{points:2,rotation:0},triangle:{points:3,rotation:.52},square:{points:4,rotation:.783},diamond:{points:4,rotation:0},pentagon:{points:5,rotation:.95},hexagon:{points:6,rotation:0}}[u]}const s=e.computed(()=>d(t.shape)),i=e.computed(()=>t.shape!=="star"?null:a.createStar({plot:{x:t.plot.x,y:t.plot.y},radius:t.radius*(t.isSelected?t.zoom:1)})),k=e.computed(()=>a.createPolygonPath({plot:{x:t.plot.x,y:t.plot.y},radius:t.radius*(t.isSelected?t.zoom:1),sides:s.value.points,rotation:s.value.rotation}).path);return(u,o)=>(e.openBlock(),e.createElementBlock("g",null,[s.value&&s.value.points===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.plot.x,cy:n.plot.y,r:t.radius*(t.isSelected?t.zoom:1),fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:o[0]||(o[0]=l=>r("mouseover")),onMouseout:o[1]||(o[1]=l=>r("mouseout")),onClick:o[2]||(o[2]=l=>r("click"))},null,40,c)):e.createCommentVNode("",!0),s.value&&s.value.points>=n.limit?(e.openBlock(),e.createElementBlock("path",{key:1,d:k.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:o[3]||(o[3]=l=>r("mouseover")),onMouseout:o[4]||(o[4]=l=>r("mouseout")),onClick:o[5]||(o[5]=l=>r("click"))},null,40,m)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:i.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:o[6]||(o[6]=l=>r("mouseover")),onMouseout:o[7]||(o[7]=l=>r("mouseout")),onClick:o[8]||(o[8]=l=>r("click"))},null,40,v)):e.createCommentVNode("",!0)]))}};exports._sfc_main=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),O=require("./BaseIcon-DUo61uTK.cjs"),C=require("./useResponsive-BJ7DTGpm.cjs"),v=require("./index-1cntUuUo.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w=l=>(e.pushScopeId("data-v-a7172e39"),l=l(),e.popScopeId(),l),U={"data-html2canvas-ignore":"",style:{padding:"0 24px"},class:"vue-data-ui-zoom"},W={class:"vue-data-ui-slicer-labels",style:{position:"relative","z-index":"1","pointer-events":"none"}},j={key:0,style:{width:"100%",position:"relative"}},X={key:0,class:"minimap",style:{width:"100%"}},Z=["xmlns","viewBox"],_=["id"],G=["stop-color"],H=w(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"transparent"},null,-1)),J=["d","stroke"],K=["x","width","height","fill","rx"],Q=["d","fill"],Y=["x","width","height","rx","fill"],ee=["x","width","height","fill","rx"],te=["d","fill"],le=["d","stroke"],ae=["cx","cy","stroke","fill"],ne=["cx","cy","stroke","fill"],oe=["x1","x2","y2","stroke"],ie=["x","height","width","onMouseenter"],ue=w(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),re=["min","max"],se=["min","max"],ce={__name:"Slicer",props:{background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:Number,default:14},labelLeft:{type:String,default:""},labelRight:{type:String,default:""},textColor:{type:String,default:"#1A1A1A"},inputColor:{type:String,default:"#1A1A1A"},max:{type:Number,default:0},min:{type:Number,default:0},selectColor:{type:String,default:"#4A4A4A"},useResetSlot:{type:Boolean,default:!1},valueStart:{type:[Number,String],default:0},valueEnd:{type:[Number,String],default:0},minimap:{type:Array,default:[]},smoothMinimap:{type:Boolean,default:!1},minimapSelectedColor:{type:String,default:"#1f77b4"},minimapSelectionRadius:{type:Number,default:12},minimapLineColor:{type:String,default:"#2D353C"},minimapSelectedColorOpacity:{type:Number,default:.2},minimapSelectedIndex:{type:Number,default:null},minimapIndicatorColor:{type:String,default:"#2D353C"}},emits:["update:start","update:end","reset","trapMouse"],setup(l,{emit:h}){const t=l;e.useCssVars(a=>({"6267c498":B.value,"0b4565e8":f.value,"65e63d06":z.value,"4adae388":l.selectColor,"0d1d7aca":$.value}));const u=e.ref(t.min),r=e.ref(t.max),p=e.computed(()=>!!t.minimap.length),b=e.ref(v.createUid()),V=e.computed(()=>{const a=t.max-t.min,o=(u.value-t.min)/a*100,i=(r.value-t.min)/a*100;return{left:`${o}%`,width:`${i-o}%`,background:t.selectColor}}),B=e.computed(()=>t.inputColor),$=e.computed(()=>t.background),z=e.computed(()=>`${t.selectColor}33`),f=e.computed(()=>t.borderColor),N=e.computed(()=>{let a=[];for(let o=0;o<t.minimap.length;o+=1)a.push(o);return a});function E(){h("reset")}function M(){Number(u.value)>Number(r.value)-1&&(u.value=Number(r.value)-1),h("update:start",Number(u.value))}function L(){Number(r.value)<Number(u.value)+1&&(r.value=Number(u.value)+1),h("update:end",Number(r.value))}e.watch(()=>t.min,a=>{Number(u.value)<Number(a)&&(u.value=Number(a)),Number(r.value)<Number(a)&&(r.value=Number(a))}),e.watch(()=>t.max,a=>{Number(u.value)>Number(a)&&(u.value=Number(a)),Number(r.value)>Number(a)&&(r.value=Number(a))});const g=e.ref(null),n=e.ref({width:0,height:0}),S=e.ref(null);e.onMounted(()=>{if(p.value&&g.value){const a=C.throttle(()=>{requestAnimationFrame(()=>{const{width:c,height:x}=C.useResponsive({chart:g.value});n.value.width=c,n.value.height=Math.max(0,x-47)})});S.value=new ResizeObserver(a),S.value.observe(g.value);const{width:o,height:i}=g.value.getBoundingClientRect();n.value.width=o,n.value.height=i}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const s=e.computed(()=>t.minimap.length?n.value.width/t.minimap.length:0),d=e.computed(()=>{if(!t.minimap.length)return[];const a=Math.max(...t.minimap),o=Math.min(...t.minimap)-10,i=a-(o>0?0:o),c=t.minimap.map((A,q)=>{const D=A-o;return{x:n.value.width/t.minimap.length*q+s.value/2,y:n.value.height-D/i*(n.value.height*.9)}}),x=t.smoothMinimap?v.createSmoothPath(c):v.createStraightPath(c),k=[...c].slice(t.valueStart,t.valueEnd),R=t.smoothMinimap?v.createSmoothPath(k):v.createStraightPath(k);return{fullSet:x,selectionSet:R,sliced:k,firstPlot:c[t.valueStart],lastPlot:c[t.valueEnd-1]}}),m=e.computed(()=>({x:s.value*u.value+s.value/2,width:n.value.width*((r.value-u.value)/t.max)-s.value})),F=e.computed(()=>({left:0,color:t.textColor,fontSize:`${t.fontSize}px`,top:p.value?"28px":"-28px",pointerEvents:"none"})),I=e.computed(()=>({right:0,color:t.textColor,fontSize:`${t.fontSize}px`,top:p.value?"28px":"-28px",direction:"rtl",pointerEvents:"none"})),y=e.ref(t.minimapSelectedIndex);e.watch(()=>t.minimapSelectedIndex,a=>{y.value=a+t.valueStart},{immediate:!0});function P(a){y.value=a,a>=t.valueStart&&a<t.valueEnd&&h("trapMouse",a-t.valueStart)}return(a,o)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",W,[l.valueStart>0||l.valueEnd<l.max?(e.openBlock(),e.createElementBlock("div",j,[l.useResetSlot?e.renderSlot(a.$slots,"reset-action",{key:1,reset:E},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({top:p.value?"36px":"-16px",pointerEvents:"all !important"}),onClick:E},[e.createVNode(O.default,{name:"refresh",stroke:l.textColor},null,8,["stroke"])],4))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"double-range-slider",ref_key:"minimapWrapper",ref:g,style:{"z-index":"0"}},[p.value?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(v.XMLNS),viewBox:`0 0 ${n.value.width<0?0:n.value.width} ${n.value.height<0?0:n.value.height}`},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:b.value,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${l.minimapLineColor}50`},null,8,G),H],8,_)]),e.createElementVNode("path",{d:`M${d.value.fullSet}`,stroke:`${l.minimapLineColor}`,fill:"none","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"1"}},null,8,J),e.createElementVNode("rect",{x:m.value.x,width:m.value.width<0?0:m.value.width,height:n.value.height,y:0,fill:f.value,rx:l.minimapSelectionRadius,stroke:"none"},null,8,K),e.createElementVNode("path",{d:`M${s.value/2},${n.value.height} ${d.value.fullSet} L${n.value.width-s.value/2},${n.value.height}Z`,fill:`url(#${b.value})`,stroke:"none",style:{opacity:"1"}},null,8,Q),e.createElementVNode("rect",{x:m.value.x,width:m.value.width<0?0:m.value.width,height:n.value.height,y:0,rx:l.minimapSelectionRadius,fill:f.value},null,8,Y),e.createElementVNode("rect",{x:m.value.x,width:m.value.width<0?0:m.value.width,height:n.value.height,y:0,fill:l.minimapSelectedColor,rx:l.minimapSelectionRadius,style:e.normalizeStyle({opacity:l.minimapSelectedColorOpacity})},null,12,ee),e.createElementVNode("path",{d:`M${d.value.sliced[0].x},${n.value.height} ${d.value.selectionSet} L${d.value.sliced.at(-1).x},${n.value.height}Z`,fill:`url(#${b.value})`,stroke:"none",style:{opacity:"1"}},null,8,te),e.createElementVNode("path",{d:`M ${d.value.selectionSet}`,stroke:`${l.minimapLineColor}`,fill:"transparent","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,le),e.createElementVNode("circle",{cx:d.value.firstPlot.x,cy:d.value.firstPlot.y,"stroke-width":"0.5",stroke:f.value,r:"3",fill:l.minimapLineColor},null,8,ae),e.createElementVNode("circle",{cx:d.value.lastPlot.x,cy:d.value.lastPlot.y,"stroke-width":"0.5",stroke:f.value,r:"3",fill:l.minimapLineColor},null,8,ne),y.value!==null?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(N.value,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[y.value===i&&i>=l.valueStart&&i<l.valueEnd?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value*c+s.value/2,x2:s.value*c+s.value/2,y1:0,y2:n.value.height,stroke:l.minimapIndicatorColor,"stroke-linecap":"round","stroke-dasharray":"2","stroke-width":"1"},null,8,oe)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,c)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value*c,y:0,height:n.value.height,width:s.value<0?0:s.value,fill:"transparent",style:{"pointer-events":"all !important"},onMouseenter:x=>P(i),onMouseleave:o[0]||(o[0]=x=>{y.value=null,h("trapMouse",null)})},null,40,ie))),256))],8,Z))])):e.createCommentVNode("",!0),ue,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(V.value)},null,4),e.withDirectives(e.createElementVNode("input",{type:"range",class:"range-left",min:l.min,max:l.max,"onUpdate:modelValue":o[1]||(o[1]=i=>u.value=i),onInput:M},null,40,re),[[e.vModelText,u.value]]),e.createElementVNode("div",{class:"thumb-label thumb-label-left",style:e.normalizeStyle(F.value)},e.toDisplayString(l.labelLeft),5),e.withDirectives(e.createElementVNode("input",{type:"range",class:"range-right",min:l.min,max:l.max,"onUpdate:modelValue":o[2]||(o[2]=i=>r.value=i),onInput:L},null,40,se),[[e.vModelText,r.value]]),e.createElementVNode("div",{class:"thumb-label thumb-label-right",style:e.normalizeStyle(I.value)},e.toDisplayString(l.labelRight),5)],512)]))}},de=T._export_sfc(ce,[["__scopeId","data-v-a7172e39"]]);exports.Slicer=de;
|