@gravitee/gamma-lib-observability 6.7.0 → 6.8.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 (73) hide show
  1. package/INTEGRATION.md +4 -2
  2. package/dist/api-type-registry.d.ts.map +1 -1
  3. package/dist/dashboard-access-provider.js +88 -76
  4. package/dist/dashboards/adapters/time-series-adapter.d.ts +2 -1
  5. package/dist/dashboards/adapters/time-series-adapter.d.ts.map +1 -1
  6. package/dist/dashboards/analytics-table/analytics-table-model.d.ts +9 -4
  7. package/dist/dashboards/analytics-table/analytics-table-model.d.ts.map +1 -1
  8. package/dist/dashboards/editor/DashboardEditorPage.d.ts.map +1 -1
  9. package/dist/dashboards/editor/DimensionSelect.d.ts +2 -1
  10. package/dist/dashboards/editor/DimensionSelect.d.ts.map +1 -1
  11. package/dist/dashboards/editor/FacetQueryFields.d.ts.map +1 -1
  12. package/dist/dashboards/editor/MeasureSelect.d.ts.map +1 -1
  13. package/dist/dashboards/editor/MetricCatalogHint.d.ts +9 -0
  14. package/dist/dashboards/editor/MetricCatalogHint.d.ts.map +1 -0
  15. package/dist/dashboards/editor/MetricGroupItemsEditor.d.ts.map +1 -1
  16. package/dist/dashboards/editor/MetricQueryFields.d.ts.map +1 -1
  17. package/dist/dashboards/editor/MetricSelect.d.ts +3 -2
  18. package/dist/dashboards/editor/MetricSelect.d.ts.map +1 -1
  19. package/dist/dashboards/editor/SeriesListEditor.d.ts.map +1 -1
  20. package/dist/dashboards/editor/TableColumnsEditor.d.ts +2 -1
  21. package/dist/dashboards/editor/TableColumnsEditor.d.ts.map +1 -1
  22. package/dist/dashboards/editor/TableQueryFields.d.ts.map +1 -1
  23. package/dist/dashboards/editor/WidgetConfigForm.d.ts.map +1 -1
  24. package/dist/dashboards/editor/WidgetEditorPanel.d.ts.map +1 -1
  25. package/dist/dashboards/editor/WidgetPreview.d.ts.map +1 -1
  26. package/dist/dashboards/editor/convert-widget-type.d.ts +3 -3
  27. package/dist/dashboards/editor/convert-widget-type.d.ts.map +1 -1
  28. package/dist/dashboards/editor/dashboard-editor-state.d.ts +5 -2
  29. package/dist/dashboards/editor/dashboard-editor-state.d.ts.map +1 -1
  30. package/dist/dashboards/editor/dimension-reset.d.ts +3 -2
  31. package/dist/dashboards/editor/dimension-reset.d.ts.map +1 -1
  32. package/dist/dashboards/editor/locked-filter-conflicts.d.ts +2 -1
  33. package/dist/dashboards/editor/locked-filter-conflicts.d.ts.map +1 -1
  34. package/dist/dashboards/editor/suggest-widget-title.d.ts +2 -1
  35. package/dist/dashboards/editor/suggest-widget-title.d.ts.map +1 -1
  36. package/dist/dashboards/editor/testing/select-options.d.ts +3 -1
  37. package/dist/dashboards/editor/testing/select-options.d.ts.map +1 -1
  38. package/dist/dashboards/editor/widget-auto-scope.d.ts +2 -1
  39. package/dist/dashboards/editor/widget-auto-scope.d.ts.map +1 -1
  40. package/dist/dashboards/metric-catalog.d.ts +101 -46
  41. package/dist/dashboards/metric-catalog.d.ts.map +1 -1
  42. package/dist/dashboards/renderers/CartesianWidgetRenderer.d.ts.map +1 -1
  43. package/dist/dashboards/renderers/MetricGroupWidgetRenderer.d.ts.map +1 -1
  44. package/dist/dashboards/renderers/TableWidgetRenderer.d.ts.map +1 -1
  45. package/dist/data-sources/http-analytics-definition-source.d.ts +59 -0
  46. package/dist/data-sources/http-analytics-definition-source.d.ts.map +1 -0
  47. package/dist/data-sources/http-filter-source.d.ts.map +1 -1
  48. package/dist/data-sources/http-traces-filter-source.d.ts.map +1 -1
  49. package/dist/data-sources/http-utils.d.ts +6 -0
  50. package/dist/data-sources/http-utils.d.ts.map +1 -1
  51. package/dist/hooks/query-keys.d.ts +10 -0
  52. package/dist/hooks/query-keys.d.ts.map +1 -1
  53. package/dist/hooks/use-metric-catalog.d.ts +36 -0
  54. package/dist/hooks/use-metric-catalog.d.ts.map +1 -0
  55. package/dist/index.js +4323 -4205
  56. package/dist/providers/analytics-api-types-provider.d.ts +4 -4
  57. package/dist/providers/analytics-definition-source-provider.d.ts +16 -0
  58. package/dist/providers/analytics-definition-source-provider.d.ts.map +1 -0
  59. package/dist/routing/ObservabilityRoutes.d.ts.map +1 -1
  60. package/dist/routing/resolve-analytics-api-types.d.ts +3 -2
  61. package/dist/routing/resolve-analytics-api-types.d.ts.map +1 -1
  62. package/dist/styles/observability.css +1 -1
  63. package/dist/testing/graphene-charts-mock.d.ts +4 -1
  64. package/dist/testing/graphene-charts-mock.d.ts.map +1 -1
  65. package/dist/testing/graphene-core-icons-mock.d.ts +2 -0
  66. package/dist/testing/graphene-core-icons-mock.d.ts.map +1 -1
  67. package/dist/testing/index.d.ts +6 -0
  68. package/dist/testing/index.d.ts.map +1 -1
  69. package/dist/testing/mock-analytics-definition.d.ts +29 -0
  70. package/dist/testing/mock-analytics-definition.d.ts.map +1 -0
  71. package/dist/testing/mock-metrics-data-source.d.ts.map +1 -1
  72. package/dist/testing.js +42 -39
  73. package/package.json +1 -1
