awing-library 2.1.141-beta → 2.1.143-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.
@@ -12,6 +12,7 @@ var Detail_1 = __importDefault(require("./Detail"));
12
12
  var Utils_1 = require("./Utils");
13
13
  var AWING_1 = require("../../../../../AWING");
14
14
  var Context_1 = __importDefault(require("../Context"));
15
+ var fakeData_json_1 = __importDefault(require("../fakeData.json"));
15
16
  var styles = {
16
17
  root: {
17
18
  border: '1px solid #ccc',
@@ -115,7 +116,7 @@ var ChartWithType = function (props) {
115
116
  });
116
117
  return final;
117
118
  };
118
- return ((0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 1, sx: styles.root, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 3 }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, variant: "outlined", children: (0, jsx_runtime_1.jsx)(MultipleHierarchicalChoice_1.MultipleHierarchicalChoice, { onChange: handleGroupChange, options: groupOptions, placeholder: t('Campaign.SelectGroup'), label: translationText.timeline, value: getValue() }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, variant: "outlined", children: (0, jsx_runtime_1.jsx)(material_1.TextField, { select: true, fullWidth: true, label: translationText.timeline, id: "timelineType", name: "timelineType", value: timelineType, onChange: function (e) { return setTimelineType(e.target.value); }, size: "small", variant: "outlined", children: ChartByType.map(function (type, idx) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: idx, children: type }, idx)); }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, variant: "outlined", children: (0, jsx_runtime_1.jsx)(material_1.TextField, { select: true, fullWidth: true, label: t('Campaign.StatisticType'), id: "statisticType", name: "statisticType", value: statisticType, onChange: function (e) { return setStatisticType(e.target.value); }, size: "small", variant: "outlined", children: SType.map(function (type, idx) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: idx, children: type }, idx)); }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1 }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, sx: styles.chart, children: statisticType === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Box, { component: 'div', sx: styles.chartWrapper, children: (0, jsx_runtime_1.jsx)(AWING_1.BarLineComponent, { chart: chart, dataChart: (0, Utils_1.convertToChartData)(statisticalData, subCampaigns), type: 'line', data: [], timeline: timelineType, optionCustom: {
119
+ return ((0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 1, sx: styles.root, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 3 }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, variant: "outlined", children: (0, jsx_runtime_1.jsx)(MultipleHierarchicalChoice_1.MultipleHierarchicalChoice, { onChange: handleGroupChange, options: groupOptions, placeholder: t('Campaign.SelectGroup'), label: translationText.timeline, value: getValue() }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, variant: "outlined", children: (0, jsx_runtime_1.jsx)(material_1.TextField, { select: true, fullWidth: true, label: translationText.timeline, id: "timelineType", name: "timelineType", value: timelineType, onChange: function (e) { return setTimelineType(e.target.value); }, size: "small", variant: "outlined", children: ChartByType.map(function (type, idx) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: idx, children: type }, idx)); }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, variant: "outlined", children: (0, jsx_runtime_1.jsx)(material_1.TextField, { select: true, fullWidth: true, label: t('Campaign.StatisticType'), id: "statisticType", name: "statisticType", value: statisticType, onChange: function (e) { return setStatisticType(e.target.value); }, size: "small", variant: "outlined", children: SType.map(function (type, idx) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: idx, children: type }, idx)); }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1 }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 12, sx: styles.chart, children: statisticType === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Box, { component: 'div', sx: styles.chartWrapper, children: (0, jsx_runtime_1.jsx)(AWING_1.BarLineComponent, { chart: chart, dataChart: (0, Utils_1.convertToChartData)(fakeData_json_1.default, subCampaigns), type: 'line', data: [], timeline: timelineType, optionCustom: {
119
120
  scales: {
120
121
  y: {
121
122
  title: {
@@ -305,7 +305,7 @@ function dataGroupByPlace(subCampaigns, ids) {
305
305
  exports.dataGroupByPlace = dataGroupByPlace;
306
306
  var convertToChartData = function (data, campaignGroups) {
307
307
  var _a;
308
- var convertData = Object.assign.apply(Object, __spreadArray([{}], [Enum_1.BaseEvent[Enum_2.AnalyticType.VIEW], Enum_1.BaseEvent[Enum_2.AnalyticType.CLICK], 'Spot', 'Engagement'].map(function (x) {
308
+ var convertData = Object.assign.apply(Object, __spreadArray([{}], [Enum_1.BaseEvent[Enum_2.AnalyticType.VIEW], 'Spot', 'Engagement'].map(function (x) {
309
309
  var _a;
310
310
  return (_a = {}, _a[x] = { total: 0, chartData: [] }, _a);
311
311
  }), false));
@@ -325,7 +325,14 @@ var convertToChartData = function (data, campaignGroups) {
325
325
  x.analyticEventSummaries.forEach(function (event) {
326
326
  var _a;
327
327
  if ([Enum_1.BaseEvent[billingUnit], Enum_1.BaseEvent[Enum_2.AnalyticType.VIEW]].includes(event.eventLabel)) {
328
- var objKey = event.eventLabel === Enum_1.BaseEvent[Enum_2.AnalyticType.AUTHENTICATION] ? isSpot ? 'Spot' : 'Engagement' : event.eventLabel;
328
+ var objKey = [
329
+ Enum_1.BaseEvent[Enum_2.AnalyticType.AUTHENTICATION],
330
+ Enum_1.BaseEvent[Enum_2.AnalyticType.CLICK],
331
+ ].includes(event.eventLabel)
332
+ ? isSpot
333
+ ? 'Spot'
334
+ : 'Engagement'
335
+ : event.eventLabel;
329
336
  (_a = convertData[objKey]) === null || _a === void 0 ? void 0 : _a.chartData.push({
330
337
  y: event.total,
331
338
  x: timeline,
@@ -338,7 +345,6 @@ var convertToChartData = function (data, campaignGroups) {
338
345
  });
339
346
  var translate = (_a = {},
340
347
  _a[Enum_1.BaseEvent[Enum_2.AnalyticType.VIEW]] = 'Common.Impression',
341
- _a[Enum_1.BaseEvent[Enum_2.AnalyticType.CLICK]] = 'Statistics.NumberOfConnections',
342
348
  _a['Spot'] = 'Campaign.Spot',
343
349
  _a['Engagement'] = 'Campaign.Engagement',
344
350
  _a);
@@ -0,0 +1,618 @@
1
+ [
2
+ {
3
+ "timeline": 20240513,
4
+ "campaignId": "5344841815813731135",
5
+ "placeId": "5504693026866563256",
6
+ "domainId": "4913100144472996590",
7
+ "analyticEventSummaries": [
8
+ {
9
+ "eventLabel": "View",
10
+ "total": 23
11
+ },
12
+ {
13
+ "eventLabel": "Authentication",
14
+ "total": 1
15
+ },
16
+ {
17
+ "eventLabel": "Click",
18
+ "total": 12
19
+ }
20
+ ],
21
+ "campaignGroupId": 2,
22
+ "campaignAdId": 1
23
+ },
24
+ {
25
+ "timeline": 20240514,
26
+ "campaignId": "5344841815813731135",
27
+ "placeId": "5504693026866563256",
28
+ "domainId": "4913100144472996590",
29
+ "analyticEventSummaries": [
30
+ {
31
+ "eventLabel": "View",
32
+ "total": 23
33
+ },
34
+ {
35
+ "eventLabel": "Authentication",
36
+ "total": 1
37
+ },
38
+ {
39
+ "eventLabel": "Click",
40
+ "total": 12
41
+ }
42
+ ],
43
+ "campaignGroupId": 2,
44
+ "campaignAdId": 1
45
+ },
46
+ {
47
+ "timeline": 20240513,
48
+ "campaignId": "5344841815813731135",
49
+ "placeId": "5504693026866563256",
50
+ "domainId": "4913100144472996590",
51
+ "analyticEventSummaries": [
52
+ {
53
+ "eventLabel": "View",
54
+ "total": 23
55
+ },
56
+ {
57
+ "eventLabel": "Authentication",
58
+ "total": 13
59
+ },
60
+ {
61
+ "eventLabel": "Click",
62
+ "total": 12
63
+ }
64
+ ],
65
+ "campaignGroupId": 2,
66
+ "campaignAdId": 2
67
+ },
68
+ {
69
+ "timeline": 20240514,
70
+ "campaignId": "5344841815813731135",
71
+ "placeId": "5504693026866563256",
72
+ "domainId": "4913100144472996590",
73
+ "analyticEventSummaries": [
74
+ {
75
+ "eventLabel": "View",
76
+ "total": 23
77
+ },
78
+ {
79
+ "eventLabel": "Authentication",
80
+ "total": 9
81
+ },
82
+ {
83
+ "eventLabel": "Click",
84
+ "total": 12
85
+ }
86
+ ],
87
+ "campaignGroupId": 2,
88
+ "campaignAdId": 2
89
+ },
90
+ {
91
+ "timeline": 20240513,
92
+ "campaignId": "5344841815813731135",
93
+ "placeId": "5504693026866563256",
94
+ "domainId": "4913100144472996590",
95
+ "analyticEventSummaries": [
96
+ {
97
+ "eventLabel": "View",
98
+ "total": 23
99
+ },
100
+ {
101
+ "eventLabel": "Authentication",
102
+ "total": 1
103
+ },
104
+ {
105
+ "eventLabel": "Click",
106
+ "total": 12
107
+ }
108
+ ],
109
+ "campaignGroupId": 1,
110
+ "campaignAdId": 1
111
+ },
112
+ {
113
+ "timeline": 20240514,
114
+ "campaignId": "5344841815813731135",
115
+ "placeId": "5504693026866563256",
116
+ "domainId": "4913100144472996590",
117
+ "analyticEventSummaries": [
118
+ {
119
+ "eventLabel": "View",
120
+ "total": 23
121
+ },
122
+ {
123
+ "eventLabel": "Authentication",
124
+ "total": 1
125
+ },
126
+ {
127
+ "eventLabel": "Click",
128
+ "total": 12
129
+ }
130
+ ],
131
+ "campaignGroupId": 1,
132
+ "campaignAdId": 1
133
+ },
134
+ {
135
+ "timeline": 20240513,
136
+ "campaignId": "5344841815813731135",
137
+ "placeId": "5504693026866563256",
138
+ "domainId": "4913100144472996590",
139
+ "analyticEventSummaries": [
140
+ {
141
+ "eventLabel": "View",
142
+ "total": 23
143
+ },
144
+ {
145
+ "eventLabel": "Authentication",
146
+ "total": 13
147
+ },
148
+ {
149
+ "eventLabel": "Click",
150
+ "total": 12
151
+ }
152
+ ],
153
+ "campaignGroupId": 1,
154
+ "campaignAdId": 2
155
+ },
156
+ {
157
+ "timeline": 20240514,
158
+ "campaignId": "5344841815813731135",
159
+ "placeId": "5504693026866563256",
160
+ "domainId": "4913100144472996590",
161
+ "analyticEventSummaries": [
162
+ {
163
+ "eventLabel": "View",
164
+ "total": 23
165
+ },
166
+ {
167
+ "eventLabel": "Authentication",
168
+ "total": 9
169
+ },
170
+ {
171
+ "eventLabel": "Click",
172
+ "total": 12
173
+ }
174
+ ],
175
+ "campaignGroupId": 1,
176
+ "campaignAdId": 2
177
+ },
178
+ {
179
+ "timeline": 20240514,
180
+ "campaignId": "5344841815813731135",
181
+ "placeId": "5504693026866563256",
182
+ "domainId": "4913100144472996590",
183
+ "analyticEventSummaries": [
184
+ {
185
+ "eventLabel": "View",
186
+ "total": 23
187
+ },
188
+ {
189
+ "eventLabel": "Authentication",
190
+ "total": 1
191
+ },
192
+ {
193
+ "eventLabel": "Click",
194
+ "total": 12
195
+ }
196
+ ],
197
+ "campaignGroupId": 1,
198
+ "campaignAdId": 1
199
+ },
200
+ {
201
+ "timeline": 20240515,
202
+ "campaignId": "5344841815813731135",
203
+ "placeId": "5504693026866563256",
204
+ "domainId": "4913100144472996590",
205
+ "analyticEventSummaries": [
206
+ {
207
+ "eventLabel": "View",
208
+ "total": 23
209
+ },
210
+ {
211
+ "eventLabel": "Authentication",
212
+ "total": 14
213
+ },
214
+ {
215
+ "eventLabel": "Click",
216
+ "total": 12
217
+ }
218
+ ],
219
+ "campaignGroupId": 1,
220
+ "campaignAdId": 2
221
+ },
222
+ {
223
+ "timeline": 20240516,
224
+ "campaignId": "5344841815813731135",
225
+ "placeId": "5504693026866563256",
226
+ "domainId": "4913100144472996590",
227
+ "analyticEventSummaries": [
228
+ {
229
+ "eventLabel": "View",
230
+ "total": 23
231
+ },
232
+ {
233
+ "eventLabel": "Authentication",
234
+ "total": 1
235
+ },
236
+ {
237
+ "eventLabel": "Click",
238
+ "total": 12
239
+ }
240
+ ],
241
+ "campaignGroupId": 1,
242
+ "campaignAdId": 1
243
+ },
244
+ {
245
+ "timeline": 20240517,
246
+ "campaignId": "5344841815813731135",
247
+ "placeId": "5504693026866563256",
248
+ "domainId": "4913100144472996590",
249
+ "analyticEventSummaries": [
250
+ {
251
+ "eventLabel": "View",
252
+ "total": 23
253
+ },
254
+ {
255
+ "eventLabel": "Authentication",
256
+ "total": 1
257
+ },
258
+ {
259
+ "eventLabel": "Click",
260
+ "total": 12
261
+ }
262
+ ],
263
+ "campaignGroupId": 1,
264
+ "campaignAdId": 1
265
+ },
266
+ {
267
+ "timeline": 20240518,
268
+ "campaignId": "5344841815813731135",
269
+ "placeId": "5504693026866563256",
270
+ "domainId": "4913100144472996590",
271
+ "analyticEventSummaries": [
272
+ {
273
+ "eventLabel": "View",
274
+ "total": 23
275
+ },
276
+ {
277
+ "eventLabel": "Authentication",
278
+ "total": 1
279
+ },
280
+ {
281
+ "eventLabel": "Click",
282
+ "total": 12
283
+ }
284
+ ],
285
+ "campaignGroupId": 1,
286
+ "campaignAdId": 1
287
+ },
288
+ {
289
+ "timeline": 20240519,
290
+ "campaignId": "5344841815813731135",
291
+ "placeId": "5504693026866563256",
292
+ "domainId": "4913100144472996590",
293
+ "analyticEventSummaries": [
294
+ {
295
+ "eventLabel": "View",
296
+ "total": 23
297
+ },
298
+ {
299
+ "eventLabel": "Authentication",
300
+ "total": 1
301
+ },
302
+ {
303
+ "eventLabel": "Click",
304
+ "total": 12
305
+ }
306
+ ],
307
+ "campaignGroupId": 1,
308
+ "campaignAdId": 1
309
+ },
310
+ {
311
+ "timeline": 20240520,
312
+ "campaignId": "5344841815813731135",
313
+ "placeId": "5504693026866563256",
314
+ "domainId": "4913100144472996590",
315
+ "analyticEventSummaries": [
316
+ {
317
+ "eventLabel": "View",
318
+ "total": 23
319
+ },
320
+ {
321
+ "eventLabel": "Authentication",
322
+ "total": 1
323
+ },
324
+ {
325
+ "eventLabel": "Click",
326
+ "total": 12
327
+ }
328
+ ],
329
+ "campaignGroupId": 1,
330
+ "campaignAdId": 1
331
+ },
332
+ {
333
+ "timeline": 20240521,
334
+ "campaignId": "5344841815813731135",
335
+ "placeId": "5504693026866563256",
336
+ "domainId": "4913100144472996590",
337
+ "analyticEventSummaries": [
338
+ {
339
+ "eventLabel": "View",
340
+ "total": 23
341
+ },
342
+ {
343
+ "eventLabel": "Authentication",
344
+ "total": 1
345
+ },
346
+ {
347
+ "eventLabel": "Click",
348
+ "total": 12
349
+ }
350
+ ],
351
+ "campaignGroupId": 1,
352
+ "campaignAdId": 1
353
+ },
354
+ {
355
+ "timeline": 20240522,
356
+ "campaignId": "5344841815813731135",
357
+ "placeId": "5504693026866563256",
358
+ "domainId": "4913100144472996590",
359
+ "analyticEventSummaries": [
360
+ {
361
+ "eventLabel": "View",
362
+ "total": 23
363
+ },
364
+ {
365
+ "eventLabel": "Authentication",
366
+ "total": 1
367
+ },
368
+ {
369
+ "eventLabel": "Click",
370
+ "total": 12
371
+ }
372
+ ],
373
+ "campaignGroupId": 1,
374
+ "campaignAdId": 1
375
+ },
376
+ {
377
+ "timeline": 20240523,
378
+ "campaignId": "5344841815813731135",
379
+ "placeId": "5504693026866563256",
380
+ "domainId": "4913100144472996590",
381
+ "analyticEventSummaries": [
382
+ {
383
+ "eventLabel": "View",
384
+ "total": 23
385
+ },
386
+ {
387
+ "eventLabel": "Authentication",
388
+ "total": 1
389
+ },
390
+ {
391
+ "eventLabel": "Click",
392
+ "total": 12
393
+ }
394
+ ],
395
+ "campaignGroupId": 1,
396
+ "campaignAdId": 1
397
+ },
398
+ {
399
+ "timeline": 20240524,
400
+ "campaignId": "5344841815813731135",
401
+ "placeId": "5504693026866563256",
402
+ "domainId": "4913100144472996590",
403
+ "analyticEventSummaries": [
404
+ {
405
+ "eventLabel": "View",
406
+ "total": 23
407
+ },
408
+ {
409
+ "eventLabel": "Authentication",
410
+ "total": 1
411
+ },
412
+ {
413
+ "eventLabel": "Click",
414
+ "total": 12
415
+ }
416
+ ],
417
+ "campaignGroupId": 1,
418
+ "campaignAdId": 1
419
+ },
420
+ {
421
+ "timeline": 20240525,
422
+ "campaignId": "5344841815813731135",
423
+ "placeId": "5504693026866563256",
424
+ "domainId": "4913100144472996590",
425
+ "analyticEventSummaries": [
426
+ {
427
+ "eventLabel": "View",
428
+ "total": 23
429
+ },
430
+ {
431
+ "eventLabel": "Authentication",
432
+ "total": 1
433
+ },
434
+ {
435
+ "eventLabel": "Click",
436
+ "total": 12
437
+ }
438
+ ],
439
+ "campaignGroupId": 1,
440
+ "campaignAdId": 1
441
+ },
442
+ {
443
+ "timeline": 20240526,
444
+ "campaignId": "5344841815813731135",
445
+ "placeId": "5504693026866563256",
446
+ "domainId": "4913100144472996590",
447
+ "analyticEventSummaries": [
448
+ {
449
+ "eventLabel": "View",
450
+ "total": 23
451
+ },
452
+ {
453
+ "eventLabel": "Authentication",
454
+ "total": 1
455
+ },
456
+ {
457
+ "eventLabel": "Click",
458
+ "total": 12
459
+ }
460
+ ],
461
+ "campaignGroupId": 1,
462
+ "campaignAdId": 1
463
+ },
464
+ {
465
+ "timeline": 20240527,
466
+ "campaignId": "5344841815813731135",
467
+ "placeId": "5504693026866563256",
468
+ "domainId": "4913100144472996590",
469
+ "analyticEventSummaries": [
470
+ {
471
+ "eventLabel": "View",
472
+ "total": 23
473
+ },
474
+ {
475
+ "eventLabel": "Authentication",
476
+ "total": 1
477
+ },
478
+ {
479
+ "eventLabel": "Click",
480
+ "total": 12
481
+ }
482
+ ],
483
+ "campaignGroupId": 1,
484
+ "campaignAdId": 1
485
+ },
486
+ {
487
+ "timeline": 20240528,
488
+ "campaignId": "5344841815813731135",
489
+ "placeId": "5504693026866563256",
490
+ "domainId": "4913100144472996590",
491
+ "analyticEventSummaries": [
492
+ {
493
+ "eventLabel": "View",
494
+ "total": 23
495
+ },
496
+ {
497
+ "eventLabel": "Authentication",
498
+ "total": 1
499
+ },
500
+ {
501
+ "eventLabel": "Click",
502
+ "total": 12
503
+ }
504
+ ],
505
+ "campaignGroupId": 1,
506
+ "campaignAdId": 1
507
+ },
508
+ {
509
+ "timeline": 20240529,
510
+ "campaignId": "5344841815813731135",
511
+ "placeId": "5504693026866563256",
512
+ "domainId": "4913100144472996590",
513
+ "analyticEventSummaries": [
514
+ {
515
+ "eventLabel": "View",
516
+ "total": 23
517
+ },
518
+ {
519
+ "eventLabel": "Authentication",
520
+ "total": 1
521
+ },
522
+ {
523
+ "eventLabel": "Click",
524
+ "total": 12
525
+ }
526
+ ],
527
+ "campaignGroupId": 1,
528
+ "campaignAdId": 1
529
+ },
530
+ {
531
+ "timeline": 20240530,
532
+ "campaignId": "5344841815813731135",
533
+ "placeId": "5504693026866563256",
534
+ "domainId": "4913100144472996590",
535
+ "analyticEventSummaries": [
536
+ {
537
+ "eventLabel": "View",
538
+ "total": 23
539
+ },
540
+ {
541
+ "eventLabel": "Authentication",
542
+ "total": 1
543
+ },
544
+ {
545
+ "eventLabel": "Click",
546
+ "total": 12
547
+ }
548
+ ],
549
+ "campaignGroupId": 1,
550
+ "campaignAdId": 1
551
+ },
552
+ {
553
+ "timeline": 20240531,
554
+ "campaignId": "5344841815813731135",
555
+ "placeId": "5504693026866563256",
556
+ "domainId": "4913100144472996590",
557
+ "analyticEventSummaries": [
558
+ {
559
+ "eventLabel": "View",
560
+ "total": 23
561
+ },
562
+ {
563
+ "eventLabel": "Authentication",
564
+ "total": 1
565
+ },
566
+ {
567
+ "eventLabel": "Click",
568
+ "total": 12
569
+ }
570
+ ],
571
+ "campaignGroupId": 1,
572
+ "campaignAdId": 1
573
+ },
574
+ {
575
+ "timeline": 20240601,
576
+ "campaignId": "5344841815813731135",
577
+ "placeId": "5504693026866563256",
578
+ "domainId": "4913100144472996590",
579
+ "analyticEventSummaries": [
580
+ {
581
+ "eventLabel": "View",
582
+ "total": 23
583
+ },
584
+ {
585
+ "eventLabel": "Authentication",
586
+ "total": 1
587
+ },
588
+ {
589
+ "eventLabel": "Click",
590
+ "total": 12
591
+ }
592
+ ],
593
+ "campaignGroupId": 1,
594
+ "campaignAdId": 1
595
+ },
596
+ {
597
+ "timeline": 20240602,
598
+ "campaignId": "5344841815813731135",
599
+ "placeId": "5504693026866563256",
600
+ "domainId": "4913100144472996590",
601
+ "analyticEventSummaries": [
602
+ {
603
+ "eventLabel": "View",
604
+ "total": 23
605
+ },
606
+ {
607
+ "eventLabel": "Authentication",
608
+ "total": 1
609
+ },
610
+ {
611
+ "eventLabel": "Click",
612
+ "total": 12
613
+ }
614
+ ],
615
+ "campaignGroupId": 1,
616
+ "campaignAdId": 1
617
+ }
618
+ ]
@@ -176,7 +176,7 @@ var RowAdvanceComponent = function (_a) {
176
176
  ? ''
177
177
  : totalRate }, item.id));
178
178
  case Enum_1.HEAD_CELL_NAMES.TOTAL:
179
- return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: totalView }, item.id));
179
+ return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: (0, Helpers_1.formatNumber)(totalView) }, item.id));
180
180
  case Enum_1.HEAD_CELL_NAMES.IMPRESSION:
181
181
  return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row === null || row === void 0 ? void 0 : row.view }, item.id));
182
182
  case Enum_1.HEAD_CELL_NAMES.AUTHENTICATION:
@@ -255,7 +255,6 @@ var BarLineComponent = function (props) {
255
255
  boxSpan.style.height = '15px';
256
256
  boxSpan.style.marginRight = '15px';
257
257
  boxSpan.style.width = '15px';
258
- console.log('item', item);
259
258
  if ((item === null || item === void 0 ? void 0 : item.lineWidth) && (item === null || item === void 0 ? void 0 : item.pointStyle)) {
260
259
  boxSpan.setAttribute("class", classes.point);
261
260
  }
@@ -41,7 +41,7 @@ function GroupTable(props) {
41
41
  var _b = (0, react_1.useState)(0), groupPageIndex = _b[0], setGroupPageIndex = _b[1];
42
42
  var _c = (0, react_1.useState)(constants_1.PAGE_SIZE_DEFAULT), groupPageSize = _c[0], setGroupPageSize = _c[1];
43
43
  var _d = (0, react_1.useState)(0), totalCount = _d[0], setTotalCount = _d[1];
44
- var _e = (0, react_1.useState)(false), loading = _e[0], setLoading = _e[1];
44
+ var _e = (0, react_1.useState)(true), loading = _e[0], setLoading = _e[1];
45
45
  var groupKeys = headCells
46
46
  .filter(function (headCell) { return headCell.isGrouping; })
47
47
  .map(function (headCell) { return headCell.field; });
@@ -55,11 +55,10 @@ function GroupTable(props) {
55
55
  var handleGetGroupData = function () {
56
56
  setLoading(true);
57
57
  onGetData(filters, groupPageIndex, groupPageSize).then(function (result) {
58
- setLoading(false);
59
58
  !(0, lodash_1.isEqual)(data, result.data) && setData(result.data);
60
59
  !(0, lodash_1.isEqual)(totalCount, result.totalCount) &&
61
60
  setTotalCount(result.totalCount);
62
- });
61
+ }).finally(function () { setLoading(false); });
63
62
  };
64
63
  var handleChangePage = function (newPage) {
65
64
  setGroupPageIndex(newPage);
@@ -15,7 +15,7 @@ export declare enum TIMELINE_TYPE {
15
15
  */
16
16
  export declare function getCookie(name: string): string | undefined;
17
17
  export declare function dateToString(date: moment.MomentInput): string;
18
- export declare function formatNumber(num: number | bigint | undefined): string;
18
+ export declare function formatNumber(num: number | bigint | string | undefined): string;
19
19
  export declare function getQueryVariable(variable: string): string;
20
20
  export declare function displayLongString(str: string, maxLength: number): string;
21
21
  export declare function generateUUID(): string;
@@ -55,8 +55,9 @@ function dateToString(date) {
55
55
  }
56
56
  exports.dateToString = dateToString;
57
57
  function formatNumber(num) {
58
- if (num || num === 0) {
59
- return new Intl.NumberFormat(i18n_1.default.language === 'vi' ? 'vi-VN' : 'en-US').format(num);
58
+ var value = Number(Number(num).toFixed(2));
59
+ if (value || value === 0) {
60
+ return new Intl.NumberFormat(i18n_1.default.language === 'vi' ? 'vi-VN' : 'en-US').format(value);
60
61
  }
61
62
  else
62
63
  return '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.141-beta",
3
+ "version": "2.1.143-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",