magtool 1.5.0 → 1.5.1
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.1.md +3 -0
- package/dist/component.js +3 -4
- package/dist/composition.js +52 -25
- package/dist/index.js +2 -3
- package/dist/store.js +640 -17
- package/dist/vendor.js +41999 -27
- package/package.json +1 -1
package/README.1.md
CHANGED
package/dist/component.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as M, openBlock as p, normalizeStyle as se, unref as t, createCommentVNode as B, createElementVNode as c, normalizeClass as G, renderSlot as H, toDisplayString as I, createVNode as N, markRaw as ve, resolveComponent as D, mergeProps as K, withCtx as _, resolveDirective as _e, withDirectives as be, createBlock as Y, withKeys as ye, createSlots as ee, Fragment as oe, renderList as le, createTextVNode as te, defineComponent as we, reactive as $e, onBeforeMount as Se, withModifiers as ie, resolveDynamicComponent as Ce, nextTick as pe } from "vue";
|
|
2
|
-
import { _ as ae } from "./vendor.js";
|
|
3
|
-
import { dayjs as ke, ElDatePicker as xe } from "element-plus";
|
|
2
|
+
import { _ as ae, d as ke, E as xe } from "./vendor.js";
|
|
4
3
|
import { u as Ve } from "./composition.js";
|
|
5
4
|
import me from "vuedraggable";
|
|
6
5
|
const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
|
|
@@ -3393,7 +3392,7 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
3393
3392
|
]);
|
|
3394
3393
|
};
|
|
3395
3394
|
}
|
|
3396
|
-
}),
|
|
3395
|
+
}), ql = {
|
|
3397
3396
|
Card: Me,
|
|
3398
3397
|
DatePicker: De,
|
|
3399
3398
|
EChart: je,
|
|
@@ -4298,5 +4297,5 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
|
|
|
4298
4297
|
default: Fl
|
|
4299
4298
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4300
4299
|
export {
|
|
4301
|
-
|
|
4300
|
+
ql as c
|
|
4302
4301
|
};
|
package/dist/composition.js
CHANGED
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ref as P, nextTick as g } from "vue";
|
|
2
|
+
import { i as h } from "./vendor.js";
|
|
3
|
+
function y({
|
|
4
|
+
afterComposition: e,
|
|
5
|
+
emit: r
|
|
6
|
+
}) {
|
|
7
|
+
const p = P(!1), d = (a) => {
|
|
8
|
+
r == null || r("compositionstart", a), p.value = !0;
|
|
9
|
+
}, o = (a) => {
|
|
10
|
+
var m;
|
|
11
|
+
r == null || r("compositionupdate", a);
|
|
12
|
+
const f = (m = a.target) == null ? void 0 : m.value, c = f[f.length - 1] || "";
|
|
13
|
+
p.value = !h(c);
|
|
14
|
+
}, s = (a) => {
|
|
15
|
+
r == null || r("compositionend", a), p.value && (p.value = !1, g(() => e(a)));
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
isComposing: p,
|
|
19
|
+
handleComposition: (a) => {
|
|
20
|
+
a.type === "compositionend" ? s(a) : o(a);
|
|
21
|
+
},
|
|
22
|
+
handleCompositionStart: d,
|
|
23
|
+
handleCompositionUpdate: o,
|
|
24
|
+
handleCompositionEnd: s
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const M = ({ columns: e, data: r, currency: p = "", channel: d = "" }) => {
|
|
28
|
+
if (!r.length || !e.length)
|
|
3
29
|
return [];
|
|
4
30
|
const o = {
|
|
5
31
|
spend: {
|
|
6
32
|
prop: "spend",
|
|
7
|
-
prefix:
|
|
33
|
+
prefix: p,
|
|
8
34
|
format: (t) => window.$fa(t, 2)
|
|
9
35
|
},
|
|
10
36
|
taps: {
|
|
@@ -35,7 +61,7 @@ const C = ({ columns: i, data: e, currency: l = "", channel: P = "" }) => {
|
|
|
35
61
|
prop: "revenue",
|
|
36
62
|
format: (t) => window.$fa(t, 2)
|
|
37
63
|
}
|
|
38
|
-
}, s = [],
|
|
64
|
+
}, s = [], n = {
|
|
39
65
|
avgCPT: {},
|
|
40
66
|
avgCPA: {},
|
|
41
67
|
avgCPM: {},
|
|
@@ -45,35 +71,36 @@ const C = ({ columns: i, data: e, currency: l = "", channel: P = "" }) => {
|
|
|
45
71
|
mmpInstalls: {},
|
|
46
72
|
mmpCPI: {}
|
|
47
73
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}),
|
|
74
|
+
e.forEach((t, i) => {
|
|
75
|
+
n[t.property] && (n[t.property].i = i);
|
|
76
|
+
const u = o[t.property];
|
|
77
|
+
if (u) {
|
|
78
|
+
u.i = i;
|
|
79
|
+
let l = window.$bigNumber(0);
|
|
80
|
+
r.forEach((v) => {
|
|
81
|
+
l = l.plus(v[t.property] || 0);
|
|
82
|
+
}), l = l.toNumber(), u.total = l, s.push(l);
|
|
57
83
|
} else
|
|
58
84
|
s.push("");
|
|
59
85
|
}), Object.keys(o).forEach((t) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
86
|
+
const i = o[t];
|
|
87
|
+
i.format && s[i.i] && (s[i.i] = i.format(s[i.i]));
|
|
62
88
|
});
|
|
63
89
|
const m = o.taps.total ? window.$fa(o.spend.total / o.taps.total) : "0.00";
|
|
64
|
-
s[
|
|
90
|
+
s[n.avgCPT.i] = m;
|
|
65
91
|
const f = o.installs.total ? window.$fa(o.spend.total / o.installs.total) : "0.00";
|
|
66
|
-
if (s[
|
|
92
|
+
if (s[n.avgCPA.i] = f, n.avgCPM.i !== void 0) {
|
|
67
93
|
const t = o.impressions.total ? window.$fa(o.spend.total / (o.impressions.total / 1e3)) : "0.00";
|
|
68
|
-
s[
|
|
94
|
+
s[n.avgCPM.i] = t;
|
|
69
95
|
}
|
|
70
|
-
const
|
|
71
|
-
s[
|
|
72
|
-
const
|
|
73
|
-
s[
|
|
74
|
-
const
|
|
75
|
-
return s[
|
|
96
|
+
const c = o.taps.total ? window.$fa(o.installs.total / o.taps.total * 100) : "0.00";
|
|
97
|
+
s[n.cr.i] = c;
|
|
98
|
+
const w = o.impressions.total ? window.$fa(o.taps.total / o.impressions.total * 100) : "0.00";
|
|
99
|
+
s[n.ttr.i] = w;
|
|
100
|
+
const C = o.impressions.total ? window.$fa(o.installs.total * 1e3 / o.impressions.total) : "0.00";
|
|
101
|
+
return s[n.IPM.i] = C, s;
|
|
76
102
|
};
|
|
77
103
|
export {
|
|
78
|
-
|
|
104
|
+
y as a,
|
|
105
|
+
M as u
|
|
79
106
|
};
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,10 @@ import "markdown-it";
|
|
|
3
3
|
import "echarts";
|
|
4
4
|
import "bignumber.js";
|
|
5
5
|
import "./util.js";
|
|
6
|
-
import "element-plus";
|
|
7
6
|
import "./directive.js";
|
|
8
7
|
import "./store.js";
|
|
9
8
|
import "./component.js";
|
|
10
|
-
import {
|
|
9
|
+
import { p as l } from "./vendor.js";
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
l as default
|
|
13
12
|
};
|