@sisense/sdk-ui 2.13.0 → 2.14.0

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 (64) hide show
  1. package/dist/ai.cjs +2 -2
  2. package/dist/ai.js +6 -6
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +4 -4
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{derive-chart-family-Ca1NT5US.cjs → derive-chart-family-DJUpWKOP.cjs} +53 -44
  8. package/dist/{derive-chart-family-BcASqlOf.js → derive-chart-family-D_bylSQy.js} +9047 -8934
  9. package/dist/{dimensions-DOxD1XtL.js → dimensions-CTUJhW-M.js} +1 -1
  10. package/dist/{dimensions-DCT9XInO.cjs → dimensions-CdNGgk9I.cjs} +1 -1
  11. package/dist/execute-query-CNt566O5.cjs +1 -0
  12. package/dist/{execute-query-JhI9RXe_.js → execute-query-DyjkDYHG.js} +1033 -1016
  13. package/dist/index.cjs +24 -24
  14. package/dist/index.js +6337 -6279
  15. package/dist/index.umd.js +348 -338
  16. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/constants.d.ts +12 -4
  17. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/index.d.ts +25 -1
  18. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/continuous-axes-options.d.ts +12 -0
  19. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/helpers.d.ts +24 -0
  20. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/index.d.ts +2 -0
  21. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/split-axes-options.d.ts +12 -0
  22. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/chart-options.d.ts +9 -2
  23. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/index.d.ts +3 -3
  24. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/calendar-data-generator.d.ts +12 -2
  25. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/index.d.ts +1 -1
  26. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/series-options.d.ts +9 -2
  27. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap-charts-grid.d.ts +2 -1
  28. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-helpers.d.ts +2 -1
  29. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-per-chart-instance.d.ts +13 -0
  30. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/sizing-helpers.d.ts +16 -3
  31. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/view-helpers.d.ts +4 -4
  32. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-chart-options.d.ts +7 -6
  33. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/utils/calendar-utils.d.ts +1 -1
  34. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/funnel-chart/design-options/index.d.ts +14 -0
  35. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/treemap-chart/design-options/index.d.ts +3 -0
  36. package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +5 -0
  37. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +0 -3
  38. package/dist/packages/sdk-ui/src/chart-options-processor/series-labels.d.ts +0 -3
  39. package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
  40. package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +5 -4
  41. package/dist/packages/sdk-ui/src/chart-options-processor/translations/funnel-plot-options.d.ts +12 -17
  42. package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-labels.d.ts +2 -2
  43. package/dist/packages/sdk-ui/src/common/components/menu/context-menu/context-menu.d.ts +1 -0
  44. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/helpers.d.ts +11 -0
  45. package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +0 -30
  46. package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +3 -2
  47. package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
  48. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +76 -4
  49. package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +5 -5
  50. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +3 -1
  51. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +2 -0
  52. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +4 -0
  53. package/dist/packages/sdk-ui/src/types.d.ts +108 -52
  54. package/dist/{types-Cl0_Tfey.cjs → types-D1qM-ltg.cjs} +1 -1
  55. package/dist/{types-CnFd03Ga.js → types-DglXXR-Q.js} +1 -1
  56. package/dist/{use-common-filters-qFWk1Ia5.js → use-common-filters-BGrn7zoW.js} +21904 -21098
  57. package/dist/use-common-filters-DxzCHhgF.cjs +846 -0
  58. package/dist/{widget-composer-C7ZAcFHK.cjs → widget-composer-C24YJEek.cjs} +5 -5
  59. package/dist/{widget-composer-ovIwmgin.js → widget-composer-lBv40CFf.js} +131 -130
  60. package/package.json +7 -7
  61. package/dist/execute-query-CvH_36GC.cjs +0 -1
  62. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/highcharts-options-builder.d.ts +0 -8
  63. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options.d.ts +0 -12
  64. package/dist/use-common-filters-WTVrWfsY.cjs +0 -845
@@ -2,12 +2,12 @@ var ne = Object.defineProperty, oe = Object.defineProperties;
2
2
  var le = Object.getOwnPropertyDescriptors;
3
3
  var C = Object.getOwnPropertySymbols;
4
4
  var N = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
