@kong-ui-public/analytics-metric-provider 9.1.1 → 9.1.2-pr.2030.3ee7f86d0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/package.json +8 -8
  2. package/dist/style.css +0 -1
  3. package/dist/types/components/MetricCardContainer.vue.d.ts +0 -91
  4. package/dist/types/components/MetricCardContainer.vue.d.ts.map +0 -1
  5. package/dist/types/components/MetricsConsumer.vue.d.ts +0 -41
  6. package/dist/types/components/MetricsConsumer.vue.d.ts.map +0 -1
  7. package/dist/types/components/MetricsProvider.vue.d.ts +0 -70
  8. package/dist/types/components/MetricsProvider.vue.d.ts.map +0 -1
  9. package/dist/types/components/MetricsTestHarness.vue.d.ts +0 -33
  10. package/dist/types/components/MetricsTestHarness.vue.d.ts.map +0 -1
  11. package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts +0 -3
  12. package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts.map +0 -1
  13. package/dist/types/components/display/MetricsCard.vue.d.ts +0 -397
  14. package/dist/types/components/display/MetricsCard.vue.d.ts.map +0 -1
  15. package/dist/types/components/metricsProviderUtil.d.ts +0 -36
  16. package/dist/types/components/metricsProviderUtil.d.ts.map +0 -1
  17. package/dist/types/composables/index.d.ts +0 -12
  18. package/dist/types/composables/index.d.ts.map +0 -1
  19. package/dist/types/composables/useI18n.d.ts +0 -9
  20. package/dist/types/composables/useI18n.d.ts.map +0 -1
  21. package/dist/types/composables/useMetricCardBuilder.d.ts +0 -20
  22. package/dist/types/composables/useMetricCardBuilder.d.ts.map +0 -1
  23. package/dist/types/composables/useMetricFetcher.d.ts +0 -19
  24. package/dist/types/composables/useMetricFetcher.d.ts.map +0 -1
  25. package/dist/types/composables/useRequest.d.ts +0 -12
  26. package/dist/types/composables/useRequest.d.ts.map +0 -1
  27. package/dist/types/constants.d.ts +0 -7
  28. package/dist/types/constants.d.ts.map +0 -1
  29. package/dist/types/enums/index.d.ts +0 -3
  30. package/dist/types/enums/index.d.ts.map +0 -1
  31. package/dist/types/enums/metric-card-size.enum.d.ts +0 -7
  32. package/dist/types/enums/metric-card-size.enum.d.ts.map +0 -1
  33. package/dist/types/enums/metric-card-type.enum.d.ts +0 -7
  34. package/dist/types/enums/metric-card-type.enum.d.ts.map +0 -1
  35. package/dist/types/index.d.ts +0 -8
  36. package/dist/types/index.d.ts.map +0 -1
  37. package/dist/types/mockExploreResponse.d.ts +0 -10
  38. package/dist/types/mockExploreResponse.d.ts.map +0 -1
  39. package/dist/types/types/fetcher-types.d.ts +0 -17
  40. package/dist/types/types/fetcher-types.d.ts.map +0 -1
  41. package/dist/types/types/index.d.ts +0 -3
  42. package/dist/types/types/index.d.ts.map +0 -1
  43. package/dist/types/types/metric-card.d.ts +0 -36
  44. package/dist/types/types/metric-card.d.ts.map +0 -1
  45. package/dist/types/utilities/index.d.ts +0 -2
  46. package/dist/types/utilities/index.d.ts.map +0 -1
  47. package/dist/types/utilities/trend-display.d.ts +0 -24
  48. package/dist/types/utilities/trend-display.d.ts.map +0 -1
  49. package/dist/vitals-metric-provider.es.js +0 -1191
  50. package/dist/vitals-metric-provider.umd.js +0 -1
