@foris/avocado-not-front 4.0.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import V from "axios";
|
|
2
2
|
import { create as Ve } from "zustand";
|
|
3
|
-
import He, { useMemo as S, useEffect as K, useState as
|
|
4
|
-
import { Heading as Re, Text as Qe, ThemeStore as
|
|
5
|
-
import { ChatPanel as
|
|
6
|
-
import
|
|
3
|
+
import He, { useMemo as S, useEffect as K, useState as q, Fragment as A, useCallback as D, useRef as Xe, cloneElement as We } from "react";
|
|
4
|
+
import { Heading as Re, Text as Qe, ThemeStore as te, Breadcrumbs as Ye, Button as Ze, CardNotification as me, Checkbox as Fe, PreviewerMarkdown as Pe, Divider as et, SkeletonBase as De, Modal as tt, Pill as he, RoundButton as nt, SelectPagination as st, Select as at, Switch as rt, Table as ct, Pager as ot, Tabs as it, TextField as lt, toast as W, Accordion as dt, Drawer as _t, Loading as ut, Toaster as ht } from "@foris/avocado-suite";
|
|
5
|
+
import { ChatPanel as ft, SummaryCard as mt, PromptCodeEditor as yt } from "@foris/ai-agent";
|
|
6
|
+
import xt from "@uiw/react-codemirror";
|
|
7
7
|
import { json as we } from "@codemirror/lang-json";
|
|
8
|
-
import { markdown as
|
|
9
|
-
import { sql as
|
|
10
|
-
import { yaml as
|
|
8
|
+
import { markdown as gt } from "@codemirror/lang-markdown";
|
|
9
|
+
import { sql as bt } from "@codemirror/lang-sql";
|
|
10
|
+
import { yaml as pt } from "@codemirror/lang-yaml";
|
|
11
11
|
import B from "jsonpath";
|
|
12
|
-
import { Legend as
|
|
13
|
-
const v = Ve(() => ({})),
|
|
14
|
-
const i =
|
|
12
|
+
import { Legend as jt, Tooltip as wt, XAxis as Ct, YAxis as Nt, ResponsiveContainer as ne, AreaChart as vt, CartesianGrid as ye, Area as Et, BarChart as St, Bar as kt, LineChart as qt, Line as Ot, PieChart as At, Pie as Tt, Cell as $t } from "recharts";
|
|
13
|
+
const v = Ve(() => ({})), oe = (e, t, a, s) => {
|
|
14
|
+
const i = a == null ? void 0 : a.hash, c = s && Object.keys(s).length > 0 ? { ...s } : {};
|
|
15
15
|
v.setState((l) => {
|
|
16
16
|
var n;
|
|
17
17
|
return {
|
|
@@ -28,24 +28,24 @@ const v = Ve(() => ({})), ce = (e, t, s, a) => {
|
|
|
28
28
|
pages: {
|
|
29
29
|
...(n = l[e]) == null ? void 0 : n.pages,
|
|
30
30
|
[i]: {
|
|
31
|
-
page:
|
|
31
|
+
page: a
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
});
|
|
37
|
-
}, Le = (e, t,
|
|
38
|
-
const
|
|
37
|
+
}, Le = (e, t, a) => {
|
|
38
|
+
const s = a && Object.keys(a).length > 0 ? { ...e, ...a } : e;
|
|
39
39
|
return t.length === 0 ? e : Object.fromEntries(
|
|
40
|
-
Object.entries(
|
|
40
|
+
Object.entries(s).filter(
|
|
41
41
|
([i]) => !t.includes(i)
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
|
-
},
|
|
45
|
-
sessionStorage.setItem("sessionId",
|
|
44
|
+
}, Rt = (e, t, a, s, i) => {
|
|
45
|
+
sessionStorage.setItem("sessionId", a), v.setState((c) => {
|
|
46
46
|
const l = c[e] ?? {}, n = l.entries ?? {}, d = Le(
|
|
47
47
|
n,
|
|
48
|
-
|
|
48
|
+
s,
|
|
49
49
|
i
|
|
50
50
|
);
|
|
51
51
|
return {
|
|
@@ -65,13 +65,13 @@ const v = Ve(() => ({})), ce = (e, t, s, a) => {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
});
|
|
68
|
-
},
|
|
68
|
+
}, Dt = (e, t, a, s) => {
|
|
69
69
|
v.setState((i) => {
|
|
70
70
|
var r;
|
|
71
71
|
const c = i[e] ?? {}, l = c.entries ?? {}, n = Le(
|
|
72
72
|
l,
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
a,
|
|
74
|
+
s
|
|
75
75
|
), d = (r = t.components) == null ? void 0 : r.some(
|
|
76
76
|
(u) => u.component === "drawer"
|
|
77
77
|
);
|
|
@@ -95,37 +95,37 @@ const v = Ve(() => ({})), ce = (e, t, s, a) => {
|
|
|
95
95
|
overlay: null
|
|
96
96
|
}
|
|
97
97
|
}));
|
|
98
|
-
},
|
|
99
|
-
var
|
|
100
|
-
return ((
|
|
101
|
-
},
|
|
98
|
+
}, Lt = (e) => {
|
|
99
|
+
var a;
|
|
100
|
+
return ((a = v.getState()[e]) == null ? void 0 : a.overlay) ?? null;
|
|
101
|
+
}, T = (e, t) => {
|
|
102
102
|
const {
|
|
103
|
-
content:
|
|
104
|
-
sessionId:
|
|
103
|
+
content: a,
|
|
104
|
+
sessionId: s,
|
|
105
105
|
deprecatedStateKeys: i = [],
|
|
106
106
|
sessionState: c
|
|
107
107
|
} = t;
|
|
108
|
-
|
|
108
|
+
a.type !== "page" && a.type !== "overlay" || (a.type === "page" ? Rt(
|
|
109
109
|
e,
|
|
110
|
-
s,
|
|
111
110
|
a,
|
|
111
|
+
s,
|
|
112
112
|
i,
|
|
113
113
|
c
|
|
114
|
-
) :
|
|
114
|
+
) : Dt(
|
|
115
115
|
e,
|
|
116
|
-
|
|
116
|
+
a,
|
|
117
117
|
i,
|
|
118
118
|
c
|
|
119
119
|
));
|
|
120
120
|
}, L = (e, t) => {
|
|
121
|
-
v.setState((
|
|
122
|
-
var
|
|
121
|
+
v.setState((a) => {
|
|
122
|
+
var s;
|
|
123
123
|
return {
|
|
124
|
-
...
|
|
124
|
+
...a,
|
|
125
125
|
[e]: {
|
|
126
|
-
...
|
|
126
|
+
...a[e],
|
|
127
127
|
entries: {
|
|
128
|
-
...(
|
|
128
|
+
...(s = a[e]) == null ? void 0 : s.entries,
|
|
129
129
|
...t
|
|
130
130
|
// New entries
|
|
131
131
|
}
|
|
@@ -133,64 +133,64 @@ const v = Ve(() => ({})), ce = (e, t, s, a) => {
|
|
|
133
133
|
};
|
|
134
134
|
});
|
|
135
135
|
}, H = (e, t) => {
|
|
136
|
-
v.setState((
|
|
137
|
-
...
|
|
136
|
+
v.setState((a) => ({
|
|
137
|
+
...a,
|
|
138
138
|
[e]: {
|
|
139
|
-
...
|
|
139
|
+
...a[e],
|
|
140
140
|
isLoading: t
|
|
141
141
|
}
|
|
142
142
|
}));
|
|
143
143
|
}, ge = (e, t) => {
|
|
144
|
-
v.setState((
|
|
145
|
-
...
|
|
144
|
+
v.setState((a) => ({
|
|
145
|
+
...a,
|
|
146
146
|
[e]: {
|
|
147
|
-
...
|
|
147
|
+
...a[e],
|
|
148
148
|
isModalOpen: t
|
|
149
149
|
}
|
|
150
150
|
}));
|
|
151
151
|
}, Z = (e, t) => {
|
|
152
|
-
v.setState((
|
|
153
|
-
...
|
|
152
|
+
v.setState((a) => ({
|
|
153
|
+
...a,
|
|
154
154
|
[e]: {
|
|
155
|
-
...
|
|
155
|
+
...a[e],
|
|
156
156
|
isDrawerOpen: t
|
|
157
157
|
}
|
|
158
158
|
}));
|
|
159
159
|
}, Ce = (e, t) => {
|
|
160
|
-
v.setState((
|
|
161
|
-
const
|
|
162
|
-
return
|
|
163
|
-
...
|
|
160
|
+
v.setState((a) => {
|
|
161
|
+
const s = a[e];
|
|
162
|
+
return s ? {
|
|
163
|
+
...a,
|
|
164
164
|
[e]: {
|
|
165
|
-
...
|
|
165
|
+
...s,
|
|
166
166
|
apiConfig: {
|
|
167
|
-
...
|
|
167
|
+
...s.apiConfig,
|
|
168
168
|
headers: t
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
} :
|
|
171
|
+
} : a;
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
|
-
let
|
|
175
|
-
const
|
|
176
|
-
P.forEach(({ resolve: t, reject:
|
|
177
|
-
e ?
|
|
174
|
+
let ie = !1, P = [], Ne = !1;
|
|
175
|
+
const Bt = (e) => e._userFlow || null, ve = (e) => {
|
|
176
|
+
P.forEach(({ resolve: t, reject: a }) => {
|
|
177
|
+
e ? a(e) : t(void 0);
|
|
178
178
|
}), P = [];
|
|
179
|
-
},
|
|
180
|
-
var
|
|
179
|
+
}, It = async (e) => {
|
|
180
|
+
var s, i;
|
|
181
181
|
const t = e == null ? void 0 : e.config;
|
|
182
|
-
if (((
|
|
183
|
-
const c =
|
|
182
|
+
if (((s = e == null ? void 0 : e.response) == null ? void 0 : s.status) === 401 && !t._retry) {
|
|
183
|
+
const c = Bt(t);
|
|
184
184
|
if (c) {
|
|
185
185
|
const n = (i = v.getState()[c]) == null ? void 0 : i.apiConfig;
|
|
186
186
|
if (!n)
|
|
187
187
|
return Promise.reject(e);
|
|
188
188
|
if (n.onAuthenticationError || typeof n.headers == "function") {
|
|
189
|
-
if (
|
|
189
|
+
if (ie)
|
|
190
190
|
return new Promise((r, u) => {
|
|
191
191
|
P.push({ resolve: r, reject: u });
|
|
192
192
|
}).then(() => V(t)).catch((r) => (console.error("[axiosInterceptors] Queued request failed:", r), Promise.reject(r)));
|
|
193
|
-
t._retry = !0,
|
|
193
|
+
t._retry = !0, ie = !0;
|
|
194
194
|
try {
|
|
195
195
|
let r;
|
|
196
196
|
if (n.onAuthenticationError)
|
|
@@ -209,7 +209,7 @@ const Lt = (e) => e._userFlow || null, ve = (e) => {
|
|
|
209
209
|
P.length
|
|
210
210
|
), ve(r), Promise.reject(r);
|
|
211
211
|
} finally {
|
|
212
|
-
|
|
212
|
+
ie = !1;
|
|
213
213
|
}
|
|
214
214
|
} else
|
|
215
215
|
console.warn(
|
|
@@ -222,20 +222,20 @@ const Lt = (e) => e._userFlow || null, ve = (e) => {
|
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
224
|
return Promise.reject(e);
|
|
225
|
-
},
|
|
225
|
+
}, zt = () => {
|
|
226
226
|
if (Ne) {
|
|
227
227
|
console.debug(
|
|
228
228
|
"[axiosInterceptors] Interceptors already initialized, skipping"
|
|
229
229
|
);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
console.debug("[axiosInterceptors] Initializing interceptors..."), V.interceptors.response.use(void 0,
|
|
232
|
+
console.debug("[axiosInterceptors] Initializing interceptors..."), V.interceptors.response.use(void 0, It), console.debug("[axiosInterceptors] Response error interceptor registered"), Ne = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
|
|
233
233
|
};
|
|
234
|
-
|
|
235
|
-
function
|
|
234
|
+
zt();
|
|
235
|
+
function Mt(e) {
|
|
236
236
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
237
237
|
}
|
|
238
|
-
var
|
|
238
|
+
var le = { exports: {} }, Q = {};
|
|
239
239
|
/**
|
|
240
240
|
* @license React
|
|
241
241
|
* react-jsx-runtime.production.min.js
|
|
@@ -246,25 +246,25 @@ var ie = { exports: {} }, Q = {};
|
|
|
246
246
|
* LICENSE file in the root directory of this source tree.
|
|
247
247
|
*/
|
|
248
248
|
var Ee;
|
|
249
|
-
function
|
|
249
|
+
function Kt() {
|
|
250
250
|
if (Ee) return Q;
|
|
251
251
|
Ee = 1;
|
|
252
|
-
var e = He, t = Symbol.for("react.element"),
|
|
252
|
+
var e = He, t = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
253
253
|
function l(n, d, r) {
|
|
254
254
|
var u, f = {}, _ = null, h = null;
|
|
255
255
|
r !== void 0 && (_ = "" + r), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (h = d.ref);
|
|
256
|
-
for (u in d)
|
|
256
|
+
for (u in d) s.call(d, u) && !c.hasOwnProperty(u) && (f[u] = d[u]);
|
|
257
257
|
if (n && n.defaultProps) for (u in d = n.defaultProps, d) f[u] === void 0 && (f[u] = d[u]);
|
|
258
258
|
return { $$typeof: t, type: n, key: _, ref: h, props: f, _owner: i.current };
|
|
259
259
|
}
|
|
260
|
-
return Q.Fragment =
|
|
260
|
+
return Q.Fragment = a, Q.jsx = l, Q.jsxs = l, Q;
|
|
261
261
|
}
|
|
262
262
|
var Se;
|
|
263
|
-
function
|
|
264
|
-
return Se || (Se = 1,
|
|
263
|
+
function Gt() {
|
|
264
|
+
return Se || (Se = 1, le.exports = Kt()), le.exports;
|
|
265
265
|
}
|
|
266
|
-
var o =
|
|
267
|
-
const
|
|
266
|
+
var o = Gt();
|
|
267
|
+
const Ut = (e) => {
|
|
268
268
|
if (!(e != null && e.content)) return null;
|
|
269
269
|
const t = {
|
|
270
270
|
...e,
|
|
@@ -272,55 +272,64 @@ const Gt = (e) => {
|
|
|
272
272
|
type: e.variant
|
|
273
273
|
};
|
|
274
274
|
return /* @__PURE__ */ o.jsx(Re, { ...t });
|
|
275
|
-
},
|
|
275
|
+
}, Jt = (e) => {
|
|
276
276
|
if (!e) return null;
|
|
277
277
|
const t = {
|
|
278
278
|
...e,
|
|
279
279
|
children: e.content
|
|
280
280
|
};
|
|
281
281
|
return /* @__PURE__ */ o.jsx(Qe, { ...t });
|
|
282
|
-
},
|
|
283
|
-
const t = e.dataSource, s = S(() => ({
|
|
282
|
+
}, Vt = (e) => {
|
|
283
|
+
const t = te.useThemeStore((l) => l.theme.mode), a = e.dataSource, s = S(() => ({
|
|
284
284
|
url: e.dataSource.url,
|
|
285
285
|
method: e.dataSource.method,
|
|
286
286
|
headers: e.dataSource.headers,
|
|
287
|
-
params:
|
|
288
|
-
}), [e.dataSource.url, e.dataSource.method, e.dataSource.headers,
|
|
289
|
-
var
|
|
290
|
-
const
|
|
291
|
-
title: (
|
|
292
|
-
welcomeTitle: (
|
|
293
|
-
welcomeDescription: (
|
|
294
|
-
placeholder: (
|
|
295
|
-
disclaimer: (
|
|
287
|
+
params: a == null ? void 0 : a.data
|
|
288
|
+
}), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, a == null ? void 0 : a.data]), i = e.locale ?? "en", c = S(() => {
|
|
289
|
+
var n, d, r, u, f;
|
|
290
|
+
const l = {
|
|
291
|
+
title: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.title,
|
|
292
|
+
welcomeTitle: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.welcomeTitle,
|
|
293
|
+
welcomeDescription: (r = e == null ? void 0 : e.translations) == null ? void 0 : r.welcomeDescription,
|
|
294
|
+
placeholder: (u = e == null ? void 0 : e.translations) == null ? void 0 : u.placeholder,
|
|
295
|
+
disclaimer: (f = e == null ? void 0 : e.translations) == null ? void 0 : f.disclaimer
|
|
296
296
|
};
|
|
297
|
-
return Object.fromEntries(Object.entries(
|
|
297
|
+
return Object.fromEntries(Object.entries(l).filter(([, _]) => !!_));
|
|
298
298
|
}, [e == null ? void 0 : e.translations]);
|
|
299
299
|
return K(() => {
|
|
300
300
|
e.onResolveProps && e.onResolveProps({
|
|
301
301
|
dataSource: s,
|
|
302
|
-
locale:
|
|
303
|
-
translations:
|
|
304
|
-
initialSuggestions: e.initialSuggestions
|
|
302
|
+
locale: i,
|
|
303
|
+
translations: c,
|
|
304
|
+
initialSuggestions: e.initialSuggestions,
|
|
305
|
+
theme: t
|
|
305
306
|
});
|
|
306
|
-
}, [
|
|
307
|
-
|
|
307
|
+
}, [
|
|
308
|
+
e.onResolveProps,
|
|
309
|
+
s,
|
|
310
|
+
i,
|
|
311
|
+
c,
|
|
312
|
+
e.initialSuggestions,
|
|
313
|
+
t
|
|
314
|
+
]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx(
|
|
315
|
+
ft,
|
|
308
316
|
{
|
|
309
317
|
dataSource: s,
|
|
310
|
-
locale:
|
|
311
|
-
translations:
|
|
312
|
-
initialSuggestions: e.initialSuggestions
|
|
318
|
+
locale: i,
|
|
319
|
+
translations: c,
|
|
320
|
+
initialSuggestions: e.initialSuggestions,
|
|
321
|
+
theme: t
|
|
313
322
|
}
|
|
314
323
|
);
|
|
315
|
-
},
|
|
316
|
-
summaryCard:
|
|
317
|
-
},
|
|
318
|
-
const t = e.dataSource,
|
|
324
|
+
}, Ht = "_summaryCard_jva4h_1", Xt = {
|
|
325
|
+
summaryCard: Ht
|
|
326
|
+
}, Wt = (e) => {
|
|
327
|
+
const t = e.dataSource, a = S(() => ({
|
|
319
328
|
url: e.dataSource.url,
|
|
320
329
|
method: e.dataSource.method,
|
|
321
330
|
headers: e.dataSource.headers,
|
|
322
331
|
body: t == null ? void 0 : t.data
|
|
323
|
-
}), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]),
|
|
332
|
+
}), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), s = e.locale ?? "en", i = S(() => {
|
|
324
333
|
var l, n, d;
|
|
325
334
|
const c = {
|
|
326
335
|
title: (l = e == null ? void 0 : e.translations) == null ? void 0 : l.title,
|
|
@@ -333,41 +342,41 @@ const Gt = (e) => {
|
|
|
333
342
|
}, [e == null ? void 0 : e.translations]);
|
|
334
343
|
return K(() => {
|
|
335
344
|
e.onResolveProps && e.onResolveProps({
|
|
336
|
-
dataSource:
|
|
337
|
-
locale:
|
|
345
|
+
dataSource: a,
|
|
346
|
+
locale: s,
|
|
338
347
|
translations: i
|
|
339
348
|
});
|
|
340
|
-
}, [e.onResolveProps,
|
|
341
|
-
|
|
349
|
+
}, [e.onResolveProps, a, s, i]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx("section", { className: Xt.summaryCard, children: /* @__PURE__ */ o.jsx(
|
|
350
|
+
mt,
|
|
342
351
|
{
|
|
343
|
-
dataSource:
|
|
344
|
-
locale:
|
|
352
|
+
dataSource: a,
|
|
353
|
+
locale: s,
|
|
345
354
|
translations: i
|
|
346
355
|
}
|
|
347
356
|
) });
|
|
348
357
|
}, M = (e, t) => {
|
|
349
|
-
const
|
|
358
|
+
const a = v((s) => {
|
|
350
359
|
var i;
|
|
351
|
-
return ((i =
|
|
360
|
+
return ((i = s[e]) == null ? void 0 : i.entries) || {};
|
|
352
361
|
});
|
|
353
362
|
return S(() => {
|
|
354
|
-
const
|
|
363
|
+
const s = {
|
|
355
364
|
disabled: !1
|
|
356
365
|
};
|
|
357
366
|
return !t || t.length === 0 || t.forEach((i) => {
|
|
358
|
-
const c =
|
|
367
|
+
const c = a[i.key], l = c == null || c === "" || Array.isArray(c) && c.length === 0;
|
|
359
368
|
i.when === "empty" && l && i.actions.forEach((d) => {
|
|
360
|
-
|
|
369
|
+
s[d] = !0;
|
|
361
370
|
});
|
|
362
|
-
}),
|
|
363
|
-
}, [t,
|
|
364
|
-
},
|
|
365
|
-
promptCodeEditor:
|
|
366
|
-
},
|
|
371
|
+
}), s;
|
|
372
|
+
}, [t, a]);
|
|
373
|
+
}, Qt = "_promptCodeEditor_1d57s_1", Yt = {
|
|
374
|
+
promptCodeEditor: Qt
|
|
375
|
+
}, Zt = (e) => {
|
|
367
376
|
const {
|
|
368
377
|
userFlow: t,
|
|
369
|
-
responseKey:
|
|
370
|
-
codeBlockValue:
|
|
378
|
+
responseKey: a,
|
|
379
|
+
codeBlockValue: s,
|
|
371
380
|
language: i,
|
|
372
381
|
disabled: c,
|
|
373
382
|
dependencies: l,
|
|
@@ -375,12 +384,12 @@ const Gt = (e) => {
|
|
|
375
384
|
inputLabel: d,
|
|
376
385
|
inputPlaceholder: r,
|
|
377
386
|
codeBlockLabel: u
|
|
378
|
-
} = e, f =
|
|
379
|
-
|
|
387
|
+
} = e, f = te.useThemeStore((p) => p.theme.mode), [_, h] = q(
|
|
388
|
+
s || ""
|
|
380
389
|
), { disabled: j } = M(
|
|
381
390
|
t,
|
|
382
391
|
l
|
|
383
|
-
),
|
|
392
|
+
), m = c ?? j, x = i ?? "json", y = {
|
|
384
393
|
url: (n == null ? void 0 : n.url) || "",
|
|
385
394
|
method: (n == null ? void 0 : n.method) || "post",
|
|
386
395
|
headers: n == null ? void 0 : n.headers,
|
|
@@ -388,19 +397,19 @@ const Gt = (e) => {
|
|
|
388
397
|
}, g = (p) => {
|
|
389
398
|
h(p);
|
|
390
399
|
const N = {
|
|
391
|
-
[
|
|
400
|
+
[a]: p
|
|
392
401
|
};
|
|
393
402
|
L(t, N);
|
|
394
403
|
};
|
|
395
404
|
return K(() => {
|
|
396
|
-
|
|
397
|
-
}, [
|
|
405
|
+
s !== void 0 && s !== _ && h(s);
|
|
406
|
+
}, [s]), /* @__PURE__ */ o.jsx("section", { className: Yt.promptCodeEditor, children: /* @__PURE__ */ o.jsx(
|
|
398
407
|
yt,
|
|
399
408
|
{
|
|
400
409
|
themeMode: f,
|
|
401
|
-
requestConfig:
|
|
410
|
+
requestConfig: y,
|
|
402
411
|
language: x,
|
|
403
|
-
disabled:
|
|
412
|
+
disabled: m,
|
|
404
413
|
inputLabel: d,
|
|
405
414
|
inputPlaceholder: r,
|
|
406
415
|
codeBlockLabel: u,
|
|
@@ -408,10 +417,10 @@ const Gt = (e) => {
|
|
|
408
417
|
onCodeChange: g
|
|
409
418
|
}
|
|
410
419
|
) });
|
|
411
|
-
},
|
|
412
|
-
body:
|
|
413
|
-
body_content:
|
|
414
|
-
},
|
|
420
|
+
}, Ft = "_body_14tsv_1", Pt = "_body_content_14tsv_5", ke = {
|
|
421
|
+
body: Ft,
|
|
422
|
+
body_content: Pt
|
|
423
|
+
}, en = ({ inputs: e }) => /* @__PURE__ */ o.jsx("section", { className: ke.body, children: /* @__PURE__ */ o.jsx("div", { className: ke.body_content, children: e.map((t, a) => /* @__PURE__ */ o.jsx(A, { children: t }, a)) }) }), X = (e) => {
|
|
415
424
|
if (!e)
|
|
416
425
|
return { "content-type": "application/json" };
|
|
417
426
|
if (typeof e == "function")
|
|
@@ -423,67 +432,67 @@ const Gt = (e) => {
|
|
|
423
432
|
return { "content-type": "application/json", Authorization: e };
|
|
424
433
|
}
|
|
425
434
|
return e;
|
|
426
|
-
}, F = () => new AbortController(),
|
|
435
|
+
}, F = () => new AbortController(), tn = (e, t = {}, a = {}, s = !1, i) => {
|
|
427
436
|
const c = F();
|
|
428
|
-
|
|
437
|
+
s && c.abort();
|
|
429
438
|
const l = X(t);
|
|
430
439
|
return {
|
|
431
440
|
call: V.get(e, {
|
|
432
441
|
headers: {
|
|
433
442
|
...l
|
|
434
443
|
},
|
|
435
|
-
params:
|
|
444
|
+
params: a,
|
|
436
445
|
signal: c.signal,
|
|
437
446
|
_userFlow: i
|
|
438
447
|
}),
|
|
439
448
|
controller: c
|
|
440
449
|
};
|
|
441
|
-
},
|
|
450
|
+
}, fe = (e, t = {}, a = {}, s = {}, i = !1, c) => {
|
|
442
451
|
const l = F();
|
|
443
452
|
i && l.abort();
|
|
444
453
|
const n = X(t);
|
|
445
454
|
return {
|
|
446
|
-
call: V.post(e,
|
|
455
|
+
call: V.post(e, a, {
|
|
447
456
|
headers: {
|
|
448
457
|
...n
|
|
449
458
|
},
|
|
450
|
-
params:
|
|
459
|
+
params: s,
|
|
451
460
|
signal: l.signal,
|
|
452
461
|
_userFlow: c
|
|
453
462
|
}),
|
|
454
463
|
controller: l
|
|
455
464
|
};
|
|
456
|
-
},
|
|
465
|
+
}, nn = (e, t = {}, a = {}, s = {}, i = !1, c) => {
|
|
457
466
|
const l = F();
|
|
458
467
|
i && l.abort();
|
|
459
468
|
const n = X(t);
|
|
460
469
|
return {
|
|
461
|
-
call: V.put(e,
|
|
470
|
+
call: V.put(e, a, {
|
|
462
471
|
headers: {
|
|
463
472
|
...n
|
|
464
473
|
},
|
|
465
|
-
params:
|
|
474
|
+
params: s,
|
|
466
475
|
signal: l.signal,
|
|
467
476
|
_userFlow: c
|
|
468
477
|
}),
|
|
469
478
|
controller: l
|
|
470
479
|
};
|
|
471
|
-
},
|
|
480
|
+
}, sn = (e, t = {}, a = {}, s = {}, i = !1, c) => {
|
|
472
481
|
const l = F();
|
|
473
482
|
i && l.abort();
|
|
474
483
|
const n = X(t);
|
|
475
484
|
return {
|
|
476
|
-
call: V.patch(e,
|
|
485
|
+
call: V.patch(e, a, {
|
|
477
486
|
headers: {
|
|
478
487
|
...n
|
|
479
488
|
},
|
|
480
|
-
params:
|
|
489
|
+
params: s,
|
|
481
490
|
signal: l.signal,
|
|
482
491
|
_userFlow: c
|
|
483
492
|
}),
|
|
484
493
|
controller: l
|
|
485
494
|
};
|
|
486
|
-
}, an = (e, t = {},
|
|
495
|
+
}, an = (e, t = {}, a = {}, s = {}, i = !1, c) => {
|
|
487
496
|
const l = F();
|
|
488
497
|
i && l.abort();
|
|
489
498
|
const n = X(t);
|
|
@@ -492,8 +501,8 @@ const Gt = (e) => {
|
|
|
492
501
|
headers: {
|
|
493
502
|
...n
|
|
494
503
|
},
|
|
495
|
-
data:
|
|
496
|
-
params:
|
|
504
|
+
data: a,
|
|
505
|
+
params: s,
|
|
497
506
|
signal: l.signal,
|
|
498
507
|
_userFlow: c
|
|
499
508
|
}),
|
|
@@ -501,11 +510,11 @@ const Gt = (e) => {
|
|
|
501
510
|
};
|
|
502
511
|
}, Be = () => {
|
|
503
512
|
let e;
|
|
504
|
-
return { callEndpoint: async (
|
|
505
|
-
|
|
513
|
+
return { callEndpoint: async (s) => {
|
|
514
|
+
s.controller && (e = s.controller);
|
|
506
515
|
let i = {};
|
|
507
516
|
try {
|
|
508
|
-
i = await
|
|
517
|
+
i = await s.call;
|
|
509
518
|
} catch (c) {
|
|
510
519
|
throw c;
|
|
511
520
|
}
|
|
@@ -513,14 +522,14 @@ const Gt = (e) => {
|
|
|
513
522
|
}, cancelEndpoint: () => {
|
|
514
523
|
e && e.abort();
|
|
515
524
|
} };
|
|
516
|
-
}, Ie = async (e, t,
|
|
525
|
+
}, Ie = async (e, t, a = "", s = {}, i = {}) => {
|
|
517
526
|
try {
|
|
518
527
|
const { callEndpoint: c } = Be(), { api: l, headers: n } = e, d = sessionStorage.getItem("sessionId"), r = new URLSearchParams({ session_name: t });
|
|
519
|
-
|
|
520
|
-
const u = `${l}/not-front/next-ui/?${r.toString()}`, f = X(n), _ =
|
|
528
|
+
a && r.append("hash_code", a), d && r.append("sessionId", d);
|
|
529
|
+
const u = `${l}/not-front/next-ui/?${r.toString()}`, f = X(n), _ = fe(
|
|
521
530
|
u,
|
|
522
531
|
f,
|
|
523
|
-
|
|
532
|
+
s,
|
|
524
533
|
i,
|
|
525
534
|
!1,
|
|
526
535
|
t
|
|
@@ -530,7 +539,7 @@ const Gt = (e) => {
|
|
|
530
539
|
return console.error(c), Promise.reject(c);
|
|
531
540
|
}
|
|
532
541
|
}, I = () => {
|
|
533
|
-
const e = v((n) => n), { callEndpoint: t } = Be(),
|
|
542
|
+
const e = v((n) => n), { callEndpoint: t } = Be(), a = async (n, d, r, u, f = !0) => {
|
|
534
543
|
var _;
|
|
535
544
|
try {
|
|
536
545
|
const h = (_ = e[n]) == null ? void 0 : _.apiConfig, j = {
|
|
@@ -546,27 +555,27 @@ const Gt = (e) => {
|
|
|
546
555
|
} catch (h) {
|
|
547
556
|
throw f && H(n, !1), console.error("[getNextUI] Error fetching next UI:", h), h;
|
|
548
557
|
}
|
|
549
|
-
},
|
|
558
|
+
}, s = (n, d) => {
|
|
550
559
|
const { method: r, url: u, headers: f, data: _, params: h } = n;
|
|
551
560
|
switch (r) {
|
|
552
561
|
case "post":
|
|
553
|
-
return
|
|
562
|
+
return fe(u, f, _, {}, !1, d);
|
|
554
563
|
case "put":
|
|
555
|
-
return tn(u, f, _, {}, !1, d);
|
|
556
|
-
case "patch":
|
|
557
564
|
return nn(u, f, _, {}, !1, d);
|
|
565
|
+
case "patch":
|
|
566
|
+
return sn(u, f, _, {}, !1, d);
|
|
558
567
|
case "delete":
|
|
559
568
|
return an(u, f, _, h, !1, d);
|
|
560
569
|
case "get":
|
|
561
570
|
default:
|
|
562
|
-
return
|
|
571
|
+
return tn(u, f, h, !1, d);
|
|
563
572
|
}
|
|
564
573
|
}, i = (n, d) => {
|
|
565
574
|
const { url: r, headers: u } = n, f = {
|
|
566
575
|
query: n == null ? void 0 : n.query,
|
|
567
576
|
variables: (n == null ? void 0 : n.variables) || {}
|
|
568
577
|
};
|
|
569
|
-
return
|
|
578
|
+
return fe(
|
|
570
579
|
r,
|
|
571
580
|
{
|
|
572
581
|
...u,
|
|
@@ -588,7 +597,7 @@ const Gt = (e) => {
|
|
|
588
597
|
let _;
|
|
589
598
|
switch (n == null ? void 0 : n.type) {
|
|
590
599
|
case "rest":
|
|
591
|
-
_ =
|
|
600
|
+
_ = s(n, d);
|
|
592
601
|
break;
|
|
593
602
|
case "graphql":
|
|
594
603
|
_ = i(n, d);
|
|
@@ -612,13 +621,13 @@ const Gt = (e) => {
|
|
|
612
621
|
}
|
|
613
622
|
};
|
|
614
623
|
return {
|
|
615
|
-
getNextUI:
|
|
624
|
+
getNextUI: a,
|
|
616
625
|
fetchDataSource: c,
|
|
617
626
|
fetchAndGetNextUI: async (n, d, r, u, f) => {
|
|
618
627
|
try {
|
|
619
628
|
H(n, !0);
|
|
620
629
|
const _ = await c(f, n, !1);
|
|
621
|
-
return _ && await
|
|
630
|
+
return _ && await a(
|
|
622
631
|
n,
|
|
623
632
|
d,
|
|
624
633
|
r,
|
|
@@ -632,24 +641,24 @@ const Gt = (e) => {
|
|
|
632
641
|
}
|
|
633
642
|
}
|
|
634
643
|
};
|
|
635
|
-
},
|
|
644
|
+
}, rn = ({
|
|
636
645
|
userFlow: e,
|
|
637
646
|
items: t,
|
|
638
|
-
responseKey:
|
|
647
|
+
responseKey: a
|
|
639
648
|
}) => {
|
|
640
|
-
const { getNextUI:
|
|
649
|
+
const { getNextUI: s } = I(), i = D(
|
|
641
650
|
async ({ actionType: l, hashCode: n, redirectUrl: d }) => {
|
|
642
651
|
var r;
|
|
643
652
|
try {
|
|
644
653
|
switch (l) {
|
|
645
654
|
case "GO_TO_NEXT_UI":
|
|
646
|
-
const u = await
|
|
655
|
+
const u = await s(
|
|
647
656
|
e,
|
|
648
657
|
n,
|
|
649
658
|
{ ...(r = v.getState()[e]) == null ? void 0 : r.entries },
|
|
650
|
-
|
|
659
|
+
a
|
|
651
660
|
);
|
|
652
|
-
u != null && u.data &&
|
|
661
|
+
u != null && u.data && T(e, u == null ? void 0 : u.data);
|
|
653
662
|
break;
|
|
654
663
|
case "REDIRECT":
|
|
655
664
|
d ? window.location.href = d : console.warn("Missing redirectUrl for REDIRECT actionType");
|
|
@@ -668,11 +677,11 @@ const Gt = (e) => {
|
|
|
668
677
|
component: /* @__PURE__ */ o.jsx("div", { onClick: () => i(l) })
|
|
669
678
|
})), []);
|
|
670
679
|
return /* @__PURE__ */ o.jsx(Ye, { items: c });
|
|
671
|
-
},
|
|
680
|
+
}, cn = (e) => {
|
|
672
681
|
const {
|
|
673
682
|
userFlow: t,
|
|
674
|
-
pageId:
|
|
675
|
-
responseKey:
|
|
683
|
+
pageId: a,
|
|
684
|
+
responseKey: s,
|
|
676
685
|
actionType: i,
|
|
677
686
|
label: c,
|
|
678
687
|
content: l,
|
|
@@ -681,18 +690,18 @@ const Gt = (e) => {
|
|
|
681
690
|
dependencies: r,
|
|
682
691
|
onClick: u,
|
|
683
692
|
...f
|
|
684
|
-
} = e, { getNextUI: _, fetchDataSource: h, fetchAndGetNextUI: j } = I(), { disabled:
|
|
693
|
+
} = e, { getNextUI: _, fetchDataSource: h, fetchAndGetNextUI: j } = I(), { disabled: m } = M(
|
|
685
694
|
t,
|
|
686
695
|
r
|
|
687
696
|
), x = {
|
|
688
697
|
...f,
|
|
689
698
|
children: l ?? c
|
|
690
|
-
},
|
|
699
|
+
}, y = (x == null ? void 0 : x.disabled) ?? m, g = D(async () => {
|
|
691
700
|
var p, N, b;
|
|
692
701
|
try {
|
|
693
702
|
const C = {
|
|
694
703
|
...(p = v.getState()[t]) == null ? void 0 : p.entries,
|
|
695
|
-
[
|
|
704
|
+
[s]: { status: 200 }
|
|
696
705
|
};
|
|
697
706
|
switch (L(t, C), i) {
|
|
698
707
|
case "CLOSE_MODAL":
|
|
@@ -707,52 +716,52 @@ const Gt = (e) => {
|
|
|
707
716
|
case "GO_TO_NEXT_UI": {
|
|
708
717
|
const w = await _(
|
|
709
718
|
t,
|
|
710
|
-
|
|
719
|
+
a,
|
|
711
720
|
C,
|
|
712
|
-
|
|
721
|
+
s
|
|
713
722
|
);
|
|
714
|
-
w != null && w.data &&
|
|
723
|
+
w != null && w.data && T(t, w == null ? void 0 : w.data);
|
|
715
724
|
break;
|
|
716
725
|
}
|
|
717
726
|
case "FETCH_AND_GO_TO_NEXT_UI": {
|
|
718
727
|
const w = await j(
|
|
719
728
|
t,
|
|
720
|
-
s,
|
|
721
|
-
C,
|
|
722
729
|
a,
|
|
730
|
+
C,
|
|
731
|
+
s,
|
|
723
732
|
n
|
|
724
733
|
);
|
|
725
|
-
w != null && w.data &&
|
|
734
|
+
w != null && w.data && T(t, w == null ? void 0 : w.data);
|
|
726
735
|
break;
|
|
727
736
|
}
|
|
728
737
|
case "GET_DATA_SOURCE": {
|
|
729
738
|
const w = await _(
|
|
730
739
|
t,
|
|
731
|
-
|
|
740
|
+
a,
|
|
732
741
|
C,
|
|
733
|
-
|
|
742
|
+
s
|
|
734
743
|
), E = (N = w == null ? void 0 : w.data) == null ? void 0 : N.content;
|
|
735
744
|
if ((E == null ? void 0 : E.type) !== "fetch") break;
|
|
736
|
-
const
|
|
737
|
-
|
|
745
|
+
const $ = E == null ? void 0 : E.dataSource, k = await h(
|
|
746
|
+
$,
|
|
738
747
|
t,
|
|
739
748
|
// Avoid to handle loading state until all the requests are done
|
|
740
749
|
!1
|
|
741
750
|
), G = {
|
|
742
751
|
...(b = v.getState()[t]) == null ? void 0 : b.entries,
|
|
743
|
-
[
|
|
744
|
-
status:
|
|
745
|
-
content:
|
|
752
|
+
[s]: {
|
|
753
|
+
status: k == null ? void 0 : k.status,
|
|
754
|
+
content: k == null ? void 0 : k.data
|
|
746
755
|
}
|
|
747
756
|
};
|
|
748
757
|
L(t, G);
|
|
749
758
|
const U = await _(
|
|
750
759
|
t,
|
|
751
|
-
|
|
760
|
+
a,
|
|
752
761
|
G,
|
|
753
|
-
|
|
762
|
+
s
|
|
754
763
|
);
|
|
755
|
-
U != null && U.data &&
|
|
764
|
+
U != null && U.data && T(t, U == null ? void 0 : U.data);
|
|
756
765
|
break;
|
|
757
766
|
}
|
|
758
767
|
case "REDIRECT":
|
|
@@ -765,34 +774,34 @@ const Gt = (e) => {
|
|
|
765
774
|
} catch (C) {
|
|
766
775
|
alert(JSON.stringify(C));
|
|
767
776
|
}
|
|
768
|
-
}, [i, n,
|
|
777
|
+
}, [i, n, a, s, t]);
|
|
769
778
|
return /* @__PURE__ */ o.jsx(
|
|
770
779
|
Ze,
|
|
771
780
|
{
|
|
772
781
|
...x,
|
|
773
|
-
disabled:
|
|
774
|
-
onClick: () => !
|
|
782
|
+
disabled: y,
|
|
783
|
+
onClick: () => !y && (u ?? g)()
|
|
775
784
|
}
|
|
776
785
|
);
|
|
777
|
-
},
|
|
778
|
-
cardNotificationNotFront:
|
|
779
|
-
},
|
|
780
|
-
const { content: t, description:
|
|
781
|
-
...
|
|
782
|
-
children: t ??
|
|
786
|
+
}, on = "_cardNotificationNotFront_t7pln_1", ln = {
|
|
787
|
+
cardNotificationNotFront: on
|
|
788
|
+
}, dn = (e) => {
|
|
789
|
+
const { content: t, description: a, ...s } = e, i = {
|
|
790
|
+
...s,
|
|
791
|
+
children: t ?? a
|
|
783
792
|
};
|
|
784
793
|
return /* @__PURE__ */ o.jsx(
|
|
785
|
-
|
|
794
|
+
me,
|
|
786
795
|
{
|
|
787
796
|
...i,
|
|
788
|
-
className:
|
|
797
|
+
className: ln.cardNotificationNotFront
|
|
789
798
|
}
|
|
790
799
|
);
|
|
791
|
-
},
|
|
800
|
+
}, _n = (e) => {
|
|
792
801
|
const {
|
|
793
802
|
userFlow: t,
|
|
794
|
-
pageId:
|
|
795
|
-
responseKey:
|
|
803
|
+
pageId: a,
|
|
804
|
+
responseKey: s,
|
|
796
805
|
actionType: i,
|
|
797
806
|
label: c,
|
|
798
807
|
value: l,
|
|
@@ -801,27 +810,27 @@ const Gt = (e) => {
|
|
|
801
810
|
...r
|
|
802
811
|
} = e, u = {
|
|
803
812
|
...r
|
|
804
|
-
}, { getNextUI: f } = I(), [_, h] =
|
|
813
|
+
}, { getNextUI: f } = I(), [_, h] = q(l || !1), { disabled: j } = M(
|
|
805
814
|
t,
|
|
806
815
|
d
|
|
807
|
-
),
|
|
816
|
+
), m = S(() => n && c ? `${c} *` : c ?? "", [c, n]), x = D(async () => {
|
|
808
817
|
var g;
|
|
809
818
|
try {
|
|
810
819
|
const p = !_;
|
|
811
820
|
h(p);
|
|
812
821
|
const N = {
|
|
813
822
|
...(g = v.getState()[t]) == null ? void 0 : g.entries,
|
|
814
|
-
[
|
|
823
|
+
[s]: p
|
|
815
824
|
};
|
|
816
825
|
switch (L(t, N), i) {
|
|
817
826
|
case "GO_TO_NEXT_UI":
|
|
818
827
|
const b = await f(
|
|
819
828
|
t,
|
|
820
|
-
|
|
829
|
+
a,
|
|
821
830
|
N,
|
|
822
|
-
|
|
831
|
+
s
|
|
823
832
|
);
|
|
824
|
-
b != null && b.data &&
|
|
833
|
+
b != null && b.data && T(t, b == null ? void 0 : b.data);
|
|
825
834
|
break;
|
|
826
835
|
default:
|
|
827
836
|
console.warn(`Unhandled actionType: ${i}`);
|
|
@@ -830,30 +839,30 @@ const Gt = (e) => {
|
|
|
830
839
|
} catch (p) {
|
|
831
840
|
console.error("Error in checkbox action:", p), alert(JSON.stringify(p));
|
|
832
841
|
}
|
|
833
|
-
}, [t,
|
|
842
|
+
}, [t, a, s, i, _]), y = (u == null ? void 0 : u.disabled) ?? j;
|
|
834
843
|
return /* @__PURE__ */ o.jsx(
|
|
835
844
|
Fe,
|
|
836
845
|
{
|
|
837
846
|
...u,
|
|
838
|
-
labelRight:
|
|
847
|
+
labelRight: m,
|
|
839
848
|
checked: _,
|
|
840
|
-
disabled:
|
|
849
|
+
disabled: y,
|
|
841
850
|
onChange: () => {
|
|
842
|
-
!
|
|
851
|
+
!y && x();
|
|
843
852
|
}
|
|
844
853
|
}
|
|
845
854
|
);
|
|
846
|
-
},
|
|
847
|
-
codeEditor:
|
|
848
|
-
codeEditor_label:
|
|
849
|
-
codeEditor_wrapper:
|
|
850
|
-
input:
|
|
855
|
+
}, un = "_codeEditor_1coz7_1", hn = "_codeEditor_label_1coz7_4", fn = "_codeEditor_wrapper_1coz7_13", mn = "_input_1coz7_17", yn = "_preview_1coz7_18", Y = {
|
|
856
|
+
codeEditor: un,
|
|
857
|
+
codeEditor_label: hn,
|
|
858
|
+
codeEditor_wrapper: fn,
|
|
859
|
+
input: mn,
|
|
851
860
|
preview: yn
|
|
852
|
-
},
|
|
861
|
+
}, xn = (e) => {
|
|
853
862
|
const {
|
|
854
863
|
userFlow: t,
|
|
855
|
-
responseKey:
|
|
856
|
-
label:
|
|
864
|
+
responseKey: a,
|
|
865
|
+
label: s,
|
|
857
866
|
language: i,
|
|
858
867
|
placeholder: c,
|
|
859
868
|
value: l,
|
|
@@ -861,26 +870,26 @@ const Gt = (e) => {
|
|
|
861
870
|
dependencies: d,
|
|
862
871
|
disabled: r,
|
|
863
872
|
showPreview: u
|
|
864
|
-
} = e, [f, _] =
|
|
873
|
+
} = e, [f, _] = q(l ?? ""), h = te.useThemeStore((p) => p.theme.mode), { disabled: j } = M(
|
|
865
874
|
t,
|
|
866
875
|
d
|
|
867
|
-
),
|
|
876
|
+
), m = r ?? j, x = {
|
|
868
877
|
json: we(),
|
|
869
|
-
markdown:
|
|
870
|
-
sql:
|
|
871
|
-
yaml:
|
|
872
|
-
},
|
|
878
|
+
markdown: gt(),
|
|
879
|
+
sql: bt(),
|
|
880
|
+
yaml: pt()
|
|
881
|
+
}, y = S(() => n && s ? `${s} *` : s ?? "", [s, n]), g = (p) => {
|
|
873
882
|
_(p);
|
|
874
883
|
const N = {
|
|
875
|
-
[
|
|
884
|
+
[a]: p
|
|
876
885
|
};
|
|
877
886
|
L(t, N);
|
|
878
887
|
};
|
|
879
888
|
return /* @__PURE__ */ o.jsxs("div", { className: Y.codeEditor, children: [
|
|
880
|
-
|
|
889
|
+
y && y !== "" && /* @__PURE__ */ o.jsx("label", { className: Y.codeEditor_label, children: y }),
|
|
881
890
|
/* @__PURE__ */ o.jsxs("div", { className: Y.codeEditor_wrapper, children: [
|
|
882
891
|
/* @__PURE__ */ o.jsx(
|
|
883
|
-
|
|
892
|
+
xt,
|
|
884
893
|
{
|
|
885
894
|
className: Y.input,
|
|
886
895
|
value: f,
|
|
@@ -889,60 +898,60 @@ const Gt = (e) => {
|
|
|
889
898
|
extensions: [x[i] ?? we()],
|
|
890
899
|
onChange: (p) => g(p),
|
|
891
900
|
theme: h,
|
|
892
|
-
editable: !
|
|
901
|
+
editable: !m
|
|
893
902
|
}
|
|
894
903
|
),
|
|
895
904
|
i == "markdown" && u && /* @__PURE__ */ o.jsx(Pe, { className: Y.preview, children: f })
|
|
896
905
|
] })
|
|
897
906
|
] });
|
|
898
907
|
};
|
|
899
|
-
var
|
|
908
|
+
var de = { exports: {} };
|
|
900
909
|
/*!
|
|
901
910
|
Copyright (c) 2018 Jed Watson.
|
|
902
911
|
Licensed under the MIT License (MIT), see
|
|
903
912
|
http://jedwatson.github.io/classnames
|
|
904
913
|
*/
|
|
905
|
-
var
|
|
906
|
-
function
|
|
907
|
-
return
|
|
914
|
+
var qe;
|
|
915
|
+
function gn() {
|
|
916
|
+
return qe || (qe = 1, (function(e) {
|
|
908
917
|
(function() {
|
|
909
918
|
var t = {}.hasOwnProperty;
|
|
910
|
-
function
|
|
911
|
-
for (var
|
|
919
|
+
function a() {
|
|
920
|
+
for (var s = [], i = 0; i < arguments.length; i++) {
|
|
912
921
|
var c = arguments[i];
|
|
913
922
|
if (c) {
|
|
914
923
|
var l = typeof c;
|
|
915
924
|
if (l === "string" || l === "number")
|
|
916
|
-
|
|
925
|
+
s.push(c);
|
|
917
926
|
else if (Array.isArray(c)) {
|
|
918
927
|
if (c.length) {
|
|
919
|
-
var n =
|
|
920
|
-
n &&
|
|
928
|
+
var n = a.apply(null, c);
|
|
929
|
+
n && s.push(n);
|
|
921
930
|
}
|
|
922
931
|
} else if (l === "object") {
|
|
923
932
|
if (c.toString !== Object.prototype.toString && !c.toString.toString().includes("[native code]")) {
|
|
924
|
-
|
|
933
|
+
s.push(c.toString());
|
|
925
934
|
continue;
|
|
926
935
|
}
|
|
927
936
|
for (var d in c)
|
|
928
|
-
t.call(c, d) && c[d] &&
|
|
937
|
+
t.call(c, d) && c[d] && s.push(d);
|
|
929
938
|
}
|
|
930
939
|
}
|
|
931
940
|
}
|
|
932
|
-
return
|
|
941
|
+
return s.join(" ");
|
|
933
942
|
}
|
|
934
|
-
e.exports ? (
|
|
943
|
+
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
935
944
|
})();
|
|
936
|
-
})(
|
|
945
|
+
})(de)), de.exports;
|
|
937
946
|
}
|
|
938
|
-
var
|
|
939
|
-
const ee = /* @__PURE__ */
|
|
940
|
-
dividerNotFront:
|
|
941
|
-
},
|
|
942
|
-
const { url:
|
|
943
|
-
if (l.push(`${n}=${t}`), typeof
|
|
947
|
+
var bn = gn();
|
|
948
|
+
const ee = /* @__PURE__ */ Mt(bn), pn = "_dividerNotFront_tze3j_1", jn = {
|
|
949
|
+
dividerNotFront: pn
|
|
950
|
+
}, wn = (e) => /* @__PURE__ */ o.jsx(et, { ...e, className: jn.dividerNotFront }), Cn = (e, t, a) => {
|
|
951
|
+
const { url: s, paginationKeys: i, params: c } = e, l = [], n = (i == null ? void 0 : i.page) ?? "page";
|
|
952
|
+
if (l.push(`${n}=${t}`), typeof a == "string") {
|
|
944
953
|
const u = (i == null ? void 0 : i.text) ?? "text";
|
|
945
|
-
l.push(`${u}=${encodeURIComponent(
|
|
954
|
+
l.push(`${u}=${encodeURIComponent(a || "")}`);
|
|
946
955
|
}
|
|
947
956
|
if (c && typeof c == "object") {
|
|
948
957
|
const u = Object.entries(c).map(
|
|
@@ -951,12 +960,12 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
951
960
|
l.push(...u);
|
|
952
961
|
}
|
|
953
962
|
const d = l.join("&");
|
|
954
|
-
return d ? `${
|
|
955
|
-
}, be = (e, t,
|
|
956
|
-
const { type:
|
|
957
|
-
return
|
|
963
|
+
return d ? `${s}?${d}` : s;
|
|
964
|
+
}, be = (e, t, a) => {
|
|
965
|
+
const { type: s, url: i, method: c, headers: l } = e;
|
|
966
|
+
return s === "rest" ? {
|
|
958
967
|
type: "rest",
|
|
959
|
-
url:
|
|
968
|
+
url: Cn(e, t, a),
|
|
960
969
|
method: c,
|
|
961
970
|
headers: l,
|
|
962
971
|
data: (e == null ? void 0 : e.data) || {}
|
|
@@ -968,41 +977,41 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
968
977
|
query: e == null ? void 0 : e.query,
|
|
969
978
|
variables: {
|
|
970
979
|
...(e == null ? void 0 : e.variables) || {},
|
|
971
|
-
...typeof
|
|
980
|
+
...typeof a == "string" ? { text: a } : {},
|
|
972
981
|
page: t
|
|
973
982
|
}
|
|
974
983
|
};
|
|
975
|
-
},
|
|
984
|
+
}, _e = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, ze = (e, t, a, s) => {
|
|
976
985
|
const i = B.query(e, t), c = i == null ? void 0 : i.map((r) => {
|
|
977
986
|
var u, f;
|
|
978
|
-
if (
|
|
987
|
+
if (a) {
|
|
979
988
|
const _ = {};
|
|
980
|
-
for (const [h, j] of Object.entries(
|
|
989
|
+
for (const [h, j] of Object.entries(a))
|
|
981
990
|
if (typeof j == "object" && "path" in j) {
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
) : _[h] =
|
|
991
|
+
const m = j, x = (u = B.query(r, m.path)) == null ? void 0 : u[0];
|
|
992
|
+
m.translations && String(x) in m.translations ? _[h] = _e(
|
|
993
|
+
m.translations[String(x)]
|
|
994
|
+
) : _[h] = _e(x);
|
|
986
995
|
} else {
|
|
987
|
-
const
|
|
988
|
-
_[h] =
|
|
996
|
+
const m = j;
|
|
997
|
+
_[h] = _e((f = B.query(r, m)) == null ? void 0 : f[0]);
|
|
989
998
|
}
|
|
990
999
|
return _;
|
|
991
1000
|
} else
|
|
992
1001
|
return r;
|
|
993
|
-
}), l = B.value(e, (
|
|
1002
|
+
}), l = B.value(e, (s == null ? void 0 : s.size) ?? "$.meta.size") ?? i.length, n = B.value(e, (s == null ? void 0 : s.total) ?? "$.meta.total") ?? 0, d = {
|
|
994
1003
|
size: l,
|
|
995
1004
|
total: n,
|
|
996
|
-
totalPages:
|
|
1005
|
+
totalPages: s != null && s.totalPages ? B.value(
|
|
997
1006
|
e,
|
|
998
|
-
(
|
|
1007
|
+
(s == null ? void 0 : s.totalPages) ?? "$.meta.totalPages"
|
|
999
1008
|
) : l > 0 ? Math.ceil(n / l) : 0
|
|
1000
1009
|
};
|
|
1001
1010
|
return { items: c, pagination: d };
|
|
1002
|
-
},
|
|
1003
|
-
const t = (
|
|
1011
|
+
}, se = ({ withPadding: e = !1 }) => {
|
|
1012
|
+
const t = (a) => /* @__PURE__ */ o.jsx("span", { style: { color: R.labelColor }, children: a });
|
|
1004
1013
|
return /* @__PURE__ */ o.jsx(
|
|
1005
|
-
|
|
1014
|
+
jt,
|
|
1006
1015
|
{
|
|
1007
1016
|
formatter: t,
|
|
1008
1017
|
wrapperStyle: {
|
|
@@ -1012,11 +1021,11 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1012
1021
|
}
|
|
1013
1022
|
}
|
|
1014
1023
|
);
|
|
1015
|
-
},
|
|
1024
|
+
}, Nn = ({
|
|
1016
1025
|
active: e,
|
|
1017
1026
|
payload: t,
|
|
1018
|
-
label:
|
|
1019
|
-
tooltipKey:
|
|
1027
|
+
label: a,
|
|
1028
|
+
tooltipKey: s
|
|
1020
1029
|
}) => {
|
|
1021
1030
|
var c;
|
|
1022
1031
|
if (!e || !t || !t.length)
|
|
@@ -1028,22 +1037,22 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1028
1037
|
padding: "8px 12px",
|
|
1029
1038
|
border: "1px solid #e5e7eb"
|
|
1030
1039
|
};
|
|
1031
|
-
if (
|
|
1040
|
+
if (s) {
|
|
1032
1041
|
const l = (c = t[0]) == null ? void 0 : c.payload;
|
|
1033
|
-
if (l && l[
|
|
1034
|
-
return /* @__PURE__ */ o.jsx("div", { style: i, children: /* @__PURE__ */ o.jsx("p", { style: { margin: 0 }, children: l[
|
|
1042
|
+
if (l && l[s] !== void 0 && l[s] !== null)
|
|
1043
|
+
return /* @__PURE__ */ o.jsx("div", { style: i, children: /* @__PURE__ */ o.jsx("p", { style: { margin: 0 }, children: l[s] }) });
|
|
1035
1044
|
}
|
|
1036
1045
|
return /* @__PURE__ */ o.jsxs("div", { style: i, children: [
|
|
1037
|
-
/* @__PURE__ */ o.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children:
|
|
1046
|
+
/* @__PURE__ */ o.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: a }),
|
|
1038
1047
|
t.map((l, n) => /* @__PURE__ */ o.jsx("p", { style: { margin: "2px 0", color: l.color }, children: `${l.name}: ${l.value}` }, n))
|
|
1039
1048
|
] });
|
|
1040
1049
|
}, ae = ({ tooltipKey: e } = {}) => /* @__PURE__ */ o.jsx(
|
|
1041
|
-
|
|
1050
|
+
wt,
|
|
1042
1051
|
{
|
|
1043
|
-
content: /* @__PURE__ */ o.jsx(
|
|
1052
|
+
content: /* @__PURE__ */ o.jsx(Nn, { tooltipKey: e })
|
|
1044
1053
|
}
|
|
1045
1054
|
), pe = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ o.jsx(
|
|
1046
|
-
|
|
1055
|
+
Ct,
|
|
1047
1056
|
{
|
|
1048
1057
|
dataKey: e,
|
|
1049
1058
|
hide: t,
|
|
@@ -1053,23 +1062,23 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1053
1062
|
}
|
|
1054
1063
|
}
|
|
1055
1064
|
), je = () => /* @__PURE__ */ o.jsx(
|
|
1056
|
-
|
|
1065
|
+
Nt,
|
|
1057
1066
|
{
|
|
1058
1067
|
tick: {
|
|
1059
1068
|
fill: R.labelColor,
|
|
1060
1069
|
fontSize: R.fontSize
|
|
1061
1070
|
}
|
|
1062
1071
|
}
|
|
1063
|
-
),
|
|
1064
|
-
const { data: t, xKey:
|
|
1065
|
-
return /* @__PURE__ */ o.jsx(
|
|
1066
|
-
/* @__PURE__ */ o.jsx(
|
|
1067
|
-
/* @__PURE__ */ o.jsx(pe, { dataKey:
|
|
1072
|
+
), vn = (e) => {
|
|
1073
|
+
const { data: t, xKey: a, yKeys: s, tooltipKey: i } = e;
|
|
1074
|
+
return /* @__PURE__ */ o.jsx(ne, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(vt, { data: t, children: [
|
|
1075
|
+
/* @__PURE__ */ o.jsx(ye, { strokeDasharray: "3 3" }),
|
|
1076
|
+
/* @__PURE__ */ o.jsx(pe, { dataKey: a }),
|
|
1068
1077
|
/* @__PURE__ */ o.jsx(je, {}),
|
|
1069
1078
|
/* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
|
|
1070
|
-
/* @__PURE__ */ o.jsx(
|
|
1071
|
-
|
|
1072
|
-
|
|
1079
|
+
/* @__PURE__ */ o.jsx(se, {}),
|
|
1080
|
+
s.map((c, l) => /* @__PURE__ */ o.jsx(
|
|
1081
|
+
Et,
|
|
1073
1082
|
{
|
|
1074
1083
|
type: "monotone",
|
|
1075
1084
|
dataKey: c,
|
|
@@ -1079,16 +1088,16 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1079
1088
|
c
|
|
1080
1089
|
))
|
|
1081
1090
|
] }) });
|
|
1082
|
-
},
|
|
1083
|
-
const { data: t, yKeys:
|
|
1084
|
-
return /* @__PURE__ */ o.jsx(
|
|
1085
|
-
/* @__PURE__ */ o.jsx(
|
|
1086
|
-
/* @__PURE__ */ o.jsx(pe, { hide: !0, dataKey:
|
|
1091
|
+
}, En = (e) => {
|
|
1092
|
+
const { data: t, yKeys: a, xKey: s, tooltipKey: i } = e;
|
|
1093
|
+
return /* @__PURE__ */ o.jsx(ne, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(St, { data: t, children: [
|
|
1094
|
+
/* @__PURE__ */ o.jsx(ye, { strokeDasharray: "3 3" }),
|
|
1095
|
+
/* @__PURE__ */ o.jsx(pe, { hide: !0, dataKey: s }),
|
|
1087
1096
|
/* @__PURE__ */ o.jsx(je, {}),
|
|
1088
1097
|
/* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
|
|
1089
|
-
/* @__PURE__ */ o.jsx(
|
|
1090
|
-
|
|
1091
|
-
|
|
1098
|
+
/* @__PURE__ */ o.jsx(se, { withPadding: !0 }),
|
|
1099
|
+
a.map((c, l) => /* @__PURE__ */ o.jsx(
|
|
1100
|
+
kt,
|
|
1092
1101
|
{
|
|
1093
1102
|
dataKey: c,
|
|
1094
1103
|
fill: z[l % z.length]
|
|
@@ -1096,16 +1105,16 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1096
1105
|
c
|
|
1097
1106
|
))
|
|
1098
1107
|
] }) });
|
|
1099
|
-
},
|
|
1100
|
-
const { data: t, xKey:
|
|
1101
|
-
return /* @__PURE__ */ o.jsx(
|
|
1102
|
-
/* @__PURE__ */ o.jsx(
|
|
1103
|
-
/* @__PURE__ */ o.jsx(pe, { dataKey:
|
|
1108
|
+
}, Sn = (e) => {
|
|
1109
|
+
const { data: t, xKey: a, yKeys: s, tooltipKey: i } = e;
|
|
1110
|
+
return /* @__PURE__ */ o.jsx(ne, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(qt, { data: t, children: [
|
|
1111
|
+
/* @__PURE__ */ o.jsx(ye, { strokeDasharray: "3 3" }),
|
|
1112
|
+
/* @__PURE__ */ o.jsx(pe, { dataKey: a }),
|
|
1104
1113
|
/* @__PURE__ */ o.jsx(je, {}),
|
|
1105
1114
|
/* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
|
|
1106
|
-
/* @__PURE__ */ o.jsx(
|
|
1107
|
-
|
|
1108
|
-
|
|
1115
|
+
/* @__PURE__ */ o.jsx(se, {}),
|
|
1116
|
+
s.map((c, l) => /* @__PURE__ */ o.jsx(
|
|
1117
|
+
Ot,
|
|
1109
1118
|
{
|
|
1110
1119
|
type: "monotone",
|
|
1111
1120
|
dataKey: c,
|
|
@@ -1116,8 +1125,8 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1116
1125
|
c
|
|
1117
1126
|
))
|
|
1118
1127
|
] }) });
|
|
1119
|
-
},
|
|
1120
|
-
const { data: t, xKey:
|
|
1128
|
+
}, kn = (e) => {
|
|
1129
|
+
const { data: t, xKey: a, yKeys: s, tooltipKey: i } = e, c = ({
|
|
1121
1130
|
cx: l,
|
|
1122
1131
|
cy: n,
|
|
1123
1132
|
midAngle: d,
|
|
@@ -1125,12 +1134,12 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1125
1134
|
outerRadius: u,
|
|
1126
1135
|
value: f
|
|
1127
1136
|
}) => {
|
|
1128
|
-
const _ = Math.PI / 180, h = 25 + r + (u - r), j = l + h * Math.cos(-(d ?? 0) * _),
|
|
1137
|
+
const _ = Math.PI / 180, h = 25 + r + (u - r), j = l + h * Math.cos(-(d ?? 0) * _), m = n + h * Math.sin(-(d ?? 0) * _);
|
|
1129
1138
|
return /* @__PURE__ */ o.jsx(
|
|
1130
1139
|
"text",
|
|
1131
1140
|
{
|
|
1132
1141
|
x: j,
|
|
1133
|
-
y,
|
|
1142
|
+
y: m,
|
|
1134
1143
|
fill: R.labelColor,
|
|
1135
1144
|
color: R.labelColor,
|
|
1136
1145
|
textAnchor: "middle",
|
|
@@ -1139,19 +1148,19 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1139
1148
|
}
|
|
1140
1149
|
);
|
|
1141
1150
|
};
|
|
1142
|
-
return /* @__PURE__ */ o.jsx(
|
|
1151
|
+
return /* @__PURE__ */ o.jsx(ne, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(At, { children: [
|
|
1143
1152
|
/* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
|
|
1144
|
-
/* @__PURE__ */ o.jsx(
|
|
1153
|
+
/* @__PURE__ */ o.jsx(se, {}),
|
|
1145
1154
|
/* @__PURE__ */ o.jsx(
|
|
1146
|
-
|
|
1155
|
+
Tt,
|
|
1147
1156
|
{
|
|
1148
1157
|
data: t,
|
|
1149
|
-
dataKey:
|
|
1150
|
-
nameKey:
|
|
1158
|
+
dataKey: s[0],
|
|
1159
|
+
nameKey: a,
|
|
1151
1160
|
label: c,
|
|
1152
1161
|
outerRadius: 120,
|
|
1153
1162
|
children: t.map((l, n) => /* @__PURE__ */ o.jsx(
|
|
1154
|
-
|
|
1163
|
+
$t,
|
|
1155
1164
|
{
|
|
1156
1165
|
fill: z[n % z.length]
|
|
1157
1166
|
},
|
|
@@ -1161,10 +1170,10 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1161
1170
|
)
|
|
1162
1171
|
] }) });
|
|
1163
1172
|
}, qn = {
|
|
1164
|
-
area:
|
|
1165
|
-
bar:
|
|
1166
|
-
line:
|
|
1167
|
-
pie:
|
|
1173
|
+
area: vn,
|
|
1174
|
+
bar: En,
|
|
1175
|
+
line: Sn,
|
|
1176
|
+
pie: kn
|
|
1168
1177
|
}, z = [
|
|
1169
1178
|
"var(--color-primitive-palette-1-50)",
|
|
1170
1179
|
"var(--color-primitive-palette-2-50)",
|
|
@@ -1190,25 +1199,25 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1190
1199
|
tooltipBg: "#fff",
|
|
1191
1200
|
tooltipColor: "#000",
|
|
1192
1201
|
tooltipBorderRadius: "4px"
|
|
1193
|
-
},
|
|
1194
|
-
const { component: t, userFlow:
|
|
1202
|
+
}, On = (e) => {
|
|
1203
|
+
const { component: t, userFlow: a, hash: s, responseKey: i, dataSource: c, ...l } = e, n = qn[l.type];
|
|
1195
1204
|
if (!n)
|
|
1196
1205
|
return /* @__PURE__ */ o.jsx("div", { children: "Not supported chart type" });
|
|
1197
|
-
const { fetchDataSource: d } = I(), [r, u] =
|
|
1198
|
-
var
|
|
1206
|
+
const { fetchDataSource: d } = I(), [r, u] = q(!1), [f, _] = q([]), h = async () => {
|
|
1207
|
+
var m, x;
|
|
1199
1208
|
try {
|
|
1200
1209
|
u(!0);
|
|
1201
|
-
const { jsonPathData:
|
|
1210
|
+
const { jsonPathData: y, mapperData: g } = c, p = be(
|
|
1202
1211
|
c,
|
|
1203
1212
|
1
|
|
1204
1213
|
), N = await d(
|
|
1205
1214
|
p,
|
|
1206
|
-
|
|
1215
|
+
a,
|
|
1207
1216
|
!1
|
|
1208
|
-
), b =
|
|
1217
|
+
), b = y ? (m = ze(N == null ? void 0 : N.data, y, g)) == null ? void 0 : m.items : (x = N == null ? void 0 : N.data) == null ? void 0 : x.data;
|
|
1209
1218
|
_(b), u(!1);
|
|
1210
|
-
} catch (
|
|
1211
|
-
alert(JSON.stringify(
|
|
1219
|
+
} catch (y) {
|
|
1220
|
+
alert(JSON.stringify(y)), u(!1);
|
|
1212
1221
|
}
|
|
1213
1222
|
};
|
|
1214
1223
|
K(() => {
|
|
@@ -1218,96 +1227,97 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1218
1227
|
...l,
|
|
1219
1228
|
data: f
|
|
1220
1229
|
};
|
|
1221
|
-
return r ? /* @__PURE__ */ o.jsx(De, { height: 400 }) : f.length > 0 ? n(j) : /* @__PURE__ */ o.jsx(
|
|
1222
|
-
},
|
|
1223
|
-
header:
|
|
1224
|
-
header_content:
|
|
1225
|
-
},
|
|
1230
|
+
return r ? /* @__PURE__ */ o.jsx(De, { height: 400 }) : f.length > 0 ? n(j) : /* @__PURE__ */ o.jsx(me, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" });
|
|
1231
|
+
}, An = "_header_g1eri_1", Tn = "_header_content_g1eri_5", Oe = {
|
|
1232
|
+
header: An,
|
|
1233
|
+
header_content: Tn
|
|
1234
|
+
}, $n = ({ components: e = [] }) => /* @__PURE__ */ o.jsx("section", { className: ee(Oe.header, "avocado-dark-theme"), children: /* @__PURE__ */ o.jsx("div", { className: Oe.header_content, children: e.map((t, a) => /* @__PURE__ */ o.jsx(A, { children: t }, a)) }) }), O = (e, t, a, s) => {
|
|
1226
1235
|
var l;
|
|
1227
1236
|
const i = {
|
|
1228
|
-
accordion: (n) => /* @__PURE__ */ o.jsx(
|
|
1229
|
-
aiChatPanel: (n) => /* @__PURE__ */ o.jsx(
|
|
1230
|
-
aiSummaryCard: (n) => /* @__PURE__ */ o.jsx(
|
|
1231
|
-
aiPromptCodeEditor: (n) => /* @__PURE__ */ o.jsx(
|
|
1232
|
-
breadcrumbs: (n) => /* @__PURE__ */ o.jsx(
|
|
1233
|
-
button: (n) => /* @__PURE__ */ o.jsx(
|
|
1234
|
-
cardNotification: (n) => /* @__PURE__ */ o.jsx(
|
|
1235
|
-
chart: (n) => /* @__PURE__ */ o.jsx(
|
|
1236
|
-
checkbox: (n) => /* @__PURE__ */ o.jsx(
|
|
1237
|
-
code: (n) => /* @__PURE__ */ o.jsx(
|
|
1238
|
-
divider: (n) => /* @__PURE__ */ o.jsx(
|
|
1239
|
-
drawer: (n) => /* @__PURE__ */ o.jsx(
|
|
1240
|
-
heading: (n) =>
|
|
1241
|
-
pill: (n) => /* @__PURE__ */ o.jsx(
|
|
1242
|
-
modal: (n) => /* @__PURE__ */ o.jsx(
|
|
1243
|
-
roundButton: (n) => /* @__PURE__ */ o.jsx(
|
|
1244
|
-
row: (n) => /* @__PURE__ */ o.jsx(
|
|
1245
|
-
select: (n) => /* @__PURE__ */ o.jsx(
|
|
1246
|
-
switch: (n) => /* @__PURE__ */ o.jsx(
|
|
1247
|
-
spacing: (n) => /* @__PURE__ */ o.jsx(
|
|
1248
|
-
table: (n) => /* @__PURE__ */ o.jsx(
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1237
|
+
accordion: (n) => /* @__PURE__ */ o.jsx(Cs, { ...n, userFlow: e, pageId: t }),
|
|
1238
|
+
aiChatPanel: (n) => /* @__PURE__ */ o.jsx(Vt, { ...n, userFlow: e, pageId: t, onResolveProps: s == null ? void 0 : s.aiChatPanel }),
|
|
1239
|
+
aiSummaryCard: (n) => /* @__PURE__ */ o.jsx(Wt, { ...n, userFlow: e, pageId: t, onResolveProps: s == null ? void 0 : s.aiSummaryCard }),
|
|
1240
|
+
aiPromptCodeEditor: (n) => /* @__PURE__ */ o.jsx(Zt, { ...n, userFlow: e, pageId: t }),
|
|
1241
|
+
breadcrumbs: (n) => /* @__PURE__ */ o.jsx(rn, { ...n, userFlow: e, pageId: t }),
|
|
1242
|
+
button: (n) => /* @__PURE__ */ o.jsx(cn, { ...n, userFlow: e, pageId: t }),
|
|
1243
|
+
cardNotification: (n) => /* @__PURE__ */ o.jsx(dn, { ...n }),
|
|
1244
|
+
chart: (n) => /* @__PURE__ */ o.jsx(On, { ...n, userFlow: e }),
|
|
1245
|
+
checkbox: (n) => /* @__PURE__ */ o.jsx(_n, { ...n, userFlow: e, pageId: t }),
|
|
1246
|
+
code: (n) => /* @__PURE__ */ o.jsx(xn, { ...n, userFlow: e, pageId: t }),
|
|
1247
|
+
divider: (n) => /* @__PURE__ */ o.jsx(wn, { ...n }),
|
|
1248
|
+
drawer: (n) => /* @__PURE__ */ o.jsx(Ss, { ...n, userFlow: e, pageId: t }),
|
|
1249
|
+
heading: (n) => Ut(n),
|
|
1250
|
+
pill: (n) => /* @__PURE__ */ o.jsx(zn, { ...n }),
|
|
1251
|
+
modal: (n) => /* @__PURE__ */ o.jsx(Ln, { ...n, userFlow: e, pageId: t }),
|
|
1252
|
+
roundButton: (n) => /* @__PURE__ */ o.jsx(Mn, { ...n, userFlow: e, pageId: t }),
|
|
1253
|
+
row: (n) => /* @__PURE__ */ o.jsx(Un, { ...n, userFlow: e, pageId: t }),
|
|
1254
|
+
select: (n) => /* @__PURE__ */ o.jsx(Qn, { ...n, userFlow: e, pageId: t }),
|
|
1255
|
+
switch: (n) => /* @__PURE__ */ o.jsx(cs, { ...n, userFlow: e, pageId: t }),
|
|
1256
|
+
spacing: (n) => /* @__PURE__ */ o.jsx(rs, { ...n, userFlow: e, pageId: t }),
|
|
1257
|
+
table: (n) => /* @__PURE__ */ o.jsx(us, { ...n, userFlow: e, pageId: t }),
|
|
1258
|
+
tabs: (n) => /* @__PURE__ */ o.jsx(ys, { ...n, userFlow: e, pageId: t }),
|
|
1259
|
+
text: (n) => Jt(n),
|
|
1260
|
+
textField: (n) => /* @__PURE__ */ o.jsx(bs, { ...n, userFlow: e, pageId: t }),
|
|
1261
|
+
toast: (n) => /* @__PURE__ */ o.jsx(ps, { ...n, userFlow: e, pageId: t })
|
|
1252
1262
|
};
|
|
1253
|
-
return (l =
|
|
1263
|
+
return (l = a == null ? void 0 : a.filter(Boolean)) == null ? void 0 : l.map((n) => {
|
|
1254
1264
|
const d = i[n.component];
|
|
1255
1265
|
return d ? d({ ...n, userFlow: e, pageId: t }) : null;
|
|
1256
1266
|
});
|
|
1257
|
-
},
|
|
1258
|
-
modalContent:
|
|
1259
|
-
},
|
|
1267
|
+
}, Rn = "_modalContent_p06ci_1", Dn = {
|
|
1268
|
+
modalContent: Rn
|
|
1269
|
+
}, Ln = ({
|
|
1260
1270
|
userFlow: e,
|
|
1261
1271
|
pageId: t,
|
|
1262
|
-
responseKey:
|
|
1263
|
-
header:
|
|
1272
|
+
responseKey: a,
|
|
1273
|
+
header: s,
|
|
1264
1274
|
body: i,
|
|
1265
1275
|
footer: c,
|
|
1266
1276
|
headerStatusColor: l,
|
|
1267
1277
|
...n
|
|
1268
1278
|
}) => {
|
|
1269
|
-
const d = v((
|
|
1279
|
+
const d = v((y) => {
|
|
1270
1280
|
var g;
|
|
1271
|
-
return (g =
|
|
1272
|
-
}), r = v((
|
|
1281
|
+
return (g = y[e]) == null ? void 0 : g.isModalOpen;
|
|
1282
|
+
}), r = v((y) => {
|
|
1273
1283
|
var g;
|
|
1274
|
-
return (g =
|
|
1284
|
+
return (g = y[e]) == null ? void 0 : g.isLoading;
|
|
1275
1285
|
}), u = d && !r, f = {
|
|
1276
1286
|
...n
|
|
1277
1287
|
}, _ = (f == null ? void 0 : f.headerStatusColor) ?? l, h = D(() => {
|
|
1278
1288
|
xe(e), ge(e, !1);
|
|
1279
|
-
}, [e,
|
|
1289
|
+
}, [e, a]), j = Array.isArray(s) ? O(e, t, s) : s, m = O(e, t, i), x = O(e, t, c);
|
|
1280
1290
|
return /* @__PURE__ */ o.jsx(
|
|
1281
1291
|
tt,
|
|
1282
1292
|
{
|
|
1283
1293
|
...f,
|
|
1284
1294
|
headerStatusColor: _,
|
|
1285
|
-
header: typeof j == "string" ? j : /* @__PURE__ */ o.jsx(o.Fragment, { children: j.map((
|
|
1286
|
-
children: /* @__PURE__ */ o.jsx("section", { className:
|
|
1287
|
-
actions: /* @__PURE__ */ o.jsx(o.Fragment, { children: x.map((
|
|
1295
|
+
header: typeof j == "string" ? j : /* @__PURE__ */ o.jsx(o.Fragment, { children: j.map((y, g) => /* @__PURE__ */ o.jsx(A, { children: y }, `modal-header-${g}`)) }),
|
|
1296
|
+
children: /* @__PURE__ */ o.jsx("section", { className: Dn.modalContent, children: m.map((y, g) => /* @__PURE__ */ o.jsx(A, { children: y }, `modal-body-${g}`)) }),
|
|
1297
|
+
actions: /* @__PURE__ */ o.jsx(o.Fragment, { children: x.map((y, g) => /* @__PURE__ */ o.jsx(A, { children: y }, `modal-footer-${g}`)) }),
|
|
1288
1298
|
open: u,
|
|
1289
1299
|
onClose: h
|
|
1290
1300
|
}
|
|
1291
1301
|
);
|
|
1292
|
-
},
|
|
1302
|
+
}, Bn = ({ userFlow: e, pageId: t }) => {
|
|
1293
1303
|
var c, l;
|
|
1294
|
-
const
|
|
1295
|
-
if (!
|
|
1304
|
+
const a = Lt(e);
|
|
1305
|
+
if (!a)
|
|
1296
1306
|
return null;
|
|
1297
|
-
const
|
|
1298
|
-
...(
|
|
1299
|
-
...((c =
|
|
1300
|
-
...((l =
|
|
1301
|
-
], i =
|
|
1307
|
+
const s = [
|
|
1308
|
+
...(a == null ? void 0 : a.components) || [],
|
|
1309
|
+
...((c = a == null ? void 0 : a.header) == null ? void 0 : c.components) || [],
|
|
1310
|
+
...((l = a == null ? void 0 : a.body) == null ? void 0 : l.components) || []
|
|
1311
|
+
], i = O(
|
|
1302
1312
|
e,
|
|
1303
1313
|
t,
|
|
1304
|
-
|
|
1314
|
+
s
|
|
1305
1315
|
);
|
|
1306
1316
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: i == null ? void 0 : i.map((n, d) => {
|
|
1307
|
-
const r = `overlay-${d}-${
|
|
1308
|
-
return /* @__PURE__ */ o.jsx(
|
|
1317
|
+
const r = `overlay-${d}-${a == null ? void 0 : a.hash}`;
|
|
1318
|
+
return /* @__PURE__ */ o.jsx(A, { children: n }, r);
|
|
1309
1319
|
}) });
|
|
1310
|
-
},
|
|
1320
|
+
}, In = {
|
|
1311
1321
|
success: {
|
|
1312
1322
|
color: "success-opacity",
|
|
1313
1323
|
textColor: "success-60",
|
|
@@ -1333,20 +1343,20 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1333
1343
|
textColor: "neutral-70",
|
|
1334
1344
|
iconColor: "neutral-70"
|
|
1335
1345
|
}
|
|
1336
|
-
},
|
|
1337
|
-
const { content: t, variant:
|
|
1338
|
-
...
|
|
1346
|
+
}, zn = (e) => {
|
|
1347
|
+
const { content: t, variant: a = "neutral", ...s } = e, i = In[a], c = {
|
|
1348
|
+
...s,
|
|
1339
1349
|
children: t,
|
|
1340
|
-
color: (
|
|
1341
|
-
textColor: (
|
|
1342
|
-
iconColor: (
|
|
1350
|
+
color: (s == null ? void 0 : s.color) ?? i.color,
|
|
1351
|
+
textColor: (s == null ? void 0 : s.textColor) ?? i.textColor,
|
|
1352
|
+
iconColor: (s == null ? void 0 : s.iconColor) ?? i.iconColor
|
|
1343
1353
|
};
|
|
1344
|
-
return /* @__PURE__ */ o.jsx(
|
|
1345
|
-
},
|
|
1354
|
+
return /* @__PURE__ */ o.jsx(he, { ...c });
|
|
1355
|
+
}, Mn = (e) => {
|
|
1346
1356
|
const {
|
|
1347
1357
|
userFlow: t,
|
|
1348
|
-
pageId:
|
|
1349
|
-
responseKey:
|
|
1358
|
+
pageId: a,
|
|
1359
|
+
responseKey: s,
|
|
1350
1360
|
actionType: i,
|
|
1351
1361
|
dataSource: c,
|
|
1352
1362
|
dependencies: l,
|
|
@@ -1358,32 +1368,32 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1358
1368
|
), _ = {
|
|
1359
1369
|
...d
|
|
1360
1370
|
}, h = (_ == null ? void 0 : _.disabled) ?? f, j = D(async () => {
|
|
1361
|
-
var
|
|
1371
|
+
var m;
|
|
1362
1372
|
try {
|
|
1363
1373
|
const x = {
|
|
1364
|
-
...(
|
|
1365
|
-
[
|
|
1374
|
+
...(m = v.getState()[t]) == null ? void 0 : m.entries,
|
|
1375
|
+
[s]: { status: 200 }
|
|
1366
1376
|
};
|
|
1367
1377
|
switch (L(t, x), i) {
|
|
1368
1378
|
case "GO_TO_NEXT_UI": {
|
|
1369
|
-
const
|
|
1379
|
+
const y = await r(
|
|
1370
1380
|
t,
|
|
1371
|
-
|
|
1381
|
+
a,
|
|
1372
1382
|
x,
|
|
1373
|
-
|
|
1383
|
+
s
|
|
1374
1384
|
);
|
|
1375
|
-
|
|
1385
|
+
y != null && y.data && T(t, y == null ? void 0 : y.data);
|
|
1376
1386
|
break;
|
|
1377
1387
|
}
|
|
1378
1388
|
case "FETCH_AND_GO_TO_NEXT_UI": {
|
|
1379
|
-
const
|
|
1389
|
+
const y = await u(
|
|
1380
1390
|
t,
|
|
1381
|
-
s,
|
|
1382
|
-
x,
|
|
1383
1391
|
a,
|
|
1392
|
+
x,
|
|
1393
|
+
s,
|
|
1384
1394
|
c
|
|
1385
1395
|
);
|
|
1386
|
-
|
|
1396
|
+
y != null && y.data && T(t, y == null ? void 0 : y.data);
|
|
1387
1397
|
break;
|
|
1388
1398
|
}
|
|
1389
1399
|
case "CLOSE_MODAL":
|
|
@@ -1402,7 +1412,7 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1402
1412
|
} catch (x) {
|
|
1403
1413
|
alert(JSON.stringify(x));
|
|
1404
1414
|
}
|
|
1405
|
-
}, [i, c,
|
|
1415
|
+
}, [i, c, a, s, t]);
|
|
1406
1416
|
return /* @__PURE__ */ o.jsx(
|
|
1407
1417
|
nt,
|
|
1408
1418
|
{
|
|
@@ -1411,8 +1421,8 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1411
1421
|
onClick: () => !h && (n ?? j)()
|
|
1412
1422
|
}
|
|
1413
1423
|
);
|
|
1414
|
-
},
|
|
1415
|
-
row:
|
|
1424
|
+
}, Kn = "_row_1bqj4_1", Gn = "_row_column_1bqj4_65", J = {
|
|
1425
|
+
row: Kn,
|
|
1416
1426
|
"row__gap-none": "_row__gap-none_1bqj4_5",
|
|
1417
1427
|
"row__gap-xxs": "_row__gap-xxs_1bqj4_8",
|
|
1418
1428
|
"row__gap-xs": "_row__gap-xs_1bqj4_11",
|
|
@@ -1433,7 +1443,7 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1433
1443
|
"row__align-center": "_row__align-center_1bqj4_56",
|
|
1434
1444
|
"row__align-stretch": "_row__align-stretch_1bqj4_59",
|
|
1435
1445
|
"row__align-baseline": "_row__align-baseline_1bqj4_62",
|
|
1436
|
-
row_column:
|
|
1446
|
+
row_column: Gn,
|
|
1437
1447
|
"row_column__gap-none": "_row_column__gap-none_1bqj4_72",
|
|
1438
1448
|
"row_column__gap-xxs": "_row_column__gap-xxs_1bqj4_75",
|
|
1439
1449
|
"row_column__gap-xs": "_row_column__gap-xs_1bqj4_78",
|
|
@@ -1454,11 +1464,11 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1454
1464
|
"row_column__align-center": "_row_column__align-center_1bqj4_123",
|
|
1455
1465
|
"row_column__align-stretch": "_row_column__align-stretch_1bqj4_126",
|
|
1456
1466
|
"row_column__align-baseline": "_row_column__align-baseline_1bqj4_129"
|
|
1457
|
-
},
|
|
1467
|
+
}, Un = (e) => {
|
|
1458
1468
|
const {
|
|
1459
1469
|
userFlow: t,
|
|
1460
|
-
pageId:
|
|
1461
|
-
columnWidth:
|
|
1470
|
+
pageId: a,
|
|
1471
|
+
columnWidth: s,
|
|
1462
1472
|
columns: i,
|
|
1463
1473
|
gap: c = "md",
|
|
1464
1474
|
justifyContent: l = "start",
|
|
@@ -1494,7 +1504,7 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1494
1504
|
J[`row__align-${n}`]
|
|
1495
1505
|
),
|
|
1496
1506
|
children: d == null ? void 0 : d.map((r, u) => {
|
|
1497
|
-
const f = (
|
|
1507
|
+
const f = (s == null ? void 0 : s[u]) || `${100 / d.length}%`, _ = O(t, a, r.items);
|
|
1498
1508
|
return !_ || _.length === 0 ? null : /* @__PURE__ */ o.jsx(
|
|
1499
1509
|
"div",
|
|
1500
1510
|
{
|
|
@@ -1516,8 +1526,8 @@ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
|
|
|
1516
1526
|
function Me({
|
|
1517
1527
|
userFlow: e,
|
|
1518
1528
|
pageId: t,
|
|
1519
|
-
responseKey:
|
|
1520
|
-
actionType:
|
|
1529
|
+
responseKey: a,
|
|
1530
|
+
actionType: s,
|
|
1521
1531
|
getNextUI: i,
|
|
1522
1532
|
isMulti: c = !1,
|
|
1523
1533
|
debounceMs: l
|
|
@@ -1531,23 +1541,23 @@ function Me({
|
|
|
1531
1541
|
var h;
|
|
1532
1542
|
const f = {
|
|
1533
1543
|
...(h = v.getState()[e]) == null ? void 0 : h.entries,
|
|
1534
|
-
[
|
|
1544
|
+
[a]: u
|
|
1535
1545
|
};
|
|
1536
|
-
if (L(e, f),
|
|
1546
|
+
if (L(e, f), s && (s === "GO_TO_NEXT_UI" || s === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
|
|
1537
1547
|
try {
|
|
1538
|
-
const
|
|
1548
|
+
const m = await i(
|
|
1539
1549
|
e,
|
|
1540
1550
|
t,
|
|
1541
1551
|
f,
|
|
1542
|
-
|
|
1543
|
-
|
|
1552
|
+
a,
|
|
1553
|
+
s === "GO_TO_NEXT_UI"
|
|
1544
1554
|
);
|
|
1545
|
-
|
|
1555
|
+
m != null && m.data && T(e, m.data);
|
|
1546
1556
|
} catch (j) {
|
|
1547
1557
|
console.error("[useSelectChange] Failed to fetch next UI", j);
|
|
1548
1558
|
}
|
|
1549
1559
|
},
|
|
1550
|
-
[e, t,
|
|
1560
|
+
[e, t, a, s, i]
|
|
1551
1561
|
);
|
|
1552
1562
|
return D(
|
|
1553
1563
|
(u) => {
|
|
@@ -1566,22 +1576,22 @@ function Me({
|
|
|
1566
1576
|
[c, l, d]
|
|
1567
1577
|
);
|
|
1568
1578
|
}
|
|
1569
|
-
const
|
|
1579
|
+
const Jn = (e, t, a, s) => {
|
|
1570
1580
|
const i = B.query(e, t);
|
|
1571
1581
|
return (i == null ? void 0 : i.map((c) => {
|
|
1572
1582
|
var d, r;
|
|
1573
|
-
const l = (d = B.query(c,
|
|
1583
|
+
const l = (d = B.query(c, a)) == null ? void 0 : d[0], n = s ? (r = B.query(c, s)) == null ? void 0 : r[0] : c;
|
|
1574
1584
|
return { label: l, value: n };
|
|
1575
1585
|
})) ?? [];
|
|
1576
|
-
},
|
|
1586
|
+
}, Vn = (e, t, a, s = 10) => {
|
|
1577
1587
|
var n, d;
|
|
1578
1588
|
let i, c;
|
|
1579
|
-
if (
|
|
1580
|
-
const r = B.value(e,
|
|
1589
|
+
if (a) {
|
|
1590
|
+
const r = B.value(e, a.size ?? "$.meta.size") ?? s, u = B.value(e, a.total ?? "$.meta.total") ?? 0;
|
|
1581
1591
|
i = r, c = u;
|
|
1582
1592
|
} else {
|
|
1583
1593
|
const r = e == null ? void 0 : e.meta;
|
|
1584
|
-
i = (r == null ? void 0 : r.size) ?? ((n = r == null ? void 0 : r.page) == null ? void 0 : n.size) ??
|
|
1594
|
+
i = (r == null ? void 0 : r.size) ?? ((n = r == null ? void 0 : r.page) == null ? void 0 : n.size) ?? s, c = (r == null ? void 0 : r.total) ?? ((d = r == null ? void 0 : r.page) == null ? void 0 : d.total) ?? 0;
|
|
1585
1595
|
}
|
|
1586
1596
|
const l = c > 0 ? Math.ceil(c / i) > t : !1;
|
|
1587
1597
|
return {
|
|
@@ -1589,13 +1599,13 @@ const Un = (e, t, s, a) => {
|
|
|
1589
1599
|
total: c,
|
|
1590
1600
|
hasMore: l
|
|
1591
1601
|
};
|
|
1592
|
-
},
|
|
1593
|
-
selectNotFront:
|
|
1594
|
-
},
|
|
1602
|
+
}, Hn = "_selectNotFront_1yw9q_1", Ke = {
|
|
1603
|
+
selectNotFront: Hn
|
|
1604
|
+
}, Xn = ({
|
|
1595
1605
|
userFlow: e,
|
|
1596
1606
|
pageId: t,
|
|
1597
|
-
responseKey:
|
|
1598
|
-
required:
|
|
1607
|
+
responseKey: a,
|
|
1608
|
+
required: s,
|
|
1599
1609
|
dataSource: i,
|
|
1600
1610
|
actionType: c,
|
|
1601
1611
|
dependencies: l,
|
|
@@ -1604,19 +1614,19 @@ const Un = (e, t, s, a) => {
|
|
|
1604
1614
|
}) => {
|
|
1605
1615
|
const r = {
|
|
1606
1616
|
...d
|
|
1607
|
-
}, { getNextUI: u, fetchDataSource: f } = I(), [_, h] =
|
|
1617
|
+
}, { getNextUI: u, fetchDataSource: f } = I(), [_, h] = q((r == null ? void 0 : r.value) ?? ""), { disabled: j } = M(
|
|
1608
1618
|
e,
|
|
1609
1619
|
l
|
|
1610
|
-
),
|
|
1620
|
+
), m = (r == null ? void 0 : r.disabled) ?? j, x = S(() => s && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, s]), y = S(() => {
|
|
1611
1621
|
const b = r != null && r.isMulti ? _ : [_], C = {};
|
|
1612
1622
|
return typeof b == "object" && "length" in b && (b == null || b.forEach((w) => {
|
|
1613
|
-
const E = JSON.stringify(w.value),
|
|
1614
|
-
C[E] = w,
|
|
1623
|
+
const E = JSON.stringify(w.value), $ = JSON.stringify(w.label);
|
|
1624
|
+
C[E] = w, $ in C || (C[$] = w);
|
|
1615
1625
|
})), C;
|
|
1616
1626
|
}, [_]), g = Me({
|
|
1617
1627
|
userFlow: e,
|
|
1618
1628
|
pageId: t,
|
|
1619
|
-
responseKey:
|
|
1629
|
+
responseKey: a,
|
|
1620
1630
|
actionType: c,
|
|
1621
1631
|
getNextUI: u,
|
|
1622
1632
|
isMulti: r == null ? void 0 : r.isMulti,
|
|
@@ -1626,24 +1636,24 @@ const Un = (e, t, s, a) => {
|
|
|
1626
1636
|
}, N = async (b, C, { page: w }) => {
|
|
1627
1637
|
const {
|
|
1628
1638
|
jsonPathLabel: E,
|
|
1629
|
-
jsonPathOptions:
|
|
1630
|
-
jsonPathValue:
|
|
1639
|
+
jsonPathOptions: $,
|
|
1640
|
+
jsonPathValue: k,
|
|
1631
1641
|
jsonPathPagination: G
|
|
1632
1642
|
} = i, U = be(
|
|
1633
1643
|
i,
|
|
1634
1644
|
w,
|
|
1635
1645
|
b
|
|
1636
|
-
),
|
|
1646
|
+
), re = await f(
|
|
1637
1647
|
U,
|
|
1638
1648
|
e,
|
|
1639
1649
|
!1
|
|
1640
|
-
),
|
|
1641
|
-
|
|
1642
|
-
|
|
1650
|
+
), ce = re == null ? void 0 : re.data, Ue = ce ? Jn(
|
|
1651
|
+
ce,
|
|
1652
|
+
$,
|
|
1643
1653
|
E,
|
|
1644
|
-
|
|
1645
|
-
) : [], { hasMore: Je } =
|
|
1646
|
-
|
|
1654
|
+
k
|
|
1655
|
+
) : [], { hasMore: Je } = Vn(
|
|
1656
|
+
ce,
|
|
1647
1657
|
w,
|
|
1648
1658
|
G
|
|
1649
1659
|
);
|
|
@@ -1656,29 +1666,29 @@ const Un = (e, t, s, a) => {
|
|
|
1656
1666
|
};
|
|
1657
1667
|
};
|
|
1658
1668
|
return /* @__PURE__ */ o.jsx(
|
|
1659
|
-
|
|
1669
|
+
st,
|
|
1660
1670
|
{
|
|
1661
1671
|
...r,
|
|
1662
1672
|
className: Ke.selectNotFront,
|
|
1663
1673
|
label: x,
|
|
1664
1674
|
value: _,
|
|
1665
|
-
disabled:
|
|
1675
|
+
disabled: m,
|
|
1666
1676
|
noOptionsMessage: () => /* @__PURE__ */ o.jsx(o.Fragment, { children: "Sin opciones" }),
|
|
1667
|
-
onChange: (b) => !
|
|
1677
|
+
onChange: (b) => !m && p(b),
|
|
1668
1678
|
loadOptions: N,
|
|
1669
1679
|
additional: { page: 1 },
|
|
1670
1680
|
isOptionDisabled: (b) => {
|
|
1671
1681
|
const C = JSON.stringify(b == null ? void 0 : b.value), w = JSON.stringify(b == null ? void 0 : b.label);
|
|
1672
|
-
return !!(
|
|
1682
|
+
return !!(y != null && y[C]) || !!(y != null && y[w]);
|
|
1673
1683
|
},
|
|
1674
1684
|
debounceTimeout: 350
|
|
1675
1685
|
}
|
|
1676
1686
|
);
|
|
1677
|
-
},
|
|
1687
|
+
}, Wn = ({
|
|
1678
1688
|
userFlow: e,
|
|
1679
1689
|
pageId: t,
|
|
1680
|
-
responseKey:
|
|
1681
|
-
dataSource:
|
|
1690
|
+
responseKey: a,
|
|
1691
|
+
dataSource: s,
|
|
1682
1692
|
required: i,
|
|
1683
1693
|
actionType: c,
|
|
1684
1694
|
dependencies: l,
|
|
@@ -1687,52 +1697,52 @@ const Un = (e, t, s, a) => {
|
|
|
1687
1697
|
}) => {
|
|
1688
1698
|
const r = {
|
|
1689
1699
|
...d
|
|
1690
|
-
}, { getNextUI: u } = I(), [f, _] =
|
|
1700
|
+
}, { getNextUI: u } = I(), [f, _] = q(r.value || ""), { disabled: h } = M(
|
|
1691
1701
|
e,
|
|
1692
1702
|
l
|
|
1693
|
-
), j = (r == null ? void 0 : r.disabled) ?? h,
|
|
1703
|
+
), j = (r == null ? void 0 : r.disabled) ?? h, m = S(() => i && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, i]), x = Me({
|
|
1694
1704
|
userFlow: e,
|
|
1695
1705
|
pageId: t,
|
|
1696
|
-
responseKey:
|
|
1706
|
+
responseKey: a,
|
|
1697
1707
|
actionType: c,
|
|
1698
1708
|
getNextUI: u,
|
|
1699
1709
|
isMulti: r == null ? void 0 : r.isMulti,
|
|
1700
1710
|
debounceMs: n
|
|
1701
|
-
}),
|
|
1711
|
+
}), y = (g) => {
|
|
1702
1712
|
_(g), x(g);
|
|
1703
1713
|
};
|
|
1704
1714
|
return /* @__PURE__ */ o.jsx(
|
|
1705
|
-
|
|
1715
|
+
at,
|
|
1706
1716
|
{
|
|
1707
1717
|
...r,
|
|
1708
1718
|
className: Ke.selectNotFront,
|
|
1709
|
-
label:
|
|
1719
|
+
label: m,
|
|
1710
1720
|
value: f,
|
|
1711
1721
|
disabled: j,
|
|
1712
|
-
onChange: (g) => !j &&
|
|
1722
|
+
onChange: (g) => !j && y(g)
|
|
1713
1723
|
}
|
|
1714
1724
|
);
|
|
1715
|
-
},
|
|
1725
|
+
}, Qn = (e) => {
|
|
1716
1726
|
const { dataSource: t } = e;
|
|
1717
|
-
return t ? /* @__PURE__ */ o.jsx(
|
|
1718
|
-
},
|
|
1719
|
-
spacing:
|
|
1720
|
-
spacing__xxs:
|
|
1721
|
-
spacing__xs:
|
|
1722
|
-
spacing__sm:
|
|
1723
|
-
spacing__md:
|
|
1724
|
-
spacing__lg:
|
|
1725
|
-
spacing__xl:
|
|
1726
|
-
spacing__xxl:
|
|
1727
|
-
spacing__xxxl:
|
|
1728
|
-
},
|
|
1729
|
-
const { size: t } = e,
|
|
1730
|
-
return /* @__PURE__ */ o.jsx("div", { className:
|
|
1731
|
-
},
|
|
1727
|
+
return t ? /* @__PURE__ */ o.jsx(Xn, { ...e }) : /* @__PURE__ */ o.jsx(Wn, { ...e });
|
|
1728
|
+
}, Yn = "_spacing_19hqa_1", Zn = "_spacing__xxs_19hqa_1", Fn = "_spacing__xs_19hqa_4", Pn = "_spacing__sm_19hqa_7", es = "_spacing__md_19hqa_10", ts = "_spacing__lg_19hqa_13", ns = "_spacing__xl_19hqa_16", ss = "_spacing__xxl_19hqa_19", as = "_spacing__xxxl_19hqa_22", Ae = {
|
|
1729
|
+
spacing: Yn,
|
|
1730
|
+
spacing__xxs: Zn,
|
|
1731
|
+
spacing__xs: Fn,
|
|
1732
|
+
spacing__sm: Pn,
|
|
1733
|
+
spacing__md: es,
|
|
1734
|
+
spacing__lg: ts,
|
|
1735
|
+
spacing__xl: ns,
|
|
1736
|
+
spacing__xxl: ss,
|
|
1737
|
+
spacing__xxxl: as
|
|
1738
|
+
}, rs = (e) => {
|
|
1739
|
+
const { size: t } = e, a = ee(Ae.spacing, Ae[`spacing__${t}`]);
|
|
1740
|
+
return /* @__PURE__ */ o.jsx("div", { className: a });
|
|
1741
|
+
}, cs = (e) => {
|
|
1732
1742
|
const {
|
|
1733
1743
|
userFlow: t,
|
|
1734
|
-
pageId:
|
|
1735
|
-
responseKey:
|
|
1744
|
+
pageId: a,
|
|
1745
|
+
responseKey: s,
|
|
1736
1746
|
actionType: i,
|
|
1737
1747
|
label: c,
|
|
1738
1748
|
value: l,
|
|
@@ -1741,27 +1751,27 @@ const Un = (e, t, s, a) => {
|
|
|
1741
1751
|
...r
|
|
1742
1752
|
} = e, u = {
|
|
1743
1753
|
...r
|
|
1744
|
-
}, { getNextUI: f } = I(), [_, h] =
|
|
1754
|
+
}, { getNextUI: f } = I(), [_, h] = q(l || !1), { disabled: j } = M(
|
|
1745
1755
|
t,
|
|
1746
1756
|
d
|
|
1747
|
-
),
|
|
1757
|
+
), m = (u == null ? void 0 : u.disabled) ?? j, x = S(() => n && c ? `${c} *` : c ?? "", [c, n]), y = D(async () => {
|
|
1748
1758
|
var g;
|
|
1749
1759
|
try {
|
|
1750
1760
|
const p = !_;
|
|
1751
1761
|
h(p);
|
|
1752
1762
|
const N = {
|
|
1753
1763
|
...(g = v.getState()[t]) == null ? void 0 : g.entries,
|
|
1754
|
-
[
|
|
1764
|
+
[s]: p
|
|
1755
1765
|
};
|
|
1756
1766
|
switch (L(t, N), i) {
|
|
1757
1767
|
case "GO_TO_NEXT_UI":
|
|
1758
1768
|
const b = await f(
|
|
1759
1769
|
t,
|
|
1760
|
-
|
|
1770
|
+
a,
|
|
1761
1771
|
N,
|
|
1762
|
-
|
|
1772
|
+
s
|
|
1763
1773
|
);
|
|
1764
|
-
b != null && b.data &&
|
|
1774
|
+
b != null && b.data && T(t, b == null ? void 0 : b.data);
|
|
1765
1775
|
break;
|
|
1766
1776
|
default:
|
|
1767
1777
|
console.warn(`Unhandled actionType: ${i}`);
|
|
@@ -1770,38 +1780,38 @@ const Un = (e, t, s, a) => {
|
|
|
1770
1780
|
} catch (p) {
|
|
1771
1781
|
console.error("Error in switch action:", p), alert(JSON.stringify(p));
|
|
1772
1782
|
}
|
|
1773
|
-
}, [t,
|
|
1783
|
+
}, [t, a, s, i, _]);
|
|
1774
1784
|
return /* @__PURE__ */ o.jsx(
|
|
1775
1785
|
rt,
|
|
1776
1786
|
{
|
|
1777
1787
|
...u,
|
|
1778
1788
|
label: x,
|
|
1779
1789
|
checked: _,
|
|
1780
|
-
disabled:
|
|
1781
|
-
onChange: () => !
|
|
1790
|
+
disabled: m,
|
|
1791
|
+
onChange: () => !m && y()
|
|
1782
1792
|
}
|
|
1783
1793
|
);
|
|
1784
|
-
},
|
|
1785
|
-
tableSkeleton:
|
|
1786
|
-
tableArrayPills:
|
|
1787
|
-
},
|
|
1788
|
-
const
|
|
1794
|
+
}, os = "_tableSkeleton_3nr9n_1", is = "_tableArrayPills_3nr9n_7", Ge = {
|
|
1795
|
+
tableSkeleton: os,
|
|
1796
|
+
tableArrayPills: is
|
|
1797
|
+
}, ls = ({ values: e }) => {
|
|
1798
|
+
const a = e == null ? void 0 : e.slice(0, 4), s = (e == null ? void 0 : e.length) - 4;
|
|
1789
1799
|
return /* @__PURE__ */ o.jsxs("div", { className: Ge.tableArrayPills, children: [
|
|
1790
|
-
|
|
1791
|
-
|
|
1800
|
+
a.map((i, c) => /* @__PURE__ */ o.jsx(he, { children: String(i) }, c)),
|
|
1801
|
+
s > 0 && /* @__PURE__ */ o.jsxs(he, { outlined: !0, children: [
|
|
1792
1802
|
"+",
|
|
1793
|
-
|
|
1803
|
+
s
|
|
1794
1804
|
] })
|
|
1795
1805
|
] });
|
|
1796
|
-
},
|
|
1806
|
+
}, ds = ({
|
|
1797
1807
|
userFlow: e,
|
|
1798
1808
|
pageId: t,
|
|
1799
|
-
tableResponseKey:
|
|
1800
|
-
component:
|
|
1809
|
+
tableResponseKey: a,
|
|
1810
|
+
component: s,
|
|
1801
1811
|
rowData: i
|
|
1802
1812
|
}) => {
|
|
1803
|
-
const { getNextUI: c, fetchAndGetNextUI: l, fetchDataSource: n } = I(), d =
|
|
1804
|
-
{ ...
|
|
1813
|
+
const { getNextUI: c, fetchAndGetNextUI: l, fetchDataSource: n } = I(), d = O(e, t, [
|
|
1814
|
+
{ ...s }
|
|
1805
1815
|
]), r = (d == null ? void 0 : d[0]) || null;
|
|
1806
1816
|
if (!r) return null;
|
|
1807
1817
|
const {
|
|
@@ -1809,42 +1819,42 @@ const Un = (e, t, s, a) => {
|
|
|
1809
1819
|
responseKey: f,
|
|
1810
1820
|
dataSource: _
|
|
1811
1821
|
} = r.props, h = D(async () => {
|
|
1812
|
-
var j,
|
|
1822
|
+
var j, m, x;
|
|
1813
1823
|
try {
|
|
1814
|
-
const
|
|
1824
|
+
const y = {
|
|
1815
1825
|
...(j = v.getState()[e]) == null ? void 0 : j.entries,
|
|
1816
1826
|
[f]: { status: 200 },
|
|
1817
|
-
[
|
|
1827
|
+
[a]: [{ ...i }]
|
|
1818
1828
|
};
|
|
1819
|
-
switch (L(e,
|
|
1829
|
+
switch (L(e, y), u) {
|
|
1820
1830
|
case "GO_TO_NEXT_UI": {
|
|
1821
1831
|
const g = await c(
|
|
1822
1832
|
e,
|
|
1823
1833
|
t,
|
|
1824
|
-
|
|
1834
|
+
y,
|
|
1825
1835
|
f
|
|
1826
1836
|
);
|
|
1827
|
-
g != null && g.data &&
|
|
1837
|
+
g != null && g.data && T(e, g == null ? void 0 : g.data);
|
|
1828
1838
|
break;
|
|
1829
1839
|
}
|
|
1830
1840
|
case "FETCH_AND_GO_TO_NEXT_UI": {
|
|
1831
1841
|
const g = await l(
|
|
1832
1842
|
e,
|
|
1833
1843
|
t,
|
|
1834
|
-
|
|
1844
|
+
y,
|
|
1835
1845
|
f,
|
|
1836
1846
|
_
|
|
1837
1847
|
);
|
|
1838
|
-
g != null && g.data &&
|
|
1848
|
+
g != null && g.data && T(e, g == null ? void 0 : g.data);
|
|
1839
1849
|
break;
|
|
1840
1850
|
}
|
|
1841
1851
|
case "GET_DATA_SOURCE": {
|
|
1842
1852
|
const g = await c(
|
|
1843
1853
|
e,
|
|
1844
1854
|
t,
|
|
1845
|
-
|
|
1855
|
+
y,
|
|
1846
1856
|
f
|
|
1847
|
-
), p = (
|
|
1857
|
+
), p = (m = g == null ? void 0 : g.data) == null ? void 0 : m.content;
|
|
1848
1858
|
if ((p == null ? void 0 : p.type) !== "fetch") break;
|
|
1849
1859
|
const N = p == null ? void 0 : p.dataSource, b = await n(
|
|
1850
1860
|
N,
|
|
@@ -1865,21 +1875,21 @@ const Un = (e, t, s, a) => {
|
|
|
1865
1875
|
C,
|
|
1866
1876
|
f
|
|
1867
1877
|
);
|
|
1868
|
-
w != null && w.data &&
|
|
1878
|
+
w != null && w.data && T(e, w == null ? void 0 : w.data);
|
|
1869
1879
|
break;
|
|
1870
1880
|
}
|
|
1871
1881
|
default:
|
|
1872
1882
|
console.warn(`Unhandled actionType: ${u}`);
|
|
1873
1883
|
break;
|
|
1874
1884
|
}
|
|
1875
|
-
} catch (
|
|
1876
|
-
alert(JSON.stringify(
|
|
1885
|
+
} catch (y) {
|
|
1886
|
+
alert(JSON.stringify(y));
|
|
1877
1887
|
}
|
|
1878
1888
|
}, [u, _, t, f, e]);
|
|
1879
1889
|
return We(r, {
|
|
1880
1890
|
onClick: h
|
|
1881
1891
|
});
|
|
1882
|
-
},
|
|
1892
|
+
}, _s = () => /* @__PURE__ */ o.jsx("div", { className: Ge.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ o.jsx(
|
|
1883
1893
|
De,
|
|
1884
1894
|
{
|
|
1885
1895
|
maxWidth: "100%",
|
|
@@ -1887,39 +1897,39 @@ const Un = (e, t, s, a) => {
|
|
|
1887
1897
|
radius: 8
|
|
1888
1898
|
},
|
|
1889
1899
|
`tableSkeletonBase${t}`
|
|
1890
|
-
)) }),
|
|
1900
|
+
)) }), us = ({
|
|
1891
1901
|
userFlow: e,
|
|
1892
1902
|
pageId: t,
|
|
1893
|
-
responseKey:
|
|
1894
|
-
component:
|
|
1903
|
+
responseKey: a,
|
|
1904
|
+
component: s,
|
|
1895
1905
|
dataSource: i,
|
|
1896
1906
|
rightActions: c,
|
|
1897
1907
|
...l
|
|
1898
1908
|
}) => {
|
|
1899
1909
|
var p, N, b;
|
|
1900
|
-
const { fetchDataSource: n } = I(), [d, r] =
|
|
1910
|
+
const { fetchDataSource: n } = I(), [d, r] = q(!1), [u, f] = q(1), [_, h] = q(null), j = S(() => {
|
|
1901
1911
|
if (c != null && c.length)
|
|
1902
1912
|
return c.map((C, w) => ({
|
|
1903
1913
|
renderContent: (E) => /* @__PURE__ */ o.jsx(
|
|
1904
|
-
|
|
1914
|
+
ds,
|
|
1905
1915
|
{
|
|
1906
1916
|
userFlow: e,
|
|
1907
1917
|
pageId: t,
|
|
1908
|
-
tableResponseKey:
|
|
1918
|
+
tableResponseKey: a,
|
|
1909
1919
|
component: C,
|
|
1910
1920
|
rowData: E
|
|
1911
1921
|
},
|
|
1912
1922
|
`tableRowAction${w}`
|
|
1913
1923
|
)
|
|
1914
1924
|
}));
|
|
1915
|
-
}, [c, e, t]),
|
|
1925
|
+
}, [c, e, t]), m = async (C = 1) => {
|
|
1916
1926
|
try {
|
|
1917
1927
|
r(!0);
|
|
1918
|
-
const { jsonPathData: w, mapperData: E, jsonPathPagination:
|
|
1928
|
+
const { jsonPathData: w, mapperData: E, jsonPathPagination: $ } = i, k = be(
|
|
1919
1929
|
i,
|
|
1920
1930
|
C
|
|
1921
1931
|
), G = await n(
|
|
1922
|
-
|
|
1932
|
+
k,
|
|
1923
1933
|
e,
|
|
1924
1934
|
!1
|
|
1925
1935
|
);
|
|
@@ -1928,36 +1938,36 @@ const Un = (e, t, s, a) => {
|
|
|
1928
1938
|
G == null ? void 0 : G.data,
|
|
1929
1939
|
w,
|
|
1930
1940
|
E,
|
|
1931
|
-
|
|
1941
|
+
$
|
|
1932
1942
|
)
|
|
1933
1943
|
), r(!1);
|
|
1934
1944
|
} catch (w) {
|
|
1935
1945
|
alert(JSON.stringify(w)), r(!1);
|
|
1936
1946
|
}
|
|
1937
1947
|
}, x = (C) => {
|
|
1938
|
-
f(C),
|
|
1948
|
+
f(C), m(C);
|
|
1939
1949
|
};
|
|
1940
1950
|
K(() => {
|
|
1941
|
-
|
|
1951
|
+
m();
|
|
1942
1952
|
}, []);
|
|
1943
|
-
const
|
|
1953
|
+
const y = S(() => !(_ != null && _.items) || !(l != null && l.columns) ? l == null ? void 0 : l.columns : l.columns.map((C) => {
|
|
1944
1954
|
var E;
|
|
1945
1955
|
return ((E = _ == null ? void 0 : _.items) == null ? void 0 : E.some(
|
|
1946
|
-
(
|
|
1956
|
+
($) => Array.isArray(C != null && C.accessor ? $[C == null ? void 0 : C.accessor] : void 0)
|
|
1947
1957
|
)) ? {
|
|
1948
1958
|
...C,
|
|
1949
|
-
renderCell: (
|
|
1950
|
-
const
|
|
1951
|
-
return Array.isArray(
|
|
1959
|
+
renderCell: ($) => {
|
|
1960
|
+
const k = C.accessor ? $[C.accessor] : void 0;
|
|
1961
|
+
return Array.isArray(k) ? /* @__PURE__ */ o.jsx(ls, { values: k }) : k;
|
|
1952
1962
|
}
|
|
1953
1963
|
} : C;
|
|
1954
1964
|
}), [_ == null ? void 0 : _.items, l == null ? void 0 : l.columns]), g = {
|
|
1955
1965
|
...l,
|
|
1956
1966
|
data: _ == null ? void 0 : _.items,
|
|
1957
|
-
columns:
|
|
1967
|
+
columns: y,
|
|
1958
1968
|
rightActions: j
|
|
1959
1969
|
};
|
|
1960
|
-
return /* @__PURE__ */ o.jsx(o.Fragment, { children: d ? /* @__PURE__ */ o.jsx(
|
|
1970
|
+
return /* @__PURE__ */ o.jsx(o.Fragment, { children: d ? /* @__PURE__ */ o.jsx(_s, {}) : _ && ((p = _ == null ? void 0 : _.items) == null ? void 0 : p.length) > 0 ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1961
1971
|
/* @__PURE__ */ o.jsx(ct, { ...g }),
|
|
1962
1972
|
(_ == null ? void 0 : _.pagination) && ((N = _ == null ? void 0 : _.pagination) == null ? void 0 : N.totalPages) > 1 && /* @__PURE__ */ o.jsx(
|
|
1963
1973
|
ot,
|
|
@@ -1969,14 +1979,48 @@ const Un = (e, t, s, a) => {
|
|
|
1969
1979
|
onChange: x
|
|
1970
1980
|
}
|
|
1971
1981
|
)
|
|
1972
|
-
] }) : /* @__PURE__ */ o.jsx(
|
|
1973
|
-
},
|
|
1974
|
-
|
|
1975
|
-
},
|
|
1982
|
+
] }) : /* @__PURE__ */ o.jsx(me, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
|
|
1983
|
+
}, hs = "_tabsPanel_kvslb_1", fs = {
|
|
1984
|
+
tabsPanel: hs
|
|
1985
|
+
}, ms = ({ userFlow: e, pageId: t, components: a }) => {
|
|
1986
|
+
const s = O(e, t, a);
|
|
1987
|
+
return s != null && s.length ? /* @__PURE__ */ o.jsx("section", { className: fs.tabsPanel, children: s.map((i, c) => /* @__PURE__ */ o.jsx(A, { children: i }, `tabs-panel-${c}`)) }) : null;
|
|
1988
|
+
}, ys = ({
|
|
1989
|
+
userFlow: e,
|
|
1990
|
+
pageId: t,
|
|
1991
|
+
hash: a,
|
|
1992
|
+
items: s,
|
|
1993
|
+
activeIndex: i,
|
|
1994
|
+
className: c
|
|
1995
|
+
}) => {
|
|
1996
|
+
const l = s.map((n, d) => ({
|
|
1997
|
+
label: n.label,
|
|
1998
|
+
disabled: n.disabled,
|
|
1999
|
+
children: /* @__PURE__ */ o.jsx(
|
|
2000
|
+
ms,
|
|
2001
|
+
{
|
|
2002
|
+
userFlow: e,
|
|
2003
|
+
pageId: t,
|
|
2004
|
+
components: n.components
|
|
2005
|
+
},
|
|
2006
|
+
`${a}-tab-${d}`
|
|
2007
|
+
)
|
|
2008
|
+
}));
|
|
2009
|
+
return /* @__PURE__ */ o.jsx(
|
|
2010
|
+
it,
|
|
2011
|
+
{
|
|
2012
|
+
className: c,
|
|
2013
|
+
activeIndex: i,
|
|
2014
|
+
items: l
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2017
|
+
}, xs = "_textFieldNotFront_cps4i_1", gs = {
|
|
2018
|
+
textFieldNotFront: xs
|
|
2019
|
+
}, bs = (e) => {
|
|
1976
2020
|
const {
|
|
1977
2021
|
userFlow: t,
|
|
1978
|
-
pageId:
|
|
1979
|
-
component:
|
|
2022
|
+
pageId: a,
|
|
2023
|
+
component: s,
|
|
1980
2024
|
hash: i,
|
|
1981
2025
|
responseKey: c,
|
|
1982
2026
|
required: l,
|
|
@@ -1984,37 +2028,37 @@ const Un = (e, t, s, a) => {
|
|
|
1984
2028
|
...d
|
|
1985
2029
|
} = e, r = {
|
|
1986
2030
|
...d
|
|
1987
|
-
}, [u, f] =
|
|
2031
|
+
}, [u, f] = q((r == null ? void 0 : r.value) ?? ""), { disabled: _ } = M(
|
|
1988
2032
|
t,
|
|
1989
2033
|
n
|
|
1990
|
-
), h = (r == null ? void 0 : r.disabled) ?? _, j = S(() => l && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, l]),
|
|
2034
|
+
), h = (r == null ? void 0 : r.disabled) ?? _, j = S(() => l && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, l]), m = (x) => {
|
|
1991
2035
|
var p;
|
|
1992
|
-
const
|
|
1993
|
-
f(
|
|
2036
|
+
const y = (p = x == null ? void 0 : x.target) == null ? void 0 : p.value;
|
|
2037
|
+
f(y);
|
|
1994
2038
|
const g = {
|
|
1995
|
-
[c]:
|
|
2039
|
+
[c]: y
|
|
1996
2040
|
};
|
|
1997
2041
|
L(t, g);
|
|
1998
2042
|
};
|
|
1999
2043
|
return K(() => {
|
|
2000
2044
|
f((r == null ? void 0 : r.value) ?? "");
|
|
2001
2045
|
}, [r == null ? void 0 : r.value]), /* @__PURE__ */ o.jsx(
|
|
2002
|
-
|
|
2046
|
+
lt,
|
|
2003
2047
|
{
|
|
2004
2048
|
...r,
|
|
2005
|
-
className:
|
|
2049
|
+
className: gs.textFieldNotFront,
|
|
2006
2050
|
allowClear: !1,
|
|
2007
2051
|
label: j,
|
|
2008
2052
|
value: u,
|
|
2009
2053
|
disabled: h,
|
|
2010
|
-
onChange: (x) => !h &&
|
|
2054
|
+
onChange: (x) => !h && m(x)
|
|
2011
2055
|
}
|
|
2012
2056
|
);
|
|
2013
|
-
},
|
|
2057
|
+
}, ps = ({
|
|
2014
2058
|
userFlow: e,
|
|
2015
2059
|
pageId: t,
|
|
2016
|
-
responseKey:
|
|
2017
|
-
variant:
|
|
2060
|
+
responseKey: a,
|
|
2061
|
+
variant: s,
|
|
2018
2062
|
content: i,
|
|
2019
2063
|
actionType: c,
|
|
2020
2064
|
redirectUrl: l
|
|
@@ -2033,38 +2077,38 @@ const Un = (e, t, s, a) => {
|
|
|
2033
2077
|
} catch (d) {
|
|
2034
2078
|
console.error("Error in toast action:", d), alert(JSON.stringify(d));
|
|
2035
2079
|
}
|
|
2036
|
-
}, [c, t,
|
|
2080
|
+
}, [c, t, a, e, l]);
|
|
2037
2081
|
return K(() => {
|
|
2038
2082
|
({
|
|
2039
2083
|
info: W.info,
|
|
2040
2084
|
error: W.error,
|
|
2041
2085
|
success: W.success,
|
|
2042
2086
|
warning: W.warning
|
|
2043
|
-
}[
|
|
2087
|
+
}[s] || W.info)(i, {
|
|
2044
2088
|
autoClose: c ? !1 : 4e3,
|
|
2045
2089
|
containerId: e,
|
|
2046
2090
|
onClose: n
|
|
2047
2091
|
});
|
|
2048
2092
|
}, [n, e]), null;
|
|
2049
|
-
},
|
|
2050
|
-
accordion:
|
|
2051
|
-
accordionBody:
|
|
2052
|
-
},
|
|
2093
|
+
}, js = "_accordion_1ri2t_1", ws = "_accordionBody_1ri2t_8", Te = {
|
|
2094
|
+
accordion: js,
|
|
2095
|
+
accordionBody: ws
|
|
2096
|
+
}, Cs = (e) => {
|
|
2053
2097
|
const {
|
|
2054
2098
|
userFlow: t,
|
|
2055
|
-
pageId:
|
|
2056
|
-
responseKey:
|
|
2099
|
+
pageId: a,
|
|
2100
|
+
responseKey: s,
|
|
2057
2101
|
dependencies: i,
|
|
2058
2102
|
customContent: c,
|
|
2059
2103
|
actionContent: l,
|
|
2060
2104
|
components: n,
|
|
2061
2105
|
...d
|
|
2062
|
-
} = e, { getNextUI: r } = I(), [u, f] =
|
|
2106
|
+
} = e, { getNextUI: r } = I(), [u, f] = q(
|
|
2063
2107
|
d.checkboxChecked || !1
|
|
2064
2108
|
), { disabled: _ } = M(
|
|
2065
2109
|
t,
|
|
2066
2110
|
i
|
|
2067
|
-
), h =
|
|
2111
|
+
), h = O(t, a, n), j = l ? O(t, a, l) : void 0, m = c ? O(t, a, c) : void 0, x = D(
|
|
2068
2112
|
async (p) => {
|
|
2069
2113
|
var N;
|
|
2070
2114
|
try {
|
|
@@ -2072,154 +2116,154 @@ const Un = (e, t, s, a) => {
|
|
|
2072
2116
|
f(b);
|
|
2073
2117
|
const C = {
|
|
2074
2118
|
...(N = v.getState()[t]) == null ? void 0 : N.entries,
|
|
2075
|
-
[
|
|
2119
|
+
[s]: b
|
|
2076
2120
|
};
|
|
2077
2121
|
if (L(t, C), d.actionType === "GO_TO_NEXT_UI") {
|
|
2078
2122
|
const w = await r(
|
|
2079
2123
|
t,
|
|
2080
|
-
|
|
2124
|
+
a,
|
|
2081
2125
|
C,
|
|
2082
|
-
|
|
2126
|
+
s
|
|
2083
2127
|
);
|
|
2084
|
-
w != null && w.data &&
|
|
2128
|
+
w != null && w.data && T(t, w == null ? void 0 : w.data);
|
|
2085
2129
|
}
|
|
2086
2130
|
} catch (b) {
|
|
2087
2131
|
console.error("Error in accordion checkbox action:", b), alert(JSON.stringify(b));
|
|
2088
2132
|
}
|
|
2089
2133
|
},
|
|
2090
|
-
[t,
|
|
2091
|
-
),
|
|
2134
|
+
[t, a, s, d.actionType, r]
|
|
2135
|
+
), y = d.disabled || _, g = {
|
|
2092
2136
|
...d,
|
|
2093
2137
|
className: Te.accordion,
|
|
2094
|
-
disabled:
|
|
2138
|
+
disabled: y,
|
|
2095
2139
|
checkboxChecked: u,
|
|
2096
2140
|
onChanceCheckbox: d.hasCheckbox ? x : void 0,
|
|
2097
|
-
actionContent: j ? /* @__PURE__ */ o.jsx(o.Fragment, { children: j.map((p, N) => /* @__PURE__ */ o.jsx(
|
|
2098
|
-
customContent:
|
|
2099
|
-
children: h ? /* @__PURE__ */ o.jsx("section", { className: Te.accordionBody, children: h.map((p, N) => /* @__PURE__ */ o.jsx(
|
|
2141
|
+
actionContent: j ? /* @__PURE__ */ o.jsx(o.Fragment, { children: j.map((p, N) => /* @__PURE__ */ o.jsx(A, { children: p }, `accordion-action-${N}`)) }) : void 0,
|
|
2142
|
+
customContent: m ? /* @__PURE__ */ o.jsx(o.Fragment, { children: m.map((p, N) => /* @__PURE__ */ o.jsx(A, { children: p }, `accordion-custom-${N}`)) }) : void 0,
|
|
2143
|
+
children: h ? /* @__PURE__ */ o.jsx("section", { className: Te.accordionBody, children: h.map((p, N) => /* @__PURE__ */ o.jsx(A, { children: p }, `accordion-child-${N}`)) }) : void 0
|
|
2100
2144
|
};
|
|
2101
|
-
return /* @__PURE__ */ o.jsx(
|
|
2102
|
-
},
|
|
2103
|
-
drawer:
|
|
2104
|
-
drawerBody:
|
|
2105
|
-
drawerFooter:
|
|
2106
|
-
},
|
|
2145
|
+
return /* @__PURE__ */ o.jsx(dt, { ...g });
|
|
2146
|
+
}, Ns = "_drawer_13pxo_1", vs = "_drawerBody_13pxo_5", Es = "_drawerFooter_13pxo_11", ue = {
|
|
2147
|
+
drawer: Ns,
|
|
2148
|
+
drawerBody: vs,
|
|
2149
|
+
drawerFooter: Es
|
|
2150
|
+
}, Ss = ({
|
|
2107
2151
|
userFlow: e,
|
|
2108
2152
|
pageId: t,
|
|
2109
|
-
responseKey:
|
|
2110
|
-
header:
|
|
2153
|
+
responseKey: a,
|
|
2154
|
+
header: s,
|
|
2111
2155
|
body: i,
|
|
2112
2156
|
footer: c,
|
|
2113
2157
|
...l
|
|
2114
2158
|
}) => {
|
|
2115
|
-
const n = v((
|
|
2159
|
+
const n = v((m) => {
|
|
2116
2160
|
var x;
|
|
2117
|
-
return (x =
|
|
2118
|
-
}), d = v((
|
|
2161
|
+
return (x = m[e]) == null ? void 0 : x.isDrawerOpen;
|
|
2162
|
+
}), d = v((m) => {
|
|
2119
2163
|
var x;
|
|
2120
|
-
return (x =
|
|
2164
|
+
return (x = m[e]) == null ? void 0 : x.isLoading;
|
|
2121
2165
|
}), r = n && !d, u = {
|
|
2122
2166
|
...l,
|
|
2123
2167
|
isOpen: r,
|
|
2124
2168
|
children: null
|
|
2125
2169
|
}, f = D(() => {
|
|
2126
2170
|
xe(e), Z(e, !1);
|
|
2127
|
-
}, [e]), _ = Array.isArray(
|
|
2171
|
+
}, [e]), _ = Array.isArray(s) ? O(e, t, s) : s ? /* @__PURE__ */ o.jsx(Re, { type: "h2", children: s }) : void 0, h = O(e, t, i), j = c ? O(e, t, c) : void 0;
|
|
2128
2172
|
return /* @__PURE__ */ o.jsx(
|
|
2129
|
-
|
|
2173
|
+
_t,
|
|
2130
2174
|
{
|
|
2131
2175
|
...u,
|
|
2132
|
-
className:
|
|
2176
|
+
className: ue.drawer,
|
|
2133
2177
|
isOpen: r,
|
|
2134
2178
|
onClose: f,
|
|
2135
2179
|
heightGap: 0,
|
|
2136
|
-
title: _ ? /* @__PURE__ */ o.jsx(o.Fragment, { children: Array.isArray(_) ? _.map((
|
|
2137
|
-
children: /* @__PURE__ */ o.jsx("section", { className:
|
|
2138
|
-
footer: j ? /* @__PURE__ */ o.jsx("div", { className:
|
|
2180
|
+
title: _ ? /* @__PURE__ */ o.jsx(o.Fragment, { children: Array.isArray(_) ? _.map((m, x) => /* @__PURE__ */ o.jsx(A, { children: m }, `drawer-header-${x}`)) : _ }) : void 0,
|
|
2181
|
+
children: /* @__PURE__ */ o.jsx("section", { className: ue.drawerBody, children: h.map((m, x) => /* @__PURE__ */ o.jsx(A, { children: m }, `drawer-body-${x}`)) }),
|
|
2182
|
+
footer: j ? /* @__PURE__ */ o.jsx("div", { className: ue.drawerFooter, children: j.map((m, x) => /* @__PURE__ */ o.jsx(A, { children: m }, `drawer-footer-${x}`)) }) : void 0
|
|
2139
2183
|
}
|
|
2140
2184
|
);
|
|
2141
|
-
}, $e = (e, t,
|
|
2142
|
-
const c =
|
|
2185
|
+
}, $e = (e, t, a, s, i) => {
|
|
2186
|
+
const c = O(
|
|
2143
2187
|
e,
|
|
2144
2188
|
t,
|
|
2145
|
-
(
|
|
2189
|
+
(s == null ? void 0 : s.components) || null,
|
|
2146
2190
|
i
|
|
2147
2191
|
);
|
|
2148
|
-
switch (
|
|
2192
|
+
switch (a) {
|
|
2149
2193
|
case "body":
|
|
2150
2194
|
return /* @__PURE__ */ o.jsx(
|
|
2151
|
-
|
|
2195
|
+
en,
|
|
2152
2196
|
{
|
|
2153
|
-
...
|
|
2197
|
+
...s,
|
|
2154
2198
|
inputs: c || []
|
|
2155
2199
|
},
|
|
2156
|
-
JSON.stringify(
|
|
2200
|
+
JSON.stringify(s == null ? void 0 : s.components)
|
|
2157
2201
|
);
|
|
2158
2202
|
case "header":
|
|
2159
2203
|
return /* @__PURE__ */ o.jsx(
|
|
2160
|
-
|
|
2204
|
+
$n,
|
|
2161
2205
|
{
|
|
2162
|
-
...
|
|
2206
|
+
...s,
|
|
2163
2207
|
components: c || []
|
|
2164
2208
|
},
|
|
2165
|
-
JSON.stringify(
|
|
2209
|
+
JSON.stringify(s == null ? void 0 : s.components)
|
|
2166
2210
|
);
|
|
2167
2211
|
default:
|
|
2168
2212
|
return null;
|
|
2169
2213
|
}
|
|
2170
|
-
},
|
|
2214
|
+
}, Ms = (e, t, a, s) => {
|
|
2171
2215
|
var _, h, j;
|
|
2172
|
-
const [i, c] =
|
|
2216
|
+
const [i, c] = q(!1), l = v((m) => m), n = (_ = l[e]) == null ? void 0 : _.currentPageId, d = n ? $e(
|
|
2173
2217
|
e,
|
|
2174
2218
|
n,
|
|
2175
2219
|
"header",
|
|
2176
2220
|
((h = l[e].pages[n].page) == null ? void 0 : h.header) || null,
|
|
2177
|
-
|
|
2221
|
+
s
|
|
2178
2222
|
) : null, r = n ? $e(
|
|
2179
2223
|
e,
|
|
2180
2224
|
n,
|
|
2181
2225
|
"body",
|
|
2182
2226
|
((j = l[e].pages[n].page) == null ? void 0 : j.body) || null,
|
|
2183
|
-
|
|
2227
|
+
s
|
|
2184
2228
|
) : null, u = S(() => {
|
|
2185
|
-
var
|
|
2229
|
+
var m;
|
|
2186
2230
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2187
|
-
((
|
|
2231
|
+
((m = l[e]) == null ? void 0 : m.isLoading) && /* @__PURE__ */ o.jsx(ut, {}),
|
|
2188
2232
|
d,
|
|
2189
2233
|
r,
|
|
2190
|
-
n && /* @__PURE__ */ o.jsx(
|
|
2191
|
-
l[e] && /* @__PURE__ */ o.jsx(
|
|
2234
|
+
n && /* @__PURE__ */ o.jsx(Bn, { userFlow: e, pageId: n }),
|
|
2235
|
+
l[e] && /* @__PURE__ */ o.jsx(ht, {})
|
|
2192
2236
|
] });
|
|
2193
2237
|
}, [d, r, n, e]), f = async () => {
|
|
2194
2238
|
try {
|
|
2195
|
-
const
|
|
2239
|
+
const m = await Ie(
|
|
2196
2240
|
t,
|
|
2197
2241
|
e
|
|
2198
|
-
), x =
|
|
2199
|
-
(
|
|
2200
|
-
} catch (
|
|
2201
|
-
console.error("[not-page]: API call failed",
|
|
2242
|
+
), x = m == null ? void 0 : m.data, y = x == null ? void 0 : x.content;
|
|
2243
|
+
(m == null ? void 0 : m.status) === 200 ? oe(e, t, y, x == null ? void 0 : x.sessionState) : c(!0);
|
|
2244
|
+
} catch (m) {
|
|
2245
|
+
console.error("[not-page]: API call failed", m), c(!0);
|
|
2202
2246
|
}
|
|
2203
2247
|
};
|
|
2204
2248
|
return K(() => {
|
|
2205
|
-
t != null && t.api && !
|
|
2249
|
+
t != null && t.api && !a && e ? f() : !(t != null && t.api) && a && e || t != null && t.api && a && e ? oe(e, t, a) : (!(t != null && t.api) && !a || !e) && (c(!0), console.error(
|
|
2206
2250
|
"[not-page]: API call failed",
|
|
2207
2251
|
"not api config",
|
|
2208
2252
|
"not userFlow"
|
|
2209
2253
|
));
|
|
2210
|
-
const
|
|
2211
|
-
const g =
|
|
2212
|
-
|
|
2254
|
+
const m = "avocado-theme-mode-changed", x = (y) => {
|
|
2255
|
+
const g = y.detail;
|
|
2256
|
+
te.setThemeMode(g);
|
|
2213
2257
|
};
|
|
2214
|
-
return window.addEventListener(
|
|
2215
|
-
window.removeEventListener(
|
|
2258
|
+
return window.addEventListener(m, x), () => {
|
|
2259
|
+
window.removeEventListener(m, x);
|
|
2216
2260
|
};
|
|
2217
2261
|
}, []), i && console.error("[not-page]: No render page"), u;
|
|
2218
2262
|
};
|
|
2219
2263
|
export {
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2264
|
+
On as Chart,
|
|
2265
|
+
Un as Row,
|
|
2266
|
+
Ut as heading,
|
|
2267
|
+
Jt as text,
|
|
2268
|
+
Ms as usePage
|
|
2225
2269
|
};
|