5
- var F = (e, t, r) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, o = (e, t) => {
5
+ var $ = (e, t, r) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, o = (e, t) => {
6
6
  for (var r in t || (t = {}))
7
- N.call(t, r) && F(e, r, t[r]);
7
+ N.call(t, r) && $(e, r, t[r]);
8
8
  if (C)
9
9
  for (var r of C(t))
10
- k.call(t, r) && F(e, r, t[r]);
10
+ k.call(t, r) && $(e, r, t[r]);
11
11
  return e;
12
12
  }, p = (e, t) => oe(e, le(t));
13
13
  var q = (e, t) => {
@@ -19,20 +19,20 @@ var q = (e, t) => {
19
19
  t.indexOf(a) < 0 && k.call(e, a) && (r[a] = e[a]);
20
20
  return r;
21
21
  };
22
- import { J as de, c as V, i as ce } from "./types-CnFd03Ga.js";
23
- import { T as b, l as H, A as ue, m as l, o as pe, q as T, D as me, r as W, n as Z, s as ge, t as A, u as fe, v as ye } from "./execute-query-JhI9RXe_.js";
24
- import { A as Se, i as Oe, a as he, b as be, n as _, g as Te } from "./derive-chart-family-BcASqlOf.js";
25
- function ve(e) {
22
+ import { J as de, c as V, i as ce } from "./types-DglXXR-Q.js";
23
+ import { T as b, l as H, A as ue, m as l, o as pe, q as T, D as me, r as W, n as Z, s as ge, t as I, u as fe, v as ye } from "./execute-query-DyjkDYHG.js";
24
+ import { A as Se, C as Oe, i as he, a as be, b as Te, n as _, g as ve } from "./derive-chart-family-D_bylSQy.js";
25
+ function Ee(e) {
26
26
  return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
27
27
  }
28
- function Lt(e) {
28
+ function At(e) {
29
29
  return e.charAt(0).toUpperCase() + e.slice(1);
30
30
  }
31
31
  function It(e) {
32
32
  const t = /\[(.+?)\s\(Calendar\)\]/;
33
33
  return e.replace(t, "[$1]").trim();
34
34
  }
35
- function At(e) {
35
+ function _t(e) {
36
36
  if (e)
37
37
  if (e.metadata) {
38
38
  if (!e.model)
@@ -41,7 +41,7 @@ function At(e) {
41
41
  else throw new b("errors.emptyModel");
42
42
  return e;
43
43
  }
44
- function Ee(e) {
44
+ function xe(e) {
45
45
  return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
46
46
  }
47
47
  function G(e) {
@@ -53,7 +53,7 @@ function G(e) {
53
53
  chartType: e
54
54
  });
55
55
  }
56
- function xe(e) {
56
+ function De(e) {
57
57
  return "widgetType" in e && e.widgetType === "pivot";
58
58
  }
59
59
  function O(e) {
@@ -62,12 +62,12 @@ function O(e) {
62
62
  }
63
63
  function B(e) {
64
64
  const t = "measures" in e && m(e.measures) || "values" in e && m(e.values);
65
- return xe(e) ? "values" in e.dataOptions && m(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && m(e.dataOptions.value) || "secondary" in e.dataOptions && m(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !m(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((a) => O(a)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && O(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && O(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && O(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && O(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && O(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && m(e.dataOptions.geo) && "color" in e.dataOptions && m(e.dataOptions.color) : "value" in e.dataOptions && m(e.dataOptions.value) : t;
65
+ return De(e) ? "values" in e.dataOptions && m(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && m(e.dataOptions.value) || "secondary" in e.dataOptions && m(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !m(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((a) => O(a)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && O(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && O(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && O(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && O(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && O(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && m(e.dataOptions.geo) && "color" in e.dataOptions && m(e.dataOptions.color) : "value" in e.dataOptions && m(e.dataOptions.value) : t;
66
66
  }
67
67
  function m(e) {
68
68
  return Array.isArray(e) && e.length > 0;
69
69
  }
70
- function De(e) {
70
+ function Ce(e) {
71
71
  const t = e.split(`
72
72
  `);
73
73
  for (let r = 0; r < t.length - 1; r++)
@@ -81,7 +81,7 @@ function De(e) {
81
81
  return t.join(`
82
82
  `);
83
83
  }
84
- function Ce(e) {
84
+ function we(e) {
85
85
  const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
86
86
  if ("composeCode" in e)
87
87
  return e;
@@ -92,7 +92,7 @@ function Ce(e) {
92
92
  }
93
93
  return r;
94
94
  }
95
- const we = {
95
+ const Le = {
96
96
  react: {
97
97
  baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
98
98
  {{extraImportsString}}
@@ -547,9 +547,9 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
547
547
  </template>`,
548
548
  dashboardTmpl: "/** COMING SOON */"
549
549
  }
550
- }, X = (e, t) => we[t][e].replace(/{{(.*?)Tmpl}}/g, (a, i) => X(`${i}Tmpl`, t)), Le = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), M = (e, t, r = "react") => {
550
+ }, X = (e, t) => Le[t][e].replace(/{{(.*?)Tmpl}}/g, (a, i) => X(`${i}Tmpl`, t)), Ae = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), M = (e, t, r = "react") => {
551
551
  const a = X(e, r);
552
- return De(Le(a, t));
552
+ return Ce(Ae(a, t));
553
553
  }, Ie = () => Object.values(ue).map((t) => H.aggregationToJAQL(t)).join("|"), ee = (e) => {
554
554
  const { formula: t, context: r, filter: a } = e;
555
555
  if (!r || !t)
@@ -584,7 +584,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
584
584
  }), t.context = r;
585
585
  }
586
586
  return t;
587
- }, Ae = (e) => {
587
+ }, _e = (e) => {
588
588
  var a;
589
589
  const t = e;
590
590
  if (t.panel !== "scope") return t;
@@ -592,9 +592,9 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
592
592
  return (a = r.filter) != null && a.by && (r.filter.by = ee(r.filter.by)), p(o({}, t), {
593
593
  jaql: r
594
594
  });
595
- }, _e = (e) => {
595
+ }, Me = (e) => {
596
596
  let t = e;
597
- t = Ae(t);
597
+ t = _e(t);
598
598
  const { jaql: r, measure: a, by: i } = t;
599
599
  return o(o(p(o({}, t), {
600
600
  jaql: L(r)
@@ -603,8 +603,8 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
603
603
  } : {}), a ? {
604
604
  measure: L(a)
605
605
  } : {});
606
- }, I = 6;
607
- function Me(e) {
606
+ }, A = 6;
607
+ function Pe(e) {
608
608
  switch (e) {
609
609
  case "line":
610
610
  case "area":
@@ -654,7 +654,7 @@ function Me(e) {
654
654
  return {};
655
655
  }
656
656
  }
657
- const Pe = {
657
+ const We = {
658
658
  subtype: "indicator/numeric",
659
659
  numericSubtype: "numericSimple",
660
660
  skin: "vertical",
@@ -673,7 +673,7 @@ const Pe = {
673
673
  shouldBeShown: !1
674
674
  }
675
675
  }
676
- }, We = {
676
+ }, Fe = {
677
677
  legend: {
678
678
  enabled: !0,
679
679
  position: "bottom"
@@ -749,7 +749,7 @@ const Pe = {
749
749
  size: "small",
750
750
  fill: "filled"
751
751
  }
752
- }, Fe = {
752
+ }, Ne = {
753
753
  subtype: "area/basic",
754
754
  lineWidth: {
755
755
  width: "bold"
@@ -759,11 +759,11 @@ const Pe = {
759
759
  size: "small",
760
760
  fill: "filled"
761
761
  }
762
- }, Ne = {
763
- subtype: "bar/classic"
764
762
  }, ke = {
765
- subtype: "column/classic"
763
+ subtype: "bar/classic"
766
764
  }, qe = {
765
+ subtype: "column/classic"
766
+ }, Be = {
767
767
  subtype: "polar/column",
768
768
  yAxis: {
769
769
  enabled: !0,
@@ -786,9 +786,9 @@ const Pe = {
786
786
  }
787
787
  };
788
788
  function h(e) {
789
- return pe({}, We, e);
789
+ return pe({}, Fe, e);
790
790
  }
791
- const Be = {
791
+ const Re = {
792
792
  subtype: "pie/classic",
793
793
  legend: {
794
794
  enabled: !1,
@@ -811,22 +811,22 @@ const Be = {
811
811
  minimalIndependentSlicePercentage: 3,
812
812
  selectedConvolutionType: "byPercentage"
813
813
  }
814
- }, Re = {
814
+ }, je = {
815
815
  legend: {
816
816
  enabled: !1,
817
817
  position: "left"
818
818
  },
819
- labels: {
819
+ seriesLabels: {
820
820
  enabled: !0,
821
- categories: !0,
822
- percent: !0,
823
- decimals: !1,
824
- value: !0
821
+ showCategory: !0,
822
+ showPercentage: !0,
823
+ showPercentDecimals: !1,
824
+ showValue: !0
825
825
  },
826
826
  funnelSize: "regular",
827
827
  funnelType: "regular",
828
828
  funnelDirection: "regular"
829
- }, je = {
829
+ }, Qe = {
830
830
  rowsPerPage: 25,
831
831
  isAutoHeight: !0,
832
832
  rowHeight: null,
@@ -835,7 +835,7 @@ const Be = {
835
835
  headersColor: !1,
836
836
  membersColor: !1,
837
837
  totalsColor: !1
838
- }, Qe = {
838
+ }, Ue = {
839
839
  labels: {
840
840
  category: [
841
841
  {
@@ -852,7 +852,8 @@ const Be = {
852
852
  tooltip: {
853
853
  mode: "value"
854
854
  }
855
- }, Ue = {
855
+ }, ze = {
856
+ subtype: Oe.SUBTYPE,
856
857
  viewType: "month",
857
858
  startOfWeek: "sunday",
858
859
  cellLabels: {
@@ -869,7 +870,7 @@ const Be = {
869
870
  cellColor: "#e6e6e6",
870
871
  hideValues: !0
871
872
  }
872
- }, ze = {
873
+ }, Ye = {
873
874
  legend: {
874
875
  enabled: !0,
875
876
  position: "bottom"
@@ -877,7 +878,7 @@ const Be = {
877
878
  tooltip: {
878
879
  mode: "value"
879
880
  }
880
- }, Ye = {
881
+ }, Je = {
881
882
  legend: {
882
883
  enabled: !0,
883
884
  position: "bottom"
@@ -929,7 +930,7 @@ const Be = {
929
930
  scatterBubbleMinSize: 10,
930
931
  scatterBubbleMaxSize: 10
931
932
  }
932
- }, Je = {
933
+ }, Ke = {
933
934
  header: {
934
935
  color: {
935
936
  enabled: !1
@@ -945,7 +946,7 @@ const Be = {
945
946
  enabled: !1
946
947
  }
947
948
  }
948
- }, Ke = {
949
+ }, Ve = {
949
950
  subtype: "scattermap",
950
951
  markers: {
951
952
  fill: "filled",
@@ -955,9 +956,9 @@ const Be = {
955
956
  maxSize: 24
956
957
  }
957
958
  }
958
- }, Ve = {
959
- mapType: "world"
960
959
  }, He = {
960
+ mapType: "world"
961
+ }, Ze = {
961
962
  subtype: "boxplot/full",
962
963
  legend: {
963
964
  enabled: !0,
@@ -1009,42 +1010,42 @@ const Be = {
1009
1010
  enabled: !0
1010
1011
  }
1011
1012
  };
1012
- function Ze(e) {
1013
+ function Ge(e) {
1013
1014
  switch (e) {
1014
1015
  case "indicator":
1015
- return l(Pe);
1016
+ return l(We);
1016
1017
  case "line":
1017
1018
  return h($e);
1018
1019
  case "area":
1019
- return h(Fe);
1020
- case "bar":
1021
1020
  return h(Ne);
1022
- case "column":
1021
+ case "bar":
1023
1022
  return h(ke);
1024
- case "polar":
1023
+ case "column":
1025
1024
  return h(qe);
1025
+ case "polar":
1026
+ return h(Be);
1026
1027
  case "pie":
1027
- return l(Be);
1028
- case "funnel":
1029
1028
  return l(Re);
1029
+ case "funnel":
1030
+ return l(je);
1030
1031
  case "treemap":
1031
- return l(Qe);
1032
- case "calendar-heatmap":
1033
1032
  return l(Ue);
1034
- case "sunburst":
1033
+ case "calendar-heatmap":
1035
1034
  return l(ze);
1036
- case "scatter":
1035
+ case "sunburst":
1037
1036
  return l(Ye);
1037
+ case "scatter":
1038
+ return l(Je);
1038
1039
  case "scattermap":
1039
- return l(Ke);
1040
- case "areamap":
1041
1040
  return l(Ve);
1042
- case "boxplot":
1041
+ case "areamap":
1043
1042
  return l(He);
1043
+ case "boxplot":
1044
+ return l(Ze);
1044
1045
  case "table":
1045
- return l(Je);
1046
+ return l(Ke);
1046
1047
  case "pivot":
1047
- return l(je);
1048
+ return l(Qe);
1048
1049
  case "pivot2":
1049
1050
  return {};
1050
1051
  case "image":
@@ -1054,7 +1055,7 @@ function Ze(e) {
1054
1055
  }
1055
1056
  }
1056
1057
  const w = `
1057
- `, P = "UNKNOWN", Ge = (e, t) => {
1058
+ `, P = "UNKNOWN", Xe = (e, t) => {
1058
1059
  let r = "";
1059
1060
  return r += `measureFactory.customFormula(
1060
1061
  `, r += " ".repeat(t), r += ` '${T(e.title)}',
@@ -1066,20 +1067,20 @@ const w = `
1066
1067
  `;
1067
1068
  }), r += " ".repeat(t), r += ` }
1068
1069
  `, r += " ".repeat(t), r += ")", r;
1069
- }, Xe = (e) => {
1070
+ }, et = (e) => {
1070
1071
  const { level: t, table: r, column: a, agg: i, title: s } = e;
1071
1072
  let n;
1072
1073
  return r && a && (n = Z(r, a, t, "DM")), i && r && a && s && (n = `measureFactory.${H.aggregationFromJAQL(i)}(${n}, '${T(s)}')`), n || P;
1073
- }, et = (e, t) => {
1074
+ }, tt = (e, t) => {
1074
1075
  const r = e.jaql(!1).jaql;
1075
- return "formula" in r ? Ge(r, t) : Xe(r);
1076
+ return "formula" in r ? Xe(r, t) : et(r);
1076
1077
  }, g = (e, t = 0, r = !1) => {
1077
1078
  if (!e)
1078
1079
  return "";
1079
1080
  if (typeof e == "string")
1080
1081
  return `'${T(e)}'`;
1081
1082
  if (e instanceof de)
1082
- return et(e, t);
1083
+ return tt(e, t);
1083
1084
  if (e instanceof me)
1084
1085
  return e.composeCode || "";
1085
1086
  let a = "";
@@ -1087,7 +1088,7 @@ const w = `
1087
1088
  if (r && typeof i == "string" && (i = `'${T(i)}'`), a += " ".repeat(t + 2), Array.isArray(s))
1088
1089
  a += `${i}: [${s.map((n) => g(n, t + 4, r))}${s.length ? w + " ".repeat(t + 2) : ""}]`;
1089
1090
  else if (typeof s == "object" && s !== null) {
1090
- const n = Array.isArray(s) ? s : Ce(s);
1091
+ const n = Array.isArray(s) ? s : we(s);
1091
1092
  a += `${i}: ${g(n, t + 2, r)}`;
1092
1093
  } else [
1093
1094
  "number",
@@ -1097,14 +1098,14 @@ const w = `
1097
1098
  a += `,${w}`;
1098
1099
  }), a += " ".repeat(t), a += "}"), a;
1099
1100
  };
1100
- function $(e, t) {
1101
+ function F(e, t) {
1101
1102
  if (t === void 0 || t && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0)
1102
1103
  return e;
1103
1104
  if (!W(e, t)) {
1104
1105
  if (e && typeof e == "object" && !Array.isArray(e)) {
1105
1106
  const r = {};
1106
1107
  for (const a of Object.keys(e)) {
1107
- const i = $(e[a], t == null ? void 0 : t[a]), s = t && Object.prototype.hasOwnProperty.call(t, a), n = s ? t[a] : void 0;
1108
+ const i = F(e[a], t == null ? void 0 : t[a]), s = t && Object.prototype.hasOwnProperty.call(t, a), n = s ? t[a] : void 0;
1108
1109
  (i !== void 0 || !s || e[a] === void 0 && n !== void 0) && (r[a] = i);
1109
1110
  }
1110
1111
  return Object.keys(r).length ? r : void 0;
@@ -1115,73 +1116,73 @@ function $(e, t) {
1115
1116
  function R(e, t) {
1116
1117
  if (!e || Object.keys(e).length === 0)
1117
1118
  return {};
1118
- const r = Ze(t);
1119
+ const r = Ge(t);
1119
1120
  if (W(e, r))
1120
1121
  return {};
1121
- const a = $(e, r);
1122
+ const a = F(e, r);
1122
1123
  return a != null ? a : {};
1123
1124
  }
1124
1125
  function j(e, t) {
1125
- const r = Me(t);
1126
+ const r = Pe(t);
1126
1127
  if (W(e, r))
1127
1128
  return e;
1128
- const a = $(e, r);
1129
+ const a = F(e, r);
1129
1130
  return a != null ? a : {};
1130
1131
  }
1131
- function tt(e) {
1132
- return g(e, I);
1132
+ function rt(e) {
1133
+ return g(e, A);
1133
1134
  }
1134
1135
  function Q(e, t = "data-source-placeholder") {
1135
1136
  if (!e)
1136
1137
  return t;
1137
1138
  const r = typeof e == "object" && "title" in e ? e.title : e;
1138
- return ve(r);
1139
+ return Ee(r);
1139
1140
  }
1140
1141
  function U(e, t = !0) {
1141
1142
  const r = [];
1142
1143
  return t && r.push("measureFactory"), m(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
1143
1144
  }
1144
1145
  const z = `
1145
- `, rt = (e, t) => {
1146
+ `, at = (e, t) => {
1146
1147
  if (e.composeCode)
1147
1148
  return `${z}${" ".repeat(t)}${e.composeCode}`;
1148
1149
  const r = e.jaql().jaql;
1149
1150
  return `${z}${" ".repeat(t)}filterFactory.customFilter(${g(r, t, !0)})`;
1150
- }, at = (e, t = 0) => {
1151
+ }, it = (e, t = 0) => {
1151
1152
  if (!e)
1152
1153
  return "";
1153
1154
  let r = "";
1154
- return r += `[${e.map((a) => rt(a, t + 2))}${e.length ? `
1155
+ return r += `[${e.map((a) => at(a, t + 2))}${e.length ? `
1155
1156
  ` + " ".repeat(t + 2) : ""}]`, r;
1156
- }, Y = (e) => e ? Array.isArray(e) ? at(e, 6) : "/** Filter relations not supported yet */" : "[]", it = [
1157
+ }, Y = (e) => e ? Array.isArray(e) ? it(e, 6) : "/** Filter relations not supported yet */" : "[]", st = [
1157
1158
  "executeQueryByWidgetIdTmpl",
1158
1159
  "widgetByIdTmpl"
1159
- ], st = "chartWidgetTmpl", nt = "pivotTableWidgetTmpl", ot = (e) => e, lt = ({ dashboardOid: e, widgetOid: t, uiFramework: r = "react", chartType: a = "table", includeChart: i = !0 }) => {
1160
+ ], nt = "chartWidgetTmpl", ot = "pivotTableWidgetTmpl", lt = (e) => e, dt = ({ dashboardOid: e, widgetOid: t, uiFramework: r = "react", chartType: a = "table", includeChart: i = !0 }) => {
1160
1161
  G(a);
1161
1162
  const s = {
1162
1163
  dashboardOid: e,
1163
1164
  widgetOid: t
1164
- }, n = it[Number(i)];
1165
+ }, n = st[Number(i)];
1165
1166
  return M(n, s, r);
1166
- }, dt = (e, t, r, a) => {
1167
- if (Oe(e)) {
1167
+ }, ct = (e, t, r, a) => {
1168
+ if (he(e)) {
1168
1169
  G(e.chartType);
1169
1170
  const i = B(e), s = {
1170
1171
  idString: e.id,
1171
1172
  widgetTypeString: "chart",
1172
1173
  titleString: e.title,
1173
1174
  dataSourceString: Q(e.dataSource),
1174
- chartTypeString: ot(e.chartType),
1175
- dataOptionsString: tt(a ? j(e.dataOptions, e.chartType) : e.dataOptions),
1175
+ chartTypeString: lt(e.chartType),
1176
+ dataOptionsString: rt(a ? j(e.dataOptions, e.chartType) : e.dataOptions),
1176
1177
  filtersString: Y(e.filters),
1177
1178
  componentString: "ChartWidget",
1178
1179
  extraImportsString: U(e.filters || [], i),
1179
- styleOptionsString: g(a ? R(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, I),
1180
- drilldownOptionsString: g(e.drilldownOptions || {}, I)
1180
+ styleOptionsString: g(a ? R(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, A),
1181
+ drilldownOptionsString: g(e.drilldownOptions || {}, A)
1181
1182
  };
1182
1183
  return M(r.chart, s, t);
1183
1184
  }
1184
- if (he(e)) {
1185
+ if (be(e)) {
1185
1186
  const i = B(e), s = {
1186
1187
  idString: e.id,
1187
1188
  widgetTypeString: "pivot",
@@ -1191,25 +1192,25 @@ const z = `
1191
1192
  filtersString: Y(e.filters),
1192
1193
  componentString: "PivotTableWidget",
1193
1194
  extraImportsString: U(e.filters || [], i),
1194
- styleOptionsString: g(a ? R(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, I)
1195
+ styleOptionsString: g(a ? R(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, A)
1195
1196
  };
1196
1197
  return M(r.pivot, s, t);
1197
1198
  }
1198
- if (be(e))
1199
+ if (Te(e))
1199
1200
  return "/** Custom widget code not supported yet */";
1200
1201
  throw new b("errors.otherWidgetTypesNotSupported");
1201
- }, ct = ({ widgetProps: e, uiFramework: t = "react", removeDefaultProps: r = !1 }) => dt(e, t, {
1202
- chart: st,
1203
- pivot: nt
1202
+ }, ut = ({ widgetProps: e, uiFramework: t = "react", removeDefaultProps: r = !1 }) => ct(e, t, {
1203
+ chart: nt,
1204
+ pivot: ot
1204
1205
  }, r);
1205
- function ut(e) {
1206
+ function pt(e) {
1206
1207
  return !!(e && (e.top !== void 0 || e.bottom !== void 0));
1207
1208
  }
1208
- const pt = (e) => {
1209
+ const mt = (e) => {
1209
1210
  const t = e.find((r) => r.panel === "rows");
1210
1211
  return t ? e.map((r) => {
1211
1212
  const a = r.jaql.filter;
1212
- if (!(r.panel === "scope" && ut(a) && a.by === void 0))
1213
+ if (!(r.panel === "scope" && pt(a) && a.by === void 0))
1213
1214
  return r;
1214
1215
  const c = r.jaql, { type: s, context: n, formula: u, filter: d } = c, f = q(c, ["type", "context", "formula", "filter"]);
1215
1216
  return p(o({}, r), {
@@ -1230,15 +1231,15 @@ const pt = (e) => {
1230
1231
  }, f)
1231
1232
  });
1232
1233
  }) : e;
1233
- }, _t = (e) => "chartType" in e.chartRecommendations ? e.chartRecommendations : {
1234
+ }, Mt = (e) => "chartType" in e.chartRecommendations ? e.chartRecommendations : {
1234
1235
  chartType: "table",
1235
1236
  chartFamily: "table",
1236
1237
  axesMapping: {}
1237
- }, mt = (e) => ({
1238
+ }, gt = (e) => ({
1238
1239
  dataOptions: {
1239
1240
  columns: e.map(V)
1240
1241
  }
1241
- }), gt = Object.freeze({
1242
+ }), ft = Object.freeze({
1242
1243
  convolution: {
1243
1244
  enabled: !0,
1244
1245
  selectedConvolutionType: "bySlicesCount",
@@ -1264,7 +1265,7 @@ const pt = (e) => {
1264
1265
  pie: "pie/donut",
1265
1266
  bar: "bar/stacked",
1266
1267
  column: "column/stackedcolumn"
1267
- }), ft = (e, t, r) => {
1268
+ }), yt = (e, t, r) => {
1268
1269
  const a = e.reduce((s, n) => (s[n.jaql.title] = n, s), {}), i = Object.entries(r).reduce((s, n) => {
1269
1270
  const [u, d] = n;
1270
1271
  return s[`${u}`] = Array.isArray(d) ? d.map((f) => {
@@ -1317,7 +1318,7 @@ const pt = (e) => {
1317
1318
  s !== "geo" && (i[`${s}`] = i[`${s}`][0]);
1318
1319
  }), i;
1319
1320
  case "table":
1320
- return Object.keys(i).length === 0 ? mt(e).dataOptions : i;
1321
+ return Object.keys(i).length === 0 ? gt(e).dataOptions : i;
1321
1322
  case "boxplot":
1322
1323
  case "areamap":
1323
1324
  case "indicator":
@@ -1327,9 +1328,9 @@ const pt = (e) => {
1327
1328
  }, K = (e, t) => {
1328
1329
  var r, a, i, s;
1329
1330
  return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((n) => _(n).column.name).join(", ") : (s = (i = e.value) != null ? i : e.y) == null ? void 0 : s.map((n) => _(n).column.name).join(", ");
1330
- }, yt = (e, t, r, a) => {
1331
+ }, St = (e, t, r, a) => {
1331
1332
  let i;
1332
- return a && e in J ? i = A(A(gt, {
1333
+ return a && e in J ? i = I(I(ft, {
1333
1334
  subtype: J[`${e}`]
1334
1335
  }), {
1335
1336
  legend: {
@@ -1348,18 +1349,18 @@ const pt = (e) => {
1348
1349
  text: K(t, "x")
1349
1350
  }
1350
1351
  }
1351
- }, r) : i = A(Te(), r), i;
1352
- }, St = (e, t, r = !0) => {
1353
- const { chartFamily: a, chartType: i, axesMapping: s = {}, styleOptions: n = {} } = t, u = ft(e, a, s), d = yt(i, s, n, r);
1352
+ }, r) : i = I(ve(), r), i;
1353
+ }, Ot = (e, t, r = !0) => {
1354
+ const { chartFamily: a, chartType: i, axesMapping: s = {}, styleOptions: n = {} } = t, u = yt(e, a, s), d = St(i, s, n, r);
1354
1355
  return {
1355
1356
  dataOptions: u,
1356
1357
  chartStyleOptions: d
1357
1358
  };
1358
- }, Ot = (e) => "chartType" in e ? e : {
1359
+ }, ht = (e) => "chartType" in e ? e : {
1359
1360
  chartType: "table",
1360
1361
  chartFamily: "table",
1361
1362
  axesMapping: {}
1362
- }, ht = (e) => e.map((t) => fe(t.jaql)), bt = (e) => e.reduce((t, r) => {
1363
+ }, bt = (e) => e.map((t) => fe(t.jaql)), Tt = (e) => e.reduce((t, r) => {
1363
1364
  if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(l(r)), r.panel !== "scope") {
1364
1365
  const a = l(r);
1365
1366
  delete a.jaql.filter, t.metadataColumns.push(a);
@@ -1368,22 +1369,22 @@ const pt = (e) => {
1368
1369
  }, {
1369
1370
  metadataColumns: [],
1370
1371
  metadataFilters: []
1371
- }), Tt = (e, t) => {
1372
- if (!Ee(e))
1372
+ }), vt = (e, t) => {
1373
+ if (!xe(e))
1373
1374
  try {
1374
1375
  const { useCustomizedStyleOptions: r = !1 } = t || {}, { jaql: a, chartRecommendations: i, queryTitle: s } = e, { metadata: n, datasource: u } = a, d = p(o({}, u), {
1375
1376
  type: u.type || "elasticube"
1376
- }), f = ye(d), y = pt(n).map((D) => _e(D)).map((D) => p(o({}, D), {
1377
+ }), f = ye(d), y = mt(n).map((D) => Me(D)).map((D) => p(o({}, D), {
1377
1378
  jaql: p(o({}, D.jaql), {
1378
1379
  datasource: f
1379
1380
  })
1380
- })), S = Ot(i), v = S.chartType.toLowerCase(), E = {
1381
+ })), S = ht(i), v = S.chartType.toLowerCase(), E = {
1381
1382
  cornerRadius: "Small",
1382
1383
  header: {
1383
1384
  // remove info button and render empty toolbar instead
1384
1385
  renderToolbar: () => null
1385
1386
  }
1386
- }, { metadataColumns: x, metadataFilters: te } = bt(y), re = ht(te), { dataOptions: ae, chartStyleOptions: ie } = St(x, S, r), se = o(o({}, ie), E);
1387
+ }, { metadataColumns: x, metadataFilters: te } = Tt(y), re = bt(te), { dataOptions: ae, chartStyleOptions: ie } = Ot(x, S, r), se = o(o({}, ie), E);
1387
1388
  return {
1388
1389
  widgetType: "chart",
1389
1390
  id: s,
@@ -1398,29 +1399,29 @@ const pt = (e) => {
1398
1399
  console.error(r);
1399
1400
  return;
1400
1401
  }
1401
- }, vt = (e, t) => Tt(e, t), Et = (e) => ce(e) ? lt(e) : ct(e), Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1402
+ }, Et = (e, t) => vt(e, t), xt = (e) => ce(e) ? dt(e) : ut(e), Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1402
1403
  __proto__: null,
1403
- toWidgetCode: Et,
1404
- toWidgetProps: vt
1404
+ toWidgetCode: xt,
1405
+ toWidgetProps: Et
1405
1406
  }, Symbol.toStringTag, { value: "Module" }));
1406
1407
  export {
1407
- I as C,
1408
+ A as C,
1408
1409
  M as a,
1409
1410
  B as b,
1410
- Lt as c,
1411
+ At as c,
1411
1412
  Q as d,
1412
1413
  Y as e,
1413
1414
  U as f,
1414
- dt as g,
1415
+ ct as g,
1415
1416
  g as h,
1416
- _e as i,
1417
- _t as j,
1418
- ft as k,
1419
- yt as l,
1420
- St as m,
1421
- Le as p,
1417
+ Me as i,
1418
+ Mt as j,
1419
+ yt as k,
1420
+ St as l,
1421
+ Ot as m,
1422
+ Ae as p,
1422
1423
  It as s,
1423
- vt as t,
1424
- At as v,
1425
- Mt as w
1424
+ Et as t,
1425
+ _t as v,
1426
+ Pt as w
1426
1427
  };