@bikdotai/bik-component-library 0.0.540 → 0.0.541-analytics-beta

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 (113) hide show
  1. package/dist/cjs/assets/icons/graph.svg.js +1 -0
  2. package/dist/cjs/assets/icons/sparkle.svg.js +1 -0
  3. package/dist/cjs/assets/icons/sync.svg.js +1 -0
  4. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  5. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  6. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  7. package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  8. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  9. package/dist/cjs/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  10. package/dist/cjs/components/SearchFilter/components/SearchFilterItem.js +1 -1
  11. package/dist/cjs/components/TypographyStyle.d.ts +17 -0
  12. package/dist/cjs/components/TypographyStyle.js +82 -19
  13. package/dist/cjs/components/ai-modals/ActivateBikAI.d.ts +9 -0
  14. package/dist/cjs/components/ai-modals/ActivateBikAI.js +1 -0
  15. package/dist/cjs/components/ai-modals/AiCreditsExhausted.d.ts +8 -0
  16. package/dist/cjs/components/ai-modals/AiCreditsExhausted.js +1 -0
  17. package/dist/cjs/components/ai-modals/AiCreditsLow.d.ts +7 -0
  18. package/dist/cjs/components/ai-modals/AiCreditsLow.js +1 -0
  19. package/dist/cjs/components/ai-modals/AiSyncProgress.d.ts +8 -0
  20. package/dist/cjs/components/ai-modals/AiSyncProgress.js +1 -0
  21. package/dist/cjs/components/ai-modals/index.d.ts +4 -0
  22. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +1 -1
  23. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  24. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +1 -0
  25. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  26. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  27. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.d.ts +1 -0
  28. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +1 -1
  29. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +11 -0
  30. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  31. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +1 -0
  32. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +1 -1
  33. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  34. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +13 -0
  35. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -0
  36. package/dist/cjs/components/analytics-chips-and-dropdowns/index.d.ts +1 -0
  37. package/dist/cjs/components/bik-layout/SidebarStyles.js +1 -1
  38. package/dist/cjs/components/button/Button.js +1 -1
  39. package/dist/cjs/components/button/model.d.ts +1 -1
  40. package/dist/cjs/components/button/themes.d.ts +2 -2
  41. package/dist/cjs/components/button/themes.js +1 -1
  42. package/dist/cjs/components/icon-button/IconButton.styled.js +1 -1
  43. package/dist/cjs/components/icon-button/model.d.ts +1 -1
  44. package/dist/cjs/components/icon-button/theme.js +1 -1
  45. package/dist/cjs/components/postPicker/postPicker.js +1 -1
  46. package/dist/cjs/components/progress-bar/ProgressBarComponent.js +1 -1
  47. package/dist/cjs/components/tag/Tag.js +1 -1
  48. package/dist/cjs/components/tag/Tag.styled.js +1 -1
  49. package/dist/cjs/components/tag/model.d.ts +11 -1
  50. package/dist/cjs/components/tag/model.js +1 -1
  51. package/dist/cjs/components/tag/themes.d.ts +1 -1
  52. package/dist/cjs/components/tag/themes.js +1 -1
  53. package/dist/cjs/hooks/useOutside.js +1 -1
  54. package/dist/cjs/index.d.ts +1 -0
  55. package/dist/cjs/index.js +1 -1
  56. package/dist/esm/assets/icons/graph.svg.js +1 -0
  57. package/dist/esm/assets/icons/sparkle.svg.js +1 -0
  58. package/dist/esm/assets/icons/sync.svg.js +1 -0
  59. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  60. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  61. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  62. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  63. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  64. package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  65. package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
  66. package/dist/esm/components/TypographyStyle.d.ts +17 -0
  67. package/dist/esm/components/TypographyStyle.js +84 -21
  68. package/dist/esm/components/ai-modals/ActivateBikAI.d.ts +9 -0
  69. package/dist/esm/components/ai-modals/ActivateBikAI.js +1 -0
  70. package/dist/esm/components/ai-modals/AiCreditsExhausted.d.ts +8 -0
  71. package/dist/esm/components/ai-modals/AiCreditsExhausted.js +1 -0
  72. package/dist/esm/components/ai-modals/AiCreditsLow.d.ts +7 -0
  73. package/dist/esm/components/ai-modals/AiCreditsLow.js +1 -0
  74. package/dist/esm/components/ai-modals/AiSyncProgress.d.ts +8 -0
  75. package/dist/esm/components/ai-modals/AiSyncProgress.js +1 -0
  76. package/dist/esm/components/ai-modals/index.d.ts +4 -0
  77. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +1 -1
  78. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  79. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +1 -0
  80. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  81. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  82. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.d.ts +1 -0
  83. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +4 -4
  84. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +11 -0
  85. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  86. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +1 -0
  87. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +1 -1
  88. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  89. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +13 -0
  90. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -0
  91. package/dist/esm/components/analytics-chips-and-dropdowns/index.d.ts +1 -0
  92. package/dist/esm/components/bik-layout/SidebarStyles.js +1 -1
  93. package/dist/esm/components/button/Button.js +1 -1
  94. package/dist/esm/components/button/model.d.ts +1 -1
  95. package/dist/esm/components/button/themes.d.ts +2 -2
  96. package/dist/esm/components/button/themes.js +1 -1
  97. package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
  98. package/dist/esm/components/icon-button/model.d.ts +1 -1
  99. package/dist/esm/components/icon-button/theme.js +1 -1
  100. package/dist/esm/components/postPicker/postPicker.js +1 -1
  101. package/dist/esm/components/progress-bar/ProgressBarComponent.js +1 -1
  102. package/dist/esm/components/tag/Tag.js +1 -1
  103. package/dist/esm/components/tag/Tag.styled.js +1 -1
  104. package/dist/esm/components/tag/model.d.ts +11 -1
  105. package/dist/esm/components/tag/model.js +1 -1
  106. package/dist/esm/components/tag/themes.d.ts +1 -1
  107. package/dist/esm/components/tag/themes.js +1 -1
  108. package/dist/esm/hooks/useOutside.js +1 -1
  109. package/dist/esm/index.d.ts +1 -0
  110. package/dist/esm/index.js +1 -1
  111. package/package.json +1 -1
  112. package/dist/cjs/assets/icons/bik_ai_stars_icon.svg.js +0 -1
  113. package/dist/esm/assets/icons/bik_ai_stars_icon.svg.js +0 -1
@@ -38,6 +38,11 @@ export declare const BodySecondary: import("styled-components").StyledComponent<
38
38
  numberOfLines?: number | undefined;
39
39
  color?: string | undefined;
40
40
  }, never>;
41
+ export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
42
+ numberOfLines?: number | undefined;
43
+ color?: string | undefined;
44
+ disabled?: boolean | undefined;
45
+ }, never>;
41
46
  export declare const BodyPrimaryLink: import("styled-components").StyledComponent<"div", any, {
42
47
  numberOfLines?: number | undefined;
43
48
  color?: string | undefined;
@@ -50,14 +55,26 @@ export declare const BodyCaption: import("styled-components").StyledComponent<"d
50
55
  numberOfLines?: number | undefined;
51
56
  color?: string | undefined;
52
57
  }, never>;
58
+ export declare const AiBodyCaption: import("styled-components").StyledComponent<"div", any, {
59
+ numberOfLines?: number | undefined;
60
+ color?: string | undefined;
61
+ }, never>;
53
62
  export declare const BodyTiny: import("styled-components").StyledComponent<"div", any, {
54
63
  numberOfLines?: number | undefined;
55
64
  color?: string | undefined;
56
65
  }, never>;
66
+ export declare const AiBodyTiny: import("styled-components").StyledComponent<"div", any, {
67
+ numberOfLines?: number | undefined;
68
+ color?: string | undefined;
69
+ }, never>;
57
70
  export declare const ButtonLarge: import("styled-components").StyledComponent<"div", any, {
58
71
  numberOfLines?: number | undefined;
59
72
  color?: string | undefined;
60
73
  }, never>;