@@ -1,397 +0,0 @@
1
- import type { PropType } from 'vue';
2
- import { MetricCardSize, MetricCardType } from '../../enums';
3
- import type { HeaderTag } from '@kong/kongponents';
4
- import type { KongIcon as GenericIcon } from '@kong/icons';
5
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
- cardType: {
7
- type: PropType<MetricCardType>;
8
- required: true;
9
- default: MetricCardType;
10
- };
11
- title: {
12
- type: StringConstructor;
13
- default: string;
14
- required: true;
15
- };
16
- description: {
17
- type: StringConstructor;
18
- default: string;
19
- required: false;
20
- };
21
- tooltip: {
22
- type: StringConstructor;
23
- required: false;
24
- default: string;
25
- };
26
- timeframe: {
27
- type: StringConstructor;
28
- required: false;
29
- default: string;
30
- };
31
- metricValue: {
32
- type: StringConstructor;
33
- default: string;
34
- };
35
- metricChange: {
36
- type: StringConstructor;
37
- required: true;
38
- };
39
- changePolarity: {
40
- type: NumberConstructor;
41
- required: true;
42
- };
43
- trendIcon: {
44
- type: PropType<typeof GenericIcon>;
45
- default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
46
- title: {
47
- type: StringConstructor;
48
- required: false;
49
- default: string;
50
- };
51
- color: {
52
- type: StringConstructor;
53
- required: false;
54
- default: string;
55
- };
56
- display: {
57
- type: StringConstructor;
58
- required: false;
59
- default: string;
60
- };
61
- decorative: {
62
- type: BooleanConstructor;
63
- required: false;
64
- default: boolean;
65
- };
66
- size: {
67
- type: (StringConstructor | NumberConstructor)[];
68
- required: false;
69
- default: "24px";
70
- validator: (sizeValue: number | string) => boolean;
71
- };
72
- as: {
73
- type: StringConstructor;
74
- required: false;
75
- default: string;
76
- };
77
- staticIds: {
78
- type: BooleanConstructor;
79
- default: boolean;
80
- };
81
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
82
- title: {
83
- type: StringConstructor;
84
- required: false;
85
- default: string;
86
- };
87
- color: {
88
- type: StringConstructor;
89
- required: false;
90
- default: string;
91
- };
92
- display: {
93
- type: StringConstructor;
94
- required: false;
95
- default: string;
96
- };
97
- decorative: {
98
- type: BooleanConstructor;
99
- required: false;
100
- default: boolean;
101
- };
102
- size: {
103
- type: (StringConstructor | NumberConstructor)[];
104
- required: false;
105
- default: "24px";
106
- validator: (sizeValue: number | string) => boolean;
107
- };
108
- as: {
109
- type: StringConstructor;
110
- required: false;
111
- default: string;
112
- };
113
- staticIds: {
114
- type: BooleanConstructor;
115
- default: boolean;
116
- };
117
- }>> & Readonly<{}>, {
118
- title: string;
119
- color: string;
120
- display: string;
121
- decorative: boolean;
122
- size: string | number;
123
- as: string;
124
- staticIds: boolean;
125
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
126
- };
127
- trendRange: {
128
- type: StringConstructor;
129
- default: string;
130
- };
131
- hasError: {
132
- type: BooleanConstructor;
133
- default: boolean;
134
- };
135
- errorMessage: {
136
- type: StringConstructor;
137
- default: string;
138
- };
139
- cardSize: {
140
- type: PropType<MetricCardSize>;
141
- required: false;
142
- default: () => MetricCardSize;
143
- };
144
- hasContainerTitle: {
145
- type: BooleanConstructor;
146
- required: false;
147
- default: boolean;
148
- };
149
- titleTag: {
150
- type: PropType<HeaderTag>;
151
- default: string;
152
- };
153
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
154
- cardType: {
155
- type: PropType<MetricCardType>;
156
- required: true;
157
- default: MetricCardType;
158
- };
159
- title: {
160
- type: StringConstructor;
161
- default: string;
162
- required: true;
163
- };
164
- description: {
165
- type: StringConstructor;
166
- default: string;
167
- required: false;
168
- };
169
- tooltip: {
170
- type: StringConstructor;
171
- required: false;
172
- default: string;
173
- };
174
- timeframe: {
175
- type: StringConstructor;
176
- required: false;
177
- default: string;
178
- };
179
- metricValue: {
180
- type: StringConstructor;
181
- default: string;
182
- };
183
- metricChange: {
184
- type: StringConstructor;
185
- required: true;
186
- };
187
- changePolarity: {
188
- type: NumberConstructor;
189
- required: true;
190
- };
191
- trendIcon: {
192
- type: PropType<typeof GenericIcon>;
193
- default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
194
- title: {
195
- type: StringConstructor;
196
- required: false;
197
- default: string;
198
- };
199
- color: {
200
- type: StringConstructor;
201
- required: false;
202
- default: string;
203
- };
204
- display: {
205
- type: StringConstructor;
206
- required: false;
207
- default: string;
208
- };
209
- decorative: {
210
- type: BooleanConstructor;
211
- required: false;
212
- default: boolean;
213
- };
214
- size: {
215
- type: (StringConstructor | NumberConstructor)[];
216
- required: false;
217
- default: "24px";
218
- validator: (sizeValue: number | string) => boolean;
219
- };
220
- as: {
221
- type: StringConstructor;
222
- required: false;
223
- default: string;
224
- };
225
- staticIds: {
226
- type: BooleanConstructor;
227
- default: boolean;
228
- };
229
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
230
- title: {
231
- type: StringConstructor;
232
- required: false;
233
- default: string;
234
- };
235
- color: {
236
- type: StringConstructor;
237
- required: false;
238
- default: string;
239
- };
240
- display: {
241
- type: StringConstructor;
242
- required: false;
243
- default: string;
244
- };
245
- decorative: {
246
- type: BooleanConstructor;
247
- required: false;
248
- default: boolean;
249
- };
250
- size: {
251
- type: (StringConstructor | NumberConstructor)[];
252
- required: false;
253
- default: "24px";
254
- validator: (sizeValue: number | string) => boolean;
255
- };
256
- as: {
257
- type: StringConstructor;
258
- required: false;
259
- default: string;
260
- };
261
- staticIds: {
262
- type: BooleanConstructor;
263
- default: boolean;
264
- };
265
- }>> & Readonly<{}>, {
266
- title: string;
267
- color: string;
268
- display: string;
269
- decorative: boolean;
270
- size: string | number;
271
- as: string;
272
- staticIds: boolean;
273
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
274
- };
275
- trendRange: {
276
- type: StringConstructor;
277
- default: string;
278
- };
279
- hasError: {
280
- type: BooleanConstructor;
281
- default: boolean;
282
- };
283
- errorMessage: {
284
- type: StringConstructor;
285
- default: string;
286
- };
287
- cardSize: {
288
- type: PropType<MetricCardSize>;
289
- required: false;
290
- default: () => MetricCardSize;
291
- };
292
- hasContainerTitle: {
293
- type: BooleanConstructor;
294
- required: false;
295
- default: boolean;
296
- };
297
- titleTag: {
298
- type: PropType<HeaderTag>;
299
- default: string;
300
- };
301
- }>> & Readonly<{}>, {
302
- title: string;
303
- trendRange: string;
304
- cardType: MetricCardType;
305
- description: string;
306
- hasError: boolean;
307
- timeframe: string;
308
- tooltip: string;
309
- metricValue: string;
310
- trendIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
311
- title: {
312
- type: StringConstructor;
313
- required: false;
314
- default: string;
315
- };
316
- color: {
317
- type: StringConstructor;
318
- required: false;
319
- default: string;
320
- };
321
- display: {
322
- type: StringConstructor;
323
- required: false;
324
- default: string;
325
- };
326
- decorative: {
327
- type: BooleanConstructor;
328
- required: false;
329
- default: boolean;
330
- };
331
- size: {
332
- type: (StringConstructor | NumberConstructor)[];
333
- required: false;
334
- default: "24px";
335
- validator: (sizeValue: number | string) => boolean;
336
- };
337
- as: {
338
- type: StringConstructor;
339
- required: false;
340
- default: string;
341
- };
342
- staticIds: {
343
- type: BooleanConstructor;
344
- default: boolean;
345
- };
346
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
347
- title: {
348
- type: StringConstructor;
349
- required: false;
350
- default: string;
351
- };
352
- color: {
353
- type: StringConstructor;
354
- required: false;
355
- default: string;
356
- };
357
- display: {
358
- type: StringConstructor;
359
- required: false;
360
- default: string;
361
- };
362
- decorative: {
363
- type: BooleanConstructor;
364
- required: false;
365
- default: boolean;
366
- };
367
- size: {
368
- type: (StringConstructor | NumberConstructor)[];
369
- required: false;
370
- default: "24px";
371
- validator: (sizeValue: number | string) => boolean;
372
- };
373
- as: {
374
- type: StringConstructor;
375
- required: false;
376
- default: string;
377
- };
378
- staticIds: {
379
- type: BooleanConstructor;
380
- default: boolean;
381
- };
382
- }>> & Readonly<{}>, {
383
- title: string;
384
- color: string;
385
- display: string;
386
- decorative: boolean;
387
- size: string | number;
388
- as: string;
389
- staticIds: boolean;
390
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
391
- errorMessage: string;
392
- cardSize: MetricCardSize;
393
- hasContainerTitle: boolean;
394
- titleTag: HeaderTag;
395
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
396
- export default _default;
397
- //# sourceMappingURL=MetricsCard.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MetricsCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/display/MetricsCard.vue"],"names":[],"mappings":"AA+ZA,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;AAIlD,OAAO,KAAK,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,aAAa,CAAA;;;cA8ZtC,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqCxB,QAAQ,CAAC,OAAO,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgB5B,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;cAUxB,QAAQ,CAAC,SAAS,CAAC;;;;;cA/DnB,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqCxB,QAAQ,CAAC,OAAO,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgB5B,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;cAUxB,QAAQ,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtEvC,wBA0EG"}
@@ -1,36 +0,0 @@
1
- import { type AnalyticsBridge, type ExploreFilterAll, type FilterableExploreDimensions, type QueryDatasource, type Timeframe } from '@kong-ui-public/analytics-utilities';
2
- import type { InjectionKey, Ref } from 'vue';
3
- import type { FetcherResult } from '../composables/useMetricFetcher';
4
- interface ProviderData {
5
- data: {
6
- traffic: FetcherResult;
7
- latency: FetcherResult;
8
- };
9
- containerTitle: Ref<string | undefined>;
10
- description: Ref<string | undefined>;
11
- hasTrendAccess: Ref<boolean>;
12
- longCardTitles: boolean;
13
- averageLatencies: Ref<boolean>;
14
- }
15
- export declare const METRICS_PROVIDER_KEY: InjectionKey<ProviderData>;
16
- interface FetcherOptions {
17
- datasource: Ref<QueryDatasource>;
18
- dimension?: FilterableExploreDimensions;
19
- dimensionFilterValue?: string;
20
- additionalFilter: Ref<ExploreFilterAll[] | undefined>;
21
- queryReady: Ref<boolean>;
22
- timeframe: Ref<Timeframe>;
23
- tz: Ref<string>;
24
- hasTrendAccess: Ref<boolean>;
25
- refreshInterval: number;
26
- queryFn: AnalyticsBridge['queryFn'];
27
- averageLatencies: Ref<boolean>;
28
- abortController?: AbortController;
29
- refreshCounter: Ref<number>;
30
- }
31
- export declare const defaultFetcherDefs: (opts: FetcherOptions) => {
32
- trafficData: FetcherResult;
33
- latencyData: FetcherResult;
34
- };
35
- export {};
36
- //# sourceMappingURL=metricsProviderUtil.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metricsProviderUtil.d.ts","sourceRoot":"","sources":["../../../src/components/metricsProviderUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EACrB,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,qCAAqC,CAAA;AAI5C,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAEpE,UAAU,YAAY;IACpB,IAAI,EAAE;QACJ,OAAO,EAAE,aAAa,CAAA;QACtB,OAAO,EAAE,aAAa,CAAA;KACvB,CAAA;IACD,cAAc,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACvC,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACpC,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC5B,cAAc,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,YAAY,CAAC,CAAA;AAEhG,UAAU,cAAc;IACtB,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;IAChC,SAAS,CAAC,EAAE,2BAA2B,CAAA;IACvC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,SAAS,CAAC,CAAA;IACrD,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACxB,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IACzB,EAAE,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACf,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC5B,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IACnC,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC9B,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC5B;AAED,eAAO,MAAM,kBAAkB,SAAU,cAAc;;;CAsGtD,CAAA"}
@@ -1,12 +0,0 @@
1
- import useI18n from './useI18n';
2
- import useMetricCardBuilder from './useMetricCardBuilder';
3
- import useMetricFetcher from './useMetricFetcher';
4
- import useRequest from './useRequest';
5
- declare const _default: {
6
- useI18n: typeof useI18n;
7
- useMetricCardBuilder: typeof useMetricCardBuilder;
8
- useMetricFetcher: typeof useMetricFetcher;
9
- useRequest: typeof useRequest;
10
- };
11
- export default _default;
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AACzD,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,UAAU,MAAM,cAAc,CAAA;;;;;;;AAGrC,wBAKC"}
@@ -1,9 +0,0 @@
1
- import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
2
- import english from '../locales/en.json';
3
- interface UseI18nReturn {
4
- i18n: ReturnType<typeof createI18n<typeof english>>;
5
- i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
6
- }
7
- export default function useI18n(): UseI18nReturn;
8
- export {};
9
- //# sourceMappingURL=useI18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
@@ -1,20 +0,0 @@
1
- import type { MetricCardDef } from '../types';
2
- import type { MetricCardType } from '../enums';
3
- import type { Ref } from 'vue';
4
- import type { ChronologicalMappedMetrics } from './useMetricFetcher';
5
- import { DEFAULT_KEY } from './useMetricFetcher';
6
- export interface BuilderOptions {
7
- cardType: MetricCardType;
8
- title: Ref<string>;
9
- description?: string;
10
- record: Ref<ChronologicalMappedMetrics>;
11
- hasError: Ref<boolean>;
12
- lookupKey?: string;
13
- sumGroupedValues?: string[];
14
- increaseIsBad?: boolean;
15
- formatValueFn?: (rawValue: number) => string;
16
- trendRange?: Ref<string>;
17
- }
18
- export declare const sumValues: (recordValue: ChronologicalMappedMetrics, period: "current" | "previous", dimensionLookupKey?: string | typeof DEFAULT_KEY, sumGroupedValues?: string[]) => number;
19
- export default function useMetricCardBuilder(opts: BuilderOptions): Ref<MetricCardDef>;
20
- //# sourceMappingURL=useMetricCardBuilder.d.ts.map
@@ -1 +0,0 @@
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,CAAA;IACxB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,GAAG,CAAC,0BAA0B,CAAC,CAAA;IACvC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACzB;AAED,eAAO,MAAM,SAAS,gBAAiB,0BAA0B,UAAU,SAAS,GAAG,UAAU,uBAAsB,MAAM,GAAG,OAAO,WAAW,qBAAmC,MAAM,EAAE,WAY5L,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,CAAC,aAAa,CAAC,CAyCrF"}
@@ -1,19 +0,0 @@
1
- import type { Ref } from 'vue';
2
- import type { ExploreResultV4 } from '@kong-ui-public/analytics-utilities';
3
- import type { MetricFetcherOptions } from '../types';
4
- export declare const DEFAULT_KEY: unique symbol;
5
- export type MappedMetrics = Record<string | typeof DEFAULT_KEY, Record<string | typeof DEFAULT_KEY, number>>;
6
- export interface ChronologicalMappedMetrics {
7
- current: MappedMetrics;
8
- previous: MappedMetrics;
9
- }
10
- export interface FetcherResult {
11
- isLoading: Ref<boolean>;
12
- hasError: Ref<boolean>;
13
- raw: Ref<ExploreResultV4 | undefined>;
14
- mapped: Ref<ChronologicalMappedMetrics>;
15
- trendRange: Ref<string>;
16
- }
17
- export declare function buildDeltaMapping(result: ExploreResultV4, withTrend: boolean): ChronologicalMappedMetrics;
18
- export default function useMetricFetcher(opts: MetricFetcherOptions): FetcherResult;
19
- //# sourceMappingURL=useMetricFetcher.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMetricFetcher.d.ts","sourceRoot":"","sources":["../../../src/composables/useMetricFetcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAKpD,eAAO,MAAM,WAAW,eAAoB,CAAA;AAC5C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,GAAG,OAAO,WAAW,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,WAAW,EAAE,MAAM,CAAC,CAAC,CAAA;AAM5G,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,aAAa,CAAA;IACtB,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACvB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,GAAG,EAAE,GAAG,CAAC,eAAe,GAAG,SAAS,CAAC,CAAA;IACrC,MAAM,EAAE,GAAG,CAAC,0BAA0B,CAAC,CAAA;IACvC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB;AASD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,0BAA0B,CAiDzG;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,aAAa,CA2FlF"}
@@ -1,12 +0,0 @@
1
- import type { IConfig } from 'swrv';
2
- import type { IKey, fetcherFn } from 'swrv/dist/types';
3
- export default function useRequest<Data = unknown, Error = {
4
- message: string;
5
- }>(key: IKey, fn?: fetcherFn<Data>, config?: IConfig): {
6
- data: import("vue").ComputedRef<Data | undefined>;
7
- response: import("vue").Ref<Data | undefined, Data | undefined>;
8
- error: import("vue").Ref<Error | undefined, Error | undefined>;
9
- isValidating: import("vue").Ref<boolean, boolean>;
10
- revalidate: (data?: fetcherFn<Data> | undefined, opts?: import("swrv/dist/types").revalidateOptions) => Promise<void>;
11
- };
12
- //# sourceMappingURL=useRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRequest.d.ts","sourceRoot":"","sources":["../../../src/composables/useRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGtD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,EAC5E,GAAG,EAAE,IAAI,EACT,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,EACpB,MAAM,CAAC,EAAE,OAAO;;;;;;EAyBjB"}
@@ -1,7 +0,0 @@
1
- export declare const MAX_ANALYTICS_REQUEST_RETRIES = 2;
2
- export declare const ALL_STATUS_CODE_GROUPS: string[];
3
- export declare const STATUS_CODES_FAILED: string[];
4
- export declare const STATUS_CODES_SUCCESS: string[];
5
- export declare const DEFAULT_REFRESH_INTERVAL: number;
6
- export declare const INJECT_QUERY_PROVIDER = "analytics-query-provider";
7
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,eAAO,MAAM,sBAAsB,UAAsC,CAAA;AACzE,eAAO,MAAM,mBAAmB,UAAiB,CAAA;AACjD,eAAO,MAAM,oBAAoB,UAAwB,CAAA;AACzD,eAAO,MAAM,wBAAwB,QAAY,CAAA;AACjD,eAAO,MAAM,qBAAqB,6BAA6B,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './metric-card-type.enum';
2
- export * from './metric-card-size.enum';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA"}
@@ -1,7 +0,0 @@
1
- export declare enum MetricCardSize {
2
- Small = "sm",
3
- Medium = "md",
4
- Large = "lg",
5
- ExtraLarge = "xl"
6
- }
7
- //# sourceMappingURL=metric-card-size.enum.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
1
- export declare enum MetricCardType {
2
- GENERIC_COUNT = "GenericCount",
3
- TRAFFIC = "Traffic",
4
- ERROR_RATE = "ErrorRate",
5
- LATENCY = "Latency"
6
- }
7
- //# sourceMappingURL=metric-card-type.enum.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,8 +0,0 @@
1
- import MetricsProvider from './components/MetricsProvider.vue';
2
- import MetricsConsumer from './components/MetricsConsumer.vue';
3
- import { mockExploreResponseFromCypress, mockExploreResponse } from './mockExploreResponse';
4
- export { MetricsProvider, MetricsConsumer, mockExploreResponseFromCypress, mockExploreResponse, };
5
- export * from './types';
6
- export * from './enums';
7
- export * from './constants';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,10 +0,0 @@
1
- import type { CyHttpMessages } from 'cypress/types/net-stubbing';
2
- import type { ExploreQuery, ExploreResultV4 } from '@kong-ui-public/analytics-utilities';
3
- export interface MockOptions {
4
- dimensionNames?: string[];
5
- injectErrors?: 'latency' | 'traffic' | 'all';
6
- deterministic?: boolean;
7
- }
8
- export declare const mockExploreResponseFromCypress: (req: CyHttpMessages.IncomingHttpRequest, opts?: MockOptions) => void;
9
- export declare const mockExploreResponse: (body: ExploreQuery, opts?: MockOptions) => ExploreResultV4;
10
- //# sourceMappingURL=mockExploreResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockExploreResponse.d.ts","sourceRoot":"","sources":["../../src/mockExploreResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,OAAO,KAAK,EAEV,YAAY,EACZ,eAAe,EAGhB,MAAM,qCAAqC,CAAA;AAM5C,MAAM,WAAW,WAAW;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAA;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,8BAA8B,QACpC,cAAc,CAAC,mBAAmB,SAChC,WAAW,SAQnB,CAAA;AAQD,eAAO,MAAM,mBAAmB,SACxB,YAAY,SACX,WAAW,KAsFb,eACN,CAAA"}
@@ -1,17 +0,0 @@
1
- import type { Timeframe, ExploreAggregations, QueryableExploreDimensions, AnalyticsBridge, QueryDatasource, ExploreFilterAll } from '@kong-ui-public/analytics-utilities';
2
- import type { Ref } from 'vue';
3
- export interface MetricFetcherOptions {
4
- datasource: Ref<QueryDatasource>;
5
- metrics: Ref<ExploreAggregations[]>;
6
- dimensions?: QueryableExploreDimensions[];
7
- filter: Ref<ExploreFilterAll[] | undefined>;
8
- timeframe: Ref<Timeframe>;
9
- tz: Ref<string>;
10
- refreshInterval: number;
11
- withTrend: Ref<boolean>;
12
- queryReady: Ref<boolean>;
13
- queryFn: AnalyticsBridge['queryFn'];
14
- abortController?: AbortController;
15
- refreshCounter: Ref<number>;
16
- }
17
- //# sourceMappingURL=fetcher-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetcher-types.d.ts","sourceRoot":"","sources":["../../../src/types/fetcher-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EAAE,0BAA0B,EAAE,eAAe,EAAE,eAAe,EACjF,gBAAgB,EACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;IAChC,OAAO,EAAE,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAA;IACnC,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAA;IACzC,MAAM,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,SAAS,CAAC,CAAA;IAC3C,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IACzB,EAAE,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACvB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACxB,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IACnC,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC5B"}
@@ -1,3 +0,0 @@
1
- export * from './fetcher-types';
2
- export * from './metric-card';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}