@databrainhq/plugin 0.17.9-beta.55 → 0.17.9-beta.56
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/webcomponents.es.js +153 -153
- package/dist/webcomponents.umd.js +1 -1
- package/package.json +1 -1
package/dist/webcomponents.es.js
CHANGED
|
@@ -20206,12 +20206,12 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20206
20206
|
}, [kn]), K(() => {
|
|
20207
20207
|
a(an);
|
|
20208
20208
|
}, [an]);
|
|
20209
|
-
let Nn = q(() => JSON.stringify(A), [A]);
|
|
20209
|
+
let Nn = q(() => JSON.stringify(A), [A]), Pn = J(!1);
|
|
20210
20210
|
K(() => {
|
|
20211
20211
|
let t = !e?.legacyUrlState && Object.keys(A).length > 0;
|
|
20212
|
-
if ((lt.length || t) && e?.isModifyUrl) {
|
|
20212
|
+
if ((lt.length || t || Pn.current) && e?.isModifyUrl) {
|
|
20213
20213
|
let t = [];
|
|
20214
|
-
Ln(wt?.filters || [], (kn || []).flatMap((e) => e?.columns || [])).forEach((e) => {
|
|
20214
|
+
Ln(lt.length && wt?.filters || [], (kn || []).flatMap((e) => e?.columns || [])).forEach((e) => {
|
|
20215
20215
|
let n = Si(e.value, e.operator);
|
|
20216
20216
|
if (n === void 0) return;
|
|
20217
20217
|
let r = {
|
|
@@ -20242,7 +20242,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20242
20242
|
key: `${Ni}${e}`,
|
|
20243
20243
|
value: n
|
|
20244
20244
|
});
|
|
20245
|
-
});
|
|
20245
|
+
}), Pn.current = t.length > 0;
|
|
20246
20246
|
let n = yi({
|
|
20247
20247
|
currentSearch: window.location.search,
|
|
20248
20248
|
dashboardId: o,
|
|
@@ -20278,13 +20278,13 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20278
20278
|
wt,
|
|
20279
20279
|
kn
|
|
20280
20280
|
]);
|
|
20281
|
-
let
|
|
20282
|
-
|
|
20281
|
+
let Fn = J(null), In = va(() => {
|
|
20282
|
+
Fn.current &&= (clearTimeout(Fn.current), null);
|
|
20283
20283
|
}, []);
|
|
20284
|
-
K(() =>
|
|
20285
|
-
let
|
|
20284
|
+
K(() => In, [In]);
|
|
20285
|
+
let Rn = va(() => {
|
|
20286
20286
|
if (z?.current && un?.length) {
|
|
20287
|
-
|
|
20287
|
+
In();
|
|
20288
20288
|
let e = 6, t = () => {
|
|
20289
20289
|
let n = z.current;
|
|
20290
20290
|
if (!n) return;
|
|
@@ -20295,12 +20295,12 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20295
20295
|
}
|
|
20296
20296
|
e += 2, fe((n) => {
|
|
20297
20297
|
let i = Math.min(n + 2, un.length);
|
|
20298
|
-
return e = i, !r && i < un.length && (
|
|
20298
|
+
return e = i, !r && i < un.length && (Fn.current = setTimeout(t, 300)), i;
|
|
20299
20299
|
});
|
|
20300
20300
|
};
|
|
20301
|
-
fe(Math.min(6, un.length)),
|
|
20301
|
+
fe(Math.min(6, un.length)), Fn.current = setTimeout(t, 300);
|
|
20302
20302
|
}
|
|
20303
|
-
}, [un?.length,
|
|
20303
|
+
}, [un?.length, In]), zn = va(() => {
|
|
20304
20304
|
if (!(pe || de >= (un?.length || 0)) && z?.current && un?.length) {
|
|
20305
20305
|
let { scrollTop: e, scrollHeight: t, clientHeight: n } = z.current;
|
|
20306
20306
|
if (t - (e + n) < 100) {
|
|
@@ -20323,8 +20323,8 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20323
20323
|
return;
|
|
20324
20324
|
}
|
|
20325
20325
|
let t = z?.current;
|
|
20326
|
-
return t && un?.length && (!de || de < 6) &&
|
|
20327
|
-
t?.removeEventListener("scroll",
|
|
20326
|
+
return t && un?.length && (!de || de < 6) && Rn(), t?.addEventListener("scroll", zn), () => {
|
|
20327
|
+
t?.removeEventListener("scroll", zn);
|
|
20328
20328
|
};
|
|
20329
20329
|
}
|
|
20330
20330
|
}, [
|
|
@@ -20346,7 +20346,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20346
20346
|
de,
|
|
20347
20347
|
un?.length
|
|
20348
20348
|
]);
|
|
20349
|
-
let
|
|
20349
|
+
let Vn = q(() => Lr(P, e), [P, e]), Un = Vn.canCustomizeLayout, Wn = Vn.canCreateMetric, Gn = q(() => Ch({
|
|
20350
20350
|
sharingSettingsId: P?.sharingSettingsId,
|
|
20351
20351
|
isAllowedToEmailReports: P?.isAllowedToEmailReports,
|
|
20352
20352
|
disableScheduleEmailReports: e?.disableScheduleEmailReports,
|
|
@@ -20357,35 +20357,35 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20357
20357
|
e?.showDashboardActions,
|
|
20358
20358
|
P?.sharingSettingsId,
|
|
20359
20359
|
P?.isAllowedToEmailReports
|
|
20360
|
-
]),
|
|
20360
|
+
]), Kn = Gn.available, qn = !!P?.externalDashboard?.id;
|
|
20361
20361
|
K(() => {
|
|
20362
|
-
w || !
|
|
20362
|
+
w || !qn || F || ne || Gn.reason && Eh(Gn.reason);
|
|
20363
20363
|
}, [
|
|
20364
20364
|
w,
|
|
20365
|
-
|
|
20365
|
+
qn,
|
|
20366
20366
|
F,
|
|
20367
20367
|
ne,
|
|
20368
|
-
|
|
20368
|
+
Gn.reason
|
|
20369
20369
|
]);
|
|
20370
|
-
let
|
|
20370
|
+
let Jn = Vn.canManageMetrics && !!un?.length, Yn = Vn.canCreateDashboardView, Xn = q(() => P?.externalDashboard?.enableViewFilter, [P?.externalDashboard?.enableViewFilter]), Zn = q(() => {
|
|
20371
20371
|
if (e?.dashboardSpacing?.verticalGap !== void 0 || e?.dashboardSpacing?.horizontalGap !== void 0) return op({
|
|
20372
20372
|
verticalMargin: e?.dashboardSpacing?.verticalGap,
|
|
20373
20373
|
horizontalMargin: e?.dashboardSpacing?.horizontalGap
|
|
20374
20374
|
});
|
|
20375
|
-
}, [e?.dashboardSpacing]),
|
|
20376
|
-
Object.keys(
|
|
20375
|
+
}, [e?.dashboardSpacing]), Qn = () => {
|
|
20376
|
+
Object.keys(Zn || {})?.length ? Ut(op(Zn)) : Object.keys(W || {})?.length ? Ut(op(W)) : Object.keys(P?.externalDashboard?.gridMargin || {})?.length ? Ut(op(P?.externalDashboard?.gridMargin)) : Ut(op({
|
|
20377
20377
|
verticalMargin: $t?.dashboard?.verticalGap,
|
|
20378
20378
|
horizontalMargin: $t?.dashboard?.horizontalGap
|
|
20379
20379
|
}));
|
|
20380
20380
|
};
|
|
20381
20381
|
K(() => {
|
|
20382
|
-
|
|
20382
|
+
Qn();
|
|
20383
20383
|
}, [
|
|
20384
20384
|
W,
|
|
20385
20385
|
P?.externalDashboard?.gridMargin,
|
|
20386
|
-
|
|
20386
|
+
Zn
|
|
20387
20387
|
]);
|
|
20388
|
-
let
|
|
20388
|
+
let $n = q(() => un?.length && (un?.map((e) => e.externalMetric))?.filter((e) => sp({
|
|
20389
20389
|
clientId: P?.clientId,
|
|
20390
20390
|
isAllClient: P?.isAllClient,
|
|
20391
20391
|
metric: e
|
|
@@ -20393,52 +20393,52 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20393
20393
|
P?.clientId,
|
|
20394
20394
|
P?.isAllClient,
|
|
20395
20395
|
un
|
|
20396
|
-
]),
|
|
20396
|
+
]), er = q(() => $n?.map((e) => ({
|
|
20397
20397
|
value: e?.id,
|
|
20398
20398
|
label: e?.name
|
|
20399
|
-
})) || [], [
|
|
20399
|
+
})) || [], [$n]), tr = q(() => $n?.filter((e) => (e?.datasetMetricSettings?.metricImportMode !== "GALLERY" || e?.clientGalleryMetrics?.find((t) => t?.externalMetricId === e?.id)) && !!(P?.isAllClient || e?.isCreatedByClient && e?.clientId === P?.clientId || !e?.isImportant)) || [], [
|
|
20400
20400
|
P?.clientId,
|
|
20401
20401
|
P?.isAllClient,
|
|
20402
|
-
|
|
20403
|
-
]),
|
|
20404
|
-
let n = !!t?.manageMetricsStyle && Dh(t.manageMetricsStyle), r = !fn &&
|
|
20402
|
+
$n
|
|
20403
|
+
]), ir = q(() => {
|
|
20404
|
+
let n = !!t?.manageMetricsStyle && Dh(t.manageMetricsStyle), r = !fn && Vn.canManageMetrics && !n;
|
|
20405
20405
|
return hh({
|
|
20406
20406
|
isDashboardReady: xe,
|
|
20407
|
-
hasLayoutAction: !(fn || !
|
|
20407
|
+
hasLayoutAction: !(fn || !Vn.canCustomizeLayout),
|
|
20408
20408
|
hasDownloadAction: !!(Xe && (P?.isAllowToDownloadAllMetrics || e?.enableDownloadAllMetrics)),
|
|
20409
20409
|
hasPdfAction: !!e?.enableDownloadAllPdf,
|
|
20410
20410
|
hasRawMetrics: !!P?.externalDashboardMetrics?.length,
|
|
20411
|
-
hasManageMetricsAction: !!(r &&
|
|
20411
|
+
hasManageMetricsAction: !!(r && tr.length),
|
|
20412
20412
|
hasGalleryAction: !!(r && P?.externalDashboardMetrics?.some((e) => e?.externalMetric?.datasetMetricSettings?.metricImportMode === "GALLERY"))
|
|
20413
20413
|
});
|
|
20414
20414
|
}, [
|
|
20415
20415
|
xe,
|
|
20416
20416
|
fn,
|
|
20417
|
-
|
|
20417
|
+
Vn,
|
|
20418
20418
|
P,
|
|
20419
20419
|
e,
|
|
20420
20420
|
t,
|
|
20421
20421
|
Xe,
|
|
20422
|
-
|
|
20423
|
-
]),
|
|
20422
|
+
tr.length
|
|
20423
|
+
]), ar = q(() => $n?.filter((e) => e?.datasetMetricSettings?.metricImportMode === "GALLERY") || [], [$n?.length]), sr = q(() => _t?.width > 800 && un?.flatMap((e) => e?.externalMetric?.chartOptions?.mergedCards?.map((e) => e.value))?.filter((e) => !!e) || [], [un, _t.width]);
|
|
20424
20424
|
K(() => {
|
|
20425
|
-
z.current && (
|
|
20425
|
+
z.current && (Vn.canCreateMetric && P?.metricCreationMode === "DRAG_DROP" && (z.current.onClickCreateMetric = () => ue(!0)), Vn.canManageMetrics && un?.length && (!t?.manageMetricsStyle || t?.manageMetricsStyle && !Dh(t?.manageMetricsStyle)) && (z.current.onClickManageMetrics = () => _e(!0)), Ch({
|
|
20426
20426
|
sharingSettingsId: P?.sharingSettingsId,
|
|
20427
20427
|
isAllowedToEmailReports: P?.isAllowedToEmailReports,
|
|
20428
20428
|
disableScheduleEmailReports: e?.disableScheduleEmailReports,
|
|
20429
20429
|
surface: "api"
|
|
20430
|
-
}).available && (z.current.onClickScheduleReports = () => Te(!0)),
|
|
20430
|
+
}).available && (z.current.onClickScheduleReports = () => Te(!0)), Vn.canCustomizeLayout && (z.current.onClickCustomizeLayout = () => Ct({
|
|
20431
20431
|
isEnabled: !0,
|
|
20432
20432
|
layout: []
|
|
20433
20433
|
})));
|
|
20434
20434
|
}, [
|
|
20435
20435
|
z.current,
|
|
20436
|
-
|
|
20436
|
+
Vn,
|
|
20437
20437
|
P,
|
|
20438
20438
|
e,
|
|
20439
20439
|
t?.manageMetricsStyle
|
|
20440
20440
|
]);
|
|
20441
|
-
let
|
|
20441
|
+
let cr = q(() => {
|
|
20442
20442
|
let e = kn?.filter((e) => e?.columns?.length) || [];
|
|
20443
20443
|
if (!e.length) return [];
|
|
20444
20444
|
let t = un?.filter((e) => e?.externalMetric?.chartOptions?.dashboardFilters?.length)?.map((e) => e.externalMetric), n = Ue(e), r = e[0];
|
|
@@ -20451,7 +20451,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20451
20451
|
...r,
|
|
20452
20452
|
columns: i
|
|
20453
20453
|
}].filter((e) => e?.columns?.length);
|
|
20454
|
-
}, [kn, un]),
|
|
20454
|
+
}, [kn, un]), lr = q(() => {
|
|
20455
20455
|
let e = Array.isArray(P?.dashboardFilterClientSubsetData?.tableList) ? P?.dashboardFilterClientSubsetData?.tableList || [] : P?.clientSubsetData?.tableList || [];
|
|
20456
20456
|
return oa({
|
|
20457
20457
|
tableList: e,
|
|
@@ -20461,17 +20461,17 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20461
20461
|
P?.clientColumnType,
|
|
20462
20462
|
P?.clientSubsetData?.tableList,
|
|
20463
20463
|
P?.dashboardFilterClientSubsetData?.tableList
|
|
20464
|
-
]),
|
|
20464
|
+
]), ur = q(() => Array.isArray(P?.dashboardFilterClientSubsetData?.tableList) || Array.isArray(P?.clientSubsetData?.tableList), [P?.clientSubsetData?.tableList, P?.dashboardFilterClientSubsetData?.tableList]), dr = va((e) => {
|
|
20465
20465
|
let t = P?.clientId || "";
|
|
20466
20466
|
if (!t) return [];
|
|
20467
20467
|
let n = [], r = P?.externalDashboard?.filters?.[0]?.tableName || "";
|
|
20468
20468
|
return P?.externalDashboard?.filters?.forEach((r) => {
|
|
20469
20469
|
let i = r?.columns?.filter((n) => n.isCreatedByClient && n.clientId === t && n.id !== e && sa({
|
|
20470
20470
|
column: n,
|
|
20471
|
-
isSchemaAccessLoaded:
|
|
20471
|
+
isSchemaAccessLoaded: ur,
|
|
20472
20472
|
tableName: r?.tableName,
|
|
20473
20473
|
tenancyLevel: P?.companyTenancyType,
|
|
20474
|
-
schemaList:
|
|
20474
|
+
schemaList: lr
|
|
20475
20475
|
})) || [];
|
|
20476
20476
|
n.push(...i.map((e) => ({
|
|
20477
20477
|
...e,
|
|
@@ -20482,12 +20482,12 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20482
20482
|
columns: n
|
|
20483
20483
|
}] : [];
|
|
20484
20484
|
}, [
|
|
20485
|
-
|
|
20485
|
+
lr,
|
|
20486
20486
|
P?.clientId,
|
|
20487
20487
|
P?.companyTenancyType,
|
|
20488
20488
|
P?.externalDashboard?.filters,
|
|
20489
|
-
|
|
20490
|
-
]),
|
|
20489
|
+
ur
|
|
20490
|
+
]), fr = va((e) => {
|
|
20491
20491
|
if (!P?.isAllowedToCreateDashboardFilters || !e.isCreatedByClient || e.clientId !== P?.clientId) return;
|
|
20492
20492
|
let t;
|
|
20493
20493
|
P?.externalDashboard?.filters?.some((n) => (t = n?.columns?.find((t) => t.id === e.id && t.isCreatedByClient && t.clientId === P?.clientId), t &&= {
|
|
@@ -20498,7 +20498,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20498
20498
|
P?.clientId,
|
|
20499
20499
|
P?.externalDashboard?.filters,
|
|
20500
20500
|
P?.isAllowedToCreateDashboardFilters
|
|
20501
|
-
]),
|
|
20501
|
+
]), pr = va(async (e, t) => {
|
|
20502
20502
|
let n = e?.renameFilterKey || "";
|
|
20503
20503
|
P?.isAllowedToRenameDashboardFilters && P?.externalDashboard?.id && !e?.isCreatedByClient && n && (await Lt.mutateAsync({
|
|
20504
20504
|
token: R || P?.token || "",
|
|
@@ -20515,13 +20515,13 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20515
20515
|
I,
|
|
20516
20516
|
R,
|
|
20517
20517
|
Lt
|
|
20518
|
-
]),
|
|
20518
|
+
]), hr = va((e) => {
|
|
20519
20519
|
P?.isAllowedToCreateDashboardFilters && P?.externalDashboard?.id && e.isCreatedByClient && e.clientId === P?.clientId && Nt(e);
|
|
20520
20520
|
}, [
|
|
20521
20521
|
P?.clientId,
|
|
20522
20522
|
P?.externalDashboard?.id,
|
|
20523
20523
|
P?.isAllowedToCreateDashboardFilters
|
|
20524
|
-
]),
|
|
20524
|
+
]), vr = va(async () => {
|
|
20525
20525
|
if (P?.isAllowedToCreateDashboardFilters && P?.externalDashboard?.id && jt) {
|
|
20526
20526
|
Pt("");
|
|
20527
20527
|
try {
|
|
@@ -20529,7 +20529,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20529
20529
|
token: R || P?.token || "",
|
|
20530
20530
|
data: {
|
|
20531
20531
|
externalDashboard: P.externalDashboard.id,
|
|
20532
|
-
filters:
|
|
20532
|
+
filters: dr(jt.id)
|
|
20533
20533
|
}
|
|
20534
20534
|
}), Nt(void 0), I?.();
|
|
20535
20535
|
} catch {
|
|
@@ -20537,7 +20537,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20537
20537
|
}
|
|
20538
20538
|
}
|
|
20539
20539
|
}, [
|
|
20540
|
-
|
|
20540
|
+
dr,
|
|
20541
20541
|
P?.externalDashboard?.id,
|
|
20542
20542
|
P?.isAllowedToCreateDashboardFilters,
|
|
20543
20543
|
P?.token,
|
|
@@ -20545,9 +20545,9 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20545
20545
|
I,
|
|
20546
20546
|
R,
|
|
20547
20547
|
It
|
|
20548
|
-
]),
|
|
20548
|
+
]), yr = va(() => {
|
|
20549
20549
|
Nt(void 0), Pt("");
|
|
20550
|
-
}, []),
|
|
20550
|
+
}, []), br = P?.isAllowedToCreateDashboardFilters ? /* @__PURE__ */ Z(U, {
|
|
20551
20551
|
variant: "popover",
|
|
20552
20552
|
className: ca.triggerButton,
|
|
20553
20553
|
id: "createFilter",
|
|
@@ -20561,13 +20561,13 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20561
20561
|
onClick: () => {
|
|
20562
20562
|
At(void 0), Ot(!0);
|
|
20563
20563
|
}
|
|
20564
|
-
}) : void 0,
|
|
20565
|
-
filters:
|
|
20566
|
-
canCreateDashboardFilters:
|
|
20567
|
-
}),
|
|
20564
|
+
}) : void 0, xr = !!P?.isAllowedToCreateDashboardFilters, Sr = ye({
|
|
20565
|
+
filters: cr,
|
|
20566
|
+
canCreateDashboardFilters: xr
|
|
20567
|
+
}), wr = it({
|
|
20568
20568
|
filters: kn,
|
|
20569
|
-
canCreateDashboardFilters:
|
|
20570
|
-
}),
|
|
20569
|
+
canCreateDashboardFilters: xr
|
|
20570
|
+
}), Tr = q(() => {
|
|
20571
20571
|
let e = Ue(kn);
|
|
20572
20572
|
if (!e.length) return [];
|
|
20573
20573
|
let t = un?.filter((e) => e?.externalMetric?.chartOptions?.dashboardFilters?.length)?.map((e) => e?.externalMetric);
|
|
@@ -20579,14 +20579,14 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20579
20579
|
filters: n
|
|
20580
20580
|
};
|
|
20581
20581
|
}) : [];
|
|
20582
|
-
}, [kn, un]),
|
|
20582
|
+
}, [kn, un]), Er = q(() => e?.hideDashboardName === !1 || !e?.hideDashboardName && P?.isShowDashboardName, [e?.hideDashboardName, P?.isShowDashboardName]);
|
|
20583
20583
|
K(() => {
|
|
20584
20584
|
let e = setTimeout(() => {
|
|
20585
20585
|
Me(Ki());
|
|
20586
20586
|
}, 1e3);
|
|
20587
20587
|
return () => clearTimeout(e);
|
|
20588
20588
|
}, []);
|
|
20589
|
-
let
|
|
20589
|
+
let Dr = q(() => !!P?.dataAppId, [P?.dataAppId]), Or = async (e) => {
|
|
20590
20590
|
Fe && o && (Pe(!0), await Kt({
|
|
20591
20591
|
cards: e,
|
|
20592
20592
|
isChangedByClient: !0
|
|
@@ -20595,10 +20595,10 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20595
20595
|
}, 100), Ie(!1), setTimeout(() => {
|
|
20596
20596
|
Pe(!1);
|
|
20597
20597
|
}, 1e3));
|
|
20598
|
-
},
|
|
20598
|
+
}, kr = async (e, t) => {
|
|
20599
20599
|
let n = typeof t == "object" ? t : void 0, r = typeof t == "string" ? t : void 0, i = P?.externalDashboard?.layout || [], a = qt && qt.length > 0 ? qt : i;
|
|
20600
20600
|
if (n && Xt && (a = qt), n) {
|
|
20601
|
-
let t = Cr(a, i,
|
|
20601
|
+
let t = Cr(a, i, $n.map((e) => e.id === n.replacedMetricId ? {
|
|
20602
20602
|
...e,
|
|
20603
20603
|
resizeAttributes: n.resizeAttributes
|
|
20604
20604
|
} : e)), r = gr(t, e, n);
|
|
@@ -20630,7 +20630,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20630
20630
|
}, 100), setTimeout(() => {
|
|
20631
20631
|
Pe(!1);
|
|
20632
20632
|
}, 1e3);
|
|
20633
|
-
},
|
|
20633
|
+
}, Ar = async ({ onError: e, onSuccess: t, viewName: n, appliedfilters: r }) => {
|
|
20634
20634
|
try {
|
|
20635
20635
|
P?.externalDashboard?.id && t(await ze.mutateAsync({
|
|
20636
20636
|
data: {
|
|
@@ -20655,8 +20655,8 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20655
20655
|
} catch (t) {
|
|
20656
20656
|
e(t);
|
|
20657
20657
|
}
|
|
20658
|
-
},
|
|
20659
|
-
if (!
|
|
20658
|
+
}, jr = q(() => {
|
|
20659
|
+
if (!Xn) return;
|
|
20660
20660
|
let e = (He?.data)?.dashboardViewFilter?.find((e) => e?.id === V?.value);
|
|
20661
20661
|
if (e) return {
|
|
20662
20662
|
metricViewFilters: Array.isArray(e?.metricViewFilters) && e?.metricViewFilters || [],
|
|
@@ -20666,25 +20666,25 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20666
20666
|
}, [
|
|
20667
20667
|
He?.data,
|
|
20668
20668
|
V,
|
|
20669
|
-
|
|
20670
|
-
]),
|
|
20671
|
-
let e =
|
|
20669
|
+
Xn
|
|
20670
|
+
]), Mr = q(() => {
|
|
20671
|
+
let e = Xn ? jr : void 0;
|
|
20672
20672
|
return Vt ? {
|
|
20673
20673
|
metricViewFilters: e?.metricViewFilters || [],
|
|
20674
20674
|
xAxisSettings: [...Jm(Vt.xAxisSettings), ...e?.xAxisSettings || []],
|
|
20675
20675
|
yAxisSettings: [...Ym(Vt.yAxisSettings), ...e?.yAxisSettings || []]
|
|
20676
20676
|
} : e;
|
|
20677
20677
|
}, [
|
|
20678
|
-
|
|
20679
|
-
|
|
20678
|
+
Xn,
|
|
20679
|
+
jr,
|
|
20680
20680
|
Vt
|
|
20681
|
-
]),
|
|
20682
|
-
|
|
20683
|
-
}, []),
|
|
20681
|
+
]), Nr = J({}), Pr = va((e, t) => {
|
|
20682
|
+
Nr.current = Fi(Nr.current, e, t);
|
|
20683
|
+
}, []), Fr = J({
|
|
20684
20684
|
xAxisSettings: [],
|
|
20685
20685
|
yAxisSettings: []
|
|
20686
20686
|
});
|
|
20687
|
-
|
|
20687
|
+
Fr.current = {
|
|
20688
20688
|
xAxisSettings: Ze?.filter((e) => e?.xAxisSettings?.isEnable && e?.xAxisSettings?.xaxis)?.map((e) => ({
|
|
20689
20689
|
xAxisSettings: e?.xAxisSettings,
|
|
20690
20690
|
id: e?.id
|
|
@@ -20694,14 +20694,14 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20694
20694
|
id: e?.id
|
|
20695
20695
|
})) || []
|
|
20696
20696
|
};
|
|
20697
|
-
let { isGettingPdf:
|
|
20697
|
+
let { isGettingPdf: Ir, cancelPdf: Rr, toPDF: zr, error: Br, isPdfExported: Vr } = pl({
|
|
20698
20698
|
dashboardId: P?.externalDashboard?.externalDashboardId || "",
|
|
20699
20699
|
fileName: P?.externalDashboard?.name || "dashboard",
|
|
20700
20700
|
token: P?.token,
|
|
20701
20701
|
globalFilters: wt,
|
|
20702
|
-
metricFiltersRef:
|
|
20703
|
-
axisSettingsRef:
|
|
20704
|
-
}),
|
|
20702
|
+
metricFiltersRef: Nr,
|
|
20703
|
+
axisSettingsRef: Fr
|
|
20704
|
+
}), Hr = () => P ? fn ? /* @__PURE__ */ Z(Je, {
|
|
20705
20705
|
isOpen: Le,
|
|
20706
20706
|
onClose: () => Re(!1),
|
|
20707
20707
|
isMobileModal: !0,
|
|
@@ -20712,15 +20712,15 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20712
20712
|
isMobileView: fn,
|
|
20713
20713
|
selectedViewOption: V,
|
|
20714
20714
|
setSelectViewOption: dt,
|
|
20715
|
-
onSaveViewFilter:
|
|
20715
|
+
onSaveViewFilter: Ar,
|
|
20716
20716
|
datasourceId: P?.datasourceId || "",
|
|
20717
20717
|
dashboardId: o || "",
|
|
20718
20718
|
fetchViewFiltersOptions: He,
|
|
20719
20719
|
deleteViewFilterMutation: Ve,
|
|
20720
20720
|
token: R,
|
|
20721
20721
|
isEndUserApp: !0,
|
|
20722
|
-
isAllowedCreateDashboardView:
|
|
20723
|
-
isEnableFilterView:
|
|
20722
|
+
isAllowedCreateDashboardView: Yn,
|
|
20723
|
+
isEnableFilterView: Xn,
|
|
20724
20724
|
viewFilterLabel: Qt,
|
|
20725
20725
|
createViewFilterMutation: ze,
|
|
20726
20726
|
onServerEvent: c,
|
|
@@ -20730,8 +20730,8 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20730
20730
|
filterButtonBgColor: t?.button?.secondary,
|
|
20731
20731
|
tenancyLevel: P.companyTenancyType,
|
|
20732
20732
|
appliedFilterPairs: jn,
|
|
20733
|
-
filters:
|
|
20734
|
-
addGlobalFilter:
|
|
20733
|
+
filters: cr,
|
|
20734
|
+
addGlobalFilter: br,
|
|
20735
20735
|
onApply: (e) => {
|
|
20736
20736
|
Rt.current || Tt(e);
|
|
20737
20737
|
},
|
|
@@ -20742,10 +20742,10 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20742
20742
|
},
|
|
20743
20743
|
setSelectedFilterVal: ut,
|
|
20744
20744
|
clientId: P.clientId,
|
|
20745
|
-
onEditDashboardFilter: P?.isAllowedToCreateDashboardFilters ?
|
|
20746
|
-
onDeleteDashboardFilter: P?.isAllowedToCreateDashboardFilters ?
|
|
20745
|
+
onEditDashboardFilter: P?.isAllowedToCreateDashboardFilters ? fr : void 0,
|
|
20746
|
+
onDeleteDashboardFilter: P?.isAllowedToCreateDashboardFilters ? hr : void 0,
|
|
20747
20747
|
isAllowRenameDashboardFilter: !!P?.isAllowedToRenameDashboardFilters,
|
|
20748
|
-
onRenameDashboardFilter:
|
|
20748
|
+
onRenameDashboardFilter: pr,
|
|
20749
20749
|
isDisableClick: je,
|
|
20750
20750
|
isEditLayoutEnabled: St?.isEnabled,
|
|
20751
20751
|
layout: {
|
|
@@ -20762,15 +20762,15 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20762
20762
|
encryptedClientId: "",
|
|
20763
20763
|
selectedViewOption: V,
|
|
20764
20764
|
setSelectViewOption: dt,
|
|
20765
|
-
onSaveViewFilter:
|
|
20765
|
+
onSaveViewFilter: Ar,
|
|
20766
20766
|
datasourceId: P?.datasourceId || "",
|
|
20767
20767
|
dashboardId: o || "",
|
|
20768
20768
|
fetchViewFiltersOptions: He,
|
|
20769
20769
|
deleteViewFilterMutation: Ve,
|
|
20770
20770
|
token: R,
|
|
20771
20771
|
isEndUserApp: !0,
|
|
20772
|
-
isAllowedCreateDashboardView:
|
|
20773
|
-
isEnableFilterView:
|
|
20772
|
+
isAllowedCreateDashboardView: Yn,
|
|
20773
|
+
isEnableFilterView: Xn,
|
|
20774
20774
|
viewFilterLabel: Qt,
|
|
20775
20775
|
createViewFilterMutation: ze,
|
|
20776
20776
|
onServerEvent: c,
|
|
@@ -20780,8 +20780,8 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20780
20780
|
filterButtonBgColor: t?.button?.secondary,
|
|
20781
20781
|
tenancyLevel: P.companyTenancyType,
|
|
20782
20782
|
appliedFilterPairs: jn,
|
|
20783
|
-
filters:
|
|
20784
|
-
addGlobalFilter:
|
|
20783
|
+
filters: cr,
|
|
20784
|
+
addGlobalFilter: br,
|
|
20785
20785
|
onApply: (e) => {
|
|
20786
20786
|
Rt.current || Tt(e);
|
|
20787
20787
|
},
|
|
@@ -20792,10 +20792,10 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20792
20792
|
},
|
|
20793
20793
|
setSelectedFilterVal: ut,
|
|
20794
20794
|
clientId: P.clientId,
|
|
20795
|
-
onEditDashboardFilter: P?.isAllowedToCreateDashboardFilters ?
|
|
20796
|
-
onDeleteDashboardFilter: P?.isAllowedToCreateDashboardFilters ?
|
|
20795
|
+
onEditDashboardFilter: P?.isAllowedToCreateDashboardFilters ? fr : void 0,
|
|
20796
|
+
onDeleteDashboardFilter: P?.isAllowedToCreateDashboardFilters ? hr : void 0,
|
|
20797
20797
|
isAllowRenameDashboardFilter: !!P?.isAllowedToRenameDashboardFilters,
|
|
20798
|
-
onRenameDashboardFilter:
|
|
20798
|
+
onRenameDashboardFilter: pr,
|
|
20799
20799
|
isDisableClick: je,
|
|
20800
20800
|
isEditLayoutEnabled: St?.isEnabled,
|
|
20801
20801
|
layout: {
|
|
@@ -20807,11 +20807,11 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20807
20807
|
filtersLayout: [...e]
|
|
20808
20808
|
}))
|
|
20809
20809
|
}
|
|
20810
|
-
}) : null, [
|
|
20810
|
+
}) : null, [Ur, Wr] = Y("");
|
|
20811
20811
|
return K(() => {
|
|
20812
20812
|
if (f?.iconSvg) {
|
|
20813
20813
|
let e = Qm(f?.iconSvg), t = new Blob([e], { type: "image/svg+xml" }), n = URL.createObjectURL(t);
|
|
20814
|
-
return
|
|
20814
|
+
return Wr(n), () => {
|
|
20815
20815
|
URL.revokeObjectURL(n);
|
|
20816
20816
|
};
|
|
20817
20817
|
}
|
|
@@ -20829,11 +20829,11 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20829
20829
|
ref: z,
|
|
20830
20830
|
children: [
|
|
20831
20831
|
P?.externalDashboard?.id && !F && !ne && /* @__PURE__ */ Q(X, { children: [
|
|
20832
|
-
!
|
|
20833
|
-
className: `${ch["embedDashboard-header"]} ${
|
|
20832
|
+
!Er && !Wn && !Un && !Kn && !Jn && !ir || !e?.showDashboardActions ? null : !w && /* @__PURE__ */ Q("div", {
|
|
20833
|
+
className: `${ch["embedDashboard-header"]} ${Er ? ch.justifyBetween : ch.justifyEnd}`,
|
|
20834
20834
|
style: je ? { pointerEvents: "none" } : {},
|
|
20835
20835
|
children: [
|
|
20836
|
-
|
|
20836
|
+
Er ? /* @__PURE__ */ Z("h1", {
|
|
20837
20837
|
className: ch.dashboardName,
|
|
20838
20838
|
children: P.externalDashboard.name || "Dashboard"
|
|
20839
20839
|
}) : null,
|
|
@@ -20908,7 +20908,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20908
20908
|
Ct({
|
|
20909
20909
|
isEnabled: !1,
|
|
20910
20910
|
layout: []
|
|
20911
|
-
}),
|
|
20911
|
+
}), Qn(), c?.("EXIT_CUSTOMIZE_LAYOUT_MODE");
|
|
20912
20912
|
},
|
|
20913
20913
|
className: "cta-secondary",
|
|
20914
20914
|
children: "Discard"
|
|
@@ -20934,7 +20934,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20934
20934
|
})]
|
|
20935
20935
|
})]
|
|
20936
20936
|
}) : /* @__PURE__ */ Q(X, { children: [
|
|
20937
|
-
fn &&
|
|
20937
|
+
fn && Sr && /* @__PURE__ */ Q("span", {
|
|
20938
20938
|
className: "dbn:relative",
|
|
20939
20939
|
children: [/* @__PURE__ */ Z(U, {
|
|
20940
20940
|
variant: "tab",
|
|
@@ -20954,11 +20954,11 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20954
20954
|
})
|
|
20955
20955
|
}) : null]
|
|
20956
20956
|
}),
|
|
20957
|
-
|
|
20957
|
+
ir ? /* @__PURE__ */ Z(Bn, {
|
|
20958
20958
|
buttonContent: /* @__PURE__ */ Z(U, {
|
|
20959
20959
|
variant: "tab",
|
|
20960
|
-
leftIcon: f?.iconSvg &&
|
|
20961
|
-
src:
|
|
20960
|
+
leftIcon: f?.iconSvg && Ur ? /* @__PURE__ */ Z("img", {
|
|
20961
|
+
src: Ur,
|
|
20962
20962
|
alt: "custom settings btn",
|
|
20963
20963
|
className: "dbn:w-5 dbn:h-5 dbn:text-text-primary-color"
|
|
20964
20964
|
}) : /* @__PURE__ */ Z(B, { name: "gear" }),
|
|
@@ -20977,7 +20977,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
20977
20977
|
id: "settings-menu",
|
|
20978
20978
|
"data-testid": "settings-menu",
|
|
20979
20979
|
children: [
|
|
20980
|
-
!fn &&
|
|
20980
|
+
!fn && Vn.canCustomizeLayout && /* @__PURE__ */ Z("div", {
|
|
20981
20981
|
className: "dbn:hover:bg-gray-3 dbn:rounded-md",
|
|
20982
20982
|
children: /* @__PURE__ */ Z(U, {
|
|
20983
20983
|
type: "button",
|
|
@@ -21026,10 +21026,10 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21026
21026
|
}),
|
|
21027
21027
|
e?.enableDownloadAllPdf && /* @__PURE__ */ Z("div", {
|
|
21028
21028
|
className: "dbn:hover:bg-gray-3 dbn:rounded-md",
|
|
21029
|
-
children:
|
|
21029
|
+
children: Ir ? /* @__PURE__ */ Z(U, {
|
|
21030
21030
|
type: "button",
|
|
21031
21031
|
variant: "tertiary",
|
|
21032
|
-
onClick: () =>
|
|
21032
|
+
onClick: () => Rr(),
|
|
21033
21033
|
className: "dbn:justify-start",
|
|
21034
21034
|
leftIcon: /* @__PURE__ */ Z(B, { name: "stop" }),
|
|
21035
21035
|
fitContainer: !0,
|
|
@@ -21038,7 +21038,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21038
21038
|
type: "button",
|
|
21039
21039
|
variant: "tertiary",
|
|
21040
21040
|
onClick: async () => {
|
|
21041
|
-
c?.("START_DASHBOARD_PDF"), await
|
|
21041
|
+
c?.("START_DASHBOARD_PDF"), await zr(), c?.("EXPORT_DASHBOARD_PDF");
|
|
21042
21042
|
},
|
|
21043
21043
|
className: "dbn:justify-start",
|
|
21044
21044
|
leftIcon: /* @__PURE__ */ Z(B, { name: "download" }),
|
|
@@ -21046,7 +21046,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21046
21046
|
children: "Export As PDF"
|
|
21047
21047
|
})
|
|
21048
21048
|
}),
|
|
21049
|
-
!fn &&
|
|
21049
|
+
!fn && Vn.canManageMetrics && !!tr?.length && (!t?.manageMetricsStyle || t?.manageMetricsStyle && !Dh(t?.manageMetricsStyle)) && /* @__PURE__ */ Z("div", {
|
|
21050
21050
|
className: "dbn:hover:bg-gray-3 dbn:rounded-md",
|
|
21051
21051
|
children: /* @__PURE__ */ Z(U, {
|
|
21052
21052
|
variant: "tertiary",
|
|
@@ -21061,7 +21061,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21061
21061
|
children: d ? d() : "Manage Metrics"
|
|
21062
21062
|
})
|
|
21063
21063
|
}),
|
|
21064
|
-
!fn &&
|
|
21064
|
+
!fn && Vn.canManageMetrics && !!P.externalDashboardMetrics?.filter((e) => e?.externalMetric?.datasetMetricSettings?.metricImportMode === "GALLERY").length && (!t?.manageMetricsStyle || t?.manageMetricsStyle && !Dh(t?.manageMetricsStyle)) && /* @__PURE__ */ Z("div", {
|
|
21065
21065
|
className: "dbn:hover:bg-gray-3 dbn:rounded-md",
|
|
21066
21066
|
children: /* @__PURE__ */ Z(U, {
|
|
21067
21067
|
variant: "tertiary",
|
|
@@ -21079,7 +21079,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21079
21079
|
]
|
|
21080
21080
|
})
|
|
21081
21081
|
}) : null,
|
|
21082
|
-
!fn && xe &&
|
|
21082
|
+
!fn && xe && Gn.available && /* @__PURE__ */ Z(U, {
|
|
21083
21083
|
"data-testid": "schedule-reports-btn",
|
|
21084
21084
|
variant: "tab",
|
|
21085
21085
|
type: "button",
|
|
@@ -21090,7 +21090,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21090
21090
|
className: "cta-secondary",
|
|
21091
21091
|
children: "Schedule Reports"
|
|
21092
21092
|
}),
|
|
21093
|
-
!fn &&
|
|
21093
|
+
!fn && Vn.canCreateMetric && P.metricCreationMode === "DRAG_DROP" && /* @__PURE__ */ Z(X, { children: /* @__PURE__ */ Z(U, {
|
|
21094
21094
|
type: "button",
|
|
21095
21095
|
variant: "primary",
|
|
21096
21096
|
onClick: () => {
|
|
@@ -21104,14 +21104,14 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21104
21104
|
containerClass: "cta-primary-height",
|
|
21105
21105
|
children: "Create Metric"
|
|
21106
21106
|
}) }),
|
|
21107
|
-
!fn &&
|
|
21107
|
+
!fn && Vn.canCreateMetric && P.metricCreationMode === "POINT_CLICK" && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(U, {
|
|
21108
21108
|
type: "button",
|
|
21109
21109
|
variant: "tab",
|
|
21110
21110
|
onClick: () => ot(!0),
|
|
21111
21111
|
className: "cta-tertiary",
|
|
21112
21112
|
children: /* @__PURE__ */ Z(B, { name: "magnifying-glass" })
|
|
21113
21113
|
}), /* @__PURE__ */ Z(On, { children: at && /* @__PURE__ */ Z(Pm, {
|
|
21114
|
-
saveDashLayout:
|
|
21114
|
+
saveDashLayout: kr,
|
|
21115
21115
|
onServerEvent: c,
|
|
21116
21116
|
refetchDashboardData: I,
|
|
21117
21117
|
setEditMetric: et,
|
|
@@ -21130,7 +21130,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21130
21130
|
workspaceId: P.workspace?.id,
|
|
21131
21131
|
userProvidedDashboardId: P.externalDashboard.externalDashboardId
|
|
21132
21132
|
}) })] }),
|
|
21133
|
-
!fn &&
|
|
21133
|
+
!fn && Vn.canCreateMetric && P?.metricCreationMode === "CHAT" && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(U, {
|
|
21134
21134
|
type: "button",
|
|
21135
21135
|
variant: "primary",
|
|
21136
21136
|
onClick: () => ct(!0),
|
|
@@ -21141,7 +21141,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21141
21141
|
className: "cta-primary",
|
|
21142
21142
|
children: "Chat with your Data"
|
|
21143
21143
|
}), /* @__PURE__ */ Z(On, { children: st && /* @__PURE__ */ Z(ym, { config: {
|
|
21144
|
-
saveDashLayout:
|
|
21144
|
+
saveDashLayout: kr,
|
|
21145
21145
|
onServerEvent: c,
|
|
21146
21146
|
refetchDashboardData: I,
|
|
21147
21147
|
externalDashboardId: P.externalDashboard.externalDashboardId,
|
|
@@ -21236,7 +21236,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21236
21236
|
c?.("EXIT_CUSTOMIZE_LAYOUT_MODE"), Ct({
|
|
21237
21237
|
isEnabled: !1,
|
|
21238
21238
|
layout: []
|
|
21239
|
-
}),
|
|
21239
|
+
}), Qn();
|
|
21240
21240
|
},
|
|
21241
21241
|
className: "cta-secondary",
|
|
21242
21242
|
children: "Discard"
|
|
@@ -21264,17 +21264,17 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21264
21264
|
})
|
|
21265
21265
|
})
|
|
21266
21266
|
}) : null,
|
|
21267
|
-
e?.isStickyDashboardFilters &&
|
|
21268
|
-
className: `${ch["embedDashboard-stickyFilters"]} dbn-selectBox ${
|
|
21269
|
-
children:
|
|
21267
|
+
e?.isStickyDashboardFilters && wr ? /* @__PURE__ */ Z("div", {
|
|
21268
|
+
className: `${ch["embedDashboard-stickyFilters"]} dbn-selectBox ${Sr ? "" : "dbn:hidden"}`,
|
|
21269
|
+
children: Hr()
|
|
21270
21270
|
}) : null,
|
|
21271
21271
|
/* @__PURE__ */ Q("div", {
|
|
21272
|
-
className: `${ch["embedDashboard-wrapper"]} ${e?.isStickyDashboardFilters &&
|
|
21272
|
+
className: `${ch["embedDashboard-wrapper"]} ${e?.isStickyDashboardFilters && Sr ? "dbn:pt-0" : ""}`,
|
|
21273
21273
|
style: e?.dashboardPadding ? { padding: e?.dashboardPadding } : {},
|
|
21274
21274
|
children: [
|
|
21275
|
-
!e?.isStickyDashboardFilters &&
|
|
21276
|
-
className:
|
|
21277
|
-
children:
|
|
21275
|
+
!e?.isStickyDashboardFilters && wr ? /* @__PURE__ */ Z("div", {
|
|
21276
|
+
className: Sr ? "" : "dbn:hidden",
|
|
21277
|
+
children: Hr()
|
|
21278
21278
|
}) : null,
|
|
21279
21279
|
/* @__PURE__ */ Z(wm, {
|
|
21280
21280
|
refreshSeconds: P?.refreshTime,
|
|
@@ -21286,7 +21286,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21286
21286
|
/* @__PURE__ */ Z(lm, {
|
|
21287
21287
|
drillUrlState: N,
|
|
21288
21288
|
customMessages: r,
|
|
21289
|
-
onCreateMetric: !fn &&
|
|
21289
|
+
onCreateMetric: !fn && Vn.canCreateMetric ? P.metricCreationMode === "DRAG_DROP" ? () => {
|
|
21290
21290
|
e?.shouldFitFullScreen && Fo(z.current), ue(!0), c?.("ENTER_CREATE_METRIC");
|
|
21291
21291
|
} : P.metricCreationMode === "POINT_CLICK" ? () => ot(!0) : P.metricCreationMode === "CHAT" ? () => ct(!0) : void 0 : void 0,
|
|
21292
21292
|
refetchDashboardData: I,
|
|
@@ -21299,13 +21299,13 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21299
21299
|
}),
|
|
21300
21300
|
dataMartTables: P?.dataMartTables,
|
|
21301
21301
|
userIdentifier: P?.userIdentifier,
|
|
21302
|
-
viewMetricData:
|
|
21302
|
+
viewMetricData: Mr,
|
|
21303
21303
|
setMetricMetadata: Qe,
|
|
21304
21304
|
rules: P?.externalDashboard?.rules || [],
|
|
21305
21305
|
disableDownloadDataNoFilters: e?.disableDownloadDataNoFilters,
|
|
21306
21306
|
disableDownloadUnderlyingDataNoFilters: e?.disableDownloadUnderlyingDataNoFilters,
|
|
21307
21307
|
isShowNoDataFoundScreen: e?.isShowNoDataFoundScreen,
|
|
21308
|
-
isDataApp:
|
|
21308
|
+
isDataApp: Dr,
|
|
21309
21309
|
generatingPdf: !!w,
|
|
21310
21310
|
onEditMetric: (e) => {
|
|
21311
21311
|
let t = _r(e.id, qt, P?.externalDashboard?.layout || [], e.resizeAttributes, !e.isMetric);
|
|
@@ -21315,10 +21315,10 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21315
21315
|
} }), c?.("ENTER_EDIT_METRIC");
|
|
21316
21316
|
},
|
|
21317
21317
|
calendarType: _,
|
|
21318
|
-
metricMergedFilters:
|
|
21318
|
+
metricMergedFilters: Tr,
|
|
21319
21319
|
language: m,
|
|
21320
21320
|
translationDictionary: h,
|
|
21321
|
-
saveDashLayout:
|
|
21321
|
+
saveDashLayout: Or,
|
|
21322
21322
|
fullScreenModal: nt,
|
|
21323
21323
|
setFullScreenModal: rt,
|
|
21324
21324
|
chartFontSettings: sn?.chart,
|
|
@@ -21334,7 +21334,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21334
21334
|
noDataFoundSvg: u,
|
|
21335
21335
|
shouldFitFullScreen: e?.shouldFitFullScreen,
|
|
21336
21336
|
isEnableMetricSummary: P?.isEnableMetricSummary,
|
|
21337
|
-
mergedMetrics:
|
|
21337
|
+
mergedMetrics: sr,
|
|
21338
21338
|
metricCardColor: sn?.dashboard?.metricCardColor || "",
|
|
21339
21339
|
isShadowDisableOnHover: yt,
|
|
21340
21340
|
isDisableMetricLoader: e?.disableMetricLoader,
|
|
@@ -21370,10 +21370,10 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21370
21370
|
layout: [...e]
|
|
21371
21371
|
}))
|
|
21372
21372
|
},
|
|
21373
|
-
isAllowedToDeleteMetrics:
|
|
21374
|
-
isAllowedToUpdateMetrics:
|
|
21375
|
-
isAllowedToChangeLayout:
|
|
21376
|
-
isAllowedToSeeUnderlyingData:
|
|
21373
|
+
isAllowedToDeleteMetrics: Vn.canArchiveMetric,
|
|
21374
|
+
isAllowedToUpdateMetrics: Vn.canEditMetric,
|
|
21375
|
+
isAllowedToChangeLayout: Vn.canCustomizeLayout && St.isEnabled,
|
|
21376
|
+
isAllowedToSeeUnderlyingData: Vn.canViewUnderlyingData,
|
|
21377
21377
|
externalDashboardMetrics: P.externalDashboardMetrics,
|
|
21378
21378
|
isMetricListLoading: F,
|
|
21379
21379
|
globalFilters: wt,
|
|
@@ -21405,7 +21405,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21405
21405
|
isDisableClick: je,
|
|
21406
21406
|
setShowSettingsBtn: Se,
|
|
21407
21407
|
allowedChartTypes: e?.allowedChartTypes,
|
|
21408
|
-
onMetricFiltersChange:
|
|
21408
|
+
onMetricFiltersChange: Pr,
|
|
21409
21409
|
pdfMetricFilters: Bt
|
|
21410
21410
|
}, `metrics-${un?.length}-${qt?.length}`),
|
|
21411
21411
|
/* @__PURE__ */ Z(sh, { props: {
|
|
@@ -21414,7 +21414,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21414
21414
|
language: m,
|
|
21415
21415
|
translationDictionary: h,
|
|
21416
21416
|
datasourceId: P?.datasourceId || "",
|
|
21417
|
-
metricList:
|
|
21417
|
+
metricList: tr,
|
|
21418
21418
|
token: R,
|
|
21419
21419
|
client: P.clientId,
|
|
21420
21420
|
companyTenancyType: P.companyTenancyType,
|
|
@@ -21434,7 +21434,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21434
21434
|
language: m,
|
|
21435
21435
|
translationDictionary: h,
|
|
21436
21436
|
datasourceId: P?.datasourceId || "",
|
|
21437
|
-
metricList:
|
|
21437
|
+
metricList: ar,
|
|
21438
21438
|
token: R,
|
|
21439
21439
|
client: P.clientId,
|
|
21440
21440
|
companyTenancyType: P.companyTenancyType,
|
|
@@ -21446,7 +21446,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21446
21446
|
onServerEvent: c
|
|
21447
21447
|
} }),
|
|
21448
21448
|
Ce ? /* @__PURE__ */ Z(Sh, { props: {
|
|
21449
|
-
chartOptions:
|
|
21449
|
+
chartOptions: er,
|
|
21450
21450
|
isShowSettings: !0,
|
|
21451
21451
|
setShowSettings: Te,
|
|
21452
21452
|
onServerEvent: c,
|
|
@@ -21455,11 +21455,11 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21455
21455
|
externalDashboardId: P?.externalDashboard?.id
|
|
21456
21456
|
} }) : null,
|
|
21457
21457
|
e?.shouldFitFullScreen ? se && /* @__PURE__ */ Z(ih, {
|
|
21458
|
-
filters:
|
|
21458
|
+
filters: cr,
|
|
21459
21459
|
isIncrementalJoin: P.isIncrementalJoin,
|
|
21460
21460
|
onServerEvent: c,
|
|
21461
21461
|
refetchDashboardData: I,
|
|
21462
|
-
saveDashLayout:
|
|
21462
|
+
saveDashLayout: kr,
|
|
21463
21463
|
metric: $e?.metric,
|
|
21464
21464
|
setEditMetric: et,
|
|
21465
21465
|
datasourceId: P?.datasourceId,
|
|
@@ -21482,11 +21482,11 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21482
21482
|
showChartClickSettings: e?.showChartClickSettings,
|
|
21483
21483
|
allowedChartTypes: e?.allowedChartTypes
|
|
21484
21484
|
}) : /* @__PURE__ */ Z(On, { children: se && /* @__PURE__ */ Z(ih, {
|
|
21485
|
-
filters:
|
|
21485
|
+
filters: cr,
|
|
21486
21486
|
isIncrementalJoin: P?.isIncrementalJoin,
|
|
21487
21487
|
onServerEvent: c,
|
|
21488
21488
|
refetchDashboardData: I,
|
|
21489
|
-
saveDashLayout:
|
|
21489
|
+
saveDashLayout: kr,
|
|
21490
21490
|
metric: $e?.metric,
|
|
21491
21491
|
setEditMetric: et,
|
|
21492
21492
|
datasourceId: P?.datasourceId,
|
|
@@ -21553,8 +21553,8 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21553
21553
|
...P.externalDashboard,
|
|
21554
21554
|
filters: P.externalDashboard.filters
|
|
21555
21555
|
} : void 0,
|
|
21556
|
-
schemaList:
|
|
21557
|
-
isSchemaAccessLoaded:
|
|
21556
|
+
schemaList: lr,
|
|
21557
|
+
isSchemaAccessLoaded: ur,
|
|
21558
21558
|
token: R || P?.token || "",
|
|
21559
21559
|
clientId: P?.clientId,
|
|
21560
21560
|
clientColumnType: P?.clientColumnType,
|
|
@@ -21570,7 +21570,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21570
21570
|
}) : null,
|
|
21571
21571
|
/* @__PURE__ */ Z(Je, {
|
|
21572
21572
|
isOpen: !!P?.isAllowedToCreateDashboardFilters && !!jt,
|
|
21573
|
-
onClose:
|
|
21573
|
+
onClose: yr,
|
|
21574
21574
|
headerTitle: "Delete Dashboard Filter",
|
|
21575
21575
|
size: "sm",
|
|
21576
21576
|
children: /* @__PURE__ */ Q("div", {
|
|
@@ -21590,13 +21590,13 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21590
21590
|
children: [/* @__PURE__ */ Z(U, {
|
|
21591
21591
|
variant: "tab",
|
|
21592
21592
|
type: "button",
|
|
21593
|
-
onClick:
|
|
21593
|
+
onClick: yr,
|
|
21594
21594
|
className: "cta-secondary",
|
|
21595
21595
|
children: "Cancel"
|
|
21596
21596
|
}), /* @__PURE__ */ Z(U, {
|
|
21597
21597
|
variant: "primary",
|
|
21598
21598
|
type: "button",
|
|
21599
|
-
onClick:
|
|
21599
|
+
onClick: vr,
|
|
21600
21600
|
isDisabled: It.isPending,
|
|
21601
21601
|
className: "cta-primary",
|
|
21602
21602
|
children: "Delete"
|
|
@@ -21614,22 +21614,22 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21614
21614
|
children: "Please wait, adjusting layout...."
|
|
21615
21615
|
})
|
|
21616
21616
|
}) : null,
|
|
21617
|
-
e?.exportMsgPosition !== "hidden" && (
|
|
21617
|
+
e?.exportMsgPosition !== "hidden" && (Ir || Br || Vr) ? /* @__PURE__ */ Z("div", {
|
|
21618
21618
|
className: `dbn:absolute dbn:z-[9999999] ${ch[`export-${e?.exportMsgPosition ?? "bottom-right"}`]}`,
|
|
21619
21619
|
children: /* @__PURE__ */ Z("div", {
|
|
21620
21620
|
className: `dbn:w-max dbn:flex dbn:items-center dbn:justify-center dbn:gap-1 dbn:p-2 dbn:rounded-md ${["bottom-left", "top-left"].includes(e?.exportMsgPosition ?? "") ? "dbn:border-r-4" : [
|
|
21621
21621
|
"bottom",
|
|
21622
21622
|
"top",
|
|
21623
21623
|
"center"
|
|
21624
|
-
].includes(e?.exportMsgPosition ?? "") ? "dbn:border-x-4" : "dbn:border-l-4"} ${
|
|
21625
|
-
children: !
|
|
21624
|
+
].includes(e?.exportMsgPosition ?? "") ? "dbn:border-x-4" : "dbn:border-l-4"} ${Br ? "dbn:bg-red-100 dbn:border-alert" : "dbn:bg-green-100 dbn:border-success"}`,
|
|
21625
|
+
children: !Br && (Ir || Vr) ? /* @__PURE__ */ Q(X, { children: [Vr ? /* @__PURE__ */ Z(B, {
|
|
21626
21626
|
name: "check",
|
|
21627
21627
|
color: "success"
|
|
21628
21628
|
}) : null, /* @__PURE__ */ Z(G, {
|
|
21629
21629
|
alignment: "center",
|
|
21630
21630
|
color: "success",
|
|
21631
21631
|
variant: "heading-4",
|
|
21632
|
-
children:
|
|
21632
|
+
children: Vr ? "Exported Dashboard Successfully." : "Exporting Dashboard..."
|
|
21633
21633
|
})] }) : /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(B, {
|
|
21634
21634
|
name: "info-filled",
|
|
21635
21635
|
color: "alert"
|
|
@@ -21637,7 +21637,7 @@ var fp = ({ isOpen: e, onClose: t, report: n, isLoading: r, subText: i, zIndex:
|
|
|
21637
21637
|
alignment: "center",
|
|
21638
21638
|
color: "alert",
|
|
21639
21639
|
variant: "heading-4",
|
|
21640
|
-
children:
|
|
21640
|
+
children: Br
|
|
21641
21641
|
})] })
|
|
21642
21642
|
})
|
|
21643
21643
|
}) : null,
|