@bikdotai/bik-component-library 0.0.859 → 0.0.860-beta.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 (65) hide show
  1. package/README.md +9 -0
  2. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  3. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js.map +1 -1
  4. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ChartLayout.js +2 -0
  5. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ChartLayout.js.map +1 -0
  6. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js +2 -0
  7. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js.map +1 -0
  8. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.js +50 -0
  9. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.js.map +1 -0
  10. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js +2 -0
  11. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js.map +1 -0
  12. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.js +43 -0
  13. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.js.map +1 -0
  14. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js +2 -0
  15. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js.map +1 -0
  16. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  17. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js.map +1 -1
  18. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  19. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js.map +1 -1
  20. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.js.map +1 -1
  21. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/chartPalette.js +2 -0
  22. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/chartPalette.js.map +1 -0
  23. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/formatChartValue.js +2 -0
  24. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/formatChartValue.js.map +1 -0
  25. package/dist/cjs/index.js +1 -1
  26. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +3 -0
  27. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +182 -172
  28. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js.map +1 -1
  29. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ChartLayout.d.ts +16 -0
  30. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ChartLayout.js +69 -0
  31. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ChartLayout.js.map +1 -0
  32. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.d.ts +3 -0
  33. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js +110 -0
  34. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js.map +1 -0
  35. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.model.d.ts +21 -0
  36. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.d.ts +16 -0
  37. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.js +61 -0
  38. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.js.map +1 -0
  39. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.d.ts +3 -0
  40. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js +109 -0
  41. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js.map +1 -0
  42. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.model.d.ts +19 -0
  43. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.d.ts +16 -0
  44. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.js +54 -0
  45. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.js.map +1 -0
  46. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.d.ts +23 -0
  47. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js +48 -0
  48. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js.map +1 -0
  49. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +16 -15
  50. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js.map +1 -1
  51. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  52. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js.map +1 -1
  53. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +1 -0
  54. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.js.map +1 -1
  55. package/dist/esm/components/analytics-chips-and-dropdowns/chart/chartPalette.d.ts +3 -0
  56. package/dist/esm/components/analytics-chips-and-dropdowns/chart/chartPalette.js +18 -0
  57. package/dist/esm/components/analytics-chips-and-dropdowns/chart/chartPalette.js.map +1 -0
  58. package/dist/esm/components/analytics-chips-and-dropdowns/chart/formatChartValue.d.ts +4 -0
  59. package/dist/esm/components/analytics-chips-and-dropdowns/chart/formatChartValue.js +13 -0
  60. package/dist/esm/components/analytics-chips-and-dropdowns/chart/formatChartValue.js.map +1 -0
  61. package/dist/esm/components/analytics-chips-and-dropdowns/index.d.ts +4 -0
  62. package/dist/esm/icons/index.d.ts +25 -25
  63. package/dist/esm/index.js +383 -379
  64. package/dist/esm/index.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,87 +1,89 @@
