@antscorp/antsomi-genai 1.0.4 → 1.0.5
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/{Component-ydRxUGBj.mjs → Component--KzolcRU.mjs} +10 -10
- package/dist/{Component-cIhr0XF8.mjs → Component-Bg7PzEBB.mjs} +3 -3
- package/dist/{Component-BtOlYW3V.mjs → Component-CN-AMST4.mjs} +7 -7
- package/dist/{Component-Cs1Q5_4Z.mjs → Component-CoW24ow-.mjs} +6 -6
- package/dist/{Component-BfYdR2OG.mjs → Component-CzH5EgOj.mjs} +8 -8
- package/dist/{Component-DFkXgjdO.mjs → Component-DarcXeIc.mjs} +26 -26
- package/dist/{Component-B5BdubLB.mjs → Component-DoSDq28u.mjs} +22 -22
- package/dist/{Component-BMh2NjoG.mjs → Component-Dv2H0qJ3.mjs} +1 -1
- package/dist/{Component-D3IQ3b1e.mjs → Component-DwIeIQby.mjs} +11 -11
- package/dist/{Component-jz5SxZrw.mjs → Component-jxzLrwSg.mjs} +3 -3
- package/dist/{index-xRiS8mAv.mjs → index-B5FlA5oB.mjs} +1 -1
- package/dist/{index-uuxjgmdq.mjs → index-BK7-wFSV.mjs} +2 -2
- package/dist/{index-B8aoEnXh.mjs → index-BV_QoEjo.mjs} +2 -2
- package/dist/{index-BEEl4Oav.mjs → index-BzHLOt-B.mjs} +3 -3
- package/dist/{index-BMMEF6Aa.mjs → index-CCEDfVnz.mjs} +16 -16
- package/dist/{index-D4vz-jRA.mjs → index-CEz_Z0fl.mjs} +4716 -4708
- package/dist/index-CVMbh8iI.mjs +5 -0
- package/dist/{index-DznvLL2L.mjs → index-CarnzPnA.mjs} +3 -3
- package/dist/index-Csphv9Z3.mjs +5 -0
- package/dist/{index-BKRp_b-R.mjs → index-DwnQQMA7.mjs} +1 -1
- package/dist/{index-DRw3mwoe.mjs → index-Dww5HZFT.mjs} +2 -2
- package/dist/{index-Dl-606ht.mjs → index-hNX6BoDQ.mjs} +3 -3
- package/dist/{index-Kxt8Aex_.mjs → index-ldLt9G4X.mjs} +1 -1
- package/dist/index.d.ts +86 -86
- package/dist/index.es.js +1 -1
- package/dist/main.css +1 -1
- package/dist/{useGetSchema-eOp9PT4q.mjs → useGetSchema-B6kbWJSC.mjs} +1 -1
- package/package.json +1 -1
- package/dist/index-Diw3uKxZ.mjs +0 -5
- package/dist/index-UbCk3cXH.mjs +0 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Report as N } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as z } from "@antscorp/antsomi-ui";
|
|
3
|
-
import g, { forwardRef as C, useState as
|
|
4
|
-
import { u as
|
|
5
|
-
import { i as
|
|
6
|
-
import { a as I, j as f, v as j,
|
|
3
|
+
import g, { forwardRef as C, useState as v, useEffect as b, useMemo as w } from "react";
|
|
4
|
+
import { u as y } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { i as E } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { a as I, j as f, v as j, a7 as L, a8 as F, U as V } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
const S = C((a, o) => {
|
|
8
8
|
const { width: s, height: e } = I(a);
|
|
9
9
|
return f.jsx("svg", { viewBox: "0 0 32 32", fill: "currentColor", ...a, ref: o, width: s, height: e, children: f.jsx("g", { transform: "scale(0.03125 0.03125)", children: f.jsx("path", { d: "M389.74 204.8v80.64h270.72l-476.16 476.16 57.6 57.6 476.16-476.16v270.72h80.64v-408.96z" }) }) });
|
|
@@ -59,24 +59,24 @@ const S = C((a, o) => {
|
|
|
59
59
|
const { nodeViewProps: o } = a, {
|
|
60
60
|
extension: { options: s },
|
|
61
61
|
node: e
|
|
62
|
-
} = o, [r, i] =
|
|
63
|
-
|
|
62
|
+
} = o, [r, i] = v(""), [h, m] = v(0), [d, p] = v();
|
|
63
|
+
b(() => {
|
|
64
64
|
const { messageId: x, dataSourceId: D } = j({
|
|
65
65
|
messageId: F(),
|
|
66
66
|
dataSourceId: L()
|
|
67
67
|
}).parse(s);
|
|
68
|
-
p(
|
|
68
|
+
p(E.parse(e.attrs)), i(x), m(D);
|
|
69
69
|
}, [e.attrs, s]);
|
|
70
|
-
const { data: u, dataSourceSchema: t, isLoading: l, error: c } =
|
|
70
|
+
const { data: u, dataSourceSchema: t, isLoading: l, error: c } = y({
|
|
71
71
|
id: r,
|
|
72
72
|
attrs: d,
|
|
73
73
|
dataSourceId: h,
|
|
74
74
|
enabled: !!d
|
|
75
|
-
}), n =
|
|
75
|
+
}), n = w(() => d && t ? V.nodeView.report.attrsToCompSetting({
|
|
76
76
|
dataSourceSchema: t,
|
|
77
77
|
attrs: d
|
|
78
78
|
}) : null, [d, t]);
|
|
79
|
-
return { data:
|
|
79
|
+
return { data: w(() => u && n ? M({
|
|
80
80
|
data: u,
|
|
81
81
|
settings: n
|
|
82
82
|
}) : null, [u, n])?.data, settings: n, isLoading: l, error: c };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getSizeOfText as ce, Report as ue } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as me } from "@antscorp/antsomi-ui";
|
|
3
3
|
import { useState as Z, useEffect as fe, useMemo as ee } from "react";
|
|
4
|
-
import { u as ge } from "./useGetSchema-
|
|
5
|
-
import { c as he } from "./index-
|
|
6
|
-
import { a1 as pe, U as h, x as de, a6 as te, v as ve,
|
|
4
|
+
import { u as ge } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { c as he } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { a1 as pe, U as h, x as de, a6 as te, v as ve, a7 as ye, a8 as De } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
import { t as E } from "./toNumber-CHl49cGq.mjs";
|
|
8
8
|
function W(...y) {
|
|
9
9
|
return pe(y);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Report as I } from "@antscorp/antsomi-charts";
|
|
2
|
-
import { Spin as
|
|
3
|
-
import { useState as f, useEffect as
|
|
4
|
-
import { u as C } from "./useGetSchema-
|
|
5
|
-
import { j as D } from "./index-
|
|
6
|
-
import { U as h, v as N,
|
|
2
|
+
import { Spin as M } from "@antscorp/antsomi-ui";
|
|
3
|
+
import { useState as f, useEffect as E, useMemo as V } from "react";
|
|
4
|
+
import { u as C } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { j as D } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { U as h, v as N, a7 as R, a8 as b } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
const y = (o) => {
|
|
8
8
|
const { data: i, settings: a } = o, s = h.helpers.safeParseListField(a.metric), n = (a.renderMetric ? h.helpers.safeParseListField(a.renderMetric) : s).at(0), u = [];
|
|
9
9
|
for (const d of i.rows) {
|
|
@@ -46,7 +46,7 @@ const y = (o) => {
|
|
|
46
46
|
dataSourceId: u,
|
|
47
47
|
enabled: !!t
|
|
48
48
|
});
|
|
49
|
-
|
|
49
|
+
E(() => {
|
|
50
50
|
const { messageId: g, dataSourceId: w } = N({
|
|
51
51
|
messageId: b(),
|
|
52
52
|
dataSourceId: R()
|
|
@@ -73,7 +73,7 @@ const y = (o) => {
|
|
|
73
73
|
const { chartWrapperSize: i, renderDropdownAction: a } = o, { data: s, settings: c, isLoading: n } = P({
|
|
74
74
|
nodeViewProps: o
|
|
75
75
|
});
|
|
76
|
-
return n || !s || !c ? /* @__PURE__ */ React.createElement(
|
|
76
|
+
return n || !s || !c ? /* @__PURE__ */ React.createElement(M, { indicatorSize: 20 }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
77
77
|
I.SunburstChart,
|
|
78
78
|
{
|
|
79
79
|
data: s,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Report as V } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as z } from "@antscorp/antsomi-ui";
|
|
3
|
-
import { useState as T, useEffect as
|
|
4
|
-
import { u as D } from "./useGetSchema-
|
|
5
|
-
import { h as Y } from "./index-
|
|
6
|
-
import {
|
|
3
|
+
import { useState as T, useEffect as C, useMemo as E } from "react";
|
|
4
|
+
import { u as D } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { h as Y } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { a9 as M, U as A, ae as v, ag as R, v as L, a7 as X, a8 as G } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
function N(p, y, l) {
|
|
8
8
|
const { rows: n = [] } = p, i = [];
|
|
9
9
|
for (const o of n) {
|
|
@@ -100,13 +100,13 @@ const P = (p) => {
|
|
|
100
100
|
dataSourceId: f,
|
|
101
101
|
enabled: !!t
|
|
102
102
|
});
|
|
103
|
-
return
|
|
103
|
+
return C(() => {
|
|
104
104
|
const { messageId: k, dataSourceId: m } = L({
|
|
105
105
|
messageId: G(),
|
|
106
106
|
dataSourceId: X()
|
|
107
107
|
}).parse(l);
|
|
108
108
|
g(Y.parse(n.attrs)), o(k), S(m);
|
|
109
|
-
}, [n.attrs, l]), { ...
|
|
109
|
+
}, [n.attrs, l]), { ...E(() => {
|
|
110
110
|
if (!(h && t && r))
|
|
111
111
|
return null;
|
|
112
112
|
const k = A.nodeView.report.attrsToCompSetting({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Report as L } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as M } from "@antscorp/antsomi-ui";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { u as _ } from "./useGetSchema-
|
|
5
|
-
import { g as z } from "./index-
|
|
6
|
-
import {
|
|
3
|
+
import { useState as P, useEffect as T, useMemo as O } from "react";
|
|
4
|
+
import { u as _ } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { g as z } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { ae as E, U as R, ac as H, af as F, v as G, a7 as K, a8 as U } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
function W(c) {
|
|
8
8
|
return c === null;
|
|
9
9
|
}
|
|
@@ -45,7 +45,7 @@ function Y(c) {
|
|
|
45
45
|
const a = t.aggregations.find((i) => i.name === e);
|
|
46
46
|
a?.value && (s = +a.value);
|
|
47
47
|
}
|
|
48
|
-
s = +
|
|
48
|
+
s = +E({
|
|
49
49
|
field: f,
|
|
50
50
|
value: s
|
|
51
51
|
}), typeof n[e] != "number" && (n[e] = 0), n[e] += s;
|
|
@@ -58,7 +58,7 @@ function Y(c) {
|
|
|
58
58
|
return;
|
|
59
59
|
o.dataType === "IMAGE" ? a = d[0] : o.dataType === "HYPERLINK" && (a = d[1]);
|
|
60
60
|
}
|
|
61
|
-
if (a =
|
|
61
|
+
if (a = E({
|
|
62
62
|
value: a,
|
|
63
63
|
field: o
|
|
64
64
|
}).toString(), a = H({
|
|
@@ -68,7 +68,7 @@ function Y(c) {
|
|
|
68
68
|
const d = t.aggregations.find((C) => C.name === e);
|
|
69
69
|
d?.value && (i = +d.value);
|
|
70
70
|
}
|
|
71
|
-
i = +
|
|
71
|
+
i = +E({
|
|
72
72
|
value: i,
|
|
73
73
|
field: f
|
|
74
74
|
}), h += i, typeof n[e] == "number" && (S = i / n[e] * 100);
|
|
@@ -97,7 +97,7 @@ const j = (c) => {
|
|
|
97
97
|
const { nodeViewProps: m } = c, {
|
|
98
98
|
extension: { options: u },
|
|
99
99
|
node: r
|
|
100
|
-
} = m, [l, I] =
|
|
100
|
+
} = m, [l, I] = P(""), [g, p] = P(0), [n, f] = P(), { data: e, dataSourceSchema: h, isLoading: v, error: w } = _({
|
|
101
101
|
id: l,
|
|
102
102
|
attrs: n,
|
|
103
103
|
dataSourceId: g,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Report as ee } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as te } from "@antscorp/antsomi-ui";
|
|
3
|
-
import { U as x, x as ae, b as ie, v as ne,
|
|
4
|
-
import { useState as
|
|
5
|
-
import { G as le, u as me } from "./useGetSchema-
|
|
3
|
+
import { U as x, x as ae, b as ie, v as ne, a7 as se, a8 as re, a9 as oe } from "./index-CEz_Z0fl.mjs";
|
|
4
|
+
import { useState as _, useEffect as q } from "react";
|
|
5
|
+
import { G as le, u as me } from "./useGetSchema-B6kbWJSC.mjs";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
7
|
import "@antscorp/antsomi-constants";
|
|
8
|
-
import { d as fe } from "./index-
|
|
8
|
+
import { d as fe } from "./index-CCEDfVnz.mjs";
|
|
9
9
|
function ce(T) {
|
|
10
10
|
const A = /D[0-9]+_/, O = (e) => e.aliasAggregation || e.aggregation || "", n = {
|
|
11
11
|
summary: 0,
|
|
@@ -16,11 +16,11 @@ function ce(T) {
|
|
|
16
16
|
}, { data: y, settings: C } = T, { style: B, dimension: k, breakdownDimension: P } = C, c = C.metric.map((e, i) => ({
|
|
17
17
|
...e,
|
|
18
18
|
key: `${e.name}_${i}`
|
|
19
|
-
})), { axes: H, showOtherBars: $ = !1, showOtherSeries: j = !1 } = B, K = H.mode || "double", M = P.length,
|
|
19
|
+
})), { axes: H, showOtherBars: $ = !1, showOtherSeries: j = !1 } = B, K = H.mode || "double", M = P.length, E = 6, N = 512;
|
|
20
20
|
let o = [], u = [];
|
|
21
|
-
const r = {},
|
|
21
|
+
const r = {}, L = [], w = [];
|
|
22
22
|
let U = 0, W = 0, X = [], h = B.maxBars;
|
|
23
|
-
const g = B.maxSeries ||
|
|
23
|
+
const g = B.maxSeries || E, { rows: Y } = y;
|
|
24
24
|
if (Y.length <= 0)
|
|
25
25
|
return { arrYAxis: [], data: [] };
|
|
26
26
|
const z = [];
|
|
@@ -31,13 +31,13 @@ function ce(T) {
|
|
|
31
31
|
for (let e = 0, i = y.rows.length; e < i; e++)
|
|
32
32
|
if (M && c[0].name) {
|
|
33
33
|
let t = y.rows[e].dimension.length;
|
|
34
|
-
if (t = t <
|
|
34
|
+
if (t = t < E ? t : E, typeof g == "number" && g > 0 && (t = +g < t ? g : t), F += t || 0, G = +t, F > N) {
|
|
35
35
|
R = e;
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
} else if (typeof y.rows[e].aggregations < "u") {
|
|
39
39
|
let t = y.rows[e].aggregations.length;
|
|
40
|
-
if (t = t <
|
|
40
|
+
if (t = t < E ? t : E, typeof g == "number" && g > 0 && (t = +g < t ? g : t), F += t || 0, G = +t, F > N) {
|
|
41
41
|
R = e;
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
@@ -101,17 +101,17 @@ function ce(T) {
|
|
|
101
101
|
value: V,
|
|
102
102
|
field: P[0]
|
|
103
103
|
}).toString();
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
|
|
104
|
+
const v = s.id.toString() || s.name.toString() && x.helpers.changeSpecialCharacterToSnake(s.name.toString()) || "";
|
|
105
|
+
if (v) {
|
|
106
|
+
L.indexOf(v) < 0 && L.length < N && (w.push(s), S && (L.push(v), o.push({
|
|
107
107
|
yAxisId: "",
|
|
108
|
-
name: `D${
|
|
108
|
+
name: `D${v}`,
|
|
109
109
|
label: V,
|
|
110
110
|
key: c[0].key,
|
|
111
111
|
isActive: !0
|
|
112
|
-
}), X = [...X, `D${
|
|
112
|
+
}), X = [...X, `D${v}`])), ++t;
|
|
113
113
|
const p = a[d] ? +a[d] : 0;
|
|
114
|
-
S && (l[`D${
|
|
114
|
+
S && (l[`D${v}`] = p), S || (D += p), (S || !S && j) && (p < 0 ? I += p : m += p);
|
|
115
115
|
}
|
|
116
116
|
}), j)
|
|
117
117
|
D && (l["D-1"] = D);
|
|
@@ -127,8 +127,8 @@ function ce(T) {
|
|
|
127
127
|
if (z.indexOf(a.name) >= 0) {
|
|
128
128
|
const S = a.name, V = O(a);
|
|
129
129
|
if (S && e.aggregations.length > 0) {
|
|
130
|
-
const
|
|
131
|
-
|
|
130
|
+
const v = e.aggregations.find((p) => p.name === S && V === p.aggregationType);
|
|
131
|
+
v?.value && (s = v.value[0] ? v.value[0] : 0);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
s = +x.helpers.convertValueFromDataType({
|
|
@@ -165,8 +165,8 @@ function ce(T) {
|
|
|
165
165
|
let D = I;
|
|
166
166
|
if (l + 1 < +h)
|
|
167
167
|
D = [...D, b];
|
|
168
|
-
else if (
|
|
169
|
-
for (const a of
|
|
168
|
+
else if (w.length > 0)
|
|
169
|
+
for (const a of w) {
|
|
170
170
|
const d = `D${a.id || a.name && x.helpers.changeSpecialCharacterToSnake(a.name.toString()) || ""}`;
|
|
171
171
|
i[d] = i[d] ? (+i[d] || 0) + (+b[d] || 0) : b[d] || 0;
|
|
172
172
|
}
|
|
@@ -251,7 +251,7 @@ function ce(T) {
|
|
|
251
251
|
return {
|
|
252
252
|
data: u,
|
|
253
253
|
arrYAxis: o,
|
|
254
|
-
arrDimensions:
|
|
254
|
+
arrDimensions: w,
|
|
255
255
|
isAllBarOnLeft: J,
|
|
256
256
|
isAllBarOnRight: Z,
|
|
257
257
|
coordinateAxis: f,
|
|
@@ -262,16 +262,16 @@ const ge = (T) => {
|
|
|
262
262
|
const { nodeViewProps: A } = T, {
|
|
263
263
|
extension: { options: O },
|
|
264
264
|
node: n
|
|
265
|
-
} = A, y = ie(), [C, B] =
|
|
265
|
+
} = A, y = ie(), [C, B] = _(""), [k, P] = _(0), [c, H] = _(), [$, j] = _(), [K, M] = _(), { data: E } = le.query({
|
|
266
266
|
dataSourceId: k,
|
|
267
267
|
auth: y
|
|
268
268
|
});
|
|
269
269
|
q(() => {
|
|
270
|
-
const { messageId: r, dataSourceId:
|
|
270
|
+
const { messageId: r, dataSourceId: L } = ne({
|
|
271
271
|
messageId: re(),
|
|
272
272
|
dataSourceId: se()
|
|
273
273
|
}).parse(O);
|
|
274
|
-
H(fe.parse(n.attrs)), B(r), P(
|
|
274
|
+
H(fe.parse(n.attrs)), B(r), P(L);
|
|
275
275
|
}, [n.attrs, O]);
|
|
276
276
|
const {
|
|
277
277
|
data: N,
|
|
@@ -284,14 +284,14 @@ const ge = (T) => {
|
|
|
284
284
|
enabled: !!c
|
|
285
285
|
});
|
|
286
286
|
return q(() => {
|
|
287
|
-
if (!(N && c &&
|
|
287
|
+
if (!(N && c && E))
|
|
288
288
|
return;
|
|
289
289
|
const r = x.nodeView.report.attrsToCompSetting({
|
|
290
|
-
dataSourceSchema:
|
|
290
|
+
dataSourceSchema: E,
|
|
291
291
|
attrs: c
|
|
292
292
|
});
|
|
293
293
|
M(r), j(ce({ data: N, settings: r }));
|
|
294
|
-
}, [N, c,
|
|
294
|
+
}, [N, c, E]), { data: $, settings: K, isLoading: o, error: u };
|
|
295
295
|
};
|
|
296
296
|
function xe(T) {
|
|
297
297
|
const { chartWrapperSize: A, renderDropdownAction: O } = T, { data: n, settings: y, isLoading: C } = ge({
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Report as I } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as T } from "@antscorp/antsomi-ui";
|
|
3
|
-
import { useState as u, useEffect as
|
|
4
|
-
import { u as
|
|
5
|
-
import { k as R } from "./index-
|
|
6
|
-
import { v as y,
|
|
3
|
+
import { useState as u, useEffect as V, useMemo as v } from "react";
|
|
4
|
+
import { u as E } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { k as R } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { v as y, a7 as A, a8 as D, U as M } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
function b(o = []) {
|
|
8
|
-
let
|
|
8
|
+
let n = o[0], r;
|
|
9
9
|
for (let e = 0; e < o.length; e++) {
|
|
10
10
|
const t = o[e];
|
|
11
|
-
(r == null || t < r) && (r = t,
|
|
11
|
+
(r == null || t < r) && (r = t, n = t);
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return n;
|
|
14
14
|
}
|
|
15
|
-
const l = (o,
|
|
15
|
+
const l = (o, n) => {
|
|
16
16
|
const r = [];
|
|
17
17
|
for (const e of o) {
|
|
18
18
|
const t = {
|
|
@@ -20,35 +20,35 @@ const l = (o, a) => {
|
|
|
20
20
|
nodes: []
|
|
21
21
|
};
|
|
22
22
|
if (Array.isArray(e.item))
|
|
23
|
-
for (const
|
|
24
|
-
|
|
23
|
+
for (const a of e.item)
|
|
24
|
+
a.aggregationType === "none" ? t[a.name] = a.value : t.aggregations = [
|
|
25
25
|
{
|
|
26
|
-
name:
|
|
27
|
-
type:
|
|
28
|
-
value:
|
|
26
|
+
name: a.name,
|
|
27
|
+
type: a.aggregationType,
|
|
28
|
+
value: a.value
|
|
29
29
|
}
|
|
30
30
|
];
|
|
31
31
|
e.nodes && (t.nodes = l(e.nodes)), r.push(t);
|
|
32
32
|
}
|
|
33
33
|
return r;
|
|
34
34
|
}, z = (o) => {
|
|
35
|
-
const { nodeViewProps:
|
|
35
|
+
const { nodeViewProps: n } = o, {
|
|
36
36
|
extension: { options: r },
|
|
37
37
|
node: e
|
|
38
|
-
} =
|
|
38
|
+
} = n, [t, a] = u(""), [d, p] = u(0), [s, f] = u(), { data: c, dataSourceSchema: m, isLoading: S, error: h } = E({
|
|
39
39
|
id: t,
|
|
40
40
|
attrs: s,
|
|
41
41
|
dataSourceId: d,
|
|
42
42
|
enabled: !!s
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
V(() => {
|
|
45
45
|
const { messageId: i, dataSourceId: w } = y({
|
|
46
46
|
messageId: D(),
|
|
47
47
|
dataSourceId: A()
|
|
48
48
|
}).parse(r);
|
|
49
|
-
f(R.parse(e.attrs)),
|
|
49
|
+
f(R.parse(e.attrs)), a(i), p(w);
|
|
50
50
|
}, [e.attrs, r]);
|
|
51
|
-
const g =
|
|
51
|
+
const g = v(() => {
|
|
52
52
|
if (!(c && s && m))
|
|
53
53
|
return null;
|
|
54
54
|
const i = M.nodeView.report.attrsToCompSetting({
|
|
@@ -62,17 +62,17 @@ const l = (o, a) => {
|
|
|
62
62
|
}, [c, s, m]);
|
|
63
63
|
return { data: g?.data, settings: g?.settings, isLoading: S, error: h };
|
|
64
64
|
}, { Treemap: N } = I, j = (o) => {
|
|
65
|
-
const { chartWrapperSize:
|
|
65
|
+
const { chartWrapperSize: n, renderDropdownAction: r } = o, { data: e, settings: t, isLoading: a } = z({
|
|
66
66
|
nodeViewProps: o
|
|
67
67
|
});
|
|
68
|
-
if (
|
|
68
|
+
if (a || !e || !t)
|
|
69
69
|
return /* @__PURE__ */ React.createElement(T, { indicatorSize: 20 });
|
|
70
|
-
const d = b([
|
|
70
|
+
const d = b([n?.width, 500]);
|
|
71
71
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
72
72
|
N,
|
|
73
73
|
{
|
|
74
74
|
levelToShow: t.levelToShow,
|
|
75
|
-
height:
|
|
75
|
+
height: n?.height,
|
|
76
76
|
width: d,
|
|
77
77
|
renderMetric: t.renderMetric,
|
|
78
78
|
dimension: t.dimension,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Report as B } from "@antscorp/antsomi-charts";
|
|
2
2
|
import { Spin as K } from "@antscorp/antsomi-ui";
|
|
3
3
|
import { useState as z, useEffect as q, useMemo as G } from "react";
|
|
4
|
-
import { u as J } from "./useGetSchema-
|
|
5
|
-
import { e as Z } from "./index-
|
|
6
|
-
import { U as f,
|
|
4
|
+
import { u as J } from "./useGetSchema-B6kbWJSC.mjs";
|
|
5
|
+
import { e as Z } from "./index-CCEDfVnz.mjs";
|
|
6
|
+
import { U as f, aa as Q, r as ee, v as te, a7 as ae, a8 as ne } from "./index-CEz_Z0fl.mjs";
|
|
7
7
|
function oe(l, a) {
|
|
8
8
|
const n = /* @__PURE__ */ Object.create(null);
|
|
9
9
|
for (let t = 0; t < l.length; t++) {
|
|
@@ -170,18 +170,18 @@ const re = (l) => {
|
|
|
170
170
|
let O = !1, k = 0;
|
|
171
171
|
const Y = A.aliasAggregation || A.aggregation || "", j = typeof b.cellId == "string" ? b.cellId.split(";") : "", _ = typeof j[1] == "string" ? j[1].split(">") : [];
|
|
172
172
|
t.some((M) => {
|
|
173
|
-
const U = s.every((V,
|
|
174
|
-
const
|
|
175
|
-
return `${M[x]}` === L[
|
|
176
|
-
}), X = g.every((V,
|
|
177
|
-
const
|
|
178
|
-
return `${M[x]}` === _[
|
|
173
|
+
const U = s.every((V, N) => {
|
|
174
|
+
const E = f.helpers.getInfoFieldToQuery({ field: V }), x = `${E.name}-${E.semantics.semanticType}-${E.aggregationType}`.toLowerCase();
|
|
175
|
+
return `${M[x]}` === L[N];
|
|
176
|
+
}), X = g.every((V, N) => {
|
|
177
|
+
const E = f.helpers.getInfoFieldToQuery({ field: V }), x = `${E.name}-${E.semantics.semanticType}-${E.aggregationType}`.toLowerCase();
|
|
178
|
+
return `${M[x]}` === _[N];
|
|
179
179
|
});
|
|
180
180
|
if (U && X) {
|
|
181
181
|
if (Array.isArray(M.aggregations) && M.aggregations.length > 0) {
|
|
182
182
|
let V = 0;
|
|
183
|
-
for (const
|
|
184
|
-
|
|
183
|
+
for (const N of M.aggregations)
|
|
184
|
+
N.name === A.name && N.type === Y && (V += +N.value);
|
|
185
185
|
return O = !0, k += V, k;
|
|
186
186
|
}
|
|
187
187
|
return O = !0, k += +M[A.name], k;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Spin as ow } from "@antscorp/antsomi-ui";
|
|
2
|
-
import {
|
|
2
|
+
import { ab as hi, K as ye, c as oe, U as gt, ac as gl, x as uw, ad as bl, a6 as sw, v as cw, a7 as lw, a8 as fw } from "./index-CEz_Z0fl.mjs";
|
|
3
3
|
import { t as He } from "./toNumber-CHl49cGq.mjs";
|
|
4
4
|
import * as qt from "react";
|
|
5
5
|
import M, { isValidElement as ft, Children as Qt, PureComponent as Lt, forwardRef as Hb, useRef as Mi, useImperativeHandle as hw, useState as br, useCallback as dw, useEffect as ja, useMemo as Lf, cloneElement as Pe, createElement as Kb, useContext as jt, createContext as or, Component as Vb } from "react";
|
|
6
|
-
import { u as pw } from "./useGetSchema-
|
|
7
|
-
import { f as vw } from "./index-
|
|
6
|
+
import { u as pw } from "./useGetSchema-B6kbWJSC.mjs";
|
|
7
|
+
import { f as vw } from "./index-CCEDfVnz.mjs";
|
|
8
8
|
var fo, Kh;
|
|
9
9
|
function Be() {
|
|
10
10
|
if (Kh) return fo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQueryClient as c, useMutation as d } from "@tanstack/react-query";
|
|
2
2
|
import "@antscorp/antsomi-constants";
|
|
3
|
-
import { r as u, p, U as m, d as y } from "./index-
|
|
3
|
+
import { r as u, p, U as m, d as y } from "./index-CEz_Z0fl.mjs";
|
|
4
4
|
const l = async (s) => {
|
|
5
5
|
const { messages: e = [], auth: t } = s, n = {
|
|
6
6
|
messages: u(e, [(r) => new Date(r.ctime)], ["asc"])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Typography as o } from "@antscorp/antsomi-ui";
|
|
2
|
-
import { M as n, c as p } from "./index-
|
|
3
|
-
import { u as c } from "./index-
|
|
2
|
+
import { M as n, c as p } from "./index-CEz_Z0fl.mjs";
|
|
3
|
+
import { u as c } from "./index-CCEDfVnz.mjs";
|
|
4
4
|
const l = "_helper_8v814_1", a = {
|
|
5
5
|
helper: l
|
|
6
6
|
}, y = () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Typography as c, Spin as n } from "@antscorp/antsomi-ui";
|
|
2
|
-
import { b as i, a4 as d, a5 as l, M as m } from "./index-
|
|
2
|
+
import { b as i, a4 as d, a5 as l, M as m } from "./index-CEz_Z0fl.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
import "@antscorp/antsomi-constants";
|
|
6
6
|
import "axios";
|
|
7
|
-
import { u } from "./index-
|
|
7
|
+
import { u } from "./index-CCEDfVnz.mjs";
|
|
8
8
|
const t = {
|
|
9
9
|
"selected-datasouce": "_selected-datasouce_to1y1_1",
|
|
10
10
|
"card-info": "_card-info_to1y1_6",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as We, n as Pt, O as hu, K as $t, L as uu, V as jt, W as Ht, X as Ut, Y as Zt, G as v, Z as ue, _ as Zu, $ as Je, a0 as Wt, a1 as Jt, a2 as Gt, a3 as Vt, c as Qt } from "./index-
|
|
1
|
+
import { M as We, n as Pt, O as hu, K as $t, L as uu, V as jt, W as Ht, X as Ut, Y as Zt, G as v, Z as ue, _ as Zu, $ as Je, a0 as Wt, a1 as Jt, a2 as Gt, a3 as Vt, c as Qt } from "./index-CEz_Z0fl.mjs";
|
|
2
2
|
import ge, { memo as Xt } from "react";
|
|
3
|
-
import "./index-
|
|
4
|
-
import { u as Ge, P as Yt, B as Kt, L as en, A as un, T as tn, S as nn, a as rn, H as sn, b as on } from "./index-
|
|
3
|
+
import "./index-hNX6BoDQ.mjs";
|
|
4
|
+
import { u as Ge, P as Yt, B as Kt, L as en, A as un, T as tn, S as nn, a as rn, H as sn, b as on } from "./index-CCEDfVnz.mjs";
|
|
5
5
|
const cn = () => {
|
|
6
6
|
const e = Ge((t) => t.message), u = Ge((t) => t.dynamicContent.charts.extra);
|
|
7
7
|
return e.content.type === We.chart && e.agentId === Pt.chart ? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Tooltip as X, Button as J, Alert as Q, Dropdown as ee, Suspense as V } from "@antscorp/antsomi-ui";
|
|
2
|
-
import { a as te, j as x, t as re, v as ne, w as L, x as ae, y as p, z as n, B as P, E as oe, N as k, c as H, F as ie, G as h, I as f, R as O, M as T } from "./index-
|
|
2
|
+
import { a as te, j as x, t as re, v as ne, w as L, x as ae, y as p, z as n, B as P, E as oe, N as k, c as H, F as ie, G as h, I as f, R as O, M as T } from "./index-CEz_Z0fl.mjs";
|
|
3
3
|
import m, { forwardRef as se, useContext as ce, useRef as v, useState as de, useCallback as _, useEffect as ue, Component as le, createElement as D, createContext as me, lazy as d, memo as pe } from "react";
|
|
4
|
-
import { a as he, u as fe, C as ge, b as Ae } from "./index-
|
|
4
|
+
import { a as he, u as fe, C as ge, b as Ae } from "./index-hNX6BoDQ.mjs";
|
|
5
5
|
import { createPortal as Re } from "react-dom";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
7
|
import "@antscorp/antsomi-constants";
|
|
@@ -350,7 +350,7 @@ function Ge(e) {
|
|
|
350
350
|
)), u())) : null;
|
|
351
351
|
}
|
|
352
352
|
const Ue = d(
|
|
353
|
-
() => import("./Component-
|
|
353
|
+
() => import("./Component-DarcXeIc.mjs").then((e) => ({ default: e.BarChartNodeView }))
|
|
354
354
|
), We = "barchart", wt = h.create({
|
|
355
355
|
name: We,
|
|
356
356
|
group: "block",
|
|
@@ -385,7 +385,7 @@ const Ue = d(
|
|
|
385
385
|
return C(Ue);
|
|
386
386
|
}
|
|
387
387
|
}), Ye = d(
|
|
388
|
-
() => import("./Component-
|
|
388
|
+
() => import("./Component-Dv2H0qJ3.mjs").then((e) => ({ default: e.NodeViewComponent }))
|
|
389
389
|
), Fe = "datasourceSelect";
|
|
390
390
|
h.create({
|
|
391
391
|
name: Fe,
|
|
@@ -412,7 +412,7 @@ h.create({
|
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
const Ke = d(
|
|
415
|
-
() => import("./Component-
|
|
415
|
+
() => import("./Component-DwIeIQby.mjs").then((e) => ({ default: e.HeatmapNodeView }))
|
|
416
416
|
), Ze = "heatmap", bt = h.create({
|
|
417
417
|
name: Ze,
|
|
418
418
|
group: "block",
|
|
@@ -449,7 +449,7 @@ const Ke = d(
|
|
|
449
449
|
return C(Ke);
|
|
450
450
|
}
|
|
451
451
|
}), $e = d(
|
|
452
|
-
() => import("./Component-
|
|
452
|
+
() => import("./Component-jxzLrwSg.mjs").then((e) => ({ default: e.LineChartNodeView }))
|
|
453
453
|
), qe = "linechart", Nt = h.create({
|
|
454
454
|
name: qe,
|
|
455
455
|
group: "block",
|
|
@@ -484,7 +484,7 @@ const Ke = d(
|
|
|
484
484
|
return C($e);
|
|
485
485
|
}
|
|
486
486
|
}), Xe = d(
|
|
487
|
-
() => import("./Component-
|
|
487
|
+
() => import("./Component-CzH5EgOj.mjs").then((e) => ({ default: e.PieChartNodeView }))
|
|
488
488
|
), Je = "piechart", Tt = h.create({
|
|
489
489
|
name: Je,
|
|
490
490
|
group: "block",
|
|
@@ -519,7 +519,7 @@ const Ke = d(
|
|
|
519
519
|
return C(Xe);
|
|
520
520
|
}
|
|
521
521
|
}), Qe = d(
|
|
522
|
-
() => import("./Component-
|
|
522
|
+
() => import("./Component-CoW24ow-.mjs").then((e) => ({ default: e.ScatterChartNodeView }))
|
|
523
523
|
), et = "scatterchart", Ht = h.create({
|
|
524
524
|
name: et,
|
|
525
525
|
group: "block",
|
|
@@ -556,7 +556,7 @@ const Ke = d(
|
|
|
556
556
|
return C(Qe);
|
|
557
557
|
}
|
|
558
558
|
}), tt = d(
|
|
559
|
-
() => import("./Component
|
|
559
|
+
() => import("./Component--KzolcRU.mjs").then((e) => ({ default: e.ScoreCardNodeView }))
|
|
560
560
|
), rt = "scorecard", Vt = h.create({
|
|
561
561
|
name: rt,
|
|
562
562
|
group: "block",
|
|
@@ -590,7 +590,7 @@ const Ke = d(
|
|
|
590
590
|
return C(tt);
|
|
591
591
|
}
|
|
592
592
|
}), nt = d(
|
|
593
|
-
() => import("./Component-
|
|
593
|
+
() => import("./Component-CN-AMST4.mjs").then((e) => ({ default: e.SunburstChartNodeView }))
|
|
594
594
|
), at = "sunburstchart", Mt = h.create({
|
|
595
595
|
name: at,
|
|
596
596
|
group: "block",
|
|
@@ -625,7 +625,7 @@ const Ke = d(
|
|
|
625
625
|
return C(nt);
|
|
626
626
|
}
|
|
627
627
|
}), ot = d(
|
|
628
|
-
() => import("./Component-
|
|
628
|
+
() => import("./Component-DoSDq28u.mjs").then((e) => ({ default: e.TreemapNodeView }))
|
|
629
629
|
), it = "treemap", xt = h.create({
|
|
630
630
|
name: it,
|
|
631
631
|
group: "block",
|
|
@@ -677,7 +677,7 @@ const Ke = d(
|
|
|
677
677
|
))
|
|
678
678
|
);
|
|
679
679
|
}, t), st = d(
|
|
680
|
-
() => import("./Component-
|
|
680
|
+
() => import("./Component-Bg7PzEBB.mjs").then((e) => ({ default: e.AreaChartNodeView }))
|
|
681
681
|
), ct = "areachart", yt = h.create({
|
|
682
682
|
name: ct,
|
|
683
683
|
group: "block",
|
|
@@ -715,13 +715,13 @@ const Ke = d(
|
|
|
715
715
|
}), dt = "_content_xalxb_1", ut = {
|
|
716
716
|
content: dt
|
|
717
717
|
}, lt = d(
|
|
718
|
-
() => import("./index-
|
|
718
|
+
() => import("./index-CarnzPnA.mjs").then((e) => ({ default: e.RequestDatasouce }))
|
|
719
719
|
), mt = d(
|
|
720
|
-
() => import("./index-
|
|
720
|
+
() => import("./index-BzHLOt-B.mjs").then((e) => ({ default: e.TextualContent }))
|
|
721
721
|
), pt = d(
|
|
722
|
-
() => import("./index-
|
|
722
|
+
() => import("./index-BV_QoEjo.mjs").then((e) => ({ default: e.SelectedDataSource }))
|
|
723
723
|
), ht = d(
|
|
724
|
-
() => import("./index-
|
|
724
|
+
() => import("./index-BK7-wFSV.mjs").then((e) => ({ default: e.HelperContent }))
|
|
725
725
|
), B = pe((e) => {
|
|
726
726
|
const { className: t } = e, r = Ee((i) => i.message.content.type), a = () => {
|
|
727
727
|
switch (r) {
|