@databrainhq/plugin 0.17.9-beta.30 → 0.17.9-beta.31
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-D3DbH3Cx.mjs → Accordion-BhLebRAm.mjs} +32 -25
- package/dist/{Chart-7AGA9h2g.mjs → Chart-BLXiGOie.mjs} +361 -361
- package/dist/{CreateGlobalFilter-oHjA0P9O.mjs → CreateGlobalFilter-DJ75cI8r.mjs} +200 -200
- package/dist/{CreateMetricV2-BGDt9B3L.mjs → CreateMetricV2-DNSbMIqg.mjs} +20 -20
- package/dist/{DraggableItem-7fQUo0x4.mjs → DraggableItem-HJ4Wt8qx.mjs} +11 -11
- package/dist/{HorizontalStackTable-CH68bWy3.mjs → HorizontalStackTable-DadBH16u.mjs} +17 -17
- package/dist/{ManageMetricsV2-tyQYXoAT.mjs → ManageMetricsV2-DQ0F-Sxo.mjs} +3 -3
- package/dist/{MetricCardV2-C2n6LzkA.mjs → MetricCardV2-ndXX9kcc.mjs} +1251 -1170
- package/dist/{NoDataFound-N3gF0Pse.mjs → NoDataFound-C6lIIOZF.mjs} +1 -1
- package/dist/{NoDataState-C6hX-CHr.mjs → NoDataState-Dx5ksEt-.mjs} +2 -2
- package/dist/{Panel-BeWefwKs.mjs → Panel-oW--_1YF.mjs} +1 -1
- package/dist/{PivotTableV2-De4TXsMc.mjs → PivotTableV2-BufQEGso.mjs} +2 -2
- package/dist/{PivotTableV3-2nzDp4Nc.mjs → PivotTableV3-DwleqfW7.mjs} +4 -4
- package/dist/{Portal-C4N01WKg.mjs → Portal-CuJ3yA9x.mjs} +1222 -1200
- package/dist/{RadioButton-DvzkXfzO.mjs → RadioButton-BagXnWOk.mjs} +1 -1
- package/dist/{ScheduleEmail-PEzbadHC.mjs → ScheduleEmail-C_H0_DNM.mjs} +220 -220
- package/dist/{SearchMetricData-CxmDM20t.mjs → SearchMetricData-DPWkvX0c.mjs} +237 -237
- package/dist/{SortPanel-DQjM_vyk.mjs → SortPanel-DctP-Eyd.mjs} +110 -110
- package/dist/{Table-CvDTChaZ.mjs → Table-BSKvdU4q.mjs} +4 -4
- package/dist/{TagInputField-C9M_Ip9e.mjs → TagInputField-B09tGuSM.mjs} +6 -6
- package/dist/{TextAreaField-Q78INHKO.mjs → TextAreaField-CLmioFXe.mjs} +113 -113
- package/dist/{TimeSeriesSettings-C8lvzgja.mjs → TimeSeriesSettings-BS9LodDk.mjs} +2 -2
- package/dist/{cardQueryError-3MGl4pbM.mjs → cardQueryError-Jo2LkSBF.mjs} +810 -790
- package/dist/{chevron-down-Dxhk-Tao.mjs → chevron-down-CTH4bR6n.mjs} +107 -106
- package/dist/{conditionalFormatting-BuG_4wOq.mjs → conditionalFormatting-BU6BaaPb.mjs} +1 -1
- package/dist/{createGlobalFilter.module-DisUwLsO.mjs → createGlobalFilter.module-Cw_A7yeo.mjs} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{echarts-BE7AhqVy.mjs → echarts-Dw5Z2Ho-.mjs} +2 -2
- package/dist/{metric.mutation-BRWn1UMi.mjs → metric.mutation-cOoqy5Bi.mjs} +1 -1
- package/dist/{permissions-B5UHxn_4.mjs → permissions-CxZW60Bd.mjs} +289 -261
- package/dist/{pluginV3Request-Dfy8fkbS.mjs → pluginV3Request-CQzo3G0-.mjs} +1 -1
- package/dist/{renderer-qB-6Euan.mjs → renderer-D1fTygev.mjs} +1 -1
- package/dist/{timeseries-Clp-TrGQ.mjs → timeseries-D_nzmvUF.mjs} +1347 -1304
- package/dist/{toTasteAppearance-cIHX7fPm.mjs → toTasteAppearance-C4jy9fG3.mjs} +1 -1
- package/dist/{useGuesTokenUsageLog-BtooXte_.mjs → useGuesTokenUsageLog-BgjAaf3E.mjs} +1 -1
- package/dist/{usePublishArchivedMetrics-CM4KQARj.mjs → usePublishArchivedMetrics-CM7fUNzL.mjs} +2 -2
- package/dist/{useQuery-D3fpbSfw.mjs → useQuery-DhtsBbBi.mjs} +1 -1
- package/dist/webcomponents.css +2 -2
- package/dist/webcomponents.es.js +483 -459
- package/dist/webcomponents.umd.js +153 -153
- package/package.json +1 -1
|
@@ -2,25 +2,25 @@ import "react";
|
|
|
2
2
|
import "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
4
|
import { s as e } from "./cardStates-DiUMQ7_o.mjs";
|
|
5
|
-
import { At as t } from "./pluginV3Request-
|
|
6
|
-
import { K as n, et as r, ot as i } from "./metric.mutation-
|
|
7
|
-
import { $ as a, B as o, Fa as s, H as c, Ia as l, L as u, N as d, Nn as f, T as p, Ua as m, V as h, Y as
|
|
8
|
-
import { a as
|
|
9
|
-
import { t as de } from "./NoDataFound-
|
|
5
|
+
import { At as t } from "./pluginV3Request-CQzo3G0-.mjs";
|
|
6
|
+
import { K as n, et as r, ot as i } from "./metric.mutation-cOoqy5Bi.mjs";
|
|
7
|
+
import { $ as a, B as o, Fa as s, H as c, Ia as l, L as u, N as d, Nn as f, T as p, Ua as m, V as h, Y as g, _a as _, _t as v, a as y, at as b, ba as x, cr as S, ct as C, ga as w, gt as T, ht as E, ia as ee, lt as D, m as te, na as O, o as k, p as A, pa as j, sr as M, u as N } from "./Portal-CuJ3yA9x.mjs";
|
|
8
|
+
import { a as ne, c as P, d as re, g as ie, i as ae, l as oe, n as se, o as ce, t as le, u as ue } from "./TagInputField-B09tGuSM.mjs";
|
|
9
|
+
import { t as de } from "./NoDataFound-C6lIIOZF.mjs";
|
|
10
10
|
import { t as fe } from "./No_data-BIO-IPxg.mjs";
|
|
11
|
-
import { t as pe } from "./Panel-
|
|
11
|
+
import { t as pe } from "./Panel-oW--_1YF.mjs";
|
|
12
12
|
import { t as me } from "./Switch-CqsadJBs.mjs";
|
|
13
13
|
import { t as F } from "./Loader-CHJMbWv0.mjs";
|
|
14
14
|
import { t as I } from "./list.module-DmT9azvq.mjs";
|
|
15
15
|
import { useEffect as L, useMemo as R, useRef as z, useState as B } from "react";
|
|
16
16
|
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/List/ListV2.tsx
|
|
18
|
-
var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data Available", loadMoreText: i = "See More", className: a = "", initialLimit: o = 5, isDataLoading: s = !1, showLogo: c, isShowOptions: u, setValue: d, currentPage: f = 1, isEnableScrollToTop: p, isDisableMoreOption: h, isEnableSelectAll:
|
|
18
|
+
var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data Available", loadMoreText: i = "See More", className: a = "", initialLimit: o = 5, isDataLoading: s = !1, showLogo: c, isShowOptions: u, setValue: d, currentPage: f = 1, isEnableScrollToTop: p, isDisableMoreOption: h, isEnableSelectAll: g, onSelectAll: _, onDeselectAll: v, isAllSelected: b, parent: x, extraValues: C, extraHeaderText: w, onTourClick: T, onRowClick: E, onRowHover: ee, onMouseOut: D, buttonContent: O, noDataSubHeading: k, isDatasourceList: A, stateKey: j, onCreate: ne, isDemoDatasource: P, isOpenInNewTab: re }) => {
|
|
19
19
|
let [ie, ae] = B(o), [oe, se] = B(""), [ce, le] = B(""), ue = (e) => {
|
|
20
|
-
if (
|
|
20
|
+
if (x) switch (x) {
|
|
21
21
|
case "DASHBOARD":
|
|
22
|
-
case "DASHBOARD_CREATE": return `/externalDashboard/${e.id}/?wid=${
|
|
23
|
-
case "METRIC": return `/metric/${e?.metric?.id}/?wid=${e?.workspaceId}${
|
|
22
|
+
case "DASHBOARD_CREATE": return `/externalDashboard/${e.id}/?wid=${C?.workspaceId}${C?.dataMartId ? `&dmId=${C?.dataMartId}` : ""}${e?.createdBy ? `&createdByClient=${e?.createdBy}` : ""}`;
|
|
23
|
+
case "METRIC": return `/metric/${e?.metric?.id}/?wid=${e?.workspaceId}${C?.dataMartId ? `&dmId=${C?.dataMartId}` : ""}${e?.dashboardId ? `&dashboardId=${e?.dashboardId}` : ""}&client=${e?.metric?.clientId}&parent=homepage&isPublished=${e?.isPublished}`;
|
|
24
24
|
case "DATASOURCE": return `/integration/${e.integrationId}?id=${e.id}`;
|
|
25
25
|
case "DATAAPP": return `embedInfo/${e.id}`;
|
|
26
26
|
case "DASHBOARD_EMBED_ACCESS": return e?.embedType === "dashboard" ? `embedAccessControl/${e?.id}?dataAppId=${e?.dataAppId}&wid=${e?.workspaceId}` : null;
|
|
@@ -42,12 +42,12 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
42
42
|
children: [
|
|
43
43
|
s ? /* @__PURE__ */ H("div", {
|
|
44
44
|
className: "dbn:my-5 dbn:w-full dbn:flex dbn:items-center dbn:justify-end",
|
|
45
|
-
children: /* @__PURE__ */ H(
|
|
45
|
+
children: /* @__PURE__ */ H(y, {
|
|
46
46
|
variant: "table",
|
|
47
47
|
tableRows: 4
|
|
48
48
|
})
|
|
49
49
|
}) : null,
|
|
50
|
-
!s && t.length === 0 && !
|
|
50
|
+
!s && t.length === 0 && !j ? /* @__PURE__ */ U("div", {
|
|
51
51
|
className: I.noData,
|
|
52
52
|
children: [/* @__PURE__ */ H("img", {
|
|
53
53
|
src: fe,
|
|
@@ -61,54 +61,54 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
61
61
|
variant: "heading-5",
|
|
62
62
|
children: r
|
|
63
63
|
}),
|
|
64
|
-
|
|
64
|
+
k ? /* @__PURE__ */ H(m, {
|
|
65
65
|
variant: "body-text-3",
|
|
66
|
-
children:
|
|
66
|
+
children: k
|
|
67
67
|
}) : null,
|
|
68
|
-
|
|
68
|
+
O
|
|
69
69
|
]
|
|
70
70
|
})]
|
|
71
71
|
}) : null,
|
|
72
|
-
!s && (t.length ||
|
|
72
|
+
!s && (t.length || j) ? /* @__PURE__ */ U("table", {
|
|
73
73
|
className: `${I.table} ${t.length > 0 ? "" : "dbn:h-0"}`,
|
|
74
74
|
children: [/* @__PURE__ */ H("thead", {
|
|
75
75
|
className: `${I[`headers-${n}`]} ${t.length === 0 ? I[`headers-${n}-nodata`] : ""} dbn:z-50`,
|
|
76
76
|
children: /* @__PURE__ */ H("tr", { children: e?.map((t, n) => /* @__PURE__ */ U("th", {
|
|
77
77
|
colSpan: t.colSpan,
|
|
78
|
-
className: `${
|
|
78
|
+
className: `${w ? I.headerCol2 : I.headerCol} ${t.columnKey?.toLowerCase() === "actions" ? "dbn:w-[250px]" : ""}`,
|
|
79
79
|
children: [/* @__PURE__ */ U("span", {
|
|
80
|
-
className: `${
|
|
81
|
-
children: [n === 0 &&
|
|
80
|
+
className: `${g && n === 0 ? "dbn:flex dbn:gap-2" : ""}`,
|
|
81
|
+
children: [n === 0 && g ? /* @__PURE__ */ H(N, {
|
|
82
82
|
id: `${t?.name?.replaceAll(" ", "-")?.toLowerCase()}-header-checkbox`,
|
|
83
83
|
onChange: (e) => {
|
|
84
|
-
e.target.checked ?
|
|
84
|
+
e.target.checked ? _?.() : v?.();
|
|
85
85
|
},
|
|
86
|
-
checked:
|
|
86
|
+
checked: b
|
|
87
87
|
}) : null, /* @__PURE__ */ H(m, {
|
|
88
88
|
variant: "sec-heading-6",
|
|
89
89
|
color: "gray",
|
|
90
90
|
children: t.headerCell || t.name
|
|
91
91
|
})]
|
|
92
|
-
}), n === e.length - 1 &&
|
|
92
|
+
}), n === e.length - 1 && w ? /* @__PURE__ */ H(m, {
|
|
93
93
|
variant: "body-text-3",
|
|
94
94
|
color: "cta",
|
|
95
|
-
children:
|
|
95
|
+
children: w
|
|
96
96
|
}) : null]
|
|
97
97
|
}, t.name)) })
|
|
98
98
|
}), /* @__PURE__ */ H("tbody", {
|
|
99
99
|
className: I.body,
|
|
100
100
|
children: (h ? t : t.slice(0, ie))?.map((t, r) => /* @__PURE__ */ H("tr", {
|
|
101
101
|
"data-testid": `row-${t?.name ?? t?.metric?.name ?? t?.companyRole?.name ?? t?.email?.split("@")?.[0]}`,
|
|
102
|
-
className: `${I[`row-${n}`]} ${
|
|
102
|
+
className: `${I[`row-${n}`]} ${x || T || ee || E ? "dbn:cursor-pointer" : ""}`,
|
|
103
103
|
onClick: (e) => {
|
|
104
|
-
|
|
104
|
+
T && T(t), E && E(t);
|
|
105
105
|
},
|
|
106
106
|
onContextMenu: (e) => {
|
|
107
107
|
let n = ue(t);
|
|
108
108
|
n && re && (e.preventDefault(), window.open(n, "_blank"));
|
|
109
109
|
},
|
|
110
110
|
"data-test-title": "table-rows",
|
|
111
|
-
onMouseOver: () =>
|
|
111
|
+
onMouseOver: () => ee?.(t),
|
|
112
112
|
onMouseOut: () => D?.(),
|
|
113
113
|
children: e?.map((r, i) => {
|
|
114
114
|
let a = r.columnKey === "invitationToken" && !!t[r.columnKey];
|
|
@@ -119,7 +119,7 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
119
119
|
className: I[`col-${n}-cell`],
|
|
120
120
|
children: i === 0 && c || r.columnKey?.toLowerCase() === "type" ? /* @__PURE__ */ U("div", {
|
|
121
121
|
className: "dbn:flex dbn:gap-2",
|
|
122
|
-
children: [(t?.type || t?.dbName) && /* @__PURE__ */ H(
|
|
122
|
+
children: [(t?.type || t?.dbName) && /* @__PURE__ */ H(S, {
|
|
123
123
|
name: r.columnKey?.toLowerCase() === "type" ? t.type?.toString() : t.dbName?.toString()?.toLowerCase(),
|
|
124
124
|
width: 20
|
|
125
125
|
}), r.columnKey?.toLowerCase() === "name" && (t.name === null || t.name === void 0) && t.dbName?.toString()?.toLowerCase() === "awss3" ? "Demo Datasource" : (r.columnCell ? r.columnCell(t) : t[r.columnKey]) || "-"]
|
|
@@ -136,16 +136,16 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
136
136
|
onClick: () => {
|
|
137
137
|
navigator.clipboard.writeText(t[r.columnKey]), se(t[r.columnKey]), setTimeout(() => se(""), 1700);
|
|
138
138
|
},
|
|
139
|
-
leftIcon: /* @__PURE__ */ H(
|
|
139
|
+
leftIcon: /* @__PURE__ */ H(M, {
|
|
140
140
|
name: "copy",
|
|
141
141
|
size: "xs"
|
|
142
142
|
}),
|
|
143
143
|
className: "dbn:p-0 dbn:pl-1 dbn:text-xs dbn:gap-1",
|
|
144
144
|
children: oe === t[r.columnKey] ? "Copied" : "Copy"
|
|
145
|
-
})] }) : t[r.columnKey]) || "-", i === e.length - 1 && u ? /* @__PURE__ */ U(
|
|
145
|
+
})] }) : t[r.columnKey]) || "-", i === e.length - 1 && u ? /* @__PURE__ */ U(te, {
|
|
146
146
|
buttonContent: /* @__PURE__ */ H(l, {
|
|
147
147
|
variant: "popover",
|
|
148
|
-
leftIcon: /* @__PURE__ */ H(
|
|
148
|
+
leftIcon: /* @__PURE__ */ H(M, { name: "kebab-menu-vertical" })
|
|
149
149
|
}),
|
|
150
150
|
menuWidth: "120px",
|
|
151
151
|
position: "bottom",
|
|
@@ -156,7 +156,7 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
156
156
|
action: "edit",
|
|
157
157
|
id: t.id
|
|
158
158
|
}),
|
|
159
|
-
leftIcon: /* @__PURE__ */ H(
|
|
159
|
+
leftIcon: /* @__PURE__ */ H(M, { name: "pencil-simple" }),
|
|
160
160
|
children: "Edit"
|
|
161
161
|
}), /* @__PURE__ */ H(l, {
|
|
162
162
|
variant: "popover",
|
|
@@ -165,7 +165,7 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
165
165
|
action: "delete",
|
|
166
166
|
id: t.id
|
|
167
167
|
}),
|
|
168
|
-
leftIcon: /* @__PURE__ */ H(
|
|
168
|
+
leftIcon: /* @__PURE__ */ H(M, { name: "delete" }),
|
|
169
169
|
children: "Delete"
|
|
170
170
|
})]
|
|
171
171
|
}) : null]
|
|
@@ -182,7 +182,7 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
182
182
|
type: "button",
|
|
183
183
|
variant: "tertiary",
|
|
184
184
|
onClick: () => ae((e) => e + o),
|
|
185
|
-
children: [/* @__PURE__ */ H(
|
|
185
|
+
children: [/* @__PURE__ */ H(M, { name: "arrow-down" }), /* @__PURE__ */ H("span", { children: i })]
|
|
186
186
|
})
|
|
187
187
|
}) : null
|
|
188
188
|
]
|
|
@@ -227,7 +227,7 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
227
227
|
case "Weekly": {
|
|
228
228
|
let r = Object.keys(e.weekDays).filter((t) => e.weekDays[t]), i = null;
|
|
229
229
|
r.forEach((e) => {
|
|
230
|
-
let n = (
|
|
230
|
+
let n = (x.findIndex((t) => t.value === e) + 7 - t.getDay()) % 7, r = new Date(t);
|
|
231
231
|
r.setDate(t.getDate() + n), r.toDateString() === t.toDateString() && r.setDate(r.getDate() + 7), (!i || r < i) && (i = r);
|
|
232
232
|
}), n = i;
|
|
233
233
|
break;
|
|
@@ -249,7 +249,7 @@ var W = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data
|
|
|
249
249
|
(n.getHours() < t.getHours() || n.getHours() === t.getHours() && n.getMinutes() <= t.getMinutes()) && n.setDate(n.getDate() + 1);
|
|
250
250
|
break;
|
|
251
251
|
case "Weekly":
|
|
252
|
-
Object.keys(e.weekDays).filter((t) => e.weekDays[t]).includes(
|
|
252
|
+
Object.keys(e.weekDays).filter((t) => e.weekDays[t]).includes(x[t.getDay()].value) && (n.getHours() > t.getHours() || n.getHours() === t.getHours() && n.getMinutes() > t.getMinutes()) && n.setDate(t.getDate());
|
|
253
253
|
break;
|
|
254
254
|
case "Monthly": {
|
|
255
255
|
let r = e.newDate ? _e(e.newDate) : e.date?.map((e) => parseInt(e.value, 10)).sort((e, t) => e - t), i = ge(r, t.getDate());
|
|
@@ -296,73 +296,73 @@ var Y = {
|
|
|
296
296
|
let t = e?.timeConfigurations?.charts;
|
|
297
297
|
return Array.isArray(t) && t.length ? t : e?.scheduleEmailReportCharts?.map((e) => e?.externalMetricId || e?.externalMetric?.id || e?.externalMetric?.externalMetricId)?.filter(Boolean) || [];
|
|
298
298
|
}, be = ({ onCancel: e, getInternalToken: t, scheduleReportConfig: n, externalDashboardId: i, sharingSettingsId: o, onComplete: c, clientState: l, createdByIdentifier: u }) => {
|
|
299
|
-
let { register: d, handleSubmit: f, watch: p, control: m, setValue: h, getValues:
|
|
299
|
+
let { register: d, handleSubmit: f, watch: p, control: m, setValue: h, getValues: _, reset: v, formState: { errors: y } } = T(), { data: b, token: x } = s(), S = u ?? b?.userIdentifier, C = R(() => {
|
|
300
300
|
if (n) return n;
|
|
301
301
|
}, [n]);
|
|
302
302
|
L(() => {
|
|
303
|
-
|
|
304
|
-
...
|
|
305
|
-
charts: ye(
|
|
306
|
-
minutes:
|
|
307
|
-
}) : (h("time", Y.time), h("timezone", Y.timezone), h("frequency", Y.frequency), h("minutes", Y.minutes), h("subject", ""), h("downloadFileFormat",
|
|
308
|
-
}, [
|
|
309
|
-
let [
|
|
310
|
-
if (!e?.charts?.length && !n) return D("please select at least one chart to share"),
|
|
311
|
-
if (!e?.emails?.length) return D("please add at least one email address"),
|
|
312
|
-
if (e?.frequency === "Weekly" && !Object?.values({ ...e?.weekDays }).includes(!0)) return D("please select atleast one day"),
|
|
313
|
-
if (e?.frequency === "Monthly" && !e?.newDate?.length) return D("please select at least one date option"),
|
|
314
|
-
if (e?.frequency === "oneTime" && !e?.oneTimeDate?.startDate) return D("please select date for one time schedule"),
|
|
303
|
+
C ? v({
|
|
304
|
+
...C?.timeConfigurations,
|
|
305
|
+
charts: ye(C),
|
|
306
|
+
minutes: C?.timeConfigurations?.minutes ?? "00"
|
|
307
|
+
}) : (h("time", Y.time), h("timezone", Y.timezone), h("frequency", Y.frequency), h("minutes", Y.minutes), h("subject", ""), h("downloadFileFormat", O?.[0]?.value));
|
|
308
|
+
}, [C]);
|
|
309
|
+
let [w, E] = B(!1), [ee, D] = B(""), [te, k] = B(!1), [A, j] = B(!1), M = a(), N = g(), ne = (e, t, n) => {
|
|
310
|
+
if (!e?.charts?.length && !n) return D("please select at least one chart to share"), E(!1), k(!1), !1;
|
|
311
|
+
if (!e?.emails?.length) return D("please add at least one email address"), E(!1), k(!1), !1;
|
|
312
|
+
if (e?.frequency === "Weekly" && !Object?.values({ ...e?.weekDays }).includes(!0)) return D("please select atleast one day"), E(!1), k(!1), !1;
|
|
313
|
+
if (e?.frequency === "Monthly" && !e?.newDate?.length) return D("please select at least one date option"), E(!1), k(!1), !1;
|
|
314
|
+
if (e?.frequency === "oneTime" && !e?.oneTimeDate?.startDate) return D("please select date for one time schedule"), E(!1), k(!1), !1;
|
|
315
315
|
if (e?.frequency === "oneTime") {
|
|
316
316
|
let t = e?.oneTimeDate?.startDate;
|
|
317
317
|
if (!t) return !1;
|
|
318
318
|
let n = typeof t == "string" ? new Date(t) : new Date(t.getTime());
|
|
319
|
-
if (isNaN(n.getTime())) return D("invalid date selected"),
|
|
319
|
+
if (isNaN(n.getTime())) return D("invalid date selected"), E(!1), k(!1), !1;
|
|
320
320
|
let r = Number(e?.hours);
|
|
321
|
-
if (Number.isNaN(r) || r < 1 || r > 12) return D("invalid hour"),
|
|
321
|
+
if (Number.isNaN(r) || r < 1 || r > 12) return D("invalid hour"), E(!1), k(!1), !1;
|
|
322
322
|
let i = Number(`${e?.minutes ?? "0"}`.trim() || "0");
|
|
323
|
-
if (Number.isNaN(i) || i < 0 || i > 59) return D("invalid minutes"),
|
|
323
|
+
if (Number.isNaN(i) || i < 0 || i > 59) return D("invalid minutes"), E(!1), k(!1), !1;
|
|
324
324
|
let a = e?.time === "PM" && r !== 12 ? r + 12 : e?.time === "AM" && r === 12 ? 0 : r, o = new Date(n.getTime());
|
|
325
|
-
if (o.setHours(a, i, 0, 0), o.getTime() <= Date.now()) return D("please select valid time for one time schedule"),
|
|
325
|
+
if (o.setHours(a, i, 0, 0), o.getTime() <= Date.now()) return D("please select valid time for one time schedule"), E(!1), k(!1), !1;
|
|
326
326
|
}
|
|
327
|
-
return t ? l?.isRequiredClient && !l?.clients?.length ? (D("please select at least one client"),
|
|
328
|
-
},
|
|
329
|
-
if (e?.frequency === "Weekly" && !Object?.values({ ...e?.weekDays }).includes(!0)) return D("please select atleast one day"),
|
|
330
|
-
if (e?.frequency === "Monthly" && !e?.newDate?.length) return D("please select at least one date option"),
|
|
331
|
-
if (e?.frequency === "oneTime" && !e?.oneTimeDate?.startDate) return D("please select date for one time schedule"),
|
|
327
|
+
return t ? l?.isRequiredClient && !l?.clients?.length ? (D("please select at least one client"), E(!1), k(!1), !1) : !0 : (D("invalid time configurations"), E(!1), k(!1), !1);
|
|
328
|
+
}, P = (e) => {
|
|
329
|
+
if (e?.frequency === "Weekly" && !Object?.values({ ...e?.weekDays }).includes(!0)) return D("please select atleast one day"), E(!1), k(!1), !1;
|
|
330
|
+
if (e?.frequency === "Monthly" && !e?.newDate?.length) return D("please select at least one date option"), E(!1), k(!1), !1;
|
|
331
|
+
if (e?.frequency === "oneTime" && !e?.oneTimeDate?.startDate) return D("please select date for one time schedule"), E(!1), k(!1), !1;
|
|
332
332
|
if (e?.frequency === "oneTime") {
|
|
333
333
|
let t = e?.oneTimeDate?.startDate;
|
|
334
334
|
if (!t) return !1;
|
|
335
335
|
let n = typeof t == "string" ? new Date(t) : new Date(t.getTime());
|
|
336
|
-
if (isNaN(n.getTime())) return D("invalid date selected"),
|
|
336
|
+
if (isNaN(n.getTime())) return D("invalid date selected"), E(!1), k(!1), !1;
|
|
337
337
|
let r = Number(e?.hours);
|
|
338
|
-
if (Number.isNaN(r) || r < 1 || r > 12) return D("invalid hour"),
|
|
338
|
+
if (Number.isNaN(r) || r < 1 || r > 12) return D("invalid hour"), E(!1), k(!1), !1;
|
|
339
339
|
let i = Number(`${e?.minutes ?? "0"}`.trim() || "0");
|
|
340
|
-
if (Number.isNaN(i) || i < 0 || i > 59) return D("invalid minutes"),
|
|
340
|
+
if (Number.isNaN(i) || i < 0 || i > 59) return D("invalid minutes"), E(!1), k(!1), !1;
|
|
341
341
|
let a = e?.time === "PM" && r !== 12 ? r + 12 : e?.time === "AM" && r === 12 ? 0 : r, o = new Date(n.getTime());
|
|
342
|
-
if (o.setHours(a, i, 0, 0), o.getTime() <= Date.now()) return D("please select valid time for one time schedule"),
|
|
342
|
+
if (o.setHours(a, i, 0, 0), o.getTime() <= Date.now()) return D("please select valid time for one time schedule"), E(!1), k(!1), !1;
|
|
343
343
|
}
|
|
344
344
|
return !0;
|
|
345
345
|
}, re = async (n) => {
|
|
346
|
-
D(""),
|
|
347
|
-
let { subject: a, emails: s, frequency: u, weekDays: d, date: f, hours: p, time: m, timezone: h, newDate:
|
|
346
|
+
D(""), E(!0), k(!1), n.minutes = `${n?.minutes ?? ""}`.trim() ? `${n?.minutes}`.padStart(2, "0") : "00";
|
|
347
|
+
let { subject: a, emails: s, frequency: u, weekDays: d, date: f, hours: p, time: m, timezone: h, newDate: g, isDownloadFile: _, downloadFileFormat: v } = n, y = await t?.(C?.guestToken, !!l?.isDisableClient);
|
|
348
348
|
if (r("schedule-report-start", {
|
|
349
|
-
action:
|
|
349
|
+
action: C ? "update" : "create",
|
|
350
350
|
frequency: u,
|
|
351
351
|
chartCount: n?.charts?.length ?? 0,
|
|
352
352
|
emailCount: Array.isArray(s) ? s.length : 0,
|
|
353
353
|
subjectLength: `${a ?? ""}`.length,
|
|
354
|
-
hasInternalToken: !!
|
|
355
|
-
isDownloadFile: !!
|
|
356
|
-
downloadFileFormat:
|
|
354
|
+
hasInternalToken: !!y,
|
|
355
|
+
isDownloadFile: !!_,
|
|
356
|
+
downloadFileFormat: v,
|
|
357
357
|
clientCount: l?.clients?.length ?? 0
|
|
358
|
-
}), !
|
|
358
|
+
}), !P(n)) {
|
|
359
359
|
r("schedule-report-blocked", {
|
|
360
360
|
gate: "dates",
|
|
361
361
|
frequency: u
|
|
362
362
|
});
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
365
|
-
let
|
|
365
|
+
let w = K({
|
|
366
366
|
date: f,
|
|
367
367
|
frequency: u,
|
|
368
368
|
hours: p,
|
|
@@ -370,35 +370,35 @@ var Y = {
|
|
|
370
370
|
time: m,
|
|
371
371
|
timezone: h,
|
|
372
372
|
weekDays: d,
|
|
373
|
-
newDate:
|
|
373
|
+
newDate: g,
|
|
374
374
|
oneTimeDate: n?.oneTimeDate
|
|
375
375
|
});
|
|
376
|
-
if (!
|
|
376
|
+
if (!ne(n, w, !!y)) {
|
|
377
377
|
r("schedule-report-blocked", {
|
|
378
378
|
gate: "settings",
|
|
379
379
|
frequency: u,
|
|
380
|
-
hasNextScheduledAt: !!
|
|
380
|
+
hasNextScheduledAt: !!w
|
|
381
381
|
});
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
|
-
let
|
|
385
|
-
|
|
386
|
-
id:
|
|
387
|
-
token:
|
|
384
|
+
let T = n?.charts?.map((e) => ({ externalMetricId: e }));
|
|
385
|
+
C ? N?.mutate({
|
|
386
|
+
id: C?.id,
|
|
387
|
+
token: y || x
|
|
388
388
|
}, {
|
|
389
389
|
onSuccess(t) {
|
|
390
|
-
t?.delete_scheduleEmailReports_by_pk?.id ?
|
|
390
|
+
t?.delete_scheduleEmailReports_by_pk?.id ? M.mutate({
|
|
391
391
|
data: ve({
|
|
392
|
-
embedId:
|
|
392
|
+
embedId: b?.embedDataAppId || null,
|
|
393
393
|
emails: s,
|
|
394
|
-
externalDashboardId: i ||
|
|
395
|
-
data:
|
|
396
|
-
guestToken:
|
|
397
|
-
nextScheduledAt:
|
|
398
|
-
sharingSettingsId: o ||
|
|
394
|
+
externalDashboardId: i || b?.externalDashboard?.id,
|
|
395
|
+
data: T,
|
|
396
|
+
guestToken: y || x,
|
|
397
|
+
nextScheduledAt: w,
|
|
398
|
+
sharingSettingsId: o || b?.sharingSettingsId,
|
|
399
399
|
subject: a,
|
|
400
|
-
isDownloadFile:
|
|
401
|
-
downloadFileFormat:
|
|
400
|
+
isDownloadFile: _,
|
|
401
|
+
downloadFileFormat: v,
|
|
402
402
|
timeConfigurations: {
|
|
403
403
|
...n,
|
|
404
404
|
clients: l?.clients || [],
|
|
@@ -406,33 +406,33 @@ var Y = {
|
|
|
406
406
|
isSelectAll: n?.isSelectAll,
|
|
407
407
|
isShowViewDashboardBtn: n?.isShowViewDashboardBtn
|
|
408
408
|
},
|
|
409
|
-
isInternal: !!
|
|
410
|
-
},
|
|
411
|
-
token:
|
|
409
|
+
isInternal: !!y
|
|
410
|
+
}, S),
|
|
411
|
+
token: y || x
|
|
412
412
|
}, {
|
|
413
413
|
onSuccess(t) {
|
|
414
|
-
t?.insert_scheduleEmailReports_one?.id ? (r("schedule-report-success", { action: "update" }), J("update", n, !!
|
|
414
|
+
t?.insert_scheduleEmailReports_one?.id ? (r("schedule-report-success", { action: "update" }), J("update", n, !!y), D(""), E(!1), k(!0), c?.(), e()) : (q("update", "save_unexpected_response"), D("Unable to update the schedule. Please try again."), E(!1), k(!1));
|
|
415
415
|
},
|
|
416
416
|
onError(e) {
|
|
417
|
-
q("update", "save_failed", e), D("Unable to update the schedule. Please try again later."),
|
|
417
|
+
q("update", "save_failed", e), D("Unable to update the schedule. Please try again later."), E(!1), k(!1);
|
|
418
418
|
}
|
|
419
|
-
}) : (q("update", "delete_unexpected_response"), D("Unable to update the schedule. Could not remove the existing schedule."),
|
|
419
|
+
}) : (q("update", "delete_unexpected_response"), D("Unable to update the schedule. Could not remove the existing schedule."), E(!1), k(!1));
|
|
420
420
|
},
|
|
421
421
|
onError(e) {
|
|
422
|
-
q("update", "delete_failed", e), D("Unable to update the schedule. Please try again later."),
|
|
422
|
+
q("update", "delete_failed", e), D("Unable to update the schedule. Please try again later."), E(!1), k(!1);
|
|
423
423
|
}
|
|
424
|
-
}) :
|
|
424
|
+
}) : M.mutate({
|
|
425
425
|
data: ve({
|
|
426
|
-
embedId:
|
|
426
|
+
embedId: b?.embedDataAppId || null,
|
|
427
427
|
emails: s,
|
|
428
|
-
externalDashboardId: i ||
|
|
429
|
-
data:
|
|
430
|
-
guestToken:
|
|
431
|
-
nextScheduledAt:
|
|
432
|
-
sharingSettingsId: o ||
|
|
428
|
+
externalDashboardId: i || b?.externalDashboard?.id,
|
|
429
|
+
data: T,
|
|
430
|
+
guestToken: y || x,
|
|
431
|
+
nextScheduledAt: w,
|
|
432
|
+
sharingSettingsId: o || b?.sharingSettingsId,
|
|
433
433
|
subject: a,
|
|
434
|
-
isDownloadFile:
|
|
435
|
-
downloadFileFormat:
|
|
434
|
+
isDownloadFile: _,
|
|
435
|
+
downloadFileFormat: v,
|
|
436
436
|
timeConfigurations: {
|
|
437
437
|
...n,
|
|
438
438
|
clients: l?.clients || [],
|
|
@@ -440,15 +440,15 @@ var Y = {
|
|
|
440
440
|
isSelectAll: n?.isSelectAll,
|
|
441
441
|
isShowViewDashboardBtn: n?.isShowViewDashboardBtn
|
|
442
442
|
},
|
|
443
|
-
isInternal: !!
|
|
444
|
-
},
|
|
445
|
-
token:
|
|
443
|
+
isInternal: !!y
|
|
444
|
+
}, S),
|
|
445
|
+
token: y || x
|
|
446
446
|
}, {
|
|
447
447
|
onSuccess(t) {
|
|
448
|
-
t?.insert_scheduleEmailReports_one?.id ? (r("schedule-report-success", { action: "create" }), J("create", n, !!
|
|
448
|
+
t?.insert_scheduleEmailReports_one?.id ? (r("schedule-report-success", { action: "create" }), J("create", n, !!y), D(""), E(!1), k(!0), c?.(), e()) : (q("create", "save_unexpected_response"), D("Unable to create the schedule. Please try again."), E(!1), k(!1));
|
|
449
449
|
},
|
|
450
450
|
onError(e) {
|
|
451
|
-
q("create", "save_failed", e), D("Unable to create the schedule. Please try again later."),
|
|
451
|
+
q("create", "save_failed", e), D("Unable to create the schedule. Please try again later."), E(!1), k(!1);
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
};
|
|
@@ -458,37 +458,37 @@ var Y = {
|
|
|
458
458
|
watch: p,
|
|
459
459
|
control: m,
|
|
460
460
|
setValue: h,
|
|
461
|
-
getValues:
|
|
462
|
-
reset:
|
|
461
|
+
getValues: _,
|
|
462
|
+
reset: v,
|
|
463
463
|
dashboardName: "",
|
|
464
464
|
onSave: f(async (e) => {
|
|
465
465
|
try {
|
|
466
466
|
await re(e);
|
|
467
467
|
} catch (e) {
|
|
468
|
-
let t =
|
|
469
|
-
q(t, "unhandled", e), D(t === "update" ? "Unable to update the schedule. Please try again later." : "Unable to create the schedule. Please try again later."),
|
|
468
|
+
let t = C ? "update" : "create";
|
|
469
|
+
q(t, "unhandled", e), D(t === "update" ? "Unable to update the schedule. Please try again later." : "Unable to create the schedule. Please try again later."), E(!1), k(!1);
|
|
470
470
|
}
|
|
471
471
|
}),
|
|
472
|
-
isLoading:
|
|
473
|
-
isSuccess:
|
|
474
|
-
error:
|
|
475
|
-
scheduleReportConfig:
|
|
472
|
+
isLoading: w,
|
|
473
|
+
isSuccess: te,
|
|
474
|
+
error: ee,
|
|
475
|
+
scheduleReportConfig: C,
|
|
476
476
|
onDelete: f(async () => {
|
|
477
|
-
let n = await t?.(
|
|
478
|
-
D(""),
|
|
479
|
-
id:
|
|
480
|
-
token: n ||
|
|
477
|
+
let n = await t?.(C?.guestToken);
|
|
478
|
+
D(""), E(!0), j(!1), k(!1), N.mutate({
|
|
479
|
+
id: C?.id,
|
|
480
|
+
token: n || x
|
|
481
481
|
}, {
|
|
482
482
|
onSuccess(t) {
|
|
483
|
-
t?.delete_scheduleEmailReports_by_pk?.id ? (r("schedule-report-success", { action: "delete" }), D(""),
|
|
483
|
+
t?.delete_scheduleEmailReports_by_pk?.id ? (r("schedule-report-success", { action: "delete" }), D(""), E(!1), v(), j(!0), c?.(), e()) : (q("delete", "delete_unexpected_response"), D("Unable to delete the schedule. Please try again."), E(!1), j(!1));
|
|
484
484
|
},
|
|
485
485
|
onError(e) {
|
|
486
|
-
q("delete", "delete_failed", e), D("Unable to delete the schedule. Please try again later."),
|
|
486
|
+
q("delete", "delete_failed", e), D("Unable to delete the schedule. Please try again later."), E(!1), j(!1);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}),
|
|
490
|
-
isDeleted:
|
|
491
|
-
errors:
|
|
490
|
+
isDeleted: A,
|
|
491
|
+
errors: y
|
|
492
492
|
};
|
|
493
493
|
}, X = {
|
|
494
494
|
formWrapper: "_formWrapper_rutu9_8",
|
|
@@ -508,21 +508,21 @@ var Y = {
|
|
|
508
508
|
}, xe = (e) => e?.length ? e.flatMap((e) => e.columns?.map((t) => ({
|
|
509
509
|
...t,
|
|
510
510
|
_tableName: e.tableName
|
|
511
|
-
})) || []) : [], Se = (e, t, n) => he(e, !!t).filter((e) => D(e, n)), Ce = ({ onCancel: e, getInternalToken: t, scheduleReportConfig: n, chartOptions: r, externalDashboardId: i, sharingSettingsId: a, onComplete:
|
|
511
|
+
})) || []) : [], Se = (e, t, n) => he(e, !!t).filter((e) => D(e, n)), Ce = ({ onCancel: e, getInternalToken: t, scheduleReportConfig: n, chartOptions: r, externalDashboardId: i, sharingSettingsId: a, onComplete: g, clientDropDown: y, clientState: S, isEmbed: T, dashboardFilters: te, workspaceId: N, datasourceId: ie, encryptedClientId: de, companyTenancyType: fe, clientColumnType: pe }) => {
|
|
512
512
|
let { control: F, register: I, setValue: z, watch: W, onSave: he, isLoading: G, error: ge, isSuccess: _e, scheduleReportConfig: K, onDelete: ve, isDeleted: q, errors: J } = be({
|
|
513
513
|
onCancel: e,
|
|
514
514
|
getInternalToken: t,
|
|
515
515
|
scheduleReportConfig: n,
|
|
516
516
|
externalDashboardId: i,
|
|
517
517
|
sharingSettingsId: a,
|
|
518
|
-
onComplete:
|
|
519
|
-
clientState:
|
|
520
|
-
}), { data: Y, token: ye } = s(), Ce =
|
|
518
|
+
onComplete: g,
|
|
519
|
+
clientState: S
|
|
520
|
+
}), { data: Y, token: ye } = s(), Ce = N || Y?.workspace?.id || "", we = ie || Y?.datasourceId || "", Te = de || "", Ee = fe || Y?.companyTenancyType, De = pe || Y?.clientColumnType, Z = R(() => S?.isDisableClient ? [] : S?.clients || [], [S?.clients, S?.isDisableClient]), Q = R(() => Z.map((e) => e.value).filter((e) => e != null && e !== ""), [Z]), Oe = C({
|
|
521
521
|
tenancyLevel: Ee,
|
|
522
|
-
isDisableClient:
|
|
522
|
+
isDisableClient: S?.isDisableClient === !0,
|
|
523
523
|
selectedClientCount: Z.length
|
|
524
524
|
}), ke = R(() => {
|
|
525
|
-
let e =
|
|
525
|
+
let e = te || Y?.externalDashboard?.filters, t = Z[0]?.value;
|
|
526
526
|
if (!e?.length || Ee !== "DATABASE" || Z.length !== 1 || !t) return e;
|
|
527
527
|
let n = (e) => {
|
|
528
528
|
let n = e || "", r = n.lastIndexOf("."), i = r >= 0 ? n.slice(r + 1) : n;
|
|
@@ -541,16 +541,16 @@ var Y = {
|
|
|
541
541
|
}))
|
|
542
542
|
}));
|
|
543
543
|
}, [
|
|
544
|
-
|
|
544
|
+
te,
|
|
545
545
|
Y?.externalDashboard?.filters,
|
|
546
546
|
Ee,
|
|
547
547
|
Z
|
|
548
548
|
]), [Ae, je] = B(!0), [Me, Ne] = B(!0), [Pe, Fe] = B(!0), [Ie, Le] = B(!1), [Re, ze] = B({
|
|
549
549
|
showDelete: !1,
|
|
550
550
|
deleteFunction: () => {}
|
|
551
|
-
}), [Be, Ve] = B(""), $ = R(() => xe(ke), [ke]), He = R(() => Se($,
|
|
551
|
+
}), [Be, Ve] = B(""), $ = R(() => xe(ke), [ke]), He = R(() => Se($, T, Q), [
|
|
552
552
|
$,
|
|
553
|
-
|
|
553
|
+
T,
|
|
554
554
|
Q
|
|
555
555
|
]), Ue = R(() => He.map((e) => ({
|
|
556
556
|
value: e.label || e.name,
|
|
@@ -653,7 +653,7 @@ var Y = {
|
|
|
653
653
|
},
|
|
654
654
|
hint: i?.hint
|
|
655
655
|
};
|
|
656
|
-
}, $e = Qe("orientation",
|
|
656
|
+
}, $e = Qe("orientation", P, oe.orientation), et = Qe("density", ce, oe.density), tt = Qe("tableMode", ue, oe.tableMode), nt = Qe("deliveryMode", ne, ae);
|
|
657
657
|
return /* @__PURE__ */ H(V, { children: /* @__PURE__ */ U("form", {
|
|
658
658
|
className: "dbn:w-full",
|
|
659
659
|
style: { height: "calc(100% - 44px)" },
|
|
@@ -668,12 +668,12 @@ var Y = {
|
|
|
668
668
|
variant: "popover",
|
|
669
669
|
leftIcon: /* @__PURE__ */ H("span", {
|
|
670
670
|
className: Ae ? "" : "dbn:-rotate-90",
|
|
671
|
-
children: /* @__PURE__ */ H(
|
|
671
|
+
children: /* @__PURE__ */ H(M, { name: "caret-down-fill" })
|
|
672
672
|
}),
|
|
673
673
|
onClick: () => je(!Ae),
|
|
674
674
|
children: "General"
|
|
675
675
|
}),
|
|
676
|
-
Ae && /* @__PURE__ */ U(
|
|
676
|
+
Ae && /* @__PURE__ */ U(A, {
|
|
677
677
|
direction: "col",
|
|
678
678
|
className: "dbn:gap-2 dbn:border-b dbn:border-secondary dbn:pb-5",
|
|
679
679
|
children: [/* @__PURE__ */ H(c, {
|
|
@@ -706,17 +706,17 @@ var Y = {
|
|
|
706
706
|
variant: "popover",
|
|
707
707
|
leftIcon: /* @__PURE__ */ H("span", {
|
|
708
708
|
className: Me ? "" : "dbn:-rotate-90",
|
|
709
|
-
children: /* @__PURE__ */ H(
|
|
709
|
+
children: /* @__PURE__ */ H(M, { name: "caret-down-fill" })
|
|
710
710
|
}),
|
|
711
711
|
onClick: () => Ne(!Me),
|
|
712
712
|
children: "Report Content Settings"
|
|
713
713
|
}),
|
|
714
|
-
Me && /* @__PURE__ */ U(
|
|
714
|
+
Me && /* @__PURE__ */ U(A, {
|
|
715
715
|
direction: "col",
|
|
716
716
|
className: "dbn:gap-2 dbn:border-b dbn:border-secondary dbn:pb-5",
|
|
717
717
|
children: [
|
|
718
718
|
" ",
|
|
719
|
-
/* @__PURE__ */ H(
|
|
719
|
+
/* @__PURE__ */ H(E, {
|
|
720
720
|
control: F,
|
|
721
721
|
name: "charts",
|
|
722
722
|
rules: { validate: (e) => e && e.length > 0 ? !0 : "Please select at least one chart" },
|
|
@@ -739,13 +739,13 @@ var Y = {
|
|
|
739
739
|
children: `${J.charts.message}`
|
|
740
740
|
})] })
|
|
741
741
|
}),
|
|
742
|
-
!
|
|
742
|
+
!y && (S?.isDisableClient || K?.timeConfigurations?.isDisableClient || Y?.isAllClient) && /* @__PURE__ */ H(m, {
|
|
743
743
|
variant: "body-text-3",
|
|
744
744
|
color: "warning",
|
|
745
745
|
children: "Recipients see data for all clients."
|
|
746
746
|
}),
|
|
747
|
-
|
|
748
|
-
t && /* @__PURE__ */ U(
|
|
747
|
+
y,
|
|
748
|
+
t && /* @__PURE__ */ U(A, {
|
|
749
749
|
className: "dbn:gap-2",
|
|
750
750
|
alignItems: "center",
|
|
751
751
|
children: [/* @__PURE__ */ H(me, {
|
|
@@ -759,10 +759,10 @@ var Y = {
|
|
|
759
759
|
text: "Adds a ‘View Full Dashboard’ button in the email, allowing recipients to access metrics in detail.",
|
|
760
760
|
position: "bottom",
|
|
761
761
|
isSingleLineTxt: !1,
|
|
762
|
-
children: /* @__PURE__ */ H(
|
|
762
|
+
children: /* @__PURE__ */ H(M, { name: "info" })
|
|
763
763
|
})]
|
|
764
764
|
}),
|
|
765
|
-
/* @__PURE__ */ U(
|
|
765
|
+
/* @__PURE__ */ U(A, {
|
|
766
766
|
className: "dbn:gap-2",
|
|
767
767
|
alignItems: "center",
|
|
768
768
|
children: [/* @__PURE__ */ H(me, {
|
|
@@ -776,17 +776,17 @@ var Y = {
|
|
|
776
776
|
text: "Share the files in the email, allowing recipients to download.",
|
|
777
777
|
position: "bottom",
|
|
778
778
|
isSingleLineTxt: !1,
|
|
779
|
-
children: /* @__PURE__ */ H(
|
|
779
|
+
children: /* @__PURE__ */ H(M, { name: "info" })
|
|
780
780
|
})]
|
|
781
781
|
}),
|
|
782
|
-
!!W("isDownloadFile") && /* @__PURE__ */ H(
|
|
782
|
+
!!W("isDownloadFile") && /* @__PURE__ */ H(E, {
|
|
783
783
|
control: F,
|
|
784
784
|
name: "downloadFileFormat",
|
|
785
785
|
rules: { validate: (e) => e ? !0 : "Please select file format" },
|
|
786
786
|
render: ({ field: e }) => /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(d, {
|
|
787
787
|
label: "Download File Format",
|
|
788
|
-
selectedOption:
|
|
789
|
-
options:
|
|
788
|
+
selectedOption: O.find((t) => e.value === t.value) || O[0],
|
|
789
|
+
options: O,
|
|
790
790
|
onChange: (t) => {
|
|
791
791
|
e.onChange(t?.value);
|
|
792
792
|
},
|
|
@@ -814,7 +814,7 @@ var Y = {
|
|
|
814
814
|
buttonWidth: "100%",
|
|
815
815
|
menuWidth: "100%",
|
|
816
816
|
isSearchEnabled: !0
|
|
817
|
-
}), Xe.length > 0 && /* @__PURE__ */ H(
|
|
817
|
+
}), Xe.length > 0 && /* @__PURE__ */ H(b, {
|
|
818
818
|
appliedfilters: Ke,
|
|
819
819
|
setAppliedFilters: qe,
|
|
820
820
|
filters: Xe,
|
|
@@ -827,8 +827,8 @@ var Y = {
|
|
|
827
827
|
encryptedClientId: Te,
|
|
828
828
|
clientId: Z[0]?.value ?? Y?.clientId,
|
|
829
829
|
clientScopeValues: Q,
|
|
830
|
-
isAllClient:
|
|
831
|
-
isFrontendApp: !
|
|
830
|
+
isAllClient: S?.isDisableClient ? !0 : !Z.length && Y?.isAllClient,
|
|
831
|
+
isFrontendApp: !T,
|
|
832
832
|
tenancyLevel: Ee || "TABLE",
|
|
833
833
|
clientColumnType: De || "STRING",
|
|
834
834
|
theme: {
|
|
@@ -853,23 +853,23 @@ var Y = {
|
|
|
853
853
|
variant: "popover",
|
|
854
854
|
leftIcon: /* @__PURE__ */ H("span", {
|
|
855
855
|
className: Ie ? "" : "dbn:-rotate-90",
|
|
856
|
-
children: /* @__PURE__ */ H(
|
|
856
|
+
children: /* @__PURE__ */ H(M, { name: "caret-down-fill" })
|
|
857
857
|
}),
|
|
858
858
|
"data-testid": "schedule-page-setup-toggle",
|
|
859
859
|
onClick: () => Le(!Ie),
|
|
860
860
|
children: "Page Setup & Delivery"
|
|
861
861
|
}),
|
|
862
|
-
Ie && /* @__PURE__ */ U(
|
|
862
|
+
Ie && /* @__PURE__ */ U(A, {
|
|
863
863
|
direction: "col",
|
|
864
864
|
className: "dbn:gap-3 dbn:border-b dbn:border-secondary dbn:pb-5",
|
|
865
865
|
children: [
|
|
866
|
-
/* @__PURE__ */ U(
|
|
866
|
+
/* @__PURE__ */ U(A, {
|
|
867
867
|
direction: "col",
|
|
868
868
|
className: "dbn:gap-1",
|
|
869
869
|
children: [/* @__PURE__ */ H(d, {
|
|
870
870
|
label: "Orientation",
|
|
871
871
|
selectedOption: $e.selectedOption,
|
|
872
|
-
options: Ze(
|
|
872
|
+
options: Ze(P),
|
|
873
873
|
onChange: (e) => z("orientation", e?.value),
|
|
874
874
|
buttonWidth: "100%",
|
|
875
875
|
menuWidth: "100%"
|
|
@@ -879,7 +879,7 @@ var Y = {
|
|
|
879
879
|
children: $e.hint
|
|
880
880
|
})]
|
|
881
881
|
}),
|
|
882
|
-
/* @__PURE__ */ U(
|
|
882
|
+
/* @__PURE__ */ U(A, {
|
|
883
883
|
direction: "col",
|
|
884
884
|
className: "dbn:gap-1",
|
|
885
885
|
children: [/* @__PURE__ */ H(d, {
|
|
@@ -895,7 +895,7 @@ var Y = {
|
|
|
895
895
|
children: et.hint
|
|
896
896
|
})]
|
|
897
897
|
}),
|
|
898
|
-
/* @__PURE__ */ U(
|
|
898
|
+
/* @__PURE__ */ U(A, {
|
|
899
899
|
direction: "col",
|
|
900
900
|
className: "dbn:gap-1",
|
|
901
901
|
children: [/* @__PURE__ */ H(d, {
|
|
@@ -919,13 +919,13 @@ var Y = {
|
|
|
919
919
|
max: 5e3,
|
|
920
920
|
register: I("tableRowCap", { setValueAs: (e) => `${e ?? ""}`.trim() === "" ? void 0 : re(Number(e)) })
|
|
921
921
|
}),
|
|
922
|
-
/* @__PURE__ */ U(
|
|
922
|
+
/* @__PURE__ */ U(A, {
|
|
923
923
|
direction: "col",
|
|
924
924
|
className: "dbn:gap-1",
|
|
925
925
|
children: [/* @__PURE__ */ H(d, {
|
|
926
926
|
label: "Deliver as",
|
|
927
927
|
selectedOption: nt.selectedOption,
|
|
928
|
-
options: Ze(
|
|
928
|
+
options: Ze(ne),
|
|
929
929
|
onChange: (e) => z("deliveryMode", e?.value),
|
|
930
930
|
buttonWidth: "100%",
|
|
931
931
|
menuWidth: "100%"
|
|
@@ -941,22 +941,22 @@ var Y = {
|
|
|
941
941
|
variant: "popover",
|
|
942
942
|
leftIcon: /* @__PURE__ */ H("span", {
|
|
943
943
|
className: Pe ? "" : "dbn:-rotate-90",
|
|
944
|
-
children: /* @__PURE__ */ H(
|
|
944
|
+
children: /* @__PURE__ */ H(M, { name: "caret-down-fill" })
|
|
945
945
|
}),
|
|
946
946
|
onClick: () => Fe(!Pe),
|
|
947
947
|
children: "Schedule Settings"
|
|
948
948
|
}),
|
|
949
|
-
Pe && /* @__PURE__ */ U(
|
|
949
|
+
Pe && /* @__PURE__ */ U(A, {
|
|
950
950
|
direction: "col",
|
|
951
951
|
className: "dbn:gap-2 dbn:pb-5",
|
|
952
952
|
children: [
|
|
953
953
|
" ",
|
|
954
|
-
/* @__PURE__ */ H(
|
|
954
|
+
/* @__PURE__ */ H(E, {
|
|
955
955
|
control: F,
|
|
956
956
|
name: "frequency",
|
|
957
957
|
render: ({ field: e }) => /* @__PURE__ */ H(d, {
|
|
958
958
|
label: "Frequency of emails",
|
|
959
|
-
options:
|
|
959
|
+
options: ee,
|
|
960
960
|
selectedOption: {
|
|
961
961
|
value: e.value,
|
|
962
962
|
label: e.value
|
|
@@ -969,7 +969,7 @@ var Y = {
|
|
|
969
969
|
}),
|
|
970
970
|
(() => {
|
|
971
971
|
let e = W()?.frequency;
|
|
972
|
-
return e === "oneTime" ? /* @__PURE__ */ H(
|
|
972
|
+
return e === "oneTime" ? /* @__PURE__ */ H(k, {
|
|
973
973
|
label: "Date",
|
|
974
974
|
isEnableSingleDate: !0,
|
|
975
975
|
minDate: /* @__PURE__ */ new Date(),
|
|
@@ -982,7 +982,7 @@ var Y = {
|
|
|
982
982
|
} : void 0
|
|
983
983
|
}) : e === "Monthly" ? /* @__PURE__ */ H("div", { children: /* @__PURE__ */ H(p, {
|
|
984
984
|
label: "Send on",
|
|
985
|
-
options:
|
|
985
|
+
options: j,
|
|
986
986
|
selectedOption: W("newDate")?.length ? W("newDate") : [],
|
|
987
987
|
onChange: (e) => {
|
|
988
988
|
z("newDate", e);
|
|
@@ -991,12 +991,12 @@ var Y = {
|
|
|
991
991
|
menuWidth: "100%"
|
|
992
992
|
}) }) : e === "Daily" ? null : /* @__PURE__ */ H("div", { children: /* @__PURE__ */ H(p, {
|
|
993
993
|
label: "Send on",
|
|
994
|
-
options:
|
|
995
|
-
selectedOption:
|
|
994
|
+
options: x,
|
|
995
|
+
selectedOption: x?.filter((e) => W("weekDays")?.[e.value]),
|
|
996
996
|
onChange: (e) => {
|
|
997
|
-
e?.length ?
|
|
997
|
+
e?.length ? x?.forEach((t) => {
|
|
998
998
|
z(`weekDays.${t.value}`, e?.some((e) => t.value === e?.value));
|
|
999
|
-
}) :
|
|
999
|
+
}) : x?.forEach((e) => {
|
|
1000
1000
|
z(`weekDays.${e.value}`, !1);
|
|
1001
1001
|
});
|
|
1002
1002
|
},
|
|
@@ -1055,13 +1055,13 @@ var Y = {
|
|
|
1055
1055
|
id: "minutes"
|
|
1056
1056
|
})
|
|
1057
1057
|
}),
|
|
1058
|
-
/* @__PURE__ */ H(
|
|
1058
|
+
/* @__PURE__ */ H(E, {
|
|
1059
1059
|
control: F,
|
|
1060
1060
|
name: "time",
|
|
1061
1061
|
render: ({ field: e }) => /* @__PURE__ */ H("div", {
|
|
1062
1062
|
className: X["time-dropdown-field"],
|
|
1063
1063
|
children: /* @__PURE__ */ H(d, {
|
|
1064
|
-
options:
|
|
1064
|
+
options: w,
|
|
1065
1065
|
selectedOption: {
|
|
1066
1066
|
value: e.value,
|
|
1067
1067
|
label: e.value
|
|
@@ -1073,13 +1073,13 @@ var Y = {
|
|
|
1073
1073
|
})
|
|
1074
1074
|
})
|
|
1075
1075
|
}),
|
|
1076
|
-
/* @__PURE__ */ H(
|
|
1076
|
+
/* @__PURE__ */ H(E, {
|
|
1077
1077
|
control: F,
|
|
1078
1078
|
name: "timezone",
|
|
1079
1079
|
render: ({ field: e }) => /* @__PURE__ */ H("div", {
|
|
1080
1080
|
className: X["time-dropdown-field"],
|
|
1081
1081
|
children: /* @__PURE__ */ H(d, {
|
|
1082
|
-
options:
|
|
1082
|
+
options: _,
|
|
1083
1083
|
selectedOption: {
|
|
1084
1084
|
value: e.value,
|
|
1085
1085
|
label: e.value
|
|
@@ -1096,7 +1096,7 @@ var Y = {
|
|
|
1096
1096
|
})
|
|
1097
1097
|
]
|
|
1098
1098
|
}),
|
|
1099
|
-
ge && /* @__PURE__ */ H(
|
|
1099
|
+
ge && /* @__PURE__ */ H(v, { message: ge }),
|
|
1100
1100
|
_e && /* @__PURE__ */ H(m, {
|
|
1101
1101
|
variant: "body-text-2",
|
|
1102
1102
|
color: "success",
|
|
@@ -1110,11 +1110,11 @@ var Y = {
|
|
|
1110
1110
|
]
|
|
1111
1111
|
})
|
|
1112
1112
|
}),
|
|
1113
|
-
t && /* @__PURE__ */ H(
|
|
1113
|
+
t && /* @__PURE__ */ H(A, {
|
|
1114
1114
|
direction: "row",
|
|
1115
1115
|
justify: "end",
|
|
1116
1116
|
className: "dbn:w-full dbn:border-t dbn:border-secondary dbn:py-3 dbn:h-[60px] dbn:px-5 dbn:items-center",
|
|
1117
|
-
children: /* @__PURE__ */ U(
|
|
1117
|
+
children: /* @__PURE__ */ U(A, {
|
|
1118
1118
|
className: "dbn:gap-2",
|
|
1119
1119
|
children: [n || K ? /* @__PURE__ */ H(l, {
|
|
1120
1120
|
type: "button",
|
|
@@ -1175,7 +1175,7 @@ var Y = {
|
|
|
1175
1175
|
className: "dbn:w-full dbn:flex dbn:items-center dbn:justify-between",
|
|
1176
1176
|
children: [/* @__PURE__ */ U("div", {
|
|
1177
1177
|
className: "dbn:flex dbn:items-center dbn:gap-2",
|
|
1178
|
-
children: [/* @__PURE__ */ H(
|
|
1178
|
+
children: [/* @__PURE__ */ H(M, {
|
|
1179
1179
|
name: "delete",
|
|
1180
1180
|
color: "alert"
|
|
1181
1181
|
}), "Irreversible action"]
|
|
@@ -1186,7 +1186,7 @@ var Y = {
|
|
|
1186
1186
|
showDelete: !1,
|
|
1187
1187
|
deleteFunction: () => {}
|
|
1188
1188
|
}),
|
|
1189
|
-
leftIcon: /* @__PURE__ */ H(
|
|
1189
|
+
leftIcon: /* @__PURE__ */ H(M, {
|
|
1190
1190
|
name: "cross",
|
|
1191
1191
|
size: "sm"
|
|
1192
1192
|
}),
|
|
@@ -1204,7 +1204,7 @@ var Y = {
|
|
|
1204
1204
|
}),
|
|
1205
1205
|
children: [/* @__PURE__ */ H("div", {
|
|
1206
1206
|
className: "dbn:pt-4 dbn:pb-8 dbn:pl-6",
|
|
1207
|
-
children: /* @__PURE__ */ H(
|
|
1207
|
+
children: /* @__PURE__ */ H(A, {
|
|
1208
1208
|
justify: "start",
|
|
1209
1209
|
alignItems: "center",
|
|
1210
1210
|
className: "dbn:gap-2",
|
|
@@ -1246,13 +1246,13 @@ var Y = {
|
|
|
1246
1246
|
]
|
|
1247
1247
|
}) });
|
|
1248
1248
|
}, we = ({ props: { chartOptions: e, getInternalToken: n, externalDashboardId: r, sharingSettingsId: i, onComplete: a, isShowSettings: c, setShowSettings: u, onServerEvent: d, isEmbed: f } }) => {
|
|
1249
|
-
let { token: p, data:
|
|
1249
|
+
let { token: p, data: v } = s(), [y, b] = B(), [x, S] = B(!1), [C, w] = B({
|
|
1250
1250
|
isShowDelete: !1,
|
|
1251
1251
|
deleteRowId: ""
|
|
1252
1252
|
}), T = () => w({
|
|
1253
1253
|
isShowDelete: !1,
|
|
1254
1254
|
deleteRowId: ""
|
|
1255
|
-
}), { mutate: E } =
|
|
1255
|
+
}), { mutate: E } = g(), ee = R(() => [
|
|
1256
1256
|
{
|
|
1257
1257
|
name: "REPORT TITLE",
|
|
1258
1258
|
columnKey: "name",
|
|
@@ -1280,7 +1280,7 @@ var Y = {
|
|
|
1280
1280
|
name: "SCHEDULED FOR",
|
|
1281
1281
|
columnKey: "delete",
|
|
1282
1282
|
columnCell: (e) => {
|
|
1283
|
-
let t = "", n =
|
|
1283
|
+
let t = "", n = _?.find((t) => t?.value === e?.timeConfigurations?.timezone)?.label;
|
|
1284
1284
|
if (e?.timeConfigurations?.frequency === "Weekly") {
|
|
1285
1285
|
let r = e?.timeConfigurations?.weekDays, i = Object.keys(r).filter((e) => r[e]);
|
|
1286
1286
|
t = `${i?.length ? `Every ${i?.join(", ")}, ` : ""}${e?.timeConfigurations?.hours ? `${e?.timeConfigurations?.hours}:${`${e?.timeConfigurations?.minutes ?? "0"}`.padStart(2, "0")} ${e?.timeConfigurations?.time}` : ""} ${n}`;
|
|
@@ -1296,10 +1296,10 @@ var Y = {
|
|
|
1296
1296
|
tabIndex: 0,
|
|
1297
1297
|
onKeyDown: () => {},
|
|
1298
1298
|
onClick: (e) => e.stopPropagation(),
|
|
1299
|
-
children: /* @__PURE__ */ H(
|
|
1299
|
+
children: /* @__PURE__ */ H(te, {
|
|
1300
1300
|
buttonContent: /* @__PURE__ */ H(l, {
|
|
1301
1301
|
variant: "popover",
|
|
1302
|
-
children: /* @__PURE__ */ H(
|
|
1302
|
+
children: /* @__PURE__ */ H(M, { name: "kebab-menu-horizontal" })
|
|
1303
1303
|
}),
|
|
1304
1304
|
position: "bottom",
|
|
1305
1305
|
tabMenu: !0,
|
|
@@ -1320,10 +1320,10 @@ var Y = {
|
|
|
1320
1320
|
});
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
], [E, a]), { data:
|
|
1323
|
+
], [E, a]), { data: D, isLoading: O, refetch: k, isFetching: j } = ie(p || "", r || "", v?.embedDataAppId || null), N = C.emails?.length || 0, ne = R(() => {
|
|
1324
1324
|
let e = C.subject?.trim(), t = e ? `"${e}"` : "this schedule";
|
|
1325
|
-
return
|
|
1326
|
-
}, [C.subject,
|
|
1325
|
+
return N ? `Delete ${t}? ${N} ${N === 1 ? "recipient" : "recipients"} stop receiving this report, and it cannot be restored.` : `Delete ${t}? It stops being sent, and it cannot be restored.`;
|
|
1326
|
+
}, [C.subject, N]), P = R(() => D?.scheduleEmailReports?.length && D?.scheduleEmailReports || [], [D]);
|
|
1327
1327
|
return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(pe, {
|
|
1328
1328
|
isOpen: c,
|
|
1329
1329
|
onClose: () => {
|
|
@@ -1333,79 +1333,79 @@ var Y = {
|
|
|
1333
1333
|
size: "wide",
|
|
1334
1334
|
side: "right",
|
|
1335
1335
|
hideFooter: !0,
|
|
1336
|
-
icon: /* @__PURE__ */ H(
|
|
1336
|
+
icon: /* @__PURE__ */ H(M, { name: "schedule" }),
|
|
1337
1337
|
dataTestTitle: "schedulePanel",
|
|
1338
|
-
children: /* @__PURE__ */ U(
|
|
1338
|
+
children: /* @__PURE__ */ U(A, {
|
|
1339
1339
|
className: "dbn:pt-5 dbn:gap-2 dbn:w-full dbn:h-full",
|
|
1340
1340
|
direction: "col",
|
|
1341
1341
|
children: [
|
|
1342
|
-
/* @__PURE__ */ U(
|
|
1342
|
+
/* @__PURE__ */ U(A, {
|
|
1343
1343
|
className: "dbn:w-full dbn:px-5",
|
|
1344
1344
|
alignItems: "center",
|
|
1345
1345
|
justify: "between",
|
|
1346
|
-
children: [/* @__PURE__ */ U(
|
|
1346
|
+
children: [/* @__PURE__ */ U(A, {
|
|
1347
1347
|
className: "dbn:gap-1.5",
|
|
1348
1348
|
alignItems: "start",
|
|
1349
1349
|
direction: "col",
|
|
1350
|
-
children: [/* @__PURE__ */ U(
|
|
1350
|
+
children: [/* @__PURE__ */ U(A, {
|
|
1351
1351
|
className: "dbn:gap-2",
|
|
1352
1352
|
alignItems: "center",
|
|
1353
|
-
children: [
|
|
1353
|
+
children: [x ? /* @__PURE__ */ H(l, {
|
|
1354
1354
|
variant: "tab",
|
|
1355
|
-
leftIcon: /* @__PURE__ */ H(
|
|
1355
|
+
leftIcon: /* @__PURE__ */ H(M, { name: "arrow-left" }),
|
|
1356
1356
|
onClick: () => {
|
|
1357
|
-
|
|
1357
|
+
S(!1);
|
|
1358
1358
|
},
|
|
1359
1359
|
className: "cta-tertiary"
|
|
1360
|
-
}) : /* @__PURE__ */ H(
|
|
1360
|
+
}) : /* @__PURE__ */ H(M, { name: "schedule" }), /* @__PURE__ */ H(m, {
|
|
1361
1361
|
variant: "heading-4",
|
|
1362
|
-
children:
|
|
1362
|
+
children: x ? "Create a Schedule" : "Report Scheduler"
|
|
1363
1363
|
})]
|
|
1364
|
-
}),
|
|
1364
|
+
}), x ? null : /* @__PURE__ */ H(m, {
|
|
1365
1365
|
variant: "body-text-3",
|
|
1366
1366
|
color: "gray",
|
|
1367
1367
|
children: "Manage report schedules for this dashboard."
|
|
1368
1368
|
})]
|
|
1369
|
-
}),
|
|
1369
|
+
}), x ? null : /* @__PURE__ */ U(A, {
|
|
1370
1370
|
className: "dbn:gap-4",
|
|
1371
1371
|
alignItems: "center",
|
|
1372
|
-
children: [
|
|
1372
|
+
children: [P.length > 0 ? /* @__PURE__ */ H(l, {
|
|
1373
1373
|
variant: "secondary",
|
|
1374
|
-
leftIcon: /* @__PURE__ */ H(
|
|
1374
|
+
leftIcon: /* @__PURE__ */ H(M, {
|
|
1375
1375
|
name: "plus",
|
|
1376
1376
|
size: "sm"
|
|
1377
1377
|
}),
|
|
1378
1378
|
onClick: () => {
|
|
1379
|
-
|
|
1379
|
+
b(void 0), S(!0);
|
|
1380
1380
|
},
|
|
1381
1381
|
size: "small",
|
|
1382
|
-
isDisabled:
|
|
1382
|
+
isDisabled: O || j,
|
|
1383
1383
|
className: "cta-secondary",
|
|
1384
1384
|
children: "Schedule"
|
|
1385
1385
|
}) : null, /* @__PURE__ */ H(l, {
|
|
1386
1386
|
variant: "popover",
|
|
1387
|
-
leftIcon: /* @__PURE__ */ H(
|
|
1387
|
+
leftIcon: /* @__PURE__ */ H(M, {
|
|
1388
1388
|
name: "cross",
|
|
1389
1389
|
size: "xs"
|
|
1390
1390
|
}),
|
|
1391
1391
|
onClick: () => {
|
|
1392
|
-
|
|
1392
|
+
b(void 0), S(!1), u(!1);
|
|
1393
1393
|
}
|
|
1394
1394
|
})]
|
|
1395
1395
|
})]
|
|
1396
1396
|
}),
|
|
1397
|
-
|
|
1397
|
+
x ? null : /* @__PURE__ */ H("div", {
|
|
1398
1398
|
className: "dbn:w-full dbn:h-full dbn:p-5",
|
|
1399
|
-
children:
|
|
1399
|
+
children: O || j ? /* @__PURE__ */ H("div", {
|
|
1400
1400
|
className: "dbn:w-full dbn:h-full dbn:flex dbn:items-center dbn:justify-center",
|
|
1401
1401
|
children: /* @__PURE__ */ H(F, {})
|
|
1402
|
-
}) :
|
|
1402
|
+
}) : P?.length ? /* @__PURE__ */ H("div", {
|
|
1403
1403
|
className: "dbn:max-w-full dbn:w-auto",
|
|
1404
1404
|
children: /* @__PURE__ */ H(W, {
|
|
1405
|
-
data:
|
|
1406
|
-
headers:
|
|
1405
|
+
data: P,
|
|
1406
|
+
headers: ee,
|
|
1407
1407
|
onRowClick: (e) => {
|
|
1408
|
-
|
|
1408
|
+
b(e), S(!0);
|
|
1409
1409
|
}
|
|
1410
1410
|
})
|
|
1411
1411
|
}) : /* @__PURE__ */ H("div", {
|
|
@@ -1416,12 +1416,12 @@ var Y = {
|
|
|
1416
1416
|
isNoReports: !0,
|
|
1417
1417
|
children: /* @__PURE__ */ H(l, {
|
|
1418
1418
|
variant: "primary",
|
|
1419
|
-
leftIcon: /* @__PURE__ */ H(
|
|
1419
|
+
leftIcon: /* @__PURE__ */ H(M, {
|
|
1420
1420
|
name: "plus",
|
|
1421
1421
|
size: "sm"
|
|
1422
1422
|
}),
|
|
1423
1423
|
onClick: () => {
|
|
1424
|
-
|
|
1424
|
+
b(void 0), S(!0);
|
|
1425
1425
|
},
|
|
1426
1426
|
size: "small",
|
|
1427
1427
|
className: "cta-primary",
|
|
@@ -1430,17 +1430,17 @@ var Y = {
|
|
|
1430
1430
|
})
|
|
1431
1431
|
})
|
|
1432
1432
|
}),
|
|
1433
|
-
|
|
1433
|
+
x && /* @__PURE__ */ H(Ce, {
|
|
1434
1434
|
onCancel: () => {
|
|
1435
1435
|
d?.("EXIT_SCHEDULED_REPORT_MODE"), u(!1);
|
|
1436
1436
|
},
|
|
1437
1437
|
chartOptions: e,
|
|
1438
1438
|
getInternalToken: n,
|
|
1439
|
-
scheduleReportConfig:
|
|
1439
|
+
scheduleReportConfig: y,
|
|
1440
1440
|
externalDashboardId: r,
|
|
1441
1441
|
sharingSettingsId: i,
|
|
1442
1442
|
onComplete: () => {
|
|
1443
|
-
a?.(), u(!1),
|
|
1443
|
+
a?.(), u(!1), S(!1), b(void 0), k();
|
|
1444
1444
|
},
|
|
1445
1445
|
isEmbed: f
|
|
1446
1446
|
})
|
|
@@ -1451,7 +1451,7 @@ var Y = {
|
|
|
1451
1451
|
className: "dbn:w-full dbn:flex dbn:items-center dbn:justify-between",
|
|
1452
1452
|
children: [/* @__PURE__ */ U("div", {
|
|
1453
1453
|
className: "dbn:flex dbn:items-center dbn:gap-2",
|
|
1454
|
-
children: [/* @__PURE__ */ H(
|
|
1454
|
+
children: [/* @__PURE__ */ H(M, {
|
|
1455
1455
|
name: "delete",
|
|
1456
1456
|
color: "alert"
|
|
1457
1457
|
}), "Irreversible action"]
|
|
@@ -1459,7 +1459,7 @@ var Y = {
|
|
|
1459
1459
|
variant: "tertiary",
|
|
1460
1460
|
type: "button",
|
|
1461
1461
|
onClick: T,
|
|
1462
|
-
leftIcon: /* @__PURE__ */ H(
|
|
1462
|
+
leftIcon: /* @__PURE__ */ H(M, {
|
|
1463
1463
|
name: "cross",
|
|
1464
1464
|
size: "sm"
|
|
1465
1465
|
}),
|
|
@@ -1474,14 +1474,14 @@ var Y = {
|
|
|
1474
1474
|
onClose: T,
|
|
1475
1475
|
children: [/* @__PURE__ */ H("div", {
|
|
1476
1476
|
className: "dbn:pt-4 dbn:pb-8 dbn:pl-6 dbn:pr-6",
|
|
1477
|
-
children: /* @__PURE__ */ U(
|
|
1477
|
+
children: /* @__PURE__ */ U(A, {
|
|
1478
1478
|
justify: "start",
|
|
1479
1479
|
alignItems: "start",
|
|
1480
1480
|
className: "dbn:gap-2 dbn:flex-col",
|
|
1481
1481
|
children: [/* @__PURE__ */ H(m, {
|
|
1482
1482
|
variant: "body-text-2",
|
|
1483
|
-
children:
|
|
1484
|
-
}),
|
|
1483
|
+
children: ne
|
|
1484
|
+
}), N > 0 && N <= 5 ? /* @__PURE__ */ H(m, {
|
|
1485
1485
|
variant: "body-text-3",
|
|
1486
1486
|
color: "sec-text",
|
|
1487
1487
|
children: (C.emails || []).join(", ")
|
|
@@ -1507,7 +1507,7 @@ var Y = {
|
|
|
1507
1507
|
id: C?.deleteRowId,
|
|
1508
1508
|
token: p
|
|
1509
1509
|
}, { onSuccess() {
|
|
1510
|
-
|
|
1510
|
+
k(), a?.(), u(!1), T();
|
|
1511
1511
|
} }), T();
|
|
1512
1512
|
},
|
|
1513
1513
|
className: "dbn:bg-alert dbn:hover:bg-discard-hover cta-primary",
|