1
- import { jsx as t, jsxs as s, Fragment as Y } from "react/jsx-runtime";
2
- import Z, { useState as O, useEffect as U } from "react";
3
- import { ShimmerComponentStyled as k } from "../shimmer/ShimmerComponent/ShimmerStyled.js";
4
- import P from "../../utils/DateUtils.js";
5
- import { COLORS as l } from "../../constants/Theme.js";
6
- import tt from "../../assets/icons/arrow_down.svg.js";
7
- import et from "../../assets/icons/arrow_up.svg.js";
8
- import rt from "../../assets/icons/info.svg.js";
9
- import { BodyCaption as nt, TitleLarge as ot, TitleMedium as it, Caption as u } from "../TypographyStyle.js";
10
- import { truncateValueForInternationalStore as q, truncateValueForIndianStore as B } from "./chart/utils/calcPercentage.js";
11
- import { AnalyticsTrendContainer as lt, IconContainer as at } from "./CommonStyles.js";
12
- import { Tooltip as V } from "../tooltips/Tooltip.js";
13
- import { Tag as C } from "../tag/Tag.js";
14
- const wt = ({
15
- title: h,
16
- value: r,
17
- trendPercent: e,
1
+ import { jsx as t, jsxs as f, Fragment as P } from "react/jsx-runtime";
2
+ import tt, { useState as _, useEffect as q } from "react";
3
+ import { ShimmerComponentStyled as V } from "../shimmer/ShimmerComponent/ShimmerStyled.js";
4
+ import et from "../../utils/DateUtils.js";
5
+ import { COLORS as i } from "../../constants/Theme.js";
6
+ import rt from "../../assets/icons/arrow_down.svg.js";
7
+ import nt from "../../assets/icons/arrow_up.svg.js";
8
+ import ot from "../../assets/icons/info.svg.js";
9
+ import { BodyCaption as it, TitleLarge as lt, TitleMedium as at, Caption as m } from "../TypographyStyle.js";
10
+ import { truncateValueForInternationalStore as G, truncateValueForIndianStore as H } from "./chart/utils/calcPercentage.js";
11
+ import { AnalyticsTrendContainer as dt, IconContainer as ct } from "./CommonStyles.js";
12
+ import { Tooltip as z } from "../tooltips/Tooltip.js";
13
+ import { Tag as x } from "../tag/Tag.js";
14
+ const Tt = ({
15
+ title: c,
16
+ value: n,
17
+ trendPercent: r,
18
18
  type: a = "horizontal",
19
- timeline: n,
20
- customRange: f,
21
- tooltip: b,
22
- card: y = !0,
23
- rightSeparator: D = !1,
24
- size: $ = "big",
25
- share: o = !1,
19
+ timeline: o,
20
+ customRange: y,
21
+ tooltip: u,
22
+ tooltipPlacement: T = "right",
23
+ tooltipWidth: C = 300,
24
+ card: h = !0,
25
+ rightSeparator: s = !1,
26
+ size: D = "big",
27
+ share: l = !1,
26
28
  formatVal: A,
27
29
  prefixSymbol: d,
28
- trailingIcon: v,
30
+ trailingIcon: p,
29
31
  onTrailIconClick: M,
30
- iconTooltipBody: p,
31
- funnelPercent: w,
32
- isLoading: i,
33
- trendRaw: g,
34
- trendRawString: c,
35
- suffixText: m,
36
- trendStyle: G,
37
- trendContainerStyle: H,
38
- trendIconStyle: z,
39
- containerStyle: J,
40
- prevTrendDiff: F,
41
- relativePercentageDiff: N,
42
- isInternationalStore: I,
43
- Icon: x,
44
- iconContainerStyle: K,
45
- tooltipTimelineText: S,
46
- customTimelineText: W
32
+ iconTooltipBody: b,
33
+ funnelPercent: g,
34
+ isLoading: e,
35
+ trendRaw: F,
36
+ trendRawString: N,
37
+ suffixText: $,
38
+ trendStyle: J,
39
+ trendContainerStyle: K,
40
+ trendIconStyle: S,
41
+ containerStyle: L,
42
+ prevTrendDiff: I,
43
+ relativePercentageDiff: W,
44
+ isInternationalStore: j,
45
+ Icon: v,
46
+ iconContainerStyle: Q,
47
+ tooltipTimelineText: E,
48
+ customTimelineText: O
47
49
  }) => {
48
- const L = $ === "big" ? ot : it, E = typeof e < "u" ? e < 0 ? "negative" : e === 0 ? "neutral" : "positive" : void 0, T = typeof e < "u" ? o ? Math.round(e) : Math.abs(Math.round(e)) : void 0, Q = () => typeof r > "u" ? "--" : typeof r == "number" && A ? r > 999 ? I ? `${d ?? ""}${q(
49
- r
50
- )} ${m ?? ""}` : `${d ?? ""}${B(
51
- r
52
- )} ${m ?? ""}` : `${d ?? ""}${new Intl.NumberFormat("en-IN", {
50
+ const R = D === "big" ? lt : at, U = typeof r < "u" ? r < 0 ? "negative" : r === 0 ? "neutral" : "positive" : void 0, w = typeof r < "u" ? l ? Math.round(r) : Math.abs(Math.round(r)) : void 0, X = () => typeof n > "u" ? "--" : typeof n == "number" && A ? n > 999 ? j ? `${d ?? ""}${G(
51
+ n
52
+ )} ${$ ?? ""}` : `${d ?? ""}${H(
53
+ n
54
+ )} ${$ ?? ""}` : `${d ?? ""}${new Intl.NumberFormat("en-IN", {
53
55
  maximumFractionDigits: 2
54
- }).format(r)} ${m ?? ""}` : `${d ?? ""}${r} ${m ?? ""}`, R = (X) => {
55
- const j = Math.abs(X);
56
- return j % 1 !== 0 ? `${j.toFixed(1)} %` : `${j} %`;
56
+ }).format(n)} ${$ ?? ""}` : `${d ?? ""}${n} ${$ ?? ""}`, Y = (Z) => {
57
+ const k = Math.abs(Z);
58
+ return k % 1 !== 0 ? `${k.toFixed(1)} %` : `${k} %`;
57
59
  };
58
60
  return /* @__PURE__ */ t(
59
- lt,
61
+ dt,
60
62
  {
61
- card: y,
63
+ card: h,
62
64
  style: {
63
- ...J
65
+ ...L
64
66
  },
65
- children: /* @__PURE__ */ s(
67
+ children: /* @__PURE__ */ f(
66
68
  "div",
67
69
  {
68
70
  style: {
69
71
  display: "flex",
70
72
  flexDirection: "row",
71
- gap: x ? 12 : 4,
72
- borderRightWidth: D ? 1 : 0,
73
- borderRightColor: l.stroke.primary,
73
+ gap: v ? 12 : 4,
74
+ borderRightWidth: s ? 1 : 0,
75
+ borderRightColor: i.stroke.primary,
74
76
  borderRightStyle: "solid",
75
- paddingLeft: y ? 0 : 24,
76
- paddingRight: y ? 0 : 24,
77
+ paddingLeft: h ? 0 : 24,
78
+ paddingRight: h ? 0 : 24,
77
79
  height: "100%",
78
- justifyContent: x ? "flex-start" : "space-between",
80
+ justifyContent: v ? "flex-start" : "space-between",
79
81
  alignItems: "center",
80
- ...H ?? {}
82
+ ...K ?? {}
81
83
  },
82
84
  children: [
83
- !!x && /* @__PURE__ */ t(at, { style: { ...K }, children: /* @__PURE__ */ t(x, {}) }),
84
- /* @__PURE__ */ s(
85
+ !!v && /* @__PURE__ */ t(ct, { style: { ...Q }, children: /* @__PURE__ */ t(v, {}) }),
86
+ /* @__PURE__ */ f(
85
87
  "div",
86
88
  {
87
89
  style: {
@@ -89,10 +91,10 @@ const wt = ({
89
91
  flexDirection: "column",
90
92
  gap: 4,
91
93
  height: "100%",
92
- ...G ?? {}
94
+ ...J ?? {}
93
95
  },
94
96
  children: [
95
- /* @__PURE__ */ s(
97
+ /* @__PURE__ */ f(
96
98
  "div",
97
99
  {
98
100
  style: {
@@ -103,36 +105,44 @@ const wt = ({
103
105
  },
104
106
  children: [
105
107
  /* @__PURE__ */ t(
106
- nt,
108
+ it,
107
109
  {
108
110
  style: {
109
- color: l.content.secondary
111
+ color: i.content.secondary
110
112
  },
111
- children: h
113
+ children: c
112
114
  }
113
115
  ),
114
- b && /* @__PURE__ */ t(V, { body: b, placement: "right", width: 300, children: /* @__PURE__ */ t(
115
- "div",
116
+ u && /* @__PURE__ */ t(
117
+ z,
116
118
  {
117
- style: {
118
- display: "flex",
119
- cursor: "pointer",
120
- height: "100%"
121
- },
119
+ body: u,
120
+ placement: T,
121
+ width: C,
122
122
  children: /* @__PURE__ */ t(
123
- rt,
123
+ "div",
124
124
  {
125
- color: l.content.primary,
126
- height: 16,
127
- width: 16
125
+ style: {
126
+ display: "flex",
127
+ cursor: "pointer",
128
+ height: "100%"
129
+ },
130
+ children: /* @__PURE__ */ t(
131
+ ot,
132
+ {
133
+ color: i.content.primary,
134
+ height: 16,
135
+ width: 16
136
+ }
137
+ )
128
138
  }
129
139
  )
130
140
  }
131
- ) })
141
+ )
132
142
  ]
133
143
  }
134
144
  ),
135
- /* @__PURE__ */ s(
145
+ /* @__PURE__ */ f(
136
146
  "div",
137
147
  {
138
148
  style: {
@@ -140,94 +150,94 @@ const wt = ({
140
150
  flexDirection: "row",
141
151
  gap: 12,
142
152
  alignItems: "center",
143
- ...o ? { justifyContent: "space-between" } : {}
153
+ ...l ? { justifyContent: "space-between" } : {}
144
154
  },
145
155
  children: [
146
- i && /* @__PURE__ */ t(k, { width: 108, height: 26 }),
147
- !i && /* @__PURE__ */ t(
148
- L,
156
+ e && /* @__PURE__ */ t(V, { width: 108, height: 26 }),
157
+ !e && /* @__PURE__ */ t(
158
+ R,
149
159
  {
150
160
  style: {
151
- color: l.content.primary
161
+ color: i.content.primary
152
162
  },
153
- children: Q()
163
+ children: X()
154
164
  }
155
165
  ),
156
- typeof N == "number" && /* @__PURE__ */ t(
157
- C,
166
+ typeof W == "number" && /* @__PURE__ */ t(
167
+ x,
158
168
  {
159
- tagText: `${N}%`,
169
+ tagText: `${W}%`,
160
170
  theme: "light",
161
171
  type: "neutral"
162
172
  }
163
173
  ),
164
- a === "horizontal" && !i && !o && /* @__PURE__ */ t(
165
- _,
174
+ a === "horizontal" && !e && !l && /* @__PURE__ */ t(
175
+ B,
166
176
  {
167
- timeline: n,
168
- customRange: f,
169
- percent: T,
170
- direction: E,
171
- trendRaw: g,
172
- trendRawString: c,
177
+ timeline: o,
178
+ customRange: y,
179
+ percent: w,
180
+ direction: U,
181
+ trendRaw: F,
182
+ trendRawString: N,
173
183
  prefixSymbol: d,
174
- trendIconStyle: z,
175
- isInternationalStore: I,
176
- tooltipTimelineText: S,
177
- customTimelineText: W
184
+ trendIconStyle: S,
185
+ isInternationalStore: j,
186
+ tooltipTimelineText: E,
187
+ customTimelineText: O
178
188
  }
179
189
  ),
180
- i && !o && a === "horizontal" && /* @__PURE__ */ t(k, { height: 20, width: 141, marginTop: 6 }),
181
- a === "vertical" && !i && typeof w < "u" && /* @__PURE__ */ t(
182
- C,
190
+ e && !l && a === "horizontal" && /* @__PURE__ */ t(V, { height: 20, width: 141, marginTop: 6 }),
191
+ a === "vertical" && !e && typeof g < "u" && /* @__PURE__ */ t(
192
+ x,
183
193
  {
184
- tagText: `${w} %`,
194
+ tagText: `${g} %`,
185
195
  theme: "light",
186
196
  type: "neutral"
187
197
  }
188
198
  ),
189
- o && !i && typeof T < "u" && /* @__PURE__ */ t(C, { tagText: `${T} %`, theme: "light", type: "neutral" }),
190
- !o && !i && F && F != 0 ? /* @__PURE__ */ t(
191
- C,
199
+ l && !e && typeof w < "u" && /* @__PURE__ */ t(x, { tagText: `${w} %`, theme: "light", type: "neutral" }),
200
+ !l && !e && I && I != 0 ? /* @__PURE__ */ t(
201
+ x,
192
202
  {
193
- tagText: R(F),
203
+ tagText: Y(I),
194
204
  theme: "light",
195
205
  type: "neutral"
196
206
  }
197
- ) : /* @__PURE__ */ t(Y, {})
207
+ ) : /* @__PURE__ */ t(P, {})
198
208
  ]
199
209
  }
200
210
  ),
201
- a === "vertical" && !i && !o && /* @__PURE__ */ t("div", { style: { marginTop: 10 }, children: /* @__PURE__ */ t(
202
- _,
211
+ a === "vertical" && !e && !l && /* @__PURE__ */ t("div", { style: { marginTop: 10 }, children: /* @__PURE__ */ t(
212
+ B,
203
213
  {
204
- timeline: n,
205
- customRange: f,
206
- percent: T,
207
- direction: E,
208
- trendRaw: g,
209
- trendRawString: c,
214
+ timeline: o,
215
+ customRange: y,
216
+ percent: w,
217
+ direction: U,
218
+ trendRaw: F,
219
+ trendRawString: N,
210
220
  prefixSymbol: d,
211
- trendIconStyle: z,
212
- isInternationalStore: I,
213
- tooltipTimelineText: S,
214
- customTimelineText: W
221
+ trendIconStyle: S,
222
+ isInternationalStore: j,
223
+ tooltipTimelineText: E,
224
+ customTimelineText: O
215
225
  }
216
226
  ) }),
217
- i && a === "vertical" && /* @__PURE__ */ t(k, { height: 20, width: 141, marginTop: 6 })
227
+ e && a === "vertical" && /* @__PURE__ */ t(V, { height: 20, width: 141, marginTop: 6 })
218
228
  ]
219
229
  }
220
230
  ),
221
- p && !i && /* @__PURE__ */ t(V, { body: p, placement: "right", children: v && /* @__PURE__ */ t(
231
+ b && !e && /* @__PURE__ */ t(z, { body: b, placement: "right", children: p && /* @__PURE__ */ t(
222
232
  "div",
223
233
  {
224
234
  "data-test": "analytics-trend-trailing-icon",
225
235
  className: "icon--holder",
226
236
  onClick: M,
227
- children: Z.createElement(v, {
237
+ children: tt.createElement(p, {
228
238
  height: 20,
229
239
  width: 20,
230
- color: l.content.secondary
240
+ color: i.content.secondary
231
241
  })
232
242
  }
233
243
  ) })
@@ -236,42 +246,42 @@ const wt = ({
236
246
  )
237
247
  }
238
248
  );
239
- }, _ = ({
240
- percent: h,
241
- direction: r,
242
- timeline: e,
249
+ }, B = ({
250
+ percent: c,
251
+ direction: n,
252
+ timeline: r,
243
253
  customRange: a,
244
- trendRaw: n,
245
- trendRawString: f,
246
- prefixSymbol: b,
247
- trendIconStyle: y,
248
- isInternationalStore: D,
249
- tooltipTimelineText: $,
250
- customTimelineText: o
254
+ trendRaw: o,
255
+ trendRawString: y,
256
+ prefixSymbol: u,
257
+ trendIconStyle: T,
258
+ isInternationalStore: C,
259
+ tooltipTimelineText: h,
260
+ customTimelineText: s
251
261
  }) => {
252
- const A = () => {
253
- let c = "--";
254
- if (n)
255
- return D ? c = String(
256
- q(Math.abs(n))
257
- ) : c = String(B(Math.abs(n))), n < 0 ? "-" + c : c;
258
- }, d = () => {
259
- const c = ((n ?? 0) > 0 ? "+" : "") + (b ?? "");
260
- return typeof n > "u" ? "--" : `${c ?? ""}${A()}`;
261
- }, [v, M] = O(
262
- d()
263
- ), [p, w] = O(
264
- o || ""
262
+ const D = () => {
263
+ let e = "--";
264
+ if (o)
265
+ return C ? e = String(
266
+ G(Math.abs(o))
267
+ ) : e = String(H(Math.abs(o))), o < 0 ? "-" + e : e;
268
+ }, l = () => {
269
+ const e = ((o ?? 0) > 0 ? "+" : "") + (u ?? "");
270
+ return typeof o > "u" ? "--" : `${e ?? ""}${D()}`;
271
+ }, [A, d] = _(
272
+ l()
273
+ ), [p, M] = _(
274
+ s || ""
265
275
  );
266
- U(() => {
267
- o || w(
268
- e === "today" ? "vs yesterday" : e === "yesterday" ? "vs 1 day before" : e === "7 days" ? "vs last 7 days" : e === "30 days" ? "vs last 30 days" : e === "custom" && a ? P.getAnalyticsCustomDateTimelineText(a) : ""
276
+ q(() => {
277
+ s || M(
278
+ r === "today" ? "vs yesterday" : r === "yesterday" ? "vs 1 day before" : r === "7 days" ? "vs last 7 days" : r === "30 days" ? "vs last 30 days" : r === "custom" && a ? et.getAnalyticsCustomDateTimelineText(a) : ""
269
279
  );
270
- }, [e, a]), U(() => {
271
- M(d());
272
- }, [n]);
273
- const i = r === "negative" ? tt : et, g = r === "negative" ? l.background.negative.vibrant : r === "positive" ? l.background.positive.vibrant : l.content.placeholder;
274
- return /* @__PURE__ */ s(
280
+ }, [r, a]), q(() => {
281
+ d(l());
282
+ }, [o]);
283
+ const b = n === "negative" ? rt : nt, g = n === "negative" ? i.background.negative.vibrant : n === "positive" ? i.background.positive.vibrant : i.content.placeholder;
284
+ return /* @__PURE__ */ f(
275
285
  "div",
276
286
  {
277
287
  style: {
@@ -281,33 +291,33 @@ const wt = ({
281
291
  flexWrap: "wrap"
282
292
  },
283
293
  children: [
284
- typeof h == "number" && /* @__PURE__ */ t(
285
- i,
294
+ typeof c == "number" && /* @__PURE__ */ t(
295
+ b,
286
296
  {
287
297
  color: g,
288
298
  height: 16,
289
299
  width: 16,
290
- style: { marginRight: 2, ...y ?? {} }
300
+ style: { marginRight: 2, ...T ?? {} }
291
301
  }
292
302
  ),
293
- typeof h == "number" && r && /* @__PURE__ */ s(u, { style: { color: g }, children: [
294
- r === "neutral" ? 0 : h < 1e3 ? h : ">999",
303
+ typeof c == "number" && n && /* @__PURE__ */ f(m, { style: { color: g }, children: [
304
+ n === "neutral" ? 0 : c < 1e3 ? c : ">999",
295
305
  "%"
296
306
  ] }),
297
- !!n && /* @__PURE__ */ t(u, { style: { marginLeft: 4, color: l.content.placeholder }, children: `(${v})` }),
298
- !n && (f?.length || 0) > 0 && /* @__PURE__ */ t(u, { style: { marginLeft: 4, color: l.content.placeholder }, children: `${f}` }),
299
- e && ($ ? /* @__PURE__ */ t(V, { body: $, placement: "bottom", children: /* @__PURE__ */ t(
300
- u,
307
+ !!o && /* @__PURE__ */ t(m, { style: { marginLeft: 4, color: i.content.placeholder }, children: `(${A})` }),
308
+ !o && (y?.length || 0) > 0 && /* @__PURE__ */ t(m, { style: { marginLeft: 4, color: i.content.placeholder }, children: `${y}` }),
309
+ r && (h ? /* @__PURE__ */ t(z, { body: h, placement: "bottom", children: /* @__PURE__ */ t(
310
+ m,
301
311
  {
302
- style: { marginLeft: 4, color: l.content.placeholder },
303
- children: o || p
312
+ style: { marginLeft: 4, color: i.content.placeholder },
313
+ children: s || p
304
314
  }
305
- ) }) : /* @__PURE__ */ t(u, { style: { marginLeft: 4, color: l.content.placeholder }, children: o || p }))
315
+ ) }) : /* @__PURE__ */ t(m, { style: { marginLeft: 4, color: i.content.placeholder }, children: s || p }))
306
316
  ]
307
317
  }
308
318
  );
309
319
  };
310
320
  export {
311
- wt as AnalyticsTrend
321
+ Tt as AnalyticsTrend
312
322
  };
313
323
  //# sourceMappingURL=AnalyticsTrend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsTrend.js","sources":["../../../../src/components/analytics-chips-and-dropdowns/AnalyticsTrend.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { ShimmerComponentStyled } from '@src/components/shimmer/ShimmerComponent/ShimmerStyled';\nimport DateUtils from '@src/utils/DateUtils';\nimport { COLORS } from '@src/constants/Theme';\nimport DownArrowIcon from '../../assets/icons/arrow_down.svg';\nimport UpArrowIcon from '../../assets/icons/arrow_up.svg';\nimport InfoIcon from '../../assets/icons/info.svg';\nimport { Tag } from '../tag';\nimport { Tooltip } from '../tooltips';\nimport {\n\tBodyCaption,\n\tCaption,\n\tTitleLarge,\n\tTitleMedium,\n} from '../TypographyStyle';\nimport {\n\ttruncateValueForIndianStore,\n\ttruncateValueForInternationalStore,\n} from './chart/utils/calcPercentage';\nimport { AnalyticsTrendContainer, IconContainer } from './CommonStyles';\n\nexport interface AnalyticsTrendInterface {\n\ttitle: string;\n\tvalue?: number | string;\n\ttrendPercent?: number;\n\ttrendRaw?: number;\n\ttrendRawString?: string;\n\tformatVal?: boolean;\n\ttimeline?: 'today' | 'yesterday' | '7 days' | '30 days' | 'custom';\n\tcustomRange?: Date[];\n\ttype?: 'vertical' | 'horizontal';\n\ttooltip?: string;\n\tcard?: boolean;\n\trightSeparator?: boolean;\n\tsize?: 'big' | 'small';\n\tshare?: boolean;\n\tprefixSymbol?: string;\n\ttrailingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\tonTrailIconClick?: () => void;\n\ticonTooltipBody?: string;\n\tfunnelPercent?: number;\n\tisLoading?: boolean;\n\tsuffixText?: string;\n\ttrendStyle?: React.CSSProperties;\n\ticonContainerStyle?: React.CSSProperties;\n\ttrendContainerStyle?: React.CSSProperties;\n\ttrendIconStyle?: React.CSSProperties;\n\tcontainerStyle?: React.CSSProperties;\n\tprevTrendDiff?: number;\n\trelativePercentageDiff?: number;\n\tisInternationalStore?: boolean;\n\tIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\ttooltipTimelineText?: string;\n\tcustomTimelineText?: string;\n}\nexport const AnalyticsTrend: React.FC<AnalyticsTrendInterface> = ({\n\ttitle,\n\tvalue,\n\ttrendPercent,\n\ttype = 'horizontal',\n\ttimeline,\n\tcustomRange,\n\ttooltip,\n\tcard = true,\n\trightSeparator = false,\n\tsize = 'big',\n\tshare = false,\n\tformatVal,\n\tprefixSymbol,\n\ttrailingIcon,\n\tonTrailIconClick,\n\ticonTooltipBody,\n\tfunnelPercent,\n\tisLoading,\n\ttrendRaw,\n\ttrendRawString,\n\tsuffixText,\n\ttrendStyle,\n\ttrendContainerStyle,\n\ttrendIconStyle,\n\tcontainerStyle,\n\tprevTrendDiff,\n\trelativePercentageDiff,\n\tisInternationalStore,\n\tIcon,\n\ticonContainerStyle,\n\ttooltipTimelineText,\n\tcustomTimelineText,\n}) => {\n\tconst ValueTypo = size === 'big' ? TitleLarge : TitleMedium;\n\tconst trendDirection =\n\t\ttypeof trendPercent !== 'undefined'\n\t\t\t? trendPercent < 0\n\t\t\t\t? 'negative'\n\t\t\t\t: trendPercent === 0\n\t\t\t\t? 'neutral'\n\t\t\t\t: 'positive'\n\t\t\t: undefined;\n\n\tconst percent =\n\t\ttypeof trendPercent !== 'undefined'\n\t\t\t? share\n\t\t\t\t? Math.round(trendPercent)\n\t\t\t\t: Math.abs(Math.round(trendPercent))\n\t\t\t: undefined;\n\n\tconst getDisplayValue = () => {\n\t\tif (typeof value === 'undefined') {\n\t\t\treturn '--';\n\t\t}\n\n\t\tif (typeof value === 'number') {\n\t\t\tif (formatVal) {\n\t\t\t\tif (value > 999) {\n\t\t\t\t\tif (isInternationalStore) {\n\t\t\t\t\t\treturn `${prefixSymbol ?? ''}${truncateValueForInternationalStore(\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t)} ${suffixText ?? ''}`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn `${prefixSymbol ?? ''}${truncateValueForIndianStore(\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t)} ${suffixText ?? ''}`;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn `${prefixSymbol ?? ''}${new Intl.NumberFormat('en-IN', {\n\t\t\t\t\t\tmaximumFractionDigits: 2,\n\t\t\t\t\t}).format(value)} ${suffixText ?? ''}`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn `${prefixSymbol ?? ''}${value} ${suffixText ?? ''}`;\n\t};\n\n\tconst formatTrendDiff = (trendDiff: number) => {\n\t\tconst diff = Math.abs(trendDiff);\n\t\tif (diff % 1 !== 0) {\n\t\t\treturn `${diff.toFixed(1)} %`;\n\t\t}\n\t\treturn `${diff} %`;\n\t};\n\n\treturn (\n\t\t<AnalyticsTrendContainer\n\t\t\tcard={card}\n\t\t\tstyle={{\n\t\t\t\t...containerStyle,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\tgap: Icon ? 12 : 4,\n\t\t\t\t\tborderRightWidth: rightSeparator ? 1 : 0,\n\t\t\t\t\tborderRightColor: COLORS.stroke.primary,\n\t\t\t\t\tborderRightStyle: 'solid',\n\t\t\t\t\tpaddingLeft: !card ? 24 : 0,\n\t\t\t\t\tpaddingRight: !card ? 24 : 0,\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tjustifyContent: Icon ? 'flex-start' : 'space-between',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t...(trendContainerStyle ?? {}),\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!!Icon && (\n\t\t\t\t\t<IconContainer style={{ ...iconContainerStyle }}>\n\t\t\t\t\t\t<Icon />\n\t\t\t\t\t</IconContainer>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t...(trendStyle ?? {}),\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tcolor: COLORS.content.secondary,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</BodyCaption>\n\n\t\t\t\t\t\t{tooltip && (\n\t\t\t\t\t\t\t<Tooltip body={tooltip} placement={'right'} width={300}>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<InfoIcon\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.primary}\n\t\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tgap: 12,\n\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t...(share ? { justifyContent: 'space-between' } : {}),\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isLoading && <ShimmerComponentStyled width={108} height={26} />}\n\t\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t\t<ValueTypo\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tcolor: COLORS.content.primary,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{getDisplayValue()}\n\t\t\t\t\t\t\t</ValueTypo>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{typeof relativePercentageDiff === 'number' && (\n\t\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t\ttagText={`${relativePercentageDiff}%`}\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttype=\"neutral\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{type === 'horizontal' && !isLoading && !share && (\n\t\t\t\t\t\t\t<Trend\n\t\t\t\t\t\t\t\ttimeline={timeline}\n\t\t\t\t\t\t\t\tcustomRange={customRange}\n\t\t\t\t\t\t\t\tpercent={percent}\n\t\t\t\t\t\t\t\tdirection={trendDirection}\n\t\t\t\t\t\t\t\ttrendRaw={trendRaw}\n\t\t\t\t\t\t\t\ttrendRawString={trendRawString}\n\t\t\t\t\t\t\t\tprefixSymbol={prefixSymbol}\n\t\t\t\t\t\t\t\ttrendIconStyle={trendIconStyle}\n\t\t\t\t\t\t\t\tisInternationalStore={isInternationalStore}\n\t\t\t\t\t\t\t\ttooltipTimelineText={tooltipTimelineText}\n\t\t\t\t\t\t\t\tcustomTimelineText={customTimelineText}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{isLoading && !share && type === 'horizontal' && (\n\t\t\t\t\t\t\t<ShimmerComponentStyled height={20} width={141} marginTop={6} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{type === 'vertical' &&\n\t\t\t\t\t\t\t!isLoading &&\n\t\t\t\t\t\t\ttypeof funnelPercent !== 'undefined' && (\n\t\t\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t\t\ttagText={`${funnelPercent} %`}\n\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\ttype=\"neutral\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t{share && !isLoading && typeof percent !== 'undefined' && (\n\t\t\t\t\t\t\t<Tag tagText={`${percent} %`} theme=\"light\" type=\"neutral\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!share && !isLoading && prevTrendDiff && prevTrendDiff != 0 ? (\n\t\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t\ttagText={formatTrendDiff(prevTrendDiff)}\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttype=\"neutral\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<></>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t{type === 'vertical' && !isLoading && !share && (\n\t\t\t\t\t\t<div style={{ marginTop: 10 }}>\n\t\t\t\t\t\t\t<Trend\n\t\t\t\t\t\t\t\ttimeline={timeline}\n\t\t\t\t\t\t\t\tcustomRange={customRange}\n\t\t\t\t\t\t\t\tpercent={percent}\n\t\t\t\t\t\t\t\tdirection={trendDirection}\n\t\t\t\t\t\t\t\ttrendRaw={trendRaw}\n\t\t\t\t\t\t\t\ttrendRawString={trendRawString}\n\t\t\t\t\t\t\t\tprefixSymbol={prefixSymbol}\n\t\t\t\t\t\t\t\ttrendIconStyle={trendIconStyle}\n\t\t\t\t\t\t\t\tisInternationalStore={isInternationalStore}\n\t\t\t\t\t\t\t\ttooltipTimelineText={tooltipTimelineText}\n\t\t\t\t\t\t\t\tcustomTimelineText={customTimelineText}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{isLoading && type === 'vertical' && (\n\t\t\t\t\t\t<ShimmerComponentStyled height={20} width={141} marginTop={6} />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{iconTooltipBody && !isLoading && (\n\t\t\t\t\t<Tooltip body={iconTooltipBody} placement={'right'}>\n\t\t\t\t\t\t{trailingIcon && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tdata-test=\"analytics-trend-trailing-icon\"\n\t\t\t\t\t\t\t\tclassName={'icon--holder'}\n\t\t\t\t\t\t\t\tonClick={onTrailIconClick}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{React.createElement(trailingIcon, {\n\t\t\t\t\t\t\t\t\theight: 20,\n\t\t\t\t\t\t\t\t\twidth: 20,\n\t\t\t\t\t\t\t\t\tcolor: COLORS.content.secondary,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Tooltip>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</AnalyticsTrendContainer>\n\t);\n};\n\nconst Trend: React.FC<{\n\tpercent?: number;\n\tdirection?: 'positive' | 'negative' | 'neutral';\n\ttimeline?: AnalyticsTrendInterface['timeline'];\n\tcustomRange?: AnalyticsTrendInterface['customRange'];\n\ttrendRaw?: number;\n\ttrendRawString?: string;\n\tprefixSymbol?: string;\n\ttrendIconStyle?: React.CSSProperties;\n\tisInternationalStore?: boolean;\n\ttooltipTimelineText?: string;\n\tcustomTimelineText?: string;\n}> = ({\n\tpercent,\n\tdirection,\n\ttimeline,\n\tcustomRange,\n\ttrendRaw,\n\ttrendRawString,\n\tprefixSymbol,\n\ttrendIconStyle,\n\tisInternationalStore,\n\ttooltipTimelineText,\n\tcustomTimelineText,\n}) => {\n\tconst getTrendRawAbs = () => {\n\t\tlet trendRawAbs = '--';\n\t\tif (trendRaw) {\n\t\t\tif (isInternationalStore) {\n\t\t\t\ttrendRawAbs = String(\n\t\t\t\t\ttruncateValueForInternationalStore(Math.abs(trendRaw)),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\ttrendRawAbs = String(truncateValueForIndianStore(Math.abs(trendRaw)));\n\t\t\t}\n\t\t\tif (trendRaw < 0) {\n\t\t\t\treturn '-' + trendRawAbs;\n\t\t\t} else {\n\t\t\t\treturn trendRawAbs;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst generateTrendRawText = () => {\n\t\tconst prefixWithSign =\n\t\t\t((trendRaw ?? 0) > 0 ? '+' : '') + (prefixSymbol ?? '');\n\t\tconst trendRawTextInitial =\n\t\t\ttypeof trendRaw === 'undefined'\n\t\t\t\t? '--'\n\t\t\t\t: `${prefixWithSign ?? ''}${getTrendRawAbs()}`;\n\t\treturn trendRawTextInitial;\n\t};\n\n\tconst [trendRawText, setTrendRawText] = useState<string>(\n\t\tgenerateTrendRawText(),\n\t);\n\tconst [timeLineText, setTimeLineText] = useState<string>(\n\t\tcustomTimelineText || '',\n\t);\n\n\tuseEffect(() => {\n\t\tif (customTimelineText) {\n\t\t\treturn;\n\t\t}\n\t\tsetTimeLineText(\n\t\t\ttimeline === 'today'\n\t\t\t\t? 'vs yesterday'\n\t\t\t\t: timeline === 'yesterday'\n\t\t\t\t? 'vs 1 day before'\n\t\t\t\t: timeline === '7 days'\n\t\t\t\t? 'vs last 7 days'\n\t\t\t\t: timeline === '30 days'\n\t\t\t\t? 'vs last 30 days'\n\t\t\t\t: timeline === 'custom' && customRange\n\t\t\t\t? DateUtils.getAnalyticsCustomDateTimelineText(customRange)\n\t\t\t\t: '',\n\t\t);\n\t}, [timeline, customRange]);\n\n\tuseEffect(() => {\n\t\tsetTrendRawText(generateTrendRawText());\n\t}, [trendRaw]);\n\n\tconst TrendIcon = direction === 'negative' ? DownArrowIcon : UpArrowIcon;\n\n\tconst color =\n\t\tdirection === 'negative'\n\t\t\t? COLORS.background.negative.vibrant\n\t\t\t: direction === 'positive'\n\t\t\t? COLORS.background.positive.vibrant\n\t\t\t: COLORS.content.placeholder;\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\talignItems: 'center',\n\t\t\t\tflexDirection: 'row',\n\t\t\t\tflexWrap: 'wrap',\n\t\t\t}}\n\t\t>\n\t\t\t{typeof percent === 'number' && (\n\t\t\t\t<TrendIcon\n\t\t\t\t\tcolor={color}\n\t\t\t\t\theight={16}\n\t\t\t\t\twidth={16}\n\t\t\t\t\tstyle={{ marginRight: 2, ...(trendIconStyle ?? {}) }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{typeof percent === 'number' && direction && (\n\t\t\t\t<Caption style={{ color }}>\n\t\t\t\t\t{direction === 'neutral' ? 0 : percent < 1000 ? percent : '>999'}\n\t\t\t\t\t{'%'}\n\t\t\t\t</Caption>\n\t\t\t)}\n\t\t\t{!!trendRaw && (\n\t\t\t\t<Caption style={{ marginLeft: 4, color: COLORS.content.placeholder }}>\n\t\t\t\t\t{`(${trendRawText})`}\n\t\t\t\t</Caption>\n\t\t\t)}\n\t\t\t{!trendRaw && (trendRawString?.length || 0) > 0 && (\n\t\t\t\t<Caption style={{ marginLeft: 4, color: COLORS.content.placeholder }}>\n\t\t\t\t\t{`${trendRawString}`}\n\t\t\t\t</Caption>\n\t\t\t)}\n\n\t\t\t{timeline &&\n\t\t\t\t(tooltipTimelineText ? (\n\t\t\t\t\t<Tooltip body={tooltipTimelineText} placement=\"bottom\">\n\t\t\t\t\t\t<Caption\n\t\t\t\t\t\t\tstyle={{ marginLeft: 4, color: COLORS.content.placeholder }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{customTimelineText || timeLineText}\n\t\t\t\t\t\t</Caption>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : (\n\t\t\t\t\t<Caption style={{ marginLeft: 4, color: COLORS.content.placeholder }}>\n\t\t\t\t\t\t{customTimelineText || timeLineText}\n\t\t\t\t\t</Caption>\n\t\t\t\t))}\n\t\t</div>\n\t);\n};\n"],"names":["AnalyticsTrend","title","value","trendPercent","type","timeline","customRange","tooltip","card","rightSeparator","size","share","formatVal","prefixSymbol","trailingIcon","onTrailIconClick","iconTooltipBody","funnelPercent","isLoading","trendRaw","trendRawString","suffixText","trendStyle","trendContainerStyle","trendIconStyle","containerStyle","prevTrendDiff","relativePercentageDiff","isInternationalStore","Icon","iconContainerStyle","tooltipTimelineText","customTimelineText","ValueTypo","TitleLarge","TitleMedium","trendDirection","percent","getDisplayValue","truncateValueForInternationalStore","truncateValueForIndianStore","formatTrendDiff","trendDiff","diff","jsx","AnalyticsTrendContainer","jsxs","COLORS","IconContainer","BodyCaption","Tooltip","InfoIcon","ShimmerComponentStyled","Tag","Trend","Fragment","React","direction","getTrendRawAbs","trendRawAbs","generateTrendRawText","prefixWithSign","trendRawText","setTrendRawText","useState","timeLineText","setTimeLineText","useEffect","DateUtils","TrendIcon","DownArrowIcon","UpArrowIcon","color","Caption"],"mappings":";;;;;;;;;;;;;AAuDO,MAAMA,KAAoD,CAAC;AAAA,EACjE,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,gBAAAC,IAAiB;AAAA,EACjB,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,oBAAAC;AACD,MAAM;AACL,QAAMC,IAAYvB,MAAS,QAAQwB,KAAaC,IAC1CC,IACL,OAAOjC,IAAiB,MACrBA,IAAe,IACd,aACAA,MAAiB,IACjB,YACA,aACD,QAEEkC,IACL,OAAOlC,IAAiB,MACrBQ,IACC,KAAK,MAAMR,CAAY,IACvB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O,EAAE,YAAY,GAAG,OAAO1B,EAAO,QAAQ,YAAA,GACrD,eAAsBkB,GACxB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIL;"}
1
+ {"version":3,"file":"AnalyticsTrend.js","sources":["../../../../src/components/analytics-chips-and-dropdowns/AnalyticsTrend.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { ShimmerComponentStyled } from '@src/components/shimmer/ShimmerComponent/ShimmerStyled';\nimport DateUtils from '@src/utils/DateUtils';\nimport { COLORS } from '@src/constants/Theme';\nimport DownArrowIcon from '../../assets/icons/arrow_down.svg';\nimport UpArrowIcon from '../../assets/icons/arrow_up.svg';\nimport InfoIcon from '../../assets/icons/info.svg';\nimport { Tag } from '../tag';\nimport { Placement, Tooltip } from '../tooltips';\nimport {\n\tBodyCaption,\n\tCaption,\n\tTitleLarge,\n\tTitleMedium,\n} from '../TypographyStyle';\nimport {\n\ttruncateValueForIndianStore,\n\ttruncateValueForInternationalStore,\n} from './chart/utils/calcPercentage';\nimport { AnalyticsTrendContainer, IconContainer } from './CommonStyles';\n\nexport interface AnalyticsTrendInterface {\n\ttitle: string;\n\tvalue?: number | string;\n\ttrendPercent?: number;\n\ttrendRaw?: number;\n\ttrendRawString?: string;\n\tformatVal?: boolean;\n\ttimeline?: 'today' | 'yesterday' | '7 days' | '30 days' | 'custom';\n\tcustomRange?: Date[];\n\ttype?: 'vertical' | 'horizontal';\n\ttooltip?: string;\n\ttooltipPlacement?: Placement;\n\ttooltipWidth?: number;\n\tcard?: boolean;\n\trightSeparator?: boolean;\n\tsize?: 'big' | 'small';\n\tshare?: boolean;\n\tprefixSymbol?: string;\n\ttrailingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\tonTrailIconClick?: () => void;\n\ticonTooltipBody?: string;\n\tfunnelPercent?: number;\n\tisLoading?: boolean;\n\tsuffixText?: string;\n\ttrendStyle?: React.CSSProperties;\n\ticonContainerStyle?: React.CSSProperties;\n\ttrendContainerStyle?: React.CSSProperties;\n\ttrendIconStyle?: React.CSSProperties;\n\tcontainerStyle?: React.CSSProperties;\n\tprevTrendDiff?: number;\n\trelativePercentageDiff?: number;\n\tisInternationalStore?: boolean;\n\tIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\ttooltipTimelineText?: string;\n\tcustomTimelineText?: string;\n}\nexport const AnalyticsTrend: React.FC<AnalyticsTrendInterface> = ({\n\ttitle,\n\tvalue,\n\ttrendPercent,\n\ttype = 'horizontal',\n\ttimeline,\n\tcustomRange,\n\ttooltip,\n\ttooltipPlacement = 'right',\n\ttooltipWidth = 300,\n\tcard = true,\n\trightSeparator = false,\n\tsize = 'big',\n\tshare = false,\n\tformatVal,\n\tprefixSymbol,\n\ttrailingIcon,\n\tonTrailIconClick,\n\ticonTooltipBody,\n\tfunnelPercent,\n\tisLoading,\n\ttrendRaw,\n\ttrendRawString,\n\tsuffixText,\n\ttrendStyle,\n\ttrendContainerStyle,\n\ttrendIconStyle,\n\tcontainerStyle,\n\tprevTrendDiff,\n\trelativePercentageDiff,\n\tisInternationalStore,\n\tIcon,\n\ticonContainerStyle,\n\ttooltipTimelineText,\n\tcustomTimelineText,\n}) => {\n\tconst ValueTypo = size === 'big' ? TitleLarge : TitleMedium;\n\tconst trendDirection =\n\t\ttypeof trendPercent !== 'undefined'\n\t\t\t? trendPercent < 0\n\t\t\t\t? 'negative'\n\t\t\t\t: trendPercent === 0\n\t\t\t\t? 'neutral'\n\t\t\t\t: 'positive'\n\t\t\t: undefined;\n\n\tconst percent =\n\t\ttypeof trendPercent !== 'undefined'\n\t\t\t? share\n\t\t\t\t? Math.round(trendPercent)\n\t\t\t\t: Math.abs(Math.round(trendPercent))\n\t\t\t: undefined;\n\n\tconst getDisplayValue = () => {\n\t\tif (typeof value === 'undefined') {\n\t\t\treturn '--';\n\t\t}\n\n\t\tif (typeof value === 'number') {\n\t\t\tif (formatVal) {\n\t\t\t\tif (value > 999) {\n\t\t\t\t\tif (isInternationalStore) {\n\t\t\t\t\t\treturn `${prefixSymbol ?? ''}${truncateValueForInternationalStore(\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t)} ${suffixText ?? ''}`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn `${prefixSymbol ?? ''}${truncateValueForIndianStore(\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t)} ${suffixText ?? ''}`;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn `${prefixSymbol ?? ''}${new Intl.NumberFormat('en-IN', {\n\t\t\t\t\t\tmaximumFractionDigits: 2,\n\t\t\t\t\t}).format(value)} ${suffixText ?? ''}`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn `${prefixSymbol ?? ''}${value} ${suffixText ?? ''}`;\n\t};\n\n\tconst formatTrendDiff = (trendDiff: number) => {\n\t\tconst diff = Math.abs(trendDiff);\n\t\tif (diff % 1 !== 0) {\n\t\t\treturn `${diff.toFixed(1)} %`;\n\t\t}\n\t\treturn `${diff} %`;\n\t};\n\n\treturn (\n\t\t<AnalyticsTrendContainer\n\t\t\tcard={card}\n\t\t\tstyle={{\n\t\t\t\t...containerStyle,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\tgap: Icon ? 12 : 4,\n\t\t\t\t\tborderRightWidth: rightSeparator ? 1 : 0,\n\t\t\t\t\tborderRightColor: COLORS.stroke.primary,\n\t\t\t\t\tborderRightStyle: 'solid',\n\t\t\t\t\tpaddingLeft: !card ? 24 : 0,\n\t\t\t\t\tpaddingRight: !card ? 24 : 0,\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tjustifyContent: Icon ? 'flex-start' : 'space-between',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t...(trendContainerStyle ?? {}),\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!!Icon && (\n\t\t\t\t\t<IconContainer style={{ ...iconContainerStyle }}>\n\t\t\t\t\t\t<Icon />\n\t\t\t\t\t</IconContainer>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t...(trendStyle ?? {}),\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tcolor: COLORS.content.secondary,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</BodyCaption>\n\n\t\t\t\t\t\t{tooltip && (\n\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\tbody={tooltip}\n\t\t\t\t\t\t\t\tplacement={tooltipPlacement}\n\t\t\t\t\t\t\t\twidth={tooltipWidth}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<InfoIcon\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.primary}\n\t\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tgap: 12,\n\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t...(share ? { justifyContent: 'space-between' } : {}),\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isLoading && <ShimmerComponentStyled width={108} height={26} />}\n\t\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t\t<ValueTypo\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tcolor: COLORS.content.primary,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{getDisplayValue()}\n\t\t\t\t\t\t\t</ValueTypo>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{typeof relativePercentageDiff === 'number' && (\n\t\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t\ttagText={`${relativePercentageDiff}%`}\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttype=\"neutral\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{type === 'horizontal' && !isLoading && !share && (\n\t\t\t\t\t\t\t<Trend\n\t\t\t\t\t\t\t\ttimeline={timeline}\n\t\t\t\t\t\t\t\tcustomRange={customRange}\n\t\t\t\t\t\t\t\tpercent={percent}\n\t\t\t\t\t\t\t\tdirection={trendDirection}\n\t\t\t\t\t\t\t\ttrendRaw={trendRaw}\n\t\t\t\t\t\t\t\ttrendRawString={trendRawString}\n\t\t\t\t\t\t\t\tprefixSymbol={prefixSymbol}\n\t\t\t\t\t\t\t\ttrendIconStyle={trendIconStyle}\n\t\t\t\t\t\t\t\tisInternationalStore={isInternationalStore}\n\t\t\t\t\t\t\t\ttooltipTimelineText={tooltipTimelineText}\n\t\t\t\t\t\t\t\tcustomTimelineText={customTimelineText}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{isLoading && !share && type === 'horizontal' && (\n\t\t\t\t\t\t\t<ShimmerComponentStyled height={20} width={141} marginTop={6} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{type === 'vertical' &&\n\t\t\t\t\t\t\t!isLoading &&\n\t\t\t\t\t\t\ttypeof funnelPercent !== 'undefined' && (\n\t\t\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t\t\ttagText={`${funnelPercent} %`}\n\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\ttype=\"neutral\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t{share && !isLoading && typeof percent !== 'undefined' && (\n\t\t\t\t\t\t\t<Tag tagText={`${percent} %`} theme=\"light\" type=\"neutral\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!share && !isLoading && prevTrendDiff && prevTrendDiff != 0 ? (\n\t\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t\ttagText={formatTrendDiff(prevTrendDiff)}\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttype=\"neutral\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<></>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t{type === 'vertical' && !isLoading && !share && (\n\t\t\t\t\t\t<div style={{ marginTop: 10 }}>\n\t\t\t\t\t\t\t<Trend\n\t\t\t\t\t\t\t\ttimeline={timeline}\n\t\t\t\t\t\t\t\tcustomRange={customRange}\n\t\t\t\t\t\t\t\tpercent={percent}\n\t\t\t\t\t\t\t\tdirection={trendDirection}\n\t\t\t\t\t\t\t\ttrendRaw={trendRaw}\n\t\t\t\t\t\t\t\ttrendRawString={trendRawString}\n\t\t\t\t\t\t\t\tprefixSymbol={prefixSymbol}\n\t\t\t\t\t\t\t\ttrendIconStyle={trendIconStyle}\n\t\t\t\t\t\t\t\tisInternationalStore={isInternationalStore}\n\t\t\t\t\t\t\t\ttooltipTimelineText={tooltipTimelineText}\n\t\t\t\t\t\t\t\tcustomTimelineText={customTimelineText}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{isLoading && type === 'vertical' && (\n\t\t\t\t\t\t<ShimmerComponentStyled height={20} width={141} marginTop={6} />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{iconTooltipBody && !isLoading && (\n\t\t\t\t\t<Tooltip body={iconTooltipBody} placement={'right'}>\n\t\t\t\t\t\t{trailingIcon && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tdata-test=\"analytics-trend-trailing-icon\"\n\t\t\t\t\t\t\t\tclassName={'icon--holder'}\n\t\t\t\t\t\t\t\tonClick={onTrailIconClick}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{React.createElement(trailingIcon, {\n\t\t\t\t\t\t\t\t\theight: 20,\n\t\t\t\t\t\t\t\t\twidth: 20,\n\t\t\t\t\t\t\t\t\tcolor: COLORS.content.secondary,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Tooltip>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</AnalyticsTrendContainer>\n\t);\n};\n\nconst Trend: React.FC<{\n\tpercent?: number;\n\tdirection?: 'positive' | 'negative' | 'neutral';\n\ttimeline?: AnalyticsTrendInterface['timeline'];\n\tcustomRange?: AnalyticsTrendInterface['customRange'];\n\ttrendRaw?: number;\n\ttrendRawString?: string;\n\tprefixSymbol?: string;\n\ttrendIconStyle?: React.CSSProperties;\n\tisInternationalStore?: boolean;\n\ttooltipTimelineText?: string;\n\tcustomTimelineText?: string;\n}> = ({\n\tpercent,\n\tdirection,\n\ttimeline,\n\tcustomRange,\n\ttrendRaw,\n\ttrendRawString,\n\tprefixSymbol,\n\ttrendIconStyle,\n\tisInternationalStore,\n\ttooltipTimelineText,\n\tcustomTimelineText,\n}) => {\n\tconst getTrendRawAbs = () => {\n\t\tlet trendRawAbs = '--';\n\t\tif (trendRaw) {\n\t\t\tif (isInternationalStore) {\n\t\t\t\ttrendRawAbs = String(\n\t\t\t\t\ttruncateValueForInternationalStore(Math.abs(trendRaw)),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\ttrendRawAbs = String(truncateValueForIndianStore(Math.abs(trendRaw)));\n\t\t\t}\n\t\t\tif (trendRaw < 0) {\n\t\t\t\treturn '-' + trendRawAbs;\n\t\t\t} else {\n\t\t\t\treturn trendRawAbs;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst generateTrendRawText = () => {\n\t\tconst prefixWithSign =\n\t\t\t((trendRaw ?? 0) > 0 ? '+' : '') + (prefixSymbol ?? '');\n\t\tconst trendRawTextInitial =\n\t\t\ttypeof trendRaw === 'undefined'\n\t\t\t\t? '--'\n\t\t\t\t: `${prefixWithSign ?? ''}${getTrendRawAbs()}`;\n\t\treturn trendRawTextInitial;\n\t};\n\n\tconst [trendRawText, setTrendRawText] = useState<string>(\n\t\tgenerateTrendRawText(),\n\t);\n\tconst [timeLineText, setTimeLineText] = useState<string>(\n\t\tcustomTimelineText || '',\n\t);\n\n\tuseEffect(() => {\n\t\tif (customTimelineText) {\n\t\t\treturn;\n\t\t}\n\t\tsetTimeLineText(\n\t\t\ttimeline === 'today'\n\t\t\t\t? 'vs yesterday'\n\t\t\t\t: timeline === 'yesterday'\n\t\t\t\t? 'vs 1 day before'\n\t\t\t\t: timeline === '7 days'\n\t\t\t\t? 'vs last 7 days'\n\t\t\t\t: timeline === '30 days'\n\t\t\t\t? 'vs last 30 days'\n\t\t\t\t: timeline === 'custom' && customRange\n\t\t\t\t? DateUtils.getAnalyticsCustomDateTimelineText(customRange)\n\t\t\t\t: '',\n\t\t);\n\t}, [timeline, customRange]);\n\n\tuseEffect(() => {\n\t\tsetTrendRawText(generateTrendRawText());\n\t}, [trendRaw]);\n\n\tconst TrendIcon = direction === 'negative' ? DownArrowIcon : UpArrowIcon;\n\n\tconst color =\n\t\tdirection === 'negative'\n\t\t\t? COLORS.background.negative.vibrant\n\t\t\t: direction === 'positive'\n\t\t\t? COLORS.background.positive.vibrant\n\t\t\t: COLORS.content.placeholder;\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\talignItems: 'center',\n\t\t\t\tflexDirection: 'row',\n\t\t\t\tflexWrap: 'wrap',\n\t\t\t}}\n\t\t>\n\t\t\t{typeof percent === 'number' && (\n\t\t\t\t<TrendIcon\n\t\t\t\t\tcolor={color}\n\t\t\t\t\theight={16}\n\t\t\t\t\twidth={16}\n\t\t\t\t\tstyle={{ marginRight: 2, ...(trendIconStyle ?? {}) }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{typeof percent === 'number' && direction && (\n\t\t\t\t<Caption style={{ color }}>\n\t\t\t\t\t{direction === 'neutral' ? 0 : percent < 1000 ? percent : '>999'}\n\t\t\t\t\t{'%'}\n\t\t\t\t</Caption>\n\t\t\t)}\n\t\t\t{!!trendRaw && (\n\t\t\t\t<Caption style={{ marginLeft: 4, color: COLORS.content.placeholder }}>\n\t\t\t\t\t{`(${trendRawText})`}\n\t\t\t\t</Caption>\n\t\t\t)}\n\t\t\t{!trendRaw && (trendRawString?.length || 0) > 0 && (\n\t\t\t\t<Caption style={{ marginLeft: 4, color: COLORS.content.placeholder }}>\n\t\t\t\t\t{`${trendRawString}`}\n\t\t\t\t</Caption>\n\t\t\t)}\n\n\t\t\t{timeline &&\n\t\t\t\t(tooltipTimelineText ? (\n\t\t\t\t\t<Tooltip body={tooltipTimelineText} placement=\"bottom\">\n\t\t\t\t\t\t<Caption\n\t\t\t\t\t\t\tstyle={{ marginLeft: 4, color: COLORS.content.placeholder }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{customTimelineText || timeLineText}\n\t\t\t\t\t\t</Caption>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : (\n\t\t\t\t\t<Caption style={{ marginLeft: 4, color: COLORS.content.placeholder }}>\n\t\t\t\t\t\t{customTimelineText || timeLineText}\n\t\t\t\t\t</Caption>\n\t\t\t\t))}\n\t\t</div>\n\t);\n};\n"],"names":["AnalyticsTrend","title","value","trendPercent","type","timeline","customRange","tooltip","tooltipPlacement","tooltipWidth","card","rightSeparator","size","share","formatVal","prefixSymbol","trailingIcon","onTrailIconClick","iconTooltipBody","funnelPercent","isLoading","trendRaw","trendRawString","suffixText","trendStyle","trendContainerStyle","trendIconStyle","containerStyle","prevTrendDiff","relativePercentageDiff","isInternationalStore","Icon","iconContainerStyle","tooltipTimelineText","customTimelineText","ValueTypo","TitleLarge","TitleMedium","trendDirection","percent","getDisplayValue","truncateValueForInternationalStore","truncateValueForIndianStore","formatTrendDiff","trendDiff","diff","jsx","AnalyticsTrendContainer","jsxs","COLORS","IconContainer","BodyCaption","Tooltip","InfoIcon","ShimmerComponentStyled","Tag","Trend","Fragment","React","direction","getTrendRawAbs","trendRawAbs","generateTrendRawText","prefixWithSign","trendRawText","setTrendRawText","useState","timeLineText","setTimeLineText","useEffect","DateUtils","TrendIcon","DownArrowIcon","UpArrowIcon","color","Caption"],"mappings":";;;;;;;;;;;;;AAyDO,MAAMA,KAAoD,CAAC;AAAA,EACjE,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,cAAAC,IAAe;AAAA,EACf,MAAAC,IAAO;AAAA,EACP,gBAAAC,IAAiB;AAAA,EACjB,MAAAC,IAAO;AAAA,EACP,OAAAC,I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AChB,UAAA;AAAA,UAAAf,MAAc,YAAY,IAAIpB,IAAU,MAAOA,IAAU;AAAA,UACzD;AAAA,QAAA,GACF;AAAA,QAEA,CAAC,CAAClB,KACF,gBAAAyB,EAAC6B,GAAA,EAAQ,OAAO,EAAE,YAAY,GAAG,OAAO1B,EAAO,QAAQ,YAAA,GACrD,UAAA,IAAIe,CAAY,KAClB;AAAA,QAEA,CAAC3C,MAAaC,GAAgB,UAAU,KAAK,uBAC5CqD,GAAA,EAAQ,OAAO,EAAE,YAAY,GAAG,OAAO1B,EAAO,QAAQ,eACrD,UAAA,GAAG3B,CAAc,IACnB;AAAA,QAGAjB,MACC4B,IACA,gBAAAa,EAACM,KAAQ,MAAMnB,GAAqB,WAAU,UAC7C,UAAA,gBAAAa;AAAA,UAAC6B;AAAA,UAAA;AAAA,YACA,OAAO,EAAE,YAAY,GAAG,OAAO1B,EAAO,QAAQ,YAAA;AAAA,YAE7C,UAAAf,KAAsBiC;AAAA,UAAA;AAAA,QAAA,EACxB,CACD,IAEA,gBAAArB,EAAC6B,GAAA,EAAQ,OAAO,EAAE,YAAY,GAAG,OAAO1B,EAAO,QAAQ,YAAA,GACrD,eAAsBkB,GACxB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIL;"}
@@ -0,0 +1,16 @@
1
+ import { default as React, CSSProperties, ReactNode } from 'react';
2
+ interface ChartCardProps {
3
+ title?: string;
4
+ padding: CSSProperties['padding'];
5
+ gap: number;
6
+ dataTest: string;
7
+ wrapperStyle?: CSSProperties;
8
+ children: ReactNode;
9
+ }
10
+ export declare const ChartCard: React.FC<ChartCardProps>;
11
+ interface ChartValueRowProps {
12
+ value: ReactNode;
13
+ chip?: ReactNode;
14
+ }
15
+ export declare const ChartValueRow: React.FC<ChartValueRowProps>;
16
+ export {};