@kong-ui-public/analytics-metric-provider 7.0.5 → 7.1.1
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/README.md +44 -8
- package/dist/style.css +1 -1
- package/dist/types/components/MetricCardContainer.vue.d.ts +91 -0
- package/dist/types/components/MetricCardContainer.vue.d.ts.map +1 -0
- package/dist/types/components/MetricsConsumer.vue.d.ts +3 -4
- package/dist/types/components/MetricsConsumer.vue.d.ts.map +1 -1
- package/dist/types/components/MetricsProvider.vue.d.ts +2 -2
- package/dist/types/components/MetricsTestHarness.vue.d.ts +2 -2
- package/dist/types/components/MetricsTestHarness.vue.d.ts.map +1 -1
- package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts +3 -0
- package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts.map +1 -0
- package/dist/types/components/display/MetricsCard.vue.d.ts +511 -0
- package/dist/types/components/display/MetricsCard.vue.d.ts.map +1 -0
- package/dist/types/composables/useMetricCardBuilder.d.ts +2 -1
- package/dist/types/composables/useMetricCardBuilder.d.ts.map +1 -1
- package/dist/types/enums/index.d.ts +3 -0
- package/dist/types/enums/index.d.ts.map +1 -0
- package/dist/types/enums/metric-card-size.enum.d.ts +7 -0
- package/dist/types/enums/metric-card-size.enum.d.ts.map +1 -0
- package/dist/types/enums/metric-card-type.enum.d.ts +7 -0
- package/dist/types/enums/metric-card-type.enum.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/metric-card.d.ts +36 -0
- package/dist/types/types/metric-card.d.ts.map +1 -0
- package/dist/types/utilities/index.d.ts +2 -0
- package/dist/types/utilities/index.d.ts.map +1 -0
- package/dist/types/utilities/trend-display.d.ts +24 -0
- package/dist/types/utilities/trend-display.d.ts.map +1 -0
- package/dist/vitals-metric-provider.es.js +736 -732
- package/dist/vitals-metric-provider.umd.js +1 -1
- package/package.json +9 -7
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import { MetricCardSize, MetricCardType } from '../../enums';
|
|
3
|
+
import type { HeaderTag } from '@kong/kongponents';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
cardType: {
|
|
6
|
+
type: PropType<MetricCardType>;
|
|
7
|
+
required: true;
|
|
8
|
+
default: MetricCardType;
|
|
9
|
+
};
|
|
10
|
+
title: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
tooltip: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
required: false;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
timeframe: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
required: false;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
metricValue: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
metricChange: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
changePolarity: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
trendIcon: {
|
|
43
|
+
type: PropType<import("vue").DefineComponent<{
|
|
44
|
+
title: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
required: false;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
color: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
required: false;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
display: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
required: false;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
decorative: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
required: false;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
size: {
|
|
65
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
66
|
+
required: false;
|
|
67
|
+
default: "24px";
|
|
68
|
+
validator: (sizeValue: string | number) => boolean;
|
|
69
|
+
};
|
|
70
|
+
as: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
required: false;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
76
|
+
title: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
required: false;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
color: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
required: false;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
display: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
required: false;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
decorative: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
required: false;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
size: {
|
|
97
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
98
|
+
required: false;
|
|
99
|
+
default: "24px";
|
|
100
|
+
validator: (sizeValue: string | number) => boolean;
|
|
101
|
+
};
|
|
102
|
+
as: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
required: false;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
}>>, {
|
|
108
|
+
title: string;
|
|
109
|
+
color: string;
|
|
110
|
+
display: string;
|
|
111
|
+
decorative: boolean;
|
|
112
|
+
size: string | number;
|
|
113
|
+
as: string;
|
|
114
|
+
}, {}>>;
|
|
115
|
+
default: import("vue").DefineComponent<{
|
|
116
|
+
title: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
required: false;
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
121
|
+
color: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
required: false;
|
|
124
|
+
default: string;
|
|
125
|
+
};
|
|
126
|
+
display: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
required: false;
|
|
129
|
+
default: string;
|
|
130
|
+
};
|
|
131
|
+
decorative: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
required: false;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
size: {
|
|
137
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
138
|
+
required: false;
|
|
139
|
+
default: "24px";
|
|
140
|
+
validator: (sizeValue: string | number) => boolean;
|
|
141
|
+
};
|
|
142
|
+
as: {
|
|
143
|
+
type: StringConstructor;
|
|
144
|
+
required: false;
|
|
145
|
+
default: string;
|
|
146
|
+
};
|
|
147
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
148
|
+
title: {
|
|
149
|
+
type: StringConstructor;
|
|
150
|
+
required: false;
|
|
151
|
+
default: string;
|
|
152
|
+
};
|
|
153
|
+
color: {
|
|
154
|
+
type: StringConstructor;
|
|
155
|
+
required: false;
|
|
156
|
+
default: string;
|
|
157
|
+
};
|
|
158
|
+
display: {
|
|
159
|
+
type: StringConstructor;
|
|
160
|
+
required: false;
|
|
161
|
+
default: string;
|
|
162
|
+
};
|
|
163
|
+
decorative: {
|
|
164
|
+
type: BooleanConstructor;
|
|
165
|
+
required: false;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
168
|
+
size: {
|
|
169
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
170
|
+
required: false;
|
|
171
|
+
default: "24px";
|
|
172
|
+
validator: (sizeValue: string | number) => boolean;
|
|
173
|
+
};
|
|
174
|
+
as: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
required: false;
|
|
177
|
+
default: string;
|
|
178
|
+
};
|
|
179
|
+
}>>, {
|
|
180
|
+
title: string;
|
|
181
|
+
color: string;
|
|
182
|
+
display: string;
|
|
183
|
+
decorative: boolean;
|
|
184
|
+
size: string | number;
|
|
185
|
+
as: string;
|
|
186
|
+
}, {}>;
|
|
187
|
+
};
|
|
188
|
+
trendRange: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
default: string;
|
|
191
|
+
};
|
|
192
|
+
hasError: {
|
|
193
|
+
type: BooleanConstructor;
|
|
194
|
+
default: boolean;
|
|
195
|
+
};
|
|
196
|
+
errorMessage: {
|
|
197
|
+
type: StringConstructor;
|
|
198
|
+
default: string;
|
|
199
|
+
};
|
|
200
|
+
cardSize: {
|
|
201
|
+
type: PropType<MetricCardSize>;
|
|
202
|
+
required: false;
|
|
203
|
+
default: () => MetricCardSize;
|
|
204
|
+
};
|
|
205
|
+
hasContainerTitle: {
|
|
206
|
+
type: BooleanConstructor;
|
|
207
|
+
required: false;
|
|
208
|
+
default: boolean;
|
|
209
|
+
};
|
|
210
|
+
titleTag: {
|
|
211
|
+
type: PropType<HeaderTag>;
|
|
212
|
+
default: string;
|
|
213
|
+
};
|
|
214
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
215
|
+
cardType: {
|
|
216
|
+
type: PropType<MetricCardType>;
|
|
217
|
+
required: true;
|
|
218
|
+
default: MetricCardType;
|
|
219
|
+
};
|
|
220
|
+
title: {
|
|
221
|
+
type: StringConstructor;
|
|
222
|
+
default: string;
|
|
223
|
+
required: true;
|
|
224
|
+
};
|
|
225
|
+
description: {
|
|
226
|
+
type: StringConstructor;
|
|
227
|
+
default: string;
|
|
228
|
+
required: false;
|
|
229
|
+
};
|
|
230
|
+
tooltip: {
|
|
231
|
+
type: StringConstructor;
|
|
232
|
+
required: false;
|
|
233
|
+
default: string;
|
|
234
|
+
};
|
|
235
|
+
timeframe: {
|
|
236
|
+
type: StringConstructor;
|
|
237
|
+
required: false;
|
|
238
|
+
default: string;
|
|
239
|
+
};
|
|
240
|
+
metricValue: {
|
|
241
|
+
type: StringConstructor;
|
|
242
|
+
default: string;
|
|
243
|
+
};
|
|
244
|
+
metricChange: {
|
|
245
|
+
type: StringConstructor;
|
|
246
|
+
required: true;
|
|
247
|
+
};
|
|
248
|
+
changePolarity: {
|
|
249
|
+
type: NumberConstructor;
|
|
250
|
+
required: true;
|
|
251
|
+
};
|
|
252
|
+
trendIcon: {
|
|
253
|
+
type: PropType<import("vue").DefineComponent<{
|
|
254
|
+
title: {
|
|
255
|
+
type: StringConstructor;
|
|
256
|
+
required: false;
|
|
257
|
+
default: string;
|
|
258
|
+
};
|
|
259
|
+
color: {
|
|
260
|
+
type: StringConstructor;
|
|
261
|
+
required: false;
|
|
262
|
+
default: string;
|
|
263
|
+
};
|
|
264
|
+
display: {
|
|
265
|
+
type: StringConstructor;
|
|
266
|
+
required: false;
|
|
267
|
+
default: string;
|
|
268
|
+
};
|
|
269
|
+
decorative: {
|
|
270
|
+
type: BooleanConstructor;
|
|
271
|
+
required: false;
|
|
272
|
+
default: boolean;
|
|
273
|
+
};
|
|
274
|
+
size: {
|
|
275
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
276
|
+
required: false;
|
|
277
|
+
default: "24px";
|
|
278
|
+
validator: (sizeValue: string | number) => boolean;
|
|
279
|
+
};
|
|
280
|
+
as: {
|
|
281
|
+
type: StringConstructor;
|
|
282
|
+
required: false;
|
|
283
|
+
default: string;
|
|
284
|
+
};
|
|
285
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
286
|
+
title: {
|
|
287
|
+
type: StringConstructor;
|
|
288
|
+
required: false;
|
|
289
|
+
default: string;
|
|
290
|
+
};
|
|
291
|
+
color: {
|
|
292
|
+
type: StringConstructor;
|
|
293
|
+
required: false;
|
|
294
|
+
default: string;
|
|
295
|
+
};
|
|
296
|
+
display: {
|
|
297
|
+
type: StringConstructor;
|
|
298
|
+
required: false;
|
|
299
|
+
default: string;
|
|
300
|
+
};
|
|
301
|
+
decorative: {
|
|
302
|
+
type: BooleanConstructor;
|
|
303
|
+
required: false;
|
|
304
|
+
default: boolean;
|
|
305
|
+
};
|
|
306
|
+
size: {
|
|
307
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
308
|
+
required: false;
|
|
309
|
+
default: "24px";
|
|
310
|
+
validator: (sizeValue: string | number) => boolean;
|
|
311
|
+
};
|
|
312
|
+
as: {
|
|
313
|
+
type: StringConstructor;
|
|
314
|
+
required: false;
|
|
315
|
+
default: string;
|
|
316
|
+
};
|
|
317
|
+
}>>, {
|
|
318
|
+
title: string;
|
|
319
|
+
color: string;
|
|
320
|
+
display: string;
|
|
321
|
+
decorative: boolean;
|
|
322
|
+
size: string | number;
|
|
323
|
+
as: string;
|
|
324
|
+
}, {}>>;
|
|
325
|
+
default: import("vue").DefineComponent<{
|
|
326
|
+
title: {
|
|
327
|
+
type: StringConstructor;
|
|
328
|
+
required: false;
|
|
329
|
+
default: string;
|
|
330
|
+
};
|
|
331
|
+
color: {
|
|
332
|
+
type: StringConstructor;
|
|
333
|
+
required: false;
|
|
334
|
+
default: string;
|
|
335
|
+
};
|
|
336
|
+
display: {
|
|
337
|
+
type: StringConstructor;
|
|
338
|
+
required: false;
|
|
339
|
+
default: string;
|
|
340
|
+
};
|
|
341
|
+
decorative: {
|
|
342
|
+
type: BooleanConstructor;
|
|
343
|
+
required: false;
|
|
344
|
+
default: boolean;
|
|
345
|
+
};
|
|
346
|
+
size: {
|
|
347
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
348
|
+
required: false;
|
|
349
|
+
default: "24px";
|
|
350
|
+
validator: (sizeValue: string | number) => boolean;
|
|
351
|
+
};
|
|
352
|
+
as: {
|
|
353
|
+
type: StringConstructor;
|
|
354
|
+
required: false;
|
|
355
|
+
default: string;
|
|
356
|
+
};
|
|
357
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
358
|
+
title: {
|
|
359
|
+
type: StringConstructor;
|
|
360
|
+
required: false;
|
|
361
|
+
default: string;
|
|
362
|
+
};
|
|
363
|
+
color: {
|
|
364
|
+
type: StringConstructor;
|
|
365
|
+
required: false;
|
|
366
|
+
default: string;
|
|
367
|
+
};
|
|
368
|
+
display: {
|
|
369
|
+
type: StringConstructor;
|
|
370
|
+
required: false;
|
|
371
|
+
default: string;
|
|
372
|
+
};
|
|
373
|
+
decorative: {
|
|
374
|
+
type: BooleanConstructor;
|
|
375
|
+
required: false;
|
|
376
|
+
default: boolean;
|
|
377
|
+
};
|
|
378
|
+
size: {
|
|
379
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
380
|
+
required: false;
|
|
381
|
+
default: "24px";
|
|
382
|
+
validator: (sizeValue: string | number) => boolean;
|
|
383
|
+
};
|
|
384
|
+
as: {
|
|
385
|
+
type: StringConstructor;
|
|
386
|
+
required: false;
|
|
387
|
+
default: string;
|
|
388
|
+
};
|
|
389
|
+
}>>, {
|
|
390
|
+
title: string;
|
|
391
|
+
color: string;
|
|
392
|
+
display: string;
|
|
393
|
+
decorative: boolean;
|
|
394
|
+
size: string | number;
|
|
395
|
+
as: string;
|
|
396
|
+
}, {}>;
|
|
397
|
+
};
|
|
398
|
+
trendRange: {
|
|
399
|
+
type: StringConstructor;
|
|
400
|
+
default: string;
|
|
401
|
+
};
|
|
402
|
+
hasError: {
|
|
403
|
+
type: BooleanConstructor;
|
|
404
|
+
default: boolean;
|
|
405
|
+
};
|
|
406
|
+
errorMessage: {
|
|
407
|
+
type: StringConstructor;
|
|
408
|
+
default: string;
|
|
409
|
+
};
|
|
410
|
+
cardSize: {
|
|
411
|
+
type: PropType<MetricCardSize>;
|
|
412
|
+
required: false;
|
|
413
|
+
default: () => MetricCardSize;
|
|
414
|
+
};
|
|
415
|
+
hasContainerTitle: {
|
|
416
|
+
type: BooleanConstructor;
|
|
417
|
+
required: false;
|
|
418
|
+
default: boolean;
|
|
419
|
+
};
|
|
420
|
+
titleTag: {
|
|
421
|
+
type: PropType<HeaderTag>;
|
|
422
|
+
default: string;
|
|
423
|
+
};
|
|
424
|
+
}>>, {
|
|
425
|
+
title: string;
|
|
426
|
+
cardType: MetricCardType;
|
|
427
|
+
description: string;
|
|
428
|
+
tooltip: string;
|
|
429
|
+
timeframe: string;
|
|
430
|
+
metricValue: string;
|
|
431
|
+
trendIcon: import("vue").DefineComponent<{
|
|
432
|
+
title: {
|
|
433
|
+
type: StringConstructor;
|
|
434
|
+
required: false;
|
|
435
|
+
default: string;
|
|
436
|
+
};
|
|
437
|
+
color: {
|
|
438
|
+
type: StringConstructor;
|
|
439
|
+
required: false;
|
|
440
|
+
default: string;
|
|
441
|
+
};
|
|
442
|
+
display: {
|
|
443
|
+
type: StringConstructor;
|
|
444
|
+
required: false;
|
|
445
|
+
default: string;
|
|
446
|
+
};
|
|
447
|
+
decorative: {
|
|
448
|
+
type: BooleanConstructor;
|
|
449
|
+
required: false;
|
|
450
|
+
default: boolean;
|
|
451
|
+
};
|
|
452
|
+
size: {
|
|
453
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
454
|
+
required: false;
|
|
455
|
+
default: "24px";
|
|
456
|
+
validator: (sizeValue: string | number) => boolean;
|
|
457
|
+
};
|
|
458
|
+
as: {
|
|
459
|
+
type: StringConstructor;
|
|
460
|
+
required: false;
|
|
461
|
+
default: string;
|
|
462
|
+
};
|
|
463
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
464
|
+
title: {
|
|
465
|
+
type: StringConstructor;
|
|
466
|
+
required: false;
|
|
467
|
+
default: string;
|
|
468
|
+
};
|
|
469
|
+
color: {
|
|
470
|
+
type: StringConstructor;
|
|
471
|
+
required: false;
|
|
472
|
+
default: string;
|
|
473
|
+
};
|
|
474
|
+
display: {
|
|
475
|
+
type: StringConstructor;
|
|
476
|
+
required: false;
|
|
477
|
+
default: string;
|
|
478
|
+
};
|
|
479
|
+
decorative: {
|
|
480
|
+
type: BooleanConstructor;
|
|
481
|
+
required: false;
|
|
482
|
+
default: boolean;
|
|
483
|
+
};
|
|
484
|
+
size: {
|
|
485
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
486
|
+
required: false;
|
|
487
|
+
default: "24px";
|
|
488
|
+
validator: (sizeValue: string | number) => boolean;
|
|
489
|
+
};
|
|
490
|
+
as: {
|
|
491
|
+
type: StringConstructor;
|
|
492
|
+
required: false;
|
|
493
|
+
default: string;
|
|
494
|
+
};
|
|
495
|
+
}>>, {
|
|
496
|
+
title: string;
|
|
497
|
+
color: string;
|
|
498
|
+
display: string;
|
|
499
|
+
decorative: boolean;
|
|
500
|
+
size: string | number;
|
|
501
|
+
as: string;
|
|
502
|
+
}, {}>;
|
|
503
|
+
trendRange: string;
|
|
504
|
+
hasError: boolean;
|
|
505
|
+
errorMessage: string;
|
|
506
|
+
cardSize: MetricCardSize;
|
|
507
|
+
hasContainerTitle: boolean;
|
|
508
|
+
titleTag: HeaderTag;
|
|
509
|
+
}, {}>;
|
|
510
|
+
export default _default;
|
|
511
|
+
//# sourceMappingURL=MetricsCard.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/display/MetricsCard.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AASnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmelD,wBA0EG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { MetricCardDef
|
|
1
|
+
import type { MetricCardDef } from '../types';
|
|
2
|
+
import type { MetricCardType } from '../enums';
|
|
2
3
|
import type { Ref } from 'vue';
|
|
3
4
|
import type { ChronologicalMappedMetrics } from './useMetricFetcher';
|
|
4
5
|
import { DEFAULT_KEY } from './useMetricFetcher';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMetricCardBuilder.d.ts","sourceRoot":"","sources":["../../../src/composables/useMetricCardBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useMetricCardBuilder.d.ts","sourceRoot":"","sources":["../../../src/composables/useMetricCardBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,eAAO,MAAM,SAAS,gBAAiB,0BAA0B,UAAU,SAAS,GAAG,UAAU,uBAAsB,MAAM,GAAG,kBAAkB,qBAAmC,MAAM,EAAE,WAY5L,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,CAAC,aAAa,CAAC,CAyCrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-card-size.enum.d.ts","sourceRoot":"","sources":["../../../src/enums/metric-card-size.enum.ts"],"names":[],"mappings":"AACA,oBAAY,cAAc;IACxB,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,UAAU,OAAO;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-card-type.enum.d.ts","sourceRoot":"","sources":["../../../src/enums/metric-card-type.enum.ts"],"names":[],"mappings":"AACA,oBAAY,cAAc;IACxB,aAAa,iBAAiB;IAC9B,OAAO,YAAY;IACnB,UAAU,cAAc;IACxB,OAAO,YAAY;CACpB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ import MetricsConsumer from './components/MetricsConsumer.vue';
|
|
|
3
3
|
import { mockExploreResponseFromCypress, mockExploreResponse } from './mockExploreResponse';
|
|
4
4
|
export { MetricsProvider, MetricsConsumer, mockExploreResponseFromCypress, mockExploreResponse, };
|
|
5
5
|
export * from './types';
|
|
6
|
+
export * from './enums';
|
|
7
|
+
export * from './constants';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3F,OAAO,EACL,eAAe,EACf,eAAe,EACf,8BAA8B,EAC9B,mBAAmB,GACpB,CAAA;AAED,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3F,OAAO,EACL,eAAe,EACf,eAAe,EACf,8BAA8B,EAC9B,mBAAmB,GACpB,CAAA;AAED,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { MetricCardType, MetricCardSize } from '../enums';
|
|
2
|
+
import type { KongIcon as GenericIcon } from '@kong/icons';
|
|
3
|
+
import type { HeaderTag } from '@kong/kongponents';
|
|
4
|
+
export interface MetricCardDef {
|
|
5
|
+
cardType?: MetricCardType;
|
|
6
|
+
currentValue: number;
|
|
7
|
+
previousValue: number;
|
|
8
|
+
increaseIsBad: boolean;
|
|
9
|
+
formatValueFn?: (rawValue: number) => string;
|
|
10
|
+
formatChangeFn?: (rawValue: number) => string;
|
|
11
|
+
description?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
titleTag?: HeaderTag;
|
|
14
|
+
hasError?: boolean;
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
trendRange?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface MetricCardDisplayValue {
|
|
19
|
+
metricValue: string;
|
|
20
|
+
metricChange: string;
|
|
21
|
+
changePolarity: number;
|
|
22
|
+
trendIcon?: typeof GenericIcon;
|
|
23
|
+
cardSize?: MetricCardSize;
|
|
24
|
+
hasContainerTitle?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface MetricCardContainerOptions {
|
|
27
|
+
cards: Array<MetricCardDef>;
|
|
28
|
+
fallbackDisplayText: string;
|
|
29
|
+
hasTrendAccess: boolean;
|
|
30
|
+
loading: boolean;
|
|
31
|
+
cardSize?: MetricCardSize;
|
|
32
|
+
containerTitle?: string;
|
|
33
|
+
containerDescription?: string;
|
|
34
|
+
errorMessage?: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=metric-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-card.d.ts","sourceRoot":"","sources":["../../../src/types/metric-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9D,OAAO,KAAK,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,WAAW,CAAA;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IndeterminateSmallIcon as GenericIcon } from '@kong/icons';
|
|
2
|
+
export declare const DECIMAL_DISPLAY = 2;
|
|
3
|
+
export declare const DECIMAL_ROUNDING_PRECISION: number;
|
|
4
|
+
/**
|
|
5
|
+
* Beneficial increase (eg: Traffic) is considered good.
|
|
6
|
+
* Detrimental increase (eg: Error traffic) is considered bad, and behave in the opposite manner.
|
|
7
|
+
* @param {number} delta - A numeric representation of week-to-week change
|
|
8
|
+
* @param {Boolean} thisIsBad - Flag to determine whether change is beneficial or detrimental
|
|
9
|
+
* @returns {string}
|
|
10
|
+
*/
|
|
11
|
+
export declare const changePolarity: (delta: number, hasTrendAccess: boolean, thisIsBad?: boolean) => number;
|
|
12
|
+
/**
|
|
13
|
+
* Determines the trend value to be displayed by the metric card
|
|
14
|
+
* @param {number} delta The change amount during the given time period. Assumed to be a percentage; e.g., delta = 0.1 will be rendered as '10.00%'.
|
|
15
|
+
* @param {Boolean} hasTrendAccess Whether the user's Tier allows it
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export declare const metricChange: (delta: number, hasTrendAccess: boolean, fallback: string) => string;
|
|
19
|
+
export declare const calculateChange: (curr: number, prev: number) => number;
|
|
20
|
+
/**
|
|
21
|
+
* Determines whether to display an upward or downward trend, or no change
|
|
22
|
+
*/
|
|
23
|
+
export declare const defineIcon: (polarity: number, thisIsBad?: boolean) => typeof GenericIcon;
|
|
24
|
+
//# sourceMappingURL=trend-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trend-display.d.ts","sourceRoot":"","sources":["../../../src/utilities/trend-display.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,sBAAsB,IAAI,WAAW,EACtC,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,eAAe,IAAI,CAAA;AAGhC,eAAO,MAAM,0BAA0B,QAAsB,CAAA;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,UAAW,MAAM,kBAAkB,OAAO,cAAY,OAAO,KAAW,MAalG,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAAW,MAAM,kBAAkB,OAAO,YAAY,MAAM,KAAG,MAIvF,CAAA;AAGD,eAAO,MAAM,eAAe,SAAU,MAAM,QAAQ,MAAM,WAOzD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,aAAc,MAAM,cAAa,OAAO,KAAW,kBAUzE,CAAA"}
|