@databrainhq/plugin 0.9.13 → 0.9.15

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.
Files changed (29) hide show
  1. package/dist/components/ChartPopup/index.d.ts +2 -3
  2. package/dist/components/Charts/AreaChart.d.ts +1 -1
  3. package/dist/components/Charts/BarChart.d.ts +4 -2
  4. package/dist/components/Charts/BoxPlot.d.ts +1 -1
  5. package/dist/components/Charts/BubbleChart.d.ts +1 -1
  6. package/dist/components/Charts/ComboChart.d.ts +1 -1
  7. package/dist/components/Charts/DoughnutChart.d.ts +1 -1
  8. package/dist/components/Charts/FunnelChart.d.ts +1 -1
  9. package/dist/components/Charts/GaugeChart.d.ts +1 -1
  10. package/dist/components/Charts/Histogram.d.ts +1 -1
  11. package/dist/components/Charts/LineChart.d.ts +4 -2
  12. package/dist/components/Charts/PieChart.d.ts +1 -1
  13. package/dist/components/Charts/RowChart.d.ts +1 -1
  14. package/dist/components/Charts/SankeyChart.d.ts +1 -1
  15. package/dist/components/Charts/ScatterChart.d.ts +1 -1
  16. package/dist/components/Charts/StackedBarChart.d.ts +1 -1
  17. package/dist/components/Charts/SteppedAreaChart.d.ts +1 -1
  18. package/dist/components/Charts/WaterfallChart.d.ts +1 -1
  19. package/dist/components/FilterField/index.d.ts +1 -0
  20. package/dist/components/GlobalFilters/AppliedFilter.d.ts +2 -2
  21. package/dist/components/GlobalFilters/index.d.ts +0 -2
  22. package/dist/components/MetricChart/MetricChart.d.ts +4 -2
  23. package/dist/components/ToggleButton/SwitchInput.d.ts +9 -0
  24. package/dist/components/ToggleButton/ToggleInput.d.ts +9 -0
  25. package/dist/components/ToggleButton/index.d.ts +2 -1
  26. package/dist/index.es.js +705 -520
  27. package/dist/index.umd.js +117 -117
  28. package/dist/style.css +1 -1
  29. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -2533,14 +2533,13 @@ const floatingCreateButtonIcon = "_floatingCreateButtonIcon_12kmo_399";
2533
2533
  const floatingButton = "_floatingButton_12kmo_407";
2534
2534
  const staticContainer = "_staticContainer_12kmo_415";
2535
2535
  const floatingContainer = "_floatingContainer_12kmo_423";
2536
- const filterButton = "_filterButton_12kmo_439";
2536
+ const filterButton$1 = "_filterButton_12kmo_439";
2537
2537
  const filterText$1 = "_filterText_12kmo_447";
2538
- const filterLength = "_filterLength_12kmo_455";
2538
+ const filterLength$1 = "_filterLength_12kmo_455";
2539
2539
  var styles$M = {
2540
2540
  container: container$i,
2541
2541
  "static": "_static_12kmo_415",
2542
2542
  fixed,
2543
- "ml-[40px]": "_ml-[40px]_12kmo_1",
2544
2543
  inline,
2545
2544
  flex,
2546
2545
  table: table$3,
@@ -2549,7 +2548,6 @@ var styles$M = {
2549
2548
  hidden,
2550
2549
  "h-[10%]": "_h-[10%]_12kmo_1",
2551
2550
  "w-full": "_w-full_12kmo_1",
2552
- "w-[400px]": "_w-[400px]_12kmo_1",
2553
2551
  transform,
2554
2552
  resize,
2555
2553
  truncate,
@@ -2573,9 +2571,9 @@ var styles$M = {
2573
2571
  floatingButton,
2574
2572
  staticContainer,
2575
2573
  floatingContainer,
2576
- filterButton,
2574
+ filterButton: filterButton$1,
2577
2575
  filterText: filterText$1,
2578
- filterLength,
2576
+ filterLength: filterLength$1,
2579
2577
  "hover:cursor-pointer": "_hover:cursor-pointer_12kmo_1",
2580
2578
  "hover:cursor-text": "_hover:cursor-text_12kmo_1",
2581
2579
  "disabled:cursor-text": "_disabled:cursor-text_12kmo_1",
@@ -6488,27 +6486,99 @@ const TextAreaField = ({
6488
6486
  })]
6489
6487
  });
6490
6488
  };
6491
- const group$1 = "_group_13otg_1";
6492
- const button$8 = "_button_13otg_9";
6493
- const checkbox = "_checkbox_13otg_17";
6494
- const enabled = "_enabled_13otg_43";
6495
- const notenabled = "_notenabled_13otg_59";
6496
- const label$4 = "_label_13otg_75";
6497
- const labelActive = "_labelActive_13otg_83";
6498
- const labelInactive = "_labelInactive_13otg_91";
6489
+ const Switch = ({
6490
+ name,
6491
+ styles: styles2,
6492
+ placeholder,
6493
+ enabled: enabled2
6494
+ }) => {
6495
+ return /* @__PURE__ */ jsxs("label", {
6496
+ htmlFor: name,
6497
+ className: `${styles2.button}`,
6498
+ children: [Array.isArray(placeholder) && /* @__PURE__ */ jsxs(Fragment, {
6499
+ children: [/* @__PURE__ */ jsx("span", {
6500
+ className: ` ${styles2.label} ${!enabled2 ? styles2.labelActive : styles2.labelInactive}`,
6501
+ children: placeholder[0]
6502
+ }), /* @__PURE__ */ jsx("span", {
6503
+ className: ` ${styles2.switch} ${enabled2 ? styles2.enabled : styles2.notenabled}`
6504
+ }), /* @__PURE__ */ jsx("span", {
6505
+ className: ` ${styles2.label} ${enabled2 ? styles2.labelActive : styles2.labelInactive}`,
6506
+ children: placeholder[1]
6507
+ })]
6508
+ }), typeof placeholder === "string" && /* @__PURE__ */ jsxs(Fragment, {
6509
+ children: [/* @__PURE__ */ jsx("span", {
6510
+ className: ` ${styles2.switch} ${enabled2 ? styles2.enabled : styles2.notenabled}`
6511
+ }), /* @__PURE__ */ jsx("span", {
6512
+ className: ` ${styles2.label} ${enabled2 ? styles2.labelActive : styles2.labelInactive}`,
6513
+ children: placeholder
6514
+ })]
6515
+ }), !Array.isArray(placeholder) && typeof placeholder !== "string" && /* @__PURE__ */ jsx("span", {
6516
+ className: ` ${styles2.switch} ${enabled2 ? styles2.enabled : styles2.notenabled}`
6517
+ })]
6518
+ });
6519
+ };
6520
+ const group$1 = "_group_2xttg_1";
6521
+ const button$8 = "_button_2xttg_9";
6522
+ const toggleWidth = "_toggleWidth_2xttg_15";
6523
+ const checkbox = "_checkbox_2xttg_23";
6524
+ const enabled = "_enabled_2xttg_49";
6525
+ const notenabled = "_notenabled_2xttg_65";
6526
+ const toggle = "_toggle_2xttg_15";
6527
+ const label$4 = "_label_2xttg_89";
6528
+ const labelActive = "_labelActive_2xttg_97";
6529
+ const labelInactive = "_labelInactive_2xttg_105";
6530
+ const toggleInactive = "_toggleInactive_2xttg_113";
6499
6531
  var styles$B = {
6500
6532
  group: group$1,
6501
6533
  button: button$8,
6534
+ toggleWidth,
6502
6535
  checkbox,
6503
- "switch": "_switch_13otg_25",
6536
+ "switch": "_switch_2xttg_31",
6504
6537
  enabled,
6505
6538
  notenabled,
6539
+ toggle,
6506
6540
  label: label$4,
6507
6541
  labelActive,
6508
- labelInactive
6542
+ labelInactive,
6543
+ toggleInactive
6544
+ };
6545
+ const Toggle = ({
6546
+ name,
6547
+ styles: styles2,
6548
+ placeholder,
6549
+ enabled: enabled2
6550
+ }) => {
6551
+ return /* @__PURE__ */ jsxs("label", {
6552
+ htmlFor: name,
6553
+ className: `${styles2.button} ${styles2.toggleWidth}`,
6554
+ children: [Array.isArray(placeholder) && /* @__PURE__ */ jsxs(Fragment, {
6555
+ children: [/* @__PURE__ */ jsx("span", {
6556
+ className: ` ${styles2.label} ${enabled2 && styles2.toggleInactive}`,
6557
+ children: placeholder[0]
6558
+ }), /* @__PURE__ */ jsx("span", {
6559
+ className: ` ${styles2.switch} ${styles2.toggle} ${enabled2 ? styles2.enabled : styles2.notenabled}
6560
+ `
6561
+ }), /* @__PURE__ */ jsx("span", {
6562
+ className: ` ${styles2.label} ${enabled2 || styles2.toggleInactive}`,
6563
+ children: placeholder[1]
6564
+ })]
6565
+ }), typeof placeholder === "string" && /* @__PURE__ */ jsxs(Fragment, {
6566
+ children: [/* @__PURE__ */ jsx("span", {
6567
+ className: ` ${styles2.switch} ${styles2.toggle} ${enabled2 ? styles2.enabled : styles2.notenabled}
6568
+ `
6569
+ }), /* @__PURE__ */ jsx("span", {
6570
+ className: ` ${styles2.label} ${enabled2 || styles2.labelInactive}`,
6571
+ children: placeholder
6572
+ })]
6573
+ }), !Array.isArray(placeholder) && typeof placeholder !== "string" && /* @__PURE__ */ jsx("span", {
6574
+ className: ` ${styles2.switch} ${styles2.toggle} ${enabled2 ? styles2.enabled : styles2.notenabled}
6575
+ `
6576
+ })]
6577
+ });
6509
6578
  };
6510
6579
  const ToggleButton = ({
6511
6580
  enabled: enabled2,
6581
+ variant = "switch",
6512
6582
  onChange,
6513
6583
  label: label2,
6514
6584
  className = "",
@@ -6532,18 +6602,16 @@ const ToggleButton = ({
6532
6602
  target
6533
6603
  }) => onChange == null ? void 0 : onChange(target.checked),
6534
6604
  className: styles$B.checkbox
6535
- }), /* @__PURE__ */ jsxs("label", {
6536
- htmlFor: name,
6537
- className: styles$B.button,
6538
- children: [/* @__PURE__ */ jsx("span", {
6539
- className: `${styles$B.switch} ${enabled2 ? styles$B.enabled : styles$B.notenabled}`
6540
- }), placeholder ? /* @__PURE__ */ jsx("span", {
6541
- className: `
6542
- ${styles$B.label}
6543
- ${enabled2 ? styles$B.labelActive : styles$B.labelInactive}
6544
- `,
6545
- children: placeholder
6546
- }) : null]
6605
+ }), variant === "toggle" && /* @__PURE__ */ jsx(Toggle, {
6606
+ name,
6607
+ styles: styles$B,
6608
+ placeholder,
6609
+ enabled: enabled2
6610
+ }), variant === "switch" && /* @__PURE__ */ jsx(Switch, {
6611
+ name,
6612
+ styles: styles$B,
6613
+ placeholder,
6614
+ enabled: enabled2
6547
6615
  })]
6548
6616
  });
6549
6617
  };
