@aintela/bi 0.2.3 → 0.2.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/{GridLayout-1gWuIKeZ.js → GridLayout-BQcuPzng.js} +2 -2
- package/dist/GridLayout-BQcuPzng.js.map +1 -0
- package/dist/{ScriptDashboardViewerVertical-Rr_4adpH.js → ScriptDashboardViewerVertical-B8Y5LoE4.js} +42 -26
- package/dist/{ScriptDashboardViewerVertical-Rr_4adpH.js.map → ScriptDashboardViewerVertical-B8Y5LoE4.js.map} +1 -1
- package/dist/{biModuleSurface-BdJK7sSL.js → biModuleSurface-zEeRrln5.js} +6 -6
- package/dist/{biModuleSurface-BdJK7sSL.js.map → biModuleSurface-zEeRrln5.js.map} +1 -1
- package/dist/composer/index.d.ts +1 -1
- package/dist/composer/models/utils.d.ts +11 -0
- package/dist/composer.js +33 -32
- package/dist/grid.js +2 -2
- package/dist/{index-DChE_l-p.js → index-C38e4aIE.js} +2 -2
- package/dist/index-C38e4aIE.js.map +1 -0
- package/dist/{index-BzUugG0A.js → index-D6-YxBjl.js} +2 -2
- package/dist/{index-BzUugG0A.js.map → index-D6-YxBjl.js.map} +1 -1
- package/dist/{index-C4_VSDeU.js → index-GTSBsgzP.js} +875 -857
- package/dist/index-GTSBsgzP.js.map +1 -0
- package/dist/index-ZBNoVc5M.js +210 -0
- package/dist/index-ZBNoVc5M.js.map +1 -0
- package/dist/index-zN3LPF6u.js +97 -0
- package/dist/index-zN3LPF6u.js.map +1 -0
- package/dist/index.js +55 -54
- package/dist/inline/Chart.d.ts +0 -9
- package/dist/inline/Metric.d.ts +0 -2
- package/dist/inline/MetricGroup.d.ts +1 -1
- package/dist/inline.js +1 -1
- package/dist/runtime/version.d.ts +1 -1
- package/dist/runtime.js +7 -7
- package/dist/style.css +1 -1
- package/dist/theme.js +1 -1
- package/dist/{version-BTc4ElDG.js → version-oYqU5xJk.js} +6 -6
- package/dist/{version-BTc4ElDG.js.map → version-oYqU5xJk.js.map} +1 -1
- package/dist/viewer.js +1 -1
- package/package.json +1 -1
- package/dist/GridLayout-1gWuIKeZ.js.map +0 -1
- package/dist/index-BYc79sSy.js +0 -131
- package/dist/index-BYc79sSy.js.map +0 -1
- package/dist/index-C4_VSDeU.js.map +0 -1
- package/dist/index-D7Oo_dC-.js +0 -94
- package/dist/index-D7Oo_dC-.js.map +0 -1
- package/dist/index-DChE_l-p.js.map +0 -1
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (e, n) =>
|
|
1
|
+
var si = Object.defineProperty;
|
|
2
|
+
var a = (e, n) => si(e, "name", { value: n, configurable: !0 });
|
|
3
3
|
import { jsx as t, jsxs as b, Fragment as Te } from "react/jsx-runtime";
|
|
4
|
-
import He, { useState as N, useEffect as q, useContext as
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { useShallow as
|
|
4
|
+
import He, { useState as N, useEffect as q, useContext as Ee, createContext as wt, useMemo as Se, useRef as ee, forwardRef as Tt, useCallback as W, useImperativeHandle as en } from "react";
|
|
5
|
+
import { useStore as tn } from "zustand";
|
|
6
|
+
import { useShallow as di } from "zustand/react/shallow";
|
|
7
7
|
import { a as et } from "./BiClientProvider-CWJochvi.js";
|
|
8
|
-
import { createStore as
|
|
9
|
-
import { C as Oe, S as
|
|
8
|
+
import { createStore as ci } from "zustand/vanilla";
|
|
9
|
+
import { C as Oe, S as Re, a as pi } from "./ScriptDashboardViewerVertical-B8Y5LoE4.js";
|
|
10
10
|
import S from "@mui/material/Box";
|
|
11
|
-
import { SpeedOutlined as
|
|
12
|
-
import { Box as j, Stack as se, IconButton as Pe, CircularProgress as
|
|
13
|
-
import { alpha as
|
|
14
|
-
import { e as
|
|
15
|
-
import { G as
|
|
16
|
-
import { useEnvironment as
|
|
17
|
-
import
|
|
18
|
-
import { AnimatePresence as tt, motion as re, useReducedMotion as
|
|
19
|
-
import
|
|
11
|
+
import { SpeedOutlined as nn, GridViewOutlined as an, MapOutlined as hi, BarChartOutlined as mt, TableChartOutlined as on, TagOutlined as rn, DashboardOutlined as kt, ManageSearchOutlined as ui, CalendarTodayOutlined as mi, DateRangeOutlined as fi, TimelineOutlined as gi, BubbleChartOutlined as xi, DonutLargeOutlined as yi, ScatterPlotOutlined as bi, PieChartOutlined as vi, MultilineChartOutlined as Si, StackedBarChartOutlined as Ci, StackedLineChartOutlined as wi, AreaChartOutlined as Ti, AlignHorizontalLeftOutlined as ki, ShowChartOutlined as Di, TableRowsOutlined as Ii, HeatPumpOutlined as zi, ViewColumnOutlined as Oi, DeleteOutline as ln, CheckCircle as Pi, Pending as $i, ViewQuiltOutlined as Ei, BorderClearOutlined as Ai, DragIndicatorOutlined as Mi, AddOutlined as Ri, ArrowDropDownOutlined as ft, FilterListOutlined as _i, PreviewRounded as Fi, FolderOpenOutlined as Ni, ArrowBack as Bi, NoteAddOutlined as Hi, SaveOutlined as Li, RefreshOutlined as sn, StartRounded as Gi, Close as Wi, Add as Vi, InsertDriveFileOutlined as ji, Fullscreen as Ui } from "@mui/icons-material";
|
|
12
|
+
import { Box as j, Stack as se, IconButton as Pe, CircularProgress as gt, Typography as ie, Popper as Ve, Grow as je, Paper as _e, ClickAwayListener as Ue, MenuList as xt, Divider as Ke, MenuItem as $e, ListItemIcon as qe, ListItemText as Ye, TextField as Fe, Tooltip as Ie, Switch as yt, ToggleButtonGroup as dn, ToggleButton as Je, Button as Nt, Menu as Ki, Select as Bt, Grid as Xe } from "@mui/material";
|
|
13
|
+
import { alpha as ve, useTheme as le } from "@mui/material/styles";
|
|
14
|
+
import { e as qi } from "./GridLayout-BQcuPzng.js";
|
|
15
|
+
import { G as Yi } from "./GridCardPlaceHolder-DVVT3pqn.js";
|
|
16
|
+
import { useEnvironment as cn, DashboardIcon as De, PanelIcon as Le, CloseIcon as Dt, PromptV2 as Ji, PlusIcon as bt, SearchIcon as Xi, useAiChatSessionStore as Zi, useAiChatServices as Qi, ChevronIcon as ea, EnvironmentProvider as ta, InertEnvironmentProvider as na, useEnvironmentOptional as ia } from "@aintela/chat/components";
|
|
17
|
+
import Ht from "@mui/material/Stack";
|
|
18
|
+
import { AnimatePresence as tt, motion as re, useReducedMotion as aa } from "framer-motion";
|
|
19
|
+
import pn from "@mui/material/Dialog";
|
|
20
20
|
import be from "@mui/material/IconButton";
|
|
21
21
|
import ce from "@mui/material/Tooltip";
|
|
22
22
|
import X from "@mui/material/Typography";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import { createPortal as
|
|
33
|
-
function
|
|
23
|
+
import Lt from "@mui/material/Divider";
|
|
24
|
+
import st from "@mui/material/ListItemIcon";
|
|
25
|
+
import dt from "@mui/material/ListItemText";
|
|
26
|
+
import ct from "@mui/material/MenuItem";
|
|
27
|
+
import Gt from "@mui/material/MenuList";
|
|
28
|
+
import Wt from "@mui/material/Popover";
|
|
29
|
+
import Vt from "@mui/material/ToggleButton";
|
|
30
|
+
import oa from "@mui/material/ToggleButtonGroup";
|
|
31
|
+
import ra from "@mui/icons-material/EditOutlined";
|
|
32
|
+
import { createPortal as la } from "react-dom";
|
|
33
|
+
function Ne(e) {
|
|
34
34
|
if (!(e != null && e.trim())) return "_";
|
|
35
35
|
const n = e.normalize("NFD").replace(new RegExp("\\p{Mn}", "gu"), "").replace(new RegExp("(?<=[a-zA-Z0-9_$])[^a-zA-Z0-9_$]+([a-zA-Z_$])", "g"), (i, l) => l.toUpperCase()).replace(/[^a-zA-Z0-9_$]+/g, "");
|
|
36
36
|
return n ? /^\d/.test(n) ? `_${n}` : n : "_";
|
|
37
37
|
}
|
|
38
|
-
a(
|
|
38
|
+
a(Ne, "sanitizeToJsVariable");
|
|
39
|
+
function nt(e) {
|
|
40
|
+
const n = Ne(e);
|
|
41
|
+
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
42
|
+
}
|
|
43
|
+
a(nt, "sanitizeToJsxComponentName");
|
|
39
44
|
function ze() {
|
|
40
45
|
const e = typeof globalThis.crypto < "u" ? globalThis.crypto : void 0;
|
|
41
46
|
if (e && typeof e.randomUUID == "function") return e.randomUUID();
|
|
@@ -44,15 +49,15 @@ function ze() {
|
|
|
44
49
|
return n;
|
|
45
50
|
}
|
|
46
51
|
a(ze, "randomId");
|
|
47
|
-
const
|
|
48
|
-
function
|
|
52
|
+
const it = 300;
|
|
53
|
+
function It(e) {
|
|
49
54
|
if (!e) return;
|
|
50
55
|
const n = Object.values(e).filter((i) => i && i.trim().length > 0);
|
|
51
56
|
if (n.length !== 0)
|
|
52
57
|
return n.map((i) => `- ${i}`).join(`
|
|
53
58
|
`);
|
|
54
59
|
}
|
|
55
|
-
a(
|
|
60
|
+
a(It, "joinClientSideChanges");
|
|
56
61
|
const we = [
|
|
57
62
|
{ label: "Métrica (Comparação)", category: "Métrica", specificType: "MetricComparison" },
|
|
58
63
|
{ label: "Tabela (Auto)", category: "Tabela", specificType: "TableAuto" },
|
|
@@ -74,19 +79,19 @@ const we = [
|
|
|
74
79
|
{ label: "Árvore (Distribuição)", category: "Árvore", specificType: "Treemap" },
|
|
75
80
|
{ label: "Medidor (Gauge)", category: "Medidor", specificType: "Gauge" }
|
|
76
81
|
];
|
|
77
|
-
function
|
|
82
|
+
function at(e = we) {
|
|
78
83
|
return e.reduce((n, i) => {
|
|
79
84
|
var l;
|
|
80
85
|
return (n[l = i.category] ?? (n[l] = [])).push(i), n;
|
|
81
86
|
}, {});
|
|
82
87
|
}
|
|
83
|
-
a(
|
|
84
|
-
const
|
|
88
|
+
a(at, "groupCardCatalog");
|
|
89
|
+
const zt = [
|
|
85
90
|
{ label: "Período (Date Range)", filterType: "DateRangePicker" },
|
|
86
91
|
{ label: "Data (Date Picker)", filterType: "DatePicker" },
|
|
87
92
|
{ label: "Auto Complete", filterType: "AutoComplete" }
|
|
88
|
-
],
|
|
89
|
-
function
|
|
93
|
+
], sa = /* @__PURE__ */ a((e, n) => e.actionDescription == n.actionDescription && e.category == n.category && e.name == n.name && e.color == n.color && e.specificType == n.specificType, "sketchCardItemComparer"), da = /* @__PURE__ */ a((e, n) => JSON.stringify(e) == JSON.stringify(n), "sketchFilterComparer");
|
|
94
|
+
function vt(e) {
|
|
90
95
|
var o;
|
|
91
96
|
const n = /* @__PURE__ */ new Set();
|
|
92
97
|
let i = !1;
|
|
@@ -95,23 +100,23 @@ function bt(e) {
|
|
|
95
100
|
let l = null;
|
|
96
101
|
return i && (l = "Os nomes dos cards precisam ser únicos"), (((o = e.cards) == null ? void 0 : o.length) ?? 0) == 0 && (l = "Inclua pelo menos um card no rascunho"), l;
|
|
97
102
|
}
|
|
98
|
-
a(
|
|
99
|
-
const
|
|
100
|
-
function
|
|
103
|
+
a(vt, "validateSketch");
|
|
104
|
+
const ca = 20;
|
|
105
|
+
function hn(e) {
|
|
101
106
|
var g, h, x;
|
|
102
107
|
const n = [];
|
|
103
108
|
let i = 0, l = 0, o = 0, r = 0;
|
|
104
109
|
for (const d of e.config) {
|
|
105
|
-
const { size: v, height: s, card: c } = d, u = Math.max(1, Math.round((s ??
|
|
110
|
+
const { size: v, height: s, card: c } = d, u = Math.max(1, Math.round((s ?? it) / ca));
|
|
106
111
|
i + v > 12 && (i = 0, l += o, o = 0);
|
|
107
112
|
let p = d.description, f = d.name, y = d.specificType, R = d.id, H;
|
|
108
113
|
if (He.isValidElement(c)) {
|
|
109
114
|
const L = c.props ?? {};
|
|
110
|
-
p = p ?? L.description ?? "", f = f ?? L.name, R = R ?? L.id ??
|
|
115
|
+
p = p ?? L.description ?? "", f = f ?? L.name, R = R ?? L.id ?? Ne(`${f ?? ""}${r}`), y = y ?? L.specificType, H = L.category ?? ((g = we.find((P) => P.specificType === y)) == null ? void 0 : g.category);
|
|
111
116
|
} else {
|
|
112
117
|
if (f === void 0 && y === void 0)
|
|
113
118
|
continue;
|
|
114
|
-
R = R ??
|
|
119
|
+
R = R ?? Ne(`${f}${r}`), H = (h = we.find((L) => L.specificType === y)) == null ? void 0 : h.category;
|
|
115
120
|
}
|
|
116
121
|
n.push({
|
|
117
122
|
i: R ?? "not_defined",
|
|
@@ -132,46 +137,46 @@ function pn(e) {
|
|
|
132
137
|
filters: e.filters ?? []
|
|
133
138
|
};
|
|
134
139
|
}
|
|
135
|
-
a(
|
|
136
|
-
function
|
|
140
|
+
a(hn, "padConfigToDashboard");
|
|
141
|
+
function un(e) {
|
|
137
142
|
return typeof e == "object" && e !== null && "config" in e && Array.isArray(e.config);
|
|
138
143
|
}
|
|
139
|
-
a(
|
|
140
|
-
function
|
|
144
|
+
a(un, "isSimplePadDefinition");
|
|
145
|
+
function pa(e) {
|
|
141
146
|
return Oe[e] ?? Oe.Generic;
|
|
142
147
|
}
|
|
143
|
-
a(
|
|
148
|
+
a(pa, "categoryPrefix");
|
|
144
149
|
const Ze = "llm-env-highlight-active";
|
|
145
|
-
function
|
|
150
|
+
function mn() {
|
|
146
151
|
return typeof document > "u" ? null : document;
|
|
147
152
|
}
|
|
148
|
-
a(
|
|
149
|
-
function
|
|
153
|
+
a(mn, "defaultRoot");
|
|
154
|
+
function jt(e) {
|
|
150
155
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&");
|
|
151
156
|
}
|
|
152
|
-
a(
|
|
153
|
-
function
|
|
157
|
+
a(jt, "escapeCssValue");
|
|
158
|
+
function fn(e) {
|
|
154
159
|
return e.startsWith(".") || e.startsWith("#") || e.startsWith("[") || e.includes(" ") || e.includes(":") || e.includes(">");
|
|
155
160
|
}
|
|
156
|
-
a(
|
|
157
|
-
function
|
|
161
|
+
a(fn, "looksLikeSelector");
|
|
162
|
+
function gn(e) {
|
|
158
163
|
var o, r, g;
|
|
159
164
|
const n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ a((h) => {
|
|
160
|
-
const x =
|
|
165
|
+
const x = jt(h);
|
|
161
166
|
n.add(`[data-env-id="${x}"]`), n.add(`[data-env-key="${x}"]`), n.add(`[data-env-name="${x}"]`), n.add(`#${x}`), n.add(`.${x}`);
|
|
162
167
|
}, "appendByIdentifier"), l = /* @__PURE__ */ a((h) => {
|
|
163
|
-
h.split(/\s+/).map((x) => x.trim()).filter(Boolean).forEach((x) => n.add(`.${
|
|
168
|
+
h.split(/\s+/).map((x) => x.trim()).filter(Boolean).forEach((x) => n.add(`.${jt(x)}`));
|
|
164
169
|
}, "appendByClassName");
|
|
165
170
|
if (typeof e == "string") {
|
|
166
171
|
const h = e.trim();
|
|
167
|
-
return h ? (
|
|
172
|
+
return h ? (fn(h) ? n.add(h) : i(h), [...n]) : [];
|
|
168
173
|
}
|
|
169
174
|
return (o = e.selector) != null && o.trim() && n.add(e.selector.trim()), (r = e.className) != null && r.trim() && l(e.className), (g = e.identifier) != null && g.trim() && i(e.identifier.trim()), [...n];
|
|
170
175
|
}
|
|
171
|
-
a(
|
|
172
|
-
function Qe(e, n =
|
|
176
|
+
a(gn, "toSelectorList");
|
|
177
|
+
function Qe(e, n = mn()) {
|
|
173
178
|
if (!n) return { selectors: [], elements: [] };
|
|
174
|
-
const i =
|
|
179
|
+
const i = gn(e), l = /* @__PURE__ */ new Set();
|
|
175
180
|
return i.forEach((o) => {
|
|
176
181
|
try {
|
|
177
182
|
n.querySelectorAll(o).forEach((r) => l.add(r));
|
|
@@ -181,59 +186,59 @@ function Qe(e, n = un()) {
|
|
|
181
186
|
}), { selectors: i, elements: [...l] };
|
|
182
187
|
}
|
|
183
188
|
a(Qe, "resolveEnvironmentElements");
|
|
184
|
-
function
|
|
189
|
+
function Ot(e) {
|
|
185
190
|
const n = e.getBoundingClientRect();
|
|
186
191
|
if (!(n.width > 0 && n.height > 0)) return !1;
|
|
187
192
|
if (typeof window > "u" || !window.getComputedStyle) return !0;
|
|
188
193
|
const i = window.getComputedStyle(e);
|
|
189
194
|
return i.display !== "none" && i.visibility !== "hidden";
|
|
190
195
|
}
|
|
191
|
-
a(
|
|
192
|
-
function
|
|
196
|
+
a(Ot, "isElementVisible");
|
|
197
|
+
function xn(e, n = !1) {
|
|
193
198
|
if (e.length === 0) return null;
|
|
194
199
|
if (n) return e[0];
|
|
195
|
-
for (const i of e) if (
|
|
200
|
+
for (const i of e) if (Ot(i)) return i;
|
|
196
201
|
return e[0];
|
|
197
202
|
}
|
|
198
|
-
a(
|
|
199
|
-
function
|
|
203
|
+
a(xn, "pickBestElement");
|
|
204
|
+
function Pt(e, n = mn()) {
|
|
200
205
|
const { elements: i } = Qe(e, n);
|
|
201
|
-
for (const l of i) if (
|
|
206
|
+
for (const l of i) if (Ot(l)) return l;
|
|
202
207
|
return null;
|
|
203
208
|
}
|
|
204
|
-
a(
|
|
205
|
-
const
|
|
209
|
+
a(Pt, "resolveGuideElement");
|
|
210
|
+
const yn = /* @__PURE__ */ new Set([
|
|
206
211
|
"dashboardpad-add-card",
|
|
207
212
|
"dashboardpad-add-card-dropdown",
|
|
208
213
|
"dashboardpad-add-filter",
|
|
209
214
|
"dashboard-pad-layout-toggle",
|
|
210
215
|
"dashboard-pad-layout-boxed",
|
|
211
216
|
"dashboard-pad-layout-naked"
|
|
212
|
-
]),
|
|
217
|
+
]), bn = /* @__PURE__ */ new Set([
|
|
213
218
|
"llm-env-card",
|
|
214
219
|
"llm-env-filter",
|
|
215
220
|
"llm-env-layout-toggle",
|
|
216
221
|
"llm-env-card-sketch",
|
|
217
222
|
"llm-env-card-sketch-wrapper",
|
|
218
223
|
"llm-env-filter-sketch"
|
|
219
|
-
]),
|
|
220
|
-
function
|
|
224
|
+
]), ha = /^[0-9a-fA-F]{8,}(-[0-9a-fA-F]{4,})+$/;
|
|
225
|
+
function vn(e) {
|
|
221
226
|
const n = /* @__PURE__ */ a((l) => {
|
|
222
227
|
const o = l.trim();
|
|
223
|
-
return o ?
|
|
224
|
-
}, "checkId"), i = /* @__PURE__ */ a((l) => l.split(/\s+/).filter(Boolean).some((o) =>
|
|
228
|
+
return o ? yn.has(o) ? !0 : ha.test(o) : !1;
|
|
229
|
+
}, "checkId"), i = /* @__PURE__ */ a((l) => l.split(/\s+/).filter(Boolean).some((o) => bn.has(o)), "checkClass");
|
|
225
230
|
if (typeof e == "string") {
|
|
226
231
|
const l = e.trim();
|
|
227
|
-
return
|
|
232
|
+
return fn(l) ? !1 : n(l);
|
|
228
233
|
}
|
|
229
234
|
return !!(e.identifier && n(e.identifier) || e.className && i(e.className));
|
|
230
235
|
}
|
|
231
|
-
a(
|
|
232
|
-
function
|
|
233
|
-
return e.some((n) =>
|
|
236
|
+
a(vn, "targetSuggestsPadInternal");
|
|
237
|
+
function Sn(e) {
|
|
238
|
+
return e.some((n) => vn(n.target));
|
|
234
239
|
}
|
|
235
|
-
a(
|
|
236
|
-
const
|
|
240
|
+
a(Sn, "guideStepsRequireSketch");
|
|
241
|
+
const Cn = /* @__PURE__ */ a(({ entry: e, onHover: n }) => {
|
|
237
242
|
var i;
|
|
238
243
|
return /* @__PURE__ */ t(
|
|
239
244
|
S,
|
|
@@ -254,7 +259,7 @@ const Sn = /* @__PURE__ */ a(({ entry: e, onHover: n }) => {
|
|
|
254
259
|
}
|
|
255
260
|
);
|
|
256
261
|
}, "ClonedComponent");
|
|
257
|
-
function
|
|
262
|
+
function wn(e) {
|
|
258
263
|
const {
|
|
259
264
|
cards: n,
|
|
260
265
|
filters: i,
|
|
@@ -287,7 +292,7 @@ function Cn(e) {
|
|
|
287
292
|
}
|
|
288
293
|
};
|
|
289
294
|
}
|
|
290
|
-
a(
|
|
295
|
+
a(wn, "toDraftPayload");
|
|
291
296
|
function Be(e) {
|
|
292
297
|
const n = e ?? {}, i = n.draft ?? n.committed;
|
|
293
298
|
return {
|
|
@@ -305,13 +310,13 @@ function Be(e) {
|
|
|
305
310
|
};
|
|
306
311
|
}
|
|
307
312
|
a(Be, "fromUpsertResponse");
|
|
308
|
-
async function
|
|
309
|
-
const i = await e.upsertDashboard(
|
|
313
|
+
async function ot(e, n) {
|
|
314
|
+
const i = await e.upsertDashboard(wn(n));
|
|
310
315
|
return Be(i);
|
|
311
316
|
}
|
|
312
|
-
a(
|
|
313
|
-
async function
|
|
314
|
-
return
|
|
317
|
+
a(ot, "upsertDashboardDraft");
|
|
318
|
+
async function $t(e, n, i) {
|
|
319
|
+
return ot(e, {
|
|
315
320
|
name: (i == null ? void 0 : i.name) ?? "Sem título",
|
|
316
321
|
filters: (i == null ? void 0 : i.filters) ?? [],
|
|
317
322
|
cards: (i == null ? void 0 : i.cards) ?? [],
|
|
@@ -320,15 +325,15 @@ async function Pt(e, n, i) {
|
|
|
320
325
|
originalSessionId: n
|
|
321
326
|
});
|
|
322
327
|
}
|
|
323
|
-
a(
|
|
324
|
-
const
|
|
325
|
-
function
|
|
326
|
-
const n = e.viewerCommitDebounceMs ??
|
|
327
|
-
return
|
|
328
|
+
a($t, "createDashboardDraft");
|
|
329
|
+
const Tn = 3e3, kn = 800, Dn = 500, ua = 1800;
|
|
330
|
+
function In(e = {}) {
|
|
331
|
+
const n = e.viewerCommitDebounceMs ?? Tn, i = e.draftSaveDebounceMs ?? kn, l = e.onDraftSaveError ?? ((o) => console.warn("[@aintela/bi composer] draft save failed:", o));
|
|
332
|
+
return ci()((o, r) => {
|
|
328
333
|
const g = /* @__PURE__ */ a(async () => {
|
|
329
334
|
const s = r()._client, c = r().dashboardDefinition;
|
|
330
335
|
if (!s || !(c != null && c.id) || !c.originalSessionId) return;
|
|
331
|
-
const u =
|
|
336
|
+
const u = ot(s, c).then(() => {
|
|
332
337
|
}).catch(l);
|
|
333
338
|
o({ _draftSavePromise: u }), await u, o((p) => p._draftSavePromise === u ? { _draftSavePromise: null } : {});
|
|
334
339
|
}, "_saveDraft"), h = /* @__PURE__ */ a(() => {
|
|
@@ -357,7 +362,7 @@ function kn(e = {}) {
|
|
|
357
362
|
const c = r().dashboardDefinition, u = r().currentSessionId || null, p = r().turnOpen, f = s.id;
|
|
358
363
|
if (!p && (c != null && c.id) && f && c.id === f && (((H = c.cards) == null ? void 0 : H.length) ?? 0) > 0)
|
|
359
364
|
return;
|
|
360
|
-
const y =
|
|
365
|
+
const y = un(s) ? hn(s) : { ...s };
|
|
361
366
|
y.originalSessionId = u;
|
|
362
367
|
const R = {
|
|
363
368
|
...c,
|
|
@@ -494,13 +499,13 @@ function kn(e = {}) {
|
|
|
494
499
|
setProducedDashboardId: /* @__PURE__ */ a((s) => o({ producedDashboardId: s }), "setProducedDashboardId"),
|
|
495
500
|
setViewport: /* @__PURE__ */ a((s) => o((c) => c.viewport.width === s.width && c.viewport.height === s.height ? {} : { viewport: s }), "setViewport"),
|
|
496
501
|
highlightComponent: /* @__PURE__ */ a((s, c) => {
|
|
497
|
-
const u = (c == null ? void 0 : c.durationMs) ??
|
|
502
|
+
const u = (c == null ? void 0 : c.durationMs) ?? ua, { elements: p } = Qe(s);
|
|
498
503
|
return p.length === 0 ? 0 : (p.forEach((f, y) => {
|
|
499
504
|
f.classList.add(Ze), setTimeout(() => f.classList.remove(Ze), u), y === 0 && (c != null && c.scrollIntoView) && typeof f.scrollIntoView == "function" && f.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
|
|
500
505
|
}), p.length);
|
|
501
506
|
}, "highlightComponent"),
|
|
502
507
|
cloneComponent: /* @__PURE__ */ a((s, c) => {
|
|
503
|
-
const { selectors: u, elements: p } = Qe(s), f =
|
|
508
|
+
const { selectors: u, elements: p } = Qe(s), f = xn(p, (c == null ? void 0 : c.includeHidden) ?? !1);
|
|
504
509
|
if (!f) return null;
|
|
505
510
|
const y = f.getBoundingClientRect(), R = {
|
|
506
511
|
id: ze(),
|
|
@@ -516,7 +521,7 @@ function kn(e = {}) {
|
|
|
516
521
|
html: R.html,
|
|
517
522
|
source: f
|
|
518
523
|
};
|
|
519
|
-
return H.component = /* @__PURE__ */ t(
|
|
524
|
+
return H.component = /* @__PURE__ */ t(Cn, { entry: H, onHover: /* @__PURE__ */ a((L) => r().highlightComponent(L), "onHover") }), H;
|
|
520
525
|
}, "cloneComponent"),
|
|
521
526
|
createDashboardPad: /* @__PURE__ */ a((s) => {
|
|
522
527
|
v(s);
|
|
@@ -598,34 +603,34 @@ function kn(e = {}) {
|
|
|
598
603
|
};
|
|
599
604
|
});
|
|
600
605
|
}
|
|
601
|
-
a(
|
|
602
|
-
const Et =
|
|
603
|
-
const o = et(), r = e === void 0 ? o : e, [g] = N(() => n ??
|
|
606
|
+
a(In, "createComposerStore");
|
|
607
|
+
const Et = wt(null), ma = /* @__PURE__ */ a(({ client: e, store: n, children: i, ...l }) => {
|
|
608
|
+
const o = et(), r = e === void 0 ? o : e, [g] = N(() => n ?? In({ ...l, client: r }));
|
|
604
609
|
return q(() => {
|
|
605
610
|
g.getState()._client !== r && g.getState().setClient(r);
|
|
606
611
|
}, [g, r]), /* @__PURE__ */ t(Et.Provider, { value: g, children: i });
|
|
607
612
|
}, "ComposerProvider");
|
|
608
613
|
function he() {
|
|
609
|
-
const e =
|
|
614
|
+
const e = Ee(Et);
|
|
610
615
|
if (!e)
|
|
611
616
|
throw new Error("[@aintela/bi] No composer store in scope. Wrap the composer surface in <ComposerProvider>.");
|
|
612
617
|
return e;
|
|
613
618
|
}
|
|
614
619
|
a(he, "useComposerStore");
|
|
615
|
-
function
|
|
616
|
-
return
|
|
620
|
+
function fa() {
|
|
621
|
+
return Ee(Et);
|
|
617
622
|
}
|
|
618
|
-
a(
|
|
623
|
+
a(fa, "useComposerStoreOptional");
|
|
619
624
|
function B(e) {
|
|
620
625
|
const n = he();
|
|
621
|
-
return
|
|
626
|
+
return tn(n, e ?? ((i) => i));
|
|
622
627
|
}
|
|
623
628
|
a(B, "useComposer");
|
|
624
|
-
function
|
|
629
|
+
function zn() {
|
|
625
630
|
const e = he();
|
|
626
|
-
return
|
|
631
|
+
return tn(
|
|
627
632
|
e,
|
|
628
|
-
|
|
633
|
+
di((n) => ({
|
|
629
634
|
highlightComponent: n.highlightComponent,
|
|
630
635
|
cloneComponent: n.cloneComponent,
|
|
631
636
|
createDashboardPad: n.createDashboardPad,
|
|
@@ -636,8 +641,8 @@ function In() {
|
|
|
636
641
|
}))
|
|
637
642
|
);
|
|
638
643
|
}
|
|
639
|
-
a(
|
|
640
|
-
function
|
|
644
|
+
a(zn, "useComposerEnvironment");
|
|
645
|
+
function ga(e) {
|
|
641
646
|
const n = e.getState();
|
|
642
647
|
return {
|
|
643
648
|
highlightComponent: n.highlightComponent,
|
|
@@ -649,16 +654,16 @@ function fa(e) {
|
|
|
649
654
|
dismissGuide: n.dismissGuide
|
|
650
655
|
};
|
|
651
656
|
}
|
|
652
|
-
a(
|
|
653
|
-
const
|
|
654
|
-
Generic:
|
|
655
|
-
Métrica:
|
|
656
|
-
Tabela:
|
|
657
|
-
Gráfico:
|
|
658
|
-
Mapa:
|
|
659
|
-
Árvore:
|
|
660
|
-
Medidor:
|
|
661
|
-
},
|
|
657
|
+
a(ga, "environmentFromStore");
|
|
658
|
+
const On = {
|
|
659
|
+
Generic: kt,
|
|
660
|
+
Métrica: rn,
|
|
661
|
+
Tabela: on,
|
|
662
|
+
Gráfico: mt,
|
|
663
|
+
Mapa: hi,
|
|
664
|
+
Árvore: an,
|
|
665
|
+
Medidor: nn
|
|
666
|
+
}, Pn = {
|
|
662
667
|
Generic: "info",
|
|
663
668
|
Métrica: "kpi",
|
|
664
669
|
Tabela: "table",
|
|
@@ -666,28 +671,28 @@ const zn = {
|
|
|
666
671
|
Mapa: "map",
|
|
667
672
|
Árvore: "chart",
|
|
668
673
|
Medidor: "chart"
|
|
669
|
-
},
|
|
670
|
-
Generic:
|
|
671
|
-
MetricComparison:
|
|
672
|
-
TableAuto:
|
|
673
|
-
TableBars:
|
|
674
|
-
TableHeatmap:
|
|
675
|
-
TableLarge:
|
|
676
|
-
ChartAuto:
|
|
674
|
+
}, $n = {
|
|
675
|
+
Generic: kt,
|
|
676
|
+
MetricComparison: rn,
|
|
677
|
+
TableAuto: on,
|
|
678
|
+
TableBars: Oi,
|
|
679
|
+
TableHeatmap: zi,
|
|
680
|
+
TableLarge: Ii,
|
|
681
|
+
ChartAuto: mt,
|
|
677
682
|
ChartLine: Di,
|
|
678
|
-
ChartBarH:
|
|
679
|
-
ChartBarV:
|
|
680
|
-
ChartArea:
|
|
681
|
-
ChartStackedArea:
|
|
682
|
-
ChartStackedBar:
|
|
683
|
-
ChartCombo:
|
|
684
|
-
ChartPie:
|
|
685
|
-
Scatter:
|
|
686
|
-
ChartDonut:
|
|
687
|
-
MapBubbles:
|
|
688
|
-
MapConnections:
|
|
689
|
-
Treemap:
|
|
690
|
-
Gauge:
|
|
683
|
+
ChartBarH: ki,
|
|
684
|
+
ChartBarV: mt,
|
|
685
|
+
ChartArea: Ti,
|
|
686
|
+
ChartStackedArea: wi,
|
|
687
|
+
ChartStackedBar: Ci,
|
|
688
|
+
ChartCombo: Si,
|
|
689
|
+
ChartPie: vi,
|
|
690
|
+
Scatter: bi,
|
|
691
|
+
ChartDonut: yi,
|
|
692
|
+
MapBubbles: xi,
|
|
693
|
+
MapConnections: gi,
|
|
694
|
+
Treemap: an,
|
|
695
|
+
Gauge: nn
|
|
691
696
|
}, En = {
|
|
692
697
|
Generic: "DashboardOutlined",
|
|
693
698
|
MetricComparison: "TagOutlined",
|
|
@@ -710,16 +715,16 @@ const zn = {
|
|
|
710
715
|
MapConnections: "TimelineOutlined",
|
|
711
716
|
Treemap: "GridViewOutlined",
|
|
712
717
|
Gauge: "SpeedOutlined"
|
|
713
|
-
}, $n = {
|
|
714
|
-
DateRangePicker: mi,
|
|
715
|
-
DatePicker: ui,
|
|
716
|
-
AutoComplete: hi
|
|
717
718
|
}, An = {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
},
|
|
722
|
-
|
|
719
|
+
DateRangePicker: fi,
|
|
720
|
+
DatePicker: mi,
|
|
721
|
+
AutoComplete: ui
|
|
722
|
+
}, Mn = {
|
|
723
|
+
category: On,
|
|
724
|
+
specificType: $n,
|
|
725
|
+
filterType: An
|
|
726
|
+
}, St = wt(Mn), xa = /* @__PURE__ */ a(({ icons: e, children: n }) => {
|
|
727
|
+
const i = Ee(St), l = Se(
|
|
723
728
|
() => ({
|
|
724
729
|
category: { ...i.category, ...e.category ?? {} },
|
|
725
730
|
specificType: { ...i.specificType, ...e.specificType ?? {} },
|
|
@@ -727,14 +732,14 @@ const zn = {
|
|
|
727
732
|
}),
|
|
728
733
|
[i, e]
|
|
729
734
|
);
|
|
730
|
-
return /* @__PURE__ */ t(
|
|
735
|
+
return /* @__PURE__ */ t(St.Provider, { value: l, children: n });
|
|
731
736
|
}, "CardTypeIconsProvider");
|
|
732
|
-
function
|
|
733
|
-
return
|
|
737
|
+
function Ae() {
|
|
738
|
+
return Ee(St);
|
|
734
739
|
}
|
|
735
|
-
a(
|
|
736
|
-
const
|
|
737
|
-
function
|
|
740
|
+
a(Ae, "useCardTypeIcons");
|
|
741
|
+
const ya = 60, ba = at(we);
|
|
742
|
+
function va(e) {
|
|
738
743
|
const [n, i] = N(0);
|
|
739
744
|
return q(() => {
|
|
740
745
|
const l = e.current;
|
|
@@ -745,38 +750,38 @@ function ba(e) {
|
|
|
745
750
|
return r.observe(l), () => r.disconnect();
|
|
746
751
|
}, [e]), n;
|
|
747
752
|
}
|
|
748
|
-
a(
|
|
749
|
-
const
|
|
753
|
+
a(va, "useElementHeight");
|
|
754
|
+
const At = /* @__PURE__ */ a((e) => {
|
|
750
755
|
var F;
|
|
751
|
-
const n =
|
|
756
|
+
const n = Ae(), [i, l] = N(e.cellConfig.name ?? "[Card Name]"), [o, r] = N(e.cellConfig.actionDescription ?? "[Card Description]"), [g, h] = N(!1), [x, d] = N(e.cellConfig), [v, s] = N(!1), [c, u] = N(!1), p = ee(null), f = ee(null), y = ee(null), R = va(y), H = e.cellConfig.specificType ?? "Generic", L = e.cellConfig.category ?? "Generic", P = n.specificType[H] ?? n.specificType.Generic;
|
|
752
757
|
q(() => {
|
|
753
758
|
d(e.cellConfig);
|
|
754
759
|
}, [e.cellConfig]), q(() => {
|
|
755
|
-
const
|
|
760
|
+
const k = setTimeout(() => {
|
|
756
761
|
if (!p.current) return;
|
|
757
762
|
let z = p.current.getElementsByTagName("input").item(0);
|
|
758
763
|
z || (z = p.current.getElementsByTagName("textarea").item(0)), z && (z.focus(), z.selectionStart = 0, z.selectionEnd = z.value.length);
|
|
759
764
|
}, 50);
|
|
760
|
-
return () => clearTimeout(
|
|
765
|
+
return () => clearTimeout(k);
|
|
761
766
|
}, [g, v]);
|
|
762
|
-
const _ = /* @__PURE__ */ a((
|
|
763
|
-
(!
|
|
764
|
-
}, "handleKeyPress"),
|
|
767
|
+
const _ = /* @__PURE__ */ a((k) => {
|
|
768
|
+
(!k.shiftKey && k.key === "Enter" || k.key === "Escape") && (s(!1), h(!1), e.onDataEdit(x));
|
|
769
|
+
}, "handleKeyPress"), E = /* @__PURE__ */ a((k, z) => {
|
|
765
770
|
const I = z.target.value;
|
|
766
|
-
if (
|
|
767
|
-
|
|
771
|
+
if (k === l && Ne(I).length > ya) return;
|
|
772
|
+
k(I);
|
|
768
773
|
const U = { ...e.cellConfig };
|
|
769
|
-
|
|
770
|
-
}, "handleChange"), V = /* @__PURE__ */ a((
|
|
774
|
+
k === l ? U.name = I : U.actionDescription = I, d(U);
|
|
775
|
+
}, "handleChange"), V = /* @__PURE__ */ a((k, z) => {
|
|
771
776
|
u(!1);
|
|
772
|
-
const I = { ...e.cellConfig, category:
|
|
773
|
-
I.muiIconName = En[z], I.color =
|
|
774
|
-
const U = Oe[
|
|
777
|
+
const I = { ...e.cellConfig, category: k, specificType: z };
|
|
778
|
+
I.muiIconName = En[z], I.color = Pn[k];
|
|
779
|
+
const U = Oe[k];
|
|
775
780
|
(!I.name || I.name.startsWith("[Card") || Object.values(Oe).some((J) => {
|
|
776
781
|
var Q;
|
|
777
782
|
return (Q = I.name) == null ? void 0 : Q.match(new RegExp(`^${J}\\d+$`));
|
|
778
783
|
})) && (I.name = U, l(U)), e.onDataEdit(I);
|
|
779
|
-
}, "handleTypeChange"), K = (F = e.todoItem) == null ? void 0 : F.status, M = { onMouseDown: /* @__PURE__ */ a((
|
|
784
|
+
}, "handleTypeChange"), K = (F = e.todoItem) == null ? void 0 : F.status, M = { onMouseDown: /* @__PURE__ */ a((k) => k.stopPropagation(), "onMouseDown"), onTouchStart: /* @__PURE__ */ a((k) => k.stopPropagation(), "onTouchStart") }, w = e.renderDescription ?? ((k) => /* @__PURE__ */ t("span", { style: { whiteSpace: "pre-wrap" }, children: k }));
|
|
780
785
|
return /* @__PURE__ */ b(
|
|
781
786
|
j,
|
|
782
787
|
{
|
|
@@ -807,13 +812,13 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
807
812
|
}
|
|
808
813
|
),
|
|
809
814
|
/* @__PURE__ */ t(j, { sx: { position: "absolute", top: "15px", right: "-5px", display: "flex", gap: 0, zIndex: 2 }, children: /* @__PURE__ */ t(se, { ...M, children: /* @__PURE__ */ t(Pe, { size: "small", onClick: /* @__PURE__ */ a(() => {
|
|
810
|
-
var
|
|
811
|
-
return (
|
|
812
|
-
}, "onClick"), "aria-label": "Remover card", children: /* @__PURE__ */ t(
|
|
815
|
+
var k;
|
|
816
|
+
return (k = e.onDelete) == null ? void 0 : k.call(e, e.cellConfig.i);
|
|
817
|
+
}, "onClick"), "aria-label": "Remover card", children: /* @__PURE__ */ t(ln, { fontSize: "small" }) }) }) }),
|
|
813
818
|
e.todoItem && e.turnOpen && /* @__PURE__ */ b(
|
|
814
819
|
j,
|
|
815
820
|
{
|
|
816
|
-
sx: /* @__PURE__ */ a((
|
|
821
|
+
sx: /* @__PURE__ */ a((k) => ({
|
|
817
822
|
position: "absolute",
|
|
818
823
|
display: "flex",
|
|
819
824
|
alignItems: "center",
|
|
@@ -825,11 +830,11 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
825
830
|
gap: 2,
|
|
826
831
|
py: 0.4,
|
|
827
832
|
borderRadius: "10px",
|
|
828
|
-
backgroundColor:
|
|
833
|
+
backgroundColor: ve(k.palette.common.black, 0.4),
|
|
829
834
|
opacity: K == "completed" ? 0.6 : 1
|
|
830
835
|
}), "sx"),
|
|
831
836
|
children: [
|
|
832
|
-
/* @__PURE__ */ t(j, { sx: { mt: "1px", flexShrink: 0, color: K == "completed" ? "success.main" : K === "in_progress" ? "primary.main" : "text.disabled" }, children: K == "completed" ? /* @__PURE__ */ t(
|
|
837
|
+
/* @__PURE__ */ t(j, { sx: { mt: "1px", flexShrink: 0, color: K == "completed" ? "success.main" : K === "in_progress" ? "primary.main" : "text.disabled" }, children: K == "completed" ? /* @__PURE__ */ t(Pi, { sx: { fontSize: "0.95rem" } }) : K === "in_progress" ? /* @__PURE__ */ t($i, { sx: { fontSize: "0.95rem" } }) : /* @__PURE__ */ t(gt, { size: 20, sx: { fontSize: "0.95rem" } }) }),
|
|
833
838
|
/* @__PURE__ */ b(j, { sx: { textAlign: "left" }, children: [
|
|
834
839
|
/* @__PURE__ */ t(ie, { variant: "caption", sx: { display: "block", fontSize: "0.78rem", lineHeight: 1.3, textDecoration: K === "completed" ? "line-through" : "none" }, children: e.todoItem.label }),
|
|
835
840
|
e.todoItem.detail && /* @__PURE__ */ t(ie, { variant: "caption", sx: { display: "block", fontSize: "0.7rem", color: "text.secondary", lineHeight: 1.3 }, children: e.todoItem.detail })
|
|
@@ -837,7 +842,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
837
842
|
]
|
|
838
843
|
}
|
|
839
844
|
),
|
|
840
|
-
/* @__PURE__ */ t(Ve, { open: c, anchorEl: f.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps:
|
|
845
|
+
/* @__PURE__ */ t(Ve, { open: c, anchorEl: f.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: k }) => /* @__PURE__ */ t(je, { ...k, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { maxHeight: 380, overflow: "auto", minWidth: 240 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => u(!1), "onClickAway"), children: /* @__PURE__ */ t(xt, { dense: !0, children: Object.entries(ba).map(([z, I], U) => {
|
|
841
846
|
const J = n.category[z];
|
|
842
847
|
return /* @__PURE__ */ b(j, { children: [
|
|
843
848
|
U > 0 && /* @__PURE__ */ t(Ke, {}),
|
|
@@ -847,7 +852,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
847
852
|
] }),
|
|
848
853
|
I.map((Q) => {
|
|
849
854
|
const ne = n.specificType[Q.specificType];
|
|
850
|
-
return /* @__PURE__ */ b(
|
|
855
|
+
return /* @__PURE__ */ b($e, { selected: Q.specificType === H, onClick: /* @__PURE__ */ a(() => V(Q.category, Q.specificType), "onClick"), children: [
|
|
851
856
|
/* @__PURE__ */ t(qe, { children: /* @__PURE__ */ t(ne, { fontSize: "small" }) }),
|
|
852
857
|
/* @__PURE__ */ t(Ye, { children: Q.label })
|
|
853
858
|
] }, Q.specificType);
|
|
@@ -861,7 +866,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
861
866
|
...M,
|
|
862
867
|
ref: f,
|
|
863
868
|
size: "small",
|
|
864
|
-
onClick: /* @__PURE__ */ a(() => u((
|
|
869
|
+
onClick: /* @__PURE__ */ a(() => u((k) => !k), "onClick"),
|
|
865
870
|
title: `Tipo: ${L} / ${H}`,
|
|
866
871
|
sx: { color: "primary.main", mr: 0 },
|
|
867
872
|
children: /* @__PURE__ */ t(P, { fontSize: "small" })
|
|
@@ -879,20 +884,20 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
879
884
|
}
|
|
880
885
|
),
|
|
881
886
|
g && /* @__PURE__ */ t(
|
|
882
|
-
|
|
887
|
+
Fe,
|
|
883
888
|
{
|
|
884
889
|
size: "small",
|
|
885
890
|
ref: p,
|
|
886
891
|
...M,
|
|
887
|
-
onChange: /* @__PURE__ */ a((
|
|
888
|
-
onBlur: /* @__PURE__ */ a((
|
|
892
|
+
onChange: /* @__PURE__ */ a((k) => E(l, k), "onChange"),
|
|
893
|
+
onBlur: /* @__PURE__ */ a((k) => E(l, k), "onBlur"),
|
|
889
894
|
onKeyDown: _,
|
|
890
895
|
value: i,
|
|
891
|
-
sx: /* @__PURE__ */ a((
|
|
896
|
+
sx: /* @__PURE__ */ a((k) => ({
|
|
892
897
|
fontSize: "0.75rem",
|
|
893
898
|
width: "82%",
|
|
894
899
|
"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline": { border: "0px" },
|
|
895
|
-
"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", pl: 3, p: 0, backgroundColor:
|
|
900
|
+
"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", pl: 3, p: 0, backgroundColor: ve(k.palette.text.primary, 0.08) }
|
|
896
901
|
}), "sx"),
|
|
897
902
|
slotProps: {
|
|
898
903
|
root: { style: { padding: "2px 0px 0px 0px", border: "0px" } },
|
|
@@ -914,7 +919,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
914
919
|
}
|
|
915
920
|
),
|
|
916
921
|
v && /* @__PURE__ */ t(
|
|
917
|
-
|
|
922
|
+
Fe,
|
|
918
923
|
{
|
|
919
924
|
slotProps: {
|
|
920
925
|
root: { style: { padding: "0px", border: "0px" } },
|
|
@@ -922,17 +927,17 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
922
927
|
},
|
|
923
928
|
multiline: !0,
|
|
924
929
|
ref: p,
|
|
925
|
-
sx: /* @__PURE__ */ a((
|
|
930
|
+
sx: /* @__PURE__ */ a((k) => ({
|
|
926
931
|
minHeight: "100%",
|
|
927
932
|
alignContent: "start",
|
|
928
933
|
width: "92%",
|
|
929
934
|
"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline": { border: "0px" },
|
|
930
|
-
"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", backgroundColor:
|
|
935
|
+
"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", backgroundColor: ve(k.palette.text.primary, 0.08) }
|
|
931
936
|
}), "sx"),
|
|
932
|
-
onChange: /* @__PURE__ */ a((
|
|
933
|
-
|
|
937
|
+
onChange: /* @__PURE__ */ a((k) => {
|
|
938
|
+
k.stopPropagation(), E(r, k);
|
|
934
939
|
}, "onChange"),
|
|
935
|
-
onBlur: /* @__PURE__ */ a((
|
|
940
|
+
onBlur: /* @__PURE__ */ a((k) => E(r, k), "onBlur"),
|
|
936
941
|
onKeyDown: _,
|
|
937
942
|
value: o
|
|
938
943
|
}
|
|
@@ -941,8 +946,8 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
941
946
|
]
|
|
942
947
|
}
|
|
943
948
|
);
|
|
944
|
-
}, "CardSketch"),
|
|
945
|
-
const [l, o] = N(!1), [r, g] = N(e.name), h = ee(null), x =
|
|
949
|
+
}, "CardSketch"), Sa = At, Mt = /* @__PURE__ */ a(({ filter: e, onEdit: n, onDelete: i }) => {
|
|
950
|
+
const [l, o] = N(!1), [r, g] = N(e.name), h = ee(null), x = Ae().filterType[e.filterType];
|
|
946
951
|
q(() => {
|
|
947
952
|
l && h.current && (h.current.focus(), h.current.select());
|
|
948
953
|
}, [l]), q(() => {
|
|
@@ -978,7 +983,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
978
983
|
children: [
|
|
979
984
|
/* @__PURE__ */ t(x, { sx: { fontSize: 16, color: "primary.main", flexShrink: 0 } }),
|
|
980
985
|
l ? /* @__PURE__ */ t(
|
|
981
|
-
|
|
986
|
+
Fe,
|
|
982
987
|
{
|
|
983
988
|
inputRef: h,
|
|
984
989
|
value: r,
|
|
@@ -1013,7 +1018,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
1013
1018
|
e.filterType !== "AutoComplete" && /* @__PURE__ */ t(Ie, { title: e.mandatory ? "Mandatory filter" : "Optional filter", arrow: !0, children: /* @__PURE__ */ b(j, { sx: { display: "inline-flex", alignItems: "center", gap: 0 }, children: [
|
|
1014
1019
|
/* @__PURE__ */ t(ie, { variant: "caption", sx: { fontSize: "0.6rem", color: "text.secondary", minWidth: "55px", whiteSpace: "nowrap" }, children: e.mandatory ? "Obrigatório" : "Opcional" }),
|
|
1015
1020
|
/* @__PURE__ */ t(
|
|
1016
|
-
|
|
1021
|
+
yt,
|
|
1017
1022
|
{
|
|
1018
1023
|
size: "small",
|
|
1019
1024
|
checked: e.mandatory,
|
|
@@ -1025,7 +1030,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
1025
1030
|
e.filterType === "AutoComplete" && /* @__PURE__ */ t(Ie, { title: e.multipleSelection ? "Multiple selection" : "Single selection", arrow: !0, children: /* @__PURE__ */ b(j, { sx: { display: "inline-flex", alignItems: "center", gap: 0 }, children: [
|
|
1026
1031
|
/* @__PURE__ */ t(ie, { variant: "caption", sx: { fontSize: "0.6rem", color: "text.secondary", whiteSpace: "wrap", minWidth: "43px" }, children: e.multipleSelection ? "Multiple" : "Single" }),
|
|
1027
1032
|
/* @__PURE__ */ t(
|
|
1028
|
-
|
|
1033
|
+
yt,
|
|
1029
1034
|
{
|
|
1030
1035
|
size: "small",
|
|
1031
1036
|
checked: e.multipleSelection ?? !1,
|
|
@@ -1034,7 +1039,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
1034
1039
|
}
|
|
1035
1040
|
)
|
|
1036
1041
|
] }) }),
|
|
1037
|
-
/* @__PURE__ */ t(Pe, { size: "small", onClick: /* @__PURE__ */ a(() => i(e.i), "onClick"), sx: { p: 0.2, ml: "auto" }, "aria-label": "Remover filtro", children: /* @__PURE__ */ t(
|
|
1042
|
+
/* @__PURE__ */ t(Pe, { size: "small", onClick: /* @__PURE__ */ a(() => i(e.i), "onClick"), sx: { p: 0.2, ml: "auto" }, "aria-label": "Remover filtro", children: /* @__PURE__ */ t(ln, { sx: { fontSize: 14 } }) })
|
|
1038
1043
|
]
|
|
1039
1044
|
}
|
|
1040
1045
|
);
|
|
@@ -1061,7 +1066,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
1061
1066
|
width: "100%"
|
|
1062
1067
|
}), "sx"),
|
|
1063
1068
|
children: n ? /* @__PURE__ */ t(
|
|
1064
|
-
|
|
1069
|
+
Fe,
|
|
1065
1070
|
{
|
|
1066
1071
|
inputRef: r,
|
|
1067
1072
|
value: l,
|
|
@@ -1113,7 +1118,7 @@ const $t = /* @__PURE__ */ a((e) => {
|
|
|
1113
1118
|
)
|
|
1114
1119
|
}
|
|
1115
1120
|
);
|
|
1116
|
-
}, "TitleSketch"),
|
|
1121
|
+
}, "TitleSketch"), Ca = Ge, wa = Ge, Ta = { Large: 4, Desktop: 4, Tablet: 4, Mobile: 4 }, ka = { Large: 12, Desktop: 12, Tablet: 12, Mobile: 12 }, pt = 6;
|
|
1117
1122
|
function Da(e, n, i = 0) {
|
|
1118
1123
|
const [l, o] = N(i);
|
|
1119
1124
|
return q(() => {
|
|
@@ -1127,79 +1132,79 @@ function Da(e, n, i = 0) {
|
|
|
1127
1132
|
}, [e, n]), l;
|
|
1128
1133
|
}
|
|
1129
1134
|
a(Da, "useContainerWidth");
|
|
1130
|
-
const
|
|
1135
|
+
const Ia = /* @__PURE__ */ a((e) => {
|
|
1131
1136
|
const n = Math.round(Date.now() * Math.pow(10, -6));
|
|
1132
|
-
return `${
|
|
1133
|
-
}, "makeNameUnique"),
|
|
1137
|
+
return `${nt(e)}_${n}`;
|
|
1138
|
+
}, "makeNameUnique"), rt = Tt((e, n) => {
|
|
1134
1139
|
const i = he(), l = B((m) => {
|
|
1135
|
-
var
|
|
1136
|
-
return (
|
|
1137
|
-
}) ??
|
|
1138
|
-
var
|
|
1139
|
-
return (
|
|
1140
|
-
}) ??
|
|
1141
|
-
var
|
|
1142
|
-
return ((
|
|
1140
|
+
var D;
|
|
1141
|
+
return (D = m.dashboardDefinition) == null ? void 0 : D.cards;
|
|
1142
|
+
}) ?? za, o = B((m) => {
|
|
1143
|
+
var D;
|
|
1144
|
+
return (D = m.dashboardDefinition) == null ? void 0 : D.filters;
|
|
1145
|
+
}) ?? Oa, r = B((m) => {
|
|
1146
|
+
var D;
|
|
1147
|
+
return ((D = m.dashboardDefinition) == null ? void 0 : D.name) ?? "";
|
|
1143
1148
|
}), g = B((m) => {
|
|
1144
|
-
var
|
|
1145
|
-
return ((
|
|
1149
|
+
var D;
|
|
1150
|
+
return ((D = m.dashboardDefinition) == null ? void 0 : D.layoutType) ?? "Boxed";
|
|
1146
1151
|
}), h = B((m) => {
|
|
1147
|
-
var
|
|
1148
|
-
return (
|
|
1149
|
-
}), x = B((m) => m.turnOpen), d = B((m) => m.todosByCardKey), [v, s] = N([]), c = ee(null), u = Da(c, e.renderId), [p, f] = N(null), [y, R] = N(0), H = ee({}), L = ee(0), P = ee(void 0), _ = le(),
|
|
1150
|
-
|
|
1152
|
+
var D;
|
|
1153
|
+
return (D = m.dashboardDefinition) == null ? void 0 : D.id;
|
|
1154
|
+
}), x = B((m) => m.turnOpen), d = B((m) => m.todosByCardKey), [v, s] = N([]), c = ee(null), u = Da(c, e.renderId), [p, f] = N(null), [y, R] = N(0), H = ee({}), L = ee(0), P = ee(void 0), _ = le(), E = e.zoomLevel ?? 0.8, V = W((m, D) => {
|
|
1155
|
+
D && (i.getState().recordSketchChange("dashboard:layoutType", `Set layout type to ${D}`), i.getState().updateDashboard({ layoutType: D }));
|
|
1151
1156
|
}, [i]);
|
|
1152
1157
|
q(() => {
|
|
1153
1158
|
if (h === P.current || (P.current = h, !h)) return;
|
|
1154
|
-
const m = i.getState().dashboardDefinition,
|
|
1155
|
-
H.current = {},
|
|
1156
|
-
const G = Oe[
|
|
1159
|
+
const m = i.getState().dashboardDefinition, D = (m == null ? void 0 : m.cards) ?? [];
|
|
1160
|
+
H.current = {}, D.forEach(($) => {
|
|
1161
|
+
const G = Oe[$.category ?? "Generic"];
|
|
1157
1162
|
H.current[G] = (H.current[G] ?? 0) + 1;
|
|
1158
|
-
}), L.current = ((m == null ? void 0 : m.filters) ?? []).length, s(
|
|
1163
|
+
}), L.current = ((m == null ? void 0 : m.filters) ?? []).length, s(D);
|
|
1159
1164
|
}, [h, i]);
|
|
1160
1165
|
const K = W((m) => {
|
|
1161
|
-
const
|
|
1162
|
-
return H.current[
|
|
1163
|
-
}, []), M = W((m,
|
|
1166
|
+
const D = Oe[m], $ = (H.current[D] ?? 0) + 1;
|
|
1167
|
+
return H.current[D] = $, Ia(`${D}${$}`);
|
|
1168
|
+
}, []), M = W((m, D) => {
|
|
1164
1169
|
s(m);
|
|
1165
|
-
}, []), w = W((m,
|
|
1170
|
+
}, []), w = W((m, D, $) => {
|
|
1166
1171
|
var pe;
|
|
1167
|
-
if (!
|
|
1172
|
+
if (!D || !$) return;
|
|
1168
1173
|
const G = ((pe = i.getState().dashboardDefinition) == null ? void 0 : pe.cards) ?? [];
|
|
1169
1174
|
let Z = !1;
|
|
1170
1175
|
const te = G.map((xe) => {
|
|
1171
|
-
const ye = m.find((
|
|
1176
|
+
const ye = m.find((li) => li.i === xe.i);
|
|
1172
1177
|
return ye && (xe.w !== ye.w || xe.h !== ye.h || xe.x !== ye.x || xe.y !== ye.y) ? (Z = !0, { ...xe, w: ye.w, h: ye.h, x: ye.x, y: ye.y }) : xe;
|
|
1173
1178
|
});
|
|
1174
1179
|
if (!Z) return;
|
|
1175
|
-
const T = G.find((xe) => xe.i ===
|
|
1176
|
-
ae && fe ? i.getState().recordSketchChange(
|
|
1180
|
+
const T = G.find((xe) => xe.i === $.i), O = (T == null ? void 0 : T.name) ?? $.i, ae = D.w !== $.w || D.h !== $.h, fe = D.x !== $.x || D.y !== $.y, Ce = `card:${$.i}:layout`;
|
|
1181
|
+
ae && fe ? i.getState().recordSketchChange(Ce, `Resized and moved card '${O}' to (w:${$.w}, h:${$.h}, x:${$.x}, y:${$.y})`) : ae ? i.getState().recordSketchChange(Ce, `Resized card '${O}' to (w:${$.w}, h:${$.h})`) : fe && i.getState().recordSketchChange(Ce, `Moved card '${O}' to (x:${$.x}, y:${$.y})`), i.getState().updateDashboard({ cards: te });
|
|
1177
1182
|
}, [i]), F = W((m) => {
|
|
1178
1183
|
var G;
|
|
1179
|
-
const
|
|
1180
|
-
i.getState().recordSketchChange(`card:${m}:delete`, `Deleted card '${(
|
|
1181
|
-
}, [i]),
|
|
1182
|
-
const
|
|
1184
|
+
const D = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.cards) ?? [], $ = D.find((Z) => Z.i === m);
|
|
1185
|
+
i.getState().recordSketchChange(`card:${m}:delete`, `Deleted card '${($ == null ? void 0 : $.name) ?? m}'`), i.getState().updateDashboard({ cards: D.filter((Z) => Z.i !== m) });
|
|
1186
|
+
}, [i]), k = W((m = "Generic", D = "Generic") => {
|
|
1187
|
+
const $ = K(m);
|
|
1183
1188
|
return {
|
|
1184
|
-
i: $
|
|
1185
|
-
h:
|
|
1189
|
+
i: nt($),
|
|
1190
|
+
h: pt,
|
|
1186
1191
|
w: y,
|
|
1187
1192
|
y: 1 / 0,
|
|
1188
1193
|
x: 0,
|
|
1189
1194
|
isDraggable: void 0,
|
|
1190
1195
|
isResizable: !0,
|
|
1191
1196
|
category: m,
|
|
1192
|
-
specificType:
|
|
1193
|
-
name:
|
|
1197
|
+
specificType: D,
|
|
1198
|
+
name: $
|
|
1194
1199
|
};
|
|
1195
1200
|
}, [y, K]), z = W((m) => {
|
|
1196
|
-
const
|
|
1197
|
-
i.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${
|
|
1201
|
+
const D = m.length === 0 ? "Untitled Dashboard" : m;
|
|
1202
|
+
i.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${D}'`), i.getState().updateDashboard({ name: D });
|
|
1198
1203
|
}, [i]), I = W((m) => {
|
|
1199
1204
|
var T;
|
|
1200
|
-
const
|
|
1205
|
+
const D = ((T = i.getState().dashboardDefinition) == null ? void 0 : T.cards) ?? [], $ = v.find((O) => O.i === m.i), G = D.find((O) => O.i === m.i), Z = D.map((O) => O.i !== m.i ? O : {
|
|
1201
1206
|
...O,
|
|
1202
|
-
|
|
1207
|
+
...$ ? { w: $.w, h: $.h, x: $.x, y: $.y } : {},
|
|
1203
1208
|
name: m.name,
|
|
1204
1209
|
actionDescription: m.actionDescription,
|
|
1205
1210
|
category: m.category,
|
|
@@ -1208,50 +1213,50 @@ const ka = /* @__PURE__ */ a((e) => {
|
|
|
1208
1213
|
}), te = [];
|
|
1209
1214
|
G && (G.name !== m.name && te.push(`name → '${m.name}'`), G.actionDescription !== m.actionDescription && te.push("description"), G.category !== m.category && te.push(`category → '${m.category}'`), G.specificType !== m.specificType && te.push(`type → '${m.specificType}'`), G.muiIconName !== m.muiIconName && te.push("icon")), te.length > 0 && i.getState().recordSketchChange(`card:${m.i}:edit`, `Edited card '${(G == null ? void 0 : G.name) ?? m.name}' (${te.join(", ")})`), i.getState().updateDashboard({ cards: Z });
|
|
1210
1215
|
}, [v, i]), U = W(() => {
|
|
1211
|
-
const m = p ?
|
|
1212
|
-
let
|
|
1213
|
-
return
|
|
1214
|
-
}, [p, v, y]), J = W((m,
|
|
1216
|
+
const m = p ? ka[p] : 10, D = v.length > 0 ? v[v.length - 1] : null;
|
|
1217
|
+
let $ = 0, G = 0;
|
|
1218
|
+
return D && (G = D.y, D.x + D.w > m - y ? (G += 1, $ = 0) : $ = D.x + D.w), { x: $, y: G };
|
|
1219
|
+
}, [p, v, y]), J = W((m, D) => {
|
|
1215
1220
|
var G;
|
|
1216
|
-
const
|
|
1217
|
-
i.getState().recordSketchChange(`card:${m.i}:add`,
|
|
1218
|
-
}, [i]), Q = W((m,
|
|
1219
|
-
const
|
|
1220
|
-
Z.actionDescription = m == null ? void 0 : m.description,
|
|
1221
|
-
}, [
|
|
1221
|
+
const $ = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.cards) ?? [];
|
|
1222
|
+
i.getState().recordSketchChange(`card:${m.i}:add`, D), i.getState().updateDashboard({ cards: [...$, m] });
|
|
1223
|
+
}, [i]), Q = W((m, D) => {
|
|
1224
|
+
const $ = (m == null ? void 0 : m.category) ?? "Generic", G = (m == null ? void 0 : m.specificType) ?? "Generic", Z = k($, G);
|
|
1225
|
+
Z.actionDescription = m == null ? void 0 : m.description, D && (Z.h = pt, Z.w = y, Z.y = D.y, Z.x = D.x), J(Z, `Added card '${Z.name}' (category: ${$}, type: ${G})`);
|
|
1226
|
+
}, [k, y, J]), ne = W(() => {
|
|
1222
1227
|
if (y === 0) return;
|
|
1223
|
-
const m =
|
|
1224
|
-
m.x =
|
|
1225
|
-
}, [y,
|
|
1226
|
-
const G =
|
|
1227
|
-
G.x = Z.x, G.y = Z.y, G.w = y, G.h =
|
|
1228
|
-
}, [y,
|
|
1228
|
+
const m = k("Generic", "Generic"), D = U();
|
|
1229
|
+
m.x = D.x, m.y = D.y, J(m, `Added card '${m.name}'`);
|
|
1230
|
+
}, [y, k, U, J]), de = W((m, D, $) => {
|
|
1231
|
+
const G = k(m, D), Z = U();
|
|
1232
|
+
G.x = Z.x, G.y = Z.y, G.w = y, G.h = pt, J(G, `Added card '${G.name}' (category: ${m}, type: ${D})`);
|
|
1233
|
+
}, [y, k, U, J]);
|
|
1229
1234
|
q(() => {
|
|
1230
1235
|
if (u == 0) return;
|
|
1231
1236
|
let m = "Desktop";
|
|
1232
|
-
u >= 920 && (m = "Large"), u < 920 && (m = "Desktop"), u < 750 && (m = "Tablet"), u < 600 && (m = "Mobile"), f(m), R(
|
|
1237
|
+
u >= 920 && (m = "Large"), u < 920 && (m = "Desktop"), u < 750 && (m = "Tablet"), u < 600 && (m = "Mobile"), f(m), R(Ta[m]);
|
|
1233
1238
|
}, [u]);
|
|
1234
1239
|
const me = W((m) => {
|
|
1235
1240
|
var T;
|
|
1236
1241
|
L.current += 1;
|
|
1237
|
-
const
|
|
1238
|
-
let
|
|
1239
|
-
m == "DateRangePicker" && (
|
|
1240
|
-
const G = ze(), Z = { i: G, name:
|
|
1242
|
+
const D = `Filter${L.current}`;
|
|
1243
|
+
let $ = !1;
|
|
1244
|
+
m == "DateRangePicker" && ($ = !0);
|
|
1245
|
+
const G = ze(), Z = { i: G, name: D, filterType: m, mandatory: $, multipleSelection: !0 }, te = ((T = i.getState().dashboardDefinition) == null ? void 0 : T.filters) ?? [];
|
|
1241
1246
|
i.getState().recordSketchChange(`filter:${G}:add`, `Added filter '${Z.name}' (type: ${m})`), i.getState().updateDashboard({ filters: [...te, Z] });
|
|
1242
1247
|
}, [i]), ge = W((m) => {
|
|
1243
|
-
var
|
|
1244
|
-
const
|
|
1248
|
+
var $;
|
|
1249
|
+
const D = (($ = i.getState().dashboardDefinition) == null ? void 0 : $.filters) ?? [];
|
|
1245
1250
|
i.getState().recordSketchChange(
|
|
1246
1251
|
`filter:${m.i}:edit`,
|
|
1247
1252
|
`Edited filter '${m.name}' - ${m.mandatory ? "Mandatório" : "Opcional"} - ${m.multipleSelection ? "MultipleSelection" : "SingleValue"}`
|
|
1248
|
-
), i.getState().updateDashboard({ filters:
|
|
1253
|
+
), i.getState().updateDashboard({ filters: D.map((G) => G.i === m.i ? { ...m } : G) });
|
|
1249
1254
|
}, [i]), C = W((m) => {
|
|
1250
1255
|
var G;
|
|
1251
|
-
const
|
|
1252
|
-
i.getState().recordSketchChange(`filter:${m}:delete`, `Deleted filter '${(
|
|
1256
|
+
const D = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.filters) ?? [], $ = D.find((Z) => Z.i === m);
|
|
1257
|
+
i.getState().recordSketchChange(`filter:${m}:delete`, `Deleted filter '${($ == null ? void 0 : $.name) ?? m}'`), i.getState().updateDashboard({ filters: D.filter((Z) => Z.i !== m) });
|
|
1253
1258
|
}, [i]);
|
|
1254
|
-
|
|
1259
|
+
en(n, () => ({ addGenericCell: ne, addTypedCell: de, handleAddFilter: me }), [ne, de, me]);
|
|
1255
1260
|
const A = /* @__PURE__ */ a((m) => ({ border: m ? "0px" : `1px solid ${_.palette.divider}`, px: 1, py: 0, gap: 0.5, textTransform: "none" }), "toggleSx"), Y = /* @__PURE__ */ a((m) => ({
|
|
1256
1261
|
fontSize: "0.75rem",
|
|
1257
1262
|
lineHeight: 1,
|
|
@@ -1267,7 +1272,7 @@ const ka = /* @__PURE__ */ a((e) => {
|
|
|
1267
1272
|
/* @__PURE__ */ b(j, { sx: { position: "relative", display: "inline-flex", width: "25%", gap: 1, top: -2, justifyContent: "center", alignItems: "center" }, children: [
|
|
1268
1273
|
/* @__PURE__ */ t(ie, { component: "span", sx: { color: "text.secondary" }, children: "Layout:" }),
|
|
1269
1274
|
/* @__PURE__ */ b(
|
|
1270
|
-
|
|
1275
|
+
dn,
|
|
1271
1276
|
{
|
|
1272
1277
|
value: g,
|
|
1273
1278
|
exclusive: !0,
|
|
@@ -1282,7 +1287,7 @@ const ka = /* @__PURE__ */ a((e) => {
|
|
|
1282
1287
|
/* @__PURE__ */ t(ie, { component: "span", sx: Y(g === "Boxed"), children: "Boxed" })
|
|
1283
1288
|
] }),
|
|
1284
1289
|
/* @__PURE__ */ b(Je, { value: "Naked", "data-env-id": "dashboard-pad-layout-naked", sx: A(g === "Naked"), children: [
|
|
1285
|
-
/* @__PURE__ */ t(
|
|
1290
|
+
/* @__PURE__ */ t(Ai, { sx: { fontSize: 18 } }),
|
|
1286
1291
|
/* @__PURE__ */ t(ie, { component: "span", sx: Y(g === "Naked"), children: "Naked" })
|
|
1287
1292
|
] })
|
|
1288
1293
|
]
|
|
@@ -1291,87 +1296,101 @@ const ka = /* @__PURE__ */ a((e) => {
|
|
|
1291
1296
|
e.headerExtra
|
|
1292
1297
|
] })
|
|
1293
1298
|
] }),
|
|
1294
|
-
o.length > 0 && !e.hideFiltersInSketch && /* @__PURE__ */ t(j, { sx: { display: "inline-flex", justifyContent: "flex-end", flexWrap: "wrap", gap: 1, pt: 0.5, pb: 0, pr: 1, pl: 1, borderBottom: `1px solid ${_.palette.divider}` }, children: o.map((m) => /* @__PURE__ */ t(
|
|
1295
|
-
/* @__PURE__ */ b(
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
{
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
breakpoints: { lg: 920, md: 600, sm: 400, xs: 400, xxs: 0 },
|
|
1307
|
-
rowHeight: 10,
|
|
1308
|
-
dragLocked: !1,
|
|
1309
|
-
zoomLevel: $,
|
|
1310
|
-
responsive: !1,
|
|
1311
|
-
maxRows: 200,
|
|
1312
|
-
rowMultiplier: 1,
|
|
1313
|
-
manualWidth: u,
|
|
1314
|
-
layouts: l,
|
|
1315
|
-
children: l.map((m) => {
|
|
1316
|
-
var k;
|
|
1317
|
-
return /* @__PURE__ */ t(
|
|
1318
|
-
qi,
|
|
1319
|
-
{
|
|
1320
|
-
className: "llm-env-target llm-env-card llm-env-card-sketch-wrapper",
|
|
1321
|
-
"data-env-id": m.i,
|
|
1322
|
-
naked: g == "Naked",
|
|
1323
|
-
"data-env-key": m.i,
|
|
1324
|
-
"data-env-name": m.name ?? "",
|
|
1325
|
-
"data-env-kind": "sketch-card-wrapper",
|
|
1326
|
-
children: /* @__PURE__ */ t(
|
|
1327
|
-
$t,
|
|
1328
|
-
{
|
|
1329
|
-
turnOpen: x ?? !1,
|
|
1330
|
-
todoItem: (k = d[m.i]) == null ? void 0 : k.todo,
|
|
1331
|
-
cellConfig: m,
|
|
1332
|
-
onDataEdit: I,
|
|
1333
|
-
onDelete: F,
|
|
1334
|
-
renderDescription: e.renderDescription
|
|
1335
|
-
}
|
|
1336
|
-
)
|
|
1337
|
-
},
|
|
1338
|
-
m.i
|
|
1339
|
-
);
|
|
1340
|
-
})
|
|
1299
|
+
o.length > 0 && !e.hideFiltersInSketch && /* @__PURE__ */ t(j, { sx: { display: "inline-flex", justifyContent: "flex-end", flexWrap: "wrap", gap: 1, pt: 0.5, pb: 0, pr: 1, pl: 1, borderBottom: `1px solid ${_.palette.divider}` }, children: o.map((m) => /* @__PURE__ */ t(Mt, { filter: m, onEdit: ge, onDelete: C }, m.i)) }),
|
|
1300
|
+
/* @__PURE__ */ b(
|
|
1301
|
+
"div",
|
|
1302
|
+
{
|
|
1303
|
+
style: {
|
|
1304
|
+
maxHeight: "100%",
|
|
1305
|
+
height: "100%",
|
|
1306
|
+
overflow: "auto",
|
|
1307
|
+
backgroundColor: _.palette.action.hover,
|
|
1308
|
+
backgroundImage: `radial-gradient(${ve(_.palette.text.primary, 0.14)} 1px, transparent 1px)`,
|
|
1309
|
+
backgroundSize: "16px 16px",
|
|
1310
|
+
backgroundPosition: "8px 8px"
|
|
1341
1311
|
},
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1312
|
+
children: [
|
|
1313
|
+
u !== 0 && l.length > 0 && /* @__PURE__ */ t("div", { style: { display: "inline-flex", flex: 1, alignItems: "center", justifyContent: "center", paddingBottom: e.hideInternalHeader ? "50px" : "80px", overflow: "auto", width: "100%" }, children: /* @__PURE__ */ t(
|
|
1314
|
+
qi,
|
|
1315
|
+
{
|
|
1316
|
+
rowAwareResize: { defaultOn: !0 },
|
|
1317
|
+
onLayoutChange: M,
|
|
1318
|
+
onResizeStop: w,
|
|
1319
|
+
onDragStop: w,
|
|
1320
|
+
onDrop: Q,
|
|
1321
|
+
config: {},
|
|
1322
|
+
cols: { lg: 10, md: 8, sm: 4, xs: 4, xxs: 4 },
|
|
1323
|
+
breakpoints: { lg: 920, md: 600, sm: 400, xs: 400, xxs: 0 },
|
|
1324
|
+
rowHeight: 10,
|
|
1325
|
+
dragLocked: !1,
|
|
1326
|
+
zoomLevel: E,
|
|
1327
|
+
responsive: !1,
|
|
1328
|
+
maxRows: 200,
|
|
1329
|
+
rowMultiplier: 1,
|
|
1330
|
+
manualWidth: u,
|
|
1331
|
+
layouts: l,
|
|
1332
|
+
children: l.map((m) => {
|
|
1333
|
+
var D;
|
|
1334
|
+
return /* @__PURE__ */ t(
|
|
1335
|
+
Yi,
|
|
1336
|
+
{
|
|
1337
|
+
className: "llm-env-target llm-env-card llm-env-card-sketch-wrapper",
|
|
1338
|
+
"data-env-id": m.i,
|
|
1339
|
+
naked: g == "Naked",
|
|
1340
|
+
"data-env-key": m.i,
|
|
1341
|
+
"data-env-name": m.name ?? "",
|
|
1342
|
+
"data-env-kind": "sketch-card-wrapper",
|
|
1343
|
+
children: /* @__PURE__ */ t(
|
|
1344
|
+
At,
|
|
1345
|
+
{
|
|
1346
|
+
turnOpen: x ?? !1,
|
|
1347
|
+
todoItem: (D = d[m.i]) == null ? void 0 : D.todo,
|
|
1348
|
+
cellConfig: m,
|
|
1349
|
+
onDataEdit: I,
|
|
1350
|
+
onDelete: F,
|
|
1351
|
+
renderDescription: e.renderDescription
|
|
1352
|
+
}
|
|
1353
|
+
)
|
|
1354
|
+
},
|
|
1355
|
+
m.i
|
|
1356
|
+
);
|
|
1357
|
+
})
|
|
1358
|
+
},
|
|
1359
|
+
h
|
|
1360
|
+
) }),
|
|
1361
|
+
u !== 0 && l.length == 0 && /* @__PURE__ */ t(
|
|
1362
|
+
j,
|
|
1363
|
+
{
|
|
1364
|
+
sx: /* @__PURE__ */ a((m) => ({
|
|
1365
|
+
background: "transparent",
|
|
1366
|
+
border: "none",
|
|
1367
|
+
textAlign: "left",
|
|
1368
|
+
padding: "6px 0",
|
|
1369
|
+
height: "100%",
|
|
1370
|
+
color: m.palette.text.secondary,
|
|
1371
|
+
fontFamily: m.typography.fontFamily,
|
|
1372
|
+
display: "inline-flex",
|
|
1373
|
+
width: "100%",
|
|
1374
|
+
justifyContent: "center",
|
|
1375
|
+
alignItems: "center",
|
|
1376
|
+
"&:hover": { color: m.palette.text.primary }
|
|
1377
|
+
}), "sx"),
|
|
1378
|
+
children: /* @__PURE__ */ b(se, { direction: "row", gap: 1, sx: { "&:hover": { cursor: "pointer" } }, onClick: /* @__PURE__ */ a(() => {
|
|
1379
|
+
var m;
|
|
1380
|
+
return (m = e.onAddCard) == null ? void 0 : m.call(e);
|
|
1381
|
+
}, "onClick"), children: [
|
|
1382
|
+
/* @__PURE__ */ t(j, { component: "span", sx: /* @__PURE__ */ a((m) => ({ color: m.palette.text.disabled }), "sx"), children: "↗" }),
|
|
1383
|
+
/* @__PURE__ */ t(ie, { sx: /* @__PURE__ */ a((m) => ({ fontSize: 20, fontWeight: 600, color: m.palette.text.primary, margin: 0, lineHeight: 1.2, letterSpacing: -0.4 }), "sx"), children: "Clique aqui para adicionar um novo card" })
|
|
1384
|
+
] })
|
|
1385
|
+
}
|
|
1386
|
+
)
|
|
1387
|
+
]
|
|
1388
|
+
}
|
|
1389
|
+
)
|
|
1371
1390
|
] });
|
|
1372
1391
|
});
|
|
1373
|
-
|
|
1374
|
-
const
|
|
1392
|
+
rt.displayName = "DashboardPadSketch";
|
|
1393
|
+
const za = [], Oa = [], ke = /* @__PURE__ */ a((e) => {
|
|
1375
1394
|
const n = le(), i = e.maxWidth ?? 30;
|
|
1376
1395
|
return /* @__PURE__ */ t(
|
|
1377
1396
|
j,
|
|
@@ -1426,8 +1445,8 @@ const Ia = [], za = [], De = /* @__PURE__ */ a((e) => {
|
|
|
1426
1445
|
] })
|
|
1427
1446
|
}
|
|
1428
1447
|
);
|
|
1429
|
-
}, "HoverButton"),
|
|
1430
|
-
function
|
|
1448
|
+
}, "HoverButton"), Pa = at(we);
|
|
1449
|
+
function $a(e, n, i) {
|
|
1431
1450
|
const l = document.createElement("div");
|
|
1432
1451
|
return l.style.cssText = [
|
|
1433
1452
|
"display:flex",
|
|
@@ -1449,9 +1468,9 @@ function Pa(e, n, i) {
|
|
|
1449
1468
|
"pointer-events:none"
|
|
1450
1469
|
].join(";"), l.innerHTML = `${n}<span>${i}</span>`, document.body.appendChild(l), l;
|
|
1451
1470
|
}
|
|
1452
|
-
a(
|
|
1453
|
-
const
|
|
1454
|
-
const l = le(), o =
|
|
1471
|
+
a($a, "createDragPreview");
|
|
1472
|
+
const Rn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }) => {
|
|
1473
|
+
const l = le(), o = Ae(), [r, g] = N(!1), [h, x] = N(!1), d = ee(null), v = ee(null), s = ee(null);
|
|
1455
1474
|
q(() => () => {
|
|
1456
1475
|
var f;
|
|
1457
1476
|
return (f = s.current) == null ? void 0 : f.remove();
|
|
@@ -1462,7 +1481,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1462
1481
|
}, []), u = /* @__PURE__ */ a((f, y) => {
|
|
1463
1482
|
const R = y ? { category: y.category, specificType: y.specificType, label: y.label } : { category: "Generic", specificType: "Generic", label: "Generic" };
|
|
1464
1483
|
f.dataTransfer.setData("text/json", JSON.stringify(R)), f.dataTransfer.effectAllowed = "copy", c();
|
|
1465
|
-
const H = f.currentTarget.querySelector("svg"), L = H ? H.outerHTML.replace(/width="[^"]*"/, 'width="18"').replace(/height="[^"]*"/, 'height="18"') : "", P =
|
|
1484
|
+
const H = f.currentTarget.querySelector("svg"), L = H ? H.outerHTML.replace(/width="[^"]*"/, 'width="18"').replace(/height="[^"]*"/, 'height="18"') : "", P = $a(l, L, (y == null ? void 0 : y.label) ?? "Generic");
|
|
1466
1485
|
s.current = P, f.dataTransfer.setDragImage(P, 0, 0);
|
|
1467
1486
|
}, "handleDragStart"), p = /* @__PURE__ */ a((f) => {
|
|
1468
1487
|
n(f.category, f.specificType, f.label), g(!1);
|
|
@@ -1489,19 +1508,19 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1489
1508
|
"&:hover": { bgcolor: "action.hover" },
|
|
1490
1509
|
"&:active": { cursor: "grabbing" }
|
|
1491
1510
|
},
|
|
1492
|
-
children: /* @__PURE__ */ t(
|
|
1511
|
+
children: /* @__PURE__ */ t(Mi, { sx: { fontSize: 16 }, color: "secondary" })
|
|
1493
1512
|
}
|
|
1494
1513
|
) }),
|
|
1495
1514
|
/* @__PURE__ */ b(j, { sx: { position: "relative", display: "inline-flex", alignItems: "center" }, children: [
|
|
1496
1515
|
/* @__PURE__ */ t(Ie, { title: "Add card", children: /* @__PURE__ */ t(
|
|
1497
|
-
|
|
1516
|
+
Nt,
|
|
1498
1517
|
{
|
|
1499
1518
|
className: "action-btn llm-env-target llm-env-dashboard-action",
|
|
1500
1519
|
"data-env-id": "dashboardpad-add-card",
|
|
1501
1520
|
variant: "outlined",
|
|
1502
1521
|
size: "small",
|
|
1503
1522
|
color: "secondary",
|
|
1504
|
-
startIcon: /* @__PURE__ */ t(
|
|
1523
|
+
startIcon: /* @__PURE__ */ t(Ri, { sx: { m: 0.2, p: 0 } }),
|
|
1505
1524
|
onClick: e,
|
|
1506
1525
|
sx: { height: 28, fontSize: "0.7rem", pr: 1, gap: 0, minWidth: "80px", textTransform: "none", justifyContent: "left" },
|
|
1507
1526
|
children: "Card"
|
|
@@ -1517,11 +1536,11 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1517
1536
|
onClick: /* @__PURE__ */ a(() => g((f) => !f), "onClick"),
|
|
1518
1537
|
sx: { position: "absolute", right: 0, height: 28, width: 20 },
|
|
1519
1538
|
"aria-label": "Tipos de card",
|
|
1520
|
-
children: /* @__PURE__ */ t(
|
|
1539
|
+
children: /* @__PURE__ */ t(ft, { color: "secondary", sx: { fontSize: 18, mr: 0.5 } })
|
|
1521
1540
|
}
|
|
1522
1541
|
)
|
|
1523
1542
|
] }),
|
|
1524
|
-
/* @__PURE__ */ t(Ve, { open: r, anchorEl: d.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(
|
|
1543
|
+
/* @__PURE__ */ t(Ve, { open: r, anchorEl: d.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { maxHeight: 420, overflow: "auto", minWidth: 260 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => g(!1), "onClickAway"), children: /* @__PURE__ */ t(xt, { dense: !0, children: Object.entries(Pa).map(([y, R], H) => {
|
|
1525
1544
|
const L = o.category[y];
|
|
1526
1545
|
return /* @__PURE__ */ b(j, { children: [
|
|
1527
1546
|
H > 0 && /* @__PURE__ */ t(Ke, {}),
|
|
@@ -1531,7 +1550,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1531
1550
|
] }),
|
|
1532
1551
|
R.map((P) => {
|
|
1533
1552
|
const _ = o.specificType[P.specificType];
|
|
1534
|
-
return /* @__PURE__ */ b(
|
|
1553
|
+
return /* @__PURE__ */ b($e, { onClick: /* @__PURE__ */ a(() => p(P), "onClick"), draggable: !0, onDragStart: /* @__PURE__ */ a((E) => u(E, P), "onDragStart"), onDragEnd: c, children: [
|
|
1535
1554
|
/* @__PURE__ */ t(qe, { children: /* @__PURE__ */ t(_, { fontSize: "small" }) }),
|
|
1536
1555
|
/* @__PURE__ */ t(Ye, { children: P.label })
|
|
1537
1556
|
] }, P.specificType);
|
|
@@ -1540,7 +1559,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1540
1559
|
}) }) }) }) }), "children") }),
|
|
1541
1560
|
i && /* @__PURE__ */ b(Te, { children: [
|
|
1542
1561
|
/* @__PURE__ */ t(Ie, { title: "Add filter", children: /* @__PURE__ */ t(
|
|
1543
|
-
|
|
1562
|
+
Nt,
|
|
1544
1563
|
{
|
|
1545
1564
|
className: "action-btn llm-env-target llm-env-dashboard-action",
|
|
1546
1565
|
"data-env-id": "dashboardpad-add-filter",
|
|
@@ -1548,17 +1567,17 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1548
1567
|
variant: "outlined",
|
|
1549
1568
|
size: "small",
|
|
1550
1569
|
color: "secondary",
|
|
1551
|
-
startIcon: /* @__PURE__ */ t(
|
|
1552
|
-
endIcon: /* @__PURE__ */ t(
|
|
1570
|
+
startIcon: /* @__PURE__ */ t(_i, {}),
|
|
1571
|
+
endIcon: /* @__PURE__ */ t(ft, {}),
|
|
1553
1572
|
onClick: /* @__PURE__ */ a(() => x((f) => !f), "onClick"),
|
|
1554
1573
|
sx: { height: 28, fontSize: "0.7rem", minWidth: 0, textTransform: "none" },
|
|
1555
1574
|
children: "Filtro"
|
|
1556
1575
|
}
|
|
1557
1576
|
) }),
|
|
1558
|
-
/* @__PURE__ */ t(Ve, { open: h, anchorEl: v.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(
|
|
1577
|
+
/* @__PURE__ */ t(Ve, { open: h, anchorEl: v.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { minWidth: 220 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => x(!1), "onClickAway"), children: /* @__PURE__ */ t(xt, { dense: !0, children: zt.map((y) => {
|
|
1559
1578
|
const R = o.filterType[y.filterType];
|
|
1560
1579
|
return /* @__PURE__ */ b(
|
|
1561
|
-
|
|
1580
|
+
$e,
|
|
1562
1581
|
{
|
|
1563
1582
|
onClick: /* @__PURE__ */ a(() => {
|
|
1564
1583
|
i(y.filterType), x(!1);
|
|
@@ -1573,8 +1592,8 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1573
1592
|
}) }) }) }) }), "children") })
|
|
1574
1593
|
] })
|
|
1575
1594
|
] });
|
|
1576
|
-
}, "ToolBox"),
|
|
1577
|
-
const n = et(), i = he(), l = B((C) => C.dashboardDefinition), o = B((C) => C.publishedDashboard), r = B((C) => C.viewType), g = B((C) => C.renderGeneration), h = B((C) => C.llmCounter), x = (l == null ? void 0 : l.id) ?? null, [d, v] = N(null), [s, c] = N(), [u, p] = N(!1), [f, y] = N(!1), [R, H] = N(null), [L, P] = N(!1), _ = ee(null),
|
|
1595
|
+
}, "ToolBox"), _n = /* @__PURE__ */ a((e) => {
|
|
1596
|
+
const n = et(), i = he(), l = B((C) => C.dashboardDefinition), o = B((C) => C.publishedDashboard), r = B((C) => C.viewType), g = B((C) => C.renderGeneration), h = B((C) => C.llmCounter), x = (l == null ? void 0 : l.id) ?? null, [d, v] = N(null), [s, c] = N(), [u, p] = N(!1), [f, y] = N(!1), [R, H] = N(null), [L, P] = N(!1), _ = ee(null), E = ee(null), V = ee(null), K = ee(null), M = le(), w = Se(() => `pad-${Math.random().toString(36).slice(2)}`, []);
|
|
1578
1597
|
q(() => {
|
|
1579
1598
|
var A;
|
|
1580
1599
|
if (e.turnOpen) return;
|
|
@@ -1584,22 +1603,22 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1584
1603
|
const F = W(() => {
|
|
1585
1604
|
const C = i.getState().dashboardDefinition;
|
|
1586
1605
|
if (!C || !e.onCompose) return;
|
|
1587
|
-
const A =
|
|
1606
|
+
const A = vt(C);
|
|
1588
1607
|
if (A) {
|
|
1589
1608
|
c(A), setTimeout(() => c(void 0), 2e3);
|
|
1590
1609
|
return;
|
|
1591
1610
|
}
|
|
1592
1611
|
e.onCompose(C);
|
|
1593
|
-
}, [e.onCompose, i]),
|
|
1612
|
+
}, [e.onCompose, i]), k = W((C) => {
|
|
1594
1613
|
var A;
|
|
1595
|
-
K.current = C.id ?? null,
|
|
1614
|
+
K.current = C.id ?? null, vt(C), i.getState().updateDashboard(C), (A = e.onChange) == null || A.call(e, C);
|
|
1596
1615
|
}, [e.onChange, i]), z = W(async () => {
|
|
1597
1616
|
var A;
|
|
1598
1617
|
const C = i.getState().dashboardDefinition;
|
|
1599
1618
|
if (!(!(C != null && C.id) || !n)) {
|
|
1600
1619
|
p(!0);
|
|
1601
1620
|
try {
|
|
1602
|
-
await
|
|
1621
|
+
await ot(n, C), (A = e.onChange) == null || A.call(e, C);
|
|
1603
1622
|
} catch (Y) {
|
|
1604
1623
|
console.error("[@aintela/bi composer] Error saving dashboard:", Y);
|
|
1605
1624
|
} finally {
|
|
@@ -1611,18 +1630,18 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1611
1630
|
if (!n || !e.dashboardId || V.current || K.current === e.dashboardId) return;
|
|
1612
1631
|
v(null), i.getState().updateDashboard(void 0);
|
|
1613
1632
|
const C = n.getDashboard(e.dashboardId);
|
|
1614
|
-
V.current = C, C.then((A) =>
|
|
1633
|
+
V.current = C, C.then((A) => k(Be(A))).catch((A) => v(String(A))).finally(() => {
|
|
1615
1634
|
V.current = null;
|
|
1616
1635
|
});
|
|
1617
|
-
}, [
|
|
1636
|
+
}, [k, n, e.dashboardId, i]);
|
|
1618
1637
|
const I = W(async () => {
|
|
1619
1638
|
if (n)
|
|
1620
1639
|
try {
|
|
1621
|
-
|
|
1640
|
+
k(await $t(n, e.sessionId));
|
|
1622
1641
|
} catch (C) {
|
|
1623
1642
|
console.error("[@aintela/bi composer] Error creating new dashboard:", C);
|
|
1624
1643
|
}
|
|
1625
|
-
}, [
|
|
1644
|
+
}, [k, n, e.sessionId]), U = W(() => {
|
|
1626
1645
|
i.getState().refreshDashboard();
|
|
1627
1646
|
}, [i]), J = W(async () => {
|
|
1628
1647
|
const C = !f;
|
|
@@ -1640,16 +1659,16 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1640
1659
|
if (!(!C.id || !n)) {
|
|
1641
1660
|
y(!1);
|
|
1642
1661
|
try {
|
|
1643
|
-
|
|
1662
|
+
k(Be(await n.getDashboard(C.id)));
|
|
1644
1663
|
} catch (A) {
|
|
1645
1664
|
console.error("[@aintela/bi composer] Error loading dashboard:", A);
|
|
1646
1665
|
}
|
|
1647
1666
|
}
|
|
1648
|
-
}, [
|
|
1667
|
+
}, [k, n]), ne = e.renderDashboardPicker, de = /* @__PURE__ */ a((C, A) => He.cloneElement(A, { className: "llm-env-target llm-env-dashboard-action", "data-env-id": C, sx: { fontSize: 18 } }), "envIcon"), me = /* @__PURE__ */ a((C) => ({ border: C ? "0px" : `1px solid ${M.palette.divider}`, px: 1, py: 0, gap: 0.5, textTransform: "none" }), "viewToggleSx"), ge = /* @__PURE__ */ a((C, A) => ({ fontSize: "0.7rem", lineHeight: 1, maxWidth: C ? A : 0, overflow: "hidden", opacity: C ? 1 : 0, whiteSpace: "nowrap", transition: "max-width 0.25s ease, opacity 0.2s ease" }), "viewLabelSx");
|
|
1649
1668
|
return /* @__PURE__ */ b(se, { className: "bi-dashboard-pad", sx: { height: "100%", minHeight: 0 }, children: [
|
|
1650
1669
|
/* @__PURE__ */ t(j, { sx: { display: "flex", py: 0.5, backgroundColor: M.palette.background.paper, borderBottom: `1px solid ${M.palette.divider}`, px: 1 }, children: /* @__PURE__ */ b(se, { direction: "row", gap: 0.5, sx: { alignItems: "center", width: "100%", px: 1 }, children: [
|
|
1651
1670
|
!l && !d && /* @__PURE__ */ b(se, { direction: "row", gap: 1, alignItems: "center", children: [
|
|
1652
|
-
/* @__PURE__ */ t(
|
|
1671
|
+
/* @__PURE__ */ t(gt, { size: 16 }),
|
|
1653
1672
|
/* @__PURE__ */ t(ie, { color: "text.secondary", children: "Carregando dashboard" })
|
|
1654
1673
|
] }),
|
|
1655
1674
|
d && /* @__PURE__ */ b(ie, { color: "error", children: [
|
|
@@ -1657,9 +1676,9 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1657
1676
|
d
|
|
1658
1677
|
] }),
|
|
1659
1678
|
l && /* @__PURE__ */ b(Te, { children: [
|
|
1660
|
-
e.onBack && /* @__PURE__ */ t(
|
|
1679
|
+
e.onBack && /* @__PURE__ */ t(ke, { onClick: e.onBack, icon: de("dashboard-pad-back", /* @__PURE__ */ t(Bi, {})), label: "Voltar" }),
|
|
1661
1680
|
/* @__PURE__ */ b(
|
|
1662
|
-
|
|
1681
|
+
dn,
|
|
1663
1682
|
{
|
|
1664
1683
|
value: r,
|
|
1665
1684
|
exclusive: !0,
|
|
@@ -1670,11 +1689,11 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1670
1689
|
sx: { height: 24, border: "0px", "& .Mui-selected": { border: `1px solid ${M.palette.divider}` } },
|
|
1671
1690
|
children: [
|
|
1672
1691
|
/* @__PURE__ */ b(Je, { value: "Sketch", className: "llm-env-target llm-env-action-sketch", "data-env-id": "dashboard-pad-view-sketch", sx: me(r == "Sketch"), children: [
|
|
1673
|
-
/* @__PURE__ */ t(
|
|
1692
|
+
/* @__PURE__ */ t(kt, { sx: { fontSize: 18 } }),
|
|
1674
1693
|
/* @__PURE__ */ t(ie, { component: "span", sx: ge(r === "Sketch", 50), children: "Sketch" })
|
|
1675
1694
|
] }),
|
|
1676
1695
|
/* @__PURE__ */ b(Je, { value: "Generated", className: "llm-env-target llm-env-action-generated", "data-env-id": "dashboard-pad-view-generated", sx: me(r == "Generated"), children: [
|
|
1677
|
-
/* @__PURE__ */ t(
|
|
1696
|
+
/* @__PURE__ */ t(Fi, { sx: { fontSize: 18 } }),
|
|
1678
1697
|
/* @__PURE__ */ t(ie, { component: "span", sx: ge(r === "Generated", 70), children: "Dashboard" })
|
|
1679
1698
|
] })
|
|
1680
1699
|
]
|
|
@@ -1682,41 +1701,41 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1682
1701
|
),
|
|
1683
1702
|
/* @__PURE__ */ t(Ke, { orientation: "vertical", flexItem: !0, sx: { mx: 1 } }),
|
|
1684
1703
|
/* @__PURE__ */ t(j, { sx: { flex: 1, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ t(
|
|
1685
|
-
|
|
1704
|
+
Rn,
|
|
1686
1705
|
{
|
|
1687
1706
|
onAddGeneric: /* @__PURE__ */ a(() => {
|
|
1688
1707
|
var C;
|
|
1689
|
-
return (C =
|
|
1708
|
+
return (C = E.current) == null ? void 0 : C.addGenericCell();
|
|
1690
1709
|
}, "onAddGeneric"),
|
|
1691
1710
|
onAddTyped: /* @__PURE__ */ a((C, A, Y) => {
|
|
1692
1711
|
var m;
|
|
1693
|
-
return (m =
|
|
1712
|
+
return (m = E.current) == null ? void 0 : m.addTypedCell(C, A, Y);
|
|
1694
1713
|
}, "onAddTyped"),
|
|
1695
1714
|
onAddFilter: /* @__PURE__ */ a((C) => {
|
|
1696
1715
|
var A;
|
|
1697
|
-
return (A =
|
|
1716
|
+
return (A = E.current) == null ? void 0 : A.handleAddFilter(C);
|
|
1698
1717
|
}, "onAddFilter")
|
|
1699
1718
|
}
|
|
1700
1719
|
) }),
|
|
1701
1720
|
/* @__PURE__ */ t(Ke, { orientation: "vertical", flexItem: !0, sx: { mx: 1 } }),
|
|
1702
1721
|
/* @__PURE__ */ b(se, { direction: "row", gap: 0.25, alignItems: "center", children: [
|
|
1703
|
-
n && /* @__PURE__ */ t(
|
|
1722
|
+
n && /* @__PURE__ */ t(ke, { onClick: I, icon: de("dashboard-pad-new", /* @__PURE__ */ t(Hi, {})), label: "Novo" }),
|
|
1704
1723
|
n && /* @__PURE__ */ t(
|
|
1705
|
-
|
|
1724
|
+
ke,
|
|
1706
1725
|
{
|
|
1707
1726
|
onClick: u ? void 0 : z,
|
|
1708
|
-
icon: /* @__PURE__ */ a(() => u ? /* @__PURE__ */ t(
|
|
1727
|
+
icon: /* @__PURE__ */ a(() => u ? /* @__PURE__ */ t(gt, { size: 14 }) : de("dashboard-pad-save", /* @__PURE__ */ t(Li, {})), "icon"),
|
|
1709
1728
|
label: "Salvar"
|
|
1710
1729
|
}
|
|
1711
1730
|
),
|
|
1712
|
-
/* @__PURE__ */ t(
|
|
1731
|
+
/* @__PURE__ */ t(ke, { onClick: U, icon: de("dashboard-pad-refresh", /* @__PURE__ */ t(sn, {})), label: "Atualizar" }),
|
|
1713
1732
|
n && ne && /* @__PURE__ */ t("div", { ref: _, children: /* @__PURE__ */ t(
|
|
1714
|
-
|
|
1733
|
+
ke,
|
|
1715
1734
|
{
|
|
1716
1735
|
onClick: J,
|
|
1717
1736
|
icon: /* @__PURE__ */ b(se, { direction: "row", alignItems: "center", "data-env-id": "dashboard-pad-load", className: "llm-env-target llm-env-dashboard-action", children: [
|
|
1718
|
-
/* @__PURE__ */ t(
|
|
1719
|
-
/* @__PURE__ */ t(
|
|
1737
|
+
/* @__PURE__ */ t(Ni, { sx: { fontSize: 18 } }),
|
|
1738
|
+
/* @__PURE__ */ t(ft, { sx: { fontSize: 14, ml: -0.25 } })
|
|
1720
1739
|
] }),
|
|
1721
1740
|
label: "Abrir"
|
|
1722
1741
|
}
|
|
@@ -1739,66 +1758,66 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
|
|
|
1739
1758
|
},
|
|
1740
1759
|
children: [
|
|
1741
1760
|
/* @__PURE__ */ t(ie, { component: "span", sx: { whiteSpace: "nowrap", fontSize: "0.7rem", lineHeight: 1, mr: 1 }, children: "Compose" }),
|
|
1742
|
-
de("dashboard-pad-compose", /* @__PURE__ */ t(
|
|
1761
|
+
de("dashboard-pad-compose", /* @__PURE__ */ t(Gi, {}))
|
|
1743
1762
|
]
|
|
1744
1763
|
}
|
|
1745
1764
|
) })
|
|
1746
1765
|
] })
|
|
1747
1766
|
] })
|
|
1748
1767
|
] }) }),
|
|
1749
|
-
ne && /* @__PURE__ */ t(Ve, { open: f, anchorEl: _.current, placement: "bottom-end", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: C }) => /* @__PURE__ */ t(je, { ...C, children: /* @__PURE__ */ t(
|
|
1768
|
+
ne && /* @__PURE__ */ t(Ve, { open: f, anchorEl: _.current, placement: "bottom-end", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: C }) => /* @__PURE__ */ t(je, { ...C, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { overflow: "hidden", minWidth: 320, maxWidth: 380 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => y(!1), "onClickAway"), children: /* @__PURE__ */ t(j, { sx: { width: 360, maxWidth: "100%", height: 420 }, children: ne({ hierarchy: R, loading: L, selectedDashboardId: x, onSelect: /* @__PURE__ */ a((A) => void Q(A), "onSelect") }) }) }) }) }), "children") }),
|
|
1750
1769
|
r == "Sketch" && /* @__PURE__ */ b(se, { sx: { flex: 1, minHeight: 0 }, children: [
|
|
1751
|
-
e.showDebug && /* @__PURE__ */ t(
|
|
1752
|
-
/* @__PURE__ */ t("div", { style: { minHeight: "300px", flex: 1 }, children: /* @__PURE__ */ t(
|
|
1770
|
+
e.showDebug && /* @__PURE__ */ t(_e, { variant: "outlined", sx: { maxHeight: 200, p: 1, overflow: "auto", "& pre": { bgcolor: "background.default", p: 1, borderRadius: 1, overflow: "auto", fontSize: 11, m: 0 } }, children: /* @__PURE__ */ t("pre", { children: JSON.stringify(l, void 0, 2) }) }),
|
|
1771
|
+
/* @__PURE__ */ t("div", { style: { minHeight: "300px", flex: 1 }, children: /* @__PURE__ */ t(rt, { ref: E, renderId: w, headerExtra: e.headerExtra, renderDescription: e.renderDescription }) })
|
|
1753
1772
|
] }),
|
|
1754
|
-
r == "Generated" && (o == null ? void 0 : o.id) && /* @__PURE__ */ t(j, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(
|
|
1773
|
+
r == "Generated" && (o == null ? void 0 : o.id) && /* @__PURE__ */ t(j, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboard: o, codeGeneration: g, llmRenderCount: h, dragLocked: !1, editable: !0, onLayoutCommit: /* @__PURE__ */ a(() => i.getState().commitDashboardLayout(), "onLayoutCommit") }, o.id) })
|
|
1755
1774
|
] });
|
|
1756
1775
|
}, "DashboardPad");
|
|
1757
|
-
|
|
1758
|
-
const
|
|
1776
|
+
_n.displayName = "DashboardPad";
|
|
1777
|
+
const ht = 40, Ea = 100, Aa = 150, Fn = Tt((e, n) => {
|
|
1759
1778
|
const i = e.defaultContentType ?? "default", l = ee(0), o = W(() => (l.current += 1, `Untitled-${l.current}`), []), [r, g] = N(() => e.tabs ?? [{ name: o(), contentType: i, id: ze() }]), [h, x] = N(() => r[0].name), [d, v] = N(null), [s, c] = N(""), [u, p] = N(null), f = ee(null), y = r.find((w) => w.name === h) ?? r[0] ?? null, R = W((w, F) => {
|
|
1760
|
-
let
|
|
1761
|
-
for (; r.some((I) => I.name ===
|
|
1762
|
-
z += 1,
|
|
1763
|
-
return
|
|
1779
|
+
let k = w, z = 1;
|
|
1780
|
+
for (; r.some((I) => I.name === k && I.name !== F); )
|
|
1781
|
+
z += 1, k = `${w} (${z})`;
|
|
1782
|
+
return k;
|
|
1764
1783
|
}, [r]), H = W((w) => {
|
|
1765
1784
|
r.some((F) => F.name === w) && x(w);
|
|
1766
1785
|
}, [r]), L = W((w, F) => {
|
|
1767
1786
|
var I;
|
|
1768
|
-
const
|
|
1769
|
-
return g((U) => [...U, z]), x(
|
|
1787
|
+
const k = R(F ?? o()), z = { id: ze(), name: k, contentType: w ?? i };
|
|
1788
|
+
return g((U) => [...U, z]), x(k), (I = e.onTabCreate) == null || I.call(e, z), k;
|
|
1770
1789
|
}, [i, R, e.onTabCreate, o]), P = W((w) => {
|
|
1771
1790
|
g((F) => {
|
|
1772
1791
|
var U, J;
|
|
1773
|
-
const
|
|
1774
|
-
if (
|
|
1775
|
-
const z = F[
|
|
1792
|
+
const k = F.findIndex((Q) => Q.name === w);
|
|
1793
|
+
if (k === -1) return F;
|
|
1794
|
+
const z = F[k], I = F.filter((Q) => Q.name !== w);
|
|
1776
1795
|
if (I.length === 0) {
|
|
1777
1796
|
const Q = { name: o(), contentType: i, id: ze() };
|
|
1778
1797
|
return x(Q.name), (U = e.onTabClose) == null || U.call(e, z), [Q];
|
|
1779
1798
|
}
|
|
1780
|
-
return h === w && x(I[Math.min(
|
|
1799
|
+
return h === w && x(I[Math.min(k, I.length - 1)].name), (J = e.onTabClose) == null || J.call(e, z), I;
|
|
1781
1800
|
});
|
|
1782
1801
|
}, [h, i, e.onTabClose, o]);
|
|
1783
|
-
|
|
1802
|
+
en(n, () => ({ focusTab: H, createTab: L, closeTab: P, getActiveTab: /* @__PURE__ */ a(() => y, "getActiveTab"), getTabs: /* @__PURE__ */ a(() => r, "getTabs") }), [H, L, P, y, r]), q(() => {
|
|
1784
1803
|
var w;
|
|
1785
1804
|
y && ((w = e.onTabChange) == null || w.call(e, y));
|
|
1786
1805
|
}, [h]);
|
|
1787
1806
|
const _ = /* @__PURE__ */ a((w) => {
|
|
1788
1807
|
v(w.name), c(w.name);
|
|
1789
|
-
}, "startRename"),
|
|
1808
|
+
}, "startRename"), E = /* @__PURE__ */ a(() => {
|
|
1790
1809
|
var F;
|
|
1791
1810
|
if (!d) return;
|
|
1792
1811
|
const w = s.trim();
|
|
1793
1812
|
if (w && w !== d) {
|
|
1794
|
-
const
|
|
1795
|
-
g((U) => U.map((J) => J.name === d ? { ...J, name:
|
|
1813
|
+
const k = R(w, d), z = d;
|
|
1814
|
+
g((U) => U.map((J) => J.name === d ? { ...J, name: k } : J)), h === d && x(k);
|
|
1796
1815
|
const I = r.find((U) => U.name === d);
|
|
1797
|
-
I && ((F = e.onTabRename) == null || F.call(e, { ...I, name:
|
|
1816
|
+
I && ((F = e.onTabRename) == null || F.call(e, { ...I, name: k }, z));
|
|
1798
1817
|
}
|
|
1799
1818
|
v(null);
|
|
1800
1819
|
}, "commitRename"), V = /* @__PURE__ */ a((w) => {
|
|
1801
|
-
w.key === "Enter" ?
|
|
1820
|
+
w.key === "Enter" ? E() : w.key === "Escape" && v(null);
|
|
1802
1821
|
}, "handleRenameKeyDown");
|
|
1803
1822
|
q(() => {
|
|
1804
1823
|
d && f.current && (f.current.focus(), f.current.select());
|
|
@@ -1806,17 +1825,17 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
|
|
|
1806
1825
|
const K = /* @__PURE__ */ a((w) => {
|
|
1807
1826
|
var F;
|
|
1808
1827
|
(F = e.addMenuItems) != null && F.length ? p(w.currentTarget) : L();
|
|
1809
|
-
}, "handleAddMenuOpen"), M = /* @__PURE__ */ t(
|
|
1828
|
+
}, "handleAddMenuOpen"), M = /* @__PURE__ */ t(ji, { sx: { fontSize: 15, color: "text.secondary", flexShrink: 0 } });
|
|
1810
1829
|
return /* @__PURE__ */ b(j, { sx: { display: "flex", flexDirection: "column", height: "100%", overflow: "hidden" }, children: [
|
|
1811
|
-
/* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", borderBottom: "1px solid", borderColor: "divider", backgroundColor: "background.paper", minHeight:
|
|
1830
|
+
/* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", borderBottom: "1px solid", borderColor: "divider", backgroundColor: "background.paper", minHeight: ht, maxHeight: ht, overflow: "hidden" }, children: [
|
|
1812
1831
|
/* @__PURE__ */ t(j, { sx: { display: "flex", alignItems: "center", flex: 1, overflow: "auto", backgroundColor: "background.default", "&::-webkit-scrollbar": { height: 0 } }, children: r.map((w) => {
|
|
1813
1832
|
var z;
|
|
1814
|
-
const F = w.name === h,
|
|
1833
|
+
const F = w.name === h, k = w.name === d;
|
|
1815
1834
|
return /* @__PURE__ */ b(
|
|
1816
1835
|
j,
|
|
1817
1836
|
{
|
|
1818
1837
|
onClick: /* @__PURE__ */ a(() => {
|
|
1819
|
-
|
|
1838
|
+
k || x(w.name);
|
|
1820
1839
|
}, "onClick"),
|
|
1821
1840
|
onDoubleClick: /* @__PURE__ */ a(() => _(w), "onDoubleClick"),
|
|
1822
1841
|
sx: /* @__PURE__ */ a((I) => ({
|
|
@@ -1824,8 +1843,8 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
|
|
|
1824
1843
|
alignItems: "center",
|
|
1825
1844
|
gap: 0.5,
|
|
1826
1845
|
minWidth: Ea,
|
|
1827
|
-
maxWidth:
|
|
1828
|
-
height:
|
|
1846
|
+
maxWidth: Aa,
|
|
1847
|
+
height: ht,
|
|
1829
1848
|
px: 1.5,
|
|
1830
1849
|
cursor: "pointer",
|
|
1831
1850
|
userSelect: "none",
|
|
@@ -1837,13 +1856,13 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
|
|
|
1837
1856
|
}), "sx"),
|
|
1838
1857
|
children: [
|
|
1839
1858
|
((z = e.renderTabIcon) == null ? void 0 : z.call(e, w)) ?? M,
|
|
1840
|
-
|
|
1841
|
-
|
|
1859
|
+
k ? /* @__PURE__ */ t(
|
|
1860
|
+
Fe,
|
|
1842
1861
|
{
|
|
1843
1862
|
inputRef: f,
|
|
1844
1863
|
value: s,
|
|
1845
1864
|
onChange: /* @__PURE__ */ a((I) => c(I.target.value), "onChange"),
|
|
1846
|
-
onBlur:
|
|
1865
|
+
onBlur: E,
|
|
1847
1866
|
onKeyDown: V,
|
|
1848
1867
|
variant: "standard",
|
|
1849
1868
|
size: "small",
|
|
@@ -1864,7 +1883,7 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
|
|
|
1864
1883
|
}, "onClick"),
|
|
1865
1884
|
sx: { p: 0.2, opacity: F ? 0.7 : 0, "&:hover": { opacity: 1 }, transition: "opacity 0.15s" },
|
|
1866
1885
|
"aria-label": "Fechar aba",
|
|
1867
|
-
children: /* @__PURE__ */ t(
|
|
1886
|
+
children: /* @__PURE__ */ t(Wi, { sx: { fontSize: 14 } })
|
|
1868
1887
|
}
|
|
1869
1888
|
)
|
|
1870
1889
|
]
|
|
@@ -1872,11 +1891,11 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
|
|
|
1872
1891
|
w.name
|
|
1873
1892
|
);
|
|
1874
1893
|
}) }),
|
|
1875
|
-
/* @__PURE__ */ t(Pe, { size: "small", onClick: K, sx: { mx: 0.5, flexShrink: 0 }, title: "Adicionar aba", children: /* @__PURE__ */ t(
|
|
1876
|
-
e.addMenuItems && /* @__PURE__ */ t(
|
|
1894
|
+
/* @__PURE__ */ t(Pe, { size: "small", onClick: K, sx: { mx: 0.5, flexShrink: 0 }, title: "Adicionar aba", children: /* @__PURE__ */ t(Vi, { sx: { fontSize: 18 } }) }),
|
|
1895
|
+
e.addMenuItems && /* @__PURE__ */ t(Ki, { anchorEl: u, open: !!u, onClose: /* @__PURE__ */ a(() => p(null), "onClose"), anchorOrigin: { vertical: "bottom", horizontal: "left" }, transformOrigin: { vertical: "top", horizontal: "left" }, children: e.addMenuItems.map((w, F) => [
|
|
1877
1896
|
w.dividerBefore && /* @__PURE__ */ t(j, { component: "li", sx: { borderTop: "1px solid", borderColor: "divider" } }, `div-${F}`),
|
|
1878
1897
|
/* @__PURE__ */ b(
|
|
1879
|
-
|
|
1898
|
+
$e,
|
|
1880
1899
|
{
|
|
1881
1900
|
onClick: /* @__PURE__ */ a(() => {
|
|
1882
1901
|
L(w.contentType), p(null);
|
|
@@ -1894,8 +1913,8 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
|
|
|
1894
1913
|
r.map((w) => /* @__PURE__ */ t(j, { sx: { flex: 1, overflow: "auto", pr: 0, display: w.name === h ? "flex" : "none", flexDirection: "column" }, children: e.renderContent(w) }, w.id))
|
|
1895
1914
|
] });
|
|
1896
1915
|
});
|
|
1897
|
-
|
|
1898
|
-
const
|
|
1916
|
+
Fn.displayName = "DashboardPadEditor";
|
|
1917
|
+
const Ma = /* @__PURE__ */ a(({
|
|
1899
1918
|
orientation: e = "row",
|
|
1900
1919
|
datasets: n,
|
|
1901
1920
|
defaultTemplateDataset: i = "BI_TemplateModel",
|
|
@@ -1925,11 +1944,11 @@ const Aa = /* @__PURE__ */ a(({
|
|
|
1925
1944
|
sx: u ? {} : { px: 1, py: 0.25, borderLeft: `1px solid ${h.palette.divider}` },
|
|
1926
1945
|
children: [
|
|
1927
1946
|
/* @__PURE__ */ b(se, { direction: "row", alignItems: "center", gap: 0.5, children: [
|
|
1928
|
-
/* @__PURE__ */ t(
|
|
1947
|
+
/* @__PURE__ */ t(yt, { size: "small", checked: d, onChange: s, "data-env-id": "dashboard-pad-dataset-parameterized" }),
|
|
1929
1948
|
/* @__PURE__ */ t(ie, { variant: "body2", sx: { color: "text.secondary", whiteSpace: "nowrap", fontSize: u ? 11.5 : void 0 }, children: "DataSet Dinâmico" })
|
|
1930
1949
|
] }),
|
|
1931
1950
|
d && /* @__PURE__ */ t(
|
|
1932
|
-
|
|
1951
|
+
Bt,
|
|
1933
1952
|
{
|
|
1934
1953
|
size: "small",
|
|
1935
1954
|
value: v ?? "",
|
|
@@ -1941,14 +1960,14 @@ const Aa = /* @__PURE__ */ a(({
|
|
|
1941
1960
|
var f;
|
|
1942
1961
|
return p ? ((f = n.find((y) => y.dataSetId === p)) == null ? void 0 : f.name) ?? p : "Default…";
|
|
1943
1962
|
}, "renderValue"),
|
|
1944
|
-
children: n.map((p) => /* @__PURE__ */ t(
|
|
1963
|
+
children: n.map((p) => /* @__PURE__ */ t($e, { value: p.dataSetId, sx: { fontSize: "0.8rem" }, children: /* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1945
1964
|
/* @__PURE__ */ t("span", { children: p.name }),
|
|
1946
1965
|
p.isTemplate && /* @__PURE__ */ t(ie, { variant: "caption", sx: { color: "text.disabled" }, children: "(template)" })
|
|
1947
1966
|
] }) }, p.dataSetId))
|
|
1948
1967
|
}
|
|
1949
1968
|
),
|
|
1950
1969
|
l && /* @__PURE__ */ t(j, { sx: u ? {} : { borderLeft: `1px solid ${h.palette.divider}`, pl: 1 }, children: /* @__PURE__ */ t(
|
|
1951
|
-
|
|
1970
|
+
Bt,
|
|
1952
1971
|
{
|
|
1953
1972
|
size: "small",
|
|
1954
1973
|
value: c,
|
|
@@ -1964,26 +1983,26 @@ const Aa = /* @__PURE__ */ a(({
|
|
|
1964
1983
|
return ((f = l.find((y) => y.id === p)) == null ? void 0 : f.name) ?? "Agent…";
|
|
1965
1984
|
}, "renderValue"),
|
|
1966
1985
|
"data-env-id": "dashboard-pad-agent-picker",
|
|
1967
|
-
children: l.map((p) => /* @__PURE__ */ t(
|
|
1986
|
+
children: l.map((p) => /* @__PURE__ */ t($e, { value: p.id, sx: { fontSize: "0.8rem" }, children: p.name }, p.id))
|
|
1968
1987
|
}
|
|
1969
1988
|
) })
|
|
1970
1989
|
]
|
|
1971
1990
|
}
|
|
1972
1991
|
);
|
|
1973
|
-
}, "DatasetParameterizationControls"),
|
|
1992
|
+
}, "DatasetParameterizationControls"), Ra = /* @__PURE__ */ a(({ backgroundColor: e, zoom: n = 0.7, width: i = "80%", title: l, config: o }) => /* @__PURE__ */ t(j, { sx: /* @__PURE__ */ a((r) => ({ display: "inline-flex", justifyContent: "left", width: "100%", border: `1px solid ${r.palette.divider}`, borderRadius: "10px", p: 2, maxHeight: "500px", overflow: "auto" }), "sx"), children: /* @__PURE__ */ b(se, { gap: 2, sx: /* @__PURE__ */ a((r) => ({ p: 1, borderRadius: 2, backgroundColor: e ?? r.palette.background.paper, width: i, zoom: n }), "sx"), children: [
|
|
1974
1993
|
l && /* @__PURE__ */ t(ie, { variant: "body1", children: l }),
|
|
1975
|
-
/* @__PURE__ */ t(Xe, { container: !0, spacing: 1, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, maxHeight: 300, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.specificType == "Gauge" || r.specificType == "MetricComparison" ? "100px" : `${Math.max(r.height ?? 0,
|
|
1976
|
-
] }) }), "ExamplePad"),
|
|
1977
|
-
const n =
|
|
1994
|
+
/* @__PURE__ */ t(Xe, { container: !0, spacing: 1, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, maxHeight: 300, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.specificType == "Gauge" || r.specificType == "MetricComparison" ? "100px" : `${Math.max(r.height ?? 0, it)}px` }, children: r.card }) }, `example-pad-card-${g}`)) })
|
|
1995
|
+
] }) }), "ExamplePad"), lt = /* @__PURE__ */ a((e) => {
|
|
1996
|
+
const n = Ae(), i = e.specificType ?? "Generic", l = n.specificType[i] ?? n.specificType.Generic;
|
|
1978
1997
|
return /* @__PURE__ */ b(j, { sx: { ...e.sx, width: "100%", height: "100%", p: 1, gap: 0.2, textAlign: "justify" }, className: "react-grid-placeholder-example", children: [
|
|
1979
1998
|
/* @__PURE__ */ t(l, { fontSize: "small", sx: { float: "left", shapeOutside: "margin-box", mr: 0.5 } }),
|
|
1980
1999
|
/* @__PURE__ */ t(ie, { sx: { fontSize: "14px" }, children: `[${e.name}] - ${e.description}` })
|
|
1981
2000
|
] });
|
|
1982
|
-
}, "ExampleCardSketch"),
|
|
2001
|
+
}, "ExampleCardSketch"), _a = lt, Fa = lt, Na = /* @__PURE__ */ a(({ backgroundColor: e, zoom: n = 0.8, width: i = "100%", title: l, config: o }) => /* @__PURE__ */ b(se, { gap: 2, sx: /* @__PURE__ */ a((r) => ({ p: 1, borderRadius: 2, backgroundColor: e ?? r.palette.background.paper, width: i, maxHeight: "1400px" }), "sx"), children: [
|
|
1983
2002
|
l && /* @__PURE__ */ t(ie, { variant: "body1", children: l }),
|
|
1984
|
-
/* @__PURE__ */ t(Xe, { container: !0, spacing: 1, sx: { zoom: n }, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.height ??
|
|
2003
|
+
/* @__PURE__ */ t(Xe, { container: !0, spacing: 1, sx: { zoom: n }, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.height ?? it, "& > *": { width: "100%", maxHeight: "500px" } }, children: r.card }) }, `prototype-pad-card-${g}`)) })
|
|
1985
2004
|
] }), "PrototypePad");
|
|
1986
|
-
function
|
|
2005
|
+
function Ba(e, n, i, l, o) {
|
|
1987
2006
|
if (l === void 0) return { size: e, height: n, card: i };
|
|
1988
2007
|
const r = i;
|
|
1989
2008
|
return o !== void 0 && typeof o != "string" ? { size: e, height: n, name: r, specificType: l, card: o } : {
|
|
@@ -1992,23 +2011,23 @@ function Na(e, n, i, l, o) {
|
|
|
1992
2011
|
name: r,
|
|
1993
2012
|
specificType: l,
|
|
1994
2013
|
description: o,
|
|
1995
|
-
card: /* @__PURE__ */ t(
|
|
2014
|
+
card: /* @__PURE__ */ t(lt, { name: r, specificType: l, description: o })
|
|
1996
2015
|
};
|
|
1997
2016
|
}
|
|
1998
|
-
a(
|
|
1999
|
-
const
|
|
2017
|
+
a(Ba, "c");
|
|
2018
|
+
const Ha = /* @__PURE__ */ a((e, n) => ({
|
|
2000
2019
|
i: e,
|
|
2001
2020
|
name: n,
|
|
2002
2021
|
filterType: "DateRangePicker",
|
|
2003
2022
|
mandatory: !0,
|
|
2004
2023
|
parametersNames: [`${n}_inicio`, `${n}_fim`]
|
|
2005
|
-
}), "dateRange"),
|
|
2024
|
+
}), "dateRange"), La = /* @__PURE__ */ a((e, n, i = !1) => ({
|
|
2006
2025
|
i: e,
|
|
2007
2026
|
name: n,
|
|
2008
2027
|
filterType: "DatePicker",
|
|
2009
2028
|
mandatory: i,
|
|
2010
2029
|
parametersNames: [n]
|
|
2011
|
-
}), "datePicker"),
|
|
2030
|
+
}), "datePicker"), Ga = /* @__PURE__ */ a((e, n, i = !0, l = !1) => ({
|
|
2012
2031
|
i: e,
|
|
2013
2032
|
name: n,
|
|
2014
2033
|
filterType: "AutoComplete",
|
|
@@ -2016,27 +2035,27 @@ const Ba = /* @__PURE__ */ a((e, n) => ({
|
|
|
2016
2035
|
multipleSelection: i,
|
|
2017
2036
|
parametersNames: [n]
|
|
2018
2037
|
}), "autoComplete");
|
|
2019
|
-
function
|
|
2020
|
-
const i =
|
|
2038
|
+
function Wa(e, n) {
|
|
2039
|
+
const i = cn();
|
|
2021
2040
|
q(() => {
|
|
2022
2041
|
var l, o;
|
|
2023
2042
|
n == "update" ? (l = i.updateDashboardPad) == null || l.call(i, e) : (o = i.createDashboardPad) == null || o.call(i, e);
|
|
2024
2043
|
}, []);
|
|
2025
2044
|
}
|
|
2026
|
-
a(
|
|
2027
|
-
const
|
|
2045
|
+
a(Wa, "useDashboardPad");
|
|
2046
|
+
const Nn = {
|
|
2028
2047
|
visible: { opacity: 1, y: 0, transition: { duration: 0.18, ease: "easeOut" } },
|
|
2029
2048
|
hidden: { opacity: 0, y: -12, transition: { duration: 0.18, ease: "easeOut" } }
|
|
2030
|
-
},
|
|
2049
|
+
}, Bn = {
|
|
2031
2050
|
hidden: { opacity: 0, x: 16, transition: { duration: 0.1, ease: "easeOut" } },
|
|
2032
2051
|
visible: { opacity: 1, x: 0, transition: { duration: 0.32, ease: "easeOut", delay: 0.22 } }
|
|
2033
|
-
},
|
|
2052
|
+
}, Hn = { duration: 0.28, ease: "easeOut" }, Ln = {
|
|
2034
2053
|
visible: { opacity: 1, transition: { duration: 0.15 } },
|
|
2035
2054
|
hidden: { opacity: 0, transition: { duration: 0.15 } }
|
|
2036
|
-
},
|
|
2055
|
+
}, Gn = {
|
|
2037
2056
|
hidden: { opacity: 0, transition: { duration: 0.15 } },
|
|
2038
2057
|
visible: { opacity: 1, transition: { duration: 0.15 } }
|
|
2039
|
-
},
|
|
2058
|
+
}, Wn = { duration: 0.15, ease: "linear" }, Vn = {
|
|
2040
2059
|
kpi: { category: "Métrica", specificType: "MetricComparison" },
|
|
2041
2060
|
line: { category: "Gráfico", specificType: "ChartLine" },
|
|
2042
2061
|
bars: { category: "Gráfico", specificType: "ChartBarV" },
|
|
@@ -2044,16 +2063,16 @@ const Fn = {
|
|
|
2044
2063
|
donut: { category: "Gráfico", specificType: "ChartDonut" },
|
|
2045
2064
|
heatmap: { category: "Tabela", specificType: "TableHeatmap" }
|
|
2046
2065
|
};
|
|
2047
|
-
function
|
|
2066
|
+
function jn(e) {
|
|
2048
2067
|
return e.cells.map((n) => n.kind);
|
|
2049
2068
|
}
|
|
2050
|
-
a(
|
|
2051
|
-
function
|
|
2052
|
-
const i = n ?? `${e.id}-${Date.now()}
|
|
2069
|
+
a(jn, "templateKinds");
|
|
2070
|
+
function Un(e, n) {
|
|
2071
|
+
const i = nt(n ?? `${e.id}-${Date.now()}`);
|
|
2053
2072
|
return e.cells.map((l, o) => {
|
|
2054
|
-
const r =
|
|
2073
|
+
const r = Vn[l.kind];
|
|
2055
2074
|
return {
|
|
2056
|
-
i: `${i}
|
|
2075
|
+
i: `${i}_${o}`,
|
|
2057
2076
|
x: l.x,
|
|
2058
2077
|
y: l.y,
|
|
2059
2078
|
w: l.w,
|
|
@@ -2066,8 +2085,8 @@ function jn(e, n) {
|
|
|
2066
2085
|
};
|
|
2067
2086
|
});
|
|
2068
2087
|
}
|
|
2069
|
-
a(
|
|
2070
|
-
const
|
|
2088
|
+
a(Un, "seedFromTemplate");
|
|
2089
|
+
const Rt = [
|
|
2071
2090
|
{
|
|
2072
2091
|
id: "t1",
|
|
2073
2092
|
name: "Visão executiva",
|
|
@@ -2117,7 +2136,7 @@ const Mt = [
|
|
|
2117
2136
|
desc: "Comece do zero — adicione cards conforme pensa",
|
|
2118
2137
|
cells: []
|
|
2119
2138
|
}
|
|
2120
|
-
],
|
|
2139
|
+
], Va = Rt, _t = wt(null), jo = /* @__PURE__ */ a(({ children: e }) => {
|
|
2121
2140
|
const [n, i] = N([]), l = ee(null), [, o] = N(0), r = W((v) => {
|
|
2122
2141
|
i((s) => {
|
|
2123
2142
|
const c = v.at ?? Date.now(), u = { visible: !1, ...v, at: c }, p = s.findIndex((R) => R.id === v.id);
|
|
@@ -2134,14 +2153,14 @@ const Mt = [
|
|
|
2134
2153
|
});
|
|
2135
2154
|
}, []), x = W((v) => {
|
|
2136
2155
|
l.current !== v && (l.current = v, o((s) => s + 1));
|
|
2137
|
-
}, []), d =
|
|
2156
|
+
}, []), d = Se(
|
|
2138
2157
|
() => ({ items: n, register: r, unregister: g, setVisible: h, scrollerRef: l, setScroller: x }),
|
|
2139
2158
|
[n, r, g, h, x]
|
|
2140
2159
|
);
|
|
2141
|
-
return /* @__PURE__ */ t(
|
|
2160
|
+
return /* @__PURE__ */ t(_t.Provider, { value: d, children: e });
|
|
2142
2161
|
}, "SessionVisualizationsProvider");
|
|
2143
|
-
function
|
|
2144
|
-
const e =
|
|
2162
|
+
function Kn() {
|
|
2163
|
+
const e = Ee(_t), n = W(
|
|
2145
2164
|
(r) => {
|
|
2146
2165
|
const g = e == null ? void 0 : e.scrollerRef.current, h = g == null ? void 0 : g.querySelector(`[data-viz="${CSS.escape(r)}"]`);
|
|
2147
2166
|
if (!g || !h) return;
|
|
@@ -2149,13 +2168,13 @@ function Un() {
|
|
|
2149
2168
|
g.scrollTo({ top: Math.max(0, x), behavior: "smooth" }), h.setAttribute("data-viz-focus", "true"), window.setTimeout(() => h.removeAttribute("data-viz-focus"), 2e3);
|
|
2150
2169
|
},
|
|
2151
2170
|
[e]
|
|
2152
|
-
), i = (e == null ? void 0 : e.items) ??
|
|
2171
|
+
), i = (e == null ? void 0 : e.items) ?? ja, l = Se(() => i.filter((r) => !r.visible), [i]), o = (e == null ? void 0 : e.setScroller) ?? Ua;
|
|
2153
2172
|
return { items: i, offscreen: l, scrollTo: n, setScroller: o };
|
|
2154
2173
|
}
|
|
2155
|
-
a(
|
|
2156
|
-
const
|
|
2157
|
-
}, "noop"),
|
|
2158
|
-
const h =
|
|
2174
|
+
a(Kn, "useSessionVisualizations");
|
|
2175
|
+
const ja = [], Ua = /* @__PURE__ */ a(() => {
|
|
2176
|
+
}, "noop"), Ut = 0.6, Uo = /* @__PURE__ */ a(({ id: e, kind: n, title: i, group: l, preview: o, ready: r = !0, children: g }) => {
|
|
2177
|
+
const h = Ee(_t), x = ee(null), d = h == null ? void 0 : h.register, v = h == null ? void 0 : h.unregister, s = h == null ? void 0 : h.setVisible, c = (h == null ? void 0 : h.scrollerRef.current) ?? null;
|
|
2159
2178
|
return q(() => {
|
|
2160
2179
|
d == null || d({ id: e, kind: n, title: i, group: l, preview: o, ready: r });
|
|
2161
2180
|
}, [e, n, i, l, r, d]), q(() => {
|
|
@@ -2166,11 +2185,11 @@ const Va = [], ja = /* @__PURE__ */ a(() => {
|
|
|
2166
2185
|
if (!u || !s || typeof IntersectionObserver > "u") return;
|
|
2167
2186
|
const p = new IntersectionObserver(
|
|
2168
2187
|
(f) => {
|
|
2169
|
-
for (const y of f) s(e, y.intersectionRatio >=
|
|
2188
|
+
for (const y of f) s(e, y.intersectionRatio >= Ut);
|
|
2170
2189
|
},
|
|
2171
2190
|
// `root: null` would measure against the viewport, which is wrong inside a scrolling transcript —
|
|
2172
2191
|
// it reports a card visible while it sits far below the pane's own fold.
|
|
2173
|
-
{ root: c, threshold: [0,
|
|
2192
|
+
{ root: c, threshold: [0, Ut, 1] }
|
|
2174
2193
|
);
|
|
2175
2194
|
return p.observe(u), () => p.disconnect();
|
|
2176
2195
|
}, [e, c, s]), /* @__PURE__ */ t("div", { ref: x, "data-viz": e, children: g });
|
|
@@ -2186,7 +2205,7 @@ function ue(e) {
|
|
|
2186
2205
|
};
|
|
2187
2206
|
}
|
|
2188
2207
|
a(ue, "resolveComposerSurfaces");
|
|
2189
|
-
function
|
|
2208
|
+
function Ka() {
|
|
2190
2209
|
const e = /* @__PURE__ */ a(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }, "read"), [n, i] = N(e);
|
|
2191
2210
|
return q(() => {
|
|
2192
2211
|
if (typeof window > "u") return;
|
|
@@ -2194,8 +2213,8 @@ function Ua() {
|
|
|
2194
2213
|
return window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
2195
2214
|
}, []), n;
|
|
2196
2215
|
}
|
|
2197
|
-
a(
|
|
2198
|
-
const
|
|
2216
|
+
a(Ka, "useWindowSize");
|
|
2217
|
+
const Kt = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ut = /* @__PURE__ */ a((e) => `${e.getFullYear()}-${Kt(e.getMonth() + 1)}-${Kt(e.getDate())}`, "isoDate"), qn = /* @__PURE__ */ a((e) => {
|
|
2199
2218
|
const n = le(), i = ue(n), l = he(), o = B((z) => {
|
|
2200
2219
|
var I;
|
|
2201
2220
|
return ((I = z.publishedDashboard) == null ? void 0 : I.jsFileName) ?? null;
|
|
@@ -2213,7 +2232,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
|
|
|
2213
2232
|
if (!r) return;
|
|
2214
2233
|
const z = {}, I = /* @__PURE__ */ new Date(), U = new Date(I.getTime() - 1e3 * 3600 * 24 * 30);
|
|
2215
2234
|
for (const J of r.filters ?? [])
|
|
2216
|
-
J.mandatory && (J.filterType == "DateRangePicker" ? (z[`${J.name}_inicio`] =
|
|
2235
|
+
J.mandatory && (J.filterType == "DateRangePicker" ? (z[`${J.name}_inicio`] = ut(U), z[`${J.name}_fim`] = ut(I)) : J.filterType == "DatePicker" && (z[J.name] = ut(I)));
|
|
2217
2236
|
H(z);
|
|
2218
2237
|
}, [r == null ? void 0 : r.filters, r]);
|
|
2219
2238
|
const L = /* @__PURE__ */ a((z) => {
|
|
@@ -2223,7 +2242,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
|
|
|
2223
2242
|
q(() => {
|
|
2224
2243
|
L(e.defaultCollapsed ?? !1);
|
|
2225
2244
|
}, [e.defaultCollapsed]);
|
|
2226
|
-
const P = f ? "25%" : e.width, { width: _, height:
|
|
2245
|
+
const P = f ? "25%" : e.width, { width: _, height: E } = Ka(), V = _ > E ? 1.7 : 1, K = E > _ ? 1.7 : 1, M = Math.min(_, E) * V, w = Math.min(_, E) * K, F = !!o, k = { color: n.palette.text.secondary, p: 0.5, "&:hover": { color: n.palette.text.primary, backgroundColor: i.hover } };
|
|
2227
2246
|
return /* @__PURE__ */ t(tt, { initial: !1, children: F && r && /* @__PURE__ */ b(
|
|
2228
2247
|
re.aside,
|
|
2229
2248
|
{
|
|
@@ -2235,7 +2254,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
|
|
|
2235
2254
|
children: [
|
|
2236
2255
|
/* @__PURE__ */ b(re.div, { initial: { opacity: 0, y: 6 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.28, delay: 0.08, ease: "easeOut" }, style: { display: "inline-flex", flexDirection: "column", minHeight: 0, position: "relative", height: "100%" }, children: [
|
|
2237
2256
|
/* @__PURE__ */ b(S, { sx: { display: "inline-flex", alignItems: "center", width: "100%", gap: 1, px: 1.75, py: 1.25, borderBottom: `1px solid ${n.palette.divider}`, backgroundColor: n.palette.background.paper }, children: [
|
|
2238
|
-
/* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(
|
|
2257
|
+
/* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 15 }) }),
|
|
2239
2258
|
/* @__PURE__ */ t(X, { sx: { color: n.palette.text.primary, fontWeight: 500, fontSize: 12.5, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: d }),
|
|
2240
2259
|
!f && /* @__PURE__ */ b(Te, { children: [
|
|
2241
2260
|
/* @__PURE__ */ t(X, { sx: { color: n.palette.text.disabled, fontSize: 11, flexShrink: 0 }, children: "·" }),
|
|
@@ -2246,13 +2265,13 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
|
|
|
2246
2265
|
] })
|
|
2247
2266
|
] }),
|
|
2248
2267
|
/* @__PURE__ */ t(S, { sx: { flex: 1 } }),
|
|
2249
|
-
/* @__PURE__ */ t(ce, { title: "Atualizar dados (ignora cache)", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => c((z) => z + 1), "onClick"), sx:
|
|
2250
|
-
/* @__PURE__ */ t(ce, { title: f ? "Expandir" : "Diminuir", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => L(!f), "onClick"), sx:
|
|
2251
|
-
/* @__PURE__ */ t(ce, { title: "Tela cheia", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!0), "onClick"), sx:
|
|
2268
|
+
/* @__PURE__ */ t(ce, { title: "Atualizar dados (ignora cache)", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => c((z) => z + 1), "onClick"), sx: k, "aria-label": "Atualizar dados", children: /* @__PURE__ */ t(sn, { sx: { fontSize: 18 } }) }) }),
|
|
2269
|
+
/* @__PURE__ */ t(ce, { title: f ? "Expandir" : "Diminuir", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => L(!f), "onClick"), sx: k, "aria-label": f ? "Expandir" : "Diminuir", children: /* @__PURE__ */ t(Le, { size: 14 }) }) }),
|
|
2270
|
+
/* @__PURE__ */ t(ce, { title: "Tela cheia", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!0), "onClick"), sx: k, "aria-label": "Abrir em tela cheia", children: /* @__PURE__ */ t(Ui, { sx: { fontSize: "18px" } }) }) })
|
|
2252
2271
|
] }),
|
|
2253
2272
|
/* @__PURE__ */ b(S, { sx: { display: "inline-flex", height: "100%", width: "100%", minHeight: 0, overflow: "auto", backgroundColor: n.palette.background.default }, children: [
|
|
2254
2273
|
x && !f && /* @__PURE__ */ t(
|
|
2255
|
-
|
|
2274
|
+
Re,
|
|
2256
2275
|
{
|
|
2257
2276
|
dragLocked: !1,
|
|
2258
2277
|
llmRenderCount: g + s,
|
|
@@ -2264,12 +2283,12 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
|
|
|
2264
2283
|
},
|
|
2265
2284
|
x
|
|
2266
2285
|
),
|
|
2267
|
-
x && f && /* @__PURE__ */ t(
|
|
2286
|
+
x && f && /* @__PURE__ */ t(pi, { llmRenderCount: g + s, codeGeneration: h, dashboard: r, parameters: R }, x)
|
|
2268
2287
|
] })
|
|
2269
2288
|
] }),
|
|
2270
|
-
/* @__PURE__ */ b(
|
|
2289
|
+
/* @__PURE__ */ b(pn, { open: u, onClose: /* @__PURE__ */ a(() => p(!1), "onClose"), maxWidth: !1, fullScreen: !0, slotProps: { paper: { sx: { backgroundColor: n.palette.background.default, backgroundImage: "none", color: n.palette.text.primary } } }, children: [
|
|
2271
2290
|
/* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 2, py: 1.25, borderBottom: `1px solid ${n.palette.divider}`, backgroundColor: n.palette.background.paper, flexShrink: 0 }, children: [
|
|
2272
|
-
/* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(
|
|
2291
|
+
/* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 16 }) }),
|
|
2273
2292
|
/* @__PURE__ */ t(X, { sx: { color: n.palette.text.primary, fontWeight: 500, fontSize: 13.5 }, children: d }),
|
|
2274
2293
|
/* @__PURE__ */ t(X, { sx: { color: n.palette.text.disabled, fontSize: 12 }, children: "·" }),
|
|
2275
2294
|
/* @__PURE__ */ b(X, { sx: { fontFamily: i.fontFamilyMono, color: n.palette.text.secondary, fontSize: 12 }, children: [
|
|
@@ -2278,18 +2297,18 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
|
|
|
2278
2297
|
v === 1 ? "card" : "cards"
|
|
2279
2298
|
] }),
|
|
2280
2299
|
/* @__PURE__ */ t(S, { sx: { flex: 1 } }),
|
|
2281
|
-
/* @__PURE__ */ t(ce, { title: "Fechar", placement: "left", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!1), "onClick"), sx: { ...
|
|
2300
|
+
/* @__PURE__ */ t(ce, { title: "Fechar", placement: "left", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!1), "onClick"), sx: { ...k, p: 0.75 }, "aria-label": "Fechar", children: /* @__PURE__ */ t(Dt, { size: 14 }) }) })
|
|
2282
2301
|
] }),
|
|
2283
|
-
/* @__PURE__ */ t(S, { sx: { width: "100%", justifyContent: "center", display: "inline-flex" }, children: /* @__PURE__ */ t(S, { sx: { minHeight: 0, overflow: "hidden", width: M, height: w, backgroundColor: n.palette.background.default }, children: x && /* @__PURE__ */ t(
|
|
2302
|
+
/* @__PURE__ */ t(S, { sx: { width: "100%", justifyContent: "center", display: "inline-flex" }, children: /* @__PURE__ */ t(S, { sx: { minHeight: 0, overflow: "hidden", width: M, height: w, backgroundColor: n.palette.background.default }, children: x && /* @__PURE__ */ t(Re, { dragLocked: !1, llmRenderCount: g, codeGeneration: h, dashboard: r }, x) }) })
|
|
2284
2303
|
] })
|
|
2285
2304
|
]
|
|
2286
2305
|
},
|
|
2287
2306
|
"dashboard-side-panel"
|
|
2288
2307
|
) });
|
|
2289
2308
|
}, "DashboardSidePanelInner");
|
|
2290
|
-
|
|
2291
|
-
const
|
|
2292
|
-
function
|
|
2309
|
+
qn.displayName = "DashboardSidePanel";
|
|
2310
|
+
const Yn = He.memo(qn), qa = at(we), Ya = [], We = /* @__PURE__ */ a(({ children: e }) => /* @__PURE__ */ t(X, { sx: /* @__PURE__ */ a((n) => ({ fontSize: 9.5, color: n.palette.text.disabled, textTransform: "uppercase", letterSpacing: 0.6, fontWeight: 500, lineHeight: 1.6 }), "sx"), children: e }), "RailSectionLabel");
|
|
2311
|
+
function qt(e, n) {
|
|
2293
2312
|
const i = new Map(e.map((h) => [h.i, h])), l = new Map(n.map((h) => [h.i, h]));
|
|
2294
2313
|
let o = 0, r = 0, g = 0;
|
|
2295
2314
|
for (const [h, x] of i) {
|
|
@@ -2299,8 +2318,8 @@ function Kt(e, n) {
|
|
|
2299
2318
|
for (const h of l.keys()) i.has(h) || r++;
|
|
2300
2319
|
return { added: o, removed: r, modified: g };
|
|
2301
2320
|
}
|
|
2302
|
-
a(
|
|
2303
|
-
function
|
|
2321
|
+
a(qt, "diffById");
|
|
2322
|
+
function Yt(e, n, i) {
|
|
2304
2323
|
return {
|
|
2305
2324
|
background: n.raised,
|
|
2306
2325
|
border: `1px solid ${e.palette.divider}`,
|
|
@@ -2321,9 +2340,9 @@ function qt(e, n, i) {
|
|
|
2321
2340
|
"&:hover": i ? void 0 : { backgroundColor: n.hover }
|
|
2322
2341
|
};
|
|
2323
2342
|
}
|
|
2324
|
-
a(
|
|
2325
|
-
const
|
|
2326
|
-
const u = le(), p = ue(u), f =
|
|
2343
|
+
a(Yt, "railActionPill");
|
|
2344
|
+
const Ja = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType: l, onLayoutTypeChange: o, onAddGenericCard: r, onAddTypedCard: g, onAddFilter: h, cardsOpened: x, filters: d, onEditFilter: v, onDeleteFilter: s, datasetControls: c }) => {
|
|
2345
|
+
const u = le(), p = ue(u), f = Ae(), [y, R] = N(null), [H, L] = N(null), P = ee(null), [_, E] = N(!1);
|
|
2327
2346
|
q(() => {
|
|
2328
2347
|
P.current && x && P.current.click();
|
|
2329
2348
|
}, [x]);
|
|
@@ -2336,7 +2355,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2336
2355
|
style: { flexShrink: 0, display: "flex", flexDirection: "column", borderRight: `1px solid ${p.borderSoft}`, backgroundColor: u.palette.background.paper, overflow: "hidden", minHeight: 0 },
|
|
2337
2356
|
children: [
|
|
2338
2357
|
/* @__PURE__ */ b(S, { sx: { flexShrink: 0, display: "flex", alignItems: "center", gap: 0.625, pl: 1, pr: 1, py: 1.5, borderBottom: `1px solid ${p.borderSoft}` }, children: [
|
|
2339
|
-
/* @__PURE__ */ t(ce, { title: _ ? "Expandir painel" : "Recolher painel", placement: "right", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() =>
|
|
2358
|
+
/* @__PURE__ */ t(ce, { title: _ ? "Expandir painel" : "Recolher painel", placement: "right", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => E((w) => !w), "onClick"), sx: { color: u.palette.text.primary, p: 0.5, flexShrink: 0, "&:hover": { color: u.palette.primary.main } }, "aria-label": _ ? "Expandir painel" : "Recolher painel", children: /* @__PURE__ */ t(Le, { size: 13 }) }) }),
|
|
2340
2359
|
!_ && /* @__PURE__ */ t(X, { sx: { color: u.palette.text.primary, fontWeight: 500, fontSize: 11.5, lineHeight: 1.2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: "Desenhe seu prompt" })
|
|
2341
2360
|
] }),
|
|
2342
2361
|
!_ && /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, overflowY: "auto", display: "flex", flexDirection: "column" }, children: [
|
|
@@ -2355,15 +2374,15 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2355
2374
|
"data-env-id": "dashboardpad-add-card",
|
|
2356
2375
|
"data-env-key": "dashboardpad-add-card-dropdown",
|
|
2357
2376
|
className: "llm-env-target llm-env-dashboard-action",
|
|
2358
|
-
sx:
|
|
2377
|
+
sx: Yt(u, p, e),
|
|
2359
2378
|
children: [
|
|
2360
|
-
/* @__PURE__ */ t(
|
|
2379
|
+
/* @__PURE__ */ t(bt, { size: 11 }),
|
|
2361
2380
|
/* @__PURE__ */ t(S, { component: "span", children: "Card" })
|
|
2362
2381
|
]
|
|
2363
2382
|
}
|
|
2364
2383
|
),
|
|
2365
|
-
/* @__PURE__ */ b(S, { component: "button", onClick: /* @__PURE__ */ a((w) => L(w.currentTarget), "onClick"), disabled: e, "data-env-id": "dashboardpad-add-filter", className: "llm-env-target llm-env-dashboard-action", sx:
|
|
2366
|
-
/* @__PURE__ */ t(
|
|
2384
|
+
/* @__PURE__ */ b(S, { component: "button", onClick: /* @__PURE__ */ a((w) => L(w.currentTarget), "onClick"), disabled: e, "data-env-id": "dashboardpad-add-filter", className: "llm-env-target llm-env-dashboard-action", sx: Yt(u, p, e), children: [
|
|
2385
|
+
/* @__PURE__ */ t(Xi, { size: 11 }),
|
|
2367
2386
|
/* @__PURE__ */ t(S, { component: "span", children: "Filtro" })
|
|
2368
2387
|
] })
|
|
2369
2388
|
] }),
|
|
@@ -2372,7 +2391,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2372
2391
|
"Filtros · ",
|
|
2373
2392
|
d.length
|
|
2374
2393
|
] }),
|
|
2375
|
-
d.map((w) => /* @__PURE__ */ t(
|
|
2394
|
+
d.map((w) => /* @__PURE__ */ t(Mt, { filter: w, onEdit: v, onDelete: s }, w.i))
|
|
2376
2395
|
] }) : /* @__PURE__ */ t(S, { sx: { p: 1, display: "flex", alignItems: "flex-start" }, children: /* @__PURE__ */ b(X, { sx: { fontSize: 10, color: u.palette.text.disabled, fontStyle: "italic", lineHeight: 1.4 }, children: [
|
|
2377
2396
|
"Nenhum filtro ainda. Use ",
|
|
2378
2397
|
/* @__PURE__ */ t("b", { children: "+ Filtro" }),
|
|
@@ -2381,7 +2400,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2381
2400
|
/* @__PURE__ */ b(S, { sx: { ...V, borderBottom: "none", borderTop: `1px solid ${p.borderSoft}` }, children: [
|
|
2382
2401
|
/* @__PURE__ */ t(We, { children: "Layout" }),
|
|
2383
2402
|
/* @__PURE__ */ b(
|
|
2384
|
-
|
|
2403
|
+
oa,
|
|
2385
2404
|
{
|
|
2386
2405
|
exclusive: !0,
|
|
2387
2406
|
size: "small",
|
|
@@ -2405,8 +2424,8 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2405
2424
|
}
|
|
2406
2425
|
},
|
|
2407
2426
|
children: [
|
|
2408
|
-
/* @__PURE__ */ t(
|
|
2409
|
-
/* @__PURE__ */ t(
|
|
2427
|
+
/* @__PURE__ */ t(Vt, { value: "Boxed", "data-env-id": "dashboard-pad-layout-boxed", children: "Boxed" }),
|
|
2428
|
+
/* @__PURE__ */ t(Vt, { value: "Naked", "data-env-id": "dashboard-pad-layout-naked", children: "Naked" })
|
|
2410
2429
|
]
|
|
2411
2430
|
}
|
|
2412
2431
|
)
|
|
@@ -2416,25 +2435,25 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2416
2435
|
c
|
|
2417
2436
|
] })
|
|
2418
2437
|
] }),
|
|
2419
|
-
/* @__PURE__ */ t(
|
|
2438
|
+
/* @__PURE__ */ t(Wt, { open: !!y, anchorEl: y, onClose: /* @__PURE__ */ a(() => R(null), "onClose"), anchorOrigin: { vertical: "top", horizontal: "right" }, transformOrigin: { vertical: "top", horizontal: "left" }, slotProps: { paper: { sx: M } }, children: /* @__PURE__ */ b(Gt, { dense: !0, children: [
|
|
2420
2439
|
/* @__PURE__ */ b(
|
|
2421
|
-
|
|
2440
|
+
ct,
|
|
2422
2441
|
{
|
|
2423
2442
|
onClick: /* @__PURE__ */ a(() => {
|
|
2424
2443
|
r(), R(null);
|
|
2425
2444
|
}, "onClick"),
|
|
2426
2445
|
sx: K,
|
|
2427
2446
|
children: [
|
|
2428
|
-
/* @__PURE__ */ t(
|
|
2429
|
-
/* @__PURE__ */ t(
|
|
2447
|
+
/* @__PURE__ */ t(st, { sx: { color: u.palette.primary.main, minWidth: 28 }, children: /* @__PURE__ */ t(bt, { size: 14 }) }),
|
|
2448
|
+
/* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12, fontWeight: 500 }, secondaryTypographyProps: { fontSize: 10.5, color: u.palette.text.disabled }, primary: "Genérico", secondary: "Card sem tipo definido — você ou o agente preenche depois" })
|
|
2430
2449
|
]
|
|
2431
2450
|
}
|
|
2432
2451
|
),
|
|
2433
|
-
/* @__PURE__ */ t(
|
|
2434
|
-
Object.entries(
|
|
2452
|
+
/* @__PURE__ */ t(Lt, { sx: { borderColor: p.borderSoft } }),
|
|
2453
|
+
Object.entries(qa).map(([w, F], k) => {
|
|
2435
2454
|
const z = f.category[w];
|
|
2436
2455
|
return /* @__PURE__ */ b(S, { children: [
|
|
2437
|
-
|
|
2456
|
+
k > 0 && /* @__PURE__ */ t(Lt, { sx: { borderColor: p.borderSoft } }),
|
|
2438
2457
|
/* @__PURE__ */ b(X, { sx: { px: 2, pt: 1, pb: 0.5, fontSize: 10, textTransform: "uppercase", letterSpacing: 0.6, color: u.palette.text.disabled, display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
2439
2458
|
/* @__PURE__ */ t(z, { fontSize: "inherit" }),
|
|
2440
2459
|
" ",
|
|
@@ -2443,15 +2462,15 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2443
2462
|
F.map((I) => {
|
|
2444
2463
|
const U = f.specificType[I.specificType];
|
|
2445
2464
|
return /* @__PURE__ */ b(
|
|
2446
|
-
|
|
2465
|
+
ct,
|
|
2447
2466
|
{
|
|
2448
2467
|
onClick: /* @__PURE__ */ a(() => {
|
|
2449
2468
|
g(I.category, I.specificType), R(null);
|
|
2450
2469
|
}, "onClick"),
|
|
2451
2470
|
sx: K,
|
|
2452
2471
|
children: [
|
|
2453
|
-
/* @__PURE__ */ t(
|
|
2454
|
-
/* @__PURE__ */ t(
|
|
2472
|
+
/* @__PURE__ */ t(st, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(U, { fontSize: "small" }) }),
|
|
2473
|
+
/* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12 }, children: I.label })
|
|
2455
2474
|
]
|
|
2456
2475
|
},
|
|
2457
2476
|
I.specificType
|
|
@@ -2460,18 +2479,18 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2460
2479
|
] }, w);
|
|
2461
2480
|
})
|
|
2462
2481
|
] }) }),
|
|
2463
|
-
/* @__PURE__ */ t(
|
|
2482
|
+
/* @__PURE__ */ t(Wt, { open: !!H, anchorEl: H, onClose: /* @__PURE__ */ a(() => L(null), "onClose"), anchorOrigin: { vertical: "top", horizontal: "right" }, transformOrigin: { vertical: "top", horizontal: "left" }, slotProps: { paper: { sx: { ...M, minWidth: 220, maxHeight: void 0 } } }, children: /* @__PURE__ */ t(Gt, { dense: !0, children: zt.map((w) => {
|
|
2464
2483
|
const F = f.filterType[w.filterType];
|
|
2465
2484
|
return /* @__PURE__ */ b(
|
|
2466
|
-
|
|
2485
|
+
ct,
|
|
2467
2486
|
{
|
|
2468
2487
|
onClick: /* @__PURE__ */ a(() => {
|
|
2469
2488
|
h(w.filterType), L(null);
|
|
2470
2489
|
}, "onClick"),
|
|
2471
2490
|
sx: K,
|
|
2472
2491
|
children: [
|
|
2473
|
-
/* @__PURE__ */ t(
|
|
2474
|
-
/* @__PURE__ */ t(
|
|
2492
|
+
/* @__PURE__ */ t(st, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(F, { fontSize: "small" }) }),
|
|
2493
|
+
/* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12 }, children: w.label })
|
|
2475
2494
|
]
|
|
2476
2495
|
},
|
|
2477
2496
|
w.filterType
|
|
@@ -2481,7 +2500,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
|
|
|
2481
2500
|
}
|
|
2482
2501
|
);
|
|
2483
2502
|
}, "LeftRail");
|
|
2484
|
-
function
|
|
2503
|
+
function Jn(e) {
|
|
2485
2504
|
const [n, i] = N(!1), l = ee(!0);
|
|
2486
2505
|
return q(() => {
|
|
2487
2506
|
if (l.current) {
|
|
@@ -2493,8 +2512,8 @@ function Yn(e) {
|
|
|
2493
2512
|
return () => window.clearTimeout(o);
|
|
2494
2513
|
}, [e]), n;
|
|
2495
2514
|
}
|
|
2496
|
-
a(
|
|
2497
|
-
const
|
|
2515
|
+
a(Jn, "usePulseTooltip");
|
|
2516
|
+
const Xn = /* @__PURE__ */ a((e, n, i) => ({
|
|
2498
2517
|
initial: i > 0 ? { scale: 1.18, backgroundColor: e.palette.primary.main, borderColor: e.palette.primary.main } : !1,
|
|
2499
2518
|
animate: { scale: 1, backgroundColor: n.raised, borderColor: e.palette.divider },
|
|
2500
2519
|
transition: { duration: 2, ease: [0.22, 0.8, 0.32, 1] },
|
|
@@ -2515,7 +2534,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2515
2534
|
color: e.palette.text.primary,
|
|
2516
2535
|
transformOrigin: "center center"
|
|
2517
2536
|
}
|
|
2518
|
-
}), "chipMotionProps"),
|
|
2537
|
+
}), "chipMotionProps"), Zn = /* @__PURE__ */ a(({ cardCount: e, surfaces: n }) => /* @__PURE__ */ b(Te, { children: [
|
|
2519
2538
|
/* @__PURE__ */ t(S, { sx: /* @__PURE__ */ a((i) => ({ color: i.palette.primary.main, display: "inline-flex" }), "sx"), children: /* @__PURE__ */ t(Le, { size: 12 }) }),
|
|
2520
2539
|
/* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: "Sketch" }),
|
|
2521
2540
|
/* @__PURE__ */ t(S, { component: "span", sx: /* @__PURE__ */ a((i) => ({ color: i.palette.text.disabled }), "sx"), children: "·" }),
|
|
@@ -2524,8 +2543,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2524
2543
|
" ",
|
|
2525
2544
|
e === 1 ? "card" : "cards"
|
|
2526
2545
|
] })
|
|
2527
|
-
] }), "ChipHead"),
|
|
2528
|
-
const r = le(), g = ue(r), h =
|
|
2546
|
+
] }), "ChipHead"), Xa = /* @__PURE__ */ a(({ cardCount: e, expanded: n, locked: i, onToggle: l, pulseTick: o = 0 }) => {
|
|
2547
|
+
const r = le(), g = ue(r), h = Jn(o);
|
|
2529
2548
|
return /* @__PURE__ */ t(
|
|
2530
2549
|
ce,
|
|
2531
2550
|
{
|
|
@@ -2537,8 +2556,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2537
2556
|
disableHoverListener: !0,
|
|
2538
2557
|
disableFocusListener: !0,
|
|
2539
2558
|
disableTouchListener: !0,
|
|
2540
|
-
children: /* @__PURE__ */ b(re.div, { ...
|
|
2541
|
-
/* @__PURE__ */ t(
|
|
2559
|
+
children: /* @__PURE__ */ b(re.div, { ...Xn(r, g, o), children: [
|
|
2560
|
+
/* @__PURE__ */ t(Zn, { cardCount: e, surfaces: g }),
|
|
2542
2561
|
/* @__PURE__ */ t(ce, { title: n ? "Recolher sketch" : "Editar sketch", placement: "top", children: /* @__PURE__ */ t(
|
|
2543
2562
|
S,
|
|
2544
2563
|
{
|
|
@@ -2563,14 +2582,14 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2563
2582
|
transition: "background-color 2s, border-color 2s",
|
|
2564
2583
|
"&:hover": i ? void 0 : { backgroundColor: g.hover, borderColor: r.palette.primary.main }
|
|
2565
2584
|
},
|
|
2566
|
-
children: n ? /* @__PURE__ */ t(Le, { size: 13 }) : /* @__PURE__ */ t(
|
|
2585
|
+
children: n ? /* @__PURE__ */ t(Le, { size: 13 }) : /* @__PURE__ */ t(ra, { sx: { fontSize: 14 } })
|
|
2567
2586
|
}
|
|
2568
2587
|
) })
|
|
2569
2588
|
] }, o + i.toString())
|
|
2570
2589
|
}
|
|
2571
2590
|
);
|
|
2572
|
-
}, "SketchChip"),
|
|
2573
|
-
const o = le(), r = ue(o), g =
|
|
2591
|
+
}, "SketchChip"), Za = /* @__PURE__ */ a(({ cardCount: e, locked: n, onCreate: i, pulseTick: l = 0 }) => {
|
|
2592
|
+
const o = le(), r = ue(o), g = Jn(l), h = n || !i;
|
|
2574
2593
|
return /* @__PURE__ */ t(
|
|
2575
2594
|
ce,
|
|
2576
2595
|
{
|
|
@@ -2581,8 +2600,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2581
2600
|
disableHoverListener: !0,
|
|
2582
2601
|
disableFocusListener: !0,
|
|
2583
2602
|
disableTouchListener: !0,
|
|
2584
|
-
children: /* @__PURE__ */ b(re.div, { ...
|
|
2585
|
-
/* @__PURE__ */ t(
|
|
2603
|
+
children: /* @__PURE__ */ b(re.div, { ...Xn(o, r, l), children: [
|
|
2604
|
+
/* @__PURE__ */ t(Zn, { cardCount: e, surfaces: r }),
|
|
2586
2605
|
/* @__PURE__ */ b(
|
|
2587
2606
|
S,
|
|
2588
2607
|
{
|
|
@@ -2610,7 +2629,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2610
2629
|
"&:hover": h ? void 0 : { backgroundColor: r.hover, borderColor: o.palette.primary.main }
|
|
2611
2630
|
},
|
|
2612
2631
|
children: [
|
|
2613
|
-
/* @__PURE__ */ t(S, { sx: { color: o.palette.primary.main, display: "inline-flex", backgroundColor: o.palette.background.default, borderRadius: 999, p: 0.25, border: `1px solid ${r.borderSoft}` }, children: /* @__PURE__ */ t(
|
|
2632
|
+
/* @__PURE__ */ t(S, { sx: { color: o.palette.primary.main, display: "inline-flex", backgroundColor: o.palette.background.default, borderRadius: 999, p: 0.25, border: `1px solid ${r.borderSoft}` }, children: /* @__PURE__ */ t(bt, { size: 11 }) }),
|
|
2614
2633
|
/* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: "Adicionar sketch" }),
|
|
2615
2634
|
/* @__PURE__ */ t(S, { component: "span", sx: { color: o.palette.text.disabled, fontFamily: r.fontFamilyMono, fontSize: 10.5 }, children: "desenhe o layout antes de pedir" })
|
|
2616
2635
|
]
|
|
@@ -2619,7 +2638,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2619
2638
|
] }, l)
|
|
2620
2639
|
}
|
|
2621
2640
|
);
|
|
2622
|
-
}, "AddSketchChip"),
|
|
2641
|
+
}, "AddSketchChip"), Qn = Tt(({ onCreateSketch: e, onBeforeSend: n, sketchExpanded: i, bottomSlot: l, zoomLevel: o, onSketchExpandedChange: r, seedDraft: g, compact: h, datasetControls: x, renderDescription: d }, v) => {
|
|
2623
2642
|
const s = he(), [c, u] = N(g);
|
|
2624
2643
|
q(() => {
|
|
2625
2644
|
u(g);
|
|
@@ -2639,23 +2658,23 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2639
2658
|
}), P = B((T) => T.currentSessionId), _ = B((T) => {
|
|
2640
2659
|
var O;
|
|
2641
2660
|
return (O = T.dashboardDefinition) == null ? void 0 : O.filters;
|
|
2642
|
-
}) ??
|
|
2661
|
+
}) ?? Ya, E = B((T) => {
|
|
2643
2662
|
var O;
|
|
2644
2663
|
return ((O = T.dashboardDefinition) == null ? void 0 : O.layoutType) ?? "Boxed";
|
|
2645
2664
|
}), V = B((T) => T.turnOpen), K = B((T) => {
|
|
2646
2665
|
var O;
|
|
2647
2666
|
return ((O = T.dashboardDefinition) == null ? void 0 : O.clientSideChanges) ?? null;
|
|
2648
|
-
}), M = B((T) => T.dashboardDefinition), w = B((T) => T.lastSentDashboard), [F,
|
|
2667
|
+
}), M = B((T) => T.dashboardDefinition), w = B((T) => T.lastSentDashboard), [F, k] = N(!1), z = Se(() => {
|
|
2649
2668
|
if (!M && !w) return { hasAny: !1, text: null };
|
|
2650
2669
|
if (!M || !w) return { hasAny: !0, text: "Sketch alterado" };
|
|
2651
|
-
const T =
|
|
2670
|
+
const T = qt(M.cards ?? [], w.cards ?? []), O = qt(M.filters ?? [], w.filters ?? []), ae = (M.name ?? "") !== (w.name ?? ""), fe = (M.layoutType ?? "Boxed") !== (w.layoutType ?? "Boxed");
|
|
2652
2671
|
if (T.added + T.removed + T.modified + O.added + O.removed + O.modified === 0 && !ae && !fe) return { hasAny: !1, text: null };
|
|
2653
2672
|
const pe = [];
|
|
2654
2673
|
return T.added && pe.push(`+${T.added} ${T.added === 1 ? "card" : "cards"}`), T.removed && pe.push(`-${T.removed} ${T.removed === 1 ? "card" : "cards"}`), T.modified && pe.push(`${T.modified} ${T.modified === 1 ? "card alterado" : "cards alterados"}`), O.added && pe.push(`+${O.added} ${O.added === 1 ? "filtro" : "filtros"}`), O.removed && pe.push(`-${O.removed} ${O.removed === 1 ? "filtro" : "filtros"}`), O.modified && pe.push(`${O.modified} ${O.modified === 1 ? "filtro alterado" : "filtros alterados"}`), pe.length === 0 && pe.push("Sketch alterado"), { hasAny: !0, text: pe.join(" · ") };
|
|
2655
2674
|
}, [M, w]), I = z.hasAny, U = z.text, J = !!y || H > 0 || L > 0, Q = /* @__PURE__ */ a(async (T) => {
|
|
2656
2675
|
u(""), s.getState().commitForSend(), n && await n(T);
|
|
2657
2676
|
}, "handleOnBefore"), ne = i ?? !1, de = /* @__PURE__ */ a((T) => r == null ? void 0 : r(T), "setSketchExpanded"), me = /* @__PURE__ */ a(() => {
|
|
2658
|
-
|
|
2677
|
+
k(!0), setTimeout(() => k(!1), 1e3);
|
|
2659
2678
|
}, "handleForceOpenCard"), ge = /* @__PURE__ */ a((T) => {
|
|
2660
2679
|
const O = T.length === 0 ? "Untitled Dashboard" : T;
|
|
2661
2680
|
s.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${O}'`), s.getState().updateDashboard({ name: O });
|
|
@@ -2670,37 +2689,37 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2670
2689
|
}, "handleAddTypedCard"), m = /* @__PURE__ */ a((T) => {
|
|
2671
2690
|
var O;
|
|
2672
2691
|
return (O = p.current) == null ? void 0 : O.handleAddFilter(T);
|
|
2673
|
-
}, "handleAddFilter"),
|
|
2692
|
+
}, "handleAddFilter"), D = /* @__PURE__ */ a((T) => {
|
|
2674
2693
|
var ae;
|
|
2675
2694
|
const O = ((ae = s.getState().dashboardDefinition) == null ? void 0 : ae.filters) ?? [];
|
|
2676
2695
|
s.getState().recordSketchChange(`filter:${T.i}:edit`, `Edited filter '${T.name}'`), s.getState().updateDashboard({ filters: O.map((fe) => fe.i === T.i ? { ...T } : fe) });
|
|
2677
|
-
}, "handleEditFilter"),
|
|
2696
|
+
}, "handleEditFilter"), $ = /* @__PURE__ */ a((T) => {
|
|
2678
2697
|
var fe;
|
|
2679
|
-
const O = ((fe = s.getState().dashboardDefinition) == null ? void 0 : fe.filters) ?? [], ae = O.find((
|
|
2680
|
-
s.getState().recordSketchChange(`filter:${T}:delete`, `Deleted filter '${(ae == null ? void 0 : ae.name) ?? T}'`), s.getState().updateDashboard({ filters: O.filter((
|
|
2698
|
+
const O = ((fe = s.getState().dashboardDefinition) == null ? void 0 : fe.filters) ?? [], ae = O.find((Ce) => Ce.i === T);
|
|
2699
|
+
s.getState().recordSketchChange(`filter:${T}:delete`, `Deleted filter '${(ae == null ? void 0 : ae.name) ?? T}'`), s.getState().updateDashboard({ filters: O.filter((Ce) => Ce.i !== T) });
|
|
2681
2700
|
}, "handleDeleteFilter"), G = /* @__PURE__ */ b(S, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
2682
2701
|
/* @__PURE__ */ b(tt, { mode: "wait", initial: !1, children: [
|
|
2683
|
-
!J && !ne && /* @__PURE__ */ t(re.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.18, ease: "easeOut" }, children: /* @__PURE__ */ t(S, { sx: { px: 1.25, py: 1, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ t(
|
|
2702
|
+
!J && !ne && /* @__PURE__ */ t(re.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.18, ease: "easeOut" }, children: /* @__PURE__ */ t(S, { sx: { px: 1.25, py: 1, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ t(Za, { onCreate: e, locked: V, cardCount: H, pulseTick: f }) }) }, "add-sketch"),
|
|
2684
2703
|
ne && /* @__PURE__ */ t(re.div, { style: { overflow: "hidden" }, initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.25, ease: "easeOut" }, children: /* @__PURE__ */ b(S, { sx: /* @__PURE__ */ a((T) => ({ flexShrink: 0, height: "min(50vh, 300px)", minHeight: 280, display: "flex", flexDirection: "row", overflow: "auto", background: T.palette.background.default }), "sx"), children: [
|
|
2685
2704
|
/* @__PURE__ */ t(
|
|
2686
|
-
|
|
2705
|
+
Ja,
|
|
2687
2706
|
{
|
|
2688
2707
|
locked: V,
|
|
2689
2708
|
name: R,
|
|
2690
2709
|
onNameChange: ge,
|
|
2691
|
-
layoutType:
|
|
2710
|
+
layoutType: E,
|
|
2692
2711
|
onLayoutTypeChange: C,
|
|
2693
2712
|
onAddGenericCard: A,
|
|
2694
2713
|
onAddTypedCard: Y,
|
|
2695
2714
|
onAddFilter: m,
|
|
2696
2715
|
cardsOpened: F,
|
|
2697
2716
|
filters: _,
|
|
2698
|
-
onEditFilter:
|
|
2699
|
-
onDeleteFilter:
|
|
2717
|
+
onEditFilter: D,
|
|
2718
|
+
onDeleteFilter: $,
|
|
2700
2719
|
datasetControls: x
|
|
2701
2720
|
}
|
|
2702
2721
|
),
|
|
2703
|
-
/* @__PURE__ */ t(S, { sx: { flex: 1, pt: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
|
|
2722
|
+
/* @__PURE__ */ t(S, { sx: { flex: 1, pt: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(rt, { ref: p, zoomLevel: o, onAddCard: me, renderId: "composer-pad", hideInternalHeader: !0, hideFiltersInSketch: !0, renderDescription: d }) })
|
|
2704
2723
|
] }) }, "sketch-expanded")
|
|
2705
2724
|
] }),
|
|
2706
2725
|
J && /* @__PURE__ */ t(
|
|
@@ -2711,20 +2730,20 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
|
|
|
2711
2730
|
exit: { opacity: J ? 1 : 0, height: 0, display: "flex" },
|
|
2712
2731
|
transition: { duration: 0.5, ease: "easeInOut" },
|
|
2713
2732
|
children: /* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 1.25, py: 0.875 }, children: [
|
|
2714
|
-
/* @__PURE__ */ t(
|
|
2733
|
+
/* @__PURE__ */ t(Xa, { cardCount: H, expanded: ne, locked: V, onToggle: /* @__PURE__ */ a(() => de(!ne), "onToggle"), pulseTick: f }),
|
|
2715
2734
|
/* @__PURE__ */ t(X, { sx: /* @__PURE__ */ a((T) => ({ color: T.palette.text.primary, fontWeight: 500, fontSize: 11.5, lineHeight: 1.2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }), "sx"), children: R })
|
|
2716
2735
|
] })
|
|
2717
2736
|
},
|
|
2718
2737
|
"filled-sketch"
|
|
2719
2738
|
)
|
|
2720
|
-
] }), Z =
|
|
2721
|
-
const T = "Será enviado junto com a mensagem", O =
|
|
2739
|
+
] }), Z = Se(() => {
|
|
2740
|
+
const T = "Será enviado junto com a mensagem", O = It(K ?? void 0);
|
|
2722
2741
|
return O ? `${T}:
|
|
2723
2742
|
|
|
2724
2743
|
${O}` : T;
|
|
2725
2744
|
}, [K]);
|
|
2726
2745
|
return /* @__PURE__ */ t(
|
|
2727
|
-
|
|
2746
|
+
Ji,
|
|
2728
2747
|
{
|
|
2729
2748
|
ref: v,
|
|
2730
2749
|
seedDraft: c,
|
|
@@ -2742,8 +2761,8 @@ ${O}` : T;
|
|
|
2742
2761
|
P ?? "no-session"
|
|
2743
2762
|
);
|
|
2744
2763
|
});
|
|
2745
|
-
|
|
2746
|
-
const
|
|
2764
|
+
Qn.displayName = "DrawablePrompt";
|
|
2765
|
+
const ei = He.memo(Qn), ti = [
|
|
2747
2766
|
{
|
|
2748
2767
|
label: "Compare vendas e reservas por semana, focando em rotas internacionais",
|
|
2749
2768
|
prompt: "Crie uma sugestão de dashboard de vendas e reservas por semana, focando em rotas nacionais. Envie um rascunho pronto para carregar na minha interface."
|
|
@@ -2753,7 +2772,7 @@ const Qn = He.memo(Zn), ei = [
|
|
|
2753
2772
|
prompt: "Me ajude a entender como o Dashboard Composer funciona. Apresente os tipos de gráficos e depois envie um guia ao vivo, do passo a passo da interface"
|
|
2754
2773
|
}
|
|
2755
2774
|
];
|
|
2756
|
-
function
|
|
2775
|
+
function Qa({ kinds: e, accent: n }) {
|
|
2757
2776
|
const i = le(), l = ue(i), o = n ? i.palette.primary.main : i.palette.text.disabled;
|
|
2758
2777
|
return e.length === 0 ? /* @__PURE__ */ t(S, { sx: { width: "100%", height: 56, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 0.375 }, children: Array.from({ length: 6 }).map((r, g) => /* @__PURE__ */ t(S, { sx: { background: i.palette.background.default, border: `1px dashed ${l.borderSoft}`, borderRadius: 0.5 } }, g)) }) : /* @__PURE__ */ t(S, { sx: { width: "100%", height: 56, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 0.375 }, children: e.slice(0, 6).map((r, g) => /* @__PURE__ */ b(
|
|
2759
2778
|
S,
|
|
@@ -2780,14 +2799,14 @@ function Za({ kinds: e, accent: n }) {
|
|
|
2780
2799
|
`Template${g}`
|
|
2781
2800
|
)) });
|
|
2782
2801
|
}
|
|
2783
|
-
a(
|
|
2784
|
-
function
|
|
2802
|
+
a(Qa, "TemplatePreview");
|
|
2803
|
+
function eo(e) {
|
|
2785
2804
|
if (!e) return "";
|
|
2786
2805
|
const n = Date.now() - e, i = 6e4, l = 60 * i, o = 24 * l;
|
|
2787
2806
|
return n < i ? "agora" : n < l ? `${Math.floor(n / i)}m` : n < o ? `${Math.floor(n / l)}h` : n < 7 * o ? `${Math.floor(n / o)}d` : `${Math.floor(n / (7 * o))}sem`;
|
|
2788
2807
|
}
|
|
2789
|
-
a(
|
|
2790
|
-
const
|
|
2808
|
+
a(eo, "formatRelativeTime");
|
|
2809
|
+
const Ft = /* @__PURE__ */ a(({
|
|
2791
2810
|
onDraftPromptChange: e,
|
|
2792
2811
|
onApplyTemplate: n,
|
|
2793
2812
|
composerSlot: i,
|
|
@@ -2795,8 +2814,8 @@ const _t = /* @__PURE__ */ a(({
|
|
|
2795
2814
|
recentSessions: o,
|
|
2796
2815
|
onSelectSession: r,
|
|
2797
2816
|
onSearchAllSessions: g,
|
|
2798
|
-
suggestions: h =
|
|
2799
|
-
templates: x =
|
|
2817
|
+
suggestions: h = ti,
|
|
2818
|
+
templates: x = Rt
|
|
2800
2819
|
}) => {
|
|
2801
2820
|
const d = le(), v = ue(d), s = l ?? ((p) => p), c = {
|
|
2802
2821
|
background: "transparent",
|
|
@@ -2814,14 +2833,11 @@ const _t = /* @__PURE__ */ a(({
|
|
|
2814
2833
|
}, u = { fontSize: 11, color: d.palette.text.disabled, textTransform: "uppercase", letterSpacing: 0.5, mb: 1 };
|
|
2815
2834
|
return /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, overflow: "auto", display: "flex", flexDirection: "column", gap: 3.5, padding: { xs: 3, md: "40px 56px" }, background: d.palette.background.default }, children: [
|
|
2816
2835
|
s(
|
|
2817
|
-
/* @__PURE__ */
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
/* @__PURE__ */ t(S, { component: "span", sx: { color: d.palette.text.disabled }, children: "ou comece de um template." })
|
|
2823
|
-
] })
|
|
2824
|
-
] }),
|
|
2836
|
+
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ b(X, { component: "h1", sx: { fontSize: 30, fontWeight: 600, color: d.palette.text.primary, margin: 0, lineHeight: 1.2, letterSpacing: -0.4 }, children: [
|
|
2837
|
+
"Descreva o que você quer, peça ajuda",
|
|
2838
|
+
" ",
|
|
2839
|
+
/* @__PURE__ */ t(S, { component: "span", sx: { color: d.palette.text.disabled }, children: "ou comece de um template." })
|
|
2840
|
+
] }) }),
|
|
2825
2841
|
"hero"
|
|
2826
2842
|
),
|
|
2827
2843
|
i,
|
|
@@ -2851,7 +2867,7 @@ const _t = /* @__PURE__ */ a(({
|
|
|
2851
2867
|
p.cardCount,
|
|
2852
2868
|
" ",
|
|
2853
2869
|
p.cardCount === 1 ? "card" : "cards",
|
|
2854
|
-
p.updatedAt ? ` · ${
|
|
2870
|
+
p.updatedAt ? ` · ${eo(p.updatedAt)}` : ""
|
|
2855
2871
|
] })
|
|
2856
2872
|
]
|
|
2857
2873
|
},
|
|
@@ -2892,7 +2908,7 @@ const _t = /* @__PURE__ */ a(({
|
|
|
2892
2908
|
"&:hover": { borderColor: d.palette.primary.main, transform: "translateY(-1px)" }
|
|
2893
2909
|
},
|
|
2894
2910
|
children: [
|
|
2895
|
-
/* @__PURE__ */ t(
|
|
2911
|
+
/* @__PURE__ */ t(Qa, { kinds: jn(p), accent: p.recommended }),
|
|
2896
2912
|
/* @__PURE__ */ b(S, { children: [
|
|
2897
2913
|
/* @__PURE__ */ t(X, { sx: { fontSize: 12.5, color: d.palette.text.primary, fontWeight: 500 }, children: p.name }),
|
|
2898
2914
|
/* @__PURE__ */ t(X, { sx: { fontSize: 10.5, color: d.palette.text.secondary, mt: 0.25, lineHeight: 1.4 }, children: p.desc }),
|
|
@@ -2907,33 +2923,33 @@ const _t = /* @__PURE__ */ a(({
|
|
|
2907
2923
|
)
|
|
2908
2924
|
] });
|
|
2909
2925
|
}, "EntryEmptyState");
|
|
2910
|
-
|
|
2911
|
-
const oe = 6,
|
|
2912
|
-
function
|
|
2926
|
+
Ft.displayName = "EntryEmptyState";
|
|
2927
|
+
const oe = 6, Me = 12, Jt = 320, to = 220, Xt = 150, Zt = 3e3;
|
|
2928
|
+
function no(e, n, i, l) {
|
|
2913
2929
|
const o = window.innerWidth, r = window.innerHeight, g = e && e !== "auto" ? [e] : ["bottom", "top", "right", "left"];
|
|
2914
2930
|
for (const h of g) {
|
|
2915
2931
|
let x = 0, d = 0;
|
|
2916
2932
|
switch (h) {
|
|
2917
2933
|
case "bottom":
|
|
2918
|
-
x = n.top + n.height + oe +
|
|
2934
|
+
x = n.top + n.height + oe + Me, d = n.left + n.width / 2 - i / 2;
|
|
2919
2935
|
break;
|
|
2920
2936
|
case "top":
|
|
2921
|
-
x = n.top - oe -
|
|
2937
|
+
x = n.top - oe - Me - l, d = n.left + n.width / 2 - i / 2;
|
|
2922
2938
|
break;
|
|
2923
2939
|
case "right":
|
|
2924
|
-
x = n.top + n.height / 2 - l / 2, d = n.left + n.width + oe +
|
|
2940
|
+
x = n.top + n.height / 2 - l / 2, d = n.left + n.width + oe + Me;
|
|
2925
2941
|
break;
|
|
2926
2942
|
case "left":
|
|
2927
|
-
x = n.top + n.height / 2 - l / 2, d = n.left - oe -
|
|
2943
|
+
x = n.top + n.height / 2 - l / 2, d = n.left - oe - Me - i;
|
|
2928
2944
|
break;
|
|
2929
2945
|
}
|
|
2930
2946
|
if (d = Math.max(8, Math.min(d, o - i - 8)), x = Math.max(8, Math.min(x, r - l - 8)), x >= 0 && x + l <= r && d >= 0 && d + i <= o || h === g[g.length - 1]) return { top: x, left: d, resolvedPlacement: h };
|
|
2931
2947
|
}
|
|
2932
|
-
return { top: n.top + n.height +
|
|
2948
|
+
return { top: n.top + n.height + Me, left: n.left, resolvedPlacement: "bottom" };
|
|
2933
2949
|
}
|
|
2934
|
-
a(
|
|
2935
|
-
const
|
|
2936
|
-
const g = le(), h = ue(g), [x, d] = N(0), [v, s] = N(null), [c, u] = N({ width:
|
|
2950
|
+
a(no, "computePlacement");
|
|
2951
|
+
const ni = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteraction: i = !1, onComplete: l, onDismiss: o, resolveElement: r = Pt }) => {
|
|
2952
|
+
const g = le(), h = ue(g), [x, d] = N(0), [v, s] = N(null), [c, u] = N({ width: Jt, height: 120 }), p = ee(null), f = ee(0), y = e[x], R = x === 0, H = x === e.length - 1, L = W(() => {
|
|
2937
2953
|
var w;
|
|
2938
2954
|
if (!y) return;
|
|
2939
2955
|
const M = r(y.target);
|
|
@@ -2946,8 +2962,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
2946
2962
|
q(() => {
|
|
2947
2963
|
if (!y) return;
|
|
2948
2964
|
let M = !1, w = 0, F;
|
|
2949
|
-
const
|
|
2950
|
-
console.warn(`[@aintela/bi SpotlightOverlay] Step ${x + 1}/${e.length} could not resolve its target within ${
|
|
2965
|
+
const k = /* @__PURE__ */ a(() => {
|
|
2966
|
+
console.warn(`[@aintela/bi SpotlightOverlay] Step ${x + 1}/${e.length} could not resolve its target within ${Zt} ms; skipping.`, { target: y.target, title: y.title }), x < e.length - 1 ? d((U) => U + 1) : (console.warn("[@aintela/bi SpotlightOverlay] All steps failed to resolve; dismissing tour."), o());
|
|
2951
2967
|
}, "giveUpOnStep"), z = /* @__PURE__ */ a(() => {
|
|
2952
2968
|
var J;
|
|
2953
2969
|
if (M) return;
|
|
@@ -2959,11 +2975,11 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
2959
2975
|
return;
|
|
2960
2976
|
}
|
|
2961
2977
|
}
|
|
2962
|
-
if (w +=
|
|
2963
|
-
|
|
2978
|
+
if (w += Xt, w >= Zt) {
|
|
2979
|
+
k();
|
|
2964
2980
|
return;
|
|
2965
2981
|
}
|
|
2966
|
-
F = window.setTimeout(z,
|
|
2982
|
+
F = window.setTimeout(z, Xt);
|
|
2967
2983
|
}, "attempt");
|
|
2968
2984
|
z();
|
|
2969
2985
|
const I = /* @__PURE__ */ a(() => {
|
|
@@ -2989,14 +3005,14 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
2989
3005
|
}, "onKey");
|
|
2990
3006
|
return window.addEventListener("keydown", M), () => window.removeEventListener("keydown", M);
|
|
2991
3007
|
}, [o, P, _]), !y || typeof document > "u") return null;
|
|
2992
|
-
const
|
|
3008
|
+
const E = v ? `polygon(
|
|
2993
3009
|
0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
|
|
2994
3010
|
${v.left - oe}px ${v.top - oe}px,
|
|
2995
3011
|
${v.left + v.width + oe}px ${v.top - oe}px,
|
|
2996
3012
|
${v.left + v.width + oe}px ${v.top + v.height + oe}px,
|
|
2997
3013
|
${v.left - oe}px ${v.top + v.height + oe}px,
|
|
2998
3014
|
${v.left - oe}px ${v.top - oe}px
|
|
2999
|
-
)` : void 0, V = v ?
|
|
3015
|
+
)` : void 0, V = v ? no(y.placement, v, c.width, c.height) : null, K = {
|
|
3000
3016
|
fontFamily: g.typography.fontFamily,
|
|
3001
3017
|
fontSize: 11.5,
|
|
3002
3018
|
fontWeight: 500,
|
|
@@ -3007,7 +3023,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3007
3023
|
transition: "filter .12s, background-color .12s, border-color .12s",
|
|
3008
3024
|
border: "1px solid transparent"
|
|
3009
3025
|
};
|
|
3010
|
-
return
|
|
3026
|
+
return la(
|
|
3011
3027
|
/* @__PURE__ */ b(S, { className: "llm-guide-overlay-root", sx: { position: "fixed", inset: 0, zIndex: 9999 }, children: [
|
|
3012
3028
|
v && /* @__PURE__ */ t(
|
|
3013
3029
|
S,
|
|
@@ -3016,8 +3032,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3016
3032
|
sx: {
|
|
3017
3033
|
position: "absolute",
|
|
3018
3034
|
inset: 0,
|
|
3019
|
-
backgroundColor:
|
|
3020
|
-
clipPath:
|
|
3035
|
+
backgroundColor: ve(g.palette.common.black, n),
|
|
3036
|
+
clipPath: E,
|
|
3021
3037
|
transition: "clip-path 0.3s ease",
|
|
3022
3038
|
pointerEvents: i ? "none" : "auto"
|
|
3023
3039
|
}
|
|
@@ -3035,7 +3051,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3035
3051
|
height: v.height + oe * 2,
|
|
3036
3052
|
borderRadius: "6px",
|
|
3037
3053
|
border: `2px solid ${g.palette.primary.main}`,
|
|
3038
|
-
boxShadow: `0 0 0 4px ${
|
|
3054
|
+
boxShadow: `0 0 0 4px ${ve(g.palette.primary.main, 0.2)}, 0 8px 24px ${ve(g.palette.primary.main, 0.13)}`,
|
|
3039
3055
|
transition: "all 0.3s ease",
|
|
3040
3056
|
pointerEvents: "none"
|
|
3041
3057
|
}
|
|
@@ -3049,8 +3065,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3049
3065
|
position: "absolute",
|
|
3050
3066
|
top: V.top,
|
|
3051
3067
|
left: V.left,
|
|
3052
|
-
maxWidth:
|
|
3053
|
-
minWidth:
|
|
3068
|
+
maxWidth: Jt,
|
|
3069
|
+
minWidth: to,
|
|
3054
3070
|
p: 2,
|
|
3055
3071
|
borderRadius: 1.5,
|
|
3056
3072
|
backgroundColor: g.palette.background.paper,
|
|
@@ -3087,7 +3103,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3087
3103
|
] }),
|
|
3088
3104
|
document.body
|
|
3089
3105
|
);
|
|
3090
|
-
}, "SpotlightOverlay"),
|
|
3106
|
+
}, "SpotlightOverlay"), io = "aintela-bi-composer", ao = 2, oo = /* @__PURE__ */ a((e) => {
|
|
3091
3107
|
var ge;
|
|
3092
3108
|
const { sessionId: n = null, routeSessionId: i, composerMode: l, onForceExecutionMode: o, recentSessionsResolved: r } = e, g = le(), h = ue(g), x = he(), d = et(), v = B((C) => {
|
|
3093
3109
|
var A;
|
|
@@ -3095,7 +3111,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3095
3111
|
}), s = B((C) => {
|
|
3096
3112
|
var A;
|
|
3097
3113
|
return ((A = C.dashboardDefinition) == null ? void 0 : A.name) ?? null;
|
|
3098
|
-
}), c = B((C) => C.turnOpen), u = B((C) => C.sketchExpanded), p = W((C) => x.getState().setSketchExpanded(C), [x]), [f, y] = N(""), [R, H] = N(void 0), [L, P] = N(!1), [_,
|
|
3114
|
+
}), c = B((C) => C.turnOpen), u = B((C) => C.sketchExpanded), p = W((C) => x.getState().setSketchExpanded(C), [x]), [f, y] = N(""), [R, H] = N(void 0), [L, P] = N(!1), [_, E] = N(!1), V = v !== null, K = ee(null);
|
|
3099
3115
|
q(() => {
|
|
3100
3116
|
var A;
|
|
3101
3117
|
const C = s == null ? void 0 : s.trim();
|
|
@@ -3106,9 +3122,9 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3106
3122
|
}, [s]), q(() => {
|
|
3107
3123
|
x.getState().currentSessionId !== n && x.getState().setCurrentSessionId(n);
|
|
3108
3124
|
}, [n, x]), q(() => {
|
|
3109
|
-
c &&
|
|
3125
|
+
c && E(!1);
|
|
3110
3126
|
}, [c]), q(() => {
|
|
3111
|
-
(v || void 0) !== R &&
|
|
3127
|
+
(v || void 0) !== R && E(!0), H(v ?? void 0);
|
|
3112
3128
|
}, [v]), q(() => {
|
|
3113
3129
|
var m;
|
|
3114
3130
|
const C = x.getState().dashboardDefinition, A = (C == null ? void 0 : C.originalSessionId) ?? null;
|
|
@@ -3119,21 +3135,21 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3119
3135
|
}
|
|
3120
3136
|
let Y = !1;
|
|
3121
3137
|
return (async () => {
|
|
3122
|
-
var
|
|
3138
|
+
var D;
|
|
3123
3139
|
try {
|
|
3124
|
-
const
|
|
3140
|
+
const $ = await d.getDashboardBySession(i);
|
|
3125
3141
|
if (Y) return;
|
|
3126
|
-
if ((
|
|
3142
|
+
if ((D = x.getState().dashboardDefinition) != null && D.id) {
|
|
3127
3143
|
K.current = i;
|
|
3128
3144
|
return;
|
|
3129
3145
|
}
|
|
3130
|
-
if (
|
|
3146
|
+
if (!$) {
|
|
3131
3147
|
console.warn("[@aintela/bi composer] no dashboard found for session", i), K.current = i;
|
|
3132
3148
|
return;
|
|
3133
3149
|
}
|
|
3134
|
-
x.getState().loadDashboard(Be(
|
|
3135
|
-
} catch (
|
|
3136
|
-
console.error("[@aintela/bi composer] failed to load dashboard for session",
|
|
3150
|
+
x.getState().loadDashboard(Be($)), K.current = i;
|
|
3151
|
+
} catch ($) {
|
|
3152
|
+
console.error("[@aintela/bi composer] failed to load dashboard for session", $);
|
|
3137
3153
|
}
|
|
3138
3154
|
})(), () => {
|
|
3139
3155
|
Y = !0;
|
|
@@ -3141,7 +3157,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3141
3157
|
}, [i, d, x]);
|
|
3142
3158
|
const M = W(
|
|
3143
3159
|
async (C) => {
|
|
3144
|
-
var m,
|
|
3160
|
+
var m, D, $, G;
|
|
3145
3161
|
const A = n;
|
|
3146
3162
|
let Y = x.getState().dashboardDefinition;
|
|
3147
3163
|
if (Y != null && Y.id && Y.originalSessionId && Y.originalSessionId !== A && Y.originalSessionId !== i && (x.getState().updateDashboard(void 0), Y = x.getState().dashboardDefinition), Y != null && Y.id) {
|
|
@@ -3158,13 +3174,13 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3158
3174
|
return;
|
|
3159
3175
|
}
|
|
3160
3176
|
try {
|
|
3161
|
-
const Z = !C && Y && ((((m = Y.cards) == null ? void 0 : m.length) ?? 0) > 0 || (((
|
|
3177
|
+
const Z = !C && Y && ((((m = Y.cards) == null ? void 0 : m.length) ?? 0) > 0 || (((D = Y.filters) == null ? void 0 : D.length) ?? 0) > 0) ? { name: Y.name, cards: Y.cards, filters: Y.filters, layoutType: Y.layoutType } : void 0, te = C ?? Z;
|
|
3162
3178
|
te && !te.layoutType && (te.layoutType = "Naked");
|
|
3163
|
-
const T = await
|
|
3179
|
+
const T = await $t(d, A, te), O = x.getState().dashboardDefinition;
|
|
3164
3180
|
x.getState().updateDashboard({
|
|
3165
3181
|
...T,
|
|
3166
3182
|
name: (te == null ? void 0 : te.name) ?? (O == null ? void 0 : O.name) ?? T.name,
|
|
3167
|
-
cards: (te == null ? void 0 : te.cards) ?? ((
|
|
3183
|
+
cards: (te == null ? void 0 : te.cards) ?? (($ = O == null ? void 0 : O.cards) != null && $.length ? O.cards : T.cards),
|
|
3168
3184
|
filters: (te == null ? void 0 : te.filters) ?? ((G = O == null ? void 0 : O.filters) != null && G.length ? O.filters : T.filters)
|
|
3169
3185
|
}), p(!0);
|
|
3170
3186
|
} catch (Z) {
|
|
@@ -3177,36 +3193,36 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3177
3193
|
}, [M, p]), F = W(async (C) => {
|
|
3178
3194
|
var A;
|
|
3179
3195
|
await M(), await ((A = e.onBeforeSend) == null ? void 0 : A.call(e, C));
|
|
3180
|
-
}, [M, e.onBeforeSend]),
|
|
3196
|
+
}, [M, e.onBeforeSend]), k = W((C) => {
|
|
3181
3197
|
if (C.cells.length === 0) {
|
|
3182
3198
|
o();
|
|
3183
3199
|
return;
|
|
3184
3200
|
}
|
|
3185
|
-
M({ name: C.name, cards:
|
|
3186
|
-
}, [M, o]), { setScroller: z } =
|
|
3201
|
+
M({ name: C.name, cards: Un(C), filters: [] });
|
|
3202
|
+
}, [M, o]), { setScroller: z } = Kn(), I = ee(null);
|
|
3187
3203
|
q(() => {
|
|
3188
3204
|
const C = I.current;
|
|
3189
3205
|
if (!C) {
|
|
3190
3206
|
z(null);
|
|
3191
3207
|
return;
|
|
3192
3208
|
}
|
|
3193
|
-
const A = /* @__PURE__ */ a(() => [C, ...Array.from(C.querySelectorAll("*"))].reverse().find((
|
|
3209
|
+
const A = /* @__PURE__ */ a(() => [C, ...Array.from(C.querySelectorAll("*"))].reverse().find(($) => $.scrollHeight > $.clientHeight + 8 && /auto|scroll/.test(getComputedStyle($).overflowY)) ?? null, "find"), Y = A();
|
|
3194
3210
|
if (Y) {
|
|
3195
3211
|
z(Y);
|
|
3196
3212
|
return;
|
|
3197
3213
|
}
|
|
3198
3214
|
if (typeof ResizeObserver > "u") return;
|
|
3199
3215
|
const m = new ResizeObserver(() => {
|
|
3200
|
-
const
|
|
3201
|
-
|
|
3216
|
+
const D = A();
|
|
3217
|
+
D && (z(D), m.disconnect());
|
|
3202
3218
|
});
|
|
3203
3219
|
return m.observe(C), () => m.disconnect();
|
|
3204
3220
|
}, [l, z]);
|
|
3205
|
-
const U =
|
|
3221
|
+
const U = aa(), J = U ? Ln : Nn, Q = U ? Gn : Bn, ne = U ? Wn : Hn, de = W(
|
|
3206
3222
|
(C, A) => /* @__PURE__ */ t(re.div, { variants: J, initial: "hidden", animate: "visible", exit: "hidden", children: C }, A),
|
|
3207
3223
|
[J]
|
|
3208
|
-
), me = /* @__PURE__ */ a(() => /* @__PURE__ */ t(re.div, { layoutId:
|
|
3209
|
-
|
|
3224
|
+
), me = /* @__PURE__ */ a(() => /* @__PURE__ */ t(re.div, { layoutId: io, transition: ne, style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
|
|
3225
|
+
ei,
|
|
3210
3226
|
{
|
|
3211
3227
|
onCreateSketch: w,
|
|
3212
3228
|
onBeforeSend: F,
|
|
@@ -3221,10 +3237,10 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3221
3237
|
}
|
|
3222
3238
|
) }), "renderPromptForBranch");
|
|
3223
3239
|
return /* @__PURE__ */ t(tt, { mode: "popLayout", initial: !1, children: l === "empty" ? /* @__PURE__ */ t(re.div, { initial: { opacity: 1 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
|
|
3224
|
-
|
|
3240
|
+
Ft,
|
|
3225
3241
|
{
|
|
3226
3242
|
onDraftPromptChange: y,
|
|
3227
|
-
onApplyTemplate:
|
|
3243
|
+
onApplyTemplate: k,
|
|
3228
3244
|
composerSlot: me(),
|
|
3229
3245
|
ambientWrapper: de,
|
|
3230
3246
|
recentSessions: r,
|
|
@@ -3233,9 +3249,9 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3233
3249
|
suggestions: e.suggestions,
|
|
3234
3250
|
templates: e.templates
|
|
3235
3251
|
}
|
|
3236
|
-
) }, "empty-layout") : /* @__PURE__ */ t(re.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { minHeight: 0, width: "100%", height: "100%", display: "flex", background: g.palette.background.default }, children: /* @__PURE__ */ b(
|
|
3252
|
+
) }, "empty-layout") : /* @__PURE__ */ t(re.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { minHeight: 0, width: "100%", height: "100%", display: "flex", background: g.palette.background.default }, children: /* @__PURE__ */ b(Ht, { direction: "row", sx: { display: "inline-flex", width: "100%", height: "100%", flexWrap: "nowrap" }, children: [
|
|
3237
3253
|
/* @__PURE__ */ b(
|
|
3238
|
-
|
|
3254
|
+
Ht,
|
|
3239
3255
|
{
|
|
3240
3256
|
sx: {
|
|
3241
3257
|
minWidth: "20%",
|
|
@@ -3254,10 +3270,10 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3254
3270
|
]
|
|
3255
3271
|
}
|
|
3256
3272
|
),
|
|
3257
|
-
e.sidePanel === void 0 ? /* @__PURE__ */ t(
|
|
3273
|
+
e.sidePanel === void 0 ? /* @__PURE__ */ t(Yn, { width: e.sidePanelWidth ?? "70%", defaultCollapsed: !_, onCollapseChange: P }) : typeof e.sidePanel == "function" ? e.sidePanel({ hasDashboard: V, turnOpen: c }) : e.sidePanel,
|
|
3258
3274
|
(ge = e.renderProgressPanel) == null ? void 0 : ge.call(e, { hasDashboard: V, dashboardCollapsed: L, turnOpen: c })
|
|
3259
3275
|
] }) }, "execution-layout") });
|
|
3260
|
-
}, "ComposerInner"),
|
|
3276
|
+
}, "ComposerInner"), ii = /* @__PURE__ */ a((e) => {
|
|
3261
3277
|
const n = he(), i = et(), l = ee(null);
|
|
3262
3278
|
q(() => {
|
|
3263
3279
|
const P = l.current;
|
|
@@ -3267,8 +3283,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3267
3283
|
n.getState().setViewport({ width: V.width, height: V.height });
|
|
3268
3284
|
}, "publish");
|
|
3269
3285
|
_();
|
|
3270
|
-
const
|
|
3271
|
-
return
|
|
3286
|
+
const E = new ResizeObserver(_);
|
|
3287
|
+
return E.observe(P), () => E.disconnect();
|
|
3272
3288
|
}, [n]);
|
|
3273
3289
|
const [o, r] = N([]);
|
|
3274
3290
|
q(() => {
|
|
@@ -3278,12 +3294,12 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3278
3294
|
try {
|
|
3279
3295
|
const _ = await i.listDashboards();
|
|
3280
3296
|
if (P) return;
|
|
3281
|
-
const
|
|
3297
|
+
const E = _.filter((V) => !!V.originalSessionId).map((V) => {
|
|
3282
3298
|
var M;
|
|
3283
3299
|
const K = V.updatedAt ? V.updatedAt instanceof Date ? V.updatedAt.getTime() : Date.parse(String(V.updatedAt)) : 0;
|
|
3284
3300
|
return { sessionId: V.originalSessionId, name: V.name || "Dashboard", cardCount: ((M = V.cards) == null ? void 0 : M.length) ?? 0, updatedAt: Number.isFinite(K) ? K : 0 };
|
|
3285
3301
|
});
|
|
3286
|
-
|
|
3302
|
+
E.sort((V, K) => (K.updatedAt ?? 0) - (V.updatedAt ?? 0)), r(E.slice(0, ao));
|
|
3287
3303
|
} catch (_) {
|
|
3288
3304
|
console.error("[@aintela/bi composer] failed to list dashboards", _);
|
|
3289
3305
|
}
|
|
@@ -3298,49 +3314,49 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
|
|
|
3298
3314
|
var _;
|
|
3299
3315
|
return ((_ = P.dashboardDefinition) == null ? void 0 : _.id) ?? null;
|
|
3300
3316
|
}), c = B((P) => {
|
|
3301
|
-
var _,
|
|
3302
|
-
return ((
|
|
3317
|
+
var _, E;
|
|
3318
|
+
return ((E = (_ = P.dashboardDefinition) == null ? void 0 : _.cards) == null ? void 0 : E.length) ?? 0;
|
|
3303
3319
|
}), u = B((P) => {
|
|
3304
|
-
var _,
|
|
3305
|
-
return ((
|
|
3320
|
+
var _, E;
|
|
3321
|
+
return ((E = (_ = P.dashboardDefinition) == null ? void 0 : _.filters) == null ? void 0 : E.length) ?? 0;
|
|
3306
3322
|
}), p = ee({ id: s, cards: c, filters: u, firstTime: !0 });
|
|
3307
3323
|
q(() => {
|
|
3308
3324
|
if (h) return;
|
|
3309
|
-
const P = p.current, _ = !P.id && !!s,
|
|
3310
|
-
p.current = { id: s, cards: c, filters: u, firstTime: !1 }, !K && (_ ||
|
|
3325
|
+
const P = p.current, _ = !P.id && !!s, E = P.cards === 0 && c > 0, V = P.filters === 0 && u > 0, K = P.firstTime;
|
|
3326
|
+
p.current = { id: s, cards: c, filters: u, firstTime: !1 }, !K && (_ || E || V) && n.getState().setSketchExpanded(!0);
|
|
3311
3327
|
}, [s, c, u, h, n]);
|
|
3312
3328
|
const f = B((P) => P.guideSteps), y = B((P) => P.guideOptions), R = B((P) => P.dismissGuide);
|
|
3313
3329
|
q(() => {
|
|
3314
|
-
f && f.length > 0 &&
|
|
3330
|
+
f && f.length > 0 && Sn(f) && n.getState().setSketchExpanded(!0);
|
|
3315
3331
|
}, [f, n]);
|
|
3316
|
-
const H =
|
|
3332
|
+
const H = Se(() => h ? "generating" : !x && !e.routeSessionId ? "empty" : d || v ? "done-dashboard" : "done-text", [h, x, d, v, e.routeSessionId]), L = W(() => {
|
|
3317
3333
|
n.getState().setHasCompletedOnce(!0), n.getState().setSketchExpanded(!1);
|
|
3318
3334
|
}, [n]);
|
|
3319
3335
|
return /* @__PURE__ */ b(Te, { children: [
|
|
3320
|
-
/* @__PURE__ */ t("div", { className: "bi-composer-root", ref: l, style: { display: "inherit", height: "100%" }, children: /* @__PURE__ */ t(
|
|
3321
|
-
f && f.length > 0 && /* @__PURE__ */ t(
|
|
3336
|
+
/* @__PURE__ */ t("div", { className: "bi-composer-root", ref: l, style: { display: "inherit", height: "100%" }, children: /* @__PURE__ */ t(oo, { ...e, composerMode: H, onForceExecutionMode: L, recentSessionsResolved: g }) }),
|
|
3337
|
+
f && f.length > 0 && /* @__PURE__ */ t(ni, { steps: f, overlayOpacity: y == null ? void 0 : y.overlayOpacity, allowInteraction: y == null ? void 0 : y.allowInteraction, onComplete: y == null ? void 0 : y.onComplete, onDismiss: R, resolveElement: e.resolveGuideElement ?? Pt })
|
|
3322
3338
|
] });
|
|
3323
3339
|
}, "ComposerView");
|
|
3324
|
-
|
|
3325
|
-
const
|
|
3326
|
-
function
|
|
3340
|
+
ii.displayName = "ComposerView";
|
|
3341
|
+
const Ct = 20, ro = 60;
|
|
3342
|
+
function lo(e) {
|
|
3327
3343
|
for (const n of e.artifactData ?? [])
|
|
3328
3344
|
if ((n == null ? void 0 : n.type) === "Dashboard" && n.id) return n.id;
|
|
3329
3345
|
return null;
|
|
3330
3346
|
}
|
|
3331
|
-
a(
|
|
3332
|
-
function
|
|
3333
|
-
const e = he(), n =
|
|
3347
|
+
a(lo, "detectProducedDashboardId");
|
|
3348
|
+
function ai() {
|
|
3349
|
+
const e = he(), n = zn(), i = W((h) => {
|
|
3334
3350
|
var H, L, P, _;
|
|
3335
|
-
const { viewport: x, dashboardDefinition: d } = e.getState(), v = Math.round(x.height), s = x.width === 0 ? 0 : Math.round(x.width / 2 -
|
|
3336
|
-
|
|
3337
|
-
widthPx: typeof
|
|
3338
|
-
heightPx: typeof
|
|
3351
|
+
const { viewport: x, dashboardDefinition: d } = e.getState(), v = Math.round(x.height), s = x.width === 0 ? 0 : Math.round(x.width / 2 - ro), c = s, u = Math.round(1080 * 0.9), p = Math.round(u / 12), f = ((d == null ? void 0 : d.cards) ?? []).map((E) => ({
|
|
3352
|
+
...E,
|
|
3353
|
+
widthPx: typeof E.w == "number" && p > 0 ? Math.round(p * E.w * 0.95) : void 0,
|
|
3354
|
+
heightPx: typeof E.h == "number" ? Math.round(E.h * Ct * 0.95) : void 0
|
|
3339
3355
|
}));
|
|
3340
3356
|
let y;
|
|
3341
3357
|
try {
|
|
3342
|
-
const
|
|
3343
|
-
y = V ?? `${w}${F}(${(
|
|
3358
|
+
const E = JSON.parse(h), V = (((L = (H = E == null ? void 0 : E.userPrompt) == null ? void 0 : H.trim()) == null ? void 0 : L.length) ?? 0) > 0 ? E.userPrompt : void 0, K = ((P = E == null ? void 0 : E.cards) == null ? void 0 : P.length) ?? 0, M = ((_ = E == null ? void 0 : E.filters) == null ? void 0 : _.length) ?? 0, w = K > 0 ? `${K} card(s) ` : "", F = M > 0 ? ` - ${M} filter(s) ` : "";
|
|
3359
|
+
y = V ?? `${w}${F}(${(E == null ? void 0 : E.layoutType) ?? ""})`;
|
|
3344
3360
|
} catch {
|
|
3345
3361
|
y = void 0;
|
|
3346
3362
|
}
|
|
@@ -3356,13 +3372,13 @@ function ii() {
|
|
|
3356
3372
|
chatBox: { heightPx: v, widthPx: c },
|
|
3357
3373
|
dashboardPreviewBox: { heightPx: v, widthPx: s },
|
|
3358
3374
|
dashboardVisualizationBox: { heightPx: v, widthPx: u },
|
|
3359
|
-
gridRowHeightPixelsPerUnit:
|
|
3375
|
+
gridRowHeightPixelsPerUnit: Ct,
|
|
3360
3376
|
gridColumnWidthPixelsPerUnit: p,
|
|
3361
3377
|
gridColumnWidthPixelsPerUnitFullView: p
|
|
3362
3378
|
},
|
|
3363
3379
|
isDatasetParameterized: (d == null ? void 0 : d.isDatasetParameterized) ?? !1,
|
|
3364
3380
|
defaultDatasetName: d == null ? void 0 : d.defaultDatasetName,
|
|
3365
|
-
clientSideChanges:
|
|
3381
|
+
clientSideChanges: It(d == null ? void 0 : d.clientSideChanges)
|
|
3366
3382
|
};
|
|
3367
3383
|
return d != null && d.clientSideChanges && Object.keys(d.clientSideChanges).length > 0 && e.getState().clearClientSideChanges(), { promptAsString: y ?? "", json: JSON.stringify(R) };
|
|
3368
3384
|
}, [e]), l = W(() => {
|
|
@@ -3370,18 +3386,18 @@ function ii() {
|
|
|
3370
3386
|
h.setTurnOpen(!0), h.dismissGuide(), h.setHasCompletedOnce(!1), h.setProducedDashboardId(null), h.setSketchExpanded(!1);
|
|
3371
3387
|
}, [e]), o = W((h) => {
|
|
3372
3388
|
const x = e.getState();
|
|
3373
|
-
x.setProducedDashboardId(
|
|
3389
|
+
x.setProducedDashboardId(lo(h)), x.setHasCompletedOnce(!0), x.setTurnOpen(!1);
|
|
3374
3390
|
}, [e]), r = W((h, x) => e.getState().ingestToolEvent(h, x), [e]), g = W((h) => {
|
|
3375
3391
|
e.getState().currentSessionId !== h && e.getState().setCurrentSessionId(h);
|
|
3376
3392
|
}, [e]);
|
|
3377
|
-
return
|
|
3393
|
+
return Se(() => ({ onRenderPrompt: i, onTurnOpen: l, onTurnComplete: o, ingestToolEvent: r, setSessionId: g, environment: n }), [i, l, o, r, g, n]);
|
|
3378
3394
|
}
|
|
3379
|
-
a(
|
|
3380
|
-
const
|
|
3381
|
-
const e =
|
|
3395
|
+
a(ai, "useComposerChatBridge");
|
|
3396
|
+
const so = /* @__PURE__ */ a(() => {
|
|
3397
|
+
const e = ai(), n = Zi((l) => {
|
|
3382
3398
|
var o;
|
|
3383
3399
|
return ((o = l.session) == null ? void 0 : o.id) ?? null;
|
|
3384
|
-
}), { eventBusService: i } =
|
|
3400
|
+
}), { eventBusService: i } = Qi();
|
|
3385
3401
|
return q(() => {
|
|
3386
3402
|
e.setSessionId(n);
|
|
3387
3403
|
}, [n, e]), q(() => {
|
|
@@ -3393,19 +3409,19 @@ const lo = /* @__PURE__ */ a(() => {
|
|
|
3393
3409
|
return (r = l.gatewayOffToolEvent) == null ? void 0 : r.call(l, o);
|
|
3394
3410
|
};
|
|
3395
3411
|
}, [i, e]), null;
|
|
3396
|
-
}, "ComposerChatBinding"),
|
|
3412
|
+
}, "ComposerChatBinding"), Qt = {
|
|
3397
3413
|
metric: "KPI",
|
|
3398
3414
|
chart: "GRÁFICO",
|
|
3399
3415
|
table: "TABELA",
|
|
3400
3416
|
iframe: "PAINEL",
|
|
3401
3417
|
dashboard: "DASHBOARD"
|
|
3402
|
-
},
|
|
3418
|
+
}, co = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit" }), oi = /* @__PURE__ */ a(({
|
|
3403
3419
|
width: e = 560,
|
|
3404
3420
|
title: n = "Visualizações da sessão",
|
|
3405
3421
|
footerAction: i,
|
|
3406
3422
|
headerActions: l
|
|
3407
3423
|
}) => {
|
|
3408
|
-
const o = le(), r = ue(o), { items: g, offscreen: h, scrollTo: x } =
|
|
3424
|
+
const o = le(), r = ue(o), { items: g, offscreen: h, scrollTo: x } = Kn(), d = Se(() => {
|
|
3409
3425
|
const s = /* @__PURE__ */ new Map();
|
|
3410
3426
|
for (const c of h) {
|
|
3411
3427
|
const u = c.group ?? "default", p = s.get(u);
|
|
@@ -3444,7 +3460,7 @@ const lo = /* @__PURE__ */ a(() => {
|
|
|
3444
3460
|
X,
|
|
3445
3461
|
{
|
|
3446
3462
|
sx: { ...v, fontSize: 10, letterSpacing: "0.12em", textTransform: "uppercase", color: o.palette.text.disabled, mb: 1 },
|
|
3447
|
-
children:
|
|
3463
|
+
children: co.format(s.at)
|
|
3448
3464
|
}
|
|
3449
3465
|
),
|
|
3450
3466
|
/* @__PURE__ */ t(S, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: s.items.map((c) => /* @__PURE__ */ b(
|
|
@@ -3486,11 +3502,11 @@ const lo = /* @__PURE__ */ a(() => {
|
|
|
3486
3502
|
backgroundColor: r.hover,
|
|
3487
3503
|
color: o.palette.text.secondary
|
|
3488
3504
|
},
|
|
3489
|
-
children:
|
|
3505
|
+
children: Qt[c.kind]
|
|
3490
3506
|
}
|
|
3491
3507
|
),
|
|
3492
3508
|
/* @__PURE__ */ b(S, { sx: { minWidth: 0 }, children: [
|
|
3493
|
-
/* @__PURE__ */ t(X, { sx: { fontSize: 12.5, fontWeight: 500, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis" }, children: c.title ||
|
|
3509
|
+
/* @__PURE__ */ t(X, { sx: { fontSize: 12.5, fontWeight: 500, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis" }, children: c.title || Qt[c.kind] }),
|
|
3494
3510
|
c.preview && /* @__PURE__ */ t(S, { sx: { mt: 0.75, maxHeight: 56, overflow: "hidden" }, children: c.preview }),
|
|
3495
3511
|
!c.ready && /* @__PURE__ */ t(X, { sx: { ...v, fontSize: 10, color: o.palette.warning.main, mt: 0.5 }, children: "gerando…" })
|
|
3496
3512
|
] }),
|
|
@@ -3512,7 +3528,7 @@ const lo = /* @__PURE__ */ a(() => {
|
|
|
3512
3528
|
display: "flex",
|
|
3513
3529
|
alignItems: "center",
|
|
3514
3530
|
gap: 1,
|
|
3515
|
-
backgroundColor:
|
|
3531
|
+
backgroundColor: ve(o.palette.background.paper, 0.6)
|
|
3516
3532
|
},
|
|
3517
3533
|
children: [
|
|
3518
3534
|
/* @__PURE__ */ t(X, { sx: { ...v, fontSize: 10, letterSpacing: "0.08em", textTransform: "uppercase", color: o.palette.text.disabled }, children: "clique para rolar o chat até a visualização" }),
|
|
@@ -3525,8 +3541,8 @@ const lo = /* @__PURE__ */ a(() => {
|
|
|
3525
3541
|
}
|
|
3526
3542
|
);
|
|
3527
3543
|
}, "SessionVisualizationsPanel");
|
|
3528
|
-
|
|
3529
|
-
const
|
|
3544
|
+
oi.displayName = "SessionVisualizationsPanel";
|
|
3545
|
+
const po = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PURE__ */ t(ce, { title: e, placement: "top", children: /* @__PURE__ */ t(
|
|
3530
3546
|
be,
|
|
3531
3547
|
{
|
|
3532
3548
|
size: "small",
|
|
@@ -3535,7 +3551,7 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
|
|
|
3535
3551
|
sx: /* @__PURE__ */ a((l) => ({ width: 26, height: 26, borderRadius: "6px", border: `1px solid ${l.palette.divider}`, color: l.palette.text.secondary }), "sx"),
|
|
3536
3552
|
children: i
|
|
3537
3553
|
}
|
|
3538
|
-
) }), "SessionVisualizationsPanelButton"),
|
|
3554
|
+
) }), "SessionVisualizationsPanelButton"), ho = "0 0 40%", ri = /* @__PURE__ */ a(() => {
|
|
3539
3555
|
const e = le(), n = ue(e), i = B((f) => {
|
|
3540
3556
|
var y;
|
|
3541
3557
|
return ((y = f.dashboardDefinition) == null ? void 0 : y.jsFileName) ?? null;
|
|
@@ -3592,7 +3608,7 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
|
|
|
3592
3608
|
"&:hover": { backgroundColor: n.hover, borderColor: e.palette.primary.main }
|
|
3593
3609
|
},
|
|
3594
3610
|
children: [
|
|
3595
|
-
/* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(
|
|
3611
|
+
/* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 13 }) }),
|
|
3596
3612
|
/* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: o }),
|
|
3597
3613
|
p,
|
|
3598
3614
|
/* @__PURE__ */ t(S, { component: "span", sx: { color: e.palette.text.disabled, mx: 0.25 }, children: "|" }),
|
|
@@ -3600,14 +3616,14 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
|
|
|
3600
3616
|
]
|
|
3601
3617
|
}
|
|
3602
3618
|
) }) : /* @__PURE__ */ b(Te, { children: [
|
|
3603
|
-
/* @__PURE__ */ t(re.div, { initial: { opacity: 0, y: -8, scaleY: 0.96 }, animate: { opacity: 1, y: 0, scaleY: 1 }, transition: { duration: 0.32, ease: [0.22, 0.8, 0.32, 1] }, style: { transformOrigin: "top center", flex:
|
|
3619
|
+
/* @__PURE__ */ t(re.div, { initial: { opacity: 0, y: -8, scaleY: 0.96 }, animate: { opacity: 1, y: 0, scaleY: 1 }, transition: { duration: 0.32, ease: [0.22, 0.8, 0.32, 1] }, style: { transformOrigin: "top center", flex: ho, minHeight: 200, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", borderBottom: `1px solid ${n.borderSoft}`, backgroundColor: e.palette.background.default, overflow: "hidden", position: "relative" }, children: [
|
|
3604
3620
|
/* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 1.5, py: 0.875, borderBottom: `1px solid ${n.borderSoft}`, backgroundColor: e.palette.background.paper, flexShrink: 0 }, children: [
|
|
3605
|
-
/* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(
|
|
3621
|
+
/* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 14 }) }),
|
|
3606
3622
|
/* @__PURE__ */ t(X, { sx: { color: e.palette.text.primary, fontWeight: 500, fontSize: 12 }, children: o }),
|
|
3607
3623
|
p,
|
|
3608
3624
|
/* @__PURE__ */ t(S, { sx: { flex: 1 } }),
|
|
3609
3625
|
/* @__PURE__ */ t(ce, { title: "Tela cheia", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => d(!0), "onClick"), sx: u, "aria-label": "Abrir em tela cheia", children: /* @__PURE__ */ t(Le, { size: 13 }) }) }),
|
|
3610
|
-
/* @__PURE__ */ t(ce, { title: "Minimizar", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => h("minimized"), "onClick"), sx: { ...u, transform: "rotate(180deg)" }, "aria-label": "Minimizar", children: /* @__PURE__ */ t(
|
|
3626
|
+
/* @__PURE__ */ t(ce, { title: "Minimizar", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => h("minimized"), "onClick"), sx: { ...u, transform: "rotate(180deg)" }, "aria-label": "Minimizar", children: /* @__PURE__ */ t(ea, { size: 13 }) }) })
|
|
3611
3627
|
] }),
|
|
3612
3628
|
/* @__PURE__ */ t(tt, { children: s && /* @__PURE__ */ b(
|
|
3613
3629
|
re.div,
|
|
@@ -3632,225 +3648,227 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
|
|
|
3632
3648
|
fontWeight: 600,
|
|
3633
3649
|
padding: "4px 10px 4px 8px",
|
|
3634
3650
|
borderRadius: 999,
|
|
3635
|
-
boxShadow: `0 4px 14px ${
|
|
3651
|
+
boxShadow: `0 4px 14px ${ve(e.palette.primary.main, 0.35)}`
|
|
3636
3652
|
},
|
|
3637
3653
|
children: [
|
|
3638
|
-
/* @__PURE__ */ t(
|
|
3654
|
+
/* @__PURE__ */ t(De, { size: 11 }),
|
|
3639
3655
|
"Dashboard pronto"
|
|
3640
3656
|
]
|
|
3641
3657
|
}
|
|
3642
3658
|
) }),
|
|
3643
|
-
/* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(
|
|
3659
|
+
/* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboardId: l }) })
|
|
3644
3660
|
] }) }),
|
|
3645
|
-
/* @__PURE__ */ b(
|
|
3661
|
+
/* @__PURE__ */ b(pn, { open: x, onClose: /* @__PURE__ */ a(() => d(!1), "onClose"), maxWidth: !1, fullScreen: !0, slotProps: { paper: { sx: { backgroundColor: e.palette.background.default, backgroundImage: "none", color: e.palette.text.primary } } }, children: [
|
|
3646
3662
|
/* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 2, py: 1.25, borderBottom: `1px solid ${e.palette.divider}`, backgroundColor: e.palette.background.paper, flexShrink: 0 }, children: [
|
|
3647
|
-
/* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(
|
|
3663
|
+
/* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 16 }) }),
|
|
3648
3664
|
/* @__PURE__ */ t(X, { sx: { color: e.palette.text.primary, fontWeight: 500, fontSize: 13.5 }, children: o }),
|
|
3649
3665
|
p,
|
|
3650
3666
|
/* @__PURE__ */ t(S, { sx: { flex: 1 } }),
|
|
3651
3667
|
/* @__PURE__ */ t(ce, { title: "Fechar", placement: "left", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => d(!1), "onClick"), sx: { ...u, p: 0.75 }, "aria-label": "Fechar", children: /* @__PURE__ */ t(Dt, { size: 14 }) }) })
|
|
3652
3668
|
] }),
|
|
3653
|
-
/* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(
|
|
3669
|
+
/* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboardId: l }) })
|
|
3654
3670
|
] })
|
|
3655
3671
|
] });
|
|
3656
3672
|
}, "DashboardPinInner");
|
|
3657
|
-
|
|
3658
|
-
const
|
|
3673
|
+
ri.displayName = "DashboardPin";
|
|
3674
|
+
const uo = He.memo(ri), Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3659
3675
|
__proto__: null,
|
|
3660
3676
|
CARD_TYPE_CATALOG: we,
|
|
3661
|
-
CATEGORY_ICONS:
|
|
3662
|
-
COLOR_MAP:
|
|
3663
|
-
CardScketch:
|
|
3664
|
-
CardSketch:
|
|
3665
|
-
CardTypeIconsProvider:
|
|
3666
|
-
ClonedComponent:
|
|
3667
|
-
ComposerChatBinding:
|
|
3668
|
-
ComposerProvider:
|
|
3669
|
-
ComposerView:
|
|
3670
|
-
DEFAULT_PAD_HEIGHT_PX:
|
|
3671
|
-
DRAFT_SAVE_DEBOUNCE_MS:
|
|
3672
|
-
DashboardPad:
|
|
3673
|
-
DashboardPadEditor:
|
|
3674
|
-
DashboardPadSketch:
|
|
3675
|
-
DashboardPin:
|
|
3676
|
-
DashboardSidePanel:
|
|
3677
|
-
DatasetParameterizationControls:
|
|
3678
|
-
DrawablePrompt:
|
|
3677
|
+
CATEGORY_ICONS: On,
|
|
3678
|
+
COLOR_MAP: Pn,
|
|
3679
|
+
CardScketch: Sa,
|
|
3680
|
+
CardSketch: At,
|
|
3681
|
+
CardTypeIconsProvider: xa,
|
|
3682
|
+
ClonedComponent: Cn,
|
|
3683
|
+
ComposerChatBinding: so,
|
|
3684
|
+
ComposerProvider: ma,
|
|
3685
|
+
ComposerView: ii,
|
|
3686
|
+
DEFAULT_PAD_HEIGHT_PX: it,
|
|
3687
|
+
DRAFT_SAVE_DEBOUNCE_MS: kn,
|
|
3688
|
+
DashboardPad: _n,
|
|
3689
|
+
DashboardPadEditor: Fn,
|
|
3690
|
+
DashboardPadSketch: rt,
|
|
3691
|
+
DashboardPin: uo,
|
|
3692
|
+
DashboardSidePanel: Yn,
|
|
3693
|
+
DatasetParameterizationControls: Ma,
|
|
3694
|
+
DrawablePrompt: ei,
|
|
3679
3695
|
ENV_HIGHLIGHT_CLASS: Ze,
|
|
3680
|
-
EntryEmptyState:
|
|
3681
|
-
EnvironmentProvider:
|
|
3682
|
-
ExampleCardSkath:
|
|
3683
|
-
ExampleCardSketch:
|
|
3684
|
-
ExampleCardSketh:
|
|
3685
|
-
ExamplePad:
|
|
3686
|
-
FILTER_TYPE_CATALOG:
|
|
3687
|
-
FILTER_TYPE_ICONS:
|
|
3688
|
-
FilterSketch:
|
|
3689
|
-
GRID_ROW_HEIGHT_PX:
|
|
3696
|
+
EntryEmptyState: Ft,
|
|
3697
|
+
EnvironmentProvider: ta,
|
|
3698
|
+
ExampleCardSkath: Fa,
|
|
3699
|
+
ExampleCardSketch: lt,
|
|
3700
|
+
ExampleCardSketh: _a,
|
|
3701
|
+
ExamplePad: Ra,
|
|
3702
|
+
FILTER_TYPE_CATALOG: zt,
|
|
3703
|
+
FILTER_TYPE_ICONS: An,
|
|
3704
|
+
FilterSketch: Mt,
|
|
3705
|
+
GRID_ROW_HEIGHT_PX: Ct,
|
|
3690
3706
|
GUIDE_SHOW_DELAY_MS: Dn,
|
|
3691
|
-
HoverButton:
|
|
3692
|
-
InertEnvironmentProvider:
|
|
3693
|
-
PAD_INTERNAL_CLASSES:
|
|
3694
|
-
PAD_INTERNAL_IDS:
|
|
3695
|
-
PrototypePad:
|
|
3696
|
-
SPECIFIC_TYPE_ICONS:
|
|
3707
|
+
HoverButton: ke,
|
|
3708
|
+
InertEnvironmentProvider: na,
|
|
3709
|
+
PAD_INTERNAL_CLASSES: bn,
|
|
3710
|
+
PAD_INTERNAL_IDS: yn,
|
|
3711
|
+
PrototypePad: Na,
|
|
3712
|
+
SPECIFIC_TYPE_ICONS: $n,
|
|
3697
3713
|
SPECIFIC_TYPE_ICON_NAMES: En,
|
|
3698
|
-
STARTER_TEMPLATES:
|
|
3699
|
-
SessionVisualizationsPanel:
|
|
3700
|
-
SessionVisualizationsPanelButton:
|
|
3701
|
-
SpotlightOverlay:
|
|
3702
|
-
TEMPLATE_KIND_TO_SKETCH:
|
|
3703
|
-
TextSketh:
|
|
3704
|
-
TitleSkath:
|
|
3714
|
+
STARTER_TEMPLATES: Va,
|
|
3715
|
+
SessionVisualizationsPanel: oi,
|
|
3716
|
+
SessionVisualizationsPanelButton: po,
|
|
3717
|
+
SpotlightOverlay: ni,
|
|
3718
|
+
TEMPLATE_KIND_TO_SKETCH: Vn,
|
|
3719
|
+
TextSketh: Ca,
|
|
3720
|
+
TitleSkath: wa,
|
|
3705
3721
|
TitleSketch: Ge,
|
|
3706
|
-
ToolBox:
|
|
3707
|
-
VIEWER_COMMIT_DEBOUNCE_MS:
|
|
3708
|
-
activityPanelVariants:
|
|
3709
|
-
activityPanelVariantsReduced:
|
|
3710
|
-
ambientVariants:
|
|
3711
|
-
ambientVariantsReduced:
|
|
3712
|
-
autoComplete:
|
|
3713
|
-
c:
|
|
3714
|
-
categoryPrefix:
|
|
3715
|
-
composerLayoutTransition:
|
|
3716
|
-
composerLayoutTransitionReduced:
|
|
3717
|
-
createComposerStore:
|
|
3718
|
-
createDashboardDraft:
|
|
3719
|
-
datePicker:
|
|
3720
|
-
dateRange:
|
|
3721
|
-
defaultCardTypeIcons:
|
|
3722
|
-
defaultComposerSuggestions:
|
|
3723
|
-
defaultComposerTemplates:
|
|
3724
|
-
environmentFromStore:
|
|
3722
|
+
ToolBox: Rn,
|
|
3723
|
+
VIEWER_COMMIT_DEBOUNCE_MS: Tn,
|
|
3724
|
+
activityPanelVariants: Bn,
|
|
3725
|
+
activityPanelVariantsReduced: Gn,
|
|
3726
|
+
ambientVariants: Nn,
|
|
3727
|
+
ambientVariantsReduced: Ln,
|
|
3728
|
+
autoComplete: Ga,
|
|
3729
|
+
c: Ba,
|
|
3730
|
+
categoryPrefix: pa,
|
|
3731
|
+
composerLayoutTransition: Hn,
|
|
3732
|
+
composerLayoutTransitionReduced: Wn,
|
|
3733
|
+
createComposerStore: In,
|
|
3734
|
+
createDashboardDraft: $t,
|
|
3735
|
+
datePicker: La,
|
|
3736
|
+
dateRange: Ha,
|
|
3737
|
+
defaultCardTypeIcons: Mn,
|
|
3738
|
+
defaultComposerSuggestions: ti,
|
|
3739
|
+
defaultComposerTemplates: Rt,
|
|
3740
|
+
environmentFromStore: ga,
|
|
3725
3741
|
fromUpsertResponse: Be,
|
|
3726
|
-
groupCardCatalog:
|
|
3727
|
-
guideStepsRequireSketch:
|
|
3728
|
-
isElementVisible:
|
|
3729
|
-
isSimplePadDefinition:
|
|
3730
|
-
joinClientSideChanges:
|
|
3731
|
-
padConfigToDashboard:
|
|
3732
|
-
pickBestElement:
|
|
3742
|
+
groupCardCatalog: at,
|
|
3743
|
+
guideStepsRequireSketch: Sn,
|
|
3744
|
+
isElementVisible: Ot,
|
|
3745
|
+
isSimplePadDefinition: un,
|
|
3746
|
+
joinClientSideChanges: It,
|
|
3747
|
+
padConfigToDashboard: hn,
|
|
3748
|
+
pickBestElement: xn,
|
|
3733
3749
|
randomId: ze,
|
|
3734
3750
|
resolveComposerSurfaces: ue,
|
|
3735
3751
|
resolveEnvironmentElements: Qe,
|
|
3736
|
-
resolveGuideElement:
|
|
3737
|
-
sanitizeToJsVariable:
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3752
|
+
resolveGuideElement: Pt,
|
|
3753
|
+
sanitizeToJsVariable: Ne,
|
|
3754
|
+
sanitizeToJsxComponentName: nt,
|
|
3755
|
+
seedFromTemplate: Un,
|
|
3756
|
+
sketchCardItemComparer: sa,
|
|
3757
|
+
sketchFilterComparer: da,
|
|
3758
|
+
targetSuggestsPadInternal: vn,
|
|
3759
|
+
templateKinds: jn,
|
|
3760
|
+
toDraftPayload: wn,
|
|
3761
|
+
toSelectorList: gn,
|
|
3762
|
+
upsertDashboardDraft: ot,
|
|
3763
|
+
useCardTypeIcons: Ae,
|
|
3747
3764
|
useComposer: B,
|
|
3748
|
-
useComposerChatBridge:
|
|
3749
|
-
useComposerEnvironment:
|
|
3765
|
+
useComposerChatBridge: ai,
|
|
3766
|
+
useComposerEnvironment: zn,
|
|
3750
3767
|
useComposerStore: he,
|
|
3751
|
-
useComposerStoreOptional:
|
|
3752
|
-
useDashboardPad:
|
|
3753
|
-
useEnvironment:
|
|
3754
|
-
useEnvironmentOptional:
|
|
3755
|
-
validateSketch:
|
|
3768
|
+
useComposerStoreOptional: fa,
|
|
3769
|
+
useDashboardPad: Wa,
|
|
3770
|
+
useEnvironment: cn,
|
|
3771
|
+
useEnvironmentOptional: ia,
|
|
3772
|
+
validateSketch: vt
|
|
3756
3773
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3757
3774
|
export {
|
|
3758
|
-
|
|
3759
|
-
|
|
3775
|
+
Ga as $,
|
|
3776
|
+
Na as A,
|
|
3760
3777
|
En as B,
|
|
3761
3778
|
we as C,
|
|
3762
|
-
|
|
3779
|
+
it as D,
|
|
3763
3780
|
Ze as E,
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3781
|
+
zt as F,
|
|
3782
|
+
Ct as G,
|
|
3783
|
+
ke as H,
|
|
3784
|
+
Va as I,
|
|
3785
|
+
oi as J,
|
|
3786
|
+
po as K,
|
|
3787
|
+
jo as L,
|
|
3788
|
+
ni as M,
|
|
3789
|
+
Ca as N,
|
|
3790
|
+
wa as O,
|
|
3791
|
+
bn as P,
|
|
3775
3792
|
Ge as Q,
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3793
|
+
Rn as R,
|
|
3794
|
+
$n as S,
|
|
3795
|
+
Vn as T,
|
|
3796
|
+
Ut as U,
|
|
3797
|
+
Tn as V,
|
|
3798
|
+
Uo as W,
|
|
3799
|
+
Bn as X,
|
|
3800
|
+
Gn as Y,
|
|
3801
|
+
Nn as Z,
|
|
3802
|
+
Ln as _,
|
|
3803
|
+
On as a,
|
|
3804
|
+
Ba as a0,
|
|
3805
|
+
pa as a1,
|
|
3806
|
+
Hn as a2,
|
|
3807
|
+
Wn as a3,
|
|
3808
|
+
In as a4,
|
|
3809
|
+
$t as a5,
|
|
3810
|
+
La as a6,
|
|
3811
|
+
Ha as a7,
|
|
3812
|
+
Mn as a8,
|
|
3813
|
+
ti as a9,
|
|
3814
|
+
ai as aA,
|
|
3815
|
+
zn as aB,
|
|
3816
|
+
he as aC,
|
|
3817
|
+
fa as aD,
|
|
3818
|
+
Wa as aE,
|
|
3819
|
+
Kn as aF,
|
|
3820
|
+
vt as aG,
|
|
3821
|
+
Ko as aH,
|
|
3822
|
+
Rt as aa,
|
|
3823
|
+
ga as ab,
|
|
3806
3824
|
Be as ac,
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3825
|
+
at as ad,
|
|
3826
|
+
Sn as ae,
|
|
3827
|
+
Ot as af,
|
|
3828
|
+
un as ag,
|
|
3829
|
+
It as ah,
|
|
3830
|
+
hn as ai,
|
|
3831
|
+
xn as aj,
|
|
3814
3832
|
ze as ak,
|
|
3815
3833
|
ue as al,
|
|
3816
3834
|
Qe as am,
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3835
|
+
Pt as an,
|
|
3836
|
+
Ne as ao,
|
|
3837
|
+
nt as ap,
|
|
3838
|
+
Un as aq,
|
|
3821
3839
|
sa as ar,
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3840
|
+
da as as,
|
|
3841
|
+
vn as at,
|
|
3842
|
+
jn as au,
|
|
3843
|
+
wn as av,
|
|
3844
|
+
gn as aw,
|
|
3845
|
+
ot as ax,
|
|
3846
|
+
Ae as ay,
|
|
3847
|
+
B as az,
|
|
3848
|
+
Pn as b,
|
|
3849
|
+
Sa as c,
|
|
3850
|
+
At as d,
|
|
3851
|
+
xa as e,
|
|
3852
|
+
Cn as f,
|
|
3853
|
+
so as g,
|
|
3854
|
+
ma as h,
|
|
3855
|
+
ii as i,
|
|
3856
|
+
kn as j,
|
|
3857
|
+
_n as k,
|
|
3858
|
+
Fn as l,
|
|
3859
|
+
rt as m,
|
|
3860
|
+
uo as n,
|
|
3861
|
+
Yn as o,
|
|
3862
|
+
Ma as p,
|
|
3863
|
+
ei as q,
|
|
3864
|
+
Ft as r,
|
|
3865
|
+
Fa as s,
|
|
3866
|
+
lt as t,
|
|
3867
|
+
_a as u,
|
|
3868
|
+
Ra as v,
|
|
3869
|
+
An as w,
|
|
3870
|
+
Mt as x,
|
|
3853
3871
|
Dn as y,
|
|
3854
|
-
|
|
3872
|
+
yn as z
|
|
3855
3873
|
};
|
|
3856
|
-
//# sourceMappingURL=index-
|
|
3874
|
+
//# sourceMappingURL=index-GTSBsgzP.js.map
|