@ironsource/shared-ui 2.1.12-test.60 → 2.1.12-test.62
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.
- package/Chart.vue_vue_type_style_index_0_scoped_82f5b24e_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_bd4ef110_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_78a8c051_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_fd9e4ea2_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_10b18e17_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_81cdfd5e_lang.css +1 -0
- package/SubHeader.vue_vue_type_style_index_0_scoped_74a5418e_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_40d98a66_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +23 -8
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +99 -90
- package/components/chart/ChartHeader.vue.d.ts +7 -7
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +48 -79
- package/components/chart/ChartHeaderTrend.vue.d.ts +6 -5
- package/components/chart/ChartHeaderTrend.vue.js +3 -3
- package/components/chart/ChartHeaderTrend.vue2.js +15 -14
- package/components/chart/ChartLegend.vue.d.ts +7 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +75 -68
- package/components/chart/ChartPlane.vue.d.ts +29 -9
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +290 -252
- package/components/chart/ChartStoryArgs.d.ts +27 -2
- package/components/chart/ChartTooltip.vue.d.ts +6 -1
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +48 -58
- package/components/chart/components/SubHeader.vue.d.ts +52 -0
- package/components/chart/components/SubHeader.vue.js +7 -0
- package/components/chart/components/SubHeader.vue2.js +61 -0
- package/components/chart/components/TooltipHeader.vue.d.ts +45 -0
- package/components/chart/components/TooltipHeader.vue.js +7 -0
- package/components/chart/components/TooltipHeader.vue2.js +59 -0
- package/components/chart/consts.d.ts +12 -6
- package/components/chart/consts.js +31 -21
- package/components/chart/index.d.ts +101 -43
- package/components/chart/mockData.d.ts +11 -0
- package/components/chart/types.d.ts +25 -5
- package/components/chart/types.js +4 -2
- package/components/chart/utils/highlightUtils.d.ts +3 -0
- package/components/chart/utils/highlightUtils.js +18 -0
- package/components/chart/utils/utils.d.ts +2 -1
- package/components/chart/utils/utils.js +23 -8
- package/consts/common.d.ts +1 -0
- package/consts/common.js +4 -0
- package/consts/regex.d.ts +1 -0
- package/consts/regex.js +2 -1
- package/index.js +13 -9
- package/package.json +1 -1
- package/utils/text.d.ts +3 -0
- package/utils/text.js +24 -5
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +4 -0
- package/Chart.vue_vue_type_style_index_0_scoped_de950ffe_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_25d0e129_lang.css +0 -1
|
@@ -16,22 +16,25 @@ declare const ChartTypes: () => ({
|
|
|
16
16
|
chartType: import("./types").ChartType;
|
|
17
17
|
hideLegend: boolean;
|
|
18
18
|
xAxisFormat: import("./types").ValueFormat;
|
|
19
|
-
|
|
19
|
+
totalsChart: boolean;
|
|
20
20
|
parsing: import("./types").ChartParsingConfig;
|
|
21
|
+
yAxisFormat: import("./types").ValueFormat;
|
|
21
22
|
dataSets: import("./types").ChartDataSet[];
|
|
22
23
|
trendTooltip: any;
|
|
23
24
|
subheader: string;
|
|
24
25
|
subheaderTooltip: any;
|
|
25
26
|
trendValue: string | number;
|
|
26
|
-
trendDirection: "
|
|
27
|
+
trendDirection: import("./types").TrendDirection;
|
|
27
28
|
tickCount: number;
|
|
29
|
+
truncateTickLabels: boolean;
|
|
30
|
+
keepSubheaderVisible: boolean;
|
|
28
31
|
noDataIcon: string;
|
|
29
32
|
noDataTitle: string;
|
|
30
33
|
noDataSubtitle: string;
|
|
31
34
|
withAnimation: boolean;
|
|
32
35
|
tooltipTotalType: import("../../utils/totals").TotalType;
|
|
33
36
|
tooltipTotalCalcFn: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
34
|
-
|
|
37
|
+
tooltipOrder: import("./types").TooltipOrder;
|
|
35
38
|
fullHeight: boolean;
|
|
36
39
|
withSettingsHeader: boolean;
|
|
37
40
|
extraCharts: Record<string, unknown>[];
|
|
@@ -85,14 +88,18 @@ declare const ChartTypes: () => ({
|
|
|
85
88
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
86
89
|
default: string;
|
|
87
90
|
};
|
|
88
|
-
|
|
89
|
-
type: import("vue").PropType<
|
|
90
|
-
default:
|
|
91
|
+
totalsChart: {
|
|
92
|
+
type: import("vue").PropType<boolean>;
|
|
93
|
+
default: boolean;
|
|
91
94
|
};
|
|
92
95
|
parsing: {
|
|
93
96
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
94
97
|
default: any;
|
|
95
98
|
};
|
|
99
|
+
yAxisFormat: {
|
|
100
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
96
103
|
dataSets: {
|
|
97
104
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
98
105
|
required: true;
|
|
@@ -122,13 +129,21 @@ declare const ChartTypes: () => ({
|
|
|
122
129
|
default: any;
|
|
123
130
|
};
|
|
124
131
|
trendDirection: {
|
|
125
|
-
type: import("vue").PropType<"
|
|
126
|
-
default:
|
|
132
|
+
type: import("vue").PropType<import("./types").TrendDirection>;
|
|
133
|
+
default: import("./types").TrendDirection;
|
|
127
134
|
};
|
|
128
135
|
tickCount: {
|
|
129
136
|
type: import("vue").PropType<number>;
|
|
130
137
|
default: number;
|
|
131
138
|
};
|
|
139
|
+
truncateTickLabels: {
|
|
140
|
+
type: import("vue").PropType<boolean>;
|
|
141
|
+
default: boolean;
|
|
142
|
+
};
|
|
143
|
+
keepSubheaderVisible: {
|
|
144
|
+
type: import("vue").PropType<boolean>;
|
|
145
|
+
default: boolean;
|
|
146
|
+
};
|
|
132
147
|
noDataIcon: {
|
|
133
148
|
type: import("vue").PropType<string>;
|
|
134
149
|
default: string;
|
|
@@ -153,9 +168,9 @@ declare const ChartTypes: () => ({
|
|
|
153
168
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
154
169
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
155
170
|
};
|
|
156
|
-
|
|
157
|
-
type: import("vue").PropType<
|
|
158
|
-
default:
|
|
171
|
+
tooltipOrder: {
|
|
172
|
+
type: import("vue").PropType<import("./types").TooltipOrder>;
|
|
173
|
+
default: import("./types").TooltipOrder;
|
|
159
174
|
};
|
|
160
175
|
fullHeight: {
|
|
161
176
|
type: import("vue").PropType<boolean>;
|
|
@@ -173,7 +188,7 @@ declare const ChartTypes: () => ({
|
|
|
173
188
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
174
189
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
175
190
|
"onUpdate:chartType"?: (chartType: import("./types").ChartType) => any;
|
|
176
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "
|
|
191
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "totalsChart" | "parsing" | "yAxisFormat" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "withSettingsHeader" | "extraCharts">;
|
|
177
192
|
$attrs: {
|
|
178
193
|
[x: string]: unknown;
|
|
179
194
|
};
|
|
@@ -237,14 +252,18 @@ declare const ChartTypes: () => ({
|
|
|
237
252
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
238
253
|
default: string;
|
|
239
254
|
};
|
|
240
|
-
|
|
241
|
-
type: import("vue").PropType<
|
|
242
|
-
default:
|
|
255
|
+
totalsChart: {
|
|
256
|
+
type: import("vue").PropType<boolean>;
|
|
257
|
+
default: boolean;
|
|
243
258
|
};
|
|
244
259
|
parsing: {
|
|
245
260
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
246
261
|
default: any;
|
|
247
262
|
};
|
|
263
|
+
yAxisFormat: {
|
|
264
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
265
|
+
default: string;
|
|
266
|
+
};
|
|
248
267
|
dataSets: {
|
|
249
268
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
250
269
|
required: true;
|
|
@@ -274,13 +293,21 @@ declare const ChartTypes: () => ({
|
|
|
274
293
|
default: any;
|
|
275
294
|
};
|
|
276
295
|
trendDirection: {
|
|
277
|
-
type: import("vue").PropType<"
|
|
278
|
-
default:
|
|
296
|
+
type: import("vue").PropType<import("./types").TrendDirection>;
|
|
297
|
+
default: import("./types").TrendDirection;
|
|
279
298
|
};
|
|
280
299
|
tickCount: {
|
|
281
300
|
type: import("vue").PropType<number>;
|
|
282
301
|
default: number;
|
|
283
302
|
};
|
|
303
|
+
truncateTickLabels: {
|
|
304
|
+
type: import("vue").PropType<boolean>;
|
|
305
|
+
default: boolean;
|
|
306
|
+
};
|
|
307
|
+
keepSubheaderVisible: {
|
|
308
|
+
type: import("vue").PropType<boolean>;
|
|
309
|
+
default: boolean;
|
|
310
|
+
};
|
|
284
311
|
noDataIcon: {
|
|
285
312
|
type: import("vue").PropType<string>;
|
|
286
313
|
default: string;
|
|
@@ -305,9 +332,9 @@ declare const ChartTypes: () => ({
|
|
|
305
332
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
306
333
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
307
334
|
};
|
|
308
|
-
|
|
309
|
-
type: import("vue").PropType<
|
|
310
|
-
default:
|
|
335
|
+
tooltipOrder: {
|
|
336
|
+
type: import("vue").PropType<import("./types").TooltipOrder>;
|
|
337
|
+
default: import("./types").TooltipOrder;
|
|
311
338
|
};
|
|
312
339
|
fullHeight: {
|
|
313
340
|
type: import("vue").PropType<boolean>;
|
|
@@ -342,22 +369,25 @@ declare const ChartTypes: () => ({
|
|
|
342
369
|
chartType: import("./types").ChartType;
|
|
343
370
|
hideLegend: boolean;
|
|
344
371
|
xAxisFormat: import("./types").ValueFormat;
|
|
345
|
-
|
|
372
|
+
totalsChart: boolean;
|
|
346
373
|
parsing: import("./types").ChartParsingConfig;
|
|
374
|
+
yAxisFormat: import("./types").ValueFormat;
|
|
347
375
|
dataSets: import("./types").ChartDataSet[];
|
|
348
376
|
trendTooltip: any;
|
|
349
377
|
subheader: string;
|
|
350
378
|
subheaderTooltip: any;
|
|
351
379
|
trendValue: string | number;
|
|
352
|
-
trendDirection: "
|
|
380
|
+
trendDirection: import("./types").TrendDirection;
|
|
353
381
|
tickCount: number;
|
|
382
|
+
truncateTickLabels: boolean;
|
|
383
|
+
keepSubheaderVisible: boolean;
|
|
354
384
|
noDataIcon: string;
|
|
355
385
|
noDataTitle: string;
|
|
356
386
|
noDataSubtitle: string;
|
|
357
387
|
withAnimation: boolean;
|
|
358
388
|
tooltipTotalType: import("../../utils/totals").TotalType;
|
|
359
389
|
tooltipTotalCalcFn: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
360
|
-
|
|
390
|
+
tooltipOrder: import("./types").TooltipOrder;
|
|
361
391
|
fullHeight: boolean;
|
|
362
392
|
withSettingsHeader: boolean;
|
|
363
393
|
extraCharts: Record<string, unknown>[];
|
|
@@ -431,14 +461,18 @@ declare const ChartTypes: () => ({
|
|
|
431
461
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
432
462
|
default: string;
|
|
433
463
|
};
|
|
434
|
-
|
|
435
|
-
type: import("vue").PropType<
|
|
436
|
-
default:
|
|
464
|
+
totalsChart: {
|
|
465
|
+
type: import("vue").PropType<boolean>;
|
|
466
|
+
default: boolean;
|
|
437
467
|
};
|
|
438
468
|
parsing: {
|
|
439
469
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
440
470
|
default: any;
|
|
441
471
|
};
|
|
472
|
+
yAxisFormat: {
|
|
473
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
474
|
+
default: string;
|
|
475
|
+
};
|
|
442
476
|
dataSets: {
|
|
443
477
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
444
478
|
required: true;
|
|
@@ -468,13 +502,21 @@ declare const ChartTypes: () => ({
|
|
|
468
502
|
default: any;
|
|
469
503
|
};
|
|
470
504
|
trendDirection: {
|
|
471
|
-
type: import("vue").PropType<"
|
|
472
|
-
default:
|
|
505
|
+
type: import("vue").PropType<import("./types").TrendDirection>;
|
|
506
|
+
default: import("./types").TrendDirection;
|
|
473
507
|
};
|
|
474
508
|
tickCount: {
|
|
475
509
|
type: import("vue").PropType<number>;
|
|
476
510
|
default: number;
|
|
477
511
|
};
|
|
512
|
+
truncateTickLabels: {
|
|
513
|
+
type: import("vue").PropType<boolean>;
|
|
514
|
+
default: boolean;
|
|
515
|
+
};
|
|
516
|
+
keepSubheaderVisible: {
|
|
517
|
+
type: import("vue").PropType<boolean>;
|
|
518
|
+
default: boolean;
|
|
519
|
+
};
|
|
478
520
|
noDataIcon: {
|
|
479
521
|
type: import("vue").PropType<string>;
|
|
480
522
|
default: string;
|
|
@@ -499,9 +541,9 @@ declare const ChartTypes: () => ({
|
|
|
499
541
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
500
542
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
501
543
|
};
|
|
502
|
-
|
|
503
|
-
type: import("vue").PropType<
|
|
504
|
-
default:
|
|
544
|
+
tooltipOrder: {
|
|
545
|
+
type: import("vue").PropType<import("./types").TooltipOrder>;
|
|
546
|
+
default: import("./types").TooltipOrder;
|
|
505
547
|
};
|
|
506
548
|
fullHeight: {
|
|
507
549
|
type: import("vue").PropType<boolean>;
|
|
@@ -573,14 +615,18 @@ declare const ChartTypes: () => ({
|
|
|
573
615
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
574
616
|
default: string;
|
|
575
617
|
};
|
|
576
|
-
|
|
577
|
-
type: import("vue").PropType<
|
|
578
|
-
default:
|
|
618
|
+
totalsChart: {
|
|
619
|
+
type: import("vue").PropType<boolean>;
|
|
620
|
+
default: boolean;
|
|
579
621
|
};
|
|
580
622
|
parsing: {
|
|
581
623
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
582
624
|
default: any;
|
|
583
625
|
};
|
|
626
|
+
yAxisFormat: {
|
|
627
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
628
|
+
default: string;
|
|
629
|
+
};
|
|
584
630
|
dataSets: {
|
|
585
631
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
586
632
|
required: true;
|
|
@@ -610,13 +656,21 @@ declare const ChartTypes: () => ({
|
|
|
610
656
|
default: any;
|
|
611
657
|
};
|
|
612
658
|
trendDirection: {
|
|
613
|
-
type: import("vue").PropType<"
|
|
614
|
-
default:
|
|
659
|
+
type: import("vue").PropType<import("./types").TrendDirection>;
|
|
660
|
+
default: import("./types").TrendDirection;
|
|
615
661
|
};
|
|
616
662
|
tickCount: {
|
|
617
663
|
type: import("vue").PropType<number>;
|
|
618
664
|
default: number;
|
|
619
665
|
};
|
|
666
|
+
truncateTickLabels: {
|
|
667
|
+
type: import("vue").PropType<boolean>;
|
|
668
|
+
default: boolean;
|
|
669
|
+
};
|
|
670
|
+
keepSubheaderVisible: {
|
|
671
|
+
type: import("vue").PropType<boolean>;
|
|
672
|
+
default: boolean;
|
|
673
|
+
};
|
|
620
674
|
noDataIcon: {
|
|
621
675
|
type: import("vue").PropType<string>;
|
|
622
676
|
default: string;
|
|
@@ -641,9 +695,9 @@ declare const ChartTypes: () => ({
|
|
|
641
695
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
642
696
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
643
697
|
};
|
|
644
|
-
|
|
645
|
-
type: import("vue").PropType<
|
|
646
|
-
default:
|
|
698
|
+
tooltipOrder: {
|
|
699
|
+
type: import("vue").PropType<import("./types").TooltipOrder>;
|
|
700
|
+
default: import("./types").TooltipOrder;
|
|
647
701
|
};
|
|
648
702
|
fullHeight: {
|
|
649
703
|
type: import("vue").PropType<boolean>;
|
|
@@ -678,22 +732,25 @@ declare const ChartTypes: () => ({
|
|
|
678
732
|
chartType: import("./types").ChartType;
|
|
679
733
|
hideLegend: boolean;
|
|
680
734
|
xAxisFormat: import("./types").ValueFormat;
|
|
681
|
-
|
|
735
|
+
totalsChart: boolean;
|
|
682
736
|
parsing: import("./types").ChartParsingConfig;
|
|
737
|
+
yAxisFormat: import("./types").ValueFormat;
|
|
683
738
|
dataSets: import("./types").ChartDataSet[];
|
|
684
739
|
trendTooltip: any;
|
|
685
740
|
subheader: string;
|
|
686
741
|
subheaderTooltip: any;
|
|
687
742
|
trendValue: string | number;
|
|
688
|
-
trendDirection: "
|
|
743
|
+
trendDirection: import("./types").TrendDirection;
|
|
689
744
|
tickCount: number;
|
|
745
|
+
truncateTickLabels: boolean;
|
|
746
|
+
keepSubheaderVisible: boolean;
|
|
690
747
|
noDataIcon: string;
|
|
691
748
|
noDataTitle: string;
|
|
692
749
|
noDataSubtitle: string;
|
|
693
750
|
withAnimation: boolean;
|
|
694
751
|
tooltipTotalType: import("../../utils/totals").TotalType;
|
|
695
752
|
tooltipTotalCalcFn: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
696
|
-
|
|
753
|
+
tooltipOrder: import("./types").TooltipOrder;
|
|
697
754
|
fullHeight: boolean;
|
|
698
755
|
withSettingsHeader: boolean;
|
|
699
756
|
extraCharts: Record<string, unknown>[];
|
|
@@ -705,5 +762,6 @@ declare const ChartTypes: () => ({
|
|
|
705
762
|
"subheader-tooltip"?(_: {}): any;
|
|
706
763
|
};
|
|
707
764
|
}))[];
|
|
708
|
-
export type {
|
|
765
|
+
export type { ChartDataRecord, ChartDataSet, ChartParsingConfig, } from './types';
|
|
766
|
+
export { ChartType, TooltipOrder, TrendDirection } from './types';
|
|
709
767
|
export { Chart, ChartTypes };
|
|
@@ -8,6 +8,7 @@ export declare const SINGLE_DATASET_DATE: {
|
|
|
8
8
|
}[];
|
|
9
9
|
export declare const SINGLE_DATASET_COUNTRY: {
|
|
10
10
|
id: string;
|
|
11
|
+
countryFlag: string;
|
|
11
12
|
label: string;
|
|
12
13
|
data: {
|
|
13
14
|
value: number;
|
|
@@ -15,6 +16,16 @@ export declare const SINGLE_DATASET_COUNTRY: {
|
|
|
15
16
|
value3: number;
|
|
16
17
|
}[];
|
|
17
18
|
}[];
|
|
19
|
+
export declare const SINGLE_DATASET_APP: {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
image: string;
|
|
24
|
+
data: {
|
|
25
|
+
app: string;
|
|
26
|
+
value: number;
|
|
27
|
+
}[];
|
|
28
|
+
}[];
|
|
18
29
|
export declare const MULTIPLE_DATASETS_DATE: ({
|
|
19
30
|
id: number;
|
|
20
31
|
label: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { UseVirtualListItem } from '@vueuse/core';
|
|
3
3
|
import { IconTypes } from '../icon/v4/Icon.types';
|
|
4
|
-
import { ChartTypeRegistry, TooltipItem } from 'chart.js';
|
|
4
|
+
import { ChartDataset, ChartTypeRegistry, TooltipItem } from 'chart.js';
|
|
5
5
|
export declare enum ChartType {
|
|
6
6
|
Line = "line",
|
|
7
7
|
Bar = "bar",
|
|
@@ -17,6 +17,8 @@ export type ChartDataSet = {
|
|
|
17
17
|
color?: HexColor;
|
|
18
18
|
icon?: string;
|
|
19
19
|
iconType?: IconTypes;
|
|
20
|
+
countryFlag?: string;
|
|
21
|
+
image?: string;
|
|
20
22
|
};
|
|
21
23
|
export type ChartParsingConfig = {
|
|
22
24
|
xAxisKey: string;
|
|
@@ -32,10 +34,7 @@ export type LegendItem = {
|
|
|
32
34
|
iconType?: IconTypes;
|
|
33
35
|
};
|
|
34
36
|
export interface MyTooltipItem<T extends keyof ChartTypeRegistry = keyof ChartTypeRegistry> extends TooltipItem<T> {
|
|
35
|
-
dataset:
|
|
36
|
-
icon?: string;
|
|
37
|
-
iconType?: IconTypes;
|
|
38
|
-
} & TooltipItem<T>['dataset'];
|
|
37
|
+
dataset: ChartDataSet & TooltipItem<T>['dataset'];
|
|
39
38
|
}
|
|
40
39
|
export type UseVirtualListResult = {
|
|
41
40
|
list: Ref<UseVirtualListItem<LegendItem>[]>;
|
|
@@ -60,3 +59,24 @@ export type UseChartHeightArgs = {
|
|
|
60
59
|
useFullHeight: boolean;
|
|
61
60
|
};
|
|
62
61
|
export type HexColor = `#${string}`;
|
|
62
|
+
export type DataSetConfig = ChartDataset<'line'> & ChartDataSet;
|
|
63
|
+
export interface Font {
|
|
64
|
+
size: number;
|
|
65
|
+
weight: number;
|
|
66
|
+
family: string;
|
|
67
|
+
}
|
|
68
|
+
export type PrepareTicksLabelArgs = {
|
|
69
|
+
label: string;
|
|
70
|
+
format: ValueFormat;
|
|
71
|
+
availableSpace: number;
|
|
72
|
+
truncate?: boolean;
|
|
73
|
+
};
|
|
74
|
+
export declare enum TooltipOrder {
|
|
75
|
+
Legend = "legend",
|
|
76
|
+
YAxis = "yAxis"
|
|
77
|
+
}
|
|
78
|
+
export declare enum TrendDirection {
|
|
79
|
+
UP = "up",
|
|
80
|
+
DOWN = "down",
|
|
81
|
+
NEUTRAL = "right"
|
|
82
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e = /* @__PURE__ */ ((a) => (a.Line = "line", a.Bar = "bar", a.StackedLine = "stackedLine", a.StackedBar = "stackedBar", a))(e || {}), n = /* @__PURE__ */ ((a) => (a.Legend = "legend", a.YAxis = "yAxis", a))(n || {}), r = /* @__PURE__ */ ((a) => (a.UP = "up", a.DOWN = "down", a.NEUTRAL = "right", a))(r || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
e as ChartType,
|
|
4
|
+
n as TooltipOrder,
|
|
5
|
+
r as TrendDirection
|
|
4
6
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const _ = [
|
|
2
|
+
"borderColor",
|
|
3
|
+
"backgroundColor",
|
|
4
|
+
"pointBackgroundColor",
|
|
5
|
+
"pointHoverBorderColor"
|
|
6
|
+
], l = (o) => {
|
|
7
|
+
_.forEach((r) => {
|
|
8
|
+
o[`___${r}`] = o[r];
|
|
9
|
+
});
|
|
10
|
+
}, n = (o) => {
|
|
11
|
+
_.forEach((r) => {
|
|
12
|
+
o[`___${r}`] && (o[r] = o[`___${r}`], delete o[`___${r}`]);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
n as restoreOriginalDatasetColors,
|
|
17
|
+
l as storeOriginalDatasetColors
|
|
18
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ValueFormat } from '@/components/chart/types';
|
|
1
|
+
import { PrepareTicksLabelArgs, ValueFormat } from '@/components/chart/types';
|
|
2
2
|
export declare const calcStepSize: (min: number, max: number, tickCount: number) => number;
|
|
3
3
|
export declare const formatValue: (value: number | string, valueFormat: ValueFormat) => string;
|
|
4
|
+
export declare const prepareTickLabel: ({ label, format, availableSpace, truncate, }: PrepareTicksLabelArgs) => string | string[];
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { format as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { format as f } from "date-fns";
|
|
2
|
+
import { TICK_LABEL_FONT as a } from "../consts.js";
|
|
3
|
+
import { nFormatter as c } from "../../../utils/formatNumbers.js";
|
|
4
|
+
import { truncateTextToFit as d } from "../../../utils/text.js";
|
|
5
|
+
import { REGEX_LINEBREAK as m } from "../../../consts/regex.js";
|
|
6
|
+
const g = (r, t, e) => {
|
|
4
7
|
if (e === 0)
|
|
5
8
|
return 0;
|
|
6
|
-
const
|
|
7
|
-
return (
|
|
8
|
-
},
|
|
9
|
+
const n = t - r, o = n / e * 0.4;
|
|
10
|
+
return (n + o) / e;
|
|
11
|
+
}, E = (r, t) => t === "day" ? f(new Date(r), "EEEE") : t === "number" ? c(r) : t === "date" ? f(new Date(r), "MMM dd") : t === "dateLong" ? f(new Date(r), "MMM dd, yyyy") : String(r), w = ({
|
|
12
|
+
label: r,
|
|
13
|
+
format: t,
|
|
14
|
+
availableSpace: e,
|
|
15
|
+
truncate: n = !1
|
|
16
|
+
}) => {
|
|
17
|
+
const s = m.test(r), o = (p) => {
|
|
18
|
+
const i = E(p, t);
|
|
19
|
+
return n ? d(i, a, e) : i;
|
|
20
|
+
};
|
|
21
|
+
return s ? r.split(m).map(o) : o(r);
|
|
22
|
+
};
|
|
9
23
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
24
|
+
g as calcStepSize,
|
|
25
|
+
E as formatValue,
|
|
26
|
+
w as prepareTickLabel
|
|
12
27
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ELLIPSIS = "...";
|
package/consts/common.js
ADDED
package/consts/regex.d.ts
CHANGED
package/consts/regex.js
CHANGED
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './AutocompleteDropdown.vue_vue_type_style_index_0_scoped_214ddaf4_lang.css';
|
|
2
2
|
import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
|
|
3
|
-
import { AutocompleteDropdownTypes as
|
|
3
|
+
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as ao } from "./components/menuItem/index.js";
|
|
5
5
|
import { MenuTypes as fo } from "./components/menu/index.js";
|
|
6
6
|
import { AppIconTypes as so } from "./components/appIcon/index.js";
|
|
@@ -16,8 +16,8 @@ import { FormCardTypes as wo, FormFieldTypes as Oo } from "./components/forms/in
|
|
|
16
16
|
import * as o from "./components/button/v3/index.js";
|
|
17
17
|
import * as r from "./components/button/v4/index.js";
|
|
18
18
|
import * as e from "./components/chip/v3/index.js";
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
19
|
+
import * as t from "./components/chip/v4/index.js";
|
|
20
|
+
import * as m from "./components/switch/v3/index.js";
|
|
21
21
|
import * as p from "./components/switch/v4/index.js";
|
|
22
22
|
import * as a from "./components/dropdown/v3/index.js";
|
|
23
23
|
import * as i from "./components/dropdown/v4/index.js";
|
|
@@ -77,7 +77,7 @@ import { default as Uo } from "./components/appTrigger/AppTrigger.vue.js";
|
|
|
77
77
|
import { default as Xo } from "./components/autocompleteDropdown/AutocompleteDropdown.vue.js";
|
|
78
78
|
import { default as or } from "./components/menuItem/MenuItem.vue.js";
|
|
79
79
|
import { default as er } from "./components/menu/Menu.vue.js";
|
|
80
|
-
import { default as
|
|
80
|
+
import { default as mr } from "./components/appIcon/AppIcon.vue.js";
|
|
81
81
|
import { default as ar } from "./components/floatingToolbar/FloatingToolbar.vue.js";
|
|
82
82
|
import { default as fr } from "./components/includeExclude/IncludeExclude.vue.js";
|
|
83
83
|
import { default as xr } from "./components/includeExclude/IncludeExcludeDragDrop.vue.js";
|
|
@@ -100,11 +100,12 @@ import { default as jr } from "./components/forms/FormField.vue.js";
|
|
|
100
100
|
import { default as qr } from "./components/banner/Banner.vue.js";
|
|
101
101
|
import { default as Gr } from "./components/alert/Alert.vue.js";
|
|
102
102
|
import { default as Qr } from "./components/autocomplete/Autocomplete.vue.js";
|
|
103
|
-
import {
|
|
103
|
+
import { ChartType as Ur, TooltipOrder as Wr, TrendDirection as Xr } from "./components/chart/types.js";
|
|
104
|
+
import { default as oe } from "./components/chart/Chart.vue.js";
|
|
104
105
|
const Z = {
|
|
105
106
|
...e,
|
|
106
|
-
...m,
|
|
107
107
|
...t,
|
|
108
|
+
...m,
|
|
108
109
|
...p,
|
|
109
110
|
...o,
|
|
110
111
|
...r,
|
|
@@ -160,18 +161,19 @@ export {
|
|
|
160
161
|
Cr as AddFilterButton,
|
|
161
162
|
Gr as Alert,
|
|
162
163
|
qo as AlertTypes,
|
|
163
|
-
|
|
164
|
+
mr as AppIcon,
|
|
164
165
|
so as AppIconTypes,
|
|
165
166
|
Uo as AppTrigger,
|
|
166
167
|
eo as AppTriggerTypes,
|
|
167
168
|
Qr as Autocomplete,
|
|
168
169
|
Xo as AutocompleteDropdown,
|
|
169
|
-
|
|
170
|
+
mo as AutocompleteDropdownTypes,
|
|
170
171
|
Go as AutocompleteTypes,
|
|
171
172
|
qr as Banner,
|
|
172
173
|
jo as BannerTypes,
|
|
173
174
|
Rr as CardPanel,
|
|
174
|
-
|
|
175
|
+
oe as Chart,
|
|
176
|
+
Ur as ChartType,
|
|
175
177
|
Qo as ChartTypes,
|
|
176
178
|
Ar as FilterDropdown,
|
|
177
179
|
Fo as FilterDropdownTypes,
|
|
@@ -201,6 +203,8 @@ export {
|
|
|
201
203
|
Hr as MultiBar,
|
|
202
204
|
ho as MultiBarTypes,
|
|
203
205
|
Mr as Text,
|
|
206
|
+
Wr as TooltipOrder,
|
|
207
|
+
Xr as TrendDirection,
|
|
204
208
|
wr as Typography,
|
|
205
209
|
Ao as TypographyTypes,
|
|
206
210
|
Co as TypographyTypesV4,
|
package/package.json
CHANGED
package/utils/text.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import { Font } from '@/components/chart/types';
|
|
1
2
|
export declare const isElementTruncated: (el: HTMLElement) => boolean;
|
|
3
|
+
export declare function measureTextWidth(text: string, font: Font): number;
|
|
4
|
+
export declare const truncateTextToFit: (text: string, font: Font, availableSpace: number) => string;
|
package/utils/text.js
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { ELLIPSIS as a } from "../consts/common.js";
|
|
2
|
+
const u = (t) => {
|
|
2
3
|
const e = new Range();
|
|
3
4
|
e.selectNodeContents(t);
|
|
4
|
-
const n = e.getBoundingClientRect(),
|
|
5
|
-
return n.right >
|
|
6
|
-
},
|
|
5
|
+
const n = e.getBoundingClientRect(), s = t.getBoundingClientRect();
|
|
6
|
+
return n.right > s.right;
|
|
7
|
+
}, w = (t) => t ? t.scrollWidth !== t.offsetWidth ? t.scrollWidth > t.offsetWidth : u(t) : !1, g = document.createElement("canvas"), o = g.getContext("2d");
|
|
8
|
+
function h(t, e) {
|
|
9
|
+
if (!o)
|
|
10
|
+
throw new Error("missing canvas context");
|
|
11
|
+
return o.font = `${e.weight} ${e.size}px ${e.family}`, o.measureText(t).width;
|
|
12
|
+
}
|
|
13
|
+
const W = (t, e, n) => {
|
|
14
|
+
const s = h(a, e);
|
|
15
|
+
if (h(t, e) <= n)
|
|
16
|
+
return t;
|
|
17
|
+
let r = 0, i = t.length, l = t;
|
|
18
|
+
for (; r <= i; ) {
|
|
19
|
+
const c = Math.floor((r + i) / 2), d = t.slice(0, c);
|
|
20
|
+
h(d, e) + s <= n ? (l = d, r = c + 1) : i = c - 1;
|
|
21
|
+
}
|
|
22
|
+
return l + a;
|
|
23
|
+
};
|
|
7
24
|
export {
|
|
8
|
-
|
|
25
|
+
w as isElementTruncated,
|
|
26
|
+
h as measureTextWidth,
|
|
27
|
+
W as truncateTextToFit
|
|
9
28
|
};
|
package/utils/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isNullOrUndefined: (object: unknown) => boolean;
|
package/utils/utils.js
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-container[data-v-de950ffe]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-de950ffe]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-de950ffe]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-de950ffe]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-de950ffe]{border-left:1px solid var(--common-divider)}
|