@orchidui/dashboard 1.8.1-85 → 1.8.1-87
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.
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ref as o, watch as y, onMounted as g, openBlock as w, createElementBlock as S, normalizeStyle as _ } from "vue";
|
|
2
|
+
import x from "lottie-web";
|
|
3
|
+
const k = {
|
|
4
|
+
__name: "OcLottieAnimation",
|
|
5
|
+
props: {
|
|
6
|
+
path: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: !0
|
|
9
|
+
},
|
|
10
|
+
width: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
height: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
speed: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1
|
|
21
|
+
},
|
|
22
|
+
loop: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
autoplay: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ["error", "animation-item-changed"],
|
|
32
|
+
setup(c, { expose: d, emit: h }) {
|
|
33
|
+
const e = c, i = h, m = o({
|
|
34
|
+
scaleMode: "centerCrop",
|
|
35
|
+
clearCanvas: !0,
|
|
36
|
+
progressiveLoad: !1,
|
|
37
|
+
hideOnTransparent: !0
|
|
38
|
+
}), a = o(), l = o({
|
|
39
|
+
width: "100",
|
|
40
|
+
// in pixel
|
|
41
|
+
height: "100",
|
|
42
|
+
overflow: "hidden",
|
|
43
|
+
margin: "0 auto"
|
|
44
|
+
}), n = o(), s = o(), f = async (t) => {
|
|
45
|
+
const r = await fetch(t).catch(() => {
|
|
46
|
+
i("error");
|
|
47
|
+
});
|
|
48
|
+
r && (s.value = await r.json());
|
|
49
|
+
}, u = () => {
|
|
50
|
+
var t;
|
|
51
|
+
(t = a.value) == null || t.play();
|
|
52
|
+
}, v = () => {
|
|
53
|
+
var t;
|
|
54
|
+
(t = a.value) == null || t.stop();
|
|
55
|
+
}, p = async () => {
|
|
56
|
+
if (l.value = {
|
|
57
|
+
width: e.width !== -1 ? `${e.width}px` : "100%",
|
|
58
|
+
height: e.height !== -1 ? `${e.height}px` : "100%",
|
|
59
|
+
overflow: "hidden",
|
|
60
|
+
margin: "0 auto"
|
|
61
|
+
}, await f(e.path), a.value && a.value.destroy(), !n.value)
|
|
62
|
+
return;
|
|
63
|
+
const t = {
|
|
64
|
+
container: n.value,
|
|
65
|
+
renderer: "svg",
|
|
66
|
+
loop: e.loop,
|
|
67
|
+
autoplay: e.autoplay,
|
|
68
|
+
animationData: s.value,
|
|
69
|
+
rendererSettings: m.value
|
|
70
|
+
};
|
|
71
|
+
a.value = x.loadAnimation(t), i("animation-item-changed", a.value), a.value.setSpeed(e.speed), e.autoplay && u();
|
|
72
|
+
};
|
|
73
|
+
return y(() => e.path, p), g(p), d({
|
|
74
|
+
play: u,
|
|
75
|
+
stop: v
|
|
76
|
+
}), (t, r) => (w(), S("div", {
|
|
77
|
+
ref_key: "lottieContainerRef",
|
|
78
|
+
ref: n,
|
|
79
|
+
style: _(l.value)
|
|
80
|
+
}, null, 4));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
k as default
|
|
85
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var pt = Object.defineProperty;
|
|
|
2
2
|
var gt = (n, V, r) => V in n ? pt(n, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[V] = r;
|
|
3
3
|
var We = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
|
|
4
4
|
import { ref as v, computed as $e, openBlock as m, createBlock as X, unref as w, normalizeClass as Q, withCtx as W, createVNode as T, createCommentVNode as D, createSlots as vt, renderSlot as ze, createElementBlock as E, normalizeStyle as te, onMounted as Je, watch as fe, createElementVNode as h, Fragment as ge, renderList as Ke, toDisplayString as Fe, createTextVNode as ve, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as mt, withDirectives as ft, vShow as ht, defineComponent as bt, defineAsyncComponent as it } from "vue";
|
|
5
|
-
import { Q as Y, a as yt } from "./QuillEditor-
|
|
5
|
+
import { Q as Y, a as yt } from "./QuillEditor-Dbc8OdX7.js";
|
|
6
6
|
import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as xt, Select as Ze, Slider as Ae } from "@orchidui/core";
|
|
7
7
|
import { hslToRgb as et, hsl2Hex as tt, rgb2Hex as lt, rgbaToHex8 as kt, hexToRgb as je, rgbToHue as Qe, rgbToHsl as at, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
|
|
8
8
|
import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
|
|
@@ -1835,7 +1835,7 @@ const It = { key: 1 }, Vt = {
|
|
|
1835
1835
|
}), Ml = it(
|
|
1836
1836
|
() => import("./OcCodeBlock-chTpuRDc.js")
|
|
1837
1837
|
), Ul = it(
|
|
1838
|
-
() => import("./OcLottieAnimation-
|
|
1838
|
+
() => import("./OcLottieAnimation-C7OqxSEZ.js")
|
|
1839
1839
|
);
|
|
1840
1840
|
export {
|
|
1841
1841
|
Al as BarChart,
|