74
+ export declare const ButtonLargeAI: import("styled-components").StyledComponent<"div", any, {
75
+ numberOfLines?: number | undefined;
76
+ color?: string | undefined;
77
+ }, never>;
61
78
  export declare const ButtonRegular: import("styled-components").StyledComponent<"div", any, {
62
79
  numberOfLines?: number | undefined;
63
80
  color?: string | undefined;
@@ -28,7 +28,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
28
28
  overflow: hidden;
29
29
  display: -webkit-box;
30
30
  -webkit-line-clamp: ${e=>e.numberOfLines};
31
- `,f=e.div`
31
+ `,a=e.div`
32
32
  font-family: Inter;
33
33
  color: ${e=>e.color||i.text.primary};
34
34
  font-weight: ${t.title4.fontWeight};
@@ -38,7 +38,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
38
38
  overflow: hidden;
39
39
  display: -webkit-box;
40
40
  -webkit-line-clamp: ${e=>e.numberOfLines};
41
- `,a=e.div`
41
+ `,f=e.div`
42
42
  font-family: Inter;
43
43
  color: ${e=>e.color||i.text.primary};
44
44
  font-weight: ${t.titleRegular.fontWeight};
@@ -58,7 +58,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
58
58
  overflow: hidden;
59
59
  display: -webkit-box;
60
60
  -webkit-line-clamp: ${e=>e.numberOfLines};
61
- `,h=e.div`
61
+ `,d=e.div`
62
62
  font-family: Inter;
63
63
  color: ${e=>e.color||i.text.primary};
64
64
  font-weight: ${t.display.fontWeight};
@@ -68,7 +68,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
68
68
  overflow: hidden;
69
69
  display: -webkit-box;
70
70
  -webkit-line-clamp: ${e=>e.numberOfLines};
71
- `,d=e.div`
71
+ `,c=e.div`
72
72
  font-family: Inter;
73
73
  color: ${e=>e.color||i.text.primary};
74
74
  font-weight: ${t.bodyPrimary.fontWeight};
@@ -78,7 +78,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
78
78
  overflow: hidden;
79
79
  display: -webkit-box;
80
80
  -webkit-line-clamp: ${e=>e.numberOfLines};
81
- `,c=e.div`
81
+ `,h=e.div`
82
82
  font-family: Inter;
83
83
  color: ${e=>e.color||i.text.primary};
84
84
  font-weight: ${t.bodyPrimary.fontWeight};
@@ -88,7 +88,17 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
88
88
  overflow: hidden;
89
89
  display: -webkit-box;
90
90
  -webkit-line-clamp: ${e=>e.numberOfLines};
91
- `,$=e.div`
91
+ `,g=e.div`
92
+ font-family: Inter;
93
+ color: ${e=>e.color||i.text.primary};
94
+ font-weight: ${t.bodySecondary.fontWeight};
95
+ font-size: ${o(t.bodySecondary.fontSize)};
96
+ line-height: ${o(t.bodySecondary.lineHeight)};
97
+ -webkit-box-orient: vertical;
98
+ overflow: hidden;
99
+ display: -webkit-box;
100
+ -webkit-line-clamp: ${e=>e.numberOfLines};
101
+ `,w=e.div`
92
102
  font-family: Inter;
93
103
  color: ${e=>e.color||i.text.primary};
94
104
  font-weight: ${t.bodySecondary.fontWeight};
@@ -98,17 +108,23 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
98
108
  overflow: hidden;
99
109
  display: -webkit-box;
100
110
  -webkit-line-clamp: ${e=>e.numberOfLines};
101
- `,g=e(c)`
111
+ z-index: 1;
112
+ background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
113
+ -webkit-background-clip: text;
114
+ -webkit-text-fill-color: transparent;
115
+ background-clip: text;
116
+ text-fill-color: transparent;
117
+ `,$=e(h)`
102
118
  text-decoration: underline;
103
119
  color: ${i.content.brand};
104
120
  text-decoration-color: ${i.content.brand};
105
121
  cursor: pointer;
106
- `,w=e($)`
122
+ `,m=e(g)`
107
123
  text-decoration: underline;
108
124
  color: ${i.content.brand};
109
125
  text-decoration-color: ${i.content.brand};
110
126
  cursor: pointer;
111
- `,m=e.div`
127
+ `,y=e.div`
112
128
  font-family: Inter;
113
129
  color: ${e=>e.color||i.text.primary};
114
130
  font-weight: ${t.caption.fontWeight};
@@ -118,7 +134,23 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
118
134
  overflow: hidden;
119
135
  display: -webkit-box;
120
136
  -webkit-line-clamp: ${e=>e.numberOfLines};
121
- `,y=e.div`
137
+ `,p=e.div`
138
+ font-family: Inter;
139
+ color: ${e=>e.color||i.text.primary};
140
+ font-weight: ${t.caption.fontWeight};
141
+ font-size: ${o(t.caption.fontSize)};
142
+ line-height: ${o(t.caption.lineHeight)};
143
+ -webkit-box-orient: vertical;
144
+ overflow: hidden;
145
+ display: -webkit-box;
146
+ -webkit-line-clamp: ${e=>e.numberOfLines};
147
+ z-index: 1;
148
+ background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
149
+ -webkit-background-clip: text;
150
+ -webkit-text-fill-color: transparent;
151
+ background-clip: text;
152
+ text-fill-color: transparent;
153
+ `,x=e.div`
122
154
  color: ${e=>e.color||i.text.primary};
123
155
  font-weight: ${t.tiny.fontWeight};
124
156
  font-size: ${o(t.tiny.fontSize)};
@@ -127,7 +159,22 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
127
159
  overflow: hidden;
128
160
  display: -webkit-box;
129
161
  -webkit-line-clamp: ${e=>e.numberOfLines};
130
- `,p=e.div`
162
+ `,s=e.div`
163
+ color: ${e=>e.color||i.text.primary};
164
+ font-weight: ${t.tiny.fontWeight};
165
+ font-size: ${o(t.tiny.fontSize)};
166
+ line-height: ${o(t.tiny.lineHeight)};
167
+ -webkit-box-orient: vertical;
168
+ overflow: hidden;
169
+ display: -webkit-box;
170
+ -webkit-line-clamp: ${e=>e.numberOfLines};
171
+ z-index: 1;
172
+ background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
173
+ -webkit-background-clip: text;
174
+ -webkit-text-fill-color: transparent;
175
+ background-clip: text;
176
+ text-fill-color: transparent;
177
+ `,k=e.div`
131
178
  font-family: Inter;
132
179
  color: ${e=>e.color||i.text.primary};
133
180
  font-weight: ${t.buttonLarge.fontWeight};
@@ -137,7 +184,23 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
137
184
  overflow: hidden;
138
185
  display: -webkit-box;
139
186
  -webkit-line-clamp: ${e=>e.numberOfLines};
140
- `,s=e.div`
187
+ `,v=e.div`
188
+ font-family: Inter;
189
+ color: ${e=>e.color||i.text.primary};
190
+ font-weight: ${t.buttonLarge.fontWeight};
191
+ font-size: ${o(t.buttonLarge.fontSize)};
192
+ line-height: ${o(t.buttonLarge.lineHeight)};
193
+ -webkit-box-orient: vertical;
194
+ overflow: hidden;
195
+ display: -webkit-box;
196
+ -webkit-line-clamp: ${e=>e.numberOfLines};
197
+ background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
198
+ z-index: 1;
199
+ -webkit-background-clip: text;
200
+ -webkit-text-fill-color: transparent;
201
+ background-clip: text;
202
+ text-fill-color: transparent;
203
+ `,u=e.div`
141
204
  font-family: Inter;
142
205
  color: ${e=>e.color||i.text.primary};
143
206
  font-weight: ${t.buttonRegular.fontWeight};
@@ -147,7 +210,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
147
210
  overflow: hidden;
148
211
  display: -webkit-box;
149
212
  -webkit-line-clamp: ${e=>e.numberOfLines};
150
- `,x=e.div`
213
+ `,z=e.div`
151
214
  font-family: Inter;
152
215
  color: ${e=>e.color||i.text.primary};
153
216
  font-weight: ${t.subHeading.fontWeight};
@@ -157,7 +220,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
157
220
  overflow: hidden;
158
221
  display: -webkit-box;
159
222
  -webkit-line-clamp: ${e=>e.numberOfLines};
160
- `,k=e.div`
223
+ `,L=e.div`
161
224
  font-family: Inter;
162
225
  color: ${e=>e.color||i.text.primary};
163
226
  font-weight: ${t.bodyRegular.fontWeight};
@@ -167,7 +230,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
167
230
  overflow: hidden;
168
231
  display: -webkit-box;
169
232
  -webkit-line-clamp: ${e=>e.numberOfLines};
170
- `,v=e.div`
233
+ `,S=e.div`
171
234
  font-family: Inter;
172
235
  color: ${i.text.primary};
173
236
  font-weight: ${t.caption.fontWeight};
@@ -177,7 +240,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
177
240
  overflow: hidden;
178
241
  display: -webkit-box;
179
242
  -webkit-line-clamp: ${e=>e.numberOfLines};
180
- `,u=e.div`
243
+ `,H=e.div`
181
244
  font-family: Inter;
182
245
  color: ${i.text.primary};
183
246
  font-weight: ${t.textPlaceholder.fontWeight};
@@ -187,7 +250,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
187
250
  overflow: hidden;
188
251
  display: -webkit-box;
189
252
  -webkit-line-clamp: ${e=>e.numberOfLines};
190
- `,z=e.div`
253
+ `,O=e.div`
191
254
  font-family: Inter;
192
255
  color: ${i.text.primary};
193
256
  font-weight: ${t.title4.fontWeight};
@@ -197,7 +260,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
197
260
  overflow: hidden;
198
261
  display: -webkit-box;
199
262
  -webkit-line-clamp: ${e=>e.numberOfLines};
200
- `,L=e.div`
263
+ `,W=e.div`
201
264
  font-family: Inter;
202
265
  color: ${i.text.primary};
203
266
  font-weight: ${t.bodySmall.fontWeight};
@@ -207,7 +270,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
207
270
  overflow: hidden;
208
271
  display: -webkit-box;
209
272
  -webkit-line-clamp: ${e=>e.numberOfLines};
210
- `,S=e.div`
273
+ `,I=e.div`
211
274
  font-family: Inter;
212
275
  color: ${i.text.primary};
213
276
  font-weight: ${t.captionBold.fontWeight};
@@ -217,7 +280,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
217
280
  overflow: hidden;
218
281
  display: -webkit-box;
219
282
  -webkit-line-clamp: ${e=>e.numberOfLines};
220
- `,H=e.div`
283
+ `,R=e.div`
221
284
  font-family: Inter;
222
285
  color: ${i.text.primary};
223
286
  font-weight: ${t.tiny.fontWeight};
@@ -227,4 +290,4 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
227
290
  overflow: hidden;
228
291
  display: -webkit-box;
229
292
  -webkit-line-clamp: ${e=>e.numberOfLines};
230
- `;export{m as BodyCaption,d as BodyLarge,c as BodyPrimary,g as BodyPrimaryLink,k as BodyRegular,$ as BodySecondary,w as BodySecondaryLink,L as BodySmall,y as BodyTiny,p as ButtonLarge,s as ButtonRegular,v as Caption,S as CaptionBold,h as Display,f as SmallRegular,x as SubHeading,u as TextPlaceholder,H as Tiny,z as TitleFour,l as TitleLarge,r as TitleMedium,a as TitleRegular,b as TitleSmall,n as TitleXlarge};
293
+ `;export{p as AiBodyCaption,s as AiBodyTiny,y as BodyCaption,c as BodyLarge,h as BodyPrimary,$ as BodyPrimaryLink,L as BodyRegular,g as BodySecondary,m as BodySecondaryLink,W as BodySmall,x as BodyTiny,k as ButtonLarge,v as ButtonLargeAI,u as ButtonRegular,w as ButtonRegularAI,S as Caption,I as CaptionBold,d as Display,a as SmallRegular,z as SubHeading,H as TextPlaceholder,R as Tiny,O as TitleFour,l as TitleLarge,r as TitleMedium,f as TitleRegular,b as TitleSmall,n as TitleXlarge};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { POD } from '../template-preview/models/WhatsAppTemplate';
3
+ export declare const ActivateBikAi: React.FC<{
4
+ open: boolean;
5
+ onModalClose: () => void;
6
+ onRightBtnClick: () => void;
7
+ onLeftBtnClick: () => void;
8
+ source: POD.CHATBOT | POD.CRM;
9
+ }>;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import n from"../../assets/icons/graph.svg.js";import o from"../../assets/icons/sparkle.svg.js";import{Button as r}from"../button/Button.js";import{Modal as s}from"../modals/Modal.js";import{TitleMedium as c,TitleLarge as l,BodyPrimary as a}from"../TypographyStyle.js";const d=d=>{let{open:g,onModalClose:p,onRightBtnClick:h,onLeftBtnClick:y,source:u}=d;return e(s,Object.assign({open:g,centralContainerStyles:{height:"430px",width:"464px",borderRadius:"12px"},zIndex:40,onClose:p,closeOnOutsideClick:!0},{children:t("div",{children:[t("div",Object.assign({style:{height:"180px",width:"100%",backgroundColor:"rgba(142, 142, 142, 0.2)",display:"flex",justifyContent:"center",alignItems:"center",gap:"18px"}},{children:[e(n,{width:100,height:90}),e("div",Object.assign({style:{width:"302px"}},{children:e(c,"CHATBOT"===u?{children:"Unlock higher conversion and ease agent work with BIK.AI"}:{children:"Experience reduced Average Handling Time of your tickets with Bik.AI!"})}))]})),t("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"16px",padding:"24px"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"4px"}},{children:[e(l,{children:"Activate BIK AI"}),e(o,{width:32,height:32})]})),t("div","CHATBOT"===u?Object.assign({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},{children:[e(a,Object.assign({color:"#888888"},{children:"Sync your Shopify Data to Bik.AI to supercharge it with"})),e(a,Object.assign({color:"#888888"},{children:"your store’s data to start personalizing it to your"})),e(a,Object.assign({color:"#888888"},{children:"customers!"}))]}):Object.assign({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},{children:[t(a,Object.assign({color:"#888888"},{children:["Sync your Shopify Data to Bik.AI to supercharge it with"," "]})),e(a,Object.assign({color:"#888888"},{children:"your store’s data to start responding to customer"})),e(a,Object.assign({color:"#888888"},{children:"queries right away!"}))]}))]})),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px",paddingBottom:"24px",paddingLeft:"24px",paddingRight:"24px"}},{children:[e(r,{buttonText:"Learn More",buttonType:"text",size:"large",onClick:y}),e(r,{buttonText:"Sync Shopify Data",size:"large",style:{backgroundColor:i.background.brand},onClick:h})]}))]})}))};export{d as ActivateBikAi};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const AiCreditsExhausted: React.FC<{
3
+ open: boolean;
4
+ onModalClose: () => void;
5
+ body?: string;
6
+ onRightBtnClick: () => void;
7
+ onLeftBtnClick: () => void;
8
+ }>;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as n}from"../../constants/Theme.js";import i from"../../assets/icons/alert_triangle.svg.js";import{Button as o}from"../button/Button.js";import{Modal as s}from"../modals/Modal.js";import{ProgressBarComponent as r}from"../progress-bar/ProgressBarComponent.js";import{TitleLarge as l,TitleRegular as c,BodySecondary as d,BodyPrimary as a}from"../TypographyStyle.js";const p=p=>{let{open:g,onModalClose:h,body:x,onRightBtnClick:m,onLeftBtnClick:y}=p;return e(s,Object.assign({open:g,centralContainerStyles:{width:"498px",height:"312px",borderRadius:"12px"},onClose:h,closeOnOutsideClick:!0,zIndex:40},{children:t("div",Object.assign({style:{padding:"24px",display:"flex",flexDirection:"column"}},{children:[e("div",Object.assign({style:{display:"flex",justifyContent:"center"}},{children:e(l,{children:"Free AI Credits Exhausted"})})),e("div",{style:{height:"24px"}}),t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},{children:[e(i,{color:n.content.negative,width:20,height:20}),e("div",{style:{width:"8px"}}),e(c,{children:"0/100"}),e(d,Object.assign({color:n.content.secondary},{children:"Free Credits left"}))]})),e(r,{completed:100,isAnimated:!1,height:16,color:n.content.negative})]})),e("div",{style:{height:"24px"}}),e(a,Object.assign({color:n.content.secondary},{children:x||"Contact support to add credits to generate replies using AI, and enjoy continued AI assistance!"})),e("div",{style:{height:"44px"}}),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"}},{children:[e(o,{buttonText:"Learn More",buttonType:"text",size:"small",onClick:y}),e(o,{buttonText:"Contact Support",size:"small",style:{backgroundColor:n.background.brand},onClick:m})]}))]}))}))};export{p as AiCreditsExhausted};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const AiCreditsLow: React.FC<{
3
+ open: boolean;
4
+ onModalClose: () => void;
5
+ onRightBtnClick: () => void;
6
+ onLeftBtnClick: () => void;
7
+ }>;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as n}from"../../constants/Theme.js";import i from"../../assets/icons/alert_triangle.svg.js";import{Button as o}from"../button/Button.js";import{Modal as r}from"../modals/Modal.js";import{TitleLarge as s,BodyPrimary as l}from"../TypographyStyle.js";const d=d=>{let{open:c,onModalClose:a,onLeftBtnClick:p,onRightBtnClick:g}=d;return e(r,Object.assign({open:c,centralContainerStyles:{width:"498px",borderRadius:"12px"},onClose:a,closeOnOutsideClick:!0,zIndex:40},{children:t("div",Object.assign({style:{padding:"24px",display:"flex",flexDirection:"column",width:"100%"}},{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"center"}},{children:e("div",Object.assign({style:{backgroundColor:n.background.negative.light,width:"64px",height:"64px",padding:"12px",borderRadius:"40px"}},{children:e(i,{width:40,height:40,color:n.content.negative})}))})),e("div",{style:{height:"32px"}}),e(s,{children:"Your AI Credits are running low"}),e("div",{style:{height:"24px"}}),e(l,Object.assign({color:n.content.secondary},{children:"Recharge your credits now to ensure uninterrupted service."})),e("div",{style:{height:"12px"}}),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"center"}},{children:e(l,Object.assign({color:n.content.secondary},{children:"Don’t let the growth stop. Add AI Credits"}))})),e("div",{style:{height:"32px"}}),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"}},{children:[e(o,{buttonText:"Close",buttonType:"text",size:"small",onClick:p}),e(o,{buttonText:"Contact Support",size:"small",style:{backgroundColor:n.background.brand},onClick:g})]}))]}))}))};export{d as AiCreditsLow};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const AiSyncProgress: React.FC<{
3
+ open: boolean;
4
+ onModalClose: () => void;
5
+ completedPercent: number;
6
+ onRightBtnClick: () => void;
7
+ onLeftBtnClick: () => void;
8
+ }>;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import o from"../../assets/icons/sync.svg.js";import{Button as n}from"../button/Button.js";import{Modal as s}from"../modals/Modal.js";import{ProgressBarComponent as l}from"../progress-bar/ProgressBarComponent.js";import{TitleLarge as r,BodyPrimary as c}from"../TypographyStyle.js";const a=a=>{let{open:d,onModalClose:p,completedPercent:m,onLeftBtnClick:h,onRightBtnClick:g}=a;return e(s,Object.assign({open:d,centralContainerStyles:{width:"498px",height:"324px",borderRadius:"12px"},onClose:p,closeOnOutsideClick:!0,zIndex:40},{children:t("div",Object.assign({style:{padding:"24px",display:"flex",flexDirection:"column"}},{children:[e("div",Object.assign({style:{display:"flex",justifyContent:"center"}},{children:e(r,{children:"Wait for Sync to complete"})})),e("div",{style:{height:"24px"}}),t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px"}},{children:[e(o,{width:24,height:24}),e(c,Object.assign({color:"#616161"},{children:"Syncing Shopify Store Data..."}))]})),e(l,{completed:m,isAnimated:!1,height:16,color:i.background.positive.vibrant})]})),e("div",{style:{height:"24px"}}),e(c,Object.assign({color:i.content.secondary},{children:"You can start replying with AI after sync is complete. In the meanwhile, learn how to leverage AI for maximum efficiency"})),e("div",{style:{height:"32px"}}),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"}},{children:[e(n,{buttonText:"Close",buttonType:"text",size:"small",onClick:h}),e(n,{buttonText:"Explore Bik.ai",size:"small",style:{backgroundColor:i.background.brand},onClick:g})]}))]}))}))};export{a as AiSyncProgress};
@@ -0,0 +1,4 @@
1
+ export * from './ActivateBikAI';
2
+ export * from './AiSyncProgress';
3
+ export * from './AiCreditsExhausted';
4
+ export * from './AiCreditsLow';
@@ -25,7 +25,7 @@ export interface AnalyticsDropdownInterface {
25
25
  selectedRange?: [Date, Date];
26
26
  }) => void;
27
27
  maxHeight?: string;
28
- backgroundColor?: string;
28
+ backgroundcolor?: string;
29
29
  calendarPopperConfig?: {
30
30
  offsetSkid?: number;
31
31
  offsetDistance?: number;
@@ -1 +1 @@
1
- import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useState as n,useEffect as l}from"react";import{Dropdown as i}from"react-bootstrap";import{DEFAULT_THEME as a,BASE_COLORS as s}from"../../constants/Theme.js";import{DatePicker as d}from"../datePicker/DatePicker.js";import"react-calendar";import"../../utils/DateUtils.js";import{BodySecondary as c,BodyCaption as r,Caption as g}from"../TypographyStyle.js";import"../datePicker/DatePickerWrapper.styled.js";import{MainDropdown as p,ItemMenuContainer as u}from"./CommonStyles.js";const m=s=>{let{options:r,placeholder:u="Select an option",selected:m,onOptionSelected:b,resetDropdown:h,maxHeight:y,backgroundColor:f,calendarPopperConfig:D,variant:j="default",datePickerPlacement:k,closeDropdown:S}=s;var R,w,C;const[x,P]=n(!1),[$,T]=n(m),[I,N]=n(),[A,E]=n(!1),F=()=>{!x&&E(!A)},[L,H]=n(m),M="small"===j?g:c;return l((()=>{h&&T(void 0)}),[h]),l((()=>{var e;(null==m?void 0:m.isCustom)&&(null===(e=m.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?N(m.dateRangeSelectionOptions.selectedDates):N(void 0),T(m)}),[m]),l((()=>{E(!1),P(!1)}),[S]),e(o,{children:t(p,Object.assign({drop:"down",show:A,onToggle:F,backgroundColor:f,id:"analytic-dropdown"},{children:[e(i.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===j?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${a.colorsV2.stroke.primary}`}:void 0},{children:e(M,Object.assign({style:"small"===j?{color:a.colorsV2.content.secondary}:void 0},{children:(null==$?void 0:$.isCustom)?I?O(I[0])===O(I[1])?`${O(I[0])}`:`${O(I[0])} to ${O(I[1])}`:(null==L?void 0:L.label)?null==L?void 0:L.label:u:$?null==$?void 0:$.label:u}))})),e(i.Menu,Object.assign({className:"main--dropdown"},{children:t(p,Object.assign({drop:null!=k?k:"end",id:"sub--dropdown",show:x,onToggle:e=>{!e&&E(!1),P(!x)}},{children:[e("div",Object.assign({style:{maxHeight:y||"auto",overflowY:"scroll"}},{children:r.map((o=>{var t;return e("div",{children:(null==o?void 0:o.isCustom)?e(i.Toggle,Object.assign({className:"sub--dropdown"},{children:e(v,{eachOption:o,selectedOption:$,selectedDate:I,onClickingEachItem:e=>{T(e),P(!0)},rangeSelection:!!(null===(t=null==o?void 0:o.dateRangeSelectionOptions)||void 0===t?void 0:t.selectRange)})})):e(v,{eachOption:o,selectedOption:$,selectedDate:I,onClickingEachItem:e=>{if(N(void 0),T(e),H(e),F(),!e.noOfDays)return void b(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),b(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))}})},null==o?void 0:o.key)}))})),e(i.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==D?void 0:D.offsetSkid)||0,(null==D?void 0:D.offsetDistance)||0]}}]}},{children:e(d,{selectRange:(null===(R=null==$?void 0:$.dateRangeSelectionOptions)||void 0===R?void 0:R.selectRange)||!1,maxDate:null===(w=null==$?void 0:$.dateRangeSelectionOptions)||void 0===w?void 0:w.maxDate,minDate:null===(C=null==$?void 0:$.dateRangeSelectionOptions)||void 0===C?void 0:C.minDate,selectedDates:I,onSelectRange:(e,o)=>{const t=[e,o];(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=t,b(Object.assign(Object.assign({},$),{selectedRange:[e,o]}))),H($),P(!1),N(t),E(!A)},onSelectDate:e=>{(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=[e,e],b(Object.assign(Object.assign({},$),{selectedRange:[e,e]}))),H($),P(!1),N([e,e]),E(!A)}})}))]}))}))]}))})},v=n=>{let{eachOption:l,selectedOption:i,selectedDate:a,onClickingEachItem:d,rangeSelection:g}=n;return t(u,Object.assign({onClick:()=>d(l),isSelected:l.isCustom?l.key==(null==i?void 0:i.key)&&!!a:l.key==(null==i?void 0:i.key)},{children:[e(c,Object.assign({color:l.key==(null==i?void 0:i.key)?s.positive[900]:s.grayscale[900]},{children:l.label})),l.subLabel?e(r,Object.assign({style:{color:s.grayscale[700]}},{children:l.subLabel})):e(o,{}),a&&(null==i?void 0:i.isCustom)&&l.key==(null==i?void 0:i.key)&&e(r,{children:g?`${O(a[0])} to ${O(a[1])}`:`${O(a[0])}`})]}),l.key)},O=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});export{m as AnalyticsDropdown,v as EachItem,O as formatDate};
1
+ import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useState as n,useEffect as l}from"react";import{Dropdown as i}from"react-bootstrap";import{DEFAULT_THEME as a,BASE_COLORS as s}from"../../constants/Theme.js";import{DatePicker as d}from"../datePicker/DatePicker.js";import"react-calendar";import"../../utils/DateUtils.js";import{BodySecondary as c,BodyCaption as r,Caption as g}from"../TypographyStyle.js";import"../datePicker/DatePickerWrapper.styled.js";import{MainDropdown as p,ItemMenuContainer as u}from"./CommonStyles.js";const m=s=>{let{options:r,placeholder:u="Select an option",selected:m,onOptionSelected:b,resetDropdown:h,maxHeight:y,backgroundcolor:f,calendarPopperConfig:D,variant:j="default",datePickerPlacement:k,closeDropdown:S}=s;var R,w,C;const[x,P]=n(!1),[$,T]=n(m),[I,N]=n(),[A,E]=n(!1),F=()=>{!x&&E(!A)},[L,H]=n(m),M="small"===j?g:c;return l((()=>{h&&T(void 0)}),[h]),l((()=>{var e;(null==m?void 0:m.isCustom)&&(null===(e=m.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?N(m.dateRangeSelectionOptions.selectedDates):N(void 0),T(m)}),[m]),l((()=>{E(!1),P(!1)}),[S]),e(o,{children:t(p,Object.assign({drop:"down",show:A,onToggle:F,backgroundColor:f,id:"analytic-dropdown"},{children:[e(i.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===j?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${a.colorsV2.stroke.primary}`}:void 0},{children:e(M,Object.assign({style:"small"===j?{color:a.colorsV2.content.secondary}:void 0},{children:(null==$?void 0:$.isCustom)?I?O(I[0])===O(I[1])?`${O(I[0])}`:`${O(I[0])} to ${O(I[1])}`:(null==L?void 0:L.label)?null==L?void 0:L.label:u:$?null==$?void 0:$.label:u}))})),e(i.Menu,Object.assign({className:"main--dropdown"},{children:t(p,Object.assign({drop:null!=k?k:"end",id:"sub--dropdown",show:x,onToggle:e=>{!e&&E(!1),P(!x)}},{children:[e("div",Object.assign({style:{maxHeight:y||"auto",overflowY:"scroll"}},{children:r.map((o=>{var t;return e("div",{children:(null==o?void 0:o.isCustom)?e(i.Toggle,Object.assign({className:"sub--dropdown"},{children:e(v,{eachOption:o,selectedOption:$,selectedDate:I,onClickingEachItem:e=>{T(e),P(!0)},rangeSelection:!!(null===(t=null==o?void 0:o.dateRangeSelectionOptions)||void 0===t?void 0:t.selectRange)})})):e(v,{eachOption:o,selectedOption:$,selectedDate:I,onClickingEachItem:e=>{if(N(void 0),T(e),H(e),F(),!e.noOfDays)return void b(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),b(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))}})},null==o?void 0:o.key)}))})),e(i.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==D?void 0:D.offsetSkid)||0,(null==D?void 0:D.offsetDistance)||0]}}]}},{children:e(d,{selectRange:(null===(R=null==$?void 0:$.dateRangeSelectionOptions)||void 0===R?void 0:R.selectRange)||!1,maxDate:null===(w=null==$?void 0:$.dateRangeSelectionOptions)||void 0===w?void 0:w.maxDate,minDate:null===(C=null==$?void 0:$.dateRangeSelectionOptions)||void 0===C?void 0:C.minDate,selectedDates:I,onSelectRange:(e,o)=>{const t=[e,o];(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=t,b(Object.assign(Object.assign({},$),{selectedRange:[e,o]}))),H($),P(!1),N(t),E(!A)},onSelectDate:e=>{(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=[e,e],b(Object.assign(Object.assign({},$),{selectedRange:[e,e]}))),H($),P(!1),N([e,e]),E(!A)}})}))]}))}))]}))})},v=n=>{let{eachOption:l,selectedOption:i,selectedDate:a,onClickingEachItem:d,rangeSelection:g}=n;return t(u,Object.assign({onClick:()=>d(l),isSelected:l.isCustom?l.key==(null==i?void 0:i.key)&&!!a:l.key==(null==i?void 0:i.key)},{children:[e(c,Object.assign({color:l.key==(null==i?void 0:i.key)?s.positive[900]:s.grayscale[900]},{children:l.label})),l.subLabel?e(r,Object.assign({style:{color:s.grayscale[700]}},{children:l.subLabel})):e(o,{}),a&&(null==i?void 0:i.isCustom)&&l.key==(null==i?void 0:i.key)&&e(r,{children:g?`${O(a[0])} to ${O(a[1])}`:`${O(a[0])}`})]}),l.key)},O=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});export{m as AnalyticsDropdown,v as EachItem,O as formatDate};
@@ -24,5 +24,6 @@ export interface AnalyticsTrendInterface {
24
24
  trendContainerStyle?: React.CSSProperties;
25
25
  trendIconStyle?: React.CSSProperties;
26
26
  containerStyle?: React.CSSProperties;
27
+ prevTrendDiff?: number;
27
28
  }
