@databrainhq/plugin 0.17.9-beta.89 → 0.17.9-beta.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-Cm7NvhtU.mjs → Accordion-CBeM5jJS.mjs} +1 -1
- package/dist/{CardChartSlot-C6Mvfs25.mjs → CardChartSlot-B-Ngm7L2.mjs} +7 -7
- package/dist/{Chart-D59hFodU.mjs → Chart-DVy_ucZn.mjs} +8 -8
- package/dist/{ChartCardOverlay-BU9Az6O8.mjs → ChartCardOverlay-VSQRyMW2.mjs} +1 -1
- package/dist/{ChartTypePanel-Bd9xpwBz.mjs → ChartTypePanel-CD8UZYq_.mjs} +12 -12
- package/dist/{CreateGlobalFilter-BglIVAbU.mjs → CreateGlobalFilter-B0W6aBZS.mjs} +2 -2
- package/dist/{CreateMetricV2-B4Qh8ilT.mjs → CreateMetricV2-CfROozFF.mjs} +18 -14
- package/dist/{HorizontalStackTable-CbHC13wB.mjs → HorizontalStackTable-C6Y8jTZx.mjs} +3 -3
- package/dist/{ManageMetricsV2-DZ3hRAVE.mjs → ManageMetricsV2-CKLIByOd.mjs} +3 -3
- package/dist/{MetricCardV2-78VV9622.mjs → MetricCardV2-DzI3bmvs.mjs} +623 -626
- package/dist/{NoDataFound-C49L7xWQ.mjs → NoDataFound-DJlW6hHe.mjs} +1 -1
- package/dist/{Panel-CMkiqPwr.mjs → Panel-BHzPWaa8.mjs} +1 -1
- package/dist/{PivotTableV2-By0gA5rR.mjs → PivotTableV2-Bd1SHLUx.mjs} +2 -2
- package/dist/{PivotTableV3--v3NlWBG.mjs → PivotTableV3-CHm-stWR.mjs} +4 -4
- package/dist/{Portal-BINiwYIE.mjs → Portal-CL-S1tXR.mjs} +29 -11
- package/dist/{RadioButton-D2xlAse7.mjs → RadioButton-DZWBIci3.mjs} +30 -30
- package/dist/{ScheduleEmail-GnNMpHBH.mjs → ScheduleEmail-Dv8m65aQ.mjs} +145 -136
- package/dist/{SearchMetricData-DJW7y87n.mjs → SearchMetricData-LScEnff3.mjs} +13 -13
- package/dist/{SortPanel-B0K5hI59.mjs → SortPanel-BPOISeUj.mjs} +9 -9
- package/dist/{Table-DQlYOUYN.mjs → Table-DI_eYdYo.mjs} +4 -4
- package/dist/{TagInputField-BGM6vEtu.mjs → TagInputField-C0AKAT5E.mjs} +5 -5
- package/dist/{TextAreaField-DBMbqlLr.mjs → TextAreaField-BGLVqIH_.mjs} +2 -2
- package/dist/{TimeSeriesSettings-Bu9CIVts.mjs → TimeSeriesSettings-D-02eLGd.mjs} +2 -2
- package/dist/{cardStates-C6q56mQy.mjs → cardStates-YaeHm3yq.mjs} +1 -1
- package/dist/{charts-BCsWRROL.mjs → charts-BfKyYVQ3.mjs} +1 -1
- package/dist/{clickActions-D9ZeoDnp.mjs → clickActions-GtHmsSzk.mjs} +14 -14
- package/dist/{conditionalFormatting-ZjZ6wY0g.mjs → conditionalFormatting-Doxpmemq.mjs} +1 -1
- package/dist/{createGlobalFilter.module-B3nAWt-z.mjs → createGlobalFilter.module-D6HjUXWX.mjs} +1 -1
- package/dist/{crossPointer-1otwmut1.mjs → crossPointer-B3cgqnZo.mjs} +3 -3
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{metric.mutation-D6RtkleZ.mjs → metric.mutation-BmM7y6ro.mjs} +2 -2
- package/dist/{pluginV3Request-DDHTowqW.mjs → pluginV3Request-DSTXpnb2.mjs} +2 -2
- package/dist/{renderer-CYUeXAi5.mjs → renderer-DEJWO1tC.mjs} +1 -1
- package/dist/{timeseries-hkiBF4TC.mjs → timeseries-C3w9dXh4.mjs} +1 -1
- package/dist/{useGuesTokenUsageLog-CHzIT9Ex.mjs → useGuesTokenUsageLog-B4vI8cc-.mjs} +1 -1
- package/dist/{useLoadingDeadline-ZhTlljOz.mjs → useLoadingDeadline-AkEY8sVK.mjs} +13 -8
- package/dist/{usePublishArchivedMetrics-Cgh9agh-.mjs → usePublishArchivedMetrics-d7UD9S-D.mjs} +2 -2
- package/dist/{useQuery-CKH-_Ztf.mjs → useQuery-DsSv-fcD.mjs} +1 -1
- package/dist/webcomponents-styles.es.js +1 -1
- package/dist/webcomponents.es.js +2007 -1967
- package/dist/webcomponents.umd.js +191 -191
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useEffect as e, useMemo as t, useRef as n, useState as r } from "react";
|
|
2
2
|
import "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
|
-
import { d as i } from "./cardStates-
|
|
5
|
-
import { At as a } from "./pluginV3Request-
|
|
6
|
-
import { K as o, U as s, et as c, ot as l } from "./metric.mutation-
|
|
7
|
-
import { $ as u, Ba as d, Dt as f, Fa as p, Ha as ee, Kn as m, L as h, Ot as g, Pa as _, Q as v, Ra as y, Sa as b, Tr as x, V as S, Va as C, X as w, Z as T, a as E, ba as D, bt as O, co as k, ct as te, d as A, et as ne, ft as re, ho as j, ja as ie, k as M, kt as ae, o as N, oo as oe, v as P, wr as F, xt as I } from "./Portal-
|
|
8
|
-
import { _ as se, a as L, c as ce, d as le, i as ue, l as R, m as de, n as fe, o as pe, t as me, u as he } from "./TagInputField-
|
|
9
|
-
import { t as z } from "./NoDataFound-
|
|
4
|
+
import { d as i } from "./cardStates-YaeHm3yq.mjs";
|
|
5
|
+
import { At as a } from "./pluginV3Request-DSTXpnb2.mjs";
|
|
6
|
+
import { K as o, U as s, et as c, ot as l } from "./metric.mutation-BmM7y6ro.mjs";
|
|
7
|
+
import { $ as u, Ba as d, Dt as f, Fa as p, Ha as ee, Kn as m, L as h, Ot as g, Pa as _, Q as v, Ra as y, Sa as b, Tr as x, V as S, Va as C, X as w, Z as T, a as E, ba as D, bt as O, co as k, ct as te, d as A, et as ne, ft as re, ho as j, ja as ie, k as M, kt as ae, o as N, oo as oe, v as P, wr as F, xt as I } from "./Portal-CL-S1tXR.mjs";
|
|
8
|
+
import { _ as se, a as L, c as ce, d as le, i as ue, l as R, m as de, n as fe, o as pe, t as me, u as he } from "./TagInputField-C0AKAT5E.mjs";
|
|
9
|
+
import { t as z } from "./NoDataFound-DJlW6hHe.mjs";
|
|
10
10
|
import { t as B } from "./No_data-CdjBgHVn.mjs";
|
|
11
|
-
import { t as V } from "./Panel-
|
|
11
|
+
import { t as V } from "./Panel-BHzPWaa8.mjs";
|
|
12
12
|
import { t as ge } from "./Switch-BlOR68qT.mjs";
|
|
13
13
|
import { t as H } from "./Loader-DoUwkcO5.mjs";
|
|
14
14
|
import { t as U } from "./list.module-DHbay5il.mjs";
|
|
@@ -187,7 +187,7 @@ var _e = ({ headers: t, data: i, variant: a = "primary", noDataText: o = "No Dat
|
|
|
187
187
|
}) : null
|
|
188
188
|
]
|
|
189
189
|
}) });
|
|
190
|
-
}, ve = (e
|
|
190
|
+
}, ve = (e) => {
|
|
191
191
|
let t = /* @__PURE__ */ new Date();
|
|
192
192
|
if (!e) return t;
|
|
193
193
|
try {
|
|
@@ -195,7 +195,10 @@ var _e = ({ headers: t, data: i, variant: a = "primary", noDataText: o = "No Dat
|
|
|
195
195
|
} catch {
|
|
196
196
|
return t;
|
|
197
197
|
}
|
|
198
|
-
}, ye = (e
|
|
198
|
+
}, ye = (e) => {
|
|
199
|
+
let t = new Date(e);
|
|
200
|
+
return new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
|
|
201
|
+
}, J = (e, t) => {
|
|
199
202
|
let n = 0;
|
|
200
203
|
for (let r = 0; r < e.length; r++) if (e[r] >= t) return n = r, n;
|
|
201
204
|
return n;
|
|
@@ -213,13 +216,13 @@ var _e = ({ headers: t, data: i, variant: a = "primary", noDataText: o = "No Dat
|
|
|
213
216
|
default: return null;
|
|
214
217
|
}
|
|
215
218
|
})).filter((e) => e).sort((e, t) => e - t);
|
|
216
|
-
},
|
|
217
|
-
let t =
|
|
219
|
+
}, xe = (e) => {
|
|
220
|
+
let t = ve(e.timezone);
|
|
218
221
|
t.setMinutes(t.getMinutes() + 1);
|
|
219
222
|
let n = null;
|
|
220
223
|
switch (e.frequency) {
|
|
221
224
|
case "oneTime":
|
|
222
|
-
n =
|
|
225
|
+
n = ye(e?.oneTimeDate?.startDate || "");
|
|
223
226
|
break;
|
|
224
227
|
case "Daily":
|
|
225
228
|
n = new Date(t), n.setDate(t.getDate());
|
|
@@ -245,14 +248,13 @@ var _e = ({ headers: t, data: i, variant: a = "primary", noDataText: o = "No Dat
|
|
|
245
248
|
let r = parseInt(e.minutes || "0", 10), i = Number.isNaN(r) ? 0 : r;
|
|
246
249
|
switch (n.setHours(parseInt(e.hours, 10), i, 0, 0), e.time === "PM" && e.hours === "12" ? n.setHours(12, i, 0, 0) : e.time === "PM" ? n.setHours(parseInt(e.hours, 10) + 12, i, 0, 0) : e.time === "AM" && e.hours === "12" && n.setHours(0, i, 0, 0), e.frequency) {
|
|
247
250
|
case "Daily":
|
|
248
|
-
case "oneTime":
|
|
249
251
|
(n.getHours() < t.getHours() || n.getHours() === t.getHours() && n.getMinutes() <= t.getMinutes()) && n.setDate(n.getDate() + 1);
|
|
250
252
|
break;
|
|
251
253
|
case "Weekly":
|
|
252
254
|
Object.keys(e.weekDays).filter((t) => e.weekDays[t]).includes(y[t.getDay()].value) && (n.getHours() > t.getHours() || n.getHours() === t.getHours() && n.getMinutes() > t.getMinutes()) && n.setDate(t.getDate());
|
|
253
255
|
break;
|
|
254
256
|
case "Monthly": {
|
|
255
|
-
let r = e.newDate ? be(e.newDate) : e.date?.map((e) => parseInt(e.value, 10)).sort((e, t) => e - t), i =
|
|
257
|
+
let r = e.newDate ? be(e.newDate) : e.date?.map((e) => parseInt(e.value, 10)).sort((e, t) => e - t), i = J(r, t.getDate());
|
|
256
258
|
n.setDate(r[i]), n.getDate() <= t.getDate() && (n.getHours() < t.getHours() || n.getHours() === t.getHours() && n.getMinutes() <= t.getMinutes()) && n.setDate(r[(i + 1) % r.length]), n.getMonth() === t.getMonth() && n.getDate() <= t.getDate() && (n.getHours() < t.getHours() || n.getHours() === t.getHours() && n.getMinutes() <= t.getMinutes()) && (n.setMonth(n.getMonth() + 1), n.setDate(r[0])), n.getMonth() === t.getMonth() && n.getDate() < t.getDate() && n.setMonth(n.getMonth() + 1);
|
|
257
259
|
break;
|
|
258
260
|
}
|
|
@@ -260,7 +262,7 @@ var _e = ({ headers: t, data: i, variant: a = "primary", noDataText: o = "No Dat
|
|
|
260
262
|
}
|
|
261
263
|
let r = n ? n.getMonth() + 1 : void 0;
|
|
262
264
|
return `${n?.getDate()}/${r}/${n?.getFullYear()}, ${n?.toLocaleTimeString()}`;
|
|
263
|
-
}, X = (e) => typeof e.deleted == "number" && e.deleted > 0 || !!e.delete_scheduleEmailReports_by_pk?.id,
|
|
265
|
+
}, Y = (e, t = !0) => e.filter((e) => !t || !e.isAppFilter), X = (e) => typeof e.deleted == "number" && e.deleted > 0 || !!e.delete_scheduleEmailReports_by_pk?.id, Se = (e, t) => ({
|
|
264
266
|
...e,
|
|
265
267
|
...t ? { createdByIdentifier: t } : {}
|
|
266
268
|
});
|
|
@@ -277,7 +279,7 @@ function Z(e, t, n) {
|
|
|
277
279
|
...r
|
|
278
280
|
});
|
|
279
281
|
}
|
|
280
|
-
function
|
|
282
|
+
function Ce(e, t, n) {
|
|
281
283
|
o(e === "create" ? "schedule_report.created" : "schedule_report.updated", {
|
|
282
284
|
frequency: t?.frequency,
|
|
283
285
|
chart_count: Array.isArray(t?.charts) ? t.charts.length : 0,
|
|
@@ -287,24 +289,24 @@ function Se(e, t, n) {
|
|
|
287
289
|
is_internal: n
|
|
288
290
|
});
|
|
289
291
|
}
|
|
290
|
-
var
|
|
292
|
+
var we = {
|
|
291
293
|
time: "PM",
|
|
292
294
|
timezone: C() ?? d("Asia/Kolkata")?.value ?? "Asia/Kolkata",
|
|
293
295
|
frequency: "Daily",
|
|
294
296
|
minutes: "00"
|
|
295
|
-
},
|
|
297
|
+
}, Te = (e) => {
|
|
296
298
|
let t = e?.timeConfigurations?.charts;
|
|
297
299
|
return Array.isArray(t) && t.length ? t : e?.scheduleEmailReportCharts?.map((e) => e?.externalMetricId || e?.externalMetric?.id || e?.externalMetric?.externalMetricId)?.filter(Boolean) || [];
|
|
298
|
-
},
|
|
300
|
+
}, Ee = ({ onCancel: i, getInternalToken: a, internalReportActions: o, scheduleReportConfig: l, externalDashboardId: u, sharingSettingsId: d, onComplete: f, clientState: p, createdByIdentifier: ee }) => {
|
|
299
301
|
let { register: m, handleSubmit: h, watch: _, control: v, setValue: y, getValues: b, reset: x, formState: { errors: S } } = g(), { data: C, token: w } = oe(), T = ee ?? C?.userIdentifier, E = t(() => {
|
|
300
302
|
if (l) return l;
|
|
301
303
|
}, [l]), O = C?.embedDataAppId || E?.embedId || null, k = n(void 0), A = () => k.current ?? E?.id;
|
|
302
304
|
e(() => {
|
|
303
305
|
k.current = void 0, E ? x({
|
|
304
306
|
...E?.timeConfigurations,
|
|
305
|
-
charts:
|
|
307
|
+
charts: Te(E),
|
|
306
308
|
minutes: E?.timeConfigurations?.minutes ?? "00"
|
|
307
|
-
}) : (y("time",
|
|
309
|
+
}) : (y("time", we.time), y("timezone", we.timezone), y("frequency", we.frequency), y("minutes", we.minutes), y("subject", ""), y("downloadFileFormat", D?.[0]?.value));
|
|
308
310
|
}, [E]);
|
|
309
311
|
let [ne, j] = r(!1), [ie, M] = r(""), [ae, N] = r(!1), [P, F] = r(!1), I = re(), se = te(), L = s(), ce = de(w || "", u || "", C?.embedDataAppId || null), le = () => L.invalidateQueries({ queryKey: ce.queryKey }), ue = (e) => new Set((e?.scheduleEmailReports ?? []).map((e) => e?.id).filter(Boolean)), R = async (e, t) => {
|
|
310
312
|
if (!e) return "unknown";
|
|
@@ -321,11 +323,11 @@ var Ce = {
|
|
|
321
323
|
Z("update", "restore_failed", e), le(), M("Unable to update the schedule, and the earlier schedule could not be restored. Please create it again."), j(!1);
|
|
322
324
|
};
|
|
323
325
|
I.mutate({
|
|
324
|
-
data:
|
|
326
|
+
data: Se({
|
|
325
327
|
embedId: O,
|
|
326
328
|
emails: n?.emails ?? n?.timeConfigurations?.emails,
|
|
327
329
|
externalDashboardId: u || C?.externalDashboard?.id,
|
|
328
|
-
data:
|
|
330
|
+
data: Te(n).map((e) => ({ externalMetricId: e })),
|
|
329
331
|
guestToken: e,
|
|
330
332
|
nextScheduledAt: n?.nextScheduledAt,
|
|
331
333
|
sharingSettingsId: d || C?.sharingSettingsId,
|
|
@@ -352,14 +354,14 @@ var Ce = {
|
|
|
352
354
|
if (e?.frequency === "oneTime") {
|
|
353
355
|
let t = e?.oneTimeDate?.startDate;
|
|
354
356
|
if (!t) return !1;
|
|
355
|
-
let n =
|
|
357
|
+
let n = ye(t);
|
|
356
358
|
if (isNaN(n.getTime())) return M("invalid date selected"), j(!1), N(!1), !1;
|
|
357
359
|
let r = Number(e?.hours);
|
|
358
360
|
if (Number.isNaN(r) || r < 1 || r > 12) return M("invalid hour"), j(!1), N(!1), !1;
|
|
359
361
|
let i = Number(`${e?.minutes ?? "0"}`.trim() || "0");
|
|
360
362
|
if (Number.isNaN(i) || i < 0 || i > 59) return M("invalid minutes"), j(!1), N(!1), !1;
|
|
361
363
|
let a = e?.time === "PM" && r !== 12 ? r + 12 : e?.time === "AM" && r === 12 ? 0 : r, o = new Date(n.getTime());
|
|
362
|
-
if (o.setHours(a, i, 0, 0), o.getTime()
|
|
364
|
+
if (o.setHours(a, i, 0, 0), o.getTime() < ve(e?.timezone).getTime() + 12e4) return M("Choose a time at least 2 minutes from now in the selected time zone so the report can be prepared."), j(!1), N(!1), !1;
|
|
363
365
|
}
|
|
364
366
|
return t ? p?.isRequiredClient && !p?.clients?.length ? (M("please select at least one client"), j(!1), N(!1), !1) : !0 : (M("invalid time configurations"), j(!1), N(!1), !1);
|
|
365
367
|
}, me = (e) => {
|
|
@@ -369,14 +371,14 @@ var Ce = {
|
|
|
369
371
|
if (e?.frequency === "oneTime") {
|
|
370
372
|
let t = e?.oneTimeDate?.startDate;
|
|
371
373
|
if (!t) return !1;
|
|
372
|
-
let n =
|
|
374
|
+
let n = ye(t);
|
|
373
375
|
if (isNaN(n.getTime())) return M("invalid date selected"), j(!1), N(!1), !1;
|
|
374
376
|
let r = Number(e?.hours);
|
|
375
377
|
if (Number.isNaN(r) || r < 1 || r > 12) return M("invalid hour"), j(!1), N(!1), !1;
|
|
376
378
|
let i = Number(`${e?.minutes ?? "0"}`.trim() || "0");
|
|
377
379
|
if (Number.isNaN(i) || i < 0 || i > 59) return M("invalid minutes"), j(!1), N(!1), !1;
|
|
378
380
|
let a = e?.time === "PM" && r !== 12 ? r + 12 : e?.time === "AM" && r === 12 ? 0 : r, o = new Date(n.getTime());
|
|
379
|
-
if (o.setHours(a, i, 0, 0), o.getTime()
|
|
381
|
+
if (o.setHours(a, i, 0, 0), o.getTime() < ve(e?.timezone).getTime() + 12e4) return M("Choose a time at least 2 minutes from now in the selected time zone so the report can be prepared."), j(!1), N(!1), !1;
|
|
380
382
|
}
|
|
381
383
|
return !0;
|
|
382
384
|
}, he = async (e) => {
|
|
@@ -400,7 +402,7 @@ var Ce = {
|
|
|
400
402
|
});
|
|
401
403
|
return;
|
|
402
404
|
}
|
|
403
|
-
let S =
|
|
405
|
+
let S = xe({
|
|
404
406
|
date: l,
|
|
405
407
|
frequency: r,
|
|
406
408
|
hours: ee,
|
|
@@ -442,13 +444,13 @@ var Ce = {
|
|
|
442
444
|
Z("update", "save_failed", e), M("Unable to update the schedule. Please try again later."), j(!1), N(!1);
|
|
443
445
|
return;
|
|
444
446
|
}
|
|
445
|
-
c("schedule-report-success", { action: "update" }),
|
|
447
|
+
c("schedule-report-success", { action: "update" }), Ce("update", e, !0), M(""), j(!1), N(!0), f?.(), i();
|
|
446
448
|
} else if (E) {
|
|
447
449
|
let r = L.getQueryData(ce.queryKey), a = r ? ue(r) : void 0, o = W(), s = {
|
|
448
450
|
...k,
|
|
449
451
|
saveAttemptId: o
|
|
450
452
|
}, l = () => {
|
|
451
|
-
c("schedule-report-success", { action: "update" }),
|
|
453
|
+
c("schedule-report-success", { action: "update" }), Ce("update", e, x), M(""), j(!1), N(!0), f?.(), i();
|
|
452
454
|
}, p = async () => {
|
|
453
455
|
N(!1);
|
|
454
456
|
let e = await R(a, o);
|
|
@@ -460,7 +462,7 @@ var Ce = {
|
|
|
460
462
|
}, {
|
|
461
463
|
onSuccess(e) {
|
|
462
464
|
X(e) ? I.mutate({
|
|
463
|
-
data:
|
|
465
|
+
data: Se({
|
|
464
466
|
embedId: O,
|
|
465
467
|
emails: n,
|
|
466
468
|
externalDashboardId: u || C?.externalDashboard?.id,
|
|
@@ -489,7 +491,7 @@ var Ce = {
|
|
|
489
491
|
}
|
|
490
492
|
});
|
|
491
493
|
} else I.mutate({
|
|
492
|
-
data:
|
|
494
|
+
data: Se({
|
|
493
495
|
embedId: O,
|
|
494
496
|
emails: n,
|
|
495
497
|
externalDashboardId: u || C?.externalDashboard?.id,
|
|
@@ -506,7 +508,7 @@ var Ce = {
|
|
|
506
508
|
token: b || w
|
|
507
509
|
}, {
|
|
508
510
|
onSuccess(t) {
|
|
509
|
-
t?.insert_scheduleEmailReports_one?.id ? (c("schedule-report-success", { action: "create" }),
|
|
511
|
+
t?.insert_scheduleEmailReports_one?.id ? (c("schedule-report-success", { action: "create" }), Ce("create", e, x), M(""), j(!1), N(!0), f?.(), i()) : (Z("create", "save_unexpected_response"), M("Unable to create the schedule. Please try again."), j(!1), N(!1));
|
|
510
512
|
},
|
|
511
513
|
onError(e) {
|
|
512
514
|
Z("create", "save_failed", e), M("Unable to create the schedule. Please try again later."), j(!1), N(!1);
|
|
@@ -579,11 +581,11 @@ var Ce = {
|
|
|
579
581
|
"field-width": "_field-width_rutu9_48",
|
|
580
582
|
"time-dropdown-field": "_time-dropdown-field_rutu9_52",
|
|
581
583
|
"success-text": "_success-text_rutu9_56"
|
|
582
|
-
},
|
|
584
|
+
}, De = (e) => e?.length ? e.flatMap((e) => e.columns?.map((t) => ({
|
|
583
585
|
...t,
|
|
584
586
|
_tableName: e.tableName
|
|
585
|
-
})) || []) : [],
|
|
586
|
-
let { control: z, register: B, setValue: V, watch: H, onSave: U, isLoading: W, error: _e, isSuccess: ve, scheduleReportConfig: J, onDelete:
|
|
587
|
+
})) || []) : [], Oe = (e, t, n) => Y(e, !!t).filter((e) => I(e, n)), ke = ({ onCancel: n, getInternalToken: i, internalReportActions: a, canDeleteInternalReport: o = !0, canEditInternalReport: s = !0, scheduleReportConfig: c, chartOptions: l, externalDashboardId: d, sharingSettingsId: ee, onComplete: g, clientDropDown: x, clientState: C, isEmbed: E, dashboardFilters: te, workspaceId: A, datasourceId: ne, encryptedClientId: re, companyTenancyType: se, clientColumnType: de }) => {
|
|
588
|
+
let { control: z, register: B, setValue: V, watch: H, onSave: U, isLoading: W, error: _e, isSuccess: ve, scheduleReportConfig: J, onDelete: be, isDeleted: xe, errors: Y } = Ee({
|
|
587
589
|
onCancel: n,
|
|
588
590
|
getInternalToken: i,
|
|
589
591
|
internalReportActions: a,
|
|
@@ -592,13 +594,13 @@ var Ce = {
|
|
|
592
594
|
sharingSettingsId: ee,
|
|
593
595
|
onComplete: g,
|
|
594
596
|
clientState: C
|
|
595
|
-
}), { data: X, token:
|
|
596
|
-
tenancyLevel:
|
|
597
|
+
}), { data: X, token: Se } = oe(), Z = A || X?.workspace?.id || "", Ce = ne || X?.datasourceId || "", we = re || "", Te = se || X?.companyTenancyType, ke = de || X?.clientColumnType, $ = t(() => C?.isDisableClient ? [] : C?.clients || [], [C?.clients, C?.isDisableClient]), Ae = t(() => $.map((e) => e.value).filter((e) => e != null && e !== ""), [$]), je = O({
|
|
598
|
+
tenancyLevel: Te,
|
|
597
599
|
isDisableClient: C?.isDisableClient === !0,
|
|
598
600
|
selectedClientCount: $.length
|
|
599
|
-
}),
|
|
601
|
+
}), Me = t(() => {
|
|
600
602
|
let e = te || X?.externalDashboard?.filters, t = $[0]?.value;
|
|
601
|
-
if (!e?.length ||
|
|
603
|
+
if (!e?.length || Te !== "DATABASE" || $.length !== 1 || !t) return e;
|
|
602
604
|
let n = (e) => {
|
|
603
605
|
let n = e || "", r = n.lastIndexOf("."), i = r >= 0 ? n.slice(r + 1) : n;
|
|
604
606
|
return i ? `${t}.${i}` : n;
|
|
@@ -618,49 +620,49 @@ var Ce = {
|
|
|
618
620
|
}, [
|
|
619
621
|
te,
|
|
620
622
|
X?.externalDashboard?.filters,
|
|
621
|
-
|
|
623
|
+
Te,
|
|
622
624
|
$
|
|
623
|
-
]), [
|
|
625
|
+
]), [Ne, Pe] = r(!0), [Fe, Ie] = r(!0), [Le, Re] = r(!0), [ze, Be] = r(!1), [Ve, He] = r({
|
|
624
626
|
showDelete: !1,
|
|
625
627
|
deleteFunction: () => {}
|
|
626
|
-
}), [
|
|
627
|
-
|
|
628
|
+
}), [Ue, We] = r(""), Ge = t(() => De(Me), [Me]), Ke = t(() => Oe(Ge, E, Ae), [
|
|
629
|
+
Ge,
|
|
628
630
|
E,
|
|
629
|
-
|
|
630
|
-
]),
|
|
631
|
+
Ae
|
|
632
|
+
]), qe = t(() => Ke.map((e) => ({
|
|
631
633
|
value: e.label || e.name,
|
|
632
634
|
label: e.label || e.name
|
|
633
|
-
})), [
|
|
634
|
-
if (!
|
|
635
|
-
let e =
|
|
635
|
+
})), [Ke]), Je = H("selectedFilterNames") || [], Ye = H("scheduleFilters") || {}, [Xe, Ze] = r([]), [Qe, $e] = r(!1), et = t(() => {
|
|
636
|
+
if (!Je.length) return [];
|
|
637
|
+
let e = Me;
|
|
636
638
|
return e?.length ? e.map((e) => ({
|
|
637
639
|
...e,
|
|
638
|
-
columns: (e?.columns || []).filter((e) =>
|
|
640
|
+
columns: (e?.columns || []).filter((e) => Je.some((t) => t.value === (e.label || e.name))).map((e) => ({
|
|
639
641
|
...e,
|
|
640
642
|
isShowHorizontal: !0
|
|
641
643
|
}))
|
|
642
644
|
})).filter((e) => e.columns.length > 0) : [];
|
|
643
|
-
}, [
|
|
645
|
+
}, [Je, Me]);
|
|
644
646
|
e(() => {
|
|
645
|
-
if (!
|
|
647
|
+
if (!Qe) return;
|
|
646
648
|
let e = {};
|
|
647
|
-
|
|
649
|
+
Xe.forEach((t) => {
|
|
648
650
|
if (!t.value || Array.isArray(t.value) && !t.value.length || t.value === "*") return;
|
|
649
651
|
let n = t.label || t.column;
|
|
650
652
|
t.as === "date" || t.as === "number" ? e[n] = t.value : Array.isArray(t.value) ? e[n] = t.value.map((e) => typeof e == "string" ? m(e) : e) : typeof t.value == "string" ? e[n] = m(t.value) : e[n] = t.value;
|
|
651
653
|
}), V("scheduleFilters", e);
|
|
652
654
|
}, [
|
|
653
|
-
|
|
654
|
-
|
|
655
|
+
Xe,
|
|
656
|
+
Qe,
|
|
655
657
|
V
|
|
656
658
|
]), e(() => {
|
|
657
659
|
let e = H("scheduleFilters");
|
|
658
|
-
if (!
|
|
660
|
+
if (!Xe.length && e && Object.keys(e).length && Ge.length) {
|
|
659
661
|
let t = [];
|
|
660
662
|
for (let [n, r] of Object.entries(e)) {
|
|
661
663
|
if (r == null) continue;
|
|
662
|
-
let e =
|
|
663
|
-
e && I(e,
|
|
664
|
+
let e = Ge.find((e) => (e.label || e.name) === n);
|
|
665
|
+
e && I(e, Ae) && t.push({
|
|
664
666
|
column: e.name,
|
|
665
667
|
operator: e.as === "date" || e.as === "number" ? "BETWEEN" : e.filterVariant?.value || "IN",
|
|
666
668
|
value: r,
|
|
@@ -672,50 +674,50 @@ var Ce = {
|
|
|
672
674
|
filterVariant: e.filterVariant
|
|
673
675
|
});
|
|
674
676
|
}
|
|
675
|
-
t.length &&
|
|
677
|
+
t.length && Ze(t);
|
|
676
678
|
}
|
|
677
|
-
|
|
679
|
+
$e(!0);
|
|
678
680
|
}, [
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
681
|
+
Xe.length,
|
|
682
|
+
Ge,
|
|
683
|
+
Ae,
|
|
682
684
|
H
|
|
683
685
|
]), e(() => {
|
|
684
|
-
if (!
|
|
686
|
+
if (!Qe) return;
|
|
685
687
|
let e = (e) => {
|
|
686
688
|
if (!e) return !0;
|
|
687
|
-
let t =
|
|
688
|
-
return t ? I(t,
|
|
689
|
+
let t = Ge.find((t) => (t.label || t.name) === e);
|
|
690
|
+
return t ? I(t, Ae) : !1;
|
|
689
691
|
}, t = H("selectedFilterNames") || [], n = t.filter((t) => e(t.value));
|
|
690
692
|
n.length !== t.length && V("selectedFilterNames", n);
|
|
691
693
|
let r = H("scheduleFilters") || {}, i = {}, a = !1;
|
|
692
694
|
Object.entries(r).forEach(([t, n]) => {
|
|
693
695
|
e(t) ? i[t] = n : a = !0;
|
|
694
|
-
}), a && V("scheduleFilters", i),
|
|
696
|
+
}), a && V("scheduleFilters", i), Ze((t) => {
|
|
695
697
|
let n = t.filter((t) => e(t.label || t.column));
|
|
696
698
|
return n.length === t.length ? t : n;
|
|
697
699
|
});
|
|
698
700
|
}, [
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
701
|
+
Ge,
|
|
702
|
+
Qe,
|
|
703
|
+
Ae,
|
|
702
704
|
V,
|
|
703
705
|
H
|
|
704
706
|
]), e(() => {
|
|
705
|
-
if (!
|
|
707
|
+
if (!Qe || je) return;
|
|
706
708
|
(H("selectedFilterNames") || []).length && V("selectedFilterNames", []);
|
|
707
709
|
let e = H("scheduleFilters") || {};
|
|
708
|
-
Object.keys(e).length && V("scheduleFilters", {}),
|
|
710
|
+
Object.keys(e).length && V("scheduleFilters", {}), Ze((e) => e.length ? [] : e);
|
|
709
711
|
}, [
|
|
710
|
-
|
|
711
|
-
|
|
712
|
+
je,
|
|
713
|
+
Qe,
|
|
712
714
|
V,
|
|
713
715
|
H
|
|
714
716
|
]);
|
|
715
|
-
let
|
|
717
|
+
let tt = (e) => e.map(({ value: e, label: t }) => ({
|
|
716
718
|
value: e,
|
|
717
719
|
label: t
|
|
718
|
-
})),
|
|
720
|
+
})), nt = (e, t, n) => {
|
|
719
721
|
let r = H(e) || n, i = t.find((e) => e.value === r) ?? t.find((e) => e.value === n);
|
|
720
722
|
return {
|
|
721
723
|
current: r,
|
|
@@ -728,7 +730,7 @@ var Ce = {
|
|
|
728
730
|
},
|
|
729
731
|
hint: i?.hint
|
|
730
732
|
};
|
|
731
|
-
},
|
|
733
|
+
}, rt = nt("orientation", ce, R.orientation), it = nt("density", pe, R.density), at = nt("tableMode", he, R.tableMode), ot = nt("deliveryMode", L, ue);
|
|
732
734
|
return /* @__PURE__ */ K(G, { children: /* @__PURE__ */ q("form", {
|
|
733
735
|
className: "dbn:w-full",
|
|
734
736
|
style: { height: "calc(100% - 44px)" },
|
|
@@ -742,13 +744,13 @@ var Ce = {
|
|
|
742
744
|
/* @__PURE__ */ K(k, {
|
|
743
745
|
variant: "popover",
|
|
744
746
|
leftIcon: /* @__PURE__ */ K("span", {
|
|
745
|
-
className:
|
|
747
|
+
className: Ne ? "" : "dbn:-rotate-90",
|
|
746
748
|
children: /* @__PURE__ */ K(F, { name: "caret-down-fill" })
|
|
747
749
|
}),
|
|
748
|
-
onClick: () =>
|
|
750
|
+
onClick: () => Pe(!Ne),
|
|
749
751
|
children: "General"
|
|
750
752
|
}),
|
|
751
|
-
|
|
753
|
+
Ne && /* @__PURE__ */ q(P, {
|
|
752
754
|
direction: "col",
|
|
753
755
|
className: "dbn:gap-2 dbn:border-b dbn:border-secondary dbn:pb-5",
|
|
754
756
|
children: [/* @__PURE__ */ K(v, {
|
|
@@ -772,21 +774,21 @@ var Ce = {
|
|
|
772
774
|
width: "",
|
|
773
775
|
regexStr: RegExp("^(?![.])[a-zA-Z0-9._%+-]+(?<![.])@(?:(?!-)[a-zA-Z](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$", ""),
|
|
774
776
|
tagType: "Email address",
|
|
775
|
-
tagError:
|
|
776
|
-
setTagError:
|
|
777
|
+
tagError: Ue,
|
|
778
|
+
setTagError: We,
|
|
777
779
|
isImportant: !0
|
|
778
780
|
})]
|
|
779
781
|
}),
|
|
780
782
|
/* @__PURE__ */ K(k, {
|
|
781
783
|
variant: "popover",
|
|
782
784
|
leftIcon: /* @__PURE__ */ K("span", {
|
|
783
|
-
className:
|
|
785
|
+
className: Fe ? "" : "dbn:-rotate-90",
|
|
784
786
|
children: /* @__PURE__ */ K(F, { name: "caret-down-fill" })
|
|
785
787
|
}),
|
|
786
|
-
onClick: () =>
|
|
788
|
+
onClick: () => Ie(!Fe),
|
|
787
789
|
children: "Report Content Settings"
|
|
788
790
|
}),
|
|
789
|
-
|
|
791
|
+
Fe && /* @__PURE__ */ q(P, {
|
|
790
792
|
direction: "col",
|
|
791
793
|
className: "dbn:gap-2 dbn:border-b dbn:border-secondary dbn:pb-5",
|
|
792
794
|
children: [
|
|
@@ -875,13 +877,13 @@ var Ce = {
|
|
|
875
877
|
children: `${Y?.downloadFileFormat?.message}`
|
|
876
878
|
})] })
|
|
877
879
|
}),
|
|
878
|
-
|
|
880
|
+
qe.length > 0 && je && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(M, {
|
|
879
881
|
label: "Filters",
|
|
880
|
-
options:
|
|
881
|
-
selectedOption:
|
|
882
|
+
options: qe,
|
|
883
|
+
selectedOption: Je,
|
|
882
884
|
onChange: (e) => {
|
|
883
885
|
V("selectedFilterNames", e || []);
|
|
884
|
-
let t = { ...
|
|
886
|
+
let t = { ...Ye }, n = (e || []).map((e) => e.value);
|
|
885
887
|
Object.keys(t).forEach((e) => {
|
|
886
888
|
n.includes(e) || delete t[e];
|
|
887
889
|
}), V("scheduleFilters", t);
|
|
@@ -889,23 +891,23 @@ var Ce = {
|
|
|
889
891
|
buttonWidth: "100%",
|
|
890
892
|
menuWidth: "100%",
|
|
891
893
|
isSearchEnabled: !0
|
|
892
|
-
}),
|
|
893
|
-
appliedfilters:
|
|
894
|
-
setAppliedFilters:
|
|
895
|
-
filters:
|
|
894
|
+
}), et.length > 0 && /* @__PURE__ */ K(u, {
|
|
895
|
+
appliedfilters: Xe,
|
|
896
|
+
setAppliedFilters: Ze,
|
|
897
|
+
filters: et,
|
|
896
898
|
internal: {
|
|
897
899
|
isInternal: !0,
|
|
898
900
|
workspaceId: Z
|
|
899
901
|
},
|
|
900
|
-
datasourceId:
|
|
901
|
-
token:
|
|
902
|
-
encryptedClientId:
|
|
902
|
+
datasourceId: Ce,
|
|
903
|
+
token: Se || "",
|
|
904
|
+
encryptedClientId: we,
|
|
903
905
|
clientId: $[0]?.value ?? X?.clientId,
|
|
904
|
-
clientScopeValues:
|
|
906
|
+
clientScopeValues: Ae,
|
|
905
907
|
isAllClient: C?.isDisableClient ? !0 : !$.length && X?.isAllClient,
|
|
906
908
|
isFrontendApp: !E,
|
|
907
|
-
tenancyLevel:
|
|
908
|
-
clientColumnType:
|
|
909
|
+
tenancyLevel: Te || "TABLE",
|
|
910
|
+
clientColumnType: ke || "STRING",
|
|
909
911
|
theme: {
|
|
910
912
|
width: "100%",
|
|
911
913
|
variant: "static",
|
|
@@ -927,14 +929,14 @@ var Ce = {
|
|
|
927
929
|
type: "button",
|
|
928
930
|
variant: "popover",
|
|
929
931
|
leftIcon: /* @__PURE__ */ K("span", {
|
|
930
|
-
className:
|
|
932
|
+
className: ze ? "" : "dbn:-rotate-90",
|
|
931
933
|
children: /* @__PURE__ */ K(F, { name: "caret-down-fill" })
|
|
932
934
|
}),
|
|
933
935
|
"data-testid": "schedule-page-setup-toggle",
|
|
934
|
-
onClick: () =>
|
|
936
|
+
onClick: () => Be(!ze),
|
|
935
937
|
children: "Page Setup & Delivery"
|
|
936
938
|
}),
|
|
937
|
-
|
|
939
|
+
ze && /* @__PURE__ */ q(P, {
|
|
938
940
|
direction: "col",
|
|
939
941
|
className: "dbn:gap-3 dbn:border-b dbn:border-secondary dbn:pb-5",
|
|
940
942
|
children: [
|
|
@@ -943,15 +945,15 @@ var Ce = {
|
|
|
943
945
|
className: "dbn:gap-1",
|
|
944
946
|
children: [/* @__PURE__ */ K(h, {
|
|
945
947
|
label: "Orientation",
|
|
946
|
-
selectedOption:
|
|
947
|
-
options:
|
|
948
|
+
selectedOption: rt.selectedOption,
|
|
949
|
+
options: tt(ce),
|
|
948
950
|
onChange: (e) => V("orientation", e?.value),
|
|
949
951
|
buttonWidth: "100%",
|
|
950
952
|
menuWidth: "100%"
|
|
951
953
|
}), /* @__PURE__ */ K(j, {
|
|
952
954
|
variant: "small-text",
|
|
953
955
|
color: "gray",
|
|
954
|
-
children:
|
|
956
|
+
children: rt.hint
|
|
955
957
|
})]
|
|
956
958
|
}),
|
|
957
959
|
/* @__PURE__ */ q(P, {
|
|
@@ -959,15 +961,15 @@ var Ce = {
|
|
|
959
961
|
className: "dbn:gap-1",
|
|
960
962
|
children: [/* @__PURE__ */ K(h, {
|
|
961
963
|
label: "Cards per page",
|
|
962
|
-
selectedOption:
|
|
963
|
-
options:
|
|
964
|
+
selectedOption: it.selectedOption,
|
|
965
|
+
options: tt(pe),
|
|
964
966
|
onChange: (e) => V("density", e?.value),
|
|
965
967
|
buttonWidth: "100%",
|
|
966
968
|
menuWidth: "100%"
|
|
967
969
|
}), /* @__PURE__ */ K(j, {
|
|
968
970
|
variant: "small-text",
|
|
969
971
|
color: "gray",
|
|
970
|
-
children:
|
|
972
|
+
children: it.hint
|
|
971
973
|
})]
|
|
972
974
|
}),
|
|
973
975
|
/* @__PURE__ */ q(P, {
|
|
@@ -975,18 +977,18 @@ var Ce = {
|
|
|
975
977
|
className: "dbn:gap-1",
|
|
976
978
|
children: [/* @__PURE__ */ K(h, {
|
|
977
979
|
label: "Long tables",
|
|
978
|
-
selectedOption:
|
|
979
|
-
options:
|
|
980
|
+
selectedOption: at.selectedOption,
|
|
981
|
+
options: tt(he),
|
|
980
982
|
onChange: (e) => V("tableMode", e?.value),
|
|
981
983
|
buttonWidth: "100%",
|
|
982
984
|
menuWidth: "100%"
|
|
983
985
|
}), /* @__PURE__ */ K(j, {
|
|
984
986
|
variant: "small-text",
|
|
985
987
|
color: "gray",
|
|
986
|
-
children:
|
|
988
|
+
children: at.hint
|
|
987
989
|
})]
|
|
988
990
|
}),
|
|
989
|
-
|
|
991
|
+
at.current === "paginate" && /* @__PURE__ */ K(v, {
|
|
990
992
|
type: "number",
|
|
991
993
|
label: "Rows per table",
|
|
992
994
|
"data-testid": "schedule-row-cap",
|
|
@@ -999,15 +1001,15 @@ var Ce = {
|
|
|
999
1001
|
className: "dbn:gap-1",
|
|
1000
1002
|
children: [/* @__PURE__ */ K(h, {
|
|
1001
1003
|
label: "Deliver as",
|
|
1002
|
-
selectedOption:
|
|
1003
|
-
options:
|
|
1004
|
+
selectedOption: ot.selectedOption,
|
|
1005
|
+
options: tt(L),
|
|
1004
1006
|
onChange: (e) => V("deliveryMode", e?.value),
|
|
1005
1007
|
buttonWidth: "100%",
|
|
1006
1008
|
menuWidth: "100%"
|
|
1007
1009
|
}), /* @__PURE__ */ K(j, {
|
|
1008
1010
|
variant: "small-text",
|
|
1009
1011
|
color: "gray",
|
|
1010
|
-
children:
|
|
1012
|
+
children: ot.hint
|
|
1011
1013
|
})]
|
|
1012
1014
|
})
|
|
1013
1015
|
]
|
|
@@ -1015,13 +1017,13 @@ var Ce = {
|
|
|
1015
1017
|
/* @__PURE__ */ K(k, {
|
|
1016
1018
|
variant: "popover",
|
|
1017
1019
|
leftIcon: /* @__PURE__ */ K("span", {
|
|
1018
|
-
className:
|
|
1020
|
+
className: Le ? "" : "dbn:-rotate-90",
|
|
1019
1021
|
children: /* @__PURE__ */ K(F, { name: "caret-down-fill" })
|
|
1020
1022
|
}),
|
|
1021
|
-
onClick: () =>
|
|
1023
|
+
onClick: () => Re(!Le),
|
|
1022
1024
|
children: "Schedule Settings"
|
|
1023
1025
|
}),
|
|
1024
|
-
|
|
1026
|
+
Le && /* @__PURE__ */ q(P, {
|
|
1025
1027
|
direction: "col",
|
|
1026
1028
|
className: "dbn:gap-2 dbn:pb-5",
|
|
1027
1029
|
children: [
|
|
@@ -1051,8 +1053,8 @@ var Ce = {
|
|
|
1051
1053
|
isImportant: !0,
|
|
1052
1054
|
onChange: (e) => V("oneTimeDate", e),
|
|
1053
1055
|
defaultValues: H()?.oneTimeDate?.startDate ? {
|
|
1054
|
-
startDate:
|
|
1055
|
-
endDate:
|
|
1056
|
+
startDate: ye(H()?.oneTimeDate?.startDate),
|
|
1057
|
+
endDate: ye(H()?.oneTimeDate?.startDate),
|
|
1056
1058
|
timeGrainValue: "between"
|
|
1057
1059
|
} : void 0
|
|
1058
1060
|
}) : e === "Monthly" ? /* @__PURE__ */ K("div", { children: /* @__PURE__ */ K(M, {
|
|
@@ -1083,10 +1085,17 @@ var Ce = {
|
|
|
1083
1085
|
className: Q["schedule-time"],
|
|
1084
1086
|
children: [/* @__PURE__ */ q(j, {
|
|
1085
1087
|
variant: "input-label",
|
|
1086
|
-
children: [
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1088
|
+
children: [
|
|
1089
|
+
"Scheduled Time",
|
|
1090
|
+
/* @__PURE__ */ K("span", {
|
|
1091
|
+
className: "dbn:text-alert",
|
|
1092
|
+
children: "*"
|
|
1093
|
+
}),
|
|
1094
|
+
H()?.frequency === "oneTime" ? /* @__PURE__ */ K("span", {
|
|
1095
|
+
className: "dbn:block dbn:font-normal dbn:text-sm",
|
|
1096
|
+
children: "Choose a time at least 2 minutes from now in the selected time zone so the report can be prepared."
|
|
1097
|
+
}) : null
|
|
1098
|
+
]
|
|
1090
1099
|
}), /* @__PURE__ */ q("div", {
|
|
1091
1100
|
className: Q["time-element"],
|
|
1092
1101
|
"data-testid": "schedule-time",
|
|
@@ -1177,7 +1186,7 @@ var Ce = {
|
|
|
1177
1186
|
color: "success",
|
|
1178
1187
|
children: "Scheduled successfully!"
|
|
1179
1188
|
}),
|
|
1180
|
-
|
|
1189
|
+
xe && /* @__PURE__ */ K(j, {
|
|
1181
1190
|
variant: "body-text-2",
|
|
1182
1191
|
color: "success",
|
|
1183
1192
|
children: "Deleted successfully!"
|
|
@@ -1195,9 +1204,9 @@ var Ce = {
|
|
|
1195
1204
|
type: "button",
|
|
1196
1205
|
variant: "secondary",
|
|
1197
1206
|
onClick: () => {
|
|
1198
|
-
|
|
1207
|
+
He({
|
|
1199
1208
|
showDelete: !0,
|
|
1200
|
-
deleteFunction:
|
|
1209
|
+
deleteFunction: be
|
|
1201
1210
|
});
|
|
1202
1211
|
},
|
|
1203
1212
|
isDisabled: W,
|
|
@@ -1213,7 +1222,7 @@ var Ce = {
|
|
|
1213
1222
|
}), /* @__PURE__ */ K(k, {
|
|
1214
1223
|
variant: "primary",
|
|
1215
1224
|
type: "submit",
|
|
1216
|
-
isDisabled: W || !!
|
|
1225
|
+
isDisabled: W || !!Ue || !(!c && !J || s),
|
|
1217
1226
|
className: "cta-primary",
|
|
1218
1227
|
children: c || J ? "Update" : "Save"
|
|
1219
1228
|
})]
|
|
@@ -1223,9 +1232,9 @@ var Ce = {
|
|
|
1223
1232
|
type: "button",
|
|
1224
1233
|
variant: "secondary",
|
|
1225
1234
|
onClick: () => {
|
|
1226
|
-
|
|
1235
|
+
He({
|
|
1227
1236
|
showDelete: !0,
|
|
1228
|
-
deleteFunction:
|
|
1237
|
+
deleteFunction: be
|
|
1229
1238
|
});
|
|
1230
1239
|
},
|
|
1231
1240
|
isDisabled: W,
|
|
@@ -1257,7 +1266,7 @@ var Ce = {
|
|
|
1257
1266
|
}), /* @__PURE__ */ K(k, {
|
|
1258
1267
|
variant: "tertiary",
|
|
1259
1268
|
type: "button",
|
|
1260
|
-
onClick: () =>
|
|
1269
|
+
onClick: () => He({
|
|
1261
1270
|
showDelete: !1,
|
|
1262
1271
|
deleteFunction: () => {}
|
|
1263
1272
|
}),
|
|
@@ -1272,8 +1281,8 @@ var Ce = {
|
|
|
1272
1281
|
})]
|
|
1273
1282
|
}),
|
|
1274
1283
|
size: "sm",
|
|
1275
|
-
isOpen:
|
|
1276
|
-
onClose: () =>
|
|
1284
|
+
isOpen: Ve.showDelete,
|
|
1285
|
+
onClose: () => He({
|
|
1277
1286
|
showDelete: !1,
|
|
1278
1287
|
deleteFunction: () => {}
|
|
1279
1288
|
}),
|
|
@@ -1296,7 +1305,7 @@ var Ce = {
|
|
|
1296
1305
|
type: "reset",
|
|
1297
1306
|
size: "small",
|
|
1298
1307
|
variant: "tab",
|
|
1299
|
-
onClick: () =>
|
|
1308
|
+
onClick: () => He({
|
|
1300
1309
|
showDelete: !1,
|
|
1301
1310
|
deleteFunction: () => {}
|
|
1302
1311
|
}),
|
|
@@ -1308,7 +1317,7 @@ var Ce = {
|
|
|
1308
1317
|
variant: "primary",
|
|
1309
1318
|
isDisabled: !o,
|
|
1310
1319
|
onClick: () => {
|
|
1311
|
-
o && (
|
|
1320
|
+
o && (Ve.deleteFunction(), He({
|
|
1312
1321
|
showDelete: !1,
|
|
1313
1322
|
deleteFunction: () => {}
|
|
1314
1323
|
}));
|
|
@@ -1506,7 +1515,7 @@ var Ce = {
|
|
|
1506
1515
|
})
|
|
1507
1516
|
})
|
|
1508
1517
|
}),
|
|
1509
|
-
g && /* @__PURE__ */ K(
|
|
1518
|
+
g && /* @__PURE__ */ K(ke, {
|
|
1510
1519
|
onCancel: () => {
|
|
1511
1520
|
u?.("EXIT_SCHEDULED_REPORT_MODE"), l(!1);
|
|
1512
1521
|
},
|