@ironsource/shared-ui 2.1.12-test.61 → 2.1.12-test.63
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 +120 -62
- 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/composables/useFormValidation.d.ts +1 -1
- 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 +11 -7
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Chart from './Chart.vue';
|
|
2
|
+
import { ChartType, TooltipOrder, TrendDirection } from './types';
|
|
2
3
|
declare const ChartTypes: () => ({
|
|
3
4
|
new (...args: any[]): {
|
|
4
5
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -13,25 +14,28 @@ declare const ChartTypes: () => ({
|
|
|
13
14
|
sortSelected: any;
|
|
14
15
|
sortOptions: unknown[];
|
|
15
16
|
sortOptionNameKey: string;
|
|
16
|
-
chartType:
|
|
17
|
+
chartType: ChartType;
|
|
17
18
|
hideLegend: boolean;
|
|
18
19
|
xAxisFormat: import("./types").ValueFormat;
|
|
19
|
-
|
|
20
|
+
totalsChart: boolean;
|
|
20
21
|
parsing: import("./types").ChartParsingConfig;
|
|
22
|
+
yAxisFormat: import("./types").ValueFormat;
|
|
21
23
|
dataSets: import("./types").ChartDataSet[];
|
|
22
24
|
trendTooltip: any;
|
|
23
25
|
subheader: string;
|
|
24
26
|
subheaderTooltip: any;
|
|
25
27
|
trendValue: string | number;
|
|
26
|
-
trendDirection:
|
|
28
|
+
trendDirection: TrendDirection;
|
|
27
29
|
tickCount: number;
|
|
30
|
+
truncateTickLabels: boolean;
|
|
31
|
+
keepSubheaderVisible: boolean;
|
|
28
32
|
noDataIcon: string;
|
|
29
33
|
noDataTitle: string;
|
|
30
34
|
noDataSubtitle: string;
|
|
31
35
|
withAnimation: boolean;
|
|
32
36
|
tooltipTotalType: import("../../utils/totals").TotalType;
|
|
33
37
|
tooltipTotalCalcFn: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
34
|
-
|
|
38
|
+
tooltipOrder: TooltipOrder;
|
|
35
39
|
fullHeight: boolean;
|
|
36
40
|
withSettingsHeader: boolean;
|
|
37
41
|
extraCharts: Record<string, unknown>[];
|
|
@@ -74,8 +78,8 @@ declare const ChartTypes: () => ({
|
|
|
74
78
|
default: string;
|
|
75
79
|
};
|
|
76
80
|
chartType: {
|
|
77
|
-
type: import("vue").PropType<
|
|
78
|
-
default:
|
|
81
|
+
type: import("vue").PropType<ChartType>;
|
|
82
|
+
default: ChartType;
|
|
79
83
|
};
|
|
80
84
|
hideLegend: {
|
|
81
85
|
type: import("vue").PropType<boolean>;
|
|
@@ -85,14 +89,18 @@ declare const ChartTypes: () => ({
|
|
|
85
89
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
86
90
|
default: string;
|
|
87
91
|
};
|
|
88
|
-
|
|
89
|
-
type: import("vue").PropType<
|
|
90
|
-
default:
|
|
92
|
+
totalsChart: {
|
|
93
|
+
type: import("vue").PropType<boolean>;
|
|
94
|
+
default: boolean;
|
|
91
95
|
};
|
|
92
96
|
parsing: {
|
|
93
97
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
94
98
|
default: any;
|
|
95
99
|
};
|
|
100
|
+
yAxisFormat: {
|
|
101
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
96
104
|
dataSets: {
|
|
97
105
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
98
106
|
required: true;
|
|
@@ -122,13 +130,21 @@ declare const ChartTypes: () => ({
|
|
|
122
130
|
default: any;
|
|
123
131
|
};
|
|
124
132
|
trendDirection: {
|
|
125
|
-
type: import("vue").PropType<
|
|
126
|
-
default:
|
|
133
|
+
type: import("vue").PropType<TrendDirection>;
|
|
134
|
+
default: TrendDirection;
|
|
127
135
|
};
|
|
128
136
|
tickCount: {
|
|
129
137
|
type: import("vue").PropType<number>;
|
|
130
138
|
default: number;
|
|
131
139
|
};
|
|
140
|
+
truncateTickLabels: {
|
|
141
|
+
type: import("vue").PropType<boolean>;
|
|
142
|
+
default: boolean;
|
|
143
|
+
};
|
|
144
|
+
keepSubheaderVisible: {
|
|
145
|
+
type: import("vue").PropType<boolean>;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
132
148
|
noDataIcon: {
|
|
133
149
|
type: import("vue").PropType<string>;
|
|
134
150
|
default: string;
|
|
@@ -153,9 +169,9 @@ declare const ChartTypes: () => ({
|
|
|
153
169
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
154
170
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
155
171
|
};
|
|
156
|
-
|
|
157
|
-
type: import("vue").PropType<
|
|
158
|
-
default:
|
|
172
|
+
tooltipOrder: {
|
|
173
|
+
type: import("vue").PropType<TooltipOrder>;
|
|
174
|
+
default: TooltipOrder;
|
|
159
175
|
};
|
|
160
176
|
fullHeight: {
|
|
161
177
|
type: import("vue").PropType<boolean>;
|
|
@@ -172,8 +188,8 @@ declare const ChartTypes: () => ({
|
|
|
172
188
|
}>> & {
|
|
173
189
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
174
190
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
175
|
-
"onUpdate:chartType"?: (chartType:
|
|
176
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "
|
|
191
|
+
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
192
|
+
} & 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
193
|
$attrs: {
|
|
178
194
|
[x: string]: unknown;
|
|
179
195
|
};
|
|
@@ -185,7 +201,7 @@ declare const ChartTypes: () => ({
|
|
|
185
201
|
}>;
|
|
186
202
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
187
203
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
188
|
-
$emit: ((event: "update:visibleIds", visibleIds: unknown[]) => void) & ((event: "update:sortSelected", sortOption: unknown) => void) & ((event: "update:chartType", chartType:
|
|
204
|
+
$emit: ((event: "update:visibleIds", visibleIds: unknown[]) => void) & ((event: "update:sortSelected", sortOption: unknown) => void) & ((event: "update:chartType", chartType: ChartType) => void);
|
|
189
205
|
$el: any;
|
|
190
206
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
191
207
|
header: {
|
|
@@ -226,8 +242,8 @@ declare const ChartTypes: () => ({
|
|
|
226
242
|
default: string;
|
|
227
243
|
};
|
|
228
244
|
chartType: {
|
|
229
|
-
type: import("vue").PropType<
|
|
230
|
-
default:
|
|
245
|
+
type: import("vue").PropType<ChartType>;
|
|
246
|
+
default: ChartType;
|
|
231
247
|
};
|
|
232
248
|
hideLegend: {
|
|
233
249
|
type: import("vue").PropType<boolean>;
|
|
@@ -237,14 +253,18 @@ declare const ChartTypes: () => ({
|
|
|
237
253
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
238
254
|
default: string;
|
|
239
255
|
};
|
|
240
|
-
|
|
241
|
-
type: import("vue").PropType<
|
|
242
|
-
default:
|
|
256
|
+
totalsChart: {
|
|
257
|
+
type: import("vue").PropType<boolean>;
|
|
258
|
+
default: boolean;
|
|
243
259
|
};
|
|
244
260
|
parsing: {
|
|
245
261
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
246
262
|
default: any;
|
|
247
263
|
};
|
|
264
|
+
yAxisFormat: {
|
|
265
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
266
|
+
default: string;
|
|
267
|
+
};
|
|
248
268
|
dataSets: {
|
|
249
269
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
250
270
|
required: true;
|
|
@@ -274,13 +294,21 @@ declare const ChartTypes: () => ({
|
|
|
274
294
|
default: any;
|
|
275
295
|
};
|
|
276
296
|
trendDirection: {
|
|
277
|
-
type: import("vue").PropType<
|
|
278
|
-
default:
|
|
297
|
+
type: import("vue").PropType<TrendDirection>;
|
|
298
|
+
default: TrendDirection;
|
|
279
299
|
};
|
|
280
300
|
tickCount: {
|
|
281
301
|
type: import("vue").PropType<number>;
|
|
282
302
|
default: number;
|
|
283
303
|
};
|
|
304
|
+
truncateTickLabels: {
|
|
305
|
+
type: import("vue").PropType<boolean>;
|
|
306
|
+
default: boolean;
|
|
307
|
+
};
|
|
308
|
+
keepSubheaderVisible: {
|
|
309
|
+
type: import("vue").PropType<boolean>;
|
|
310
|
+
default: boolean;
|
|
311
|
+
};
|
|
284
312
|
noDataIcon: {
|
|
285
313
|
type: import("vue").PropType<string>;
|
|
286
314
|
default: string;
|
|
@@ -305,9 +333,9 @@ declare const ChartTypes: () => ({
|
|
|
305
333
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
306
334
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
307
335
|
};
|
|
308
|
-
|
|
309
|
-
type: import("vue").PropType<
|
|
310
|
-
default:
|
|
336
|
+
tooltipOrder: {
|
|
337
|
+
type: import("vue").PropType<TooltipOrder>;
|
|
338
|
+
default: TooltipOrder;
|
|
311
339
|
};
|
|
312
340
|
fullHeight: {
|
|
313
341
|
type: import("vue").PropType<boolean>;
|
|
@@ -324,9 +352,9 @@ declare const ChartTypes: () => ({
|
|
|
324
352
|
}>> & {
|
|
325
353
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
326
354
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
327
|
-
"onUpdate:chartType"?: (chartType:
|
|
355
|
+
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
328
356
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
329
|
-
"update:chartType": (chartType:
|
|
357
|
+
"update:chartType": (chartType: ChartType) => void;
|
|
330
358
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
331
359
|
"update:sortSelected": (sortOption: unknown) => void;
|
|
332
360
|
}, string, {
|
|
@@ -339,25 +367,28 @@ declare const ChartTypes: () => ({
|
|
|
339
367
|
sortSelected: any;
|
|
340
368
|
sortOptions: unknown[];
|
|
341
369
|
sortOptionNameKey: string;
|
|
342
|
-
chartType:
|
|
370
|
+
chartType: ChartType;
|
|
343
371
|
hideLegend: boolean;
|
|
344
372
|
xAxisFormat: import("./types").ValueFormat;
|
|
345
|
-
|
|
373
|
+
totalsChart: boolean;
|
|
346
374
|
parsing: import("./types").ChartParsingConfig;
|
|
375
|
+
yAxisFormat: import("./types").ValueFormat;
|
|
347
376
|
dataSets: import("./types").ChartDataSet[];
|
|
348
377
|
trendTooltip: any;
|
|
349
378
|
subheader: string;
|
|
350
379
|
subheaderTooltip: any;
|
|
351
380
|
trendValue: string | number;
|
|
352
|
-
trendDirection:
|
|
381
|
+
trendDirection: TrendDirection;
|
|
353
382
|
tickCount: number;
|
|
383
|
+
truncateTickLabels: boolean;
|
|
384
|
+
keepSubheaderVisible: boolean;
|
|
354
385
|
noDataIcon: string;
|
|
355
386
|
noDataTitle: string;
|
|
356
387
|
noDataSubtitle: string;
|
|
357
388
|
withAnimation: boolean;
|
|
358
389
|
tooltipTotalType: import("../../utils/totals").TotalType;
|
|
359
390
|
tooltipTotalCalcFn: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
360
|
-
|
|
391
|
+
tooltipOrder: TooltipOrder;
|
|
361
392
|
fullHeight: boolean;
|
|
362
393
|
withSettingsHeader: boolean;
|
|
363
394
|
extraCharts: Record<string, unknown>[];
|
|
@@ -420,8 +451,8 @@ declare const ChartTypes: () => ({
|
|
|
420
451
|
default: string;
|
|
421
452
|
};
|
|
422
453
|
chartType: {
|
|
423
|
-
type: import("vue").PropType<
|
|
424
|
-
default:
|
|
454
|
+
type: import("vue").PropType<ChartType>;
|
|
455
|
+
default: ChartType;
|
|
425
456
|
};
|
|
426
457
|
hideLegend: {
|
|
427
458
|
type: import("vue").PropType<boolean>;
|
|
@@ -431,14 +462,18 @@ declare const ChartTypes: () => ({
|
|
|
431
462
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
432
463
|
default: string;
|
|
433
464
|
};
|
|
434
|
-
|
|
435
|
-
type: import("vue").PropType<
|
|
436
|
-
default:
|
|
465
|
+
totalsChart: {
|
|
466
|
+
type: import("vue").PropType<boolean>;
|
|
467
|
+
default: boolean;
|
|
437
468
|
};
|
|
438
469
|
parsing: {
|
|
439
470
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
440
471
|
default: any;
|
|
441
472
|
};
|
|
473
|
+
yAxisFormat: {
|
|
474
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
475
|
+
default: string;
|
|
476
|
+
};
|
|
442
477
|
dataSets: {
|
|
443
478
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
444
479
|
required: true;
|
|
@@ -468,13 +503,21 @@ declare const ChartTypes: () => ({
|
|
|
468
503
|
default: any;
|
|
469
504
|
};
|
|
470
505
|
trendDirection: {
|
|
471
|
-
type: import("vue").PropType<
|
|
472
|
-
default:
|
|
506
|
+
type: import("vue").PropType<TrendDirection>;
|
|
507
|
+
default: TrendDirection;
|
|
473
508
|
};
|
|
474
509
|
tickCount: {
|
|
475
510
|
type: import("vue").PropType<number>;
|
|
476
511
|
default: number;
|
|
477
512
|
};
|
|
513
|
+
truncateTickLabels: {
|
|
514
|
+
type: import("vue").PropType<boolean>;
|
|
515
|
+
default: boolean;
|
|
516
|
+
};
|
|
517
|
+
keepSubheaderVisible: {
|
|
518
|
+
type: import("vue").PropType<boolean>;
|
|
519
|
+
default: boolean;
|
|
520
|
+
};
|
|
478
521
|
noDataIcon: {
|
|
479
522
|
type: import("vue").PropType<string>;
|
|
480
523
|
default: string;
|
|
@@ -499,9 +542,9 @@ declare const ChartTypes: () => ({
|
|
|
499
542
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
500
543
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
501
544
|
};
|
|
502
|
-
|
|
503
|
-
type: import("vue").PropType<
|
|
504
|
-
default:
|
|
545
|
+
tooltipOrder: {
|
|
546
|
+
type: import("vue").PropType<TooltipOrder>;
|
|
547
|
+
default: TooltipOrder;
|
|
505
548
|
};
|
|
506
549
|
fullHeight: {
|
|
507
550
|
type: import("vue").PropType<boolean>;
|
|
@@ -518,7 +561,7 @@ declare const ChartTypes: () => ({
|
|
|
518
561
|
}>> & {
|
|
519
562
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
520
563
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
521
|
-
"onUpdate:chartType"?: (chartType:
|
|
564
|
+
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
522
565
|
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
523
566
|
__isFragment?: never;
|
|
524
567
|
__isTeleport?: never;
|
|
@@ -562,8 +605,8 @@ declare const ChartTypes: () => ({
|
|
|
562
605
|
default: string;
|
|
563
606
|
};
|
|
564
607
|
chartType: {
|
|
565
|
-
type: import("vue").PropType<
|
|
566
|
-
default:
|
|
608
|
+
type: import("vue").PropType<ChartType>;
|
|
609
|
+
default: ChartType;
|
|
567
610
|
};
|
|
568
611
|
hideLegend: {
|
|
569
612
|
type: import("vue").PropType<boolean>;
|
|
@@ -573,14 +616,18 @@ declare const ChartTypes: () => ({
|
|
|
573
616
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
574
617
|
default: string;
|
|
575
618
|
};
|
|
576
|
-
|
|
577
|
-
type: import("vue").PropType<
|
|
578
|
-
default:
|
|
619
|
+
totalsChart: {
|
|
620
|
+
type: import("vue").PropType<boolean>;
|
|
621
|
+
default: boolean;
|
|
579
622
|
};
|
|
580
623
|
parsing: {
|
|
581
624
|
type: import("vue").PropType<import("./types").ChartParsingConfig>;
|
|
582
625
|
default: any;
|
|
583
626
|
};
|
|
627
|
+
yAxisFormat: {
|
|
628
|
+
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
629
|
+
default: string;
|
|
630
|
+
};
|
|
584
631
|
dataSets: {
|
|
585
632
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
586
633
|
required: true;
|
|
@@ -610,13 +657,21 @@ declare const ChartTypes: () => ({
|
|
|
610
657
|
default: any;
|
|
611
658
|
};
|
|
612
659
|
trendDirection: {
|
|
613
|
-
type: import("vue").PropType<
|
|
614
|
-
default:
|
|
660
|
+
type: import("vue").PropType<TrendDirection>;
|
|
661
|
+
default: TrendDirection;
|
|
615
662
|
};
|
|
616
663
|
tickCount: {
|
|
617
664
|
type: import("vue").PropType<number>;
|
|
618
665
|
default: number;
|
|
619
666
|
};
|
|
667
|
+
truncateTickLabels: {
|
|
668
|
+
type: import("vue").PropType<boolean>;
|
|
669
|
+
default: boolean;
|
|
670
|
+
};
|
|
671
|
+
keepSubheaderVisible: {
|
|
672
|
+
type: import("vue").PropType<boolean>;
|
|
673
|
+
default: boolean;
|
|
674
|
+
};
|
|
620
675
|
noDataIcon: {
|
|
621
676
|
type: import("vue").PropType<string>;
|
|
622
677
|
default: string;
|
|
@@ -641,9 +696,9 @@ declare const ChartTypes: () => ({
|
|
|
641
696
|
type: import("vue").PropType<(values: number[], totalType: import("../../utils/totals").TotalType) => number>;
|
|
642
697
|
default: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
643
698
|
};
|
|
644
|
-
|
|
645
|
-
type: import("vue").PropType<
|
|
646
|
-
default:
|
|
699
|
+
tooltipOrder: {
|
|
700
|
+
type: import("vue").PropType<TooltipOrder>;
|
|
701
|
+
default: TooltipOrder;
|
|
647
702
|
};
|
|
648
703
|
fullHeight: {
|
|
649
704
|
type: import("vue").PropType<boolean>;
|
|
@@ -660,9 +715,9 @@ declare const ChartTypes: () => ({
|
|
|
660
715
|
}>> & {
|
|
661
716
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
662
717
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
663
|
-
"onUpdate:chartType"?: (chartType:
|
|
718
|
+
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
664
719
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
665
|
-
"update:chartType": (chartType:
|
|
720
|
+
"update:chartType": (chartType: ChartType) => void;
|
|
666
721
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
667
722
|
"update:sortSelected": (sortOption: unknown) => void;
|
|
668
723
|
}, string, {
|
|
@@ -675,25 +730,28 @@ declare const ChartTypes: () => ({
|
|
|
675
730
|
sortSelected: any;
|
|
676
731
|
sortOptions: unknown[];
|
|
677
732
|
sortOptionNameKey: string;
|
|
678
|
-
chartType:
|
|
733
|
+
chartType: ChartType;
|
|
679
734
|
hideLegend: boolean;
|
|
680
735
|
xAxisFormat: import("./types").ValueFormat;
|
|
681
|
-
|
|
736
|
+
totalsChart: boolean;
|
|
682
737
|
parsing: import("./types").ChartParsingConfig;
|
|
738
|
+
yAxisFormat: import("./types").ValueFormat;
|
|
683
739
|
dataSets: import("./types").ChartDataSet[];
|
|
684
740
|
trendTooltip: any;
|
|
685
741
|
subheader: string;
|
|
686
742
|
subheaderTooltip: any;
|
|
687
743
|
trendValue: string | number;
|
|
688
|
-
trendDirection:
|
|
744
|
+
trendDirection: TrendDirection;
|
|
689
745
|
tickCount: number;
|
|
746
|
+
truncateTickLabels: boolean;
|
|
747
|
+
keepSubheaderVisible: boolean;
|
|
690
748
|
noDataIcon: string;
|
|
691
749
|
noDataTitle: string;
|
|
692
750
|
noDataSubtitle: string;
|
|
693
751
|
withAnimation: boolean;
|
|
694
752
|
tooltipTotalType: import("../../utils/totals").TotalType;
|
|
695
753
|
tooltipTotalCalcFn: (values: number[], totalType: import("../../utils/totals").TotalType) => number;
|
|
696
|
-
|
|
754
|
+
tooltipOrder: TooltipOrder;
|
|
697
755
|
fullHeight: boolean;
|
|
698
756
|
withSettingsHeader: boolean;
|
|
699
757
|
extraCharts: Record<string, unknown>[];
|
|
@@ -705,5 +763,5 @@ declare const ChartTypes: () => ({
|
|
|
705
763
|
"subheader-tooltip"?(_: {}): any;
|
|
706
764
|
};
|
|
707
765
|
}))[];
|
|
708
|
-
export type {
|
|
709
|
-
export { Chart, ChartTypes };
|
|
766
|
+
export type { ChartDataRecord, ChartDataSet, ChartParsingConfig, } from './types';
|
|
767
|
+
export { Chart, ChartTypes, ChartType, TooltipOrder, TrendDirection };
|
|
@@ -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
|
};
|
|
@@ -14,7 +14,7 @@ export type UseFormValidationReponseType<T> = {
|
|
|
14
14
|
validationErrors: ValidationErrorsType<T>;
|
|
15
15
|
isValid: Ref<boolean>;
|
|
16
16
|
validate: (isReactive?: boolean) => void;
|
|
17
|
-
stopValidating: (
|
|
17
|
+
stopValidating: () => void;
|
|
18
18
|
};
|
|
19
19
|
export declare const scrollToElementByClass: (elementClass: string, index?: number) => void;
|
|
20
20
|
export declare const scrollToFirstInvalidElement: <T>(validationErrors: Partial<Record<keyof T, string>>) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ELLIPSIS = "...";
|
package/consts/common.js
ADDED
package/consts/regex.d.ts
CHANGED
package/consts/regex.js
CHANGED