@databrainhq/plugin 0.15.19 → 0.15.20

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.
@@ -2197,7 +2197,7 @@ const DEFAULT_CHART_SETTINGS = {
2197
2197
  show: false,
2198
2198
  position: "hidden",
2199
2199
  showDimension: false,
2200
- truncateLabelValue: 14,
2200
+ truncateLabelValue: 22,
2201
2201
  showLabelLine: false,
2202
2202
  isEnableValueSummation: false,
2203
2203
  truncateLabel: true,
@@ -97447,15 +97447,104 @@ const addPrefixAndSuffix = (val, prefix = "", suffix = "") => {
97447
97447
  return `${prefix}${val}${suffix}`;
97448
97448
  };
97449
97449
  const dataZoomFormatter = (chartZoom) => {
97450
+ const isZoomXaxis = (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "x" || (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "xy";
97451
+ const isZoomYaxis = (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "y" || (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "xy";
97452
+ const commonConfig = {
97453
+ borderColor: "transparent",
97454
+ backgroundColor: "#EEEEEE",
97455
+ fillerColor: "#5C5C5C",
97456
+ handleIcon: "path://M-9.5,0a9.5,9.5,0,1,1,19,0a9.5,9.5,0,1,1,-19,0z",
97457
+ handleSize: 12,
97458
+ handleStyle: {
97459
+ color: "#ffffff",
97460
+ borderColor: "#5C5C5C",
97461
+ borderWidth: 1,
97462
+ shadowBlur: 2,
97463
+ shadowColor: "rgba(0, 0, 0, 0.1)",
97464
+ shadowOffsetX: 1,
97465
+ shadowOffsetY: 1
97466
+ },
97467
+ moveHandleStyle: {
97468
+ color: "#F4F4F4"
97469
+ },
97470
+ selectedDataBackground: {
97471
+ lineStyle: {
97472
+ color: "transparent"
97473
+ },
97474
+ areaStyle: {
97475
+ color: "rgba(220, 220, 220, 0.2)"
97476
+ }
97477
+ },
97478
+ emphasis: {
97479
+ handleSize: 16,
97480
+ handleStyle: {
97481
+ borderColor: "#5C5C5C",
97482
+ color: "#F4F4F4"
97483
+ }
97484
+ },
97485
+ dataBackground: {
97486
+ lineStyle: {
97487
+ color: "transparent"
97488
+ },
97489
+ areaStyle: {
97490
+ color: "transparent"
97491
+ }
97492
+ },
97493
+ brushSelect: false,
97494
+ zoomLock: false,
97495
+ preventDefaultMouseMove: false,
97496
+ textStyle: {
97497
+ color: "rgba(0, 0, 0, 0.6)"
97498
+ },
97499
+ rangeMode: ["value", "value"]
97500
+ };
97501
+ const verticalSliderConfig = {
97502
+ type: "slider",
97503
+ yAxis: [0],
97504
+ show: chartZoom == null ? void 0 : chartZoom.isZoomEnabled,
97505
+ startValue: 0,
97506
+ orient: "vertical",
97507
+ endValue: 5,
97508
+ width: 8,
97509
+ left: 25,
97510
+ ...commonConfig
97511
+ };
97512
+ const horizontalSliderConfig = {
97513
+ type: "slider",
97514
+ xAxis: [0],
97515
+ show: chartZoom == null ? void 0 : chartZoom.isZoomEnabled,
97516
+ startValue: 0,
97517
+ orient: "horizontal",
97518
+ endValue: 20,
97519
+ height: 8,
97520
+ bottom: 10,
97521
+ ...commonConfig
97522
+ };
97523
+ const insideZoomConfigX = {
97524
+ type: "inside",
97525
+ xAxisIndex: isZoomXaxis ? [0] : "none",
97526
+ yAxisIndex: "none",
97527
+ start: 0,
97528
+ startValue: 0,
97529
+ endValue: isZoomXaxis ? 20 : void 0,
97530
+ disabled: !(chartZoom == null ? void 0 : chartZoom.isZoomEnabled),
97531
+ zoomOnMouseWheel: (chartZoom == null ? void 0 : chartZoom.zoomOnMouseWheel) || "ctrl"
97532
+ };
97533
+ const insideZoomConfigY = {
97534
+ type: "inside",
97535
+ xAxisIndex: "none",
97536
+ yAxisIndex: isZoomYaxis ? [0] : "none",
97537
+ start: 0,
97538
+ startValue: 0,
97539
+ endValue: isZoomYaxis ? 5 : void 0,
97540
+ disabled: !(chartZoom == null ? void 0 : chartZoom.isZoomEnabled),
97541
+ zoomOnMouseWheel: (chartZoom == null ? void 0 : chartZoom.zoomOnMouseWheel) || "ctrl"
97542
+ };
97450
97543
  return [
97451
- {
97452
- type: "inside",
97453
- xAxisIndex: (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "x" || (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "xy" ? [0] : "none",
97454
- yAxisIndex: (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "y" || (chartZoom == null ? void 0 : chartZoom.zoomAxis) === "xy" ? [0] : "none",
97455
- start: 0,
97456
- disabled: !(chartZoom == null ? void 0 : chartZoom.isZoomEnabled),
97457
- zoomOnMouseWheel: (chartZoom == null ? void 0 : chartZoom.zoomOnMouseWheel) || "ctrl"
97458
- }
97544
+ isZoomXaxis && insideZoomConfigX,
97545
+ isZoomYaxis && insideZoomConfigY,
97546
+ isZoomXaxis && horizontalSliderConfig,
97547
+ isZoomYaxis && verticalSliderConfig
97459
97548
  ];
97460
97549
  };
97461
97550
  const findLegendPosition = (val) => {
@@ -97541,6 +97630,7 @@ const getLegendData = ({
97541
97630
  const datasets = getDatasets(datasetsParams);
97542
97631
  switch (chartOptions2.chartType) {
97543
97632
  case CHART_TYPES.line:
97633
+ case CHART_TYPES.area:
97544
97634
  return chartOptions2.isMultiDimension && chartOptions2.seriesField !== "ungrouped" ? (_q = getSeriesData$2(seriesDataParams)) == null ? void 0 : _q.map(
97545
97635
  (d3) => `${d3.name}` || "line"
97546
97636
  ) : datasets == null ? void 0 : datasets.map((val) => {
@@ -97559,7 +97649,6 @@ const getLegendData = ({
97559
97649
  var _a3;
97560
97650
  return ((_a3 = chartOptions2 == null ? void 0 : chartOptions2.customSettings) == null ? void 0 : _a3.showFullStacked) ? `percentage of ${val.label}` : val.label;
97561
97651
  });
97562
- case CHART_TYPES.area:
97563
97652
  case CHART_TYPES.stackedArea:
97564
97653
  case CHART_TYPES.boxplot:
97565
97654
  case CHART_TYPES.bubble:
@@ -97760,8 +97849,9 @@ const getChartOptions = ({
97760
97849
  seriesType: ((_P = chartOptions2.yAxisList) == null ? void 0 : _P.map((column2) => ({ column: column2, type: "bar" }))) || [],
97761
97850
  ...chartOptions2.timeSeriesSettings
97762
97851
  };
97852
+ const colorArr = [...gradientArr || [], ...colorPalette2 || []];
97763
97853
  const option3 = {
97764
- ...(colors2 == null ? void 0 : colors2.length) || gradientArr.length ? { color: [...gradientArr || [], ...colorPalette2 || []] } : {}
97854
+ ...(colors2 == null ? void 0 : colors2.length) || gradientArr.length ? { color: colorArr } : {}
97765
97855
  };
97766
97856
  const customData = (() => {
97767
97857
  const datasets = getDatasets({ ...getChartAttributesArgs });
@@ -98593,6 +98683,18 @@ const getChartOptions = ({
98593
98683
  (_Jb = getDatasets({ ...getChartAttributesArgs })) == null ? void 0 : _Jb.map(
98594
98684
  (obj) => Object.assign(obj, { fill: true })
98595
98685
  );
98686
+ const xAxisData = getXaxisData$1({
98687
+ data: finalData,
98688
+ isGroupBy,
98689
+ xAxis,
98690
+ isGroupXAxis: !!(chartOptions2 == null ? void 0 : chartOptions2.isGroupXAxis)
98691
+ });
98692
+ const legendData = getChartLengendData({
98693
+ groupByColumnUniqueValue,
98694
+ isGroupBy,
98695
+ isShowPercentageFullStack,
98696
+ yAxisList
98697
+ });
98596
98698
  Object.assign(option3, {
98597
98699
  ...option3,
98598
98700
  ...defaultOptions2,
@@ -98627,16 +98729,13 @@ const getChartOptions = ({
98627
98729
  },
98628
98730
  legend: {
98629
98731
  ...chartLegendSettings,
98630
- data: getLegendData({
98631
- chartOptions: chartOptions2,
98632
- data
98633
- })
98732
+ data: legendData
98634
98733
  },
98635
98734
  xAxis: [
98636
98735
  {
98637
98736
  type: "category",
98638
98737
  boundaryGap: false,
98639
- data: getLabels({ ...getChartAttributesArgs }),
98738
+ data: xAxisData,
98640
98739
  ...horizontalAxisSettings,
98641
98740
  axisLabel: {
98642
98741
  ...horizontalAxisLabelSettings,
@@ -98714,36 +98813,47 @@ const getChartOptions = ({
98714
98813
  }
98715
98814
  }
98716
98815
  ],
98717
- series: (_Mb = getDatasets({ ...getChartAttributesArgs })) == null ? void 0 : _Mb.map(
98718
- (item) => {
98719
- var _a3, _b3, _c3;
98720
- return {
98721
- data: item.data,
98722
- type: "line",
98723
- name: item.label,
98724
- areaStyle: {},
98725
- emphasis: {
98726
- focus: "series"
98727
- },
98728
- ...labelFormatting(),
98729
- label: {
98730
- show: !!((_a3 = chartAppearance == null ? void 0 : chartAppearance.chartLabel) == null ? void 0 : _a3.position) || labelSettings.show,
98731
- position: ((_b3 = chartAppearance == null ? void 0 : chartAppearance.chartLabel) == null ? void 0 : _b3.position) || labelSettings.position,
98732
- formatter(d3) {
98733
- return addPrefixAndSuffix(
98734
- numberFormatter(d3.data, customSettings.numberFormatter),
98735
- customSettings.labelPrefix,
98736
- customSettings.labelSuffix
98737
- );
98738
- }
98739
- },
98740
- showBackground: backGroundColor.show,
98741
- backgroundStyle: {
98742
- color: ((_c3 = chartOptions2.customSettings) == null ? void 0 : _c3.isShowBarGradient) ? barGradient : "rgba(180, 180, 180, 0.2)"
98816
+ series: (_Mb = getChartDataset({
98817
+ data: finalData,
98818
+ groupByColumnUniqueValue,
98819
+ isGroupBy,
98820
+ isShowPercentageFullStack,
98821
+ seriesField,
98822
+ xAxis,
98823
+ xAxisData,
98824
+ yAxisList,
98825
+ groupXAxis: {
98826
+ isGroupXAxis: !!(chartOptions2 == null ? void 0 : chartOptions2.isGroupXAxis),
98827
+ Aggregate: "SUM"
98828
+ }
98829
+ })) == null ? void 0 : _Mb.map((item) => {
98830
+ var _a3, _b3, _c3;
98831
+ return {
98832
+ data: item.data,
98833
+ type: "line",
98834
+ name: item.label,
98835
+ areaStyle: {},
98836
+ emphasis: {
98837
+ focus: "series"
98838
+ },
98839
+ ...labelFormatting(),
98840
+ label: {
98841
+ show: !!((_a3 = chartAppearance == null ? void 0 : chartAppearance.chartLabel) == null ? void 0 : _a3.position) || labelSettings.show,
98842
+ position: ((_b3 = chartAppearance == null ? void 0 : chartAppearance.chartLabel) == null ? void 0 : _b3.position) || labelSettings.position,
98843
+ formatter(d3) {
98844
+ return addPrefixAndSuffix(
98845
+ numberFormatter(d3.data, customSettings.numberFormatter),
98846
+ customSettings.labelPrefix,
98847
+ customSettings.labelSuffix
98848
+ );
98743
98849
  }
98744
- };
98745
- }
98746
- )
98850
+ },
98851
+ showBackground: backGroundColor.show,
98852
+ backgroundStyle: {
98853
+ color: ((_c3 = chartOptions2.customSettings) == null ? void 0 : _c3.isShowBarGradient) ? barGradient : "rgba(180, 180, 180, 0.2)"
98854
+ }
98855
+ };
98856
+ })
98747
98857
  });
98748
98858
  break;
98749
98859
  }
@@ -99281,7 +99391,7 @@ const getChartOptions = ({
99281
99391
  axisLine: {
99282
99392
  show: ((_d2 = chartAppearance == null ? void 0 : chartAppearance.verticalAxis) == null ? void 0 : _d2.hideAxisLines) ? !((_e3 = chartAppearance == null ? void 0 : chartAppearance.verticalAxis) == null ? void 0 : _e3.hideAxisLines) : !((_f2 = chartOptions2.customSettings) == null ? void 0 : _f2.hideYAxisLines),
99283
99393
  lineStyle: {
99284
- color: colors2 == null ? void 0 : colors2[chartOptions2.comboBarList.length + index2]
99394
+ color: colorArr == null ? void 0 : colorArr[chartOptions2.comboBarList.length + index2]
99285
99395
  }
99286
99396
  },
99287
99397
  axisLabel: {
@@ -99354,7 +99464,7 @@ const getChartOptions = ({
99354
99464
  axisLine: {
99355
99465
  show: ((_d2 = chartAppearance == null ? void 0 : chartAppearance.verticalAxis) == null ? void 0 : _d2.hideAxisLines) ? (_e3 = chartAppearance == null ? void 0 : chartAppearance.verticalAxis) == null ? void 0 : _e3.hideAxisLines : !((_f2 = chartOptions2.customSettings) == null ? void 0 : _f2.hideYAxisLines),
99356
99466
  lineStyle: {
99357
- color: colors2 == null ? void 0 : colors2[index2]
99467
+ color: colorArr == null ? void 0 : colorArr[index2]
99358
99468
  }
99359
99469
  },
99360
99470
  axisLabel: {
@@ -150202,9 +150312,14 @@ const useMetricCard = ({
150202
150312
  isFrontendApp,
150203
150313
  guestToken,
150204
150314
  encryptedClientId,
150205
- workspaceId
150315
+ workspaceId,
150316
+ metricStore,
150317
+ setMetricStore,
150318
+ summarizeMetricMutation
150206
150319
  }) => {
150207
150320
  var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u, _v, _w;
150321
+ const [elementSummary, setElementSummary] = useState("");
150322
+ const [isLoadingSummary, setLoadingSummary] = useState(false);
150208
150323
  const containerRef = useRef(null);
150209
150324
  const [tableLimit, setTableLimit] = useState({
150210
150325
  limit: 10,
@@ -151107,7 +151222,68 @@ const useMetricCard = ({
151107
151222
  (_r = chartSettings2.timeSeriesSettings) == null ? void 0 : _r.seriesType[0],
151108
151223
  (_s = chartSettings2.timeSeriesSettings) == null ? void 0 : _s.groupBySettings.fillXAxis
151109
151224
  ]);
151225
+ useEffect(() => {
151226
+ if (isQueryLoading) {
151227
+ setMetricStore == null ? void 0 : setMetricStore((prevMap) => {
151228
+ const newMap = new Map(prevMap);
151229
+ newMap.set(metric2.id, {
151230
+ data: [],
151231
+ isLoading: isQueryLoading
151232
+ });
151233
+ return newMap;
151234
+ });
151235
+ }
151236
+ if (!!(metricdata == null ? void 0 : metricdata.data) && !!metricStore) {
151237
+ setMetricStore == null ? void 0 : setMetricStore((prevMap) => {
151238
+ const newMap = new Map(prevMap);
151239
+ newMap.set(metric2.id, {
151240
+ data: metricdata == null ? void 0 : metricdata.data,
151241
+ isLoading: isQueryLoading
151242
+ });
151243
+ return newMap;
151244
+ });
151245
+ }
151246
+ }, [metricdata == null ? void 0 : metricdata.data, isQueryLoading]);
151247
+ const isMetricListLoading = () => {
151248
+ var _a3, _b3, _c3;
151249
+ const metricListLoading = ((_c3 = (_b3 = (_a3 = metric2 == null ? void 0 : metric2.elementSettings) == null ? void 0 : _a3.summary) == null ? void 0 : _b3.metricList) == null ? void 0 : _c3.map(
151250
+ (m4) => {
151251
+ var _a4;
151252
+ return (_a4 = metricStore == null ? void 0 : metricStore.get(m4 == null ? void 0 : m4.value)) == null ? void 0 : _a4.isLoading;
151253
+ }
151254
+ )) || [];
151255
+ return metricListLoading.some((m4) => m4 === true);
151256
+ };
151257
+ useEffect(() => {
151258
+ var _a3, _b3, _c3, _d2, _e3, _f2, _g2;
151259
+ if (!!((_b3 = (_a3 = metric2 == null ? void 0 : metric2.elementSettings) == null ? void 0 : _a3.summary) == null ? void 0 : _b3.metricList) && Boolean(metricStore == null ? void 0 : metricStore.get(metric2.id))) {
151260
+ if (!isMetricListLoading()) {
151261
+ setElementSummary("");
151262
+ setLoadingSummary(() => true);
151263
+ summarizeMetricMutation == null ? void 0 : summarizeMetricMutation.mutate(
151264
+ {
151265
+ metricData: (_e3 = (_d2 = (_c3 = metric2 == null ? void 0 : metric2.elementSettings) == null ? void 0 : _c3.summary) == null ? void 0 : _d2.metricList) == null ? void 0 : _e3.map(
151266
+ (m4) => metricStore == null ? void 0 : metricStore.get(m4 == null ? void 0 : m4.value)
151267
+ ),
151268
+ summaryPrompt: (_g2 = (_f2 = metric2 == null ? void 0 : metric2.elementSettings) == null ? void 0 : _f2.summary) == null ? void 0 : _g2.summaryPrompt
151269
+ },
151270
+ {
151271
+ onSuccess: (data) => {
151272
+ setLoadingSummary((prev) => false);
151273
+ setElementSummary(data.summary);
151274
+ },
151275
+ onSettled: () => {
151276
+ setLoadingSummary((prev) => false);
151277
+ }
151278
+ }
151279
+ );
151280
+ }
151281
+ }
151282
+ }, [metric2 == null ? void 0 : metric2.elementSettings, isMetricListLoading()]);
151110
151283
  return {
151284
+ elementSummary,
151285
+ isLoadingSummary,
151286
+ isMetricListLoading,
151111
151287
  onDrillLevelClick,
151112
151288
  onDrillDown,
151113
151289
  handleChartClick,
@@ -214649,7 +214825,7 @@ const Modal = ({
214649
214825
  onMouseDown: handleMouseDownClick,
214650
214826
  onMouseUp: handleMouseUpClick,
214651
214827
  ref: modalRef,
214652
- style: { zIndex },
214828
+ style: zIndex ? { zIndex } : {},
214653
214829
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
214654
214830
  "div",
214655
214831
  {
@@ -215169,7 +215345,10 @@ const NoDataLoading = React__default.memo(
215169
215345
  ] });
215170
215346
  }
215171
215347
  );
215172
- const ElementCard = ({ elementSettings }) => {
215348
+ const ElementCard = ({
215349
+ elementSettings = { text: "", targetWord: "", link: "" },
215350
+ elementSummary = ""
215351
+ }) => {
215173
215352
  const redirectToAnotherPage = () => {
215174
215353
  const url = elementSettings.link || "";
215175
215354
  if (elementSettings.isOpenInNewTab) {
@@ -215209,7 +215388,13 @@ const ElementCard = ({ elementSettings }) => {
215209
215388
  {
215210
215389
  className: "ql-editor dbn-w-full dbn-h-full",
215211
215390
  onClick: elementSettings.link ? redirectToAnotherPage : void 0,
215212
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dbn-w-full dbn-h-full", dangerouslySetInnerHTML: { __html: text2 } })
215391
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
215392
+ "div",
215393
+ {
215394
+ className: "dbn-prose dbn-w-full dbn-h-full",
215395
+ dangerouslySetInnerHTML: { __html: elementSummary || text2 }
215396
+ }
215397
+ )
215213
215398
  }
215214
215399
  );
215215
215400
  };
@@ -215399,9 +215584,12 @@ const MetricCard = ({
215399
215584
  isShadowDisableOnHover,
215400
215585
  isAllowedToSeeUnderlyingData,
215401
215586
  noDataImg,
215402
- metricCardColor
215587
+ metricCardColor,
215588
+ metricStore,
215589
+ setMetricStore,
215590
+ summarizeMetricMutation
215403
215591
  }) => {
215404
- var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja;
215592
+ var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea;
215405
215593
  const globalFilters = useMemo(() => {
215406
215594
  var _a3;
215407
215595
  return {
@@ -215465,8 +215653,12 @@ const MetricCard = ({
215465
215653
  isInavlidForSort,
215466
215654
  onAddComparison,
215467
215655
  groupedRlsConditions,
215468
- dataMartRelationships
215656
+ dataMartRelationships,
215657
+ elementSummary,
215658
+ isLoadingSummary
215469
215659
  } = useMetricCard({
215660
+ metricStore,
215661
+ setMetricStore,
215470
215662
  metric: metricItem,
215471
215663
  clientId: client2,
215472
215664
  globalFilters,
@@ -215481,7 +215673,8 @@ const MetricCard = ({
215481
215673
  isFrontendApp,
215482
215674
  guestToken,
215483
215675
  encryptedClientId: encryptedClient,
215484
- workspaceId
215676
+ workspaceId,
215677
+ summarizeMetricMutation
215485
215678
  });
215486
215679
  const [isShowFullScreen, setShowFullScreen] = useState(false);
215487
215680
  const [hoveredCard, setHoveredCard] = useState("");
@@ -215755,10 +215948,8 @@ const MetricCard = ({
215755
215948
  children: ((_t2 = chartSettings2 == null ? void 0 : chartSettings2.metricCardSettings) == null ? void 0 : _t2.isDisableTitle) ? hoveredCard === (metricItem == null ? void 0 : metricItem.id) ? renderHeaderName(metricItem.name) : null : renderHeaderName(metricItem.name)
215756
215949
  }
215757
215950
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: ((_u = chartSettings2 == null ? void 0 : chartSettings2.metricCardSettings) == null ? void 0 : _u.isDisableTitle) ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
215758
- Button,
215951
+ "div",
215759
215952
  {
215760
- variant: "popover",
215761
- type: "button",
215762
215953
  onClick: () => {
215763
215954
  var _a3, _b3;
215764
215955
  if (metricItem.isMetric) {
@@ -215772,10 +215963,10 @@ const MetricCard = ({
215772
215963
  onMaximize == null ? void 0 : onMaximize(metricItem, param, appFilters);
215773
215964
  }
215774
215965
  },
215775
- disabled: isDisableCardClick,
215776
215966
  className: `${styles$x.metricTitle} dbn-metric-card-title ${!onMaximize && !((_w = (_v = metricItem == null ? void 0 : metricItem.clickActions) == null ? void 0 : _v.card) == null ? void 0 : _w.isEnable) ? "dbn-cursor-auto" : ""} ${((_x = chartSettings2 == null ? void 0 : chartSettings2.metricCardSettings) == null ? void 0 : _x.isEnableTitleWrap) ? styles$x.textWrap : styles$x.truncate}`,
215777
215967
  style: {
215778
- textAlign: ((_y = metricItem == null ? void 0 : metricItem.elementSettings) == null ? void 0 : _y.titleAlignment) || "left"
215968
+ textAlign: ((_y = metricItem == null ? void 0 : metricItem.elementSettings) == null ? void 0 : _y.titleAlignment) || "left",
215969
+ pointerEvents: isDisableCardClick ? "none" : void 0
215779
215970
  },
215780
215971
  children: metricItem.name
215781
215972
  }
@@ -216348,17 +216539,7 @@ const MetricCard = ({
216348
216539
  onMaximize: disableActions || !onMaximize ? void 0 : () => {
216349
216540
  onMaximize == null ? void 0 : onMaximize(metricItem, param, appFilters);
216350
216541
  },
216351
- chartOptions: ((_U = (_T = chartSettingOptions.customSettings) == null ? void 0 : _T.chartZoom) == null ? void 0 : _U.isZoomEnabled) ? {
216352
- ...chartSettingOptions,
216353
- customSettings: {
216354
- ...chartSettingOptions.customSettings,
216355
- chartZoom: {
216356
- ...(_V = chartSettingOptions.customSettings) == null ? void 0 : _V.chartZoom,
216357
- zoomAxis: isEnableZoom ? (_X = (_W = chartSettingOptions.customSettings) == null ? void 0 : _W.chartZoom) == null ? void 0 : _X.zoomAxis : "none",
216358
- zoomOnMouseWheel: false
216359
- }
216360
- }
216361
- } : chartSettingOptions,
216542
+ chartOptions: chartSettingOptions,
216362
216543
  events: disableActions ? void 0 : {
216363
216544
  click: (params, rowFilters) => {
216364
216545
  var _a3, _b3, _c3, _d2, _e3, _f2, _g2;
@@ -216419,8 +216600,15 @@ const MetricCard = ({
216419
216600
  ]
216420
216601
  }
216421
216602
  ),
216422
- !metricItem.isMetric && !(chartSettings2 == null ? void 0 : chartSettings2.chartType) && ((_Z = (_Y = metricItem == null ? void 0 : metricItem.elementSettings) == null ? void 0 : _Y.textBox) == null ? void 0 : _Z.text) && !isQueryLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(ElementCard, { elementSettings: (__ = metricItem == null ? void 0 : metricItem.elementSettings) == null ? void 0 : __.textBox }) : null,
216423
- ((_$ = downloadMetrics == null ? void 0 : downloadMetrics.find((m4) => m4.id === (metricItem == null ? void 0 : metricItem.id))) == null ? void 0 : _$.isInProgress) ? /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { text: "Download is in progress", variant: "primary" }) : null,
216603
+ !metricItem.isMetric && !(chartSettings2 == null ? void 0 : chartSettings2.chartType) && !!(((_U = (_T = metricItem == null ? void 0 : metricItem.elementSettings) == null ? void 0 : _T.textBox) == null ? void 0 : _U.text) || elementSummary) && !isQueryLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(
216604
+ ElementCard,
216605
+ {
216606
+ elementSettings: (_V = metricItem == null ? void 0 : metricItem.elementSettings) == null ? void 0 : _V.textBox,
216607
+ elementSummary
216608
+ }
216609
+ ) : null,
216610
+ isLoadingSummary ? /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonLoader, { height: "full" }) : null,
216611
+ ((_W = downloadMetrics == null ? void 0 : downloadMetrics.find((m4) => m4.id === (metricItem == null ? void 0 : metricItem.id))) == null ? void 0 : _W.isInProgress) ? /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { text: "Download is in progress", variant: "primary" }) : null,
216424
216612
  onMaximize && (metricItem == null ? void 0 : metricItem.isMetric) && !disableActions && isShowFullScreen && !(chartSettings2.chartType === CHART_TYPES.table) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
216425
216613
  Button,
216426
216614
  {
@@ -216445,14 +216633,14 @@ const MetricCard = ({
216445
216633
  ]
216446
216634
  }
216447
216635
  ),
216448
- ((_aa = Object.keys(appearanceOptions || {})) == null ? void 0 : _aa.length) && [BOTTOM_LEFT, BOTTOM_RIGHT].includes(
216636
+ ((_X = Object.keys(appearanceOptions || {})) == null ? void 0 : _X.length) && [BOTTOM_LEFT, BOTTOM_RIGHT].includes(
216449
216637
  (appearanceOptions == null ? void 0 : appearanceOptions.appearanceOptionsPosition) || ""
216450
216638
  ) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
216451
216639
  "div",
216452
216640
  {
216453
216641
  className: `dbn-w-full dbn-flex dbn-flex-wrap dbn-gap-4 ${(appearanceOptions == null ? void 0 : appearanceOptions.appearanceOptionsPosition) === BOTTOM_LEFT ? "dbn-justify-start" : "dbn-justify-end"}`,
216454
216642
  children: [
216455
- ((_ba = appearanceOptions == null ? void 0 : appearanceOptions.cumulativeBar) == null ? void 0 : _ba.isEnabled) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "dbn-flex dbn-gap-1 dbn-items-center", children: [
216643
+ ((_Y = appearanceOptions == null ? void 0 : appearanceOptions.cumulativeBar) == null ? void 0 : _Y.isEnabled) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "dbn-flex dbn-gap-1 dbn-items-center", children: [
216456
216644
  /* @__PURE__ */ jsxRuntimeExports.jsx(
216457
216645
  InfoTooltip,
216458
216646
  {
@@ -216463,7 +216651,7 @@ const MetricCard = ({
216463
216651
  /* @__PURE__ */ jsxRuntimeExports.jsx(
216464
216652
  Switch,
216465
216653
  {
216466
- enabled: (_ca = chartSettings2.customSettings) == null ? void 0 : _ca.cumulativeBar,
216654
+ enabled: (_Z = chartSettings2.customSettings) == null ? void 0 : _Z.cumulativeBar,
216467
216655
  name: "cumulative",
216468
216656
  onChange: () => setChartSettings((prev) => {
216469
216657
  var _a3;
@@ -216475,11 +216663,11 @@ const MetricCard = ({
216475
216663
  }
216476
216664
  };
216477
216665
  }),
216478
- placeholder: ((_da = appearanceOptions == null ? void 0 : appearanceOptions.cumulativeBar) == null ? void 0 : _da.label) || "Cumulative"
216666
+ placeholder: ((__ = appearanceOptions == null ? void 0 : appearanceOptions.cumulativeBar) == null ? void 0 : __.label) || "Cumulative"
216479
216667
  }
216480
216668
  )
216481
216669
  ] }) : null,
216482
- ((_ea = appearanceOptions == null ? void 0 : appearanceOptions.dynamicBehaviour) == null ? void 0 : _ea.isEnabled) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "dbn-flex dbn-gap-1 dbn-items-center", children: [
216670
+ ((_$ = appearanceOptions == null ? void 0 : appearanceOptions.dynamicBehaviour) == null ? void 0 : _$.isEnabled) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "dbn-flex dbn-gap-1 dbn-items-center", children: [
216483
216671
  /* @__PURE__ */ jsxRuntimeExports.jsx(
216484
216672
  InfoTooltip,
216485
216673
  {
@@ -216490,7 +216678,7 @@ const MetricCard = ({
216490
216678
  /* @__PURE__ */ jsxRuntimeExports.jsx(
216491
216679
  Switch,
216492
216680
  {
216493
- enabled: (_fa = chartSettings2.customSettings) == null ? void 0 : _fa.showDynamicBehaviour,
216681
+ enabled: (_aa = chartSettings2.customSettings) == null ? void 0 : _aa.showDynamicBehaviour,
216494
216682
  name: "dynamic",
216495
216683
  onChange: () => setChartSettings((prev) => {
216496
216684
  var _a3;
@@ -216502,11 +216690,11 @@ const MetricCard = ({
216502
216690
  }
216503
216691
  };
216504
216692
  }),
216505
- placeholder: ((_ga = appearanceOptions == null ? void 0 : appearanceOptions.dynamicBehaviour) == null ? void 0 : _ga.label) || "Dynamic"
216693
+ placeholder: ((_ba = appearanceOptions == null ? void 0 : appearanceOptions.dynamicBehaviour) == null ? void 0 : _ba.label) || "Dynamic"
216506
216694
  }
216507
216695
  )
216508
216696
  ] }) : null,
216509
- ((_ha = appearanceOptions == null ? void 0 : appearanceOptions.stackedBars) == null ? void 0 : _ha.isEnabled) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "dbn-flex dbn-gap-1 dbn-items-center", children: [
216697
+ ((_ca = appearanceOptions == null ? void 0 : appearanceOptions.stackedBars) == null ? void 0 : _ca.isEnabled) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "dbn-flex dbn-gap-1 dbn-items-center", children: [
216510
216698
  /* @__PURE__ */ jsxRuntimeExports.jsx(
216511
216699
  InfoTooltip,
216512
216700
  {
@@ -216518,7 +216706,7 @@ const MetricCard = ({
216518
216706
  Switch,
216519
216707
  {
216520
216708
  name: "full stacked",
216521
- enabled: (_ia = chartSettings2.customSettings) == null ? void 0 : _ia.showFullStacked,
216709
+ enabled: (_da = chartSettings2.customSettings) == null ? void 0 : _da.showFullStacked,
216522
216710
  onChange: () => setChartSettings((prev) => {
216523
216711
  var _a3;
216524
216712
  return {
@@ -216529,7 +216717,7 @@ const MetricCard = ({
216529
216717
  }
216530
216718
  };
216531
216719
  }),
216532
- placeholder: ((_ja = appearanceOptions == null ? void 0 : appearanceOptions.stackedBars) == null ? void 0 : _ja.label) || "100% stacked bars"
216720
+ placeholder: ((_ea = appearanceOptions == null ? void 0 : appearanceOptions.stackedBars) == null ? void 0 : _ea.label) || "100% stacked bars"
216533
216721
  }
216534
216722
  )
216535
216723
  ] }) : null
@@ -219380,9 +219568,10 @@ const Chart = React__default.memo(
219380
219568
  chartAppearance,
219381
219569
  metricCardColor
219382
219570
  }) => {
219383
- var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j;
219571
+ var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n;
219384
219572
  const [geoJsonData, setGeoJsonData] = useState();
219385
219573
  const chartRef = useRef(null);
219574
+ const [zoomOptions, setZoomOptions] = useState();
219386
219575
  const options2 = useMemo(() => {
219387
219576
  let dataObj = data;
219388
219577
  if (sortOrder === ASCE) {
@@ -219454,6 +219643,19 @@ const Chart = React__default.memo(
219454
219643
  }
219455
219644
  }
219456
219645
  }, [chartOptions2.chartType]);
219646
+ useEffect(() => {
219647
+ var _a3, _b3;
219648
+ if ((_b3 = (_a3 = chartOptions2.customSettings) == null ? void 0 : _a3.chartZoom) == null ? void 0 : _b3.isZoomEnabled) {
219649
+ setZoomOptions({
219650
+ ...options2,
219651
+ grid: {
219652
+ ...options2 == null ? void 0 : options2.grid,
219653
+ left: 50,
219654
+ bottom: 30
219655
+ }
219656
+ });
219657
+ }
219658
+ }, [(_b2 = (_a2 = chartOptions2.customSettings) == null ? void 0 : _a2.chartZoom) == null ? void 0 : _b2.isZoomEnabled]);
219457
219659
  useEffect(() => {
219458
219660
  var _a3;
219459
219661
  if (((_a3 = chartOptions2.customSettings) == null ? void 0 : _a3.showDynamicBehaviour) && chartOptions2.chartType)
@@ -219609,7 +219811,7 @@ const Chart = React__default.memo(
219609
219811
  className,
219610
219812
  stackCols: chartOptions2.stackTableCols || [],
219611
219813
  colors: options2.colors,
219612
- showLabels: (_a2 = chartOptions2.customSettings) == null ? void 0 : _a2.showStackLabels
219814
+ showLabels: (_c2 = chartOptions2.customSettings) == null ? void 0 : _c2.showStackLabels
219613
219815
  }
219614
219816
  );
219615
219817
  }
@@ -219652,14 +219854,14 @@ const Chart = React__default.memo(
219652
219854
  PivotTableV2,
219653
219855
  {
219654
219856
  props: {
219655
- columns: ((_b2 = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _b2.headers) || [],
219857
+ columns: ((_d = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _d.headers) || [],
219656
219858
  data,
219657
- rows: ((_c2 = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _c2.dimensions) || [],
219658
- values: ((_d = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _d.measures) || [],
219659
- headerSettings: (_e2 = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _e2.headerSettings,
219660
- measures: ((_f = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _f.aggregates) || [],
219661
- isEnableStripedRows: (_g = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _g.isEnableStripedRows,
219662
- dimensions: ((_h = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _h.dims) || [],
219859
+ rows: ((_e2 = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _e2.dimensions) || [],
219860
+ values: ((_f = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _f.measures) || [],
219861
+ headerSettings: (_g = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _g.headerSettings,
219862
+ measures: ((_h = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _h.aggregates) || [],
219863
+ isEnableStripedRows: (_i = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _i.isEnableStripedRows,
219864
+ dimensions: ((_j = options2 == null ? void 0 : options2.pivotTableSettings2) == null ? void 0 : _j.dims) || [],
219663
219865
  onDrillPivotTable,
219664
219866
  pivotDrillState
219665
219867
  }
@@ -219672,7 +219874,7 @@ const Chart = React__default.memo(
219672
219874
  CHART_TYPES.area,
219673
219875
  CHART_TYPES.stackedArea,
219674
219876
  CHART_TYPES.timeSeries
219675
- ].includes(chartOptions2.chartType) && ((_i = chartOptions2.customSettings) == null ? void 0 : _i.showDynamicBehaviour)) {
219877
+ ].includes(chartOptions2.chartType) && ((_k = chartOptions2.customSettings) == null ? void 0 : _k.showDynamicBehaviour)) {
219676
219878
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
219677
219879
  EChartsReact,
219678
219880
  {
@@ -219725,7 +219927,7 @@ const Chart = React__default.memo(
219725
219927
  GaugeLegend,
219726
219928
  {
219727
219929
  data: options2 == null ? void 0 : options2.legendData,
219728
- legendPosition: (_j = chartOptions2 == null ? void 0 : chartOptions2.legendSettings) == null ? void 0 : _j.position
219930
+ legendPosition: (_l = chartOptions2 == null ? void 0 : chartOptions2.legendSettings) == null ? void 0 : _l.position
219729
219931
  }
219730
219932
  ) : null,
219731
219933
  chartOptions2.chartType === CHART_TYPES.worldMap ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -219748,7 +219950,7 @@ const Chart = React__default.memo(
219748
219950
  height: hasDecreasedHeight && (chartHeight2 || 0) >= 6 ? "100px" : hasDecreasedHeight && !chartHeight2 ? "40%" : "100%"
219749
219951
  },
219750
219952
  ...config,
219751
- option: { ...options2, animation: isShowAnimation },
219953
+ option: ((_n = (_m = chartOptions2.customSettings) == null ? void 0 : _m.chartZoom) == null ? void 0 : _n.isZoomEnabled) ? { ...zoomOptions, animation: isShowAnimation } : { ...options2, animation: isShowAnimation },
219752
219954
  className,
219753
219955
  onEvents: events,
219754
219956
  notMerge: true
@@ -242142,13 +242344,12 @@ const ManageMetricMenu = ({
242142
242344
  workspaceId,
242143
242345
  chartAppearance,
242144
242346
  colors: colors2,
242145
- theme: theme2,
242146
- customContent
242347
+ isOpenModal,
242348
+ setOpenModal
242147
242349
  }
242148
242350
  }) => {
242149
242351
  const [checkedMetrics, setCheckedMetrics] = useState([]);
242150
242352
  const [searchKeyword, setSearchKeyword] = useState("");
242151
- const [isOpenModal, setOpenModal] = useState(false);
242152
242353
  useEffect(() => {
242153
242354
  if (metricList == null ? void 0 : metricList.length) {
242154
242355
  const publishedMetrics = metricList == null ? void 0 : metricList.filter(
@@ -242198,231 +242399,217 @@ const ManageMetricMenu = ({
242198
242399
  },
242199
242400
  [metricList, searchKeyword]
242200
242401
  );
242201
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
242202
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242203
- Button,
242204
- {
242205
- variant: "tertiary",
242206
- title: "manage metrics",
242207
- onClick: () => setOpenModal(true),
242208
- style: theme2,
242209
- className: styles.manageButton,
242210
- leftIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Icons, { name: "chart" }),
242211
- children: customContent ? customContent() : "Manage Metrics"
242212
- }
242213
- ),
242214
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
242215
- Modal,
242216
- {
242217
- isOpen: isOpenModal,
242218
- onClose: () => setOpenModal(false),
242219
- headerTitle: "Manage Metrics",
242220
- children: [
242221
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { className: styles.manageMetricContainer, direction: "col", children: [
242222
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242223
- SearchTab,
242224
- {
242225
- setSearchKeyword,
242226
- className: "dbn-w-full"
242227
- }
242228
- ),
242229
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
242230
- Flex,
242231
- {
242232
- direction: "row",
242233
- className: "dbn-overflow-y-auto dbn-gap-2 dbn-flex-wrap dbn-h-full",
242234
- children: [
242235
- filteredUnCheckedList.map((metric2) => {
242236
- const isChecked = checkedMetrics == null ? void 0 : checkedMetrics.includes(metric2 == null ? void 0 : metric2.id);
242237
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
242238
- "div",
242239
- {
242240
- className: `${styles.manageMetricCard} ${isChecked ? "dbn-border-primary" : ""}`,
242241
- onClick: () => {
242242
- if (isChecked) {
242243
- setCheckedMetrics(
242244
- (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242245
- );
242246
- } else {
242247
- setCheckedMetrics((prev) => [
242248
- ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242249
- metric2 == null ? void 0 : metric2.id
242250
- ]);
242251
- }
242252
- },
242253
- children: [
242254
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
242255
- Flex,
242256
- {
242257
- direction: "row",
242258
- className: "dbn-justify-between dbn-items-center",
242259
- children: [
242260
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dbn-w-[90%] dbn-truncate", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242261
- Text,
242262
- {
242263
- variant: "heading-sm",
242264
- color: "primary",
242265
- display: "inline-truncate",
242266
- children: metric2 == null ? void 0 : metric2.name
242267
- }
242268
- ) }),
242269
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242270
- Checkbox,
242271
- {
242272
- checked: isChecked,
242273
- onChange: ({ target: { checked } }) => {
242274
- if (checked) {
242275
- setCheckedMetrics((prev) => [
242276
- ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242277
- metric2 == null ? void 0 : metric2.id
242278
- ]);
242279
- } else {
242280
- setCheckedMetrics(
242281
- (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242282
- );
242283
- }
242402
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
242403
+ Modal,
242404
+ {
242405
+ isOpen: isOpenModal,
242406
+ onClose: () => setOpenModal(false),
242407
+ headerTitle: "Manage Metrics",
242408
+ children: [
242409
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { className: styles.manageMetricContainer, direction: "col", children: [
242410
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
242411
+ SearchTab,
242412
+ {
242413
+ setSearchKeyword,
242414
+ className: "dbn-w-full"
242415
+ }
242416
+ ),
242417
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
242418
+ Flex,
242419
+ {
242420
+ direction: "row",
242421
+ className: "dbn-overflow-y-auto dbn-gap-2 dbn-flex-wrap dbn-h-full",
242422
+ children: [
242423
+ filteredUnCheckedList.map((metric2) => {
242424
+ const isChecked = checkedMetrics == null ? void 0 : checkedMetrics.includes(metric2 == null ? void 0 : metric2.id);
242425
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
242426
+ "div",
242427
+ {
242428
+ className: `${styles.manageMetricCard} ${isChecked ? "dbn-border-primary" : ""}`,
242429
+ onClick: () => {
242430
+ if (isChecked) {
242431
+ setCheckedMetrics(
242432
+ (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242433
+ );
242434
+ } else {
242435
+ setCheckedMetrics((prev) => [
242436
+ ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242437
+ metric2 == null ? void 0 : metric2.id
242438
+ ]);
242439
+ }
242440
+ },
242441
+ children: [
242442
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
242443
+ Flex,
242444
+ {
242445
+ direction: "row",
242446
+ className: "dbn-justify-between dbn-items-center",
242447
+ children: [
242448
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dbn-w-[90%] dbn-truncate", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242449
+ Text,
242450
+ {
242451
+ variant: "heading-sm",
242452
+ color: "primary",
242453
+ display: "inline-truncate",
242454
+ children: metric2 == null ? void 0 : metric2.name
242455
+ }
242456
+ ) }),
242457
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
242458
+ Checkbox,
242459
+ {
242460
+ checked: isChecked,
242461
+ onChange: ({ target: { checked } }) => {
242462
+ if (checked) {
242463
+ setCheckedMetrics((prev) => [
242464
+ ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242465
+ metric2 == null ? void 0 : metric2.id
242466
+ ]);
242467
+ } else {
242468
+ setCheckedMetrics(
242469
+ (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242470
+ );
242284
242471
  }
242285
242472
  }
242286
- )
242287
- ]
242288
- }
242289
- ),
242290
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242291
- "div",
242292
- {
242293
- className: "dbn-w-full dbn-h-[90%]",
242294
- id: metric2.id,
242295
- style: { pointerEvents: "none" },
242296
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242297
- ManageMetricCard,
242298
- {
242299
- chartAppearance,
242300
- workspaceId,
242301
- guestToken: token,
242302
- isFrontendApp: false,
242303
- metricItem: metric2,
242304
- client: client2,
242305
- colors: colors2,
242306
- companyTenancyType
242307
242473
  }
242308
242474
  )
242309
- },
242310
- metric2.id
242311
- )
242312
- ]
242313
- }
242314
- );
242315
- }),
242316
- filteredCheckedList.map((metric2) => {
242317
- const isChecked = checkedMetrics == null ? void 0 : checkedMetrics.includes(metric2 == null ? void 0 : metric2.id);
242318
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
242319
- "div",
242320
- {
242321
- className: `${styles.manageMetricCard} ${isChecked ? "dbn-border-primary" : ""}`,
242322
- onClick: () => {
242323
- if (isChecked) {
242324
- setCheckedMetrics(
242325
- (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242326
- );
242327
- } else {
242328
- setCheckedMetrics((prev) => [
242329
- ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242330
- metric2 == null ? void 0 : metric2.id
242331
- ]);
242475
+ ]
242332
242476
  }
242333
- },
242334
- children: [
242335
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
242336
- Flex,
242337
- {
242338
- direction: "row",
242339
- className: "dbn-justify-between dbn-items-center",
242340
- children: [
242341
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dbn-w-[90%] dbn-truncate", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242342
- Text,
242343
- {
242344
- variant: "heading-sm",
242345
- color: "primary",
242346
- display: "inline-truncate",
242347
- children: metric2 == null ? void 0 : metric2.name
242348
- }
242349
- ) }),
242350
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242351
- Checkbox,
242352
- {
242353
- checked: isChecked,
242354
- onChange: ({ target: { checked } }) => {
242355
- if (checked) {
242356
- setCheckedMetrics((prev) => [
242357
- ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242358
- metric2 == null ? void 0 : metric2.id
242359
- ]);
242360
- } else {
242361
- setCheckedMetrics(
242362
- (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242363
- );
242364
- }
242477
+ ),
242478
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
242479
+ "div",
242480
+ {
242481
+ className: "dbn-w-full dbn-h-[90%]",
242482
+ id: metric2.id,
242483
+ style: { pointerEvents: "none" },
242484
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242485
+ ManageMetricCard,
242486
+ {
242487
+ chartAppearance,
242488
+ workspaceId,
242489
+ guestToken: token,
242490
+ isFrontendApp: false,
242491
+ metricItem: metric2,
242492
+ client: client2,
242493
+ colors: colors2,
242494
+ companyTenancyType
242495
+ }
242496
+ )
242497
+ },
242498
+ metric2.id
242499
+ )
242500
+ ]
242501
+ }
242502
+ );
242503
+ }),
242504
+ filteredCheckedList.map((metric2) => {
242505
+ const isChecked = checkedMetrics == null ? void 0 : checkedMetrics.includes(metric2 == null ? void 0 : metric2.id);
242506
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
242507
+ "div",
242508
+ {
242509
+ className: `${styles.manageMetricCard} ${isChecked ? "dbn-border-primary" : ""}`,
242510
+ onClick: () => {
242511
+ if (isChecked) {
242512
+ setCheckedMetrics(
242513
+ (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242514
+ );
242515
+ } else {
242516
+ setCheckedMetrics((prev) => [
242517
+ ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242518
+ metric2 == null ? void 0 : metric2.id
242519
+ ]);
242520
+ }
242521
+ },
242522
+ children: [
242523
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
242524
+ Flex,
242525
+ {
242526
+ direction: "row",
242527
+ className: "dbn-justify-between dbn-items-center",
242528
+ children: [
242529
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dbn-w-[90%] dbn-truncate", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242530
+ Text,
242531
+ {
242532
+ variant: "heading-sm",
242533
+ color: "primary",
242534
+ display: "inline-truncate",
242535
+ children: metric2 == null ? void 0 : metric2.name
242536
+ }
242537
+ ) }),
242538
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
242539
+ Checkbox,
242540
+ {
242541
+ checked: isChecked,
242542
+ onChange: ({ target: { checked } }) => {
242543
+ if (checked) {
242544
+ setCheckedMetrics((prev) => [
242545
+ ...prev == null ? void 0 : prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id)),
242546
+ metric2 == null ? void 0 : metric2.id
242547
+ ]);
242548
+ } else {
242549
+ setCheckedMetrics(
242550
+ (prev) => prev.filter((m4) => m4 !== (metric2 == null ? void 0 : metric2.id))
242551
+ );
242365
242552
  }
242366
242553
  }
242367
- )
242368
- ]
242369
- }
242370
- ),
242371
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242372
- "div",
242373
- {
242374
- className: "dbn-w-full dbn-h-[90%]",
242375
- id: metric2.id,
242376
- style: { pointerEvents: "none" },
242377
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242378
- ManageMetricCard,
242379
- {
242380
- chartAppearance,
242381
- workspaceId,
242382
- guestToken: token,
242383
- isFrontendApp: false,
242384
- metricItem: metric2,
242385
- client: client2,
242386
- colors: colors2,
242387
- companyTenancyType
242388
242554
  }
242389
242555
  )
242390
- },
242391
- metric2.id
242392
- )
242393
- ]
242394
- }
242395
- );
242396
- })
242397
- ]
242398
- }
242399
- )
242400
- ] }),
242401
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalFooter, { children: [
242402
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "tab", onClick: () => setOpenModal(false), children: "Discard" }),
242403
- /* @__PURE__ */ jsxRuntimeExports.jsx(
242404
- Button,
242405
- {
242406
- variant: "primary",
242407
- onClick: () => {
242408
- var _a2;
242409
- const archiveMetrics = (_a2 = metricList == null ? void 0 : metricList.filter(
242410
- (metric2) => {
242411
- var _a3;
242412
- return !checkedMetrics.includes(metric2 == null ? void 0 : metric2.id) && !((_a3 = metric2 == null ? void 0 : metric2.clientArchivedMetrics) == null ? void 0 : _a3.length);
242556
+ ]
242557
+ }
242558
+ ),
242559
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
242560
+ "div",
242561
+ {
242562
+ className: "dbn-w-full dbn-h-[90%]",
242563
+ id: metric2.id,
242564
+ style: { pointerEvents: "none" },
242565
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242566
+ ManageMetricCard,
242567
+ {
242568
+ chartAppearance,
242569
+ workspaceId,
242570
+ guestToken: token,
242571
+ isFrontendApp: false,
242572
+ metricItem: metric2,
242573
+ client: client2,
242574
+ colors: colors2,
242575
+ companyTenancyType
242576
+ }
242577
+ )
242578
+ },
242579
+ metric2.id
242580
+ )
242581
+ ]
242413
242582
  }
242414
- )) == null ? void 0 : _a2.map((metric2) => metric2 == null ? void 0 : metric2.id);
242415
- onSaveManageMetrics(checkedMetrics, archiveMetrics);
242416
- },
242417
- isDisabled: isLoading || !(metricList == null ? void 0 : metricList.length),
242418
- children: "Save"
242419
- }
242420
- )
242421
- ] })
242422
- ]
242423
- }
242424
- )
242425
- ] });
242583
+ );
242584
+ })
242585
+ ]
242586
+ }
242587
+ )
242588
+ ] }),
242589
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalFooter, { children: [
242590
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "tab", onClick: () => setOpenModal(false), children: "Discard" }),
242591
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
242592
+ Button,
242593
+ {
242594
+ variant: "primary",
242595
+ onClick: () => {
242596
+ var _a2;
242597
+ const archiveMetrics = (_a2 = metricList == null ? void 0 : metricList.filter(
242598
+ (metric2) => {
242599
+ var _a3;
242600
+ return !checkedMetrics.includes(metric2 == null ? void 0 : metric2.id) && !((_a3 = metric2 == null ? void 0 : metric2.clientArchivedMetrics) == null ? void 0 : _a3.length);
242601
+ }
242602
+ )) == null ? void 0 : _a2.map((metric2) => metric2 == null ? void 0 : metric2.id);
242603
+ onSaveManageMetrics(checkedMetrics, archiveMetrics);
242604
+ },
242605
+ isDisabled: isLoading || !(metricList == null ? void 0 : metricList.length),
242606
+ children: "Save"
242607
+ }
242608
+ )
242609
+ ] })
242610
+ ]
242611
+ }
242612
+ ) });
242426
242613
  };
242427
242614
  const checkInlineStyle = (style2) => {
242428
242615
  var _a2, _b2, _c2, _d;
@@ -242445,7 +242632,7 @@ const EmbeddedDashboard = React__default.memo(
242445
242632
  noDataImg,
242446
242633
  customContent
242447
242634
  }) => {
242448
- var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _A, _B;
242635
+ var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z;
242449
242636
  const [url, setUrl] = useState(window.location.search);
242450
242637
  const [filterUrl, setFilterUrl] = useState(window.location.search);
242451
242638
  const { data, isLoading, error: error2 } = useDashboardContext();
@@ -242453,6 +242640,7 @@ const EmbeddedDashboard = React__default.memo(
242453
242640
  const [isShowMetricCreateModal2, setShowMetricCreateModal] = useState(false);
242454
242641
  const [dataLimit, setDataLimit] = useState(0);
242455
242642
  const [isShowLoader, setShowLoader] = useState(false);
242643
+ const [isOpenManageModal, setOpenManageModal] = useState(false);
242456
242644
  const [isShowGenerateMetricModal, setShowGenerateMetricModal] = useState(false);
242457
242645
  const [isSearchMetricModal, setSearchGenerateMetricModal] = useState(false);
242458
242646
  const [selectedFilterVal, setSelectedFilterVal] = useState([]);
@@ -242962,19 +243150,15 @@ const EmbeddedDashboard = React__default.memo(
242962
243150
  !(options2 == null ? void 0 : options2.disableManageMetrics) && data.isAllowedManageMetrics && !!((_o = data.externalDashboardMetrics) == null ? void 0 : _o.length) && (!(theme2 == null ? void 0 : theme2.manageMetricsStyle) || (theme2 == null ? void 0 : theme2.manageMetricsStyle) && !checkInlineStyle(
242963
243151
  theme2 == null ? void 0 : theme2.manageMetricsStyle
242964
243152
  )) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "hover:dbn-bg-gray-3 dbn-rounded-md", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
242965
- ManageMetricMenu,
243153
+ Button,
242966
243154
  {
242967
- props: {
242968
- metricList,
242969
- token,
242970
- client: data.clientId,
242971
- companyTenancyType: data.companyTenancyType,
242972
- workspaceId: (_p = data.workspace) == null ? void 0 : _p.id,
242973
- chartAppearance: options2 == null ? void 0 : options2.chartAppearance,
242974
- colors: (options2 == null ? void 0 : options2.chartColors) ?? adminThemeChartColors,
242975
- theme: theme2 == null ? void 0 : theme2.manageMetricsStyle,
242976
- customContent
242977
- }
243155
+ variant: "tertiary",
243156
+ title: "manage metrics",
243157
+ onClick: () => setOpenManageModal(true),
243158
+ style: theme2 == null ? void 0 : theme2.manageMetricsStyle,
243159
+ className: styles$1b.manageButton,
243160
+ leftIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Icons, { name: "chart" }),
243161
+ children: customContent ? customContent() : "Manage Metrics"
242978
243162
  }
242979
243163
  ) })
242980
243164
  ] })
@@ -243005,7 +243189,7 @@ const EmbeddedDashboard = React__default.memo(
243005
243189
  chartColors: (options2 == null ? void 0 : options2.chartColors) ?? adminThemeChartColors,
243006
243190
  isShowMetricCreateModal: isShowMetricCreateModal2,
243007
243191
  setShowMetricCreateModal,
243008
- workspaceId: (_q = data.workspace) == null ? void 0 : _q.id,
243192
+ workspaceId: (_p = data.workspace) == null ? void 0 : _p.id,
243009
243193
  userProvidedDashboardId: data.externalDashboard.externalDashboardId
243010
243194
  }
243011
243195
  ) })
@@ -243033,7 +243217,7 @@ const EmbeddedDashboard = React__default.memo(
243033
243217
  chartColors: (options2 == null ? void 0 : options2.chartColors) ?? adminThemeChartColors,
243034
243218
  isShowMetricCreateModal: isShowGenerateMetricModal,
243035
243219
  setShowMetricCreateModal: setShowGenerateMetricModal,
243036
- workspaceId: (_r = data.workspace) == null ? void 0 : _r.id,
243220
+ workspaceId: (_q = data.workspace) == null ? void 0 : _q.id,
243037
243221
  userProvidedDashboardId: data.externalDashboard.externalDashboardId
243038
243222
  }
243039
243223
  ) })
@@ -243057,7 +243241,7 @@ const EmbeddedDashboard = React__default.memo(
243057
243241
  dashboardId: data.externalDashboard.id,
243058
243242
  dashboardIds: [data.externalDashboard.id],
243059
243243
  token,
243060
- workspaceId: (_s = data.workspace) == null ? void 0 : _s.id,
243244
+ workspaceId: (_r = data.workspace) == null ? void 0 : _r.id,
243061
243245
  themeChartColors: (options2 == null ? void 0 : options2.chartColors) ?? adminThemeChartColors,
243062
243246
  setSearchGenerateMetricModal,
243063
243247
  clientId: data.clientId
@@ -243076,8 +243260,8 @@ const EmbeddedDashboard = React__default.memo(
243076
243260
  isEndUserApp: true,
243077
243261
  clientColumnType: data.clientColumnType,
243078
243262
  hideDatePickerOptions: (options2 == null ? void 0 : options2.hideDatePickerOptions) || [],
243079
- filterIconColor: (_t2 = theme2 == null ? void 0 : theme2.button) == null ? void 0 : _t2.secondaryText,
243080
- filterButtonBgColor: (_u = theme2 == null ? void 0 : theme2.button) == null ? void 0 : _u.secondary,
243263
+ filterIconColor: (_s = theme2 == null ? void 0 : theme2.button) == null ? void 0 : _s.secondaryText,
243264
+ filterButtonBgColor: (_t2 = theme2 == null ? void 0 : theme2.button) == null ? void 0 : _t2.secondary,
243081
243265
  tenancyLevel: data.companyTenancyType,
243082
243266
  appliedFilterPairs: filterPairs,
243083
243267
  filters: filters2,
@@ -243087,7 +243271,7 @@ const EmbeddedDashboard = React__default.memo(
243087
243271
  theme: dropdownTheme,
243088
243272
  internal: {
243089
243273
  isInternal: true,
243090
- workspaceId: (_v = data.workspace) == null ? void 0 : _v.id
243274
+ workspaceId: (_u = data.workspace) == null ? void 0 : _u.id
243091
243275
  },
243092
243276
  setSelectedFilterVal,
243093
243277
  clientId: data.clientId,
@@ -243110,12 +243294,12 @@ const EmbeddedDashboard = React__default.memo(
243110
243294
  noDataImg,
243111
243295
  shouldFitFullScreen: options2 == null ? void 0 : options2.shouldFitFullScreen,
243112
243296
  isEnableMetricSummary: data == null ? void 0 : data.isEnableMetricSummary,
243113
- metricCardColor: ((_w = applicableTheme == null ? void 0 : applicableTheme.dashboard) == null ? void 0 : _w.metricCardColor) || "",
243297
+ metricCardColor: ((_v = applicableTheme == null ? void 0 : applicableTheme.dashboard) == null ? void 0 : _v.metricCardColor) || "",
243114
243298
  isShadowDisableOnHover: isDisableShadowOnHover,
243115
243299
  isDisableMetricLoader: options2 == null ? void 0 : options2.disableMetricLoader,
243116
243300
  chartAppearance: options2 == null ? void 0 : options2.chartAppearance,
243117
243301
  clientColumnType: data.clientColumnType,
243118
- workspaceId: (_x = data.workspace) == null ? void 0 : _x.id,
243302
+ workspaceId: (_w = data.workspace) == null ? void 0 : _w.id,
243119
243303
  isEditLayoutEnabled: editLayout == null ? void 0 : editLayout.isEnabled,
243120
243304
  gridMargin,
243121
243305
  token,
@@ -243135,7 +243319,7 @@ const EmbeddedDashboard = React__default.memo(
243135
243319
  isAllowedToDeleteMetrics: !(options2 == null ? void 0 : options2.disableMetricDeletion) && data.isAllowedToDeleteMetrics,
243136
243320
  isAllowedToUpdateMetrics: !(options2 == null ? void 0 : options2.disableMetricUpdation) && data.isAllowedToUpdateMetrics,
243137
243321
  isAllowedToChangeLayout: !(options2 == null ? void 0 : options2.disableLayoutCustomization) && data.isAllowedToChangeLayout && editLayout.isEnabled,
243138
- isAllowedToSeeUnderlyingData: ((_y = options2 == null ? void 0 : options2.disableUnderlyingData) == null ? void 0 : _y.toString()) ? !(options2 == null ? void 0 : options2.disableUnderlyingData) : data == null ? void 0 : data.isShowUnderlyingData,
243322
+ isAllowedToSeeUnderlyingData: ((_x = options2 == null ? void 0 : options2.disableUnderlyingData) == null ? void 0 : _x.toString()) ? !(options2 == null ? void 0 : options2.disableUnderlyingData) : data == null ? void 0 : data.isShowUnderlyingData,
243139
243323
  externalDashboardMetrics: data.externalDashboardMetrics,
243140
243324
  isMetricListLoading: isLoading,
243141
243325
  globalFilters,
@@ -243156,7 +243340,7 @@ const EmbeddedDashboard = React__default.memo(
243156
243340
  hideDatePickerOptions: options2 == null ? void 0 : options2.hideDatePickerOptions
243157
243341
  }
243158
243342
  ),
243159
- !(options2 == null ? void 0 : options2.disableManageMetrics) && data.isAllowedManageMetrics && ((_z = data.externalDashboardMetrics) == null ? void 0 : _z.length) && (theme2 == null ? void 0 : theme2.manageMetricsStyle) && checkInlineStyle(theme2 == null ? void 0 : theme2.manageMetricsStyle) && /* @__PURE__ */ jsxRuntimeExports.jsx(
243343
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
243160
243344
  ManageMetricMenu,
243161
243345
  {
243162
243346
  props: {
@@ -243164,18 +243348,18 @@ const EmbeddedDashboard = React__default.memo(
243164
243348
  token,
243165
243349
  client: data.clientId,
243166
243350
  companyTenancyType: data.companyTenancyType,
243167
- workspaceId: (_A = data.workspace) == null ? void 0 : _A.id,
243351
+ workspaceId: (_y = data.workspace) == null ? void 0 : _y.id,
243168
243352
  chartAppearance: options2 == null ? void 0 : options2.chartAppearance,
243169
243353
  colors: (options2 == null ? void 0 : options2.chartColors) ?? adminThemeChartColors,
243170
- theme: theme2 == null ? void 0 : theme2.manageMetricsStyle,
243171
- customContent
243354
+ isOpenModal: isOpenManageModal,
243355
+ setOpenModal: setOpenManageModal
243172
243356
  }
243173
243357
  }
243174
243358
  )
243175
243359
  ] })
243176
243360
  ] }),
243177
243361
  isLoading && !(options2 == null ? void 0 : options2.disableMainLoader) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1b["alt-container"], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, {}) }),
243178
- !isLoading && !((_B = data == null ? void 0 : data.externalDashboard) == null ? void 0 : _B.id) && error2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1b["alt-container"], children: (error2 === "TOKEN_EXPIRED" ? (customMessages == null ? void 0 : customMessages.tokenExpiry) || "Expired Token!" : error2) || "Invalid token or Dashboard id" })
243362
+ !isLoading && !((_z = data == null ? void 0 : data.externalDashboard) == null ? void 0 : _z.id) && error2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$1b["alt-container"], children: (error2 === "TOKEN_EXPIRED" ? (customMessages == null ? void 0 : customMessages.tokenExpiry) || "Expired Token!" : error2) || "Invalid token or Dashboard id" })
243179
243363
  ]
243180
243364
  }
243181
243365
  ) });