@sisense/sdk-ui-preact 1.27.0 → 1.27.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/dist/ai.cjs +70 -70
- package/dist/ai.js +93 -93
- package/dist/index.cjs +51 -51
- package/dist/index.js +268 -268
- package/dist/useQuery-DOgANgSI-665e9a0c.cjs +1185 -0
- package/dist/{useQuery-BWxPQevB-5efe621a.js → useQuery-DOgANgSI-6bbcaeca.js} +48683 -48150
- package/package.json +3 -3
- package/dist/useQuery-BWxPQevB-0c7be3e1.cjs +0 -1152
package/dist/ai.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aT as be, aB as je, dC as mt, bf as xt, b1 as Te, aD as ft, dD as kt, bz as wt,
|
|
1
|
+
import { aT as be, aB as je, dC as mt, bf as xt, b1 as Te, aD as ft, dD as kt, bz as wt, v as _t, d as se, dE as Ct, dF as yt, C as $, u as Y, dG as He, P as b, a4 as vt, G as ye, s as h, w as L, aC as Ye, dH as Mt, t as qe, $ as Ue, f as Be, Z as f, h as a, O as _, m as T, ag as Dt, dI as It, ae as At, F as q, dJ as St, q as z, E as me, dK as Lt, ar as Nt, ac as jt, br as Q, x as I, ao as Pe, p as M, _ as F, W as fe, dL as Tt, V as zt, a1 as ke, b8 as Et, a2 as K, bv as Zt, dM as Rt, ay as $e, K as Ot, cD as Wt, dN as ee, ce as ne, dO as Gt, dP as Ht, dQ as Qe, dR as Yt, dS as qt, bG as Ut, bH as Bt, dd as Pt, dT as $t, dU as Qt, dV as Ft, bZ as Vt, cd as Jt, dW as Xt, cb as Fe, J as Kt, Q as ea, dX as ta, c9 as aa } from "./useQuery-DOgANgSI-6bbcaeca.js";
|
|
2
2
|
var ra = Object.defineProperty, ze = Object.getOwnPropertySymbols, ia = Object.prototype.hasOwnProperty, oa = Object.prototype.propertyIsEnumerable, Ee = (e, t, r) => t in e ? ra(e, t, {
|
|
3
3
|
enumerable: !0,
|
|
4
4
|
configurable: !0,
|
|
@@ -82,21 +82,21 @@ const da = (e) => ({
|
|
|
82
82
|
name: p.name
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
const
|
|
85
|
+
const C = Ve(m);
|
|
86
86
|
if (m.panel === "measures")
|
|
87
87
|
return {
|
|
88
|
-
column:
|
|
88
|
+
column: C,
|
|
89
89
|
sortType: "sortNone"
|
|
90
90
|
};
|
|
91
|
-
if (ft(
|
|
91
|
+
if (ft(C.type)) {
|
|
92
92
|
const x = (u = (g = m.format) == null ? void 0 : g.mask) == null ? void 0 : u[m.jaql.level];
|
|
93
93
|
if (x)
|
|
94
94
|
return {
|
|
95
|
-
column:
|
|
95
|
+
column: C,
|
|
96
96
|
dateFormat: x
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return C;
|
|
100
100
|
}) : s, n;
|
|
101
101
|
}, {});
|
|
102
102
|
switch (i) {
|
|
@@ -193,8 +193,8 @@ const da = (e) => ({
|
|
|
193
193
|
}
|
|
194
194
|
}, {
|
|
195
195
|
metadataColumns: m,
|
|
196
|
-
metadataFilters:
|
|
197
|
-
} = ba(n), x = ua(
|
|
196
|
+
metadataFilters: C
|
|
197
|
+
} = ba(n), x = ua(C), {
|
|
198
198
|
dataOptions: k,
|
|
199
199
|
chartStyleOptions: N
|
|
200
200
|
} = ga(m, p, r), E = le(le({}, N), u);
|
|
@@ -254,11 +254,11 @@ var xa = Object.defineProperty, fa = Object.defineProperties, ka = Object.getOwn
|
|
|
254
254
|
d((r = r.apply(e, t)).next());
|
|
255
255
|
});
|
|
256
256
|
function _a(e) {
|
|
257
|
-
return
|
|
257
|
+
return Pt("MuiDialog", e);
|
|
258
258
|
}
|
|
259
|
-
const xe = _t("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), et = /* @__PURE__ */
|
|
259
|
+
const xe = _t("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), et = /* @__PURE__ */ ye({});
|
|
260
260
|
process.env.NODE_ENV !== "production" && (et.displayName = "DialogContext");
|
|
261
|
-
const
|
|
261
|
+
const Ca = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], ya = se(Ct, {
|
|
262
262
|
name: "MuiDialog",
|
|
263
263
|
slot: "Backdrop",
|
|
264
264
|
overrides: (e, t) => t.backdrop
|
|
@@ -274,11 +274,11 @@ const ya = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
274
274
|
fullScreen: l
|
|
275
275
|
} = e, n = {
|
|
276
276
|
root: ["root"],
|
|
277
|
-
container: ["container", `scroll${
|
|
278
|
-
paper: ["paper", `paperScroll${
|
|
277
|
+
container: ["container", `scroll${$(r)}`],
|
|
278
|
+
paper: ["paper", `paperScroll${$(r)}`, `paperWidth${$(String(i))}`, o && "paperFullWidth", l && "paperFullScreen"]
|
|
279
279
|
};
|
|
280
280
|
return Zt(n, _a, t);
|
|
281
|
-
}, Ma = se(
|
|
281
|
+
}, Ma = se(yt, {
|
|
282
282
|
name: "MuiDialog",
|
|
283
283
|
slot: "Root",
|
|
284
284
|
overridesResolver: (e, t) => t.root
|
|
@@ -294,7 +294,7 @@ const ya = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
294
294
|
const {
|
|
295
295
|
ownerState: r
|
|
296
296
|
} = e;
|
|
297
|
-
return [t.container, t[`scroll${
|
|
297
|
+
return [t.container, t[`scroll${$(r.scroll)}`]];
|
|
298
298
|
}
|
|
299
299
|
})(({
|
|
300
300
|
ownerState: e
|
|
@@ -327,7 +327,7 @@ const ya = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
327
327
|
const {
|
|
328
328
|
ownerState: r
|
|
329
329
|
} = e;
|
|
330
|
-
return [t.paper, t[`scrollPaper${
|
|
330
|
+
return [t.paper, t[`scrollPaper${$(r.scroll)}`], t[`paperWidth${$(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
|
|
331
331
|
}
|
|
332
332
|
})(({
|
|
333
333
|
theme: e,
|
|
@@ -396,35 +396,35 @@ const ya = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
396
396
|
disableEscapeKeyDown: g = !1,
|
|
397
397
|
fullScreen: u = !1,
|
|
398
398
|
fullWidth: m = !1,
|
|
399
|
-
maxWidth:
|
|
399
|
+
maxWidth: C = "sm",
|
|
400
400
|
onBackdropClick: x,
|
|
401
401
|
onClick: k,
|
|
402
402
|
onClose: N,
|
|
403
403
|
open: E,
|
|
404
|
-
PaperComponent:
|
|
404
|
+
PaperComponent: y = He,
|
|
405
405
|
PaperProps: O = {},
|
|
406
406
|
scroll: D = "paper",
|
|
407
407
|
TransitionComponent: J = Rt,
|
|
408
408
|
transitionDuration: S = o,
|
|
409
409
|
TransitionProps: re
|
|
410
|
-
} = r, he = At(r,
|
|
410
|
+
} = r, he = At(r, Ca), U = Y({}, r, {
|
|
411
411
|
disableEscapeKeyDown: g,
|
|
412
412
|
fullScreen: u,
|
|
413
413
|
fullWidth: m,
|
|
414
|
-
maxWidth:
|
|
414
|
+
maxWidth: C,
|
|
415
415
|
scroll: D
|
|
416
416
|
}), X = va(U), B = q(), ie = (w) => {
|
|
417
417
|
B.current = w.target === w.currentTarget;
|
|
418
418
|
}, W = (w) => {
|
|
419
419
|
k && k(w), B.current && (B.current = null, x && x(w), N && N(w, "backdropClick"));
|
|
420
|
-
},
|
|
421
|
-
titleId:
|
|
422
|
-
}), [
|
|
420
|
+
}, P = St(n), ue = z(() => ({
|
|
421
|
+
titleId: P
|
|
422
|
+
}), [P]);
|
|
423
423
|
return /* @__PURE__ */ a(Ma, Y({
|
|
424
424
|
className: me(X.root, p),
|
|
425
425
|
closeAfterTransition: !0,
|
|
426
426
|
components: {
|
|
427
|
-
Backdrop:
|
|
427
|
+
Backdrop: ya
|
|
428
428
|
},
|
|
429
429
|
componentsProps: {
|
|
430
430
|
backdrop: Y({
|
|
@@ -450,11 +450,11 @@ const ya = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
450
450
|
onMouseDown: ie,
|
|
451
451
|
ownerState: U,
|
|
452
452
|
children: /* @__PURE__ */ a(Ia, Y({
|
|
453
|
-
as:
|
|
453
|
+
as: y,
|
|
454
454
|
elevation: 24,
|
|
455
455
|
role: "dialog",
|
|
456
456
|
"aria-describedby": l,
|
|
457
|
-
"aria-labelledby":
|
|
457
|
+
"aria-labelledby": P
|
|
458
458
|
}, O, {
|
|
459
459
|
className: me(X.paper, O.className),
|
|
460
460
|
ownerState: U,
|
|
@@ -599,7 +599,7 @@ process.env.NODE_ENV !== "production" && (tt.propTypes = {
|
|
|
599
599
|
*/
|
|
600
600
|
TransitionProps: b.object
|
|
601
601
|
});
|
|
602
|
-
class Aa extends
|
|
602
|
+
class Aa extends $t {
|
|
603
603
|
constructor(t, r) {
|
|
604
604
|
super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
|
|
605
605
|
}
|
|
@@ -642,7 +642,7 @@ class Aa extends Pt {
|
|
|
642
642
|
})), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
643
643
|
}
|
|
644
644
|
updateResult() {
|
|
645
|
-
const t = this.currentMutation ? this.currentMutation.state :
|
|
645
|
+
const t = this.currentMutation ? this.currentMutation.state : Ft(), r = A(v({}, t), {
|
|
646
646
|
isLoading: t.status === "loading",
|
|
647
647
|
isSuccess: t.status === "success",
|
|
648
648
|
isError: t.status === "error",
|
|
@@ -675,7 +675,7 @@ function ve(e, t, r) {
|
|
|
675
675
|
const i = Gt(e, t), o = ee({
|
|
676
676
|
context: i.context
|
|
677
677
|
}), [l] = M(() => new Aa(o, i));
|
|
678
|
-
|
|
678
|
+
F(() => {
|
|
679
679
|
l.setOptions(i);
|
|
680
680
|
}, [l, i]);
|
|
681
681
|
const n = Ht(I((c) => l.subscribe(Qe.batchCalls(c)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), d = I((c, s) => {
|
|
@@ -724,7 +724,7 @@ const Na = new vt({
|
|
|
724
724
|
refetchOnMount: !1
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
}), at =
|
|
727
|
+
}), at = ye(void 0), Z = () => $e(at), ja = ({
|
|
728
728
|
children: e
|
|
729
729
|
}) => {
|
|
730
730
|
const {
|
|
@@ -753,7 +753,7 @@ const pe = (e, t = !0) => {
|
|
|
753
753
|
{
|
|
754
754
|
const u = Lt(e.dataSource), {
|
|
755
755
|
filters: m = [],
|
|
756
|
-
relations:
|
|
756
|
+
relations: C
|
|
757
757
|
} = Nt(e.filters), {
|
|
758
758
|
metadata: x,
|
|
759
759
|
filterRelations: k
|
|
@@ -762,7 +762,7 @@ const pe = (e, t = !0) => {
|
|
|
762
762
|
attributes: (p = e.dimensions) != null ? p : [],
|
|
763
763
|
measures: (g = e.measures) != null ? g : [],
|
|
764
764
|
filters: m,
|
|
765
|
-
filterRelations:
|
|
765
|
+
filterRelations: C,
|
|
766
766
|
highlights: []
|
|
767
767
|
}, !0);
|
|
768
768
|
return {
|
|
@@ -804,13 +804,13 @@ const pe = (e, t = !0) => {
|
|
|
804
804
|
enabled: r
|
|
805
805
|
} = t, i = wa(t, ["enabled"]);
|
|
806
806
|
return pe(i, r);
|
|
807
|
-
}, Ri =
|
|
807
|
+
}, Ri = Pe("useGetNlgQueryResult")(Ta), rt = Object.freeze({
|
|
808
808
|
enableFollowupQuestions: !1,
|
|
809
809
|
enableHeader: !0,
|
|
810
810
|
enableInsights: !0,
|
|
811
811
|
numOfRecommendations: 4,
|
|
812
812
|
numOfRecentPrompts: 5
|
|
813
|
-
}), it =
|
|
813
|
+
}), it = ye(v({}, rt)), R = () => $e(it), za = ({
|
|
814
814
|
children: e,
|
|
815
815
|
value: t
|
|
816
816
|
}) => {
|
|
@@ -855,7 +855,7 @@ const pe = (e, t = !0) => {
|
|
|
855
855
|
n && u();
|
|
856
856
|
}, [u, n])
|
|
857
857
|
};
|
|
858
|
-
}, Oi =
|
|
858
|
+
}, Oi = Pe("useGetQueryRecommendations")(ot), Me = "chatHistory", Ea = (e) => {
|
|
859
859
|
const t = Z(), {
|
|
860
860
|
hideHistory: r
|
|
861
861
|
} = R();
|
|
@@ -893,7 +893,7 @@ const pe = (e, t = !0) => {
|
|
|
893
893
|
} = Ea(e), {
|
|
894
894
|
mutate: o
|
|
895
895
|
} = nt(e);
|
|
896
|
-
return
|
|
896
|
+
return F(() => {
|
|
897
897
|
i && o();
|
|
898
898
|
}, [i, o]), {
|
|
899
899
|
history: t,
|
|
@@ -939,7 +939,7 @@ const pe = (e, t = !0) => {
|
|
|
939
939
|
}),
|
|
940
940
|
onSuccess: () => r.invalidateQueries(["getAllChats"])
|
|
941
941
|
});
|
|
942
|
-
return
|
|
942
|
+
return F(() => {
|
|
943
943
|
t && o.isIdle && o.mutate();
|
|
944
944
|
}, [t, o]), o;
|
|
945
945
|
}, Ra = (e, t) => {
|
|
@@ -1013,18 +1013,18 @@ const pe = (e, t = !0) => {
|
|
|
1013
1013
|
data: n,
|
|
1014
1014
|
isLoading: d
|
|
1015
1015
|
} = dt(), c = (t = o == null ? void 0 : o.find((D) => D.title === e)) == null ? void 0 : t.title, s = (r = n.find((D) => D.contextTitle === c)) == null ? void 0 : r.chatId, p = l || !!c, g = d || !!s, [u, m] = M(null), {
|
|
1016
|
-
isError:
|
|
1016
|
+
isError: C
|
|
1017
1017
|
} = Za(c, p && !g), {
|
|
1018
1018
|
history: x,
|
|
1019
1019
|
isLoading: k,
|
|
1020
1020
|
isError: N
|
|
1021
1021
|
} = lt(s);
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}, [
|
|
1022
|
+
F(() => {
|
|
1023
|
+
C ? m(new fe("ai.errors.chatUnavailable")) : N && m(new fe("ai.errors.fetchHistory"));
|
|
1024
|
+
}, [C, N, i]);
|
|
1025
1025
|
const {
|
|
1026
1026
|
mutate: E,
|
|
1027
|
-
isLoading:
|
|
1027
|
+
isLoading: y
|
|
1028
1028
|
} = Oa(s), O = z(() => {
|
|
1029
1029
|
if (x != null && x.length) {
|
|
1030
1030
|
const D = x[x.length - 1];
|
|
@@ -1038,7 +1038,7 @@ const pe = (e, t = !0) => {
|
|
|
1038
1038
|
history: x ?? [],
|
|
1039
1039
|
lastNlqResponse: O,
|
|
1040
1040
|
sendMessage: E,
|
|
1041
|
-
isAwaitingResponse:
|
|
1041
|
+
isAwaitingResponse: y,
|
|
1042
1042
|
isLoading: k,
|
|
1043
1043
|
lastError: u
|
|
1044
1044
|
};
|
|
@@ -1109,7 +1109,7 @@ const pe = (e, t = !0) => {
|
|
|
1109
1109
|
function Oe(e) {
|
|
1110
1110
|
return typeof e == "number" ? `${e}px` : e;
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function Pa({
|
|
1113
1113
|
spin: e
|
|
1114
1114
|
}) {
|
|
1115
1115
|
return /* @__PURE__ */ a("svg", {
|
|
@@ -1137,12 +1137,12 @@ function ge() {
|
|
|
1137
1137
|
return /* @__PURE__ */ a("div", {
|
|
1138
1138
|
className: "csdk-m-auto",
|
|
1139
1139
|
"aria-label": "loading spinner",
|
|
1140
|
-
children: /* @__PURE__ */ a(
|
|
1140
|
+
children: /* @__PURE__ */ a(Pa, {
|
|
1141
1141
|
spin: !0
|
|
1142
1142
|
})
|
|
1143
1143
|
});
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function $a({
|
|
1146
1146
|
theme: e
|
|
1147
1147
|
}) {
|
|
1148
1148
|
return /* @__PURE__ */ a("svg", {
|
|
@@ -1179,7 +1179,7 @@ function Qa({
|
|
|
1179
1179
|
})]
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
|
-
const
|
|
1182
|
+
const Fa = h.div`
|
|
1183
1183
|
display: flex;
|
|
1184
1184
|
flex-direction: column;
|
|
1185
1185
|
row-gap: 4px;
|
|
@@ -1224,7 +1224,7 @@ function Xa({
|
|
|
1224
1224
|
const [o, l] = M(!1), {
|
|
1225
1225
|
themeSettings: n
|
|
1226
1226
|
} = f();
|
|
1227
|
-
return /* @__PURE__ */ a(
|
|
1227
|
+
return /* @__PURE__ */ a(Fa, {
|
|
1228
1228
|
children: [/* @__PURE__ */ a(Va, {
|
|
1229
1229
|
onClick: () => l((d) => !d),
|
|
1230
1230
|
theme: n,
|
|
@@ -1294,7 +1294,7 @@ function tr({
|
|
|
1294
1294
|
} = f(), {
|
|
1295
1295
|
t: s
|
|
1296
1296
|
} = _(), p = d.length === 1;
|
|
1297
|
-
return /* @__PURE__ */ a(
|
|
1297
|
+
return /* @__PURE__ */ a(Fe, {
|
|
1298
1298
|
open: _e(l) && d.length > 0,
|
|
1299
1299
|
anchorEl: o,
|
|
1300
1300
|
placement: "top-start",
|
|
@@ -1443,14 +1443,14 @@ function cr({
|
|
|
1443
1443
|
s("");
|
|
1444
1444
|
return;
|
|
1445
1445
|
}
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
}, [r, e, c]), u = I((
|
|
1449
|
-
e(
|
|
1450
|
-
}, [e]), m = I((
|
|
1451
|
-
|
|
1452
|
-
}, [g, c]),
|
|
1453
|
-
d == null || d(
|
|
1446
|
+
const y = c.trim();
|
|
1447
|
+
y.length !== 0 && (e(y), s(""));
|
|
1448
|
+
}, [r, e, c]), u = I((y) => {
|
|
1449
|
+
e(y), s("");
|
|
1450
|
+
}, [e]), m = I((y) => {
|
|
1451
|
+
y.key === "Enter" ? (y.preventDefault(), g()) : y.key === "Escape" && _e(c) && s("");
|
|
1452
|
+
}, [g, c]), C = I((y) => {
|
|
1453
|
+
d == null || d(y.target.value), s(y.target.value);
|
|
1454
1454
|
}, [d]), x = q(null);
|
|
1455
1455
|
ne(() => {
|
|
1456
1456
|
x.current && (x.current.style.height = "inherit", x.current.style.height = `${Math.max(
|
|
@@ -1467,12 +1467,12 @@ function cr({
|
|
|
1467
1467
|
themeSettings: k
|
|
1468
1468
|
} = f(), {
|
|
1469
1469
|
t: N
|
|
1470
|
-
} = _(), E = I((
|
|
1470
|
+
} = _(), E = I((y) => {
|
|
1471
1471
|
var O;
|
|
1472
|
-
if ((O = document.getElementById("csdk-chatbot-frame")) != null && O.contains(
|
|
1472
|
+
if ((O = document.getElementById("csdk-chatbot-frame")) != null && O.contains(y.relatedTarget)) {
|
|
1473
1473
|
const D = (J) => {
|
|
1474
1474
|
var S;
|
|
1475
|
-
document.removeEventListener("mouseup", D), document.removeEventListener("keyup", D), J.type === "mouseup" && ((S = document.getSelection()) == null ? void 0 : S.type) !== "Range" &&
|
|
1475
|
+
document.removeEventListener("mouseup", D), document.removeEventListener("keyup", D), J.type === "mouseup" && ((S = document.getSelection()) == null ? void 0 : S.type) !== "Range" && y.target.focus({
|
|
1476
1476
|
preventScroll: !0
|
|
1477
1477
|
});
|
|
1478
1478
|
};
|
|
@@ -1505,7 +1505,7 @@ function cr({
|
|
|
1505
1505
|
maxLength: ar,
|
|
1506
1506
|
ref: x,
|
|
1507
1507
|
rows: 1,
|
|
1508
|
-
onChange:
|
|
1508
|
+
onChange: C,
|
|
1509
1509
|
spellCheck: "true",
|
|
1510
1510
|
placeholder: p,
|
|
1511
1511
|
value: c,
|
|
@@ -1518,7 +1518,7 @@ function cr({
|
|
|
1518
1518
|
theme: k,
|
|
1519
1519
|
children: /* @__PURE__ */ a("span", {
|
|
1520
1520
|
"data-state": "closed",
|
|
1521
|
-
children: /* @__PURE__ */ a(
|
|
1521
|
+
children: /* @__PURE__ */ a($a, {
|
|
1522
1522
|
theme: k
|
|
1523
1523
|
})
|
|
1524
1524
|
})
|
|
@@ -1983,7 +1983,7 @@ function _r() {
|
|
|
1983
1983
|
})
|
|
1984
1984
|
});
|
|
1985
1985
|
}
|
|
1986
|
-
function
|
|
1986
|
+
function Cr({
|
|
1987
1987
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
|
1988
1988
|
}) {
|
|
1989
1989
|
return /* @__PURE__ */ a("svg", {
|
|
@@ -2000,7 +2000,7 @@ function yr({
|
|
|
2000
2000
|
})
|
|
2001
2001
|
});
|
|
2002
2002
|
}
|
|
2003
|
-
const Ae = (e) => Ue(e.chart.backgroundColor),
|
|
2003
|
+
const Ae = (e) => Ue(e.chart.backgroundColor), yr = ({
|
|
2004
2004
|
title: e
|
|
2005
2005
|
}) => {
|
|
2006
2006
|
const {
|
|
@@ -2031,7 +2031,7 @@ const Ae = (e) => Ue(e.chart.backgroundColor), Cr = ({
|
|
|
2031
2031
|
onClick: i,
|
|
2032
2032
|
$hoverColor: Ae(l),
|
|
2033
2033
|
"aria-label": "three dots button",
|
|
2034
|
-
children: /* @__PURE__ */ a(
|
|
2034
|
+
children: /* @__PURE__ */ a(Cr, {
|
|
2035
2035
|
fill: l.chart.textColor
|
|
2036
2036
|
})
|
|
2037
2037
|
}), /* @__PURE__ */ a(ta, {
|
|
@@ -2098,7 +2098,7 @@ function Ir({
|
|
|
2098
2098
|
}], [t]);
|
|
2099
2099
|
return /* @__PURE__ */ a(Dr, {
|
|
2100
2100
|
"aria-label": "chatbot chart toolbar",
|
|
2101
|
-
children: [/* @__PURE__ */ a(
|
|
2101
|
+
children: [/* @__PURE__ */ a(yr, {
|
|
2102
2102
|
title: e ?? ""
|
|
2103
2103
|
}), /* @__PURE__ */ a(vr, {
|
|
2104
2104
|
items: i
|
|
@@ -2318,7 +2318,7 @@ function Er({
|
|
|
2318
2318
|
})]
|
|
2319
2319
|
}) : null;
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function Ce({
|
|
2322
2322
|
sourceId: e,
|
|
2323
2323
|
data: t,
|
|
2324
2324
|
type: r,
|
|
@@ -2446,14 +2446,14 @@ function Hr({
|
|
|
2446
2446
|
Gr(c) ? s = `an ${c}` : s = `a ${c}`, c !== "table" && (s += " chart");
|
|
2447
2447
|
const p = d.datasource.title, [g, u] = M(!1), m = I(() => {
|
|
2448
2448
|
u((k) => !k);
|
|
2449
|
-
}, []),
|
|
2449
|
+
}, []), C = {
|
|
2450
2450
|
jaql: {
|
|
2451
2451
|
datasource: d.datasource,
|
|
2452
2452
|
metadata: d.metadata
|
|
2453
2453
|
}
|
|
2454
2454
|
}, x = r === "analyze";
|
|
2455
2455
|
return /* @__PURE__ */ a(T, {
|
|
2456
|
-
children: [/* @__PURE__ */ a(
|
|
2456
|
+
children: [/* @__PURE__ */ a(Ce, {
|
|
2457
2457
|
sourceId: p,
|
|
2458
2458
|
data: e,
|
|
2459
2459
|
type: "chats/nlq",
|
|
@@ -2469,9 +2469,9 @@ function Hr({
|
|
|
2469
2469
|
content: e
|
|
2470
2470
|
})]
|
|
2471
2471
|
})
|
|
2472
|
-
}), i && /* @__PURE__ */ a(
|
|
2472
|
+
}), i && /* @__PURE__ */ a(Ce, {
|
|
2473
2473
|
sourceId: p,
|
|
2474
|
-
data:
|
|
2474
|
+
data: C,
|
|
2475
2475
|
type: "nlg/queryResult",
|
|
2476
2476
|
buttonVisibility: g ? "onHover" : "never",
|
|
2477
2477
|
renderContent: (k) => /* @__PURE__ */ a(T, {
|
|
@@ -2480,7 +2480,7 @@ function Hr({
|
|
|
2480
2480
|
onClick: m
|
|
2481
2481
|
}), k]
|
|
2482
2482
|
}), g && /* @__PURE__ */ a(Rr, {
|
|
2483
|
-
nlgRequest:
|
|
2483
|
+
nlgRequest: C
|
|
2484
2484
|
})]
|
|
2485
2485
|
})
|
|
2486
2486
|
})]
|
|
@@ -2543,7 +2543,7 @@ function ht({
|
|
|
2543
2543
|
})
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
|
-
function
|
|
2546
|
+
function Pr({
|
|
2547
2547
|
onClick: e,
|
|
2548
2548
|
color: t
|
|
2549
2549
|
}) {
|
|
@@ -2556,7 +2556,7 @@ function Fr({
|
|
|
2556
2556
|
})
|
|
2557
2557
|
});
|
|
2558
2558
|
}
|
|
2559
|
-
const
|
|
2559
|
+
const $r = h.button`
|
|
2560
2560
|
font-size: inherit;
|
|
2561
2561
|
line-height: inherit;
|
|
2562
2562
|
box-sizing: border-box;
|
|
@@ -2632,7 +2632,7 @@ function Ge({
|
|
|
2632
2632
|
const {
|
|
2633
2633
|
themeSettings: r
|
|
2634
2634
|
} = f();
|
|
2635
|
-
return /* @__PURE__ */ a(
|
|
2635
|
+
return /* @__PURE__ */ a($r, {
|
|
2636
2636
|
onClick: t,
|
|
2637
2637
|
theme: r,
|
|
2638
2638
|
children: e
|
|
@@ -2646,7 +2646,7 @@ const Qr = h.div`
|
|
|
2646
2646
|
theme: e
|
|
2647
2647
|
}) => e.aiChat.suggestions.gap};
|
|
2648
2648
|
`;
|
|
2649
|
-
function
|
|
2649
|
+
function Fr({
|
|
2650
2650
|
questions: e,
|
|
2651
2651
|
onSelection: t
|
|
2652
2652
|
}) {
|
|
@@ -2722,7 +2722,7 @@ function Kr({
|
|
|
2722
2722
|
children: [o && /* @__PURE__ */ a(H, {
|
|
2723
2723
|
align: "left",
|
|
2724
2724
|
children: o
|
|
2725
|
-
}), /* @__PURE__ */ a(
|
|
2725
|
+
}), /* @__PURE__ */ a(Fr, {
|
|
2726
2726
|
onSelection: r,
|
|
2727
2727
|
questions: e
|
|
2728
2728
|
})]
|
|
@@ -2885,7 +2885,7 @@ const ni = (e, t) => {
|
|
|
2885
2885
|
isVisible: e,
|
|
2886
2886
|
onClick: t,
|
|
2887
2887
|
anchorElement: r
|
|
2888
|
-
}) => /* @__PURE__ */ a(
|
|
2888
|
+
}) => /* @__PURE__ */ a(Fe, {
|
|
2889
2889
|
anchorEl: r,
|
|
2890
2890
|
open: e,
|
|
2891
2891
|
placement: "top",
|
|
@@ -2960,10 +2960,10 @@ function hi({
|
|
|
2960
2960
|
chatId: u,
|
|
2961
2961
|
lastError: m
|
|
2962
2962
|
} = Ga(e), {
|
|
2963
|
-
mutate:
|
|
2963
|
+
mutate: C,
|
|
2964
2964
|
isLoading: x
|
|
2965
|
-
} = nt(u), [k, N] = M(!1), [E,
|
|
2966
|
-
|
|
2965
|
+
} = nt(u), [k, N] = M(!1), [E, y] = M(!1), O = () => N(!0), D = () => N(!1), J = () => {
|
|
2966
|
+
C(), D();
|
|
2967
2967
|
}, S = q(null), re = q(null), he = () => {
|
|
2968
2968
|
if (!(S != null && S.current))
|
|
2969
2969
|
return;
|
|
@@ -2975,7 +2975,7 @@ function hi({
|
|
|
2975
2975
|
if (w === void 0 || G === void 0 || Le === void 0)
|
|
2976
2976
|
return;
|
|
2977
2977
|
const Ne = Le - w - G > G / 2;
|
|
2978
|
-
E !== Ne &&
|
|
2978
|
+
E !== Ne && y(Ne);
|
|
2979
2979
|
};
|
|
2980
2980
|
ne(() => {
|
|
2981
2981
|
S.current && (S.current.scrollTop = S.current.scrollHeight);
|
|
@@ -2986,10 +2986,10 @@ function hi({
|
|
|
2986
2986
|
numOfRecentPrompts: ie
|
|
2987
2987
|
} = R(), {
|
|
2988
2988
|
themeSettings: W
|
|
2989
|
-
} = f(),
|
|
2989
|
+
} = f(), P = B ? /* @__PURE__ */ a(ut, {
|
|
2990
2990
|
ref: U,
|
|
2991
2991
|
title: e,
|
|
2992
|
-
leftNav: t && /* @__PURE__ */ a(
|
|
2992
|
+
leftNav: t && /* @__PURE__ */ a(Pr, {
|
|
2993
2993
|
onClick: t,
|
|
2994
2994
|
color: W.aiChat.header.textColor
|
|
2995
2995
|
}),
|
|
@@ -2997,11 +2997,11 @@ function hi({
|
|
|
2997
2997
|
style: W.aiChat.header
|
|
2998
2998
|
}) : null, ue = z(() => [...new Set(d.filter((w) => w.role === "user").filter((w) => !n.includes(w.content)).map((w) => w.content).reverse())].slice(0, ie), [d, ie, n]);
|
|
2999
2999
|
return (m == null ? void 0 : m.message) === r("ai.errors.chatUnavailable") ? /* @__PURE__ */ a(T, {
|
|
3000
|
-
children: [B &&
|
|
3000
|
+
children: [B && P, /* @__PURE__ */ a(pt, {
|
|
3001
3001
|
text: m.message
|
|
3002
3002
|
})]
|
|
3003
3003
|
}) : /* @__PURE__ */ a(T, {
|
|
3004
|
-
children: [
|
|
3004
|
+
children: [P, /* @__PURE__ */ a(si, {
|
|
3005
3005
|
ref: S,
|
|
3006
3006
|
theme: W,
|
|
3007
3007
|
onScroll: he,
|
|
@@ -3148,7 +3148,7 @@ const ki = h.div`
|
|
|
3148
3148
|
theme: e
|
|
3149
3149
|
}) => e.aiChat.primaryTextColor};
|
|
3150
3150
|
`;
|
|
3151
|
-
function
|
|
3151
|
+
function Ci(e) {
|
|
3152
3152
|
const {
|
|
3153
3153
|
dataTopics: t
|
|
3154
3154
|
} = e, {
|
|
@@ -3168,11 +3168,11 @@ function yi(e) {
|
|
|
3168
3168
|
})))]
|
|
3169
3169
|
});
|
|
3170
3170
|
}
|
|
3171
|
-
const
|
|
3171
|
+
const yi = "#000000", vi = "#FFFFFF";
|
|
3172
3172
|
function Mi({
|
|
3173
3173
|
isDarkBackground: e = !1
|
|
3174
3174
|
}) {
|
|
3175
|
-
const t = e ? vi :
|
|
3175
|
+
const t = e ? vi : yi;
|
|
3176
3176
|
return /* @__PURE__ */ a("svg", {
|
|
3177
3177
|
width: "32",
|
|
3178
3178
|
height: "32",
|
|
@@ -3270,7 +3270,7 @@ function Ai({
|
|
|
3270
3270
|
style: i.aiChat.header
|
|
3271
3271
|
}) : null, /* @__PURE__ */ a(Ii, {
|
|
3272
3272
|
theme: i,
|
|
3273
|
-
children: [!l && /* @__PURE__ */ a(ge, {}), l && /* @__PURE__ */ a(
|
|
3273
|
+
children: [!l && /* @__PURE__ */ a(ge, {}), l && /* @__PURE__ */ a(Ci, {
|
|
3274
3274
|
dataTopics: l
|
|
3275
3275
|
})]
|
|
3276
3276
|
})]
|
|
@@ -3285,7 +3285,7 @@ function Si() {
|
|
|
3285
3285
|
} = R(), {
|
|
3286
3286
|
t: s
|
|
3287
3287
|
} = _();
|
|
3288
|
-
|
|
3288
|
+
F(() => {
|
|
3289
3289
|
if (n && d === "idle") {
|
|
3290
3290
|
let u = n;
|
|
3291
3291
|
c && c.length && (u = n == null ? void 0 : n.filter((m) => c == null ? void 0 : c.includes(m.title))), t(u.map((m) => m.title)), u.length ? u.length === 1 && (l(void 0), i(u[0].title)) : l(s("ai.errors.noAvailableDataTopics"));
|
|
@@ -3389,7 +3389,7 @@ const Ni = h.div`
|
|
|
3389
3389
|
const {
|
|
3390
3390
|
themeSettings: r
|
|
3391
3391
|
} = f();
|
|
3392
|
-
return /* @__PURE__ */ a(
|
|
3392
|
+
return /* @__PURE__ */ a(Ce, {
|
|
3393
3393
|
sourceId: t.jaql.datasource.title,
|
|
3394
3394
|
data: t,
|
|
3395
3395
|
type: "chart/insights",
|
|
@@ -3416,7 +3416,7 @@ const Ni = h.div`
|
|
|
3416
3416
|
} = zt({
|
|
3417
3417
|
initialFilters: r
|
|
3418
3418
|
}), [o, l] = M(null);
|
|
3419
|
-
|
|
3419
|
+
F(() => {
|
|
3420
3420
|
const p = Je(e, {
|
|
3421
3421
|
useCustomizedStyleOptions: !0
|
|
3422
3422
|
});
|