28
29
  export declare const AnalyticsTrend: React.FC<AnalyticsTrendInterface>;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import i,{useRef as n}from"react";import{ShimmerComponentStyled as r}from"../shimmer/ShimmerComponent/ShimmerStyled.js";import o from"../../utils/DateUtils.js";import{COLORS as l}from"../../constants/Theme.js";import s from"../../assets/icons/arrow_down.svg.js";import a from"../../assets/icons/arrow_up.svg.js";import c from"../../assets/icons/info.svg.js";import{Tag as d}from"../tag/Tag.js";import{Tooltip as m}from"../tooltips/Tooltip.js";import{BodyCaption as g,Caption as h,TitleLarge as p,TitleMedium as y}from"../TypographyStyle.js";import{truncateValueTo10K as u}from"./chart/utils/calcPercentage.js";import{AnalyticsTrendContainer as b}from"./CommonStyles.js";const f=n=>{let{title:o,value:s,trendPercent:a,type:h="horizontal",timeline:f,customRange:j,tooltip:x,card:w=!0,rightSeparator:O=!1,size:S="big",share:T=!1,formatVal:$,prefixSymbol:I,trailingIcon:R,onTrailIconClick:C,iconTooltipBody:D,funnelPercent:k,isLoading:z,trendRaw:L,suffixText:M,trendStyle:N,trendContainerStyle:P,trendIconStyle:F,containerStyle:W}=n;const _="big"===S?p:y,A=void 0!==a?a<0?"negative":0===a?"neutral":"positive":void 0,B=void 0!==a?T?Math.round(a):Math.abs(Math.round(a)):void 0;return e(b,Object.assign({card:w,style:Object.assign({},W)},{children:t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:4,borderRightWidth:O?1:0,borderRightColor:l.stroke.primary,borderRightStyle:"solid",paddingLeft:w?0:24,paddingRight:w?0:24,height:"100%",justifyContent:"space-between",alignItems:"center"},null!=P?P:{})},{children:[t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=N?N:{})},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e(g,Object.assign({style:{color:l.content.secondary}},{children:o})),x&&e(m,Object.assign({body:x,placement:"right",width:300},{children:e("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e(c,{color:l.content.inactive,height:16,width:16})}))}))]})),t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},T?{justifyContent:"space-between"}:{})},{children:[z&&e(r,{width:108,height:26}),!z&&e(_,Object.assign({style:{color:l.content.primary}},{children:void 0===s?"--":"number"==typeof s&&$?s>9999?`${null!=I?I:""}${u(s)} ${null!=M?M:""}`:`${null!=I?I:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(s)} ${null!=M?M:""}`:`${null!=I?I:""}${s} ${null!=M?M:""}`})),"horizontal"===h&&!z&&!T&&e(v,{timeline:f,customRange:j,percent:B,direction:A,trendRaw:L,prefixSymbol:I,trendIconStyle:F}),z&&!T&&"horizontal"===h&&e(r,{height:20,width:141,marginTop:6}),"vertical"===h&&!z&&void 0!==k&&e(d,{tagText:`${k} %`,theme:"light",type:"neutral"}),T&&!z&&void 0!==B&&e(d,{tagText:`${B} %`,theme:"light",type:"neutral"})]})),"vertical"===h&&!z&&!T&&e("div",Object.assign({style:{marginTop:10}},{children:e(v,{timeline:f,customRange:j,percent:B,direction:A,trendRaw:L,prefixSymbol:I,trendIconStyle:F})})),z&&"vertical"===h&&e(r,{height:20,width:141,marginTop:6})]})),D&&!z&&e(m,Object.assign({body:D,placement:"right"},{children:R&&e("div",Object.assign({className:"icon--holder",onClick:C},{children:i.createElement(R,{height:20,width:20,color:l.content.secondary})}))}))]}))}))},v=i=>{let{percent:r,direction:c,timeline:d,customRange:m,trendRaw:g,prefixSymbol:p,trendIconStyle:y}=i;const b="negative"===c?s:a,f="negative"===c?l.background.negative.vibrant:"positive"===c?l.background.positive.vibrant:l.content.placeholder,v=n("today"===d?"vs yesterday":"yesterday"===d?"vs 1 day before":"7 days"===d?"vs last 7 days":"30 days"===d?"vs last 30 days":"custom"===d&&m?o.getAnalyticsCustomDateTimelineText(m):""),j=n((()=>{const e=((null!=g?g:0)>0?"+":"")+(null!=p?p:"");return void 0===g?"--":`${null!=e?e:""}${u(g)}`})());return t("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"}},{children:["number"==typeof r&&e(b,{color:f,height:16,width:16,style:Object.assign({marginRight:2},null!=y?y:{})}),"number"==typeof r&&c&&t(h,Object.assign({style:{color:f}},{children:["neutral"===c?0:r<1e3?r:">999","%"]})),!!g&&e(h,Object.assign({style:{marginLeft:4,color:l.content.placeholder}},{children:`(${j.current})`})),d&&e(h,Object.assign({style:{marginLeft:4,color:l.content.placeholder}},{children:v.current}))]}))};export{f as AnalyticsTrend};
1
+ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n,{useRef as r}from"react";import{ShimmerComponentStyled as o}from"../shimmer/ShimmerComponent/ShimmerStyled.js";import l from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import a from"../../assets/icons/arrow_down.svg.js";import c from"../../assets/icons/arrow_up.svg.js";import d from"../../assets/icons/info.svg.js";import{Tag as m}from"../tag/Tag.js";import{Tooltip as g}from"../tooltips/Tooltip.js";import{BodyCaption as h,Caption as p,TitleLarge as y,TitleMedium as u}from"../TypographyStyle.js";import{truncateValueTo10K as f}from"./chart/utils/calcPercentage.js";import{AnalyticsTrendContainer as b}from"./CommonStyles.js";const v=r=>{let{title:l,value:a,trendPercent:c,type:p="horizontal",timeline:v,customRange:x,tooltip:w,card:O=!0,rightSeparator:S=!1,size:T="big",share:$=!1,formatVal:I,prefixSymbol:R,trailingIcon:C,onTrailIconClick:D,iconTooltipBody:k,funnelPercent:z,isLoading:L,trendRaw:M,suffixText:F,trendStyle:N,trendContainerStyle:P,trendIconStyle:W,containerStyle:_,prevTrendDiff:A}=r;const B="big"===T?y:u,E=void 0!==c?c<0?"negative":0===c?"neutral":"positive":void 0,U=void 0!==c?$?Math.round(c):Math.abs(Math.round(c)):void 0;return e(b,Object.assign({card:O,style:Object.assign({},_)},{children:t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:4,borderRightWidth:S?1:0,borderRightColor:s.stroke.primary,borderRightStyle:"solid",paddingLeft:O?0:24,paddingRight:O?0:24,height:"100%",justifyContent:"space-between",alignItems:"center"},null!=P?P:{})},{children:[t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=N?N:{})},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e(h,Object.assign({style:{color:s.content.secondary}},{children:l})),w&&e(g,Object.assign({body:w,placement:"right",width:300},{children:e("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e(d,{color:s.content.primary,height:16,width:16})}))}))]})),t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},$?{justifyContent:"space-between"}:{})},{children:[L&&e(o,{width:108,height:26}),!L&&e(B,Object.assign({style:{color:s.content.primary}},{children:void 0===a?"--":"number"==typeof a&&I?a>9999?`${null!=R?R:""}${f(a)} ${null!=F?F:""}`:`${null!=R?R:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(a)} ${null!=F?F:""}`:`${null!=R?R:""}${a} ${null!=F?F:""}`})),"horizontal"===p&&!L&&!$&&e(j,{timeline:v,customRange:x,percent:U,direction:E,trendRaw:M,prefixSymbol:R,trendIconStyle:W}),L&&!$&&"horizontal"===p&&e(o,{height:20,width:141,marginTop:6}),"vertical"===p&&!L&&void 0!==z&&e(m,{tagText:`${z} %`,theme:"light",type:"neutral"}),$&&!L&&void 0!==U&&e(m,{tagText:`${U} %`,theme:"light",type:"neutral"}),$||L||!A||0==A?e(i,{}):e(m,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(A),theme:"light",type:"neutral"})]})),"vertical"===p&&!L&&!$&&e("div",Object.assign({style:{marginTop:10}},{children:e(j,{timeline:v,customRange:x,percent:U,direction:E,trendRaw:M,prefixSymbol:R,trendIconStyle:W})})),L&&"vertical"===p&&e(o,{height:20,width:141,marginTop:6})]})),k&&!L&&e(g,Object.assign({body:k,placement:"right"},{children:C&&e("div",Object.assign({className:"icon--holder",onClick:D},{children:n.createElement(C,{height:20,width:20,color:s.content.secondary})}))}))]}))}))},j=i=>{let{percent:n,direction:o,timeline:d,customRange:m,trendRaw:g,prefixSymbol:h,trendIconStyle:y}=i;const u="negative"===o?a:c,b="negative"===o?s.background.negative.vibrant:"positive"===o?s.background.positive.vibrant:s.content.placeholder,v=r("today"===d?"vs yesterday":"yesterday"===d?"vs 1 day before":"7 days"===d?"vs last 7 days":"30 days"===d?"vs last 30 days":"custom"===d&&m?l.getAnalyticsCustomDateTimelineText(m):""),j=r((()=>{const e=((null!=g?g:0)>0?"+":"")+(null!=h?h:"");return void 0===g?"--":`${null!=e?e:""}${f(g)}`})());return t("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"}},{children:["number"==typeof n&&e(u,{color:b,height:16,width:16,style:Object.assign({marginRight:2},null!=y?y:{})}),"number"==typeof n&&o&&t(p,Object.assign({style:{color:b}},{children:["neutral"===o?0:n<1e3?n:">999","%"]})),!!g&&e(p,Object.assign({style:{marginLeft:4,color:s.content.placeholder}},{children:`(${j.current})`})),d&&e(p,Object.assign({style:{marginLeft:4,color:s.content.placeholder}},{children:v.current}))]}))};export{v as AnalyticsTrend};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as a,CategoryScale as i,LinearScale as e,BarElement as r,Tooltip as l}from"chart.js";import n from"chartjs-plugin-datalabels";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as p}from"../../../../constants/Theme.js";import{truncateValueToK as g}from"../utils/calcPercentage.js";import{GraphContainerWrapper as x}from"./HorizontalGraph.styles.js";a.register(i,e,r,l,n);const b=a=>{var i,e,r,l,n,b,m,f,h;const u=-1===a.xAxis.data.findIndex((t=>0!==t)),y={min:0,max:2e3,stepSize:null!==(i=a.xAxis.stepSize)&&void 0!==i?i:200},A={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:a.maintainAspectRatio,layout:{padding:{right:a.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!u,callbacks:{label:a.xAxis.toolTipCallback,footer:null===(e=a.tooltipConfig)||void 0===e?void 0:e.footerCallback},footerFont:null===(l=null===(r=a.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===l?void 0:l.footerFont},datalabels:{display:null!==(n=!u&&a.showTotal)&&void 0!==n&&n,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var a;const i=o.datasetIndex,e=o.chart.data.datasets;if(i!==e.length-1)return"";const r=o.dataIndex;let l=0;for(let t=0;t<e.length;t++)l+=null!==(a=e[t].data[r])&&void 0!==a?a:0;return l?g(l):""},color:c.content.secondary}},scales:{y:{title:{display:!!a.yAxis.title,text:a.yAxis.title,color:a.yAxis.titleColor,font:{size:p.caption.fontSize,color:a.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:c.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(b=a.yAxis.labelColor)&&void 0!==b?b:c.content.secondary}},x:{title:{display:!!a.xAxis.title,text:a.xAxis.title,color:a.xAxis.titleColor,font:{size:p.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:c.background.base},ticks:Object.assign({callback:a.xAxis.ticksCallback,fontSize:p.caption.fontSize,color:null!==(m=a.xAxis.labelColor)&&void 0!==m?m:c.content.secondary},u?y:{max:a.xAxis.max,stepSize:a.xAxis.stepSize})}}},v={labels:a.yAxis.data.map((t=>t.toString())),datasets:[{data:u?[250,1e3,800,1500,300,600]:a.xAxis.data,backgroundColor:t=>(t=>{var o;const i=t.chart.ctx.createLinearGradient(0,0,0,200);let e="";if(u)e="rgba(0,0,0,0)";else if(a.barColorRGBA){const t=a.barColorRGBA;e=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(o=t.a)&&void 0!==o?o:"0.3"})`}return i.addColorStop(0,e||"rgba(146, 96, 237, 0.3)"),i.addColorStop(1,e||"rgba(146, 96, 237, 0.3)"),i})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(x,Object.assign({padding:a.outerPadding},{children:[a.chartHeading&&o(d,Object.assign({color:null!==(f=a.chartHeading.color)&&void 0!==f?f:c.content.secondary},{children:a.chartHeading.heading})),o("div",Object.assign({style:{height:a.maintainAspectRatio?void 0:null!==(h=a.graphCanvasHeight)&&void 0!==h?h:500}},{children:o(s,{options:A,data:v})}))]}))};export{b as HorizontalGraph};
1
+ import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as a,CategoryScale as i,LinearScale as e,BarElement as r,Tooltip as l}from"chart.js";import n from"chartjs-plugin-datalabels";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as p}from"../../../../constants/Theme.js";import{truncateValueToK as g}from"../utils/calcPercentage.js";import{GraphContainerWrapper as x}from"./HorizontalGraph.styles.js";a.register(i,e,r,l,n);const b=a=>{var i,e,r,l,n,b,m,f,u;const y=-1===a.xAxis.data.findIndex((t=>0!==t)),h={min:0,max:2e3,stepSize:null!==(i=a.xAxis.stepSize)&&void 0!==i?i:200},A={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:a.maintainAspectRatio,layout:{padding:{right:a.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!y,callbacks:{label:a.xAxis.toolTipCallback,footer:null===(e=a.tooltipConfig)||void 0===e?void 0:e.footerCallback},footerFont:null===(l=null===(r=a.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===l?void 0:l.footerFont},datalabels:{display:null!==(n=!y&&a.showTotal)&&void 0!==n&&n,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var a;const i=o.datasetIndex,e=o.chart.data.datasets;if(i!==e.length-1)return"";const r=o.dataIndex;let l=0;for(let t=0;t<e.length;t++)l+=null!==(a=e[t].data[r])&&void 0!==a?a:0;return l?g(l):""},color:c.content.secondary}},scales:{y:{title:{display:!!a.yAxis.title,text:a.yAxis.title,color:a.yAxis.titleColor,font:{size:p.caption.fontSize,color:a.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:c.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(b=a.yAxis.labelColor)&&void 0!==b?b:c.content.secondary}},x:{title:{display:!!a.xAxis.title,text:a.xAxis.title,color:a.xAxis.titleColor,font:{size:p.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:c.background.base},ticks:Object.assign({callback:a.xAxis.ticksCallback,fontSize:p.caption.fontSize,color:null!==(m=a.xAxis.labelColor)&&void 0!==m?m:c.content.secondary},y?h:{max:a.xAxis.max,stepSize:a.xAxis.stepSize})}}},v={labels:a.yAxis.data.map((t=>t.toString())),datasets:[{data:y?[250,1e3,800,1500,300,600]:a.xAxis.data,backgroundColor:t=>(t=>{var o;const i=t.chart.ctx.createLinearGradient(0,0,0,200);let e="";if(y)e="rgba(0,0,0,0)";else if(a.barColorRGBA){const t=a.barColorRGBA;e=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(o=t.a)&&void 0!==o?o:"0.3"})`}return i.addColorStop(0,e||"rgba(146, 96, 237, 0.3)"),i.addColorStop(1,e||"rgba(146, 96, 237, 0.3)"),i})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(x,Object.assign({padding:a.outerPadding,skipOuterLayout:a.skipOuterLayout},{children:[a.chartHeading&&o(d,Object.assign({color:null!==(f=a.chartHeading.color)&&void 0!==f?f:c.content.secondary},{children:a.chartHeading.heading})),o("div",Object.assign({style:{height:a.maintainAspectRatio?void 0:null!==(u=a.graphCanvasHeight)&&void 0!==u?u:500}},{children:o(s,{options:A,data:v})}))]}))};export{b as HorizontalGraph};
@@ -1,3 +1,4 @@
1
1
  export declare const GraphContainerWrapper: import("styled-components").StyledComponent<"div", any, {
2
2
  padding?: string | undefined;
3
+ skipOuterLayout?: boolean | undefined;
3
4
  }, never>;
@@ -1,4 +1,4 @@
1
- import o from"styled-components";import{COLORS as r}from"../../../../constants/Theme.js";const n=o.div`
2
- background-color: ${r.surface.standard};
3
- padding: ${o=>{var r;return null!==(r=o.padding)&&void 0!==r?r:"24px"}};
4
- `;export{n as GraphContainerWrapper};
1
+ import r from"styled-components";import{COLORS as o}from"../../../../constants/Theme.js";const t=r.div`
2
+ background-color: ${r=>r.skipOuterLayout?"transparent":o.surface.standard};
3
+ padding: ${r=>{var o;return null!==(o=r.padding)&&void 0!==o?o:"24px"}};
4
+ `;export{t as GraphContainerWrapper};
@@ -9,6 +9,7 @@ export type LineChartProps = {
9
9
  dotted?: boolean;
10
10
  gradient?: boolean;
11
11
  legend?: string;
12
+ lineWidth?: number;
12
13
  squareLegends?: boolean;
13
14
  }[];
14
15
  labels: Array<string>;
@@ -16,6 +17,8 @@ export type LineChartProps = {
16
17
  x?: string;
17
18
  y?: string;
18
19
  yPrefix?: string;
20
+ xDrawBorder?: boolean;
21
+ yDrawBorder?: boolean;
19
22
  };
20
23
  legends: Array<string>;
21
24
  stepSize?: number;
@@ -24,5 +27,13 @@ export type LineChartProps = {
24
27
  isZeroState?: boolean;
25
28
  lineThickness?: number;
26
29
  ticksLabelCallback?: (val: string, index: number) => void;
30
+ tension?: number;
31
+ isNewStyles?: boolean;
32
+ prefixCurrencyInYAxis?: string;
33
+ pointRadius?: number;
34
+ useKFormat?: boolean;
35
+ labelCallback?: (context: any) => void;
36
+ afterBodyCallBack?: (context: any) => void;
37
+ titleTooltipCallback?: (context: any) => void;
27
38
  };
28
39
  export declare const LineChart: React.FC<LineChartProps>;
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e,Fragment as o}from"react/jsx-runtime";import{Chart as r,CategoryScale as l,LinearScale as i,PointElement as n,BarElement as a,LineElement as s,ArcElement as d,Filler as c,Title as p,Tooltip as u,Legend as m}from"chart.js";import{useState as g,useRef as y,useEffect as b}from"react";import{Line as v}from"react-chartjs-2";import{BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as f}from"../../../../constants/Theme.js";import{LegendWrapper as x,LegendContainer as k,LegendColor as C}from"./LineChart.styled.js";r.register(l,i,n,a,s,d,c,p,u,m);const j=r=>{let{scaleText:l,labels:i,canvasHeight:n,datas:a,maintainAspectRatio:s=!1,stepSize:d,min:c,max:p,isZeroState:u,lineThickness:m,ticksLabelCallback:j}=r;var z;const[S,w]=g(null),T=y();b((()=>{var t,e,o,r;if(null===(r=null===(o=null===(e=null===(t=T.current)||void 0===t?void 0:t.scales)||void 0===e?void 0:e.y)||void 0===o?void 0:o.ticks)||void 0===r?void 0:r.length){const t=38*T.current.scales.y.ticks.length;w(t)}}),[T]);const q=a.map((t=>({text:t.legend,color:t.lineColor?t.lineColor:t.dotted?f.content.placeholder:f.background.brand,square:t.squareLegends})));return t("div",Object.assign({style:Object.assign(Object.assign({},s?{}:{height:null!==(z=null!=n?n:S)&&void 0!==z?z:204}),{display:"flex",flexDirection:"column",gap:2})},{children:[e(x,{children:q.map(((r,l)=>{let{text:i,color:n,square:a}=r;return i?t(k,{children:[e(C,{color:n,square:a}),e(h,Object.assign({color:"#667085"},{children:i}))]},l):e(o,{})}))}),e(v,{ref:T,options:{maintainAspectRatio:s,responsive:!0,plugins:{legend:{display:!1},title:{display:!1},tooltip:{displayColors:!1,titleFont:()=>({weight:"600",size:14,family:"inter"}),titleColor:()=>f.content.primaryInverse,backgroundColor:f.content.primary,callbacks:{labelTextColor:()=>f.content.primaryInverse},bodyFont:()=>({weight:"400",size:14,family:"inter"})}},scales:{y:{beginAtZero:!0,min:u?0:c,max:u?10:p,ticks:{color:f.content.secondary,callback:t=>{var e;return`${null!==(e=null==l?void 0:l.yPrefix)&&void 0!==e?e:""}${t}`},font:{family:"inter",size:12,weight:"400"},stepSize:u?1:d},title:{display:!!(null==l?void 0:l.y),text:null==l?void 0:l.y},grid:{color:f.background.base}},x:{ticks:{callback:j,color:f.content.secondary,font:{family:"inter",size:12,weight:"400"}},title:{display:!!(null==l?void 0:l.x),text:null==l?void 0:l.x},grid:{display:!1,drawBorder:!1}}}},data:{labels:i,datasets:a.map(((t,e)=>{var o;return{tension:.4,fill:t.gradient?"start":0,pointRadius:1,borderDash:t.dotted?[8,3]:void 0,data:t.data,borderWidth:null!=m?m:2,borderColor:t.lineColor?t.lineColor:t.dotted?f.content.placeholder:f.background.brand,backgroundColor:t.gradient?t=>{const e=t.chart.ctx.createLinearGradient(0,0,0,S?S-75:150);return e.addColorStop(0,"#F1EEFB"),e.addColorStop(1,"rgba(127, 86, 217, 0)"),e}:null!==(o=t.backgroundColor)&&void 0!==o?o:"transparent"}}))}})]}))};export{j as LineChart};
1
+ import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{Chart as o,CategoryScale as r,LinearScale as n,PointElement as i,BarElement as a,LineElement as s,ArcElement as d,Filler as c,Title as u,Tooltip as p,Legend as g}from"chart.js";import{useState as b,useRef as y,useEffect as m}from"react";import{Line as v}from"react-chartjs-2";import{BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as f}from"../../../../constants/Theme.js";import{truncateValueToK as x}from"../utils/calcPercentage.js";import{LegendWrapper as k,LegendContainer as C,LegendColor as j}from"./LineChart.styled.js";o.register(r,n,i,a,s,d,c,u,p,g);const w=o=>{let{scaleText:r,labels:n,canvasHeight:i,datas:a,maintainAspectRatio:s=!1,stepSize:d,min:c,max:u,isZeroState:p,tension:g,isNewStyles:w,prefixCurrencyInYAxis:B,pointRadius:O,useKFormat:S,lineThickness:z,ticksLabelCallback:T,labelCallback:$,afterBodyCallBack:F,titleTooltipCallback:R}=o;var q,A,D;const[L,I]=b(null),P=y();m((()=>{var e,t,l,o;if(null===(o=null===(l=null===(t=null===(e=P.current)||void 0===e?void 0:e.scales)||void 0===t?void 0:t.y)||void 0===l?void 0:l.ticks)||void 0===o?void 0:o.length){const e=38*P.current.scales.y.ticks.length;I(e)}}),[P]);const E=a.map((e=>({text:e.legend,color:e.lineColor?e.lineColor:e.dotted?f.content.placeholder:f.background.brand,square:e.squareLegends}))),W={labels:n,datasets:a.map(((e,t)=>{var l,o;return Object.assign(Object.assign({tension:null!=g?g:.4,fill:e.gradient?"start":0},((e,t)=>{const l={borderColor:e||(t?f.content.placeholder:f.background.brand)};return w?Object.assign({pointStyle:"circle",pointRadius:O||(n&&n.length>10?2.5:4),pointBorderColor:"transparent",pointBackgroundColor:e||(t?f.content.placeholder:f.background.brand)},l):Object.assign({pointRadius:null!=O?O:1},l)})(e.lineColor,e.dotted)),{borderDash:e.dotted?[8,3]:void 0,data:e.data,borderWidth:null!==(l=e.lineWidth)&&void 0!==l?l:2,backgroundColor:e.gradient?e=>{const t=e.chart.ctx.createLinearGradient(0,0,0,L?L-75:150);return t.addColorStop(0,"#F1EEFB"),t.addColorStop(1,"rgba(127, 86, 217, 0)"),t}:null!==(o=e.backgroundColor)&&void 0!==o?o:"transparent",legend:e.legend})}))},Z={maintainAspectRatio:s,responsive:!0,plugins:{legend:{display:!1},title:{display:!1},tooltip:{displayColors:null!=w&&w,titleFont:()=>({weight:"600",size:14,family:"inter"}),titleColor:()=>f.content.primaryInverse,backgroundColor:f.content.primary,callbacks:{labelTextColor:()=>f.content.primaryInverse,title:R,label:$,afterBody:F},bodyFont:()=>({weight:"400",size:14,family:"inter"})}},scales:{y:{beginAtZero:!0,min:p?0:c,max:p?10:u,ticks:{color:f.content.secondary,callback:e=>{var t,l;return S?`${null!==(t=null==r?void 0:r.yPrefix)&&void 0!==t?t:""}${x(e)}${null!=B?B:""}`:`${null!==(l=null==r?void 0:r.yPrefix)&&void 0!==l?l:""}${e}${null!=B?B:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:p?1:d,padding:w?24:0},title:{display:!!(null==r?void 0:r.y),text:null==r?void 0:r.y},grid:{color:f.background.base,drawBorder:null===(q=null==r?void 0:r.yDrawBorder)||void 0===q||q}},x:{ticks:{callback:T,color:f.content.secondary,font:{family:"inter",size:12,weight:"400"}},title:{display:!!(null==r?void 0:r.x),text:null==r?void 0:r.x},grid:{display:!1,drawBorder:null!==(A=null==r?void 0:r.xDrawBorder)&&void 0!==A&&A}}}};return e("div",Object.assign({style:Object.assign(Object.assign({},s?{}:{height:null!==(D=null!=i?i:L)&&void 0!==D?D:204}),{display:"flex",flexDirection:"column",gap:2,width:"100%"})},{children:[t(k,{children:E.map(((o,r)=>{let{text:n,color:i,square:a}=o;return n?e(C,{children:[t(j,{color:i,square:a,newStyle:w}),t(h,Object.assign({color:"#667085"},{children:n}))]},r):t(l,{})}))}),t("div",Object.assign({style:{flex:1}},{children:t(v,{ref:P,options:Z,data:W})}))]}))};export{w as LineChart};
@@ -8,6 +8,7 @@ export declare const LegendColor: import("@emotion/styled").StyledComponent<{
8
8
  as?: import("react").ElementType<any> | undefined;
9
9
  } & {
10
10
  color: string;
11
+ newStyle?: boolean | undefined;
11
12
  square?: boolean | undefined;
12
13
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
14
  export declare const LegendWrapper: import("@emotion/styled").StyledComponent<{
@@ -1 +1 @@
1
- import c from"@emotion/styled/base";const l=c("div","production"===process.env.NODE_ENV?{target:"eyesbkg2"}:{target:"eyesbkg2",label:"LegendContainer"})("production"===process.env.NODE_ENV?{name:"nqbxsj",styles:"display:flex;flex-direction:row;gap:8px;align-items:center"}:{name:"nqbxsj",styles:"display:flex;flex-direction:row;gap:8px;align-items:center",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxpbmVDaGFydC5zdHlsZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQzBDIiwiZmlsZSI6IkxpbmVDaGFydC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiA4cHg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgTGVnZW5kQ29sb3IgPSBzdHlsZWQuZGl2IGBcblx0d2lkdGg6ICR7KHByb3BzKSA9PiAocHJvcHMuc3F1YXJlID8gMTYgOiA4KX1weDtcblx0aGVpZ2h0OiAkeyhwcm9wcykgPT4gKHByb3BzLnNxdWFyZSA/IDE2IDogOCl9cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcbmA7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdGdhcDogMTJweDtcblx0anVzdGlmeS1jb250ZW50OiAkeyhwcm9wcykgPT4gKHByb3BzLnBvc2l0aW9uID8gcHJvcHMucG9zaXRpb24gOiAnZW5kJyl9O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluZUNoYXJ0LnN0eWxlZC5qcy5tYXAiXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),d=c("div","production"===process.env.NODE_ENV?{target:"eyesbkg1"}:{target:"eyesbkg1",label:"LegendColor"})("width:",(c=>c.square?16:8),"px;height:",(c=>c.square?16:8),"px;border-radius:4px;background:",(c=>c.color),";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxpbmVDaGFydC5zdHlsZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT3NDIiwiZmlsZSI6IkxpbmVDaGFydC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiA4cHg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgTGVnZW5kQ29sb3IgPSBzdHlsZWQuZGl2IGBcblx0d2lkdGg6ICR7KHByb3BzKSA9PiAocHJvcHMuc3F1YXJlID8gMTYgOiA4KX1weDtcblx0aGVpZ2h0OiAkeyhwcm9wcykgPT4gKHByb3BzLnNxdWFyZSA/IDE2IDogOCl9cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcbmA7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdGdhcDogMTJweDtcblx0anVzdGlmeS1jb250ZW50OiAkeyhwcm9wcykgPT4gKHByb3BzLnBvc2l0aW9uID8gcHJvcHMucG9zaXRpb24gOiAnZW5kJyl9O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluZUNoYXJ0LnN0eWxlZC5qcy5tYXAiXX0= */")),e=c("div","production"===process.env.NODE_ENV?{target:"eyesbkg0"}:{target:"eyesbkg0",label:"LegendWrapper"})("display:flex;flex-direction:row;gap:12px;justify-content:",(c=>c.position?c.position:"end"),";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxpbmVDaGFydC5zdHlsZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYXdDIiwiZmlsZSI6IkxpbmVDaGFydC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiA4cHg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgTGVnZW5kQ29sb3IgPSBzdHlsZWQuZGl2IGBcblx0d2lkdGg6ICR7KHByb3BzKSA9PiAocHJvcHMuc3F1YXJlID8gMTYgOiA4KX1weDtcblx0aGVpZ2h0OiAkeyhwcm9wcykgPT4gKHByb3BzLnNxdWFyZSA/IDE2IDogOCl9cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcbmA7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdGdhcDogMTJweDtcblx0anVzdGlmeS1jb250ZW50OiAkeyhwcm9wcykgPT4gKHByb3BzLnBvc2l0aW9uID8gcHJvcHMucG9zaXRpb24gOiAnZW5kJyl9O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluZUNoYXJ0LnN0eWxlZC5qcy5tYXAiXX0= */"));export{d as LegendColor,l as LegendContainer,e as LegendWrapper};
1
+ import c from"@emotion/styled/base";const l=c("div","production"===process.env.NODE_ENV?{target:"eyesbkg2"}:{target:"eyesbkg2",label:"LegendContainer"})("production"===process.env.NODE_ENV?{name:"nqbxsj",styles:"display:flex;flex-direction:row;gap:8px;align-items:center"}:{name:"nqbxsj",styles:"display:flex;flex-direction:row;gap:8px;align-items:center",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxpbmVDaGFydC5zdHlsZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQzBDIiwiZmlsZSI6IkxpbmVDaGFydC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiA4cHg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgTGVnZW5kQ29sb3IgPSBzdHlsZWQuZGl2IGBcblx0d2lkdGg6ICR7KHByb3BzKSA9PiAocHJvcHMubmV3U3R5bGUgfHwgcHJvcHMuc3F1YXJlID8gJzE2cHgnIDogJzhweCcpfTtcblx0aGVpZ2h0OiAkeyhwcm9wcykgPT4gKHByb3BzLm5ld1N0eWxlIHx8IHByb3BzLnNxdWFyZSA/ICcxNnB4JyA6ICc4cHgnKX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcbmA7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdGdhcDogMTJweDtcblx0anVzdGlmeS1jb250ZW50OiAkeyhwcm9wcykgPT4gKHByb3BzLnBvc2l0aW9uID8gcHJvcHMucG9zaXRpb24gOiAnZW5kJyl9O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluZUNoYXJ0LnN0eWxlZC5qcy5tYXAiXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),e=c("div","production"===process.env.NODE_ENV?{target:"eyesbkg1"}:{target:"eyesbkg1",label:"LegendColor"})("width:",(c=>c.newStyle||c.square?"16px":"8px"),";height:",(c=>c.newStyle||c.square?"16px":"8px"),";border-radius:4px;background:",(c=>c.color),";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxpbmVDaGFydC5zdHlsZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT3NDIiwiZmlsZSI6IkxpbmVDaGFydC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiA4cHg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgTGVnZW5kQ29sb3IgPSBzdHlsZWQuZGl2IGBcblx0d2lkdGg6ICR7KHByb3BzKSA9PiAocHJvcHMubmV3U3R5bGUgfHwgcHJvcHMuc3F1YXJlID8gJzE2cHgnIDogJzhweCcpfTtcblx0aGVpZ2h0OiAkeyhwcm9wcykgPT4gKHByb3BzLm5ld1N0eWxlIHx8IHByb3BzLnNxdWFyZSA/ICcxNnB4JyA6ICc4cHgnKX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcbmA7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdGdhcDogMTJweDtcblx0anVzdGlmeS1jb250ZW50OiAkeyhwcm9wcykgPT4gKHByb3BzLnBvc2l0aW9uID8gcHJvcHMucG9zaXRpb24gOiAnZW5kJyl9O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluZUNoYXJ0LnN0eWxlZC5qcy5tYXAiXX0= */")),b=c("div","production"===process.env.NODE_ENV?{target:"eyesbkg0"}:{target:"eyesbkg0",label:"LegendWrapper"})("display:flex;flex-direction:row;gap:12px;justify-content:",(c=>c.position?c.position:"end"),";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxpbmVDaGFydC5zdHlsZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYXdDIiwiZmlsZSI6IkxpbmVDaGFydC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiA4cHg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgTGVnZW5kQ29sb3IgPSBzdHlsZWQuZGl2IGBcblx0d2lkdGg6ICR7KHByb3BzKSA9PiAocHJvcHMubmV3U3R5bGUgfHwgcHJvcHMuc3F1YXJlID8gJzE2cHgnIDogJzhweCcpfTtcblx0aGVpZ2h0OiAkeyhwcm9wcykgPT4gKHByb3BzLm5ld1N0eWxlIHx8IHByb3BzLnNxdWFyZSA/ICcxNnB4JyA6ICc4cHgnKX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcbmA7XHJcbmV4cG9ydCBjb25zdCBMZWdlbmRXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdGdhcDogMTJweDtcblx0anVzdGlmeS1jb250ZW50OiAkeyhwcm9wcykgPT4gKHByb3BzLnBvc2l0aW9uID8gcHJvcHMucG9zaXRpb24gOiAnZW5kJyl9O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9TGluZUNoYXJ0LnN0eWxlZC5qcy5tYXAiXX0= */"));export{e as LegendColor,l as LegendContainer,b as LegendWrapper};