@@ -79572,7 +79640,9 @@ const AreaChart = ({
79572
79640
  backGroundColor,
79573
79641
  customSettings,
79574
79642
  chartRef,
79575
- handleChartRightClick
79643
+ handleChartClick: handleChartClick2,
79644
+ setShowChartPopup,
79645
+ drilldown: drilldown2
79576
79646
  }) => {
79577
79647
  var _a2;
79578
79648
  const option2 = {
@@ -79675,12 +79745,14 @@ const AreaChart = ({
79675
79745
  option: option2,
79676
79746
  onEvents: {
79677
79747
  click: (params) => {
79678
- if (handleChartRightClick)
79679
- handleChartRightClick(params);
79748
+ if (handleChartClick2)
79749
+ handleChartClick2(params);
79750
+ drilldown2 == null ? void 0 : drilldown2();
79680
79751
  },
79681
79752
  contextmenu: (params) => {
79682
- if (handleChartRightClick)
79683
- handleChartRightClick(params);
79753
+ if (handleChartClick2)
79754
+ handleChartClick2(params);
79755
+ setShowChartPopup(true);
79684
79756
  }
79685
79757
  }
79686
79758
  })
@@ -79696,7 +79768,9 @@ const BarChart = ({
79696
79768
  margins,
79697
79769
  customSettings,
79698
79770
  chartRef,
79699
- handleChartRightClick
79771
+ handleChartClick: handleChartClick2,
79772
+ setShowChartPopup,
79773
+ drilldown: drilldown2
79700
79774
  }) => {
79701
79775
  var _a2, _b2;
79702
79776
  const option2 = {
@@ -79801,12 +79875,14 @@ const BarChart = ({
79801
79875
  option: option2,
79802
79876
  onEvents: {
79803
79877
  click: (params) => {
79804
- if (handleChartRightClick)
79805
- handleChartRightClick(params);
79878
+ if (handleChartClick2)
79879
+ handleChartClick2(params);
79880
+ drilldown2 == null ? void 0 : drilldown2();
79806
79881
  },
79807
79882
  contextmenu: (params) => {
79808
- if (handleChartRightClick)
79809
- handleChartRightClick(params);
79883
+ if (handleChartClick2)
79884
+ handleChartClick2(params);
79885
+ setShowChartPopup(true);
79810
79886
  }
79811
79887
  }
79812
79888
  })
@@ -79821,7 +79897,9 @@ const ComboChart = ({
79821
79897
  backGroundColor,
79822
79898
  customSettings,
79823
79899
  chartRef,
79824
- handleChartRightClick
79900
+ handleChartClick: handleChartClick2,
79901
+ setShowChartPopup,
79902
+ drilldown: drilldown2
79825
79903
  }) => {
79826
79904
  var _a2;
79827
79905
  const choice = ["bar", "line"];
@@ -79950,12 +80028,14 @@ const ComboChart = ({
79950
80028
  ref: chartRef,
79951
80029
  onEvents: {
79952
80030
  click: (params) => {
79953
- if (handleChartRightClick)
79954
- handleChartRightClick(params);
80031
+ if (handleChartClick2)
80032
+ handleChartClick2(params);
80033
+ drilldown2 == null ? void 0 : drilldown2();
79955
80034
  },
79956
80035
  contextmenu: (params) => {
79957
- if (handleChartRightClick)
79958
- handleChartRightClick(params);
80036
+ if (handleChartClick2)
80037
+ handleChartClick2(params);
80038
+ setShowChartPopup(true);
79959
80039
  }
79960
80040
  }
79961
80041
  })
@@ -79970,7 +80050,9 @@ const LineChart = ({
79970
80050
  colors: colors2,
79971
80051
  customSettings,
79972
80052
  chartRef,
79973
- handleChartRightClick
80053
+ handleChartClick: handleChartClick2,
80054
+ setShowChartPopup,
80055
+ drilldown: drilldown2
79974
80056
  }) => {
79975
80057
  var _a2, _b2;
79976
80058
  const option2 = {
@@ -80069,12 +80151,14 @@ const LineChart = ({
80069
80151
  ref: chartRef,
80070
80152
  onEvents: {
80071
80153
  click: (params) => {
80072
- if (handleChartRightClick)
80073
- handleChartRightClick(params);
80154
+ if (handleChartClick2)
80155
+ handleChartClick2(params);
80156
+ drilldown2 == null ? void 0 : drilldown2();
80074
80157
  },
80075
80158
  contextmenu: (params) => {
80076
- if (handleChartRightClick)
80077
- handleChartRightClick(params);
80159
+ if (handleChartClick2)
80160
+ handleChartClick2(params);
80161
+ setShowChartPopup(true);
80078
80162
  }
80079
80163
  }
80080
80164
  })
@@ -80087,7 +80171,9 @@ const PieChart = ({
80087
80171
  labelSettings,
80088
80172
  chartRef,
80089
80173
  colors: colors2,
80090
- handleChartRightClick
80174
+ handleChartClick: handleChartClick2,
80175
+ setShowChartPopup,
80176
+ drilldown: drilldown2
80091
80177
  }) => {
80092
80178
  var _a2, _b2, _c2, _d;
80093
80179
  if (((_b2 = (_a2 = data == null ? void 0 : data.datasets[0]) == null ? void 0 : _a2.data) == null ? void 0 : _b2.length) > 1) {
@@ -80173,12 +80259,12 @@ const PieChart = ({
80173
80259
  option: option22,
80174
80260
  onEvents: {
80175
80261
  click: (params) => {
80176
- if (handleChartRightClick)
80177
- handleChartRightClick(params);
80262
+ handleChartClick2(params);
80263
+ drilldown2 == null ? void 0 : drilldown2();
80178
80264
  },
80179
80265
  contextmenu: (params) => {
80180
- if (handleChartRightClick)
80181
- handleChartRightClick(params);
80266
+ handleChartClick2(params);
80267
+ setShowChartPopup(true);
80182
80268
  }
80183
80269
  },
80184
80270
  ref: chartRef
@@ -80248,12 +80334,14 @@ const PieChart = ({
80248
80334
  option: option2,
80249
80335
  onEvents: {
80250
80336
  click: (params) => {
80251
- if (handleChartRightClick)
80252
- handleChartRightClick(params);
80337
+ if (handleChartClick2)
80338
+ handleChartClick2(params);
80339
+ drilldown2 == null ? void 0 : drilldown2();
80253
80340
  },
80254
80341
  contextmenu: (params) => {
80255
- if (handleChartRightClick)
80256
- handleChartRightClick(params);
80342
+ if (handleChartClick2)
80343
+ handleChartClick2(params);
80344
+ setShowChartPopup(true);
80257
80345
  }
80258
80346
  },
80259
80347
  ref: chartRef
@@ -80269,7 +80357,9 @@ const RowChart = ({
80269
80357
  colors: colors2,
80270
80358
  backGroundColor,
80271
80359
  customSettings,
80272
- handleChartRightClick
80360
+ handleChartClick: handleChartClick2,
80361
+ setShowChartPopup,
80362
+ drilldown: drilldown2
80273
80363
  }) => {
80274
80364
  var _a2;
80275
80365
  const option2 = {
@@ -80372,12 +80462,14 @@ const RowChart = ({
80372
80462
  option: option2,
80373
80463
  onEvents: {
80374
80464
  click: (params) => {
80375
- if (handleChartRightClick)
80376
- handleChartRightClick(params);
80465
+ if (handleChartClick2)
80466
+ handleChartClick2(params);
80467
+ drilldown2 == null ? void 0 : drilldown2();
80377
80468
  },
80378
80469
  contextmenu: (params) => {
80379
- if (handleChartRightClick)
80380
- handleChartRightClick(params);
80470
+ if (handleChartClick2)
80471
+ handleChartClick2(params);
80472
+ setShowChartPopup(true);
80381
80473
  }
80382
80474
  },
80383
80475
  ref: chartRef
@@ -80395,7 +80487,9 @@ const ScatterChart = ({
80395
80487
  isEnableGroupBy,
80396
80488
  backGroundColor,
80397
80489
  customSettings,
80398
- handleChartRightClick
80490
+ handleChartClick: handleChartClick2,
80491
+ setShowChartPopup,
80492
+ drilldown: drilldown2
80399
80493
  }) => {
80400
80494
  var _a2;
80401
80495
  const option2 = {
@@ -80492,12 +80586,14 @@ const ScatterChart = ({
80492
80586
  option: option2,
80493
80587
  onEvents: {
80494
80588
  click: (params) => {
80495
- if (handleChartRightClick)
80496
- handleChartRightClick(params);
80589
+ if (handleChartClick2)
80590
+ handleChartClick2(params);
80591
+ drilldown2 == null ? void 0 : drilldown2();
80497
80592
  },
80498
80593
  contextmenu: (params) => {
80499
- if (handleChartRightClick)
80500
- handleChartRightClick(params);
80594
+ if (handleChartClick2)
80595
+ handleChartClick2(params);
80596
+ setShowChartPopup(true);
80501
80597
  }
80502
80598
  },
80503
80599
  ref: chartRef
@@ -80513,7 +80609,9 @@ const WaterFallChart = ({
80513
80609
  colors: colors2,
80514
80610
  backGroundColor,
80515
80611
  customSettings,
80516
- handleChartRightClick
80612
+ handleChartClick: handleChartClick2,
80613
+ setShowChartPopup,
80614
+ drilldown: drilldown2
80517
80615
  }) => {
80518
80616
  var _a2, _b2;
80519
80617
  const option2 = {
@@ -80613,12 +80711,14 @@ const WaterFallChart = ({
80613
80711
  option: option2,
80614
80712
  onEvents: {
80615
80713
  click: (params) => {
80616
- if (handleChartRightClick)
80617
- handleChartRightClick(params);
80714
+ if (handleChartClick2)
80715
+ handleChartClick2(params);
80716
+ drilldown2 == null ? void 0 : drilldown2();
80618
80717
  },
80619
80718
  contextmenu: (params) => {
80620
- if (handleChartRightClick)
80621
- handleChartRightClick(params);
80719
+ if (handleChartClick2)
80720
+ handleChartClick2(params);
80721
+ setShowChartPopup(true);
80622
80722
  }
80623
80723
  },
80624
80724
  ref: chartRef
@@ -80632,7 +80732,9 @@ const FunnelChart = ({
80632
80732
  labelSettings,
80633
80733
  colors: colors2,
80634
80734
  chartRef,
80635
- handleChartRightClick,
80735
+ handleChartClick: handleChartClick2,
80736
+ setShowChartPopup,
80737
+ drilldown: drilldown2,
80636
80738
  customSettings
80637
80739
  }) => {
80638
80740
  const option2 = {
@@ -80724,12 +80826,14 @@ const FunnelChart = ({
80724
80826
  option: option2,
80725
80827
  onEvents: {
80726
80828
  click: (params) => {
80727
- if (handleChartRightClick)
80728
- handleChartRightClick(params);
80829
+ if (handleChartClick2)
80830
+ handleChartClick2(params);
80831
+ drilldown2 == null ? void 0 : drilldown2();
80729
80832
  },
80730
80833
  contextmenu: (params) => {
80731
- if (handleChartRightClick)
80732
- handleChartRightClick(params);
80834
+ if (handleChartClick2)
80835
+ handleChartClick2(params);
80836
+ setShowChartPopup(true);
80733
80837
  }
80734
80838
  },
80735
80839
  ref: chartRef
@@ -80745,7 +80849,9 @@ const BubbleChart = ({
80745
80849
  colors: colors2,
80746
80850
  customSettings,
80747
80851
  chartRef,
80748
- handleChartRightClick
80852
+ handleChartClick: handleChartClick2,
80853
+ setShowChartPopup,
80854
+ drilldown: drilldown2
80749
80855
  }) => {
80750
80856
  var _a2;
80751
80857
  const modifiedData = [];
@@ -80869,12 +80975,14 @@ const BubbleChart = ({
80869
80975
  option: option2,
80870
80976
  onEvents: {
80871
80977
  click: (params) => {
80872
- if (handleChartRightClick)
80873
- handleChartRightClick(params);
80978
+ if (handleChartClick2)
80979
+ handleChartClick2(params);
80980
+ drilldown2 == null ? void 0 : drilldown2();
80874
80981
  },
80875
80982
  contextmenu: (params) => {
80876
- if (handleChartRightClick)
80877
- handleChartRightClick(params);
80983
+ if (handleChartClick2)
80984
+ handleChartClick2(params);
80985
+ setShowChartPopup(true);
80878
80986
  }
80879
80987
  }
80880
80988
  })
@@ -80887,7 +80995,9 @@ const DoughnutChart = ({
80887
80995
  labelSettings,
80888
80996
  colors: colors2,
80889
80997
  chartRef,
80890
- handleChartRightClick
80998
+ handleChartClick: handleChartClick2,
80999
+ setShowChartPopup,
81000
+ drilldown: drilldown2
80891
81001
  }) => {
80892
81002
  var _a2, _b2, _c2;
80893
81003
  if (((_a2 = data == null ? void 0 : data.labels) == null ? void 0 : _a2.length) > 1) {
@@ -80969,10 +81079,12 @@ const DoughnutChart = ({
80969
81079
  option: option22,
80970
81080
  onEvents: {
80971
81081
  click: (params) => {
80972
- handleChartRightClick(params);
81082
+ handleChartClick2(params);
81083
+ drilldown2 == null ? void 0 : drilldown2();
80973
81084
  },
80974
81085
  contextmenu: (params) => {
80975
- handleChartRightClick(params);
81086
+ handleChartClick2(params);
81087
+ setShowChartPopup(true);
80976
81088
  }
80977
81089
  },
80978
81090
  ref: chartRef
@@ -81040,12 +81152,14 @@ const DoughnutChart = ({
81040
81152
  option: option2,
81041
81153
  onEvents: {
81042
81154
  click: (params) => {
81043
- if (handleChartRightClick)
81044
- handleChartRightClick(params);
81155
+ if (handleChartClick2)
81156
+ handleChartClick2(params);
81157
+ drilldown2 == null ? void 0 : drilldown2();
81045
81158
  },
81046
81159
  contextmenu: (params) => {
81047
- if (handleChartRightClick)
81048
- handleChartRightClick(params);
81160
+ if (handleChartClick2)
81161
+ handleChartClick2(params);
81162
+ setShowChartPopup(true);
81049
81163
  }
81050
81164
  },
81051
81165
  ref: chartRef
@@ -81062,7 +81176,9 @@ const SteppedAreaChart = ({
81062
81176
  colors: colors2,
81063
81177
  backGroundColor,
81064
81178
  customSettings,
81065
- handleChartRightClick
81179
+ handleChartClick: handleChartClick2,
81180
+ setShowChartPopup,
81181
+ drilldown: drilldown2
81066
81182
  }) => {
81067
81183
  var _a2;
81068
81184
  const choice = ["start", "middle", "end"];
@@ -81163,12 +81279,14 @@ const SteppedAreaChart = ({
81163
81279
  option: option2,
81164
81280
  onEvents: {
81165
81281
  click: (params) => {
81166
- if (handleChartRightClick)
81167
- handleChartRightClick(params);
81282
+ if (handleChartClick2)
81283
+ handleChartClick2(params);
81284
+ drilldown2 == null ? void 0 : drilldown2();
81168
81285
  },
81169
81286
  contextmenu: (params) => {
81170
- if (handleChartRightClick)
81171
- handleChartRightClick(params);
81287
+ if (handleChartClick2)
81288
+ handleChartClick2(params);
81289
+ setShowChartPopup(true);
81172
81290
  }
81173
81291
  },
81174
81292
  ref: chartRef
@@ -81185,7 +81303,9 @@ const Histogram = ({
81185
81303
  colors: colors2,
81186
81304
  backGroundColor,
81187
81305
  customSettings,
81188
- handleChartRightClick
81306
+ handleChartClick: handleChartClick2,
81307
+ setShowChartPopup,
81308
+ drilldown: drilldown2
81189
81309
  }) => {
81190
81310
  var _a2, _b2;
81191
81311
  const option2 = {
@@ -81280,12 +81400,14 @@ const Histogram = ({
81280
81400
  option: option2,
81281
81401
  onEvents: {
81282
81402
  click: (params) => {
81283
- if (handleChartRightClick)
81284
- handleChartRightClick(params);
81403
+ if (handleChartClick2)
81404
+ handleChartClick2(params);
81405
+ drilldown2 == null ? void 0 : drilldown2();
81285
81406
  },
81286
81407
  contextmenu: (params) => {
81287
- if (handleChartRightClick)
81288
- handleChartRightClick(params);
81408
+ if (handleChartClick2)
81409
+ handleChartClick2(params);
81410
+ setShowChartPopup(true);
81289
81411
  }
81290
81412
  },
81291
81413
  ref: chartRef
@@ -81298,7 +81420,9 @@ const GaugeChart = ({
81298
81420
  legendSettings,
81299
81421
  colors: colors2,
81300
81422
  chartRef,
81301
- handleChartRightClick
81423
+ handleChartClick: handleChartClick2,
81424
+ setShowChartPopup,
81425
+ drilldown: drilldown2
81302
81426
  }) => {
81303
81427
  const newGuageData = Array.isArray(gaugeData) ? gaugeData : [];
81304
81428
  const total = newGuageData.reduce((sum2, item) => {
@@ -81391,12 +81515,14 @@ const GaugeChart = ({
81391
81515
  option: option2,
81392
81516
  onEvents: {
81393
81517
  click: (params) => {
81394
- if (handleChartRightClick)
81395
- handleChartRightClick(params);
81518
+ if (handleChartClick2)
81519
+ handleChartClick2(params);
81520
+ drilldown2 == null ? void 0 : drilldown2();
81396
81521
  },
81397
81522
  contextmenu: (params) => {
81398
- if (handleChartRightClick)
81399
- handleChartRightClick(params);
81523
+ if (handleChartClick2)
81524
+ handleChartClick2(params);
81525
+ setShowChartPopup(true);
81400
81526
  }
81401
81527
  },
81402
81528
  ref: chartRef
@@ -81408,7 +81534,9 @@ const SankeyChart = ({
81408
81534
  chartRef,
81409
81535
  colors: colors2,
81410
81536
  backGroundColor,
81411
- handleChartRightClick
81537
+ handleChartClick: handleChartClick2,
81538
+ setShowChartPopup,
81539
+ drilldown: drilldown2
81412
81540
  }) => {
81413
81541
  var _a2, _b2, _c2;
81414
81542
  const allValues = [];
@@ -81483,12 +81611,14 @@ const SankeyChart = ({
81483
81611
  option: option2,
81484
81612
  onEvents: {
81485
81613
  click: (params) => {
81486
- if (handleChartRightClick)
81487
- handleChartRightClick(params);
81614
+ if (handleChartClick2)
81615
+ handleChartClick2(params);
81616
+ drilldown2 == null ? void 0 : drilldown2();
81488
81617
  },
81489
81618
  contextmenu: (params) => {
81490
- if (handleChartRightClick)
81491
- handleChartRightClick(params);
81619
+ if (handleChartClick2)
81620
+ handleChartClick2(params);
81621
+ setShowChartPopup(true);
81492
81622
  }
81493
81623
  },
81494
81624
  ref: chartRef
@@ -81505,7 +81635,9 @@ const StackedBarChart = ({
81505
81635
  colors: colors2,
81506
81636
  backGroundColor,
81507
81637
  customSettings,
81508
- handleChartRightClick
81638
+ handleChartClick: handleChartClick2,
81639
+ setShowChartPopup,
81640
+ drilldown: drilldown2
81509
81641
  }) => {
81510
81642
  var _a2, _b2;
81511
81643
  const customData = useMemo(() => {
@@ -81627,13 +81759,15 @@ const StackedBarChart = ({
81627
81759
  },
81628
81760
  option: option2,
81629
81761
  onEvents: {
81630
- click: (params) => {
81631
- if (handleChartRightClick)
81632
- handleChartRightClick(params);
81762
+ cclick: (params) => {
81763
+ if (handleChartClick2)
81764
+ handleChartClick2(params);
81765
+ drilldown2 == null ? void 0 : drilldown2();
81633
81766
  },
81634
81767
  contextmenu: (params) => {
81635
- if (handleChartRightClick)
81636
- handleChartRightClick(params);
81768
+ if (handleChartClick2)
81769
+ handleChartClick2(params);
81770
+ setShowChartPopup(true);
81637
81771
  }
81638
81772
  },
81639
81773
  ref: chartRef
@@ -81937,7 +82071,9 @@ const BoxPlot = ({
81937
82071
  colors: colors2,
81938
82072
  customSettings,
81939
82073
  chartRef,
81940
- handleChartRightClick
82074
+ handleChartClick: handleChartClick2,
82075
+ setShowChartPopup,
82076
+ drilldown: drilldown2
81941
82077
  }) => {
81942
82078
  var _a2;
81943
82079
  const modifiedData = [];
@@ -82055,12 +82191,14 @@ const BoxPlot = ({
82055
82191
  option: option2,
82056
82192
  onEvents: {
82057
82193
  click: (params) => {
82058
- if (handleChartRightClick)
82059
- handleChartRightClick(params);
82194
+ if (handleChartClick2)
82195
+ handleChartClick2(params);
82196
+ drilldown2 == null ? void 0 : drilldown2();
82060
82197
  },
82061
82198
  contextmenu: (params) => {
82062
- if (handleChartRightClick)
82063
- handleChartRightClick(params);
82199
+ if (handleChartClick2)
82200
+ handleChartClick2(params);
82201
+ setShowChartPopup(true);
82064
82202
  }
82065
82203
  }
82066
82204
  })
@@ -86135,7 +86273,9 @@ const MetricChart = ({
86135
86273
  tableSettings,
86136
86274
  chartRef,
86137
86275
  tableName,
86138
- handleChartRightClick
86276
+ handleChartClick: handleChartClick2,
86277
+ drilldown: drilldown2,
86278
+ setShowChartPopup
86139
86279
  }) => {
86140
86280
  var _a2, _b2, _c2, _d, _e2, _f;
86141
86281
  if (chartType2 === CHART_TYPES.line) {
@@ -86148,7 +86288,9 @@ const MetricChart = ({
86148
86288
  axisSettings,
86149
86289
  customSettings,
86150
86290
  chartRef,
86151
- handleChartRightClick
86291
+ handleChartClick: handleChartClick2,
86292
+ drilldown: drilldown2,
86293
+ setShowChartPopup
86152
86294
  });
86153
86295
  }
86154
86296
  if (chartType2 === CHART_TYPES.stepped) {
@@ -86164,7 +86306,9 @@ const MetricChart = ({
86164
86306
  colors: colors2,
86165
86307
  backGroundColor,
86166
86308
  chartRef,
86167
- handleChartRightClick
86309
+ handleChartClick: handleChartClick2,
86310
+ drilldown: drilldown2,
86311
+ setShowChartPopup
86168
86312
  });
86169
86313
  }
86170
86314
  if (chartType2 === CHART_TYPES.bar) {
@@ -86178,7 +86322,9 @@ const MetricChart = ({
86178
86322
  customSettings,
86179
86323
  margins,
86180
86324
  chartRef,
86181
- handleChartRightClick
86325
+ handleChartClick: handleChartClick2,
86326
+ drilldown: drilldown2,
86327
+ setShowChartPopup
86182
86328
  });
86183
86329
  }
86184
86330
  if (chartType2 === CHART_TYPES.stack) {
@@ -86193,7 +86339,9 @@ const MetricChart = ({
86193
86339
  backGroundColor,
86194
86340
  customSettings,
86195
86341
  chartRef,
86196
- handleChartRightClick
86342
+ handleChartClick: handleChartClick2,
86343
+ drilldown: drilldown2,
86344
+ setShowChartPopup
86197
86345
  });
86198
86346
  }
86199
86347
  if (chartType2 === CHART_TYPES.histogram) {
@@ -86208,7 +86356,9 @@ const MetricChart = ({
86208
86356
  backGroundColor,
86209
86357
  customSettings,
86210
86358
  chartRef,
86211
- handleChartRightClick
86359
+ handleChartClick: handleChartClick2,
86360
+ drilldown: drilldown2,
86361
+ setShowChartPopup
86212
86362
  });
86213
86363
  }
86214
86364
  if (chartType2 === CHART_TYPES.bubble) {
@@ -86223,7 +86373,9 @@ const MetricChart = ({
86223
86373
  backGroundColor,
86224
86374
  customSettings,
86225
86375
  chartRef,
86226
- handleChartRightClick
86376
+ handleChartClick: handleChartClick2,
86377
+ drilldown: drilldown2,
86378
+ setShowChartPopup
86227
86379
  });
86228
86380
  }
86229
86381
  if (chartType2 === CHART_TYPES.scatter) {
@@ -86238,7 +86390,9 @@ const MetricChart = ({
86238
86390
  backGroundColor,
86239
86391
  customSettings,
86240
86392
  chartRef,
86241
- handleChartRightClick
86393
+ handleChartClick: handleChartClick2,
86394
+ drilldown: drilldown2,
86395
+ setShowChartPopup
86242
86396
  });
86243
86397
  }
86244
86398
  if (chartType2 === CHART_TYPES.row) {
@@ -86252,7 +86406,9 @@ const MetricChart = ({
86252
86406
  backGroundColor,
86253
86407
  customSettings,
86254
86408
  chartRef,
86255
- handleChartRightClick
86409
+ handleChartClick: handleChartClick2,
86410
+ drilldown: drilldown2,
86411
+ setShowChartPopup
86256
86412
  });
86257
86413
  }
86258
86414
  if (chartType2 === CHART_TYPES.area) {
@@ -86270,7 +86426,9 @@ const MetricChart = ({
86270
86426
  backGroundColor,
86271
86427
  customSettings,
86272
86428
  chartRef,
86273
- handleChartRightClick
86429
+ handleChartClick: handleChartClick2,
86430
+ drilldown: drilldown2,
86431
+ setShowChartPopup
86274
86432
  });
86275
86433
  }
86276
86434
  if (chartType2 === CHART_TYPES.combo) {
@@ -86289,7 +86447,9 @@ const MetricChart = ({
86289
86447
  colors: colors2,
86290
86448
  customSettings,
86291
86449
  chartRef,
86292
- handleChartRightClick
86450
+ handleChartClick: handleChartClick2,
86451
+ drilldown: drilldown2,
86452
+ setShowChartPopup
86293
86453
  });
86294
86454
  }
86295
86455
  if (chartType2 === CHART_TYPES.pie) {
@@ -86301,7 +86461,9 @@ const MetricChart = ({
86301
86461
  enableSaveAs,
86302
86462
  colors: colors2,
86303
86463
  chartRef,
86304
- handleChartRightClick
86464
+ handleChartClick: handleChartClick2,
86465
+ drilldown: drilldown2,
86466
+ setShowChartPopup
86305
86467
  });
86306
86468
  }
86307
86469
  if (chartType2 === CHART_TYPES.doughnut) {
@@ -86313,7 +86475,9 @@ const MetricChart = ({
86313
86475
  enableSaveAs,
86314
86476
  colors: colors2,
86315
86477
  chartRef,
86316
- handleChartRightClick
86478
+ handleChartClick: handleChartClick2,
86479
+ drilldown: drilldown2,
86480
+ setShowChartPopup
86317
86481
  });
86318
86482
  }
86319
86483
  if (chartType2 === CHART_TYPES.waterfall) {
@@ -86342,7 +86506,9 @@ const MetricChart = ({
86342
86506
  backGroundColor,
86343
86507
  customSettings,
86344
86508
  chartRef,
86345
- handleChartRightClick
86509
+ handleChartClick: handleChartClick2,
86510
+ drilldown: drilldown2,
86511
+ setShowChartPopup
86346
86512
  });
86347
86513
  }
86348
86514
  if (chartType2 === CHART_TYPES.funnel) {
@@ -86353,8 +86519,10 @@ const MetricChart = ({
86353
86519
  labelSettings,
86354
86520
  colors: colors2,
86355
86521
  chartRef,
86356
- handleChartRightClick,
86357
- customSettings
86522
+ handleChartClick: handleChartClick2,
86523
+ customSettings,
86524
+ drilldown: drilldown2,
86525
+ setShowChartPopup
86358
86526
  });
86359
86527
  }
86360
86528
  if (chartType2 === CHART_TYPES.gauge) {
@@ -86380,7 +86548,9 @@ const MetricChart = ({
86380
86548
  enableSaveAs,
86381
86549
  colors: colors2,
86382
86550
  chartRef,
86383
- handleChartRightClick
86551
+ handleChartClick: handleChartClick2,
86552
+ drilldown: drilldown2,
86553
+ setShowChartPopup
86384
86554
  });
86385
86555
  }
86386
86556
  if (chartType2 === CHART_TYPES.sankey) {
@@ -86393,7 +86563,9 @@ const MetricChart = ({
86393
86563
  colors: colors2,
86394
86564
  backGroundColor,
86395
86565
  chartRef,
86396
- handleChartRightClick
86566
+ handleChartClick: handleChartClick2,
86567
+ drilldown: drilldown2,
86568
+ setShowChartPopup
86397
86569
  });
86398
86570
  }
86399
86571
  if (chartType2 === CHART_TYPES.singleValue) {
@@ -86416,7 +86588,9 @@ const MetricChart = ({
86416
86588
  colors: colors2,
86417
86589
  customSettings,
86418
86590
  chartRef,
86419
- handleChartRightClick
86591
+ handleChartClick: handleChartClick2,
86592
+ drilldown: drilldown2,
86593
+ setShowChartPopup
86420
86594
  });
86421
86595
  }
86422
86596
  if (chartType2 === CHART_TYPES.table) {
@@ -86467,7 +86641,9 @@ const FullScreenChart = ({
86467
86641
  routeType: "internal"
86468
86642
  },
86469
86643
  chartRef: chart.chartRef,
86470
- handleChartRightClick: chart.handleChartRightClick
86644
+ handleChartClick: chart.handleChartClick,
86645
+ drilldown: chart.drilldown,
86646
+ setShowChartPopup: chart.setShowChartPopup
86471
86647
  })
86472
86648
  })
86473
86649
  });
@@ -86704,38 +86880,41 @@ const FilterField = ({
86704
86880
  })
86705
86881
  });
86706
86882
  };
86707
- const container$9 = "_container_550f5_1";
86708
- const form$1 = "_form_550f5_7";
86709
- const filterHeader = "_filterHeader_550f5_13";
86710
- const titleContent = "_titleContent_550f5_19";
86711
- const title = "_title_550f5_19";
86712
- const buttons = "_buttons_550f5_31";
86713
- const apply = "_apply_550f5_37";
86714
- const applyIcon = "_applyIcon_550f5_43";
86715
- const reset = "_reset_550f5_49";
86716
- const filterFields = "_filterFields_550f5_55";
86717
- const AddFilter$1 = "_AddFilter_550f5_61";
86718
- const filterDropdown$1 = "_filterDropdown_550f5_67";
86719
- const filters = "_filters_550f5_73";
86720
- const filterItem = "_filterItem_550f5_79";
86721
- const filterItemOperator = "_filterItemOperator_550f5_85";
86722
- const remove = "_remove_550f5_91";
86723
- const filterCol = "_filterCol_550f5_97";
86724
- const filterText = "_filterText_550f5_103";
86725
- const smallText = "_smallText_550f5_109";
86726
- const numberField = "_numberField_550f5_117";
86727
- const numberFieldWrapper = "_numberFieldWrapper_550f5_125";
86728
- const numberFieldLabel = "_numberFieldLabel_550f5_133";
86729
- const numberFieldLabelText = "_numberFieldLabelText_550f5_141";
86730
- const numberFieldLabelSelectText = "_numberFieldLabelSelectText_550f5_149";
86731
- const numberFieldButtonClass = "_numberFieldButtonClass_550f5_157";
86732
- const numberFieldLabelMenuClass = "_numberFieldLabelMenuClass_550f5_165";
86733
- const checkedOption$1 = "_checkedOption_550f5_173";
86734
- const option = "_option_550f5_181";
86735
- const addFilterMenu = "_addFilterMenu_550f5_189";
86736
- const appliedFilterTag = "_appliedFilterTag_550f5_197";
86737
- const appliedfilters = "_appliedfilters_550f5_205";
86738
- const textBold = "_textBold_550f5_213";
86883
+ const container$9 = "_container_158ok_1";
86884
+ const form$1 = "_form_158ok_7";
86885
+ const filterHeader = "_filterHeader_158ok_13";
86886
+ const titleContent = "_titleContent_158ok_19";
86887
+ const title = "_title_158ok_19";
86888
+ const buttons = "_buttons_158ok_31";
86889
+ const apply = "_apply_158ok_37";
86890
+ const applyIcon = "_applyIcon_158ok_43";
86891
+ const reset = "_reset_158ok_49";
86892
+ const filterFields = "_filterFields_158ok_55";
86893
+ const AddFilter$1 = "_AddFilter_158ok_61";
86894
+ const filterDropdown$1 = "_filterDropdown_158ok_67";
86895
+ const filters = "_filters_158ok_73";
86896
+ const filterItem = "_filterItem_158ok_79";
86897
+ const filterItemOperator = "_filterItemOperator_158ok_85";
86898
+ const remove = "_remove_158ok_91";
86899
+ const filterCol = "_filterCol_158ok_97";
86900
+ const filterText = "_filterText_158ok_103";
86901
+ const smallText = "_smallText_158ok_109";
86902
+ const numberField = "_numberField_158ok_117";
86903
+ const numberFieldWrapper = "_numberFieldWrapper_158ok_125";
86904
+ const numberFieldLabel = "_numberFieldLabel_158ok_133";
86905
+ const numberFieldLabelText = "_numberFieldLabelText_158ok_141";
86906
+ const numberFieldLabelSelectText = "_numberFieldLabelSelectText_158ok_149";
86907
+ const numberFieldButtonClass = "_numberFieldButtonClass_158ok_157";
86908
+ const numberFieldLabelMenuClass = "_numberFieldLabelMenuClass_158ok_165";
86909
+ const checkedOption$1 = "_checkedOption_158ok_173";
86910
+ const option = "_option_158ok_181";
86911
+ const addFilterMenu = "_addFilterMenu_158ok_189";
86912
+ const appliedFilterTag = "_appliedFilterTag_158ok_197";
86913
+ const appliedfilters = "_appliedfilters_158ok_205";
86914
+ const textBold = "_textBold_158ok_213";
86915
+ const filterButton = "_filterButton_158ok_221";
86916
+ const filterBtnText = "_filterBtnText_158ok_229";
86917
+ const filterLength = "_filterLength_158ok_237";
86739
86918
  var styles$s = {
86740
86919
  container: container$9,
86741
86920
  form: form$1,
@@ -86768,7 +86947,10 @@ var styles$s = {
86768
86947
  addFilterMenu,
86769
86948
  appliedFilterTag,
86770
86949
  appliedfilters,
86771
- textBold
86950
+ textBold,
86951
+ filterButton,
86952
+ filterBtnText,
86953
+ filterLength
86772
86954
  };
86773
86955
  const NumberFilterField = ({
86774
86956
  setAppliedFilters,
@@ -86903,6 +87085,48 @@ const AddFilter = ({
86903
87085
  })
86904
87086
  });
86905
87087
  };
87088
+ const AppliedFilter = ({
87089
+ appliedFilter,
87090
+ setAppliedFilters,
87091
+ onChangeFilters
87092
+ }) => {
87093
+ return /* @__PURE__ */ jsx("div", {
87094
+ className: styles$s.appliedfilters,
87095
+ children: appliedFilter.map((filter2) => /* @__PURE__ */ jsxs("div", {
87096
+ className: styles$s.appliedFilterTag,
87097
+ children: [/* @__PURE__ */ jsx(Text, {
87098
+ variant: "p",
87099
+ styleClass: "font-14",
87100
+ className: styles$s.textBold,
87101
+ children: filter2.column
87102
+ }), /* @__PURE__ */ jsx(Text, {
87103
+ variant: "p",
87104
+ styleClass: "font-14",
87105
+ children: "is"
87106
+ }), filter2.as !== "string" && filter2.as !== "boolean" && filter2.as !== "default" && /* @__PURE__ */ jsx(Text, {
87107
+ variant: "p",
87108
+ styleClass: "font-14",
87109
+ children: "between"
87110
+ }), /* @__PURE__ */ jsx(Text, {
87111
+ variant: "p",
87112
+ styleClass: "font-14",
87113
+ className: styles$s.textBold,
87114
+ children: Array.isArray(filter2.value) ? filter2.as === "string" ? filter2.value.join(", ") : filter2.value.join(" & ") : typeof filter2.value === "string" && filter2.as === "number" ? filter2.value.replace("AND", "&") : typeof filter2.value === "string" && filter2.as === "date" ? filter2.value.split(" ").slice(2).join(" ").replace("AND", "&") : filter2.value
87115
+ }), /* @__PURE__ */ jsx(Button, {
87116
+ variant: "secondary",
87117
+ type: "button",
87118
+ onClick: () => {
87119
+ setAppliedFilters((prev) => prev.filter((a4) => a4.column !== filter2.column));
87120
+ const filterColumns = appliedFilter.filter((c3) => c3.column !== filter2.column);
87121
+ onChangeFilters(filterColumns);
87122
+ },
87123
+ children: /* @__PURE__ */ jsx(Icons, {
87124
+ name: "close-icon"
87125
+ })
87126
+ })]
87127
+ }))
87128
+ });
87129
+ };
86906
87130
  const groupArray = (array, key) => {
86907
87131
  return array.reduce((acc, item) => {
86908
87132
  const group2 = item[key];
@@ -95218,20 +95442,22 @@ var zt = function(t3) {
95218
95442
  } }]), a4;
95219
95443
  }(), $t = "input", Gt = "navigate";
95220
95444
  var reactDatepicker = "";
95221
- const datePickerContainer = "_datePickerContainer_1dons_1";
95222
- const buttonWrapper = "_buttonWrapper_1dons_9";
95223
- const datePickerCalendarWrapper = "_datePickerCalendarWrapper_1dons_17";
95224
- const label$1 = "_label_1dons_25";
95225
- const text = "_text_1dons_31";
95226
- const button$4 = "_button_1dons_9";
95227
- const datePickerCalContainer = "_datePickerCalContainer_1dons_43";
95228
- const datePickerOptionsWrapper = "_datePickerOptionsWrapper_1dons_49";
95229
- const datePickerOption = "_datePickerOption_1dons_49";
95230
- const datePickerCalendar = "_datePickerCalendar_1dons_17";
95231
- const datePickerCalendarHeader = "_datePickerCalendarHeader_1dons_73";
95232
- const checkedOption = "_checkedOption_1dons_81";
95233
- const datePickerCalFooter = "_datePickerCalFooter_1dons_89";
95234
- const dayClassName = "_dayClassName_1dons_97";
95445
+ const datePickerContainer = "_datePickerContainer_14m8h_1";
95446
+ const buttonWrapper = "_buttonWrapper_14m8h_9";
95447
+ const datePickerCalendarWrapper = "_datePickerCalendarWrapper_14m8h_17";
95448
+ const label$1 = "_label_14m8h_25";
95449
+ const text = "_text_14m8h_33";
95450
+ const button$4 = "_button_14m8h_9";
95451
+ const datePickerCalContainer = "_datePickerCalContainer_14m8h_49";
95452
+ const datePickerOptionsWrapper = "_datePickerOptionsWrapper_14m8h_57";
95453
+ const datePickerOption = "_datePickerOption_14m8h_57";
95454
+ const datePickerCalendar = "_datePickerCalendar_14m8h_17";
95455
+ const datePickerCalendarHeader = "_datePickerCalendarHeader_14m8h_97";
95456
+ const checkedOption = "_checkedOption_14m8h_105";
95457
+ const datePickerCalFooter = "_datePickerCalFooter_14m8h_113";
95458
+ const dayClassName = "_dayClassName_14m8h_121";
95459
+ const datePickerSelectedWrapper = "_datePickerSelectedWrapper_14m8h_129";
95460
+ const datePickerSelectedDate = "_datePickerSelectedDate_14m8h_137";
95235
95461
  var styles$r = {
95236
95462
  datePickerContainer,
95237
95463
  buttonWrapper,
@@ -95246,7 +95472,9 @@ var styles$r = {
95246
95472
  datePickerCalendarHeader,
95247
95473
  checkedOption,
95248
95474
  datePickerCalFooter,
95249
- dayClassName
95475
+ dayClassName,
95476
+ datePickerSelectedWrapper,
95477
+ datePickerSelectedDate
95250
95478
  };
95251
95479
  const options = [{
95252
95480
  type: "day",
@@ -95402,6 +95630,9 @@ const DateRangePicker = ({
95402
95630
  className: styles$r.datePickerCalendarWrapper,
95403
95631
  children: [/* @__PURE__ */ jsx(zt, {
95404
95632
  selected: startDate,
95633
+ startDate,
95634
+ selectsStart: true,
95635
+ endDate,
95405
95636
  onChange: (date) => {
95406
95637
  const startDateFormat = date.toISOString().slice(0, 10);
95407
95638
  const endDateFormat = endDate == null ? void 0 : endDate.toISOString().slice(0, 10);
@@ -95413,6 +95644,9 @@ const DateRangePicker = ({
95413
95644
  calendarClassName: styles$r.datePickerCalendar
95414
95645
  }), /* @__PURE__ */ jsx(zt, {
95415
95646
  selected: endDate,
95647
+ startDate,
95648
+ endDate,
95649
+ selectsEnd: true,
95416
95650
  onChange: (date) => {
95417
95651
  const startDateFormat = startDate == null ? void 0 : startDate.toISOString().slice(0, 10);
95418
95652
  const endDateFormat = date.toISOString().slice(0, 10);
@@ -95420,13 +95654,37 @@ const DateRangePicker = ({
95420
95654
  setEndDate(date);
95421
95655
  },
95422
95656
  calendarClassName: styles$r.datePickerCalendar,
95423
- className: styles$r.datePickerCalendarHeader,
95424
95657
  open: true,
95425
95658
  inline: true
95426
95659
  })]
95427
- }), /* @__PURE__ */ jsx("div", {
95660
+ }), /* @__PURE__ */ jsxs("div", {
95428
95661
  className: styles$r.datePickerCalFooter,
95429
- children: /* @__PURE__ */ jsx(Button, {
95662
+ children: [/* @__PURE__ */ jsxs("div", {
95663
+ className: styles$r.datePickerSelectedWrapper,
95664
+ children: [/* @__PURE__ */ jsxs(Text, {
95665
+ variant: "p",
95666
+ styleClass: "font-14",
95667
+ className: styles$r.datePickerSelectedDate,
95668
+ children: [/* @__PURE__ */ jsx("span", {
95669
+ children: (startDate == null ? void 0 : startDate.getDate()) || "D"
95670
+ }), "/", " ", /* @__PURE__ */ jsx("span", {
95671
+ children: (startDate == null ? void 0 : startDate.getMonth()) || "M"
95672
+ }), " /", " ", /* @__PURE__ */ jsx("span", {
95673
+ children: (startDate == null ? void 0 : startDate.getFullYear()) || "Y"
95674
+ })]
95675
+ }), "-", /* @__PURE__ */ jsxs(Text, {
95676
+ variant: "p",
95677
+ styleClass: "font-14",
95678
+ className: styles$r.datePickerSelectedDate,
95679
+ children: [/* @__PURE__ */ jsx("span", {
95680
+ children: (endDate == null ? void 0 : endDate.getDay()) || "D"
95681
+ }), "/", " ", /* @__PURE__ */ jsx("span", {
95682
+ children: (endDate == null ? void 0 : endDate.getMonth()) || "M"
95683
+ }), " /", " ", /* @__PURE__ */ jsx("span", {
95684
+ children: (endDate == null ? void 0 : endDate.getFullYear()) || "Y"
95685
+ })]
95686
+ })]
95687
+ }), /* @__PURE__ */ jsx(Button, {
95430
95688
  variant: "primary",
95431
95689
  type: "button",
95432
95690
  size: "small",
@@ -95435,7 +95693,7 @@ const DateRangePicker = ({
95435
95693
  return (_a2 = datePickerRef.current) == null ? void 0 : _a2.click();
95436
95694
  },
95437
95695
  children: "Save"
95438
- })
95696
+ })]
95439
95697
  })]
95440
95698
  })]
95441
95699
  })
@@ -95464,21 +95722,22 @@ const GlobalFilters = ({
95464
95722
  onApply,
95465
95723
  companyId,
95466
95724
  renderAdditionalHeaderContent,
95467
- externalDashboardId,
95468
- appliedfilters: appliedfilters2,
95469
- setAppliedFilters
95725
+ externalDashboardId
95470
95726
  }) => {
95727
+ const [appliedfilters2, setAppliedFilters] = useState([]);
95728
+ const globalFilterRef = useRef(null);
95471
95729
  const [filterList, setFilterList] = useState([]);
95472
95730
  const resetFilters = () => {
95731
+ var _a2;
95473
95732
  setAppliedFilters([]);
95474
95733
  onApply({
95475
95734
  tableName: "",
95476
95735
  filters: []
95477
95736
  });
95737
+ (_a2 = globalFilterRef.current) == null ? void 0 : _a2.click();
95478
95738
  };
95479
- const handleSubmit = (e3) => {
95480
- e3.preventDefault();
95481
- const filterColumns = appliedfilters2.map((field2) => {
95739
+ const onChangeFilters = (updatedFilters) => {
95740
+ const filterColumns = updatedFilters.map((field2) => {
95482
95741
  const col = {
95483
95742
  column: field2.column,
95484
95743
  operator: field2.operator,
@@ -95501,6 +95760,12 @@ const GlobalFilters = ({
95501
95760
  filters: filterColumns
95502
95761
  });
95503
95762
  };
95763
+ const handleSubmit = (e3) => {
95764
+ var _a2;
95765
+ e3.preventDefault();
95766
+ onChangeFilters(appliedfilters2);
95767
+ (_a2 = globalFilterRef.current) == null ? void 0 : _a2.click();
95768
+ };
95504
95769
  const getSelectedOption = useCallback((col, type3) => {
95505
95770
  var _a2;
95506
95771
  const colValue = ((_a2 = appliedfilters2.find((filter2) => filter2.column === col)) == null ? void 0 : _a2.value) || "";
@@ -95547,148 +95812,183 @@ const GlobalFilters = ({
95547
95812
  useEffect(() => {
95548
95813
  if (filters2[0].columns.length) {
95549
95814
  setFilterList(filters2[0].columns.filter((col) => col.isDefault));
95815
+ } else {
95816
+ setAppliedFilters([]);
95817
+ onApply({
95818
+ tableName: filters2[0].tableName,
95819
+ filters: []
95820
+ });
95550
95821
  }
95551
95822
  }, [filters2]);
95823
+ useEffect(() => {
95824
+ setAppliedFilters([]);
95825
+ onApply({
95826
+ tableName: filters2[0].tableName,
95827
+ filters: []
95828
+ });
95829
+ }, [externalDashboardId]);
95552
95830
  return /* @__PURE__ */ jsx(Fragment, {
95553
- children: (data == null ? void 0 : data.companyIntegrations.length) && !isLoading && /* @__PURE__ */ jsx("div", {
95554
- className: styles$s.container,
95555
- children: /* @__PURE__ */ jsxs("form", {
95556
- className: styles$s.form,
95557
- onSubmit: handleSubmit,
95558
- onReset: resetFilters,
95559
- children: [/* @__PURE__ */ jsx("div", {
95560
- className: styles$s.filterHeader,
95561
- children: /* @__PURE__ */ jsxs("div", {
95562
- className: styles$s.titleContent,
95563
- children: [/* @__PURE__ */ jsx(Text, {
95564
- variant: "p",
95565
- styleClass: "primary",
95566
- className: styles$s.title,
95567
- children: "Filters"
95568
- }), renderAdditionalHeaderContent ? renderAdditionalHeaderContent() : null]
95569
- })
95570
- }), /* @__PURE__ */ jsx("div", {
95571
- className: styles$s.filterFields,
95572
- children: filterList.map((col) => {
95573
- var _a2, _b2;
95574
- return /* @__PURE__ */ jsx(Fragment, {
95831
+ children: (data == null ? void 0 : data.companyIntegrations.length) && !isLoading && /* @__PURE__ */ jsxs(Fragment, {
95832
+ children: [/* @__PURE__ */ jsx(PopoverMenu, {
95833
+ button: /* @__PURE__ */ jsxs("div", {
95834
+ className: styles$s.filterButton,
95835
+ ref: globalFilterRef,
95836
+ children: [/* @__PURE__ */ jsxs("div", {
95837
+ className: styles$s.filterBtnText,
95838
+ children: [/* @__PURE__ */ jsx(Icons, {
95839
+ name: "filter-icon"
95840
+ }), " Filters"]
95841
+ }), appliedfilters2.length === 0 ? null : /* @__PURE__ */ jsx("span", {
95842
+ className: styles$s.filterLength,
95843
+ children: appliedfilters2.length
95844
+ })]
95845
+ }),
95846
+ position: "bottom-left",
95847
+ children: /* @__PURE__ */ jsx("div", {
95848
+ className: styles$s.container,
95849
+ children: /* @__PURE__ */ jsxs("form", {
95850
+ className: styles$s.form,
95851
+ onSubmit: handleSubmit,
95852
+ onReset: resetFilters,
95853
+ children: [/* @__PURE__ */ jsx("div", {
95854
+ className: styles$s.filterHeader,
95575
95855
  children: /* @__PURE__ */ jsxs("div", {
95576
- className: styles$s.filterDropdown,
95577
- children: [col.as === "date" && /* @__PURE__ */ jsx(Fragment, {
95578
- children: /* @__PURE__ */ jsx(DateRangePicker, {
95579
- label: col.label || col.name,
95580
- defaultValues: (_a2 = appliedfilters2.find((filter2) => filter2.column === col.name)) == null ? void 0 : _a2.defaultValues,
95581
- onChange: (option2) => {
95582
- if (option2)
95583
- setAppliedFilters((prev) => {
95584
- const isTimeStamp = col.as.toLowerCase() !== "date";
95585
- const value = getTimeFilterValue({
95586
- timeGrainValue: option2.value,
95587
- isTimeStamp,
95588
- col: getColumnString(col.name),
95589
- database: integrationName
95590
- });
95591
- const field2 = {
95592
- column: col.name,
95593
- operator: "=",
95594
- value,
95595
- as: col.as,
95596
- defaultValues: option2
95597
- };
95598
- const index2 = prev.findIndex((f2) => f2.column === col.name);
95599
- if (index2 === -1)
95600
- return [...prev, field2];
95601
- const updated = [...prev];
95602
- updated[index2] = field2;
95603
- return updated;
95604
- });
95605
- }
95856
+ className: styles$s.titleContent,
95857
+ children: [/* @__PURE__ */ jsx(Text, {
95858
+ variant: "p",
95859
+ styleClass: "primary",
95860
+ className: styles$s.title,
95861
+ children: "Filters"
95862
+ }), renderAdditionalHeaderContent ? renderAdditionalHeaderContent() : null]
95863
+ })
95864
+ }), /* @__PURE__ */ jsx("div", {
95865
+ className: styles$s.filterFields,
95866
+ children: filterList.map((col) => {
95867
+ var _a2, _b2;
95868
+ return /* @__PURE__ */ jsx(Fragment, {
95869
+ children: /* @__PURE__ */ jsxs("div", {
95870
+ className: styles$s.filterDropdown,
95871
+ children: [col.as === "date" && /* @__PURE__ */ jsx(Fragment, {
95872
+ children: /* @__PURE__ */ jsx(DateRangePicker, {
95873
+ label: col.label || col.name,
95874
+ defaultValues: (_a2 = appliedfilters2.find((filter2) => filter2.column === col.name)) == null ? void 0 : _a2.defaultValues,
95875
+ onChange: (option2) => {
95876
+ if (option2)
95877
+ setAppliedFilters((prev) => {
95878
+ const isTimeStamp = col.as.toLowerCase() !== "date";
95879
+ const value = getTimeFilterValue({
95880
+ timeGrainValue: option2.value,
95881
+ isTimeStamp,
95882
+ col: getColumnString(col.name),
95883
+ database: integrationName
95884
+ });
95885
+ const field2 = {
95886
+ column: col.name,
95887
+ operator: "=",
95888
+ value,
95889
+ as: col.as,
95890
+ defaultValues: option2
95891
+ };
95892
+ const index2 = prev.findIndex((f2) => f2.column === col.name);
95893
+ if (index2 === -1)
95894
+ return [...prev, field2];
95895
+ const updated = [...prev];
95896
+ updated[index2] = field2;
95897
+ return updated;
95898
+ });
95899
+ }
95900
+ })
95901
+ }), col.as === "number" && /* @__PURE__ */ jsx(NumberFilterField, {
95902
+ setAppliedFilters,
95903
+ column: col,
95904
+ defaultValues: (_b2 = appliedfilters2.find((filter2) => filter2.column === col.name)) == null ? void 0 : _b2.defaultValues
95905
+ }), col.as === "string" && /* @__PURE__ */ jsx(MultiFilterDropdown, {
95906
+ filter: {
95907
+ tableName: filters2[0].tableName,
95908
+ columnName: col.name
95909
+ },
95910
+ companyId,
95911
+ selectedOptions: getSelectedOption(col.name, "string") || [],
95912
+ autoSelected: false,
95913
+ onChange: (options2) => setAppliedFilters((prev) => {
95914
+ const field2 = {
95915
+ column: col.name,
95916
+ operator: "IN",
95917
+ value: options2.map((v4) => v4.value),
95918
+ as: col.as
95919
+ };
95920
+ const index2 = prev.findIndex((f2) => f2.column === col.name);
95921
+ if (index2 === -1)
95922
+ return [...prev, field2];
95923
+ const updated = [...prev];
95924
+ updated[index2] = field2;
95925
+ return updated;
95926
+ }),
95927
+ isSearchEnabled: true,
95928
+ integrationId,
95929
+ integrationName,
95930
+ label: col.label || col.name
95931
+ }), col.as === "default" || col.as === "boolean" ? /* @__PURE__ */ jsx(FilterDropDown, {
95932
+ filter: {
95933
+ tableName: filters2[0].tableName,
95934
+ columnName: col.name
95935
+ },
95936
+ companyId,
95937
+ selectedOption: getSelectedOption(col.name, "boolean"),
95938
+ autoSelected: false,
95939
+ onChange: (option2) => setAppliedFilters((prev) => {
95940
+ const field2 = {
95941
+ column: col.name,
95942
+ operator: "=",
95943
+ value: option2.value,
95944
+ as: col.as
95945
+ };
95946
+ const index2 = prev.findIndex((f2) => f2.column === col.name);
95947
+ if (index2 === -1)
95948
+ return [...prev, field2];
95949
+ const updated = [...prev];
95950
+ updated[index2] = field2;
95951
+ return updated;
95952
+ }),
95953
+ isSearchEnabled: true,
95954
+ integrationId,
95955
+ integrationName,
95956
+ label: col.label || col.name
95957
+ }) : null]
95606
95958
  })
95607
- }), col.as === "number" && /* @__PURE__ */ jsx(NumberFilterField, {
95608
- setAppliedFilters,
95609
- column: col,
95610
- defaultValues: (_b2 = appliedfilters2.find((filter2) => filter2.column === col.name)) == null ? void 0 : _b2.defaultValues
95611
- }), col.as === "string" && /* @__PURE__ */ jsx(MultiFilterDropdown, {
95612
- filter: {
95613
- tableName: filters2[0].tableName,
95614
- columnName: col.name
95615
- },
95616
- companyId,
95617
- selectedOptions: getSelectedOption(col.name, "string") || [],
95618
- autoSelected: false,
95619
- onChange: (options2) => setAppliedFilters((prev) => {
95620
- const field2 = {
95621
- column: col.name,
95622
- operator: "IN",
95623
- value: options2.map((v4) => v4.value),
95624
- as: col.as
95625
- };
95626
- const index2 = prev.findIndex((f2) => f2.column === col.name);
95627
- if (index2 === -1)
95628
- return [...prev, field2];
95629
- const updated = [...prev];
95630
- updated[index2] = field2;
95631
- return updated;
95632
- }),
95633
- isSearchEnabled: true,
95634
- integrationId,
95635
- integrationName,
95636
- label: col.label || col.name
95637
- }), col.as === "default" || col.as === "boolean" ? /* @__PURE__ */ jsx(FilterDropDown, {
95638
- filter: {
95639
- tableName: filters2[0].tableName,
95640
- columnName: col.name
95641
- },
95642
- companyId,
95643
- selectedOption: getSelectedOption(col.name, "boolean"),
95644
- autoSelected: false,
95645
- onChange: (option2) => setAppliedFilters((prev) => {
95646
- const field2 = {
95647
- column: col.name,
95648
- operator: "=",
95649
- value: option2.value,
95650
- as: col.as
95651
- };
95652
- const index2 = prev.findIndex((f2) => f2.column === col.name);
95653
- if (index2 === -1)
95654
- return [...prev, field2];
95655
- const updated = [...prev];
95656
- updated[index2] = field2;
95657
- return updated;
95658
- }),
95659
- isSearchEnabled: true,
95660
- integrationId,
95661
- integrationName,
95662
- label: col.label || col.name
95663
- }) : null]
95959
+ });
95664
95960
  })
95665
- });
95666
- })
95667
- }), /* @__PURE__ */ jsx("div", {
95668
- className: styles$s.AddFilter,
95669
- children: /* @__PURE__ */ jsx(AddFilter, {
95670
- columnList: filters2[0].columns.filter((col) => !col.isDefault),
95671
- setFilterList,
95672
- filterList
95961
+ }), /* @__PURE__ */ jsx("div", {
95962
+ className: styles$s.AddFilter,
95963
+ children: /* @__PURE__ */ jsx(AddFilter, {
95964
+ columnList: filters2[0].columns.filter((col) => !col.isDefault),
95965
+ setFilterList,
95966
+ filterList
95967
+ })
95968
+ }), /* @__PURE__ */ jsxs("div", {
95969
+ className: styles$s.buttons,
95970
+ children: [/* @__PURE__ */ jsxs(Button, {
95971
+ type: "reset",
95972
+ variant: "secondary",
95973
+ className: styles$s.reset,
95974
+ children: [/* @__PURE__ */ jsx(Icons, {
95975
+ name: "reset-icon",
95976
+ className: styles$s.applyIcon
95977
+ }), " ", "Reset Filters"]
95978
+ }), /* @__PURE__ */ jsx(Button, {
95979
+ type: "submit",
95980
+ variant: "primary",
95981
+ className: styles$s.apply,
95982
+ children: "Apply"
95983
+ })]
95984
+ })]
95673
95985
  })
95674
- }), /* @__PURE__ */ jsxs("div", {
95675
- className: styles$s.buttons,
95676
- children: [/* @__PURE__ */ jsxs(Button, {
95677
- type: "reset",
95678
- variant: "secondary",
95679
- className: styles$s.reset,
95680
- children: [/* @__PURE__ */ jsx(Icons, {
95681
- name: "reset-icon",
95682
- className: styles$s.applyIcon
95683
- }), " Reset Filters"]
95684
- }), /* @__PURE__ */ jsx(Button, {
95685
- type: "submit",
95686
- variant: "primary",
95687
- className: styles$s.apply,
95688
- children: "Apply"
95689
- })]
95690
- })]
95691
- })
95986
+ })
95987
+ }), /* @__PURE__ */ jsx(AppliedFilter, {
95988
+ appliedFilter: appliedfilters2,
95989
+ setAppliedFilters,
95990
+ onChangeFilters: (updatedFilters) => onChangeFilters(updatedFilters)
95991
+ })]
95692
95992
  })
95693
95993
  });
95694
95994
  };
@@ -97076,7 +97376,7 @@ const ChartTab = ({
97076
97376
  tableSettings,
97077
97377
  chartRef,
97078
97378
  tableName,
97079
- handleChartRightClick
97379
+ handleChartClick: handleChartRightClick
97080
97380
  }), chartPopupChild]
97081
97381
  }) : /* @__PURE__ */ jsxs("div", {
97082
97382
  className: styles$j.metricChartEmpty,
@@ -97132,7 +97432,7 @@ const ChartTab = ({
97132
97432
  routeType: "internal"
97133
97433
  },
97134
97434
  chartRef,
97135
- handleChartRightClick
97435
+ handleChartClick: handleChartRightClick
97136
97436
  }
97137
97437
  })]
97138
97438
  });
@@ -130166,60 +130466,60 @@ var styles$b = {
130166
130466
  "alt-container": "_alt-container_170un_49",
130167
130467
  fullscreen: fullscreen$2
130168
130468
  };
130169
- const cardContainer = "_cardContainer_pprak_1";
130170
- const listHeader = "_listHeader_pprak_9";
130171
- const metricName = "_metricName_pprak_17";
130172
- const metricTitle = "_metricTitle_pprak_25";
130173
- const metricDescription = "_metricDescription_pprak_33";
130174
- const popup = "_popup_pprak_41";
130175
- const metricFilter$1 = "_metricFilter_pprak_49";
130176
- const popupIcon = "_popupIcon_pprak_57";
130177
- const popupMenu = "_popupMenu_pprak_65";
130178
- const popupItem = "_popupItem_pprak_73";
130179
- const popupItemIcon = "_popupItemIcon_pprak_81";
130180
- const csvBtn = "_csvBtn_pprak_89";
130181
- const deleteBtn = "_deleteBtn_pprak_97";
130182
- const metricData = "_metricData_pprak_105";
130183
- const metricTable = "_metricTable_pprak_113";
130184
- const singleValueData = "_singleValueData_pprak_121";
130185
- const singleValue = "_singleValue_pprak_121";
130186
- const noData = "_noData_pprak_137";
130187
- const noDataContent = "_noDataContent_pprak_145";
130188
- const noDataText = "_noDataText_pprak_153";
130189
- const loading$1 = "_loading_pprak_161";
130190
- const features = "_features_pprak_169";
130191
- const fullscreen$1 = "_fullscreen_pprak_177";
130192
- const deleteModal = "_deleteModal_pprak_185";
130193
- const cancelBtn = "_cancelBtn_pprak_193";
130194
- const warningIcon = "_warningIcon_pprak_201";
130195
- const downloadCsv = "_downloadCsv_pprak_209";
130196
- const downloadCsvWrapper = "_downloadCsvWrapper_pprak_217";
130197
- const downloadCsvHeader = "_downloadCsvHeader_pprak_225";
130198
- const downloadCsvFooter = "_downloadCsvFooter_pprak_233";
130199
- const downloadCsvCancelBtn = "_downloadCsvCancelBtn_pprak_241";
130200
- const downloadCsvDisableBtn = "_downloadCsvDisableBtn_pprak_247";
130201
- const downloadCsvNote = "_downloadCsvNote_pprak_253";
130202
- const downloadCsvExpiredNote = "_downloadCsvExpiredNote_pprak_261";
130203
- const downloadCsvNoteText = "_downloadCsvNoteText_pprak_267";
130204
- const downloadCsvSuccessNote = "_downloadCsvSuccessNote_pprak_273";
130205
- const downloadCsvSuccessText = "_downloadCsvSuccessText_pprak_279";
130206
- const downloadUrlTimeline = "_downloadUrlTimeline_pprak_301";
130207
- const timeLineItem = "_timeLineItem_pprak_309";
130208
- const timeLineActiveIcon = "_timeLineActiveIcon_pprak_317";
130209
- const timeLineIcon = "_timeLineIcon_pprak_325";
130210
- const timeLineItemline = "_timeLineItemline_pprak_333";
130211
- const downloadCsvLoading = "_downloadCsvLoading_pprak_341";
130212
- const downloadCsvLoadingIcon = "_downloadCsvLoadingIcon_pprak_349";
130213
- const downloadCsvLoadingText = "_downloadCsvLoadingText_pprak_357";
130214
- const timeLineCheckedIcon = "_timeLineCheckedIcon_pprak_365";
130215
- const timeLineCheckedIconWrapper = "_timeLineCheckedIconWrapper_pprak_373";
130216
- const downloadCsvBackBtnWrapper = "_downloadCsvBackBtnWrapper_pprak_381";
130217
- const downloadCsvBackBtnText = "_downloadCsvBackBtnText_pprak_389";
130218
- const downloadCsvHeaderText = "_downloadCsvHeaderText_pprak_411";
130219
- const downloadCsvTabContainer = "_downloadCsvTabContainer_pprak_419";
130220
- const downloadCsvActiveTab = "_downloadCsvActiveTab_pprak_427";
130221
- const downloadCsvTab = "_downloadCsvTab_pprak_419";
130222
- const downloadCsvActiveTabText = "_downloadCsvActiveTabText_pprak_443";
130469
+ const cardContainer = "_cardContainer_sacr7_1";
130470
+ const listHeader = "_listHeader_sacr7_9";
130471
+ const metricName = "_metricName_sacr7_17";
130472
+ const metricTitle = "_metricTitle_sacr7_25";
130473
+ const metricDescription = "_metricDescription_sacr7_33";
130474
+ const popup = "_popup_sacr7_41";
130475
+ const metricFilter$1 = "_metricFilter_sacr7_49";
130476
+ const popupIcon = "_popupIcon_sacr7_57";
130477
+ const popupMenu = "_popupMenu_sacr7_65";
130478
+ const popupItem = "_popupItem_sacr7_73";
130479
+ const popupItemIcon = "_popupItemIcon_sacr7_81";
130480
+ const csvBtn = "_csvBtn_sacr7_89";
130481
+ const deleteBtn = "_deleteBtn_sacr7_97";
130482
+ const metricData = "_metricData_sacr7_105";
130483
+ const metricTable = "_metricTable_sacr7_113";
130484
+ const singleValueData = "_singleValueData_sacr7_121";
130485
+ const singleValue = "_singleValue_sacr7_121";
130486
+ const noData = "_noData_sacr7_137";
130487
+ const noDataContent = "_noDataContent_sacr7_145";
130488
+ const noDataText = "_noDataText_sacr7_153";
130489
+ const loading$1 = "_loading_sacr7_161";
130490
+ const features = "_features_sacr7_169";
130491
+ const fullscreen$1 = "_fullscreen_sacr7_177";
130492
+ const deleteModal = "_deleteModal_sacr7_185";
130493
+ const cancelBtn = "_cancelBtn_sacr7_193";
130494
+ const warningIcon = "_warningIcon_sacr7_201";
130495
+ const downloadCsv = "_downloadCsv_sacr7_209";
130496
+ const downloadCsvWrapper = "_downloadCsvWrapper_sacr7_217";
130497
+ const downloadCsvHeader = "_downloadCsvHeader_sacr7_225";
130498
+ const downloadCsvFooter = "_downloadCsvFooter_sacr7_233";
130499
+ const downloadCsvCancelBtn = "_downloadCsvCancelBtn_sacr7_241";
130500
+ const downloadCsvDisableBtn = "_downloadCsvDisableBtn_sacr7_247";
130501
+ const downloadCsvNote = "_downloadCsvNote_sacr7_253";
130502
+ const downloadCsvExpiredNote = "_downloadCsvExpiredNote_sacr7_261";
130503
+ const downloadCsvNoteText = "_downloadCsvNoteText_sacr7_267";
130504
+ const downloadCsvSuccessNote = "_downloadCsvSuccessNote_sacr7_273";
130505
+ const downloadCsvSuccessText = "_downloadCsvSuccessText_sacr7_279";
130506
+ const downloadUrlTimeline = "_downloadUrlTimeline_sacr7_301";
130507
+ const timeLineItem = "_timeLineItem_sacr7_309";
130508
+ const timeLineActiveIcon = "_timeLineActiveIcon_sacr7_317";
130509
+ const timeLineIcon = "_timeLineIcon_sacr7_325";
130510
+ const timeLineItemline = "_timeLineItemline_sacr7_333";
130511
+ const downloadCsvLoading = "_downloadCsvLoading_sacr7_341";
130512
+ const downloadCsvLoadingIcon = "_downloadCsvLoadingIcon_sacr7_349";
130513
+ const downloadCsvLoadingText = "_downloadCsvLoadingText_sacr7_357";
130514
+ const timeLineCheckedIcon = "_timeLineCheckedIcon_sacr7_365";
130515
+ const timeLineCheckedIconWrapper = "_timeLineCheckedIconWrapper_sacr7_373";
130516
+ const downloadCsvBackBtnWrapper = "_downloadCsvBackBtnWrapper_sacr7_381";
130517
+ const downloadCsvBackBtnText = "_downloadCsvBackBtnText_sacr7_389";
130518
+ const downloadCsvHeaderText = "_downloadCsvHeaderText_sacr7_411";
130519
+ const downloadCsvTabContainer = "_downloadCsvTabContainer_sacr7_419";
130520
+ const downloadCsvActiveTab = "_downloadCsvActiveTab_sacr7_427";
130521
+ const downloadCsvTab = "_downloadCsvTab_sacr7_419";
130522
+ const downloadCsvActiveTabText = "_downloadCsvActiveTabText_sacr7_443";
130223
130523
  var styles$a = {
130224
130524
  cardContainer,
130225
130525
  listHeader,
@@ -130258,8 +130558,8 @@ var styles$a = {
130258
130558
  downloadCsvNoteText,
130259
130559
  downloadCsvSuccessNote,
130260
130560
  downloadCsvSuccessText,
130261
- "tab-border-bottom": "_tab-border-bottom_pprak_285",
130262
- "download-info-text": "_download-info-text_pprak_293",
130561
+ "tab-border-bottom": "_tab-border-bottom_sacr7_285",
130562
+ "download-info-text": "_download-info-text_sacr7_293",
130263
130563
  downloadUrlTimeline,
130264
130564
  timeLineItem,
130265
130565
  timeLineActiveIcon,
@@ -130574,16 +130874,6 @@ const evaLayersFill = (props) => /* @__PURE__ */ jsx("svg", {
130574
130874
  })
130575
130875
  })
130576
130876
  });
130577
- const fluentMdl2DrillDown = (props) => /* @__PURE__ */ jsx("svg", {
130578
- viewBox: "0 0 2048 2048",
130579
- width: "1.2em",
130580
- height: "1.2em",
130581
- ...props,
130582
- children: /* @__PURE__ */ jsx("path", {
130583
- fill: "currentColor",
130584
- d: "M1024 0q141 0 272 36t245 103t207 160t160 208t103 245t37 272q0 141-36 272t-103 245t-160 207t-208 160t-245 103t-272 37q-141 0-272-36t-245-103t-207-160t-160-208t-103-244t-37-273q0-141 36-272t103-245t160-207t208-160T751 37t273-37zm0 1920q123 0 237-32t214-90t182-141t140-181t91-214t32-238q0-123-32-237t-90-214t-141-182t-181-140t-214-91t-238-32q-123 0-237 32t-214 90t-182 141t-140 181t-91 214t-32 238q0 123 32 237t90 214t141 182t181 140t214 91t238 32zm531-1005l90 90l-620 622l-622-622l90-90l467 467V384h129v997l466-466z"
130585
- })
130586
- });
130587
130877
  const mdiExternalLink = (props) => /* @__PURE__ */ jsx("svg", {
130588
130878
  viewBox: "0 0 24 24",
130589
130879
  width: "1.2em",
@@ -130603,7 +130893,6 @@ const ChartPopup = ({
130603
130893
  value,
130604
130894
  columnName,
130605
130895
  getUnderlyingData,
130606
- drilldown: drilldown2,
130607
130896
  clickBehaviourConfigs
130608
130897
  }) => {
130609
130898
  const [isShowUnderlyingData, setShowUnderlyingData] = useState(false);
@@ -130644,18 +130933,6 @@ const ChartPopup = ({
130644
130933
  styleClass: "font-14",
130645
130934
  children: "View underlying data"
130646
130935
  })]
130647
- }), drilldown2 && /* @__PURE__ */ jsxs(Button, {
130648
- variant: "custom",
130649
- type: "button",
130650
- className: styles$8.chartOptionBtn,
130651
- onClick: () => drilldown2(),
130652
- children: [/* @__PURE__ */ jsx(fluentMdl2DrillDown, {
130653
- className: styles$8.popupItemIcon
130654
- }), /* @__PURE__ */ jsx(Text, {
130655
- variant: "p",
130656
- styleClass: "font-14",
130657
- children: "Drill Down"
130658
- })]
130659
130936
  }), clickBehaviourConfigs.isEnable && /* @__PURE__ */ jsxs(Button, {
130660
130937
  variant: "custom",
130661
130938
  type: "button",
@@ -130942,12 +131219,13 @@ const MetricCard = ({
130942
131219
  };
130943
131220
  const [isShowChartPopup, setShowChartPopup] = useState(false);
130944
131221
  const [chartParams, setChartParams] = useState();
130945
- const handleChartRightClick = (params) => {
131222
+ const handleChartClick2 = (params) => {
130946
131223
  if (rlsConditions.length && rlsConditions[0].datatype === "date") {
130947
131224
  return;
130948
131225
  }
131226
+ if (params.event)
131227
+ params.event.event.preventDefault();
130949
131228
  setChartParams(params);
130950
- setShowChartPopup(true);
130951
131229
  };
130952
131230
  const {
130953
131231
  getUnderlyingData
@@ -131033,7 +131311,7 @@ const MetricCard = ({
131033
131311
  enableSaveAs: true,
131034
131312
  chartClickConfig: clickBehaviourConfigs.chart,
131035
131313
  chartRef,
131036
- handleChartRightClick
131314
+ handleChartClick: handleChartClick2
131037
131315
  }),
131038
131316
  children: [/* @__PURE__ */ jsx(Icons, {
131039
131317
  name: "fullscreen-icon",
@@ -131127,7 +131405,6 @@ const MetricCard = ({
131127
131405
  value: chartParams == null ? void 0 : chartParams.name,
131128
131406
  columnName,
131129
131407
  getUnderlyingData,
131130
- drilldown: (drillDownSettings == null ? void 0 : drillDownSettings.isEnableGroupBy) ? onDrillDown : void 0,
131131
131408
  clickBehaviourConfigs: clickBehaviourConfigs.chart
131132
131409
  }), (dataDb == null ? void 0 : dataDb.length) ? /* @__PURE__ */ jsx(MetricChart, {
131133
131410
  labels: labels2,
@@ -131150,7 +131427,9 @@ const MetricCard = ({
131150
131427
  backGroundColor,
131151
131428
  chartClickConfig: clickBehaviourConfigs.chart,
131152
131429
  chartRef,
131153
- handleChartRightClick
131430
+ handleChartClick: handleChartClick2,
131431
+ drilldown: (drillDownSettings == null ? void 0 : drillDownSettings.isEnableGroupBy) ? onDrillDown : void 0,
131432
+ setShowChartPopup
131154
131433
  }) : null]
131155
131434
  })]
131156
131435
  })
@@ -132613,65 +132892,6 @@ const MetricTable = ({
132613
132892
  })]
132614
132893
  });
132615
132894
  };
132616
- const AppliedFilter = ({
132617
- appliedFilter,
132618
- setAppliedFilters,
132619
- onRemove
132620
- }) => {
132621
- return /* @__PURE__ */ jsx("div", {
132622
- className: styles$s.appliedfilters,
132623
- children: appliedFilter.map((filter2) => /* @__PURE__ */ jsxs("div", {
132624
- className: styles$s.appliedFilterTag,
132625
- children: [/* @__PURE__ */ jsx(Text, {
132626
- variant: "p",
132627
- styleClass: "font-14",
132628
- className: styles$s.textBold,
132629
- children: filter2.column
132630
- }), /* @__PURE__ */ jsx(Text, {
132631
- variant: "p",
132632
- styleClass: "font-14",
132633
- children: "is"
132634
- }), filter2.as !== "string" && filter2.as !== "boolean" && filter2.as !== "default" && /* @__PURE__ */ jsx(Text, {
132635
- variant: "p",
132636
- styleClass: "font-14",
132637
- children: "between"
132638
- }), /* @__PURE__ */ jsx(Text, {
132639
- variant: "p",
132640
- styleClass: "font-14",
132641
- className: styles$s.textBold,
132642
- children: Array.isArray(filter2.value) ? filter2.as === "string" ? filter2.value.join(", ") : filter2.value.join(" & ") : typeof filter2.value === "string" && filter2.as === "number" ? filter2.value.replace("AND", "&") : typeof filter2.value === "string" && filter2.as === "date" ? filter2.value.split(" ").slice(2).join(" ").replace("AND", "&") : filter2.value
132643
- }), /* @__PURE__ */ jsx(Button, {
132644
- variant: "secondary",
132645
- type: "button",
132646
- onClick: () => {
132647
- setAppliedFilters((prev) => prev.filter((a4) => a4.column !== filter2.column));
132648
- const filterColumns = appliedFilter.filter((c3) => c3.column !== filter2.column).map((field2) => {
132649
- const col = {
132650
- column: field2.column,
132651
- operator: field2.operator,
132652
- as: field2.as
132653
- };
132654
- const formattedValue = field2.as === "date" || field2.as === "number" ? field2.value : getFormattedFilterValue({
132655
- operator: field2.operator,
132656
- value: field2.value
132657
- });
132658
- if (formattedValue != null) {
132659
- Object.assign(col, {
132660
- ...col,
132661
- value: formattedValue
132662
- });
132663
- }
132664
- return col;
132665
- });
132666
- onRemove(filterColumns);
132667
- },
132668
- children: /* @__PURE__ */ jsx(Icons, {
132669
- name: "close-icon"
132670
- })
132671
- })]
132672
- }))
132673
- });
132674
- };
132675
132895
  var index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
132676
132896
  __proto__: null,
132677
132897
  Button,
@@ -133329,7 +133549,6 @@ const EmbeddedDashboard = e__default.memo(({
133329
133549
  data,
133330
133550
  isLoading
133331
133551
  } = useDashboardContext();
133332
- const [appliedfilters2, setAppliedFilters] = useState([]);
133333
133552
  const [isShowMetricCreateModal, setShowMetricCreateModal] = useState(false);
133334
133553
  const [globalFilters, setGlobalFilters] = useState({
133335
133554
  tableName: "",
@@ -133351,7 +133570,6 @@ const EmbeddedDashboard = e__default.memo(({
133351
133570
  return [adminThemeData == null ? void 0 : adminThemeData.themes[0], colors2];
133352
133571
  }, [adminThemeData == null ? void 0 : adminThemeData.themes[0]]);
133353
133572
  useApplyAdminTheme(adminTheme);
133354
- const globalFilterRef = useRef(null);
133355
133573
  return /* @__PURE__ */ jsx(Fragment, {
133356
133574
  children: /* @__PURE__ */ jsxs("div", {
133357
133575
  className: styles$M["embedDashboard-container"],
@@ -133392,46 +133610,13 @@ const EmbeddedDashboard = e__default.memo(({
133392
133610
  })]
133393
133611
  }), /* @__PURE__ */ jsxs("div", {
133394
133612
  className: styles$M["embedDashboard-wrapper"],
133395
- children: [data.externalDashboard.filters.length ? /* @__PURE__ */ jsxs(Fragment, {
133396
- children: [/* @__PURE__ */ jsx(PopoverMenu, {
133397
- button: /* @__PURE__ */ jsxs("div", {
133398
- className: styles$M.filterButton,
133399
- ref: globalFilterRef,
133400
- children: [/* @__PURE__ */ jsxs("div", {
133401
- className: styles$M.filterText,
133402
- children: [/* @__PURE__ */ jsx(Icons, {
133403
- name: "filter-icon"
133404
- }), " Filters"]
133405
- }), appliedfilters2.length === 0 ? /* @__PURE__ */ jsx("div", {}) : /* @__PURE__ */ jsx("span", {
133406
- className: styles$M.filterLength,
133407
- children: appliedfilters2.length
133408
- })]
133409
- }),
133410
- menuClass: "w-[400px] ml-[40px]",
133411
- position: "bottom-left",
133412
- children: /* @__PURE__ */ jsx(GlobalFilters, {
133413
- companyId: data.companyId,
133414
- externalDashboardId: data.externalDashboard.id,
133415
- filters: data.externalDashboard.filters,
133416
- onApply: (values) => {
133417
- var _a3;
133418
- setGlobalFilters(values);
133419
- (_a3 = globalFilterRef.current) == null ? void 0 : _a3.click();
133420
- },
133421
- appliedfilters: appliedfilters2,
133422
- setAppliedFilters
133423
- })
133424
- }), /* @__PURE__ */ jsx(AppliedFilter, {
133425
- appliedFilter: appliedfilters2,
133426
- setAppliedFilters,
133427
- onRemove: (filters2) => {
133428
- var _a3, _b3;
133429
- return setGlobalFilters({
133430
- tableName: (_b3 = (_a3 = data.externalDashboard) == null ? void 0 : _a3.filters) == null ? void 0 : _b3[0].tableName,
133431
- filters: filters2
133432
- });
133433
- }
133434
- })]
133613
+ children: [data.externalDashboard.filters.length ? /* @__PURE__ */ jsx(GlobalFilters, {
133614
+ companyId: data.companyId,
133615
+ externalDashboardId: data.externalDashboard.id,
133616
+ filters: data.externalDashboard.filters,
133617
+ onApply: (values) => {
133618
+ setGlobalFilters(values);
133619
+ }
133435
133620
  }) : null, /* @__PURE__ */ jsx(ExternalMetricList, {
133436
133621
  client: data.clientId,
133437
133622
  isLiveMode: data.isLiveMode,