@kong-ui-public/analytics-config-store 1.3.32 → 1.3.33-pr.3543.1df3c7e2b.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/analytics-config-store",
3
- "version": "1.3.32",
3
+ "version": "1.3.33-pr.3543.1df3c7e2b.0",
4
4
  "type": "module",
5
5
  "main": "./dist/vitals-config-store.umd.js",
6
6
  "module": "./dist/vitals-config-store.es.js",
@@ -1,30 +0,0 @@
1
- type __VLS_Props = {
2
- requireAnalytics?: boolean;
3
- requirePercentiles?: boolean;
4
- };
5
- declare var __VLS_1: {
6
- error: Error;
7
- }, __VLS_3: {
8
- hasAnalytics: boolean;
9
- hasPercentiles: boolean;
10
- }, __VLS_5: {
11
- hasAnalytics: boolean;
12
- hasPercentiles: boolean;
13
- };
14
- type __VLS_Slots = {} & {
15
- error?: (props: typeof __VLS_1) => any;
16
- } & {
17
- default?: (props: typeof __VLS_3) => any;
18
- } & {
19
- fallback?: (props: typeof __VLS_5) => any;
20
- };
21
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
- declare const _default: typeof __VLS_export;
24
- export default _default;
25
- type __VLS_WithSlots<T, S> = T & {
26
- new (): {
27
- $slots: S;
28
- };
29
- };
30
- //# sourceMappingURL=AnalyticsConfigCheck.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnalyticsConfigCheck.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AnalyticsConfigCheck.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAC;AAmDF,QAAA,IAAI,OAAO;;CAAU,EAAE,OAAO;;;CAAU,EAAE,OAAO;;;CAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAGhD,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const THIRTY_DAYS_MS = 2592000000;
2
- export declare const DEFAULT_MAX_PARALLEL_REQUESTS = 2;
3
- export declare const DEFAULT_REQUEST_INTERVAL = 2000;
4
- export declare const DEFAULT_REQUEST_INTERVAL_CAP = 10;
5
- //# 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,cAAc,aAAa,CAAA;AAExC,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,eAAO,MAAM,wBAAwB,OAAO,CAAA;AAC5C,eAAO,MAAM,4BAA4B,KAAK,CAAA"}
@@ -1,4 +0,0 @@
1
- import AnalyticsConfigCheck from './components/AnalyticsConfigCheck.vue';
2
- export { AnalyticsConfigCheck };
3
- export * from './stores';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAC/B,cAAc,UAAU,CAAA"}
@@ -1,118 +0,0 @@
1
- import type { AnalyticsConfigV2 } from '@kong-ui-public/analytics-utilities';
2
- export type ConfigStoreState = null | AnalyticsConfigV2;
3
- export declare const useAnalyticsConfigStore: import("pinia").StoreDefinition<"analytics-config", Pick<{
4
- analyticsConfig: import("vue").Ref<{
5
- analytics: {
6
- percentiles: boolean;
7
- retention_ms: import("@kong-ui-public/analytics-utilities").AnalyticsRetentionMs;
8
- } | null;
9
- requests: {
10
- retention_ms: import("@kong-ui-public/analytics-utilities").RequestsRetentionMs;
11
- } | null;
12
- ui?: {
13
- maxParallelRequests?: number | undefined;
14
- requestInterval?: number | undefined;
15
- requestIntervalCap?: number | undefined;
16
- } | undefined;
17
- } | null, ConfigStoreState | {
18
- analytics: {
19
- percentiles: boolean;
20
- retention_ms: import("@kong-ui-public/analytics-utilities").AnalyticsRetentionMs;
21
- } | null;
22
- requests: {
23
- retention_ms: import("@kong-ui-public/analytics-utilities").RequestsRetentionMs;
24
- } | null;
25
- ui?: {
26
- maxParallelRequests?: number | undefined;
27
- requestInterval?: number | undefined;
28
- requestIntervalCap?: number | undefined;
29
- } | undefined;
30
- }>;
31
- longRetention: import("vue").ComputedRef<boolean>;
32
- defaultQueryTimeForOrg: import("vue").ComputedRef<"7d">;
33
- loading: import("vue").ComputedRef<boolean>;
34
- analytics: import("vue").ComputedRef<boolean>;
35
- percentiles: import("vue").ComputedRef<boolean>;
36
- maxParallelRequests: import("vue").ComputedRef<number>;
37
- requestInterval: import("vue").ComputedRef<number>;
38
- requestIntervalCap: import("vue").ComputedRef<number>;
39
- isReady: () => Promise<void>;
40
- configError: import("vue").Ref<Error | null, Error | null>;
41
- }, "analyticsConfig" | "configError">, Pick<{
42
- analyticsConfig: import("vue").Ref<{
43
- analytics: {
44
- percentiles: boolean;
45
- retention_ms: import("@kong-ui-public/analytics-utilities").AnalyticsRetentionMs;
46
- } | null;
47
- requests: {
48
- retention_ms: import("@kong-ui-public/analytics-utilities").RequestsRetentionMs;
49
- } | null;
50
- ui?: {
51
- maxParallelRequests?: number | undefined;
52
- requestInterval?: number | undefined;
53
- requestIntervalCap?: number | undefined;
54
- } | undefined;
55
- } | null, ConfigStoreState | {
56
- analytics: {
57
- percentiles: boolean;
58
- retention_ms: import("@kong-ui-public/analytics-utilities").AnalyticsRetentionMs;
59
- } | null;
60
- requests: {
61
- retention_ms: import("@kong-ui-public/analytics-utilities").RequestsRetentionMs;
62
- } | null;
63
- ui?: {
64
- maxParallelRequests?: number | undefined;
65
- requestInterval?: number | undefined;
66
- requestIntervalCap?: number | undefined;
67
- } | undefined;
68
- }>;
69
- longRetention: import("vue").ComputedRef<boolean>;
70
- defaultQueryTimeForOrg: import("vue").ComputedRef<"7d">;
71
- loading: import("vue").ComputedRef<boolean>;
72
- analytics: import("vue").ComputedRef<boolean>;
73
- percentiles: import("vue").ComputedRef<boolean>;
74
- maxParallelRequests: import("vue").ComputedRef<number>;
75
- requestInterval: import("vue").ComputedRef<number>;
76
- requestIntervalCap: import("vue").ComputedRef<number>;
77
- isReady: () => Promise<void>;
78
- configError: import("vue").Ref<Error | null, Error | null>;
79
- }, "analytics" | "percentiles" | "maxParallelRequests" | "requestInterval" | "requestIntervalCap" | "longRetention" | "defaultQueryTimeForOrg" | "loading">, Pick<{
80
- analyticsConfig: import("vue").Ref<{
81
- analytics: {
82
- percentiles: boolean;
83
- retention_ms: import("@kong-ui-public/analytics-utilities").AnalyticsRetentionMs;
84
- } | null;
85
- requests: {
86
- retention_ms: import("@kong-ui-public/analytics-utilities").RequestsRetentionMs;
87
- } | null;
88
- ui?: {
89
- maxParallelRequests?: number | undefined;
90
- requestInterval?: number | undefined;
91
- requestIntervalCap?: number | undefined;
92
- } | undefined;
93
- } | null, ConfigStoreState | {
94
- analytics: {
95
- percentiles: boolean;
96
- retention_ms: import("@kong-ui-public/analytics-utilities").AnalyticsRetentionMs;
97
- } | null;
98
- requests: {
99
- retention_ms: import("@kong-ui-public/analytics-utilities").RequestsRetentionMs;
100
- } | null;
101
- ui?: {
102
- maxParallelRequests?: number | undefined;
103
- requestInterval?: number | undefined;
104
- requestIntervalCap?: number | undefined;
105
- } | undefined;
106
- }>;
107
- longRetention: import("vue").ComputedRef<boolean>;
108
- defaultQueryTimeForOrg: import("vue").ComputedRef<"7d">;
109
- loading: import("vue").ComputedRef<boolean>;
110
- analytics: import("vue").ComputedRef<boolean>;
111
- percentiles: import("vue").ComputedRef<boolean>;
112
- maxParallelRequests: import("vue").ComputedRef<number>;
113
- requestInterval: import("vue").ComputedRef<number>;
114
- requestIntervalCap: import("vue").ComputedRef<number>;
115
- isReady: () => Promise<void>;
116
- configError: import("vue").Ref<Error | null, Error | null>;
117
- }, "isReady">>;
118
- //# sourceMappingURL=analytics-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analytics-config.d.ts","sourceRoot":"","sources":["../../../src/stores/analytics-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAU7F,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,iBAAiB,CAAA;AAEvD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgDd,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAb,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAb,OAAO,CAAC,IAAI,CAAC;;cAwCjC,CAAA"}
@@ -1,330 +0,0 @@
1
- import type { AllFilters, DatasourceConfig, Field } from '@kong-ui-public/analytics-utilities';
2
- export type MappedDatasourceConfig = DatasourceConfig & {
3
- fieldsMap: Record<string, Field>;
4
- };
5
- export declare const useDatasourceConfigStore: import("pinia").StoreDefinition<"datasource-config", Pick<{
6
- datasourceConfig: import("vue").Ref<{
7
- name: string;
8
- showInUI: boolean;
9
- fields: {
10
- name: string;
11
- showInUI: boolean;
12
- aggregation: boolean;
13
- group: boolean;
14
- filter?: {
15
- valueSource: "ksearch";
16
- ksearchName: string;
17
- valueType: string;
18
- operators: {
19
- type: "multi-value" | "single-value" | "no-value";
20
- ops: string[];
21
- }[];
22
- preSeededValues?: string[] | undefined;
23
- allowNewValues?: boolean | undefined;
24
- valuesNeedTranslation?: boolean | undefined;
25
- } | {
26
- valueType: "string";
27
- operators: {
28
- type: "multi-value" | "single-value" | "no-value";
29
- ops: string[];
30
- }[];
31
- preSeededValues?: string[] | undefined;
32
- allowNewValues?: boolean | undefined;
33
- valuesNeedTranslation?: boolean | undefined;
34
- } | {
35
- valueType: "number";
36
- operators: {
37
- type: "multi-value" | "single-value" | "no-value";
38
- ops: string[];
39
- }[];
40
- preSeededValues?: string[] | undefined;
41
- allowNewValues?: boolean | undefined;
42
- valuesNeedTranslation?: boolean | undefined;
43
- } | null | undefined;
44
- metricGroup?: string | undefined;
45
- supportedDimensions?: string[] | undefined;
46
- entityAttributes?: string[] | undefined;
47
- }[];
48
- timeRangeOptions: string[];
49
- granularityOptions?: string[] | undefined;
50
- defaultMetric?: string | undefined;
51
- }[] | undefined, DatasourceConfig[] | {
52
- name: string;
53
- showInUI: boolean;
54
- fields: {
55
- name: string;
56
- showInUI: boolean;
57
- aggregation: boolean;
58
- group: boolean;
59
- filter?: {
60
- valueSource: "ksearch";
61
- ksearchName: string;
62
- valueType: string;
63
- operators: {
64
- type: "multi-value" | "single-value" | "no-value";
65
- ops: string[];
66
- }[];
67
- preSeededValues?: string[] | undefined;
68
- allowNewValues?: boolean | undefined;
69
- valuesNeedTranslation?: boolean | undefined;
70
- } | {
71
- valueType: "string";
72
- operators: {
73
- type: "multi-value" | "single-value" | "no-value";
74
- ops: string[];
75
- }[];
76
- preSeededValues?: string[] | undefined;
77
- allowNewValues?: boolean | undefined;
78
- valuesNeedTranslation?: boolean | undefined;
79
- } | {
80
- valueType: "number";
81
- operators: {
82
- type: "multi-value" | "single-value" | "no-value";
83
- ops: string[];
84
- }[];
85
- preSeededValues?: string[] | undefined;
86
- allowNewValues?: boolean | undefined;
87
- valuesNeedTranslation?: boolean | undefined;
88
- } | null | undefined;
89
- metricGroup?: string | undefined;
90
- supportedDimensions?: string[] | undefined;
91
- entityAttributes?: string[] | undefined;
92
- }[];
93
- timeRangeOptions: string[];
94
- granularityOptions?: string[] | undefined;
95
- defaultMetric?: string | undefined;
96
- }[] | undefined>;
97
- datasourceConfigError: import("vue").Ref<Error | null, Error | null>;
98
- datasourceConfigMap: import("vue").ComputedRef<Record<string, MappedDatasourceConfig>>;
99
- getFieldDataSources: import("vue").ComputedRef<(fieldName: string) => string[]>;
100
- isFilterValidForDatasource: import("vue").ComputedRef<({ datasource, filter, }: {
101
- datasource: string;
102
- filter: AllFilters;
103
- }) => boolean>;
104
- loading: import("vue").ComputedRef<boolean>;
105
- isReady: () => Promise<void>;
106
- stripUnknownFilters: import("vue").ComputedRef<({ datasource, filters, queryFields, metrics, }: {
107
- datasource: string;
108
- filters: AllFilters[];
109
- queryFields?: readonly string[];
110
- /** @deprecated Use queryFields instead. */
111
- metrics?: readonly string[];
112
- }) => AllFilters[]>;
113
- }, "datasourceConfig" | "datasourceConfigError">, Pick<{
114
- datasourceConfig: import("vue").Ref<{
115
- name: string;
116
- showInUI: boolean;
117
- fields: {
118
- name: string;
119
- showInUI: boolean;
120
- aggregation: boolean;
121
- group: boolean;
122
- filter?: {
123
- valueSource: "ksearch";
124
- ksearchName: string;
125
- valueType: string;
126
- operators: {
127
- type: "multi-value" | "single-value" | "no-value";
128
- ops: string[];
129
- }[];
130
- preSeededValues?: string[] | undefined;
131
- allowNewValues?: boolean | undefined;
132
- valuesNeedTranslation?: boolean | undefined;
133
- } | {
134
- valueType: "string";
135
- operators: {
136
- type: "multi-value" | "single-value" | "no-value";
137
- ops: string[];
138
- }[];
139
- preSeededValues?: string[] | undefined;
140
- allowNewValues?: boolean | undefined;
141
- valuesNeedTranslation?: boolean | undefined;
142
- } | {
143
- valueType: "number";
144
- operators: {
145
- type: "multi-value" | "single-value" | "no-value";
146
- ops: string[];
147
- }[];
148
- preSeededValues?: string[] | undefined;
149
- allowNewValues?: boolean | undefined;
150
- valuesNeedTranslation?: boolean | undefined;
151
- } | null | undefined;
152
- metricGroup?: string | undefined;
153
- supportedDimensions?: string[] | undefined;
154
- entityAttributes?: string[] | undefined;
155
- }[];
156
- timeRangeOptions: string[];
157
- granularityOptions?: string[] | undefined;
158
- defaultMetric?: string | undefined;
159
- }[] | undefined, DatasourceConfig[] | {
160
- name: string;
161
- showInUI: boolean;
162
- fields: {
163
- name: string;
164
- showInUI: boolean;
165
- aggregation: boolean;
166
- group: boolean;
167
- filter?: {
168
- valueSource: "ksearch";
169
- ksearchName: string;
170
- valueType: string;
171
- operators: {
172
- type: "multi-value" | "single-value" | "no-value";
173
- ops: string[];
174
- }[];
175
- preSeededValues?: string[] | undefined;
176
- allowNewValues?: boolean | undefined;
177
- valuesNeedTranslation?: boolean | undefined;
178
- } | {
179
- valueType: "string";
180
- operators: {
181
- type: "multi-value" | "single-value" | "no-value";
182
- ops: string[];
183
- }[];
184
- preSeededValues?: string[] | undefined;
185
- allowNewValues?: boolean | undefined;
186
- valuesNeedTranslation?: boolean | undefined;
187
- } | {
188
- valueType: "number";
189
- operators: {
190
- type: "multi-value" | "single-value" | "no-value";
191
- ops: string[];
192
- }[];
193
- preSeededValues?: string[] | undefined;
194
- allowNewValues?: boolean | undefined;
195
- valuesNeedTranslation?: boolean | undefined;
196
- } | null | undefined;
197
- metricGroup?: string | undefined;
198
- supportedDimensions?: string[] | undefined;
199
- entityAttributes?: string[] | undefined;
200
- }[];
201
- timeRangeOptions: string[];
202
- granularityOptions?: string[] | undefined;
203
- defaultMetric?: string | undefined;
204
- }[] | undefined>;
205
- datasourceConfigError: import("vue").Ref<Error | null, Error | null>;
206
- datasourceConfigMap: import("vue").ComputedRef<Record<string, MappedDatasourceConfig>>;
207
- getFieldDataSources: import("vue").ComputedRef<(fieldName: string) => string[]>;
208
- isFilterValidForDatasource: import("vue").ComputedRef<({ datasource, filter, }: {
209
- datasource: string;
210
- filter: AllFilters;
211
- }) => boolean>;
212
- loading: import("vue").ComputedRef<boolean>;
213
- isReady: () => Promise<void>;
214
- stripUnknownFilters: import("vue").ComputedRef<({ datasource, filters, queryFields, metrics, }: {
215
- datasource: string;
216
- filters: AllFilters[];
217
- queryFields?: readonly string[];
218
- /** @deprecated Use queryFields instead. */
219
- metrics?: readonly string[];
220
- }) => AllFilters[]>;
221
- }, "loading" | "datasourceConfigMap" | "getFieldDataSources" | "isFilterValidForDatasource" | "stripUnknownFilters">, Pick<{
222
- datasourceConfig: import("vue").Ref<{
223
- name: string;
224
- showInUI: boolean;
225
- fields: {
226
- name: string;
227
- showInUI: boolean;
228
- aggregation: boolean;
229
- group: boolean;
230
- filter?: {
231
- valueSource: "ksearch";
232
- ksearchName: string;
233
- valueType: string;
234
- operators: {
235
- type: "multi-value" | "single-value" | "no-value";
236
- ops: string[];
237
- }[];
238
- preSeededValues?: string[] | undefined;
239
- allowNewValues?: boolean | undefined;
240
- valuesNeedTranslation?: boolean | undefined;
241
- } | {
242
- valueType: "string";
243
- operators: {
244
- type: "multi-value" | "single-value" | "no-value";
245
- ops: string[];
246
- }[];
247
- preSeededValues?: string[] | undefined;
248
- allowNewValues?: boolean | undefined;
249
- valuesNeedTranslation?: boolean | undefined;
250
- } | {
251
- valueType: "number";
252
- operators: {
253
- type: "multi-value" | "single-value" | "no-value";
254
- ops: string[];
255
- }[];
256
- preSeededValues?: string[] | undefined;
257
- allowNewValues?: boolean | undefined;
258
- valuesNeedTranslation?: boolean | undefined;
259
- } | null | undefined;
260
- metricGroup?: string | undefined;
261
- supportedDimensions?: string[] | undefined;
262
- entityAttributes?: string[] | undefined;
263
- }[];
264
- timeRangeOptions: string[];
265
- granularityOptions?: string[] | undefined;
266
- defaultMetric?: string | undefined;
267
- }[] | undefined, DatasourceConfig[] | {
268
- name: string;
269
- showInUI: boolean;
270
- fields: {
271
- name: string;
272
- showInUI: boolean;
273
- aggregation: boolean;
274
- group: boolean;
275
- filter?: {
276
- valueSource: "ksearch";
277
- ksearchName: string;
278
- valueType: string;
279
- operators: {
280
- type: "multi-value" | "single-value" | "no-value";
281
- ops: string[];
282
- }[];
283
- preSeededValues?: string[] | undefined;
284
- allowNewValues?: boolean | undefined;
285
- valuesNeedTranslation?: boolean | undefined;
286
- } | {
287
- valueType: "string";
288
- operators: {
289
- type: "multi-value" | "single-value" | "no-value";
290
- ops: string[];
291
- }[];
292
- preSeededValues?: string[] | undefined;
293
- allowNewValues?: boolean | undefined;
294
- valuesNeedTranslation?: boolean | undefined;
295
- } | {
296
- valueType: "number";
297
- operators: {
298
- type: "multi-value" | "single-value" | "no-value";
299
- ops: string[];
300
- }[];
301
- preSeededValues?: string[] | undefined;
302
- allowNewValues?: boolean | undefined;
303
- valuesNeedTranslation?: boolean | undefined;
304
- } | null | undefined;
305
- metricGroup?: string | undefined;
306
- supportedDimensions?: string[] | undefined;
307
- entityAttributes?: string[] | undefined;
308
- }[];
309
- timeRangeOptions: string[];
310
- granularityOptions?: string[] | undefined;
311
- defaultMetric?: string | undefined;
312
- }[] | undefined>;
313
- datasourceConfigError: import("vue").Ref<Error | null, Error | null>;
314
- datasourceConfigMap: import("vue").ComputedRef<Record<string, MappedDatasourceConfig>>;
315
- getFieldDataSources: import("vue").ComputedRef<(fieldName: string) => string[]>;
316
- isFilterValidForDatasource: import("vue").ComputedRef<({ datasource, filter, }: {
317
- datasource: string;
318
- filter: AllFilters;
319
- }) => boolean>;
320
- loading: import("vue").ComputedRef<boolean>;
321
- isReady: () => Promise<void>;
322
- stripUnknownFilters: import("vue").ComputedRef<({ datasource, filters, queryFields, metrics, }: {
323
- datasource: string;
324
- filters: AllFilters[];
325
- queryFields?: readonly string[];
326
- /** @deprecated Use queryFields instead. */
327
- metrics?: readonly string[];
328
- }) => AllFilters[]>;
329
- }, "isReady">>;
330
- //# sourceMappingURL=datasource-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datasource-config.d.ts","sourceRoot":"","sources":["../../../src/stores/datasource-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAmB,gBAAgB,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAA;AAI/G,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,GAAG;IACtD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DA0Dd,MAAM,KAAG,MAAM,EAAE;oFAejC;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,UAAU,CAAA;KACnB,KAAG,OAAO;;mBAlDa,OAAO,CAAC,IAAI,CAAC;oGAgFlC;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,UAAU,EAAE,CAAA;QACrB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;QAC/B,2CAA2C;QAC3C,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KAC5B,KAAG,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAtDG,MAAM,KAAG,MAAM,EAAE;oFAejC;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,UAAU,CAAA;KACnB,KAAG,OAAO;;mBAlDa,OAAO,CAAC,IAAI,CAAC;oGAgFlC;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,UAAU,EAAE,CAAA;QACrB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;QAC/B,2CAA2C;QAC3C,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KAC5B,KAAG,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAtDG,MAAM,KAAG,MAAM,EAAE;oFAejC;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,UAAU,CAAA;KACnB,KAAG,OAAO;;mBAlDa,OAAO,CAAC,IAAI,CAAC;oGAgFlC;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,UAAU,EAAE,CAAA;QACrB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;QAC/B,2CAA2C;QAC3C,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KAC5B,KAAG,UAAU,EAAE;cA+ClB,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './analytics-config';
2
- export * from './datasource-config';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stores/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
@@ -1,13 +0,0 @@
1
- import type { App } from 'vue';
2
- interface SetupPiniaTestStoreOptions {
3
- /** Should a Vue app be created and initialized? */
4
- createVueApp?: boolean;
5
- }
6
- /**
7
- * Set up the Pinia test store instance for the given runner (Cypress or Vitest).
8
- * @param {'cy.spy' | 'vi.fn} createSpy The test runner your spec file is using.
9
- * @param {TestingOptions} config @pinia/testing options https://pinia.vuejs.org/api/@pinia/testing/interfaces/TestingOptions.html
10
- */
11
- export declare const setupPiniaTestStore: (options?: SetupPiniaTestStoreOptions) => App | undefined;
12
- export {};
13
- //# sourceMappingURL=setupPiniaTestStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupPiniaTestStore.d.ts","sourceRoot":"","sources":["../../../../src/stores/tests/setupPiniaTestStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,UAAU,0BAA0B;IAClC,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,0BAA0B,KAAG,GAAG,GAAG,SAShF,CAAA"}
@@ -1,147 +0,0 @@
1
- import { ref as h, inject as C, computed as s, watch as R, defineComponent as D, unref as d, renderSlot as E, createCommentVNode as S } from "vue";
2
- import { defineStore as b, storeToRefs as T } from "pinia";
3
- const P = 2592e6, F = 2, k = 2e3, I = 10, M = "analytics-query-provider", U = b("analytics-config", () => {
4
- const r = h(null), u = h(null), p = C(M);
5
- p ? p.configFn().then((e) => {
6
- r.value = e;
7
- }).catch((e) => {
8
- u.value = e, r.value = {
9
- analytics: null,
10
- requests: null
11
- }, console.warn("Error fetching analytics config"), console.warn(e);
12
- }) : (console.warn("Analytics components require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"), u.value = new Error("No analytics bridge provided"), r.value = {
13
- analytics: null,
14
- requests: null
15
- });
16
- const c = s(() => {
17
- var n, g;
18
- const e = (g = (n = r.value) == null ? void 0 : n.analytics) == null ? void 0 : g.retention_ms;
19
- return !!e && e >= P;
20
- }), f = s(() => "7d"), l = s(() => !r.value), y = s(() => {
21
- var e;
22
- return !!((e = r.value) != null && e.analytics);
23
- }), m = s(() => {
24
- var e, n;
25
- return !!((n = (e = r.value) == null ? void 0 : e.analytics) != null && n.percentiles);
26
- }), v = () => new Promise((e) => {
27
- if (!l.value)
28
- return e();
29
- const n = R(l, () => {
30
- l.value || (n(), e());
31
- });
32
- }), t = s(
33
- () => {
34
- var e, n;
35
- return ((n = (e = r.value) == null ? void 0 : e.ui) == null ? void 0 : n.maxParallelRequests) ?? F;
36
- }
37
- ), o = s(
38
- () => {
39
- var e, n;
40
- return ((n = (e = r.value) == null ? void 0 : e.ui) == null ? void 0 : n.requestInterval) ?? k;
41
- }
42
- ), i = s(
43
- () => {
44
- var e, n;
45
- return ((n = (e = r.value) == null ? void 0 : e.ui) == null ? void 0 : n.requestIntervalCap) ?? I;
46
- }
47
- );
48
- return {
49
- analyticsConfig: r,
50
- longRetention: c,
51
- defaultQueryTimeForOrg: f,
52
- loading: l,
53
- analytics: y,
54
- percentiles: m,
55
- maxParallelRequests: t,
56
- requestInterval: o,
57
- requestIntervalCap: i,
58
- isReady: v,
59
- configError: u
60
- };
61
- }), L = "analytics-query-provider", Y = b("datasource-config", () => {
62
- const r = h(void 0), u = h(null), p = C(L);
63
- p ? p.datasourceConfigFn().then((t) => {
64
- r.value = t;
65
- }).catch((t) => {
66
- u.value = t, r.value = [], console.warn("Error fetching datasource config"), console.warn(t);
67
- }) : (console.warn("Analytics components require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"), u.value = new Error("No analytics bridge provided"), r.value = []);
68
- const c = s(() => r.value === void 0), f = async () => new Promise((t) => {
69
- if (!c.value)
70
- return t();
71
- const o = R(() => c.value, (i) => {
72
- i || (o(), t());
73
- });
74
- }), l = s(() => (r.value ?? []).reduce((t, o) => {
75
- const i = o.fields.reduce((e, n) => (e[n.name] = n, e), {});
76
- return t[o.name] = {
77
- ...o,
78
- fieldsMap: i
79
- }, t;
80
- }, {})), y = s(() => (t) => c.value ? [] : (r.value ?? []).filter((o) => o.fields.some((i) => i.name === t)).map((o) => o.name)), m = s(() => ({
81
- datasource: t,
82
- filter: o
83
- }) => {
84
- if (c.value)
85
- return !0;
86
- const i = l.value[t];
87
- if (!i)
88
- return !0;
89
- const e = i.fieldsMap[o.field];
90
- return e != null && e.filter ? e.filter.operators.flatMap((n) => n.ops).includes(o.operator) : !1;
91
- }), v = s(() => ({
92
- datasource: t,
93
- filters: o,
94
- queryFields: i = void 0,
95
- metrics: e = void 0
96
- }) => {
97
- const n = o.filter((a) => m.value({ datasource: t, filter: a })), g = i ?? e;
98
- if (!(g != null && g.length))
99
- return n;
100
- const q = l.value[t];
101
- if (!q)
102
- return n;
103
- const A = g.map((a) => q.fieldsMap[a]).filter((a) => a !== void 0).filter((a) => a.supportedDimensions !== void 0).map((a) => new Set(a.supportedDimensions));
104
- if (!A.length)
105
- return n;
106
- const w = A.reduce((a, _) => _.intersection(a));
107
- return n.filter((a) => w.has(a.field));
108
- });
109
- return {
110
- datasourceConfig: r,
111
- datasourceConfigError: u,
112
- datasourceConfigMap: l,
113
- getFieldDataSources: y,
114
- isFilterValidForDatasource: m,
115
- loading: c,
116
- isReady: f,
117
- stripUnknownFilters: v
118
- };
119
- }), $ = /* @__PURE__ */ D({
120
- __name: "AnalyticsConfigCheck",
121
- props: {
122
- requireAnalytics: { type: Boolean },
123
- requirePercentiles: { type: Boolean }
124
- },
125
- setup(r) {
126
- const u = r, p = U(), { analytics: c, percentiles: f, configError: l, loading: y } = T(p), m = s(
127
- () => (u.requireAnalytics ? c.value : !0) && (u.requirePercentiles ? f.value : !0)
128
- );
129
- return (v, t) => !d(y) && d(l) ? E(v.$slots, "error", {
130
- key: 0,
131
- error: d(l)
132
- }) : !d(y) && m.value ? E(v.$slots, "default", {
133
- key: 1,
134
- hasAnalytics: d(c),
135
- hasPercentiles: d(f)
136
- }) : d(y) ? S("", !0) : E(v.$slots, "fallback", {
137
- key: 2,
138
- hasAnalytics: d(c),
139
- hasPercentiles: d(f)
140
- });
141
- }
142
- });
143
- export {
144
- $ as AnalyticsConfigCheck,
145
- U as useAnalyticsConfigStore,
146
- Y as useDatasourceConfigStore
147
- };
@@ -1 +0,0 @@
1
- (function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u["kong-ui-public-vitals-config-store"]={},u.Vue,u.pinia))})(this,function(u,e,h){"use strict";const R="analytics-query-provider",A=h.defineStore("analytics-config",()=>{const t=e.ref(null),d=e.ref(null),f=e.inject(R);f?f.configFn().then(n=>{t.value=n}).catch(n=>{d.value=n,t.value={analytics:null,requests:null},console.warn("Error fetching analytics config"),console.warn(n)}):(console.warn("Analytics components require a query bridge supplied via provide / inject."),console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"),console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"),d.value=new Error("No analytics bridge provided"),t.value={analytics:null,requests:null});const c=e.computed(()=>{var r,g;const n=(g=(r=t.value)==null?void 0:r.analytics)==null?void 0:g.retention_ms;return!!n&&n>=2592e6}),p=e.computed(()=>"7d"),l=e.computed(()=>!t.value),y=e.computed(()=>{var n;return!!((n=t.value)!=null&&n.analytics)}),E=e.computed(()=>{var n,r;return!!((r=(n=t.value)==null?void 0:n.analytics)!=null&&r.percentiles)}),m=()=>new Promise(n=>{if(!l.value)return n();const r=e.watch(l,()=>{l.value||(r(),n())})}),o=e.computed(()=>{var n,r;return((r=(n=t.value)==null?void 0:n.ui)==null?void 0:r.maxParallelRequests)??2}),s=e.computed(()=>{var n,r;return((r=(n=t.value)==null?void 0:n.ui)==null?void 0:r.requestInterval)??2e3}),a=e.computed(()=>{var n,r;return((r=(n=t.value)==null?void 0:n.ui)==null?void 0:r.requestIntervalCap)??10});return{analyticsConfig:t,longRetention:c,defaultQueryTimeForOrg:p,loading:l,analytics:y,percentiles:E,maxParallelRequests:o,requestInterval:s,requestIntervalCap:a,isReady:m,configError:d}}),T="analytics-query-provider",_=h.defineStore("datasource-config",()=>{const t=e.ref(void 0),d=e.ref(null),f=e.inject(T);f?f.datasourceConfigFn().then(o=>{t.value=o}).catch(o=>{d.value=o,t.value=[],console.warn("Error fetching datasource config"),console.warn(o)}):(console.warn("Analytics components require a query bridge supplied via provide / inject."),console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"),console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"),d.value=new Error("No analytics bridge provided"),t.value=[]);const c=e.computed(()=>t.value===void 0),p=async()=>new Promise(o=>{if(!c.value)return o();const s=e.watch(()=>c.value,a=>{a||(s(),o())})}),l=e.computed(()=>(t.value??[]).reduce((o,s)=>{const a=s.fields.reduce((n,r)=>(n[r.name]=r,n),{});return o[s.name]={...s,fieldsMap:a},o},{})),y=e.computed(()=>o=>c.value?[]:(t.value??[]).filter(s=>s.fields.some(a=>a.name===o)).map(s=>s.name)),E=e.computed(()=>({datasource:o,filter:s})=>{if(c.value)return!0;const a=l.value[o];if(!a)return!0;const n=a.fieldsMap[s.field];return n!=null&&n.filter?n.filter.operators.flatMap(r=>r.ops).includes(s.operator):!1}),m=e.computed(()=>({datasource:o,filters:s,queryFields:a=void 0,metrics:n=void 0})=>{const r=s.filter(i=>E.value({datasource:o,filter:i})),g=a??n;if(!(g!=null&&g.length))return r;const S=l.value[o];if(!S)return r;const q=g.map(i=>S.fieldsMap[i]).filter(i=>i!==void 0).filter(i=>i.supportedDimensions!==void 0).map(i=>new Set(i.supportedDimensions));if(!q.length)return r;const D=q.reduce((i,b)=>b.intersection(i));return r.filter(i=>D.has(i.field))});return{datasourceConfig:t,datasourceConfigError:d,datasourceConfigMap:l,getFieldDataSources:y,isFilterValidForDatasource:E,loading:c,isReady:p,stripUnknownFilters:m}}),C=e.defineComponent({__name:"AnalyticsConfigCheck",props:{requireAnalytics:{type:Boolean},requirePercentiles:{type:Boolean}},setup(t){const d=t,f=A(),{analytics:c,percentiles:p,configError:l,loading:y}=h.storeToRefs(f),E=e.computed(()=>(d.requireAnalytics?c.value:!0)&&(d.requirePercentiles?p.value:!0));return(m,o)=>!e.unref(y)&&e.unref(l)?e.renderSlot(m.$slots,"error",{key:0,error:e.unref(l)}):!e.unref(y)&&E.value?e.renderSlot(m.$slots,"default",{key:1,hasAnalytics:e.unref(c),hasPercentiles:e.unref(p)}):e.unref(y)?e.createCommentVNode("",!0):e.renderSlot(m.$slots,"fallback",{key:2,hasAnalytics:e.unref(c),hasPercentiles:e.unref(p)})}});u.AnalyticsConfigCheck=C,u.useAnalyticsConfigStore=A,u.useDatasourceConfigStore=_,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});