package/INTEGRATION.md CHANGED
@@ -453,7 +453,7 @@ dashboards: {
453
453
 
454
454
  `scopeApiTypes` generates `API_TYPE` context filters (merged into every analytics query) and sets `scopeFilterField` to restrict which filter providers appear in the FilterBar. For non-API_TYPE scoping, use `contextFilters` + `scopeFilterField` directly.
455
455
 
456
- The widget editor offers its metric and dimension catalog for the same API types: an APIM host sees the Gateway metrics alone, an AIM host the Gateway and LLM metrics with the MCP dimensions. A module whose editor should offer another set, or that scopes its queries by another field, declares `analyticsApiTypes` next to `scopeApiTypes` (globally or on the dashboards section):
456
+ The widget editor reads its metric and dimension catalog from the Management API (`GET {baseUrl}/observability/analytics/definition?apiType=…`, APIM 4.14), asked once per environment for the same API types: an APIM host is served the Gateway family alone, an AIM host the Gateway and LLM families with the MCP dimensions, an AuthZ host the AuthZ family. Served families are the picker groups and labels are shown as served, in the editor and on the dashboard alike. A module whose editor should offer another set, or that scopes its queries by another field, declares `analyticsApiTypes` next to `scopeApiTypes` (globally or on the dashboards section):
457
457
 
458
458
  ```ts
459
459
  dashboards: {
@@ -464,7 +464,9 @@ dashboards: {
464
464
  }
465
465
  ```
466
466
 
467
- `analyticsApiTypes` drives the editor's pickers only: the context filters and the query clamp are unchanged. The pickers follow the module's declaration, not a dashboard filter that narrows `API_TYPE` below it. With neither field declared, the editor offers the whole catalog; so does, today, a declaration the catalog knows no metric for: the AuthZ example above offers AuthZ metrics alone once the catalog carries them (OBS-143), and the whole catalog until then. A widget saved on a metric or dimension the host no longer offers still shows it, under "Custom", and saves it back unchanged; switching a widget's metric resets a group-by the new metric does not accept, the way it resets the measure; the JSON tab accepts any metric.
467
+ `analyticsApiTypes` drives the editor's pickers and the definition asked for, nothing else: the context filters and the query clamp are unchanged. The pickers follow the module's declaration, not a dashboard filter that narrows `API_TYPE` below it. With neither field declared, the definition of every API kind is asked for and every served family is offered. A new widget, series, tile or column starts on the first metric the host is served, with the measure and unit the catalog gives it: a host declaring `analyticsApiTypes: ['AUTHZ']` starts on `AUTHZ_DECISIONS`, one declaring `['NATIVE']` on `NATIVE_CONNECTIONS_SUMMARY`. A host that declares neither field is served every family, Gateway first, and starts on `HTTP_REQUESTS`: a module scoping by another field, such as AuthZ on `RECORD_TYPE`, declares its kinds to start on its own metrics. A widget saved on a metric or dimension the host is not served still shows it, under "Custom", and saves it back unchanged; switching a widget's metric resets a group-by the new metric does not accept, the way it resets the measure; the JSON tab accepts any metric.
468
+
469
+ Nothing waits on the definition: until it arrives, and when the request is refused or fails, every reader runs on the copy bundled with the library, the Gateway and LLM families as served on 2026-10-30, and the editor's Data tab says "Metric list may be incomplete". A Management API older than 4.14 answers 404, and so does every backend released before it; a 401 or a 403 reads the same way, with no access-denied state. The refusal is not retried, and a failure is retried as the host's query client says; either is then kept as the answer for five minutes, so the endpoint is asked once per window, not once per widget opened. The library stamps the `API_TYPE` filter a metric needs to be queried on its own rule, which the definition does not carry: a metric served for exactly `LLM` or `MCP`, and an `LLM_PROXY_*` or `MCP_PROXY_*` dimension, carry that kind; a metric of several kinds, or of AuthZ, Kafka, Message or Edge, carry none.
468
470
 
469
471
  ### Deep links into a dashboard
470
472
 
@@ -1 +1 @@
1
- {"version":3,"file":"api-type-registry.d.ts","sourceRoot":"","sources":["../src/api-type-registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EA6CpD,CAAC;AAIF,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAE/D;AAQD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,CAE7D"}
1
+ {"version":3,"file":"api-type-registry.d.ts","sourceRoot":"","sources":["../src/api-type-registry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EAoEpD,CAAC;AAIF,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAE/D;AAQD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,CAE7D"}
@@ -220,83 +220,83 @@ function de(e, t) {
220
220
  //#endregion
221
221
  //#region src/providers/dashboard-persistence-provider.tsx
222
222
  var O = e(null);
223
- function k({ persistence: e, children: t }) {
223
+ function fe({ persistence: e, children: t }) {
224
224
  let n = r(() => le(e), [e]);
225
225
  return /* @__PURE__ */ a(O.Provider, {
226
226
  value: n,
227
227
  children: t
228
228
  });
229
229
  }
230
- function A() {
230
+ function k() {
231
231
  return n(O);
232
232
  }
233
- function j() {
233
+ function A() {
234
234
  let e = n(O);
235
235
  if (!e) throw Error("[gamma-lib-observability] useDashboardPersistence must be used within a <DashboardPersistenceProvider>. Wrap your component tree with <DashboardPersistenceProvider persistence={yourImpl}>.");
236
236
  return e;
237
237
  }
238
238
  //#endregion
239
239
  //#region src/providers/ContextFiltersProvider.tsx
240
- var M = e([]);
241
- function N({ filters: e, children: t }) {
240
+ var j = e([]);
241
+ function M({ filters: e, children: t }) {
242
242
  let n = r(() => e, [JSON.stringify(e)]);
243
- return /* @__PURE__ */ a(M.Provider, {
243
+ return /* @__PURE__ */ a(j.Provider, {
244
244
  value: n,
245
245
  children: t
246
246
  });
247
247
  }
248
- function P() {
249
- return n(M);
248
+ function N() {
249
+ return n(j);
250
250
  }
251
251
  //#endregion
252
252
  //#region src/dashboards/merge-filters.ts
253
- var F = new Set(["gte", "lte"]);
254
- function I(e) {
255
- return F.has(e.operator);
253
+ var P = new Set(["gte", "lte"]);
254
+ function F(e) {
255
+ return P.has(e.operator);
256
256
  }
257
- function L(...e) {
257
+ function I(...e) {
258
258
  let t = /* @__PURE__ */ new Map();
259
- for (let n of e) if (n) for (let [e, r] of R(n)) t.set(e, z(r));
259
+ for (let n of e) if (n) for (let [e, r] of L(n)) t.set(e, R(r));
260
260
  return Array.from(t.values()).flat();
261
261
  }
262
- function R(e) {
262
+ function L(e) {
263
263
  let t = /* @__PURE__ */ new Map();
264
264
  for (let n of e) t.set(n.field, [...t.get(n.field) ?? [], n]);
265
265
  return t;
266
266
  }
267
- function z(e) {
268
- return e.every(I) ? e.filter((t, n) => e.slice(n + 1).every((e) => e.operator !== t.operator)) : [e[e.length - 1]];
267
+ function R(e) {
268
+ return e.every(F) ? e.filter((t, n) => e.slice(n + 1).every((e) => e.operator !== t.operator)) : [e[e.length - 1]];
269
269
  }
270
270
  //#endregion
271
271
  //#region src/filters/scope-ceiling.ts
272
- var B = new Set(["eq", "in"]);
273
- function V(e, t) {
274
- let n = L(e, t), r = new Map(e.filter((e) => B.has(e.operator) && e.value.length > 0).map((e) => [e.field, e]));
272
+ var z = new Set(["eq", "in"]);
273
+ function B(e, t) {
274
+ let n = I(e, t), r = new Map(e.filter((e) => z.has(e.operator) && e.value.length > 0).map((e) => [e.field, e]));
275
275
  if (r.size === 0) return n;
276
276
  let i = /* @__PURE__ */ new Set();
277
277
  return n.flatMap((e) => {
278
278
  let t = r.get(e.field);
279
279
  if (!t || e === t) return [e];
280
- let n = pe(e, t);
280
+ let n = me(e, t);
281
281
  return n === t ? i.has(e.field) ? [] : (i.add(e.field), [t]) : [n];
282
282
  });
283
283
  }
284
- function H(e, t) {
284
+ function V(e, t) {
285
285
  let n = /* @__PURE__ */ new Set();
286
286
  return [...e, ...t ?? []].filter((e) => {
287
- let t = fe(e);
287
+ let t = pe(e);
288
288
  return n.has(t) ? !1 : (n.add(t), !0);
289
289
  });
290
290
  }
291
- function fe(e) {
291
+ function pe(e) {
292
292
  return JSON.stringify([
293
293
  e.field,
294
294
  e.operator,
295
295
  [...e.value].sort()
296
296
  ]);
297
297
  }
298
- function pe(e, t) {
299
- if (!B.has(e.operator)) return t;
298
+ function me(e, t) {
299
+ if (!z.has(e.operator)) return t;
300
300
  let n = new Set(t.value), r = e.value.map((e, t) => n.has(e) ? t : -1).filter((e) => e >= 0);
301
301
  return r.length === 0 ? t : r.length === e.value.length ? e : {
302
302
  ...e,
@@ -306,128 +306,140 @@ function pe(e, t) {
306
306
  }
307
307
  //#endregion
308
308
  //#region src/providers/clamped-data-sources.ts
309
- function me(e, t) {
309
+ function he(e, t) {
310
310
  return {
311
311
  fetchTimeSeries: (n) => e.fetchTimeSeries({
312
312
  ...n,
313
- filters: H(t, n.filters)
313
+ filters: V(t, n.filters)
314
314
  }),
315
315
  fetchFacets: (n) => e.fetchFacets({
316
316
  ...n,
317
- filters: H(t, n.filters)
317
+ filters: V(t, n.filters)
318
318
  }),
319
319
  fetchMeasures: (n) => e.fetchMeasures({
320
320
  ...n,
321
- filters: H(t, n.filters)
321
+ filters: V(t, n.filters)
322
322
  })
323
323
  };
324
324
  }
325
- function he(e, t) {
325
+ function ge(e, t) {
326
326
  let n = e.getById;
327
327
  return {
328
328
  fetchLogs: (n) => e.fetchLogs({
329
329
  ...n,
330
- filters: V(t, n.filters)
330
+ filters: B(t, n.filters)
331
331
  }),
332
332
  ...n ? { getById: (t, r, i) => n.call(e, t, r, i) } : {}
333
333
  };
334
334
  }
335
335
  //#endregion
336
336
  //#region src/providers/logs-data-source-provider.tsx
337
- var U = e(null);
338
- function ge({ dataSource: e, children: t }) {
339
- return /* @__PURE__ */ a(U.Provider, {
337
+ var H = e(null);
338
+ function _e({ dataSource: e, children: t }) {
339
+ return /* @__PURE__ */ a(H.Provider, {
340
340
  value: e,
341
341
  children: t
342
342
  });
343
343
  }
344
- function _e() {
345
- let e = W();
344
+ function ve() {
345
+ let e = U();
346
346
  if (!e) throw Error("[gamma-lib-observability] useLogsDataSource must be used within a <LogsDataSourceProvider>. Wrap your component tree with <LogsDataSourceProvider dataSource={yourImpl}>.");
347
347
  return e;
348
348
  }
349
- function W() {
350
- let e = n(U), t = P();
351
- return r(() => e ? he(e, t) : null, [e, t]);
349
+ function U() {
350
+ let e = n(H), t = N();
351
+ return r(() => e ? ge(e, t) : null, [e, t]);
352
352
  }
353
353
  //#endregion
354
354
  //#region src/providers/metrics-data-source-provider.tsx
355
- var G = e(null);
356
- function ve({ dataSource: e, children: t }) {
357
- return /* @__PURE__ */ a(G.Provider, {
355
+ var W = e(null);
356
+ function ye({ dataSource: e, children: t }) {
357
+ return /* @__PURE__ */ a(W.Provider, {
358
358
  value: e,
359
359
  children: t
360
360
  });
361
361
  }
362
- function ye() {
363
- let e = K();
362
+ function be() {
363
+ let e = G();
364
364
  if (!e) throw Error("[gamma-lib-observability] useMetricsDataSource must be used within a <MetricsDataSourceProvider>. Wrap your component tree with <MetricsDataSourceProvider dataSource={yourImpl}>.");
365
365
  return e;
366
366
  }
367
- function K() {
368
- let e = n(G), t = P();
369
- return r(() => e ? me(e, t) : null, [e, t]);
367
+ function G() {
368
+ let e = n(W), t = N();
369
+ return r(() => e ? he(e, t) : null, [e, t]);
370
370
  }
371
371
  //#endregion
372
372
  //#region src/providers/traces-data-source-provider.tsx
373
- var q = e(null);
374
- function be({ dataSource: e, children: t }) {
375
- return /* @__PURE__ */ a(q.Provider, {
373
+ var K = e(null);
374
+ function xe({ dataSource: e, children: t }) {
375
+ return /* @__PURE__ */ a(K.Provider, {
376
376
  value: e,
377
377
  children: t
378
378
  });
379
379
  }
380
- function xe() {
381
- let e = n(q);
380
+ function Se() {
381
+ let e = n(K);
382
382
  if (!e) throw Error("[gamma-lib-observability] useTracesDataSource must be used within a <TracesDataSourceProvider>. Wrap your component tree with <TracesDataSourceProvider dataSource={yourImpl}>.");
383
383
  return e;
384
384
  }
385
- function Se() {
386
- return n(q);
385
+ function Ce() {
386
+ return n(K);
387
387
  }
388
388
  //#endregion
389
389
  //#region src/providers/analytics-api-types-provider.tsx
390
- var J = e(void 0);
391
- function Ce({ apiTypes: e, children: t }) {
392
- return /* @__PURE__ */ a(J.Provider, {
390
+ var q = e(void 0);
391
+ function we({ apiTypes: e, children: t }) {
392
+ return /* @__PURE__ */ a(q.Provider, {
393
393
  value: e,
394
394
  children: t
395
395
  });
396
396
  }
397
- function we() {
398
- return n(J);
397
+ function Te() {
398
+ return n(q);
399
399
  }
400
400
  //#endregion
401
401
  //#region src/filters/filter-providers-context.tsx
402
- var Y = e(null), X = e(null);
403
- function Te({ providers: e, load: t, children: i }) {
404
- let o = r(() => e, [e]), s = n(X);
405
- return /* @__PURE__ */ a(X.Provider, {
402
+ var J = e(null), Y = e(null);
403
+ function Ee({ providers: e, load: t, children: i }) {
404
+ let o = r(() => e, [e]), s = n(Y);
405
+ return /* @__PURE__ */ a(Y.Provider, {
406
406
  value: t ?? s,
407
- children: /* @__PURE__ */ a(Y.Provider, {
407
+ children: /* @__PURE__ */ a(J.Provider, {
408
408
  value: o,
409
409
  children: i
410
410
  })
411
411
  });
412
412
  }
413
- function Ee() {
414
- let e = n(X);
413
+ function De() {
414
+ let e = n(Y);
415
415
  return e !== null && e.error !== null && e.error !== void 0 ? e : null;
416
416
  }
417
- function Z() {
418
- let e = n(Y);
417
+ function X() {
418
+ let e = n(J);
419
419
  if (!e) throw Error("[gamma-lib-observability] useFilterProviders must be used within a <FilterProvidersProvider>. Wrap your component tree with <FilterProvidersProvider providers={[...]}>.");
420
420
  return e;
421
421
  }
422
- function De() {
423
- return n(Y) ?? Q;
422
+ function Oe() {
423
+ return n(J) ?? Z;
424
424
  }
425
- var Q = Object.freeze([]);
426
- function Oe(e) {
427
- let t = Z();
425
+ var Z = Object.freeze([]);
426
+ function ke(e) {
427
+ let t = X();
428
428
  if (e) return t.find((t) => t.field === e);
429
429
  }
430
430
  //#endregion
431
+ //#region src/providers/analytics-definition-source-provider.tsx
432
+ var Q = e(void 0);
433
+ function Ae({ source: e, children: t }) {
434
+ return /* @__PURE__ */ a(Q.Provider, {
435
+ value: e,
436
+ children: t
437
+ });
438
+ }
439
+ function je() {
440
+ return n(Q);
441
+ }
442
+ //#endregion
431
443
  //#region src/providers/dashboard-access-provider.tsx
432
444
  var $ = e({
433
445
  readRefused: !1,
@@ -435,7 +447,7 @@ var $ = e({
435
447
  reportRefused: () => {},
436
448
  reportGranted: () => {}
437
449
  });
438
- function ke({ children: e }) {
450
+ function Me({ children: e }) {
439
451
  let [n, o] = i({
440
452
  read: !1,
441
453
  write: !1
@@ -465,8 +477,8 @@ function ke({ children: e }) {
465
477
  children: e
466
478
  });
467
479
  }
468
- function Ae() {
480
+ function Ne() {
469
481
  return n($);
470
482
  }
471
483
  //#endregion
472
- export { oe as A, w as B, N as C, A as D, j as E, ie as F, l as G, ee as H, x as I, s as J, u as K, S as L, ce as M, se as N, D as O, g as P, b as R, L as S, k as T, te as U, T as V, h as W, o as Y, _e as _, Oe as a, V as b, Ce as c, Se as d, xe as f, ge as g, K as h, Ee as i, E as j, ae as k, we as l, ye as m, Ae as n, Z as o, ve as p, d as q, Te as r, De as s, ke as t, be as u, W as v, P as w, I as x, H as y, C as z };
484
+ export { D as A, b as B, F as C, fe as D, N as E, se as F, te as G, w as H, g as I, u as J, h as K, ie as L, oe as M, E as N, A as O, ce as P, x as R, B as S, M as T, T as U, C as V, ee as W, s as X, d as Y, o as Z, G as _, Ee as a, U as b, X as c, Te as d, xe as f, be as g, ye as h, je as i, ae as j, k, Oe as l, Se as m, Ne as n, De as o, Ce as p, l as q, Ae as r, ke as s, Me as t, we as u, _e as v, I as w, V as x, ve as y, S as z };
@@ -1,6 +1,7 @@
1
1
  import { CartesianDataPoint } from '@gravitee/graphene-charts';
2
2
  import { SeriesDefinition } from '../../types/domain';
3
3
  import { TimeSeriesGroup } from '../../types/responses';
4
+ import { MetricCatalog } from '../metric-catalog';
4
5
  /**
5
6
  * A single renderable cartesian element resolved from a series definition and
6
7
  * its fetched data. One `SeriesDefinition` produces one element when ungrouped,
@@ -16,7 +17,7 @@ export interface CartesianElement {
16
17
  /** Resolved color for this element (explicit, group-mapped, or status-palette). */
17
18
  readonly color: string | undefined;
18
19
  }
19
- export declare function resolveCartesianSeries(series: readonly SeriesDefinition[], dataPerSeries: readonly (readonly TimeSeriesGroup[] | undefined)[]): {
20
+ export declare function resolveCartesianSeries(catalog: MetricCatalog, series: readonly SeriesDefinition[], dataPerSeries: readonly (readonly TimeSeriesGroup[] | undefined)[]): {
20
21
  elements: CartesianElement[];
21
22
  seriesMap: Map<string, readonly TimeSeriesGroup[]>;
22
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"time-series-adapter.d.ts","sourceRoot":"","sources":["../../../src/dashboards/adapters/time-series-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAM7D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AA6BD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,gBAAgB,EAAE,EACnC,aAAa,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,GAAG,SAAS,CAAC,EAAE,GACjE;IAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC,CAAA;CAAE,CA0CtF;AAkBD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAA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/B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC,EAC7D,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAmClB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC,EAC7D,UAAU,CAAC,EAAE,MAAM,GAClB,kBAAkB,EAAE,CAEtB"}
@@ -1,13 +1,14 @@
1
1
  import { SortOrder, TableColumn, TableColumnFormat, TableSort, TableThreshold } from '../../types/domain';
2
2
  import { FacetBucket } from '../../types/responses';
3
+ import { MetricCatalog } from '../metric-catalog';
3
4
  /**
4
5
  * A column with every default resolved: the identity used for sorting and for
5
6
  * the collapse plan, the label and unit taken from the metric catalog when the
6
7
  * author did not override them, and the flags turned into plain booleans.
7
8
  *
8
9
  * Resolution happens at render time, never at save time, so a table follows the
9
- * catalog as it is corrected or extended instead of freezing a copy of it into
10
- * the dashboard (see OBS-73 / OBS-81).
10
+ * catalog as the backend corrects or extends it instead of freezing a copy of
11
+ * it into the dashboard (OBS-73, OBS-81).
11
12
  */
12
13
  export interface ResolvedTableColumn {
13
14
  readonly id: string;
@@ -38,8 +39,12 @@ export interface AnalyticsTableModel {
38
39
  }
39
40
  /** A column's identity is its metric/measure pair unless the author named it. */
40
41
  export declare function tableColumnId(column: TableColumn): string;
41
- export declare function resolveTableColumn(column: TableColumn): ResolvedTableColumn;
42
- export declare function resolveTableColumns(columns: readonly TableColumn[]): ResolvedTableColumn[];
42
+ /**
43
+ * `catalog` is the one in scope (`useMetricCatalog`); a host calling this
44
+ * outside the observability routes gets the bundled catalog's labels and units.
45
+ */
46
+ export declare function resolveTableColumn(column: TableColumn, catalog?: MetricCatalog): ResolvedTableColumn;
47
+ export declare function resolveTableColumns(columns: readonly TableColumn[], catalog?: MetricCatalog): ResolvedTableColumn[];
43
48
  /**
44
49
  * The sort the widget actually applies: the author's when it still names a
45
50
  * column, otherwise the first column descending. A saved sort pointing at a
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-table-model.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/analytics-table-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKzD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC5C,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAEzD;AAaD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAc3E;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,mBAAmB,EAAE,CAE1F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B,SAAS,GAAG,SAAS,CAKvB;AAYD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,mBAAmB,CAwCrB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAKtD;AAED,gEAAgE;AAChE,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,GACf,iBAAiB,EAAE,CAWrB"}
1
+ {"version":3,"file":"analytics-table-model.d.ts","sourceRoot":"","sources":["../../../src/dashboards/analytics-table/analytics-table-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE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,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,GAAE,aAAsC,GAC9C,mBAAmB,EAAE,CAEvB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B,SAAS,GAAG,SAAS,CAKvB;AAYD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,mBAAmB,CAwCrB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAKtD;AAED,gEAAgE;AAChE,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,GACf,iBAAiB,EAAE,CAWrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardEditorPage.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DashboardEditorPage.tsx"],"names":[],"mappings":"AAoFA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,EAAE,wBAAwB,2CAYjF"}
1
+ {"version":3,"file":"DashboardEditorPage.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DashboardEditorPage.tsx"],"names":[],"mappings":"AAuFA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,EAAE,wBAAwB,2CAYjF"}
@@ -15,7 +15,8 @@ export interface DimensionSelectProps {
15
15
  readonly ariaLabel?: string;
16
16
  }
17
17
  /**
18
- * Dimension picker backed by the curated catalog, narrowed to what the
18
+ * Dimension picker backed by the catalog in scope (see `useMetricCatalog`),
19
+ * narrowed to what the
19
20
  * selected metrics accept and to the API types the host declared (see
20
21
  * `useAnalyticsApiTypes`). A dimension that is not offered is kept selectable
21
22
  * so a saved widget shows it and saves it back unchanged.
@@ -1 +1 @@
1
- {"version":3,"file":"DimensionSelect.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DimensionSelect.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAID;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,EAAE,EACF,SAAiB,EACjB,QAAQ,EACR,SAAuB,GACxB,EAAE,oBAAoB,2CAkCtB"}
1
+ {"version":3,"file":"DimensionSelect.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/DimensionSelect.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAID;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,EAAE,EACF,SAAiB,EACjB,QAAQ,EACR,SAAuB,GACxB,EAAE,oBAAoB,2CAmCtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FacetQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/FacetQueryFields.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAa,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAcxG,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,eAAe,CAAC;IAC9D,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAyE3E"}
1
+ {"version":3,"file":"FacetQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/FacetQueryFields.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAa,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAcxG,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,eAAe,CAAC;IAC9D,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CA8E3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"MeasureSelect.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MeasureSelect.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAQD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,kBAAkB,2CAkChF"}
1
+ {"version":3,"file":"MeasureSelect.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MeasureSelect.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAQD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,kBAAkB,2CAmChF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tells the author the pickers run on the bundled catalog: the environment's
3
+ * own list could not be read (no source, or the request failed, as on a
4
+ * backend older than the definition endpoint), so a metric the backend knows
5
+ * may be missing from the pickers. Nothing while the list is loading, and
6
+ * nothing once it is there. View mode shows nothing either way.
7
+ */
8
+ export declare function MetricCatalogHint(): import("react/jsx-runtime").JSX.Element | null;
9
+ //# sourceMappingURL=MetricCatalogHint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricCatalogHint.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricCatalogHint.tsx"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,mDAUhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MetricGroupItemsEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricGroupItemsEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAWpE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,IAAI,CAAC;CACjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,2BAA2B,2CAyFtF"}
1
+ {"version":3,"file":"MetricGroupItemsEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricGroupItemsEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAWpE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,IAAI,CAAC;CACjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,2BAA2B,2CA4FtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"MetricQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricQueryFields.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAW/D,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CA4C7E"}
1
+ {"version":3,"file":"MetricQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricQueryFields.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAW/D,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CA6C7E"}
@@ -4,8 +4,9 @@ export interface MetricSelectProps {
4
4
  readonly id?: string;
5
5
  }
6
6
  /**
7
- * Metric picker backed by the curated catalog, narrowed to the API types the
8
- * host declared (see `useAnalyticsApiTypes`). A metric that is not offered,
7
+ * Metric picker backed by the catalog in scope (see `useMetricCatalog`), its
8
+ * served families as groups, narrowed to the API types the host declared
9
+ * (see `useAnalyticsApiTypes`). A metric that is not offered,
9
10
  * whether hand-written in the JSON tab or saved under another host's API
10
11
  * types, is kept selectable under "Custom" so the form never destroys an
11
12
  * advanced configuration: it shows, and is saved back unchanged.
@@ -1 +1 @@
1
- {"version":3,"file":"MetricSelect.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricSelect.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,iBAAiB,2CAiCtE"}
1
+ {"version":3,"file":"MetricSelect.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/MetricSelect.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,iBAAiB,2CAkCtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"SeriesListEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/SeriesListEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,oBAAoB,CAAC;AAyBjF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;CACzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CA6I3E"}
1
+ {"version":3,"file":"SeriesListEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/SeriesListEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,oBAAoB,CAAC;AAyBjF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;CACzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAwJ3E"}
@@ -1,10 +1,11 @@
1
1
  import { TableColumn, TableThreshold } from '../../types/domain';
2
+ import { MetricCatalog } from '../metric-catalog';
2
3
  export interface TableColumnsEditorProps {
3
4
  readonly columns: readonly TableColumn[];
4
5
  readonly onChange: (columns: TableColumn[]) => void;
5
6
  }
6
7
  /** The pill's text: the sign, the bound, and what it is a bound on. */
7
- export declare function describeTier(tier: TableThreshold, column: TableColumn): string;
8
+ export declare function describeTier(tier: TableThreshold, column: TableColumn, catalog: MetricCatalog): string;
8
9
  /**
9
10
  * Editor for a table's columns.
10
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumnsEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableColumnsEditor.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,WAAW,EAAqB,cAAc,EAAkB,MAAM,oBAAoB,CAAC;AAiCzG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CACrD;AAmBD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAS9E;AAkCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CA6ThF"}
1
+ {"version":3,"file":"TableColumnsEditor.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableColumnsEditor.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,WAAW,EAAqB,cAAc,EAAkB,MAAM,oBAAoB,CAAC;AAGzG,OAAO,EAA8D,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA8BnH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CACrD;AAmBD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAStG;AAmCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAkUhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableQueryFields.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAA0B,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAWtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CA2F3E"}
1
+ {"version":3,"file":"TableQueryFields.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/TableQueryFields.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAA0B,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAWtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CA4F3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetConfigForm.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetConfigForm.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAEV,eAAe,EAGf,MAAM,EAEP,MAAM,oBAAoB,CAAC;AAkB5B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACxD;AAYD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,qBAAqB,2CA4E7F"}
1
+ {"version":3,"file":"WidgetConfigForm.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetConfigForm.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAEV,eAAe,EAGf,MAAM,EAEP,MAAM,oBAAoB,CAAC;AAmB5B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACxD;AAYD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,qBAAqB,2CA8E7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetEditorPanel.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetEditorPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQ7E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,aAAa,GACd,EAAE,sBAAsB,2CAgIxB"}
1
+ {"version":3,"file":"WidgetEditorPanel.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetEditorPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQ7E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,aAAa,GACd,EAAE,sBAAsB,2CAiIxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetPreview.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAmC7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;CACvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,2CAqBxF"}
1
+ {"version":3,"file":"WidgetPreview.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/WidgetPreview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAmC7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;CACvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,2CAsBxF"}
@@ -1,8 +1,8 @@
1
1
  import { Widget, WidgetType } from '../../types/domain';
2
- /** What a widget queries until the author says otherwise: the editor's defaults, shared with the query fields. */
3
- export declare const DEFAULT_METRIC = "HTTP_REQUESTS";
2
+ import { MetricCatalog } from '../metric-catalog';
3
+ /** The measure a conversion falls back to when the widget carries none: the editor's default, shared with the query fields. */
4
4
  export declare const DEFAULT_MEASURE = "COUNT";
5
5
  /** Accepted by every metric of the catalog, so a group-by can always fall back to it. */
6
6
  export declare const DEFAULT_DIMENSION = "API";
7
- export declare function convertWidgetType(widget: Widget, type: WidgetType): Widget;
7
+ export declare function convertWidgetType(catalog: MetricCatalog, widget: Widget, type: WidgetType): Widget;
8
8
  //# sourceMappingURL=convert-widget-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"convert-widget-type.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/convert-widget-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,MAAM,EAAgB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMxF,kHAAkH;AAClH,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AA0CvC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CA6E1E"}
1
+ {"version":3,"file":"convert-widget-type.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/convert-widget-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,MAAM,EAAgB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGxF,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG1F,+HAA+H;AAC/H,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AA6CvC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAgFlG"}
@@ -1,4 +1,5 @@
1
1
  import { Dashboard, FilterCondition, TimeRange, Widget, WidgetLayout, WidgetType } from '../../types/domain';
2
+ import { DefaultMetric } from '../metric-catalog';
2
3
  /**
3
4
  * Fields of a {@link Dashboard} the editor (and the JSON tab) may change.
4
5
  * Identity fields (`id`, `createdAt`, `updatedAt`) are managed by the editor
@@ -100,9 +101,11 @@ export declare const MAX_TABLE_ROWS = 100;
100
101
  export declare function nextWidgetPosition(widgets: readonly Widget[]): number;
101
102
  /**
102
103
  * Builds a blank widget of the requested type, positioned below the current
103
- * content with a sensible default size for that visualization.
104
+ * content with a sensible default size for that visualization, on the first
105
+ * metrics the host is offered (`defaultMetricsFor`): `start[0]` for every
106
+ * type, `start[1]` as a table's second column when there is one.
104
107
  */
105
- export declare function createDefaultWidget(type: WidgetType, id: string, widgets: readonly Widget[]): Widget;
108
+ export declare function createDefaultWidget(type: WidgetType, id: string, widgets: readonly Widget[], start: readonly DefaultMetric[]): Widget;
106
109
  /**
107
110
  * Default title for a freshly created dashboard, stamped with the creation
108
111
  * moment so several drafts stay distinguishable without user input.
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-editor-state.d.ts","sourceRoot":"","sources":["../../../src/dashboards/editor/dashboard-editor-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKlH;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,gBAAgB,CA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